@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
@@ -1,179 +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 { useState } from 'react';
18
- import { DataCubeIcon, ResizableAndDraggableBox, cn } from '@finos/legend-art';
19
-
20
- const WINDOW_DEFAULT_OFFSET = 50;
21
- const WINDOW_DEFAULT_WIDTH = 800;
22
- const WINDOW_DEFAULT_HEIGHT = 600;
23
- const WINDOW_DEFAULT_MIN_WIDTH = 300;
24
- const WINDOW_DEFAULT_MIN_HEIGHT = 300;
25
-
26
- export type REPLWindowConfig = {
27
- title: string;
28
- uuid: string;
29
-
30
- x?: number | undefined;
31
- y?: number | undefined;
32
- width?: number | undefined;
33
- height?: number | undefined;
34
- minWidth?: number | undefined;
35
- minHeight?: number | undefined;
36
- center?: boolean | undefined;
37
- };
38
-
39
- export const REPLWindow = (props: {
40
- containerRef: React.RefObject<HTMLDivElement>;
41
- children: React.ReactNode;
42
- config: REPLWindowConfig;
43
- onClose: () => void;
44
- }) => {
45
- const { containerRef, children, onClose, config } = props;
46
-
47
- const [windowSpec, setWindowSpec] = useState(() => {
48
- const x = config.x ?? WINDOW_DEFAULT_OFFSET;
49
- const y = config.y ?? WINDOW_DEFAULT_OFFSET;
50
- const width = config.width ?? WINDOW_DEFAULT_WIDTH;
51
- const height = config.height ?? WINDOW_DEFAULT_HEIGHT;
52
-
53
- if (containerRef.current) {
54
- const { width: containerWidth, height: containerHeight } =
55
- containerRef.current.getBoundingClientRect();
56
-
57
- if (config.center) {
58
- const finalWidth =
59
- width + WINDOW_DEFAULT_OFFSET * 2 > containerWidth
60
- ? containerWidth - WINDOW_DEFAULT_OFFSET * 2
61
- : width;
62
- const finalHeight =
63
- height + WINDOW_DEFAULT_OFFSET * 2 > containerHeight
64
- ? containerHeight - WINDOW_DEFAULT_OFFSET * 2
65
- : height;
66
- return {
67
- x: (containerWidth - finalWidth) / 2,
68
- y: (containerHeight - finalHeight) / 2,
69
- width: finalWidth,
70
- height: finalHeight,
71
- };
72
- }
73
-
74
- return {
75
- x,
76
- y,
77
- width:
78
- width + x + WINDOW_DEFAULT_OFFSET > containerWidth
79
- ? containerWidth - x - WINDOW_DEFAULT_OFFSET
80
- : width,
81
- height:
82
- height + y + WINDOW_DEFAULT_OFFSET > containerHeight
83
- ? containerHeight - y - WINDOW_DEFAULT_OFFSET
84
- : height,
85
- };
86
- }
87
-
88
- return {
89
- x,
90
- y,
91
- width,
92
- height,
93
- };
94
- });
95
-
96
- return (
97
- <ResizableAndDraggableBox
98
- className="absolute z-10"
99
- handle={`.data-cube__window-${config.uuid}`}
100
- position={{ x: windowSpec.x, y: windowSpec.y }}
101
- size={{ width: windowSpec.width, height: windowSpec.height }}
102
- minWidth={config.minWidth ?? WINDOW_DEFAULT_MIN_WIDTH}
103
- minHeight={config.minHeight ?? WINDOW_DEFAULT_MIN_HEIGHT}
104
- onDragStop={(event, data) => {
105
- setWindowSpec({ ...windowSpec, x: data.x, y: data.y });
106
- }}
107
- dragHandleClassName={`data-cube__window-${config.uuid}`}
108
- onResize={(event, direction, ref, delta, position) => {
109
- setWindowSpec({
110
- ...position,
111
- width: ref.offsetWidth,
112
- height: ref.offsetHeight,
113
- });
114
- }}
115
- enableResizing={{
116
- top: true,
117
- right: true,
118
- bottom: true,
119
- left: true,
120
- topRight: true,
121
- bottomRight: true,
122
- bottomLeft: true,
123
- topLeft: true,
124
- }}
125
- resizeHandleStyles={{
126
- top: { cursor: 'ns-resize' },
127
- right: { cursor: 'ew-resize' },
128
- bottom: { cursor: 'ns-resize' },
129
- left: { cursor: 'ew-resize' },
130
- topRight: {
131
- cursor: 'nesw-resize',
132
- width: 14,
133
- height: 14,
134
- top: -7,
135
- right: -7,
136
- },
137
- bottomRight: {
138
- cursor: 'nwse-resize',
139
- width: 14,
140
- height: 14,
141
- bottom: -7,
142
- right: -7,
143
- },
144
- bottomLeft: {
145
- cursor: 'nesw-resize',
146
- width: 14,
147
- height: 14,
148
- bottom: -7,
149
- left: -7,
150
- },
151
- topLeft: {
152
- cursor: 'nwse-resize',
153
- width: 14,
154
- height: 14,
155
- top: -7,
156
- left: -7,
157
- },
158
- }}
159
- >
160
- <div className="h-full w-full border border-neutral-400 bg-neutral-200 shadow-xl">
161
- <div
162
- className={cn(
163
- `data-cube__window-${config.uuid}`,
164
- 'flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white active:cursor-move',
165
- )}
166
- >
167
- <div className="px-2">{config.title}</div>
168
- <button
169
- className="flex h-[23px] w-6 items-center justify-center hover:bg-red-500 hover:text-white"
170
- onClick={onClose}
171
- >
172
- <DataCubeIcon.X />
173
- </button>
174
- </div>
175
- <div className="h-[calc(100%_-_24px)] w-full">{children}</div>
176
- </div>
177
- </ResizableAndDraggableBox>
178
- );
179
- };
@@ -1,43 +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 { DataCubeIcon } from '@finos/legend-art';
18
- import { observer } from 'mobx-react-lite';
19
- import { useREPLStore } from '../../REPLStoreProvider.js';
20
- import { useEffect } from 'react';
21
- import { WIP_Badge } from './DataCubeEditorShared.js';
22
-
23
- export const DataCubeEditorDeveloperPanel = observer(() => {
24
- const replStore = useREPLStore();
25
- const panel = replStore.dataCube.editor.sorts;
26
-
27
- useEffect(() => {}, [panel]); // TODO: @akphi - remove this dummy useEffect
28
-
29
- return (
30
- <div className="h-full w-full select-none p-2">
31
- <div className="flex h-6">
32
- <div className="flex h-6 items-center text-xl font-medium">
33
- <DataCubeIcon.AdvancedSettings />
34
- </div>
35
- <div className="ml-1 flex h-6 items-center text-xl font-medium">
36
- Developer
37
- <WIP_Badge />
38
- </div>
39
- </div>
40
- <div className="flex h-[calc(100%_-_24px)] w-full"></div>
41
- </div>
42
- );
43
- });
@@ -1,48 +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 { LegendREPLApplicationStore } from './LegendREPLBaseStore.js';
18
- import { REPLServerClient } from '../server/REPLServerClient.js';
19
- import { NetworkClient } from '@finos/legend-shared';
20
- import { makeObservable, observable } from 'mobx';
21
- import { DataCubeState } from './dataCube/DataCubeState.js';
22
- import { DataCubeInfrastructure } from './dataCube/DataCubeInfrastructure.js';
23
-
24
- export class REPLStore {
25
- readonly applicationStore: LegendREPLApplicationStore;
26
- readonly client: REPLServerClient;
27
-
28
- dataCubeInfrastructure!: DataCubeInfrastructure;
29
- // TODO: when we support multi-view, we would need to support multiple states
30
- dataCube!: DataCubeState;
31
-
32
- constructor(applicationStore: LegendREPLApplicationStore) {
33
- makeObservable(this, {
34
- dataCube: observable,
35
- });
36
- this.applicationStore = applicationStore;
37
- this.client = new REPLServerClient(
38
- new NetworkClient({
39
- baseUrl: this.applicationStore.config.useDynamicREPLServer
40
- ? window.location.origin +
41
- this.applicationStore.config.baseAddress.replace('/repl/', '')
42
- : this.applicationStore.config.replUrl,
43
- }),
44
- );
45
- this.dataCubeInfrastructure = new DataCubeInfrastructure(this);
46
- this.dataCube = new DataCubeState(this);
47
- }
48
- }