@adaptabletools/adaptable-cjs 23.0.4 → 23.0.5-canary.0

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 (441) hide show
  1. package/agGrid.js +0 -31
  2. package/index.js +0 -31
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
  5. package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
  6. package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
  7. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
  8. package/src/AdaptableState/Aggregations/only.js +0 -11
  9. package/src/AdaptableState/Aggregations/weightedAverage.js +0 -26
  10. package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
  11. package/src/AdaptableState/Common/AdaptableForm.js +0 -49
  12. package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
  13. package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
  14. package/src/AdaptableState/Common/AggregationColumns.js +0 -10
  15. package/src/AdaptableState/Common/Enums.js +0 -3
  16. package/src/AdaptableState/Common/Menu.js +1 -7
  17. package/src/AdaptableState/Common/MenuItem.js +0 -2
  18. package/src/AdaptableState/Common/Types.js +2 -5
  19. package/src/AdaptableState/StatusBarState.js +0 -3
  20. package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
  21. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
  22. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
  24. package/src/AdaptableState/Uuid.js +0 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
  26. package/src/Api/Implementation/AlertApiImpl.js +0 -21
  27. package/src/Api/Implementation/ApiBase.js +0 -24
  28. package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
  29. package/src/Api/Implementation/ChartingApiImpl.js +0 -3
  30. package/src/Api/Implementation/ColumnApiImpl.js +1 -15
  31. package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
  32. package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
  33. package/src/Api/Implementation/DashboardApiImpl.js +0 -1
  34. package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
  35. package/src/Api/Implementation/ExportApiImpl.js +0 -10
  36. package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
  37. package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
  38. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
  39. package/src/Api/Implementation/GridApiImpl.js +1 -22
  40. package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
  41. package/src/Api/Implementation/LayoutApiImpl.js +0 -18
  42. package/src/Api/Implementation/LayoutHelpers.js +0 -16
  43. package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
  44. package/src/Api/Implementation/PredicateApiImpl.js +0 -5
  45. package/src/Api/Implementation/RowFormApiImpl.js +0 -2
  46. package/src/Api/Implementation/StateApiImpl.js +0 -7
  47. package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
  48. package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
  49. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
  50. package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
  51. package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
  52. package/src/Api/Internal/AdaptableInternalApi.js +1 -39
  53. package/src/Api/Internal/AlertInternalApi.js +1 -102
  54. package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
  55. package/src/Api/Internal/ChartingInternalApi.js +0 -1
  56. package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
  57. package/src/Api/Internal/ColumnInternalApi.js +0 -32
  58. package/src/Api/Internal/CustomSortInternalApi.js +0 -5
  59. package/src/Api/Internal/DashboardInternalApi.js +0 -23
  60. package/src/Api/Internal/DataImportInternalApi.js +0 -1
  61. package/src/Api/Internal/EventInternalApi.js +0 -2
  62. package/src/Api/Internal/ExportInternalApi.js +1 -16
  63. package/src/Api/Internal/ExpressionInternalApi.js +0 -23
  64. package/src/Api/Internal/Fdc3InternalApi.js +0 -9
  65. package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
  66. package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
  67. package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
  68. package/src/Api/Internal/GridFilterInternalApi.js +0 -3
  69. package/src/Api/Internal/GridInternalApi.js +0 -37
  70. package/src/Api/Internal/LayoutInternalApi.js +0 -18
  71. package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
  72. package/src/Api/Internal/PredicateInternalApi.js +0 -23
  73. package/src/Api/Internal/RowFormInternalApi.js +0 -18
  74. package/src/Api/Internal/StateInternalApi.js +0 -25
  75. package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
  76. package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
  77. package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
  78. package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
  79. package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
  80. package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
  81. package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
  82. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
  83. package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
  84. package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
  85. package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
  86. package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
  87. package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
  88. package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
  89. package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
  91. package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
  92. package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
  93. package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
  94. package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
  95. package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
  96. package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
  97. package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
  98. package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
  99. package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
  100. package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
  101. package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
  102. package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
  103. package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
  104. package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
  105. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
  106. package/src/Redux/ActionsReducers/utils.js +0 -6
  107. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
  108. package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
  109. package/src/Redux/Store/AdaptableStore.js +5 -301
  110. package/src/Strategy/AdaptableModuleBase.js +0 -35
  111. package/src/Strategy/AlertModule.js +0 -9
  112. package/src/Strategy/CellSummaryModule.js +0 -12
  113. package/src/Strategy/ChartingModule.js +0 -1
  114. package/src/Strategy/ColumnFilterModule.js +1 -11
  115. package/src/Strategy/CommentModule.js +0 -2
  116. package/src/Strategy/DashboardModule.js +0 -4
  117. package/src/Strategy/ExportModule.js +0 -1
  118. package/src/Strategy/FlashingCellModule.js +0 -8
  119. package/src/Strategy/FormatColumnModule.js +0 -3
  120. package/src/Strategy/FreeTextColumnModule.js +0 -3
  121. package/src/Strategy/LayoutModule.js +0 -26
  122. package/src/Strategy/NoteModule.js +0 -3
  123. package/src/Strategy/PlusMinusModule.js +0 -3
  124. package/src/Strategy/SettingsPanelModule.js +0 -1
  125. package/src/Strategy/ShortcutModule.js +0 -1
  126. package/src/Strategy/SmartEditModule.js +0 -5
  127. package/src/Strategy/StatusBarModule.js +0 -7
  128. package/src/Strategy/StyledColumnModule.js +1 -16
  129. package/src/Strategy/TeamSharingModule.js +0 -9
  130. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
  131. package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
  132. package/src/Utilities/Constants/GeneralConstants.js +0 -10
  133. package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
  134. package/src/Utilities/Constants/ReduxConstants.js +4 -8
  135. package/src/Utilities/Emitter.js +0 -9
  136. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
  137. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
  138. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
  139. package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
  140. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
  141. package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -9
  142. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
  143. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
  144. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
  145. package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
  146. package/src/Utilities/Extensions/NumberExtensions.js +0 -27
  147. package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
  148. package/src/Utilities/Extensions/StringExtensions.js +0 -27
  149. package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
  150. package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
  151. package/src/Utilities/Helpers/DateHelper.js +0 -10
  152. package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
  153. package/src/Utilities/Helpers/Helper.js +3 -9
  154. package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
  155. package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
  156. package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
  157. package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
  158. package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
  159. package/src/Utilities/Helpers/StyleHelper.js +0 -56
  160. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
  161. package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
  162. package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
  163. package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
  164. package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
  165. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
  166. package/src/Utilities/Helpers/TimingHelper.js +0 -13
  167. package/src/Utilities/ObjectFactory.js +2 -4
  168. package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
  169. package/src/Utilities/Services/AlertService.js +0 -1
  170. package/src/Utilities/Services/AnnotationsService.js +0 -22
  171. package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
  172. package/src/Utilities/Services/ChartingService.js +0 -9
  173. package/src/Utilities/Services/DataService.js +0 -11
  174. package/src/Utilities/Services/Fdc3Service.js +0 -3
  175. package/src/Utilities/Services/FlashingCellService.js +0 -6
  176. package/src/Utilities/Services/ModuleService.js +0 -8
  177. package/src/Utilities/Services/QueryLanguageService.js +2 -25
  178. package/src/Utilities/Services/RowFormService.js +0 -1
  179. package/src/Utilities/Services/RowSummaryService.js +1 -20
  180. package/src/Utilities/Services/TeamSharingService.js +0 -15
  181. package/src/Utilities/Services/ThemeService.js +0 -7
  182. package/src/Utilities/Services/ValidationService.js +0 -21
  183. package/src/Utilities/createAgStatusPanelComponent.js +0 -3
  184. package/src/Utilities/getExpressionViewItems.js +0 -2
  185. package/src/Utilities/getObjectTagsViewItems.js +0 -1
  186. package/src/Utilities/getScrollbarSize.js +0 -1
  187. package/src/Utilities/logDeprecation.js +0 -3
  188. package/src/Utilities/resolveContainerElement.js +0 -21
  189. package/src/Utilities/runIfNotResolvedIn.js +0 -7
  190. package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
  191. package/src/Utilities/waitForTimeout.js +0 -1
  192. package/src/Utilities/wizardSelection.js +0 -2
  193. package/src/View/AdaptablePopover/index.js +1 -1
  194. package/src/View/AdaptableView.js +1 -5
  195. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
  196. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
  197. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
  198. package/src/View/AdaptableWizardView/Wizard.js +0 -12
  199. package/src/View/AdaptableWizardView/helper.js +0 -11
  200. package/src/View/Alert/ActiveAlertsPanel.js +0 -2
  201. package/src/View/Alert/AlertStatusSubPanel.js +0 -8
  202. package/src/View/Alert/Utilities/getAlertType.js +0 -7
  203. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
  204. package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
  205. package/src/View/Alert/Wizard/AlertWizard.js +0 -2
  206. package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
  207. package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
  208. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
  209. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
  210. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  211. package/src/View/CellSummary/CellSummaryPopup.js +0 -3
  212. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
  213. package/src/View/Charting/EditChartButton.js +1 -4
  214. package/src/View/Charting/ShowChartButton.js +0 -3
  215. package/src/View/Charting/useAgChartState.js +0 -5
  216. package/src/View/Charting/useChartingElements.js +0 -4
  217. package/src/View/Charting/useExternalChartState.js +0 -6
  218. package/src/View/ColumnInfo/ColumnInfo.js +7 -17
  219. package/src/View/Comments/CommentsEditor.js +1 -16
  220. package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
  221. package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
  222. package/src/View/Components/AdaptableDateInput/index.js +2 -9
  223. package/src/View/Components/AdaptableIconComponent/index.js +0 -4
  224. package/src/View/Components/AdaptableIconSelector/index.js +0 -3
  225. package/src/View/Components/AdaptableInput/index.js +0 -2
  226. package/src/View/Components/Badge/index.js +0 -8
  227. package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
  228. package/src/View/Components/Buttons/EntityListActionButtons.js +0 -1
  229. package/src/View/Components/CellPopup/index.js +1 -2
  230. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
  231. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
  232. package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
  233. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
  234. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
  235. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
  236. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
  237. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -1
  238. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
  239. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
  240. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
  241. package/src/View/Components/ColumnFilter/utils.js +2 -9
  242. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
  243. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
  244. package/src/View/Components/EntityRulesEditor/index.js +1 -11
  245. package/src/View/Components/ExternalRenderer.js +1 -3
  246. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
  247. package/src/View/Components/ModuleValueSelector/index.js +0 -2
  248. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  249. package/src/View/Components/Panels/PanelWithRow.js +0 -3
  250. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
  251. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
  252. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
  253. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
  254. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
  255. package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
  256. package/src/View/Components/Popups/AdaptableToaster.js +0 -2
  257. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
  258. package/src/View/Components/RangesComponent.js +0 -57
  259. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
  260. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
  261. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
  262. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
  263. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
  264. package/src/View/Components/ValueSelector/index.js +0 -4
  265. package/src/View/Components/wizardColumnListStyles.js +0 -5
  266. package/src/View/Dashboard/CustomToolbar.js +1 -25
  267. package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
  268. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
  269. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
  270. package/src/View/DataImport/systemFileHandlers.js +1 -1
  271. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
  272. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
  273. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
  274. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
  275. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
  276. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
  277. package/src/View/GridFilter/GridFilterPopup.js +0 -1
  278. package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
  279. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
  280. package/src/View/Layout/LayoutViewPanel.js +0 -2
  281. package/src/View/Layout/PivotDetailsPopoup.js +0 -2
  282. package/src/View/Layout/TransposedPopup.js +0 -7
  283. package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
  284. package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
  285. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
  286. package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
  287. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
  288. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
  289. package/src/View/Note/NotePopup.js +0 -1
  290. package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
  291. package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
  292. package/src/View/StatusBar/StatusBarPanel.js +0 -8
  293. package/src/View/StatusBar/StatusBarPopup.js +0 -2
  294. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
  295. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
  296. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
  297. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
  298. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
  299. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
  300. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
  301. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
  302. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
  303. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
  304. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
  305. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
  306. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
  307. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
  308. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
  309. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
  310. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
  311. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
  312. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
  313. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
  314. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
  315. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
  316. package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
  317. package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
  318. package/src/View/Theme/ThemeSelector.js +0 -1
  319. package/src/View/UIHelper.js +0 -6
  320. package/src/View/UIInterfaces.js +0 -1
  321. package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
  322. package/src/View/Wizard/OnePageWizards.js +2 -9
  323. package/src/View/Wizard/SummaryColorTag.js +0 -1
  324. package/src/View/Wizard/useKeyboardNavigation.js +1 -3
  325. package/src/agGrid/Adaptable.js +0 -12
  326. package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
  327. package/src/agGrid/AdaptableAgGrid.js +3 -482
  328. package/src/agGrid/AdaptableFilterHandler.js +0 -5
  329. package/src/agGrid/AdaptableLogger.js +0 -6
  330. package/src/agGrid/AgGridAdapter.js +3 -90
  331. package/src/agGrid/AgGridColumnAdapter.js +6 -168
  332. package/src/agGrid/AgGridExportAdapter.js +4 -106
  333. package/src/agGrid/AgGridFilterAdapter.js +0 -5
  334. package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
  335. package/src/agGrid/AgGridMenuAdapter.js +0 -143
  336. package/src/agGrid/AgGridModulesAdapter.js +0 -2
  337. package/src/agGrid/AgGridOptionsService.js +0 -2
  338. package/src/agGrid/AgGridThemeAdapter.js +0 -7
  339. package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
  340. package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
  341. package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
  342. package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
  343. package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
  344. package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
  345. package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
  346. package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
  347. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
  348. package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
  349. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
  350. package/src/agGrid/index.js +0 -6
  351. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
  352. package/src/components/ColorPicker/ColorPicker.js +0 -6
  353. package/src/components/Combobox/VirtualizedList.js +0 -5
  354. package/src/components/Combobox/index.js +5 -63
  355. package/src/components/Dashboard/Dashboard.js +1 -4
  356. package/src/components/Datepicker/index.js +2 -97
  357. package/src/components/DragAndDropContext/TabList.js +2 -6
  358. package/src/components/Drawer/index.js +0 -7
  359. package/src/components/Dropdown/index.js +0 -1
  360. package/src/components/DropdownButton/index.js +0 -1
  361. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
  362. package/src/components/ExpressionEditor/EditorButton.js +0 -1
  363. package/src/components/ExpressionEditor/EditorInput.js +1 -7
  364. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
  365. package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
  366. package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
  367. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
  368. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
  369. package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
  370. package/src/components/ExpressionEditor/index.js +5 -14
  371. package/src/components/Icon/index.js +0 -2
  372. package/src/components/Input/NumberInput.js +0 -10
  373. package/src/components/Modal/Backdrop.js +0 -1
  374. package/src/components/OverlayTrigger/Overlay.js +0 -1
  375. package/src/components/OverlayTrigger/index.js +3 -15
  376. package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
  377. package/src/components/ResizeObserver/index.js +0 -7
  378. package/src/components/SelectableList/index.js +0 -7
  379. package/src/components/SimpleButton/index.js +2 -16
  380. package/src/components/Tabs/index.js +0 -3
  381. package/src/components/Tag/Tag.js +0 -1
  382. package/src/components/Tag/columnScopeTagHelpers.js +0 -2
  383. package/src/components/Textarea/index.js +1 -8
  384. package/src/components/Toggle/Toggle.js +1 -5
  385. package/src/components/Toggle/ToggleGroup.js +1 -3
  386. package/src/components/ToggleButton/index.js +1 -3
  387. package/src/components/Tree/TreeDropdown/index.js +2 -130
  388. package/src/components/Tree/treeUtils.js +0 -4
  389. package/src/components/WindowModal/WindowModal.js +1 -14
  390. package/src/components/WindowModal/useStacking.js +0 -7
  391. package/src/components/icons/bullet-chart.js +0 -4
  392. package/src/components/icons/icon-style.js +0 -4
  393. package/src/components/icons/index.js +26 -36
  394. package/src/components/icons/range-bar.js +0 -5
  395. package/src/components/icons/star.js +0 -1
  396. package/src/components/twUtils.js +3 -12
  397. package/src/components/ui/calendar.js +1 -9
  398. package/src/components/ui/combobox.js +0 -4
  399. package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
  400. package/src/components/utils/useDraggable.js +0 -4
  401. package/src/components/utils/useProperty.js +0 -18
  402. package/src/devTools/index.js +0 -1
  403. package/src/env.js +2 -2
  404. package/src/layout-manager/src/LMEmitter.js +0 -5
  405. package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
  406. package/src/layout-manager/src/index.js +2 -182
  407. package/src/layout-manager/src/isLayoutEqual.js +0 -1
  408. package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
  409. package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
  410. package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
  411. package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
  412. package/src/lib/utils.js +0 -1
  413. package/src/migration/AdaptableUpgradeHelper.js +0 -2
  414. package/src/migration/VersionUpgrade17.js +0 -33
  415. package/src/migration/VersionUpgrade20.js +1 -21
  416. package/src/migration/VersionUpgrade21.js +0 -3
  417. package/src/migration/VersionUpgrade22.js +0 -11
  418. package/src/migration/VersionUpgrade23.js +0 -73
  419. package/src/parser/src/evaluator.js +0 -1
  420. package/src/parser/src/index.js +0 -1
  421. package/src/parser/src/parser.js +4 -103
  422. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
  423. package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
  424. package/src/parser/src/tokenizer.js +0 -2
  425. package/src/parser/src/utils.js +0 -1
  426. package/src/renderReactRoot.js +0 -12
  427. package/src/setupDevTools.js +0 -6
  428. package/src/twMerge.js +0 -1
  429. package/src/types.d.ts +1 -1
  430. package/src/types.js +0 -2
  431. package/tsconfig.cjs.tsbuildinfo +1 -1
  432. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
  433. package/src/Utilities/Services/Interface/IMetamodelService.js +0 -2
  434. package/src/Utilities/Services/MetamodelService.d.ts +0 -17
  435. package/src/Utilities/Services/MetamodelService.js +0 -167
  436. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
  437. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -104
  438. package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
  439. package/src/metamodel/adaptable-metamodel-model.js +0 -2
  440. package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
  441. package/src/metamodel/adaptable.metamodel.js +0 -1
