@malloy-publisher/app 0.0.84 → 0.0.85
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/index.cjs.js +1 -1
- package/dist/index.es.js +45 -42
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -53,7 +53,7 @@ export default theme;`}function Su(e={},...t){const{breakpoints:n,mixins:r={},sp
|
|
|
53
53
|
`;function s_({cell:e,notebookPath:t,expandCodeCell:n,hideCodeCellIcon:r,expandEmbedding:o,hideEmbeddingIcon:i}){const[a,s]=O.useState(n),[l,c]=O.useState(o),[d,u]=O.useState(),[f,p]=O.useState(),[g,b]=O.useState(!1),{packageName:T,projectName:E}=mn(),v=my({modelPath:t,query:e.text,optionalPackageName:T,optionalProjectName:E});return O.useEffect(()=>{e.type==="code"&&Co(e.text,"malloy").then(C=>{u(C)})},[e]),O.useEffect(()=>{Co(v,"typescript").then(C=>{p(C)})},[v]),e.type==="markdown"&&h.jsx($t,{variant:"outlined",children:h.jsx(Nn,{children:h.jsx(Ed,{children:e.text})})})||e.type==="code"&&h.jsxs($t,{variant:"outlined",sx:{height:"auto"},children:[(!r||!i&&e.result)&&h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between",ml:"8px"},children:[h.jsxs(x.Stack,{sx:{flexDirection:"row"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Typography,{variant:"overline",children:h.jsx("b",{children:"Data source"})}),e.result&&h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Results"})]}),h.jsx(x.Stack,{sx:{flexDirection:"row"},children:h.jsxs(x.CardActions,{sx:{padding:"0px 8px 0px 8px",mb:"auto",mt:"auto"},children:[e.newSources&&e.newSources.length>0&&h.jsx(x.Tooltip,{title:"Explore Data Sources",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{b(!g),c(!1),s(!1)},children:h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 3h18v18H3V3zm2 2v14h14V5H5zm2 2h10v2H7V7zm0 4h10v2H7v-2zm0 4h10v2H7v-2z",fill:"currentColor"})})})}),!r&&h.jsx(x.Tooltip,{title:a?"Hide Code":"View Code",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{s(!a)},children:h.jsx(gy,{})})}),!i&&e.result&&h.jsx(x.Tooltip,{title:l?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{c(!l)},children:h.jsx(Va,{})})})]})})]}),h.jsx(x.Collapse,{in:l,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{p:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{component:"div",sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},dangerouslySetInnerHTML:{__html:f}}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(v)},children:h.jsx(zl,{})})})]})}),h.jsxs(x.Collapse,{in:a,timeout:"auto",unmountOnExit:!0,children:[h.jsx("style",{children:a_}),h.jsx(x.Stack,{sx:{mx:"8px",borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:h.jsx("div",{className:"code-display",style:{fontSize:"12px",width:"800px",border:"1px solid rgb(220,220,220)"},dangerouslySetInnerHTML:{__html:d}})})]}),h.jsx(x.Collapse,{in:g,timeout:"auto",unmountOnExit:!0,sx:{p:"5px"},children:h.jsx(Ky,{sourceAndPaths:e.newSources.map(C=>({sourceInfo:JSON.parse(C),modelPath:t}))})}),e.result&&!g&&h.jsx(h.Fragment,{children:h.jsx(yy,{result:e.result,minHeight:300,maxHeight:700})})]})}const l_=new uy(new Jt);function by({notebookPath:e,expandResults:t,hideResultIcons:n,expandEmbeddings:r,hideEmbeddingIcons:o}){const[i,a]=O.useState(!1),[s,l]=O.useState(),{projectName:c,packageName:d,versionId:u}=mn(),f=c_(e,!0);O.useEffect(()=>{Co(f,"typescript").then(E=>{l(E)})},[i,f]);const{data:p,isSuccess:g,isError:b,error:T}=ln({queryKey:["notebook",c,d,e,u],queryFn:async E=>(await l_.getNotebook(c,d,e,u,E)).data});return h.jsxs($t,{variant:"outlined",children:[h.jsxs(Nn,{children:[h.jsxs(x.Stack,{sx:{flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Notebook"}),!o&&h.jsx(x.CardActions,{sx:{padding:"0px 10px 0px 10px",mb:"auto",mt:"auto"},children:h.jsx(x.Tooltip,{title:i?"Hide Embedding":"View Embedding",children:h.jsx(x.IconButton,{size:"small",onClick:()=>{a(!i)},children:h.jsx(Va,{})})})})]}),h.jsx(x.Collapse,{in:i,timeout:"auto",unmountOnExit:!0,children:h.jsxs(x.Stack,{sx:{borderRadius:0,flexDirection:"row",justifyContent:"space-between"},children:[h.jsx(x.Typography,{sx:{fontSize:"12px","& .line":{textWrap:"wrap"}},children:h.jsx("div",{dangerouslySetInnerHTML:{__html:s}})}),h.jsx(x.Tooltip,{title:"Copy Embeddable Code",children:h.jsx(x.IconButton,{sx:{width:"24px",height:"24px"},onClick:()=>{navigator.clipboard.writeText(f)},children:h.jsx(zl,{})})})]})})]}),h.jsx(Zd,{children:h.jsxs(x.Stack,{spacing:2,component:"section",children:[!g&&!b&&h.jsx(sn,{text:"Fetching Notebook..."}),g&&p.notebookCells?.map((E,v)=>h.jsx(s_,{cell:E,notebookPath:e,expandCodeCell:t,hideCodeCellIcon:n,expandEmbedding:r,hideEmbeddingIcon:o},v)),b&&T.status===404&&h.jsxs(x.Typography,{variant:"body2",children:[h.jsx("code",{children:`${c} > ${d} > ${e}`})," ","not found."]}),b&&T.status!==404&&h.jsx(Zt,{error:T,context:`${c} > ${d} > ${e}`})]})})]})}function c_(e,t){return`<Notebook
|
|
54
54
|
notebookPath="${e}"
|
|
55
55
|
expandCodeCells={${t}}
|
|
56
|
-
/>`}const Ey=at(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),u_=new dy(new Jt);function d_(){const{projectName:e,packageName:t,versionId:n}=mn(),{data:r,isSuccess:o,isError:i,error:a}=ln({queryKey:["package",e,t,n],queryFn:s=>u_.getPackage(e,t,n,!1,s)});return h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:h.jsxs(x.List,{dense:!0,disablePadding:!0,children:[h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!o&&!i&&h.jsx(x.ListItem,{children:h.jsx(sn,{text:"Fetching Package Metadata..."})}),o&&(r.data&&h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||h.jsxs(x.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[h.jsx(Ey,{sx:{color:"grey.600",mr:"10px"}}),h.jsx(x.ListItemText,{primary:"No package manifest"})]})),i&&h.jsx(Zt,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const h_=at(h.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),p_=new hy(new Jt);function f_(){const{projectName:e}=Ja(),{data:t,isSuccess:n,isError:r,error:o}=ln({queryKey:["about",e],queryFn:i=>p_.getProject(e,!1,i)});return h.jsxs(h.Fragment,{children:[!n&&!r&&h.jsx(sn,{text:"Fetching About..."}),n&&h.jsxs($t,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),h.jsx($t,{sx:{p:1},children:h.jsx(Ed,{children:t.data.readme})})]}),r&&h.jsx(Zt,{error:o,context:`${e} > About`})]})}const m_=new dy(new Jt);function g_({navigate:e}){const{projectName:t}=Ja(),{data:n,isSuccess:r,isError:o,error:i}=ln({queryKey:["packages",t],queryFn:a=>m_.listPackages(t,a)});return h.jsxs(h.Fragment,{children:[!r&&!o&&h.jsx(sn,{text:"Fetching Packages..."}),r&&h.jsxs($t,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),h.jsx(x.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,s)=>a.name.localeCompare(s.name)).map(a=>h.jsx(x.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:h.jsx($t,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:s=>e(a.name+"/",s),children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",color:"primary.main",children:a.name}),h.jsx(x.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:h.jsx(x.Typography,{variant:"body2",children:a.description})})]})})},a.name))})]}),o&&h.jsx(Zt,{error:i,context:`${t} > Packages`})]})}const Ty=O.createContext(void 0);function Ja(){const e=O.useContext(Ty);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function xy({children:e,projectName:t}){return h.jsx(Ty.Provider,{value:{projectName:t},children:e})}function y_({navigate:e}){return h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(g_,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(f_,{})})]})}const th=new cy(new Jt);function b_({connectionName:e}){const{projectName:t}=Ja(),[n,r]=O.useState(void 0),[o,i]=O.useState(null),[a,s]=O.useState(!1),{data:l,isSuccess:c,isError:d,error:u,isLoading:f}=ln({queryKey:["tablePath",t,e],queryFn:p=>th.listSchemas(t,e,p)});return h.jsxs(x.Grid,{container:!0,spacing:2,children:[h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsxs(x.Paper,{sx:{p:2},children:[h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),h.jsx(x.FormControlLabel,{control:h.jsx(x.Switch,{checked:a,onChange:p=>s(p.target.checked)}),label:"Hidden Schemas"})]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[f&&h.jsx(sn,{text:"Fetching Table Paths..."}),d&&h.jsx(Zt,{error:u,context:`${t} > ${e}`}),c&&l.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Schemas"}),c&&l.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:l.data.filter(({isHidden:p})=>a||!p).sort((p,g)=>p.isDefault===g.isDefault?0:p.isDefault?-1:1).map(p=>h.jsx(x.ListItemButton,{selected:o===p.name,onClick:()=>i(p.name),children:h.jsx(x.ListItemText,{primary:p.name})},p.name))})]})]})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:o&&h.jsx(x.Paper,{sx:{p:2},children:h.jsx(T_,{connectionName:e,schemaName:o,onTableClick:p=>{r(p)}})})}),n&&h.jsx(E_,{connectionName:e,schemaName:o,tableName:n,onClose:()=>r(void 0)})]})}function E_({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:o}=Ja(),{data:i,isSuccess:a,isError:s,error:l,isLoading:c}=ln({queryKey:["tablePathSchema",o,e,t,n],queryFn:d=>th.getTablesource(o,e,n,`${t}.${n}`,d)});return a&&i&&console.log(i),h.jsxs(x.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:[h.jsxs(x.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",style:{textTransform:"uppercase"},children:[t,".",n]}),h.jsx(x.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsxs(x.DialogContent,{children:[c&&h.jsx(sn,{text:"Fetching Table Details..."}),s&&h.jsx(Zt,{error:l,context:`${o} > ${e} > ${t}.${n}`}),a&&i&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"NAME"}),h.jsx(x.TableCell,{children:"TYPE"})]})}),h.jsx(x.TableBody,{children:i.data.columns?.map(d=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:d.name}),h.jsx(x.TableCell,{children:d.type})]},d.name))})]})})]})]})}function T_({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=Ja(),{data:o,isSuccess:i,isError:a,error:s,isLoading:l}=ln({queryKey:["tablesInSchema",r,e,t],queryFn:c=>th.listTables(r,e,t,c)});return h.jsxs(h.Fragment,{children:[h.jsxs(x.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[l&&h.jsx(sn,{text:"Fetching Tables..."}),a&&h.jsx(Zt,{error:s,context:`${r} > ${e} > ${t}`}),i&&o.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Tables"}),i&&o.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:o.data.map(c=>h.jsx(x.ListItemButton,{onClick:()=>n(c),children:h.jsx(x.ListItemText,{primary:c})},c))})]})]})}const x_=new cy(new Jt);function C_({connection:e,onClick:t}){return h.jsxs(x.TableRow,{onClick:t,sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[h.jsx(x.TableCell,{children:h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(x.Typography,{variant:"body2",children:e.name}),h.jsx(h_,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"body2",children:e.type})})]},e.name)}function v_(){const{projectName:e}=mn(),[t,n]=O.useState(null),{data:r,isSuccess:o,isError:i,error:a}=ln({queryKey:["connections",e],queryFn:c=>x_.listConnections(e,c)}),s=c=>{n(c)},l=()=>{n(null)};return h.jsxs(xy,{projectName:e,children:[h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!i&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),o&&r.data.length>0&&h.jsx(x.Table,{size:"small",children:h.jsxs(x.TableBody,{children:[h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),r.data.map(c=>h.jsx(C_,{connection:c,onClick:()=>s(c.name)},c.name))]})}),o&&r.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Connections"}),i&&h.jsx(Zt,{error:a,context:`${e} > Connections`})]})]})}),h.jsxs(x.Dialog,{open:t!==null,onClose:l,maxWidth:"lg",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:["Connection Explorer: ",t,h.jsx(x.IconButton,{"aria-label":"close",onClick:l,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsx(x.DialogContent,{children:t&&h.jsx(b_,{connectionName:t})})]})]})}const S_=new q2(new Jt);function A_(){const{projectName:e,packageName:t,versionId:n}=mn(),[r,o]=O.useState(!1),[i,a]=O.useState(null),s=g=>{a(g),o(!0)},l=()=>{o(!1),a(null)},{data:c,isError:d,error:u,isSuccess:f}=ln({queryKey:["databases",e,t,n],queryFn:g=>S_.listDatabases(e,t,n,g)}),p=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return h.jsxs(h.Fragment,{children:[h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!f&&!d&&h.jsx(sn,{text:"Fetching Databases..."}),d&&h.jsx(Zt,{error:u,context:`${e} > ${t} > Databases`}),f&&c.data.length>0&&h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Name"}),h.jsx(x.TableCell,{align:"right",children:"Rows"})]})}),h.jsx(x.TableBody,{children:c.data.map(g=>h.jsxs(x.TableRow,{onClick:()=>s(g),sx:{cursor:"pointer"},children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.path}),h.jsx(x.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),f&&c.data.length===0&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),h.jsxs(x.Dialog,{open:r,onClose:l,maxWidth:"sm",fullWidth:!0,children:[h.jsx(x.DialogTitle,{children:i?.path}),h.jsx(x.DialogContent,{children:i?.info?.columns&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Column"}),h.jsx(x.TableCell,{children:"Type"})]})}),h.jsx(x.TableBody,{children:i.info.columns.map(g=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.name}),h.jsx(x.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Dr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(null,arguments)}function k_(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:tl(t.components[n].defaultProps,r)}const __=jd();function D_(e=__){return Rv(e)}function I_({props:e,name:t,defaultTheme:n,themeId:r}){let o=D_(n);return o=o[r]||o,k_({theme:o,name:t,props:e})}function w_({props:e,name:t}){return I_({props:e,name:t,defaultTheme:Hd,themeId:Ud})}function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(null,arguments)}function Cy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bu(e,t){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Bu(e,t)}function vy(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bu(e,t)}const Tf={disabled:!1},fl=O.createContext(null);var N_=function(e){return e.scrollTop},ia="unmounted",ao="exited",so="entering",ti="entered",ju="exiting",Lr=function(e){vy(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=ao,i.appearStatus=so):l=ti:r.unmountOnExit||r.mountOnEnter?l=ia:l=ao,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,o){var i=r.in;return i&&o.status===ia?{status:ao}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==so&&i!==ti&&(o=so):(i===so||i===ti)&&(o=ju)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,i,a;return o=i=a=r,r!=null&&typeof r!="number"&&(o=r.exit,i=r.enter,a=r.appear!==void 0?r.appear:i),{exit:o,enter:i,appear:a}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===so){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Ji.findDOMNode(this);i&&N_(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ao&&this.setState({status:ia})},n.performEnter=function(r){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:r,s=this.props.nodeRef?[a]:[Ji.findDOMNode(this),a],l=s[0],c=s[1],d=this.getTimeouts(),u=a?d.appear:d.enter;if(!r&&!i||Tf.disabled){this.safeSetState({status:ti},function(){o.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:so},function(){o.props.onEntering(l,c),o.onTransitionEnd(u,function(){o.safeSetState({status:ti},function(){o.props.onEntered(l,c)})})})},n.performExit=function(){var r=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Ji.findDOMNode(this);if(!o||Tf.disabled){this.safeSetState({status:ao},function(){r.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ju},function(){r.props.onExiting(a),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:ao},function(){r.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,r(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Ji.findDOMNode(this),a=r==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ia)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Cy(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return O.createElement(fl.Provider,{value:null},typeof i=="function"?i(r,a):O.cloneElement(O.Children.only(i),a))},t}(O.Component);Lr.contextType=fl;Lr.propTypes={};function Go(){}Lr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go};Lr.UNMOUNTED=ia;Lr.EXITED=ao;Lr.ENTERING=so;Lr.ENTERED=ti;Lr.EXITING=ju;function P_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nh(e,t){var n=function(o){return t&&O.isValidElement(o)?t(o):o},r=Object.create(null);return e&&O.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function R_(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function po(e,t,n){return n[t]!=null?n[t]:e.props[t]}function L_(e,t){return nh(e.children,function(n){return O.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:po(n,"appear",e),enter:po(n,"enter",e),exit:po(n,"exit",e)})})}function O_(e,t,n){var r=nh(e.children),o=R_(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(O.isValidElement(a)){var s=i in t,l=i in r,c=t[i],d=O.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:po(a,"exit",e),enter:po(a,"enter",e)}):!l&&s&&!d?o[i]=O.cloneElement(a,{in:!1}):l&&s&&O.isValidElement(c)&&(o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:po(a,"exit",e),enter:po(a,"enter",e)}))}}),o}var M_=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},F_={component:"div",childFactory:function(e){return e}},rh=function(e){vy(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(P_(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,o){var i=o.children,a=o.handleExited,s=o.firstRender;return{children:s?L_(r,a):O_(r,i,a),firstRender:!1}},n.handleExited=function(r,o){var i=nh(this.props.children);r.key in i||(r.props.onExited&&r.props.onExited(o),this.mounted&&this.setState(function(a){var s=Fu({},a.children);return delete s[r.key],{children:s}}))},n.render=function(){var r=this.props,o=r.component,i=r.childFactory,a=Cy(r,["component","childFactory"]),s=this.state.contextValue,l=M_(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,o===null?O.createElement(fl.Provider,{value:s},l):O.createElement(fl.Provider,{value:s},O.createElement(o,a,l))},t}(O.Component);rh.propTypes={};rh.defaultProps=F_;const xf={};function Sy(e,t){const n=_.useRef(xf);return n.current===xf&&(n.current=e(t)),n}const B_=[];function j_(e){_.useEffect(e,B_)}class oh{constructor(){q(this,"currentId",null);q(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});q(this,"disposeEffect",()=>this.clear)}static create(){return new oh}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ay(){const e=Sy(oh.create).current;return j_(e.disposeEffect),e}function Cf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function H_(e){return Ei("MuiCollapse",e)}xi("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const U_=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ga(r,H_,n)},z_=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})($d(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),$_=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),G_=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),La=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiCollapse"}),{addEndListener:r,children:o,className:i,collapsedSize:a="0px",component:s,easing:l,in:c,onEnter:d,onEntered:u,onEntering:f,onExit:p,onExited:g,onExiting:b,orientation:T="vertical",style:E,timeout:v=m0.standard,TransitionComponent:C=Lr,...k}=n,I={...n,orientation:T,collapsedSize:a},S=U_(I),B=ES(),z=Ay(),H=_.useRef(null),y=_.useRef(),R=typeof a=="number"?`${a}px`:a,F=T==="horizontal",M=F?"width":"height",$=_.useRef(null),Z=nl(t,$),ne=V=>de=>{if(V){const ue=$.current;de===void 0?V(ue):V(ue,de)}},me=()=>H.current?H.current[F?"clientWidth":"clientHeight"]:0,se=ne((V,de)=>{H.current&&F&&(H.current.style.position="absolute"),V.style[M]=R,d&&d(V,de)}),J=ne((V,de)=>{const ue=me();H.current&&F&&(H.current.style.position="");const{duration:ge,easing:he}=Cf({style:E,timeout:v,easing:l},{mode:"enter"});if(v==="auto"){const Fe=B.transitions.getAutoHeightDuration(ue);V.style.transitionDuration=`${Fe}ms`,y.current=Fe}else V.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;V.style[M]=`${ue}px`,V.style.transitionTimingFunction=he,f&&f(V,de)}),w=ne((V,de)=>{V.style[M]="auto",u&&u(V,de)}),be=ne(V=>{V.style[M]=`${me()}px`,p&&p(V)}),X=ne(g),A=ne(V=>{const de=me(),{duration:ue,easing:ge}=Cf({style:E,timeout:v,easing:l},{mode:"exit"});if(v==="auto"){const he=B.transitions.getAutoHeightDuration(de);V.style.transitionDuration=`${he}ms`,y.current=he}else V.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;V.style[M]=R,V.style.transitionTimingFunction=ge,b&&b(V)});return h.jsx(C,{in:c,onEnter:se,onEntered:w,onEntering:J,onExit:be,onExited:X,onExiting:A,addEndListener:V=>{v==="auto"&&z.start(y.current||0,V),r&&r($.current,V)},nodeRef:$,timeout:v==="auto"?null:v,...k,children:(V,{ownerState:de,...ue})=>h.jsx(z_,{as:s,className:kt(S.root,i,{entered:S.entered,exited:!c&&R==="0px"&&S.hidden}[V]),style:{[F?"minWidth":"minHeight"]:R,...E},ref:Z,ownerState:{...I,state:V},...ue,children:h.jsx($_,{ownerState:{...I,state:V},className:S.wrapper,ref:H,children:h.jsx(G_,{ownerState:{...I,state:V},className:S.wrapperInner,children:o})})})})});La&&(La.muiSupportAuto=!0);const q_=_.createContext(void 0);function W_(){return _.useContext(q_)}function vf(e){try{return e.matches(":focus-visible")}catch{}return!1}class ml{constructor(){q(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ml}static use(){const t=Sy(ml.create).current,[n,r]=_.useState(!1);return t.shouldMount=n,t.setShouldMount=r,_.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Y_(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function V_(){return ml.use()}function Y_(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function K_(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=_.useState(!1),f=kt(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=kt(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&u(!0),_.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,c);return()=>{clearTimeout(b)}}},[l,s,c]),h.jsx("span",{className:f,style:p,children:h.jsx("span",{className:g})})}const Fn=xi("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hu=550,Q_=80,X_=Ge.keyframes`
|
|
56
|
+
/>`}const Ey=at(h.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),u_=new dy(new Jt);function d_(){const{projectName:e,packageName:t,versionId:n}=mn(),{data:r,isSuccess:o,isError:i,error:a}=ln({queryKey:["package",e,t,n],queryFn:s=>u_.getPackage(e,t,n,!1,s)});return h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Package Config"}),h.jsx(x.Divider,{}),h.jsx(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:h.jsxs(x.List,{dense:!0,disablePadding:!0,children:[h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Name",primaryTypographyProps:{fontWeight:"500"},secondary:t})}),!o&&!i&&h.jsx(x.ListItem,{children:h.jsx(sn,{text:"Fetching Package Metadata..."})}),o&&(r.data&&h.jsx(x.ListItem,{dense:!0,disablePadding:!0,children:h.jsx(x.ListItemText,{primary:"Description",primaryTypographyProps:{fontWeight:"500"},secondary:r.data.description})})||h.jsxs(x.ListItem,{disablePadding:!0,dense:!0,sx:{mt:"20px"},children:[h.jsx(Ey,{sx:{color:"grey.600",mr:"10px"}}),h.jsx(x.ListItemText,{primary:"No package manifest"})]})),i&&h.jsx(Zt,{error:a,context:`${e} > ${t} > ${n}`})]})})]})})}const h_=at(h.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"})),p_=new hy(new Jt);function f_(){const{projectName:e}=Ja(),{data:t,isSuccess:n,isError:r,error:o}=ln({queryKey:["about",e],queryFn:i=>p_.getProject(e,!1,i)});return h.jsxs(h.Fragment,{children:[!n&&!r&&h.jsx(sn,{text:"Fetching About..."}),n&&t.data?.readme&&h.jsxs($t,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Readme"}),h.jsx($t,{sx:{p:1},children:h.jsx(Ed,{children:t.data.readme})})]}),r&&h.jsx(Zt,{error:o,context:`${e} > About`})]})}const m_=new dy(new Jt);function g_({navigate:e}){const{projectName:t}=Ja(),{data:n,isSuccess:r,isError:o,error:i}=ln({queryKey:["packages",t],queryFn:a=>m_.listPackages(t,a)});return h.jsxs(h.Fragment,{children:[!r&&!o&&h.jsx(sn,{text:"Fetching Packages..."}),r&&h.jsxs($t,{variant:"outlined",sx:{p:2},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",sx:{mb:1},children:"Packages"}),h.jsx(x.Grid,{container:!0,spacing:2,columns:12,children:n.data.sort((a,s)=>a.name.localeCompare(s.name)).map(a=>{const s=a.resource.replace("/api/v0/projects","").replace("/packages","");return h.jsx(x.Grid,{size:{xs:12,sm:12,md:12,lg:4},children:h.jsx($t,{variant:"outlined",sx:{cursor:"pointer",transition:"all 0.2s ease-in-out","&:hover":{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",transform:"translateY(-2px)"}},onClick:l=>e(s,l),children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",color:"primary.main",children:a.name}),h.jsx(x.Box,{sx:{maxHeight:"120px",overflowY:"auto"},children:h.jsx(x.Typography,{variant:"body2",children:a.description})})]})})},a.name)})})]}),o&&h.jsx(Zt,{error:i,context:`${t} > Packages`})]})}const Ty=O.createContext(void 0);function Ja(){const e=O.useContext(Ty);if(!e)throw new Error("useProject must be used within a ProjectProvider");return e}function xy({children:e,projectName:t}){return h.jsx(Ty.Provider,{value:{projectName:t},children:e})}function y_({navigate:e}){return h.jsxs(x.Grid,{container:!0,spacing:2,columns:12,children:[h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(g_,{navigate:e})}),h.jsx(x.Grid,{size:{xs:12,md:12},children:h.jsx(f_,{})})]})}const th=new cy(new Jt);function b_({connectionName:e}){const{projectName:t}=Ja(),[n,r]=O.useState(void 0),[o,i]=O.useState(null),[a,s]=O.useState(!1),{data:l,isSuccess:c,isError:d,error:u,isLoading:f}=ln({queryKey:["tablePath",t,e],queryFn:p=>th.listSchemas(t,e,p)});return h.jsxs(x.Grid,{container:!0,spacing:2,children:[h.jsx(x.Grid,{size:{xs:12,md:6},children:h.jsxs(x.Paper,{sx:{p:2},children:[h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Table Paths"}),h.jsx(x.FormControlLabel,{control:h.jsx(x.Switch,{checked:a,onChange:p=>s(p.target.checked)}),label:"Hidden Schemas"})]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[f&&h.jsx(sn,{text:"Fetching Table Paths..."}),d&&h.jsx(Zt,{error:u,context:`${t} > ${e}`}),c&&l.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Schemas"}),c&&l.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:l.data.filter(({isHidden:p})=>a||!p).sort((p,g)=>p.isDefault===g.isDefault?0:p.isDefault?-1:1).map(p=>h.jsx(x.ListItemButton,{selected:o===p.name,onClick:()=>i(p.name),children:h.jsx(x.ListItemText,{primary:p.name})},p.name))})]})]})}),h.jsx(x.Grid,{size:{xs:12,md:6},children:o&&h.jsx(x.Paper,{sx:{p:2},children:h.jsx(T_,{connectionName:e,schemaName:o,onTableClick:p=>{r(p)}})})}),n&&h.jsx(E_,{connectionName:e,schemaName:o,tableName:n,onClose:()=>r(void 0)})]})}function E_({connectionName:e,schemaName:t,tableName:n,onClose:r}){const{projectName:o}=Ja(),{data:i,isSuccess:a,isError:s,error:l,isLoading:c}=ln({queryKey:["tablePathSchema",o,e,t,n],queryFn:d=>th.getTablesource(o,e,n,`${t}.${n}`,d)});return a&&i&&console.log(i),h.jsxs(x.Dialog,{open:!0,onClose:r,maxWidth:"sm",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:[h.jsxs(x.Typography,{fontSize:"large",variant:"body2",fontFamily:"monospace",component:"span",style:{textTransform:"uppercase"},children:[t,".",n]}),h.jsx(x.IconButton,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsxs(x.DialogContent,{children:[c&&h.jsx(sn,{text:"Fetching Table Details..."}),s&&h.jsx(Zt,{error:l,context:`${o} > ${e} > ${t}.${n}`}),a&&i&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",sx:{"& .MuiTableCell-root":{padding:"10px"}},children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"NAME"}),h.jsx(x.TableCell,{children:"TYPE"})]})}),h.jsx(x.TableBody,{children:i.data.columns?.map(d=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:d.name}),h.jsx(x.TableCell,{children:d.type})]},d.name))})]})})]})]})}function T_({connectionName:e,schemaName:t,onTableClick:n}){const{projectName:r}=Ja(),{data:o,isSuccess:i,isError:a,error:s,isLoading:l}=ln({queryKey:["tablesInSchema",r,e,t],queryFn:c=>th.listTables(r,e,t,c)});return h.jsxs(h.Fragment,{children:[h.jsxs(x.Typography,{variant:"overline",fontWeight:"bold",children:["Tables in ",t]}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{mt:"10px",maxHeight:"600px",overflowY:"auto"},children:[l&&h.jsx(sn,{text:"Fetching Tables..."}),a&&h.jsx(Zt,{error:s,context:`${r} > ${e} > ${t}`}),i&&o.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Tables"}),i&&o.data.length>0&&h.jsx(x.List,{dense:!0,disablePadding:!0,children:o.data.map(c=>h.jsx(x.ListItemButton,{onClick:()=>n(c),children:h.jsx(x.ListItemText,{primary:c})},c))})]})]})}const x_=new cy(new Jt);function C_({connection:e,onClick:t}){return h.jsxs(x.TableRow,{onClick:t,sx:{cursor:"pointer","&:hover":{backgroundColor:"action.hover"}},children:[h.jsx(x.TableCell,{children:h.jsxs(x.Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(x.Typography,{variant:"body2",children:e.name}),h.jsx(h_,{sx:{fontSize:"1rem",color:"action.active",opacity:.7}})]})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"body2",children:e.type})})]},e.name)}function v_(){const{projectName:e}=mn(),[t,n]=O.useState(null),{data:r,isSuccess:o,isError:i,error:a}=ln({queryKey:["connections",e],queryFn:c=>x_.listConnections(e,c)}),s=c=>{n(c)},l=()=>{n(null)};return h.jsxs(xy,{projectName:e,children:[h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Database Connections"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!o&&!i&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"Fetching Connections..."}),o&&r.data.length>0&&h.jsx(x.Table,{size:"small",children:h.jsxs(x.TableBody,{children:[h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Connection Name"})}),h.jsx(x.TableCell,{children:h.jsx(x.Typography,{variant:"subtitle2",fontWeight:"bold",children:"Type"})})]}),r.data.map(c=>h.jsx(C_,{connection:c,onClick:()=>s(c.name)},c.name))]})}),o&&r.data.length===0&&h.jsx(x.Typography,{variant:"body2",children:"No Connections"}),i&&h.jsx(Zt,{error:a,context:`${e} > Connections`})]})]})}),h.jsxs(x.Dialog,{open:t!==null,onClose:l,maxWidth:"lg",fullWidth:!0,children:[h.jsxs(x.DialogTitle,{children:["Connection Explorer: ",t,h.jsx(x.IconButton,{"aria-label":"close",onClick:l,sx:{position:"absolute",right:8,top:8},children:h.jsx(x.Box,{sx:{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center"},children:"X"})})]}),h.jsx(x.DialogContent,{children:t&&h.jsx(b_,{connectionName:t})})]})]})}const S_=new q2(new Jt);function A_(){const{projectName:e,packageName:t,versionId:n}=mn(),[r,o]=O.useState(!1),[i,a]=O.useState(null),s=g=>{a(g),o(!0)},l=()=>{o(!1),a(null)},{data:c,isError:d,error:u,isSuccess:f}=ln({queryKey:["databases",e,t,n],queryFn:g=>S_.listDatabases(e,t,n,g)}),p=g=>g>=1024*1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} T`:g>=1024*1024*1024?`${(g/(1024*1024*1024)).toFixed(2)} G`:g>=1024*1024?`${(g/(1024*1024)).toFixed(2)} M`:`${(g/1024).toFixed(2)} K`;return h.jsxs(h.Fragment,{children:[h.jsx($t,{variant:"outlined",sx:{width:"100%"},children:h.jsxs(Nn,{children:[h.jsx(x.Typography,{variant:"overline",fontWeight:"bold",children:"Embedded Databases"}),h.jsx(x.Divider,{}),h.jsxs(x.Box,{sx:{maxHeight:"200px",overflowY:"auto"},children:[!f&&!d&&h.jsx(sn,{text:"Fetching Databases..."}),d&&h.jsx(Zt,{error:u,context:`${e} > ${t} > Databases`}),f&&c.data.length>0&&h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Name"}),h.jsx(x.TableCell,{align:"right",children:"Rows"})]})}),h.jsx(x.TableBody,{children:c.data.map(g=>h.jsxs(x.TableRow,{onClick:()=>s(g),sx:{cursor:"pointer"},children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.path}),h.jsx(x.TableCell,{align:"right",children:p(g.info.rowCount)})]},g.path))})]}),f&&c.data.length===0&&h.jsx(x.Typography,{variant:"body2",sx:{m:"auto"},children:"No databases found"})]})]})}),h.jsxs(x.Dialog,{open:r,onClose:l,maxWidth:"sm",fullWidth:!0,children:[h.jsx(x.DialogTitle,{children:i?.path}),h.jsx(x.DialogContent,{children:i?.info?.columns&&h.jsx(x.TableContainer,{children:h.jsxs(x.Table,{size:"small",children:[h.jsx(x.TableHead,{children:h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{children:"Column"}),h.jsx(x.TableCell,{children:"Type"})]})}),h.jsx(x.TableBody,{children:i.info.columns.map(g=>h.jsxs(x.TableRow,{children:[h.jsx(x.TableCell,{component:"th",scope:"row",children:g.name}),h.jsx(x.TableCell,{children:g.type})]},g.name))})]})})})]})]})}function Dr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Te.apply(null,arguments)}function k_(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:tl(t.components[n].defaultProps,r)}const __=jd();function D_(e=__){return Rv(e)}function I_({props:e,name:t,defaultTheme:n,themeId:r}){let o=D_(n);return o=o[r]||o,k_({theme:o,name:t,props:e})}function w_({props:e,name:t}){return I_({props:e,name:t,defaultTheme:Hd,themeId:Ud})}function Fu(){return Fu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fu.apply(null,arguments)}function Cy(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bu(e,t){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Bu(e,t)}function vy(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Bu(e,t)}const Tf={disabled:!1},fl=O.createContext(null);var N_=function(e){return e.scrollTop},ia="unmounted",ao="exited",so="entering",ti="entered",ju="exiting",Lr=function(e){vy(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=ao,i.appearStatus=so):l=ti:r.unmountOnExit||r.mountOnEnter?l=ia:l=ao,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,o){var i=r.in;return i&&o.status===ia?{status:ao}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var o=null;if(r!==this.props){var i=this.state.status;this.props.in?i!==so&&i!==ti&&(o=so):(i===so||i===ti)&&(o=ju)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,o,i,a;return o=i=a=r,r!=null&&typeof r!="number"&&(o=r.exit,i=r.enter,a=r.appear!==void 0?r.appear:i),{exit:o,enter:i,appear:a}},n.updateStatus=function(r,o){if(r===void 0&&(r=!1),o!==null)if(this.cancelNextCallback(),o===so){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Ji.findDOMNode(this);i&&N_(i)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ao&&this.setState({status:ia})},n.performEnter=function(r){var o=this,i=this.props.enter,a=this.context?this.context.isMounting:r,s=this.props.nodeRef?[a]:[Ji.findDOMNode(this),a],l=s[0],c=s[1],d=this.getTimeouts(),u=a?d.appear:d.enter;if(!r&&!i||Tf.disabled){this.safeSetState({status:ti},function(){o.props.onEntered(l)});return}this.props.onEnter(l,c),this.safeSetState({status:so},function(){o.props.onEntering(l,c),o.onTransitionEnd(u,function(){o.safeSetState({status:ti},function(){o.props.onEntered(l,c)})})})},n.performExit=function(){var r=this,o=this.props.exit,i=this.getTimeouts(),a=this.props.nodeRef?void 0:Ji.findDOMNode(this);if(!o||Tf.disabled){this.safeSetState({status:ao},function(){r.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ju},function(){r.props.onExiting(a),r.onTransitionEnd(i.exit,function(){r.safeSetState({status:ao},function(){r.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,o){o=this.setNextCallback(o),this.setState(r,o)},n.setNextCallback=function(r){var o=this,i=!0;return this.nextCallback=function(a){i&&(i=!1,o.nextCallback=null,r(a))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(r,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Ji.findDOMNode(this),a=r==null&&!this.props.addEndListener;if(!i||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var s=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],l=s[0],c=s[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===ia)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Cy(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return O.createElement(fl.Provider,{value:null},typeof i=="function"?i(r,a):O.cloneElement(O.Children.only(i),a))},t}(O.Component);Lr.contextType=fl;Lr.propTypes={};function Go(){}Lr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Go,onEntering:Go,onEntered:Go,onExit:Go,onExiting:Go,onExited:Go};Lr.UNMOUNTED=ia;Lr.EXITED=ao;Lr.ENTERING=so;Lr.ENTERED=ti;Lr.EXITING=ju;function P_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nh(e,t){var n=function(o){return t&&O.isValidElement(o)?t(o):o},r=Object.create(null);return e&&O.Children.map(e,function(o){return o}).forEach(function(o){r[o.key]=n(o)}),r}function R_(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),o=[];for(var i in e)i in t?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var l in t){if(r[l])for(a=0;a<r[l].length;a++){var c=r[l][a];s[r[l][a]]=n(c)}s[l]=n(l)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}function po(e,t,n){return n[t]!=null?n[t]:e.props[t]}function L_(e,t){return nh(e.children,function(n){return O.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:po(n,"appear",e),enter:po(n,"enter",e),exit:po(n,"exit",e)})})}function O_(e,t,n){var r=nh(e.children),o=R_(t,r);return Object.keys(o).forEach(function(i){var a=o[i];if(O.isValidElement(a)){var s=i in t,l=i in r,c=t[i],d=O.isValidElement(c)&&!c.props.in;l&&(!s||d)?o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:po(a,"exit",e),enter:po(a,"enter",e)}):!l&&s&&!d?o[i]=O.cloneElement(a,{in:!1}):l&&s&&O.isValidElement(c)&&(o[i]=O.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:po(a,"exit",e),enter:po(a,"enter",e)}))}}),o}var M_=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},F_={component:"div",childFactory:function(e){return e}},rh=function(e){vy(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=i.handleExited.bind(P_(i));return i.state={contextValue:{isMounting:!0},handleExited:a,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,o){var i=o.children,a=o.handleExited,s=o.firstRender;return{children:s?L_(r,a):O_(r,i,a),firstRender:!1}},n.handleExited=function(r,o){var i=nh(this.props.children);r.key in i||(r.props.onExited&&r.props.onExited(o),this.mounted&&this.setState(function(a){var s=Fu({},a.children);return delete s[r.key],{children:s}}))},n.render=function(){var r=this.props,o=r.component,i=r.childFactory,a=Cy(r,["component","childFactory"]),s=this.state.contextValue,l=M_(this.state.children).map(i);return delete a.appear,delete a.enter,delete a.exit,o===null?O.createElement(fl.Provider,{value:s},l):O.createElement(fl.Provider,{value:s},O.createElement(o,a,l))},t}(O.Component);rh.propTypes={};rh.defaultProps=F_;const xf={};function Sy(e,t){const n=_.useRef(xf);return n.current===xf&&(n.current=e(t)),n}const B_=[];function j_(e){_.useEffect(e,B_)}class oh{constructor(){q(this,"currentId",null);q(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});q(this,"disposeEffect",()=>this.clear)}static create(){return new oh}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Ay(){const e=Sy(oh.create).current;return j_(e.disposeEffect),e}function Cf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function H_(e){return Ei("MuiCollapse",e)}xi("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const U_=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Ga(r,H_,n)},z_=ut("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})($d(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),$_=ut("div",{name:"MuiCollapse",slot:"Wrapper"})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),G_=ut("div",{name:"MuiCollapse",slot:"WrapperInner"})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),La=_.forwardRef(function(e,t){const n=Ti({props:e,name:"MuiCollapse"}),{addEndListener:r,children:o,className:i,collapsedSize:a="0px",component:s,easing:l,in:c,onEnter:d,onEntered:u,onEntering:f,onExit:p,onExited:g,onExiting:b,orientation:T="vertical",style:E,timeout:v=m0.standard,TransitionComponent:C=Lr,...k}=n,I={...n,orientation:T,collapsedSize:a},S=U_(I),B=ES(),z=Ay(),H=_.useRef(null),y=_.useRef(),R=typeof a=="number"?`${a}px`:a,F=T==="horizontal",M=F?"width":"height",$=_.useRef(null),Z=nl(t,$),ne=V=>de=>{if(V){const ue=$.current;de===void 0?V(ue):V(ue,de)}},me=()=>H.current?H.current[F?"clientWidth":"clientHeight"]:0,se=ne((V,de)=>{H.current&&F&&(H.current.style.position="absolute"),V.style[M]=R,d&&d(V,de)}),J=ne((V,de)=>{const ue=me();H.current&&F&&(H.current.style.position="");const{duration:ge,easing:he}=Cf({style:E,timeout:v,easing:l},{mode:"enter"});if(v==="auto"){const Fe=B.transitions.getAutoHeightDuration(ue);V.style.transitionDuration=`${Fe}ms`,y.current=Fe}else V.style.transitionDuration=typeof ge=="string"?ge:`${ge}ms`;V.style[M]=`${ue}px`,V.style.transitionTimingFunction=he,f&&f(V,de)}),w=ne((V,de)=>{V.style[M]="auto",u&&u(V,de)}),be=ne(V=>{V.style[M]=`${me()}px`,p&&p(V)}),X=ne(g),A=ne(V=>{const de=me(),{duration:ue,easing:ge}=Cf({style:E,timeout:v,easing:l},{mode:"exit"});if(v==="auto"){const he=B.transitions.getAutoHeightDuration(de);V.style.transitionDuration=`${he}ms`,y.current=he}else V.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;V.style[M]=R,V.style.transitionTimingFunction=ge,b&&b(V)});return h.jsx(C,{in:c,onEnter:se,onEntered:w,onEntering:J,onExit:be,onExited:X,onExiting:A,addEndListener:V=>{v==="auto"&&z.start(y.current||0,V),r&&r($.current,V)},nodeRef:$,timeout:v==="auto"?null:v,...k,children:(V,{ownerState:de,...ue})=>h.jsx(z_,{as:s,className:kt(S.root,i,{entered:S.entered,exited:!c&&R==="0px"&&S.hidden}[V]),style:{[F?"minWidth":"minHeight"]:R,...E},ref:Z,ownerState:{...I,state:V},...ue,children:h.jsx($_,{ownerState:{...I,state:V},className:S.wrapper,ref:H,children:h.jsx(G_,{ownerState:{...I,state:V},className:S.wrapperInner,children:o})})})})});La&&(La.muiSupportAuto=!0);const q_=_.createContext(void 0);function W_(){return _.useContext(q_)}function vf(e){try{return e.matches(":focus-visible")}catch{}return!1}class ml{constructor(){q(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ml}static use(){const t=Sy(ml.create).current,[n,r]=_.useState(!1);return t.shouldMount=n,t.setShouldMount=r,_.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=Y_(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function V_(){return ml.use()}function Y_(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function K_(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[d,u]=_.useState(!1),f=kt(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},g=kt(n.child,d&&n.childLeaving,r&&n.childPulsate);return!s&&!d&&u(!0),_.useEffect(()=>{if(!s&&l!=null){const b=setTimeout(l,c);return()=>{clearTimeout(b)}}},[l,s,c]),h.jsx("span",{className:f,style:p,children:h.jsx("span",{className:g})})}const Fn=xi("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Hu=550,Q_=80,X_=Ge.keyframes`
|
|
57
57
|
0% {
|
|
58
58
|
transform: scale(0);
|
|
59
59
|
opacity: 0.1;
|
package/dist/index.es.js
CHANGED
|
@@ -17178,7 +17178,7 @@ function kD() {
|
|
|
17178
17178
|
});
|
|
17179
17179
|
return /* @__PURE__ */ M(Ct, { children: [
|
|
17180
17180
|
!n && !r && /* @__PURE__ */ g(bn, { text: "Fetching About..." }),
|
|
17181
|
-
n && /* @__PURE__ */ M(Xt, { variant: "outlined", sx: { p: 2 }, children: [
|
|
17181
|
+
n && t.data?.readme && /* @__PURE__ */ M(Xt, { variant: "outlined", sx: { p: 2 }, children: [
|
|
17182
17182
|
/* @__PURE__ */ g(ue, { variant: "overline", fontWeight: "bold", sx: { mb: 1 }, children: "Readme" }),
|
|
17183
17183
|
/* @__PURE__ */ g(Xt, { sx: { p: 1 }, children: /* @__PURE__ */ g(np, { children: t.data.readme }) })
|
|
17184
17184
|
] }),
|
|
@@ -17195,48 +17195,51 @@ function _D({ navigate: e }) {
|
|
|
17195
17195
|
!r && !o && /* @__PURE__ */ g(bn, { text: "Fetching Packages..." }),
|
|
17196
17196
|
r && /* @__PURE__ */ M(Xt, { variant: "outlined", sx: { p: 2 }, children: [
|
|
17197
17197
|
/* @__PURE__ */ g(ue, { variant: "overline", fontWeight: "bold", sx: { mb: 1 }, children: "Packages" }),
|
|
17198
|
-
/* @__PURE__ */ g(It, { container: !0, spacing: 2, columns: 12, children: n.data.sort((i, s) => i.name.localeCompare(s.name)).map((i) =>
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
onClick: (s) => e(i.name + "/", s),
|
|
17215
|
-
children: /* @__PURE__ */ M(zn, { children: [
|
|
17216
|
-
/* @__PURE__ */ g(
|
|
17217
|
-
ue,
|
|
17218
|
-
{
|
|
17219
|
-
variant: "overline",
|
|
17220
|
-
color: "primary.main",
|
|
17221
|
-
children: i.name
|
|
17222
|
-
}
|
|
17223
|
-
),
|
|
17224
|
-
/* @__PURE__ */ g(
|
|
17225
|
-
Re,
|
|
17226
|
-
{
|
|
17227
|
-
sx: {
|
|
17228
|
-
maxHeight: "120px",
|
|
17229
|
-
overflowY: "auto"
|
|
17230
|
-
},
|
|
17231
|
-
children: /* @__PURE__ */ g(ue, { variant: "body2", children: i.description })
|
|
17198
|
+
/* @__PURE__ */ g(It, { container: !0, spacing: 2, columns: 12, children: n.data.sort((i, s) => i.name.localeCompare(s.name)).map((i) => {
|
|
17199
|
+
const s = i.resource.replace("/api/v0/projects", "").replace("/packages", "");
|
|
17200
|
+
return /* @__PURE__ */ g(
|
|
17201
|
+
It,
|
|
17202
|
+
{
|
|
17203
|
+
size: { xs: 12, sm: 12, md: 12, lg: 4 },
|
|
17204
|
+
children: /* @__PURE__ */ g(
|
|
17205
|
+
Xt,
|
|
17206
|
+
{
|
|
17207
|
+
variant: "outlined",
|
|
17208
|
+
sx: {
|
|
17209
|
+
cursor: "pointer",
|
|
17210
|
+
transition: "all 0.2s ease-in-out",
|
|
17211
|
+
"&:hover": {
|
|
17212
|
+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
17213
|
+
transform: "translateY(-2px)"
|
|
17232
17214
|
}
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
|
|
17237
|
-
|
|
17238
|
-
|
|
17239
|
-
|
|
17215
|
+
},
|
|
17216
|
+
onClick: (l) => e(s, l),
|
|
17217
|
+
children: /* @__PURE__ */ M(zn, { children: [
|
|
17218
|
+
/* @__PURE__ */ g(
|
|
17219
|
+
ue,
|
|
17220
|
+
{
|
|
17221
|
+
variant: "overline",
|
|
17222
|
+
color: "primary.main",
|
|
17223
|
+
children: i.name
|
|
17224
|
+
}
|
|
17225
|
+
),
|
|
17226
|
+
/* @__PURE__ */ g(
|
|
17227
|
+
Re,
|
|
17228
|
+
{
|
|
17229
|
+
sx: {
|
|
17230
|
+
maxHeight: "120px",
|
|
17231
|
+
overflowY: "auto"
|
|
17232
|
+
},
|
|
17233
|
+
children: /* @__PURE__ */ g(ue, { variant: "body2", children: i.description })
|
|
17234
|
+
}
|
|
17235
|
+
)
|
|
17236
|
+
] })
|
|
17237
|
+
}
|
|
17238
|
+
)
|
|
17239
|
+
},
|
|
17240
|
+
i.name
|
|
17241
|
+
);
|
|
17242
|
+
}) })
|
|
17240
17243
|
] }),
|
|
17241
17244
|
o && /* @__PURE__ */ g(
|
|
17242
17245
|
un,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloy-publisher/app",
|
|
3
3
|
"description": "Malloy Publisher App",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.85",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"generate-api-types": ""
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@malloy-publisher/sdk": "^v0.0.
|
|
37
|
+
"@malloy-publisher/sdk": "^v0.0.85",
|
|
38
38
|
"@mui/icons-material": "^7.0.2",
|
|
39
39
|
"@mui/material": "^7.0.2",
|
|
40
40
|
"@vitejs/plugin-react": "^4.3.1",
|