File "AdminMetaData-1.0.13-2a40f924.js"

Full Path: /home/vantageo/public_html/cache/cache/cache/cache/cache/cache/cache/.wp-cli/wp-content/plugins/wp-data-access/assets/dist/AdminMetaData-1.0.13-2a40f924.js
File size: 1 KB
MIME-type: text/x-java
Charset: utf-8

import{l as s,r as n,aZ as h,b7 as D,j as u,C as g}from"./main-1.0.13.js";import{a as j,I as M,J as L,K as T,B as y,S as C}from"./main-1.0.13-4cbe632d.js";import{g as B}from"./ActionsDml-1.0.13-147ce8d4.js";const z=({dbs:e,tbl:r,appId:c,exploring:p})=>{s.debug(e,r,c);const m=j(),[d,i]=n.useState(""),[f,S]=n.useState(!1),{prepareAdminStore:A}=M(c,L.ADMIN);n.useEffect(()=>{f||E()},[e,r]);const E=()=>{B(e,r,!1,function(a){var l,x;const t=a==null?void 0:a.data;if(s.debug("response data",e,r,t),(l=t==null?void 0:t.access)!=null&&l.select&&Array.isArray(t.access.select)&&t.access.select.includes("POST"))A(e,r,t,p===!0)?S(!0):i(g.contactSupport);else{let o="Unauthorized";((x=a==null?void 0:a.data)==null?void 0:x.message)!==void 0&&(o=a.data.message),o+=" - check console for more information",s.error(o),i(o)}},a=>{s.error("error",a),i(a??g.contactSupport)})};return d!==""?(m(h({error:d})),m(D({})),null):f?u.jsx(T,{appId:c}):u.jsx(y,{sx:{padding:"30px"},children:u.jsx(C,{title:"Loading metadata..."})})};export{z as A};