@malloy-publisher/sdk 0.0.198-dev → 0.0.198-dev1
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/dist/{ServerProvider-DDScRRDc.es.js → ServerProvider-BuM1usxf.es.js} +181 -177
- package/dist/{ServerProvider-IhQ4aYBm.cjs.js → ServerProvider-C_Mnvmgc.cjs.js} +1 -1
- package/dist/client/api.d.ts +61 -4
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/Package/ContentTypeIcon.d.ts +16 -0
- package/dist/components/Package/index.d.ts +0 -1
- package/dist/components/styles.d.ts +16 -0
- package/dist/{core-w79IMXAG.es.js → core-DfcpQGVP.es.js} +1 -1
- package/dist/{core-7-3Jcsb0.cjs.js → core-yDgxkpo0.cjs.js} +1 -1
- package/dist/index-CMA8U4-B.cjs.js +228 -0
- package/dist/{index-CN0_kZSF.es.js → index-Y4ooZDYA.es.js} +17654 -20603
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +33 -34
- package/package.json +5 -5
- package/src/components/Environment/AddPackageDialog.tsx +116 -79
- package/src/components/Environment/DeletePackageDialog.tsx +3 -2
- package/src/components/Environment/Environment.tsx +44 -23
- package/src/components/Environment/Packages.tsx +164 -156
- package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -2
- package/src/components/Home/Home.tsx +272 -389
- package/src/components/Model/Model.tsx +2 -2
- package/src/components/Model/ModelCell.tsx +1 -1
- package/src/components/Model/ModelExplorerDialog.tsx +1 -1
- package/src/components/Model/SourcesExplorer.tsx +4 -4
- package/src/components/Notebook/Notebook.tsx +4 -9
- package/src/components/Notebook/NotebookCell.tsx +10 -7
- package/src/components/Package/ContentTypeIcon.tsx +79 -0
- package/src/components/Package/Package.tsx +387 -55
- package/src/components/Package/index.ts +0 -1
- package/src/components/QueryResult/QueryResult.tsx +1 -1
- package/src/components/RenderedResult/RenderedResult.tsx +9 -8
- package/src/components/ResultsDialog.tsx +1 -1
- package/src/components/styles.ts +28 -15
- package/dist/components/Package/Config.d.ts +0 -5
- package/dist/components/Package/Databases.d.ts +0 -5
- package/dist/components/Package/FileTreeView.d.ts +0 -9
- package/dist/components/Package/Models.d.ts +0 -6
- package/dist/components/Package/Notebooks.d.ts +0 -6
- package/dist/index-Xo_ADux9.cjs.js +0 -233
- package/src/components/Package/Config.tsx +0 -97
- package/src/components/Package/Databases.tsx +0 -228
- package/src/components/Package/FileTreeView.tsx +0 -241
- package/src/components/Package/Models.tsx +0 -68
- package/src/components/Package/Notebooks.tsx +0 -77
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Box, Typography } from "@mui/material";
|
|
2
|
-
import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
|
|
3
|
-
import { ApiErrorDisplay } from "../ApiErrorDisplay";
|
|
4
|
-
import { Loading } from "../Loading";
|
|
5
|
-
import {
|
|
6
|
-
PackageCard,
|
|
7
|
-
PackageCardContent,
|
|
8
|
-
PackageSectionTitle,
|
|
9
|
-
} from "../styles";
|
|
10
|
-
import { FileTreeView } from "./FileTreeView";
|
|
11
|
-
import { parseResourceUri } from "../../utils/formatting";
|
|
12
|
-
import { useServer } from "../ServerProvider";
|
|
13
|
-
|
|
14
|
-
const DEFAULT_EXPANDED_FOLDERS = ["notebooks/"];
|
|
15
|
-
|
|
16
|
-
interface NotebooksProps {
|
|
17
|
-
onClickNotebookFile: (to: string, event?: React.MouseEvent) => void;
|
|
18
|
-
resourceUri: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default function Notebooks({
|
|
22
|
-
onClickNotebookFile,
|
|
23
|
-
resourceUri,
|
|
24
|
-
}: NotebooksProps) {
|
|
25
|
-
const { apiClients } = useServer();
|
|
26
|
-
const {
|
|
27
|
-
environmentName: environmentName,
|
|
28
|
-
packageName: packageName,
|
|
29
|
-
versionId: versionId,
|
|
30
|
-
} = parseResourceUri(resourceUri);
|
|
31
|
-
|
|
32
|
-
const { data, isError, error, isSuccess } = useQueryWithApiError({
|
|
33
|
-
queryKey: ["notebooks", environmentName, packageName, versionId],
|
|
34
|
-
queryFn: () =>
|
|
35
|
-
apiClients.notebooks.listNotebooks(
|
|
36
|
-
environmentName,
|
|
37
|
-
packageName,
|
|
38
|
-
versionId,
|
|
39
|
-
),
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<PackageCard>
|
|
44
|
-
<PackageCardContent>
|
|
45
|
-
<PackageSectionTitle>Notebooks</PackageSectionTitle>
|
|
46
|
-
<Box
|
|
47
|
-
sx={{
|
|
48
|
-
maxHeight: "200px",
|
|
49
|
-
overflowY: "auto",
|
|
50
|
-
}}
|
|
51
|
-
>
|
|
52
|
-
{!isSuccess && !isError && (
|
|
53
|
-
<Loading text="Fetching Notebooks..." />
|
|
54
|
-
)}
|
|
55
|
-
{isError && (
|
|
56
|
-
<ApiErrorDisplay
|
|
57
|
-
error={error}
|
|
58
|
-
context={`${environmentName} > ${packageName} > Notebooks`}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
{isSuccess && data.data.length > 0 && (
|
|
62
|
-
<FileTreeView
|
|
63
|
-
items={data.data.sort((a, b) => {
|
|
64
|
-
return a.path.localeCompare(b.path);
|
|
65
|
-
})}
|
|
66
|
-
defaultExpandedItems={DEFAULT_EXPANDED_FOLDERS}
|
|
67
|
-
onClickTreeNode={onClickNotebookFile}
|
|
68
|
-
/>
|
|
69
|
-
)}
|
|
70
|
-
{isSuccess && data.data.length === 0 && (
|
|
71
|
-
<Typography variant="body2">No notebooks found</Typography>
|
|
72
|
-
)}
|
|
73
|
-
</Box>
|
|
74
|
-
</PackageCardContent>
|
|
75
|
-
</PackageCard>
|
|
76
|
-
);
|
|
77
|
-
}
|