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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/README.md +4 -6
  2. package/agGrid.d.ts +9 -9
  3. package/agGrid.js +1 -0
  4. package/index.css +1280 -1400
  5. package/index.css.map +1 -1
  6. package/index.d.ts +66 -0
  7. package/index.js +85 -0
  8. package/package.json +3 -3
  9. package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -1
  10. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  11. package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
  12. package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
  13. package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
  14. package/src/AdaptableOptions/CustomSortOptions.d.ts +4 -0
  15. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
  16. package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
  17. package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
  18. package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
  19. package/src/AdaptableState/AdaptableState.d.ts +2 -0
  20. package/src/AdaptableState/AlertState.d.ts +5 -2
  21. package/src/AdaptableState/ChartingState.d.ts +2 -2
  22. package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
  23. package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
  24. package/src/AdaptableState/Common/AdaptableColumn.d.ts +16 -10
  25. package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
  26. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
  27. package/src/AdaptableState/Common/AdaptableObject.d.ts +20 -2
  28. package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
  29. package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
  30. package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
  31. package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
  32. package/src/AdaptableState/Common/ColumnHighlightInfo.js +2 -0
  33. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +17 -0
  34. package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
  35. package/src/AdaptableState/Common/NamedObject.js +2 -0
  36. package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
  37. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  38. package/src/AdaptableState/Common/Schedule.d.ts +8 -5
  39. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
  40. package/src/AdaptableState/Common/TransposeConfig.d.ts +12 -10
  41. package/src/AdaptableState/CustomSortState.d.ts +5 -1
  42. package/src/AdaptableState/DashboardState.d.ts +1 -1
  43. package/src/AdaptableState/ExportState.d.ts +1 -1
  44. package/src/AdaptableState/FlashingCellState.d.ts +6 -2
  45. package/src/AdaptableState/FormatColumnState.d.ts +5 -9
  46. package/src/AdaptableState/InitialState.d.ts +10 -1
  47. package/src/AdaptableState/InternalState.d.ts +2 -0
  48. package/src/AdaptableState/LayoutState.d.ts +7 -3
  49. package/src/AdaptableState/NamedQueryState.d.ts +1 -1
  50. package/src/AdaptableState/PlusMinusState.d.ts +5 -1
  51. package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
  52. package/src/AdaptableState/ShortcutState.d.ts +5 -1
  53. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  54. package/src/AdaptableState/ThemeState.d.ts +1 -1
  55. package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
  56. package/src/AdaptableState/UserInterfaceState.js +2 -0
  57. package/src/Api/AlertApi.d.ts +6 -0
  58. package/src/Api/CustomSortApi.d.ts +12 -3
  59. package/src/Api/DataSetApi.d.ts +1 -1
  60. package/src/Api/FlashingCellApi.d.ts +6 -0
  61. package/src/Api/FormatColumnApi.d.ts +10 -4
  62. package/src/Api/GridApi.d.ts +29 -4
  63. package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
  64. package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
  65. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  66. package/src/Api/Implementation/AlertApiImpl.js +6 -6
  67. package/src/Api/Implementation/ApiBase.d.ts +1 -1
  68. package/src/Api/Implementation/ApiBase.js +2 -1
  69. package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
  70. package/src/Api/Implementation/ChartingApiImpl.js +6 -2
  71. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
  72. package/src/Api/Implementation/ColumnApiImpl.js +1 -0
  73. package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
  74. package/src/Api/Implementation/CommentsApiImpl.js +1 -0
  75. package/src/Api/Implementation/CustomSortApiImpl.d.ts +6 -1
  76. package/src/Api/Implementation/CustomSortApiImpl.js +6 -2
  77. package/src/Api/Implementation/DashboardApiImpl.js +1 -0
  78. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
  79. package/src/Api/Implementation/DataImportApiImpl.js +1 -0
  80. package/src/Api/Implementation/DataSetApiImpl.js +1 -0
  81. package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
  82. package/src/Api/Implementation/EventApiImpl.js +16 -14
  83. package/src/Api/Implementation/ExportApiImpl.js +1 -0
  84. package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
  85. package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
  86. package/src/Api/Implementation/FilterApiImpl.js +3 -0
  87. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  88. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
  89. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
  90. package/src/Api/Implementation/FormatColumnApiImpl.js +7 -5
  91. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
  92. package/src/Api/Implementation/GridApiImpl.d.ts +10 -1
  93. package/src/Api/Implementation/GridApiImpl.js +35 -4
  94. package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
  95. package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
  96. package/src/Api/Implementation/LayoutApiImpl.js +5 -1
  97. package/src/Api/Implementation/LayoutHelpers.js +7 -0
  98. package/src/Api/Implementation/NamedQueryApiImpl.js +3 -2
  99. package/src/Api/Implementation/NoteApiImpl.js +1 -0
  100. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
  101. package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
  102. package/src/Api/Implementation/PredicateApiImpl.js +1 -0
  103. package/src/Api/Implementation/RowFormApiImpl.js +1 -0
  104. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
  105. package/src/Api/Implementation/ScheduleApiImpl.js +4 -0
  106. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
  107. package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
  108. package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
  109. package/src/Api/Implementation/SystemStatusApiImpl.js +8 -9
  110. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  111. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  112. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
  113. package/src/Api/Implementation/UserInterfaceApiImpl.js +15 -1
  114. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  115. package/src/Api/Internal/ColumnInternalApi.js +1 -1
  116. package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
  117. package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
  118. package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
  119. package/src/Api/Internal/LayoutInternalApi.js +1 -1
  120. package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
  121. package/src/Api/LayoutApi.d.ts +6 -0
  122. package/src/Api/PlusMinusApi.d.ts +6 -0
  123. package/src/Api/ScheduleApi.d.ts +6 -0
  124. package/src/Api/ShortcutApi.d.ts +6 -0
  125. package/src/Api/UserInterfaceApi.d.ts +17 -0
  126. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
  127. package/src/Redux/ActionsReducers/FormatColumnRedux.js +17 -1
  128. package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
  129. package/src/Redux/ActionsReducers/InternalRedux.js +42 -3
  130. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
  131. package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
  132. package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
  133. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +26 -0
  134. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
  135. package/src/Redux/Store/AdaptableStore.js +121 -64
  136. package/src/Strategy/AdaptableModuleBase.js +4 -0
  137. package/src/Strategy/AlertModule.js +5 -0
  138. package/src/Strategy/BulkUpdateModule.js +8 -8
  139. package/src/Strategy/CalculatedColumnModule.js +1 -0
  140. package/src/Strategy/CellSummaryModule.js +1 -1
  141. package/src/Strategy/CustomSortModule.js +4 -0
  142. package/src/Strategy/DataChangeHistoryModule.js +1 -0
  143. package/src/Strategy/FlashingCellModule.js +6 -0
  144. package/src/Strategy/FormatColumnModule.js +4 -0
  145. package/src/Strategy/FreeTextColumnModule.js +1 -0
  146. package/src/Strategy/LayoutModule.js +6 -5
  147. package/src/Strategy/PlusMinusModule.js +7 -1
  148. package/src/Strategy/QuickSearchModule.js +1 -1
  149. package/src/Strategy/ScheduleModule.js +5 -0
  150. package/src/Strategy/SettingsPanelModule.js +11 -7
  151. package/src/Strategy/ShortcutModule.js +6 -0
  152. package/src/Strategy/SmartEditModule.js +10 -10
  153. package/src/Strategy/TeamSharingModule.js +10 -10
  154. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
  155. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +18 -17
  156. package/src/Utilities/Constants/DocumentationLinkConstants.js +19 -18
  157. package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
  158. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
  159. package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
  160. package/src/Utilities/Extensions/StringExtensions.js +17 -0
  161. package/src/Utilities/Helpers/FormatHelper.js +9 -2
  162. package/src/Utilities/Helpers/StyleHelper.js +14 -0
  163. package/src/Utilities/MenuItem.js +18 -0
  164. package/src/Utilities/ObjectFactory.js +16 -3
  165. package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
  166. package/src/Utilities/Services/AlertService.js +6 -4
  167. package/src/Utilities/Services/AnnotationsService.js +4 -1
  168. package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
  169. package/src/Utilities/Services/ChartingService.js +1 -0
  170. package/src/Utilities/Services/DataService.js +11 -3
  171. package/src/Utilities/Services/Fdc3Service.js +9 -7
  172. package/src/Utilities/Services/FlashingCellService.js +5 -0
  173. package/src/Utilities/Services/LicenseService/index.js +1 -1
  174. package/src/Utilities/Services/MetamodelService.js +2 -2
  175. package/src/Utilities/Services/ModuleService.js +39 -41
  176. package/src/Utilities/Services/QueryLanguageService.js +6 -5
  177. package/src/Utilities/Services/RowFormService.js +1 -0
  178. package/src/Utilities/Services/RowSummaryService.js +10 -7
  179. package/src/Utilities/Services/TeamSharingService.js +3 -1
  180. package/src/Utilities/Services/ThemeService.js +13 -15
  181. package/src/Utilities/Services/ValidationService.js +2 -1
  182. package/src/Utilities/createAgStatusPanelComponent.js +3 -0
  183. package/src/Utilities/logDeprecation.js +3 -4
  184. package/src/Utilities/resolveContainerElement.d.ts +23 -0
  185. package/src/Utilities/resolveContainerElement.js +47 -0
  186. package/src/View/AdaptablePopover/index.d.ts +1 -0
  187. package/src/View/AdaptablePopover/index.js +1 -1
  188. package/src/View/Alert/ActiveAlertsPanel.js +8 -0
  189. package/src/View/Alert/AlertViewPanel.js +13 -9
  190. package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
  191. package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
  192. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -0
  193. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
  194. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +48 -12
  195. package/src/View/Alert/Wizard/AlertWizard.js +12 -8
  196. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  197. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
  198. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
  199. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  200. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  201. package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
  202. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  203. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  204. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  205. package/src/View/Components/Buttons/ButtonApply.js +1 -1
  206. package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
  207. package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
  208. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
  209. package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
  210. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
  211. package/src/View/Components/CellPopup/index.js +1 -1
  212. package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
  213. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
  214. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
  215. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
  216. package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
  217. package/src/View/Components/NewScopeComponent.js +3 -3
  218. package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
  219. package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
  220. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
  221. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
  222. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
  223. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
  224. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
  225. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +35 -0
  226. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +18 -17
  227. package/src/View/Components/StyleComponent.d.ts +1 -0
  228. package/src/View/Components/StyleComponent.js +94 -24
  229. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
  230. package/src/View/Components/WizardSummaryPage.js +1 -1
  231. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  232. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +40 -14
  233. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  234. package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
  235. package/src/View/Dashboard/CustomToolbar.js +1 -1
  236. package/src/View/Dashboard/DashboardPopup.js +4 -5
  237. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
  238. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
  239. package/src/View/Export/ExportDestinationPicker.js +1 -1
  240. package/src/View/Export/ExportStatusBar.js +4 -2
  241. package/src/View/Export/ExportViewPanel.js +25 -18
  242. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
  243. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +36 -15
  244. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
  245. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  246. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
  247. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
  248. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
  249. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  250. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
  251. package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
  252. package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
  253. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
  254. package/src/View/Layout/LayoutViewPanel.js +1 -1
  255. package/src/View/Layout/TransposedPopup.js +144 -138
  256. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  257. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  258. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  259. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
  260. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
  261. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  262. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  263. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +35 -12
  264. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
  265. package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
  266. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
  267. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
  268. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
  269. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
  270. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
  271. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +19 -10
  272. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
  273. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
  274. package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
  275. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
  276. package/src/View/StateManagement/handleExportState.js +1 -1
  277. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  278. package/src/View/Theme/ThemePopup.js +13 -16
  279. package/src/View/UIHelper.d.ts +4 -1
  280. package/src/View/UIHelper.js +24 -14
  281. package/src/agGrid/Adaptable.js +15 -11
  282. package/src/agGrid/AdaptableAgGrid.d.ts +16 -3
  283. package/src/agGrid/AdaptableAgGrid.js +306 -103
  284. package/src/agGrid/AdaptableFilterHandler.js +4 -0
  285. package/src/agGrid/AdaptableLogger.d.ts +3 -0
  286. package/src/agGrid/AdaptableLogger.js +10 -0
  287. package/src/agGrid/AgGridAdapter.js +19 -9
  288. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
  289. package/src/agGrid/AgGridColumnAdapter.js +20 -22
  290. package/src/agGrid/AgGridExportAdapter.js +15 -14
  291. package/src/agGrid/AgGridFilterAdapter.js +4 -0
  292. package/src/agGrid/AgGridFloatingFilterAdapter.js +4 -1
  293. package/src/agGrid/AgGridMenuAdapter.js +10 -1
  294. package/src/agGrid/AgGridModulesAdapter.js +2 -1
  295. package/src/agGrid/AgGridOptionsService.js +3 -0
  296. package/src/agGrid/AgGridThemeAdapter.js +4 -2
  297. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
  298. package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
  299. package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
  300. package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
  301. package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
  302. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
  303. package/src/agGrid/index.d.ts +6 -0
  304. package/src/agGrid/index.js +6 -0
  305. package/src/components/CheckBox/index.js +1 -1
  306. package/src/components/ColorPicker/ColorPicker.js +5 -4
  307. package/src/components/Dashboard/DashboardToolbar.js +1 -1
  308. package/src/components/Datepicker/index.js +1 -1
  309. package/src/components/Dropdown/Arrows.js +1 -1
  310. package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
  311. package/src/components/ExpressionEditor/EditorInput.js +19 -3
  312. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
  313. package/src/components/FormLayout/index.js +1 -1
  314. package/src/components/OverlayTrigger/index.js +1 -1
  315. package/src/components/Select/Select.js +78 -15
  316. package/src/components/Tree/TreeDropdown/index.js +2 -2
  317. package/src/components/overlayBaseZIndex.js +1 -1
  318. package/src/components/utils/useContainerScrollObserver/index.js +17 -14
  319. package/src/devTools/index.js +54 -53
  320. package/src/env.js +2 -2
  321. package/src/layout-manager/src/LMEmitter.js +11 -11
  322. package/src/layout-manager/src/LMLogger.js +7 -0
  323. package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
  324. package/src/layout-manager/src/index.js +81 -58
  325. package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
  326. package/src/metamodel/adaptable.metamodel.d.ts +177 -8
  327. package/src/metamodel/adaptable.metamodel.js +1 -1
  328. package/src/migration/AdaptableUpgradeHelper.js +8 -3
  329. package/src/migration/VersionUpgrade.js +1 -0
  330. package/src/migration/VersionUpgrade17.js +5 -6
  331. package/src/migration/VersionUpgrade20.js +4 -4
  332. package/src/migration/VersionUpgrade22.d.ts +21 -0
  333. package/src/migration/VersionUpgrade22.js +191 -0
  334. package/src/parser/src/ExpressionEvaluationError.js +1 -0
  335. package/src/types.d.ts +9 -7
  336. package/themes/dark.css +30 -30
  337. package/themes/light.css +4 -2
  338. package/tsconfig.cjs.tsbuildinfo +1 -1
  339. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +0 -1
  340. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -633
  341. package/src/View/Alert/AlertEntityRow.d.ts +0 -11
  342. package/src/View/Alert/AlertEntityRow.js +0 -33
  343. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
  344. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -63
  345. package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
  346. package/src/View/Components/Buttons/ButtonFunction.js +0 -13
  347. package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
  348. package/src/View/Components/Buttons/ButtonGeneral.js +0 -12
  349. package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
  350. package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -8
  351. package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
  352. package/src/View/Components/Buttons/ButtonShow.js +0 -12
  353. package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
  354. package/src/View/Components/Buttons/ButtonShowChart.js +0 -12
  355. package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
  356. package/src/View/Components/Buttons/ButtonUndo.js +0 -12
  357. package/src/View/Components/ExpressionWizard.d.ts +0 -24
  358. package/src/View/Components/ExpressionWizard.js +0 -82
  359. package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
  360. package/src/View/Components/FilterForm/Waiting.js +0 -19
  361. package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
  362. package/src/View/Components/Panels/PanelFooter.js +0 -14
  363. package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
  364. package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -20
  365. package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
  366. package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -31
  367. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
  368. package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -50
  369. package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
  370. package/src/View/Components/WizardSummaryRow.d.ts +0 -9
  371. package/src/View/Components/WizardSummaryRow.js +0 -16
  372. package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
  373. package/src/View/CustomSort/CustomSortSummary.js +0 -110
  374. package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
  375. package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -24
  376. package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
  377. package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -73
  378. package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
  379. package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -73
  380. package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
  381. package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -61
  382. package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
  383. package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -40
  384. package/src/View/Filter/FilterSummary.d.ts +0 -18
  385. package/src/View/Filter/FilterSummary.js +0 -53
  386. package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
  387. package/src/View/FormatColumn/FormatColumnSummary.js +0 -95
  388. package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
  389. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -93
  390. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
  391. package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -99
  392. package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
  393. package/src/View/PlusMinus/PlusMinusSummary.js +0 -100
  394. package/src/View/Wizard/WizardLegend.d.ts +0 -12
  395. package/src/View/Wizard/WizardLegend.js +0 -28
  396. /package/src/{View/Components/SharedProps/WizardScopeState.js → AdaptableState/Common/AdaptableRowContext.js} +0 -0
