@asgardeo/react 0.2.3 → 0.3.0

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.
Files changed (147) hide show
  1. package/README.md +108 -6
  2. package/dist/AsgardeoReactClient.d.ts +37 -0
  3. package/dist/__temp__/api.d.ts +229 -0
  4. package/dist/__temp__/models.d.ts +105 -0
  5. package/dist/api/scim2/getMeProfile.d.ts +39 -0
  6. package/dist/api/scim2/getSchemas.d.ts +39 -0
  7. package/dist/api/scim2/updateMeProfile.d.ts +38 -0
  8. package/dist/cjs/index.js +1888 -45111
  9. package/dist/cjs/index.js.map +7 -1
  10. package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +65 -0
  11. package/dist/components/actions/SignInButton/SignInButton.d.ts +46 -0
  12. package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +65 -0
  13. package/dist/components/actions/SignOutButton/SignOutButton.d.ts +44 -0
  14. package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +65 -0
  15. package/dist/components/actions/SignUpButton/SignUpButton.d.ts +45 -0
  16. package/dist/components/control/SignedIn.d.ts +45 -0
  17. package/dist/components/control/SignedOut.d.ts +45 -0
  18. package/dist/components/presentation/User.d.ts +57 -0
  19. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +76 -0
  20. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +49 -0
  21. package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +42 -0
  22. package/dist/components/presentation/UserProfile/UserProfile.d.ts +49 -0
  23. package/dist/{cjs/types/components/SignIn/SignIn.d.ts → components/primitives/Avatar/Avatar.d.ts} +25 -14
  24. package/dist/{esm/types/models/use-on.d.ts → components/primitives/Checkbox/Checkbox.d.ts} +20 -9
  25. package/dist/components/primitives/DatePicker/DatePicker.d.ts +50 -0
  26. package/dist/components/primitives/Popover/Popover.d.ts +59 -0
  27. package/dist/components/primitives/Select/Select.d.ts +60 -0
  28. package/dist/components/primitives/TextField/TextField.d.ts +46 -0
  29. package/dist/contexts/AsgardeoContext.d.ts +56 -0
  30. package/dist/{cjs/types/contexts/i18n-context.d.ts → hooks/useAsgardeo.d.ts} +4 -5
  31. package/dist/hooks/useBrowserUrl.d.ts +47 -0
  32. package/dist/index.d.ts +36 -348
  33. package/dist/index.js +1935 -0
  34. package/dist/index.js.map +7 -0
  35. package/dist/{cjs/types/models/public-models.d.ts → models/config.d.ts} +3 -3
  36. package/dist/{cjs/types/hooks/use-config.d.ts → providers/AsgardeoProvider.d.ts} +7 -5
  37. package/dist/{cjs/types/models/asgardeo-provider-props.d.ts → theme/ThemeContext.d.ts} +8 -7
  38. package/dist/{esm/types/models/asgardeo-provider-props.d.ts → theme/ThemeProvider.d.ts} +7 -7
  39. package/dist/{cjs/types/models/use-on.d.ts → theme/types.d.ts} +22 -12
  40. package/dist/{esm/types/oxygen-ui-react-auth-components/index.d.ts → theme/useTheme.d.ts} +3 -3
  41. package/dist/{cjs/types/models/use-config.d.ts → utils/getMappedUserProfileValue.d.ts} +3 -6
  42. package/dist/utils/getUserProfile.d.ts +59 -0
  43. package/package.json +55 -58
  44. package/dist/cjs/types/components/SignIn/fragments/BasicAuth.d.ts +0 -35
  45. package/dist/cjs/types/components/SignIn/fragments/EmailOtp.d.ts +0 -32
  46. package/dist/cjs/types/components/SignIn/fragments/IdentifierFirst.d.ts +0 -35
  47. package/dist/cjs/types/components/SignIn/fragments/LoginOptionsBox.d.ts +0 -30
  48. package/dist/cjs/types/components/SignIn/fragments/SmsOtp.d.ts +0 -21
  49. package/dist/cjs/types/components/SignIn/fragments/Totp.d.ts +0 -33
  50. package/dist/cjs/types/components/SignInButton/SignInButton.d.ts +0 -29
  51. package/dist/cjs/types/components/SignOutButton/SignOutButton.d.ts +0 -27
  52. package/dist/cjs/types/components/SignedIn/SignedIn.d.ts +0 -29
  53. package/dist/cjs/types/components/SignedOut/SignedOut.d.ts +0 -29
  54. package/dist/cjs/types/components/public-components.d.ts +0 -22
  55. package/dist/cjs/types/contexts/asgardeo-context.d.ts +0 -21
  56. package/dist/cjs/types/contexts/branding-preference-context.d.ts +0 -21
  57. package/dist/cjs/types/hooks/use-authentication.d.ts +0 -27
  58. package/dist/cjs/types/hooks/use-on.d.ts +0 -20
  59. package/dist/cjs/types/hooks/use-translations.d.ts +0 -33
  60. package/dist/cjs/types/index.d.ts +0 -22
  61. package/dist/cjs/types/models/auth-context.d.ts +0 -43
  62. package/dist/cjs/types/models/basic-auth-props.d.ts +0 -29
  63. package/dist/cjs/types/models/branding-preference-provider-props.d.ts +0 -22
  64. package/dist/cjs/types/models/email-otp-props.d.ts +0 -26
  65. package/dist/cjs/types/models/i18n.d.ts +0 -34
  66. package/dist/cjs/types/models/jwt-verify-options.d.ts +0 -25
  67. package/dist/cjs/types/models/login-options-box-props.d.ts +0 -24
  68. package/dist/cjs/types/models/sign-in.d.ts +0 -49
  69. package/dist/cjs/types/models/signed-props.d.ts +0 -22
  70. package/dist/cjs/types/models/totp-props.d.ts +0 -26
  71. package/dist/cjs/types/models/use-authentication.d.ts +0 -29
  72. package/dist/cjs/types/models/use-translations.d.ts +0 -22
  73. package/dist/cjs/types/oxygen-ui-react-auth-components/SignIn/SignIn.d.ts +0 -79
  74. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInAlert/SignInAlert.d.ts +0 -37
  75. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInButton/SignInButton.d.ts +0 -27
  76. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInDivider/SignInDivider.d.ts +0 -26
  77. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInFooter/SignInFooter.d.ts +0 -29
  78. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInImage/SignInImage.d.ts +0 -23
  79. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInLink/SignInLink.d.ts +0 -25
  80. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInPaper/SignInPaper.d.ts +0 -26
  81. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInPinInput/SignInPinInput.d.ts +0 -30
  82. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInTextField/SignInTextField.d.ts +0 -26
  83. package/dist/cjs/types/oxygen-ui-react-auth-components/SignInTypography/SignInTypography.d.ts +0 -32
  84. package/dist/cjs/types/oxygen-ui-react-auth-components/index.d.ts +0 -19
  85. package/dist/cjs/types/oxygen-ui-react-auth-components/models/component.d.ts +0 -27
  86. package/dist/cjs/types/providers/AsgardeoProvider.d.ts +0 -34
  87. package/dist/cjs/types/providers/BrandingPreferenceProvider.d.ts +0 -32
  88. package/dist/cjs/types/providers/I18nProvider.d.ts +0 -33
  89. package/dist/cjs/types/theme/generate-theme-sign-in.d.ts +0 -28
  90. package/dist/cjs/types/theme/generate-theme.d.ts +0 -30
  91. package/dist/cjs/types/utils/crypto-utils.d.ts +0 -52
  92. package/dist/cjs/types/utils/session-store.d.ts +0 -25
  93. package/dist/esm/index.js +0 -45151
  94. package/dist/esm/index.js.map +0 -1
  95. package/dist/esm/types/components/SignIn/SignIn.d.ts +0 -31
  96. package/dist/esm/types/components/SignIn/fragments/BasicAuth.d.ts +0 -35
  97. package/dist/esm/types/components/SignIn/fragments/EmailOtp.d.ts +0 -32
  98. package/dist/esm/types/components/SignIn/fragments/IdentifierFirst.d.ts +0 -35
  99. package/dist/esm/types/components/SignIn/fragments/LoginOptionsBox.d.ts +0 -30
  100. package/dist/esm/types/components/SignIn/fragments/SmsOtp.d.ts +0 -21
  101. package/dist/esm/types/components/SignIn/fragments/Totp.d.ts +0 -33
  102. package/dist/esm/types/components/SignInButton/SignInButton.d.ts +0 -29
  103. package/dist/esm/types/components/SignOutButton/SignOutButton.d.ts +0 -27
  104. package/dist/esm/types/components/SignedIn/SignedIn.d.ts +0 -29
  105. package/dist/esm/types/components/SignedOut/SignedOut.d.ts +0 -29
  106. package/dist/esm/types/components/public-components.d.ts +0 -22
  107. package/dist/esm/types/contexts/asgardeo-context.d.ts +0 -21
  108. package/dist/esm/types/contexts/branding-preference-context.d.ts +0 -21
  109. package/dist/esm/types/contexts/i18n-context.d.ts +0 -21
  110. package/dist/esm/types/hooks/use-authentication.d.ts +0 -27
  111. package/dist/esm/types/hooks/use-config.d.ts +0 -23
  112. package/dist/esm/types/hooks/use-on.d.ts +0 -20
  113. package/dist/esm/types/hooks/use-translations.d.ts +0 -33
  114. package/dist/esm/types/index.d.ts +0 -22
  115. package/dist/esm/types/models/auth-context.d.ts +0 -43
  116. package/dist/esm/types/models/basic-auth-props.d.ts +0 -29
  117. package/dist/esm/types/models/branding-preference-provider-props.d.ts +0 -22
  118. package/dist/esm/types/models/email-otp-props.d.ts +0 -26
  119. package/dist/esm/types/models/i18n.d.ts +0 -34
  120. package/dist/esm/types/models/jwt-verify-options.d.ts +0 -25
  121. package/dist/esm/types/models/login-options-box-props.d.ts +0 -24
  122. package/dist/esm/types/models/public-models.d.ts +0 -19
  123. package/dist/esm/types/models/sign-in.d.ts +0 -49
  124. package/dist/esm/types/models/signed-props.d.ts +0 -22
  125. package/dist/esm/types/models/totp-props.d.ts +0 -26
  126. package/dist/esm/types/models/use-authentication.d.ts +0 -29
  127. package/dist/esm/types/models/use-config.d.ts +0 -22
  128. package/dist/esm/types/models/use-translations.d.ts +0 -22
  129. package/dist/esm/types/oxygen-ui-react-auth-components/SignIn/SignIn.d.ts +0 -79
  130. package/dist/esm/types/oxygen-ui-react-auth-components/SignInAlert/SignInAlert.d.ts +0 -37
  131. package/dist/esm/types/oxygen-ui-react-auth-components/SignInButton/SignInButton.d.ts +0 -27
  132. package/dist/esm/types/oxygen-ui-react-auth-components/SignInDivider/SignInDivider.d.ts +0 -26
  133. package/dist/esm/types/oxygen-ui-react-auth-components/SignInFooter/SignInFooter.d.ts +0 -29
  134. package/dist/esm/types/oxygen-ui-react-auth-components/SignInImage/SignInImage.d.ts +0 -23
  135. package/dist/esm/types/oxygen-ui-react-auth-components/SignInLink/SignInLink.d.ts +0 -25
  136. package/dist/esm/types/oxygen-ui-react-auth-components/SignInPaper/SignInPaper.d.ts +0 -26
  137. package/dist/esm/types/oxygen-ui-react-auth-components/SignInPinInput/SignInPinInput.d.ts +0 -30
  138. package/dist/esm/types/oxygen-ui-react-auth-components/SignInTextField/SignInTextField.d.ts +0 -26
  139. package/dist/esm/types/oxygen-ui-react-auth-components/SignInTypography/SignInTypography.d.ts +0 -32
  140. package/dist/esm/types/oxygen-ui-react-auth-components/models/component.d.ts +0 -27
  141. package/dist/esm/types/providers/AsgardeoProvider.d.ts +0 -34
  142. package/dist/esm/types/providers/BrandingPreferenceProvider.d.ts +0 -32
  143. package/dist/esm/types/providers/I18nProvider.d.ts +0 -33
  144. package/dist/esm/types/theme/generate-theme-sign-in.d.ts +0 -28
  145. package/dist/esm/types/theme/generate-theme.d.ts +0 -30
  146. package/dist/esm/types/utils/crypto-utils.d.ts +0 -52
  147. package/dist/esm/types/utils/session-store.d.ts +0 -25
