@adaptabletools/adaptable 11.0.9 → 11.1.1-canary.1

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 (150) hide show
  1. package/base.css +19 -11
  2. package/bundle.cjs.js +125 -125
  3. package/index.css +23 -11
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -2
  8. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  9. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -2
  10. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
  12. package/src/Api/AlertApi.d.ts +5 -6
  13. package/src/Api/BulkUpdateApi.d.ts +5 -0
  14. package/src/Api/ConfigApi.d.ts +1 -1
  15. package/src/Api/DataChangeHistoryApi.d.ts +3 -3
  16. package/src/Api/EventApi.d.ts +1 -1
  17. package/src/Api/Events/CellChanged.d.ts +2 -2
  18. package/src/Api/Events/GridDataChanged.d.ts +5 -1
  19. package/src/Api/ExportApi.d.ts +3 -3
  20. package/src/Api/FreeTextColumnApi.d.ts +3 -3
  21. package/src/Api/GridApi.d.ts +27 -6
  22. package/src/Api/Implementation/AlertApiImpl.d.ts +7 -4
  23. package/src/Api/Implementation/AlertApiImpl.js +86 -59
  24. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
  25. package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -0
  26. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  27. package/src/Api/Implementation/ConfigApiImpl.js +7 -2
  28. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +3 -3
  29. package/src/Api/Implementation/EventApiImpl.js +1 -1
  30. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  31. package/src/Api/Implementation/ExportApiImpl.js +7 -8
  32. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +2 -2
  33. package/src/Api/Implementation/FreeTextColumnApiImpl.js +7 -7
  34. package/src/Api/Implementation/GridApiImpl.d.ts +11 -3
  35. package/src/Api/Implementation/GridApiImpl.js +29 -8
  36. package/src/Api/Implementation/InternalApiImpl.d.ts +11 -4
  37. package/src/Api/Implementation/InternalApiImpl.js +41 -5
  38. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
  39. package/src/Api/Implementation/LayoutApiImpl.js +19 -4
  40. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  41. package/src/Api/Implementation/SettingsPanelApiImpl.js +7 -1
  42. package/src/Api/InternalApi.d.ts +10 -3
  43. package/src/Api/LayoutApi.d.ts +14 -3
  44. package/src/PredefinedConfig/AlertState.d.ts +7 -3
  45. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +35 -6
  46. package/src/PredefinedConfig/Common/AdaptableAlert.js +7 -0
  47. package/src/PredefinedConfig/Common/AdaptableFlashingCell.d.ts +2 -2
  48. package/src/PredefinedConfig/Common/AdaptablePredicate.js +20 -0
  49. package/src/PredefinedConfig/Common/{DataChangedInfo.d.ts → CellDataChangedInfo.d.ts} +2 -6
  50. package/src/PredefinedConfig/Common/{DataChangedInfo.js → CellDataChangedInfo.js} +0 -0
  51. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -1
  52. package/src/PredefinedConfig/Common/DataChangedScope.d.ts +4 -0
  53. package/src/PredefinedConfig/Common/DataChangedScope.js +2 -0
  54. package/src/PredefinedConfig/Common/Entitlement.d.ts +2 -2
  55. package/src/PredefinedConfig/Common/Menu.d.ts +3 -0
  56. package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +15 -0
  57. package/src/PredefinedConfig/Common/RowsHighlightInfo.js +2 -0
  58. package/src/PredefinedConfig/ConfigState.d.ts +4 -1
  59. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  60. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  61. package/src/PredefinedConfig/SystemState.d.ts +2 -2
  62. package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
  63. package/src/Redux/ActionsReducers/GridRedux.d.ts +5 -5
  64. package/src/Redux/ActionsReducers/PopupRedux.d.ts +18 -0
  65. package/src/Redux/ActionsReducers/PopupRedux.js +36 -1
  66. package/src/Redux/ActionsReducers/SystemRedux.d.ts +16 -5
  67. package/src/Redux/ActionsReducers/SystemRedux.js +37 -6
  68. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -0
  69. package/src/Redux/Store/AdaptableReduxMerger.js +40 -4
  70. package/src/Redux/Store/AdaptableStore.js +76 -34
  71. package/src/Strategy/AlertModule.d.ts +5 -3
  72. package/src/Strategy/AlertModule.js +68 -22
  73. package/src/Strategy/BulkUpdateModule.js +7 -2
  74. package/src/Strategy/DataChangeHistoryModule.js +8 -6
  75. package/src/Strategy/ExportModule.js +1 -0
  76. package/src/Strategy/FlashingCellModule.d.ts +2 -2
  77. package/src/Strategy/FlashingCellModule.js +21 -15
  78. package/src/Strategy/FormatColumnModule.js +4 -2
  79. package/src/Strategy/SmartEditModule.js +6 -0
  80. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
  81. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  82. package/src/Utilities/Defaults/DefaultSettingsPanel.js +6 -2
  83. package/src/Utilities/Emitter.d.ts +1 -1
  84. package/src/Utilities/Emitter.js +6 -3
  85. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
  86. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  87. package/src/Utilities/Interface/MessagePopups.d.ts +13 -0
  88. package/src/Utilities/ObjectFactory.d.ts +9 -7
  89. package/src/Utilities/ObjectFactory.js +26 -12
  90. package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -3
  91. package/src/Utilities/Services/DataService.d.ts +5 -5
  92. package/src/Utilities/Services/DataService.js +12 -10
  93. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -2
  94. package/src/Utilities/Services/Interface/IDataService.d.ts +6 -6
  95. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +3 -3
  96. package/src/Utilities/Services/Interface/IValidationService.d.ts +4 -4
  97. package/src/Utilities/Services/LicenseService.js +1 -1
  98. package/src/Utilities/Services/ModuleService.js +1 -1
  99. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  100. package/src/Utilities/Services/ValidationService.d.ts +4 -4
  101. package/src/Utilities/Services/ValidationService.js +18 -17
  102. package/src/View/AdaptableView.js +2 -0
  103. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +16 -9
  104. package/src/View/Alert/Wizard/AlertButtonsEditor.js +13 -3
  105. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -0
  106. package/src/View/Alert/Wizard/AlertWizard.js +83 -1
  107. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
  108. package/src/View/Components/FilterForm/FilterForm.js +2 -2
  109. package/src/View/Components/Panels/PanelFooter.d.ts +10 -0
  110. package/src/View/Components/Panels/PanelFooter.js +14 -0
  111. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +12 -7
  112. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -1
  113. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -1
  114. package/src/View/Components/Popups/{AdaptablePopup/Utilities.d.ts → Utilities.d.ts} +4 -0
  115. package/src/View/Components/Popups/{AdaptablePopup/Utilities.js → Utilities.js} +5 -2
  116. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +6 -0
  117. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +32 -0
  118. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +4 -0
  119. package/src/View/Components/Popups/WindowPopups/windowFactory.js +8 -0
  120. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +2 -2
  121. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +2 -2
  122. package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +3 -0
  123. package/src/View/Layout/LayoutEditorStandalonePopup.js +76 -0
  124. package/src/View/Layout/LayoutPopup.js +3 -24
  125. package/src/View/Layout/LayoutViewPanel.d.ts +1 -4
  126. package/src/View/Layout/LayoutViewPanel.js +5 -18
  127. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.d.ts +9 -0
  128. package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +55 -0
  129. package/src/View/Layout/Wizard/LayoutEditor/index.js +3 -68
  130. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  131. package/src/View/Layout/Wizard/LayoutEditorWizard.js +35 -7
  132. package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
  133. package/src/agGrid/Adaptable.d.ts +6 -4
  134. package/src/agGrid/Adaptable.js +115 -117
  135. package/src/agGrid/agGridHelper.d.ts +1 -1
  136. package/src/agGrid/agGridHelper.js +23 -8
  137. package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
  138. package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
  139. package/src/components/Dialog/index.js +1 -1
  140. package/src/components/Modal/index.js +1 -1
  141. package/src/components/WindowModal/WindowModal.d.ts +10 -8
  142. package/src/components/WindowModal/WindowModal.js +4 -2
  143. package/src/components/WindowModal/useStacking.d.ts +9 -0
  144. package/src/components/WindowModal/useStacking.js +45 -0
  145. package/src/env.js +3 -3
  146. package/src/metamodel/adaptable.metamodel.d.ts +85 -45
  147. package/src/metamodel/adaptable.metamodel.js +185 -84
  148. package/src/types.d.ts +5 -3
  149. package/version.d.ts +1 -1
  150. package/version.js +1 -1
