@adaptabletools/adaptable 18.0.0-canary.2 → 18.0.0-canary.20

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 (366) hide show
  1. package/agGrid.d.ts +4 -21
  2. package/agGrid.js +9 -26
  3. package/base.css +22 -8
  4. package/base.css.map +1 -1
  5. package/index.css +101 -75
  6. package/index.css.map +1 -1
  7. package/package.json +4 -5
  8. package/src/AdaptableInterfaces/IAdaptable.d.ts +58 -108
  9. package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -7
  10. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +11 -4
  11. package/src/AdaptableOptions/ColumnOptions.d.ts +9 -4
  12. package/src/AdaptableOptions/CommentOptions.d.ts +33 -0
  13. package/src/AdaptableOptions/GroupingOptions.d.ts +0 -7
  14. package/src/AdaptableOptions/MenuOptions.d.ts +6 -54
  15. package/src/AdaptableOptions/MenuOptions.js +71 -74
  16. package/src/AdaptableOptions/{NotesOptions.d.ts → NoteOptions.d.ts} +7 -4
  17. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +17 -0
  18. package/src/Api/AdaptableApi.d.ts +9 -4
  19. package/src/Api/BulkUpdateApi.d.ts +0 -5
  20. package/src/Api/ColumnApi.d.ts +4 -0
  21. package/src/Api/CommentApi.d.ts +11 -12
  22. package/src/Api/ConfigApi.d.ts +4 -5
  23. package/src/Api/EventApi.d.ts +7 -9
  24. package/src/Api/Events/AdaptableReady.d.ts +3 -3
  25. package/src/Api/Events/CommentChanged.d.ts +11 -0
  26. package/src/Api/Events/GridDataChanged.d.ts +4 -4
  27. package/src/Api/GridApi.d.ts +23 -13
  28. package/src/Api/Implementation/ActionColumnApiImpl.d.ts +2 -0
  29. package/src/Api/Implementation/ActionColumnApiImpl.js +30 -0
  30. package/src/Api/Implementation/AdaptableApiImpl.d.ts +3 -2
  31. package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
  32. package/src/Api/Implementation/ApiBase.d.ts +5 -3
  33. package/src/Api/Implementation/ApiBase.js +8 -2
  34. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +0 -1
  35. package/src/Api/Implementation/BulkUpdateApiImpl.js +0 -4
  36. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +0 -5
  37. package/src/Api/Implementation/CellSummaryApiImpl.js +2 -23
  38. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/ColumnApiImpl.js +10 -0
  40. package/src/Api/Implementation/CommentsApiImpl.d.ts +5 -2
  41. package/src/Api/Implementation/CommentsApiImpl.js +7 -1
  42. package/src/Api/Implementation/ConfigApiImpl.d.ts +2 -2
  43. package/src/Api/Implementation/ConfigApiImpl.js +21 -13
  44. package/src/Api/Implementation/GridApiImpl.d.ts +6 -3
  45. package/src/Api/Implementation/GridApiImpl.js +49 -14
  46. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
  47. package/src/Api/Implementation/LayoutApiImpl.js +18 -0
  48. package/src/Api/Implementation/NoteApiImpl.d.ts +18 -0
  49. package/src/Api/Implementation/NoteApiImpl.js +40 -0
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +4 -4
  51. package/src/Api/Implementation/OptionsApiImpl.js +4 -4
  52. package/src/Api/Implementation/ScopeApiImpl.d.ts +2 -0
  53. package/src/Api/Implementation/ScopeApiImpl.js +20 -7
  54. package/src/Api/Implementation/StatusBarApiImpl.d.ts +0 -1
  55. package/src/Api/Implementation/StatusBarApiImpl.js +0 -3
  56. package/src/Api/Implementation/ToolPanelApiImpl.js +6 -6
  57. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -3
  58. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -8
  59. package/src/Api/Internal/ActionRowInternalApi.d.ts +5 -1
  60. package/src/Api/Internal/ActionRowInternalApi.js +106 -0
  61. package/src/Api/Internal/AdaptableInternalApi.d.ts +6 -7
  62. package/src/Api/Internal/AdaptableInternalApi.js +21 -19
  63. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  64. package/src/Api/Internal/CalculatedColumnInternalApi.js +71 -0
  65. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -0
  66. package/src/Api/Internal/ColumnFilterInternalApi.js +23 -1
  67. package/src/Api/Internal/ColumnInternalApi.d.ts +4 -1
  68. package/src/Api/Internal/ColumnInternalApi.js +12 -0
  69. package/src/Api/Internal/CommentsInternalApi.d.ts +4 -0
  70. package/src/Api/Internal/CommentsInternalApi.js +14 -0
  71. package/src/Api/Internal/CustomSortInternalApi.d.ts +3 -2
  72. package/src/Api/Internal/CustomSortInternalApi.js +32 -1
  73. package/src/Api/Internal/DataSetInternalApi.js +1 -1
  74. package/src/Api/Internal/ExportInternalApi.d.ts +2 -1
  75. package/src/Api/Internal/ExportInternalApi.js +4 -1
  76. package/src/Api/Internal/Fdc3InternalApi.js +2 -2
  77. package/src/Api/Internal/FormatColumnInternalApi.js +3 -2
  78. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +2 -0
  79. package/src/Api/Internal/FreeTextColumnInternalApi.js +60 -0
  80. package/src/Api/Internal/GridFilterInternalApi.d.ts +5 -0
  81. package/src/Api/Internal/GridFilterInternalApi.js +7 -1
  82. package/src/Api/Internal/GridInternalApi.d.ts +23 -3
  83. package/src/Api/Internal/GridInternalApi.js +141 -7
  84. package/src/Api/Internal/LayoutInternalApi.d.ts +1 -0
  85. package/src/Api/Internal/LayoutInternalApi.js +16 -0
  86. package/src/Api/Internal/NoteInternalApi.d.ts +4 -0
  87. package/src/Api/Internal/NoteInternalApi.js +14 -0
  88. package/src/Api/Internal/TeamSharingInternalApi.js +1 -1
  89. package/src/Api/InteropioPluginApi.d.ts +2 -2
  90. package/src/Api/LayoutApi.d.ts +15 -0
  91. package/src/Api/NoteApi.d.ts +48 -0
  92. package/src/Api/OptionsApi.d.ts +8 -8
  93. package/src/Api/ScopeApi.d.ts +10 -0
  94. package/src/Api/UserInterfaceApi.d.ts +0 -11
  95. package/src/EnvVars.d.ts +3 -0
  96. package/src/EnvVars.js +4 -0
  97. package/src/PredefinedConfig/AdaptableState.d.ts +2 -2
  98. package/src/PredefinedConfig/CommentState.d.ts +27 -23
  99. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  100. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  101. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +4 -1
  102. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -0
  103. package/src/PredefinedConfig/Common/AggregationColumns.js +3 -0
  104. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +4 -0
  105. package/src/PredefinedConfig/Common/Enums.d.ts +2 -1
  106. package/src/PredefinedConfig/Common/Enums.js +1 -0
  107. package/src/PredefinedConfig/Common/Menu.d.ts +15 -1
  108. package/src/PredefinedConfig/Common/Menu.js +97 -1
  109. package/src/PredefinedConfig/Common/RowSummary.d.ts +21 -0
  110. package/src/PredefinedConfig/Common/RowSummary.js +17 -0
  111. package/src/PredefinedConfig/Common/TransposeConfig.d.ts +25 -0
  112. package/src/PredefinedConfig/Common/Types.d.ts +4 -4
  113. package/src/PredefinedConfig/Common/Types.js +4 -1
  114. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  115. package/src/PredefinedConfig/{NotesState.d.ts → NoteState.d.ts} +12 -22
  116. package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -3
  117. package/src/PredefinedConfig/Selection/GridCell.d.ts +13 -0
  118. package/src/PredefinedConfig/SystemState.d.ts +9 -3
  119. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +9 -0
  120. package/src/Redux/ActionsReducers/LayoutRedux.js +32 -10
  121. package/src/Redux/ActionsReducers/NoteRedux.d.ts +38 -0
  122. package/src/Redux/ActionsReducers/{NotesRedux.js → NoteRedux.js} +29 -28
  123. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -1
  124. package/src/Redux/ActionsReducers/SystemRedux.js +16 -4
  125. package/src/Redux/Store/AdaptableStore.d.ts +4 -6
  126. package/src/Redux/Store/AdaptableStore.js +67 -77
  127. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +8 -2
  128. package/src/Strategy/AdaptableModuleBase.d.ts +8 -8
  129. package/src/Strategy/AdaptableModuleBase.js +13 -15
  130. package/src/Strategy/AlertModule.d.ts +1 -2
  131. package/src/Strategy/AlertModule.js +3 -56
  132. package/src/Strategy/BulkUpdateModule.js +1 -1
  133. package/src/Strategy/CalculatedColumnModule.d.ts +2 -3
  134. package/src/Strategy/CalculatedColumnModule.js +6 -26
  135. package/src/Strategy/CellSummaryModule.d.ts +8 -6
  136. package/src/Strategy/CellSummaryModule.js +78 -23
  137. package/src/Strategy/ChartingModule.d.ts +0 -1
  138. package/src/Strategy/ChartingModule.js +2 -22
  139. package/src/Strategy/ColumnFilterModule.d.ts +2 -3
  140. package/src/Strategy/ColumnFilterModule.js +44 -103
  141. package/src/Strategy/ColumnInfoModule.js +2 -0
  142. package/src/Strategy/{CommentsModule.d.ts → CommentModule.d.ts} +2 -5
  143. package/src/Strategy/{CommentsModule.js → CommentModule.js} +17 -23
  144. package/src/Strategy/CustomSortModule.js +3 -2
  145. package/src/Strategy/DashboardModule.d.ts +1 -2
  146. package/src/Strategy/DashboardModule.js +9 -15
  147. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  148. package/src/Strategy/DataChangeHistoryModule.js +3 -1
  149. package/src/Strategy/DataImportModule.d.ts +1 -1
  150. package/src/Strategy/DataImportModule.js +5 -5
  151. package/src/Strategy/DataSetModule.d.ts +1 -1
  152. package/src/Strategy/DataSetModule.js +1 -1
  153. package/src/Strategy/ExportModule.d.ts +1 -0
  154. package/src/Strategy/ExportModule.js +17 -2
  155. package/src/Strategy/Fdc3Module.js +3 -0
  156. package/src/Strategy/FlashingCellModule.d.ts +1 -2
  157. package/src/Strategy/FlashingCellModule.js +6 -19
  158. package/src/Strategy/FormatColumnModule.d.ts +0 -2
  159. package/src/Strategy/FormatColumnModule.js +6 -51
  160. package/src/Strategy/FreeTextColumnModule.d.ts +0 -1
  161. package/src/Strategy/FreeTextColumnModule.js +1 -31
  162. package/src/Strategy/GridFilterModule.d.ts +0 -1
  163. package/src/Strategy/GridFilterModule.js +0 -37
  164. package/src/Strategy/GridInfoModule.js +2 -0
  165. package/src/Strategy/Interface/IModule.d.ts +0 -1
  166. package/src/Strategy/LayoutModule.d.ts +9 -3
  167. package/src/Strategy/LayoutModule.js +143 -63
  168. package/src/Strategy/NamedQueryModule.d.ts +0 -1
  169. package/src/Strategy/NamedQueryModule.js +0 -19
  170. package/src/Strategy/{NotesModule.d.ts → NoteModule.d.ts} +2 -1
  171. package/src/Strategy/NoteModule.js +57 -0
  172. package/src/Strategy/PlusMinusModule.d.ts +1 -1
  173. package/src/Strategy/PlusMinusModule.js +2 -2
  174. package/src/Strategy/ScheduleModule.d.ts +1 -1
  175. package/src/Strategy/ScheduleModule.js +1 -1
  176. package/src/Strategy/SettingsPanelModule.js +3 -3
  177. package/src/Strategy/ShortcutModule.d.ts +1 -1
  178. package/src/Strategy/ShortcutModule.js +1 -1
  179. package/src/Strategy/SmartEditModule.js +1 -1
  180. package/src/Strategy/StyledColumnModule.d.ts +1 -1
  181. package/src/Strategy/StyledColumnModule.js +26 -26
  182. package/src/Strategy/SystemStatusModule.js +2 -2
  183. package/src/Strategy/TeamSharingModule.d.ts +1 -0
  184. package/src/Strategy/TeamSharingModule.js +5 -5
  185. package/src/Strategy/ToolPanelModule.d.ts +0 -1
  186. package/src/Strategy/ToolPanelModule.js +0 -23
  187. package/src/Strategy/Utilities/getScopeViewItems.js +3 -0
  188. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -1
  189. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  190. package/src/Utilities/Constants/GeneralConstants.js +1 -0
  191. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  192. package/src/Utilities/Constants/ModuleConstants.js +6 -6
  193. package/src/Utilities/Defaults/DefaultSettingsPanel.js +7 -6
  194. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -2
  195. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +429 -1
  196. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -3
  197. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +1 -1
  198. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  199. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +15 -0
  200. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  201. package/src/Utilities/Extensions/ArrayExtensions.js +4 -0
  202. package/src/Utilities/Helpers/AdaptableHelper.d.ts +3 -4
  203. package/src/Utilities/Helpers/AdaptableHelper.js +18 -58
  204. package/src/Utilities/Helpers/Helper.d.ts +2 -0
  205. package/src/Utilities/Helpers/Helper.js +4 -0
  206. package/src/Utilities/MenuItem.d.ts +7 -4
  207. package/src/Utilities/MenuItem.js +6 -3
  208. package/src/Utilities/ObjectFactory.d.ts +3 -3
  209. package/src/Utilities/ObjectFactory.js +4 -24
  210. package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +4 -2
  211. package/src/Utilities/Services/AggregatedScalarLiveValue.js +26 -19
  212. package/src/Utilities/Services/CellPopupService.js +2 -3
  213. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +1 -1
  214. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -4
  215. package/src/Utilities/Services/LicenseService/index.d.ts +3 -0
  216. package/src/Utilities/Services/LicenseService/index.js +1 -181
  217. package/src/Utilities/Services/MetamodelService.d.ts +1 -1
  218. package/src/Utilities/Services/MetamodelService.js +6 -3
  219. package/src/Utilities/Services/ModuleService.js +4 -0
  220. package/src/Utilities/Services/QueryLanguageService.d.ts +1 -1
  221. package/src/Utilities/Services/QueryLanguageService.js +4 -3
  222. package/src/Utilities/Services/ReportService.d.ts +7 -5
  223. package/src/Utilities/Services/ReportService.js +238 -22
  224. package/src/Utilities/Services/RowEditService.d.ts +3 -2
  225. package/src/Utilities/Services/RowEditService.js +3 -1
  226. package/src/Utilities/adaptableQlUtils.d.ts +2 -0
  227. package/src/Utilities/adaptableQlUtils.js +14 -0
  228. package/src/Utilities/license/decode.js +1 -65
  229. package/src/Utilities/license/hashing.js +1 -43
  230. package/src/View/AdaptableView.js +1 -3
  231. package/src/View/AdaptableViewFactory.js +2 -2
  232. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +2 -2
  233. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +1 -1
  234. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  235. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +3 -3
  236. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  237. package/src/View/CellSummary/CellSummaryPopup.js +1 -1
  238. package/src/View/Comments/CommentsEditor.js +24 -11
  239. package/src/View/Comments/CommentsPopup.js +20 -11
  240. package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
  241. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.d.ts +5 -0
  242. package/src/View/Components/AdaptableInput/AdaptableDateInlineInput.js +42 -0
  243. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
  244. package/src/View/Components/CellPopup/index.d.ts +1 -0
  245. package/src/View/Components/CellPopup/index.js +5 -2
  246. package/src/View/Components/FilterForm/FilterForm.js +20 -12
  247. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -8
  248. package/src/View/Components/NewScopeComponent.js +34 -1
  249. package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +6 -5
  250. package/src/View/Components/Popups/AdaptableLoadingScreen.js +19 -9
  251. package/src/View/Components/Popups/AdaptableToaster.js +1 -1
  252. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +7 -7
  253. package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +1 -0
  254. package/src/View/Components/Popups/WindowPopups/windowFactory.js +3 -0
  255. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  256. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  257. package/src/View/Components/ValueSelector/index.js +2 -2
  258. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  259. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +8 -9
  260. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -1
  261. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +3 -1
  262. package/src/View/GridFilter/GridFilterViewPanel.js +9 -5
  263. package/src/View/GridFilter/useGridFilterExpressionEditor.js +1 -1
  264. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -3
  265. package/src/View/Layout/LayoutViewPanel.js +2 -1
  266. package/src/View/Layout/TransposedPopup.d.ts +3 -0
  267. package/src/View/Layout/TransposedPopup.js +195 -0
  268. package/src/View/Layout/Wizard/LayoutWizard.js +36 -3
  269. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  270. package/src/View/Layout/Wizard/sections/RowSummarySection.d.ts +9 -0
  271. package/src/View/Layout/Wizard/sections/RowSummarySection.js +174 -0
  272. package/src/View/License/LicenseWatermark.js +1 -61
  273. package/src/View/Note/NotePopup.d.ts +2 -0
  274. package/src/View/{Notes/NotesPopup.js → Note/NotePopup.js} +17 -17
  275. package/src/View/SpecialColumnSettingsWizardStep.js +4 -4
  276. package/src/View/Theme/ThemeSelector.js +3 -3
  277. package/src/agGrid/ActionColumnRenderer.js +7 -6
  278. package/src/agGrid/Adaptable.d.ts +3 -455
  279. package/src/agGrid/Adaptable.js +8 -5292
  280. package/src/agGrid/AdaptableAgGrid.d.ts +352 -0
  281. package/src/agGrid/AdaptableAgGrid.js +3963 -0
  282. package/src/agGrid/AdaptableLogger.js +77 -11
  283. package/src/agGrid/AgGridAdapter.d.ts +64 -0
  284. package/src/agGrid/AgGridAdapter.js +585 -0
  285. package/src/agGrid/AgGridColumnAdapter.d.ts +56 -0
  286. package/src/agGrid/AgGridColumnAdapter.js +831 -0
  287. package/src/agGrid/AgGridMenuAdapter.d.ts +28 -0
  288. package/src/agGrid/AgGridMenuAdapter.js +277 -0
  289. package/src/agGrid/AgGridOptionsService.d.ts +15 -0
  290. package/src/agGrid/AgGridOptionsService.js +76 -0
  291. package/src/agGrid/BadgeRenderer.js +1 -1
  292. package/src/agGrid/CheckboxRenderer.js +1 -1
  293. package/src/agGrid/FilterWrapper.d.ts +2 -2
  294. package/src/agGrid/FilterWrapper.js +1 -1
  295. package/src/agGrid/attachAddaptableColumnTypes.d.ts +12 -12
  296. package/src/agGrid/defaultAdaptableOptions.d.ts +3 -0
  297. package/src/{Utilities/Defaults/DefaultAdaptableOptions.js → agGrid/defaultAdaptableOptions.js} +71 -17
  298. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +1 -1
  299. package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
  300. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +2 -2
  301. package/src/agGrid/editors/AdaptableNumberEditor/index.js +2 -2
  302. package/src/agGrid/weightedAverage.d.ts +0 -2
  303. package/src/agGrid/weightedAverage.js +0 -54
  304. package/src/components/ColorPicker/ColorPicker.d.ts +1 -1
  305. package/src/components/Datepicker/index.d.ts +1 -1
  306. package/src/components/Datepicker/index.js +10 -2
  307. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +2 -1
  308. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +0 -1
  309. package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -14
  310. package/src/components/InfiniteTable/index.js +2 -2
  311. package/src/components/Input/index.d.ts +1 -2
  312. package/src/components/List/ListGroupItem/index.d.ts +1 -1
  313. package/src/components/Modal/index.d.ts +1 -0
  314. package/src/components/Modal/index.js +4 -3
  315. package/src/components/Select/Select.d.ts +3 -1
  316. package/src/components/Select/Select.js +4 -2
  317. package/src/components/Textarea/index.d.ts +2 -2
  318. package/src/components/icons/index.js +2 -0
  319. package/src/components/icons/note.js +2 -2
  320. package/src/components/icons/rows.d.ts +3 -0
  321. package/src/components/icons/rows.js +4 -0
  322. package/src/env.js +2 -2
  323. package/src/metamodel/adaptable.metamodel.d.ts +186 -32
  324. package/src/metamodel/adaptable.metamodel.js +1 -9313
  325. package/src/migration/AdaptableUpgradeHelper.d.ts +38 -0
  326. package/src/migration/AdaptableUpgradeHelper.js +48 -0
  327. package/src/migration/VersionUpgrade.d.ts +8 -0
  328. package/src/migration/VersionUpgrade.js +11 -0
  329. package/src/migration/VersionUpgrade17.d.ts +18 -0
  330. package/src/migration/VersionUpgrade17.js +342 -0
  331. package/src/migration/VersionUpgrade18.d.ts +5 -0
  332. package/src/migration/VersionUpgrade18.js +6 -0
  333. package/src/parser/src/parser.js +117 -1257
  334. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  335. package/src/parser/src/predicate/mapQlPredicateToExpression.js +2 -1
  336. package/src/parser/src/types.d.ts +7 -2
  337. package/src/types.d.ts +26 -19
  338. package/tsconfig.esm.tsbuildinfo +1 -1
  339. package/src/AdaptableOptions/CommentsOptions.d.ts +0 -28
  340. package/src/Api/Events/CommentsChangedInfo.d.ts +0 -5
  341. package/src/Api/Implementation/NotesApiImpl.d.ts +0 -16
  342. package/src/Api/Implementation/NotesApiImpl.js +0 -39
  343. package/src/Api/NotesApi.d.ts +0 -48
  344. package/src/PredefinedConfig/CellAddress.d.ts +0 -13
  345. package/src/PredefinedConfig/CellAddress.js +0 -4
  346. package/src/Redux/ActionsReducers/NotesRedux.d.ts +0 -39
  347. package/src/Strategy/NotesModule.js +0 -57
  348. package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +0 -2
  349. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -3
  350. package/src/View/Components/ScopeComponent.d.ts +0 -24
  351. package/src/View/Components/ScopeComponent.js +0 -133
  352. package/src/View/Export/Wizard/ReportScopeWizard.d.ts +0 -17
  353. package/src/View/Export/Wizard/ReportScopeWizard.js +0 -47
  354. package/src/View/Notes/NotesPopup.d.ts +0 -2
  355. package/src/agGrid/agGridHelper.d.ts +0 -57
  356. package/src/agGrid/agGridHelper.js +0 -686
  357. package/src/agGrid/agGridMenuHelper.d.ts +0 -46
  358. package/src/agGrid/agGridMenuHelper.js +0 -668
  359. /package/src/AdaptableOptions/{CommentsOptions.js → CommentOptions.js} +0 -0
  360. /package/src/AdaptableOptions/{NotesOptions.js → NoteOptions.js} +0 -0
  361. /package/src/Api/Events/{CommentsChangedInfo.js → CommentChanged.js} +0 -0
  362. /package/src/Api/{NotesApi.js → NoteApi.js} +0 -0
  363. /package/src/PredefinedConfig/{NotesState.js → Common/TransposeConfig.js} +0 -0
  364. /package/src/{Utilities/Services/Interface/IRowEditService.js → PredefinedConfig/NoteState.js} +0 -0
  365. /package/src/View/{Notes → Note}/NoteEditor.d.ts +0 -0
  366. /package/src/View/{Notes → Note}/NoteEditor.js +0 -0
