@adaptabletools/adaptable-cjs 18.0.0-canary.3 → 18.0.0-canary.31
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 +5 -21
- package/base.css +27 -21
- package/base.css.map +1 -1
- package/index.css +108 -88
- package/index.css.map +1 -1
- package/package.json +4 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -109
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +3 -2
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -7
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +2 -0
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
- package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
- package/src/AdaptableOptions/CommentOptions.d.ts +39 -0
- package/src/AdaptableOptions/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/MenuOptions.d.ts +11 -71
- package/src/AdaptableOptions/MenuOptions.js +0 -101
- package/src/AdaptableOptions/NoteOptions.d.ts +25 -0
- package/src/AdaptableOptions/PredicateOptions.d.ts +2 -2
- package/src/AdaptableOptions/StateOptions.d.ts +6 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +19 -2
- package/src/Api/AdaptableApi.d.ts +9 -4
- package/src/Api/BulkUpdateApi.d.ts +0 -5
- package/src/Api/ColumnApi.d.ts +13 -0
- package/src/Api/CommentApi.d.ts +20 -22
- package/src/Api/ConfigApi.d.ts +4 -5
- package/src/Api/EventApi.d.ts +7 -9
- package/src/Api/Events/AdaptableReady.d.ts +3 -3
- package/src/Api/Events/CommentChanged.d.ts +11 -0
- package/src/Api/Events/GridDataChanged.d.ts +4 -4
- package/src/Api/FlashingCellApi.d.ts +2 -2
- package/src/Api/GridApi.d.ts +42 -14
- package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
- package/src/Api/Implementation/ActionRowApiImpl.js +3 -7
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/AlertApiImpl.js +5 -10
- package/src/Api/Implementation/ApiBase.d.ts +5 -3
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
- package/src/Api/Implementation/CalendarApiImpl.js +1 -6
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
- package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
- package/src/Api/Implementation/ChartingApiImpl.js +3 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ColumnApiImpl.js +48 -16
- package/src/Api/Implementation/ColumnFilterApiImpl.js +7 -7
- package/src/Api/Implementation/CommentsApiImpl.d.ts +8 -5
- package/src/Api/Implementation/CommentsApiImpl.js +12 -6
- package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ConfigApiImpl.js +34 -30
- package/src/Api/Implementation/DashboardApiImpl.js +1 -6
- package/src/Api/Implementation/ExportApiImpl.js +5 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +14 -19
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.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 +10 -3
- package/src/Api/Implementation/GridApiImpl.js +78 -23
- package/src/Api/Implementation/LayoutApiImpl.d.ts +4 -7
- package/src/Api/Implementation/LayoutApiImpl.js +19 -13
- package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
- package/src/Api/Implementation/NoteApiImpl.js +45 -0
- package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
- package/src/Api/Implementation/OptionsApiImpl.js +4 -4
- package/src/Api/Implementation/PredicateApiImpl.js +2 -2
- package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
- package/src/Api/Implementation/ScopeApiImpl.d.ts +26 -24
- package/src/Api/Implementation/ScopeApiImpl.js +64 -18
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
- package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +3 -15
- package/src/Api/Implementation/ThemeApiImpl.js +2 -7
- package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +14 -8
- package/src/Api/Implementation/UserInterfaceApiImpl.js +30 -25
- package/src/Api/Internal/ActionRowInternalApi.d.ts +6 -1
- package/src/Api/Internal/ActionRowInternalApi.js +118 -38
- package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -8
- package/src/Api/Internal/AdaptableInternalApi.js +25 -37
- package/src/Api/Internal/AlertInternalApi.d.ts +2 -2
- package/src/Api/Internal/AlertInternalApi.js +4 -17
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +79 -14
- package/src/Api/Internal/ChartingInternalApi.js +13 -13
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
- package/src/Api/Internal/ColumnFilterInternalApi.js +35 -31
- package/src/Api/Internal/ColumnInternalApi.d.ts +6 -1
- package/src/Api/Internal/ColumnInternalApi.js +20 -1
- package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
- package/src/Api/Internal/CommentsInternalApi.js +18 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
- package/src/Api/Internal/CustomSortInternalApi.js +33 -2
- package/src/Api/Internal/DashboardInternalApi.js +5 -11
- package/src/Api/Internal/DataImportInternalApi.js +3 -9
- package/src/Api/Internal/DataSetInternalApi.js +3 -8
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
- package/src/Api/Internal/ExportInternalApi.js +8 -5
- package/src/Api/Internal/ExpressionInternalApi.js +2 -12
- package/src/Api/Internal/Fdc3InternalApi.js +3 -12
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -6
- package/src/Api/Internal/FormatColumnInternalApi.js +39 -30
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +62 -1
- package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
- package/src/Api/Internal/GridFilterInternalApi.js +9 -9
- package/src/Api/Internal/GridInternalApi.d.ts +23 -3
- package/src/Api/Internal/GridInternalApi.js +151 -44
- package/src/Api/Internal/LayoutInternalApi.d.ts +2 -0
- package/src/Api/Internal/LayoutInternalApi.js +26 -19
- package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
- package/src/Api/Internal/NoteInternalApi.js +18 -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 +3 -8
- package/src/Api/Internal/ThemeInternalApi.js +1 -1
- package/src/Api/Internal/UserInterfaceInternalApi.js +1 -1
- package/src/Api/InteropioPluginApi.d.ts +2 -2
- package/src/Api/LayoutApi.d.ts +17 -9
- package/src/Api/NoteApi.d.ts +48 -0
- package/src/Api/OptionsApi.d.ts +8 -8
- package/src/Api/ScopeApi.d.ts +34 -24
- package/src/Api/UserInterfaceApi.d.ts +15 -13
- package/src/EnvVars.d.ts +3 -0
- package/src/EnvVars.js +8 -0
- 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/AggregationColumns.d.ts +1 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
- 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/DataUpdateConfig.d.ts +4 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +4 -1
- package/src/PredefinedConfig/Common/Enums.js +3 -0
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
- package/src/PredefinedConfig/Common/Menu.js +117 -0
- package/src/PredefinedConfig/Common/RowScope.d.ts +17 -0
- package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
- package/src/PredefinedConfig/Common/RowSummary.js +20 -0
- package/src/PredefinedConfig/Common/TransposeConfig.d.ts +30 -0
- package/src/PredefinedConfig/Common/Types.d.ts +4 -4
- package/src/PredefinedConfig/Common/Types.js +4 -1
- package/src/PredefinedConfig/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 +5 -0
- package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
- package/src/PredefinedConfig/NoteState.js +2 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +2 -2
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
- 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 +1 -39
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +34 -11
- package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
- package/src/Redux/ActionsReducers/NoteRedux.js +89 -0
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +5 -13
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -22
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +15 -4
- package/src/Redux/ActionsReducers/SystemRedux.js +27 -11
- package/src/Redux/Store/AdaptableStore.d.ts +4 -6
- package/src/Redux/Store/AdaptableStore.js +69 -79
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
- package/src/Strategy/AdaptableModuleBase.d.ts +11 -12
- package/src/Strategy/AdaptableModuleBase.js +17 -23
- package/src/Strategy/AlertModule.d.ts +2 -3
- package/src/Strategy/AlertModule.js +4 -57
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/BulkUpdateModule.js +2 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +4 -5
- package/src/Strategy/CalculatedColumnModule.js +8 -28
- package/src/Strategy/CellSummaryModule.d.ts +10 -8
- package/src/Strategy/CellSummaryModule.js +85 -70
- package/src/Strategy/ChartingModule.d.ts +0 -1
- package/src/Strategy/ChartingModule.js +2 -22
- package/src/Strategy/ColumnFilterModule.d.ts +3 -4
- package/src/Strategy/ColumnFilterModule.js +37 -121
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/ColumnInfoModule.js +6 -4
- package/src/Strategy/CommentModule.d.ts +11 -0
- package/src/Strategy/CommentModule.js +75 -0
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.js +4 -3
- package/src/Strategy/DashboardModule.d.ts +3 -4
- package/src/Strategy/DashboardModule.js +11 -28
- package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
- package/src/Strategy/DataChangeHistoryModule.js +3 -1
- package/src/Strategy/DataImportModule.d.ts +4 -4
- package/src/Strategy/DataImportModule.js +8 -8
- package/src/Strategy/DataSetModule.d.ts +1 -1
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.d.ts +1 -2
- package/src/Strategy/ExportModule.js +37 -40
- package/src/Strategy/Fdc3Module.d.ts +1 -1
- package/src/Strategy/Fdc3Module.js +3 -13
- package/src/Strategy/FlashingCellModule.d.ts +3 -4
- package/src/Strategy/FlashingCellModule.js +8 -21
- package/src/Strategy/FormatColumnModule.d.ts +1 -3
- package/src/Strategy/FormatColumnModule.js +27 -91
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -2
- package/src/Strategy/FreeTextColumnModule.js +2 -32
- package/src/Strategy/GridFilterModule.d.ts +0 -1
- package/src/Strategy/GridFilterModule.js +0 -37
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/GridInfoModule.js +5 -3
- package/src/Strategy/Interface/IModule.d.ts +3 -4
- package/src/Strategy/LayoutModule.d.ts +5 -6
- package/src/Strategy/LayoutModule.js +77 -122
- package/src/Strategy/NamedQueryModule.d.ts +0 -1
- package/src/Strategy/NamedQueryModule.js +0 -19
- package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +3 -3
- package/src/Strategy/NoteModule.js +60 -0
- package/src/Strategy/PlusMinusModule.d.ts +2 -2
- package/src/Strategy/PlusMinusModule.js +3 -3
- package/src/Strategy/ScheduleModule.d.ts +1 -1
- package/src/Strategy/ScheduleModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.d.ts +3 -3
- package/src/Strategy/SettingsPanelModule.js +6 -6
- package/src/Strategy/ShortcutModule.d.ts +1 -1
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +2 -1
- package/src/Strategy/StyledColumnModule.d.ts +2 -2
- package/src/Strategy/StyledColumnModule.js +47 -40
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/SystemStatusModule.js +4 -3
- package/src/Strategy/TeamSharingModule.d.ts +1 -0
- package/src/Strategy/TeamSharingModule.js +5 -5
- package/src/Strategy/ToolPanelModule.d.ts +0 -1
- package/src/Strategy/ToolPanelModule.js +0 -23
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +4 -2
- package/src/Strategy/Utilities/getScopeViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
- package/src/Utilities/Constants/GeneralConstants.d.ts +2 -0
- package/src/Utilities/Constants/GeneralConstants.js +4 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
- package/src/Utilities/Constants/ModuleConstants.js +7 -7
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +434 -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 +6 -1
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +21 -60
- package/src/Utilities/Helpers/Helper.d.ts +2 -0
- package/src/Utilities/Helpers/Helper.js +6 -1
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/MenuItem.d.ts +7 -4
- package/src/Utilities/MenuItem.js +6 -3
- package/src/Utilities/ObjectFactory.d.ts +3 -3
- package/src/Utilities/ObjectFactory.js +7 -25
- 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 -186
- package/src/Utilities/Services/MetamodelService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.js +6 -3
- package/src/Utilities/Services/ModuleService.js +6 -2
- package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +4 -3
- package/src/Utilities/Services/ReportService.d.ts +7 -5
- package/src/Utilities/Services/ReportService.js +243 -24
- package/src/Utilities/Services/RowEditService.d.ts +3 -2
- package/src/Utilities/Services/RowEditService.js +3 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +22 -0
- package/src/Utilities/Services/RowSummaryService.js +146 -0
- package/src/Utilities/adaptableQlUtils.d.ts +2 -0
- package/src/Utilities/adaptableQlUtils.js +18 -0
- package/src/Utilities/license/decode.js +1 -70
- package/src/Utilities/license/hashing.js +1 -47
- package/src/View/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/Alert/Utilities/getAvailablePredicates.d.ts +2 -2
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +1 -1
- package/src/View/Comments/CommentsEditor.js +28 -17
- package/src/View/Comments/CommentsPopup.js +25 -13
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
- package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +46 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/CellPopup/index.d.ts +1 -0
- package/src/View/Components/CellPopup/index.js +6 -3
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.d.ts +3 -3
- package/src/View/Components/EntityRulesEditor/index.d.ts +3 -3
- package/src/View/Components/FilterForm/FilterForm.js +20 -12
- package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
- package/src/View/Components/FilterForm/QuickFilterValues.js +39 -23
- package/src/View/Components/NewScopeComponent.d.ts +5 -5
- package/src/View/Components/NewScopeComponent.js +34 -1
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +9 -1
- package/src/View/Components/Popups/AdaptableToaster.js +1 -1
- package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
- package/src/View/Components/RangesComponent.d.ts +2 -2
- package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
- 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/CustomSortSummary.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +12 -10
- 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 +19 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +27 -12
- 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 +200 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +38 -3
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +17 -1
- package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +181 -0
- package/src/View/License/LicenseWatermark.js +1 -66
- package/src/View/Note/NotePopup.d.ts +2 -0
- package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +22 -19
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.js +38 -14
- package/src/View/Theme/ThemeSelector.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +48 -10
- package/src/agGrid/Adaptable.d.ts +3 -455
- package/src/agGrid/Adaptable.js +7 -5291
- package/src/agGrid/AdaptableAgGrid.d.ts +346 -0
- package/src/agGrid/AdaptableAgGrid.js +3915 -0
- package/src/agGrid/AdaptableLogger.js +78 -13
- package/src/agGrid/AgGridAdapter.d.ts +64 -0
- package/src/agGrid/AgGridAdapter.js +594 -0
- package/src/agGrid/AgGridColumnAdapter.d.ts +54 -0
- package/src/agGrid/AgGridColumnAdapter.js +800 -0
- package/src/agGrid/AgGridMenuAdapter.d.ts +44 -0
- package/src/agGrid/AgGridMenuAdapter.js +605 -0
- package/src/agGrid/AgGridOptionsService.d.ts +15 -0
- package/src/agGrid/AgGridOptionsService.js +80 -0
- package/src/agGrid/BadgeRenderer.d.ts +2 -2
- package/src/agGrid/BadgeRenderer.js +26 -12
- package/src/agGrid/CheckboxRenderer.js +1 -1
- package/src/agGrid/FilterWrapper.d.ts +2 -2
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
- package/src/agGrid/buildSortedColumnStateForLayout.d.ts +7 -0
- package/src/agGrid/buildSortedColumnStateForLayout.js +124 -0
- package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
- package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +74 -19
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
- package/src/agGrid/sortColumnStateForVisibleColumns.d.ts +12 -0
- package/src/agGrid/sortColumnStateForVisibleColumns.js +50 -0
- package/src/agGrid/weightedAverage.d.ts +0 -2
- package/src/agGrid/weightedAverage.js +1 -56
- 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 +3 -17
- 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 +6 -4
- package/src/components/ProgressIndicator/ProgressIndicator.js +15 -6
- package/src/components/Select/Select.d.ts +3 -1
- package/src/components/Select/Select.js +4 -2
- package/src/components/Textarea/index.d.ts +2 -2
- package/src/components/icons/copy.d.ts +3 -0
- package/src/components/icons/copy.js +7 -0
- package/src/components/icons/filter-off.d.ts +3 -0
- package/src/components/icons/filter-off.js +7 -0
- package/src/components/icons/grid-info.d.ts +3 -0
- package/src/components/icons/grid-info.js +7 -0
- package/src/components/icons/index.js +14 -0
- package/src/components/icons/note.js +2 -2
- package/src/components/icons/rows.d.ts +3 -0
- package/src/components/icons/rows.js +7 -0
- package/src/components/icons/select-all.d.ts +3 -0
- package/src/components/icons/select-all.js +7 -0
- package/src/components/icons/select-fwd.d.ts +3 -0
- package/src/components/icons/select-fwd.js +7 -0
- package/src/components/icons/select-off.d.ts +3 -0
- package/src/components/icons/select-off.js +7 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +222 -73
- package/src/metamodel/adaptable.metamodel.js +1 -9316
- package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
- package/src/migration/AdaptableUpgradeHelper.js +52 -0
- package/src/migration/VersionUpgrade.d.ts +8 -0
- package/src/migration/VersionUpgrade.js +15 -0
- package/src/migration/VersionUpgrade17.d.ts +18 -0
- package/src/migration/VersionUpgrade17.js +347 -0
- package/src/migration/VersionUpgrade18.d.ts +5 -0
- package/src/migration/VersionUpgrade18.js +10 -0
- package/src/parser/src/parser.js +576 -553
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -4
- package/src/parser/src/types.d.ts +7 -2
- package/src/parser/src/types.js +1 -2
- package/src/types.d.ts +29 -21
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
- package/src/AdaptableOptions/NotesOptions.d.ts +0 -16
- package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
- package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
- package/src/Api/Implementation/NotesApiImpl.js +0 -44
- package/src/Api/NotesApi.d.ts +0 -48
- package/src/PredefinedConfig/CellAddress.d.ts +0 -13
- package/src/PredefinedConfig/CellAddress.js +0 -5
- package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
- package/src/Redux/ActionsReducers/NotesRedux.js +0 -87
- package/src/Strategy/CommentsModule.d.ts +0 -16
- package/src/Strategy/CommentsModule.js +0 -82
- package/src/Strategy/NotesModule.js +0 -62
- 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 -138
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
- package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
- package/src/View/Notes/NotesPopup.d.ts +0 -2
- package/src/agGrid/agGridHelper.d.ts +0 -57
- package/src/agGrid/agGridHelper.js +0 -691
- package/src/agGrid/agGridMenuHelper.d.ts +0 -46
- package/src/agGrid/agGridMenuHelper.js +0 -673
- /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/Common/{AdaptableScope.js → ColumnScope.js} +0 -0
- /package/src/PredefinedConfig/{NotesState.js → Common/RowScope.js} +0 -0
- /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/Common/TransposeConfig.js} +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
- /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ActionRowInternalApi = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
6
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
7
|
+
const UIHelper_1 = tslib_1.__importDefault(require("../../View/UIHelper"));
|
|
8
|
+
const ActionColumnRenderer_1 = require("../../agGrid/ActionColumnRenderer");
|
|
5
9
|
class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
6
10
|
buildRowEditForm(rowNode) {
|
|
7
11
|
return this.buildActionRow('rowEdited', rowNode);
|
|
@@ -42,13 +46,7 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
42
46
|
: this.actionRowFormOptions.formDescription;
|
|
43
47
|
}
|
|
44
48
|
buildFormParamContext(type, rowNode) {
|
|
45
|
-
return {
|
|
46
|
-
rowNode,
|
|
47
|
-
adaptableApi: this.getAdaptableApi(),
|
|
48
|
-
userName: this.getOptions().userName,
|
|
49
|
-
adaptableId: this.getOptions().adaptableId,
|
|
50
|
-
type: type,
|
|
51
|
-
};
|
|
49
|
+
return Object.assign(Object.assign({ rowNode }, this.getAdaptableApi().internalApi.buildBaseContext()), { type: type });
|
|
52
50
|
}
|
|
53
51
|
buildActionRowFields(actionRowType, rowNode) {
|
|
54
52
|
const relevantColumns = this.getAdaptableApi()
|
|
@@ -64,13 +62,8 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
64
62
|
showColumnInActionRowForm(adaptableColumn, actionRowType) {
|
|
65
63
|
const showColumnFn = this.getActionRowOptions().actionRowFormOptions.showColumninActionRowForm;
|
|
66
64
|
if (typeof showColumnFn === 'function') {
|
|
67
|
-
return showColumnFn({
|
|
68
|
-
|
|
69
|
-
userName: this.getOptions().userName,
|
|
70
|
-
adaptableId: this.getOptions().adaptableId,
|
|
71
|
-
adaptableColumn,
|
|
72
|
-
actionRowType,
|
|
73
|
-
});
|
|
65
|
+
return showColumnFn(Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { adaptableColumn,
|
|
66
|
+
actionRowType }));
|
|
74
67
|
}
|
|
75
68
|
return true;
|
|
76
69
|
}
|
|
@@ -98,28 +91,24 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
98
91
|
// textOutput should not be saved, their values are set to display values
|
|
99
92
|
// we need to filter out the textOutput fields and add the primaryKey
|
|
100
93
|
const eventInfo = type === 'rowCreated'
|
|
101
|
-
? {
|
|
102
|
-
type: 'rowCreated',
|
|
103
|
-
formData: context.formData,
|
|
104
|
-
adaptableApi: context.adaptableApi,
|
|
105
|
-
userName: this.getOptions().userName,
|
|
106
|
-
adaptableId: this.getOptions().adaptableId,
|
|
107
|
-
clonedRowNode: rowNode,
|
|
108
|
-
}
|
|
109
|
-
: {
|
|
110
|
-
type: 'rowEdited',
|
|
111
|
-
formData: this.prepareEditData(formFields, context),
|
|
112
|
-
rowNode: rowNode,
|
|
113
|
-
adaptableApi: context.adaptableApi,
|
|
114
|
-
userName: this.getOptions().userName,
|
|
115
|
-
adaptableId: this.getOptions().adaptableId,
|
|
116
|
-
};
|
|
94
|
+
? Object.assign(Object.assign({ type: 'rowCreated', formData: this.prepareCreateData(formFields, context) }, this.getAdaptableApi().internalApi.buildBaseContext()), { clonedRowNode: rowNode }) : Object.assign({ type: 'rowEdited', formData: this.prepareEditData(formFields, context), rowNode: rowNode }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
117
95
|
this.getAdaptableApi().eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
118
96
|
(_b = (_a = this.actionRowFormOptions) === null || _a === void 0 ? void 0 : _a.onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
119
97
|
},
|
|
120
98
|
};
|
|
121
99
|
return [cancelButton, saveButton];
|
|
122
100
|
}
|
|
101
|
+
// private getNullValueForColumn(column: AdaptableColumn) {}
|
|
102
|
+
prepareCreateData(formFields, context) {
|
|
103
|
+
// when creating we just omit values that are not set
|
|
104
|
+
const dataToSave = Object.assign({}, context.formData);
|
|
105
|
+
for (const formField of formFields) {
|
|
106
|
+
if (dataToSave[formField.name] === '') {
|
|
107
|
+
delete dataToSave[formField.name];
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return dataToSave;
|
|
111
|
+
}
|
|
123
112
|
prepareEditData(formFields, context) {
|
|
124
113
|
const dataToSave = Object.assign({}, context.formData);
|
|
125
114
|
for (const formField of formFields) {
|
|
@@ -164,14 +153,8 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
164
153
|
return customFieldLabel !== null && customFieldLabel !== void 0 ? customFieldLabel : column.friendlyName;
|
|
165
154
|
}
|
|
166
155
|
buildFormFieldLabelContext(type, column, rowNode) {
|
|
167
|
-
return {
|
|
168
|
-
|
|
169
|
-
column,
|
|
170
|
-
adaptableApi: this.getAdaptableApi(),
|
|
171
|
-
userName: this.getOptions().userName,
|
|
172
|
-
adaptableId: this.getOptions().adaptableId,
|
|
173
|
-
type: type,
|
|
174
|
-
};
|
|
156
|
+
return Object.assign(Object.assign({ rowNode,
|
|
157
|
+
column }, this.getAdaptableApi().internalApi.buildBaseContext()), { type: type });
|
|
175
158
|
}
|
|
176
159
|
getFieldTypeFromColumnType(column) {
|
|
177
160
|
switch (column.dataType) {
|
|
@@ -200,5 +183,102 @@ class ActionRowInternalApi extends ApiBase_1.ApiBase {
|
|
|
200
183
|
label: value,
|
|
201
184
|
}));
|
|
202
185
|
}
|
|
186
|
+
getColDefsForActionRowColumns() {
|
|
187
|
+
const actionButtons = this.getActionRowButtonDefs();
|
|
188
|
+
if (!actionButtons.length) {
|
|
189
|
+
return [];
|
|
190
|
+
}
|
|
191
|
+
return [
|
|
192
|
+
{
|
|
193
|
+
headerName: '',
|
|
194
|
+
colId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
195
|
+
hide: false,
|
|
196
|
+
editable: false,
|
|
197
|
+
// 15px is the icon width + left&right padding + left&right border
|
|
198
|
+
width: Math.max(actionButtons.length * (UIHelper_1.default.getSimpleButtonPaddingWidth() * 2 + 15) + 2,
|
|
199
|
+
// If the width of the column is to small, the width will not be applied
|
|
200
|
+
// this triggers the setLayout an infinite loop because the width read from the grid is always different
|
|
201
|
+
40),
|
|
202
|
+
resizable: false,
|
|
203
|
+
lockVisible: true,
|
|
204
|
+
suppressColumnsToolPanel: true,
|
|
205
|
+
suppressFiltersToolPanel: true,
|
|
206
|
+
suppressHeaderMenuButton: true,
|
|
207
|
+
suppressMovable: true,
|
|
208
|
+
filter: false,
|
|
209
|
+
sortable: false,
|
|
210
|
+
enableRowGroup: false,
|
|
211
|
+
pinned: this.getActionRowOptions().actionRowButtonOptions.position === 'pinnedRight'
|
|
212
|
+
? 'right'
|
|
213
|
+
: 'left',
|
|
214
|
+
cellRenderer: this.getAdaptableVariant() === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
|
|
215
|
+
cellClass: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
216
|
+
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
217
|
+
},
|
|
218
|
+
];
|
|
219
|
+
}
|
|
220
|
+
getActionRowButtonDefs() {
|
|
221
|
+
const actionRowButtons = this.getActionRowApi().getActionRowButtons();
|
|
222
|
+
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
const defaultActionRowButtonConfiguration = {
|
|
226
|
+
create: {
|
|
227
|
+
icon: {
|
|
228
|
+
name: 'add',
|
|
229
|
+
},
|
|
230
|
+
tooltip: 'Create',
|
|
231
|
+
onClick: () => {
|
|
232
|
+
this.getActionRowApi().displayCreateActionRow();
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
edit: {
|
|
236
|
+
icon: {
|
|
237
|
+
name: 'edit',
|
|
238
|
+
},
|
|
239
|
+
tooltip: 'Edit',
|
|
240
|
+
onClick: (button, context) => {
|
|
241
|
+
this.getActionRowApi().displayEditActionRow(context.primaryKeyValue);
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
clone: {
|
|
245
|
+
icon: {
|
|
246
|
+
name: 'clone',
|
|
247
|
+
},
|
|
248
|
+
tooltip: 'Clone',
|
|
249
|
+
onClick: (button, context) => {
|
|
250
|
+
this.getActionRowApi().displayCloneActionRow(context.primaryKeyValue);
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
delete: {
|
|
254
|
+
icon: {
|
|
255
|
+
name: 'delete',
|
|
256
|
+
},
|
|
257
|
+
tooltip: 'Delete',
|
|
258
|
+
onClick: (button, context) => {
|
|
259
|
+
var _a, _b;
|
|
260
|
+
const eventInfo = Object.assign({ type: 'rowDeleted', rowNode: context.rowNode }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
261
|
+
this.getEventApi().emit('ActionRowSubmitted', eventInfo);
|
|
262
|
+
(_b = (_a = this.getActionRowOptions().actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
};
|
|
266
|
+
const actionButtons = actionRowButtons
|
|
267
|
+
.map((actionRowButtonType) => {
|
|
268
|
+
var _a, _b;
|
|
269
|
+
const defaultButtonConfig = defaultActionRowButtonConfiguration[actionRowButtonType];
|
|
270
|
+
if (!defaultButtonConfig) {
|
|
271
|
+
// should NOT happen unless the user sent some invalid button type in the predefined config
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const customButtonConfig = (_b = (_a = this.getActionRowOptions().actionRowButtonOptions).customConfiguration) === null || _b === void 0 ? void 0 : _b.call(_a, Object.assign(Object.assign({}, this.getAdaptableApi().internalApi.buildBaseContext()), { actionRowButtonType }));
|
|
275
|
+
if (!customButtonConfig) {
|
|
276
|
+
return defaultButtonConfig;
|
|
277
|
+
}
|
|
278
|
+
return Object.assign(Object.assign({}, defaultButtonConfig), customButtonConfig);
|
|
279
|
+
})
|
|
280
|
+
.filter(Boolean);
|
|
281
|
+
return actionButtons;
|
|
282
|
+
}
|
|
203
283
|
}
|
|
204
284
|
exports.ActionRowInternalApi = ActionRowInternalApi;
|
|
@@ -24,9 +24,9 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
|
|
|
24
24
|
import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
|
|
25
25
|
import { IModuleCollection } from '../../Strategy/Interface/IModule';
|
|
26
26
|
import { AdaptableObjectTag, AdaptableObjectWithScope } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
27
|
-
import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
|
|
28
27
|
import { Fdc3Service } from '../../Utilities/Services/Fdc3Service';
|
|
29
28
|
import { CellPopupService } from '../../Utilities/Services/CellPopupService';
|
|
29
|
+
import { RowEditService } from '../../Utilities/Services/RowEditService';
|
|
30
30
|
export declare class AdaptableInternalApi extends ApiBase {
|
|
31
31
|
getSystemState(): SystemState;
|
|
32
32
|
showPopupConfirmation(confirmation: UIConfirmation): void;
|
|
@@ -46,8 +46,7 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
46
46
|
setPivotModeOn(): void;
|
|
47
47
|
setPivotModeOff(): void;
|
|
48
48
|
isGridInPivotMode(): boolean;
|
|
49
|
-
|
|
50
|
-
setTreeModeOff(): void;
|
|
49
|
+
setTreeMode(mode: boolean): void;
|
|
51
50
|
isGridInTreeMode(): boolean;
|
|
52
51
|
getToolbarTitle(): string;
|
|
53
52
|
buildDataChangedInfo(config: Pick<CellDataChangedInfo, 'newValue' | 'oldValue' | 'column' | 'primaryKeyValue' | 'rowNode' | 'trigger'>): CellDataChangedInfo;
|
|
@@ -65,7 +64,7 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
65
64
|
getAlertService(): IAlertService;
|
|
66
65
|
getTeamSharingService(): ITeamSharingService;
|
|
67
66
|
getMetamodelService(): IMetamodelService;
|
|
68
|
-
getRowEditService():
|
|
67
|
+
getRowEditService(): RowEditService;
|
|
69
68
|
getFdc3Service(): Fdc3Service;
|
|
70
69
|
getModules(): IModuleCollection;
|
|
71
70
|
getModuleFriendlyName(adaptableModule: AdaptableModule): string;
|
|
@@ -73,7 +72,7 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
73
72
|
includeGroupRows?: boolean;
|
|
74
73
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
75
74
|
}): void;
|
|
76
|
-
forAllVisibleRowNodesDo(func: (rowNode: IRowNode) => void, config?: {
|
|
75
|
+
forAllVisibleRowNodesDo(func: (rowNode: IRowNode, index: number) => void, config?: {
|
|
77
76
|
includeGroupRows?: boolean;
|
|
78
77
|
filterFn?: (rowNode: IRowNode) => boolean;
|
|
79
78
|
}): void;
|
|
@@ -90,7 +89,6 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
90
89
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
91
90
|
initializeDataChangeHistory(): void;
|
|
92
91
|
executeWithProgressIndicator(label: string, executeFn: () => void, errorHandlingFn?: () => void): void;
|
|
93
|
-
hideProgressIndicator(): void;
|
|
94
92
|
getCorrectEnglishVariant(wordToSpell: string): string;
|
|
95
93
|
shouldDisplayTagSections(): boolean;
|
|
96
94
|
getAvailableTags(): AdaptableObjectTag[] | undefined;
|
|
@@ -106,8 +104,8 @@ export declare class AdaptableInternalApi extends ApiBase {
|
|
|
106
104
|
getPreviousGroupedColumnsIndex(layoutId: string): {
|
|
107
105
|
[key: string]: number;
|
|
108
106
|
};
|
|
109
|
-
getValueUsingField(rowData: Record<string, any>,
|
|
110
|
-
setValueUsingField(rowData: Record<string, any>,
|
|
107
|
+
getValueUsingField(rowData: Record<string, any>, fieldName: string): any;
|
|
108
|
+
setValueUsingField(rowData: Record<string, any>, fieldName: string, newValue: any): Record<string, any>;
|
|
111
109
|
findAdaptableObjectsByLookupCriteria<T extends AdaptableObjectWithScope>({ scope, tag, ids }: AdaptableObjectLookupCriteria, specificAdaptableObjects: T[]): T[];
|
|
112
110
|
buildBaseContext(): BaseContext;
|
|
113
111
|
getActionButtonsAndActionColumn(colDef: ColDef): {
|
|
@@ -4,7 +4,6 @@ exports.AdaptableInternalApi = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
6
6
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
7
|
-
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
8
7
|
const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/GridRedux"));
|
|
9
8
|
const DeadRedux = tslib_1.__importStar(require("../../Redux/DeadRedux"));
|
|
10
9
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
@@ -51,11 +50,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
51
50
|
isGridInPivotMode() {
|
|
52
51
|
return this.getAdaptableState().Grid.IsGridInPivotMode;
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
setTreeMode(mode) {
|
|
54
|
+
if (!!mode) {
|
|
55
|
+
this.dispatchAction(GridRedux.SetTreeModeOn());
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.dispatchAction(GridRedux.SetTreeModeOff());
|
|
59
|
+
}
|
|
59
60
|
}
|
|
60
61
|
isGridInTreeMode() {
|
|
61
62
|
return this.getAdaptableState().Grid.IsGridInTreeMode;
|
|
@@ -223,13 +224,13 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
223
224
|
frameworkComponent,
|
|
224
225
|
componentType,
|
|
225
226
|
});
|
|
226
|
-
if (this.adaptable.
|
|
227
|
+
if (this.adaptable.isReady) {
|
|
227
228
|
createComponentFn();
|
|
228
229
|
}
|
|
229
230
|
else {
|
|
230
231
|
// adaptable may not be initialized yet if the framework component is part of the initial render
|
|
231
232
|
// AFL 2021.10.14 - not really sure if this is necessary anymore?! (see the other changes in this commit)
|
|
232
|
-
(0, waitForCondition_1.waitForCondition)(() => this.adaptable.
|
|
233
|
+
(0, waitForCondition_1.waitForCondition)(() => this.adaptable.isReady).then(() => {
|
|
233
234
|
createComponentFn();
|
|
234
235
|
});
|
|
235
236
|
}
|
|
@@ -251,7 +252,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
254
|
executeWithProgressIndicator(label, executeFn, errorHandlingFn) {
|
|
254
|
-
this.
|
|
255
|
+
this.getAdaptableApi().userInterfaceApi.showProgressIndicator({ text: label, delay: 300 });
|
|
255
256
|
// setTimeout required to give the ProgressIndicator rendering a head-start (see RAF in ProgressIndicator implementation)
|
|
256
257
|
setTimeout(() => {
|
|
257
258
|
try {
|
|
@@ -259,14 +260,11 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
259
260
|
}
|
|
260
261
|
catch (error) {
|
|
261
262
|
errorHandlingFn === null || errorHandlingFn === void 0 ? void 0 : errorHandlingFn();
|
|
262
|
-
this.hideProgressIndicator();
|
|
263
|
+
this.getUserInterfaceApi().hideProgressIndicator();
|
|
263
264
|
this.adaptable.logger.error('Unexpected error while executing a function with a progress indicator', error);
|
|
264
265
|
}
|
|
265
266
|
}, 16);
|
|
266
267
|
}
|
|
267
|
-
hideProgressIndicator() {
|
|
268
|
-
this.dispatchReduxAction((0, SystemRedux_1.SystemProgressIndicatorHide)());
|
|
269
|
-
}
|
|
270
268
|
getCorrectEnglishVariant(wordToSpell) {
|
|
271
269
|
if (wordToSpell.includes('our')) {
|
|
272
270
|
return this.getUserInterfaceOptions().englishVariant == 'GB'
|
|
@@ -296,11 +294,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
296
294
|
if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
|
|
297
295
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
298
296
|
return this.adaptable.adaptableOptions.userInterfaceOptions
|
|
299
|
-
.objectTags(
|
|
300
|
-
adaptableApi: this.adaptable.api,
|
|
301
|
-
userName: this.getOptions().userName,
|
|
302
|
-
adaptableId: this.getOptions().adaptableId,
|
|
303
|
-
})
|
|
297
|
+
.objectTags(this.buildBaseContext())
|
|
304
298
|
.filter((tag) => typeof tag === 'string');
|
|
305
299
|
}
|
|
306
300
|
}
|
|
@@ -317,13 +311,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
317
311
|
}
|
|
318
312
|
if (typeof this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions
|
|
319
313
|
.autoGenerateTagsForLayouts === 'function') {
|
|
320
|
-
const autoGenerateTagsForLayoutsContext = {
|
|
321
|
-
layouts: this.adaptable.api.layoutApi.getLayouts(),
|
|
322
|
-
objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags(),
|
|
323
|
-
adaptableApi: this.adaptable.api,
|
|
324
|
-
userName: this.getOptions().userName,
|
|
325
|
-
adaptableId: this.getOptions().adaptableId,
|
|
326
|
-
};
|
|
314
|
+
const autoGenerateTagsForLayoutsContext = Object.assign({ layouts: this.adaptable.api.layoutApi.getLayouts(), objectTags: this.getAdaptableApi().userInterfaceApi.getAdaptableObjectTags() }, this.buildBaseContext());
|
|
327
315
|
const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
328
316
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
329
317
|
return customGeneratedTags.filter((tag) => typeof tag === 'string');
|
|
@@ -368,17 +356,17 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
368
356
|
return (_a = SystemRedux.SystemPreviousGroupedColumnsSelector(this.getAdaptableState().System)) === null || _a === void 0 ? void 0 : _a[layoutId];
|
|
369
357
|
}
|
|
370
358
|
// "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/utils/object.ts#L205
|
|
371
|
-
getValueUsingField(rowData,
|
|
372
|
-
if (!rowData || !(
|
|
359
|
+
getValueUsingField(rowData, fieldName) {
|
|
360
|
+
if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
|
|
373
361
|
return;
|
|
374
362
|
}
|
|
375
|
-
const isColumnValueKeyNested =
|
|
363
|
+
const isColumnValueKeyNested = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
|
|
376
364
|
// if no '.', then it's not a deep value
|
|
377
365
|
if (!isColumnValueKeyNested) {
|
|
378
|
-
return rowData[
|
|
366
|
+
return rowData[fieldName];
|
|
379
367
|
}
|
|
380
368
|
// otherwise it is a deep value, so need to dig for it
|
|
381
|
-
const fields =
|
|
369
|
+
const fields = fieldName.split('.');
|
|
382
370
|
let currentObject = rowData;
|
|
383
371
|
for (let i = 0; i < fields.length; i++) {
|
|
384
372
|
if (currentObject == null) {
|
|
@@ -389,22 +377,22 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
389
377
|
return currentObject;
|
|
390
378
|
}
|
|
391
379
|
// "borrowed" from https://github.com/ag-grid/ag-grid/blob/v28.2.1/community-modules/core/src/ts/valueService/valueService.ts#L236
|
|
392
|
-
setValueUsingField(rowData,
|
|
393
|
-
if (!rowData || !(
|
|
380
|
+
setValueUsingField(rowData, fieldName, newValue) {
|
|
381
|
+
if (!rowData || !(fieldName === null || fieldName === void 0 ? void 0 : fieldName.length)) {
|
|
394
382
|
return;
|
|
395
383
|
}
|
|
396
|
-
const isColumnValueKeyContainsDots =
|
|
384
|
+
const isColumnValueKeyContainsDots = fieldName === null || fieldName === void 0 ? void 0 : fieldName.includes('.');
|
|
397
385
|
let valuesAreSame = false;
|
|
398
386
|
if (!isColumnValueKeyContainsDots) {
|
|
399
387
|
// soft comparison to match strings and numbers
|
|
400
|
-
valuesAreSame = rowData[
|
|
388
|
+
valuesAreSame = rowData[fieldName] == newValue;
|
|
401
389
|
if (!valuesAreSame) {
|
|
402
|
-
rowData[
|
|
390
|
+
rowData[fieldName] = newValue;
|
|
403
391
|
}
|
|
404
392
|
}
|
|
405
393
|
else {
|
|
406
394
|
// otherwise it is a deep value, so need to dig for it
|
|
407
|
-
const fieldPieces =
|
|
395
|
+
const fieldPieces = fieldName.split('.');
|
|
408
396
|
let currentObject = rowData;
|
|
409
397
|
while (fieldPieces.length > 0 && currentObject) {
|
|
410
398
|
const fieldPiece = fieldPieces.shift();
|
|
@@ -452,7 +440,7 @@ class AdaptableInternalApi extends ApiBase_1.ApiBase {
|
|
|
452
440
|
var _a;
|
|
453
441
|
let actionColumn;
|
|
454
442
|
if (colDef.colId == GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS) {
|
|
455
|
-
const actionButtons = this.
|
|
443
|
+
const actionButtons = this.getActionRowApi().internalApi.getActionRowButtonDefs();
|
|
456
444
|
actionColumn = {
|
|
457
445
|
columnId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
458
446
|
actionColumnButton: actionButtons,
|
|
@@ -5,7 +5,7 @@ import { AlertFormContext } from '../../AdaptableOptions/AlertOptions';
|
|
|
5
5
|
import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
|
|
6
6
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
7
7
|
import { GridDataChangedInfo } from '../Events/GridDataChanged';
|
|
8
|
-
import {
|
|
8
|
+
import { ColumnScope } from '../../PredefinedConfig/Common/ColumnScope';
|
|
9
9
|
import { AdaptablePredicateDef } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
10
10
|
import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
|
|
11
11
|
import { IRowNode } from '@ag-grid-community/core';
|
|
@@ -72,7 +72,7 @@ export declare class AlertInternalApi extends ApiBase {
|
|
|
72
72
|
* Retrieves all Predicate Defs that match given Scope
|
|
73
73
|
* @param scope the Scope to check
|
|
74
74
|
*/
|
|
75
|
-
getAlertPredicateDefsForScope(scope:
|
|
75
|
+
getAlertPredicateDefsForScope(scope: ColumnScope): AdaptablePredicateDef[];
|
|
76
76
|
/**
|
|
77
77
|
* Returns a description of an Alert Definition
|
|
78
78
|
* @param alertDefinition Alert Definition to use
|
|
@@ -84,12 +84,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
84
84
|
*/
|
|
85
85
|
publishAlertFiredEvent(alertToFire) {
|
|
86
86
|
const adaptableApi = this.getAdaptableApi();
|
|
87
|
-
const alertFiredInfo = {
|
|
88
|
-
adaptableApi: adaptableApi,
|
|
89
|
-
alert: alertToFire,
|
|
90
|
-
userName: adaptableApi.optionsApi.getUserName(),
|
|
91
|
-
adaptableId: adaptableApi.optionsApi.getAdaptableId(),
|
|
92
|
-
};
|
|
87
|
+
const alertFiredInfo = Object.assign({ alert: alertToFire }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
93
88
|
this.getEventApi().emit('AlertFired', alertFiredInfo);
|
|
94
89
|
}
|
|
95
90
|
/**
|
|
@@ -299,7 +294,7 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
299
294
|
var _a, _b, _c, _d;
|
|
300
295
|
let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
|
|
301
296
|
? (_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.map((predicate) => this.getPredicateApi().predicateToString(predicate)).join(' AND ')
|
|
302
|
-
: this.
|
|
297
|
+
: this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(alertDefinition.Rule);
|
|
303
298
|
return ruleDescription;
|
|
304
299
|
}
|
|
305
300
|
/**
|
|
@@ -476,17 +471,9 @@ class AlertInternalApi extends ApiBase_1.ApiBase {
|
|
|
476
471
|
isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
|
|
477
472
|
var _a;
|
|
478
473
|
const adapatableApi = this.getAdaptableApi();
|
|
479
|
-
const predicateDefHandlerContext = {
|
|
480
|
-
value: dataChangedEvent.newValue,
|
|
481
|
-
oldValue: dataChangedEvent.oldValue,
|
|
474
|
+
const predicateDefHandlerContext = Object.assign({ value: dataChangedEvent.newValue, oldValue: dataChangedEvent.oldValue,
|
|
482
475
|
// TODO send real display value
|
|
483
|
-
displayValue: null,
|
|
484
|
-
node: dataChangedEvent.rowNode,
|
|
485
|
-
column: dataChangedEvent.column,
|
|
486
|
-
adaptableApi: adapatableApi,
|
|
487
|
-
userName: adapatableApi.optionsApi.getUserName(),
|
|
488
|
-
adaptableId: adapatableApi.optionsApi.getAdaptableId(),
|
|
489
|
-
};
|
|
476
|
+
displayValue: null, node: dataChangedEvent.rowNode, column: dataChangedEvent.column }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
490
477
|
return this.getAdaptableApi().predicateApi.handleColumnPredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, predicateDefHandlerContext, defaultNoPredicateReturn);
|
|
491
478
|
}
|
|
492
479
|
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from '../Implementation/ApiBase';
|
|
2
2
|
import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
|
|
3
3
|
import { AdaptableColumn } from '../../types';
|
|
4
|
+
import { ColDef } from '@ag-grid-community/core';
|
|
4
5
|
export declare class CalculatedColumnInternalApi extends ApiBase {
|
|
5
6
|
/**
|
|
6
7
|
* Returns all the references in the AdaptableState of the given CalculatedColumn
|
|
@@ -27,4 +28,5 @@ export declare class CalculatedColumnInternalApi extends ApiBase {
|
|
|
27
28
|
isQuantileAggregatedExpression(input: string): boolean;
|
|
28
29
|
getExpressionFromCalculatedColumn(calculatedColumn: CalculatedColumn): string;
|
|
29
30
|
fireCalculatedColumnChangedEvent(trigger: string, calculatedColumn: CalculatedColumn): void;
|
|
31
|
+
getColDefsForCalculatedColumns(): ColDef[];
|
|
30
32
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculatedColumnInternalApi = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const ApiBase_1 = require("../Implementation/ApiBase");
|
|
6
|
+
const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
|
|
7
|
+
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
|
+
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
9
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
5
10
|
class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
6
11
|
/**
|
|
7
12
|
* Returns all the references in the AdaptableState of the given CalculatedColumn
|
|
@@ -27,7 +32,7 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
27
32
|
this.getCalculatedColumnApi()
|
|
28
33
|
.getCalculatedColumns()
|
|
29
34
|
.forEach((calculatedColumn) => {
|
|
30
|
-
if (this.getExpressionApi().internalApi.isColumnReferencedInExpression(columnId, this.
|
|
35
|
+
if (this.getExpressionApi().internalApi.isColumnReferencedInExpression(columnId, this.getAdaptableApi().expressionApi.getAdaptableQueryExpression(calculatedColumn.Query))) {
|
|
31
36
|
calcColumns.push(calculatedColumn);
|
|
32
37
|
}
|
|
33
38
|
});
|
|
@@ -38,7 +43,7 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
38
43
|
* @param calculatedColumn Calculated Column to check
|
|
39
44
|
*/
|
|
40
45
|
getReferencedColumnIdsForCalculatedColumn(calculatedColumn) {
|
|
41
|
-
const columnIds = this.
|
|
46
|
+
const columnIds = this.getAdaptableApi().expressionApi.getColumnsFromExpression(this.getAdaptableApi().expressionApi.getAdaptableQueryExpression(calculatedColumn.Query));
|
|
42
47
|
return columnIds;
|
|
43
48
|
}
|
|
44
49
|
/**
|
|
@@ -46,15 +51,15 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
46
51
|
* @param calculatedColumnId CalculatedColumnId to check
|
|
47
52
|
*/
|
|
48
53
|
getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId) {
|
|
49
|
-
const calculatedColumn = this.
|
|
50
|
-
.getCalculatedColumns()
|
|
54
|
+
const calculatedColumn = this.getAdaptableApi()
|
|
55
|
+
.calculatedColumnApi.getCalculatedColumns()
|
|
51
56
|
.find((cc) => cc.ColumnId == calculatedColumnId);
|
|
52
57
|
if (calculatedColumn) {
|
|
53
58
|
return this.getReferencedColumnIdsForCalculatedColumn(calculatedColumn);
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
getCalculatedColumnsDependentOnColumn(column) {
|
|
57
|
-
const calculatedColumns = this.
|
|
62
|
+
const calculatedColumns = this.getAdaptableApi().calculatedColumnApi.getCalculatedColumns();
|
|
58
63
|
return calculatedColumns
|
|
59
64
|
.filter((calculatedColumn) => {
|
|
60
65
|
const dependentColumns = this.getReferencedColumnIdsForCalculatedColumnId(calculatedColumn.ColumnId);
|
|
@@ -80,15 +85,75 @@ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
|
|
|
80
85
|
}
|
|
81
86
|
fireCalculatedColumnChangedEvent(trigger, calculatedColumn) {
|
|
82
87
|
const adaptableApi = this.getAdaptableApi();
|
|
83
|
-
const calculatedColumnChangedInfo = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
const calculatedColumnChangedInfo = Object.assign({ actionName: trigger, calculatedColumn: calculatedColumn, calculatedColumnExpressionAST: adaptableApi.expressionApi.getASTForExpression(this.getExpressionFromCalculatedColumn(calculatedColumn)) }, this.getAdaptableApi().internalApi.buildBaseContext());
|
|
89
|
+
this.getAdaptableApi().eventApi.emit('CalculatedColumnChanged', calculatedColumnChangedInfo);
|
|
90
|
+
}
|
|
91
|
+
getColDefsForCalculatedColumns() {
|
|
92
|
+
const defaultSpecialColumnSettings = this.getGridApi().internalApi.deriveSpecialColumnSettingsFromAgGridDefaultColDef();
|
|
93
|
+
const defaultCalculatedColumnSettings = (0, ObjectFactory_1.CreateEmptyCalculatedColumn)(defaultSpecialColumnSettings).CalculatedColumnSettings;
|
|
94
|
+
return this.getCalculatedColumnApi()
|
|
95
|
+
.getCalculatedColumns()
|
|
96
|
+
.map((calculatedColumn) => {
|
|
97
|
+
const calculatedColumnSettings = Object.assign(Object.assign({}, defaultCalculatedColumnSettings), calculatedColumn.CalculatedColumnSettings);
|
|
98
|
+
if (!calculatedColumnSettings.DataType) {
|
|
99
|
+
calculatedColumnSettings.DataType = this.getAdaptableApi()
|
|
100
|
+
.internalApi.getAdaptableInstance()
|
|
101
|
+
.CalculatedColumnExpressionService.getCalculatedColumnDataType(calculatedColumn.Query);
|
|
102
|
+
}
|
|
103
|
+
const columnTypes = [
|
|
104
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
105
|
+
this.getGridApi().internalApi.getAgGridDataType(calculatedColumnSettings.DataType),
|
|
106
|
+
];
|
|
107
|
+
if (ArrayExtensions_1.default.IsNotNullOrEmpty(calculatedColumnSettings.ColumnTypes)) {
|
|
108
|
+
columnTypes.push(...calculatedColumnSettings.ColumnTypes);
|
|
109
|
+
}
|
|
110
|
+
const isExternalEvaluation = !this.getExpressionApi().internalApi.evaluateExpressionInAdaptableQL('CalculatedColumn', calculatedColumn, this.getExpressionApi().getAdaptableQueryExpression(calculatedColumn.Query));
|
|
111
|
+
const valueGetter = (params) => {
|
|
112
|
+
var _a, _b;
|
|
113
|
+
if (isExternalEvaluation) {
|
|
114
|
+
return (_a = params.data) === null || _a === void 0 ? void 0 : _a[calculatedColumn.ColumnId];
|
|
115
|
+
}
|
|
116
|
+
// if the grid data is NOT client side, we can aggregate only simple scalar expression (which depend on row data, not on other rows)
|
|
117
|
+
if (this.getGridApi().getAgGridRowModelType() !== 'clientSide' &&
|
|
118
|
+
StringExtensions_1.default.IsNotNullOrEmpty(calculatedColumn.Query.AggregatedScalarExpression)) {
|
|
119
|
+
return (_b = params.data) === null || _b === void 0 ? void 0 : _b[calculatedColumn.ColumnId];
|
|
120
|
+
}
|
|
121
|
+
return this.getAdaptableApi()
|
|
122
|
+
.internalApi.getAdaptableInstance()
|
|
123
|
+
.CalculatedColumnExpressionService.evaluateCalculatedColumnQuery(calculatedColumn, params.node);
|
|
124
|
+
};
|
|
125
|
+
const newColDef = {
|
|
126
|
+
headerName: calculatedColumn.FriendlyName
|
|
127
|
+
? calculatedColumn.FriendlyName
|
|
128
|
+
: calculatedColumn.ColumnId,
|
|
129
|
+
colId: calculatedColumn.ColumnId,
|
|
130
|
+
hide: false,
|
|
131
|
+
editable: false,
|
|
132
|
+
width: calculatedColumnSettings.Width,
|
|
133
|
+
enableValue: calculatedColumnSettings.Aggregatable,
|
|
134
|
+
filter: calculatedColumnSettings.Filterable,
|
|
135
|
+
floatingFilter: calculatedColumnSettings.Filterable,
|
|
136
|
+
resizable: calculatedColumnSettings.Resizable,
|
|
137
|
+
enableRowGroup: calculatedColumnSettings.Groupable,
|
|
138
|
+
sortable: calculatedColumnSettings.Sortable,
|
|
139
|
+
enablePivot: calculatedColumnSettings.Pivotable,
|
|
140
|
+
suppressHeaderMenuButton: calculatedColumnSettings.SuppressMenu,
|
|
141
|
+
suppressMovable: calculatedColumnSettings.SuppressMovable,
|
|
142
|
+
type: columnTypes,
|
|
143
|
+
valueGetter,
|
|
144
|
+
};
|
|
145
|
+
if (calculatedColumnSettings.ShowToolTip != null &&
|
|
146
|
+
calculatedColumnSettings.ShowToolTip == true) {
|
|
147
|
+
newColDef.tooltipValueGetter = () => {
|
|
148
|
+
return this.getAdaptableApi().internalApi.getAdaptableQueryExpressionText(calculatedColumn.Query);
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
if (calculatedColumnSettings.HeaderToolTip) {
|
|
152
|
+
newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
|
|
153
|
+
}
|
|
154
|
+
this.getAdaptableApi().logInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
|
|
155
|
+
return newColDef;
|
|
156
|
+
});
|
|
92
157
|
}
|
|
93
158
|
}
|
|
94
159
|
exports.CalculatedColumnInternalApi = CalculatedColumnInternalApi;
|