@@ -9,72 +9,153 @@ const AdaptableContext_1 = require("../AdaptableContext");
9
9
  const ColumnSelector_1 = require("../Components/Selectors/ColumnSelector");
10
10
  const AdaptableAgGrid_1 = require("../../agGrid/AdaptableAgGrid");
11
11
  const Flex_1 = require("../../components/Flex");
12
- const adaptableContainerId = `transposed-adaptable-container`;
13
- const agGridContainerId = `transposed-adaptable-ag-grid-container`;
12
+ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
13
+ const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
14
+ const ADAPTABLE_CONTAINER_ID = 'transposed-adaptable-container';
15
+ const AG_GRID_CONTAINER_ID = 'transposed-adaptable-ag-grid-container';
16
+ /** Field used for the first column in transposed grid (hidden, holds column id). */
17
+ const TRANSPOSED_FIRST_COLUMN_FIELD = '_transposed_column_value';
18
+ /** Header used for the first visible column in transposed grid (shows friendly name). */
19
+ const TRANSPOSED_FIRST_COLUMN_HEADER = '_transposed_column_header';
20
+ function buildTransposedAdaptableOptions({ hostOptions, transposedRowsAndColumns, currentTheme, }) {
21
+ return {
22
+ primaryKey: TRANSPOSED_FIRST_COLUMN_FIELD,
23
+ licenseKey: hostOptions.licenseKey,
24
+ userName: `${hostOptions.userName}`,
25
+ adaptableId: `${hostOptions.adaptableId}::TransposedView`,
26
+ containerOptions: {
27
+ adaptableContainer: ADAPTABLE_CONTAINER_ID,
28
+ agGridContainer: AG_GRID_CONTAINER_ID,
29
+ },
30
+ entitlementOptions: { defaultAccessLevel: 'Hidden' },
31
+ initialState: {
32
+ Layout: {
33
+ Revision: Date.now(),
34
+ CurrentLayout: 'TransposedView',
35
+ Layouts: [
36
+ {
37
+ Name: 'TransposedView',
38
+ TableColumns: [
39
+ TRANSPOSED_FIRST_COLUMN_HEADER,
40
+ ...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
41
+ ],
42
+ ColumnPinning: { [TRANSPOSED_FIRST_COLUMN_HEADER]: 'left' },
43
+ AutoSizeColumns: true,
44
+ },
45
+ ],
46
+ },
47
+ Theme: { CurrentTheme: currentTheme },
48
+ },
49
+ };
50
+ }
51
+ function buildTransposedGridOptions({ transposedRowsAndColumns, elevatedColumnId, adaptableApi, }) {
52
+ const firstColumn = {
53
+ field: TRANSPOSED_FIRST_COLUMN_HEADER,
54
+ headerName: adaptableApi.columnApi.getFriendlyNameForColumnId(elevatedColumnId),
55
+ };
56
+ return {
57
+ loading: false,
58
+ defaultColDef: {
59
+ floatingFilter: false,
60
+ filter: false,
61
+ sortable: true,
62
+ resizable: true,
63
+ enableRowGroup: false,
64
+ editable: false,
65
+ enablePivot: false,
66
+ enableValue: false,
67
+ lockPinned: true,
68
+ menuTabs: [],
69
+ width: 120,
70
+ },
71
+ columnDefs: [
72
+ { field: TRANSPOSED_FIRST_COLUMN_FIELD, hide: true },
73
+ firstColumn,
74
+ ...transposedRowsAndColumns.transposedColumns.map((col) => ({ field: col.colId, headerName: col.header })),
75
+ ],
76
+ rowData: transposedRowsAndColumns.transposedRows,
77
+ sideBar: false,
78
+ };
79
+ }
14
80
  const TransposedPopup = (props) => {
15
81
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
16
- const { transposedColumnId, hideTransposedColumn, visibleColumns, visibleRows, autosize } = props.popupProps;
17
- const rowNodes = React.useMemo(() => {
18
- return props.popupProps.visibleRows
19
- ? adaptable.api.gridApi.getVisibleRowNodes()
20
- : adaptable.api.gridApi.getAllRowNodes();
21
- }, [
22
- // can be later triggered by tickng data
23
- ]);
24
82
  const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
25
- const [syntheticTransposedByColumnId, doSetSyntheticTransposedByColumnId] = React.useState(transposedColumnId);
26
- const setSyntheticTransposedByColumnId = (syntheticTransposedByColumnId) => {
83
+ const rawConfig = (props.popupProps ?? {});
84
+ const transposeConfig = {
85
+ transposedColumnId: rawConfig.transposedColumnId ?? primaryKey,
86
+ hideTransposedColumn: rawConfig.hideTransposedColumn ?? true,
87
+ autosize: rawConfig.autosize ?? true,
88
+ columnsToTranspose: rawConfig.columnsToTranspose,
89
+ rowsToTranspose: rawConfig.rowsToTranspose,
90
+ };
91
+ const rowNodes = React.useMemo(() => {
92
+ let transposableRowNodes = [];
93
+ const rowsToTranspose = transposeConfig.rowsToTranspose;
94
+ if (rowsToTranspose === 'VisibleOnly') {
95
+ return adaptable.api.gridApi.getVisibleRowNodes();
96
+ }
97
+ if (rowsToTranspose === 'All') {
98
+ return adaptable.api.gridApi.getAllRowNodes();
99
+ }
100
+ if (StringExtensions_1.default.IsNotNullOrEmpty(rowsToTranspose)) {
101
+ adaptable.api.gridApi.getAllRowNodes().forEach((rn) => {
102
+ const shouldTransposeRow = adaptable.api.internalApi
103
+ .getQueryLanguageService()
104
+ .evaluateBooleanExpression(rowsToTranspose, ModuleConstants_1.ExportModuleId, rn);
105
+ if (shouldTransposeRow) {
106
+ transposableRowNodes.push(rn);
107
+ }
108
+ });
109
+ return transposableRowNodes;
110
+ }
111
+ return adaptable.api.gridApi.getAllRowNodes();
112
+ }, [transposeConfig.rowsToTranspose, adaptable.api]);
113
+ const [elevatedColumnId, setElevatedColumnIdState] = React.useState(() => transposeConfig.transposedColumnId ?? primaryKey);
114
+ const setElevatedColumnId = (newElevatedColumnId) => {
27
115
  transposedAdaptableApiRef.current?.destroy({ unmount: true, destroyAgGrid: true });
28
- doSetSyntheticTransposedByColumnId(syntheticTransposedByColumnId);
116
+ setElevatedColumnIdState(newElevatedColumnId);
29
117
  };
30
118
  const transposedAdaptableApiRef = React.useRef(null);
31
119
  const columns = React.useMemo(() => {
32
- // customisable
33
- return visibleColumns
34
- ? adaptable.api.columnApi.getVisibleColumns()
35
- : adaptable.api.columnApi.getUIAvailableColumns();
36
- }, []);
120
+ const allUIColumns = adaptable.api.columnApi.getUIAvailableColumns();
121
+ const columnsToTranspose = transposeConfig.columnsToTranspose;
122
+ if (!columnsToTranspose) {
123
+ return allUIColumns;
124
+ }
125
+ const columnIds = typeof columnsToTranspose === 'function'
126
+ ? columnsToTranspose({
127
+ ...adaptable.api.internalApi.buildBaseContext(),
128
+ columns: allUIColumns,
129
+ })
130
+ : columnsToTranspose;
131
+ return columnIds
132
+ .map((c) => adaptable.api.columnApi.getColumnWithColumnId(c))
133
+ .filter((col) => col != null);
134
+ }, [transposeConfig.columnsToTranspose, adaptable.api]);
37
135
  /**
38
- * This is used as first field
136
+ * Build transposed structure: original rows become columns (colId = primaryKey value),
137
+ * original columns become rows. Each transposed row has the column id/header plus
138
+ * one cell per original row keyed by primaryKey value.
39
139
  */
