@adaptabletools/adaptable 22.0.0-canary.0 → 22.0.0-canary.10
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/README.md +4 -6
- package/agGrid.d.ts +9 -9
- package/agGrid.js +1 -0
- package/index.css +1280 -1400
- package/index.css.map +1 -1
- package/index.d.ts +66 -0
- package/index.js +73 -0
- package/package.json +3 -3
- package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -1
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableOptions/CustomSortOptions.d.ts +4 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/AlertState.d.ts +5 -2
- package/src/AdaptableState/ChartingState.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +16 -10
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +20 -2
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +17 -0
- package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
- package/src/AdaptableState/Common/NamedObject.js +1 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +8 -5
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/Common/TransposeConfig.d.ts +12 -10
- package/src/AdaptableState/CustomSortState.d.ts +5 -1
- package/src/AdaptableState/DashboardState.d.ts +1 -1
- package/src/AdaptableState/ExportState.d.ts +1 -1
- package/src/AdaptableState/FlashingCellState.d.ts +6 -2
- package/src/AdaptableState/FormatColumnState.d.ts +5 -9
- package/src/AdaptableState/InitialState.d.ts +10 -1
- package/src/AdaptableState/InternalState.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +7 -3
- package/src/AdaptableState/NamedQueryState.d.ts +1 -1
- package/src/AdaptableState/PlusMinusState.d.ts +5 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/AdaptableState/ShortcutState.d.ts +5 -1
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +1 -1
- package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
- package/src/AdaptableState/UserInterfaceState.js +1 -0
- package/src/Api/AlertApi.d.ts +6 -0
- package/src/Api/CustomSortApi.d.ts +12 -3
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +6 -0
- package/src/Api/FormatColumnApi.d.ts +10 -4
- package/src/Api/GridApi.d.ts +29 -4
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +6 -6
- package/src/Api/Implementation/ApiBase.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.js +2 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +6 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +6 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +6 -2
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +10 -1
- package/src/Api/Implementation/GridApiImpl.js +36 -5
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +5 -1
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -2
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +4 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +8 -9
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +15 -1
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +1 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
- package/src/Api/LayoutApi.d.ts +6 -0
- package/src/Api/PlusMinusApi.d.ts +6 -0
- package/src/Api/ScheduleApi.d.ts +6 -0
- package/src/Api/ShortcutApi.d.ts +6 -0
- package/src/Api/UserInterfaceApi.d.ts +17 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +36 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +121 -64
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +5 -0
- package/src/Strategy/BulkUpdateModule.js +8 -8
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +6 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +6 -5
- package/src/Strategy/PlusMinusModule.js +7 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ScheduleModule.js +5 -0
- package/src/Strategy/SettingsPanelModule.js +11 -7
- package/src/Strategy/ShortcutModule.js +6 -0
- package/src/Strategy/SmartEditModule.js +10 -10
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +18 -17
- package/src/Utilities/Constants/DocumentationLinkConstants.js +18 -17
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +16 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +4 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +11 -3
- package/src/Utilities/Services/Fdc3Service.js +9 -7
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +39 -41
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +13 -15
- package/src/Utilities/Services/ValidationService.js +2 -1
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/Utilities/logDeprecation.js +3 -4
- package/src/Utilities/resolveContainerElement.d.ts +23 -0
- package/src/Utilities/resolveContainerElement.js +44 -0
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
- package/src/View/Alert/Wizard/AlertWizard.js +14 -10
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +36 -1
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +94 -24
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +41 -15
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
- package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +144 -138
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +35 -12
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +19 -10
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/StateManagement/handleExportState.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/View/UIHelper.d.ts +4 -1
- package/src/View/UIHelper.js +23 -14
- package/src/agGrid/Adaptable.js +15 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +16 -3
- package/src/agGrid/AdaptableAgGrid.js +306 -103
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +19 -9
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
- package/src/agGrid/AgGridColumnAdapter.js +20 -22
- package/src/agGrid/AgGridExportAdapter.js +15 -14
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +4 -1
- package/src/agGrid/AgGridMenuAdapter.js +10 -1
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +4 -2
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +5 -4
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +79 -16
- package/src/components/Tree/TreeDropdown/index.js +2 -2
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +81 -58
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +177 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +8 -3
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +5 -6
- package/src/migration/VersionUpgrade20.js +4 -4
- package/src/migration/VersionUpgrade22.d.ts +21 -0
- package/src/migration/VersionUpgrade22.js +187 -0
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/src/types.d.ts +9 -7
- package/themes/dark.css +30 -30
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -28
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -8
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -7
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -7
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -77
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -14
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -9
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -11
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -105
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -48
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -23
- /package/src/{View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts → AdaptableState/Common/AdaptableRowContext.js} +0 -0
- /package/src/{View/Components/SharedProps/WizardScopeState.js → AdaptableState/Common/ColumnHighlightInfo.js} +0 -0
|
@@ -6,6 +6,7 @@ import { PrimaryKeyDocsLink } from '../Utilities/Constants/DocumentationLinkCons
|
|
|
6
6
|
import StringExtensions from '../Utilities/Extensions/StringExtensions';
|
|
7
7
|
import Emitter from '../Utilities/Emitter';
|
|
8
8
|
import { applyDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
9
|
+
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
9
10
|
import { AgGridAdapter } from './AgGridAdapter';
|
|
10
11
|
import * as GeneralConstants from '../Utilities/Constants/GeneralConstants';
|
|
11
12
|
import { AG_GRID_GRAND_TOTAL_ROW_ID, AG_GRID_GROUPED_COLUMN, AUTOGENERATED_PK_COLUMN, ERROR_LAYOUT, GROUP_PATH_SEPARATOR, HALF_SECOND, QUARTER_SECOND, } from '../Utilities/Constants/GeneralConstants';
|
|
@@ -155,38 +156,79 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
|
155
156
|
const adaptableInstances = {};
|
|
156
157
|
const publishTimestamp = Number(ADAPTABLE_PUBLISH_TIMESTAMP);
|
|
157
158
|
export class AdaptableAgGrid {
|
|
159
|
+
logger;
|
|
160
|
+
_id;
|
|
161
|
+
lifecycleState;
|
|
162
|
+
variant;
|
|
163
|
+
emitter;
|
|
164
|
+
/**
|
|
165
|
+
* Runtime flags
|
|
166
|
+
*/
|
|
167
|
+
hasAutogeneratedPrimaryKey;
|
|
168
|
+
hasAdaptableToolPanel;
|
|
169
|
+
initWithLazyData;
|
|
170
|
+
_rawAdaptableOptions;
|
|
171
|
+
adaptableOptions;
|
|
172
|
+
_isDetailGrid;
|
|
173
|
+
_isDetailGridForIndex;
|
|
174
|
+
agGridOptionsService;
|
|
175
|
+
agGridAdapter;
|
|
176
|
+
agGridColumnAdapter;
|
|
177
|
+
agGridMenuAdapter;
|
|
178
|
+
agGridExportAdapter;
|
|
179
|
+
agGridThemeAdapter;
|
|
180
|
+
agGridModulesAdapter;
|
|
181
|
+
DANGER_USE_GETTER_adaptableContainerElement;
|
|
182
|
+
DANGER_USE_GETTER_agGridContainerElement;
|
|
183
|
+
api;
|
|
184
|
+
adaptableStore;
|
|
185
|
+
adaptableModules;
|
|
186
|
+
DataService;
|
|
187
|
+
CalculatedColumnExpressionService;
|
|
188
|
+
ModuleService;
|
|
189
|
+
ValidationService;
|
|
190
|
+
QueryLanguageService;
|
|
191
|
+
AlertService;
|
|
192
|
+
TeamSharingService;
|
|
193
|
+
MetamodelService;
|
|
194
|
+
RowFormService;
|
|
195
|
+
Fdc3Service;
|
|
196
|
+
AnnotationsService;
|
|
197
|
+
FlashingCellService;
|
|
198
|
+
LicenseService;
|
|
199
|
+
ChartingService;
|
|
200
|
+
ThemeService;
|
|
201
|
+
rowListeners;
|
|
202
|
+
throttleFilterOnDataChange;
|
|
203
|
+
debouncedSetSelectedRows;
|
|
204
|
+
debouncedSetSelectedCells;
|
|
205
|
+
agGridListenerKeydown;
|
|
206
|
+
agGridListenerMouseEnter;
|
|
207
|
+
agGridListenerMouseLeave;
|
|
208
|
+
listenerGlobalSetRowSelection;
|
|
209
|
+
listenerGlobalChartingChanges;
|
|
210
|
+
listenerCellEditingStarted;
|
|
211
|
+
listenerFirstDataRendered;
|
|
212
|
+
listenerPivotChanged;
|
|
213
|
+
listenerCellSelectionChanged;
|
|
214
|
+
listenerSortChanged;
|
|
215
|
+
listenerColumnGroupOpened;
|
|
216
|
+
layoutManager;
|
|
217
|
+
columnMinMaxValuesCache = {};
|
|
218
|
+
renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
219
|
+
unmountReactRoot;
|
|
220
|
+
unmountLoadingScreen;
|
|
221
|
+
/**
|
|
222
|
+
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
223
|
+
*/
|
|
224
|
+
adaptableStatusPanelKeys = [];
|
|
225
|
+
adaptableStatusPanelDefs = [];
|
|
226
|
+
hasAdaptableStatusBar;
|
|
227
|
+
// see #no_additional_react_root
|
|
228
|
+
_PRIVATE_adaptableJSXElement;
|
|
229
|
+
_prevLayout;
|
|
230
|
+
__prevLayoutForRefresh;
|
|
158
231
|
constructor(config) {
|
|
159
|
-
this.columnMinMaxValuesCache = {};
|
|
160
|
-
this.renderReactRoot = (node, container) => defaultRenderReactRoot(node, container);
|
|
161
|
-
/**
|
|
162
|
-
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
163
|
-
*/
|
|
164
|
-
this.adaptableStatusPanelKeys = [];
|
|
165
|
-
// only for our private / internal events used within Adaptable
|
|
166
|
-
// public events are emitted through the EventApi
|
|
167
|
-
this._emit = (eventName, data) => {
|
|
168
|
-
if (this.emitter) {
|
|
169
|
-
return this.emitter.emit(eventName, data);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
this._emitSync = (eventName, data) => {
|
|
173
|
-
if (this.emitter) {
|
|
174
|
-
return this.emitter.emitSync(eventName, data);
|
|
175
|
-
}
|
|
176
|
-
};
|
|
177
|
-
this._on = (eventName, callback) => {
|
|
178
|
-
if (!this.emitter) {
|
|
179
|
-
return () => { };
|
|
180
|
-
}
|
|
181
|
-
return this.emitter.on(eventName, callback);
|
|
182
|
-
};
|
|
183
|
-
this._onIncludeFired = (eventName, callback) => {
|
|
184
|
-
if (!this.emitter) {
|
|
185
|
-
return () => { };
|
|
186
|
-
}
|
|
187
|
-
return this.emitter.onIncludeFired(eventName, callback);
|
|
188
|
-
};
|
|
189
|
-
this.__updateColumnModelAndRefreshGrid_already_called = false;
|
|
190
232
|
this.lifecycleState = 'initial';
|
|
191
233
|
this.emitter = new Emitter();
|
|
192
234
|
this.agGridOptionsService = new AgGridOptionsService(this);
|
|
@@ -222,6 +264,30 @@ export class AdaptableAgGrid {
|
|
|
222
264
|
get isDestroyed() {
|
|
223
265
|
return this.lifecycleState === 'preDestroyed';
|
|
224
266
|
}
|
|
267
|
+
// only for our private / internal events used within Adaptable
|
|
268
|
+
// public events are emitted through the EventApi
|
|
269
|
+
_emit = (eventName, data) => {
|
|
270
|
+
if (this.emitter) {
|
|
271
|
+
return this.emitter.emit(eventName, data);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
_emitSync = (eventName, data) => {
|
|
275
|
+
if (this.emitter) {
|
|
276
|
+
return this.emitter.emitSync(eventName, data);
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
_on = (eventName, callback) => {
|
|
280
|
+
if (!this.emitter) {
|
|
281
|
+
return () => { };
|
|
282
|
+
}
|
|
283
|
+
return this.emitter.on(eventName, callback);
|
|
284
|
+
};
|
|
285
|
+
_onIncludeFired = (eventName, callback) => {
|
|
286
|
+
if (!this.emitter) {
|
|
287
|
+
return () => { };
|
|
288
|
+
}
|
|
289
|
+
return this.emitter.onIncludeFired(eventName, callback);
|
|
290
|
+
};
|
|
225
291
|
/**
|
|
226
292
|
* Internal initializer for Adaptable, directly called by the React and Angular Adaptable wrappers
|
|
227
293
|
* @private
|
|
@@ -296,7 +362,7 @@ export class AdaptableAgGrid {
|
|
|
296
362
|
this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
|
|
297
363
|
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
|
|
298
364
|
if (showLoadingScreen) {
|
|
299
|
-
this.logger.info(
|
|
365
|
+
this.logger.info('Showing loading screen');
|
|
300
366
|
// it's important to use ensureLoadingScreenPortalElement
|
|
301
367
|
// and not ensurePortalElement, because multiple adaptable instances share the same portal element
|
|
302
368
|
// so when displaying the second one, the react root associated to the portal element
|
|
@@ -312,7 +378,7 @@ export class AdaptableAgGrid {
|
|
|
312
378
|
}), portalElement);
|
|
313
379
|
}
|
|
314
380
|
else {
|
|
315
|
-
this.logger.consoleError(
|
|
381
|
+
this.logger.consoleError('Failed to create loading screen portal element.');
|
|
316
382
|
}
|
|
317
383
|
}
|
|
318
384
|
this.forPlugins((plugin) => plugin.afterInitOptions(this, this.adaptableOptions));
|
|
@@ -371,7 +437,7 @@ export class AdaptableAgGrid {
|
|
|
371
437
|
// see #map_dateString_to_date
|
|
372
438
|
this.agGridAdapter.patchColDefs(columnDefs, (colDef) => {
|
|
373
439
|
if (colDef.cellDataType === 'dateString') {
|
|
374
|
-
this.logger.consoleError(`
|
|
440
|
+
this.logger.consoleError(`Column "${colDef.colId}" uses cellDataType="dateString" which is no longer supported. It has been replaced with cellDataType="date". Please update your column definition.`);
|
|
375
441
|
colDef.cellDataType = 'date';
|
|
376
442
|
}
|
|
377
443
|
});
|
|
@@ -402,8 +468,8 @@ export class AdaptableAgGrid {
|
|
|
402
468
|
const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
|
|
403
469
|
if (agGridApi === false) {
|
|
404
470
|
this.midwayDestroy();
|
|
405
|
-
this.logger.consoleError(
|
|
406
|
-
return Promise.reject('
|
|
471
|
+
this.logger.consoleError('Failed to initialize AG Grid.');
|
|
472
|
+
return Promise.reject('Failed to initialize AG Grid.');
|
|
407
473
|
}
|
|
408
474
|
this.layoutManager = new LayoutManager({
|
|
409
475
|
gridApi: agGridApi,
|
|
@@ -428,7 +494,7 @@ export class AdaptableAgGrid {
|
|
|
428
494
|
this.layoutManager.onColumnDefsChanged(() => {
|
|
429
495
|
this.updateColumnModelAndRefreshGrid();
|
|
430
496
|
});
|
|
431
|
-
this.logger.info(
|
|
497
|
+
this.logger.info('Hiding loading screen');
|
|
432
498
|
this.unmountLoadingScreen?.();
|
|
433
499
|
perfInitAgGrid.end();
|
|
434
500
|
initAgGridMarker.end();
|
|
@@ -439,7 +505,7 @@ export class AdaptableAgGrid {
|
|
|
439
505
|
this.lifecycleState = 'agGridReady';
|
|
440
506
|
this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
|
|
441
507
|
this.ModuleService.logMissingAgGridDepsInfos();
|
|
442
|
-
this.logger.info(
|
|
508
|
+
this.logger.info('Registered AG Grid modules (including dependents):', this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
|
|
443
509
|
/**
|
|
444
510
|
* At this point AG Grid is initialized!
|
|
445
511
|
*/
|
|
@@ -529,10 +595,7 @@ export class AdaptableAgGrid {
|
|
|
529
595
|
const layoutState = state.Layout;
|
|
530
596
|
// ensure that at least one Layout has been provided
|
|
531
597
|
if (!layoutState || !layoutState.Layouts?.length) {
|
|
532
|
-
this.logger
|
|
533
|
-
.consoleError(`You have not defined any Layout in your InitialState.Layout.Layouts[] state!
|
|
534
|
-
|
|
535
|
-
You need to define at least one Layout!`);
|
|
598
|
+
this.logger.consoleError('No Layouts defined in InitialState.Layout.Layouts[]. At least one Layout is required.');
|
|
536
599
|
}
|
|
537
600
|
// ensure CurrentLayout is valid
|
|
538
601
|
if (!layoutState.CurrentLayout ||
|
|
@@ -654,11 +717,8 @@ You need to define at least one Layout!`);
|
|
|
654
717
|
// FIXME AFL FILTER why is this needed???
|
|
655
718
|
this.refreshSelectedCellsState();
|
|
656
719
|
this.refreshSelectedRowsState();
|
|
657
|
-
// FIXME AFL: this is temporary, will be replaced with v22's new autoCol filtering
|
|
658
|
-
const currentPivotLayoutHasAutoCols = this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
659
|
-
!!this.api.layoutApi.getCurrentRowGroupsColumnIds()?.length;
|
|
660
720
|
// agGridApi.setFilterModel() already triggered onFilterChanged(), so we skip it if updateColumnFilterModel is TRUE
|
|
661
|
-
if (!filteringApplied
|
|
721
|
+
if (!filteringApplied) {
|
|
662
722
|
agGridApi.onFilterChanged();
|
|
663
723
|
filteringApplied = true;
|
|
664
724
|
}
|
|
@@ -698,21 +758,90 @@ You need to define at least one Layout!`);
|
|
|
698
758
|
hideQuickFilter() {
|
|
699
759
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', 0);
|
|
700
760
|
}
|
|
761
|
+
showAdaptableToolPanel() {
|
|
762
|
+
if (!this.hasAdaptableToolPanel) {
|
|
763
|
+
// don't re-add the ToolPanel if it's hidden by entitlement
|
|
764
|
+
if (this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel')) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
768
|
+
if (currentSideBar?.toolPanels) {
|
|
769
|
+
const updatedSideBar = {
|
|
770
|
+
...currentSideBar,
|
|
771
|
+
toolPanels: [...currentSideBar.toolPanels, this.buildAdaptableToolPanelDef()],
|
|
772
|
+
};
|
|
773
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
774
|
+
this.hasAdaptableToolPanel = true;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
hideAdaptableToolPanel() {
|
|
779
|
+
if (this.hasAdaptableToolPanel) {
|
|
780
|
+
// close the tool panel if it's currently open
|
|
781
|
+
this.api.toolPanelApi.closeAdapTableToolPanel();
|
|
782
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
783
|
+
if (currentSideBar?.toolPanels) {
|
|
784
|
+
const updatedSideBar = {
|
|
785
|
+
...currentSideBar,
|
|
786
|
+
toolPanels: currentSideBar.toolPanels.filter((toolPanelDef) => {
|
|
787
|
+
if (typeof toolPanelDef === 'string') {
|
|
788
|
+
return toolPanelDef !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
789
|
+
}
|
|
790
|
+
return toolPanelDef.id !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
791
|
+
}),
|
|
792
|
+
};
|
|
793
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
794
|
+
}
|
|
795
|
+
this.hasAdaptableToolPanel = false;
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
buildAdaptableToolPanelDef() {
|
|
799
|
+
return {
|
|
800
|
+
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
801
|
+
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
802
|
+
labelDefault: GeneralConstants.ADAPTABLE,
|
|
803
|
+
labelKey: 'adaptable',
|
|
804
|
+
iconKey: 'menu',
|
|
805
|
+
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
806
|
+
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
showAdaptableStatusBar() {
|
|
810
|
+
if (!this.hasAdaptableStatusBar && this.adaptableStatusPanelDefs.length > 0) {
|
|
811
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
812
|
+
if (currentStatusBar) {
|
|
813
|
+
// filter out any Adaptable panels that may already exist to avoid duplicates
|
|
814
|
+
const existingNonAdaptablePanels = (currentStatusBar.statusPanels ?? []).filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key));
|
|
815
|
+
const updatedStatusBar = {
|
|
816
|
+
...currentStatusBar,
|
|
817
|
+
statusPanels: [...existingNonAdaptablePanels, ...this.adaptableStatusPanelDefs],
|
|
818
|
+
};
|
|
819
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
820
|
+
this.hasAdaptableStatusBar = true;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
hideAdaptableStatusBar() {
|
|
825
|
+
if (this.hasAdaptableStatusBar) {
|
|
826
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
827
|
+
if (currentStatusBar?.statusPanels) {
|
|
828
|
+
const updatedStatusBar = {
|
|
829
|
+
...currentStatusBar,
|
|
830
|
+
statusPanels: currentStatusBar.statusPanels.filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key)),
|
|
831
|
+
};
|
|
832
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
833
|
+
}
|
|
834
|
+
this.hasAdaptableStatusBar = false;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
701
837
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
702
838
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
703
|
-
this.logger
|
|
704
|
-
.warn(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
705
|
-
when no unique column is available, as it limits some Adaptable functionalities!
|
|
706
|
-
|
|
707
|
-
For more details see: ${PrimaryKeyDocsLink}`);
|
|
839
|
+
this.logger.warn(`Autogenerated primary key is enabled (adaptableOptions.autogeneratedPrimaryKey = true). This should be a last resort as it limits some Adaptable features. See: ${PrimaryKeyDocsLink}`);
|
|
708
840
|
this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
|
|
709
841
|
return this.adaptableOptions;
|
|
710
842
|
}
|
|
711
843
|
if (StringExtensions.IsNullOrEmpty(adaptableOptions.primaryKey)) {
|
|
712
|
-
this.logger.consoleError(`
|
|
713
|
-
As a fallback, you can set adaptableOptions.autogeneratedPrimaryKey = TRUE
|
|
714
|
-
|
|
715
|
-
For more details see: ${PrimaryKeyDocsLink}`);
|
|
844
|
+
this.logger.consoleError(`adaptableOptions.primaryKey is required and must not be empty. As a fallback, set adaptableOptions.autogeneratedPrimaryKey = true. See: ${PrimaryKeyDocsLink}`);
|
|
716
845
|
}
|
|
717
846
|
return adaptableOptions;
|
|
718
847
|
}
|
|
@@ -744,7 +873,7 @@ You need to define at least one Layout!`);
|
|
|
744
873
|
*/
|
|
745
874
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
|
|
746
875
|
if (original_defaultColDef?.headerValueGetter) {
|
|
747
|
-
this.logger.warn(
|
|
876
|
+
this.logger.warn('defaultColDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.columnHeader instead.');
|
|
748
877
|
return original_defaultColDef;
|
|
749
878
|
}
|
|
750
879
|
// #customize_header
|
|
@@ -761,7 +890,7 @@ You need to define at least one Layout!`);
|
|
|
761
890
|
*/
|
|
762
891
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColGroupDef', (original_defaultColGroupDef) => {
|
|
763
892
|
if (original_defaultColGroupDef?.headerValueGetter) {
|
|
764
|
-
this.logger.warn(
|
|
893
|
+
this.logger.warn('defaultColGroupDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.tableColumnHeader instead.');
|
|
765
894
|
return original_defaultColGroupDef;
|
|
766
895
|
}
|
|
767
896
|
const defaultColGroupDef = { ...original_defaultColGroupDef };
|
|
@@ -781,11 +910,11 @@ You need to define at least one Layout!`);
|
|
|
781
910
|
}
|
|
782
911
|
if (original_autoGroupColumnDef?.filter === false) {
|
|
783
912
|
// if user disables filter on autoGroupColumnDef, we respect that
|
|
784
|
-
this.logger.info(
|
|
913
|
+
this.logger.info('autoGroupColumnDef.filter is disabled via user configuration.');
|
|
785
914
|
return original_autoGroupColumnDef;
|
|
786
915
|
}
|
|
787
916
|
if (typeof original_autoGroupColumnDef?.filter === 'object') {
|
|
788
|
-
this.logger.
|
|
917
|
+
this.logger.consoleWarn('autoGroupColumnDef.filter overrides the Adaptable filtering mechanism for the Group Column. Adaptable-managed filters will not apply to this column. Contact support for alternatives.');
|
|
789
918
|
return original_autoGroupColumnDef;
|
|
790
919
|
}
|
|
791
920
|
const autoGroupColumnDef = { ...original_autoGroupColumnDef };
|
|
@@ -793,7 +922,7 @@ You need to define at least one Layout!`);
|
|
|
793
922
|
// !! DO NOT REMOVE THIS !!
|
|
794
923
|
// see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
|
|
795
924
|
autoGroupColumnDef.filterValueGetter = (params) => {
|
|
796
|
-
this.logger.
|
|
925
|
+
this.logger.consoleWarn('Unexpected invocation of autoGroupColumnDef.filterValueGetter. This is not expected under normal operation. Please contact support.', params);
|
|
797
926
|
return '';
|
|
798
927
|
};
|
|
799
928
|
// !! it is important that we always return the same component / handler instances
|
|
@@ -1107,16 +1236,7 @@ You need to define at least one Layout!`);
|
|
|
1107
1236
|
return original_sideBar;
|
|
1108
1237
|
}
|
|
1109
1238
|
const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
|
|
1110
|
-
const adaptableToolPanelDef =
|
|
1111
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
1112
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
1113
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
1114
|
-
labelKey: 'adaptable',
|
|
1115
|
-
iconKey: 'menu',
|
|
1116
|
-
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
1117
|
-
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
1118
|
-
// maxWidth = undefined,
|
|
1119
|
-
};
|
|
1239
|
+
const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
|
|
1120
1240
|
const mapToolPanelDefs = (toolPanelDefs = []) => {
|
|
1121
1241
|
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
1122
1242
|
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
@@ -1191,19 +1311,29 @@ You need to define at least one Layout!`);
|
|
|
1191
1311
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
1192
1312
|
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
1193
1313
|
if (statusPanel.statusPanel === ADAPTABLE_STATUS_PANEL) {
|
|
1314
|
+
if (!statusPanel.key) {
|
|
1315
|
+
this.logger.consoleWarn('AdaptableStatusPanel is missing a "key" property. This panel will not be managed by HideAdaptableUI. Please provide a unique key.');
|
|
1316
|
+
return statusPanel;
|
|
1317
|
+
}
|
|
1194
1318
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
1195
1319
|
const context = {
|
|
1196
1320
|
Key: statusPanel.key,
|
|
1197
1321
|
};
|
|
1198
|
-
|
|
1322
|
+
const adaptablePanelDef = {
|
|
1199
1323
|
...statusPanel,
|
|
1200
1324
|
statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
|
|
1201
1325
|
};
|
|
1326
|
+
this.adaptableStatusPanelDefs.push(adaptablePanelDef);
|
|
1327
|
+
return adaptablePanelDef;
|
|
1202
1328
|
}
|
|
1203
1329
|
return statusPanel;
|
|
1204
1330
|
});
|
|
1205
1331
|
return { ...original_statusBar, statusPanels };
|
|
1206
1332
|
});
|
|
1333
|
+
this.hasAdaptableStatusBar = this.adaptableStatusPanelKeys.length > 0;
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
this.hasAdaptableStatusBar = false;
|
|
1207
1337
|
}
|
|
1208
1338
|
/**
|
|
1209
1339
|
* `getRowStyle`
|
|
@@ -1363,15 +1493,14 @@ You need to define at least one Layout!`);
|
|
|
1363
1493
|
const rowData = agGridApi.getGridOption('rowData');
|
|
1364
1494
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
1365
1495
|
if (this.initWithLazyData) {
|
|
1366
|
-
this.logger.info('
|
|
1496
|
+
this.logger.info('Initializing with lazy data (no initial rowData).');
|
|
1367
1497
|
}
|
|
1368
1498
|
if (!this.getAgGridContainerElement()) {
|
|
1369
1499
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
1370
1500
|
const gridRoot = this.agGridAdapter.getAgGridRootElement();
|
|
1371
1501
|
const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
|
|
1372
1502
|
if (!gridContainer) {
|
|
1373
|
-
this.logger.consoleError(
|
|
1374
|
-
Please contact AdapTable Support and in the meantime provide a valid container element in 'ContainerOptions.agGridContainer'!`);
|
|
1503
|
+
this.logger.consoleError('Failed to derive AG Grid container from the framework wrapper. Please provide a valid container element via ContainerOptions.agGridContainer.');
|
|
1375
1504
|
}
|
|
1376
1505
|
this.DANGER_USE_GETTER_agGridContainerElement = gridContainer;
|
|
1377
1506
|
}
|
|
@@ -1379,7 +1508,7 @@ You need to define at least one Layout!`);
|
|
|
1379
1508
|
}
|
|
1380
1509
|
const agGridContainer = this.getAgGridContainerElement();
|
|
1381
1510
|
if (!agGridContainer) {
|
|
1382
|
-
this.logger.consoleError('
|
|
1511
|
+
this.logger.consoleError('AG Grid container element not found in the DOM. Please provide a valid element via ContainerOptions.agGridContainer.');
|
|
1383
1512
|
return Promise.resolve(false);
|
|
1384
1513
|
}
|
|
1385
1514
|
let gridParams;
|
|
@@ -1392,21 +1521,22 @@ You need to define at least one Layout!`);
|
|
|
1392
1521
|
useRowNodeLookUp() {
|
|
1393
1522
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1394
1523
|
}
|
|
1524
|
+
buildInitContainerContext() {
|
|
1525
|
+
return {
|
|
1526
|
+
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
1527
|
+
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
1528
|
+
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1395
1531
|
getAgGridContainerElement() {
|
|
1396
1532
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1397
|
-
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1398
|
-
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1399
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1400
|
-
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1533
|
+
this.DANGER_USE_GETTER_agGridContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.agGridContainer, this.buildInitContainerContext());
|
|
1401
1534
|
}
|
|
1402
1535
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1403
1536
|
}
|
|
1404
1537
|
getAdaptableContainerElement() {
|
|
1405
1538
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1406
|
-
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1407
|
-
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1408
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1409
|
-
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1539
|
+
this.DANGER_USE_GETTER_adaptableContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.adaptableContainer, this.buildInitContainerContext());
|
|
1410
1540
|
}
|
|
1411
1541
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1412
1542
|
}
|
|
@@ -1794,7 +1924,7 @@ You need to define at least one Layout!`);
|
|
|
1794
1924
|
// if no primary key column then lets check the first row to see if its a data item
|
|
1795
1925
|
const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
|
|
1796
1926
|
if (!primaryKeyDataItem) {
|
|
1797
|
-
errorMessage = `
|
|
1927
|
+
errorMessage = `Primary key column "${this.adaptableOptions.primaryKey}" not found. This will affect many Adaptable features.`;
|
|
1798
1928
|
if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
|
|
1799
1929
|
// show an alert if that is the option
|
|
1800
1930
|
this.api.alertApi.showAlertError('No Primary Key', errorMessage);
|
|
@@ -1851,12 +1981,12 @@ You need to define at least one Layout!`);
|
|
|
1851
1981
|
checkShouldClearExistingFiltersOrSearches() {
|
|
1852
1982
|
// if they have selected to clear Filters on startup then do it
|
|
1853
1983
|
if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
|
|
1854
|
-
this.logger.warn('Clearing
|
|
1984
|
+
this.logger.warn('Clearing saved filters (clearFiltersOnStartUp is enabled).');
|
|
1855
1985
|
this.api.filterApi.clearAllFilters();
|
|
1856
1986
|
}
|
|
1857
1987
|
// if they have selected to clear searches on startup then do it
|
|
1858
1988
|
if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
1859
|
-
this.logger.warn('Clearing
|
|
1989
|
+
this.logger.warn('Clearing saved Quick Search (clearQuickSearchOnStartUp is enabled).');
|
|
1860
1990
|
this.api.quickSearchApi.clearQuickSearch();
|
|
1861
1991
|
}
|
|
1862
1992
|
}
|
|
@@ -2069,6 +2199,7 @@ You need to define at least one Layout!`);
|
|
|
2069
2199
|
}
|
|
2070
2200
|
return rawValue;
|
|
2071
2201
|
}
|
|
2202
|
+
__updateColumnModelAndRefreshGrid_already_called = false;
|
|
2072
2203
|
updateColumnModelAndRefreshGrid() {
|
|
2073
2204
|
if (this.__updateColumnModelAndRefreshGrid_already_called) {
|
|
2074
2205
|
return;
|
|
@@ -2084,7 +2215,7 @@ You need to define at least one Layout!`);
|
|
|
2084
2215
|
}
|
|
2085
2216
|
}
|
|
2086
2217
|
_updateColumnModelAndRefreshGridNow() {
|
|
2087
|
-
this.logger.info(
|
|
2218
|
+
this.logger.info('Updating column model and refreshing grid.');
|
|
2088
2219
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2089
2220
|
this.agGridColumnAdapter.setupColumns();
|
|
2090
2221
|
this.redrawBody();
|
|
@@ -2110,7 +2241,7 @@ You need to define at least one Layout!`);
|
|
|
2110
2241
|
this.agGridAdapter.getAgGridApi().redrawRows(redrawRowsParams);
|
|
2111
2242
|
}
|
|
2112
2243
|
catch (ex) {
|
|
2113
|
-
this.logger.consoleError('AG Grid redrawRows
|
|
2244
|
+
this.logger.consoleError('AG Grid redrawRows failed to locate some row nodes.', rowNodes, ex);
|
|
2114
2245
|
}
|
|
2115
2246
|
}
|
|
2116
2247
|
redrawRow(rowNode) {
|
|
@@ -2404,6 +2535,69 @@ You need to define at least one Layout!`);
|
|
|
2404
2535
|
});
|
|
2405
2536
|
}
|
|
2406
2537
|
}
|
|
2538
|
+
async manageGridRows(dataRowConfig, dataUpdateConfig = {}) {
|
|
2539
|
+
const result = {
|
|
2540
|
+
addedRows: [],
|
|
2541
|
+
updatedRows: [],
|
|
2542
|
+
removedRows: [],
|
|
2543
|
+
};
|
|
2544
|
+
if (!dataRowConfig) {
|
|
2545
|
+
return result;
|
|
2546
|
+
}
|
|
2547
|
+
if (!dataRowConfig.addRows || !dataRowConfig.updateRows || !dataRowConfig.deleteRows) {
|
|
2548
|
+
return result;
|
|
2549
|
+
}
|
|
2550
|
+
const addDataRows = dataRowConfig.addRows;
|
|
2551
|
+
const updateDataRows = dataRowConfig.updateRows;
|
|
2552
|
+
const removeDataRows = dataRowConfig.deleteRows;
|
|
2553
|
+
if (this.hasAutogeneratedPrimaryKey) {
|
|
2554
|
+
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2555
|
+
}
|
|
2556
|
+
if (dataUpdateConfig.runAsync) {
|
|
2557
|
+
return new Promise((resolve) => {
|
|
2558
|
+
this.applyAgGridTransactionAsync({
|
|
2559
|
+
update: updateDataRows,
|
|
2560
|
+
add: addDataRows,
|
|
2561
|
+
remove: removeDataRows,
|
|
2562
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2563
|
+
}, (transaction) => {
|
|
2564
|
+
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2565
|
+
dataUpdateConfig.callback(transaction);
|
|
2566
|
+
}
|
|
2567
|
+
if (transaction?.add) {
|
|
2568
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2569
|
+
}
|
|
2570
|
+
resolve({
|
|
2571
|
+
addedRows: transaction?.add,
|
|
2572
|
+
updatedRows: transaction?.update,
|
|
2573
|
+
removedRows: transaction?.remove,
|
|
2574
|
+
});
|
|
2575
|
+
});
|
|
2576
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2577
|
+
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2578
|
+
}
|
|
2579
|
+
});
|
|
2580
|
+
}
|
|
2581
|
+
else {
|
|
2582
|
+
const transaction = this.applyAgGridTransaction({
|
|
2583
|
+
update: updateDataRows,
|
|
2584
|
+
add: addDataRows,
|
|
2585
|
+
remove: removeDataRows,
|
|
2586
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2587
|
+
});
|
|
2588
|
+
if (transaction?.add) {
|
|
2589
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2590
|
+
}
|
|
2591
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2592
|
+
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2593
|
+
}
|
|
2594
|
+
return Promise.resolve({
|
|
2595
|
+
addedRows: transaction?.add,
|
|
2596
|
+
updatedRows: transaction?.update,
|
|
2597
|
+
removedRows: transaction?.remove,
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2407
2601
|
deleteRows(dataRows, dataUpdateConfig) {
|
|
2408
2602
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
2409
2603
|
if (dataUpdateConfig.runAsync) {
|
|
@@ -2460,14 +2654,14 @@ You need to define at least one Layout!`);
|
|
|
2460
2654
|
}
|
|
2461
2655
|
autoSizeColumns(columnIds) {
|
|
2462
2656
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2463
|
-
this.logger.consoleError(`
|
|
2657
|
+
this.logger.consoleError(`Auto-sizing columns [${columnIds}] requires the AG Grid "ColumnAutoSizeModule". Please register this module.`);
|
|
2464
2658
|
return;
|
|
2465
2659
|
}
|
|
2466
2660
|
this.layoutManager.autoSizeColumns(columnIds);
|
|
2467
2661
|
}
|
|
2468
2662
|
autoSizeAllColumns() {
|
|
2469
2663
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2470
|
-
this.logger.consoleError(
|
|
2664
|
+
this.logger.consoleError('Auto-sizing all columns requires the AG Grid "ColumnAutoSizeModule". Please register this module.');
|
|
2471
2665
|
return;
|
|
2472
2666
|
}
|
|
2473
2667
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
@@ -2625,7 +2819,7 @@ You need to define at least one Layout!`);
|
|
|
2625
2819
|
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2626
2820
|
}
|
|
2627
2821
|
catch (error) {
|
|
2628
|
-
this.logger.consoleError(
|
|
2822
|
+
this.logger.consoleError('Failed to retrieve custom filter values.', column, error);
|
|
2629
2823
|
}
|
|
2630
2824
|
return customInFilterValuesResult;
|
|
2631
2825
|
}
|
|
@@ -2665,7 +2859,7 @@ You need to define at least one Layout!`);
|
|
|
2665
2859
|
customDistinctValues = await customEditColumnValues(customEditValuesContext);
|
|
2666
2860
|
}
|
|
2667
2861
|
catch (error) {
|
|
2668
|
-
this.logger.consoleError(
|
|
2862
|
+
this.logger.consoleError('Failed to retrieve custom edit values.', column, error);
|
|
2669
2863
|
}
|
|
2670
2864
|
return customDistinctValues ?? [];
|
|
2671
2865
|
}
|
|
@@ -3120,7 +3314,7 @@ You need to define at least one Layout!`);
|
|
|
3120
3314
|
if (this.getAgGridRowModelType() !== 'clientSide') {
|
|
3121
3315
|
// only in client-side row model can we loop through filtered&sorted rows
|
|
3122
3316
|
// see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
|
|
3123
|
-
this.logger.warn('
|
|
3317
|
+
this.logger.warn('forAllVisibleRowNodesDo() is only supported with client-side row model. Falling back to forAllRowNodesDo().');
|
|
3124
3318
|
return this.forAllRowNodesDo(func, config);
|
|
3125
3319
|
}
|
|
3126
3320
|
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
@@ -3172,14 +3366,14 @@ You need to define at least one Layout!`);
|
|
|
3172
3366
|
}
|
|
3173
3367
|
selectNode(rowNode, clearSelection) {
|
|
3174
3368
|
if (!rowNode) {
|
|
3175
|
-
this.logger.error('
|
|
3369
|
+
this.logger.error('Cannot select: row node is null.');
|
|
3176
3370
|
return;
|
|
3177
3371
|
}
|
|
3178
3372
|
rowNode.setSelected(true, clearSelection);
|
|
3179
3373
|
}
|
|
3180
3374
|
deSelectNode(rowNode, clearSelection) {
|
|
3181
3375
|
if (!rowNode) {
|
|
3182
|
-
this.logger.error('
|
|
3376
|
+
this.logger.error('Cannot deselect: row node is null.');
|
|
3183
3377
|
return;
|
|
3184
3378
|
}
|
|
3185
3379
|
rowNode.setSelected(false, clearSelection);
|
|
@@ -3267,7 +3461,7 @@ You need to define at least one Layout!`);
|
|
|
3267
3461
|
}
|
|
3268
3462
|
showChart(chartDefinition, container) {
|
|
3269
3463
|
if (!this.isReady) {
|
|
3270
|
-
this.logger.consoleError('
|
|
3464
|
+
this.logger.consoleError('Cannot call showChart before Adaptable is fully initialized.');
|
|
3271
3465
|
return null;
|
|
3272
3466
|
}
|
|
3273
3467
|
/**
|
|
@@ -3288,7 +3482,7 @@ You need to define at least one Layout!`);
|
|
|
3288
3482
|
}
|
|
3289
3483
|
updateChart(chart) {
|
|
3290
3484
|
if (!chart.Model) {
|
|
3291
|
-
this.logger.consoleError(`
|
|
3485
|
+
this.logger.consoleError(`Cannot update chart "${chart.Name}": the chart definition is missing the required Model property.`);
|
|
3292
3486
|
return;
|
|
3293
3487
|
}
|
|
3294
3488
|
const upgradableProperties = {
|
|
@@ -3300,12 +3494,21 @@ You need to define at least one Layout!`);
|
|
|
3300
3494
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
3301
3495
|
aggFunc: chart.Model.aggFunc,
|
|
3302
3496
|
};
|
|
3497
|
+
// Skip the AG Grid API call if the upgradable properties haven't changed
|
|
3498
|
+
// to avoid unnecessary chartOptionsChanged events (see #ag_grid_update_chart_loop)
|
|
3499
|
+
const currentModel = this.getChartModels().find((model) => model.chartId === chart.Model.chartId);
|
|
3500
|
+
if (currentModel &&
|
|
3501
|
+
Boolean(currentModel.unlinkChart) === upgradableProperties.unlinkChart &&
|
|
3502
|
+
Boolean(currentModel.suppressChartRanges) === upgradableProperties.suppressChartRanges &&
|
|
3503
|
+
currentModel.aggFunc === upgradableProperties.aggFunc) {
|
|
3504
|
+
return;
|
|
3505
|
+
}
|
|
3303
3506
|
// see also #ag_grid_update_chart_loop
|
|
3304
3507
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
3305
3508
|
}
|
|
3306
3509
|
getChartModels() {
|
|
3307
3510
|
if (!this.isReady) {
|
|
3308
|
-
this.logger.consoleError('
|
|
3511
|
+
this.logger.consoleError('Cannot call getChartModels before Adaptable is fully initialized.');
|
|
3309
3512
|
return [];
|
|
3310
3513
|
}
|
|
3311
3514
|
return this.agGridAdapter.getAgGridApi().getChartModels();
|
|
@@ -3339,7 +3542,7 @@ You need to define at least one Layout!`);
|
|
|
3339
3542
|
}
|
|
3340
3543
|
setAgGridQuickSearch(searchText) {
|
|
3341
3544
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
|
|
3342
|
-
this.logger.consoleError(
|
|
3545
|
+
this.logger.consoleError('Quick Search requires the AG Grid "QuickFilterModule". Please register this module to enable Quick Search.');
|
|
3343
3546
|
return;
|
|
3344
3547
|
}
|
|
3345
3548
|
this.agGridAdapter.setGridOption('quickFilterText', searchText);
|
|
@@ -3349,7 +3552,7 @@ You need to define at least one Layout!`);
|
|
|
3349
3552
|
}
|
|
3350
3553
|
setAgGridFindSearchValue(searchText) {
|
|
3351
3554
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
|
|
3352
|
-
this.logger.consoleError(
|
|
3555
|
+
this.logger.consoleError('Find Search requires the AG Grid "FindModule". Please register this module to enable Find Search.');
|
|
3353
3556
|
return;
|
|
3354
3557
|
}
|
|
3355
3558
|
this.agGridAdapter.setGridOption('findSearchValue', searchText);
|
|
@@ -3878,7 +4081,7 @@ You need to define at least one Layout!`);
|
|
|
3878
4081
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3879
4082
|
// if a Cell Data Change is undone, log to the Console
|
|
3880
4083
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
3881
|
-
this.logger.info(`
|
|
4084
|
+
this.logger.info(`Data change reverted: column="${cellDataChangedInfo.column}", primaryKey="${cellDataChangedInfo.primaryKeyValue}", from=${cellDataChangedInfo.newValue} to=${cellDataChangedInfo.oldValue}`);
|
|
3882
4085
|
}
|
|
3883
4086
|
// For Changes except Aggregations, reset cell selection if required
|
|
3884
4087
|
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
@@ -4083,7 +4286,7 @@ You need to define at least one Layout!`);
|
|
|
4083
4286
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
4084
4287
|
}
|
|
4085
4288
|
refreshAdaptableAfterLayoutChange(layout) {
|
|
4086
|
-
this.logger.info('
|
|
4289
|
+
this.logger.info('Refreshing Adaptable after layout change.');
|
|
4087
4290
|
const prevLayoutForRefresh = this.__prevLayoutForRefresh || this.api.layoutApi.getCurrentLayout();
|
|
4088
4291
|
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
4089
4292
|
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevLayoutForRefresh, layout);
|
|
@@ -4129,7 +4332,7 @@ You need to define at least one Layout!`);
|
|
|
4129
4332
|
.forEach((colType) => {
|
|
4130
4333
|
const newValidCellDataType = mapOldTypeToDataType(colType);
|
|
4131
4334
|
if (newValidCellDataType) {
|
|
4132
|
-
this.logger.consoleWarn(`Column ${columnDefinition.colId ?? columnDefinition.field}
|
|
4335
|
+
this.logger.consoleWarn(`Column "${columnDefinition.colId ?? columnDefinition.field}" uses deprecated type "${colType}"${newValidCellDataType !== 'unknown' ? `. Use colDef.cellDataType="${newValidCellDataType}" instead.` : '. This type is no longer supported.'}`);
|
|
4133
4336
|
}
|
|
4134
4337
|
});
|
|
4135
4338
|
});
|