dsql-admin/dsql-app/.local_dist/static/chunks/6803-fe4ad60e4db387da.js

1 line
15 KiB
JavaScript
Raw Normal View History

2024-12-09 09:39:09 +00:00
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6803],{557:(e,t,l)=>{l.d(t,{A:()=>s});var i=l(4848),n=l(6540);function s(e){let{children:t,column:l,className:s}=e,a=n.useRef();return n.useEffect(()=>{try{let e=a.current.childNodes,t=Array.from(e);if((null==t?void 0:t.length)===1)return;t.forEach((e,i)=>{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])}i<t.length-1&&(n.style[l?"borderBottomRightRadius":"borderTopRightRadius"]=0,n.style[l?"borderBottomLeftRadius":"borderBottomRightRadius"]=0),i>0&&(n.style[l?"borderTop":"borderLeft"]="none",n.style[l?"borderTopRightRadius":"borderTopLeftRadius"]=0,n.style[l?"borderTopLeftRadius":"borderBottomLeftRadius"]=0)})}catch(e){console.log(e.message)}},[]),(0,i.jsx)("div",{className:"items-stretch gap-0"+(l?" flex-col":" flex-wrap xl:flex-nowrap")+(s?" "+s:""),ref:a,children:t})}},903:(e,t,l)=>{let i;l.d(t,{A:()=>k});var n=l(4848),s=l(6540),a=l(5414),o=l(620),d=l(3813),r=l(557),c=l(7212);function u(e){var t;let{targetElement:l,setOpenStyleModal:i}=e;return l?(0,n.jsxs)("div",{className:"flex flex-col items-stretch p-6 max-w-lg",children:[(0,n.jsxs)("div",{className:"w-full justify-between",children:[(0,n.jsx)("span",{className:"text-xl",children:"Element Style"}),(0,n.jsx)("button",{className:"w-10 h-10 plain-text",onClick:()=>{i(!1)},children:(0,n.jsx)(c.A,{})})]}),(0,n.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-css-block",children:[(0,n.jsx)("input",{type:"text",placeholder:"CSS key"}),(0,n.jsx)("input",{type:"text",placeholder:"CSS Value",onKeyDownCapture:e=>{var t,i,n;let s=e.target;if(null===(t=e.key)||void 0===t?void 0:t.match(/enter/i)){let e=null===(i=s.closest(".add-css-block"))||void 0===i?void 0:i.children[0],t=null===(n=s.closest(".add-css-block"))||void 0===n?void 0:n.children[1],a=null==e?void 0:e.value,o=null==t?void 0:t.value;if(!(null==a?void 0:a.match(/./))||!(null==o?void 0:o.match(/./)))return;l.style[a]=o}}}),(0,n.jsx)("button",{onClick:e=>{var t,i;let n=e.target,s=null===(t=n.closest(".add-css-block"))||void 0===t?void 0:t.children[0],a=null===(i=n.closest(".add-css-block"))||void 0===i?void 0:i.children[1],o=null==s?void 0:s.value,d=null==a?void 0:a.value;(null==o?void 0:o.match(/./))&&(null==d?void 0:d.match(/./))&&(l.style[o]=d)},children:"Add"})]}),(0,n.jsxs)("div",{className:"flex-wrap",children:[(0,n.jsx)("button",{onClick:e=>{l.removeAttribute("style")},className:"secondary grow",children:"Reset"}),(0,n.jsx)("button",{onClick:e=>{l.style.display="flex",l.style.alignItems="center",l.style.gap="10px"},className:"outlined black grow",children:"Flex"}),(0,n.jsx)("button",{onClick:e=>{l.style.backgroundColor="rgb(241 245 249)"},className:"outlined black grow",children:"BG-Slate-100"}),(0,n.jsx)("button",{onClick:e=>{l.style.backgroundColor="#F6F4F8"},className:"outlined black grow",children:"BG-Main-light"}),(0,n.jsx)("button",{onClick:e=>{l.style.padding="10px"},className:"outlined black grow",children:"Padding-10px"}),(0,n.jsx)("button",{onClick:e=>{l.style.padding="10px 20px"},className:"outlined black grow",children:"Padding-10px-20px"}),(0,n.jsx)("button",{onClick:e=>{l.style.borderRadius="5px"},className:"outlined black grow",children:"Border-Radius-5px"}),(0,n.jsx)("button",{onClick:e=>{l.style.border="1px solid rgb(241 245 249)"},className:"outlined black grow",children:"Border-Slate-100"}),(0,n.jsx)("button",{onClick:e=>{l.style.border="1px solid rgb(226 232 240)"},className:"outlined black grow",children:"Border-Slate-200"}),(0,n.jsx)("button",{onClick:e=>{l.style.border="1px solid rgb(203 213 225)"},className:"outlined black grow",children:"Border-Slate-300"})]}),(0,n.jsx)("span",{className:"font-semibold text-xl mt-4",children:"Add class Name"}),(0,n.jsxs)("div",{className:"items-stretch p-2 bg-slate-100 rounded add-class-name-block",children:[(0,n.jsx)("input",{type:"text",placeholder:"Class Name",onKeyDownCapture:e=