@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
|
@@ -0,0 +1,27 @@
|
|
|
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 { DataCubeQuerySnapshot } from './DataCubeQuerySnapshot.js';
|
|
17
|
+
import type { DataCubeQuerySnapshotManager } from './DataCubeQuerySnapshotManager.js';
|
|
18
|
+
export declare abstract class DataCubeQuerySnapshotSubscriber {
|
|
19
|
+
readonly manager: DataCubeQuerySnapshotManager;
|
|
20
|
+
private latestSnapshot;
|
|
21
|
+
constructor(snapshotManager: DataCubeQuerySnapshotManager);
|
|
22
|
+
abstract applySnapshot(snapshot: DataCubeQuerySnapshot): Promise<void>;
|
|
23
|
+
receiveSnapshot(snapshot: DataCubeQuerySnapshot): Promise<void>;
|
|
24
|
+
publishSnapshot(snapshot: DataCubeQuerySnapshot): void;
|
|
25
|
+
getLatestSnapshot(): DataCubeQuerySnapshot | undefined;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=DataCubeQuerySnapshotSubscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeQuerySnapshotSubscriber.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF,8BAAsB,+BAA+B;IACnD,QAAQ,CAAC,OAAO,EAAE,4BAA4B,CAAC;IAC/C,OAAO,CAAC,cAAc,CAAoC;gBAE9C,eAAe,EAAE,4BAA4B;IAIzD,QAAQ,CAAC,aAAa,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhE,eAAe,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,eAAe,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IAKtD,iBAAiB,IAAI,qBAAqB,GAAG,SAAS;CAGvD"}
|
|
@@ -13,14 +13,22 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
export class DataCubeQuerySnapshotSubscriber {
|
|
17
|
+
manager;
|
|
18
|
+
latestSnapshot;
|
|
19
|
+
constructor(snapshotManager) {
|
|
20
|
+
this.manager = snapshotManager;
|
|
21
|
+
}
|
|
22
|
+
async receiveSnapshot(snapshot) {
|
|
23
|
+
this.latestSnapshot = snapshot;
|
|
24
|
+
await this.applySnapshot(snapshot);
|
|
25
|
+
}
|
|
26
|
+
publishSnapshot(snapshot) {
|
|
27
|
+
this.latestSnapshot = snapshot;
|
|
28
|
+
this.manager.broadcastSnapshot(snapshot);
|
|
29
|
+
}
|
|
30
|
+
getLatestSnapshot() {
|
|
31
|
+
return this.latestSnapshot;
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=DataCubeQuerySnapshotSubscriber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeQuerySnapshotSubscriber.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,OAAgB,+BAA+B;IAC1C,OAAO,CAA+B;IACvC,cAAc,CAAoC;IAE1D,YAAY,eAA6C;QACvD,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;IACjC,CAAC;IAID,KAAK,CAAC,eAAe,CAAC,QAA+B;QACnD,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAED,eAAe,CAAC,QAA+B;QAC7C,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;QAC/B,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC3C,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;CACF"}
|
package/lib/stores/dataCube/{DataCubeQueryEditorState.d.ts → editor/DataCubeEditorCodeState.d.ts}
RENAMED
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import {
|
|
16
|
+
import type { DataCubeState } from '../DataCubeState.js';
|
|
17
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
|
18
|
+
import { ParserError, SourceInformation } from '@finos/legend-graph';
|
|
17
19
|
export declare class DataCubeQueryEditorState {
|
|
18
20
|
uuid: string;
|
|
19
21
|
query: string;
|
|
@@ -23,4 +25,12 @@ export declare class DataCubeQueryEditorState {
|
|
|
23
25
|
setParserError(parserError: ParserError | undefined): void;
|
|
24
26
|
processSourceInformation(sourceInformation: SourceInformation): SourceInformation;
|
|
25
27
|
}
|
|
26
|
-
|
|
28
|
+
export declare class DataCubeQueryCodeEditorState {
|
|
29
|
+
readonly dataCubeState: DataCubeState;
|
|
30
|
+
queryEditorState: DataCubeQueryEditorState;
|
|
31
|
+
currentSubQuery?: string | undefined;
|
|
32
|
+
constructor(dataCubeState: DataCubeState);
|
|
33
|
+
setCurrentSubQuery(val: string | undefined): void;
|
|
34
|
+
parseQuery(): GeneratorFn<void>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=DataCubeEditorCodeState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorCodeState.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorCodeState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAKL,KAAK,WAAW,EAEjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,iBAAiB,EAElB,MAAM,qBAAqB,CAAC;AAE7B,qBAAa,wBAAwB;IACnC,IAAI,SAAU;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;gBAE1B,KAAK,EAAE,MAAM;IAWzB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI3B,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,SAAS,GAAG,IAAI;IAU1D,wBAAwB,CACtB,iBAAiB,EAAE,iBAAiB,GACnC,iBAAiB;CAarB;AAED,qBAAa,4BAA4B;IACvC,QAAQ,CAAC,aAAa,EAAG,aAAa,CAAC;IAEvC,gBAAgB,EAAG,wBAAwB,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAEzB,aAAa,EAAE,aAAa;IAYxC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIhD,UAAU,IAAI,WAAW,CAAC,IAAI,CAAC;CAgEjC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 { action, flow, flowResult, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { HttpStatus, NetworkClientError, assertErrorThrown, uuid, } from '@finos/legend-shared';
|
|
18
|
+
import { ParserError, SourceInformation, V1_ParserError, } from '@finos/legend-graph';
|
|
19
|
+
export class DataCubeQueryEditorState {
|
|
20
|
+
uuid = uuid();
|
|
21
|
+
query;
|
|
22
|
+
parserError;
|
|
23
|
+
constructor(query) {
|
|
24
|
+
makeObservable(this, {
|
|
25
|
+
query: observable,
|
|
26
|
+
parserError: observable,
|
|
27
|
+
setQuery: action,
|
|
28
|
+
setParserError: action,
|
|
29
|
+
});
|
|
30
|
+
this.query = query;
|
|
31
|
+
}
|
|
32
|
+
setQuery(val) {
|
|
33
|
+
this.query = val;
|
|
34
|
+
}
|
|
35
|
+
setParserError(parserError) {
|
|
36
|
+
// account for the lambda prefix offset in source information
|
|
37
|
+
if (parserError?.sourceInformation) {
|
|
38
|
+
parserError.sourceInformation = this.processSourceInformation(parserError.sourceInformation);
|
|
39
|
+
}
|
|
40
|
+
this.parserError = parserError;
|
|
41
|
+
}
|
|
42
|
+
processSourceInformation(sourceInformation) {
|
|
43
|
+
const { sourceId, startLine, startColumn, endLine, endColumn } = sourceInformation;
|
|
44
|
+
const lineOffset = 0;
|
|
45
|
+
const columnOffset = 0;
|
|
46
|
+
return new SourceInformation(sourceId, startLine + lineOffset, startColumn - (startLine === 1 ? columnOffset : 0), endLine + lineOffset, endColumn - (endLine === 1 ? columnOffset : 0));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class DataCubeQueryCodeEditorState {
|
|
50
|
+
dataCubeState;
|
|
51
|
+
queryEditorState;
|
|
52
|
+
currentSubQuery;
|
|
53
|
+
constructor(dataCubeState) {
|
|
54
|
+
makeObservable(this, {
|
|
55
|
+
currentSubQuery: observable,
|
|
56
|
+
queryEditorState: observable,
|
|
57
|
+
setCurrentSubQuery: action,
|
|
58
|
+
parseQuery: flow,
|
|
59
|
+
});
|
|
60
|
+
this.dataCubeState = dataCubeState;
|
|
61
|
+
this.queryEditorState = new DataCubeQueryEditorState('');
|
|
62
|
+
}
|
|
63
|
+
setCurrentSubQuery(val) {
|
|
64
|
+
this.currentSubQuery = val;
|
|
65
|
+
}
|
|
66
|
+
*parseQuery() {
|
|
67
|
+
try {
|
|
68
|
+
this.queryEditorState.setParserError(undefined);
|
|
69
|
+
yield flowResult(this.dataCubeState.editorStore.client.parseQuery({
|
|
70
|
+
code: `|${this.queryEditorState.query}`,
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
assertErrorThrown(error);
|
|
75
|
+
if (error instanceof NetworkClientError &&
|
|
76
|
+
error.response.status === HttpStatus.BAD_REQUEST) {
|
|
77
|
+
const protocol = V1_ParserError.serialization.fromJson(error.payload);
|
|
78
|
+
const parserError = new ParserError(protocol.message);
|
|
79
|
+
if (protocol.sourceInformation) {
|
|
80
|
+
parserError.sourceInformation = new SourceInformation(protocol.sourceInformation.sourceId, protocol.sourceInformation.startLine, protocol.sourceInformation.startColumn, protocol.sourceInformation.endLine, protocol.sourceInformation.endColumn);
|
|
81
|
+
}
|
|
82
|
+
this.queryEditorState.setParserError(parserError);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=DataCubeEditorCodeState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorCodeState.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorCodeState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE5E,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,GAGL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAE7B,MAAM,OAAO,wBAAwB;IACnC,IAAI,GAAG,IAAI,EAAE,CAAC;IACd,KAAK,CAAS;IACd,WAAW,CAA2B;IAEtC,YAAY,KAAa;QACvB,cAAc,CAAC,IAAI,EAAE;YACnB,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE,MAAM;YAChB,cAAc,EAAE,MAAM;SACvB,CAAC,CAAC;QAEH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,QAAQ,CAAC,GAAW;QAClB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,cAAc,CAAC,WAAoC;QACjD,6DAA6D;QAC7D,IAAI,WAAW,EAAE,iBAAiB,EAAE,CAAC;YACnC,WAAW,CAAC,iBAAiB,GAAG,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CAAC,aAAa,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC/C,IAAI,EAAE,IAAI,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE;aACxC,CAAC,CACH,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IACE,KAAK,YAAY,kBAAkB;gBACnC,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,UAAU,CAAC,WAAW,EAChD,CAAC;gBACD,MAAM,QAAQ,GAAG,cAAc,CAAC,aAAa,CAAC,QAAQ,CACpD,KAAK,CAAC,OAAsC,CAC7C,CAAC;gBACF,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBACtD,IAAI,QAAQ,CAAC,iBAAiB,EAAE,CAAC;oBAC/B,WAAW,CAAC,iBAAiB,GAAG,IAAI,iBAAiB,CACnD,QAAQ,CAAC,iBAAiB,CAAC,QAAQ,EACnC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,EACpC,QAAQ,CAAC,iBAAiB,CAAC,WAAW,EACtC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,EAClC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CACrC,CAAC;gBACJ,CAAC;gBACD,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;IACH,CAAC;CAkCF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { DataCubeQuerySnapshot } from '../core/DataCubeQuerySnapshot.js';
|
|
17
|
+
export interface DataCubeQueryEditorSubState {
|
|
18
|
+
/**
|
|
19
|
+
* Update the editor state based on the snapshot
|
|
20
|
+
*/
|
|
21
|
+
applySnaphot(snapshot: DataCubeQuerySnapshot): void;
|
|
22
|
+
/**
|
|
23
|
+
* Build and enrich the snapshot with data from the editor state
|
|
24
|
+
* @returns whether the snapshot should be updated or not
|
|
25
|
+
*/
|
|
26
|
+
buildSnapshot(newSnapshot: DataCubeQuerySnapshot, baseSnapshot: DataCubeQuerySnapshot): boolean;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=DataCubeEditorQuerySnapshotBuilder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorQuerySnapshotBuilder.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAE9E,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAEpD;;;OAGG;IACH,aAAa,CACX,WAAW,EAAE,qBAAqB,EAClC,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC;CACZ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=DataCubeEditorQuerySnapshotBuilder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorQuerySnapshotBuilder.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { DataCubeState } from '../DataCubeState.js';
|
|
17
|
+
import type { DataCubeQuerySnapshot, DataCubeQuerySnapshotColumn } from '../core/DataCubeQuerySnapshot.js';
|
|
18
|
+
import type { DataCubeQueryEditorSubState } from './DataCubeEditorQuerySnapshotBuilder.js';
|
|
19
|
+
import { DATA_CUBE_COLUMN_SORT_DIRECTION } from '../DataCubeMetaModelConst.js';
|
|
20
|
+
export declare class DataCubeEditorSortColumnState {
|
|
21
|
+
readonly column: DataCubeQuerySnapshotColumn;
|
|
22
|
+
direction: DATA_CUBE_COLUMN_SORT_DIRECTION;
|
|
23
|
+
constructor(column: DataCubeQuerySnapshotColumn, direction: DATA_CUBE_COLUMN_SORT_DIRECTION);
|
|
24
|
+
setDirection(val: DATA_CUBE_COLUMN_SORT_DIRECTION): void;
|
|
25
|
+
}
|
|
26
|
+
export declare class DataCubeEditorSortState implements DataCubeQueryEditorSubState {
|
|
27
|
+
readonly dataCubeState: DataCubeState;
|
|
28
|
+
availableColumns: DataCubeEditorSortColumnState[];
|
|
29
|
+
selectedColumns: DataCubeEditorSortColumnState[];
|
|
30
|
+
availableColumnsSearchText: string;
|
|
31
|
+
selectedColumnsSearchText: string;
|
|
32
|
+
constructor(dataCubeState: DataCubeState);
|
|
33
|
+
setAvailableColumns(val: DataCubeEditorSortColumnState[]): void;
|
|
34
|
+
setSelectedColumns(val: DataCubeEditorSortColumnState[]): void;
|
|
35
|
+
addAvailableColumn(columnName: string): void;
|
|
36
|
+
addSelectedColumn(columnName: string): void;
|
|
37
|
+
addAllAvailableColumns(): void;
|
|
38
|
+
addAllSelectedColumns(): void;
|
|
39
|
+
setAvailableColumnsSearchText(val: string): void;
|
|
40
|
+
setSelectedColumnsSearchText(val: string): void;
|
|
41
|
+
get availableColumnsSearchResults(): DataCubeEditorSortColumnState[];
|
|
42
|
+
get selectedColumnsSearchResults(): DataCubeEditorSortColumnState[];
|
|
43
|
+
applySnaphot(snapshot: DataCubeQuerySnapshot): void;
|
|
44
|
+
buildSnapshot(newSnapshot: DataCubeQuerySnapshot, baseSnapshot: DataCubeQuerySnapshot): boolean;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=DataCubeEditorSortState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,EAAE,CAUnE;IAED,IAAI,4BAA4B,IAAI,6BAA6B,EAAE,CAUlE;IAED,YAAY,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;IA0BnD,aAAa,CACX,WAAW,EAAE,qBAAqB,EAClC,YAAY,EAAE,qBAAqB,GAClC,OAAO;CAcX"}
|
|
@@ -0,0 +1,133 @@
|
|
|
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 { action, computed, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { deepEqual } from '@finos/legend-shared';
|
|
18
|
+
import { DATA_CUBE_COLUMN_SORT_DIRECTION } from '../DataCubeMetaModelConst.js';
|
|
19
|
+
export class DataCubeEditorSortColumnState {
|
|
20
|
+
column;
|
|
21
|
+
direction;
|
|
22
|
+
constructor(column, direction) {
|
|
23
|
+
makeObservable(this, {
|
|
24
|
+
direction: observable,
|
|
25
|
+
setDirection: action,
|
|
26
|
+
});
|
|
27
|
+
this.column = column;
|
|
28
|
+
this.direction = direction;
|
|
29
|
+
}
|
|
30
|
+
setDirection(val) {
|
|
31
|
+
this.direction = val;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export class DataCubeEditorSortState {
|
|
35
|
+
dataCubeState;
|
|
36
|
+
availableColumns = [];
|
|
37
|
+
selectedColumns = [];
|
|
38
|
+
availableColumnsSearchText = '';
|
|
39
|
+
selectedColumnsSearchText = '';
|
|
40
|
+
constructor(dataCubeState) {
|
|
41
|
+
this.dataCubeState = dataCubeState;
|
|
42
|
+
makeObservable(this, {
|
|
43
|
+
availableColumns: observable,
|
|
44
|
+
selectedColumns: observable,
|
|
45
|
+
availableColumnsSearchText: observable,
|
|
46
|
+
selectedColumnsSearchText: observable,
|
|
47
|
+
setAvailableColumns: action,
|
|
48
|
+
setSelectedColumns: action,
|
|
49
|
+
addAvailableColumn: action,
|
|
50
|
+
addSelectedColumn: action,
|
|
51
|
+
addAllAvailableColumns: action,
|
|
52
|
+
addAllSelectedColumns: action,
|
|
53
|
+
setSelectedColumnsSearchText: action,
|
|
54
|
+
setAvailableColumnsSearchText: action,
|
|
55
|
+
availableColumnsSearchResults: computed,
|
|
56
|
+
selectedColumnsSearchResults: computed,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
setAvailableColumns(val) {
|
|
60
|
+
this.availableColumns = val;
|
|
61
|
+
}
|
|
62
|
+
setSelectedColumns(val) {
|
|
63
|
+
this.selectedColumns = val;
|
|
64
|
+
}
|
|
65
|
+
addAvailableColumn(columnName) {
|
|
66
|
+
const column = this.availableColumns.find((col) => col.column.name === columnName);
|
|
67
|
+
if (column) {
|
|
68
|
+
this.setAvailableColumns(this.availableColumns.filter((col) => col.column.name !== columnName));
|
|
69
|
+
this.setSelectedColumns(this.selectedColumns.concat(column));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
addSelectedColumn(columnName) {
|
|
73
|
+
const column = this.selectedColumns.find((col) => col.column.name === columnName);
|
|
74
|
+
if (column) {
|
|
75
|
+
this.setSelectedColumns(this.selectedColumns.filter((col) => col.column.name !== columnName));
|
|
76
|
+
this.setAvailableColumns(this.availableColumns.concat(column));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
addAllAvailableColumns() {
|
|
80
|
+
this.setSelectedColumns(this.selectedColumns.concat(this.availableColumns));
|
|
81
|
+
this.setAvailableColumns([]);
|
|
82
|
+
}
|
|
83
|
+
addAllSelectedColumns() {
|
|
84
|
+
this.setAvailableColumns(this.availableColumns.concat(this.selectedColumns));
|
|
85
|
+
this.setSelectedColumns([]);
|
|
86
|
+
}
|
|
87
|
+
setAvailableColumnsSearchText(val) {
|
|
88
|
+
this.availableColumnsSearchText = val;
|
|
89
|
+
}
|
|
90
|
+
setSelectedColumnsSearchText(val) {
|
|
91
|
+
this.selectedColumnsSearchText = val;
|
|
92
|
+
}
|
|
93
|
+
get availableColumnsSearchResults() {
|
|
94
|
+
if (this.availableColumnsSearchText) {
|
|
95
|
+
return this.availableColumns.filter((col) => col.column.name
|
|
96
|
+
.toLowerCase()
|
|
97
|
+
.includes(this.availableColumnsSearchText.toLowerCase()));
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return this.availableColumns;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
get selectedColumnsSearchResults() {
|
|
104
|
+
if (this.selectedColumnsSearchText) {
|
|
105
|
+
return this.selectedColumns.filter((col) => col.column.name
|
|
106
|
+
.toLowerCase()
|
|
107
|
+
.includes(this.selectedColumnsSearchText.toLowerCase()));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
return this.selectedColumns;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
applySnaphot(snapshot) {
|
|
114
|
+
const sortColumns = snapshot.sortColumns;
|
|
115
|
+
this.setAvailableColumns(snapshot.columns
|
|
116
|
+
.filter((col) => !sortColumns.find((sortCol) => sortCol.name === col.name))
|
|
117
|
+
.map((col) => new DataCubeEditorSortColumnState(col, DATA_CUBE_COLUMN_SORT_DIRECTION.ASCENDING)));
|
|
118
|
+
this.setSelectedColumns(sortColumns.map((sortCol) => new DataCubeEditorSortColumnState(snapshot.columns.find((col) => col.name === sortCol.name), sortCol.direction)));
|
|
119
|
+
}
|
|
120
|
+
buildSnapshot(newSnapshot, baseSnapshot) {
|
|
121
|
+
const newSortColumns = this.selectedColumns.map((sortInfo) => ({
|
|
122
|
+
name: sortInfo.column.name,
|
|
123
|
+
type: sortInfo.column.type,
|
|
124
|
+
direction: sortInfo.direction,
|
|
125
|
+
}));
|
|
126
|
+
if (!deepEqual(newSortColumns, baseSnapshot.sortColumns)) {
|
|
127
|
+
newSnapshot.sortColumns = newSortColumns;
|
|
128
|
+
return true;
|
|
129
|
+
}
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=DataCubeEditorSortState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorSortState.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorSortState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAQpE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAE/E,MAAM,OAAO,6BAA6B;IAC/B,MAAM,CAA8B;IAC7C,SAAS,CAAkC;IAE3C,YACE,MAAmC,EACnC,SAA0C;QAE1C,cAAc,CAAC,IAAI,EAAE;YACnB,SAAS,EAAE,UAAU;YACrB,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,YAAY,CAAC,GAAoC;QAC/C,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC;IACvB,CAAC;CACF;AAED,MAAM,OAAO,uBAAuB;IACzB,aAAa,CAAiB;IAEvC,gBAAgB,GAAoC,EAAE,CAAC;IACvD,eAAe,GAAoC,EAAE,CAAC;IACtD,0BAA0B,GAAG,EAAE,CAAC;IAChC,yBAAyB,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C,CAAC;YACtC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI;YAC1B,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI;YAC1B,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC9B,CAAC,CAAC,CAAC;QAEN,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;YACzD,WAAW,CAAC,WAAW,GAAG,cAAc,CAAC;YACzC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { DataCubeState } from '../DataCubeState.js';
|
|
17
|
+
import { DataCubeEditorSortState } from './DataCubeEditorSortState.js';
|
|
18
|
+
import { DataCubeQueryCodeEditorState } from './DataCubeEditorCodeState.js';
|
|
19
|
+
import { DataCubeQuerySnapshotSubscriber } from '../core/DataCubeQuerySnapshotSubscriber.js';
|
|
20
|
+
import { type DataCubeQuerySnapshot } from '../core/DataCubeQuerySnapshot.js';
|
|
21
|
+
export declare enum DATA_CUBE_EDITOR_TAB {
|
|
22
|
+
COLUMNS = "Columns",
|
|
23
|
+
VERTICAL_PIVOTS = "VPivots",
|
|
24
|
+
HORIZONTAL_PIVOTS = "HPivots",
|
|
25
|
+
SORTS = "Sorts",
|
|
26
|
+
EXTENDED_COLUMNS = "Extended Columns",
|
|
27
|
+
GENERAL_PROPERTIES = "General Properties",
|
|
28
|
+
COLUMN_PROPERTIES = "Column Properties",
|
|
29
|
+
Code = "Code"
|
|
30
|
+
}
|
|
31
|
+
export declare class DataCubeEditorState extends DataCubeQuerySnapshotSubscriber {
|
|
32
|
+
readonly dataCubeState: DataCubeState;
|
|
33
|
+
readonly sort: DataCubeEditorSortState;
|
|
34
|
+
readonly codeEditorState: DataCubeQueryCodeEditorState;
|
|
35
|
+
isPanelOpen: boolean;
|
|
36
|
+
currentTab: DATA_CUBE_EDITOR_TAB;
|
|
37
|
+
constructor(dataCubeState: DataCubeState);
|
|
38
|
+
openPanel(): void;
|
|
39
|
+
closePanel(): void;
|
|
40
|
+
setCurrentTab(val: DATA_CUBE_EDITOR_TAB): void;
|
|
41
|
+
applyChanges(): void;
|
|
42
|
+
applySnapshot(snapshot: DataCubeQuerySnapshot): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=DataCubeEditorState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorState.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAG1C,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,eAAe,YAAY;IAC3B,iBAAiB,YAAY;IAC7B,KAAK,UAAU;IACf,gBAAgB,qBAAqB;IACrC,kBAAkB,uBAAuB;IACzC,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;CAGd;AAED,qBAAa,mBAAoB,SAAQ,+BAA+B;IACtE,QAAQ,CAAC,aAAa,EAAG,aAAa,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAG,uBAAuB,CAAC;IACxC,QAAQ,CAAC,eAAe,EAAG,4BAA4B,CAAC;IAExD,WAAW,UAAS;IACpB,UAAU,uBAA8B;gBAE5B,aAAa,EAAE,aAAa;IAmBxC,SAAS,IAAI,IAAI;IAIjB,UAAU,IAAI,IAAI;IAIlB,aAAa,CAAC,GAAG,EAAE,oBAAoB,GAAG,IAAI;IAI9C,YAAY,IAAI,IAAI;IAWL,aAAa,CAAC,QAAQ,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7E"}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { action, makeObservable, observable } from 'mobx';
|
|
17
|
+
import { DataCubeEditorSortState } from './DataCubeEditorSortState.js';
|
|
18
|
+
import { DataCubeQueryCodeEditorState } from './DataCubeEditorCodeState.js';
|
|
19
|
+
import { DataCubeQuerySnapshotSubscriber } from '../core/DataCubeQuerySnapshotSubscriber.js';
|
|
20
|
+
import { cloneSnapshot, } from '../core/DataCubeQuerySnapshot.js';
|
|
21
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
22
|
+
export var DATA_CUBE_EDITOR_TAB;
|
|
23
|
+
(function (DATA_CUBE_EDITOR_TAB) {
|
|
24
|
+
DATA_CUBE_EDITOR_TAB["COLUMNS"] = "Columns";
|
|
25
|
+
DATA_CUBE_EDITOR_TAB["VERTICAL_PIVOTS"] = "VPivots";
|
|
26
|
+
DATA_CUBE_EDITOR_TAB["HORIZONTAL_PIVOTS"] = "HPivots";
|
|
27
|
+
DATA_CUBE_EDITOR_TAB["SORTS"] = "Sorts";
|
|
28
|
+
DATA_CUBE_EDITOR_TAB["EXTENDED_COLUMNS"] = "Extended Columns";
|
|
29
|
+
DATA_CUBE_EDITOR_TAB["GENERAL_PROPERTIES"] = "General Properties";
|
|
30
|
+
DATA_CUBE_EDITOR_TAB["COLUMN_PROPERTIES"] = "Column Properties";
|
|
31
|
+
DATA_CUBE_EDITOR_TAB["Code"] = "Code";
|
|
32
|
+
// DEVELOPER_OPTIONS = 'Developer',
|
|
33
|
+
// PIVOT_LAYOUT = 'Pivot Layout',
|
|
34
|
+
})(DATA_CUBE_EDITOR_TAB || (DATA_CUBE_EDITOR_TAB = {}));
|
|
35
|
+
export class DataCubeEditorState extends DataCubeQuerySnapshotSubscriber {
|
|
36
|
+
dataCubeState;
|
|
37
|
+
sort;
|
|
38
|
+
codeEditorState; // TODO: move to editor state
|
|
39
|
+
isPanelOpen = false;
|
|
40
|
+
currentTab = DATA_CUBE_EDITOR_TAB.SORTS;
|
|
41
|
+
constructor(dataCubeState) {
|
|
42
|
+
super(dataCubeState.snapshotManager);
|
|
43
|
+
makeObservable(this, {
|
|
44
|
+
applyChanges: action,
|
|
45
|
+
currentTab: observable,
|
|
46
|
+
setCurrentTab: action,
|
|
47
|
+
isPanelOpen: observable,
|
|
48
|
+
openPanel: action,
|
|
49
|
+
closePanel: action,
|
|
50
|
+
});
|
|
51
|
+
this.codeEditorState = new DataCubeQueryCodeEditorState(this.dataCubeState);
|
|
52
|
+
this.dataCubeState = dataCubeState;
|
|
53
|
+
this.sort = new DataCubeEditorSortState(this.dataCubeState);
|
|
54
|
+
}
|
|
55
|
+
openPanel() {
|
|
56
|
+
this.isPanelOpen = true;
|
|
57
|
+
}
|
|
58
|
+
closePanel() {
|
|
59
|
+
this.isPanelOpen = false;
|
|
60
|
+
}
|
|
61
|
+
setCurrentTab(val) {
|
|
62
|
+
this.currentTab = val;
|
|
63
|
+
}
|
|
64
|
+
applyChanges() {
|
|
65
|
+
// let createNew = false;
|
|
66
|
+
const baseSnapshot = guaranteeNonNullable(this.getLatestSnapshot());
|
|
67
|
+
const snapshot = cloneSnapshot(baseSnapshot);
|
|
68
|
+
const createNew = this.sort.buildSnapshot(snapshot, baseSnapshot);
|
|
69
|
+
if (createNew) {
|
|
70
|
+
this.publishSnapshot(snapshot);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async applySnapshot(snapshot) {
|
|
74
|
+
this.sort.applySnaphot(snapshot);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=DataCubeEditorState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeEditorState.js","sourceRoot":"","sources":["../../../../src/stores/dataCube/editor/DataCubeEditorState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EACL,aAAa,GAEd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,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Y,GAAG,oBAAoB,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;QAElE,IAAI,SAAS,EAAE,CAAC;YACd,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAEQ,KAAK,CAAC,aAAa,CAAC,QAA+B;QAC1D,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;CACF"}
|
|
@@ -14,19 +14,22 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { IServerSideDatasource, IServerSideGetRowsParams } from '@ag-grid-community/core';
|
|
17
|
-
import {
|
|
18
|
-
import { type
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
import type { DataCubeGridState } from './DataCubeGridState.js';
|
|
18
|
+
import { type TabularDataSet } from '@finos/legend-graph';
|
|
19
|
+
export type GridClientResultCellDataType = string | number | boolean | null | undefined;
|
|
20
|
+
export type GridClientRowDataType = {
|
|
21
|
+
[key: string]: GridClientResultCellDataType;
|
|
22
|
+
};
|
|
23
|
+
export declare enum GridClientSortDirection {
|
|
24
|
+
ASCENDING = "asc",
|
|
25
|
+
DESCENDING = "desc"
|
|
26
|
+
}
|
|
27
|
+
export declare const toRowData: (tds: TabularDataSet) => GridClientRowDataType[];
|
|
28
|
+
export declare class DataCubeGridClientServerSideDataSource implements IServerSideDatasource {
|
|
29
|
+
readonly grid: DataCubeGridState;
|
|
30
|
+
constructor(grid: DataCubeGridState);
|
|
31
|
+
fetchRows(params: IServerSideGetRowsParams<unknown, unknown>): Promise<void>;
|
|
29
32
|
getRows(params: IServerSideGetRowsParams<unknown, unknown>): void;
|
|
30
|
-
|
|
33
|
+
private syncSnapshot;
|
|
31
34
|
}
|
|
32
|
-
//# sourceMappingURL=
|
|
35
|
+
//# sourceMappingURL=DataCubeGridClientEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DataCubeGridClientEngine.d.ts","sourceRoot":"","sources":["../../../../src/stores/dataCube/grid/DataCubeGridClientEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAchE,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,qBAAqB,CAAC;AAIrE,MAAM,MAAM,4BAA4B,GACpC,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,CAAC;AAEd,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,4BAA4B,CAAC;CAC7C,CAAC;AAEF,oBAAY,uBAAuB;IACjC,SAAS,QAAQ;IACjB,UAAU,SAAS;CACpB;AAED,eAAO,MAAM,SAAS,QAAS,cAAc,KAAG,qBAAqB,EAWjE,CAAC;AAEL,qBAAa,sCACX,YAAW,qBAAqB;IAEhC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;gBAErB,IAAI,EAAE,iBAAiB;IAI7B,SAAS,CACb,MAAM,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,GACjD,OAAO,CAAC,IAAI,CAAC;IAsBhB,OAAO,CAAC,MAAM,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI;IAWjE,OAAO,CAAC,YAAY;CAuCrB"}
|