@adaptabletools/adaptable 13.1.1 → 14.0.0-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/README.md +1 -1
  2. package/base.css +7 -2
  3. package/base.css.map +1 -1
  4. package/bundle.cjs.js +180 -177
  5. package/index.css +11 -2
  6. package/index.css.map +1 -1
  7. package/package.json +2 -2
  8. package/publishTimestamp.d.ts +1 -1
  9. package/publishTimestamp.js +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
  11. package/src/AdaptableOptions/ActionOptions.d.ts +4 -1
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -9
  13. package/src/AdaptableOptions/AlertOptions.d.ts +6 -1
  14. package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  16. package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
  17. package/src/AdaptableOptions/GeneralOptions.d.ts +8 -3
  18. package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +6 -4
  19. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  20. package/src/Api/ActionApi.d.ts +14 -3
  21. package/src/Api/AdaptableApi.d.ts +0 -6
  22. package/src/Api/AlertApi.d.ts +127 -92
  23. package/src/Api/BulkUpdateApi.d.ts +9 -2
  24. package/src/Api/CalculatedColumnApi.d.ts +26 -21
  25. package/src/Api/CellSummaryApi.d.ts +15 -8
  26. package/src/Api/ChartingApi.d.ts +9 -2
  27. package/src/Api/ColumnApi.d.ts +153 -115
  28. package/src/Api/ConfigApi.d.ts +18 -18
  29. package/src/Api/CustomSortApi.d.ts +36 -7
  30. package/src/Api/DashboardApi.d.ts +12 -5
  31. package/src/Api/DataChangeHistoryApi.d.ts +8 -1
  32. package/src/Api/DataSetApi.d.ts +13 -3
  33. package/src/Api/EventApi.d.ts +2 -2
  34. package/src/Api/ExportApi.d.ts +30 -13
  35. package/src/Api/FilterApi.d.ts +74 -62
  36. package/src/Api/FlashingCellApi.d.ts +25 -9
  37. package/src/Api/FormatColumnApi.d.ts +76 -95
  38. package/src/Api/FreeTextColumnApi.d.ts +53 -21
  39. package/src/Api/GridApi.d.ts +57 -22
  40. package/src/Api/Implementation/ActionApiImpl.d.ts +9 -3
  41. package/src/Api/Implementation/ActionApiImpl.js +23 -11
  42. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  43. package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
  44. package/src/Api/Implementation/AlertApiImpl.d.ts +57 -28
  45. package/src/Api/Implementation/AlertApiImpl.js +179 -197
  46. package/src/Api/Implementation/ApiBase.d.ts +43 -2
  47. package/src/Api/Implementation/ApiBase.js +129 -5
  48. package/src/Api/Implementation/ApplicationApiImpl.d.ts +1 -1
  49. package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
  50. package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -1
  51. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +7 -2
  52. package/src/Api/Implementation/CalculatedColumnApiImpl.js +28 -37
  53. package/src/Api/Implementation/CellSummaryApiImpl.d.ts +1 -0
  54. package/src/Api/Implementation/CellSummaryApiImpl.js +6 -1
  55. package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -2
  56. package/src/Api/Implementation/ChartingApiImpl.js +10 -4
  57. package/src/Api/Implementation/ColumnApiImpl.d.ts +22 -6
  58. package/src/Api/Implementation/ColumnApiImpl.js +184 -195
  59. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  60. package/src/Api/Implementation/ConfigApiImpl.js +1 -1
  61. package/src/Api/Implementation/CustomSortApiImpl.d.ts +16 -1
  62. package/src/Api/Implementation/CustomSortApiImpl.js +33 -7
  63. package/src/Api/Implementation/DashboardApiImpl.d.ts +6 -1
  64. package/src/Api/Implementation/DashboardApiImpl.js +11 -12
  65. package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
  66. package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
  67. package/src/Api/Implementation/DataSetApiImpl.d.ts +6 -0
  68. package/src/Api/Implementation/DataSetApiImpl.js +17 -8
  69. package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
  70. package/src/Api/Implementation/ExportApiImpl.d.ts +9 -1
  71. package/src/Api/Implementation/ExportApiImpl.js +34 -68
  72. package/src/Api/Implementation/FilterApiImpl.d.ts +10 -1
  73. package/src/Api/Implementation/FilterApiImpl.js +61 -157
  74. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -0
  75. package/src/Api/Implementation/FlashingCellApiImpl.js +23 -26
  76. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +20 -15
  77. package/src/Api/Implementation/FormatColumnApiImpl.js +62 -153
  78. package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +13 -5
  79. package/src/Api/Implementation/FreeTextColumnApiImpl.js +42 -27
  80. package/src/Api/Implementation/GridApiImpl.d.ts +15 -1
  81. package/src/Api/Implementation/GridApiImpl.js +117 -61
  82. package/src/Api/Implementation/LayoutApiImpl.d.ts +8 -7
  83. package/src/Api/Implementation/LayoutApiImpl.js +29 -112
  84. package/src/Api/Implementation/PluginsApiImpl.d.ts +1 -1
  85. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -1
  86. package/src/Api/Implementation/PlusMinusApiImpl.js +5 -0
  87. package/src/Api/Implementation/PredicateApiImpl.d.ts +8 -5
  88. package/src/Api/Implementation/PredicateApiImpl.js +33 -98
  89. package/src/Api/Implementation/QueryApiImpl.d.ts +7 -2
  90. package/src/Api/Implementation/QueryApiImpl.js +22 -44
  91. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -0
  92. package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -0
  93. package/src/Api/Implementation/QuickSearchApiImpl.d.ts +1 -0
  94. package/src/Api/Implementation/QuickSearchApiImpl.js +5 -0
  95. package/src/Api/Implementation/ScheduleApiImpl.d.ts +27 -0
  96. package/src/Api/Implementation/ScheduleApiImpl.js +86 -17
  97. package/src/Api/Implementation/ScopeApiImpl.js +9 -7
  98. package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +2 -0
  99. package/src/Api/Implementation/SettingsPanelApiImpl.js +9 -0
  100. package/src/Api/Implementation/ShortcutApiImpl.d.ts +8 -1
  101. package/src/Api/Implementation/ShortcutApiImpl.js +25 -4
  102. package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -0
  103. package/src/Api/Implementation/SmartEditApiImpl.js +5 -0
  104. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +14 -11
  105. package/src/Api/Implementation/StyledColumnApiImpl.js +40 -185
  106. package/src/Api/Implementation/SystemStatusApiImpl.d.ts +6 -1
  107. package/src/Api/Implementation/SystemStatusApiImpl.js +19 -12
  108. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +6 -5
  109. package/src/Api/Implementation/TeamSharingApiImpl.js +15 -25
  110. package/src/Api/Implementation/ThemeApiImpl.d.ts +5 -1
  111. package/src/Api/Implementation/ThemeApiImpl.js +23 -4
  112. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -0
  113. package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -4
  114. package/src/Api/Internal/ActionInternalApi.d.ts +23 -0
  115. package/src/Api/Internal/ActionInternalApi.js +198 -0
  116. package/src/Api/{Implementation/InternalApiImpl.d.ts → Internal/AdaptableInternalApi.d.ts} +7 -57
  117. package/src/Api/{Implementation/InternalApiImpl.js → Internal/AdaptableInternalApi.js} +28 -306
  118. package/src/Api/Internal/AlertInternalApi.d.ts +148 -0
  119. package/src/Api/Internal/AlertInternalApi.js +484 -0
  120. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +24 -0
  121. package/src/Api/Internal/CalculatedColumnInternalApi.js +57 -0
  122. package/src/Api/Internal/ColumnInternalApi.d.ts +33 -0
  123. package/src/Api/Internal/ColumnInternalApi.js +67 -0
  124. package/src/Api/Internal/CustomSortInternalApi.d.ts +6 -0
  125. package/src/Api/Internal/CustomSortInternalApi.js +11 -0
  126. package/src/Api/Internal/DashboardInternalApi.d.ts +8 -0
  127. package/src/Api/Internal/DashboardInternalApi.js +26 -0
  128. package/src/Api/Internal/DataSetInternalApi.d.ts +9 -0
  129. package/src/Api/Internal/DataSetInternalApi.js +20 -0
  130. package/src/Api/Internal/ExportInternalApi.d.ts +11 -0
  131. package/src/Api/Internal/ExportInternalApi.js +73 -0
  132. package/src/Api/Internal/FilterInternalApi.d.ts +58 -0
  133. package/src/Api/Internal/FilterInternalApi.js +194 -0
  134. package/src/Api/Internal/FlashingCellInternalApi.d.ts +12 -0
  135. package/src/Api/Internal/FlashingCellInternalApi.js +56 -0
  136. package/src/Api/Internal/FormatColumnInternalApi.d.ts +109 -0
  137. package/src/Api/Internal/FormatColumnInternalApi.js +225 -0
  138. package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +15 -0
  139. package/src/Api/Internal/FreeTextColumnInternalApi.js +44 -0
  140. package/src/Api/Internal/GridInternalApi.d.ts +82 -0
  141. package/src/Api/Internal/GridInternalApi.js +252 -0
  142. package/src/Api/Internal/LayoutInternalApi.d.ts +48 -0
  143. package/src/Api/Internal/LayoutInternalApi.js +163 -0
  144. package/src/Api/Internal/PredicateInternalApi.d.ts +37 -0
  145. package/src/Api/Internal/PredicateInternalApi.js +140 -0
  146. package/src/Api/Internal/QueryInternalApi.d.ts +17 -0
  147. package/src/Api/Internal/QueryInternalApi.js +57 -0
  148. package/src/Api/Internal/QueryLanguageInternalApi.d.ts +11 -0
  149. package/src/Api/Internal/QueryLanguageInternalApi.js +34 -0
  150. package/src/Api/Internal/StyledColumnInternalApi.d.ts +59 -0
  151. package/src/Api/Internal/StyledColumnInternalApi.js +249 -0
  152. package/src/Api/Internal/SystemStatusInternalApi.d.ts +11 -0
  153. package/src/Api/Internal/SystemStatusInternalApi.js +27 -0
  154. package/src/Api/Internal/TeamSharingInternalApi.d.ts +20 -0
  155. package/src/Api/Internal/TeamSharingInternalApi.js +66 -0
  156. package/src/Api/LayoutApi.d.ts +28 -44
  157. package/src/Api/PlusMinusApi.d.ts +9 -2
  158. package/src/Api/PredicateApi.d.ts +26 -10
  159. package/src/Api/QueryApi.d.ts +23 -18
  160. package/src/Api/QuickSearchApi.d.ts +5 -1
  161. package/src/Api/ScheduleApi.d.ts +97 -16
  162. package/src/Api/SettingsPanelApi.d.ts +12 -1
  163. package/src/Api/ShortcutApi.d.ts +28 -7
  164. package/src/Api/SmartEditApi.d.ts +8 -1
  165. package/src/Api/StyledColumnApi.d.ts +34 -54
  166. package/src/Api/SystemStatusApi.d.ts +12 -6
  167. package/src/Api/TeamSharingApi.d.ts +4 -17
  168. package/src/Api/ThemeApi.d.ts +25 -6
  169. package/src/Api/UserInterfaceApi.d.ts +13 -2
  170. package/src/PredefinedConfig/AlertState.d.ts +1 -1
  171. package/src/PredefinedConfig/Common/AdaptableColumn.js +4 -0
  172. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +0 -5
  173. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +10 -0
  174. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  175. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +22 -1
  176. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -0
  177. package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -3
  178. package/src/PredefinedConfig/Common/FDC3Context.d.ts +0 -5
  179. package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
  180. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  181. package/src/PredefinedConfig/StyledColumnState.d.ts +9 -0
  182. package/src/PredefinedConfig/SystemState.d.ts +5 -0
  183. package/src/Redux/ActionsReducers/GridRedux.d.ts +18 -0
  184. package/src/Redux/ActionsReducers/GridRedux.js +65 -2
  185. package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
  186. package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
  187. package/src/Redux/Store/AdaptableStore.js +34 -26
  188. package/src/Strategy/AdaptableModuleBase.js +6 -6
  189. package/src/Strategy/AlertModule.d.ts +1 -6
  190. package/src/Strategy/AlertModule.js +37 -92
  191. package/src/Strategy/BulkUpdateModule.js +3 -3
  192. package/src/Strategy/CalculatedColumnModule.js +6 -6
  193. package/src/Strategy/ChartingModule.js +1 -1
  194. package/src/Strategy/CustomSortModule.js +4 -4
  195. package/src/Strategy/DashboardModule.js +2 -2
  196. package/src/Strategy/DataSetModule.js +1 -1
  197. package/src/Strategy/ExportModule.js +4 -4
  198. package/src/Strategy/FilterModule.js +7 -6
  199. package/src/Strategy/FlashingCellModule.d.ts +2 -0
  200. package/src/Strategy/FlashingCellModule.js +21 -5
  201. package/src/Strategy/FormatColumnModule.d.ts +1 -0
  202. package/src/Strategy/FormatColumnModule.js +29 -3
  203. package/src/Strategy/FreeTextColumnModule.js +3 -3
  204. package/src/Strategy/LayoutModule.js +18 -18
  205. package/src/Strategy/PlusMinusModule.js +2 -2
  206. package/src/Strategy/QueryModule.js +3 -3
  207. package/src/Strategy/ScheduleModule.js +10 -12
  208. package/src/Strategy/ShortcutModule.js +5 -5
  209. package/src/Strategy/SmartEditModule.js +3 -3
  210. package/src/Strategy/StyledColumnModule.js +9 -7
  211. package/src/Strategy/TeamSharingModule.js +3 -3
  212. package/src/Strategy/ThemeModule.js +1 -1
  213. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -1
  214. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
  215. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -1
  216. package/src/Strategy/Utilities/getRuleViewItems.d.ts +1 -1
  217. package/src/Strategy/Utilities/getRuleViewItems.js +4 -3
  218. package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
  219. package/src/Strategy/Utilities/updateSingleToMultiplePredicates.d.ts +5 -0
  220. package/src/Strategy/Utilities/updateSingleToMultiplePredicates.js +12 -0
  221. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -3
  222. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +8 -0
  223. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +11 -0
  224. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +73 -78
  225. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +3 -1
  226. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +9 -5
  227. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +12 -3
  228. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  229. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +133 -28
  230. package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
  231. package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
  232. package/src/Utilities/Helpers/FormatHelper.js +13 -10
  233. package/src/Utilities/ObjectFactory.js +8 -6
  234. package/src/Utilities/Services/CalculatedColumnExpressionService.js +1 -1
  235. package/src/Utilities/Services/ChartingService.js +2 -2
  236. package/src/Utilities/Services/DataService.js +1 -1
  237. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +2 -1
  238. package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -5
  239. package/src/Utilities/Services/ModuleService.js +1 -1
  240. package/src/Utilities/Services/QueryLanguageService.js +2 -2
  241. package/src/Utilities/Services/ReportService.js +3 -3
  242. package/src/Utilities/Services/RowEditService.d.ts +0 -19
  243. package/src/Utilities/Services/RowEditService.js +4 -161
  244. package/src/Utilities/Services/TeamSharingService.js +3 -3
  245. package/src/Utilities/Services/ValidationService.js +9 -7
  246. package/src/Utilities/logDeprecation.d.ts +3 -0
  247. package/src/Utilities/logDeprecation.js +30 -0
  248. package/src/View/AdaptablePopover/index.d.ts +2 -0
  249. package/src/View/AdaptablePopover/index.js +6 -2
  250. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +4 -2
  251. package/src/View/Alert/AlertEntityRow.js +1 -1
  252. package/src/View/Alert/AlertStatusSubPanel.js +1 -1
  253. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +2 -2
  254. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  255. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +3 -3
  256. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  257. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +4 -2
  258. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +2 -2
  259. package/src/View/Alert/Wizard/isValidAlertRules.js +4 -3
  260. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -3
  261. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
  262. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +25 -4
  263. package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
  264. package/src/View/Components/Charting/ChartingViewPanel.d.ts +2 -2
  265. package/src/View/Components/Charting/ChartingViewPanel.js +17 -3
  266. package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +2 -2
  267. package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +1 -1
  268. package/src/View/Components/Charting/DeleteChartButton.d.ts +7 -0
  269. package/src/View/Components/Charting/DeleteChartButton.js +12 -0
  270. package/src/View/Components/Charting/EditChartButton.d.ts +8 -0
  271. package/src/View/Components/Charting/EditChartButton.js +21 -0
  272. package/src/View/Components/EntityRulesEditor/PredicatesEditor.d.ts +16 -0
  273. package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +86 -0
  274. package/src/View/Components/EntityRulesEditor/Utilities.d.ts +6 -0
  275. package/src/View/Components/EntityRulesEditor/Utilities.js +21 -0
  276. package/src/View/Components/EntityRulesEditor/index.d.ts +4 -9
  277. package/src/View/Components/EntityRulesEditor/index.js +16 -90
  278. package/src/View/Components/ExpressionWizard.js +1 -1
  279. package/src/View/Components/ExternalRenderer.js +3 -1
  280. package/src/View/Components/FilterForm/FilterForm.js +3 -3
  281. package/src/View/Components/FilterForm/QuickFilterForm.js +5 -5
  282. package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +5 -6
  283. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
  284. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
  285. package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
  286. package/src/View/Components/Popups/AdaptablePopupConfirmation.d.ts +2 -12
  287. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +46 -39
  288. package/src/View/Components/PredicateEditor/PredicateEditor.js +5 -5
  289. package/src/View/Components/ScopeComponent.js +3 -3
  290. package/src/View/Components/Selectors/ColumnValueSelector.js +1 -1
  291. package/src/View/Components/StyleComponent.js +42 -14
  292. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  293. package/src/View/CustomSort/CustomSortSummary.js +1 -1
  294. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
  295. package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
  296. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  297. package/src/View/Dashboard/Dashboard.js +1 -1
  298. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
  299. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -1
  300. package/src/View/DataSet/DataSetSelector.js +1 -1
  301. package/src/View/DataSet/DataSetStatusPanelPopover.js +1 -1
  302. package/src/View/DataSet/DataSetViewPanel.js +1 -1
  303. package/src/View/Export/ExportSelector.js +2 -2
  304. package/src/View/Export/ExportViewPanel.js +2 -2
  305. package/src/View/Export/ReportExportDropdown.js +1 -1
  306. package/src/View/Export/Wizard/ReportNameWizardSection.js +1 -1
  307. package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
  308. package/src/View/Filter/FilterSummary.js +1 -1
  309. package/src/View/Filter/FilterViewPanel.js +1 -1
  310. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
  311. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -2
  312. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +4 -3
  313. package/src/View/FormatColumn/MoveFormatColumn.js +1 -1
  314. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +11 -5
  315. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +2 -2
  316. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +8 -6
  317. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +3 -4
  318. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -19
  319. package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
  320. package/src/View/GridInfo/GridInfoPopup.js +6 -6
  321. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  322. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +1 -1
  323. package/src/View/Layout/LayoutViewPanel.js +1 -1
  324. package/src/View/Layout/PivotDetailsPopoup.js +1 -1
  325. package/src/View/Layout/SaveLayoutButton.js +1 -1
  326. package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
  327. package/src/View/Layout/Wizard/sections/AggregationsSection.js +4 -4
  328. package/src/View/Layout/Wizard/sections/ColumnsSection.js +5 -5
  329. package/src/View/Layout/Wizard/sections/FilterSection.js +2 -2
  330. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
  331. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
  332. package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
  333. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
  334. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +2 -2
  335. package/src/View/Query/ExpandedQueryPopup.js +1 -1
  336. package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  337. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -2
  338. package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
  339. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
  340. package/src/View/StatusBar/StatusBarPanel.js +1 -1
  341. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -2
  342. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +9 -0
  343. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +2 -2
  344. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.d.ts +5 -0
  345. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +26 -0
  346. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.d.ts +5 -0
  347. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +23 -0
  348. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +8 -0
  349. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +25 -0
  350. package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.d.ts → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts} +2 -2
  351. package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.js → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js} +21 -19
  352. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.d.ts +1 -0
  353. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.js +4 -0
  354. package/src/View/TeamSharing/SharedEntityDependencies.js +1 -1
  355. package/src/View/Theme/ThemeStatusPanelPopover.js +1 -1
  356. package/src/agGrid/ActionColumnRenderer.js +1 -1
  357. package/src/agGrid/Adaptable.d.ts +5 -3
  358. package/src/agGrid/Adaptable.js +106 -121
  359. package/src/agGrid/FilterWrapper.js +3 -3
  360. package/src/agGrid/FloatingFilterWrapper.js +3 -3
  361. package/src/agGrid/PercentBarRenderer.js +6 -6
  362. package/src/agGrid/agGridHelper.js +3 -3
  363. package/src/agGrid/agGridMenuHelper.js +3 -3
  364. package/src/agGrid/weightedAverage.js +2 -2
  365. package/src/components/ExpressionEditor/BaseEditorInput.js +92 -7
  366. package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -1
  367. package/src/components/OverlayTrigger/index.js +6 -2
  368. package/src/components/OverlayTrigger/utils.d.ts +1 -1
  369. package/src/components/OverlayTrigger/utils.js +4 -4
  370. package/src/components/icons/index.js +2 -0
  371. package/src/components/icons/open-in-new.d.ts +3 -0
  372. package/src/components/icons/open-in-new.js +7 -0
  373. package/src/env.js +1 -3
  374. package/src/metamodel/adaptable.metamodel.d.ts +30 -10
  375. package/src/metamodel/adaptable.metamodel.js +1 -1
  376. package/src/parser/src/parser.js +644 -382
  377. package/src/parser/src/types.d.ts +9 -0
  378. package/src/types.d.ts +3 -3
  379. package/version.d.ts +1 -1
  380. package/version.js +1 -1
  381. package/src/Api/InternalApi.d.ts +0 -155
  382. package/src/Api/InternalApi.js +0 -2