40
- const transposedFirstColumnField = '_transposed_column_value';
41
- const transposedFirstColumnHeader = '_transposed_column_header';
42
140
  const transposedRowsAndColumns = React.useMemo(() => {
43
- /**
44
- * transposed column values become primaryKey of the new tarnsposed rows
45
- * we build row by row, might be easer
46
- */
47
141
  const transposedColumns = [];
48
142
  const transposedRows = [];
49
143
  for (const row of rowNodes) {
50
- // we force the col-ids to be strings, easer to work with
51
- //row[transposeByColumnId] + '';
52
144
  const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey) + '';
53
- //row[synteticTransposedByColumnId] + '';
54
- const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, syntheticTransposedByColumnId) +
55
- '';
56
- transposedColumns.push({
57
- colId,
58
- header,
59
- });
145
+ const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, elevatedColumnId) + '';
146
+ transposedColumns.push({ colId, header });
60
147
  }
61
148
  for (const column of columns) {
62
- /**
63
- * We can hide the transposed column, if we want
64
- */
65
- if (hideTransposedColumn && column.columnId === syntheticTransposedByColumnId) {
149
+ if (transposeConfig.hideTransposedColumn &&
150
+ column.columnId === elevatedColumnId) {
66
151
  continue;
67
152
  }
68
153
  const transposedRow = {
69
- // [transposed-by-column-id]: [other column id],
70
- // the value can be set to friendlyname
71
- [transposedFirstColumnField]: column.columnId,
72
- [transposedFirstColumnHeader]: column.friendlyName,
154
+ [TRANSPOSED_FIRST_COLUMN_FIELD]: column.columnId,
155
+ [TRANSPOSED_FIRST_COLUMN_HEADER]: column.friendlyName,
73
156
  };
74
- for (let row of rowNodes) {
75
- // [transposed-by-column-value[n]]: [other column value[n]]
157
+ for (const row of rowNodes) {
76
158
  const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey);
77
- // row[column.field]
78
159
  let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
79
160
  if (value instanceof Date) {
80
161
  value = value.toLocaleString();
@@ -83,90 +164,25 @@ const TransposedPopup = (props) => {
83
164
  }
84
165
  transposedRows.push(transposedRow);
85
166
  }
86
- return {
87
- transposedColumns,
88
- transposedRows,
89
- };
90
- }, [rowNodes, primaryKey, syntheticTransposedByColumnId]);
167
+ return { transposedColumns, transposedRows };
168
+ }, [rowNodes, primaryKey, elevatedColumnId, columns, transposeConfig.hideTransposedColumn, adaptable.api]);
91
169
  React.useEffect(() => {
92
- // Mounting in an effect, so the nodes are rendered/available
93
- const hostAdaptableOptions = adaptable.adaptableOptions;
94
- const adaptableOptions = {
95
- primaryKey: transposedFirstColumnField,
96
- licenseKey: hostAdaptableOptions.licenseKey,
97
- userName: `${hostAdaptableOptions.userName}`,
98
- adaptableId: `${hostAdaptableOptions.adaptableId}::TransposedView`,
99
- containerOptions: {
100
- adaptableContainer: adaptableContainerId,
101
- agGridContainer: agGridContainerId,
102
- },
103
- entitlementOptions: {
104
- defaultAccessLevel: 'Hidden',
105
- },
106
- initialState: {
107
- Layout: {
108
- Revision: Date.now(),
109
- CurrentLayout: 'TransposedView',
110
- Layouts: [
111
- {
112
- Name: 'TransposedView',
113
- TableColumns: [
114
- transposedFirstColumnHeader,
115
- ...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
116
- ],
117
- ColumnPinning: {
118
- [transposedFirstColumnHeader]: 'left',
119
- },
120
- AutoSizeColumns: true,
121
- },
122
- ],
123
- },
124
- Theme: {
125
- CurrentTheme: adaptable.api.themeApi.getCurrentTheme(),
126
- },
127
- },
128
- };
129
- const firstColumn = {
130
- field: transposedFirstColumnHeader, // use the column friendly name
131
- headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(syntheticTransposedByColumnId),
132
- };
133
- const agGridOptions = {
134
- loading: false,
135
- defaultColDef: {
136
- floatingFilter: false,
137
- filter: false,
138
- sortable: true,
139
- resizable: true,
140
- enableRowGroup: false,
141
- editable: false,
142
- enablePivot: false,
143
- enableValue: false,
144
- lockPinned: true,
145
- menuTabs: [],
146
- width: 120,
147
- },
148
- columnDefs: [
149
- {
150
- field: transposedFirstColumnField,
151
- hide: true,
152
- },
153
- firstColumn,
154
- ...transposedRowsAndColumns.transposedColumns.map((col) => {
155
- return {
156
- field: col.colId,
157
- type: null,
158
- headerName: col.header,
159
- };
160
- }),
161
- ],
162
- rowData: transposedRowsAndColumns.transposedRows,
163
- sideBar: false,
164
- };
170
+ const hostOptions = adaptable.adaptableOptions;
171
+ const adaptableOptions = buildTransposedAdaptableOptions({
172
+ hostOptions,
173
+ transposedRowsAndColumns,
174
+ currentTheme: adaptable.api.themeApi.getCurrentTheme(),
175
+ });
176
+ const gridOptions = buildTransposedGridOptions({
177
+ transposedRowsAndColumns,
178
+ elevatedColumnId,
179
+ adaptableApi: adaptable.api,
180
+ });
165
181
  const modules = adaptable.agGridModulesAdapter.getAgGridRegisteredModules();
166
182
  AdaptableAgGrid_1.AdaptableAgGrid._initInternal({
167
183
  variant: 'vanilla',
168
184
  adaptableOptions,
169
- gridOptions: agGridOptions,
185
+ gridOptions,
170
186
  modules,
171
187
  }).then((adaptableApi) => {
172
188
  transposedAdaptableApiRef.current = adaptableApi;
@@ -174,31 +190,21 @@ const TransposedPopup = (props) => {
174
190
  transposedAdaptableApiRef.current?.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
175
191
  });
176
192
  });
177
- }, [syntheticTransposedByColumnId]);
193
+ }, [elevatedColumnId, adaptable]);
178
194
  React.useEffect(() => {
179
- // destroy when closing the popup
180
195
  return () => {
181
196
  requestAnimationFrame(() => {
182
197
  transposedAdaptableApiRef.current?.destroy({ unmount: true, destroyAgGrid: true });
183
198
  });
184
199
  };
185
200
  }, []);