@@ -55,7 +55,6 @@ const NON_PERSIST_ACTIONS = {
55
55
  '@@redux/init': true,
56
56
  [LOAD_STATE]: true,
57
57
  [INIT_STATE]: true,
58
- // progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
59
58
  [PopupRedux_1.PROGRESS_INDICATOR_SHOW]: true,
60
59
  [PopupRedux_1.PROGRESS_INDICATOR_HIDE]: true,
61
60
  };
@@ -90,7 +89,7 @@ class AdaptableStore {
90
89
  currentStorageState;
91
90
  previousStorageState;
92
91
  loadStorageInProgress = false;
93
- loadStateOnStartup = true; // set to false if you want no state
92
+ loadStateOnStartup = true;
94
93
  on = (eventName, callback) => {
95
94
  return this.emitter.on(eventName, callback);
96
95
  };
@@ -103,22 +102,12 @@ class AdaptableStore {
103
102
  emit = (eventName, data) => {
104
103
  return this.emitter.emit(eventName, data);
105
104
  };
106
- /**
107
- *
108
- * @param adaptable The Adaptable instance
109
- * @param postLoadHook A function that hydrates the state after it has been loaded from storage
110
- */
111
105
  constructor(adaptable) {
112
- /*
113
- This is the main store for Adaptable State
114
- */
115
106
  let rootReducerObject = {
116
- // Reducers for Non-Persisted State
117
107
  Popup: PopupRedux.PopupReducer,
118
108
  Internal: InternalRedux.InternalReducer,
119
109
  Plugins: PluginsRedux.PluginsReducer,
120
110
  Comment: CommentsRedux.CommentsReducer,
121
- // Reducers for Persisted State
122
111
  Alert: AlertRedux.AlertReducer,
123
112
  Application: ApplicationRedux.ApplicationReducer,
124
113
  CalculatedColumn: CalculatedColumnRedux.CalculatedColumnReducer,
@@ -142,7 +131,6 @@ class AdaptableStore {
142
131
  ToolPanel: ToolPanelRedux.ToolPanelReducer,
143
132
  UserInterface: UserInterfaceRedux.UserInterfaceReducer,
144
133
  };
145
- // allow plugins to participate in the root reducer
146
134
  adaptable.forPlugins((plugin) => {
147
135
  if (plugin.rootReducer) {
148
136
  rootReducerObject = {
@@ -151,9 +139,7 @@ class AdaptableStore {
151
139
  };
152
140
  }
153
141
  });
154
- const initialRootReducer =
155
- // @ts-ignore
156
- Redux.combineReducers(rootReducerObject);
142
+ const initialRootReducer = Redux.combineReducers(rootReducerObject);
157
143
  const rootReducerWithResetManagement = (state, action) => {
158
144
  switch (action.type) {
159
145
  case LOAD_STATE:
@@ -168,9 +154,6 @@ class AdaptableStore {
168
154
  let storageEngine;
169
155
  this.emitter = new Emitter_1.default();
170
156
  this.beforeEmitter = new Emitter_1.default();
171
- // If the user has remote storage set then we use Remote Engine, otherwise we use Local Enginge
172
- // not sure we can do this as we need to be backwardly compatible with existing users so need to stick with adaptable id (which should be unique)
173
- // const localStorageKey = 'adaptable-adaptable-state-' + adaptable.adaptableOptions.primaryKey;
174
157
  storageEngine = (0, AdaptableReduxLocalStorageEngine_1.createEngine)({
175
158
  adaptableId: adaptable.adaptableOptions.adaptableId,
176
159
  adaptableStateKey: adaptable.adaptableOptions.adaptableStateKey,
@@ -188,7 +171,6 @@ class AdaptableStore {
188
171
  return state?.[key] !== newState?.[key];
189
172
  });
190
173
  };
191
- // this is now VERY BADLY NAMED!
192
174
  let rootReducer = (0, AdaptableReduxMerger_1.mergeReducer)(rootReducerWithResetManagement, LOAD_STATE);
193
175
  const composeEnhancers = (x) => x;
194
176
  const persistedReducer = (state, action) => {
@@ -197,9 +179,6 @@ class AdaptableStore {
197
179
  }
198
180
  const init = state === undefined;
199
181
  const newState = rootReducer(state, action);
200
- // ideally the reducer should be pure,
201
- // but having the emitter emit the event here
202
- // is really useful
203
182
  const emitterArg = { action, state, newState };
204
183
  if (!NON_PERSIST_ACTIONS[action.type]) {
205
184
  this.emitter.emit(action.type, emitterArg);
@@ -232,10 +211,6 @@ class AdaptableStore {
232
211
  });
233
212
  const isProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
234
213
  if (!wasProgressActive && isProgressActive) {
235
- // double rAF: first frame lets React render + ProgressIndicator's
236
- // useEffect schedule its own rAF for setVisible(); second frame
237
- // runs after the browser has actually painted the indicator
238
- // see #raf_progress_indicator
239
214
  requestAnimationFrame(() => {
240
215
  requestAnimationFrame(() => {
241
216
  next(action);
@@ -254,13 +229,11 @@ class AdaptableStore {
254
229
  }
255
230
  });
256
231
  const middlewares = [
257
- beforeEmitterMiddleware, // fires before anything else processes the action
232
+ beforeEmitterMiddleware,
258
233
  devToolsActionMarkerMiddleware,
259
- adaptableMiddleware(adaptable), // the main middleware that actually does stuff,
260
- ...pluginsMiddleware, // the plugins middleware
234
+ adaptableMiddleware(adaptable),
235
+ ...pluginsMiddleware,
261
236
  ].filter(Boolean);
262
- //TODO: need to check if we want the storage to be done before or after
263
- //we enrich the state with the AB middleware
264
237
  this.TheStore = Redux.createStore(persistedReducer, composeEnhancers(Redux.applyMiddleware(...middlewares)));
265
238
  this.storageEngine = storageEngine;
266
239
  }
@@ -287,7 +260,6 @@ class AdaptableStore {
287
260
  const { adaptable, adaptableStateKey, initialState, postLoadHook } = config;
288
261
  const postProcessState = postLoadHook ?? ((state) => state);
289
262
  this.storageEngine.setStateKey(adaptableStateKey);
290
- // START STATE LOAD
291
263
  this.loadStorageInProgress = true;
292
264
  return (this.Load = this.storageEngine
293
265
  .load(adaptable, initialState)
@@ -298,14 +270,10 @@ class AdaptableStore {
298
270
  })
299
271
  .then(() => {
300
272
  this.TheStore.dispatch((0, exports.InitState)());
301
- // END STATE LOAD
302
273
  this.loadStorageInProgress = false;
303
274
  }, (e) => {
304
275
  adaptable.api.consoleError('Failed to load saved Adaptable state.', e);
305
- //for now i'm still initializing Adaptable even if loading state has failed....
306
- //we may revisit that later
307
276
  this.TheStore.dispatch((0, exports.InitState)());
308
- // END STATE LOAD
309
277
  this.loadStorageInProgress = false;
310
278
  this.TheStore.dispatch(PopupRedux.PopupShowAlert({
311
279
  alertType: 'generic',
@@ -420,22 +388,11 @@ function coerceMarkerDetailValue(value) {
420
388
  return '[unserializable]';
421
389
  }
422
390
  }
423
- // this is the main function for dealing with Redux Actions which require additional functionality to be triggered.
424
- // Please document each use case where we have to use the Store rather than a module or a popup screen
425
- // This should ideally be the ONLY place where we LISTEN to store changes
426
391
  const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
427
392
  return function (next) {
428
393
  return function (action) {
429
394
  switch (action.type) {
430
- /*******************
431
- * NAMED QUERY ACTIONS
432
- *******************/
433
- /**
434
- * Use Case: User has deleted a Named Query
435
- * Action: Check whether it is referenced elsewhere before deleting
436
- */
437
395
  case NamedQueryRedux.NAMED_QUERY_DELETE: {
438
- // check if Named Query is not referenced elsewhere
439
396
  const actionTyped = action;
440
397
  if (!adaptable.api.namedQueryApi.internalApi.validateDeletedNamedQuery(actionTyped.namedQuery.Name)) {
441
398
  return;
@@ -443,10 +400,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
443
400
  const ret = next(action);
444
401
  return ret;
445
402
  }
446
- /**
447
- * Use Case: User has renamed a Named Query
448
- * Action: Check whether it is referenced elsewhere before allowing rename
449
- */
450
403
  case NamedQueryRedux.NAMED_QUERY_EDIT: {
451
404
  const actionTyped = action;
452
405
  const editedNamedQuery = actionTyped.namedQuery;
@@ -461,17 +414,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
461
414
  const ret = next(action);
462
415
  return ret;
463
416
  }
464
- /*******************
465
- * System Row Summary ACTIONS
466
- *******************/
467
417
  case InternalRedux.SUMMARY_ROW_SET: {
468
418
  let nextAction = next(action);
469
419
  adaptable.api.layoutApi.internalApi.setupRowSummaries();
470
420
  return nextAction;
471
421
  }
472
- /*******************
473
- * System Quick Filter ACTIONS
474
- *******************/
475
422
  case InternalRedux.QUICK_FILTER_BAR_SHOW: {
476
423
  let nextAction = next(action);
477
424
  adaptable.showQuickFilter();
@@ -482,9 +429,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
482
429
  adaptable.hideQuickFilter();
483
430
  return nextAction;
484
431
  }
485
- /*******************
486
- * ALERT DEFINITION ACTIONS
487
- *******************/
488
432
  case AlertRedux.ALERT_DEFINITION_ADD:
489
433
  case AlertRedux.ALERT_DEFINITION_EDIT:
490
434
  case AlertRedux.ALERT_DEFINITION_DELETE:
@@ -499,7 +443,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
499
443
  (returnAction.type === AlertRedux.ALERT_DEFINITION_ADD ||
500
444
  returnAction.type === AlertRedux.ALERT_DEFINITION_EDIT ||
501
445
  returnAction.type === AlertRedux.ALERT_DEFINITION_UNSUSPEND)) {
502
- // in case of edit, the existing reactive alert will be deleted and recreated
503
446
  adaptable.api.internalApi.getAlertService().createReactiveAlert(alertDefinition);
504
447
  }
505
448
  if (!(0, ScheduledAlertHelper_1.isScheduledAlertDefinition)(alertDefinition) &&
@@ -529,9 +472,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
529
472
  }
530
473
  });
531
474
  }
532
- // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
533
475
  adaptable.updateColumnModelAndRefreshGrid();
534
- // tell Alert Module to check if need to listen to Cell Change
535
476
  let module = (adaptable.adaptableModules.get(ModuleConstants.AlertModuleId));
536
477
  if (module) {
537
478
  module.checkListenToCellDataChanged();
@@ -539,9 +480,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
539
480
  (0, ScheduledJobsMiddlewareHelper_1.refreshScheduledAlertJobs)(adaptable);
540
481
  return returnAction;
541
482
  }
542
- /*******************
543
- * Flashing Cell ACTIONS
544
- *******************/
545
483
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_ADD:
546
484
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_EDIT:
547
485
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_DELETE:
@@ -550,27 +488,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
550
488
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_UNSUSPEND_ALL:
551
489
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_SUSPEND_ALL: {
552
490
  const returnAction = next(action);
553
- // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
554
491
  adaptable.updateColumnModelAndRefreshGrid();
555
- // check if cell data change listening needs to be activated
556
492
  let module = (adaptable.adaptableModules.get(ModuleConstants.FlashingCellModuleId));
557
493
  if (module) {
558
494
  module.checkListenToCellDataChanged();
559
495
  }
560
496
  return returnAction;
561
497
  }
562
- /*******************
563
- * FREE TEXT COLUMN ACTIONS
564
- *******************/
565
- /**
566
- * Use Case: We have added / edited / deleted a Free Text Column
567
- * Actions: We check if a deleted Column has references and return if so
568
- * Actions: We update the Special ColumnDefs and refresh the Layout
569
- */
570
498
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_ADD:
571
499
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_EDIT:
572
500
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_DELETE: {
573
- // First check to see Deleted Free Text Column is referenced elsewhwere and return if so
574
501
  if (action.type === FreeTextColumnRedux.FREE_TEXT_COLUMN_DELETE) {
575
502
  const actionTyped = action;
576
503
  if (!adaptable.api.freeTextColumnApi.internalApi.validateDeletedFreeTextColumn(actionTyped.freeTextColumn)) {
@@ -578,7 +505,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
578
505
  }
579
506
  }
580
507
  const returnAction = next(action);
581
- // Check listen to Cell Data Changes and refresh the layout
582
508
  let module = (adaptable.adaptableModules.get(ModuleConstants.FreeTextColumnModuleId));
583
509
  if (module) {
584
510
  module.checkListenToCellDataChanged();
@@ -586,26 +512,17 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
586
512
  adaptable.api.layoutApi.internalApi.refreshLayout();
587
513
  return returnAction;
588
514
  }
589
- /*******************
590
- * CALCULATED COLUMN ACTIONS
591
- *******************/
592
- /**
593
- * Use Case: We have added / edited / deleted a Calculated Column
594
- * Action: We update the Special ColumnDefs and refresh the Layout
595
- */
596
515
  case CalculatedColumnRedux.CALCULATED_COLUMN_ADD:
597
516
  case CalculatedColumnRedux.CALCULATED_COLUMN_EDIT:
598
517
  case CalculatedColumnRedux.CALCULATED_COLUMN_DELETE: {
599
518
  const actionTypedCC = action;
600
519
  const calculatedColumn = actionTypedCC.calculatedColumn;
601
- // First check for Deleted Calculated Columns with references and return if found
602
520
  if (action.type === CalculatedColumnRedux.CALCULATED_COLUMN_DELETE) {
603
521
  if (!adaptable.api.calculatedColumnApi.internalApi.validateDeletedCalculatedColumn(calculatedColumn)) {
604
522
  return;
605
523
  }
606
524
  }
607
525
  const returnAction = next(action);
608
- // Manage Aggregations, fire Event, set up listener and refresh Layout
609
526
  if (action.type === CalculatedColumnRedux.CALCULATED_COLUMN_ADD ||
610
527
  action.type === CalculatedColumnRedux.CALCULATED_COLUMN_EDIT) {
611
528
  adaptable.api.internalApi
@@ -625,13 +542,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
625
542
  adaptable.api.layoutApi.internalApi.refreshLayout();
626
543
  return returnAction;
627
544
  }
628
- /*******************
629
- * RENDERED COLUMN ACTIONS
630
- *******************/
631
- /**
632
- * Use Case: We have updated an AdapTable Module that affects rendering
633
- * Action: We set up all columns again
634
- */
635
545
  case QuickSearchRedux.QUICK_SEARCH_SET_CELL_MATCHING_STYLE:
636
546
  case QuickSearchRedux.QUICK_SEARCH_SET_TEXT_MATCHING_STYLE:
637
547
  case QuickSearchRedux.QUICK_SEARCH_SET_CURRENT_TEXT_MATCHING_STYLE: {
@@ -669,25 +579,15 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
669
579
  case CustomSortRedux.CUSTOM_SORT_SUSPEND_ALL:
670
580
  case CustomSortRedux.CUSTOM_SORT_UNSUSPEND_ALL: {
671
581
  const returnAction = next(action);
672
- // called also for alert actions, see ALERT ACTIONS block
673
582
  adaptable.updateColumnModelAndRefreshGrid();
674
583
  return returnAction;
675
584
  }
676
- /*******************
677
- * QUICK SEARCH ACTIONS
678
- *******************/
679
- /**
680
- * Use Case: User has run a Quick Search
681
- * Action1: Call Adaptable to redraw body so cells can be highlighted
682
- * Action2: Run Query using Quick Search text
683
- */
684
585
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
685
586
  let returnAction = next(action);
686
587
  const actionTyped = action;
687
588
  const searchText = actionTyped.quickSearchText;
688
589
  adaptable.setAgGridFindSearchValue(searchText);
689
590
  adaptable.api.gridApi.refreshAllCells(true);
690
- // if set then return a query on the text
691
591
  if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
692
592
  if (StringExtensions_1.StringExtensions.IsNotNullOrEmpty(searchText)) {
693
593
  adaptable.setAgGridQuickSearch(searchText);
@@ -698,13 +598,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
698
598
  }
699
599
  return returnAction;
700
600
  }
701
- /*******************
702
- * INTERNAL ACTIONS
703
- *******************/
704
- /**
705
- * Use Case: User has deleted a System Alert which has a Highlight Cell or Highlight Row
706
- * Action: Refresh the cell / Row (to clear the Highlight)
707
- */
708
601
  case InternalRedux.ALERT_DELETE: {
709
602
  const actionTyped = action;
710
603
  let ret = next(action);
@@ -722,10 +615,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
722
615
  }
723
616
  return ret;
724
617
  }
725
- /**
726
- * Use Case: User has deleted all System Alerts some of which have a Highlight Cell
727
- * Action: Refresh the cell (to clear the style)
728
- */
729
618
  case InternalRedux.ALERT_DELETE_ALL: {
730
619
  const actionTyped = action;
731
620
  let ret = next(action);
@@ -745,10 +634,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
745
634
  });
746
635
  return ret;
747
636
  }
748
- /**
749
- * Use Case: A System Alert had a Highlight Cell with a limited duration
750
- * Action: Refresh the cell (to clear the style)
751
- */
752
637
  case InternalRedux.ALERT_REMOVE_CELL_HIGHLIGHT: {
753
638
  let ret = next(action);
754
639
  const actionTyped = action;
@@ -902,14 +787,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
902
787
  adaptable.api.internalApi.setCellSummaryInfo(apiSummaryReturn);
903
788
  return returnAction;
904
789
  }
905
- /*******************
906
- * DATA SOURCE ACTIONS
907
- *******************/
908
- /**
909
- * Use Case: Data Sources have been amended
910
- * Action1: Fire Data Source Changed event
911
- * Action2: Display a DataSet form if supplied
912
- */
913
790
  case InternalRedux.DATA_SET_SELECT: {
914
791
  let returnAction = next(action);
915
792
  const dataSet = adaptable.api.dataSetApi.getCurrentDataSet();
@@ -921,25 +798,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
921
798
  }
922
799
  return returnAction;
923
800
  }
924
- /*******************
925
- * THEME ACTIONS
926
- *******************/
927
- /**
928
- * Use Case: Theme has changed
929
- * Action: Apply new Theme
930
- */
931
801
  case ThemeRedux.THEME_SELECT: {
932
802
  let returnAction = next(action);
933
803
  adaptable.api.themeApi.applyCurrentTheme();
934
804
  return returnAction;
935
805
  }
936
- /*******************
937
- * Note ACTIONS
938
- *******************/
939
- /**
940
- * Use Case: Note has been edited/deleted/added
941
- * Action: Triangle can be removed/added
942
- */
943
806
  case NoteRedux.NOTE_ADD:
944
807
  case NoteRedux.NOTE_EDIT:
945
808
  case NoteRedux.NOTE_DELETE: {
@@ -949,13 +812,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
949
812
  adaptable.api.gridApi.refreshCell(rowNode, returnAction.adaptableNote.ColumnId, true);
950
813
  return returnAction;
951
814
  }
952
- /*******************
953
- * Comment ACTIONS
954
- *******************/
955
- /**
956
- * Use Case: Comments has been edited/deleted/added
957
- * Action: Triangle can be removed/added
958
- */
959
815
  case CommentsRedux.COMMENT_ADD:
960
816
  case CommentsRedux.COMMENT_EDIT:
961
817
  case CommentsRedux.COMMENT_DELETE:
@@ -1004,9 +860,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1004
860
  deletedCommentThreads.push(commentThread);
1005
861
  }
1006
862
  }
1007
- // This cannot be called because it would trigger an infinite loop
1008
- // adaptable.api.eventApi.emit('CommentChanged', commentThreads);
1009
- // refresh all comments cells to show or hide the triangle
1010
863
  [...addedCommentThreads, ...deletedCommentThreads].forEach((commentThread) => {
1011
864
  const node = adaptable.api.gridApi.getRowNodeForPrimaryKey(commentThread.PrimaryKeyValue);
1012
865
  if (node && commentThread.ColumnId) {
@@ -1016,9 +869,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1016
869
  });
1017
870
  return returnAction;
1018
871
  }
1019
- /*******************
1020
- * SCHEDULED JOB ACTIONS (export report schedules)
1021
- *******************/
1022
872
  case ExportRedux.EXPORT_ENSURE_SCHEDULE_UUIDS:
1023
873
  case ExportRedux.SCHEDULED_REPORT_ADD:
1024
874
  case ExportRedux.SCHEDULED_REPORT_EDIT:
@@ -1029,34 +879,24 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1029
879
  (0, ScheduledJobsMiddlewareHelper_1.refreshScheduledReportJobs)(adaptable);
1030
880
  return returnAction;
1031
881
  }
1032
- /*******************
1033
- * USER INTERFACE ACTIONS
1034
- *******************/
1035
882
  case UserInterfaceRedux.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI: {
1036
883
  const returnAction = next(action);
1037
884
  const { hideAdaptableUI } = action;
1038
- // Hide or show Dashboard
1039
885
  middlewareAPI.dispatch(DashboardRedux.DashboardSetIsHidden(hideAdaptableUI));
1040
- // Hide or show Adaptable ToolPanel in the AG Grid sidebar
1041
886
  if (hideAdaptableUI) {
1042
887
  adaptable.hideAdaptableToolPanel();
1043
888
  }
1044
889
  else {
1045
890
  adaptable.showAdaptableToolPanel();
1046
891
  }
1047
- // Hide or show Adaptable StatusBar panels
1048
892
  if (hideAdaptableUI) {
1049
893
  adaptable.hideAdaptableStatusBar();
1050
894
  }
1051
895
  else {
1052
896
  adaptable.showAdaptableStatusBar();
1053
897
  }
1054
- // Column and Context Menus are handled in the AgGridMenuAdapter
1055
898
  return returnAction;
1056
899
  }
1057
- /*******************
1058
- * DASHBOARD ACTIONS
1059
- *******************/
1060
900
  case DashboardRedux.DASHBOARD_SET_IS_COLLAPSED:
1061
901
  case DashboardRedux.DASHBOARD_SET_MODULE_BUTTONS:
1062
902
  case DashboardRedux.DASHBOARD_ACTIVE_TAB_INDEX_CHANGE:
@@ -1071,16 +911,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1071
911
  adaptable.api.eventApi.internalApi.fireDashboardChangedEvent(action.type, oldDashboardState, newDashboardState);
1072
912
  return returnAction;
1073
913
  }
1074
- /*******************
1075
- * LAYOUT ACTIONS
1076
- *******************/
1077
914
  case LayoutRedux.LAYOUT_ADD:
1078
915
  case LayoutRedux.LAYOUT_EDIT:
1079
916
  case LayoutRedux.LAYOUT_SAVE:
1080
917
  case LayoutRedux.LAYOUT_DELETE:
1081
918
  case LayoutRedux.LAYOUT_SELECT: {
1082
919
  const oldLayoutState = middlewareAPI.getState().Layout;
1083
- // this must be called before 'next(action)'
1084
920
  const previousLayout = adaptable.api.layoutApi.getCurrentLayout();
1085
921
  let returnAction = next(action);
1086
922
  const newLayoutState = middlewareAPI.getState().Layout;
@@ -1091,12 +927,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1091
927
  GeneralConstants_1.ERROR_LAYOUT;
1092
928
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
1093
929
  returnAction.type == LayoutRedux.LAYOUT_DELETE) {
1094
- // tell AdapTable the Layout has been selected
1095
930
  if (newLayout) {
1096
931
  adaptable.updateLayoutInManagerAfterStoreHasChanged(newLayout);
1097
932
  }
1098
933
  }
1099
- // !!! filter refresh has to be AFTER the layout has been set in the store
1100
934
  let refreshColumnFilters = false;
1101
935
  if (adaptable.api.filterApi.columnFilterApi.internalApi.areColumnFiltersDifferent(oldLayout.ColumnFilters, newLayout.ColumnFilters)) {
1102
936
  refreshColumnFilters = true;
@@ -1108,24 +942,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1108
942
  if (refreshColumnFilters || refreshGridFilter) {
1109
943
  adaptable.applyFiltering({ updateColumnFilterModel: refreshColumnFilters });
1110
944
  }
1111
- // when changing current layout via the api, the layout should update
1112
945
  if (returnAction.type == LayoutRedux.LAYOUT_SAVE) {
1113
946
  const savingLayout = returnAction.layout;
1114
947
  if (previousLayout.Name === savingLayout.Name &&
1115
948
  previousLayout !== savingLayout &&
1116
- // objects may have changed, but have the same contents
1117
- // this prevents pivot layout from infinite set-layout
1118
949
  !adaptable.api.layoutApi.internalApi.areLayoutsEqual(previousLayout, savingLayout)) {
1119
950
  adaptable.updateLayoutInManagerAfterStoreHasChanged(savingLayout);
1120
951
  }
1121
952
  }
1122
953
  return returnAction;
1123
954
  }
1124
- /**
1125
- * Use Case: Column Filters have changed
1126
- * Action: Apply Column Filtering and fire associated events
1127
- * Note: For LAYOUT_COLUMN_FILTER_EDIT we do not filter (as it seems to be already handled)
1128
- */
1129
955
  case LayoutRedux.LAYOUT_COLUMN_FILTER_ADD:
1130
956
  case LayoutRedux.LAYOUT_COLUMN_FILTER_EDIT:
1131
957
  case LayoutRedux.LAYOUT_COLUMN_FILTER_SET:
@@ -1136,13 +962,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1136
962
  case LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND:
1137
963
  case LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL: {
1138
964
  let returnAction;
1139
- // needs to be called before 'next' so previous and next column filters are known
1140
965
  const shouldTriggerColumnFiltering = adaptable.api.filterApi.columnFilterApi.internalApi.shouldNewColumnFilterTriggerColumnFiltering(action);
1141
966
  const oldLayoutState = middlewareAPI.getState().Layout;
1142
967
  returnAction = next(action);
1143
- // we need to update the current layout model
1144
- // in the layout manager, so that onLayoutChange
1145
- // it will come back with the correct fields
1146
968
  adaptable.silentUpdateCurrentLayoutModel();
1147
969
  if (shouldTriggerColumnFiltering) {
1148
970
  setTimeout(() => {
@@ -1153,10 +975,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1153
975
  adaptable.api.eventApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, middlewareAPI.getState().Layout);
1154
976
  return returnAction;
1155
977
  }
1156
- /**
1157
- * Use Case: Grid Filter has changed
1158
- * Action: Apply Grid Filtering and fire associated events
1159
- */
1160
978
  case LayoutRedux.LAYOUT_GRID_FILTER_SET:
1161
979
  case LayoutRedux.LAYOUT_GRID_FILTER_CLEAR:
1162
980
  case LayoutRedux.LAYOUT_GRID_FILTER_SUSPEND:
@@ -1169,35 +987,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1169
987
  }, 5);
1170
988
  return next(returnAction);
1171
989
  }
1172
- /*******************
1173
- * SMART EDIT ACTIONS
1174
- *******************/
1175
- /**
1176
- * Use Case: User wants to perform Smart Edit and we need to check if the cell selection is valid
1177
- * Action (1): Get the result from the SmartEdit module
1178
- * If the return is an Alert:
1179
- * Action (2): If there is a popup open, close it and show the Alert; otherwise just set false valid selection
1180
- * If the return is valid:
1181
- * Action (2): Set the valid selection to true
1182
- * Action (3): Build the Preview Values (via Smart Edit module)
1183
- * Action (4): Set the Preview Values (this will populate the preview screen)
1184
- */
1185
990
  case InternalRedux.SMARTEDIT_CHECK_CELL_SELECTION: {
1186
991
  let module = (adaptable.adaptableModules.get(ModuleConstants.SmartEditModuleId));
1187
992
  let state = middlewareAPI.getState();
1188
993
  let returnAction = next(action);
1189
994
  let apiReturn = module.CheckCorrectCellSelection();
1190
995
  let popup = state.Popup.ScreenPopup;
1191
- // this is a horrible hack and fix for a weird issue
1192
- // we really need to do smart edit and bulk update better
1193
- // but this fixes it for now
1194
996
  if (popup.ComponentName != 'LayoutPopup') {
1195
997
  if (apiReturn.Alert) {
1196
- // check if Smart Edit is showing as popup and then close and show error (dont want to do that if from toolbar)
1197
998
  if (popup.ComponentName == 'SmartEditPopup') {
1198
- // We are in SmartEditPopup so let's close it
1199
999
  adaptable.api.internalApi.hidePopupScreen();
1200
- // and now show the alert Popup
1201
1000
  adaptable.api.alertApi.displayAdaptableAlertNotification(apiReturn.Alert);
1202
1001
  }
1203
1002
  middlewareAPI.dispatch(InternalRedux.SmartEditSetValidSelection(false));
@@ -1210,16 +1009,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1210
1009
  }
1211
1010
  return returnAction;
1212
1011
  }
1213
- /**
1214
- * Use Case: User has changed a Smmart Edit property or requested a preview
1215
- * Action (1): Get the new preview set from the Smart Edit module
1216
- * Action (2): Set the Preview Values (this will populate the preview screen)
1217
- */
1218
1012
  case InternalRedux.SMART_EDIT_CHANGE_OPERATION:
1219
1013
  case InternalRedux.SMART_EDIT_CHANGE_VALUE:
1220
1014
  case InternalRedux.SMARTEDIT_FETCH_PREVIEW: {
1221
- //all our logic needs to be executed AFTER the main reducers
1222
- //so our state is up to date which allow us not to care about the data within each different action
1223
1015
  let returnAction = next(action);
1224
1016
  let module = (adaptable.adaptableModules.get(ModuleConstants.SmartEditModuleId));
1225
1017
  let state = middlewareAPI.getState();
@@ -1227,11 +1019,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1227
1019
  middlewareAPI.dispatch(InternalRedux.SmartEditSetPreview(apiReturn));
1228
1020
  return returnAction;
1229
1021
  }
1230
- /**
1231
- * Use Case: User has clicked 'Apply' in Smart Edit popup or toolbar
1232
- * Action (1): Gets the values that need to be applied from the Preview Info and passes to Preview Helper (incl. whether to bypass validation)
1233
- * Action (2): Sets the cell values in the Grid
1234
- */
1235
1022
  case SmartEditRedux.SMART_EDIT_APPLY: {
1236
1023
  const actionTyped = action;
1237
1024
  let thePreview = middlewareAPI.getState().Internal.SmartEdit.SmartEditPreviewInfo;
@@ -1240,25 +1027,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1240
1027
  adaptable.api.internalApi.hidePopupScreen();
1241
1028
  return next(action);
1242
1029
  }
1243
- /*******************
1244
- * BULK UPDATE ACTIONS
1245
- *******************/
1246
1030
  case InternalRedux.BULK_UPDATE_CHECK_CELL_SELECTION: {
1247
1031
  let module = (adaptable.adaptableModules.get(ModuleConstants.BulkUpdateModuleId));
1248
1032
  let state = middlewareAPI.getState();
1249
1033
  let returnAction = next(action);
1250
1034
  let apiReturn = module.checkCorrectCellSelection();
1251
1035
  let popup = state.Popup.ScreenPopup;
1252
- // this is a horrible hack and fix for a weird issue
1253
- // we really need to do smart edit and bulk update better
1254
- // but this fixes it for now
1255
1036
  if (popup.ComponentName != 'LayoutPopup') {
1256
1037
  if (apiReturn.Alert) {
1257
- // check if BulkUpdate is showing as popup
1258
1038
  if (popup.ComponentName == 'BulkUpdatePopup') {
1259
- //We close the BulkUpdatePopup
1260
1039
  adaptable.api.internalApi.hidePopupScreen();
1261
- //We show the Error Popup -- assume that will alwasy be an Error
1262
1040
  adaptable.api.alertApi.displayAdaptableAlertNotification(apiReturn.Alert);
1263
1041
  }
1264
1042
  }
@@ -1266,10 +1044,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1266
1044
  }
1267
1045
  return returnAction;
1268
1046
  }
1269
- // Here we have all actions that triggers a refresh of the BulkUpdatePreview
1270
1047
  case InternalRedux.BULK_UPDATE_CHANGE_VALUE: {
1271
- //all our logic needs to be executed AFTER the main reducers
1272
- //so our state is up to date which allow us not to care about the data within each different action
1273
1048
  let returnAction = next(action);
1274
1049
  let module = (adaptable.adaptableModules.get(ModuleConstants.BulkUpdateModuleId));
1275
1050
  let state = middlewareAPI.getState();
@@ -1285,13 +1060,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1285
1060
  adaptable.api.internalApi.hidePopupScreen();
1286
1061
  return next(action);
1287
1062
  }
1288
- /*******************
1289
- * PLUS MINUS ACTIONS
1290
- *******************/
1291
- /**
1292
- * Use Case: Plus Minus Rules have changed
1293
- * Action: Get Plus Minus module to know if it needs to listen to keydown
1294
- */
1295
1063
  case PlusMinusRedux.PLUS_MINUS_RULE_ADD:
1296
1064
  case PlusMinusRedux.PLUS_MINUS_RULE_EDIT:
1297
1065
  case PlusMinusRedux.PLUS_MINUS_RULE_DELETE:
@@ -1306,23 +1074,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1306
1074
  }
1307
1075
  return returnAction;
1308
1076
  }
1309
- /**
1310
- * Use Case: Plus Minus has been applied
1311
- * Action: update the grid cells
1312
- */
1313
1077
  case PlusMinusRedux.PLUS_MINUS_APPLY: {
1314
1078
  let returnAction = next(action);
1315
1079
  const actionTyped = action;
1316
1080
  adaptable.api.gridApi.setCellValues(actionTyped.cellUpdateRequests);
1317
1081
  return returnAction;
1318
1082
  }
1319
- /*******************
1320
- * SHORTCUT ACTIONS
1321
- *******************/
1322
- /**
1323
- * Use Case: Shortcuts have changed
1324
- * Action: Get Shortcut module to know if it needs to listen to keydown
1325
- */
1326
1083
  case ShortcutRedux.SHORTCUT_ADD:
1327
1084
  case ShortcutRedux.SHORTCUT_EDIT:
1328
1085
  case ShortcutRedux.SHORTCUT_DELETE: {
@@ -1333,10 +1090,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1333
1090
  }
1334
1091
  return returnAction;
1335
1092
  }
1336
- /*******************
1337
- * EXPORT ACTIONS
1338
- *******************/
1339
- // When selected report is undefined, clear the format
1340
1093
  case ExportRedux.REPORT_SELECT: {
1341
1094
  const actionTyped = action;
1342
1095
  let returnAction = next(action);
@@ -1346,7 +1099,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1346
1099
  }
1347
1100
  return returnAction;
1348
1101
  }
1349
- // When deleting a report, if it is currently selected clear it
1350
1102
  case ExportRedux.REPORT_DELETE: {
1351
1103
  const actionTyped = action;
1352
1104
  let report = actionTyped.report;
@@ -1358,9 +1110,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1358
1110
  (0, ScheduledJobsMiddlewareHelper_1.refreshScheduledReportJobs)(adaptable);
1359
1111
  return returnAction;
1360
1112
  }
1361
- /*******************
1362
- * CHARTING ACTIONS
1363
- *******************/
1364
1113
  case ChartingRedux.CHARTING_DELETE_CHART: {
1365
1114
  const deleteAction = action;
1366
1115
  (0, ChartHelper_1.closeAgChartDefinitionIfOpen)(adaptable.api, deleteAction.chartDefinition);
@@ -1372,9 +1121,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1372
1121
  adaptable.api.chartingApi.internalApi.onDeleteExternalChart(returnAction.chartDefinition);
1373
1122
  return returnAction;
1374
1123
  }
1375
- /*******************
1376
- * TEAM SHARING ACTIONS
1377
- *******************/
1378
1124
  case TeamSharingRedux.TEAMSHARING_GET: {
1379
1125
  let returnAction = next(action);
1380
1126
  adaptable.api.teamSharingApi
@@ -1399,7 +1145,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1399
1145
  let returnAction = next(action);
1400
1146
  const { Entity, Configuration } = actionTyped;
1401
1147
  let shareSuccessful;
1402
- // load latest state from TeamSharing server
1403
1148
  adaptable.api.teamSharingApi
1404
1149
  .loadSharedEntities()
1405
1150
  .then((sharedEntities) => {
@@ -1408,7 +1153,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1408
1153
  .buildCustomSharedEntity(Entity, Configuration);
1409
1154
  let newCustomShare = true;
1410
1155
  const updatedSharedEntities = sharedEntities.map((entity) => {
1411
- // if it has the same UUID, override it
1412
1156
  if ((0, TeamSharingState_1.isCustomSharedEntity)(entity) && entity.Uuid === customSharedEntity.Uuid) {
1413
1157
  newCustomShare = false;
1414
1158
  return {
@@ -1423,7 +1167,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1423
1167
  updatedSharedEntities.push(customSharedEntity);
1424
1168
  }
1425
1169
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(updatedSharedEntities));
1426
- // update the server state
1427
1170
  shareSuccessful = true;
1428
1171
  return adaptable.api.teamSharingApi.persistSharedEntities(updatedSharedEntities);
1429
1172
  })
@@ -1437,20 +1180,14 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1437
1180
  });
1438
1181
  return returnAction;
1439
1182
  }
1440
- // share the given AdaptableObject:
1441
- // - if it has dependencies, share them as well
1442
- // - if it's active, ensure that there is not already one present
1443
- // - if it's active, all the dependencies will be active as well
1444
1183
  case TeamSharingRedux.TEAMSHARING_SHARE: {
1445
1184
  const actionTyped = action;
1446
1185
  let returnAction = next(action);
1447
1186
  const { Entity, Configuration, Module } = actionTyped;
1448
1187
  let shareSuccessful;
1449
- // load latest state from TeamSharing server
1450
1188
  adaptable.api.teamSharingApi
1451
1189
  .loadSharedEntities()
1452
1190
  .then((sharedEntities) => {
1453
- // check if there is not already one active SharedEntity for this object
1454
1191
  const existingActiveSharedEntity = Configuration.type === 'Active' &&
1455
1192
  middlewareAPI.getState().TeamSharing.ActiveSharedEntityMap[Entity.Uuid];
1456
1193
  if (existingActiveSharedEntity) {
@@ -1464,15 +1201,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1464
1201
  shareSuccessful = false;
1465
1202
  return;
1466
1203
  }
1467
- // build the new shared entities incl. all their dependencies
1468
1204
  const newSharedEntityInclDependencies = adaptable.api.internalApi
1469
1205
  .getTeamSharingService()
1470
1206
  .buildSharedEntityWithDependencies(Entity, Module, Configuration);
1471
1207
  sharedEntities.push(...newSharedEntityInclDependencies);
1472
- // update the local state
1473
1208
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newSharedEntityInclDependencies.filter((sharedEntity) => sharedEntity.Type === 'Active')));
1474
1209
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(sharedEntities));
1475
- // update the server state
1476
1210
  shareSuccessful = true;
1477
1211
  return adaptable.api.teamSharingApi.persistSharedEntities(sharedEntities);
1478
1212
  })
@@ -1499,17 +1233,13 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1499
1233
  });
1500
1234
  return returnAction;
1501
1235
  }
1502
- // remove the given shared entity:
1503
- // - ensure that no other shared entities depend on it
1504
1236
  case TeamSharingRedux.TEAMSHARING_REMOVE_ITEM: {
1505
1237
  let returnAction = next(action);
1506
1238
  const actionTyped = action;
1507
1239
  const removedEntityId = actionTyped.Uuid;
1508
- // load latest state from TeamSharing server
1509
1240
  adaptable.api.teamSharingApi
1510
1241
  .loadSharedEntities()
1511
1242
  .then((sharedEntities) => {
1512
- // ensure that no other SharedDependencies reference the to-be-deleted entity
1513
1243
  const adaptableSharedEntities = sharedEntities.filter(TeamSharingState_1.isAdaptableSharedEntity);
1514
1244
  const sharedEntityDependants = adaptable.api.internalApi
1515
1245
  .getTeamSharingService()
@@ -1527,10 +1257,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1527
1257
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
1528
1258
  return;
1529
1259
  }
1530
- // remove the deleted SharedEntity from local state
1531
1260
  const newSharedEntities = sharedEntities.filter((s) => s.Uuid !== removedEntityId);
1532
1261
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(newSharedEntities));
1533
- // update TeamSharing server
1534
1262
  return adaptable.api.teamSharingApi.persistSharedEntities(newSharedEntities);
1535
1263
  })
