@thunderid/react 0.2.0 → 0.3.3
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/ThunderIDReactClient.d.ts +4 -4
- package/dist/ThunderIDReactClient.d.ts.map +1 -1
- package/dist/ThunderIDReactClient.js +6 -6
- package/dist/ThunderIDReactClient.js.map +1 -1
- package/dist/cjs/ThunderIDReactClient.cjs +5 -5
- package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
- package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/Callback.cjs +1 -1
- package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs +3 -3
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -1
- package/dist/cjs/components/factories/FieldFactory.cjs +2 -2
- package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +1 -1
- package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +3 -3
- package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.cjs → AcceptInvite.cjs} +2 -2
- package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.cjs → BaseAcceptInvite.cjs} +47 -18
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.cjs → BaseAcceptInvite.styles.cjs} +2 -2
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +50 -32
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.cjs → BaseInviteUser.cjs} +44 -15
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.cjs → BaseInviteUser.styles.cjs} +2 -2
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/InviteUser/{v2/InviteUser.cjs → InviteUser.cjs} +3 -3
- package/dist/cjs/components/presentation/auth/InviteUser/InviteUser.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.cjs → OrganizationUnitPicker.cjs} +3 -3
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.cjs → OrganizationUnitPicker.styles.cjs} +2 -2
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs.map +1 -0
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +389 -8
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs +51 -22
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +346 -8
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +547 -36
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +691 -8
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs +66 -76
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.cjs +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs +1 -1
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs +5 -7
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs +76 -37
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +0 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +0 -3
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
- package/dist/cjs/hooks/{v2/useOAuthCallback.cjs → useOAuthCallback.cjs} +2 -2
- package/dist/cjs/hooks/useOAuthCallback.cjs.map +1 -0
- package/dist/cjs/index.cjs +47 -50
- package/dist/cjs/utils/{v2/buildThemeConfigFromFlowMeta.cjs → buildThemeConfigFromFlowMeta.cjs} +1 -1
- package/dist/cjs/utils/buildThemeConfigFromFlowMeta.cjs.map +1 -0
- package/dist/cjs/utils/{v2/flowTransformer.cjs → flowTransformer.cjs} +1 -1
- package/dist/cjs/utils/flowTransformer.cjs.map +1 -0
- package/dist/cjs/utils/{v2/getAuthComponentHeadings.cjs → getAuthComponentHeadings.cjs} +1 -1
- package/dist/cjs/utils/getAuthComponentHeadings.cjs.map +1 -0
- package/dist/cjs/utils/{v2/passkey.cjs → passkey.cjs} +2 -2
- package/dist/cjs/utils/passkey.cjs.map +1 -0
- package/dist/cjs/utils/{v2/resolveTranslationsInArray.cjs → resolveTranslationsInArray.cjs} +1 -1
- package/dist/cjs/utils/resolveTranslationsInArray.cjs.map +1 -0
- package/dist/cjs/utils/{v2/resolveTranslationsInObject.cjs → resolveTranslationsInObject.cjs} +2 -2
- package/dist/cjs/utils/resolveTranslationsInObject.cjs.map +1 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.js.map +1 -1
- package/dist/components/adapters/Consent.d.ts +1 -1
- package/dist/components/adapters/Consent.d.ts.map +1 -1
- package/dist/components/adapters/Consent.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.d.ts +1 -1
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
- package/dist/components/auth/Callback/Callback.d.ts +1 -1
- package/dist/components/auth/Callback/Callback.js +1 -1
- package/dist/components/auth/Callback/Callback.js.map +1 -1
- package/dist/components/auth/Callback/TokenCallback.js +4 -4
- package/dist/components/auth/Callback/TokenCallback.js.map +1 -1
- package/dist/components/factories/FieldFactory.d.ts +2 -2
- package/dist/components/factories/FieldFactory.js +2 -2
- package/dist/components/factories/FieldFactory.js.map +1 -1
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +1 -1
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js +3 -3
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.js → AcceptInvite.js} +1 -1
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.d.ts → BaseAcceptInvite.d.ts} +3 -2
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.js → BaseAcceptInvite.js} +45 -17
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.js → BaseAcceptInvite.styles.js} +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +4 -4
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.js +51 -33
- package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.d.ts → BaseInviteUser.d.ts} +3 -2
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.js → BaseInviteUser.js} +44 -15
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.js → BaseInviteUser.styles.js} +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.js → InviteUser.js} +2 -2
- package/dist/components/presentation/auth/InviteUser/InviteUser.js.map +1 -0
- package/dist/components/presentation/auth/InviteUser/index.d.ts +4 -4
- package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.js → OrganizationUnitPicker.js} +2 -2
- package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.js → OrganizationUnitPicker.styles.js} +1 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +2 -2
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +63 -4
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js +389 -10
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts +21 -22
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.js +51 -23
- package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +213 -6
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js +346 -10
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +122 -13
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.js +548 -38
- package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +164 -6
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js +691 -10
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts +15 -74
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.js +67 -77
- package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -1
- package/dist/components/primitives/Alert/Alert.js +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.js +1 -1
- package/dist/components/primitives/FormControl/FormControl.js +1 -1
- package/dist/components/primitives/Toggle/Toggle.js +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.js +6 -8
- package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.d.ts +19 -39
- package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.js +76 -38
- package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +1 -2
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.js +0 -1
- package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js +1 -4
- package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
- package/dist/hooks/useOAuthCallback.d.ts.map +1 -0
- package/dist/hooks/{v2/useOAuthCallback.js → useOAuthCallback.js} +1 -1
- package/dist/hooks/useOAuthCallback.js.map +1 -0
- package/dist/index.d.ts +3 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -35
- package/dist/utils/buildThemeConfigFromFlowMeta.d.ts.map +1 -0
- package/dist/utils/{v2/buildThemeConfigFromFlowMeta.js → buildThemeConfigFromFlowMeta.js} +1 -1
- package/dist/utils/buildThemeConfigFromFlowMeta.js.map +1 -0
- package/dist/utils/{v2/flowTransformer.d.ts → flowTransformer.d.ts} +3 -3
- package/dist/utils/flowTransformer.d.ts.map +1 -0
- package/dist/utils/{v2/flowTransformer.js → flowTransformer.js} +1 -1
- package/dist/utils/flowTransformer.js.map +1 -0
- package/dist/utils/{v2/getAuthComponentHeadings.d.ts → getAuthComponentHeadings.d.ts} +1 -1
- package/dist/utils/getAuthComponentHeadings.d.ts.map +1 -0
- package/dist/utils/{v2/getAuthComponentHeadings.js → getAuthComponentHeadings.js} +1 -1
- package/dist/utils/getAuthComponentHeadings.js.map +1 -0
- package/dist/utils/passkey.d.ts.map +1 -0
- package/dist/utils/{v2/passkey.js → passkey.js} +1 -1
- package/dist/utils/passkey.js.map +1 -0
- package/dist/utils/{v2/resolveTranslationsInArray.d.ts → resolveTranslationsInArray.d.ts} +1 -1
- package/dist/utils/resolveTranslationsInArray.d.ts.map +1 -0
- package/dist/utils/{v2/resolveTranslationsInArray.js → resolveTranslationsInArray.js} +1 -1
- package/dist/utils/resolveTranslationsInArray.js.map +1 -0
- package/dist/utils/{v2/resolveTranslationsInObject.d.ts → resolveTranslationsInObject.d.ts} +1 -1
- package/dist/utils/resolveTranslationsInObject.d.ts.map +1 -0
- package/dist/utils/{v2/resolveTranslationsInObject.js → resolveTranslationsInObject.js} +1 -1
- package/dist/utils/resolveTranslationsInObject.js.map +1 -0
- package/package.json +10 -10
- package/dist/cjs/components/adapters/CheckboxInput.cjs +0 -30
- package/dist/cjs/components/adapters/CheckboxInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/DateInput.cjs +0 -30
- package/dist/cjs/components/adapters/DateInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/DividerComponent.cjs +0 -24
- package/dist/cjs/components/adapters/DividerComponent.cjs.map +0 -1
- package/dist/cjs/components/adapters/EmailInput.cjs +0 -30
- package/dist/cjs/components/adapters/EmailInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/FormContainer.cjs +0 -36
- package/dist/cjs/components/adapters/FormContainer.cjs.map +0 -1
- package/dist/cjs/components/adapters/NumberInput.cjs +0 -30
- package/dist/cjs/components/adapters/NumberInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/PasswordInput.cjs +0 -52
- package/dist/cjs/components/adapters/PasswordInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/SelectInput.cjs +0 -36
- package/dist/cjs/components/adapters/SelectInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/SubmitButton.cjs +0 -61
- package/dist/cjs/components/adapters/SubmitButton.cjs.map +0 -1
- package/dist/cjs/components/adapters/TelephoneInput.cjs +0 -32
- package/dist/cjs/components/adapters/TelephoneInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/TextInput.cjs +0 -30
- package/dist/cjs/components/adapters/TextInput.cjs.map +0 -1
- package/dist/cjs/components/adapters/Typography.cjs +0 -60
- package/dist/cjs/components/adapters/Typography.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/AcceptInvite.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/InviteUser/v2/InviteUser.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs +0 -293
- package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs +0 -43
- package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs +0 -163
- package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs +0 -378
- package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs +0 -78
- package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs +0 -734
- package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs +0 -68
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs +0 -59
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs +0 -139
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs +0 -147
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs +0 -68
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs +0 -38
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs +0 -68
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs +0 -60
- package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs +0 -330
- package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs +0 -560
- package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs +0 -451
- package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs +0 -54
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs +0 -164
- package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs +0 -656
- package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs.map +0 -1
- package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs +0 -80
- package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs.map +0 -1
- package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs +0 -190
- package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs.map +0 -1
- package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs +0 -108
- package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs.map +0 -1
- package/dist/cjs/hooks/v2/useOAuthCallback.cjs.map +0 -1
- package/dist/cjs/utils/v2/buildThemeConfigFromFlowMeta.cjs.map +0 -1
- package/dist/cjs/utils/v2/flowTransformer.cjs.map +0 -1
- package/dist/cjs/utils/v2/getAuthComponentHeadings.cjs.map +0 -1
- package/dist/cjs/utils/v2/passkey.cjs.map +0 -1
- package/dist/cjs/utils/v2/resolveTranslationsInArray.cjs.map +0 -1
- package/dist/cjs/utils/v2/resolveTranslationsInObject.cjs.map +0 -1
- package/dist/components/adapters/CheckboxInput.d.ts +0 -25
- package/dist/components/adapters/CheckboxInput.d.ts.map +0 -1
- package/dist/components/adapters/CheckboxInput.js +0 -28
- package/dist/components/adapters/CheckboxInput.js.map +0 -1
- package/dist/components/adapters/DateInput.d.ts +0 -25
- package/dist/components/adapters/DateInput.d.ts.map +0 -1
- package/dist/components/adapters/DateInput.js +0 -28
- package/dist/components/adapters/DateInput.js.map +0 -1
- package/dist/components/adapters/DividerComponent.d.ts +0 -25
- package/dist/components/adapters/DividerComponent.d.ts.map +0 -1
- package/dist/components/adapters/DividerComponent.js +0 -22
- package/dist/components/adapters/DividerComponent.js.map +0 -1
- package/dist/components/adapters/EmailInput.d.ts +0 -25
- package/dist/components/adapters/EmailInput.d.ts.map +0 -1
- package/dist/components/adapters/EmailInput.js +0 -28
- package/dist/components/adapters/EmailInput.js.map +0 -1
- package/dist/components/adapters/FormContainer.d.ts +0 -25
- package/dist/components/adapters/FormContainer.d.ts.map +0 -1
- package/dist/components/adapters/FormContainer.js +0 -34
- package/dist/components/adapters/FormContainer.js.map +0 -1
- package/dist/components/adapters/NumberInput.d.ts +0 -25
- package/dist/components/adapters/NumberInput.d.ts.map +0 -1
- package/dist/components/adapters/NumberInput.js +0 -28
- package/dist/components/adapters/NumberInput.js.map +0 -1
- package/dist/components/adapters/PasswordInput.d.ts +0 -25
- package/dist/components/adapters/PasswordInput.d.ts.map +0 -1
- package/dist/components/adapters/PasswordInput.js +0 -50
- package/dist/components/adapters/PasswordInput.js.map +0 -1
- package/dist/components/adapters/SelectInput.d.ts +0 -25
- package/dist/components/adapters/SelectInput.d.ts.map +0 -1
- package/dist/components/adapters/SelectInput.js +0 -34
- package/dist/components/adapters/SelectInput.js.map +0 -1
- package/dist/components/adapters/SocialButton.d.ts +0 -25
- package/dist/components/adapters/SocialButton.d.ts.map +0 -1
- package/dist/components/adapters/SubmitButton.d.ts +0 -25
- package/dist/components/adapters/SubmitButton.d.ts.map +0 -1
- package/dist/components/adapters/SubmitButton.js +0 -59
- package/dist/components/adapters/SubmitButton.js.map +0 -1
- package/dist/components/adapters/TelephoneInput.d.ts +0 -25
- package/dist/components/adapters/TelephoneInput.d.ts.map +0 -1
- package/dist/components/adapters/TelephoneInput.js +0 -30
- package/dist/components/adapters/TelephoneInput.js.map +0 -1
- package/dist/components/adapters/TextInput.d.ts +0 -25
- package/dist/components/adapters/TextInput.d.ts.map +0 -1
- package/dist/components/adapters/TextInput.js +0 -28
- package/dist/components/adapters/TextInput.js.map +0 -1
- package/dist/components/adapters/Typography.d.ts +0 -25
- package/dist/components/adapters/Typography.d.ts.map +0 -1
- package/dist/components/adapters/Typography.js +0 -58
- package/dist/components/adapters/Typography.js.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.js.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.js.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts.map +0 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.js.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.js.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.js.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts.map +0 -1
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.js.map +0 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts.map +0 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.js.map +0 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts.map +0 -1
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.js.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts +0 -74
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js +0 -288
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts +0 -26
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/Recovery.js +0 -40
- package/dist/components/presentation/auth/Recovery/v1/Recovery.js.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts +0 -46
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js +0 -160
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js.map +0 -1
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +0 -83
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +0 -1
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js +0 -373
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js.map +0 -1
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts +0 -56
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +0 -1
- package/dist/components/presentation/auth/Recovery/v2/Recovery.js +0 -74
- package/dist/components/presentation/auth/Recovery/v2/Recovery.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +0 -131
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js +0 -729
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js +0 -64
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js +0 -55
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts +0 -27
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js +0 -136
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +0 -77
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js +0 -143
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js +0 -64
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js +0 -36
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.js +0 -64
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts +0 -26
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js +0 -56
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts +0 -125
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +0 -222
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js +0 -325
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js.map +0 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +0 -165
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.js +0 -556
- package/dist/components/presentation/auth/SignIn/v2/SignIn.js.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +0 -174
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js +0 -446
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts +0 -39
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/SignUp.js +0 -51
- package/dist/components/presentation/auth/SignUp/v1/SignUp.js.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +0 -46
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js +0 -160
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js.map +0 -1
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +0 -186
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js +0 -651
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js.map +0 -1
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +0 -39
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +0 -1
- package/dist/components/presentation/auth/SignUp/v2/SignUp.js +0 -77
- package/dist/components/presentation/auth/SignUp/v2/SignUp.js.map +0 -1
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts +0 -89
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts.map +0 -1
- package/dist/contexts/Theme/v1/ThemeProvider.js +0 -186
- package/dist/contexts/Theme/v1/ThemeProvider.js.map +0 -1
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts +0 -58
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts.map +0 -1
- package/dist/contexts/Theme/v2/ThemeProvider.js +0 -104
- package/dist/contexts/Theme/v2/ThemeProvider.js.map +0 -1
- package/dist/hooks/v2/useOAuthCallback.d.ts.map +0 -1
- package/dist/hooks/v2/useOAuthCallback.js.map +0 -1
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts.map +0 -1
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.js.map +0 -1
- package/dist/utils/v2/flowTransformer.d.ts.map +0 -1
- package/dist/utils/v2/flowTransformer.js.map +0 -1
- package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +0 -1
- package/dist/utils/v2/getAuthComponentHeadings.js.map +0 -1
- package/dist/utils/v2/passkey.d.ts.map +0 -1
- package/dist/utils/v2/passkey.js.map +0 -1
- package/dist/utils/v2/resolveTranslationsInArray.d.ts.map +0 -1
- package/dist/utils/v2/resolveTranslationsInArray.js.map +0 -1
- package/dist/utils/v2/resolveTranslationsInObject.d.ts.map +0 -1
- package/dist/utils/v2/resolveTranslationsInObject.js.map +0 -1
- /package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.d.ts → AcceptInvite.d.ts} +0 -0
- /package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.d.ts → BaseAcceptInvite.styles.d.ts} +0 -0
- /package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.d.ts → BaseInviteUser.styles.d.ts} +0 -0
- /package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.d.ts → InviteUser.d.ts} +0 -0
- /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.d.ts → OrganizationUnitPicker.d.ts} +0 -0
- /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.d.ts → OrganizationUnitPicker.styles.d.ts} +0 -0
- /package/dist/hooks/{v2/useOAuthCallback.d.ts → useOAuthCallback.d.ts} +0 -0
- /package/dist/utils/{v2/buildThemeConfigFromFlowMeta.d.ts → buildThemeConfigFromFlowMeta.d.ts} +0 -0
- /package/dist/utils/{v2/passkey.d.ts → passkey.d.ts} +0 -0
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { EmbeddedSignInFlowAuthenticator, WithPreferences } from '@thunderid/browser';
|
|
19
|
-
import { ReactElement } from 'react';
|
|
20
|
-
/**
|
|
21
|
-
* Base props that all sign-in option components share.
|
|
22
|
-
*/
|
|
23
|
-
export interface BaseSignInOptionProps extends WithPreferences {
|
|
24
|
-
/**
|
|
25
|
-
* The authenticator configuration.
|
|
26
|
-
*/
|
|
27
|
-
authenticator?: EmbeddedSignInFlowAuthenticator;
|
|
28
|
-
/**
|
|
29
|
-
* Custom CSS class name for the submit button.
|
|
30
|
-
*/
|
|
31
|
-
buttonClassName?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Error message to display.
|
|
34
|
-
*/
|
|
35
|
-
error?: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Current form values.
|
|
38
|
-
*/
|
|
39
|
-
formValues: Record<string, string>;
|
|
40
|
-
/**
|
|
41
|
-
* Custom CSS class name for form inputs.
|
|
42
|
-
*/
|
|
43
|
-
inputClassName?: string;
|
|
44
|
-
/**
|
|
45
|
-
* Whether the component is in loading state.
|
|
46
|
-
*/
|
|
47
|
-
isLoading: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Callback function called when input values change.
|
|
50
|
-
*/
|
|
51
|
-
onInputChange: (param: string, value: string) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Callback function called when the option is submitted.
|
|
54
|
-
*/
|
|
55
|
-
onSubmit?: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
|
|
56
|
-
/**
|
|
57
|
-
* Text for the submit button.
|
|
58
|
-
*/
|
|
59
|
-
submitButtonText?: string;
|
|
60
|
-
/**
|
|
61
|
-
* Touched state for form fields.
|
|
62
|
-
*/
|
|
63
|
-
touchedFields: Record<string, boolean>;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Creates the appropriate sign-in option component based on the authenticator's ID.
|
|
67
|
-
*/
|
|
68
|
-
export declare const createSignInOption: ({ authenticator, onSubmit, buttonClassName, preferences, ...rest }: BaseSignInOptionProps) => ReactElement;
|
|
69
|
-
/**
|
|
70
|
-
* Convenience function that creates the appropriate sign-in option component from an authenticator.
|
|
71
|
-
*/
|
|
72
|
-
export declare const createSignInOptionFromAuthenticator: (authenticator: EmbeddedSignInFlowAuthenticator, formValues: Record<string, string>, touchedFields: Record<string, boolean>, isLoading: boolean, onInputChange: (param: string, value: string) => void, onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void, options?: {
|
|
73
|
-
buttonClassName?: string;
|
|
74
|
-
error?: string | null;
|
|
75
|
-
inputClassName?: string;
|
|
76
|
-
}) => ReactElement;
|
|
77
|
-
//# sourceMappingURL=SignInOptionFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignInOptionFactory.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,+BAA+B,EAG/B,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAsBnC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D;;OAEG;IACH,aAAa,CAAC,EAAE,+BAA+B,CAAC;IAEhD;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEnC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,aAAa,EAAE,+BAA+B,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAEvG;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,oEAMhC,qBAAqB,KAAG,YA6H1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mCAAmC,GAC9C,eAAe,+BAA+B,EAC9C,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,WAAW,OAAO,EAClB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,EACrD,UAAU,CAAC,aAAa,EAAE,+BAA+B,EAAE,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,EACrG,UAAU;IACR,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,KACA,YASC,CAAC"}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import EmailOtp_default from "./EmailOtp.js";
|
|
2
|
-
import IdentifierFirst_default from "./IdentifierFirst.js";
|
|
3
|
-
import MultiOptionButton_default from "./MultiOptionButton.js";
|
|
4
|
-
import SmsOtp_default from "./SmsOtp.js";
|
|
5
|
-
import SocialButton_default from "./SocialButton.js";
|
|
6
|
-
import Totp_default from "./Totp.js";
|
|
7
|
-
import UsernamePassword_default from "./UsernamePassword.js";
|
|
8
|
-
import FacebookButton_default from "../../../../../adapters/FacebookButton.js";
|
|
9
|
-
import GitHubButton_default from "../../../../../adapters/GitHubButton.js";
|
|
10
|
-
import GoogleButton_default from "../../../../../adapters/GoogleButton.js";
|
|
11
|
-
import LinkedInButton_default from "../../../../../adapters/LinkedInButton.js";
|
|
12
|
-
import MicrosoftButton_default from "../../../../../adapters/MicrosoftButton.js";
|
|
13
|
-
import SignInWithEthereumButton_default from "../../../../../adapters/SignInWithEthereumButton.js";
|
|
14
|
-
import { ApplicationNativeAuthenticationConstants, EmbeddedSignInFlowAuthenticatorKnownIdPType } from "@thunderid/browser";
|
|
15
|
-
import { jsx } from "react/jsx-runtime";
|
|
16
|
-
|
|
17
|
-
//#region src/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.tsx
|
|
18
|
-
/**
|
|
19
|
-
* Creates the appropriate sign-in option component based on the authenticator's ID.
|
|
20
|
-
*/
|
|
21
|
-
const createSignInOption = ({ authenticator, onSubmit, buttonClassName, preferences,...rest }) => {
|
|
22
|
-
const hasParams = authenticator.metadata?.params && authenticator.metadata.params.length > 0;
|
|
23
|
-
switch (authenticator.authenticatorId) {
|
|
24
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword: return /* @__PURE__ */ jsx(UsernamePassword_default, {
|
|
25
|
-
authenticator,
|
|
26
|
-
preferences,
|
|
27
|
-
onSubmit,
|
|
28
|
-
...rest
|
|
29
|
-
});
|
|
30
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst: return /* @__PURE__ */ jsx(IdentifierFirst_default, {
|
|
31
|
-
authenticator,
|
|
32
|
-
preferences,
|
|
33
|
-
onSubmit,
|
|
34
|
-
...rest
|
|
35
|
-
});
|
|
36
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google: return /* @__PURE__ */ jsx(GoogleButton_default, {
|
|
37
|
-
className: buttonClassName,
|
|
38
|
-
onClick: () => onSubmit(authenticator),
|
|
39
|
-
preferences,
|
|
40
|
-
...rest
|
|
41
|
-
});
|
|
42
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub: return /* @__PURE__ */ jsx(GitHubButton_default, {
|
|
43
|
-
preferences,
|
|
44
|
-
className: buttonClassName,
|
|
45
|
-
onClick: () => onSubmit(authenticator),
|
|
46
|
-
...rest
|
|
47
|
-
});
|
|
48
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft: return /* @__PURE__ */ jsx(MicrosoftButton_default, {
|
|
49
|
-
preferences,
|
|
50
|
-
className: buttonClassName,
|
|
51
|
-
onClick: () => onSubmit(authenticator),
|
|
52
|
-
...rest
|
|
53
|
-
});
|
|
54
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook: return /* @__PURE__ */ jsx(FacebookButton_default, {
|
|
55
|
-
preferences,
|
|
56
|
-
className: buttonClassName,
|
|
57
|
-
onClick: () => onSubmit(authenticator),
|
|
58
|
-
...rest
|
|
59
|
-
});
|
|
60
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.LinkedIn: return /* @__PURE__ */ jsx(LinkedInButton_default, {
|
|
61
|
-
preferences,
|
|
62
|
-
className: buttonClassName,
|
|
63
|
-
onClick: () => onSubmit(authenticator),
|
|
64
|
-
...rest
|
|
65
|
-
});
|
|
66
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SignInWithEthereum: return /* @__PURE__ */ jsx(SignInWithEthereumButton_default, {
|
|
67
|
-
preferences,
|
|
68
|
-
className: buttonClassName,
|
|
69
|
-
onClick: () => onSubmit(authenticator),
|
|
70
|
-
...rest
|
|
71
|
-
});
|
|
72
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp: return hasParams ? /* @__PURE__ */ jsx(EmailOtp_default, {
|
|
73
|
-
authenticator,
|
|
74
|
-
preferences,
|
|
75
|
-
onSubmit,
|
|
76
|
-
...rest
|
|
77
|
-
}) : /* @__PURE__ */ jsx(MultiOptionButton_default, {
|
|
78
|
-
authenticator,
|
|
79
|
-
preferences,
|
|
80
|
-
onSubmit,
|
|
81
|
-
...rest
|
|
82
|
-
});
|
|
83
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp: return hasParams ? /* @__PURE__ */ jsx(Totp_default, {
|
|
84
|
-
authenticator,
|
|
85
|
-
preferences,
|
|
86
|
-
onSubmit,
|
|
87
|
-
...rest
|
|
88
|
-
}) : /* @__PURE__ */ jsx(MultiOptionButton_default, {
|
|
89
|
-
authenticator,
|
|
90
|
-
preferences,
|
|
91
|
-
onSubmit,
|
|
92
|
-
...rest
|
|
93
|
-
});
|
|
94
|
-
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp: return hasParams ? /* @__PURE__ */ jsx(SmsOtp_default, {
|
|
95
|
-
authenticator,
|
|
96
|
-
preferences,
|
|
97
|
-
onSubmit,
|
|
98
|
-
...rest
|
|
99
|
-
}) : /* @__PURE__ */ jsx(MultiOptionButton_default, {
|
|
100
|
-
authenticator,
|
|
101
|
-
preferences,
|
|
102
|
-
onSubmit,
|
|
103
|
-
...rest
|
|
104
|
-
});
|
|
105
|
-
default:
|
|
106
|
-
if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) return /* @__PURE__ */ jsx(SocialButton_default, {
|
|
107
|
-
authenticator,
|
|
108
|
-
preferences,
|
|
109
|
-
className: buttonClassName,
|
|
110
|
-
onClick: () => onSubmit(authenticator),
|
|
111
|
-
...rest,
|
|
112
|
-
children: authenticator.idp
|
|
113
|
-
});
|
|
114
|
-
if (hasParams) return /* @__PURE__ */ jsx(UsernamePassword_default, {
|
|
115
|
-
authenticator,
|
|
116
|
-
preferences,
|
|
117
|
-
onSubmit,
|
|
118
|
-
...rest
|
|
119
|
-
});
|
|
120
|
-
return /* @__PURE__ */ jsx(MultiOptionButton_default, {
|
|
121
|
-
authenticator,
|
|
122
|
-
preferences,
|
|
123
|
-
onSubmit,
|
|
124
|
-
...rest
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
/**
|
|
129
|
-
* Convenience function that creates the appropriate sign-in option component from an authenticator.
|
|
130
|
-
*/
|
|
131
|
-
const createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFields, isLoading, onInputChange, onSubmit, options) => createSignInOption({
|
|
132
|
-
authenticator,
|
|
133
|
-
formValues,
|
|
134
|
-
isLoading,
|
|
135
|
-
onInputChange,
|
|
136
|
-
onSubmit,
|
|
137
|
-
touchedFields,
|
|
138
|
-
...options
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
//#endregion
|
|
142
|
-
export { createSignInOption, createSignInOptionFromAuthenticator };
|
|
143
|
-
//# sourceMappingURL=SignInOptionFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignInOptionFactory.js","names":["hasParams: any","UsernamePassword","IdentifierFirst","GoogleButton","GitHubButton","MicrosoftButton","FacebookButton","LinkedInButton","SignInWithEthereumButton","EmailOtp","MultiOptionButton","Totp","SmsOtp","SocialButton"],"sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {\n EmbeddedSignInFlowAuthenticator,\n EmbeddedSignInFlowAuthenticatorKnownIdPType,\n ApplicationNativeAuthenticationConstants,\n WithPreferences,\n} from '@thunderid/browser';\nimport {ReactElement} from 'react';\n// eslint-disable-next-line import/no-cycle, import/no-named-as-default\nimport EmailOtp from './EmailOtp';\n// eslint-disable-next-line import/no-cycle, import/no-named-as-default\nimport IdentifierFirst from './IdentifierFirst';\n// eslint-disable-next-line import/no-cycle\nimport MultiOptionButton from './MultiOptionButton';\n// eslint-disable-next-line import/no-cycle, import/no-named-as-default\nimport SmsOtp from './SmsOtp';\n// eslint-disable-next-line import/no-cycle\nimport SocialButton from './SocialButton';\n// eslint-disable-next-line import/no-cycle, import/no-named-as-default\nimport Totp from './Totp';\n// eslint-disable-next-line import/no-cycle, import/no-named-as-default\nimport UsernamePassword from './UsernamePassword';\nimport FacebookButton from '../../../../../adapters/FacebookButton';\nimport GitHubButton from '../../../../../adapters/GitHubButton';\nimport GoogleButton from '../../../../../adapters/GoogleButton';\nimport LinkedInButton from '../../../../../adapters/LinkedInButton';\nimport MicrosoftButton from '../../../../../adapters/MicrosoftButton';\nimport SignInWithEthereumButton from '../../../../../adapters/SignInWithEthereumButton';\n\n/**\n * Base props that all sign-in option components share.\n */\nexport interface BaseSignInOptionProps extends WithPreferences {\n /**\n * The authenticator configuration.\n */\n authenticator?: EmbeddedSignInFlowAuthenticator;\n\n /**\n * Custom CSS class name for the submit button.\n */\n buttonClassName?: string;\n\n /**\n * Error message to display.\n */\n error?: string | null;\n\n /**\n * Current form values.\n */\n formValues: Record<string, string>;\n\n /**\n * Custom CSS class name for form inputs.\n */\n inputClassName?: string;\n\n /**\n * Whether the component is in loading state.\n */\n isLoading: boolean;\n\n /**\n * Callback function called when input values change.\n */\n onInputChange: (param: string, value: string) => void;\n\n /**\n * Callback function called when the option is submitted.\n */\n onSubmit?: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;\n\n /**\n * Text for the submit button.\n */\n submitButtonText?: string;\n\n /**\n * Touched state for form fields.\n */\n touchedFields: Record<string, boolean>;\n}\n\n/**\n * Creates the appropriate sign-in option component based on the authenticator's ID.\n */\nexport const createSignInOption = ({\n authenticator,\n onSubmit,\n buttonClassName,\n preferences,\n ...rest\n}: BaseSignInOptionProps): ReactElement => {\n // Check if this authenticator has params (indicating it needs user input)\n const hasParams: any = authenticator!.metadata?.params && authenticator!.metadata.params.length > 0;\n\n // Use authenticatorId to determine the component type\n switch (authenticator!.authenticatorId) {\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:\n return <UsernamePassword authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />;\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:\n return <IdentifierFirst authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />;\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:\n return (\n <GoogleButton\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n preferences={preferences}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:\n return (\n <GitHubButton\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:\n return (\n <MicrosoftButton\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:\n return (\n <FacebookButton\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.LinkedIn:\n return (\n <LinkedInButton\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SignInWithEthereum:\n return (\n <SignInWithEthereumButton\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:\n // If it has params, render as input form, otherwise as selection button\n return hasParams ? (\n <EmailOtp authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n ) : (\n <MultiOptionButton authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:\n // If it has params, render as input form, otherwise as selection button\n return hasParams ? (\n <Totp authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n ) : (\n <MultiOptionButton authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n );\n\n case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:\n // If it has params, render as input form, otherwise as selection button\n return hasParams ? (\n <SmsOtp authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n ) : (\n <MultiOptionButton authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n );\n\n default:\n // Check if it's a federated authenticator (non-LOCAL idp)\n if (authenticator!.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {\n // For unknown federated authenticators, use generic social login\n return (\n <SocialButton\n authenticator={authenticator}\n preferences={preferences}\n className={buttonClassName}\n onClick={(): any => onSubmit!(authenticator!)}\n {...rest}\n >\n {authenticator!.idp}\n </SocialButton>\n );\n }\n\n // For LOCAL authenticators, decide based on whether they have params\n if (hasParams) {\n // Fallback to username/password for unknown local authenticators with params\n return (\n <UsernamePassword authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n );\n }\n // Use multi-option button for LOCAL authenticators without params\n return (\n <MultiOptionButton authenticator={authenticator} preferences={preferences} onSubmit={onSubmit} {...rest} />\n );\n }\n};\n\n/**\n * Convenience function that creates the appropriate sign-in option component from an authenticator.\n */\nexport const createSignInOptionFromAuthenticator = (\n authenticator: EmbeddedSignInFlowAuthenticator,\n formValues: Record<string, string>,\n touchedFields: Record<string, boolean>,\n isLoading: boolean,\n onInputChange: (param: string, value: string) => void,\n onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void,\n options?: {\n buttonClassName?: string;\n error?: string | null;\n inputClassName?: string;\n },\n): ReactElement =>\n createSignInOption({\n authenticator,\n formValues,\n isLoading,\n onInputChange,\n onSubmit,\n touchedFields,\n ...options,\n });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwGA,MAAa,sBAAsB,EACjC,eACA,UACA,iBACA,YACA,GAAG,WACsC;CAEzC,MAAMA,YAAiB,cAAe,UAAU,UAAU,cAAe,SAAS,OAAO,SAAS;AAGlG,SAAQ,cAAe,iBAAvB;EACE,KAAK,yCAAyC,wBAAwB,iBACpE,QAAO,oBAACC;GAAgC;GAA4B;GAAuB;GAAU,GAAI;IAAQ;EAEnH,KAAK,yCAAyC,wBAAwB,gBACpE,QAAO,oBAACC;GAA+B;GAA4B;GAAuB;GAAU,GAAI;IAAQ;EAElH,KAAK,yCAAyC,wBAAwB,OACpE,QACE,oBAACC;GACC,WAAW;GACX,eAAoB,SAAU,cAAe;GAChC;GACb,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,OACpE,QACE,oBAACC;GACc;GACb,WAAW;GACX,eAAoB,SAAU,cAAe;GAC7C,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,UACpE,QACE,oBAACC;GACc;GACb,WAAW;GACX,eAAoB,SAAU,cAAe;GAC7C,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,SACpE,QACE,oBAACC;GACc;GACb,WAAW;GACX,eAAoB,SAAU,cAAe;GAC7C,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,SACpE,QACE,oBAACC;GACc;GACb,WAAW;GACX,eAAoB,SAAU,cAAe;GAC7C,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,mBACpE,QACE,oBAACC;GACc;GACb,WAAW;GACX,eAAoB,SAAU,cAAe;GAC7C,GAAI;IACJ;EAGN,KAAK,yCAAyC,wBAAwB,SAEpE,QAAO,YACL,oBAACC;GAAwB;GAA4B;GAAuB;GAAU,GAAI;IAAQ,GAElG,oBAACC;GAAiC;GAA4B;GAAuB;GAAU,GAAI;IAAQ;EAG/G,KAAK,yCAAyC,wBAAwB,KAEpE,QAAO,YACL,oBAACC;GAAoB;GAA4B;GAAuB;GAAU,GAAI;IAAQ,GAE9F,oBAACD;GAAiC;GAA4B;GAAuB;GAAU,GAAI;IAAQ;EAG/G,KAAK,yCAAyC,wBAAwB,OAEpE,QAAO,YACL,oBAACE;GAAsB;GAA4B;GAAuB;GAAU,GAAI;IAAQ,GAEhG,oBAACF;GAAiC;GAA4B;GAAuB;GAAU,GAAI;IAAQ;EAG/G;AAEE,OAAI,cAAe,QAAQ,4CAA4C,MAErE,QACE,oBAACG;IACgB;IACF;IACb,WAAW;IACX,eAAoB,SAAU,cAAe;IAC7C,GAAI;cAEH,cAAe;KACH;AAKnB,OAAI,UAEF,QACE,oBAACZ;IAAgC;IAA4B;IAAuB;IAAU,GAAI;KAAQ;AAI9G,UACE,oBAACS;IAAiC;IAA4B;IAAuB;IAAU,GAAI;KAAQ;;;;;;AAQnH,MAAa,uCACX,eACA,YACA,eACA,WACA,eACA,UACA,YAMA,mBAAmB;CACjB;CACA;CACA;CACA;CACA;CACA;CACA,GAAG;CACJ,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from './SignInOptionFactory';
|
|
20
|
-
/**
|
|
21
|
-
* SMS OTP Sign-In Option Component.
|
|
22
|
-
* Handles SMS-based OTP authentication.
|
|
23
|
-
*/
|
|
24
|
-
declare const SmsOtp: FC<BaseSignInOptionProps>;
|
|
25
|
-
export default SmsOtp;
|
|
26
|
-
//# sourceMappingURL=SmsOtp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmsOtp.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SmsOtp.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,EAAE,EAA0B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAQ5D;;;GAGG;AACH,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,qBAAqB,CA0ErC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import useFlow_default from "../../../../../../contexts/Flow/useFlow.js";
|
|
2
|
-
import useTheme_default from "../../../../../../contexts/Theme/useTheme.js";
|
|
3
|
-
import useTranslation_default from "../../../../../../hooks/useTranslation.js";
|
|
4
|
-
import Button_default from "../../../../../primitives/Button/Button.js";
|
|
5
|
-
import OtpField_default from "../../../../../primitives/OtpField/OtpField.js";
|
|
6
|
-
import { createField } from "../../../../../factories/FieldFactory.js";
|
|
7
|
-
import { EmbeddedSignInFlowAuthenticatorParamType, FieldType } from "@thunderid/browser";
|
|
8
|
-
import { useEffect } from "react";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region src/components/presentation/auth/SignIn/v1/options/SmsOtp.tsx
|
|
12
|
-
/**
|
|
13
|
-
* SMS OTP Sign-In Option Component.
|
|
14
|
-
* Handles SMS-based OTP authentication.
|
|
15
|
-
*/
|
|
16
|
-
const SmsOtp = ({ authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName = "", buttonClassName = "", preferences }) => {
|
|
17
|
-
const { theme } = useTheme_default();
|
|
18
|
-
const { t } = useTranslation_default(preferences?.i18n);
|
|
19
|
-
const { setTitle, setSubtitle } = useFlow_default();
|
|
20
|
-
const formFields = authenticator.metadata?.params?.sort((a, b) => a.order - b.order) || [];
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
setTitle(t("sms.otp.heading"));
|
|
23
|
-
setSubtitle(t("sms.otp.subheading"));
|
|
24
|
-
}, [
|
|
25
|
-
setTitle,
|
|
26
|
-
setSubtitle,
|
|
27
|
-
t
|
|
28
|
-
]);
|
|
29
|
-
const hasOtpField = formFields.some((param) => param.param.toLowerCase().includes("otp") || param.param.toLowerCase().includes("code"));
|
|
30
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [formFields.map((param) => {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", { children: (param.param.toLowerCase().includes("otp") || param.param.toLowerCase().includes("code")) && hasOtpField ? /* @__PURE__ */ jsx(OtpField_default, {
|
|
32
|
-
length: 6,
|
|
33
|
-
value: formValues[param.param] || "",
|
|
34
|
-
onChange: (event) => onInputChange(param.param, event.target.value),
|
|
35
|
-
disabled: isLoading,
|
|
36
|
-
className: inputClassName
|
|
37
|
-
}) : createField({
|
|
38
|
-
className: inputClassName,
|
|
39
|
-
disabled: isLoading,
|
|
40
|
-
label: param.displayName,
|
|
41
|
-
name: param.param,
|
|
42
|
-
onChange: (value) => onInputChange(param.param, value),
|
|
43
|
-
required: authenticator.requiredParams.includes(param.param),
|
|
44
|
-
touched: touchedFields[param.param] || false,
|
|
45
|
-
type: param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential ? FieldType.Password : FieldType.Text,
|
|
46
|
-
value: formValues[param.param] || ""
|
|
47
|
-
}) }, param.param);
|
|
48
|
-
}), /* @__PURE__ */ jsx(Button_default, {
|
|
49
|
-
fullWidth: true,
|
|
50
|
-
type: "submit",
|
|
51
|
-
color: "primary",
|
|
52
|
-
variant: "solid",
|
|
53
|
-
disabled: isLoading,
|
|
54
|
-
loading: isLoading,
|
|
55
|
-
className: buttonClassName,
|
|
56
|
-
style: { marginBottom: `calc(${theme.vars.spacing.unit} * 2)` },
|
|
57
|
-
children: t("sms.otp.buttons.submit.text")
|
|
58
|
-
})] });
|
|
59
|
-
};
|
|
60
|
-
var SmsOtp_default = SmsOtp;
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
export { SmsOtp_default as default };
|
|
64
|
-
//# sourceMappingURL=SmsOtp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SmsOtp.js","names":["SmsOtp: FC<BaseSignInOptionProps>","useTheme","useTranslation","useFlow","formFields: any","hasOtpField: any","OtpField","Button"],"sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SmsOtp.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedSignInFlowAuthenticatorParamType, FieldType} from '@thunderid/browser';\nimport {FC, ReactElement, useEffect} from 'react';\n// eslint-disable-next-line import/no-cycle\nimport {BaseSignInOptionProps} from './SignInOptionFactory';\nimport useFlow from '../../../../../../contexts/Flow/useFlow';\nimport useTheme from '../../../../../../contexts/Theme/useTheme';\nimport useTranslation from '../../../../../../hooks/useTranslation';\nimport {createField} from '../../../../../factories/FieldFactory';\nimport Button from '../../../../../primitives/Button/Button';\nimport OtpField from '../../../../../primitives/OtpField/OtpField';\n\n/**\n * SMS OTP Sign-In Option Component.\n * Handles SMS-based OTP authentication.\n */\nconst SmsOtp: FC<BaseSignInOptionProps> = ({\n authenticator,\n formValues,\n touchedFields,\n isLoading,\n onInputChange,\n inputClassName = '',\n buttonClassName = '',\n preferences,\n}: BaseSignInOptionProps): ReactElement => {\n const {theme} = useTheme();\n const {t} = useTranslation(preferences?.i18n);\n const {setTitle, setSubtitle} = useFlow();\n\n const formFields: any = authenticator!.metadata?.params?.sort((a: any, b: any) => a.order - b.order) || [];\n\n useEffect(() => {\n setTitle(t('sms.otp.heading'));\n setSubtitle(t('sms.otp.subheading'));\n }, [setTitle, setSubtitle, t]);\n\n const hasOtpField: any = formFields.some(\n (param: any) => param.param.toLowerCase().includes('otp') || param.param.toLowerCase().includes('code'),\n );\n\n return (\n <>\n {formFields.map((param: any) => {\n const isOtpParam: any = param.param.toLowerCase().includes('otp') || param.param.toLowerCase().includes('code');\n\n return (\n <div key={param.param}>\n {isOtpParam && hasOtpField ? (\n <OtpField\n length={6}\n value={formValues[param.param] || ''}\n onChange={(event: any): void => onInputChange(param.param, event.target.value)}\n disabled={isLoading}\n className={inputClassName}\n />\n ) : (\n createField({\n className: inputClassName,\n disabled: isLoading,\n label: param.displayName,\n name: param.param,\n onChange: (value: any) => onInputChange(param.param, value),\n required: authenticator!.requiredParams.includes(param.param),\n touched: touchedFields[param.param] || false,\n type:\n param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential\n ? FieldType.Password\n : FieldType.Text,\n value: formValues[param.param] || '',\n })\n )}\n </div>\n );\n })}\n\n <Button\n fullWidth\n type=\"submit\"\n color=\"primary\"\n variant=\"solid\"\n disabled={isLoading}\n loading={isLoading}\n className={buttonClassName}\n style={{marginBottom: `calc(${theme.vars.spacing.unit} * 2)`}}\n >\n {t('sms.otp.buttons.submit.text')}\n </Button>\n </>\n );\n};\n\nexport default SmsOtp;\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAMA,UAAqC,EACzC,eACA,YACA,eACA,WACA,eACA,iBAAiB,IACjB,kBAAkB,IAClB,kBACyC;CACzC,MAAM,EAAC,UAASC,kBAAU;CAC1B,MAAM,EAAC,MAAKC,uBAAe,aAAa,KAAK;CAC7C,MAAM,EAAC,UAAU,gBAAeC,iBAAS;CAEzC,MAAMC,aAAkB,cAAe,UAAU,QAAQ,MAAM,GAAQ,MAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE;AAE1G,iBAAgB;AACd,WAAS,EAAE,kBAAkB,CAAC;AAC9B,cAAY,EAAE,qBAAqB,CAAC;IACnC;EAAC;EAAU;EAAa;EAAE,CAAC;CAE9B,MAAMC,cAAmB,WAAW,MACjC,UAAe,MAAM,MAAM,aAAa,CAAC,SAAS,MAAM,IAAI,MAAM,MAAM,aAAa,CAAC,SAAS,OAAO,CACxG;AAED,QACE,4CACG,WAAW,KAAK,UAAe;AAG9B,SACE,oBAAC,oBAHqB,MAAM,MAAM,aAAa,CAAC,SAAS,MAAM,IAAI,MAAM,MAAM,aAAa,CAAC,SAAS,OAAO,KAI5F,cACb,oBAACC;GACC,QAAQ;GACR,OAAO,WAAW,MAAM,UAAU;GAClC,WAAW,UAAqB,cAAc,MAAM,OAAO,MAAM,OAAO,MAAM;GAC9E,UAAU;GACV,WAAW;IACX,GAEF,YAAY;GACV,WAAW;GACX,UAAU;GACV,OAAO,MAAM;GACb,MAAM,MAAM;GACZ,WAAW,UAAe,cAAc,MAAM,OAAO,MAAM;GAC3D,UAAU,cAAe,eAAe,SAAS,MAAM,MAAM;GAC7D,SAAS,cAAc,MAAM,UAAU;GACvC,MACE,MAAM,SAAS,yCAAyC,UAAU,MAAM,eACpE,UAAU,WACV,UAAU;GAChB,OAAO,WAAW,MAAM,UAAU;GACnC,CAAC,IAvBI,MAAM,MAyBV;GAER,EAEF,oBAACC;EACC;EACA,MAAK;EACL,OAAM;EACN,SAAQ;EACR,UAAU;EACV,SAAS;EACT,WAAW;EACX,OAAO,EAAC,cAAc,QAAQ,MAAM,KAAK,QAAQ,KAAK,QAAO;YAE5D,EAAE,8BAA8B;GAC1B,IACR;;AAIP,qBAAe"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { FC, HTMLAttributes } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from './SignInOptionFactory';
|
|
20
|
-
/**
|
|
21
|
-
* Social Login Sign-In Option Component.
|
|
22
|
-
* Handles authentication with external identity providers (Google, GitHub, etc.).
|
|
23
|
-
*/
|
|
24
|
-
declare const SocialLogin: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
|
-
export default SocialLogin;
|
|
26
|
-
//# sourceMappingURL=SocialButton.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SocialButton.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SocialButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,EAAE,EAAE,cAAc,EAAe,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAI5D;;;GAGG;AACH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,qBAAqB,GAAG,cAAc,CAAC,iBAAiB,CAAC,CA2B9E,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import useTranslation_default from "../../../../../../hooks/useTranslation.js";
|
|
2
|
-
import Button_default from "../../../../../primitives/Button/Button.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
|
-
//#region src/components/presentation/auth/SignIn/v1/options/SocialButton.tsx
|
|
6
|
-
/**
|
|
7
|
-
* Social Login Sign-In Option Component.
|
|
8
|
-
* Handles authentication with external identity providers (Google, GitHub, etc.).
|
|
9
|
-
*/
|
|
10
|
-
const SocialLogin = ({ isLoading, preferences, children,...rest }) => {
|
|
11
|
-
const { t } = useTranslation_default(preferences?.i18n);
|
|
12
|
-
return /* @__PURE__ */ jsx(Button_default, {
|
|
13
|
-
...rest,
|
|
14
|
-
fullWidth: true,
|
|
15
|
-
type: "button",
|
|
16
|
-
color: "secondary",
|
|
17
|
-
variant: "outline",
|
|
18
|
-
disabled: isLoading,
|
|
19
|
-
startIcon: /* @__PURE__ */ jsx("svg", {
|
|
20
|
-
width: "18",
|
|
21
|
-
height: "18",
|
|
22
|
-
viewBox: "0 0 24 24",
|
|
23
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
24
|
-
children: /* @__PURE__ */ jsx("path", {
|
|
25
|
-
fill: "currentColor",
|
|
26
|
-
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
27
|
-
})
|
|
28
|
-
}),
|
|
29
|
-
children: t("elements.buttons.social.text", { connection: children })
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var SocialButton_default = SocialLogin;
|
|
33
|
-
|
|
34
|
-
//#endregion
|
|
35
|
-
export { SocialButton_default as default };
|
|
36
|
-
//# sourceMappingURL=SocialButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SocialButton.js","names":["SocialLogin: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>","useTranslation","Button"],"sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/SocialButton.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, HTMLAttributes, ReactElement} from 'react';\n// eslint-disable-next-line import/no-cycle\nimport {BaseSignInOptionProps} from './SignInOptionFactory';\nimport useTranslation from '../../../../../../hooks/useTranslation';\nimport Button from '../../../../../primitives/Button/Button';\n\n/**\n * Social Login Sign-In Option Component.\n * Handles authentication with external identity providers (Google, GitHub, etc.).\n */\nconst SocialLogin: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>> = ({\n isLoading,\n preferences,\n children,\n ...rest\n}: BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>): ReactElement => {\n const {t} = useTranslation(preferences?.i18n);\n return (\n <Button\n {...rest}\n fullWidth\n type=\"button\"\n color=\"secondary\"\n variant=\"outline\"\n disabled={isLoading}\n startIcon={\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fill=\"currentColor\"\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n />\n </svg>\n }\n >\n {t('elements.buttons.social.text', {connection: children as string})}\n </Button>\n );\n};\n\nexport default SocialLogin;\n"],"mappings":";;;;;;;;;AA4BA,MAAMA,eAA8E,EAClF,WACA,aACA,SACA,GAAG,WAC0E;CAC7E,MAAM,EAAC,MAAKC,uBAAe,aAAa,KAAK;AAC7C,QACE,oBAACC;EACC,GAAI;EACJ;EACA,MAAK;EACL,OAAM;EACN,SAAQ;EACR,UAAU;EACV,WACE,oBAAC;GAAI,OAAM;GAAK,QAAO;GAAK,SAAQ;GAAY,OAAM;aACpD,oBAAC;IACC,MAAK;IACL,GAAE;KACF;IACE;YAGP,EAAE,gCAAgC,EAAC,YAAY,UAAmB,CAAC;GAC7D;;AAIb,2BAAe"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from './SignInOptionFactory';
|
|
20
|
-
/**
|
|
21
|
-
* TOTP Sign-In Option Component.
|
|
22
|
-
* Handles Time-based One-Time Password (TOTP) authentication.
|
|
23
|
-
*/
|
|
24
|
-
declare const Totp: FC<BaseSignInOptionProps>;
|
|
25
|
-
export default Totp;
|
|
26
|
-
//# sourceMappingURL=Totp.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Totp.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/Totp.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,EAAE,EAA0B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAQ5D;;;GAGG;AACH,QAAA,MAAM,IAAI,EAAE,EAAE,CAAC,qBAAqB,CA2EnC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import useFlow_default from "../../../../../../contexts/Flow/useFlow.js";
|
|
2
|
-
import useTheme_default from "../../../../../../contexts/Theme/useTheme.js";
|
|
3
|
-
import useTranslation_default from "../../../../../../hooks/useTranslation.js";
|
|
4
|
-
import Button_default from "../../../../../primitives/Button/Button.js";
|
|
5
|
-
import OtpField_default from "../../../../../primitives/OtpField/OtpField.js";
|
|
6
|
-
import { createField } from "../../../../../factories/FieldFactory.js";
|
|
7
|
-
import { EmbeddedSignInFlowAuthenticatorParamType, FieldType } from "@thunderid/browser";
|
|
8
|
-
import { useEffect } from "react";
|
|
9
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
|
|
11
|
-
//#region src/components/presentation/auth/SignIn/v1/options/Totp.tsx
|
|
12
|
-
/**
|
|
13
|
-
* TOTP Sign-In Option Component.
|
|
14
|
-
* Handles Time-based One-Time Password (TOTP) authentication.
|
|
15
|
-
*/
|
|
16
|
-
const Totp = ({ authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName = "", buttonClassName = "", preferences }) => {
|
|
17
|
-
const { theme } = useTheme_default();
|
|
18
|
-
const { t } = useTranslation_default(preferences?.i18n);
|
|
19
|
-
const { setTitle, setSubtitle } = useFlow_default();
|
|
20
|
-
const formFields = authenticator.metadata?.params?.sort((a, b) => a.order - b.order) || [];
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
setTitle(t("totp.heading"));
|
|
23
|
-
setSubtitle(t("totp.subheading"));
|
|
24
|
-
}, [
|
|
25
|
-
setTitle,
|
|
26
|
-
setSubtitle,
|
|
27
|
-
t
|
|
28
|
-
]);
|
|
29
|
-
const hasTotpField = formFields.some((param) => param.param.toLowerCase().includes("totp") || param.param.toLowerCase().includes("token"));
|
|
30
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [formFields.map((param) => {
|
|
31
|
-
return /* @__PURE__ */ jsx("div", { children: (param.param.toLowerCase().includes("totp") || param.param.toLowerCase().includes("token")) && hasTotpField ? /* @__PURE__ */ jsx(OtpField_default, {
|
|
32
|
-
length: 6,
|
|
33
|
-
value: formValues[param.param] || "",
|
|
34
|
-
onChange: (event) => onInputChange(param.param, event.target.value),
|
|
35
|
-
disabled: isLoading,
|
|
36
|
-
className: inputClassName
|
|
37
|
-
}) : createField({
|
|
38
|
-
className: inputClassName,
|
|
39
|
-
disabled: isLoading,
|
|
40
|
-
label: param.displayName,
|
|
41
|
-
name: param.param,
|
|
42
|
-
onChange: (value) => onInputChange(param.param, value),
|
|
43
|
-
required: authenticator.requiredParams.includes(param.param),
|
|
44
|
-
touched: touchedFields[param.param] || false,
|
|
45
|
-
type: param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential ? FieldType.Password : FieldType.Text,
|
|
46
|
-
value: formValues[param.param] || ""
|
|
47
|
-
}) }, param.param);
|
|
48
|
-
}), /* @__PURE__ */ jsx(Button_default, {
|
|
49
|
-
fullWidth: true,
|
|
50
|
-
type: "submit",
|
|
51
|
-
color: "primary",
|
|
52
|
-
variant: "solid",
|
|
53
|
-
disabled: isLoading,
|
|
54
|
-
loading: isLoading,
|
|
55
|
-
className: buttonClassName,
|
|
56
|
-
style: { marginBottom: `calc(${theme.vars.spacing.unit} * 2)` },
|
|
57
|
-
children: t("totp.buttons.submit.text")
|
|
58
|
-
})] });
|
|
59
|
-
};
|
|
60
|
-
var Totp_default = Totp;
|
|
61
|
-
|
|
62
|
-
//#endregion
|
|
63
|
-
export { Totp_default as default };
|
|
64
|
-
//# sourceMappingURL=Totp.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Totp.js","names":["Totp: FC<BaseSignInOptionProps>","useTheme","useTranslation","useFlow","formFields: any","hasTotpField: any","OtpField","Button"],"sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/Totp.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {EmbeddedSignInFlowAuthenticatorParamType, FieldType} from '@thunderid/browser';\nimport {FC, ReactElement, useEffect} from 'react';\n// eslint-disable-next-line import/no-cycle\nimport {BaseSignInOptionProps} from './SignInOptionFactory';\nimport useFlow from '../../../../../../contexts/Flow/useFlow';\nimport useTheme from '../../../../../../contexts/Theme/useTheme';\nimport useTranslation from '../../../../../../hooks/useTranslation';\nimport {createField} from '../../../../../factories/FieldFactory';\nimport Button from '../../../../../primitives/Button/Button';\nimport OtpField from '../../../../../primitives/OtpField/OtpField';\n\n/**\n * TOTP Sign-In Option Component.\n * Handles Time-based One-Time Password (TOTP) authentication.\n */\nconst Totp: FC<BaseSignInOptionProps> = ({\n authenticator,\n formValues,\n touchedFields,\n isLoading,\n onInputChange,\n inputClassName = '',\n buttonClassName = '',\n preferences,\n}: BaseSignInOptionProps): ReactElement => {\n const {theme} = useTheme();\n const {t} = useTranslation(preferences?.i18n);\n const {setTitle, setSubtitle} = useFlow();\n\n const formFields: any = authenticator!.metadata?.params?.sort((a: any, b: any) => a.order - b.order) || [];\n\n useEffect(() => {\n setTitle(t('totp.heading'));\n setSubtitle(t('totp.subheading'));\n }, [setTitle, setSubtitle, t]);\n\n const hasTotpField: any = formFields.some(\n (param: any) => param.param.toLowerCase().includes('totp') || param.param.toLowerCase().includes('token'),\n );\n\n return (\n <>\n {formFields.map((param: any) => {\n const isTotpParam: any =\n param.param.toLowerCase().includes('totp') || param.param.toLowerCase().includes('token');\n\n return (\n <div key={param.param}>\n {isTotpParam && hasTotpField ? (\n <OtpField\n length={6}\n value={formValues[param.param] || ''}\n onChange={(event: any): void => onInputChange(param.param, event.target.value)}\n disabled={isLoading}\n className={inputClassName}\n />\n ) : (\n createField({\n className: inputClassName,\n disabled: isLoading,\n label: param.displayName,\n name: param.param,\n onChange: (value: any) => onInputChange(param.param, value),\n required: authenticator!.requiredParams.includes(param.param),\n touched: touchedFields[param.param] || false,\n type:\n param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential\n ? FieldType.Password\n : FieldType.Text,\n value: formValues[param.param] || '',\n })\n )}\n </div>\n );\n })}\n\n <Button\n fullWidth\n type=\"submit\"\n color=\"primary\"\n variant=\"solid\"\n disabled={isLoading}\n loading={isLoading}\n className={buttonClassName}\n style={{marginBottom: `calc(${theme.vars.spacing.unit} * 2)`}}\n >\n {t('totp.buttons.submit.text')}\n </Button>\n </>\n );\n};\n\nexport default Totp;\n"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAMA,QAAmC,EACvC,eACA,YACA,eACA,WACA,eACA,iBAAiB,IACjB,kBAAkB,IAClB,kBACyC;CACzC,MAAM,EAAC,UAASC,kBAAU;CAC1B,MAAM,EAAC,MAAKC,uBAAe,aAAa,KAAK;CAC7C,MAAM,EAAC,UAAU,gBAAeC,iBAAS;CAEzC,MAAMC,aAAkB,cAAe,UAAU,QAAQ,MAAM,GAAQ,MAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE;AAE1G,iBAAgB;AACd,WAAS,EAAE,eAAe,CAAC;AAC3B,cAAY,EAAE,kBAAkB,CAAC;IAChC;EAAC;EAAU;EAAa;EAAE,CAAC;CAE9B,MAAMC,eAAoB,WAAW,MAClC,UAAe,MAAM,MAAM,aAAa,CAAC,SAAS,OAAO,IAAI,MAAM,MAAM,aAAa,CAAC,SAAS,QAAQ,CAC1G;AAED,QACE,4CACG,WAAW,KAAK,UAAe;AAI9B,SACE,oBAAC,oBAHD,MAAM,MAAM,aAAa,CAAC,SAAS,OAAO,IAAI,MAAM,MAAM,aAAa,CAAC,SAAS,QAAQ,KAIvE,eACd,oBAACC;GACC,QAAQ;GACR,OAAO,WAAW,MAAM,UAAU;GAClC,WAAW,UAAqB,cAAc,MAAM,OAAO,MAAM,OAAO,MAAM;GAC9E,UAAU;GACV,WAAW;IACX,GAEF,YAAY;GACV,WAAW;GACX,UAAU;GACV,OAAO,MAAM;GACb,MAAM,MAAM;GACZ,WAAW,UAAe,cAAc,MAAM,OAAO,MAAM;GAC3D,UAAU,cAAe,eAAe,SAAS,MAAM,MAAM;GAC7D,SAAS,cAAc,MAAM,UAAU;GACvC,MACE,MAAM,SAAS,yCAAyC,UAAU,MAAM,eACpE,UAAU,WACV,UAAU;GAChB,OAAO,WAAW,MAAM,UAAU;GACnC,CAAC,IAvBI,MAAM,MAyBV;GAER,EAEF,oBAACC;EACC;EACA,MAAK;EACL,OAAM;EACN,SAAQ;EACR,UAAU;EACV,SAAS;EACT,WAAW;EACX,OAAO,EAAC,cAAc,QAAQ,MAAM,KAAK,QAAQ,KAAK,QAAO;YAE5D,EAAE,2BAA2B;GACvB,IACR;;AAIP,mBAAe"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from './SignInOptionFactory';
|
|
20
|
-
/**
|
|
21
|
-
* Username Password Sign-In Option Component.
|
|
22
|
-
* Handles traditional username and password authentication.
|
|
23
|
-
*/
|
|
24
|
-
declare const UsernamePassword: FC<BaseSignInOptionProps>;
|
|
25
|
-
export default UsernamePassword;
|
|
26
|
-
//# sourceMappingURL=UsernamePassword.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsernamePassword.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/presentation/auth/SignIn/v1/options/UsernamePassword.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,EAAE,EAA0B,MAAM,OAAO,CAAC;AAElD,OAAO,EAAC,qBAAqB,EAAC,MAAM,uBAAuB,CAAC;AAO5D;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+D/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import useFlow_default from "../../../../../../contexts/Flow/useFlow.js";
|
|
2
|
-
import useTheme_default from "../../../../../../contexts/Theme/useTheme.js";
|
|
3
|
-
import useTranslation_default from "../../../../../../hooks/useTranslation.js";
|
|
4
|
-
import Button_default from "../../../../../primitives/Button/Button.js";
|
|
5
|
-
import { createField } from "../../../../../factories/FieldFactory.js";
|
|
6
|
-
import { EmbeddedSignInFlowAuthenticatorParamType, FieldType } from "@thunderid/browser";
|
|
7
|
-
import { useEffect } from "react";
|
|
8
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
|
|
10
|
-
//#region src/components/presentation/auth/SignIn/v1/options/UsernamePassword.tsx
|
|
11
|
-
/**
|
|
12
|
-
* Username Password Sign-In Option Component.
|
|
13
|
-
* Handles traditional username and password authentication.
|
|
14
|
-
*/
|
|
15
|
-
const UsernamePassword = ({ authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName = "", buttonClassName = "", preferences }) => {
|
|
16
|
-
const { theme } = useTheme_default();
|
|
17
|
-
const { t } = useTranslation_default(preferences?.i18n);
|
|
18
|
-
const { setTitle, setSubtitle } = useFlow_default();
|
|
19
|
-
const formFields = authenticator.metadata?.params?.sort((a, b) => a.order - b.order)?.filter((param) => param.param !== "totp") || [];
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
setTitle(t("username.password.heading"));
|
|
22
|
-
setSubtitle(t("username.password.subheading"));
|
|
23
|
-
}, [
|
|
24
|
-
setTitle,
|
|
25
|
-
setSubtitle,
|
|
26
|
-
t
|
|
27
|
-
]);
|
|
28
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [formFields.map((param) => /* @__PURE__ */ jsx("div", { children: createField({
|
|
29
|
-
className: inputClassName,
|
|
30
|
-
disabled: isLoading,
|
|
31
|
-
label: param.displayName,
|
|
32
|
-
name: param.param,
|
|
33
|
-
onChange: (value) => onInputChange(param.param, value),
|
|
34
|
-
placeholder: t(`elements.fields.generic.placeholder`, { field: (param.displayName || param.param).toLowerCase() }),
|
|
35
|
-
required: authenticator.requiredParams.includes(param.param),
|
|
36
|
-
touched: touchedFields[param.param] || false,
|
|
37
|
-
type: param.type === EmbeddedSignInFlowAuthenticatorParamType.String && param.confidential ? FieldType.Password : FieldType.Text,
|
|
38
|
-
value: formValues[param.param] || ""
|
|
39
|
-
}) }, param.param)), /* @__PURE__ */ jsx(Button_default, {
|
|
40
|
-
fullWidth: true,
|
|
41
|
-
type: "submit",
|
|
42
|
-
color: "primary",
|
|
43
|
-
variant: "solid",
|
|
44
|
-
disabled: isLoading,
|
|
45
|
-
loading: isLoading,
|
|
46
|
-
className: buttonClassName,
|
|
47
|
-
"data-testid": "thunderid-signin-submit",
|
|
48
|
-
style: { marginBottom: `calc(${theme.vars.spacing.unit} * 2)` },
|
|
49
|
-
children: t("username.password.buttons.submit.text")
|
|
50
|
-
})] });
|
|
51
|
-
};
|
|
52
|
-
var UsernamePassword_default = UsernamePassword;
|
|
53
|
-
|
|
54
|
-
//#endregion
|
|
55
|
-
export { UsernamePassword_default as default };
|
|
56
|
-
//# sourceMappingURL=UsernamePassword.js.map
|