@adaptabletools/adaptable 15.0.2 → 15.1.0-canary.0

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.
Files changed (116) hide show
  1. package/bundle.cjs.js +185 -181
  2. package/package.json +3 -3
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -1
  6. package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
  7. package/src/AdaptableOptions/GeneralOptions.d.ts +4 -0
  8. package/src/AdaptableOptions/SearchOptions.d.ts +8 -0
  9. package/src/AdaptableOptions/TeamSharingOptions.d.ts +7 -0
  10. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -5
  11. package/src/Api/GridApi.d.ts +14 -6
  12. package/src/Api/Implementation/ActionApiImpl.js +3 -4
  13. package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -0
  14. package/src/Api/Implementation/AdaptableApiImpl.js +12 -0
  15. package/src/Api/Implementation/AlertApiImpl.js +23 -24
  16. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  17. package/src/Api/Implementation/ApiBase.js +14 -3
  18. package/src/Api/Implementation/CalculatedColumnApiImpl.js +8 -9
  19. package/src/Api/Implementation/CellSummaryApiImpl.js +1 -1
  20. package/src/Api/Implementation/ChartingApiImpl.js +1 -1
  21. package/src/Api/Implementation/ColumnApiImpl.js +31 -32
  22. package/src/Api/Implementation/CustomSortApiImpl.js +5 -6
  23. package/src/Api/Implementation/DashboardApiImpl.js +3 -3
  24. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
  25. package/src/Api/Implementation/DataSetApiImpl.js +3 -3
  26. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  27. package/src/Api/Implementation/FilterApiImpl.js +15 -16
  28. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -3
  29. package/src/Api/Implementation/FormatColumnApiImpl.js +18 -18
  30. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -10
  31. package/src/Api/Implementation/GridApiImpl.d.ts +7 -2
  32. package/src/Api/Implementation/GridApiImpl.js +52 -13
  33. package/src/Api/Implementation/LayoutApiImpl.js +11 -12
  34. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  35. package/src/Api/Implementation/PredicateApiImpl.js +8 -9
  36. package/src/Api/Implementation/QueryApiImpl.js +5 -5
  37. package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -6
  38. package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
  39. package/src/Api/Implementation/ScheduleApiImpl.js +17 -17
  40. package/src/Api/Implementation/SettingsPanelApiImpl.js +3 -4
  41. package/src/Api/Implementation/ShortcutApiImpl.js +5 -5
  42. package/src/Api/Implementation/SmartEditApiImpl.js +1 -1
  43. package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
  44. package/src/Api/Implementation/SystemStatusApiImpl.js +2 -2
  45. package/src/Api/Implementation/TeamSharingApiImpl.js +11 -12
  46. package/src/Api/Implementation/ThemeApiImpl.js +4 -4
  47. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  48. package/src/Api/Internal/AdaptableInternalApi.js +1 -2
  49. package/src/Api/Internal/ChartingInternalApi.js +1 -2
  50. package/src/Api/Internal/GridInternalApi.js +11 -1
  51. package/src/Api/Internal/QueryInternalApi.js +1 -2
  52. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +4 -4
  53. package/src/Redux/Store/AdaptableReduxMerger.js +1 -2
  54. package/src/Redux/Store/AdaptableStore.js +16 -15
  55. package/src/Strategy/AlertModule.js +1 -0
  56. package/src/Strategy/CalculatedColumnModule.js +2 -3
  57. package/src/Strategy/CustomSortModule.d.ts +1 -0
  58. package/src/Strategy/CustomSortModule.js +1 -0
  59. package/src/Strategy/DashboardModule.js +1 -2
  60. package/src/Strategy/DataChangeHistoryModule.js +1 -2
  61. package/src/Strategy/FilterModule.js +1 -2
  62. package/src/Strategy/FlashingCellModule.js +1 -0
  63. package/src/Strategy/FormatColumnModule.js +2 -2
  64. package/src/Strategy/Interface/IModule.d.ts +6 -0
  65. package/src/Strategy/PlusMinusModule.js +1 -0
  66. package/src/Strategy/ScheduleModule.js +21 -0
  67. package/src/Strategy/ShortcutModule.js +1 -0
  68. package/src/Strategy/StyledColumnModule.js +2 -2
  69. package/src/Strategy/ToolPanelModule.js +2 -3
  70. package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +3 -8
  71. package/src/Strategy/Utilities/getObjectTagsViewItems.js +27 -2
  72. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
  73. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -2
  74. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  75. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +104 -42
  76. package/src/Utilities/Extensions/NumberExtensions.d.ts +2 -0
  77. package/src/Utilities/Extensions/NumberExtensions.js +6 -1
  78. package/src/Utilities/Helpers/AdaptableHelper.js +1 -2
  79. package/src/Utilities/Helpers/DateHelper.js +2 -2
  80. package/src/Utilities/Helpers/Helper.js +3 -3
  81. package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -4
  82. package/src/Utilities/Services/AlertService.js +1 -2
  83. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -4
  84. package/src/Utilities/Services/DataService.js +1 -2
  85. package/src/Utilities/Services/LicenseService/index.js +1 -1
  86. package/src/Utilities/Services/MetamodelService.js +3 -4
  87. package/src/Utilities/Services/QueryLanguageService.js +1 -2
  88. package/src/Utilities/logDeprecation.d.ts +4 -3
  89. package/src/Utilities/logDeprecation.js +6 -7
  90. package/src/View/Charting/useChartState.js +1 -2
  91. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
  92. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +9 -2
  93. package/src/View/Dashboard/Dashboard.js +1 -2
  94. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  95. package/src/View/StateManagement/handleExportState.js +1 -2
  96. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +1 -2
  97. package/src/View/TeamSharing/SharedEntityObjectView.d.ts +3 -0
  98. package/src/View/Theme/ThemePopup.d.ts +1 -1
  99. package/src/View/Theme/ThemePopup.js +17 -3
  100. package/src/agGrid/Adaptable.d.ts +3 -1
  101. package/src/agGrid/Adaptable.js +94 -50
  102. package/src/agGrid/AdaptableLogger.d.ts +26 -0
  103. package/src/agGrid/AdaptableLogger.js +148 -0
  104. package/src/agGrid/agGridHelper.js +7 -8
  105. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -2
  106. package/src/components/OverlayTrigger/index.js +1 -2
  107. package/src/components/SelectableList/index.js +0 -2
  108. package/src/components/icons/index.js +2 -2
  109. package/src/metamodel/adaptable.metamodel.js +1 -1
  110. package/src/parser/src/evaluator.js +3 -1
  111. package/src/parser/src/parser.js +496 -453
  112. package/src/parser/src/types.d.ts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.js +1 -1
  115. package/src/Utilities/Helpers/LoggingHelper.d.ts +0 -15
  116. package/src/Utilities/Helpers/LoggingHelper.js +0 -111
