@adaptabletools/adaptable 11.1.3 → 11.1.4
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 +116 -116
- 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/SmartEdit.d.ts +34 -0
- package/src/AdaptableOptions/SmartEdit.js +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +1 -1
- package/src/Api/Implementation/FilterApiImpl.js +8 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +6 -8
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
- package/src/Api/SmartEditApi.d.ts +3 -2
- 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/Strategy/AlertModule.js +4 -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/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
- package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
- package/src/View/AdaptableView.js +2 -2
- 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/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/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/agGrid/Adaptable.d.ts +4 -4
- package/src/agGrid/Adaptable.js +25 -15
- package/src/metamodel/adaptable.metamodel.js +1 -1
- 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,16 +3,17 @@ import { SystemState } from '../../PredefinedConfig/SystemState';
|
|
|
3
3
|
import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
|
|
4
4
|
import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
|
|
5
5
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
6
|
-
import {
|
|
6
|
+
import { Report } from '../../PredefinedConfig/ExportState';
|
|
7
7
|
import { BulkUpdateValidationResult } from '../../Strategy/Interface/IBulkUpdateModule';
|
|
8
8
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
9
9
|
import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
|
|
10
10
|
import { SystemStatusMessageInfo } from '../../PredefinedConfig/Common/SystemStatusMessageInfo';
|
|
11
11
|
import { CachedQuery } from '../../PredefinedConfig/QueryState';
|
|
12
12
|
import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
|
|
13
|
-
import {
|
|
13
|
+
import { SummaryOperation } from '../../PredefinedConfig/Common/Enums';
|
|
14
14
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
15
15
|
import { RowsHighlightInfo } from '../../PredefinedConfig/Common/RowsHighlightInfo';
|
|
16
|
+
import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
|
|
16
17
|
export declare const FLASHING_CELL_ROW_KEY = "__ROW";
|
|
17
18
|
export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
|
|
18
19
|
export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
|
|
@@ -46,14 +47,6 @@ export declare const SYSTEM_SET_NEW_COLUMN_LIST_ORDER = "SYSTEM_SET_NEW_COLUMN_L
|
|
|
46
47
|
export declare const SYSTEM_SET_LAST_APPLIED_SHORTCUT = "SYSTEM_SET_LAST_APPLIED_SHORTCUT";
|
|
47
48
|
export declare const SYSTEM_CACHED_QUERY_ADD = "SYSTEM_CACHED_QUERY_ADD";
|
|
48
49
|
export declare const SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = "SYSTEM_CELL_SUMMARY_CHANGE_OPERATION";
|
|
49
|
-
/**
|
|
50
|
-
* @ReduxAction A report Destination pop-up from is opened
|
|
51
|
-
*/
|
|
52
|
-
export declare const SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = "SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW";
|
|
53
|
-
/**
|
|
54
|
-
* @ReduxAction A report Destination pop-up form is closed
|
|
55
|
-
*/
|
|
56
|
-
export declare const SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = "SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE";
|
|
57
50
|
export declare const SYSTEM_PROGRESS_INDICATOR_SHOW = "SYSTEM_PROGRESS_INDICATOR_SHOW";
|
|
58
51
|
export declare const SYSTEM_PROGRESS_INDICATOR_HIDE = "SYSTEM_PROGRESS_INDICATOR_HIDE";
|
|
59
52
|
export declare const SYSTEM_LICENSE_SHOW_WATERMARK = "SYSTEM_LICENSE_SHOW_WATERMARK";
|
|
@@ -136,7 +129,7 @@ export interface SmartEditChangeValueAction extends Redux.Action {
|
|
|
136
129
|
value: number;
|
|
137
130
|
}
|
|
138
131
|
export interface SmartEditChangeOperationAction extends Redux.Action {
|
|
139
|
-
smartEditOperation:
|
|
132
|
+
smartEditOperation: SmartEditOperation;
|
|
140
133
|
}
|
|
141
134
|
export interface SmartEditCheckCellSelectionAction extends Redux.Action {
|
|
142
135
|
}
|
|
@@ -204,12 +197,6 @@ export interface SystemDataChangeHistorySuspendAction extends Redux.Action {
|
|
|
204
197
|
}
|
|
205
198
|
export interface SystemDataChangeHistoryResumeAction extends Redux.Action {
|
|
206
199
|
}
|
|
207
|
-
export interface SystemExportCustomDestinationPopupShowAction extends Redux.Action {
|
|
208
|
-
data: ExportCustomDestinationPopup;
|
|
209
|
-
}
|
|
210
|
-
export interface SystemExportCustomDestinationPopupHideAction extends Redux.Action {
|
|
211
|
-
data: ExportCustomDestinationPopup;
|
|
212
|
-
}
|
|
213
200
|
export interface SystemSettingsPanelSetAction extends Redux.Action {
|
|
214
201
|
name: string;
|
|
215
202
|
settings: SystemState['SettingsPanel']['0'];
|
|
@@ -233,7 +220,7 @@ export declare const SystemStatusMessageInfoAdd: (SystemStatusMessageInfo: Syste
|
|
|
233
220
|
export declare const SystemStatusMessageInfoDelete: (SystemStatusMessageInfo: SystemStatusMessageInfo) => SystemStatusMessageInfoDeleteAction;
|
|
234
221
|
export declare const SystemStatusMessageInfoDeleteAll: () => SystemStatusMessageInfoDeleteAllAction;
|
|
235
222
|
export declare const SmartEditChangeValue: (value: number) => SmartEditChangeValueAction;
|
|
236
|
-
export declare const SmartEditChangeOperation: (smartEditOperation:
|
|
223
|
+
export declare const SmartEditChangeOperation: (smartEditOperation: SmartEditOperation) => SmartEditChangeOperationAction;
|
|
237
224
|
export declare const SmartEditCheckCellSelection: () => SmartEditCheckCellSelectionAction;
|
|
238
225
|
export declare const SmartEditSetValidSelection: (IsValidSmartEditSelection: boolean) => SmartEditSetValidSelectionAction;
|
|
239
226
|
export declare const SmartEditSetPreview: (SmartEditPreviewInfo: PreviewInfo) => SmartEditSetPreviewAction;
|
|
@@ -255,10 +242,5 @@ export declare const SystemDataChangeHistoryEnable: () => SystemDataChangeHistor
|
|
|
255
242
|
export declare const SystemDataChangeHistoryDisable: () => SystemDataChangeHistoryDisableAction;
|
|
256
243
|
export declare const SystemDataChangeHistorySuspend: () => SystemDataChangeHistorySuspendAction;
|
|
257
244
|
export declare const SystemDataChangeHistoryResume: () => SystemDataChangeHistoryResumeAction;
|
|
258
|
-
export declare const SystemExportCustomDestinationPopupShow: (data: ExportCustomDestinationPopup) => SystemExportCustomDestinationPopupShowAction;
|
|
259
|
-
export declare const SystemExportCustomDestinationPopupHide: (data: ExportCustomDestinationPopup) => SystemExportCustomDestinationPopupHideAction;
|
|
260
245
|
export declare const SystemSettingsPanelSet: (name: string, settings: SystemState['SettingsPanel']['0']) => SystemSettingsPanelSetAction;
|
|
261
|
-
export declare const getSystemExportCustomDestinationPopups: (state: {
|
|
262
|
-
System: SystemState;
|
|
263
|
-
}) => ExportCustomDestinationPopup[];
|
|
264
246
|
export declare const SystemReducer: Redux.Reducer<SystemState>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SystemReducer = exports.
|
|
3
|
+
exports.SystemReducer = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
|
|
4
4
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
5
|
+
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
5
6
|
const Helper_1 = require("../../Utilities/Helpers/Helper");
|
|
6
7
|
/*
|
|
7
8
|
Bit of a mixed bag of actions but essentially its those that are related to Strategies but where we DONT want to persist state
|
|
@@ -52,14 +53,6 @@ exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = 'SYSTEM_SET_LAST_APPLIED_SHORTCUT';
|
|
|
52
53
|
exports.SYSTEM_CACHED_QUERY_ADD = 'SYSTEM_CACHED_QUERY_ADD';
|
|
53
54
|
// Cell Summary
|
|
54
55
|
exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = 'SYSTEM_CELL_SUMMARY_CHANGE_OPERATION';
|
|
55
|
-
/**
|
|
56
|
-
* @ReduxAction A report Destination pop-up from is opened
|
|
57
|
-
*/
|
|
58
|
-
exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = 'SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW';
|
|
59
|
-
/**
|
|
60
|
-
* @ReduxAction A report Destination pop-up form is closed
|
|
61
|
-
*/
|
|
62
|
-
exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = 'SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE';
|
|
63
56
|
// Progress Indicator
|
|
64
57
|
exports.SYSTEM_PROGRESS_INDICATOR_SHOW = 'SYSTEM_PROGRESS_INDICATOR_SHOW';
|
|
65
58
|
exports.SYSTEM_PROGRESS_INDICATOR_HIDE = 'SYSTEM_PROGRESS_INDICATOR_HIDE';
|
|
@@ -230,25 +223,13 @@ exports.SystemDataChangeHistorySuspend = () => ({
|
|
|
230
223
|
exports.SystemDataChangeHistoryResume = () => ({
|
|
231
224
|
type: exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME,
|
|
232
225
|
});
|
|
233
|
-
exports.SystemExportCustomDestinationPopupShow = (data) => ({
|
|
234
|
-
type: exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW,
|
|
235
|
-
data,
|
|
236
|
-
});
|
|
237
|
-
exports.SystemExportCustomDestinationPopupHide = (data) => ({
|
|
238
|
-
type: exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE,
|
|
239
|
-
data,
|
|
240
|
-
});
|
|
241
226
|
exports.SystemSettingsPanelSet = (name, settings) => ({
|
|
242
227
|
type: exports.SYSTEM_SETTINGS_PANEL_SET,
|
|
243
228
|
name,
|
|
244
229
|
settings,
|
|
245
230
|
});
|
|
246
|
-
exports.getSystemExportCustomDestinationPopups = (state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.System.Export.CustomDestinationPopups) !== null && _a !== void 0 ? _a : []; };
|
|
247
231
|
const initialState = {
|
|
248
232
|
AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
|
|
249
|
-
Export: {
|
|
250
|
-
CustomDestinationPopups: GeneralConstants_1.EMPTY_ARRAY,
|
|
251
|
-
},
|
|
252
233
|
AdaptableFlashingCells: {},
|
|
253
234
|
AdaptableFlashingCellsMap: {},
|
|
254
235
|
SystemStatusMessages: GeneralConstants_1.EMPTY_ARRAY,
|
|
@@ -264,7 +245,7 @@ const initialState = {
|
|
|
264
245
|
CachedQueries: GeneralConstants_1.EMPTY_ARRAY,
|
|
265
246
|
BulkUpdateValue: GeneralConstants_1.EMPTY_STRING,
|
|
266
247
|
SmartEditValue: 1,
|
|
267
|
-
SmartEditOperation:
|
|
248
|
+
SmartEditOperation: Enums_1.MathOperation.Multiply,
|
|
268
249
|
CellSummaryOperation: GeneralConstants_1.CELL_SUMMARY_DEFAULT_OPERATION,
|
|
269
250
|
ProgressIndicator: { active: false, label: '' },
|
|
270
251
|
License: {
|
|
@@ -280,7 +261,6 @@ const initialState = {
|
|
|
280
261
|
SettingsPanel: {},
|
|
281
262
|
};
|
|
282
263
|
exports.SystemReducer = (state = initialState, action) => {
|
|
283
|
-
var _a;
|
|
284
264
|
let alerts;
|
|
285
265
|
let systemStatusMessages;
|
|
286
266
|
switch (action.type) {
|
|
@@ -519,15 +499,6 @@ exports.SystemReducer = (state = initialState, action) => {
|
|
|
519
499
|
case exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE: {
|
|
520
500
|
return Object.assign(Object.assign({}, state), { License: Object.assign(Object.assign({}, state.License), { disablePersistence: true }) });
|
|
521
501
|
}
|
|
522
|
-
// this allows multiple export forms to be open at the same time
|
|
523
|
-
// you may have scheduled multiple exports at the same time
|
|
524
|
-
case exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW:
|
|
525
|
-
return Object.assign(Object.assign({}, state), { Export: Object.assign(Object.assign({}, state.Export), { CustomDestinationPopups: [
|
|
526
|
-
...(state.Export.CustomDestinationPopups || []),
|
|
527
|
-
action.data,
|
|
528
|
-
] }) });
|
|
529
|
-
case exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE:
|
|
530
|
-
return Object.assign(Object.assign({}, state), { Export: Object.assign(Object.assign({}, state.Export), { CustomDestinationPopups: (_a = state.Export.CustomDestinationPopups) === null || _a === void 0 ? void 0 : _a.filter((data) => data !== action.data) }) });
|
|
531
502
|
case exports.SYSTEM_DATA_CHANGE_HISTORY_ADD: {
|
|
532
503
|
const actionTypedAdd = action;
|
|
533
504
|
const cellDataChangedInfo = actionTypedAdd.changeInfo;
|
|
@@ -141,10 +141,13 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
141
141
|
const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
|
|
142
142
|
const actionName = rowAdded ? 'Added' : 'Removed';
|
|
143
143
|
const alertHeader = numberOfChangedRows > 1 ? `${actionName} Rows` : `${actionName} Row `;
|
|
144
|
-
const
|
|
144
|
+
const dynamicAlertMessage = numberOfChangedRows > 1
|
|
145
145
|
? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
|
|
146
146
|
: `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
|
|
147
147
|
alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
|
|
148
|
+
const alertMessage = alertDefinition.MessageText
|
|
149
|
+
? alertDefinition.MessageText
|
|
150
|
+
: dynamicAlertMessage;
|
|
148
151
|
const alert = ObjectFactory_1.default.CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
|
|
149
152
|
this.api.alertApi.displayAlert(alert);
|
|
150
153
|
});
|
|
@@ -7,7 +7,6 @@ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/Mod
|
|
|
7
7
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
8
8
|
const Helper_1 = require("../Utilities/Helpers/Helper");
|
|
9
9
|
const ExportRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/ExportRedux"));
|
|
10
|
-
const SystemRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/SystemRedux"));
|
|
11
10
|
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
12
11
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
|
|
13
12
|
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
@@ -89,9 +88,20 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
89
88
|
.getAdaptableOptions()
|
|
90
89
|
.exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
|
|
91
90
|
if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
|
|
92
|
-
this.api.internalApi.dispatchReduxAction(
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
this.api.internalApi.dispatchReduxAction(PopupRedux.PopupShowForm({
|
|
92
|
+
Id: 'export-destination-form',
|
|
93
|
+
Form: customDestination === null || customDestination === void 0 ? void 0 : customDestination.form,
|
|
94
|
+
prepareContext: (context) => {
|
|
95
|
+
// we want to give the current popup time to close
|
|
96
|
+
// and we reopen with a delay in case this button action causes another popup
|
|
97
|
+
return new Promise((resolve) => {
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
const preparedContext = Object.assign(Object.assign({}, context), { report,
|
|
100
|
+
customDestination, reportData: this.api.internalApi.getReportService().getReportData(report) });
|
|
101
|
+
resolve(preparedContext);
|
|
102
|
+
}, 20);
|
|
103
|
+
});
|
|
104
|
+
},
|
|
95
105
|
}));
|
|
96
106
|
}
|
|
97
107
|
else if (customDestination) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AdaptableModuleBase } from './AdaptableModuleBase';
|
|
2
|
-
import { MathOperation } from '../PredefinedConfig/Common/Enums';
|
|
3
2
|
import { IModuleActionReturn } from './Interface/IModuleActionReturn';
|
|
4
3
|
import { ISmartEditModule } from './Interface/ISmartEditModule';
|
|
5
4
|
import { PreviewInfo } from '../Utilities/Interface/Preview';
|
|
@@ -7,11 +6,12 @@ import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
|
7
6
|
import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
|
|
8
7
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
9
8
|
import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
|
|
9
|
+
import { SmartEditOperation } from '../AdaptableOptions/SmartEdit';
|
|
10
10
|
export declare class SmartEditModule extends AdaptableModuleBase implements ISmartEditModule {
|
|
11
11
|
constructor(api: AdaptableApi);
|
|
12
12
|
getViewAccessLevel(): AccessLevel;
|
|
13
13
|
addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
|
|
14
14
|
ApplySmartEdit(newValues: GridCell[]): void;
|
|
15
15
|
CheckCorrectCellSelection(): IModuleActionReturn<boolean>;
|
|
16
|
-
BuildPreviewValues(smartEditValue: number, smartEditOperation:
|
|
16
|
+
BuildPreviewValues(smartEditValue: number, smartEditOperation: SmartEditOperation): PreviewInfo;
|
|
17
17
|
}
|
|
@@ -122,19 +122,30 @@ class SmartEditModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
122
122
|
if (column) {
|
|
123
123
|
selectedCellInfo.gridCells.forEach((selectedCell) => {
|
|
124
124
|
let newValue;
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
125
|
+
if (typeof smartEditOperation === 'object') {
|
|
126
|
+
newValue = smartEditOperation.Operation({
|
|
127
|
+
smartEditValue,
|
|
128
|
+
column,
|
|
129
|
+
adaptableApi: this.api,
|
|
130
|
+
selectedCell,
|
|
131
|
+
value: selectedCell.rawValue,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
switch (smartEditOperation) {
|
|
136
|
+
case Enums_1.MathOperation.Add:
|
|
137
|
+
newValue = Number(selectedCell.rawValue) + smartEditValue;
|
|
138
|
+
break;
|
|
139
|
+
case Enums_1.MathOperation.Subtract:
|
|
140
|
+
newValue = Number(selectedCell.rawValue) - smartEditValue;
|
|
141
|
+
break;
|
|
142
|
+
case Enums_1.MathOperation.Multiply:
|
|
143
|
+
newValue = Number(selectedCell.rawValue) * smartEditValue;
|
|
144
|
+
break;
|
|
145
|
+
case Enums_1.MathOperation.Divide:
|
|
146
|
+
newValue = Number(selectedCell.rawValue) / smartEditValue;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
138
149
|
}
|
|
139
150
|
//avoid the 0.0000000000x
|
|
140
151
|
if (newValue) {
|
|
@@ -226,8 +226,10 @@ exports.booleanExpressionFunctions = {
|
|
|
226
226
|
var _a;
|
|
227
227
|
const searchTerm = expressionFunctionUtils_1.getStringValue(context, String(args[0]));
|
|
228
228
|
return (_a = context.api) === null || _a === void 0 ? void 0 : _a.columnApi.getColumns().some((column) => {
|
|
229
|
-
var _a;
|
|
230
|
-
const value =
|
|
229
|
+
var _a, _b;
|
|
230
|
+
const value = column.dataType === 'Date'
|
|
231
|
+
? // for Date columns use the display value, as we do a textual comparison
|
|
232
|
+
(_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getDisplayValueFromRowNode(context.node, column.columnId) : (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
|
|
231
233
|
const columnValue = expressionFunctionUtils_1.getStringValue(context, String(value));
|
|
232
234
|
return columnValue.indexOf(searchTerm) !== -1;
|
|
233
235
|
});
|
|
@@ -93,9 +93,6 @@ exports.scalarExpressionFunctions = {
|
|
|
93
93
|
if (!column.queryable) {
|
|
94
94
|
throw new ExpressionEvaluationError_1.ExpressionEvaluationError('COL', `Column name "${columnId}" is not queryable`);
|
|
95
95
|
}
|
|
96
|
-
// return context.api?.gridApi.getNormalisedValueFromRowNode(context.node, columnId);
|
|
97
|
-
// const gridCell = context.api?.gridApi.getGridCellFromRowNode(context.node, columnId);
|
|
98
|
-
// return gridCell.rawValue;
|
|
99
96
|
return (_b = context.api) === null || _b === void 0 ? void 0 : _b.gridApi.getRawValueFromRowNode(context.node, columnId);
|
|
100
97
|
},
|
|
101
98
|
description: 'Returns the value of a column',
|
|
@@ -3,6 +3,7 @@ import { ModuleParams } from '../../View/Components/SharedProps/ModuleViewPopupP
|
|
|
3
3
|
import { AdaptableModule } from '../../PredefinedConfig/Common/Types';
|
|
4
4
|
import { AdaptableMessageType } from '../../PredefinedConfig/Common/AdaptableMessageType';
|
|
5
5
|
import { AdaptableAlert } from '../../PredefinedConfig/Common/AdaptableAlert';
|
|
6
|
+
import { AdaptableForm, ButtonContext } from '../../types';
|
|
6
7
|
export interface UIConfirmation {
|
|
7
8
|
Header: string;
|
|
8
9
|
Msg: string;
|
|
@@ -71,3 +72,14 @@ export interface WindowPopup {
|
|
|
71
72
|
Icon?: string;
|
|
72
73
|
}[];
|
|
73
74
|
}
|
|
75
|
+
export interface FormPopup {
|
|
76
|
+
FormList: {
|
|
77
|
+
Id: string;
|
|
78
|
+
FormProps: any;
|
|
79
|
+
/**
|
|
80
|
+
* Allows to customise the context before submitting the form
|
|
81
|
+
*/
|
|
82
|
+
prepareContext?: (context: ButtonContext) => Promise<ButtonContext> | ButtonContext;
|
|
83
|
+
Form: AdaptableForm<ButtonContext>;
|
|
84
|
+
}[];
|
|
85
|
+
}
|
|
@@ -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
|
}
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -4,7 +4,6 @@ exports.ExportViewPanelControl = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Enums_1 = require("../../PredefinedConfig/Common/Enums");
|
|
6
6
|
const ExportRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/ExportRedux"));
|
|
7
|
-
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
8
7
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
9
8
|
const React = tslib_1.__importStar(require("react"));
|
|
10
9
|
const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
|
|
@@ -74,22 +73,8 @@ class ExportViewPanelComponent extends React.Component {
|
|
|
74
73
|
if (currentReport != null) {
|
|
75
74
|
deleteMessage = deleteMessage + currentReport.Name + "'?";
|
|
76
75
|
}
|
|
77
|
-
const getCurrentCustomDestination = () => {
|
|
78
|
-
return this.isCustomDestination(currentDestination) ? currentDestination : undefined;
|
|
79
|
-
};
|
|
80
76
|
const onApplyExport = () => {
|
|
81
|
-
|
|
82
|
-
if (currentCustomDestination === null || currentCustomDestination === void 0 ? void 0 : currentCustomDestination.form) {
|
|
83
|
-
this.props.showCustomDestinationForm({
|
|
84
|
-
ExportDestination: currentCustomDestination,
|
|
85
|
-
ReportName: this.props.CurrentReport,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.props.onApplyExport(currentReport, this.isCustomDestination(currentDestination)
|
|
90
|
-
? currentDestination.name
|
|
91
|
-
: currentDestination);
|
|
92
|
-
}
|
|
77
|
+
this.props.onApplyExport(currentReport, this.isCustomDestination(currentDestination) ? currentDestination.name : currentDestination);
|
|
93
78
|
};
|
|
94
79
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
95
80
|
return (React.createElement(rebass_1.Flex, { style: { gap: 5 }, flexDirection: "row", className: `ab-${elementType}__Export__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
@@ -153,7 +138,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
153
138
|
source: 'Toolbar',
|
|
154
139
|
value: reportSchedule,
|
|
155
140
|
})),
|
|
156
|
-
showCustomDestinationForm: (data) => dispatch(SystemRedux.SystemExportCustomDestinationPopupShow(data)),
|
|
157
141
|
};
|
|
158
142
|
}
|
|
159
143
|
exports.ExportViewPanelControl = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(ExportViewPanelComponent);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SmartEditRedux from '../../Redux/ActionsReducers/SmartEditRedux';
|
|
3
3
|
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
4
|
-
import { MathOperation } from '../../PredefinedConfig/Common/Enums';
|
|
5
4
|
import { ModuleViewPopupProps } from '../Components/SharedProps/ModuleViewPopupProps';
|
|
6
5
|
import { PreviewInfo } from '../../Utilities/Interface/Preview';
|
|
6
|
+
import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
|
|
7
7
|
interface SmartEditPopupProps extends ModuleViewPopupProps<SmartEditPopupComponent> {
|
|
8
8
|
SmartEditValue: number;
|
|
9
|
-
|
|
9
|
+
SmartEditOperation: SmartEditOperation;
|
|
10
10
|
PreviewInfo: PreviewInfo;
|
|
11
11
|
onSmartEditValueChange: (value: number) => SystemRedux.SmartEditChangeValueAction;
|
|
12
|
-
onSmartEditOperationChange: (
|
|
12
|
+
onSmartEditOperationChange: (SmartEditOperation: SmartEditOperation) => SystemRedux.SmartEditChangeOperationAction;
|
|
13
13
|
onSmartEditCheckSelectedCells: () => SystemRedux.SmartEditCheckCellSelectionAction;
|
|
14
14
|
onRunSmartEdit: () => SmartEditRedux.SmartEditRunAction;
|
|
15
15
|
}
|