@adaptabletools/adaptable 10.0.0-canary.3 → 10.0.3

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 (129) hide show
  1. package/base.css +77 -29
  2. package/index.css +89 -31
  3. package/package.json +1 -5
  4. package/publishTimestamp.d.ts +1 -1
  5. package/publishTimestamp.js +1 -1
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +12 -2
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/FilterOptions.d.ts +14 -7
  9. package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
  10. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  11. package/src/AdaptableOptions/QueryLanguageOptions.d.ts +7 -0
  12. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +89 -4
  13. package/src/Api/AlertApi.d.ts +1 -1
  14. package/src/Api/ColumnApi.d.ts +33 -0
  15. package/src/Api/ConfigApi.d.ts +8 -0
  16. package/src/Api/DataChangeHistoryApi.d.ts +10 -4
  17. package/src/Api/GridApi.d.ts +34 -8
  18. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  19. package/src/Api/Implementation/AlertApiImpl.js +11 -4
  20. package/src/Api/Implementation/ColumnApiImpl.d.ts +7 -0
  21. package/src/Api/Implementation/ColumnApiImpl.js +37 -1
  22. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  23. package/src/Api/Implementation/ConfigApiImpl.js +28 -17
  24. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
  25. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +3 -0
  26. package/src/Api/Implementation/FreeTextColumnApiImpl.js +2 -1
  27. package/src/Api/Implementation/GridApiImpl.d.ts +9 -0
  28. package/src/Api/Implementation/GridApiImpl.js +17 -1
  29. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -0
  30. package/src/Api/Implementation/InternalApiImpl.js +16 -0
  31. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -0
  32. package/src/Api/Implementation/QueryLanguageApiImpl.js +3 -0
  33. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +11 -8
  34. package/src/Api/Implementation/UserInterfaceApiImpl.js +57 -80
  35. package/src/Api/InternalApi.d.ts +2 -0
  36. package/src/Api/QueryLanguageApi.d.ts +5 -0
  37. package/src/Api/UserInterfaceApi.d.ts +14 -5
  38. package/src/PredefinedConfig/AlertState.d.ts +10 -0
  39. package/src/PredefinedConfig/CalculatedColumnState.d.ts +4 -37
  40. package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -15
  41. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
  42. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
  43. package/src/{AdaptableOptions/DataChangeTrackingOptions.js → PredefinedConfig/Common/SpecialColumnSettings.js} +0 -0
  44. package/src/PredefinedConfig/FilterState.d.ts +1 -1
  45. package/src/PredefinedConfig/FreeTextColumnState.d.ts +10 -0
  46. package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
  47. package/src/PredefinedConfig/SystemState.d.ts +4 -1
  48. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -6
  49. package/src/Redux/ActionsReducers/SystemRedux.js +11 -11
  50. package/src/Redux/Store/AdaptableReduxMerger.js +7 -1
  51. package/src/Redux/Store/AdaptableStore.js +12 -0
  52. package/src/Strategy/AlertModule.js +1 -1
  53. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  54. package/src/Strategy/ExportModule.d.ts +0 -2
  55. package/src/Strategy/ExportModule.js +58 -61
  56. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +2 -4
  57. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +11 -5
  58. package/src/Utilities/Helpers/DateHelper.d.ts +8 -2
  59. package/src/Utilities/Helpers/DateHelper.js +42 -20
  60. package/src/Utilities/ObjectFactory.d.ts +1 -1
  61. package/src/Utilities/ObjectFactory.js +13 -1
  62. package/src/Utilities/Services/AlertService.d.ts +1 -0
  63. package/src/Utilities/Services/AlertService.js +5 -0
  64. package/src/Utilities/Services/DataService.d.ts +0 -4
  65. package/src/Utilities/Services/DataService.js +2 -18
  66. package/src/Utilities/Services/Interface/IAlertService.d.ts +2 -1
  67. package/src/Utilities/Services/Interface/IDataService.d.ts +0 -2
  68. package/src/Utilities/Services/Interface/ILicenseService.d.ts +2 -1
  69. package/src/Utilities/Services/LicenseService.d.ts +2 -2
  70. package/src/Utilities/Services/MetamodelService.js +1 -0
  71. package/src/Utilities/Services/ModuleService.js +31 -24
  72. package/src/Utilities/Services/ReportService.js +1 -1
  73. package/src/Utilities/Services/TeamSharingService.d.ts +1 -0
  74. package/src/Utilities/Services/TeamSharingService.js +4 -2
  75. package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
  76. package/src/Utilities/runIfNotResolvedIn.js +23 -0
  77. package/src/View/AdaptableView.js +1 -1
  78. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
  79. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
  80. package/src/View/BulkUpdate/BulkUpdatePopup.js +4 -2
  81. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
  82. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
  83. package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
  84. package/src/View/Components/FilterForm/FilterForm.js +44 -23
  85. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +3 -0
  86. package/src/View/Components/FilterForm/ListBoxFilterForm.js +14 -5
  87. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
  88. package/src/View/Components/FilterForm/QuickFilterForm.js +64 -23
  89. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
  90. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
  91. package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
  92. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
  93. package/src/View/Components/Selectors/ColumnValueSelector.js +45 -13
  94. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
  95. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +42 -32
  96. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +5 -1
  97. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -5
  98. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +3 -1
  99. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +3 -1
  100. package/src/View/GridInfo/GridInfoPopup.js +4 -1
  101. package/src/View/Query/QueryViewPanel.js +1 -1
  102. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.d.ts +1 -1
  103. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +6 -8
  104. package/src/View/UIHelper.d.ts +2 -0
  105. package/src/View/UIHelper.js +10 -1
  106. package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
  107. package/src/agGrid/ActionColumnRenderer.js +20 -3
  108. package/src/agGrid/Adaptable.d.ts +20 -4
  109. package/src/agGrid/Adaptable.js +186 -55
  110. package/src/components/Dashboard/Dashboard.js +1 -1
  111. package/src/components/DropdownButton/index.js +1 -1
  112. package/src/components/ExpressionEditor/index.js +2 -1
  113. package/src/components/Loader/Loader.d.ts +7 -0
  114. package/src/components/Loader/Loader.js +13 -0
  115. package/src/components/Loader/index.d.ts +2 -0
  116. package/src/components/Loader/index.js +7 -0
  117. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
  118. package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
  119. package/src/metamodel/adaptable.metamodel.d.ts +74 -34
  120. package/src/metamodel/adaptable.metamodel.js +346 -116
  121. package/src/parser/src/types.d.ts +11 -11
  122. package/src/types.d.ts +4 -4
  123. package/version.d.ts +1 -1
  124. package/version.js +1 -1
  125. package/src/AdaptableOptions/DataChangeTrackingOptions.d.ts +0 -16
  126. package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
  127. package/src/Utilities/Interface/ProgressIndicator.js +0 -2
  128. package/src/View/Export/ProgressIndicator.d.ts +0 -6
  129. package/src/View/Export/ProgressIndicator.js +0 -25
