@thunderid/react 0.0.1
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/LICENSE +201 -0
- package/dist/ThunderIDReactClient.d.ts +87 -0
- package/dist/ThunderIDReactClient.d.ts.map +1 -0
- package/dist/__temp__/api.d.ts +258 -0
- package/dist/__temp__/api.d.ts.map +1 -0
- package/dist/__temp__/models.d.ts +98 -0
- package/dist/__temp__/models.d.ts.map +1 -0
- package/dist/api/createOrganization.d.ts +86 -0
- package/dist/api/createOrganization.d.ts.map +1 -0
- package/dist/api/getAllOrganizations.d.ts +78 -0
- package/dist/api/getAllOrganizations.d.ts.map +1 -0
- package/dist/api/getMeOrganizations.d.ts +82 -0
- package/dist/api/getMeOrganizations.d.ts.map +1 -0
- package/dist/api/getOrganization.d.ts +74 -0
- package/dist/api/getOrganization.d.ts.map +1 -0
- package/dist/api/getSchemas.d.ts +72 -0
- package/dist/api/getSchemas.d.ts.map +1 -0
- package/dist/api/getScim2Me.d.ts +72 -0
- package/dist/api/getScim2Me.d.ts.map +1 -0
- package/dist/api/updateMeProfile.d.ts +60 -0
- package/dist/api/updateMeProfile.d.ts.map +1 -0
- package/dist/api/updateOrganization.d.ts +81 -0
- package/dist/api/updateOrganization.d.ts.map +1 -0
- package/dist/cjs/index.js +20320 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +71 -0
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts.map +1 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts +71 -0
- package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +71 -0
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts.map +1 -0
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +66 -0
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts.map +1 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +71 -0
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts.map +1 -0
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +67 -0
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts.map +1 -0
- package/dist/components/adapters/CheckboxInput.d.ts +25 -0
- package/dist/components/adapters/CheckboxInput.d.ts.map +1 -0
- package/dist/components/adapters/Consent.d.ts +80 -0
- package/dist/components/adapters/Consent.d.ts.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.d.ts +95 -0
- package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts +21 -0
- package/dist/components/adapters/ConsentCheckboxList.styles.d.ts.map +1 -0
- package/dist/components/adapters/DateInput.d.ts +25 -0
- package/dist/components/adapters/DateInput.d.ts.map +1 -0
- package/dist/components/adapters/DividerComponent.d.ts +25 -0
- package/dist/components/adapters/DividerComponent.d.ts.map +1 -0
- package/dist/components/adapters/EmailInput.d.ts +25 -0
- package/dist/components/adapters/EmailInput.d.ts.map +1 -0
- package/dist/components/adapters/FacebookButton.d.ts +32 -0
- package/dist/components/adapters/FacebookButton.d.ts.map +1 -0
- package/dist/components/adapters/FlowTimer.d.ts +63 -0
- package/dist/components/adapters/FlowTimer.d.ts.map +1 -0
- package/dist/components/adapters/FormContainer.d.ts +25 -0
- package/dist/components/adapters/FormContainer.d.ts.map +1 -0
- package/dist/components/adapters/GitHubButton.d.ts +32 -0
- package/dist/components/adapters/GitHubButton.d.ts.map +1 -0
- package/dist/components/adapters/GoogleButton.d.ts +32 -0
- package/dist/components/adapters/GoogleButton.d.ts.map +1 -0
- package/dist/components/adapters/ImageComponent.d.ts +25 -0
- package/dist/components/adapters/ImageComponent.d.ts.map +1 -0
- package/dist/components/adapters/LinkedInButton.d.ts +32 -0
- package/dist/components/adapters/LinkedInButton.d.ts.map +1 -0
- package/dist/components/adapters/MicrosoftButton.d.ts +32 -0
- package/dist/components/adapters/MicrosoftButton.d.ts.map +1 -0
- package/dist/components/adapters/NumberInput.d.ts +25 -0
- package/dist/components/adapters/NumberInput.d.ts.map +1 -0
- package/dist/components/adapters/PasswordInput.d.ts +25 -0
- package/dist/components/adapters/PasswordInput.d.ts.map +1 -0
- package/dist/components/adapters/SelectInput.d.ts +25 -0
- package/dist/components/adapters/SelectInput.d.ts.map +1 -0
- package/dist/components/adapters/SignInWithEthereumButton.d.ts +32 -0
- package/dist/components/adapters/SignInWithEthereumButton.d.ts.map +1 -0
- package/dist/components/adapters/SmsOtpButton.d.ts +32 -0
- package/dist/components/adapters/SmsOtpButton.d.ts.map +1 -0
- package/dist/components/adapters/SocialButton.d.ts +25 -0
- package/dist/components/adapters/SocialButton.d.ts.map +1 -0
- package/dist/components/adapters/SubmitButton.d.ts +25 -0
- package/dist/components/adapters/SubmitButton.d.ts.map +1 -0
- package/dist/components/adapters/TelephoneInput.d.ts +25 -0
- package/dist/components/adapters/TelephoneInput.d.ts.map +1 -0
- package/dist/components/adapters/TextInput.d.ts +25 -0
- package/dist/components/adapters/TextInput.d.ts.map +1 -0
- package/dist/components/adapters/Typography.d.ts +25 -0
- package/dist/components/adapters/Typography.d.ts.map +1 -0
- package/dist/components/auth/Callback/Callback.d.ts +52 -0
- package/dist/components/auth/Callback/Callback.d.ts.map +1 -0
- package/dist/components/control/Loading.d.ts +48 -0
- package/dist/components/control/Loading.d.ts.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.d.ts +40 -0
- package/dist/components/control/OrganizationContext/OrganizationContext.d.ts.map +1 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts +35 -0
- package/dist/components/control/OrganizationContext/OrganizationContextController.d.ts.map +1 -0
- package/dist/components/control/SignedIn.d.ts +48 -0
- package/dist/components/control/SignedIn.d.ts.map +1 -0
- package/dist/components/control/SignedOut.d.ts +48 -0
- package/dist/components/control/SignedOut.d.ts.map +1 -0
- package/dist/components/factories/FieldFactory.d.ts +107 -0
- package/dist/components/factories/FieldFactory.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +60 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +27 -0
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts.map +1 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +68 -0
- package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts +80 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts +21 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts.map +1 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts +78 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/Organization/BaseOrganization.d.ts +67 -0
- package/dist/components/presentation/Organization/BaseOrganization.d.ts.map +1 -0
- package/dist/components/presentation/Organization/Organization.d.ts +67 -0
- package/dist/components/presentation/Organization/Organization.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +135 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.d.ts +93 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +160 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +120 -0
- package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +149 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +27 -0
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts.map +1 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +71 -0
- package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts.map +1 -0
- package/dist/components/presentation/User/BaseUser.d.ts +67 -0
- package/dist/components/presentation/User/BaseUser.d.ts.map +1 -0
- package/dist/components/presentation/User/User.d.ts +63 -0
- package/dist/components/presentation/User/User.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +89 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +27 -0
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts.map +1 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +109 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +73 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +27 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +60 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts +22 -0
- package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts +125 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +202 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +1 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts +27 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +114 -0
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/index.d.ts +22 -0
- package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +191 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts +27 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts +104 -0
- package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +20 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts +30 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts.map +1 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts +21 -0
- package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +24 -0
- package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts +57 -0
- package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts +74 -0
- package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts +26 -0
- package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts +46 -0
- package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +83 -0
- package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts +56 -0
- package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +28 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +27 -0
- package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +63 -0
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +131 -0
- package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts +27 -0
- package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +77 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts +26 -0
- package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts +125 -0
- package/dist/components/presentation/auth/SignIn/v1/types.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +222 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +165 -0
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +28 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +27 -0
- package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts +98 -0
- package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +174 -0
- package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts +39 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +46 -0
- package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +186 -0
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +1 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +39 -0
- package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +1 -0
- package/dist/components/primitives/Alert/Alert.d.ts +76 -0
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -0
- package/dist/components/primitives/Alert/Alert.styles.d.ts +29 -0
- package/dist/components/primitives/Alert/Alert.styles.d.ts.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.d.ts +60 -0
- package/dist/components/primitives/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +31 -0
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.d.ts +88 -0
- package/dist/components/primitives/Button/Button.d.ts.map +1 -0
- package/dist/components/primitives/Button/Button.styles.d.ts +36 -0
- package/dist/components/primitives/Button/Button.styles.d.ts.map +1 -0
- package/dist/components/primitives/Card/Card.d.ts +133 -0
- package/dist/components/primitives/Card/Card.d.ts.map +1 -0
- package/dist/components/primitives/Card/Card.styles.d.ts +30 -0
- package/dist/components/primitives/Card/Card.styles.d.ts.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +43 -0
- package/dist/components/primitives/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +29 -0
- package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.d.ts +37 -0
- package/dist/components/primitives/CopyableText/CopyableText.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts +21 -0
- package/dist/components/primitives/CopyableText/CopyableText.styles.d.ts.map +1 -0
- package/dist/components/primitives/CopyableText/index.d.ts +20 -0
- package/dist/components/primitives/CopyableText/index.d.ts.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +51 -0
- package/dist/components/primitives/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +29 -0
- package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.d.ts +62 -0
- package/dist/components/primitives/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts +27 -0
- package/dist/components/primitives/Dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/components/primitives/Divider/Divider.d.ts +59 -0
- package/dist/components/primitives/Divider/Divider.d.ts.map +1 -0
- package/dist/components/primitives/Divider/Divider.styles.d.ts +33 -0
- package/dist/components/primitives/Divider/Divider.styles.d.ts.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.d.ts +52 -0
- package/dist/components/primitives/FormControl/FormControl.d.ts.map +1 -0
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts +31 -0
- package/dist/components/primitives/FormControl/FormControl.styles.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts +30 -0
- package/dist/components/primitives/Icons/ArrowLeftRight.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts +30 -0
- package/dist/components/primitives/Icons/ArrowRightLeft.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Building.d.ts +41 -0
- package/dist/components/primitives/Icons/Building.d.ts.map +1 -0
- package/dist/components/primitives/Icons/BuildingAlt.d.ts +41 -0
- package/dist/components/primitives/Icons/BuildingAlt.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Check.d.ts +41 -0
- package/dist/components/primitives/Icons/Check.d.ts.map +1 -0
- package/dist/components/primitives/Icons/ChevronDown.d.ts +41 -0
- package/dist/components/primitives/Icons/ChevronDown.d.ts.map +1 -0
- package/dist/components/primitives/Icons/CircleAlert.d.ts +24 -0
- package/dist/components/primitives/Icons/CircleAlert.d.ts.map +1 -0
- package/dist/components/primitives/Icons/CircleCheck.d.ts +24 -0
- package/dist/components/primitives/Icons/CircleCheck.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Eye.d.ts +24 -0
- package/dist/components/primitives/Icons/Eye.d.ts.map +1 -0
- package/dist/components/primitives/Icons/EyeOff.d.ts +24 -0
- package/dist/components/primitives/Icons/EyeOff.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Info.d.ts +24 -0
- package/dist/components/primitives/Icons/Info.d.ts.map +1 -0
- package/dist/components/primitives/Icons/LogOut.d.ts +24 -0
- package/dist/components/primitives/Icons/LogOut.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Plus.d.ts +24 -0
- package/dist/components/primitives/Icons/Plus.d.ts.map +1 -0
- package/dist/components/primitives/Icons/Settings.d.ts +1 -0
- package/dist/components/primitives/Icons/Settings.d.ts.map +1 -0
- package/dist/components/primitives/Icons/TriangleAlert.d.ts +24 -0
- package/dist/components/primitives/Icons/TriangleAlert.d.ts.map +1 -0
- package/dist/components/primitives/Icons/User.d.ts +24 -0
- package/dist/components/primitives/Icons/User.d.ts.map +1 -0
- package/dist/components/primitives/Icons/X.d.ts +24 -0
- package/dist/components/primitives/Icons/X.d.ts.map +1 -0
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts +29 -0
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts.map +1 -0
- package/dist/components/primitives/Icons/index.d.ts +29 -0
- package/dist/components/primitives/Icons/index.d.ts.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +52 -0
- package/dist/components/primitives/InputLabel/InputLabel.d.ts.map +1 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +31 -0
- package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +124 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts.map +1 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +30 -0
- package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts.map +1 -0
- package/dist/components/primitives/Logo/Logo.d.ts +53 -0
- package/dist/components/primitives/Logo/Logo.d.ts.map +1 -0
- package/dist/components/primitives/Logo/Logo.styles.d.ts +29 -0
- package/dist/components/primitives/Logo/Logo.styles.d.ts.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.d.ts +89 -0
- package/dist/components/primitives/MultiInput/MultiInput.d.ts.map +1 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +33 -0
- package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.d.ts +88 -0
- package/dist/components/primitives/OtpField/OtpField.d.ts.map +1 -0
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts +31 -0
- package/dist/components/primitives/OtpField/OtpField.styles.d.ts.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.d.ts +32 -0
- package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +30 -0
- package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts.map +1 -0
- package/dist/components/primitives/Select/Select.d.ts +65 -0
- package/dist/components/primitives/Select/Select.d.ts.map +1 -0
- package/dist/components/primitives/Select/Select.styles.d.ts +29 -0
- package/dist/components/primitives/Select/Select.styles.d.ts.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.d.ts +55 -0
- package/dist/components/primitives/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts +30 -0
- package/dist/components/primitives/Spinner/Spinner.styles.d.ts.map +1 -0
- package/dist/components/primitives/TextField/TextField.d.ts +63 -0
- package/dist/components/primitives/TextField/TextField.d.ts.map +1 -0
- package/dist/components/primitives/TextField/TextField.styles.d.ts +31 -0
- package/dist/components/primitives/TextField/TextField.styles.d.ts.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.d.ts +41 -0
- package/dist/components/primitives/Toggle/Toggle.d.ts.map +1 -0
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts +21 -0
- package/dist/components/primitives/Toggle/Toggle.styles.d.ts.map +1 -0
- package/dist/components/primitives/Typography/Typography.d.ts +80 -0
- package/dist/components/primitives/Typography/Typography.d.ts.map +1 -0
- package/dist/components/primitives/Typography/Typography.styles.d.ts +39 -0
- package/dist/components/primitives/Typography/Typography.styles.d.ts.map +1 -0
- package/dist/contexts/Branding/BrandingContext.d.ts +53 -0
- package/dist/contexts/Branding/BrandingContext.d.ts.map +1 -0
- package/dist/contexts/Branding/BrandingProvider.d.ts +89 -0
- package/dist/contexts/Branding/BrandingProvider.d.ts.map +1 -0
- package/dist/contexts/Branding/useBrandingContext.d.ts +45 -0
- package/dist/contexts/Branding/useBrandingContext.d.ts.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +37 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts +25 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts.map +1 -0
- package/dist/contexts/Flow/FlowContext.d.ts +75 -0
- package/dist/contexts/Flow/FlowContext.d.ts.map +1 -0
- package/dist/contexts/Flow/FlowProvider.d.ts +47 -0
- package/dist/contexts/Flow/FlowProvider.d.ts.map +1 -0
- package/dist/contexts/Flow/useFlow.d.ts +49 -0
- package/dist/contexts/Flow/useFlow.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +45 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +51 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -0
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts +21 -0
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts.map +1 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts +27 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts.map +1 -0
- package/dist/contexts/I18n/I18nContext.d.ts +49 -0
- package/dist/contexts/I18n/I18nContext.d.ts.map +1 -0
- package/dist/contexts/I18n/I18nProvider.d.ts +32 -0
- package/dist/contexts/I18n/I18nProvider.d.ts.map +1 -0
- package/dist/contexts/I18n/useI18n.d.ts +28 -0
- package/dist/contexts/I18n/useI18n.d.ts.map +1 -0
- package/dist/contexts/Organization/OrganizationContext.d.ts +41 -0
- package/dist/contexts/Organization/OrganizationContext.d.ts.map +1 -0
- package/dist/contexts/Organization/OrganizationProvider.d.ts +94 -0
- package/dist/contexts/Organization/OrganizationProvider.d.ts.map +1 -0
- package/dist/contexts/Organization/useOrganization.d.ts +105 -0
- package/dist/contexts/Organization/useOrganization.d.ts.map +1 -0
- package/dist/contexts/Theme/ThemeContext.d.ts +43 -0
- package/dist/contexts/Theme/ThemeContext.d.ts.map +1 -0
- package/dist/contexts/Theme/ThemeProvider.d.ts +86 -0
- package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/Theme/types.d.ts +131 -0
- package/dist/contexts/Theme/types.d.ts.map +1 -0
- package/dist/contexts/Theme/useTheme.d.ts +21 -0
- package/dist/contexts/Theme/useTheme.d.ts.map +1 -0
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts +89 -0
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts +58 -0
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts +184 -0
- package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts +26 -0
- package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -0
- package/dist/contexts/ThunderID/useThunderID.d.ts +21 -0
- package/dist/contexts/ThunderID/useThunderID.d.ts.map +1 -0
- package/dist/contexts/User/UserContext.d.ts +42 -0
- package/dist/contexts/User/UserContext.d.ts.map +1 -0
- package/dist/contexts/User/UserProvider.d.ts +65 -0
- package/dist/contexts/User/UserProvider.d.ts.map +1 -0
- package/dist/contexts/User/useUser.d.ts +95 -0
- package/dist/contexts/User/useUser.d.ts.map +1 -0
- package/dist/hooks/useBranding.d.ts +128 -0
- package/dist/hooks/useBranding.d.ts.map +1 -0
- package/dist/hooks/useBrowserUrl.d.ts +56 -0
- package/dist/hooks/useBrowserUrl.d.ts.map +1 -0
- package/dist/hooks/useForm.d.ts +194 -0
- package/dist/hooks/useForm.d.ts.map +1 -0
- package/dist/hooks/useTranslation.d.ts +53 -0
- package/dist/hooks/useTranslation.d.ts.map +1 -0
- package/dist/hooks/v2/useOAuthCallback.d.ts +83 -0
- package/dist/hooks/v2/useOAuthCallback.d.ts.map +1 -0
- package/dist/index.d.ts +206 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20044 -0
- package/dist/index.js.map +1 -0
- package/dist/models/adapters.d.ts +69 -0
- package/dist/models/adapters.d.ts.map +1 -0
- package/dist/models/config.d.ts +20 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/utils/applyThemeToDOM.d.ts +25 -0
- package/dist/utils/applyThemeToDOM.d.ts.map +1 -0
- package/dist/utils/getDisplayName.d.ts +44 -0
- package/dist/utils/getDisplayName.d.ts.map +1 -0
- package/dist/utils/getMappedUserProfileValue.d.ts +52 -0
- package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -0
- package/dist/utils/normalizeThemeConfig.d.ts +31 -0
- package/dist/utils/normalizeThemeConfig.d.ts.map +1 -0
- package/dist/utils/oauth.d.ts +25 -0
- package/dist/utils/oauth.d.ts.map +1 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts +34 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts.map +1 -0
- package/dist/utils/v2/flowTransformer.d.ts +121 -0
- package/dist/utils/v2/flowTransformer.d.ts.map +1 -0
- package/dist/utils/v2/getAuthComponentHeadings.d.ts +70 -0
- package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +1 -0
- package/dist/utils/v2/passkey.d.ts +32 -0
- package/dist/utils/v2/passkey.d.ts.map +1 -0
- package/dist/utils/v2/resolveTranslationsInArray.d.ts +30 -0
- package/dist/utils/v2/resolveTranslationsInArray.d.ts.map +1 -0
- package/dist/utils/v2/resolveTranslationsInObject.d.ts +30 -0
- package/dist/utils/v2/resolveTranslationsInObject.d.ts.map +1 -0
- package/package.json +75 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,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,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,qBAAqB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,cAAc,GAAG,KAAK,CAAC;CACnH,GAAG,IAAI,CAAC;AAET;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,aAAa,EAAE,MAAM,IAAI,CAAC;IAG1B,WAAW,EAAE,QAAQ,CAAC;IAEtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,SAAS,EAAE,OAAO,CAAC;IAEnB,QAAQ,EAAE,WAAW,EAAE,CAAC;IAExB,cAAc,EAAE,CACd,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EACvC,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,KACE,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAE3C,KAAK,EAAE,MAAM,IAAI,CAAC;IAElB,cAAc,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEzC,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { FlowStep } from './FlowContext';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the FlowProvider component.
|
|
22
|
+
*/
|
|
23
|
+
export interface FlowProviderProps {
|
|
24
|
+
/**
|
|
25
|
+
* Initial step to start with.
|
|
26
|
+
*/
|
|
27
|
+
initialStep?: FlowStep;
|
|
28
|
+
/**
|
|
29
|
+
* Initial subtitle.
|
|
30
|
+
*/
|
|
31
|
+
initialSubtitle?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Initial title.
|
|
34
|
+
*/
|
|
35
|
+
initialTitle?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Callback when flow type changes.
|
|
38
|
+
*/
|
|
39
|
+
onFlowChange?: (step: FlowStep) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Provider component for flow context.
|
|
43
|
+
* Manages shared UI state for authentication flows including titles, messages, and navigation.
|
|
44
|
+
*/
|
|
45
|
+
declare const FlowProvider: FC<PropsWithChildren<FlowProviderProps>>;
|
|
46
|
+
export default FlowProvider;
|
|
47
|
+
//# sourceMappingURL=FlowProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/FlowProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,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"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { FlowContextValue } from './FlowContext';
|
|
19
|
+
/**
|
|
20
|
+
* Hook to access the flow context.
|
|
21
|
+
* Must be used within a FlowProvider.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* const MyAuthComponent = () => {
|
|
26
|
+
* const { title, setTitle, addMessage, isLoading } = useFlow();
|
|
27
|
+
*
|
|
28
|
+
* const handleSuccess = () => {
|
|
29
|
+
* addMessage({
|
|
30
|
+
* type: 'success',
|
|
31
|
+
* message: 'Authentication successful!'
|
|
32
|
+
* });
|
|
33
|
+
* };
|
|
34
|
+
*
|
|
35
|
+
* return (
|
|
36
|
+
* <div>
|
|
37
|
+
* <h1>{title}</h1>
|
|
38
|
+
* {isLoading && <p>Loading...</p>}
|
|
39
|
+
* </div>
|
|
40
|
+
* );
|
|
41
|
+
* };
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @returns The flow context value
|
|
45
|
+
* @throws Error if used outside of FlowProvider
|
|
46
|
+
*/
|
|
47
|
+
declare const useFlow: () => FlowContextValue;
|
|
48
|
+
export default useFlow;
|
|
49
|
+
//# sourceMappingURL=useFlow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFlow.d.ts","sourceRoot":"","sources":["../../../src/contexts/Flow/useFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAoB,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,OAAO,QAAO,gBAQnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import { FlowMetadataResponse } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
export interface FlowMetaContextValue {
|
|
21
|
+
/**
|
|
22
|
+
* Error from the flow meta fetch, if any
|
|
23
|
+
*/
|
|
24
|
+
error: Error | null;
|
|
25
|
+
/**
|
|
26
|
+
* Manually re-fetch flow metadata
|
|
27
|
+
*/
|
|
28
|
+
fetchFlowMeta: () => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Whether flow metadata is currently being fetched
|
|
31
|
+
*/
|
|
32
|
+
isLoading: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The fetched flow metadata response, or null while loading / on error
|
|
35
|
+
*/
|
|
36
|
+
meta: FlowMetadataResponse | null;
|
|
37
|
+
/**
|
|
38
|
+
* Fetches flow metadata for the given language and activates it in the i18n system.
|
|
39
|
+
* Use this to switch the UI language at runtime.
|
|
40
|
+
*/
|
|
41
|
+
switchLanguage: (language: string) => Promise<void>;
|
|
42
|
+
}
|
|
43
|
+
declare const FlowMetaContext: Context<FlowMetaContextValue | null>;
|
|
44
|
+
export default FlowMetaContext;
|
|
45
|
+
//# sourceMappingURL=FlowMetaContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowMetaContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
export interface FlowMetaProviderProps {
|
|
20
|
+
/**
|
|
21
|
+
* When false the provider skips fetching and provides null meta.
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* FlowMetaProvider fetches flow metadata from the `GET /flow/meta` endpoint
|
|
28
|
+
* (v2 API) and makes it available to child components through `FlowMetaContext`.
|
|
29
|
+
*
|
|
30
|
+
* It is designed to be used in v2 embedded-flow scenarios and integrates with
|
|
31
|
+
* `ThemeProvider` so that theme settings (colors, direction, typography, …)
|
|
32
|
+
* from the server-side design configuration are applied automatically.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <FlowMetaProvider
|
|
37
|
+
* config={{
|
|
38
|
+
* baseUrl: 'https://localhost:8090',
|
|
39
|
+
* type: FlowMetaType.App,
|
|
40
|
+
* id: 'your-app-id',
|
|
41
|
+
* }}
|
|
42
|
+
* >
|
|
43
|
+
* <ThemeProvider>
|
|
44
|
+
* <App />
|
|
45
|
+
* </ThemeProvider>
|
|
46
|
+
* </FlowMetaProvider>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare const FlowMetaProvider: FC<PropsWithChildren<FlowMetaProviderProps>>;
|
|
50
|
+
export default FlowMetaProvider;
|
|
51
|
+
//# sourceMappingURL=FlowMetaProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowMetaProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/FlowMetaProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAUH,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAAoE,MAAM,OAAO,CAAC;AAM/G,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,qBAAqB,CAAC,CA0JlE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { FlowMetaContextValue } from './FlowMetaContext';
|
|
19
|
+
declare const useFlowMeta: () => FlowMetaContextValue;
|
|
20
|
+
export default useFlowMeta;
|
|
21
|
+
//# sourceMappingURL=useFlowMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFlowMeta.d.ts","sourceRoot":"","sources":["../../../src/contexts/FlowMeta/useFlowMeta.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAwB,EAAC,oBAAoB,EAAC,MAAM,mBAAmB,CAAC;AAExE,QAAA,MAAM,WAAW,QAAO,oBAMvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { Preferences } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* Context for component-level preferences overrides.
|
|
22
|
+
* Presentational components can provide this context to override the global i18n
|
|
23
|
+
* and theme settings for their entire subtree, including all nested components.
|
|
24
|
+
*/
|
|
25
|
+
declare const ComponentPreferencesContext: Context<Preferences | undefined>;
|
|
26
|
+
export default ComponentPreferencesContext;
|
|
27
|
+
//# sourceMappingURL=ComponentPreferencesContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentPreferencesContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/ComponentPreferencesContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,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"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { I18nBundle } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
export interface I18nContextValue {
|
|
21
|
+
/**
|
|
22
|
+
* All available i18n bundles (default + user provided)
|
|
23
|
+
*/
|
|
24
|
+
bundles: Record<string, I18nBundle>;
|
|
25
|
+
/**
|
|
26
|
+
* The current language code (e.g., 'en-US', 'fr-FR')
|
|
27
|
+
*/
|
|
28
|
+
currentLanguage: string;
|
|
29
|
+
/**
|
|
30
|
+
* The fallback language code
|
|
31
|
+
*/
|
|
32
|
+
fallbackLanguage: string;
|
|
33
|
+
/**
|
|
34
|
+
* Injects additional bundles into the i18n system (e.g., from flow metadata).
|
|
35
|
+
* Injected bundles take precedence over defaults but are overridden by prop-provided bundles.
|
|
36
|
+
*/
|
|
37
|
+
injectBundles: (bundles: Record<string, I18nBundle>) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Function to change the current language
|
|
40
|
+
*/
|
|
41
|
+
setLanguage: (language: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Function to get a translation by key with optional parameters
|
|
44
|
+
*/
|
|
45
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
46
|
+
}
|
|
47
|
+
declare const I18nContext: Context<I18nContextValue | null>;
|
|
48
|
+
export default I18nContext;
|
|
49
|
+
//# sourceMappingURL=I18nContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"I18nContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,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"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { I18nPreferences } from '@thunderid/browser';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
export interface I18nProviderProps {
|
|
21
|
+
/**
|
|
22
|
+
* The i18n preferences from the ThunderIDProvider
|
|
23
|
+
*/
|
|
24
|
+
preferences?: I18nPreferences;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* I18nProvider component that manages internationalization state and provides
|
|
28
|
+
* translation functions to child components.
|
|
29
|
+
*/
|
|
30
|
+
declare const I18nProvider: FC<PropsWithChildren<I18nProviderProps>>;
|
|
31
|
+
export default I18nProvider;
|
|
32
|
+
//# sourceMappingURL=I18nProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"I18nProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/I18nProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,eAAe,EAQhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA0D,MAAM,OAAO,CAAC;AAWrG,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B;AAqFD;;;GAGG;AACH,QAAA,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CA4L1D,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { I18nContextValue } from './I18nContext';
|
|
19
|
+
/**
|
|
20
|
+
* Hook for accessing the I18n context directly.
|
|
21
|
+
* Provides access to the full i18n context including bundles and all utilities.
|
|
22
|
+
*
|
|
23
|
+
* @returns The complete I18n context value
|
|
24
|
+
* @throws Error if used outside of I18nProvider context
|
|
25
|
+
*/
|
|
26
|
+
declare const useI18n: () => I18nContextValue;
|
|
27
|
+
export default useI18n;
|
|
28
|
+
//# sourceMappingURL=useI18n.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../../src/contexts/I18n/useI18n.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAoB,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE5D;;;;;;GAMG;AACH,QAAA,MAAM,OAAO,QAAO,gBAUnB,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { AllOrganizationsApiResponse, Organization, CreateOrganizationPayload } from '@thunderid/browser';
|
|
19
|
+
import { Context } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* Props interface of {@link OrganizationContext}
|
|
22
|
+
*/
|
|
23
|
+
export interface OrganizationContextProps {
|
|
24
|
+
/**
|
|
25
|
+
* Function to create a new organization.
|
|
26
|
+
*/
|
|
27
|
+
createOrganization?: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
|
|
28
|
+
currentOrganization: Organization | null;
|
|
29
|
+
error: string | null;
|
|
30
|
+
getAllOrganizations: () => Promise<AllOrganizationsApiResponse>;
|
|
31
|
+
isLoading: boolean;
|
|
32
|
+
myOrganizations: Organization[];
|
|
33
|
+
revalidateMyOrganizations: () => Promise<Organization[]>;
|
|
34
|
+
switchOrganization: (organization: Organization) => Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Context object for managing organization data and related operations.
|
|
38
|
+
*/
|
|
39
|
+
declare const OrganizationContext: Context<OrganizationContextProps | null>;
|
|
40
|
+
export default OrganizationContext;
|
|
41
|
+
//# sourceMappingURL=OrganizationContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationContext.d.ts","sourceRoot":"","sources":["../../../src/contexts/Organization/OrganizationContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,2BAA2B,EAAE,YAAY,EAAE,yBAAyB,EAAC,MAAM,oBAAoB,CAAC;AACxG,OAAO,EAAC,OAAO,EAAgB,MAAM,OAAO,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtG,mBAAmB,EAAE,YAAY,GAAG,IAAI,CAAC;IACzC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,mBAAmB,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAChE,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,YAAY,EAAE,CAAC;IAChC,yBAAyB,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACzD,kBAAkB,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACnE;AAED;;GAEG;AACH,QAAA,MAAM,mBAAmB,EAAE,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAahE,CAAC;AAIH,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { Organization, AllOrganizationsApiResponse, CreateOrganizationPayload, TokenResponse } from '@thunderid/browser';
|
|
19
|
+
import { FC, PropsWithChildren } from 'react';
|
|
20
|
+
/**
|
|
21
|
+
* Props interface of {@link OrganizationProvider}
|
|
22
|
+
*/
|
|
23
|
+
export interface OrganizationProviderProps {
|
|
24
|
+
/**
|
|
25
|
+
* Whether to automatically fetch organizations on mount
|
|
26
|
+
*/
|
|
27
|
+
autoFetch?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Function to create a new organization.
|
|
30
|
+
*/
|
|
31
|
+
createOrganization?: (payload: CreateOrganizationPayload, sessionId: string) => Promise<Organization>;
|
|
32
|
+
/**
|
|
33
|
+
* Initial current organization
|
|
34
|
+
*/
|
|
35
|
+
currentOrganization?: Organization | null;
|
|
36
|
+
/**
|
|
37
|
+
* Initial list of organizations
|
|
38
|
+
*/
|
|
39
|
+
getAllOrganizations?: () => Promise<AllOrganizationsApiResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* List of organizations the signed-in user belongs to.
|
|
42
|
+
*/
|
|
43
|
+
myOrganizations?: Organization[];
|
|
44
|
+
/**
|
|
45
|
+
* Callback function called when an error occurs
|
|
46
|
+
*/
|
|
47
|
+
onError?: (error: string) => void;
|
|
48
|
+
/**
|
|
49
|
+
* Callback function called when switching organizations
|
|
50
|
+
*/
|
|
51
|
+
onOrganizationSwitch?: (organization: Organization) => Promise<TokenResponse | Response>;
|
|
52
|
+
/**
|
|
53
|
+
* Refetch the my organizations list.
|
|
54
|
+
* @returns
|
|
55
|
+
*/
|
|
56
|
+
revalidateMyOrganizations: () => Promise<Organization[]>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* OrganizationProvider component that manages organization data and provides it through OrganizationContext.
|
|
60
|
+
*
|
|
61
|
+
* This provider:
|
|
62
|
+
* - Fetches organization data from the organizations endpoint
|
|
63
|
+
* - Manages current organization state
|
|
64
|
+
* - Provides functions for switching organizations and refreshing data
|
|
65
|
+
* - Handles loading states and errors
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* // Basic usage with auto-fetch (uses internal API)
|
|
70
|
+
* <OrganizationProvider>
|
|
71
|
+
* <App />
|
|
72
|
+
* </OrganizationProvider>
|
|
73
|
+
*
|
|
74
|
+
* // With custom error handling
|
|
75
|
+
* <OrganizationProvider onError={(error) => console.error('Organization error:', error)}>
|
|
76
|
+
* <App />
|
|
77
|
+
* </OrganizationProvider>
|
|
78
|
+
*
|
|
79
|
+
* // With custom organization switch handler
|
|
80
|
+
* <OrganizationProvider
|
|
81
|
+
* onOrganizationSwitch={(org) => console.log('Switched to:', org.name)}
|
|
82
|
+
* >
|
|
83
|
+
* <App />
|
|
84
|
+
* </OrganizationProvider>
|
|
85
|
+
*
|
|
86
|
+
* // Disable auto-fetch (fetch manually using revalidateMyOrganizations)
|
|
87
|
+
* <OrganizationProvider autoFetch={false}>
|
|
88
|
+
* <App />
|
|
89
|
+
* </OrganizationProvider>
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
declare const OrganizationProvider: FC<PropsWithChildren<OrganizationProviderProps>>;
|
|
93
|
+
export default OrganizationProvider;
|
|
94
|
+
//# sourceMappingURL=OrganizationProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrganizationProvider.d.ts","sourceRoot":"","sources":["../../../src/contexts/Organization/OrganizationProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAAE,iBAAiB,EAA+C,MAAM,OAAO,CAAC;AAG1F;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,yBAAyB,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IACtG;;OAEG;IACH,mBAAmB,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1C;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACjE;;OAEG;IACH,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;IACjC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,OAAO,CAAC,aAAa,GAAG,QAAQ,CAAC,CAAC;IACzF;;;OAGG;IACH,yBAAyB,EAAE,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CAwE1E,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { OrganizationContextProps } from './OrganizationContext';
|
|
19
|
+
/**
|
|
20
|
+
* Hook to access the Organization context.
|
|
21
|
+
*
|
|
22
|
+
* This hook provides access to organization data including:
|
|
23
|
+
* - List of organizations the user belongs to
|
|
24
|
+
* - Current organization
|
|
25
|
+
* - Functions to switch organizations and refresh data
|
|
26
|
+
* - Function to fetch organizations programmatically
|
|
27
|
+
* - Loading states and error handling
|
|
28
|
+
*
|
|
29
|
+
* @returns {OrganizationContextProps} The organization context value containing all organization-related data and functions
|
|
30
|
+
* @throws {Error} Throws an error if used outside of OrganizationProvider
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* import {useOrganization} from '@thunderid/react';
|
|
35
|
+
*
|
|
36
|
+
* function OrganizationSelector() {
|
|
37
|
+
* const {
|
|
38
|
+
* organizations,
|
|
39
|
+
* currentOrganization,
|
|
40
|
+
* switchOrganization,
|
|
41
|
+
* revalidateMyOrganizations,
|
|
42
|
+
* getOrganizations,
|
|
43
|
+
* isLoading,
|
|
44
|
+
* error
|
|
45
|
+
* } = useOrganization();
|
|
46
|
+
*
|
|
47
|
+
* if (isLoading) {
|
|
48
|
+
* return <div>Loading organizations...</div>;
|
|
49
|
+
* }
|
|
50
|
+
*
|
|
51
|
+
* if (error) {
|
|
52
|
+
* return <div>Error: {error}</div>;
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* return (
|
|
56
|
+
* <div>
|
|
57
|
+
* <h2>Current: {currentOrganization?.name}</h2>
|
|
58
|
+
* <select
|
|
59
|
+
* value={currentOrganization?.id || ''}
|
|
60
|
+
* onChange={(e) => {
|
|
61
|
+
* const org = organizations?.find(o => o.id === e.target.value);
|
|
62
|
+
* if (org) switchOrganization(org);
|
|
63
|
+
* }}
|
|
64
|
+
* >
|
|
65
|
+
* {organizations?.map(org => (
|
|
66
|
+
* <option key={org.id} value={org.id}>
|
|
67
|
+
* {org.name}
|
|
68
|
+
* </option>
|
|
69
|
+
* ))}
|
|
70
|
+
* </select>
|
|
71
|
+
* <button onClick={revalidateMyOrganizations}>
|
|
72
|
+
* Refresh Organizations
|
|
73
|
+
* </button>
|
|
74
|
+
* <button onClick={async () => {
|
|
75
|
+
* const fresh = await getOrganizations();
|
|
76
|
+
* console.log('Fresh organizations:', fresh);
|
|
77
|
+
* }}>
|
|
78
|
+
* Get Organizations Manually
|
|
79
|
+
* </button>
|
|
80
|
+
* </div>
|
|
81
|
+
* );
|
|
82
|
+
* }
|
|
83
|
+
*
|
|
84
|
+
* // Switch to a specific organization
|
|
85
|
+
* function SwitchOrgButton() {
|
|
86
|
+
* const {organizations, switchOrganization} = useOrganization();
|
|
87
|
+
*
|
|
88
|
+
* const handleSwitch = (orgId: string) => {
|
|
89
|
+
* const org = organizations?.find(o => o.id === orgId);
|
|
90
|
+
* if (org) {
|
|
91
|
+
* switchOrganization(org);
|
|
92
|
+
* }
|
|
93
|
+
* };
|
|
94
|
+
*
|
|
95
|
+
* return (
|
|
96
|
+
* <button onClick={() => handleSwitch('org-123')}>
|
|
97
|
+
* Switch to Organization
|
|
98
|
+
* </button>
|
|
99
|
+
* );
|
|
100
|
+
* }
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
declare const useOrganization: () => OrganizationContextProps;
|
|
104
|
+
export default useOrganization;
|
|
105
|
+
//# sourceMappingURL=useOrganization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrganization.d.ts","sourceRoot":"","sources":["../../../src/contexts/Organization/useOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAA4B,EAAC,wBAAwB,EAAC,MAAM,uBAAuB,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,QAAA,MAAM,eAAe,QAAO,wBAQ3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|