PageSourceSearch

https://water-villa.com.tw/cp/javascript/components/pages/IpAddressDomainsPage.js?2471800728487020f479

js water-villa.com.tw collected 2026-10-07 21:51:37 UTC 2,526 bytes, 13 lines download raw bytes

1"use strict";(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["components/pages/IpAddressDomainsPage"],{1023:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var n=s(285),a=s(583),d=s(286);const o=({onClose:e,isOpen:t=!0,closeOnFormSuccess:s=!0,closeUrl:o="..",form:i,...r})=>{const u=(0,a.useNavigate)(),[l,c]=(0,n.useState)(t),p=(0,n.useRef)(null),m=(0,n.useCallback)(((...t)=>{const s=e??(()=>u(o,{preventScrollReset:!0}));c(!1),p.current=setTimeout((()=>{s(...t),p.current=null}),300)}),[o,u,e]);(0,n.useEffect)((()=>()=>{p.current&&clearTimeout(p.current)}),[]),(0,n.useEffect)((()=>{t?p.current&&clearTimeout(p.current):c(t)}),[t]);const f=(0,n.useMemo)((()=>{if(i&&s){if((0,n.isValidElement)(i))return(0,n.cloneElement)(i,{onSuccess:(...e)=>{i.props.onSuccess?.(...e),m()}});if("object"==typeof i)return{...i,onSuccess:(...e)=>{i.onSuccess?.(...e),m()}}}return i}),[s,m,i]);return(0,n.jsx)(d.Drawer,{...r,form:f,onClose:m,isOpen:l})}},1022:(e,t,s)=>{s.r(t),s.d(t,{default:()=>p});var n=s(285),a=s(583),d=s(286),o=s(1023),i=s(89),r=s(737),u=s(627);const l=r.gql`
2    mutation UpdateIpAddressDefaultDomain($input: UpdateIpAddressDefaultDomainInput!) {
3        updateIpAddressDefaultDomain(input: $input) {
4            ipAddress {
5                id
6                defaultDomain {
7                    id
8                }
9            }
10        }
11    }
12`,c=i.Locale.getTranslate("components.pages.ip-address-domains"),p=()=>{const e=(0,a.useNavigate)(),[t,s]=(0,n.useState)(),{ipAddress:i,viewer:r}=(0,a.useLoaderData)(),{ipAddressId:p}=(0,a.useParams)(),[m,{loading:f}]=(0,u.useMutation)(l,{onCompleted:()=>e(-1)}),D=t||i.defaultDomain?.id,A=t&&t!==i.defaultDomain?.id,j="ADMIN"===r.type||"EXCLUSIVE"===i.type,y=e=>()=>s(e),g=(0,n.useMemo)((()=>[{key:"name",title:(0,n.jsx)(c,{content:"site"}),type:"title",render:({id:e,name:t})=>j?(0,n.jsx)(d.Radio,{onChange:y(e),checked:D===e,children:t}):t}]),[D,j]);return(0,n.jsx)(o.default,{"data-type":"ip-address-domains-drawer",title:(0,n.jsx)(c,{content:"title",params:{type:(0,n.jsx)(c,{content:`type-${i.type}`}),ipAddress:i.ipAddress}}),children:(0,n.jsx)(d.List,{id:"ip-address-domains-list",rowKey:"id",data:i.domains,columns:g,toolbar:j?(0,n.jsx)(d.Toolbar,{children:(0,n.jsx)(d.Button,{"data-testid":"updateDomainButton",onClick:async()=>{await m({variables:{input:{ipAddressId:p,domainId:t}}})},disabled:!A,state:f?"loading":void 0,children:(0,n.jsx)(c,{content:"setAsDefault"})})}):null})})}}}]);
13//# sourceMappingURL=IpAddressDomainsPage.js.map?2471800728487020f479

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.