@finos/legend-application-repl 0.0.21 → 0.0.23

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 (291) hide show
  1. package/lib/{stores/CompletionResult.d.ts → __lib__/LegendREPLEvent.d.ts} +4 -6
  2. package/lib/__lib__/LegendREPLEvent.d.ts.map +1 -0
  3. package/lib/__lib__/LegendREPLEvent.js +21 -0
  4. package/lib/__lib__/LegendREPLEvent.js.map +1 -0
  5. package/lib/{stores/dataCube/DataCubePanelState.js → __lib__/LegendREPLSetting.d.ts} +3 -6
  6. package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -0
  7. package/lib/{components/grid/TDSLambdaBuilder.d.ts → __lib__/LegendREPLSetting.js} +5 -4
  8. package/lib/__lib__/LegendREPLSetting.js.map +1 -0
  9. package/lib/application/{LegendREPLGridClient.d.ts → LegendREPL.d.ts} +10 -10
  10. package/lib/application/LegendREPL.d.ts.map +1 -0
  11. package/lib/application/{LegendREPLGridClient.js → LegendREPL.js} +10 -15
  12. package/lib/application/LegendREPL.js.map +1 -0
  13. package/lib/application/{LegendREPLGridClientApplicationConfig.d.ts → LegendREPLApplicationConfig.d.ts} +4 -4
  14. package/lib/application/LegendREPLApplicationConfig.d.ts.map +1 -0
  15. package/lib/application/{LegendREPLGridClientApplicationConfig.js → LegendREPLApplicationConfig.js} +2 -2
  16. package/lib/application/LegendREPLApplicationConfig.js.map +1 -0
  17. package/lib/application/{LegendREPLGridClientPluginManager.d.ts → LegendREPLPluginManager.d.ts} +4 -4
  18. package/lib/application/LegendREPLPluginManager.d.ts.map +1 -0
  19. package/lib/application/{LegendREPLGridClientPluginManager.js → LegendREPLPluginManager.js} +3 -3
  20. package/lib/application/LegendREPLPluginManager.js.map +1 -0
  21. package/lib/components/{Core_LegendREPLGridClientApplicationPlugin.d.ts → Core_LegendREPLApplicationPlugin.d.ts} +3 -3
  22. package/lib/components/Core_LegendREPLApplicationPlugin.d.ts.map +1 -0
  23. package/lib/components/{Core_LegendREPLGridClientApplicationPlugin.js → Core_LegendREPLApplicationPlugin.js} +12 -7
  24. package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -0
  25. package/lib/components/{AgGrid.d.ts → LegendREPLApplication.d.ts} +8 -6
  26. package/lib/components/LegendREPLApplication.d.ts.map +1 -0
  27. package/lib/components/LegendREPLApplication.js +32 -0
  28. package/lib/components/LegendREPLApplication.js.map +1 -0
  29. package/lib/components/{LegendREPLGridClientFrameworkProvider.d.ts → LegendREPLFrameworkProvider.d.ts} +4 -4
  30. package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -0
  31. package/lib/components/{LegendREPLGridClientFrameworkProvider.js → LegendREPLFrameworkProvider.js} +9 -9
  32. package/lib/components/LegendREPLFrameworkProvider.js.map +1 -0
  33. package/lib/components/{REPLGridClientStoreProvider.d.ts → REPLStoreProvider.d.ts} +5 -5
  34. package/lib/components/REPLStoreProvider.d.ts.map +1 -0
  35. package/lib/components/{REPLGridClientStoreProvider.js → REPLStoreProvider.js} +9 -9
  36. package/lib/components/REPLStoreProvider.js.map +1 -0
  37. package/lib/components/dataCube/DataCube.d.ts +19 -0
  38. package/lib/components/dataCube/DataCube.d.ts.map +1 -0
  39. package/lib/components/dataCube/DataCube.js +33 -0
  40. package/lib/components/dataCube/DataCube.js.map +1 -0
  41. package/lib/components/{REPLGridClient.d.ts → dataCube/editor/DataCubeEditor.d.ts} +5 -9
  42. package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -0
  43. package/lib/components/dataCube/editor/DataCubeEditor.js +54 -0
  44. package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -0
  45. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts +19 -0
  46. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -0
  47. package/lib/components/dataCube/{DataCubeQueryTextEditor.js → editor/DataCubeEditorCodePanel.js} +20 -20
  48. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -0
  49. package/lib/components/dataCube/{DataCubeGridEditor.d.ts → editor/DataCubeEditorSortPanel.d.ts} +4 -4
  50. package/lib/components/dataCube/editor/DataCubeEditorSortPanel.d.ts.map +1 -0
  51. package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js +61 -0
  52. package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js.map +1 -0
  53. package/lib/components/dataCube/{DataCubeQueryTextEditor.d.ts → grid/DataCubeGrid.d.ts} +4 -4
  54. package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -0
  55. package/lib/components/dataCube/grid/DataCubeGrid.js +59 -0
  56. package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -0
  57. package/lib/grid.css +1 -1
  58. package/lib/index.css +2 -2
  59. package/lib/index.css.map +1 -1
  60. package/lib/index.d.ts +1 -1
  61. package/lib/index.d.ts.map +1 -1
  62. package/lib/index.js +8 -8
  63. package/lib/index.js.map +1 -1
  64. package/lib/package.json +3 -3
  65. package/lib/repl.css +1 -1
  66. package/lib/server/REPLServerClient.d.ts +11 -13
  67. package/lib/server/REPLServerClient.d.ts.map +1 -1
  68. package/lib/server/REPLServerClient.js +27 -15
  69. package/lib/server/REPLServerClient.js.map +1 -1
  70. package/lib/server/models/DataCubeEngineModels.d.ts +50 -0
  71. package/lib/server/models/DataCubeEngineModels.d.ts.map +1 -0
  72. package/lib/server/models/DataCubeEngineModels.js +39 -0
  73. package/lib/server/models/DataCubeEngineModels.js.map +1 -0
  74. package/lib/server/models/DataCubeQuery.d.ts +41 -0
  75. package/lib/server/models/DataCubeQuery.d.ts.map +1 -0
  76. package/lib/server/models/DataCubeQuery.js +78 -0
  77. package/lib/server/models/DataCubeQuery.js.map +1 -0
  78. package/lib/stores/{LegendREPLGridClientApplicationPlugin.d.ts → LegendREPLApplicationPlugin.d.ts} +4 -4
  79. package/lib/stores/LegendREPLApplicationPlugin.d.ts.map +1 -0
  80. package/lib/stores/{LegendREPLGridClientApplicationPlugin.js → LegendREPLApplicationPlugin.js} +2 -2
  81. package/lib/stores/LegendREPLApplicationPlugin.js.map +1 -0
  82. package/lib/stores/LegendREPLBaseStore.d.ts +25 -0
  83. package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -0
  84. package/lib/stores/{LegendREPLGridClientBaseStore.js → LegendREPLBaseStore.js} +2 -2
  85. package/lib/stores/LegendREPLBaseStore.js.map +1 -0
  86. package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts +49 -0
  87. package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts.map +1 -0
  88. package/lib/stores/dataCube/DataCubeMetaModelConst.js +57 -0
  89. package/lib/stores/dataCube/DataCubeMetaModelConst.js.map +1 -0
  90. package/lib/stores/dataCube/DataCubeState.d.ts +18 -23
  91. package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
  92. package/lib/stores/dataCube/DataCubeState.js +31 -181
  93. package/lib/stores/dataCube/DataCubeState.js.map +1 -1
  94. package/lib/stores/{REPLGridClientStore.d.ts → dataCube/DataCubeStore.d.ts} +7 -7
  95. package/lib/stores/dataCube/DataCubeStore.d.ts.map +1 -0
  96. package/lib/stores/{REPLGridClientStore.js → dataCube/DataCubeStore.js} +5 -4
  97. package/lib/stores/dataCube/DataCubeStore.js.map +1 -0
  98. package/lib/stores/dataCube/core/DataCubeEngine.d.ts +29 -0
  99. package/lib/stores/dataCube/core/DataCubeEngine.d.ts.map +1 -0
  100. package/lib/stores/dataCube/core/DataCubeEngine.js +47 -0
  101. package/lib/stores/dataCube/core/DataCubeEngine.js.map +1 -0
  102. package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts +37 -0
  103. package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts.map +1 -0
  104. package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js +269 -0
  105. package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js.map +1 -0
  106. package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts +19 -0
  107. package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts.map +1 -0
  108. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +98 -0
  109. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -0
  110. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts +73 -0
  111. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts.map +1 -0
  112. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js +56 -0
  113. package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js.map +1 -0
  114. package/lib/stores/dataCube/{DataCubePanelState.d.ts → core/DataCubeQuerySnapshotManager.d.ts} +11 -6
  115. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -0
  116. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js +46 -0
  117. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js.map +1 -0
  118. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +27 -0
  119. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -0
  120. package/lib/{components/grid/REPLGridServerResult.js → stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js} +18 -10
  121. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -0
  122. package/lib/stores/dataCube/{DataCubeQueryEditorState.d.ts → editor/DataCubeEditorCodeState.d.ts} +12 -2
  123. package/lib/stores/dataCube/editor/DataCubeEditorCodeState.d.ts.map +1 -0
  124. package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js +87 -0
  125. package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js.map +1 -0
  126. package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts +28 -0
  127. package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts.map +1 -0
  128. package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js +17 -0
  129. package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js.map +1 -0
  130. package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts +46 -0
  131. package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts.map +1 -0
  132. package/lib/stores/dataCube/editor/DataCubeEditorSortState.js +133 -0
  133. package/lib/stores/dataCube/editor/DataCubeEditorSortState.js.map +1 -0
  134. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +44 -0
  135. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -0
  136. package/lib/stores/dataCube/editor/DataCubeEditorState.js +77 -0
  137. package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -0
  138. package/lib/{components/grid/ServerSideDataSource.d.ts → stores/dataCube/grid/DataCubeGridClientEngine.d.ts} +17 -14
  139. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -0
  140. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +96 -0
  141. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -0
  142. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts +19 -0
  143. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts.map +1 -0
  144. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js +224 -0
  145. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js.map +1 -0
  146. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +33 -0
  147. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -0
  148. package/lib/stores/dataCube/grid/DataCubeGridState.js +50 -0
  149. package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -0
  150. package/package.json +9 -9
  151. package/src/{Const.ts → __lib__/LegendREPLEvent.ts} +1 -16
  152. package/{lib/components/grid/REPLGridServerResult.d.ts → src/__lib__/LegendREPLSetting.ts} +3 -6
  153. package/src/application/LegendREPL.tsx +64 -0
  154. package/src/application/{LegendREPLGridClientApplicationConfig.ts → LegendREPLApplicationConfig.ts} +3 -3
  155. package/src/application/{LegendREPLGridClientPluginManager.ts → LegendREPLPluginManager.ts} +5 -5
  156. package/src/components/{Core_LegendREPLGridClientApplicationPlugin.tsx → Core_LegendREPLApplicationPlugin.tsx} +11 -6
  157. package/src/components/{LegendREPLGridClientApplication.tsx → LegendREPLApplication.tsx} +11 -28
  158. package/src/components/LegendREPLFrameworkProvider.tsx +57 -0
  159. package/src/components/{REPLGridClientStoreProvider.tsx → REPLStoreProvider.tsx} +17 -21
  160. package/src/components/dataCube/DataCube.tsx +63 -0
  161. package/src/components/dataCube/editor/DataCubeEditor.tsx +127 -0
  162. package/src/components/dataCube/{DataCubeQueryTextEditor.tsx → editor/DataCubeEditorCodePanel.tsx} +69 -76
  163. package/src/components/dataCube/editor/DataCubeEditorSortPanel.tsx +274 -0
  164. package/src/components/dataCube/grid/DataCubeGrid.tsx +77 -0
  165. package/src/index.tsx +12 -8
  166. package/src/server/REPLServerClient.ts +50 -78
  167. package/src/server/models/DataCubeEngineModels.ts +84 -0
  168. package/src/server/models/DataCubeQuery.ts +130 -0
  169. package/src/stores/{LegendREPLGridClientApplicationPlugin.ts → LegendREPLApplicationPlugin.ts} +4 -4
  170. package/src/stores/{LegendREPLGridClientBaseStore.ts → LegendREPLBaseStore.ts} +9 -9
  171. package/src/stores/dataCube/DataCubeMetaModelConst.ts +61 -0
  172. package/src/stores/dataCube/DataCubeState.ts +39 -303
  173. package/src/stores/{REPLGridClientStore.ts → dataCube/DataCubeStore.ts} +8 -6
  174. package/src/stores/dataCube/core/DataCubeEngine.ts +79 -0
  175. package/src/stores/dataCube/core/DataCubeQueryAnalyzer.ts +424 -0
  176. package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +151 -0
  177. package/src/stores/dataCube/core/DataCubeQuerySnapshot.ts +201 -0
  178. package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +67 -0
  179. package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +43 -0
  180. package/src/stores/dataCube/editor/DataCubeEditorCodeState.ts +166 -0
  181. package/src/{components/grid/REPLGridServerResult.ts → stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.ts} +14 -11
  182. package/src/stores/dataCube/editor/DataCubeEditorSortState.ts +198 -0
  183. package/src/stores/dataCube/editor/DataCubeEditorState.ts +94 -0
  184. package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +152 -0
  185. package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.ts +245 -0
  186. package/src/stores/dataCube/grid/DataCubeGridState.ts +62 -0
  187. package/tsconfig.json +33 -29
  188. package/lib/Const.d.ts +0 -32
  189. package/lib/Const.d.ts.map +0 -1
  190. package/lib/Const.js +0 -35
  191. package/lib/Const.js.map +0 -1
  192. package/lib/application/LegendREPLGridClient.d.ts.map +0 -1
  193. package/lib/application/LegendREPLGridClient.js.map +0 -1
  194. package/lib/application/LegendREPLGridClientApplicationConfig.d.ts.map +0 -1
  195. package/lib/application/LegendREPLGridClientApplicationConfig.js.map +0 -1
  196. package/lib/application/LegendREPLGridClientPluginManager.d.ts.map +0 -1
  197. package/lib/application/LegendREPLGridClientPluginManager.js.map +0 -1
  198. package/lib/components/AgGrid.d.ts.map +0 -1
  199. package/lib/components/AgGrid.js +0 -41
  200. package/lib/components/AgGrid.js.map +0 -1
  201. package/lib/components/Core_LegendREPLGridClientApplicationPlugin.d.ts.map +0 -1
  202. package/lib/components/Core_LegendREPLGridClientApplicationPlugin.js.map +0 -1
  203. package/lib/components/LegendREPLGridClientApplication.d.ts +0 -31
  204. package/lib/components/LegendREPLGridClientApplication.d.ts.map +0 -1
  205. package/lib/components/LegendREPLGridClientApplication.js +0 -39
  206. package/lib/components/LegendREPLGridClientApplication.js.map +0 -1
  207. package/lib/components/LegendREPLGridClientFrameworkProvider.d.ts.map +0 -1
  208. package/lib/components/LegendREPLGridClientFrameworkProvider.js.map +0 -1
  209. package/lib/components/REPLGridClient.d.ts.map +0 -1
  210. package/lib/components/REPLGridClient.js +0 -143
  211. package/lib/components/REPLGridClient.js.map +0 -1
  212. package/lib/components/REPLGridClientStoreProvider.d.ts.map +0 -1
  213. package/lib/components/REPLGridClientStoreProvider.js.map +0 -1
  214. package/lib/components/dataCube/DataCubeGridEditor.d.ts.map +0 -1
  215. package/lib/components/dataCube/DataCubeGridEditor.js +0 -37
  216. package/lib/components/dataCube/DataCubeGridEditor.js.map +0 -1
  217. package/lib/components/dataCube/DataCubeQueryTextEditor.d.ts.map +0 -1
  218. package/lib/components/dataCube/DataCubeQueryTextEditor.js.map +0 -1
  219. package/lib/components/grid/GridUtils.d.ts +0 -31
  220. package/lib/components/grid/GridUtils.d.ts.map +0 -1
  221. package/lib/components/grid/GridUtils.js +0 -174
  222. package/lib/components/grid/GridUtils.js.map +0 -1
  223. package/lib/components/grid/REPLGridServerResult.d.ts.map +0 -1
  224. package/lib/components/grid/REPLGridServerResult.js.map +0 -1
  225. package/lib/components/grid/ServerSideDataSource.d.ts.map +0 -1
  226. package/lib/components/grid/ServerSideDataSource.js +0 -109
  227. package/lib/components/grid/ServerSideDataSource.js.map +0 -1
  228. package/lib/components/grid/TDSLambdaBuilder.d.ts.map +0 -1
  229. package/lib/components/grid/TDSLambdaBuilder.js +0 -314
  230. package/lib/components/grid/TDSLambdaBuilder.js.map +0 -1
  231. package/lib/components/grid/TDSQuery.d.ts +0 -25
  232. package/lib/components/grid/TDSQuery.d.ts.map +0 -1
  233. package/lib/components/grid/TDSQuery.js +0 -32
  234. package/lib/components/grid/TDSQuery.js.map +0 -1
  235. package/lib/components/grid/TDSRequest.d.ts +0 -103
  236. package/lib/components/grid/TDSRequest.d.ts.map +0 -1
  237. package/lib/components/grid/TDSRequest.js +0 -172
  238. package/lib/components/grid/TDSRequest.js.map +0 -1
  239. package/lib/stores/CompletionResult.d.ts.map +0 -1
  240. package/lib/stores/CompletionResult.js +0 -26
  241. package/lib/stores/CompletionResult.js.map +0 -1
  242. package/lib/stores/LegendREPLGridClientApplicationPlugin.d.ts.map +0 -1
  243. package/lib/stores/LegendREPLGridClientApplicationPlugin.js.map +0 -1
  244. package/lib/stores/LegendREPLGridClientBaseStore.d.ts +0 -25
  245. package/lib/stores/LegendREPLGridClientBaseStore.d.ts.map +0 -1
  246. package/lib/stores/LegendREPLGridClientBaseStore.js.map +0 -1
  247. package/lib/stores/REPLGridClientStore.d.ts.map +0 -1
  248. package/lib/stores/REPLGridClientStore.js.map +0 -1
  249. package/lib/stores/dataCube/DataCubeConfigState.d.ts +0 -32
  250. package/lib/stores/dataCube/DataCubeConfigState.d.ts.map +0 -1
  251. package/lib/stores/dataCube/DataCubeConfigState.js +0 -62
  252. package/lib/stores/dataCube/DataCubeConfigState.js.map +0 -1
  253. package/lib/stores/dataCube/DataCubeGridState.d.ts +0 -39
  254. package/lib/stores/dataCube/DataCubeGridState.d.ts.map +0 -1
  255. package/lib/stores/dataCube/DataCubeGridState.js +0 -108
  256. package/lib/stores/dataCube/DataCubeGridState.js.map +0 -1
  257. package/lib/stores/dataCube/DataCubePanelState.d.ts.map +0 -1
  258. package/lib/stores/dataCube/DataCubePanelState.js.map +0 -1
  259. package/lib/stores/dataCube/DataCubePropertiesPanelState.d.ts +0 -34
  260. package/lib/stores/dataCube/DataCubePropertiesPanelState.d.ts.map +0 -1
  261. package/lib/stores/dataCube/DataCubePropertiesPanelState.js +0 -57
  262. package/lib/stores/dataCube/DataCubePropertiesPanelState.js.map +0 -1
  263. package/lib/stores/dataCube/DataCubeQueryEditorState.d.ts.map +0 -1
  264. package/lib/stores/dataCube/DataCubeQueryEditorState.js +0 -49
  265. package/lib/stores/dataCube/DataCubeQueryEditorState.js.map +0 -1
  266. package/lib/stores/dataCube/DataCubeQueryTextEditorState.d.ts +0 -25
  267. package/lib/stores/dataCube/DataCubeQueryTextEditorState.d.ts.map +0 -1
  268. package/lib/stores/dataCube/DataCubeQueryTextEditorState.js +0 -35
  269. package/lib/stores/dataCube/DataCubeQueryTextEditorState.js.map +0 -1
  270. package/lib/stores/dataCube/HPivotAndSortPanelState.d.ts +0 -40
  271. package/lib/stores/dataCube/HPivotAndSortPanelState.d.ts.map +0 -1
  272. package/lib/stores/dataCube/HPivotAndSortPanelState.js +0 -130
  273. package/lib/stores/dataCube/HPivotAndSortPanelState.js.map +0 -1
  274. package/src/application/LegendREPLGridClient.tsx +0 -72
  275. package/src/components/AgGrid.tsx +0 -59
  276. package/src/components/LegendREPLGridClientFrameworkProvider.tsx +0 -63
  277. package/src/components/REPLGridClient.tsx +0 -560
  278. package/src/components/dataCube/DataCubeGridEditor.tsx +0 -69
  279. package/src/components/grid/GridUtils.ts +0 -220
  280. package/src/components/grid/ServerSideDataSource.ts +0 -197
  281. package/src/components/grid/TDSLambdaBuilder.ts +0 -456
  282. package/src/components/grid/TDSQuery.ts +0 -37
  283. package/src/components/grid/TDSRequest.ts +0 -231
  284. package/src/stores/CompletionResult.ts +0 -30
  285. package/src/stores/dataCube/DataCubeConfigState.ts +0 -79
  286. package/src/stores/dataCube/DataCubeGridState.ts +0 -143
  287. package/src/stores/dataCube/DataCubePanelState.ts +0 -28
  288. package/src/stores/dataCube/DataCubePropertiesPanelState.ts +0 -65
  289. package/src/stores/dataCube/DataCubeQueryEditorState.ts +0 -66
  290. package/src/stores/dataCube/DataCubeQueryTextEditorState.ts +0 -41
  291. package/src/stores/dataCube/HPivotAndSortPanelState.ts +0 -170