@@ -8,8 +8,11 @@ const rebass_1 = require("rebass");
8
8
  const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
10
  const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
11
+ const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
11
12
  const AdaptableContext_1 = require("../../AdaptableContext");
12
13
  const useChartState_1 = require("./useChartState");
14
+ const DeleteChartButton_1 = require("./DeleteChartButton");
15
+ const EditChartButton_1 = require("./EditChartButton");
13
16
  const ChartingViewPanel = (props) => {
14
17
  var _a, _b, _c;
15
18
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -20,6 +23,7 @@ const ChartingViewPanel = (props) => {
20
23
  return chartDefinitions.length > 0 ? chartDefinitions[0].Uuid : null;
21
24
  });
22
25
  const selectedChart = chartDefinitions.find((chart) => chart.Uuid === selectedChartId);
26
+ const accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(selectedChart, props.accessLevel);
23
27
  const [selectedContainer, setSelectedContainer] = React.useState(null);
24
28
  const { isOpen, showChart, closeChart } = (0, useChartState_1.useChartState)(selectedChart);
25
29
  const options = chartDefinitions.map((chartDefinition) => ({
@@ -66,16 +70,26 @@ const ChartingViewPanel = (props) => {
66
70
  ];
67
71
  const chartSelector = (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], className: `ab-${elementType}__Chart__select`, items: options, disabled: !hasCharts }, content));