186
- /**
187
- * Need to get all data, manualy pivot the grid using the primary key.
188
- *
189
- * 1. get the data, and pivot using the primary key
190
- * 2. create the col definitios, a col definition for each row
191
- * 3. create the grid
192
- */
193
201
  return (React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:w-full twa:h-full" },
194
202
  React.createElement(Panel_1.default, null,
195
203
  React.createElement(FormLayout_1.default, null,
196
204
  React.createElement(FormLayout_1.FormRow, { label: "Elevated Column" },
197
- React.createElement(ColumnSelector_1.ColumnSelector, { value: syntheticTransposedByColumnId, onChange: (colId) => {
198
- setSyntheticTransposedByColumnId(colId);
199
- } })))),
205
+ React.createElement(ColumnSelector_1.ColumnSelector, { value: elevatedColumnId, onChange: setElevatedColumnId })))),
200
206
  React.createElement(Flex_1.Flex, { className: "twa:h-full" },
201
- React.createElement(Flex_1.Box, { id: adaptableContainerId }),
202
- React.createElement(Flex_1.Box, { className: "twa:h-full twa:w-full", id: agGridContainerId }))));
207
+ React.createElement(Flex_1.Box, { id: ADAPTABLE_CONTAINER_ID }),
208
+ React.createElement(Flex_1.Box, { className: "twa:h-full twa:w-full", id: AG_GRID_CONTAINER_ID }))));
203
209
  };