@@ -14,7 +14,6 @@ import { CachedQuery } from './QueryState';
14
14
  import { AdaptableFlashingAlert } from './Common/AdaptableFlashingAlert';
15
15
  import { TypeUuid } from './Uuid';
16
16
  import { SummaryOperation } from './Common/Enums';
17
- import { ProgressIndicator } from '../Utilities/Interface/ProgressIndicator';
18
17
  import { ExportCustomDestinationPopup } from './ExportState';
19
18
  export type { IPushPullReport, IPushPullDomain };
20
19
  export type { Glue42Report };
@@ -63,3 +62,7 @@ export interface SystemState extends InternalState, IPushPullState, Glue42State,
63
62
  suspendTime: Date;
64
63
  };
65
64
  }
65
+ export interface ProgressIndicator {
66
+ active: boolean;
67
+ label: string;
68
+ }
@@ -55,8 +55,8 @@ export declare const SYSTEM_PROGRESS_INDICATOR_SHOW = "SYSTEM_PROGRESS_INDICATOR
55
55
  export declare const SYSTEM_PROGRESS_INDICATOR_HIDE = "SYSTEM_PROGRESS_INDICATOR_HIDE";
56
56
  export declare const SYSTEM_LICENSE_SHOW_WATERMARK = "SYSTEM_LICENSE_SHOW_WATERMARK";
57
57
  export declare const SYSTEM_LICENSE_DISABLE_PERSISTENCE = "SYSTEM_LICENSE_DISABLE_PERSISTENCE";
58
- export declare const SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD = "SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD";
59
- export declare const SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE = "SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE";
58
+ export declare const SYSTEM_DATA_CHANGE_HISTORY_ADD = "SYSTEM_DATA_CHANGE_HISTORY_ADD";
59
+ export declare const SYSTEM_DATA_CHANGE_HISTORY_UNDO = "SYSTEM_DATA_CHANGE_HISTORY_UNDO";
60
60
  export declare const SYSTEM_DATA_CHANGE_HISTORY_ENABLE = "SYSTEM_DATA_CHANGE_HISTORY_ENABLE";
61
61
  export declare const SYSTEM_DATA_CHANGE_HISTORY_DISABLE = "SYSTEM_DATA_CHANGE_HISTORY_DISABLE";
62
62
  export declare const SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = "SYSTEM_DATA_CHANGE_HISTORY_SUSPEND";
@@ -177,10 +177,10 @@ export interface SystemLicenseShowWatermarkAction extends Redux.Action {
177
177
  }
178
178
  export interface SystemLicenseDisablePersistenceAction extends Redux.Action {
179
179
  }
