@adaptabletools/adaptable 24.0.1 → 24.0.3

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 (331) hide show
  1. package/devtools.d.ts +506 -5
  2. package/devtools.js +11 -1
  3. package/index.css +15 -5
  4. package/package.json +1 -1
  5. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
  6. package/src/AdaptableOptions/DataImportOptions.d.ts +1 -1
  7. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  8. package/src/AdaptableState/Common/AdaptableFormat.d.ts +2 -10
  9. package/src/AdaptableState/Common/RowSummary.d.ts +2 -0
  10. package/src/AdaptableState/LayoutState.d.ts +1 -1
  11. package/src/Api/Implementation/AlertApiImpl.js +2 -0
  12. package/src/Api/Internal/CalculatedColumnInternalApi.js +25 -3
  13. package/src/Api/Internal/ExportInternalApi.d.ts +2 -0
  14. package/src/Api/Internal/ExportInternalApi.js +39 -3
  15. package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -2
  16. package/src/Api/Internal/FormatColumnInternalApi.js +15 -7
  17. package/src/Api/Internal/LayoutInternalApi.d.ts +11 -1
  18. package/src/Api/Internal/LayoutInternalApi.js +34 -3
  19. package/src/Api/Internal/NoteInternalApi.d.ts +12 -0
  20. package/src/Api/Internal/NoteInternalApi.js +11 -0
  21. package/src/EnvVars.d.ts +1 -0
  22. package/src/EnvVars.js +1 -0
  23. package/src/Redux/Store/AdaptableStore.js +4 -7
  24. package/src/Strategy/FlashingCellModule.js +2 -0
  25. package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
  26. package/src/Utilities/Services/CalculatedColumnExpressionService.js +15 -0
  27. package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +7 -0
  28. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +17 -1
  29. package/src/Utilities/Services/QueryLanguageService.d.ts +11 -1
  30. package/src/Utilities/Services/QueryLanguageService.js +47 -2
  31. package/src/Utilities/Services/RowSummaryService.d.ts +2 -0
  32. package/src/Utilities/Services/RowSummaryService.js +6 -1
  33. package/src/Utilities/license/instanceLicense.d.ts +12 -0
  34. package/src/Utilities/license/instanceLicense.js +10 -0
  35. package/src/Utilities/license/licenseStatus.d.ts +26 -0
  36. package/src/Utilities/license/licenseStatus.js +72 -0
  37. package/src/View/Components/CellPopup/index.js +15 -10
  38. package/src/View/GridInfo/GridInfoPopup.js +6 -1
  39. package/src/View/Layout/TransposedPopup.js +1 -0
  40. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +3 -5
  41. package/src/View/Layout/Wizard/sections/AggregationsSection.js +10 -24
  42. package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -1
  43. package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.d.ts +5 -1
  44. package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.js +6 -3
  45. package/src/agGrid/AdaptableAgGrid.d.ts +7 -3
  46. package/src/agGrid/AdaptableAgGrid.js +144 -78
  47. package/src/agGrid/AdaptableFilterHandler.d.ts +2 -0
  48. package/src/agGrid/AdaptableFilterHandler.js +34 -0
  49. package/src/agGrid/AgGridAdapter.d.ts +9 -0
  50. package/src/agGrid/AgGridAdapter.js +23 -12
  51. package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
  52. package/src/agGrid/AgGridColumnAdapter.js +124 -78
  53. package/src/agGrid/AgGridExportAdapter.d.ts +5 -0
  54. package/src/agGrid/AgGridExportAdapter.js +31 -0
  55. package/src/agGrid/AgGridMenuAdapter.js +1 -1
  56. package/src/agGrid/applyGlobalGridOptions.d.ts +9 -0
  57. package/src/agGrid/applyGlobalGridOptions.js +36 -0
  58. package/src/agGrid/cellRenderers/BadgeRenderer.js +22 -0
  59. package/src/agGrid/columnMinMaxCache.d.ts +33 -0
  60. package/src/agGrid/columnMinMaxCache.js +50 -0
  61. package/src/devTools/PerfStore.d.ts +218 -0
  62. package/src/devTools/PerfStore.js +717 -0
  63. package/src/devTools/index.d.ts +33 -0
  64. package/src/devTools/index.js +132 -56
  65. package/src/devTools/logBuffer.d.ts +17 -0
  66. package/src/devTools/logBuffer.js +33 -0
  67. package/src/devTools/memoryInfo.d.ts +15 -0
  68. package/src/devTools/memoryInfo.js +229 -0
  69. package/src/devTools/memoryRoots.d.ts +41 -0
  70. package/src/devTools/memoryRoots.js +136 -0
  71. package/src/devTools/perfContext.d.ts +5 -0
  72. package/src/devTools/perfContext.js +155 -0
  73. package/src/devTools/perfInstrumentation.d.ts +13 -0
  74. package/src/devTools/perfInstrumentation.js +78 -0
  75. package/src/env.js +2 -2
  76. package/src/layout-manager/src/LayoutManagerModel.d.ts +3 -1
  77. package/src/layout-manager/src/expandAllRowGroups.d.ts +6 -0
  78. package/src/layout-manager/src/expandAllRowGroups.js +13 -0
  79. package/src/layout-manager/src/index.js +18 -10
  80. package/src/setupDevTools.js +560 -106
  81. package/tsconfig.esm.tsbuildinfo +1 -1
  82. package/vendor/aql/api/QueryLanguageApi.d.ts +2 -1
  83. package/vendor/aql/api/QueryLanguageApi.d.ts.map +1 -1
  84. package/vendor/aql/api/QueryLanguageApi.js +28 -108
  85. package/vendor/aql/api/QueryLanguageApi.js.map +1 -1
  86. package/vendor/aql/contract/index.js +0 -34
  87. package/vendor/aql/contract/index.js.map +1 -1
  88. package/vendor/aql/corpus/corpusExpressions.js +0 -13
  89. package/vendor/aql/corpus/corpusExpressions.js.map +1 -1
  90. package/vendor/aql/corpus/corpusFixture.js +0 -7
  91. package/vendor/aql/corpus/corpusFixture.js.map +1 -1
  92. package/vendor/aql/draft/index.js +0 -4
  93. package/vendor/aql/draft/index.js.map +1 -1
  94. package/vendor/aql/evaluate.js +0 -22
  95. package/vendor/aql/evaluate.js.map +1 -1
  96. package/vendor/aql/evaluator/ExpressionEvaluationError.js +0 -4
  97. package/vendor/aql/evaluator/ExpressionEvaluationError.js.map +1 -1
  98. package/vendor/aql/evaluator/ExpressionNaError.js +0 -4
  99. package/vendor/aql/evaluator/ExpressionNaError.js.map +1 -1
  100. package/vendor/aql/evaluator/evaluateNode.js +0 -23
  101. package/vendor/aql/evaluator/evaluateNode.js.map +1 -1
  102. package/vendor/aql/functions/dateUtils.js +0 -63
  103. package/vendor/aql/functions/dateUtils.js.map +1 -1
  104. package/vendor/aql/functions/numberUtils.js +0 -12
  105. package/vendor/aql/functions/numberUtils.js.map +1 -1
  106. package/vendor/aql/functions/operatorFunctions.js +0 -13
  107. package/vendor/aql/functions/operatorFunctions.js.map +1 -1
  108. package/vendor/aql/functions/scalar/functions/AND.js +0 -5
  109. package/vendor/aql/functions/scalar/functions/AND.js.map +1 -1
  110. package/vendor/aql/functions/scalar/functions/ANY_CHANGE.js +0 -4
  111. package/vendor/aql/functions/scalar/functions/ANY_CHANGE.js.map +1 -1
  112. package/vendor/aql/functions/scalar/functions/ANY_CONTAINS.js +0 -4
  113. package/vendor/aql/functions/scalar/functions/ANY_CONTAINS.js.map +1 -1
  114. package/vendor/aql/functions/scalar/functions/AVG.js +0 -1
  115. package/vendor/aql/functions/scalar/functions/AVG.js.map +1 -1
  116. package/vendor/aql/functions/scalar/functions/CASE.js +2 -2
  117. package/vendor/aql/functions/scalar/functions/CASE.js.map +1 -1
  118. package/vendor/aql/functions/scalar/functions/COL.js +0 -2
  119. package/vendor/aql/functions/scalar/functions/COL.js.map +1 -1
  120. package/vendor/aql/functions/scalar/functions/CONTAINS.js +0 -3
  121. package/vendor/aql/functions/scalar/functions/CONTAINS.js.map +1 -1
  122. package/vendor/aql/functions/scalar/functions/DATE.js +0 -2
  123. package/vendor/aql/functions/scalar/functions/DATE.js.map +1 -1
  124. package/vendor/aql/functions/scalar/functions/ENDS_WITH.js +0 -1
  125. package/vendor/aql/functions/scalar/functions/ENDS_WITH.js.map +1 -1
  126. package/vendor/aql/functions/scalar/functions/EQ.js +0 -5
  127. package/vendor/aql/functions/scalar/functions/EQ.js.map +1 -1
  128. package/vendor/aql/functions/scalar/functions/GT.js +0 -3
  129. package/vendor/aql/functions/scalar/functions/GT.js.map +1 -1
  130. package/vendor/aql/functions/scalar/functions/GTE.js +0 -3
  131. package/vendor/aql/functions/scalar/functions/GTE.js.map +1 -1
  132. package/vendor/aql/functions/scalar/functions/IF.js +0 -5
  133. package/vendor/aql/functions/scalar/functions/IF.js.map +1 -1
  134. package/vendor/aql/functions/scalar/functions/IFERROR.js +0 -4
  135. package/vendor/aql/functions/scalar/functions/IFERROR.js.map +1 -1
  136. package/vendor/aql/functions/scalar/functions/IFNA.js +0 -5
  137. package/vendor/aql/functions/scalar/functions/IFNA.js.map +1 -1
  138. package/vendor/aql/functions/scalar/functions/IN.d.ts.map +1 -1
  139. package/vendor/aql/functions/scalar/functions/IN.js +54 -11
  140. package/vendor/aql/functions/scalar/functions/IN.js.map +1 -1
  141. package/vendor/aql/functions/scalar/functions/IS_BLANK.js +0 -1
  142. package/vendor/aql/functions/scalar/functions/IS_BLANK.js.map +1 -1
  143. package/vendor/aql/functions/scalar/functions/IS_DIFFERENT_DAY.js +0 -1
  144. package/vendor/aql/functions/scalar/functions/IS_DIFFERENT_DAY.js.map +1 -1
  145. package/vendor/aql/functions/scalar/functions/IS_NOT_BLANK.js +0 -1
  146. package/vendor/aql/functions/scalar/functions/IS_NOT_BLANK.js.map +1 -1
  147. package/vendor/aql/functions/scalar/functions/LT.js +0 -3
  148. package/vendor/aql/functions/scalar/functions/LT.js.map +1 -1
  149. package/vendor/aql/functions/scalar/functions/LTE.js +0 -3
  150. package/vendor/aql/functions/scalar/functions/LTE.js.map +1 -1
  151. package/vendor/aql/functions/scalar/functions/NA.js +0 -3
  152. package/vendor/aql/functions/scalar/functions/NA.js.map +1 -1
  153. package/vendor/aql/functions/scalar/functions/NOT_CONTAINS.js +0 -1
  154. package/vendor/aql/functions/scalar/functions/NOT_CONTAINS.js.map +1 -1
  155. package/vendor/aql/functions/scalar/functions/NOT_IN.js +0 -3
  156. package/vendor/aql/functions/scalar/functions/NOT_IN.js.map +1 -1
  157. package/vendor/aql/functions/scalar/functions/OR.js +0 -4
  158. package/vendor/aql/functions/scalar/functions/OR.js.map +1 -1
  159. package/vendor/aql/functions/scalar/functions/PRODUCT.js +0 -6
  160. package/vendor/aql/functions/scalar/functions/PRODUCT.js.map +1 -1
  161. package/vendor/aql/functions/scalar/functions/QUERY.js +0 -1
  162. package/vendor/aql/functions/scalar/functions/QUERY.js.map +1 -1
  163. package/vendor/aql/functions/scalar/functions/REGEX.js +0 -1
  164. package/vendor/aql/functions/scalar/functions/REGEX.js.map +1 -1
  165. package/vendor/aql/functions/scalar/functions/SCOPE.js +0 -4
  166. package/vendor/aql/functions/scalar/functions/SCOPE.js.map +1 -1
  167. package/vendor/aql/functions/scalar/functions/STARTS_WITH.js +0 -1
  168. package/vendor/aql/functions/scalar/functions/STARTS_WITH.js.map +1 -1
  169. package/vendor/aql/functions/scalar/functions/SUB.js +0 -1
  170. package/vendor/aql/functions/scalar/functions/SUB.js.map +1 -1
  171. package/vendor/aql/functions/scalar/functions/SUM.js +0 -5
  172. package/vendor/aql/functions/scalar/functions/SUM.js.map +1 -1
  173. package/vendor/aql/functions/scalar/helpers.js +0 -3
  174. package/vendor/aql/functions/scalar/helpers.js.map +1 -1
  175. package/vendor/aql/functions/shared/FIELD.js +0 -3
  176. package/vendor/aql/functions/shared/FIELD.js.map +1 -1
  177. package/vendor/aql/functions/shared/VAR.js +0 -4
  178. package/vendor/aql/functions/shared/VAR.js.map +1 -1
  179. package/vendor/aql/functions/shared/index.js +0 -9
  180. package/vendor/aql/functions/shared/index.js.map +1 -1
  181. package/vendor/aql/functions/stringUtils.js +0 -25
  182. package/vendor/aql/functions/stringUtils.js.map +1 -1
  183. package/vendor/aql/functions/utils.js +0 -20
  184. package/vendor/aql/functions/utils.js.map +1 -1
  185. package/vendor/aql/host/access.js +0 -2
  186. package/vendor/aql/host/access.js.map +1 -1
  187. package/vendor/aql/host/createHostExpressionContext.js +0 -25
  188. package/vendor/aql/host/createHostExpressionContext.js.map +1 -1
  189. package/vendor/aql/host/createObjectDataHost.js +0 -9
  190. package/vendor/aql/host/createObjectDataHost.js.map +1 -1
  191. package/vendor/aql/index.js +0 -2
  192. package/vendor/aql/index.js.map +1 -1
  193. package/vendor/aql/normalize/canonicalize.js +0 -7
  194. package/vendor/aql/normalize/canonicalize.js.map +1 -1
  195. package/vendor/aql/normalize/migrateExpression.js +0 -8
  196. package/vendor/aql/normalize/migrateExpression.js.map +1 -1
  197. package/vendor/aql/normalize/names.js +0 -72
  198. package/vendor/aql/normalize/names.js.map +1 -1
  199. package/vendor/aql/normalize/normalizeAst.js +0 -102
  200. package/vendor/aql/normalize/normalizeAst.js.map +1 -1
  201. package/vendor/aql/normalize/print.js +0 -35
  202. package/vendor/aql/normalize/print.js.map +1 -1
  203. package/vendor/aql/operator/primitiveSlots.js +0 -4
  204. package/vendor/aql/operator/primitiveSlots.js.map +1 -1
  205. package/vendor/aql/operator/resolve.js +0 -18
  206. package/vendor/aql/operator/resolve.js.map +1 -1
  207. package/vendor/aql/parser/parser.js +4 -125
  208. package/vendor/aql/parser/parser.js.map +1 -1
  209. package/vendor/aql/plan/catalogue.js +0 -35
  210. package/vendor/aql/plan/catalogue.js.map +1 -1
  211. package/vendor/aql/plan/compile.js +0 -68
  212. package/vendor/aql/plan/compile.js.map +1 -1
  213. package/vendor/aql/plan/deepMap.js +0 -16
  214. package/vendor/aql/plan/deepMap.js.map +1 -1
  215. package/vendor/aql/plan/execute.js +0 -91
  216. package/vendor/aql/plan/execute.js.map +1 -1
  217. package/vendor/aql/plan/magnitudeLiteral.js +0 -29
  218. package/vendor/aql/plan/magnitudeLiteral.js.map +1 -1
  219. package/vendor/aql/plan/observable.js +0 -31
  220. package/vendor/aql/plan/observable.js.map +1 -1
  221. package/vendor/aql/plan/observableFixture.js +0 -3
  222. package/vendor/aql/plan/observableFixture.js.map +1 -1
  223. package/vendor/aql/plan/operators.js +0 -35
  224. package/vendor/aql/plan/operators.js.map +1 -1
  225. package/vendor/aql/plan/outer.js +0 -16
  226. package/vendor/aql/plan/outer.js.map +1 -1
  227. package/vendor/aql/predicate/mapExpressionToQlPredicate.js +1 -46
  228. package/vendor/aql/predicate/mapExpressionToQlPredicate.js.map +1 -1
  229. package/vendor/aql/predicate/mapQlPredicateToExpression.js +0 -13
  230. package/vendor/aql/predicate/mapQlPredicateToExpression.js.map +1 -1
  231. package/vendor/aql/store/computedValueStore.js +0 -35
  232. package/vendor/aql/store/computedValueStore.js.map +1 -1
  233. package/vendor/aql/store/history/clock.js +0 -1
  234. package/vendor/aql/store/history/clock.js.map +1 -1
  235. package/vendor/aql/store/history/historyStore.js +0 -14
  236. package/vendor/aql/store/history/historyStore.js.map +1 -1
  237. package/vendor/aql/store/history/monotonicDeque.js +0 -9
  238. package/vendor/aql/store/history/monotonicDeque.js.map +1 -1
  239. package/vendor/aql/store/history/operators.js +0 -13
  240. package/vendor/aql/store/history/operators.js.map +1 -1
  241. package/vendor/aql/store/history/ringBuffer.js +0 -12
  242. package/vendor/aql/store/history/ringBuffer.js.map +1 -1
  243. package/vendor/aql/store/history/rowSeries.js +0 -17
  244. package/vendor/aql/store/history/rowSeries.js.map +1 -1
  245. package/vendor/aql/store/history/types.js +0 -18
  246. package/vendor/aql/store/history/types.js.map +1 -1
  247. package/vendor/aql/tokenizer/tokenizer.js +0 -3
  248. package/vendor/aql/tokenizer/tokenizer.js.map +1 -1
  249. package/vendor/aql/types.js +0 -27
  250. package/vendor/aql/types.js.map +1 -1
  251. package/vendor/aql/utils/astUtils.js +0 -1
  252. package/vendor/aql/utils/astUtils.js.map +1 -1
  253. package/vendor/aql/utils/dependencyCycle.js +0 -5
  254. package/vendor/aql/utils/dependencyCycle.js.map +1 -1
  255. package/vendor/aql/validation/classifyExpression.js +0 -4
  256. package/vendor/aql/validation/classifyExpression.js.map +1 -1
  257. package/vendor/aql/validation/functionMetadata.js +0 -31
  258. package/vendor/aql/validation/functionMetadata.js.map +1 -1
  259. package/vendor/aql/validation/validateAqlExpression.js +2 -81
  260. package/vendor/aql/validation/validateAqlExpression.js.map +1 -1
  261. package/vendor/aql/validation/validateExpressionTypes.js +0 -64
  262. package/vendor/aql/validation/validateExpressionTypes.js.map +1 -1
  263. package/vendor/components/Button/index.js +0 -6
  264. package/vendor/components/Button/index.js.map +1 -1
  265. package/vendor/components/ColorField/index.js +0 -18
  266. package/vendor/components/ColorField/index.js.map +1 -1
  267. package/vendor/components/ColorPicker/colorPickerTab.js +0 -6
  268. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -1
  269. package/vendor/components/ColorPicker/index.js +1 -66
  270. package/vendor/components/ColorPicker/index.js.map +1 -1
  271. package/vendor/components/ColorPicker/themeColors.js +0 -55
  272. package/vendor/components/ColorPicker/themeColors.js.map +1 -1
  273. package/vendor/components/Combobox/VirtualizedList.js +0 -5
  274. package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
  275. package/vendor/components/Combobox/comboboxUtils.js +0 -5
  276. package/vendor/components/Combobox/comboboxUtils.js.map +1 -1
  277. package/vendor/components/Combobox/index.js +7 -106
  278. package/vendor/components/Combobox/index.js.map +1 -1
  279. package/vendor/components/Combobox/useScrollNearEnd.js +0 -6
  280. package/vendor/components/Combobox/useScrollNearEnd.js.map +1 -1
  281. package/vendor/components/DropdownButton/index.js +0 -5
  282. package/vendor/components/DropdownButton/index.js.map +1 -1
  283. package/vendor/components/NumberInput/index.js +0 -10
  284. package/vendor/components/NumberInput/index.js.map +1 -1
  285. package/vendor/components/Radio/index.d.ts.map +1 -1
  286. package/vendor/components/Radio/index.js +1 -1
  287. package/vendor/components/Radio/index.js.map +1 -1
  288. package/vendor/components/Resizable/index.d.ts +14 -9
  289. package/vendor/components/Resizable/index.d.ts.map +1 -1
  290. package/vendor/components/Resizable/index.js +26 -26
  291. package/vendor/components/Resizable/index.js.map +1 -1
  292. package/vendor/components/Resizable/resizableUtils.d.ts +24 -13
  293. package/vendor/components/Resizable/resizableUtils.d.ts.map +1 -1
  294. package/vendor/components/Resizable/resizableUtils.js +13 -27
  295. package/vendor/components/Resizable/resizableUtils.js.map +1 -1
  296. package/vendor/components/SearchInput/index.js +0 -5
  297. package/vendor/components/SearchInput/index.js.map +1 -1
  298. package/vendor/components/Tree/TreeDropdown/index.js +3 -139
  299. package/vendor/components/Tree/TreeDropdown/index.js.map +1 -1
  300. package/vendor/components/Tree/treeUtils.js +0 -4
  301. package/vendor/components/Tree/treeUtils.js.map +1 -1
  302. package/vendor/components/index.css +12 -5
  303. package/vendor/components/index.js +0 -5
  304. package/vendor/components/index.js.map +1 -1
  305. package/vendor/components/lib/useProperty.js +0 -18
  306. package/vendor/components/lib/useProperty.js.map +1 -1
  307. package/vendor/components/twMerge.js +0 -2
  308. package/vendor/components/twMerge.js.map +1 -1
  309. package/vendor/components/twUtils.js +3 -12
  310. package/vendor/components/twUtils.js.map +1 -1
  311. package/vendor/components/ui/alert-dialog.js +0 -4
  312. package/vendor/components/ui/alert-dialog.js.map +1 -1
  313. package/vendor/components/ui/calendar.js +1 -9
  314. package/vendor/components/ui/calendar.js.map +1 -1
  315. package/vendor/components/ui/combobox.js +3 -39
  316. package/vendor/components/ui/combobox.js.map +1 -1
  317. package/vendor/components/ui/dialog.js +0 -4
  318. package/vendor/components/ui/dialog.js.map +1 -1
  319. package/vendor/components/ui/input-group.js +3 -12
  320. package/vendor/components/ui/input-group.js.map +1 -1
  321. package/vendor/components/ui/input.js +1 -1
  322. package/vendor/components/ui/input.js.map +1 -1
  323. package/vendor/components/ui/select.js +1 -1
  324. package/vendor/components/ui/select.js.map +1 -1
  325. package/vendor/components/ui/tabs.js +0 -3
  326. package/vendor/components/ui/tabs.js.map +1 -1
  327. package/vendor/components/ui/textarea.js +1 -1
  328. package/vendor/components/ui/textarea.js.map +1 -1
  329. package/vendor/components/ui/tooltip.d.ts.map +1 -1
  330. package/vendor/components/ui/tooltip.js +3 -1
  331. package/vendor/components/ui/tooltip.js.map +1 -1