68
72
  const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
69
- const chartButton = (React.createElement(SimpleButton_1.default, { onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
73
+ const chartButton = (React.createElement(SimpleButton_1.default, { mr: 1, onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
74
+ const deleteButton = React.createElement(DeleteChartButton_1.DeleteChartButton, { chart: selectedChart, accessLevel: accessLevel });
75
+ const editButton = (React.createElement(EditChartButton_1.EditChartButton, { chart: selectedChart, accessLevel: accessLevel, isOpen: isOpen }));
70
76
  if (elementType === 'DashboardToolbar') {
71
77
  return (React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
72
78
  React.createElement(rebass_1.Box, null, chartSelector),
73
79
  containerSelector && React.createElement(rebass_1.Box, { ml: 1 }, containerSelector),
74
- React.createElement(rebass_1.Box, { ml: 1 }, chartButton)));
80
+ React.createElement(rebass_1.Box, { ml: 1 },
81
+ chartButton,
82
+ deleteButton,
83
+ editButton)));
75
84
  }
76
85
  return (React.createElement(rebass_1.Flex, { flexDirection: "column", width: "100%" },
77
86
  React.createElement(rebass_1.Box, { mb: 1 }, chartSelector),
78
87
  containerSelector && React.createElement(rebass_1.Box, { mb: 1 }, containerSelector),
79
- React.createElement(rebass_1.Box, null, chartButton)));
88
+ React.createElement(rebass_1.Box, null,
89
+ chartButton,
90
+ " ",
91
+ deleteButton,
92
+ " ",
93
+ editButton)));
80
94
  };
