@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
@@ -0,0 +1,484 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AlertInternalApi = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ApiBase_1 = require("../Implementation/ApiBase");
6
+ const AdaptableAlert_1 = require("../../PredefinedConfig/Common/AdaptableAlert");
7
+ const AdaptableQuery_1 = require("../../PredefinedConfig/Common/AdaptableQuery");
8
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
9
+ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
10
+ const ObjectFactory_1 = tslib_1.__importDefault(require("../../Utilities/ObjectFactory"));
11
+ class AlertInternalApi extends ApiBase_1.ApiBase {
12
+ /**
13
+ * Retrieves the Adaptable Form with the given name
14
+ * @param name name of the Form
15
+ */
16
+ getAdaptableFormByName(name) {
17
+ var _a;
18
+ const alertForms = this.getAlertOptions().alertForms || [];
19
+ return (_a = alertForms.find((f) => f.name === name)) === null || _a === void 0 ? void 0 : _a.form;
20
+ }
21
+ /**
22
+ * Retrieves all Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
23
+ * @returns alert definitions
24
+ */
25
+ getNonReactiveAlertDefinitions() {
26
+ return this.getAlertApi()
27
+ .getAlertDefinitions()
28
+ .filter((alertDef) => !(0, AdaptableQuery_1.isReactiveQuery)(alertDef.Rule));
29
+ }
30
+ /**
31
+ * Retrieves all active (non-suspended) Alert Definitions in Alert State which are NOT Reactive (BooleanQuery)
32
+ * @returns alert definitions
33
+ */
34
+ getActiveNonReactiveAlertDefinitions() {
35
+ return this.getNonReactiveAlertDefinitions().filter((alertDef) => !alertDef.IsSuspended);
36
+ }
37
+ /**
38
+ *
39
+ * Retrieves all Alert Definitions in Alert State which are reactive (ObservableQuery & AggregationQuery)
40
+ * @returns alert definitions
41
+ */
42
+ getReactiveAlertDefinitions() {
43
+ return this.getAlertApi()
44
+ .getAlertDefinitions()
45
+ .filter((alertDef) => (0, AdaptableQuery_1.isReactiveQuery)(alertDef.Rule));
46
+ }
47
+ /**
48
+ *
49
+ * Retrieves all active (non-suspended) Alert Definitions in Alert State which are reactive (ObservableQuery & AggregationQuery)
50
+ * @returns alert definitions
51
+ */
52
+ getActiveReactiveAlertDefinitions() {
53
+ return this.getReactiveAlertDefinitions().filter((alertDef) => !alertDef.IsSuspended);
54
+ }
55
+ /**
56
+ * Retrieves all Alert Definitions which prevent a Cell Edit
57
+ * @returns alert definitions
58
+ */
59
+ getAlertDefinitionsWithPreventEdit() {
60
+ return this.getActiveNonReactiveAlertDefinitions().filter((a) => a.AlertProperties != null && a.AlertProperties.PreventEdit === true);
61
+ }
62
+ /**
63
+ * Retrieves all Alert Definitions which allow a Cell Edit
64
+ * @returns alert definitions
65
+ */
66
+ getAlertDefinitionsWithAllowEdit() {
67
+ return this.getActiveNonReactiveAlertDefinitions().filter((a) => a.AlertProperties == null || a.AlertProperties.PreventEdit !== true);
68
+ }
69
+ /**
70
+ * Publishes an event when an Alert is triggered
71
+ * @param alertToFire Alerts which has just triggered
72
+ */
73
+ publishAlertFiredEvent(alertToFire) {
74
+ const alertFiredInfo = {
75
+ adaptableApi: this.getAdaptableApi(),
76
+ alert: alertToFire,
77
+ };
78
+ this.getEventApi().emit('AlertFired', alertFiredInfo);
79
+ }
80
+ /**
81
+ * Runs after a button in an Alert Form is clicked
82
+ */
83
+ executeAlertButton(button, context) {
84
+ if (button.Action) {
85
+ let actions = button.Action;
86
+ if (typeof actions === 'function') {
87
+ actions(context);
88
+ return;
89
+ }
90
+ if (!Array.isArray(actions)) {
91
+ actions = [actions];
92
+ }
93
+ actions.forEach((action) => {
94
+ var _a;
95
+ const buttonOnClick = (_a = this.getAlertOptions().actionHandlers) === null || _a === void 0 ? void 0 : _a.find((x) => x.name === action);
96
+ buttonOnClick === null || buttonOnClick === void 0 ? void 0 : buttonOnClick.handler(button, context);
97
+ this.executeAlertAction(action, {
98
+ alertDefinition: context.alert.alertDefinition,
99
+ cellDataChangedInfo: (0, AdaptableAlert_1.isAdaptableCellChangedAlert)(context.alert)
100
+ ? context.alert.cellDataChangedInfo
101
+ : null,
102
+ gridDataChangedInfo: (0, AdaptableAlert_1.isAdaptableRowChangedAlert)(context.alert)
103
+ ? context.alert.gridDataChangedInfo
104
+ : null,
105
+ formData: context.formData,
106
+ });
107
+ });
108
+ }
109
+ }
110
+ /**
111
+ * Runs after an Alert Action is invoked
112
+ * @param actionName Action which has been invoked
113
+ * @param details Info about the Alert and Form
114
+ */
115
+ executeAlertAction(actionName, details) {
116
+ const { alertDefinition, cellDataChangedInfo: cellDataChangedInfo, gridDataChangedInfo, } = details;
117
+ const getBackgroundColor = (alertDefinition) => {
118
+ var _a;
119
+ const highlightType = (_a = alertDefinition.MessageType) !== null && _a !== void 0 ? _a : 'Info';
120
+ let backgroundColor = '';
121
+ switch (highlightType) {
122
+ case 'Error':
123
+ backgroundColor = 'var(--ab-color-error)';
124
+ break;
125
+ case 'Info':
126
+ backgroundColor = 'var(--ab-color-info)';
127
+ break;
128
+ case 'Success':
129
+ backgroundColor = 'var(--ab-color-success)';
130
+ break;
131
+ case 'Warning':
132
+ backgroundColor = 'var(--ab-color-warn)';
133
+ }
134
+ return backgroundColor;
135
+ };
136
+ if (actionName === 'highlight-cell' && cellDataChangedInfo) {
137
+ const backgroundColor = getBackgroundColor(alertDefinition);
138
+ this.getGridApi().highlightCell({
139
+ columnId: cellDataChangedInfo.column.columnId,
140
+ primaryKeyValue: cellDataChangedInfo.primaryKeyValue,
141
+ highlightStyle: {
142
+ BackColor: backgroundColor,
143
+ },
144
+ timeout: this.getAlertOptions().cellHighlightDuration,
145
+ });
146
+ }
147
+ if (actionName === 'highlight-row' && cellDataChangedInfo) {
148
+ const rowsHighlightInfo = {
149
+ primaryKeyValues: [cellDataChangedInfo.primaryKeyValue],
150
+ highlightStyle: {
151
+ BackColor: getBackgroundColor(alertDefinition),
152
+ },
153
+ timeout: this.getAlertOptions().rowHighlightDuration,
154
+ };
155
+ this.getGridApi().highlightRows(rowsHighlightInfo);
156
+ }
157
+ if (actionName === 'highlight-row' &&
158
+ gridDataChangedInfo &&
159
+ // no sense to highlight a deleted(non-existing) row
160
+ (gridDataChangedInfo === null || gridDataChangedInfo === void 0 ? void 0 : gridDataChangedInfo.rowTrigger) !== 'Delete') {
161
+ const primaryKeyValues = this.getGridApi().getPrimaryKeyValuesForRowNodes(gridDataChangedInfo.rowNodes);
162
+ const rowsHighlightInfo = {
163
+ primaryKeyValues,
164
+ highlightStyle: {
165
+ BackColor: getBackgroundColor(alertDefinition),
166
+ },
167
+ timeout: this.getAlertOptions().rowHighlightDuration,
168
+ };
169
+ this.getGridApi().highlightRows(rowsHighlightInfo);
170
+ }
171
+ if (actionName === 'jump-to-cell' && cellDataChangedInfo) {
172
+ this.getGridApi().jumpToCell(cellDataChangedInfo.primaryKeyValue, cellDataChangedInfo.column.columnId);
173
+ }
174
+ if (actionName === 'jump-to-row' &&
175
+ // either a cell change
176
+ (cellDataChangedInfo ||
177
+ // or a grid change, but NOT row deletion
178
+ (gridDataChangedInfo &&
179
+ // no sense to jump to a deleted(non-existing) row
180
+ (gridDataChangedInfo === null || gridDataChangedInfo === void 0 ? void 0 : gridDataChangedInfo.rowTrigger) !== 'Delete'))) {
181
+ const [firstRowNode] = cellDataChangedInfo
182
+ ? [cellDataChangedInfo.rowNode]
183
+ : gridDataChangedInfo.rowNodes;
184
+ const targetRowNodePrimaryKeyValue = this.getGridApi().getPrimaryKeyValueForRowNode(firstRowNode);
185
+ if (targetRowNodePrimaryKeyValue) {
186
+ this.getGridApi().jumpToRow(targetRowNodePrimaryKeyValue);
187
+ }
188
+ }
189
+ if (actionName === 'jump-to-column' && cellDataChangedInfo) {
190
+ this.getGridApi().jumpToColumn(cellDataChangedInfo.column.columnId);
191
+ }
192
+ if (actionName === 'suspend') {
193
+ this.getAlertApi().suspendAlertDefinition(alertDefinition);
194
+ }
195
+ if (actionName === 'undo' && cellDataChangedInfo) {
196
+ this.getGridApi().undoCellEdit(cellDataChangedInfo);
197
+ }
198
+ }
199
+ /**
200
+ * Retrieves all Predicate Defs that match given Scope
201
+ * @param scope the Scope to check
202
+ */
203
+ getAlertPredicateDefsForScope(scope) {
204
+ return this.getPredicateApi()
205
+ .internalApi.getAlertPredicateDefs()
206
+ .filter((predicateDef) => this.getScopeApi().isScopeInScope(scope, predicateDef.columnScope));
207
+ }
208
+ /**
209
+ * Returns a description of an Alert Definition
210
+ * @param alertDefinition Alert Definition to use
211
+ */
212
+ getAlertDescription(alertDefinition, cellDataChangedInfo) {
213
+ const customMessage = this.getCustomAlertDescription(alertDefinition, { cellDataChangedInfo });
214
+ if (customMessage) {
215
+ return customMessage;
216
+ }
217
+ if (alertDefinition.MessageText != null) {
218
+ return alertDefinition.MessageText;
219
+ }
220
+ let scopeDescription = this.getScopeApi().getScopeDescription(alertDefinition.Scope);
221
+ let ruleDescription = this.getAlertRuleDescription(alertDefinition);
222
+ return scopeDescription + ' - ' + ruleDescription;
223
+ }
224
+ /**
225
+ * Returns a description title of an Alert Definition
226
+ * @param alertDefinition Alert Definition to use
227
+ */
228
+ getAlertMessageTitle(alertDefinition, cellDataChangedInfo) {
229
+ var _a, _b;
230
+ return ((_a = this.getCustomAlertMessageTitle(alertDefinition, {
231
+ cellDataChangedInfo,
232
+ })) !== null && _a !== void 0 ? _a : (_b = cellDataChangedInfo === null || cellDataChangedInfo === void 0 ? void 0 : cellDataChangedInfo.column) === null || _b === void 0 ? void 0 : _b.friendlyName);
233
+ }
234
+ /**
235
+ * Returns custom description for alert using the 'alertMessageText' property
236
+ *
237
+ * @param alertDefinition Alert Definition to use
238
+ * @param dataChangedInfo data change info, it can be eighter grid or cell data chantged info
239
+ */
240
+ getCustomAlertDescription(alertDefinition, dataChangedInfo) {
241
+ var _a;
242
+ const alertMessageFunction = (_a = this.adaptable.adaptableOptions.alertOptions) === null || _a === void 0 ? void 0 : _a.alertMessageText;
243
+ if (alertMessageFunction) {
244
+ const alertMessageContext = {
245
+ alertDefinition: alertDefinition,
246
+ cellDataChangedInfo: dataChangedInfo.cellDataChangedInfo,
247
+ gridDataChangedInfo: dataChangedInfo.gridDataChangedInfo,
248
+ };
249
+ const returnText = alertMessageFunction(alertMessageContext);
250
+ if (returnText) {
251
+ return returnText;
252
+ }
253
+ }
254
+ return null;
255
+ }
256
+ /**
257
+ * Returns custom title defined by 'alertMessageTitle' property
258
+ * @param alertDefinition Alert Definition to use
259
+ * @param dataChangedInfo Data change info, it can be eighter grid or cell data chantged info
260
+ */
261
+ getCustomAlertMessageTitle(alertDefinition, dataChangedInfo) {
262
+ var _a;
263
+ const alertMessageFunction = (_a = this.adaptable.adaptableOptions.alertOptions) === null || _a === void 0 ? void 0 : _a.alertMessageTitle;
264
+ if (alertMessageFunction) {
265
+ const returnText = alertMessageFunction({
266
+ alertDefinition,
267
+ cellDataChangedInfo: dataChangedInfo === null || dataChangedInfo === void 0 ? void 0 : dataChangedInfo.cellDataChangedInfo,
268
+ gridDataChangedInfo: dataChangedInfo === null || dataChangedInfo === void 0 ? void 0 : dataChangedInfo.gridDataChangedInfo,
269
+ });
270
+ if (returnText) {
271
+ return returnText;
272
+ }
273
+ }
274
+ if (alertDefinition.MessageHeader) {
275
+ return alertDefinition.MessageHeader;
276
+ }
277
+ return null;
278
+ }
279
+ /**
280
+ * Returns a description of an Alert Definition's Rule
281
+ * @param alertDefinition Alert Definition to use
282
+ */
283
+ getAlertRuleDescription(alertDefinition) {
284
+ var _a, _b, _c, _d;
285
+ let ruleDescription = ((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length)
286
+ ? (_d = (_c = alertDefinition.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.map((predicate) => this.getPredicateApi().predicateToString(predicate)).join(' AND ')
287
+ : this.adaptable.api.internalApi.getAdaptableQueryExpressionText(alertDefinition.Rule);
288
+ return ruleDescription;
289
+ }
290
+ /**
291
+ * Was Adaptable Alert fired due to a Cell Change
292
+ * @param alert AdaptableAlert to check
293
+ */
294
+ isCellChangedAdaptableAlert(alert) {
295
+ return alert.alertType === 'cellChanged';
296
+ }
297
+ /**
298
+ * Was Adaptable Alert fired due to a Row Change
299
+ * @param alert AdaptableAlert to check
300
+ */
301
+ isRowChangedAdaptableAlert(alert) {
302
+ return alert.alertType === 'rowChanged';
303
+ }
304
+ /**
305
+ * Is Adaptable Alert a Generic one
306
+ * @param alert AdaptableAlert to check
307
+ */
308
+ isGenericAdaptableAlert(alert) {
309
+ return alert.alertType === 'generic';
310
+ }
311
+ /**
312
+ * Returns for the Alert Type for an Adaptable Alert
313
+ * @param alert AdaptableAlert to check
314
+ */
315
+ getAlertTypeForAdaptableAlert(alert) {
316
+ return alert.alertType;
317
+ }
318
+ getAdaptableFormFromAlertForm(alertForm, context, defaultMessageType) {
319
+ var _a, _b;
320
+ const api = this.adaptable.api;
321
+ let adaptableAlertForm;
322
+ let isActionForm = false;
323
+ if (typeof alertForm === 'string') {
324
+ const alertForms = this.getAlertOptions().alertForms || [];
325
+ adaptableAlertForm = (_a = alertForms.find((f) => f.name === alertForm)) === null || _a === void 0 ? void 0 : _a.form;
326
+ }
327
+ else {
328
+ adaptableAlertForm = Object.assign(Object.assign({}, alertForm), { buttons: (alertForm.Buttons || []).map((alertButton) => {
329
+ return Object.assign(Object.assign({}, alertButton), { onClick: () => {
330
+ api.alertApi.internalApi.executeAlertButton(alertButton, context);
331
+ } });
332
+ }) });
333
+ isActionForm = true;
334
+ }
335
+ if (!adaptableAlertForm) {
336
+ return;
337
+ }
338
+ if (adaptableAlertForm && adaptableAlertForm.buttons) {
339
+ // dont mutate the form, but clone it
340
+ adaptableAlertForm = Object.assign({}, adaptableAlertForm);
341
+ adaptableAlertForm.buttons = (_b = adaptableAlertForm.buttons) === null || _b === void 0 ? void 0 : _b.map((button) => {
342
+ let buttonStyle = isActionForm
343
+ ? button.ButtonStyle
344
+ : this.getAdaptableApi().internalApi.getStyleForButton(button, context);
345
+ if (defaultMessageType && !(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.tone)) {
346
+ // force the button tone to be the alert tone, if the tone is missing from button style (or button style non-existent)
347
+ buttonStyle = Object.assign(Object.assign({}, buttonStyle), { tone: defaultMessageType.toLowerCase() });
348
+ }
349
+ let label = isActionForm
350
+ ? button.Label
351
+ : this.getAdaptableApi().internalApi.getLabelForButton(button, context);
352
+ return Object.assign(Object.assign({}, button), { buttonStyle,
353
+ label });
354
+ });
355
+ }
356
+ return adaptableAlertForm;
357
+ }
358
+ getAdaptableAlerts() {
359
+ var _a;
360
+ return (_a = this.getAdaptableState().System.AdaptableAlerts) !== null && _a !== void 0 ? _a : [];
361
+ }
362
+ getAdaptableCellChangedAlerts() {
363
+ return this.getAdaptableAlerts().filter(AdaptableAlert_1.isAdaptableCellChangedAlert);
364
+ }
365
+ getAdaptableRowChangedAlerts() {
366
+ return this.getAdaptableAlerts().filter(AdaptableAlert_1.isAdaptableRowChangedAlert);
367
+ }
368
+ getAdaptableAlertWithHighlightCell(columnId, rowNode) {
369
+ // only alerts triggered by cell changes are relevant for HighlightCell actions
370
+ return this.getAdaptableCellChangedAlerts().find((alert) => {
371
+ var _a, _b, _c, _d;
372
+ return ((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
373
+ ((_c = (_b = alert.cellDataChangedInfo) === null || _b === void 0 ? void 0 : _b.column) === null || _c === void 0 ? void 0 : _c.columnId) === columnId &&
374
+ ((_d = alert.cellDataChangedInfo) === null || _d === void 0 ? void 0 : _d.rowNode) === rowNode;
375
+ });
376
+ }
377
+ getAdaptableAlertWithHighlightRow(rowNode) {
378
+ let alertWithRowHighlight;
379
+ alertWithRowHighlight = this.getAdaptableRowChangedAlerts().find((alert) => {
380
+ var _a, _b;
381
+ if ((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightRow) {
382
+ if ((_b = alert.gridDataChangedInfo) === null || _b === void 0 ? void 0 : _b.rowNodes.map((rowNode) => rowNode.id).includes(rowNode.id)) {
383
+ return alert;
384
+ }
385
+ }
386
+ });
387
+ if (alertWithRowHighlight) {
388
+ return alertWithRowHighlight;
389
+ }
390
+ alertWithRowHighlight = this.getAdaptableCellChangedAlerts().find((alert) => {
391
+ var _a, _b;
392
+ if ((_a = alert.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightRow) {
393
+ if (((_b = alert.cellDataChangedInfo) === null || _b === void 0 ? void 0 : _b.rowNode.id) == rowNode.id) {
394
+ return alert;
395
+ }
396
+ }
397
+ });
398
+ return alertWithRowHighlight;
399
+ }
400
+ isAlertDefinitionForAddedRowChangeEvent(alertDefinition) {
401
+ var _a, _b, _c;
402
+ const addedRowPredicate = 'AddedRow';
403
+ return (_c = (_b = (_a = alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some) === null || _c === void 0 ? void 0 : _c.call(_b, (predicate) => predicate.PredicateId === addedRowPredicate);
404
+ }
405
+ isAlertDefinitionForRemovedRowChangeEvent(alertDefinition) {
406
+ var _a, _b, _c;
407
+ const removedRowPredicate = 'RemovedRow';
408
+ return (_c = (_b = (_a = alertDefinition === null || alertDefinition === void 0 ? void 0 : alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some) === null || _c === void 0 ? void 0 : _c.call(_b, (predicate) => predicate.PredicateId === removedRowPredicate);
409
+ }
410
+ getAlertDefinitionsForCellDataChange(dataChangedEvent) {
411
+ const allActiveNonReactiveDefinitions = this.getAdaptableApi().alertApi.internalApi.getActiveNonReactiveAlertDefinitions();
412
+ let relatedAlertDefinitions = allActiveNonReactiveDefinitions
413
+ .filter((v) => this.getAdaptableApi().scopeApi.isColumnInScope(dataChangedEvent.column, v.Scope))
414
+ .filter((alertDefinition) => !(0, AdaptableQuery_1.isReactiveQuery)(alertDefinition.Rule));
415
+ let triggeredAlerts = [];
416
+ if (ArrayExtensions_1.default.IsNotNullOrEmpty(relatedAlertDefinitions)) {
417
+ relatedAlertDefinitions.forEach((alertDefinition) => {
418
+ if (alertDefinition.Rule.BooleanExpression) {
419
+ let expression = alertDefinition.Rule.BooleanExpression;
420
+ let rowNode = dataChangedEvent.rowNode;
421
+ if (!rowNode) {
422
+ rowNode = this.getAdaptableApi().gridApi.getRowNodeForPrimaryKey(dataChangedEvent.primaryKeyValue);
423
+ }
424
+ const isValidExpression = this.getAdaptableApi().queryLanguageApi.isValidBooleanExpression(expression, 'Alert', `Invalid Alert boolean expression '${expression}'`);
425
+ const isSatisfiedExpression = isValidExpression &&
426
+ this.getAdaptableApi()
427
+ .internalApi.getQueryLanguageService()
428
+ .evaluateBooleanExpression(expression, 'Alert', rowNode);
429
+ if (isSatisfiedExpression) {
430
+ triggeredAlerts.push(alertDefinition);
431
+ }
432
+ }
433
+ else if (alertDefinition.Rule.AggregatedBooleanExpression) {
434
+ const isValidExpression = this.getAdaptableApi().queryLanguageApi.isValidAggregatedBooleanExpression(alertDefinition.Rule.AggregatedBooleanExpression, 'Alert', `Invalid Alert boolean expression '${alertDefinition.Rule.AggregatedBooleanExpression}'`);
435
+ const isSatisfiedExpression = isValidExpression &&
436
+ this.isAggregationAlertTriggered(alertDefinition, dataChangedEvent);
437
+ if (isSatisfiedExpression) {
438
+ triggeredAlerts.push(alertDefinition);
439
+ }
440
+ }
441
+ else {
442
+ if (!this.isAlertDefinitionForRowChangeEvent(alertDefinition) &&
443
+ this.isAlertPredicateTriggered(alertDefinition, dataChangedEvent)) {
444
+ triggeredAlerts.push(alertDefinition);
445
+ }
446
+ }
447
+ });
448
+ }
449
+ return triggeredAlerts;
450
+ }
451
+ isAggregationAlertTriggered(alertDefinition, dataChangedEvent) {
452
+ const changedColumn = dataChangedEvent.column.columnId;
453
+ const aggregationColumns = this.getAdaptableApi().queryLanguageApi.getColumnsFromExpression(alertDefinition.Rule.AggregatedBooleanExpression);
454
+ if (!aggregationColumns.includes(changedColumn)) {
455
+ return false;
456
+ }
457
+ const aggregatedBooleanValue = this.getAdaptableApi()
458
+ .internalApi.getQueryLanguageService()
459
+ .computeAggregatedBooleanValue(alertDefinition.Rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
460
+ return aggregatedBooleanValue;
461
+ }
462
+ isAlertPredicateTriggered(alert, dataChangedEvent, defaultNoPredicateReturn = false) {
463
+ var _a;
464
+ return this.getAdaptableApi().predicateApi.handlePredicates((_a = alert.Rule) === null || _a === void 0 ? void 0 : _a.Predicates, {
465
+ value: dataChangedEvent.newValue,
466
+ oldValue: dataChangedEvent.oldValue,
467
+ // TODO send real display value
468
+ displayValue: null,
469
+ node: dataChangedEvent.rowNode,
470
+ column: dataChangedEvent.column,
471
+ }, defaultNoPredicateReturn);
472
+ }
473
+ isAlertDefinitionForRowChangeEvent(alertDefinition) {
474
+ return (this.isAlertDefinitionForAddedRowChangeEvent(alertDefinition) ||
475
+ this.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition));
476
+ }
477
+ showAlertForDefinitions(cellDataChangedInfo, alertDefinitions = []) {
478
+ alertDefinitions.forEach((alertDefinition) => {
479
+ const alert = ObjectFactory_1.default.CreateCellChangedAlert(this.getAdaptableApi().alertApi.internalApi.getAlertMessageTitle(alertDefinition, cellDataChangedInfo), this.getAdaptableApi().alertApi.internalApi.getAlertDescription(alertDefinition, cellDataChangedInfo), alertDefinition, cellDataChangedInfo);
480
+ this.getAdaptableApi().alertApi.showAdaptableAlert(alert);
481
+ });
482
+ }
483
+ }
484
+ exports.AlertInternalApi = AlertInternalApi;
@@ -0,0 +1,24 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ import { CalculatedColumn } from '../../PredefinedConfig/CalculatedColumnState';
3
+ export declare class CalculatedColumnInternalApi extends ApiBase {
4
+ /**
5
+ * Returns all the references in the AdaptableState of the given CalculatedColumn
6
+ * @param calculatedColumn CalculatedColumn to be checked
7
+ */
8
+ getCalculatedColumnModuleReferences(calculatedColumn: CalculatedColumn): string[];
9
+ /**
10
+ * Returns all Calculated Columns whose Expression contains the ColumnId
11
+ * @param columnId ColumnId to check
12
+ */
13
+ getCalculatedColumnsReferencingColumnId(columnId: string): CalculatedColumn[];
14
+ /**
15
+ * Gets any ColumnIds referenced in a Calculated Column
16
+ * @param calculatedColumn Calculated Column to check
17
+ */
18
+ getReferencedColumnIdsForCalculatedColumn(calculatedColumn: CalculatedColumn): string[];
19
+ /**
20
+ * Gets any ColumnIds referenced in a Calculated Column
21
+ * @param calculatedColumnId CalculatedColumnId to check
22
+ */
23
+ getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId: string): string[];
24
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CalculatedColumnInternalApi = void 0;
4
+ const ApiBase_1 = require("../Implementation/ApiBase");
5
+ class CalculatedColumnInternalApi extends ApiBase_1.ApiBase {
6
+ /**
7
+ * Returns all the references in the AdaptableState of the given CalculatedColumn
8
+ * @param calculatedColumn CalculatedColumn to be checked
9
+ */
10
+ getCalculatedColumnModuleReferences(calculatedColumn) {
11
+ const references = [];
12
+ this.adaptable.adaptableModules.forEach((module) => {
13
+ if (module
14
+ .getModuleCalculatedColumnReferences()
15
+ .some((moduleReference) => moduleReference.Uuid === calculatedColumn.Uuid)) {
16
+ references.push(module.moduleInfo.FriendlyName);
17
+ }
18
+ });
19
+ return references;
20
+ }
21
+ /**
22
+ * Returns all Calculated Columns whose Expression contains the ColumnId
23
+ * @param columnId ColumnId to check
24
+ */
25
+ getCalculatedColumnsReferencingColumnId(columnId) {
26
+ const calcColumns = [];
27
+ this.getCalculatedColumnApi()
28
+ .getCalculatedColumns()
29
+ .forEach((calculatedColumn) => {
30
+ if (this.getQueryLanguageApi().internalApi.isColumnReferencedInExpression(columnId, this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query))) {
31
+ calcColumns.push(calculatedColumn);
32
+ }
33
+ });
34
+ return calcColumns;
35
+ }
36
+ /**
37
+ * Gets any ColumnIds referenced in a Calculated Column
38
+ * @param calculatedColumn Calculated Column to check
39
+ */
40
+ getReferencedColumnIdsForCalculatedColumn(calculatedColumn) {
41
+ const columnIds = this.adaptable.api.queryLanguageApi.getColumnsFromExpression(this.adaptable.api.queryLanguageApi.getAdaptableQueryExpression(calculatedColumn.Query));
42
+ return columnIds;
43
+ }
44
+ /**
45
+ * Gets any ColumnIds referenced in a Calculated Column
46
+ * @param calculatedColumnId CalculatedColumnId to check
47
+ */
48
+ getReferencedColumnIdsForCalculatedColumnId(calculatedColumnId) {
49
+ const calculatedColumn = this.adaptable.api.calculatedColumnApi
50
+ .getCalculatedColumns()
51
+ .find((cc) => cc.ColumnId == calculatedColumnId);
52
+ if (calculatedColumn) {
53
+ return this.getReferencedColumnIdsForCalculatedColumn(calculatedColumn);
54
+ }
55
+ }
56
+ }
57
+ exports.CalculatedColumnInternalApi = CalculatedColumnInternalApi;
@@ -0,0 +1,33 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ import { Column } from '@ag-grid-community/core';
3
+ export declare class ColumnInternalApi extends ApiBase {
4
+ /**
5
+ * Retrieves 'ColumnType' property for a given Column
6
+ * @param columnId Column to use
7
+ */
8
+ getAgGridColumnType(columnId: string): string | string[];
9
+ /**
10
+ * Retrieves a list providing the Friendly Name / Caption for all columns
11
+ */
12
+ getAllColumnFriendlyNames(): string[];
13
+ /**
14
+ * Retrieves AG Grid's field property for the column
15
+ * @param columnId columnId to look up
16
+ */
17
+ getAgGridColumnFieldForAdaptableColumn(columnId: string): string;
18
+ /**
19
+ * Retrieves AG Grid's column for an Adaptable column
20
+ * @param columnId columnId to look up
21
+ */
22
+ getAgGridColumnForAdaptableColumn(columnId: string): Column;
23
+ /**
24
+ * Does Column use AdapTable's Filter Form
25
+ * @param columnId Column to Check
26
+ */
27
+ usesAdaptableFilterForm(columnId: string): boolean;
28
+ /**
29
+ * Does Column use AdapTable's Quick Filter
30
+ * @param columnId Column to Check
31
+ */
32
+ usesAdaptableQuickFilter(columnId: string): boolean;
33
+ }
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ColumnInternalApi = void 0;
4
+ const ApiBase_1 = require("../Implementation/ApiBase");
5
+ class ColumnInternalApi extends ApiBase_1.ApiBase {
6
+ /**
7
+ * Retrieves 'ColumnType' property for a given Column
8
+ * @param columnId Column to use
9
+ */
10
+ getAgGridColumnType(columnId) {
11
+ return this.adaptable.getAgGridColumnType(columnId);
12
+ }
13
+ /**
14
+ * Retrieves a list providing the Friendly Name / Caption for all columns
15
+ */
16
+ getAllColumnFriendlyNames() {
17
+ return this.getColumnApi()
18
+ .getColumns()
19
+ .map((c) => {
20
+ return c.friendlyName;
21
+ });
22
+ }
23
+ /**
24
+ * Retrieves AG Grid's field property for the column
25
+ * @param columnId columnId to look up
26
+ */
27
+ getAgGridColumnFieldForAdaptableColumn(columnId) {
28
+ const agGridColumn = this.getAgGridColumnForAdaptableColumn(columnId);
29
+ return agGridColumn.getColDef().field || '';
30
+ }
31
+ /**
32
+ * Retrieves AG Grid's column for an Adaptable column
33
+ * @param columnId columnId to look up
34
+ */
35
+ getAgGridColumnForAdaptableColumn(columnId) {
36
+ return this.adaptable.getAgGridColumnForColumnId(columnId);
37
+ }
38
+ /**
39
+ * Does Column use AdapTable's Filter Form
40
+ * @param columnId Column to Check
41
+ */
42
+ usesAdaptableFilterForm(columnId) {
43
+ const useAdaptableFilterForm = this.getFilterOptions().useAdaptableFilterForm;
44
+ if (useAdaptableFilterForm == null || useAdaptableFilterForm == false) {
45
+ return false;
46
+ }
47
+ if (Array.isArray(useAdaptableFilterForm) && !useAdaptableFilterForm.includes(columnId)) {
48
+ return false;
49
+ }
50
+ return true;
51
+ }
52
+ /**
53
+ * Does Column use AdapTable's Quick Filter
54
+ * @param columnId Column to Check
55
+ */
56
+ usesAdaptableQuickFilter(columnId) {
57
+ const useAdaptableQuickFilter = this.getFilterOptions().useAdaptableQuickFilter;
58
+ if (useAdaptableQuickFilter == null || useAdaptableQuickFilter == false) {
59
+ return false;
60
+ }
61
+ if (Array.isArray(useAdaptableQuickFilter) && !useAdaptableQuickFilter.includes(columnId)) {
62
+ return false;
63
+ }
64
+ return true;
65
+ }
66
+ }
67
+ exports.ColumnInternalApi = ColumnInternalApi;
@@ -0,0 +1,6 @@
1
+ import { ApiBase } from '../Implementation/ApiBase';
2
+ import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
3
+ import { ColumnValuesComparer } from '../../AdaptableOptions/GeneralOptions';
4
+ export declare class CustomSortInternalApi extends ApiBase {
5
+ getCustomSortComparer(column: AdaptableColumn): ColumnValuesComparer | undefined;
6
+ }