180
- export interface SystemDataChangeHistoryEntryAddAction extends Redux.Action {
180
+ export interface SystemDataChangeHistoryAddAction extends Redux.Action {
181
181
  changeInfo: DataChangedInfo;
182
182
  }
183
- export interface SystemDataChangeHistoryEntryDeleteAction extends Redux.Action {
183
+ export interface SystemDataChangeHistoryUndoAction extends Redux.Action {
184
184
  changeInfo: DataChangedInfo;
185
185
  }
186
186
  export interface SystemDataChangeHistoryEnableAction extends Redux.Action {
@@ -229,8 +229,8 @@ export declare const SystemProgressIndicatorShow: (label: string) => SystemProgr
229
229
  export declare const SystemProgressIndicatorHide: () => SystemProgressIndicatorHideAction;
230
230
  export declare const SystemLicenseShowWatermark: (text: string) => SystemLicenseShowWatermarkAction;
231
231
  export declare const SystemLicenseDisablePersistence: () => SystemLicenseDisablePersistenceAction;
232
- export declare const SystemDataChangeHistoryEntryAdd: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryEntryAddAction;
233
- export declare const SystemDataChangeHistoryEntryDelete: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryEntryDeleteAction;
232
+ export declare const SystemDataChangeHistoryAdd: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryAddAction;
233
+ export declare const SystemDataChangeHistoryUndo: (changeInfo: DataChangedInfo) => SystemDataChangeHistoryUndoAction;
234
234
  export declare const SystemDataChangeHistoryEnable: () => SystemDataChangeHistoryEnableAction;
235
235
  export declare const SystemDataChangeHistoryDisable: () => SystemDataChangeHistoryDisableAction;
236
236
  export declare const SystemDataChangeHistorySuspend: () => SystemDataChangeHistorySuspendAction;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryEntryDelete = exports.SystemDataChangeHistoryEntryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.ChartSetChartVisibility = exports.ChartSetChartData = 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.SystemFlashingAlertDeleteAll = exports.SystemFlashingAlertDelete = exports.SystemFlashingAlertAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = 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_ENTRY_DELETE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_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_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_CHART_SET_CHART_VISIBILITY = exports.SYSTEM_CHART_SET_CHART_DATA = 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_ALERT_DELETE_ALL = exports.SYSTEM_FLASHING_ALERT_DELETE = exports.SYSTEM_FLASHING_ALERT_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_ALERT_ROW_KEY = void 0;
3
+ exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = 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.ChartSetChartVisibility = exports.ChartSetChartData = 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.SystemFlashingAlertDeleteAll = exports.SystemFlashingAlertDelete = exports.SystemFlashingAlertAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = 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_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_CHART_SET_CHART_VISIBILITY = exports.SYSTEM_CHART_SET_CHART_DATA = 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_ALERT_DELETE_ALL = exports.SYSTEM_FLASHING_ALERT_DELETE = exports.SYSTEM_FLASHING_ALERT_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_ALERT_ROW_KEY = void 0;
4
4
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
5
5
  const Helper_1 = require("../../Utilities/Helpers/Helper");
6
6
  /*
@@ -63,8 +63,8 @@ exports.SYSTEM_PROGRESS_INDICATOR_HIDE = 'SYSTEM_PROGRESS_INDICATOR_HIDE';
63
63
  exports.SYSTEM_LICENSE_SHOW_WATERMARK = 'SYSTEM_LICENSE_SHOW_WATERMARK';
64
64
  exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = 'SYSTEM_LICENSE_DISABLE_PERSISTENCE';
65
65
  // Change History
66
- exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD = 'SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD';
67
- exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE = 'SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE';
66
+ exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = 'SYSTEM_DATA_CHANGE_HISTORY_ADD';
67
+ exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = 'SYSTEM_DATA_CHANGE_HISTORY_UNDO';
68
68
  exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = 'SYSTEM_DATA_CHANGE_HISTORY_ENABLE';
69
69
  exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = 'SYSTEM_DATA_CHANGE_HISTORY_DISABLE';
70
70
  exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = 'SYSTEM_DATA_CHANGE_HISTORY_SUSPEND';
@@ -193,12 +193,12 @@ exports.SystemLicenseShowWatermark = (text) => ({
193
193
  exports.SystemLicenseDisablePersistence = () => ({
194
194
  type: exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE,
195
195
  });
196
- exports.SystemDataChangeHistoryEntryAdd = (changeInfo) => ({
197
- type: exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD,
196
+ exports.SystemDataChangeHistoryAdd = (changeInfo) => ({
197
+ type: exports.SYSTEM_DATA_CHANGE_HISTORY_ADD,
198
198
  changeInfo,
199
199
  });
200
- exports.SystemDataChangeHistoryEntryDelete = (changeInfo) => ({
201
- type: exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE,
200
+ exports.SystemDataChangeHistoryUndo = (changeInfo) => ({
201
+ type: exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO,
202
202
  changeInfo,
203
203
  });
204
204
  exports.SystemDataChangeHistoryEnable = () => ({
@@ -465,7 +465,7 @@ exports.SystemReducer = (state = initialState, action) => {
465
465
  ] }) });
466
466
  case exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE:
467
467
  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) }) });
468
- case exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_ADD: {
468
+ case exports.SYSTEM_DATA_CHANGE_HISTORY_ADD: {
469
469
  const actionTypedAdd = action;
470
470
  const dataChangedInfo = actionTypedAdd.changeInfo;
471
471
  const uniqueKey = getDataChangeHistoryKey(dataChangedInfo);
@@ -473,9 +473,9 @@ exports.SystemReducer = (state = initialState, action) => {
473
473
  updatedDataChangeHistoryLogs[uniqueKey] = dataChangedInfo;
474
474
  return Object.assign(Object.assign({}, state), { DataChangeHistory: Object.assign(Object.assign({}, state.DataChangeHistory), { logs: updatedDataChangeHistoryLogs }) });
475
475
  }
476
- case exports.SYSTEM_DATA_CHANGE_HISTORY_ENTRY_DELETE: {
477
- const actionTypedAdd = action;
478
- const dataChangedInfo = actionTypedAdd.changeInfo;
476
+ case exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO: {
477
+ const actionTypedUndo = action;
478
+ const dataChangedInfo = actionTypedUndo.changeInfo;
479
479
  const uniqueKey = getDataChangeHistoryKey(dataChangedInfo);
480
480
  const updatedDataChangeHistoryLogs = Object.assign({}, state.DataChangeHistory.logs);
481
481
  delete updatedDataChangeHistoryLogs[uniqueKey];
@@ -8,6 +8,7 @@ const isArray_1 = tslib_1.__importDefault(require("lodash-es/isArray"));
8
8
  const extend_1 = tslib_1.__importDefault(require("lodash-es/extend"));
9
9
  const isObject_1 = tslib_1.__importDefault(require("lodash-es/isObject"));
10
10
  const isAdaptableObject_1 = require("../../Utilities/isAdaptableObject");
11
+ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
11
12
  function customizer(objValue, srcValue) {
12
13
  if (isArray_1.default(objValue)) {
13
14
  if (!Array.isArray(srcValue)) {
@@ -55,7 +56,12 @@ function MergeStateFunction(oldState, newState) {
55
56
  // add source 'Config' only to predefined objects
56
57
  const config = AddStateSource(oldState, 'Config');
57
58
  // source 'User' will be added to all other objects, after the merge (see bottom of this function)
58
- const state = newState;
59
+ let state = newState;
60
+ if (!state || typeof state !== 'object') {
61
+ // in case loadState returns something different than an empty object
62
+ LoggingHelper_1.LogAdaptableWarning('State is something different that expected, expected object, received: ', state);
63
+ state = {};
64
+ }
59
65
  // any Module in config that doesn't exist in state will be added
60
66
  for (const configModuleName in config) {
61
67
  (_a = state[configModuleName]) !== null && _a !== void 0 ? _a : (state[configModuleName] = config[configModuleName]);
@@ -43,6 +43,7 @@ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
43
43
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
44
44
  const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
45
45
  const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
46
+ const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
46
47
  exports.INIT_STATE = 'INIT_STATE';
47
48
  exports.LOAD_STATE = 'LOAD_STATE';
48
49
  const NON_PERSIST_ACTIONS = {
@@ -50,6 +51,9 @@ const NON_PERSIST_ACTIONS = {
50
51
  '@@INIT': true,
51
52
  '@@redux/init': true,
52
53
  [exports.INIT_STATE]: true,
54
+ // progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
55
+ [SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
56
+ [SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_HIDE]: true,
53
57
  };
54
58
  exports.InitState = () => ({
55
59
  type: exports.INIT_STATE,
@@ -1162,6 +1166,14 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
1162
1166
  });
1163
1167
  return returnAction;
1164
1168
  }
1169
+ /*******************
1170
+ * DATA CHANGE HISTORY ACTIONS
1171
+ *******************/
1172
+ case SystemRedux.SYSTEM_DATA_CHANGE_HISTORY_UNDO:
1173
+ const actionTypedUndo = action;
1174
+ const dataChangedInfo = actionTypedUndo.changeInfo;
1175
+ adaptable.api.gridApi.undoCellEdit(dataChangedInfo);
1176
+ return next(action);
1165
1177
  /*******************
1166
1178
  * SYSTEM (INTERNAL) ACTIONS
1167
1179
  *******************/
@@ -272,7 +272,7 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
272
272
  showAlertForDefinitions(dataChangedInfo, alertDefinitions = []) {
273
273
  alertDefinitions.forEach((alertDefinition) => {
274
274
  // might be better to do a single alert with all the messages?
275
- this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition), alertDefinition, dataChangedInfo);
275
+ this.api.alertApi.showAlert(this.api.columnApi.getFriendlyNameFromColumnId(dataChangedInfo.columnId), this.api.alertApi.getAlertDescription(alertDefinition, dataChangedInfo), alertDefinition, dataChangedInfo);
276
276
  });
277
277
  }
278
278
  showFlashingAlertsForDefinitions(dataChangedInfo, flashingAlertDefinitions = []) {
@@ -11,7 +11,7 @@ class DataChangeHistoryModule extends AdaptableModuleBase_1.AdaptableModuleBase
11
11
  this.api.internalApi.getDataService().on('DataChanged', (dataChangedInfo) => {
12
12
  if (dataChangedInfo.trigger !== 'undo') {
13
13
  if (this.shouldLogDataChange(dataChangedInfo)) {
14
- this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryEntryAdd(dataChangedInfo));
14
+ this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemDataChangeHistoryAdd(dataChangedInfo));
15
15
  }
16
16
  }
17
17
  });
