@finos/legend-application-data-cube 0.3.2 → 0.3.4
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 +9 -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 +2 -1
- package/lib/components/builder/LegendDataCubeBuilderStoreProvider.js.map +1 -1
- 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/LegendDataCubeSourceLoader.d.ts +25 -0
- package/lib/components/builder/source/LegendDataCubeSourceLoader.d.ts.map +1 -0
- package/lib/components/builder/source/LegendDataCubeSourceLoader.js +47 -0
- package/lib/components/builder/source/LegendDataCubeSourceLoader.js.map +1 -0
- 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/LocalFileDataCubeSourceLoader.d.ts +22 -0
- package/lib/components/builder/source/LocalFileDataCubeSourceLoader.d.ts.map +1 -0
- package/lib/components/builder/source/LocalFileDataCubeSourceLoader.js +28 -0
- package/lib/components/builder/source/LocalFileDataCubeSourceLoader.js.map +1 -0
- package/lib/components/builder/source/UserDefinedFunctionDataCubeSourceBuilder.d.ts.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +7 -5
- 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 +8 -5
- package/lib/stores/LegendDataCubeDataCubeEngine.d.ts.map +1 -1
- package/lib/stores/LegendDataCubeDataCubeEngine.js +132 -114
- 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 +92 -20
- package/lib/stores/LegendDataCubeDuckDBEngine.js.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.d.ts +7 -0
- package/lib/stores/builder/LegendDataCubeBuilderStore.d.ts.map +1 -1
- package/lib/stores/builder/LegendDataCubeBuilderStore.js +68 -17
- package/lib/stores/builder/LegendDataCubeBuilderStore.js.map +1 -1
- package/lib/stores/builder/source/LegendDataCubeSourceLoaderState.d.ts +39 -0
- package/lib/stores/builder/source/LegendDataCubeSourceLoaderState.d.ts.map +1 -0
- package/lib/stores/builder/source/LegendDataCubeSourceLoaderState.js +66 -0
- package/lib/stores/builder/source/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/LocalFileDataCubeSourceLoaderState.d.ts +45 -0
- package/lib/stores/builder/source/LocalFileDataCubeSourceLoaderState.d.ts.map +1 -0
- package/lib/stores/builder/source/LocalFileDataCubeSourceLoaderState.js +142 -0
- package/lib/stores/builder/source/LocalFileDataCubeSourceLoaderState.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 +17 -15
- 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 +9 -2
- package/src/components/__test-utils__/LegendDataCubeStoreTestUtils.tsx +231 -0
- package/src/components/builder/LegendDataCubeBuilder.tsx +51 -6
- package/src/components/builder/LegendDataCubeBuilderStoreProvider.tsx +2 -0
- package/src/components/builder/LegendDataCubeSourceViewer.tsx +171 -1
- package/src/components/builder/source/LegendDataCubeSourceLoader.tsx +111 -0
- package/src/components/builder/source/LocalFileDataCubeSourceBuilder.tsx +1 -2
- package/src/components/builder/source/LocalFileDataCubeSourceLoader.tsx +58 -0
- package/src/stores/LegendDataCubeBaseStore.ts +13 -6
- package/src/stores/LegendDataCubeDataCubeEngine.ts +167 -131
- package/src/stores/LegendDataCubeDuckDBEngine.ts +110 -20
- package/src/stores/builder/LegendDataCubeBuilderStore.tsx +114 -23
- package/src/stores/builder/source/LegendDataCubeSourceLoaderState.tsx +104 -0
- package/src/stores/builder/source/LocalFileDataCubeSourceBuilderState.ts +9 -14
- package/src/stores/builder/source/LocalFileDataCubeSourceLoaderState.ts +232 -0
- package/src/stores/model/LegendQueryDataCubeSource.ts +2 -0
- package/src/stores/model/LocalFileDataCubeSource.ts +6 -15
- package/tsconfig.json +7 -1
|
@@ -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,CAAC,QAAQ,CAAC,OAAO,EAAE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AAC,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"}
|
|
@@ -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 { LegendDataCubeSourceLoaderState } from '../../../stores/builder/source/LegendDataCubeSourceLoaderState.js';
|
|
17
|
+
export declare const LegendDataCubeSourceLoader: ((props: {
|
|
18
|
+
state: LegendDataCubeSourceLoaderState;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const LegendDataCubeSourceLoaderBlockingWindow: (() => import("react/jsx-runtime").JSX.Element | null) & {
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=LegendDataCubeSourceLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendDataCubeSourceLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/LegendDataCubeSourceLoader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mEAAmE,CAAC;AAGzH,eAAO,MAAM,0BAA0B,WAC7B;IAAE,KAAK,EAAE,+BAA+B,CAAA;CAAE;;CAwEnD,CAAC;AAEF,eAAO,MAAM,wCAAwC;;CASnD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { LocalFileDataCubeSourceLoaderState } from '../../../stores/builder/source/LocalFileDataCubeSourceLoaderState.js';
|
|
21
|
+
import { LocalFileDataCubePartialSourceLoader } from './LocalFileDataCubeSourceLoader.js';
|
|
22
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
23
|
+
import { formatDistanceToNow } from '@finos/legend-shared';
|
|
24
|
+
import { LegendDataCubeBlockingWindow } from '../../LegendDataCubeBlockingWindow.js';
|
|
25
|
+
export const LegendDataCubeSourceLoader = observer((props) => {
|
|
26
|
+
const { state } = props;
|
|
27
|
+
const store = useLegendDataCubeBuilderStore();
|
|
28
|
+
const persistentDataCube = state.persistentDataCube;
|
|
29
|
+
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: 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: persistentDataCube.lastUpdatedAt
|
|
30
|
+
? formatDistanceToNow(new Date(persistentDataCube.lastUpdatedAt), {
|
|
31
|
+
includeSeconds: true,
|
|
32
|
+
addSuffix: true,
|
|
33
|
+
})
|
|
34
|
+
: '(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: 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: state.label })] }) }), _jsx("div", { className: "h-[calc(100%_-_41px)] w-full overflow-auto", children: state instanceof LocalFileDataCubeSourceLoaderState && (_jsx(LocalFileDataCubePartialSourceLoader, { partialSourceLoader: state })) })] }) }) }), _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: !state.isValid || state.finalizeState.isInProgress, onClick: () => {
|
|
35
|
+
state.finalize().catch((error) => {
|
|
36
|
+
store.alertService.alertUnhandledError(error);
|
|
37
|
+
});
|
|
38
|
+
}, children: "OK" })] })] }));
|
|
39
|
+
});
|
|
40
|
+
export const LegendDataCubeSourceLoaderBlockingWindow = observer(() => {
|
|
41
|
+
const store = useLegendDataCubeBuilderStore();
|
|
42
|
+
if (!store.sourceLoader) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return (_jsx(LegendDataCubeBlockingWindow, { windowState: store.sourceLoader.display }));
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=LegendDataCubeSourceLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendDataCubeSourceLoader.js","sourceRoot":"","sources":["../../../../src/components/builder/source/LegendDataCubeSourceLoader.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,0CAA0C,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,sEAAsE,CAAC;AAC1H,OAAO,EAAE,oCAAoC,EAAE,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,MAAM,CAAC,MAAM,0BAA0B,GAAG,QAAQ,CAChD,CAAC,KAAiD,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EACN,eAAK,SAAS,EAAC,yCAAyC,aACtD,KAAC,UAAU,IAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,uBAAqB,EAC/D,KAAC,UAAU,IACT,SAAS,EAAC,MAAM,EAChB,QAAQ,EAAE,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,aAAa,CAAC,YAAY,EAC5D,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gCAC/B,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;4BAChD,CAAC,CAAC,CAAC;wBACL,CAAC,mBAGU,IACT,IACL,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,QAAQ,CAAC,GAAG,EAAE;IACpE,MAAM,KAAK,GAAG,6BAA6B,EAAE,CAAC;IAE9C,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,KAAC,4BAA4B,IAAC,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,GAAI,CAC1E,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 { LocalFileDataCubeSourceLoaderState } from '../../../stores/builder/source/LocalFileDataCubeSourceLoaderState.js';
|
|
17
|
+
export declare const LocalFileDataCubePartialSourceLoader: ((props: {
|
|
18
|
+
partialSourceLoader: LocalFileDataCubeSourceLoaderState;
|
|
19
|
+
}) => import("react/jsx-runtime").JSX.Element) & {
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=LocalFileDataCubeSourceLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubeSourceLoader.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceLoader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,sEAAsE,CAAC;AAE/H,eAAO,MAAM,oCAAoC,WACvC;IAAE,mBAAmB,EAAE,kCAAkC,CAAA;CAAE;;CAmCpE,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=LocalFileDataCubeSourceLoader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocalFileDataCubeSourceLoader.js","sourceRoot":"","sources":["../../../../src/components/builder/source/LocalFileDataCubeSourceLoader.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,KAAkE,EAAE,EAAE;IACrE,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserDefinedFunctionDataCubeSourceBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/UserDefinedFunctionDataCubeSourceBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACxG,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAEL,6BAA6B,EAC7B,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,6CAA6C,EAAE,MAAM,iFAAiF,CAAC;AAErJ,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC;AACvE,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"UserDefinedFunctionDataCubeSourceBuilder.d.ts","sourceRoot":"","sources":["../../../../src/components/builder/source/UserDefinedFunctionDataCubeSourceBuilder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uDAAuD,CAAC;AACxG,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAEL,6BAA6B,EAC7B,qBAAqB,EAGtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,6CAA6C,EAAE,MAAM,iFAAiF,CAAC;AAErJ,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC;AACvE,eAAO,MAAM,kBAAkB,GAC7B,SAAS,gBAAgB,KACxB,aAGD,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7D,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,aAWpD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,6BAA6B,CAAC;CACtC,CAAC;AACF,eAAO,MAAM,mBAAmB,GAC9B,oBAAoB,6BAA6B,KAChD,cAGD,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AACF,eAAO,MAAM,kBAAkB,GAC7B,SAAS,qBAAqB,KAC7B,aAGD,CAAC;AAEH,eAAO,MAAM,wCAAwC,WAC3C;IACN,aAAa,EAAE,6CAA6C,CAAC;IAC7D,KAAK,EAAE,0BAA0B,CAAC;CACnC;;CAyRF,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.4
|
|
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.4",
|
|
4
4
|
"description": "Legend DataCube application core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"legend",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@finos/legend-storage": "workspace:*",
|
|
55
55
|
"@types/react": "19.0.10",
|
|
56
56
|
"@types/react-dom": "19.0.4",
|
|
57
|
-
"apache-arrow": "19.0.
|
|
57
|
+
"apache-arrow": "19.0.1",
|
|
58
58
|
"mobx": "6.13.6",
|
|
59
59
|
"mobx-react-lite": "4.1.0",
|
|
60
60
|
"react": "19.0.0",
|
|
@@ -64,13 +64,15 @@
|
|
|
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
|
-
"eslint": "9.
|
|
70
|
+
"eslint": "9.22.0",
|
|
69
71
|
"jest": "29.7.0",
|
|
70
72
|
"npm-run-all": "4.1.5",
|
|
71
73
|
"rimraf": "6.0.1",
|
|
72
|
-
"sass": "1.85.
|
|
73
|
-
"typescript": "5.
|
|
74
|
+
"sass": "1.85.1",
|
|
75
|
+
"typescript": "5.8.2"
|
|
74
76
|
},
|
|
75
77
|
"peerDependencies": {
|
|
76
78
|
"react": "^19.0.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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C,CACF,CAAC;YACF,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,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';
|
|
@@ -44,19 +44,22 @@ export declare class LegendDataCubeDataCubeEngine extends DataCubeEngine {
|
|
|
44
44
|
}[];
|
|
45
45
|
}>;
|
|
46
46
|
executeQuery(query: V1_Lambda, source: DataCubeSource, options?: DataCubeExecutionOptions | undefined): Promise<{
|
|
47
|
-
executedQuery: string;
|
|
48
|
-
executedSQL: string;
|
|
49
47
|
result: TDSExecutionResult;
|
|
48
|
+
executedQuery: string;
|
|
49
|
+
executedSQL: string | undefined;
|
|
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,EAMx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