204
210
  exports.TransposedPopup = TransposedPopup;
@@ -23,7 +23,7 @@ const isAggregationsSectionValid = (data) => {
23
23
  AggFunc.type === 'weightedAverage')?.AggFunc
24
24
  : null;
25
25
  if (weightedAvg && !weightedAvg.weightedColumnId) {
26
- return 'The Weighted Average Aggregation requires a Weighted Column';
26
+ return 'Weighted Average requires a weight column to be selected.';
27
27
  }
28
28
  return true;
29
29
  };
@@ -17,7 +17,7 @@ const Flex_1 = require("../../../../components/Flex");
17
17
  const isColumnFiltersValid = (layout) => {
18
18
  const invalidColumnFilters = (layout.ColumnFilters ?? [])?.filter((columnFilter) => !columnFilter?.Predicates[0]?.PredicateId);
19
19
  if (invalidColumnFilters.length > 0) {
20
- return 'Please select a Predicate for each Column Filter';
20
+ return 'Please select a predicate for each column filter.';
21
21
  }
22
22
  return true;
23
23
  };
@@ -17,7 +17,7 @@ const isGridFiltersValid = (layout, api) => {
17
17
  return true;
18
18
  }
19
19
  return (api.internalApi.getQueryLanguageService().validateBoolean(expression, ModuleConstants_1.GridFilterModuleId)
20
- .isValid || 'Invalid Expression');
20
+ .isValid || 'The expression is not valid.');
21
21
  };
