@finos/legend-application-repl 0.0.36 → 0.0.38

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 (240) hide show
  1. package/README.md +1 -1
  2. package/lib/__lib__/LegendREPLEvent.d.ts +1 -1
  3. package/lib/__lib__/LegendREPLEvent.d.ts.map +1 -1
  4. package/lib/__lib__/LegendREPLEvent.js +5 -5
  5. package/lib/__lib__/LegendREPLEvent.js.map +1 -1
  6. package/lib/__lib__/LegendREPLSetting.d.ts +1 -1
  7. package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -1
  8. package/lib/__lib__/LegendREPLSetting.js +4 -4
  9. package/lib/__lib__/LegendREPLSetting.js.map +1 -1
  10. package/lib/application/LegendREPL.d.ts +1 -1
  11. package/lib/application/LegendREPL.d.ts.map +1 -1
  12. package/lib/application/LegendREPL.js +2 -2
  13. package/lib/application/LegendREPL.js.map +1 -1
  14. package/lib/application/LegendREPLDocumentation.d.ts +21 -0
  15. package/lib/application/LegendREPLDocumentation.d.ts.map +1 -0
  16. package/lib/application/LegendREPLDocumentation.js +22 -0
  17. package/lib/application/LegendREPLDocumentation.js.map +1 -0
  18. package/lib/components/Core_LegendREPLApplicationPlugin.js +2 -2
  19. package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -1
  20. package/lib/components/LegendREPLApplication.d.ts.map +1 -1
  21. package/lib/components/LegendREPLApplication.js +3 -2
  22. package/lib/components/LegendREPLApplication.js.map +1 -1
  23. package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -1
  24. package/lib/components/LegendREPLFrameworkProvider.js +2 -2
  25. package/lib/components/LegendREPLFrameworkProvider.js.map +1 -1
  26. package/lib/components/REPLStoreProvider.d.ts +4 -2
  27. package/lib/components/REPLStoreProvider.d.ts.map +1 -1
  28. package/lib/components/REPLStoreProvider.js +13 -7
  29. package/lib/components/REPLStoreProvider.js.map +1 -1
  30. package/lib/components/dataCube/DataCube.d.ts.map +1 -1
  31. package/lib/components/dataCube/DataCube.js +31 -13
  32. package/lib/components/dataCube/DataCube.js.map +1 -1
  33. package/lib/components/dataCube/editor/DataCubeEditor.d.ts +1 -3
  34. package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
  35. package/lib/components/dataCube/editor/DataCubeEditor.js +18 -20
  36. package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
  37. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +12 -12
  38. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
  39. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
  40. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +45 -43
  41. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
  42. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +4 -4
  43. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -1
  44. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +4 -4
  45. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -1
  46. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +4 -4
  47. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -1
  48. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
  49. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +22 -22
  50. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
  51. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js +4 -4
  52. package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -1
  53. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +5 -5
  54. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -1
  55. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js +2 -2
  56. package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -1
  57. package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
  58. package/lib/components/dataCube/grid/DataCubeGrid.js +37 -45
  59. package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
  60. package/lib/components/dataCube/grid/DataCubeGridShared.js +2 -2
  61. package/lib/components/dataCube/grid/DataCubeGridShared.js.map +1 -1
  62. package/lib/components/repl/Alert.d.ts +23 -0
  63. package/lib/components/repl/Alert.d.ts.map +1 -0
  64. package/lib/components/repl/Alert.js +73 -0
  65. package/lib/components/repl/Alert.js.map +1 -0
  66. package/lib/components/repl/DocumentationPanel.d.ts +24 -0
  67. package/lib/components/repl/DocumentationPanel.d.ts.map +1 -0
  68. package/lib/components/repl/DocumentationPanel.js +56 -0
  69. package/lib/components/repl/DocumentationPanel.js.map +1 -0
  70. package/lib/components/{dataCube/editor/DataCubeEditorShared.d.ts → repl/Form.d.ts} +11 -11
  71. package/lib/components/repl/Form.d.ts.map +1 -0
  72. package/lib/components/{dataCube/editor/DataCubeEditorShared.js → repl/Form.js} +13 -13
  73. package/lib/components/repl/Form.js.map +1 -0
  74. package/lib/components/{REPLWindow.d.ts → repl/LayoutManager.d.ts} +11 -17
  75. package/lib/components/repl/LayoutManager.d.ts.map +1 -0
  76. package/lib/components/repl/LayoutManager.js +116 -0
  77. package/lib/components/repl/LayoutManager.js.map +1 -0
  78. package/lib/components/{dataCube/editor/DataCubeEditorDeveloperPanel.d.ts → repl/SettingsPanel.d.ts} +2 -2
  79. package/lib/components/repl/SettingsPanel.d.ts.map +1 -0
  80. package/lib/components/repl/SettingsPanel.js +47 -0
  81. package/lib/components/repl/SettingsPanel.js.map +1 -0
  82. package/lib/index.css +1 -1
  83. package/lib/package.json +19 -22
  84. package/lib/server/DataCubeQuery.d.ts.map +1 -0
  85. package/lib/server/{models/DataCubeQuery.js → DataCubeQuery.js} +6 -6
  86. package/lib/server/DataCubeQuery.js.map +1 -0
  87. package/lib/server/{models/DataCubeEngineModels.d.ts → REPLEngine.d.ts} +7 -1
  88. package/lib/server/REPLEngine.d.ts.map +1 -0
  89. package/lib/server/{models/DataCubeEngineModels.js → REPLEngine.js} +9 -1
  90. package/lib/server/REPLEngine.js.map +1 -0
  91. package/lib/server/REPLServerClient.d.ts +2 -2
  92. package/lib/server/REPLServerClient.d.ts.map +1 -1
  93. package/lib/server/REPLServerClient.js +2 -2
  94. package/lib/server/REPLServerClient.js.map +1 -1
  95. package/lib/stores/LayoutManagerState.d.ts +62 -0
  96. package/lib/stores/LayoutManagerState.d.ts.map +1 -0
  97. package/lib/stores/LayoutManagerState.js +121 -0
  98. package/lib/stores/LayoutManagerState.js.map +1 -0
  99. package/lib/stores/LegendREPLApplicationPlugin.d.ts +1 -0
  100. package/lib/stores/LegendREPLApplicationPlugin.d.ts.map +1 -1
  101. package/lib/stores/LegendREPLApplicationPlugin.js +8 -0
  102. package/lib/stores/LegendREPLApplicationPlugin.js.map +1 -1
  103. package/lib/stores/LegendREPLBaseStore.d.ts +2 -2
  104. package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
  105. package/lib/stores/LegendREPLBaseStore.js +4 -4
  106. package/lib/stores/LegendREPLBaseStore.js.map +1 -1
  107. package/lib/stores/REPLStore.d.ts +12 -4
  108. package/lib/stores/REPLStore.d.ts.map +1 -1
  109. package/lib/stores/REPLStore.js +77 -25
  110. package/lib/stores/REPLStore.js.map +1 -1
  111. package/lib/stores/dataCube/{DataCubeInfrastructure.d.ts → DataCubeEngine.d.ts} +21 -21
  112. package/lib/stores/dataCube/DataCubeEngine.d.ts.map +1 -0
  113. package/lib/stores/dataCube/{DataCubeInfrastructure.js → DataCubeEngine.js} +50 -35
  114. package/lib/stores/dataCube/DataCubeEngine.js.map +1 -0
  115. package/lib/stores/dataCube/DataCubeState.d.ts +4 -4
  116. package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
  117. package/lib/stores/dataCube/DataCubeState.js +13 -8
  118. package/lib/stores/dataCube/DataCubeState.js.map +1 -1
  119. package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +1 -1
  120. package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -1
  121. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +2 -2
  122. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -1
  123. package/lib/stores/dataCube/core/DataCubeQueryEngine.js +2 -2
  124. package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -1
  125. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +1 -1
  126. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
  127. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +1 -1
  128. package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
  129. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
  130. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +4 -0
  131. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
  132. package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js +1 -1
  133. package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js.map +1 -1
  134. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +5 -8
  135. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
  136. package/lib/stores/dataCube/editor/DataCubeEditorState.js +19 -29
  137. package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
  138. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +1 -1
  139. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
  140. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +31 -28
  141. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
  142. package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.d.ts.map +1 -1
  143. package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js +7 -2
  144. package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js.map +1 -1
  145. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
  146. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js +9 -8
  147. package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
  148. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.d.ts.map +1 -1
  149. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js +2 -6
  150. package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js.map +1 -1
  151. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -1
  152. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +0 -2
  153. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -1
  154. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +0 -2
  155. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
  156. package/lib/stores/dataCube/grid/DataCubeGridState.js +1 -7
  157. package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
  158. package/package.json +25 -28
  159. package/src/__lib__/LegendREPLEvent.ts +1 -1
  160. package/src/__lib__/LegendREPLSetting.ts +1 -1
  161. package/src/application/LegendREPL.tsx +2 -2
  162. package/{lib/grammar/parser.d.ts → src/application/LegendREPLDocumentation.ts} +6 -1
  163. package/src/components/Core_LegendREPLApplicationPlugin.tsx +2 -2
  164. package/src/components/LegendREPLApplication.tsx +2 -0
  165. package/src/components/LegendREPLFrameworkProvider.tsx +2 -4
  166. package/src/components/REPLStoreProvider.tsx +24 -18
  167. package/src/components/dataCube/DataCube.tsx +69 -26
  168. package/src/components/dataCube/editor/DataCubeEditor.tsx +89 -98
  169. package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +12 -12
  170. package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +112 -115
  171. package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +4 -4
  172. package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +4 -4
  173. package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +4 -4
  174. package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +76 -88
  175. package/src/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.tsx +4 -4
  176. package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +5 -5
  177. package/src/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.tsx +2 -2
  178. package/src/components/dataCube/grid/DataCubeGrid.tsx +45 -53
  179. package/src/components/dataCube/grid/DataCubeGridShared.tsx +2 -2
  180. package/src/components/repl/Alert.tsx +138 -0
  181. package/src/components/repl/DocumentationPanel.tsx +88 -0
  182. package/src/components/{dataCube/editor/DataCubeEditorShared.tsx → repl/Form.tsx} +12 -12
  183. package/src/components/repl/LayoutManager.tsx +190 -0
  184. package/src/components/repl/SettingsPanel.tsx +148 -0
  185. package/src/server/{models/DataCubeQuery.ts → DataCubeQuery.ts} +3 -3
  186. package/src/server/{models/DataCubeEngineModels.ts → REPLEngine.ts} +13 -0
  187. package/src/server/REPLServerClient.ts +4 -3
  188. package/src/stores/LayoutManagerState.ts +168 -0
  189. package/src/stores/LegendREPLApplicationPlugin.ts +9 -0
  190. package/src/stores/LegendREPLBaseStore.ts +4 -4
  191. package/src/stores/REPLStore.tsx +145 -0
  192. package/src/stores/dataCube/{DataCubeInfrastructure.ts → DataCubeEngine.ts} +66 -46
  193. package/src/stores/dataCube/DataCubeState.ts +14 -9
  194. package/src/stores/dataCube/core/DataCubeCoreState.ts +1 -1
  195. package/src/stores/dataCube/core/DataCubeQueryEngine.ts +2 -3
  196. package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +1 -1
  197. package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +1 -1
  198. package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +10 -0
  199. package/src/stores/dataCube/editor/DataCubeEditorCodePanelState.ts +1 -1
  200. package/src/stores/dataCube/editor/{DataCubeEditorState.ts → DataCubeEditorState.tsx} +12 -24
  201. package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +23 -12
  202. package/src/stores/dataCube/grid/DataCubeGridClientExportEngine.ts +4 -1
  203. package/src/stores/dataCube/grid/DataCubeGridConfigurationBuilder.tsx +9 -11
  204. package/src/stores/dataCube/grid/DataCubeGridMenuBuilder.tsx +2 -6
  205. package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +0 -3
  206. package/src/stores/dataCube/grid/DataCubeGridState.ts +1 -11
  207. package/tsconfig.json +12 -8
  208. package/grammar/datacube_filter__lexer.g4 +0 -40
  209. package/grammar/datacube_filter__parser.g4 +0 -14
  210. package/grammar/generateGrammar.js +0 -43
  211. package/grammar/parser/generated/datacube_filter__lexer.interp +0 -59
  212. package/grammar/parser/generated/datacube_filter__lexer.tokens +0 -14
  213. package/grammar/parser/generated/datacube_filter__lexer.ts +0 -142
  214. package/grammar/parser/generated/datacube_filter__parser.interp +0 -38
  215. package/grammar/parser/generated/datacube_filter__parser.tokens +0 -14
  216. package/grammar/parser/generated/datacube_filter__parser.ts +0 -514
  217. package/grammar/parser/parser.ts +0 -55
  218. package/lib/components/REPLWindow.d.ts.map +0 -1
  219. package/lib/components/REPLWindow.js +0 -117
  220. package/lib/components/REPLWindow.js.map +0 -1
  221. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.d.ts.map +0 -1
  222. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js +0 -28
  223. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js.map +0 -1
  224. package/lib/components/dataCube/editor/DataCubeEditorShared.d.ts.map +0 -1
  225. package/lib/components/dataCube/editor/DataCubeEditorShared.js.map +0 -1
  226. package/lib/grammar/generated/datacube_filter__lexer.d.ts +0 -31
  227. package/lib/grammar/generated/datacube_filter__lexer.js +0 -118
  228. package/lib/grammar/generated/datacube_filter__parser.d.ts +0 -91
  229. package/lib/grammar/generated/datacube_filter__parser.js +0 -485
  230. package/lib/grammar/parser.js +0 -39
  231. package/lib/server/models/DataCubeEngineModels.d.ts.map +0 -1
  232. package/lib/server/models/DataCubeEngineModels.js.map +0 -1
  233. package/lib/server/models/DataCubeQuery.d.ts.map +0 -1
  234. package/lib/server/models/DataCubeQuery.js.map +0 -1
  235. package/lib/stores/dataCube/DataCubeInfrastructure.d.ts.map +0 -1
  236. package/lib/stores/dataCube/DataCubeInfrastructure.js.map +0 -1
  237. package/src/components/REPLWindow.tsx +0 -179
  238. package/src/components/dataCube/editor/DataCubeEditorDeveloperPanel.tsx +0 -43
  239. package/src/stores/REPLStore.ts +0 -48
  240. /package/lib/server/{models/DataCubeQuery.d.ts → DataCubeQuery.d.ts} +0 -0
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  import { observer } from 'mobx-react-lite';
18
- import { DATA_CUBE_EDITOR_TAB } from '../../../stores/dataCube/editor/DataCubeEditorState.js';
18
+ import { DataCubeEditorTab } from '../../../stores/dataCube/editor/DataCubeEditorState.js';
19
19
  import { useREPLStore } from '../../REPLStoreProvider.js';
