@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.1

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 (288) hide show
  1. package/base.css +62 -14
  2. package/base.css.map +1 -1
  3. package/index.css +267 -165
  4. package/index.css.map +1 -1
  5. package/package.json +5 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
  8. package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
  9. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
  10. package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
  11. package/src/AdaptableOptions/EditOptions.d.ts +6 -6
  12. package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
  13. package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
  14. package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
  15. package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
  16. package/src/AdaptableOptions/MenuOptions.js +14 -6
  17. package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
  18. package/src/Api/AdaptableApi.d.ts +6 -1
  19. package/src/Api/CommentApi.d.ts +58 -0
  20. package/src/Api/EventApi.d.ts +48 -12
  21. package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
  22. package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
  23. package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
  24. package/src/Api/Events/LiveDataChanged.d.ts +3 -3
  25. package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
  26. package/src/Api/GridApi.d.ts +0 -6
  27. package/src/Api/GridFilterApi.d.ts +2 -2
  28. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
  29. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  30. package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
  31. package/src/Api/Implementation/CommentsApiImpl.js +46 -0
  32. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
  33. package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
  34. package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
  35. package/src/Api/Implementation/GridApiImpl.js +0 -4
  36. package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
  37. package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
  38. package/src/Api/Implementation/NotesApiImpl.d.ts +3 -7
  39. package/src/Api/Implementation/NotesApiImpl.js +1 -15
  40. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  41. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  42. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
  43. package/src/Api/Implementation/PluginsApiImpl.js +3 -15
  44. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
  45. package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
  46. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/ThemeApiImpl.js +3 -0
  48. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  49. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  50. package/src/Api/Internal/AdaptableInternalApi.js +3 -0
  51. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  52. package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
  53. package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/DashboardInternalApi.js +5 -0
  55. package/src/Api/Internal/DataImportInternalApi.js +2 -0
  56. package/src/Api/Internal/DataSetInternalApi.js +2 -1
  57. package/src/Api/Internal/GridInternalApi.d.ts +3 -1
  58. package/src/Api/Internal/GridInternalApi.js +32 -9
  59. package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
  60. package/src/Api/Internal/LayoutInternalApi.js +11 -11
  61. package/src/Api/InteropioPluginApi.d.ts +10 -0
  62. package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
  63. package/src/Api/OptionsApi.d.ts +5 -0
  64. package/src/Api/PluginsApi.d.ts +3 -13
  65. package/src/Api/ScheduleApi.d.ts +1 -48
  66. package/src/Api/ThemeApi.d.ts +5 -0
  67. package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
  68. package/src/PredefinedConfig/CellAddress.d.ts +13 -0
  69. package/src/PredefinedConfig/CellAddress.js +5 -0
  70. package/src/PredefinedConfig/CommentState.d.ts +48 -0
  71. package/src/PredefinedConfig/CommentState.js +2 -0
  72. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  73. package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
  74. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  75. package/src/PredefinedConfig/Common/Enums.js +0 -1
  76. package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
  77. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  78. package/src/PredefinedConfig/Common/Types.js +0 -2
  79. package/src/PredefinedConfig/NotesState.d.ts +0 -13
  80. package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
  81. package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
  82. package/src/PredefinedConfig/SystemState.d.ts +5 -6
  83. package/src/PredefinedConfig/ThemeState.d.ts +1 -1
  84. package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
  85. package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
  86. package/src/Redux/ActionsReducers/NotesRedux.d.ts +1 -1
  87. package/src/Redux/ActionsReducers/NotesRedux.js +4 -5
  88. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
  89. package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
  90. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
  91. package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
  92. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
  93. package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
  94. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
  95. package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
  96. package/src/Redux/Store/AdaptableStore.d.ts +2 -2
  97. package/src/Redux/Store/AdaptableStore.js +107 -46
  98. package/src/Strategy/CommentsModule.d.ts +16 -0
  99. package/src/Strategy/CommentsModule.js +82 -0
  100. package/src/Strategy/LayoutModule.d.ts +12 -4
  101. package/src/Strategy/LayoutModule.js +19 -14
  102. package/src/Strategy/NotesModule.d.ts +0 -13
  103. package/src/Strategy/NotesModule.js +9 -88
  104. package/src/Strategy/PlusMinusModule.js +2 -0
  105. package/src/Strategy/ScheduleModule.js +0 -23
  106. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
  107. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
  108. package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
  109. package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
  110. package/src/Utilities/Constants/ConfigConstants.js +2 -1
  111. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  112. package/src/Utilities/Constants/GeneralConstants.js +8 -3
  113. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
  114. package/src/Utilities/Constants/ModuleConstants.js +4 -4
  115. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
  116. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
  117. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
  118. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
  119. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  120. package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
  121. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  122. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
  123. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  124. package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
  125. package/src/Utilities/Helpers/PreviewHelper.js +5 -2
  126. package/src/Utilities/ObjectFactory.d.ts +19 -22
  127. package/src/Utilities/ObjectFactory.js +51 -60
  128. package/src/Utilities/Services/CellPopupService.d.ts +23 -0
  129. package/src/Utilities/Services/CellPopupService.js +138 -0
  130. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
  131. package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
  132. package/src/Utilities/Services/ModuleService.js +1 -3
  133. package/src/Utilities/Services/ReportService.d.ts +1 -1
  134. package/src/Utilities/Services/ThemeService.d.ts +3 -0
  135. package/src/Utilities/Services/ThemeService.js +33 -1
  136. package/src/Utilities/Services/ValidationService.js +11 -11
  137. package/src/View/AdaptableView.js +3 -3
  138. package/src/View/AdaptableViewFactory.js +4 -2
  139. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
  140. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
  141. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
  142. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  143. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  144. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  145. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  146. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  147. package/src/View/Charting/useChartingElements.js +8 -3
  148. package/src/View/Comments/CommentsEditor.d.ts +7 -0
  149. package/src/View/Comments/CommentsEditor.js +100 -0
  150. package/src/View/Comments/CommentsPopup.d.ts +2 -0
  151. package/src/View/Comments/CommentsPopup.js +87 -0
  152. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
  153. package/src/View/Components/CellPopup/index.js +1 -1
  154. package/src/View/Components/FilterForm/FilterForm.js +8 -2
  155. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
  156. package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
  157. package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
  158. package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
  159. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
  160. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
  161. package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
  162. package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
  163. package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
  164. package/src/View/Components/Selectors/ColumnSelector.js +2 -1
  165. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
  166. package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
  167. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
  168. package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
  169. package/src/View/Dashboard/PinnedDashboard.js +2 -1
  170. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
  171. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
  172. package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
  173. package/src/View/GridFilter/GridFilterPopup.js +10 -8
  174. package/src/View/GridFilter/GridFilterViewPanel.js +51 -14
  175. package/src/View/GridFilter/NamedQuerySelector.js +1 -1
  176. package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
  177. package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
  178. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
  179. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
  180. package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
  181. package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
  182. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  183. package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
  184. package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
  185. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  186. package/src/View/Notes/NoteEditor.d.ts +8 -0
  187. package/src/View/Notes/NoteEditor.js +33 -0
  188. package/src/View/Notes/NotesPopup.d.ts +2 -2
  189. package/src/View/Notes/NotesPopup.js +78 -55
  190. package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
  191. package/src/View/PlusMinus/MovePlusMinus.js +27 -0
  192. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
  193. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
  194. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
  195. package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
  196. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
  198. package/src/agGrid/Adaptable.d.ts +7 -0
  199. package/src/agGrid/Adaptable.js +49 -35
  200. package/src/agGrid/BadgeRenderer.js +9 -5
  201. package/src/agGrid/agGridHelper.d.ts +2 -1
  202. package/src/agGrid/agGridHelper.js +15 -3
  203. package/src/agGrid/agGridMenuHelper.d.ts +2 -0
  204. package/src/agGrid/agGridMenuHelper.js +73 -25
  205. package/src/components/Datepicker/index.js +4 -4
  206. package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
  207. package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
  208. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
  209. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
  210. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
  211. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
  212. package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
  213. package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
  214. package/src/components/ExpressionEditor/index.js +4 -7
  215. package/src/components/InputGroup/InputGroup.d.ts +7 -0
  216. package/src/components/InputGroup/InputGroup.js +12 -0
  217. package/src/components/InputGroup/index.d.ts +1 -0
  218. package/src/components/InputGroup/index.js +4 -0
  219. package/src/components/OverlayTrigger/index.js +7 -2
  220. package/src/components/Select/Select.d.ts +1 -2
  221. package/src/components/Select/Select.js +63 -23
  222. package/src/components/Textarea/index.d.ts +9 -0
  223. package/src/components/Textarea/index.js +50 -2
  224. package/src/components/Toastify/index.d.ts +2 -2
  225. package/src/components/Toastify/index.js +1 -1
  226. package/src/components/icons/comments.d.ts +3 -0
  227. package/src/components/icons/comments.js +7 -0
  228. package/src/components/icons/index.js +3 -1
  229. package/src/env.d.ts +3 -1
  230. package/src/env.js +3 -1
  231. package/src/metamodel/adaptable.metamodel.d.ts +72 -158
  232. package/src/metamodel/adaptable.metamodel.js +138 -260
  233. package/src/parser/src/parser.d.ts +2 -0
  234. package/src/parser/src/parser.js +1880 -705
  235. package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
  236. package/src/parser/src/predicate/types.d.ts +1 -1
  237. package/src/parser/src/types.d.ts +1 -1
  238. package/src/renderReactRoot.js +15 -0
  239. package/src/themes/index.js +4 -0
  240. package/src/types.d.ts +10 -13
  241. package/themes/dark.css +3 -3
  242. package/tsconfig.cjs.tsbuildinfo +1 -1
  243. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
  244. package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
  245. package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
  246. package/src/Api/Events/SelectionChanged.d.ts +0 -16
  247. package/src/Api/FinsembleApi.d.ts +0 -10
  248. package/src/Api/Glue42Api.d.ts +0 -75
  249. package/src/Api/Glue42WebApi.d.ts +0 -10
  250. package/src/PredefinedConfig/Glue42State.d.ts +0 -46
  251. package/src/View/Notes/NotesListing.d.ts +0 -2
  252. package/src/View/Notes/NotesListing.js +0 -88
  253. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
  254. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
  255. package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
  256. package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
  257. package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
  258. package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
  259. package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
  260. package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
  261. package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
  262. package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
  263. package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
  264. package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
  265. package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
  266. package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
  267. package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
  268. package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
  269. package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
  270. package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
  271. package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
  272. package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
  273. package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
  274. package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
  275. package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
  276. package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
  277. package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
  278. /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
  279. /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
  280. /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
  281. /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
  282. /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
  283. /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
  284. /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
  285. /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
  286. /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
  287. /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
  288. /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SYSTEM_DISABLE_DELETE_CONFIRMATION = exports.SYSTEM_FILTER_FORM_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_HIDE = exports.SYSTEM_QUICK_FILTER_BAR_SHOW = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_CLEAR_ROW = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROWS_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROWS_ADD = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_ROW_HIGHLIGHT = exports.SYSTEM_ALERT_REMOVE_CELL_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
- exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_NOTS_HIDE = exports.SYSTEM_NOTESS_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
- exports.SystemReducer = exports.SystemNotesEditModeSelector = exports.SystemNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemNoteHide = exports.SystemNotesShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = void 0;
4
+ exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveRowHighlight = exports.SystemAlertRemoveCellHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowsDelete = exports.SystemHighlightRowDelete = exports.SystemHighlightRowsAdd = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.DATA_IMPORT_COMPLETED = exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = exports.SYSTEM_CELL_POPUP_HIDE = exports.SYSTEM_CELL_POPUP_SHOW = exports.SYSTEM_VISUAL_EXPORT_END = exports.SYSTEM_VISUAL_EXPORT_BEGIN = exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = exports.SYSTEM_SET_PREVIOUS_GROUPED_COLUMN_INDEX = exports.SYSTEM_CHARTING_SET_CURRENT_CHART_MODELS = exports.SYSTEM_DATA_SET_SELECT = exports.DASHBOARD_REFRESH = exports.SYSTEM_LAYOUT_SHOW_NOT_ASSOCIATED_OBJECTS = void 0;
5
+ exports.SystemReducer = exports.DataImportCompleted = exports.SystemCommentsAndNotesFocusedEntitySelector = exports.SystemCommentsAndNotesEditModeSelector = exports.SystemCommentsAndNotesSelector = exports.SystemQuickSearchFloatingVisibilitySelector = exports.SystemPreviousGroupedColumnsSelector = exports.SystemDisableDeleteConfirmationSelector = exports.SystemCellPopupHide = exports.SystemCellPopupEditFocusedEntity = exports.SystemCellPopupShow = exports.SystemQuickSearchFloatingVisibility = exports.SystemVisualExportEnd = exports.SystemVisualExportBegin = exports.SystemDisableDeleteConfirmation = exports.SystemSetPreviousGroupedColumnsIndex = exports.SystemChartingCurrentChartModelsSelector = exports.SystemChartingSetCurrentChartModels = exports.SystemDataSetSelect = exports.SystemDashboardRefresh = exports.SystemLayoutShowNotAssociatedObjects = exports.SystemFilterFormHide = exports.SystemQuickFilterBarHide = exports.SystemQuickFilterBarShow = exports.SystemSettingsPanelSet = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryClearRow = void 0;
6
6
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
7
7
  const Enums_1 = require("../../PredefinedConfig/Common/Enums");
