dsql-admin/dsql-app/.local_dist/server/chunks/8153.js

1 line
17 KiB
JavaScript
Raw Normal View History

2024-12-08 19:56:57 +00:00
"use strict";exports.id=8153,exports.ids=[8153],exports.modules={51548:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732),n=l(58526);function a({selectOptions:e,name:t,onChangeHandler:l,required:a,setAlert:r,title:i,defaultValue:o,info:c,id:d}){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,s.jsxs)("div",{className:"form-select-block flex items-start flex-col gap-0.5 w-full relative"+(c?" pr-8":""),children:[i&&(0,s.jsxs)("label",{htmlFor:t,children:[i,a?"":" (optional)"]}),(0,s.jsxs)("div",{className:"flex items-center w-full relative",children:[(0,s.jsx)("select",{name:t,id:d||t,className:"w-full bg-white",required:a,onChange:e=>{r&&r(null),e.target.classList.remove("warning"),l&&l(e)},defaultValue:o||void 0,children:e.map((e,t)=>{let{payload:l,title:n}=e;return(0,s.jsx)("option",{value:l,selected:!!e.default,children:n},t+1)})}),(0,s.jsx)(n.A,{className:"absolute right-2 text-base text-slate-500 pointer-events-none",size:20}),c&&(0,s.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,s.jsx)("img",{src:"/images/info-outlined-black.png",alt:"",className:"w-6 h-6 object-contain opacity-60 pointer-events-none"}),(0,s.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,s.jsx)("span",{children:c})}),(0,s.jsx)("div",{className:"absolute -top-2 w-12",style:{height:"45px"}})]})]})]})}catch(e){return console.log("ERROR in FormSelect =>",e),(0,s.jsx)("div",{children:"Form Select Error"})}}l(82015)},46437:(e,t,l)=>{l.d(t,{A:()=>a});var s=l(8732);l(82015);var n=l(42178);function a(){return(0,s.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,s.jsx)(n.A,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},58548:(e,t,l)=>{l.d(t,{A:()=>r});var s=l(8732),n=l(82015),a=l.n(n);function r({confirmedDelegetedUser:e,linksArray:t,user:l}){e?.delegated,e?.priviledges?.match(/Edit Tables/i),e?.priviledges?.match(/Delete Tables/i),e?.priviledges?.match(/Create Tables/i);let[n,r]=a().useState(t||null);return n&&n[1]?(0,s.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:n.map((e,t,l)=>t===n.length-1?(0,s.jsx)("a",{href:e.path,className:"text-slate-400 dark:text-slate-500 pointer-events-none",children:e.title},t):(0,s.jsxs)(a().Fragment,{children:[(0,s.jsx)("a",{href:e.path,className:"query-url",children:e.title}),(0,s.jsx)("span",{className:"opacity-20",children:"|"})]},t))}):(0,s.jsx)(a().Fragment,{})}},75260:(e,t,l)=>{l.d(t,{A:()=>V});var s=l(8732),n=l(82015),a=l.n(n),r=l(13737),i=l(32415),o=l(40373),c=l(62506),d=l(24742),u=l(94081),h=l(18129),m=l(92184),x=l.n(m),p=l(13186),g=l.n(p),b=l(88754);function f({targetElement:e,setOpenStyleModal:t}){return e?(0,s.jsxs)("div",{className:"flex flex-col items-stretch p-6 max-w-lg",children:[(0,s.jsxs)("div",{className:"w-full justify-between",children:[(0,s.jsx)("span",{className:"text-xl",children:"Element Style"}),(0,s.jsx)("button",{className:"w-10 h-10 plain-text",onClick:()=>{t(!1)},children:(0,s.jsx)(b.A,{})})]}),(0,s.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-css-block",children:[(0,s.jsx)("input",{type:"text",placeholder:"CSS key"}),(0,s.jsx)("input",{type:"text",placeholder:"CSS Value",onKeyDownCapture:t=>{let l=t.target;if(t.key?.match(/enter/i)){let t=l.closest(".add-css-block")?.children[0],s=l.closest(".add-css-block")?.children[1],n=t?.value,a=s?.value;if(!n