PageSourceSearch

https://teileland.de/cp/javascript/components/pages/AssignIpAddressToResellerForm.js?5c4372a0586fab925b6b

js teileland.de collected 2026-10-06 11:19:54 UTC 6,888 bytes, 2 lines download raw bytes

1(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/AssignIpAddressToResellerForm"],{1069:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>o});var s=i(270),a=i(575),t=i(272),d=i.n(t),l=i(271);const r=({onClose:e,isOpen:n=!0,closeOnFormSuccess:i=!0,closeUrl:t="..",form:d,...r})=>{const o=(0,a.useNavigate)(),[u,c]=(0,s.useState)(n),m=(0,s.useRef)(null),p=(0,s.useCallback)(((...n)=>{const i=e??(()=>o(t,{preventScrollReset:!0}));c(!1),m.current=setTimeout((()=>{i(...n),m.current=null}),300)}),[t,o,e]);(0,s.useEffect)((()=>()=>clearTimeout(m.current)),[]),(0,s.useEffect)((()=>{n?m.current&&clearTimeout(m.current):c(n)}),[n]);const f=(0,s.useMemo)((()=>{if(d&&i){if((0,s.isValidElement)(d))return(0,s.cloneElement)(d,{onSuccess:()=>{d.props.onSuccess?.(),p()}});if("object"==typeof d)return{...d,onSuccess:()=>{d.onSuccess?.(),p()}}}return d}),[i,p,d]);return(0,s.jsx)(l.Drawer,{...r,form:f,onClose:p,isOpen:u})};r.propTypes={onClose:d().func,isOpen:d().bool,form:d().oneOfType([d().object,d().node]),closeOnFormSuccess:d().bool,closeUrl:d().oneOfType([d().string,d().object])};const o=r},2157:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>k});var s=i(271),a=i(1069),t=i(575),d=i(89),l=i(619),r=i(531),o=i(879),u=i(2158),c=i.n(u),m=i(270);const p=d.Locale.getTranslate("components.lists.ip-address-reseller-usage.assign"),f=d.Locale.getSection("components.lists.ip-address-reseller-usage.assign"),k=()=>{const[e,{loading:n}]=(0,l.useMutation)(c(),{onCompleted:e=>{const{addIpAddressToReseller:{addedClients:n}}=e;(0,r.addToast)({intent:"success",message:f.formatMessage("success",{name:(0,m.jsx)("b",{children:n[0].name}),count:n.length})})}}),{data:{ipAddress:i}}=(0,t.useLoaderData)(),u=(0,t.useNavigate)(),k=i.unassignedResellers?.length>0;return(0,m.jsx)(a.default,{"data-type":"ip-address-assign-to-reseller-drawer",title:(0,m.jsx)(p,{content:"title",params:{ipAddress:i.ipAddress}}),size:"sm",form:(0,m.jsx)(o.default,{"data-type":"client-ip-address-add-form",mutation:e,state:n?"submit":void 0,onSubmit:k?({reseller:e})=>{let n;return n="string"==typeof e?[e]:Object.entries(e).filter((([,e])=>Boolean(e))).map((([e])=>e)),{ipAddressId:i.id,clientIds:n}}:()=>u(".."),submitButton:{name:"send","data-action":"submit"},applyButton:!1,children:k?"SHARED"===i.type?(0,m.jsx)(s.FormField,{label:(0,m.jsx)(p,{content:"resellersToAdd"}),children:i.unassignedResellers.map((({id:e,name:n})=>(0,m.jsx)(s.FormFieldCheckbox,{name:`reseller[${e}]`,label:n},e)))}):(0,m.jsx)(s.FormFieldRadioButtons,{name:"reseller",label:(0,m.jsx)(p,{content:"resellersToAdd"}),options:i.unassignedResellers.map((({id:e,name:n})=>({value:e,label:n})))}):d.Locale.getSection("components.lists.ip-address-reseller-usage").lmsg("alreadyAssignedToAllClients")})})}},2156:(e,n,i)=>{"use strict";i.r(n),i.d(n,{default:()=>s.default});var s=i(2157)},2158:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AssingIpAddressToResellers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddIpAddressToResellerInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addIpAddressToReseller"},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:"ipAddress"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ipAddress"},arguments:[],directives:[]},{kind:"Field",alias:{kind:"Name",value:"unassignedResellers"},name:{kind:"Name",value:"clients"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"RESELLER"}},{kind:"ObjectField",name:{kind:"Name",value:"unassigned"},value:{kind:"BooleanValue",value:!0}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"clients"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filter"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"RESELLER"}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"addedClients"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:505}};
1n.loc.source={body:"mutation AssingIpAddressToResellers($input: AddIpAddressToResellerInput!) {\n    addIpAddressToReseller(input: $input) {\n        ipAddress {\n            id\n            ipAddress\n            unassignedResellers: clients(filter:{ type: RESELLER, unassigned: true }) {\n                id\n                name\n            }\n            clients(filter:{ type: RESELLER }) {\n                id\n                name\n            }\n        }\n        addedClients {\n            id\n            name\n        }\n    }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function i(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var s=e.type;"NamedType"===s.kind&&n.add(s.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){i(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){i(e,n)})),e.definitions&&e.definitions.forEach((function(e){i(e,n)}))}var s={};function a(e,n){for(var i=0;i<e.definitions.length;i++){var s=e.definitions[i];if(s.name&&s.name.value==n)return s}}n.definitions.forEach((function(e){if(e.name){var n=new Set;i(e,n),s[e.name.value]=n}})),e.exports=n,e.exports.AssingIpAddressToResellers=function(e,n){var i={kind:e.kind,definitions:[a(e,n)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var t=s[n]||new Set,d=new Set,l=new Set;for(t.forEach((function(e){l.add(e)}));l.size>0;){var r=l;l=new Set,r.forEach((function(e){d.has(e)||(d.add(e),(s[e]||new Set).forEach((function(e){l.add(e)})))}))}return d.forEach((function(n){var s=a(e,n);s&&i.definitions.push(s)})),i}(n,"AssingIpAddressToResellers")}}]);
2//# sourceMappingURL=AssignIpAddressToResellerForm.js.map?5c4372a0586fab925b6b

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.