@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,560 +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 { observer } from 'mobx-react-lite';
18
- import { useREPLGridClientStore } from './REPLGridClientStoreProvider.js';
19
- import { useEffect, useRef } from 'react';
20
- import { flowResult } from 'mobx';
21
- import { LEGEND_APPLICATION_COLOR_THEME } from '@finos/legend-application';
22
- import {
23
- BasePopover,
24
- CheckSquareIcon,
25
- Modal,
26
- ModalBody,
27
- ModalFooter,
28
- ModalFooterButton,
29
- ModalHeader,
30
- ModalHeaderActions,
31
- ModalTitle,
32
- PlusIcon,
33
- SearchIcon,
34
- SquareIcon,
35
- TimesIcon,
36
- clsx,
37
- ChevronLeftIcon,
38
- ChevronRightIcon,
39
- CustomSelectorInput,
40
- } from '@finos/legend-art';
41
- import { LEGEND_APPLICATION_REPL_SETTING_KEY } from '../Const.js';
42
- import { useParams } from '@finos/legend-application/browser';
43
- import {
44
- LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN,
45
- type REPLQueryEditorPathParams,
46
- } from './LegendREPLGridClientApplication.js';
47
- import type { REPLGridClientStore } from '../stores/REPLGridClientStore.js';
48
- import { DataCubeQueryTextEditor } from './dataCube/DataCubeQueryTextEditor.js';
49
- import { DataCubeGridEditor } from './dataCube/DataCubeGridEditor.js';
50
- import { PIVOT_PANEL_TABS } from '../stores/dataCube/DataCubePropertiesPanelState.js';
51
- import { TDS_SORT_ORDER } from './grid/TDSRequest.js';
52
-
53
- type SortOption = {
54
- label: string;
55
- value: TDS_SORT_ORDER;
56
- };
57
-
58
- const HPivotAndSortEditor = observer(
59
- (props: { editorStore: REPLGridClientStore }) => {
60
- const { editorStore } = props;
61
- const hPivotAndSortColumnState =
62
- editorStore.dataCubeState.propertiesPanelState.hpivotAndSortPanelState;
63
- const onAvailabeSortColumnsSearchTextChange: React.ChangeEventHandler<
64
- HTMLInputElement
65
- > = (event) => {
66
- hPivotAndSortColumnState.setAvailableSortColumnsSearchText(
67
- event.target.value,
68
- );
69
- };
70
- const onSelectedSortColumnsSearchTextChange: React.ChangeEventHandler<
71
- HTMLInputElement
72
- > = (event) => {
73
- hPivotAndSortColumnState.setSelectedSortColumnsSearchText(
74
- event.target.value,
75
- );
76
- };
77
- const clearAvailableSortColumnsSearchText = (): void => {
78
- hPivotAndSortColumnState.setAvailableSortColumnsSearchText('');
79
- };
80
- const clearSelectedSortColumnsSearchText = (): void => {
81
- hPivotAndSortColumnState.setSelectedSortColumnsSearchText('');
82
- };
83
- const sortOptions = Array.from(Object.values(TDS_SORT_ORDER)).map(
84
- (val) => ({
85
- label: val,
86
- value: val,
87
- }),
88
- );
89
- const onAvailableColumnsSortOptionsChanged = (
90
- columnName: string,
91
- ): ((option: SortOption) => void) =>
92
- function AvailableColumnSortOption(option: SortOption): void {
93
- const column = hPivotAndSortColumnState.availableSortColumns.find(
94
- (col) => col.column === columnName,
95
- );
96
- if (column) {
97
- column.setOrder(option.value);
98
- }
99
- };
100
-
101
- const onSelectedColumnsSortOptionsChanged = (
102
- columnName: string,
103
- ): ((option: SortOption) => void) =>
104
- function SelectedColumnSortOption(option: SortOption): void {
105
- const column = hPivotAndSortColumnState.selectedSortColumns.find(
106
- (col) => col.column === columnName,
107
- );
108
- if (column) {
109
- column.setOrder(option.value);
110
- }
111
- };
112
-
113
- return (
114
- <div className="repl__hpivot__sort__editor">
115
- <div className="repl__hpivot__sort__column__editor">
116
- <div className="repl__hpivot__sort__column__editor__header">
117
- Sorts
118
- </div>
119
- <div className="repl__hpivot__sort__column__editor__content">
120
- <div className="repl__hpivot__sort__column__editor__available__columns">
121
- <div className="repl__hpivot__sort__column__editor__description">
122
- Available sort columns:
123
- </div>
124
- <div className="repl__hpivot__sort__column__editor__container">
125
- <div className="query-builder-property-search-panel__header">
126
- <div className="query-builder-property-search-panel__input__container">
127
- <input
128
- className={clsx(
129
- 'query-builder-property-search-panel__input',
130
- {
131
- 'query-builder-property-search-panel__input--searching':
132
- hPivotAndSortColumnState.availableSortColumnsSearchText,
133
- },
134
- )}
135
- spellCheck={false}
136
- onChange={onAvailabeSortColumnsSearchTextChange}
137
- value={
138
- hPivotAndSortColumnState.availableSortColumnsSearchText
139
- }
140
- placeholder="Search"
141
- />
142
- {!hPivotAndSortColumnState.availableSortColumnsSearchText ? (
143
- <>
144
- <div className="query-builder-property-search-panel__input__search__icon">
145
- <SearchIcon />
146
- </div>
147
- </>
148
- ) : (
149
- <button
150
- className="query-builder-property-search-panel__input__clear-btn"
151
- tabIndex={-1}
152
- onClick={clearAvailableSortColumnsSearchText}
153
- title="Clear"
154
- >
155
- <TimesIcon />
156
- </button>
157
- )}
158
- </div>
159
- </div>
160
- <div className="repl__hpivot__sort__column__editor__available__columns__content">
161
- <div
162
- className="repl__hpivot__sort__column__editor__available__columns__root"
163
- onDoubleClick={(): void =>
164
- hPivotAndSortColumnState.addAllAvailableSortColumns()
165
- }
166
- >
167
- <PlusIcon />
168
- <div className="repl__hpivot__sort__column__editor__available__columns__root__label">
169
- All
170
- </div>
171
- </div>
172
- {hPivotAndSortColumnState.availableSortColumnsSearchResults.map(
173
- (col) => (
174
- <div
175
- className="repl__hpivot__sort__column__editor__available__columns__children"
176
- key={col.column}
177
- >
178
- <div
179
- className="repl__hpivot__sort__column__editor__available__columns__children__name"
180
- onDoubleClick={(): void =>
181
- hPivotAndSortColumnState.addAvailableSortColumn(
182
- col.column,
183
- )
184
- }
185
- >
186
- {col.column}
187
- </div>
188
- <CustomSelectorInput
189
- className="repl__hpivot__sort__column__editor__available__columns__children__order"
190
- options={sortOptions}
191
- onChange={onAvailableColumnsSortOptionsChanged(
192
- col.column,
193
- )}
194
- value={{ label: col.order, value: col.order }}
195
- isClearable={false}
196
- darkMode={
197
- !editorStore.applicationStore.layoutService
198
- .TEMPORARY__isLightColorThemeEnabled
199
- }
200
- />
201
- </div>
202
- ),
203
- )}
204
- </div>
205
- </div>
206
- </div>
207
- <div className="repl__hpivot__sort__column__editor__actions">
208
- <div className="repl__hpivot__sort__column__editor__action">
209
- <button
210
- tabIndex={-1}
211
- // onClick={clearSearch}
212
- title="Add"
213
- >
214
- Add
215
- <ChevronRightIcon />
216
- </button>
217
- </div>
218
- <div className="repl__hpivot__sort__column__editor__action">
219
- <button
220
- tabIndex={-1}
221
- // onClick={clearSearch}
222
- title="Remove"
223
- >
224
- <ChevronLeftIcon />
225
- Remove
226
- </button>
227
- </div>
228
- </div>
229
- <div className="repl__hpivot__sort__column__editor__selected__columns">
230
- <div className="repl__hpivot__sort__column__editor__description">
231
- Selected sort columns:
232
- </div>
233
- <div className="repl__hpivot__sort__column__editor__container">
234
- <div className="query-builder-property-search-panel__header">
235
- <div className="query-builder-property-search-panel__input__container">
236
- <input
237
- className={clsx(
238
- 'query-builder-property-search-panel__input',
239
- {
240
- 'query-builder-property-search-panel__input--searching':
241
- hPivotAndSortColumnState.selectedSortColumnsSearchText,
242
- },
243
- )}
244
- spellCheck={false}
245
- onChange={onSelectedSortColumnsSearchTextChange}
246
- value={
247
- hPivotAndSortColumnState.selectedSortColumnsSearchText
248
- }
249
- placeholder="Search"
250
- />
251
- {!hPivotAndSortColumnState.selectedSortColumnsSearchText ? (
252
- <>
253
- <div className="query-builder-property-search-panel__input__search__icon">
254
- <SearchIcon />
255
- </div>
256
- </>
257
- ) : (
258
- <button
259
- className="query-builder-property-search-panel__input__clear-btn"
260
- tabIndex={-1}
261
- onClick={clearSelectedSortColumnsSearchText}
262
- title="Clear"
263
- >
264
- <TimesIcon />
265
- </button>
266
- )}
267
- </div>
268
- </div>
269
- <div className="repl__hpivot__sort__column__editor__available__columns__content">
270
- <div
271
- className="repl__hpivot__sort__column__editor__available__columns__root"
272
- onDoubleClick={(): void =>
273
- hPivotAndSortColumnState.addAllSelectedSortColumns()
274
- }
275
- >
276
- <PlusIcon />
277
- <div className="repl__hpivot__sort__column__editor__available__columns__root__label">
278
- All
279
- </div>
280
- </div>
281
- {hPivotAndSortColumnState.selectedSortColumnsSearchResults.map(
282
- (col) => (
283
- <div
284
- className="repl__hpivot__sort__column__editor__available__columns__children"
285
- key={col.column}
286
- >
287
- <div
288
- className="repl__hpivot__sort__column__editor__available__columns__children__name"
289
- onDoubleClick={(): void =>
290
- hPivotAndSortColumnState.addSelectedSortColumn(
291
- col.column,
292
- )
293
- }
294
- >
295
- {col.column}
296
- </div>
297
- <CustomSelectorInput
298
- className="repl__hpivot__sort__column__editor__available__columns__children__order"
299
- options={sortOptions}
300
- onChange={onSelectedColumnsSortOptionsChanged(
301
- col.column,
302
- )}
303
- value={{ label: col.order, value: col.order }}
304
- isClearable={false}
305
- darkMode={
306
- !editorStore.applicationStore.layoutService
307
- .TEMPORARY__isLightColorThemeEnabled
308
- }
309
- />
310
- </div>
311
- ),
312
- )}
313
- </div>
314
- </div>
315
- </div>
316
- </div>
317
- </div>
318
- </div>
319
- );
320
- },
321
- );
322
-
323
- const PivotPanelEditor = observer(
324
- (props: {
325
- triggerElement: HTMLElement | null;
326
- editorStore: REPLGridClientStore;
327
- }) => {
328
- const { triggerElement, editorStore } = props;
329
- const dataCubeState = editorStore.dataCubeState;
330
- const applicationStore = editorStore.applicationStore;
331
- const closeEditor = (): void => {
332
- dataCubeState.configState.closePanel();
333
- };
334
- const selectedTab =
335
- dataCubeState.propertiesPanelState.selectedPivotPanelTab;
336
- const tabOptions = [
337
- PIVOT_PANEL_TABS.COLUMNS_AND_PIVOTS,
338
- PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS,
339
- PIVOT_PANEL_TABS.GENERAL_PROPERTIES,
340
- PIVOT_PANEL_TABS.COLUMN_PROPERTIES,
341
- PIVOT_PANEL_TABS.DEVELOPER_OPTIONS,
342
- PIVOT_PANEL_TABS.PIVOT_LAYOUT,
343
- ];
344
- const setSelectedTab = (tab: PIVOT_PANEL_TABS): void => {
345
- dataCubeState.propertiesPanelState.setSelectedPivotPanelTab(tab);
346
- };
347
- const onClickOk = (): void => {
348
- dataCubeState.propertiesPanelState.applyChanges();
349
- dataCubeState.configState.closePanel();
350
- };
351
-
352
- return (
353
- <BasePopover
354
- open={dataCubeState.configState.isPivotPanelOpened}
355
- onClose={closeEditor}
356
- anchorEl={triggerElement}
357
- anchorOrigin={{
358
- vertical: 'center',
359
- horizontal: 'center',
360
- }}
361
- transformOrigin={{
362
- vertical: 'center',
363
- horizontal: 'center',
364
- }}
365
- >
366
- <Modal
367
- darkMode={
368
- !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
369
- }
370
- className="editor-modal embedded-runtime-editor"
371
- >
372
- <ModalHeader>
373
- <ModalTitle title="cube properties" />
374
- <ModalHeaderActions>
375
- <button
376
- className="modal__header__action"
377
- tabIndex={-1}
378
- onClick={closeEditor}
379
- >
380
- <TimesIcon />
381
- </button>
382
- </ModalHeaderActions>
383
- </ModalHeader>
384
- <ModalBody>
385
- <div style={{ height: '100%', width: '100%' }}>
386
- <div className="panel__header uml-element-editor__tabs__header ">
387
- <div className="uml-element-editor__tabs">
388
- {tabOptions.map((tab) => (
389
- <div
390
- key={tab}
391
- onClick={(): void => setSelectedTab(tab)}
392
- className={clsx('uml-element-editor__tab', {
393
- 'uml-element-editor__tab--active': tab === selectedTab,
394
- })}
395
- >
396
- {tab}
397
- </div>
398
- ))}
399
- </div>
400
- </div>
401
- {selectedTab === PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS && (
402
- <HPivotAndSortEditor editorStore={editorStore} />
403
- )}
404
- </div>
405
- </ModalBody>
406
- <ModalFooter className="repl__modal__footer">
407
- <div className="search-modal__actions">
408
- <ModalFooterButton text="Ok" onClick={onClickOk} />
409
- <ModalFooterButton text="Close" onClick={closeEditor} />
410
- <ModalFooterButton
411
- text="Apply"
412
- onClick={(): void =>
413
- dataCubeState.propertiesPanelState.applyChanges()
414
- }
415
- />
416
- </div>
417
- </ModalFooter>
418
- </Modal>
419
- </BasePopover>
420
- );
421
- },
422
- );
423
-
424
- export const GenericEditor = observer(
425
- (props: { queryId?: string | undefined }) => {
426
- const { queryId } = props;
427
- const editorStore = useREPLGridClientStore();
428
- const dataCubeState = editorStore.dataCubeState;
429
- const pivotPanelButtonRef = useRef<HTMLDivElement>(null);
430
-
431
- const selectDarkTheme = (): void => {
432
- editorStore.applicationStore.layoutService.setColorTheme(
433
- LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,
434
- { persist: true },
435
- );
436
- };
437
- const selectLightTheme = (): void => {
438
- editorStore.applicationStore.layoutService.setColorTheme(
439
- LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,
440
- { persist: true },
441
- );
442
- };
443
- const isLightTheme =
444
- editorStore.applicationStore.layoutService
445
- .TEMPORARY__isLightColorThemeEnabled;
446
-
447
- const saveQuery = (): void => {
448
- flowResult(dataCubeState.saveQuery()).catch(
449
- editorStore.applicationStore.alertUnhandledError,
450
- );
451
- };
452
-
453
- const togglePagination = (): void => {
454
- dataCubeState.configState.setIsPaginationEnabled(
455
- !dataCubeState.configState.isPaginationEnabled,
456
- );
457
- editorStore.applicationStore.settingService.persistValue(
458
- LEGEND_APPLICATION_REPL_SETTING_KEY.PAGINATION,
459
- dataCubeState.configState.isPaginationEnabled,
460
- );
461
- };
462
-
463
- useEffect(() => {
464
- flowResult(dataCubeState.getInitialREPLGridServerResult(queryId)).catch(
465
- editorStore.applicationStore.alertUnhandledError,
466
- );
467
- }, [dataCubeState, editorStore, queryId]);
468
-
469
- return (
470
- <div className="repl">
471
- <div className="repl__header">
472
- <div className="repl__header__content">
473
- <div className="repl__header__content__title">Legend DataCube</div>
474
- <div className="repl__header__actions">
475
- <div
476
- className="repl__header__action__pagination"
477
- onClick={(): void => saveQuery()}
478
- >
479
- <div className="repl__header__action__pagination__label">
480
- Save Query
481
- </div>
482
- </div>
483
- <div className="repl__header__action__pagination">
484
- <button
485
- className={clsx(
486
- 'repl__header__action__pagination__toggler__btn',
487
- {
488
- 'repl__header__action__pagination__toggler__btn--toggled':
489
- dataCubeState.configState.isPaginationEnabled,
490
- },
491
- )}
492
- onClick={togglePagination}
493
- tabIndex={-1}
494
- >
495
- {dataCubeState.configState.isPaginationEnabled ? (
496
- <CheckSquareIcon />
497
- ) : (
498
- <SquareIcon />
499
- )}
500
- </button>
501
- <div className="repl__header__action__pagination__label">
502
- Pagination
503
- </div>
504
- </div>
505
- <button
506
- className={
507
- isLightTheme
508
- ? 'repl__header__action'
509
- : 'repl__header__action repl__header__action--toggled'
510
- }
511
- onClick={selectDarkTheme}
512
- >
513
- Dark
514
- </button>
515
- <button
516
- className={
517
- isLightTheme
518
- ? 'repl__header__action repl__header__action--toggled'
519
- : 'repl__header__action'
520
- }
521
- onClick={selectLightTheme}
522
- >
523
- Light
524
- </button>
525
- </div>
526
- </div>
527
- </div>
528
- <div className="repl__content">
529
- <DataCubeQueryTextEditor editorStore={editorStore} />
530
- <DataCubeGridEditor editorStore={editorStore} />
531
- </div>
532
- <div className="repl__footer">
533
- <div
534
- className="repl__footer__pivot"
535
- ref={pivotPanelButtonRef}
536
- onClick={(): void => dataCubeState.configState.openPanel()}
537
- >
538
- Pivot
539
- </div>
540
- <div className="repl__footer__filter">Filter</div>
541
- <div className="repl__footer__mode">Modes</div>
542
- {dataCubeState.configState.isPivotPanelOpened && (
543
- <PivotPanelEditor
544
- editorStore={editorStore}
545
- triggerElement={pivotPanelButtonRef.current}
546
- />
547
- )}
548
- </div>
549
- </div>
550
- );
551
- },
552
- );
553
-
554
- export const Editor = observer(() => <GenericEditor />);
555
-
556
- export const REPLQueryEditor = observer(() => {
557
- const params = useParams<REPLQueryEditorPathParams>();
558
- const queryId = params[LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID];
559
- return <GenericEditor queryId={queryId} />;
560
- });
@@ -1,69 +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 { observer } from 'mobx-react-lite';
18
- import { AgGridComponent } from '../AgGrid.js';
19
- import { getTDSRowData } from '../../components/grid/GridUtils.js';
20
- import { ServerSideDataSource } from '../../components/grid/ServerSideDataSource.js';
21
- import { PanelLoadingIndicator } from '@finos/legend-art';
22
- import type { REPLGridClientStore } from '../../stores/REPLGridClientStore.js';
23
-
24
- export const DataCubeGridEditor = observer(
25
- (props: { editorStore: REPLGridClientStore }) => {
26
- const { editorStore } = props;
27
- const dataCubeState = editorStore.dataCubeState;
28
-
29
- return (
30
- <>
31
- <div className="repl__query__label">Result</div>
32
- <PanelLoadingIndicator
33
- isLoading={dataCubeState.executeAction.isInProgress}
34
- />
35
- {dataCubeState.executeAction.hasCompleted && (
36
- <AgGridComponent
37
- onGridReady={(params): void => {
38
- dataCubeState.configState.setGridApi(params.api);
39
- }}
40
- className={
41
- editorStore.applicationStore.layoutService
42
- .TEMPORARY__isLightColorThemeEnabled
43
- ? 'ag-theme-balham'
44
- : 'ag-theme-balham-dark'
45
- }
46
- gridOptions={
47
- dataCubeState.gridState.initialResult
48
- ? {
49
- serverSideDatasource: new ServerSideDataSource(
50
- getTDSRowData(
51
- dataCubeState.gridState.initialResult.result,
52
- ),
53
- dataCubeState.gridState.initialResult.builder.columns,
54
- editorStore,
55
- ),
56
- suppressServerSideInfiniteScroll:
57
- !dataCubeState.configState.isPaginationEnabled,
58
- }
59
- : {}
60
- }
61
- licenseKey={dataCubeState.configState.licenseKey ?? ''}
62
- rowData={dataCubeState.gridState.rowData}
63
- columnDefs={dataCubeState.gridState.columnDefs}
64
- />
65
- )}
66
- </>
67
- );
68
- },
69
- );