@@ -24,6 +24,4 @@ export declare class ExportModule extends AdaptableModuleBase implements IExport
24
24
  getTeamSharingAction(): TeamSharingImportInfo<Report>;
25
25
  private isEmptyReportData;
26
26
  private showEmptyExportWarning;
27
- private showExportIndicator;
28
- private hideExportIndicator;
29
27
  }
@@ -14,7 +14,6 @@ const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
14
14
  const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
15
15
  const PopupRedux = tslib_1.__importStar(require("../Redux/ActionsReducers/PopupRedux"));
16
16
  const ObjectFactory_1 = require("../Utilities/ObjectFactory");
17
- const SystemRedux_1 = require("../Redux/ActionsReducers/SystemRedux");
18
17
  class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
19
18
  constructor(api) {
20
19
  super(ModuleConstants.ExportModuleId, 'Export', 'export-data', 'ExportPopup', 'Export data from the Grid to numerous locations in numerous formatso', api);
@@ -53,68 +52,72 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
53
52
  this.api.exportApi.editReports(reportsToEdit);
54
53
  }
55
54
  addContextMenuItems(menuContext) {
56
- let menuItemClickFunction = undefined;
57
- if (!menuContext.isRowGroupColumn && this.isModuleAvailable() && menuContext.selectedCellInfo) {
58
- if (ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
59
- ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells)) {
60
- let selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
61
- let clickFunction = () => {
62
- this.export(selectedCellReport, Enums_1.ExportDestination.Excel);
63
- };
64
- menuItemClickFunction = this.createColumnMenuItemClickFunction('Export Selected Cells', this.moduleInfo.Glyph, clickFunction);
65
- }
55
+ const canExport = !menuContext.isRowGroupColumn &&
56
+ this.isModuleAvailable() &&
57
+ menuContext.selectedCellInfo &&
58
+ ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.columns) &&
59
+ ArrayExtensions_1.default.IsNotNullOrEmpty(menuContext.selectedCellInfo.gridCells);
60
+ if (!canExport) {
61
+ return;
62
+ }
63
+ const selectedCellReport = this.api.exportApi.getReportByName(GeneralConstants_1.SELECTED_CELLS_REPORT);
64
+ const menuItems = [];
65
+ for (const destination of this.api.exportApi.getAvailableExportDestinations()) {
66
+ menuItems.push(this.createColumnMenuItemClickFunction(destination, this.moduleInfo.Glyph, () => this.export(selectedCellReport, destination)));
67
+ }
68
+ for (const customDestination of this.api.exportApi.getAllCustomDestination()) {
69
+ menuItems.push(this.createColumnMenuItemClickFunction(customDestination.name, this.moduleInfo.Glyph, () => this.export(selectedCellReport, customDestination.name)));
66
70
  }