1536
1264
  .catch((error) => {
@@ -1545,10 +1273,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1545
1273
  });
1546
1274
  return returnAction;
1547
1275
  }
1548
- // Import 1. step
1549
- // prepare import of the given shared entity (the actual import is done in 'TEAMSHARING_PROCESS_IMPORT'):
1550
- // - all dependencies will be also included in the import bundle
1551
- // - if there is at least one local AdaptableObject which will be overwritten, display a confirmation pop
1552
1276
  case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
1553
1277
  let returnAction = next(action);
1554
1278
  const actionTyped = action;
@@ -1575,15 +1299,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1575
1299
  }
1576
1300
  return returnAction;
1577
1301
  }
1578
- // Import 2. step
1579
- // import the actual AdaptableObjects (either create or update them)
1580
1302
  case TeamSharingRedux.TEAMSHARING_PROCESS_IMPORT: {
1581
1303
  let returnAction = next(action);
1582
1304
  const actionTyped = action;
1583
1305
  const { ImportSteps } = actionTyped;
1584
1306
  const activeSharedEntities = [];
1585
- // iterate backwards to import the dependencies first
1586
- // it should work also the other way around, but nevertheless...
1587
1307
  for (let i = ImportSteps.length - 1; i >= 0; i--) {
1588
1308
  const { sharedEntity, importAction } = ImportSteps[i];
1589
1309
  if (importAction) {
@@ -1599,7 +1319,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1599
1319
  if (activeSharedEntities.length) {
1600
1320
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...activeSharedEntities));
1601
1321
  }
1602
- // mark the import process as ended after (we assume that) the import is finished
1603
1322
  adaptable.api.teamSharingApi.internalApi
1604
1323
  .waitForTeamSharingImportEnd()
1605
1324
  .then(() => middlewareAPI.dispatch(TeamSharingRedux.TeamSharingCommitImport()))
@@ -1613,13 +1332,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1613
1332
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
1614
1333
  return returnAction;
1615
1334
  }
