@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
|
@@ -1,220 +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 {
|
|
18
|
-
type TDSRequest,
|
|
19
|
-
TDS_AGGREGATION_FUNCTION,
|
|
20
|
-
TDS_FILTER_OPERATION,
|
|
21
|
-
TDS_SORT_ORDER,
|
|
22
|
-
} from './TDSRequest.js';
|
|
23
|
-
import {
|
|
24
|
-
type TDSExecutionResult,
|
|
25
|
-
type TabularDataSet,
|
|
26
|
-
PRIMITIVE_TYPE,
|
|
27
|
-
} from '@finos/legend-graph';
|
|
28
|
-
import { isBoolean } from '@finos/legend-shared';
|
|
29
|
-
|
|
30
|
-
export type TDSResultCellDataType =
|
|
31
|
-
| string
|
|
32
|
-
| number
|
|
33
|
-
| boolean
|
|
34
|
-
| null
|
|
35
|
-
| undefined;
|
|
36
|
-
|
|
37
|
-
export interface TDSRowDataType {
|
|
38
|
-
[key: string]: TDSResultCellDataType;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const getTDSSortOrder = (sortOrder: string): TDS_SORT_ORDER => {
|
|
42
|
-
switch (sortOrder) {
|
|
43
|
-
case 'asc':
|
|
44
|
-
return TDS_SORT_ORDER.ASCENDING;
|
|
45
|
-
case 'desc':
|
|
46
|
-
return TDS_SORT_ORDER.DESCENDING;
|
|
47
|
-
default:
|
|
48
|
-
throw new Error(`Unsupported tds sort order ${sortOrder}`);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
const getTDSSortModel = (sort: TDS_SORT_ORDER): string => {
|
|
53
|
-
switch (sort) {
|
|
54
|
-
case TDS_SORT_ORDER.ASCENDING:
|
|
55
|
-
return 'asc';
|
|
56
|
-
case TDS_SORT_ORDER.DESCENDING:
|
|
57
|
-
return 'desc';
|
|
58
|
-
default:
|
|
59
|
-
throw new Error(`Unsupported`);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const getAggregationFunction = (
|
|
64
|
-
aggFunc: string,
|
|
65
|
-
): TDS_AGGREGATION_FUNCTION => {
|
|
66
|
-
switch (aggFunc) {
|
|
67
|
-
case 'sum':
|
|
68
|
-
return TDS_AGGREGATION_FUNCTION.SUM;
|
|
69
|
-
case 'min':
|
|
70
|
-
return TDS_AGGREGATION_FUNCTION.MIN;
|
|
71
|
-
case 'max':
|
|
72
|
-
return TDS_AGGREGATION_FUNCTION.MAX;
|
|
73
|
-
case 'count':
|
|
74
|
-
return TDS_AGGREGATION_FUNCTION.COUNT;
|
|
75
|
-
default:
|
|
76
|
-
throw new Error(`Unsupported aggregation function ${aggFunc}`);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const getTDSFilterOperation = (
|
|
81
|
-
filterOperation: string,
|
|
82
|
-
): TDS_FILTER_OPERATION => {
|
|
83
|
-
switch (filterOperation) {
|
|
84
|
-
case 'equals':
|
|
85
|
-
return TDS_FILTER_OPERATION.EQUALS;
|
|
86
|
-
case 'notEqual':
|
|
87
|
-
return TDS_FILTER_OPERATION.NOT_EQUAL;
|
|
88
|
-
case 'greaterThan':
|
|
89
|
-
return TDS_FILTER_OPERATION.GREATER_THAN;
|
|
90
|
-
case 'greaterThanOrEqual':
|
|
91
|
-
return TDS_FILTER_OPERATION.GREATER_THAN_OR_EQUAL;
|
|
92
|
-
case 'lessThan':
|
|
93
|
-
return TDS_FILTER_OPERATION.LESS_THAN;
|
|
94
|
-
case 'lessThanOrEqual':
|
|
95
|
-
return TDS_FILTER_OPERATION.LESS_THAN_OR_EQUAL;
|
|
96
|
-
case 'blank':
|
|
97
|
-
return TDS_FILTER_OPERATION.BLANK;
|
|
98
|
-
case 'notBlank':
|
|
99
|
-
return TDS_FILTER_OPERATION.NOT_BLANK;
|
|
100
|
-
case 'contains':
|
|
101
|
-
return TDS_FILTER_OPERATION.CONTAINS;
|
|
102
|
-
case 'notContains':
|
|
103
|
-
return TDS_FILTER_OPERATION.NOT_CONTAINS;
|
|
104
|
-
case 'startsWith':
|
|
105
|
-
return TDS_FILTER_OPERATION.STARTS_WITH;
|
|
106
|
-
case 'endsWith':
|
|
107
|
-
return TDS_FILTER_OPERATION.ENDS_WITH;
|
|
108
|
-
default:
|
|
109
|
-
throw new Error(`Unsupported filter operation ${filterOperation}`);
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export const getFilterColumnType = (type: string): PRIMITIVE_TYPE => {
|
|
114
|
-
switch (type) {
|
|
115
|
-
case 'text':
|
|
116
|
-
return PRIMITIVE_TYPE.STRING;
|
|
117
|
-
case 'number':
|
|
118
|
-
return PRIMITIVE_TYPE.NUMBER;
|
|
119
|
-
case 'boolean':
|
|
120
|
-
return PRIMITIVE_TYPE.BOOLEAN;
|
|
121
|
-
case 'date':
|
|
122
|
-
return PRIMITIVE_TYPE.DATE;
|
|
123
|
-
default:
|
|
124
|
-
throw new Error(`Unsupported filter type ${type}`);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export const getFilterModeltype = (type: PRIMITIVE_TYPE): string => {
|
|
129
|
-
switch (type) {
|
|
130
|
-
case PRIMITIVE_TYPE.STRING:
|
|
131
|
-
return 'text';
|
|
132
|
-
case PRIMITIVE_TYPE.NUMBER:
|
|
133
|
-
return 'number';
|
|
134
|
-
case PRIMITIVE_TYPE.BOOLEAN:
|
|
135
|
-
return 'boolean';
|
|
136
|
-
case PRIMITIVE_TYPE.DATE:
|
|
137
|
-
return 'date';
|
|
138
|
-
default:
|
|
139
|
-
throw new Error(`Unsupported filter type ${type}`);
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export const getTDSColumnCustomizations = (
|
|
144
|
-
result: TDSExecutionResult,
|
|
145
|
-
columnName: string,
|
|
146
|
-
tdsRequest?: TDSRequest | undefined,
|
|
147
|
-
): object => {
|
|
148
|
-
if (!tdsRequest) {
|
|
149
|
-
return {};
|
|
150
|
-
}
|
|
151
|
-
const sort = tdsRequest.sort.find((c) => c.column === columnName)?.order;
|
|
152
|
-
const rowGroup = tdsRequest.groupBy.columns.find((c) => c === columnName);
|
|
153
|
-
const aggFunc = tdsRequest.groupBy.aggregations.find(
|
|
154
|
-
(c) => c.column === columnName,
|
|
155
|
-
);
|
|
156
|
-
return {
|
|
157
|
-
sort: sort ? getTDSSortModel(sort) : undefined,
|
|
158
|
-
rowGroup: Boolean(rowGroup),
|
|
159
|
-
hide: Boolean(rowGroup),
|
|
160
|
-
aggFunc: aggFunc?.function,
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
export const getAggregationTDSColumnCustomizations = (
|
|
165
|
-
result: TDSExecutionResult,
|
|
166
|
-
columnName: string,
|
|
167
|
-
): object => {
|
|
168
|
-
const columnType = result.builder.columns.find(
|
|
169
|
-
(col) => col.name === columnName,
|
|
170
|
-
)?.type;
|
|
171
|
-
switch (columnType) {
|
|
172
|
-
case PRIMITIVE_TYPE.STRING:
|
|
173
|
-
return {
|
|
174
|
-
filter: 'agTextColumnFilter',
|
|
175
|
-
allowedAggFuncs: ['count'],
|
|
176
|
-
};
|
|
177
|
-
case PRIMITIVE_TYPE.DATE:
|
|
178
|
-
case PRIMITIVE_TYPE.DATETIME:
|
|
179
|
-
case PRIMITIVE_TYPE.STRICTDATE:
|
|
180
|
-
return {
|
|
181
|
-
filter: 'agDateColumnFilter',
|
|
182
|
-
allowedAggFuncs: ['count'],
|
|
183
|
-
};
|
|
184
|
-
case PRIMITIVE_TYPE.DECIMAL:
|
|
185
|
-
case PRIMITIVE_TYPE.INTEGER:
|
|
186
|
-
case PRIMITIVE_TYPE.FLOAT:
|
|
187
|
-
return {
|
|
188
|
-
filter: 'agNumberColumnFilter',
|
|
189
|
-
allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
|
|
190
|
-
};
|
|
191
|
-
default:
|
|
192
|
-
return {
|
|
193
|
-
allowedAggFuncs: ['count'],
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
export const getDefaultColumnDefintions = (): object => ({
|
|
199
|
-
minWidth: 50,
|
|
200
|
-
sortable: true,
|
|
201
|
-
flex: 1,
|
|
202
|
-
resizable: true,
|
|
203
|
-
enableRowGroup: true,
|
|
204
|
-
allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
|
|
205
|
-
enableValue: true,
|
|
206
|
-
menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab'],
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
export const getTDSRowData = (tds: TabularDataSet): TDSRowDataType[] =>
|
|
210
|
-
tds.rows.map((_row, rowIdx) => {
|
|
211
|
-
const row: TDSRowDataType = {};
|
|
212
|
-
const cols = tds.columns;
|
|
213
|
-
_row.values.forEach((value, colIdx) => {
|
|
214
|
-
// `ag-grid` shows `false` value as empty string so we have
|
|
215
|
-
// call `.toString()` to avoid this behavior.
|
|
216
|
-
row[cols[colIdx] as string] = isBoolean(value) ? String(value) : value;
|
|
217
|
-
});
|
|
218
|
-
row.rowNumber = rowIdx;
|
|
219
|
-
return row;
|
|
220
|
-
});
|
|
@@ -1,197 +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 {
|
|
18
|
-
FilterModel,
|
|
19
|
-
IServerSideDatasource,
|
|
20
|
-
IServerSideGetRowsParams,
|
|
21
|
-
} from '@ag-grid-community/core';
|
|
22
|
-
import {
|
|
23
|
-
TDSGroupby,
|
|
24
|
-
TDSAggregation,
|
|
25
|
-
TDSFilter,
|
|
26
|
-
TDSRequest,
|
|
27
|
-
TDSSort,
|
|
28
|
-
TDSFilterCondition,
|
|
29
|
-
TDS_FILTER_GROUP,
|
|
30
|
-
TDSColumn,
|
|
31
|
-
} from './TDSRequest.js';
|
|
32
|
-
import {
|
|
33
|
-
guaranteeNonNullable,
|
|
34
|
-
type GeneratorFn,
|
|
35
|
-
assertErrorThrown,
|
|
36
|
-
LogEvent,
|
|
37
|
-
} from '@finos/legend-shared';
|
|
38
|
-
import { LEGEND_REPL_EVENT } from '../../Const.js';
|
|
39
|
-
import {
|
|
40
|
-
type TDSRowDataType,
|
|
41
|
-
getTDSRowData,
|
|
42
|
-
getTDSSortOrder,
|
|
43
|
-
getTDSFilterOperation,
|
|
44
|
-
getAggregationFunction,
|
|
45
|
-
getFilterColumnType,
|
|
46
|
-
} from './GridUtils.js';
|
|
47
|
-
import type { REPLGridClientStore } from '../../stores/REPLGridClientStore.js';
|
|
48
|
-
import { flow, flowResult, makeObservable } from 'mobx';
|
|
49
|
-
import type { INTERNAL__TDSColumn, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
|
50
|
-
|
|
51
|
-
export class ServerSideDataSource implements IServerSideDatasource {
|
|
52
|
-
executions = 0;
|
|
53
|
-
rowData: TDSRowDataType[] = [];
|
|
54
|
-
columns: INTERNAL__TDSColumn[] = [];
|
|
55
|
-
editorStore?: REPLGridClientStore | undefined;
|
|
56
|
-
|
|
57
|
-
constructor(
|
|
58
|
-
rowData?: TDSRowDataType[] | undefined,
|
|
59
|
-
columns?: INTERNAL__TDSColumn[] | undefined,
|
|
60
|
-
editorStore?: REPLGridClientStore | undefined,
|
|
61
|
-
) {
|
|
62
|
-
makeObservable(this, {
|
|
63
|
-
fetchRows: flow,
|
|
64
|
-
});
|
|
65
|
-
this.rowData = rowData ?? [];
|
|
66
|
-
this.columns = columns ?? [];
|
|
67
|
-
this.editorStore = editorStore;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
*fetchRows(
|
|
71
|
-
params: IServerSideGetRowsParams<unknown, unknown>,
|
|
72
|
-
): GeneratorFn<void> {
|
|
73
|
-
try {
|
|
74
|
-
if (
|
|
75
|
-
this.executions > 0 ||
|
|
76
|
-
this.editorStore?.dataCubeState.gridState.currentQueryTDSRequest
|
|
77
|
-
) {
|
|
78
|
-
if (this.editorStore) {
|
|
79
|
-
const request = this.extractRequest(params);
|
|
80
|
-
this.editorStore.dataCubeState.gridState.setLastQueryTDSRequest(
|
|
81
|
-
request,
|
|
82
|
-
);
|
|
83
|
-
if (request) {
|
|
84
|
-
yield flowResult(
|
|
85
|
-
this.editorStore.dataCubeState.getREPLGridServerResult(request),
|
|
86
|
-
);
|
|
87
|
-
const result =
|
|
88
|
-
this.editorStore.dataCubeState.gridState.currentResult;
|
|
89
|
-
const rowData = getTDSRowData(guaranteeNonNullable(result).result);
|
|
90
|
-
params.success({ rowData: rowData });
|
|
91
|
-
} else {
|
|
92
|
-
params.fail();
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
this.editorStore?.dataCubeState.gridState.setCurrentQueryTDSRequest(
|
|
96
|
-
undefined,
|
|
97
|
-
);
|
|
98
|
-
} else {
|
|
99
|
-
params.success({ rowData: this.rowData });
|
|
100
|
-
}
|
|
101
|
-
this.executions++;
|
|
102
|
-
} catch (error) {
|
|
103
|
-
assertErrorThrown(error);
|
|
104
|
-
this.editorStore?.applicationStore.notificationService.notifyError(error);
|
|
105
|
-
this.editorStore?.applicationStore.logService.error(
|
|
106
|
-
LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE),
|
|
107
|
-
error,
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
getRows(params: IServerSideGetRowsParams<unknown, unknown>): void {
|
|
113
|
-
this.fetchRows(params);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
extractRequest(
|
|
117
|
-
params: IServerSideGetRowsParams<unknown, unknown>,
|
|
118
|
-
): TDSRequest | undefined {
|
|
119
|
-
try {
|
|
120
|
-
const request = params.request;
|
|
121
|
-
const startRow = request.startRow;
|
|
122
|
-
const endRow = request.endRow;
|
|
123
|
-
const columns = params.columnApi.getColumns()?.map((c) => c.getColId());
|
|
124
|
-
const sort = request.sortModel.map(
|
|
125
|
-
(i) => new TDSSort(i.colId, getTDSSortOrder(i.sort)),
|
|
126
|
-
);
|
|
127
|
-
const aggregations = request.valueCols.map((v) => {
|
|
128
|
-
const colType = this.columns.find((c) => c.name === v.field)?.type;
|
|
129
|
-
return new TDSAggregation(
|
|
130
|
-
guaranteeNonNullable(v.field),
|
|
131
|
-
colType as PRIMITIVE_TYPE,
|
|
132
|
-
getAggregationFunction(guaranteeNonNullable(v.aggFunc)),
|
|
133
|
-
);
|
|
134
|
-
});
|
|
135
|
-
const groupBy = new TDSGroupby(
|
|
136
|
-
request.rowGroupCols.map((r) => r.id),
|
|
137
|
-
request.groupKeys,
|
|
138
|
-
aggregations,
|
|
139
|
-
);
|
|
140
|
-
const filter: TDSFilter[] = [];
|
|
141
|
-
const filterModel = request.filterModel as FilterModel | null;
|
|
142
|
-
if (filterModel) {
|
|
143
|
-
Object.keys(filterModel).forEach((key) => {
|
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
145
|
-
const item = filterModel[key];
|
|
146
|
-
const conditions: TDSFilterCondition[] = [];
|
|
147
|
-
const colType = getFilterColumnType(item.filterType);
|
|
148
|
-
if (item.filter === undefined && item.conditions) {
|
|
149
|
-
item.conditions.forEach(
|
|
150
|
-
(condition: { type: string; filter: unknown }) =>
|
|
151
|
-
conditions.push(
|
|
152
|
-
new TDSFilterCondition(
|
|
153
|
-
getTDSFilterOperation(condition.type),
|
|
154
|
-
condition.filter,
|
|
155
|
-
),
|
|
156
|
-
),
|
|
157
|
-
);
|
|
158
|
-
} else {
|
|
159
|
-
conditions.push(
|
|
160
|
-
new TDSFilterCondition(
|
|
161
|
-
getTDSFilterOperation(item.type),
|
|
162
|
-
item.filter,
|
|
163
|
-
),
|
|
164
|
-
);
|
|
165
|
-
}
|
|
166
|
-
filter.push(
|
|
167
|
-
new TDSFilter(
|
|
168
|
-
key,
|
|
169
|
-
colType,
|
|
170
|
-
conditions,
|
|
171
|
-
item.operator === 'OR'
|
|
172
|
-
? TDS_FILTER_GROUP.OR
|
|
173
|
-
: TDS_FILTER_GROUP.AND,
|
|
174
|
-
),
|
|
175
|
-
);
|
|
176
|
-
});
|
|
177
|
-
}
|
|
178
|
-
const tdsRequest = new TDSRequest(
|
|
179
|
-
columns?.map((col) => new TDSColumn(col)) ?? [],
|
|
180
|
-
filter,
|
|
181
|
-
sort,
|
|
182
|
-
groupBy,
|
|
183
|
-
startRow,
|
|
184
|
-
endRow,
|
|
185
|
-
);
|
|
186
|
-
return tdsRequest;
|
|
187
|
-
} catch (error) {
|
|
188
|
-
assertErrorThrown(error);
|
|
189
|
-
this.editorStore?.applicationStore.notificationService.notifyError(error);
|
|
190
|
-
this.editorStore?.applicationStore.logService.error(
|
|
191
|
-
LogEvent.create(LEGEND_REPL_EVENT.BUILD_TDS_EQUEST_FAILURE),
|
|
192
|
-
error,
|
|
193
|
-
);
|
|
194
|
-
return undefined;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|