@@ -0,0 +1,195 @@
1
+ import * as React from 'react';
2
+ import { Box, Flex } from 'rebass';
3
+ import FormLayout, { FormRow } from '../../components/FormLayout';
4
+ import Panel from '../../components/Panel';
5
+ import { useAdaptable } from '../AdaptableContext';
6
+ import { ColumnSelector } from '../Components/Selectors/ColumnSelector';
7
+ import { AdaptableAgGrid } from '../../agGrid/AdaptableAgGrid';
8
+ export const TransposedPopup = (props) => {
9
+ const adaptable = useAdaptable();
10
+ const { transposedColumnId, hideTransposedColumn, visibleColumns, visibleRows } = props.popupProps;
11
+ const rowNodes = React.useMemo(() => {
12
+ return props.popupProps.visibleRows
13
+ ? adaptable.api.gridApi.getVisibleRowNodes()
14
+ : adaptable.api.gridApi.getAllRowNodes();
15
+ }, [
16
+ // can be later triggered by tickng data
17
+ ]);
18
+ const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
19
+ const [syntheticTransposedByColumnId, setSyntheticTransposedByColumnId] = React.useState(transposedColumnId);
20
+ const columns = React.useMemo(() => {
21
+ // customisable
22
+ return visibleColumns
23
+ ? adaptable.api.columnApi.getVisibleColumns()
24
+ : adaptable.api.columnApi.getColumns();
25
+ }, []);
26
+ const adaptableContainerId = 'transposed-adaptable-container';
27
+ const agGridContainerId = 'transposed-adaptable-ag-grid-container';
28
+ /**
29
+ * This is used as first field
30
+ */
31
+ const transposedFirstColumnField = '_transposed_column_value';
32
+ const transposedFirstColumnHeader = '_transposed_column_header';
33
+ const transposedRowsAndColumns = React.useMemo(() => {
34
+ /**
35
+ * transposed column values become primaryKey of the new tarnsposed rows
36
+ * we build row by row, might be easer
37
+ */
38
+ const transposedColumns = [];
39
+ const transposedRows = [];
40
+ for (const row of rowNodes) {
41
+ // we force the col-ids to be strings, easer to work with
42
+ //row[transposeByColumnId] + '';
43
+ const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey) + '';
44
+ //row[synteticTransposedByColumnId] + '';
45
+ const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, syntheticTransposedByColumnId) +
46
+ '';
47
+ transposedColumns.push({
48
+ colId,
49
+ header,
50
+ });
51
+ }
52
+ for (const column of columns) {
53
+ /**
54
+ * We can hide the transposed column, if we want
55
+ */
56
+ if (hideTransposedColumn && column.columnId === syntheticTransposedByColumnId) {
57
+ continue;
58
+ }
59
+ const transposedRow = {
60
+ // [transposed-by-column-id]: [other column id],
61
+ // the value can be set to friendlyname
62
+ [transposedFirstColumnField]: column.columnId,
63
+ [transposedFirstColumnHeader]: column.friendlyName,
64
+ };
65
+ for (let row of rowNodes) {
66
+ // [transposed-by-column-value[n]]: [other column value[n]]
67
+ const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey);
68
+ // row[column.field]
69
+ let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
70
+ if (value instanceof Date) {
71
+ value = value.toLocaleString();
72
+ }
73
+ transposedRow[key] = value;
74
+ }
75
+ transposedRows.push(transposedRow);
76
+ }
77
+ return {
78
+ transposedColumns,
79
+ transposedRows,
80
+ };
81
+ }, [rowNodes, primaryKey, syntheticTransposedByColumnId]);
82
+ React.useEffect(() => {
83
+ // Mounting in an effect, so the nodes are rendered/available
84
+ const hostAdaptableOptions = adaptable.adaptableOptions;
85
+ const adaptableOptions = {
86
+ primaryKey: transposedFirstColumnField,
87
+ licenseKey: hostAdaptableOptions.licenseKey,
88
+ userName: `${hostAdaptableOptions.userName}`,
89
+ adaptableId: `${hostAdaptableOptions.adaptableId}::TransposedView`,
90
+ containerOptions: {
91
+ adaptableContainer: adaptableContainerId,
92
+ agGridContainer: agGridContainerId,
93
+ },
94
+ entitlementOptions: {
95
+ defaultAccessLevel: 'Hidden',
96
+ },
97
+ layoutOptions: {
98
+ createDefaultLayout: false,
99
+ autoSizeColumnsInLayout: true,
100
+ },
101
+ predefinedConfig: {
102
+ Layout: {
103
+ Revision: Date.now(),
104
+ CurrentLayout: 'TransposedView',
105
+ Layouts: [
106
+ {
107
+ Name: 'TransposedView',
108
+ Columns: [
109
+ transposedFirstColumnHeader,
110
+ ...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
111
+ ],
112
+ PinnedColumnsMap: {
113
+ [transposedFirstColumnHeader]: 'left',
114
+ },
115
+ },
116
+ ],
117
+ },
118
+ Theme: {
119
+ CurrentTheme: adaptable.api.themeApi.getCurrentTheme(),
120
+ },
121
+ },
122
+ };
123
+ const firstColumn = {
124
+ field: transposedFirstColumnHeader,
125
+ headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(syntheticTransposedByColumnId),
126
+ };
127
+ const agGridOptions = {
128
+ suppressLoadingOverlay: true,
129
+ defaultColDef: {
130
+ floatingFilter: false,
131
+ filter: false,
132
+ sortable: true,
133
+ resizable: true,
134
+ enableRowGroup: false,
135
+ editable: false,
136
+ enablePivot: false,
137
+ enableValue: false,
138
+ lockPinned: true,
139
+ menuTabs: [],
140
+ width: 120,
141
+ },
142
+ columnDefs: [
143
+ {
144
+ field: transposedFirstColumnField,
145
+ hide: true,
146
+ },
147
+ firstColumn,
148
+ ...transposedRowsAndColumns.transposedColumns.map((col) => {
149
+ return {
150
+ field: col.colId,
151
+ type: null,
152
+ headerName: col.header,
153
+ };
154
+ }),
155
+ ],
156
+ rowData: transposedRowsAndColumns.transposedRows,
157
+ sideBar: false,
158
+ };
159
+ const modules = adaptable.getAgGridRegisteredModules();
160
+ let transposedAdaptableApi;
161
+ (async () => {
162
+ transposedAdaptableApi = await AdaptableAgGrid._initInternal({
163
+ variant: 'vanilla',
164
+ adaptableOptions,
165
+ gridOptions: agGridOptions,
166
+ modules,
167
+ });
168
+ adaptable.api.eventApi.on('ThemeChanged', (event) => {
169
+ transposedAdaptableApi.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
170
+ });
171
+ })();
172
+ return () => {
173
+ if (transposedAdaptableApi) {
174
+ transposedAdaptableApi.destroy();
175
+ }
176
+ };
177
+ }, [syntheticTransposedByColumnId]);
178
+ /**
179
+ * Need to get all data, manualy pivot the grid using the primary key.
180
+ *
181
+ * 1. get the data, and pivot using the primary key
182
+ * 2. create the col definitios, a col definition for each row
183
+ * 3. create the grid
184
+ */
185
+ return (React.createElement(Flex, { flexDirection: "column", width: "100%", height: "100%" },
186
+ React.createElement(Panel, null,
187
+ React.createElement(FormLayout, null,
188
+ React.createElement(FormRow, { label: "Elevated Column" },
189
+ React.createElement(ColumnSelector, { value: syntheticTransposedByColumnId, onChange: (colId) => {
190
+ setSyntheticTransposedByColumnId(colId);
191
+ } })))),
192
+ React.createElement(Flex, { height: "100%" },
193
+ React.createElement(Box, { id: "transposed-adaptable-container" }),
194
+ React.createElement(Box, { height: "100%", width: "100%", id: "transposed-adaptable-ag-grid-container" }))));
195
+ };
@@ -14,6 +14,8 @@ import { AggregationsSection, AggregationsSectionSummary, isAggregationsSectionV
14
14
  import { SortSection, SortSectionSummary } from './sections/SortSection';
15
15
  import { FilterSection, FilterSectionSummary, isColumnFiltersValid, } from './sections/FilterSection';
16
16
  import { GridFilterSection, GridFilterSectionSummary, isGridFiltersValid, } from './sections/GridFilterSection';
17
+ import { areSummaryRowsValid, RowSummarySection } from './sections/RowSummarySection';
18
+ import { WEIGHTED_AVERAGE_AGGREATED_FUNCTION } from '../../../PredefinedConfig/Common/RowSummary';
17
19
  export const LayoutWizard = (props) => {
18
20
  var _a, _b;
19
21
  const dispatch = useDispatch();
@@ -33,8 +35,9 @@ export const LayoutWizard = (props) => {
33
35
  preparedLayout = ObjectFactory.CreateEmptyLayout({ Name: '' });
34
36
  }
35
37
  if (preparedLayout.SuppressAggFuncInHeader === undefined) {
36
- preparedLayout.SuppressAggFuncInHeader =
37
- !!adaptable.api.gridApi.getAgGridInstance().suppressAggFuncInHeader;
38
+ preparedLayout.SuppressAggFuncInHeader = !!adaptable.agGridAdapter
39
+ .getAgGridApi()
40
+ .getGridOption('suppressAggFuncInHeader');
38
41
  }
39
42
  return preparedLayout;
40
43
  });