8
8
  const Helper_1 = require("../../Utilities/Helpers/Helper");
9
+ const CellPopupService_1 = require("../../Utilities/Services/CellPopupService");
9
10
  /*
10
11
  Bit of a mixed bag of actions but essentially its those that are related to Strategies but where we DONT want to persist state
11
12
  This allows us to keep the other reducers pure in terms of everything persists
@@ -92,8 +93,11 @@ exports.SYSTEM_SET_QUICK_SEARCH_FLOATING_VISIBILITY = 'SYSTEM_SET_QUICK_SEARCH_F
92
93
  exports.SYSTEM_VISUAL_EXPORT_BEGIN = 'SYSTEM_VISUAL_EXPORT_BEGIN';
93
94
  exports.SYSTEM_VISUAL_EXPORT_END = 'SYSTEM_VISUAL_EXPORT_END';
94
95
  // Notes
95
- exports.SYSTEM_NOTESS_SHOW = 'SYSTEM_NOTES_SHOW';
96
- exports.SYSTEM_NOTS_HIDE = 'SYSTEM_NOTES_HIDE';
96
+ exports.SYSTEM_CELL_POPUP_SHOW = 'SYSTEM_CELL_POPUP_SHOW';
97
+ exports.SYSTEM_CELL_POPUP_HIDE = 'SYSTEM_CELL_POPUP_HIDE';
98
+ exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY = 'SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY';
99
+ // Data Import
100
+ exports.DATA_IMPORT_COMPLETED = 'DATA_IMPORT_COMPLETED';
97
101
  const SystemHighlightCellAdd = (cellHighlightInfo) => ({
98
102
  type: exports.SYSTEM_HIGHLIGHT_CELL_ADD,
99
103
  cellHighlightInfo: cellHighlightInfo,
@@ -365,16 +369,21 @@ const SystemQuickSearchFloatingVisibility = (visible) => ({
365
369
  visible,
366
370
  });
367
371
  exports.SystemQuickSearchFloatingVisibility = SystemQuickSearchFloatingVisibility;
368
- const SystemNotesShow = (cellPosition, editMode) => ({
369
- type: exports.SYSTEM_NOTESS_SHOW,
372
+ const SystemCellPopupShow = (cellPosition, editMode) => ({
373
+ type: exports.SYSTEM_CELL_POPUP_SHOW,
370
374
  editMode,
371
375
  cellPosition,
372
376
  });
373
- exports.SystemNotesShow = SystemNotesShow;
374
- const SystemNoteHide = () => ({
375
- type: exports.SYSTEM_NOTS_HIDE,
377
+ exports.SystemCellPopupShow = SystemCellPopupShow;
378
+ const SystemCellPopupEditFocusedEntity = (focusedEntity) => ({
379
+ type: exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY,
380
+ focusedEntity,
376
381
  });
377
- exports.SystemNoteHide = SystemNoteHide;
382
+ exports.SystemCellPopupEditFocusedEntity = SystemCellPopupEditFocusedEntity;
383
+ const SystemCellPopupHide = () => ({
384
+ type: exports.SYSTEM_CELL_POPUP_HIDE,
385
+ });
386
+ exports.SystemCellPopupHide = SystemCellPopupHide;
378
387
  const SystemDisableDeleteConfirmationSelector = (state) => {
379
388
  return state.DisableDeleteConfirmation;
380
389
  };
@@ -388,16 +397,26 @@ const SystemQuickSearchFloatingVisibilitySelector = (state) => {
388
397
  return (_a = state === null || state === void 0 ? void 0 : state.QuickSearch) === null || _a === void 0 ? void 0 : _a.floatingVisible;
389
398
  };
390
399
  exports.SystemQuickSearchFloatingVisibilitySelector = SystemQuickSearchFloatingVisibilitySelector;
391
- const SystemNotesSelector = (state) => {
400
+ const SystemCommentsAndNotesSelector = (state) => {
401
+ var _a;
402
+ return (_a = state === null || state === void 0 ? void 0 : state.NotesAndComments) === null || _a === void 0 ? void 0 : _a.popupPosition;
403
+ };
404
+ exports.SystemCommentsAndNotesSelector = SystemCommentsAndNotesSelector;
405
+ const SystemCommentsAndNotesEditModeSelector = (state) => {
392
406
  var _a;
393
- return (_a = state === null || state === void 0 ? void 0 : state.Notes) === null || _a === void 0 ? void 0 : _a.popupPosition;
407
+ return (_a = state === null || state === void 0 ? void 0 : state.NotesAndComments) === null || _a === void 0 ? void 0 : _a.editMode;
394
408
  };
395
- exports.SystemNotesSelector = SystemNotesSelector;
396
- const SystemNotesEditModeSelector = (state) => {
409
+ exports.SystemCommentsAndNotesEditModeSelector = SystemCommentsAndNotesEditModeSelector;
410
+ const SystemCommentsAndNotesFocusedEntitySelector = (state) => {
397
411
  var _a;
398
- return (_a = state === null || state === void 0 ? void 0 : state.Notes) === null || _a === void 0 ? void 0 : _a.editMode;
412
+ return (_a = state === null || state === void 0 ? void 0 : state.NotesAndComments) === null || _a === void 0 ? void 0 : _a.focusedEntity;
399
413
  };
400
- exports.SystemNotesEditModeSelector = SystemNotesEditModeSelector;
414
+ exports.SystemCommentsAndNotesFocusedEntitySelector = SystemCommentsAndNotesFocusedEntitySelector;
415
+ const DataImportCompleted = (dataImportedInfo) => ({
416
+ type: exports.DATA_IMPORT_COMPLETED,
417
+ dataImportedInfo: dataImportedInfo,
418
+ });
419
+ exports.DataImportCompleted = DataImportCompleted;
401
420
  const initialState = {
402
421
  AdaptableAlerts: GeneralConstants_1.EMPTY_ARRAY,
403
422
  AdaptableFlashingCells: {},
@@ -446,6 +465,7 @@ const initialState = {
446
465
  },
447
466
  };
448
467
  const SystemReducer = (state = initialState, action) => {
468
+ var _a;
449
469
  let alerts;
450
470
  let systemStatusMessages;
451
471
  switch (action.type) {
@@ -786,15 +806,27 @@ const SystemReducer = (state = initialState, action) => {
786
806
  const typedAction = action;
787
807
  return Object.assign(Object.assign({}, state), { QuickSearch: Object.assign(Object.assign({}, state.QuickSearch), { floatingVisible: typedAction.visible }) });
788
808
  }
789
- case exports.SYSTEM_NOTESS_SHOW: {
809
+ case exports.SYSTEM_CELL_POPUP_SHOW: {
790
810
  const typedAction = action;
791
- return Object.assign(Object.assign({}, state), { Notes: {
792
- editMode: typedAction.editMode,
793
- popupPosition: typedAction.cellPosition,
794
- } });
811
+ // reuse address refrence if we are editing the same cell
812
+ let newAddress = typedAction === null || typedAction === void 0 ? void 0 : typedAction.cellPosition;
813
+ const oldAddress = (_a = state === null || state === void 0 ? void 0 : state.NotesAndComments) === null || _a === void 0 ? void 0 : _a.popupPosition;
814
+ if (CellPopupService_1.CellPopupService.isSameAddress(oldAddress, typedAction.cellPosition)) {
815
+ newAddress = oldAddress;
816
+ // if edit mode is the same, just exist
817
+ if (typedAction.editMode === state.NotesAndComments.editMode) {
818
+ return state;
819
+ }
820
+ }
821
+ return Object.assign(Object.assign({}, state), { NotesAndComments: Object.assign(Object.assign({}, state.NotesAndComments), { editMode: typedAction.editMode, popupPosition: newAddress }) });
822
+ }
823
+ case exports.SYSTEM_CELL_POPUP_EDIT_FOCUSED_ENTITY: {
824
+ const typedAction = action;
825
+ return Object.assign(Object.assign({}, state), { NotesAndComments: Object.assign(Object.assign({}, state.NotesAndComments), { focusedEntity: typedAction.focusedEntity }) });
795
826
  }
796
- case exports.SYSTEM_NOTS_HIDE: {
797
- return Object.assign(Object.assign({}, state), { Notes: {
827
+ case exports.SYSTEM_CELL_POPUP_HIDE: {
828
+ return Object.assign(Object.assign({}, state), { NotesAndComments: {
829
+ editMode: false,
798
830
  popupPosition: null,
799
831
  } });
800
832
  }
@@ -1,9 +1,9 @@
1
1
  import * as Redux from 'redux';
2
2
  import { IAdaptable } from '../../AdaptableInterfaces/IAdaptable';
3
- import { IAdaptableStore } from './Interface/IAdaptableStore';
4
- import { ConfigState } from '../../PredefinedConfig/ConfigState';
5
3
  import { AdaptableState } from '../../PredefinedConfig/AdaptableState';
4
+ import { ConfigState } from '../../PredefinedConfig/ConfigState';
6
5
  import { PredefinedConfig } from '../../PredefinedConfig/PredefinedConfig';
6
+ import { IAdaptableStore } from './Interface/IAdaptableStore';
7
7
  type EmitterCallback = (data?: any) => any;
8
8
  type EmitterAnyCallback = (eventName: string, data?: any) => any;
9
9
  export declare const INIT_STATE = "INIT_STATE";
@@ -2,50 +2,51 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableStore = exports.LoadState = exports.InitState = exports.LOAD_STATE = exports.INIT_STATE = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const Enums_1 = require("../../PredefinedConfig/Common/Enums");
6
5
  const Redux = tslib_1.__importStar(require("redux"));
7
- const AdaptableReduxLocalStorageEngine_1 = require("./AdaptableReduxLocalStorageEngine");
8
- const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
6
+ const Enums_1 = require("../../PredefinedConfig/Common/Enums");
7
+ const PluginsRedux = tslib_1.__importStar(require("../ActionsReducers/PluginsRedux"));
9
8
  const PopupRedux = tslib_1.__importStar(require("../ActionsReducers/PopupRedux"));
10
9
  const PopupRedux_1 = require("../ActionsReducers/PopupRedux");
11
- const PluginsRedux = tslib_1.__importStar(require("../ActionsReducers/PluginsRedux"));
10
+ const AdaptableReduxLocalStorageEngine_1 = require("./AdaptableReduxLocalStorageEngine");
11
+ const AdaptableReduxMerger_1 = require("./AdaptableReduxMerger");
12
+ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
13
+ const ConfigConstants = tslib_1.__importStar(require("../../Utilities/Constants/ConfigConstants"));
14
+ const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
15
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
16
+ const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
17
+ const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
18
+ const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
19
+ const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
20
+ const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
12
21
  const AlertRedux = tslib_1.__importStar(require("../ActionsReducers/AlertRedux"));
13
- const FlashingCellRedux = tslib_1.__importStar(require("../ActionsReducers/FlashingCellRedux"));
14
- const SmartEditRedux = tslib_1.__importStar(require("../ActionsReducers/SmartEditRedux"));
22
+ const ApplicationRedux = tslib_1.__importStar(require("../ActionsReducers/ApplicationRedux"));
15
23
  const BulkUpdateRedux = tslib_1.__importStar(require("../ActionsReducers/BulkUpdateRedux"));
16
- const CustomSortRedux = tslib_1.__importStar(require("../ActionsReducers/CustomSortRedux"));
17
24
  const CalculatedColumnRedux = tslib_1.__importStar(require("../ActionsReducers/CalculatedColumnRedux"));
18
- const ShortcutRedux = tslib_1.__importStar(require("../ActionsReducers/ShortcutRedux"));
19
- const GridRedux = tslib_1.__importStar(require("../ActionsReducers/GridRedux"));
20
- const SystemRedux = tslib_1.__importStar(require("../ActionsReducers/SystemRedux"));
21
- const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
22
- const PlusMinusRedux = tslib_1.__importStar(require("../ActionsReducers/PlusMinusRedux"));
25
+ const ChartingRedux = tslib_1.__importStar(require("../ActionsReducers/ChartingRedux"));
26
+ const CommentsRedux = tslib_1.__importStar(require("../ActionsReducers/CommentsRedux"));
27
+ const CustomSortRedux = tslib_1.__importStar(require("../ActionsReducers/CustomSortRedux"));
28
+ const DashboardRedux = tslib_1.__importStar(require("../ActionsReducers/DashboardRedux"));
23
29
  const ExportRedux = tslib_1.__importStar(require("../ActionsReducers/ExportRedux"));
24
- const QuickSearchRedux = tslib_1.__importStar(require("../ActionsReducers/QuickSearchRedux"));
25
- const ThemeRedux = tslib_1.__importStar(require("../ActionsReducers/ThemeRedux"));
30
+ const FlashingCellRedux = tslib_1.__importStar(require("../ActionsReducers/FlashingCellRedux"));
26
31
  const FormatColumnRedux = tslib_1.__importStar(require("../ActionsReducers/FormatColumnRedux"));
27
- const StyledColumnRedux = tslib_1.__importStar(require("../ActionsReducers/StyledColumnRedux"));
28
- const NotesRedux = tslib_1.__importStar(require("../ActionsReducers/NotesRedux"));
29
- const ApplicationRedux = tslib_1.__importStar(require("../ActionsReducers/ApplicationRedux"));
30
32
  const FreeTextColumnRedux = tslib_1.__importStar(require("../ActionsReducers/FreeTextColumnRedux"));
33
+ const GridRedux = tslib_1.__importStar(require("../ActionsReducers/GridRedux"));
31
34
  const LayoutRedux = tslib_1.__importStar(require("../ActionsReducers/LayoutRedux"));
32
- const DashboardRedux = tslib_1.__importStar(require("../ActionsReducers/DashboardRedux"));
33
- const ToolPanelRedux = tslib_1.__importStar(require("../ActionsReducers/ToolPanelRedux"));
34
- const ScheduleRedux = tslib_1.__importStar(require("../ActionsReducers/ScheduleRedux"));
35
- const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSharingRedux"));
36
35
  const NamedQueryRedux = tslib_1.__importStar(require("../ActionsReducers/NamedQueryRedux"));
36
+ const NotesRedux = tslib_1.__importStar(require("../ActionsReducers/NotesRedux"));
37
+ const PlusMinusRedux = tslib_1.__importStar(require("../ActionsReducers/PlusMinusRedux"));
37
38
  const QueryRedux = tslib_1.__importStar(require("../ActionsReducers/QueryRedux"));
39
+ const QuickSearchRedux = tslib_1.__importStar(require("../ActionsReducers/QuickSearchRedux"));
40
+ const ScheduleRedux = tslib_1.__importStar(require("../ActionsReducers/ScheduleRedux"));
41
+ const ShortcutRedux = tslib_1.__importStar(require("../ActionsReducers/ShortcutRedux"));
42
+ const SmartEditRedux = tslib_1.__importStar(require("../ActionsReducers/SmartEditRedux"));
38
43
  const StatusBarRedux = tslib_1.__importStar(require("../ActionsReducers/StatusBarRedux"));
39
- const ChartingRedux = tslib_1.__importStar(require("../ActionsReducers/ChartingRedux"));
40
- const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
41
- const ConfigConstants = tslib_1.__importStar(require("../../Utilities/Constants/ConfigConstants"));
42
- const ObjectFactory_1 = require("../../Utilities/ObjectFactory");
43
- const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
44
- const PreviewHelper_1 = require("../../Utilities/Helpers/PreviewHelper");
45
- const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
46
- const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
47
- const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
48
- const AdaptableToaster_1 = require("../../View/Components/Popups/AdaptableToaster");
44
+ const StyledColumnRedux = tslib_1.__importStar(require("../ActionsReducers/StyledColumnRedux"));
45
+ const SystemRedux = tslib_1.__importStar(require("../ActionsReducers/SystemRedux"));
46
+ const SystemRedux_1 = require("../ActionsReducers/SystemRedux");
47
+ const TeamSharingRedux = tslib_1.__importStar(require("../ActionsReducers/TeamSharingRedux"));
48
+ const ThemeRedux = tslib_1.__importStar(require("../ActionsReducers/ThemeRedux"));
49
+ const ToolPanelRedux = tslib_1.__importStar(require("../ActionsReducers/ToolPanelRedux"));
49
50
  const TeamSharingState_1 = require("../../PredefinedConfig/TeamSharingState");
50
51
  exports.INIT_STATE = 'INIT_STATE';
51
52
  exports.LOAD_STATE = 'LOAD_STATE';
@@ -149,6 +150,7 @@ class AdaptableStore {
149
150
  Charting: ChartingRedux.ChartingReducer,
150
151
  StyledColumn: StyledColumnRedux.StyledColumnReducer,
151
152
  Notes: NotesRedux.NotesReducer,
153
+ Comment: CommentsRedux.CommentsReducer,
152
154
  Query: QueryRedux.QueryReducer,
153
155
  NamedQuery: NamedQueryRedux.NamedQueryReducer,
154
156
  };
@@ -201,6 +203,7 @@ class AdaptableStore {
201
203
  ConfigConstants.GRID,
202
204
  ConfigConstants.POPUP,
203
205
  ConfigConstants.PLUGINS,
206
+ ConfigConstants.COMMENT,
204
207
  ];
205
208
  const didPersistentStateChange = (state, newState) => {
206
209
  return Object.keys(newState).some((key) => {
@@ -279,7 +282,7 @@ exports.AdaptableStore = AdaptableStore;
279
282
  const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
280
283
  return function (next) {
281
284
  return function (action) {
282
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
285
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
283
286
  switch (action.type) {
284
287
  /*******************
285
288
  * NAMED QUERY ACTIONS
@@ -598,6 +601,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
598
601
  adaptable.api.internalApi
599
602
  .getCalculatedColumnExpressionService()
600
603
  .createAggregatedScalarLiveValue(returnAction.calculatedColumn);
604
+ adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
601
605
  }
602
606
  adaptable.updateColDefsForSpecialColumns();
603
607
  return returnAction;
@@ -623,6 +627,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
623
627
  adaptable.api.internalApi
624
628
  .getCalculatedColumnExpressionService()
625
629
  .destroyAggregatedScalarLiveValue(returnAction.calculatedColumn);
630
+ adaptable.api.calculatedColumnApi.internalApi.fireCalculatedColumnChangedEvent(action.type, actionTyped.calculatedColumn);
626
631
  adaptable.updateColDefsForSpecialColumns();
627
632
  return returnAction;
628
633
  }
@@ -871,7 +876,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
871
876
  * Note ACTIONS
872
877
  *******************/
