@adaptabletools/adaptable-cjs 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 +85 -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/ColumnHighlightInfo.js +2 -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 +2 -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 +2 -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 +35 -4
- 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 +17 -1
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +42 -3
- 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 +26 -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 +19 -18
- 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 +17 -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 +47 -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 +48 -12
- package/src/View/Alert/Wizard/AlertWizard.js +12 -8
- 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 +35 -0
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +18 -17
- 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 +40 -14
- 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 +36 -15
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
- 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 +22 -11
- 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 +24 -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 +78 -15
- 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 +191 -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.cjs.tsbuildinfo +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -633
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -33
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -63
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -13
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -12
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -8
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -12
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -12
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -12
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -82
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -19
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -14
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -20
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -31
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -50
- 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 -16
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -110
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -24
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -73
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -73
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -61
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -40
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -53
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -95
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -93
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -99
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -100
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -28
- /package/src/{View/Components/SharedProps/WizardScopeState.js → AdaptableState/Common/AdaptableRowContext.js} +0 -0
|
@@ -10,6 +10,7 @@ const DocumentationLinkConstants_1 = require("../Utilities/Constants/Documentati
|
|
|
10
10
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
11
11
|
const Emitter_1 = tslib_1.__importDefault(require("../Utilities/Emitter"));
|
|
12
12
|
const DefaultAdaptableOptions_1 = require("../AdaptableOptions/DefaultAdaptableOptions");
|
|
13
|
+
const resolveContainerElement_1 = require("../Utilities/resolveContainerElement");
|
|
13
14
|
const AgGridAdapter_1 = require("./AgGridAdapter");
|
|
14
15
|
const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/GeneralConstants"));
|
|
15
16
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
@@ -159,38 +160,79 @@ LocalEventService_Prototype.dispatchEvent = function (event) {
|
|
|
159
160
|
const adaptableInstances = {};
|
|
160
161
|
const publishTimestamp = Number(EnvVars_1.ADAPTABLE_PUBLISH_TIMESTAMP);
|
|
161
162
|
class AdaptableAgGrid {
|
|
163
|
+
logger;
|
|
164
|
+
_id;
|
|
165
|
+
lifecycleState;
|
|
166
|
+
variant;
|
|
167
|
+
emitter;
|
|
168
|
+
/**
|
|
169
|
+
* Runtime flags
|
|
170
|
+
*/
|
|
171
|
+
hasAutogeneratedPrimaryKey;
|
|
172
|
+
hasAdaptableToolPanel;
|
|
173
|
+
initWithLazyData;
|
|
174
|
+
_rawAdaptableOptions;
|
|
175
|
+
adaptableOptions;
|
|
176
|
+
_isDetailGrid;
|
|
177
|
+
_isDetailGridForIndex;
|
|
178
|
+
agGridOptionsService;
|
|
179
|
+
agGridAdapter;
|
|
180
|
+
agGridColumnAdapter;
|
|
181
|
+
agGridMenuAdapter;
|
|
182
|
+
agGridExportAdapter;
|
|
183
|
+
agGridThemeAdapter;
|
|
184
|
+
agGridModulesAdapter;
|
|
185
|
+
DANGER_USE_GETTER_adaptableContainerElement;
|
|
186
|
+
DANGER_USE_GETTER_agGridContainerElement;
|
|
187
|
+
api;
|
|
188
|
+
adaptableStore;
|
|
189
|
+
adaptableModules;
|
|
190
|
+
DataService;
|
|
191
|
+
CalculatedColumnExpressionService;
|
|
192
|
+
ModuleService;
|
|
193
|
+
ValidationService;
|
|
194
|
+
QueryLanguageService;
|
|
195
|
+
AlertService;
|
|
196
|
+
TeamSharingService;
|
|
197
|
+
MetamodelService;
|
|
198
|
+
RowFormService;
|
|
199
|
+
Fdc3Service;
|
|
200
|
+
AnnotationsService;
|
|
201
|
+
FlashingCellService;
|
|
202
|
+
LicenseService;
|
|
203
|
+
ChartingService;
|
|
204
|
+
ThemeService;
|
|
205
|
+
rowListeners;
|
|
206
|
+
throttleFilterOnDataChange;
|
|
207
|
+
debouncedSetSelectedRows;
|
|
208
|
+
debouncedSetSelectedCells;
|
|
209
|
+
agGridListenerKeydown;
|
|
210
|
+
agGridListenerMouseEnter;
|
|
211
|
+
agGridListenerMouseLeave;
|
|
212
|
+
listenerGlobalSetRowSelection;
|
|
213
|
+
listenerGlobalChartingChanges;
|
|
214
|
+
listenerCellEditingStarted;
|
|
215
|
+
listenerFirstDataRendered;
|
|
216
|
+
listenerPivotChanged;
|
|
217
|
+
listenerCellSelectionChanged;
|
|
218
|
+
listenerSortChanged;
|
|
219
|
+
listenerColumnGroupOpened;
|
|
220
|
+
layoutManager;
|
|
221
|
+
columnMinMaxValuesCache = {};
|
|
222
|
+
renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container);
|
|
223
|
+
unmountReactRoot;
|
|
224
|
+
unmountLoadingScreen;
|
|
225
|
+
/**
|
|
226
|
+
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
227
|
+
*/
|
|
228
|
+
adaptableStatusPanelKeys = [];
|
|
229
|
+
adaptableStatusPanelDefs = [];
|
|
230
|
+
hasAdaptableStatusBar;
|
|
231
|
+
// see #no_additional_react_root
|
|
232
|
+
_PRIVATE_adaptableJSXElement;
|
|
233
|
+
_prevLayout;
|
|
234
|
+
__prevLayoutForRefresh;
|
|
162
235
|
constructor(config) {
|
|
163
|
-
this.columnMinMaxValuesCache = {};
|
|
164
|
-
this.renderReactRoot = (node, container) => (0, renderReactRoot_1.renderReactRoot)(node, container);
|
|
165
|
-
/**
|
|
166
|
-
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
167
|
-
*/
|
|
168
|
-
this.adaptableStatusPanelKeys = [];
|
|
169
|
-
// only for our private / internal events used within Adaptable
|
|
170
|
-
// public events are emitted through the EventApi
|
|
171
|
-
this._emit = (eventName, data) => {
|
|
172
|
-
if (this.emitter) {
|
|
173
|
-
return this.emitter.emit(eventName, data);
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
this._emitSync = (eventName, data) => {
|
|
177
|
-
if (this.emitter) {
|
|
178
|
-
return this.emitter.emitSync(eventName, data);
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
this._on = (eventName, callback) => {
|
|
182
|
-
if (!this.emitter) {
|
|
183
|
-
return () => { };
|
|
184
|
-
}
|
|
185
|
-
return this.emitter.on(eventName, callback);
|
|
186
|
-
};
|
|
187
|
-
this._onIncludeFired = (eventName, callback) => {
|
|
188
|
-
if (!this.emitter) {
|
|
189
|
-
return () => { };
|
|
190
|
-
}
|
|
191
|
-
return this.emitter.onIncludeFired(eventName, callback);
|
|
192
|
-
};
|
|
193
|
-
this.__updateColumnModelAndRefreshGrid_already_called = false;
|
|
194
236
|
this.lifecycleState = 'initial';
|
|
195
237
|
this.emitter = new Emitter_1.default();
|
|
196
238
|
this.agGridOptionsService = new AgGridOptionsService_1.AgGridOptionsService(this);
|
|
@@ -226,6 +268,30 @@ class AdaptableAgGrid {
|
|
|
226
268
|
get isDestroyed() {
|
|
227
269
|
return this.lifecycleState === 'preDestroyed';
|
|
228
270
|
}
|
|
271
|
+
// only for our private / internal events used within Adaptable
|
|
272
|
+
// public events are emitted through the EventApi
|
|
273
|
+
_emit = (eventName, data) => {
|
|
274
|
+
if (this.emitter) {
|
|
275
|
+
return this.emitter.emit(eventName, data);
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
_emitSync = (eventName, data) => {
|
|
279
|
+
if (this.emitter) {
|
|
280
|
+
return this.emitter.emitSync(eventName, data);
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
_on = (eventName, callback) => {
|
|
284
|
+
if (!this.emitter) {
|
|
285
|
+
return () => { };
|
|
286
|
+
}
|
|
287
|
+
return this.emitter.on(eventName, callback);
|
|
288
|
+
};
|
|
289
|
+
_onIncludeFired = (eventName, callback) => {
|
|
290
|
+
if (!this.emitter) {
|
|
291
|
+
return () => { };
|
|
292
|
+
}
|
|
293
|
+
return this.emitter.onIncludeFired(eventName, callback);
|
|
294
|
+
};
|
|
229
295
|
/**
|
|
230
296
|
* Internal initializer for Adaptable, directly called by the React and Angular Adaptable wrappers
|
|
231
297
|
* @private
|
|
@@ -300,7 +366,7 @@ class AdaptableAgGrid {
|
|
|
300
366
|
this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
|
|
301
367
|
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
|
|
302
368
|
if (showLoadingScreen) {
|
|
303
|
-
this.logger.info(
|
|
369
|
+
this.logger.info('Showing loading screen');
|
|
304
370
|
// it's important to use ensureLoadingScreenPortalElement
|
|
305
371
|
// and not ensurePortalElement, because multiple adaptable instances share the same portal element
|
|
306
372
|
// so when displaying the second one, the react root associated to the portal element
|
|
@@ -316,7 +382,7 @@ class AdaptableAgGrid {
|
|
|
316
382
|
}), portalElement);
|
|
317
383
|
}
|
|
318
384
|
else {
|
|
319
|
-
this.logger.consoleError(
|
|
385
|
+
this.logger.consoleError('Failed to create loading screen portal element.');
|
|
320
386
|
}
|
|
321
387
|
}
|
|
322
388
|
this.forPlugins((plugin) => plugin.afterInitOptions(this, this.adaptableOptions));
|
|
@@ -375,7 +441,7 @@ class AdaptableAgGrid {
|
|
|
375
441
|
// see #map_dateString_to_date
|
|
376
442
|
this.agGridAdapter.patchColDefs(columnDefs, (colDef) => {
|
|
377
443
|
if (colDef.cellDataType === 'dateString') {
|
|
378
|
-
this.logger.consoleError(`
|
|
444
|
+
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.`);
|
|
379
445
|
colDef.cellDataType = 'date';
|
|
380
446
|
}
|
|
381
447
|
});
|
|
@@ -406,8 +472,8 @@ class AdaptableAgGrid {
|
|
|
406
472
|
const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
|
|
407
473
|
if (agGridApi === false) {
|
|
408
474
|
this.midwayDestroy();
|
|
409
|
-
this.logger.consoleError(
|
|
410
|
-
return Promise.reject('
|
|
475
|
+
this.logger.consoleError('Failed to initialize AG Grid.');
|
|
476
|
+
return Promise.reject('Failed to initialize AG Grid.');
|
|
411
477
|
}
|
|
412
478
|
this.layoutManager = new src_1.LayoutManager({
|
|
413
479
|
gridApi: agGridApi,
|
|
@@ -432,7 +498,7 @@ class AdaptableAgGrid {
|
|
|
432
498
|
this.layoutManager.onColumnDefsChanged(() => {
|
|
433
499
|
this.updateColumnModelAndRefreshGrid();
|
|
434
500
|
});
|
|
435
|
-
this.logger.info(
|
|
501
|
+
this.logger.info('Hiding loading screen');
|
|
436
502
|
this.unmountLoadingScreen?.();
|
|
437
503
|
perfInitAgGrid.end();
|
|
438
504
|
initAgGridMarker.end();
|
|
@@ -443,7 +509,7 @@ class AdaptableAgGrid {
|
|
|
443
509
|
this.lifecycleState = 'agGridReady';
|
|
444
510
|
this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
|
|
445
511
|
this.ModuleService.logMissingAgGridDepsInfos();
|
|
446
|
-
this.logger.info(
|
|
512
|
+
this.logger.info('Registered AG Grid modules (including dependents):', this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
|
|
447
513
|
/**
|
|
448
514
|
* At this point AG Grid is initialized!
|
|
449
515
|
*/
|
|
@@ -533,10 +599,7 @@ class AdaptableAgGrid {
|
|
|
533
599
|
const layoutState = state.Layout;
|
|
534
600
|
// ensure that at least one Layout has been provided
|
|
535
601
|
if (!layoutState || !layoutState.Layouts?.length) {
|
|
536
|
-
this.logger
|
|
537
|
-
.consoleError(`You have not defined any Layout in your InitialState.Layout.Layouts[] state!
|
|
538
|
-
|
|
539
|
-
You need to define at least one Layout!`);
|
|
602
|
+
this.logger.consoleError('No Layouts defined in InitialState.Layout.Layouts[]. At least one Layout is required.');
|
|
540
603
|
}
|
|
541
604
|
// ensure CurrentLayout is valid
|
|
542
605
|
if (!layoutState.CurrentLayout ||
|
|
@@ -658,11 +721,8 @@ You need to define at least one Layout!`);
|
|
|
658
721
|
// FIXME AFL FILTER why is this needed???
|
|
659
722
|
this.refreshSelectedCellsState();
|
|
660
723
|
this.refreshSelectedRowsState();
|
|
661
|
-
// FIXME AFL: this is temporary, will be replaced with v22's new autoCol filtering
|
|
662
|
-
const currentPivotLayoutHasAutoCols = this.api.layoutApi.isCurrentLayoutPivot() &&
|
|
663
|
-
!!this.api.layoutApi.getCurrentRowGroupsColumnIds()?.length;
|
|
664
724
|
// agGridApi.setFilterModel() already triggered onFilterChanged(), so we skip it if updateColumnFilterModel is TRUE
|
|
665
|
-
if (!filteringApplied
|
|
725
|
+
if (!filteringApplied) {
|
|
666
726
|
agGridApi.onFilterChanged();
|
|
667
727
|
filteringApplied = true;
|
|
668
728
|
}
|
|
@@ -702,21 +762,90 @@ You need to define at least one Layout!`);
|
|
|
702
762
|
hideQuickFilter() {
|
|
703
763
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', 0);
|
|
704
764
|
}
|
|
765
|
+
showAdaptableToolPanel() {
|
|
766
|
+
if (!this.hasAdaptableToolPanel) {
|
|
767
|
+
// don't re-add the ToolPanel if it's hidden by entitlement
|
|
768
|
+
if (this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel')) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
772
|
+
if (currentSideBar?.toolPanels) {
|
|
773
|
+
const updatedSideBar = {
|
|
774
|
+
...currentSideBar,
|
|
775
|
+
toolPanels: [...currentSideBar.toolPanels, this.buildAdaptableToolPanelDef()],
|
|
776
|
+
};
|
|
777
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
778
|
+
this.hasAdaptableToolPanel = true;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
hideAdaptableToolPanel() {
|
|
783
|
+
if (this.hasAdaptableToolPanel) {
|
|
784
|
+
// close the tool panel if it's currently open
|
|
785
|
+
this.api.toolPanelApi.closeAdapTableToolPanel();
|
|
786
|
+
const currentSideBar = this.agGridAdapter.getGridOption('sideBar');
|
|
787
|
+
if (currentSideBar?.toolPanels) {
|
|
788
|
+
const updatedSideBar = {
|
|
789
|
+
...currentSideBar,
|
|
790
|
+
toolPanels: currentSideBar.toolPanels.filter((toolPanelDef) => {
|
|
791
|
+
if (typeof toolPanelDef === 'string') {
|
|
792
|
+
return toolPanelDef !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
793
|
+
}
|
|
794
|
+
return toolPanelDef.id !== GeneralConstants.ADAPTABLE_TOOLPANEL_ID;
|
|
795
|
+
}),
|
|
796
|
+
};
|
|
797
|
+
this.agGridAdapter.setGridOption('sideBar', updatedSideBar);
|
|
798
|
+
}
|
|
799
|
+
this.hasAdaptableToolPanel = false;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
buildAdaptableToolPanelDef() {
|
|
803
|
+
return {
|
|
804
|
+
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
805
|
+
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
806
|
+
labelDefault: GeneralConstants.ADAPTABLE,
|
|
807
|
+
labelKey: 'adaptable',
|
|
808
|
+
iconKey: 'menu',
|
|
809
|
+
width: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
810
|
+
minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
showAdaptableStatusBar() {
|
|
814
|
+
if (!this.hasAdaptableStatusBar && this.adaptableStatusPanelDefs.length > 0) {
|
|
815
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
816
|
+
if (currentStatusBar) {
|
|
817
|
+
// filter out any Adaptable panels that may already exist to avoid duplicates
|
|
818
|
+
const existingNonAdaptablePanels = (currentStatusBar.statusPanels ?? []).filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key));
|
|
819
|
+
const updatedStatusBar = {
|
|
820
|
+
...currentStatusBar,
|
|
821
|
+
statusPanels: [...existingNonAdaptablePanels, ...this.adaptableStatusPanelDefs],
|
|
822
|
+
};
|
|
823
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
824
|
+
this.hasAdaptableStatusBar = true;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
hideAdaptableStatusBar() {
|
|
829
|
+
if (this.hasAdaptableStatusBar) {
|
|
830
|
+
const currentStatusBar = this.agGridAdapter.getGridOption('statusBar');
|
|
831
|
+
if (currentStatusBar?.statusPanels) {
|
|
832
|
+
const updatedStatusBar = {
|
|
833
|
+
...currentStatusBar,
|
|
834
|
+
statusPanels: currentStatusBar.statusPanels.filter((panel) => !this.adaptableStatusPanelKeys.includes(panel.key)),
|
|
835
|
+
};
|
|
836
|
+
this.agGridAdapter.setGridOption('statusBar', updatedStatusBar);
|
|
837
|
+
}
|
|
838
|
+
this.hasAdaptableStatusBar = false;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
705
841
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
706
842
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
707
|
-
this.logger
|
|
708
|
-
.warn(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
709
|
-
when no unique column is available, as it limits some Adaptable functionalities!
|
|
710
|
-
|
|
711
|
-
For more details see: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
|
|
843
|
+
this.logger.warn(`Autogenerated primary key is enabled (adaptableOptions.autogeneratedPrimaryKey = true). This should be a last resort as it limits some Adaptable features. See: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
|
|
712
844
|
this.adaptableOptions.primaryKey = GeneralConstants_1.AUTOGENERATED_PK_COLUMN;
|
|
713
845
|
return this.adaptableOptions;
|
|
714
846
|
}
|
|
715
847
|
if (StringExtensions_1.default.IsNullOrEmpty(adaptableOptions.primaryKey)) {
|
|
716
|
-
this.logger.consoleError(`
|
|
717
|
-
As a fallback, you can set adaptableOptions.autogeneratedPrimaryKey = TRUE
|
|
718
|
-
|
|
719
|
-
For more details see: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
|
|
848
|
+
this.logger.consoleError(`adaptableOptions.primaryKey is required and must not be empty. As a fallback, set adaptableOptions.autogeneratedPrimaryKey = true. See: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
|
|
720
849
|
}
|
|
721
850
|
return adaptableOptions;
|
|
722
851
|
}
|
|
@@ -748,7 +877,7 @@ You need to define at least one Layout!`);
|
|
|
748
877
|
*/
|
|
749
878
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
|
|
750
879
|
if (original_defaultColDef?.headerValueGetter) {
|
|
751
|
-
this.logger.warn(
|
|
880
|
+
this.logger.warn('defaultColDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.columnHeader instead.');
|
|
752
881
|
return original_defaultColDef;
|
|
753
882
|
}
|
|
754
883
|
// #customize_header
|
|
@@ -765,7 +894,7 @@ You need to define at least one Layout!`);
|
|
|
765
894
|
*/
|
|
766
895
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColGroupDef', (original_defaultColGroupDef) => {
|
|
767
896
|
if (original_defaultColGroupDef?.headerValueGetter) {
|
|
768
|
-
this.logger.warn(
|
|
897
|
+
this.logger.warn('defaultColGroupDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.tableColumnHeader instead.');
|
|
769
898
|
return original_defaultColGroupDef;
|
|
770
899
|
}
|
|
771
900
|
const defaultColGroupDef = { ...original_defaultColGroupDef };
|
|
@@ -785,11 +914,11 @@ You need to define at least one Layout!`);
|
|
|
785
914
|
}
|
|
786
915
|
if (original_autoGroupColumnDef?.filter === false) {
|
|
787
916
|
// if user disables filter on autoGroupColumnDef, we respect that
|
|
788
|
-
this.logger.info(
|
|
917
|
+
this.logger.info('autoGroupColumnDef.filter is disabled via user configuration.');
|
|
789
918
|
return original_autoGroupColumnDef;
|
|
790
919
|
}
|
|
791
920
|
if (typeof original_autoGroupColumnDef?.filter === 'object') {
|
|
792
|
-
this.logger.
|
|
921
|
+
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.');
|
|
793
922
|
return original_autoGroupColumnDef;
|
|
794
923
|
}
|
|
795
924
|
const autoGroupColumnDef = { ...original_autoGroupColumnDef };
|
|
@@ -797,7 +926,7 @@ You need to define at least one Layout!`);
|
|
|
797
926
|
// !! DO NOT REMOVE THIS !!
|
|
798
927
|
// see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
|
|
799
928
|
autoGroupColumnDef.filterValueGetter = (params) => {
|
|
800
|
-
this.logger.
|
|
929
|
+
this.logger.consoleWarn('Unexpected invocation of autoGroupColumnDef.filterValueGetter. This is not expected under normal operation. Please contact support.', params);
|
|
801
930
|
return '';
|
|
802
931
|
};
|
|
803
932
|
// !! it is important that we always return the same component / handler instances
|
|
@@ -1111,16 +1240,7 @@ You need to define at least one Layout!`);
|
|
|
1111
1240
|
return original_sideBar;
|
|
1112
1241
|
}
|
|
1113
1242
|
const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
|
|
1114
|
-
const adaptableToolPanelDef =
|
|
1115
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
1116
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
1117
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
1118
|
-
labelKey: 'adaptable',
|
|
1119
|
-
iconKey: 'menu',
|
|
1120
|
-
width: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
1121
|
-
minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
1122
|
-
// maxWidth = undefined,
|
|
1123
|
-
};
|
|
1243
|
+
const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
|
|
1124
1244
|
const mapToolPanelDefs = (toolPanelDefs = []) => {
|
|
1125
1245
|
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
1126
1246
|
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
@@ -1195,19 +1315,29 @@ You need to define at least one Layout!`);
|
|
|
1195
1315
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
1196
1316
|
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
1197
1317
|
if (statusPanel.statusPanel === StatusBarState_1.ADAPTABLE_STATUS_PANEL) {
|
|
1318
|
+
if (!statusPanel.key) {
|
|
1319
|
+
this.logger.consoleWarn('AdaptableStatusPanel is missing a "key" property. This panel will not be managed by HideAdaptableUI. Please provide a unique key.');
|
|
1320
|
+
return statusPanel;
|
|
1321
|
+
}
|
|
1198
1322
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
1199
1323
|
const context = {
|
|
1200
1324
|
Key: statusPanel.key,
|
|
1201
1325
|
};
|
|
1202
|
-
|
|
1326
|
+
const adaptablePanelDef = {
|
|
1203
1327
|
...statusPanel,
|
|
1204
1328
|
statusPanel: (0, createAgStatusPanelComponent_1.createAgStatusPanelComponent)(AdaptableStatusBar_1.AdaptableStatusBar, this, context),
|
|
1205
1329
|
};
|
|
1330
|
+
this.adaptableStatusPanelDefs.push(adaptablePanelDef);
|
|
1331
|
+
return adaptablePanelDef;
|
|
1206
1332
|
}
|
|
1207
1333
|
return statusPanel;
|
|
1208
1334
|
});
|
|
1209
1335
|
return { ...original_statusBar, statusPanels };
|
|
1210
1336
|
});
|
|
1337
|
+
this.hasAdaptableStatusBar = this.adaptableStatusPanelKeys.length > 0;
|
|
1338
|
+
}
|
|
1339
|
+
else {
|
|
1340
|
+
this.hasAdaptableStatusBar = false;
|
|
1211
1341
|
}
|
|
1212
1342
|
/**
|
|
1213
1343
|
* `getRowStyle`
|
|
@@ -1367,15 +1497,14 @@ You need to define at least one Layout!`);
|
|
|
1367
1497
|
const rowData = agGridApi.getGridOption('rowData');
|
|
1368
1498
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
1369
1499
|
if (this.initWithLazyData) {
|
|
1370
|
-
this.logger.info('
|
|
1500
|
+
this.logger.info('Initializing with lazy data (no initial rowData).');
|
|
1371
1501
|
}
|
|
1372
1502
|
if (!this.getAgGridContainerElement()) {
|
|
1373
1503
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
1374
1504
|
const gridRoot = this.agGridAdapter.getAgGridRootElement();
|
|
1375
1505
|
const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
|
|
1376
1506
|
if (!gridContainer) {
|
|
1377
|
-
this.logger.consoleError(
|
|
1378
|
-
Please contact AdapTable Support and in the meantime provide a valid container element in 'ContainerOptions.agGridContainer'!`);
|
|
1507
|
+
this.logger.consoleError('Failed to derive AG Grid container from the framework wrapper. Please provide a valid container element via ContainerOptions.agGridContainer.');
|
|
1379
1508
|
}
|
|
1380
1509
|
this.DANGER_USE_GETTER_agGridContainerElement = gridContainer;
|
|
1381
1510
|
}
|
|
@@ -1383,7 +1512,7 @@ You need to define at least one Layout!`);
|
|
|
1383
1512
|
}
|
|
1384
1513
|
const agGridContainer = this.getAgGridContainerElement();
|
|
1385
1514
|
if (!agGridContainer) {
|
|
1386
|
-
this.logger.consoleError('
|
|
1515
|
+
this.logger.consoleError('AG Grid container element not found in the DOM. Please provide a valid element via ContainerOptions.agGridContainer.');
|
|
1387
1516
|
return Promise.resolve(false);
|
|
1388
1517
|
}
|
|
1389
1518
|
let gridParams;
|
|
@@ -1396,21 +1525,22 @@ You need to define at least one Layout!`);
|
|
|
1396
1525
|
useRowNodeLookUp() {
|
|
1397
1526
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1398
1527
|
}
|
|
1528
|
+
buildInitContainerContext() {
|
|
1529
|
+
return {
|
|
1530
|
+
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
1531
|
+
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
1532
|
+
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
1533
|
+
};
|
|
1534
|
+
}
|
|
1399
1535
|
getAgGridContainerElement() {
|
|
1400
1536
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1401
|
-
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1402
|
-
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1403
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1404
|
-
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1537
|
+
this.DANGER_USE_GETTER_agGridContainerElement = (0, resolveContainerElement_1.resolveContainerElement)(this.adaptableOptions?.containerOptions?.agGridContainer, this.buildInitContainerContext());
|
|
1405
1538
|
}
|
|
1406
1539
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1407
1540
|
}
|
|
1408
1541
|
getAdaptableContainerElement() {
|
|
1409
1542
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1410
|
-
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1411
|
-
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1412
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1413
|
-
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1543
|
+
this.DANGER_USE_GETTER_adaptableContainerElement = (0, resolveContainerElement_1.resolveContainerElement)(this.adaptableOptions?.containerOptions?.adaptableContainer, this.buildInitContainerContext());
|
|
1414
1544
|
}
|
|
1415
1545
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1416
1546
|
}
|
|
@@ -1798,7 +1928,7 @@ You need to define at least one Layout!`);
|
|
|
1798
1928
|
// if no primary key column then lets check the first row to see if its a data item
|
|
1799
1929
|
const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
|
|
1800
1930
|
if (!primaryKeyDataItem) {
|
|
1801
|
-
errorMessage = `
|
|
1931
|
+
errorMessage = `Primary key column "${this.adaptableOptions.primaryKey}" not found. This will affect many Adaptable features.`;
|
|
1802
1932
|
if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
|
|
1803
1933
|
// show an alert if that is the option
|
|
1804
1934
|
this.api.alertApi.showAlertError('No Primary Key', errorMessage);
|
|
@@ -1855,12 +1985,12 @@ You need to define at least one Layout!`);
|
|
|
1855
1985
|
checkShouldClearExistingFiltersOrSearches() {
|
|
1856
1986
|
// if they have selected to clear Filters on startup then do it
|
|
1857
1987
|
if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
|
|
1858
|
-
this.logger.warn('Clearing
|
|
1988
|
+
this.logger.warn('Clearing saved filters (clearFiltersOnStartUp is enabled).');
|
|
1859
1989
|
this.api.filterApi.clearAllFilters();
|
|
1860
1990
|
}
|
|
1861
1991
|
// if they have selected to clear searches on startup then do it
|
|
1862
1992
|
if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
1863
|
-
this.logger.warn('Clearing
|
|
1993
|
+
this.logger.warn('Clearing saved Quick Search (clearQuickSearchOnStartUp is enabled).');
|
|
1864
1994
|
this.api.quickSearchApi.clearQuickSearch();
|
|
1865
1995
|
}
|
|
1866
1996
|
}
|
|
@@ -2073,6 +2203,7 @@ You need to define at least one Layout!`);
|
|
|
2073
2203
|
}
|
|
2074
2204
|
return rawValue;
|
|
2075
2205
|
}
|
|
2206
|
+
__updateColumnModelAndRefreshGrid_already_called = false;
|
|
2076
2207
|
updateColumnModelAndRefreshGrid() {
|
|
2077
2208
|
if (this.__updateColumnModelAndRefreshGrid_already_called) {
|
|
2078
2209
|
return;
|
|
@@ -2088,7 +2219,7 @@ You need to define at least one Layout!`);
|
|
|
2088
2219
|
}
|
|
2089
2220
|
}
|
|
2090
2221
|
_updateColumnModelAndRefreshGridNow() {
|
|
2091
|
-
this.logger.info(
|
|
2222
|
+
this.logger.info('Updating column model and refreshing grid.');
|
|
2092
2223
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2093
2224
|
this.agGridColumnAdapter.setupColumns();
|
|
2094
2225
|
this.redrawBody();
|
|
@@ -2114,7 +2245,7 @@ You need to define at least one Layout!`);
|
|
|
2114
2245
|
this.agGridAdapter.getAgGridApi().redrawRows(redrawRowsParams);
|
|
2115
2246
|
}
|
|
2116
2247
|
catch (ex) {
|
|
2117
|
-
this.logger.consoleError('AG Grid redrawRows
|
|
2248
|
+
this.logger.consoleError('AG Grid redrawRows failed to locate some row nodes.', rowNodes, ex);
|
|
2118
2249
|
}
|
|
2119
2250
|
}
|
|
2120
2251
|
redrawRow(rowNode) {
|
|
@@ -2408,6 +2539,69 @@ You need to define at least one Layout!`);
|
|
|
2408
2539
|
});
|
|
2409
2540
|
}
|
|
2410
2541
|
}
|
|
2542
|
+
async manageGridRows(dataRowConfig, dataUpdateConfig = {}) {
|
|
2543
|
+
const result = {
|
|
2544
|
+
addedRows: [],
|
|
2545
|
+
updatedRows: [],
|
|
2546
|
+
removedRows: [],
|
|
2547
|
+
};
|
|
2548
|
+
if (!dataRowConfig) {
|
|
2549
|
+
return result;
|
|
2550
|
+
}
|
|
2551
|
+
if (!dataRowConfig.addRows || !dataRowConfig.updateRows || !dataRowConfig.deleteRows) {
|
|
2552
|
+
return result;
|
|
2553
|
+
}
|
|
2554
|
+
const addDataRows = dataRowConfig.addRows;
|
|
2555
|
+
const updateDataRows = dataRowConfig.updateRows;
|
|
2556
|
+
const removeDataRows = dataRowConfig.deleteRows;
|
|
2557
|
+
if (this.hasAutogeneratedPrimaryKey) {
|
|
2558
|
+
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2559
|
+
}
|
|
2560
|
+
if (dataUpdateConfig.runAsync) {
|
|
2561
|
+
return new Promise((resolve) => {
|
|
2562
|
+
this.applyAgGridTransactionAsync({
|
|
2563
|
+
update: updateDataRows,
|
|
2564
|
+
add: addDataRows,
|
|
2565
|
+
remove: removeDataRows,
|
|
2566
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2567
|
+
}, (transaction) => {
|
|
2568
|
+
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2569
|
+
dataUpdateConfig.callback(transaction);
|
|
2570
|
+
}
|
|
2571
|
+
if (transaction?.add) {
|
|
2572
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2573
|
+
}
|
|
2574
|
+
resolve({
|
|
2575
|
+
addedRows: transaction?.add,
|
|
2576
|
+
updatedRows: transaction?.update,
|
|
2577
|
+
removedRows: transaction?.remove,
|
|
2578
|
+
});
|
|
2579
|
+
});
|
|
2580
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2581
|
+
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2582
|
+
}
|
|
2583
|
+
});
|
|
2584
|
+
}
|
|
2585
|
+
else {
|
|
2586
|
+
const transaction = this.applyAgGridTransaction({
|
|
2587
|
+
update: updateDataRows,
|
|
2588
|
+
add: addDataRows,
|
|
2589
|
+
remove: removeDataRows,
|
|
2590
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2591
|
+
});
|
|
2592
|
+
if (transaction?.add) {
|
|
2593
|
+
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2594
|
+
}
|
|
2595
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2596
|
+
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2597
|
+
}
|
|
2598
|
+
return Promise.resolve({
|
|
2599
|
+
addedRows: transaction?.add,
|
|
2600
|
+
updatedRows: transaction?.update,
|
|
2601
|
+
removedRows: transaction?.remove,
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2411
2605
|
deleteRows(dataRows, dataUpdateConfig) {
|
|
2412
2606
|
dataUpdateConfig = dataUpdateConfig || {};
|
|
2413
2607
|
if (dataUpdateConfig.runAsync) {
|
|
@@ -2464,14 +2658,14 @@ You need to define at least one Layout!`);
|
|
|
2464
2658
|
}
|
|
2465
2659
|
autoSizeColumns(columnIds) {
|
|
2466
2660
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2467
|
-
this.logger.consoleError(`
|
|
2661
|
+
this.logger.consoleError(`Auto-sizing columns [${columnIds}] requires the AG Grid "ColumnAutoSizeModule". Please register this module.`);
|
|
2468
2662
|
return;
|
|
2469
2663
|
}
|
|
2470
2664
|
this.layoutManager.autoSizeColumns(columnIds);
|
|
2471
2665
|
}
|
|
2472
2666
|
autoSizeAllColumns() {
|
|
2473
2667
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2474
|
-
this.logger.consoleError(
|
|
2668
|
+
this.logger.consoleError('Auto-sizing all columns requires the AG Grid "ColumnAutoSizeModule". Please register this module.');
|
|
2475
2669
|
return;
|
|
2476
2670
|
}
|
|
2477
2671
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
@@ -2629,7 +2823,7 @@ You need to define at least one Layout!`);
|
|
|
2629
2823
|
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2630
2824
|
}
|
|
2631
2825
|
catch (error) {
|
|
2632
|
-
this.logger.consoleError(
|
|
2826
|
+
this.logger.consoleError('Failed to retrieve custom filter values.', column, error);
|
|
2633
2827
|
}
|
|
2634
2828
|
return customInFilterValuesResult;
|
|
2635
2829
|
}
|
|
@@ -2669,7 +2863,7 @@ You need to define at least one Layout!`);
|
|
|
2669
2863
|
customDistinctValues = await customEditColumnValues(customEditValuesContext);
|
|
2670
2864
|
}
|
|
2671
2865
|
catch (error) {
|
|
2672
|
-
this.logger.consoleError(
|
|
2866
|
+
this.logger.consoleError('Failed to retrieve custom edit values.', column, error);
|
|
2673
2867
|
}
|
|
2674
2868
|
return customDistinctValues ?? [];
|
|
2675
2869
|
}
|
|
@@ -3124,7 +3318,7 @@ You need to define at least one Layout!`);
|
|
|
3124
3318
|
if (this.getAgGridRowModelType() !== 'clientSide') {
|
|
3125
3319
|
// only in client-side row model can we loop through filtered&sorted rows
|
|
3126
3320
|
// see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
|
|
3127
|
-
this.logger.warn('
|
|
3321
|
+
this.logger.warn('forAllVisibleRowNodesDo() is only supported with client-side row model. Falling back to forAllRowNodesDo().');
|
|
3128
3322
|
return this.forAllRowNodesDo(func, config);
|
|
3129
3323
|
}
|
|
3130
3324
|
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
@@ -3176,14 +3370,14 @@ You need to define at least one Layout!`);
|
|
|
3176
3370
|
}
|
|
3177
3371
|
selectNode(rowNode, clearSelection) {
|
|
3178
3372
|
if (!rowNode) {
|
|
3179
|
-
this.logger.error('
|
|
3373
|
+
this.logger.error('Cannot select: row node is null.');
|
|
3180
3374
|
return;
|
|
3181
3375
|
}
|
|
3182
3376
|
rowNode.setSelected(true, clearSelection);
|
|
3183
3377
|
}
|
|
3184
3378
|
deSelectNode(rowNode, clearSelection) {
|
|
3185
3379
|
if (!rowNode) {
|
|
3186
|
-
this.logger.error('
|
|
3380
|
+
this.logger.error('Cannot deselect: row node is null.');
|
|
3187
3381
|
return;
|
|
3188
3382
|
}
|
|
3189
3383
|
rowNode.setSelected(false, clearSelection);
|
|
@@ -3271,7 +3465,7 @@ You need to define at least one Layout!`);
|
|
|
3271
3465
|
}
|
|
3272
3466
|
showChart(chartDefinition, container) {
|
|
3273
3467
|
if (!this.isReady) {
|
|
3274
|
-
this.logger.consoleError('
|
|
3468
|
+
this.logger.consoleError('Cannot call showChart before Adaptable is fully initialized.');
|
|
3275
3469
|
return null;
|
|
3276
3470
|
}
|
|
3277
3471
|
/**
|
|
@@ -3292,7 +3486,7 @@ You need to define at least one Layout!`);
|
|
|
3292
3486
|
}
|
|
3293
3487
|
updateChart(chart) {
|
|
3294
3488
|
if (!chart.Model) {
|
|
3295
|
-
this.logger.consoleError(`
|
|
3489
|
+
this.logger.consoleError(`Cannot update chart "${chart.Name}": the chart definition is missing the required Model property.`);
|
|
3296
3490
|
return;
|
|
3297
3491
|
}
|
|
3298
3492
|
const upgradableProperties = {
|
|
@@ -3304,12 +3498,21 @@ You need to define at least one Layout!`);
|
|
|
3304
3498
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
3305
3499
|
aggFunc: chart.Model.aggFunc,
|
|
3306
3500
|
};
|
|
3501
|
+
// Skip the AG Grid API call if the upgradable properties haven't changed
|
|
3502
|
+
// to avoid unnecessary chartOptionsChanged events (see #ag_grid_update_chart_loop)
|
|
3503
|
+
const currentModel = this.getChartModels().find((model) => model.chartId === chart.Model.chartId);
|
|
3504
|
+
if (currentModel &&
|
|
3505
|
+
Boolean(currentModel.unlinkChart) === upgradableProperties.unlinkChart &&
|
|
3506
|
+
Boolean(currentModel.suppressChartRanges) === upgradableProperties.suppressChartRanges &&
|
|
3507
|
+
currentModel.aggFunc === upgradableProperties.aggFunc) {
|
|
3508
|
+
return;
|
|
3509
|
+
}
|
|
3307
3510
|
// see also #ag_grid_update_chart_loop
|
|
3308
3511
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
3309
3512
|
}
|
|
3310
3513
|
getChartModels() {
|
|
3311
3514
|
if (!this.isReady) {
|
|
3312
|
-
this.logger.consoleError('
|
|
3515
|
+
this.logger.consoleError('Cannot call getChartModels before Adaptable is fully initialized.');
|
|
3313
3516
|
return [];
|
|
3314
3517
|
}
|
|
3315
3518
|
return this.agGridAdapter.getAgGridApi().getChartModels();
|
|
@@ -3343,7 +3546,7 @@ You need to define at least one Layout!`);
|
|
|
3343
3546
|
}
|
|
3344
3547
|
setAgGridQuickSearch(searchText) {
|
|
3345
3548
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
|
|
3346
|
-
this.logger.consoleError(
|
|
3549
|
+
this.logger.consoleError('Quick Search requires the AG Grid "QuickFilterModule". Please register this module to enable Quick Search.');
|
|
3347
3550
|
return;
|
|
3348
3551
|
}
|
|
3349
3552
|
this.agGridAdapter.setGridOption('quickFilterText', searchText);
|
|
@@ -3353,7 +3556,7 @@ You need to define at least one Layout!`);
|
|
|
3353
3556
|
}
|
|
3354
3557
|
setAgGridFindSearchValue(searchText) {
|
|
3355
3558
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
|
|
3356
|
-
this.logger.consoleError(
|
|
3559
|
+
this.logger.consoleError('Find Search requires the AG Grid "FindModule". Please register this module to enable Find Search.');
|
|
3357
3560
|
return;
|
|
3358
3561
|
}
|
|
3359
3562
|
this.agGridAdapter.setGridOption('findSearchValue', searchText);
|
|
@@ -3882,7 +4085,7 @@ You need to define at least one Layout!`);
|
|
|
3882
4085
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3883
4086
|
// if a Cell Data Change is undone, log to the Console
|
|
3884
4087
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
3885
|
-
this.logger.info(`
|
|
4088
|
+
this.logger.info(`Data change reverted: column="${cellDataChangedInfo.column}", primaryKey="${cellDataChangedInfo.primaryKeyValue}", from=${cellDataChangedInfo.newValue} to=${cellDataChangedInfo.oldValue}`);
|
|
3886
4089
|
}
|
|
3887
4090
|
// For Changes except Aggregations, reset cell selection if required
|
|
3888
4091
|
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
@@ -4087,7 +4290,7 @@ You need to define at least one Layout!`);
|
|
|
4087
4290
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
4088
4291
|
}
|
|
4089
4292
|
refreshAdaptableAfterLayoutChange(layout) {
|
|
4090
|
-
this.logger.info('
|
|
4293
|
+
this.logger.info('Refreshing Adaptable after layout change.');
|
|
4091
4294
|
const prevLayoutForRefresh = this.__prevLayoutForRefresh || this.api.layoutApi.getCurrentLayout();
|
|
4092
4295
|
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
4093
4296
|
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevLayoutForRefresh, layout);
|
|
@@ -4133,7 +4336,7 @@ You need to define at least one Layout!`);
|
|
|
4133
4336
|
.forEach((colType) => {
|
|
4134
4337
|
const newValidCellDataType = (0, VersionUpgrade20_1.mapOldTypeToDataType)(colType);
|
|
4135
4338
|
if (newValidCellDataType) {
|
|
4136
|
-
this.logger.consoleWarn(`Column ${columnDefinition.colId ?? columnDefinition.field}
|
|
4339
|
+
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.'}`);
|
|
4137
4340
|
}
|
|
4138
4341
|
});
|
|
4139
4342
|
});
|