@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
|
@@ -0,0 +1,35 @@
|
|
|
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 packageJson from '../../package.json' assert { type: 'json' };
|
|
17
|
+
import { LegendREPLGridClientApplicationPlugin } from '../stores/LegendREPLGridClientApplicationPlugin.js';
|
|
18
|
+
import { configureAgGridComponent } from './AgGrid.js';
|
|
19
|
+
import { configureCodeEditorComponent, setupPureLanguageService, } from '@finos/legend-lego/code-editor';
|
|
20
|
+
export class Core_LegendREPLGridClientApplicationPlugin extends LegendREPLGridClientApplicationPlugin {
|
|
21
|
+
static NAME = packageJson.extensions.applicationREPLGridClientPlugin;
|
|
22
|
+
constructor() {
|
|
23
|
+
super(Core_LegendREPLGridClientApplicationPlugin.NAME, packageJson.version);
|
|
24
|
+
}
|
|
25
|
+
getExtraApplicationSetups() {
|
|
26
|
+
return [
|
|
27
|
+
async (applicationStore) => {
|
|
28
|
+
configureAgGridComponent();
|
|
29
|
+
await configureCodeEditorComponent(applicationStore);
|
|
30
|
+
setupPureLanguageService();
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=Core_LegendREPLGridClientApplicationPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Core_LegendREPLGridClientApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/Core_LegendREPLGridClientApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,WAAW,MAAM,oBAAoB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACrE,OAAO,EAAE,qCAAqC,EAAE,MAAM,oDAAoD,CAAC;AAC3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,OAAO,0CAA2C,SAAQ,qCAAqC;IACnG,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAErE;QACE,KAAK,CAAC,0CAA0C,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9E,CAAC;IAEQ,yBAAyB;QAChC,OAAO;YACL,KAAK,EAAE,gBAAgB,EAAE,EAAE;gBACzB,wBAAwB,EAAE,CAAC;gBAC3B,MAAM,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;gBACrD,wBAAwB,EAAE,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC"}
|
|
@@ -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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN: Readonly<{
|
|
18
|
+
GRID: "/grid";
|
|
19
|
+
}>;
|
|
20
|
+
export declare const LegendREPLGridClientRouter: import("react").FC<{}>;
|
|
21
|
+
export declare const LegendREPLGridClientWebApplication: React.FC<{
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
}>;
|
|
24
|
+
//# sourceMappingURL=LegendREPLGridClientApplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLGridClientApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAaH,eAAO,MAAM,qCAAqC;;EAEhD,CAAC;AAEH,eAAO,MAAM,0BAA0B,wBAetC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,KAAK,CAAC,EAAE,CAAC;IACxD,OAAO,EAAE,MAAM,CAAC;CACjB,CAUA,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { BrowserEnvironmentProvider, Route, Switch, } from '@finos/legend-application/browser';
|
|
18
|
+
import { Editor } from './REPLGridClient.js';
|
|
19
|
+
import { LegendREPLGridClientFrameworkProvider } from './LegendREPLGridClientFrameworkProvider.js';
|
|
20
|
+
import { observer } from 'mobx-react-lite';
|
|
21
|
+
import { withEditorStore } from './REPLGridClientStoreProvider.js';
|
|
22
|
+
export const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({
|
|
23
|
+
GRID: `/grid`,
|
|
24
|
+
});
|
|
25
|
+
export const LegendREPLGridClientRouter = withEditorStore(observer(() => (_jsx("div", { className: "app", children: _jsx(Switch, { children: _jsx(Route, { exact: true, path: [LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.GRID], component:
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
27
|
+
Editor }) }) }))));
|
|
28
|
+
export const LegendREPLGridClientWebApplication = (props) => {
|
|
29
|
+
const { baseUrl } = props;
|
|
30
|
+
return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsx(LegendREPLGridClientFrameworkProvider, { children: _jsx(LegendREPLGridClientRouter, {}) }) }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=LegendREPLGridClientApplication.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientApplication.js","sourceRoot":"","sources":["../../src/components/LegendREPLGridClientApplication.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,KAAK,EACL,MAAM,GAEP,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AACnG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,MAAM,CAAC,MAAM,qCAAqC,GAAG,MAAM,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,OAAO;CACd,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,eAAe,CACvD,QAAQ,CAAC,GAAG,EAAE,CAAC,CACb,cAAK,SAAS,EAAC,KAAK,YAClB,KAAC,MAAM,cACL,KAAC,KAAK,IACJ,KAAK,EAAE,IAAI,EACX,IAAI,EAAE,CAAC,qCAAqC,CAAC,IAAI,CAAC,EAClD,SAAS;YACP,mEAAmE;YACnE,MAA6C,GAE/C,GACK,GACL,CACP,CAAC,CACH,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAE1C,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,KAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,YAC1C,KAAC,qCAAqC,cACpC,KAAC,0BAA0B,KAAG,GACQ,GACb,CAC9B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
import { type LegendREPLGridClientApplicationStore } from '../stores/LegendREPLGridClientBaseStore.js';
|
|
18
|
+
export declare const useLegendREPLGridClientApplicationStore: () => LegendREPLGridClientApplicationStore;
|
|
19
|
+
export declare const LegendREPLGridClientFrameworkProvider: React.FC<{
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
}>;
|
|
22
|
+
//# sourceMappingURL=LegendREPLGridClientFrameworkProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientFrameworkProvider.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLGridClientFrameworkProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAUH,OAAO,EACL,KAAK,oCAAoC,EAE1C,MAAM,4CAA4C,CAAC;AAEpD,eAAO,MAAM,uCAAuC,4CAK7C,CAAC;AAoBR,eAAO,MAAM,qCAAqC,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAMA,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { createContext } from 'react';
|
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
+
import { ApplicationFrameworkProvider, useApplicationStore, } from '@finos/legend-application';
|
|
20
|
+
import { LegendREPLGridClientBaseStore, } from '../stores/LegendREPLGridClientBaseStore.js';
|
|
21
|
+
export const useLegendREPLGridClientApplicationStore = () => useApplicationStore();
|
|
22
|
+
const LegendREPLGridClientBaseStoreContext = createContext(undefined);
|
|
23
|
+
const LegendREPLGridClientBaseStoreProvider = ({ children }) => {
|
|
24
|
+
const applicationStore = useLegendREPLGridClientApplicationStore();
|
|
25
|
+
const store = useLocalObservable(() => new LegendREPLGridClientBaseStore(applicationStore));
|
|
26
|
+
return (_jsx(LegendREPLGridClientBaseStoreContext.Provider, { value: store, children: children }));
|
|
27
|
+
};
|
|
28
|
+
export const LegendREPLGridClientFrameworkProvider = ({ children }) => (_jsx(ApplicationFrameworkProvider, { children: _jsx(LegendREPLGridClientBaseStoreProvider, { children: children }) }));
|
|
29
|
+
//# sourceMappingURL=LegendREPLGridClientFrameworkProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendREPLGridClientFrameworkProvider.js","sourceRoot":"","sources":["../../src/components/LegendREPLGridClientFrameworkProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAEL,6BAA6B,GAC9B,MAAM,4CAA4C,CAAC;AAEpD,MAAM,CAAC,MAAM,uCAAuC,GAClD,GAAyC,EAAE,CACzC,mBAAmB,EAGhB,CAAC;AAER,MAAM,oCAAoC,GAAG,aAAa,CAExD,SAAS,CAAC,CAAC;AAEb,MAAM,qCAAqC,GAEtC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,MAAM,gBAAgB,GAAG,uCAAuC,EAAE,CAAC;IACnE,MAAM,KAAK,GAAG,kBAAkB,CAC9B,GAAG,EAAE,CAAC,IAAI,6BAA6B,CAAC,gBAAgB,CAAC,CAC1D,CAAC;IACF,OAAO,CACL,KAAC,oCAAoC,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACxD,QAAQ,GACqC,CACjD,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAE7C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,4BAA4B,cAC3B,KAAC,qCAAqC,cACnC,QAAQ,GAC6B,GACX,CAChC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
export declare const Editor: import("react").FC<{}>;
|
|
18
|
+
//# sourceMappingURL=REPLGridClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClient.d.ts","sourceRoot":"","sources":["../../src/components/REPLGridClient.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAoBH,eAAO,MAAM,MAAM,wBA0HlB,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { observer } from 'mobx-react-lite';
|
|
18
|
+
import { useREPLGridClientStore, withEditorStore, } from './REPLGridClientStoreProvider.js';
|
|
19
|
+
import { AgGridComponent } from './AgGrid.js';
|
|
20
|
+
import { useEffect } from 'react';
|
|
21
|
+
import { flowResult } from 'mobx';
|
|
22
|
+
import { getTDSRowData } from '../components/grid/GridUtils.js';
|
|
23
|
+
import { ServerSideDataSource } from '../components/grid/ServerSideDataSource.js';
|
|
24
|
+
import { LEGEND_APPLICATION_COLOR_THEME } from '@finos/legend-application';
|
|
25
|
+
import { CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME, CodeDiffView, CodeEditor, } from '@finos/legend-lego/code-editor';
|
|
26
|
+
export const Editor = withEditorStore(observer(() => {
|
|
27
|
+
const editorStore = useREPLGridClientStore();
|
|
28
|
+
const selectDarkTheme = () => {
|
|
29
|
+
editorStore.applicationStore.layoutService.setColorTheme(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, { persist: true });
|
|
30
|
+
};
|
|
31
|
+
const title = `Current Query <-> Current Row Group Sub Query`;
|
|
32
|
+
const selectLightTheme = () => {
|
|
33
|
+
editorStore.applicationStore.layoutService.setColorTheme(LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT, { persist: true });
|
|
34
|
+
};
|
|
35
|
+
const isLightTheme = editorStore.applicationStore.layoutService
|
|
36
|
+
.TEMPORARY__isLightColorThemeEnabled;
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
flowResult(editorStore.getInitialREPLGridServerResult()).catch(editorStore.applicationStore.alertUnhandledError);
|
|
39
|
+
}, [editorStore]);
|
|
40
|
+
return (_jsxs("div", { className: "repl", children: [_jsx("div", { className: "repl__header", children: _jsxs("div", { className: "repl__header__content", children: [_jsx("div", { className: "repl__header__content__title", children: "REPL Grid" }), _jsxs("div", { className: "repl__header__actions", children: [_jsx("button", { className: isLightTheme
|
|
41
|
+
? 'repl__header__action'
|
|
42
|
+
: 'repl__header__action repl__header__action--toggled', onClick: selectDarkTheme, children: "Dark" }), _jsx("button", { className: isLightTheme
|
|
43
|
+
? 'repl__header__action repl__header__action--toggled'
|
|
44
|
+
: 'repl__header__action', onClick: selectLightTheme, children: "Light" })] })] }) }), editorStore.replGridState.initialResult &&
|
|
45
|
+
editorStore.replGridState.columns && (_jsxs("div", { className: "repl__content", children: [editorStore.replGridState.currentSubQuery !== undefined && (_jsxs(_Fragment, { children: [_jsx("div", { className: "repl__query__label", children: title }), _jsx("div", { className: "repl__query__content", children: _jsx(CodeDiffView, { language: CODE_EDITOR_LANGUAGE.PURE, from: editorStore.replGridState.currentQuery, to: editorStore.replGridState.currentSubQuery }) })] })), editorStore.replGridState.currentSubQuery === undefined && (_jsx("div", { className: "repl__query", children: _jsxs("div", { className: "repl__query__editor", children: [_jsx("div", { className: "repl__query__label", children: "Curent Query" }), _jsx("div", { className: "repl__query__content", children: _jsx(CodeEditor, { lightTheme: isLightTheme
|
|
46
|
+
? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT
|
|
47
|
+
: CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK, language: CODE_EDITOR_LANGUAGE.PURE, inputValue: editorStore.replGridState.currentQuery ?? '', hideActionBar: true, isReadOnly: true }) })] }) })), _jsx("div", { className: "repl__query__label", children: "Result" }), _jsx(AgGridComponent, { className: editorStore.applicationStore.layoutService
|
|
48
|
+
.TEMPORARY__isLightColorThemeEnabled
|
|
49
|
+
? 'ag-theme-balham'
|
|
50
|
+
: 'ag-theme-balham-dark', gridOptions: editorStore.replGridState.licenseKey
|
|
51
|
+
? {
|
|
52
|
+
serverSideDatasource: new ServerSideDataSource(getTDSRowData(editorStore.replGridState.initialResult.result), editorStore.replGridState.initialResult.builder.columns, editorStore),
|
|
53
|
+
}
|
|
54
|
+
: {}, licenseKey: editorStore.replGridState.licenseKey ?? '', rowData: editorStore.replGridState.rowData, columnDefs: editorStore.replGridState.columnDefs })] }))] }));
|
|
55
|
+
}));
|
|
56
|
+
//# sourceMappingURL=REPLGridClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClient.js","sourceRoot":"","sources":["../../src/components/REPLGridClient.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC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,CAAC,CAAC,iBAAiB;4BACnB,CAAC,CAAC,sBAAsB,EAE5B,WAAW,EACT,WAAW,CAAC,aAAa,CAAC,UAAU;4BAClC,CAAC,CAAC;gCACE,oBAAoB,EAAE,IAAI,oBAAoB,CAC5C,aAAa,CACX,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAC/C,EACD,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EACvD,WAAW,CACZ;6BACF;4BACH,CAAC,CAAC,EAAE,EAER,UAAU,EAAE,WAAW,CAAC,aAAa,CAAC,UAAU,IAAI,EAAE,EACtD,OAAO,EAAE,WAAW,CAAC,aAAa,CAAC,OAAO,EAC1C,UAAU,EAAE,WAAW,CAAC,aAAa,CAAC,UAAU,GAChD,IACE,CACP,IACC,CACP,CAAC;AACJ,CAAC,CAAC,CACH,CAAC"}
|
|
@@ -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 { REPLGridClientStore } from '../stores/REPLGridClientStore.js';
|
|
17
|
+
export declare const REPLGridClientStoreProvider: ({ children, }: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}) => React.ReactElement;
|
|
20
|
+
export declare const useREPLGridClientStore: () => REPLGridClientStore;
|
|
21
|
+
export declare const withEditorStore: (WrappedComponent: React.FC) => React.FC;
|
|
22
|
+
//# sourceMappingURL=REPLGridClientStoreProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClientStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/REPLGridClientStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAUvE,eAAO,MAAM,2BAA2B;cAG5B,MAAM,SAAS;MACvB,MAAM,YAaT,CAAC;AAEF,eAAO,MAAM,sBAAsB,QAAO,mBAIvC,CAAC;AAEJ,eAAO,MAAM,eAAe,qBAAsB,MAAM,EAAE,KAAG,MAAM,EAOhE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { createContext, useContext } from 'react';
|
|
18
|
+
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
+
import { REPLGridClientStore } from '../stores/REPLGridClientStore.js';
|
|
20
|
+
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
|
+
import { useApplicationStore } from '@finos/legend-application';
|
|
22
|
+
const EditorStoreContext = createContext(undefined);
|
|
23
|
+
export const REPLGridClientStoreProvider = ({ children, }) => {
|
|
24
|
+
const applicationStore = useApplicationStore();
|
|
25
|
+
const store = useLocalObservable(() => new REPLGridClientStore(applicationStore));
|
|
26
|
+
return (_jsx(EditorStoreContext.Provider, { value: store, children: children }));
|
|
27
|
+
};
|
|
28
|
+
export const useREPLGridClientStore = () => guaranteeNonNullable(useContext(EditorStoreContext), `Can't find editor store in context`);
|
|
29
|
+
export const withEditorStore = (WrappedComponent) => function WithEditorStore() {
|
|
30
|
+
return (_jsx(REPLGridClientStoreProvider, { children: _jsx(WrappedComponent, {}) }));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=REPLGridClientStoreProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridClientStoreProvider.js","sourceRoot":"","sources":["../../src/components/REPLGridClientStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,kBAAkB,GAAG,aAAa,CACtC,SAAS,CACV,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,QAAQ,GAGT,EAAsB,EAAE;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAGzC,CAAC;IACJ,MAAM,KAAK,GAAG,kBAAkB,CAC9B,GAAG,EAAE,CAAC,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAChD,CAAC;IACF,OAAO,CACL,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACtC,QAAQ,GACmB,CAC/B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAwB,EAAE,CAC9D,oBAAoB,CAClB,UAAU,CAAC,kBAAkB,CAAC,EAC9B,oCAAoC,CACrC,CAAC;AAEJ,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,gBAA0B,EAAY,EAAE,CACtE,SAAS,eAAe;IACtB,OAAO,CACL,KAAC,2BAA2B,cAC1B,KAAC,gBAAgB,KAAG,GACQ,CAC/B,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { TDS_AGGREGATION_FUNCTION, TDS_FILTER_OPERATION, TDS_SORT_ORDER } from './TDSRequest.js';
|
|
17
|
+
import { type TDSExecutionResult, type TabularDataSet, PRIMITIVE_TYPE } from '@finos/legend-graph';
|
|
18
|
+
export type TDSResultCellDataType = string | number | boolean | null | undefined;
|
|
19
|
+
export interface TDSRowDataType {
|
|
20
|
+
[key: string]: TDSResultCellDataType;
|
|
21
|
+
}
|
|
22
|
+
export declare const getTDSSortOrder: (sortOrder: string) => TDS_SORT_ORDER;
|
|
23
|
+
export declare const getAggregationFunction: (aggFunc: string) => TDS_AGGREGATION_FUNCTION;
|
|
24
|
+
export declare const getTDSFilterOperation: (filterOperation: string) => TDS_FILTER_OPERATION;
|
|
25
|
+
export declare const getFilterColumnType: (type: string) => PRIMITIVE_TYPE;
|
|
26
|
+
export declare const getAggregationTDSColumnCustomizations: (isAgGridLicenseEnabled: boolean, result: TDSExecutionResult, columnName: string) => object;
|
|
27
|
+
export declare const getDefaultColumnDefintions: (isAgGridLicenseEnabled: boolean) => object;
|
|
28
|
+
export declare const getTDSRowData: (tds: TabularDataSet) => TDSRowDataType[];
|
|
29
|
+
//# sourceMappingURL=GridUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridUtils.d.ts","sourceRoot":"","sources":["../../../src/components/grid/GridUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,qBAAqB,GAC7B,MAAM,GACN,MAAM,GACN,OAAO,GACP,IAAI,GACJ,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,qBAAqB,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,cAAe,MAAM,KAAG,cASnD,CAAC;AAEF,eAAO,MAAM,sBAAsB,YACxB,MAAM,KACd,wBAaF,CAAC;AAEF,eAAO,MAAM,qBAAqB,oBACf,MAAM,KACtB,oBA6BF,CAAC;AAEF,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,cAalD,CAAC;AAEF,eAAO,MAAM,qCAAqC,2BACxB,OAAO,UACvB,kBAAkB,cACd,MAAM,KACjB,MAgCF,CAAC;AAEF,eAAO,MAAM,0BAA0B,2BACb,OAAO,KAC9B,MAqBF,CAAC;AAEF,eAAO,MAAM,aAAa,QAAS,cAAc,KAAG,cAAc,EAW9D,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
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 { TDS_AGGREGATION_FUNCTION, TDS_FILTER_OPERATION, TDS_SORT_ORDER, } from './TDSRequest.js';
|
|
17
|
+
import { PRIMITIVE_TYPE, } from '@finos/legend-graph';
|
|
18
|
+
import { isBoolean } from '@finos/legend-shared';
|
|
19
|
+
export const getTDSSortOrder = (sortOrder) => {
|
|
20
|
+
switch (sortOrder) {
|
|
21
|
+
case 'asc':
|
|
22
|
+
return TDS_SORT_ORDER.ASCENDING;
|
|
23
|
+
case 'desc':
|
|
24
|
+
return TDS_SORT_ORDER.DESCENDING;
|
|
25
|
+
default:
|
|
26
|
+
throw new Error(`Unsupported tds sort order ${sortOrder}`);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
export const getAggregationFunction = (aggFunc) => {
|
|
30
|
+
switch (aggFunc) {
|
|
31
|
+
case 'sum':
|
|
32
|
+
return TDS_AGGREGATION_FUNCTION.SUM;
|
|
33
|
+
case 'min':
|
|
34
|
+
return TDS_AGGREGATION_FUNCTION.MIN;
|
|
35
|
+
case 'max':
|
|
36
|
+
return TDS_AGGREGATION_FUNCTION.MAX;
|
|
37
|
+
case 'count':
|
|
38
|
+
return TDS_AGGREGATION_FUNCTION.COUNT;
|
|
39
|
+
default:
|
|
40
|
+
throw new Error(`Unsupported aggregation function ${aggFunc}`);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export const getTDSFilterOperation = (filterOperation) => {
|
|
44
|
+
switch (filterOperation) {
|
|
45
|
+
case 'equals':
|
|
46
|
+
return TDS_FILTER_OPERATION.EQUALS;
|
|
47
|
+
case 'notEqual':
|
|
48
|
+
return TDS_FILTER_OPERATION.NOT_EQUAL;
|
|
49
|
+
case 'greaterThan':
|
|
50
|
+
return TDS_FILTER_OPERATION.GREATER_THAN;
|
|
51
|
+
case 'greaterThanOrEqual':
|
|
52
|
+
return TDS_FILTER_OPERATION.GREATER_THAN_OR_EQUAL;
|
|
53
|
+
case 'lessThan':
|
|
54
|
+
return TDS_FILTER_OPERATION.LESS_THAN;
|
|
55
|
+
case 'lessThanOrEqual':
|
|
56
|
+
return TDS_FILTER_OPERATION.LESS_THAN_OR_EQUAL;
|
|
57
|
+
case 'blank':
|
|
58
|
+
return TDS_FILTER_OPERATION.BLANK;
|
|
59
|
+
case 'notBlank':
|
|
60
|
+
return TDS_FILTER_OPERATION.NOT_BLANK;
|
|
61
|
+
case 'contains':
|
|
62
|
+
return TDS_FILTER_OPERATION.CONTAINS;
|
|
63
|
+
case 'notContains':
|
|
64
|
+
return TDS_FILTER_OPERATION.NOT_CONTAINS;
|
|
65
|
+
case 'startsWith':
|
|
66
|
+
return TDS_FILTER_OPERATION.STARTS_WITH;
|
|
67
|
+
case 'endsWith':
|
|
68
|
+
return TDS_FILTER_OPERATION.ENDS_WITH;
|
|
69
|
+
default:
|
|
70
|
+
throw new Error(`Unsupported filter operation ${filterOperation}`);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export const getFilterColumnType = (type) => {
|
|
74
|
+
switch (type) {
|
|
75
|
+
case 'text':
|
|
76
|
+
return PRIMITIVE_TYPE.STRING;
|
|
77
|
+
case 'number':
|
|
78
|
+
return PRIMITIVE_TYPE.NUMBER;
|
|
79
|
+
case 'boolean':
|
|
80
|
+
return PRIMITIVE_TYPE.BOOLEAN;
|
|
81
|
+
case 'date':
|
|
82
|
+
return PRIMITIVE_TYPE.DATE;
|
|
83
|
+
default:
|
|
84
|
+
throw new Error(`Unsupported filter type ${type}`);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
export const getAggregationTDSColumnCustomizations = (isAgGridLicenseEnabled, result, columnName) => {
|
|
88
|
+
if (!isAgGridLicenseEnabled) {
|
|
89
|
+
return {};
|
|
90
|
+
}
|
|
91
|
+
const columnType = result.builder.columns.find((col) => col.name === columnName)?.type;
|
|
92
|
+
switch (columnType) {
|
|
93
|
+
case PRIMITIVE_TYPE.STRING:
|
|
94
|
+
return {
|
|
95
|
+
filter: 'agTextColumnFilter',
|
|
96
|
+
allowedAggFuncs: ['count'],
|
|
97
|
+
};
|
|
98
|
+
case PRIMITIVE_TYPE.DATE:
|
|
99
|
+
case PRIMITIVE_TYPE.DATETIME:
|
|
100
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
|
101
|
+
return {
|
|
102
|
+
filter: 'agDateColumnFilter',
|
|
103
|
+
allowedAggFuncs: ['count'],
|
|
104
|
+
};
|
|
105
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
|
106
|
+
case PRIMITIVE_TYPE.INTEGER:
|
|
107
|
+
case PRIMITIVE_TYPE.FLOAT:
|
|
108
|
+
return {
|
|
109
|
+
filter: 'agNumberColumnFilter',
|
|
110
|
+
allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
|
|
111
|
+
};
|
|
112
|
+
default:
|
|
113
|
+
return {
|
|
114
|
+
allowedAggFuncs: ['count'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
export const getDefaultColumnDefintions = (isAgGridLicenseEnabled) => {
|
|
119
|
+
if (isAgGridLicenseEnabled) {
|
|
120
|
+
return {
|
|
121
|
+
minWidth: 50,
|
|
122
|
+
sortable: true,
|
|
123
|
+
flex: 1,
|
|
124
|
+
resizable: true,
|
|
125
|
+
enableRowGroup: true,
|
|
126
|
+
allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],
|
|
127
|
+
enableValue: true,
|
|
128
|
+
menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
return {
|
|
133
|
+
minWidth: 50,
|
|
134
|
+
sortable: true,
|
|
135
|
+
flex: 1,
|
|
136
|
+
resizable: true,
|
|
137
|
+
menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab'],
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
export const getTDSRowData = (tds) => tds.rows.map((_row, rowIdx) => {
|
|
142
|
+
const row = {};
|
|
143
|
+
const cols = tds.columns;
|
|
144
|
+
_row.values.forEach((value, colIdx) => {
|
|
145
|
+
// `ag-grid` shows `false` value as empty string so we have
|
|
146
|
+
// call `.toString()` to avoid this behavior.
|
|
147
|
+
row[cols[colIdx]] = isBoolean(value) ? String(value) : value;
|
|
148
|
+
});
|
|
149
|
+
row.rowNumber = rowIdx;
|
|
150
|
+
return row;
|
|
151
|
+
});
|
|
152
|
+
//# sourceMappingURL=GridUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridUtils.js","sourceRoot":"","sources":["../../../src/components/grid/GridUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAGL,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAajD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,SAAiB,EAAkB,EAAE;IACnE,QAAQ,SAAS,EAAE;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AI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACpC,2DAA2D;QAC3D,6CAA6C;QAC7C,GAAG,CAAC,IAAI,CAAC,MAAM,CAAW,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACzE,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;IACvB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC,CAAC"}
|
|
@@ -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 { SerializationFactory } from '@finos/legend-shared';
|
|
17
|
+
export declare class REPLGridServerResult {
|
|
18
|
+
currentQuery: string;
|
|
19
|
+
result: string;
|
|
20
|
+
static readonly serialization: SerializationFactory<REPLGridServerResult>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=REPLGridServerResult.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridServerResult.d.ts","sourceRoot":"","sources":["../../../src/components/grid/REPLGridServerResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,qBAAa,oBAAoB;IAC/B,YAAY,EAAG,MAAM,CAAC;IACtB,MAAM,EAAG,MAAM,CAAC;IAEhB,MAAM,CAAC,QAAQ,CAAC,aAAa,6CAK3B;CACH"}
|
|
@@ -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 { createModelSchema, primitive } from 'serializr';
|
|
17
|
+
import { SerializationFactory } from '@finos/legend-shared';
|
|
18
|
+
export class REPLGridServerResult {
|
|
19
|
+
currentQuery;
|
|
20
|
+
result;
|
|
21
|
+
static serialization = new SerializationFactory(createModelSchema(REPLGridServerResult, {
|
|
22
|
+
currentQuery: primitive(),
|
|
23
|
+
result: primitive(),
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=REPLGridServerResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"REPLGridServerResult.js","sourceRoot":"","sources":["../../../src/components/grid/REPLGridServerResult.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,OAAO,oBAAoB;IAC/B,YAAY,CAAU;IACtB,MAAM,CAAU;IAEhB,MAAM,CAAU,aAAa,GAAG,IAAI,oBAAoB,CACtD,iBAAiB,CAAC,oBAAoB,EAAE;QACtC,YAAY,EAAE,SAAS,EAAE;QACzB,MAAM,EAAE,SAAS,EAAE;KACpB,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { IServerSideDatasource, IServerSideGetRowsParams } from '@ag-grid-community/core';
|
|
17
|
+
import { TDSRequest } from './TDSRequest.js';
|
|
18
|
+
import { type GeneratorFn } from '@finos/legend-shared';
|
|
19
|
+
import { type TDSRowDataType } from './GridUtils.js';
|
|
20
|
+
import type { REPLGridClientStore } from '../../stores/REPLGridClientStore.js';
|
|
21
|
+
import type { INTERNAL__TDSColumn } from '@finos/legend-graph';
|
|
22
|
+
export declare class ServerSideDataSource implements IServerSideDatasource {
|
|
23
|
+
executions: number;
|
|
24
|
+
rowData: TDSRowDataType[];
|
|
25
|
+
columns: INTERNAL__TDSColumn[];
|
|
26
|
+
editorStore?: REPLGridClientStore | undefined;
|
|
27
|
+
constructor(rowData?: TDSRowDataType[] | undefined, columns?: INTERNAL__TDSColumn[] | undefined, editorStore?: REPLGridClientStore | undefined);
|
|
28
|
+
fetchRows(params: IServerSideGetRowsParams<unknown, unknown>): GeneratorFn<void>;
|
|
29
|
+
getRows(params: IServerSideGetRowsParams<unknown, unknown>): void;
|
|
30
|
+
extractRequest(params: IServerSideGetRowsParams<unknown, unknown>): TDSRequest | undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ServerSideDataSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerSideDataSource.d.ts","sourceRoot":"","sources":["../../../src/components/grid/ServerSideDataSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAIL,UAAU,EAIX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE/E,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,qBAAqB,CAAC;AAE/E,qBAAa,oBAAqB,YAAW,qBAAqB;IAChE,UAAU,SAAK;IACf,OAAO,EAAE,cAAc,EAAE,CAAM;IAC/B,OAAO,EAAE,mBAAmB,EAAE,CAAM;IACpC,WAAW,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;gBAG5C,OAAO,CAAC,EAAE,cAAc,EAAE,GAAG,SAAS,EACtC,OAAO,CAAC,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC3C,WAAW,CAAC,EAAE,mBAAmB,GAAG,SAAS;IAU9C,SAAS,CACR,MAAM,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,GACjD,WAAW,CAAC,IAAI,CAAC;IA4BpB,OAAO,CAAC,MAAM,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,IAAI;IAIjE,cAAc,CACZ,MAAM,EAAE,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,GACjD,UAAU,GAAG,SAAS;CAgF1B"}
|