@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
@@ -1,220 +0,0 @@
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
-
17
- import {
18
- type TDSRequest,
19
- TDS_AGGREGATION_FUNCTION,
20
- TDS_FILTER_OPERATION,
21
- TDS_SORT_ORDER,
22
- } from './TDSRequest.js';
23
- import {
24
- type TDSExecutionResult,
25
- type TabularDataSet,
26
- PRIMITIVE_TYPE,
27
- } from '@finos/legend-graph';
28
- import { isBoolean } from '@finos/legend-shared';
29
-
30
- export type TDSResultCellDataType =
31
- | string
32
- | number
33
- | boolean
34
- | null
35
- | undefined;
36
-
37
- export interface TDSRowDataType {
38
- [key: string]: TDSResultCellDataType;
39
- }
40
-
41
- export const getTDSSortOrder = (sortOrder: string): TDS_SORT_ORDER => {
42
- switch (sortOrder) {
43
- case 'asc':
44
- return TDS_SORT_ORDER.ASCENDING;
45
- case 'desc':
46
- return TDS_SORT_ORDER.DESCENDING;
47
- default:
48
- throw new Error(`Unsupported tds sort order ${sortOrder}`);
49
- }
50
- };
51
-
52
- const getTDSSortModel = (sort: TDS_SORT_ORDER): string => {
53
- switch (sort) {
54
- case TDS_SORT_ORDER.ASCENDING:
55
- return 'asc';
56
- case TDS_SORT_ORDER.DESCENDING:
57
- return 'desc';
58
- default:
59
- throw new Error(`Unsupported`);
60
- }
61
- };
62
-
63
- export const getAggregationFunction = (
64
- aggFunc: string,
65
- ): TDS_AGGREGATION_FUNCTION => {
66
- switch (aggFunc) {
67
- case 'sum':
68
- return TDS_AGGREGATION_FUNCTION.SUM;
69
- case 'min':
70
- return TDS_AGGREGATION_FUNCTION.MIN;
71
- case 'max':
72
- return TDS_AGGREGATION_FUNCTION.MAX;
73
- case 'count':
74
- return TDS_AGGREGATION_FUNCTION.COUNT;
75
- default:
76
- throw new Error(`Unsupported aggregation function ${aggFunc}`);
77
- }
78
- };
79
-
80
- export const getTDSFilterOperation = (
81
- filterOperation: string,
82
- ): TDS_FILTER_OPERATION => {
83
- switch (filterOperation) {
84
- case 'equals':
85
- return TDS_FILTER_OPERATION.EQUALS;
86
- case 'notEqual':
87
- return TDS_FILTER_OPERATION.NOT_EQUAL;
88
- case 'greaterThan':
89
- return TDS_FILTER_OPERATION.GREATER_THAN;
90
- case 'greaterThanOrEqual':
91
- return TDS_FILTER_OPERATION.GREATER_THAN_OR_EQUAL;
92
- case 'lessThan':
93
- return TDS_FILTER_OPERATION.LESS_THAN;
94
- case 'lessThanOrEqual':
95
- return TDS_FILTER_OPERATION.LESS_THAN_OR_EQUAL;
96
- case 'blank':
97
- return TDS_FILTER_OPERATION.BLANK;
98
- case 'notBlank':
99
- return TDS_FILTER_OPERATION.NOT_BLANK;
100
- case 'contains':
101
- return TDS_FILTER_OPERATION.CONTAINS;
102
- case 'notContains':
103
- return TDS_FILTER_OPERATION.NOT_CONTAINS;
104
- case 'startsWith':
105
- return TDS_FILTER_OPERATION.STARTS_WITH;
106
- case 'endsWith':
107
- return TDS_FILTER_OPERATION.ENDS_WITH;
108
- default:
109
- throw new Error(`Unsupported filter operation ${filterOperation}`);
110
- }
111
- };
112
-
113
- export const getFilterColumnType = (type: string): PRIMITIVE_TYPE => {
114
- switch (type) {
115
- case 'text':
116
- return PRIMITIVE_TYPE.STRING;
117
- case 'number':
118
- return PRIMITIVE_TYPE.NUMBER;
119
- case 'boolean':
120
- return PRIMITIVE_TYPE.BOOLEAN;
121
- case 'date':
122
- return PRIMITIVE_TYPE.DATE;
123
- default:
124
- throw new Error(`Unsupported filter type ${type}`);
125
- }
126
- };
127
-
128
- export const getFilterModeltype = (type: PRIMITIVE_TYPE): string => {
129
- switch (type) {
130
- case PRIMITIVE_TYPE.STRING:
131
- return 'text';
132
- case PRIMITIVE_TYPE.NUMBER:
133
- return 'number';
134
- case PRIMITIVE_TYPE.BOOLEAN:
135
- return 'boolean';
136
- case PRIMITIVE_TYPE.DATE:
137
- return 'date';
138
- default:
139
- throw new Error(`Unsupported filter type ${type}`);
140
- }
141
- };
142
-
143
- export const getTDSColumnCustomizations = (
144
- result: TDSExecutionResult,
145
- columnName: string,
146
- tdsRequest?: TDSRequest | undefined,
147
- ): object => {
148
- if (!tdsRequest) {
149
- return {};
150
- }
151
- const sort = tdsRequest.sort.find((c) => c.column === columnName)?.order;
152
- const rowGroup = tdsRequest.groupBy.columns.find((c) => c === columnName);
153
- const aggFunc = tdsRequest.groupBy.aggregations.find(
154
- (c) => c.column === columnName,
155
- );
156
- return {
157
- sort: sort ? getTDSSortModel(sort) : undefined,
158
- rowGroup: Boolean(rowGroup),
159
- hide: Boolean(rowGroup),
160
- aggFunc: aggFunc?.function,
161
- };
162
- };
163
-
164
- export const getAggregationTDSColumnCustomizations = (
165
- result: TDSExecutionResult,
166
- columnName: string,
167
- ): object => {
168
- const columnType = result.builder.columns.find(
169
- (col) => col.name === columnName,
170
- )?.type;
171
- switch (columnType) {
172
- case PRIMITIVE_TYPE.STRING:
173
- return {
174
- filter: 'agTextColumnFilter',
175
- allowedAggFuncs: ['count'],
176
- };
177
- case PRIMITIVE_TYPE.DATE:
178
- case PRIMITIVE_TYPE.DATETIME:
179
- case PRIMITIVE_TYPE.STRICTDATE:
180
- return {
181
- filter: 'agDateColumnFilter',
182
- allowedAggFuncs: ['count'],
183
- };
184
- case PRIMITIVE_TYPE.DECIMAL:
185
- case PRIMITIVE_TYPE.INTEGER:
186
- case PRIMITIVE_TYPE.FLOAT:
187
- return {
188
- filter: 'agNumberColumnFilter',
189
- allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
190
- };
191
- default:
192
- return {
193
- allowedAggFuncs: ['count'],
194
- };
195
- }
196
- };
197
-
198
- export const getDefaultColumnDefintions = (): object => ({
199
- minWidth: 50,
200
- sortable: true,
201
- flex: 1,
202
- resizable: true,
203
- enableRowGroup: true,
204
- allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
205
- enableValue: true,
206
- menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab'],
207
- });
208
-
209
- export const getTDSRowData = (tds: TabularDataSet): TDSRowDataType[] =>
210
- tds.rows.map((_row, rowIdx) => {
211
- const row: TDSRowDataType = {};
212
- const cols = tds.columns;
213
- _row.values.forEach((value, colIdx) => {
214
- // `ag-grid` shows `false` value as empty string so we have
215
- // call `.toString()` to avoid this behavior.
216
- row[cols[colIdx] as string] = isBoolean(value) ? String(value) : value;
217
- });
218
- row.rowNumber = rowIdx;
219
- return row;
220
- });
@@ -1,197 +0,0 @@
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
-
17
- import type {
18
- FilterModel,
19
- IServerSideDatasource,
20
- IServerSideGetRowsParams,
21
- } from '@ag-grid-community/core';
22
- import {
23
- TDSGroupby,
24
- TDSAggregation,
25
- TDSFilter,
26
- TDSRequest,
27
- TDSSort,
28
- TDSFilterCondition,
29
- TDS_FILTER_GROUP,
30
- TDSColumn,
31
- } from './TDSRequest.js';
32
- import {
33
- guaranteeNonNullable,
34
- type GeneratorFn,
35
- assertErrorThrown,
36
- LogEvent,
37
- } from '@finos/legend-shared';
38
- import { LEGEND_REPL_EVENT } from '../../Const.js';
39
- import {
40
- type TDSRowDataType,
41
- getTDSRowData,
42
- getTDSSortOrder,
43
- getTDSFilterOperation,
44
- getAggregationFunction,
45
- getFilterColumnType,
46
- } from './GridUtils.js';
47
- import type { REPLGridClientStore } from '../../stores/REPLGridClientStore.js';
48
- import { flow, flowResult, makeObservable } from 'mobx';
49
- import type { INTERNAL__TDSColumn, PRIMITIVE_TYPE } from '@finos/legend-graph';
50
-
51
- export class ServerSideDataSource implements IServerSideDatasource {
52
- executions = 0;
53
- rowData: TDSRowDataType[] = [];
54
- columns: INTERNAL__TDSColumn[] = [];
55
- editorStore?: REPLGridClientStore | undefined;
56
-
57
- constructor(
58
- rowData?: TDSRowDataType[] | undefined,
59
- columns?: INTERNAL__TDSColumn[] | undefined,
60
- editorStore?: REPLGridClientStore | undefined,
61
- ) {
62
- makeObservable(this, {
63
- fetchRows: flow,
64
- });
65
- this.rowData = rowData ?? [];
66
- this.columns = columns ?? [];
67
- this.editorStore = editorStore;
68
- }
69
-
70
- *fetchRows(
71
- params: IServerSideGetRowsParams<unknown, unknown>,
72
- ): GeneratorFn<void> {
73
- try {
74
- if (
75
- this.executions > 0 ||
76
- this.editorStore?.dataCubeState.gridState.currentQueryTDSRequest
77
- ) {
78
- if (this.editorStore) {
79
- const request = this.extractRequest(params);
80
- this.editorStore.dataCubeState.gridState.setLastQueryTDSRequest(
81
- request,
82
- );
83
- if (request) {
84
- yield flowResult(
85
- this.editorStore.dataCubeState.getREPLGridServerResult(request),
86
- );
87
- const result =
88
- this.editorStore.dataCubeState.gridState.currentResult;
89
- const rowData = getTDSRowData(guaranteeNonNullable(result).result);
90
- params.success({ rowData: rowData });
91
- } else {
92
- params.fail();
93
- }
94
- }
95
- this.editorStore?.dataCubeState.gridState.setCurrentQueryTDSRequest(
96
- undefined,
97
- );
98
- } else {
99
- params.success({ rowData: this.rowData });
100
- }
101
- this.executions++;
102
- } catch (error) {
103
- assertErrorThrown(error);
104
- this.editorStore?.applicationStore.notificationService.notifyError(error);
105
- this.editorStore?.applicationStore.logService.error(
106
- LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE),
107
- error,
108
- );
109
- }
110
- }
111
-
112
- getRows(params: IServerSideGetRowsParams<unknown, unknown>): void {
113
- this.fetchRows(params);
114
- }
115
-
116
- extractRequest(
117
- params: IServerSideGetRowsParams<unknown, unknown>,
118
- ): TDSRequest | undefined {
119
- try {
120
- const request = params.request;
121
- const startRow = request.startRow;
122
- const endRow = request.endRow;
123
- const columns = params.columnApi.getColumns()?.map((c) => c.getColId());
124
- const sort = request.sortModel.map(
125
- (i) => new TDSSort(i.colId, getTDSSortOrder(i.sort)),
126
- );
127
- const aggregations = request.valueCols.map((v) => {
128
- const colType = this.columns.find((c) => c.name === v.field)?.type;
129
- return new TDSAggregation(
130
- guaranteeNonNullable(v.field),
131
- colType as PRIMITIVE_TYPE,
132
- getAggregationFunction(guaranteeNonNullable(v.aggFunc)),
133
- );
134
- });
135
- const groupBy = new TDSGroupby(
136
- request.rowGroupCols.map((r) => r.id),
137
- request.groupKeys,
138
- aggregations,
139
- );
140
- const filter: TDSFilter[] = [];
141
- const filterModel = request.filterModel as FilterModel | null;
142
- if (filterModel) {
143
- Object.keys(filterModel).forEach((key) => {
144
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
145
- const item = filterModel[key];
146
- const conditions: TDSFilterCondition[] = [];
147
- const colType = getFilterColumnType(item.filterType);
148
- if (item.filter === undefined && item.conditions) {
149
- item.conditions.forEach(
150
- (condition: { type: string; filter: unknown }) =>
151
- conditions.push(
152
- new TDSFilterCondition(
153
- getTDSFilterOperation(condition.type),
154
- condition.filter,
155
- ),
156
- ),
157
- );
158
- } else {
159
- conditions.push(
160
- new TDSFilterCondition(
161
- getTDSFilterOperation(item.type),
162
- item.filter,
163
- ),
164
- );
165
- }
166
- filter.push(
167
- new TDSFilter(
168
- key,
169
- colType,
170
- conditions,
171
- item.operator === 'OR'
172
- ? TDS_FILTER_GROUP.OR
173
- : TDS_FILTER_GROUP.AND,
174
- ),
175
- );
176
- });
177
- }
178
- const tdsRequest = new TDSRequest(
179
- columns?.map((col) => new TDSColumn(col)) ?? [],
180
- filter,
181
- sort,
182
- groupBy,
183
- startRow,
184
- endRow,
185
- );
186
- return tdsRequest;
187
- } catch (error) {
188
- assertErrorThrown(error);
189
- this.editorStore?.applicationStore.notificationService.notifyError(error);
190
- this.editorStore?.applicationStore.logService.error(
191
- LogEvent.create(LEGEND_REPL_EVENT.BUILD_TDS_EQUEST_FAILURE),
192
- error,
193
- );
194
- return undefined;
195
- }
196
- }
197
- }