PageSourceSearch

https://labosic.es/cp/javascript/components/pages/ProtectedDirectoryUserAddPage.js?5bb635a099190a3a740f

js labosic.es collected 2026-10-06 09:29:47 UTC 5,521 bytes, 2 lines download raw bytes

1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/ProtectedDirectoryUserAddPage"],{1034:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var i=n(270),r=n(574),o=n(272),s=n.n(o),a=n(271);const c=({onClose:e,isOpen:t=!0,closeOnFormSuccess:n=!0,closeUrl:o="..",form:s,...c})=>{const d=(0,r.useNavigate)(),[l,u]=(0,i.useState)(t),p=(0,i.useRef)(null),f=(0,i.useCallback)(((...t)=>{const n=e??(()=>d(o,{preventScrollReset:!0}));u(!1),p.current=setTimeout((()=>{n(...t),p.current=null}),300)}),[o,d,e]);(0,i.useEffect)((()=>()=>clearTimeout(p.current)),[]),(0,i.useEffect)((()=>{t?p.current&&clearTimeout(p.current):u(t)}),[t]);const m=(0,i.useMemo)((()=>{if(s&&n){if((0,i.isValidElement)(s))return(0,i.cloneElement)(s,{onSuccess:()=>{s.props.onSuccess?.(),f()}});if("object"==typeof s)return{...s,onSuccess:()=>{s.onSuccess?.(),f()}}}return s}),[n,f,s]);return(0,i.jsx)(a.Drawer,{...c,form:m,onClose:f,isOpen:l})};c.propTypes={onClose:s().func,isOpen:s().bool,form:s().oneOfType([s().object,s().node]),closeOnFormSuccess:s().bool,closeUrl:s().oneOfType([s().string,s().object])};const d=c},2257:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>S});var i=n(270),r=n(272),o=n.n(r),s=n(574),a=n(616),c=n(271),d=n(89),l=n(1034),u=n(847),p=n(530),f=n(1932),m=n(751),v=n.n(m),y=n(2258),h=n.n(y);const k=d.Locale.getTranslate("components.pages.ProtectedDirectoryUserAdd"),b=({protectedDirectory:e})=>{const t=(0,s.useLocation)(),{directoryId:n}=(0,s.useParams)(),[r,o]=(0,i.useState)({directoryId:n,login:"",password:""}),[d]=(0,a.useMutation)(h(),{refetchQueries:[v()],update:e=>(0,f.evictEntitiesCache)({cache:e,typename:"ProtectedDirectory",ids:[btoa(`ProtectedDirectory:${n}`)],fields:["users"]}),onCompleted(e,{variables:{input:{login:t}}}){(0,p.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)(l.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)(u.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},2256:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i.default});var i=n(2257)},1932:(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})))}))}},2258: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"}}},directives:[]}],directives:[],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"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"protectedDirectoryUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:199}};t.loc.source={body:"mutation AddProtectedDirectoryUser(\n    $input: AddProtectedDirectoryUserInput!, \n) {\n    addProtectedDirectoryUser(input: $input) {\n        protectedDirectoryUser {\n            id\n        }\n    }\n}\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,s=new Set,a=new Set;for(o.forEach((function(e){a.add(e)}));a.size>0;){var c=a;a=new Set,c.forEach((function(e){s.has(e)||(s.add(e),(i[e]||new Set).forEach((function(e){a.add(e)})))}))}return s.forEach((function(t){var i=r(e,t);i&&n.definitions.push(i)})),n}(t,"AddProtectedDirectoryUser")}}]);
2//# sourceMappingURL=ProtectedDirectoryUserAddPage.js.map?5bb635a099190a3a740f

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.