22
22
  exports.isGridFiltersValid = isGridFiltersValid;
23
23
  const GridFilterSectionSummary = () => {
@@ -220,7 +220,7 @@ const isPivotAggregationsSectionValid = (data) => {
220
220
  .find((agg) => typeof agg === 'object' && agg.type === 'weightedAverage')
221
221
  : null;
222
222
  if (weightedAvg && !weightedAvg.weightedColumnId) {
223
- return 'The Weighted Average Aggregation requires a Weighted Column';
223
+ return 'Weighted Average requires a weight column to be selected.';
224
224
  }
225
225
  return true;
226
226
  };
@@ -309,12 +309,12 @@ const PivotAggregationsSection = (props) => {
309
309
  }
310
310
  const firstAggFuncName = (0, AggregationColumns_1.getAggFuncName)(aggregationColumns[0].AggFunc);
311
311
  if (layout.PivotAggregationColumns?.some((aggCol) => (0, AggregationColumns_1.getAggFuncName)(aggCol.AggFunc) !== firstAggFuncName)) {
312
- return 'Requires identical aggregation on all columns';
312
+ return 'All columns must use the same aggregation function.';
313
313
  }
314
314
  // check that no Aggregation Total Column is enabled
315
315
  const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null);
316
316
  if (hasAggregationTotalColumn) {
317
- return 'Can only be enabled when no Aggregation Total Column is present';
317
+ return 'This option is not available when an Aggregation Total Column is present.';
318
318
  }
