@adaptabletools/adaptable 11.1.3 → 11.1.6
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/bundle.cjs.js +139 -139
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +139 -9
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +3 -3
- package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
- package/src/AdaptableOptions/SmartEdit.js +2 -0
- package/src/Api/AdaptableApi.d.ts +4 -1
- package/src/Api/EventApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +5 -2
- package/src/Api/Implementation/FilterApiImpl.js +8 -2
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +11 -7
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +6 -8
- package/src/Api/Implementation/InternalApiImpl.d.ts +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +9 -0
- package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ScopeApiImpl.js +12 -0
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +3 -0
- package/src/Api/InternalApi.d.ts +4 -0
- package/src/Api/ScopeApi.d.ts +10 -0
- package/src/Api/SmartEditApi.d.ts +3 -2
- package/src/Api/ThemeApi.d.ts +4 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +144 -3
- package/src/PredefinedConfig/Common/Menu.d.ts +4 -0
- package/src/PredefinedConfig/ExportState.d.ts +0 -5
- package/src/PredefinedConfig/PopupState.d.ts +2 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -5
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
- package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
- package/src/Redux/Store/AdaptableStore.js +11 -1
- package/src/Strategy/AlertModule.js +5 -4
- package/src/Strategy/CalculatedColumnModule.js +1 -1
- package/src/Strategy/ExportModule.js +14 -4
- package/src/Strategy/SmartEditModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.js +24 -13
- package/src/Strategy/Utilities/getExportColumnsViewItems.js +1 -1
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
- package/src/Utilities/Helpers/FormatHelper.js +6 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
- package/src/Utilities/Services/AlertService.d.ts +3 -3
- package/src/Utilities/Services/AlertService.js +6 -6
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +3 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +20 -20
- package/src/Utilities/Services/EntitlementService.d.ts +3 -3
- package/src/Utilities/Services/EntitlementService.js +12 -8
- package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
- package/src/Utilities/Services/MetamodelService.d.ts +3 -3
- package/src/Utilities/Services/MetamodelService.js +4 -4
- package/src/Utilities/Services/ModuleService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +12 -12
- package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
- package/src/Utilities/Services/QueryLanguageService.js +20 -19
- package/src/Utilities/Services/ReportService.d.ts +4 -4
- package/src/Utilities/Services/ReportService.js +50 -44
- package/src/Utilities/Services/TeamSharingService.d.ts +3 -3
- package/src/Utilities/Services/TeamSharingService.js +19 -16
- package/src/Utilities/Services/ValidationService.d.ts +3 -3
- package/src/Utilities/Services/ValidationService.js +19 -17
- package/src/View/AdaptableView.js +2 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +46 -9
- package/src/View/Alert/Wizard/AlertWizard.js +22 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -5
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -3
- package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
- package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +1 -1
- package/src/View/Components/Selectors/ColumnSelector.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +1 -3
- package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
- package/src/View/DataSource/DataSourceViewPanel.js +15 -13
- package/src/View/Export/ExportViewPanel.d.ts +1 -3
- package/src/View/Export/ExportViewPanel.js +1 -17
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +15 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +2 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
- package/src/View/SmartEdit/SmartEditPopup.js +15 -3
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +4 -4
- package/src/agGrid/Adaptable.js +37 -27
- package/src/agGrid/agGridMenuHelper.js +1 -0
- package/src/components/StylePreview.js +2 -2
- package/src/components/icons/analysis.d.ts +3 -0
- package/src/components/icons/analysis.js +8 -0
- package/src/components/icons/call.d.ts +3 -0
- package/src/components/icons/call.js +7 -0
- package/src/components/icons/chat.d.ts +3 -0
- package/src/components/icons/chat.js +8 -0
- package/src/components/icons/index.js +14 -0
- package/src/components/icons/instrument.d.ts +3 -0
- package/src/components/icons/instrument.js +8 -0
- package/src/components/icons/news.d.ts +3 -0
- package/src/components/icons/news.js +8 -0
- package/src/components/icons/person.d.ts +3 -0
- package/src/components/icons/person.js +7 -0
- package/src/components/icons/quote.d.ts +3 -0
- package/src/components/icons/quote.js +7 -0
- package/src/metamodel/adaptable.metamodel.d.ts +112 -5
- package/src/metamodel/adaptable.metamodel.js +219 -22
- package/src/types.d.ts +2 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
- package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
- package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
- package/src/View/Export/ExportCustomDestinationFormPopups.js +0 -15
|
@@ -3,18 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TeamSharingService = void 0;
|
|
4
4
|
const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
5
5
|
class TeamSharingService {
|
|
6
|
-
constructor(
|
|
7
|
-
this.
|
|
8
|
-
|
|
6
|
+
constructor(adaptableApi) {
|
|
7
|
+
this.adaptableApi = adaptableApi;
|
|
8
|
+
const teamSharingOptions = adaptableApi.internalApi.getAdaptableOptions().teamSharingOptions;
|
|
9
|
+
if (teamSharingOptions.updateInterval > 0) {
|
|
9
10
|
// convert minutes to millis
|
|
10
|
-
const updateInterval =
|
|
11
|
+
const updateInterval = teamSharingOptions.updateInterval * 60000;
|
|
11
12
|
this.updateCheckTimerId = setInterval(() => {
|
|
12
|
-
this.
|
|
13
|
+
this.adaptableApi.teamSharingApi.checkForUpdates();
|
|
13
14
|
}, updateInterval);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
buildSharedEntityWithDependencies(adaptableObject, module, configuration) {
|
|
17
|
-
const sharingUserName = this.
|
|
18
|
+
const sharingUserName = this.adaptableApi.internalApi.getAdaptableOptions().userName;
|
|
18
19
|
const sharingTimestamp = new Date().getTime();
|
|
19
20
|
const createdSharedEntities = [];
|
|
20
21
|
this.createSharedEntity(adaptableObject, module, configuration, sharingUserName, sharingTimestamp, createdSharedEntities);
|
|
@@ -62,7 +63,9 @@ class TeamSharingService {
|
|
|
62
63
|
// either ADD or EDIT(in which case the user will need to confirm the overwrite)
|
|
63
64
|
const getSharedEntityImportAction = (sharedEntity) => {
|
|
64
65
|
const { Module, Entity } = sharedEntity;
|
|
65
|
-
const importInfo = this.
|
|
66
|
+
const importInfo = this.adaptableApi.internalApi
|
|
67
|
+
.getModuleService()
|
|
68
|
+
.getTeamSharingAction(Module);
|
|
66
69
|
if (importInfo === null || importInfo === void 0 ? void 0 : importInfo.ModuleEntities.some((moduleEntity) => moduleEntity.Uuid === Entity.Uuid)) {
|
|
67
70
|
configOverwriteNeedsConfirmation = true;
|
|
68
71
|
return importInfo === null || importInfo === void 0 ? void 0 : importInfo.EditAction(Entity);
|
|
@@ -71,7 +74,7 @@ class TeamSharingService {
|
|
|
71
74
|
return importInfo === null || importInfo === void 0 ? void 0 : importInfo.AddAction(Entity);
|
|
72
75
|
}
|
|
73
76
|
};
|
|
74
|
-
const existingSharedEntities = this.
|
|
77
|
+
const existingSharedEntities = this.adaptableApi.teamSharingApi.getSharedEntities();
|
|
75
78
|
const sharedEntityDependencyTree = this.getSharedEntityDependencyTree(importedSharedEntity, existingSharedEntities);
|
|
76
79
|
const importSteps = sharedEntityDependencyTree.map((sharedEntity) => ({
|
|
77
80
|
sharedEntity,
|
|
@@ -81,13 +84,13 @@ class TeamSharingService {
|
|
|
81
84
|
}
|
|
82
85
|
getSharedEntityLocalAndRemoteRevisions(changedAdaptableObjectId, remoteSharedEntities) {
|
|
83
86
|
var _a, _b, _c, _d;
|
|
84
|
-
const localRevision = (_b = (_a = this.
|
|
87
|
+
const localRevision = (_b = (_a = this.adaptableApi.teamSharingApi.getTeamSharingState().ActiveSharedEntityMap[changedAdaptableObjectId]) === null || _a === void 0 ? void 0 : _a.Revision) !== null && _b !== void 0 ? _b : -1;
|
|
85
88
|
const remoteRevision = (_d = (_c = remoteSharedEntities.find((sharedEntity) => sharedEntity.Entity.Uuid === changedAdaptableObjectId)) === null || _c === void 0 ? void 0 : _c.Revision) !== null && _d !== void 0 ? _d : -1;
|
|
86
89
|
return [localRevision, remoteRevision];
|
|
87
90
|
}
|
|
88
91
|
getStaleActiveSharedEntities() {
|
|
89
|
-
const sharedEntities = this.
|
|
90
|
-
const activeEntities = this.
|
|
92
|
+
const sharedEntities = this.adaptableApi.teamSharingApi.getSharedEntities();
|
|
93
|
+
const activeEntities = this.adaptableApi.teamSharingApi.getTeamSharingState().ActiveSharedEntityMap;
|
|
91
94
|
const result = {};
|
|
92
95
|
sharedEntities
|
|
93
96
|
.filter((sharedEntity) => sharedEntity.Type === 'Active')
|
|
@@ -105,21 +108,21 @@ class TeamSharingService {
|
|
|
105
108
|
return result;
|
|
106
109
|
}
|
|
107
110
|
showUpdateNotifications() {
|
|
108
|
-
const { updateNotification } = this.
|
|
111
|
+
const { updateNotification } = this.adaptableApi.internalApi.getAdaptableOptions().teamSharingOptions;
|
|
109
112
|
if (!updateNotification) {
|
|
110
113
|
return;
|
|
111
114
|
}
|
|
112
115
|
Object.values(this.getStaleActiveSharedEntities()).forEach((sharedEntityActiveInfo) => {
|
|
113
116
|
const notificationMessage = `Active share ${sharedEntityActiveInfo.sharedEntity.Module} has a new Revision: ${sharedEntityActiveInfo.sharedEntity.Revision}`;
|
|
114
117
|
if (updateNotification === 'Alert' || updateNotification === 'AlertWithNotification') {
|
|
115
|
-
this.
|
|
118
|
+
this.adaptableApi.alertApi.showAlert('TeamSharing', notificationMessage, 'Info', {
|
|
116
119
|
DisplayNotification: updateNotification === 'AlertWithNotification',
|
|
117
120
|
});
|
|
118
121
|
}
|
|
119
122
|
if (updateNotification === 'SystemStatus') {
|
|
120
|
-
this.
|
|
123
|
+
this.adaptableApi.systemStatusApi.setInfoSystemStatus(`TeamSharing: ${notificationMessage}`);
|
|
121
124
|
}
|
|
122
|
-
this.
|
|
125
|
+
this.adaptableApi.teamSharingApi.fireTeamSharingEntityChangedEvent(sharedEntityActiveInfo.sharedEntity);
|
|
123
126
|
});
|
|
124
127
|
}
|
|
125
128
|
destroy() {
|
|
@@ -174,7 +177,7 @@ class TeamSharingService {
|
|
|
174
177
|
return Array.from(result.values());
|
|
175
178
|
}
|
|
176
179
|
getTeamSharingReferences(adaptableObject, module) {
|
|
177
|
-
return this.
|
|
180
|
+
return this.adaptableApi.internalApi
|
|
178
181
|
.getModuleService()
|
|
179
182
|
.getModuleById(module)
|
|
180
183
|
.getTeamSharingReferences(adaptableObject);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
1
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
3
2
|
import { IValidationService } from './Interface/IValidationService';
|
|
4
3
|
import { AlertDefinition } from '../../PredefinedConfig/AlertState';
|
|
4
|
+
import { AdaptableApi } from '../../../types';
|
|
5
5
|
export declare class ValidationService implements IValidationService {
|
|
6
|
-
private
|
|
7
|
-
constructor(
|
|
6
|
+
private adaptableApi;
|
|
7
|
+
constructor(adaptableApi: AdaptableApi);
|
|
8
8
|
getValidationRulesForDataChange(cellDataChangedInfo: CellDataChangedInfo): AlertDefinition[];
|
|
9
9
|
performValidation(cellDataChangedInfo: CellDataChangedInfo): boolean;
|
|
10
10
|
private IsAlertDefinitionTriggered;
|
|
@@ -6,9 +6,9 @@ const ArrayExtensions_1 = require("../Extensions/ArrayExtensions");
|
|
|
6
6
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
7
7
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
8
8
|
class ValidationService {
|
|
9
|
-
constructor(
|
|
10
|
-
this.
|
|
11
|
-
this.
|
|
9
|
+
constructor(adaptableApi) {
|
|
10
|
+
this.adaptableApi = adaptableApi;
|
|
11
|
+
this.adaptableApi = adaptableApi;
|
|
12
12
|
}
|
|
13
13
|
// Not sure where to put this: was in the Module but might be better here until I can work out a way of having an event with a callback...
|
|
14
14
|
getValidationRulesForDataChange(cellDataChangedInfo) {
|
|
@@ -16,15 +16,15 @@ class ValidationService {
|
|
|
16
16
|
if (cellDataChangedInfo.oldValue == cellDataChangedInfo.newValue) {
|
|
17
17
|
return [];
|
|
18
18
|
}
|
|
19
|
-
let editingRules = this.
|
|
19
|
+
let editingRules = this.adaptableApi.alertApi
|
|
20
20
|
.getAlertDefinitionsWithPreventEdit()
|
|
21
|
-
.filter((v) => this.
|
|
21
|
+
.filter((v) => this.adaptableApi.scopeApi.isColumnInScope(cellDataChangedInfo.column, v.Scope));
|
|
22
22
|
let failedValidations = [];
|
|
23
23
|
if (ArrayExtensions_1.ArrayExtensions.IsNotEmpty(editingRules)) {
|
|
24
24
|
editingRules.forEach((alertDefinition) => {
|
|
25
25
|
if (alertDefinition.Rule.BooleanExpression) {
|
|
26
26
|
let isSatisfiedExpression = cellDataChangedInfo.rowNode != null &&
|
|
27
|
-
this.
|
|
27
|
+
this.adaptableApi.internalApi
|
|
28
28
|
.getQueryLanguageService()
|
|
29
29
|
.evaluateBooleanExpression(alertDefinition.Rule.BooleanExpression, ModuleConstants_1.AlertModuleId, cellDataChangedInfo.rowNode);
|
|
30
30
|
if (isSatisfiedExpression) {
|
|
@@ -50,24 +50,25 @@ class ValidationService {
|
|
|
50
50
|
alertDefinition: failedRules[0],
|
|
51
51
|
cellDataChangedInfo: cellDataChangedInfo,
|
|
52
52
|
};
|
|
53
|
-
this.
|
|
53
|
+
this.adaptableApi.alertApi.publishAlertFiredEvent(alert);
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
return true;
|
|
57
57
|
}
|
|
58
58
|
IsAlertDefinitionTriggered(alertDefinition, dataChangedEvent) {
|
|
59
|
-
return this.
|
|
59
|
+
return this.adaptableApi.predicateApi.handlePredicate(alertDefinition.Rule.Predicate, {
|
|
60
60
|
value: dataChangedEvent.newValue,
|
|
61
61
|
oldValue: dataChangedEvent.oldValue,
|
|
62
|
-
displayValue: this.
|
|
62
|
+
displayValue: this.adaptableApi.gridApi.getDisplayValueFromRowNode(dataChangedEvent.rowNode, dataChangedEvent.column.columnId),
|
|
63
63
|
node: dataChangedEvent.rowNode,
|
|
64
64
|
column: dataChangedEvent.column,
|
|
65
65
|
}, false);
|
|
66
66
|
}
|
|
67
67
|
performServerValidation(cellDataChangedInfo, config) {
|
|
68
68
|
return () => {
|
|
69
|
-
this.
|
|
70
|
-
.
|
|
69
|
+
this.adaptableApi.internalApi
|
|
70
|
+
.getAdaptableOptions()
|
|
71
|
+
.editOptions.validateOnServer(cellDataChangedInfo)
|
|
71
72
|
.then((validationResult) => {
|
|
72
73
|
var _a, _b;
|
|
73
74
|
if (validationResult.NewValue === undefined) {
|
|
@@ -82,11 +83,12 @@ class ValidationService {
|
|
|
82
83
|
if (!row) {
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
|
-
row[(_b = this.
|
|
86
|
-
this.
|
|
86
|
+
row[(_b = this.adaptableApi.columnApi.getAgGridColumnFieldForAdaptableColumn(cellDataChangedInfo.column.columnId)) !== null && _b !== void 0 ? _b : cellDataChangedInfo.column.columnId] = validationResult.NewValue;
|
|
87
|
+
this.adaptableApi.gridApi.updateGridData([row]);
|
|
87
88
|
if (StringExtensions_1.default.IsNotNullOrEmpty(validationResult.ValidationMessage) &&
|
|
88
|
-
this.
|
|
89
|
-
|
|
89
|
+
this.adaptableApi.internalApi.getAdaptableOptions().editOptions
|
|
90
|
+
.displayServerValidationMessages) {
|
|
91
|
+
this.adaptableApi.alertApi.showAlertInfo('Server Validation Message', validationResult.ValidationMessage);
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
config.onServerValidationCompleted();
|
|
@@ -95,9 +97,9 @@ class ValidationService {
|
|
|
95
97
|
};
|
|
96
98
|
}
|
|
97
99
|
createValidationDescription(alertDefinition) {
|
|
98
|
-
return (this.
|
|
100
|
+
return (this.adaptableApi.scopeApi.getScopeDescription(alertDefinition.Scope) +
|
|
99
101
|
' ' +
|
|
100
|
-
this.
|
|
102
|
+
this.adaptableApi.predicateApi.predicateToString(alertDefinition.Rule.Predicate));
|
|
101
103
|
}
|
|
102
104
|
createValidationMessage(alertDefinition) {
|
|
103
105
|
let returnMessage = this.createValidationDescription(alertDefinition);
|
|
@@ -12,10 +12,10 @@ const AdaptablePopupConfirmation_1 = require("./Components/Popups/AdaptablePopup
|
|
|
12
12
|
const AdaptableLoadingScreen_1 = require("./Components/Popups/AdaptableLoadingScreen");
|
|
13
13
|
const renderWithAdaptableContext_1 = require("./renderWithAdaptableContext");
|
|
14
14
|
const License_1 = require("./License");
|
|
15
|
-
const ExportCustomDestinationFormPopups_1 = require("./Export/ExportCustomDestinationFormPopups");
|
|
16
15
|
const ProgressIndicator_1 = require("../components/ProgressIndicator/ProgressIndicator");
|
|
17
16
|
const react_toastify_1 = require("react-toastify");
|
|
18
17
|
const WindowPopups_1 = require("./Components/Popups/WindowPopups/WindowPopups");
|
|
18
|
+
const FormPopups_1 = require("./Components/Popups/FormPopups/FormPopups");
|
|
19
19
|
class AdaptableView extends React.Component {
|
|
20
20
|
render() {
|
|
21
21
|
var _a, _b, _c, _d;
|
|
@@ -26,11 +26,11 @@ class AdaptableView extends React.Component {
|
|
|
26
26
|
this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
|
|
27
27
|
React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi }),
|
|
28
28
|
Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
|
|
29
|
-
React.createElement(ExportCustomDestinationFormPopups_1.ExportCustomDestinationFormPopups, { api: this.props.AdaptableApi }),
|
|
30
29
|
React.createElement(react_toastify_1.ToastContainer, { limit: this.props.AdaptableApi.internalApi.getAdaptableOptions().notificationsOptions
|
|
31
30
|
.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
|
|
32
31
|
(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
32
|
React.createElement(WindowPopups_1.WindowPopups, null),
|
|
33
|
+
React.createElement(FormPopups_1.FormPopups, null),
|
|
34
34
|
React.createElement(ProgressIndicator_1.ProgressIndicator, null)));
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -9,6 +9,39 @@ const CheckBox_1 = require("../../../components/CheckBox");
|
|
|
9
9
|
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
10
10
|
const rebass_1 = require("rebass");
|
|
11
11
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
12
|
+
const StyleComponent_1 = require("../../Components/StyleComponent");
|
|
13
|
+
const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
|
|
14
|
+
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
15
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
16
|
+
const StylePreview_1 = require("../../../components/StylePreview");
|
|
17
|
+
const HighlightStyle = (props) => {
|
|
18
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
|
+
const options = [
|
|
20
|
+
{
|
|
21
|
+
label: 'Use Message Type',
|
|
22
|
+
onClick: () => {
|
|
23
|
+
props.onChange(true);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: 'Custom Style',
|
|
28
|
+
onClick: () => {
|
|
29
|
+
const initialStyle = ObjectFactory_1.default.CreateEmptyStyle();
|
|
30
|
+
props.onChange(initialStyle);
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
return (React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement(rebass_1.Flex, null,
|
|
36
|
+
React.createElement(CheckBox_1.CheckBox, { mr: 2, style: { alignItems: 'flex-start' }, checked: Boolean(props.highlight), onChange: (checked) => {
|
|
37
|
+
props.onChange(checked);
|
|
38
|
+
} }, props.label),
|
|
39
|
+
Boolean(props.highlight) && (React.createElement(DropdownButton_1.default, { items: options }, typeof props.highlight === 'boolean' ? (React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "Use Message Type")) : (React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "Custom Style"))))),
|
|
40
|
+
typeof props.highlight === 'object' && (React.createElement(rebass_1.Box, { paddingLeft: 3 },
|
|
41
|
+
React.createElement(StyleComponent_1.StyleComponent, { headless: true, api: adaptable.api, Style: props.highlight, UpdateStyle: (style) => {
|
|
42
|
+
props.onChange(style);
|
|
43
|
+
} })))));
|
|
44
|
+
};
|
|
12
45
|
// both used in wizard and list view
|
|
13
46
|
exports.renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
14
47
|
const { AlertProperties = {} } = alert;
|
|
@@ -31,7 +64,15 @@ exports.renderAlertBehaviourSummary = (alert, api, allowWrap = false) => {
|
|
|
31
64
|
if (!values.length) {
|
|
32
65
|
values.push({ label: 'No behaviour selected', id: 'none' });
|
|
33
66
|
}
|
|
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) =>
|
|
67
|
+
return (React.createElement(ValueSelector_1.ValueOptionsTags, { allowWrap: allowWrap, options: values, value: values.map((v) => v.id), readOnly: true, toIdentifier: (x) => x.id, toLabel: (x) => {
|
|
68
|
+
if (x.id === 'highlightCell' && typeof AlertProperties.HighlightCell === 'object') {
|
|
69
|
+
return (React.createElement(StylePreview_1.StylePreview, { padding: 0, mt: 0, styleObject: AlertProperties.HighlightCell }, "Highlight Cell"));
|
|
70
|
+
}
|
|
71
|
+
if (x.id === 'highlightRow' && typeof AlertProperties.HighlightRow === 'object') {
|
|
72
|
+
return (React.createElement(StylePreview_1.StylePreview, { padding: 0, mt: 0, styleObject: AlertProperties.HighlightRow }, "Highlight Row"));
|
|
73
|
+
}
|
|
74
|
+
return React.createElement(React.Fragment, null, x.label);
|
|
75
|
+
} }));
|
|
35
76
|
};
|
|
36
77
|
exports.AlertBehaviourWizardSection = (props) => {
|
|
37
78
|
const { data, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
@@ -52,16 +93,12 @@ exports.AlertBehaviourWizardSection = (props) => {
|
|
|
52
93
|
} },
|
|
53
94
|
"Prevent Cell Edit",
|
|
54
95
|
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
|
|
55
|
-
cellChangedAlert && (React.createElement(
|
|
96
|
+
cellChangedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
|
|
56
97
|
onChange({ HighlightCell });
|
|
57
|
-
} },
|
|
58
|
-
|
|
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) => {
|
|
98
|
+
} })),
|
|
99
|
+
rowAddedAlert && (React.createElement(HighlightStyle, { highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
|
|
61
100
|
onChange({ HighlightRow });
|
|
62
|
-
} },
|
|
63
|
-
"Highlight Row",
|
|
64
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(using the Alert message type)"))),
|
|
101
|
+
} })),
|
|
65
102
|
cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
|
|
66
103
|
onChange({ JumpToCell });
|
|
67
104
|
} }, "Jump To Cell")),
|
|
@@ -78,7 +78,7 @@ exports.AlertWizard = (props) => {
|
|
|
78
78
|
};
|
|
79
79
|
if (alertDefinition.AlertForm && typeof alertDefinition.AlertForm !== 'string') {
|
|
80
80
|
const alertButtons = (_a = alertDefinition.AlertForm) === null || _a === void 0 ? void 0 : _a.Buttons;
|
|
81
|
-
alertButtons.forEach((alertButton) => {
|
|
81
|
+
alertButtons === null || alertButtons === void 0 ? void 0 : alertButtons.forEach((alertButton) => {
|
|
82
82
|
const alertAction = alertButton.Action;
|
|
83
83
|
if (Array.isArray(alertAction)) {
|
|
84
84
|
alertButton.Action = alertAction
|
|
@@ -89,29 +89,27 @@ exports.AlertWizard = (props) => {
|
|
|
89
89
|
alertButton.Action = mapValidButtonActions(alertAction);
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
delete alertDefinition.AlertProperties.JumpToCell;
|
|
114
|
-
}
|
|
92
|
+
}
|
|
93
|
+
// map Alert Properties(Behaviour)
|
|
94
|
+
if (isCellChangeAlert) {
|
|
95
|
+
alertDefinition.AlertProperties.HighlightCell = alertDefinition.AlertProperties.HighlightRow;
|
|
96
|
+
delete alertDefinition.AlertProperties.HighlightRow;
|
|
97
|
+
alertDefinition.AlertProperties.JumpToCell = alertDefinition.AlertProperties.JumpToRow;
|
|
98
|
+
delete alertDefinition.AlertProperties.JumpToRow;
|
|
99
|
+
}
|
|
100
|
+
if (isAddedRowChangeAlert) {
|
|
101
|
+
alertDefinition.AlertProperties.HighlightRow = alertDefinition.AlertProperties.HighlightCell;
|
|
102
|
+
delete alertDefinition.AlertProperties.HighlightCell;
|
|
103
|
+
alertDefinition.AlertProperties.JumpToRow = alertDefinition.AlertProperties.JumpToCell;
|
|
104
|
+
delete alertDefinition.AlertProperties.JumpToCell;
|
|
105
|
+
delete alertDefinition.AlertProperties.PreventEdit;
|
|
106
|
+
}
|
|
107
|
+
if (isRemovedRowChangeAlert) {
|
|
108
|
+
delete alertDefinition.AlertProperties.PreventEdit;
|
|
109
|
+
delete alertDefinition.AlertProperties.HighlightRow;
|
|
110
|
+
delete alertDefinition.AlertProperties.JumpToRow;
|
|
111
|
+
delete alertDefinition.AlertProperties.HighlightCell;
|
|
112
|
+
delete alertDefinition.AlertProperties.JumpToCell;
|
|
115
113
|
}
|
|
116
114
|
setAlertDefinition(alertDefinition);
|
|
117
115
|
};
|
|
@@ -90,15 +90,15 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
90
90
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
91
91
|
React.createElement(FormLayout_1.default, null,
|
|
92
92
|
React.createElement(FormLayout_1.FormRow, { label: "Id" },
|
|
93
|
-
React.createElement(Input_1.default, { value: data.ColumnId || '', width: 300, autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter an Id for the column", onChange: handleColumnIdChange })),
|
|
93
|
+
React.createElement(Input_1.default, { "data-name": "column-id", value: data.ColumnId || '', width: 300, autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter an Id for the column", onChange: handleColumnIdChange })),
|
|
94
94
|
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
95
|
-
React.createElement(Input_1.default, { autoFocus: inEdit, onFocus: () => {
|
|
95
|
+
React.createElement(Input_1.default, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
|
|
96
96
|
setColumnNameFocused(true);
|
|
97
97
|
}, onBlur: () => {
|
|
98
98
|
setColumnNameFocused(false);
|
|
99
99
|
}, value: ColumnNameFocused ? ColumnName || '' : ColumnName || ColumnId || '', width: 300, type: "text", placeholder: "Enter column name", onChange: handleColumnNameChange })),
|
|
100
100
|
React.createElement(FormLayout_1.FormRow, { label: "Type" },
|
|
101
|
-
React.createElement(DropdownButton_1.default, { style: {
|
|
101
|
+
React.createElement(DropdownButton_1.default, { "data-name": "column-type", style: {
|
|
102
102
|
width: '300px',
|
|
103
103
|
whiteSpace: 'normal',
|
|
104
104
|
overflow: 'hidden',
|
|
@@ -109,11 +109,11 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
109
109
|
onClick: () => handleDataTypeChange(item.value),
|
|
110
110
|
})) }, dataType ? dataType : 'Select Data Type')),
|
|
111
111
|
React.createElement(FormLayout_1.FormRow, { label: "Width" },
|
|
112
|
-
React.createElement(Input_1.default, { type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
112
|
+
React.createElement(Input_1.default, { "data-name": "column-width", type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
113
113
|
Width: Number(e.target.value),
|
|
114
114
|
}) })),
|
|
115
115
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
116
|
-
React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Tooltip")))))),
|
|
116
|
+
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Tooltip")))))),
|
|
117
117
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
118
118
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
119
119
|
};
|
|
@@ -17,7 +17,7 @@ const SuspendToggleButton_1 = require("../Buttons/SuspendToggleButton/SuspendTog
|
|
|
17
17
|
const ValueSelector_1 = require("../ValueSelector");
|
|
18
18
|
const ICON_SIZE = 26;
|
|
19
19
|
exports.AdaptableObjectListItem = (props) => {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
20
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
21
21
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
22
22
|
const dispatch = react_redux_1.useDispatch();
|
|
23
23
|
const [isEditWizardVisible, setIsEditWizardVisible] = React.useState(false);
|
|
@@ -56,8 +56,8 @@ exports.AdaptableObjectListItem = (props) => {
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
const isEditDisabled = !Boolean(EditWizard || viewOptions.onOpenEditPopup);
|
|
59
|
-
return (React.createElement(rebass_1.Flex, { as: "li", mb: 3, className: itemClassName },
|
|
60
|
-
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_g = props.data.items) === null || _g === void 0 ? void 0 :
|
|
59
|
+
return (React.createElement(rebass_1.Flex, { "data-name": "adaptable-object-list-item", "data-value": props.data.abObject.Uuid, as: "li", mb: 3, className: itemClassName },
|
|
60
|
+
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_j = (_h = (_g = props.data.items).filter) === null || _h === void 0 ? void 0 : _h.call(_g, Boolean)) === null || _j === void 0 ? void 0 : _j.map((tag, index) => {
|
|
61
61
|
var _a;
|
|
62
62
|
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${baseClassName}__row` },
|
|
63
63
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableForm, ButtonContext } from '../../../../../types';
|
|
3
|
+
export interface FormDialogProps {
|
|
4
|
+
id: string;
|
|
5
|
+
formProps: any;
|
|
6
|
+
prepareContext: (context: ButtonContext) => Promise<ButtonContext> | ButtonContext;
|
|
7
|
+
form: AdaptableForm<ButtonContext>;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormDialog: React.FunctionComponent<FormDialogProps>;
|
|
10
|
+
export declare const FormPopups: React.FunctionComponent;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FormPopups = exports.FormDialog = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_redux_1 = require("react-redux");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const AdaptableFormComponent_1 = require("../../../../components/AdaptableFormComponent");
|
|
9
|
+
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
10
|
+
const AdaptableForm_1 = require("../../../../PredefinedConfig/Common/AdaptableForm");
|
|
11
|
+
const PopupRedux_1 = require("../../../../Redux/ActionsReducers/PopupRedux");
|
|
12
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
|
+
exports.FormDialog = ({ id, formProps, form, prepareContext, }) => {
|
|
14
|
+
const dispatch = react_redux_1.useDispatch();
|
|
15
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
+
const [data, setData] = React.useState(() => {
|
|
17
|
+
return AdaptableForm_1.getDefaultAdaptableFormData(form);
|
|
18
|
+
});
|
|
19
|
+
const handleDismiss = () => {
|
|
20
|
+
dispatch(PopupRedux_1.PopupHideForm(id));
|
|
21
|
+
};
|
|
22
|
+
const context = Object.assign({ adaptableApi: adaptable.api, formData: data }, formProps);
|
|
23
|
+
return (React.createElement(Dialog_1.default, { isOpen: true, showCloseButton: false, style: { minHeight: 'auto', minWidth: 400 }, onDismiss: handleDismiss },
|
|
24
|
+
React.createElement(rebass_1.Box, { padding: 4 },
|
|
25
|
+
React.createElement(AdaptableFormComponent_1.AdaptableFormComponent, { formDef: form, data: data, context: context, onChange: setData, api: adaptable.api, displayTitle: true, onButtonClick: async (button) => {
|
|
26
|
+
var _a;
|
|
27
|
+
handleDismiss();
|
|
28
|
+
const preparedContext = typeof prepareContext === 'function' ? await prepareContext(context) : context;
|
|
29
|
+
(_a = button.onClick) === null || _a === void 0 ? void 0 : _a.call(button, button, preparedContext);
|
|
30
|
+
} }))));
|
|
31
|
+
};
|
|
32
|
+
exports.FormPopups = () => {
|
|
33
|
+
const forms = react_redux_1.useSelector((state) => state.Popup.FormPopup.FormList);
|
|
34
|
+
return (React.createElement(React.Fragment, null, forms.map((form) => {
|
|
35
|
+
return (React.createElement(exports.FormDialog, { key: form.Id, prepareContext: form.prepareContext, id: form.Id, formProps: form.FormProps, form: form.Form }));
|
|
36
|
+
})));
|
|
37
|
+
};
|
|
@@ -23,7 +23,7 @@ exports.WindowPopups = () => {
|
|
|
23
23
|
const Component = (_a = windowFactory_1.windowFactory[windowItem.Id]) !== null && _a !== void 0 ? _a : NoopComponent;
|
|
24
24
|
const _g = (_b = windowItem === null || windowItem === void 0 ? void 0 : windowItem.PopupProps) !== null && _b !== void 0 ? _b : {}, { windowModalProps } = _g, restPopupProps = tslib_1.__rest(_g, ["windowModalProps"]);
|
|
25
25
|
const handleDismiss = () => {
|
|
26
|
-
dispatch(PopupRedux_1.
|
|
26
|
+
dispatch(PopupRedux_1.PopupHideWindow(windowItem.Id));
|
|
27
27
|
};
|
|
28
28
|
const size = (_d = (_c = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _c === void 0 ? void 0 : _c.size) !== null && _d !== void 0 ? _d : Utilities_1.getWindowPopupSize();
|
|
29
29
|
const position = (_f = (_e = windowModalSettings === null || windowModalSettings === void 0 ? void 0 : windowModalSettings[windowItem.Id]) === null || _e === void 0 ? void 0 : _e.position) !== null && _f !== void 0 ? _f : Utilities_1.getMiddlePosition(size);
|
|
@@ -37,7 +37,7 @@ class ColumnSelector extends React.Component {
|
|
|
37
37
|
let currentColumnName = selectedColumnIds.length > 0
|
|
38
38
|
? (_a = this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])) === null || _a === void 0 ? void 0 : _a.friendlyName : 'Select a column';
|
|
39
39
|
return (React.createElement("div", { "data-name": 'column-selector' },
|
|
40
|
-
React.createElement(FormLayout_1.default, { columns: [
|
|
40
|
+
React.createElement(FormLayout_1.default, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
|
|
41
41
|
React.createElement(FormLayout_1.FormRow, null,
|
|
42
42
|
React.createElement(DropdownButton_1.default, { marginRight: 2, columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), style: { width: '100%', fontSize: 'small' }, className: "ab-DashboardToolbar__Layout__select", items: sortedColumnOptions, disabled: sortedColumnOptions.length == 0 }, currentColumnName)))));
|
|
43
43
|
}
|
|
@@ -53,9 +53,7 @@ class DataChangeHistoryPopupComponent extends React.Component {
|
|
|
53
53
|
this.props.api.dataChangeHistoryApi.undoDataChangeHistoryEntry(changeToBeUndone);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
const currentAgGridTheme = this.props.api.
|
|
57
|
-
.getAdaptableInstance()
|
|
58
|
-
.getAgGridCurrentThemeName();
|
|
56
|
+
const currentAgGridTheme = this.props.api.themeApi.getAgGridCurrentThemeName();
|
|
59
57
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
|
|
60
58
|
React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPopup", flexDirection: "column", style: { height: '100%' } },
|
|
61
59
|
React.createElement(rebass_1.Flex, { style: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
2
2
|
import { DataSource } from '../../PredefinedConfig/DataSourceState';
|
|
3
|
-
import * as DataSourceRedux from '../../Redux/ActionsReducers/DataSourceRedux';
|
|
4
3
|
import * as React from 'react';
|
|
4
|
+
import * as Redux from 'redux';
|
|
5
5
|
export interface DataSourceViewPanelComponentProps extends ViewPanelProps {
|
|
6
6
|
CurrentDataSourceName: string;
|
|
7
7
|
DataSources: DataSource[];
|
|
8
|
-
onSelectDataSource: (DataSource: DataSource) =>
|
|
8
|
+
onSelectDataSource: (DataSource: DataSource) => Redux.Action;
|
|
9
9
|
}
|
|
10
10
|
interface DataSourceViewPanelComponentState {
|
|
11
11
|
CurrentDataSource: DataSource;
|
|
@@ -15,5 +15,5 @@ declare class DataSourceViewPanelComponent extends React.Component<DataSourceVie
|
|
|
15
15
|
render(): JSX.Element;
|
|
16
16
|
onSelectedDataSourceChanged(dataSourceName: string): void;
|
|
17
17
|
}
|
|
18
|
-
export declare let DataSourceViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSourceViewPanelComponent,
|
|
18
|
+
export declare let DataSourceViewPanelControl: import("react-redux").ConnectedComponent<typeof DataSourceViewPanelComponent, Pick<React.ClassAttributes<DataSourceViewPanelComponent> & DataSourceViewPanelComponentProps, "ref" | "key">>;
|
|
19
19
|
export {};
|
|
@@ -8,6 +8,7 @@ const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions"
|
|
|
8
8
|
const rebass_1 = require("rebass");
|
|
9
9
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
|
|
10
10
|
const react_redux_1 = require("react-redux");
|
|
11
|
+
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
11
12
|
class DataSourceViewPanelComponent extends React.Component {
|
|
12
13
|
constructor(props) {
|
|
13
14
|
super(props);
|
|
@@ -22,11 +23,7 @@ class DataSourceViewPanelComponent extends React.Component {
|
|
|
22
23
|
let currentDataSourceName = this.state.CurrentDataSource == null
|
|
23
24
|
? selectDataSourceString
|
|
24
25
|
: this.state.CurrentDataSource.Name;
|
|
25
|
-
let availableDataSources = this.props.DataSources
|
|
26
|
-
// .filter(
|
|
27
|
-
// s => s.Name != currentDataSourceName
|
|
28
|
-
// )
|
|
29
|
-
.map((dataSource, index) => {
|
|
26
|
+
let availableDataSources = this.props.DataSources.map((dataSource) => {
|
|
30
27
|
return {
|
|
31
28
|
value: dataSource.Name,
|
|
32
29
|
label: dataSource.Name,
|
|
@@ -44,16 +41,11 @@ class DataSourceViewPanelComponent extends React.Component {
|
|
|
44
41
|
else {
|
|
45
42
|
let newDataSource = this.props.DataSources.find((ds) => ds.Name == dataSourceName);
|
|
46
43
|
this.setState({ CurrentDataSource: newDataSource });
|
|
47
|
-
|
|
48
|
-
alert('have params');
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.props.onSelectDataSource(newDataSource);
|
|
52
|
-
}
|
|
44
|
+
this.props.onSelectDataSource(newDataSource);
|
|
53
45
|
}
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
|
-
function mapStateToProps(state
|
|
48
|
+
function mapStateToProps(state) {
|
|
57
49
|
return {
|
|
58
50
|
CurrentDataSourceName: state.DataSource.CurrentDataSource,
|
|
59
51
|
DataSources: state.DataSource.DataSources,
|
|
@@ -61,7 +53,17 @@ function mapStateToProps(state, ownProps) {
|
|
|
61
53
|
}
|
|
62
54
|
function mapDispatchToProps(dispatch) {
|
|
63
55
|
return {
|
|
64
|
-
onSelectDataSource: (dataSource) =>
|
|
56
|
+
onSelectDataSource: (dataSource) => {
|
|
57
|
+
if (dataSource.Form) {
|
|
58
|
+
return dispatch(PopupRedux_1.PopupShowForm({
|
|
59
|
+
Id: 'data-source-form',
|
|
60
|
+
Form: dataSource.Form,
|
|
61
|
+
}));
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
return dispatch(DataSourceRedux.DataSourceSelect(dataSource));
|
|
65
|
+
}
|
|
66
|
+
},
|
|
65
67
|
};
|
|
66
68
|
}
|
|
67
69
|
exports.DataSourceViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(DataSourceViewPanelComponent);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
2
|
-
import {
|
|
2
|
+
import { Report, ReportSchedule } from '../../PredefinedConfig/ExportState';
|
|
3
3
|
import { ExportDestination } from '../../PredefinedConfig/Common/Enums';
|
|
4
4
|
import * as ExportRedux from '../../Redux/ActionsReducers/ExportRedux';
|
|
5
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
6
5
|
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
7
6
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
8
7
|
import * as React from 'react';
|
|
@@ -13,7 +12,6 @@ export interface ExportViewPanelComponentProps extends ViewPanelProps {
|
|
|
13
12
|
onNewReport: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
14
13
|
onEditReport: (popup: string) => PopupRedux.PopupShowScreenAction;
|
|
15
14
|
onNewReportSchedule: (reportSchedule: ReportSchedule) => PopupRedux.PopupShowScreenAction;
|
|
16
|
-
showCustomDestinationForm: (data: ExportCustomDestinationPopup) => SystemRedux.SystemExportCustomDestinationPopupShowAction;
|
|
17
15
|
Columns: AdaptableColumn[];
|
|
18
16
|
Reports: Report[] | undefined;
|
|
19
17
|
CurrentReport: string | undefined;
|