@@ -1,31 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
3
- *
4
- * WSO2 LLC. licenses this file to you under the Apache License,
5
- * Version 2.0 (the "License"); you may not use this file except
6
- * in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing,
12
- * software distributed under the License is distributed on an
13
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- * KIND, either express or implied. See the License for the
15
- * specific language governing permissions and limitations
16
- * under the License.
17
- */
18
- import { FC } from 'react';
19
- import { SignInProps } from '../../models/sign-in';
20
- import './sign-in.scss';
21
- /**
22
- * This component provides the sign-in functionality.
23
- *
24
- * @param {SignInProps} props - Props injected to the component.
25
- * @param {BrandingProps} props.brandingProps - Branding related props.
26
- * @param {boolean} props.showSignUp - Show sign-up.
27
- *
28
- * @returns {ReactElement} - React element.
29
- */
30
- declare const SignIn: FC<SignInProps>;
31
- export default SignIn;
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { PropsWithChildren, ReactElement } from 'react';
19
- import BasicAuthProps from '../../../models/basic-auth-props';
20
- import './basic-auth.scss';
21
- /**
22
- * This component renders the basic authentication form.
23
- *
24
- * @param {BasicAuthProps} props - Props injected to the basic authentication component.
25
- * @param {BrandingProps} props.brandingProps - Branding props.
26
- * @param {Function} props.handleAuthenticate - Callback to handle authentication.
27
- * @param {Authenticator} props.authenticator - Authenticator.
28
- * @param {AlertType} props.alert - Alert type.
29
- * @param {ReactElement[]} props.renderLoginOptions - Login options.
30
- * @param {boolean} props.showSelfSignUp - Show self sign up.
31
- *
32
- * @return {ReactElement}
33
- */
34
- declare const BasicAuth: ({ handleAuthenticate, authenticator, children, alert, brandingProps, showSelfSignUp, renderLoginOptions, }: PropsWithChildren<BasicAuthProps>) => ReactElement;
35
- export default BasicAuth;
@@ -1,32 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { PropsWithChildren, ReactElement } from 'react';
19
- import EmailOtpProps from '../../../models/email-otp-props';
20
- import './email-otp.scss';
21
- /**
22
- * Email OTP component.
23
- *
24
- * @param {EmailOtpProps} props - Props injected to the component.
25
- * @param {BrandingProps} props.brandingProps - Branding props.
26
- * @param {Authenticator} props.authenticator - Authenticator.
27
- * @param {Function} props.handleAuthenticate - Callback to handle authentication.
28
- * @param {AlertType} props.alert - Alert type.
29
- * @return {ReactElement}
30
- */
31
- declare const EmailOtp: ({ alert, brandingProps, authenticator, children, handleAuthenticate }: PropsWithChildren<EmailOtpProps>) => ReactElement;
32
- export default EmailOtp;
@@ -1,35 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { PropsWithChildren, ReactElement } from 'react';
19
- import BasicAuthProps from '../../../models/basic-auth-props';
20
- import './basic-auth.scss';
21
- /**
22
- * This component renders the IdentifierFirst authentication form.
23
- *
24
- * @param {IdentifierFirstProps} props - Props injected to the IdentifierFirst authentication component.
25
- * @param {BrandingProps} props.brandingProps - Branding props.
26
- * @param {Function} props.handleAuthenticate - Callback to handle authentication.
27
- * @param {Authenticator} props.authenticator - Authenticator.
28
- * @param {AlertType} props.alert - Alert type.
29
- * @param {ReactElement[]} props.renderLoginOptions - Login options.
30
- * @param {boolean} props.showSelfSignUp - Show self sign up.
31
- *
32
- * @return {ReactElement}
33
- */
34
- declare const IdentifierFirst: ({ handleAuthenticate, authenticator, alert, brandingProps, children, showSelfSignUp, renderLoginOptions, }: PropsWithChildren<BasicAuthProps>) => ReactElement;
35
- export default IdentifierFirst;
@@ -1,30 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { ReactElement } from 'react';
19
- import LoginOptionsBoxProps from '../../../models/login-options-box-props';
20
- /**
21
- * This component renders the login options box.
22
- *
23
- * @param {LoginOptionsBoxProps} props - Props injected to the component.
24
- * @param {string} props.socialName - Name of the social login.
25
- * @param {string} props.displayName - Display name of the social login.
26
- * @param {Function} props.handleOnClick - On click handler.
27
- * @return {ReactElement}
28
- */
29
- declare const LoginOptionsBox: ({ isAuthLoading, socialName, displayName, handleOnClick, }: LoginOptionsBoxProps) => ReactElement;
30
- export default LoginOptionsBox;
@@ -1,21 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { PropsWithChildren, ReactElement } from 'react';
19
- import EmailOtpProps from '../../../models/email-otp-props';
20
- declare const SmsOtp: ({ alert, brandingProps, authenticator, children, handleAuthenticate, }: PropsWithChildren<EmailOtpProps>) => ReactElement;
21
- export default SmsOtp;
@@ -1,33 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { ReactElement, PropsWithChildren } from 'react';
19
- import TotpProps from '../../../models/totp-props';
20
- import './totp.scss';
21
- /**
22
- * This component renders the TOTP authentication screen.
23
- *
24
- * @param {TotpProps} props - Props injected to the component.
25
- * @param {AlertType} props.alert - Alert type.
26
- * @param {string} props.authenticator - Authenticator.
27
- * @param {BrandingProps} props.brandingProps - Branding props.
28
- * @param {Function} props.handleAuthenticate - Callback to handle authentication.
29
- *
30
- * @return {ReactElement}
31
- */
32
- declare const Totp: ({ brandingProps, authenticator, children, handleAuthenticate, alert, }: PropsWithChildren<TotpProps>) => ReactElement;
33
- export default Totp;
@@ -1,29 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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 { ReactElement } from 'react';
19
- import './sign-in-button.scss';
20
- import { SignInButtonProps } from '../../models/sign-in';
21
- /**
22
- * SignInButton component. This button will render a modal with the SignIn component when clicked.
23
- *
24
- * @param {Object} props - Component props.
25
- * @param {ReactElement} props.customComponent - Optional custom component to be rendered.
26
- * @returns {ReactElement} Rendered SignInButton component.
27
- */
28
- declare const SignInButton: (props: SignInButtonProps) => ReactElement;
29
- export default SignInButton;
@@ -1,27 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). All Rights Reserved.
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 { ReactElement } from 'react';
19
- /**
20
- * SignOutButton component.
21
- *
22
- * This component renders a sign out button. When clicked, it triggers the sign out process.
23
- *
24
- * @returns {ReactElement} Rendered SignOutButton component.
25
- */
26
- declare const SignOutButton: () => ReactElement;
27
- export default SignOutButton;
@@ -1,29 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 SignedProps from '../../models/signed-props';
20
- /**
21
- * This component renders its children if the user is signed out.
22
- *
23
- * @param {PropsWithChildren<SignedProps>} props - Props injected to the component.
24
- * @param {ReactElement} props.fallback - Fallback element to render.
25
- *
26
- * @return {JSX.Element}
27
- */
28
- declare const SignedIn: FC<PropsWithChildren<SignedProps>>;
29
- export default SignedIn;
@@ -1,29 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 SignedProps from '../../models/signed-props';
20
- /**
21
- * This component renders its children if the user is signed out.
22
- *
23
- * @param {PropsWithChildren<SignedProps>} props - Props injected to the component.
24
- * @param {ReactElement} props.fallback - Fallback element to render.
25
- *
26
- * @return {JSX.Element}
27
- */
28
- declare const SignedOut: FC<PropsWithChildren<SignedProps>>;
29
- export default SignedOut;
@@ -1,22 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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
- export { default as SignIn } from './SignIn/SignIn';
19
- export { default as SignedIn } from './SignedIn/SignedIn';
20
- export { default as SignedOut } from './SignedOut/SignedOut';
21
- export { default as SignInButton } from './SignInButton/SignInButton';
22
- export { default as SignOutButton } from './SignOutButton/SignOutButton';
@@ -1,21 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { Context } from 'react';
19
- import AuthContext from '../models/auth-context';
20
- declare const AsgardeoContext: Context<AuthContext>;
21
- export default AsgardeoContext;
@@ -1,21 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { Branding } from '@asgardeo/js';
19
- import { Context } from 'react';
20
- declare const BrandingPreferenceContext: Context<Branding>;
21
- export default BrandingPreferenceContext;
@@ -1,21 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { Context } from 'react';
19
- import { I18n } from '../models/i18n';
20
- declare const I18nContext: Context<I18n>;
21
- export default I18nContext;
@@ -1,27 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 UseAuthentication from '../models/use-authentication';
19
- /**
20
- * `useAuthentication` is a custom hook that provides access to the authentication context.
21
- * It returns an object containing the current user, the authentication status, the access token, and a sign out function.
22
- *
23
- * @returns {UseAuthentication} An object containing the current user (`user`), the authentication status (`isAuthenticated`),
24
- * the access token (`accessToken`), and a sign out function (`signOut`).
25
- */
26
- declare const useAuthentication: () => UseAuthentication;
27
- export default useAuthentication;
@@ -1,23 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 UseConfig from '../models/use-config';
19
- /**
20
- * Custom hook to access the authentication configuration from the AsgardeoProviderContext.
21
- * @returns An object containing the authentication configuration.
22
- */
23
- export declare const useConfig: () => UseConfig;
@@ -1,20 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { UseOnProps } from '../models/use-on';
19
- declare const useOn: (props: UseOnProps) => void;
20
- export default useOn;
@@ -1,33 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { SetTranslationsProps } from '../models/i18n';
19
- import UseTranslations from '../models/use-translations';
20
- /**
21
- * `useTranslations` is a custom hook that fetches translations.
22
- * It takes an object of type `SetTranslationsProps` as an argument, which includes the screen type,
23
- * and optional locale and text overrides.
24
- *
25
- * @param {SetTranslationsProps} props - The properties used to fetch the translations.
26
- * @param {ScreenType} props.screen - The screen type for which to fetch translations.
27
- * @param {string} [props.componentLocaleOverride] - Optional locale override.
28
- * @param {BrandingPreferenceTextProps} [props.componentTextOverrides] - Optional text overrides.
29
- *
30
- * @returns {UseTranslations} An object containing the translations (`t`) and a loading state (`isLoading`).
31
- */
32
- declare const useTranslations: (props: SetTranslationsProps) => UseTranslations;
33
- export default useTranslations;
@@ -1,22 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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
- export * from './components/public-components';
19
- export * from './models/public-models';
20
- export { default as AsgardeoProvider } from './providers/AsgardeoProvider';
21
- export { default as useAuthentication } from './hooks/use-authentication';
22
- export { default as useOn } from './hooks/use-on';
@@ -1,43 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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
- /// <reference types="react" />
19
- import { UIAuthConfig, MeAPIResponse, AuthApiResponse } from '@asgardeo/js';
20
- interface AuthContext {
21
- accessToken: string;
22
- authResponse: AuthApiResponse;
23
- config: UIAuthConfig;
24
- isAuthLoading: boolean;
25
- isAuthenticated: boolean | undefined;
26
- isBrandingLoading: boolean;
27
- isComponentLoading: boolean;
28
- isGlobalLoading: boolean;
29
- isTextLoading: boolean;
30
- onSignOutRef: React.MutableRefObject<Function>;
31
- setAuthResponse: (response: AuthApiResponse) => void;
32
- setAuthentication: () => void;
33
- setIsAuthLoading: (value: boolean) => void;
34
- setIsBrandingLoading: (value: boolean) => void;
35
- setIsComponentLoading: (value: boolean) => void;
36
- setIsTextLoading: (value: boolean) => void;
37
- setOnSignIn: (response?: any) => void | Promise<void>;
38
- setOnSignOut: (response?: any) => void | Promise<void>;
39
- setUsername: (username: string) => void;
40
- user: MeAPIResponse;
41
- username: string;
42
- }
43
- export default AuthContext;
@@ -1,29 +0,0 @@
1
- /**
2
- * Copyright (c) 2024, 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 { Authenticator, BrandingProps } from '@asgardeo/js';
19
- import { ReactElement } from 'react';
20
- import { AlertType } from './sign-in';
21
- interface BasicAuthProps {
22
- alert?: AlertType;
23
- authenticator: Authenticator;
24
- brandingProps?: BrandingProps;
25
- handleAuthenticate: Function;
26
- renderLoginOptions?: ReactElement[];
27
- showSelfSignUp: boolean;
28
- }
29
- export default BasicAuthProps;