@adaptabletools/adaptable 11.0.8 → 11.1.1-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +19 -11
- package/bundle.cjs.js +125 -125
- package/index.css +23 -11
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +5 -1
- package/src/Api/AlertApi.d.ts +2 -1
- package/src/Api/BulkUpdateApi.d.ts +5 -0
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Events/GridDataChanged.d.ts +5 -1
- package/src/Api/GridApi.d.ts +23 -2
- package/src/Api/Implementation/AlertApiImpl.d.ts +4 -1
- package/src/Api/Implementation/AlertApiImpl.js +79 -52
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +7 -2
- package/src/Api/Implementation/EventApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -1
- package/src/Api/Implementation/GridApiImpl.js +24 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +9 -2
- package/src/Api/Implementation/InternalApiImpl.js +37 -1
- package/src/Api/Implementation/LayoutApiImpl.d.ts +6 -1
- package/src/Api/Implementation/LayoutApiImpl.js +45 -4
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +7 -1
- package/src/Api/InternalApi.d.ts +9 -2
- package/src/Api/LayoutApi.d.ts +33 -3
- package/src/PredefinedConfig/AlertState.d.ts +7 -3
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +35 -6
- package/src/PredefinedConfig/Common/AdaptableAlert.js +7 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +20 -0
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Entitlement.d.ts +2 -2
- package/src/PredefinedConfig/Common/Menu.d.ts +3 -0
- package/src/PredefinedConfig/Common/RowsHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowsHighlightInfo.js +2 -0
- package/src/PredefinedConfig/ConfigState.d.ts +4 -1
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/PredefinedConfig/PopupState.d.ts +2 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +18 -0
- package/src/Redux/ActionsReducers/PopupRedux.js +36 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +32 -1
- package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -0
- package/src/Redux/Store/AdaptableReduxMerger.js +40 -4
- package/src/Redux/Store/AdaptableStore.js +69 -27
- package/src/Strategy/AlertModule.d.ts +5 -3
- package/src/Strategy/AlertModule.js +60 -16
- package/src/Strategy/BulkUpdateModule.js +5 -0
- package/src/Strategy/ExportModule.js +1 -0
- package/src/Strategy/SmartEditModule.js +6 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +6 -2
- package/src/Utilities/Emitter.d.ts +1 -1
- package/src/Utilities/Emitter.js +6 -3
- package/src/Utilities/Interface/MessagePopups.d.ts +13 -0
- package/src/Utilities/ObjectFactory.d.ts +8 -6
- package/src/Utilities/ObjectFactory.js +26 -12
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ValidationService.js +1 -0
- package/src/View/AdaptableView.js +2 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +16 -9
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +13 -3
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -0
- package/src/View/Alert/Wizard/AlertWizard.js +83 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +2 -2
- package/src/View/Components/Panels/PanelFooter.d.ts +10 -0
- package/src/View/Components/Panels/PanelFooter.js +14 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +12 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +3 -1
- package/src/View/Components/Popups/{AdaptablePopup/Utilities.d.ts → Utilities.d.ts} +4 -0
- package/src/View/Components/Popups/{AdaptablePopup/Utilities.js → Utilities.js} +5 -2
- package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +6 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +32 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +4 -0
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +8 -0
- package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +3 -0
- package/src/View/Layout/LayoutEditorStandalonePopup.js +76 -0
- package/src/View/Layout/LayoutPopup.js +3 -24
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -4
- package/src/View/Layout/LayoutViewPanel.js +5 -18
- package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.d.ts +9 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +55 -0
- package/src/View/Layout/Wizard/LayoutEditor/index.js +3 -68
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +35 -7
- package/src/View/SystemStatus/SystemStatusEntityRow.js +1 -2
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +65 -69
- package/src/agGrid/agGridHelper.d.ts +1 -1
- package/src/agGrid/agGridHelper.js +23 -8
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/Dialog/index.js +1 -1
- package/src/components/Modal/index.js +1 -1
- package/src/components/WindowModal/WindowModal.d.ts +10 -8
- package/src/components/WindowModal/WindowModal.js +4 -2
- package/src/components/WindowModal/useStacking.d.ts +9 -0
- package/src/components/WindowModal/useStacking.js +45 -0
- package/src/env.js +3 -3
- package/src/metamodel/adaptable.metamodel.d.ts +51 -11
- package/src/metamodel/adaptable.metamodel.js +146 -21
- package/src/types.d.ts +3 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -34,7 +34,14 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
this.
|
|
37
|
+
this.handleCellDataChanged(dataChangedInfo);
|
|
38
|
+
});
|
|
39
|
+
this.api.eventApi.on('GridDataChanged', (gridDataChangedInfo) => {
|
|
40
|
+
if (gridDataChangedInfo.rowTrigger === 'Edit') {
|
|
41
|
+
// changed row alerts should be handled by standard 'Any' ('AnyChange') Predicate
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.handleGridDataChanged(gridDataChangedInfo);
|
|
38
45
|
});
|
|
39
46
|
this.api.internalApi
|
|
40
47
|
.getAlertService()
|
|
@@ -87,25 +94,40 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
87
94
|
const items = [];
|
|
88
95
|
if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
|
|
89
96
|
if (menuContext.adaptableColumn && menuContext.rowNode) {
|
|
90
|
-
let
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
97
|
+
let relevantAlert;
|
|
98
|
+
// find alerts which highlight the current cell
|
|
99
|
+
relevantAlert = this.api.internalApi.getAdaptableAlertWithHighlightCell(menuContext.adaptableColumn.columnId, menuContext.rowNode);
|
|
100
|
+
if (!relevantAlert) {
|
|
101
|
+
// find alerts which highlight the current row
|
|
102
|
+
relevantAlert = this.api.internalApi.getAdaptableAlertWithHighlightRow(menuContext.rowNode);
|
|
103
|
+
}
|
|
104
|
+
if (relevantAlert) {
|
|
105
|
+
items.push(this.createColumnMenuItemReduxAction('Clear Alert', this.moduleInfo.Glyph, SystemRedux.SystemAlertDelete(relevantAlert)));
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
}
|
|
101
109
|
return items;
|
|
102
110
|
}
|
|
103
|
-
|
|
104
|
-
const alertDefinitions = this.
|
|
105
|
-
if (
|
|
111
|
+
handleCellDataChanged(dataChangedInfo) {
|
|
112
|
+
const alertDefinitions = this.getAlertDefinitionsForCellDataChange(dataChangedInfo);
|
|
113
|
+
if (alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.length) {
|
|
106
114
|
this.showAlertForDefinitions(dataChangedInfo, alertDefinitions);
|
|
107
115
|
}
|
|
108
116
|
}
|
|
117
|
+
handleGridDataChanged(gridDataChangedInfo) {
|
|
118
|
+
const alertDefinitions = this.getAlertDefinitionsForGridDataChange(gridDataChangedInfo);
|
|
119
|
+
const rowAdded = gridDataChangedInfo.rowTrigger === 'Add';
|
|
120
|
+
const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
|
|
121
|
+
const actionName = rowAdded ? 'Added' : 'Removed';
|
|
122
|
+
const alertHeader = numberOfChangedRows > 1 ? `${actionName} Rows` : `${actionName} Row `;
|
|
123
|
+
const alertMessage = numberOfChangedRows > 1
|
|
124
|
+
? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
|
|
125
|
+
: `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
|
|
126
|
+
alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
|
|
127
|
+
const alert = ObjectFactory_1.default.CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
|
|
128
|
+
this.api.alertApi.displayAlert(alert);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
109
131
|
handleReactiveAlertTriggered(reactiveAlertInfo) {
|
|
110
132
|
var _a;
|
|
111
133
|
// the row node data is most probably stale because the reactive queries buffer the changed data
|
|
@@ -122,13 +144,28 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
122
144
|
}
|
|
123
145
|
showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
|
|
124
146
|
alertDefinitions.forEach((alertDefinition) => {
|
|
125
|
-
const alert = ObjectFactory_1.default.
|
|
147
|
+
const alert = ObjectFactory_1.default.CreateCellChangedAlert(dataChangedInfo.column.friendlyName, this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
|
|
126
148
|
this.api.alertApi.displayAlert(alert);
|
|
127
149
|
});
|
|
128
150
|
}
|
|
129
|
-
|
|
151
|
+
getAlertDefinitionsForCellDataChange(dataChangedEvent) {
|
|
130
152
|
return this.getBaseAlertDefinitionsForDataChange(dataChangedEvent, this.api.alertApi.getActiveNonReactiveAlertDefinitions());
|
|
131
153
|
}
|
|
154
|
+
getAlertDefinitionsForGridDataChange(gridDataChangedInfo) {
|
|
155
|
+
return this.api.alertApi
|
|
156
|
+
.getActiveNonReactiveAlertDefinitions()
|
|
157
|
+
.filter((alertDefinition) => this.isAlertDefinitionForRowChangeEvent(alertDefinition))
|
|
158
|
+
.filter((alertDefinition) => {
|
|
159
|
+
var _a, _b, _c, _d;
|
|
160
|
+
if (gridDataChangedInfo.rowTrigger === 'Add') {
|
|
161
|
+
return ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) === null || _b === void 0 ? void 0 : _b.PredicateId) === 'AddedRow';
|
|
162
|
+
}
|
|
163
|
+
if (gridDataChangedInfo.rowTrigger === 'Delete') {
|
|
164
|
+
return ((_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicate) === null || _d === void 0 ? void 0 : _d.PredicateId) === 'RemovedRow';
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
132
169
|
getBaseAlertDefinitionsForDataChange(dataChangedEvent, definitions, defaultNoPredicateReturn = false) {
|
|
133
170
|
let relatedAlertDefinitions = definitions
|
|
134
171
|
.filter((v) => this.api.scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
|
|
@@ -151,8 +188,11 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
151
188
|
triggeredAlerts.push(alertDefinition);
|
|
152
189
|
}
|
|
153
190
|
}
|
|
154
|
-
else
|
|
155
|
-
|
|
191
|
+
else {
|
|
192
|
+
if (!this.isAlertDefinitionForRowChangeEvent(alertDefinition) &&
|
|
193
|
+
this.isAlertPredicateTriggered(alertDefinition, dataChangedEvent, defaultNoPredicateReturn)) {
|
|
194
|
+
triggeredAlerts.push(alertDefinition);
|
|
195
|
+
}
|
|
156
196
|
}
|
|
157
197
|
});
|
|
158
198
|
}
|
|
@@ -168,6 +208,10 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
168
208
|
column: dataChangedEvent.column,
|
|
169
209
|
}, defaultNoPredicateReturn);
|
|
170
210
|
}
|
|
211
|
+
isAlertDefinitionForRowChangeEvent(alertDefinition) {
|
|
212
|
+
return (this.api.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition) ||
|
|
213
|
+
this.api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition));
|
|
214
|
+
}
|
|
171
215
|
getTeamSharingAction() {
|
|
172
216
|
return {
|
|
173
217
|
ModuleEntities: this.api.alertApi.getAlertDefinitions(),
|
|
@@ -43,6 +43,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
43
43
|
return {
|
|
44
44
|
IsValid: false,
|
|
45
45
|
Alert: {
|
|
46
|
+
alertType: 'generic',
|
|
46
47
|
header: 'Bulk Update Error',
|
|
47
48
|
message: 'Cannot edit while Grid is in Pivot Mode.',
|
|
48
49
|
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -53,6 +54,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
53
54
|
return {
|
|
54
55
|
IsValid: false,
|
|
55
56
|
Alert: {
|
|
57
|
+
alertType: 'generic',
|
|
56
58
|
header: 'Bulk Update Error',
|
|
57
59
|
message: 'No cells are selected.\nPlease select some cells.',
|
|
58
60
|
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -63,6 +65,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
63
65
|
return {
|
|
64
66
|
IsValid: false,
|
|
65
67
|
Alert: {
|
|
68
|
+
alertType: 'generic',
|
|
66
69
|
header: 'Bulk Update Error',
|
|
67
70
|
message: 'Bulk Update only supports single column edit.\nPlease adjust cell selection.',
|
|
68
71
|
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -74,6 +77,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
74
77
|
return {
|
|
75
78
|
IsValid: false,
|
|
76
79
|
Alert: {
|
|
80
|
+
alertType: 'generic',
|
|
77
81
|
header: 'Bulk Update Error',
|
|
78
82
|
message: 'Bulk Update is not permitted on readonly columns.\nPlease adjust the cell selection.',
|
|
79
83
|
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -85,6 +89,7 @@ class BulkUpdateModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
85
89
|
return {
|
|
86
90
|
IsValid: false,
|
|
87
91
|
Alert: {
|
|
92
|
+
alertType: 'generic',
|
|
88
93
|
header: 'Bulk Update Error',
|
|
89
94
|
message: 'Bulk Update is not permitted on readonly cells.\nPlease adjust the cell selection.',
|
|
90
95
|
alertDefinition: ObjectFactory_1.default.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -185,6 +185,7 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
185
185
|
}
|
|
186
186
|
showEmptyExportWarning() {
|
|
187
187
|
this.api.internalApi.dispatchReduxAction(PopupRedux.PopupShowAlert({
|
|
188
|
+
alertType: 'generic',
|
|
188
189
|
header: 'Export',
|
|
189
190
|
message: 'No Data To Export',
|
|
190
191
|
alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
|
|
@@ -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'),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AdaptableSettingsPanel } from '../../PredefinedConfig/Common/Types';
|
|
2
2
|
import { AdaptableModule } from '../../types';
|
|
3
|
-
export declare const
|
|
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.
|
|
4
|
-
exports.
|
|
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):
|
|
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[];
|
package/src/Utilities/Emitter.js
CHANGED
|
@@ -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
|
-
|
|
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);
|
|
@@ -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
|
+
}
|
|
@@ -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 {
|
|
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
|
|
37
|
-
export declare function
|
|
36
|
+
export declare function CreateGenericAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition): AdaptableGenericAlert;
|
|
37
|
+
export declare function CreateCellChangedAlert(alertHeader: string, alertMessage: string, alertDefinition: AlertDefinition, dataChangedInfo: DataChangedInfo): 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
|
-
|
|
76
|
-
|
|
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.
|
|
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
|
|
54
|
+
function CreateGenericAlert(alertHeader, alertMessage, alertDefinition) {
|
|
55
55
|
return {
|
|
56
|
+
alertType: 'generic',
|
|
56
57
|
Uuid: Uuid_1.createUuid(),
|
|
57
|
-
header:
|
|
58
|
-
message:
|
|
59
|
-
alertDefinition:
|
|
58
|
+
header: alertHeader,
|
|
59
|
+
message: alertMessage,
|
|
60
|
+
alertDefinition: alertDefinition,
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
exports.
|
|
63
|
-
function
|
|
63
|
+
exports.CreateGenericAlert = CreateGenericAlert;
|
|
64
|
+
function CreateCellChangedAlert(alertHeader, alertMessage, alertDefinition, dataChangedInfo) {
|
|
64
65
|
return {
|
|
66
|
+
alertType: 'cellChanged',
|
|
65
67
|
Uuid: Uuid_1.createUuid(),
|
|
66
68
|
header: alertHeader,
|
|
67
69
|
message: alertMessage,
|
|
68
|
-
alertDefinition
|
|
69
|
-
dataChangedInfo
|
|
70
|
+
alertDefinition,
|
|
71
|
+
dataChangedInfo,
|
|
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.
|
|
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
|
-
|
|
407
|
-
|
|
419
|
+
CreateGenericAlert,
|
|
420
|
+
CreateCellChangedAlert,
|
|
421
|
+
CreateRowChangedAlert,
|
|
408
422
|
CreateEmptyAlertDefinition,
|
|
409
423
|
CreateEmptyFlashingCellDefinition,
|
|
410
424
|
CreateInternalAlertDefinitionForMessages,
|
|
@@ -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 + '
|
|
79
|
+
let learnUrl = url + 'guide/';
|
|
80
80
|
switch (adaptableModule) {
|
|
81
81
|
case 'Alert':
|
|
82
82
|
return learnUrl + 'handbook-alerting';
|
|
@@ -44,6 +44,7 @@ class ValidationService {
|
|
|
44
44
|
const failedRules = this.getValidationRulesForDataChange(dataChangedInfo);
|
|
45
45
|
if (failedRules.length > 0) {
|
|
46
46
|
let alert = {
|
|
47
|
+
alertType: 'cellChanged',
|
|
47
48
|
header: 'Alert',
|
|
48
49
|
message: 'Perform Edit Alert Fired',
|
|
49
50
|
alertDefinition: failedRules[0],
|
|
@@ -15,6 +15,7 @@ const License_1 = require("./License");
|
|
|
15
15
|
const ExportCustomDestinationFormPopups_1 = require("./Export/ExportCustomDestinationFormPopups");
|
|
16
16
|
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
17
17
|
const react_toastify_1 = require("react-toastify");
|
|
18
|
+
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
18
19
|
class AdaptableView extends React.Component {
|
|
19
20
|
render() {
|
|
20
21
|
var _a, _b, _c, _d;
|
|
@@ -29,6 +30,7 @@ class AdaptableView extends React.Component {
|
|
|
29
30
|
React.createElement(react_toastify_1.ToastContainer, { limit: this.props.AdaptableApi.internalApi.getAdaptableOptions().notificationsOptions
|
|
30
31
|
.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
31
32
|
(watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
|
|
33
|
+
React.createElement(WindowPopups_1.WindowPopups, null),
|
|
32
34
|
React.createElement(ProgressIndicator_1.ProgressIndicator, null)));
|
|
33
35
|
}
|
|
34
36
|
}
|
|
@@ -17,6 +17,7 @@ exports.renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
|
17
17
|
AlertProperties.HighlightCell ? { label: 'Highlight Cell', id: 'highlightCell' } : null,
|
|
18
18
|
AlertProperties.HighlightRow ? { label: 'Highlight Row', id: 'highlightRow' } : null,
|
|
19
19
|
AlertProperties.JumpToCell ? { label: 'Jump To Cell', id: 'jumptocell' } : null,
|
|
20
|
+
AlertProperties.JumpToRow ? { label: 'Jump To Row', id: 'jumptorow' } : null,
|
|
20
21
|
AlertProperties.ShowInDiv
|
|
21
22
|
? {
|
|
22
23
|
label: (React.createElement(React.Fragment, null,
|
|
@@ -33,34 +34,40 @@ exports.renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
|
33
34
|
return (React.createElement(ValueSelector_1.ValueOptionsTags, { allowWrap: allowWrap, options: values, value: values.map((v) => v.id), readOnly: true, toIdentifier: (x) => x.id, toLabel: (x) => React.createElement(React.Fragment, null, x.label) }));
|
|
34
35
|
};
|
|
35
36
|
exports.AlertBehaviourWizardSection = (props) => {
|
|
36
|
-
const { data } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
37
|
+
const { data, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
37
38
|
const { AlertProperties = {} } = data;
|
|
39
|
+
const rowAddedAlert = api.internalApi.isAlertDefinitionForAddedRowChangeEvent(data);
|
|
40
|
+
const rowRemovedAlert = api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(data);
|
|
41
|
+
const cellChangedAlert = !rowAddedAlert && !rowRemovedAlert;
|
|
38
42
|
const onChange = (AlertProperties) => {
|
|
39
43
|
props.onChange(Object.assign(Object.assign({}, data), { AlertProperties: Object.assign(Object.assign({}, data.AlertProperties), AlertProperties) }));
|
|
40
44
|
};
|
|
41
45
|
return (React.createElement(Tabs_1.Tabs, null,
|
|
42
46
|
React.createElement(Tabs_1.Tabs.Tab, null, "Behaviour"),
|
|
43
47
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
44
|
-
React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
48
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
|
|
45
49
|
onChange({
|
|
46
50
|
PreventEdit,
|
|
47
51
|
});
|
|
48
52
|
} },
|
|
49
53
|
"Prevent Cell Edit",
|
|
50
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)")),
|
|
51
|
-
React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: Boolean(AlertProperties.HighlightCell), onChange: (HighlightCell) => {
|
|
54
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
55
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: Boolean(AlertProperties.HighlightCell), onChange: (HighlightCell) => {
|
|
52
56
|
onChange({ HighlightCell });
|
|
53
57
|
} },
|
|
54
58
|
"Highlight Cell",
|
|
55
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(using the Alert message type)")),
|
|
56
|
-
React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: Boolean(AlertProperties.HighlightRow), onChange: (HighlightRow) => {
|
|
59
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(using the Alert message type)"))),
|
|
60
|
+
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { style: { alignItems: 'flex-start' }, checked: Boolean(AlertProperties.HighlightRow), onChange: (HighlightRow) => {
|
|
57
61
|
onChange({ HighlightRow });
|
|
58
62
|
} },
|
|
59
63
|
"Highlight Row",
|
|
60
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(using the Alert message type)")),
|
|
61
|
-
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
64
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(using the Alert message type)"))),
|
|
65
|
+
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
62
66
|
onChange({ JumpToCell });
|
|
63
|
-
} }, "Jump To Cell"),
|
|
67
|
+
} }, "Jump To Cell")),
|
|
68
|
+
rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
|
|
69
|
+
onChange({ JumpToRow });
|
|
70
|
+
} }, "Jump To Row")),
|
|
64
71
|
React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
|
|
65
72
|
onChange({ ShowInDiv });
|
|
66
73
|
} },
|
|
@@ -12,12 +12,22 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayou
|
|
|
12
12
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
13
13
|
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
14
14
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
15
|
-
const BUTTON_ACTIONS = ['highlight-cell', 'jump-to-cell', 'undo', 'suspend'];
|
|
16
15
|
exports.AlertButtonsEditor = (props) => {
|
|
16
|
+
const { api, adaptableAlert } = props;
|
|
17
17
|
const onChange = (newButtons) => {
|
|
18
18
|
props.onChange(newButtons);
|
|
19
19
|
};
|
|
20
20
|
const AlertButtons = Helper_1.cloneObject(props.AlertButtons || []) || [];
|
|
21
|
+
const rowAddedAlert = api.internalApi.isAlertDefinitionForAddedRowChangeEvent(adaptableAlert.alertDefinition);
|
|
22
|
+
const rowRemovedAlert = api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(adaptableAlert.alertDefinition);
|
|
23
|
+
const buttonActions = [];
|
|
24
|
+
if (rowAddedAlert) {
|
|
25
|
+
buttonActions.push('highlight-row', 'jump-to-row');
|
|
26
|
+
}
|
|
27
|
+
if (!rowAddedAlert && !rowRemovedAlert) {
|
|
28
|
+
buttonActions.push('highlight-cell', 'jump-to-cell', 'undo');
|
|
29
|
+
}
|
|
30
|
+
buttonActions.push('suspend');
|
|
21
31
|
return (React.createElement(React.Fragment, null,
|
|
22
32
|
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between" },
|
|
23
33
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 3, mb: 2 }, "Add buttons to Alert, and Actions to perform when button is clicked"),
|
|
@@ -42,7 +52,7 @@ exports.AlertButtonsEditor = (props) => {
|
|
|
42
52
|
: button.Action
|
|
43
53
|
: [];
|
|
44
54
|
// filter out the adaptable standard actions
|
|
45
|
-
const btnUserFunctions = btnActions.filter((action) => !
|
|
55
|
+
const btnUserFunctions = btnActions.filter((action) => !buttonActions.includes(action));
|
|
46
56
|
const setVariant = (variant) => {
|
|
47
57
|
onChange(AlertButtons.map((btn, i) => {
|
|
48
58
|
if (i === index) {
|
|
@@ -115,7 +125,7 @@ exports.AlertButtonsEditor = (props) => {
|
|
|
115
125
|
onChange(AlertButtons.filter((btn) => btn !== button));
|
|
116
126
|
} }))),
|
|
117
127
|
React.createElement(FormLayout_1.FormRow, { label: React.createElement(rebass_1.Text, { fontSize: 2 }, "Actions") },
|
|
118
|
-
|
|
128
|
+
buttonActions.map((actionName) => {
|
|
119
129
|
return (React.createElement(CheckBox_1.CheckBox, { key: actionName, marginRight: 3, onChange: (checked) => {
|
|
120
130
|
let actions = btnActions;
|
|
121
131
|
if (!checked) {
|
|
@@ -45,6 +45,7 @@ exports.AlertPreview = (_a) => {
|
|
|
45
45
|
const alertForm = alertDefinition.AlertForm || {};
|
|
46
46
|
const Buttons = (((_a = alertForm === null || alertForm === void 0 ? void 0 : alertForm.Buttons) === null || _a === void 0 ? void 0 : _a.length) ? alertForm.Buttons : DEFAULT_BUTTONS).map(mapButtons);
|
|
47
47
|
const result = {
|
|
48
|
+
alertType: 'generic',
|
|
48
49
|
header: alertDefinition.MessageType,
|
|
49
50
|
message: api.alertApi.getAlertDescription(alertDefinition),
|
|
50
51
|
alertDefinition: Object.assign(Object.assign({}, alertDefinition), { AlertForm: Object.assign(Object.assign({}, alertForm), { Buttons }) }),
|
|
@@ -60,6 +61,7 @@ exports.AlertDisplayWizardSection = (props) => {
|
|
|
60
61
|
const messageType = data.MessageType;
|
|
61
62
|
const messageText = api.alertApi.getAlertDescription(data);
|
|
62
63
|
const adaptableAlert = {
|
|
64
|
+
alertType: 'generic',
|
|
63
65
|
header: data.MessageType,
|
|
64
66
|
message: '',
|
|
65
67
|
alertDefinition: data,
|