Files
object-browser/web-app/build/static/js/774.6415c182.chunk.js
Alex ee974a5961 Release v2.0.0 (#3526)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2025-05-07 15:37:20 -06:00

2 lines
2.3 KiB
JavaScript

"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[774],{7774:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var s=r(5043),a=r(3216),n=r(2166),l=r(9923),i=r(4141),o=r(7403),d=r(3635),c=r(4159),h=r(579);const p=(0,n.Ng)((e=>{let{objectBrowser:t}=e;return{simplePath:t.simplePath}}))((e=>{let{modalOpen:t,folderName:r,bucketName:p,onClose:u,simplePath:m,limitedSubPath:f}=e;const x=(0,d.j)(),w=(0,a.Zp)(),[b,j]=(0,s.useState)(""),[C,g]=(0,s.useState)(!1),[y,P]=(0,s.useState)(p),v=(0,n.d4)((e=>e.objectBrowser.records));(0,s.useEffect)((()=>{if(m){const e=`${p}${p.endsWith("/")||m.startsWith("/")?"":"/"}${m}`;P(e)}}),[m,p]);const $=()=>{let e="/";m&&(e=m.endsWith("/")?m:`${m}/`);if(-1!==v.findIndex((t=>t.name===e+b)))return void x((0,c.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 r=`/browser/${encodeURIComponent(p)}/${encodeURIComponent(`${e}${t}/`)}`;w(r),u()};(0,s.useEffect)((()=>{let e=!0;0===b.trim().length&&(e=!1),g(e)}),[b]);return(0,h.jsx)(s.Fragment,{children:(0,h.jsx)(i.A,{modalOpen:t,title:"Choose or create a new path",onClose:u,titleIcon:(0,h.jsx)(l.DGR,{}),children:(0,h.jsxs)(l.Hbc,{withBorders:!1,containerPadding:!1,children:[(0,h.jsxs)(l.azJ,{className:"inputItem",sx:{display:"flex",gap:8},children:[(0,h.jsx)("strong",{children:"Current Path:"})," ",(0,h.jsx)("br",{}),(0,h.jsx)(l.azJ,{sx:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",fontSize:14,textAlign:"left"},dir:"rtl",children:y})]}),(0,h.jsx)(l.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&&$()},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)(l.xA9,{item:!0,xs:12,sx:o.U.modalButtonBar,children:[(0,h.jsx)(l.$nd,{id:"clear",type:"button",color:"primary",variant:"regular",onClick:()=>{j("")},label:"Clear"}),(0,h.jsx)(l.$nd,{id:"create",type:"submit",variant:"callAction",disabled:!C,onClick:$,label:"Create"})]})]})})})}))}}]);
//# sourceMappingURL=774.6415c182.chunk.js.map