dsql-admin/dsql-app/.local_dist/server/pages/admin/[user_id]/schema.js

1 line
19 KiB
JavaScript
Raw Normal View History

2024-12-05 07:03:33 +00:00
"use strict";(()=>{var e={};e.id=8591,e.ids=[636,8591],e.modules={30671:(e,t)=>{Object.defineProperty(t,"M",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},23133:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.r(t),r.d(t,{config:()=>h,default:()=>u,getServerSideProps:()=>m,getStaticPaths:()=>x,getStaticProps:()=>p,reportWebVitals:()=>y,routeModule:()=>w,unstable_getServerProps:()=>j,unstable_getServerSideProps:()=>b,unstable_getStaticParams:()=>g,unstable_getStaticPaths:()=>v,unstable_getStaticProps:()=>f});var a=r(63865),i=r(9455),l=r(30671),n=r(49407),c=r(68268),o=r(74094),d=e([o]);o=(d.then?(await d)():d)[0];let u=(0,l.M)(o,"default"),p=(0,l.M)(o,"getStaticProps"),x=(0,l.M)(o,"getStaticPaths"),m=(0,l.M)(o,"getServerSideProps"),h=(0,l.M)(o,"config"),y=(0,l.M)(o,"reportWebVitals"),f=(0,l.M)(o,"unstable_getStaticProps"),v=(0,l.M)(o,"unstable_getStaticPaths"),g=(0,l.M)(o,"unstable_getStaticParams"),j=(0,l.M)(o,"unstable_getServerProps"),b=(0,l.M)(o,"unstable_getServerSideProps"),w=new a.PagesRouteModule({definition:{kind:i.A.PAGES,page:"/admin/[user_id]/schema",pathname:"/admin/[user_id]/schema",bundlePath:"",filename:""},components:{App:c.default,Document:n.default},userland:o});s()}catch(e){s(e)}})},74223:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{A:()=>x});var a=r(8732),i=r(82015),l=r.n(i);r(46437);var n=r(58548),c=r(51548),o=r(74094),d=r(40942);r(63715),r(89788);var u=r(34844),p=e([o,d]);function x(e){let{dbSchemaData:t,user:r}=l().useContext(o.UserSchemaContext),[s,i]=l().useState(t),[p,x]=l().useState(null),[m,h]=l().useState(null),[y,f]=l().useState(null);return(0,a.jsxs)(l().Fragment,{children:[(0,a.jsxs)("div",{className:"flex-col items-start gap-0 w-full",children:[(0,a.jsx)("div",{className:"",children:(0,a.jsx)("h1",{className:"text-3xl m-0",children:"User Schema"})}),(0,a.jsx)(n.A,{user:r})]}),(0,a.jsx)("section",{className:"paper",children:(0,a.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,a.jsx)("h2",{className:"text-xl m-0",children:"Database SCHEMA JSON"}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.A,{required:!0,selectOptions:[{title:"All Databases",payload:"none"},...t.map((e,t)=>({title:e.dbName,payload:e.dbFullName,name:e.dbFullName}))],name:"databases",onChangeHandler:e=>{e.target.value?.match(/^none$/)?x(null):x(e.target.value)}}),m&&m[0]&&(0,a.jsx)(c.A,{required:!0,selectOptions:[{title:"All Tables",payload:"none"},...m.map((e,t)=>({title:e.tableFullName,payload:e.tableName,name:e.tableName}))],name:"database_tables",onChangeHandler:e=>{e.target.value?.match(/^none$/)?f(null):f(e.target.value)}})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 xl:grid-cols-2 items-stretch w-full",children:[(0,a.jsx)("div",{className:"relative w-full block",children:(0,a.jsx)(u.A,{content:JSON.stringify(s,null,4),language:"javascript"})}),(0,a.jsx)(d.A,{})]})]})})]})}[o,d]=p.then?(await p)():p,s()}catch(e){s(e)}})},40942:(e,t,r)=>{r.a(e,async(e,s)=>{try{r.d(t,{A:()=>o});var a=r(8732),i=r(82015),l=r.n(i),n=r(74094);r(63715);var c=e([n]);function o(e){let{dbSchemaData:t,user:r}=l().useContext(n.UserSchemaContext);try{return(0,a.jsxs)("div",{className:"paper p-4 flex-col items-start justify-start gap-14",children:[(0,a.jsx)("span",{className:"-mb-2 font-bold text-lg text-slate-400 mt-1",children:"User Schema Map"}),(0,a.jsx)("hr",{className:"-my-8"}),t.map((e,t)=>(0,a.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,a.jsxs)("span",{className:"w-full xl:w-auto ml-auto text-lg bg-primary px-3 py-1 rounded text-white font-bold top-0 sticky",children:[e.dbName," Database Tables"]}),e.tables.map((e,t)=>(0,a.jsxs)("div",{className:"flex-col items-start gap-4 left-border pl-6 w-full",children:[(0,a.jsx)("span",{className:"font-bold text-base rounded sticky top-10 xl:top-0 px-3 py-1 bg-slate-800 text-white -ml-6 w-full xl:w-auto",children:e.tableFullName}),(0,a.jsxs)("div",{className:"flex-col items-start w-full",children:[(0,a.jsx)("span",{children:"Fields"}),(0,a.jsx)("div",{cl