@@ -1,3 +1,5 @@
1
+ import { getPerfRecorder } from '../../devTools/PerfStore';
2
+ import { recordExpressionEvaluation } from '../../devTools/perfInstrumentation';
1
3
  import { acquireObservableSlots, canonicalizeExpression, createAggregationCatalogue, createAqlEngine, DEFAULT_ROW_SET_KIND, ExpressionEvaluationError, findDependencyCycle, getNodesFromExpression, hostGetFirstRowRef, mapDataTypeToStaticType, parse, validateAqlExpression, validateExpressionTypes, } from "../../../vendor/aql/index.js";
2
4
  import { createComputedValueStore, createHistoryStore, createSystemClock, } from "../../../vendor/aql/store/index.js";
3
5
  import { inferExpressionKindFromText, } from '../../AdaptableState/Common/AdaptableQuery';
@@ -11,7 +13,7 @@ import { PROTECTED_CORE_EXPRESSION_FUNCTIONS } from '../../aql/resolveCustomExpr
11
13
  import { resolveCustomExpressionFunctions } from '../../aql/resolveCustomExpressionFunctions';
12
14
  import { getTypedKeys } from '../Extensions/TypeExtensions';
13
15
  const VALID = { isValid: true, errorMessage: '' };
14
- const ROW_EVALUATOR_CACHE_SIZE = 64;
16
+ const ROW_EVALUATOR_CACHE_SIZE = 150;
15
17
  const CANONICAL_TEXT_CACHE_SIZE = 1024;