81
95
  exports.ChartingViewPanel = ChartingViewPanel;
@@ -21,14 +21,14 @@ const ChartingWizard = (props) => {
21
21
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: chartDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
22
22
  {
23
23
  title: 'Settings',
24
- details: 'Chart settings',
24
+ details: 'Chart Settings',
25
25
  isValid: SettingsSection_1.isSettingsValid,
26
26
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
27
27
  React.createElement(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
28
28
  },
29
29
  {
30
30
  title: 'Preview Chart',
31
- details: 'Preview of the chart',
31
+ details: 'Chart Preview',
32
32
  render: () => (React.createElement(rebass_1.Box, { p: 2 },
33
33
  React.createElement(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
34
34
  },
@@ -11,7 +11,7 @@ const isSettingsValid = (chartDefinition, api) => {
11
11
  if (!chartDefinition.Name) {
12
12
  return 'Name is mandatory';
13
13
  }
14
- const allChartDefinitions = api.chartingApi.getAllChartDefinitions();
14
+ const allChartDefinitions = api.chartingApi.getChartDefinitions();
15
15
  if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
16
16
  chartDefinitionLoopItem.Name === chartDefinition.Name)) {
17
17
  return 'There is already a chart with this name';
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import { AccessLevel, ChartDefinition } from '../../../types';
3
+ export interface ButtonDeleteProps {
4
+ chart: ChartDefinition;
5
+ accessLevel: AccessLevel;
6
+ }
7
+ export declare const DeleteChartButton: React.FunctionComponent<ButtonDeleteProps>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteChartButton = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const ButtonDelete_1 = require("../Buttons/ButtonDelete");
7
+ const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
8
+ const DeleteChartButton = (props) => {
9
+ var _a;
10
+ return (React.createElement(ButtonDelete_1.ButtonDelete, { disabled: !props.chart, ConfirmAction: ChartingRedux.ChartingDeleteChart((_a = props.chart) === null || _a === void 0 ? void 0 : _a.Name), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel }));
11
+ };
12
+ exports.DeleteChartButton = DeleteChartButton;
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { AccessLevel, ChartDefinition } from '../../../types';
3
+ export interface EditChartButtonProps {
4
+ chart: ChartDefinition;
5
+ accessLevel: AccessLevel;
6
+ isOpen: boolean;
7
+ }
8
+ export declare const EditChartButton: React.FunctionComponent<EditChartButtonProps>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EditChartButton = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
7
+ const ButtonEdit_1 = require("../Buttons/ButtonEdit");
8
+ const ModuleConstants = tslib_1.__importStar(require("../../../Utilities/Constants/ModuleConstants"));
9
+ const react_redux_1 = require("react-redux");
10
+ const EditChartButton = (props) => {
11
+ const dispatch = (0, react_redux_1.useDispatch)();
12
+ return (React.createElement(ButtonEdit_1.ButtonEdit, { tooltip: "Edit Chart",
13
+ // It gets complicated when a chart is both open and opened in edit wizard
14
+ // There an be conflicts between the two open charts (preview and main) and the changes to the active chart may not be syncronized correctly.
15
+ disabled: !props.chart || props.isOpen, accessLevel: props.accessLevel, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ChartingModuleId, 'Chart', {
16
+ action: 'Edit',
17
+ value: props.chart,
18
+ source: 'Toolbar',
19
+ })) }));
20
+ };
21
+ exports.EditChartButton = EditChartButton;
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { AdaptablePredicateDef, AdaptableScope } from '../../../types';
3
+ import { EntityRulesEditorProps, RuleType } from './index';
4
+ export interface PredicatesEditorProps {
5
+ descriptions: EntityRulesEditorProps<any>['descriptions'];
6
+ data: {
7
+ Rule: RuleType;
8
+ Scope: AdaptableScope;
9
+ };
10
+ onChange: (data: {
11
+ Rule: RuleType;
12
+ Scope: AdaptableScope;
13
+ }) => void;
14
+ predicateDefs: AdaptablePredicateDef[];
15
+ }
16
+ export declare const PredicatesEditor: React.FunctionComponent<PredicatesEditorProps>;
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PredicatesEditor = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const rebass_1 = require("rebass");
7
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
8
+ const AdaptableContext_1 = require("../../AdaptableContext");
9
+ const ButtonInfo_1 = require("../Buttons/ButtonInfo");
10
+ const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
11
+ const PredicateEditor_1 = require("../PredicateEditor/PredicateEditor");
12
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
13
+ const Tag_1 = require("../../../components/Tag");
14
+ const PredicatesEditor = (props) => {
15
+ var _a, _b, _c, _d;
16
+ const { api } = (0, AdaptableContext_1.useAdaptable)();
17
+ const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
18
+ const predicateDefs = props.predicateDefs
19
+ // filter out already used ones
20
+ .filter((predicateDef) => {
21
+ var _a, _b;
22
+ return !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some((item) => item.PredicateId === predicateDef.id));
23
+ });
24
+ const handleAddNewPredicate = () => {
25
+ var _a;
26
+ props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
27
+ Predicates: [
28
+ ...(((_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) || []),
29
+ {
30
+ PredicateId: predicateDefs[0].id,
31
+ Inputs: [],
32
+ },
33
+ ],
34
+ } }));
35
+ };
36
+ return (React.createElement(React.Fragment, null,
37
+ React.createElement(rebass_1.Flex, { mb: 2, justifyContent: "space-between" },
38
+ React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, props.descriptions.selectPredicate),
39
+ React.createElement(SimpleButton_1.default, { disabled: !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length), onClick: handleAddNewPredicate, icon: "plus", variant: "raised" }, "Add Predicate")),
40
+ (((_d = (_c = props.data.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.length) ? props.data.Rule.Predicates : [null]).map((predicate, index) => {
41
+ var _a, _b;
42
+ const handleClear = () => {
43
+ var _a, _b;
44
+ const newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.filter((prevPredicate) => prevPredicate !== predicate);
45
+ props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
46
+ Predicates: newPredicates,
47
+ } }));
48
+ };
49
+ const predicateDefsIncludingCurrent = [...predicateDefs];
50
+ const currentPredicateDef = props.predicateDefs.find((item) => item.id === (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId));
51
+ if (currentPredicateDef) {
52
+ predicateDefsIncludingCurrent.push(currentPredicateDef);
53
+ }
54
+ return (React.createElement(rebass_1.Box, { mb: 3, key: index },
55
+ index > 0 && React.createElement(Tag_1.Tag, { mb: 2 }, "AND"),
56
+ React.createElement(rebass_1.Flex, { justifyContent: "center", alignItems: "flex-start", width: "100%" },
57
+ React.createElement(rebass_1.Box, { flex: 1 },
58
+ React.createElement(PredicateEditor_1.PredicateEditor, { columnId: 'ColumnIds' in props.data.Scope ? (_b = (_a = props.data.Scope) === null || _a === void 0 ? void 0 : _a.ColumnIds) === null || _b === void 0 ? void 0 : _b[0] : null, predicateDefs: predicateDefsIncludingCurrent, predicate: predicate, onChange: (newPredicateDef) => {
59
+ var _a, _b;
60
+ let newPredicates = [];
61
+ if (predicate) {
62
+ newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map((prevPredicate) => {
63
+ if (prevPredicate === predicate) {
64
+ return newPredicateDef;
65
+ }
66
+ return prevPredicate;
67
+ });
68
+ }
69
+ else {
70
+ // no previous predicate, e.g. it was cleared
71
+ newPredicates = [newPredicateDef];
72
+ }
73
+ props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
74
+ Predicates: newPredicates,
75
+ } }));
76
+ }, onClear: handleClear })),
77
+ React.createElement(SimpleButton_1.default, { disabled: !predicate, ml: 2, onClick: handleClear, icon: "delete" }))));
78
+ }),
79
+ showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
80
+ fontSize: 'var(--ab-font-size-3)',
81
+ padding: 0,
82
+ } },
83
+ React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
84
+ "See Predicate documentation for more details and examples"))));
85
+ };
86
+ exports.PredicatesEditor = PredicatesEditor;
@@ -0,0 +1,6 @@
1
+ import { AdaptableApi } from '../../../types';
2
+ import { OnePageAdaptableWizardContextType } from '../../Wizard/OnePageAdaptableWizard';
3
+ import { RuleType } from './index';
4
+ export declare const isRuleValid: (abObject: {
5
+ Rule?: RuleType;
6
+ }, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "The Expression is not a valid Boolean Expression" | "No valid Condition is specified" | "The Predicates are not valid";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isRuleValid = void 0;
4
+ const isRuleValid = (abObject, api, context) => {
5
+ var _a, _b, _c, _d, _e, _f, _g, _h;
6
+ if (!((_b = (_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length) && !((_c = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _c === void 0 ? void 0 : _c.BooleanExpression)) {
7
+ return 'No valid Condition is specified';
8
+ }
9
+ if ((_e = (_d = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _d === void 0 ? void 0 : _d.Predicates) === null || _e === void 0 ? void 0 : _e.length) {
10
+ if (!api.predicateApi.isEveryPredicateValid((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.Predicates)) {
11
+ return 'The Predicates are not valid';
12
+ }
13
+ }
14
+ if ((_g = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _g === void 0 ? void 0 : _g.BooleanExpression) {
15
+ if (!api.queryLanguageApi.isValidBooleanExpression((_h = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _h === void 0 ? void 0 : _h.BooleanExpression, context.moduleInfo.ModuleName)) {
16
+ return 'The Expression is not a valid Boolean Expression';
17
+ }
18
+ }
19
+ return true;
20
+ };
21
+ exports.isRuleValid = isRuleValid;
@@ -1,16 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { FlexProps } from 'rebass';
3
- import type { AdaptableApi, AdaptableModule, AdaptablePredicate, AdaptablePredicateDef, AdaptableScope } from '../../../types';
3
+ import type { AdaptableModule, AdaptablePredicate, AdaptablePredicateDef, AdaptableScope } from '../../../types';
4
4
  import type { XOR } from '../../../Utilities/Extensions/TypeExtensions';
5
5
  import { AdaptableQuery } from '../../../PredefinedConfig/Common/AdaptableQuery';
6
- import { OnePageAdaptableWizardContextType } from '../../Wizard/OnePageAdaptableWizard';
7
- declare type RuleType = XOR<{
8
- Predicate: AdaptablePredicate;
6
+ export declare type RuleType = XOR<{
7
+ Predicates: AdaptablePredicate[];
9
8
  }, AdaptableQuery>;
10
- export declare const isRuleValid: (abObject: {
11
- Rule?: RuleType;
12
- }, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The Expression is not a valid Boolean Expression";
13
- declare type EntityRulesEditorProps<T> = {
9
+ export declare type EntityRulesEditorProps<T> = {
14
10
  data: T;
15
11
  module: AdaptableModule;
16
12
  showNoRule?: boolean;
@@ -42,4 +38,3 @@ export declare const EntityRulesEditor: <T extends {
42
38
  Rule: RuleType;
43
39
  Scope: AdaptableScope;
44
40
  }>(props: EntityRulesEditorProps<T>) => JSX.Element;
45
- export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EntityRulesEditor = exports.EntityRulesSummary = exports.isRuleValid = void 0;
3
+ exports.EntityRulesEditor = exports.EntityRulesSummary = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
@@ -8,29 +8,8 @@ const rebass_1 = require("rebass");
8
8
  const Tabs_1 = require("../../../components/Tabs");
9
9
  const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
10
10
  const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
11
- const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
12
11
  const AdaptableContext_1 = require("../../AdaptableContext");
13
- const ButtonInfo_1 = require("../Buttons/ButtonInfo");
14
- const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
15
- const PredicateEditor_1 = require("../PredicateEditor/PredicateEditor");
16
- const isRuleValid = (abObject, api, context) => {
17
- var _a, _b, _c, _d, _e, _f;
18
- if (!((_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) && !((_b = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _b === void 0 ? void 0 : _b.BooleanExpression)) {
19
- return 'No valid Condition is specified';
20
- }
21
- if ((_c = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _c === void 0 ? void 0 : _c.Predicate) {
22
- if (!api.predicateApi.isValidPredicate((_d = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _d === void 0 ? void 0 : _d.Predicate)) {
23
- return 'The Predicate is not valid';
24
- }
25
- }
26
- if ((_e = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _e === void 0 ? void 0 : _e.BooleanExpression) {
27
- if (!api.queryLanguageApi.isValidBooleanExpression((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.BooleanExpression, context.moduleInfo.ModuleName)) {
28
- return 'The Expression is not a valid Boolean Expression';
29
- }
30
- }
31
- return true;
32
- };
33
- exports.isRuleValid = isRuleValid;
12
+ const PredicatesEditor_1 = require("./PredicatesEditor");
34
13
  const QueryTab = (props) => {
35
14
  const { type, label, disabled = false } = props, tabProps = tslib_1.__rest(props, ["type", "label", "disabled"]);
36
15
  const text = (React.createElement(rebass_1.Flex, { flexDirection: "column" },
@@ -44,13 +23,16 @@ QueryTab.defaultProps = {
44
23
  isTabsTab: true,
45
24
  };
46
25
  const EntityRulesSummary = (props) => {
26
+ var _a, _b, _c;
47
27
  const { data } = props;
48
28
  const { api: { predicateApi, internalApi }, } = (0, AdaptableContext_1.useAdaptable)();
49
- return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(internalApi.getAdaptableQueryExpressionText(data.Rule))))));
29
+ return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicates ? (React.createElement(React.Fragment, null, (_c = (_b = (_a = data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, (predicate, index) => (
30
+ // predicate id is not unique
31
+ React.createElement(React.Fragment, { key: index }, props.renderPredicate(predicateApi.predicateToString(predicate))))))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(internalApi.getAdaptableQueryExpressionText(data.Rule))))));
50
32
  };
51
33
  exports.EntityRulesSummary = EntityRulesSummary;
52
34
  const EntityRulesEditor = (props) => {
53
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
35
+ var _a, _b, _c;
54
36
  const { data, children, descriptions, predicateDefs, showNoRule = false, showPredicate = true, showObservable = true, showBoolean = true, showAggregation = true, flexProps, module, } = props;
55
37
  const { api } = (0, AdaptableContext_1.useAdaptable)();
56
38
  const type = data.Rule == undefined
@@ -86,15 +68,14 @@ const EntityRulesEditor = (props) => {
86
68
  }
87
69
  else {
88
70
  props.onChange(Object.assign(Object.assign({}, data), { Rule: {
89
- Predicate: {
90
- PredicateId: props.defaultPredicateId,
91
- },
71
+ Predicates: [
72
+ {
73
+ PredicateId: props.defaultPredicateId,
74
+ },
75
+ ],
92
76
  } }));
93
77
  }
94
78
  };
95
- const predicateId = ((_a = data.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) != undefined ? (_b = data.Rule) === null || _b === void 0 ? void 0 : _b.Predicate.PredicateId : undefined;
96
- const predicateInputs = predicateId ? (_d = (_c = data.Rule) === null || _c === void 0 ? void 0 : _c.Predicate.Inputs) !== null && _d !== void 0 ? _d : [] : [];
97
- const currentPredicateDef = api.predicateApi.getPredicateDefById(predicateId);
98
79
  const isValuesPredicateDef = (colDef) => colDef && ['Values', 'ExcludeValues'].includes(colDef.id);
99
80
  const filteredPredicateDefs = predicateDefs.filter((def) => {
100
81
  if (isValuesPredicateDef(def)) {
@@ -102,51 +83,6 @@ const EntityRulesEditor = (props) => {
102
83
  }
103
84
  return true;
104
85
  });
105
- const predicateDefsOptions = filteredPredicateDefs.map((item) => ({
106
- value: item.id,
107
- label: item.label,
108
- onClick: () => onPredicateChange(item),
109
- }));
110
- const onPredicateInputChange = (e, index) => {
111
- const { value } = e.target;
112
- const newInputs = [...predicateInputs];
113
- newInputs[index] = value;
114
- props.onChange(Object.assign(Object.assign({}, data), { Rule: {
115
- Predicate: {
116
- PredicateId: predicateId,
117
- Inputs: newInputs,
118
- },
119
- } }));
120
- };
121
- const onPredicateValuesChange = (inputs) => {
122
- props.onChange(Object.assign(Object.assign({}, data), { Rule: {
123
- Predicate: {
124
- PredicateId: predicateId,
125
- Inputs: inputs,
126
- },
127
- } }));
128
- };
129
- const onPredicateChange = (item) => {
130
- var _a;
131
- if (item) {
132
- props.onChange(Object.assign(Object.assign({}, data), { Rule: {
133
- Predicate: {
134
- PredicateId: item.id,
135
- Inputs: ((_a = item === null || item === void 0 ? void 0 : item.inputs) !== null && _a !== void 0 ? _a : []).map((input) => { var _a; return (_a = input.defaultValue) !== null && _a !== void 0 ? _a : ''; }),
136
- },
137
- } }));
138
- }
139
- else {
140
- props.onChange(Object.assign(Object.assign({}, data), { Rule: {
141
- BooleanExpression: '',
142
- } }));
143
- }
144
- };
145
- const clearPredicate = () => {
146
- props.onChange(Object.assign(Object.assign({}, data), { Rule: {
147
- Predicate: undefined,
148
- } }));
149
- };
150
86
  const setBooleanExpression = (expression) => {
151
87
  props.onChange(Object.assign(Object.assign({}, data), { Rule: { BooleanExpression: expression } }));
152
88
  };
@@ -157,7 +93,6 @@ const EntityRulesEditor = (props) => {
157
93
  props.onChange(Object.assign(Object.assign({}, data), { Rule: { AggregatedBooleanExpression: expression } }));
158
94
  };
159
95
  const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
160
- const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
161
96
  const baseClassName = 'ab-EntityRulesEditor';
162
97
  return (React.createElement(rebass_1.Flex, Object.assign({ className: baseClassName, flexDirection: "column", padding: 2, pt: 0, pl: 0 }, flexProps, { style: Object.assign({ height: '100%' }, flexProps === null || flexProps === void 0 ? void 0 : flexProps.style) }),
163
98
  children,
@@ -169,24 +104,15 @@ const EntityRulesEditor = (props) => {
169
104
  showPredicate ? (React.createElement(Tabs_1.Tabs.Tab, { value: 'Predicate', style: { flex: 1 } },
170
105
  React.createElement(Radio_1.default, { tabIndex: -1, margin: 0, checked: type === 'Predicate' }, "Predicate"))) : null,
171
106
  showPredicate ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "Predicate", value: "Predicate" },
172
- React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, descriptions.selectPredicate),
173
- React.createElement(PredicateEditor_1.PredicateEditor, { columnId: 'ColumnIds' in data.Scope ? (_f = (_e = data.Scope) === null || _e === void 0 ? void 0 : _e.ColumnIds) === null || _f === void 0 ? void 0 : _f[0] : null, predicateDefs: filteredPredicateDefs, predicate: (_g = data.Rule) === null || _g === void 0 ? void 0 : _g.Predicate, onChange: (predicate) => {
174
- props.onChange(Object.assign(Object.assign({}, data), { Rule: Object.assign(Object.assign({}, data.Rule), { Predicate: predicate }) }));
175
- }, onClear: clearPredicate }),
176
- showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
177
- fontSize: 'var(--ab-font-size-3)',
178
- padding: 0,
179
- } },
180
- React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
181
- "See Predicate documentation for more details and examples")))) : null,
107
+ React.createElement(PredicatesEditor_1.PredicatesEditor, { data: data, descriptions: descriptions, predicateDefs: filteredPredicateDefs, onChange: props.onChange }))) : null,
182
108
  showBoolean ? React.createElement(QueryTab, { value: "BooleanExpression", type: type, label: "Boolean" }) : null,
183
109
  showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "BooleanExpression", value: 'BooleanExpression', paddingLeft: 0 },
184
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: (_h = data.Rule) === null || _h === void 0 ? void 0 : _h.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
110
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: (_a = data.Rule) === null || _a === void 0 ? void 0 : _a.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null,
185
111
  showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
186
112
  showObservable ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "ObservableExpression", value: 'ObservableExpression', paddingLeft: 0 },
187
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: (_j = data.Rule) === null || _j === void 0 ? void 0 : _j.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
113
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: (_b = data.Rule) === null || _b === void 0 ? void 0 : _b.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null,
188
114
  showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
189
115
  showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "AggregatedBooleanExpression", value: 'AggregatedBooleanExpression', paddingLeft: 0 },
190
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: (_k = data.Rule) === null || _k === void 0 ? void 0 : _k.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null)));
116
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: (_c = data.Rule) === null || _c === void 0 ? void 0 : _c.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null)));
191
117
  };
192
118
  exports.EntityRulesEditor = EntityRulesEditor;
@@ -32,7 +32,7 @@ class ExpressionWizard extends React.Component {
32
32
  render() {
33
33
  const initialData = (0, react_1.useMemo)(() => this.props.api.internalApi.getQueryPreviewData(), []);
34
34
  return (React.createElement(React.Fragment, null,
35
- React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getAllNamedQuery(), api: this.props.api }),
35
+ React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getNamedQueries(), api: this.props.api }),
36
36
  ' ',
37
37
  React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, marginBottom: 2, marginLeft: 1, alignItems: "center", "data-name": "expression-wizard-save-option" },
