PageSourceSearch

https://eherp.org/cp/javascript/components/pages/ProtectedDirectoryUserAddPage.js?992fdccbb856b4176517

js eherp.org collected 2026-10-06 01:31:54 UTC 5,217 bytes, 2 lines download raw bytes

1(globalThis.webpackChunkPlesk||=[]).push([["components/pages/ProtectedDirectoryUserAddPage"],{1604(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>a});var i=n(341),r=n(772),o=n(342);const a=({onClose:e,isOpen:t=!0,closeOnFormSuccess:n=!0,closeUrl:a="..",form:s,...c})=>{const d=(0,r.useNavigate)(),[u,l]=(0,i.useState)(t),f=(0,i.useRef)(null),p=(0,i.useCallback)((...t)=>{const n=e??(()=>d(a,{preventScrollReset:!0}));l(!1),f.current=setTimeout(()=>{n(...t),f.current=null},300)},[a,d,e]);(0,i.useEffect)(()=>()=>{f.current&&clearTimeout(f.current)},[]),(0,i.useEffect)(()=>{t?f.current&&clearTimeout(f.current):l(t)},[t]);const m=(0,i.useMemo)(()=>{if(s&&n){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},[n,p,s]);return(0,i.jsx)(o.Drawer,{...c,form:m,onClose:p,isOpen:u})}},3042(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>S});var i=n(341),r=n(782),o=n.n(r),a=n(772),s=n(811),c=n(342),d=n(95),u=n(1604),l=n(798),f=n(718),p=n(1618),m=n(1393),v=n.n(m),y=n(3043),h=n.n(y);const k=d.Locale.getTranslate("components.pages.ProtectedDirectoryUserAdd"),b=({protectedDirectory:e})=>{const t=(0,a.useLocation)(),{directoryId:n}=(0,a.useParams)(),[r,o]=(0,i.useState)({directoryId:n,login:"",password:""}),[d]=(0,s.useMutation)(h(),{refetchQueries:[v()],update:e=>(0,p.evictEntitiesCache)({cache:e,typename:"ProtectedDirectory",ids:[btoa(`ProtectedDirectory:${n}`)],fields:["users"]}),onCompleted(e,{variables:{input:{login:t}}}){(0,f.addToast)({intent:"success",message:(0,i.jsx)(k,{content:"success",params:{login:(0,i.jsx)("b",{children:t})}})})},awaitRefetchQueries:!0}),m=(0,i.jsx)(c.Label,{view:"light",size:"sm",caps:!1,children:`/${e.path}`});return(0,i.jsx)(u.default,{isOpen:!0,"data-type":"protected-directory-user-add-drawer",title:(0,i.jsx)(k,{content:"title"}),subtitle:(0,i.jsx)(k,{content:"subtitle",params:{directory:m}}),closeUrl:{...t,pathname:".."},size:"sm",form:(0,i.jsxs)(l.default,{values:r,onFieldChange:(e,t)=>
1{o(n=>(0,c.setIn)(n,e,t))},mutation:d,applyButton:!1,submitButton:{children:(0,i.jsx)(k,{content:"submit"}),"data-type":"protected-directory-user-add-submit"},children:[(0,i.jsx)(c.FormFieldText,{name:"login",required:!0,autoFocus:!0,label:(0,i.jsx)(k,{content:"loginLabel"}),inputProps:{maxLength:"20"}}),(0,i.jsx)(c.FormFieldPassword,{name:"password",required:!0,label:(0,i.jsx)(k,{content:"passwordLabel"}),inputProps:{maxLength:"255"}})]})})};b.propTypes={protectedDirectory:o().shape({path:o().string.isRequired}).isRequired};const S=b},3041(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>i.default});var i=n(3042)},1618(e,t,n){"use strict";n.r(t),n.d(t,{evictEntitiesCache:()=>i});const i=({cache:e,typename:t,ids:n=[],fields:i=[]})=>{Object.values(e.extract()).filter(({__typename:e,id:i})=>e===t&&(0===n.length||n.includes(i))).forEach(t=>{i.forEach(n=>e.evict({id:e.identify(t),fieldName:n}))})}},3043(e){var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddProtectedDirectoryUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddProtectedDirectoryUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addProtectedDirectoryUser"},arguments:[{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:"protectedDirectoryUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]}}],loc:{start:0,end:208}};t.loc.source={body:"mutation AddProtectedDirectoryUser(\r\n    $input: AddProtectedDirectoryUserInput!, \r\n) {\r\n    addProtectedDirectoryUser(input: $input) {\r\n        protectedDirectoryUser {\r\n            id\r\n        }\r\n    }\r\n}\r\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function n(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var i=e.type;"NamedType"===i.kind&&t.add(i.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(e){n(e,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(e){n(e,t)}),e.definitions&&e.definitions.forEach(function(e){n(e,t)})}var i={};function r(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;n(e,t),i[e.name.value]=t}}),e.exports=t,e.exports.AddProtectedDirectoryUser=function(e,t){var n={kind:e.kind,definitions:[r(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var o=i[t]||new Set,a=new Set,s=new Set;for(o.forEach(function(e){s.add(e)});s.size>0;){var c=s;s=new Set,c.forEach(function(e){a.has(e)||(a.add(e),(i[e]||new Set).forEach(function(e){s.add(e)}))})}return a.forEach(function(t){var i=r(e,t);i&&n.definitions.push(i)}),n}(t,"AddProtectedDirectoryUser")}}]);
2//# sourceMappingURL=ProtectedDirectoryUserAddPage.js.map?992fdccbb856b4176517

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.