@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.
- package/lib/{stores/CompletionResult.d.ts → __lib__/LegendREPLEvent.d.ts} +4 -6
- package/lib/__lib__/LegendREPLEvent.d.ts.map +1 -0
- package/lib/__lib__/LegendREPLEvent.js +21 -0
- package/lib/__lib__/LegendREPLEvent.js.map +1 -0
- package/lib/{stores/dataCube/DataCubePanelState.js → __lib__/LegendREPLSetting.d.ts} +3 -6
- package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -0
- package/lib/{components/grid/TDSLambdaBuilder.d.ts → __lib__/LegendREPLSetting.js} +5 -4
- package/lib/__lib__/LegendREPLSetting.js.map +1 -0
- package/lib/application/{LegendREPLGridClient.d.ts → LegendREPL.d.ts} +10 -10
- package/lib/application/LegendREPL.d.ts.map +1 -0
- package/lib/application/{LegendREPLGridClient.js → LegendREPL.js} +10 -15
- package/lib/application/LegendREPL.js.map +1 -0
- package/lib/application/{LegendREPLGridClientApplicationConfig.d.ts → LegendREPLApplicationConfig.d.ts} +4 -4
- package/lib/application/LegendREPLApplicationConfig.d.ts.map +1 -0
- package/lib/application/{LegendREPLGridClientApplicationConfig.js → LegendREPLApplicationConfig.js} +2 -2
- package/lib/application/LegendREPLApplicationConfig.js.map +1 -0
- package/lib/application/{LegendREPLGridClientPluginManager.d.ts → LegendREPLPluginManager.d.ts} +4 -4
- package/lib/application/LegendREPLPluginManager.d.ts.map +1 -0
- package/lib/application/{LegendREPLGridClientPluginManager.js → LegendREPLPluginManager.js} +3 -3
- package/lib/application/LegendREPLPluginManager.js.map +1 -0
- package/lib/components/{Core_LegendREPLGridClientApplicationPlugin.d.ts → Core_LegendREPLApplicationPlugin.d.ts} +3 -3
- package/lib/components/Core_LegendREPLApplicationPlugin.d.ts.map +1 -0
- package/lib/components/{Core_LegendREPLGridClientApplicationPlugin.js → Core_LegendREPLApplicationPlugin.js} +12 -7
- package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -0
- package/lib/components/{AgGrid.d.ts → LegendREPLApplication.d.ts} +8 -6
- package/lib/components/LegendREPLApplication.d.ts.map +1 -0
- package/lib/components/LegendREPLApplication.js +32 -0
- package/lib/components/LegendREPLApplication.js.map +1 -0
- package/lib/components/{LegendREPLGridClientFrameworkProvider.d.ts → LegendREPLFrameworkProvider.d.ts} +4 -4
- package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -0
- package/lib/components/{LegendREPLGridClientFrameworkProvider.js → LegendREPLFrameworkProvider.js} +9 -9
- package/lib/components/LegendREPLFrameworkProvider.js.map +1 -0
- package/lib/components/{REPLGridClientStoreProvider.d.ts → REPLStoreProvider.d.ts} +5 -5
- package/lib/components/REPLStoreProvider.d.ts.map +1 -0
- package/lib/components/{REPLGridClientStoreProvider.js → REPLStoreProvider.js} +9 -9
- package/lib/components/REPLStoreProvider.js.map +1 -0
- package/lib/components/dataCube/DataCube.d.ts +19 -0
- package/lib/components/dataCube/DataCube.d.ts.map +1 -0
- package/lib/components/dataCube/DataCube.js +33 -0
- package/lib/components/dataCube/DataCube.js.map +1 -0
- package/lib/components/{REPLGridClient.d.ts → dataCube/editor/DataCubeEditor.d.ts} +5 -9
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditor.js +54 -0
- package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -0
- package/lib/components/dataCube/{DataCubeQueryTextEditor.js → editor/DataCubeEditorCodePanel.js} +20 -20
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -0
- package/lib/components/dataCube/{DataCubeGridEditor.d.ts → editor/DataCubeEditorSortPanel.d.ts} +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js +61 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js.map +1 -0
- package/lib/components/dataCube/{DataCubeQueryTextEditor.d.ts → grid/DataCubeGrid.d.ts} +4 -4
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -0
- package/lib/components/dataCube/grid/DataCubeGrid.js +59 -0
- package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -0
- package/lib/grid.css +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +8 -8
- package/lib/index.js.map +1 -1
- package/lib/package.json +3 -3
- package/lib/repl.css +1 -1
- package/lib/server/REPLServerClient.d.ts +11 -13
- package/lib/server/REPLServerClient.d.ts.map +1 -1
- package/lib/server/REPLServerClient.js +27 -15
- package/lib/server/REPLServerClient.js.map +1 -1
- package/lib/server/models/DataCubeEngineModels.d.ts +50 -0
- package/lib/server/models/DataCubeEngineModels.d.ts.map +1 -0
- package/lib/server/models/DataCubeEngineModels.js +39 -0
- package/lib/server/models/DataCubeEngineModels.js.map +1 -0
- package/lib/server/models/DataCubeQuery.d.ts +41 -0
- package/lib/server/models/DataCubeQuery.d.ts.map +1 -0
- package/lib/server/models/DataCubeQuery.js +78 -0
- package/lib/server/models/DataCubeQuery.js.map +1 -0
- package/lib/stores/{LegendREPLGridClientApplicationPlugin.d.ts → LegendREPLApplicationPlugin.d.ts} +4 -4
- package/lib/stores/LegendREPLApplicationPlugin.d.ts.map +1 -0
- package/lib/stores/{LegendREPLGridClientApplicationPlugin.js → LegendREPLApplicationPlugin.js} +2 -2
- package/lib/stores/LegendREPLApplicationPlugin.js.map +1 -0
- package/lib/stores/LegendREPLBaseStore.d.ts +25 -0
- package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -0
- package/lib/stores/{LegendREPLGridClientBaseStore.js → LegendREPLBaseStore.js} +2 -2
- package/lib/stores/LegendREPLBaseStore.js.map +1 -0
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts +49 -0
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts.map +1 -0
- package/lib/stores/dataCube/DataCubeMetaModelConst.js +57 -0
- package/lib/stores/dataCube/DataCubeMetaModelConst.js.map +1 -0
- package/lib/stores/dataCube/DataCubeState.d.ts +18 -23
- package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
- package/lib/stores/dataCube/DataCubeState.js +31 -181
- package/lib/stores/dataCube/DataCubeState.js.map +1 -1
- package/lib/stores/{REPLGridClientStore.d.ts → dataCube/DataCubeStore.d.ts} +7 -7
- package/lib/stores/dataCube/DataCubeStore.d.ts.map +1 -0
- package/lib/stores/{REPLGridClientStore.js → dataCube/DataCubeStore.js} +5 -4
- package/lib/stores/dataCube/DataCubeStore.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts +29 -0
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeEngine.js +47 -0
- package/lib/stores/dataCube/core/DataCubeEngine.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts +37 -0
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js +269 -0
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts +19 -0
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +98 -0
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts +73 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js +56 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js.map +1 -0
- package/lib/stores/dataCube/{DataCubePanelState.d.ts → core/DataCubeQuerySnapshotManager.d.ts} +11 -6
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js +46 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +27 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -0
- package/lib/{components/grid/REPLGridServerResult.js → stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js} +18 -10
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -0
- package/lib/stores/dataCube/{DataCubeQueryEditorState.d.ts → editor/DataCubeEditorCodeState.d.ts} +12 -2
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js +87 -0
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts +28 -0
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js +17 -0
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts +46 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js +133 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +44 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.js +77 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -0
- package/lib/{components/grid/ServerSideDataSource.d.ts → stores/dataCube/grid/DataCubeGridClientEngine.d.ts} +17 -14
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +96 -0
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts +19 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js +224 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +33 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.js +50 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -0
- package/package.json +9 -9
- package/src/{Const.ts → __lib__/LegendREPLEvent.ts} +1 -16
- package/{lib/components/grid/REPLGridServerResult.d.ts → src/__lib__/LegendREPLSetting.ts} +3 -6
- package/src/application/LegendREPL.tsx +64 -0
- package/src/application/{LegendREPLGridClientApplicationConfig.ts → LegendREPLApplicationConfig.ts} +3 -3
- package/src/application/{LegendREPLGridClientPluginManager.ts → LegendREPLPluginManager.ts} +5 -5
- package/src/components/{Core_LegendREPLGridClientApplicationPlugin.tsx → Core_LegendREPLApplicationPlugin.tsx} +11 -6
- package/src/components/{LegendREPLGridClientApplication.tsx → LegendREPLApplication.tsx} +11 -28
- package/src/components/LegendREPLFrameworkProvider.tsx +57 -0
- package/src/components/{REPLGridClientStoreProvider.tsx → REPLStoreProvider.tsx} +17 -21
- package/src/components/dataCube/DataCube.tsx +63 -0
- package/src/components/dataCube/editor/DataCubeEditor.tsx +127 -0
- package/src/components/dataCube/{DataCubeQueryTextEditor.tsx → editor/DataCubeEditorCodePanel.tsx} +69 -76
- package/src/components/dataCube/editor/DataCubeEditorSortPanel.tsx +274 -0
- package/src/components/dataCube/grid/DataCubeGrid.tsx +77 -0
- package/src/index.tsx +12 -8
- package/src/server/REPLServerClient.ts +50 -78
- package/src/server/models/DataCubeEngineModels.ts +84 -0
- package/src/server/models/DataCubeQuery.ts +130 -0
- package/src/stores/{LegendREPLGridClientApplicationPlugin.ts → LegendREPLApplicationPlugin.ts} +4 -4
- package/src/stores/{LegendREPLGridClientBaseStore.ts → LegendREPLBaseStore.ts} +9 -9
- package/src/stores/dataCube/DataCubeMetaModelConst.ts +61 -0
- package/src/stores/dataCube/DataCubeState.ts +39 -303
- package/src/stores/{REPLGridClientStore.ts → dataCube/DataCubeStore.ts} +8 -6
- package/src/stores/dataCube/core/DataCubeEngine.ts +79 -0
- package/src/stores/dataCube/core/DataCubeQueryAnalyzer.ts +424 -0
- package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +151 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshot.ts +201 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +67 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +43 -0
- package/src/stores/dataCube/editor/DataCubeEditorCodeState.ts +166 -0
- package/src/{components/grid/REPLGridServerResult.ts → stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.ts} +14 -11
- package/src/stores/dataCube/editor/DataCubeEditorSortState.ts +198 -0
- package/src/stores/dataCube/editor/DataCubeEditorState.ts +94 -0
- package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +152 -0
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.ts +245 -0
- package/src/stores/dataCube/grid/DataCubeGridState.ts +62 -0
- package/tsconfig.json +33 -29
- package/lib/Const.d.ts +0 -32
- package/lib/Const.d.ts.map +0 -1
- package/lib/Const.js +0 -35
- package/lib/Const.js.map +0 -1
- package/lib/application/LegendREPLGridClient.d.ts.map +0 -1
- package/lib/application/LegendREPLGridClient.js.map +0 -1
- package/lib/application/LegendREPLGridClientApplicationConfig.d.ts.map +0 -1
- package/lib/application/LegendREPLGridClientApplicationConfig.js.map +0 -1
- package/lib/application/LegendREPLGridClientPluginManager.d.ts.map +0 -1
- package/lib/application/LegendREPLGridClientPluginManager.js.map +0 -1
- package/lib/components/AgGrid.d.ts.map +0 -1
- package/lib/components/AgGrid.js +0 -41
- package/lib/components/AgGrid.js.map +0 -1
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.d.ts.map +0 -1
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.js.map +0 -1
- package/lib/components/LegendREPLGridClientApplication.d.ts +0 -31
- package/lib/components/LegendREPLGridClientApplication.d.ts.map +0 -1
- package/lib/components/LegendREPLGridClientApplication.js +0 -39
- package/lib/components/LegendREPLGridClientApplication.js.map +0 -1
- package/lib/components/LegendREPLGridClientFrameworkProvider.d.ts.map +0 -1
- package/lib/components/LegendREPLGridClientFrameworkProvider.js.map +0 -1
- package/lib/components/REPLGridClient.d.ts.map +0 -1
- package/lib/components/REPLGridClient.js +0 -143
- package/lib/components/REPLGridClient.js.map +0 -1
- package/lib/components/REPLGridClientStoreProvider.d.ts.map +0 -1
- package/lib/components/REPLGridClientStoreProvider.js.map +0 -1
- package/lib/components/dataCube/DataCubeGridEditor.d.ts.map +0 -1
- package/lib/components/dataCube/DataCubeGridEditor.js +0 -37
- package/lib/components/dataCube/DataCubeGridEditor.js.map +0 -1
- package/lib/components/dataCube/DataCubeQueryTextEditor.d.ts.map +0 -1
- package/lib/components/dataCube/DataCubeQueryTextEditor.js.map +0 -1
- package/lib/components/grid/GridUtils.d.ts +0 -31
- package/lib/components/grid/GridUtils.d.ts.map +0 -1
- package/lib/components/grid/GridUtils.js +0 -174
- package/lib/components/grid/GridUtils.js.map +0 -1
- package/lib/components/grid/REPLGridServerResult.d.ts.map +0 -1
- package/lib/components/grid/REPLGridServerResult.js.map +0 -1
- package/lib/components/grid/ServerSideDataSource.d.ts.map +0 -1
- package/lib/components/grid/ServerSideDataSource.js +0 -109
- package/lib/components/grid/ServerSideDataSource.js.map +0 -1
- package/lib/components/grid/TDSLambdaBuilder.d.ts.map +0 -1
- package/lib/components/grid/TDSLambdaBuilder.js +0 -314
- package/lib/components/grid/TDSLambdaBuilder.js.map +0 -1
- package/lib/components/grid/TDSQuery.d.ts +0 -25
- package/lib/components/grid/TDSQuery.d.ts.map +0 -1
- package/lib/components/grid/TDSQuery.js +0 -32
- package/lib/components/grid/TDSQuery.js.map +0 -1
- package/lib/components/grid/TDSRequest.d.ts +0 -103
- package/lib/components/grid/TDSRequest.d.ts.map +0 -1
- package/lib/components/grid/TDSRequest.js +0 -172
- package/lib/components/grid/TDSRequest.js.map +0 -1
- package/lib/stores/CompletionResult.d.ts.map +0 -1
- package/lib/stores/CompletionResult.js +0 -26
- package/lib/stores/CompletionResult.js.map +0 -1
- package/lib/stores/LegendREPLGridClientApplicationPlugin.d.ts.map +0 -1
- package/lib/stores/LegendREPLGridClientApplicationPlugin.js.map +0 -1
- package/lib/stores/LegendREPLGridClientBaseStore.d.ts +0 -25
- package/lib/stores/LegendREPLGridClientBaseStore.d.ts.map +0 -1
- package/lib/stores/LegendREPLGridClientBaseStore.js.map +0 -1
- package/lib/stores/REPLGridClientStore.d.ts.map +0 -1
- package/lib/stores/REPLGridClientStore.js.map +0 -1
- package/lib/stores/dataCube/DataCubeConfigState.d.ts +0 -32
- package/lib/stores/dataCube/DataCubeConfigState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeConfigState.js +0 -62
- package/lib/stores/dataCube/DataCubeConfigState.js.map +0 -1
- package/lib/stores/dataCube/DataCubeGridState.d.ts +0 -39
- package/lib/stores/dataCube/DataCubeGridState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeGridState.js +0 -108
- package/lib/stores/dataCube/DataCubeGridState.js.map +0 -1
- package/lib/stores/dataCube/DataCubePanelState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubePanelState.js.map +0 -1
- package/lib/stores/dataCube/DataCubePropertiesPanelState.d.ts +0 -34
- package/lib/stores/dataCube/DataCubePropertiesPanelState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubePropertiesPanelState.js +0 -57
- package/lib/stores/dataCube/DataCubePropertiesPanelState.js.map +0 -1
- package/lib/stores/dataCube/DataCubeQueryEditorState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeQueryEditorState.js +0 -49
- package/lib/stores/dataCube/DataCubeQueryEditorState.js.map +0 -1
- package/lib/stores/dataCube/DataCubeQueryTextEditorState.d.ts +0 -25
- package/lib/stores/dataCube/DataCubeQueryTextEditorState.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeQueryTextEditorState.js +0 -35
- package/lib/stores/dataCube/DataCubeQueryTextEditorState.js.map +0 -1
- package/lib/stores/dataCube/HPivotAndSortPanelState.d.ts +0 -40
- package/lib/stores/dataCube/HPivotAndSortPanelState.d.ts.map +0 -1
- package/lib/stores/dataCube/HPivotAndSortPanelState.js +0 -130
- package/lib/stores/dataCube/HPivotAndSortPanelState.js.map +0 -1
- package/src/application/LegendREPLGridClient.tsx +0 -72
- package/src/components/AgGrid.tsx +0 -59
- package/src/components/LegendREPLGridClientFrameworkProvider.tsx +0 -63
- package/src/components/REPLGridClient.tsx +0 -560
- package/src/components/dataCube/DataCubeGridEditor.tsx +0 -69
- package/src/components/grid/GridUtils.ts +0 -220
- package/src/components/grid/ServerSideDataSource.ts +0 -197
- package/src/components/grid/TDSLambdaBuilder.ts +0 -456
- package/src/components/grid/TDSQuery.ts +0 -37
- package/src/components/grid/TDSRequest.ts +0 -231
- package/src/stores/CompletionResult.ts +0 -30
- package/src/stores/dataCube/DataCubeConfigState.ts +0 -79
- package/src/stores/dataCube/DataCubeGridState.ts +0 -143
- package/src/stores/dataCube/DataCubePanelState.ts +0 -28
- package/src/stores/dataCube/DataCubePropertiesPanelState.ts +0 -65
- package/src/stores/dataCube/DataCubeQueryEditorState.ts +0 -66
- package/src/stores/dataCube/DataCubeQueryTextEditorState.ts +0 -41
- package/src/stores/dataCube/HPivotAndSortPanelState.ts +0 -170
|
@@ -16,24 +16,29 @@
|
|
|
16
16
|
|
|
17
17
|
import type { LegendApplicationSetup } from '@finos/legend-application';
|
|
18
18
|
import packageJson from '../../package.json' assert { type: 'json' };
|
|
19
|
-
import {
|
|
20
|
-
import { configureAgGridComponent } from './AgGrid.js';
|
|
19
|
+
import { LegendREPLApplicationPlugin } from '../stores/LegendREPLApplicationPlugin.js';
|
|
21
20
|
import {
|
|
22
21
|
configureCodeEditorComponent,
|
|
23
22
|
setupPureLanguageService,
|
|
24
23
|
} from '@finos/legend-lego/code-editor';
|
|
24
|
+
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
25
|
+
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
26
|
+
import { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';
|
|
25
27
|
|
|
26
|
-
export class
|
|
27
|
-
static NAME = packageJson.extensions.
|
|
28
|
+
export class Core_LegendREPLApplicationPlugin extends LegendREPLApplicationPlugin {
|
|
29
|
+
static NAME = packageJson.extensions.applicationREPLPlugin;
|
|
28
30
|
|
|
29
31
|
constructor() {
|
|
30
|
-
super(
|
|
32
|
+
super(Core_LegendREPLApplicationPlugin.NAME, packageJson.version);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
override getExtraApplicationSetups(): LegendApplicationSetup[] {
|
|
34
36
|
return [
|
|
35
37
|
async (applicationStore) => {
|
|
36
|
-
|
|
38
|
+
ModuleRegistry.registerModules([
|
|
39
|
+
ClientSideRowModelModule,
|
|
40
|
+
RowGroupingModule,
|
|
41
|
+
]);
|
|
37
42
|
await configureCodeEditorComponent(applicationStore);
|
|
38
43
|
setupPureLanguageService();
|
|
39
44
|
},
|
|
@@ -20,42 +20,25 @@ import {
|
|
|
20
20
|
Switch,
|
|
21
21
|
type TEMPORARY__ReactRouterComponentType,
|
|
22
22
|
} from '@finos/legend-application/browser';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { DataCube } from './dataCube/DataCube.js';
|
|
24
|
+
import { LegendREPLFrameworkProvider } from './LegendREPLFrameworkProvider.js';
|
|
25
25
|
import { observer } from 'mobx-react-lite';
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
export enum LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN {
|
|
29
|
-
QUERY_ID = 'queryId',
|
|
30
|
-
}
|
|
26
|
+
import { withREPLStore } from './REPLStoreProvider.js';
|
|
31
27
|
|
|
32
28
|
export const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({
|
|
33
|
-
|
|
34
|
-
SAVED_QUERY: `/query/:${LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID}`,
|
|
29
|
+
DATA_CUBE: `/dataCube`,
|
|
35
30
|
});
|
|
36
31
|
|
|
37
|
-
export
|
|
38
|
-
[LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID]: string;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const LegendREPLGridClientRouter = withEditorStore(
|
|
32
|
+
export const LegendREPLRouter = withREPLStore(
|
|
42
33
|
observer(() => (
|
|
43
34
|
<div className="app">
|
|
44
35
|
<Switch>
|
|
45
36
|
<Route
|
|
46
37
|
exact={true}
|
|
47
|
-
path={[LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.
|
|
48
|
-
component={
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
50
|
-
Editor as TEMPORARY__ReactRouterComponentType
|
|
51
|
-
}
|
|
52
|
-
/>
|
|
53
|
-
<Route
|
|
54
|
-
exact={true}
|
|
55
|
-
path={[LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.SAVED_QUERY]}
|
|
38
|
+
path={[LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE]}
|
|
56
39
|
component={
|
|
57
40
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
58
|
-
|
|
41
|
+
DataCube as TEMPORARY__ReactRouterComponentType
|
|
59
42
|
}
|
|
60
43
|
/>
|
|
61
44
|
</Switch>
|
|
@@ -63,16 +46,16 @@ export const LegendREPLGridClientRouter = withEditorStore(
|
|
|
63
46
|
)),
|
|
64
47
|
);
|
|
65
48
|
|
|
66
|
-
export const
|
|
49
|
+
export const LegendREPLWebApplication: React.FC<{
|
|
67
50
|
baseUrl: string;
|
|
68
51
|
}> = (props) => {
|
|
69
52
|
const { baseUrl } = props;
|
|
70
53
|
|
|
71
54
|
return (
|
|
72
55
|
<BrowserEnvironmentProvider baseUrl={baseUrl}>
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
</
|
|
56
|
+
<LegendREPLFrameworkProvider>
|
|
57
|
+
<LegendREPLRouter />
|
|
58
|
+
</LegendREPLFrameworkProvider>
|
|
76
59
|
</BrowserEnvironmentProvider>
|
|
77
60
|
);
|
|
78
61
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { createContext } from 'react';
|
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
+
import {
|
|
20
|
+
ApplicationFrameworkProvider,
|
|
21
|
+
useApplicationStore,
|
|
22
|
+
} from '@finos/legend-application';
|
|
23
|
+
import type { LegendREPLPluginManager } from '../application/LegendREPLPluginManager.js';
|
|
24
|
+
import type { LegendREPLApplicationConfig } from '../application/LegendREPLApplicationConfig.js';
|
|
25
|
+
import {
|
|
26
|
+
type LegendREPLApplicationStore,
|
|
27
|
+
LegendREPLBaseStore,
|
|
28
|
+
} from '../stores/LegendREPLBaseStore.js';
|
|
29
|
+
|
|
30
|
+
export const useLegendREPLApplicationStore = (): LegendREPLApplicationStore =>
|
|
31
|
+
useApplicationStore<LegendREPLApplicationConfig, LegendREPLPluginManager>();
|
|
32
|
+
|
|
33
|
+
const LegendREPLBaseStoreContext = createContext<
|
|
34
|
+
LegendREPLBaseStore | undefined
|
|
35
|
+
>(undefined);
|
|
36
|
+
|
|
37
|
+
const LegendREPLBaseStoreProvider: React.FC<{
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
}> = ({ children }) => {
|
|
40
|
+
const applicationStore = useLegendREPLApplicationStore();
|
|
41
|
+
const store = useLocalObservable(
|
|
42
|
+
() => new LegendREPLBaseStore(applicationStore),
|
|
43
|
+
);
|
|
44
|
+
return (
|
|
45
|
+
<LegendREPLBaseStoreContext.Provider value={store}>
|
|
46
|
+
{children}
|
|
47
|
+
</LegendREPLBaseStoreContext.Provider>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const LegendREPLFrameworkProvider: React.FC<{
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
}> = ({ children }) => (
|
|
54
|
+
<ApplicationFrameworkProvider>
|
|
55
|
+
<LegendREPLBaseStoreProvider>{children}</LegendREPLBaseStoreProvider>
|
|
56
|
+
</ApplicationFrameworkProvider>
|
|
57
|
+
);
|
|
@@ -16,46 +16,42 @@
|
|
|
16
16
|
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
-
import {
|
|
19
|
+
import { REPLStore } from '../stores/dataCube/DataCubeStore.js';
|
|
20
20
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
21
|
import { useApplicationStore } from '@finos/legend-application';
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
22
|
+
import type { LegendREPLApplicationConfig } from '../application/LegendREPLApplicationConfig.js';
|
|
23
|
+
import type { LegendREPLPluginManager } from '../application/LegendREPLPluginManager.js';
|
|
24
24
|
|
|
25
|
-
const
|
|
26
|
-
undefined,
|
|
27
|
-
);
|
|
25
|
+
const REPLStoreContext = createContext<REPLStore | undefined>(undefined);
|
|
28
26
|
|
|
29
|
-
export const
|
|
27
|
+
export const REPLStoreProvider = ({
|
|
30
28
|
children,
|
|
31
29
|
}: {
|
|
32
30
|
children: React.ReactNode;
|
|
33
31
|
}): React.ReactElement => {
|
|
34
32
|
const applicationStore = useApplicationStore<
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
LegendREPLApplicationConfig,
|
|
34
|
+
LegendREPLPluginManager
|
|
37
35
|
>();
|
|
38
|
-
const store = useLocalObservable(
|
|
39
|
-
() => new REPLGridClientStore(applicationStore),
|
|
40
|
-
);
|
|
36
|
+
const store = useLocalObservable(() => new REPLStore(applicationStore));
|
|
41
37
|
return (
|
|
42
|
-
<
|
|
38
|
+
<REPLStoreContext.Provider value={store}>
|
|
43
39
|
{children}
|
|
44
|
-
</
|
|
40
|
+
</REPLStoreContext.Provider>
|
|
45
41
|
);
|
|
46
42
|
};
|
|
47
43
|
|
|
48
|
-
export const
|
|
44
|
+
export const useREPLStore = (): REPLStore =>
|
|
49
45
|
guaranteeNonNullable(
|
|
50
|
-
useContext(
|
|
51
|
-
`Can't find
|
|
46
|
+
useContext(REPLStoreContext),
|
|
47
|
+
`Can't find REPL store in context`,
|
|
52
48
|
);
|
|
53
49
|
|
|
54
|
-
export const
|
|
55
|
-
function
|
|
50
|
+
export const withREPLStore = (WrappedComponent: React.FC): React.FC =>
|
|
51
|
+
function WithREPLStore() {
|
|
56
52
|
return (
|
|
57
|
-
<
|
|
53
|
+
<REPLStoreProvider>
|
|
58
54
|
<WrappedComponent />
|
|
59
|
-
</
|
|
55
|
+
</REPLStoreProvider>
|
|
60
56
|
);
|
|
61
57
|
};
|
|
@@ -0,0 +1,63 @@
|
|
|
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 { useREPLStore } from '../REPLStoreProvider.js';
|
|
19
|
+
import { useEffect, useRef } from 'react';
|
|
20
|
+
import { DataCubeGrid } from './grid/DataCubeGrid.js';
|
|
21
|
+
import { PivotPanelEditor } from './editor/DataCubeEditor.js';
|
|
22
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
23
|
+
|
|
24
|
+
export const DataCube = observer(() => {
|
|
25
|
+
const dataCubeStore = useREPLStore();
|
|
26
|
+
const applicationStore = useApplicationStore();
|
|
27
|
+
const dataCubeState = dataCubeStore.dataCubeState;
|
|
28
|
+
const pivotPanelButtonRef = useRef<HTMLDivElement>(null);
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
dataCubeState.initialize().catch(applicationStore.alertUnhandledError);
|
|
32
|
+
}, [dataCubeState, applicationStore]);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<div className="repl">
|
|
36
|
+
<div className="repl__header">
|
|
37
|
+
<div className="repl__header__content">
|
|
38
|
+
<div className="repl__header__content__title">Legend DataCube</div>
|
|
39
|
+
<div className="repl__header__actions"></div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div className="repl__content">
|
|
43
|
+
<DataCubeGrid editorStore={dataCubeStore} />
|
|
44
|
+
</div>
|
|
45
|
+
<div className="repl__footer">
|
|
46
|
+
<div
|
|
47
|
+
className="repl__footer__pivot"
|
|
48
|
+
ref={pivotPanelButtonRef}
|
|
49
|
+
onClick={(): void => dataCubeState.editor.openPanel()}
|
|
50
|
+
>
|
|
51
|
+
Pivot
|
|
52
|
+
</div>
|
|
53
|
+
<div className="repl__footer__filter">Filter</div>
|
|
54
|
+
{dataCubeState.editor.isPanelOpen && (
|
|
55
|
+
<PivotPanelEditor
|
|
56
|
+
editorStore={dataCubeStore}
|
|
57
|
+
triggerElement={pivotPanelButtonRef.current}
|
|
58
|
+
/>
|
|
59
|
+
)}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
});
|
|
@@ -0,0 +1,127 @@
|
|
|
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 {
|
|
19
|
+
TimesIcon,
|
|
20
|
+
clsx,
|
|
21
|
+
BasePopover,
|
|
22
|
+
Modal,
|
|
23
|
+
ModalBody,
|
|
24
|
+
ModalFooter,
|
|
25
|
+
ModalFooterButton,
|
|
26
|
+
ModalHeader,
|
|
27
|
+
ModalHeaderActions,
|
|
28
|
+
ModalTitle,
|
|
29
|
+
} from '@finos/legend-art';
|
|
30
|
+
import type { REPLStore } from '../../../stores/dataCube/DataCubeStore.js';
|
|
31
|
+
import { DATA_CUBE_EDITOR_TAB } from '../../../stores/dataCube/editor/DataCubeEditorState.js';
|
|
32
|
+
import { DataCubeEditorSortPanel } from './DataCubeEditorSortPanel.js';
|
|
33
|
+
|
|
34
|
+
export const PivotPanelEditor = observer(
|
|
35
|
+
(props: { triggerElement: HTMLElement | null; editorStore: REPLStore }) => {
|
|
36
|
+
const { triggerElement, editorStore } = props;
|
|
37
|
+
const dataCubeState = editorStore.dataCubeState;
|
|
38
|
+
const applicationStore = editorStore.applicationStore;
|
|
39
|
+
const closeEditor = (): void => {
|
|
40
|
+
dataCubeState.editor.closePanel();
|
|
41
|
+
};
|
|
42
|
+
const selectedTab = dataCubeState.editor.currentTab;
|
|
43
|
+
const tabOptions = [
|
|
44
|
+
// DATA_CUBE_EDITOR_TAB.COLUMNS,
|
|
45
|
+
DATA_CUBE_EDITOR_TAB.SORTS,
|
|
46
|
+
// DATA_CUBE_EDITOR_TAB.HORIZONTAL_PIVOTS,
|
|
47
|
+
// DATA_CUBE_EDITOR_TAB.VERTICAL_PIVOTS,
|
|
48
|
+
// DATA_CUBE_EDITOR_TAB.GENERAL_PROPERTIES,
|
|
49
|
+
// DATA_CUBE_EDITOR_TAB.COLUMN_PROPERTIES,
|
|
50
|
+
];
|
|
51
|
+
const setSelectedTab = (tab: DATA_CUBE_EDITOR_TAB): void => {
|
|
52
|
+
dataCubeState.editor.setCurrentTab(tab);
|
|
53
|
+
};
|
|
54
|
+
const onClickOk = (): void => {
|
|
55
|
+
dataCubeState.editor.applyChanges();
|
|
56
|
+
dataCubeState.editor.closePanel();
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<BasePopover
|
|
61
|
+
open={dataCubeState.editor.isPanelOpen}
|
|
62
|
+
onClose={closeEditor}
|
|
63
|
+
anchorEl={triggerElement}
|
|
64
|
+
anchorOrigin={{
|
|
65
|
+
vertical: 'center',
|
|
66
|
+
horizontal: 'center',
|
|
67
|
+
}}
|
|
68
|
+
transformOrigin={{
|
|
69
|
+
vertical: 'center',
|
|
70
|
+
horizontal: 'center',
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<Modal
|
|
74
|
+
darkMode={
|
|
75
|
+
!applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
|
|
76
|
+
}
|
|
77
|
+
className="editor-modal embedded-runtime-editor"
|
|
78
|
+
>
|
|
79
|
+
<ModalHeader>
|
|
80
|
+
<ModalTitle title="cube properties" />
|
|
81
|
+
<ModalHeaderActions>
|
|
82
|
+
<button
|
|
83
|
+
className="modal__header__action"
|
|
84
|
+
tabIndex={-1}
|
|
85
|
+
onClick={closeEditor}
|
|
86
|
+
>
|
|
87
|
+
<TimesIcon />
|
|
88
|
+
</button>
|
|
89
|
+
</ModalHeaderActions>
|
|
90
|
+
</ModalHeader>
|
|
91
|
+
<ModalBody>
|
|
92
|
+
<div style={{ height: '100%', width: '100%' }}>
|
|
93
|
+
<div className="panel__header uml-element-editor__tabs__header ">
|
|
94
|
+
<div className="uml-element-editor__tabs">
|
|
95
|
+
{tabOptions.map((tab) => (
|
|
96
|
+
<div
|
|
97
|
+
key={tab}
|
|
98
|
+
onClick={(): void => setSelectedTab(tab)}
|
|
99
|
+
className={clsx('uml-element-editor__tab', {
|
|
100
|
+
'uml-element-editor__tab--active': tab === selectedTab,
|
|
101
|
+
})}
|
|
102
|
+
>
|
|
103
|
+
{tab}
|
|
104
|
+
</div>
|
|
105
|
+
))}
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
{selectedTab === DATA_CUBE_EDITOR_TAB.SORTS && (
|
|
109
|
+
<DataCubeEditorSortPanel editorStore={editorStore} />
|
|
110
|
+
)}
|
|
111
|
+
</div>
|
|
112
|
+
</ModalBody>
|
|
113
|
+
<ModalFooter className="repl__modal__footer">
|
|
114
|
+
<div className="search-modal__actions">
|
|
115
|
+
<ModalFooterButton text="Ok" onClick={onClickOk} />
|
|
116
|
+
<ModalFooterButton text="Close" onClick={closeEditor} />
|
|
117
|
+
<ModalFooterButton
|
|
118
|
+
text="Apply"
|
|
119
|
+
onClick={(): void => dataCubeState.editor.applyChanges()}
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</ModalFooter>
|
|
123
|
+
</Modal>
|
|
124
|
+
</BasePopover>
|
|
125
|
+
);
|
|
126
|
+
},
|
|
127
|
+
);
|
package/src/components/dataCube/{DataCubeQueryTextEditor.tsx → editor/DataCubeEditorCodePanel.tsx}
RENAMED
|
@@ -27,23 +27,22 @@ import {
|
|
|
27
27
|
CODE_EDITOR_LANGUAGE,
|
|
28
28
|
CODE_EDITOR_THEME,
|
|
29
29
|
disposeCodeEditor,
|
|
30
|
-
CodeEditor,
|
|
31
30
|
} from '@finos/legend-lego/code-editor';
|
|
32
31
|
import { debounce } from '@finos/legend-shared';
|
|
33
32
|
import { DEFAULT_TAB_SIZE } from '@finos/legend-application';
|
|
34
|
-
import {
|
|
33
|
+
import { useREPLStore } from '../../REPLStoreProvider.js';
|
|
35
34
|
import {
|
|
36
35
|
editor as monacoEditorAPI,
|
|
37
36
|
type IDisposable,
|
|
38
37
|
languages as monacoLanguagesAPI,
|
|
39
38
|
} from 'monaco-editor';
|
|
40
|
-
import type { REPLGridClientStore } from '../../stores/REPLGridClientStore.js';
|
|
41
39
|
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const applicationStore =
|
|
45
|
-
const dataCubeState =
|
|
46
|
-
const queryEditorState =
|
|
40
|
+
const DataCubeCodeEditor = observer(() => {
|
|
41
|
+
const replStore = useREPLStore();
|
|
42
|
+
const applicationStore = replStore.applicationStore;
|
|
43
|
+
const dataCubeState = replStore.dataCubeState;
|
|
44
|
+
const queryEditorState =
|
|
45
|
+
dataCubeState.editor.codeEditorState.queryEditorState;
|
|
47
46
|
const onDidChangeModelContentEventDisposer = useRef<IDisposable | undefined>(
|
|
48
47
|
undefined,
|
|
49
48
|
);
|
|
@@ -60,11 +59,11 @@ const QueryEditor = observer(() => {
|
|
|
60
59
|
const debouncedParseQuery = useMemo(
|
|
61
60
|
() =>
|
|
62
61
|
debounce((): void => {
|
|
63
|
-
flowResult(dataCubeState.parseQuery()).catch(
|
|
64
|
-
|
|
62
|
+
flowResult(dataCubeState.editor.codeEditorState.parseQuery()).catch(
|
|
63
|
+
replStore.applicationStore.alertUnhandledError,
|
|
65
64
|
);
|
|
66
65
|
}, 1000),
|
|
67
|
-
[dataCubeState,
|
|
66
|
+
[dataCubeState, replStore.applicationStore.alertUnhandledError],
|
|
68
67
|
);
|
|
69
68
|
|
|
70
69
|
if (editor) {
|
|
@@ -95,8 +94,10 @@ const QueryEditor = observer(() => {
|
|
|
95
94
|
{
|
|
96
95
|
triggerCharacters: ['>', '.', '$', '~'],
|
|
97
96
|
provideCompletionItems: async (model, position, context) => {
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
// TODO: @akphi - do this later when we support typeahead for extended columns, etc.
|
|
98
|
+
// const suggestions: monacoLanguagesAPI.CompletionItem[] =
|
|
99
|
+
// await dataCubeState.getTypeaheadResults(position, model);
|
|
100
|
+
const suggestions: monacoLanguagesAPI.CompletionItem[] = [];
|
|
100
101
|
return { suggestions };
|
|
101
102
|
},
|
|
102
103
|
},
|
|
@@ -159,76 +160,68 @@ const QueryEditor = observer(() => {
|
|
|
159
160
|
);
|
|
160
161
|
});
|
|
161
162
|
|
|
162
|
-
export const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
export const DataCubeQueryCodeEditor = observer(() => {
|
|
164
|
+
const executeLambda = (): void => {
|
|
165
|
+
// TODO: @akphi
|
|
166
|
+
// flowResult(dataCubeState.executeLambda()).catch(
|
|
167
|
+
// editorStore.applicationStore.alertUnhandledError,
|
|
168
|
+
// );
|
|
169
|
+
};
|
|
166
170
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
return (
|
|
172
|
+
<div className="repl__content__query">
|
|
173
|
+
<div className="repl__query">
|
|
174
|
+
<div className="repl__query__editor">
|
|
175
|
+
<div className="repl__query__header">
|
|
176
|
+
<div className="repl__query__label">Curent Query</div>
|
|
177
|
+
<div className="repl__query__execute-btn btn__dropdown-combo btn__dropdown-combo--primary">
|
|
178
|
+
<button
|
|
179
|
+
className="btn__dropdown-combo__label"
|
|
180
|
+
onClick={executeLambda}
|
|
181
|
+
tabIndex={-1}
|
|
182
|
+
>
|
|
183
|
+
<PlayIcon className="btn__dropdown-combo__label__icon" />
|
|
184
|
+
<div className="btn__dropdown-combo__label__title">
|
|
185
|
+
Run Query
|
|
186
|
+
</div>
|
|
187
|
+
</button>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
<div className="repl__query__content">
|
|
191
|
+
<DataCubeCodeEditor />
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
{/* {dataCubeState.editor.codeEditorState.currentSubQuery !== undefined && (
|
|
179
196
|
<div className="repl__query">
|
|
180
197
|
<div className="repl__query__editor">
|
|
181
198
|
<div className="repl__query__header">
|
|
182
|
-
<div className="
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
tabIndex={-1}
|
|
188
|
-
>
|
|
189
|
-
<PlayIcon className="btn__dropdown-combo__label__icon" />
|
|
190
|
-
<div className="btn__dropdown-combo__label__title">
|
|
191
|
-
Run Query
|
|
192
|
-
</div>
|
|
193
|
-
</button>
|
|
199
|
+
<div className="repl__query__label__sub__query">
|
|
200
|
+
Current Row Group Sub Query
|
|
201
|
+
</div>
|
|
202
|
+
<div className="repl__query__label__sub__query__read--only">
|
|
203
|
+
Read Only
|
|
194
204
|
</div>
|
|
195
205
|
</div>
|
|
196
206
|
<div className="repl__query__content">
|
|
197
|
-
<
|
|
207
|
+
<CodeEditor
|
|
208
|
+
lightTheme={
|
|
209
|
+
isLightTheme
|
|
210
|
+
? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT
|
|
211
|
+
: CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK
|
|
212
|
+
}
|
|
213
|
+
language={CODE_EDITOR_LANGUAGE.PURE}
|
|
214
|
+
isReadOnly={true}
|
|
215
|
+
inputValue={
|
|
216
|
+
dataCubeState.editor.codeEditorState.currentSubQuery
|
|
217
|
+
}
|
|
218
|
+
hideActionBar={true}
|
|
219
|
+
hidePadding={true}
|
|
220
|
+
/>
|
|
198
221
|
</div>
|
|
199
222
|
</div>
|
|
200
223
|
</div>
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<div className="repl__query__label__sub__query">
|
|
206
|
-
Current Row Group Sub Query
|
|
207
|
-
</div>
|
|
208
|
-
<div className="repl__query__label__sub__query__read--only">
|
|
209
|
-
Read Only
|
|
210
|
-
</div>
|
|
211
|
-
</div>
|
|
212
|
-
<div className="repl__query__content">
|
|
213
|
-
<CodeEditor
|
|
214
|
-
lightTheme={
|
|
215
|
-
isLightTheme
|
|
216
|
-
? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT
|
|
217
|
-
: CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK
|
|
218
|
-
}
|
|
219
|
-
language={CODE_EDITOR_LANGUAGE.PURE}
|
|
220
|
-
isReadOnly={true}
|
|
221
|
-
inputValue={
|
|
222
|
-
dataCubeState.queryTextEditorState.currentSubQuery
|
|
223
|
-
}
|
|
224
|
-
hideActionBar={true}
|
|
225
|
-
hidePadding={true}
|
|
226
|
-
/>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
</div>
|
|
230
|
-
)}
|
|
231
|
-
</div>
|
|
232
|
-
);
|
|
233
|
-
},
|
|
234
|
-
);
|
|
224
|
+
)} */}
|
|
225
|
+
</div>
|
|
226
|
+
);
|
|
227
|
+
});
|