@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,231 +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 { PRIMITIVE_TYPE } from '@finos/legend-graph';
|
|
18
|
-
import { SerializationFactory, usingModelSchema } from '@finos/legend-shared';
|
|
19
|
-
import { observable, makeObservable, action } from 'mobx';
|
|
20
|
-
import { createModelSchema, list, optional, primitive } from 'serializr';
|
|
21
|
-
|
|
22
|
-
export enum TDS_FILTER_OPERATION {
|
|
23
|
-
EQUALS = 'equal',
|
|
24
|
-
NOT_EQUAL = 'notEqual',
|
|
25
|
-
GREATER_THAN = 'greaterThan',
|
|
26
|
-
GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual',
|
|
27
|
-
LESS_THAN = 'lessThan',
|
|
28
|
-
LESS_THAN_OR_EQUAL = 'lessThanOrEqual',
|
|
29
|
-
BLANK = 'isEmpty',
|
|
30
|
-
NOT_BLANK = 'isNotEmpty',
|
|
31
|
-
CONTAINS = 'contains',
|
|
32
|
-
NOT_CONTAINS = 'notContains',
|
|
33
|
-
STARTS_WITH = 'startsWith',
|
|
34
|
-
ENDS_WITH = 'endsWith',
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export enum TDS_FILTER_GROUP {
|
|
38
|
-
AND = 'and',
|
|
39
|
-
OR = 'or',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export enum TDS_AGGREGATION_FUNCTION {
|
|
43
|
-
SUM = 'sum',
|
|
44
|
-
MIN = 'min',
|
|
45
|
-
MAX = 'max',
|
|
46
|
-
COUNT = 'count',
|
|
47
|
-
AVG = 'avg',
|
|
48
|
-
FIRST = 'first',
|
|
49
|
-
LAST = 'last',
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export enum TDS_SORT_ORDER {
|
|
53
|
-
ASCENDING = 'ascending',
|
|
54
|
-
DESCENDING = 'descending',
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export enum FILTER_TYPE {
|
|
58
|
-
TEXT = 'text',
|
|
59
|
-
NUMBER = 'number',
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export class TDSFilterCondition {
|
|
63
|
-
operation!: TDS_FILTER_OPERATION;
|
|
64
|
-
value!: unknown;
|
|
65
|
-
|
|
66
|
-
constructor(operation: TDS_FILTER_OPERATION, value: unknown) {
|
|
67
|
-
this.operation = operation;
|
|
68
|
-
this.value = value;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
static readonly serialization = new SerializationFactory(
|
|
72
|
-
createModelSchema(TDSFilterCondition, {
|
|
73
|
-
operation: primitive(),
|
|
74
|
-
value: primitive(),
|
|
75
|
-
}),
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export class TDSFilter {
|
|
80
|
-
column!: string;
|
|
81
|
-
columnType!: PRIMITIVE_TYPE;
|
|
82
|
-
conditions!: TDSFilterCondition[];
|
|
83
|
-
groupOperation!: TDS_FILTER_GROUP;
|
|
84
|
-
|
|
85
|
-
constructor(
|
|
86
|
-
column: string,
|
|
87
|
-
columnType: PRIMITIVE_TYPE,
|
|
88
|
-
conditions: TDSFilterCondition[],
|
|
89
|
-
groupOperation: TDS_FILTER_GROUP,
|
|
90
|
-
) {
|
|
91
|
-
this.column = column;
|
|
92
|
-
this.columnType = columnType;
|
|
93
|
-
this.conditions = conditions;
|
|
94
|
-
this.groupOperation = groupOperation;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
static readonly serialization = new SerializationFactory(
|
|
98
|
-
createModelSchema(TDSFilter, {
|
|
99
|
-
column: primitive(),
|
|
100
|
-
columnType: primitive(),
|
|
101
|
-
conditions: list(
|
|
102
|
-
usingModelSchema(TDSFilterCondition.serialization.schema),
|
|
103
|
-
),
|
|
104
|
-
groupOperation: primitive(),
|
|
105
|
-
}),
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export class TDSSort {
|
|
110
|
-
column!: string;
|
|
111
|
-
order!: TDS_SORT_ORDER;
|
|
112
|
-
|
|
113
|
-
constructor(column: string, order: TDS_SORT_ORDER) {
|
|
114
|
-
makeObservable(this, {
|
|
115
|
-
column: observable,
|
|
116
|
-
order: observable,
|
|
117
|
-
setOrder: action,
|
|
118
|
-
});
|
|
119
|
-
this.column = column;
|
|
120
|
-
this.order = order;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
setOrder(val: TDS_SORT_ORDER): void {
|
|
124
|
-
this.order = val;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
static readonly serialization = new SerializationFactory(
|
|
128
|
-
createModelSchema(TDSSort, {
|
|
129
|
-
column: primitive(),
|
|
130
|
-
order: primitive(),
|
|
131
|
-
}),
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export class TDSAggregation {
|
|
136
|
-
column!: string;
|
|
137
|
-
columnType!: PRIMITIVE_TYPE;
|
|
138
|
-
function!: TDS_AGGREGATION_FUNCTION;
|
|
139
|
-
|
|
140
|
-
constructor(
|
|
141
|
-
column: string,
|
|
142
|
-
columnType: PRIMITIVE_TYPE,
|
|
143
|
-
_function: TDS_AGGREGATION_FUNCTION,
|
|
144
|
-
) {
|
|
145
|
-
this.column = column;
|
|
146
|
-
this.columnType = columnType;
|
|
147
|
-
this.function = _function;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
static readonly serialization = new SerializationFactory(
|
|
151
|
-
createModelSchema(TDSAggregation, {
|
|
152
|
-
column: primitive(),
|
|
153
|
-
columnType: primitive(),
|
|
154
|
-
function: primitive(),
|
|
155
|
-
}),
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export class TDSGroupby {
|
|
160
|
-
columns!: string[];
|
|
161
|
-
groupKeys!: string[];
|
|
162
|
-
aggregations!: TDSAggregation[];
|
|
163
|
-
|
|
164
|
-
constructor(
|
|
165
|
-
columns: string[],
|
|
166
|
-
groupKeys: string[],
|
|
167
|
-
aggregations: TDSAggregation[],
|
|
168
|
-
) {
|
|
169
|
-
this.columns = columns;
|
|
170
|
-
this.groupKeys = groupKeys;
|
|
171
|
-
this.aggregations = aggregations;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
static readonly serialization = new SerializationFactory(
|
|
175
|
-
createModelSchema(TDSGroupby, {
|
|
176
|
-
columns: list(primitive()),
|
|
177
|
-
groupKeys: list(primitive()),
|
|
178
|
-
aggregations: list(usingModelSchema(TDSAggregation.serialization.schema)),
|
|
179
|
-
}),
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export class TDSColumn {
|
|
184
|
-
name!: string;
|
|
185
|
-
|
|
186
|
-
constructor(name: string) {
|
|
187
|
-
this.name = name;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
static readonly serialization = new SerializationFactory(
|
|
191
|
-
createModelSchema(TDSColumn, {
|
|
192
|
-
name: primitive(),
|
|
193
|
-
}),
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export class TDSRequest {
|
|
198
|
-
startRow?: number | undefined;
|
|
199
|
-
endRow?: number | undefined;
|
|
200
|
-
columns!: TDSColumn[];
|
|
201
|
-
filter!: TDSFilter[];
|
|
202
|
-
sort!: TDSSort[];
|
|
203
|
-
groupBy!: TDSGroupby;
|
|
204
|
-
|
|
205
|
-
constructor(
|
|
206
|
-
columns: TDSColumn[],
|
|
207
|
-
filter: TDSFilter[],
|
|
208
|
-
sort: TDSSort[],
|
|
209
|
-
groupBy: TDSGroupby,
|
|
210
|
-
startRow?: number | undefined,
|
|
211
|
-
endRow?: number | undefined,
|
|
212
|
-
) {
|
|
213
|
-
this.startRow = startRow;
|
|
214
|
-
this.endRow = endRow;
|
|
215
|
-
this.columns = columns;
|
|
216
|
-
this.filter = filter;
|
|
217
|
-
this.sort = sort;
|
|
218
|
-
this.groupBy = groupBy;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
static readonly serialization = new SerializationFactory(
|
|
222
|
-
createModelSchema(TDSRequest, {
|
|
223
|
-
startRow: optional(primitive()),
|
|
224
|
-
endRow: optional(primitive()),
|
|
225
|
-
columns: list(usingModelSchema(TDSColumn.serialization.schema)),
|
|
226
|
-
filter: list(usingModelSchema(TDSFilter.serialization.schema)),
|
|
227
|
-
sort: list(usingModelSchema(TDSSort.serialization.schema)),
|
|
228
|
-
groupBy: usingModelSchema(TDSGroupby.serialization.schema),
|
|
229
|
-
}),
|
|
230
|
-
);
|
|
231
|
-
}
|
|
@@ -1,30 +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 { createModelSchema, primitive } from 'serializr';
|
|
18
|
-
import { SerializationFactory } from '@finos/legend-shared';
|
|
19
|
-
|
|
20
|
-
export class CompletionItem {
|
|
21
|
-
display!: string;
|
|
22
|
-
completion!: string;
|
|
23
|
-
|
|
24
|
-
static readonly serialization = new SerializationFactory(
|
|
25
|
-
createModelSchema(CompletionItem, {
|
|
26
|
-
display: primitive(),
|
|
27
|
-
completion: primitive(),
|
|
28
|
-
}),
|
|
29
|
-
);
|
|
30
|
-
}
|
|
@@ -1,79 +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 { action, makeObservable, observable } from 'mobx';
|
|
18
|
-
import type { GridApi } from '@ag-grid-community/core';
|
|
19
|
-
import type { DataCubeState } from './DataCubeState.js';
|
|
20
|
-
import { LEGEND_APPLICATION_REPL_SETTING_KEY } from '../../Const.js';
|
|
21
|
-
|
|
22
|
-
export class DataCubeConfigState {
|
|
23
|
-
readonly dataCubeState!: DataCubeState;
|
|
24
|
-
|
|
25
|
-
licenseKey?: string | undefined;
|
|
26
|
-
isPaginationEnabled!: boolean;
|
|
27
|
-
gridApi?: GridApi | undefined;
|
|
28
|
-
|
|
29
|
-
isPivotPanelOpened = false;
|
|
30
|
-
|
|
31
|
-
constructor(dataCubeState: DataCubeState) {
|
|
32
|
-
makeObservable(this, {
|
|
33
|
-
licenseKey: observable,
|
|
34
|
-
isPaginationEnabled: observable,
|
|
35
|
-
gridApi: observable,
|
|
36
|
-
isPivotPanelOpened: observable,
|
|
37
|
-
setGridApi: action,
|
|
38
|
-
setLicenseKey: action,
|
|
39
|
-
setIsPaginationEnabled: action,
|
|
40
|
-
setIsPivotPanelOpened: action,
|
|
41
|
-
openPanel: action,
|
|
42
|
-
closePanel: action,
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
this.dataCubeState = dataCubeState;
|
|
46
|
-
this.isPaginationEnabled =
|
|
47
|
-
dataCubeState.editorStore.applicationStore.settingService.getBooleanValue(
|
|
48
|
-
LEGEND_APPLICATION_REPL_SETTING_KEY.PAGINATION,
|
|
49
|
-
) ?? true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
setIsPivotPanelOpened(val: boolean): void {
|
|
53
|
-
this.isPivotPanelOpened = val;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
setGridApi(val: GridApi | undefined): void {
|
|
57
|
-
this.gridApi = val;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
setLicenseKey(val: string | undefined): void {
|
|
61
|
-
this.licenseKey = val;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
setIsPaginationEnabled(val: boolean): void {
|
|
65
|
-
this.isPaginationEnabled = val;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
openPanel(): void {
|
|
69
|
-
this.dataCubeState.configState.setIsPivotPanelOpened(true);
|
|
70
|
-
this.dataCubeState.propertiesPanelState.hpivotAndSortPanelState.initialize();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
closePanel(): void {
|
|
74
|
-
this.dataCubeState.configState.setIsPivotPanelOpened(false);
|
|
75
|
-
this.dataCubeState.propertiesPanelState.hpivotAndSortPanelState.setIsInitialized(
|
|
76
|
-
false,
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1,143 +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 { guaranteeNonNullable } from '@finos/legend-shared';
|
|
18
|
-
import {
|
|
19
|
-
getAggregationTDSColumnCustomizations,
|
|
20
|
-
getFilterModeltype,
|
|
21
|
-
getTDSColumnCustomizations,
|
|
22
|
-
getTDSRowData,
|
|
23
|
-
type TDSRowDataType,
|
|
24
|
-
} from '../../components/grid/GridUtils.js';
|
|
25
|
-
import { action, computed, makeObservable, observable } from 'mobx';
|
|
26
|
-
import type { ColDef } from '@ag-grid-community/core';
|
|
27
|
-
import type { V1_Lambda, TDSExecutionResult } from '@finos/legend-graph';
|
|
28
|
-
import {
|
|
29
|
-
TDS_FILTER_GROUP,
|
|
30
|
-
type TDSRequest,
|
|
31
|
-
} from '../../components/grid/TDSRequest.js';
|
|
32
|
-
import type { DataCubeState } from './DataCubeState.js';
|
|
33
|
-
|
|
34
|
-
interface FilterModel {
|
|
35
|
-
[key: string]: object;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export class DataCubeGridState {
|
|
39
|
-
readonly dataCubeState!: DataCubeState;
|
|
40
|
-
|
|
41
|
-
initialResult?: TDSExecutionResult | undefined;
|
|
42
|
-
currentResult?: TDSExecutionResult | undefined;
|
|
43
|
-
columns?: string[] | undefined;
|
|
44
|
-
initialQueryLambda?: V1_Lambda | undefined;
|
|
45
|
-
currentQueryTDSRequest?: TDSRequest | undefined;
|
|
46
|
-
lastQueryTDSRequest?: TDSRequest | undefined;
|
|
47
|
-
|
|
48
|
-
constructor(dataCubeState: DataCubeState) {
|
|
49
|
-
makeObservable(this, {
|
|
50
|
-
initialResult: observable,
|
|
51
|
-
initialQueryLambda: observable,
|
|
52
|
-
currentResult: observable,
|
|
53
|
-
columns: observable,
|
|
54
|
-
currentQueryTDSRequest: observable,
|
|
55
|
-
lastQueryTDSRequest: observable,
|
|
56
|
-
setInitialResult: action,
|
|
57
|
-
setColumns: action,
|
|
58
|
-
setInitialQueryLambda: action,
|
|
59
|
-
setCurrentResult: action,
|
|
60
|
-
setCurrentQueryTDSRequest: action,
|
|
61
|
-
setLastQueryTDSRequest: action,
|
|
62
|
-
rowData: computed,
|
|
63
|
-
columnDefs: computed,
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
this.dataCubeState = dataCubeState;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
setLastQueryTDSRequest(val: TDSRequest | undefined): void {
|
|
70
|
-
this.lastQueryTDSRequest = val;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
setCurrentQueryTDSRequest(val: TDSRequest | undefined): void {
|
|
74
|
-
this.currentQueryTDSRequest = val;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
setInitialQueryLambda(val: V1_Lambda | undefined): void {
|
|
78
|
-
this.initialQueryLambda = val;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
setInitialResult(val: TDSExecutionResult | undefined): void {
|
|
82
|
-
this.initialResult = val;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
setCurrentResult(val: TDSExecutionResult | undefined): void {
|
|
86
|
-
this.currentResult = val;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
setColumns(val: string[]): void {
|
|
90
|
-
this.columns = val;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
get rowData(): TDSRowDataType[] {
|
|
94
|
-
return this.initialResult ? getTDSRowData(this.initialResult.result) : [];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
get columnDefs(): ColDef[] {
|
|
98
|
-
const filterModel: FilterModel = {};
|
|
99
|
-
this.currentQueryTDSRequest?.filter.forEach((filter) => {
|
|
100
|
-
if (filter.conditions.length === 1) {
|
|
101
|
-
filterModel[filter.column] = {
|
|
102
|
-
filter: filter.conditions[0]?.value,
|
|
103
|
-
filterType: getFilterModeltype(filter.columnType),
|
|
104
|
-
type: filter.conditions[0]?.operation,
|
|
105
|
-
};
|
|
106
|
-
} else {
|
|
107
|
-
filterModel[filter.column] = {
|
|
108
|
-
filterType: getFilterModeltype(filter.columnType),
|
|
109
|
-
operator:
|
|
110
|
-
filter.groupOperation === TDS_FILTER_GROUP.AND ? 'AND' : 'OR',
|
|
111
|
-
condition1: {
|
|
112
|
-
filter: filter.conditions[0]?.value,
|
|
113
|
-
filterType: getFilterModeltype(filter.columnType),
|
|
114
|
-
type: filter.conditions[0]?.operation,
|
|
115
|
-
},
|
|
116
|
-
condition2: {
|
|
117
|
-
filter: filter.conditions[1]?.value,
|
|
118
|
-
filterType: getFilterModeltype(filter.columnType),
|
|
119
|
-
type: filter.conditions[1]?.operation,
|
|
120
|
-
},
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
if (this.currentQueryTDSRequest) {
|
|
125
|
-
this.dataCubeState.configState.gridApi?.setFilterModel(filterModel);
|
|
126
|
-
}
|
|
127
|
-
return this.columns
|
|
128
|
-
? this.columns.map((c) => ({
|
|
129
|
-
field: c,
|
|
130
|
-
headerName: c,
|
|
131
|
-
...getAggregationTDSColumnCustomizations(
|
|
132
|
-
guaranteeNonNullable(this.initialResult),
|
|
133
|
-
c,
|
|
134
|
-
),
|
|
135
|
-
...getTDSColumnCustomizations(
|
|
136
|
-
guaranteeNonNullable(this.initialResult),
|
|
137
|
-
c,
|
|
138
|
-
this.currentQueryTDSRequest,
|
|
139
|
-
),
|
|
140
|
-
}))
|
|
141
|
-
: [];
|
|
142
|
-
}
|
|
143
|
-
}
|
|
@@ -1,28 +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 { DataCubeState } from './DataCubeState.js';
|
|
18
|
-
|
|
19
|
-
export abstract class DataCubePanelState {
|
|
20
|
-
readonly dataCubeState!: DataCubeState;
|
|
21
|
-
|
|
22
|
-
constructor(dataCubeState: DataCubeState) {
|
|
23
|
-
this.dataCubeState = dataCubeState;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
abstract initialize(): void;
|
|
27
|
-
abstract applyChanges(): void;
|
|
28
|
-
}
|
|
@@ -1,65 +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 { action, makeObservable, observable } from 'mobx';
|
|
18
|
-
import type { DataCubeState } from './DataCubeState.js';
|
|
19
|
-
import { HPivotAndSortPanelState } from './HPivotAndSortPanelState.js';
|
|
20
|
-
|
|
21
|
-
export enum PIVOT_PANEL_TABS {
|
|
22
|
-
COLUMNS_AND_PIVOTS = 'Colums/Pivots',
|
|
23
|
-
HPIVOTS_AND_SORTS = 'HPivots/Sorts',
|
|
24
|
-
GENERAL_PROPERTIES = 'General Properties',
|
|
25
|
-
COLUMN_PROPERTIES = 'Column Properties',
|
|
26
|
-
DEVELOPER_OPTIONS = 'Developer',
|
|
27
|
-
PIVOT_LAYOUT = 'Pivot Layout',
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export class DataCubePropertiesPanelState {
|
|
31
|
-
readonly dataCubeState!: DataCubeState;
|
|
32
|
-
selectedPivotPanelTab = PIVOT_PANEL_TABS.COLUMNS_AND_PIVOTS;
|
|
33
|
-
hpivotAndSortPanelState!: HPivotAndSortPanelState;
|
|
34
|
-
|
|
35
|
-
constructor(dataCubeState: DataCubeState) {
|
|
36
|
-
makeObservable(this, {
|
|
37
|
-
selectedPivotPanelTab: observable,
|
|
38
|
-
hpivotAndSortPanelState: observable,
|
|
39
|
-
setSelectedPivotPanelTab: action,
|
|
40
|
-
applyChanges: action,
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
this.dataCubeState = dataCubeState;
|
|
44
|
-
this.hpivotAndSortPanelState = new HPivotAndSortPanelState(
|
|
45
|
-
this.dataCubeState,
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
setSelectedPivotPanelTab(val: PIVOT_PANEL_TABS): void {
|
|
50
|
-
this.selectedPivotPanelTab = val;
|
|
51
|
-
switch (val) {
|
|
52
|
-
case PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS: {
|
|
53
|
-
this.hpivotAndSortPanelState.initialize();
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
default: {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
applyChanges(): void {
|
|
63
|
-
this.hpivotAndSortPanelState.applyChanges();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,66 +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 { SourceInformation, type ParserError } from '@finos/legend-graph';
|
|
18
|
-
import { uuid } from '@finos/legend-shared';
|
|
19
|
-
import { action, makeObservable, observable } from 'mobx';
|
|
20
|
-
|
|
21
|
-
export class DataCubeQueryEditorState {
|
|
22
|
-
uuid = uuid();
|
|
23
|
-
query: string;
|
|
24
|
-
parserError?: ParserError | undefined;
|
|
25
|
-
|
|
26
|
-
constructor(query: string) {
|
|
27
|
-
makeObservable(this, {
|
|
28
|
-
query: observable,
|
|
29
|
-
parserError: observable,
|
|
30
|
-
setQuery: action,
|
|
31
|
-
setParserError: action,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
this.query = query;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
setQuery(val: string): void {
|
|
38
|
-
this.query = val;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
setParserError(parserError: ParserError | undefined): void {
|
|
42
|
-
// account for the lambda prefix offset in source information
|
|
43
|
-
if (parserError?.sourceInformation) {
|
|
44
|
-
parserError.sourceInformation = this.processSourceInformation(
|
|
45
|
-
parserError.sourceInformation,
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
this.parserError = parserError;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
processSourceInformation(
|
|
52
|
-
sourceInformation: SourceInformation,
|
|
53
|
-
): SourceInformation {
|
|
54
|
-
const { sourceId, startLine, startColumn, endLine, endColumn } =
|
|
55
|
-
sourceInformation;
|
|
56
|
-
const lineOffset = 0;
|
|
57
|
-
const columnOffset = 0;
|
|
58
|
-
return new SourceInformation(
|
|
59
|
-
sourceId,
|
|
60
|
-
startLine + lineOffset,
|
|
61
|
-
startColumn - (startLine === 1 ? columnOffset : 0),
|
|
62
|
-
endLine + lineOffset,
|
|
63
|
-
endColumn - (endLine === 1 ? columnOffset : 0),
|
|
64
|
-
);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
@@ -1,41 +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 { action, makeObservable, observable } from 'mobx';
|
|
18
|
-
import type { DataCubeState } from './DataCubeState.js';
|
|
19
|
-
import { DataCubeQueryEditorState } from './DataCubeQueryEditorState.js';
|
|
20
|
-
|
|
21
|
-
export class DataCubeQueryTextEditorState {
|
|
22
|
-
readonly dataCubeState!: DataCubeState;
|
|
23
|
-
|
|
24
|
-
queryEditorState!: DataCubeQueryEditorState;
|
|
25
|
-
currentSubQuery?: string | undefined;
|
|
26
|
-
|
|
27
|
-
constructor(dataCubeState: DataCubeState) {
|
|
28
|
-
makeObservable(this, {
|
|
29
|
-
currentSubQuery: observable,
|
|
30
|
-
queryEditorState: observable,
|
|
31
|
-
setCurrentSubQuery: action,
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
this.dataCubeState = dataCubeState;
|
|
35
|
-
this.queryEditorState = new DataCubeQueryEditorState('');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
setCurrentSubQuery(val: string | undefined): void {
|
|
39
|
-
this.currentSubQuery = val;
|
|
40
|
-
}
|
|
41
|
-
}
|