dsql-admin/dsql-app/.local_dist/static/chunks/3127-e593d9c240f25546.js

1 line
18 KiB
JavaScript
Raw Normal View History

2024-12-08 19:56:57 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3127],{41301:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(74848),s=l(62027);function i(e){let{selectOptions:t,name:l,onChangeHandler:i,required:a,setAlert:r,title:o,defaultValue:d,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,n.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[o&&(0,n.jsxs)("label",{htmlFor:l,children:[o,a?"":" (optional)"]}),(0,n.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,n.jsx)("select",{name:l,id:u||l,className:"w-full bg-white",required:a,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),i&&i(e)},defaultValue:d||void 0,children:t.map((e,t)=>{let{payload:l,title:s}=e;return(0,n.jsx)("option",{value:l,selected:!!e.default,children:s},t+1)})}),(0,n.jsx)(s.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,n.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,n.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,n.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,n.jsx)("span",{children:c})}),(0,n.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,n.jsx)("div",{children:"Form Select Error"})}}l(96540)},99862:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(74848);l(96540);var s=l(86625);function i(){return(0,n.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,n.jsx)(s.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},4709:(e,t,l)=>{l.d(t,{A:()=>i});var n=l(74848),s=l(96540);function i(e){var t,l,i;let{confirmedDelegetedUser:a,linksArray:r,user:o}=e;null==a||a.delegated,null==a||null===(t=a.priviledges)||void 0===t||t.match(/Edit Tables/i),null==a||null===(l=a.priviledges)||void 0===l||l.match(/Delete Tables/i),null==a||null===(i=a.priviledges)||void 0===i||i.match(/Create Tables/i);let[d,c]=s.useState(r||null);return(s.useEffect(()=>{var e;if(r)return;let t=window.location.pathname,l=t.split("/"),n=[];n.push({title:"Home",path:t.match(/admin/)?"/admin":"/"}),null===(e=window.location.search)||void 0===e||e.match(/delegated=true/),l.forEach((e,t,l)=>{!(null==e?void 0:e.match(/./))||1==t||e.match(/^\d+$/)&&o&&!n.find(e=>!!e.title.match(/^entries$|^users$/))||n.push({title:e,path:(()=>{let e="";for(let n=0;n<l.length;n++){let s=l[n];!(n>t)&&s.match(/./)&&(e+="/".concat(s))}return e})()})}),c(n)},[]),d&&d[1])?(0,n.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:d.map((e,t,l)=>t===d.length-1?(0,n.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,n.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,n.jsx)(s.Fragment,{})}},93127:(e,t,l)=>{let n;l.d(t,{A:()=>D});var s=l(74848),i=l(96540),a=l(25414),r=l(620),o=l(93813),d=l(60557),c=l(53657),u=l(31524),h=l(75238),m=l(89657),x=l(68144),p=l(58349);function v(e){var t;let{targetElement:l,setOpenStyleModal:n}=e;return l?(0,s.jsxs)("div",{className:"flex flex-col items-stretch p-6 max-w-lg",children:[(0,s.