PageSourceSearch

https://app-cdn.helloscreen.com/ManageTeams.063f7462.js

js helloscreen.com collected 2026-10-08 16:06:52 UTC 14,528 bytes, 2 lines download raw bytes

1function e(e,t,a,l){Object.defineProperty(e,t,{get:a,set:l,enumerable:!0,configurable:!0})}var t=globalThis.parcelRequire94c2,a=t.register;a("7YZnR",function(a,l){Object.defineProperty(a.exports,"__esModule",{value:!0,configurable:!0}),e(a.exports,"default",()=>y);var n=t("ayMG0"),i=t("acw62"),r=t("aACZr"),s=t("gJPE6"),d=t("dVhJ8"),o=t("iL5oi"),c=t("l4KeD"),u=t("jFdmN"),f=t("dklJA"),m=t("iLJeT"),x=t("4Q1tF"),h=t("dtKoB"),g=t("iCMjC"),b=t("5aE2v"),w=t("hW7sX"),p=t("aur9A");function y(){let{logout:e,refresh:t,teamMemberships:a,teams:l}=(0,g.useAuthentication)(),{confirm:y}=(0,b.useModal)(),[j,v]=(0,i.useState)([]),N=a?.filter(e=>!j.includes(e.team.id))??[],k=N.filter(e=>e.permissions.canManageBilling&&!e.team.billingDelegatedToId).map(e=>e.team.id),[C,D]=(0,i.useState)(null),T=1===N.length;(0,r.default)((0,h.default)("Manage Teams"));let{call:A}=(0,w.useApi)("up.settings.teams.membership.delete"),{call:S}=(0,w.useApi)("up.settings.teams.delete");function R(e){D({billingOwnerId:e})}async function M(){D(null),await t()}async function O(a){if(await y({cancelText:(0,h.default)("Cancel"),confirmText:T?(0,h.default)("Delete my account"):(0,h.default)("Delete team"),content:T?(0,h.default)("This is your last team! If you delete it, your user account will also be deleted with it. Are you sure?"):(0,h.default)("Are you sure you want to delete this team?"),title:T?(0,h.default)("Delete account?"):(0,h.default)("Delete team?"),type:"warning"})){if(await S({teamId:a}),T)return void await e();v(e=>[...e,a]),await t()}}async function E(a){if(await y({cancelText:(0,h.default)("Cancel"),confirmText:T?(0,h.default)("Delete my account"):(0,h.default)("Leave team"),content:T?(0,h.default)("This is your last team! If you leave it, your user account will also be deleted with it. Are you sure you want to leave this team and delete your user account?"):(0,h.default)("Are you sure you want to leave team?"),title:T?(0,h.default)("Delete account?"):"Leave team?",type:"warning"})){if(await A({teamId:a}),T)return void await e();await t()}}return a?C?(0,n.jsx)(s.default,{narrow:!0,children:(0,n.jsx)(p.default,{...C,onDone:M})}):(0,n.jsx)(s.default,{narrow:!0,children:(0,n.jsxs)(f.default,{children:[(0,n.jsxs)(f.default.Header,{children:[(0,n.jsx)(f.default.Left,{children:(0,n.jsx)(f.default.Title,{children:(0,h.default)("Manage Teams")})}),(0,n.jsx)(f.default.Right,{children:(0,n.jsx)(o.default,{onClick:()=>{R()},children:(0,h.default)("New Team")})})]}),(0,n.jsxs)(m.default,{children:[(0,n.jsx)(m.default.Header,{children:(0,n.jsxs)(m.default.Row,{children:[(0,n.jsx)(m.default.Cell,{children:(0,h.default)("Name")}),(0,n.jsx)(m.default.Cell,{invisible:!0,shrink:!0})]})}),(0,n.jsx)(m.default.Body,{children:N.filter(e=>!e.team.isSubaccount||!l.map(e=>e.id).includes(e.team.billingDelegatedToId)).map(e=>(0,n.jsxs)(i.Fragment,{children:[(0,n.jsxs)(m.default.Row,{children:[(0,n.jsxs)(m.default.Cell,{children:[e.isOwner&&(0,n.jsx)(d.default,{children:(0,h.default)("Owner")})," ",e.team.domain,(0,n.jsx)(m.default.SubText,{children:x.PRODUCT_NAME})]}),(0,n.jsx)(m.default.Cell,{children:(0,n.jsx)(c.default,{links:[k.includes(e.team.id)&&{name:(0,h.default)("New subaccount"),onClick:()=>{R(e.team.id)}},e.isOwner?e.team.deletable&&{color:"red",name:T?(0,h.default)("Delete my account"):(0,h.default)("Delete team"),onClick:async()=>O(e.team.id)}:{color:"red",name:T?(0,h.default)("Delete my account"):(0,h.default)("Leave team"),onClick:async()=>E(e.team.id)}].filter(Boolean),children:(0,n.jsx)(c.DropdownIcon,{})})})]}),N.filter(t=>t.team.billingDelegatedToId===e.team.id).map(t=>(0,n.jsxs)(m.default.Row,{children:[(0,n.jsxs)(m.default.Cell,{subCell:!0,children:[t.isOwner&&e.isOwner&&(0,n.jsx)(d.default,{children:(0,h.default)("Subaccount")}
1)," ",t.team.domain,(0,n.jsx)(m.default.SubText,{children:x.PRODUCT_NAME})]}),(0,n.jsx)(m.default.Cell,{children:(0,n.jsx)(c.default,{links:[t.isOwner?t.team.deletable&&{color:"red",name:T?(0,h.default)("Delete my account"):(0,h.default)("Delete subaccount"),onClick:async()=>O(t.team.id)}:{color:"red",name:T?(0,h.default)("Delete my account"):(0,h.default)("Leave subaccount"),onClick:async()=>E(t.team.id)}].filter(Boolean),children:(0,n.jsx)(c.DropdownIcon,{})})})]},t.id))]},e.id))})]})]})}):(0,n.jsx)(s.default,{children:(0,n.jsx)(u.default,{})})}}),a("aACZr",function(a,l){e(a.exports,"default",()=>r);var n=t("acw62"),i={restoreOnUnmount:!1},r="u">typeof document?function(e,t){void 0===t&&(t=i);var a=(0,n.useRef)(document.title);document.title!==e&&(document.title=e),(0,n.useEffect)(function(){return t&&t.restoreOnUnmount?function(){document.title=a.current}:void 0},[])}:function(e){}}),a("gJPE6",function(a,l){e(a.exports,"default",()=>o);var n=t("ayMG0"),i=t("acw62"),r=t("01O3F"),s=t("bsRud"),d=t("jFdmN");function o({children:e,narrow:t}){return(0,n.jsx)("div",{className:"px-4 py-8 sm:px-6 lg:px-8 text-black dark:text-white relative",children:(0,n.jsx)("div",{className:(0,r.classNames)("space-y-6",t&&"max-w-4xl mx-auto"),children:(0,n.jsx)(i.Suspense,{fallback:(0,n.jsx)(s.default,{children:(0,n.jsx)(d.default,{})}),children:e})})})}o.Title=({children:e,right:t})=>(0,n.jsxs)("div",{className:"mt-10 mb-6 flex items-center",children:[(0,n.jsx)("h1",{className:"text-3xl font-semibold flex-1",children:e}),t]}),o.Heading=({children:e,right:t})=>(0,n.jsxs)("div",{className:"mt-10 mb-6 flex items-center",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold flex-1",children:e}),t]})}),a("dVhJ8",function(a,l){e(a.exports,"default",()=>r);var n=t("ayMG0"),i=t("01O3F");function r({children:e,color:t,className:a,onClick:l}){return(0,n.jsx)("span",{className:(0,i.classNames)("rounded-md whitespace-nowrap mt-0.5 px-1.5 py-0.5 text-xs font-semibold ring-1 ring-inset ring-black/20","green"===t&&"text-green-700 bg-green-50 ring-green-600/20","red"===t&&"text-red-700 bg-red-50 ring-red-600/20","blue"===t&&"text-blue-800 bg-blue-50 ring-blue-600/20","yellow"===t&&"text-yellow-800 bg-yellow-100 ring-yellow-600/40","gray"===t&&"text-gray-700 bg-gray-50 ring-gray-600/20",l&&"cursor-pointer",a),onClick:l,children:e})}}),a("iLJeT",function(a,l){e(a.exports,"default",()=>u);var n=t("ayMG0"),i=t("acw62"),r=t("01O3F"),s=t("iL5oi"),d=t("doin4"),o=t("1YjC8");function c({children:e,freezeColumns:t,narrow:a}){let l=(0,i.useRef)(null),[s,d]=(0,i.useState)(null),o=(0,i.useRef)(0);return(0,i.useEffect)(()=>{if(!t||s)return;let e=l.current;if(!e)return;let a=e.querySelector("tbody");if(!a||0===a.querySelectorAll("tr").length)return;let n=e.querySelectorAll("thead th");0===n.length||d(Array.from(n).map(e=>Math.round(e.getBoundingClientRect().width)))},[t,s,e]),(0,i.useEffect)(()=>{if(!t)return;let e=()=>{d(null)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[t]),(0,i.useEffect)(()=>{if(!t)return;let e=l.current;if(!e)return;let a=e.querySelectorAll("thead th").length;o.current>0&&a!==o.current&&d(null),o.current=a},[e,t]),(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("table",{className:"min-w-full divide-y divide-slate-200 dark:divide-black/20",ref:l,children:[s&&(0,n.jsx)("colgroup",{children:s.map((e,t)=>(0,n.jsx)("col",{style:{width:`${e}px`}},t))}),(0,r.addProps)(e,[c.Header,c.Body,c.Footer],{narrow:a})]})})}var u=c;c.Header=({children:e,narrow:t})=>(0,n.jsx)("thead",{className:"bg-slate-100/80 dark:bg-slate-900/10",children:(0,r.addProps)(e,c.Row,{header:!0,narrow:t})}),c.Footer=({children:e,narrow:t})=>(0,n.jsx)("tfoot",{className:"bg-slate-100/80 dark:bg-gray-700/20",children:(0,r.addProps)(e,c.Row,{narrow:t})}),c.Body=({children:e,narrow:t})=>(0,n.jsx)("tbody",{className:"divide-y divide-slate-200 bg-white dark:divide-black/20 dark:bg-gray-800",children:(0,r.addProps)(e,c.Row,{narrow:t})}),c.Row=({active:e,children:t,header:a,narrow:l,onClick:i,opaque:s,verticalAlign:d})=>(0,n.jsx)("tr",{className:"group/table-row",children:(0,r.addProps)(t,c.Cell,{active:e,header:a,narrow:l,onClick:i,opaque:s,verticalAlign:d})}),c.Cell=({active:e,align:t,children:a,className:l,header:i,invisible:c,narrow:u,onClick:f,opaque:m,shrink:x,subCell:h,verticalAlign:g,...b})=>{i??=!1,c??=!1,i??=!1;let w=["left"===(t??="left")&&"text-left","right"===t&&"text-right","center"===t&&"text-center","top"===(g??="top")&&"align-top","middle"===g&&"align-middle","bottom"===g&&"align-bottom",(x??=!1)&&"w-1 whitespace-nowrap",e&&"bg-gray-100 dark:bg-gray-700",u?"px-2 py-2.5":"px-3 py-3.5",f&&"curs
1or-pointer group-hover/table-row:bg-gray-100 dark:group-hover/table-row:bg-gray-700",(m??=!1)&&"opacity-50",(h??=!1)&&"shadow-[inset_3px_0_0_0_#8D5AF5]",l];return(a=(0,r.addProps)(a,[s.default,d.default,o.default],{size:u?"xs":"sm"}),c&&(a=(0,n.jsx)("span",{className:"sr-only",children:a})),i)?(0,n.jsxs)("th",{className:(0,r.classNames)("text-sm font-semibold text-gray-900 dark:text-white",...w),onClick:f,scope:"col",...b,children:[a," "]}):(0,n.jsx)("td",{className:(0,r.classNames)("text-gray-500 dark:text-gray-100",...w),onClick:f,...b,children:a})},c.StrongText=({children:e,className:t})=>(0,n.jsx)("span",{className:(0,r.classNames)("mt-1 text-sm font-semibold leading-5 text-gray-900 dark:text-white",t),children:e}),c.SubText=({children:e,className:t})=>(0,n.jsx)("span",{className:(0,r.classNames)("block text-xs leading-5 text-gray-500 dark:text-gray-400",t),children:e}),c.SubCellTitle=({children:e,className:t})=>(0,n.jsx)("span",{className:(0,r.classNames)("block mt-4 mb-3 text-sm font-semibold leading-5 text-gray-900 dark:text-white",t),children:e}),c.SubCellWell=({children:e,className:t})=>(0,n.jsx)("div",{className:(0,r.classNames)("p-2 bg-slate-100 dark:bg-black/10 rounded",t),children:e}),c.Empty=()=>(0,n.jsx)("span",{className:"inline-block h-0 w-8 border-b align-middle dark:border-gray-700"}),c.MultilineContent=({children:e})=>e&&0!==e.filter(Boolean).length?e.filter(Boolean).map((e,t)=>0===t?(0,n.jsx)(i.Fragment,{children:e},t):(0,n.jsx)(c.SubText,{children:e},t)):(0,n.jsx)(c.Empty,{}),c.Definition=({children:e,title:t})=>(0,n.jsxs)("div",{className:"py-2 sm:grid sm:grid-cols-3 sm:gap-4","data-role":"definition",children:[(0,n.jsx)("dt",{className:"text-sm font-semibold text-gray-500 dark:text-gray-400",children:t}),(0,n.jsx)("dd",{className:"underlined-links text-sm text-gray-700 sm:col-span-2 sm:mt-0 dark:text-gray-300",children:e})]})}),a("1YjC8",function(a,l){e(a.exports,"default",()=>c);var n=t("ayMG0"),i=t("iXFxr"),r=t("01O3F"),s=t("iL5oi"),d=t("NmU8R"),o=t("l4KeD");function c({children:e,className:t,links:a,loading:l,onClick:u,size:f}){return u?(0,n.jsxs)(d.default,{children:[(0,n.jsx)(s.default,{className:t,loading:l,onClick:u,size:f,variant:"action",children:e}),(0,n.jsx)(o.default,{buttonAs:s.default,buttonProps:{className:(0,r.classNames)(t,"px-1.5"),loading:l,size:f,variant:"action"},links:a,children:(0,n.jsx)(i.default,{})})]}):(0,n.jsx)(o.default,{links:a,children:(0,n.jsxs)(s.default,{className:t,loading:l,size:f,variant:"action",children:[e,(0,n.jsx)(i.default,{})]})})}}),a("iXFxr",function(a,l){e(a.exports,"default",()=>i);var n=t("acw62"),i=n.forwardRef(function({title:e,titleId:t,...a},l){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:l,"aria-labelledby":t},a),e?n.createElement("title",{id:t},e):null,n.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))})}),a("NmU8R",function(a,l){e(a.exports,"default",()=>c);var n=t("ayMG0"),i=t("01O3F"),r=t("iL5oi"),s=t("doin4"),d=t("l4KeD"),o=t("1YjC8");function c({children:e,className:t}){return e=(0,i.addProps)(e,[r.default,s.default],{variant:"action"}),e=(0,i.addClassNames)(e,"span",(0,r.buttonClassName)({className:"pointer-events-none",size:"md",variant:"action"})),(0,n.jsx)("div",{className:(0,i.classNames)("inline-flex items-stretch",t),children:(0,i.addClassNames)(e,[r.default,o.default,s.default,d.default,"span"],(e,t)=>["-ml-[1px] focus:z-10",0===e&&1!==t&&"rounded-r-none",0!==e&&e!==t-1&&"rounded-none",e===t-1&&1!==t&&"rounded-l-none"].filter(Boolean).join(" "))})}}),a("aur9A",function(a,l){e(a.exports,"default",()=>p);var n=t("ayMG0"),i=t("acw62"),r=t("22i8b"),s=t("47MOw"),d=t("kG3Fh"),o=t("cSimh"),c=t("iL5oi"),u=t("dklJA"),f=t("4Q1tF"),m=t("dtKoB"),x=t("iCMjC"),h=t("5aE2v"),g=t("76TUS"),b=t("hW7sX"),w=t("7xuAh");function p({billingOwnerId:e,onDone:t}){let{teams:a,user:l}=(0,x.useAuthentication)(),{confirm:y}=(0,h.useModal)(),j=(0,w.default)(),{call:v,isLoading:N}=(0,b.useApi)("up.teams.create"),[k,C]=(0,i.useState)(),{formState:{isDirty:D},handleSubmit:T,register:A,reset:S,setValue:R}=(0,r.useForm)({defaultValues:{subIdentifier:""}}),{markSaved:M}=(0,g.useTrackUnsavedChanges)(D);async function O(a){let l=await v({team:{billingOwnerId:e,subIdentifier:a.subIdentifier}});if(C(void 0),l.success){await t(),S(),e||(M(),j(["hs.documentSharing.present",{teamDomain:l.team.domain}]));return}switch(l.error){case"domain_already_in_use":C((0,m.default)("This domain is already being used"));return;
1case"invalid_billing_owner":y({content:(0,m.default)("This parent team cannot have subaccounts."),title:(0,m.default)("Invalid parent team"),type:"warning"});return;case"saml_user":y({content:(0,m.default)("Please ask your team administrator to create the new team and invite you to it."),title:(0,m.default)("You cannot create new teams"),type:"warning"});return;default:l.error}}return(0,n.jsxs)(u.default,{children:[(0,n.jsxs)(u.default.Header,{children:[(0,n.jsx)(u.default.Left,{children:e?(0,n.jsxs)(u.default.Title,{children:["Create new ",a.find(t=>t.id===e).domain," subaccount"]}):(0,n.jsxs)(u.default.Title,{children:["Create new ",f.PRODUCT_NAME," team"]})}),(0,n.jsx)(u.default.Right,{children:(0,n.jsx)(c.default,{onClick:t,variant:"action",children:"Cancel"})})]}),(0,n.jsx)(u.default.Content,{children:(0,n.jsxs)(s.default,{onSubmit:T(O),children:[(0,n.jsx)(d.default,{error:k,label:"New team name",children:(0,n.jsx)(o.default,{...A("subIdentifier",{onChange:e=>{C(void 0);let t=e.target.value.replace(/[^a-z0-9-]/g,"");e.target.value!==t&&R("subIdentifier",t)}}),autoFocus:!0,prefix:l.freeEmailDomain?`${l.username}-`:void 0,required:!0,suffix:l.freeEmailDomain?void 0:`.${l.emailDomain}`,type:"text"})}),(0,n.jsx)(c.default,{disabled:!D,loading:N,type:"submit",children:"Create team"})]})})]})}});
2//# sourceMappingURL=ManageTeams.063f7462.js.map

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.