@thunderid/react 0.11.3 → 0.11.4
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 +0 -17
- package/dist/ThunderIDReactClient.d.ts.map +1 -1
- package/dist/ThunderIDReactClient.js.map +1 -1
- package/dist/api/getUsersMe.d.ts +0 -17
- package/dist/api/getUsersMe.d.ts.map +1 -1
- package/dist/api/getUsersMe.js.map +1 -1
- package/dist/api/updateMeProfile.d.ts +0 -17
- package/dist/api/updateMeProfile.d.ts.map +1 -1
- package/dist/api/updateMeProfile.js.map +1 -1
- package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
- package/dist/cjs/api/getUsersMe.cjs.map +1 -1
- package/dist/cjs/api/updateMeProfile.cjs.map +1 -1
- package/dist/cjs/components/actions/SignInButton/BaseSignInButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignOutButton/BaseSignOutButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignOutButton/SignOutButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignUpButton/BaseSignUpButton.cjs.map +1 -1
- package/dist/cjs/components/actions/SignUpButton/SignUpButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
- package/dist/cjs/components/adapters/ConsentCheckboxList.styles.cjs.map +1 -1
- package/dist/cjs/components/adapters/FacebookButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/FlowTimer.cjs.map +1 -1
- package/dist/cjs/components/adapters/GitHubButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/GoogleButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/ImageComponent.cjs.map +1 -1
- package/dist/cjs/components/adapters/LinkedInButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/MicrosoftButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/SignInWithEthereumButton.cjs.map +1 -1
- package/dist/cjs/components/adapters/SmsOtpButton.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/OAuthCallback.cjs.map +1 -1
- package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -1
- package/dist/cjs/components/control/Loading.cjs.map +1 -1
- package/dist/cjs/components/control/SignedIn.cjs.map +1 -1
- package/dist/cjs/components/control/SignedOut.cjs.map +1 -1
- package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/LanguageSwitcher/LanguageSwitcher.cjs.map +1 -1
- package/dist/cjs/components/presentation/User/BaseUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/User/User.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserAvatar/BaseUserAvatar.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserAvatar/UserAvatar.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/UserProfile/UserProfile.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs +3 -4
- package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/InviteUser/InviteUser.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +10 -1
- package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.styles.cjs.map +1 -1
- package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.cjs.map +1 -1
- package/dist/cjs/components/primitives/AffixedField/AffixedField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Alert/Alert.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.cjs.map +1 -1
- package/dist/cjs/components/primitives/Avatar/Avatar.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/primitives/Button/Button.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.cjs.map +1 -1
- package/dist/cjs/components/primitives/Card/Card.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/cjs/components/primitives/Checkbox/Checkbox.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/CopyableText/CopyableText.cjs.map +1 -1
- package/dist/cjs/components/primitives/CopyableText/CopyableText.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/cjs/components/primitives/DatePicker/DatePicker.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/primitives/Dialog/Dialog.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.cjs.map +1 -1
- package/dist/cjs/components/primitives/Divider/Divider.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.cjs.map +1 -1
- package/dist/cjs/components/primitives/FormControl/FormControl.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ArrowLeftRight.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ArrowRightLeft.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/BuildingAlt.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Check.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/ChevronDown.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/CircleAlert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/CircleCheck.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Eye.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/EyeOff.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Info.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/LogOut.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/Plus.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/TriangleAlert.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/User.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/X.cjs.map +1 -1
- package/dist/cjs/components/primitives/Icons/flowIconRegistry.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.cjs.map +1 -1
- package/dist/cjs/components/primitives/InputLabel/InputLabel.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/KeyValueInput/KeyValueInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.cjs.map +1 -1
- package/dist/cjs/components/primitives/Logo/Logo.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.cjs.map +1 -1
- package/dist/cjs/components/primitives/MultiInput/MultiInput.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.cjs.map +1 -1
- package/dist/cjs/components/primitives/OtpField/OtpField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
- package/dist/cjs/components/primitives/PasswordField/PasswordField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.cjs.map +1 -1
- package/dist/cjs/components/primitives/Select/Select.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.cjs.map +1 -1
- package/dist/cjs/components/primitives/Spinner/Spinner.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.cjs.map +1 -1
- package/dist/cjs/components/primitives/TextField/TextField.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.cjs.map +1 -1
- package/dist/cjs/components/primitives/Toggle/Toggle.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/primitives/Tooltip/Tooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.cjs.map +1 -1
- package/dist/cjs/components/primitives/Typography/Typography.styles.cjs.map +1 -1
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -1
- package/dist/cjs/contexts/ComponentRenderer/ComponentRendererProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/FlowContext.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/FlowProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Flow/useFlow.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/FlowMetaContext.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -1
- package/dist/cjs/contexts/FlowMeta/useFlowMeta.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/ComponentPreferencesContext.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/I18nContext.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/I18nProvider.cjs.map +1 -1
- package/dist/cjs/contexts/I18n/useI18n.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/ThemeContext.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/contexts/Theme/useTheme.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
- package/dist/cjs/contexts/ThunderID/useThunderID.cjs.map +1 -1
- package/dist/cjs/contexts/User/UserContext.cjs.map +1 -1
- package/dist/cjs/contexts/User/UserProvider.cjs.map +1 -1
- package/dist/cjs/contexts/User/useUser.cjs.map +1 -1
- package/dist/cjs/hooks/useBrowserUrl.cjs.map +1 -1
- package/dist/cjs/hooks/useForm.cjs.map +1 -1
- package/dist/cjs/hooks/useOAuthCallback.cjs.map +1 -1
- package/dist/cjs/hooks/useTranslation.cjs.map +1 -1
- package/dist/cjs/utils/applyThemeToDOM.cjs.map +1 -1
- package/dist/cjs/utils/buildThemeConfigFromFlowMeta.cjs.map +1 -1
- package/dist/cjs/utils/composeAffixedInputs.cjs.map +1 -1
- package/dist/cjs/utils/flowTransformer.cjs.map +1 -1
- package/dist/cjs/utils/getAuthComponentHeadings.cjs.map +1 -1
- package/dist/cjs/utils/getDisplayName.cjs.map +1 -1
- package/dist/cjs/utils/getMappedUserProfileValue.cjs.map +1 -1
- package/dist/cjs/utils/normalizeThemeConfig.cjs.map +1 -1
- package/dist/cjs/utils/oauth.cjs.map +1 -1
- package/dist/cjs/utils/passkey.cjs.map +1 -1
- package/dist/cjs/utils/resolveTranslationsInArray.cjs.map +1 -1
- package/dist/cjs/utils/resolveTranslationsInObject.cjs.map +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +0 -17
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.d.ts +0 -17
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
- package/dist/components/actions/SignInButton/SignInButton.js.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +0 -17
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +0 -17
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -1
- package/dist/components/actions/SignOutButton/SignOutButton.js.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +0 -17
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +0 -17
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -1
- package/dist/components/actions/SignUpButton/SignUpButton.js.map +1 -1
- package/dist/components/adapters/Consent.d.ts +0 -17
- 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 +0 -17
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts +0 -17
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -1
- package/dist/components/adapters/ConsentCheckboxList.styles.js.map +1 -1
- package/dist/components/adapters/FacebookButton.d.ts +0 -17
- package/dist/components/adapters/FacebookButton.d.ts.map +1 -1
- package/dist/components/adapters/FacebookButton.js.map +1 -1
- package/dist/components/adapters/FlowTimer.d.ts +0 -17
- package/dist/components/adapters/FlowTimer.d.ts.map +1 -1
- package/dist/components/adapters/FlowTimer.js.map +1 -1
- package/dist/components/adapters/GitHubButton.d.ts +0 -17
- package/dist/components/adapters/GitHubButton.d.ts.map +1 -1
- package/dist/components/adapters/GitHubButton.js.map +1 -1
- package/dist/components/adapters/GoogleButton.d.ts +0 -17
- package/dist/components/adapters/GoogleButton.d.ts.map +1 -1
- package/dist/components/adapters/GoogleButton.js.map +1 -1
- package/dist/components/adapters/ImageComponent.d.ts +0 -17
- package/dist/components/adapters/ImageComponent.d.ts.map +1 -1
- package/dist/components/adapters/ImageComponent.js.map +1 -1
- package/dist/components/adapters/LinkedInButton.d.ts +0 -17
- package/dist/components/adapters/LinkedInButton.d.ts.map +1 -1
- package/dist/components/adapters/LinkedInButton.js.map +1 -1
- package/dist/components/adapters/MicrosoftButton.d.ts +0 -17
- package/dist/components/adapters/MicrosoftButton.d.ts.map +1 -1
- package/dist/components/adapters/MicrosoftButton.js.map +1 -1
- package/dist/components/adapters/SignInWithEthereumButton.d.ts +0 -17
- package/dist/components/adapters/SignInWithEthereumButton.d.ts.map +1 -1
- package/dist/components/adapters/SignInWithEthereumButton.js.map +1 -1
- package/dist/components/adapters/SmsOtpButton.d.ts +0 -17
- package/dist/components/adapters/SmsOtpButton.d.ts.map +1 -1
- package/dist/components/adapters/SmsOtpButton.js.map +1 -1
- package/dist/components/auth/Callback/Callback.d.ts.map +1 -1
- package/dist/components/auth/Callback/Callback.js.map +1 -1
- package/dist/components/auth/Callback/OAuthCallback.d.ts +0 -17
- package/dist/components/auth/Callback/OAuthCallback.d.ts.map +1 -1
- package/dist/components/auth/Callback/OAuthCallback.js.map +1 -1
- package/dist/components/auth/Callback/TokenCallback.d.ts +0 -16
- package/dist/components/auth/Callback/TokenCallback.d.ts.map +1 -1
- package/dist/components/auth/Callback/TokenCallback.js.map +1 -1
- package/dist/components/control/Loading.d.ts +0 -17
- package/dist/components/control/Loading.d.ts.map +1 -1
- package/dist/components/control/Loading.js.map +1 -1
- package/dist/components/control/SignedIn.d.ts +0 -17
- package/dist/components/control/SignedIn.d.ts.map +1 -1
- package/dist/components/control/SignedIn.js.map +1 -1
- package/dist/components/control/SignedOut.d.ts +0 -17
- package/dist/components/control/SignedOut.d.ts.map +1 -1
- package/dist/components/control/SignedOut.js.map +1 -1
- package/dist/components/factories/FieldFactory.d.ts +0 -17
- package/dist/components/factories/FieldFactory.d.ts.map +1 -1
- package/dist/components/factories/FieldFactory.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.js.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts +0 -17
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.js.map +1 -1
- package/dist/components/presentation/User/BaseUser.d.ts +0 -17
- package/dist/components/presentation/User/BaseUser.d.ts.map +1 -1
- package/dist/components/presentation/User/BaseUser.js.map +1 -1
- package/dist/components/presentation/User/User.d.ts +0 -17
- package/dist/components/presentation/User/User.d.ts.map +1 -1
- package/dist/components/presentation/User/User.js.map +1 -1
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts +0 -17
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.d.ts.map +1 -1
- package/dist/components/presentation/UserAvatar/BaseUserAvatar.js.map +1 -1
- package/dist/components/presentation/UserAvatar/UserAvatar.d.ts +0 -17
- package/dist/components/presentation/UserAvatar/UserAvatar.d.ts.map +1 -1
- package/dist/components/presentation/UserAvatar/UserAvatar.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.js.map +1 -1
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +0 -17
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/UserDropdown/UserDropdown.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +0 -17
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +0 -17
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +0 -17
- package/dist/components/presentation/UserProfile/UserProfile.d.ts.map +1 -1
- package/dist/components/presentation/UserProfile/UserProfile.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js +2 -4
- package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -1
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +0 -17
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +0 -17
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
- package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts.map +1 -1
- package/dist/components/presentation/auth/InviteUser/InviteUser.js.map +1 -1
- package/dist/components/presentation/auth/InviteUser/index.d.ts +0 -17
- package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +0 -17
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts +0 -17
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -1
- package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.js.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +0 -17
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignIn/SignIn.js +10 -1
- package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.js.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts +0 -17
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -1
- package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.d.ts +0 -17
- package/dist/components/primitives/AffixedField/AffixedField.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts +0 -17
- package/dist/components/primitives/AffixedField/AffixedField.styles.d.ts.map +1 -1
- package/dist/components/primitives/AffixedField/AffixedField.styles.js.map +1 -1
- package/dist/components/primitives/AffixedField/index.d.ts +0 -17
- package/dist/components/primitives/AffixedField/index.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts +0 -17
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.js.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.d.ts +0 -17
- package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.styles.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.d.ts +0 -17
- package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.js.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +0 -17
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -1
- package/dist/components/primitives/Avatar/Avatar.styles.js.map +1 -1
- package/dist/components/primitives/Button/Button.d.ts +0 -17
- package/dist/components/primitives/Button/Button.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.js.map +1 -1
- package/dist/components/primitives/Button/Button.styles.d.ts +0 -17
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/primitives/Button/Button.styles.js.map +1 -1
- package/dist/components/primitives/Card/Card.d.ts +0 -17
- package/dist/components/primitives/Card/Card.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.js.map +1 -1
- package/dist/components/primitives/Card/Card.styles.d.ts +0 -17
- package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -1
- package/dist/components/primitives/Card/Card.styles.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +0 -17
- package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +0 -17
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -1
- package/dist/components/primitives/Checkbox/Checkbox.styles.js.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.d.ts +0 -17
- package/dist/components/primitives/CopyableText/CopyableText.d.ts.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.js.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts +0 -17
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -1
- package/dist/components/primitives/CopyableText/CopyableText.styles.js.map +1 -1
- package/dist/components/primitives/CopyableText/index.d.ts +0 -17
- package/dist/components/primitives/CopyableText/index.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +0 -17
- package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +0 -17
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.styles.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.d.ts +0 -17
- package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.js.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts +0 -17
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -1
- package/dist/components/primitives/Dialog/Dialog.styles.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.d.ts +0 -17
- package/dist/components/primitives/Divider/Divider.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.js.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.d.ts +0 -17
- package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -1
- package/dist/components/primitives/Divider/Divider.styles.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.d.ts +0 -17
- package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.js.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts +0 -17
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -1
- package/dist/components/primitives/FormControl/FormControl.styles.js.map +1 -1
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts +0 -17
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ArrowLeftRight.js.map +1 -1
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts +0 -17
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ArrowRightLeft.js.map +1 -1
- package/dist/components/primitives/Icons/Building.d.ts +0 -17
- package/dist/components/primitives/Icons/Building.d.ts.map +1 -1
- package/dist/components/primitives/Icons/BuildingAlt.d.ts +0 -17
- package/dist/components/primitives/Icons/BuildingAlt.d.ts.map +1 -1
- package/dist/components/primitives/Icons/BuildingAlt.js.map +1 -1
- package/dist/components/primitives/Icons/Check.d.ts +0 -17
- package/dist/components/primitives/Icons/Check.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Check.js.map +1 -1
- package/dist/components/primitives/Icons/ChevronDown.d.ts +0 -17
- package/dist/components/primitives/Icons/ChevronDown.d.ts.map +1 -1
- package/dist/components/primitives/Icons/ChevronDown.js.map +1 -1
- package/dist/components/primitives/Icons/CircleAlert.d.ts +0 -17
- package/dist/components/primitives/Icons/CircleAlert.d.ts.map +1 -1
- package/dist/components/primitives/Icons/CircleAlert.js.map +1 -1
- package/dist/components/primitives/Icons/CircleCheck.d.ts +0 -17
- package/dist/components/primitives/Icons/CircleCheck.d.ts.map +1 -1
- package/dist/components/primitives/Icons/CircleCheck.js.map +1 -1
- package/dist/components/primitives/Icons/Eye.d.ts +0 -17
- package/dist/components/primitives/Icons/Eye.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Eye.js.map +1 -1
- package/dist/components/primitives/Icons/EyeOff.d.ts +0 -17
- package/dist/components/primitives/Icons/EyeOff.d.ts.map +1 -1
- package/dist/components/primitives/Icons/EyeOff.js.map +1 -1
- package/dist/components/primitives/Icons/Info.d.ts +0 -17
- package/dist/components/primitives/Icons/Info.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Info.js.map +1 -1
- package/dist/components/primitives/Icons/LogOut.d.ts +0 -17
- package/dist/components/primitives/Icons/LogOut.d.ts.map +1 -1
- package/dist/components/primitives/Icons/LogOut.js.map +1 -1
- package/dist/components/primitives/Icons/Plus.d.ts +0 -17
- package/dist/components/primitives/Icons/Plus.d.ts.map +1 -1
- package/dist/components/primitives/Icons/Plus.js.map +1 -1
- package/dist/components/primitives/Icons/TriangleAlert.d.ts +0 -17
- package/dist/components/primitives/Icons/TriangleAlert.d.ts.map +1 -1
- package/dist/components/primitives/Icons/TriangleAlert.js.map +1 -1
- package/dist/components/primitives/Icons/User.d.ts +0 -17
- package/dist/components/primitives/Icons/User.d.ts.map +1 -1
- package/dist/components/primitives/Icons/User.js.map +1 -1
- package/dist/components/primitives/Icons/X.d.ts +0 -17
- package/dist/components/primitives/Icons/X.d.ts.map +1 -1
- package/dist/components/primitives/Icons/X.js.map +1 -1
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts +0 -17
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts.map +1 -1
- package/dist/components/primitives/Icons/flowIconRegistry.js.map +1 -1
- package/dist/components/primitives/Icons/index.d.ts +0 -17
- package/dist/components/primitives/Icons/index.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +0 -17
- package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.js.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +0 -17
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -1
- package/dist/components/primitives/InputLabel/InputLabel.styles.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +0 -17
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.js.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +0 -17
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.d.ts +0 -17
- package/dist/components/primitives/Logo/Logo.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.js.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.d.ts +0 -17
- package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -1
- package/dist/components/primitives/Logo/Logo.styles.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.d.ts +0 -17
- package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.js.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +0 -17
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -1
- package/dist/components/primitives/MultiInput/MultiInput.styles.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.d.ts +0 -17
- package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.js.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts +0 -17
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -1
- package/dist/components/primitives/OtpField/OtpField.styles.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.d.ts +0 -17
- package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +0 -17
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -1
- package/dist/components/primitives/PasswordField/PasswordField.styles.js.map +1 -1
- package/dist/components/primitives/Select/Select.d.ts +0 -17
- package/dist/components/primitives/Select/Select.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.js.map +1 -1
- package/dist/components/primitives/Select/Select.styles.d.ts +0 -17
- package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -1
- package/dist/components/primitives/Select/Select.styles.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.d.ts +0 -17
- package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.js.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +0 -17
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -1
- package/dist/components/primitives/Spinner/Spinner.styles.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.d.ts +0 -17
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.js.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.d.ts +0 -17
- package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -1
- package/dist/components/primitives/TextField/TextField.styles.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.d.ts +0 -17
- package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.js.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts +0 -17
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -1
- package/dist/components/primitives/Toggle/Toggle.styles.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts +0 -17
- package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts +0 -17
- package/dist/components/primitives/Tooltip/Tooltip.styles.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.styles.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.d.ts +0 -17
- package/dist/components/primitives/Typography/Typography.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.js.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.d.ts +0 -17
- package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -1
- package/dist/components/primitives/Typography/Typography.styles.js.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +0 -17
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts +0 -17
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts.map +1 -1
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.js.map +1 -1
- package/dist/contexts/Flow/FlowContext.d.ts +0 -17
- package/dist/contexts/Flow/FlowContext.d.ts.map +1 -1
- package/dist/contexts/Flow/FlowContext.js.map +1 -1
- package/dist/contexts/Flow/FlowProvider.d.ts +0 -17
- package/dist/contexts/Flow/FlowProvider.d.ts.map +1 -1
- package/dist/contexts/Flow/FlowProvider.js.map +1 -1
- package/dist/contexts/Flow/useFlow.d.ts +0 -17
- package/dist/contexts/Flow/useFlow.d.ts.map +1 -1
- package/dist/contexts/Flow/useFlow.js.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +0 -17
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaContext.js.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +0 -17
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -1
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts +0 -17
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts.map +1 -1
- package/dist/contexts/FlowMeta/useFlowMeta.js.map +1 -1
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts +0 -17
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts.map +1 -1
- package/dist/contexts/I18n/ComponentPreferencesContext.js.map +1 -1
- package/dist/contexts/I18n/I18nContext.d.ts +0 -17
- package/dist/contexts/I18n/I18nContext.d.ts.map +1 -1
- package/dist/contexts/I18n/I18nContext.js.map +1 -1
- package/dist/contexts/I18n/I18nProvider.d.ts +0 -17
- package/dist/contexts/I18n/I18nProvider.d.ts.map +1 -1
- package/dist/contexts/I18n/I18nProvider.js.map +1 -1
- package/dist/contexts/I18n/useI18n.d.ts +0 -17
- package/dist/contexts/I18n/useI18n.d.ts.map +1 -1
- package/dist/contexts/I18n/useI18n.js.map +1 -1
- package/dist/contexts/Theme/ThemeContext.d.ts +0 -17
- package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -1
- package/dist/contexts/Theme/ThemeContext.js.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.d.ts +0 -17
- package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
- package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
- package/dist/contexts/Theme/types.d.ts +0 -17
- package/dist/contexts/Theme/types.d.ts.map +1 -1
- package/dist/contexts/Theme/useTheme.d.ts +0 -17
- package/dist/contexts/Theme/useTheme.d.ts.map +1 -1
- package/dist/contexts/Theme/useTheme.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +0 -17
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts +0 -17
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
- package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
- package/dist/contexts/ThunderID/useThunderID.d.ts +0 -17
- package/dist/contexts/ThunderID/useThunderID.d.ts.map +1 -1
- package/dist/contexts/ThunderID/useThunderID.js.map +1 -1
- package/dist/contexts/User/UserContext.d.ts +0 -17
- package/dist/contexts/User/UserContext.d.ts.map +1 -1
- package/dist/contexts/User/UserContext.js.map +1 -1
- package/dist/contexts/User/UserProvider.d.ts +0 -17
- package/dist/contexts/User/UserProvider.d.ts.map +1 -1
- package/dist/contexts/User/UserProvider.js.map +1 -1
- package/dist/contexts/User/useUser.d.ts +0 -17
- package/dist/contexts/User/useUser.d.ts.map +1 -1
- package/dist/contexts/User/useUser.js.map +1 -1
- package/dist/hooks/useBrowserUrl.d.ts +0 -17
- package/dist/hooks/useBrowserUrl.d.ts.map +1 -1
- package/dist/hooks/useBrowserUrl.js.map +1 -1
- package/dist/hooks/useForm.d.ts +0 -17
- package/dist/hooks/useForm.d.ts.map +1 -1
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/hooks/useOAuthCallback.d.ts +0 -17
- package/dist/hooks/useOAuthCallback.d.ts.map +1 -1
- package/dist/hooks/useOAuthCallback.js.map +1 -1
- package/dist/hooks/useTranslation.d.ts +0 -17
- package/dist/hooks/useTranslation.d.ts.map +1 -1
- package/dist/hooks/useTranslation.js.map +1 -1
- package/dist/index.d.ts +0 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/models/adapters.d.ts +0 -17
- package/dist/models/adapters.d.ts.map +1 -1
- package/dist/models/config.d.ts +0 -17
- package/dist/models/config.d.ts.map +1 -1
- package/dist/utils/applyThemeToDOM.d.ts +0 -17
- package/dist/utils/applyThemeToDOM.d.ts.map +1 -1
- package/dist/utils/applyThemeToDOM.js.map +1 -1
- package/dist/utils/buildThemeConfigFromFlowMeta.d.ts +0 -17
- package/dist/utils/buildThemeConfigFromFlowMeta.d.ts.map +1 -1
- package/dist/utils/buildThemeConfigFromFlowMeta.js.map +1 -1
- package/dist/utils/composeAffixedInputs.d.ts +0 -17
- package/dist/utils/composeAffixedInputs.d.ts.map +1 -1
- package/dist/utils/composeAffixedInputs.js.map +1 -1
- package/dist/utils/flowTransformer.d.ts +0 -17
- package/dist/utils/flowTransformer.d.ts.map +1 -1
- package/dist/utils/flowTransformer.js.map +1 -1
- package/dist/utils/getAuthComponentHeadings.d.ts +0 -17
- package/dist/utils/getAuthComponentHeadings.d.ts.map +1 -1
- package/dist/utils/getAuthComponentHeadings.js.map +1 -1
- package/dist/utils/getDisplayName.d.ts +0 -17
- package/dist/utils/getDisplayName.d.ts.map +1 -1
- package/dist/utils/getDisplayName.js.map +1 -1
- package/dist/utils/getMappedUserProfileValue.d.ts +0 -17
- package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -1
- package/dist/utils/getMappedUserProfileValue.js.map +1 -1
- package/dist/utils/normalizeThemeConfig.d.ts +0 -17
- package/dist/utils/normalizeThemeConfig.d.ts.map +1 -1
- package/dist/utils/normalizeThemeConfig.js.map +1 -1
- package/dist/utils/oauth.d.ts +0 -17
- package/dist/utils/oauth.d.ts.map +1 -1
- package/dist/utils/oauth.js.map +1 -1
- package/dist/utils/passkey.d.ts +0 -17
- package/dist/utils/passkey.d.ts.map +1 -1
- package/dist/utils/passkey.js.map +1 -1
- package/dist/utils/resolveTranslationsInArray.d.ts +0 -17
- package/dist/utils/resolveTranslationsInArray.d.ts.map +1 -1
- package/dist/utils/resolveTranslationsInArray.js.map +1 -1
- package/dist/utils/resolveTranslationsInObject.d.ts +0 -17
- package/dist/utils/resolveTranslationsInObject.d.ts.map +1 -1
- package/dist/utils/resolveTranslationsInObject.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRendererContext.js","names":["ComponentRendererContext: Context<ComponentRendererMap>"],"sources":["../../../src/contexts/ComponentRenderer/ComponentRendererContext.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"ComponentRendererContext.js","names":["ComponentRendererContext: Context<ComponentRendererMap>"],"sources":["../../../src/contexts/ComponentRenderer/ComponentRendererContext.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {EmbeddedFlowComponent, FlowMetadataResponse} from '@thunderid/browser';\nimport {Context, createContext, ReactElement} from 'react';\n\nexport interface ComponentRenderContext {\n additionalData?: Record<string, any>;\n authType: 'signin' | 'signup' | 'recovery';\n formErrors: Record<string, string>;\n formValues: Record<string, string>;\n isFormValid: boolean;\n isLoading: boolean;\n meta?: FlowMetadataResponse | null;\n resetForm?: () => void;\n onInputBlur?: (name: string) => void;\n onInputChange: (name: string, value: string) => void;\n onSubmit?: (component: EmbeddedFlowComponent, data?: Record<string, any>, skipValidation?: boolean) => void;\n touchedFields: Record<string, boolean>;\n}\n\nexport type ComponentRenderer = (\n component: EmbeddedFlowComponent,\n context: ComponentRenderContext,\n) => ReactElement | null;\n\nexport type ComponentRendererMap = Record<string, ComponentRenderer>;\n\nconst ComponentRendererContext: Context<ComponentRendererMap> = createContext<ComponentRendererMap>({});\n\nexport default ComponentRendererContext;\n"],"mappings":";;;AA4BA,MAAMA,2BAA0D,cAAoC,EAAE,CAAC;AAEvG,uCAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, 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
1
|
import { FC, PropsWithChildren } from 'react';
|
|
19
2
|
import { ComponentRendererMap } from './ComponentRendererContext';
|
|
20
3
|
interface ComponentRendererProviderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRendererProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/ComponentRenderer/ComponentRendererProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComponentRendererProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/ComponentRenderer/ComponentRendererProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAe,MAAM,OAAO,CAAC;AAC1D,OAAiC,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAE1F,UAAU,8BAA8B;IACtC,SAAS,EAAE,oBAAoB,CAAC;CACjC;AAED,QAAA,MAAM,yBAAyB,EAAE,EAAE,CAAC,iBAAiB,CAAC,8BAA8B,CAAC,CAKpF,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentRendererProvider.js","names":["ComponentRendererProvider: FC<PropsWithChildren<ComponentRendererProviderProps>>","ComponentRendererContext"],"sources":["../../../src/contexts/ComponentRenderer/ComponentRendererProvider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"ComponentRendererProvider.js","names":["ComponentRendererProvider: FC<PropsWithChildren<ComponentRendererProviderProps>>","ComponentRendererContext"],"sources":["../../../src/contexts/ComponentRenderer/ComponentRendererProvider.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FC, PropsWithChildren, ReactElement} from 'react';\nimport ComponentRendererContext, {ComponentRendererMap} from './ComponentRendererContext';\n\ninterface ComponentRendererProviderProps {\n renderers: ComponentRendererMap;\n}\n\nconst ComponentRendererProvider: FC<PropsWithChildren<ComponentRendererProviderProps>> = ({\n renderers,\n children,\n}: PropsWithChildren<ComponentRendererProviderProps>): ReactElement => (\n <ComponentRendererContext.Provider value={renderers}>{children}</ComponentRendererContext.Provider>\n);\n\nexport default ComponentRendererProvider;\n"],"mappings":";;;;AAUA,MAAMA,6BAAoF,EACxF,WACA,eAEA,oBAACC,iCAAyB;CAAS,OAAO;CAAY;EAA6C;AAGrG,wCAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
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
1
|
import { Context } from 'react';
|
|
19
2
|
/**
|
|
20
3
|
* Types of authentication flows/steps that can be displayed.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAA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ACzC,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAE7C,iBAAiB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAGlC,cAAc,EAAE,OAAO,CAAC;IAExB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAA0D,CAAC;AAIlH,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowContext.js","names":["FlowContext: Context<FlowContextValue | undefined>"],"sources":["../../../src/contexts/Flow/FlowContext.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"FlowContext.js","names":["FlowContext: Context<FlowContextValue | undefined>"],"sources":["../../../src/contexts/Flow/FlowContext.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Context, createContext} from 'react';\n\n/**\n * Types of authentication flows/steps that can be displayed.\n */\nexport type FlowStep = {\n canGoBack?: boolean;\n id: string;\n metadata?: Record<string, any>;\n subtitle?: string;\n title: string;\n type: 'signin' | 'signup' | 'organization-signin' | 'forgot-password' | 'reset-password' | 'verify-email' | 'mfa';\n} | null;\n\n/**\n * Message types for displaying in authentication flows.\n */\nexport interface FlowMessage {\n dismissible?: boolean;\n id?: string;\n message: string;\n type: 'success' | 'error' | 'warning' | 'info';\n}\n\n/**\n * Context value for managing authentication flow UI state.\n */\nexport interface FlowContextValue {\n addMessage: (message: FlowMessage) => void;\n clearMessages: () => void;\n\n // Current step/flow\n currentStep: FlowStep;\n // Error state\n error: string | null;\n // Loading state\n isLoading: boolean;\n // Messages\n messages: FlowMessage[];\n\n navigateToFlow: (\n flowType: NonNullable<FlowStep>['type'],\n options?: {\n metadata?: Record<string, any>;\n subtitle?: string;\n title?: string;\n },\n ) => void;\n onGoBack?: () => void;\n removeMessage: (messageId: string) => void;\n // Utilities\n reset: () => void;\n\n setCurrentStep: (step: FlowStep) => void;\n setError: (error: string | null) => void;\n\n setIsLoading: (loading: boolean) => void;\n setOnGoBack: (callback?: () => void) => void;\n\n setShowBackButton: (show: boolean) => void;\n setSubtitle: (subtitle?: string) => void;\n setTitle: (title: string) => void;\n\n // Navigation\n showBackButton: boolean;\n\n subtitle?: string;\n\n // Title and subtitle\n title: string;\n}\n\n/**\n * Context for managing authentication flow UI state.\n * This context handles titles, messages, navigation, and loading states\n * for authentication flows like SignIn, SignUp, organization signin, etc.\n */\nconst FlowContext: Context<FlowContextValue | undefined> = createContext<FlowContextValue | undefined>(undefined);\n\nFlowContext.displayName = 'FlowContext';\n\nexport default FlowContext;\n"],"mappings":";;;;;;;;AAgFA,MAAMA,cAAqD,cAA4C,OAAU;AAEjH,YAAY,cAAc;AAE1B,0BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
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
1
|
import { FC, PropsWithChildren } from 'react';
|
|
19
2
|
import { FlowStep } from './FlowContext';
|
|
20
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAC1F,OAAoB,EAAgC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;CACzC;AAED;;;GAGG;AACH,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAkJ1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowProvider.js","names":["FlowProvider: FC<PropsWithChildren<FlowProviderProps>>","setCurrentStep: (step: FlowStep) => void","addMessage: (message: FlowMessage) => void","messageWithId: FlowMessage","removeMessage: (messageId: string) => void","clearMessages: () => void","reset: () => void","navigateToFlow: (\n flowType: NonNullable<FlowStep>['type'],\n options?: {metadata?: Record<string, any>; subtitle?: string; title?: string},\n ) => void","contextValue: FlowContextValue","FlowContext"],"sources":["../../../src/contexts/Flow/FlowProvider.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"FlowProvider.js","names":["FlowProvider: FC<PropsWithChildren<FlowProviderProps>>","setCurrentStep: (step: FlowStep) => void","addMessage: (message: FlowMessage) => void","messageWithId: FlowMessage","removeMessage: (messageId: string) => void","clearMessages: () => void","reset: () => void","navigateToFlow: (\n flowType: NonNullable<FlowStep>['type'],\n options?: {metadata?: Record<string, any>; subtitle?: string; title?: string},\n ) => void","contextValue: FlowContextValue","FlowContext"],"sources":["../../../src/contexts/Flow/FlowProvider.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FC, PropsWithChildren, ReactElement, useCallback, useMemo, useState} from 'react';\nimport FlowContext, {FlowContextValue, FlowMessage, FlowStep} from './FlowContext';\n\n/**\n * Props for the FlowProvider component.\n */\nexport interface FlowProviderProps {\n /**\n * Initial step to start with.\n */\n initialStep?: FlowStep;\n\n /**\n * Initial subtitle.\n */\n initialSubtitle?: string;\n\n /**\n * Initial title.\n */\n initialTitle?: string;\n\n /**\n * Callback when flow type changes.\n */\n onFlowChange?: (step: FlowStep) => void;\n}\n\n/**\n * Provider component for flow context.\n * Manages shared UI state for authentication flows including titles, messages, and navigation.\n */\nconst FlowProvider: FC<PropsWithChildren<FlowProviderProps>> = ({\n children,\n initialStep = null,\n initialTitle = '',\n initialSubtitle,\n onFlowChange,\n}: PropsWithChildren<FlowProviderProps>): ReactElement => {\n const [currentStep, setCurrentStepState] = useState<FlowStep>(initialStep);\n const [title, setTitle] = useState<string>(initialTitle);\n const [subtitle, setSubtitle] = useState<string | undefined>(initialSubtitle);\n const [messages, setMessages] = useState<FlowMessage[]>([]);\n const [error, setError] = useState<string | null>(null);\n const [isLoading, setIsLoading] = useState<boolean>(false);\n const [showBackButton, setShowBackButton] = useState<boolean>(false);\n const [onGoBack, setOnGoBack] = useState<(() => void) | undefined>(undefined);\n\n /**\n * Set the current flow step and notify listeners.\n */\n const setCurrentStep: (step: FlowStep) => void = useCallback(\n (step: FlowStep) => {\n setCurrentStepState(step);\n if (step) {\n setTitle(step.title);\n setSubtitle(step.subtitle);\n setShowBackButton(step.canGoBack ?? false);\n }\n onFlowChange?.(step);\n },\n [onFlowChange],\n );\n\n /**\n * Add a message to the message list.\n */\n const addMessage: (message: FlowMessage) => void = useCallback((message: FlowMessage) => {\n const messageWithId: FlowMessage = {\n ...message,\n id: message.id ?? `msg-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,\n };\n\n setMessages((prev: FlowMessage[]) => [...prev, messageWithId]);\n }, []);\n\n /**\n * Remove a specific message by ID.\n */\n const removeMessage: (messageId: string) => void = useCallback((messageId: string) => {\n setMessages((prev: FlowMessage[]) => prev.filter((msg: FlowMessage) => msg.id !== messageId));\n }, []);\n\n /**\n * Clear all messages.\n */\n const clearMessages: () => void = useCallback(() => {\n setMessages([]);\n }, []);\n\n /**\n * Reset the flow context to initial state.\n */\n const reset: () => void = useCallback(() => {\n setCurrentStepState(initialStep);\n setTitle(initialTitle);\n setSubtitle(initialSubtitle);\n setMessages([]);\n setError(null);\n setIsLoading(false);\n setShowBackButton(false);\n setOnGoBack(undefined);\n }, [initialStep, initialTitle, initialSubtitle]);\n\n /**\n * Navigate to a different authentication flow.\n */\n const navigateToFlow: (\n flowType: NonNullable<FlowStep>['type'],\n options?: {metadata?: Record<string, any>; subtitle?: string; title?: string},\n ) => void = useCallback(\n (\n flowType: NonNullable<FlowStep>['type'],\n options?: {\n metadata?: Record<string, any>;\n subtitle?: string;\n title?: string;\n },\n ) => {\n const stepId = `${flowType}-${Date.now()}`;\n const step: NonNullable<FlowStep> = {\n canGoBack: flowType !== 'signin', // Usually allow going back except for main signin\n id: stepId,\n metadata: options?.metadata,\n subtitle: options?.subtitle,\n title: options?.title ?? '',\n type: flowType,\n };\n\n setCurrentStep(step);\n clearMessages();\n setError(null);\n },\n [setCurrentStep, clearMessages],\n );\n\n const contextValue: FlowContextValue = useMemo(\n () => ({\n addMessage,\n clearMessages,\n currentStep,\n error,\n isLoading,\n messages,\n navigateToFlow,\n onGoBack,\n removeMessage,\n reset,\n setCurrentStep,\n setError,\n setIsLoading,\n setOnGoBack,\n setShowBackButton,\n setSubtitle,\n setTitle,\n showBackButton,\n subtitle,\n title,\n }),\n [\n currentStep,\n setCurrentStep,\n title,\n subtitle,\n messages,\n addMessage,\n removeMessage,\n clearMessages,\n error,\n isLoading,\n showBackButton,\n onGoBack,\n reset,\n navigateToFlow,\n ],\n );\n\n return <FlowContext.Provider value={contextValue}>{children}</FlowContext.Provider>;\n};\n\nexport default FlowProvider;\n"],"mappings":";;;;;;;;;AAmCA,MAAMA,gBAA0D,EAC9D,UACA,cAAc,MACd,eAAe,IACf,iBACA,mBACwD;CACxD,MAAM,CAAC,aAAa,uBAAuB,SAAmB,YAAY;CAC1E,MAAM,CAAC,OAAO,YAAY,SAAiB,aAAa;CACxD,MAAM,CAAC,UAAU,eAAe,SAA6B,gBAAgB;CAC7E,MAAM,CAAC,UAAU,eAAe,SAAwB,EAAE,CAAC;CAC3D,MAAM,CAAC,OAAO,YAAY,SAAwB,KAAK;CACvD,MAAM,CAAC,WAAW,gBAAgB,SAAkB,MAAM;CAC1D,MAAM,CAAC,gBAAgB,qBAAqB,SAAkB,MAAM;CACpE,MAAM,CAAC,UAAU,eAAe,SAAmC,OAAU;;;;CAK7E,MAAMC,iBAA2C,aAC9C,SAAmB;AAClB,sBAAoB,KAAK;AACzB,MAAI,MAAM;AACR,YAAS,KAAK,MAAM;AACpB,eAAY,KAAK,SAAS;AAC1B,qBAAkB,KAAK,aAAa,MAAM;;AAE5C,iBAAe,KAAK;IAEtB,CAAC,aAAa,CACf;;;;CAKD,MAAMC,aAA6C,aAAa,YAAyB;EACvF,MAAMC,gBAA6B;GACjC,GAAG;GACH,IAAI,QAAQ,MAAM,OAAO,KAAK,KAAK,CAAC,GAAG,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,OAAO,GAAG,EAAE;GAC/E;AAED,eAAa,SAAwB,CAAC,GAAG,MAAM,cAAc,CAAC;IAC7D,EAAE,CAAC;;;;CAKN,MAAMC,gBAA6C,aAAa,cAAsB;AACpF,eAAa,SAAwB,KAAK,QAAQ,QAAqB,IAAI,OAAO,UAAU,CAAC;IAC5F,EAAE,CAAC;;;;CAKN,MAAMC,gBAA4B,kBAAkB;AAClD,cAAY,EAAE,CAAC;IACd,EAAE,CAAC;;;;CAKN,MAAMC,QAAoB,kBAAkB;AAC1C,sBAAoB,YAAY;AAChC,WAAS,aAAa;AACtB,cAAY,gBAAgB;AAC5B,cAAY,EAAE,CAAC;AACf,WAAS,KAAK;AACd,eAAa,MAAM;AACnB,oBAAkB,MAAM;AACxB,cAAY,OAAU;IACrB;EAAC;EAAa;EAAc;EAAgB,CAAC;;;;CAKhD,MAAMC,iBAGM,aAER,UACA,YAKG;EACH,MAAM,SAAS,GAAG,SAAS,GAAG,KAAK,KAAK;AAUxC,iBAToC;GAClC,WAAW,aAAa;GACxB,IAAI;GACJ,UAAU,SAAS;GACnB,UAAU,SAAS;GACnB,OAAO,SAAS,SAAS;GACzB,MAAM;GACP,CAEmB;AACpB,iBAAe;AACf,WAAS,KAAK;IAEhB,CAAC,gBAAgB,cAAc,CAChC;CAED,MAAMC,eAAiC,eAC9B;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,GACD;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;AAED,QAAO,oBAACC,oBAAY;EAAS,OAAO;EAAe;GAAgC;;AAGrF,2BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
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
1
|
import { FlowContextValue } from './FlowContext';
|
|
19
2
|
/**
|
|
20
3
|
* Hook to access the flow context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlow.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/useFlow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFlow.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/useFlow.ts"],"names":[],"mappings":"AAIA,OAAoB,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,OAAO,QAAO,gBAQnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlow.js","names":["context: FlowContextValue | undefined","FlowContext"],"sources":["../../../src/contexts/Flow/useFlow.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useFlow.js","names":["context: FlowContextValue | undefined","FlowContext"],"sources":["../../../src/contexts/Flow/useFlow.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {useContext} from 'react';\nimport FlowContext, {FlowContextValue} from './FlowContext';\n\n/**\n * Hook to access the flow context.\n * Must be used within a FlowProvider.\n *\n * @example\n * ```tsx\n * const MyAuthComponent = () => {\n * const { title, setTitle, addMessage, isLoading } = useFlow();\n *\n * const handleSuccess = () => {\n * addMessage({\n * type: 'success',\n * message: 'Authentication successful!'\n * });\n * };\n *\n * return (\n * <div>\n * <h1>{title}</h1>\n * {isLoading && <p>Loading...</p>}\n * </div>\n * );\n * };\n * ```\n *\n * @returns The flow context value\n * @throws Error if used outside of FlowProvider\n */\nconst useFlow = (): FlowContextValue => {\n const context: FlowContextValue | undefined = useContext(FlowContext);\n\n if (!context) {\n throw new Error('useFlow must be used within a FlowProvider');\n }\n\n return context;\n};\n\nexport default useFlow;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAM,gBAAkC;CACtC,MAAMA,UAAwC,WAAWC,oBAAY;AAErE,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,6CAA6C;AAG/D,QAAO;;AAGT,sBAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, 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
1
|
import { FlowMetadataResponse } from '@thunderid/browser';
|
|
19
2
|
import { Context } from 'react';
|
|
20
3
|
export interface FlowMetaContextValue {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowMetaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowMetaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACrD;AAED,QAAA,MAAM,eAAe,EAAE,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAoD,CAAC;AAI/G,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowMetaContext.js","names":["FlowMetaContext: Context<FlowMetaContextValue | null>"],"sources":["../../../src/contexts/FlowMeta/FlowMetaContext.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"FlowMetaContext.js","names":["FlowMetaContext: Context<FlowMetaContextValue | null>"],"sources":["../../../src/contexts/FlowMeta/FlowMetaContext.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse} from '@thunderid/browser';\nimport {Context, createContext} from 'react';\n\nexport interface FlowMetaContextValue {\n /**\n * Error from the flow meta fetch, if any\n */\n error: Error | null;\n /**\n * Manually re-fetch flow metadata\n */\n fetchFlowMeta: () => Promise<void>;\n /**\n * Whether flow metadata is currently being fetched\n */\n isLoading: boolean;\n /**\n * The fetched flow metadata response, or null while loading / on error\n */\n meta: FlowMetadataResponse | null;\n /**\n * Fetches flow metadata for the given language and activates it in the i18n system.\n * Use this to switch the UI language at runtime.\n */\n switchLanguage: (language: string) => Promise<void>;\n}\n\nconst FlowMetaContext: Context<FlowMetaContextValue | null> = createContext<FlowMetaContextValue | null>(null);\n\nFlowMetaContext.displayName = 'FlowMetaContext';\n\nexport default FlowMetaContext;\n"],"mappings":";;;AA8BA,MAAMA,kBAAwD,cAA2C,KAAK;AAE9G,gBAAgB,cAAc;AAE9B,8BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, 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
1
|
import { FlowMetadataResponse } from '@thunderid/browser';
|
|
19
2
|
import { FC, PropsWithChildren } from 'react';
|
|
20
3
|
export interface FlowMetaProviderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowMetaProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FlowMetaProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EAMrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAoE,MAAM,OAAO,CAAC;AAM/G,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CAyKlE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowMetaProvider.js","names":["FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>>","useThunderID","i18nContext: I18nContextValue","useI18n","lastFetchedRef: RefObject<(() => Promise<void>) | null>","initialMetaConsumedRef: RefObject<boolean>","fetchFlowMeta: () => Promise<void>","err: unknown","switchLanguage: (language: string) => Promise<void>","result: FlowMetadataResponse","flatTranslations: Record<string, string>","value","bundle: I18nBundle","metaLanguage: string","bundlesToInject: Record<string, I18nBundle>","value: any","FlowMetaContext"],"sources":["../../../src/contexts/FlowMeta/FlowMetaProvider.tsx"],"sourcesContent":["/**\n * Copyright (c) 2026, 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 FlowMetadataResponse,\n FlowMetaType,\n getFlowMeta,\n I18nBundle,\n resolveResourceEndpoint,\n TranslationBundleConstants,\n} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, RefObject, useCallback, useEffect, useRef, useState} from 'react';\nimport FlowMetaContext from './FlowMetaContext';\nimport {I18nContextValue} from '../I18n/I18nContext';\nimport useI18n from '../I18n/useI18n';\nimport useThunderID from '../ThunderID/useThunderID';\n\nexport interface FlowMetaProviderProps {\n /**\n * When false the provider skips fetching and provides null meta.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * Flow metadata resolved ahead of time (e.g. fetched server-side during SSR) and used to seed\n * the provider's state. When present, the provider skips its own initial client-side fetch —\n * avoiding a redundant request and the flash of untranslated i18n keys while that fetch is in\n * flight — but still fetches normally on subsequent changes (e.g. an explicit language switch).\n */\n initialMeta?: FlowMetadataResponse | null;\n}\n\n/**\n * FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint\n * (v2 API) and makes it available to child components through `FlowMetaContext`.\n *\n * It is designed to be used in v2 embedded-flow scenarios and integrates with\n * `ThemeProvider` so that theme settings (colors, direction, typography, …)\n * from the server-side design configuration are applied automatically.\n *\n * @example\n * ```tsx\n * <FlowMetaProvider\n * config={{\n * baseUrl: 'https://localhost:8090',\n * type: FlowMetaType.App,\n * id: 'your-app-id',\n * }}\n * >\n * <ThemeProvider>\n * <App />\n * </ThemeProvider>\n * </FlowMetaProvider>\n * ```\n */\nconst FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>> = ({\n children,\n enabled = true,\n initialMeta = null,\n}: PropsWithChildren<FlowMetaProviderProps>): ReactElement => {\n const {baseUrl, endpoints, applicationId, isInitialized} = useThunderID();\n const i18nContext: I18nContextValue = useI18n();\n\n const [meta, setMeta] = useState<FlowMetadataResponse | null>(initialMeta);\n const [isLoading, setIsLoading] = useState<boolean>(!initialMeta);\n const [error, setError] = useState<Error | null>(null);\n const [pendingLanguage, setPendingLanguage] = useState<string | null>(null);\n\n // Track the last fetchFlowMeta reference that was actually dispatched.\n // This prevents two classes of double-fetch:\n // 1. React StrictMode simulates unmount+remount — the re-mount fires the\n // effect again with the same fetchFlowMeta reference; without this guard\n // the else-branch would issue a redundant second network request.\n // 2. Rapid dependency changes (e.g. baseUrl stabilising) that produce two\n // effect firings before the first fetch completes.\n const lastFetchedRef: RefObject<(() => Promise<void>) | null> = useRef<(() => Promise<void>) | null>(null);\n const initialMetaConsumedRef: RefObject<boolean> = useRef(false);\n const fetchFlowMeta: () => Promise<void> = useCallback(async (): Promise<void> => {\n if (!enabled) {\n setMeta(null);\n setIsLoading(false);\n return;\n }\n\n // Defer until ThunderID finishes initializing (e.g. loading applicationId\n // from storage on refresh). Once initialized, proceed even if applicationId\n // is absent — some flows (e.g. AcceptInvite) have no applicationId by design.\n if (!isInitialized && !applicationId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n const result: FlowMetadataResponse = await getFlowMeta({\n baseUrl,\n url: resolveResourceEndpoint('flowMeta', {endpoints}),\n ...(applicationId ? {id: applicationId, type: FlowMetaType.App} : {}),\n language: i18nContext?.currentLanguage,\n });\n setMeta(result);\n } catch (err: unknown) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsLoading(false);\n }\n }, [enabled, baseUrl, endpoints, applicationId, isInitialized, i18nContext?.currentLanguage]);\n\n const switchLanguage: (language: string) => Promise<void> = useCallback(\n async (language: string): Promise<void> => {\n if (!enabled) return;\n\n setIsLoading(true);\n setError(null);\n\n try {\n const result: FlowMetadataResponse = await getFlowMeta({\n baseUrl,\n url: resolveResourceEndpoint('flowMeta', {endpoints}),\n ...(applicationId ? {id: applicationId, type: FlowMetaType.App} : {}),\n language,\n });\n\n // Inject translations for the new language before switching\n if (result.i18n?.translations && i18nContext?.injectBundles) {\n const flatTranslations: Record<string, string> = {};\n Object.entries(result.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n i18nContext.injectBundles({[language]: bundle});\n }\n\n // Defer setLanguage to the next effect cycle so injectBundles state\n // is committed before I18nProvider's setLanguage checks mergedBundles.\n setPendingLanguage(language);\n setMeta(result);\n } catch (err: unknown) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsLoading(false);\n }\n },\n [enabled, baseUrl, endpoints, applicationId, i18nContext],\n );\n\n // After injectBundles + setPendingLanguage are batched and committed, this\n // effect fires with the updated i18nContext (mergedBundles now includes the\n // new language), so setLanguage succeeds on the first switch.\n useEffect(() => {\n if (pendingLanguage && i18nContext?.setLanguage) {\n i18nContext.setLanguage(pendingLanguage);\n setPendingLanguage(null);\n }\n }, [pendingLanguage, i18nContext?.setLanguage]);\n\n useEffect(() => {\n if (!initialMetaConsumedRef.current) {\n initialMetaConsumedRef.current = true;\n\n if (initialMeta) {\n // Seeded from SSR (or another caller) — skip the redundant first client-side fetch.\n // Later dependency changes (e.g. an explicit language switch) still fetch normally.\n lastFetchedRef.current = fetchFlowMeta;\n return;\n }\n }\n\n if (lastFetchedRef.current === fetchFlowMeta) {\n // Same reference as the last dispatch — this is a StrictMode re-mount\n // or an effect re-fire with unchanged deps. Skip to avoid a duplicate fetch.\n return;\n }\n\n lastFetchedRef.current = fetchFlowMeta;\n fetchFlowMeta();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fetchFlowMeta]);\n\n // When meta loads with i18n translations, inject them into the i18n system.\n // Meta translations act as the base layer — prop-provided bundles still take precedence.\n useEffect(() => {\n if (!meta?.i18n?.translations || !i18nContext?.injectBundles) {\n return;\n }\n\n const metaLanguage: string = meta.i18n.language || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Flatten namespace-keyed translations to dot-path keys:\n // { \"signin\": { \"heading\": \"Sign In\" } } → { \"signin.heading\": \"Sign In\" }\n const flatTranslations: Record<string, string> = {};\n Object.entries(meta.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n\n // Inject under the meta language code and the i18n current language so\n // lookups succeed regardless of whether the system uses \"en\" or \"en-US\".\n const bundlesToInject: Record<string, I18nBundle> = {[metaLanguage]: bundle};\n if (i18nContext.currentLanguage && i18nContext.currentLanguage !== metaLanguage) {\n bundlesToInject[i18nContext.currentLanguage] = bundle;\n }\n if (i18nContext.fallbackLanguage && i18nContext.fallbackLanguage !== metaLanguage) {\n bundlesToInject[i18nContext.fallbackLanguage] = bundle;\n }\n\n i18nContext.injectBundles(bundlesToInject);\n }, [meta?.i18n?.translations, i18nContext?.injectBundles]);\n\n const value: any = {\n error,\n fetchFlowMeta,\n isLoading,\n meta,\n switchLanguage,\n };\n\n return <FlowMetaContext.Provider value={value}>{children}</FlowMetaContext.Provider>;\n};\n\nexport default FlowMetaProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,oBAAkE,EACtE,UACA,UAAU,MACV,cAAc,WAC8C;CAC5D,MAAM,EAAC,SAAS,WAAW,eAAe,kBAAiBC,sBAAc;CACzE,MAAMC,cAAgCC,iBAAS;CAE/C,MAAM,CAAC,MAAM,WAAW,SAAsC,YAAY;CAC1E,MAAM,CAAC,WAAW,gBAAgB,SAAkB,CAAC,YAAY;CACjE,MAAM,CAAC,OAAO,YAAY,SAAuB,KAAK;CACtD,MAAM,CAAC,iBAAiB,sBAAsB,SAAwB,KAAK;CAS3E,MAAMC,iBAA0D,OAAqC,KAAK;CAC1G,MAAMC,yBAA6C,OAAO,MAAM;CAChE,MAAMC,gBAAqC,YAAY,YAA2B;AAChF,MAAI,CAAC,SAAS;AACZ,WAAQ,KAAK;AACb,gBAAa,MAAM;AACnB;;AAMF,MAAI,CAAC,iBAAiB,CAAC,cACrB;AAGF,eAAa,KAAK;AAClB,WAAS,KAAK;AAEd,MAAI;AAOF,WANqC,MAAM,YAAY;IACrD;IACA,KAAK,wBAAwB,YAAY,EAAC,WAAU,CA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iBAAgB;AACd,MAAI,CAAC,uBAAuB,SAAS;AACnC,0BAAuB,UAAU;AAEjC,OAAI,aAAa;AAGf,mBAAe,UAAU;AACzB;;;AAIJ,MAAI,eAAe,YAAY,cAG7B;AAGF,iBAAe,UAAU;AACzB,iBAAe;IAEd,CAAC,cAAc,CAAC;AAInB,iBAAgB;AACd,MAAI,CAAC,MAAM,MAAM,gBAAgB,CAAC,aAAa,cAC7C;EAGF,MAAMM,eAAuB,KAAK,KAAK,YAAY,2BAA2B;EAI9E,MAAMH,mBAA2C,EAAE;AACnD,SAAO,QAAQ,KAAK,KAAK,aAAa,CAAC,SAAS,CAAC,WAAW,UAA4C;AACtG,UAAO,QAAQ,KAAK,CAAC,SAAS,CAAC,KAAKC,aAA6B;AAC/D,qBAAiB,GAAG,UAAU,GAAG,SAASA;KAC1C;IACF;EAEF,MAAMC,SAAqB,EAAC,cAAc,kBAAiB;EAI3D,MAAME,kBAA8C,GAAE,eAAe,QAAO;AAC5E,MAAI,YAAY,mBAAmB,YAAY,oBAAoB,aACjE,iBAAgB,YAAY,mBAAmB;AAEjD,MAAI,YAAY,oBAAoB,YAAY,qBAAqB,aACnE,iBAAgB,YAAY,oBAAoB;AAGlD,cAAY,cAAc,gBAAgB;IACzC,CAAC,MAAM,MAAM,cAAc,aAAa,cAAc,CAAC;CAE1D,MAAMC,QAAa;EACjB;EACA;EACA;EACA;EACA;EACD;AAED,QAAO,oBAACC,wBAAgB;EAAgB;EAAQ;GAAoC;;AAGtF,+BAAe"}
|
|
1
|
+
{"version":3,"file":"FlowMetaProvider.js","names":["FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>>","useThunderID","i18nContext: I18nContextValue","useI18n","lastFetchedRef: RefObject<(() => Promise<void>) | null>","initialMetaConsumedRef: RefObject<boolean>","fetchFlowMeta: () => Promise<void>","err: unknown","switchLanguage: (language: string) => Promise<void>","result: FlowMetadataResponse","flatTranslations: Record<string, string>","value","bundle: I18nBundle","metaLanguage: string","bundlesToInject: Record<string, I18nBundle>","value: any","FlowMetaContext"],"sources":["../../../src/contexts/FlowMeta/FlowMetaProvider.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n FlowMetadataResponse,\n FlowMetaType,\n getFlowMeta,\n I18nBundle,\n resolveResourceEndpoint,\n TranslationBundleConstants,\n} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, RefObject, useCallback, useEffect, useRef, useState} from 'react';\nimport FlowMetaContext from './FlowMetaContext';\nimport {I18nContextValue} from '../I18n/I18nContext';\nimport useI18n from '../I18n/useI18n';\nimport useThunderID from '../ThunderID/useThunderID';\n\nexport interface FlowMetaProviderProps {\n /**\n * When false the provider skips fetching and provides null meta.\n * @default true\n */\n enabled?: boolean;\n\n /**\n * Flow metadata resolved ahead of time (e.g. fetched server-side during SSR) and used to seed\n * the provider's state. When present, the provider skips its own initial client-side fetch —\n * avoiding a redundant request and the flash of untranslated i18n keys while that fetch is in\n * flight — but still fetches normally on subsequent changes (e.g. an explicit language switch).\n */\n initialMeta?: FlowMetadataResponse | null;\n}\n\n/**\n * FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint\n * (v2 API) and makes it available to child components through `FlowMetaContext`.\n *\n * It is designed to be used in v2 embedded-flow scenarios and integrates with\n * `ThemeProvider` so that theme settings (colors, direction, typography, …)\n * from the server-side design configuration are applied automatically.\n *\n * @example\n * ```tsx\n * <FlowMetaProvider\n * config={{\n * baseUrl: 'https://localhost:8090',\n * type: FlowMetaType.App,\n * id: 'your-app-id',\n * }}\n * >\n * <ThemeProvider>\n * <App />\n * </ThemeProvider>\n * </FlowMetaProvider>\n * ```\n */\nconst FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>> = ({\n children,\n enabled = true,\n initialMeta = null,\n}: PropsWithChildren<FlowMetaProviderProps>): ReactElement => {\n const {baseUrl, endpoints, applicationId, isInitialized} = useThunderID();\n const i18nContext: I18nContextValue = useI18n();\n\n const [meta, setMeta] = useState<FlowMetadataResponse | null>(initialMeta);\n const [isLoading, setIsLoading] = useState<boolean>(!initialMeta);\n const [error, setError] = useState<Error | null>(null);\n const [pendingLanguage, setPendingLanguage] = useState<string | null>(null);\n\n // Track the last fetchFlowMeta reference that was actually dispatched.\n // This prevents two classes of double-fetch:\n // 1. React StrictMode simulates unmount+remount — the re-mount fires the\n // effect again with the same fetchFlowMeta reference; without this guard\n // the else-branch would issue a redundant second network request.\n // 2. Rapid dependency changes (e.g. baseUrl stabilising) that produce two\n // effect firings before the first fetch completes.\n const lastFetchedRef: RefObject<(() => Promise<void>) | null> = useRef<(() => Promise<void>) | null>(null);\n const initialMetaConsumedRef: RefObject<boolean> = useRef(false);\n const fetchFlowMeta: () => Promise<void> = useCallback(async (): Promise<void> => {\n if (!enabled) {\n setMeta(null);\n setIsLoading(false);\n return;\n }\n\n // Defer until ThunderID finishes initializing (e.g. loading applicationId\n // from storage on refresh). Once initialized, proceed even if applicationId\n // is absent — some flows (e.g. AcceptInvite) have no applicationId by design.\n if (!isInitialized && !applicationId) {\n return;\n }\n\n setIsLoading(true);\n setError(null);\n\n try {\n const result: FlowMetadataResponse = await getFlowMeta({\n baseUrl,\n url: resolveResourceEndpoint('flowMeta', {endpoints}),\n ...(applicationId ? {id: applicationId, type: FlowMetaType.App} : {}),\n language: i18nContext?.currentLanguage,\n });\n setMeta(result);\n } catch (err: unknown) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsLoading(false);\n }\n }, [enabled, baseUrl, endpoints, applicationId, isInitialized, i18nContext?.currentLanguage]);\n\n const switchLanguage: (language: string) => Promise<void> = useCallback(\n async (language: string): Promise<void> => {\n if (!enabled) return;\n\n setIsLoading(true);\n setError(null);\n\n try {\n const result: FlowMetadataResponse = await getFlowMeta({\n baseUrl,\n url: resolveResourceEndpoint('flowMeta', {endpoints}),\n ...(applicationId ? {id: applicationId, type: FlowMetaType.App} : {}),\n language,\n });\n\n // Inject translations for the new language before switching\n if (result.i18n?.translations && i18nContext?.injectBundles) {\n const flatTranslations: Record<string, string> = {};\n Object.entries(result.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n i18nContext.injectBundles({[language]: bundle});\n }\n\n // Defer setLanguage to the next effect cycle so injectBundles state\n // is committed before I18nProvider's setLanguage checks mergedBundles.\n setPendingLanguage(language);\n setMeta(result);\n } catch (err: unknown) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsLoading(false);\n }\n },\n [enabled, baseUrl, endpoints, applicationId, i18nContext],\n );\n\n // After injectBundles + setPendingLanguage are batched and committed, this\n // effect fires with the updated i18nContext (mergedBundles now includes the\n // new language), so setLanguage succeeds on the first switch.\n useEffect(() => {\n if (pendingLanguage && i18nContext?.setLanguage) {\n i18nContext.setLanguage(pendingLanguage);\n setPendingLanguage(null);\n }\n }, [pendingLanguage, i18nContext?.setLanguage]);\n\n useEffect(() => {\n if (!initialMetaConsumedRef.current) {\n initialMetaConsumedRef.current = true;\n\n if (initialMeta) {\n // Seeded from SSR (or another caller) — skip the redundant first client-side fetch.\n // Later dependency changes (e.g. an explicit language switch) still fetch normally.\n lastFetchedRef.current = fetchFlowMeta;\n return;\n }\n }\n\n if (lastFetchedRef.current === fetchFlowMeta) {\n // Same reference as the last dispatch — this is a StrictMode re-mount\n // or an effect re-fire with unchanged deps. Skip to avoid a duplicate fetch.\n return;\n }\n\n lastFetchedRef.current = fetchFlowMeta;\n fetchFlowMeta();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [fetchFlowMeta]);\n\n // When meta loads with i18n translations, inject them into the i18n system.\n // Meta translations act as the base layer — prop-provided bundles still take precedence.\n useEffect(() => {\n if (!meta?.i18n?.translations || !i18nContext?.injectBundles) {\n return;\n }\n\n const metaLanguage: string = meta.i18n.language || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Flatten namespace-keyed translations to dot-path keys:\n // { \"signin\": { \"heading\": \"Sign In\" } } → { \"signin.heading\": \"Sign In\" }\n const flatTranslations: Record<string, string> = {};\n Object.entries(meta.i18n.translations).forEach(([namespace, keys]: [string, Record<string, string>]) => {\n Object.entries(keys).forEach(([key, value]: [string, string]) => {\n flatTranslations[`${namespace}.${key}`] = value;\n });\n });\n\n const bundle: I18nBundle = {translations: flatTranslations} as unknown as I18nBundle;\n\n // Inject under the meta language code and the i18n current language so\n // lookups succeed regardless of whether the system uses \"en\" or \"en-US\".\n const bundlesToInject: Record<string, I18nBundle> = {[metaLanguage]: bundle};\n if (i18nContext.currentLanguage && i18nContext.currentLanguage !== metaLanguage) {\n bundlesToInject[i18nContext.currentLanguage] = bundle;\n }\n if (i18nContext.fallbackLanguage && i18nContext.fallbackLanguage !== metaLanguage) {\n bundlesToInject[i18nContext.fallbackLanguage] = bundle;\n }\n\n i18nContext.injectBundles(bundlesToInject);\n }, [meta?.i18n?.translations, i18nContext?.injectBundles]);\n\n const value: any = {\n error,\n fetchFlowMeta,\n isLoading,\n meta,\n switchLanguage,\n };\n\n return <FlowMetaContext.Provider value={value}>{children}</FlowMetaContext.Provider>;\n};\n\nexport default FlowMetaProvider;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAMA,oBAAkE,EACtE,UACA,UAAU,MACV,cAAc,WAC8C;CAC5D,MAAM,EAAC,SAAS,WAAW,eAAe,kBAAiBC,sBAAc;CACzE,MAAMC,cAAgCC,iBAAS;CAE/C,MAAM,CAAC,MAAM,WAAW,SAAsC,YAAY;CAC1E,MAAM,CAAC,WAAW,gBAAgB,SAAkB,CAAC,YAAY;CACjE,MAAM,CAAC,OAAO,YAAY,SAAuB,KAAK;CACtD,MAAM,CAAC,iBAAiB,sBAAsB,SAAwB,KAAK;CAS3E,MAAMC,iBAA0D,OAAqC,KAAK;CAC1G,MAAMC,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1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, 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
1
|
import { FlowMetaContextValue } from './FlowMetaContext';
|
|
19
2
|
declare const useFlowMeta: () => FlowMetaContextValue;
|
|
20
3
|
export default useFlowMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlowMeta.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/useFlowMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFlowMeta.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/useFlowMeta.ts"],"names":[],"mappings":"AAIA,OAAwB,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAExE,QAAA,MAAM,WAAW,QAAO,oBAMvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFlowMeta.js","names":["context: FlowMetaContextValue | null","FlowMetaContext"],"sources":["../../../src/contexts/FlowMeta/useFlowMeta.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"useFlowMeta.js","names":["context: FlowMetaContextValue | null","FlowMetaContext"],"sources":["../../../src/contexts/FlowMeta/useFlowMeta.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {useContext} from 'react';\nimport FlowMetaContext, {FlowMetaContextValue} from './FlowMetaContext';\n\nconst useFlowMeta = (): FlowMetaContextValue => {\n const context: FlowMetaContextValue | null = useContext(FlowMetaContext);\n if (!context) {\n throw new Error('useFlowMeta must be used within a FlowMetaProvider');\n }\n return context;\n};\n\nexport default useFlowMeta;\n"],"mappings":";;;;AAMA,MAAM,oBAA0C;CAC9C,MAAMA,UAAuC,WAAWC,wBAAgB;AACxE,KAAI,CAAC,QACH,OAAM,IAAI,MAAM,qDAAqD;AAEvE,QAAO;;AAGT,0BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026, 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
1
|
import { Preferences } from '@thunderid/browser';
|
|
19
2
|
import { Context } from 'react';
|
|
20
3
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentPreferencesContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/ComponentPreferencesContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ComponentPreferencesContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/ComponentPreferencesContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C;;;;GAIG;AACH,QAAA,MAAM,2BAA2B,EAAE,OAAO,CAAC,WAAW,GAAG,SAAS,CAAqD,CAAC;AAExH,eAAe,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentPreferencesContext.js","names":["ComponentPreferencesContext: Context<Preferences | undefined>"],"sources":["../../../src/contexts/I18n/ComponentPreferencesContext.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"ComponentPreferencesContext.js","names":["ComponentPreferencesContext: Context<Preferences | undefined>"],"sources":["../../../src/contexts/I18n/ComponentPreferencesContext.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {Preferences} from '@thunderid/browser';\nimport {Context, createContext} from 'react';\n\n/**\n * Context for component-level preferences overrides.\n * Presentational components can provide this context to override the global i18n\n * and theme settings for their entire subtree, including all nested components.\n */\nconst ComponentPreferencesContext: Context<Preferences | undefined> = createContext<Preferences | undefined>(undefined);\n\nexport default ComponentPreferencesContext;\n"],"mappings":";;;;;;;;AAWA,MAAMA,8BAAgE,cAAuC,OAAU;AAEvH,0CAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
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
1
|
import { I18nBundle } from '@thunderid/browser';
|
|
19
2
|
import { Context } from 'react';
|
|
20
3
|
export interface I18nContextValue {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"I18nContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAEpC;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IAE7D;;OAEG;IACH,WAAW,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAExC;;OAEG;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;CACtE;AAED,QAAA,MAAM,WAAW,EAAE,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAgD,CAAC;AAInG,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nContext.js","names":["I18nContext: Context<I18nContextValue | null>"],"sources":["../../../src/contexts/I18n/I18nContext.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"I18nContext.js","names":["I18nContext: Context<I18nContextValue | null>"],"sources":["../../../src/contexts/I18n/I18nContext.ts"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {I18nBundle} from '@thunderid/browser';\nimport {Context, createContext} from 'react';\n\nexport interface I18nContextValue {\n /**\n * All available i18n bundles (default + user provided)\n */\n bundles: Record<string, I18nBundle>;\n\n /**\n * The current language code (e.g., 'en-US', 'fr-FR')\n */\n currentLanguage: string;\n\n /**\n * The fallback language code\n */\n fallbackLanguage: string;\n\n /**\n * Injects additional bundles into the i18n system (e.g., from flow metadata).\n * Injected bundles take precedence over defaults but are overridden by prop-provided bundles.\n */\n injectBundles: (bundles: Record<string, I18nBundle>) => void;\n\n /**\n * Function to change the current language\n */\n setLanguage: (language: string) => void;\n\n /**\n * Function to get a translation by key with optional parameters\n */\n t: (key: string, params?: Record<string, string | number>) => string;\n}\n\nconst I18nContext: Context<I18nContextValue | null> = createContext<I18nContextValue | null>(null);\n\nI18nContext.displayName = 'I18nContext';\n\nexport default I18nContext;\n"],"mappings":";;;AAuCA,MAAMA,cAAgD,cAAuC,KAAK;AAElG,YAAY,cAAc;AAE1B,0BAAe"}
|
|
@@ -1,20 +1,3 @@
|
|
|
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
1
|
import { I18nPreferences } from '@thunderid/browser';
|
|
19
2
|
import { FC, PropsWithChildren } from 'react';
|
|
20
3
|
export interface I18nProviderProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,eAAe,EAShB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA0D,MAAM,OAAO,CAAC;AAUrG,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;IAE9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAqFD;;;GAGG;AACH,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CA6L1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"I18nProvider.js","names":["logger: ReturnType<typeof createPackageComponentLogger>","parts: string[]","match: RegExpMatchArray | null","maxAge: number","secure: string","domain: string","I18nProvider: FC<PropsWithChildren<I18nProviderProps>>","defaultBundles: Record<string, I18nBundle>","storageStrategy: I18nStorageStrategy","storageKey: string","urlParamConfig: string | false","resolvedCookieDomain: string | undefined","storage: StorageAdapter","urlLanguage: string | null","storedLanguage: string | null","browserLanguage: string","injectBundles: (newBundles: Record<string, I18nBundle>) => void","merged: Record<string, I18nBundle>","normalizedTranslations: I18nTranslations","mergedBundles: Record<string, I18nBundle>","languageKey: string","fallbackLanguage: string","t: (key: string, params?: Record<string, string | number>) => string","translation: string | undefined","currentBundle: I18nBundle | undefined","fallbackBundle: I18nBundle | undefined","setLanguage: (language: string) => void","contextValue: I18nContextValue","I18nContext"],"sources":["../../../src/contexts/I18n/I18nProvider.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 deepMerge,\n I18nPreferences,\n I18nStorageStrategy,\n createPackageComponentLogger,\n I18nBundle,\n I18nTranslations,\n TranslationBundleConstants,\n getDefaultI18nBundles,\n normalizeTranslations,\n getVendorPrefix,\n} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, useCallback, useEffect, useMemo, useState} from 'react';\nimport I18nContext, {I18nContextValue} from './I18nContext';\n\nconst logger: ReturnType<typeof createPackageComponentLogger> = createPackageComponentLogger(\n '@thunderid/react',\n 'I18nProvider',\n);\n\nconst DEFAULT_URL_PARAM = 'lang';\n\nexport interface I18nProviderProps {\n /**\n * The i18n preferences from the ThunderIDProvider\n */\n preferences?: I18nPreferences;\n\n /**\n * Vendor/brand namespace used to derive the default language storage key\n * (e.g. `${vendor}-i18n-language`). Resolved from the SDK config's `vendor` option.\n * @default 'thunderid'\n */\n vendor?: string;\n}\n\nconst detectBrowserLanguage = (): string => {\n if (typeof window !== 'undefined' && window.navigator) {\n return window.navigator.language || TranslationBundleConstants.FALLBACK_LOCALE;\n }\n\n return TranslationBundleConstants.FALLBACK_LOCALE;\n};\n\nconst deriveRootDomain = (hostname: string): string => {\n const parts: string[] = hostname.split('.');\n return parts.length > 1 ? parts.slice(-2).join('.') : hostname;\n};\n\nconst getCookie = (name: string): string | null => {\n if (typeof document === 'undefined') return null;\n const match: RegExpMatchArray | null = new RegExp(\n `(?:^|; )${name.replace(/([.*+?^${}()|[\\]\\\\])/g, '\\\\$1')}=([^;]*)`,\n ).exec(document.cookie);\n return match ? decodeURIComponent(match[1]) : null;\n};\n\nconst setCookie = (name: string, value: string, domain: string): void => {\n if (typeof document === 'undefined') return;\n const maxAge: number = 365 * 24 * 60 * 60;\n const secure: string = typeof window !== 'undefined' && window.location.protocol === 'https:' ? '; Secure' : '';\n document.cookie =\n `${encodeURIComponent(name)}=${encodeURIComponent(value)}` +\n `; Max-Age=${maxAge}` +\n `; Path=/` +\n `; Domain=${domain}` +\n `; SameSite=Lax${secure}`;\n};\n\ninterface StorageAdapter {\n read: () => string | null;\n write: (language: string) => void;\n}\n\nconst createStorageAdapter = (strategy: I18nStorageStrategy, key: string, cookieDomain?: string): StorageAdapter => {\n switch (strategy) {\n case 'cookie':\n return {\n read: (): string | null => getCookie(key),\n write: (language: string): void => {\n const domain: string =\n cookieDomain ?? (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : '');\n if (domain) setCookie(key, language, domain);\n },\n };\n case 'localStorage':\n return {\n read: (): string | null => {\n if (typeof window === 'undefined' || !window.localStorage) return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n write: (language: string): void => {\n if (typeof window === 'undefined' || !window.localStorage) return;\n try {\n window.localStorage.setItem(key, language);\n } catch {\n logger.warn('Failed to persist language preference to localStorage.');\n }\n },\n };\n case 'none':\n default:\n return {read: (): null => null, write: (): void => {}};\n }\n};\n\nconst detectUrlParamLanguage = (paramName: string): string | null => {\n if (typeof window === 'undefined') return null;\n try {\n return new URLSearchParams(window.location.search).get(paramName);\n } catch {\n return null;\n }\n};\n\n/**\n * I18nProvider component that manages internationalization state and provides\n * translation functions to child components.\n */\nconst I18nProvider: FC<PropsWithChildren<I18nProviderProps>> = ({\n children,\n preferences,\n vendor,\n}: PropsWithChildren<I18nProviderProps>): ReactElement => {\n // Get default bundles from the browser package\n const defaultBundles: Record<string, I18nBundle> = getDefaultI18nBundles();\n\n const storageStrategy: I18nStorageStrategy = preferences?.storageStrategy ?? 'cookie';\n const storageKey: string = preferences?.storageKey ?? `${getVendorPrefix(vendor)}-i18n-language`;\n const urlParamConfig: string | false = preferences?.urlParam === undefined ? DEFAULT_URL_PARAM : preferences.urlParam;\n\n const resolvedCookieDomain: string | undefined = useMemo((): string | undefined => {\n if (storageStrategy !== 'cookie') return undefined;\n if (preferences?.cookieDomain) return preferences.cookieDomain;\n return typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : undefined;\n }, [storageStrategy, preferences?.cookieDomain]);\n\n const storage: StorageAdapter = useMemo(\n () => createStorageAdapter(storageStrategy, storageKey, resolvedCookieDomain),\n [storageStrategy, storageKey, resolvedCookieDomain],\n );\n\n const determineInitialLanguage = (): string => {\n if (preferences?.language) return preferences.language;\n if (urlParamConfig !== false) {\n const urlLanguage: string | null = detectUrlParamLanguage(urlParamConfig);\n if (urlLanguage) {\n storage.write(urlLanguage);\n return urlLanguage;\n }\n }\n const storedLanguage: string | null = storage.read();\n if (storedLanguage) return storedLanguage;\n const browserLanguage: string = detectBrowserLanguage();\n if (browserLanguage) return browserLanguage;\n return preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n };\n\n const [currentLanguage, setCurrentLanguage] = useState<string>(determineInitialLanguage);\n\n // Bundles injected at runtime (e.g., from flow metadata i18n translations).\n // These take precedence over defaults but are overridden by prop-provided bundles.\n const [injectedBundles, setInjectedBundles] = useState<Record<string, I18nBundle>>({});\n\n const injectBundles: (newBundles: Record<string, I18nBundle>) => void = useCallback(\n (newBundles: Record<string, I18nBundle>): void => {\n setInjectedBundles((prev: Record<string, I18nBundle>) => {\n const merged: Record<string, I18nBundle> = {...prev};\n Object.entries(newBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n return merged;\n });\n },\n [],\n );\n\n /**\n * Merge bundles in priority order: defaults → injected (meta) → prop-provided\n */\n const mergedBundles: Record<string, I18nBundle> = useMemo(() => {\n const merged: Record<string, I18nBundle> = {};\n\n // 1. Default bundles\n Object.entries(defaultBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n // Convert key format (e.g., 'en_US' to 'en-US')\n const languageKey: string = key.replace('_', '-');\n merged[languageKey] = bundle;\n });\n\n // 2. Injected bundles (e.g., from flow metadata) — override defaults\n Object.entries(injectedBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n\n // 3. User-provided bundles (from props) — highest priority, override everything\n if (preferences?.bundles) {\n Object.entries(preferences.bundles).forEach(([key, userBundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n userBundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n metadata: userBundle.metadata ? {...merged[key].metadata, ...userBundle.metadata} : merged[key].metadata,\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...userBundle, translations: normalizedTranslations};\n }\n });\n }\n\n return merged;\n }, [defaultBundles, injectedBundles, preferences?.bundles]);\n\n const fallbackLanguage: string = preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Persist language changes to the configured storage.\n useEffect(() => {\n storage.write(currentLanguage);\n }, [currentLanguage, storage]);\n\n // Translation function\n const t: (key: string, params?: Record<string, string | number>) => string = useCallback(\n (key: string, params?: Record<string, string | number>): string => {\n let translation: string | undefined;\n\n // Try to get translation from current language bundle\n const currentBundle: I18nBundle | undefined = mergedBundles[currentLanguage];\n if (currentBundle?.translations[key]) {\n translation = currentBundle.translations[key];\n }\n\n // Fallback to fallback language if translation not found\n if (!translation && currentLanguage !== fallbackLanguage) {\n const fallbackBundle: I18nBundle | undefined = mergedBundles[fallbackLanguage];\n if (fallbackBundle?.translations[key]) {\n translation = fallbackBundle.translations[key];\n }\n }\n\n // If still no translation found, return the key itself\n if (!translation) {\n translation = key;\n }\n\n // Replace parameters if provided\n if (params && Object.keys(params).length > 0) {\n return Object.entries(params).reduce(\n (acc: string, [paramKey, paramValue]: [string, string | number]) =>\n acc.replace(new RegExp(`\\\\{${paramKey}\\\\}`, 'g'), String(paramValue)),\n translation,\n );\n }\n\n return translation;\n },\n [mergedBundles, currentLanguage, fallbackLanguage],\n );\n\n // Language setter function\n const setLanguage: (language: string) => void = useCallback(\n (language: string) => {\n if (mergedBundles[language]) {\n setCurrentLanguage(language);\n } else {\n logger.warn(\n `Language '${language}' is not available. Available languages: ${Object.keys(mergedBundles).join(', ')}`,\n );\n }\n },\n [mergedBundles],\n );\n\n const contextValue: I18nContextValue = useMemo(\n () => ({\n bundles: mergedBundles,\n currentLanguage,\n fallbackLanguage,\n injectBundles,\n setLanguage,\n t,\n }),\n [currentLanguage, fallbackLanguage, injectBundles, mergedBundles, setLanguage, t],\n );\n\n return <I18nContext.Provider value={contextValue}>{children}</I18nContext.Provider>;\n};\n\nexport default I18nProvider;\n"],"mappings":";;;;;;AAiCA,MAAMA,WAA0D,6BAC9D,oBACA,eACD;AAED,MAAM,oBAAoB;AAgB1B,MAAM,8BAAsC;AAC1C,KAAI,OAAO,WAAW,e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iB,aAAa;EAAQ,CAAC;CAE3D,MAAMG,mBAA2B,aAAa,oBAAoB,2BAA2B;AAG7F,iBAAgB;AACd,UAAQ,MAAM,gBAAgB;IAC7B,CAAC,iBAAiB,QAAQ,CAAC;CAG9B,MAAMC,IAAuE,aAC1E,KAAa,WAAqD;EACjE,IAAIC;EAGJ,MAAMC,gBAAwC,cAAc;AAC5D,MAAI,eAAe,aAAa,KAC9B,eAAc,cAAc,aAAa;AAI3C,MAAI,CAAC,eAAe,oBAAoB,kBAAkB;GACxD,MAAMC,iBAAyC,cAAc;AAC7D,OAAI,gBAAgB,aAAa,KAC/B,eAAc,eAAe,aAAa;;AAK9C,MAAI,CAAC,YACH,eAAc;AAIhB,MAAI,UAAU,OAAO,KAAK,OAAO,CAAC,SAAS,EACzC,QAAO,OAAO,QAAQ,OAAO,CAAC,QAC3B,KAAa,CAAC,UAAU,gBACvB,IAAI,QAAQ,IAAI,OAAO,MAAM,SAAS,MAAM,IAAI,EAAE,OAAO,WAAW,CAAC,EACvE,YACD;AAGH,SAAO;IAET;EAAC;EAAe;EAAiB;EAAiB,CACnD;CAGD,MAAMC,cAA0C,aAC7C,aAAqB;AACpB,MAAI,cAAc,UAChB,oBAAmB,SAAS;MAE5B,UAAO,KACL,aAAa,SAAS,2CAA2C,OAAO,KAAK,cAAc,CAAC,KAAK,KAAK,GACvG;IAGL,CAAC,cAAc,CAChB;CAED,MAAMC,eAAiC,eAC9B;EACL,SAAS;EACT;EACA;EACA;EACA;EACA;EACD,GACD;EAAC;EAAiB;EAAkB;EAAe;EAAe;EAAa;EAAE,CAClF;AAED,QAAO,oBAACC,oBAAY;EAAS,OAAO;EAAe;GAAgC;;AAGrF,2BAAe"}
|
|
1
|
+
{"version":3,"file":"I18nProvider.js","names":["logger: ReturnType<typeof createPackageComponentLogger>","parts: string[]","match: RegExpMatchArray | null","maxAge: number","secure: string","domain: string","I18nProvider: FC<PropsWithChildren<I18nProviderProps>>","defaultBundles: Record<string, I18nBundle>","storageStrategy: I18nStorageStrategy","storageKey: string","urlParamConfig: string | false","resolvedCookieDomain: string | undefined","storage: StorageAdapter","urlLanguage: string | null","storedLanguage: string | null","browserLanguage: string","injectBundles: (newBundles: Record<string, I18nBundle>) => void","merged: Record<string, I18nBundle>","normalizedTranslations: I18nTranslations","mergedBundles: Record<string, I18nBundle>","languageKey: string","fallbackLanguage: string","t: (key: string, params?: Record<string, string | number>) => string","translation: string | undefined","currentBundle: I18nBundle | undefined","fallbackBundle: I18nBundle | undefined","setLanguage: (language: string) => void","contextValue: I18nContextValue","I18nContext"],"sources":["../../../src/contexts/I18n/I18nProvider.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {\n deepMerge,\n I18nPreferences,\n I18nStorageStrategy,\n createPackageComponentLogger,\n I18nBundle,\n I18nTranslations,\n TranslationBundleConstants,\n getDefaultI18nBundles,\n normalizeTranslations,\n getVendorPrefix,\n} from '@thunderid/browser';\nimport {FC, PropsWithChildren, ReactElement, useCallback, useEffect, useMemo, useState} from 'react';\nimport I18nContext, {I18nContextValue} from './I18nContext';\n\nconst logger: ReturnType<typeof createPackageComponentLogger> = createPackageComponentLogger(\n '@thunderid/react',\n 'I18nProvider',\n);\n\nconst DEFAULT_URL_PARAM = 'lang';\n\nexport interface I18nProviderProps {\n /**\n * The i18n preferences from the ThunderIDProvider\n */\n preferences?: I18nPreferences;\n\n /**\n * Vendor/brand namespace used to derive the default language storage key\n * (e.g. `${vendor}-i18n-language`). Resolved from the SDK config's `vendor` option.\n * @default 'thunderid'\n */\n vendor?: string;\n}\n\nconst detectBrowserLanguage = (): string => {\n if (typeof window !== 'undefined' && window.navigator) {\n return window.navigator.language || TranslationBundleConstants.FALLBACK_LOCALE;\n }\n\n return TranslationBundleConstants.FALLBACK_LOCALE;\n};\n\nconst deriveRootDomain = (hostname: string): string => {\n const parts: string[] = hostname.split('.');\n return parts.length > 1 ? parts.slice(-2).join('.') : hostname;\n};\n\nconst getCookie = (name: string): string | null => {\n if (typeof document === 'undefined') return null;\n const match: RegExpMatchArray | null = new RegExp(\n `(?:^|; )${name.replace(/([.*+?^${}()|[\\]\\\\])/g, '\\\\$1')}=([^;]*)`,\n ).exec(document.cookie);\n return match ? decodeURIComponent(match[1]) : null;\n};\n\nconst setCookie = (name: string, value: string, domain: string): void => {\n if (typeof document === 'undefined') return;\n const maxAge: number = 365 * 24 * 60 * 60;\n const secure: string = typeof window !== 'undefined' && window.location.protocol === 'https:' ? '; Secure' : '';\n document.cookie =\n `${encodeURIComponent(name)}=${encodeURIComponent(value)}` +\n `; Max-Age=${maxAge}` +\n `; Path=/` +\n `; Domain=${domain}` +\n `; SameSite=Lax${secure}`;\n};\n\ninterface StorageAdapter {\n read: () => string | null;\n write: (language: string) => void;\n}\n\nconst createStorageAdapter = (strategy: I18nStorageStrategy, key: string, cookieDomain?: string): StorageAdapter => {\n switch (strategy) {\n case 'cookie':\n return {\n read: (): string | null => getCookie(key),\n write: (language: string): void => {\n const domain: string =\n cookieDomain ?? (typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : '');\n if (domain) setCookie(key, language, domain);\n },\n };\n case 'localStorage':\n return {\n read: (): string | null => {\n if (typeof window === 'undefined' || !window.localStorage) return null;\n try {\n return window.localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n write: (language: string): void => {\n if (typeof window === 'undefined' || !window.localStorage) return;\n try {\n window.localStorage.setItem(key, language);\n } catch {\n logger.warn('Failed to persist language preference to localStorage.');\n }\n },\n };\n case 'none':\n default:\n return {read: (): null => null, write: (): void => {}};\n }\n};\n\nconst detectUrlParamLanguage = (paramName: string): string | null => {\n if (typeof window === 'undefined') return null;\n try {\n return new URLSearchParams(window.location.search).get(paramName);\n } catch {\n return null;\n }\n};\n\n/**\n * I18nProvider component that manages internationalization state and provides\n * translation functions to child components.\n */\nconst I18nProvider: FC<PropsWithChildren<I18nProviderProps>> = ({\n children,\n preferences,\n vendor,\n}: PropsWithChildren<I18nProviderProps>): ReactElement => {\n // Get default bundles from the browser package\n const defaultBundles: Record<string, I18nBundle> = getDefaultI18nBundles();\n\n const storageStrategy: I18nStorageStrategy = preferences?.storageStrategy ?? 'cookie';\n const storageKey: string = preferences?.storageKey ?? `${getVendorPrefix(vendor)}-i18n-language`;\n const urlParamConfig: string | false = preferences?.urlParam === undefined ? DEFAULT_URL_PARAM : preferences.urlParam;\n\n const resolvedCookieDomain: string | undefined = useMemo((): string | undefined => {\n if (storageStrategy !== 'cookie') return undefined;\n if (preferences?.cookieDomain) return preferences.cookieDomain;\n return typeof window !== 'undefined' ? deriveRootDomain(window.location.hostname) : undefined;\n }, [storageStrategy, preferences?.cookieDomain]);\n\n const storage: StorageAdapter = useMemo(\n () => createStorageAdapter(storageStrategy, storageKey, resolvedCookieDomain),\n [storageStrategy, storageKey, resolvedCookieDomain],\n );\n\n const determineInitialLanguage = (): string => {\n if (preferences?.language) return preferences.language;\n if (urlParamConfig !== false) {\n const urlLanguage: string | null = detectUrlParamLanguage(urlParamConfig);\n if (urlLanguage) {\n storage.write(urlLanguage);\n return urlLanguage;\n }\n }\n const storedLanguage: string | null = storage.read();\n if (storedLanguage) return storedLanguage;\n const browserLanguage: string = detectBrowserLanguage();\n if (browserLanguage) return browserLanguage;\n return preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n };\n\n const [currentLanguage, setCurrentLanguage] = useState<string>(determineInitialLanguage);\n\n // Bundles injected at runtime (e.g., from flow metadata i18n translations).\n // These take precedence over defaults but are overridden by prop-provided bundles.\n const [injectedBundles, setInjectedBundles] = useState<Record<string, I18nBundle>>({});\n\n const injectBundles: (newBundles: Record<string, I18nBundle>) => void = useCallback(\n (newBundles: Record<string, I18nBundle>): void => {\n setInjectedBundles((prev: Record<string, I18nBundle>) => {\n const merged: Record<string, I18nBundle> = {...prev};\n Object.entries(newBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n return merged;\n });\n },\n [],\n );\n\n /**\n * Merge bundles in priority order: defaults → injected (meta) → prop-provided\n */\n const mergedBundles: Record<string, I18nBundle> = useMemo(() => {\n const merged: Record<string, I18nBundle> = {};\n\n // 1. Default bundles\n Object.entries(defaultBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n // Convert key format (e.g., 'en_US' to 'en-US')\n const languageKey: string = key.replace('_', '-');\n merged[languageKey] = bundle;\n });\n\n // 2. Injected bundles (e.g., from flow metadata) — override defaults\n Object.entries(injectedBundles).forEach(([key, bundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n bundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...bundle, translations: normalizedTranslations};\n }\n });\n\n // 3. User-provided bundles (from props) — highest priority, override everything\n if (preferences?.bundles) {\n Object.entries(preferences.bundles).forEach(([key, userBundle]: [string, I18nBundle]) => {\n const normalizedTranslations: I18nTranslations = normalizeTranslations(\n userBundle.translations as unknown as Record<string, string | Record<string, string>>,\n );\n if (merged[key]) {\n merged[key] = {\n ...merged[key],\n metadata: userBundle.metadata ? {...merged[key].metadata, ...userBundle.metadata} : merged[key].metadata,\n translations: deepMerge(merged[key].translations, normalizedTranslations),\n };\n } else {\n merged[key] = {...userBundle, translations: normalizedTranslations};\n }\n });\n }\n\n return merged;\n }, [defaultBundles, injectedBundles, preferences?.bundles]);\n\n const fallbackLanguage: string = preferences?.fallbackLanguage || TranslationBundleConstants.FALLBACK_LOCALE;\n\n // Persist language changes to the configured storage.\n useEffect(() => {\n storage.write(currentLanguage);\n }, [currentLanguage, storage]);\n\n // Translation function\n const t: (key: string, params?: Record<string, string | number>) => string = useCallback(\n (key: string, params?: Record<string, string | number>): string => {\n let translation: string | undefined;\n\n // Try to get translation from current language bundle\n const currentBundle: I18nBundle | undefined = mergedBundles[currentLanguage];\n if (currentBundle?.translations[key]) {\n translation = currentBundle.translations[key];\n }\n\n // Fallback to fallback language if translation not found\n if (!translation && currentLanguage !== fallbackLanguage) {\n const fallbackBundle: I18nBundle | undefined = mergedBundles[fallbackLanguage];\n if (fallbackBundle?.translations[key]) {\n translation = fallbackBundle.translations[key];\n }\n }\n\n // If still no translation found, return the key itself\n if (!translation) {\n translation = key;\n }\n\n // Replace parameters if provided\n if (params && Object.keys(params).length > 0) {\n return Object.entries(params).reduce(\n (acc: string, [paramKey, paramValue]: [string, string | number]) =>\n acc.replace(new RegExp(`\\\\{${paramKey}\\\\}`, 'g'), String(paramValue)),\n translation,\n );\n }\n\n return translation;\n },\n [mergedBundles, currentLanguage, fallbackLanguage],\n );\n\n // Language setter function\n const setLanguage: (language: string) => void = useCallback(\n (language: string) => {\n if (mergedBundles[language]) {\n setCurrentLanguage(language);\n } else {\n logger.warn(\n `Language '${language}' is not available. Available languages: ${Object.keys(mergedBundles).join(', ')}`,\n );\n }\n },\n [mergedBundles],\n );\n\n const contextValue: I18nContextValue = useMemo(\n () => ({\n bundles: mergedBundles,\n currentLanguage,\n fallbackLanguage,\n injectBundles,\n setLanguage,\n t,\n }),\n [currentLanguage, fallbackLanguage, injectBundles, mergedBundles, setLanguage, t],\n );\n\n return <I18nContext.Provider value={contextValue}>{children}</I18nContext.Provider>;\n};\n\nexport default I18nProvider;\n"],"mappings":";;;;;;AAkBA,MAAMA,WAA0D,6BAC9D,oBACA,eACD;AAED,MAAM,oBAAoB;AAgB1B,MAAM,8BAAsC;AAC1C,KAAI,OAAO,WAAW,eAAe,OAAO,UAC1C,QAAO,OAAO,UAAU,YAAY,2BAA2B;AAGjE,QAAO,2BAA2B;;AAGpC,MAAM,oBAAoB,aAA6B;CACr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