@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,119 +1,137 @@
|
|
|
1
|
-
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
1
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
2
|
import { ArrayExtensions } from '../Utilities/Extensions/ArrayExtensions';
|
|
4
3
|
import { Helper } from '../Utilities/Helpers/Helper';
|
|
4
|
+
import ObjectFactory from '../Utilities/ObjectFactory';
|
|
5
|
+
import { AggregatedScalarLiveValue } from '../Utilities/Services/AggregatedScalarLiveValue';
|
|
5
6
|
import { CellSummaryStatusPanel } from '../View/CellSummary/CellSummaryStatusPanel';
|
|
7
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
6
8
|
export class CellSummaryModule extends AdaptableModuleBase {
|
|
7
9
|
constructor(api) {
|
|
8
10
|
super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of cells using multiple summary operations', api);
|
|
11
|
+
this.cachedCellSummary = new WeakMap();
|
|
9
12
|
}
|
|
10
13
|
getViewAccessLevel() {
|
|
11
14
|
return 'Full';
|
|
12
15
|
}
|
|
13
|
-
|
|
16
|
+
createColumnMenuItems(column) {
|
|
14
17
|
if (!this.isModuleAvailable()) {
|
|
15
18
|
return;
|
|
16
19
|
}
|
|
17
20
|
return [
|
|
18
|
-
this.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
this.createMainMenuItemShowPopup({
|
|
22
|
+
Name: 'cell-summary-show',
|
|
23
|
+
Label: 'See Cell Summary',
|
|
24
|
+
ComponentName: this.moduleInfo.Popup,
|
|
25
|
+
Icon: this.moduleInfo.Glyph,
|
|
26
|
+
PopupParams: {
|
|
27
|
+
source: 'ColumnMenu',
|
|
28
|
+
column,
|
|
29
|
+
},
|
|
21
30
|
}),
|
|
22
31
|
];
|
|
23
32
|
}
|
|
24
|
-
|
|
33
|
+
createContextMenuItems(menuContext) {
|
|
25
34
|
if (!this.isModuleAvailable()) {
|
|
26
35
|
return;
|
|
27
36
|
}
|
|
28
37
|
if (menuContext.adaptableColumn && menuContext.isSelectedCell) {
|
|
29
38
|
return [
|
|
30
|
-
this.
|
|
31
|
-
|
|
39
|
+
this.createMainMenuItemShowPopup({
|
|
40
|
+
Name: 'cell-summary-show',
|
|
41
|
+
Label: 'See Cell Summary',
|
|
42
|
+
ComponentName: this.moduleInfo.Popup,
|
|
43
|
+
Icon: this.moduleInfo.Glyph,
|
|
44
|
+
PopupParams: {
|
|
45
|
+
source: 'ContextMenu',
|
|
46
|
+
},
|
|
32
47
|
}),
|
|
33
48
|
];
|
|
34
49
|
}
|
|
35
50
|
}
|
|
36
|
-
createCellSummaryMenuItem(popUpParams) {
|
|
37
|
-
return this.createMainMenuItemShowPopup({
|
|
38
|
-
Label: 'See Cell Summary',
|
|
39
|
-
ComponentName: this.moduleInfo.Popup,
|
|
40
|
-
Icon: this.moduleInfo.Glyph,
|
|
41
|
-
PopupParams: popUpParams,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
51
|
createCellSummary(selectedCellInfo) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
selectedCellInfo.columns
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (ArrayExtensions.ContainsItem(numericColumns, selectedCell.column.columnId)) {
|
|
63
|
-
let valueAsNumber = Number(value);
|
|
64
|
-
// possible that its not a number despite it being a numeric column
|
|
65
|
-
if (!isNaN(Number(valueAsNumber))) {
|
|
66
|
-
numericValues.push(valueAsNumber);
|
|
52
|
+
if (this.cachedCellSummary.has(selectedCellInfo)) {
|
|
53
|
+
return this.cachedCellSummary.get(selectedCellInfo);
|
|
54
|
+
}
|
|
55
|
+
let selectedCellSummary = ObjectFactory.CreateEmptyCellSummmary();
|
|
56
|
+
if (selectedCellInfo && ArrayExtensions.GetLength(selectedCellInfo.columns) === 1) {
|
|
57
|
+
const selectedColumn = selectedCellInfo.columns[0];
|
|
58
|
+
if (selectedColumn) {
|
|
59
|
+
const isNumericColumn = selectedColumn.dataType === 'Number';
|
|
60
|
+
const isDateColumn = selectedColumn.dataType === 'Date';
|
|
61
|
+
const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
|
|
62
|
+
const handleExpression = (functionName) => {
|
|
63
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
64
|
+
aggregatedScalarExpression: `${functionName}([${selectedColumn.columnId}])`,
|
|
65
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
66
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
67
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
68
|
+
value = Helper.roundNumber(value, 2);
|
|
67
69
|
}
|
|
70
|
+
return value;
|
|
71
|
+
};
|
|
72
|
+
const sumValue = isNumericColumn ? handleExpression('SUM') : null;
|
|
73
|
+
const avgValue = isNumericColumn ? Helper.roundNumber(handleExpression('AVG'), 2) : null;
|
|
74
|
+
const modeValue = isNumericColumn ? handleExpression('MODE') : null;
|
|
75
|
+
const medianValue = isNumericColumn ? handleExpression('MEDIAN') : null;
|
|
76
|
+
const distinctValue = handleExpression('DISTINCT');
|
|
77
|
+
const maxValue = isNumericColumn ? handleExpression('MAX') : null;
|
|
78
|
+
const minValue = isNumericColumn ? handleExpression('MIN') : null;
|
|
79
|
+
const oldestValue = isDateColumn ? handleExpression('OLDEST') : null;
|
|
80
|
+
const newestValue = isDateColumn ? handleExpression('NEWEST') : null;
|
|
81
|
+
const stdDeviation = isNumericColumn
|
|
82
|
+
? Helper.roundNumberTo4dp(handleExpression('STD_DEVIATION'))
|
|
83
|
+
: null;
|
|
84
|
+
selectedCellSummary = {
|
|
85
|
+
Sum: sumValue,
|
|
86
|
+
Average: avgValue,
|
|
87
|
+
Median: medianValue,
|
|
88
|
+
Mode: modeValue,
|
|
89
|
+
Distinct: distinctValue,
|
|
90
|
+
Max: maxValue,
|
|
91
|
+
Min: minValue,
|
|
92
|
+
Count: selectedCellInfo.gridCells.length,
|
|
93
|
+
Oldest: oldestValue,
|
|
94
|
+
Newest: newestValue,
|
|
95
|
+
Std_Deviation: stdDeviation,
|
|
96
|
+
Only: distinctValue == 1 ? JSON.stringify(selectedCellInfo.gridCells[0].rawValue) : '',
|
|
97
|
+
};
|
|
98
|
+
const weightedAverage = this.getWeightedAverageCellSummary(selectedColumn.columnId, rowNodes);
|
|
99
|
+
if (weightedAverage !== null) {
|
|
100
|
+
selectedCellSummary.Weighted_Average = weightedAverage;
|
|
68
101
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
? Helper.roundNumberTo4dp(Helper.meanNumberArray(numericValues))
|
|
80
|
-
: undefined,
|
|
81
|
-
Median: hasNumericColumns
|
|
82
|
-
? Helper.roundNumberTo4dp(Helper.medianNumberArray(numericValues))
|
|
83
|
-
: undefined,
|
|
84
|
-
Mode: hasNumericColumns
|
|
85
|
-
? Helper.roundNumberTo4dp(Helper.modeNumberArray(numericValues))
|
|
86
|
-
: undefined,
|
|
87
|
-
Distinct: distinctCount,
|
|
88
|
-
Max: hasNumericColumns ? Helper.roundNumberTo4dp(Math.max(...numericValues)) : undefined,
|
|
89
|
-
Min: hasNumericColumns ? Helper.roundNumberTo4dp(Math.min(...numericValues)) : undefined,
|
|
90
|
-
Count: allValues.length,
|
|
91
|
-
Std_Deviation: hasNumericColumns
|
|
92
|
-
? Helper.roundNumberTo4dp(Helper.standardDeviationNumberArray(numericValues))
|
|
93
|
-
: undefined,
|
|
94
|
-
Only: distinctCount == 1 ? JSON.stringify(allValues[0]) : '',
|
|
95
|
-
};
|
|
96
|
-
numericValues = [...newNumericValues];
|
|
97
|
-
const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
98
|
-
const api = this.api;
|
|
99
|
-
operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
|
|
100
|
-
if (operation.operationFunction) {
|
|
101
|
-
const cellSummaryOperationContext = {
|
|
102
|
-
selectedCellInfo,
|
|
103
|
-
distinctCount,
|
|
104
|
-
allValues,
|
|
105
|
-
numericValues,
|
|
106
|
-
numericColumns,
|
|
107
|
-
adaptableApi: this.api,
|
|
108
|
-
userName: this.api.optionsApi.getUserName(),
|
|
109
|
-
adaptableId: this.api.optionsApi.getAdaptableId(),
|
|
110
|
-
};
|
|
111
|
-
selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
|
|
112
|
-
}
|
|
113
|
-
});
|
|
102
|
+
const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
103
|
+
operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
|
|
104
|
+
if (operation.operationFunction) {
|
|
105
|
+
const cellSummaryOperationContext = Object.assign({ selectedCellInfo,
|
|
106
|
+
selectedColumn }, this.api.internalApi.buildBaseContext());
|
|
107
|
+
selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
this.cachedCellSummary.set(selectedCellInfo, selectedCellSummary);
|
|
111
|
+
}
|
|
114
112
|
}
|
|
115
113
|
return selectedCellSummary;
|
|
116
114
|
}
|
|
115
|
+
getWeightedAverageCellSummary(columnId, rowNodes) {
|
|
116
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
117
|
+
if (currentLayout.AggregationColumns == undefined) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
const weightedAverageConfig = Object.entries(currentLayout.AggregationColumns).find(([colId, aggCol]) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage' && colId === columnId);
|
|
121
|
+
if (!weightedAverageConfig) {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
const { weightedColumnId } = weightedAverageConfig[1];
|
|
125
|
+
const expression = `AVG([${columnId}], WEIGHT([${weightedColumnId}]))`;
|
|
126
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
127
|
+
aggregatedScalarExpression: expression,
|
|
128
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
129
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
130
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
131
|
+
value = Helper.roundNumber(value, 2);
|
|
132
|
+
}
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
117
135
|
getViewProperties() {
|
|
118
136
|
return {
|
|
119
137
|
getStatusBarPanelProps() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
3
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
|
+
import { AdaptableContextMenuItemName, AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
4
4
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
5
5
|
import { AdaptableModuleView, AdaptableObjectCompactView, AdaptableObjectView, IModule } from './Interface/IModule';
|
|
6
6
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
@@ -13,8 +13,8 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
|
|
|
13
13
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
15
|
onAdaptableReady(): void;
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
createColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar">[];
|
|
17
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem<AdaptableContextMenuItemName>[] | undefined;
|
|
18
18
|
private getExistingColumnFilter;
|
|
19
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
20
20
|
toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
2
|
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
3
|
-
import ArrayExtensions from '../Utilities/Extensions/ArrayExtensions';
|
|
4
3
|
import * as LayoutRedux from '../Redux/ActionsReducers/LayoutRedux';
|
|
5
4
|
import * as SystemRedux from '../Redux/ActionsReducers/SystemRedux';
|
|
6
5
|
import { FilterStatusBarSubPanelPopover } from '../View/Filter/FilterStatusBarSubPanelPopover';
|
|
@@ -39,7 +38,31 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
39
38
|
}
|
|
40
39
|
});
|
|
41
40
|
}
|
|
42
|
-
|
|
41
|
+
createColumnMenuItems(column) {
|
|
42
|
+
let columnFilterMenuItems = [];
|
|
43
|
+
if (column &&
|
|
44
|
+
column.filterable &&
|
|
45
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
46
|
+
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
47
|
+
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
48
|
+
if (this.isModuleEditable() &&
|
|
49
|
+
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
50
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(isFilterVisible ? 'column-filter-bar-hide' : 'column-filter-bar-show', isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'filter-off' : 'filter', isFilterVisible
|
|
51
|
+
? SystemRedux.SystemQuickFilterBarHide()
|
|
52
|
+
: SystemRedux.SystemQuickFilterBarShow()));
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
56
|
+
if (existingColumnFilter) {
|
|
57
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
58
|
+
columnFilterMenuItems.push(this.createMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'column-filter-unsuspend' : 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
59
|
+
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
60
|
+
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
61
|
+
}
|
|
62
|
+
return columnFilterMenuItems;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
createContextMenuItems(menuContext) {
|
|
43
66
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
44
67
|
if (menuContext.adaptableColumn &&
|
|
45
68
|
menuContext.adaptableColumn.filterable &&
|
|
@@ -57,70 +80,26 @@ export class ColumnFilterModule extends AdaptableModuleBase {
|
|
|
57
80
|
this.api.columnFilterApi.internalApi.createEqualityColumnFilterForCell(menuContext.selectedCellInfo.gridCells[0]);
|
|
58
81
|
};
|
|
59
82
|
return [
|
|
60
|
-
this.
|
|
83
|
+
this.createMenuItemClickFunction('column-filter-on-cell-value', isMultiple ? 'Filter on Cell Values' : 'Filter on Cell Value', this.moduleInfo.Glyph, clickFunction),
|
|
61
84
|
];
|
|
62
85
|
}
|
|
63
86
|
else {
|
|
64
|
-
let filterSubMenuItems = [];
|
|
65
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
66
|
-
filterSubMenuItems.push(this.createColumnMenuItemClickFunction(existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
67
|
-
? () => {
|
|
68
|
-
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
69
|
-
}
|
|
70
|
-
: () => {
|
|
71
|
-
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
72
|
-
}));
|
|
73
87
|
return [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
this.createMenuItemReduxAction('column-filter-clear', 'Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)),
|
|
89
|
+
this.createMenuItemClickFunction(existingColumnFilter.IsSuspended
|
|
90
|
+
? 'column-filter-unsuspend'
|
|
91
|
+
: 'column-filter-suspend', existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
92
|
+
? () => {
|
|
93
|
+
this.api.columnFilterApi.unSuspendColumnFilter(existingColumnFilter);
|
|
94
|
+
}
|
|
95
|
+
: () => {
|
|
96
|
+
this.api.columnFilterApi.suspendColumnFilter(existingColumnFilter);
|
|
97
|
+
}),
|
|
83
98
|
];
|
|
84
99
|
}
|
|
85
100
|
}
|
|
86
101
|
}
|
|
87
102
|
}
|
|
88
|
-
addColumnMenuItems(column) {
|
|
89
|
-
let filterSubMenuItems = [];
|
|
90
|
-
if (column &&
|
|
91
|
-
column.filterable &&
|
|
92
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
93
|
-
if (this.api.gridApi.isQuickFilterAvailable()) {
|
|
94
|
-
const isFilterVisible = this.api.columnFilterApi.isQuickFilterVisible();
|
|
95
|
-
if (this.isModuleEditable() &&
|
|
96
|
-
this.api.optionsApi.getColumnFilterOptions().useAdaptableColumnFiltering) {
|
|
97
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
98
|
-
? SystemRedux.SystemQuickFilterBarHide()
|
|
99
|
-
: SystemRedux.SystemQuickFilterBarShow()));
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
const existingColumnFilter = this.getExistingColumnFilter(column);
|
|
103
|
-
if (existingColumnFilter) {
|
|
104
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction('Clear Filter', 'close', LayoutRedux.LayoutColumnFilterClear(existingColumnFilter)));
|
|
105
|
-
filterSubMenuItems.push(this.createColumnMenuItemReduxAction(existingColumnFilter.IsSuspended ? 'Unsuspend Filter' : 'Suspend Filter', existingColumnFilter.IsSuspended ? 'resume' : 'pause', existingColumnFilter.IsSuspended
|
|
106
|
-
? LayoutRedux.LayoutColumnFilterUnSuspend(existingColumnFilter)
|
|
107
|
-
: LayoutRedux.LayoutColumnFilterSuspend(existingColumnFilter)));
|
|
108
|
-
}
|
|
109
|
-
if (ArrayExtensions.IsNotNullOrEmpty(filterSubMenuItems)) {
|
|
110
|
-
return [
|
|
111
|
-
{
|
|
112
|
-
label: this.moduleInfo.FriendlyName,
|
|
113
|
-
isVisible: true,
|
|
114
|
-
module: this.moduleInfo.ModuleName,
|
|
115
|
-
icon: {
|
|
116
|
-
name: this.moduleInfo.Glyph,
|
|
117
|
-
},
|
|
118
|
-
subItems: filterSubMenuItems,
|
|
119
|
-
},
|
|
120
|
-
];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
103
|
getExistingColumnFilter(column) {
|
|
125
104
|
return this.api.columnFilterApi.getColumnFilters().find((x) => x.ColumnId == column.columnId);
|
|
126
105
|
}
|
|
@@ -2,10 +2,10 @@ import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
|
2
2
|
import { IModule } from './Interface/IModule';
|
|
3
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
4
|
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
5
|
-
import { AdaptableColumn,
|
|
5
|
+
import { AdaptableColumn, ContextMenuContext } from '../types';
|
|
6
6
|
export declare class ColumnInfoModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
8
|
getViewAccessLevel(): AccessLevel;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-bar-hide" | "column-filter-bar-show" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "custom-sort-add" | "custom-sort-edit" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "flashing-cell-add" | "flashing-cell-delete" | "format-column-add" | "format-column-edit" | "free-text-column-edit" | "grid-group" | "grid-info-show" | "layout-column-caption-change" | "layout-column-hide" | "layout-edit" | "layout-column-select" | "layout-column-select-preserve" | "layout-column-select-reset" | "layout-grid-select" | "plus-minus-add" | "settings-panel-open" | "styling-group" | "styled-column-badge-add" | "styled-column-badge-edit" | "styled-column-gradient-add" | "styled-column-gradient-edit" | "styled-column-percent-bar-add" | "styled-column-percent-bar-edit" | "styled-column-sparkline-add" | "styled-column-sparkline-edit" | "system-status-show" | "_navbar">[];
|
|
10
|
+
createContextMenuItems(menuContext: ContextMenuContext): import("../Utilities/MenuItem").MenuItemShowPopup<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-visual-data" | "export-visual-data-excel" | "export-all-data-excel" | "export-all-data" | "export-all-data-csv" | "export-all-data-clipboard" | "export-all-data-json" | "export-all-data-table" | "export-current-data" | "export-current-data-excel" | "export-current-data-csv" | "export-current-data-clipboard" | "export-current-data-json" | "export-current-data-table" | "export-selected-cells" | "export-selected-cells-excel" | "export-selected-cells-csv" | "export-selected-cells-clipboard" | "export-selected-cells-json" | "export-selected-cells-table" | "export-selected-rows" | "export-selected-rows-excel" | "export-selected-rows-csv" | "export-selected-rows-clipboard" | "export-selected-rows-json" | "export-selected-rows-table" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
|
|
11
11
|
}
|
|
@@ -7,7 +7,7 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
7
7
|
getViewAccessLevel() {
|
|
8
8
|
return 'Full';
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
createColumnMenuItems(column) {
|
|
11
11
|
if (this.isModuleAvailable()) {
|
|
12
12
|
const columnPopUpParams = {
|
|
13
13
|
source: 'ColumnMenu',
|
|
@@ -15,15 +15,16 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
15
15
|
};
|
|
16
16
|
return [
|
|
17
17
|
this.createMainMenuItemShowPopup({
|
|
18
|
+
Name: 'column-info-show',
|
|
18
19
|
Label: 'Column Info',
|
|
19
20
|
ComponentName: this.moduleInfo.Popup,
|
|
20
|
-
Icon:
|
|
21
|
+
Icon: 'info',
|
|
21
22
|
PopupParams: columnPopUpParams,
|
|
22
23
|
}),
|
|
23
24
|
];
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
createContextMenuItems(menuContext) {
|
|
27
28
|
if (this.isModuleAvailable()) {
|
|
28
29
|
const columnPopUpParams = {
|
|
29
30
|
source: 'ColumnMenu',
|
|
@@ -31,9 +32,10 @@ export class ColumnInfoModule extends AdaptableModuleBase {
|
|
|
31
32
|
};
|
|
32
33
|
return [
|
|
33
34
|
this.createMainMenuItemShowPopup({
|
|
35
|
+
Name: 'column-info-show',
|
|
34
36
|
Label: 'Column Info',
|
|
35
37
|
ComponentName: this.moduleInfo.Popup,
|
|
36
|
-
Icon:
|
|
38
|
+
Icon: 'info',
|
|
37
39
|
PopupParams: columnPopUpParams,
|
|
38
40
|
}),
|
|
39
41
|
];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
2
|
+
import { ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
|
+
import { MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
4
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
5
|
+
import { IModule } from './Interface/IModule';
|
|
6
|
+
export declare class CommentModule extends AdaptableModuleBase implements IModule {
|
|
7
|
+
constructor(api: AdaptableApi);
|
|
8
|
+
onAdaptableReady(): void;
|
|
9
|
+
isModuleAvailable(): boolean;
|
|
10
|
+
private loadComments;
|
|
11
|
+
createContextMenuItems(menuContext: ContextMenuContext): MenuItemDoClickFunction<"calculated-column-edit" | "cell-summary-show" | "column-group" | "column-filter-group" | "column-filter-clear" | "column-filter-suspend" | "column-filter-unsuspend" | "column-info-show" | "dashboard-group" | "dashboard-collapse" | "dashboard-configure" | "dashboard-dock" | "dashboard-expand" | "dashboard-float" | "dashboard-hide" | "dashboard-show" | "data-import" | "grid-group" | "grid-info-show" | "layout-edit" | "settings-panel-open" | "system-status-show" | "menu-group" | "alert-clear" | "bulk-update-apply" | "column-filter-on-cell-value" | "comment-add" | "comment-remove" | "edit-group" | "export-group" | "export-visual-data" | "export-visual-data-excel" | "export-all-data-excel" | "export-all-data" | "export-all-data-csv" | "export-all-data-clipboard" | "export-all-data-json" | "export-all-data-table" | "export-current-data" | "export-current-data-excel" | "export-current-data-csv" | "export-current-data-clipboard" | "export-current-data-json" | "export-current-data-table" | "export-selected-cells" | "export-selected-cells-excel" | "export-selected-cells-csv" | "export-selected-cells-clipboard" | "export-selected-cells-json" | "export-selected-cells-table" | "export-selected-rows" | "export-selected-rows-excel" | "export-selected-rows-csv" | "export-selected-rows-clipboard" | "export-selected-rows-json" | "export-selected-rows-table" | "fdc3-broadcast" | "fdc3-raise-intent" | "flashing-cell-clear" | "flashing-row-clear" | "layout-aggregated-view" | "layout-auto-size" | "layout-clear-selection" | "layout-select-all" | "note-add" | "note-remove" | "smart-edit-apply">[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as ModuleConstants from '../Utilities/Constants/ModuleConstants';
|
|
2
|
+
import { createBaseContext } from '../Utilities/ObjectFactory';
|
|
3
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
4
|
+
export class CommentModule extends AdaptableModuleBase {
|
|
5
|
+
constructor(api) {
|
|
6
|
+
super(ModuleConstants.CommentModuleId, ModuleConstants.CommentFriendlyName, 'comments', 'CommentsPopup', 'comments', api);
|
|
7
|
+
}
|
|
8
|
+
onAdaptableReady() {
|
|
9
|
+
this.loadComments();
|
|
10
|
+
}
|
|
11
|
+
isModuleAvailable() {
|
|
12
|
+
const options = this.api.optionsApi.getCommentOptions();
|
|
13
|
+
if (!options || !options.persistCommentThreads || !options.loadCommentThreads) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
if (this.api.optionsApi.getAutogeneratePrimaryKey()) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
return super.isModuleAvailable();
|
|
20
|
+
}
|
|
21
|
+
async loadComments() {
|
|
22
|
+
var _a, _b;
|
|
23
|
+
const commentThreads = await ((_b = (_a = this.api.optionsApi
|
|
24
|
+
.getCommentOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, createBaseContext(this.api)));
|
|
25
|
+
this.api.commentApi.setGridComments(commentThreads);
|
|
26
|
+
}
|
|
27
|
+
createContextMenuItems(menuContext) {
|
|
28
|
+
var _a, _b, _c, _d, _e;
|
|
29
|
+
if (!this.isModuleAvailable()) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (!this.api.commentApi.internalApi.areCommentsSupported()) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const items = [];
|
|
36
|
+
const isCellCommentable = typeof ((_b = (_a = this.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getCommentOptions()) === null || _b === void 0 ? void 0 : _b.isCellCommentable) === 'function'
|
|
37
|
+
? (_d = (_c = this.api.optionsApi) === null || _c === void 0 ? void 0 : _c.getCommentOptions()) === null || _d === void 0 ? void 0 : _d.isCellCommentable(Object.assign({ gridCell: menuContext.gridCell }, createBaseContext(this.api)))
|
|
38
|
+
: true;
|
|
39
|
+
if (!isCellCommentable) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const cellAddress = {
|
|
43
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
44
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
45
|
+
};
|
|
46
|
+
const cellComments = (_e = this.api.commentApi.getCommentThread(cellAddress)) === null || _e === void 0 ? void 0 : _e.Comments;
|
|
47
|
+
if (cellComments) {
|
|
48
|
+
return [
|
|
49
|
+
this.createMenuItemClickFunction('comment-remove', 'Remove Comment', this.moduleInfo.Glyph, () => {
|
|
50
|
+
this.api.commentApi.deleteCommentThread(cellAddress);
|
|
51
|
+
}),
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
return [
|
|
56
|
+
this.createMenuItemClickFunction('comment-add', 'Add Comment', this.moduleInfo.Glyph, () => {
|
|
57
|
+
// add an empty one
|
|
58
|
+
this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
|
|
59
|
+
requestAnimationFrame(() => {
|
|
60
|
+
this.api.internalApi.getCellPopupService().showPopup({
|
|
61
|
+
PrimaryKeyValue: menuContext.primaryKeyValue,
|
|
62
|
+
ColumnId: menuContext.adaptableColumn.columnId,
|
|
63
|
+
}, true);
|
|
64
|
+
this.api.internalApi.getCellPopupService().editFocusedEntity('Comment');
|
|
65
|
+
});
|
|
66
|
+
}),
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -4,7 +4,6 @@ import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
|
4
4
|
import { CustomSort } from '../PredefinedConfig/CustomSortState';
|
|
5
5
|
import * as CustomSortRedux from '../Redux/ActionsReducers/CustomSortRedux';
|
|
6
6
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
7
|
-
import { AdaptableMenuItem } from '../PredefinedConfig/Common/Menu';
|
|
8
7
|
import { AdaptableObjectView, IModule } from './Interface/IModule';
|
|
9
8
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
10
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -15,7 +14,7 @@ export declare class CustomSortModule extends AdaptableModuleBase implements IMo
|
|
|
15
14
|
}): AdaptableObject[];
|
|
16
15
|
getExplicitlyReferencedColumnIds(customSort: CustomSort): string[];
|
|
17
16
|
hasNamedQueryReferences(): boolean;
|
|
18
|
-
|
|
17
|
+
createColumnMenuItems(column: AdaptableColumn): import("../Utilities/MenuItem").MenuItemShowPopup<"custom-sort-add" | "custom-sort-edit">[];
|
|
19
18
|
getTeamSharingAction(): TeamSharingImportInfo<CustomSort>;
|
|
20
19
|
toView(customSort: CustomSort): AdaptableObjectView;
|
|
21
20
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -18,7 +18,7 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
18
18
|
hasNamedQueryReferences() {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
createColumnMenuItems(column) {
|
|
22
22
|
if (column && this.isModuleEditable() && column.sortable) {
|
|
23
23
|
let customSort = this.api.customSortApi
|
|
24
24
|
.getCustomSorts()
|
|
@@ -34,8 +34,9 @@ export class CustomSortModule extends AdaptableModuleBase {
|
|
|
34
34
|
action: customSort ? 'Edit' : 'New',
|
|
35
35
|
source: 'ColumnMenu',
|
|
36
36
|
};
|
|
37
|
+
let name = customSort ? 'custom-sort-edit' : 'custom-sort-add';
|
|
37
38
|
return [
|
|
38
|
-
this.
|
|
39
|
+
this.createMenuItemShowPopup(name, label + 'Custom Sort', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
39
40
|
];
|
|
40
41
|
}
|
|
41
42
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
2
|
+
import { AdaptableColumnMenuItemName, AdaptableContextMenuItemName, AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
3
3
|
import { IModule } from './Interface/IModule';
|
|
4
4
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
5
5
|
export declare class DashboardModule extends AdaptableModuleBase implements IModule {
|
|
6
6
|
constructor(api: AdaptableApi);
|
|
7
7
|
onAdaptableReady(): void;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
createColumnMenuItems(): AdaptableMenuItem<AdaptableColumnMenuItemName>[] | undefined;
|
|
9
|
+
createContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem<AdaptableContextMenuItemName>[] | undefined;
|
|
10
10
|
private buildMenuItems;
|
|
11
11
|
}
|
|
@@ -17,47 +17,37 @@ export class DashboardModule extends AdaptableModuleBase {
|
|
|
17
17
|
this.api.dashboardApi.internalApi.fireDashboardChangedEvent('ADAPTABLE_READY', null, this.api.dashboardApi.getDashboardState());
|
|
18
18
|
}, 20);
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
createColumnMenuItems() {
|
|
21
21
|
return this.buildMenuItems();
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
createContextMenuItems(menuContext) {
|
|
24
24
|
return this.buildMenuItems();
|
|
25
25
|
}
|
|
26
26
|
buildMenuItems() {
|
|
27
27
|
if (this.isModuleAvailable()) {
|
|
28
28
|
let menuItems = [];
|
|
29
29
|
if (this.isModuleEditable()) {
|
|
30
|
-
menuItems.push(this.
|
|
30
|
+
menuItems.push(this.createMenuItemClickFunction('dashboard-configure', 'Configure', 'settings', () => this.api.dashboardApi.openDashboardSettingsPanel()));
|
|
31
31
|
}
|
|
32
32
|
if (this.api.dashboardApi.getDashboardState().IsCollapsed) {
|
|
33
|
-
menuItems.push(this.
|
|
33
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-expand', 'Expand', 'expand', DashboardRedux.DashboardSetIsCollapsed(false)));
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
menuItems.push(this.
|
|
36
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-collapse', 'Collapse', 'collapse', DashboardRedux.DashboardSetIsCollapsed(true)));
|
|
37
37
|
}
|
|
38
38
|
if (this.api.dashboardApi.getDashboardState().IsFloating) {
|
|
39
|
-
menuItems.push(this.
|
|
39
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-dock', 'Dock', 'dock', DashboardRedux.DashboardSetIsFloating(false)));
|
|
40
40
|
}
|
|
41
41
|
else if (this.api.optionsApi.getDashboardOptions().canFloat) {
|
|
42
|
-
menuItems.push(this.
|
|
42
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-float', 'Float', 'dock', DashboardRedux.DashboardSetIsFloating(true)));
|
|
43
43
|
}
|
|
44
44
|
if (this.api.dashboardApi.getDashboardState().IsHidden) {
|
|
45
|
-
menuItems.push(this.
|
|
45
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-show', 'Show', 'visibility-on-bold', DashboardRedux.DashboardSetIsHidden(false)));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
menuItems.push(this.
|
|
49
|
-
}
|
|
50
|
-
return
|
|
51
|
-
{
|
|
52
|
-
label: this.moduleInfo.FriendlyName,
|
|
53
|
-
isVisible: true,
|
|
54
|
-
module: this.moduleInfo.ModuleName,
|
|
55
|
-
icon: {
|
|
56
|
-
name: 'dashboard',
|
|
57
|
-
},
|
|
58
|
-
subItems: menuItems,
|
|
59
|
-
},
|
|
60
|
-
];
|
|
48
|
+
menuItems.push(this.createMenuItemReduxAction('dashboard-hide', 'Hide', 'visibility-off-bold', DashboardRedux.DashboardSetIsHidden(true)));
|
|
49
|
+
}
|
|
50
|
+
return menuItems;
|
|
61
51
|
}
|
|
62
52
|
}
|
|
63
53
|
}
|