319
319
  return true;
320
320
  };
@@ -11,6 +11,7 @@ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard
11
11
  const Utilities_1 = require("./Utilities");
12
12
  const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
13
13
  const Flex_1 = require("../../../../components/Flex");
14
+ const CheckBox_1 = require("../../../../components/CheckBox");
14
15
  const PivotColumnsSectionSummary = () => {
15
16
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
16
17
  const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
@@ -33,6 +34,13 @@ const PivotColumnsSection = (props) => {
33
34
  return (React.createElement(Tabs_1.Tabs, { className: "twa:h-full" },
34
35
  React.createElement(Tabs_1.Tabs.Tab, null, "Pivot Columns"),
35
36
  React.createElement(Tabs_1.Tabs.Content, null,
37
+ React.createElement(Flex_1.Box, { className: "twa:mb-3 twa:px-2" },
38
+ React.createElement(CheckBox_1.CheckBox, { checked: !!layout.PivotResultColumnsOrder, onChange: (checked) => {
39
+ props.onChange({
40
+ ...layout,
41
+ PivotResultColumnsOrder: checked,
42
+ });
43
+ } }, "Persist Order of Pivot Result Columns")),
36
44
  React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, options: sortedPivotColumns, value: layout.PivotColumns ?? [], allowReorder: true, onChange: handleColumnsChange }))));
37
45
  };
38
46
  exports.PivotColumnsSection = PivotColumnsSection;
@@ -28,7 +28,7 @@ const areSummaryRowsValid = (layout) => {
28
28
  layout.RowSummaries?.find((rowSummary) => {
29
29
  for (const [_, fn] of Object.entries(rowSummary.ColumnsMap ?? {})) {
30
30
  if (!fn) {
31
- valid = 'All row summary columns must have an aggregation function.';
31
+ valid = 'Each row summary column requires an aggregation function.';
32
32
  return true;
33
33
  }
34
34
  }
@@ -11,11 +11,11 @@ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
11
11
  const Flex_1 = require("../../../components/Flex");
12
12
  const isValidNamedQueryExpression = (data, api) => {
13
13
  if (!data.BooleanExpression) {
14
- return 'Expression is empty';
14
+ return 'An expression is required.';
15
15
  }
16
16
  const valid = api.expressionApi.isValidBooleanExpression(data.BooleanExpression, ModuleConstants_1.NamedQueryModuleId);
17
17
  if (!valid) {
18
- return 'Query is not a valid Boolean Query';
18
+ return 'The query is not a valid Boolean expression.';
19
19
  }
20
20
  return valid;
21
21
  };
@@ -4,7 +4,6 @@ exports.PlusMinusSettingsWizardSection = exports.isSettingsValid = exports.PlusM
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
7
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
8
7
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
9
8
  const Tabs_1 = require("../../../components/Tabs");
10
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
@@ -16,16 +15,30 @@ const Flex_1 = require("../../../components/Flex");
16
15
  const PlusMinusSettingsSummary = (props) => {
17
16
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
18
17
  return (React.createElement(React.Fragment, null,
18
+ React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
19
+ "Name ",
20
+ React.createElement(Tag_1.Tag, null, data.Name || 'Not specified')),
19
21
  React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
20
22
  "Nudge Value ",
21
23
  React.createElement(Tag_1.Tag, null, data.NudgeValue ?? 'Not selected')),
24
+ React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
25
+ "Nudge Type ",
26
+ React.createElement(Tag_1.Tag, null, props.hasCondition ? 'Conditional' : 'Always Apply')),
22
27
  props.hasCondition && React.createElement(PlusMinusRuleWizardSection_1.PlusMinusRuleSummary, null)));
23
28
  };
24
29
  exports.PlusMinusSettingsSummary = PlusMinusSettingsSummary;
