@finos/legend-application-repl 0.0.2
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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/Const.d.ts +25 -0
- package/lib/Const.d.ts.map +1 -0
- package/lib/Const.js +26 -0
- package/lib/Const.js.map +1 -0
- package/lib/application/LegendREPLGridClient.d.ts +27 -0
- package/lib/application/LegendREPLGridClient.d.ts.map +1 -0
- package/lib/application/LegendREPLGridClient.js +40 -0
- package/lib/application/LegendREPLGridClient.js.map +1 -0
- package/lib/application/LegendREPLGridClientApplicationConfig.d.ts +29 -0
- package/lib/application/LegendREPLGridClientApplicationConfig.d.ts.map +1 -0
- package/lib/application/LegendREPLGridClientApplicationConfig.js +33 -0
- package/lib/application/LegendREPLGridClientApplicationConfig.js.map +1 -0
- package/lib/application/LegendREPLGridClientPluginManager.d.ts +32 -0
- package/lib/application/LegendREPLGridClientPluginManager.d.ts.map +1 -0
- package/lib/application/LegendREPLGridClientPluginManager.js +46 -0
- package/lib/application/LegendREPLGridClientPluginManager.js.map +1 -0
- package/lib/components/AgGrid.d.ts +22 -0
- package/lib/components/AgGrid.d.ts.map +1 -0
- package/lib/components/AgGrid.js +43 -0
- package/lib/components/AgGrid.js.map +1 -0
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.d.ts +23 -0
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.d.ts.map +1 -0
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.js +35 -0
- package/lib/components/Core_LegendREPLGridClientApplicationPlugin.js.map +1 -0
- package/lib/components/LegendREPLGridClientApplication.d.ts +24 -0
- package/lib/components/LegendREPLGridClientApplication.d.ts.map +1 -0
- package/lib/components/LegendREPLGridClientApplication.js +32 -0
- package/lib/components/LegendREPLGridClientApplication.js.map +1 -0
- package/lib/components/LegendREPLGridClientFrameworkProvider.d.ts +22 -0
- package/lib/components/LegendREPLGridClientFrameworkProvider.d.ts.map +1 -0
- package/lib/components/LegendREPLGridClientFrameworkProvider.js +29 -0
- package/lib/components/LegendREPLGridClientFrameworkProvider.js.map +1 -0
- package/lib/components/REPLGridClient.d.ts +18 -0
- package/lib/components/REPLGridClient.d.ts.map +1 -0
- package/lib/components/REPLGridClient.js +56 -0
- package/lib/components/REPLGridClient.js.map +1 -0
- package/lib/components/REPLGridClientStoreProvider.d.ts +22 -0
- package/lib/components/REPLGridClientStoreProvider.d.ts.map +1 -0
- package/lib/components/REPLGridClientStoreProvider.js +32 -0
- package/lib/components/REPLGridClientStoreProvider.js.map +1 -0
- package/lib/components/grid/GridUtils.d.ts +29 -0
- package/lib/components/grid/GridUtils.d.ts.map +1 -0
- package/lib/components/grid/GridUtils.js +152 -0
- package/lib/components/grid/GridUtils.js.map +1 -0
- package/lib/components/grid/REPLGridServerResult.d.ts +22 -0
- package/lib/components/grid/REPLGridServerResult.d.ts.map +1 -0
- package/lib/components/grid/REPLGridServerResult.js +26 -0
- package/lib/components/grid/REPLGridServerResult.js.map +1 -0
- package/lib/components/grid/ServerSideDataSource.d.ts +32 -0
- package/lib/components/grid/ServerSideDataSource.d.ts.map +1 -0
- package/lib/components/grid/ServerSideDataSource.js +107 -0
- package/lib/components/grid/ServerSideDataSource.js.map +1 -0
- package/lib/components/grid/TDSLambdaBuilder.d.ts +19 -0
- package/lib/components/grid/TDSLambdaBuilder.d.ts.map +1 -0
- package/lib/components/grid/TDSLambdaBuilder.js +277 -0
- package/lib/components/grid/TDSLambdaBuilder.js.map +1 -0
- package/lib/components/grid/TDSRequest.d.ts +90 -0
- package/lib/components/grid/TDSRequest.d.ts.map +1 -0
- package/lib/components/grid/TDSRequest.js +120 -0
- package/lib/components/grid/TDSRequest.js.map +1 -0
- package/lib/grid.css +17 -0
- package/lib/grid.css.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +37 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +88 -0
- package/lib/repl.css +17 -0
- package/lib/repl.css.map +1 -0
- package/lib/server/REPLServerClient.d.ts +28 -0
- package/lib/server/REPLServerClient.d.ts.map +1 -0
- package/lib/server/REPLServerClient.js +30 -0
- package/lib/server/REPLServerClient.js.map +1 -0
- package/lib/stores/LegendREPLGridClientApplicationPlugin.d.ts +26 -0
- package/lib/stores/LegendREPLGridClientApplicationPlugin.d.ts.map +1 -0
- package/lib/stores/LegendREPLGridClientApplicationPlugin.js +27 -0
- package/lib/stores/LegendREPLGridClientApplicationPlugin.js.map +1 -0
- package/lib/stores/LegendREPLGridClientBaseStore.d.ts +25 -0
- package/lib/stores/LegendREPLGridClientBaseStore.d.ts.map +1 -0
- package/lib/stores/LegendREPLGridClientBaseStore.js +24 -0
- package/lib/stores/LegendREPLGridClientBaseStore.js.map +1 -0
- package/lib/stores/REPLGridClientStore.d.ts +31 -0
- package/lib/stores/REPLGridClientStore.d.ts.map +1 -0
- package/lib/stores/REPLGridClientStore.js +101 -0
- package/lib/stores/REPLGridClientStore.js.map +1 -0
- package/lib/stores/REPLGridState.d.ts +38 -0
- package/lib/stores/REPLGridState.d.ts.map +1 -0
- package/lib/stores/REPLGridState.js +81 -0
- package/lib/stores/REPLGridState.js.map +1 -0
- package/package.json +88 -0
- package/src/Const.ts +27 -0
- package/src/application/LegendREPLGridClient.tsx +66 -0
- package/src/application/LegendREPLGridClientApplicationConfig.ts +64 -0
- package/src/application/LegendREPLGridClientPluginManager.ts +67 -0
- package/src/components/AgGrid.tsx +65 -0
- package/src/components/Core_LegendREPLGridClientApplicationPlugin.tsx +42 -0
- package/src/components/LegendREPLGridClientApplication.tsx +61 -0
- package/src/components/LegendREPLGridClientFrameworkProvider.tsx +63 -0
- package/src/components/REPLGridClient.tsx +157 -0
- package/src/components/REPLGridClientStoreProvider.tsx +61 -0
- package/src/components/grid/GridUtils.ts +190 -0
- package/src/components/grid/REPLGridServerResult.ts +30 -0
- package/src/components/grid/ServerSideDataSource.ts +184 -0
- package/src/components/grid/TDSLambdaBuilder.ts +413 -0
- package/src/components/grid/TDSRequest.ts +153 -0
- package/src/index.tsx +40 -0
- package/src/server/REPLServerClient.ts +74 -0
- package/src/stores/LegendREPLGridClientApplicationPlugin.ts +30 -0
- package/src/stores/LegendREPLGridClientBaseStore.ts +34 -0
- package/src/stores/REPLGridClientStore.ts +153 -0
- package/src/stores/REPLGridState.ts +102 -0
- package/tsconfig.json +66 -0
package/lib/grid.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @license @finos/legend-application-repl v0.0.2
|
|
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"@ag-grid-community/styles/ag-grid.css";@import"@ag-grid-community/styles/ag-theme-balham.css"/*# sourceMappingURL=grid.css.map */
|
package/lib/grid.css.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/grid.scss"],"names":[],"mappings":"AAgBQ,+CACA","file":"grid.css"}
|
package/lib/index.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @license @finos/legend-application-repl v0.0.2
|
|
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"@ag-grid-community/styles/ag-grid.css";@import"@ag-grid-community/styles/ag-theme-balham.css";.repl{height:100%;display:flex;flex-direction:column;background-color:var(--color-dark-grey-100)}.repl__header{display:flex;align-items:center;height:4rem;padding:.2rem;background:var(--color-dark-grey-80);border:.1rem solid var(--color-dark-grey-100)}.repl__header__content{display:flex;align-items:center;display:flex;justify-content:space-between;height:100%;width:100%}.repl__header__content__title{color:var(--color-light-grey-180);flex:1;margin:0 1rem}.repl__header__content__title input{padding:0 .4rem}.repl__header__content__title__text{display:flex;align-items:center;padding:.6rem .5rem .5rem;margin:0 1rem;margin-right:10%;cursor:pointer}.repl__header__actions{display:flex;align-items:center;height:100%;display:flex}.repl__header__action{display:flex;align-items:center;justify-content:center;height:2.8rem;min-width:2rem;padding:0 1rem;border-radius:.2rem;margin:0 .3rem;border:.1rem solid var(--color-dark-grey-200);color:var(--color-light-grey-400);cursor:pointer}.repl__header__action--toggled:hover,.repl__header__action--toggled{border-color:var(--color-blue-200);color:var(--color-light-grey-50)}.repl__content{padding:2rem;width:100%;height:calc(100% - 28rem);margin-bottom:10rem}.repl__query{display:flex;width:100%}.repl__query__editor{width:100%}.repl__query__label{padding:1rem 0;color:var(--color-light-grey-100);font-size:1.5rem;font-weight:500}.repl__query__content{height:15rem;width:100%;font-size:1.3rem;color:var(--color-light-grey-100);background-color:var(--color-dark-grey-200);font-family:"Roboto Mono",monospace;border:.1rem solid var(--color-dark-grey-400);margin-bottom:1rem;position:relative}:root{--color-legacylight-light-blue-200: #6a8db6;--color-legacylight-light-blue-350: #475b72;--color-legacylight-light-blue-600: #2d3d51}.theme__legacy-light .repl{background-color:var(--color-white)}.theme__legacy-light .repl__query__label{color:var(--color-black)}.theme__legacy-light .repl__query__content{color:var(--color-black);border-color:var(--color-black);background-color:var(--color-white)}.theme__legacy-light .repl__header{background:var(--color-legacylight-light-blue-350);border-color:var(--color-legacylight-light-blue-600)}.theme__legacy-light .repl__header__label{background:var(--color-dark-shade-100)}.theme__legacy-light .repl__header__action--toggled{background:var(--color-legacylight-light-blue-200);color:var(--color-legacylight-light-grey-200)}/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/grid.scss","../style/repl.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss","../style/index.scss"],"names":[],"mappings":"AAgBQ,+CACA,uDCCR,MACE,YACA,aACA,sBACA,4CAEA,cCMA,aACA,mBDJE,YACA,cACA,qCACA,8CAEA,uBCFF,aACA,mBAiBA,aACA,8BDbI,YACA,WAEA,8BACE,kCACA,OACA,cAEA,oCACE,gBAIJ,oCCnBJ,aACA,mBDqBM,0BACA,cACA,iBACA,eAIJ,uBC7BF,aACA,mBD+BI,YACA,aAGF,sBC1CF,aACA,mBACA,uBD2CI,cACA,eACA,eACA,oBACA,eACA,8CACA,kCACA,eAEA,oEAEE,mCACA,iCAKN,eACE,aACA,WACA,0BACA,oBAGF,aACE,aACA,WAEA,qBACE,WAIJ,oBACE,eACA,kCACA,iBACA,gBAGF,sBACE,aACA,WACA,iBACA,kCACA,4CACA,oCACA,8CACA,mBACA,kBEjGJ,MACE,4CACA,4CACA,4CAIA,2BACE,oCAEA,yCACE,yBAGF,2CACE,yBACA,gCACA,oCAGF,mCACE,mDACA,qDAEA,0CACE,uCAIA,oDACE,mDACA","file":"index.css"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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 AbstractPlugin, type AbstractPreset } from '@finos/legend-shared';
|
|
17
|
+
export declare class LegendREPLGridClientWebApplication {
|
|
18
|
+
static getPresetCollection(): AbstractPreset[];
|
|
19
|
+
static getPluginCollection(): AbstractPlugin[];
|
|
20
|
+
static run(baseUrl: string): void;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAIhF,qBAAa,kCAAkC;IAC7C,MAAM,CAAC,mBAAmB,IAAI,cAAc,EAAE;IAI9C,MAAM,CAAC,mBAAmB,IAAI,cAAc,EAAE;IAI9C,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAUlC"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import {} from '@finos/legend-shared';
|
|
17
|
+
import { LegendREPLGridClient } from './application/LegendREPLGridClient.js';
|
|
18
|
+
import { Core_LegendREPLGridClientApplicationPlugin } from './components/Core_LegendREPLGridClientApplicationPlugin.js';
|
|
19
|
+
export class LegendREPLGridClientWebApplication {
|
|
20
|
+
static getPresetCollection() {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
static getPluginCollection() {
|
|
24
|
+
return [new Core_LegendREPLGridClientApplicationPlugin()];
|
|
25
|
+
}
|
|
26
|
+
static run(baseUrl) {
|
|
27
|
+
LegendREPLGridClient.create()
|
|
28
|
+
.setup({ baseAddress: baseUrl })
|
|
29
|
+
.withPresets(LegendREPLGridClientWebApplication.getPresetCollection())
|
|
30
|
+
.withPlugins(LegendREPLGridClientWebApplication.getPluginCollection())
|
|
31
|
+
.start()
|
|
32
|
+
.catch((e) => {
|
|
33
|
+
throw e;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAA4C,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,0CAA0C,EAAE,MAAM,4DAA4D,CAAC;AAExH,MAAM,OAAO,kCAAkC;IAC7C,MAAM,CAAC,mBAAmB;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,CAAC,mBAAmB;QACxB,OAAO,CAAC,IAAI,0CAA0C,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,OAAe;QACxB,oBAAoB,CAAC,MAAM,EAAE;aAC1B,KAAK,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;aAC/B,WAAW,CAAC,kCAAkC,CAAC,mBAAmB,EAAE,CAAC;aACrE,WAAW,CAAC,kCAAkC,CAAC,mBAAmB,EAAE,CAAC;aACrE,KAAK,EAAE;aACP,KAAK,CAAC,CAAC,CAAU,EAAE,EAAE;YACpB,MAAM,CAAC,CAAC;QACV,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
|
package/lib/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@finos/legend-application-repl",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "Legend REPL Grid client application core",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"legend",
|
|
7
|
+
"legend-application",
|
|
8
|
+
"legend-repl",
|
|
9
|
+
"repl"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/finos/legend-studio/tree/master/packages/legend-application-repl",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/finos/legend-studio/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/finos/legend-studio.git",
|
|
18
|
+
"directory": "packages/legend-application-repl"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"sideEffects": false,
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./lib/index.js",
|
|
25
|
+
"./lib/index.css": "./lib/index.css"
|
|
26
|
+
},
|
|
27
|
+
"module": "lib/index.js",
|
|
28
|
+
"types": "lib/index.d.ts",
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "yarn clean && yarn build:sass && yarn build:ts",
|
|
31
|
+
"build:sass": "cross-env INIT_CWD=$INIT_CWD node ../../scripts/workflow/buildSass.js",
|
|
32
|
+
"build:ts": "tsc --project ./tsconfig.build.json",
|
|
33
|
+
"clean": "npm-run-all clean:cache clean:lib",
|
|
34
|
+
"clean:cache": "rimraf \"build\"",
|
|
35
|
+
"clean:lib": "rimraf \"lib\"",
|
|
36
|
+
"dev": "npm-run-all --parallel dev:sass dev:ts",
|
|
37
|
+
"dev:sass": "sass style:lib --watch --load-path=../../node_modules/@finos/legend-art/scss",
|
|
38
|
+
"dev:ts": "tsc --watch --preserveWatchOutput",
|
|
39
|
+
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location ./build/.eslintcache --report-unused-disable-directives --parser-options=project:\"./tsconfig.json\" \"./src/**/*.{js,ts,tsx}\"",
|
|
40
|
+
"publish:prepare": "node ../../scripts/release/preparePublishContent.js",
|
|
41
|
+
"publish:snapshot": "node ../../scripts/release/publishDevSnapshot.js",
|
|
42
|
+
"test": "jest",
|
|
43
|
+
"test:watch": "jest --watch"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@ag-grid-community/client-side-row-model": "30.2.0",
|
|
47
|
+
"@ag-grid-community/core": "30.2.0",
|
|
48
|
+
"@ag-grid-community/react": "30.2.0",
|
|
49
|
+
"@ag-grid-community/styles": "30.2.0",
|
|
50
|
+
"@ag-grid-enterprise/core": "30.2.0",
|
|
51
|
+
"@ag-grid-enterprise/menu": "30.2.0",
|
|
52
|
+
"@ag-grid-enterprise/row-grouping": "30.2.0",
|
|
53
|
+
"@ag-grid-enterprise/server-side-row-model": "30.2.0",
|
|
54
|
+
"@finos/legend-application": "workspace:*",
|
|
55
|
+
"@finos/legend-graph": "workspace:*",
|
|
56
|
+
"@finos/legend-lego": "workspace:*",
|
|
57
|
+
"@finos/legend-shared": "workspace:*",
|
|
58
|
+
"@types/react": "18.2.31",
|
|
59
|
+
"@types/react-dom": "18.2.14",
|
|
60
|
+
"mobx": "6.10.2",
|
|
61
|
+
"mobx-react-lite": "4.0.5",
|
|
62
|
+
"monaco-editor": "0.44.0",
|
|
63
|
+
"react": "18.2.0",
|
|
64
|
+
"react-dnd": "16.0.1",
|
|
65
|
+
"react-dom": "18.2.0",
|
|
66
|
+
"serializr": "3.0.2"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@finos/legend-dev-utils": "workspace:*",
|
|
70
|
+
"@jest/globals": "29.7.0",
|
|
71
|
+
"cross-env": "7.0.3",
|
|
72
|
+
"eslint": "8.52.0",
|
|
73
|
+
"jest": "29.7.0",
|
|
74
|
+
"npm-run-all": "4.1.5",
|
|
75
|
+
"rimraf": "5.0.5",
|
|
76
|
+
"sass": "1.69.4",
|
|
77
|
+
"typescript": "5.2.2"
|
|
78
|
+
},
|
|
79
|
+
"peerDependencies": {
|
|
80
|
+
"react": "^18.0.0"
|
|
81
|
+
},
|
|
82
|
+
"publishConfig": {
|
|
83
|
+
"directory": "build/publishContent"
|
|
84
|
+
},
|
|
85
|
+
"extensions": {
|
|
86
|
+
"applicationREPLGridClientPlugin": "@finos/legend-application-repl-plugin-core"
|
|
87
|
+
}
|
|
88
|
+
}
|
package/lib/repl.css
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** @license @finos/legend-application-repl v0.0.2
|
|
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
|
+
.repl{height:100%;display:flex;flex-direction:column;background-color:var(--color-dark-grey-100)}.repl__header{display:flex;align-items:center;height:4rem;padding:.2rem;background:var(--color-dark-grey-80);border:.1rem solid var(--color-dark-grey-100)}.repl__header__content{display:flex;align-items:center;display:flex;justify-content:space-between;height:100%;width:100%}.repl__header__content__title{color:var(--color-light-grey-180);flex:1;margin:0 1rem}.repl__header__content__title input{padding:0 .4rem}.repl__header__content__title__text{display:flex;align-items:center;padding:.6rem .5rem .5rem;margin:0 1rem;margin-right:10%;cursor:pointer}.repl__header__actions{display:flex;align-items:center;height:100%;display:flex}.repl__header__action{display:flex;align-items:center;justify-content:center;height:2.8rem;min-width:2rem;padding:0 1rem;border-radius:.2rem;margin:0 .3rem;border:.1rem solid var(--color-dark-grey-200);color:var(--color-light-grey-400);cursor:pointer}.repl__header__action--toggled:hover,.repl__header__action--toggled{border-color:var(--color-blue-200);color:var(--color-light-grey-50)}.repl__content{padding:2rem;width:100%;height:calc(100% - 28rem);margin-bottom:10rem}.repl__query{display:flex;width:100%}.repl__query__editor{width:100%}.repl__query__label{padding:1rem 0;color:var(--color-light-grey-100);font-size:1.5rem;font-weight:500}.repl__query__content{height:15rem;width:100%;font-size:1.3rem;color:var(--color-light-grey-100);background-color:var(--color-dark-grey-200);font-family:"Roboto Mono",monospace;border:.1rem solid var(--color-dark-grey-400);margin-bottom:1rem;position:relative}/*# sourceMappingURL=repl.css.map */
|
package/lib/repl.css.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/repl.scss","../../../node_modules/@finos/legend-art/scss/_mixins.scss"],"names":[],"mappings":"AAkBA,MACE,YACA,aACA,sBACA,4CAEA,cCMA,aACA,mBDJE,YACA,cACA,qCACA,8CAEA,uBCFF,aACA,mBAiBA,aACA,8BDbI,YACA,WAEA,8BACE,kCACA,OACA,cAEA,oCACE,gBAIJ,oCCnBJ,aACA,mBDqBM,0BACA,cACA,iBACA,eAIJ,uBC7BF,aACA,mBD+BI,YACA,aAGF,sBC1CF,aACA,mBACA,uBD2CI,cACA,eACA,eACA,oBACA,eACA,8CACA,kCACA,eAEA,oEAEE,mCACA,iCAKN,eACE,aACA,WACA,0BACA,oBAGF,aACE,aACA,WAEA,qBACE,WAIJ,oBACE,eACA,kCACA,iBACA,gBAGF,sBACE,aACA,WACA,iBACA,kCACA,4CACA,oCACA,8CACA,mBACA","file":"repl.css"}
|
|
@@ -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 NetworkClient, type PlainObject } from '@finos/legend-shared';
|
|
17
|
+
import type { REPLGridServerResult } from '../components/grid/REPLGridServerResult.js';
|
|
18
|
+
import type { V1_Lambda } from '@finos/legend-graph';
|
|
19
|
+
export declare class REPLServerClient {
|
|
20
|
+
private readonly networkClient;
|
|
21
|
+
constructor(networkClient: NetworkClient);
|
|
22
|
+
get baseUrl(): string;
|
|
23
|
+
getREPLGridServerResult: (request: PlainObject<V1_Lambda>) => Promise<PlainObject<REPLGridServerResult>>;
|
|
24
|
+
getIntialQueryLambda: () => Promise<PlainObject<V1_Lambda>>;
|
|
25
|
+
getInitialREPLGridServerResult: () => Promise<PlainObject<REPLGridServerResult>>;
|
|
26
|
+
getLicenseKey: () => Promise<string>;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=REPLServerClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLServerClient.d.ts","sourceRoot":"","sources":["../../src/server/REPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;gBAElC,aAAa,EAAE,aAAa;IAIxC,IAAI,OAAO,IAAI,MAAM,CAKpB;IAED,uBAAuB,YACZ,YAAY,SAAS,CAAC,KAC9B,QAAQ,YAAY,oBAAoB,CAAC,CAAC,CAMzC;IAEJ,oBAAoB,QAAO,QAAQ,YAAY,SAAS,CAAC,CAAC,CAMtD;IAEJ,8BAA8B,QAAO,QACnC,YAAY,oBAAoB,CAAC,CAClC,CAMG;IAEJ,aAAa,QAAO,QAAQ,MAAM,CAAC,CAM/B;CACL"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { guaranteeNonNullable, } from '@finos/legend-shared';
|
|
17
|
+
export class REPLServerClient {
|
|
18
|
+
networkClient;
|
|
19
|
+
constructor(networkClient) {
|
|
20
|
+
this.networkClient = networkClient;
|
|
21
|
+
}
|
|
22
|
+
get baseUrl() {
|
|
23
|
+
return guaranteeNonNullable(this.networkClient.baseUrl, `REPL client has not been configured properly`);
|
|
24
|
+
}
|
|
25
|
+
getREPLGridServerResult = (request) => this.networkClient.post(`${this.baseUrl}/gridResult`, request, undefined, undefined);
|
|
26
|
+
getIntialQueryLambda = () => this.networkClient.get(`${this.baseUrl}/initialLambda`, undefined, undefined, undefined);
|
|
27
|
+
getInitialREPLGridServerResult = () => this.networkClient.get(`${this.baseUrl}/gridResult`, undefined, undefined, undefined);
|
|
28
|
+
getLicenseKey = () => this.networkClient.get(`${this.baseUrl}/licenseKey`, undefined, undefined, undefined);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=REPLServerClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLServerClient.js","sourceRoot":"","sources":["../../src/server/REPLServerClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,oBAAoB,GAGrB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,OAAO,gBAAgB;IACV,aAAa,CAAgB;IAE9C,YAAY,aAA4B;QACtC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAED,IAAI,OAAO;QACT,OAAO,oBAAoB,CACzB,IAAI,CAAC,aAAa,CAAC,OAAO,EAC1B,8CAA8C,CAC/C,CAAC;IACJ,CAAC;IAED,uBAAuB,GAAG,CACxB,OAA+B,EACa,EAAE,CAC9C,IAAI,CAAC,aAAa,CAAC,IAAI,CACrB,GAAG,IAAI,CAAC,OAAO,aAAa,EAC5B,OAAO,EACP,SAAS,EACT,SAAS,CACV,CAAC;IAEJ,oBAAoB,GAAG,GAAoC,EAAE,CAC3D,IAAI,CAAC,aAAa,CAAC,GAAG,CACpB,GAAG,IAAI,CAAC,OAAO,gBAAgB,EAC/B,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;IAEJ,8BAA8B,GAAG,GAE/B,EAAE,CACF,IAAI,CAAC,aAAa,CAAC,GAAG,CACpB,GAAG,IAAI,CAAC,OAAO,aAAa,EAC5B,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;IAEJ,aAAa,GAAG,GAAoB,EAAE,CACpC,IAAI,CAAC,aAAa,CAAC,GAAG,CACpB,GAAG,IAAI,CAAC,OAAO,aAAa,EAC5B,SAAS,EACT,SAAS,EACT,SAAS,CACV,CAAC;CACL"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { LegendApplicationPlugin } from '@finos/legend-application';
|
|
17
|
+
import type { LegendREPLGridClientPluginManager } from '../application/LegendREPLGridClientPluginManager.js';
|
|
18
|
+
export declare abstract class LegendREPLGridClientApplicationPlugin extends LegendApplicationPlugin {
|
|
19
|
+
/**
|
|
20
|
+
* This helps to better type-check for this empty abtract type
|
|
21
|
+
* See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system
|
|
22
|
+
*/
|
|
23
|
+
private readonly _$nominalTypeBrand;
|
|
24
|
+
install(pluginManager: LegendREPLGridClientPluginManager): void;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=LegendREPLGridClientApplicationPlugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLGridClientApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AAE7G,8BAAsB,qCAAsC,SAAQ,uBAAuB;IACzF;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2C;IAE9E,OAAO,CAAC,aAAa,EAAE,iCAAiC,GAAG,IAAI;CAGhE"}
|
|
@@ -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 { LegendApplicationPlugin } from '@finos/legend-application';
|
|
17
|
+
export class LegendREPLGridClientApplicationPlugin extends LegendApplicationPlugin {
|
|
18
|
+
/**
|
|
19
|
+
* This helps to better type-check for this empty abtract type
|
|
20
|
+
* See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system
|
|
21
|
+
*/
|
|
22
|
+
_$nominalTypeBrand;
|
|
23
|
+
install(pluginManager) {
|
|
24
|
+
pluginManager.registerApplicationPlugin(this);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=LegendREPLGridClientApplicationPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientApplicationPlugin.js","sourceRoot":"","sources":["../../src/stores/LegendREPLGridClientApplicationPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,MAAM,OAAgB,qCAAsC,SAAQ,uBAAuB;IACzF;;;OAGG;IACc,kBAAkB,CAA2C;IAE9E,OAAO,CAAC,aAAgD;QACtD,aAAa,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { ApplicationStore } from '@finos/legend-application';
|
|
17
|
+
import type { LegendREPLGridClientApplicationConfig } from '../application/LegendREPLGridClientApplicationConfig.js';
|
|
18
|
+
import type { LegendREPLGridClientPluginManager } from '../application/LegendREPLGridClientPluginManager.js';
|
|
19
|
+
export type LegendREPLGridClientApplicationStore = ApplicationStore<LegendREPLGridClientApplicationConfig, LegendREPLGridClientPluginManager>;
|
|
20
|
+
export declare class LegendREPLGridClientBaseStore {
|
|
21
|
+
readonly applicationStore: LegendREPLGridClientApplicationStore;
|
|
22
|
+
readonly pluginManager: LegendREPLGridClientPluginManager;
|
|
23
|
+
constructor(applicationStore: LegendREPLGridClientApplicationStore);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=LegendREPLGridClientBaseStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLGridClientBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,yDAAyD,CAAC;AACrH,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,qDAAqD,CAAC;AAE7G,MAAM,MAAM,oCAAoC,GAAG,gBAAgB,CACjE,qCAAqC,EACrC,iCAAiC,CAClC,CAAC;AAEF,qBAAa,6BAA6B;IACxC,QAAQ,CAAC,gBAAgB,EAAE,oCAAoC,CAAC;IAChE,QAAQ,CAAC,aAAa,EAAE,iCAAiC,CAAC;gBAE9C,gBAAgB,EAAE,oCAAoC;CAInE"}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 class LegendREPLGridClientBaseStore {
|
|
17
|
+
applicationStore;
|
|
18
|
+
pluginManager;
|
|
19
|
+
constructor(applicationStore) {
|
|
20
|
+
this.applicationStore = applicationStore;
|
|
21
|
+
this.pluginManager = applicationStore.pluginManager;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=LegendREPLGridClientBaseStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendREPLGridClientBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAWH,MAAM,OAAO,6BAA6B;IAC/B,gBAAgB,CAAuC;IACvD,aAAa,CAAoC;IAE1D,YAAY,gBAAsD;QAChE,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,aAAa,GAAG,gBAAgB,CAAC,aAAa,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { LegendREPLGridClientApplicationStore } from './LegendREPLGridClientBaseStore.js';
|
|
17
|
+
import { REPLServerClient } from '../server/REPLServerClient.js';
|
|
18
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
|
19
|
+
import type { TDSRequest } from '../components/grid/TDSRequest.js';
|
|
20
|
+
import { REPLGridState } from './REPLGridState.js';
|
|
21
|
+
export declare class REPLGridClientStore {
|
|
22
|
+
readonly applicationStore: LegendREPLGridClientApplicationStore;
|
|
23
|
+
readonly client: REPLServerClient;
|
|
24
|
+
replGridState: REPLGridState;
|
|
25
|
+
constructor(applicationStore: LegendREPLGridClientApplicationStore);
|
|
26
|
+
getREPLGridServerResult(tdsRequest: TDSRequest): GeneratorFn<void>;
|
|
27
|
+
getInitialQueryLambda(): GeneratorFn<void>;
|
|
28
|
+
getInitialREPLGridServerResult(): GeneratorFn<void>;
|
|
29
|
+
getLicenseKey(): GeneratorFn<void>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=REPLGridClientStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClientStore.d.ts","sourceRoot":"","sources":["../../src/stores/REPLGridClientStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,oCAAoC,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAEL,KAAK,WAAW,EAMjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAYnD,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,oCAAoC,CAAC;IAChE,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,aAAa,EAAG,aAAa,CAAC;gBAElB,gBAAgB,EAAE,oCAAoC;IAmBjE,uBAAuB,CAAC,UAAU,EAAE,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC;IAuClE,qBAAqB,IAAI,WAAW,CAAC,IAAI,CAAC;IAS1C,8BAA8B,IAAI,WAAW,CAAC,IAAI,CAAC;IAiCnD,aAAa,IAAI,WAAW,CAAC,IAAI,CAAC;CAIpC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { REPLServerClient } from '../server/REPLServerClient.js';
|
|
17
|
+
import { NetworkClient, assertErrorThrown, LogEvent, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';
|
|
18
|
+
import { flow, flowResult, makeObservable, observable } from 'mobx';
|
|
19
|
+
import { REPLGridServerResult } from '../components/grid/REPLGridServerResult.js';
|
|
20
|
+
import { LEGEND_REPL_EVENT } from '../Const.js';
|
|
21
|
+
import { REPLGridState } from './REPLGridState.js';
|
|
22
|
+
import { buildLambdaExpressions } from '../components/grid/TDSLambdaBuilder.js';
|
|
23
|
+
import { TDSExecutionResult, V1_Lambda, V1_buildExecutionResult, V1_deserializeValueSpecification, V1_serializeExecutionResult, V1_serializeValueSpecification, } from '@finos/legend-graph';
|
|
24
|
+
export class REPLGridClientStore {
|
|
25
|
+
applicationStore;
|
|
26
|
+
client;
|
|
27
|
+
replGridState;
|
|
28
|
+
constructor(applicationStore) {
|
|
29
|
+
makeObservable(this, {
|
|
30
|
+
replGridState: observable,
|
|
31
|
+
getREPLGridServerResult: flow,
|
|
32
|
+
getInitialQueryLambda: flow,
|
|
33
|
+
getInitialREPLGridServerResult: flow,
|
|
34
|
+
getLicenseKey: flow,
|
|
35
|
+
});
|
|
36
|
+
this.applicationStore = applicationStore;
|
|
37
|
+
this.client = new REPLServerClient(new NetworkClient({
|
|
38
|
+
baseUrl: this.applicationStore.config.useDynamicREPLServer
|
|
39
|
+
? window.location.origin
|
|
40
|
+
: this.applicationStore.config.replUrl,
|
|
41
|
+
}));
|
|
42
|
+
this.replGridState = new REPLGridState();
|
|
43
|
+
}
|
|
44
|
+
*getREPLGridServerResult(tdsRequest) {
|
|
45
|
+
try {
|
|
46
|
+
const isSubQuery = tdsRequest.groupBy.groupKeys.length !== 0;
|
|
47
|
+
const lambda = buildLambdaExpressions(guaranteeNonNullable(this.replGridState.initialQueryLambda?.body[0]), tdsRequest);
|
|
48
|
+
const resultObj = (yield flowResult(this.client.getREPLGridServerResult(V1_serializeValueSpecification(lambda, []))));
|
|
49
|
+
const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
|
|
50
|
+
const tdsResult = JSON.parse(replGridResult.result);
|
|
51
|
+
this.replGridState.setCurrentResult(guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResult)), TDSExecutionResult));
|
|
52
|
+
if (isSubQuery) {
|
|
53
|
+
this.replGridState.setCurrentSubQuery(replGridResult.currentQuery);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.replGridState.setCurrentQuery(replGridResult.currentQuery);
|
|
57
|
+
this.replGridState.setCurrentSubQuery(undefined);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
assertErrorThrown(error);
|
|
62
|
+
this.applicationStore.notificationService.notifyError(error);
|
|
63
|
+
this.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
*getInitialQueryLambda() {
|
|
67
|
+
const lambdaObj = (yield this.client.getIntialQueryLambda());
|
|
68
|
+
const lambda = V1_deserializeValueSpecification(lambdaObj, []);
|
|
69
|
+
if (lambda instanceof V1_Lambda) {
|
|
70
|
+
this.replGridState.setInitialQueryLambda(lambda);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
*getInitialREPLGridServerResult() {
|
|
74
|
+
try {
|
|
75
|
+
if (!this.replGridState.licenseKey) {
|
|
76
|
+
yield flowResult(this.getLicenseKey());
|
|
77
|
+
}
|
|
78
|
+
if (!this.replGridState.initialQueryLambda) {
|
|
79
|
+
yield flowResult(this.getInitialQueryLambda());
|
|
80
|
+
}
|
|
81
|
+
const resultObj = (yield this.client.getInitialREPLGridServerResult());
|
|
82
|
+
const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);
|
|
83
|
+
const tdsResultObj = JSON.parse(replGridResult.result);
|
|
84
|
+
const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);
|
|
85
|
+
this.replGridState.setInitialResult(tdsResult);
|
|
86
|
+
this.replGridState.setCurrentQuery(replGridResult.currentQuery);
|
|
87
|
+
this.replGridState.setCurrentSubQuery(undefined);
|
|
88
|
+
this.replGridState.setColumns(tdsResult.result.columns);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
assertErrorThrown(error);
|
|
92
|
+
this.applicationStore.notificationService.notifyError(error);
|
|
93
|
+
this.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
*getLicenseKey() {
|
|
97
|
+
const licenseKey = (yield this.client.getLicenseKey());
|
|
98
|
+
this.replGridState.setLicenseKey(licenseKey);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=REPLGridClientStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClientStore.js","sourceRoot":"","sources":["../../src/stores/REPLGridClientStore.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 TDSRowDataType } from '../components/grid/GridUtils.js';
|
|
17
|
+
import type { ColDef } from '@ag-grid-community/core';
|
|
18
|
+
import type { V1_Lambda, TDSExecutionResult } from '@finos/legend-graph';
|
|
19
|
+
export declare class REPLGridState {
|
|
20
|
+
initialResult?: TDSExecutionResult | undefined;
|
|
21
|
+
currentResult?: TDSExecutionResult | undefined;
|
|
22
|
+
columns?: string[] | undefined;
|
|
23
|
+
currentQuery?: string | undefined;
|
|
24
|
+
currentSubQuery?: string | undefined;
|
|
25
|
+
licenseKey?: string | undefined;
|
|
26
|
+
initialQueryLambda?: V1_Lambda | undefined;
|
|
27
|
+
constructor();
|
|
28
|
+
setInitialQueryLambda(val: V1_Lambda | undefined): void;
|
|
29
|
+
setCurrentQuery(val: string | undefined): void;
|
|
30
|
+
setCurrentSubQuery(val: string | undefined): void;
|
|
31
|
+
setInitialResult(val: TDSExecutionResult | undefined): void;
|
|
32
|
+
setCurrentResult(val: TDSExecutionResult | undefined): void;
|
|
33
|
+
setColumns(val: string[]): void;
|
|
34
|
+
setLicenseKey(val: string | undefined): void;
|
|
35
|
+
get rowData(): TDSRowDataType[];
|
|
36
|
+
get columnDefs(): ColDef[];
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=REPLGridState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridState.d.ts","sourceRoot":"","sources":["../../src/stores/REPLGridState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,qBAAa,aAAa;IACxB,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,kBAAkB,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;;IAuB3C,qBAAqB,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI;IAIvD,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAI9C,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIjD,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAI3D,gBAAgB,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI;IAI3D,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI;IAI/B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAI5C,IAAI,OAAO,IAAI,cAAc,EAAE,CAE9B;IAED,IAAI,UAAU,IAAI,MAAM,EAAE,CAYzB;CACF"}
|