20
20
  import { DataCubeEditorSortsPanel } from './DataCubeEditorSortsPanel.js';
21
21
  import { DataCubeEditorGeneralPropertiesPanel } from './DataCubeEditorGeneralPropertiesPanel.js';
@@ -26,105 +26,96 @@ import { DataCubeEditorFilterPanel } from './DataCubeEditorFilterPanel.js';
26
26
  import { DataCubeEditorExtendedColumnsPanel } from './DataCubeEditorExtendedColumnsPanel.js';
27
27
  import { DataCubeEditorCodePanel } from './DataCubeEditorCodePanel.js';
28
28
  import { DataCubeEditorColumnPropertiesPanel } from './DataCubeEditorColumnPropertiesPanel.js';
29
- import { REPLWindow } from '../../REPLWindow.js';
30
29
  import { cn } from '@finos/legend-art';
31
30
 
32
- export const DataCubeEditor = observer(
33
- (props: { containerRef: React.RefObject<HTMLDivElement> }) => {
34
- const { containerRef } = props;
35
- const replStore = useREPLStore();
36
- const editor = replStore.dataCube.editor;
37
- const selectedTab = editor.currentTab;
38
- const tabs = [
39
- DATA_CUBE_EDITOR_TAB.GENERAL_PROPERTIES,
40
- DATA_CUBE_EDITOR_TAB.COLUMN_PROPERTIES,
41
- DATA_CUBE_EDITOR_TAB.FILTER,
42
- DATA_CUBE_EDITOR_TAB.EXTENDED_COLUMNS,
43
- DATA_CUBE_EDITOR_TAB.COLUMNS,
44
- DATA_CUBE_EDITOR_TAB.VERTICAL_PIVOTS,
45
- DATA_CUBE_EDITOR_TAB.HORIZONTAL_PIVOTS,
46
- DATA_CUBE_EDITOR_TAB.SORTS,
47
- DATA_CUBE_EDITOR_TAB.CODE,
48
- ];
31
+ export const DataCubeEditor = observer(() => {
32
+ const repl = useREPLStore();
33
+ const editor = repl.dataCube.editor;
34
+ const selectedTab = editor.currentTab;
35
+ const tabs = [
36
+ DataCubeEditorTab.GENERAL_PROPERTIES,
37
+ DataCubeEditorTab.COLUMN_PROPERTIES,
38
+ DataCubeEditorTab.FILTER,
39
+ DataCubeEditorTab.EXTENDED_COLUMNS,
40
+ DataCubeEditorTab.COLUMNS,
41
+ DataCubeEditorTab.VERTICAL_PIVOTS,
42
+ DataCubeEditorTab.HORIZONTAL_PIVOTS,
43
+ DataCubeEditorTab.SORTS,
44
+ DataCubeEditorTab.CODE,
45
+ ];
49
46
 
50
- return (
51
- <REPLWindow
52
- containerRef={containerRef}
53
- config={editor.window}
54
- onClose={() => editor.closePanel()}
55
- >
56
- <div className="relative h-[calc(100%_-_40px)] flex-1 px-2 pt-8">
57
- <div className="absolute top-0 flex h-9 w-[calc(100%_-_16px)] min-w-[400px] overflow-auto pt-2">
58
- {tabs.map((tab) => (
59
- <button
60
- key={tab}
61
- onClick={(): void => editor.setCurrentTab(tab)}
62
- className={cn(
63
- 'relative flex h-6 items-center justify-center whitespace-nowrap border border-b-0 border-l-0 border-neutral-300 px-2 first:border-l focus:z-10',
64
- {
65
- '-top-0.5 h-[27px] border-b-0 bg-white':
66
- tab === selectedTab,
67
- },
68
- )}
69
- >
70
- {tab}
71
- </button>
72
- ))}
73
- </div>
74
- <div className="h-full w-full overflow-auto border border-neutral-300 bg-white">
75
- {selectedTab === DATA_CUBE_EDITOR_TAB.GENERAL_PROPERTIES && (
76
- <DataCubeEditorGeneralPropertiesPanel />
77
- )}
78
- {selectedTab === DATA_CUBE_EDITOR_TAB.COLUMN_PROPERTIES && (
79
- <DataCubeEditorColumnPropertiesPanel />
80
- )}
81
- {selectedTab === DATA_CUBE_EDITOR_TAB.FILTER && (
82
- <DataCubeEditorFilterPanel />
83
- )}
84
- {selectedTab === DATA_CUBE_EDITOR_TAB.EXTENDED_COLUMNS && (
85
- <DataCubeEditorExtendedColumnsPanel />
86
- )}
87
- {selectedTab === DATA_CUBE_EDITOR_TAB.COLUMNS && (
88
- <DataCubeEditorColumnsPanel />
89
- )}
90
- {selectedTab === DATA_CUBE_EDITOR_TAB.SORTS && (
91
- <DataCubeEditorSortsPanel />
92
- )}
93
- {selectedTab === DATA_CUBE_EDITOR_TAB.VERTICAL_PIVOTS && (
94
- <DataCubeEditorVerticalPivotsPanel />
95
- )}
96
- {selectedTab === DATA_CUBE_EDITOR_TAB.HORIZONTAL_PIVOTS && (
97
- <DataCubeEditorHorizontalPivotsPanel />
98
- )}
99
- {selectedTab === DATA_CUBE_EDITOR_TAB.CODE && (
100
- <DataCubeEditorCodePanel />
101
- )}
102
- </div>
47
+ return (
48
+ <>
49
+ <div className="relative h-[calc(100%_-_40px)] w-full px-2 pt-8">
50
+ <div className="absolute top-0 flex h-9 w-[calc(100%_-_16px)] min-w-[400px] overflow-auto pt-2">
51
+ {tabs.map((tab) => (
52
+ <button
53
+ key={tab}
54
+ onClick={(): void => editor.setCurrentTab(tab)}
55
+ className={cn(
56
+ 'relative flex h-6 items-center justify-center whitespace-nowrap border border-b-0 border-l-0 border-neutral-300 px-2 first:border-l focus:z-10',
57
+ {
58
+ '-top-0.5 h-[27px] border-b-0 bg-white': tab === selectedTab,
59
+ },
60
+ )}
61
+ >
62
+ {tab}
63
+ </button>
64
+ ))}
103
65
  </div>
104
- <div className="flex h-10 items-center justify-end px-2">
105
- <button
106
- className="h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
107
- onClick={(): void => {
108
- editor.applyChanges();
109
- editor.closePanel();
110
- }}
111
- >
112
- OK
113
- </button>
114
- <button
115
- className="ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
116
- onClick={() => editor.closePanel()}
117
- >
118
- Cancel
119
- </button>
120
- <button
121
- className="ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
122
- onClick={() => editor.applyChanges()}
123
- >
124
- Apply
125
- </button>
66
+ <div className="h-full w-full overflow-auto border border-neutral-300 bg-white">
67
+ {selectedTab === DataCubeEditorTab.GENERAL_PROPERTIES && (
68
+ <DataCubeEditorGeneralPropertiesPanel />
69
+ )}
70
+ {selectedTab === DataCubeEditorTab.COLUMN_PROPERTIES && (
71
+ <DataCubeEditorColumnPropertiesPanel />
72
+ )}
73
+ {selectedTab === DataCubeEditorTab.FILTER && (
74
+ <DataCubeEditorFilterPanel />
75
+ )}
76
+ {selectedTab === DataCubeEditorTab.EXTENDED_COLUMNS && (
77
+ <DataCubeEditorExtendedColumnsPanel />
78
+ )}
79
+ {selectedTab === DataCubeEditorTab.COLUMNS && (
80
+ <DataCubeEditorColumnsPanel />
81
+ )}
82
+ {selectedTab === DataCubeEditorTab.SORTS && (
83
+ <DataCubeEditorSortsPanel />
84
+ )}
85
+ {selectedTab === DataCubeEditorTab.VERTICAL_PIVOTS && (
86
+ <DataCubeEditorVerticalPivotsPanel />
87
+ )}
88
+ {selectedTab === DataCubeEditorTab.HORIZONTAL_PIVOTS && (
89
+ <DataCubeEditorHorizontalPivotsPanel />
90
+ )}
91
+ {selectedTab === DataCubeEditorTab.CODE && (
92
+ <DataCubeEditorCodePanel />
93
+ )}
126
94
  </div>
127
- </REPLWindow>
128
- );
129
- },
130
- );
95
+ </div>
96
+ <div className="flex h-10 items-center justify-end px-2">
97
+ <button
98
+ className="h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
99
+ onClick={(): void => {
100
+ editor.applyChanges();
101
+ editor.display.close();
102
+ }}
103
+ >
104
+ OK
105
+ </button>
106
+ <button
107
+ className="ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
108
+ onClick={() => editor.display.close()}
109
+ >
110
+ Cancel
111
+ </button>
112
+ <button
113
+ className="ml-2 h-6 w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95"
114
+ onClick={() => editor.applyChanges()}
115
+ >
116
+ Apply
117
+ </button>
118
+ </div>
119
+ </>
120
+ );
121
+ });
@@ -18,12 +18,12 @@ import { observer } from 'mobx-react-lite';
18
18
  import { DataCubeIcon } from '@finos/legend-art';
