dsql-admin/dsql-app/.local_dist/static/chunks/4261-1181ad7559234ce0.js

1 line
20 KiB
JavaScript
Raw Normal View History

2025-01-13 08:00:21 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4261],{6959:(e,t,l)=>{l.d(t,{A:()=>a});var i=l(4848),n=l(2027);function a(e){let{selectOptions:t,name:l,onChangeHandler:a,required:s,setAlert:r,title:d,defaultValue:o,info:c,id:u}=e;try{function h(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,i.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[d&&(0,i.jsxs)("label",{htmlFor:l,children:[d,s?"":" (optional)"]}),(0,i.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,i.jsx)("select",{name:l,id:u||l,className:"w-full bg-white",required:s,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:o||void 0,children:t.map((e,t)=>{let{payload:l,title:n}=e;return(0,i.jsx)("option",{value:l,selected:!!e.default,children:n},t+1)})}),(0,i.jsx)(n.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,i.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,i.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,i.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,i.jsx)("span",{children:c})}),(0,i.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,i.jsx)("div",{children:"Form Select Error"})}}l(6540)},5844:(e,t,l)=>{l.d(t,{A:()=>a});var i=l(4848),n=l(7216);function a(){return(0,i.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:e=>{window.history.back()},children:(0,i.jsx)(n.A,{})})}l(6540)},3647:(e,t,l)=>{l.d(t,{A:()=>a});var i=l(4848),n=l(6540);function a(e){let{confirmedDelegetedUser:t,linksArray:l,user:a}=e,[s,r]=n.useState(l||null);return(n.useEffect(()=>{var e;if(l)return;let t=window.location.pathname,i=t.split("/"),n=[];n.push({title:"Home",path:t.match(/admin/)?"/admin":"/"}),null===(e=window.location.search)||void 0===e||e.match(/delegated=true/),i.forEach((e,t,l)=>{!(null==e?void 0:e.match(/./))||1==t||e.match(/^\d+$/)&&a&&!n.find(e=>!!e.title.match(/^entries$|^users$/))||n.push({title:e,path:(()=>{let e="";for(let i=0;i<l.length;i++){let n=l[i];!(i>t)&&n.match(/./)&&(e+="/".concat(n))}return e})()})}),r(n)},[]),s&&s[1])?(0,i.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:s.map((e,t,l)=>t===s.length-1?(0,i.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,i.jsxs)(n.Fragment,{children:[(0,i.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,i.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,i.jsx)(n.Fragment,{})}},900:(e,t,l)=>{l.d(t,{A:()=>a});var i=l(4848),n=l(6540);function a(e){let{children:t,column:l,className:a}=e,s=n.useRef();return n.useEffect(()=>{try{let e=s.current;if(!e)throw Error("No Button Group Wrapper!");let t=e.childNodes,i=Array.from(t);if((null==i?void 0:i.length)===1)return;i.forEach((e,t)=>{let n=e;if(n.classList.contains("dropdown-wrapper")){let t=Array.from(e.childNodes).filter(e=>{var t;return(null==e?void 0:null===(t=e.nodeName)||void 0===t?void 0:t.match(/button/i))||e.classList.contains("button")});t&&t[0]&&(n=t[0])}t<i.length-1&&(n.style[l?"borderBottomRightRadius":"borderTopRightRadius"]=0,n.style[l?"borderBottomLeftRadius":"borderBott