@adaptabletools/adaptable 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 +1 -9
  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.esm.tsbuildinfo +1 -1
  432. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
  433. package/src/Utilities/Services/Interface/IMetamodelService.js +0 -1
  434. package/src/Utilities/Services/MetamodelService.d.ts +0 -17
  435. package/src/Utilities/Services/MetamodelService.js +0 -162
  436. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
  437. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -99
  438. package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
  439. package/src/metamodel/adaptable-metamodel-model.js +0 -1
  440. package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
  441. package/src/metamodel/adaptable.metamodel.js +0 -1
@@ -51,7 +51,6 @@ const NON_PERSIST_ACTIONS = {
51
51
  '@@redux/init': true,
52
52
  [LOAD_STATE]: true,
53
53
  [INIT_STATE]: true,
54
- // progress indicators should NOT interfere with state management as it may lead to race conditions due to load/persist state being async
55
54
  [PROGRESS_INDICATOR_SHOW]: true,
56
55
  [PROGRESS_INDICATOR_HIDE]: true,
57
56
  };
@@ -83,7 +82,7 @@ export class AdaptableStore {
83
82
  currentStorageState;
84
83
  previousStorageState;
85
84
  loadStorageInProgress = false;
86
- loadStateOnStartup = true; // set to false if you want no state
85
+ loadStateOnStartup = true;
87
86
  on = (eventName, callback) => {
88
87
  return this.emitter.on(eventName, callback);
89
88
  };
@@ -96,22 +95,12 @@ export class AdaptableStore {
96
95
  emit = (eventName, data) => {
97
96
  return this.emitter.emit(eventName, data);
98
97
  };
99
- /**
100
- *
101
- * @param adaptable The Adaptable instance
102
- * @param postLoadHook A function that hydrates the state after it has been loaded from storage
103
- */
104
98
  constructor(adaptable) {
105
- /*
106
- This is the main store for Adaptable State
107
- */
108
99
  let rootReducerObject = {
109
- // Reducers for Non-Persisted State
110
100
  Popup: PopupRedux.PopupReducer,
111
101
  Internal: InternalRedux.InternalReducer,
112
102
  Plugins: PluginsRedux.PluginsReducer,
113
103
  Comment: CommentsRedux.CommentsReducer,
114
- // Reducers for Persisted State
115
104
  Alert: AlertRedux.AlertReducer,
116
105
  Application: ApplicationRedux.ApplicationReducer,
117
106
  CalculatedColumn: CalculatedColumnRedux.CalculatedColumnReducer,
@@ -135,7 +124,6 @@ export class AdaptableStore {
135
124
  ToolPanel: ToolPanelRedux.ToolPanelReducer,
136
125
  UserInterface: UserInterfaceRedux.UserInterfaceReducer,
137
126
  };
138
- // allow plugins to participate in the root reducer
139
127
  adaptable.forPlugins((plugin) => {
140
128
  if (plugin.rootReducer) {
141
129
  rootReducerObject = {
@@ -144,9 +132,7 @@ export class AdaptableStore {
144
132
  };
145
133
  }
146
134
  });
147
- const initialRootReducer =
148
- // @ts-ignore
149
- Redux.combineReducers(rootReducerObject);
135
+ const initialRootReducer = Redux.combineReducers(rootReducerObject);
150
136
  const rootReducerWithResetManagement = (state, action) => {
151
137
  switch (action.type) {
152
138
  case LOAD_STATE:
@@ -161,9 +147,6 @@ export class AdaptableStore {
161
147
  let storageEngine;
162
148
  this.emitter = new Emitter();
163
149
  this.beforeEmitter = new Emitter();
164
- // If the user has remote storage set then we use Remote Engine, otherwise we use Local Enginge
165
- // 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)
166
- // const localStorageKey = 'adaptable-adaptable-state-' + adaptable.adaptableOptions.primaryKey;
167
150
  storageEngine = createEngineLocal({
168
151
  adaptableId: adaptable.adaptableOptions.adaptableId,
169
152
  adaptableStateKey: adaptable.adaptableOptions.adaptableStateKey,
@@ -181,7 +164,6 @@ export class AdaptableStore {
181
164
  return state?.[key] !== newState?.[key];
182
165
  });
183
166
  };
184
- // this is now VERY BADLY NAMED!
185
167
  let rootReducer = mergeReducer(rootReducerWithResetManagement, LOAD_STATE);
186
168
  const composeEnhancers = (x) => x;
187
169
  const persistedReducer = (state, action) => {
@@ -190,9 +172,6 @@ export class AdaptableStore {
190
172
  }
191
173
  const init = state === undefined;
192
174
  const newState = rootReducer(state, action);
193
- // ideally the reducer should be pure,
194
- // but having the emitter emit the event here
195
- // is really useful
196
175
  const emitterArg = { action, state, newState };
197
176
  if (!NON_PERSIST_ACTIONS[action.type]) {
198
177
  this.emitter.emit(action.type, emitterArg);
@@ -225,10 +204,6 @@ export class AdaptableStore {
225
204
  });
226
205
  const isProgressActive = middlewareAPI.getState().Popup?.ProgressIndicator?.active;
227
206
  if (!wasProgressActive && isProgressActive) {
228
- // double rAF: first frame lets React render + ProgressIndicator's
229
- // useEffect schedule its own rAF for setVisible(); second frame
230
- // runs after the browser has actually painted the indicator
231
- // see #raf_progress_indicator
232
207
  requestAnimationFrame(() => {
233
208
  requestAnimationFrame(() => {
234
209
  next(action);
@@ -247,13 +222,11 @@ export class AdaptableStore {
247
222
  }
248
223
  });
249
224
  const middlewares = [
250
- beforeEmitterMiddleware, // fires before anything else processes the action
225
+ beforeEmitterMiddleware,
251
226
  devToolsActionMarkerMiddleware,
252
- adaptableMiddleware(adaptable), // the main middleware that actually does stuff,
253
- ...pluginsMiddleware, // the plugins middleware
227
+ adaptableMiddleware(adaptable),
228
+ ...pluginsMiddleware,
254
229
  ].filter(Boolean);
255
- //TODO: need to check if we want the storage to be done before or after
256
- //we enrich the state with the AB middleware
257
230
  this.TheStore = Redux.createStore(persistedReducer, composeEnhancers(Redux.applyMiddleware(...middlewares)));
258
231
  this.storageEngine = storageEngine;
259
232
  }
@@ -280,7 +253,6 @@ export class AdaptableStore {
280
253
  const { adaptable, adaptableStateKey, initialState, postLoadHook } = config;
281
254
  const postProcessState = postLoadHook ?? ((state) => state);
282
255
  this.storageEngine.setStateKey(adaptableStateKey);
283
- // START STATE LOAD
284
256
  this.loadStorageInProgress = true;
285
257
  return (this.Load = this.storageEngine
286
258
  .load(adaptable, initialState)
@@ -291,14 +263,10 @@ export class AdaptableStore {
291
263
  })
292
264
  .then(() => {
293
265
  this.TheStore.dispatch(InitState());
294
- // END STATE LOAD
295
266
  this.loadStorageInProgress = false;
296
267
  }, (e) => {
297
268
  adaptable.api.consoleError('Failed to load saved Adaptable state.', e);
298
- //for now i'm still initializing Adaptable even if loading state has failed....
299
- //we may revisit that later
300
269
  this.TheStore.dispatch(InitState());
301
- // END STATE LOAD
302
270
  this.loadStorageInProgress = false;
303
271
  this.TheStore.dispatch(PopupRedux.PopupShowAlert({
304
272
  alertType: 'generic',
@@ -412,22 +380,11 @@ function coerceMarkerDetailValue(value) {
412
380
  return '[unserializable]';
413
381
  }
414
382
  }
415
- // this is the main function for dealing with Redux Actions which require additional functionality to be triggered.
416
- // Please document each use case where we have to use the Store rather than a module or a popup screen
417
- // This should ideally be the ONLY place where we LISTEN to store changes
418
383
  const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
419
384
  return function (next) {
420
385
  return function (action) {
421
386
  switch (action.type) {
422
- /*******************
423
- * NAMED QUERY ACTIONS
424
- *******************/
425
- /**
426
- * Use Case: User has deleted a Named Query
427
- * Action: Check whether it is referenced elsewhere before deleting
428
- */
429
387
  case NamedQueryRedux.NAMED_QUERY_DELETE: {
430
- // check if Named Query is not referenced elsewhere
431
388
  const actionTyped = action;
432
389
  if (!adaptable.api.namedQueryApi.internalApi.validateDeletedNamedQuery(actionTyped.namedQuery.Name)) {
433
390
  return;
@@ -435,10 +392,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
435
392
  const ret = next(action);
436
393
  return ret;
437
394
  }
438
- /**
439
- * Use Case: User has renamed a Named Query
440
- * Action: Check whether it is referenced elsewhere before allowing rename
441
- */
442
395
  case NamedQueryRedux.NAMED_QUERY_EDIT: {
443
396
  const actionTyped = action;
444
397
  const editedNamedQuery = actionTyped.namedQuery;
@@ -453,17 +406,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
453
406
  const ret = next(action);
454
407
  return ret;
455
408
  }
456
- /*******************
457
- * System Row Summary ACTIONS
458
- *******************/
459
409
  case InternalRedux.SUMMARY_ROW_SET: {
460
410
  let nextAction = next(action);
461
411
  adaptable.api.layoutApi.internalApi.setupRowSummaries();
462
412
  return nextAction;
463
413
  }
464
- /*******************
465
- * System Quick Filter ACTIONS
466
- *******************/
467
414
  case InternalRedux.QUICK_FILTER_BAR_SHOW: {
468
415
  let nextAction = next(action);
469
416
  adaptable.showQuickFilter();
@@ -474,9 +421,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
474
421
  adaptable.hideQuickFilter();
475
422
  return nextAction;
476
423
  }
477
- /*******************
478
- * ALERT DEFINITION ACTIONS
479
- *******************/
480
424
  case AlertRedux.ALERT_DEFINITION_ADD:
481
425
  case AlertRedux.ALERT_DEFINITION_EDIT:
482
426
  case AlertRedux.ALERT_DEFINITION_DELETE:
@@ -491,7 +435,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
491
435
  (returnAction.type === AlertRedux.ALERT_DEFINITION_ADD ||
492
436
  returnAction.type === AlertRedux.ALERT_DEFINITION_EDIT ||
493
437
  returnAction.type === AlertRedux.ALERT_DEFINITION_UNSUSPEND)) {
494
- // in case of edit, the existing reactive alert will be deleted and recreated
495
438
  adaptable.api.internalApi.getAlertService().createReactiveAlert(alertDefinition);
496
439
  }
497
440
  if (!isScheduledAlertDefinition(alertDefinition) &&
@@ -521,9 +464,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
521
464
  }
522
465
  });
523
466
  }
524
- // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
525
467
  adaptable.updateColumnModelAndRefreshGrid();
526
- // tell Alert Module to check if need to listen to Cell Change
527
468
  let module = (adaptable.adaptableModules.get(ModuleConstants.AlertModuleId));
528
469
  if (module) {
529
470
  module.checkListenToCellDataChanged();
@@ -531,9 +472,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
531
472
  refreshScheduledAlertJobs(adaptable);
532
473
  return returnAction;
533
474
  }
534
- /*******************
535
- * Flashing Cell ACTIONS
536
- *******************/
537
475
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_ADD:
538
476
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_EDIT:
539
477
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_DELETE:
@@ -542,27 +480,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
542
480
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_UNSUSPEND_ALL:
543
481
  case FlashingCellRedux.FLASHING_CELL_DEFINITION_SUSPEND_ALL: {
544
482
  const returnAction = next(action);
545
- // called also for rendered column actions, see RENDERED COLUMN ACTIONS block
546
483
  adaptable.updateColumnModelAndRefreshGrid();
547
- // check if cell data change listening needs to be activated
548
484
  let module = (adaptable.adaptableModules.get(ModuleConstants.FlashingCellModuleId));
549
485
  if (module) {
550
486
  module.checkListenToCellDataChanged();
551
487
  }
552
488
  return returnAction;
553
489
  }
554
- /*******************
555
- * FREE TEXT COLUMN ACTIONS
556
- *******************/
557
- /**
558
- * Use Case: We have added / edited / deleted a Free Text Column
559
- * Actions: We check if a deleted Column has references and return if so
560
- * Actions: We update the Special ColumnDefs and refresh the Layout
561
- */
562
490
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_ADD:
563
491
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_EDIT:
564
492
  case FreeTextColumnRedux.FREE_TEXT_COLUMN_DELETE: {
565
- // First check to see Deleted Free Text Column is referenced elsewhwere and return if so
566
493
  if (action.type === FreeTextColumnRedux.FREE_TEXT_COLUMN_DELETE) {
567
494
  const actionTyped = action;
568
495
  if (!adaptable.api.freeTextColumnApi.internalApi.validateDeletedFreeTextColumn(actionTyped.freeTextColumn)) {
@@ -570,7 +497,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
570
497
  }
571
498
  }
572
499
  const returnAction = next(action);
573
- // Check listen to Cell Data Changes and refresh the layout
574
500
  let module = (adaptable.adaptableModules.get(ModuleConstants.FreeTextColumnModuleId));
575
501
  if (module) {
576
502
  module.checkListenToCellDataChanged();
@@ -578,26 +504,17 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
578
504
  adaptable.api.layoutApi.internalApi.refreshLayout();
579
505
  return returnAction;
580
506
  }
581
- /*******************
582
- * CALCULATED COLUMN ACTIONS
583
- *******************/
584
- /**
585
- * Use Case: We have added / edited / deleted a Calculated Column
586
- * Action: We update the Special ColumnDefs and refresh the Layout
587
- */
588
507
  case CalculatedColumnRedux.CALCULATED_COLUMN_ADD:
589
508
  case CalculatedColumnRedux.CALCULATED_COLUMN_EDIT:
590
509
  case CalculatedColumnRedux.CALCULATED_COLUMN_DELETE: {
591
510
  const actionTypedCC = action;
592
511
  const calculatedColumn = actionTypedCC.calculatedColumn;
593
- // First check for Deleted Calculated Columns with references and return if found
594
512
  if (action.type === CalculatedColumnRedux.CALCULATED_COLUMN_DELETE) {
595
513
  if (!adaptable.api.calculatedColumnApi.internalApi.validateDeletedCalculatedColumn(calculatedColumn)) {
596
514
  return;
597
515
  }
598
516
  }
599
517
  const returnAction = next(action);
600
- // Manage Aggregations, fire Event, set up listener and refresh Layout
601
518
  if (action.type === CalculatedColumnRedux.CALCULATED_COLUMN_ADD ||
602
519
  action.type === CalculatedColumnRedux.CALCULATED_COLUMN_EDIT) {
603
520
  adaptable.api.internalApi
@@ -617,13 +534,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
617
534
  adaptable.api.layoutApi.internalApi.refreshLayout();
618
535
  return returnAction;
619
536
  }
620
- /*******************
621
- * RENDERED COLUMN ACTIONS
622
- *******************/
623
- /**
624
- * Use Case: We have updated an AdapTable Module that affects rendering
625
- * Action: We set up all columns again
626
- */
627
537
  case QuickSearchRedux.QUICK_SEARCH_SET_CELL_MATCHING_STYLE:
628
538
  case QuickSearchRedux.QUICK_SEARCH_SET_TEXT_MATCHING_STYLE:
629
539
  case QuickSearchRedux.QUICK_SEARCH_SET_CURRENT_TEXT_MATCHING_STYLE: {
@@ -661,25 +571,15 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
661
571
  case CustomSortRedux.CUSTOM_SORT_SUSPEND_ALL:
662
572
  case CustomSortRedux.CUSTOM_SORT_UNSUSPEND_ALL: {
663
573
  const returnAction = next(action);
664
- // called also for alert actions, see ALERT ACTIONS block
665
574
  adaptable.updateColumnModelAndRefreshGrid();
666
575
  return returnAction;
667
576
  }
668
- /*******************
669
- * QUICK SEARCH ACTIONS
670
- *******************/
671
- /**
672
- * Use Case: User has run a Quick Search
673
- * Action1: Call Adaptable to redraw body so cells can be highlighted
674
- * Action2: Run Query using Quick Search text
675
- */
676
577
  case QuickSearchRedux.QUICK_SEARCH_RUN: {
677
578
  let returnAction = next(action);
678
579
  const actionTyped = action;
679
580
  const searchText = actionTyped.quickSearchText;
680
581
  adaptable.setAgGridFindSearchValue(searchText);
681
582
  adaptable.api.gridApi.refreshAllCells(true);
682
- // if set then return a query on the text
683
583
  if (adaptable.adaptableOptions.quickSearchOptions.filterGridAfterQuickSearch) {
684
584
  if (StringExtensions.IsNotNullOrEmpty(searchText)) {
685
585
  adaptable.setAgGridQuickSearch(searchText);
@@ -690,13 +590,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
690
590
  }
691
591
  return returnAction;
692
592
  }
693
- /*******************
694
- * INTERNAL ACTIONS
695
- *******************/
696
- /**
697
- * Use Case: User has deleted a System Alert which has a Highlight Cell or Highlight Row
698
- * Action: Refresh the cell / Row (to clear the Highlight)
699
- */
700
593
  case InternalRedux.ALERT_DELETE: {
701
594
  const actionTyped = action;
702
595
  let ret = next(action);
@@ -714,10 +607,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
714
607
  }
715
608
  return ret;
716
609
  }
717
- /**
718
- * Use Case: User has deleted all System Alerts some of which have a Highlight Cell
719
- * Action: Refresh the cell (to clear the style)
720
- */
721
610
  case InternalRedux.ALERT_DELETE_ALL: {
722
611
  const actionTyped = action;
723
612
  let ret = next(action);
@@ -737,10 +626,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
737
626
  });
738
627
  return ret;
739
628
  }
740
- /**
741
- * Use Case: A System Alert had a Highlight Cell with a limited duration
742
- * Action: Refresh the cell (to clear the style)
743
- */
744
629
  case InternalRedux.ALERT_REMOVE_CELL_HIGHLIGHT: {
745
630
  let ret = next(action);
746
631
  const actionTyped = action;
@@ -894,14 +779,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
894
779
  adaptable.api.internalApi.setCellSummaryInfo(apiSummaryReturn);
895
780
  return returnAction;
896
781
  }
897
- /*******************
898
- * DATA SOURCE ACTIONS
899
- *******************/
900
- /**
901
- * Use Case: Data Sources have been amended
902
- * Action1: Fire Data Source Changed event
903
- * Action2: Display a DataSet form if supplied
904
- */
905
782
  case InternalRedux.DATA_SET_SELECT: {
906
783
  let returnAction = next(action);
907
784
  const dataSet = adaptable.api.dataSetApi.getCurrentDataSet();
@@ -913,25 +790,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
913
790
  }
914
791
  return returnAction;
915
792
  }
916
- /*******************
917
- * THEME ACTIONS
918
- *******************/
919
- /**
920
- * Use Case: Theme has changed
921
- * Action: Apply new Theme
922
- */
923
793
  case ThemeRedux.THEME_SELECT: {
924
794
  let returnAction = next(action);
925
795
  adaptable.api.themeApi.applyCurrentTheme();
926
796
  return returnAction;
927
797
  }
928
- /*******************
929
- * Note ACTIONS
930
- *******************/
931
- /**
932
- * Use Case: Note has been edited/deleted/added
933
- * Action: Triangle can be removed/added
934
- */
935
798
  case NoteRedux.NOTE_ADD:
936
799
  case NoteRedux.NOTE_EDIT:
937
800
  case NoteRedux.NOTE_DELETE: {
@@ -941,13 +804,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
941
804
  adaptable.api.gridApi.refreshCell(rowNode, returnAction.adaptableNote.ColumnId, true);
942
805
  return returnAction;
943
806
  }
944
- /*******************
945
- * Comment ACTIONS
946
- *******************/
947
- /**
948
- * Use Case: Comments has been edited/deleted/added
949
- * Action: Triangle can be removed/added
950
- */
951
807
  case CommentsRedux.COMMENT_ADD:
952
808
  case CommentsRedux.COMMENT_EDIT:
953
809
  case CommentsRedux.COMMENT_DELETE:
@@ -996,9 +852,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
996
852
  deletedCommentThreads.push(commentThread);
997
853
  }
998
854
  }
999
- // This cannot be called because it would trigger an infinite loop
1000
- // adaptable.api.eventApi.emit('CommentChanged', commentThreads);
1001
- // refresh all comments cells to show or hide the triangle
1002
855
  [...addedCommentThreads, ...deletedCommentThreads].forEach((commentThread) => {
1003
856
  const node = adaptable.api.gridApi.getRowNodeForPrimaryKey(commentThread.PrimaryKeyValue);
1004
857
  if (node && commentThread.ColumnId) {
@@ -1008,9 +861,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1008
861
  });
1009
862
  return returnAction;
1010
863
  }
1011
- /*******************
1012
- * SCHEDULED JOB ACTIONS (export report schedules)
1013
- *******************/
1014
864
  case ExportRedux.EXPORT_ENSURE_SCHEDULE_UUIDS:
1015
865
  case ExportRedux.SCHEDULED_REPORT_ADD:
1016
866
  case ExportRedux.SCHEDULED_REPORT_EDIT:
@@ -1021,34 +871,24 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1021
871
  refreshScheduledReportJobs(adaptable);
1022
872
  return returnAction;
1023
873
  }
1024
- /*******************
1025
- * USER INTERFACE ACTIONS
1026
- *******************/
1027
874
  case UserInterfaceRedux.USER_INTERFACE_SET_HIDE_ADAPTABLE_UI: {
1028
875
  const returnAction = next(action);
1029
876
  const { hideAdaptableUI } = action;
1030
- // Hide or show Dashboard
1031
877
  middlewareAPI.dispatch(DashboardRedux.DashboardSetIsHidden(hideAdaptableUI));
1032
- // Hide or show Adaptable ToolPanel in the AG Grid sidebar
1033
878
  if (hideAdaptableUI) {
1034
879
  adaptable.hideAdaptableToolPanel();
1035
880
  }
1036
881
  else {
1037
882
  adaptable.showAdaptableToolPanel();
1038
883
  }
1039
- // Hide or show Adaptable StatusBar panels
1040
884
  if (hideAdaptableUI) {
1041
885
  adaptable.hideAdaptableStatusBar();
1042
886
  }
1043
887
  else {
1044
888
  adaptable.showAdaptableStatusBar();
1045
889
  }
1046
- // Column and Context Menus are handled in the AgGridMenuAdapter
1047
890
  return returnAction;
1048
891
  }
1049
- /*******************
1050
- * DASHBOARD ACTIONS
1051
- *******************/
1052
892
  case DashboardRedux.DASHBOARD_SET_IS_COLLAPSED:
1053
893
  case DashboardRedux.DASHBOARD_SET_MODULE_BUTTONS:
1054
894
  case DashboardRedux.DASHBOARD_ACTIVE_TAB_INDEX_CHANGE:
@@ -1063,16 +903,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1063
903
  adaptable.api.eventApi.internalApi.fireDashboardChangedEvent(action.type, oldDashboardState, newDashboardState);
1064
904
  return returnAction;
1065
905
  }
1066
- /*******************
1067
- * LAYOUT ACTIONS
1068
- *******************/
1069
906
  case LayoutRedux.LAYOUT_ADD:
1070
907
  case LayoutRedux.LAYOUT_EDIT:
1071
908
  case LayoutRedux.LAYOUT_SAVE:
1072
909
  case LayoutRedux.LAYOUT_DELETE:
1073
910
  case LayoutRedux.LAYOUT_SELECT: {
1074
911
  const oldLayoutState = middlewareAPI.getState().Layout;
1075
- // this must be called before 'next(action)'
1076
912
  const previousLayout = adaptable.api.layoutApi.getCurrentLayout();
1077
913
  let returnAction = next(action);
1078
914
  const newLayoutState = middlewareAPI.getState().Layout;
@@ -1083,12 +919,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1083
919
  ERROR_LAYOUT;
1084
920
  if (returnAction.type == LayoutRedux.LAYOUT_SELECT ||
1085
921
  returnAction.type == LayoutRedux.LAYOUT_DELETE) {
1086
- // tell AdapTable the Layout has been selected
1087
922
  if (newLayout) {
1088
923
  adaptable.updateLayoutInManagerAfterStoreHasChanged(newLayout);
1089
924
  }
1090
925
  }
1091
- // !!! filter refresh has to be AFTER the layout has been set in the store
1092
926
  let refreshColumnFilters = false;
1093
927
  if (adaptable.api.filterApi.columnFilterApi.internalApi.areColumnFiltersDifferent(oldLayout.ColumnFilters, newLayout.ColumnFilters)) {
1094
928
  refreshColumnFilters = true;
@@ -1100,24 +934,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1100
934
  if (refreshColumnFilters || refreshGridFilter) {
1101
935
  adaptable.applyFiltering({ updateColumnFilterModel: refreshColumnFilters });
1102
936
  }
1103
- // when changing current layout via the api, the layout should update
1104
937
  if (returnAction.type == LayoutRedux.LAYOUT_SAVE) {
1105
938
  const savingLayout = returnAction.layout;
1106
939
  if (previousLayout.Name === savingLayout.Name &&
1107
940
  previousLayout !== savingLayout &&
1108
- // objects may have changed, but have the same contents
1109
- // this prevents pivot layout from infinite set-layout
1110
941
  !adaptable.api.layoutApi.internalApi.areLayoutsEqual(previousLayout, savingLayout)) {
1111
942
  adaptable.updateLayoutInManagerAfterStoreHasChanged(savingLayout);
1112
943
  }
1113
944
  }
1114
945
  return returnAction;
1115
946
  }
1116
- /**
1117
- * Use Case: Column Filters have changed
1118
- * Action: Apply Column Filtering and fire associated events
1119
- * Note: For LAYOUT_COLUMN_FILTER_EDIT we do not filter (as it seems to be already handled)
1120
- */
1121
947
  case LayoutRedux.LAYOUT_COLUMN_FILTER_ADD:
1122
948
  case LayoutRedux.LAYOUT_COLUMN_FILTER_EDIT:
1123
949
  case LayoutRedux.LAYOUT_COLUMN_FILTER_SET:
@@ -1128,13 +954,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1128
954
  case LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND:
1129
955
  case LayoutRedux.LAYOUT_COLUMN_FILTER_UNSUSPEND_ALL: {
1130
956
  let returnAction;
1131
- // needs to be called before 'next' so previous and next column filters are known
1132
957
  const shouldTriggerColumnFiltering = adaptable.api.filterApi.columnFilterApi.internalApi.shouldNewColumnFilterTriggerColumnFiltering(action);
1133
958
  const oldLayoutState = middlewareAPI.getState().Layout;
1134
959
  returnAction = next(action);
1135
- // we need to update the current layout model
1136
- // in the layout manager, so that onLayoutChange
1137
- // it will come back with the correct fields
1138
960
  adaptable.silentUpdateCurrentLayoutModel();
1139
961
  if (shouldTriggerColumnFiltering) {
1140
962
  setTimeout(() => {
@@ -1145,10 +967,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1145
967
  adaptable.api.eventApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, middlewareAPI.getState().Layout);
1146
968
  return returnAction;
1147
969
  }
1148
- /**
1149
- * Use Case: Grid Filter has changed
1150
- * Action: Apply Grid Filtering and fire associated events
1151
- */
1152
970
  case LayoutRedux.LAYOUT_GRID_FILTER_SET:
1153
971
  case LayoutRedux.LAYOUT_GRID_FILTER_CLEAR:
1154
972
  case LayoutRedux.LAYOUT_GRID_FILTER_SUSPEND:
@@ -1161,35 +979,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1161
979
  }, 5);
1162
980
  return next(returnAction);
1163
981
  }
1164
- /*******************
1165
- * SMART EDIT ACTIONS
1166
- *******************/
1167
- /**
1168
- * Use Case: User wants to perform Smart Edit and we need to check if the cell selection is valid
1169
- * Action (1): Get the result from the SmartEdit module
1170
- * If the return is an Alert:
1171
- * Action (2): If there is a popup open, close it and show the Alert; otherwise just set false valid selection
1172
- * If the return is valid:
1173
- * Action (2): Set the valid selection to true
1174
- * Action (3): Build the Preview Values (via Smart Edit module)
1175
- * Action (4): Set the Preview Values (this will populate the preview screen)
1176
- */
1177
982
  case InternalRedux.SMARTEDIT_CHECK_CELL_SELECTION: {
1178
983
  let module = (adaptable.adaptableModules.get(ModuleConstants.SmartEditModuleId));
1179
984
  let state = middlewareAPI.getState();
1180
985
  let returnAction = next(action);
1181
986
  let apiReturn = module.CheckCorrectCellSelection();
1182
987
  let popup = state.Popup.ScreenPopup;
1183
- // this is a horrible hack and fix for a weird issue
1184
- // we really need to do smart edit and bulk update better
1185
- // but this fixes it for now
1186
988
  if (popup.ComponentName != 'LayoutPopup') {
1187
989
  if (apiReturn.Alert) {
1188
- // check if Smart Edit is showing as popup and then close and show error (dont want to do that if from toolbar)
1189
990
  if (popup.ComponentName == 'SmartEditPopup') {
1190
- // We are in SmartEditPopup so let's close it
1191
991
  adaptable.api.internalApi.hidePopupScreen();
1192
- // and now show the alert Popup
1193
992
  adaptable.api.alertApi.displayAdaptableAlertNotification(apiReturn.Alert);
1194
993
  }
1195
994
  middlewareAPI.dispatch(InternalRedux.SmartEditSetValidSelection(false));
@@ -1202,16 +1001,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1202
1001
  }
1203
1002
  return returnAction;
1204
1003
  }
1205
- /**
1206
- * Use Case: User has changed a Smmart Edit property or requested a preview
1207
- * Action (1): Get the new preview set from the Smart Edit module
1208
- * Action (2): Set the Preview Values (this will populate the preview screen)
1209
- */
1210
1004
  case InternalRedux.SMART_EDIT_CHANGE_OPERATION:
1211
1005
  case InternalRedux.SMART_EDIT_CHANGE_VALUE:
1212
1006
  case InternalRedux.SMARTEDIT_FETCH_PREVIEW: {
1213
- //all our logic needs to be executed AFTER the main reducers
1214
- //so our state is up to date which allow us not to care about the data within each different action
1215
1007
  let returnAction = next(action);
1216
1008
  let module = (adaptable.adaptableModules.get(ModuleConstants.SmartEditModuleId));
1217
1009
  let state = middlewareAPI.getState();
@@ -1219,11 +1011,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1219
1011
  middlewareAPI.dispatch(InternalRedux.SmartEditSetPreview(apiReturn));
1220
1012
  return returnAction;
1221
1013
  }
1222
- /**
1223
- * Use Case: User has clicked 'Apply' in Smart Edit popup or toolbar
1224
- * Action (1): Gets the values that need to be applied from the Preview Info and passes to Preview Helper (incl. whether to bypass validation)
1225
- * Action (2): Sets the cell values in the Grid
1226
- */
1227
1014
  case SmartEditRedux.SMART_EDIT_APPLY: {
1228
1015
  const actionTyped = action;
1229
1016
  let thePreview = middlewareAPI.getState().Internal.SmartEdit.SmartEditPreviewInfo;
@@ -1232,25 +1019,16 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1232
1019
  adaptable.api.internalApi.hidePopupScreen();
1233
1020
  return next(action);
1234
1021
  }
1235
- /*******************
1236
- * BULK UPDATE ACTIONS
1237
- *******************/
1238
1022
  case InternalRedux.BULK_UPDATE_CHECK_CELL_SELECTION: {
1239
1023
  let module = (adaptable.adaptableModules.get(ModuleConstants.BulkUpdateModuleId));
1240
1024
  let state = middlewareAPI.getState();
1241
1025
  let returnAction = next(action);
1242
1026
  let apiReturn = module.checkCorrectCellSelection();
1243
1027
  let popup = state.Popup.ScreenPopup;
1244
- // this is a horrible hack and fix for a weird issue
1245
- // we really need to do smart edit and bulk update better
1246
- // but this fixes it for now
1247
1028
  if (popup.ComponentName != 'LayoutPopup') {
1248
1029
  if (apiReturn.Alert) {
1249
- // check if BulkUpdate is showing as popup
1250
1030
  if (popup.ComponentName == 'BulkUpdatePopup') {
1251
- //We close the BulkUpdatePopup
1252
1031
  adaptable.api.internalApi.hidePopupScreen();
1253
- //We show the Error Popup -- assume that will alwasy be an Error
1254
1032
  adaptable.api.alertApi.displayAdaptableAlertNotification(apiReturn.Alert);
1255
1033
  }
1256
1034
  }
@@ -1258,10 +1036,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1258
1036
  }
1259
1037
  return returnAction;
1260
1038
  }
1261
- // Here we have all actions that triggers a refresh of the BulkUpdatePreview
1262
1039
  case InternalRedux.BULK_UPDATE_CHANGE_VALUE: {
1263
- //all our logic needs to be executed AFTER the main reducers
1264
- //so our state is up to date which allow us not to care about the data within each different action
1265
1040
  let returnAction = next(action);
1266
1041
  let module = (adaptable.adaptableModules.get(ModuleConstants.BulkUpdateModuleId));
1267
1042
  let state = middlewareAPI.getState();
@@ -1277,13 +1052,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1277
1052
  adaptable.api.internalApi.hidePopupScreen();
1278
1053
  return next(action);
1279
1054
  }
1280
- /*******************
1281
- * PLUS MINUS ACTIONS
1282
- *******************/
1283
- /**
1284
- * Use Case: Plus Minus Rules have changed
1285
- * Action: Get Plus Minus module to know if it needs to listen to keydown
1286
- */
1287
1055
  case PlusMinusRedux.PLUS_MINUS_RULE_ADD:
1288
1056
  case PlusMinusRedux.PLUS_MINUS_RULE_EDIT:
1289
1057
  case PlusMinusRedux.PLUS_MINUS_RULE_DELETE:
@@ -1298,23 +1066,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1298
1066
  }
1299
1067
  return returnAction;
1300
1068
  }
1301
- /**
1302
- * Use Case: Plus Minus has been applied
1303
- * Action: update the grid cells
1304
- */
1305
1069
  case PlusMinusRedux.PLUS_MINUS_APPLY: {
1306
1070
  let returnAction = next(action);
1307
1071
  const actionTyped = action;
1308
1072
  adaptable.api.gridApi.setCellValues(actionTyped.cellUpdateRequests);
1309
1073
  return returnAction;
1310
1074
  }
1311
- /*******************
1312
- * SHORTCUT ACTIONS
1313
- *******************/
1314
- /**
1315
- * Use Case: Shortcuts have changed
1316
- * Action: Get Shortcut module to know if it needs to listen to keydown
1317
- */
1318
1075
  case ShortcutRedux.SHORTCUT_ADD:
1319
1076
  case ShortcutRedux.SHORTCUT_EDIT:
1320
1077
  case ShortcutRedux.SHORTCUT_DELETE: {
@@ -1325,10 +1082,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1325
1082
  }
1326
1083
  return returnAction;
1327
1084
  }
1328
- /*******************
1329
- * EXPORT ACTIONS
1330
- *******************/
1331
- // When selected report is undefined, clear the format
1332
1085
  case ExportRedux.REPORT_SELECT: {
1333
1086
  const actionTyped = action;
1334
1087
  let returnAction = next(action);
@@ -1338,7 +1091,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1338
1091
  }
1339
1092
  return returnAction;
1340
1093
  }
1341
- // When deleting a report, if it is currently selected clear it
1342
1094
  case ExportRedux.REPORT_DELETE: {
1343
1095
  const actionTyped = action;
1344
1096
  let report = actionTyped.report;
@@ -1350,9 +1102,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1350
1102
  refreshScheduledReportJobs(adaptable);
1351
1103
  return returnAction;
1352
1104
  }
1353
- /*******************
1354
- * CHARTING ACTIONS
1355
- *******************/
1356
1105
  case ChartingRedux.CHARTING_DELETE_CHART: {
1357
1106
  const deleteAction = action;
1358
1107
  closeAgChartDefinitionIfOpen(adaptable.api, deleteAction.chartDefinition);
@@ -1364,9 +1113,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1364
1113
  adaptable.api.chartingApi.internalApi.onDeleteExternalChart(returnAction.chartDefinition);
1365
1114
  return returnAction;
1366
1115
  }
1367
- /*******************
1368
- * TEAM SHARING ACTIONS
1369
- *******************/
1370
1116
  case TeamSharingRedux.TEAMSHARING_GET: {
1371
1117
  let returnAction = next(action);
1372
1118
  adaptable.api.teamSharingApi
@@ -1391,7 +1137,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1391
1137
  let returnAction = next(action);
1392
1138
  const { Entity, Configuration } = actionTyped;
1393
1139
  let shareSuccessful;
1394
- // load latest state from TeamSharing server
1395
1140
  adaptable.api.teamSharingApi
1396
1141
  .loadSharedEntities()
1397
1142
  .then((sharedEntities) => {
@@ -1400,7 +1145,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1400
1145
  .buildCustomSharedEntity(Entity, Configuration);
1401
1146
  let newCustomShare = true;
1402
1147
  const updatedSharedEntities = sharedEntities.map((entity) => {
1403
- // if it has the same UUID, override it
1404
1148
  if (isCustomSharedEntity(entity) && entity.Uuid === customSharedEntity.Uuid) {
1405
1149
  newCustomShare = false;
1406
1150
  return {
@@ -1415,7 +1159,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1415
1159
  updatedSharedEntities.push(customSharedEntity);
1416
1160
  }
1417
1161
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(updatedSharedEntities));
1418
- // update the server state
1419
1162
  shareSuccessful = true;
1420
1163
  return adaptable.api.teamSharingApi.persistSharedEntities(updatedSharedEntities);
1421
1164
  })
@@ -1429,20 +1172,14 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1429
1172
  });
1430
1173
  return returnAction;
1431
1174
  }
1432
- // share the given AdaptableObject:
1433
- // - if it has dependencies, share them as well
1434
- // - if it's active, ensure that there is not already one present
1435
- // - if it's active, all the dependencies will be active as well
1436
1175
  case TeamSharingRedux.TEAMSHARING_SHARE: {
1437
1176
  const actionTyped = action;
1438
1177
  let returnAction = next(action);
1439
1178
  const { Entity, Configuration, Module } = actionTyped;
1440
1179
  let shareSuccessful;
1441
- // load latest state from TeamSharing server
1442
1180
  adaptable.api.teamSharingApi
1443
1181
  .loadSharedEntities()
1444
1182
  .then((sharedEntities) => {
1445
- // check if there is not already one active SharedEntity for this object
1446
1183
  const existingActiveSharedEntity = Configuration.type === 'Active' &&
1447
1184
  middlewareAPI.getState().TeamSharing.ActiveSharedEntityMap[Entity.Uuid];
1448
1185
  if (existingActiveSharedEntity) {
@@ -1456,15 +1193,12 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1456
1193
  shareSuccessful = false;
1457
1194
  return;
1458
1195
  }
1459
- // build the new shared entities incl. all their dependencies
1460
1196
  const newSharedEntityInclDependencies = adaptable.api.internalApi
1461
1197
  .getTeamSharingService()
1462
1198
  .buildSharedEntityWithDependencies(Entity, Module, Configuration);
1463
1199
  sharedEntities.push(...newSharedEntityInclDependencies);
1464
- // update the local state
1465
1200
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...newSharedEntityInclDependencies.filter((sharedEntity) => sharedEntity.Type === 'Active')));
1466
1201
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(sharedEntities));
1467
- // update the server state
1468
1202
  shareSuccessful = true;
1469
1203
  return adaptable.api.teamSharingApi.persistSharedEntities(sharedEntities);
1470
1204
  })
@@ -1491,17 +1225,13 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1491
1225
  });
1492
1226
  return returnAction;
1493
1227
  }
1494
- // remove the given shared entity:
1495
- // - ensure that no other shared entities depend on it
1496
1228
  case TeamSharingRedux.TEAMSHARING_REMOVE_ITEM: {
1497
1229
  let returnAction = next(action);
1498
1230
  const actionTyped = action;
1499
1231
  const removedEntityId = actionTyped.Uuid;
1500
- // load latest state from TeamSharing server
1501
1232
  adaptable.api.teamSharingApi
1502
1233
  .loadSharedEntities()
1503
1234
  .then((sharedEntities) => {
1504
- // ensure that no other SharedDependencies reference the to-be-deleted entity
1505
1235
  const adaptableSharedEntities = sharedEntities.filter(isAdaptableSharedEntity);
1506
1236
  const sharedEntityDependants = adaptable.api.internalApi
1507
1237
  .getTeamSharingService()
@@ -1519,10 +1249,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1519
1249
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
1520
1250
  return;
1521
1251
  }
1522
- // remove the deleted SharedEntity from local state
1523
1252
  const newSharedEntities = sharedEntities.filter((s) => s.Uuid !== removedEntityId);
1524
1253
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(newSharedEntities));
1525
- // update TeamSharing server
1526
1254
  return adaptable.api.teamSharingApi.persistSharedEntities(newSharedEntities);
1527
1255
  })
1528
1256
  .catch((error) => {
@@ -1537,10 +1265,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1537
1265
  });
1538
1266
  return returnAction;
1539
1267
  }
1540
- // Import 1. step
1541
- // prepare import of the given shared entity (the actual import is done in 'TEAMSHARING_PROCESS_IMPORT'):
1542
- // - all dependencies will be also included in the import bundle
1543
- // - if there is at least one local AdaptableObject which will be overwritten, display a confirmation pop
1544
1268
  case TeamSharingRedux.TEAMSHARING_IMPORT_ITEM: {
1545
1269
  let returnAction = next(action);
1546
1270
  const actionTyped = action;
@@ -1567,15 +1291,11 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1567
1291
  }
1568
1292
  return returnAction;
1569
1293
  }
1570
- // Import 2. step
1571
- // import the actual AdaptableObjects (either create or update them)
1572
1294
  case TeamSharingRedux.TEAMSHARING_PROCESS_IMPORT: {
1573
1295
  let returnAction = next(action);
1574
1296
  const actionTyped = action;
1575
1297
  const { ImportSteps } = actionTyped;
1576
1298
  const activeSharedEntities = [];
1577
- // iterate backwards to import the dependencies first
1578
- // it should work also the other way around, but nevertheless...
1579
1299
  for (let i = ImportSteps.length - 1; i >= 0; i--) {
1580
1300
  const { sharedEntity, importAction } = ImportSteps[i];
1581
1301
  if (importAction) {
@@ -1591,7 +1311,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1591
1311
  if (activeSharedEntities.length) {
1592
1312
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingLinkItem(...activeSharedEntities));
1593
1313
  }
1594
- // mark the import process as ended after (we assume that) the import is finished
1595
1314
  adaptable.api.teamSharingApi.internalApi
1596
1315
  .waitForTeamSharingImportEnd()
1597
1316
  .then(() => middlewareAPI.dispatch(TeamSharingRedux.TeamSharingCommitImport()))
@@ -1605,13 +1324,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1605
1324
  adaptable.api.alertApi.displayAdaptableAlertNotification(alert);
1606
1325
  return returnAction;
1607
1326
  }
1608
- // update the active SharedEntity with the latest (updated) state of the local AdaptableObject
1609
- // - if the remote server already has a newer version of it, the update is skipped
1610
1327
  case TeamSharingRedux.TEAMSHARING_UPDATE_ITEM: {
1611
1328
  const returnAction = next(action);
1612
1329
  const actionTyped = action;
1613
1330
  if (middlewareAPI.getState().TeamSharing.importProcessInProgress) {
1614
- // we are in the middle of an import process, we don't have to react to these object changes
1615
1331
  return returnAction;
1616
1332
  }
1617
1333
  const { ChangedAdaptableObject, UserName } = actionTyped;
@@ -1619,12 +1335,10 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1619
1335
  .loadSharedEntities()
1620
1336
  .then((sharedEntities) => {
1621
1337
  const adaptableSharedEntities = sharedEntities.filter(isAdaptableSharedEntity);
1622
- // check if remote server has a newer revision
1623
1338
  const [localRevision, remoteRevision] = adaptable.api.internalApi
1624
1339
  .getTeamSharingService()
1625
1340
  .getSharedEntityLocalAndRemoteRevisions(ChangedAdaptableObject.Uuid, adaptableSharedEntities);
1626
1341
  if (remoteRevision > localRevision) {
1627
- // if remote has a newer version, we will NOT overwrite it
1628
1342
  return;
1629
1343
  }
1630
1344
  const [updatedSharedEntities, newActiveEntities] = adaptable.api.internalApi
@@ -1651,7 +1365,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1651
1365
  adaptable.api.teamSharingApi
1652
1366
  .loadSharedEntities()
1653
1367
  .then((sharedEntities) => {
1654
- // update local state
1655
1368
  middlewareAPI.dispatch(TeamSharingRedux.TeamSharingSet(sharedEntities));
1656
1369
  adaptable.api.internalApi.getTeamSharingService().showUpdateNotifications();
1657
1370
  })
@@ -1667,9 +1380,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1667
1380
  });
1668
1381
  return returnAction;
1669
1382
  }
1670
- /*******************
1671
- * POPUP (INTERNAL) ACTIONS
1672
- *******************/
1673
1383
  case PopupRedux.POPUP_SHOW_ALERT: {
1674
1384
  showToast({
1675
1385
  api: adaptable.api,
@@ -1700,15 +1410,9 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
1700
1410
  }
1701
1411
  return next(action);
1702
1412
  }
1703
- /*******************
1704
- * MANAGING STATE ACTIONS
1705
- *******************/
1706
1413
  case INIT_STATE: {
1707
1414
  let returnAction = next(action);
1708
1415
  if (adaptable.isReady) {
1709
- // we need this here for when the state key is changed
1710
- // since we need the transient state to be restored in the same
1711
- // way as when Adaptable is initialised.
1712
1416
  adaptable.ModuleService.createModuleUIItems();
1713
1417
  }
1714
1418
  return returnAction;