@adaptabletools/adaptable 11.1.2 → 11.1.5
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 +120 -120
- 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/ContainerOptions.d.ts +1 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +4 -0
- package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
- 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/InternalApiImpl.d.ts +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +9 -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/SmartEditApi.d.ts +3 -2
- package/src/Api/ThemeApi.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/Strategy/AlertModule.js +29 -9
- 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/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/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/GridInfo/AdaptableObjectsSummary.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +4 -4
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -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 +5 -4
- package/src/agGrid/Adaptable.js +56 -49
- package/src/components/StylePreview.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +5 -0
- package/src/metamodel/adaptable.metamodel.js +16 -5
- package/src/types.d.ts +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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PopupReducer = exports.PopupClearParam = exports.PopupCancelConfirmation = exports.PopupConfirmConfirmation = exports.PopupShowConfirmation = exports.PopupConfirmPrompt = exports.PopupHidePrompt = exports.PopupShowPrompt = exports.PopupHideLoading = exports.PopupShowLoading = exports.PopupHideAlert = exports.PopupShowAlert = exports.
|
|
3
|
+
exports.PopupReducer = exports.PopupClearParam = exports.PopupCancelConfirmation = exports.PopupConfirmConfirmation = exports.PopupShowConfirmation = exports.PopupConfirmPrompt = exports.PopupHidePrompt = exports.PopupShowPrompt = exports.PopupHideLoading = exports.PopupShowLoading = exports.PopupHideAlert = exports.PopupShowAlert = exports.PopupHideForm = exports.PopupShowForm = exports.PopupHideWindow = exports.PopupShowWindow = exports.PopupHideScreen = exports.PopupShowScreen = exports.POPUP_HIDE_FORM = exports.POPUP_SHOW_FORM = exports.POPUP_HIDE_WINDOW = exports.POPUP_SHOW_WINDOW = exports.POPUP_CLEAR_PARAM = exports.POPUP_CANCEL_CONFIRMATION = exports.POPUP_CONFIRM_CONFIRMATION = exports.POPUP_SHOW_CONFIRMATION = exports.POPUP_CONFIRM_PROMPT = exports.POPUP_HIDE_PROMPT = exports.POPUP_SHOW_PROMPT = exports.POPUP_HIDE_ALERT = exports.POPUP_SHOW_ALERT = exports.POPUP_HIDE_LOADING = exports.POPUP_SHOW_LOADING = exports.POPUP_HIDE_SCREEN = exports.POPUP_SHOW_SCREEN = void 0;
|
|
4
4
|
exports.POPUP_SHOW_SCREEN = 'POPUP_SHOW_SCREEN';
|
|
5
5
|
exports.POPUP_HIDE_SCREEN = 'POPUP_HIDE_SCREEN';
|
|
6
6
|
exports.POPUP_SHOW_LOADING = 'POPUP_SHOW_LOADING';
|
|
@@ -14,8 +14,10 @@ exports.POPUP_SHOW_CONFIRMATION = 'POPUP_SHOW_CONFIRMATION';
|
|
|
14
14
|
exports.POPUP_CONFIRM_CONFIRMATION = 'POPUP_CONFIRM_CONFIRMATION';
|
|
15
15
|
exports.POPUP_CANCEL_CONFIRMATION = 'POPUP_CANCEL_CONFIRMATION';
|
|
16
16
|
exports.POPUP_CLEAR_PARAM = 'POPUP_CLEAR_PARAM';
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
17
|
+
exports.POPUP_SHOW_WINDOW = 'POPUP_SHOW_WINDOW';
|
|
18
|
+
exports.POPUP_HIDE_WINDOW = 'POPUP_HIDE_WINDOW';
|
|
19
|
+
exports.POPUP_SHOW_FORM = 'POPUP_SHOW_FORM';
|
|
20
|
+
exports.POPUP_HIDE_FORM = 'POPUP_FORM_HIDE';
|
|
19
21
|
exports.PopupShowScreen = (componentModule, componentName, params, popupProps) => ({
|
|
20
22
|
type: exports.POPUP_SHOW_SCREEN,
|
|
21
23
|
ComponentModule: componentModule,
|
|
@@ -27,14 +29,25 @@ exports.PopupHideScreen = () => ({
|
|
|
27
29
|
type: exports.POPUP_HIDE_SCREEN,
|
|
28
30
|
});
|
|
29
31
|
exports.PopupShowWindow = (config) => ({
|
|
30
|
-
type: exports.
|
|
32
|
+
type: exports.POPUP_SHOW_WINDOW,
|
|
31
33
|
Id: config.Id,
|
|
32
34
|
Title: config.Title,
|
|
33
35
|
PopupProps: config.PopupProps,
|
|
34
36
|
Icon: config.Icon,
|
|
35
37
|
});
|
|
36
|
-
exports.
|
|
37
|
-
type: exports.
|
|
38
|
+
exports.PopupHideWindow = (id) => ({
|
|
39
|
+
type: exports.POPUP_HIDE_WINDOW,
|
|
40
|
+
Id: id,
|
|
41
|
+
});
|
|
42
|
+
exports.PopupShowForm = (config) => ({
|
|
43
|
+
type: exports.POPUP_SHOW_FORM,
|
|
44
|
+
Id: config.Id,
|
|
45
|
+
Form: config.Form,
|
|
46
|
+
FormProps: config.FormProps,
|
|
47
|
+
prepareContext: config.prepareContext,
|
|
48
|
+
});
|
|
49
|
+
exports.PopupHideForm = (id) => ({
|
|
50
|
+
type: exports.POPUP_HIDE_FORM,
|
|
38
51
|
Id: id,
|
|
39
52
|
});
|
|
40
53
|
exports.PopupShowAlert = (alert) => {
|
|
@@ -117,6 +130,9 @@ const initialState = {
|
|
|
117
130
|
WindowPopup: {
|
|
118
131
|
PopupList: [],
|
|
119
132
|
},
|
|
133
|
+
FormPopup: {
|
|
134
|
+
FormList: [],
|
|
135
|
+
},
|
|
120
136
|
};
|
|
121
137
|
exports.PopupReducer = (state = initialState, action) => {
|
|
122
138
|
switch (action.type) {
|
|
@@ -258,7 +274,7 @@ exports.PopupReducer = (state = initialState, action) => {
|
|
|
258
274
|
};
|
|
259
275
|
return Object.assign({}, state, { ScreenPopup: newScreenPopup });
|
|
260
276
|
}
|
|
261
|
-
case exports.
|
|
277
|
+
case exports.POPUP_SHOW_WINDOW: {
|
|
262
278
|
const showWindowAction = action;
|
|
263
279
|
const windowSettings = {
|
|
264
280
|
Id: showWindowAction.Id,
|
|
@@ -273,10 +289,28 @@ exports.PopupReducer = (state = initialState, action) => {
|
|
|
273
289
|
const PopupList = [...state.WindowPopup.PopupList, windowSettings];
|
|
274
290
|
return Object.assign(Object.assign({}, state), { WindowPopup: Object.assign(Object.assign({}, state.WindowPopup), { PopupList }) });
|
|
275
291
|
}
|
|
276
|
-
case exports.
|
|
292
|
+
case exports.POPUP_HIDE_WINDOW: {
|
|
277
293
|
const PopupList = state.WindowPopup.PopupList.filter((windowPopup) => windowPopup.Id !== action.Id);
|
|
278
294
|
return Object.assign(Object.assign({}, state), { WindowPopup: Object.assign(Object.assign({}, state.WindowPopup), { PopupList }) });
|
|
279
295
|
}
|
|
296
|
+
case exports.POPUP_SHOW_FORM: {
|
|
297
|
+
const showWindowAction = action;
|
|
298
|
+
const windowSettings = {
|
|
299
|
+
Id: showWindowAction.Id,
|
|
300
|
+
FormProps: showWindowAction.FormProps,
|
|
301
|
+
Form: showWindowAction.Form,
|
|
302
|
+
prepareContext: showWindowAction.prepareContext,
|
|
303
|
+
};
|
|
304
|
+
if (state.FormPopup.FormList.some((windowPopup) => windowPopup.Id === windowSettings.Id)) {
|
|
305
|
+
return state;
|
|
306
|
+
}
|
|
307
|
+
const FormList = [...state.FormPopup.FormList, windowSettings];
|
|
308
|
+
return Object.assign(Object.assign({}, state), { FormPopup: Object.assign(Object.assign({}, state.WindowPopup), { FormList }) });
|
|
309
|
+
}
|
|
310
|
+
case exports.POPUP_HIDE_FORM: {
|
|
311
|
+
const FormList = state.FormPopup.FormList.filter((form) => form.Id !== action.Id);
|
|
312
|
+
return Object.assign(Object.assign({}, state), { FormPopup: Object.assign(Object.assign({}, state.WindowPopup), { FormList }) });
|
|
313
|
+
}
|
|
280
314
|
default:
|
|
281
315
|
return state;
|
|
282
316
|
}
|
|
@@ -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;
|
|
@@ -83,12 +83,31 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
83
83
|
// TODO: state does not clear
|
|
84
84
|
this.api.internalApi.clearFlashingCellState();
|
|
85
85
|
}
|
|
86
|
-
//migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
|
|
87
86
|
(_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
|
|
88
|
-
//
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
alertDefinition.
|
|
87
|
+
// if ShowPopup then change to DisplayNotificate
|
|
88
|
+
if (alertDefinition.AlertProperties &&
|
|
89
|
+
alertDefinition.AlertProperties.ShowPopup &&
|
|
90
|
+
alertDefinition.AlertProperties.ShowPopup == true &&
|
|
91
|
+
!alertDefinition.AlertProperties.DisplayNotification) {
|
|
92
|
+
alertDefinition.AlertProperties.DisplayNotification = true;
|
|
93
|
+
alertDefinition.AlertProperties.ShowPopup = undefined;
|
|
94
|
+
}
|
|
95
|
+
// if no rule but a predicate then use that
|
|
96
|
+
if (!alertDefinition.Rule) {
|
|
97
|
+
if (alertDefinition.Predicate && alertDefinition.Predicate != undefined) {
|
|
98
|
+
const predicate = alertDefinition.Predicate;
|
|
99
|
+
alertDefinition.Rule = {
|
|
100
|
+
Predicate: predicate,
|
|
101
|
+
};
|
|
102
|
+
alertDefinition.Predicate = undefined;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
//migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
|
|
107
|
+
const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
|
|
108
|
+
if (obsoleteAggregationExpression) {
|
|
109
|
+
alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
|
|
110
|
+
}
|
|
92
111
|
}
|
|
93
112
|
});
|
|
94
113
|
}
|
|
@@ -122,10 +141,13 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
122
141
|
const numberOfChangedRows = gridDataChangedInfo.rowNodes.length;
|
|
123
142
|
const actionName = rowAdded ? 'Added' : 'Removed';
|
|
124
143
|
const alertHeader = numberOfChangedRows > 1 ? `${actionName} Rows` : `${actionName} Row `;
|
|
125
|
-
const
|
|
144
|
+
const dynamicAlertMessage = numberOfChangedRows > 1
|
|
126
145
|
? `${numberOfChangedRows} rows were ${actionName.toLowerCase()}`
|
|
127
146
|
: `${numberOfChangedRows} row was ${actionName.toLowerCase()}`;
|
|
128
147
|
alertDefinitions === null || alertDefinitions === void 0 ? void 0 : alertDefinitions.forEach((alertDefinition) => {
|
|
148
|
+
const alertMessage = alertDefinition.MessageText
|
|
149
|
+
? alertDefinition.MessageText
|
|
150
|
+
: dynamicAlertMessage;
|
|
129
151
|
const alert = ObjectFactory_1.default.CreateRowChangedAlert(alertHeader, alertMessage, alertDefinition, gridDataChangedInfo);
|
|
130
152
|
this.api.alertApi.displayAlert(alert);
|
|
131
153
|
});
|
|
@@ -134,9 +156,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
134
156
|
var _a;
|
|
135
157
|
// the row node data is most probably stale because the reactive queries buffer the changed data
|
|
136
158
|
// so we have to refresh it
|
|
137
|
-
reactiveAlertInfo.dataChangeLogEntry.rowNode = this.api.
|
|
138
|
-
.getAdaptableInstance()
|
|
139
|
-
.getRowNodeForPrimaryKey(reactiveAlertInfo.dataChangeLogEntry.primaryKeyValue);
|
|
159
|
+
reactiveAlertInfo.dataChangeLogEntry.rowNode = this.api.gridApi.getRowNodeForPrimaryKey(reactiveAlertInfo.dataChangeLogEntry.primaryKeyValue);
|
|
140
160
|
reactiveAlertInfo.dataChangeLogEntry.rowData = (_a = reactiveAlertInfo.dataChangeLogEntry.rowNode) === null || _a === void 0 ? void 0 : _a.data;
|
|
141
161
|
if (reactiveAlertInfo.type === 'alert') {
|
|
142
162
|
this.showAlertForDefinitions(reactiveAlertInfo.dataChangeLogEntry, [
|
|
@@ -77,7 +77,7 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
77
77
|
values: [calculateColumn.FriendlyName],
|
|
78
78
|
},
|
|
79
79
|
getExpressionViewItems_1.getExpressionViewItems(calculateColumn.Query),
|
|
80
|
-
];
|
|
80
|
+
].filter(Boolean);
|
|
81
81
|
if (ArrayExtensions_1.default.IsNotNullOrEmpty(settingsTags)) {
|
|
82
82
|
items.push({
|
|
83
83
|
name: 'Settings',
|
|
@@ -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) {
|
|
@@ -4,6 +4,6 @@ exports.getExportColumnsViewItems = void 0;
|
|
|
4
4
|
exports.getExportColumnsViewItems = (report, api) => {
|
|
5
5
|
return {
|
|
6
6
|
name: 'Columns',
|
|
7
|
-
values: [api.internalApi.getReportService().GetReportColumnScopeShortDescription(report)],
|
|
7
|
+
values: [...api.internalApi.getReportService().GetReportColumnScopeShortDescription(report)],
|
|
8
8
|
};
|
|
9
9
|
};
|
|
@@ -195,7 +195,7 @@ const getSumAggregation$ = (source$, initialSum) => {
|
|
|
195
195
|
};
|
|
196
196
|
const getColumnValueSum = (column, context) => {
|
|
197
197
|
let sum = 0;
|
|
198
|
-
context.api.internalApi.
|
|
198
|
+
context.api.internalApi.forAllRowNodesDo((rowNode) => {
|
|
199
199
|
var _a;
|
|
200
200
|
// if there is a WHERE clause defined, check if the current rowNode satisfies the condition
|
|
201
201
|
if (context.filterFn && !context.filterFn(rowNode)) {
|
|
@@ -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
|
});
|
|
@@ -233,7 +233,7 @@ const getDataChangedInfoStub = (context) => {
|
|
|
233
233
|
}
|
|
234
234
|
else {
|
|
235
235
|
// if there is a WHERE clause defined, find the first rowNode which satisfies the condition
|
|
236
|
-
context.api.internalApi.
|
|
236
|
+
context.api.internalApi.forAllRowNodesDo((rowNode) => {
|
|
237
237
|
if (!rowNodeStub) {
|
|
238
238
|
if (context.filterFn(rowNode)) {
|
|
239
239
|
rowNodeStub = rowNode;
|
|
@@ -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
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { IAlertService } from './Interface/IAlertService';
|
|
2
2
|
import { AlertDefinition } from '../../PredefinedConfig/AlertState';
|
|
3
3
|
import { EmitterCallback } from '../Emitter';
|
|
4
|
-
import {
|
|
4
|
+
import { AdaptableApi } from '../../types';
|
|
5
5
|
export declare class AlertService implements IAlertService {
|
|
6
|
-
private
|
|
6
|
+
private adaptableApi;
|
|
7
7
|
private emitter;
|
|
8
8
|
private reactiveAlertsMap;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(adaptableApi: AdaptableApi);
|
|
10
10
|
onReactiveAlertTriggered: (callback: EmitterCallback) => (() => void);
|
|
11
11
|
createReactiveAlert(alertDefinition: AlertDefinition): void;
|
|
12
12
|
deleteReactiveAlert(alertDefinition: AlertDefinition): void;
|
|
@@ -7,8 +7,8 @@ const rxjs_1 = require("rxjs");
|
|
|
7
7
|
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
8
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
9
9
|
class AlertService {
|
|
10
|
-
constructor(
|
|
11
|
-
this.
|
|
10
|
+
constructor(adaptableApi) {
|
|
11
|
+
this.adaptableApi = adaptableApi;
|
|
12
12
|
this.reactiveAlertsMap = new Map();
|
|
13
13
|
this.onReactiveAlertTriggered = (callback) => {
|
|
14
14
|
return this.emitter.on('ReactiveAlertTriggered', callback);
|
|
@@ -58,17 +58,17 @@ class AlertService {
|
|
|
58
58
|
}
|
|
59
59
|
isValidExpression(rule) {
|
|
60
60
|
return rule.ObservableExpression
|
|
61
|
-
? this.
|
|
61
|
+
? this.adaptableApi.queryLanguageApi.isValidObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with observable expression `)
|
|
62
62
|
: rule.AggregatedBooleanExpression
|
|
63
|
-
? this.
|
|
63
|
+
? this.adaptableApi.queryLanguageApi.isValidAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with aggregation expression `)
|
|
64
64
|
: false;
|
|
65
65
|
}
|
|
66
66
|
evaluateReactiveExpression(rule) {
|
|
67
67
|
return rule.ObservableExpression
|
|
68
|
-
? this.
|
|
68
|
+
? this.adaptableApi.internalApi
|
|
69
69
|
.getQueryLanguageService()
|
|
70
70
|
.evaluateObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId)
|
|
71
|
-
: this.
|
|
71
|
+
: this.adaptableApi.internalApi
|
|
72
72
|
.getQueryLanguageService()
|
|
73
73
|
.evaluateAggregatedBooleanExpression(rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
|
|
74
74
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
|
|
2
1
|
import { ICalculatedColumnExpressionService } from './Interface/ICalculatedColumnExpressionService';
|
|
3
2
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
4
3
|
import { AdaptableCalculatedColumnQuery, CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
|
|
4
|
+
import { AdaptableApi } from '../../../types';
|
|
5
5
|
export declare class CalculatedColumnExpressionService implements ICalculatedColumnExpressionService {
|
|
6
|
-
private
|
|
6
|
+
private adaptableApi;
|
|
7
7
|
private aggregatedScalarCalculatedColumnsMap;
|
|
8
|
-
constructor(
|
|
8
|
+
constructor(adaptableApi: AdaptableApi);
|
|
9
9
|
getCalculatedColumnDataType(calculatedColumnQuery: AdaptableCalculatedColumnQuery): 'String' | 'Number' | 'Boolean' | 'Date';
|
|
10
10
|
isCalculatedColumnQueryValid(calculatedColumnQuery: AdaptableCalculatedColumnQuery): boolean;
|
|
11
11
|
evaluateCalculatedColumnQuery(calculatedColumn: CalculatedColumn, node: RowNode): any;
|