dsql-admin/dsql-app/.local_dist/static/chunks/pages/su/users/[single]-77865aec8f94f04d.js

1 line
13 KiB
JavaScript
Raw Normal View History

2024-12-09 09:39:09 +00:00
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3632],{7538:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/users/[single]",function(){return s(3271)}])},8698:(e,t,s)=>{"use strict";function a(e){let{editorHTMLElementRef:t,fieldObject:s,setRefresh:a,language:l="javascript",entry:r,jsonTextEditors:n,editorRef:i,readOnly:c,initialContent:o,options:d}=e;try{var u;if(!(null===(u=ace)||void 0===u?void 0:u.edit)||!t.current){console.log("Ace Editor not found!"),setTimeout(()=>{null==a||a(e=>e+1)},1e3);return}let e=ace.edit(t.current);e.setOptions({mode:"ace/mode/"+l,value:o||((null==s?void 0:s.defaultValue)?s.defaultValue:(null==s?void 0:s.fieldName)&&(null==r?void 0:r[s.fieldName])?(()=>{if("json"!==l)return r[s.fieldName];try{return JSON.stringify(JSON.parse(r[s.fieldName]),null,4)}catch(e){return r[s.fieldName]}})():""),placeholder:"json"==l?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:c,...d}),i&&(null==s?void 0:s.fieldName)&&(null==n||n.current.push({fieldName:s.fieldName,ref:i}),i.current=e);try{ace.require("ace/ext/beautify").beautify(e.session)}catch(e){}}catch(e){console.log("JSON Editor ERROR =>",e.message)}}s.d(t,{A:()=>a})},9285:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var a=s(4848),l=s(3698),r=s(6540),n=s(8698),i=s(856);function c(e){let{editorRef:t,content:s,readOnly:c,language:o="javascript",options:d,wrapperProps:u}=e;try{let e=r.useRef(),[l,m]=r.useState(0);return r.useEffect(()=>{(0,n.A)({editorRef:t,fieldObject:{fieldName:"test"},editorHTMLElementRef:e,setRefresh:m,language:o,readOnly:c,initialContent:s,options:d})},[l,s]),(0,a.jsx)("div",{...u,ref:e,className:(0,i.QP)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",null==u?void 0:u.className)})}catch(e){return r.useEffect(()=>{(0,l.A)("/api/admin/clientError",{method:"post",body:{component:"AceEditor/main-catch-error",message:e.message,user:{}}})},[]),(0,a.jsx)(r.Fragment,{children:(0,a.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}},5681:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(4848),l=s(6540),r=s(7220);function n(e){let{content:t,language:s,style:n,showCopy:i}=e,[c,o]=l.useState(!1),d=()=>{o(!0)},u={};return(0,a.jsxs)("pre",{className:"language-".concat(s||"javascript"," w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center"),style:n?{...n,...u}:u,children:[(0,a.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:t}),(0,a.jsx)("button",{className:"outlined copy-code "+(i?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:e=>{navigator.clipboard.writeText(t).then(()=>{d()})},children:(0,a.jsx)(r.A,{className:"text-white",size:20})})]})}},861:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(4848),l=s(6540);function r(e){let{userObject:t,userPage:s}=e,r=Object.keys(t),[n,i]=l.useState(!1),[c,o]=l.useState(0),[d,u]=l.useState(!s);return(0,a.jsxs)("div",{className:"card col green w-full overflow-hidden"+(d?s?" h-[100px]":" h-[85px]":" "),children:[(0,a.jsxs)("div",{className:"items-center w-full",children:[(0,a.jsx)("img",{src:t.image_thumbnail,alt:"",className:"rounded-full object-cover"+(s?" w-16 h-16":" w-12 h-12")}),!s&&(0,a.jsxs)("h3",{className:"m-0 text-xl",children:[t.first_name," ",t.last_name," "]}),(0,a.jsxs)("div",{className:"ml-auto",children:[(0,a.jsx)("button",{className:"outlined gray small-text",onClick:e=>{d?u(!1):u(!0)},children:d?"More Details":"Collapse"}),!s&&(0,a.jsx)("a",{href:"/su/users/".concat(t.id),className:"button outlined gray small-text",children:"View User"})]})]}),(0,a.jsx)("div",{className:"card no-hover col w-full light-gray-bg",children:r.map((e,s)=>(0,a.jsxs)(l.Fragment,{children:[(0,a.jsx)("div",{children:(0,a.jsxs)("span",{style:{wordBreak:"break-all"},children:[e,":"," ",(0,a.jsx)("b",{children:t[e]})]})}),s<r.length-1&&(0,a.jsx)("hr",{})]},s+1))}),(0,a.jsx)("button",{className:"outlined gray small-text w-full",onClick:e=>{u(!0)},children:"Collapse"})]})}},7216:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(573