@@ -101,6 +104,7 @@ export const LayoutWizard = (props) => {
101
104
  {
102
105
  title: 'Row Groups',
103
106
  isVisible: () => layoutSupportedFeatures.RowGroupedColumns,
107
+ isValid: areSummaryRowsValid,
104
108
  details: 'Configure Row Grouping',
105
109
  renderSummary: () => React.createElement(RowGroupingSectionSummary, null),
106
110
  render: () => (React.createElement(Box, { p: 2, style: { height: '100%' } },
@@ -113,7 +117,36 @@ export const LayoutWizard = (props) => {
113
117
  renderSummary: () => React.createElement(AggregationsSectionSummary, null),
114
118
  isValid: (data) => isAggregationsSectionValid(data),
115
119
  render: () => (React.createElement(Box, { p: 2, style: { height: '100%' } },
116
- React.createElement(AggregationsSection, { onChange: setLayout }))),
120
+ React.createElement(AggregationsSection, { onChange: (layout) => {
121
+ let newLayout = cloneObject(layout);
122
+ // if we do not have an weighted avg col, we need to clear the row summary if one exists
123
+ if (newLayout.RowSummaries) {
124
+ newLayout.RowSummaries = newLayout.RowSummaries.map((rowSummary) => {
125
+ return Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.entries(rowSummary.ColumnsMap).reduce((acc, [columnId, aggFunc]) => {
126
+ if (
127
+ // see if it is weighted avg
128
+ aggFunc === WEIGHTED_AVERAGE_AGGREATED_FUNCTION &&
129
+ // see if we have a weight in the agg columns
130
+ newLayout.AggregationColumns[columnId] &&
131
+ (typeof newLayout.AggregationColumns[columnId] !== 'object' ||
132
+ newLayout.AggregationColumns[columnId].weightColumnId)) {
133
+ // need to remove the row summary
134
+ return acc;
135
+ }
136
+ acc[columnId] = aggFunc;
137
+ return acc;
138
+ }, {}) });
139
+ });
140
+ }
141
+ setLayout(newLayout);
142
+ } }))),
143
+ },
144
+ {
145
+ title: 'Row Summaries',
146
+ details: 'Configure Row Summaries',
147
+ renderSummary: () => React.createElement(RowGroupingSectionSummary, null),
148
+ render: () => (React.createElement(Box, { p: 2, style: { height: '100%' } },
149
+ React.createElement(RowSummarySection, { onChange: setLayout }))),
117
150
  },
