@adaptabletools/adaptable-cjs 18.0.0-canary.0 → 18.0.0-canary.10

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 (261) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +5 -21
  3. package/base.css +11 -3
  4. package/base.css.map +1 -1
  5. package/index.css +88 -70
  6. package/index.css.map +1 -1
  7. package/package.json +4 -5
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +61 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +12 -6
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +4 -4
  11. package/src/AdaptableOptions/ColumnOptions.d.ts +4 -2
  12. package/src/AdaptableOptions/{CommentsOptions.d.ts → CommentOptions.d.ts} +5 -5
  13. package/src/AdaptableOptions/MenuOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/MenuOptions.js +2 -6
  15. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +1 -1
  16. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  17. package/src/Api/AdaptableApi.d.ts +5 -0
  18. package/src/Api/BulkUpdateApi.d.ts +0 -5
  19. package/src/Api/ConfigApi.d.ts +1 -1
  20. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  21. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  22. package/src/Api/GridApi.d.ts +18 -13
  23. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  24. package/src/Api/Implementation/ActionColumnApiImpl.js +33 -0
  25. package/src/Api/Implementation/AdaptableApiImpl.d.ts +1 -0
  26. package/src/Api/Implementation/AdaptableApiImpl.js +3 -0
  27. package/src/Api/Implementation/ApiBase.d.ts +2 -1
  28. package/src/Api/Implementation/ApiBase.js +4 -1
  29. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  30. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  31. package/src/Api/Implementation/CommentsApiImpl.d.ts +4 -0
  32. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  33. package/src/Api/Implementation/ConfigApiImpl.js +13 -5
  34. package/src/Api/Implementation/GridApiImpl.d.ts +4 -3
  35. package/src/Api/Implementation/GridApiImpl.js +33 -14
  36. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  37. package/src/Api/Implementation/LayoutApiImpl.js +15 -0
  38. package/src/Api/Implementation/NotesApiImpl.d.ts +6 -4
  39. package/src/Api/Implementation/NotesApiImpl.js +9 -8
  40. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  41. package/src/Api/Implementation/OptionsApiImpl.js +12 -2
  42. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  43. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  44. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  45. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  46. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  47. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  48. package/src/Api/Internal/ActionRowInternalApi.js +107 -0
  49. package/src/Api/Internal/AdaptableInternalApi.d.ts +3 -4
  50. package/src/Api/Internal/AdaptableInternalApi.js +10 -8
  51. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  52. package/src/Api/Internal/CalculatedColumnInternalApi.js +71 -0
  53. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/ColumnFilterInternalApi.js +11 -1
  55. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  56. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  57. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  58. package/src/Api/Internal/CommentsInternalApi.js +18 -0
  59. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  60. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  61. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  62. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  63. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  64. package/src/Api/Internal/FreeTextColumnInternalApi.js +60 -0
  65. package/src/Api/Internal/GridFilterInternalApi.js +1 -1
  66. package/src/Api/Internal/GridInternalApi.d.ts +21 -3
  67. package/src/Api/Internal/GridInternalApi.js +126 -7
  68. package/src/Api/Internal/NotesInternalApi.d.ts +4 -0
  69. package/src/Api/Internal/NotesInternalApi.js +18 -0
  70. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  71. package/src/Api/InteropioPluginApi.d.ts +2 -2
  72. package/src/Api/LayoutApi.d.ts +11 -0
  73. package/src/Api/OptionsApi.d.ts +5 -1
  74. package/src/Api/ScopeApi.d.ts +10 -0
  75. package/src/EnvVars.d.ts +3 -0
  76. package/src/EnvVars.js +8 -0
  77. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  78. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  79. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  80. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  81. package/src/PredefinedConfig/Common/AggregationColumns.js +5 -1
  82. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +8 -0
  83. package/src/PredefinedConfig/Common/RowSummary.d.ts +7 -0
  84. package/src/PredefinedConfig/Common/RowSummary.js +4 -0
  85. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  86. package/src/PredefinedConfig/NotesState.d.ts +10 -20
  87. package/src/PredefinedConfig/PredefinedConfig.d.ts +1 -1
  88. package/src/PredefinedConfig/SystemState.d.ts +7 -0
  89. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +22 -1
  91. package/src/Redux/ActionsReducers/NotesRedux.d.ts +3 -4
  92. package/src/Redux/ActionsReducers/NotesRedux.js +13 -11
  93. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  94. package/src/Redux/ActionsReducers/SystemRedux.js +16 -3
  95. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  96. package/src/Redux/Store/AdaptableStore.js +33 -50
  97. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  98. package/src/Strategy/AdaptableModuleBase.d.ts +2 -3
  99. package/src/Strategy/AdaptableModuleBase.js +4 -7
  100. package/src/Strategy/AlertModule.d.ts +1 -2
  101. package/src/Strategy/AlertModule.js +2 -55
  102. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  103. package/src/Strategy/CalculatedColumnModule.js +5 -25
  104. package/src/Strategy/CellSummaryModule.d.ts +1 -0
  105. package/src/Strategy/CellSummaryModule.js +50 -21
  106. package/src/Strategy/ChartingModule.d.ts +0 -1
  107. package/src/Strategy/ChartingModule.js +2 -22
  108. package/src/Strategy/ColumnFilterModule.d.ts +1 -2
  109. package/src/Strategy/ColumnFilterModule.js +1 -64
  110. package/src/Strategy/CommentsModule.d.ts +1 -0
  111. package/src/Strategy/CommentsModule.js +5 -1
  112. package/src/Strategy/CustomSortModule.js +1 -1
  113. package/src/Strategy/DashboardModule.d.ts +1 -2
  114. package/src/Strategy/DashboardModule.js +1 -8
  115. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  116. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  117. package/src/Strategy/DataSetModule.d.ts +1 -1
  118. package/src/Strategy/DataSetModule.js +1 -1
  119. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  120. package/src/Strategy/FlashingCellModule.js +2 -15
  121. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  122. package/src/Strategy/FormatColumnModule.js +0 -47
  123. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  124. package/src/Strategy/FreeTextColumnModule.js +0 -30
  125. package/src/Strategy/GridFilterModule.d.ts +0 -1
  126. package/src/Strategy/GridFilterModule.js +0 -37
  127. package/src/Strategy/Interface/IModule.d.ts +0 -1
  128. package/src/Strategy/LayoutModule.d.ts +8 -3
  129. package/src/Strategy/LayoutModule.js +108 -53
  130. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  131. package/src/Strategy/NamedQueryModule.js +0 -19
  132. package/src/Strategy/NotesModule.js +3 -4
  133. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  134. package/src/Strategy/PlusMinusModule.js +1 -1
  135. package/src/Strategy/ScheduleModule.d.ts +1 -1
  136. package/src/Strategy/ScheduleModule.js +1 -1
  137. package/src/Strategy/ShortcutModule.d.ts +1 -1
  138. package/src/Strategy/ShortcutModule.js +1 -1
  139. package/src/Strategy/StyledColumnModule.d.ts +0 -1
  140. package/src/Strategy/StyledColumnModule.js +0 -21
  141. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  142. package/src/Strategy/TeamSharingModule.js +5 -5
  143. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  144. package/src/Strategy/ToolPanelModule.js +0 -23
  145. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  146. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  147. package/src/Utilities/Constants/GeneralConstants.js +3 -2
  148. package/src/Utilities/Defaults/DefaultSettingsPanel.js +5 -4
  149. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +2 -1
  150. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +294 -0
  151. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  152. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  153. package/src/Utilities/Extensions/ArrayExtensions.js +6 -1
  154. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  155. package/src/Utilities/Helpers/AdaptableHelper.js +20 -60
  156. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  157. package/src/Utilities/Helpers/Helper.js +6 -1
  158. package/src/Utilities/ObjectFactory.js +6 -6
  159. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +3 -2
  160. package/src/Utilities/Services/AggregatedScalarLiveValue.js +14 -9
  161. package/src/Utilities/Services/CellPopupService.js +0 -1
  162. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  163. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  164. package/src/Utilities/Services/LicenseService/index.js +19 -7
  165. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  166. package/src/Utilities/Services/MetamodelService.js +6 -3
  167. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  168. package/src/Utilities/Services/QueryLanguageService.js +2 -1
  169. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  170. package/src/Utilities/Services/RowEditService.js +3 -1
  171. package/src/Utilities/Services/SummaryService.d.ts +19 -0
  172. package/src/Utilities/Services/SummaryService.js +33 -0
  173. package/src/View/AdaptableView.js +1 -3
  174. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  175. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  176. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  177. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  178. package/src/View/Comments/CommentsPopup.js +12 -8
  179. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  180. package/src/View/Components/NewScopeComponent.js +34 -1
  181. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  182. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  183. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  184. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +1 -1
  185. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  186. package/src/View/Components/Popups/WindowPopups/windowFactory.js +4 -1
  187. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  188. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  189. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -8
  190. package/src/View/GridFilter/GridFilterViewPanel.js +45 -7
  191. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  192. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  193. package/src/View/Layout/TransposedPopup.js +199 -0
  194. package/src/View/Layout/Wizard/LayoutWizard.js +1 -1
  195. package/src/View/Notes/NotesPopup.js +8 -10
  196. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  197. package/src/View/Theme/ThemeSelector.js +2 -2
  198. package/src/agGrid/ActionColumnRenderer.js +7 -6
  199. package/src/agGrid/Adaptable.d.ts +3 -455
  200. package/src/agGrid/Adaptable.js +7 -5291
  201. package/src/agGrid/AdaptableAgGrid.d.ts +351 -0
  202. package/src/agGrid/AdaptableAgGrid.js +3941 -0
  203. package/src/agGrid/AdaptableLogger.js +78 -13
  204. package/src/agGrid/AgGridAdapter.d.ts +62 -0
  205. package/src/agGrid/AgGridAdapter.js +582 -0
  206. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  207. package/src/agGrid/AgGridColumnAdapter.js +829 -0
  208. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  209. package/src/agGrid/AgGridMenuAdapter.js +276 -0
  210. package/src/agGrid/AgGridOptionsService.d.ts +12 -0
  211. package/src/agGrid/AgGridOptionsService.js +58 -0
  212. package/src/agGrid/BadgeRenderer.js +1 -1
  213. package/src/agGrid/CheckboxRenderer.js +1 -1
  214. package/src/agGrid/FilterWrapper.d.ts +2 -2
  215. package/src/agGrid/FilterWrapper.js +1 -1
  216. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  217. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  218. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +73 -10
  219. package/src/agGrid/editors/AdaptableDateEditor/index.js +2 -2
  220. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  221. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  222. package/src/components/Datepicker/index.d.ts +1 -1
  223. package/src/components/InfiniteTable/index.js +2 -2
  224. package/src/components/Input/index.d.ts +1 -1
  225. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  226. package/src/components/Modal/index.d.ts +1 -0
  227. package/src/components/Modal/index.js +6 -4
  228. package/src/components/Select/Select.d.ts +2 -0
  229. package/src/components/Select/Select.js +2 -2
  230. package/src/components/Textarea/index.d.ts +9 -0
  231. package/src/components/Textarea/index.js +50 -2
  232. package/src/components/icons/index.js +2 -0
  233. package/src/components/icons/rows.d.ts +3 -0
  234. package/src/components/icons/rows.js +7 -0
  235. package/src/env.js +2 -2
  236. package/src/metamodel/adaptable.metamodel.d.ts +74 -11
  237. package/src/metamodel/adaptable.metamodel.js +157 -34
  238. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  239. package/src/migration/AdaptableUpgradeHelper.js +52 -0
  240. package/src/migration/VersionUpgrade.d.ts +8 -0
  241. package/src/migration/VersionUpgrade.js +15 -0
  242. package/src/migration/VersionUpgrade17.d.ts +18 -0
  243. package/src/migration/VersionUpgrade17.js +347 -0
  244. package/src/migration/VersionUpgrade18.d.ts +5 -0
  245. package/src/migration/VersionUpgrade18.js +10 -0
  246. package/src/parser/src/types.d.ts +5 -0
  247. package/src/types.d.ts +7 -3
  248. package/tsconfig.cjs.tsbuildinfo +1 -1
  249. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  250. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  251. package/src/Utilities/Services/Interface/IRowEditService.js +0 -2
  252. package/src/View/Components/ScopeComponent.d.ts +0 -24
  253. package/src/View/Components/ScopeComponent.js +0 -138
  254. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  255. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -52
  256. package/src/agGrid/agGridHelper.d.ts +0 -57
  257. package/src/agGrid/agGridHelper.js +0 -691
  258. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  259. package/src/agGrid/agGridMenuHelper.js +0 -673
  260. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  261. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotesReducer = exports.GetNotesSelector = exports.NotesReady = exports.NotesDelete = exports.NotesEdit = exports.NotesAdd = exports.NOTES_READY = exports.NOTES_DELETE = exports.NOTES_EDIT = exports.NOTES_ADD = void 0;