16
18
  const DEFAULT_MAX_WINDOW_MS = 28_800_000;
17
19
  const DEFAULT_MAX_HISTORY_PER_CELL = 1000;
@@ -54,6 +56,7 @@ export class QueryLanguageService {
54
56
  engineCache = new Map();
55
57
  hostEngineCache = new WeakMap();
56
58
  rowEvaluatorCache = new Map();
59
+ rowEvaluatorEvictions = 0;
57
60
  hostRowEvaluatorCache = new WeakMap();
58
61
  canonicalTextCache = new Map();
59
62
  functionsGeneration = 0;
@@ -90,6 +93,20 @@ export class QueryLanguageService {
90
93
  this.aggregationCatalogueCache.clear();
91
94
  this.engineCache.clear();
92
95
  }
96
+ getDiagnostics() {
97
+ return {
98
+ validationCache: this.validationCache.size,
99
+ expressionKindCache: this.expressionKindCache.size,
100
+ dependenciesCache: this.dependenciesCache.size,
101
+ engineCache: this.engineCache.size,
102
+ rowEvaluatorCache: this.rowEvaluatorCache.size,
103
+ rowEvaluatorCacheLimit: ROW_EVALUATOR_CACHE_SIZE,
104
+ rowEvaluatorEvictions: this.rowEvaluatorEvictions,
105
+ canonicalTextCache: this.canonicalTextCache.size,
106
+ canonicalTextCacheLimit: CANONICAL_TEXT_CACHE_SIZE,
107
+ history: this._historyStore ? this._historyStore.stats() : undefined,
108
+ };
109
+ }
93
110
  toCacheExpression(expression) {
94
111
  const cached = this.canonicalTextCache.get(expression);
95
112
  if (cached !== undefined) {
@@ -352,6 +369,7 @@ export class QueryLanguageService {
352
369
  const oldestKey = cache.keys().next().value;
353
370
  if (oldestKey !== undefined) {
354
371
  cache.delete(oldestKey);
372
+ this.rowEvaluatorEvictions++;
355
373
  this.releaseObservableSeries(oldestKey);
356
374
  }
357
375
  }
@@ -417,19 +435,46 @@ export class QueryLanguageService {
417
435
  this.adaptableApi.logError('QueryLanguageService.evaluateBooleanExpression was called with an undefined expression');
418
436
  return false;
419
437
  }
420
- return this.getPreparedRowEvaluator(expression, module, evalContext?.host)(rowNode, this.toPerRowConfig({
438
+ const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
439
+ const start = recorder ? performance.now() : 0;
440
+ const result = this.getPreparedRowEvaluator(expression, module, evalContext?.host)(rowNode, this.toPerRowConfig({
421
441
  rowNode,
422
442
  dataChangedEvent: evalContext?.dataChangedEvent,
423
443
  pivotResultColumn: evalContext?.pivotResultColumn,
424
444
  columnScope: evalContext?.columnScope,
425
445
  cellValueOverride: evalContext?.cellValueOverride,
426
446
  }));
447
+ if (recorder) {
448
+ recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
449
+ }
450
+ return result;
451
+ }
452
+ perfAdaptableId;
453
+ getAdaptableIdForPerf() {
454
+ if (this.perfAdaptableId === undefined) {
455
+ try {
456
+ this.perfAdaptableId = this.adaptableApi.optionsApi.getAdaptableId();
457
+ }
458
+ catch {
459
+ return undefined;
460
+ }
461
+ }
462
+ return this.perfAdaptableId;
427
463
  }
428
464
  evaluateScalarExpression(expression, module, rowNode, evalContext) {
429
465
  return this.evaluateBooleanExpression(expression, module, rowNode, evalContext);
430
466
  }
431
467
  prepareBooleanRowEvaluator(expression, module) {
432
468
  const evaluator = this.getPreparedRowEvaluator(expression, module);
469
+ const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
470
+ if (recorder) {
471
+ return (rowNode) => {
472
+ const start = performance.now();
473
+ const result = evaluator(rowNode);
474
+ recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
475
+ return result;
476
+ };
477
+ }
433
478
  return (rowNode) => evaluator(rowNode);
434
479
  }
435
480
  executeValueExpression(expression, module, evalContext) {
@@ -1,4 +1,5 @@
1
1
  import { AdaptableApi, TableLayout } from '../../types';
2
+ import type { RowSummariesSkippedReason } from '../../Api/Internal/LayoutInternalApi';
2
3
  /**
3
4
  * Row Summary cells are computed-value store nodes with an explicit
4
5
  * rowSetSpec (`visible` when IncludeOnlyFilteredRows, else `all`).
@@ -9,6 +10,7 @@ export declare class RowSummaryService {
9
10
  private nodeHandles;
10
11
  private isEvaluating;
11
12
  previousRowSummaries: any;
13
+ previousSkippedReason: RowSummariesSkippedReason | undefined;
12
14
  previousLayout: TableLayout | null;
13
15
  constructor(api: AdaptableApi);
14
16
  onAdaptableReady(): void;
@@ -9,6 +9,7 @@ export class RowSummaryService {
9
9
  nodeHandles = new Map();
10
10
  isEvaluating = false;
11
11
  previousRowSummaries;
12
+ previousSkippedReason;
12
13
  previousLayout;
13
14
  constructor(api) {
14
15
  this.api = api;
@@ -144,10 +145,14 @@ export class RowSummaryService {
144
145
  this.nodeHandles.delete(key);
145
146
  }
146
147
  }
147
- if (this.previousRowSummaries && isEqual(rowSummariesResults, this.previousRowSummaries)) {
148
+ const skippedReason = this.api.layoutApi.internalApi.getRowSummariesSkippedReason(currentLayout);
149
+ if (this.previousRowSummaries &&
150
+ isEqual(rowSummariesResults, this.previousRowSummaries) &&
151
+ skippedReason === this.previousSkippedReason) {
148
152
  return;
149
153
  }
150
154
  this.api.internalApi.dispatchReduxAction(RowSummarySet(rowSummariesResults));
151
155
  this.previousRowSummaries = rowSummariesResults;
156
+ this.previousSkippedReason = skippedReason;
152
157
  }
153
158
  }
@@ -0,0 +1,12 @@
1
+ import type { AdaptableApi } from '../../Api/AdaptableApi';
2
+ import { LicenseStatus } from './licenseStatus';
3
+ /**
4
+ * The licence key an AdapTable instance runs with: a page-wide
5
+ * `ADAPTABLE_LICENSE_KEY` global wins over `AdaptableOptions.licenseKey`.
6
+ */
7
+ export declare function getInstanceLicenseKey(api: AdaptableApi): string | undefined;
8
+ /**
9
+ * What the instance's licence key means for this AdapTable version. Safe to display
10
+ * and to send to AdapTable DevTools: it never contains the key.
11
+ */
12
+ export declare function getInstanceLicenseStatus(api: AdaptableApi): LicenseStatus;
@@ -0,0 +1,10 @@
1
+ import { ADAPTABLE_PUBLISH_DATE } from '../../EnvVars';
2
+ import { getLicenseStatus } from './licenseStatus';
3
+ export function getInstanceLicenseKey(api) {
4
+ const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
5
+ return (globalObject.ADAPTABLE_LICENSE_KEY ||
6
+ api.optionsApi.getLicenseKey());
7
+ }
8
+ export function getInstanceLicenseStatus(api) {
9
+ return getLicenseStatus(getInstanceLicenseKey(api), ADAPTABLE_PUBLISH_DATE);
10
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * What a licence key means, without any of its content: shown in place of the key
3
+ * in Grid Info and AdapTable DevTools.
4
+ */
5
+ export type LicenseStatus = {
6
+ kind: 'none';
7
+ } | {
8
+ kind: 'invalid';
9
+ } | {
10
+ kind: 'valid' | 'expired';
11
+ trial: boolean;
12
+ /** Licence end date, `yyyy-mm-dd` */
13
+ endDate: string;
14
+ /** Whole days left (`valid`) or since expiry (`expired`) */
15
+ days: number;
16
+ /**
17
+ * `expired` only: whether this AdapTable version was released before the licence
18
+ * expired. Omitted when the release date is unknown.
19
+ *
20
+ * Only a commercial licence keeps working for the versions it covers; an expired
21
+ * trial is restricted either way.
22
+ */
23
+ coversThisVersion?: boolean;
24
+ };
25
+ export declare function getLicenseStatus(licenseKey: string | undefined, publishedAt?: number | Date, now?: Date): LicenseStatus;
26
+ export declare function formatLicenseStatus(status: LicenseStatus): string;
@@ -0,0 +1,72 @@
1
+ import { decode } from './decode';
2
+ const DAY_IN_MS = 1000 * 60 * 60 * 24;
3
+ function toDateString(date) {
4
+ const pad = (value) => String(value).padStart(2, '0');
5
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
6
+ }
7
+ function calendarDaysBetween(from, to) {
8
+ const fromMidnight = new Date(from);
9
+ fromMidnight.setHours(0, 0, 0, 0);
10
+ const toMidnight = new Date(to);
11
+ toMidnight.setHours(0, 0, 0, 0);
12
+ return Math.round((toMidnight.getTime() - fromMidnight.getTime()) / DAY_IN_MS);
13
+ }
14
+ export function getLicenseStatus(licenseKey, publishedAt, now = new Date()) {
15
+ if (!licenseKey) {
16
+ return { kind: 'none' };
17
+ }
18
+ let end;
19
+ let trial;
20
+ try {
21
+ ({ end, trial } = decode(licenseKey));
22
+ }
23
+ catch {
24
+ return { kind: 'invalid' };
25
+ }
26
+ if (Number.isNaN(end.getTime())) {
27
+ return { kind: 'invalid' };
28
+ }
29
+ const endDate = toDateString(end);
30
+ const days = Math.abs(calendarDaysBetween(now, end));
31
+ if (end >= now) {
32
+ return { kind: 'valid', trial, endDate, days };
33
+ }
34
+ const status = { kind: 'expired', trial, endDate, days };
35
+ if (publishedAt != null) {
36
+ status.coversThisVersion = end > new Date(publishedAt);
37
+ }
38
+ return status;
39
+ }
40
+ function formatDate(endDate) {
41
+ const [year, month, day] = endDate.split('-').map(Number);
42
+ return new Date(year, month - 1, day).toLocaleDateString('en-GB', {
43
+ day: 'numeric',
44
+ month: 'short',
45
+ year: 'numeric',
46
+ });
47
+ }
48
+ function pluralDays(days) {
49
+ return days === 1 ? '1 day' : `${days} days`;
50
+ }
51
+ export function formatLicenseStatus(status) {
52
+ if (status.kind === 'none') {
53
+ return 'Not present';
54
+ }
55
+ if (status.kind === 'invalid') {
56
+ return 'Invalid';
57
+ }
58
+ const type = status.trial ? 'Trial' : 'Commercial';
59
+ const date = formatDate(status.endDate);
60
+ if (status.kind === 'valid') {
61
+ const left = status.days === 0 ? 'expires today' : `${pluralDays(status.days)} left`;
62
+ return `${type}, valid until ${date} (${left})`;
63
+ }
64
+ const ago = status.days === 0 ? 'today' : `${pluralDays(status.days)} ago`;
65
+ const text = `${type}, expired on ${date} (${ago})`;
66
+ if (status.trial || status.coversThisVersion == null) {
67
+ return text;
68
+ }
69
+ return status.coversThisVersion
70
+ ? `${text}; covers this AdapTable version`
71
+ : `${text}; does not cover this AdapTable version (released after expiry)`;
72
+ }
@@ -32,12 +32,18 @@ const DEFAULT_ROW_ALIGN_POSITION = [
32
32
  ['TopCenter', 'BottomCenter'],
33
33
  ['BottomCenter', 'TopCenter'],
34
34
  ];
35
- function resolveRowAnchorElement(primaryKeyValue) {
36
- const centerRow = document.querySelector(`.ag-center-cols-container [row-id="${primaryKeyValue}"]`);
37
- if (centerRow) {
38
- return centerRow;
35
+ const escapeAttributeValue = (value) => {
36
+ const text = String(value);
37
+ return typeof CSS !== 'undefined' && typeof CSS.escape === 'function'
38
+ ? CSS.escape(text)
39
+ : text.replace(/["\\]/g, '\\$&');
40
+ };
41
+ function queryGridElement(gridRoot, selector) {
42
+ const ownRootWrapper = gridRoot?.querySelector('.ag-root-wrapper');
43
+ if (!ownRootWrapper) {
44
+ return document.querySelector(selector);
39
45
  }
40
- return document.querySelector(`[row-id="${primaryKeyValue}"]`);
46
+ return (Array.from(ownRootWrapper.querySelectorAll(selector)).find((element) => element.closest('.ag-root-wrapper') === ownRootWrapper) ?? null);
41
47
  }
42
48
  export const CellPopup = React.forwardRef((props, ref) => {
43
49
  ensurePortalElement(props.className);
@@ -47,11 +53,10 @@ export const CellPopup = React.forwardRef((props, ref) => {
47
53
  });
48
54
  const OVERLAY_ID = 'cell-overlay';
49
55
  const showCellPopupContent = () => {
50
- const cellSelector = `[row-id="${props.primaryKeyValue}"] [col-id="${props.columnId}"]`;
51
- const alignTo = props.anchor === 'row'
52
- ? resolveRowAnchorElement(props.primaryKeyValue) ??
53
- document.querySelector(cellSelector)
54
- : document.querySelector(cellSelector);
56
+ const gridRoot = adaptable.agGridAdapter.getAgGridRootElement();
57
+ const rowSelector = `.ag-row[row-id="${escapeAttributeValue(props.primaryKeyValue)}"]`;
58
+ const cellSelector = `${rowSelector} .ag-cell[col-id="${escapeAttributeValue(props.columnId)}"]`;
59
+ const alignTo = queryGridElement(gridRoot, props.anchor === 'row' ? rowSelector : cellSelector);
55
60
  if (!alignTo) {
56
61
  adaptable.logger.consoleError(`Cell not found for selector "${cellSelector}". Unable to display popup.`);
57
62
  return;
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
3
3
  import { ADAPTABLE_VERSION } from '../../EnvVars';
4
+ import { formatLicenseStatus } from '../../Utilities/license/licenseStatus';
5
+ import { getInstanceLicenseStatus } from '../../Utilities/license/instanceLicense';
4
6
  import { AG_GRID_VERSION } from '../../agGrid/AgGridModulesAdapter';
5
7
  import { DataSource, InfiniteTableGrid } from '../../components/InfiniteTable';
6
8
  import Panel from '../../components/Panel';
@@ -39,7 +41,10 @@ export const GridInfoPopup = (props) => {
39
41
  if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
40
42
  summaryKeyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
41
43
  }
42
- summaryKeyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
44
+ summaryKeyValuePairs.push({
45
+ Key: 'License',
46
+ Value: formatLicenseStatus(getInstanceLicenseStatus(api)),
47
+ });
43
48
  summaryKeyValuePairs.push({ Key: 'Adaptable Id', Value: api.optionsApi.getAdaptableId() });
44
49
  summaryKeyValuePairs.push({ Key: 'State Key', Value: api.optionsApi.getAdaptableStateKey() });
45
50
  summaryKeyValuePairs.push({ Key: 'User Name', Value: api.optionsApi.getUserName() });
@@ -71,6 +71,7 @@ function buildTransposedGridOptions({ transposedRowsAndColumns, elevatedColumnId
71
71
  ...transposedRowsAndColumns.transposedColumns.map((col) => ({ field: col.colId, headerName: col.header })),
72
72
  ],
73
73
  rowData: transposedRowsAndColumns.transposedRows,
74
+ getRowId: (params) => params.data[TRANSPOSED_FIRST_COLUMN_FIELD],
74
75
  sideBar: false,
75
76
  };
76
77
  }
@@ -1,12 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { Layout, TableLayout } from '../../../../../types';
3
3
  import { AggregationColumnValue } from '../../../../AdaptableState/Common/AggregationColumns';
4
- export type GrandTotalRowPosition = 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom';
5
- export declare const GRAND_TOTAL_ROW_LABELS: Record<GrandTotalRowPosition | 'off', string>;
4
+ import { GRAND_TOTAL_ROW_LABELS, GrandTotalRowPosition, getGrandTotalRowKey, getGrandTotalRowLabel } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
5
+ export { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel };
6
+ export type { GrandTotalRowPosition };
6
7
  export declare const GRAND_TOTAL_ROW_DESCRIPTIONS: Record<GrandTotalRowPosition | 'off', string>;
7
8
  export declare const GRAND_TOTAL_ROW_OPTIONS: (GrandTotalRowPosition | 'off')[];
8
- export declare function getGrandTotalRowKey(layout: Layout): GrandTotalRowPosition | 'off';
9
- export declare function getGrandTotalRowLabel(layout: Layout): string;
10
9
  export declare function getGrandTotalRowDescription(layout: Layout): string;
11
10
  export declare function getAggFuncSummaryLabel(columnId: string, aggFunc: AggregationColumnValue, aggregationColumnsMap: Record<string, string>): string;
12
11
  export declare const isAggregationsSectionValid: (data: Layout) => true | string;
@@ -18,4 +17,3 @@ interface AggregationsSectionProps {
18
17
  layoutWizardMode?: 'create' | 'edit';
19
18
  }
20
19
  export declare const AggregationsSection: React.FunctionComponent<AggregationsSectionProps>;
21
- export {};
@@ -15,17 +15,12 @@ import { Box, Flex } from '../../../../components/Flex';
15
15
  import { SingleSelect } from '../../../../components/Select';
16
16
  import { LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS, LAYOUT_WIZARD_COLUMN_LIST_OPTION_CLASS, LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS, } from '../../Utilities/layoutWizardColumns';
17
17
  import Radio, { RadioGroup } from '../../../../components/Radio';
18
+ import HelpBlock from '../../../../components/HelpBlock';
18
19
  import { TypeRadio } from '../../../Wizard/TypeRadio';
19
- import { getTableAggregationSummaryValues } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
20
+ import { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel, getTableAggregationSummaryValues, } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
20
21
  import { renderSummaryStringTags } from '../../../Wizard/SummaryColorTag';
21
22
  const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
22
- export const GRAND_TOTAL_ROW_LABELS = {
23
- off: 'None',
24
- top: 'Top',
25
- bottom: 'Bottom',
26
- pinnedTop: 'Pinned Top',
27
- pinnedBottom: 'Pinned Bottom',
28
- };
23
+ export { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel };
29
24
  export const GRAND_TOTAL_ROW_DESCRIPTIONS = {
30
25
  off: 'Grand Total Row is not displayed in the grid',
31
26
  top: 'Grand Total Row is displayed at the top of the grid',
@@ -40,16 +35,6 @@ export const GRAND_TOTAL_ROW_OPTIONS = [
40
35
  'pinnedTop',
41
36
  'pinnedBottom',
42
37
  ];
43
- export function getGrandTotalRowKey(layout) {
44
- const value = layout.GrandTotalRow;
45
- if (value == null || value === false) {
46
- return 'off';
47
- }
48
- return value;
49
- }
50
- export function getGrandTotalRowLabel(layout) {
51
- return GRAND_TOTAL_ROW_LABELS[getGrandTotalRowKey(layout)];
52
- }
53
38
  export function getGrandTotalRowDescription(layout) {
54
39
  return GRAND_TOTAL_ROW_DESCRIPTIONS[getGrandTotalRowKey(layout)];
55
40
  }
@@ -161,6 +146,7 @@ export const AggregationsSection = (props) => {
161
146
  const allAggregableColumns = adaptable.api.columnApi.getAggregatableColumns();
162
147
  const allColumns = adaptable.api.columnApi.getUIAvailableColumns();
163
148
  const numberColumns = adaptable.api.columnApi.getNumericColumns();
149
+ const hasActiveRowSummaries = (layout.RowSummaries ?? []).some((rowSummary) => !rowSummary.IsSuspended);
164
150
  const allAggregatableColumnIds = allAggregableColumns.map((col) => col.columnId);
165
151
  (layout.TableAggregationColumns || []).forEach((agg) => {
166
152
  if (!allAggregatableColumnIds.includes(agg.ColumnId)) {
@@ -226,10 +212,10 @@ export const AggregationsSection = (props) => {
226
212
  ? 'Hide Function Name in Header'
227
213
  : 'Show Function Name in Header' }), summary: _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: layout.SuppressAggFuncInHeader
228
214
  ? 'Hide Function Name in Header'
229
- : 'Show Function Name in Header' }) }), children: _jsxs(RadioGroup, { orientation: "vertical", value: layout.SuppressAggFuncInHeader ?? false, onRadioChange: handleSuppressAggFuncInHeader, children: [_jsx(Radio, { value: false, children: "Show Aggregation function names" }), _jsx(Radio, { value: true, children: "Hide Aggregation function names" })] }) }), _jsx(CollapsibleWizardCard, { ...bindCard('grand-total'), surface: "panel", "data-name": "grand-total-row", title: "Grand Total Row", help: "Set position of the Grand Total Row in the grid", collapsedHelp: "Position of the Grand Total Row in the grid", compactSummary: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }), summary: _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }) }), children: _jsx(RadioGroup, { orientation: "vertical", value: getGrandTotalRowKey(layout), onRadioChange: (key) => {
230
- props.onChange({
231
- ...layout,
232
- GrandTotalRow: key === 'off' ? null : key,
233
- });
234
- }, children: GRAND_TOTAL_ROW_OPTIONS.map((key) => (_jsx(TypeRadio, { value: key, text: GRAND_TOTAL_ROW_LABELS[key], description: GRAND_TOTAL_ROW_DESCRIPTIONS[key] }, key))) }) })] }));
215
+ : 'Show Function Name in Header' }) }), children: _jsxs(RadioGroup, { orientation: "vertical", value: layout.SuppressAggFuncInHeader ?? false, onRadioChange: handleSuppressAggFuncInHeader, children: [_jsx(Radio, { value: false, children: "Show Aggregation function names" }), _jsx(Radio, { value: true, children: "Hide Aggregation function names" })] }) }), _jsxs(CollapsibleWizardCard, { ...bindCard('grand-total'), surface: "panel", "data-name": "grand-total-row", title: "Grand Total Row", help: "Set position of the Grand Total Row in the grid", collapsedHelp: "Position of the Grand Total Row in the grid", compactSummary: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }), summary: _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }) }), children: [_jsx(RadioGroup, { orientation: "vertical", value: getGrandTotalRowKey(layout), onRadioChange: (key) => {
216
+ props.onChange({
217
+ ...layout,
218
+ GrandTotalRow: key === 'off' ? null : key,
219
+ });
220
+ }, children: GRAND_TOTAL_ROW_OPTIONS.map((key) => (_jsx(TypeRadio, { value: key, text: GRAND_TOTAL_ROW_LABELS[key], description: GRAND_TOTAL_ROW_DESCRIPTIONS[key] }, key))) }), hasActiveRowSummaries && (_jsx(HelpBlock, { "data-name": "grand-total-row-summaries-note", className: "twa:mt-2", children: "The Row Summaries of this Layout are not displayed when the Grand Total Row is Pinned Top or Pinned Bottom" }))] })] }));
235
221
  };
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import * as React from 'react';
3
3
  import { CheckBox } from '../../../../components/CheckBox';