1616
- // update the active SharedEntity with the latest (updated) state of the local AdaptableObject
1617
- // - if the remote server already has a newer version of it, the update is skipped
1618
1335
  case TeamSharingRedux.TEAMSHARING_UPDATE_ITEM: {
1619
1336
  const returnAction = next(action);
1620
1337
  const actionTyped = action;
1621
1338
  if (middlewareAPI.getState().TeamSharing.importProcessInProgress) {
1622
- // we are in the middle of an import process, we don't have to react to these object changes
1623
1339
  return returnAction;
1624
1340
  }
1625
1341
  const { ChangedAdaptableObject, UserName } = actionTyped;
@@ -1627,12 +1343,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1627
1343
  .loadSharedEntities()
1628
1344
  .then((sharedEntities) => {
1629
1345
  const adaptableSharedEntities = sharedEntities.filter(TeamSharingState_1.isAdaptableSharedEntity);
1630
- // check if remote server has a newer revision
1631
1346
  const [localRevision, remoteRevision] = adaptable.api.internalApi
1632
1347
  .getTeamSharingService()
1633
1348
  .getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, adaptableSharedEntities);
1634
1349
  if (remoteRevision > localRevision) {
1635
- // if remote has a newer version, we will NOT overwrite it
1636
1350
  return;
1637
1351
  }
1638
1352
  const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
@@ -1659,7 +1373,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1659
1373
  adaptable.api.teamSharingApi
1660
1374
  .loadSharedEntities()
1661
1375
  .then((sharedEntities) => {
1662
- // update local state
1663
1376
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(sharedEntities));
1664
1377
  adaptable.api.internalApi.getTeamSharingService().showUpdateNotifications();
1665
1378
  })
@@ -1675,9 +1388,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1675
1388
  });
1676
1389
  return returnAction;
1677
1390
  }
1678
- /*******************
1679
- * POPUP (INTERNAL) ACTIONS
1680
- *******************/
1681
1391
  case PopupRedux.POPUP_SHOW_ALERT: {
1682
1392
  (0, AdaptableToaster_1.showToast)({
1683
1393
  api: adaptable.api,
@@ -1708,15 +1418,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1708
1418
  }
1709
1419
  return next(action);
1710
1420
  }
1711
- /*******************
1712
- * MANAGING STATE ACTIONS
1713
- *******************/
1714
1421
  case INIT_STATE: {
1715
1422
  let returnAction = next(action);
1716
1423
  if (adaptable.isReady) {
1717
- // we need this here for when the state key is changed
1718
- // since we need the transient state to be restored in the same
1719
- // way as when Adaptable is initialised.
1720
1424
  adaptable.ModuleService.createModuleUIItems();
1721
1425
  }
1722
1426
  return returnAction;