@devtable/settings-form 9.13.0 → 9.14.1

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.
@@ -1,4 +1,4 @@
1
- const e = "@devtable/settings-form", s = "9.13.0", t = "Apache-2.0", i = {
1
+ const e = "@devtable/settings-form", s = "9.14.1", t = "Apache-2.0", i = {
2
2
  access: "public",
3
3
  registry: "https://registry.npmjs.org/"
4
4
  }, o = [
@@ -21,13 +21,13 @@ const e = "@devtable/settings-form", s = "9.13.0", t = "Apache-2.0", i = {
21
21
  "@tabler/icons": "1.119.0",
22
22
  "monaco-editor": "0.36.0"
23
23
  }, l = {
24
- "@emotion/babel-plugin": "11.10.6",
24
+ "@emotion/babel-plugin": "11.11.0",
25
25
  "@types/crypto-js": "v4.1.1",
26
26
  "@types/lodash": "^4.14.182",
27
27
  "@types/react": "^18.0.0",
28
28
  "@types/react-dom": "^18.0.0",
29
29
  "@types/react-grid-layout": "^1.3.2",
30
- "rollup-plugin-visualizer": "5.6.0",
30
+ "rollup-plugin-visualizer": "5.9.0",
31
31
  typescript: "^4.6.3",
32
32
  "vite-plugin-static-copy": "0.13.1"
33
33
  }, m = {
@@ -1860,7 +1860,7 @@ function on({
1860
1860
  ] })
1861
1861
  ] });
1862
1862
  }
