@adaptabletools/adaptable-cjs 22.0.0-canary.0 → 22.0.0-canary.2

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 (138) hide show
  1. package/README.md +4 -6
  2. package/index.css +3 -14
  3. package/index.css.map +1 -1
  4. package/package.json +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -0
  6. package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
  7. package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
  8. package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
  9. package/src/AdaptableState/Common/AdaptableColumn.d.ts +6 -0
  10. package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
  11. package/src/AdaptableState/InitialState.d.ts +1 -1
  12. package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
  13. package/src/Api/GridApi.d.ts +14 -0
  14. package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
  15. package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
  16. package/src/Api/Implementation/AlertApiImpl.js +1 -0
  17. package/src/Api/Implementation/ApiBase.js +1 -0
  18. package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
  19. package/src/Api/Implementation/ChartingApiImpl.js +4 -0
  20. package/src/Api/Implementation/ColumnApiImpl.js +1 -0
  21. package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
  22. package/src/Api/Implementation/CommentsApiImpl.js +1 -0
  23. package/src/Api/Implementation/CustomSortApiImpl.js +1 -0
  24. package/src/Api/Implementation/DashboardApiImpl.js +1 -0
  25. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
  26. package/src/Api/Implementation/DataImportApiImpl.js +1 -0
  27. package/src/Api/Implementation/DataSetApiImpl.js +1 -0
  28. package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
  29. package/src/Api/Implementation/EventApiImpl.js +16 -14
  30. package/src/Api/Implementation/ExportApiImpl.js +1 -0
  31. package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
  32. package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
  33. package/src/Api/Implementation/FilterApiImpl.js +3 -0
  34. package/src/Api/Implementation/FlashingCellApiImpl.js +1 -0
  35. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -0
  36. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
  37. package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
  38. package/src/Api/Implementation/GridApiImpl.js +17 -0
  39. package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
  40. package/src/Api/Implementation/LayoutApiImpl.js +1 -0
  41. package/src/Api/Implementation/NamedQueryApiImpl.js +1 -0
  42. package/src/Api/Implementation/NoteApiImpl.js +1 -0
  43. package/src/Api/Implementation/PredicateApiImpl.js +1 -0
  44. package/src/Api/Implementation/RowFormApiImpl.js +1 -0
  45. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
  46. package/src/Api/Implementation/SystemStatusApiImpl.js +2 -0
  47. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  48. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  49. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -1
  50. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
  51. package/src/Redux/Store/AdaptableStore.js +57 -50
  52. package/src/Strategy/AdaptableModuleBase.js +4 -0
  53. package/src/Strategy/AlertModule.js +1 -0
  54. package/src/Strategy/CalculatedColumnModule.js +1 -0
  55. package/src/Strategy/CellSummaryModule.js +1 -1
  56. package/src/Strategy/DataChangeHistoryModule.js +1 -0
  57. package/src/Strategy/FlashingCellModule.js +1 -0
  58. package/src/Strategy/FreeTextColumnModule.js +1 -0
  59. package/src/Strategy/LayoutModule.js +2 -1
  60. package/src/Strategy/PlusMinusModule.js +2 -0
  61. package/src/Strategy/ScheduleModule.js +1 -0
  62. package/src/Strategy/ShortcutModule.js +2 -0
  63. package/src/Strategy/TeamSharingModule.js +10 -10
  64. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +18 -17
  65. package/src/Utilities/Constants/DocumentationLinkConstants.js +19 -18
  66. package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
  67. package/src/Utilities/MenuItem.js +18 -0
  68. package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
  69. package/src/Utilities/Services/AlertService.js +6 -4
  70. package/src/Utilities/Services/AnnotationsService.js +3 -0
  71. package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
  72. package/src/Utilities/Services/ChartingService.js +1 -0
  73. package/src/Utilities/Services/DataService.js +10 -2
  74. package/src/Utilities/Services/Fdc3Service.js +5 -3
  75. package/src/Utilities/Services/FlashingCellService.js +5 -0
  76. package/src/Utilities/Services/LicenseService/index.js +1 -1
  77. package/src/Utilities/Services/MetamodelService.js +2 -2
  78. package/src/Utilities/Services/ModuleService.js +38 -38
  79. package/src/Utilities/Services/QueryLanguageService.js +6 -5
  80. package/src/Utilities/Services/RowFormService.js +1 -0
  81. package/src/Utilities/Services/RowSummaryService.js +10 -7
  82. package/src/Utilities/Services/TeamSharingService.js +3 -1
  83. package/src/Utilities/Services/ThemeService.js +11 -9
  84. package/src/Utilities/Services/ValidationService.js +1 -0
  85. package/src/Utilities/createAgStatusPanelComponent.js +3 -0
  86. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -0
  87. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +8 -8
  88. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -0
  89. package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
  90. package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
  91. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
  92. package/src/View/Components/ExpressionWizard.js +5 -5
  93. package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
  94. package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
  95. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
  96. package/src/View/CustomSort/CustomSortSummary.js +13 -13
  97. package/src/View/FormatColumn/FormatColumnSummary.js +13 -13
  98. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +13 -13
  99. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
  100. package/src/View/Theme/ThemePopup.js +13 -16
  101. package/src/agGrid/Adaptable.js +4 -0
  102. package/src/agGrid/AdaptableAgGrid.d.ts +9 -0
  103. package/src/agGrid/AdaptableAgGrid.js +160 -37
  104. package/src/agGrid/AdaptableFilterHandler.js +4 -0
  105. package/src/agGrid/AdaptableLogger.d.ts +3 -0
  106. package/src/agGrid/AdaptableLogger.js +10 -0
  107. package/src/agGrid/AgGridAdapter.js +11 -1
  108. package/src/agGrid/AgGridColumnAdapter.js +2 -0
  109. package/src/agGrid/AgGridExportAdapter.js +10 -9
  110. package/src/agGrid/AgGridFilterAdapter.js +4 -0
  111. package/src/agGrid/AgGridFloatingFilterAdapter.js +3 -0
  112. package/src/agGrid/AgGridMenuAdapter.js +1 -0
  113. package/src/agGrid/AgGridModulesAdapter.js +2 -1
  114. package/src/agGrid/AgGridOptionsService.js +3 -0
  115. package/src/agGrid/AgGridThemeAdapter.js +2 -0
  116. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
  117. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
  118. package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
  119. package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
  120. package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
  121. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
  122. package/src/agGrid/index.d.ts +6 -0
  123. package/src/agGrid/index.js +6 -0
  124. package/src/components/Datepicker/index.js +1 -1
  125. package/src/components/overlayBaseZIndex.js +1 -1
  126. package/src/components/utils/useContainerScrollObserver/index.js +17 -14
  127. package/src/devTools/index.js +54 -53
  128. package/src/env.js +2 -2
  129. package/src/layout-manager/src/LMEmitter.js +11 -11
  130. package/src/layout-manager/src/LMLogger.js +7 -0
  131. package/src/layout-manager/src/index.js +56 -51
  132. package/src/metamodel/adaptable.metamodel.d.ts +57 -0
  133. package/src/metamodel/adaptable.metamodel.js +1 -1
  134. package/src/migration/AdaptableUpgradeHelper.js +3 -0
  135. package/src/migration/VersionUpgrade.js +1 -0
  136. package/src/migration/VersionUpgrade17.js +1 -2
  137. package/src/parser/src/ExpressionEvaluationError.js +1 -0
  138. package/tsconfig.cjs.tsbuildinfo +1 -1
