@adaptabletools/adaptable 11.1.1 → 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.
Files changed (102) hide show
  1. package/base.css +2 -0
  2. package/bundle.cjs.js +119 -119
  3. package/index.css +3 -0
  4. package/package.json +3 -3
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -2
  8. package/src/AdaptableOptions/AdaptableOptions.d.ts +49 -49
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +1 -1
  10. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -1
  11. package/src/AdaptableOptions/EditOptions.d.ts +4 -0
  12. package/src/AdaptableOptions/LayoutOptions.d.ts +11 -0
  13. package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -2
  14. package/src/AdaptableOptions/SmartEdit.d.ts +34 -0
  15. package/src/AdaptableOptions/SmartEdit.js +2 -0
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  17. package/src/Api/Implementation/ColumnApiImpl.js +1 -1
  18. package/src/Api/Implementation/FilterApiImpl.js +8 -2
  19. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  20. package/src/Api/Implementation/GridApiImpl.js +15 -18
  21. package/src/Api/Implementation/InternalApiImpl.js +1 -1
  22. package/src/Api/Implementation/LayoutApiImpl.js +7 -1
  23. package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -2
  24. package/src/Api/SmartEditApi.d.ts +3 -2
  25. package/src/PredefinedConfig/ExportState.d.ts +0 -5
  26. package/src/PredefinedConfig/PopupState.d.ts +2 -1
  27. package/src/PredefinedConfig/SystemState.d.ts +2 -5
  28. package/src/Redux/ActionsReducers/PopupRedux.d.ts +22 -3
  29. package/src/Redux/ActionsReducers/PopupRedux.js +42 -8
  30. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -23
  31. package/src/Redux/ActionsReducers/SystemRedux.js +3 -32
  32. package/src/Strategy/AlertModule.js +28 -6
  33. package/src/Strategy/CalculatedColumnModule.js +5 -0
  34. package/src/Strategy/ExportModule.js +14 -4
  35. package/src/Strategy/FreeTextColumnModule.js +1 -1
  36. package/src/Strategy/Interface/IModule.d.ts +2 -1
  37. package/src/Strategy/LayoutModule.d.ts +23 -0
  38. package/src/Strategy/LayoutModule.js +70 -0
  39. package/src/Strategy/SmartEditModule.d.ts +2 -2
  40. package/src/Strategy/SmartEditModule.js +24 -13
  41. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.d.ts +1 -0
  42. package/src/Strategy/Utilities/getFlashingCellStyleViewItems.js +2 -1
  43. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
  44. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  45. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +4 -2
  46. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +0 -3
  47. package/src/Utilities/Helpers/StyleHelper.d.ts +1 -0
  48. package/src/Utilities/Helpers/StyleHelper.js +13 -1
  49. package/src/Utilities/Interface/MessagePopups.d.ts +12 -0
  50. package/src/View/AdaptableView.js +2 -2
  51. package/src/View/AdaptableViewFactory.js +2 -4
  52. package/src/View/ColorPicker.d.ts +4 -2
  53. package/src/View/ColorPicker.js +16 -4
  54. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +24 -19
  55. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +3 -1
  56. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +23 -15
  57. package/src/View/Components/Popups/FormPopups/FormPopups.d.ts +10 -0
  58. package/src/View/Components/Popups/FormPopups/FormPopups.js +37 -0
  59. package/src/View/Components/Popups/WindowPopups/WindowPopups.d.ts +2 -0
  60. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +10 -6
  61. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  62. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  63. package/src/View/Components/RangesComponent.js +4 -6
  64. package/src/View/Components/StyleComponent.js +6 -9
  65. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  66. package/src/View/Components/ValueSelector/index.js +1 -1
  67. package/src/View/Dashboard/CustomToolbarWrapper.js +9 -1
  68. package/src/View/DataSource/DataSourceViewPanel.d.ts +3 -3
  69. package/src/View/DataSource/DataSourceViewPanel.js +15 -13
  70. package/src/View/Export/ExportViewPanel.d.ts +1 -3
  71. package/src/View/Export/ExportViewPanel.js +1 -17
  72. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -3
  73. package/src/View/GridInfo/AdaptableObjectsSummary.d.ts +2 -0
  74. package/src/View/GridInfo/AdaptableObjectsSummary.js +26 -0
  75. package/src/View/GridInfo/GridInfoPopup.js +13 -5
  76. package/src/View/Layout/LayoutEditorStandalonePopup.js +3 -4
  77. package/src/View/Layout/LayoutRadioSelector.d.ts +5 -0
  78. package/src/View/Layout/LayoutRadioSelector.js +18 -0
  79. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -4
  80. package/src/View/Layout/Wizard/LayoutEditorWizard.js +6 -1
  81. package/src/View/Query/ExpandedQueryPopup.d.ts +2 -18
  82. package/src/View/Query/ExpandedQueryPopup.js +42 -57
  83. package/src/View/Query/QueryViewPanel.js +8 -5
  84. package/src/View/SmartEdit/SmartEditPopup.d.ts +3 -3
  85. package/src/View/SmartEdit/SmartEditPopup.js +15 -3
  86. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +3 -4
  87. package/src/View/SmartEdit/SmartEditViewPanel.js +15 -6
  88. package/src/agGrid/Adaptable.d.ts +7 -5
  89. package/src/agGrid/Adaptable.js +63 -56
  90. package/src/components/ExpressionEditor/index.js +0 -1
  91. package/src/components/OverlayTrigger/index.js +1 -0
  92. package/src/components/Radio/index.d.ts +1 -1
  93. package/src/components/Radio/index.js +2 -2
  94. package/src/metamodel/adaptable.metamodel.d.ts +5 -0
  95. package/src/metamodel/adaptable.metamodel.js +17 -5
  96. package/src/types.d.ts +1 -1
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
  99. package/src/View/Export/ExportCustomDestinationDialog.d.ts +0 -11
  100. package/src/View/Export/ExportCustomDestinationDialog.js +0 -47
  101. package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +0 -5
  102. 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.PopupWindowHide = exports.PopupShowWindow = exports.PopupHideScreen = exports.PopupShowScreen = exports.POPUP_WINDOW_HIDE_SCREEN = exports.POPUP_WINDOW_SHOW_SCREEN = 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;
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.POPUP_WINDOW_SHOW_SCREEN = 'POPUP_WINDOW_SHOW_SCREEN';
18
- exports.POPUP_WINDOW_HIDE_SCREEN = 'POPUP_WINDOW_HIDE_SCREEN';
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.POPUP_WINDOW_SHOW_SCREEN,
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.PopupWindowHide = (id) => ({
37
- type: exports.POPUP_WINDOW_HIDE_SCREEN,
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.POPUP_WINDOW_SHOW_SCREEN: {
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.POPUP_WINDOW_HIDE_SCREEN: {
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 { ExportCustomDestinationPopup, Report } from '../../PredefinedConfig/ExportState';
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 { MathOperation, SummaryOperation } from '../../PredefinedConfig/Common/Enums';
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: MathOperation;
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: MathOperation) => SmartEditChangeOperationAction;
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.getSystemExportCustomDestinationPopups = exports.SystemSettingsPanelSet = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = 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_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_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;
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: 'Multiply',
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
- // @ts-ignore
89
- const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
90
- if (obsoleteAggregationExpression) {
91
- alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
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 alertMessage = numberOfChangedRows > 1
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
  });
@@ -71,6 +71,11 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
71
71
  label: 'Column Id',
72
72
  values: [calculateColumn.ColumnId],
73
73
  },
74
+ calculateColumn.FriendlyName && {
75
+ name: 'Settings',
76
+ label: 'Column Name',
77
+ values: [calculateColumn.FriendlyName],
78
+ },
74
79
  getExpressionViewItems_1.getExpressionViewItems(calculateColumn.Query),
75
80
  ];