873
878
  /**
874
- * Use Case: Comments has been edited/deleted/added
879
+ * Use Case: Notes has been edited/deleted/added
875
880
  * Action: Triangle can be removed/added
876
881
  */
877
882
  case NotesRedux.NOTES_ADD:
@@ -880,9 +885,72 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
880
885
  let returnAction = next(action);
881
886
  const node = adaptable.api.gridApi.getRowNodeForPrimaryKey(returnAction.adaptableNote.PrimaryKeyValue);
882
887
  adaptable.refreshCells([node], [returnAction.adaptableNote.ColumnId], true);
883
- if (action.type == NotesRedux.NOTES_DELETE) {
884
- adaptable.api.notesApi.hideNote();
888
+ return returnAction;
889
+ }
890
+ /*******************
891
+ * Comment ACTIONS
892
+ *******************/
893
+ /**
894
+ * Use Case: Comments has been edited/deleted/added
895
+ * Action: Triangle can be removed/added
896
+ */
897
+ case CommentsRedux.COMMENTS_ADD:
898
+ case CommentsRedux.COMMENTS_EDIT:
899
+ case CommentsRedux.COMMENTS_DELETE:
900
+ case CommentsRedux.COMMENTS_CELL_DELETE:
901
+ case CommentsRedux.COMMENTS_CELL_ADD: {
902
+ let returnAction = next(action);
903
+ let node = null;
904
+ let columnId = null;
905
+ if ('cellAddress' in returnAction) {
906
+ node = adaptable.api.gridApi.getRowNodeForPrimaryKey(returnAction.cellAddress.PrimaryKeyValue);
907
+ columnId = returnAction.cellAddress.ColumnId;
885
908
  }
909
+ else if ('cellComments' in returnAction) {
910
+ node = adaptable.api.gridApi.getRowNodeForPrimaryKey(returnAction.cellComments.PrimaryKeyValue);
911
+ columnId = returnAction.cellComments.ColumnId;
912
+ }
913
+ if (node && columnId) {
914
+ adaptable.refreshCells([node], [columnId], true);
915
+ requestAnimationFrame(() => {
916
+ var _a, _b;
917
+ const commentThreads = adaptable.api.commentApi.getCommentThreads();
918
+ adaptable.api.eventApi.emit('CommentsChanged', adaptable.api.commentApi.getCommentThreads());
919
+ (_b = (_a = adaptable.api.optionsApi
920
+ .getCommentsOptions()) === null || _a === void 0 ? void 0 : _a.persistCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, commentThreads);
921
+ });
922
+ }
923
+ return returnAction;
924
+ }
925
+ case CommentsRedux.COMMENTS_LOAD: {
926
+ const previousCommentThreads = adaptable.api.commentApi.getCommentThreads();
927
+ let returnAction = next(action);
928
+ const newCommentThreads = (_j = adaptable.api.commentApi.getCommentThreads()) !== null && _j !== void 0 ? _j : [];
929
+ requestAnimationFrame(() => {
930
+ let addedCommentThreads = [];
931
+ let deletedCommentThreads = [];
932
+ const prevCommentThreadsSet = new Set((previousCommentThreads !== null && previousCommentThreads !== void 0 ? previousCommentThreads : []).map((c) => c.Uuid));
933
+ const newCommentThreadsSet = new Set((newCommentThreads !== null && newCommentThreads !== void 0 ? newCommentThreads : []).map((c) => c.Uuid));
934
+ for (const commentThread of newCommentThreads) {
935
+ if (!prevCommentThreadsSet.has(commentThread.Uuid)) {
936
+ addedCommentThreads.push(commentThread);
937
+ }
938
+ }
939
+ for (const commentThread of previousCommentThreads) {
940
+ if (!newCommentThreadsSet.has(commentThread.Uuid)) {
941
+ deletedCommentThreads.push(commentThread);
942
+ }
943
+ }
944
+ // This cannot be called because it would trigger an infinite loop
945
+ // adaptable.api.eventApi.emit('CommentsChanged', commentThreads);
946
+ // refresh all comments cells to show or hide the triangle
947
+ [...addedCommentThreads, ...deletedCommentThreads].forEach((commentThread) => {
948
+ const node = adaptable.api.gridApi.getRowNodeForPrimaryKey(commentThread.PrimaryKeyValue);
949
+ if (node && commentThread.ColumnId) {
950
+ adaptable.refreshCells([node], [commentThread.ColumnId], true);
951
+ }
952
+ });
953
+ });
886
954
  return returnAction;
887
955
  }
