@finos/legend-application-data-cube 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__lib__/LegendDataCubeNavigation.d.ts +2 -0
- package/lib/__lib__/LegendDataCubeNavigation.d.ts.map +1 -1
- package/lib/__lib__/LegendDataCubeNavigation.js +2 -0
- package/lib/__lib__/LegendDataCubeNavigation.js.map +1 -1
- package/lib/application/LegendDataCubeApplicationConfig.d.ts +4 -0
- package/lib/application/LegendDataCubeApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendDataCubeApplicationConfig.js +5 -0
- package/lib/application/LegendDataCubeApplicationConfig.js.map +1 -1
- package/lib/application/__test-utils__/LegendDataCubeApplicationTestUtils.d.ts +18 -0
- package/lib/application/__test-utils__/LegendDataCubeApplicationTestUtils.d.ts.map +1 -0
- package/lib/application/__test-utils__/LegendDataCubeApplicationTestUtils.js +48 -0
- package/lib/application/__test-utils__/LegendDataCubeApplicationTestUtils.js.map +1 -0
- package/lib/components/LegendDataCubeBlockingWindow.d.ts +2 -1
- package/lib/components/LegendDataCubeBlockingWindow.d.ts.map +1 -1
- package/lib/components/LegendDataCubeBlockingWindow.js +8 -3
- package/lib/components/LegendDataCubeBlockingWindow.js.map +1 -1
- package/lib/components/__test-utils__/LegendDataCubeStoreTestUtils.d.ts +42 -0
- package/lib/components/__test-utils__/LegendDataCubeStoreTestUtils.d.ts.map +1 -0
- package/lib/components/__test-utils__/LegendDataCubeStoreTestUtils.js +104 -0
- package/lib/components/__test-utils__/LegendDataCubeStoreTestUtils.js.map +1 -0
- package/lib/components/builder/LegendDataCubeBuilder.d.ts +5 -0
- package/lib/components/builder/LegendDataCubeBuilder.d.ts.map +1 -1
- package/lib/components/builder/LegendDataCubeBuilder.js +26 -5
- package/lib/components/builder/LegendDataCubeBuilder.js.map +1 -1
- package/lib/components/builder/LegendDataCubeBuilderStoreProvider.d.ts.map +1 -1
- package/lib/components/builder/LegendDataCubeBuilderStoreProvider.js +1 -1
- package/lib/components/builder/LegendDataCubeBuilderStoreProvider.js.map +1 -1
- package/lib/components/builder/LegendDataCubePartialSourceLoader.d.ts +19 -0
- package/lib/components/builder/LegendDataCubePartialSourceLoader.d.ts.map +1 -0
- package/lib/components/builder/LegendDataCubePartialSourceLoader.js +50 -0
- package/lib/components/builder/LegendDataCubePartialSourceLoader.js.map +1 -0
- package/lib/components/builder/LegendDataCubeSourceViewer.d.ts.map +1 -1
- package/lib/components/builder/LegendDataCubeSourceViewer.js +61 -1
- package/lib/components/builder/LegendDataCubeSourceViewer.js.map +1 -1
- package/lib/components/builder/source/LocalFileDataCubeSourceBuilder.d.ts.map +1 -1
- package/lib/components/builder/source/LocalFileDataCubeSourceBuilder.js +1 -2
- package/lib/components/builder/source/LocalFileDataCubeSourceBuilder.js.map +1 -1
- package/lib/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.d.ts +22 -0
- package/lib/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.d.ts.map +1 -0
- package/lib/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.js +28 -0
- package/lib/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +3 -1
- package/lib/stores/LegendDataCubeBaseStore.d.ts +2 -1
- package/lib/stores/LegendDataCubeBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeBaseStore.js +6 -3
- package/lib/stores/LegendDataCubeBaseStore.js.map +1 -1
- package/lib/stores/LegendDataCubeDataCubeEngine.d.ts +6 -3
- package/lib/stores/LegendDataCubeDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeDataCubeEngine.js +127 -106
- package/lib/stores/LegendDataCubeDataCubeEngine.js.map +1 -1
- package/lib/stores/LegendDataCubeDuckDBEngine.d.ts +11 -4
- package/lib/stores/LegendDataCubeDuckDBEngine.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeDuckDBEngine.js +83 -16
- package/lib/stores/LegendDataCubeDuckDBEngine.js.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.d.ts +4 -0
- package/lib/stores/builder/LegendDataCubeBuilderStore.d.ts.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.js +58 -17
- package/lib/stores/builder/LegendDataCubeBuilderStore.js.map +1 -1
- package/lib/stores/builder/LegendDataCubeLoaderState.d.ts +11 -2
- package/lib/stores/builder/LegendDataCubeLoaderState.d.ts.map +1 -1
- package/lib/stores/builder/LegendDataCubeLoaderState.js +28 -1
- package/lib/stores/builder/LegendDataCubeLoaderState.js.map +1 -1
- package/lib/stores/builder/LegendDataCubeSourceLoaderState.d.ts +44 -0
- package/lib/stores/builder/LegendDataCubeSourceLoaderState.d.ts.map +1 -0
- package/lib/stores/builder/LegendDataCubeSourceLoaderState.js +101 -0
- package/lib/stores/builder/LegendDataCubeSourceLoaderState.js.map +1 -0
- package/lib/stores/builder/source/LocalFileDataCubeSourceBuilderState.d.ts +3 -2
- package/lib/stores/builder/source/LocalFileDataCubeSourceBuilderState.d.ts.map +1 -1
- package/lib/stores/builder/source/LocalFileDataCubeSourceBuilderState.js +7 -10
- package/lib/stores/builder/source/LocalFileDataCubeSourceBuilderState.js.map +1 -1
- package/lib/stores/builder/source/loader/LegendDataCubePartialSourceLoaderState.d.ts +29 -0
- package/lib/stores/builder/source/loader/LegendDataCubePartialSourceLoaderState.d.ts.map +1 -0
- package/lib/stores/builder/source/loader/LegendDataCubePartialSourceLoaderState.js +25 -0
- package/lib/stores/builder/source/loader/LegendDataCubePartialSourceLoaderState.js.map +1 -0
- package/lib/stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.d.ts +43 -0
- package/lib/stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.d.ts.map +1 -0
- package/lib/stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.js +142 -0
- package/lib/stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.js.map +1 -0
- package/lib/stores/model/LegendQueryDataCubeSource.d.ts +2 -1
- package/lib/stores/model/LegendQueryDataCubeSource.d.ts.map +1 -1
- package/lib/stores/model/LegendQueryDataCubeSource.js +1 -0
- package/lib/stores/model/LegendQueryDataCubeSource.js.map +1 -1
- package/lib/stores/model/LocalFileDataCubeSource.d.ts +3 -8
- package/lib/stores/model/LocalFileDataCubeSource.d.ts.map +1 -1
- package/lib/stores/model/LocalFileDataCubeSource.js +5 -15
- package/lib/stores/model/LocalFileDataCubeSource.js.map +1 -1
- package/package.json +13 -11
- package/src/__lib__/LegendDataCubeNavigation.ts +21 -0
- package/src/application/LegendDataCubeApplicationConfig.ts +10 -0
- package/src/application/__test-utils__/LegendDataCubeApplicationTestUtils.ts +52 -0
- package/src/components/LegendDataCubeBlockingWindow.tsx +8 -2
- package/src/components/__test-utils__/LegendDataCubeStoreTestUtils.tsx +231 -0
- package/src/components/builder/LegendDataCubeBuilder.tsx +51 -6
- package/src/components/builder/LegendDataCubeBuilderStoreProvider.tsx +3 -0
- package/src/components/builder/LegendDataCubePartialSourceLoader.tsx +108 -0
- package/src/components/builder/LegendDataCubeSourceViewer.tsx +171 -1
- package/src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx +1 -2
- package/src/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.tsx +60 -0
- package/src/stores/LegendDataCubeBaseStore.ts +13 -6
- package/src/stores/LegendDataCubeDataCubeEngine.ts +161 -120
- package/src/stores/LegendDataCubeDuckDBEngine.ts +101 -17
- package/src/stores/builder/LegendDataCubeBuilderStore.tsx +96 -24
- package/src/stores/builder/LegendDataCubeLoaderState.tsx +44 -1
- package/src/stores/builder/LegendDataCubeSourceLoaderState.tsx +145 -0
- package/src/stores/builder/source/LocalFileDataCubeSourceBuilderState.ts +9 -14
- package/src/stores/builder/source/loader/LegendDataCubePartialSourceLoaderState.ts +41 -0
- package/src/stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.ts +217 -0
- package/src/stores/model/LegendQueryDataCubeSource.ts +2 -0
- package/src/stores/model/LocalFileDataCubeSource.ts +6 -15
- package/tsconfig.json +8 -1
|
@@ -0,0 +1,50 @@
|
|
|
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 { FormButton } from '@finos/legend-data-cube';
|
|
19
|
+
import { useLegendDataCubeBuilderStore } from './LegendDataCubeBuilderStoreProvider.js';
|
|
20
|
+
import { LocalFileDataCubePartialSourceLoaderState } from '../../stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.js';
|
|
21
|
+
import { LocalFileDataCubePartialSourceLoader } from './source/loader/LocalFileDataCubePartialSourceLoader.js';
|
|
22
|
+
import { useEffect } from 'react';
|
|
23
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
24
|
+
import { formatDistanceToNow } from '@finos/legend-shared';
|
|
25
|
+
export const LegendDataCubePartialSourceLoader = observer(() => {
|
|
26
|
+
const store = useLegendDataCubeBuilderStore();
|
|
27
|
+
const state = store.loader.sourceLoader;
|
|
28
|
+
const sourceLoader = state.partialSourceLoader;
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
sourceLoader.initialize();
|
|
31
|
+
}, [sourceLoader]);
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "h-[calc(100%_-_40px)] w-full px-2 pt-2", children: _jsx("div", { className: "h-full w-full border border-neutral-300 bg-white", children: _jsxs("div", { className: "h-full w-full select-none p-2", children: [_jsx("div", { className: "relative mb-0.5 flex h-[42px] w-full border border-neutral-200 bg-neutral-100", children: _jsxs("div", { className: "w-full", children: [_jsx("div", { className: "h-6 w-4/5 overflow-hidden text-ellipsis whitespace-nowrap px-1.5 leading-6", children: state.persistentDataCube?.name }), _jsxs("div", { className: "flex h-[18px] items-start justify-between px-1.5", children: [_jsxs("div", { className: "flex", children: [_jsx(DataCubeIcon.ClockEdit, { className: "text-sm text-neutral-500" }), _jsx("div", { className: "ml-1 text-sm text-neutral-500", children: state.persistentDataCube?.lastUpdatedAt
|
|
33
|
+
? formatDistanceToNow(new Date(state.persistentDataCube.lastUpdatedAt), {
|
|
34
|
+
includeSeconds: true,
|
|
35
|
+
addSuffix: true,
|
|
36
|
+
})
|
|
37
|
+
: '(unknown)' })] }), _jsxs("div", { className: "flex", children: [_jsx(DataCubeIcon.User, { className: "text-sm text-neutral-500" }), _jsx("div", { className: "ml-1 text-sm text-neutral-500", children: state.persistentDataCube?.owner })] })] })] }) }), _jsx("div", { className: "flex h-10 w-full items-center", children: _jsxs("div", { className: "flex h-full w-32 flex-shrink-0 items-center text-sm", children: ["Source Type:", _jsx("div", { className: "pl-3", children: sourceLoader.label })] }) }), _jsx("div", { className: "h-[calc(100%_-_41px)] w-full overflow-auto", children: sourceLoader instanceof
|
|
38
|
+
LocalFileDataCubePartialSourceLoaderState && (_jsx(LocalFileDataCubePartialSourceLoader, { partialSourceLoader: sourceLoader })) })] }) }) }), _jsxs("div", { className: "flex h-10 items-center justify-end px-2", children: [_jsx(FormButton, { onClick: state.display.onClose, children: "Cancel" }), _jsx(FormButton, { className: "ml-2", disabled: !sourceLoader.isValid || state.finalizeState.isInProgress, onClick: () => {
|
|
39
|
+
state
|
|
40
|
+
.finalize()
|
|
41
|
+
.then(() => store.loadPartialSourceDataCube())
|
|
42
|
+
.catch((error) => {
|
|
43
|
+
store.alertService.alertUnhandledError(error);
|
|
44
|
+
})
|
|
45
|
+
.finally(() => {
|
|
46
|
+
state.display.close();
|
|
47
|
+
});
|
|
48
|
+
}, children: "OK" })] })] }));
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=LegendDataCubePartialSourceLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendDataCubePartialSourceLoader.js","sourceRoot":"","sources":["../../../src/components/builder/LegendDataCubePartialSourceLoader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,yCAAyC,EAAE,MAAM,iFAAiF,CAAC;AAC5I,OAAO,EAAE,oCAAoC,EAAE,MAAM,yDAAyD,CAAC;AAC/G,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,MAAM,CAAC,MAAM,iCAAiC,GAAG,QAAQ,CAAC,GAAG,EAAE;IAC7D,MAAM,KAAK,GAAG,6BAA6B,EAAE,CAAC;IAC9C,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC;IACxC,MAAM,YAAY,GAAG,KAAK,CAAC,mBAAmB,CAAC;IAE/C,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL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ACT,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,CAAC,YAAY,CAAC,OAAO,IAAI,KAAK,CAAC,aAAa,CAAC,YAAY,EACnE,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK;iCACF,QAAQ,EAAE;iCACV,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC;iCAC7C,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gCACf,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;4BAChD,CAAC,CAAC;iCACD,OAAO,CAAC,GAAG,EAAE;gCACZ,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;4BACxB,CAAC,CAAC,CAAC;wBACP,CAAC,mBAGU,IACT,IACL,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDataCubeSourceViewer.d.ts","sourceRoot":"","sources":["../../../src/components/builder/LegendDataCubeSourceViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"LegendDataCubeSourceViewer.d.ts","sourceRoot":"","sources":["../../../src/components/builder/LegendDataCubeSourceViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgLH,eAAO,MAAM,0BAA0B;;CAuFrC,CAAC"}
|
|
@@ -18,8 +18,65 @@ import { observer } from 'mobx-react-lite';
|
|
|
18
18
|
import { useLegendDataCubeBuilderStore } from './LegendDataCubeBuilderStoreProvider.js';
|
|
19
19
|
import { LegendQueryDataCubeSource } from '../../stores/model/LegendQueryDataCubeSource.js';
|
|
20
20
|
import { useLegendDataCubeApplicationStore } from '../LegendDataCubeFrameworkProvider.js';
|
|
21
|
-
import { EXTERNAL_APPLICATION_NAVIGATION__generateQueryViewUrl } from '../../__lib__/LegendDataCubeNavigation.js';
|
|
21
|
+
import { EXTERNAL_APPLICATION_NAVIGATION__generateQueryViewUrl, EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCViewUrl, EXTERNAL_APPLICATION_NAVIGATION__generateStudioViewUrl, } from '../../__lib__/LegendDataCubeNavigation.js';
|
|
22
22
|
import { DataCubeIcon } from '@finos/legend-art';
|
|
23
|
+
import { UserDefinedFunctionDataCubeSource } from '@finos/legend-data-cube';
|
|
24
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
25
|
+
import { DepotScope, StoreProjectData, } from '@finos/legend-server-depot';
|
|
26
|
+
import { returnUndefOnError } from '@finos/legend-shared';
|
|
27
|
+
import { V1_deserializePureModelContext, V1_LegendSDLC, V1_PureModelContextPointer, } from '@finos/legend-graph';
|
|
28
|
+
const handleFetchProject = (depotServerClient, model, handleProjectChange) => {
|
|
29
|
+
if (model instanceof V1_PureModelContextPointer &&
|
|
30
|
+
model.sdlcInfo instanceof V1_LegendSDLC) {
|
|
31
|
+
depotServerClient
|
|
32
|
+
.getProject(model.sdlcInfo.groupId, model.sdlcInfo.artifactId)
|
|
33
|
+
.then((e) => {
|
|
34
|
+
handleProjectChange(returnUndefOnError(() => StoreProjectData.serialization.fromJson(e)));
|
|
35
|
+
})
|
|
36
|
+
.catch((e) => {
|
|
37
|
+
// ignore
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const generateStudioViewLink = (studio, project, version, element) => {
|
|
42
|
+
if (version.endsWith(DepotScope.SNAPSHOT)) {
|
|
43
|
+
return EXTERNAL_APPLICATION_NAVIGATION__generateStudioViewUrl(studio, project.groupId, project.artifactId, version, element);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
return EXTERNAL_APPLICATION_NAVIGATION__generateStudioSDLCViewUrl(studio, project.projectId, version, element);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const UserDefinedFunctionSourceViewer = observer((props) => {
|
|
50
|
+
const { source } = props;
|
|
51
|
+
const sourceModel = returnUndefOnError(() => V1_deserializePureModelContext(source.model));
|
|
52
|
+
const version = sourceModel instanceof V1_PureModelContextPointer &&
|
|
53
|
+
sourceModel.sdlcInfo instanceof V1_LegendSDLC
|
|
54
|
+
? sourceModel.sdlcInfo.version
|
|
55
|
+
: undefined;
|
|
56
|
+
const store = useLegendDataCubeBuilderStore();
|
|
57
|
+
const application = useLegendDataCubeApplicationStore();
|
|
58
|
+
const [project, setProject] = useState(undefined);
|
|
59
|
+
const link = project?.projectId && application.config.studioApplicationUrl && version
|
|
60
|
+
? generateStudioViewLink(application.config.studioApplicationUrl, project, version, source.functionPath)
|
|
61
|
+
: undefined;
|
|
62
|
+
const _handleFetchProject = useCallback(() => {
|
|
63
|
+
if (sourceModel) {
|
|
64
|
+
handleFetchProject(store.depotServerClient, sourceModel, setProject);
|
|
65
|
+
}
|
|
66
|
+
}, [sourceModel, store.depotServerClient]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
_handleFetchProject();
|
|
69
|
+
}, [_handleFetchProject]);
|
|
70
|
+
return (_jsx("div", { className: "h-full w-full px-2 pt-2", children: _jsx("div", { className: "h-[calc(100%_-_8px)] w-full border border-neutral-300 bg-white", children: _jsxs("div", { className: "h-full w-full select-none p-2", children: [_jsxs("div", { className: "flex h-6", children: [_jsx("div", { className: "flex h-6 items-center text-xl font-medium", children: _jsx(DataCubeIcon.Table, {}) }), _jsx("div", { className: "ml-1 flex h-6 items-center text-xl font-medium", children: "User Defined Function" })] }), link && (_jsxs("div", { className: "mt-2 flex h-6 w-full", children: [_jsx("div", { className: "flex h-full w-[calc(100%_-_20px)] items-center border border-r-0 border-neutral-400 px-1.5 font-bold text-sky-500 underline", children: _jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: source.functionPath }) }), _jsx("button", { className: "flex aspect-square h-full w-6 items-center justify-center border border-neutral-400 bg-neutral-300 hover:brightness-95", onClick: () => {
|
|
71
|
+
store.application.clipboardService
|
|
72
|
+
.copyTextToClipboard(link)
|
|
73
|
+
.catch((error) => store.alertService.alertUnhandledError(error));
|
|
74
|
+
}, title: "Copy Link", children: _jsx(DataCubeIcon.Clipboard, {}) })] })), !link && (_jsxs("div", { className: "mt-2 flex h-6 w-full", children: [_jsx("div", { className: "flex h-full w-[calc(100%_-_20px)] items-center border border-r-0 border-neutral-400 bg-neutral-200 px-1.5", children: _jsx("div", { className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: source.functionPath }) }), _jsx("button", { className: "flex aspect-square h-full w-6 items-center justify-center border border-neutral-400 bg-neutral-300 hover:brightness-95", onClick: () => {
|
|
75
|
+
application.clipboardService
|
|
76
|
+
.copyTextToClipboard(source.functionPath)
|
|
77
|
+
.catch((error) => store.alertService.alertUnhandledError(error));
|
|
78
|
+
}, title: "Copy ID", children: _jsx(DataCubeIcon.Clipboard, {}) })] }))] }) }) }));
|
|
79
|
+
});
|
|
23
80
|
export const LegendDataCubeSourceViewer = observer(() => {
|
|
24
81
|
const store = useLegendDataCubeBuilderStore();
|
|
25
82
|
const source = store.builder?.source;
|
|
@@ -41,6 +98,9 @@ export const LegendDataCubeSourceViewer = observer(() => {
|
|
|
41
98
|
.catch((error) => store.alertService.alertUnhandledError(error));
|
|
42
99
|
}, title: "Copy ID", children: _jsx(DataCubeIcon.Clipboard, {}) })] }))] }) }) }));
|
|
43
100
|
}
|
|
101
|
+
else if (source instanceof UserDefinedFunctionDataCubeSource) {
|
|
102
|
+
return _jsx(UserDefinedFunctionSourceViewer, { source: source });
|
|
103
|
+
}
|
|
44
104
|
return (_jsx("div", { className: "h-full w-full px-2 pt-2", children: `Can't display source` }));
|
|
45
105
|
});
|
|
46
106
|
//# sourceMappingURL=LegendDataCubeSourceViewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDataCubeSourceViewer.js","sourceRoot":"","sources":["../../../src/components/builder/LegendDataCubeSourceViewer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendDataCubeSourceViewer.js","sourceRoot":"","sources":["../../../src/components/builder/LegendDataCubeSourceViewer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAC5F,OAAO,EAAE,iCAAiC,EAAE,MAAM,uCAAuC,CAAC;AAC1F,OAAO,EACL,qDAAqD,EACrD,0DAA0D,EAC1D,sDAAsD,GACvD,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAEL,UAAU,EACV,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,8BAA8B,EAC9B,aAAa,EACb,0BAA0B,GAE3B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,kBAAkB,GAAG,CACzB,iBAAoC,EACpC,KAA0B,EAC1B,mBAAgE,EAChE,EAAE;IACF,IACE,KAAK,YAAY,0BAA0B;QAC3C,KAAK,CAAC,QAAQ,YAAY,aAAa,EACvC,CAAC;QACD,iBAAiB;aACd,UAAU,CAAC,KAAK,CA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AK,EAAE,EAAE,CACf,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAC9C,CAAC;oCACN,CAAC,EACD,KAAK,EAAC,SAAS,YAEf,KAAC,YAAY,CAAC,SAAS,KAAG,GACnB,IACL,CACP,IACG,GACF,GACF,CACP,CAAC;IACJ,CAAC;SAAM,IAAI,MAAM,YAAY,iCAAiC,EAAE,CAAC;QAC/D,OAAO,KAAC,+BAA+B,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;IAC7D,CAAC;IACD,OAAO,CACL,cAAK,SAAS,EAAC,yBAAyB,YAAE,sBAAsB,GAAO,CACxE,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalFileDataCubeSourceBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,uEAAuE,CAAC;AAIjI,eAAO,MAAM,8BAA8B,WACjC;IAAE,aAAa,EAAE,mCAAmC,CAAA;CAAE;;
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubeSourceBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,uEAAuE,CAAC;AAIjI,eAAO,MAAM,8BAA8B,WACjC;IAAE,aAAa,EAAE,mCAAmC,CAAA;CAAE;;CAmC/D,CAAC"}
|
|
@@ -21,8 +21,7 @@ export const LocalFileDataCubeSourceBuilder = observer((props) => {
|
|
|
21
21
|
const { sourceBuilder } = props;
|
|
22
22
|
return (_jsxs("div", { className: "h-full w-full p-2", children: [_jsx(FormAlert, { message: "Local file support is experimental", type: AlertType.WARNING, text: `Currently, support for local file comes with the following limitations:
|
|
23
23
|
- Only CSV files are supported, but not all variants of CSV files are supported (required header row, comma delimiter, single escape quote).
|
|
24
|
-
- Data from uploaded file will not be stored nor shared
|
|
25
|
-
- DataCube created with local file source cannot be saved.` }), _jsx("div", { className: "mt-2 flex h-6 w-full items-center text-neutral-500", children: _jsx("input", { type: "file", onChange: (event) => {
|
|
24
|
+
- Data from uploaded file will not be stored nor shared.` }), _jsx("div", { className: "mt-2 flex h-6 w-full items-center text-neutral-500", children: _jsx("input", { type: "file", onChange: (event) => {
|
|
26
25
|
sourceBuilder.processFile(event.target.files?.[0]);
|
|
27
26
|
}, className: "w-full" }) }), sourceBuilder.previewText !== undefined && (_jsx("div", { className: "mt-2 h-40", children: _jsx(FormCodeEditor, { value: sourceBuilder.previewText, language: CODE_EDITOR_LANGUAGE.TEXT, isReadOnly: true, hidePadding: true, title: "Data Preview" }) }))] }));
|
|
28
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalFileDataCubeSourceBuilder.js","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CACpD,CAAC,KAA6D,EAAE,EAAE;IAChE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEhC,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,SAAS,IACR,OAAO,EAAC,oCAAoC,EAC5C,IAAI,EAAE,SAAS,CAAC,OAAO,EACvB,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubeSourceBuilder.js","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,QAAQ,CACpD,CAAC,KAA6D,EAAE,EAAE;IAChE,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;IAEhC,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,SAAS,IACR,OAAO,EAAC,oCAAoC,EAC5C,IAAI,EAAE,SAAS,CAAC,OAAO,EACvB,IAAI,EAAE;;yDAEyC,GAC/C,EACF,cAAK,SAAS,EAAC,oDAAoD,YACjE,gBACE,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;oBACrD,CAAC,EACD,SAAS,EAAC,QAAQ,GAClB,GACE,EACL,aAAa,CAAC,WAAW,KAAK,SAAS,IAAI,CAC1C,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,cAAc,IACb,KAAK,EAAE,aAAa,CAAC,WAAW,EAChC,QAAQ,EAAE,oBAAoB,CAAC,IAAI,EACnC,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,IAAI,EACjB,KAAK,EAAC,cAAc,GACpB,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,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 type { LocalFileDataCubePartialSourceLoaderState } from '../../../../stores/builder/source/loader/LocalFileDataCubePartialSourceLoaderState.js';
|
|
17
|
+
export declare const LocalFileDataCubePartialSourceLoader: ((props: {
|
|
18
|
+
partialSourceLoader: LocalFileDataCubePartialSourceLoaderState;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=LocalFileDataCubePartialSourceLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubePartialSourceLoader.d.ts","sourceRoot":"","sources":["../../../../../src/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,yCAAyC,EAAE,MAAM,uFAAuF,CAAC;AAEvJ,eAAO,MAAM,oCAAoC,WACvC;IACN,mBAAmB,EAAE,yCAAyC,CAAC;CAChE;;CAmCF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 { AlertType, FormAlert, FormCodeEditor } from '@finos/legend-data-cube';
|
|
19
|
+
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';
|
|
20
|
+
export const LocalFileDataCubePartialSourceLoader = observer((props) => {
|
|
21
|
+
const { partialSourceLoader } = props;
|
|
22
|
+
return (_jsxs("div", { className: "h-full w-full", children: [_jsx(FormAlert, { message: "Local file support is experimental", type: AlertType.WARNING, text: `Currently, support for local file comes with the following limitations:
|
|
23
|
+
- Only CSV files are supported, but not all variants of CSV files are supported (required header row, comma delimiter, single escape quote).
|
|
24
|
+
- Data from uploaded file will not be stored nor shared.` }), _jsx("div", { className: "mt-2 flex h-6 w-full items-center text-neutral-500", children: _jsx("input", { type: "file", onChange: (event) => {
|
|
25
|
+
partialSourceLoader.processFile(event.target.files?.[0]);
|
|
26
|
+
}, className: "w-full" }) }), partialSourceLoader.previewText !== undefined && (_jsx("div", { className: "mt-2 h-40", children: _jsx(FormCodeEditor, { value: partialSourceLoader.previewText, language: CODE_EDITOR_LANGUAGE.TEXT, isReadOnly: true, hidePadding: true, title: "Data Preview" }) }))] }));
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=LocalFileDataCubePartialSourceLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubePartialSourceLoader.js","sourceRoot":"","sources":["../../../../../src/components/builder/source/loader/LocalFileDataCubePartialSourceLoader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,MAAM,CAAC,MAAM,oCAAoC,GAAG,QAAQ,CAC1D,CAAC,KAEA,EAAE,EAAE;IACH,MAAM,EAAE,mBAAmB,EAAE,GAAG,KAAK,CAAC;IAEtC,OAAO,CACL,eAAK,SAAS,EAAC,eAAe,aAC5B,KAAC,SAAS,IACR,OAAO,EAAC,oCAAoC,EAC5C,IAAI,EAAE,SAAS,CAAC,OAAO,EACvB,IAAI,EAAE;;yDAEyC,GAC/C,EACF,cAAK,SAAS,EAAC,oDAAoD,YACjE,gBACE,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;wBAClB,mBAAmB,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;oBAC3D,CAAC,EACD,SAAS,EAAC,QAAQ,GAClB,GACE,EACL,mBAAmB,CAAC,WAAW,KAAK,SAAS,IAAI,CAChD,cAAK,SAAS,EAAC,WAAW,YACxB,KAAC,cAAc,IACb,KAAK,EAAE,mBAAmB,CAAC,WAAW,EACtC,QAAQ,EAAE,oBAAoB,CAAC,IAAI,EACnC,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,IAAI,EACjB,KAAK,EAAC,cAAc,GACpB,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/lib/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license @finos/legend-application-data-cube v0.3.
|
|
1
|
+
/** @license @finos/legend-application-data-cube v0.3.3
|
|
2
2
|
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
/*# sourceMappingURL=index.css.map */
|
|
17
|
+
.legend-datacube-release-notes .release-viewer{background-color:var(--tw-color-white);margin-bottom:1rem}.legend-datacube-release-notes .release-viewer__version{font-weight:bold;padding-left:.5rem;padding-top:.5rem}.legend-datacube-release-notes .release-viewer__content{padding:.5rem}.legend-datacube-release-notes .release-viewer__update{padding-left:.5rem}.legend-datacube-release-notes .release-viewer__update__description{padding-left:.5rem}.legend-datacube-release-notes .release-viewer__update-type{margin:.25rem 0}.legend-datacube-release-notes .release-viewer__update__items{padding-top:.25rem}.legend-datacube-release-notes .release-viewer__update__item{display:flex;margin:0 0 .5rem}.legend-datacube-release-notes .release-viewer__update__item-btn{color:var(--tw-color-sky-500)}.legend-datacube-release-notes .release-viewer__update__item-btn-bug{color:var(--tw-color-red-500) !important}.legend-datacube-release-notes .release-viewer__update__link{padding-left:.5rem}.legend-datacube-release-notes .release-viewer__update__link-btn{color:var(--tw-color-sky-500)}/*# sourceMappingURL=index.css.map */
|
package/lib/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":[],"names":[],"mappings":"","file":"index.css"}
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../style/index.scss"],"names":[],"mappings":"AAiBE,+CACE,uCACA,mBAEA,wDACE,iBACA,mBACA,kBAGF,wDACE,cAGF,uDACE,mBAEA,oEACE,mBAGF,4DACE,gBAGF,8DACE,mBAGF,6DACE,aACA,iBAEA,iEACE,8BAGF,qEACE,yCAIJ,6DACE,mBAEA,iEACE","file":"index.css"}
|
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finos/legend-application-data-cube",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Legend DataCube application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@finos/legend-dev-utils": "workspace:*",
|
|
66
66
|
"@jest/globals": "29.7.0",
|
|
67
|
+
"@testing-library/dom": "10.4.0",
|
|
68
|
+
"@testing-library/react": "16.2.0",
|
|
67
69
|
"cross-env": "7.0.3",
|
|
68
70
|
"eslint": "9.20.1",
|
|
69
71
|
"jest": "29.7.0",
|
|
@@ -17,7 +17,7 @@ import { type ApplicationStore } from '@finos/legend-application';
|
|
|
17
17
|
import type { LegendDataCubePluginManager } from '../application/LegendDataCubePluginManager.js';
|
|
18
18
|
import { DepotServerClient } from '@finos/legend-server-depot';
|
|
19
19
|
import type { LegendDataCubeApplicationConfig } from '../application/LegendDataCubeApplicationConfig.js';
|
|
20
|
-
import { V1_EngineServerClient, V1_PureGraphManager } from '@finos/legend-graph';
|
|
20
|
+
import { type V1_EngineServerClient, V1_PureGraphManager, V1_RemoteEngine } from '@finos/legend-graph';
|
|
21
21
|
import { ActionState } from '@finos/legend-shared';
|
|
22
22
|
import { LegendDataCubeDataCubeEngine } from './LegendDataCubeDataCubeEngine.js';
|
|
23
23
|
import { DataCubeLayoutService, type DataCubeSetting, DataCubeAlertService, DataCubeTaskService } from '@finos/legend-data-cube';
|
|
@@ -27,6 +27,7 @@ export declare class LegendDataCubeBaseStore {
|
|
|
27
27
|
readonly pluginManager: LegendDataCubePluginManager;
|
|
28
28
|
readonly depotServerClient: DepotServerClient;
|
|
29
29
|
readonly graphManager: V1_PureGraphManager;
|
|
30
|
+
readonly remoteEngine: V1_RemoteEngine;
|
|
30
31
|
readonly engineServerClient: V1_EngineServerClient;
|
|
31
32
|
readonly engine: LegendDataCubeDataCubeEngine;
|
|
32
33
|
readonly taskService: DataCubeTaskService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDataCubeBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendDataCubeBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EACL,qBAAqB,
|
|
1
|
+
{"version":3,"file":"LegendDataCubeBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendDataCubeBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mDAAmD,CAAC;AACzG,OAAO,EACL,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,WAAW,EAKZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAGL,qBAAqB,EACrB,KAAK,eAAe,EAEpB,oBAAoB,EAEpB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAQjC,MAAM,MAAM,8BAA8B,GAAG,gBAAgB,CAC3D,+BAA+B,EAC/B,2BAA2B,CAC5B,CAAC;AAEF,qBAAa,uBAAuB;IAClC,QAAQ,CAAC,WAAW,EAAE,8BAA8B,CAAC;IACrD,QAAQ,CAAC,aAAa,EAAE,2BAA2B,CAAC;IACpD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,eAAe,CAAC;IACvC,QAAQ,CAAC,kBAAkB,EAAE,qBAAqB,CAAC;IAEnD,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAErC,QAAQ,CAAC,eAAe,cAAwB;IAEhD,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAE3B,WAAW,EAAE,8BAA8B;IAoEvD,OAAO,CAAC,sCAAsC;IAiB9C,OAAO,CAAC,kCAAkC;IAgBpC,UAAU;CA6CjB"}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { APPLICATION_EVENT, DEFAULT_TAB_SIZE, } from '@finos/legend-application';
|
|
17
17
|
import { DepotServerClient } from '@finos/legend-server-depot';
|
|
18
|
-
import {
|
|
18
|
+
import { V1_PureGraphManager, V1_RemoteEngine, } from '@finos/legend-graph';
|
|
19
19
|
import { ActionState, LogEvent, assertErrorThrown, guaranteeIsBoolean, guaranteeIsString, } from '@finos/legend-shared';
|
|
20
20
|
import { LegendDataCubeDataCubeEngine } from './LegendDataCubeDataCubeEngine.js';
|
|
21
21
|
import { DataCubeSettingGroup, DataCubeSettingType, DataCubeLayoutService, DataCubeAlertService, DataCubeLogService, DataCubeTaskService, } from '@finos/legend-data-cube';
|
|
@@ -25,6 +25,7 @@ export class LegendDataCubeBaseStore {
|
|
|
25
25
|
pluginManager;
|
|
26
26
|
depotServerClient;
|
|
27
27
|
graphManager;
|
|
28
|
+
remoteEngine;
|
|
28
29
|
engineServerClient;
|
|
29
30
|
engine;
|
|
30
31
|
taskService;
|
|
@@ -71,11 +72,12 @@ export class LegendDataCubeBaseStore {
|
|
|
71
72
|
},
|
|
72
73
|
},
|
|
73
74
|
];
|
|
74
|
-
this.
|
|
75
|
+
this.remoteEngine = new V1_RemoteEngine({
|
|
75
76
|
baseUrl: this.getEngineServerBaseUrlSettingValue(),
|
|
76
77
|
queryBaseUrl: this.application.config.engineQueryServerUrl,
|
|
77
78
|
enableCompression: this.getEngineEnableCompressionSettingValue(),
|
|
78
|
-
});
|
|
79
|
+
}, application.logService);
|
|
80
|
+
this.engineServerClient = this.remoteEngine.getEngineServerClient();
|
|
79
81
|
this.engineServerClient.setTracerService(application.tracerService);
|
|
80
82
|
this.engine = new LegendDataCubeDataCubeEngine(this.application, this.depotServerClient, this.engineServerClient, this.graphManager);
|
|
81
83
|
this.taskService = new DataCubeTaskService();
|
|
@@ -116,6 +118,7 @@ export class LegendDataCubeBaseStore {
|
|
|
116
118
|
enableCompression: this.getEngineEnableCompressionSettingValue(),
|
|
117
119
|
},
|
|
118
120
|
}, {
|
|
121
|
+
engine: this.remoteEngine,
|
|
119
122
|
tracerService: this.application.tracerService,
|
|
120
123
|
});
|
|
121
124
|
this.initializeState.pass();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDataCubeBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendDataCubeBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,gBAAgB,GAEjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,
|
|
1
|
+
{"version":3,"file":"LegendDataCubeBaseStore.js","sourceRoot":"","sources":["../../src/stores/LegendDataCubeBaseStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACj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C,KAAK,CAC/B,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,EAC5D,kCAAkC,EAClC,KAAK,CACN,CAAC;YACF,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { V1_Lambda, type V1_ValueSpecification, type V1_EngineServerClient, V1_PureGraphManager, TDSExecutionResult } from '@finos/legend-graph';
|
|
16
|
+
import { V1_Lambda, type V1_ValueSpecification, type V1_EngineServerClient, V1_PureGraphManager, TDSExecutionResult, V1_AppliedFunction } from '@finos/legend-graph';
|
|
17
17
|
import { DataCubeEngine, type DataCubeSource, type CompletionItem, CachedDataCubeSource, type DataCubeExecutionOptions, type DataCubeCacheInitializationOptions } from '@finos/legend-data-cube';
|
|
18
18
|
import { LogEvent, type PlainObject } from '@finos/legend-shared';
|
|
19
19
|
import type { LegendDataCubeApplicationStore } from './LegendDataCubeBaseStore.js';
|
|
@@ -49,14 +49,17 @@ export declare class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
49
49
|
result: TDSExecutionResult;
|
|
50
50
|
executionTime: number;
|
|
51
51
|
}>;
|
|
52
|
-
buildExecutionContext(source: DataCubeSource):
|
|
52
|
+
buildExecutionContext(source: DataCubeSource): V1_AppliedFunction | undefined;
|
|
53
53
|
initializeCache(source: DataCubeSource, options?: DataCubeCacheInitializationOptions | undefined): Promise<CachedDataCubeSource | undefined>;
|
|
54
54
|
disposeCache(source: CachedDataCubeSource): Promise<void>;
|
|
55
55
|
private _getQueryRelationType;
|
|
56
56
|
private _getLambdaRelationType;
|
|
57
57
|
private _runQuery;
|
|
58
58
|
private _generateExecutionPlan;
|
|
59
|
-
ingestLocalFileData(data: string, format: string): Promise<
|
|
59
|
+
ingestLocalFileData(data: string, format: string, refId?: string): Promise<{
|
|
60
|
+
dbReference: string;
|
|
61
|
+
columnNames: string[];
|
|
62
|
+
}>;
|
|
60
63
|
private _synthesizeMinimalModelContext;
|
|
61
64
|
logDebug(message: string, ...data: unknown[]): void;
|
|
62
65
|
debugProcess(processName: string, ...data: [string, unknown][]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDataCubeDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendDataCubeDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,SAAS,EACT,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,mBAAmB,EAKnB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"LegendDataCubeDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendDataCubeDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,SAAS,EACT,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,mBAAmB,EAKnB,kBAAkB,EA4DlB,kBAAkB,EACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,cAAc,EAQnB,oBAAoB,EACpB,KAAK,wBAAwB,EAC7B,KAAK,kCAAkC,EAMxC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,QAAQ,EAER,KAAK,WAAW,EASjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AASnF,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,4BAA4B,CAAC;AAOpC,qBAAa,4BAA6B,SAAQ,cAAc;IAC9D,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiC;IAC9D,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAw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