github.com/minio/console@v1.4.1/web-app/build/static/js/7774.4d23a595.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[7774],{97774:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var r=a(65043),s=a(73216),n=a(22166),l=a(89923),o=a(94141),i=a(77403),c=a(56483),d=a(20554),h=a(64159),p=a(70579);const u=(0,n.Ng)((e=>{let{objectBrowser:t}=e;return{simplePath:t.simplePath}}))((e=>{let{modalOpen:t,folderName:a,bucketName:u,onClose:m,simplePath:f,limitedSubPath:x}=e;const w=(0,d.jL)(),b=(0,s.Zp)(),[j,g]=(0,r.useState)(""),[y,P]=(0,r.useState)(!1),[v,C]=(0,r.useState)(u),k=(0,n.d4)((e=>e.objectBrowser.records));(0,r.useEffect)((()=>{if(f){const e="".concat(u).concat(u.endsWith("/")||f.startsWith("/")?"":"/").concat(f);C(e)}}),[f,u]);const S=()=>{let e="/";f&&(e=f.endsWith("/")?f:"".concat(f,"/"));if(-1!==k.findIndex((t=>t.name===e+j)))return void w((0,h.Dy)({errorMessage:"Folder cannot have the same name as an existing file",detailedError:""}));const t=j.split("/").filter((e=>""!==e.trim())).join("/");"/"===e.slice(0,1)&&(e=e.slice(1));const a="/browser/".concat(u,"/").concat((0,c.nf)("".concat(e).concat(t,"/")));b(a),m()};(0,r.useEffect)((()=>{let e=!0;0===j.trim().length&&(e=!1),P(e)}),[j]);return(0,p.jsx)(r.Fragment,{children:(0,p.jsx)(o.A,{modalOpen:t,title:"Choose or create a new path",onClose:m,titleIcon:(0,p.jsx)(l.DGR,{}),children:(0,p.jsxs)(l.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,p.jsxs)(l.azJ,{className:"inputItem",sx:{display:"flex",gap:8},children:[(0,p.jsx)("strong",{children:"Current Path:"})," ",(0,p.jsx)("br",{}),(0,p.jsx)(l.azJ,{sx:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",fontSize:14,textAlign:"left"},dir:"rtl",children:v})]}),(0,p.jsx)(l.cl_,{value:j,label:"New Folder Path",id:"folderPath",name:"folderPath",placeholder:"Enter the new Folder Path",onChange:e=>{g(e.target.value)},onKeyPress:e=>{"Enter"===e.code&&""!==j&&S()},required:!0,tooltip:x?"You may only have write access on a limited set of subpaths within this path. Please carefully review your User permissions to understand the paths to which you may write.":""}),(0,p.jsxs)(l.xA9,{item:!0,xs:12,sx:i.Uz.modalButtonBar,children:[(0,p.jsx)(l.$nd,{id:"clear",type:"button",color:"primary",variant:"regular",onClick:()=>{g("")},label:"Clear"}),(0,p.jsx)(l.$nd,{id:"create",type:"submit",variant:"callAction",disabled:!y,onClick:S,label:"Create"})]})]})})})}))}}]);
     2  //# sourceMappingURL=7774.4d23a595.chunk.js.map