@malloy-publisher/sdk 0.0.30 → 0.0.32
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/RenderedResult-B9Gth8IY.cjs +1 -0
- package/dist/RenderedResult-Drg_uJPZ.js +30 -0
- package/dist/client/api.d.ts +6 -0
- package/dist/components/Home/Home.d.ts +1 -1
- package/dist/components/Model/NamedQueries.d.ts +7 -0
- package/dist/components/Package/Connections.d.ts +1 -1
- package/dist/components/Package/FileTreeView.d.ts +2 -1
- package/dist/components/Package/Models.d.ts +1 -1
- package/dist/components/Package/Notebooks.d.ts +1 -1
- package/dist/components/Package/Package.d.ts +1 -1
- package/dist/components/Project/Packages.d.ts +1 -1
- package/dist/components/Project/Project.d.ts +1 -1
- package/dist/components/RenderedResult/RenderedResult.d.ts +2 -1
- package/dist/components/RenderedResult/ResultContainer.d.ts +7 -0
- package/dist/components/click_helper.d.ts +8 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/styles.d.ts +2 -2
- package/dist/index.cjs.js +463 -463
- package/dist/index.es.js +12221 -12111
- package/dist/vendor-BH1c2Hhy.cjs +443 -0
- package/dist/{vendor-C36FjD0v.js → vendor-DfRellEl.js} +27439 -24442
- package/package.json +8 -8
- package/src/components/Home/Home.tsx +4 -2
- package/src/components/Model/Model.tsx +35 -30
- package/src/components/Model/NamedQueries.tsx +156 -0
- package/src/components/Model/SourcesExplorer.tsx +14 -14
- package/src/components/MutableNotebook/MutableCell.tsx +3 -1
- package/src/components/MutableNotebook/MutableNotebook.tsx +5 -5
- package/src/components/Notebook/Notebook.tsx +24 -20
- package/src/components/Notebook/NotebookCell.tsx +33 -41
- package/src/components/Package/Connections.tsx +1 -1
- package/src/components/Package/FileTreeView.tsx +6 -6
- package/src/components/Package/Models.tsx +1 -1
- package/src/components/Package/Notebooks.tsx +1 -1
- package/src/components/Package/Package.tsx +2 -1
- package/src/components/Project/Packages.tsx +4 -8
- package/src/components/Project/Project.tsx +1 -1
- package/src/components/RenderedResult/RenderedResult.tsx +42 -2
- package/src/components/RenderedResult/ResultContainer.tsx +161 -0
- package/src/components/click_helper.ts +37 -0
- package/src/components/index.ts +1 -0
- package/src/components/styles.ts +2 -2
- package/vite.config.ts +0 -1
- package/dist/RenderedResult-C1_N6KvU.js +0 -12
- package/dist/RenderedResult-Df-v_vru.cjs +0 -1
- package/dist/vendor-DSpmIox9.cjs +0 -360
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./vendor-BH1c2Hhy.cjs");require("./index.cjs.js");const s=require("react");function l({result:t,onSizeChange:r}){const e=s.useRef(null);return s.useEffect(()=>{e.current&&(e.current.malloyResult=JSON.parse(t))},[t]),s.useEffect(()=>{if(!e.current||!r)return;const u=e.current,n=()=>{if(u){const c=u.offsetHeight;c>0&&r(c)}},i=setTimeout(n,100),o=new MutationObserver(n);return o.observe(u,{childList:!0,subtree:!0,attributes:!0}),()=>{clearTimeout(i),o.disconnect()}},[r,t]),f.jsxRuntimeExports.jsx("malloy-render",{ref:e})}exports.default=l;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { j as f } from "./vendor-DfRellEl.js";
|
|
2
|
+
import "./index.es.js";
|
|
3
|
+
import { useRef as m, useEffect as i } from "react";
|
|
4
|
+
function p({
|
|
5
|
+
result: t,
|
|
6
|
+
onSizeChange: r
|
|
7
|
+
}) {
|
|
8
|
+
const e = m(null);
|
|
9
|
+
return i(() => {
|
|
10
|
+
e.current && (e.current.malloyResult = JSON.parse(t));
|
|
11
|
+
}, [t]), i(() => {
|
|
12
|
+
if (!e.current || !r) return;
|
|
13
|
+
const s = e.current, u = () => {
|
|
14
|
+
if (s) {
|
|
15
|
+
const n = s.offsetHeight;
|
|
16
|
+
n > 0 && r(n);
|
|
17
|
+
}
|
|
18
|
+
}, c = setTimeout(u, 100), o = new MutationObserver(u);
|
|
19
|
+
return o.observe(s, {
|
|
20
|
+
childList: !0,
|
|
21
|
+
subtree: !0,
|
|
22
|
+
attributes: !0
|
|
23
|
+
}), () => {
|
|
24
|
+
clearTimeout(c), o.disconnect();
|
|
25
|
+
};
|
|
26
|
+
}, [r, t]), /* @__PURE__ */ f.jsx("malloy-render", { ref: e });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
p as default
|
|
30
|
+
};
|
package/dist/client/api.d.ts
CHANGED
|
@@ -501,6 +501,12 @@ export interface Query {
|
|
|
501
501
|
* @memberof Query
|
|
502
502
|
*/
|
|
503
503
|
'name'?: string;
|
|
504
|
+
/**
|
|
505
|
+
* Source name.
|
|
506
|
+
* @type {string}
|
|
507
|
+
* @memberof Query
|
|
508
|
+
*/
|
|
509
|
+
'sourceName'?: string;
|
|
504
510
|
/**
|
|
505
511
|
* Annotations attached to query.
|
|
506
512
|
* @type {Array<string>}
|
|
@@ -2,7 +2,7 @@ interface ConnectionsProps {
|
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
4
|
accessToken: string;
|
|
5
|
-
navigate: (to: string) => void;
|
|
5
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
6
6
|
}
|
|
7
7
|
export default function Connections(connectionProps: ConnectionsProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Database, Model } from '../../client';
|
|
2
|
+
import * as React from "react";
|
|
2
3
|
interface FiieTreeViewProps {
|
|
3
4
|
items: Model[] | Database[];
|
|
4
5
|
defaultExpandedItems: string[];
|
|
5
|
-
navigate?: (to: string) => void;
|
|
6
|
+
navigate?: (to: string, event?: React.MouseEvent) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare function FileTreeView({ items, defaultExpandedItems, navigate, }: FiieTreeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -3,7 +3,7 @@ interface ModelsProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate: (to: string) => void;
|
|
6
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Models({ server, projectName, packageName, versionId, navigate, accessToken, }: ModelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ interface ModelsProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate: (to: string) => void;
|
|
6
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Notebooks({ server, projectName, packageName, versionId, navigate, accessToken, }: ModelsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,7 +3,7 @@ interface PackageProps {
|
|
|
3
3
|
projectName: string;
|
|
4
4
|
packageName: string;
|
|
5
5
|
versionId?: string;
|
|
6
|
-
navigate?: (to: string) => void;
|
|
6
|
+
navigate?: (to: string, event?: React.MouseEvent) => void;
|
|
7
7
|
accessToken?: string;
|
|
8
8
|
}
|
|
9
9
|
export default function Package({ server, projectName, packageName, versionId, navigate, accessToken, }: PackageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ProjectProps {
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
|
-
navigate
|
|
4
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
5
5
|
accessToken?: string;
|
|
6
6
|
}
|
|
7
7
|
export default function Project({ server, projectName, navigate, accessToken, }: ProjectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ProjectProps {
|
|
2
2
|
server?: string;
|
|
3
3
|
projectName: string;
|
|
4
|
-
navigate
|
|
4
|
+
navigate: (to: string, event?: React.MouseEvent) => void;
|
|
5
5
|
accessToken?: string;
|
|
6
6
|
}
|
|
7
7
|
export default function Project({ server, projectName, navigate, accessToken, }: ProjectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,7 @@ declare global {
|
|
|
10
10
|
}
|
|
11
11
|
interface RenderedResultProps {
|
|
12
12
|
result: string;
|
|
13
|
+
onSizeChange?: (height: number) => void;
|
|
13
14
|
}
|
|
14
|
-
export default function RenderedResult({ result }: RenderedResultProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default function RenderedResult({ result, onSizeChange, }: RenderedResultProps): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook that returns a function for handling clicks with proper modifier key support.
|
|
4
|
+
* The returned function handles CMD/Ctrl clicks to open in new tabs, regular clicks for navigation.
|
|
5
|
+
*
|
|
6
|
+
* @returns A function that takes a relative URL and either navigates or opens in new tab
|
|
7
|
+
*/
|
|
8
|
+
export declare function useRouterClickHandler(): (to: string, event?: MouseEvent) => void;
|
|
@@ -3,9 +3,9 @@ import { CardOwnProps, Theme, CardContentOwnProps, CardMediaOwnProps } from '@mu
|
|
|
3
3
|
import { CommonProps } from '@mui/material/OverridableComponent';
|
|
4
4
|
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
5
5
|
import { MUIStyledCommonProps } from '@mui/system';
|
|
6
|
-
export declare const StyledCard: StyledComponent< CardOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "
|
|
6
|
+
export declare const StyledCard: StyledComponent< CardOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "elevation" | "square" | "sx" | "variant" | "raised"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
7
7
|
export declare const StyledCardContent: StyledComponent< CardContentOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
8
|
-
export declare const StyledCardMedia: StyledComponent< CardMediaOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "
|
|
8
|
+
export declare const StyledCardMedia: StyledComponent< CardMediaOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "image" | "children" | "sx" | "src"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
9
9
|
export declare const StyledExplorerPage: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
10
|
export declare const StyledExplorerBanner: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
11
|
export declare const StyledExplorerContent: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|