@adaptabletools/adaptable 22.0.0-canary.6 → 22.0.0-canary.8
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/index.css +63 -74
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/AlertState.d.ts +1 -2
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableRowContext.js +1 -0
- package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +7 -0
- package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
- package/src/AdaptableState/Common/NamedObject.js +1 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +2 -2
- package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
- package/src/AdaptableState/Common/SuspendableObject.js +1 -0
- package/src/AdaptableState/Common/TransposeConfig.d.ts +11 -9
- package/src/AdaptableState/CustomSortState.d.ts +1 -1
- package/src/AdaptableState/FormatColumnState.d.ts +1 -1
- package/src/AdaptableState/InitialState.d.ts +9 -0
- package/src/AdaptableState/LayoutState.d.ts +2 -3
- package/src/AdaptableState/PlusMinusState.d.ts +1 -1
- package/src/AdaptableState/ShortcutState.d.ts +1 -1
- package/src/AdaptableState/StyledColumnState.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 +6 -0
- package/src/Api/FlashingCellApi.d.ts +6 -0
- package/src/Api/FormatColumnApi.d.ts +10 -4
- package/src/Api/GridApi.d.ts +5 -9
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +5 -6
- package/src/Api/Implementation/ChartingApiImpl.js +2 -2
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
- package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
- package/src/Api/Implementation/GridApiImpl.d.ts +2 -6
- package/src/Api/Implementation/GridApiImpl.js +9 -9
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +4 -1
- package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +6 -9
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- 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/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableStore.js +45 -16
- package/src/Strategy/BulkUpdateModule.js +8 -8
- package/src/Strategy/PlusMinusModule.js +1 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/SettingsPanelModule.js +11 -7
- package/src/Strategy/SmartEditModule.js +10 -10
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Fdc3Service.js +4 -4
- package/src/Utilities/Services/ModuleService.js +1 -3
- package/src/Utilities/Services/ThemeService.js +2 -6
- package/src/Utilities/Services/ValidationService.js +1 -1
- 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/Alert/Wizard/isValidAlertRules.js +1 -1
- 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/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
- package/src/View/Components/NewScopeComponent.js +3 -3
- 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/WizardSummaryPage.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
- 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/RowSummarySection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
- package/src/View/StateManagement/handleExportState.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/UIHelper.d.ts +2 -1
- package/src/View/UIHelper.js +8 -14
- package/src/agGrid/Adaptable.js +11 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
- package/src/agGrid/AdaptableAgGrid.js +150 -82
- package/src/agGrid/AgGridAdapter.js +8 -8
- package/src/agGrid/AgGridColumnAdapter.js +1 -1
- package/src/agGrid/AgGridExportAdapter.js +5 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +1 -1
- package/src/agGrid/AgGridMenuAdapter.js +9 -1
- package/src/agGrid/AgGridThemeAdapter.js +2 -2
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +62 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +2 -2
- package/src/migration/VersionUpgrade17.js +4 -4
- package/src/migration/VersionUpgrade20.js +4 -4
- package/src/types.d.ts +5 -2
- package/themes/dark.css +30 -29
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
|
@@ -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';
|
|
@@ -221,6 +222,8 @@ export class AdaptableAgGrid {
|
|
|
221
222
|
* Temporary, these are MIGRATION technical debts, and should be removed as soon as possible
|
|
222
223
|
*/
|
|
223
224
|
adaptableStatusPanelKeys = [];
|
|
225
|
+
adaptableStatusPanelDefs = [];
|
|
226
|
+
hasAdaptableStatusBar;
|
|
224
227
|
// see #no_additional_react_root
|
|
225
228
|
_PRIVATE_adaptableJSXElement;
|
|
226
229
|
_prevLayout;
|
|
@@ -359,7 +362,7 @@ export class AdaptableAgGrid {
|
|
|
359
362
|
this.adaptableOptions = this.normalizeAdaptableOptions(this.adaptableOptions);
|
|
360
363
|
const { showLoadingScreen, loadingScreenDelay, loadingScreenText, loadingScreenTitle } = this.adaptableOptions.userInterfaceOptions.loadingScreenOptions;
|
|
361
364
|
if (showLoadingScreen) {
|
|
362
|
-
this.logger.info(
|
|
365
|
+
this.logger.info('Showing loading screen');
|
|
363
366
|
// it's important to use ensureLoadingScreenPortalElement
|
|
364
367
|
// and not ensurePortalElement, because multiple adaptable instances share the same portal element
|
|
365
368
|
// so when displaying the second one, the react root associated to the portal element
|
|
@@ -375,7 +378,7 @@ export class AdaptableAgGrid {
|
|
|
375
378
|
}), portalElement);
|
|
376
379
|
}
|
|
377
380
|
else {
|
|
378
|
-
this.logger.consoleError(
|
|
381
|
+
this.logger.consoleError('Failed to create loading screen portal element.');
|
|
379
382
|
}
|
|
380
383
|
}
|
|
381
384
|
this.forPlugins((plugin) => plugin.afterInitOptions(this, this.adaptableOptions));
|
|
@@ -434,7 +437,7 @@ export class AdaptableAgGrid {
|
|
|
434
437
|
// see #map_dateString_to_date
|
|
435
438
|
this.agGridAdapter.patchColDefs(columnDefs, (colDef) => {
|
|
436
439
|
if (colDef.cellDataType === 'dateString') {
|
|
437
|
-
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.`);
|
|
438
441
|
colDef.cellDataType = 'date';
|
|
439
442
|
}
|
|
440
443
|
});
|
|
@@ -465,8 +468,8 @@ export class AdaptableAgGrid {
|
|
|
465
468
|
const agGridApi = await this.initializeAgGrid(gridOptions, config.modules, config.renderAgGridFrameworkComponent);
|
|
466
469
|
if (agGridApi === false) {
|
|
467
470
|
this.midwayDestroy();
|
|
468
|
-
this.logger.consoleError(
|
|
469
|
-
return Promise.reject('
|
|
471
|
+
this.logger.consoleError('Failed to initialize AG Grid.');
|
|
472
|
+
return Promise.reject('Failed to initialize AG Grid.');
|
|
470
473
|
}
|
|
471
474
|
this.layoutManager = new LayoutManager({
|
|
472
475
|
gridApi: agGridApi,
|
|
@@ -491,7 +494,7 @@ export class AdaptableAgGrid {
|
|
|
491
494
|
this.layoutManager.onColumnDefsChanged(() => {
|
|
492
495
|
this.updateColumnModelAndRefreshGrid();
|
|
493
496
|
});
|
|
494
|
-
this.logger.info(
|
|
497
|
+
this.logger.info('Hiding loading screen');
|
|
495
498
|
this.unmountLoadingScreen?.();
|
|
496
499
|
perfInitAgGrid.end();
|
|
497
500
|
initAgGridMarker.end();
|
|
@@ -502,7 +505,7 @@ export class AdaptableAgGrid {
|
|
|
502
505
|
this.lifecycleState = 'agGridReady';
|
|
503
506
|
this.api.entitlementApi.internalApi.setModulesAgGridDepsInfos();
|
|
504
507
|
this.ModuleService.logMissingAgGridDepsInfos();
|
|
505
|
-
this.logger.info(
|
|
508
|
+
this.logger.info('Registered AG Grid modules (including dependents):', this.agGridModulesAdapter.getAgGridRegisteredModuleNames().sort());
|
|
506
509
|
/**
|
|
507
510
|
* At this point AG Grid is initialized!
|
|
508
511
|
*/
|
|
@@ -592,10 +595,7 @@ export class AdaptableAgGrid {
|
|
|
592
595
|
const layoutState = state.Layout;
|
|
593
596
|
// ensure that at least one Layout has been provided
|
|
594
597
|
if (!layoutState || !layoutState.Layouts?.length) {
|
|
595
|
-
this.logger
|
|
596
|
-
.consoleError(`You have not defined any Layout in your InitialState.Layout.Layouts[] state!
|
|
597
|
-
|
|
598
|
-
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.');
|
|
599
599
|
}
|
|
600
600
|
// ensure CurrentLayout is valid
|
|
601
601
|
if (!layoutState.CurrentLayout ||
|
|
@@ -758,21 +758,90 @@ You need to define at least one Layout!`);
|
|
|
758
758
|
hideQuickFilter() {
|
|
759
759
|
this.agGridAdapter.getAgGridApi().setGridOption('floatingFiltersHeight', 0);
|
|
760
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
|
+
}
|
|
761
837
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
762
838
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
763
|
-
this.logger
|
|
764
|
-
.warn(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
765
|
-
when no unique column is available, as it limits some Adaptable functionalities!
|
|
766
|
-
|
|
767
|
-
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}`);
|
|
768
840
|
this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
|
|
769
841
|
return this.adaptableOptions;
|
|
770
842
|
}
|
|
771
843
|
if (StringExtensions.IsNullOrEmpty(adaptableOptions.primaryKey)) {
|
|
772
|
-
this.logger.consoleError(`
|
|
773
|
-
As a fallback, you can set adaptableOptions.autogeneratedPrimaryKey = TRUE
|
|
774
|
-
|
|
775
|
-
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}`);
|
|
776
845
|
}
|
|
777
846
|
return adaptableOptions;
|
|
778
847
|
}
|
|
@@ -804,7 +873,7 @@ You need to define at least one Layout!`);
|
|
|
804
873
|
*/
|
|
805
874
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColDef', (original_defaultColDef) => {
|
|
806
875
|
if (original_defaultColDef?.headerValueGetter) {
|
|
807
|
-
this.logger.warn(
|
|
876
|
+
this.logger.warn('defaultColDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.columnHeader instead.');
|
|
808
877
|
return original_defaultColDef;
|
|
809
878
|
}
|
|
810
879
|
// #customize_header
|
|
@@ -821,7 +890,7 @@ You need to define at least one Layout!`);
|
|
|
821
890
|
*/
|
|
822
891
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'defaultColGroupDef', (original_defaultColGroupDef) => {
|
|
823
892
|
if (original_defaultColGroupDef?.headerValueGetter) {
|
|
824
|
-
this.logger.warn(
|
|
893
|
+
this.logger.warn('defaultColGroupDef.headerValueGetter overrides the Adaptable header mechanism. Consider using ColumnOptions.tableColumnHeader instead.');
|
|
825
894
|
return original_defaultColGroupDef;
|
|
826
895
|
}
|
|
827
896
|
const defaultColGroupDef = { ...original_defaultColGroupDef };
|
|
@@ -841,12 +910,11 @@ You need to define at least one Layout!`);
|
|
|
841
910
|
}
|
|
842
911
|
if (original_autoGroupColumnDef?.filter === false) {
|
|
843
912
|
// if user disables filter on autoGroupColumnDef, we respect that
|
|
844
|
-
this.logger.info(
|
|
913
|
+
this.logger.info('autoGroupColumnDef.filter is disabled via user configuration.');
|
|
845
914
|
return original_autoGroupColumnDef;
|
|
846
915
|
}
|
|
847
916
|
if (typeof original_autoGroupColumnDef?.filter === 'object') {
|
|
848
|
-
this.logger.consoleWarn(
|
|
849
|
-
Please contact the Adaptable Support Team for further assistance and investigation.`);
|
|
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.');
|
|
850
918
|
return original_autoGroupColumnDef;
|
|
851
919
|
}
|
|
852
920
|
const autoGroupColumnDef = { ...original_autoGroupColumnDef };
|
|
@@ -854,8 +922,7 @@ You need to define at least one Layout!`);
|
|
|
854
922
|
// !! DO NOT REMOVE THIS !!
|
|
855
923
|
// see https://github.com/ag-grid/ag-grid/blob/6f43ff257c2e285068eb425b655e58d6eeb89816/packages/ag-grid-enterprise/src/rowHierarchy/autoColService.ts#L225
|
|
856
924
|
autoGroupColumnDef.filterValueGetter = (params) => {
|
|
857
|
-
this.logger.consoleWarn(
|
|
858
|
-
Please contact the Adaptable Support Team for further assistance and investigation.`, params);
|
|
925
|
+
this.logger.consoleWarn('Unexpected invocation of autoGroupColumnDef.filterValueGetter. This is not expected under normal operation. Please contact support.', params);
|
|
859
926
|
return '';
|
|
860
927
|
};
|
|
861
928
|
// !! it is important that we always return the same component / handler instances
|
|
@@ -1169,16 +1236,7 @@ You need to define at least one Layout!`);
|
|
|
1169
1236
|
return original_sideBar;
|
|
1170
1237
|
}
|
|
1171
1238
|
const isAdaptableToolPanelHidden = this.api.entitlementApi.isModuleHiddenEntitlement('ToolPanel');
|
|
1172
|
-
const adaptableToolPanelDef =
|
|
1173
|
-
id: GeneralConstants.ADAPTABLE_TOOLPANEL_ID,
|
|
1174
|
-
toolPanel: GeneralConstants.ADAPTABLE_TOOLPANEL_COMPONENT,
|
|
1175
|
-
labelDefault: GeneralConstants.ADAPTABLE,
|
|
1176
|
-
labelKey: 'adaptable',
|
|
1177
|
-
iconKey: 'menu',
|
|
1178
|
-
width: UIHelper.getAdaptableToolPanelWidth(),
|
|
1179
|
-
minWidth: UIHelper.getAdaptableToolPanelWidth(),
|
|
1180
|
-
// maxWidth = undefined,
|
|
1181
|
-
};
|
|
1239
|
+
const adaptableToolPanelDef = this.buildAdaptableToolPanelDef();
|
|
1182
1240
|
const mapToolPanelDefs = (toolPanelDefs = []) => {
|
|
1183
1241
|
// if it's an alias for the adaptable tool panel, map it to a ToolPanelDef, otherwise return it as it is
|
|
1184
1242
|
return toolPanelDefs.map((toolPanelDef) => toolPanelDef === GeneralConstants.ADAPTABLE_TOOLPANEL_ID
|
|
@@ -1253,19 +1311,29 @@ You need to define at least one Layout!`);
|
|
|
1253
1311
|
this.agGridOptionsService.setGridOptionsProperty(gridOptions, 'statusBar', (original_statusBar) => {
|
|
1254
1312
|
const statusPanels = (original_statusBar?.statusPanels ?? [])?.map((statusPanel) => {
|
|
1255
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
|
+
}
|
|
1256
1318
|
this.adaptableStatusPanelKeys.push(statusPanel.key);
|
|
1257
1319
|
const context = {
|
|
1258
1320
|
Key: statusPanel.key,
|
|
1259
1321
|
};
|
|
1260
|
-
|
|
1322
|
+
const adaptablePanelDef = {
|
|
1261
1323
|
...statusPanel,
|
|
1262
1324
|
statusPanel: createAgStatusPanelComponent(AdaptableStatusBar, this, context),
|
|
1263
1325
|
};
|
|
1326
|
+
this.adaptableStatusPanelDefs.push(adaptablePanelDef);
|
|
1327
|
+
return adaptablePanelDef;
|
|
1264
1328
|
}
|
|
1265
1329
|
return statusPanel;
|
|
1266
1330
|
});
|
|
1267
1331
|
return { ...original_statusBar, statusPanels };
|
|
1268
1332
|
});
|
|
1333
|
+
this.hasAdaptableStatusBar = this.adaptableStatusPanelKeys.length > 0;
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
this.hasAdaptableStatusBar = false;
|
|
1269
1337
|
}
|
|
1270
1338
|
/**
|
|
1271
1339
|
* `getRowStyle`
|
|
@@ -1425,15 +1493,14 @@ You need to define at least one Layout!`);
|
|
|
1425
1493
|
const rowData = agGridApi.getGridOption('rowData');
|
|
1426
1494
|
this.initWithLazyData = rowData == undefined || rowData.length === 0;
|
|
1427
1495
|
if (this.initWithLazyData) {
|
|
1428
|
-
this.logger.info('
|
|
1496
|
+
this.logger.info('Initializing with lazy data (no initial rowData).');
|
|
1429
1497
|
}
|
|
1430
1498
|
if (!this.getAgGridContainerElement()) {
|
|
1431
1499
|
// initialize the agGridContainerElement from the AgGrid instance
|
|
1432
1500
|
const gridRoot = this.agGridAdapter.getAgGridRootElement();
|
|
1433
1501
|
const gridContainer = gridRoot?.closest('[class*="ag-theme"]');
|
|
1434
1502
|
if (!gridContainer) {
|
|
1435
|
-
this.logger.consoleError(
|
|
1436
|
-
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.');
|
|
1437
1504
|
}
|
|
1438
1505
|
this.DANGER_USE_GETTER_agGridContainerElement = gridContainer;
|
|
1439
1506
|
}
|
|
@@ -1441,7 +1508,7 @@ You need to define at least one Layout!`);
|
|
|
1441
1508
|
}
|
|
1442
1509
|
const agGridContainer = this.getAgGridContainerElement();
|
|
1443
1510
|
if (!agGridContainer) {
|
|
1444
|
-
this.logger.consoleError('
|
|
1511
|
+
this.logger.consoleError('AG Grid container element not found in the DOM. Please provide a valid element via ContainerOptions.agGridContainer.');
|
|
1445
1512
|
return Promise.resolve(false);
|
|
1446
1513
|
}
|
|
1447
1514
|
let gridParams;
|
|
@@ -1454,21 +1521,22 @@ You need to define at least one Layout!`);
|
|
|
1454
1521
|
useRowNodeLookUp() {
|
|
1455
1522
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1456
1523
|
}
|
|
1524
|
+
buildInitContainerContext() {
|
|
1525
|
+
return {
|
|
1526
|
+
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
1527
|
+
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
1528
|
+
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1457
1531
|
getAgGridContainerElement() {
|
|
1458
1532
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1459
|
-
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1460
|
-
typeof this.adaptableOptions?.containerOptions?.agGridContainer === 'string'
|
|
1461
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.agGridContainer)
|
|
1462
|
-
: this.adaptableOptions?.containerOptions?.agGridContainer;
|
|
1533
|
+
this.DANGER_USE_GETTER_agGridContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.agGridContainer, this.buildInitContainerContext());
|
|
1463
1534
|
}
|
|
1464
1535
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1465
1536
|
}
|
|
1466
1537
|
getAdaptableContainerElement() {
|
|
1467
1538
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1468
|
-
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1469
|
-
typeof this.adaptableOptions?.containerOptions?.adaptableContainer === 'string'
|
|
1470
|
-
? document.getElementById(this.adaptableOptions?.containerOptions?.adaptableContainer)
|
|
1471
|
-
: this.adaptableOptions?.containerOptions?.adaptableContainer;
|
|
1539
|
+
this.DANGER_USE_GETTER_adaptableContainerElement = resolveContainerElement(this.adaptableOptions?.containerOptions?.adaptableContainer, this.buildInitContainerContext());
|
|
1472
1540
|
}
|
|
1473
1541
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1474
1542
|
}
|
|
@@ -1856,7 +1924,7 @@ You need to define at least one Layout!`);
|
|
|
1856
1924
|
// if no primary key column then lets check the first row to see if its a data item
|
|
1857
1925
|
const primaryKeyDataItem = this.getFirstRowNode()?.data[primaryKey];
|
|
1858
1926
|
if (!primaryKeyDataItem) {
|
|
1859
|
-
errorMessage = `
|
|
1927
|
+
errorMessage = `Primary key column "${this.adaptableOptions.primaryKey}" not found. This will affect many Adaptable features.`;
|
|
1860
1928
|
if (this.adaptableOptions.alertOptions.showMissingPrimaryKeyAlert) {
|
|
1861
1929
|
// show an alert if that is the option
|
|
1862
1930
|
this.api.alertApi.showAlertError('No Primary Key', errorMessage);
|
|
@@ -1913,12 +1981,12 @@ You need to define at least one Layout!`);
|
|
|
1913
1981
|
checkShouldClearExistingFiltersOrSearches() {
|
|
1914
1982
|
// if they have selected to clear Filters on startup then do it
|
|
1915
1983
|
if (this.adaptableOptions.filterOptions.clearFiltersOnStartUp) {
|
|
1916
|
-
this.logger.warn('Clearing
|
|
1984
|
+
this.logger.warn('Clearing saved filters (clearFiltersOnStartUp is enabled).');
|
|
1917
1985
|
this.api.filterApi.clearAllFilters();
|
|
1918
1986
|
}
|
|
1919
1987
|
// if they have selected to clear searches on startup then do it
|
|
1920
1988
|
if (this.adaptableOptions.quickSearchOptions.clearQuickSearchOnStartUp) {
|
|
1921
|
-
this.logger.warn('Clearing
|
|
1989
|
+
this.logger.warn('Clearing saved Quick Search (clearQuickSearchOnStartUp is enabled).');
|
|
1922
1990
|
this.api.quickSearchApi.clearQuickSearch();
|
|
1923
1991
|
}
|
|
1924
1992
|
}
|
|
@@ -2147,7 +2215,7 @@ You need to define at least one Layout!`);
|
|
|
2147
2215
|
}
|
|
2148
2216
|
}
|
|
2149
2217
|
_updateColumnModelAndRefreshGridNow() {
|
|
2150
|
-
this.logger.info(
|
|
2218
|
+
this.logger.info('Updating column model and refreshing grid.');
|
|
2151
2219
|
this.deriveAdaptableColumnStateFromAgGrid();
|
|
2152
2220
|
this.agGridColumnAdapter.setupColumns();
|
|
2153
2221
|
this.redrawBody();
|
|
@@ -2173,7 +2241,7 @@ You need to define at least one Layout!`);
|
|
|
2173
2241
|
this.agGridAdapter.getAgGridApi().redrawRows(redrawRowsParams);
|
|
2174
2242
|
}
|
|
2175
2243
|
catch (ex) {
|
|
2176
|
-
this.logger.consoleError('AG Grid redrawRows
|
|
2244
|
+
this.logger.consoleError('AG Grid redrawRows failed to locate some row nodes.', rowNodes, ex);
|
|
2177
2245
|
}
|
|
2178
2246
|
}
|
|
2179
2247
|
redrawRow(rowNode) {
|
|
@@ -2467,31 +2535,31 @@ You need to define at least one Layout!`);
|
|
|
2467
2535
|
});
|
|
2468
2536
|
}
|
|
2469
2537
|
}
|
|
2470
|
-
async manageGridRows(
|
|
2538
|
+
async manageGridRows(dataRowConfig, dataUpdateConfig = {}) {
|
|
2471
2539
|
const result = {
|
|
2472
2540
|
addedRows: [],
|
|
2473
2541
|
updatedRows: [],
|
|
2474
2542
|
removedRows: [],
|
|
2475
2543
|
};
|
|
2476
|
-
if (!dataRows) {
|
|
2544
|
+
if (!dataRowConfig || !dataRowConfig.dataRows) {
|
|
2477
2545
|
return result;
|
|
2478
2546
|
}
|
|
2479
|
-
const addDataRows = dataRows.add;
|
|
2480
|
-
const updateDataRows = dataRows.update;
|
|
2481
|
-
const removeDataRows = dataRows.delete;
|
|
2547
|
+
const addDataRows = dataRowConfig.dataRows.add;
|
|
2548
|
+
const updateDataRows = dataRowConfig.dataRows.update;
|
|
2549
|
+
const removeDataRows = dataRowConfig.dataRows.delete;
|
|
2482
2550
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2483
2551
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2484
2552
|
}
|
|
2485
|
-
if (
|
|
2553
|
+
if (dataUpdateConfig.runAsync) {
|
|
2486
2554
|
return new Promise((resolve) => {
|
|
2487
2555
|
this.applyAgGridTransactionAsync({
|
|
2488
2556
|
update: updateDataRows,
|
|
2489
2557
|
add: addDataRows,
|
|
2490
2558
|
remove: removeDataRows,
|
|
2491
|
-
addIndex:
|
|
2559
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2492
2560
|
}, (transaction) => {
|
|
2493
|
-
if (typeof
|
|
2494
|
-
|
|
2561
|
+
if (typeof dataUpdateConfig.callback === 'function') {
|
|
2562
|
+
dataUpdateConfig.callback(transaction);
|
|
2495
2563
|
}
|
|
2496
2564
|
if (transaction?.add) {
|
|
2497
2565
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
@@ -2502,7 +2570,7 @@ You need to define at least one Layout!`);
|
|
|
2502
2570
|
removedRows: transaction?.remove,
|
|
2503
2571
|
});
|
|
2504
2572
|
});
|
|
2505
|
-
if (
|
|
2573
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2506
2574
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2507
2575
|
}
|
|
2508
2576
|
});
|
|
@@ -2512,12 +2580,12 @@ You need to define at least one Layout!`);
|
|
|
2512
2580
|
update: updateDataRows,
|
|
2513
2581
|
add: addDataRows,
|
|
2514
2582
|
remove: removeDataRows,
|
|
2515
|
-
addIndex:
|
|
2583
|
+
addIndex: dataUpdateConfig.addIndex,
|
|
2516
2584
|
});
|
|
2517
2585
|
if (transaction?.add) {
|
|
2518
2586
|
this.updateRowGroupsAndColumnGroupsExpandedState();
|
|
2519
2587
|
}
|
|
2520
|
-
if (
|
|
2588
|
+
if (dataUpdateConfig.flushAsync) {
|
|
2521
2589
|
this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
|
|
2522
2590
|
}
|
|
2523
2591
|
return Promise.resolve({
|
|
@@ -2583,14 +2651,14 @@ You need to define at least one Layout!`);
|
|
|
2583
2651
|
}
|
|
2584
2652
|
autoSizeColumns(columnIds) {
|
|
2585
2653
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2586
|
-
this.logger.consoleError(`
|
|
2654
|
+
this.logger.consoleError(`Auto-sizing columns [${columnIds}] requires the AG Grid "ColumnAutoSizeModule". Please register this module.`);
|
|
2587
2655
|
return;
|
|
2588
2656
|
}
|
|
2589
2657
|
this.layoutManager.autoSizeColumns(columnIds);
|
|
2590
2658
|
}
|
|
2591
2659
|
autoSizeAllColumns() {
|
|
2592
2660
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('ColumnAutoSizeModule')) {
|
|
2593
|
-
this.logger.consoleError(
|
|
2661
|
+
this.logger.consoleError('Auto-sizing all columns requires the AG Grid "ColumnAutoSizeModule". Please register this module.');
|
|
2594
2662
|
return;
|
|
2595
2663
|
}
|
|
2596
2664
|
const agGridApi = this.agGridAdapter.getAgGridApi();
|
|
@@ -2748,7 +2816,7 @@ You need to define at least one Layout!`);
|
|
|
2748
2816
|
customInFilterValuesResult = await customInFilterValues(customInFilterValuesContext);
|
|
2749
2817
|
}
|
|
2750
2818
|
catch (error) {
|
|
2751
|
-
this.logger.consoleError(
|
|
2819
|
+
this.logger.consoleError('Failed to retrieve custom filter values.', column, error);
|
|
2752
2820
|
}
|
|
2753
2821
|
return customInFilterValuesResult;
|
|
2754
2822
|
}
|
|
@@ -2788,7 +2856,7 @@ You need to define at least one Layout!`);
|
|
|
2788
2856
|
customDistinctValues = await customEditColumnValues(customEditValuesContext);
|
|
2789
2857
|
}
|
|
2790
2858
|
catch (error) {
|
|
2791
|
-
this.logger.consoleError(
|
|
2859
|
+
this.logger.consoleError('Failed to retrieve custom edit values.', column, error);
|
|
2792
2860
|
}
|
|
2793
2861
|
return customDistinctValues ?? [];
|
|
2794
2862
|
}
|
|
@@ -3243,7 +3311,7 @@ You need to define at least one Layout!`);
|
|
|
3243
3311
|
if (this.getAgGridRowModelType() !== 'clientSide') {
|
|
3244
3312
|
// only in client-side row model can we loop through filtered&sorted rows
|
|
3245
3313
|
// see https://www.ag-grid.com/javascript-data-grid/accessing-data/#iterating-rows
|
|
3246
|
-
this.logger.warn('
|
|
3314
|
+
this.logger.warn('forAllVisibleRowNodesDo() is only supported with client-side row model. Falling back to forAllRowNodesDo().');
|
|
3247
3315
|
return this.forAllRowNodesDo(func, config);
|
|
3248
3316
|
}
|
|
3249
3317
|
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
@@ -3295,14 +3363,14 @@ You need to define at least one Layout!`);
|
|
|
3295
3363
|
}
|
|
3296
3364
|
selectNode(rowNode, clearSelection) {
|
|
3297
3365
|
if (!rowNode) {
|
|
3298
|
-
this.logger.error('
|
|
3366
|
+
this.logger.error('Cannot select: row node is null.');
|
|
3299
3367
|
return;
|
|
3300
3368
|
}
|
|
3301
3369
|
rowNode.setSelected(true, clearSelection);
|
|
3302
3370
|
}
|
|
3303
3371
|
deSelectNode(rowNode, clearSelection) {
|
|
3304
3372
|
if (!rowNode) {
|
|
3305
|
-
this.logger.error('
|
|
3373
|
+
this.logger.error('Cannot deselect: row node is null.');
|
|
3306
3374
|
return;
|
|
3307
3375
|
}
|
|
3308
3376
|
rowNode.setSelected(false, clearSelection);
|
|
@@ -3390,7 +3458,7 @@ You need to define at least one Layout!`);
|
|
|
3390
3458
|
}
|
|
3391
3459
|
showChart(chartDefinition, container) {
|
|
3392
3460
|
if (!this.isReady) {
|
|
3393
|
-
this.logger.consoleError('
|
|
3461
|
+
this.logger.consoleError('Cannot call showChart before Adaptable is fully initialized.');
|
|
3394
3462
|
return null;
|
|
3395
3463
|
}
|
|
3396
3464
|
/**
|
|
@@ -3411,7 +3479,7 @@ You need to define at least one Layout!`);
|
|
|
3411
3479
|
}
|
|
3412
3480
|
updateChart(chart) {
|
|
3413
3481
|
if (!chart.Model) {
|
|
3414
|
-
this.logger.consoleError(`
|
|
3482
|
+
this.logger.consoleError(`Cannot update chart "${chart.Name}": the chart definition is missing the required Model property.`);
|
|
3415
3483
|
return;
|
|
3416
3484
|
}
|
|
3417
3485
|
const upgradableProperties = {
|
|
@@ -3437,7 +3505,7 @@ You need to define at least one Layout!`);
|
|
|
3437
3505
|
}
|
|
3438
3506
|
getChartModels() {
|
|
3439
3507
|
if (!this.isReady) {
|
|
3440
|
-
this.logger.consoleError('
|
|
3508
|
+
this.logger.consoleError('Cannot call getChartModels before Adaptable is fully initialized.');
|
|
3441
3509
|
return [];
|
|
3442
3510
|
}
|
|
3443
3511
|
return this.agGridAdapter.getAgGridApi().getChartModels();
|
|
@@ -3471,7 +3539,7 @@ You need to define at least one Layout!`);
|
|
|
3471
3539
|
}
|
|
3472
3540
|
setAgGridQuickSearch(searchText) {
|
|
3473
3541
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('QuickFilterModule')) {
|
|
3474
|
-
this.logger.consoleError(
|
|
3542
|
+
this.logger.consoleError('Quick Search requires the AG Grid "QuickFilterModule". Please register this module to enable Quick Search.');
|
|
3475
3543
|
return;
|
|
3476
3544
|
}
|
|
3477
3545
|
this.agGridAdapter.setGridOption('quickFilterText', searchText);
|
|
@@ -3481,7 +3549,7 @@ You need to define at least one Layout!`);
|
|
|
3481
3549
|
}
|
|
3482
3550
|
setAgGridFindSearchValue(searchText) {
|
|
3483
3551
|
if (!this.agGridModulesAdapter.isAgGridModuleRegistered('FindModule')) {
|
|
3484
|
-
this.logger.consoleError(
|
|
3552
|
+
this.logger.consoleError('Find Search requires the AG Grid "FindModule". Please register this module to enable Find Search.');
|
|
3485
3553
|
return;
|
|
3486
3554
|
}
|
|
3487
3555
|
this.agGridAdapter.setGridOption('findSearchValue', searchText);
|
|
@@ -4010,7 +4078,7 @@ You need to define at least one Layout!`);
|
|
|
4010
4078
|
cellDataChangedInfos.forEach((cellDataChangedInfo) => {
|
|
4011
4079
|
// if a Cell Data Change is undone, log to the Console
|
|
4012
4080
|
if (cellDataChangedInfo.trigger === 'undo') {
|
|
4013
|
-
this.logger.info(`
|
|
4081
|
+
this.logger.info(`Data change reverted: column="${cellDataChangedInfo.column}", primaryKey="${cellDataChangedInfo.primaryKeyValue}", from=${cellDataChangedInfo.newValue} to=${cellDataChangedInfo.oldValue}`);
|
|
4014
4082
|
}
|
|
4015
4083
|
// For Changes except Aggregations, reset cell selection if required
|
|
4016
4084
|
if (cellDataChangedInfo.trigger === 'edit' ||
|
|
@@ -4215,7 +4283,7 @@ You need to define at least one Layout!`);
|
|
|
4215
4283
|
this.api.layoutApi.createOrUpdateLayout(layout);
|
|
4216
4284
|
}
|
|
4217
4285
|
refreshAdaptableAfterLayoutChange(layout) {
|
|
4218
|
-
this.logger.info('
|
|
4286
|
+
this.logger.info('Refreshing Adaptable after layout change.');
|
|
4219
4287
|
const prevLayoutForRefresh = this.__prevLayoutForRefresh || this.api.layoutApi.getCurrentLayout();
|
|
4220
4288
|
// see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
|
|
4221
4289
|
const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevLayoutForRefresh, layout);
|
|
@@ -4261,7 +4329,7 @@ You need to define at least one Layout!`);
|
|
|
4261
4329
|
.forEach((colType) => {
|
|
4262
4330
|
const newValidCellDataType = mapOldTypeToDataType(colType);
|
|
4263
4331
|
if (newValidCellDataType) {
|
|
4264
|
-
this.logger.consoleWarn(`Column ${columnDefinition.colId ?? columnDefinition.field}
|
|
4332
|
+
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.'}`);
|
|
4265
4333
|
}
|
|
4266
4334
|
});
|
|
4267
4335
|
});
|
|
@@ -145,7 +145,7 @@ export class AgGridAdapter {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
options['columnDefs'] = colDefsWithSpecialColumns;
|
|
148
|
-
self.logger.info(`Added
|
|
148
|
+
self.logger.info(`Added special columns on GridOptions.columnDefs update (source="${source}").`);
|
|
149
149
|
}
|
|
150
150
|
// `context`
|
|
151
151
|
const passedContext = options.context;
|
|
@@ -165,7 +165,7 @@ export class AgGridAdapter {
|
|
|
165
165
|
}
|
|
166
166
|
const agGridColumnFilterService = this.DANGER_getPrivateAgGridBeans()?.colFilter;
|
|
167
167
|
if (!agGridColumnFilterService) {
|
|
168
|
-
this.logger.consoleError('
|
|
168
|
+
this.logger.consoleError('Failed to initialize ColumnFilterService. Filtering and related features will not function correctly.');
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
const self = this;
|
|
@@ -211,7 +211,7 @@ export class AgGridAdapter {
|
|
|
211
211
|
DANGER_getPrivateAgGridBeans() {
|
|
212
212
|
const beans = DANGER_AG_GRID_BEANS_MAP[this._agGridId];
|
|
213
213
|
if (!beans) {
|
|
214
|
-
this.logger.consoleError('
|
|
214
|
+
this.logger.consoleError('Failed to access AG Grid internal beans. Adaptable will not function correctly.');
|
|
215
215
|
}
|
|
216
216
|
return beans;
|
|
217
217
|
}
|
|
@@ -355,7 +355,7 @@ export class AgGridAdapter {
|
|
|
355
355
|
if (isEndRowPin) {
|
|
356
356
|
shouldIncludeRange = false;
|
|
357
357
|
}
|
|
358
|
-
this.logger.consoleWarn('
|
|
358
|
+
this.logger.consoleWarn('Pinned rows cannot be selected in AG Grid.');
|
|
359
359
|
}
|
|
360
360
|
if (shouldIncludeRange) {
|
|
361
361
|
const y1 = Math.min(rangeSelection.startRow.rowIndex, rangeSelection.endRow.rowIndex);
|
|
@@ -525,7 +525,7 @@ export class AgGridAdapter {
|
|
|
525
525
|
deriveAdaptableColumnDataType(agColumn, logWarning = true) {
|
|
526
526
|
// Some columns can have no ID or Title. we return string as a consequence but it needs testing
|
|
527
527
|
if (!agColumn) {
|
|
528
|
-
this.logger.warn(
|
|
528
|
+
this.logger.warn('Column is undefined. Defaulting data type to "text".');
|
|
529
529
|
return 'text';
|
|
530
530
|
}
|
|
531
531
|
if (this.adaptableApi.columnApi.isAutoRowGroupColumnForSingle(agColumn.getId())) {
|
|
@@ -568,7 +568,7 @@ export class AgGridAdapter {
|
|
|
568
568
|
let row = this.getAgGridApi().getDisplayedRowAtIndex(0);
|
|
569
569
|
if (row == null) {
|
|
570
570
|
// possible that there will be no data.
|
|
571
|
-
this.logger.consoleError(`No data in grid
|
|
571
|
+
this.logger.consoleError(`No data in grid. Returning type "unknown" for column "${agColumn.getColId()}". This will affect features such as Filters and Column Formats.`);
|
|
572
572
|
return 'unknown';
|
|
573
573
|
}
|
|
574
574
|
// // if it's a group we need the content of the group
|
|
@@ -610,7 +610,7 @@ export class AgGridAdapter {
|
|
|
610
610
|
dataType = arrayDataType;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
this.logger.consoleWarn(`No
|
|
613
|
+
this.logger.consoleWarn(`No explicit type for column "${agColumn.getColId()}". Inferred type from first row value: "${dataType}".`);
|
|
614
614
|
return dataType;
|
|
615
615
|
}
|
|
616
616
|
isColumnReadonly(colDef) {
|
|
@@ -796,7 +796,7 @@ export class AgGridAdapter {
|
|
|
796
796
|
colDef.colId = colDef.field;
|
|
797
797
|
}
|
|
798
798
|
if (!colDef.colId) {
|
|
799
|
-
this.logger.warn('
|
|
799
|
+
this.logger.warn('Column definition is missing colId. Provide either a "field" or "colId" property.', colDef);
|
|
800
800
|
}
|
|
801
801
|
};
|
|
802
802
|
this.patchColDefs(colDefs, assignColId);
|