@adaptabletools/adaptable 15.0.2 → 15.0.3-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 (84) hide show
  1. package/bundle.cjs.js +164 -164
  2. package/package.json +2 -2
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
  6. package/src/AdaptableOptions/GeneralOptions.d.ts +4 -0
  7. package/src/Api/Implementation/ActionApiImpl.js +3 -4
  8. package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -0
  9. package/src/Api/Implementation/AdaptableApiImpl.js +12 -0
  10. package/src/Api/Implementation/AlertApiImpl.js +23 -24
  11. package/src/Api/Implementation/ApiBase.d.ts +4 -0
  12. package/src/Api/Implementation/ApiBase.js +14 -3
  13. package/src/Api/Implementation/CalculatedColumnApiImpl.js +8 -9
  14. package/src/Api/Implementation/CellSummaryApiImpl.js +1 -1
  15. package/src/Api/Implementation/ChartingApiImpl.js +1 -1
  16. package/src/Api/Implementation/ColumnApiImpl.js +31 -32
  17. package/src/Api/Implementation/CustomSortApiImpl.js +5 -6
  18. package/src/Api/Implementation/DashboardApiImpl.js +3 -3
  19. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
  20. package/src/Api/Implementation/DataSetApiImpl.js +3 -3
  21. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  22. package/src/Api/Implementation/FilterApiImpl.js +15 -16
  23. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -3
  24. package/src/Api/Implementation/FormatColumnApiImpl.js +18 -18
  25. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -10
  26. package/src/Api/Implementation/GridApiImpl.js +9 -10
  27. package/src/Api/Implementation/LayoutApiImpl.js +11 -12
  28. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  29. package/src/Api/Implementation/PredicateApiImpl.js +8 -9
  30. package/src/Api/Implementation/QueryApiImpl.js +5 -5
  31. package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -6
  32. package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
  33. package/src/Api/Implementation/ScheduleApiImpl.js +17 -17
  34. package/src/Api/Implementation/SettingsPanelApiImpl.js +3 -4
  35. package/src/Api/Implementation/ShortcutApiImpl.js +5 -5
  36. package/src/Api/Implementation/SmartEditApiImpl.js +1 -1
  37. package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
  38. package/src/Api/Implementation/SystemStatusApiImpl.js +2 -2
  39. package/src/Api/Implementation/TeamSharingApiImpl.js +11 -12
  40. package/src/Api/Implementation/ThemeApiImpl.js +4 -4
  41. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  42. package/src/Api/Internal/AdaptableInternalApi.js +1 -2
  43. package/src/Api/Internal/ChartingInternalApi.js +1 -2
  44. package/src/Api/Internal/QueryInternalApi.js +1 -2
  45. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +4 -4
  46. package/src/Redux/Store/AdaptableReduxMerger.js +1 -2
  47. package/src/Redux/Store/AdaptableStore.js +11 -13
  48. package/src/Strategy/CalculatedColumnModule.js +2 -3
  49. package/src/Strategy/DashboardModule.js +1 -2
  50. package/src/Strategy/DataChangeHistoryModule.js +1 -2
  51. package/src/Strategy/FilterModule.js +1 -2
  52. package/src/Strategy/FormatColumnModule.js +1 -2
  53. package/src/Strategy/StyledColumnModule.js +1 -2
  54. package/src/Strategy/ToolPanelModule.js +2 -3
  55. package/src/Utilities/Helpers/AdaptableHelper.js +1 -2
  56. package/src/Utilities/Helpers/DateHelper.js +2 -2
  57. package/src/Utilities/Helpers/Helper.js +3 -3
  58. package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -4
  59. package/src/Utilities/Services/AlertService.js +1 -2
  60. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -4
  61. package/src/Utilities/Services/DataService.js +1 -2
  62. package/src/Utilities/Services/LicenseService/index.js +1 -1
  63. package/src/Utilities/Services/MetamodelService.js +3 -4
  64. package/src/Utilities/Services/QueryLanguageService.js +1 -2
  65. package/src/Utilities/logDeprecation.d.ts +4 -3
  66. package/src/Utilities/logDeprecation.js +6 -7
  67. package/src/View/Charting/useChartState.js +1 -2
  68. package/src/View/Dashboard/Dashboard.js +1 -2
  69. package/src/View/StateManagement/handleExportState.js +1 -2
  70. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +1 -2
  71. package/src/agGrid/Adaptable.d.ts +2 -0
  72. package/src/agGrid/Adaptable.js +76 -43
  73. package/src/agGrid/AdaptableLogger.d.ts +26 -0
  74. package/src/agGrid/AdaptableLogger.js +148 -0
  75. package/src/agGrid/agGridHelper.js +7 -8
  76. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -2
  77. package/src/components/OverlayTrigger/index.js +1 -2
  78. package/src/components/SelectableList/index.js +0 -2
  79. package/src/components/icons/index.js +2 -2
  80. package/src/metamodel/adaptable.metamodel.js +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
  83. package/src/Utilities/Helpers/LoggingHelper.d.ts +0 -15
  84. package/src/Utilities/Helpers/LoggingHelper.js +0 -111
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CalculatedColumnExpressionService = void 0;
4
- const LoggingHelper_1 = require("../Helpers/LoggingHelper");
5
4
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
6
5
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
7
6
  class CalculatedColumnExpressionService {
@@ -74,7 +73,7 @@ class CalculatedColumnExpressionService {
74
73
  }
75
74
  }
