@adaptabletools/adaptable 18.0.0-canary.2 → 18.0.0-canary.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +4 -21
- package/agGrid.js +9 -26
- package/base.css +22 -8
- package/base.css.map +1 -1
- package/index.css +101 -75
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +58 -108
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -7
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +33 -0
- package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
- package/src/AdaptableOptions/MenuOptions.d.ts +6 -54
- package/src/AdaptableOptions/MenuOptions.js +71 -74
- package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +7 -4
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
- package/src/Api/AdaptableApi.d.ts +9 -4
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/CommentApi.d.ts +11 -12
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/GridApi.d.ts +23 -13
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/ApiBase.d.ts +5 -3
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +10 -0
- package/src/Api/Implementation/CommentsApiImpl.d.ts +5 -2
- package/src/Api/Implementation/CommentsApiImpl.js +7 -1
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +21 -13
- package/src/Api/Implementation/GridApiImpl.d.ts +6 -3
- package/src/Api/Implementation/GridApiImpl.js +49 -14
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +18 -0
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +40 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/OptionsApiImpl.js +4 -4
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +20 -7
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
- package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
- package/src/Api/Internal/ActionRowInternalApi.js +106 -0
- package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -7
- package/src/Api/Internal/AdaptableInternalApi.js +21 -19
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +71 -0
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +23 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
- package/src/Api/Internal/ColumnInternalApi.js +12 -0
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +14 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +32 -1
- package/src/Api/Internal/DataSetInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +4 -1
- package/src/Api/Internal/Fdc3InternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +60 -0
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +7 -1
- package/src/Api/Internal/GridInternalApi.d.ts +23 -3
- package/src/Api/Internal/GridInternalApi.js +141 -7
- package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
- package/src/Api/Internal/LayoutInternalApi.js +16 -0
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/NoteInternalApi.js +14 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +15 -0
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/OptionsApi.d.ts +8 -8
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/UserInterfaceApi.d.ts +0 -11
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +4 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
- package/src/PredefinedConfig/CommentState.d.ts +27 -23
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +97 -1
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +17 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +25 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
- package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
- package/src/PredefinedConfig/SystemState.d.ts +9 -3
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +32 -10
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +29 -28
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -4
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +67 -77
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
- package/src/Strategy/AdaptableModuleBase.js +13 -15
- package/src/Strategy/AlertModule.d.ts +1 -2
- package/src/Strategy/AlertModule.js +3 -56
- package/src/Strategy/BulkUpdateModule.js +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
- package/src/Strategy/CalculatedColumnModule.js +6 -26
- package/src/Strategy/CellSummaryModule.d.ts +8 -6
- package/src/Strategy/CellSummaryModule.js +78 -23
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +2 -3
- package/src/Strategy/ColumnFilterModule.js +44 -103
- package/src/Strategy/ColumnInfoModule.js +2 -0
- package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +2 -5
- package/src/Strategy/{CommentsModule.js → CommentModule.js} +17 -23
- package/src/Strategy/CustomSortModule.js +3 -2
- package/src/Strategy/DashboardModule.d.ts +1 -2
- package/src/Strategy/DashboardModule.js +9 -15
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataImportModule.d.ts +1 -1
- package/src/Strategy/DataImportModule.js +5 -5
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -0
- package/src/Strategy/ExportModule.js +17 -2
- package/src/Strategy/Fdc3Module.js +3 -0
- package/src/Strategy/FlashingCellModule.d.ts +1 -2
- package/src/Strategy/FlashingCellModule.js +6 -19
- package/src/Strategy/FormatColumnModule.d.ts +0 -2
- package/src/Strategy/FormatColumnModule.js +6 -51
- package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
- package/src/Strategy/FreeTextColumnModule.js +1 -31
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/GridInfoModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.d.ts +9 -3
- package/src/Strategy/LayoutModule.js +143 -63
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
- package/src/Strategy/NoteModule.js +57 -0
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +3 -3
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.js +1 -1
- package/src/Strategy/StyledColumnModule.d.ts +1 -1
- package/src/Strategy/StyledColumnModule.js +26 -26
- package/src/Strategy/SystemStatusModule.js +2 -2
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- 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 +7 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +429 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +4 -0
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +4 -24
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
- package/src/Utilities/Services/CellPopupService.js +2 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
- package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -181
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/ModuleService.js +4 -0
- 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 +238 -22
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +14 -0
- package/src/Utilities/license/decode.js +1 -65
- package/src/Utilities/license/hashing.js +1 -43
- package/src/View/AdaptableView.js +1 -3
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsEditor.js +24 -11
- package/src/View/Comments/CommentsPopup.js +20 -11
- 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 +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
- package/src/View/Components/ValueSelector/index.d.ts +1 -0
- package/src/View/Components/ValueSelector/index.js +2 -2
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
- package/src/View/Layout/LayoutViewPanel.js +2 -1
- package/src/View/Layout/TransposedPopup.d.ts +3 -0
- package/src/View/Layout/TransposedPopup.js +195 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +36 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +174 -0
- package/src/View/License/LicenseWatermark.js +1 -61
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +17 -17
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/Theme/ThemeSelector.js +3 -3
- package/src/agGrid/ActionColumnRenderer.js +7 -6
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +8 -5292
- package/src/agGrid/AdaptableAgGrid.d.ts +352 -0
- package/src/agGrid/AdaptableAgGrid.js +3963 -0
- package/src/agGrid/AdaptableLogger.js +77 -11
- package/src/agGrid/AgGridAdapter.d.ts +64 -0
- package/src/agGrid/AgGridAdapter.js +585 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
- package/src/agGrid/AgGridColumnAdapter.js +831 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
- package/src/agGrid/AgGridMenuAdapter.js +277 -0
- package/src/agGrid/AgGridOptionsService.d.ts +15 -0
- package/src/agGrid/AgGridOptionsService.js +76 -0
- package/src/agGrid/BadgeRenderer.js +1 -1
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +71 -17
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +0 -54
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Datepicker/index.js +10 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
- package/src/components/InfiniteTable/index.js +2 -2
- package/src/components/Input/index.d.ts +1 -2
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Modal/index.d.ts +1 -0
- package/src/components/Modal/index.js +4 -3
- package/src/components/Select/Select.d.ts +3 -1
- package/src/components/Select/Select.js +4 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/index.js +2 -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/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +186 -32
- package/src/metamodel/adaptable.metamodel.js +1 -9313
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +48 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +11 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +342 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +6 -0
- package/src/parser/src/parser.js +117 -1257
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
- package/src/parser/src/types.d.ts +7 -2
- package/src/types.d.ts +26 -19
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
- package/src/Api/Implementation/NotesApiImpl.js +0 -39
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -4
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
- package/src/Strategy/NotesModule.js +0 -57
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
- package/src/View/Components/ScopeComponent.d.ts +0 -24
- package/src/View/Components/ScopeComponent.js +0 -133
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -686
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -668
- /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
- /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
- /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
- /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
- /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -2,10 +2,16 @@ import * as Redux from 'redux';
|
|
|
2
2
|
import { AdaptableState } from '../../../PredefinedConfig/AdaptableState';
|
|
3
3
|
import { PredefinedConfig } from '../../../types';
|
|
4
4
|
import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
5
|
+
export interface LoadStoreConfig {
|
|
6
|
+
adaptable: IAdaptable;
|
|
7
|
+
adaptableStateKey: string;
|
|
8
|
+
predefinedConfig?: PredefinedConfig;
|
|
9
|
+
postLoadHook?: (state: AdaptableState) => AdaptableState;
|
|
10
|
+
}
|
|
5
11
|
export interface IAdaptableStore {
|
|
6
12
|
TheStore: Redux.Store<AdaptableState>;
|
|
7
|
-
Load:
|
|
8
|
-
loadStore: (
|
|
13
|
+
Load: Promise<any>;
|
|
14
|
+
loadStore: (config: LoadStoreConfig) => Promise<any>;
|
|
9
15
|
getCurrentStorageState: () => AdaptableState | void;
|
|
10
16
|
saveStateNow: (adaptable: IAdaptable) => Promise<any>;
|
|
11
17
|
on: (eventName: string, callback: (data?: any) => any) => () => void;
|
|
@@ -3,7 +3,7 @@ import { Action } from 'redux';
|
|
|
3
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
4
|
import { ModuleParams } from '../View/Components/SharedProps/ModuleViewPopupProps';
|
|
5
5
|
import { MenuItemShowPopup, MenuItemDoReduxAction, MenuItemDoClickFunction } from '../Utilities/MenuItem';
|
|
6
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
|
+
import { AdaptableMenuItem, AdaptableContextMenuItemName, ContextMenuContext, AdaptableColumnMenuItemName } from '../PredefinedConfig/Common/Menu';
|
|
7
7
|
import { AdaptableModule } from '../PredefinedConfig/Common/Types';
|
|
8
8
|
import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
|
|
9
9
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
@@ -29,27 +29,27 @@ export declare abstract class AdaptableModuleBase implements IModule {
|
|
|
29
29
|
*/
|
|
30
30
|
isModuleObjectsShareable(): boolean;
|
|
31
31
|
isModuleEditable(): boolean;
|
|
32
|
-
updateOldConfig(): void;
|
|
33
32
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
34
33
|
getExplicitlyReferencedColumnIds(adaptableObject: AdaptableObject): string[];
|
|
35
34
|
getReferencedNamedQueryNames(adaptableObject: AdaptableObject): string[];
|
|
36
35
|
hasNamedQueryReferences(): boolean;
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
onAdaptableReady(): void;
|
|
37
|
+
onAdaptableStateReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
|
|
39
38
|
setModuleEntitlement(): void;
|
|
40
39
|
addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
|
|
41
40
|
addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
|
|
42
41
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
43
42
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
44
|
-
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }: {
|
|
43
|
+
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }: {
|
|
44
|
+
Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName;
|
|
45
45
|
Label: string;
|
|
46
46
|
ComponentName: string;
|
|
47
47
|
Icon: AdaptableSystemIconName;
|
|
48
48
|
PopupParams?: ModuleParams;
|
|
49
49
|
}): MenuItemShowPopup;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
createMenuItemClickFunction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, ClickFunction: () => void): MenuItemDoClickFunction;
|
|
51
|
+
createMenuItemReduxAction(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, Icon: AdaptableSystemIconName, Action: Action): MenuItemDoReduxAction;
|
|
52
|
+
createMenuItemShowPopup(Name: AdaptableColumnMenuItemName | AdaptableContextMenuItemName, Label: string, ComponentName: string, Icon: AdaptableSystemIconName, PopupParams?: ModuleParams): MenuItemShowPopup;
|
|
53
53
|
getTeamSharingAction(): TeamSharingImportInfo<AdaptableObject> | undefined;
|
|
54
54
|
getModuleNamedQueryReferences(): string[];
|
|
55
55
|
getModuleCalculatedColumnReferences(): CalculatedColumn[];
|
|
@@ -16,11 +16,11 @@ export class AdaptableModuleBase {
|
|
|
16
16
|
};
|
|
17
17
|
this.api = api;
|
|
18
18
|
this.api.eventApi.on('AdaptableReady', () => {
|
|
19
|
-
this.
|
|
19
|
+
this.onAdaptableReady();
|
|
20
20
|
this.api.configApi.dispatchStateReadyAction(this.moduleInfo.ModuleName);
|
|
21
21
|
});
|
|
22
22
|
this.api.eventApi.on('AdaptableStateReloaded', (adaptableStateReloadedInfo) => {
|
|
23
|
-
this.
|
|
23
|
+
this.onAdaptableStateReloaded(adaptableStateReloadedInfo);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
getViewAccessLevel() {
|
|
@@ -43,9 +43,6 @@ export class AdaptableModuleBase {
|
|
|
43
43
|
isModuleEditable() {
|
|
44
44
|
return this.hasRequiredAccessLevel(this.getEditAccessLevel());
|
|
45
45
|
}
|
|
46
|
-
updateOldConfig() {
|
|
47
|
-
// override where deprecated configs have to be migrated
|
|
48
|
-
}
|
|
49
46
|
getModuleAdaptableObjects() {
|
|
50
47
|
// override where necessary in base classes
|
|
51
48
|
return [];
|
|
@@ -63,10 +60,10 @@ export class AdaptableModuleBase {
|
|
|
63
60
|
// this will skip the unnecessary evaluation of modules which do not have Named Query references
|
|
64
61
|
return true;
|
|
65
62
|
}
|
|
66
|
-
|
|
63
|
+
onAdaptableReady() {
|
|
67
64
|
// override where necessary in base classes
|
|
68
65
|
}
|
|
69
|
-
|
|
66
|
+
onAdaptableStateReloaded(adaptableStateReloadedInfo) {
|
|
70
67
|
// override where necessary in base classes
|
|
71
68
|
}
|
|
72
69
|
setModuleEntitlement() {
|
|
@@ -81,6 +78,7 @@ export class AdaptableModuleBase {
|
|
|
81
78
|
maxWidth: this.getPopupMaxWidth(),
|
|
82
79
|
};
|
|
83
80
|
return this.createMainMenuItemShowPopup({
|
|
81
|
+
Name: 'internal',
|
|
84
82
|
Label: this.moduleInfo.FriendlyName,
|
|
85
83
|
ComponentName: this.moduleInfo.Popup,
|
|
86
84
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -101,20 +99,20 @@ export class AdaptableModuleBase {
|
|
|
101
99
|
return undefined;
|
|
102
100
|
}
|
|
103
101
|
// creates the menu items in the main dropdown
|
|
104
|
-
createMainMenuItemShowPopup({ Label, ComponentName, Icon, PopupParams, }) {
|
|
105
|
-
return new MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
102
|
+
createMainMenuItemShowPopup({ Name, Label, ComponentName, Icon, PopupParams, }) {
|
|
103
|
+
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
106
104
|
}
|
|
107
105
|
// creates a menu item for the column menu to perform a function
|
|
108
|
-
|
|
109
|
-
return new MenuItemDoClickFunction(Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
106
|
+
createMenuItemClickFunction(Name, Label, Icon, ClickFunction) {
|
|
107
|
+
return new MenuItemDoClickFunction(Name, Label, this.moduleInfo.ModuleName, ClickFunction, Icon, true);
|
|
110
108
|
}
|
|
111
109
|
// creates a menu item for the column menu to enact a Redux action
|
|
112
|
-
|
|
113
|
-
return new MenuItemDoReduxAction(Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
110
|
+
createMenuItemReduxAction(Name, Label, Icon, Action) {
|
|
111
|
+
return new MenuItemDoReduxAction(Name, Label, this.moduleInfo.ModuleName, Action, Icon, true);
|
|
114
112
|
}
|
|
115
113
|
// popups called by the column menu - invisible if module is hidden or readonly
|
|
116
|
-
|
|
117
|
-
return new MenuItemShowPopup(Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
114
|
+
createMenuItemShowPopup(Name, Label, ComponentName, Icon, PopupParams) {
|
|
115
|
+
return new MenuItemShowPopup(Name, Label, this.moduleInfo.ModuleName, ComponentName, Icon, true, PopupParams);
|
|
118
116
|
}
|
|
119
117
|
getTeamSharingAction() {
|
|
120
118
|
return undefined;
|
|
@@ -8,13 +8,12 @@ import { AdaptableModuleView, AdaptableObjectCompactView, AdaptableObjectView, I
|
|
|
8
8
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
9
9
|
export declare class AlertModule extends AdaptableModuleBase implements IModule {
|
|
10
10
|
constructor(api: AdaptableApi);
|
|
11
|
+
onAdaptableReady(): void;
|
|
11
12
|
getModuleAdaptableObjects(config?: {
|
|
12
13
|
includeLayoutNotAssociatedObjects?: boolean;
|
|
13
14
|
}): AdaptableObject[];
|
|
14
15
|
getExplicitlyReferencedColumnIds(alertDefinition: AlertDefinition): string[];
|
|
15
16
|
getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
|
|
16
|
-
updateOldConfig(): void;
|
|
17
|
-
private updateAlertSingleToMultiplePredicates;
|
|
18
17
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
19
18
|
private handleCellDataChanged;
|
|
20
19
|
private handleGridDataChanged;
|
|
@@ -13,12 +13,12 @@ import { AlertEmptyView } from '../View/Alert/AlertEmptyView';
|
|
|
13
13
|
import { AlertStatusPanel } from '../View/Alert/AlertStatusSubPanel';
|
|
14
14
|
import { ActiveAlertsPanelItemLabel } from '../View/Alert/ActiveAlertsPanelItemLabel';
|
|
15
15
|
import { getObjectTagsViewItems } from './Utilities/getObjectTagsViewItems';
|
|
16
|
-
import { updateSingleToMultiplePredicates } from './Utilities/updateSingleToMultiplePredicates';
|
|
17
|
-
import { cloneObject } from '../Utilities/Helpers/Helper';
|
|
18
16
|
import { getAlertType } from '../View/Alert/Utilities/getAlertType';
|
|
19
17
|
export class AlertModule extends AdaptableModuleBase {
|
|
20
18
|
constructor(api) {
|
|
21
19
|
super(ModuleConstants.AlertModuleId, ModuleConstants.AlertModuleFriendlyName, 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
|
|
20
|
+
}
|
|
21
|
+
onAdaptableReady() {
|
|
22
22
|
this.api.internalApi
|
|
23
23
|
.getDataService()
|
|
24
24
|
.on('CellDataChanged', (cellDataChangedInfo) => {
|
|
@@ -71,59 +71,6 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
71
71
|
}
|
|
72
72
|
return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
|
|
73
73
|
}
|
|
74
|
-
updateOldConfig() {
|
|
75
|
-
var _a;
|
|
76
|
-
this.updateAlertSingleToMultiplePredicates();
|
|
77
|
-
// 1. Make all (new) Flashing Cells have a Predicate if none exists
|
|
78
|
-
const alertState = this.api.alertApi.getAlertState();
|
|
79
|
-
const flashingAlertDefinitions = alertState.FlashingAlertDefinitions;
|
|
80
|
-
const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
|
|
81
|
-
if (ArrayExtensions.IsEmpty(flashingCellDefinitions) &&
|
|
82
|
-
ArrayExtensions.IsNotNullOrEmpty(flashingAlertDefinitions)) {
|
|
83
|
-
this.api.flashingCellApi.setFlashingCellDefinitions(flashingAlertDefinitions);
|
|
84
|
-
// TODO: state does not clear
|
|
85
|
-
this.api.flashingCellApi.internalApi.clearFlashingCellState();
|
|
86
|
-
}
|
|
87
|
-
(_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
|
|
88
|
-
// if ShowPopup then change to DisplayNotificate
|
|
89
|
-
if (alertDefinition.AlertProperties &&
|
|
90
|
-
alertDefinition.AlertProperties.ShowPopup &&
|
|
91
|
-
alertDefinition.AlertProperties.ShowPopup == true &&
|
|
92
|
-
!alertDefinition.AlertProperties.DisplayNotification) {
|
|
93
|
-
alertDefinition.AlertProperties.DisplayNotification = true;
|
|
94
|
-
alertDefinition.AlertProperties.ShowPopup = undefined;
|
|
95
|
-
}
|
|
96
|
-
// if no rule but a predicate then use that
|
|
97
|
-
if (!alertDefinition.Rule) {
|
|
98
|
-
if (alertDefinition.Predicate && alertDefinition.Predicate != undefined) {
|
|
99
|
-
const predicate = alertDefinition.Predicate;
|
|
100
|
-
alertDefinition.Rule = {
|
|
101
|
-
Predicate: predicate,
|
|
102
|
-
};
|
|
103
|
-
alertDefinition.Predicate = undefined;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
//migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
|
|
108
|
-
const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
|
|
109
|
-
if (obsoleteAggregationExpression) {
|
|
110
|
-
alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
updateAlertSingleToMultiplePredicates() {
|
|
116
|
-
const alertDefinitions = this.api.alertApi.getAlertDefinitions({
|
|
117
|
-
includeLayoutNotAssociatedObjects: true,
|
|
118
|
-
});
|
|
119
|
-
alertDefinitions.forEach((alertDefinition) => {
|
|
120
|
-
if (alertDefinition.Rule && 'Predicate' in alertDefinition.Rule) {
|
|
121
|
-
const preparedAlertDefinition = cloneObject(alertDefinition);
|
|
122
|
-
updateSingleToMultiplePredicates(preparedAlertDefinition.Rule);
|
|
123
|
-
this.api.alertApi.editAlertDefinition(preparedAlertDefinition);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
74
|
addContextMenuItems(menuContext) {
|
|
128
75
|
const items = [];
|
|
129
76
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
@@ -136,7 +83,7 @@ export class AlertModule extends AdaptableModuleBase {
|
|
|
136
83
|
relevantAlert = this.api.alertApi.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
137
84
|
}
|
|
138
85
|
if (relevantAlert) {
|
|
139
|
-
items.push(this.
|
|
86
|
+
items.push(this.createMenuItemReduxAction('alert-clear', 'Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
140
87
|
}
|
|
141
88
|
}
|
|
142
89
|
}
|
|
@@ -22,7 +22,7 @@ export class BulkUpdateModule extends AdaptableModuleBase {
|
|
|
22
22
|
let popUpParams = {
|
|
23
23
|
source: 'ContextMenu',
|
|
24
24
|
};
|
|
25
|
-
menuItemShowPopup = this.createMainMenuItemShowPopup({
|
|
25
|
+
menuItemShowPopup = this.createMainMenuItemShowPopup({ Name: 'bulk-update-apply',
|
|
26
26
|
Label: 'Apply Bulk Update',
|
|
27
27
|
ComponentName: this.moduleInfo.Popup,
|
|
28
28
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -8,12 +8,11 @@ import { CalculatedColumn } from '../PredefinedConfig/CalculatedColumnState';
|
|
|
8
8
|
import { AdaptableObjectItemView, IModule } from './Interface/IModule';
|
|
9
9
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
10
10
|
import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
|
|
11
|
-
import { AdaptableStateReloadedInfo } from '../Api/Events/AdaptableStateReloaded';
|
|
12
11
|
export declare class CalculatedColumnModule extends AdaptableModuleBase implements IModule {
|
|
13
12
|
constructor(api: AdaptableApi);
|
|
14
|
-
|
|
13
|
+
onAdaptableReady(): void;
|
|
14
|
+
onAdaptableStateReloaded(): void;
|
|
15
15
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
16
|
-
updateOldConfig(): void;
|
|
17
16
|
getExplicitlyReferencedColumnIds(calculatedColumn: CalculatedColumn): string[];
|
|
18
17
|
getReferencedNamedQueryNames(calculatedColumn: CalculatedColumn): string[];
|
|
19
18
|
private isCalculatedColumn;
|
|
@@ -11,35 +11,15 @@ export class CalculatedColumnModule extends AdaptableModuleBase {
|
|
|
11
11
|
constructor(api) {
|
|
12
12
|
super(ModuleConstants.CalculatedColumnModuleId, ModuleConstants.CalculatedColumnFriendlyName, 'chart-and-grid', 'CalculatedColumnPopup', 'Create bespoke columns whose cell value is derived dynamically from an Expression', api);
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
onAdaptableReady() {
|
|
15
|
+
this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
|
|
16
|
+
}
|
|
17
|
+
onAdaptableStateReloaded() {
|
|
18
|
+
this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
|
|
17
19
|
}
|
|
18
20
|
getModuleAdaptableObjects() {
|
|
19
21
|
return this.api.calculatedColumnApi.getCalculatedColumns();
|
|
20
22
|
}
|
|
21
|
-
updateOldConfig() {
|
|
22
|
-
const calcColumns = this.api.calculatedColumnApi.getCalculatedColumns();
|
|
23
|
-
let oldCalculatedColumns = [];
|
|
24
|
-
calcColumns.forEach((cc) => {
|
|
25
|
-
if (cc.ColumnExpression && !cc.Query) {
|
|
26
|
-
cc.Query = {
|
|
27
|
-
ScalarExpression: cc.ColumnExpression,
|
|
28
|
-
};
|
|
29
|
-
cc.ColumnExpression = undefined;
|
|
30
|
-
oldCalculatedColumns.push(cc);
|
|
31
|
-
this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
|
|
32
|
-
}
|
|
33
|
-
if (!cc.CalculatedColumnSettings) {
|
|
34
|
-
cc.CalculatedColumnSettings = {
|
|
35
|
-
DataType: 'Number',
|
|
36
|
-
};
|
|
37
|
-
oldCalculatedColumns.push(cc);
|
|
38
|
-
this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
oldCalculatedColumns.forEach((oldCalcCol) => this.api.calculatedColumnApi.editCalculatedColumn(oldCalcCol));
|
|
42
|
-
}
|
|
43
23
|
getExplicitlyReferencedColumnIds(calculatedColumn) {
|
|
44
24
|
var _a;
|
|
45
25
|
return ((_a = this.api.expressionApi.getColumnsFromExpression(this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query))) !== null && _a !== void 0 ? _a : []);
|
|
@@ -77,7 +57,7 @@ export class CalculatedColumnModule extends AdaptableModuleBase {
|
|
|
77
57
|
source: 'ColumnMenu',
|
|
78
58
|
};
|
|
79
59
|
return [
|
|
80
|
-
this.
|
|
60
|
+
this.createMenuItemShowPopup('calculated-column-edit', 'Edit Calculated Column', this.moduleInfo.Popup, this.moduleInfo.Glyph, popupParam),
|
|
81
61
|
];
|
|
82
62
|
}
|
|
83
63
|
getTeamSharingAction() {
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
3
|
-
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
4
|
-
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
5
|
-
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
6
2
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
7
|
-
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
8
|
-
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
9
3
|
import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
|
|
4
|
+
import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
|
|
5
|
+
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
6
|
+
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
7
|
+
import { SelectedCellInfo } from '../PredefinedConfig/Selection/SelectedCellInfo';
|
|
8
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
9
|
+
import { ICellSummaryModule } from './Interface/ICellSummaryModule';
|
|
10
10
|
export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
|
|
11
|
+
cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
|
|
11
12
|
constructor(api: AdaptableApi);
|
|
12
13
|
getViewAccessLevel(): AccessLevel;
|
|
13
14
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
14
15
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
15
16
|
private createCellSummaryMenuItem;
|
|
16
17
|
createCellSummary(selectedCellInfo: SelectedCellInfo): CellSummmary;
|
|
18
|
+
private getWeightedAverageCellSummary;
|
|
17
19
|
getViewProperties(): {
|
|
18
20
|
getStatusBarPanelProps(): {
|
|
19
21
|
view: () => JSX.Element;
|
|
@@ -1,11 +1,13 @@
|
|
|
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 { AggregatedScalarLiveValue } from '../Utilities/Services/AggregatedScalarLiveValue';
|
|
5
5
|
import { CellSummaryStatusPanel } from '../View/CellSummary/CellSummaryStatusPanel';
|
|
6
|
+
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
6
7
|
export class CellSummaryModule extends AdaptableModuleBase {
|
|
7
8
|
constructor(api) {
|
|
8
9
|
super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of cells using multiple summary operations', api);
|
|
10
|
+
this.cachedCellSummary = new WeakMap();
|
|
9
11
|
}
|
|
10
12
|
getViewAccessLevel() {
|
|
11
13
|
return 'Full';
|
|
@@ -35,6 +37,7 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
35
37
|
}
|
|
36
38
|
createCellSummaryMenuItem(popUpParams) {
|
|
37
39
|
return this.createMainMenuItemShowPopup({
|
|
40
|
+
Name: 'cell-summary-show',
|
|
38
41
|
Label: 'See Cell Summary',
|
|
39
42
|
ComponentName: this.moduleInfo.Popup,
|
|
40
43
|
Icon: this.moduleInfo.Glyph,
|
|
@@ -42,6 +45,9 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
42
45
|
});
|
|
43
46
|
}
|
|
44
47
|
createCellSummary(selectedCellInfo) {
|
|
48
|
+
if (this.cachedCellSummary.has(selectedCellInfo)) {
|
|
49
|
+
return this.cachedCellSummary.get(selectedCellInfo);
|
|
50
|
+
}
|
|
45
51
|
let selectedCellSummary;
|
|
46
52
|
if (selectedCellInfo && ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.columns)) {
|
|
47
53
|
let numericValues = [];
|
|
@@ -70,37 +76,65 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
70
76
|
// copying so that we keep the order - needed for others
|
|
71
77
|
const newNumericValues = [...numericValues];
|
|
72
78
|
let hasNumericColumns = numericValues.length > 0;
|
|
73
|
-
|
|
79
|
+
if (selectedCellInfo.columns.length > 1) {
|
|
80
|
+
return {
|
|
81
|
+
Sum: null,
|
|
82
|
+
Average: null,
|
|
83
|
+
Median: null,
|
|
84
|
+
Mode: null,
|
|
85
|
+
Distinct: null,
|
|
86
|
+
Max: null,
|
|
87
|
+
Min: null,
|
|
88
|
+
Count: null,
|
|
89
|
+
Std_Deviation: null,
|
|
90
|
+
Only: '',
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const columnId = selectedCellInfo.columns[0].columnId;
|
|
94
|
+
const rowNodes = selectedCellInfo.gridCells.map((gc) => gc.rowNode);
|
|
95
|
+
const handleExpression = (functionName) => {
|
|
96
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
97
|
+
aggregatedScalarExpression: `${functionName}([${columnId}])`,
|
|
98
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
99
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
100
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
101
|
+
value = Helper.roundNumber(value, 2);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
};
|
|
105
|
+
const sumValue = hasNumericColumns ? handleExpression('SUM') : null;
|
|
106
|
+
const avgValue = hasNumericColumns ? Helper.roundNumber(handleExpression('AVG'), 2) : null;
|
|
107
|
+
const modeValue = hasNumericColumns ? handleExpression('MODE') : null;
|
|
108
|
+
const medianValue = hasNumericColumns ? handleExpression('MEDIAN') : null;
|
|
109
|
+
const distinctValue = handleExpression('DISTINCT');
|
|
110
|
+
const maxValue = hasNumericColumns ? handleExpression('MAX') : null;
|
|
111
|
+
const minValue = hasNumericColumns ? handleExpression('MIN') : null;
|
|
112
|
+
const stdDeviation = hasNumericColumns
|
|
113
|
+
? Helper.roundNumberTo4dp(handleExpression('STD_DEVIATION'))
|
|
114
|
+
: null;
|
|
74
115
|
selectedCellSummary = {
|
|
75
|
-
Sum:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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,
|
|
116
|
+
Sum: sumValue,
|
|
117
|
+
Average: avgValue,
|
|
118
|
+
Median: medianValue,
|
|
119
|
+
Mode: modeValue,
|
|
120
|
+
Distinct: distinctValue,
|
|
121
|
+
Max: maxValue,
|
|
122
|
+
Min: minValue,
|
|
90
123
|
Count: allValues.length,
|
|
91
|
-
Std_Deviation:
|
|
92
|
-
|
|
93
|
-
: undefined,
|
|
94
|
-
Only: distinctCount == 1 ? JSON.stringify(allValues[0]) : '',
|
|
124
|
+
Std_Deviation: stdDeviation,
|
|
125
|
+
Only: distinctValue == 1 ? JSON.stringify(allValues[0]) : '',
|
|
95
126
|
};
|
|
96
127
|
numericValues = [...newNumericValues];
|
|
128
|
+
const weightedAverage = this.getWeightedAverageCellSummary(columnId, rowNodes);
|
|
129
|
+
if (weightedAverage !== null) {
|
|
130
|
+
selectedCellSummary.Weighted_Average = weightedAverage;
|
|
131
|
+
}
|
|
97
132
|
const operationDefinitions = this.api.cellSummaryApi.getCellSummaryOperationDefinitions();
|
|
98
|
-
const api = this.api;
|
|
99
133
|
operationDefinitions === null || operationDefinitions === void 0 ? void 0 : operationDefinitions.forEach((operation) => {
|
|
100
134
|
if (operation.operationFunction) {
|
|
101
135
|
const cellSummaryOperationContext = {
|
|
102
136
|
selectedCellInfo,
|
|
103
|
-
distinctCount,
|
|
137
|
+
distinctCount: distinctValue,
|
|
104
138
|
allValues,
|
|
105
139
|
numericValues,
|
|
106
140
|
numericColumns,
|
|
@@ -111,9 +145,30 @@ export class CellSummaryModule extends AdaptableModuleBase {
|
|
|
111
145
|
selectedCellSummary[operation.operationName] = operation.operationFunction(cellSummaryOperationContext);
|
|
112
146
|
}
|
|
113
147
|
});
|
|
148
|
+
this.cachedCellSummary.set(selectedCellInfo, selectedCellSummary);
|
|
114
149
|
}
|
|
115
150
|
return selectedCellSummary;
|
|
116
151
|
}
|
|
152
|
+
getWeightedAverageCellSummary(columnId, rowNodes) {
|
|
153
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
154
|
+
if (currentLayout.AggregationColumns == undefined) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
const weightedAverageConfig = Object.entries(currentLayout.AggregationColumns).find(([colId, aggCol]) => typeof aggCol === 'object' && aggCol.type === 'weightedAverage' && colId === columnId);
|
|
158
|
+
if (!weightedAverageConfig) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const { weightedColumnId } = weightedAverageConfig[1];
|
|
162
|
+
const expression = `AVG([${columnId}], WEIGHT([${weightedColumnId}]))`;
|
|
163
|
+
const aggScalarValue = new AggregatedScalarLiveValue({
|
|
164
|
+
aggregatedScalarExpression: expression,
|
|
165
|
+
}, ModuleConstants.CellSummaryModuleId, this.api, () => rowNodes);
|
|
166
|
+
let value = aggScalarValue.getGlobalAggregatedValue();
|
|
167
|
+
if (typeof value === 'number' && !isNaN(value)) {
|
|
168
|
+
value = Helper.roundNumber(value, 2);
|
|
169
|
+
}
|
|
170
|
+
return value;
|
|
171
|
+
}
|
|
117
172
|
getViewProperties() {
|
|
118
173
|
return {
|
|
119
174
|
getStatusBarPanelProps() {
|
|
@@ -5,7 +5,6 @@ import { ChartDefinition } from '../types';
|
|
|
5
5
|
import { ExternalChartDefinition } from '../PredefinedConfig/ChartingState';
|
|
6
6
|
export declare class ChartingModule extends AdaptableModuleBase implements IModule {
|
|
7
7
|
constructor(api: AdaptableApi);
|
|
8
|
-
updateOldConfig(): void;
|
|
9
8
|
isModuleAvailable(): boolean;
|
|
10
9
|
getModuleAdaptableObjects(): (ChartDefinition | ExternalChartDefinition)[];
|
|
11
10
|
toViewAll(): AdaptableObjectView[];
|
|
@@ -6,34 +6,14 @@ import * as ChartingRedux from '../Redux/ActionsReducers/ChartingRedux';
|
|
|
6
6
|
import { ChartingStatusBarPopover } from '../View/Charting/ChartingStatusBarPopover';
|
|
7
7
|
import { getObjectTagsViewItems } from './Utilities/getObjectTagsViewItems';
|
|
8
8
|
import { isAgChartDefinition, isExternalChartDefinition, } from '../PredefinedConfig/ChartingState';
|
|
9
|
+
import Helper from '../Utilities/Helpers/Helper';
|
|
9
10
|
export class ChartingModule extends AdaptableModuleBase {
|
|
10
11
|
constructor(api) {
|
|
11
12
|
super(ModuleConstants.ChartingModuleId, ModuleConstants.ChartingFriendlyName, 'chart', 'ChartPopup', 'Create AG Grid Charts in order to see Adaptable Data visually', api);
|
|
12
13
|
}
|
|
13
|
-
updateOldConfig() {
|
|
14
|
-
const allChartDefinitions = this.api.chartingApi.getChartDefinitions();
|
|
15
|
-
const chartDefinitionsToUpdate = allChartDefinitions
|
|
16
|
-
.filter((chartDefinition) => 'model' in chartDefinition || !('Name' in chartDefinition))
|
|
17
|
-
.map((charDefinition) => {
|
|
18
|
-
const newChartDefinition = Object.assign({}, charDefinition);
|
|
19
|
-
if ('model' in newChartDefinition) {
|
|
20
|
-
newChartDefinition.Model = charDefinition.model;
|
|
21
|
-
delete newChartDefinition.model;
|
|
22
|
-
}
|
|
23
|
-
if (!('Name' in newChartDefinition)) {
|
|
24
|
-
// default to chartId
|
|
25
|
-
// @ts-ignore possible because First iteration had no 'Name' and model was under 'model' key (lowercase)
|
|
26
|
-
newChartDefinition.Name = newChartDefinition.Model.chartId;
|
|
27
|
-
}
|
|
28
|
-
return newChartDefinition;
|
|
29
|
-
});
|
|
30
|
-
if (chartDefinitionsToUpdate.length > 0) {
|
|
31
|
-
chartDefinitionsToUpdate.forEach((chartDefinition) => this.api.chartingApi.editChartDefinition(chartDefinition));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
14
|
isModuleAvailable() {
|
|
35
15
|
const agChartsAvailable = this.api.chartingApi.isChartingEnabled() && super.isModuleAvailable();
|
|
36
|
-
const externalChartsAvailable = this.api.optionsApi.getChartingOptions().externalChartingOptions;
|
|
16
|
+
const externalChartsAvailable = Helper.objectHasKeys(this.api.optionsApi.getChartingOptions().externalChartingOptions);
|
|
37
17
|
return Boolean(agChartsAvailable || externalChartsAvailable);
|
|
38
18
|
}
|
|
39
19
|
getModuleAdaptableObjects() {
|
|
@@ -12,10 +12,9 @@ export declare class ColumnFilterModule extends AdaptableModuleBase implements I
|
|
|
12
12
|
getModuleAdaptableObjects(): AdaptableObject[];
|
|
13
13
|
getExplicitlyReferencedColumnIds(columnFilter: ColumnFilter): string[];
|
|
14
14
|
hasNamedQueryReferences(): boolean;
|
|
15
|
-
|
|
16
|
-
handleAdaptableReady(): void;
|
|
17
|
-
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
15
|
+
onAdaptableReady(): void;
|
|
18
16
|
addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
|
|
17
|
+
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
19
18
|
private getExistingColumnFilter;
|
|
20
19
|
getTeamSharingAction(): TeamSharingImportInfo<ColumnFilter>;
|
|
21
20
|
toViewCompact(filter: ColumnFilter): AdaptableObjectCompactView;
|