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

1 line
17 KiB
JavaScript
Raw Normal View History

2025-01-13 08:00:21 +00:00
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3632],{8280:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/su/users/[single]",function(){return s(5738)}])},6100:(e,t,s)=>{"use strict";function a(e){let{editorHTMLElementRef:t,fieldObject:s,setRefresh:a,language:l="javascript",entry:r,jsonTextEditors:i,editorRef:n,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}),n&&(null==s?void 0:s.fieldName)&&(null==i||i.current.push({fieldName:s.fieldName,ref:n}),n.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})},6959:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var a=s(4848),l=s(2027);function r(e){let{selectOptions:t,name:s,onChangeHandler:r,required:i,setAlert:n,title:c,defaultValue:o,info:d,id:u}=e;try{function h(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),s=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!s.classList.contains("hidden")){s.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&s.classList.contains("hidden"))){if(!t){s.classList.add("hidden");return}if(s.classList.contains("hidden")){s.classList.remove("hidden");return}s.classList.add("hidden")}}return(0,a.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[c&&(0,a.jsxs)("label",{htmlFor:s,children:[c,i?"":" (optional)"]}),(0,a.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,a.jsx)("select",{name:s,id:u||s,className:"w-full bg-white",required:i,onChange:e=>{n&&n(null),e.target.classList.remove("warning"),r&&r(e)},defaultValue:o||void 0,children:t.map((e,t)=>{let{payload:s,title:l}=e;return(0,a.jsx)("option",{value:s,selected:!!e.default,children:l},t+1)})}),(0,a.jsx)(l.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,a.jsxs)("div",{className:"info-wrapper absolute -right-10 w-8 h-8 rounded-full bg-white flex items-center justify-center z-10",style:{top:"50%",transform:"translate(0,-50%)"},onMouseEnter:h,onMouseLeave:h,onClick:h,children:[(0,a.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,a.jsx)("div",{className:"info-dropdown absolute top-9 right-0 bg-white w-52 md:w-96 p-2 sm:p-6 shadow-xl rounded hidden text-center border border-slate-300 border-solid",children:(0,a.jsx)("span",{children:d})}),(0,a.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,a.jsx)("div",{children:"Form Select Error"})}}s(6540)},3231:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var a=s(4848),l=s(9020),r=s(6540),i=s(6100),n=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,h]=r.useState(0);return r.useEffect(()=>{(0,i.A)({editorRef:t,fieldObject:{fieldName:"test"},editorHTMLElementRef:e,setRefresh:h,language:o,readOnly:c,initialContent:s,options:d})},[l,s]),(0,a.jsx)("div",{...u,ref:e,className:(0,n.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"})})}}},5844:(e,t,s)=>