dsql-admin/dsql-app/.local_dist/static/chunks/3061-4daacb81cd42c700.js

1 line
5.2 KiB
JavaScript
Raw Permalink Normal View History

2024-12-09 09:39:09 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3061],{1301:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(4848),i=a(2027);function s(e){let{selectOptions:t,name:a,onChangeHandler:s,required:n,setAlert:r,title:d,defaultValue:c,info:h,id:o}=e;try{function p(e){if(e.type.match(/enter/i)&&window.innerWidth<1200)return;let t=e.target.closest(".info-wrapper"),a=t.querySelector(".info-dropdown");if(e.type.match(/leave/i)&&!a.classList.contains("hidden")){a.classList.add("hidden");return}if(!(e.type.match(/leave/i)&&a.classList.contains("hidden"))){if(!t){a.classList.add("hidden");return}if(a.classList.contains("hidden")){a.classList.remove("hidden");return}a.classList.add("hidden")}}return(0,l.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(h?" pr-8":""),children:[d&&(0,l.jsxs)("label",{htmlFor:a,children:[d,n?"":" (optional)"]}),(0,l.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,l.jsx)("select",{name:a,id:o||a,className:"w-full bg-white",required:n,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),s&&s(e)},defaultValue:c||void 0,children:t.map((e,t)=>{let{payload:a,title:i}=e;return(0,l.jsx)("option",{value:a,selected:!!e.default,children:i},t+1)})}),(0,l.jsx)(i.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),h&&(0,l.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:p,onMouseLeave:p,onClick:p,children:[(0,l.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,l.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,l.jsx)("span",{children:h})}),(0,l.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,l.jsx)("div",{children:"Form Select Error"})}}a(6540)},9862:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(4848),i=a(7216);function s(){return(0,l.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,l.jsx)(i.A,{})})}a(6540)},4709:(e,t,a)=>{a.d(t,{A:()=>s});var l=a(4848),i=a(6540);function s(e){var t,a,s;let{confirmedDelegetedUser:n,linksArray:r,user:d}=e;null==n||n.delegated,null==n||null===(t=n.priviledges)||void 0===t||t.match(/Edit Tables/i),null==n||null===(a=n.priviledges)||void 0===a||a.match(/Delete Tables/i),null==n||null===(s=n.priviledges)||void 0===s||s.match(/Create Tables/i);let[c,h]=i.useState(r||null);return(i.useEffect(()=>{var e;if(r)return;let t=window.location.pathname,a=t.split("/"),l=[];l.push({title:"Home",path:t.match(/admin/)?"/admin":"/"}),null===(e=window.location.search)||void 0===e||e.match(/delegated=true/),a.forEach((e,t,a)=>{!(null==e?void 0:e.match(/./))||1==t||e.match(/^\d+$/)&&d&&!l.find(e=>!!e.title.match(/^entries$|^users$/))||l.push({title:e,path:(()=>{let e="";for(let l=0;l<a.length;l++){let i=a[l];!(l>t)&&i.match(/./)&&(e+="/".concat(i))}return e})()})}),h(l)},[]),c&&c[1])?(0,l.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:c.map((e,t,a)=>t===c.length-1?(0,l.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,l.jsxs)(i.Fragment,{children:[(0,l.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,l.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,l.jsx)(i.Fragment,{})}},7296:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(5737).A)("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]])},6831:(e,t,a)=>{a.d(t,{A:()=>l});let l=(0,a(5737).A)("DatabaseBackup",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 12a9 3 0 0 0 5 2.69",key:"1ui2ym"}],