PageSourceSearch

https://login.commonsku.com/dist/react/ManageThemesApp.491e4eae.chunk.js

js commonsku.com collected 2026-09-24 17:47:37 UTC 7,546 bytes, 114 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[9621],{99373(e,t,o){o.d(t,{A:()=>r});var n=o(41594),a=o(23652),i=o(63988);const r=(0,a.default)(e=>{let{className:t,style:o}=e;const a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{const e=document.getElementById("tools-nav");e.style.display="inline-block",a.current.append(e)},[]),(0,i.jsx)("div",{ref:a,className:t,style:o})})`
2  &&& {
3    #tools-nav {
4      height: 150px;
5      
6      .cs-header {
7        h1 {
8          font-size: 32px;
9          color: #555;
10          font-family: museo-slab,sans-serif;
11        }
12      }
13      
14      .cs-nav {
15        height: 34px;
16
17        ul {
18          margin: 0;
19          list-style: none;
20
21          li {
22            display: inline-block;
23            border: 0;
24            margin-left: -4px;
25            border-bottom: 1px solid #eaeaea;
26
27            a {
28              color: #5ba0b4;
29              display: inline-block;
30              padding: 9px 7px;
31              text-decoration: none;
32              white-space: nowrap;
33              padding-bottom: 6px;
34              font-size: 14px;
35            }
36
37            a:hover {
38              padding-bottom: 3px;
39              border-bottom: 3px solid #d8ecf1;
40            }
41          }
42
43          li.active a {
44            font-weight: 700;
45            border-bottom: 3px solid #5ba0b4;
46            padding-bottom: 3px;
47          }
48        }
49      }
50    }
51  }
52`},37586(e,t,o){o.d(t,{A:()=>p});var n=o(41594),a=o(98483),i=o(3602),r=o(26926),l=o(51904),s=o(24784),d=o(28420),c=o(63988);const p=e=>{let{children:t}=e;
52const o=(0,n.useRef)(null),[p,m]=(0,n.useState)(window.innerWidth<=1023?145:120),u=(0,a.d4)(r.ag);return(0,n.useEffect)(()=>{o.current&&m(o.current.offsetHeight)},[]),(0,c.jsxs)(i.Theme,{"data-test-name":"DefaultContainer",theme:{fontFamily:"'skufont-regular', 'sans-serif', 'Roboto'"},children:[(0,c.jsx)(s.A,{headerContainerRef:o}),(0,c.jsx)(l.A,{popups:u,children:(0,c.jsx)("div",{className:"main-content",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden",marginTop:0,paddingTop:p,display:"flex",flexDirection:"column"},children:t})}),(0,c.jsx)(d.A,{popups:u})]})}},86181(e,t,o){o.r(t),o.d(t,{default:()=>v});var n=o(22224),a=o(41594),i=o(37586),r=o(99373),l=o(94460),s=o(3602),d=o(98483),c=o(22078),p=o(23652),m=o(1322),u=o(12021),h=o(63988);const g=p.default.div`
53  && {
54    margin-top: 22px;
55    background-size: cover;
56    height: 140px;
57    border-radius: 5px;
58    display: flex;
59    align-items: center;
60    justify-content: center;
61    position: relative; 
62    background-size: cover;
63    background-position: center center;
64    &::before {
65      content: "";
66      position: absolute;
67      top: 0px;
68      right: 0px;
69      bottom: 0px;
70      left: 0px;
71      background-color: rgba(8, 57, 82, ${e=>e.opacity});
72    }
73  }
74`,x=p.default.div`
75  && {
76    position: relative; 
77    font-family: "skufont-demibold",sans-serif;
78    font-weight: 700;
79    font-size: 36px;
80    line-height: 46px;
81    color: #FFFFFF;
82    text-shadow: 0px 4px 4px rgb(0 0 0 / 25%);
83  }
84`,f=p.default.input.attrs(e=>({type:"range"}))`
85  && {
86      -webkit-appearance: none;
87      height: 7px;
88      background: #808080;
89      border-radius: 5px;
90      background-image: linear-gradient(${s.colors.teal[60]}, ${s.colors.teal[60]});
91      background-repeat: no-repeat;
92    
93  ::-webkit-slider-thumb {
94      -webkit-appearance: none;
95      height: 20px;
96      width: 20px;
97      border-radius: 50%;
98      background: ${s.colors.teal[60]};
99      cursor: pointer;
100      box-shadow: 0 0 2px 0 #555;
101      transition: background 0.3s ease-in-out;
102    }
103    
104  ::-webkit-slider-runnable-track {
105      -webkit-appearance: none;
106      box-shadow: none;
107      border: none;
108      background: transparent;
109    }
110    
111    
112  }
113`,b=(0,d.Ng)((e,t)=>({}),(e,t)=>({onUpdateTheme:t=>(t=(0,n.pick)(t,["theme_id","theme_name","file_id","opacity","is_featured"]),e((0,n.isEmpty)(t.theme_id)?(0,m.DL)(t):(0,m.Tf)(t))),onDeleteTheme:o=>{e((0,m.nA)(o)),t.onClose()},uploadFile:function(t,o,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;try{return e((0,u.K7)(t,o,n,a))}catch(e){console.log("UPLOAD ERROR: ",e)}}}))(e=>{let{theme:t,onUpdateTheme:o,onDeleteTheme:i,uploadFile:r,onClose:l}=e;const[d,p]=(0,a.useState)(null),[m,u]=(0,a.useState)((0,c.AE)(t,"large",{defaultImage:""})),[b,y]=(0,a.useState)({theme_name:"",opacity:1,is_featured:!1,...t});(0,a.useEffect)(()=>()=>{URL.revokeObjectURL(m)},[]);const v=!(0,n.isEmpty)(b.theme_id),k=(0,n.round)((0,n.subtract)(1-b.opacity),2);return(0,h.jsxs)(s.SidePanel,{"data-test-name":"ThemeSidepanel",style:{padding:"2rem",width:"600px",paddingBottom:15},padded:!0,visible:!(0,n.isEmpty)(b),title:(v?"Edit":"Create")+" Theme",controls:(0,h.jsx)(s.IconButton,{variant:"text",preset:"close",mr:16,onClick:e=>{l()}}),children:[(0,h.jsx)(s.LabeledInput,{labelOnTop:!0,label:"Name",name:"basic-input",placeholder:"Enter theme name",value:b.theme_name,onChange:e=>y({...b,theme_name:e.target.value})}),(0,h.jsxs)("div",{style:{marginBottom:12},children:[(0,h.jsx)("label",{style:{fontFamily:'"skufont-demibold",sans-serif',fontWeight:500,fontSize:16,lineHeight:"24px"},children:"Include in featured themes"}),(0,h.jsx)(s.ToggleSwitchStyled,{size:"medium",selected:1===+b.is_featured,onClick:()=>y({...b,is_featured:1!==+b.is_featured?1:0}),style:{width:60}})]}),v&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(s.Dropzoned,{accept:"image/*",placeholder:"Drag and drop image here or Browse Files  ",onDrop:(e,t,o)=>{(e=>{p(e),m&&URL.revokeObjectURL(m),e&&u(URL.createObjectURL(e))})((0,n.first)(e))}}),m&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(g,{style:{backgroundImage:`url(${m})`},opacity:k,children:(0,h.jsx)(x,{children:b.theme_name})}),(0,h.jsx)("label",{style:{marginTop:22,fontFamily:'"skufont-demibold",sans-serif',fontWeight:500,fontSize:16,lineHeight:"24px"}
113,children:"Background Opacity"}),(0,h.jsx)(f,{className:"full-width",style:{marginTop:22,backgroundSize:100*b.opacity+"% 100%"},type:"range",min:"0",max:"10",value:10*b.opacity,onChange:e=>y({...b,opacity:e.target.value/10})})]})]}),(0,h.jsx)(s.Button,{className:"full-width",style:{marginBottom:22,marginTop:22},onClick:()=>(async()=>{let e=null;d&&(e=(0,n.get)(await r(b.theme_id,"THEME",d),"payload.id"));const t=e?{...b,file_id:e}:b,a=(0,n.get)(await o(t),"payload.data");a&&y(a)})(),children:v?"Save":"Create"}),v&&(0,h.jsx)("div",{style:{textAlign:"center"},children:(0,h.jsx)(s.IconButton,{variant:"custom",Icon:s.TrashIcon,variantBorderColor:"transparent",variantColor:s.colors.errors.main,variantBg:"transparent",variantHoverBorderColor:s.colors.errors[10],variantHoverColor:s.colors.errors.main,variantHoverBg:s.colors.errors[10],size:"large",onClick:()=>i(b.theme_id),children:"Delete Theme"})})]})}),y=b,v=()=>{const[e,t]=(0,a.useState)(null);let o=(0,d.d4)(e=>(0,n.values)((0,n.get)(e,"entities.themes",[])));return(0,h.jsxs)(i.A,{"data-test-name":"ManageThemesApp",children:[(0,h.jsx)(r.A,{}),null!==e&&(0,h.jsx)(y,{theme:e,onClose:()=>t(null)},(0,n.get)(e,"theme_id")),(0,h.jsx)("div",{className:"row full-width",style:{display:"flex",justifyContent:"end",marginBottom:19},children:(0,h.jsx)(s.IconButton,{iconPosition:"left",preset:"add",variant:"primary",size:"huge",mr:16,onClick:()=>t({}),children:"Add Theme"})}),(0,h.jsx)("div",{style:{overflowY:"auto",marginRight:18},children:(0,h.jsx)(l.Pr,{themes:o,onClick:t})})]})}}}]);
114//# sourceMappingURL=ManageThemesApp.491e4eae.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.