@@ -13,196 +13,46 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { flow, flowResult, makeObservable, observable } from 'mobx';
17
- import { DataCubeGridState } from './DataCubeGridState.js';
18
- import { DataCubeQueryTextEditorState } from './DataCubeQueryTextEditorState.js';
19
- import { DataCubeConfigState } from './DataCubeConfigState.js';
20
- import { DataCubePropertiesPanelState } from './DataCubePropertiesPanelState.js';
21
- import { ActionState, HttpStatus, LogEvent, NetworkClientError, assertErrorThrown, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
22
- import { generatePath } from '@finos/legend-application/browser';
23
- import { V1_serializeValueSpecification, V1_buildExecutionResult, V1_serializeExecutionResult, TDSExecutionResult, V1_ParserError, ParserError, SourceInformation, V1_Lambda, V1_deserializeValueSpecification, } from '@finos/legend-graph';
24
- import { languages as monacoLanguagesAPI, } from 'monaco-editor';
25
- import { LEGEND_REPL_EVENT } from '../../Const.js';
26
- import { LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN, LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN, } from '../../components/LegendREPLGridClientApplication.js';
27
- import { REPLGridServerResult } from '../../components/grid/REPLGridServerResult.js';
28
- import { buildLambdaExpressions } from '../../components/grid/TDSLambdaBuilder.js';
29
- import { TDSQuery } from '../../components/grid/TDSQuery.js';
30
- import { TDSRequest, TDSGroupby } from '../../components/grid/TDSRequest.js';
31
- import { CompletionItem } from '../CompletionResult.js';
16
+ import { flowResult } from 'mobx';
17
+ import { DataCubeGridState } from './grid/DataCubeGridState.js';
18
+ import { DataCubeEditorState } from './editor/DataCubeEditorState.js';
19
+ import { ActionState, assertErrorThrown } from '@finos/legend-shared';
20
+ import { DataCubeEngine } from './core/DataCubeEngine.js';
21
+ import { DataCubeQuerySnapshotManager } from './core/DataCubeQuerySnapshotManager.js';
22
+ import { buildSnapshotFromQuery } from './core/DataCubeQueryAnalyzer.js';
32
23
  export class DataCubeState {
33
24
  editorStore;
34
- gridState;
35
- queryTextEditorState;
36
- configState;
37
- propertiesPanelState;
38
- executeAction = ActionState.create();
25
+ applicationStore;
26
+ engine;
27
+ snapshotManager;
28
+ grid;
29
+ editor;
30
+ initState = ActionState.create();
31
+ baseQuery;
39
32
  constructor(editorStore) {
40
- makeObservable(this, {
41
- gridState: observable,
42
- queryTextEditorState: observable,
43
- configState: observable,
44
- propertiesPanelState: observable,
45
- executeAction: observable,
46
- getREPLGridServerResult: flow,
47
- getInitialQueryLambda: flow,
48
- getInitialREPLGridServerResult: flow,
49
- getLicenseKey: flow,
50
- executeLambda: flow,
51
- parseQuery: flow,
52
- saveQuery: flow,
53
- });
54
33
  this.editorStore = editorStore;
55
- this.gridState = new DataCubeGridState(this);
56
- this.queryTextEditorState = new DataCubeQueryTextEditorState(this);
57
- this.configState = new DataCubeConfigState(this);
58
- this.propertiesPanelState = new DataCubePropertiesPanelState(this);
59
- }
60
- *getREPLGridServerResult(tdsRequest) {
61
- try {
62
- const isSubQuery = tdsRequest.groupBy.groupKeys.length !== 0;
63
- const lambda = buildLambdaExpressions(guaranteeNonNullable(this.gridState.initialQueryLambda?.body[0]), tdsRequest, this.configState.isPaginationEnabled);
64
- const resultObj = (yield flowResult(this.editorStore.client.getREPLGridServerResult(V1_serializeValueSpecification(lambda, []))));
65
- const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
66
- const tdsResult = JSON.parse(replGridResult.result);
67
- this.gridState.setCurrentResult(guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResult)), TDSExecutionResult));
68
- if (isSubQuery) {
69
- this.queryTextEditorState.setCurrentSubQuery(replGridResult.currentQuery);
70
- }
71
- else {
72
- this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
73
- this.queryTextEditorState.setCurrentSubQuery(undefined);
74
- }
75
- }
76
- catch (error) {
77
- assertErrorThrown(error);
78
- this.editorStore.applicationStore.notificationService.notifyError(error);
79
- this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
80
- }
81
- }
82
- async getTypeaheadResults(position, model) {
83
- try {
84
- const textUntilPosition = model.getValueInRange({
85
- startLineNumber: 1,
86
- startColumn: 1,
87
- endLineNumber: position.lineNumber,
88
- endColumn: position.column,
89
- });
90
- const resultObj = await this.editorStore.client.getTypeaheadResults(textUntilPosition);
91
- const result = resultObj.map((res) => CompletionItem.serialization.fromJson(res));
92
- const currentWord = model.getWordUntilPosition(position);
93
- return result.map((res) => ({
94
- label: res.display,
95
- kind: monacoLanguagesAPI.CompletionItemKind.Text,
96
- range: {
97
- startLineNumber: position.lineNumber,
98
- startColumn: currentWord.startColumn + 1,
99
- endLineNumber: position.lineNumber,
100
- endColumn: currentWord.endColumn + 1,
101
- },
102
- insertText: res.completion,
103
- }));
104
- }
105
- catch (e) {
106
- return [];
107
- }
108
- }
109
- *executeLambda() {
110
- try {
111
- this.executeAction.inProgress();
112
- const resultObj = (yield this.editorStore.client.executeLambda(this.queryTextEditorState.queryEditorState.query, this.configState.isPaginationEnabled));
113
- const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
114
- const tdsResultObj = JSON.parse(replGridResult.result);
115
- const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);
116
- this.gridState.setInitialResult(tdsResult);
117
- this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
118
- this.queryTextEditorState.setCurrentSubQuery(undefined);
119
- this.gridState.setColumns(tdsResult.result.columns);
120
- yield flowResult(this.getInitialQueryLambda());
121
- this.executeAction.complete();
122
- }
123
- catch (error) {
124
- this.executeAction.fail();
125
- assertErrorThrown(error);
126
- this.editorStore.applicationStore.notificationService.notifyError(error);
127
- this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
128
- }
129
- }
130
- *parseQuery() {
34
+ this.applicationStore = editorStore.applicationStore;
35
+ this.engine = new DataCubeEngine(this.editorStore.client);
36
+ // NOTE: snapshot manager must be instantiated before subscribers
37
+ this.snapshotManager = new DataCubeQuerySnapshotManager(this);
38
+ this.grid = new DataCubeGridState(this);
39
+ this.editor = new DataCubeEditorState(this);
40
+ }
41
+ async initialize() {
42
+ this.initState.inProgress();
131
43
  try {
132
- this.queryTextEditorState.queryEditorState.setParserError(undefined);
133
- yield flowResult(this.editorStore.client.parseQuery(`|${this.queryTextEditorState.queryEditorState.query}`));
44
+ await flowResult(this.grid.initialize());
45
+ this.snapshotManager.registerSubscriber(this.grid);
46
+ this.snapshotManager.registerSubscriber(this.editor);
47
+ this.baseQuery = await this.engine.getBaseQuery();
48
+ const initialSnapshot = await buildSnapshotFromQuery(this.baseQuery, this.engine);
49
+ this.snapshotManager.broadcastSnapshot(initialSnapshot);
50
+ this.initState.complete();
134
51
  }
135
52
  catch (error) {
136
53
  assertErrorThrown(error);
137
- if (error instanceof NetworkClientError &&
138
- error.response.status === HttpStatus.BAD_REQUEST) {
139
- const protocol = V1_ParserError.serialization.fromJson(error.payload);
140
- const parserError = new ParserError(protocol.message);
141
- if (protocol.sourceInformation) {
142
- parserError.sourceInformation = new SourceInformation(protocol.sourceInformation.sourceId, protocol.sourceInformation.startLine, protocol.sourceInformation.startColumn, protocol.sourceInformation.endLine, protocol.sourceInformation.endColumn);
143
- }
144
- this.queryTextEditorState.queryEditorState.setParserError(parserError);
145
- }
54
+ this.initState.fail();
146
55
  }
147
56
  }
