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