76
75
  catch (e) {
77
- (0, LoggingHelper_1.LogAdaptableWarning)(`Invalid CalculatedColumn expression ${this.adaptableApi.queryLanguageApi.getAdaptableQueryExpression(calculatedColumnQuery)} :: ${e}`);
76
+ this.adaptableApi.logError(`Invalid CalculatedColumn expression ${this.adaptableApi.queryLanguageApi.getAdaptableQueryExpression(calculatedColumnQuery)} :: ${e}`);
78
77
  return 'Number';
79
78
  }
80
79
  }
@@ -118,7 +117,7 @@ class CalculatedColumnExpressionService {
118
117
  }
119
118
  }
120
119
  catch (error) {
121
- (0, LoggingHelper_1.LogAdaptableError)(`Invalid CalculatedColumn expression ${(_d = (_c = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.ScalarExpression) !== null && _d !== void 0 ? _d : (_e = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _e === void 0 ? void 0 : _e.AggregatedScalarExpression} :: ${error}`);
120
+ this.adaptableApi.logError(`Invalid CalculatedColumn expression ${(_d = (_c = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.ScalarExpression) !== null && _d !== void 0 ? _d : (_e = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _e === void 0 ? void 0 : _e.AggregatedScalarExpression} :: ${error}`);
122
121
  return null;
123
122
  }
124
123
  }
@@ -134,7 +133,7 @@ class CalculatedColumnExpressionService {
134
133
  this.aggregatedScalarLiveValuesMap.set(calculatedColumn.Uuid, aggregatedScalarLiveValue);
135
134
  }
136
135
  catch (e) {
137
- (0, LoggingHelper_1.LogAdaptableError)(`Creating CalculatedColumn ('${(_c = calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.AggregatedScalarExpression}') failed!`, e.message);
136
+ this.adaptableApi.logError(`Creating CalculatedColumn ('${(_c = calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.AggregatedScalarExpression}') failed!`, e.message);
138
137
  }
139
138
  }
140
139
  }
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
6
6
  const rxjs_1 = require("rxjs");
7
7
  const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
8
- const LoggingHelper_1 = require("../Helpers/LoggingHelper");
9
8
  // ~ 8 hours
10
9
  const MAX_TIMEFRAME_SIZE = 86400000;