148
- *saveQuery() {
149
- try {
150
- const query = TDSQuery.serialization.toJson(new TDSQuery(guaranteeNonNullable(this.gridState.initialQueryLambda), this.gridState.lastQueryTDSRequest ??
151
- new TDSRequest([], [], [], new TDSGroupby([], [], []), 0, 100)));
152
- const queryId = (yield flowResult(this.editorStore.client.saveQuery(query)));
153
- this.editorStore.applicationStore.navigationService.navigator.goToLocation(generatePath(LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.SAVED_QUERY, {
154
- [LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID]: queryId,
155
- }));
156
- }
157
- catch (error) {
158
- assertErrorThrown(error);
159
- this.editorStore.applicationStore.notificationService.notifyError(error);
160
- this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
161
- }
162
- }
163
- *getInitialQueryLambda(queryId) {
164
- if (!queryId) {
165
- const lambdaObj = (yield this.editorStore.client.getIntialQueryLambda());
166
- const lambda = V1_deserializeValueSpecification(lambdaObj, []);
167
- if (lambda instanceof V1_Lambda) {
168
- this.gridState.setInitialQueryLambda(lambda);
169
- }
170
- // this.replGridState.setCurrentQueryTDSRequest(undefined);
171
- }
172
- else {
173
- const queryObj = (yield this.editorStore.client.getREPLQuery(queryId));
174
- const query = TDSQuery.serialization.fromJson(queryObj);
175
- this.gridState.setCurrentQueryTDSRequest(query.currentQueryInfo);
176
- this.gridState.setInitialQueryLambda(query.initialQuery);
177
- }
178
- }
179
- *getInitialREPLGridServerResult(queryId) {
180
- try {
181
- this.executeAction.inProgress();
182
- if (!this.configState.licenseKey) {
183
- yield flowResult(this.getLicenseKey());
184
- }
185
- yield flowResult(this.getInitialQueryLambda(queryId));
186
- const resultObj = (yield this.editorStore.client.getInitialREPLGridServerResult(this.configState.isPaginationEnabled));
187
- const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
188
- const tdsResultObj = JSON.parse(replGridResult.result);
189
- const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);
190
- this.gridState.setInitialResult(tdsResult);
191
- this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
192
- this.queryTextEditorState.setCurrentSubQuery(undefined);
193
- this.gridState.setColumns(tdsResult.result.columns);
194
- this.executeAction.complete();
195
- }
196
- catch (error) {
197
- this.executeAction.fail();
198
- assertErrorThrown(error);
199
- this.editorStore.applicationStore.notificationService.notifyError(error);
200
- this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
201
- }
202
- }
203
- *getLicenseKey() {
204
- const licenseKey = (yield this.editorStore.client.getLicenseKey());
205
- this.configState.setLicenseKey(licenseKey);
206
- }
207
57
  }
