@clerk/ui 1.0.0-snapshot.v20251217165918 → 1.0.0-snapshot.v20251218165926
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/573_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/ClerkUi.js +2 -2
- package/dist/common/WalletInitialIcon.js +36 -0
- package/dist/common/WalletInitialIcon.js.map +1 -0
- package/dist/components/OrganizationProfile/MemberListTable.js +3 -1
- package/dist/components/OrganizationProfile/MemberListTable.js.map +1 -1
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js +50 -21
- package/dist/components/SessionTasks/tasks/TaskChooseOrganization/index.js.map +1 -1
- package/dist/components/SignIn/AlternativeMethods.js +1 -1
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js +79 -0
- package/dist/components/SignIn/SignInFactorOneSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignIn/SignInSocialButtons.js +2 -1
- package/dist/components/SignIn/SignInSocialButtons.js.map +1 -1
- package/dist/components/SignIn/index.js +5 -0
- package/dist/components/SignIn/index.js.map +1 -1
- package/dist/components/SignUp/SignUpSocialButtons.js +2 -1
- package/dist/components/SignUp/SignUpSocialButtons.js.map +1 -1
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js +79 -0
- package/dist/components/SignUp/SignUpStartSolanaWalletsCard.js.map +1 -0
- package/dist/components/SignUp/index.js +5 -0
- package/dist/components/SignUp/index.js.map +1 -1
- package/dist/components/UserProfile/Web3Form.js +62 -41
- package/dist/components/UserProfile/Web3Form.js.map +1 -1
- package/dist/components/UserProfile/Web3Section.js +1 -1
- package/dist/components/UserProfile/Web3Section.js.map +1 -1
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js +73 -0
- package/dist/components/UserProfile/Web3SelectSolanaWalletScreen.js.map +1 -0
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js +173 -110
- package/dist/components/devPrompts/EnableOrganizationsPrompt/index.js.map +1 -1
- package/dist/customizables/elementDescriptors.js +10 -1
- package/dist/customizables/elementDescriptors.js.map +1 -1
- package/dist/elements/Web3SolanaWalletButtons.js +182 -0
- package/dist/elements/Web3SolanaWalletButtons.js.map +1 -0
- package/dist/elements/contexts/index.js.map +1 -1
- package/dist/{enableOrganizationsPrompt_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → enableOrganizationsPrompt_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +108 -22
- package/dist/foundations/defaultFoundations.d.ts +153 -153
- package/dist/index.js +1 -1
- package/dist/internal/appearance.d.ts +9 -0
- package/dist/internal/appearance.d.ts.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/lazyModules/components.d.ts +20 -20
- package/dist/sessionTasks_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/signin_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/signup_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/taskChooseOrganization_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/taskResetPassword_ui_17c90e_1.0.0-snapshot.v20251218165926.js +1 -0
- package/dist/themes/shadcn.js +2 -2
- package/dist/themes/shadcn.js.map +1 -1
- package/dist/ui-common_ui_17c90e_1.0.0-snapshot.v20251218165926.js +139 -0
- package/dist/ui.browser.js +3 -3
- package/dist/{userprofile_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → userprofile_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +2 -2
- package/dist/utils/web3CallbackErrorHandler.js +1 -1
- package/dist/utils/web3CallbackErrorHandler.js.map +1 -1
- package/dist/vendors_ui_17c90e_1.0.0-snapshot.v20251218165926.js +20 -0
- package/dist/web3-solana-wallet-buttons_ui_17c90e_1.0.0-snapshot.v20251218165926.js +143 -0
- package/package.json +10 -4
- package/dist/573_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/sessionTasks_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/signin_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/signup_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/taskChooseOrganization_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/taskResetPassword_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -1
- package/dist/ui-common_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -139
- package/dist/vendors_ui_7e9f20_1.0.0-snapshot.v20251217165918.js +0 -20
- /package/dist/{207_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → 207_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{217_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → 217_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{360_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → 360_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{444_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → 444_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{970_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → 970_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{apiKeys_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → apiKeys_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{blankcaptcha_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → blankcaptcha_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{checkout_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → checkout_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{copy-api-key-modal_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → copy-api-key-modal_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{createorganization_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → createorganization_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{framework_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → framework_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{impersonationfab_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → impersonationfab_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{keylessPrompt_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → keylessPrompt_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{oauthConsent_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → oauthConsent_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{onetap_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → onetap_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-api-keys-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → op-api-keys-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-billing-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → op-billing-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{op-plans-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → op-plans-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationlist_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → organizationlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationprofile_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → organizationprofile_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{organizationswitcher_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → organizationswitcher_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{payment-attempt-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → payment-attempt-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{planDetails_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → planDetails_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{prefetchorganizationlist_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → prefetchorganizationlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{pricingTable_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → pricingTable_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{revoke-api-key-modal_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → revoke-api-key-modal_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{statement-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → statement-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{subscriptionDetails_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → subscriptionDetails_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-api-keys-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → up-api-keys-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-billing-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → up-billing-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{up-plans-page_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → up-plans-page_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{useravatar_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → useravatar_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{userbutton_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → userbutton_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{userverification_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → userverification_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
- /package/dist/{waitlist_ui_7e9f20_1.0.0-snapshot.v20251217165918.js → waitlist_ui_17c90e_1.0.0-snapshot.v20251218165926.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["573"],{3934:function(e,t,i){i.d(t,{B:()=>y});var r=i(4518),l=i(3610),a=i(1210),o=i(5074),n=i(3269),s=i(2454),c=i(1475),d=i(6212),u=i(4468),p=i(3990),h=i(8640),m=i(7697),g=i(8272),f=i(3486),v=i(78),b=i(2861),Y=i(7591),_=i(4482);let z=e=>/^\S+@\S+\.\S+$/.test(e),y=e=>{let{onSuccess:t,onReset:i,resetButtonLabel:m}=e,{organization:f,invitations:_}=(0,a.Z5)({invitations:{pageSize:10,keepPreviousData:!0}}),y=(0,n.f0)(),{t:$,locale:D}=(0,v._)(),[w,k]=(0,o.useState)(!1),F=(0,h.tJ)("emailAddress","",{type:"text",label:(0,b.G)("formFieldLabel__emailAddresses")}),P=S(),C=(0,h.tJ)("role","",{label:(0,b.G)("formFieldLabel__role")});if((0,o.useEffect)(()=>{!C.value&&P&&C.setValue(P)},[P,C]),!f)return null;let{props:{setError:A,setWarning:E,setSuccess:G,setInfo:T,isFocused:K,validatePassword:M,setHasPassedComplexity:R,hasPassedComplexity:B,feedback:I,feedbackType:L,clearFeedback:j,...V}}=F,W=(!!F.value.length||w)&&!!C.value;return(0,r.FD)(s.l.Root,{onSubmit:e=>{if(e.preventDefault(),!W)return;let i=new FormData(e.currentTarget);return f.inviteMembers({emailAddresses:F.value.split(","),role:i.get("role")}).then(async()=>(await _?.revalidate?.(),t?.())).catch(e=>{var t;let i,r;if(!(0,l.$R)(e))return void(0,u.H4)(e,[],y.setError);switch(t=e.errors[0],i=new Set([...t.meta?.emailAddresses??[],...t.meta?.identifiers??[]]),r=F.value.split(","),F.setValue(r.filter(e=>!i.has(e)).join(",")),e.errors?.[0]?.code){case"duplicate_record":{let t=e.errors[0].meta?.emailAddresses||[];y.setError($((0,b.G)("organizationProfile.invitePage.detailsTitle__inviteFailed",{email_addresses:(0,p.kS)(t,D)})));break}case"already_a_member_in_organization":{let t=e.errors[0].longMessage??"",i=t.match(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/)?.[0];(0,u.H4)(e,[],e=>i?y.setError($((0,b.G)("unstable__errors.already_a_member_in_organization",{email:i}))):y.setError(e));break}default:(0,u.H4)(e,[],y.setError)}})},children:[(0,r.Y)(s.l.ControlRow,{elementId:F.id,children:(0,r.Y)(d.F,{...V,autoFocus:!0,validate:z,sx:{width:"100%"},validateUnsubmittedEmail:e=>k(z(e)),placeholder:(0,b.G)("formFieldInputPlaceholder__emailAddresses")})}),(0,r.FD)(g.so,{align:"center",justify:"between",sx:e=>({marginTop:e.space.$2,gap:e.space.$4,flexWrap:"wrap",[Y.g.sm]:{justifyContent:"center"}}),children:[(0,r.Y)(x,{...C}),(0,r.FD)(c.c,{sx:e=>({margin:e.space.$none,flexWrap:"wrap",justifyContent:"center"}),children:[(0,r.Y)(s.l.SubmitButton,{block:!1,isDisabled:!W,localizationKey:(0,b.G)("organizationProfile.invitePage.formButtonPrimary__continue")}),(0,r.Y)(s.l.ResetButton,{localizationKey:m||(0,b.G)("userProfile.formButtonReset"),block:!1,onClick:i})]})]})]})},x=e=>{let{options:t,isLoading:i}=(0,f.x)(),{t:l}=(0,v._)();return(0,r.Y)(s.l.ControlRow,{elementId:e.id,children:(0,r.Y)(g.so,{direction:"col",gap:2,children:(0,r.Y)(_.Vo,{...e.props,roles:t,isDisabled:i,onChange:t=>e.setValue(t),triggerSx:e=>({minWidth:e.sizes.$40,justifyContent:"space-between",display:"flex"}),optionListSx:e=>({minWidth:e.sizes.$48}),prefixLocalizationKey:`${l((0,b.G)("formFieldLabel__role"))}:`})})})},S=()=>{let{options:e}=(0,f.x)(),{organizationSettings:t}=(0,m.O)(),i=t.domains.defaultRole;return i||e?.length!==1||(i=e[0].value),i}},3100:function(e,t,i){i.d(t,{D:()=>f,k:()=>v});var r=i(4518),l=i(1210),a=i(3269),o=i(3549),n=i(6384),s=i(6370),c=i(6245),d=i(2861),u=i(8272),p=i(8920),h=i(2513),m=i(4421),g=i(3934);let f=(0,a.dm)(e=>{let{close:t}=(0,h.D5)(),{onReset:i=t}=e,n=(0,d.G)("organizationProfile.invitePage.title"),u=(0,d.G)("organizationProfile.invitePage.subtitle"),p=(0,a.f0)(),m=(0,c.X)({onNextStep:()=>p.setError(void 0)}),{organization:f}=(0,l.Z5)();return f?(0,r.FD)(c.s,{...m.props,children:[(0,r.Y)(o.M,{headerTitle:n,headerSubtitle:u,children:(0,r.Y)(g.B,{onSuccess:m.nextStep,onReset:i})}),(0,r.Y)(s.B,{title:n,onFinish:t,contents:(0,r.Y)(v,{})})]}):null}),v=()=>(0,r.FD)(u.so,{direction:"col",center:!0,gap:4,children:[(0,r.Y)(n.A,{boxElementDescriptor:p.$z.invitationsSentIconBox,iconElementDescriptor:p.$z.invitationsSentIcon,icon:m.A}),(0,r.Y)(u.EY,{localizationKey:(0,d.G)("organizationProfile.invitePage.successMessage")})]})},4482:function(e,t,i){i.d(t,{Vo:()=>g,Yq:()=>m,bQ:()=>p});var r=i(4518),l=i(5074),a=i(8819),o=i(1586),n=i(8272),s=i(8920),c=i(78),d=i(2861),u=i(3486);let p=e=>{let{headers:t,page:i,onPageChange:l,rows:o,isLoading:c,itemCount:d,itemsPerPage:u,pageCount:p,emptyStateLocalizationKey:m}=e,g=d>0?Math.max(0,(i-1)*u)+1:0,f=Math.min(i*u,d);return(0,r.FD)(n.fv,{gap:4,sx:{width:"100%"},children:[(0,r.Y)(n.so,{sx:e=>({overflowX:"auto",padding:e.space.$1}),children:(0,r.FD)(n.XI,{children:[(0,r.Y)(n.d8,{children:(0,r.Y)(n.Tr,{children:t.map((e,t)=>(0,r.Y)(n.Th,{elementDescriptor:s.$z.tableHead,localizationKey:e},t))})}),(0,r.Y)(n.NN,{children:c?(0,r.Y)(n.Tr,{children:(0,r.Y)(n.Td,{colSpan:4,children:(0,r.Y)(n.y$,{colorScheme:"primary",sx:{margin:"auto",display:"block"},elementDescriptor:s.$z.spinner})})}):o.length?o:(0,r.Y)(h,{localizationKey:m},"empty")})]})}),p>1&&(0,r.Y)(a.d,{count:p,page:i,onChange:l,siblingCount:1,rowInfo:{allRowsCount:d,startingRow:g,endingRow:f}})]})},h=e=>(0,r.Y)(n.Tr,{children:(0,r.Y)(n.Td,{colSpan:4,children:(0,r.Y)(n.EY,{localizationKey:e.localizationKey,sx:{margin:"auto",display:"block",width:"fit-content"}})})}),m=e=>(0,r.Y)(n.Tr,{...e,sx:e=>({":hover":{backgroundColor:e.colors.$neutralAlpha50}})}),g=e=>{let{value:t,fallbackLabel:i,roles:a,onChange:s,isDisabled:p,triggerSx:h,optionListSx:m,prefixLocalizationKey:g}=e,{localizeCustomRole:v}=(0,u.l)(),b=(0,l.useMemo)(()=>[...a||[]],[a]),Y=(0,l.useMemo)(()=>b.find(e=>e.value===t),[b,t]),{t:_}=(0,c._)(),z=(0,l.useMemo)(()=>b.map(e=>({value:e.value,label:v(e.value)||e.label})),[b,v]);return(0,r.FD)(o.l6,{elementId:"role",options:z,value:t,placeholder:_((0,d.G)("organizationProfile.invitePage.selectDropdown__role")),onChange:e=>s(e.value),renderOption:(e,t,i)=>(0,r.Y)(f,{isSelected:i,option:e}),children:[(0,r.Y)("input",{name:"role",type:"hidden",value:t}),(0,r.Y)(o.JC,{sx:h||(e=>({color:e.colors.$colorForeground,backgroundColor:"transparent",textWrap:"nowrap"})),isDisabled:p||!!t&&b.length>0&&!Y,children:Y?.label||Y?.value?(0,r.FD)(n.so,{as:"span",gap:1,children:[g&&(0,r.Y)(n.EY,{as:"span",colorScheme:"secondary",localizationKey:g}),(0,r.Y)(n.EY,{as:"span",colorScheme:"body",children:v(Y?.value)||Y?.label})]}):i?(0,r.Y)(n.EY,{as:"span",colorScheme:"body",children:i}):null}),(0,r.Y)(o.UL,{sx:m})]})},f=(0,l.memo)(e=>{let{option:t,isSelected:i,sx:l,...a}=e;return(0,r.Y)(n.so,{sx:[e=>({width:"100%",padding:`${e.space.$2} ${e.space.$4}`,borderRadius:e.radii.$md,"&:hover":{backgroundColor:e.colors.$neutralAlpha100},'&[data-focused="true"]':{backgroundColor:e.colors.$neutralAlpha150}}),l],...a,children:(0,r.Y)(n.EY,{variant:"subtitle",children:t?.label})})})},5377:function(e,t,i){i.d(t,{i:()=>c});var r=i(4518),l=i(3817),a=i(6890),o=i(8272),n=i(8920),s=i(2861);let c=e=>{let{organization:t,...i}=e;return(0,r.FD)(o.fv,{elementDescriptor:n.$z.organizationAvatarUploaderContainer,children:[(0,r.Y)(o.EY,{variant:"subtitle",sx:e=>({textAlign:"left",marginBottom:e.space.$2}),localizationKey:(0,s.G)("organizationProfile.start.profileSection.uploadAction__title")}),(0,r.Y)(l.k,{...i,title:(0,s.G)("userProfile.profilePage.imageFormTitle"),avatarPreview:(0,r.Y)(a.h,{size:e=>e.sizes.$16,...t})})]})}},3689:function(e,t,i){i.d(t,{l_:()=>l,mu:()=>r});let r={userMemberships:{infinite:!0},userInvitations:{infinite:!0},userSuggestions:{infinite:!0,status:["pending","accepted"]}},l=(e,t,i)=>{if(void 0===t)return[{data:[e],total_count:1}];let r=t?.[t.length-1]?.total_count||1;return t.map(t=>{if(void 0===t)return t;let l=t.data.map(t=>t.id===e.id?{...e}:t);return{...t,data:l,total_count:"negative"===i?r-1:r}})}}}]);
|
package/dist/ClerkUi.js
CHANGED
|
@@ -2,8 +2,8 @@ import { mountComponentRenderer } from "./Components.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/ClerkUi.ts
|
|
4
4
|
var ClerkUi = class {
|
|
5
|
-
static version = "1.0.0-snapshot.
|
|
6
|
-
version = "1.0.0-snapshot.
|
|
5
|
+
static version = "1.0.0-snapshot.v20251218165926";
|
|
6
|
+
version = "1.0.0-snapshot.v20251218165926";
|
|
7
7
|
#componentRenderer;
|
|
8
8
|
constructor(getClerk, getEnvironment, options, moduleManager) {
|
|
9
9
|
this.#componentRenderer = mountComponentRenderer(getClerk, getEnvironment, options, moduleManager);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { common } from "../styledSystem/common.js";
|
|
2
|
+
import { descriptors } from "../customizables/elementDescriptors.js";
|
|
3
|
+
import { Box, Text } from "../customizables/index.js";
|
|
4
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/common/WalletInitialIcon.tsx
|
|
7
|
+
const WalletInitialIcon = (props) => {
|
|
8
|
+
const { value, id,...rest } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
10
|
+
as: "span",
|
|
11
|
+
elementDescriptor: [descriptors.walletIcon, descriptors.web3SolanaWalletButtonsWalletInitialIcon],
|
|
12
|
+
elementId: descriptors.web3SolanaWalletButtonsWalletInitialIcon.setId(id),
|
|
13
|
+
sx: (t) => ({
|
|
14
|
+
...common.centeredFlex("inline-flex"),
|
|
15
|
+
width: t.space.$4,
|
|
16
|
+
height: t.space.$4,
|
|
17
|
+
borderRadius: t.radii.$sm,
|
|
18
|
+
color: t.colors.$colorPrimaryForeground,
|
|
19
|
+
backgroundColor: t.colors.$primary500
|
|
20
|
+
}),
|
|
21
|
+
...rest,
|
|
22
|
+
children: /* @__PURE__ */ jsx(Text, {
|
|
23
|
+
as: "span",
|
|
24
|
+
variant: "buttonSmall",
|
|
25
|
+
sx: {
|
|
26
|
+
...common.centeredFlex("inline-flex"),
|
|
27
|
+
width: "100%"
|
|
28
|
+
},
|
|
29
|
+
children: value[0].toUpperCase() ?? ""
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { WalletInitialIcon };
|
|
36
|
+
//# sourceMappingURL=WalletInitialIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletInitialIcon.js","names":[],"sources":["../../src/common/WalletInitialIcon.tsx"],"sourcesContent":["import { Box, descriptors, Text } from '../customizables';\nimport type { PropsOfComponent } from '../styledSystem';\nimport { common } from '../styledSystem';\n\ntype WalletInitialIconProps = PropsOfComponent<typeof Box> & {\n value: string;\n /**\n * The wallet provider name\n */\n id: string;\n};\n\nexport const WalletInitialIcon = (props: WalletInitialIconProps) => {\n const { value, id, ...rest } = props;\n\n return (\n <Box\n as='span'\n elementDescriptor={[descriptors.walletIcon, descriptors.web3SolanaWalletButtonsWalletInitialIcon]}\n elementId={descriptors.web3SolanaWalletButtonsWalletInitialIcon.setId(id)}\n sx={t => ({\n ...common.centeredFlex('inline-flex'),\n width: t.space.$4,\n height: t.space.$4,\n borderRadius: t.radii.$sm,\n color: t.colors.$colorPrimaryForeground,\n backgroundColor: t.colors.$primary500,\n })}\n {...rest}\n >\n <Text\n as='span'\n variant='buttonSmall'\n sx={{\n ...common.centeredFlex('inline-flex'),\n width: '100%',\n }}\n >\n {value[0].toUpperCase() ?? ''}\n </Text>\n </Box>\n );\n};\n"],"mappings":";;;;;;AAYA,MAAa,qBAAqB,UAAkC;CAClE,MAAM,EAAE,OAAO,GAAI,GAAG,SAAS;AAE/B,QACE,oBAAC;EACC,IAAG;EACH,mBAAmB,CAAC,YAAY,YAAY,YAAY,yCAAyC;EACjG,WAAW,YAAY,yCAAyC,MAAM,GAAG;EACzE,KAAI,OAAM;GACR,GAAG,OAAO,aAAa,cAAc;GACrC,OAAO,EAAE,MAAM;GACf,QAAQ,EAAE,MAAM;GAChB,cAAc,EAAE,MAAM;GACtB,OAAO,EAAE,OAAO;GAChB,iBAAiB,EAAE,OAAO;GAC3B;EACD,GAAI;YAEJ,oBAAC;GACC,IAAG;GACH,SAAQ;GACR,IAAI;IACF,GAAG,OAAO,aAAa,cAAc;IACrC,OAAO;IACR;aAEA,MAAM,GAAG,aAAa,IAAI;IACtB;GACH"}
|
|
@@ -127,7 +127,9 @@ const RolesListItem = memo((props) => {
|
|
|
127
127
|
sx: [(theme) => ({
|
|
128
128
|
width: "100%",
|
|
129
129
|
padding: `${theme.space.$2} ${theme.space.$4}`,
|
|
130
|
-
borderRadius: theme.radii.$md
|
|
130
|
+
borderRadius: theme.radii.$md,
|
|
131
|
+
"&:hover": { backgroundColor: theme.colors.$neutralAlpha100 },
|
|
132
|
+
"&[data-focused=\"true\"]": { backgroundColor: theme.colors.$neutralAlpha150 }
|
|
131
133
|
}), sx],
|
|
132
134
|
...rest,
|
|
133
135
|
children: /* @__PURE__ */ jsx(Text, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemberListTable.js","names":["t"],"sources":["../../../src/components/OrganizationProfile/MemberListTable.tsx"],"sourcesContent":["import React, { memo, useMemo } from 'react';\n\nimport { Pagination } from '@/ui/elements/Pagination';\nimport { Select, SelectButton, SelectOptionList } from '@/ui/elements/Select';\n\nimport type { LocalizationKey } from '../../customizables';\nimport {\n Col,\n descriptors,\n Flex,\n localizationKeys,\n Spinner,\n Table,\n Tbody,\n Td,\n Text,\n Th,\n Thead,\n Tr,\n useLocalizations,\n} from '../../customizables';\nimport { useLocalizeCustomRoles } from '../../hooks/useFetchRoles';\nimport { type PropsOfComponent, type ThemableCssProp } from '../../styledSystem';\n\ntype MembersListTableProps = {\n headers: LocalizationKey[];\n rows: React.ReactNode[];\n isLoading?: boolean;\n page: number;\n onPageChange: (page: number) => void;\n itemCount: number;\n emptyStateLocalizationKey: LocalizationKey;\n pageCount: number;\n itemsPerPage: number;\n};\n\nexport const DataTable = (props: MembersListTableProps) => {\n const {\n headers,\n page,\n onPageChange,\n rows,\n isLoading,\n itemCount,\n itemsPerPage,\n pageCount,\n emptyStateLocalizationKey,\n } = props;\n\n const startingRow = itemCount > 0 ? Math.max(0, (page - 1) * itemsPerPage) + 1 : 0;\n const endingRow = Math.min(page * itemsPerPage, itemCount);\n\n return (\n <Col\n gap={4}\n sx={{ width: '100%' }}\n >\n <Flex sx={t => ({ overflowX: 'auto', padding: t.space.$1 })}>\n <Table>\n <Thead>\n <Tr>\n {headers.map((h, index) => (\n <Th\n elementDescriptor={descriptors.tableHead}\n key={index}\n localizationKey={h}\n />\n ))}\n </Tr>\n </Thead>\n <Tbody>\n {isLoading ? (\n <Tr>\n <Td colSpan={4}>\n <Spinner\n colorScheme='primary'\n sx={{ margin: 'auto', display: 'block' }}\n elementDescriptor={descriptors.spinner}\n />\n </Td>\n </Tr>\n ) : !rows.length ? (\n <EmptyRow\n key='empty'\n localizationKey={emptyStateLocalizationKey}\n />\n ) : (\n rows\n )}\n </Tbody>\n </Table>\n </Flex>\n {pageCount > 1 && (\n <Pagination\n count={pageCount}\n page={page}\n onChange={onPageChange}\n siblingCount={1}\n rowInfo={{\n allRowsCount: itemCount,\n startingRow,\n endingRow,\n }}\n />\n )}\n </Col>\n );\n};\n\nconst EmptyRow = (props: { localizationKey: LocalizationKey }) => {\n return (\n <Tr>\n <Td colSpan={4}>\n <Text\n localizationKey={props.localizationKey}\n sx={{\n margin: 'auto',\n display: 'block',\n width: 'fit-content',\n }}\n />\n </Td>\n </Tr>\n );\n};\n\nexport const RowContainer = (props: PropsOfComponent<typeof Tr>) => {\n return (\n <Tr\n {...props}\n sx={t => ({ ':hover': { backgroundColor: t.colors.$neutralAlpha50 } })}\n />\n );\n};\n\nexport const RoleSelect = (props: {\n roles: { label: string; value: string }[] | undefined;\n value: string;\n fallbackLabel?: string;\n onChange: (params: string) => unknown;\n isDisabled?: boolean;\n triggerSx?: ThemableCssProp;\n optionListSx?: ThemableCssProp;\n prefixLocalizationKey?: LocalizationKey | string;\n}) => {\n const { value, fallbackLabel, roles, onChange, isDisabled, triggerSx, optionListSx, prefixLocalizationKey } = props;\n\n const { localizeCustomRole } = useLocalizeCustomRoles();\n\n const fetchedRoles = useMemo(() => [...(roles || [])], [roles]);\n\n const selectedRole = useMemo(() => fetchedRoles.find(r => r.value === value), [fetchedRoles, value]);\n const { t } = useLocalizations();\n\n const localizedOptions = useMemo(\n () =>\n fetchedRoles.map(role => ({\n value: role.value,\n label: localizeCustomRole(role.value) || role.label,\n })),\n [fetchedRoles, localizeCustomRole],\n );\n\n return (\n <Select\n elementId='role'\n options={localizedOptions}\n value={value}\n placeholder={t(localizationKeys('organizationProfile.invitePage.selectDropdown__role'))}\n onChange={role => onChange(role.value)}\n renderOption={(option, _index, isSelected) => (\n <RolesListItem\n isSelected={isSelected}\n option={option}\n />\n )}\n >\n {/*Store value inside an input in order to be accessible as form data*/}\n <input\n name='role'\n type='hidden'\n value={value}\n />\n <SelectButton\n sx={\n triggerSx ||\n (t => ({\n color: t.colors.$colorForeground,\n backgroundColor: 'transparent',\n textWrap: 'nowrap',\n }))\n }\n isDisabled={isDisabled || (!!value && fetchedRoles.length > 0 && !selectedRole)}\n >\n {selectedRole?.label || selectedRole?.value ? (\n <Flex\n as='span'\n gap={1}\n >\n {prefixLocalizationKey && (\n <Text\n as='span'\n colorScheme='secondary'\n localizationKey={prefixLocalizationKey}\n />\n )}\n <Text\n as='span'\n colorScheme='body'\n >\n {localizeCustomRole(selectedRole?.value) || selectedRole?.label}\n </Text>\n </Flex>\n ) : fallbackLabel ? (\n <Text\n as='span'\n colorScheme='body'\n >\n {fallbackLabel}\n </Text>\n ) : null}\n </SelectButton>\n <SelectOptionList sx={optionListSx} />\n </Select>\n );\n};\n\ntype RolesListItemProps = PropsOfComponent<typeof Flex> & {\n isSelected?: boolean;\n option?: {\n label: string;\n value: string;\n };\n};\n\nconst RolesListItem = memo((props: RolesListItemProps) => {\n const { option, isSelected, sx, ...rest } = props;\n return (\n <Flex\n sx={[\n theme => ({\n width: '100%',\n padding: `${theme.space.$2} ${theme.space.$4}`,\n borderRadius: theme.radii.$md,\n }),\n sx,\n ]}\n {...rest}\n >\n <Text variant='subtitle'>{option?.label}</Text>\n </Flex>\n );\n});\n"],"mappings":";;;;;;;;;;;AA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MAAM,MAAM;GAC1C,cAAc,MAAM,MAAM;
|
|
1
|
+
{"version":3,"file":"MemberListTable.js","names":["t"],"sources":["../../../src/components/OrganizationProfile/MemberListTable.tsx"],"sourcesContent":["import React, { memo, useMemo } from 'react';\n\nimport { Pagination } from '@/ui/elements/Pagination';\nimport { Select, SelectButton, SelectOptionList } from '@/ui/elements/Select';\n\nimport type { LocalizationKey } from '../../customizables';\nimport {\n Col,\n descriptors,\n Flex,\n localizationKeys,\n Spinner,\n Table,\n Tbody,\n Td,\n Text,\n Th,\n Thead,\n Tr,\n useLocalizations,\n} from '../../customizables';\nimport { useLocalizeCustomRoles } from '../../hooks/useFetchRoles';\nimport { type PropsOfComponent, type ThemableCssProp } from '../../styledSystem';\n\ntype MembersListTableProps = {\n headers: LocalizationKey[];\n rows: React.ReactNode[];\n isLoading?: boolean;\n page: number;\n onPageChange: (page: number) => void;\n itemCount: number;\n emptyStateLocalizationKey: LocalizationKey;\n pageCount: number;\n itemsPerPage: number;\n};\n\nexport const DataTable = (props: MembersListTableProps) => {\n const {\n headers,\n page,\n onPageChange,\n rows,\n isLoading,\n itemCount,\n itemsPerPage,\n pageCount,\n emptyStateLocalizationKey,\n } = props;\n\n const startingRow = itemCount > 0 ? Math.max(0, (page - 1) * itemsPerPage) + 1 : 0;\n const endingRow = Math.min(page * itemsPerPage, itemCount);\n\n return (\n <Col\n gap={4}\n sx={{ width: '100%' }}\n >\n <Flex sx={t => ({ overflowX: 'auto', padding: t.space.$1 })}>\n <Table>\n <Thead>\n <Tr>\n {headers.map((h, index) => (\n <Th\n elementDescriptor={descriptors.tableHead}\n key={index}\n localizationKey={h}\n />\n ))}\n </Tr>\n </Thead>\n <Tbody>\n {isLoading ? (\n <Tr>\n <Td colSpan={4}>\n <Spinner\n colorScheme='primary'\n sx={{ margin: 'auto', display: 'block' }}\n elementDescriptor={descriptors.spinner}\n />\n </Td>\n </Tr>\n ) : !rows.length ? (\n <EmptyRow\n key='empty'\n localizationKey={emptyStateLocalizationKey}\n />\n ) : (\n rows\n )}\n </Tbody>\n </Table>\n </Flex>\n {pageCount > 1 && (\n <Pagination\n count={pageCount}\n page={page}\n onChange={onPageChange}\n siblingCount={1}\n rowInfo={{\n allRowsCount: itemCount,\n startingRow,\n endingRow,\n }}\n />\n )}\n </Col>\n );\n};\n\nconst EmptyRow = (props: { localizationKey: LocalizationKey }) => {\n return (\n <Tr>\n <Td colSpan={4}>\n <Text\n localizationKey={props.localizationKey}\n sx={{\n margin: 'auto',\n display: 'block',\n width: 'fit-content',\n }}\n />\n </Td>\n </Tr>\n );\n};\n\nexport const RowContainer = (props: PropsOfComponent<typeof Tr>) => {\n return (\n <Tr\n {...props}\n sx={t => ({ ':hover': { backgroundColor: t.colors.$neutralAlpha50 } })}\n />\n );\n};\n\nexport const RoleSelect = (props: {\n roles: { label: string; value: string }[] | undefined;\n value: string;\n fallbackLabel?: string;\n onChange: (params: string) => unknown;\n isDisabled?: boolean;\n triggerSx?: ThemableCssProp;\n optionListSx?: ThemableCssProp;\n prefixLocalizationKey?: LocalizationKey | string;\n}) => {\n const { value, fallbackLabel, roles, onChange, isDisabled, triggerSx, optionListSx, prefixLocalizationKey } = props;\n\n const { localizeCustomRole } = useLocalizeCustomRoles();\n\n const fetchedRoles = useMemo(() => [...(roles || [])], [roles]);\n\n const selectedRole = useMemo(() => fetchedRoles.find(r => r.value === value), [fetchedRoles, value]);\n const { t } = useLocalizations();\n\n const localizedOptions = useMemo(\n () =>\n fetchedRoles.map(role => ({\n value: role.value,\n label: localizeCustomRole(role.value) || role.label,\n })),\n [fetchedRoles, localizeCustomRole],\n );\n\n return (\n <Select\n elementId='role'\n options={localizedOptions}\n value={value}\n placeholder={t(localizationKeys('organizationProfile.invitePage.selectDropdown__role'))}\n onChange={role => onChange(role.value)}\n renderOption={(option, _index, isSelected) => (\n <RolesListItem\n isSelected={isSelected}\n option={option}\n />\n )}\n >\n {/*Store value inside an input in order to be accessible as form data*/}\n <input\n name='role'\n type='hidden'\n value={value}\n />\n <SelectButton\n sx={\n triggerSx ||\n (t => ({\n color: t.colors.$colorForeground,\n backgroundColor: 'transparent',\n textWrap: 'nowrap',\n }))\n }\n isDisabled={isDisabled || (!!value && fetchedRoles.length > 0 && !selectedRole)}\n >\n {selectedRole?.label || selectedRole?.value ? (\n <Flex\n as='span'\n gap={1}\n >\n {prefixLocalizationKey && (\n <Text\n as='span'\n colorScheme='secondary'\n localizationKey={prefixLocalizationKey}\n />\n )}\n <Text\n as='span'\n colorScheme='body'\n >\n {localizeCustomRole(selectedRole?.value) || selectedRole?.label}\n </Text>\n </Flex>\n ) : fallbackLabel ? (\n <Text\n as='span'\n colorScheme='body'\n >\n {fallbackLabel}\n </Text>\n ) : null}\n </SelectButton>\n <SelectOptionList sx={optionListSx} />\n </Select>\n );\n};\n\ntype RolesListItemProps = PropsOfComponent<typeof Flex> & {\n isSelected?: boolean;\n option?: {\n label: string;\n value: string;\n };\n};\n\nconst RolesListItem = memo((props: RolesListItemProps) => {\n const { option, isSelected, sx, ...rest } = props;\n return (\n <Flex\n sx={[\n theme => ({\n width: '100%',\n padding: `${theme.space.$2} ${theme.space.$4}`,\n borderRadius: theme.radii.$md,\n '&:hover': {\n backgroundColor: theme.colors.$neutralAlpha100,\n },\n '&[data-focused=\"true\"]': {\n backgroundColor: theme.colors.$neutralAlpha150,\n },\n }),\n sx,\n ]}\n {...rest}\n >\n <Text variant='subtitle'>{option?.label}</Text>\n </Flex>\n );\n});\n"],"mappings":";;;;;;;;;;;AAoCA,MAAa,aAAa,UAAiC;CACzD,MAAM,EACJ,SACA,MACA,cACA,MACA,WACA,WACA,cACA,WACA,8BACE;CAEJ,MAAM,cAAc,YAAY,IAAI,KAAK,IAAI,IAAI,OAAO,KAAK,aAAa,GAAG,IAAI;CACjF,MAAM,YAAY,KAAK,IAAI,OAAO,cAAc,UAAU;AAE1D,QACE,qBAAC;EACC,KAAK;EACL,IAAI,EAAE,OAAO,QAAQ;aAErB,oBAAC;GAAK,KAAI,OAAM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B,OAAO,KAAK;GACZ,OAAO,mBAAmB,KAAK,MAAM,IAAI,KAAK;GAC/C,EAAE,EACL,CAAC,cAAc,mBAAmB,CACnC;EAMU;EACP,aAAa,EAAE,iBAAiB,sDAAsD,CAAC;EACvF,WAAU,SAAQ,SAAS,KAAK,MAAM;EACtC,eAAe,QAAQ,QAAQ,eAC7B,oBAAC;GACa;GACJ;IACR;;GAIJ,oBAAC;IACC,MAAK;IACL,MAAK;IACE;KACP;GACF,oBAAC;IACC,IACE,eACC,SAAM;KACL,OAAOA,IAAE,OAAO;KAChB,iBAAiB;KACjB,UAAU;KACX;IAEH,YAAY,cAAe,CAAC,CAAC,SAAS,aAAa,SAAS,KAAK,CAAC;cAEjE,cAAc,SAAS,cAAc,QACpC,qBAAC;KACC,IAAG;KACH,KAAK;gBAEJ,yBACC,oBAAC;MACC,IAAG;MACH,aAAY;MACZ,iBAAiB;OACjB,EAEJ,oBAAC;MACC,IAAG;MACH,aAAY;gBAEX,mBAAmB,cAAc,MAAM,IAAI,cAAc;OACrD;MACF,GACL,gBACF,oBAAC;KACC,IAAG;KACH,aAAY;eAEX;MACI,GACL;KACS;GACf,oBAAC,oBAAiB,IAAI,eAAgB;;GAC/B;;AAYb,MAAM,gBAAgB,MAAM,UAA8B;CACxD,MAAM,EAAE,QAAQ,YAAY,GAAI,GAAG,SAAS;AAC5C,QACE,oBAAC;EACC,IAAI,EACF,WAAU;GACR,OAAO;GACP,SAAS,GAAG,MAAM,MAAM,GAAG,GAAG,MAAM,MAAM;GAC1C,cAAc,MAAM,MAAM;GAC1B,WAAW,EACT,iBAAiB,MAAM,OAAO,kBAC/B;GACD,4BAA0B,EACxB,iBAAiB,MAAM,OAAO,kBAC/B;GACF,GACD,GACD;EACD,GAAI;YAEJ,oBAAC;GAAK,SAAQ;aAAY,QAAQ;IAAa;GAC1C;EAET"}
|
|
@@ -6,6 +6,7 @@ import { withCardStateProvider } from "../../../../elements/contexts/index.js";
|
|
|
6
6
|
import { Flow } from "../../../../customizables/Flow.js";
|
|
7
7
|
import { Flex, Spinner } from "../../../../customizables/index.js";
|
|
8
8
|
import { Card } from "../../../../elements/Card/index.js";
|
|
9
|
+
import { Header } from "../../../../elements/Header.js";
|
|
9
10
|
import { useMultipleSessions } from "../../../../hooks/useMultipleSessions.js";
|
|
10
11
|
import { useOrganizationListInView } from "../../../../hooks/useOrganizationListInView.js";
|
|
11
12
|
import { withTaskGuard } from "../shared/withTaskGuard.js";
|
|
@@ -23,13 +24,9 @@ const TaskChooseOrganizationInternal = () => {
|
|
|
23
24
|
const { userMemberships, userSuggestions, userInvitations } = useOrganizationListInView();
|
|
24
25
|
const { otherSessions } = useMultipleSessions({ user });
|
|
25
26
|
const { navigateAfterSignOut, navigateAfterMultiSessionSingleSignOutUrl } = useSignOutContext();
|
|
26
|
-
const handleSignOut = () => {
|
|
27
|
-
if (otherSessions.length === 0) return signOut(navigateAfterSignOut);
|
|
28
|
-
return signOut(navigateAfterMultiSessionSingleSignOutUrl, { sessionId: session?.id });
|
|
29
|
-
};
|
|
30
27
|
const isLoading = userMemberships?.isLoading || userInvitations?.isLoading || userSuggestions?.isLoading;
|
|
31
28
|
const hasExistingResources = !!(userMemberships?.count || userInvitations?.count || userSuggestions?.count);
|
|
32
|
-
|
|
29
|
+
user?.primaryEmailAddress?.emailAddress ?? user?.username;
|
|
33
30
|
return /* @__PURE__ */ jsx(Flow.Root, {
|
|
34
31
|
flow: "taskChooseOrganization",
|
|
35
32
|
children: /* @__PURE__ */ jsx(Flow.Part, {
|
|
@@ -53,30 +50,62 @@ const TaskChooseOrganizationInternal = () => {
|
|
|
53
50
|
elementDescriptor: descriptors.spinner
|
|
54
51
|
})
|
|
55
52
|
}) : /* @__PURE__ */ jsx(TaskChooseOrganizationFlows, { initialFlow: hasExistingResources ? "choose" : "create" })
|
|
56
|
-
}), /* @__PURE__ */ jsx(
|
|
57
|
-
elementId: "signOut",
|
|
58
|
-
gap: 2,
|
|
59
|
-
justify: "center",
|
|
60
|
-
sx: () => ({ width: "100%" }),
|
|
61
|
-
children: [identifier && /* @__PURE__ */ jsx(Card.ActionText, {
|
|
62
|
-
truncate: true,
|
|
63
|
-
localizationKey: localizationKeys("taskChooseOrganization.signOut.actionText", { identifier })
|
|
64
|
-
}), /* @__PURE__ */ jsx(Card.ActionLink, {
|
|
65
|
-
sx: () => ({ flexShrink: 0 }),
|
|
66
|
-
onClick: handleSignOut,
|
|
67
|
-
localizationKey: localizationKeys("taskChooseOrganization.signOut.actionLink")
|
|
68
|
-
})]
|
|
69
|
-
}) })] })
|
|
53
|
+
}), /* @__PURE__ */ jsx(TaskChooseOrganizationCardFooter, {})] })
|
|
70
54
|
})
|
|
71
55
|
});
|
|
72
56
|
};
|
|
57
|
+
const TaskChooseOrganizationCardFooter = () => {
|
|
58
|
+
const { signOut } = useClerk();
|
|
59
|
+
const { user } = useUser();
|
|
60
|
+
const { session } = useSession();
|
|
61
|
+
const { otherSessions } = useMultipleSessions({ user });
|
|
62
|
+
const { navigateAfterSignOut, navigateAfterMultiSessionSingleSignOutUrl } = useSignOutContext();
|
|
63
|
+
const handleSignOut = () => {
|
|
64
|
+
if (otherSessions.length === 0) return signOut(navigateAfterSignOut);
|
|
65
|
+
return signOut(navigateAfterMultiSessionSingleSignOutUrl, { sessionId: session?.id });
|
|
66
|
+
};
|
|
67
|
+
const identifier = user?.primaryEmailAddress?.emailAddress ?? user?.username;
|
|
68
|
+
return /* @__PURE__ */ jsx(Card.Footer, { children: /* @__PURE__ */ jsxs(Card.Action, {
|
|
69
|
+
elementId: "signOut",
|
|
70
|
+
gap: 2,
|
|
71
|
+
justify: "center",
|
|
72
|
+
sx: () => ({ width: "100%" }),
|
|
73
|
+
children: [identifier && /* @__PURE__ */ jsx(Card.ActionText, {
|
|
74
|
+
truncate: true,
|
|
75
|
+
localizationKey: localizationKeys("taskChooseOrganization.signOut.actionText", { identifier })
|
|
76
|
+
}), /* @__PURE__ */ jsx(Card.ActionLink, {
|
|
77
|
+
sx: () => ({ flexShrink: 0 }),
|
|
78
|
+
onClick: handleSignOut,
|
|
79
|
+
localizationKey: localizationKeys("taskChooseOrganization.signOut.actionLink")
|
|
80
|
+
})]
|
|
81
|
+
}) });
|
|
82
|
+
};
|
|
73
83
|
const TaskChooseOrganizationFlows = withCardStateProvider((props) => {
|
|
74
84
|
const [currentFlow, setCurrentFlow] = useState(props.initialFlow);
|
|
75
85
|
if (currentFlow === "create") return /* @__PURE__ */ jsx(CreateOrganizationScreen, { onCancel: props.initialFlow === "choose" ? () => setCurrentFlow("choose") : void 0 });
|
|
76
86
|
return /* @__PURE__ */ jsx(ChooseOrganizationScreen, { onCreateOrganizationClick: () => setCurrentFlow("create") });
|
|
77
87
|
});
|
|
78
|
-
const
|
|
88
|
+
const withOrganizationCreationEnabledGuard = (Component) => {
|
|
89
|
+
return (props) => {
|
|
90
|
+
const { user } = useUser();
|
|
91
|
+
if (!user?.createOrganizationEnabled) return /* @__PURE__ */ jsx(OrganizationCreationDisabledScreen, {});
|
|
92
|
+
return /* @__PURE__ */ jsx(Component, { ...props });
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
function OrganizationCreationDisabledScreen() {
|
|
96
|
+
return /* @__PURE__ */ jsx(Flow.Root, {
|
|
97
|
+
flow: "taskChooseOrganization",
|
|
98
|
+
children: /* @__PURE__ */ jsx(Flow.Part, {
|
|
99
|
+
part: "organizationCreationDisabled",
|
|
100
|
+
children: /* @__PURE__ */ jsxs(Card.Root, { children: [/* @__PURE__ */ jsx(Card.Content, { children: /* @__PURE__ */ jsxs(Header.Root, {
|
|
101
|
+
showLogo: true,
|
|
102
|
+
children: [/* @__PURE__ */ jsx(Header.Title, { localizationKey: localizationKeys("taskChooseOrganization.organizationCreationDisabled.title") }), /* @__PURE__ */ jsx(Header.Subtitle, { localizationKey: localizationKeys("taskChooseOrganization.organizationCreationDisabled.subtitle") })]
|
|
103
|
+
}) }), /* @__PURE__ */ jsx(TaskChooseOrganizationCardFooter, {})] })
|
|
104
|
+
})
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
const TaskChooseOrganization = withCoreSessionSwitchGuard(withTaskGuard(withCardStateProvider(withOrganizationCreationEnabledGuard(TaskChooseOrganizationInternal)), "choose-organization"));
|
|
79
108
|
|
|
80
109
|
//#endregion
|
|
81
|
-
export { TaskChooseOrganization };
|
|
110
|
+
export { TaskChooseOrganization, withOrganizationCreationEnabledGuard };
|
|
82
111
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/SessionTasks/tasks/TaskChooseOrganization/index.tsx"],"sourcesContent":["import { useClerk, useSession, useUser } from '@clerk/shared/react';\nimport { useState } from 'react';\n\nimport { useSignOutContext, withCoreSessionSwitchGuard } from '@/ui/contexts';\nimport { descriptors, Flex, Flow, localizationKeys, Spinner } from '@/ui/customizables';\nimport { Card } from '@/ui/elements/Card';\nimport { withCardStateProvider } from '@/ui/elements/contexts';\nimport { useMultipleSessions } from '@/ui/hooks/useMultipleSessions';\nimport { useOrganizationListInView } from '@/ui/hooks/useOrganizationListInView';\n\nimport { withTaskGuard } from '../shared';\nimport { ChooseOrganizationScreen } from './ChooseOrganizationScreen';\nimport { CreateOrganizationScreen } from './CreateOrganizationScreen';\n\nconst TaskChooseOrganizationInternal = () => {\n const { signOut } = useClerk();\n const { user } = useUser();\n const { session } = useSession();\n const { userMemberships, userSuggestions, userInvitations } = useOrganizationListInView();\n const { otherSessions } = useMultipleSessions({ user });\n const { navigateAfterSignOut, navigateAfterMultiSessionSingleSignOutUrl } = useSignOutContext();\n\n const handleSignOut = () => {\n if (otherSessions.length === 0) {\n return signOut(navigateAfterSignOut);\n }\n\n return signOut(navigateAfterMultiSessionSingleSignOutUrl, { sessionId: session?.id });\n };\n\n const isLoading = userMemberships?.isLoading || userInvitations?.isLoading || userSuggestions?.isLoading;\n const hasExistingResources = !!(userMemberships?.count || userInvitations?.count || userSuggestions?.count);\n const identifier = user?.primaryEmailAddress?.emailAddress ?? user?.username;\n\n return (\n <Flow.Root flow='taskChooseOrganization'>\n <Flow.Part part='chooseOrganization'>\n <Card.Root>\n <Card.Content sx={t => ({ padding: `${t.space.$8} ${t.space.$none} ${t.space.$none}`, gap: t.space.$7 })}>\n {isLoading ? (\n <Flex\n direction={'row'}\n align={'center'}\n justify={'center'}\n sx={t => ({\n height: '100%',\n minHeight: t.sizes.$100,\n })}\n >\n <Spinner\n size={'lg'}\n colorScheme={'primary'}\n elementDescriptor={descriptors.spinner}\n />\n </Flex>\n ) : (\n <TaskChooseOrganizationFlows initialFlow={hasExistingResources ? 'choose' : 'create'} />\n )}\n </Card.Content>\n\n <Card.Footer>\n
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../src/components/SessionTasks/tasks/TaskChooseOrganization/index.tsx"],"sourcesContent":["import { useClerk, useSession, useUser } from '@clerk/shared/react';\nimport { useState, type ComponentType } from 'react';\n\nimport { useSignOutContext, withCoreSessionSwitchGuard } from '@/ui/contexts';\nimport { descriptors, Flex, Flow, localizationKeys, Spinner } from '@/ui/customizables';\nimport { Card } from '@/ui/elements/Card';\nimport { withCardStateProvider } from '@/ui/elements/contexts';\nimport { Header } from '@/ui/elements/Header';\nimport { useMultipleSessions } from '@/ui/hooks/useMultipleSessions';\nimport { useOrganizationListInView } from '@/ui/hooks/useOrganizationListInView';\n\nimport { withTaskGuard } from '../shared';\nimport { ChooseOrganizationScreen } from './ChooseOrganizationScreen';\nimport { CreateOrganizationScreen } from './CreateOrganizationScreen';\n\nconst TaskChooseOrganizationInternal = () => {\n const { signOut } = useClerk();\n const { user } = useUser();\n const { session } = useSession();\n const { userMemberships, userSuggestions, userInvitations } = useOrganizationListInView();\n const { otherSessions } = useMultipleSessions({ user });\n const { navigateAfterSignOut, navigateAfterMultiSessionSingleSignOutUrl } = useSignOutContext();\n\n const handleSignOut = () => {\n if (otherSessions.length === 0) {\n return signOut(navigateAfterSignOut);\n }\n\n return signOut(navigateAfterMultiSessionSingleSignOutUrl, { sessionId: session?.id });\n };\n\n const isLoading = userMemberships?.isLoading || userInvitations?.isLoading || userSuggestions?.isLoading;\n const hasExistingResources = !!(userMemberships?.count || userInvitations?.count || userSuggestions?.count);\n const identifier = user?.primaryEmailAddress?.emailAddress ?? user?.username;\n\n return (\n <Flow.Root flow='taskChooseOrganization'>\n <Flow.Part part='chooseOrganization'>\n <Card.Root>\n <Card.Content sx={t => ({ padding: `${t.space.$8} ${t.space.$none} ${t.space.$none}`, gap: t.space.$7 })}>\n {isLoading ? (\n <Flex\n direction={'row'}\n align={'center'}\n justify={'center'}\n sx={t => ({\n height: '100%',\n minHeight: t.sizes.$100,\n })}\n >\n <Spinner\n size={'lg'}\n colorScheme={'primary'}\n elementDescriptor={descriptors.spinner}\n />\n </Flex>\n ) : (\n <TaskChooseOrganizationFlows initialFlow={hasExistingResources ? 'choose' : 'create'} />\n )}\n </Card.Content>\n\n <TaskChooseOrganizationCardFooter />\n </Card.Root>\n </Flow.Part>\n </Flow.Root>\n );\n};\n\nconst TaskChooseOrganizationCardFooter = () => {\n const { signOut } = useClerk();\n const { user } = useUser();\n const { session } = useSession();\n const { otherSessions } = useMultipleSessions({ user });\n const { navigateAfterSignOut, navigateAfterMultiSessionSingleSignOutUrl } = useSignOutContext();\n\n const handleSignOut = () => {\n if (otherSessions.length === 0) {\n return signOut(navigateAfterSignOut);\n }\n\n return signOut(navigateAfterMultiSessionSingleSignOutUrl, { sessionId: session?.id });\n };\n\n const identifier = user?.primaryEmailAddress?.emailAddress ?? user?.username;\n\n return (\n <Card.Footer>\n <Card.Action\n elementId='signOut'\n gap={2}\n justify='center'\n sx={() => ({ width: '100%' })}\n >\n {identifier && (\n <Card.ActionText\n truncate\n localizationKey={localizationKeys('taskChooseOrganization.signOut.actionText', {\n identifier,\n })}\n />\n )}\n <Card.ActionLink\n sx={() => ({ flexShrink: 0 })}\n onClick={handleSignOut}\n localizationKey={localizationKeys('taskChooseOrganization.signOut.actionLink')}\n />\n </Card.Action>\n </Card.Footer>\n );\n};\n\ntype TaskChooseOrganizationFlowsProps = {\n initialFlow: 'create' | 'choose';\n};\n\nconst TaskChooseOrganizationFlows = withCardStateProvider((props: TaskChooseOrganizationFlowsProps) => {\n const [currentFlow, setCurrentFlow] = useState(props.initialFlow);\n\n if (currentFlow === 'create') {\n return (\n <CreateOrganizationScreen\n onCancel={props.initialFlow === 'choose' ? () => setCurrentFlow('choose') : undefined}\n />\n );\n }\n\n return <ChooseOrganizationScreen onCreateOrganizationClick={() => setCurrentFlow('create')} />;\n});\n\nexport const withOrganizationCreationEnabledGuard = <T,>(Component: ComponentType<T>) => {\n return (props: T) => {\n const { user } = useUser();\n\n if (!user?.createOrganizationEnabled) {\n return <OrganizationCreationDisabledScreen />;\n }\n\n return <Component {...props} />;\n };\n};\n\nfunction OrganizationCreationDisabledScreen() {\n return (\n <Flow.Root flow='taskChooseOrganization'>\n <Flow.Part part='organizationCreationDisabled'>\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title\n localizationKey={localizationKeys('taskChooseOrganization.organizationCreationDisabled.title')}\n />\n <Header.Subtitle\n localizationKey={localizationKeys('taskChooseOrganization.organizationCreationDisabled.subtitle')}\n />\n </Header.Root>\n </Card.Content>\n\n <TaskChooseOrganizationCardFooter />\n </Card.Root>\n </Flow.Part>\n </Flow.Root>\n );\n}\n\nexport const TaskChooseOrganization = withCoreSessionSwitchGuard(\n withTaskGuard(\n withCardStateProvider(withOrganizationCreationEnabledGuard(TaskChooseOrganizationInternal)),\n 'choose-organization',\n ),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAeA,MAAM,uCAAuC;CAC3C,MAAM,EAAE,YAAY,UAAU;CAC9B,MAAM,EAAE,SAAS,SAAS;CAC1B,MAAM,EAAE,YAAY,YAAY;CAChC,MAAM,EAAE,iBAAiB,iBAAiB,oBAAoB,2BAA2B;CACzF,MAAM,EAAE,kBAAkB,oBAAoB,EAAE,MAAM,CAAC;CAC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AAK;GACJ;GACA,iBAAiB,iBAAiB,6CAA6C,EAC7E,YACD,CAAC;IACF,EAEJ,oBAAC,KAAK;GACJ,WAAW,EAAE,YAAY,GAAG;GAC5B,SAAS;GACT,iBAAiB,iBAAiB,4CAA4C;IAC9E;GACU,GACF;;AAQlB,MAAM,8BAA8B,uBAAuB,UAA4C;CACrG,MAAM,CAAC,aAAa,kBAAkB,SAAS,MAAM,YAAY;AAEjE,KAAI,gBAAgB,SAClB,QACE,oBAAC,4BACC,UAAU,MAAM,gBAAgB,iBAAiB,eAAe,SAAS,GAAG,SAC5E;AAIN,QAAO,oBAAC,4BAAyB,iCAAiC,eAAe,SAAS,GAAI;EAC9F;AAEF,MAAa,wCAA4C,cAAgC;AACvF,SAAQ,UAAa;EACnB,MAAM,EAAE,SAAS,SAAS;AAE1B,MAAI,CAAC,MAAM,0BACT,QAAO,oBAAC,uCAAqC;AAG/C,SAAO,oBAAC,aAAU,GAAI,QAAS;;;AAInC,SAAS,qCAAqC;AAC5C,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,oBAAC,KAAK;GAAK,MAAK;aACd,qBAAC,KAAK,mBACJ,oBAAC,KAAK,qBACJ,qBAAC,OAAO;IAAK;eACX,oBAAC,OAAO,SACN,iBAAiB,iBAAiB,4DAA4D,GAC9F,EACF,oBAAC,OAAO,YACN,iBAAiB,iBAAiB,+DAA+D,GACjG;KACU,GACD,EAEf,oBAAC,qCAAmC,IAC1B;IACF;GACF;;AAIhB,MAAa,yBAAyB,2BACpC,cACE,sBAAsB,qCAAqC,+BAA+B,CAAC,EAC3F,sBACD,CACF"}
|
|
@@ -15,8 +15,8 @@ import { Divider } from "../../elements/Divider.js";
|
|
|
15
15
|
import { Header } from "../../elements/Header.js";
|
|
16
16
|
import { formatSafeIdentifier } from "../../utils/formatSafeIdentifier.js";
|
|
17
17
|
import { ArrowBlockButton } from "../../elements/ArrowBlockButton.js";
|
|
18
|
-
import { useAlternativeStrategies } from "../../hooks/useAlternativeStrategies.js";
|
|
19
18
|
import { BackLink } from "../../elements/BackLink.js";
|
|
19
|
+
import { useAlternativeStrategies } from "../../hooks/useAlternativeStrategies.js";
|
|
20
20
|
import { SignInSocialButtons } from "./SignInSocialButtons.js";
|
|
21
21
|
import { useResetPasswordFactor } from "./useResetPasswordFactor.js";
|
|
22
22
|
import { withHavingTrouble } from "./withHavingTrouble.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { useRouter } from "../../router/RouteContext.js";
|
|
2
|
+
import { localizationKeys } from "../../localization/localizationKeys.js";
|
|
3
|
+
import { useSignInContext } from "../../contexts/components/SignIn.js";
|
|
4
|
+
import { descriptors } from "../../customizables/elementDescriptors.js";
|
|
5
|
+
import { useCardState, withCardStateProvider } from "../../elements/contexts/index.js";
|
|
6
|
+
import { Flow } from "../../customizables/Flow.js";
|
|
7
|
+
import { Flex, Spinner } from "../../customizables/index.js";
|
|
8
|
+
import { Card } from "../../elements/Card/index.js";
|
|
9
|
+
import { Header } from "../../elements/Header.js";
|
|
10
|
+
import { withRedirectToAfterSignIn, withRedirectToSignInTask } from "../../common/withRedirect.js";
|
|
11
|
+
import { BackLink } from "../../elements/BackLink.js";
|
|
12
|
+
import { web3CallbackErrorHandler } from "../../utils/web3CallbackErrorHandler.js";
|
|
13
|
+
import { Suspense, lazy } from "react";
|
|
14
|
+
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
|
|
15
|
+
import { useClerk } from "@clerk/shared/react";
|
|
16
|
+
|
|
17
|
+
//#region src/components/SignIn/SignInFactorOneSolanaWalletsCard.tsx
|
|
18
|
+
const Web3SolanaWalletButtons = lazy(() => import(
|
|
19
|
+
/* webpackChunkName: "web3-solana-wallet-buttons" */
|
|
20
|
+
"../../elements/Web3SolanaWalletButtons.js"
|
|
21
|
+
).then((m) => ({ default: m.Web3SolanaWalletButtons })));
|
|
22
|
+
const SignInFactorOneSolanaWalletsCardInner = () => {
|
|
23
|
+
const clerk = useClerk();
|
|
24
|
+
const card = useCardState();
|
|
25
|
+
const router = useRouter();
|
|
26
|
+
const ctx = useSignInContext();
|
|
27
|
+
const onBackLinkClick = () => {
|
|
28
|
+
router.navigate("../");
|
|
29
|
+
};
|
|
30
|
+
return /* @__PURE__ */ jsx(Flow.Part, {
|
|
31
|
+
part: "chooseWallet",
|
|
32
|
+
children: /* @__PURE__ */ jsxs(Card.Root, { children: [/* @__PURE__ */ jsxs(Card.Content, { children: [
|
|
33
|
+
/* @__PURE__ */ jsxs(Header.Root, {
|
|
34
|
+
showLogo: true,
|
|
35
|
+
children: [/* @__PURE__ */ jsx(Header.Title, { localizationKey: localizationKeys("signIn.web3Solana.title") }), /* @__PURE__ */ jsx(Header.Subtitle, { localizationKey: localizationKeys("signIn.web3Solana.subtitle") })]
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ jsx(Card.Alert, { children: card.error }),
|
|
38
|
+
/* @__PURE__ */ jsxs(Flex, {
|
|
39
|
+
direction: "col",
|
|
40
|
+
gap: 4,
|
|
41
|
+
children: [/* @__PURE__ */ jsx(Suspense, {
|
|
42
|
+
fallback: /* @__PURE__ */ jsx(Flex, {
|
|
43
|
+
direction: "row",
|
|
44
|
+
align: "center",
|
|
45
|
+
justify: "center",
|
|
46
|
+
sx: (t) => ({
|
|
47
|
+
height: "100%",
|
|
48
|
+
minHeight: t.sizes.$32
|
|
49
|
+
}),
|
|
50
|
+
children: /* @__PURE__ */ jsx(Spinner, {
|
|
51
|
+
size: "lg",
|
|
52
|
+
colorScheme: "primary",
|
|
53
|
+
elementDescriptor: descriptors.spinner
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
children: /* @__PURE__ */ jsx(Web3SolanaWalletButtons, { web3AuthCallback: ({ walletName }) => {
|
|
57
|
+
return clerk.authenticateWithWeb3({
|
|
58
|
+
customNavigate: router.navigate,
|
|
59
|
+
redirectUrl: ctx.afterSignInUrl || "/",
|
|
60
|
+
secondFactorUrl: "factor-two",
|
|
61
|
+
signUpContinueUrl: ctx.isCombinedFlow ? "create/continue" : ctx.signUpContinueUrl,
|
|
62
|
+
strategy: "web3_solana_signature",
|
|
63
|
+
walletName
|
|
64
|
+
}).catch((err) => web3CallbackErrorHandler(err, card.setError));
|
|
65
|
+
} })
|
|
66
|
+
}), /* @__PURE__ */ jsx(BackLink, {
|
|
67
|
+
boxElementDescriptor: descriptors.backRow,
|
|
68
|
+
linkElementDescriptor: descriptors.backLink,
|
|
69
|
+
onClick: onBackLinkClick
|
|
70
|
+
})]
|
|
71
|
+
})
|
|
72
|
+
] }), /* @__PURE__ */ jsx(Card.Footer, {})] })
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
const SignInFactorOneSolanaWalletsCard = withRedirectToSignInTask(withRedirectToAfterSignIn(withCardStateProvider(SignInFactorOneSolanaWalletsCardInner)));
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { SignInFactorOneSolanaWalletsCard };
|
|
79
|
+
//# sourceMappingURL=SignInFactorOneSolanaWalletsCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInFactorOneSolanaWalletsCard.js","names":[],"sources":["../../../src/components/SignIn/SignInFactorOneSolanaWalletsCard.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport { lazy, Suspense } from 'react';\n\nimport { withRedirectToAfterSignIn, withRedirectToSignInTask } from '@/ui/common/withRedirect';\nimport { descriptors, Flex, Flow, localizationKeys, Spinner } from '@/ui/customizables';\nimport { BackLink } from '@/ui/elements/BackLink';\nimport { Card } from '@/ui/elements/Card';\nimport { useCardState, withCardStateProvider } from '@/ui/elements/contexts';\nimport { Header } from '@/ui/elements/Header';\nimport { web3CallbackErrorHandler } from '@/ui/utils/web3CallbackErrorHandler';\n\nconst Web3SolanaWalletButtons = lazy(() =>\n import(/* webpackChunkName: \"web3-solana-wallet-buttons\" */ '@/ui/elements/Web3SolanaWalletButtons').then(m => ({\n default: m.Web3SolanaWalletButtons,\n })),\n);\n\nimport { useSignInContext } from '../../contexts';\nimport { useRouter } from '../../router';\n\nconst SignInFactorOneSolanaWalletsCardInner = () => {\n const clerk = useClerk();\n const card = useCardState();\n const router = useRouter();\n const ctx = useSignInContext();\n\n const onBackLinkClick = () => {\n void router.navigate('../');\n };\n\n return (\n <Flow.Part part='chooseWallet'>\n <Card.Root>\n <Card.Content>\n <Header.Root showLogo>\n <Header.Title localizationKey={localizationKeys('signIn.web3Solana.title')} />\n <Header.Subtitle localizationKey={localizationKeys('signIn.web3Solana.subtitle')} />\n </Header.Root>\n <Card.Alert>{card.error}</Card.Alert>\n <Flex\n direction='col'\n gap={4}\n >\n <Suspense\n fallback={\n <Flex\n direction={'row'}\n align={'center'}\n justify={'center'}\n sx={t => ({\n height: '100%',\n minHeight: t.sizes.$32,\n })}\n >\n <Spinner\n size={'lg'}\n colorScheme={'primary'}\n elementDescriptor={descriptors.spinner}\n />\n </Flex>\n }\n >\n <Web3SolanaWalletButtons\n web3AuthCallback={({ walletName }) => {\n return clerk\n .authenticateWithWeb3({\n customNavigate: router.navigate,\n redirectUrl: ctx.afterSignInUrl || '/',\n secondFactorUrl: 'factor-two',\n signUpContinueUrl: ctx.isCombinedFlow ? 'create/continue' : ctx.signUpContinueUrl,\n strategy: 'web3_solana_signature',\n walletName,\n })\n .catch(err => web3CallbackErrorHandler(err, card.setError));\n }}\n />\n </Suspense>\n\n <BackLink\n boxElementDescriptor={descriptors.backRow}\n linkElementDescriptor={descriptors.backLink}\n onClick={onBackLinkClick}\n />\n </Flex>\n </Card.Content>\n <Card.Footer />\n </Card.Root>\n </Flow.Part>\n );\n};\n\nexport const SignInFactorOneSolanaWalletsCard = withRedirectToSignInTask(\n withRedirectToAfterSignIn(withCardStateProvider(SignInFactorOneSolanaWalletsCardInner)),\n);\n"],"mappings":";;;;;;;;;;;;;;;;;AAWA,MAAM,0BAA0B,WAC9B;;CAA4D;EAAyC,MAAK,OAAM,EAC9G,SAAS,EAAE,yBACZ,EAAE,CACJ;AAKD,MAAM,8CAA8C;CAClD,MAAM,QAAQ,UAAU;CACxB,MAAM,OAAO,cAAc;CAC3B,MAAM,SAAS,WAAW;CAC1B,MAAM,MAAM,kBAAkB;CAE9B,MAAM,wBAAwB;AAC5B,EAAK,OAAO,SAAS,MAAM;;AAG7B,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,qBAAC,KAAK,mBACJ,qBAAC,KAAK;GACJ,qBAAC,OAAO;IAAK;eACX,oBAAC,OAAO,SAAM,iBAAiB,iBAAiB,0BAA0B,GAAI,EAC9E,oBAAC,OAAO,YAAS,iBAAiB,iBAAiB,6BAA6B,GAAI;KACxE;GACd,oBAAC,KAAK,mBAAO,KAAK,QAAmB;GACrC,qBAAC;IACC,WAAU;IACV,KAAK;eAEL,oBAAC;KACC,UACE,oBAAC;MACC,WAAW;MACX,OAAO;MACP,SAAS;MACT,KAAI,OAAM;OACR,QAAQ;OACR,WAAW,EAAE,MAAM;OACpB;gBAED,oBAAC;OACC,MAAM;OACN,aAAa;OACb,mBAAmB,YAAY;QAC/B;OACG;eAGT,oBAAC,2BACC,mBAAmB,EAAE,iBAAiB;AACpC,aAAO,MACJ,qBAAqB;OACpB,gBAAgB,OAAO;OACvB,aAAa,IAAI,kBAAkB;OACnC,iBAAiB;OACjB,mBAAmB,IAAI,iBAAiB,oBAAoB,IAAI;OAChE,UAAU;OACV;OACD,CAAC,CACD,OAAM,QAAO,yBAAyB,KAAK,KAAK,SAAS,CAAC;SAE/D;MACO,EAEX,oBAAC;KACC,sBAAsB,YAAY;KAClC,uBAAuB,YAAY;KACnC,SAAS;MACT;KACG;MACM,EACf,oBAAC,KAAK,WAAS,IACL;GACF;;AAIhB,MAAa,mCAAmC,yBAC9C,0BAA0B,sBAAsB,sCAAsC,CAAC,CACxF"}
|
|
@@ -5,8 +5,8 @@ import { useSignInContext } from "../../contexts/components/SignIn.js";
|
|
|
5
5
|
import { useCoreSignIn } from "../../contexts/CoreClientContext.js";
|
|
6
6
|
import { useCardState } from "../../elements/contexts/index.js";
|
|
7
7
|
import { handleError } from "../../utils/errorHandler.js";
|
|
8
|
-
import { originPrefersPopup } from "../../utils/originPrefersPopup.js";
|
|
9
8
|
import { web3CallbackErrorHandler } from "../../utils/web3CallbackErrorHandler.js";
|
|
9
|
+
import { originPrefersPopup } from "../../utils/originPrefersPopup.js";
|
|
10
10
|
import { SocialButtons } from "../../elements/SocialButtons.js";
|
|
11
11
|
import React from "react";
|
|
12
12
|
import { ERROR_CODES } from "@clerk/shared/internal/clerk-js/constants";
|
|
@@ -69,6 +69,7 @@ const SignInSocialButtons = React.memo((props) => {
|
|
|
69
69
|
}).catch((err) => handleError$1(err));
|
|
70
70
|
},
|
|
71
71
|
web3Callback: (strategy) => {
|
|
72
|
+
if (strategy === "web3_solana_signature") return navigate(`choose-wallet?strategy=${strategy}`);
|
|
72
73
|
return clerk.authenticateWithWeb3({
|
|
73
74
|
customNavigate: navigate,
|
|
74
75
|
redirectUrl: redirectUrlComplete,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignInSocialButtons.js","names":["handleError","_handleError"],"sources":["../../../src/components/SignIn/SignInSocialButtons.tsx"],"sourcesContent":["import type { ClerkAPIError } from '@clerk/shared/error';\nimport { isClerkAPIResponseError } from '@clerk/shared/error';\nimport { ERROR_CODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { useClerk } from '@clerk/shared/react';\nimport type { PhoneCodeChannel } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { handleError as _handleError } from '@/ui/utils/errorHandler';\nimport { originPrefersPopup } from '@/ui/utils/originPrefersPopup';\nimport { web3CallbackErrorHandler } from '@/ui/utils/web3CallbackErrorHandler';\n\nimport { buildSSOCallbackURL } from '../../common/redirects';\nimport { useCoreSignIn, useSignInContext } from '../../contexts';\nimport { useEnvironment } from '../../contexts/EnvironmentContext';\nimport { useCardState } from '../../elements/contexts';\nimport type { SocialButtonsProps } from '../../elements/SocialButtons';\nimport { SocialButtons } from '../../elements/SocialButtons';\nimport { useRouter } from '../../router';\n\nexport type SignInSocialButtonsProps = SocialButtonsProps & {\n onAlternativePhoneCodeProviderClick?: (channel: PhoneCodeChannel) => void;\n};\n\nexport const SignInSocialButtons = React.memo((props: SignInSocialButtonsProps) => {\n const clerk = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n const { displayConfig } = useEnvironment();\n const ctx = useSignInContext();\n const signIn = useCoreSignIn();\n const redirectUrl = buildSSOCallbackURL(ctx, displayConfig.signInUrl);\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n const shouldUsePopup = ctx.oauthFlow === 'popup' || (ctx.oauthFlow === 'auto' && originPrefersPopup());\n const { onAlternativePhoneCodeProviderClick, ...rest } = props;\n\n const handleError = (err: any) => {\n if (isClerkAPIResponseError(err)) {\n const sessionAlreadyExistsError: ClerkAPIError | undefined = err.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n\n if (sessionAlreadyExistsError) {\n return clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session }) => {\n await ctx.navigateOnSetActive({ session, redirectUrl: ctx.afterSignInUrl });\n },\n });\n }\n }\n\n return _handleError(err, [], card.setError);\n };\n\n return (\n <SocialButtons\n {...rest}\n showLastAuthenticationStrategy\n idleAfterDelay={!shouldUsePopup}\n oauthCallback={strategy => {\n if (shouldUsePopup) {\n // We create the popup window here with the `about:blank` URL since some browsers will block popups that are\n // opened within async functions. The `signInWithPopup` method handles setting the URL of the popup.\n const popup = window.open('about:blank', '', 'width=600,height=800');\n // Unfortunately, there's no good way to detect when the popup is closed, so we simply poll and check if it's closed.\n const interval = setInterval(() => {\n if (!popup || popup.closed) {\n clearInterval(interval);\n card.setIdle();\n }\n }, 500);\n\n return signIn\n .authenticateWithPopup({ strategy, redirectUrl, redirectUrlComplete, popup, oidcPrompt: ctx.oidcPrompt })\n .catch(err => handleError(err));\n }\n\n return signIn\n .authenticateWithRedirect({ strategy, redirectUrl, redirectUrlComplete, oidcPrompt: ctx.oidcPrompt })\n .catch(err => handleError(err));\n }}\n web3Callback={strategy => {\n return clerk\n .authenticateWithWeb3({\n customNavigate: navigate,\n redirectUrl: redirectUrlComplete,\n signUpContinueUrl: ctx.isCombinedFlow ? 'create/continue' : ctx.signUpContinueUrl,\n strategy,\n secondFactorUrl: 'factor-two',\n })\n .catch(err => web3CallbackErrorHandler(err, card.setError));\n }}\n alternativePhoneCodeCallback={channel => {\n onAlternativePhoneCodeProviderClick?.(channel);\n }}\n />\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAa,sBAAsB,MAAM,MAAM,UAAoC;CACjF,MAAM,QAAQ,UAAU;CACxB,MAAM,EAAE,aAAa,WAAW;CAChC,MAAM,OAAO,cAAc;CAC3B,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,MAAM,kBAAkB;CAC9B,MAAM,SAAS,eAAe;CAC9B,MAAM,cAAc,oBAAoB,KAAK,cAAc,UAAU;CACrE,MAAM,sBAAsB,IAAI,kBAAkB;CAClD,MAAM,iBAAiB,IAAI,cAAc,WAAY,IAAI,cAAc,UAAU,oBAAoB;CACrG,MAAM,EAAE,oCAAqC,GAAG,SAAS;CAEzD,MAAMA,iBAAe,QAAa;AAChC,MAAI,wBAAwB,IAAI,EAK9B;OAJ6D,IAAI,OAAO,MACrE,MAAqB,EAAE,SAAS,YAAY,eAC9C,CAGC,QAAO,MAAM,UAAU;IACrB,SAAS,MAAM,OAAO;IACtB,UAAU,OAAO,EAAE,cAAc;AAC/B,WAAM,IAAI,oBAAoB;MAAE;MAAS,aAAa,IAAI;MAAgB,CAAC;;IAE9E,CAAC;;AAIN,SAAOC,YAAa,KAAK,EAAE,EAAE,KAAK,SAAS;;AAG7C,QACE,oBAAC;EACC,GAAI;EACJ;EACA,gBAAgB,CAAC;EACjB,gBAAe,aAAY;AACzB,OAAI,gBAAgB;IAGlB,MAAM,QAAQ,OAAO,KAAK,eAAe,IAAI,uBAAuB;IAEpE,MAAM,WAAW,kBAAkB;AACjC,SAAI,CAAC,SAAS,MAAM,QAAQ;AAC1B,oBAAc,SAAS;AACvB,WAAK,SAAS;;OAEf,IAAI;AAEP,WAAO,OACJ,sBAAsB;KAAE;KAAU;KAAa;KAAqB;KAAO,YAAY,IAAI;KAAY,CAAC,CACxG,OAAM,QAAOD,cAAY,IAAI,CAAC;;AAGnC,UAAO,OACJ,yBAAyB;IAAE;IAAU;IAAa;IAAqB,YAAY,IAAI;IAAY,CAAC,CACpG,OAAM,QAAOA,cAAY,IAAI,CAAC;;EAEnC,eAAc,aAAY;AACxB,UAAO,MACJ,qBAAqB;IACpB,gBAAgB;IAChB,aAAa;IACb,mBAAmB,IAAI,iBAAiB,oBAAoB,IAAI;IAChE;IACA,iBAAiB;IAClB,CAAC,CACD,OAAM,QAAO,yBAAyB,KAAK,KAAK,SAAS,CAAC;;EAE/D,+BAA8B,YAAW;AACvC,yCAAsC,QAAQ;;GAEhD;EAEJ"}
|
|
1
|
+
{"version":3,"file":"SignInSocialButtons.js","names":["handleError","_handleError"],"sources":["../../../src/components/SignIn/SignInSocialButtons.tsx"],"sourcesContent":["import type { ClerkAPIError } from '@clerk/shared/error';\nimport { isClerkAPIResponseError } from '@clerk/shared/error';\nimport { ERROR_CODES } from '@clerk/shared/internal/clerk-js/constants';\nimport { useClerk } from '@clerk/shared/react';\nimport type { PhoneCodeChannel } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { handleError as _handleError } from '@/ui/utils/errorHandler';\nimport { originPrefersPopup } from '@/ui/utils/originPrefersPopup';\nimport { web3CallbackErrorHandler } from '@/ui/utils/web3CallbackErrorHandler';\n\nimport { buildSSOCallbackURL } from '../../common/redirects';\nimport { useCoreSignIn, useSignInContext } from '../../contexts';\nimport { useEnvironment } from '../../contexts/EnvironmentContext';\nimport { useCardState } from '../../elements/contexts';\nimport type { SocialButtonsProps } from '../../elements/SocialButtons';\nimport { SocialButtons } from '../../elements/SocialButtons';\nimport { useRouter } from '../../router';\n\nexport type SignInSocialButtonsProps = SocialButtonsProps & {\n onAlternativePhoneCodeProviderClick?: (channel: PhoneCodeChannel) => void;\n};\n\nexport const SignInSocialButtons = React.memo((props: SignInSocialButtonsProps) => {\n const clerk = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n const { displayConfig } = useEnvironment();\n const ctx = useSignInContext();\n const signIn = useCoreSignIn();\n const redirectUrl = buildSSOCallbackURL(ctx, displayConfig.signInUrl);\n const redirectUrlComplete = ctx.afterSignInUrl || '/';\n const shouldUsePopup = ctx.oauthFlow === 'popup' || (ctx.oauthFlow === 'auto' && originPrefersPopup());\n const { onAlternativePhoneCodeProviderClick, ...rest } = props;\n\n const handleError = (err: any) => {\n if (isClerkAPIResponseError(err)) {\n const sessionAlreadyExistsError: ClerkAPIError | undefined = err.errors.find(\n (e: ClerkAPIError) => e.code === ERROR_CODES.SESSION_EXISTS,\n );\n\n if (sessionAlreadyExistsError) {\n return clerk.setActive({\n session: clerk.client.lastActiveSessionId,\n navigate: async ({ session }) => {\n await ctx.navigateOnSetActive({ session, redirectUrl: ctx.afterSignInUrl });\n },\n });\n }\n }\n\n return _handleError(err, [], card.setError);\n };\n\n return (\n <SocialButtons\n {...rest}\n showLastAuthenticationStrategy\n idleAfterDelay={!shouldUsePopup}\n oauthCallback={strategy => {\n if (shouldUsePopup) {\n // We create the popup window here with the `about:blank` URL since some browsers will block popups that are\n // opened within async functions. The `signInWithPopup` method handles setting the URL of the popup.\n const popup = window.open('about:blank', '', 'width=600,height=800');\n // Unfortunately, there's no good way to detect when the popup is closed, so we simply poll and check if it's closed.\n const interval = setInterval(() => {\n if (!popup || popup.closed) {\n clearInterval(interval);\n card.setIdle();\n }\n }, 500);\n\n return signIn\n .authenticateWithPopup({ strategy, redirectUrl, redirectUrlComplete, popup, oidcPrompt: ctx.oidcPrompt })\n .catch(err => handleError(err));\n }\n\n return signIn\n .authenticateWithRedirect({ strategy, redirectUrl, redirectUrlComplete, oidcPrompt: ctx.oidcPrompt })\n .catch(err => handleError(err));\n }}\n web3Callback={strategy => {\n if (strategy === 'web3_solana_signature') {\n return navigate(`choose-wallet?strategy=${strategy}`);\n }\n\n return clerk\n .authenticateWithWeb3({\n customNavigate: navigate,\n redirectUrl: redirectUrlComplete,\n signUpContinueUrl: ctx.isCombinedFlow ? 'create/continue' : ctx.signUpContinueUrl,\n strategy,\n secondFactorUrl: 'factor-two',\n })\n .catch(err => web3CallbackErrorHandler(err, card.setError));\n }}\n alternativePhoneCodeCallback={channel => {\n onAlternativePhoneCodeProviderClick?.(channel);\n }}\n />\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAa,sBAAsB,MAAM,MAAM,UAAoC;CACjF,MAAM,QAAQ,UAAU;CACxB,MAAM,EAAE,aAAa,WAAW;CAChC,MAAM,OAAO,cAAc;CAC3B,MAAM,EAAE,kBAAkB,gBAAgB;CAC1C,MAAM,MAAM,kBAAkB;CAC9B,MAAM,SAAS,eAAe;CAC9B,MAAM,cAAc,oBAAoB,KAAK,cAAc,UAAU;CACrE,MAAM,sBAAsB,IAAI,kBAAkB;CAClD,MAAM,iBAAiB,IAAI,cAAc,WAAY,IAAI,cAAc,UAAU,oBAAoB;CACrG,MAAM,EAAE,oCAAqC,GAAG,SAAS;CAEzD,MAAMA,iBAAe,QAAa;AAChC,MAAI,wBAAwB,IAAI,EAK9B;OAJ6D,IAAI,OAAO,MACrE,MAAqB,EAAE,SAAS,YAAY,eAC9C,CAGC,QAAO,MAAM,UAAU;IACrB,SAAS,MAAM,OAAO;IACtB,UAAU,OAAO,EAAE,cAAc;AAC/B,WAAM,IAAI,oBAAoB;MAAE;MAAS,aAAa,IAAI;MAAgB,CAAC;;IAE9E,CAAC;;AAIN,SAAOC,YAAa,KAAK,EAAE,EAAE,KAAK,SAAS;;AAG7C,QACE,oBAAC;EACC,GAAI;EACJ;EACA,gBAAgB,CAAC;EACjB,gBAAe,aAAY;AACzB,OAAI,gBAAgB;IAGlB,MAAM,QAAQ,OAAO,KAAK,eAAe,IAAI,uBAAuB;IAEpE,MAAM,WAAW,kBAAkB;AACjC,SAAI,CAAC,SAAS,MAAM,QAAQ;AAC1B,oBAAc,SAAS;AACvB,WAAK,SAAS;;OAEf,IAAI;AAEP,WAAO,OACJ,sBAAsB;KAAE;KAAU;KAAa;KAAqB;KAAO,YAAY,IAAI;KAAY,CAAC,CACxG,OAAM,QAAOD,cAAY,IAAI,CAAC;;AAGnC,UAAO,OACJ,yBAAyB;IAAE;IAAU;IAAa;IAAqB,YAAY,IAAI;IAAY,CAAC,CACpG,OAAM,QAAOA,cAAY,IAAI,CAAC;;EAEnC,eAAc,aAAY;AACxB,OAAI,aAAa,wBACf,QAAO,SAAS,0BAA0B,WAAW;AAGvD,UAAO,MACJ,qBAAqB;IACpB,gBAAgB;IAChB,aAAa;IACb,mBAAmB,IAAI,iBAAiB,oBAAoB,IAAI;IAChE;IACA,iBAAiB;IAClB,CAAC,CACD,OAAM,QAAO,yBAAyB,KAAK,KAAK,SAAS,CAAC;;EAE/D,+BAA8B,YAAW;AACvC,yCAAsC,QAAQ;;GAEhD;EAEJ"}
|
|
@@ -9,6 +9,7 @@ import { withCoreSessionSwitchGuard } from "../../contexts/CoreSessionContext.js
|
|
|
9
9
|
import { Flow } from "../../customizables/Flow.js";
|
|
10
10
|
import { SignInEmailLinkFlowComplete, SignUpEmailLinkFlowComplete } from "../../common/EmailLinkCompleteFlowCard.js";
|
|
11
11
|
import { usePreloadTasks } from "../../hooks/usePreloadTasks.js";
|
|
12
|
+
import { SignInFactorOneSolanaWalletsCard } from "./SignInFactorOneSolanaWalletsCard.js";
|
|
12
13
|
import { normalizeRoutingOptions } from "../../utils/normalizeRoutingOptions.js";
|
|
13
14
|
import { LazySignUpContinue, LazySignUpSSOCallback, LazySignUpStart, LazySignUpVerifyEmail, LazySignUpVerifyPhone, preloadSignUp } from "./lazy-sign-up.js";
|
|
14
15
|
import { ResetPassword } from "./ResetPassword.js";
|
|
@@ -75,6 +76,10 @@ function SignInRoutes() {
|
|
|
75
76
|
path: "choose",
|
|
76
77
|
children: /* @__PURE__ */ jsx(SignInAccountSwitcher, {})
|
|
77
78
|
}),
|
|
79
|
+
/* @__PURE__ */ jsx(Route, {
|
|
80
|
+
path: "choose-wallet",
|
|
81
|
+
children: /* @__PURE__ */ jsx(SignInFactorOneSolanaWalletsCard, {})
|
|
82
|
+
}),
|
|
78
83
|
/* @__PURE__ */ jsx(Route, {
|
|
79
84
|
path: "verify",
|
|
80
85
|
children: /* @__PURE__ */ jsx(SignInEmailLinkFlowComplete, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["LazySessionTasks","SignIn: React.ComponentType<SignInProps>","InternalSignIn: React.ComponentType<WithInternalRouting<SignInProps>>"],"sources":["../../../src/components/SignIn/index.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { SignInModalProps, SignInProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { SignInEmailLinkFlowComplete, SignUpEmailLinkFlowComplete } from '@/common/EmailLinkCompleteFlowCard';\nimport {\n SignInContext,\n SignUpContext,\n useSignInContext,\n useSignUpContext,\n withCoreSessionSwitchGuard,\n} from '@/contexts';\nimport { Flow } from '@/customizables';\nimport { useFetch } from '@/hooks';\nimport { usePreloadTasks } from '@/hooks/usePreloadTasks';\nimport type { WithInternalRouting } from '@/internal';\nimport { SessionTasks as LazySessionTasks } from '@/lazyModules/components';\nimport { Route, Switch, VIRTUAL_ROUTER_BASE_PATH } from '@/router';\nimport type { SignUpCtx } from '@/types';\nimport { normalizeRoutingOptions } from '@/utils/normalizeRoutingOptions';\n\nimport {\n LazySignUpContinue,\n LazySignUpSSOCallback,\n LazySignUpStart,\n LazySignUpVerifyEmail,\n LazySignUpVerifyPhone,\n preloadSignUp,\n} from './lazy-sign-up';\nimport { ResetPassword } from './ResetPassword';\nimport { ResetPasswordSuccess } from './ResetPasswordSuccess';\nimport { SignInAccountSwitcher } from './SignInAccountSwitcher';\nimport { SignInClientTrust } from './SignInClientTrust';\nimport { SignInFactorOne } from './SignInFactorOne';\nimport { SignInFactorTwo } from './SignInFactorTwo';\nimport { SignInSSOCallback } from './SignInSSOCallback';\nimport { SignInStart } from './SignInStart';\n\nfunction RedirectToSignIn() {\n const clerk = useClerk();\n React.useEffect(() => {\n void clerk.redirectToSignIn();\n }, []);\n return null;\n}\n\nfunction SignInRoutes(): JSX.Element {\n const signInContext = useSignInContext();\n const signUpContext = useSignUpContext();\n\n return (\n <Flow.Root flow='signIn'>\n <Switch>\n <Route path='factor-one'>\n <SignInFactorOne />\n </Route>\n <Route path='factor-two'>\n <SignInFactorTwo />\n </Route>\n <Route path='client-trust'>\n <SignInClientTrust />\n </Route>\n <Route path='reset-password'>\n <ResetPassword />\n </Route>\n <Route path='reset-password-success'>\n <ResetPasswordSuccess />\n </Route>\n <Route path='sso-callback'>\n <SignInSSOCallback\n signUpUrl={signInContext.signUpUrl}\n signInUrl={signInContext.signInUrl}\n signInForceRedirectUrl={signInContext.afterSignInUrl}\n signUpForceRedirectUrl={signInContext.afterSignUpUrl}\n continueSignUpUrl={signInContext.signUpContinueUrl}\n transferable={signInContext.transferable}\n firstFactorUrl={'../factor-one'}\n secondFactorUrl={'../factor-two'}\n resetPasswordUrl={'../reset-password'}\n />\n </Route>\n <Route path='choose'>\n <SignInAccountSwitcher />\n </Route>\n <Route path='verify'>\n <SignInEmailLinkFlowComplete\n redirectUrlComplete={signInContext.afterSignInUrl}\n redirectUrl='../factor-two'\n />\n </Route>\n\n {signInContext.isCombinedFlow && (\n <Route path='create'>\n <Route\n path='verify-email-address'\n canActivate={clerk => !!clerk.client.signUp.emailAddress}\n >\n <LazySignUpVerifyEmail />\n </Route>\n <Route\n path='verify-phone-number'\n canActivate={clerk => !!clerk.client.signUp.phoneNumber}\n >\n <LazySignUpVerifyPhone />\n </Route>\n <Route path='sso-callback'>\n <LazySignUpSSOCallback\n signUpUrl={signUpContext.signUpUrl}\n signInUrl={signUpContext.signInUrl}\n signUpForceRedirectUrl={signUpContext.afterSignUpUrl}\n signInForceRedirectUrl={signUpContext.afterSignInUrl}\n secondFactorUrl={signUpContext.secondFactorUrl}\n continueSignUpUrl='../continue'\n verifyEmailAddressUrl='../verify-email-address'\n verifyPhoneNumberUrl='../verify-phone-number'\n />\n </Route>\n <Route path='verify'>\n <SignUpEmailLinkFlowComplete\n redirectUrlComplete={signUpContext.afterSignUpUrl}\n verifyEmailPath='../verify-email-address'\n verifyPhonePath='../verify-phone-number'\n continuePath='../continue'\n />\n </Route>\n <Route path='continue'>\n <Route\n path='verify-email-address'\n canActivate={clerk => !!clerk.client.signUp.emailAddress}\n >\n <LazySignUpVerifyEmail />\n </Route>\n <Route\n path='verify-phone-number'\n canActivate={clerk => !!clerk.client.signUp.phoneNumber}\n >\n <LazySignUpVerifyPhone />\n </Route>\n <Route index>\n <LazySignUpContinue />\n </Route>\n </Route>\n <Route path='tasks'>\n <LazySessionTasks redirectUrlComplete={signInContext.afterSignUpUrl} />\n </Route>\n <Route index>\n <LazySignUpStart />\n </Route>\n </Route>\n )}\n <Route path='tasks'>\n <LazySessionTasks redirectUrlComplete={signInContext.afterSignInUrl} />\n </Route>\n <Route index>\n <SignInStart />\n </Route>\n <Route>\n <RedirectToSignIn />\n </Route>\n </Switch>\n </Flow.Root>\n );\n}\n\nconst usePreloadSignUp = (enabled = false) =>\n useFetch(enabled ? preloadSignUp : undefined, 'preloadComponent', { staleTime: Infinity });\n\nfunction SignInRoot() {\n const signInContext = useSignInContext();\n const normalizedSignUpContext = {\n componentName: 'SignUp',\n emailLinkRedirectUrl: signInContext.emailLinkRedirectUrl,\n ssoCallbackUrl: signInContext.ssoCallbackUrl,\n forceRedirectUrl: signInContext.signUpForceRedirectUrl,\n fallbackRedirectUrl: signInContext.signUpFallbackRedirectUrl,\n signInUrl: signInContext.signInUrl,\n unsafeMetadata: signInContext.unsafeMetadata,\n ...normalizeRoutingOptions({ routing: signInContext?.routing, path: signInContext?.path }),\n } as SignUpCtx;\n\n /**\n * Preload Sign Up when in Combined Flow.\n */\n usePreloadSignUp(signInContext.isCombinedFlow);\n\n usePreloadTasks();\n\n return (\n <SignUpContext.Provider value={normalizedSignUpContext}>\n <SignInRoutes />\n </SignUpContext.Provider>\n );\n}\n\nSignInRoutes.displayName = 'SignIn';\n\nexport const SignIn: React.ComponentType<SignInProps> = withCoreSessionSwitchGuard(SignInRoot);\n\nconst InternalSignIn: React.ComponentType<WithInternalRouting<SignInProps>> = withCoreSessionSwitchGuard(SignInRoot);\n\nexport const SignInModal = (props: SignInModalProps): JSX.Element => {\n const signInProps = {\n signUpUrl: `/${VIRTUAL_ROUTER_BASE_PATH}/sign-up`,\n waitlistUrl: `/${VIRTUAL_ROUTER_BASE_PATH}/waitlist`,\n ...props,\n };\n\n return (\n <Route path='sign-in'>\n <SignInContext.Provider\n value={{\n componentName: 'SignIn',\n ...signInProps,\n routing: 'virtual',\n mode: 'modal',\n }}\n >\n {/*TODO: Used by InvisibleRootBox, can we simplify? */}\n <div>\n <InternalSignIn\n {...signInProps}\n routing='virtual'\n />\n </div>\n </SignInContext.Provider>\n </Route>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,SAAS,mBAAmB;CAC1B,MAAM,QAAQ,UAAU;AACxB,OAAM,gBAAgB;AACpB,EAAK,MAAM,kBAAkB;IAC5B,EAAE,CAAC;AACN,QAAO;;AAGT,SAAS,eAA4B;CACnC,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,gBAAgB,kBAAkB;AAExC,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,qBAAC;GACC,oBAAC;IAAM,MAAK;cACV,oBAAC,oBAAkB;KACb;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,oBAAkB;KACb;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,sBAAoB;KACf;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,kBAAgB;KACX;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,yBAAuB;K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AAC;MAAM;gBACL,oBAAC,oBAAkB;OACb;;KACF;GAEV,oBAAC;IAAM,MAAK;cACV,oBAACA,gBAAiB,qBAAqB,cAAc,iBAAkB;KACjE;GACR,oBAAC;IAAM;cACL,oBAAC,gBAAc;KACT;GACR,oBAAC,mBACC,oBAAC,qBAAmB,GACd;MACD;GACC;;AAIhB,MAAM,oBAAoB,UAAU,UAClC,SAAS,UAAU,gBAAgB,QAAW,oBAAoB,EAAE,WAAW,UAAU,CAAC;AAE5F,SAAS,aAAa;CACpB,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,0BAA0B;EAC9B,eAAe;EACf,sBAAsB,cAAc;EACpC,gBAAgB,cAAc;EAC9B,kBAAkB,cAAc;EAChC,qBAAqB,cAAc;EACnC,WAAW,cAAc;EACzB,gBAAgB,cAAc;EAC9B,GAAG,wBAAwB;GAAE,SAAS,eAAe;GAAS,MAAM,eAAe;GAAM,CAAC;EAC3F;;;;AAKD,kBAAiB,cAAc,eAAe;AAE9C,kBAAiB;AAEjB,QACE,oBAAC,cAAc;EAAS,OAAO;YAC7B,oBAAC,iBAAe;GACO;;AAI7B,aAAa,cAAc;AAE3B,MAAaC,SAA2C,2BAA2B,WAAW;AAE9F,MAAMC,iBAAwE,2BAA2B,WAAW;AAEpH,MAAa,eAAe,UAAyC;CACnE,MAAM,cAAc;EAClB,WAAW,IAAI,yBAAyB;EACxC,aAAa,IAAI,yBAAyB;EAC1C,GAAG;EACJ;AAED,QACE,oBAAC;EAAM,MAAK;YACV,oBAAC,cAAc;GACb,OAAO;IACL,eAAe;IACf,GAAG;IACH,SAAS;IACT,MAAM;IACP;aAGD,oBAAC,mBACC,oBAAC;IACC,GAAI;IACJ,SAAQ;KACR,GACE;IACiB;GACnB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["LazySessionTasks","SignIn: React.ComponentType<SignInProps>","InternalSignIn: React.ComponentType<WithInternalRouting<SignInProps>>"],"sources":["../../../src/components/SignIn/index.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { SignInModalProps, SignInProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { SignInEmailLinkFlowComplete, SignUpEmailLinkFlowComplete } from '@/common/EmailLinkCompleteFlowCard';\nimport {\n SignInContext,\n SignUpContext,\n useSignInContext,\n useSignUpContext,\n withCoreSessionSwitchGuard,\n} from '@/contexts';\nimport { Flow } from '@/customizables';\nimport { useFetch } from '@/hooks';\nimport { usePreloadTasks } from '@/hooks/usePreloadTasks';\nimport type { WithInternalRouting } from '@/internal';\nimport { SessionTasks as LazySessionTasks } from '@/lazyModules/components';\nimport { Route, Switch, VIRTUAL_ROUTER_BASE_PATH } from '@/router';\nimport type { SignUpCtx } from '@/types';\nimport { SignInFactorOneSolanaWalletsCard } from '@/ui/components/SignIn/SignInFactorOneSolanaWalletsCard';\nimport { normalizeRoutingOptions } from '@/utils/normalizeRoutingOptions';\n\nimport {\n LazySignUpContinue,\n LazySignUpSSOCallback,\n LazySignUpStart,\n LazySignUpVerifyEmail,\n LazySignUpVerifyPhone,\n preloadSignUp,\n} from './lazy-sign-up';\nimport { ResetPassword } from './ResetPassword';\nimport { ResetPasswordSuccess } from './ResetPasswordSuccess';\nimport { SignInAccountSwitcher } from './SignInAccountSwitcher';\nimport { SignInClientTrust } from './SignInClientTrust';\nimport { SignInFactorOne } from './SignInFactorOne';\nimport { SignInFactorTwo } from './SignInFactorTwo';\nimport { SignInSSOCallback } from './SignInSSOCallback';\nimport { SignInStart } from './SignInStart';\n\nfunction RedirectToSignIn() {\n const clerk = useClerk();\n React.useEffect(() => {\n void clerk.redirectToSignIn();\n }, []);\n return null;\n}\n\nfunction SignInRoutes(): JSX.Element {\n const signInContext = useSignInContext();\n const signUpContext = useSignUpContext();\n\n return (\n <Flow.Root flow='signIn'>\n <Switch>\n <Route path='factor-one'>\n <SignInFactorOne />\n </Route>\n <Route path='factor-two'>\n <SignInFactorTwo />\n </Route>\n <Route path='client-trust'>\n <SignInClientTrust />\n </Route>\n <Route path='reset-password'>\n <ResetPassword />\n </Route>\n <Route path='reset-password-success'>\n <ResetPasswordSuccess />\n </Route>\n <Route path='sso-callback'>\n <SignInSSOCallback\n signUpUrl={signInContext.signUpUrl}\n signInUrl={signInContext.signInUrl}\n signInForceRedirectUrl={signInContext.afterSignInUrl}\n signUpForceRedirectUrl={signInContext.afterSignUpUrl}\n continueSignUpUrl={signInContext.signUpContinueUrl}\n transferable={signInContext.transferable}\n firstFactorUrl={'../factor-one'}\n secondFactorUrl={'../factor-two'}\n resetPasswordUrl={'../reset-password'}\n />\n </Route>\n <Route path='choose'>\n <SignInAccountSwitcher />\n </Route>\n <Route path='choose-wallet'>\n <SignInFactorOneSolanaWalletsCard />\n </Route>\n <Route path='verify'>\n <SignInEmailLinkFlowComplete\n redirectUrlComplete={signInContext.afterSignInUrl}\n redirectUrl='../factor-two'\n />\n </Route>\n\n {signInContext.isCombinedFlow && (\n <Route path='create'>\n <Route\n path='verify-email-address'\n canActivate={clerk => !!clerk.client.signUp.emailAddress}\n >\n <LazySignUpVerifyEmail />\n </Route>\n <Route\n path='verify-phone-number'\n canActivate={clerk => !!clerk.client.signUp.phoneNumber}\n >\n <LazySignUpVerifyPhone />\n </Route>\n <Route path='sso-callback'>\n <LazySignUpSSOCallback\n signUpUrl={signUpContext.signUpUrl}\n signInUrl={signUpContext.signInUrl}\n signUpForceRedirectUrl={signUpContext.afterSignUpUrl}\n signInForceRedirectUrl={signUpContext.afterSignInUrl}\n secondFactorUrl={signUpContext.secondFactorUrl}\n continueSignUpUrl='../continue'\n verifyEmailAddressUrl='../verify-email-address'\n verifyPhoneNumberUrl='../verify-phone-number'\n />\n </Route>\n <Route path='verify'>\n <SignUpEmailLinkFlowComplete\n redirectUrlComplete={signUpContext.afterSignUpUrl}\n verifyEmailPath='../verify-email-address'\n verifyPhonePath='../verify-phone-number'\n continuePath='../continue'\n />\n </Route>\n <Route path='continue'>\n <Route\n path='verify-email-address'\n canActivate={clerk => !!clerk.client.signUp.emailAddress}\n >\n <LazySignUpVerifyEmail />\n </Route>\n <Route\n path='verify-phone-number'\n canActivate={clerk => !!clerk.client.signUp.phoneNumber}\n >\n <LazySignUpVerifyPhone />\n </Route>\n <Route index>\n <LazySignUpContinue />\n </Route>\n </Route>\n <Route path='tasks'>\n <LazySessionTasks redirectUrlComplete={signInContext.afterSignUpUrl} />\n </Route>\n <Route index>\n <LazySignUpStart />\n </Route>\n </Route>\n )}\n <Route path='tasks'>\n <LazySessionTasks redirectUrlComplete={signInContext.afterSignInUrl} />\n </Route>\n <Route index>\n <SignInStart />\n </Route>\n <Route>\n <RedirectToSignIn />\n </Route>\n </Switch>\n </Flow.Root>\n );\n}\n\nconst usePreloadSignUp = (enabled = false) =>\n useFetch(enabled ? preloadSignUp : undefined, 'preloadComponent', { staleTime: Infinity });\n\nfunction SignInRoot() {\n const signInContext = useSignInContext();\n const normalizedSignUpContext = {\n componentName: 'SignUp',\n emailLinkRedirectUrl: signInContext.emailLinkRedirectUrl,\n ssoCallbackUrl: signInContext.ssoCallbackUrl,\n forceRedirectUrl: signInContext.signUpForceRedirectUrl,\n fallbackRedirectUrl: signInContext.signUpFallbackRedirectUrl,\n signInUrl: signInContext.signInUrl,\n unsafeMetadata: signInContext.unsafeMetadata,\n ...normalizeRoutingOptions({ routing: signInContext?.routing, path: signInContext?.path }),\n } as SignUpCtx;\n\n /**\n * Preload Sign Up when in Combined Flow.\n */\n usePreloadSignUp(signInContext.isCombinedFlow);\n\n usePreloadTasks();\n\n return (\n <SignUpContext.Provider value={normalizedSignUpContext}>\n <SignInRoutes />\n </SignUpContext.Provider>\n );\n}\n\nSignInRoutes.displayName = 'SignIn';\n\nexport const SignIn: React.ComponentType<SignInProps> = withCoreSessionSwitchGuard(SignInRoot);\n\nconst InternalSignIn: React.ComponentType<WithInternalRouting<SignInProps>> = withCoreSessionSwitchGuard(SignInRoot);\n\nexport const SignInModal = (props: SignInModalProps): JSX.Element => {\n const signInProps = {\n signUpUrl: `/${VIRTUAL_ROUTER_BASE_PATH}/sign-up`,\n waitlistUrl: `/${VIRTUAL_ROUTER_BASE_PATH}/waitlist`,\n ...props,\n };\n\n return (\n <Route path='sign-in'>\n <SignInContext.Provider\n value={{\n componentName: 'SignIn',\n ...signInProps,\n routing: 'virtual',\n mode: 'modal',\n }}\n >\n {/*TODO: Used by InvisibleRootBox, can we simplify? */}\n <div>\n <InternalSignIn\n {...signInProps}\n routing='virtual'\n />\n </div>\n </SignInContext.Provider>\n </Route>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,SAAS,mBAAmB;CAC1B,MAAM,QAAQ,UAAU;AACxB,OAAM,gBAAgB;AACpB,EAAK,MAAM,kBAAkB;IAC5B,EAAE,CAAC;AACN,QAAO;;AAGT,SAAS,eAA4B;CACnC,MAAM,gBAAgB,kBAAkB;CACxC,MAAM,gBAAgB,kBAAkB;AAExC,QACE,oBAAC,KAAK;EAAK,MAAK;YACd,qBAAC;GACC,oBAAC;IAAM,MAAK;cACV,oBAAC,oBAAkB;KACb;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,oBAAkB;KACb;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,sBAAoB;KACf;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,kBAAgB;KACX;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,yBAAuB;KAClB;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC;KACC,WAAW,cAAc;KACzB,WAAW,cAAc;KACzB,wBAAwB,cAAc;KACtC,wBAAwB,cAAc;KACtC,mBAAmB,cAAc;KACjC,cAAc,cAAc;KAC5B,gBAAgB;KAChB,iBAAiB;KACjB,kBAAkB;MAClB;KACI;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,0BAAwB;KACnB;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC,qCAAmC;KAC9B;GACR,oBAAC;IAAM,MAAK;cACV,oBAAC;KACC,qBAAqB,cAAc;KACnC,aAAY;MACZ;KACI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gB,kBAAkB;CACxC,MAAM,0BAA0B;EAC9B,eAAe;EACf,sBAAsB,cAAc;EACpC,gBAAgB,cAAc;EAC9B,kBAAkB,cAAc;EAChC,qBAAqB,cAAc;EACnC,WAAW,cAAc;EACzB,gBAAgB,cAAc;EAC9B,GAAG,wBAAwB;GAAE,SAAS,eAAe;GAAS,MAAM,eAAe;GAAM,CAAC;EAC3F;;;;AAKD,kBAAiB,cAAc,eAAe;AAE9C,kBAAiB;AAEjB,QACE,oBAAC,cAAc;EAAS,OAAO;YAC7B,oBAAC,iBAAe;GACO;;AAI7B,aAAa,cAAc;AAE3B,MAAaC,SAA2C,2BAA2B,WAAW;AAE9F,MAAMC,iBAAwE,2BAA2B,WAAW;AAEpH,MAAa,eAAe,UAAyC;CACnE,MAAM,cAAc;EAClB,WAAW,IAAI,yBAAyB;EACxC,aAAa,IAAI,yBAAyB;EAC1C,GAAG;EACJ;AAED,QACE,oBAAC;EAAM,MAAK;YACV,oBAAC,cAAc;GACb,OAAO;IACL,eAAe;IACf,GAAG;IACH,SAAS;IACT,MAAM;IACP;aAGD,oBAAC,mBACC,oBAAC;IACC,GAAI;IACJ,SAAQ;KACR,GACE;IACiB;GACnB"}
|
|
@@ -3,8 +3,8 @@ import { useSignUpContext } from "../../contexts/components/SignUp.js";
|
|
|
3
3
|
import { useCoreSignUp } from "../../contexts/CoreClientContext.js";
|
|
4
4
|
import { useCardState } from "../../elements/contexts/index.js";
|
|
5
5
|
import { handleError } from "../../utils/errorHandler.js";
|
|
6
|
-
import { originPrefersPopup } from "../../utils/originPrefersPopup.js";
|
|
7
6
|
import { web3CallbackErrorHandler } from "../../utils/web3CallbackErrorHandler.js";
|
|
7
|
+
import { originPrefersPopup } from "../../utils/originPrefersPopup.js";
|
|
8
8
|
import { SocialButtons } from "../../elements/SocialButtons.js";
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
@@ -56,6 +56,7 @@ const SignUpSocialButtons = React.memo((props) => {
|
|
|
56
56
|
}).catch((err) => handleError(err, [], card.setError));
|
|
57
57
|
},
|
|
58
58
|
web3Callback: (strategy) => {
|
|
59
|
+
if (strategy === "web3_solana_signature") return navigate(`choose-wallet?strategy=${strategy}`);
|
|
59
60
|
return clerk.authenticateWithWeb3({
|
|
60
61
|
customNavigate: navigate,
|
|
61
62
|
redirectUrl: redirectUrlComplete,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpSocialButtons.js","names":[],"sources":["../../../src/components/SignUp/SignUpSocialButtons.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { OAuthStrategy, PhoneCodeChannel } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useCardState } from '@/ui/elements/contexts';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { originPrefersPopup } from '@/ui/utils/originPrefersPopup';\nimport { web3CallbackErrorHandler } from '@/ui/utils/web3CallbackErrorHandler';\n\nimport { useCoreSignUp, useSignUpContext } from '../../contexts';\nimport type { SocialButtonsProps } from '../../elements/SocialButtons';\nimport { SocialButtons } from '../../elements/SocialButtons';\nimport { useRouter } from '../../router';\n\nexport type SignUpSocialButtonsProps = SocialButtonsProps & {\n continueSignUp?: boolean;\n legalAccepted?: boolean;\n onAlternativePhoneCodeProviderClick?: (channel: PhoneCodeChannel) => void;\n};\n\nexport const SignUpSocialButtons = React.memo((props: SignUpSocialButtonsProps) => {\n const clerk = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n const ctx = useSignUpContext();\n const signUp = useCoreSignUp();\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n const shouldUsePopup = ctx.oauthFlow === 'popup' || (ctx.oauthFlow === 'auto' && originPrefersPopup());\n const { continueSignUp = false, onAlternativePhoneCodeProviderClick, ...rest } = props;\n\n return (\n <SocialButtons\n {...rest}\n showLastAuthenticationStrategy={false}\n idleAfterDelay={!shouldUsePopup}\n oauthCallback={(strategy: OAuthStrategy) => {\n if (shouldUsePopup) {\n // We create the popup window here with the `about:blank` URL since some browsers will block popups that are\n // opened within async functions. The `signUpWithPopup` method handles setting the URL of the popup.\n const popup = window.open('about:blank', '', 'width=600,height=800');\n // Unfortunately, there's no good way to detect when the popup is closed, so we simply poll and check if it's closed.\n const interval = setInterval(() => {\n if (!popup || popup.closed) {\n clearInterval(interval);\n card.setIdle();\n }\n }, 500);\n\n return signUp\n .authenticateWithPopup({\n strategy,\n redirectUrl,\n redirectUrlComplete,\n popup,\n continueSignUp,\n unsafeMetadata: ctx.unsafeMetadata,\n legalAccepted: props.legalAccepted,\n oidcPrompt: ctx.oidcPrompt,\n })\n .catch(err => handleError(err, [], card.setError));\n }\n\n return signUp\n .authenticateWithRedirect({\n continueSignUp,\n redirectUrl,\n redirectUrlComplete,\n strategy,\n unsafeMetadata: ctx.unsafeMetadata,\n legalAccepted: props.legalAccepted,\n oidcPrompt: ctx.oidcPrompt,\n })\n .catch(err => handleError(err, [], card.setError));\n }}\n web3Callback={strategy => {\n return clerk\n .authenticateWithWeb3({\n customNavigate: navigate,\n redirectUrl: redirectUrlComplete,\n signUpContinueUrl: 'continue',\n unsafeMetadata: ctx.unsafeMetadata,\n strategy,\n legalAccepted: props.legalAccepted,\n })\n .catch(err => web3CallbackErrorHandler(err, card.setError));\n }}\n alternativePhoneCodeCallback={channel => {\n onAlternativePhoneCodeProviderClick?.(channel);\n }}\n />\n );\n});\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,sBAAsB,MAAM,MAAM,UAAoC;CACjF,MAAM,QAAQ,UAAU;CACxB,MAAM,EAAE,aAAa,WAAW;CAChC,MAAM,OAAO,cAAc;CAC3B,MAAM,MAAM,kBAAkB;CAC9B,MAAM,SAAS,eAAe;CAC9B,MAAM,cAAc,IAAI;CACxB,MAAM,sBAAsB,IAAI,kBAAkB;CAClD,MAAM,iBAAiB,IAAI,cAAc,WAAY,IAAI,cAAc,UAAU,oBAAoB;CACrG,MAAM,EAAE,iBAAiB,OAAO,oCAAqC,GAAG,SAAS;AAEjF,QACE,oBAAC;EACC,GAAI;EACJ,gCAAgC;EAChC,gBAAgB,CAAC;EACjB,gBAAgB,aAA4B;AAC1C,OAAI,gBAAgB;IAGlB,MAAM,QAAQ,OAAO,KAAK,eAAe,IAAI,uBAAuB;IAEpE,MAAM,WAAW,kBAAkB;AACjC,SAAI,CAAC,SAAS,MAAM,QAAQ;AAC1B,oBAAc,SAAS;AACvB,WAAK,SAAS;;OAEf,IAAI;AAEP,WAAO,OACJ,sBAAsB;KACrB;KACA;KACA;KACA;KACA;KACA,gBAAgB,IAAI;KACpB,eAAe,MAAM;KACrB,YAAY,IAAI;KACjB,CAAC,CACD,OAAM,QAAO,YAAY,KAAK,EAAE,EAAE,KAAK,SAAS,CAAC;;AAGtD,UAAO,OACJ,yBAAyB;IACxB;IACA;IACA;IACA;IACA,gBAAgB,IAAI;IACpB,eAAe,MAAM;IACrB,YAAY,IAAI;IACjB,CAAC,CACD,OAAM,QAAO,YAAY,KAAK,EAAE,EAAE,KAAK,SAAS,CAAC;;EAEtD,eAAc,aAAY;AACxB,UAAO,MACJ,qBAAqB;IACpB,gBAAgB;IAChB,aAAa;IACb,mBAAmB;IACnB,gBAAgB,IAAI;IACpB;IACA,eAAe,MAAM;IACtB,CAAC,CACD,OAAM,QAAO,yBAAyB,KAAK,KAAK,SAAS,CAAC;;EAE/D,+BAA8B,YAAW;AACvC,yCAAsC,QAAQ;;GAEhD;EAEJ"}
|
|
1
|
+
{"version":3,"file":"SignUpSocialButtons.js","names":[],"sources":["../../../src/components/SignUp/SignUpSocialButtons.tsx"],"sourcesContent":["import { useClerk } from '@clerk/shared/react';\nimport type { OAuthStrategy, PhoneCodeChannel } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useCardState } from '@/ui/elements/contexts';\nimport { handleError } from '@/ui/utils/errorHandler';\nimport { originPrefersPopup } from '@/ui/utils/originPrefersPopup';\nimport { web3CallbackErrorHandler } from '@/ui/utils/web3CallbackErrorHandler';\n\nimport { useCoreSignUp, useSignUpContext } from '../../contexts';\nimport type { SocialButtonsProps } from '../../elements/SocialButtons';\nimport { SocialButtons } from '../../elements/SocialButtons';\nimport { useRouter } from '../../router';\n\nexport type SignUpSocialButtonsProps = SocialButtonsProps & {\n continueSignUp?: boolean;\n legalAccepted?: boolean;\n onAlternativePhoneCodeProviderClick?: (channel: PhoneCodeChannel) => void;\n};\n\nexport const SignUpSocialButtons = React.memo((props: SignUpSocialButtonsProps) => {\n const clerk = useClerk();\n const { navigate } = useRouter();\n const card = useCardState();\n const ctx = useSignUpContext();\n const signUp = useCoreSignUp();\n const redirectUrl = ctx.ssoCallbackUrl;\n const redirectUrlComplete = ctx.afterSignUpUrl || '/';\n const shouldUsePopup = ctx.oauthFlow === 'popup' || (ctx.oauthFlow === 'auto' && originPrefersPopup());\n const { continueSignUp = false, onAlternativePhoneCodeProviderClick, ...rest } = props;\n\n return (\n <SocialButtons\n {...rest}\n showLastAuthenticationStrategy={false}\n idleAfterDelay={!shouldUsePopup}\n oauthCallback={(strategy: OAuthStrategy) => {\n if (shouldUsePopup) {\n // We create the popup window here with the `about:blank` URL since some browsers will block popups that are\n // opened within async functions. The `signUpWithPopup` method handles setting the URL of the popup.\n const popup = window.open('about:blank', '', 'width=600,height=800');\n // Unfortunately, there's no good way to detect when the popup is closed, so we simply poll and check if it's closed.\n const interval = setInterval(() => {\n if (!popup || popup.closed) {\n clearInterval(interval);\n card.setIdle();\n }\n }, 500);\n\n return signUp\n .authenticateWithPopup({\n strategy,\n redirectUrl,\n redirectUrlComplete,\n popup,\n continueSignUp,\n unsafeMetadata: ctx.unsafeMetadata,\n legalAccepted: props.legalAccepted,\n oidcPrompt: ctx.oidcPrompt,\n })\n .catch(err => handleError(err, [], card.setError));\n }\n\n return signUp\n .authenticateWithRedirect({\n continueSignUp,\n redirectUrl,\n redirectUrlComplete,\n strategy,\n unsafeMetadata: ctx.unsafeMetadata,\n legalAccepted: props.legalAccepted,\n oidcPrompt: ctx.oidcPrompt,\n })\n .catch(err => handleError(err, [], card.setError));\n }}\n web3Callback={strategy => {\n if (strategy === 'web3_solana_signature') {\n return navigate(`choose-wallet?strategy=${strategy}`);\n }\n\n return clerk\n .authenticateWithWeb3({\n customNavigate: navigate,\n redirectUrl: redirectUrlComplete,\n signUpContinueUrl: 'continue',\n unsafeMetadata: ctx.unsafeMetadata,\n strategy,\n legalAccepted: props.legalAccepted,\n })\n .catch(err => web3CallbackErrorHandler(err, card.setError));\n }}\n alternativePhoneCodeCallback={channel => {\n onAlternativePhoneCodeProviderClick?.(channel);\n }}\n />\n );\n});\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAa,sBAAsB,MAAM,MAAM,UAAoC;CACjF,MAAM,QAAQ,UAAU;CACxB,MAAM,EAAE,aAAa,WAAW;CAChC,MAAM,OAAO,cAAc;CAC3B,MAAM,MAAM,kBAAkB;CAC9B,MAAM,SAAS,eAAe;CAC9B,MAAM,cAAc,IAAI;CACxB,MAAM,sBAAsB,IAAI,kBAAkB;CAClD,MAAM,iBAAiB,IAAI,cAAc,WAAY,IAAI,cAAc,UAAU,oBAAoB;CACrG,MAAM,EAAE,iBAAiB,OAAO,oCAAqC,GAAG,SAAS;AAEjF,QACE,oBAAC;EACC,GAAI;EACJ,gCAAgC;EAChC,gBAAgB,CAAC;EACjB,gBAAgB,aAA4B;AAC1C,OAAI,gBAAgB;IAGlB,MAAM,QAAQ,OAAO,KAAK,eAAe,IAAI,uBAAuB;IAEpE,MAAM,WAAW,kBAAkB;AACjC,SAAI,CAAC,SAAS,MAAM,QAAQ;AAC1B,oBAAc,SAAS;AACvB,WAAK,SAAS;;OAEf,IAAI;AAEP,WAAO,OACJ,sBAAsB;KACrB;KACA;KACA;KACA;KACA;KACA,gBAAgB,IAAI;KACpB,eAAe,MAAM;KACrB,YAAY,IAAI;KACjB,CAAC,CACD,OAAM,QAAO,YAAY,KAAK,EAAE,EAAE,KAAK,SAAS,CAAC;;AA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