1863
- const sn = () => import("./package-6394fb7d.mjs").then(({
1863
+ const sn = () => import("./package-f81dbd50.mjs").then(({
1864
1864
  version: t
1865
1865
  }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
1866
1866
  export {
@@ -28,4 +28,4 @@ Check the top-level render call using <`+d+">.")}return a}}function ct(e,a){{if(
28
28
  `),post:["function post_process(res, utils) {"," // your code goes here"," return data","}"].join(`
29
29
  `)};function Pt({submit:n,styles:r=N}){const{control:o,setValue:s,handleSubmit:u}=y.useForm({defaultValues:{type:"http",key:"",config:{host:"",processing:{pre:ie.pre,post:ie.post}}}});return t(i.Box,{mx:"auto",children:m("form",{onSubmit:u(n),children:[t(y.Controller,{name:"key",control:o,render:({field:l})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Name",placeholder:"A unique name",...l})}),t(i.Divider,{label:"Connection Info",labelPosition:"center"}),t(y.Controller,{name:"config.host",control:o,render:({field:l})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Base URL",sx:{flexGrow:1},...l})}),m(i.Group,{grow:!0,children:[t(y.Controller,{name:"config.processing.pre",control:o,render:({field:l})=>t(re,{label:"Pre Processing",modalTitle:"This function will run before sending the request (for scenarios like encryption)",defaultValue:ie.pre,...l,styles:r})}),t(y.Controller,{name:"config.processing.post",control:o,render:({field:l})=>t(re,{label:"Post Processing",modalTitle:"This function will run after sending the request (for scenarios like decryption)",defaultValue:ie.post,...l,styles:r})})]}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Save"})})]})})}function Ct({styles:n=N}){return t(i.Box,{mx:"auto",children:m(i.Alert,{mt:n.spacing,icon:t(B.AlertCircle,{size:16}),children:["Only ",t("b",{children:"SELECT"})," privilege is needed."]})})}function Et({postSubmit:n,styles:r=N}){const[o,s]=x.useState("postgresql"),u=async({type:f,key:h,config:S})=>{E.showNotification({id:"for-creating",title:"Pending",message:"Adding data source...",loading:!0});try{console.log({type:f,key:h,config:S}),await D.datasource.create(f,h,S),E.updateNotification({id:"for-creating",title:"Successful",message:"Data source is added",color:"green"}),n()}catch(p){E.updateNotification({id:"for-creating",title:"Failed",message:p.message,color:"red"})}},l=o==="postgresql"||o==="mysql",c=o==="http";return m(i.Box,{mx:"auto",children:[t(i.SegmentedControl,{fullWidth:!0,mb:r.spacing,size:r.size,data:[{label:"PostgreSQL",value:"postgresql"},{label:"MySQL",value:"mysql"},{label:"HTTP",value:"http"}],value:o,onChange:f=>s(f)}),l&&t(Ct,{styles:r}),l&&t(_t,{submit:u,styles:r,type:o}),c&&t(Pt,{submit:u,styles:r})]})}function Pe({onSuccess:n,styles:r=N}){const[o,s]=x.useState(!1),u=()=>s(!0),l=()=>s(!1),c=()=>{n(),l()};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:o,onClose:()=>s(!1),title:"Add a data source",trapFocus:!0,onDragStart:f=>{f.stopPropagation()},children:t(Et,{postSubmit:c,styles:r})}),t(i.Button,{size:r.button.size,onClick:u,leftIcon:t(B.PlaylistAdd,{size:20}),children:"Add a Data Source"})]})}const xt=n=>n.replace(/([^:])(\/\/+)/g,"$1/");function Rt(n){x.useEffect(()=>{if(te.loader.__getMonacoInstance())return;console.log("loading monaco for @devtable/settings-form");const o=xt(n);te.loader.config({paths:{vs:o}}),te.loader.init().then(s=>console.log("monaco instance:",s))},[])}function Ce({id:n,name:r,isProtected:o,onSuccess:s,styles:u=N}){const l=J.useModals(),c=async()=>{n&&(E.showNotification({id:"for-deleting",title:"Pending",message:"Deleting data source...",loading:!0}),await D.datasource.delete(n),E.updateNotification({id:"for-deleting",title:"Successful",message:`Data source [${r}] is deleted`,color:"green"}),s())},f=()=>l.openConfirmModal({title:"Delete this data source?",children:t(i.Text,{size:u.size,children:"This action won't affect your database."}),labels:{confirm:"Confirm",cancel:"Cancel"},onCancel:()=>console.log("Cancel"),onConfirm:c});return o?t(i.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:"This is a preset datasource, it can not be deleted",children:t(i.Button,{size:u.button.size,color:"gray",variant:"light",leftIcon:t($.IconLock,{size:16}),sx:{transform:"none !important"},children:"Delete"})}):t(i.Button,{size:u.button.size,color:"red",onClick:f,leftIcon:t(B.Trash,{size:16}),children:"Delete"})}const Ee={pre:["function pre_process({ method, url, params, headers, data }, utils) {"," // your code goes here"," return { method, url, params, headers, data }","}"].join(`
30
30
  `),post:["function post_process(res, utils) {"," // your code goes here"," return data","}"].join(`
31
- `)};function zt({name:n,config:r,submit:o,styles:s=N}){const{control:u,handleSubmit:l}=y.useForm({defaultValues:{config:r}});return t(i.Box,{mx:"auto",children:m("form",{onSubmit:l(o),children:[t(i.TextInput,{mb:s.spacing,size:s.size,required:!0,label:"Name",value:n,readOnly:!0}),t(i.Divider,{label:"Connection Info",labelPosition:"center"}),t(y.Controller,{name:"config.host",control:u,render:({field:c})=>t(i.TextInput,{mb:s.spacing,size:s.size,label:"Base URL",sx:{flexGrow:1},...c})}),m(i.Group,{grow:!0,children:[t(y.Controller,{name:"config.processing.pre",control:u,render:({field:c})=>t(re,{label:"Pre Processing",modalTitle:"This function will run before sending the request (for scenarios like encryption)",defaultValue:Ee.pre,...c,styles:s})}),t(y.Controller,{name:"config.processing.post",control:u,render:({field:c})=>t(re,{label:"Post Processing",modalTitle:"This function will run after sending the request (for scenarios like decryption)",defaultValue:Ee.post,...c,styles:s})})]}),t(i.Group,{position:"right",mt:s.spacing,children:t(i.Button,{type:"submit",size:s.button.size,children:"Save"})})]})})}function At({dataSource:n,postSubmit:r,styles:o=N}){const s=async({config:u})=>{E.showNotification({id:"for-updating",title:"Pending",message:"Editing data source...",loading:!0});try{console.log({config:u}),await D.datasource.update(n.id,u),E.updateNotification({id:"for-updating",title:"Successful",message:"Data source is updated",color:"green"}),r()}catch(l){E.updateNotification({id:"for-updating",title:"Failed",message:l.message,color:"red"})}};return n.config?t(i.Box,{mx:"auto",children:t(zt,{name:n.key,config:n.config,submit:s,styles:o})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Dt({dataSource:n,onSuccess:r,styles:o=N}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{r(),c()};return n.is_preset?t(i.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:"This is a preset datasource, it can not be changed",children:t(i.Button,{size:o.button.size,color:"gray",variant:"light",leftIcon:t($.IconLock,{size:16}),sx:{transform:"none !important"},children:"Edit"})}):n.type!=="http"?t(i.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:"Only HTTP datasources can be edited",children:t(i.Button,{size:o.button.size,color:"gray",variant:"light",leftIcon:t($.IconEdit,{size:16}),sx:{transform:"none !important"},children:"Edit"})}):m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:"Add a data source",trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(At,{dataSource:n,postSubmit:f,styles:o})}),t(i.Button,{size:o.button.size,color:"blue",onClick:l,leftIcon:t($.IconEdit,{size:16}),children:"Edit"})]})}const Ot={http:"HTTP",mysql:"MySQL",postgresql:"PostgreSQL"},It={http:t($.IconNetwork,{}),mysql:t($.IconBrandMysql,{}),postgresql:t($.IconDatabase,{})};function jt({type:n}){return m(i.Group,{children:[t(i.ActionIcon,{size:"xs",sx:{transform:"none !important"},children:It[n]}),t(i.Text,{sx:{cusor:"default",userSelect:"none"},children:Ot[n]})]})}function qt({styles:n=N,config:r}){Rt(r.monacoPath),ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:l}=await D.datasource.list();return l},{refreshDeps:[]});return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(Pe,{onSuccess:u})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Type"}),t("th",{children:"Name"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(l=>{const{id:c,key:f,type:h,is_preset:S}=l;return m("tr",{children:[t("td",{width:200,children:t(jt,{type:h})}),t("td",{children:f}),t("td",{width:400,children:m(i.Group,{position:"left",children:[t(Dt,{dataSource:l,onSuccess:u,styles:n}),t(Ce,{isProtected:S,id:c,name:f,onSuccess:u,styles:n})]})})]},f)})})]})]})]})}const kt=x.forwardRef(({label:n,value:r,description:o,...s},u)=>m(i.Stack,{spacing:2,ref:u,...s,children:[t(i.Text,{size:"sm",children:n}),t(i.Text,{size:"xs",color:"dimmed",className:"role-description",children:o})]})),de=x.forwardRef(({styles:n,value:r,onChange:o},s)=>{const{data:u=[],loading:l}=G.useRequest(async()=>(await D.role.list()).map(f=>({label:f.name,value:f.id,description:f.description,disabled:f.id===50})),{refreshDeps:[]});return t(i.Select,{ref:s,mb:n.spacing,size:n.size,required:!0,label:"Role",itemComponent:kt,data:u,disabled:l,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:r,onChange:o})}),U={size:"sm",spacing:"md",button:{size:"xs"}};function Nt({postSubmit:n,styles:r=U,initialRoleID:o}){const{control:s,handleSubmit:u}=y.useForm({defaultValues:{name:"",email:"",role_id:o,password:""}}),l=async({name:c,email:f,password:h,role_id:S})=>{try{E.showNotification({id:"for-creating",title:"Pending",message:"Adding account...",loading:!0}),await D.account.create(c,f,h,S),E.updateNotification({id:"for-creating",title:"Successful",message:"Account is added",color:"green"}),n()}catch(p){E.updateNotification({id:"for-creating",title:"Failed",message:p.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:u(l),children:[t(y.Controller,{name:"name",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Username",...c})}),t(y.Controller,{name:"email",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Email",...c})}),t(y.Controller,{name:"password",control:s,render:({field:c})=>t(i.PasswordInput,{mb:r.spacing,size:r.size,required:!0,label:"Password",description:"Password must be at least 8 characters long",...c})}),t(y.Controller,{name:"role_id",control:s,render:({field:c})=>t(de,{styles:r,...c})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Save"})})]})})}function xe({onSuccess:n,styles:r=U,initialRoleID:o}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{n(),c()};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:"Add an Account",trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(Nt,{postSubmit:f,styles:r,initialRoleID:o})}),t(i.Button,{size:r.button.size,onClick:l,leftIcon:t(B.PlaylistAdd,{size:20}),children:"Add an Account"})]})}function Re({id:n,name:r,onSuccess:o,styles:s=U}){const u=J.useModals(),l=async()=>{if(n){E.showNotification({id:"for-deleting",title:"Pending",message:"Deleting account...",loading:!0});try{await D.account.delete(n),E.updateNotification({id:"for-deleting",title:"Successful",message:`Account [${r}] is deleted`,color:"green"}),o()}catch(f){E.updateNotification({id:"for-deleting",title:"Failed",message:f.message,color:"red"})}}},c=()=>u.openConfirmModal({title:"Delete this account?",labels:{confirm:"Confirm",cancel:"Cancel"},onCancel:()=>console.log("Cancel"),onConfirm:l});return t(i.Button,{size:s.button.size,color:"red",onClick:c,leftIcon:t(B.Trash,{size:20}),children:"Delete"})}function Lt({id:n,name:r,email:o,role_id:s,postSubmit:u,styles:l=U}){const{control:c,handleSubmit:f,watch:h}=y.useForm({defaultValues:{name:r,email:o,role_id:s,reset_password:!1,new_password:""}}),S=async({name:P,email:j,role_id:L,reset_password:fe,new_password:pe})=>{try{E.showNotification({id:"for-updating",title:"Pending",message:"Updating account...",loading:!0}),await D.account.edit({id:n,name:P.trim(),email:j.trim(),role_id:L,reset_password:fe,new_password:pe.trim()}),E.updateNotification({id:"for-updating",title:"Successful",message:"Account is updated",color:"green"}),u()}catch(V){E.updateNotification({id:"for-updating",title:"Failed",message:V.message,color:"red"})}},[p,v]=h(["reset_password","new_password"]);return t(i.Box,{mx:"auto",children:m("form",{onSubmit:f(S),children:[t(y.Controller,{name:"name",control:c,render:({field:P})=>t(i.TextInput,{mb:l.spacing,size:l.size,required:!0,label:"Username",...P})}),t(y.Controller,{name:"email",control:c,render:({field:P})=>t(i.TextInput,{mb:l.spacing,size:l.size,required:!0,label:"Email",...P})}),t(y.Controller,{name:"role_id",control:c,render:({field:P})=>t(de,{styles:l,...P})}),t(i.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),t(y.Controller,{name:"reset_password",control:c,render:({field:P})=>t(i.Switch,{mb:l.spacing,size:l.size,label:"Reset password",checked:P.value,onChange:j=>P.onChange(j.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),p&&t(y.Controller,{name:"new_password",control:c,render:({field:P})=>t(i.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:"Password must be at least 8 characters long",label:"New Password",...P})}),t(i.Group,{position:"right",mt:l.spacing,children:t(i.Button,{type:"submit",size:l.button.size,children:"Submit"})})]})})}function Bt({account:n,onSuccess:r,styles:o=U}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{r(),c()};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:`Editing ${n.name}`,trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(Lt,{...n,postSubmit:f,styles:o})}),t(i.Button,{size:o.button.size,onClick:l,leftIcon:t(B.Edit,{size:20}),children:"Edit"})]})}function Mt({styles:n=U,config:r}){var S;ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:p}=await D.account.list();return p},{refreshDeps:[]}),{data:l=[],loading:c}=G.useRequest(async()=>(await D.role.list()).map(v=>({label:v.name,value:v.id,description:v.description,disabled:v.id===50})),{refreshDeps:[]}),f=x.useMemo(()=>l.reduce((p,v)=>(p.set(v.value,v.label),p),new Map),[l]),h=p=>f.get(p)??p;return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(xe,{onSuccess:u,initialRoleID:((S=l==null?void 0:l[0])==null?void 0:S.value)??0})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s||c}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Username"}),t("th",{children:"Email"}),t("th",{children:"Role"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(p=>{const{id:v,name:P,email:j,role_id:L}=p;return m("tr",{children:[t("td",{width:200,children:P}),t("td",{width:200,children:j}),t("td",{width:200,children:h(L)}),t("td",{width:200,children:m(i.Group,{position:"left",children:[t(Bt,{account:p,onSuccess:u}),t(Re,{id:v,name:P,onSuccess:u})]})})]},v)})})]})]})]})}function Ft({postSubmit:n,styles:r=U}){const{control:o,handleSubmit:s}=y.useForm({defaultValues:{name:"",password:""}}),u=async({name:l,password:c})=>{try{E.showNotification({id:"for-login",title:"Pending",message:"Loggin in...",loading:!0});const f=await D.account.login(l.trim(),c.trim());window.localStorage.setItem("token",f.token),E.updateNotification({id:"for-login",title:"Successful",message:"Logged in",color:"green"}),n(f)}catch(f){E.updateNotification({id:"for-login",title:"Login Failed",message:f.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:s(u),children:[t(y.Controller,{name:"name",control:o,render:({field:l})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Username",...l})}),t(y.Controller,{name:"password",control:o,render:({field:l})=>t(i.PasswordInput,{mb:r.spacing,size:r.size,required:!0,label:"Password",...l})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Submit"})})]})})}function Ut({styles:n=U,config:r,onSuccess:o}){return ne(r),t(k,{children:t(i.Box,{mt:n.spacing,sx:{position:"relative"},children:t(Ft,{styles:n,postSubmit:o})})})}const ae={size:"sm",spacing:"md",button:{size:"xs"}};function Vt({postSubmit:n,styles:r=ae,initialRoleID:o}){const{control:s,handleSubmit:u}=y.useForm({defaultValues:{name:"",role_id:o}}),l=async({name:c,role_id:f})=>{try{E.showNotification({id:"for-creating",title:"Pending",message:"Adding API Key...",loading:!0});const{app_id:h,app_secret:S}=await D.api_key.create(c,f);E.updateNotification({id:"for-creating",title:"Successful",message:"API Key is added",color:"green"}),n(h,S)}catch(h){E.updateNotification({id:"for-creating",title:"Failed",message:h.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:u(l),children:[t(y.Controller,{name:"name",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Name",...c})}),t(y.Controller,{name:"role_id",control:s,render:({field:c})=>t(de,{styles:r,...c})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Save"})})]})})}function ze({onSuccess:n,styles:r=ae,initialRoleID:o}){const s=J.useModals(),[u,l]=x.useState(!1),c=()=>l(!0),f=()=>l(!1),h=(S,p)=>{f(),s.openModal({title:"API Key is generated",children:m(i.Stack,{children:[t(i.Text,{color:"dimmed",children:"Make sure you save it - you won't be able to access it again."}),t(i.TextInput,{defaultValue:S,disabled:!0,label:"APP ID",styles:{input:{cursor:"text !important"}}}),t(i.TextInput,{defaultValue:p,disabled:!0,label:"APP Secret",styles:{input:{cursor:"text !important"}}}),t(i.Button,{size:"sm",onClick:()=>{J.closeAllModals()},children:"I've saved this API Key"})]}),onClose:()=>{n()}})};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:u,onClose:()=>l(!1),title:"Add an API Key",trapFocus:!0,onDragStart:S=>{S.stopPropagation()},children:t(Vt,{postSubmit:h,styles:r,initialRoleID:o})}),t(i.Button,{size:r.button.size,onClick:c,leftIcon:t(B.PlaylistAdd,{size:20}),children:"Add an API Key"})]})}function Ae({id:n,name:r,onSuccess:o,styles:s=ae}){const u=J.useModals(),l=async()=>{if(n){E.showNotification({id:"for-deleting",title:"Pending",message:"Deleting API Key...",loading:!0});try{await D.api_key.delete(n),E.updateNotification({id:"for-deleting",title:"Successful",message:`API Key [${r}] is deleted`,color:"green"}),o()}catch(f){E.updateNotification({id:"for-deleting",title:"Failed",message:f.message,color:"red"})}}},c=()=>u.openConfirmModal({title:"Delete this api-key?",labels:{confirm:"Confirm",cancel:"Cancel"},onCancel:()=>console.log("Cancel"),onConfirm:l});return t(i.Button,{size:s.button.size,color:"red",onClick:c,leftIcon:t(B.Trash,{size:20}),children:"Delete"})}function Gt({styles:n=ae,config:r}){var S;ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:p}=await D.api_key.list();return p},{refreshDeps:[]}),{data:l=[],loading:c}=G.useRequest(async()=>(await D.role.list()).map(v=>({label:v.name,value:v.id,description:v.description,disabled:v.id===50})),{refreshDeps:[]}),f=x.useMemo(()=>l.reduce((p,v)=>(p.set(v.value,v.label),p),new Map),[l]),h=p=>f.get(p)??p;return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(ze,{onSuccess:u,initialRoleID:((S=l==null?void 0:l[0])==null?void 0:S.value)??0})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s||c}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Name"}),t("th",{children:"APP ID"}),t("th",{children:"Role"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(p=>{const{id:v,name:P,app_id:j,role_id:L}=p;return m("tr",{children:[t("td",{width:200,children:P}),t("td",{width:200,children:j}),t("td",{width:200,children:h(L)}),t("td",{width:200,children:t(i.Group,{position:"left",children:t(Ae,{id:v,name:P,onSuccess:u})})})]},v)})})]})]})]})}const $t=()=>Promise.resolve().then(()=>Wt).then(({version:n})=>(console.log(`[@devtable/dashboard] version: ${n}`),n)),De="@devtable/settings-form",Oe="9.13.0",Ie="Apache-2.0",je={access:"public",registry:"https://registry.npmjs.org/"},qe=["dist"],ke="./dist/settings-form.umd.js",Ne="./dist/settings-form.es.js",Le="./dist/index.d.ts",Be={".":{import:"./dist/settings-form.es.js",require:"./dist/settings-form.umd.js"},"./dist/style.css":{import:"./dist/style.css",require:"./dist/style.css"}},Me={"dev-build":"tsc && vite build --watch",build:"tsc && vite build",preview:"vite preview"},Fe={"@monaco-editor/react":"4.4.6","@tabler/icons":"1.119.0","monaco-editor":"0.36.0"},Ue={"@emotion/babel-plugin":"11.10.6","@types/crypto-js":"v4.1.1","@types/lodash":"^4.14.182","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@types/react-grid-layout":"^1.3.2","rollup-plugin-visualizer":"5.6.0",typescript:"^4.6.3","vite-plugin-static-copy":"0.13.1"},Ve={"@emotion/react":"11.10.6","@mantine/core":"5.9.5","@mantine/hooks":"5.9.5","@mantine/modals":"5.9.5","@mantine/notifications":"5.9.5",ahooks:"^3.3.11",axios:"^0.27.2","crypto-js":"^4.1.1",lodash:"^4.17.21",react:"^16.8.0 || 17.x || 18.x","react-dom":"^16.8.0 || 17.x || 18.x","react-hook-form":"^7.31.2","tabler-icons-react":"^1.48.0"},Wt=Object.freeze(Object.defineProperty({__proto__:null,default:{name:De,version:Oe,license:Ie,publishConfig:je,files:qe,main:ke,module:Ne,types:Le,exports:Be,scripts:Me,dependencies:Fe,devDependencies:Ue,peerDependencies:Ve},dependencies:Fe,devDependencies:Ue,exports:Be,files:qe,license:Ie,main:ke,module:Ne,name:De,peerDependencies:Ve,publishConfig:je,scripts:Me,types:Le,version:Oe},Symbol.toStringTag,{value:"Module"}));T.APIKeyList=Gt,T.AccountList=Mt,T.AddAPIKey=ze,T.AddAccount=xe,T.AddDataSource=Pe,T.DataSourceList=qt,T.DeleteAPIKey=Ae,T.DeleteAccount=Re,T.DeleteDataSource=Ce,T.Login=Ut,T.getVersion=$t,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
31
+ `)};function zt({name:n,config:r,submit:o,styles:s=N}){const{control:u,handleSubmit:l}=y.useForm({defaultValues:{config:r}});return t(i.Box,{mx:"auto",children:m("form",{onSubmit:l(o),children:[t(i.TextInput,{mb:s.spacing,size:s.size,required:!0,label:"Name",value:n,readOnly:!0}),t(i.Divider,{label:"Connection Info",labelPosition:"center"}),t(y.Controller,{name:"config.host",control:u,render:({field:c})=>t(i.TextInput,{mb:s.spacing,size:s.size,label:"Base URL",sx:{flexGrow:1},...c})}),m(i.Group,{grow:!0,children:[t(y.Controller,{name:"config.processing.pre",control:u,render:({field:c})=>t(re,{label:"Pre Processing",modalTitle:"This function will run before sending the request (for scenarios like encryption)",defaultValue:Ee.pre,...c,styles:s})}),t(y.Controller,{name:"config.processing.post",control:u,render:({field:c})=>t(re,{label:"Post Processing",modalTitle:"This function will run after sending the request (for scenarios like decryption)",defaultValue:Ee.post,...c,styles:s})})]}),t(i.Group,{position:"right",mt:s.spacing,children:t(i.Button,{type:"submit",size:s.button.size,children:"Save"})})]})})}function At({dataSource:n,postSubmit:r,styles:o=N}){const s=async({config:u})=>{E.showNotification({id:"for-updating",title:"Pending",message:"Editing data source...",loading:!0});try{console.log({config:u}),await D.datasource.update(n.id,u),E.updateNotification({id:"for-updating",title:"Successful",message:"Data source is updated",color:"green"}),r()}catch(l){E.updateNotification({id:"for-updating",title:"Failed",message:l.message,color:"red"})}};return n.config?t(i.Box,{mx:"auto",children:t(zt,{name:n.key,config:n.config,submit:s,styles:o})}):(console.error(new Error("unexpected empty config of a http datasource")),null)}function Dt({dataSource:n,onSuccess:r,styles:o=N}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{r(),c()};return n.is_preset?t(i.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:"This is a preset datasource, it can not be changed",children:t(i.Button,{size:o.button.size,color:"gray",variant:"light",leftIcon:t($.IconLock,{size:16}),sx:{transform:"none !important"},children:"Edit"})}):n.type!=="http"?t(i.Tooltip,{withArrow:!0,events:{hover:!0,touch:!1,focus:!1},label:"Only HTTP datasources can be edited",children:t(i.Button,{size:o.button.size,color:"gray",variant:"light",leftIcon:t($.IconEdit,{size:16}),sx:{transform:"none !important"},children:"Edit"})}):m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:"Add a data source",trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(At,{dataSource:n,postSubmit:f,styles:o})}),t(i.Button,{size:o.button.size,color:"blue",onClick:l,leftIcon:t($.IconEdit,{size:16}),children:"Edit"})]})}const Ot={http:"HTTP",mysql:"MySQL",postgresql:"PostgreSQL"},It={http:t($.IconNetwork,{}),mysql:t($.IconBrandMysql,{}),postgresql:t($.IconDatabase,{})};function jt({type:n}){return m(i.Group,{children:[t(i.ActionIcon,{size:"xs",sx:{transform:"none !important"},children:It[n]}),t(i.Text,{sx:{cusor:"default",userSelect:"none"},children:Ot[n]})]})}function qt({styles:n=N,config:r}){Rt(r.monacoPath),ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:l}=await D.datasource.list();return l},{refreshDeps:[]});return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(Pe,{onSuccess:u})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Type"}),t("th",{children:"Name"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(l=>{const{id:c,key:f,type:h,is_preset:S}=l;return m("tr",{children:[t("td",{width:200,children:t(jt,{type:h})}),t("td",{children:f}),t("td",{width:400,children:m(i.Group,{position:"left",children:[t(Dt,{dataSource:l,onSuccess:u,styles:n}),t(Ce,{isProtected:S,id:c,name:f,onSuccess:u,styles:n})]})})]},f)})})]})]})]})}const kt=x.forwardRef(({label:n,value:r,description:o,...s},u)=>m(i.Stack,{spacing:2,ref:u,...s,children:[t(i.Text,{size:"sm",children:n}),t(i.Text,{size:"xs",color:"dimmed",className:"role-description",children:o})]})),de=x.forwardRef(({styles:n,value:r,onChange:o},s)=>{const{data:u=[],loading:l}=G.useRequest(async()=>(await D.role.list()).map(f=>({label:f.name,value:f.id,description:f.description,disabled:f.id===50})),{refreshDeps:[]});return t(i.Select,{ref:s,mb:n.spacing,size:n.size,required:!0,label:"Role",itemComponent:kt,data:u,disabled:l,styles:()=>({item:{"&[data-selected]":{"&, &:hover":{".role-description":{color:"rgba(255,255,255,.8)"}}}}}),value:r,onChange:o})}),U={size:"sm",spacing:"md",button:{size:"xs"}};function Nt({postSubmit:n,styles:r=U,initialRoleID:o}){const{control:s,handleSubmit:u}=y.useForm({defaultValues:{name:"",email:"",role_id:o,password:""}}),l=async({name:c,email:f,password:h,role_id:S})=>{try{E.showNotification({id:"for-creating",title:"Pending",message:"Adding account...",loading:!0}),await D.account.create(c,f,h,S),E.updateNotification({id:"for-creating",title:"Successful",message:"Account is added",color:"green"}),n()}catch(p){E.updateNotification({id:"for-creating",title:"Failed",message:p.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:u(l),children:[t(y.Controller,{name:"name",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Username",...c})}),t(y.Controller,{name:"email",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Email",...c})}),t(y.Controller,{name:"password",control:s,render:({field:c})=>t(i.PasswordInput,{mb:r.spacing,size:r.size,required:!0,label:"Password",description:"Password must be at least 8 characters long",...c})}),t(y.Controller,{name:"role_id",control:s,render:({field:c})=>t(de,{styles:r,...c})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Save"})})]})})}function xe({onSuccess:n,styles:r=U,initialRoleID:o}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{n(),c()};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:"Add an Account",trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(Nt,{postSubmit:f,styles:r,initialRoleID:o})}),t(i.Button,{size:r.button.size,onClick:l,leftIcon:t(B.PlaylistAdd,{size:20}),children:"Add an Account"})]})}function Re({id:n,name:r,onSuccess:o,styles:s=U}){const u=J.useModals(),l=async()=>{if(n){E.showNotification({id:"for-deleting",title:"Pending",message:"Deleting account...",loading:!0});try{await D.account.delete(n),E.updateNotification({id:"for-deleting",title:"Successful",message:`Account [${r}] is deleted`,color:"green"}),o()}catch(f){E.updateNotification({id:"for-deleting",title:"Failed",message:f.message,color:"red"})}}},c=()=>u.openConfirmModal({title:"Delete this account?",labels:{confirm:"Confirm",cancel:"Cancel"},onCancel:()=>console.log("Cancel"),onConfirm:l});return t(i.Button,{size:s.button.size,color:"red",onClick:c,leftIcon:t(B.Trash,{size:20}),children:"Delete"})}function Lt({id:n,name:r,email:o,role_id:s,postSubmit:u,styles:l=U}){const{control:c,handleSubmit:f,watch:h}=y.useForm({defaultValues:{name:r,email:o,role_id:s,reset_password:!1,new_password:""}}),S=async({name:P,email:j,role_id:L,reset_password:fe,new_password:pe})=>{try{E.showNotification({id:"for-updating",title:"Pending",message:"Updating account...",loading:!0}),await D.account.edit({id:n,name:P.trim(),email:j.trim(),role_id:L,reset_password:fe,new_password:pe.trim()}),E.updateNotification({id:"for-updating",title:"Successful",message:"Account is updated",color:"green"}),u()}catch(V){E.updateNotification({id:"for-updating",title:"Failed",message:V.message,color:"red"})}},[p,v]=h(["reset_password","new_password"]);return t(i.Box,{mx:"auto",children:m("form",{onSubmit:f(S),children:[t(y.Controller,{name:"name",control:c,render:({field:P})=>t(i.TextInput,{mb:l.spacing,size:l.size,required:!0,label:"Username",...P})}),t(y.Controller,{name:"email",control:c,render:({field:P})=>t(i.TextInput,{mb:l.spacing,size:l.size,required:!0,label:"Email",...P})}),t(y.Controller,{name:"role_id",control:c,render:({field:P})=>t(de,{styles:l,...P})}),t(i.Divider,{my:20,variant:"dashed",label:"",labelPosition:"center"}),t(y.Controller,{name:"reset_password",control:c,render:({field:P})=>t(i.Switch,{mb:l.spacing,size:l.size,label:"Reset password",checked:P.value,onChange:j=>P.onChange(j.currentTarget.checked),styles:{label:{verticalAlign:"middle"}}})}),p&&t(y.Controller,{name:"new_password",control:c,render:({field:P})=>t(i.PasswordInput,{autoComplete:"off",mb:l.spacing,size:l.size,required:!0,description:"Password must be at least 8 characters long",label:"New Password",...P})}),t(i.Group,{position:"right",mt:l.spacing,children:t(i.Button,{type:"submit",size:l.button.size,children:"Submit"})})]})})}function Bt({account:n,onSuccess:r,styles:o=U}){const[s,u]=x.useState(!1),l=()=>u(!0),c=()=>u(!1),f=()=>{r(),c()};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:s,onClose:()=>u(!1),title:`Editing ${n.name}`,trapFocus:!0,onDragStart:h=>{h.stopPropagation()},children:t(Lt,{...n,postSubmit:f,styles:o})}),t(i.Button,{size:o.button.size,onClick:l,leftIcon:t(B.Edit,{size:20}),children:"Edit"})]})}function Mt({styles:n=U,config:r}){var S;ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:p}=await D.account.list();return p},{refreshDeps:[]}),{data:l=[],loading:c}=G.useRequest(async()=>(await D.role.list()).map(v=>({label:v.name,value:v.id,description:v.description,disabled:v.id===50})),{refreshDeps:[]}),f=x.useMemo(()=>l.reduce((p,v)=>(p.set(v.value,v.label),p),new Map),[l]),h=p=>f.get(p)??p;return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(xe,{onSuccess:u,initialRoleID:((S=l==null?void 0:l[0])==null?void 0:S.value)??0})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s||c}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Username"}),t("th",{children:"Email"}),t("th",{children:"Role"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(p=>{const{id:v,name:P,email:j,role_id:L}=p;return m("tr",{children:[t("td",{width:200,children:P}),t("td",{width:200,children:j}),t("td",{width:200,children:h(L)}),t("td",{width:200,children:m(i.Group,{position:"left",children:[t(Bt,{account:p,onSuccess:u}),t(Re,{id:v,name:P,onSuccess:u})]})})]},v)})})]})]})]})}function Ft({postSubmit:n,styles:r=U}){const{control:o,handleSubmit:s}=y.useForm({defaultValues:{name:"",password:""}}),u=async({name:l,password:c})=>{try{E.showNotification({id:"for-login",title:"Pending",message:"Loggin in...",loading:!0});const f=await D.account.login(l.trim(),c.trim());window.localStorage.setItem("token",f.token),E.updateNotification({id:"for-login",title:"Successful",message:"Logged in",color:"green"}),n(f)}catch(f){E.updateNotification({id:"for-login",title:"Login Failed",message:f.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:s(u),children:[t(y.Controller,{name:"name",control:o,render:({field:l})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Username",...l})}),t(y.Controller,{name:"password",control:o,render:({field:l})=>t(i.PasswordInput,{mb:r.spacing,size:r.size,required:!0,label:"Password",...l})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Submit"})})]})})}function Ut({styles:n=U,config:r,onSuccess:o}){return ne(r),t(k,{children:t(i.Box,{mt:n.spacing,sx:{position:"relative"},children:t(Ft,{styles:n,postSubmit:o})})})}const ae={size:"sm",spacing:"md",button:{size:"xs"}};function Vt({postSubmit:n,styles:r=ae,initialRoleID:o}){const{control:s,handleSubmit:u}=y.useForm({defaultValues:{name:"",role_id:o}}),l=async({name:c,role_id:f})=>{try{E.showNotification({id:"for-creating",title:"Pending",message:"Adding API Key...",loading:!0});const{app_id:h,app_secret:S}=await D.api_key.create(c,f);E.updateNotification({id:"for-creating",title:"Successful",message:"API Key is added",color:"green"}),n(h,S)}catch(h){E.updateNotification({id:"for-creating",title:"Failed",message:h.message,color:"red"})}};return t(i.Box,{mx:"auto",children:m("form",{onSubmit:u(l),children:[t(y.Controller,{name:"name",control:s,render:({field:c})=>t(i.TextInput,{mb:r.spacing,size:r.size,required:!0,label:"Name",...c})}),t(y.Controller,{name:"role_id",control:s,render:({field:c})=>t(de,{styles:r,...c})}),t(i.Group,{position:"right",mt:r.spacing,children:t(i.Button,{type:"submit",size:r.button.size,children:"Save"})})]})})}function ze({onSuccess:n,styles:r=ae,initialRoleID:o}){const s=J.useModals(),[u,l]=x.useState(!1),c=()=>l(!0),f=()=>l(!1),h=(S,p)=>{f(),s.openModal({title:"API Key is generated",children:m(i.Stack,{children:[t(i.Text,{color:"dimmed",children:"Make sure you save it - you won't be able to access it again."}),t(i.TextInput,{defaultValue:S,disabled:!0,label:"APP ID",styles:{input:{cursor:"text !important"}}}),t(i.TextInput,{defaultValue:p,disabled:!0,label:"APP Secret",styles:{input:{cursor:"text !important"}}}),t(i.Button,{size:"sm",onClick:()=>{J.closeAllModals()},children:"I've saved this API Key"})]}),onClose:()=>{n()}})};return m(k,{children:[t(i.Modal,{overflow:"inside",opened:u,onClose:()=>l(!1),title:"Add an API Key",trapFocus:!0,onDragStart:S=>{S.stopPropagation()},children:t(Vt,{postSubmit:h,styles:r,initialRoleID:o})}),t(i.Button,{size:r.button.size,onClick:c,leftIcon:t(B.PlaylistAdd,{size:20}),children:"Add an API Key"})]})}function Ae({id:n,name:r,onSuccess:o,styles:s=ae}){const u=J.useModals(),l=async()=>{if(n){E.showNotification({id:"for-deleting",title:"Pending",message:"Deleting API Key...",loading:!0});try{await D.api_key.delete(n),E.updateNotification({id:"for-deleting",title:"Successful",message:`API Key [${r}] is deleted`,color:"green"}),o()}catch(f){E.updateNotification({id:"for-deleting",title:"Failed",message:f.message,color:"red"})}}},c=()=>u.openConfirmModal({title:"Delete this api-key?",labels:{confirm:"Confirm",cancel:"Cancel"},onCancel:()=>console.log("Cancel"),onConfirm:l});return t(i.Button,{size:s.button.size,color:"red",onClick:c,leftIcon:t(B.Trash,{size:20}),children:"Delete"})}function Gt({styles:n=ae,config:r}){var S;ne(r);const{data:o=[],loading:s,refresh:u}=G.useRequest(async()=>{const{data:p}=await D.api_key.list();return p},{refreshDeps:[]}),{data:l=[],loading:c}=G.useRequest(async()=>(await D.role.list()).map(v=>({label:v.name,value:v.id,description:v.description,disabled:v.id===50})),{refreshDeps:[]}),f=x.useMemo(()=>l.reduce((p,v)=>(p.set(v.value,v.label),p),new Map),[l]),h=p=>f.get(p)??p;return m(k,{children:[t(i.Group,{pt:n.spacing,position:"right",children:t(ze,{onSuccess:u,initialRoleID:((S=l==null?void 0:l[0])==null?void 0:S.value)??0})}),m(i.Box,{mt:n.spacing,sx:{position:"relative"},children:[t(i.LoadingOverlay,{visible:s||c}),m(i.Table,{horizontalSpacing:n.spacing,verticalSpacing:n.spacing,fontSize:n.size,highlightOnHover:!0,children:[t("thead",{children:m("tr",{children:[t("th",{children:"Name"}),t("th",{children:"APP ID"}),t("th",{children:"Role"}),t("th",{children:"Action"})]})}),t("tbody",{children:o.map(p=>{const{id:v,name:P,app_id:j,role_id:L}=p;return m("tr",{children:[t("td",{width:200,children:P}),t("td",{width:200,children:j}),t("td",{width:200,children:h(L)}),t("td",{width:200,children:t(i.Group,{position:"left",children:t(Ae,{id:v,name:P,onSuccess:u})})})]},v)})})]})]})]})}const $t=()=>Promise.resolve().then(()=>Wt).then(({version:n})=>(console.log(`[@devtable/dashboard] version: ${n}`),n)),De="@devtable/settings-form",Oe="9.14.1",Ie="Apache-2.0",je={access:"public",registry:"https://registry.npmjs.org/"},qe=["dist"],ke="./dist/settings-form.umd.js",Ne="./dist/settings-form.es.js",Le="./dist/index.d.ts",Be={".":{import:"./dist/settings-form.es.js",require:"./dist/settings-form.umd.js"},"./dist/style.css":{import:"./dist/style.css",require:"./dist/style.css"}},Me={"dev-build":"tsc && vite build --watch",build:"tsc && vite build",preview:"vite preview"},Fe={"@monaco-editor/react":"4.4.6","@tabler/icons":"1.119.0","monaco-editor":"0.36.0"},Ue={"@emotion/babel-plugin":"11.11.0","@types/crypto-js":"v4.1.1","@types/lodash":"^4.14.182","@types/react":"^18.0.0","@types/react-dom":"^18.0.0","@types/react-grid-layout":"^1.3.2","rollup-plugin-visualizer":"5.9.0",typescript:"^4.6.3","vite-plugin-static-copy":"0.13.1"},Ve={"@emotion/react":"11.10.6","@mantine/core":"5.9.5","@mantine/hooks":"5.9.5","@mantine/modals":"5.9.5","@mantine/notifications":"5.9.5",ahooks:"^3.3.11",axios:"^0.27.2","crypto-js":"^4.1.1",lodash:"^4.17.21",react:"^16.8.0 || 17.x || 18.x","react-dom":"^16.8.0 || 17.x || 18.x","react-hook-form":"^7.31.2","tabler-icons-react":"^1.48.0"},Wt=Object.freeze(Object.defineProperty({__proto__:null,default:{name:De,version:Oe,license:Ie,publishConfig:je,files:qe,main:ke,module:Ne,types:Le,exports:Be,scripts:Me,dependencies:Fe,devDependencies:Ue,peerDependencies:Ve},dependencies:Fe,devDependencies:Ue,exports:Be,files:qe,license:Ie,main:ke,module:Ne,name:De,peerDependencies:Ve,publishConfig:je,scripts:Me,types:Le,version:Oe},Symbol.toStringTag,{value:"Module"}));T.APIKeyList=Gt,T.AccountList=Mt,T.AddAPIKey=ze,T.AddAccount=xe,T.AddDataSource=Pe,T.DataSourceList=qt,T.DeleteAPIKey=Ae,T.DeleteAccount=Re,T.DeleteDataSource=Ce,T.Login=Ut,T.getVersion=$t,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/settings-form",
3
- "version": "9.13.0",
3
+ "version": "9.14.1",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -33,13 +33,13 @@
33
33
  "monaco-editor": "0.36.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@emotion/babel-plugin": "11.10.6",
36
+ "@emotion/babel-plugin": "11.11.0",
37
37
  "@types/crypto-js": "v4.1.1",
38
38
  "@types/lodash": "^4.14.182",
39
39
  "@types/react": "^18.0.0",
40
40
  "@types/react-dom": "^18.0.0",
41
41
  "@types/react-grid-layout": "^1.3.2",
42
- "rollup-plugin-visualizer": "5.6.0",
42
+ "rollup-plugin-visualizer": "5.9.0",
43
43
  "typescript": "^4.6.3",
44
44
  "vite-plugin-static-copy": "0.13.1"
45
45
  },