@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
|
@@ -13,196 +13,46 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
17
|
-
import { DataCubeGridState } from './DataCubeGridState.js';
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { V1_serializeValueSpecification, V1_buildExecutionResult, V1_serializeExecutionResult, TDSExecutionResult, V1_ParserError, ParserError, SourceInformation, V1_Lambda, V1_deserializeValueSpecification, } from '@finos/legend-graph';
|
|
24
|
-
import { languages as monacoLanguagesAPI, } from 'monaco-editor';
|
|
25
|
-
import { LEGEND_REPL_EVENT } from '../../Const.js';
|
|
26
|
-
import { LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN, LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN, } from '../../components/LegendREPLGridClientApplication.js';
|
|
27
|
-
import { REPLGridServerResult } from '../../components/grid/REPLGridServerResult.js';
|
|
28
|
-
import { buildLambdaExpressions } from '../../components/grid/TDSLambdaBuilder.js';
|
|
29
|
-
import { TDSQuery } from '../../components/grid/TDSQuery.js';
|
|
30
|
-
import { TDSRequest, TDSGroupby } from '../../components/grid/TDSRequest.js';
|
|
31
|
-
import { CompletionItem } from '../CompletionResult.js';
|
|
16
|
+
import { flowResult } from 'mobx';
|
|
17
|
+
import { DataCubeGridState } from './grid/DataCubeGridState.js';
|
|
18
|
+
import { DataCubeEditorState } from './editor/DataCubeEditorState.js';
|
|
19
|
+
import { ActionState, assertErrorThrown } from '@finos/legend-shared';
|
|
20
|
+
import { DataCubeEngine } from './core/DataCubeEngine.js';
|
|
21
|
+
import { DataCubeQuerySnapshotManager } from './core/DataCubeQuerySnapshotManager.js';
|
|
22
|
+
import { buildSnapshotFromQuery } from './core/DataCubeQueryAnalyzer.js';
|
|
32
23
|
export class DataCubeState {
|
|
33
24
|
editorStore;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
25
|
+
applicationStore;
|
|
26
|
+
engine;
|
|
27
|
+
snapshotManager;
|
|
28
|
+
grid;
|
|
29
|
+
editor;
|
|
30
|
+
initState = ActionState.create();
|
|
31
|
+
baseQuery;
|
|
39
32
|
constructor(editorStore) {
|
|
40
|
-
makeObservable(this, {
|
|
41
|
-
gridState: observable,
|
|
42
|
-
queryTextEditorState: observable,
|
|
43
|
-
configState: observable,
|
|
44
|
-
propertiesPanelState: observable,
|
|
45
|
-
executeAction: observable,
|
|
46
|
-
getREPLGridServerResult: flow,
|
|
47
|
-
getInitialQueryLambda: flow,
|
|
48
|
-
getInitialREPLGridServerResult: flow,
|
|
49
|
-
getLicenseKey: flow,
|
|
50
|
-
executeLambda: flow,
|
|
51
|
-
parseQuery: flow,
|
|
52
|
-
saveQuery: flow,
|
|
53
|
-
});
|
|
54
33
|
this.editorStore = editorStore;
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const resultObj = (yield flowResult(this.editorStore.client.getREPLGridServerResult(V1_serializeValueSpecification(lambda, []))));
|
|
65
|
-
const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
|
|
66
|
-
const tdsResult = JSON.parse(replGridResult.result);
|
|
67
|
-
this.gridState.setCurrentResult(guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResult)), TDSExecutionResult));
|
|
68
|
-
if (isSubQuery) {
|
|
69
|
-
this.queryTextEditorState.setCurrentSubQuery(replGridResult.currentQuery);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
|
|
73
|
-
this.queryTextEditorState.setCurrentSubQuery(undefined);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
assertErrorThrown(error);
|
|
78
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
|
79
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
async getTypeaheadResults(position, model) {
|
|
83
|
-
try {
|
|
84
|
-
const textUntilPosition = model.getValueInRange({
|
|
85
|
-
startLineNumber: 1,
|
|
86
|
-
startColumn: 1,
|
|
87
|
-
endLineNumber: position.lineNumber,
|
|
88
|
-
endColumn: position.column,
|
|
89
|
-
});
|
|
90
|
-
const resultObj = await this.editorStore.client.getTypeaheadResults(textUntilPosition);
|
|
91
|
-
const result = resultObj.map((res) => CompletionItem.serialization.fromJson(res));
|
|
92
|
-
const currentWord = model.getWordUntilPosition(position);
|
|
93
|
-
return result.map((res) => ({
|
|
94
|
-
label: res.display,
|
|
95
|
-
kind: monacoLanguagesAPI.CompletionItemKind.Text,
|
|
96
|
-
range: {
|
|
97
|
-
startLineNumber: position.lineNumber,
|
|
98
|
-
startColumn: currentWord.startColumn + 1,
|
|
99
|
-
endLineNumber: position.lineNumber,
|
|
100
|
-
endColumn: currentWord.endColumn + 1,
|
|
101
|
-
},
|
|
102
|
-
insertText: res.completion,
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
catch (e) {
|
|
106
|
-
return [];
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
*executeLambda() {
|
|
110
|
-
try {
|
|
111
|
-
this.executeAction.inProgress();
|
|
112
|
-
const resultObj = (yield this.editorStore.client.executeLambda(this.queryTextEditorState.queryEditorState.query, this.configState.isPaginationEnabled));
|
|
113
|
-
const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
|
|
114
|
-
const tdsResultObj = JSON.parse(replGridResult.result);
|
|
115
|
-
const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);
|
|
116
|
-
this.gridState.setInitialResult(tdsResult);
|
|
117
|
-
this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
|
|
118
|
-
this.queryTextEditorState.setCurrentSubQuery(undefined);
|
|
119
|
-
this.gridState.setColumns(tdsResult.result.columns);
|
|
120
|
-
yield flowResult(this.getInitialQueryLambda());
|
|
121
|
-
this.executeAction.complete();
|
|
122
|
-
}
|
|
123
|
-
catch (error) {
|
|
124
|
-
this.executeAction.fail();
|
|
125
|
-
assertErrorThrown(error);
|
|
126
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
|
127
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
*parseQuery() {
|
|
34
|
+
this.applicationStore = editorStore.applicationStore;
|
|
35
|
+
this.engine = new DataCubeEngine(this.editorStore.client);
|
|
36
|
+
// NOTE: snapshot manager must be instantiated before subscribers
|
|
37
|
+
this.snapshotManager = new DataCubeQuerySnapshotManager(this);
|
|
38
|
+
this.grid = new DataCubeGridState(this);
|
|
39
|
+
this.editor = new DataCubeEditorState(this);
|
|
40
|
+
}
|
|
41
|
+
async initialize() {
|
|
42
|
+
this.initState.inProgress();
|
|
131
43
|
try {
|
|
132
|
-
this.
|
|
133
|
-
|
|
44
|
+
await flowResult(this.grid.initialize());
|
|
45
|
+
this.snapshotManager.registerSubscriber(this.grid);
|
|
46
|
+
this.snapshotManager.registerSubscriber(this.editor);
|
|
47
|
+
this.baseQuery = await this.engine.getBaseQuery();
|
|
48
|
+
const initialSnapshot = await buildSnapshotFromQuery(this.baseQuery, this.engine);
|
|
49
|
+
this.snapshotManager.broadcastSnapshot(initialSnapshot);
|
|
50
|
+
this.initState.complete();
|
|
134
51
|
}
|
|
135
52
|
catch (error) {
|
|
136
53
|
assertErrorThrown(error);
|
|
137
|
-
|
|
138
|
-
error.response.status === HttpStatus.BAD_REQUEST) {
|
|
139
|
-
const protocol = V1_ParserError.serialization.fromJson(error.payload);
|
|
140
|
-
const parserError = new ParserError(protocol.message);
|
|
141
|
-
if (protocol.sourceInformation) {
|
|
142
|
-
parserError.sourceInformation = new SourceInformation(protocol.sourceInformation.sourceId, protocol.sourceInformation.startLine, protocol.sourceInformation.startColumn, protocol.sourceInformation.endLine, protocol.sourceInformation.endColumn);
|
|
143
|
-
}
|
|
144
|
-
this.queryTextEditorState.queryEditorState.setParserError(parserError);
|
|
145
|
-
}
|
|
54
|
+
this.initState.fail();
|
|
146
55
|
}
|
|
147
56
|
}
|
|
148
|
-
*saveQuery() {
|
|
149
|
-
try {
|
|
150
|
-
const query = TDSQuery.serialization.toJson(new TDSQuery(guaranteeNonNullable(this.gridState.initialQueryLambda), this.gridState.lastQueryTDSRequest ??
|
|
151
|
-
new TDSRequest([], [], [], new TDSGroupby([], [], []), 0, 100)));
|
|
152
|
-
const queryId = (yield flowResult(this.editorStore.client.saveQuery(query)));
|
|
153
|
-
this.editorStore.applicationStore.navigationService.navigator.goToLocation(generatePath(LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.SAVED_QUERY, {
|
|
154
|
-
[LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID]: queryId,
|
|
155
|
-
}));
|
|
156
|
-
}
|
|
157
|
-
catch (error) {
|
|
158
|
-
assertErrorThrown(error);
|
|
159
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
|
160
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
*getInitialQueryLambda(queryId) {
|
|
164
|
-
if (!queryId) {
|
|
165
|
-
const lambdaObj = (yield this.editorStore.client.getIntialQueryLambda());
|
|
166
|
-
const lambda = V1_deserializeValueSpecification(lambdaObj, []);
|
|
167
|
-
if (lambda instanceof V1_Lambda) {
|
|
168
|
-
this.gridState.setInitialQueryLambda(lambda);
|
|
169
|
-
}
|
|
170
|
-
// this.replGridState.setCurrentQueryTDSRequest(undefined);
|
|
171
|
-
}
|
|
172
|
-
else {
|
|
173
|
-
const queryObj = (yield this.editorStore.client.getREPLQuery(queryId));
|
|
174
|
-
const query = TDSQuery.serialization.fromJson(queryObj);
|
|
175
|
-
this.gridState.setCurrentQueryTDSRequest(query.currentQueryInfo);
|
|
176
|
-
this.gridState.setInitialQueryLambda(query.initialQuery);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
*getInitialREPLGridServerResult(queryId) {
|
|
180
|
-
try {
|
|
181
|
-
this.executeAction.inProgress();
|
|
182
|
-
if (!this.configState.licenseKey) {
|
|
183
|
-
yield flowResult(this.getLicenseKey());
|
|
184
|
-
}
|
|
185
|
-
yield flowResult(this.getInitialQueryLambda(queryId));
|
|
186
|
-
const resultObj = (yield this.editorStore.client.getInitialREPLGridServerResult(this.configState.isPaginationEnabled));
|
|
187
|
-
const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
|
|
188
|
-
const tdsResultObj = JSON.parse(replGridResult.result);
|
|
189
|
-
const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);
|
|
190
|
-
this.gridState.setInitialResult(tdsResult);
|
|
191
|
-
this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));
|
|
192
|
-
this.queryTextEditorState.setCurrentSubQuery(undefined);
|
|
193
|
-
this.gridState.setColumns(tdsResult.result.columns);
|
|
194
|
-
this.executeAction.complete();
|
|
195
|
-
}
|
|
196
|
-
catch (error) {
|
|
197
|
-
this.executeAction.fail();
|
|
198
|
-
assertErrorThrown(error);
|
|
199
|
-
this.editorStore.applicationStore.notificationService.notifyError(error);
|
|
200
|
-
this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
*getLicenseKey() {
|
|
204
|
-
const licenseKey = (yield this.editorStore.client.getLicenseKey());
|
|
205
|
-
this.configState.setLicenseKey(licenseKey);
|
|
206
|
-
}
|
|
207
57
|
}
|
|
208
58
|
//# sourceMappingURL=DataCubeState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCubeState.js","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DataCubeState.js","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAGzE,MAAM,OAAO,aAAa;IACf,WAAW,CAAY;IACvB,gBAAgB,CAA6B;IAC7C,MAAM,CAAiB;IACvB,eAAe,CAA+B;IAC9C,IAAI,CAAoB;IACxB,MAAM,CAAsB;IAC5B,SAAS,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC;IAE1C,SAAS,CAAiB;IAE1B,YAAY,WAAsB;QAChC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;QACrD,IAAI,CAAC,MAAM,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAE1D,iEAAiE;QACjE,IAAI,CAAC,eAAe,GAAG,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,UAAU;QACd,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;YACzC,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAErD,IAAI,CAAC,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;YAClD,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAClD,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,MAAM,CACZ,CAAC;YACF,IAAI,CAAC,eAAe,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;YACxD,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
17
|
-
import { REPLServerClient } from '
|
|
18
|
-
import { DataCubeState } from './
|
|
19
|
-
export declare class
|
|
20
|
-
readonly applicationStore:
|
|
16
|
+
import type { LegendREPLApplicationStore } from '../LegendREPLBaseStore.js';
|
|
17
|
+
import { REPLServerClient } from '../../server/REPLServerClient.js';
|
|
18
|
+
import { DataCubeState } from './DataCubeState.js';
|
|
19
|
+
export declare class REPLStore {
|
|
20
|
+
readonly applicationStore: LegendREPLApplicationStore;
|
|
21
21
|
readonly client: REPLServerClient;
|
|
22
22
|
dataCubeState: DataCubeState;
|
|
23
|
-
constructor(applicationStore:
|
|
23
|
+
constructor(applicationStore: LegendREPLApplicationStore);
|
|
24
24
|
}
|
|
25
|
-
//# sourceMappingURL=
|
|
25
|
+
//# sourceMappingURL=DataCubeStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeStore.d.ts","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,SAAS;IACpB,QAAQ,CAAC,gBAAgB,EAAE,0BAA0B,CAAC;IACtD,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAGlC,aAAa,EAAG,aAAa,CAAC;gBAElB,gBAAgB,EAAE,0BAA0B;CAezD"}
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { REPLServerClient } from '
|
|
16
|
+
import { REPLServerClient } from '../../server/REPLServerClient.js';
|
|
17
17
|
import { NetworkClient } from '@finos/legend-shared';
|
|
18
18
|
import { makeObservable, observable } from 'mobx';
|
|
19
|
-
import { DataCubeState } from './
|
|
20
|
-
export class
|
|
19
|
+
import { DataCubeState } from './DataCubeState.js';
|
|
20
|
+
export class REPLStore {
|
|
21
21
|
applicationStore;
|
|
22
22
|
client;
|
|
23
|
+
// TODO: when we support multi-view, we would need to support multiple states
|
|
23
24
|
dataCubeState;
|
|
24
25
|
constructor(applicationStore) {
|
|
25
26
|
makeObservable(this, {
|
|
@@ -35,4 +36,4 @@ export class REPLGridClientStore {
|
|
|
35
36
|
this.dataCubeState = new DataCubeState(this);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
|
-
//# sourceMappingURL=
|
|
39
|
+
//# sourceMappingURL=DataCubeStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeStore.js","sourceRoot":"","sources":["../../../src/stores/dataCube/DataCubeStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,SAAS;IACX,gBAAgB,CAA6B;IAC7C,MAAM,CAAmB;IAElC,6EAA6E;IAC7E,aAAa,CAAiB;IAE9B,YAAY,gBAA4C;QACtD,cAAc,CAAC,IAAI,EAAE;YACnB,aAAa,EAAE,UAAU;SAC1B,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,MAAM,GAAG,IAAI,gBAAgB,CAChC,IAAI,aAAa,CAAC;YAChB,OAAO,EAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,oBAAoB;gBACxD,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM;oBACtB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;gBAChE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,OAAO;SACzC,CAAC,CACH,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
import { type V1_Lambda, type V1_ValueSpecification, TDSExecutionResult } from '@finos/legend-graph';
|
|
17
|
+
import type { REPLServerClient } from '../../../server/REPLServerClient.js';
|
|
18
|
+
import { type CompletionItem } from '../../../server/models/DataCubeEngineModels.js';
|
|
19
|
+
import { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
|
|
20
|
+
export declare class DataCubeEngine {
|
|
21
|
+
private readonly client;
|
|
22
|
+
constructor(client: REPLServerClient);
|
|
23
|
+
getGridClientLicenseKey(): Promise<string>;
|
|
24
|
+
getQueryTypeahead(code: string, isPartial?: boolean): Promise<CompletionItem[]>;
|
|
25
|
+
parseQuery(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
|
|
26
|
+
getBaseQuery(): Promise<DataCubeQuery>;
|
|
27
|
+
executeQuery(query: V1_Lambda): Promise<TDSExecutionResult>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=DataCubeEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEngine.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,qBAAqB,EAC1B,kBAAkB,EAGnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAGxE,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAE9B,MAAM,EAAE,gBAAgB;IAI9B,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC;IAI1C,iBAAiB,CACrB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,cAAc,EAAE,CAAC;IAOtB,UAAU,CACd,IAAI,EAAE,MAAM,EACZ,uBAAuB,CAAC,EAAE,OAAO,GAChC,OAAO,CAAC,qBAAqB,CAAC;IAO3B,YAAY,IAAI,OAAO,CAAC,aAAa,CAAC;IAMtC,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAWlE"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
import { V1_deserializeValueSpecification, V1_serializeValueSpecification, TDSExecutionResult, V1_serializeExecutionResult, V1_buildExecutionResult, } from '@finos/legend-graph';
|
|
17
|
+
import {} from '../../../server/models/DataCubeEngineModels.js';
|
|
18
|
+
import { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
|
|
19
|
+
import { guaranteeType } from '@finos/legend-shared';
|
|
20
|
+
export class DataCubeEngine {
|
|
21
|
+
client;
|
|
22
|
+
constructor(client) {
|
|
23
|
+
this.client = client;
|
|
24
|
+
}
|
|
25
|
+
async getGridClientLicenseKey() {
|
|
26
|
+
return this.client.getGridClientLicenseKey();
|
|
27
|
+
}
|
|
28
|
+
async getQueryTypeahead(code, isPartial) {
|
|
29
|
+
return (await this.client.getQueryTypeahead({
|
|
30
|
+
code,
|
|
31
|
+
isPartial,
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
async parseQuery(code, returnSourceInformation) {
|
|
35
|
+
return V1_deserializeValueSpecification(await this.client.parseQuery({ code, returnSourceInformation }), []);
|
|
36
|
+
}
|
|
37
|
+
async getBaseQuery() {
|
|
38
|
+
return DataCubeQuery.serialization.fromJson(await this.client.getBaseQuery());
|
|
39
|
+
}
|
|
40
|
+
async executeQuery(query) {
|
|
41
|
+
const result = await this.client.executeQuery({
|
|
42
|
+
query: V1_serializeValueSpecification(query, []),
|
|
43
|
+
});
|
|
44
|
+
return guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(JSON.parse(result.result))), TDSExecutionResult);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=DataCubeEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEngine.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,gCAAgC,EAChC,8BAA8B,EAE9B,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAuB,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,MAAM,OAAO,cAAc;IACR,MAAM,CAAmB;IAE1C,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,uBAAuB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,iBAAiB,CACrB,IAAY,EACZ,SAAmB;QAEnB,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;YAC1C,IAAI;YACJ,SAAS;SACV,CAAC,CAAqB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,UAAU,CACd,IAAY,EACZ,uBAAiC;QAEjC,OAAO,gCAAgC,CACrC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,EAC/D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,OAAO,aAAa,CAAC,aAAa,CAAC,QAAQ,CACzC,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CACjC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,KAAgB;QACjC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;YAC5C,KAAK,EAAE,8BAA8B,CAAC,KAAK,EAAE,EAAE,CAAC;SACjD,CAAC,CAAC;QACH,OAAO,aAAa,CAClB,uBAAuB,CACrB,2BAA2B,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CACvD,EACD,kBAAkB,CACnB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
import { type V1_ValueSpecification } from '@finos/legend-graph';
|
|
17
|
+
import type { DataCubeQuery } from '../../../server/models/DataCubeQuery.js';
|
|
18
|
+
import type { DataCubeEngine } from './DataCubeEngine.js';
|
|
19
|
+
/**
|
|
20
|
+
* Analyze the partial query to build the base snapshot.
|
|
21
|
+
*
|
|
22
|
+
* NOTE: the base snapshot is almost, but not a complete snapshot.
|
|
23
|
+
* It has key information about the partial query filled in, these are the bits
|
|
24
|
+
* required to reconstruct the query just from the snapshot.
|
|
25
|
+
* However, it lacks analytics information, such as extended columns' lambda code,
|
|
26
|
+
* which might be useful for initializing the editors. These should get filled in
|
|
27
|
+
* at a later stage in the analysis/initialization flow.
|
|
28
|
+
*
|
|
29
|
+
* Implementation-wise, this extracts the function call sequence, then walk the
|
|
30
|
+
* sequence in order to fill in the information for the snapshot.
|
|
31
|
+
*/
|
|
32
|
+
export declare function validateAndBuildBaseSnapshot(baseQuery: DataCubeQuery, analytics: {
|
|
33
|
+
sourceQuery: V1_ValueSpecification;
|
|
34
|
+
partialQuery: V1_ValueSpecification | undefined;
|
|
35
|
+
}): import("./DataCubeQuerySnapshot.js").DataCubeQuerySnapshot;
|
|
36
|
+
export declare function buildSnapshotFromQuery(baseQuery: DataCubeQuery, engine: DataCubeEngine): Promise<import("./DataCubeQuerySnapshot.js").DataCubeQuerySnapshot>;
|
|
37
|
+
//# sourceMappingURL=DataCubeQueryAnalyzer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeQueryAnalyzer.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeQueryAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,qBAAqB,EAC3B,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAY7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAqN1D;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,aAAa,EACxB,SAAS,EAAE;IACT,WAAW,EAAE,qBAAqB,CAAC;IACnC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC;CACjD,8DAkHF;AAED,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,cAAc,uEAgCvB"}
|