76
81
  if (ArrayExtensions_1.default.IsNotNullOrEmpty(settingsTags)) {
@@ -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(SystemRedux.SystemExportCustomDestinationPopupShow({
93
- ReportName: report.Name,
94
- ExportDestination: customDestination,
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) {
@@ -75,7 +75,7 @@ class FreeTextColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
75
75
  label: 'Data Type',
76
76
  values: [(_a = freeTextColumn.DataType) !== null && _a !== void 0 ? _a : 'Not specified'],
77
77
  },
78
- freeTextColumn.DefaultValue !== undefined && {
78
+ Boolean(freeTextColumn.DefaultValue) && {
79
79
  name: 'Settings',
80
80
  label: 'Default Value',
81
81
  values: [freeTextColumn.DefaultValue],
@@ -74,11 +74,12 @@ export interface AdaptableObjectView {
74
74
  export interface AdaptableModuleView {
75
75
  /**
76
76
  * List of actions.
77
- * Allows to add custmo actions.
77
+ * Allows to add custom actions.
78
78
  */
79
79
  actions?: React.FunctionComponent<{
80
80
  data: AdaptableObject;
81
81
  }>[];
82
+ onOpenEditPopup?: (abObject?: AdaptableObject) => void;
82
83
  getDeleteAction?: (abObject: AdaptableObject) => Redux.Action;
83
84
  getSuspendAction?: (abObject: AdaptableObject) => Redux.Action;
84
85
  getUnSuspendAction?: (abObject: AdaptableObject) => Redux.Action;
@@ -1,6 +1,8 @@
1
+ /// <reference types="react" />
1
2
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
3
  import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
3
4
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
5
+ import * as LayoutRedux from '../Redux/ActionsReducers/LayoutRedux';
4
6
  import { TeamSharingImportInfo } from '../PredefinedConfig/TeamSharingState';
5
7
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
6
8
  import { AdaptableApi } from '../Api/AdaptableApi';
@@ -16,4 +18,25 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
16
18
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;
17
19
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
18
20
  getTeamSharingAction(): TeamSharingImportInfo<Layout>;
21
+ toViewAll(): {
22
+ items: {
23
+ name: string;
24
+ values: string[];
25
+ }[];
26
+ abObject: Layout;
27
+ }[];
28
+ toView(layout: Layout): {
29
+ items: {
30
+ name: string;
31
+ values: string[];
32
+ }[];
33
+ abObject: Layout;
34
+ };
35
+ getViewProperties(): {
36
+ actions: import("react").FunctionComponent<{
37
+ data: Layout;
38
+ }>[];
39
+ getDeleteAction: (layout: Layout) => LayoutRedux.LayoutDeleteAction;
40
+ onOpenEditPopup: (layout?: Layout) => void;
41
+ };
19
42
  }
@@ -6,6 +6,7 @@ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
6
6
  const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
7
7
  const LayoutRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/LayoutRedux"));
8
8
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/ArrayExtensions"));
9
+ const LayoutRadioSelector_1 = require("../View/Layout/LayoutRadioSelector");
9
10
  class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
10
11
  constructor(api) {
11
12
  super(ModuleConstants.LayoutModuleId, 'Layout', 'layout', 'LayoutPopup', 'Named sets of column visibility, order, groupings, aggregation, pivots etc.', api);
@@ -128,5 +129,74 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
128
129
  EditAction: LayoutRedux.LayoutSave,
129
130
  };
130
131
  }
132
+ toViewAll() {
133
+ return this.getModuleAdaptableObjects().map((layout) => this.toView(layout));
134
+ }
135
+ toView(layout) {
136
+ var _a, _b, _c, _d, _e, _f, _g;
137
+ const maxColumnsToDisplay = (_d = (_c = (_b = (_a = this.api.internalApi.getAdaptableOptions()) === null || _a === void 0 ? void 0 : _a.layoutOptions) === null || _b === void 0 ? void 0 : _b.view) === null || _c === void 0 ? void 0 : _c.maxColumnsToDisplay) !== null && _d !== void 0 ? _d : 10;
138
+ const columnIdToFriendlyName = (columnId) => {
139
+ return this.api.columnApi.getFriendlyNameFromColumnId(columnId);
140
+ };
141
+ let columns = layout.Columns;
142
+ if (columns.length >
143
+ maxColumnsToDisplay + 1 /* +1 is to show tag only beginning with 2, 'other 2' */) {
144
+ const extraColumns = columns.length - maxColumnsToDisplay;
145
+ const firstNColumns = columns
146
+ .slice(0, maxColumnsToDisplay)
147
+ .map((colId) => columnIdToFriendlyName(colId));
148
+ columns = [...firstNColumns, `and other ${extraColumns}`];
149
+ }
150
+ return {
151
+ items: [
152
+ {
153
+ name: 'Name',
154
+ values: [layout.Name],
155
+ },
156
+ {
157
+ name: 'Columns',
158
+ values: columns,
159
+ },
160
+ ((_e = layout.ColumnSorts) === null || _e === void 0 ? void 0 : _e.length) && {
161
+ name: 'Sort',
162
+ values: layout.ColumnSorts.map((customSort) => `[${columnIdToFriendlyName(customSort.ColumnId)}: ${customSort.SortOrder}]`),
163
+ },
164
+ ((_f = layout === null || layout === void 0 ? void 0 : layout.RowGroupedColumns) === null || _f === void 0 ? void 0 : _f.length) && {
165
+ name: 'Grouped Columns',
166
+ values: layout.RowGroupedColumns.map((colId) => columnIdToFriendlyName(colId)),
167
+ },
168
+ ((_g = layout === null || layout === void 0 ? void 0 : layout.PivotColumns) === null || _g === void 0 ? void 0 : _g.length) && {
169
+ name: 'Pivot Columns',
170
+ values: layout.PivotColumns.map((colId) => columnIdToFriendlyName(colId)),
171
+ },
172
+ (layout === null || layout === void 0 ? void 0 : layout.EnablePivot) && {
173
+ name: 'Pivot Enabled',
174
+ values: ['Yes'],
175
+ },
176
+ ].filter(Boolean),
177
+ abObject: layout,
178
+ };
179
+ }
180
+ getViewProperties() {
181
+ return {
182
+ actions: [LayoutRadioSelector_1.LayoutRadioSelector],
183
+ getDeleteAction: (layout) => {
184
+ // make sure we do not delete the last layout
185
+ if (this.getModuleAdaptableObjects().length === 1) {
186
+ return null;
187
+ }
188
+ return LayoutRedux.LayoutDelete(layout);
189
+ },
190
+ onOpenEditPopup: (layout) => {
191
+ if (!layout) {
192
+ // consider it is new
193
+ this.api.layoutApi.showLayoutEditor(null, 'New');
194
+ }
195
+ else {
196
+ this.api.layoutApi.showLayoutEditor(layout.Name);
197
+ }
198
+ },
199
+ };
200
+ }
131
201
  }
132
202
  exports.LayoutModule = LayoutModule;
@@ -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: MathOperation): PreviewInfo;
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
- switch (smartEditOperation) {
126
- case Enums_1.MathOperation.Add:
127
- newValue = Number(selectedCell.rawValue) + smartEditValue;
128
- break;
129
- case Enums_1.MathOperation.Subtract:
130
- newValue = Number(selectedCell.rawValue) - smartEditValue;
131
- break;
132
- case Enums_1.MathOperation.Multiply:
133
- newValue = Number(selectedCell.rawValue) * smartEditValue;
134
- break;
135
- case Enums_1.MathOperation.Divide:
136
- newValue = Number(selectedCell.rawValue) / smartEditValue;
137
- break;
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) {
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare const getFlashingCellStyleViewItems: () => {
3
3
  name: string;
4
+ label: string;
4
5
  view: import("react").FunctionComponent<import("../../View/FlashingCell/FlashingCellStyle").FlashingCellStyleProps>;
5
6
  };
@@ -4,7 +4,8 @@ exports.getFlashingCellStyleViewItems = void 0;
4
4
  const FlashingCellStyle_1 = require("../../View/FlashingCell/FlashingCellStyle");
5
5
  exports.getFlashingCellStyleViewItems = () => {
6
6
  return {
7
- name: 'Change Style',
7
+ name: 'Flash Styles',
8
+ label: 'Change Style',
8
9
  view: FlashingCellStyle_1.FlashingCellStyle,
9
10
  };
10
11
  };
@@ -131,6 +131,9 @@ exports.DefaultAdaptableOptions = {
131
131
  autoSizeColumnsInLayout: false,
132
132
  autoSizeColumnsInPivotLayout: false,
133
133
  createDefaultLayout: false,
134
+ view: {
135
+ maxColumnsToDisplay: 10,
136
+ },
134
137
  },
135
138
  menuOptions: {
136
139
  showAdaptableContextMenu: true,
@@ -10,6 +10,7 @@ exports.STANDALONE_MODULE_POPUPS = [
10
10
  * This constants determines the order and the items that appear in the navigation.
11
11
  */
12
12
  exports.DEFAULT_NAVIGATION_ITEMS = [
13
+ 'GridInfo',
13
14
  'Dashboard',
14
15
  'ToolPanel',
15
16
  'StateManagement',
@@ -31,7 +32,6 @@ exports.DEFAULT_NAVIGATION_ITEMS = [
31
32
  'Schedule',
32
33
  'Shortcut',
33
34
  '-',
34
- 'GridInfo',
35
35
  'SystemStatus',
36
36
  'DataChangeHistory',
37
37
  'TeamSharing',
@@ -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 = (_a = context.api) === null || _a === void 0 ? void 0 : _a.gridApi.getNormalisedValueFromRowNode(context.node, column.columnId);
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
  });