4
4
  import FormLayout, { FormRow } from '../../../../components/FormLayout';
5
+ import HelpBlock from '../../../../components/HelpBlock';
5
6
  import SimpleButton from '../../../../components/SimpleButton';
6
7
  import { ButtonNew } from '../../../Components/Buttons/ButtonNew';
7
8
  import { Card } from '../../../../components/Card';
@@ -194,6 +195,7 @@ export const RowSummarySection = (props) => {
194
195
  const adaptable = useAdaptable();
195
196
  const { data: layout } = useOnePageAdaptableWizardContext();
196
197
  const rowSummaries = layout.RowSummaries ?? [];
198
+ const skippedReason = adaptable.api.layoutApi.internalApi.getRowSummariesSkippedReason(layout);
197
199
  const availableScalarExpressions = React.useMemo(() => {
198
200
  const sytemExpressions = adaptable.api.internalApi
199
201
  .getQueryLanguageService()
@@ -235,7 +237,9 @@ export const RowSummarySection = (props) => {
235
237
  }
236
238
  }
237
239
  };
238
- return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }), _jsx(Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: _jsx(ButtonNew, { onClick: handleAddRowSummary, children: "Add Row Summary" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0 twa:flex-1 twa:overflow-y-auto", children: rowSummaries.map((rowSummary, index) => {
240
+ return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }), skippedReason && (_jsx(HelpBlock, { "data-name": "row-summaries-not-displayed", className: "twa:mb-2 twa:shrink-0", children: skippedReason === 'rowPinning'
241
+ ? 'Row Summaries are not displayed, because Row Pinning is enabled in the grid'
242
+ : 'Row Summaries are not displayed while the Grand Total Row is pinned; choose Top or Bottom for the Grand Total Row in the Aggregations section to display them' })), _jsx(Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: _jsx(ButtonNew, { onClick: handleAddRowSummary, children: "Add Row Summary" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0 twa:flex-1 twa:overflow-y-auto", children: rowSummaries.map((rowSummary, index) => {
239
243
  const cardBinding = bindCard(rowSummaryCardId(index), { fillAvailable: true });
240
244
  return (_jsx(CollapsibleWizardCard, { ...cardBinding, surface: "panel", "data-name": `row-summary-${index}`, title: `Row Summary ${index + 1}`, help: "Configure position, filters, and column aggregations for this summary row", collapsedHelp: false, compactSummary: _jsx(RowSummaryPositionTag, { position: rowSummary.Position }), headerVisual: !cardBinding.expanded ? (_jsx(RowSummaryPositionTag, { position: rowSummary.Position })) : undefined, headerActions: _jsxs(_Fragment, { children: [cardBinding.expanded ? (_jsx(SuspendToggleButton, { className: objectListActionButtonClassName('suspend'), onSuspend: () => {
241
245
  const newSummaries = [...rowSummaries];
@@ -1,4 +1,8 @@
1
- import { AdaptableApi, PivotLayout, TableLayout } from '../../../types';
1
+ import { AdaptableApi, LayoutBase, PivotLayout, TableLayout } from '../../../types';
2
+ export type GrandTotalRowPosition = 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom';
3
+ export declare const GRAND_TOTAL_ROW_LABELS: Record<GrandTotalRowPosition | 'off', string>;
4
+ export declare function getGrandTotalRowKey(layout: LayoutBase): GrandTotalRowPosition | 'off';
5
+ export declare function getGrandTotalRowLabel(layout: LayoutBase): string;
2
6
  export declare function getTableAggregationSummaryValues(layout: TableLayout, api: AdaptableApi): string[];
3
7
  export declare function getPivotAggregationSummaryValues(layout: PivotLayout, api: AdaptableApi): string[];
4
8
  export declare function getLayoutTableAggregationViewItems(layout: TableLayout, api: AdaptableApi): {
@@ -1,6 +1,6 @@
1
1
  import { WEIGHTED_AVERAGE_AGG_FN_NAME } from '../../../AdaptableState/Common/AggregationColumns';
2
2
  const IGNORED_AGG_COLUMN_IDS = new Set(['Source', 'Uuid', 'AdaptableVersion']);
3
- const GRAND_TOTAL_ROW_LABELS = {
3
+ export const GRAND_TOTAL_ROW_LABELS = {
4
4
  off: 'None',
5
5
  top: 'Top',
6
6
  bottom: 'Bottom',
@@ -12,14 +12,17 @@ const PIVOT_LAYOUT_TOTAL_LABELS = {
12
12
  before: 'Before',
13
13
  after: 'After',
14
14
  };
15
- function getGrandTotalRowKey(layout) {
15
+ export function getGrandTotalRowKey(layout) {
16
16
  const value = layout.GrandTotalRow;
17
17
  if (value == null || value === false) {
18
18
  return 'off';
19
19
  }
20
+ if (value === true) {
21
+ return 'top';
22
+ }
20
23
  return value;
21
24
  }
22
- function getGrandTotalRowLabel(layout) {
25
+ export function getGrandTotalRowLabel(layout) {
23
26
  return GRAND_TOTAL_ROW_LABELS[getGrandTotalRowKey(layout)];
24
27
  }
25
28
  function getPivotLayoutTotalKey(value) {
@@ -111,7 +111,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
111
111
  private listenerGlobalChartingChanges;
112
112
  private listenerCellEditingStarted;
113
113
  private listenerFirstDataRendered;
114
- private listenerPivotChanged;
115
114
  private listenerCellSelectionChanged;
116
115
  private listenerSortChanged;
117
116
  private listenerColumnGroupOpened;
@@ -356,6 +355,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
356
355
  * `dataChanged`. Snapshot old data first and synthesize `onRowDataChanged`
357
356
  * for those nodes after the transaction (see #off_screen_row_update).
358
357
  */
358
+ private countTransactionForPerf;
359
359
  private applyAgGridTransaction;
360
360
  /**
361
361
  * This method internally differentiates between server-side and client-side row model
@@ -480,6 +480,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
480
480
  * There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
481
481
  */
482
482
  private performPostEditChecks;
483
+ private performPostEditChecksNow;
483
484
  /**
484
485
  * Collect format / freetext / styled / observable / relative-styled columns
485
486
  * into one scope. Edited-row-only ids stay in `columnIds`; `ALL_ROWS()`
@@ -496,9 +497,12 @@ export declare class AdaptableAgGrid implements IAdaptable {
496
497
  private checkFreeTextColumnChanges;
497
498
  private checkFormatColumnExpressionStyleChanges;
498
499
  private checkIfChangedCellCurrentlySelected;
499
- private resetMinMaxCachedValueForColumn;
500
+ private updateMinMaxCachedValueForColumn;
500
501
  private filterOnDataChange;
501
- refreshLayout(): void;
502
+ refreshLayout(config?: {
503
+ columnsChanged?: boolean;
504
+ }): void;
505
+ private isAnyFilterActive;
502
506
  private isRowGroupDifferentInLayout;
503
507
  private hasPivotTotalsInLayout;
504
508
  private onLayoutChange;