PageSourceSearch

https://molly88.net/cp/javascript/components/pages/VirtualDirector…CreateDirectoryPage.js?2de02f760271aeda0820

js molly88.net collected 2026-10-05 06:51:51 UTC 4,803 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk||=[]).push([["components/pages/VirtualDirectoryPage/CreateDirectoryPage"],{1604(e,n,a){"use strict";a.r(n),a.d(n,{default:()=>o});var i=a(341),t=a(772),r=a(342);const o=({onClose:e,isOpen:n=!0,closeOnFormSuccess:a=!0,closeUrl:o="..",form:s,...l})=>{const u=(0,t.useNavigate)(),[d,c]=(0,i.useState)(n),m=(0,i.useRef)(null),p=(0,i.useCallback)((...n)=>{const a=e??(()=>u(o,{preventScrollReset:!0}));c(!1),m.current=setTimeout(()=>{a(...n),m.current=null},300)},[o,u,e]);(0,i.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]),(0,i.useEffect)(()=>{n?m.current&&clearTimeout(m.current):c(n)},[n]);const f=(0,i.useMemo)(()=>{if(s&&a){if((0,i.isValidElement)(s))return(0,i.cloneElement)(s,{onSuccess:(...e)=>{s.props.onSuccess?.(...e),p()}});if("object"==typeof s)return{...s,onSuccess:(...e)=>{s.onSuccess?.(...e),p()}}}return s},[a,p,s]);return(0,i.jsx)(r.Drawer,{...l,form:f,onClose:p,isOpen:d})}},3087(e,n,a){"use strict";a.r(n),a.d(n,{default:()=>b});var i=a(782),t=a(95),r=a(1604),o=a(811),s=a(718),l=a(798),u=a(342),d=a(1398),c=a(3088),m=a.n(c),p=a(1408),f=a.n(p),k=a(772),v=a(341);const y=t.Locale.getTranslate("components.pages.VirtualDirectory.CreateDirectory"),h=({params:{domainId:e},...n})=>{const[a]=(0,k.useSearchParams)(),i=a.get("path")||"/",[t,c]=(0,v.useState)({name:""}),p=(0,v.useCallback)((e,n)=>{c(a=>(0,u.setIn)(a,e,n))},[]),[h]=(0,o.useMutation)(m(),{refetchQueries:[f()],onCompleted(e,{variables:{input:{name:n}}}){(0,s.addToast)({intent:"success",message:(0,v.jsx)(y,{content:"success",params:{name:(0,v.jsx)("b",{children:n})}})})},awaitRefetchQueries:!0});return(0,v.jsx)(r.default,{isOpen:!0,"data-type":"virtual-directory-create-directory-drawer",title:(0,v.jsx)(y,{content:"title"}),size:"sm",closeUrl:(0,d.buildUrl)(`/cp/domains/${e}/virtual-directory`,{path:i}),form:(0,v.jsx)(l.default,{onFieldChange:p,mutation:({variables:n})=>h({variables:{domainId:btoa(`Domain:${e}`),path:i,...n}}),values:t,applyButton:!1,...n,children:(0,v.jsx)(u.FormFieldText,{name:"name",label:(0,v.jsx)(y,{content:"name"}),required:!0})})})};h.propTypes={params:i.PropTypes.object.isRequired};const b=h},3086(e,n,a){"use strict";a.r(n),a.d(n,{default:()=>i.default});var i=a(3087)},3088(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateDirectory"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domainId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"path"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DirectoryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDirectory"},arguments:[{kind:"Argument",name:{kind:"Name",value:"domainId"},value:{kind:"Variable",name:{kind:"Name",value:"domainId"}}},{kind:"Argument",name:{kind:"Name",value:"path"},value:{kind:"Variable",name:{kind:"Name",value:"path"}}},{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}}]}}]}}],loc:{start:0,end:176}};n.loc.source={body:"mutation CreateDirectory($domainId: ID!, $path: String!, $input: DirectoryInput!) {\n    createDirectory(domainId: $domainId, path: $path, input: $input) {\n        name\n    }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function a(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&n.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){a(e,n)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){a(e,n)}),e.definitions&&e.definitions.forEach(function(e){a(e,n)})}var i={};function t(e,n){for(var a=0;a<e.definitions.length;a++){var i=e.definitions[a];if(i.name&&i.name.value==n)return i}}n.definitions.forEach(function(e){if(e.name){var n=new Set;a(e,n),i[e.name.value]=n}}),e.exports=n,e.exports.CreateDirectory=function(e,n){var a={kind:e.kind,definitions:[t(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var r=i[n]||new Set,o=new Set,s=new Set;for(r.forEach(function(e){s.add(e)});s.size>0;){var l=s;s=new Set,l.forEach(function(e){o.has(e)||(o.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return o.forEach(function(n){var i=t(e,n);i&&a.definitions.push(i)}),a}(n,"CreateDirectory")}}]);
2//# sourceMappingURL=CreateDirectoryPage.js.map?2de02f760271aeda0820

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.