25
30
  const isSettingsValid = (hasCondition) => (data, api, context) => {
31
+ if (!data.Name?.trim()) {
32
+ return 'A name is required.';
33
+ }
34
+ const allPlusMinusNudges = api.plusMinusApi.getAllPlusMinus();
35
+ const isDuplicateName = allPlusMinusNudges.some((nudge) => nudge.Name === data.Name && nudge.Uuid !== data.Uuid);
36
+ if (isDuplicateName) {
37
+ return 'A Plus/Minus Nudge with this name already exists.';
38
+ }
26
39
  if (hasCondition) {
27
40
  if (!data?.Rule?.BooleanExpression) {
28
- return 'No valid Rule is specified';
41
+ return 'A valid rule is required.';
29
42
  }
30
43
  const ruleValidation = (0, Utilities_1.isAdaptableRuleValid)(data, api, context);
31
44
  if (typeof ruleValidation === 'string') {
@@ -33,16 +46,22 @@ const isSettingsValid = (hasCondition) => (data, api, context) => {
33
46
  }
34
47
  }
35
48
  if (typeof data.NudgeValue !== 'number') {
36
- return 'Nudge value is not specified';
49
+ return 'A nudge value is required.';
37
50
  }
38
51
  if (data.NudgeValue === 0) {
39
- return 'Nudge value must be different than 0';
52
+ return 'Nudge value must not be zero.';
40
53
  }
41
54
  return true;
42
55
  };
43
56
  exports.isSettingsValid = isSettingsValid;
44
57
  const PlusMinusSettingsWizardSection = (props) => {
45
58
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
59
+ const handleNameChange = (event) => {
60
+ props.onChange({
61
+ ...data,
62
+ Name: event.target.value,
63
+ });
64
+ };
46
65
  const handleNudgeValueChange = (event) => {
47
66
  const newValue = parseFloat(event.target.value);
48
67
  props.onChange({
@@ -51,16 +70,20 @@ const PlusMinusSettingsWizardSection = (props) => {
51
70
  });
52
71
  };
53
72
  return (React.createElement(Flex_1.Flex, { flexDirection: "column", "data-name": "plus-minus-column-settings", className: "twa:h-full" },
54
- React.createElement(Tabs_1.Tabs, { autoFocus: false, className: "twa:p-2" },
55
- React.createElement(Tabs_1.Tabs.Tab, null, "Plus Minus Settings"),
73
+ React.createElement(Tabs_1.Tabs, { className: "twa:p-2" },
74
+ React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
56
75
  React.createElement(Tabs_1.Tabs.Content, null,
57
76
  React.createElement(FormLayout_1.default, null,
77
+ React.createElement(FormLayout_1.FormRow, { label: "Name" },
78
+ React.createElement(Input_1.default, { "data-name": "plus-minus-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' })),
58
79
  React.createElement(FormLayout_1.FormRow, { label: "Nudge Value" },
59
- React.createElement(Input_1.default, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' })),
60
- React.createElement(FormLayout_1.FormRow, { label: "Nudge Type" },
61
- React.createElement(Flex_1.Flex, null,
62
- React.createElement(Radio_1.default, { "data-name": "nudge-type-always", value: "Always", checked: !props.hasCondition, onChange: () => props.onConditionChange(false) }, "Always Apply Nudge"),
63
- React.createElement(Radio_1.default, { "data-name": "nudge-type-condition", className: "twa:ml-3", value: "Expression", checked: props.hasCondition, onChange: () => props.onConditionChange(true) }, "Create a Rule")))))),
64
- props.hasCondition && (React.createElement(PlusMinusRuleWizardSection_1.PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange }))));
80
+ React.createElement(Input_1.default, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' }))))),
81
+ React.createElement(Tabs_1.Tabs, { className: "twa:p-2", selectedIndex: props.hasCondition ? 1 : 0, onSelectedIndexChange: (index) => props.onConditionChange(index === 1) },
82
+ React.createElement(Tabs_1.Tabs.Tab, { "data-name": "nudge-type-always" }, "Always Apply"),
83
+ React.createElement(Tabs_1.Tabs.Tab, { "data-name": "nudge-type-condition" }, "Conditional"),
84
+ React.createElement(Tabs_1.Tabs.Content, null,
85
+ React.createElement(Flex_1.Flex, { className: "twa:text-2 twa:py-2" }, "The nudge value is always applied when using Plus/Minus")),
86
+ React.createElement(Tabs_1.Tabs.Content, { className: "twa:p-0" },
87
+ React.createElement(PlusMinusRuleWizardSection_1.PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange })))));
65
88
  };
66
89
  exports.PlusMinusSettingsWizardSection = PlusMinusSettingsWizardSection;
@@ -13,7 +13,7 @@ const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReduc
13
13
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
14
14
  const Flex_1 = require("../../../components/Flex");
15
15
  const PlusMinusWizard = (props) => {
16
- const [plusMinus, setPlusMinus] = React.useState(() => {
16
+ const [plusMinus, doSetPlusMinus] = React.useState(() => {
17
17
  const newPlusMinus = {
18
18
  ...(props.data ? props.data : ObjectFactory_1.default.CreateEmptyPlusMinusNudge()),
19
19
  Scope: props?.data?.Scope ?? { All: true },
@@ -26,19 +26,24 @@ const PlusMinusWizard = (props) => {
26
26
  }
27
27
  return newPlusMinus;
28
28
  });
29
+ const setPlusMinus = React.useCallback((data) => {
30
+ doSetPlusMinus(data);
31
+ }, []);
29
32
  const [hasCondition, setHasCondition] = React.useState(() => {
30
33
  // true if on edit and it has a condition
31
34
  return Boolean(props?.data?.Rule);
32
35
  });
33
36
  React.useEffect(() => {
34
- const preparedData = { ...plusMinus };
35
- if (hasCondition) {
36
- preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
37
- }
38
- else {
39
- delete preparedData.Rule;
40
- }
41
- setPlusMinus(preparedData);
37
+ doSetPlusMinus((prev) => {
38
+ const preparedData = { ...prev };
39
+ if (hasCondition) {
40
+ preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
41
+ }
42
+ else {
43
+ delete preparedData.Rule;
44
+ }
45
+ return preparedData;
46
+ });
42
47
  }, [hasCondition]);
43
48
  const dispatch = (0, react_redux_1.useDispatch)();
44
49
  const handleFinish = () => {
@@ -51,6 +56,12 @@ const PlusMinusWizard = (props) => {
51
56
  props.onFinishWizard(plusMinus);
52
57
  };
53
58
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: plusMinus, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
59
+ {
60
+ title: 'Settings',
61
+ isValid: (0, PlusMinusSettingsWizardSection_1.isSettingsValid)(hasCondition),
62
+ renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
63
+ render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
64
+ },
54
65
  {
55
66
  title: 'Target',
56
67
  isValid: NewScopeComponent_1.isScopeValid,
@@ -63,12 +74,6 @@ const PlusMinusWizard = (props) => {
63
74
  render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
64
75
  React.createElement(PlusMinusScopeWizardSection_1.PlusMinusScopeWizardSection, { onChange: setPlusMinus }))),
65
76
  },
66
- {
67
- title: 'Settings',
68
- isValid: (0, PlusMinusSettingsWizardSection_1.isSettingsValid)(hasCondition),
69
- renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
70
- render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
71
- },
72
77
  {
73
78
  details: 'Select Plus/Minus Tags',
74
79
  title: 'Tags',
@@ -39,7 +39,10 @@ const QuickSearchPopupComponent = (props) => {
39
39
  React.createElement(Card_1.Card, null,
40
40
  React.createElement(Card_1.Card.Title, null, "Behaviour"),
41
41
  React.createElement(Card_1.Card.Body, { className: "twa:p-1", gap: 2 },
42
- React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:w-fit" }, "Filters the Grid to only show rows with matching cells; use with care as can cause performance issues"),
42
+ React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:w-fit" },
43
+ "Filter Grid when searching to only show rows with matching cells; ",
44
+ React.createElement("b", null, "use with care"),
45
+ " as can cause performance issues"),
43
46
  React.createElement(CheckBox_1.CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))),
44
47
  React.createElement(Card_1.Card.Title, { border: false, className: "twa:pt-3" }, "Cell Matching Style"),
45
48
  React.createElement(Card_1.Card, null,