19
19
  import { useEffect } from 'react';
20
20
  import { useREPLStore } from '../../REPLStoreProvider.js';
21
- import { WIP_Badge } from './DataCubeEditorShared.js';
21
+ import { FormBadge_WIP } from '../../repl/Form.js';
22
22
 
23
23
  // const DataCubeCodeEditor = observer(() => {
24
- // const replStore = useREPLStore();
25
- // const applicationStore = replStore.applicationStore;
26
- // const dataCubeState = replStore.dataCubeState;
24
+ // const repl = userepl();
25
+ // const application = repl.application;
26
+ // const dataCubeState = repl.dataCubeState;
27
27
  // const queryEditorState = dataCubeState.editor.codePanel.queryEditorState;
28
28
  // const onDidChangeModelContentEventDisposer = useRef<IDisposable | undefined>(
29
29
  // undefined,
@@ -42,10 +42,10 @@ import { WIP_Badge } from './DataCubeEditorShared.js';
42
42
  // () =>
43
43
  // debounce((): void => {
44
44
  // flowResult(dataCubeState.editor.codePanel.parseQuery()).catch(
45
- // replStore.applicationStore.logUnhandledError,
45
+ // repl.application.logUnhandledError,
46
46
  // );
47
47
  // }, 1000),
48
- // [dataCubeState, replStore.applicationStore.logUnhandledError],
48
+ // [dataCubeState, repl.application.logUnhandledError],
49
49
  // );
