@adaptabletools/adaptable-cjs 18.0.0-canary.9 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +18 -20
- package/base.css.map +1 -1
- package/index.css +22 -20
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +5 -6
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -13
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +20 -9
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +94 -0
- package/src/AdaptableOptions/CustomSortOptions.d.ts +2 -2
- package/src/AdaptableOptions/DataImportOptions.d.ts +2 -2
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -26
- package/src/AdaptableOptions/NoteOptions.d.ts +12 -3
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -2
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +1 -1
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
- package/src/Api/AdaptableApi.d.ts +16 -6
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/ColumnMenuApi.d.ts +13 -0
- package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +28 -28
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +3 -4
- package/src/Api/ContextMenuApi.d.ts +9 -0
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/CommentChanged.js +2 -0
- package/src/Api/Events/GridDataChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +2 -2
- package/src/Api/GridApi.d.ts +32 -4
- package/src/Api/Implementation/ActionColumnApiImpl.js +3 -6
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +7 -5
- package/src/Api/Implementation/AdaptableApiImpl.js +9 -5
- package/src/Api/Implementation/AlertApiImpl.js +8 -13
- package/src/Api/Implementation/ApiBase.d.ts +6 -4
- package/src/Api/Implementation/ApiBase.js +11 -5
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ColumnApiImpl.js +48 -16
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/ColumnMenuApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ColumnMenuApiImpl.js +16 -0
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +33 -0
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +48 -15
- package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -5
- package/src/Api/Implementation/CommentsApiImpl.js +6 -6
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +21 -25
- package/src/Api/Implementation/ContextMenuApiImpl.d.ts +7 -0
- package/src/Api/Implementation/ContextMenuApiImpl.js +13 -0
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +14 -19
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -8
- package/src/Api/Implementation/FormatColumnApiImpl.js +4 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -2
- package/src/Api/Implementation/GridApiImpl.js +52 -11
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -7
- package/src/Api/Implementation/LayoutApiImpl.js +6 -15
- package/src/Api/Implementation/{NotesApiImpl.d.ts → NoteApiImpl.d.ts} +8 -8
- package/src/Api/Implementation/{NotesApiImpl.js → NoteApiImpl.js} +14 -14
- package/src/Api/Implementation/OptionsApiImpl.d.ts +6 -5
- package/src/Api/Implementation/OptionsApiImpl.js +7 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +32 -27
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
- package/src/Api/Internal/ActionRowInternalApi.js +19 -46
- package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
- package/src/Api/Internal/AdaptableInternalApi.js +16 -30
- package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
- package/src/Api/Internal/AlertInternalApi.js +7 -20
- package/src/Api/Internal/CalculatedColumnInternalApi.js +10 -16
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +24 -30
- package/src/Api/Internal/ColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnInternalApi.js +8 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +1 -1
- package/src/Api/Internal/CommentsInternalApi.js +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +2 -7
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +3 -13
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -6
- package/src/Api/Internal/FormatColumnInternalApi.js +37 -30
- package/src/Api/Internal/FreeTextColumnInternalApi.js +4 -3
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +8 -8
- package/src/Api/Internal/GridInternalApi.d.ts +2 -0
- package/src/Api/Internal/GridInternalApi.js +28 -40
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -0
- package/src/Api/Internal/LayoutInternalApi.js +26 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/{NotesInternalApi.js → NoteInternalApi.js} +6 -5
- package/src/Api/Internal/PredicateInternalApi.d.ts +6 -6
- package/src/Api/Internal/PredicateInternalApi.js +5 -40
- package/src/Api/Internal/ScheduleInternalApi.js +1 -6
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +2 -2
- package/src/Api/Internal/StyledColumnInternalApi.js +8 -9
- package/src/Api/Internal/SystemStatusInternalApi.js +1 -7
- package/src/Api/Internal/TeamSharingInternalApi.js +2 -7
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/LayoutApi.d.ts +9 -12
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/NoteApi.js +2 -0
- package/src/Api/OptionsApi.d.ts +14 -10
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/AlertState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +5 -14
- package/src/PredefinedConfig/Common/{AdaptableScope.d.ts → ColumnScope.d.ts} +1 -1
- package/src/PredefinedConfig/Common/ColumnScope.js +2 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +1 -5
- package/src/PredefinedConfig/Common/Enums.d.ts +4 -1
- package/src/PredefinedConfig/Common/Enums.js +3 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +39 -4
- package/src/PredefinedConfig/Common/Menu.js +126 -0
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowScope.js +2 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +15 -1
- package/src/PredefinedConfig/Common/RowSummary.js +17 -1
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/TransposeConfig.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/ExportState.d.ts +2 -2
- package/src/PredefinedConfig/FlashingCellState.d.ts +2 -2
- package/src/PredefinedConfig/FormatColumnState.d.ts +9 -5
- package/src/PredefinedConfig/LayoutState.d.ts +2 -2
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +4 -4
- package/src/PredefinedConfig/NoteState.js +2 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +2 -2
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/ShortcutState.d.ts +2 -2
- package/src/PredefinedConfig/StyledColumnState.d.ts +5 -5
- package/src/PredefinedConfig/SystemState.d.ts +5 -4
- package/src/Redux/ActionsReducers/CommentsRedux.d.ts +0 -4
- package/src/Redux/ActionsReducers/CommentsRedux.js +1 -39
- package/src/Redux/ActionsReducers/LayoutRedux.js +12 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +31 -31
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -22
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +11 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +14 -11
- package/src/Redux/Store/AdaptableStore.js +39 -32
- package/src/Strategy/AdaptableModuleBase.d.ts +10 -10
- package/src/Strategy/AdaptableModuleBase.js +13 -16
- package/src/Strategy/AlertModule.d.ts +3 -2
- package/src/Strategy/AlertModule.js +4 -4
- package/src/Strategy/BulkUpdateModule.d.ts +3 -2
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +3 -4
- package/src/Strategy/CalculatedColumnModule.js +18 -14
- package/src/Strategy/CellSummaryModule.d.ts +9 -9
- package/src/Strategy/CellSummaryModule.js +96 -107
- package/src/Strategy/ColumnFilterModule.d.ts +3 -3
- package/src/Strategy/ColumnFilterModule.js +36 -57
- package/src/Strategy/ColumnInfoModule.d.ts +3 -3
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +12 -0
- package/src/Strategy/CommentModule.js +75 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -2
- package/src/Strategy/CustomSortModule.js +3 -2
- package/src/Strategy/DashboardModule.d.ts +3 -3
- package/src/Strategy/DashboardModule.js +10 -20
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +56 -42
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +4 -3
- package/src/Strategy/FlashingCellModule.js +10 -10
- package/src/Strategy/FormatColumnModule.d.ts +1 -1
- package/src/Strategy/FormatColumnModule.js +29 -47
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -2
- package/src/Strategy/GridInfoModule.d.ts +3 -3
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +4 -4
- package/src/Strategy/LayoutModule.d.ts +4 -10
- package/src/Strategy/LayoutModule.js +50 -150
- package/src/Strategy/NoteModule.d.ts +10 -0
- package/src/Strategy/NoteModule.js +60 -0
- package/src/Strategy/PlusMinusModule.d.ts +1 -2
- package/src/Strategy/PlusMinusModule.js +5 -5
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +3 -2
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -1
- package/src/Strategy/StyledColumnModule.js +42 -22
- package/src/Strategy/SystemStatusModule.d.ts +3 -3
- package/src/Strategy/SystemStatusModule.js +6 -3
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -2
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +144 -7
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +21 -1
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +10 -7
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +7 -25
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +1 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +12 -10
- package/src/Utilities/Services/CellPopupService.js +4 -4
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.js +1 -198
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +245 -26
- package/src/Utilities/Services/RowSummaryService.d.ts +26 -0
- package/src/Utilities/Services/RowSummaryService.js +160 -0
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +18 -0
- package/src/Utilities/license/decode.js +1 -70
- package/src/Utilities/license/hashing.js +1 -47
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/ColumnInfo/ColumnInfo.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +15 -7
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +6 -3
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
- package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
- package/src/View/Components/NewScopeComponent.d.ts +5 -5
- package/src/View/Components/NewScopeComponent.js +6 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +10 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -10
- package/src/View/Components/RangesComponent.d.ts +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +2 -2
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +4 -2
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +20 -7
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +27 -12
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +3 -3
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.js +20 -19
- package/src/View/Layout/Wizard/LayoutWizard.js +38 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +18 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
- package/src/View/License/LicenseWatermark.js +1 -66
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +16 -11
- package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
- package/src/View/SmartEdit/SmartEditPopup.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +5 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +38 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +40 -4
- package/src/agGrid/AdaptableAgGrid.d.ts +11 -16
- package/src/agGrid/AdaptableAgGrid.js +230 -250
- package/src/agGrid/AgGridAdapter.d.ts +4 -2
- package/src/agGrid/AgGridAdapter.js +12 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -3
- package/src/agGrid/AgGridColumnAdapter.js +42 -71
- package/src/agGrid/AgGridMenuAdapter.d.ts +25 -8
- package/src/agGrid/AgGridMenuAdapter.js +405 -74
- package/src/agGrid/AgGridOptionsService.d.ts +4 -1
- package/src/agGrid/AgGridOptionsService.js +22 -0
- package/src/agGrid/BadgeRenderer.d.ts +2 -2
- package/src/agGrid/BadgeRenderer.js +24 -11
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +124 -0
- package/src/agGrid/defaultAdaptableOptions.js +7 -12
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/sortColumnStateForVisibleColumns.d.ts +12 -0
- package/src/agGrid/sortColumnStateForVisibleColumns.js +50 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- package/src/components/Accordion.d.ts +7 -0
- package/src/components/Accordion.js +41 -0
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +3 -17
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +1 -1
- package/src/components/Select/Select.js +3 -1
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/collapse-all.d.ts +3 -0
- package/src/components/icons/collapse-all.js +7 -0
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +7 -0
- package/src/components/icons/csv.d.ts +3 -0
- package/src/components/icons/csv.js +7 -0
- package/src/components/icons/data-object.d.ts +3 -0
- package/src/components/icons/data-object.js +7 -0
- package/src/components/icons/excel.d.ts +3 -0
- package/src/components/icons/excel.js +8 -0
- package/src/components/icons/expand-all.d.ts +3 -0
- package/src/components/icons/expand-all.js +7 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +7 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +7 -0
- package/src/components/icons/index.js +22 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +7 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +7 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +222 -116
- package/src/metamodel/adaptable.metamodel.js +1 -9429
- package/src/parser/src/parser.js +576 -553
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -4
- package/src/parser/src/types.d.ts +2 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +32 -25
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +0 -234
- package/src/AdaptableOptions/MenuOptions.js +0 -99
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/ScopeApiImpl.d.ts +0 -33
- package/src/Api/Internal/NotesInternalApi.d.ts +0 -4
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -5
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -38
- package/src/Strategy/CommentsModule.d.ts +0 -17
- package/src/Strategy/CommentsModule.js +0 -86
- package/src/Strategy/NotesModule.d.ts +0 -10
- package/src/Strategy/NotesModule.js +0 -61
- package/src/Utilities/Services/SummaryService.d.ts +0 -19
- package/src/Utilities/Services/SummaryService.js +0 -33
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- /package/src/{Api/Events/CommentsChangedInfo.js → AdaptableOptions/ColumnMenuOptions.js} +0 -0
- /package/src/{Api/NotesApi.js → AdaptableOptions/ContextMenuOptions.js} +0 -0
- /package/src/Api/{ScopeApi.js → ColumnMenuApi.js} +0 -0
- /package/src/{PredefinedConfig/Common/AdaptableScope.js → Api/ColumnScopeApi.js} +0 -0
- /package/src/{PredefinedConfig/NotesState.js → Api/ContextMenuApi.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AgGridMenuAdapter = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const MenuOptions_1 = require("../AdaptableOptions/MenuOptions");
|
|
6
5
|
const Icon_1 = require("../components/Icon");
|
|
7
6
|
const icons_1 = require("../components/icons");
|
|
8
7
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
@@ -21,7 +20,7 @@ class AgGridMenuAdapter {
|
|
|
21
20
|
}
|
|
22
21
|
buildColumnMenu(params, originalGetMainMenuItems) {
|
|
23
22
|
var _a;
|
|
24
|
-
const
|
|
23
|
+
const columnMenuOptions = this.adaptableOptions.columnMenuOptions;
|
|
25
24
|
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
26
25
|
if (!params.column) {
|
|
27
26
|
// return only AG Grid context if the Adaptable column is not found (should not happen)
|
|
@@ -29,17 +28,19 @@ class AgGridMenuAdapter {
|
|
|
29
28
|
}
|
|
30
29
|
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
|
|
31
30
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, params.column);
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* AG Grid items
|
|
33
|
+
*/
|
|
34
|
+
const agGridDefaultStructure = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
|
|
35
|
+
const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
|
|
36
|
+
const defaultColumnMenuStructure = this.buildColumnMenuDefaultStructure(adaptableMenuItems, menuContext);
|
|
33
37
|
// 1. first check if there is a custom column menu defined
|
|
34
|
-
if (typeof
|
|
35
|
-
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => (
|
|
36
|
-
menuType: 'AgGrid',
|
|
37
|
-
name: itemName,
|
|
38
|
-
}));
|
|
38
|
+
if (typeof columnMenuOptions.customColumnMenu === 'function') {
|
|
39
|
+
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
|
|
39
40
|
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
40
|
-
const customMenuItems =
|
|
41
|
+
const customMenuItems = columnMenuOptions
|
|
41
42
|
.customColumnMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
42
|
-
defaultAdaptableMenuItems,
|
|
43
|
+
defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(defaultColumnMenuStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
|
|
43
44
|
.filter(Boolean);
|
|
44
45
|
return customMenuItems
|
|
45
46
|
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
@@ -49,42 +50,57 @@ class AgGridMenuAdapter {
|
|
|
49
50
|
const defaultContextMenu = [
|
|
50
51
|
...agGridMenuItems,
|
|
51
52
|
'separator',
|
|
52
|
-
...
|
|
53
|
+
...defaultColumnMenuStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
53
54
|
];
|
|
54
|
-
return defaultContextMenu;
|
|
55
|
-
}
|
|
56
|
-
buildStructuredAdaptableColumnItems(menuContext) {
|
|
57
|
-
const adaptableMenuItems = this.createAdaptableColumnMenuItems(menuContext);
|
|
58
|
-
// sort Adaptable menu items by default order
|
|
59
|
-
const structuredAdaptableMenuItems = this.buildGroupedModuleItems(MenuOptions_1.DEFAULT_ADAPTABLE_COLUMN_MENU_STRUCTURE, adaptableMenuItems);
|
|
60
|
-
return { adaptableMenuItems, structuredAdaptableMenuItems };
|
|
55
|
+
return this.removeConsecutiveSeparators(defaultContextMenu);
|
|
61
56
|
}
|
|
62
57
|
buildContextMenu(params, originalGetContextMenuItems) {
|
|
63
58
|
var _a;
|
|
59
|
+
if (!params.column) {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
64
62
|
// we do this in order to refresh the internal state of selected cells (technically query the AG Grid cellRanges)
|
|
65
63
|
// (right-click selected the current cell, but this was not reflected in the internal state of the selected cells)
|
|
66
64
|
this.adaptableInstance.refreshSelectedCellsState();
|
|
67
|
-
const
|
|
68
|
-
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
69
|
-
if (!params.column) {
|
|
70
|
-
// return only AG Grid context if the Adaptable column is not found (should not happen)
|
|
71
|
-
return agGridMenuItems;
|
|
72
|
-
}
|
|
65
|
+
const contextMenuOptions = this.adaptableOptions.contextMenuOptions;
|
|
73
66
|
const adaptableColumn = this.adaptableApi.columnApi.getColumnWithColumnId((_a = params.column) === null || _a === void 0 ? void 0 : _a.getColId());
|
|
74
67
|
const menuContext = this.createContextMenuContextObject(params, adaptableColumn);
|
|
68
|
+
/**
|
|
69
|
+
* AG Grid Items
|
|
70
|
+
*/
|
|
71
|
+
const agGridMenuItems = (params.defaultItems ? [...params.defaultItems] : []);
|
|
72
|
+
const agGridCopyItems = agGridMenuItems.filter((item) => ['copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'cut', 'paste'].includes(item));
|
|
73
|
+
const otherAgGridItems = agGridMenuItems.filter((item) => !agGridCopyItems.includes(item) &&
|
|
74
|
+
// we provide Adaptable exports in the context menu
|
|
75
|
+
!['export', 'csvExport', 'excelExport'].includes(item));
|
|
76
|
+
const agGridDefaultStructure = [
|
|
77
|
+
{
|
|
78
|
+
menuType: 'Group',
|
|
79
|
+
label: 'Copy & Paste',
|
|
80
|
+
icon: {
|
|
81
|
+
name: 'copy',
|
|
82
|
+
},
|
|
83
|
+
subMenuItems: agGridCopyItems.map((item) => this.mapAgGridItemTypeToAgGridMenuItem(item)),
|
|
84
|
+
},
|
|
85
|
+
...otherAgGridItems
|
|
86
|
+
.filter((itemName) => itemName !== 'separator')
|
|
87
|
+
.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName)),
|
|
88
|
+
];
|
|
89
|
+
/**
|
|
90
|
+
* Adaptable Items
|
|
91
|
+
*/
|
|
75
92
|
const adaptableMenuItems = this.createAdaptableContextMenuItems(menuContext);
|
|
76
|
-
|
|
77
|
-
|
|
93
|
+
const adaptableDefaultStructure = this.buildContextMenuDefaultStructure(adaptableMenuItems, menuContext);
|
|
94
|
+
/**
|
|
95
|
+
* Build the context menu
|
|
96
|
+
*/
|
|
78
97
|
// 1. first check if there is a custom context menu defined
|
|
79
|
-
if (typeof
|
|
80
|
-
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => (
|
|
81
|
-
menuType: 'AgGrid',
|
|
82
|
-
name: itemName,
|
|
83
|
-
}));
|
|
98
|
+
if (typeof contextMenuOptions.customContextMenu === 'function') {
|
|
99
|
+
const defaultAgGridMenuItems = agGridMenuItems.map((itemName) => this.mapAgGridItemTypeToAgGridMenuItem(itemName));
|
|
84
100
|
const defaultAdaptableMenuItems = adaptableMenuItems.map((adaptableItem) => (Object.assign({ menuType: 'Adaptable' }, adaptableItem)));
|
|
85
|
-
const customMenuItems =
|
|
101
|
+
const customMenuItems = contextMenuOptions
|
|
86
102
|
.customContextMenu(Object.assign(Object.assign({}, menuContext), { defaultAgGridMenuItems,
|
|
87
|
-
defaultAdaptableMenuItems,
|
|
103
|
+
defaultAdaptableMenuItems, defaultAdaptableMenuStructure: this.mapAdaptableMenuItemToSystemMenuItems(adaptableDefaultStructure), defaultAgGridMenuStructure: agGridDefaultStructure }))
|
|
88
104
|
.filter(Boolean);
|
|
89
105
|
return customMenuItems
|
|
90
106
|
.map((customMenuItem) => this.mapCustomMenuItemToAgGridMenuDefinition(customMenuItem, menuContext))
|
|
@@ -92,11 +108,27 @@ class AgGridMenuAdapter {
|
|
|
92
108
|
}
|
|
93
109
|
// 2. if not, return the default context menu
|
|
94
110
|
const defaultContextMenu = [
|
|
95
|
-
...
|
|
111
|
+
...agGridDefaultStructure.map((agGridItem) => this.mapCustomMenuItemToAgGridMenuDefinition(agGridItem, menuContext)),
|
|
96
112
|
'separator',
|
|
97
|
-
...
|
|
113
|
+
...adaptableDefaultStructure.map((adaptableItem) => this.mapAdaptableMenuItemToAgGridMenuDefinition(adaptableItem)),
|
|
98
114
|
];
|
|
99
|
-
return defaultContextMenu;
|
|
115
|
+
return this.removeConsecutiveSeparators(defaultContextMenu);
|
|
116
|
+
}
|
|
117
|
+
mapAgGridItemTypeToAgGridMenuItem(itemName) {
|
|
118
|
+
return {
|
|
119
|
+
menuType: 'AgGrid',
|
|
120
|
+
name: itemName,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
// due to entitlements or other reasons, some menu items might be hidden, leading to consecutive separators
|
|
124
|
+
removeConsecutiveSeparators(menuItems, separator = 'separator') {
|
|
125
|
+
return menuItems.reduce((acc, item, index, array) => {
|
|
126
|
+
if (item === separator && array[index + 1] === separator) {
|
|
127
|
+
return acc;
|
|
128
|
+
}
|
|
129
|
+
acc.push(item);
|
|
130
|
+
return acc;
|
|
131
|
+
}, []);
|
|
100
132
|
}
|
|
101
133
|
createColumnMenuContextObject(adaptableColumn, agGridColumn) {
|
|
102
134
|
return Object.assign(Object.assign({}, this.adaptableInstance.api.internalApi.buildBaseContext()), { adaptableColumn: adaptableColumn, agGridColumn: agGridColumn, isRowGroupColumn: this.adaptableInstance.api.columnApi.isAutoRowGroupColumn(agGridColumn.getColId()) });
|
|
@@ -104,7 +136,7 @@ class AgGridMenuAdapter {
|
|
|
104
136
|
createAdaptableContextMenuItems(menuContext) {
|
|
105
137
|
let contextMenuItems = [];
|
|
106
138
|
this.adaptableInstance.adaptableModules.forEach((module) => {
|
|
107
|
-
let menuItems = module.
|
|
139
|
+
let menuItems = module.createContextMenuItems(menuContext);
|
|
108
140
|
if (menuItems) {
|
|
109
141
|
contextMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
|
|
110
142
|
}
|
|
@@ -144,6 +176,9 @@ class AgGridMenuAdapter {
|
|
|
144
176
|
}
|
|
145
177
|
mapAdaptableMenuItemToAgGridMenuDefinition(adaptableMenuItem) {
|
|
146
178
|
var _a;
|
|
179
|
+
if (adaptableMenuItem === '-') {
|
|
180
|
+
return 'separator';
|
|
181
|
+
}
|
|
147
182
|
return {
|
|
148
183
|
name: adaptableMenuItem.label,
|
|
149
184
|
action: adaptableMenuItem.onClick
|
|
@@ -201,53 +236,345 @@ class AgGridMenuAdapter {
|
|
|
201
236
|
}).filter(Boolean),
|
|
202
237
|
};
|
|
203
238
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
239
|
+
buildContextMenuDefaultStructure(availableMenuItems, menuContext) {
|
|
240
|
+
// Alert
|
|
241
|
+
const alertMenuItems = this.getModuleSpecificStructure('Alert', availableMenuItems);
|
|
242
|
+
// BulkUpdate
|
|
243
|
+
const bulkUpdateMenuItems = this.getModuleSpecificStructure('BulkUpdate', availableMenuItems);
|
|
244
|
+
// CalculatedColumn
|
|
245
|
+
const calculatedColumnMenuItems = this.getModuleSpecificStructure('CalculatedColumn', availableMenuItems);
|
|
246
|
+
// CellSummary
|
|
247
|
+
const cellSummaryMenuItems = this.getModuleSpecificStructure('CellSummary', availableMenuItems);
|
|
248
|
+
// ColumnFilter
|
|
249
|
+
const columnFilterMenuItems = this.getModuleSpecificStructure('ColumnFilter', availableMenuItems);
|
|
250
|
+
// ColumnInfo
|
|
251
|
+
const columnInfoMenuItems = this.getModuleSpecificStructure('ColumnInfo', availableMenuItems);
|
|
252
|
+
// Comment
|
|
253
|
+
const commentMenuItems = this.getModuleSpecificStructure('Comment', availableMenuItems);
|
|
254
|
+
// Dashboard
|
|
255
|
+
const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems, 'dashboard-group');
|
|
256
|
+
// DataImport
|
|
257
|
+
const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
|
|
258
|
+
// Export
|
|
259
|
+
const exportMenuItems = this.getExportContextMenuStructure(availableMenuItems);
|
|
260
|
+
// FDC3
|
|
261
|
+
const fdc3MenuItems = this.getModuleSpecificStructure('Fdc3', availableMenuItems);
|
|
262
|
+
// FlashingCell
|
|
263
|
+
const flashingCellMenuItems = this.getModuleSpecificStructure('FlashingCell', availableMenuItems);
|
|
264
|
+
// GridInfo
|
|
265
|
+
const gridInfoMenuItems = this.getModuleSpecificStructure('GridInfo', availableMenuItems);
|
|
266
|
+
// Layout
|
|
267
|
+
const [gridActionItems, otherLayoutItems] = this.getLayoutContextMenuStructure(availableMenuItems);
|
|
268
|
+
// Note
|
|
269
|
+
const noteMenuItems = this.getModuleSpecificStructure('Note', availableMenuItems);
|
|
270
|
+
// SettingsPanel
|
|
271
|
+
const settingsPanelMenuItems = this.getModuleSpecificStructure('SettingsPanel', availableMenuItems);
|
|
272
|
+
// SmartEdit
|
|
273
|
+
const smartEditMenuItems = this.getModuleSpecificStructure('SmartEdit', availableMenuItems);
|
|
274
|
+
// SystemStatus
|
|
275
|
+
const systemStatusMenuItems = this.getModuleSpecificStructure('SystemStatus', availableMenuItems);
|
|
276
|
+
/**
|
|
277
|
+
* Custom structures
|
|
278
|
+
*/
|
|
279
|
+
const gridMenuItem = {
|
|
280
|
+
name: 'grid-group',
|
|
281
|
+
label: 'Grid',
|
|
282
|
+
module: 'Group',
|
|
283
|
+
isVisible: true,
|
|
284
|
+
icon: {
|
|
285
|
+
name: 'grid',
|
|
286
|
+
},
|
|
287
|
+
subItems: [
|
|
288
|
+
...gridActionItems,
|
|
289
|
+
...otherLayoutItems,
|
|
290
|
+
...cellSummaryMenuItems,
|
|
291
|
+
...dataImportMenuItems,
|
|
292
|
+
...systemStatusMenuItems,
|
|
293
|
+
...gridInfoMenuItems,
|
|
294
|
+
],
|
|
295
|
+
};
|
|
296
|
+
const editMenuItem = {
|
|
297
|
+
name: 'edit-group',
|
|
298
|
+
label: 'Edit',
|
|
299
|
+
module: 'Group',
|
|
300
|
+
isVisible: true,
|
|
301
|
+
icon: {
|
|
302
|
+
name: 'edit-table',
|
|
303
|
+
},
|
|
304
|
+
subItems: [...bulkUpdateMenuItems, ...smartEditMenuItems],
|
|
305
|
+
};
|
|
306
|
+
return this.removeConsecutiveSeparators([
|
|
307
|
+
...exportMenuItems,
|
|
308
|
+
'-',
|
|
309
|
+
...calculatedColumnMenuItems,
|
|
310
|
+
...noteMenuItems,
|
|
311
|
+
...commentMenuItems,
|
|
312
|
+
...columnFilterMenuItems,
|
|
313
|
+
...flashingCellMenuItems,
|
|
314
|
+
...alertMenuItems,
|
|
315
|
+
...fdc3MenuItems,
|
|
316
|
+
'-',
|
|
317
|
+
...settingsPanelMenuItems,
|
|
318
|
+
...dashboardMenuItems,
|
|
319
|
+
'-',
|
|
320
|
+
...this.normalizeMenuGroup(editMenuItem),
|
|
321
|
+
'-',
|
|
322
|
+
...this.normalizeMenuGroup(gridMenuItem),
|
|
323
|
+
...columnInfoMenuItems
|
|
324
|
+
], '-');
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Hide menu group with no subitems or elevate single subitem to parent level
|
|
328
|
+
*/
|
|
329
|
+
normalizeMenuGroup(menuItem) {
|
|
330
|
+
var _a, _b;
|
|
331
|
+
if (!((_a = menuItem.subItems) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
332
|
+
return [];
|
|
333
|
+
}
|
|
334
|
+
if (((_b = menuItem.subItems) === null || _b === void 0 ? void 0 : _b.length) === 1) {
|
|
335
|
+
return [menuItem.subItems[0]];
|
|
336
|
+
}
|
|
337
|
+
return [menuItem];
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Default strategy for menu items: return as is if there is only one item, otherwise group them under a parent item
|
|
341
|
+
*/
|
|
342
|
+
getModuleSpecificStructure(module, menuItems, groupName) {
|
|
343
|
+
const moduleItems = menuItems.filter((menuItem) => menuItem.module === module);
|
|
344
|
+
if (moduleItems.length > 1) {
|
|
345
|
+
const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
|
|
346
|
+
return [this.buildMenuGroupParent(module, moduleItems, { groupName })];
|
|
347
|
+
}
|
|
348
|
+
else {
|
|
349
|
+
return moduleItems;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
getExportContextMenuStructure(menuItems) {
|
|
353
|
+
const exportMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Export');
|
|
354
|
+
if (!exportMenuItems.length) {
|
|
355
|
+
return [];
|
|
356
|
+
}
|
|
357
|
+
const visualReportItems = exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel'));
|
|
358
|
+
const visualDataExportItems = visualReportItems.length
|
|
359
|
+
? [
|
|
360
|
+
this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-visual-data-excel')), {
|
|
361
|
+
label: 'Visual Data',
|
|
362
|
+
icon: 'export-data',
|
|
363
|
+
}),
|
|
364
|
+
]
|
|
365
|
+
: [];
|
|
366
|
+
const allDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-all-data')), {
|
|
367
|
+
label: 'All Data',
|
|
368
|
+
icon: 'export-data',
|
|
369
|
+
}));
|
|
370
|
+
const currentDataExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-current-data')), {
|
|
371
|
+
label: 'Current Data',
|
|
372
|
+
icon: 'export-data',
|
|
373
|
+
}));
|
|
374
|
+
const selectedCellsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-cells')), {
|
|
375
|
+
label: 'Selected Cells',
|
|
376
|
+
icon: 'export-data',
|
|
377
|
+
}));
|
|
378
|
+
const selectedRowsExportItems = this.normalizeMenuGroup(this.buildMenuGroupParent('Export', exportMenuItems.filter((item) => item.name.startsWith('export-selected-rows')), {
|
|
379
|
+
label: 'Selected Rows',
|
|
380
|
+
icon: 'export-data',
|
|
381
|
+
}));
|
|
382
|
+
return this.normalizeMenuGroup(this.buildMenuGroupParent('Export', [
|
|
383
|
+
...visualDataExportItems,
|
|
384
|
+
...allDataExportItems,
|
|
385
|
+
...currentDataExportItems,
|
|
386
|
+
...selectedCellsExportItems,
|
|
387
|
+
...selectedRowsExportItems,
|
|
388
|
+
], {
|
|
389
|
+
label: 'Export',
|
|
390
|
+
icon: 'export',
|
|
391
|
+
groupName: 'export-group',
|
|
392
|
+
}));
|
|
393
|
+
}
|
|
394
|
+
getLayoutContextMenuStructure(menuItems) {
|
|
395
|
+
const layoutMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Layout');
|
|
396
|
+
if (!layoutMenuItems.length) {
|
|
397
|
+
return [[], []];
|
|
398
|
+
}
|
|
399
|
+
const gridActionsItemNames = [
|
|
400
|
+
'layout-clear-selection',
|
|
401
|
+
'layout-select-all',
|
|
402
|
+
'layout-auto-size',
|
|
403
|
+
];
|
|
404
|
+
const gridActionsItems = layoutMenuItems.filter((item) => gridActionsItemNames.includes(item.name));
|
|
405
|
+
const otherLayoutItems = layoutMenuItems.filter((item) => !gridActionsItemNames.includes(item.name));
|
|
406
|
+
return [gridActionsItems, otherLayoutItems];
|
|
407
|
+
}
|
|
408
|
+
buildMenuGroupParent(module, menuItems, config) {
|
|
409
|
+
var _a, _b, _c;
|
|
410
|
+
const moduleInfo = this.adaptableInstance.ModuleService.getModuleInfoByModule(module);
|
|
411
|
+
const icon = config && config.icon === false
|
|
412
|
+
? undefined
|
|
413
|
+
: { name: (_a = config === null || config === void 0 ? void 0 : config.icon) !== null && _a !== void 0 ? _a : moduleInfo.Glyph };
|
|
414
|
+
return {
|
|
415
|
+
name: (_b = config === null || config === void 0 ? void 0 : config.groupName) !== null && _b !== void 0 ? _b : 'menu-group',
|
|
416
|
+
label: (_c = config === null || config === void 0 ? void 0 : config.label) !== null && _c !== void 0 ? _c : moduleInfo.FriendlyName,
|
|
417
|
+
isVisible: true,
|
|
418
|
+
module: moduleInfo.ModuleName,
|
|
419
|
+
icon,
|
|
420
|
+
subItems: menuItems,
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
buildColumnMenuDefaultStructure(availableMenuItems, menuContext) {
|
|
424
|
+
// CalculatedColumn
|
|
425
|
+
const calculatedColumnMenuItems = this.getModuleSpecificStructure('CalculatedColumn', availableMenuItems);
|
|
426
|
+
// CellSummary
|
|
427
|
+
const cellSummaryMenuItems = this.getModuleSpecificStructure('CellSummary', availableMenuItems);
|
|
428
|
+
// ColumnFilter
|
|
429
|
+
const [columnFilterGroup, filterVisibilityItems] = this.getColumnFilterColumnMenuStructure(availableMenuItems);
|
|
430
|
+
// ColumnInfo
|
|
431
|
+
const columnInfoMenuItems = this.getModuleSpecificStructure('ColumnInfo', availableMenuItems);
|
|
432
|
+
// CustomSort
|
|
433
|
+
const customSortMenuItems = this.getModuleSpecificStructure('CustomSort', availableMenuItems);
|
|
434
|
+
// Dashboard
|
|
435
|
+
const dashboardMenuItems = this.getModuleSpecificStructure('Dashboard', availableMenuItems, 'dashboard-group');
|
|
436
|
+
// DataImport
|
|
437
|
+
const dataImportMenuItems = this.getModuleSpecificStructure('DataImport', availableMenuItems);
|
|
438
|
+
// FlashingCell
|
|
439
|
+
const flashingCellMenuItems = this.getModuleSpecificStructure('FlashingCell', availableMenuItems);
|
|
440
|
+
// FormatColumn
|
|
441
|
+
const formatColumnMenuItems = this.getModuleSpecificStructure('FormatColumn', availableMenuItems);
|
|
442
|
+
// FreeTextColumn
|
|
443
|
+
const freeTextColumnMenuItems = this.getModuleSpecificStructure('FreeTextColumn', availableMenuItems);
|
|
444
|
+
// GridInfo
|
|
445
|
+
const gridInfoMenuItems = this.getModuleSpecificStructure('GridInfo', availableMenuItems);
|
|
446
|
+
// Layout
|
|
447
|
+
const [gridSelectItems, columnSelectItems, columnActionGroup, otherLayoutItems] = this.getLayoutColumnMenuStructure(availableMenuItems);
|
|
448
|
+
// PlusMinus
|
|
449
|
+
const plusMinusMenuItems = this.getModuleSpecificStructure('PlusMinus', availableMenuItems);
|
|
450
|
+
// SettingsPanel
|
|
451
|
+
const settingsPanelMenuItems = this.getModuleSpecificStructure('SettingsPanel', availableMenuItems);
|
|
452
|
+
// StyledColumn
|
|
453
|
+
const styledColumnMenuItems = this.getStyledColumnColumnMenuStructure(availableMenuItems);
|
|
454
|
+
// SystemStatus
|
|
455
|
+
const systemStatusMenuItems = this.getModuleSpecificStructure('SystemStatus', availableMenuItems);
|
|
456
|
+
/**
|
|
457
|
+
* Custom structures
|
|
458
|
+
*/
|
|
459
|
+
const gridMenuItem = {
|
|
460
|
+
name: 'grid-group',
|
|
461
|
+
label: 'Grid',
|
|
462
|
+
module: 'Group',
|
|
463
|
+
isVisible: true,
|
|
464
|
+
icon: {
|
|
465
|
+
name: 'grid',
|
|
466
|
+
},
|
|
467
|
+
subItems: [
|
|
468
|
+
...otherLayoutItems,
|
|
469
|
+
...filterVisibilityItems,
|
|
470
|
+
...gridSelectItems,
|
|
471
|
+
...cellSummaryMenuItems,
|
|
472
|
+
...dataImportMenuItems,
|
|
473
|
+
...systemStatusMenuItems,
|
|
474
|
+
...gridInfoMenuItems,
|
|
475
|
+
],
|
|
476
|
+
};
|
|
477
|
+
const columnMenuItem = {
|
|
478
|
+
name: 'column-group',
|
|
479
|
+
label: 'Column',
|
|
480
|
+
module: 'Group',
|
|
481
|
+
isVisible: true,
|
|
482
|
+
icon: {
|
|
483
|
+
name: 'columns',
|
|
484
|
+
},
|
|
485
|
+
subItems: [
|
|
486
|
+
...columnActionGroup,
|
|
487
|
+
...calculatedColumnMenuItems,
|
|
488
|
+
...freeTextColumnMenuItems,
|
|
489
|
+
...customSortMenuItems,
|
|
490
|
+
...plusMinusMenuItems,
|
|
491
|
+
...columnSelectItems,
|
|
492
|
+
...columnInfoMenuItems,
|
|
493
|
+
],
|
|
494
|
+
};
|
|
495
|
+
const createStyleMenuItem = {
|
|
496
|
+
name: 'styling-group',
|
|
497
|
+
label: 'Styling',
|
|
498
|
+
module: 'Group',
|
|
499
|
+
isVisible: true,
|
|
500
|
+
icon: {
|
|
501
|
+
name: 'brush',
|
|
502
|
+
},
|
|
503
|
+
subItems: [...formatColumnMenuItems, ...styledColumnMenuItems, ...flashingCellMenuItems],
|
|
504
|
+
};
|
|
505
|
+
return this.removeConsecutiveSeparators([
|
|
506
|
+
...settingsPanelMenuItems,
|
|
507
|
+
...dashboardMenuItems,
|
|
508
|
+
...columnFilterGroup,
|
|
509
|
+
...this.normalizeMenuGroup(createStyleMenuItem),
|
|
510
|
+
...this.normalizeMenuGroup(gridMenuItem),
|
|
511
|
+
...this.normalizeMenuGroup(columnMenuItem),
|
|
512
|
+
], '-');
|
|
513
|
+
}
|
|
514
|
+
getColumnFilterColumnMenuStructure(menuItems) {
|
|
515
|
+
const columnFilterMenuItems = menuItems.filter((menuItem) => menuItem.module === 'ColumnFilter');
|
|
516
|
+
const filterVisibilityItems = columnFilterMenuItems.filter((item) => ['column-filter-bar-hide', 'column-filter-bar-show'].includes(item.name));
|
|
517
|
+
const filterActionItems = columnFilterMenuItems.filter((item) => ['column-filter-clear', 'column-filter-suspend', 'column-filter-unsuspend'].includes(item.name));
|
|
518
|
+
const columnFilterGroup = filterActionItems.length
|
|
519
|
+
? [
|
|
520
|
+
{
|
|
521
|
+
name: 'column-filter-group',
|
|
522
|
+
label: 'Filter',
|
|
523
|
+
module: 'ColumnFilter',
|
|
524
|
+
isVisible: true,
|
|
525
|
+
icon: {
|
|
526
|
+
name: 'filter',
|
|
527
|
+
},
|
|
528
|
+
subItems: filterActionItems,
|
|
529
|
+
},
|
|
530
|
+
]
|
|
531
|
+
: [];
|
|
532
|
+
return [columnFilterGroup, filterVisibilityItems];
|
|
533
|
+
}
|
|
534
|
+
getLayoutColumnMenuStructure(menuItems) {
|
|
535
|
+
const layoutMenuItems = menuItems.filter((menuItem) => menuItem.module === 'Layout');
|
|
536
|
+
if (!layoutMenuItems.length) {
|
|
537
|
+
return [[], [], [], []];
|
|
538
|
+
}
|
|
539
|
+
const columnSelectItemNames = [
|
|
540
|
+
'layout-column-select-preserve',
|
|
541
|
+
'layout-column-select-reset',
|
|
542
|
+
'layout-column-select',
|
|
543
|
+
];
|
|
544
|
+
const columnSelectItems = layoutMenuItems.filter((item) => columnSelectItemNames.includes(item.name));
|
|
545
|
+
const gridSelectItems = layoutMenuItems.filter((item) => item.name === 'layout-grid-select');
|
|
546
|
+
const columnActionGroup = layoutMenuItems.filter((item) => ['layout-column-caption-change', 'layout-column-hide'].includes(item.name));
|
|
547
|
+
const otherLayoutItems = layoutMenuItems.filter((item) => !columnSelectItemNames.includes(item.name) &&
|
|
548
|
+
!['layout-column-caption-change', 'layout-column-hide'].includes(item.name) &&
|
|
549
|
+
item.name !== 'layout-grid-select');
|
|
550
|
+
return [gridSelectItems, columnSelectItems, columnActionGroup, otherLayoutItems];
|
|
551
|
+
}
|
|
552
|
+
getStyledColumnColumnMenuStructure(menuItems) {
|
|
553
|
+
const styledColumnMenuItems = menuItems.filter((menuItem) => menuItem.module === 'StyledColumn');
|
|
554
|
+
return styledColumnMenuItems;
|
|
232
555
|
}
|
|
233
556
|
mapAdaptableMenuItemToSystemMenuItems(adaptableMenuItems) {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
557
|
+
if (!adaptableMenuItems) {
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
return adaptableMenuItems.map((menuItem) => {
|
|
561
|
+
if (menuItem === '-') {
|
|
562
|
+
return menuItem;
|
|
238
563
|
}
|
|
564
|
+
// @ts-ignore
|
|
565
|
+
const subItems = this.mapAdaptableMenuItemToSystemMenuItems(menuItem.subItems);
|
|
239
566
|
return Object.assign(Object.assign({}, menuItem), { menuType: 'Adaptable', subItems });
|
|
240
567
|
});
|
|
241
568
|
}
|
|
242
569
|
createAdaptableColumnMenuItems(menuContext) {
|
|
243
|
-
let
|
|
570
|
+
let columnMenuItems = [];
|
|
244
571
|
this.adaptableInstance.adaptableModules.forEach((s) => {
|
|
245
|
-
let menuItems = s.
|
|
572
|
+
let menuItems = s.createColumnMenuItems(menuContext.adaptableColumn);
|
|
246
573
|
if (menuItems) {
|
|
247
|
-
|
|
574
|
+
columnMenuItems.push(...menuItems.filter(Boolean).filter((item) => item.isVisible !== false));
|
|
248
575
|
}
|
|
249
576
|
});
|
|
250
|
-
return
|
|
577
|
+
return columnMenuItems;
|
|
251
578
|
}
|
|
252
579
|
// TODO AFL MIG: pretty sure this logic is duplicated in several other places
|
|
253
580
|
mapAdaptableIconToAgGridIcon(adaptableIcon, style) {
|
|
@@ -267,10 +594,14 @@ class AgGridMenuAdapter {
|
|
|
267
594
|
});
|
|
268
595
|
}
|
|
269
596
|
}
|
|
597
|
+
/**
|
|
598
|
+
* The output of this function is used to build the column header menu if the AG Grid Menu Module is NOT present
|
|
599
|
+
* This is controlled by the AdaptableAgGrid.embedColumnMenu property
|
|
600
|
+
*/
|
|
270
601
|
buildStandaloneColumnHeader(adaptableColumn) {
|
|
271
602
|
const agGridColumn = this.adaptableInstance.getAgGridColumnForColumnId(adaptableColumn.columnId);
|
|
272
603
|
const menuContext = this.createColumnMenuContextObject(adaptableColumn, agGridColumn);
|
|
273
|
-
return this.
|
|
604
|
+
return this.createAdaptableColumnMenuItems(menuContext);
|
|
274
605
|
}
|
|
275
606
|
}
|
|
276
607
|
exports.AgGridMenuAdapter = AgGridMenuAdapter;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
2
|
-
import { GridOptions } from '@ag-grid-community/core';
|
|
2
|
+
import { GridOptions, ManagedGridOptionKey } from '@ag-grid-community/core';
|
|
3
3
|
export declare class AgGridOptionsService {
|
|
4
4
|
private adaptableInstance;
|
|
5
5
|
private gridOptionsPropertyCache;
|
|
@@ -7,6 +7,9 @@ export declare class AgGridOptionsService {
|
|
|
7
7
|
constructor(adaptableInstance: AdaptableAgGrid);
|
|
8
8
|
destroy(): void;
|
|
9
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;
|
|
10
13
|
revertGridOptionsPropertiesToUserValue<T extends keyof GridOptions>(gridOptions: GridOptions, propertyNames: T[]): void;
|
|
11
14
|
private get agGridAdapter();
|
|
12
15
|
}
|
|
@@ -43,6 +43,28 @@ class AgGridOptionsService {
|
|
|
43
43
|
gridOptions[propertyName] = adaptableValue !== null && adaptableValue !== void 0 ? adaptableValue : userValue;
|
|
44
44
|
return gridOptions;
|
|
45
45
|
}
|
|
46
|
+
getUserGridOptionsProperty(propertyName) {
|
|
47
|
+
const userKey = `user.${propertyName}`;
|
|
48
|
+
return this.gridOptionsPropertyCache.get(userKey);
|
|
49
|
+
}
|
|
50
|
+
revertGridOptionsPropertyToUserValue(propertyName) {
|
|
51
|
+
const userKey = `user.${propertyName}`;
|
|
52
|
+
const userValue = this.gridOptionsPropertyCache.get(userKey);
|
|
53
|
+
this.agGridAdapter.setGridOption(propertyName, userValue);
|
|
54
|
+
}
|
|
55
|
+
CAREFUL_patchGridOptionsProperty(propertyName, value) {
|
|
56
|
+
var _a;
|
|
57
|
+
// @ts-ignore this is required to set gridOptions peroperties which are marked as initial (writable once, before grid is initialised)
|
|
58
|
+
const gos = (_a = this.agGridAdapter.getAgGridApi()) === null || _a === void 0 ? void 0 : _a.gos;
|
|
59
|
+
if (gos) {
|
|
60
|
+
gos.updateGridOptions({
|
|
61
|
+
options: {
|
|
62
|
+
[propertyName]: value,
|
|
63
|
+
},
|
|
64
|
+
source: 'api',
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
46
68
|
revertGridOptionsPropertiesToUserValue(gridOptions, propertyNames) {
|
|
47
69
|
for (const propertyName of propertyNames) {
|
|
48
70
|
// see this.setGridOptionsProperty(...)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BadgeStyle } from '../PredefinedConfig/StyledColumnState';
|
|
2
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
-
export declare const getBadgeRendererForColumn: (
|
|
4
|
+
export declare const getBadgeRendererForColumn: (badgeStyle: BadgeStyle, abColumn: AdaptableColumn, api: AdaptableApi) => any;
|