67
- return [menuItemClickFunction];
71
+ return [
72
+ {
73
+ label: 'Export Selected Cells',
74
+ isVisible: true,
75
+ icon: this.moduleInfo.Glyph,
76
+ subItems: menuItems,
77
+ },
78
+ ];
68
79
  }
69
80
  export(report, exportDestination) {
70
- this.showExportIndicator(`${report.Name} Export in progress...`);
71
- // setTimeout required to give the export indicator a head-start to render
72
- setTimeout(() => {
81
+ this.api.internalApi.executeWithProgressIndicator(`${report.Name} Export in progress...`, () => {
73
82
  var _a;
74
- try {
75
- if (this.isCustomDestination(exportDestination)) {
76
- const customDestination = (_a = this.api.internalApi
77
- .getAdaptableOptions()
78
- .exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
79
- if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
80
- this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
81
- ReportName: report.Name,
82
- ExportDestination: customDestination,
83
- }));
84
- }
85
- else if (customDestination) {
86
- customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
87
- }
83
+ if (this.isCustomDestination(exportDestination)) {
84
+ const customDestination = (_a = this.api.internalApi
85
+ .getAdaptableOptions()
86
+ .exportOptions.customDestinations) === null || _a === void 0 ? void 0 : _a.find((cd) => cd.name == exportDestination);
87
+ if (customDestination === null || customDestination === void 0 ? void 0 : customDestination.form) {
88
+ this.api.internalApi.dispatchReduxAction(SystemRedux.SystemExportCustomDestinationPopupShow({
89
+ ReportName: report.Name,
90
+ ExportDestination: customDestination,
91
+ }));
88
92
  }
89
- else {
90
- switch (exportDestination) {
91
- case Enums_1.ExportDestination.Excel:
92
- if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
93
- // WYSIWYG is fully delegated to the ag-grid excel export
94
- this.api.exportApi.exportVisualDataToExcel();
95
- }
96
- else {
97
- this.convertReportToExcel(report);
98
- }
99
- break;
100
- case Enums_1.ExportDestination.Clipboard:
101
- this.copyToClipboard(report);
102
- break;
103
- case Enums_1.ExportDestination.CSV:
104
- this.convertReportToCsv(report);
105
- break;
106
- case Enums_1.ExportDestination.JSON:
107
- this.convertReportToJSON(report);
108
- break;
109
- }
93
+ else if (customDestination) {
94
+ customDestination.onExport(report, this.api.internalApi.getReportService().getReportData(report));
110
95
  }
111
- this.hideExportIndicator();
112
96
  }
113
- catch (error) {
114
- this.hideExportIndicator();
115
- throw error;
97
+ else {
98
+ switch (exportDestination) {
99
+ case Enums_1.ExportDestination.Excel:
100
+ if (report.Name === GeneralConstants_1.VISUAL_DATA_REPORT) {
101
+ // WYSIWYG is fully delegated to the ag-grid excel export
102
+ this.api.exportApi.exportVisualDataToExcel();
103
+ }
104
+ else {
105
+ this.convertReportToExcel(report);
106
+ }
107
+ break;
108
+ case Enums_1.ExportDestination.Clipboard:
109
+ this.copyToClipboard(report);
110
+ break;
111
+ case Enums_1.ExportDestination.CSV:
112
+ this.convertReportToCsv(report);
113
+ break;
114
+ case Enums_1.ExportDestination.JSON:
115
+ this.convertReportToJSON(report);
116
+ break;
117
+ }
116
118
  }
117
- }, 16);
119
+ this.api.internalApi.hideProgressIndicator();
120
+ });
118
121
  }