@@ -20,6 +20,7 @@ const getAlertBehaviourViewItems_1 = require("./Utilities/Alert/getAlertBehaviou
20
20
  const getAlertPreviewViewItems_1 = require("./Utilities/Alert/getAlertPreviewViewItems");
21
21
  const getAlertTypeViewItems_1 = require("./Utilities/Alert/getAlertTypeViewItems");
22
22
  class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
23
+ isListeningToCellDataChanges;
23
24
  constructor(api) {
24
25
  super(ModuleConstants.AlertModuleId, ModuleConstants.AlertModuleFriendlyName, 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
25
26
  this.isListeningToCellDataChanges = false;
@@ -11,6 +11,7 @@ const getCalculatedColumnSettingsTags_1 = require("../View/CalculatedColumn/Util
11
11
  const getExpressionViewItems_1 = require("../Utilities/getExpressionViewItems");
12
12
  const getObjectTagsViewItems_1 = require("../Utilities/getObjectTagsViewItems");
13
13
  class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
14
+ isListeningToCellDataChanges;
14
15
  constructor(api) {
15
16
  super(ModuleConstants.CalculatedColumnModuleId, ModuleConstants.CalculatedColumnFriendlyName, 'calculated-column', 'CalculatedColumnPopup', 'Create bespoke columns whose cell value is derived dynamically from an Expression', api);
16
17
  this.isListeningToCellDataChanges = false;
@@ -12,9 +12,9 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
12
12
  * Module that provides Cell Summaries on numeric columns
13
13
  */
14
14
  class CellSummaryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
15
+ cachedCellSummary = new WeakMap();
15
16
  constructor(api) {
16
17
  super(ModuleConstants.CellSummaryModuleId, ModuleConstants.CellSummaryFriendlyName, 'cells', 'CellSummaryPopup', 'See summary information on a group of numeric cells using multiple summary operations', api);
17
- this.cachedCellSummary = new WeakMap();
18
18
  }
19
19
  getViewAccessLevel() {
20
20
  return 'Full';
@@ -6,6 +6,7 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
6
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
7
  const DataChangeHistoryStatusBarContent_1 = require("../View/DataChangeHistory/DataChangeHistoryStatusBarContent");
8
8
  class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase {
9
+ isListeningToCellDataChanges;
9
10
  constructor(api) {
10
11
  super(ModuleConstants.DataChangeHistoryModuleId, ModuleConstants.DataChangeHistoryFriendlyName, 'target', 'DataChangeHistoryPopup', 'Provides an overview of all previous changes, giving the possibility to undo specific changes', api);
11
12
  this.isListeningToCellDataChanges = false;
@@ -16,6 +16,7 @@ const FlashingCellWizard_1 = require("../View/FlashingCell/Wizard/FlashingCellWi
16
16
  const getFlashingCellDurationViewItems_1 = require("./Utilities/FlashingCell/getFlashingCellDurationViewItems");
17
17
  const AdaptableLogger_1 = require("../agGrid/AdaptableLogger");
18
18
  class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
+ isListeningToCellDataChanges;
19
20
  constructor(api) {
20
21
  super(ModuleConstants.FlashingCellModuleId, ModuleConstants.FlashingCellFriendlyName, 'lightning', 'FlashingAlert', 'Flash cells when they change', api);
21
22
  this.isListeningToCellDataChanges = false;
@@ -9,6 +9,7 @@ const FreeTextColumnWizard_1 = require("../View/FreeTextColumn/Wizard/FreeTextCo
9
9
  const getObjectTagsViewItems_1 = require("../Utilities/getObjectTagsViewItems");
10
10
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
11
11
  class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
12
+ isListeningToCellDataChanges;
12
13
  constructor(api) {
13
14
  super(ModuleConstants.FreeTextColumnModuleId, ModuleConstants.FreeTextColumnFriendlyName, 'horizontal-lines', 'FreeTextColumnPopup', 'Dynamic column showing custom content (stored in state and not with grid data)', api);
14
15
  this.isListeningToCellDataChanges = false;
@@ -21,9 +21,10 @@ const getGridFilterPreview_1 = require("../View/Layout/Wizard/getGridFilterPrevi
21
21
  const RowSummaryService_1 = require("../Utilities/Services/RowSummaryService");
22
22
  const LayoutHelpers_1 = require("../Api/Implementation/LayoutHelpers");
23
23
  class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
24
+ LayoutState;
25
+ rowSummaryService = new RowSummaryService_1.RowSummaryService(this.api);
24
26
  constructor(api) {
25
27
  super(ModuleConstants.LayoutModuleId, ModuleConstants.LayoutFriendlyName, 'grid', 'LayoutPopup', 'Named sets of column visibility, order, groupings, aggregation, pivots etc.', api);
26
- this.rowSummaryService = new RowSummaryService_1.RowSummaryService(this.api);
27
28
  }
28
29
  onAdaptableReady() {
29
30
  this.rowSummaryService.onAdaptableReady();
@@ -15,6 +15,8 @@ const MovePlusMinus_1 = require("../View/PlusMinus/MovePlusMinus");
15
15
  const PlusMinusWizard_1 = require("../View/PlusMinus/Wizard/PlusMinusWizard");
16
16
  const AdaptableLogger_1 = require("../agGrid/AdaptableLogger");
17
17
  class PlusMinusModule extends AdaptableModuleBase_1.AdaptableModuleBase {
18
+ shouldHandleKeyDown;
19
+ adaptable;
18
20
  constructor(api) {
19
21
  super(ModuleConstants.PlusMinusModuleId, ModuleConstants.PlusMinusFriendlyName, 'add-circle', 'PlusMinusPopup', 'Configure how a cell value will edit when the + or - keys are pressed', api);
20
22
  this.shouldHandleKeyDown = false;
@@ -35,6 +35,7 @@ const NodeSchedule = {
35
35
  },
36
36
  };
37
37
  class ScheduleModule extends AdaptableModuleBase_1.AdaptableModuleBase {
38
+ scheduleJobs;
38
39
  constructor(api) {
39
40
  super(ModuleConstants.ScheduleModuleId, ModuleConstants.ScheduleFriendlyName, 'schedule', 'SchedulePopup', 'Schedule AdapTable functionality to run at times of your choosing (e.g. run reports)', api);
40
41
  this.scheduleJobs = [];
@@ -13,6 +13,8 @@ const getShortcutSettingsViewItems_1 = require("./Utilities/Shortcut/getShortcut
13
13
  const getObjectTagsViewItems_1 = require("../Utilities/getObjectTagsViewItems");
14
14
  const getScopeViewItems_1 = require("../Utilities/getScopeViewItems");
15
15
  class ShortcutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
16
+ shouldHandleKeyDown;
17
+ adaptable;
16
18
  constructor(api) {
17
19
  super(ModuleConstants.ShortcutModuleId, ModuleConstants.ShortcutFriendlyName, 'link', 'ShortcutPopup', 'Set up rules so cells update mathematically when keys are pressed in numeric cells', api);
18
20
  this.shouldHandleKeyDown = false;
@@ -15,18 +15,18 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensio
15
15
  const flatten_1 = tslib_1.__importDefault(require("lodash/flatten"));
16
16
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
17
17
  class TeamSharingModule extends AdaptableModuleBase_1.AdaptableModuleBase {
18
+ SKIP_TEAMSHARING_UPDATE_ACTIONS = [
19
+ TeamSharingRedux_1.TEAMSHARING_GET,
20
+ TeamSharingRedux_1.TEAMSHARING_SET,
21
+ TeamSharingRedux_1.TEAMSHARING_SHARE,
22
+ TeamSharingRedux_1.TEAMSHARING_IMPORT_ITEM,
23
+ TeamSharingRedux_1.TEAMSHARING_PROCESS_IMPORT,
24
+ TeamSharingRedux_1.TEAMSHARING_REMOVE_ITEM,
25
+ TeamSharingRedux_1.TEAMSHARING_LINK_ITEM,
26
+ TeamSharingRedux_1.TEAMSHARING_UPDATE_ITEM,
27
+ ];
18
28
  constructor(api) {
19
29
  super(ModuleConstants.TeamSharingModuleId, ModuleConstants.TeamSharingFriendlyName, 'folder-shared', 'TeamSharingPopup', 'Team Sharing allows users to share - at run-time - Adaptable Objects between colleagues.', api);
20
- this.SKIP_TEAMSHARING_UPDATE_ACTIONS = [
21
- TeamSharingRedux_1.TEAMSHARING_GET,
22
- TeamSharingRedux_1.TEAMSHARING_SET,
23
- TeamSharingRedux_1.TEAMSHARING_SHARE,
24
- TeamSharingRedux_1.TEAMSHARING_IMPORT_ITEM,
25
- TeamSharingRedux_1.TEAMSHARING_PROCESS_IMPORT,
26
- TeamSharingRedux_1.TEAMSHARING_REMOVE_ITEM,
27
- TeamSharingRedux_1.TEAMSHARING_LINK_ITEM,
28
- TeamSharingRedux_1.TEAMSHARING_UPDATE_ITEM,
29
- ];
30
30
  }
31
31
  onAdaptableReady() {
32
32
  if (this.api.teamSharingApi.isTeamSharingAvailable()) {
@@ -1,17 +1,18 @@
1
- export declare const HOST_URL_DOCS = "https://docs.adaptabletools.com";
2
- export declare const ExpressionEditorDocsLink = "https://docs.adaptabletools.com/guide/ui-expression-editor";
3
- export declare const BooleanQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-standard";
4
- export declare const ScalarQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-standard";
5
- export declare const ObservableQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-observable";
6
- export declare const AggregatedBooleanQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-aggregation";
7
- export declare const AggregatedScalarQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-aggregation";
8
- export declare const CumulativeAggregatedScalarQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-cumulative";
9
- export declare const QuantileAggregatedScalarQueryDocsLink = "https://docs.adaptabletools.com/guide/adaptable-ql-expression-quantile";
10
- export declare const PredicateDocsLink = "https://docs.adaptabletools.com/guide/adaptable-predicate";
11
- export declare const PrimaryKeyDocsLink = "https://docs.adaptabletools.com/guide/getting-started-primary-key";
12
- export declare const LicenseDocsLink = "https://docs.adaptabletools.com/guide/licensing";
13
- export declare const AdaptableOptionsDocsLink = "https://docs.adaptabletools.com/guide/reference-options-overview";
14
- export declare const AgGridModulesDocsLink = "https://docs.adaptabletools.com/guide/dev-guide-aggrid-modules-overview";
15
- export declare const AlertMessageDocsLink = "https://docs.adaptabletools.com/guide/handbook-alerting-message";
16
- export declare const FormatColumnPlaceholderDocsLink = "https://docs.adaptabletools.com/guide/handbook-column-formatting-display-format-placeholder";
17
- export declare const AgGridRequiredModulesDocsLink = "https://docs.adaptabletools.com/guide/dev-guide-aggrid-modules-overview#mandatory-modules";
1
+ export declare const HOST_URL_ROOT = "https://www.adaptabletools.com";
2
+ export declare const HOST_URL_DOCS = "https://www.adaptabletools.com/docs";
3
+ export declare const ExpressionEditorDocsLink = "https://www.adaptabletools.com/docs/ui-expression-editor";
4
+ export declare const BooleanQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-standard";
5
+ export declare const ScalarQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-standard";
6
+ export declare const ObservableQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-observable";
7
+ export declare const AggregatedBooleanQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-aggregation";
8
+ export declare const AggregatedScalarQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-aggregation";
9
+ export declare const CumulativeAggregatedScalarQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-cumulative";
10
+ export declare const QuantileAggregatedScalarQueryDocsLink = "https://www.adaptabletools.com/docs/adaptable-ql-expression-quantile";
11
+ export declare const PredicateDocsLink = "https://www.adaptabletools.com/docs/adaptable-predicate";
12
+ export declare const PrimaryKeyDocsLink = "https://www.adaptabletools.com/docs/getting-started-primary-key";
13
+ export declare const LicenseDocsLink = "https://www.adaptabletools.com/buy/buying-adaptable-licensing";
14
+ export declare const AdaptableOptionsDocsLink = "https://www.adaptabletools.com/docs/technical-reference-adaptable-options";
15
+ export declare const AgGridModulesDocsLink = "https://www.adaptabletools.com/docs/dev-guide-aggrid-modules-overview";
16
+ export declare const AlertMessageDocsLink = "https://www.adaptabletools.com/docs/handbook-alerting-message";
17
+ export declare const FormatColumnPlaceholderDocsLink = "https://www.adaptabletools.com/docs/handbook-column-formatting-display-format-placeholder";
18
+ export declare const AgGridRequiredModulesDocsLink = "https://www.adaptabletools.com/docs/dev-guide-aggrid-modules-overview#mandatory-modules";
@@ -1,21 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgGridRequiredModulesDocsLink = exports.FormatColumnPlaceholderDocsLink = exports.AlertMessageDocsLink = exports.AgGridModulesDocsLink = exports.AdaptableOptionsDocsLink = exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.QuantileAggregatedScalarQueryDocsLink = exports.CumulativeAggregatedScalarQueryDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = void 0;
4
- exports.HOST_URL_DOCS = 'https://docs.adaptabletools.com';
3
+ exports.AgGridRequiredModulesDocsLink = exports.FormatColumnPlaceholderDocsLink = exports.AlertMessageDocsLink = exports.AgGridModulesDocsLink = exports.AdaptableOptionsDocsLink = exports.LicenseDocsLink = exports.PrimaryKeyDocsLink = exports.PredicateDocsLink = exports.QuantileAggregatedScalarQueryDocsLink = exports.CumulativeAggregatedScalarQueryDocsLink = exports.AggregatedScalarQueryDocsLink = exports.AggregatedBooleanQueryDocsLink = exports.ObservableQueryDocsLink = exports.ScalarQueryDocsLink = exports.BooleanQueryDocsLink = exports.ExpressionEditorDocsLink = exports.HOST_URL_DOCS = exports.HOST_URL_ROOT = void 0;
4
+ exports.HOST_URL_ROOT = 'https://www.adaptabletools.com';
5
+ exports.HOST_URL_DOCS = `${exports.HOST_URL_ROOT}/docs`;
5
6
  //export const HOST_URL_DOCS = 'http://localhost:3000';
6
- exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/guide/ui-expression-editor`;
7
- exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-standard`;
8
- exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-standard`;
9
- exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-observable`;
10
- exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation`;
11
- exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-aggregation`;
12
- exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-cumulative`;
13
- exports.QuantileAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-ql-expression-quantile`;
14
- exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/guide/adaptable-predicate`;
15
- exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/guide/getting-started-primary-key`;
16
- exports.LicenseDocsLink = `${exports.HOST_URL_DOCS}/guide/licensing`;
17
- exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/guide/reference-options-overview`;
18
- exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-aggrid-modules-overview`;
19
- exports.AlertMessageDocsLink = `${exports.HOST_URL_DOCS}/guide/handbook-alerting-message`;
20
- exports.FormatColumnPlaceholderDocsLink = `${exports.HOST_URL_DOCS}/guide/handbook-column-formatting-display-format-placeholder`;
21
- exports.AgGridRequiredModulesDocsLink = `${exports.HOST_URL_DOCS}/guide/dev-guide-aggrid-modules-overview#mandatory-modules`;
7
+ exports.ExpressionEditorDocsLink = `${exports.HOST_URL_DOCS}/ui-expression-editor`;
8
+ exports.BooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-standard`;
9
+ exports.ScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-standard`;
10
+ exports.ObservableQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-observable`;
11
+ exports.AggregatedBooleanQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-aggregation`;
12
+ exports.AggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-aggregation`;
13
+ exports.CumulativeAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-cumulative`;
14
+ exports.QuantileAggregatedScalarQueryDocsLink = `${exports.HOST_URL_DOCS}/adaptable-ql-expression-quantile`;
15
+ exports.PredicateDocsLink = `${exports.HOST_URL_DOCS}/adaptable-predicate`;
16
+ exports.PrimaryKeyDocsLink = `${exports.HOST_URL_DOCS}/getting-started-primary-key`;
17
+ exports.LicenseDocsLink = `${exports.HOST_URL_ROOT}/buy/buying-adaptable-licensing`;
18
+ exports.AdaptableOptionsDocsLink = `${exports.HOST_URL_DOCS}/technical-reference-adaptable-options`;
19
+ exports.AgGridModulesDocsLink = `${exports.HOST_URL_DOCS}/dev-guide-aggrid-modules-overview`;
20
+ exports.AlertMessageDocsLink = `${exports.HOST_URL_DOCS}/handbook-alerting-message`;
21
+ exports.FormatColumnPlaceholderDocsLink = `${exports.HOST_URL_DOCS}/handbook-column-formatting-display-format-placeholder`;
22
+ exports.AgGridRequiredModulesDocsLink = `${exports.HOST_URL_DOCS}/dev-guide-aggrid-modules-overview#mandatory-modules`;
@@ -4,6 +4,9 @@ exports.DeepMap = void 0;
4
4
  exports.once = once;
5
5
  const SORT_ASC_REVISION = (p1, p2) => sortAscending(p1.revision, p2.revision);
6
6
  class DeepMap {
7
+ map = new Map();
8
+ length = 0;
9
+ revision = 0;
7
10
  static clone(map) {
8
11
  const clone = new DeepMap();
9
12
  map.visit((pair, keys) => {
@@ -12,37 +15,6 @@ class DeepMap {
12
15
  return clone;
13
16
  }
14
17
  constructor(initial) {
15
- this.map = new Map();
16
- this.length = 0;
17
- this.revision = 0;
18
- this.visit = (fn) => {
19
- this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
20
- };
21
- this.visitDepthFirst = (fn) => {
22
- this.visitWithNext([], fn);
23
- };
24
- this.visitWithNext = (parentKeys, fn, currentMap = this.map) => {
25
- if (!currentMap) {
26
- return;
27
- }
28
- let i = 0;
29
- currentMap.forEach((_, key) => {
30
- const pair = currentMap.get(key);
31
- if (!pair) {
32
- return;
33
- }
34
- const { map } = pair;
35
- const keys = [...parentKeys, key];
36
- const next = map ? () => this.visitWithNext(keys, fn, map) : undefined;
37
- if (pair.hasOwnProperty('value')) {
38
- fn(pair.value, keys, i, next);
39
- i++;
40
- }
41
- else {
42
- next?.();
43
- }
44
- });
45
- };
46
18
  if (initial) {
47
19
  initial.forEach((entry) => {
48
20
  const [keys, value] = entry;
@@ -226,6 +198,34 @@ class DeepMap {
226
198
  // if it was called by fn, it won't be called again, as it's once-d
227
199
  next();
228
200
  }
201
+ visit = (fn) => {
202
+ this.map.forEach((_, k) => this.visitKey(k, this.map, [], fn));
203
+ };
204
+ visitDepthFirst = (fn) => {
205
+ this.visitWithNext([], fn);
206
+ };
207
+ visitWithNext = (parentKeys, fn, currentMap = this.map) => {
208
+ if (!currentMap) {
209
+ return;
210
+ }
211
+ let i = 0;
212
+ currentMap.forEach((_, key) => {
213
+ const pair = currentMap.get(key);
214
+ if (!pair) {
215
+ return;
216
+ }
217
+ const { map } = pair;
218
+ const keys = [...parentKeys, key];
219
+ const next = map ? () => this.visitWithNext(keys, fn, map) : undefined;
220
+ if (pair.hasOwnProperty('value')) {
221
+ fn(pair.value, keys, i, next);
222
+ i++;
223
+ }
224
+ else {
225
+ next?.();
226
+ }
227
+ });
228
+ };
229
229
  getArray(fn) {
230
230
  const result = [];
231
231
  this.visit((pair, keys) => {
@@ -15,6 +15,12 @@ class MenuItemDoReduxAction {
15
15
  };
16
16
  this.reduxAction = reduxAction;
17
17
  }
18
+ name;
19
+ reduxAction;
20
+ label;
21
+ category;
22
+ isVisible;
23
+ icon;
18
24
  }
19
25
  exports.MenuItemDoReduxAction = MenuItemDoReduxAction;
20
26
  class MenuItemDoClickFunction {
@@ -28,6 +34,12 @@ class MenuItemDoClickFunction {
28
34
  };
29
35
  this.onClick = clickFunction;
30
36
  }
37
+ name;
38
+ onClick;
39
+ label;
40
+ category;
41
+ isVisible;
42
+ icon;
31
43
  }
32
44
  exports.MenuItemDoClickFunction = MenuItemDoClickFunction;
33
45
  // A menu item which shows a popup screen when it is clieked
@@ -42,5 +54,11 @@ class MenuItemShowPopup {
42
54
  };
43
55
  this.reduxAction = PopupRedux.PopupShowScreen(module, componentName, popupParams);
44
56
  }
57
+ name;
58
+ reduxAction;
59
+ label;
60
+ category;
61
+ isVisible;
62
+ icon;
45
63
  }
46
64
  exports.MenuItemShowPopup = MenuItemShowPopup;
@@ -11,6 +11,14 @@ const logOnce = (message, loggingFn) => {
11
11
  doOnceFlags[message] = true;
12
12
  };
13
13
  class AggregatedScalarLiveValue {
14
+ source;
15
+ requestingModule;
16
+ adaptableApi;
17
+ getRowNodes;
18
+ aggregationReducerName;
19
+ aggregatedScalarExpression;
20
+ expressionEvaluation;
21
+ aggregationResult;
14
22
  constructor(source, requestingModule, adaptableApi, getRowNodes) {
15
23
  this.source = source;
16
24
  this.requestingModule = requestingModule;
@@ -7,12 +7,11 @@ const Emitter_1 = tslib_1.__importDefault(require("../Emitter"));
7
7
  const rxjs_1 = require("rxjs");
8
8
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
9
9
  class AlertService {
10
+ adaptableApi;
11
+ emitter;
12
+ reactiveAlertsMap = new Map();
10
13
  constructor(adaptableApi) {
11
14
  this.adaptableApi = adaptableApi;
12
- this.reactiveAlertsMap = new Map();
13
- this.onReactiveAlertTriggered = (callback) => {
14
- return this.emitter.on('ReactiveAlertTriggered', callback);
15
- };
16
15
  this.emitter = new Emitter_1.default();
17
16
  }
18
17
  destroy() {
@@ -22,6 +21,9 @@ class AlertService {
22
21
  this.reactiveAlertsMap.clear();
23
22
  this.reactiveAlertsMap = null;
24
23
  }
24
+ onReactiveAlertTriggered = (callback) => {
25
+ return this.emitter.on('ReactiveAlertTriggered', callback);
26
+ };
25
27
  createReactiveAlert(alertDefinition) {
26
28
  // if there is already a reactive alert for this definition, delete it (possible in case of editing definitions),
27
29
  this.deleteReactiveAlert(alertDefinition);
@@ -9,6 +9,9 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../Extensions/ArrayEx
9
9
  * If there are active Notes or Comments it listens to Cell Selection and Mouse Enter events
10
10
  */
11
11
  class AnnotationsService {
12
+ api;
13
+ adaptable;
14
+ isListeningToEvents;
12
15
  constructor(api) {
13
16
  this.api = api;
14
17
  this.isListeningToEvents = false;
@@ -4,9 +4,10 @@ exports.CalculatedColumnExpressionService = void 0;
4
4
  const ModuleConstants_1 = require("../Constants/ModuleConstants");
5
5
  const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
6
6
  class CalculatedColumnExpressionService {
7
+ adaptableApi;
8
+ aggregatedScalarLiveValuesMap = new Map();
7
9
  constructor(adaptableApi) {
8
10
  this.adaptableApi = adaptableApi;
9
- this.aggregatedScalarLiveValuesMap = new Map();
10
11
  this.adaptableApi = adaptableApi;
11
12
  }
12
13
  listentoCellDataChange(cellDataChangedInfo) {
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
5
5
  const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/InternalRedux"));
6
6
  const ObjectFactory_1 = tslib_1.__importDefault(require("../ObjectFactory"));
7
7
  class ChartingService {
8
+ api;
8
9
  constructor(api) {
9
10
  this.api = api;
10
11
  }
@@ -8,10 +8,16 @@ const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
8
8
  // ~ 8 hours
9
9
  const MAX_TIMEFRAME_SIZE = 86400000;
10
10
  class DataService {
11
+ adaptable;
12
+ emitter;
13
+ cellDataChangeLogSubject$;
14
+ cellDataChangeLog$;
15
+ rowDataChangeLogSubject$;
16
+ rowDataChangeLog$;
17
+ undoChangeLog;
18
+ undoChangeTimers;
11
19
  constructor(adaptable) {
12
20
  this.adaptable = adaptable;
13
- this.on = (eventName, callback) => this.emitter.on(eventName, callback);
14
- this.emit = (eventName, data) => this.emitter.emit(eventName, data);
15
21
  this.adaptable = adaptable;
16
22
  this.emitter = new Emitter_1.default();
17
23
  this.cellDataChangeLogSubject$ = new rxjs_1.Subject();
@@ -35,6 +41,8 @@ class DataService {
35
41
  this.undoChangeTimers.clear();
36
42
  this.undoChangeTimers = null;
37
43
  }
44
+ on = (eventName, callback) => this.emitter.on(eventName, callback);
45
+ emit = (eventName, data) => this.emitter.emit(eventName, data);
38
46
  CreateCellDataChangedEvent(cellDataChangedInfo) {
39
47
  if (cellDataChangedInfo.newValue != cellDataChangedInfo.oldValue) {
40
48
  this.emitter.emitSync('CellDataChanged', cellDataChangedInfo);
@@ -4,11 +4,13 @@ exports.Fdc3Service = void 0;
4
4
  const Fdc3Context_1 = require("../../AdaptableState/Common/Fdc3Context");
5
5
  const Fdc3Intent_1 = require("../../AdaptableState/Common/Fdc3Intent");
6
6
  class Fdc3Service {
7
+ adaptableApi;
8
+ contextHandlerSubscriptions = [];
9
+ intentHandlerSubscriptions = [];
10
+ loggedAgentError = false;
11
+ uiControlsDefaultConfiguration;
7
12
  constructor(adaptableApi) {
8
13
  this.adaptableApi = adaptableApi;
9
- this.contextHandlerSubscriptions = [];
10
- this.intentHandlerSubscriptions = [];
11
- this.loggedAgentError = false;
12
14
  // 1. Subscribe to FDC3 events
13
15
  const adaptableHandleIntentFn = this.getFdc3Options().intents?.handleIntent;
14
16
  const listenForIntents = this.getFdc3Options().intents?.listensFor ?? [];
@@ -6,6 +6,11 @@ exports.FLASHING_CELL_ROW_KEY = '__ROW';
6
6
  * This service manages Flashing Cells
7
7
  */
8
8
  class FlashingCellService {
9
+ api;
10
+ // map of rowPrimaryKey -> ColIdOrRowId -> FlashingCellUuid
11
+ gridCellsCurrentlyFlashing;
12
+ // map of FlashingCellUuid -> FlashingCell
13
+ flashingCellsMapping;
9
14
  constructor(api) {
10
15
  this.api = api;
11
16
  this.gridCellsCurrentlyFlashing = {};
@@ -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/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=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=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}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),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("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(E("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(E("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(E("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(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} 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(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} 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(E(`This AdapTable license${h} 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.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=e.__importDefault(require("lodash/clamp")),o=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=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||_()||I()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}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),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.default)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("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(E("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(E("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(E("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(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} 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(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} 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(E(`This AdapTable license${h} 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.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
@@ -9,9 +9,9 @@ const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
9
9
  const DefaultAdaptableOptions_1 = require("../../AdaptableOptions/DefaultAdaptableOptions");
10
10
  const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
11
11
  class MetamodelService {
12
+ gridInfoOptions = new Map();
13
+ getAdaptableOptions = () => null;
12
14
  constructor(getAdaptableOptions, validateOptions) {
13
- this.gridInfoOptions = new Map();
14
- this.getAdaptableOptions = () => null;
15
15
  this.getAdaptableOptions = getAdaptableOptions;
16
16
  this.gridInfoOptions = this.buildGridInfoOptions();
17
17
  if (validateOptions) {