38
38
  React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, disabled: !this.isValidExpression(), marginBottom: 2, checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
@@ -24,7 +24,9 @@ const ExternalRenderer = (_a) => {
24
24
  render({ visible: false, element: element, adaptableApi });
25
25
  }
26
26
  else if (frameworkComponent) {
27
- adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent, componentName);
27
+ adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent,
28
+ // @ts-ignore
29
+ componentName);
28
30
  }
29
31
  };
30
32
  }, []);
@@ -110,7 +110,7 @@ class FilterFormComponent extends React.Component {
110
110
  }
111
111
  }
112
112
  async loadPermittedValues(filter = '') {
113
- const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
113
+ const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
114
114
  .showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
115
115
  if (!this._isMounted) {
116
116
  return;
@@ -137,7 +137,7 @@ class FilterFormComponent extends React.Component {
137
137
  let closeButton = (React.createElement(ButtonClose_1.ButtonClose, { onClick: () => this.onCloseForm(), tooltip: null, accessLevel: 'Full' }));
138
138
  let clearFilterButton = (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.onClearFilter(), disabled: isEmptyFilter, tooltip: null, accessLevel: 'Full', showText: true, showIcon: false }));
139
139
  const useAgGridStyle = !!filterOptions.useAgGridFilterFormStyle;
140
- return (React.createElement("div", { className: "ab-FilterForm", "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(React.Fragment, null,
140
+ return (React.createElement("div", { className: "ab-FilterForm", "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.gridApi.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(React.Fragment, null,
141
141
  this.state.showTab && (React.createElement(React.Fragment, null,
142
142
  React.createElement(Radio_1.default, { "data-name": "values", flex: 1, marginLeft: 1, checked: this.state.currentTab == 'values', onChange: () => this.setState({ currentTab: 'values' }) },
143
143
  React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Column Values")),
@@ -210,7 +210,7 @@ class FilterFormComponent extends React.Component {
210
210
  if (editedColumnFilter.Predicate === undefined ||
211
211
  (editedColumnFilter.Predicate.PredicateId === 'Values' &&
212
212
  editedColumnFilter.Predicate.Inputs.length === 0)) {
213
- this.props.api.filterApi.clearColumnFilterByColumn(editedColumnFilter.ColumnId);
213
+ this.props.api.filterApi.clearColumnFilterForColumn(editedColumnFilter.ColumnId);
214
214
  this.onCloseForm();
215
215
  }
216
216
  else {
@@ -32,7 +32,7 @@ class QuickFilterFormComponent extends React.Component {
32
32
  }
33
33
  };
34
34
  this.loadPermittedValues = async (filter = '') => {
35
- const { values, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
35
+ const { values, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
36
36
  .showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
37
37
  if (!this._isMounted) {
38
38
  return;
@@ -142,7 +142,7 @@ class QuickFilterFormComponent extends React.Component {
142
142
  showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
143
143
  }
144
144
  return (React.createElement(React.Fragment, null,
145
- showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
145
+ showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { className: "ab-QuickFilter__dropdown", flexDirection: "column", "data-name": "quick-filter", fontSize: 2 },
146
146
  (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
147
147
  React.createElement("span", { style: { width: 20, marginRight: 10 } },
148
148
  React.createElement(icons_1.Icon, { name: "delete" })),
@@ -346,14 +346,14 @@ class QuickFilterFormComponent extends React.Component {
346
346
  }
347
347
  getPredicateIdForShortcutValue(value) {
348
348
  var _a;
349
- return (_a = this.props.api.filterApi.findPredicateDefByShortcut(value, this.props.currentColumn)) === null || _a === void 0 ? void 0 : _a.id;
349
+ return (_a = this.props.api.filterApi.internalApi.findPredicateDefByShortcut(value, this.props.currentColumn)) === null || _a === void 0 ? void 0 : _a.id;
350
350
  }
351
351
  clearFilter() {
352
352
  const { filter } = this.state;
353
- this.props.api.filterApi.clearColumnFilterByColumn(filter.ColumnId);
353
+ this.props.api.filterApi.clearColumnFilterForColumn(filter.ColumnId);
354
354
  }
355
355
  hasValuesPredicate(predicate) {
356
- return this.props.api.predicateApi.hasPredicateValues(predicate);
356
+ return this.props.api.predicateApi.internalApi.hasPredicateValues(predicate);
357
357
  }
358
358
  }
359
359
  function mapStateToProps(state, ownProps) {
@@ -9,14 +9,13 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/Simp
9
9
  const AdaptableContext_1 = require("../../AdaptableContext");
10
10
  const ListBoxFilterForm_1 = require("../FilterForm/ListBoxFilterForm");
11
11
  const PermitedValuesSelector = (props) => {
12
- var _a;
12
+ var _a, _b, _c;
13
13
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
14
14
  const columnId = props.columnId;
15
- const column = adaptable.api.columnApi.getColumnFromId(columnId);
16
- const distinctValues = ((_a = adaptable.api.columnApi.getDistinctDisplayValuesForColumn(columnId)) !== null && _a !== void 0 ? _a : []).map((value) => ({ value: value, label: value }));
17
- const predicateInputs = props.predicate.Inputs;
18
- const isClearDisabled = predicateInputs.filter((item) => item !== undefined || item !== null || item !== '')
19
- .length === 0;
15
+ const column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
16
+ const distinctValues = ((_a = adaptable.api.gridApi.internalApi.getDistinctDisplayValuesForColumn(columnId)) !== null && _a !== void 0 ? _a : []).map((value) => { var _a; return ({ value: value, label: value.toString ? (_a = value.toString) === null || _a === void 0 ? void 0 : _a.call(value) : value }); });
17
+ const predicateInputs = (_b = props.predicate.Inputs) !== null && _b !== void 0 ? _b : [];
18
+ const isClearDisabled = ((_c = predicateInputs === null || predicateInputs === void 0 ? void 0 : predicateInputs.filter) === null || _c === void 0 ? void 0 : _c.call(predicateInputs, (item) => item !== undefined || item !== null || item !== '').length) === 0;
20
19
  const popupContent = (React.createElement(rebass_1.Flex, { className: "ab-PermitedValuesSelector__PopupContent", padding: 1, flexDirection: "column" },
21
20
  React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { currentColumn: column, columns: [], columnDistinctValues: distinctValues, dataType: column.dataType, uiSelectedColumnValues: props.predicate.Inputs, useAgGridStyle: true, onColumnValueSelectedChange: (list) => props.onPredicateValuesChange(list) })));
22
21
  return (React.createElement(rebass_1.Box, { className: "ab-PermitedValuesSelector", mt: 2 },
@@ -23,7 +23,7 @@ const AdaptablePopupBody = (props) => {
23
23
  }
24
24
  },
25
25
  // show share button if TeamSharing is active & user has edit rights
26
- teamSharingActivated: props.api.teamSharingApi.isTeamSharingActivated() &&
26
+ teamSharingActivated: props.api.teamSharingApi.isTeamSharingAvailable() &&
27
27
  props.api.teamSharingApi.hasTeamSharingFullRights(),
28
28
  modalContainer: modalContainer,
29
29
  accessLevel: accessLevel,
@@ -16,7 +16,7 @@ const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
16
16
  const AdaptablePopupModuleView = (props) => {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h;
18
18
  /**
19
- * This triggers an render for each redux change.
19
+ * This triggers a render for each redux change.
20
20
  * Not sure yet how to trigger this component to render when an item is edited.
21
21
  */
22
22
  (0, react_redux_1.useSelector)((state) => state);
@@ -98,7 +98,7 @@ const AdaptablePopupModuleView = (props) => {
98
98
  if (!(adaptableModule === null || adaptableModule === void 0 ? void 0 : adaptableModule.canBeAssociatedWithLayouts())) {
99
99
  return;
100
100
  }
101
- if (!props.api.internalApi.hasLayoutSpecificObjects()) {
101
+ if (!props.api.layoutApi.internalApi.hasLayoutSpecificObjects()) {
102
102
  return;
103
103
  }
104
104
  return (React.createElement(rebass_1.Flex, { justifyContent: "flex-start" },