dsql-admin/dsql-app/.local_dist/static/chunks/510-dd9e714d194583b0.js
Benjamin Toby 86f931fb82 Updates
2024-12-08 09:57:48 +01:00

1 line
7.1 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[510],{68698:(e,t,l)=>{l.d(t,{A:()=>r});function r(e){let{editorHTMLElementRef:t,fieldObject:l,setRefresh:r,language:i="javascript",entry:a,jsonTextEditors:s,editorRef:n,readOnly:c,initialContent:o,options:d}=e;try{var h;if(!(null===(h=ace)||void 0===h?void 0:h.edit)||!t.current){console.log("Ace Editor not found!"),setTimeout(()=>{null==r||r(e=>e+1)},1e3);return}let e=ace.edit(t.current);e.setOptions({mode:"ace/mode/"+i,value:o||((null==l?void 0:l.defaultValue)?l.defaultValue:(null==l?void 0:l.fieldName)&&(null==a?void 0:a[l.fieldName])?(()=>{if("json"!==i)return a[l.fieldName];try{return JSON.stringify(JSON.parse(a[l.fieldName]),null,4)}catch(e){return a[l.fieldName]}})():""),placeholder:"json"==i?"{}":"",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,readOnly:c,...d}),n&&(null==l?void 0:l.fieldName)&&(null==s||s.current.push({fieldName:l.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)}}},41301:(e,t,l)=>{l.d(t,{A:()=>a});var r=l(74848),i=l(62027);function a(e){let{selectOptions:t,name:l,onChangeHandler:a,required:s,setAlert:n,title:c,defaultValue:o,info:d,id:h}=e;try{function u(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),l=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!l.classList.contains("hidden")){l.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&l.classList.contains("hidden"))){if(!t){l.classList.add("hidden");return}if(l.classList.contains("hidden")){l.classList.remove("hidden");return}l.classList.add("hidden")}}return(0,r.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(d?" pr-8":""),children:[c&&(0,r.jsxs)("label",{htmlFor:l,children:[c,s?"":" (optional)"]}),(0,r.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,r.jsx)("select",{name:l,id:h||l,className:"w-full bg-white",required:s,onChange:e=>{n&&n(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:o||void 0,children:t.map((e,t)=>{let{payload:l,title:i}=e;return(0,r.jsx)("option",{value:l,selected:!!e.default,children:i},t+1)})}),(0,r.jsx)(i.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),d&&(0,r.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:u,onMouseLeave:u,onClick:u,children:[(0,r.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,r.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,r.jsx)("span",{children:d})}),(0,r.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,r.jsx)("div",{children:"Form Select Error"})}}l(96540)},79285:(e,t,l)=>{l.d(t,{A:()=>c});var r=l(74848),i=l(23698),a=l(96540),s=l(68698),n=l(50856);function c(e){let{editorRef:t,content:l,readOnly:c,language:o="javascript",options:d,wrapperProps:h}=e;try{let e=a.useRef(),[i,u]=a.useState(0);return a.useEffect(()=>{(0,s.A)({editorRef:t,fieldObject:{fieldName:"test"},editorHTMLElementRef:e,setRefresh:u,language:o,readOnly:c,initialContent:l,options:d})},[i,l]),(0,r.jsx)("div",{...h,ref:e,className:(0,n.QP)("ace-editor-wrapper w-full h-full minimal-scrollbars all-children",null==h?void 0:h.className)})}catch(e){return a.useEffect(()=>{(0,i.A)("/api/admin/clientError",{method:"post",body:{component:"AceEditor/main-catch-error",message:e.message,user:{}}})},[]),(0,r.jsx)(a.Fragment,{children:(0,r.jsx)("h2",{className:"text-xl m-0",children:"Editor Error"})})}}},35681:(e,t,l)=>{l.d(t,{A:()=>n});var r=l(74848),i=l(96540),a=l(51105),s=l(87220);function n(e){let{content:t,language:l,style:n,showCopy:c}=e,[o,d]=i.useState(!1),h=()=>{d(!0)},u=(e,t)=>{"clickaway"!==t&&d(!1)},m=(0,r.jsx)(i.Fragment,{children:(0,r.jsx)("button",{className:"outlined gray",style:{border:"none",padding:"2px",width:"20px",height:"20px",color:"white"},onClick:u,children:"✖"})}),p={};return(0,r.jsxs)("pre",{className:"language-".concat(l||"javascript"," w-auto overflow-hidden skip-js code-block relative max-w-4xl flex items-center justify-center"),style:n?{...n,...p}:p,children:[(0,r.jsx)("code",{className:"w-auto px-10",style:{wordBreak:"break-all"},children:t}),(0,r.jsx)("button",{className:"outlined copy-code "+(c?"relative show":" absolute right-2 z-20 hover:opacity-50"),style:{padding:"2px",border:"none"},onClick:e=>{navigator.clipboard.writeText(t).then(()=>{h()})},children:(0,r.jsx)(s.A,{className:"text-white",size:20})}),(0,r.jsx)(a.A,{open:o,autoHideDuration:2e3,onClose:u,children:(0,r.jsxs)("div",{className:"h-full text-white px-4 py-2 justify-between rounded",style:{maxWidth:"250px",width:"250px",backgroundColor:"#0b8862"},children:[(0,r.jsx)("span",{children:"Code Copied!"}),m]})})]})}},16512:(e,t,l)=>{var r=l(24994);t.A=void 0;var i=r(l(44888)),a=l(74848);t.A=(0,i.default)([(0,a.jsx)("path",{d:"M7 3h10v1H7zm0 17h10v1H7z",opacity:".3"},"0"),(0,a.jsx)("path",{d:"m22 12-4-4v3h-5v2h5v3zm-5 6H7V6h10v1h2V3c0-1.1-.9-2-2-2L7 1.01C5.9 1.01 5 1.9 5 3v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2v-4h-2zM7 3h10v1H7zm10 18H7v-1h10z"},"1")],"SendToMobileTwoTone")},48144:(e,t,l)=>{var r=l(24994);t.A=void 0;var i=r(l(44888)),a=l(74848);t.A=(0,i.default)([(0,a.jsx)("path",{d:"M14 5H5v14h14v-9h-5zM8 17c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m0-4c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1",opacity:".3"},"0"),(0,a.jsx)("circle",{cx:"8",cy:"8",r:"1"},"1"),(0,a.jsx)("path",{d:"M15 3H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 2-.9 2-2V9zm4 16H5V5h9v5h5z"},"2"),(0,a.jsx)("circle",{cx:"8",cy:"12",r:"1"},"3"),(0,a.jsx)("circle",{cx:"8",cy:"16",r:"1"},"4")],"SummarizeTwoTone")},73182:(e,t,l)=>{var r=l(24994);t.A=void 0;var i=r(l(44888)),a=l(74848);t.A=(0,i.default)([(0,a.jsx)("path",{d:"M14.5 9.5C14.5 6.47 12.03 4 9 4S3.5 6.47 3.5 9.5c0 2.47 1.49 3.89 2.35 4.5h6.3c.86-.61 2.35-2.03 2.35-4.5",opacity:".3"},"0"),(0,a.jsx)("path",{d:"M7 20h4c0 1.1-.9 2-2 2s-2-.9-2-2m-2-1h8v-2H5zm11.5-9.5c0 3.82-2.66 5.86-3.77 6.5H5.27c-1.11-.64-3.77-2.68-3.77-6.5C1.5 5.36 4.86 2 9 2s7.5 3.36 7.5 7.5m-2 0C14.5 6.47 12.03 4 9 4S3.5 6.47 3.5 9.5c0 2.47 1.49 3.89 2.35 4.5h6.3c.86-.61 2.35-2.03 2.35-4.5m6.87-2.13L20 8l1.37.63L22 10l.63-1.37L24 8l-1.37-.63L22 6zM19 6l.94-2.06L22 3l-2.06-.94L19 0l-.94 2.06L16 3l2.06.94z"},"1")],"TipsAndUpdatesTwoTone")},46051:(e,t,l)=>{l.d(t,{A:()=>r});let r=(0,l(95737).A)("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]])},50691:e=>{e.exports={parse:function(e,t){if(e){if("object"==typeof e)return e;if("string"==typeof e)try{return JSON.parse(e,t)}catch(e){return}}},stringify:function(e,t,l){try{return JSON.stringify(e,t,l)}catch(e){return}}}}}]);