50
50
 
51
51
  // if (editor) {
@@ -111,7 +111,7 @@ import { WIP_Badge } from './DataCubeEditorShared.js';
111
111
  // const _editor = monacoEditorAPI.create(element, {
112
112
  // ...getBaseCodeEditorOptions(),
113
113
  // language: CODE_EDITOR_LANGUAGE.PURE,
114
- // theme: applicationStore.layoutService
114
+ // theme: application.layoutService
115
115
  // .TEMPORARY__isLightColorThemeEnabled
116
116
  // ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT
117
117
  // : CODE_EDITOR_THEME.DEFAULT_DARK,
@@ -119,7 +119,7 @@ import { WIP_Badge } from './DataCubeEditorShared.js';
119
119
  // setEditor(_editor);
120
120
  // }
121
121
  // }, [
122
- // applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,
122
+ // application.layoutService.TEMPORARY__isLightColorThemeEnabled,
123
123
  // editor,
124
124
  // ]);
125
125
 
@@ -143,12 +143,12 @@ import { WIP_Badge } from './DataCubeEditorShared.js';
143
143
  // });
144
144
 
145
145
  export const DataCubeEditorCodePanel = observer(() => {
146
- const replStore = useREPLStore();
147
- const panel = replStore.dataCube.editor.sorts;
146
+ const repl = useREPLStore();
147
+ const panel = repl.dataCube.editor.sorts;
148
148
  // const executeLambda = (): void => {
149
149
  // // TODO: @akphi
150
150
  // // flowResult(dataCubeState.executeLambda()).catch(
151
- // // editorStore.applicationStore.logUnhandledError,
151
+ // // editorStore.application.logUnhandledError,
152
152
  // // );
153
153
  // };
154
154
 
@@ -162,7 +162,7 @@ export const DataCubeEditorCodePanel = observer(() => {
162
162
  </div>
163
163
  <div className="ml-1 flex h-6 items-center text-xl font-medium">
164
164
  Code
165
- <WIP_Badge />
165
+ <FormBadge_WIP />
166
166
  </div>
167
167
  </div>
168
168
  <div className="flex h-[calc(100%_-_24px)] w-full"></div>