@@ -17,8 +17,10 @@ const getFlashingTargetViewItems_1 = require("./Utilities/getFlashingTargetViewI
17
17
  class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
18
18
  constructor(api) {
19
19
  super(ModuleConstants.FlashingCellModuleId, 'Flashing Cell', 'flashing-cell', 'FlashingAlert', 'Flash cells when they change', api);
20
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
21
- if (dataChangedInfo.trigger === 'undo') {
20
+ this.api.internalApi
21
+ .getDataService()
22
+ .on('CellDataChanged', (cellDataChangedInfo) => {
23
+ if (cellDataChangedInfo.trigger === 'undo') {
22
24
  // do NOT handle reverted changes
23
25
  return;
24
26
  }
@@ -26,8 +28,8 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
26
28
  // - flash for the underlying small data changes, but the visual does not
27
29
  if (this.api.internalApi.getAdaptableOptions().alertOptions.dataChangeDetectionPolicy ===
28
30
  'formattedValue') {
29
- const { oldValue, newValue } = dataChangedInfo;
30
- const columnId = dataChangedInfo.column.columnId;
31
+ const { oldValue, newValue } = cellDataChangedInfo;
32
+ const columnId = cellDataChangedInfo.column.columnId;
31
33
  const oldFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, oldValue);
32
34
  const newFormattedValue = this.api.gridApi.getFormattedValueFromRawValue(columnId, newValue);
33
35
  if (oldFormattedValue === newFormattedValue) {
@@ -35,7 +37,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
35
37
  return;
36
38
  }
37
39
  }
38
- this.handleDataSourceChanged(dataChangedInfo);
40
+ this.handleDataSourceChanged(cellDataChangedInfo);
39
41
  });
40
42
  }
41
43
  getModuleAdaptableObjects() {
@@ -101,23 +103,27 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
101
103
  }
102
104
  return items;
103
105
  }
104
- handleDataSourceChanged(dataChangedInfo) {
105
- const flashingCellDefinitions = this.getFlashingCellDefinitionsForDataChange(dataChangedInfo);
106
+ handleDataSourceChanged(cellDataChangedInfo) {
107
+ const flashingCellDefinitions = this.getFlashingCellDefinitionsForDataChange(cellDataChangedInfo);
106
108
  if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(flashingCellDefinitions)) {
107
- this.showFlashingCellsForDefinitions(dataChangedInfo, flashingCellDefinitions);
109
+ this.showFlashingCellsForDefinitions(cellDataChangedInfo, flashingCellDefinitions);
108
110
  }
109
111
  }