208
58
  //# sourceMappingURL=DataCubeState.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataCubeState.js","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,UAAU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14
  * limitations under the License.
15
15
  */
16
- import type { LegendREPLGridClientApplicationStore } from './LegendREPLGridClientBaseStore.js';
17
- import { REPLServerClient } from '../server/REPLServerClient.js';
18
- import { DataCubeState } from './dataCube/DataCubeState.js';
19
- export declare class REPLGridClientStore {
20
- readonly applicationStore: LegendREPLGridClientApplicationStore;
16
+ import type { LegendREPLApplicationStore } from '../LegendREPLBaseStore.js';
17
+ import { REPLServerClient } from '../../server/REPLServerClient.js';
18
+ import { DataCubeState } from './DataCubeState.js';
19
+ export declare class REPLStore {
20
+ readonly applicationStore: LegendREPLApplicationStore;
21
21
  readonly client: REPLServerClient;
22
22
  dataCubeState: DataCubeState;
23
- constructor(applicationStore: LegendREPLGridClientApplicationStore);
23
+ constructor(applicationStore: LegendREPLApplicationStore);
24
24
  }
25
- //# sourceMappingURL=REPLGridClientStore.d.ts.map
25
+ //# sourceMappingURL=DataCubeStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataCubeStore.d.ts","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,SAAS;IACpB,QAAQ,CAAC,gBAAgB,EAAE,0BAA0B,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAGlC,aAAa,EAAG,aAAa,CAAC;gBAElB,gBAAgB,EAAE,0BAA0B;CAezD"}
@@ -13,13 +13,14 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { REPLServerClient } from '../server/REPLServerClient.js';
16
+ import { REPLServerClient } from '../../server/REPLServerClient.js';
17
17
  import { NetworkClient } from '@finos/legend-shared';
18
18
  import { makeObservable, observable } from 'mobx';
19
- import { DataCubeState } from './dataCube/DataCubeState.js';
20
- export class REPLGridClientStore {
19
+ import { DataCubeState } from './DataCubeState.js';
20
+ export class REPLStore {
21
21
  applicationStore;
22
22
  client;
23
+ // TODO: when we support multi-view, we would need to support multiple states
23
24
  dataCubeState;
24
25
  constructor(applicationStore) {
25
26
  makeObservable(this, {
@@ -35,4 +36,4 @@ export class REPLGridClientStore {
35
36
  this.dataCubeState = new DataCubeState(this);
36
37
  }
37
38
  }
38
- //# sourceMappingURL=REPLGridClientStore.js.map
39
+ //# sourceMappingURL=DataCubeStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataCubeStore.js","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,SAAS;IACX,gBAAgB,CAA6B;IAC7C,MAAM,CAAmB;IAElC,6EAA6E;IAC7E,aAAa,CAAiB;IAE9B,YAAY,gBAA4C;QACtD,cAAc,CAAC,IAAI,EAAE;YACnB,aAAa,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAgB,CAChC,IAAI,aAAa,CAAC;YAChB,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,oBAAoB;gBACxD,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM;oBACtB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAChE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO;SACzC,CAAC,CACH,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { type V1_Lambda, type V1_ValueSpecification, TDSExecutionResult } from '@finos/legend-graph';
17
+ import type { REPLServerClient } from '../../../server/REPLServerClient.js';
18
+ import { type CompletionItem } from '../../../server/models/DataCubeEngineModels.js';
19
+ import { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
20
+ export declare class DataCubeEngine {
21
+ private readonly client;
22
+ constructor(client: REPLServerClient);
23
+ getGridClientLicenseKey(): Promise<string>;
24
+ getQueryTypeahead(code: string, isPartial?: boolean): Promise<CompletionItem[]>;
25
+ parseQuery(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
26
+ getBaseQuery(): Promise<DataCubeQuery>;
27
+ executeQuery(query: V1_Lambda): Promise<TDSExecutionResult>;
28
+ }
29
+ //# sourceMappingURL=DataCubeEngine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataCubeEngine.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,qBAAqB,EAC1B,kBAAkB,EAGnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAE9B,MAAM,EAAE,gBAAgB;IAI9B,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1C,iBAAiB,CACrB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,cAAc,EAAE,CAAC;IAOtB,UAAU,CACd,IAAI,EAAE,MAAM,EACZ,uBAAuB,CAAC,EAAE,OAAO,GAChC,OAAO,CAAC,qBAAqB,CAAC;IAO3B,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAMtC,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAWlE"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { V1_deserializeValueSpecification, V1_serializeValueSpecification, TDSExecutionResult, V1_serializeExecutionResult, V1_buildExecutionResult, } from '@finos/legend-graph';
17
+ import {} from '../../../server/models/DataCubeEngineModels.js';
18
+ import { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
19
+ import { guaranteeType } from '@finos/legend-shared';
20
+ export class DataCubeEngine {
21
+ client;
22
+ constructor(client) {
23
+ this.client = client;
24
+ }
25
+ async getGridClientLicenseKey() {
26
+ return this.client.getGridClientLicenseKey();
27
+ }
28
+ async getQueryTypeahead(code, isPartial) {
29
+ return (await this.client.getQueryTypeahead({
30
+ code,
31
+ isPartial,
32
+ }));
33
+ }
34
+ async parseQuery(code, returnSourceInformation) {
35
+ return V1_deserializeValueSpecification(await this.client.parseQuery({ code, returnSourceInformation }), []);
36
+ }
37
+ async getBaseQuery() {
38
+ return DataCubeQuery.serialization.fromJson(await this.client.getBaseQuery());
39
+ }
40
+ async executeQuery(query) {
41
+ const result = await this.client.executeQuery({
42
+ query: V1_serializeValueSpecification(query, []),
43
+ });
44
+ return guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(JSON.parse(result.result))), TDSExecutionResult);
45
+ }
46
+ }
47
+ //# sourceMappingURL=DataCubeEngine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataCubeEngine.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,gCAAgC,EAChC,8BAA8B,EAE9B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAuB,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,OAAO,cAAc;IACR,MAAM,CAAmB;IAE1C,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,IAAY,EACZ,SAAmB;QAEnB,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;YAC1C,IAAI;YACJ,SAAS;SACV,CAAC,CAAqB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,UAAU,CACd,IAAY,EACZ,uBAAiC;QAEjC,OAAO,gCAAgC,CACrC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,EAC/D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,aAAa,CAAC,aAAa,CAAC,QAAQ,CACzC,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CACjC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAAgB;QACjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;YAC5C,KAAK,EAAE,8BAA8B,CAAC,KAAK,EAAE,EAAE,CAAC;SACjD,CAAC,CAAC;QACH,OAAO,aAAa,CAClB,uBAAuB,CACrB,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CACvD,EACD,kBAAkB,CACnB,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { type V1_ValueSpecification } from '@finos/legend-graph';
17
+ import type { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
18
+ import type { DataCubeEngine } from './DataCubeEngine.js';
19
+ /**
20
+ * Analyze the partial query to build the base snapshot.
21
+ *
22
+ * NOTE: the base snapshot is almost, but not a complete snapshot.
23
+ * It has key information about the partial query filled in, these are the bits
24
+ * required to reconstruct the query just from the snapshot.
25
+ * However, it lacks analytics information, such as extended columns' lambda code,
26
+ * which might be useful for initializing the editors. These should get filled in
27
+ * at a later stage in the analysis/initialization flow.
28
+ *
29
+ * Implementation-wise, this extracts the function call sequence, then walk the
30
+ * sequence in order to fill in the information for the snapshot.
31
+ */
32
+ export declare function validateAndBuildBaseSnapshot(baseQuery: DataCubeQuery, analytics: {
33
+ sourceQuery: V1_ValueSpecification;
34
+ partialQuery: V1_ValueSpecification | undefined;
35
+ }): import("./DataCubeQuerySnapshot.js").DataCubeQuerySnapshot;
36
+ export declare function buildSnapshotFromQuery(baseQuery: DataCubeQuery, engine: DataCubeEngine): Promise<import("./DataCubeQuerySnapshot.js").DataCubeQuerySnapshot>;
37
+ //# sourceMappingURL=DataCubeQueryAnalyzer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataCubeQueryAnalyzer.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeQueryAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAY7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAqN1D;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE;IACT,WAAW,EAAE,qBAAqB,CAAC;IACnC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC;CACjD,8DAkHF;AAED,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,cAAc,uEAgCvB"}