118
151
  {
119
152
  title: 'Sort',
@@ -170,7 +170,7 @@ const ColumnRow = (props) => {
170
170
  React.createElement(FormRow, { label: "ColumnId" },
171
171
  React.createElement(Tag, null, props.column.columnId)),
172
172
  React.createElement(FormRow, { label: "Header" },
173
- React.createElement(Input, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnRow__Input", placehoder: "Custom name (optional)", onChange: () => {
173
+ React.createElement(Input, { "data-name": "column-header", className: "ab-Layout-Wizard__ColumnRow__Input", placeholder: "Custom name (optional)", onChange: () => {
174
174
  props.onColumnNameChange(props.column.columnId, event.target.value);
175
175
  }, value: customHeader })),
176
176
  React.createElement(FormRow, { label: "Width" },
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { Layout } from '../../../../../types';
3
+ export declare const areSummaryRowsValid: (layout: Layout) => true | string;
4
+ export declare const RowGroupingSectionSummary: React.FunctionComponent;
5
+ interface RowSummarySectionProps {
6
+ onChange: (data: Layout) => void;
7
+ }
8
+ export declare const RowSummarySection: React.FunctionComponent<RowSummarySectionProps>;
9
+ export {};
@@ -0,0 +1,174 @@
1
+ import * as React from 'react';
2
+ import { Box, Flex } from 'rebass';
3
+ import FormLayout, { FormRow } from '../../../../components/FormLayout';
4
+ import Panel from '../../../../components/Panel';
5
+ import { Select } from '../../../../components/Select';
6
+ import SimpleButton from '../../../../components/SimpleButton';
7
+ import { Tabs } from '../../../../components/Tabs';
8
+ import { Tag } from '../../../../components/Tag';
9
+ import { summarySupportedExpressions, WEIGHTED_AVERAGE_AGGREATED_FUNCTION, } from '../../../../PredefinedConfig/Common/RowSummary';
10
+ import { mapColumnDataTypeToExpressionFunctionType } from '../../../../Utilities/adaptableQlUtils';
11
+ import { LayoutModuleId } from '../../../../Utilities/Constants/ModuleConstants';
12
+ import { sortWithOrderArray } from '../../../../Utilities/sortWithOrder';
13
+ import { useAdaptable } from '../../../AdaptableContext';
14
+ import { ValueSelector } from '../../../Components/ValueSelector';
15
+ import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptableWizard';
16
+ import { columnFilter } from './Utilities';
17
+ export const areSummaryRowsValid = (layout) => {
18
+ var _a;
19
+ if (!layout.RowSummaries)
20
+ return true;
21
+ let valid = true;
22
+ (_a = layout.RowSummaries) === null || _a === void 0 ? void 0 : _a.find((rowSummary) => {
23
+ var _a;
24
+ for (const [_, fn] of Object.entries((_a = rowSummary.ColumnsMap) !== null && _a !== void 0 ? _a : {})) {
25
+ if (!fn) {
26
+ valid = 'All row summary columns must have an aggregation function.';
27
+ return true;
28
+ }
29
+ }
30
+ });
31
+ return valid;
32
+ };
33
+ const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
34
+ const inputType = mapColumnDataTypeToExpressionFunctionType(columnType);
35
+ return Object.entries(availableScalarExpressions !== null && availableScalarExpressions !== void 0 ? availableScalarExpressions : {})
36
+ .map(([expression, expressionDef]) => {
37
+ var _a, _b;
38
+ let firstArg = null;
39
+ if (!summarySupportedExpressions.includes(expression)) {
40
+ return null;
41
+ }
42
+ if (Array.isArray((_a = expressionDef === null || expressionDef === void 0 ? void 0 : expressionDef.inputs) === null || _a === void 0 ? void 0 : _a[0])) {
43
+ // @ts-ignore
44
+ firstArg = (_b = expressionDef.inputs.find((input) => input.includes(inputType))) === null || _b === void 0 ? void 0 : _b[0];
45
+ }
46
+ else {
47
+ firstArg = expressionDef.inputs[0];
48
+ }
49
+ if (inputType === firstArg) {
50
+ return expression;
51
+ }
52
+ else {
53
+ return null;
54
+ }
55
+ })
56
+ .filter(Boolean);
57
+ };
58
+ export const RowGroupingSectionSummary = () => {
59
+ var _a;
60
+ const adaptable = useAdaptable();
61
+ const { data: layout } = useOnePageAdaptableWizardContext();
62
+ return (React.createElement(Box, null, ((_a = layout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) ? (layout.RowGroupedColumns.map((columnId) => (React.createElement(Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameForColumnId(columnId))))) : (React.createElement(Tag, null, "No Row Grouping"))));
63
+ };
64
+ const RowSummaryEditor = ({ rowSummary, onChange, availableScalarExpressions, onDelete, }) => {
65
+ const { data: layout } = useOnePageAdaptableWizardContext();
66
+ const adaptable = useAdaptable();
67
+ const columns = React.useMemo(() => {
68
+ const colIds = adaptable.api.columnApi
69
+ .getColumns()
70
+ .filter((column) => {
71
+ var _a, _b;
72
+ if (!['Number', 'String', 'Date'].includes(column.dataType))
73
+ return false;
74
+ return (_b = (_a = layout.Columns) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, column.columnId);
75
+ })
76
+ .map((c) => c.columnId);
77
+ return sortWithOrderArray(colIds, Object.keys(rowSummary.ColumnsMap), {
78
+ sortUnorderedItems: false,
79
+ }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
80
+ }, [rowSummary.ColumnsMap]);
81
+ return (React.createElement(Panel, { header: React.createElement(Flex, { style: { width: '100%' } },
82
+ React.createElement(Flex, { flex: 1, alignItems: "center" }, "Row Summary"),
83
+ React.createElement(SimpleButton, { icon: "delete", onClick: () => {
84
+ onDelete();
85
+ } })), p: 2 },
86
+ React.createElement(FormLayout, null,
87
+ React.createElement(FormRow, { label: "Position" },
88
+ React.createElement(Select, { options: [
89
+ {
90
+ label: 'Top',
91
+ value: 'Top',
92
+ },
93
+ {
94
+ label: 'Bottom',
95
+ value: 'Bottom',
96
+ },
97
+ ], value: rowSummary.Position, onChange: (position) => {
98
+ onChange(Object.assign(Object.assign({}, rowSummary), { Position: position }));
99
+ } }))),
100
+ React.createElement(Flex, { flexDirection: 'column', mt: 2, mb: 1 },
101
+ React.createElement(Flex, { alignItems: "center", flex: 1, mb: 2 }, "Column Aggregations"),
102
+ React.createElement(Panel, { bodyProps: { maxHeight: '100%' }, style: { height: 360 } },
103
+ React.createElement(ValueSelector, { style: { maxHeight: '100%' }, showFilterInput: true, filter: columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, options: columns, xSelectedLabel: () => {
104
+ return 'Active Aggregations:';
105
+ }, toListLabel: (column) => {
106
+ var _a, _b, _c;
107
+ const label = (_a = column.friendlyName) !== null && _a !== void 0 ? _a : column.columnId;
108
+ if (!(column.columnId in ((_b = rowSummary.ColumnsMap) !== null && _b !== void 0 ? _b : {}))) {
109
+ return label;
110
+ }
111
+ const expressionOptions = getAvailableExpressionsForColumnType(column.dataType, availableScalarExpressions).map((expression) => ({
112
+ label: expression,
113
+ value: expression,
114
+ }));
115
+ // check out if this layout has a aggregation with wighted column
116
+ const aggregation = (_c = layout.AggregationColumns) === null || _c === void 0 ? void 0 : _c[column.columnId];
117
+ if (aggregation && typeof aggregation === 'object' && aggregation.weightedColumnId) {
118
+ expressionOptions.push({
119
+ label: 'WEIGHTERD_AVG',
120
+ value: WEIGHTED_AVERAGE_AGGREATED_FUNCTION,
121
+ });
122
+ }
123
+ const expression = rowSummary.ColumnsMap[column.columnId];
124
+ return (React.createElement(Flex, null,
125
+ React.createElement(Flex, { mr: 2, alignItems: 'center' }, label),
126
+ React.createElement(Select, { value: expression, options: expressionOptions, onChange: (expression) => {
127
+ onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: Object.assign(Object.assign({}, rowSummary.ColumnsMap), { [column.columnId]: expression }) }));
128
+ } })));
129
+ }, value: Object.keys(rowSummary.ColumnsMap), onChange: (colIds) => {
130
+ const newColumnsMap = {};
131
+ colIds.forEach((colId) => {
132
+ var _a;
133
+ newColumnsMap[colId] = (_a = rowSummary.ColumnsMap[colId]) !== null && _a !== void 0 ? _a : null;
134
+ });
135
+ onChange(Object.assign(Object.assign({}, rowSummary), { ColumnsMap: newColumnsMap }));
136
+ } })))));
137
+ };
138
+ export const RowSummarySection = (props) => {
139
+ var _a;
140
+ const adaptable = useAdaptable();
141
+ const { data: layout } = useOnePageAdaptableWizardContext();
142
+ const availableScalarExpressions = React.useMemo(() => {
143
+ return adaptable.api.internalApi
144
+ .getQueryLanguageService()
145
+ .getModuleExpressionFunctionsMap(LayoutModuleId).aggregatedScalarFunctions;
146
+ }, []);
147
+ return (React.createElement(Tabs, { style: { height: '100%' } },
148
+ React.createElement(Tabs.Tab, null, "Row Summaries"),
149
+ React.createElement(Tabs.Content, null,
150
+ React.createElement("div", null,
151
+ React.createElement(Flex, { mb: 1 },
152
+ React.createElement(Flex, { flex: 1 }),
153
+ React.createElement(SimpleButton, { onClick: () => {
154
+ var _a;
155
+ props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: [
156
+ ...((_a = layout.RowSummaries) !== null && _a !== void 0 ? _a : []),
157
+ {
158
+ Position: 'Top',
159
+ ColumnsMap: {},
160
+ },
161
+ ] }));
162
+ }, icon: "plus" }, "Add Row Summary")),
163
+ ((_a = layout.RowSummaries) !== null && _a !== void 0 ? _a : []).map((rowSummary, index) => {
164
+ return (React.createElement(RowSummaryEditor, { key: index, onDelete: () => {
165
+ const newSummaries = [...layout.RowSummaries];
166
+ newSummaries.splice(index, 1);
167
+ props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
168
+ }, availableScalarExpressions: availableScalarExpressions, rowSummary: rowSummary, onChange: (rowSummary) => {
169
+ const newSummaries = [...layout.RowSummaries];
170
+ newSummaries[index] = rowSummary;
171
+ props.onChange(Object.assign(Object.assign({}, layout), { RowSummaries: newSummaries }));
172
+ } }));
173
+ })))));
174
+ };
@@ -1,61 +1 @@
1
- import * as React from 'react';
2
- import { Logo } from '../../components/Logo';
3
- import { Flex } from 'rebass';
4
- const style = {
5
- border: '1px solid var(--ab-color-error)',
6
- padding: '5px',
7
- fontWeight: 600,
8
- margin: '5px',
9
- fontSize: '14px',
10
- alignItems: 'center',
11
- color: 'var(--ab-color-text-on-defaultbackground)',
12
- background: 'var(--ab-color-defaultbackground)',
13
- };
14
- const isStyleValid = (element) => {
15
- const notAllowedProperties = [
16
- ['display', 'none'],
17
- ['opacity', '0'],
18
- ['position', 'absolute'],
19
- ['position', 'fixed'],
20
- ['position', 'relative'],
21
- ['visibility', 'hidden'],
22
- ];
23
- for (const [prop, value] of notAllowedProperties) {
24
- if (element.style[prop] === value) {
25
- return false;
26
- }
27
- }
28
- return true;
29
- };
30
- export const LicenseWatermark = (props) => {
31
- const ref = React.useRef(null);
32
- React.useEffect(() => {
33
- const checkWatermark = () => {
34
- var _a, _b;
35
- if (!((_a = ref.current) === null || _a === void 0 ? void 0 : _a.isConnected)) {
36
- alert('It is not allowed to remove the Adaptable watermark.');
37
- }
38
- if (!isStyleValid(ref.current)) {
39
- alert('It is not allowed to modify the Adaptable watermark.');
40
- }
41
- if ((_b = ref === null || ref === void 0 ? void 0 : ref.current) === null || _b === void 0 ? void 0 : _b.style) {
42
- ref.current.style.border = style.border;
43
- ref.current.style.padding = style.padding;
44
- ref.current.style.fontWeight = `${style.fontWeight}`;
45
- ref.current.style.margin = style.margin;
46
- ref.current.style.fontSize = style.fontSize;
47
- ref.current.style.color = style.color;
48
- ref.current.style.background = style.background;
49
- ref.current.style.display = 'flex';
50
- ref.current.style.position = 'static';
51
- ref.current.style.opacity = '1';
52
- ref.current.style.visibility = 'visible';
53
- }
54
- };
55
- const timerId = setInterval(checkWatermark, 5000);
56
- return () => clearTimeout(timerId);
57
- }, []);
58
- return (React.createElement(Flex, { style: style, ref: ref },
59
- React.createElement(Logo, { style: { marginRight: 10 } }),
60
- React.createElement("div", null, props.children)));
61
- };
1
+ import*as e from"react";import{Logo as t}from"../../components/Logo";import{Flex as r}from"rebass";const o={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-text-on-defaultbackground)",background:"var(--ab-color-defaultbackground)"},n=e=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of t)if(e.style[r]===o)return!1;return!0};export const LicenseWatermark=i=>{const l=e.useRef(null);return e.useEffect((()=>{const e=setInterval((()=>{var e,t;(null===(e=l.current)||void 0===e?void 0:e.isConnected)||alert("It is not allowed to remove the Adaptable watermark."),n(l.current)||alert("It is not allowed to modify the Adaptable watermark."),(null===(t=null==l?void 0:l.current)||void 0===t?void 0:t.style)&&(l.current.style.border=o.border,l.current.style.padding=o.padding,l.current.style.fontWeight=`${o.fontWeight}`,l.current.style.margin=o.margin,l.current.style.fontSize=o.fontSize,l.current.style.color=o.color,l.current.style.background=o.background,l.current.style.display="flex",l.current.style.position="static",l.current.style.opacity="1",l.current.style.visibility="visible")}),5e3);return()=>clearTimeout(e)}),[]),e.createElement(r,{style:o,ref:l},e.createElement(t,{style:{marginRight:10}}),e.createElement("div",null,i.children))};
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export declare const NotePopup: React.FunctionComponent;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useSelector } from 'react-redux';
3
3
  import { DataSource, InfiniteTable } from '../../components/InfiniteTable';
