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