@adaptabletools/adaptable 22.0.0-canary.1 → 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/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 +6 -6
- 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 +23 -12
- 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 -10
- package/src/Api/Implementation/GridApiImpl.js +36 -21
- 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 +113 -57
- 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 +3 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -3
- 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 +5 -6
- 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 +12 -8
- package/src/agGrid/AdaptableAgGrid.js +257 -111
- 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 ||
|
|
@@ -695,21 +758,90 @@ You need to define at least one Layout!`);
|
|
|
695
758
|
hideQuickFilter() {
|
|
696
759
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', 0);
|
|
697
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
|
+
}
|
|
698
837
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
699
838
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
700
|
-
this.logger
|
|
701
|
-
.warn(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
702
|
-
when no unique column is available, as it limits some Adaptable functionalities!
|
|
703
|
-
|
|
704
|
-
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}`);
|
|
705
840
|
this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
|
|
706
841
|
return this.adaptableOptions;
|
|
707
842
|
}
|
|
708
843
|
if (StringExtensions.IsNullOrEmpty(adaptableOptions.primaryKey)) {
|
|
709
|
-
this.logger.consoleError(`
|
|
710
|
-
As a fallback, you can set adaptableOptions.autogeneratedPrimaryKey = TRUE
|
|
711
|
-
|
|
712
|
-
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}`);
|
|
713
845
|
}
|
|
714
846
|
return adaptableOptions;
|
|
715
847
|
}
|
|
@@ -741,7 +873,7 @@ You need to define at least one Layout!`);
|
|
|
741
873
|
*/
|
|
742
874
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
|
|
743
875
|
if (original_defaultColDef?.headerValueGetter) {
|
|
744
|
-
this.logger.warn(
|
|
876
|
+
this.logger.warn('defaultColDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.columnHeader instead.');
|
|
745
877
|
return original_defaultColDef;
|
|
746
878
|
}
|
|
747
879
|
// #customize_header
|
|
@@ -758,7 +890,7 @@ You need to define at least one Layout!`);
|
|
|
758
890
|
*/
|
|
759
891
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColGroupDef', (original_defaultColGroupDef) => {
|
|
760
892
|
if (original_defaultColGroupDef?.headerValueGetter) {
|
|
761
|
-
this.logger.warn(
|
|
893
|
+
this.logger.warn('defaultColGroupDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.tableColumnHeader instead.');
|
|
762
894
|
return original_defaultColGroupDef;
|
|
763
895
|
}
|
|
764
896
|
const defaultColGroupDef = { ...original_defaultColGroupDef };
|
|
@@ -778,11 +910,11 @@ You need to define at least one Layout!`);
|
|
|
778
910
|
}
|
|
779
911
|
if (original_autoGroupColumnDef?.filter === false) {
|
|
780
912
|
// if user disables filter on autoGroupColumnDef, we respect that
|
|
781
|
-
this.logger.info(
|
|
913
|
+
this.logger.info('autoGroupColumnDef.filter is disabled via user configuration.');
|
|
782
914
|
return original_autoGroupColumnDef;
|
|
783
915
|
}
|
|
784
916
|
if (typeof original_autoGroupColumnDef?.filter === 'object') {
|
|
785
|
-
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.');
|
|
786
918
|
return original_autoGroupColumnDef;
|
|
787
919
|
}
|
|
788
920
|
const autoGroupColumnDef = { ...original_autoGroupColumnDef };
|
|
@@ -790,7 +922,7 @@ You need to define at least one Layout!`);
|
|
|
790
922
|
// !! DO NOT REMOVE THIS !!
|
|
791
923
|
// see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
|
|
792
924
|
autoGroupColumnDef.filterValueGetter = (params) => {
|
|
793
|
-
this.logger.
|
|
925
|
+
this.logger.consoleWarn('Unexpected invocation of autoGroupColumnDef.filterValueGetter. This is not expected under normal operation. Please contact support.', params);
|
|
794
926
|
return '';
|
|
795
927
|
};
|
|
796
928
|
// !! it is important that we always return the same component / handler instances
|
|
@@ -1104,16 +1236,7 @@ You need to define at least one Layout!`);
|
|
|
1104
1236
|
return original_sideBar;
|
|
1105
1237
|
}
|
|
1106
1238
|
const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
|
|
1107
|
-
const adaptableToolPanelDef =
|
|
1108
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
1109
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
1110
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
1111
|
-
labelKey: 'adaptable',
|
|
1112
|
-
iconKey: 'menu',
|
|
1113
|
-
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
1114
|
-
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
1115
|
-
// maxWidth = undefined,
|
|
1116
|
-
};
|
|
1239
|
+
const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
|
|
1117
1240
|
const mapToolPanelDefs = (toolPanelDefs = []) => {
|
|
1118
1241
|
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
1119
1242
|
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
@@ -1188,19 +1311,29 @@ You need to define at least one Layout!`);
|
|
|
1188
1311
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
1189
1312
|
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
1190
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
|
+
}
|
|
1191
1318
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
1192
1319
|
const context = {
|
|
1193
1320
|
Key: statusPanel.key,
|
|
1194
1321
|
};
|
|
1195
|
-
|
|
1322
|
+
const adaptablePanelDef = {
|
|
1196
1323
|
...statusPanel,
|
|
1197
1324
|
statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
|
|
1198
1325
|
};
|
|
1326
|
+
this.adaptableStatusPanelDefs.push(adaptablePanelDef);
|
|
1327
|
+
return adaptablePanelDef;
|
|
1199
1328
|
}
|
|
1200
1329
|
return statusPanel;
|
|
1201
1330
|
});
|
|
1202
1331
|
return { ...original_statusBar, statusPanels };
|
|
1203
1332
|
});
|
|
1333
|
+
this.hasAdaptableStatusBar = this.adaptableStatusPanelKeys.length > 0;
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
this.hasAdaptableStatusBar = false;
|
|
1204
1337
|
}
|
|
1205
1338
|
/**
|
|
1206
1339
|
* `getRowStyle`
|
|
@@ -1360,15 +1493,14 @@ You need to define at least one Layout!`);
|
|
|
1360
1493
|
const rowData = agGridApi.getGridOption('rowData');
|
|
1361
1494
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
1362
1495
|
if (this.initWithLazyData) {
|
|
1363
|
-
this.logger.info('
|
|
1496
|
+
this.logger.info('Initializing with lazy data (no initial rowData).');
|
|
1364
1497
|
}
|
|
1365
1498
|
if (!this.getAgGridContainerElement()) {
|
|
1366
1499
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
1367
1500
|
const gridRoot = this.agGridAdapter.getAgGridRootElement();
|
|
1368
1501
|
const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
|
|
1369
1502
|
if (!gridContainer) {
|
|
1370
|
-
this.logger.consoleError(
|
|
1371
|
-
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.');
|
|
1372
1504
|
}
|
|
1373
1505
|
this.DANGER_USE_GETTER_agGridContainerElement = gridContainer;
|
|
1374
1506
|
}
|
|
@@ -1376,7 +1508,7 @@ You need to define at least one Layout!`);
|
|
|
1376
1508
|
}
|
|
1377
1509
|
const agGridContainer = this.getAgGridContainerElement();
|
|
1378
1510
|
if (!agGridContainer) {
|
|
1379
|
-
this.logger.consoleError('
|
|
1511
|
+
this.logger.consoleError('AG Grid container element not found in the DOM. Please provide a valid element via ContainerOptions.agGridContainer.');
|
|
1380
1512
|
return Promise.resolve(false);
|
|
1381
1513
|
}
|
|
1382
1514
|
let gridParams;
|
|
@@ -1389,21 +1521,22 @@ You need to define at least one Layout!`);
|
|
|
1389
1521
|
useRowNodeLookUp() {
|
|
1390
1522
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1391
1523
|
}
|
|
1524
|
+
buildInitContainerContext() {
|
|
1525
|
+
return {
|
|
1526
|
+
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
1527
|
+
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
1528
|
+
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1392
1531
|
getAgGridContainerElement() {
|
|
1393
1532
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1394
|
-
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1395
|
-
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1396
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1397
|
-
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1533
|
+
this.DANGER_USE_GETTER_agGridContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.agGridContainer, this.buildInitContainerContext());
|
|
1398
1534
|
}
|
|
1399
1535
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1400
1536
|
}
|
|
1401
1537
|
getAdaptableContainerElement() {
|
|
1402
1538
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1403
|
-
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1404
|
-
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1405
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1406
|
-
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1539
|
+
this.DANGER_USE_GETTER_adaptableContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.adaptableContainer, this.buildInitContainerContext());
|
|
1407
1540
|
}
|
|
1408
1541
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1409
1542
|
}
|
|
@@ -1791,7 +1924,7 @@ You need to define at least one Layout!`);
|
|
|
1791
1924
|
// if no primary key column then lets check the first row to see if its a data item
|
|
1792
1925
|
const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
|
|
1793
1926
|
if (!primaryKeyDataItem) {
|
|
1794
|
-
errorMessage = `
|
|
1927
|
+
errorMessage = `Primary key column "${this.adaptableOptions.primaryKey}" not found. This will affect many Adaptable features.`;
|
|
1795
1928
|
if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
|
|
1796
1929
|
// show an alert if that is the option
|
|
1797
1930
|
this.api.alertApi.showAlertError('No Primary Key', errorMessage);
|
|
@@ -1848,12 +1981,12 @@ You need to define at least one Layout!`);
|
|
|
1848
1981
|
checkShouldClearExistingFiltersOrSearches() {
|
|
1849
1982
|
// if they have selected to clear Filters on startup then do it
|
|
1850
1983
|
if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
|
|
1851
|
-
this.logger.warn('Clearing
|
|
1984
|
+
this.logger.warn('Clearing saved filters (clearFiltersOnStartUp is enabled).');
|
|
1852
1985
|
this.api.filterApi.clearAllFilters();
|
|
1853
1986
|
}
|
|
1854
1987
|
// if they have selected to clear searches on startup then do it
|
|
1855
1988
|
if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
1856
|
-
this.logger.warn('Clearing
|
|
1989
|
+
this.logger.warn('Clearing saved Quick Search (clearQuickSearchOnStartUp is enabled).');
|
|
1857
1990
|
this.api.quickSearchApi.clearQuickSearch();
|
|
1858
1991
|
}
|
|
1859
1992
|
}
|
|
@@ -2066,6 +2199,7 @@ You need to define at least one Layout!`);
|
|
|
2066
2199
|
}
|
|
2067
2200
|
return rawValue;
|
|
2068
2201
|
}
|
|
2202
|
+
__updateColumnModelAndRefreshGrid_already_called = false;
|
|
2069
2203
|
updateColumnModelAndRefreshGrid() {
|
|
2070
2204
|
if (this.__updateColumnModelAndRefreshGrid_already_called) {
|
|
2071
2205
|
return;
|
|
@@ -2081,7 +2215,7 @@ You need to define at least one Layout!`);
|
|
|
2081
2215
|
}
|
|
2082
2216
|
}
|
|
2083
2217
|
_updateColumnModelAndRefreshGridNow() {
|
|
2084
|
-
this.logger.info(
|
|
2218
|
+
this.logger.info('Updating column model and refreshing grid.');
|
|
2085
2219
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2086
2220
|
this.agGridColumnAdapter.setupColumns();
|
|
2087
2221
|
this.redrawBody();
|
|
@@ -2107,7 +2241,7 @@ You need to define at least one Layout!`);
|
|
|
2107
2241
|
this.agGridAdapter.getAgGridApi().redrawRows(redrawRowsParams);
|
|
2108
2242
|
}
|
|
2109
2243
|
catch (ex) {
|
|
2110
|
-
this.logger.consoleError('AG Grid redrawRows
|
|
2244
|
+
this.logger.consoleError('AG Grid redrawRows failed to locate some row nodes.', rowNodes, ex);
|
|
2111
2245
|
}
|
|
2112
2246
|
}
|
|
2113
2247
|
redrawRow(rowNode) {
|
|
@@ -2401,31 +2535,34 @@ You need to define at least one Layout!`);
|
|
|
2401
2535
|
});
|
|
2402
2536
|
}
|
|
2403
2537
|
}
|
|
2404
|
-
async
|
|
2538
|
+
async manageGridRows(dataRowConfig, dataUpdateConfig = {}) {
|
|
2405
2539
|
const result = {
|
|
2406
2540
|
addedRows: [],
|
|
2407
2541
|
updatedRows: [],
|
|
2408
2542
|
removedRows: [],
|
|
2409
2543
|
};
|
|
2410
|
-
if (!
|
|
2544
|
+
if (!dataRowConfig) {
|
|
2545
|
+
return result;
|
|
2546
|
+
}
|
|
2547
|
+
if (!dataRowConfig.addRows || !dataRowConfig.updateRows || !dataRowConfig.deleteRows) {
|
|
2411
2548
|
return result;
|
|
2412
2549
|
}
|
|
2413
|
-
const addDataRows =
|
|
2414
|
-
const updateDataRows =
|
|
2415
|
-
const removeDataRows =
|
|
2550
|
+
const addDataRows = dataRowConfig.addRows;
|
|
2551
|
+
const updateDataRows = dataRowConfig.updateRows;
|
|
2552
|
+
const removeDataRows = dataRowConfig.deleteRows;
|
|
2416
2553
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2417
2554
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2418
2555
|
}
|
|
2419
|
-
if (
|
|
2556
|
+
if (dataUpdateConfig.runAsync) {
|
|
2420
2557
|
return new Promise((resolve) => {
|
|
2421
2558
|
this.applyAgGridTransactionAsync({
|
|
2422
2559
|
update: updateDataRows,
|
|
2423
2560
|
add: addDataRows,
|
|
2424
2561
|
remove: removeDataRows,
|
|
2425
|
-
addIndex:
|
|
2562
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2426
2563
|
}, (transaction) => {
|
|
2427
|
-
if (typeof
|
|
2428
|
-
|
|
2564
|
+
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2565
|
+
dataUpdateConfig.callback(transaction);
|
|
2429
2566
|
}
|
|
2430
2567
|
if (transaction?.add) {
|
|
2431
2568
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
@@ -2436,7 +2573,7 @@ You need to define at least one Layout!`);
|
|
|
2436
2573
|
removedRows: transaction?.remove,
|
|
2437
2574
|
});
|
|
2438
2575
|
});
|
|
2439
|
-
if (
|
|
2576
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2440
2577
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2441
2578
|
}
|
|
2442
2579
|
});
|
|
@@ -2446,12 +2583,12 @@ You need to define at least one Layout!`);
|
|
|
2446
2583
|
update: updateDataRows,
|
|
2447
2584
|
add: addDataRows,
|
|
2448
2585
|
remove: removeDataRows,
|
|
2449
|
-
addIndex:
|
|
2586
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2450
2587
|
});
|
|
2451
2588
|
if (transaction?.add) {
|
|
2452
2589
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2453
2590
|
}
|
|
2454
|
-
if (
|
|
2591
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2455
2592
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2456
2593
|
}
|
|
2457
2594
|
return Promise.resolve({
|
|
@@ -2517,14 +2654,14 @@ You need to define at least one Layout!`);
|
|
|
2517
2654
|
}
|
|
2518
2655
|
autoSizeColumns(columnIds) {
|
|
2519
2656
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2520
|
-
this.logger.consoleError(`
|
|
2657
|
+
this.logger.consoleError(`Auto-sizing columns [${columnIds}] requires the AG Grid "ColumnAutoSizeModule". Please register this module.`);
|
|
2521
2658
|
return;
|
|
2522
2659
|
}
|
|
2523
2660
|
this.layoutManager.autoSizeColumns(columnIds);
|
|
2524
2661
|
}
|
|
2525
2662
|
autoSizeAllColumns() {
|
|
2526
2663
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2527
|
-
this.logger.consoleError(
|
|
2664
|
+
this.logger.consoleError('Auto-sizing all columns requires the AG Grid "ColumnAutoSizeModule". Please register this module.');
|
|
2528
2665
|
return;
|
|
2529
2666
|
}
|
|
2530
2667
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
@@ -2682,7 +2819,7 @@ You need to define at least one Layout!`);
|
|
|
2682
2819
|
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2683
2820
|
}
|
|
2684
2821
|
catch (error) {
|
|
2685
|
-
this.logger.consoleError(
|
|
2822
|
+
this.logger.consoleError('Failed to retrieve custom filter values.', column, error);
|
|
2686
2823
|
}
|
|
2687
2824
|
return customInFilterValuesResult;
|
|
2688
2825
|
}
|
|
@@ -2722,7 +2859,7 @@ You need to define at least one Layout!`);
|
|
|
2722
2859
|
customDistinctValues = await customEditColumnValues(customEditValuesContext);
|
|
2723
2860
|
}
|
|
2724
2861
|
catch (error) {
|
|
2725
|
-
this.logger.consoleError(
|
|
2862
|
+
this.logger.consoleError('Failed to retrieve custom edit values.', column, error);
|
|
2726
2863
|
}
|
|
2727
2864
|
return customDistinctValues ?? [];
|
|
2728
2865
|
}
|
|
@@ -3177,7 +3314,7 @@ You need to define at least one Layout!`);
|
|
|
3177
3314
|
if (this.getAgGridRowModelType() !== 'clientSide') {
|
|
3178
3315
|
// only in client-side row model can we loop through filtered&sorted rows
|
|
3179
3316
|
// see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
|
|
3180
|
-
this.logger.warn('
|
|
3317
|
+
this.logger.warn('forAllVisibleRowNodesDo() is only supported with client-side row model. Falling back to forAllRowNodesDo().');
|
|
3181
3318
|
return this.forAllRowNodesDo(func, config);
|
|
3182
3319
|
}
|
|
3183
3320
|
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
@@ -3229,14 +3366,14 @@ You need to define at least one Layout!`);
|
|
|
3229
3366
|
}
|
|
3230
3367
|
selectNode(rowNode, clearSelection) {
|
|
3231
3368
|
if (!rowNode) {
|
|
3232
|
-
this.logger.error('
|
|
3369
|
+
this.logger.error('Cannot select: row node is null.');
|
|
3233
3370
|
return;
|
|
3234
3371
|
}
|
|
3235
3372
|
rowNode.setSelected(true, clearSelection);
|
|
3236
3373
|
}
|
|
3237
3374
|
deSelectNode(rowNode, clearSelection) {
|
|
3238
3375
|
if (!rowNode) {
|
|
3239
|
-
this.logger.error('
|
|
3376
|
+
this.logger.error('Cannot deselect: row node is null.');
|
|
3240
3377
|
return;
|
|
3241
3378
|
}
|
|
3242
3379
|
rowNode.setSelected(false, clearSelection);
|
|
@@ -3324,7 +3461,7 @@ You need to define at least one Layout!`);
|
|
|
3324
3461
|
}
|
|
3325
3462
|
showChart(chartDefinition, container) {
|
|
3326
3463
|
if (!this.isReady) {
|
|
3327
|
-
this.logger.consoleError('
|
|
3464
|
+
this.logger.consoleError('Cannot call showChart before Adaptable is fully initialized.');
|
|
3328
3465
|
return null;
|
|
3329
3466
|
}
|
|
3330
3467
|
/**
|
|
@@ -3345,7 +3482,7 @@ You need to define at least one Layout!`);
|
|
|
3345
3482
|
}
|
|
3346
3483
|
updateChart(chart) {
|
|
3347
3484
|
if (!chart.Model) {
|
|
3348
|
-
this.logger.consoleError(`
|
|
3485
|
+
this.logger.consoleError(`Cannot update chart "${chart.Name}": the chart definition is missing the required Model property.`);
|
|
3349
3486
|
return;
|
|
3350
3487
|
}
|
|
3351
3488
|
const upgradableProperties = {
|
|
@@ -3357,12 +3494,21 @@ You need to define at least one Layout!`);
|
|
|
3357
3494
|
suppressChartRanges: Boolean(chart.Model.suppressChartRanges),
|
|
3358
3495
|
aggFunc: chart.Model.aggFunc,
|
|
3359
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
|
+
}
|
|
3360
3506
|
// see also #ag_grid_update_chart_loop
|
|
3361
3507
|
this.agGridAdapter.getAgGridApi().updateChart(upgradableProperties);
|
|
3362
3508
|
}
|
|
3363
3509
|
getChartModels() {
|
|
3364
3510
|
if (!this.isReady) {
|
|
3365
|
-
this.logger.consoleError('
|
|
3511
|
+
this.logger.consoleError('Cannot call getChartModels before Adaptable is fully initialized.');
|
|
3366
3512
|
return [];
|
|
3367
3513
|
}
|
|
3368
3514
|
return this.agGridAdapter.getAgGridApi().getChartModels();
|
|
@@ -3396,7 +3542,7 @@ You need to define at least one Layout!`);
|
|
|
3396
3542
|
}
|
|
3397
3543
|
setAgGridQuickSearch(searchText) {
|
|
3398
3544
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
|
|
3399
|
-
this.logger.consoleError(
|
|
3545
|
+
this.logger.consoleError('Quick Search requires the AG Grid "QuickFilterModule". Please register this module to enable Quick Search.');
|
|
3400
3546
|
return;
|
|
3401
3547
|
}
|
|
3402
3548
|
this.agGridAdapter.setGridOption('quickFilterText', searchText);
|
|
@@ -3406,7 +3552,7 @@ You need to define at least one Layout!`);
|
|
|
3406
3552
|
}
|
|
3407
3553
|
setAgGridFindSearchValue(searchText) {
|
|
3408
3554
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
|
|
3409
|
-
this.logger.consoleError(
|
|
3555
|
+
this.logger.consoleError('Find Search requires the AG Grid "FindModule". Please register this module to enable Find Search.');
|
|
3410
3556
|
return;
|
|
3411
3557
|
}
|
|
3412
3558
|
this.agGridAdapter.setGridOption('findSearchValue', searchText);
|
|
@@ -3935,7 +4081,7 @@ You need to define at least one Layout!`);
|
|
|
3935
4081
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
3936
4082
|
// if a Cell Data Change is undone, log to the Console
|
|
3937
4083
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
3938
|
-
this.logger.info(`
|
|
4084
|
+
this.logger.info(`Data change reverted: column="${cellDataChangedInfo.column}", primaryKey="${cellDataChangedInfo.primaryKeyValue}", from=${cellDataChangedInfo.newValue} to=${cellDataChangedInfo.oldValue}`);
|
|
3939
4085
|
}
|
|
3940
4086
|
// For Changes except Aggregations, reset cell selection if required
|
|
3941
4087
|
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
@@ -4140,7 +4286,7 @@ You need to define at least one Layout!`);
|
|
|
4140
4286
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
4141
4287
|
}
|
|
4142
4288
|
refreshAdaptableAfterLayoutChange(layout) {
|
|
4143
|
-
this.logger.info('
|
|
4289
|
+
this.logger.info('Refreshing Adaptable after layout change.');
|
|
4144
4290
|
const prevLayoutForRefresh = this.__prevLayoutForRefresh || this.api.layoutApi.getCurrentLayout();
|
|
4145
4291
|
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
4146
4292
|
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevLayoutForRefresh, layout);
|
|
@@ -4186,7 +4332,7 @@ You need to define at least one Layout!`);
|
|
|
4186
4332
|
.forEach((colType) => {
|
|
4187
4333
|
const newValidCellDataType = mapOldTypeToDataType(colType);
|
|
4188
4334
|
if (newValidCellDataType) {
|
|
4189
|
-
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.'}`);
|
|
4190
4336
|
}
|
|
4191
4337
|
});
|
|
4192
4338
|
});
|