888
956
  /*******************
@@ -913,13 +981,6 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
913
981
  case ScheduleRedux.IPUSHPULL_SCHEDULE_UNSUSPEND:
914
982
  case ScheduleRedux.IPUSHPULL_SCHEDULE_SUSPEND_ALL:
915
983
  case ScheduleRedux.IPUSHPULL_SCHEDULE_UNSUSPEND_ALL:
916
- case ScheduleRedux.GLUE42_SCHEDULE_ADD:
917
- case ScheduleRedux.GLUE42_SCHEDULE_EDIT:
918
- case ScheduleRedux.GLUE42_SCHEDULE_DELETE:
919
- case ScheduleRedux.GLUE42_SCHEDULE_SUSPEND:
920
- case ScheduleRedux.GLUE42_SCHEDULE_UNSUSPEND:
921
- case ScheduleRedux.GLUE42_SCHEDULE_SUSPEND_ALL:
922
- case ScheduleRedux.GLUE42_SCHEDULE_UNSUSPEND_ALL:
923
984
  case ScheduleRedux.OPENFIN_SCHEDULE_ADD:
924
985
  case ScheduleRedux.OPENFIN_SCHEDULE_EDIT:
925
986
  case ScheduleRedux.OPENFIN_SCHEDULE_DELETE:
@@ -965,8 +1026,8 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
965
1026
  let returnAction = next(action);
966
1027
  const newLayoutState = middlewareAPI.getState().Layout;
967
1028
  adaptable.api.layoutApi.internalApi.fireLayoutChangedEvent(action.type, oldLayoutState, newLayoutState);
968
- const oldFilters = (_j = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _j === void 0 ? void 0 : _j.ColumnFilters;
969
- const newFilters = (_k = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
1029
+ const oldFilters = (_k = oldLayoutState.Layouts.find((l) => l.Name == oldLayoutState.CurrentLayout)) === null || _k === void 0 ? void 0 : _k.ColumnFilters;
1030
+ const newFilters = (_l = newLayoutState.Layouts.find((l) => l.Name == newLayoutState.CurrentLayout)) === null || _l === void 0 ? void 0 : _l.ColumnFilters;
970
1031
  // Tell Grid to apply filtering if filters have been changed in a loaded Layout
971
1032
  if (adaptable.api.columnFilterApi.internalApi.areColumnFiltersDifferent(oldFilters, newFilters)) {
972
1033
  adaptable.applyColumnFiltering();
@@ -983,7 +1044,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
983
1044
  // tell grid the layout has been selected
984
1045
  adaptable.setLayout(currentLayout);
985
1046
  }
986
- if (!((_l = adaptable.adaptableOptions.layoutOptions) === null || _l === void 0 ? void 0 : _l.autoSaveLayouts)) {
1047
+ if (!((_m = adaptable.adaptableOptions.layoutOptions) === null || _m === void 0 ? void 0 : _m.autoSaveLayouts)) {
987
1048
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(currentLayout));
988
1049
  }
989
1050
  }
@@ -991,7 +1052,7 @@ const adaptableMiddleware = (adaptable) => (function(middlewareAPI) {
991
1052
  returnAction.type == LayoutRedux.LAYOUT_SAVE) {
992
1053
  const actionTyped = action;
993
1054
  // if autosave is false
994
- if (!((_m = adaptable.adaptableOptions.layoutOptions) === null || _m === void 0 ? void 0 : _m.autoSaveLayouts)) {
1055
+ if (!((_o = adaptable.adaptableOptions.layoutOptions) === null || _o === void 0 ? void 0 : _o.autoSaveLayouts)) {
995
1056
  // and the current layout is saved, make sure we also update the draft
996
1057
  if (actionTyped.layout.Name === newLayoutState.CurrentLayout) {
997
1058
  middlewareAPI.dispatch(GridRedux.LayoutUpdateCurrentDraft(actionTyped.layout));
@@ -0,0 +1,16 @@
1
+ import { AdaptableApi } from '../Api/AdaptableApi';
2
+ import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
3
+ import { AdaptableModuleBase } from './AdaptableModuleBase';
4
+ import { IModule } from './Interface/IModule';
5
+ /**
6
+ * In the first iteration a cell can have only one note, the
7
+ * notes is a list to allow further development.
8
+ */
9
+ export declare class CommentsModule extends AdaptableModuleBase implements IModule {
10
+ private adaptable;
11
+ constructor(api: AdaptableApi);
12
+ isModuleAvailable(): boolean;
13
+ private loadComments;
14
+ addContextMenuItems(menuContext: ContextMenuContext): AdaptableMenuItem[] | undefined;
15
+ private getAddRemoveCommentsMenuItems;
16
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CommentsModule = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
6
+ const ObjectFactory_1 = require("../Utilities/ObjectFactory");
7
+ const AdaptableModuleBase_1 = require("./AdaptableModuleBase");
8
+ /**
9
+ * In the first iteration a cell can have only one note, the
10
+ * notes is a list to allow further development.
11
+ */
12
+ class CommentsModule extends AdaptableModuleBase_1.AdaptableModuleBase {
13
+ constructor(api) {
14
+ super(ModuleConstants.CommentsModuleId, ModuleConstants.CommentsFriendlyName, 'comments', 'CommentsPopup', 'comments', api);
15
+ this.adaptable = api.internalApi.getAdaptableInstance();
16
+ this.adaptable.api.eventApi.on('AdaptableReady', () => this.handleAdaptableReady());
17
+ this.loadComments();
18
+ }
19
+ isModuleAvailable() {
20
+ const options = this.adaptable.api.optionsApi.getCommentsOptions();
21
+ if (!options || !options.persistCommentThreads || !options.loadCommentThreads) {
22
+ return false;
23
+ }
24
+ return super.isModuleAvailable();
25
+ }
26
+ async loadComments() {
27
+ var _a, _b;
28
+ const commentThreads = await ((_b = (_a = this.api.optionsApi
29
+ .getCommentsOptions()) === null || _a === void 0 ? void 0 : _a.loadCommentThreads) === null || _b === void 0 ? void 0 : _b.call(_a, (0, ObjectFactory_1.createBaseContext)(this.adaptable.api)));
30
+ this.api.commentApi.loadCommentThreads(commentThreads);
31
+ }
32
+ addContextMenuItems(menuContext) {
33
+ var _a, _b;
34
+ if (!this.isModuleAvailable()) {
35
+ return undefined;
36
+ }
37
+ const items = [];
38
+ const isCellCommentable = (_b = (_a = this.adaptable.api.optionsApi) === null || _a === void 0 ? void 0 : _a.getCommentsOptions()) === null || _b === void 0 ? void 0 : _b.isCellCommentable;
39
+ if (!isCellCommentable ||
40
+ isCellCommentable({
41
+ adaptableApi: this.adaptable.api,
42
+ address: {
43
+ PrimaryKeyValue: menuContext.primaryKeyValue,
44
+ ColumnId: menuContext.adaptableColumn.columnId,
45
+ },
46
+ userName: this.adaptable.api.optionsApi.getUserName(),
47
+ adaptableId: this.adaptable.adaptableOptions.adaptableId,
48
+ })) {
49
+ items.push(...this.getAddRemoveCommentsMenuItems(menuContext));
50
+ }
51
+ return items;
52
+ }
53
+ getAddRemoveCommentsMenuItems(menuContext) {
54
+ const items = [];
55
+ // does not have note
56
+ const cellAddress = {
57
+ PrimaryKeyValue: menuContext.primaryKeyValue,
58
+ ColumnId: menuContext.adaptableColumn.columnId,
59
+ };
60
+ const comments = this.adaptable.api.commentApi.getComments(cellAddress);
61
+ if (comments) {
62
+ items.push(this.createColumnMenuItemClickFunction('Remove Comments', this.moduleInfo.Glyph, () => {
63
+ this.api.commentApi.deleteCommentThread(cellAddress);
64
+ }));
65
+ }
66
+ else {
67
+ items.push(this.createColumnMenuItemClickFunction('Add Comment', this.moduleInfo.Glyph, () => {
68
+ // add an empty one
69
+ this.api.commentApi.addCommentThread(Object.assign(Object.assign({}, cellAddress), { Comments: [] }));
70
+ requestAnimationFrame(() => {
71
+ this.api.internalApi.getCellPopupService().showPopup({
72
+ PrimaryKeyValue: menuContext.primaryKeyValue,
73
+ ColumnId: menuContext.adaptableColumn.columnId,
74
+ }, true);
75
+ this.api.internalApi.getCellPopupService().editFocusedEntity('Comment');
76
+ });
77
+ }));
78
+ }
79
+ return items;
80
+ }
81
+ }
82
+ exports.CommentsModule = CommentsModule;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { AdaptableModuleBase } from './AdaptableModuleBase';
2
3
  import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
3
4
  import { AdaptableMenuItem, ContextMenuContext } from '../PredefinedConfig/Common/Menu';
@@ -21,19 +22,26 @@ export declare class LayoutModule extends AdaptableModuleBase implements IModule
21
22
  private createViewPivotItemsMenuItem;
22
23
  getTeamSharingAction(): TeamSharingImportInfo<Layout>;
23
24
  toViewAll(): {
24
- items: {
25
+ items: ({
25
26
  name: string;
26
27
  values: string[];
27
- }[];
28
+ } | {
29
+ name: string;
30
+ view: JSX.Element;
31
+ })[];
28
32
  abObject: Layout;
29
33
  }[];
30
34
  toView(layout: Layout): {
31
- items: {
35
+ items: ({
32
36
  name: string;
33
37
  values: string[];
34
- }[];
38
+ } | {
39
+ name: string;
40
+ view: JSX.Element;
41
+ })[];
35
42
  abObject: Layout;
36
43
  };
37
44
  getViewProperties(): AdaptableModuleView;
38
45
  handleLayoutChange(): void;
46
+ getReferencedNamedQueryNames(layout: Layout): string[];
39
47
  }