3
+ exports.NotesReducer = exports.GetNotesSelector = exports.GetAllNotesSelector = exports.NotesReady = exports.NotesDelete = exports.NotesEdit = exports.NotesAdd = exports.NOTES_READY = exports.NOTES_DELETE = exports.NOTES_EDIT = exports.NOTES_ADD = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const AdaptableHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/AdaptableHelper"));
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
@@ -40,21 +40,23 @@ const NotesReady = (note) => ({
40
40
  notesState: note,
41
41
  });
42
42
  exports.NotesReady = NotesReady;
43
- const GetNotesSelector = (state, config) => {
44
- var _a, _b;
45
- if (!config) {
46
- return (_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : [];
43
+ const GetAllNotesSelector = (state) => state.Notes;
44
+ exports.GetAllNotesSelector = GetAllNotesSelector;
45
+ const GetNotesSelector = (state, address) => {
46
+ var _a;
47
+ if (!address) {
48
+ return [];
47
49
  }
48
- return ((_b = state === null || state === void 0 ? void 0 : state.Notes) !== null && _b !== void 0 ? _b : []).filter((note) => {
49
- if (note.PrimaryKeyValue === config.PrimaryKeyValue && note.ColumnId === config.ColumnId) {
50
+ return ((_a = state === null || state === void 0 ? void 0 : state.Notes) !== null && _a !== void 0 ? _a : []).filter((note) => {
51
+ if (note.PrimaryKeyValue === address.PrimaryKeyValue && note.ColumnId === address.ColumnId) {
50
52
  // happy check
51
53
  return true;
52
54
  }
53
55
  // Primary keys retreived from the grid dom are always strings, so we must also consider them strings
54
- if ((typeof config.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
55
- (typeof config.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
56
- return (note.PrimaryKeyValue.toString() === config.PrimaryKeyValue.toString() &&
57
- note.ColumnId === config.ColumnId);
56
+ if ((typeof address.PrimaryKeyValue === 'number' && typeof note.PrimaryKeyValue === 'string') ||
57
+ (typeof address.PrimaryKeyValue === 'string' && typeof note.PrimaryKeyValue === 'number')) {
58
+ return (note.PrimaryKeyValue.toString() === address.PrimaryKeyValue.toString() &&
59
+ note.ColumnId === address.ColumnId);
58
60
  }
59
61
  return false;
60
62
  });
@@ -77,6 +77,7 @@ export declare const SYSTEM_VISUAL_EXPORT_END = "SYSTEM_VISUAL_EXPORT_END";
77
77
  export declare const SYSTEM_CELL_POPUP_SHOW = "SYSTEM_CELL_POPUP_SHOW";
78
78
  export declare const SYSTEM_CELL_POPUP_HIDE = "SYSTEM_CELL_POPUP_HIDE";
79
79
  export declare const SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = "SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY";
80
+ export declare const SYSTEM_SUMMARY_ROW_SET = "SYSTEM_SUMMARY_ROW_SET";
80
81
  export declare const DATA_IMPORT_COMPLETED = "DATA_IMPORT_COMPLETED";
81
82
  export interface DataImportCompletedAction extends Redux.Action {
82
83
  dataImportedInfo: DataImportedInfo;
@@ -328,6 +329,10 @@ export declare const SystemVisualExportEnd: () => SystemVisualExportEndAction;
328
329
  export declare const SystemQuickSearchFloatingVisibility: (visible: boolean) => SystemQuickSearchFloatingVisibilityAction;
329
330
  export declare const SystemCellPopupShow: (cellPosition: CellAddress, editMode?: boolean) => SystemCellPopupShowAction;
330
331
  export declare const SystemCellPopupEditFocusedEntity: (focusedEntity: 'Note' | 'Comment') => SystemCellPopupEditFocusedEntityAction;
332
+ export declare const SystemRowSummartSet: (systemRowSummaries: SystemState['RowSummary']['rowSummaries']) => {
333
+ readonly type: "SYSTEM_SUMMARY_ROW_SET";
334
+ readonly rowSummaries: import("../../PredefinedConfig/SystemState").SystemRowSummary[];
335
+ };
331
336
  export declare const SystemCellPopupHide: () => SystemCellPopupHideAction;
332
337
  export declare const SystemDisableDeleteConfirmationSelector: (state: SystemState) => boolean;
333
338
  export declare const SystemPreviousGroupedColumnsSelector: (state: SystemState) => Record<string, Record<string, number>>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SYSTEM_DISABLE_DELETE_CONFIRMATION = exports.SYSTEM_FILTER_FORM_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_SHOW = 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_CLEAR_ROW = 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_ROW_HIGHLIGHT = exports.SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
- 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.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = exports.SYSTEM_CELL_POPUP_HIDE = exports.SYSTEM_CELL_POPUP_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
- exports.SystemReducer = exports.DataImportCompleted = exports.SystemCommentsAndNotesFocusedEntitySelector = exports.SystemCommentsAndNotesEditModeSelector = exports.SystemCommentsAndNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemCellPopupHide = exports.SystemCellPopupEditFocusedEntity = exports.SystemCellPopupShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = void 0;
4
+ 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.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_SUMMARY_ROW_SET = exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = exports.SYSTEM_CELL_POPUP_HIDE = exports.SYSTEM_CELL_POPUP_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
+ exports.SystemReducer = exports.DataImportCompleted = exports.SystemCommentsAndNotesFocusedEntitySelector = exports.SystemCommentsAndNotesEditModeSelector = exports.SystemCommentsAndNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemCellPopupHide = exports.SystemRowSummartSet = exports.SystemCellPopupEditFocusedEntity = exports.SystemCellPopupShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = exports.SystemDataChangeHistoryUndo = void 0;
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
7
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
8
8
  const Helper_1 = require("../../Utilities/Helpers/Helper");
@@ -92,10 +92,12 @@ exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = 'SYSTEM_SET_QUICK_SEARCH_F
92
92
  // Data Export (Report)
93
93
  exports.SYSTEM_VISUAL_EXPORT_BEGIN = 'SYSTEM_VISUAL_EXPORT_BEGIN';
94
94
  exports.SYSTEM_VISUAL_EXPORT_END = 'SYSTEM_VISUAL_EXPORT_END';
95
- // Notes
95
+ // Notes and Comments
96
96
  exports.SYSTEM_CELL_POPUP_SHOW = 'SYSTEM_CELL_POPUP_SHOW';
97
97
  exports.SYSTEM_CELL_POPUP_HIDE = 'SYSTEM_CELL_POPUP_HIDE';
98
98
  exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = 'SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY';
99
+ // Row Summaries
100
+ exports.SYSTEM_SUMMARY_ROW_SET = 'SYSTEM_SUMMARY_ROW_SET';
99
101
  // Data Import
100
102
  exports.DATA_IMPORT_COMPLETED = 'DATA_IMPORT_COMPLETED';
101
103
  const SystemHighlightCellAdd = (cellHighlightInfo) => ({
@@ -380,6 +382,11 @@ const SystemCellPopupEditFocusedEntity = (focusedEntity) => ({
380
382
  focusedEntity,
381
383
  });
382
384
  exports.SystemCellPopupEditFocusedEntity = SystemCellPopupEditFocusedEntity;
385
+ const SystemRowSummartSet = (systemRowSummaries) => ({
386
+ type: exports.SYSTEM_SUMMARY_ROW_SET,
387
+ rowSummaries: systemRowSummaries,
388
+ });
389
+ exports.SystemRowSummartSet = SystemRowSummartSet;
383
390
  const SystemCellPopupHide = () => ({
384
391
  type: exports.SYSTEM_CELL_POPUP_HIDE,
385
392
  });
@@ -830,6 +837,12 @@ const SystemReducer = (state = initialState, action) => {
830
837
  popupPosition: null,
831
838
  } });
832
839
  }
840
+ case exports.SYSTEM_SUMMARY_ROW_SET: {
841
+ const typedAction = action;
842
+ return Object.assign(Object.assign({}, state), { RowSummary: {
843
+ rowSummaries: typedAction.rowSummaries,
844
+ } });
845
+ }
833
846
  default:
834
847
  return state;
835
848
  }
@@ -2,8 +2,7 @@ import * as Redux from 'redux';
2
2
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
3
  import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
4
4
  import { ConfigState } from '../../PredefinedConfig/ConfigState';
5
- import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
6
- import { IAdaptableStore } from './Interface/IAdaptableStore';
5
+ import { IAdaptableStore, LoadStoreConfig } from './Interface/IAdaptableStore';
7
6
  type EmitterCallback = (data?: any) => any;
8
7
  type EmitterAnyCallback = (eventName: string, data?: any) => any;
9
8
  export declare const INIT_STATE = "INIT_STATE";
@@ -22,7 +21,6 @@ export declare const LoadState: (State: {
22
21
  [s: string]: ConfigState;
23
22
  }) => LoadStateAction;
24
23
  export declare class AdaptableStore implements IAdaptableStore {
25
- private isAgGridReady;
26
24
  TheStore: Redux.Store<AdaptableState>;
27
25
  Load: Promise<any>;
28
26
  private emitter;
@@ -36,12 +34,12 @@ export declare class AdaptableStore implements IAdaptableStore {
36
34
  /**
37
35
  *
38
36
  * @param adaptable The Adaptable instance
39
- * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
37
+ * @param postLoadHook A function that hydrates the state after it has been loaded from storage
40
38
  */
41
- constructor(adaptable: IAdaptable, isAgGridReady: Promise<any>);
39
+ constructor(adaptable: IAdaptable);
42
40
  destroy(): void;
43
41
  getCurrentStorageState(): AdaptableState;
44
42
  saveStateNow(adaptable: IAdaptable): Promise<any>;
45
- loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => Promise<any>;
43
+ loadStore: (config: LoadStoreConfig) => Promise<any>;
46
44
  }
47
45
  export {};
@@ -51,9 +51,9 @@ const TeamSharingState_1 = require("../../PredefinedConfig/TeamSharingState");
51
51
  exports.INIT_STATE = 'INIT_STATE';
52
52
  exports.LOAD_STATE = 'LOAD_STATE';
53
53
  const NON_PERSIST_ACTIONS = {
54
- [exports.LOAD_STATE]: true,
55
54
  '@@INIT': true,
56
55
  '@@redux/init': true,
56
+ [exports.LOAD_STATE]: true,
57
57
  [exports.INIT_STATE]: true,
58
58
  // progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
59
59
  [SystemRedux_1.SYSTEM_PROGRESS_INDICATOR_SHOW]: true,
@@ -72,13 +72,12 @@ class AdaptableStore {
72
72
  /**
73
73
  *
74
74
  * @param adaptable The Adaptable instance
75
- * @param isAgGridReady A promise which is resolved when AG Grid is ready for binding
75
+ * @param postLoadHook A function that hydrates the state after it has been loaded from storage
76
76
  */
77
- constructor(adaptable, isAgGridReady) {
77
+ constructor(adaptable) {
78
78
  /*
79
79
  This is the main store for Adaptable State
80
80
  */
81
- this.isAgGridReady = isAgGridReady;
82
81
  this.loadStorageInProgress = false;
83
82
  this.loadStateOnStartup = true; // set to false if you want no state
84
83
  this.on = (eventName, callback) => {
@@ -90,7 +89,9 @@ class AdaptableStore {
90
89
  this.emit = (eventName, data) => {
91
90
  return this.emitter.emit(eventName, data);
92
91
  };
93
- this.loadStore = (adaptable, adaptableStateKey, predefinedConfig) => {
92
+ this.loadStore = (config) => {
93
+ const { adaptable, adaptableStateKey, predefinedConfig, postLoadHook } = config;
94
+ const postProcessState = postLoadHook !== null && postLoadHook !== void 0 ? postLoadHook : ((state) => state);
94
95
  this.storageEngine.setStateKey(adaptableStateKey);
95
96
  // START STATE LOAD
96
97
  this.loadStorageInProgress = true;
@@ -98,17 +99,15 @@ class AdaptableStore {
98
99
  .load(predefinedConfig)
99
100
  .then((storedState) => {
100
101
  if (storedState && this.loadStateOnStartup) {
101
- this.TheStore.dispatch((0, exports.LoadState)(adaptable.adaptableOptions.stateOptions.applyState(storedState)));
102
+ this.TheStore.dispatch((0, exports.LoadState)(postProcessState(adaptable.adaptableOptions.stateOptions.applyState(storedState))));
102
103
  }
103
104
  })
104
- // we need AG Grid to be ready because several states(ex. Layout) depend on its API
105
- .then(() => this.isAgGridReady)
106
105
  .then(() => {
107
106
  this.TheStore.dispatch((0, exports.InitState)());
108
107
  // END STATE LOAD
109
108
  this.loadStorageInProgress = false;
110
109
  }, (e) => {
111
- adaptable.logger.error('Failed to load previous Adaptable State : ', e);
110
+ adaptable.logger.consoleError('Failed to load previous Adaptable State : ', e);
112
111
  //for now i'm still initializing Adaptable even if loading state has failed....
113
112
  //we may revisit that later
114
113
  this.TheStore.dispatch((0, exports.InitState)());
@@ -166,17 +165,6 @@ class AdaptableStore {
166
165
  case exports.LOAD_STATE:
167
166
  const { State } = action;
168
167
  Object.keys(State).forEach((key) => {
169
- // this check should be removed in version 12 !!!
170
- if (key === 'Chart') {
171
- adaptable.logger.consoleWarn(`DEPRECATED: AdapTable Charts Plugin is deprecated! AG Grid built-in charts are fully supported & integrated in AdapTable.
172
-
173
- Please contact 'support@adaptabletools.com' if you require any charting features that are not currently available.`);
174
- }
175
- if (key === 'SparklineColumn') {
176
- adaptable.logger.consoleWarn(`DEPRECATED: AdapTable SparklineColumn is deprecated! AG Grid built-in Sparklines are fully supported & integrated in AdapTable.
177
-
178
- Please contact 'support@adaptabletools.com' if you require any sparklines features that are not currently available.`);
179
- }
180
168
  state[key] = State[key];
181
169
  });
182
170
  break;
@@ -257,7 +245,6 @@ class AdaptableStore {
257
245
  ...pluginsMiddleware // the plugins middleware
258
246
  )));
259
247
  this.storageEngine = storageEngine;
260
- this.loadStore(adaptable, adaptable.adaptableOptions.adaptableStateKey);
261
248
  }
262
249
  destroy() {
263
250
  var _a;
@@ -330,6 +317,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
330
317
  const ret = next(action);
331
318
  return ret;
332
319
  }
320
+ /*******************
321
+ * System Row Summary ACTIONS
322
+ *******************/
323
+ case SystemRedux.SYSTEM_SUMMARY_ROW_SET: {
324
+ let nextAction = next(action);
325
+ setTimeout(() => {
326
+ adaptable.setupRowSummaries();
327
+ }, 0);
328
+ return nextAction;
329
+ }
333
330
  /*******************
334
331
  * FLASHING CELL ACTIONS
335
332
  *******************/
@@ -345,7 +342,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
345
342
  }
346
343
  case SystemRedux.SYSTEM_FLASHING_CELL_DELETE_ALL: {
347
344
  let ret = next(action);
348
- adaptable.redrawRenderedRows();
345
+ adaptable.redrawBody();
349
346
  return ret;
350
347
  }
351
348
  /*******************
@@ -401,7 +398,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
401
398
  });
402
399
  }
403
400
  // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
404
- adaptable.setupColumns();
401
+ adaptable.updateColumnModelAndRefreshGrid();
405
402
  return returnAction;
406
403
  }
407
404
  /*******************
@@ -416,7 +413,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
416
413
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_SUSPEND_ALL: {
417
414
  const returnAction = next(action);
418
415
  // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
419
- adaptable.setupColumns();
416
+ adaptable.updateColumnModelAndRefreshGrid();
420
417
  return returnAction;
421
418
  }
422
419
  /**
@@ -581,11 +578,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
581
578
  /*******************
582
579
  * SPECIAL COLUMN ACTIONS
583
580
  *******************/
584
- case CalculatedColumnRedux.CALCULATED_COLUMN_READY: {
585
- // create aggregated scalar columns at grid startup
586
- adaptable.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
587
- return;
588
- }
589
581
  /**
590
582
  * Use Case: We have added / edited / deleted a Special Column (i.e. one not in initial ColumnDefs)
591
583
  * Action: We update the Special ColumnDefs
@@ -603,7 +595,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
603
595
  .createAggregatedScalarLiveValue(returnAction.calculatedColumn);
604
596
  adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
605
597
  }
606
- adaptable.updateColDefsForSpecialColumns();
598
+ adaptable.updateColumnModelAndRefreshGrid();
607
599
  return returnAction;
608
600
  }
609
601
  /**
@@ -628,7 +620,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
628
620
  .getCalculatedColumnExpressionService()
629
621
  .destroyAggregatedScalarLiveValue(returnAction.calculatedColumn);
630
622
  adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
631
- adaptable.updateColDefsForSpecialColumns();
623
+ adaptable.updateColumnModelAndRefreshGrid();
632
624
  return returnAction;
633
625
  }
634
626
  /**
@@ -649,7 +641,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
649
641
  return;
650
642
  }
651
643
  const returnAction = next(action);
652
- adaptable.updateColDefsForSpecialColumns();
644
+ adaptable.updateColumnModelAndRefreshGrid();
653
645
  return returnAction;
654
646
  }
655
647
  /*******************
@@ -686,7 +678,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
686
678
  case CustomSortRedux.CUSTOM_SORT_UNSUSPEND_ALL: {
687
679
  const returnAction = next(action);
688
680
  // called also for alert actions, see ALERT ACTIONS block
689
- adaptable.setupColumns();
681
+ adaptable.updateColumnModelAndRefreshGrid();
690
682
  return returnAction;
691
683
  }
692
684
  /*******************
@@ -1070,6 +1062,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1070
1062
  adaptable.setLayout(savingLayout);
1071
1063
  }
1072
1064
  }
1065
+ adaptable.refreshQuickFilter();
1073
1066
  return returnAction;
1074
1067
  }
1075
1068
  /*******************
@@ -1663,24 +1656,14 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1663
1656
  *******************/
1664
1657
  case exports.INIT_STATE: {
1665
1658
  let returnAction = next(action);
1666
- if (adaptable.isDestroyed) {
1667
- return returnAction;
1668
- }
1669
- // make sure we have the grid columns in state, before we do any layout work
1670
- adaptable.updateColumnsIntoStore();
1671
- const layoutState = middlewareAPI.getState().Layout;
1672
- const defaultLayout = adaptable.api.layoutApi.internalApi.createDefaultLayoutIfNeeded();
1673
- let currentLayout = (layoutState === null || layoutState === void 0 ? void 0 : layoutState.CurrentLayout) || (defaultLayout === null || defaultLayout === void 0 ? void 0 : defaultLayout.Name);
1674
- if (!adaptable.api.layoutApi.getLayoutByName(currentLayout)) {
1675
- currentLayout = defaultLayout ? defaultLayout.Name : layoutState.Layouts[0].Name;
1659
+ if (adaptable.isReady) {
1660
+ // TODO see #create-create-module-menu
1661
+ // create the module menu (for use in the dashboard and the toolpanel)
1662
+ // we need this here for when the state key is changed
1663
+ // since we need the transient state to be restored in the same
1664
+ // way as when Adaptable is initialised.
1665
+ adaptable.ModuleService.createModuleMenus();
1676
1666
  }
1677
- middlewareAPI.dispatch(LayoutRedux.LayoutSelect(currentLayout));
1678
- // do this now so it sets module entitlements
1679
- adaptable.EntitlementService.setModulesEntitlements();
1680
- // create the module menu (for use in the dashboard and the toolpanel)
1681
- adaptable.ModuleService.createModuleMenus();
1682
- // update initial mode of DataChangeHistory
1683
- adaptable.api.internalApi.initializeDataChangeHistory();
1684
1667
  return returnAction;
1685
1668
  }
1686
1669
  default: {
@@ -2,10 +2,16 @@ import * as Redux from 'redux';
2
2
  import { AdaptableState } from '../../../PredefinedConfig/AdaptableState';
3
3
  import { PredefinedConfig } from '../../../types';
4
4
  import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
5
+ export interface LoadStoreConfig {
6
+ adaptable: IAdaptable;
7
+ adaptableStateKey: string;
8
+ predefinedConfig?: PredefinedConfig;
9
+ postLoadHook?: (state: AdaptableState) => AdaptableState;
10
+ }
5
11
  export interface IAdaptableStore {
6
12
  TheStore: Redux.Store<AdaptableState>;
7
- Load: PromiseLike<any>;
8
- loadStore: (adaptable: IAdaptable, adaptableStateKey: string, predefinedConfig?: PredefinedConfig) => PromiseLike<any>;
13
+ Load: Promise<any>;
14
+ loadStore: (config: LoadStoreConfig) => Promise<any>;
9
15
  getCurrentStorageState: () => AdaptableState | void;
10
16
  saveStateNow: (adaptable: IAdaptable) => Promise<any>;
11
17
  on: (eventName: string, callback: (data?: any) => any) => () => void;
@@ -29,13 +29,12 @@ export declare abstract class AdaptableModuleBase implements IModule {
29
29
  */
30
30
  isModuleObjectsShareable(): boolean;
31
31
  isModuleEditable(): boolean;
32
- updateOldConfig(): void;
33
32
  getModuleAdaptableObjects(): AdaptableObject[];
34
33
  getExplicitlyReferencedColumnIds(adaptableObject: AdaptableObject): string[];
35
34
  getReferencedNamedQueryNames(adaptableObject: AdaptableObject): string[];
36
35
  hasNamedQueryReferences(): boolean;
37
- handleAdaptableReady(): void;
38
- handleConfigReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
36
+ onAdaptableReady(): void;
37
+ onAdaptableStateReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
39
38
  setModuleEntitlement(): void;
40
39
  addModuleMenuItem(source: 'ModuleMenu' | 'ModuleButton'): AdaptableMenuItem | undefined;
41
40
  addModuleButtonMenuItem(): AdaptableMenuItem | undefined;
@@ -20,11 +20,11 @@ class AdaptableModuleBase {
20
20
  };
21
21
  this.api = api;
22
22
  this.api.eventApi.on('AdaptableReady', () => {
23
- this.handleAdaptableReady();
23
+ this.onAdaptableReady();
24
24
  this.api.configApi.dispatchStateReadyAction(this.moduleInfo.ModuleName);
25
25
  });
26
26
  this.api.eventApi.on('AdaptableStateReloaded', (adaptableStateReloadedInfo) => {
27
- this.handleConfigReloaded(adaptableStateReloadedInfo);
27
+ this.onAdaptableStateReloaded(adaptableStateReloadedInfo);
28
28
  });
29
29
  }
30
30
  getViewAccessLevel() {
@@ -47,9 +47,6 @@ class AdaptableModuleBase {
47
47
  isModuleEditable() {
48
48
  return this.hasRequiredAccessLevel(this.getEditAccessLevel());
49
49
  }
50
- updateOldConfig() {
51
- // override where deprecated configs have to be migrated
52
- }
53
50
  getModuleAdaptableObjects() {
54
51
  // override where necessary in base classes
55
52
  return [];
@@ -67,10 +64,10 @@ class AdaptableModuleBase {
67
64
  // this will skip the unnecessary evaluation of modules which do not have Named Query references
68
65
  return true;
69
66
  }
70
- handleAdaptableReady() {
67
+ onAdaptableReady() {
71
68
  // override where necessary in base classes
72
69
  }
73
- handleConfigReloaded(adaptableStateReloadedInfo) {
70
+ onAdaptableStateReloaded(adaptableStateReloadedInfo) {
74
71
  // override where necessary in base classes
75
72
  }
76
73
  setModuleEntitlement() {
@@ -8,13 +8,12 @@ import { AdaptableModuleView, AdaptableObjectCompactView, AdaptableObjectView, I
8
8
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
9
9
  export declare class AlertModule extends AdaptableModuleBase implements IModule {
10
10
  constructor(api: AdaptableApi);
11
+ onAdaptableReady(): void;
11
12
  getModuleAdaptableObjects(config?: {
12
13
  includeLayoutNotAssociatedObjects?: boolean;
13
14
  }): AdaptableObject[];
14
15
  getExplicitlyReferencedColumnIds(alertDefinition: AlertDefinition): string[];
15
16
  getReferencedNamedQueryNames(alertDefinition: AlertDefinition): string[];
16
- updateOldConfig(): void;
17
- private updateAlertSingleToMultiplePredicates;
18
17
  addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
19
18
  private handleCellDataChanged;
20
19
  private handleGridDataChanged;
@@ -17,12 +17,12 @@ const AlertEmptyView_1 = require("../View/Alert/AlertEmptyView");
17
17
  const AlertStatusSubPanel_1 = require("../View/Alert/AlertStatusSubPanel");
18
18
  const ActiveAlertsPanelItemLabel_1 = require("../View/Alert/ActiveAlertsPanelItemLabel");
19
19
  const getObjectTagsViewItems_1 = require("./Utilities/getObjectTagsViewItems");
20
- const updateSingleToMultiplePredicates_1 = require("./Utilities/updateSingleToMultiplePredicates");
21
- const Helper_1 = require("../Utilities/Helpers/Helper");
22
20
  const getAlertType_1 = require("../View/Alert/Utilities/getAlertType");
23
21
  class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
24
22
  constructor(api) {
25
23
  super(ModuleConstants.AlertModuleId, ModuleConstants.AlertModuleFriendlyName, 'alert', 'AlertPopup', 'Get notified when things happen in Adaptable that you need to know about', api);
24
+ }
25
+ onAdaptableReady() {
26
26
  this.api.internalApi
27
27
  .getDataService()
28
28
  .on('CellDataChanged', (cellDataChangedInfo) => {
@@ -75,59 +75,6 @@ class AlertModule extends AdaptableModuleBase_1.AdaptableModuleBase {
75
75
  }
76
76
  return this.api.namedQueryApi.internalApi.getReferencedNamedQueryNames(queryExpression);
77
77
  }
78
- updateOldConfig() {
79
- var _a;
80
- this.updateAlertSingleToMultiplePredicates();
81
- // 1. Make all (new) Flashing Cells have a Predicate if none exists
82
- const alertState = this.api.alertApi.getAlertState();
83
- const flashingAlertDefinitions = alertState.FlashingAlertDefinitions;
84
- const flashingCellDefinitions = this.api.flashingCellApi.getFlashingCellDefinitions();
85
- if (ArrayExtensions_1.ArrayExtensions.IsEmpty(flashingCellDefinitions) &&
86
- ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(flashingAlertDefinitions)) {
87
- this.api.flashingCellApi.setFlashingCellDefinitions(flashingAlertDefinitions);
88
- // TODO: state does not clear
89
- this.api.flashingCellApi.internalApi.clearFlashingCellState();
90
- }
91
- (_a = alertState.AlertDefinitions) === null || _a === void 0 ? void 0 : _a.forEach((alertDefinition) => {
92
- // if ShowPopup then change to DisplayNotificate
93
- if (alertDefinition.AlertProperties &&
94
- alertDefinition.AlertProperties.ShowPopup &&
95
- alertDefinition.AlertProperties.ShowPopup == true &&
96
- !alertDefinition.AlertProperties.DisplayNotification) {
97
- alertDefinition.AlertProperties.DisplayNotification = true;
98
- alertDefinition.AlertProperties.ShowPopup = undefined;
99
- }
100
- // if no rule but a predicate then use that
101
- if (!alertDefinition.Rule) {
102
- if (alertDefinition.Predicate && alertDefinition.Predicate != undefined) {
103
- const predicate = alertDefinition.Predicate;
104
- alertDefinition.Rule = {
105
- Predicate: predicate,
106
- };
107
- alertDefinition.Predicate = undefined;
108
- }
109
- }
110
- else {
111
- //migrate alert definitions with `AggregationExpression` (now `AggregatedBooleanExpression`)
112
- const obsoleteAggregationExpression = alertDefinition.Rule['AggregationExpression'];
113
- if (obsoleteAggregationExpression) {
114
- alertDefinition.Rule.AggregatedBooleanExpression = obsoleteAggregationExpression;
115
- }
116
- }
117
- });
118
- }
119
- updateAlertSingleToMultiplePredicates() {
120
- const alertDefinitions = this.api.alertApi.getAlertDefinitions({
121
- includeLayoutNotAssociatedObjects: true,
122
- });
123
- alertDefinitions.forEach((alertDefinition) => {
124
- if (alertDefinition.Rule && 'Predicate' in alertDefinition.Rule) {
125
- const preparedAlertDefinition = (0, Helper_1.cloneObject)(alertDefinition);
126
- (0, updateSingleToMultiplePredicates_1.updateSingleToMultiplePredicates)(preparedAlertDefinition.Rule);
127
- this.api.alertApi.editAlertDefinition(preparedAlertDefinition);
128
- }
129
- });
130
- }
131
78
  addContextMenuItems(menuContext) {
132
79
  const items = [];
133
80
  if (!menuContext.isRowGroupColumn && this.isModuleAvailable()) {
@@ -8,12 +8,11 @@ import { CalculatedColumn } from '../PredefinedConfig/CalculatedColumnState';
8
8
  import { AdaptableObjectItemView, IModule } from './Interface/IModule';
9
9
  import { AdaptableApi } from '../Api/AdaptableApi';
10
10
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
11
- import { AdaptableStateReloadedInfo } from '../Api/Events/AdaptableStateReloaded';
12
11
  export declare class CalculatedColumnModule extends AdaptableModuleBase implements IModule {
13
12
  constructor(api: AdaptableApi);
14
- handleConfigReloaded(adaptableStateReloadedInfo: AdaptableStateReloadedInfo): void;
13
+ onAdaptableReady(): void;
14
+ onAdaptableStateReloaded(): void;
15
15
  getModuleAdaptableObjects(): AdaptableObject[];
16
- updateOldConfig(): void;
17
16
  getExplicitlyReferencedColumnIds(calculatedColumn: CalculatedColumn): string[];
18
17
  getReferencedNamedQueryNames(calculatedColumn: CalculatedColumn): string[];
19
18
  private isCalculatedColumn;
@@ -15,35 +15,15 @@ class CalculatedColumnModule extends AdaptableModuleBase_1.AdaptableModuleBase {
15
15
  constructor(api) {
16
16
  super(ModuleConstants.CalculatedColumnModuleId, ModuleConstants.CalculatedColumnFriendlyName, 'chart-and-grid', 'CalculatedColumnPopup', 'Create bespoke columns whose cell value is derived dynamically from an Expression', api);
17
17
  }
18
- handleConfigReloaded(adaptableStateReloadedInfo) {
19
- // re-dispatch the CalculatedColumnReady action to recreate all the aggregated scalar columns
20
- this.api.internalApi.dispatchReduxAction(CalculatedColumnRedux.CalculatedColumnReady(this.api.calculatedColumnApi.getCalculatedColumnState()));
18
+ onAdaptableReady() {
19
+ this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
20
+ }
21
+ onAdaptableStateReloaded() {
22
+ this.api.calculatedColumnApi.refreshAggregatedCalculatedColumns();
21
23
  }
22
24
  getModuleAdaptableObjects() {
23
25
  return this.api.calculatedColumnApi.getCalculatedColumns();
24
26
  }
25
- updateOldConfig() {
26
- const calcColumns = this.api.calculatedColumnApi.getCalculatedColumns();
27
- let oldCalculatedColumns = [];
28
- calcColumns.forEach((cc) => {
29
- if (cc.ColumnExpression && !cc.Query) {
30
- cc.Query = {
31
- ScalarExpression: cc.ColumnExpression,
32
- };
33
- cc.ColumnExpression = undefined;
34
- oldCalculatedColumns.push(cc);
35
- this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
36
- }
37
- if (!cc.CalculatedColumnSettings) {
38
- cc.CalculatedColumnSettings = {
39
- DataType: 'Number',
40
- };
41
- oldCalculatedColumns.push(cc);
42
- this.api.logWarn(`Updating incorrect Predefined Config for Calculated Column: ${cc.ColumnId}`);
43
- }
44
- });
45
- oldCalculatedColumns.forEach((oldCalcCol) => this.api.calculatedColumnApi.editCalculatedColumn(oldCalcCol));
46
- }
47
27
  getExplicitlyReferencedColumnIds(calculatedColumn) {
48
28
  var _a;
49
29
  return ((_a = this.api.expressionApi.getColumnsFromExpression(this.api.expressionApi.getAdaptableQueryExpression(calculatedColumn.Query))) !== null && _a !== void 0 ? _a : []);
@@ -8,6 +8,7 @@ import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
8
8
  import { CellSummmary } from '../PredefinedConfig/Common/CellSummary';
9
9
  import { AdaptableColumn } from '../PredefinedConfig/Common/AdaptableColumn';
10
10
  export declare class CellSummaryModule extends AdaptableModuleBase implements ICellSummaryModule {
11
+ cachedCellSummary: WeakMap<SelectedCellInfo<any>, CellSummmary>;
11
12
  constructor(api: AdaptableApi);
12
13
  getViewAccessLevel(): AccessLevel;
13
14
  addColumnMenuItems(column: AdaptableColumn): AdaptableMenuItem[] | undefined;