dsql-admin/dsql-app/.local_dist/static/chunks/2378-3a97fbefe0f48bac.js

1 line
20 KiB
JavaScript
Raw Normal View History

2024-11-05 11:12:42 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2378],{44114:function(e,t,l){l.d(t,{Z:function(){return a}});var n=l(85893),i=l(8971);l(67294);function a(e){var t=e.selectOptions,l=e.name,a=e.onChangeHandler,o=e.required,s=e.setAlert,r=e.title,d=e.defaultValue,c=e.info,u=e.id;try{var m=function(e){if(!(e.type.match(/enter/i)&&window.innerWidth<1200)){var t=e.target.closest(".info-wrapper"),l=t.querySelector(".info-dropdown");!e.type.match(/leave/i)||l.classList.contains("hidden")?e.type.match(/leave/i)&&l.classList.contains("hidden")||(t&&l.classList.contains("hidden")?l.classList.remove("hidden"):l.classList.add("hidden")):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:[r&&(0,n.jsxs)("label",{htmlFor:l,children:[r,o?"":" (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:o,onChange:function(e){s&&s(null),e.target.classList.remove("warning"),a&&a(e)},defaultValue:d||void 0,children:t.map((function(e,t){var l=e.payload,i=e.title;return(0,n.jsx)("option",{value:l,selected:!!e.default,children:i},t+1)}))}),(0,n.jsx)(i.Z,{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:m,onMouseLeave:m,onClick:m,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(h){return console.log("ERROR in FormSelect =>",h),(0,n.jsx)("div",{children:"Form Select Error"})}}},61781:function(e,t,l){l.d(t,{Z:function(){return a}});var n=l(85893),i=(l(67294),l(42065));function a(){return(0,n.jsx)("button",{className:"outlined gray p-2 w-9 h-9 flex items-center justify-center rounded-full",onClick:function(e){window.history.back()},children:(0,n.jsx)(i.Z,{color:"inherit",className:"opacity-50 text-black",fontSize:"small"})})}},424:function(e,t,l){l.d(t,{Z:function(){return o}});var n=l(828),i=l(85893),a=l(67294);function o(e){var t,l,o,s=e.confirmedDelegetedUser,r=e.linksArray,d=e.user,c=(null===s||void 0===s||s.delegated,null===s||void 0===s||null===(t=s.priviledges)||void 0===t||t.match(/Edit Tables/i),null===s||void 0===s||null===(l=s.priviledges)||void 0===l||l.match(/Delete Tables/i),null===s||void 0===s||null===(o=s.priviledges)||void 0===o||o.match(/Create Tables/i),a.useState(r||null)),u=(0,n.Z)(c,2),m=u[0],h=u[1];return a.useEffect((function(){var e;if(!r){var 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((function(e,t,l){(null===e||void 0===e?void 0:e.match(/./))&&1!=t&&(e.match(/^\d+$/)&&d||n.push({title:e,path:function(){for(var e="",n=0;n<l.length;n++){var i=l[n];n>t||!i.match(/./)||(e+="/".concat(i))}return e}()}))})),h(n)}}),[]),m&&m[1]?(0,i.jsx)("div",{className:"text-sm mt-2 flex-wrap",children:m.map((function(e,t,l){return t===m.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)(a.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)(a.Fragment,{})}},92378:function(e,t,l){l.d(t,{Z:function(){return F}});var n=l(828),i=l(85893),a=l(67294),o=l(27901),s=l(95264),r=l(90918),d=l(45449),c=l(64914),u=l(34999),m=l(96673),h=l(77533),v=l(54689),x=l(50594);function f(e){var t