11
10
  class DataService {
@@ -50,7 +49,7 @@ class DataService {
50
49
  // why 2 and not 3 or 1? no good reason, only seems like a reasonable waiting time :)
51
50
  const UNDO_WAIT = 2000;
52
51
  const timeoutId = setTimeout(() => {
53
- (0, LoggingHelper_1.LogAdaptableInfo)(`Undo change was NOT handled, this should NOT happen: PK(${change.primaryKeyValue}) Col(${change.column}) RevertedValue(${change.newValue}) NewValue(${change.oldValue})`);
52
+ this.adaptable.logger.warn(`Undo change was NOT handled, this should NOT happen: PK(${change.primaryKeyValue}) Col(${change.column}) RevertedValue(${change.newValue}) NewValue(${change.oldValue})`);
54
53
  this.extractUndoChange(change);
55
54
  }, UNDO_WAIT);
56
55
  this.undoChangeTimers.set(undoChangeKey, timeoutId);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),s=require("../../../Redux/ActionsReducers/PopupRedux"),t=e.__importDefault(require("../../ObjectFactory")),o=require("../../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../../Constants/DocumentationLinkConstants"),r=require("../../license/decode"),c=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",d=10,p=864e5;var E;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(E=exports.LicenseValidityType||(exports.LicenseValidityType={}));const _=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,I=/(https):\/\/\S+(\.csb\.app)/g,O=/(https):\/\/\S+(\.adaptabletools\.com)/g,u="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,s]=Array.from(_.exec(u)||[]);return"https"===a&&"sandpack.codesandbox.io"===s},A=()=>{const[e,a,s]=Array.from(I.exec(u)||[]);return"https"===a&&".csb.app"===s},N=()=>{const[e,a,s]=Array.from(O.exec(u)||[]);return"https"===a&&".adaptabletools.com"===s};class L{constructor(e,a,s){this.adaptable=e,this.adaptable=e;let t=null;if(a)try{t=(0,r.decode)(a)}catch(e){t=e}h()||A()||N()||this.handleLicenseValidation(t,this.getValidityType(t,s))}getValidityType(e,a){if(!e)return E.NO_LICENSE;if(e instanceof Error)return E.INVALID_LICENSE;const s=new Date(a.publishedAt),t=new Date(e.end),o=t<new Date,i=e.trial;let n=null;return n=o?t>s?i?E.NON_PRODUCTION_EXPIRED_IN_SCOPE:E.COMMERCIAL_EXPIRED_IN_SCOPE:i?E.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:E.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?E.NON_PRODUCTION_VALID:E.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var s;const t=new Date;t.setHours(0,0,0,0);let E=0;e instanceof Error||!(null==e?void 0:e.end)||(E=Math.floor(((null===(s=null==e?void 0:e.end)||void 0===s?void 0:s.getTime())-t.getTime())/p),E=(0,i.default)(E,0,1/0));let _="",I="";!e||e instanceof Error||!e.appName||e.appName==r.GENERIC_APP_NAME||(_=e.appName,I=" for application [APP_NAME]");const O=(e,a=n.LicenseDocsLink,s=l,t=E,o=_)=>e.replace("[LINK]",a).replace("[EMAIL]",s).replace("[APP_NAME]",o).replace("[DAYS]",`${t}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":(0,o.ConsoleLogByMessageType)(O("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(E<=d)(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,c.shouldLogThankYouMessage)()&&(0,o.ConsoleLogByMessageType)(O(`Thank you for using a valid AdapTable license${I}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":(0,o.ConsoleLogByMessageType)(O(`This AdapTable license${I} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,s.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:t.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=L;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),o=e.__importDefault(require("lodash/clamp")),i=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p=exports.LicenseValidityType||(exports.LicenseValidityType={}));const E=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,_=/(https):\/\/\S+(\.csb\.app)/g,h=/(https):\/\/\S+(\.adaptabletools\.com)/g,I="undefined"!=typeof window?window.location.origin:"",O=()=>{const[e,a,t]=Array.from(E.exec(I)||[]);return"https"===a&&"sandpack.codesandbox.io"===t},u=()=>{const[e,a,t]=Array.from(_.exec(I)||[]);return"https"===a&&".csb.app"===t},A=()=>{const[e,a,t]=Array.from(h.exec(I)||[]);return"https"===a&&".adaptabletools.com"===t};class N{constructor(e,a,t){this.adaptable=e,this.adaptable=e;let s=null;if(a)try{s=(0,n.decode)(a)}catch(e){s=e}O()||u()||A()||this.handleLicenseValidation(s,this.getValidityType(s,t))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),o=s<new Date,i=e.trial;let n=null;return n=o?s>t?i?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:i?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const s=new Date;s.setHours(0,0,0,0);let p=0;e instanceof Error||!(null==e?void 0:e.end)||(p=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-s.getTime())/d),p=(0,o.default)(p,0,1/0));let E="",_="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(E=e.appName,_=" for application [APP_NAME]");const h=(e,a=i.LicenseDocsLink,t=l,s=p,o=E)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",o).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(p<=c)this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(h(`Thank you for using a valid AdapTable license${_}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=N;
@@ -4,9 +4,9 @@ exports.MetamodelService = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
6
6
  const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
7
- const LoggingHelper_1 = require("../Helpers/LoggingHelper");
8
7
  const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
9
8
  const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
9
+ const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
10
10
  const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
11
11
  class MetamodelService {
12
12
  constructor(getAdaptableOptions) {
@@ -28,17 +28,16 @@ class MetamodelService {
28
28
  }
29
29
  validateAdaptableOptionsValues() {
30
30
  var _a;
31
- (0, LoggingHelper_1.LogAdaptableInfo)('Validating Adaptable Options...');
32
31
  const adaptableOptionsValues = this.getAdaptableOptions();
33
32
  const adaptableOptionsMetamodel = this.getAdaptableOptionsMetamodel();
34
33
  const adaptableOptionsDefaultValues = this.getAdaptableOptionsDefaultValues();
35
34
  if ((_a = adaptableOptionsValues.adaptableId) === null || _a === void 0 ? void 0 : _a.includes('.')) {
36
- (0, LoggingHelper_1.ConsoleLogWarning)("The 'AdaptableOptions.adaptableId' property should NOT include a '.' character. We strongly recommend to remove it to avoid unexpected AdapTable behavior.");
35
+ AdaptableLogger_1.AdaptableLogger.consoleWarnBase("The 'AdaptableOptions.adaptableId' property should NOT include a '.' character. We strongly recommend to remove it to avoid unexpected AdapTable behavior.");
37
36
  }
38
37
  const validationErrors = [];
39
38
  this.validateOptionsObject(validationErrors, 'AdaptableOptions', adaptableOptionsValues, adaptableOptionsMetamodel, adaptableOptionsDefaultValues);
40
39
  if (validationErrors.length) {
41
- (0, LoggingHelper_1.LogAdaptableWarning)([
40
+ AdaptableLogger_1.AdaptableLogger.consoleWarnBase([
42
41
  'AdaptableOptions validation errors:',
43
42
  '\n',
44
43
  ...validationErrors,
@@ -4,7 +4,6 @@ exports.QueryLanguageService = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const parser = tslib_1.__importStar(require("../../parser/src"));
6
6
  const rxjs_1 = require("rxjs");
7
- const LoggingHelper_1 = require("../Helpers/LoggingHelper");
8
7
  const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
9
8
  const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
10
9
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
@@ -289,7 +288,7 @@ class QueryLanguageService {
289
288
  const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions);
290
289
  const generalAggregatedScalarExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions, expressionOptions.systemAggregatedScalarFunctions);
291
290
  if (!module) {
292
- (0, LoggingHelper_1.LogAdaptableInfo)(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
291
+ this.adaptableApi.logWarn(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
293
292
  return {
294
293
  booleanFunctions: generalBooleanExpressionFunctions,
295
294
  scalarFunctions: generalScalarExpressionFunctions,
@@ -1,3 +1,4 @@
1
- export declare const logDeprecation: <T>(typeName: string, oldProp: keyof T, newProp?: keyof T, message?: string) => void;
2
- export declare const logDeprecationExternal: <OLD_TYPE, NEW_TYPE>(oldTypeName: string, oldProp: keyof OLD_TYPE, newTypeName: string, newProp: keyof NEW_TYPE, message?: string) => void;
3
- export declare const logDeprecationInternal: <T>(typeName: string, oldProp: keyof T) => void;
1
+ import { AdaptableLogger } from '../agGrid/AdaptableLogger';
2
+ export declare const logDeprecation: <T>(logger: AdaptableLogger, typeName: string, oldProp: keyof T, newProp?: keyof T, message?: string) => void;
3
+ export declare const logDeprecationExternal: <OLD_TYPE, NEW_TYPE>(logger: AdaptableLogger, oldTypeName: string, oldProp: keyof OLD_TYPE, newTypeName: string, newProp: keyof NEW_TYPE, message?: string) => void;
4
+ export declare const logDeprecationInternal: <T>(logger: AdaptableLogger, typeName: string, oldProp: keyof T) => void;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.logDeprecationInternal = exports.logDeprecationExternal = exports.logDeprecation = void 0;
4
- const LoggingHelper_1 = require("./Helpers/LoggingHelper");
5
4
  const doOnceFlags = {};
6
5
  /**
7
6
  * If the key was passed before, then do NOT execute the func
@@ -13,18 +12,18 @@ const doOnce = (func, key) => {
13
12
  func();
14
13
  doOnceFlags[key] = true;
15
14
  };
16
- const logDeprecation = (typeName, oldProp, newProp, message) => {
15
+ const logDeprecation = (logger, typeName, oldProp, newProp, message) => {
17
16
  const newPropMsg = newProp ? `Please use '${typeName}.${newProp}()' instead. ` : '';
18
- doOnce(() => (0, LoggingHelper_1.ConsoleLogWarning)(`Adaptable: '${typeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
17
+ doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
19
18
  };
20
19
  exports.logDeprecation = logDeprecation;
21
- const logDeprecationExternal = (oldTypeName, oldProp, newTypeName, newProp, message) => {
20
+ const logDeprecationExternal = (logger, oldTypeName, oldProp, newTypeName, newProp, message) => {
22
21
  const newPropMsg = newProp ? `Please use '${newTypeName}.${newProp}()' instead. ` : '';
23
- doOnce(() => (0, LoggingHelper_1.ConsoleLogWarning)(`Adaptable: '${oldTypeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
22
+ doOnce(() => logger.consoleWarn(`'${oldTypeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
24
23
  };
25
24
  exports.logDeprecationExternal = logDeprecationExternal;
26
- const logDeprecationInternal = (typeName, oldProp) => {
27
- doOnce(() => (0, LoggingHelper_1.ConsoleLogWarning)(`Adaptable: '${typeName}.${oldProp}()' is deprecated. The method will be removed in the next major release.
25
+ const logDeprecationInternal = (logger, typeName, oldProp) => {
26
+ doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. The method will be removed in the next major release.
28
27
  Please contact support if you need the missing functionality.`), `Deprecated_${oldProp}`);
29
28
  };
30
29
  exports.logDeprecationInternal = logDeprecationInternal;
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
7
  const AdaptableContext_1 = require("../AdaptableContext");
8
8
  const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
9
- const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
10
9
  const useChartState = (chartDefinition) => {
11
10
  const [chartRef, setChartRef] = React.useState(null);
12
11
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -40,7 +39,7 @@ const useChartState = (chartDefinition) => {
40
39
  ? document.querySelector(chartContainer.element)
41
40
  : chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
42
41
  if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
43
- (0, LoggingHelper_1.ConsoleLogByMessageType)(`Chart container element not found: ${chartContainer.element}`, 'Error');
42
+ adaptable.logger.consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
44
43
  return;
45
44
  }
46
45
  const chartRef = adaptable.api.chartingApi.getChartRef(chartDefinition.Model.chartId);
@@ -10,7 +10,6 @@ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
10
10
  const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/DashboardRedux"));
11
11
  const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
12
12
  const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
13
- const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
14
13
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
15
14
  const rebass_1 = require("rebass");
16
15
  const Dashboard_1 = require("../../components/Dashboard");
@@ -60,7 +59,7 @@ const DashboardComponent = (props) => {
60
59
  React.createElement(ModuleToolbarWrapper_1.ModuleToolbarWrapper, { moduleInfo: moduleInfo, accessLevel: dashboardAccessLevel }, moduleToolbarElement)));
61
60
  }
62
61
  else {
63
- (0, LoggingHelper_1.LogAdaptableError)('Cannot find Dashboard Control for ' + visibleToolbarName);
62
+ props.api.logError('Cannot find Dashboard Control for ' + visibleToolbarName);
64
63
  }
65
64
  }
66
65
  }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleExportState = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
6
- const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
7
6
  const handleExportState = (type, name, state) => {
8
7
  switch (type) {
9
8
  case 'Clipboard':
@@ -11,7 +10,7 @@ const handleExportState = (type, name, state) => {
11
10
  Helper_1.default.copyToClipboard(stringifiedState);
12
11
  break;
13
12
  case 'Console':
14
- (0, LoggingHelper_1.ConsoleLog)(state);
13
+ console.log('Adaptable State: ', state);
15
14
  break;
16
15
  case 'JSON':
17
16
  const jsonFileName = name + '.json';
@@ -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,
@@ -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;