@@ -13,7 +13,6 @@ const Tabs_1 = require("../../../components/Tabs");
13
13
  const Tag_1 = require("../../../components/Tag");
14
14
  const ObjectExtensions_1 = require("../../../Utilities/Extensions/ObjectExtensions");
15
15
  const StringExtensions_1 = require("../../../Utilities/Extensions/StringExtensions");
16
- const LoggingHelper_1 = require("../../../Utilities/Helpers/LoggingHelper");
17
16
  const AdaptableInput_1 = tslib_1.__importDefault(require("../../Components/AdaptableInput"));
18
17
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
19
18
  const CommonProperties = (props) => {
@@ -228,7 +227,7 @@ const SparklineObjectNumberArrayProperties = (props) => {
228
227
  }
229
228
  }
230
229
  catch (e) {
231
- (0, LoggingHelper_1.ConsoleLogError)('Error parsing sparkline data', e);
230
+ api.logError('Error parsing sparkline data', e);
232
231
  }
233
232
  }, [data]);
234
233
  return (React.createElement(React.Fragment, null,
@@ -1,9 +1,12 @@
1
+ /// <reference types="node" />
1
2
  import * as React from 'react';
2
3
  import { AdaptableSharedEntity } from '../../../types';
4
+ import { IModule } from '../../Strategy/Interface/IModule';
3
5
  export declare const SharedEntityTypeItemView: React.FunctionComponent<{
4
6
  data: AdaptableSharedEntity;
5
7
  }>;
6
8
  export declare const getSharedEntityActiveStatusObjectView: (isDependency: boolean) => (props: {
7
9
  data: AdaptableSharedEntity;
10
+ module?: IModule;
8
11
  }) => JSX.Element;
9
12
  export declare const getSharedEntityStaleDepsItemView: (staleDependencies: AdaptableSharedEntity[]) => () => JSX.Element;
@@ -11,7 +11,7 @@ interface ThemePopupProps extends ModuleViewPopupProps<ThemePopupComponent> {
11
11
  declare class ThemePopupComponent extends React.Component<ThemePopupProps, {}> {
12
12
  render(): JSX.Element;
13
13
  onChangeTheme(value: string): void;
14
- handleCreateNewTheme: () => void;
14
+ handleCreateNewTheme: (variant: 'dark' | 'light') => void;
15
15
  }
16
16
  export declare let ThemePopup: import("react-redux").ConnectedComponent<typeof ThemePopupComponent, any>;
17
17
  export {};
@@ -10,13 +10,13 @@ const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout")
10
10
  const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
11
11
  const ThemeEditor_1 = require("./ThemeEditor");
12
12
  const rebass_1 = require("rebass");
13
- const ButtonNew_1 = require("../Components/Buttons/ButtonNew");
14
13
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
15
14
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
15
+ const icons_1 = require("../../components/icons");
16
16
  class ThemePopupComponent extends React.Component {
17
17
  constructor() {
18
18
  super(...arguments);
19
- this.handleCreateNewTheme = () => {
19
+ this.handleCreateNewTheme = (variant) => {
20
20
  let nthItem = this.props.UserThemes.length + 1;
21
21
  let name = 'Custom-Theme-' + nthItem;
22
22
  // make sure it is unique
@@ -25,6 +25,7 @@ class ThemePopupComponent extends React.Component {
25
25
  name = 'Custom-Theme-' + nthItem;
26
26
  }
27
27
  const newTheme = ObjectFactory_1.default.CreateEmptyTheme(name);
28
+ newTheme.Variant = variant;
28
29
  this.props.api.themeApi.addUserTheme(newTheme);
29
30
  this.props.api.themeApi.loadTheme(newTheme.Name);
30
31
  };
@@ -50,11 +51,24 @@ class ThemePopupComponent extends React.Component {
50
51
  const isCustomTheme = this.props.api.themeApi
51
52
  .getUserThemes()
52
53
  .some((theme) => theme.Name === this.props.CurrentTheme);
54
+ const disabled = this.props.accessLevel === 'ReadOnly';
55
+ const newButton = (React.createElement(DropdownButton_1.default, { ml: 2, disabled: disabled, tone: "accent", variant: "raised", columns: ['label'], items: [
56
+ {
57
+ label: 'Dark',
58
+ onClick: () => this.handleCreateNewTheme('dark'),
59
+ },
60
+ {
61
+ label: 'Light',
62
+ onClick: () => this.handleCreateNewTheme('light'),
63
+ },
64
+ ] },
65
+ React.createElement(icons_1.Icon, { name: "plus" }),
66
+ " New"));
53
67
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed(), button: React.createElement(React.Fragment, null,
54
68
  !this.props.hideShowInWindow && (React.createElement(SimpleButton_1.default, { icon: "open-in-new", onClick: () => {
55
69
  this.props.api.themeApi.internalApi.openInWindow();
56
70
  } })),
57
- React.createElement(ButtonNew_1.ButtonNew, { ml: 2, onClick: this.handleCreateNewTheme, accessLevel: this.props.accessLevel })) },
71
+ newButton) },
58
72
  React.createElement(FormLayout_1.default, null,
59
73
  React.createElement(FormLayout_1.FormRow, { label: "Current Theme:" },
60
74
  React.createElement(DropdownButton_1.default, { "data-name": "select-theme-dropdown", columns: ['label'], style: { width: '50%', minWidth: 200 }, placeholder: "Select theme", value: this.props.CurrentTheme, items: optionThemes, accessLevel: this.props.accessLevel }, currentThemeDescription))),
@@ -37,6 +37,7 @@ import { ColumnValuesComparer } from '../AdaptableOptions/GeneralOptions';
37
37
  import { IMetamodelService } from '../Utilities/Services/Interface/IMetamodelService';
38
38
  import { IRowEditService } from '../Utilities/Services/Interface/IRowEditService';
39
39
  import { RenderReactRootFn } from '../renderReactRoot';
40
+ import { AdaptableLogger } from './AdaptableLogger';
40
41
  declare type RuntimeConfig = {
41
42
  waitForAgGrid?: boolean;
42
43
  supressReact18RenderWarning?: boolean;
@@ -48,6 +49,7 @@ export declare class Adaptable implements IAdaptable {
48
49
  adaptableModules: IModuleCollection;
49
50
  adaptableStore: IAdaptableStore;
50
51
  adaptableOptions: AdaptableOptions;
52
+ logger: AdaptableLogger;
51
53
  CalculatedColumnExpressionService: ICalculatedColumnExpressionService;
52
54
  DataService: IDataService;
53
55
  EntitlementService: IEntitlementService;
@@ -194,6 +196,7 @@ export declare class Adaptable implements IAdaptable {
194
196
  setCellValue(cellDataChangedInfo: CellDataChangedInfo): void;
195
197
  cancelEdit(): void;
196
198
  isCellEditable(rowNode: IRowNode, column: Column): boolean;
199
+ getGridCellsForColumn(columnId: string): GridCell[] | undefined;
197
200
  getDistinctValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, skipRowNode?: IRowNode, permittedValues?: any[]): GridCell[];
198
201
  getDistinctFilterValuesForColumn(column: AdaptableColumn, visibleRowsOnly: boolean, filter: string, skipRowNode?: IRowNode): Promise<{
199
202
  suppressClientSideFilter?: boolean;
@@ -345,7 +348,6 @@ export declare class Adaptable implements IAdaptable {
345
348
  setDataSource(dataSource: any[]): void;
346
349
  getGridData(): any[];
347
350
  getFilteredData(): any[];
348
- loadDataSource(dataSource: any[]): void;
349
351
  updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
350
352
  addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
351
353
  deleteRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
@@ -25,7 +25,6 @@ const StringExtensions_1 = require("../Utilities/Extensions/StringExtensions");
25
25
  const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
26
26
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
27
27
  const Helper_1 = require("../Utilities/Helpers/Helper");
28
- const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
29
28
  const ObjectFactory_1 = require("../Utilities/ObjectFactory");
30
29
  // services
31
30
  const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
@@ -66,10 +65,11 @@ const AggregationColumns_1 = require("../PredefinedConfig/Common/AggregationColu
66
65
  const renderReactRoot_1 = require("../renderReactRoot");
67
66
  const ChartingService_1 = require("../Utilities/Services/ChartingService");
68
67
  const ThemeService_1 = require("../Utilities/Services/ThemeService");
68
+ const AdaptableLogger_1 = require("./AdaptableLogger");
69
69
  const tinycolor = require('tinycolor2');
70
70
  const GROUP_PATH_SEPARATOR = '/';
71
71
  // IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
72
- const assignColId = (colDef) => {
72
+ const assignColId = (colDef, logger) => {
73
73
  if (!colDef) {
74
74
  return;
75
75
  }
@@ -77,11 +77,11 @@ const assignColId = (colDef) => {
77
77
  colDef.colId = colDef.field;
78
78
  }
79
79
  if (colDef.children) {
80
- colDef.children.forEach(assignColId);
80
+ colDef.children.forEach((colDef) => assignColId(colDef, logger));
81
81
  }
82
82
  else {
83
83
  if (!colDef.colId) {
84
- (0, LoggingHelper_1.LogAdaptableWarning)('A column is missing the colId - please check ', colDef, 'Either pass a "field" property or a "colId" property.');
84
+ logger.warn('A column is missing the colId - please check ', colDef, 'Either pass a "field" property or a "colId" property.');
85
85
  }
86
86
  }
87
87
  };
@@ -109,7 +109,7 @@ RowNodeProto.dispatchLocalEvent = function (event) {
109
109
  // starting with AG Grid 26.1.0 the gridApi is wrapped in a Beans property
110
110
  const rowNodeApi = (_a = rowNode === null || rowNode === void 0 ? void 0 : rowNode.beans) === null || _a === void 0 ? void 0 : _a.gridApi;
111
111
  if (!rowNodeApi) {
112
- (0, LoggingHelper_1.LogAdaptableWarning)(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
112
+ AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No GridAPI found in passed RowNode, this should never happen!`, rowNode);
113
113
  }
114
114
  return rowNodeApi;
115
115
  };
@@ -283,7 +283,7 @@ class Adaptable {
283
283
  static init(adaptableOptions, runtimeConfig) {
284
284
  var _a;
285
285
  if (!((_a = runtimeConfig === null || runtimeConfig === void 0 ? void 0 : runtimeConfig.agGridModules) === null || _a === void 0 ? void 0 : _a.length)) {
286
- (0, LoggingHelper_1.ConsoleLogWarning)(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
286
+ AdaptableLogger_1.AdaptableLogger.consoleErrorBase(`No AG Grid modules were provided, thus limiting AdapTables features significantly!\n\nRead further info here:${DocumentationLinkConstants_1.AgGridModulesDocsLink}`);
287
287
  }
288
288
  else {
289
289
  core_1.ModuleRegistry.registerModules(runtimeConfig.agGridModules);
@@ -353,6 +353,8 @@ class Adaptable {
353
353
  // this is still used internally but should not be used externally as a preference
354
354
  async init(adaptableOptions, runtimeConfig, _staticInit) {
355
355
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
356
+ this.logger = new AdaptableLogger_1.AdaptableLogger(adaptableOptions.adaptableId || String(Date.now()));
357
+ const perfAdaptableInit = this.logger.beginPerf(`Adaptable init()`);
356
358
  if (runtimeConfig) {
357
359
  this.supressReact18RenderWarning = !!runtimeConfig.supressReact18RenderWarning;
358
360
  if (runtimeConfig.renderReactRoot) {
@@ -378,7 +380,7 @@ class Adaptable {
378
380
  }
379
381
  }
380
382
  if (!_staticInit) {
381
- (0, LoggingHelper_1.ConsoleLogWarning)(`
383
+ this.logger.warn(`
382
384
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
383
385
  !!!!!!! You should not use the "Adaptable" constructor directly, as it was deprecated in v6 and removed in v7!
384
386
  !!!!!!!
@@ -389,7 +391,8 @@ class Adaptable {
389
391
  // we create AdaptableOptions by merging the values provided by the user with the defaults (where no value has been set)
390
392
  this.adaptableOptions = AdaptableHelper_1.default.assignAdaptableOptions(adaptableOptions);
391
393
  if (this.hasAutogeneratedPrimaryKey()) {
392
- (0, LoggingHelper_1.LogAdaptableWarning)(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
394
+ this.logger
395
+ .warn(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
393
396
  when no unique column is available, as it limits some Adaptable functionalities!
394
397
 
395
398
  For more details see: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
@@ -477,10 +480,10 @@ class Adaptable {
477
480
  return this.initializeAgGrid().then((initialized) => {
478
481
  if (!initialized) {
479
482
  // we have no grid, we can't do anything
480
- (0, LoggingHelper_1.ConsoleLogError)('Unable to set up AG Grid');
483
+ this.logger.error('Unable to set up AG Grid');
481
484
  return this.api;
482
485
  }
483
- (0, LoggingHelper_1.LogAdaptableInfo)(`Registered AG Grid modules: `, this.getAgGridRegisteredModules().sort());
486
+ this.logger.info(`Registered AG Grid modules: `, this.getAgGridRegisteredModules().sort());
484
487
  let self = this;
485
488
  // add our adaptable object to the grid options api object
486
489
  // this is VERY useful for when we need to access Adaptable inside of agGrid only functions
@@ -496,14 +499,18 @@ class Adaptable {
496
499
  };
497
500
  }
498
501
  // Load the store
502
+ const perfAdaptableStoreLoad = this.logger.beginPerf('AdaptableStore.Load');
499
503
  this.adaptableStore.Load.then(() => {
500
504
  if (this.isDestroyed) {
501
505
  return;
502
506
  }
507
+ perfAdaptableStoreLoad.end();
508
+ const perfInitInternalGridLogic = this.logger.beginPerf('InitInternalGridLogic');
503
509
  this.initInternalGridLogic();
510
+ perfInitInternalGridLogic.end();
504
511
  AdaptableHelper_1.default.checkValidPrimaryKey(this);
505
512
  }, (e) => {
506
- (0, LoggingHelper_1.ConsoleLogError)('Failed to Init Modules : ', e);
513
+ this.logger.error('Failed to Init Modules : ', e);
507
514
  // for now we initialize the grid even if initialising Modules has failed (perhaps revisit this?)
508
515
  this.initInternalGridLogic();
509
516
  this.api.internalApi.hideLoadingScreen(); // doesnt really help but at least clears the screen
@@ -530,6 +537,7 @@ class Adaptable {
530
537
  trailing: true,
531
538
  leading: false,
532
539
  });
540
+ perfAdaptableInit.end();
533
541
  return this.api;
534
542
  });
535
543
  }
@@ -569,24 +577,29 @@ class Adaptable {
569
577
  return undefined;
570
578
  }
571
579
  initStore() {
572
- (0, LoggingHelper_1.LogAdaptableInfo)(`Initialising AdaptableStore`);
580
+ const perfNewAdaptableStore = this.logger.beginPerf(`new AdaptableStore()`);
573
581
  this.adaptableStore = new AdaptableStore_1.AdaptableStore(this, this.isAgGridReady());
582
+ perfNewAdaptableStore.end();
574
583
  this.adaptableStore.onAny((eventName, data) => {
575
584
  this.performAudit(data.action, data.state, data.newState);
576
585
  this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
577
586
  if (eventName == AdaptableStore_1.INIT_STATE) {
578
- (0, LoggingHelper_1.LogAdaptableInfo)(`Updating obsolete configuration/state`);
587
+ const perfInitState = this.logger.beginPerf('InitState');
588
+ const perfUpdateOldConfig = this.logger.beginPerf('updateOldConfig()');
579
589
  this.adaptableModules.forEach((m) => m.updateOldConfig());
590
+ perfUpdateOldConfig.end();
580
591
  // call stuff here
581
592
  // and reset state also?
582
593
  this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
583
594
  this._adaptableReady = true;
584
595
  // setTimeout(() => {
596
+ this.logger.info('emit AdaptableReady');
585
597
  this.api.eventApi.emit('AdaptableReady', {
586
598
  adaptableApi: this.api,
587
599
  gridOptions: this.adaptableOptions.gridOptions,
588
600
  });
589
601
  // }, 0);
602
+ perfInitState.end();
590
603
  }
591
604
  });
592
605
  }
@@ -607,12 +620,12 @@ class Adaptable {
607
620
  }
608
621
  }
609
622
  initializeAgGrid() {
610
- (0, LoggingHelper_1.LogAdaptableInfo)(`Initializing AG Grid...`);
623
+ const perfInitializeAgGrid = this.logger.beginPerf('initializeAgGrid()');
611
624
  // set up whether we use the getRowNode method or loop when finding a rowNode (former is preferable)
612
625
  // can only do that here as the gridOptions not yet set up
613
626
  this.useRowNodeLookUp = this.agGridHelper.TrySetUpNodeIds(this.hasAutogeneratedPrimaryKey());
614
627
  if (Array.isArray(this.gridOptions.columnDefs)) {
615
- this.gridOptions.columnDefs.forEach(assignColId);
628
+ this.gridOptions.columnDefs.forEach((colDef) => assignColId(colDef, this.logger));
616
629
  }
617
630
  const adaptableSideBarDef = this.createAdaptableSideBarDef();
618
631
  if (!!adaptableSideBarDef) {
@@ -631,7 +644,7 @@ class Adaptable {
631
644
  if (!agGridContainer) {
632
645
  agGridContainer = this.initAgGridContainerFromInitializedAgGrid();
633
646
  if (!agGridContainer) {
634
- (0, LoggingHelper_1.ConsoleLogError)('You must provide an element id in `containerOptions.agGridContainer`');
647
+ this.logger.consoleError('You must provide an element id in `containerOptions.agGridContainer`');
635
648
  return false;
636
649
  }
637
650
  }
@@ -640,34 +653,44 @@ class Adaptable {
640
653
  const isGridInstantiated = this.gridOptions.api && typeof this.gridOptions.api.getValue === 'function';
641
654
  if (isGridInstantiated) {
642
655
  if (!checkAgGridContainer()) {
656
+ perfInitializeAgGrid.end('isGridInstantiated=TRUE, checkAgGridContainer=FALSE');
643
657
  return Promise.resolve(false);
644
658
  }
659
+ perfInitializeAgGrid.end('isGridInstantiated=TRUE, checkAgGridContainer=TRUE');
645
660
  return Promise.resolve(true);
646
661
  }
647
662
  if (this.runtimeConfig.waitForAgGrid) {
648
663
  return this.isAgGridReady().then(() => {
664
+ const perfInitAgGridContainer = this.logger.beginPerf('initAgGridContainerFromInitializedAgGrid');
649
665
  this.initAgGridContainerFromInitializedAgGrid();
666
+ perfInitAgGridContainer.end();
667
+ perfInitializeAgGrid.end('waitForAgGrid=TRUE');
650
668
  return Promise.resolve(true);
651
669
  }, () => {
652
- (0, LoggingHelper_1.ConsoleLogError)(`Could not find any AG Grid instance rendered. Could not find reference to AG Grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AG Grid`);
670
+ this.logger.consoleError(`Could not find any AG Grid instance rendered. Could not find reference to AG Grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AG Grid`);
671
+ perfInitializeAgGrid.end('waitForAgGrid=TRUE, ERROR!');
653
672
  return Promise.reject(false);
654
673
  });
655
674
  }
656
675
  else {
657
676
  if (!checkAgGridContainer()) {
677
+ perfInitializeAgGrid.end('waitForAgGrid=FALSE, checkAgGridContainer=FALSE!');
658
678
  return Promise.resolve(false);
659
679
  }
660
680
  }
661
681
  // now create the grid itself - it is done this way as previously when we instantiated the Grid 'properly' it got created as J.Grid
662
682
  let grid;
663
683
  const agGridContainer = this.getAgGridContainerElement();
684
+ const perfAgGridInstance = this.logger.beginPerf('new AgGrid()');
664
685
  // the AG Grid modules are already registered, see the init() method
665
686
  grid = new core_1.Grid(agGridContainer, this.gridOptions);
687
+ perfAgGridInstance.end();
666
688
  // add our adaptable object to the grid options api object
667
689
  // this is VERY useful for when we need to access Adaptable inside of agGrid only functions
668
690
  if (this.gridOptions.api) {
669
691
  this.gridOptions.api.__adaptable = this;
670
692
  }
693
+ perfInitializeAgGrid.end('AG Grid instantiation');
671
694
  return Promise.resolve(grid != null);
672
695
  }
673
696
  initAgGridContainerFromInitializedAgGrid() {
@@ -700,7 +723,7 @@ class Adaptable {
700
723
  }
701
724
  }
702
725
  if (!agGridContainer) {
703
- (0, LoggingHelper_1.ConsoleLogError)(`Could not find the AG Grid Container. This will probably break some AdapTable functionality.`);
726
+ this.logger.consoleError(`Could not find the AG Grid Container. This will probably break some AdapTable functionality.`);
704
727
  }
705
728
  return (this.adaptableOptions.containerOptions.agGridContainer = agGridContainer);
706
729
  }
@@ -1192,7 +1215,10 @@ class Adaptable {
1192
1215
  if (abColumn.isExcludedFromQuickSearch) {
1193
1216
  return false;
1194
1217
  }
1195
- if (!params.node || params.node.group) {
1218
+ if (!params.node) {
1219
+ return false;
1220
+ }
1221
+ if (!this.api.optionsApi.getSearchOptions().runQuickSearchOnRowGroups && params.node.group) {
1196
1222
  return false;
1197
1223
  }
1198
1224
  let quickSearchValue = this.api.quickSearchApi.getQuickSearchValue();
@@ -1286,6 +1312,7 @@ class Adaptable {
1286
1312
  if (!layout) {
1287
1313
  layout = this.api.layoutApi.getCurrentLayout();
1288
1314
  }
1315
+ const perfSetLayout = this.logger.beginPerf(`setLayout(${layout.Name})`);
1289
1316
  layout.Columns = layout.Columns || [];
1290
1317
  const rowEditActionColumn = this.getColDefsForRowEditColumns()[0];
1291
1318
  if (rowEditActionColumn) {
@@ -1460,10 +1487,12 @@ class Adaptable {
1460
1487
  if (shouldUpdatePivoted) {
1461
1488
  this.gridOptions.columnApi.setPivotMode(pivoted);
1462
1489
  }
1490
+ const perfApplyColumnState = this.logger.beginPerf('applyColumnState (layout.isChanged)');
1463
1491
  this.gridOptions.columnApi.applyColumnState({
1464
1492
  state: newColumnsState,
1465
1493
  applyOrder: true,
1466
1494
  });
1495
+ perfApplyColumnState.end();
1467
1496
  this.api.gridApi.setColumnSorts(layout.ColumnSorts);
1468
1497
  this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
1469
1498
  // aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
@@ -1471,7 +1500,9 @@ class Adaptable {
1471
1500
  // see the test in layout/layout-switch/"should be able to switch from grouped to non-grouped and back"
1472
1501
  // so we figured out the following line fixes the issue
1473
1502
  // this.gridOptions.api.setColumnDefs(this.gridOptions.api.getColumnDefs()); //TODO find a solution for weighted averages - column floating filters are not showing
1503
+ const perfSetColumnDefs = this.logger.beginPerf('GridApi_setColumnDefs');
1474
1504
  GridApi_setColumnDefs.call(this.gridOptions.api, this.gridOptions.api.getColumnDefs());
1505
+ perfSetColumnDefs.end();
1475
1506
  // these updates need to be at the end, the methods are based on the grid state/col defs
1476
1507
  // the layout needs to be applied for them to work
1477
1508
  this.updateRowGroupsExpandedState(layout);
@@ -1502,6 +1533,7 @@ class Adaptable {
1502
1533
  plugin.afterSetLayout(this, layout);
1503
1534
  }
1504
1535
  });
1536
+ perfSetLayout.end();
1505
1537
  }
1506
1538
  updateRowGroupsExpandedState(layout) {
1507
1539
  if (!layout) {
@@ -1521,6 +1553,11 @@ class Adaptable {
1521
1553
  updateLayoutFromGrid() {
1522
1554
  var _a, _b;
1523
1555
  const currentLayout = this.api.layoutApi.getCurrentLayout();
1556
+ if (currentLayout.IsReadOnly) {
1557
+ // reaply the layout so the grid is reverted
1558
+ this.setLayout();
1559
+ return;
1560
+ }
1524
1561
  const layout = Object.assign({}, currentLayout);
1525
1562
  let columnOrder = [];
1526
1563
  const columnFlexes = {};
@@ -1623,7 +1660,7 @@ class Adaptable {
1623
1660
  if (isEndRowPin) {
1624
1661
  shouldIncludeRange = false;
1625
1662
  }
1626
- (0, LoggingHelper_1.ConsoleLogWarning)('Cannot select pinned rows in AG Grid.');
1663
+ this.logger.consoleWarn('Cannot select pinned rows in AG Grid.');
1627
1664
  }
1628
1665
  if (shouldIncludeRange) {
1629
1666
  const y1 = Math.min(rangeSelection.startRow.rowIndex, rangeSelection.endRow.rowIndex);
@@ -1737,6 +1774,16 @@ class Adaptable {
1737
1774
  // it's safe to rely on the AG Grid implementation because we override the colDef.editable property, which is in this case the single source of truth
1738
1775
  return column === null || column === void 0 ? void 0 : column.isCellEditable(rowNode);
1739
1776
  }
1777
+ getGridCellsForColumn(columnId) {
1778
+ let returnValues = [];
1779
+ this.gridOptions.api.forEachNode((rowNode) => {
1780
+ const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
1781
+ if (gridCell && gridCell.rawValue != undefined) {
1782
+ returnValues.push(gridCell);
1783
+ }
1784
+ });
1785
+ return returnValues;
1786
+ }
1740
1787
  getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, permittedValues) {
1741
1788
  let returnValues = [];
1742
1789
  // this function does NOT look up for server values but actually it should...
@@ -1792,7 +1839,7 @@ class Adaptable {
1792
1839
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(filterPermittedValuesParams));
1793
1840
  }
1794
1841
  catch (error) {
1795
- (0, LoggingHelper_1.ConsoleLogError)(`Failed to load filter permitted values`, column, filter, error);
1842
+ this.logger.consoleError(`Failed to load filter permitted values`, column, filter, error);
1796
1843
  }
1797
1844
  return {
1798
1845
  suppressClientSideFilter: permittedValues.suppressFilterSearchBar,
@@ -1810,7 +1857,7 @@ class Adaptable {
1810
1857
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(permittedValuesParams));
1811
1858
  }
1812
1859
  catch (error) {
1813
- (0, LoggingHelper_1.ConsoleLogError)(`Failed to load custom sort permitted values`, column, error);
1860
+ this.logger.consoleError(`Failed to load custom sort permitted values`, column, error);
1814
1861
  }
1815
1862
  return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
1816
1863
  }
@@ -1826,7 +1873,7 @@ class Adaptable {
1826
1873
  preparedPermittedValues = await (permittedValues === null || permittedValues === void 0 ? void 0 : permittedValues.values(bulkUpdatePermittedValuesParams));
1827
1874
  }
1828
1875
  catch (error) {
1829
- (0, LoggingHelper_1.ConsoleLogError)(`Failed to load bulk permitted values`, error, column, selectedGridCells);
1876
+ this.logger.consoleError(`Failed to load bulk permitted values`, error, column, selectedGridCells);
1830
1877
  }
1831
1878
  return this.getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode, preparedPermittedValues);
1832
1879
  }
@@ -2097,14 +2144,14 @@ class Adaptable {
2097
2144
  }
2098
2145
  selectNode(rowNode, clearSelection) {
2099
2146
  if (!rowNode) {
2100
- (0, LoggingHelper_1.LogAdaptableError)('No node to select');
2147
+ this.logger.error('No node to select');
2101
2148
  return;
2102
2149
  }
2103
2150
  rowNode.setSelected(true, clearSelection);
2104
2151
  }
2105
2152
  deSelectNode(rowNode, clearSelection) {
2106
2153
  if (!rowNode) {
2107
- (0, LoggingHelper_1.LogAdaptableError)('No node to deselect');
2154
+ this.logger.error('No node to deselect');
2108
2155
  return;
2109
2156
  }
2110
2157
  rowNode.setSelected(false, clearSelection);
@@ -2151,7 +2198,7 @@ class Adaptable {
2151
2198
  this.gridOptions.api.redrawRows(redrawRowsParams);
2152
2199
  }
2153
2200
  catch (ex) {
2154
- (0, LoggingHelper_1.ConsoleLogError)('AG Grid redrawRows was unable to find some row nodes. Tried to redraw row nodes: ', rowNodes, ex);
2201
+ this.logger.consoleError('AG Grid redrawRows was unable to find some row nodes. Tried to redraw row nodes: ', rowNodes, ex);
2155
2202
  }
2156
2203
  }
2157
2204
  refreshCells(rowNodes, columns, forceUpdate, suppressFlash = false) {
@@ -2236,7 +2283,7 @@ class Adaptable {
2236
2283
  if (freeTextColumnSettings.HeaderToolTip) {
2237
2284
  newColDef.headerTooltip = freeTextColumnSettings.HeaderToolTip;
2238
2285
  }
2239
- (0, LoggingHelper_1.LogAdaptableInfo)('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
2286
+ this.logger.info('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
2240
2287
  return newColDef;
2241
2288
  });
2242
2289
  }
@@ -2370,7 +2417,7 @@ class Adaptable {
2370
2417
  cellRenderer: this.variant === 'react' ? ActionColumnRenderer_1.ReactActionColumnRenderer : ActionColumnRenderer_1.ActionColumnRenderer,
2371
2418
  type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
2372
2419
  };
2373
- (0, LoggingHelper_1.LogAdaptableInfo)('Setting up Action Column: ' + actionColumn.columnId);
2420
+ this.logger.info('Setting up Action Column: ' + actionColumn.columnId);
2374
2421
  return newColDef;
2375
2422
  });
2376
2423
  }
@@ -2487,7 +2534,7 @@ class Adaptable {
2487
2534
  if (calculatedColumnSettings.HeaderToolTip) {
2488
2535
  newColDef.headerTooltip = calculatedColumnSettings.HeaderToolTip;
2489
2536
  }
2490
- (0, LoggingHelper_1.LogAdaptableInfo)('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
2537
+ this.logger.info('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
2491
2538
  return newColDef;
2492
2539
  });
2493
2540
  }
@@ -2686,7 +2733,7 @@ class Adaptable {
2686
2733
  if (!this.abContainerElement) {
2687
2734
  let oldContainer = document.getElementById('adaptableBlotter');
2688
2735
  if (oldContainer) {
2689
- (0, LoggingHelper_1.LogAdaptableWarning)(`
2736
+ this.logger.warn(`
2690
2737
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2691
2738
  !!!!! The old default container element for Adaptable was "#adaptableBlotter", configured via 'containerOptions.adaptableContainer="adaptableBlotter"'.
2692
2739
  !!!!! Seems like you haven't updated your html container selector, so we're falling back to using that one.
@@ -2710,16 +2757,15 @@ class Adaptable {
2710
2757
  return this.gridContainerElement;
2711
2758
  }
2712
2759
  initInternalGridLogic() {
2713
- (0, LoggingHelper_1.LogAdaptableInfo)(`Initializing InternalGridLogic...`);
2714
2760
  if (this.abContainerElement == null) {
2715
2761
  this.abContainerElement = this.getAdaptableContainerElement();
2716
2762
  }
2717
2763
  if (this.abContainerElement == null) {
2718
2764
  if (typeof this.adaptableOptions.containerOptions.adaptableContainer === 'string') {
2719
- (0, LoggingHelper_1.ConsoleLogError)(`There is no DIV with id="${this.adaptableOptions.containerOptions.adaptableContainer}" so cannot render Adaptable`);
2765
+ this.logger.consoleError(`There is no DIV with id="${this.adaptableOptions.containerOptions.adaptableContainer}" so cannot render Adaptable`);
2720
2766
  }
2721
2767
  else {
2722
- (0, LoggingHelper_1.ConsoleLogError)(`No valid adaptableContainer found to render Adaptable`, this.adaptableOptions.containerOptions.adaptableContainer);
2768
+ this.logger.consoleError(`No valid adaptableContainer found to render Adaptable`, this.adaptableOptions.containerOptions.adaptableContainer);
2723
2769
  }
2724
2770
  return;
2725
2771
  }
@@ -2999,7 +3045,7 @@ class Adaptable {
2999
3045
  }
3000
3046
  }
3001
3047
  catch (ex) {
3002
- (0, LoggingHelper_1.LogAdaptableError)(ex);
3048
+ this.logger.error(ex);
3003
3049
  return false;
3004
3050
  }
3005
3051
  return originalDoesExternalFilterPass ? originalDoesExternalFilterPass(node) : true;
@@ -3054,7 +3100,7 @@ class Adaptable {
3054
3100
  return this.agGridMenuHelper.buildStandaloneColumnHeader(adaptableColumn);
3055
3101
  }
3056
3102
  prepareGrid() {
3057
- (0, LoggingHelper_1.LogAdaptableInfo)('Preparing grid...');
3103
+ const perfPrepareGrid = this.logger.beginPerf('prepareGrid()');
3058
3104
  // add any special renderers, display formats, custom sorts and apply the theme
3059
3105
  // then do any final rendering required, filter the grid and - to be on the safe set - redraw
3060
3106
  try {
@@ -3064,13 +3110,15 @@ class Adaptable {
3064
3110
  this.applyGridFiltering();
3065
3111
  }
3066
3112
  catch (ex) {
3067
- (0, LoggingHelper_1.ConsoleLogError)('AgGrid setup failed');
3068
- (0, LoggingHelper_1.ConsoleLogError)(ex);
3113
+ this.logger.consoleError('AgGrid setup failed');
3114
+ this.logger.consoleError(ex);
3069
3115
  }
3116
+ perfPrepareGrid.end();
3070
3117
  }
3071
3118
  setupColumns() {
3119
+ const perfSetupColumns = this.logger.beginPerf('setupColumns()');
3072
3120
  const cols = this.gridOptions.columnApi.getColumns();
3073
- cols.map((c) => c.getColDef()).forEach(assignColId);
3121
+ cols.map((c) => c.getColDef()).forEach((colDef) => assignColId(colDef, this.logger));
3074
3122
  // this needs to be here, before the other setup below
3075
3123
  // so the setup methods below reference the correct columns in adaptable store
3076
3124
  this.updateColumnsIntoStore();
@@ -3108,6 +3156,7 @@ class Adaptable {
3108
3156
  //this.setupAggregationColumnHeaders();
3109
3157
  this.redrawBody();
3110
3158
  this.redrawHeader();
3159
+ perfSetupColumns.end();
3111
3160
  }
3112
3161
  revertGridOptionsPropertiesToUserValue(propertyNames) {
3113
3162
  for (const propertyName of propertyNames) {
@@ -3712,7 +3761,7 @@ class Adaptable {
3712
3761
  }
3713
3762
  cellDataChangedInfos.forEach((cellDataChangedInfo) => {
3714
3763
  if (cellDataChangedInfo.trigger === 'undo') {
3715
- (0, LoggingHelper_1.LogAdaptableInfo)(`Undo data change: PK(${cellDataChangedInfo.primaryKeyValue}) Col(${cellDataChangedInfo.column}) RevertedValue(${cellDataChangedInfo.oldValue}) OriginalValue(${cellDataChangedInfo.newValue})`);
3764
+ this.logger.info(`Undo data change: PK(${cellDataChangedInfo.primaryKeyValue}) Col(${cellDataChangedInfo.column}) RevertedValue(${cellDataChangedInfo.oldValue}) OriginalValue(${cellDataChangedInfo.newValue})`);
3716
3765
  }
3717
3766
  if (cellDataChangedInfo.trigger === 'edit' || cellDataChangedInfo.trigger === 'undo') {
3718
3767
  this.checkChangedCellCurrentlySelected(cellDataChangedInfo);
@@ -4068,12 +4117,6 @@ class Adaptable {
4068
4117
  });
4069
4118
  return data;
4070
4119
  }
4071
- loadDataSource(dataSource) {
4072
- if (this.hasAutogeneratedPrimaryKey()) {
4073
- this.addSyntheticPrimaryKey(dataSource);
4074
- }
4075
- this.setDataSource(dataSource);
4076
- }
4077
4120
  updateRows(dataRows, dataUpdateConfig) {
4078
4121
  if (this.hasAutogeneratedPrimaryKey()) {
4079
4122
  this.addSyntheticPrimaryKeyIfMissing(dataRows);
@@ -4417,11 +4460,12 @@ class Adaptable {
4417
4460
  return val;
4418
4461
  });
4419
4462
  if (abLoaded !== '777') {
4420
- (0, LoggingHelper_1.ConsoleLogError)('Please import Adaptable styles from "@adaptabletools/adaptable/index.css"');
4463
+ this.logger.consoleError('Please import Adaptable styles from "@adaptabletools/adaptable/index.css"');
4421
4464
  }
4422
4465
  // every theme should define a custom css variable: --ab-theme-loaded: <themeName> defined on the document element.
4423
4466
  if (abThemeLoaded !== themeName) {
4424
- (0, LoggingHelper_1.ConsoleLogWarning)(`Theme "${themeName}" doesn't seem to be loaded! Make sure you import the css file for the "${themeName}" theme!
4467
+ this.logger
4468
+ .consoleWarn(`Theme "${themeName}" doesn't seem to be loaded! Make sure you import the css file for the "${themeName}" theme!
4425
4469
 
4426
4470
  If it's a default theme, try
4427
4471
 
@@ -4465,7 +4509,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4465
4509
  }
4466
4510
  getGridOptionsApi() {
4467
4511
  if (!this.gridOptions.api) {
4468
- (0, LoggingHelper_1.ConsoleLogError)('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
4512
+ this.logger.consoleError('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
4469
4513
  return;
4470
4514
  }
4471
4515
  return this.gridOptions.api;
@@ -4825,7 +4869,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4825
4869
  }
4826
4870
  showChart(chartDefinition, container) {
4827
4871
  if (!this.gridOptions.api) {
4828
- (0, LoggingHelper_1.ConsoleLogError)('Adaptable must be instantiated before calling showChart');
4872
+ this.logger.consoleError('Adaptable must be instantiated before calling showChart');
4829
4873
  return null;
4830
4874
  }
4831
4875
  /**
@@ -4844,7 +4888,7 @@ import "@adaptabletools/adaptable/themes/${themeName}.css"`);
4844
4888
  }
4845
4889
  getChartModels() {
4846
4890
  if (!this.gridOptions.api) {
4847
- (0, LoggingHelper_1.ConsoleLogError)('Adaptable must be instantiated before calling getChartModels');
4891
+ this.logger.consoleError('Adaptable must be instantiated before calling getChartModels');
4848
4892
  return [];
4849
4893
  }
4850
4894
  return this.gridOptions.api.getChartModels();