110
- showFlashingCellsForDefinitions(dataChangedInfo, flashingCellDefinitions = []) {
112
+ showFlashingCellsForDefinitions(cellDataChangedInfo, flashingCellDefinitions = []) {
111
113
  const allColumnIds = this.api.columnApi.getColumns().map((c) => c.columnId);
112
- const columnDataType = dataChangedInfo.column.dataType;
114
+ const columnDataType = cellDataChangedInfo.column.dataType;
113
115
  const numeric = columnDataType === 'Number';
114
116
  const isComparableType = numeric || columnDataType === 'Date';
115
117
  let up = false;
116
118
  let down = false;
117
119
  let direction = 'neutral';
118
120
  if (isComparableType) {
119
- const newValue = numeric ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
120
- const oldValue = numeric ? Number(dataChangedInfo.oldValue) : dataChangedInfo.oldValue;
121
+ const newValue = numeric
122
+ ? Number(cellDataChangedInfo.newValue)
123
+ : cellDataChangedInfo.newValue;
124
+ const oldValue = numeric
125
+ ? Number(cellDataChangedInfo.oldValue)
126
+ : cellDataChangedInfo.oldValue;
121
127
  up = newValue > oldValue;
122
128
  down = newValue < oldValue;
123
129
  direction = up ? 'up' : down ? 'down' : 'neutral';
@@ -125,7 +131,7 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
125
131
  flashingCellDefinitions.forEach((flashingCellDefinition) => {
126
132
  var _a;
127
133
  let flashTarget = this.api.flashingCellApi.getFlashingCellFlashTarget(flashingCellDefinition);
128
- const flashColumnIds = { [dataChangedInfo.column.columnId]: true };
134
+ const flashColumnIds = { [cellDataChangedInfo.column.columnId]: true };
129
135
  /**
130
136
  * When flashing a row, all columns in that row are marked to flash.
131
137
  */
@@ -134,11 +140,11 @@ class FlashingCellModule extends AdaptableModuleBase_1.AdaptableModuleBase {
134
140
  flashColumnIds[colId] = true;
135
141
  });
136
142
  }
137
- const rowPrimaryKey = dataChangedInfo.primaryKeyValue;
143
+ const rowPrimaryKey = cellDataChangedInfo.primaryKeyValue;
138
144
  this.api.flashingCellApi.showFlashingCell({
139
145
  rowPrimaryKey,
140
146
  flashingCellDefinition: flashingCellDefinition,
141
- dataChangedInfo,
147
+ cellDataChangedInfo: cellDataChangedInfo,
142
148
  direction,
143
149
  flashTarget,
144
150
  flashColumnIds,
@@ -19,7 +19,9 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
19
  * Use Case: Data (cell/row) has changed
20
20
  * Action: Any CheckboxFormatColumns need to be updated, as their disabled state may have changed
21
21
  */
22
- this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
22
+ this.api.internalApi
23
+ .getDataService()
24
+ .on('CellDataChanged', (cellDataChangedInfo) => {
23
25
  const activeCheckboxColumnIds = this.api.columnApi
24
26
  .getColumns()
25
27
  .filter((aColumn) => {
@@ -28,7 +30,7 @@ class FormatColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
28
30
  })
29
31
  .map((aColumn) => aColumn.columnId);
30
32
  // no need to refresh the CheckboxColumns if the change was triggered by one of them
31
- if (!activeCheckboxColumnIds.includes(dataChangedInfo.column.columnId)) {
33
+ if (!activeCheckboxColumnIds.includes(cellDataChangedInfo.column.columnId)) {
32
34
  this.api.internalApi
33
35
  .getAdaptableInstance()
34
36
  .refreshCells(null, activeCheckboxColumnIds, true, true);
@@ -49,6 +49,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
49
49
  if (this.api.internalApi.isGridInPivotMode()) {
50
50
  return {
51
51
  Alert: {
52
+ alertType: 'generic',
52
53
  header: 'Smart Edit Error',
53
54
  message: 'Cannot edit while Grid is in Pivot Mode.',
54
55
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -58,6 +59,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
58
59
  if (selectedCellInfo == null || ArrayExtensions_1.default.IsNullOrEmpty(selectedCellInfo.columns)) {
59
60
  return {
60
61
  Alert: {
62
+ alertType: 'generic',
61
63
  header: 'Smart Edit Error',
62
64
  message: 'No cells are selected.\nPlease select some cells.',
63
65
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -67,6 +69,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
67
69
  if (ArrayExtensions_1.default.NotCorrectLength(selectedCellInfo.columns, 1)) {
68
70
  return {
69
71
  Alert: {
72
+ alertType: 'generic',
70
73
  header: 'Smart Edit Error',
71
74
  message: 'Smart Edit only supports single column edit.\nPlease adjust cell selection.',
72
75
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -78,6 +81,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
78
81
  if (column.dataType != Enums_1.DataType.Number) {
79
82
  return {
80
83
  Alert: {
84
+ alertType: 'generic',
81
85
  header: 'Smart Edit Error',
82
86
  message: 'Smart Edit only supports editing of numeric columns.\nPlease adjust the cell selection.',
83
87
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -87,6 +91,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
87
91
  if (column.readOnly) {
88
92
  return {
89
93
  Alert: {
94
+ alertType: 'generic',
90
95
  header: 'Smart Edit Error',
91
96
  message: 'Smart Edit is not permitted on readonly columns.\nPlease adjust the cell selection.',
92
97
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -98,6 +103,7 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
98
103
  !this.api.gridApi.areCellsEditable(selectedCellInfo.gridCells)) {
99
104
  return {
100
105
  Alert: {
106
+ alertType: 'generic',
101
107
  header: 'Smart Edit Error',
102
108
  message: 'Smart Edit is not permitted on readonly cells.\nPlease adjust the cell selection.',
103
109
  alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
@@ -126,6 +126,7 @@ exports.DefaultAdaptableOptions = {
126
126
  },
127
127
  layoutOptions: {
128
128
  includeExpandedRowGroups: false,
129
+ displayRowGroups: 'closed',
129
130
  autoSaveLayouts: true,
130
131
  autoSizeColumnsInLayout: false,
131
132
  autoSizeColumnsInPivotLayout: false,
@@ -1,6 +1,6 @@
1
1
  import { AdaptableSettingsPanel } from '../../PredefinedConfig/Common/Types';
2
2
  import { AdaptableModule } from '../../types';
3
- export declare const ACTION_POPUPS: AdaptableModule[];
3
+ export declare const STANDALONE_MODULE_POPUPS: AdaptableModule[];
4
4
  /**
5
5
  * This constants determines the order and the items that appear in the navigation.
6
6
  */
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEFAULT_NAVIGATION_ITEMS = exports.ACTION_POPUPS = void 0;
4
- exports.ACTION_POPUPS = ['BulkUpdate', 'SmartEdit', 'CellSummary'];
3
+ exports.DEFAULT_NAVIGATION_ITEMS = exports.STANDALONE_MODULE_POPUPS = void 0;
4
+ exports.STANDALONE_MODULE_POPUPS = [
5
+ 'BulkUpdate',
6
+ 'SmartEdit',
7
+ 'CellSummary',
8
+ ];
5
9
  /**
6
10
  * This constants determines the order and the items that appear in the navigation.
7
11
  */
@@ -7,7 +7,7 @@ declare class Emittery {
7
7
  on(eventName: string, listener: EmitterCallback): any;
8
8
  off(eventName: string, listener: EmitterCallback): void;
9
9
  once(eventName: string): Promise<unknown>;
10
- onIncludeFiredOnce(eventName: string): Promise<any>;
10
+ onIncludeFiredOnce(eventName: string, listener: EmitterCallback): any;
11
11
  onIncludeFired(eventName: string, listener: EmitterCallback): any;
12
12
  emit(eventName: string, eventData?: any): Promise<any[]>;
13
13
  emitSync(eventName: string, eventData?: any): any[];
@@ -100,13 +100,16 @@ class Emittery {
100
100
  });
101
101
  });
102
102
  }
103
- onIncludeFiredOnce(eventName) {
103
+ onIncludeFiredOnce(eventName, listener) {
104
104
  const triggeredEventsMap = triggeredMap.get(this);
105
105
  const eventInfo = triggeredEventsMap.get(eventName);
106
106
  if (eventInfo) {
107
- return Promise.resolve(eventInfo.data);
107
+ listener(eventInfo.data);
108
+ return () => { };
109
+ }
110
+ else {
111
+ return this.on(eventName, listener);
108
112
  }
109
- return this.once(eventName);
110
113
  }
111
114
  onIncludeFired(eventName, listener) {
112
115
  const triggeredEventsMap = triggeredMap.get(this);
@@ -1,7 +1,7 @@
1
1
  import { ExpressionContext } from '../../parser/src/types';
2
2
  import { AdaptableApi } from '../../Api/AdaptableApi';
3
3
  import { Observable } from 'rxjs';
4
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
4
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
5
5
  export interface BaseParameter<T = string, N = string> {
6
6
  type: T;
7
7
  name: N;
@@ -12,7 +12,7 @@ export interface ColumnParameter extends BaseParameter<'config', 'COL'> {
12
12
  export declare const getStringValues: (context: ExpressionContext, ...stringArguments: string[]) => string[];
13
13
  export declare const getStringValue: (context: ExpressionContext, stringArgument: string) => string;
14
14
  export declare const isTextSearchCaseInsensitive: (context: ExpressionContext) => boolean;
15
- export declare const getDataChangeLog$: (context: ExpressionContext, columnNameFilter: string) => Observable<DataChangedInfo>;
15
+ export declare const getDataChangeLog$: (context: ExpressionContext, columnNameFilter: string) => Observable<CellDataChangedInfo>;
16
16
  export declare const handleWhereFunction: (args: any[], context: ExpressionContext) => any;
17
17
  export declare const extractColumnParameter: (consumingFunctionName: string, args: BaseParameter[]) => ColumnParameter;
18
18
  export declare const extractParameter: <T extends BaseParameter<string, string>>(consumingFunctionName: string, allowedType: T["type"], allowedOperands: T["name"][], args: BaseParameter[], isOptional?: boolean) => T;
@@ -18,7 +18,7 @@ exports.getStringValue = (context, stringArgument) => {
18
18
  return exports.isTextSearchCaseInsensitive(context) ? stringArgument.toLowerCase() : stringArgument;
19
19
  };
20
20
  exports.isTextSearchCaseInsensitive = (context) => !context.api.internalApi.isTextComparisonCaseSensitive();
21
- // returns an observable which filters the source$ emissions and emits only if the DataChangedInfo relates to the given column
21
+ // returns an observable which filters the source$ emissions and emits only if the CellDataChangedInfo relates to the given column
22
22
  // optionally, if a filter function (where clause) is provided, it is also evaluated
23
23
  exports.getDataChangeLog$ = (context, columnNameFilter) => {
24
24
  let dataChangeLog$ = context.api.internalApi.getDataService().dataChangeLog$;
@@ -58,3 +58,16 @@ export interface PromptPopup {
58
58
  DefaultValue?: string;
59
59
  ConfirmActionCreator?: (inputText: string) => Action;
60
60
  }
61
+ export interface WindowPopup {
62
+ PopupList: {
63
+ /**
64
+ * Used to identify the window.
65
+ * - used to close the window
66
+ * - used to identify the 'Component' name, to know what to instantiate
67
+ */
68
+ Id: string;
69
+ Title: string;
70
+ PopupProps?: any;
71
+ Icon?: string;
72
+ }[];
73
+ }
@@ -13,7 +13,7 @@ import { ConditionalStyle } from '../PredefinedConfig/ConditionalStyleState';
13
13
  import { FormatColumn } from '../PredefinedConfig/FormatColumnState';
14
14
  import { FreeTextColumn } from '../PredefinedConfig/FreeTextColumnState';
15
15
  import { AdaptableStyle } from '../PredefinedConfig/Common/AdaptableStyle';
16
- import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
16
+ import { CellDataChangedInfo } from '../PredefinedConfig/Common/CellDataChangedInfo';
17
17
  import { Glue42Report, Glue42Schedule } from '../PredefinedConfig/Glue42State';
18
18
  import { IPushPullReport } from '../PredefinedConfig/SystemState';
19
19
  import { IPushPullSchedule } from '../PredefinedConfig/IPushPullState';
@@ -21,20 +21,21 @@ import { OpenFinSchedule, OpenFinReport } from '../PredefinedConfig/OpenFinState
21
21
  import { NamedQuery } from '../PredefinedConfig/QueryState';
22
22
  import { ColumnFilter } from '../PredefinedConfig/FilterState';
23
23
  import { ReminderSchedule } from '../PredefinedConfig/ScheduleState';
24
- import { AdaptableAlert } from '../PredefinedConfig/Common/AdaptableAlert';
24
+ import { AdaptableCellChangedAlert, AdaptableGenericAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
25
25
  import { AdaptableMessageType } from '../PredefinedConfig/Common/AdaptableMessageType';
26
26
  import { SystemStatusMessageInfo } from '../PredefinedConfig/Common/SystemStatusMessageInfo';
27
27
  import { NotificationsOptions } from '../AdaptableOptions/NotificationsOptions';
28
28
  import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
29
- import { FlashingCellDefinition } from '../types';
29
+ import { FlashingCellDefinition, GridDataChangedInfo } from '../types';
30
30
  import { ToastOptions } from 'react-toastify';
31
31
  export declare function CreateEmptyCustomSort(): CustomSort;
32
32
  export declare function CreateEmptyDataSource(): DataSource;
33
33
  export declare function CreateEmptyCalculatedColumn(isFilterable: boolean): CalculatedColumn;
34
34
  export declare function CreateEmptyNamedQuery(expression?: string): NamedQuery;
35
35
  export declare function CreateEmptyPlusMinusNudge(): PlusMinusNudge;
36
- export declare function CreateEmptyAlert(): AdaptableAlert;
37
- export declare function CreateAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition, dataChangedInfo?: DataChangedInfo): AdaptableAlert;
36
+ export declare function CreateGenericAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition): AdaptableGenericAlert;
37
+ export declare function CreateCellChangedAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition, cellDataChangedInfo: CellDataChangedInfo): AdaptableCellChangedAlert;
38
+ export declare function CreateRowChangedAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition, gridDataChange: GridDataChangedInfo): AdaptableRowChangedAlert;
38
39
  export declare function CreateEmptyAlertDefinition(): AlertDefinition;
39
40
  export declare function CreateEmptyFlashingCellDefinition(): FlashingCellDefinition;
40
41
  export declare function CreateInternalAlertDefinitionForMessages(messageType: AdaptableMessageType, alertProperties?: AlertProperties): AlertDefinition;
@@ -72,8 +73,9 @@ export declare const ObjectFactory: {
72
73
  CreateEmptyCalculatedColumn: typeof CreateEmptyCalculatedColumn;
73
74
  CreateEmptyNamedQuery: typeof CreateEmptyNamedQuery;
74
75
  CreateEmptyPlusMinusNudge: typeof CreateEmptyPlusMinusNudge;
75
- CreateEmptyAlert: typeof CreateEmptyAlert;
76
- CreateAlert: typeof CreateAlert;
76
+ CreateGenericAlert: typeof CreateGenericAlert;
77
+ CreateCellChangedAlert: typeof CreateCellChangedAlert;
78
+ CreateRowChangedAlert: typeof CreateRowChangedAlert;
77
79
  CreateEmptyAlertDefinition: typeof CreateEmptyAlertDefinition;
78
80
  CreateEmptyFlashingCellDefinition: typeof CreateEmptyFlashingCellDefinition;
79
81
  CreateInternalAlertDefinitionForMessages: typeof CreateInternalAlertDefinitionForMessages;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ObjectFactory = exports.CreateToastOptions = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateAlert = exports.CreateEmptyAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyDataSource = exports.CreateEmptyCustomSort = void 0;
3
+ exports.ObjectFactory = exports.CreateToastOptions = exports.CreateColumnFilter = exports.CreateEmptyCellSummmary = exports.CreateSystemStatusMessageInfo = exports.CreateEmptyStyle = exports.CreateEmptyLayout = exports.CreateEmptyFreeTextColumn = exports.CreateEmptyFormatColumn = exports.CreateEmptyConditionalStyle = exports.CreateEmptyShortcut = exports.CreateEmptySchedule = exports.CreateReportSchedule = exports.CreateGlue42Schedule = exports.CreateIPushPullSchedule = exports.CreateEmptyOpenFinSchedule = exports.CreateEmptyGlue42Schedule = exports.CreateEmptyIPushPullSchedule = exports.CreateEmptyOpenFinReport = exports.CreateEmptyGlue42Report = exports.CreateEmptyIPushPullReport = exports.CreateEmptyReportSchedule = exports.CreateEmptyReminderSchedule = exports.CreateEmptyBaseSchedule = exports.CreateEmptyReport = exports.CreateInternalAlertDefinitionForMessages = exports.CreateEmptyFlashingCellDefinition = exports.CreateEmptyAlertDefinition = exports.CreateRowChangedAlert = exports.CreateCellChangedAlert = exports.CreateGenericAlert = exports.CreateEmptyPlusMinusNudge = exports.CreateEmptyNamedQuery = exports.CreateEmptyCalculatedColumn = exports.CreateEmptyDataSource = exports.CreateEmptyCustomSort = void 0;
4
4
  const Enums_1 = require("../PredefinedConfig/Common/Enums");
5
5
  const GeneralConstants_1 = require("./Constants/GeneralConstants");
6
6
  const Uuid_1 = require("../PredefinedConfig/Uuid");
@@ -51,25 +51,38 @@ function CreateEmptyPlusMinusNudge() {
51
51
  };
52
52
  }
53
53
  exports.CreateEmptyPlusMinusNudge = CreateEmptyPlusMinusNudge;
54
- function CreateEmptyAlert() {
54
+ function CreateGenericAlert(alertHeader, alertMessage, alertDefinition) {
55
55
  return {
56
+ alertType: 'generic',
56
57
  Uuid: Uuid_1.createUuid(),
57
- header: GeneralConstants_1.EMPTY_STRING,
58
- message: GeneralConstants_1.EMPTY_STRING,
59
- alertDefinition: CreateInternalAlertDefinitionForMessages('Info'),
58
+ header: alertHeader,
59
+ message: alertMessage,
60
+ alertDefinition: alertDefinition,
60
61
  };
61
62
  }
62
- exports.CreateEmptyAlert = CreateEmptyAlert;
63
- function CreateAlert(alertHeader, alertMessage, alertDefinition, dataChangedInfo) {
63
+ exports.CreateGenericAlert = CreateGenericAlert;
64
+ function CreateCellChangedAlert(alertHeader, alertMessage, alertDefinition, cellDataChangedInfo) {
64
65
  return {
66
+ alertType: 'cellChanged',
65
67
  Uuid: Uuid_1.createUuid(),
66
68
  header: alertHeader,
67
69
  message: alertMessage,
68
- alertDefinition: alertDefinition,
69
- dataChangedInfo: dataChangedInfo,
70
+ alertDefinition,
71
+ cellDataChangedInfo: cellDataChangedInfo,
72
+ };
73
+ }
74
+ exports.CreateCellChangedAlert = CreateCellChangedAlert;
75
+ function CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChange) {
76
+ return {
77
+ alertType: 'rowChanged',
78
+ Uuid: Uuid_1.createUuid(),
79
+ header: alertHeader,
80
+ message: alertMessage,
81
+ alertDefinition,
82
+ gridDataChangedInfo: gridDataChange,
70
83
  };
71
84
  }
72
- exports.CreateAlert = CreateAlert;
85
+ exports.CreateRowChangedAlert = CreateRowChangedAlert;
73
86
  function CreateEmptyAlertDefinition() {
74
87
  return {
75
88
  Uuid: Uuid_1.createUuid(),
@@ -403,8 +416,9 @@ exports.ObjectFactory = {
403
416
  CreateEmptyCalculatedColumn,
404
417
  CreateEmptyNamedQuery,
405
418
  CreateEmptyPlusMinusNudge,
406
- CreateEmptyAlert,
407
- CreateAlert,
419
+ CreateGenericAlert,
420
+ CreateCellChangedAlert,
421
+ CreateRowChangedAlert,
408
422
  CreateEmptyAlertDefinition,
409
423
  CreateEmptyFlashingCellDefinition,
410
424
  CreateInternalAlertDefinitionForMessages,
@@ -12,8 +12,8 @@ class CalculatedColumnExpressionService {
12
12
  this.adaptable = adaptable;
13
13
  this.adaptable.api.internalApi
14
14
  .getDataService()
15
- .on('DataChanged', (dataChangedInfo) => {
16
- if (dataChangedInfo.trigger === 'aggChange') {
15
+ .on('CellDataChanged', (cellDataChangedInfo) => {
16
+ if (cellDataChangedInfo.trigger === 'aggChange') {
17
17
  // do NOT handle changes on group rows
18
18
  return;
19
19
  }
@@ -21,7 +21,7 @@ class CalculatedColumnExpressionService {
21
21
  this.aggregatedScalarCalculatedColumnsMap.forEach((aggregatedScalarCalculatedColumn) => {
22
22
  if (aggregatedScalarCalculatedColumn
23
23
  .getColumnDependencies()
24
- .includes(dataChangedInfo.column.columnId)) {
24
+ .includes(cellDataChangedInfo.column.columnId)) {
25
25
  aggregatedScalarCalculatedColumn.refreshAggregatedColumnValue();
26
26
  refreshedCalculatedColumns.push(aggregatedScalarCalculatedColumn.getCalculatedColumnId());
27
27
  }
@@ -1,21 +1,21 @@
1
1
  import { IDataService } from './Interface/IDataService';
2
2
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
3
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
4
4
  import { EmitterCallback } from '../../Utilities/Emitter';
5
5
  import { Observable } from 'rxjs';
6
6
  export declare class DataService implements IDataService {
7
7
  private adaptable;
8
8
  private emitter;
9
9
  private readonly dataChangeLogSubject$;
10
- dataChangeLog$: Observable<DataChangedInfo>;
10
+ dataChangeLog$: Observable<CellDataChangedInfo>;
11
11
  private undoChangeLog;
12
12
  private undoChangeTimers;
13
13
  constructor(adaptable: IAdaptable);
14
14
  on: (eventName: string, callback: EmitterCallback) => (() => void);
15
15
  emit: (eventName: string, data?: any) => Promise<any>;
16
- CreateDataChangedEvent(dataChangedInfo: DataChangedInfo): void;
17
- logUndoChange(change: DataChangedInfo): void;
18
- extractUndoChange(change: DataChangedInfo): DataChangedInfo | undefined;
16
+ CreateDataChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
17
+ logUndoChange(change: CellDataChangedInfo): void;
18
+ extractUndoChange(change: CellDataChangedInfo): CellDataChangedInfo | undefined;
19
19
  destroy(): void;
20
20
  private getUndoChangeKey;
21
21
  private logDataChange;
@@ -20,11 +20,11 @@ class DataService {
20
20
  this.undoChangeLog = new Map();
21
21
  this.undoChangeTimers = new Map();
22
22
  }
23
- CreateDataChangedEvent(dataChangedInfo) {
24
- if (dataChangedInfo.newValue != dataChangedInfo.oldValue) {
25
- this.emitter.emitSync('DataChanged', dataChangedInfo);
26
- this.adaptable.api.gridApi.fireCellChangedEvent(dataChangedInfo);
27
- this.logDataChange(dataChangedInfo);
23
+ CreateDataChangedEvent(cellDataChangedInfo) {
24
+ if (cellDataChangedInfo.newValue != cellDataChangedInfo.oldValue) {
25
+ this.emitter.emitSync('CellDataChanged', cellDataChangedInfo);
26
+ this.adaptable.api.gridApi.fireCellChangedEvent(cellDataChangedInfo);
27
+ this.logDataChange(cellDataChangedInfo);
28
28
  }
29
29
  }
30
30
  // we need this temporary "shared memory" because the value change and the AG Grid cellChanged event are asynchronous
@@ -69,16 +69,18 @@ class DataService {
69
69
  newValue,
70
70
  });
71
71
  }
72
- logDataChange(dataChangedInfo) {
73
- const dataChangeLogEntry = this.extractDataChangeLogEntry(dataChangedInfo);
72
+ logDataChange(cellDataChangedInfo) {
73
+ const dataChangeLogEntry = this.extractDataChangeLogEntry(cellDataChangedInfo);
74
74
  this.dataChangeLogSubject$.next(dataChangeLogEntry);
75
75
  }
76
- extractDataChangeLogEntry(dataChangedInfo) {
76
+ extractDataChangeLogEntry(cellDataChangedInfo) {
77
77
  // create rowData snapshot
78
- const rowData = dataChangedInfo.rowData ? Helper_1.default.cloneObject(dataChangedInfo.rowData) : null;
78
+ const rowData = cellDataChangedInfo.rowData
79
+ ? Helper_1.default.cloneObject(cellDataChangedInfo.rowData)
80
+ : null;
79
81
  // strip down rowNode properties as it is pretty "heavy" on the memory
80
82
  const rowNode = rowData ? { data: rowData } : null;
81
- return Object.assign(Object.assign({}, dataChangedInfo), { rowNode,
83
+ return Object.assign(Object.assign({}, cellDataChangedInfo), { rowNode,
82
84
  rowData });
83
85
  }
84
86
  }
@@ -1,10 +1,10 @@
1
1
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
2
- import { DataChangedInfo } from '../../../PredefinedConfig/Common/DataChangedInfo';
2
+ import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
3
3
  import { IAdaptableService } from './IAdaptableService';
4
4
  export declare type ReactiveAlertInfo = {
5
5
  alertDefinition: AlertDefinition;
6
6
  type: 'alert';
7
- dataChangeLogEntry: DataChangedInfo;
7
+ dataChangeLogEntry: CellDataChangedInfo;
8
8
  };
9
9
  export interface IAlertService extends IAdaptableService {
10
10
  createReactiveAlert(alertDefinition: AlertDefinition): void;
@@ -1,10 +1,10 @@
1
- import { DataChangedInfo } from '../../../PredefinedConfig/Common/DataChangedInfo';
1
+ import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
2
2
  import { Observable } from 'rxjs';
3
3
  import { IAdaptableService } from './IAdaptableService';
4
4
  export interface IDataService extends IAdaptableService {
5
- CreateDataChangedEvent(dataChangedInfo: DataChangedInfo): void;
6
- on(eventName: 'DataChanged', callback: (dataChangedInfo: DataChangedInfo) => void): () => void;
7
- readonly dataChangeLog$: Observable<DataChangedInfo>;
8
- logUndoChange(undoChange: DataChangedInfo): void;
9
- extractUndoChange(undoChange: DataChangedInfo): DataChangedInfo | undefined;
5
+ CreateDataChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
6
+ on(eventName: 'CellDataChanged', callback: (cellDataChangedInfo: CellDataChangedInfo) => void): () => void;
7
+ readonly dataChangeLog$: Observable<CellDataChangedInfo>;
8
+ logUndoChange(undoChange: CellDataChangedInfo): void;
9
+ extractUndoChange(undoChange: CellDataChangedInfo): CellDataChangedInfo | undefined;
10
10
  }
@@ -1,15 +1,15 @@
1
1
  import { Observable } from 'rxjs';
2
2
  import { IAdaptableService } from './IAdaptableService';
3
3
  import { RowNode } from '@ag-grid-community/all-modules';
4
- import { DataChangedInfo } from '../../../PredefinedConfig/Common/DataChangedInfo';
4
+ import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
5
5
  import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
6
6
  import { AggregationParameter } from '../../ExpressionFunctions/aggregatedScalarExpressionFunctions';
7
7
  import { ModuleExpressionFunctions } from '../../../AdaptableOptions/AdaptableQLOptions';
8
8
  export interface IQueryLanguageService extends IAdaptableService {
9
9
  evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: RowNode): boolean;
10
10
  evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
11
- evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<DataChangedInfo>;
12
- evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): Observable<DataChangedInfo>;
11
+ evaluateObservableExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
12
+ evaluateAggregatedBooleanExpression(expression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
13
13
  evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): AggregationParameter;
14
14
  validateBoolean(expression: string, module: AdaptableModule, config?: {
15
15
  force?: boolean;
@@ -1,10 +1,10 @@
1
- import { DataChangedInfo } from '../../../PredefinedConfig/Common/DataChangedInfo';
1
+ import { CellDataChangedInfo } from '../../../PredefinedConfig/Common/CellDataChangedInfo';
2
2
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
3
3
  import { IAdaptableService } from './IAdaptableService';
4
4
  export interface IValidationService extends IAdaptableService {
5
- getValidationRulesForDataChange(dataChangedInfo: DataChangedInfo): AlertDefinition[];
6
- performValidation(dataChangedInfo: DataChangedInfo): boolean;
7
- performServerValidation(dataChangedInfo: DataChangedInfo, config: {
5
+ getValidationRulesForDataChange(cellDataChangedInfo: CellDataChangedInfo): AlertDefinition[];
6
+ performValidation(cellDataChangedInfo: CellDataChangedInfo): boolean;
7
+ performServerValidation(cellDataChangedInfo: CellDataChangedInfo, config: {
8
8
  onServerValidationCompleted: () => void;
9
9
  }): () => boolean;
10
10
  createValidationDescription(alertDefinition: AlertDefinition): string;
@@ -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"),t=require("../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../ObjectFactory")),o=require("../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../Constants/DocumentationLinkConstants"),r=require("../license/decode"),c="sales@adaptabletools.com",l=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,I=/(https):\/\/\S+(\.csb\.app)/g,_=/(https):\/\/\S+(\.adaptabletools\.com)/g,O="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,t]=Array.from(E.exec(O)||[]);return"https"===a&&"sandpack.codesandbox.io"===t},u=()=>{const[e,a,t]=Array.from(I.exec(O)||[]);return"https"===a&&".csb.app"===t},L=()=>{const[e,a,t]=Array.from(_.exec(O)||[]);return"https"===a&&".adaptabletools.com"===t};class A{constructor(e,a,t){this.adaptable=e,this.adaptable=e;let s=null;if(a)try{s=r.decode(a)}catch(e){s=e}h()||u()||L()||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 r=0;e instanceof Error||!(null==e?void 0:e.end)||(r=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-s.getTime())/864e5),r=i.default(r,0,1/0));const l=(e,a=n.LicenseDocsLink,t=c,s=r)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":r<=10&&o.ConsoleLogByMessageType(l("This AdapTable license expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)"),"Info");break;case"COMMERCIAL_EXPIRED_IN_SCOPE":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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(t.PopupShowAlert({header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a.SystemLicenseShowWatermark(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(a.SystemLicenseDisablePersistence())}destroy(){}}exports.LicenseService=A;
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=require("../Helpers/LoggingHelper"),i=e.__importDefault(require("lodash/clamp")),n=require("../Constants/DocumentationLinkConstants"),r=require("../license/decode"),c="sales@adaptabletools.com",l=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,I=/(https):\/\/\S+(\.csb\.app)/g,_=/(https):\/\/\S+(\.adaptabletools\.com)/g,O="undefined"!=typeof window?window.location.origin:"",h=()=>{const[e,a,t]=Array.from(E.exec(O)||[]);return"https"===a&&"sandpack.codesandbox.io"===t},u=()=>{const[e,a,t]=Array.from(I.exec(O)||[]);return"https"===a&&".csb.app"===t},L=()=>{const[e,a,t]=Array.from(_.exec(O)||[]);return"https"===a&&".adaptabletools.com"===t};class A{constructor(e,a,t){this.adaptable=e,this.adaptable=e;let s=null;if(a)try{s=r.decode(a)}catch(e){s=e}h()||u()||L()||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 r=0;e instanceof Error||!(null==e?void 0:e.end)||(r=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-s.getTime())/864e5),r=i.default(r,0,1/0));const l=(e,a=n.LicenseDocsLink,t=c,s=r)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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":r<=10&&o.ConsoleLogByMessageType(l("This AdapTable license expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)"),"Info");break;case"COMMERCIAL_EXPIRED_IN_SCOPE":o.ConsoleLogByMessageType(l("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":o.ConsoleLogByMessageType(l("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(t.PopupShowAlert({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a.SystemLicenseShowWatermark(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(a.SystemLicenseDisablePersistence())}destroy(){}}exports.LicenseService=A;
@@ -76,7 +76,7 @@ class ModuleService {
76
76
  }
77
77
  getModuleDocumentationPageByModule(adaptableModule) {
78
78
  let url = `${DocumentationLinkConstants_1.HOST_URL_DOCS}/`;
79
- let learnUrl = url + 'learn/';
79
+ let learnUrl = url + 'guide/';
80
80
  switch (adaptableModule) {
81
81
  case 'Alert':
82
82
  return learnUrl + 'handbook-alerting';
@@ -1,7 +1,7 @@
1
1
  import { IQueryLanguageService } from './Interface/IQueryLanguageService';
2
2
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
3
  import { Observable } from 'rxjs';
4
- import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
4
+ import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
5
5
  import { RowNode } from '@ag-grid-community/all-modules';
6
6
  import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
7
7
  import { ModuleExpressionFunctions } from '../../AdaptableOptions/AdaptableQLOptions';
@@ -17,8 +17,8 @@ export declare class QueryLanguageService implements IQueryLanguageService {
17
17
  evaluateBooleanExpression(expression: string, module: AdaptableModule, rowNode: any): any;
18
18
  evaluateScalarExpression(expression: string, module: AdaptableModule, rowNode: RowNode): any;
19
19
  evaluateAggregatedScalarExpression(expression: string, module: AdaptableModule): AggregationParameter;
20
- evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<DataChangedInfo>;
21
- evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): Observable<DataChangedInfo>;
20
+ evaluateObservableExpression(reactiveExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
21
+ evaluateAggregatedBooleanExpression(aggregationExpression: string, module: AdaptableModule): Observable<CellDataChangedInfo>;
22
22
  validateBoolean(expressionInput: string, module: AdaptableModule, config?: {
23
23
  force?: boolean;
24
24
  }): {