4
- import { GetNotesSelector } from '../../Redux/ActionsReducers/NotesRedux';
4
+ import { GetAllNotesSelector } from '../../Redux/ActionsReducers/NoteRedux';
5
5
  import { useAdaptable } from '../AdaptableContext';
6
6
  import { AdaptableButtonComponent } from '../Components/AdaptableButton';
7
7
  import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
@@ -12,10 +12,11 @@ const tableDOMProps = {
12
12
  // minHeight: 600,
13
13
  },
14
14
  };
15
- export const NotesPopup = (props) => {
15
+ export const NotePopup = (props) => {
16
16
  const adaptable = useAdaptable();
17
17
  const primaryKeyHeader = adaptable.api.columnApi.getFriendlyNameForColumnId(adaptable.api.columnApi.getPrimaryKeyColumn().columnId);
18
- const allNotes = useSelector((state) => GetNotesSelector(state.Notes));
18
+ const allNotes = useSelector((state) => GetAllNotesSelector(state.Note));
19
+ const isReadOnlyModule = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule('Note') === 'ReadOnly';
19
20
  const columnsMap = React.useMemo(() => {
20
21
  const columns = {
21
22
  primaryKey: {
@@ -24,32 +25,30 @@ export const NotesPopup = (props) => {
24
25
  },
25
26
  column: {
26
27
  field: 'ColumnId',
28
+ header: 'Column',
27
29
  valueGetter: (params) => {
28
30
  return adaptable.api.columnApi.getFriendlyNameForColumnId(params.data.ColumnId);
29
31
  },
30
32
  },
31
- note: {
32
- field: 'Value',
33
- header: 'Note',
34
- defaultEditable: true,
33
+ text: {
34
+ field: 'Text',
35
+ header: 'Text',
36
+ defaultEditable: !isReadOnlyModule,
35
37
  defaultFlex: 3,
36
38
  },
37
39
  timestamp: {
38
40
  field: 'Timestamp',
39
41
  valueGetter: (params) => {
40
- return new Date(params.data.Timestamp).toDateString();
42
+ var _a;
43
+ return (_a = new Date(params.data.Timestamp)) === null || _a === void 0 ? void 0 : _a.toDateString();
41
44
  },
42
45
  },
43
- author: {
44
- header: 'Author',
45
- valueGetter: (params) => params.data.Author.UserName,
46
- },
47
46
  delete: {
48
47
  defaultWidth: 50,
49
48
  render: (params) => {
50
- return (React.createElement(AdaptableButtonComponent, { variant: "text", icon: "delete", onClick: () => {
51
- const note = adaptable.api.notesApi.getNoteByUuid(params.data.Uuid);
52
- adaptable.api.notesApi.deleteNote(note);
49
+ return (React.createElement(AdaptableButtonComponent, { disabled: isReadOnlyModule, variant: "text", icon: "delete", onClick: () => {
50
+ const note = adaptable.api.noteApi.getNoteByUuid(params.data.Uuid);
51
+ adaptable.api.noteApi.deleteNote(note);
53
52
  } }));
54
53
  },
55
54
  },
@@ -64,8 +63,8 @@ export const NotesPopup = (props) => {
64
63
  if (change.type === 'update') {
65
64
  const data = change.data;
66
65
  const prevNote = allNotes.find((x) => x.Uuid === uuid);
67
- if (prevNote.Value !== data.Value) {
68
- adaptable.api.notesApi.updateNoteText(data.Value, prevNote);
66
+ if (prevNote.Text !== data.Text) {
67
+ adaptable.api.noteApi.updateNoteText(data.Text, prevNote);
69
68
  }
70
69
  }
71
70
  }
@@ -76,6 +75,7 @@ export const NotesPopup = (props) => {
76
75
  align: 'start',
77
76
  defaultFlex: 1,
78
77
  defaultSortable: false,
78
+ style: { fontSize: 'var(--ab-font-size-3)' },
79
79
  },
80
80
  }, headerOptions: {
81
81
  alwaysReserveSpaceForSortIcon: false,
@@ -7,10 +7,10 @@ import { Tabs } from '../components/Tabs';
7
7
  import { ColumnFilterModuleId } from '../Utilities/Constants/ModuleConstants';
8
8
  import { useAdaptable } from './AdaptableContext';
9
9
  export const SpecialColumnSettingsWizardStep = (props) => {
10
- var _a, _b;
10
+ var _a, _b, _c;
11
11
  const adaptable = useAdaptable();
12
- const possibleColumnTypes = adaptable.api.optionsApi.getColumnOptions().columnTypes;
13
- const { Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = (_a = props.settings) !== null && _a !== void 0 ? _a : {};
12
+ const possibleColumnTypes = (_a = adaptable.api.columnApi.getColumnTypes()) !== null && _a !== void 0 ? _a : [];
13
+ const { Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = (_b = props.settings) !== null && _b !== void 0 ? _b : {};
14
14
  const handleColumnTypeChange = (columnType, checked) => {
15
15
  var _a, _b, _c;
16
16
  const columnTypes = (_b = (_a = props.settings) === null || _a === void 0 ? void 0 : _a.ColumnTypes) !== null && _b !== void 0 ? _b : [];
@@ -51,7 +51,7 @@ export const SpecialColumnSettingsWizardStep = (props) => {
51
51
  Boolean(possibleColumnTypes === null || possibleColumnTypes === void 0 ? void 0 : possibleColumnTypes.length) && (React.createElement(Tabs, { marginTop: 2, autoFocus: false },
52
52
  React.createElement(Tabs.Tab, null, "Column Types"),
53
53
  React.createElement(Tabs.Content, null,
54
- React.createElement(FormLayout, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }] }, (_b = chunk(possibleColumnTypes !== null && possibleColumnTypes !== void 0 ? possibleColumnTypes : [], 2)) === null || _b === void 0 ? void 0 : _b.map(([first, second]) => {
54
+ React.createElement(FormLayout, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }] }, (_c = chunk(possibleColumnTypes !== null && possibleColumnTypes !== void 0 ? possibleColumnTypes : [], 2)) === null || _c === void 0 ? void 0 : _c.map(([first, second]) => {
55
55
  var _a, _b, _c, _d, _e, _f;
56
56
  return (React.createElement(FormRow, { key: first },
57
57
  first && (React.createElement(CheckBox, { "data-name": first, onChange: (checked) => handleColumnTypeChange(first, checked), checked: (_c = (_b = (_a = props.settings) === null || _a === void 0 ? void 0 : _a.ColumnTypes) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, first) }, first)),