119
122
  isCustomDestination(exportDestination) {
120
123
  if (Object.values(Enums_1.ExportDestination).some((val) => val === exportDestination)) {
@@ -183,11 +186,5 @@ class ExportModule extends AdaptableModuleBase_1.AdaptableModuleBase {
183
186
  alertDefinition: ObjectFactory_1.ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
184
187
  }));
185
188
  }
186
- showExportIndicator(label) {
187
- this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorShow(label));
188
- }
189
- hideExportIndicator() {
190
- this.api.internalApi.dispatchReduxAction(SystemRedux_1.SystemProgressIndicatorHide());
191
- }
192
189
  }
193
190
  exports.ExportModule = ExportModule;
@@ -101,10 +101,6 @@ exports.DefaultAdaptableOptions = {
101
101
  hideColumnWhenGrouped: false,
102
102
  autoOrderGroupedColumns: true,
103
103
  alternativeModuleNames: undefined,
104
- dataChangeTrackingOptions: {
105
- dataChangeTrackingType: 'WhenRequired',
106
- maxTimeframeSize: 28800000,
107
- },
108
104
  currentCalendar: 'United Kingdom',
109
105
  cellSummaryOperations: undefined,
110
106
  customSortComparers: undefined,
@@ -135,6 +131,7 @@ exports.DefaultAdaptableOptions = {
135
131
  useAdaptableQuickFilter: true,
136
132
  clearFiltersOnStartUp: false,
137
133
  quickFilterTrigger: 'mouseenter',
134
+ quickFilterValuesTrigger: 'mouseenter',
138
135
  filterActionOnUserDataChange: {
139
136
  applyFilter: GeneralConstants.FILTER_ALWAYS,
140
137
  throttleDelay: 0,
@@ -216,6 +213,7 @@ exports.DefaultAdaptableOptions = {
216
213
  moduleExpressionFunctions: undefined,
217
214
  queryableColumns: undefined,
218
215
  performExpressionValidation: true,
216
+ maxTimeframeSize: 28800000,
219
217
  },
220
218
  dataChangeHistoryOptions: {
221
219
  activeByDefault: false,
@@ -9,6 +9,7 @@ const ExpressionEvaluationError_1 = require("../../parser/src/ExpressionEvaluati
9
9
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
10
10
  // numeric value(digits) followed by a single 's', 'm' or 'h' letter (case insensitive)
11
11
  const TIMEFRAME_REGEX = /^(\d+)(s|m|h)$/i;
12
+ const SYSTEM_MAX_TIMEFRAME_SIZE = 86400000; // 24h
12
13
  exports.observableExpressionFunctions = {
13
14
  WHERE: {
14
15
  handler(args, context) {
@@ -193,11 +194,8 @@ exports.observableExpressionFunctions = {
193
194
  if (!duration) {
194
195
  throw new ExpressionEvaluationError_1.ExpressionEvaluationError('TIMEFRAME', `timeframe expression is invalid`);
195
196
  }
196
- // check if the given duration is greater than the generally defined maxTimeframe size (in DataChangeTrackingOptions)
197
- const maxTimeframeSize = context.api.internalApi.getDataService().dataChangeMaxTimeframeSize;
198
- if (duration > maxTimeframeSize) {
199
- duration = maxTimeframeSize;
200
- }
197
+ // check if the given duration is greater than the generally defined maxTimeframe size
198
+ duration = getMaxTimeframeSize(duration, context);
201
199
  const result = {
202
200
  type: 'config',
203
201
  name: 'TIMEFRAME',
@@ -417,3 +415,11 @@ const getSlidingTimeframe$ = (source$, timeframeDuration, onTimeframeEnter, onTi
417
415
  return rxjs_1.of(enter$, exit$).pipe(operators_1.mergeAll());
418
416
  }));
419
417
  };
418
+ const getMaxTimeframeSize = (expressionValue, context) => {
419
+ let maxTimeframeSize = context.api.internalApi.getAdaptableOptions().queryLanguageOptions
420
+ .maxTimeframeSize;
421
+ if (maxTimeframeSize > SYSTEM_MAX_TIMEFRAME_SIZE) {
422
+ maxTimeframeSize = SYSTEM_MAX_TIMEFRAME_SIZE;
423
+ }
424
+ return expressionValue > maxTimeframeSize ? maxTimeframeSize : expressionValue;
425
+ };
@@ -1,4 +1,10 @@
1
1
  export declare const isValidDate: (date: Date) => boolean;
2
+ /**
3
+ * Checks if the data contains a value that represents a valid date.
4
+ *
5
+ * @param data any kind of data
6
+ */
7
+ export declare const isValueValidDate: (data: any) => boolean;
2
8
  export declare const dateToISO: (date: Date | number | string) => string;
3
- export declare const parseToISO: (date: string | Date | number, dateFormat: string) => string;
4
- export declare const parseDate: (date: string, dateFormat: string) => Date | undefined;
9
+ export declare const parseToISO: (date: string | Date | number, dateFormat?: string) => string;
10
+ export declare const parseDateValue: (dateValue: string | Date | number, dateFormat?: string) => Date | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseDate = exports.parseToISO = exports.dateToISO = exports.isValidDate = void 0;
3
+ exports.parseDateValue = exports.parseToISO = exports.dateToISO = exports.isValueValidDate = exports.isValidDate = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
6
6
  const parse_1 = tslib_1.__importDefault(require("date-fns/parse"));
@@ -9,30 +9,52 @@ const FormatHelper_1 = require("./FormatHelper");
9
9
  exports.isValidDate = (date) => {
10
10
  return date instanceof Date && !isNaN(date.getTime());
11
11
  };
12
+ /**
13
+ * Checks if the data contains a value that represents a valid date.
14
+ *
15
+ * @param data any kind of data
16
+ */
17
+ exports.isValueValidDate = (data) => {
18
+ if (!data || typeof data === 'boolean') {
19
+ return false;
20
+ }
21
+ const date = new Date(data);
22
+ return !isNaN(date.getTime());
23
+ };
12
24
  exports.dateToISO = (date) => {
13
25
  return FormatHelper_1.DateFormatter(date, { Pattern: 'yyyy-MM-dd' });
14
26
  };
15
27
  exports.parseToISO = (date, dateFormat) => {
16
- let dateInstance = date instanceof Date
17
- ? date
18
- : typeof date === 'number'
19
- ? new Date(date)
20
- : exports.parseDate(date, dateFormat);
21
- let valid = dateInstance && exports.isValidDate(dateInstance);
22
- if (!valid) {
23
- dateInstance = new Date(date);
24
- valid = exports.isValidDate(dateInstance);
25
- }
26
- return valid ? exports.dateToISO(dateInstance) : '';
28
+ const dateInstance = exports.parseDateValue(date, dateFormat);
29
+ return exports.isValidDate(dateInstance) ? exports.dateToISO(dateInstance) : '';
27
30
  };
28
- exports.parseDate = (date, dateFormat) => {
29
- let d = parse_1.default(date, dateFormat, new Date());
30
- if (!exports.isValidDate(d)) {
31
- d = parseISO_1.default(date);
31
+ exports.parseDateValue = (dateValue, dateFormat) => {
32
+ if (dateValue == undefined) {
33
+ return undefined;
34
+ }
35
+ if (dateValue instanceof Date) {
36
+ return !isNaN(dateValue.getTime()) ? dateValue : undefined;
37
+ }
38
+ let dateInstance;
39
+ if (typeof dateValue === 'number') {
40
+ dateInstance = new Date(dateValue);
41
+ }
42
+ else {
43
+ // typeof dateValue === 'string'
44
+ if (dateFormat) {
45
+ dateInstance = parse_1.default(dateValue, dateFormat, new Date());
46
+ }
47
+ else {
48
+ dateInstance = parseISO_1.default(dateValue);
49
+ }
50
+ if (!exports.isValidDate(dateInstance)) {
51
+ // last chance: try to use the native Date.parse(), https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
52
+ dateInstance = new Date(Date.parse(dateValue));
53
+ }
32
54
  }
33
- if (!exports.isValidDate(d)) {
34
- LoggingHelper_1.LogAdaptableError(`Invalid date value "${date}" - cannot be converted to a Date instance. Please make sure you specify adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat correctly.`);
35
- d = undefined;
55
+ if (!exports.isValidDate(dateInstance)) {
56
+ LoggingHelper_1.LogAdaptableError(`Invalid date value "${dateValue}" - cannot be converted to a Date instance. Please make sure you specify adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat correctly.`);
57
+ dateInstance = undefined;
36
58
  }
37
- return d;
59
+ return dateInstance;
38
60
  };
@@ -61,7 +61,7 @@ export declare function CreateEmptySchedule(): Schedule;
61
61
  export declare function CreateEmptyShortcut(): Shortcut;
62
62
  export declare function CreateEmptyConditionalStyle(): ConditionalStyle;
63
63
  export declare function CreateEmptyFormatColumn(): FormatColumn;
64
- export declare function CreateEmptyFreeTextColumn(): FreeTextColumn;
64
+ export declare function CreateEmptyFreeTextColumn(isFilterable: boolean): FreeTextColumn;
65
65
  export declare function CreateEmptyLayout(layout?: Partial<Layout> & {
66
66
  Name: string;
67
67
  }, adaptableColumns?: AdaptableColumn[]): Layout;
@@ -74,6 +74,8 @@ function CreateEmptyCalculatedColumn(isFilterable) {
74
74
  Sortable: true,
75
75
  Pivotable: true,
76
76
  Aggregatable: true,
77
+ SuppressMenu: false,
78
+ SuppressMovable: false,
77
79
  },
78
80
  };
79
81
  }
@@ -334,13 +336,23 @@ function CreateEmptyFormatColumn() {
334
336
  };
335
337
  }
336
338
  exports.CreateEmptyFormatColumn = CreateEmptyFormatColumn;
337
- function CreateEmptyFreeTextColumn() {
339
+ function CreateEmptyFreeTextColumn(isFilterable) {
338
340
  return {
339
341
  Uuid: Uuid_1.createUuid(),
340
342
  ColumnId: GeneralConstants_1.EMPTY_STRING,
341
343
  DefaultValue: GeneralConstants_1.EMPTY_STRING,
342
344
  FreeTextStoredValues: [],
343
345
  TextEditor: 'Inline',
346
+ FreeTextColumnSettings: {
347
+ Filterable: isFilterable,
348
+ Resizable: true,
349
+ Groupable: true,
350
+ Sortable: true,
351
+ Pivotable: true,
352
+ Aggregatable: true,
353
+ SuppressMenu: false,
354
+ SuppressMovable: false,
355
+ },
344
356
  };
345
357
  }
346
358
  exports.CreateEmptyFreeTextColumn = CreateEmptyFreeTextColumn;
@@ -10,6 +10,7 @@ export declare class AlertService implements IAlertService {
10
10
  onReactiveAlertTriggered: (callback: EmitterCallback) => (() => void);
11
11
  createReactiveAlert(alertDefinition: AlertDefinition | FlashingAlertDefinition, isFlashingAlert?: boolean): void;
12
12
  deleteReactiveAlert(alertDefinition: AlertDefinition | FlashingAlertDefinition): void;
13
+ destroy(): void;
13
14
  private isValidExpression;
14
15
  private evaluateReactiveExpression;
15
16
  }
@@ -53,6 +53,11 @@ class AlertService {
53
53
  this.reactiveAlertsMap.delete(alertDefinition.Uuid);
54
54
  }
55
55
  }
56
+ destroy() {
57
+ this.emitter.clearListeners();
58
+ this.emitter = null;
59
+ this.reactiveAlertsMap.forEach((alertsSubscriptionInfo) => alertsSubscriptionInfo.subscription.unsubscribe());
60
+ }
56
61
  isValidExpression(rule, isFlashingAlert) {
57
62
  return rule.ObservableExpression
58
63
  ? this.adaptable.api.queryLanguageApi.isValidObservableExpression(rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid ${isFlashingAlert ? 'Flashing' : ''}Alert rule with observable expression `)
@@ -6,12 +6,8 @@ import { Observable } from 'rxjs';
6
6
  export declare class DataService implements IDataService {
7
7
  private adaptable;
8
8
  private emitter;
9
- private dataChangeTrackingOptions;
10
9
  private readonly dataChangeLogSubject$;
11
- private readonly dataChangeLogReplaySubject$;
12
10
  dataChangeLog$: Observable<DataChangedInfo>;
13
- dataChangeLogReplay$: Observable<DataChangedInfo>;
14
- readonly dataChangeMaxTimeframeSize: number;
15
11
  private undoChangeLog;
16
12
  private undoChangeTimers;
17
13
  constructor(adaptable: IAdaptable);
@@ -17,13 +17,6 @@ class DataService {
17
17
  this.emitter = new Emitter_1.default();
18
18
  this.dataChangeLogSubject$ = new rxjs_1.Subject();
19
19
  this.dataChangeLog$ = this.dataChangeLogSubject$.asObservable();
20
- this.dataChangeTrackingOptions = this.adaptable.adaptableOptions.generalOptions.dataChangeTrackingOptions;
21
- this.dataChangeMaxTimeframeSize =
22
- this.dataChangeTrackingOptions.maxTimeframeSize > MAX_TIMEFRAME_SIZE
23
- ? MAX_TIMEFRAME_SIZE
24
- : this.dataChangeTrackingOptions.maxTimeframeSize;
25
- this.dataChangeLogReplaySubject$ = new rxjs_1.ReplaySubject(Number.POSITIVE_INFINITY, this.dataChangeMaxTimeframeSize);
26
- this.dataChangeLogReplay$ = this.dataChangeLogReplaySubject$.asObservable();
27
20
  this.undoChangeLog = new Map();
28
21
  this.undoChangeTimers = new Map();
29
22
  }
@@ -68,17 +61,8 @@ class DataService {
68
61
  return JSON.stringify({ primaryKeyValue, columnId, previousValue, newValue });
69
62
  }
70
63
  logDataChange(dataChangedInfo) {
71
- if (this.dataChangeTrackingOptions.dataChangeTrackingType === 'Never') {
72
- return;
73
- }
74
- if (this.dataChangeTrackingOptions.dataChangeTrackingType === 'WhenRequired' ||
75
- this.dataChangeTrackingOptions.dataChangeTrackingType === 'Always') {
76
- const dataChangeLogEntry = this.extractDataChangeLogEntry(dataChangedInfo);
77
- this.dataChangeLogSubject$.next(dataChangeLogEntry);
78
- if (this.dataChangeTrackingOptions.dataChangeTrackingType === 'Always') {
79
- this.dataChangeLogReplaySubject$.next(dataChangeLogEntry);
80
- }
81
- }
64
+ const dataChangeLogEntry = this.extractDataChangeLogEntry(dataChangedInfo);
65
+ this.dataChangeLogSubject$.next(dataChangeLogEntry);
82
66
  }
83
67
  extractDataChangeLogEntry(dataChangedInfo) {
84
68
  // create rowData snapshot