@asgardeo/react 0.11.3 → 0.13.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.
- package/dist/api/createOrganization.d.ts +5 -1
- package/dist/api/getAllOrganizations.d.ts +5 -1
- package/dist/api/getMeOrganizations.d.ts +5 -1
- package/dist/api/getOrganization.d.ts +5 -1
- package/dist/api/getSchemas.d.ts +5 -1
- package/dist/api/getScim2Me.d.ts +5 -1
- package/dist/api/updateMeProfile.d.ts +5 -1
- package/dist/api/updateOrganization.d.ts +5 -1
- package/dist/cjs/index.js +2257 -1742
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +5 -1
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +5 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +5 -1
- package/dist/components/auth/Callback/Callback.d.ts +51 -0
- package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +3 -0
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +6 -0
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +5 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +5 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +5 -1
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +10 -1
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +39 -0
- package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts +50 -0
- package/dist/contexts/FlowMeta/useFlowMeta.d.ts +20 -0
- package/dist/contexts/Theme/ThemeProvider.d.ts +36 -39
- package/dist/contexts/Theme/v1/ThemeProvider.d.ts +88 -0
- package/dist/contexts/Theme/v2/ThemeProvider.d.ts +57 -0
- package/dist/hooks/useBrowserUrl.d.ts +8 -0
- package/dist/hooks/v2/useOAuthCallback.d.ts +82 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1666 -1149
- package/dist/index.js.map +4 -4
- package/dist/utils/applyThemeToDOM.d.ts +24 -0
- package/dist/utils/normalizeThemeConfig.d.ts +30 -0
- package/dist/utils/oauth.d.ts +24 -0
- package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts +33 -0
- package/package.json +4 -4
|
@@ -0,0 +1,24 @@
|
|
|
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 { Theme } from '@asgardeo/browser';
|
|
19
|
+
/**
|
|
20
|
+
* Writes all CSS custom properties from a resolved `Theme` onto the document root.
|
|
21
|
+
* Called inside a `useEffect` whenever the active theme changes.
|
|
22
|
+
*/
|
|
23
|
+
declare const applyThemeToDOM: (theme: Theme) => void;
|
|
24
|
+
export default applyThemeToDOM;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { RecursivePartial, ThemeConfig } from '@asgardeo/browser';
|
|
19
|
+
/**
|
|
20
|
+
* Normalizes a `RecursivePartial<ThemeConfig>` so that color fields which are
|
|
21
|
+
* supplied as plain CSS color strings are coerced into `{ main: string }`
|
|
22
|
+
* objects before being handed to `createTheme`.
|
|
23
|
+
*
|
|
24
|
+
* Only the color groups that `toCssVariables` in `createTheme` actually reads
|
|
25
|
+
* individual sub-keys from are normalized here (`primary`, `secondary`,
|
|
26
|
+
* `error`, `success`, `warning`, `info`). `border` is left alone because it
|
|
27
|
+
* IS a plain string in `ThemeConfig`.
|
|
28
|
+
*/
|
|
29
|
+
declare const normalizeThemeConfig: (config: RecursivePartial<ThemeConfig> | undefined) => RecursivePartial<ThemeConfig> | undefined;
|
|
30
|
+
export default normalizeThemeConfig;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
/**
|
|
19
|
+
* Initiates OAuth redirect with CSRF protection.
|
|
20
|
+
* Generates random state, stores return path in sessionStorage, and redirects to OAuth provider.
|
|
21
|
+
*
|
|
22
|
+
* @param redirectURL - OAuth authorization URL from the server
|
|
23
|
+
*/
|
|
24
|
+
export declare function initiateOAuthRedirect(redirectURL: string): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { FlowMetaTheme, RecursivePartial, ThemeConfig } from '@asgardeo/browser';
|
|
19
|
+
/**
|
|
20
|
+
* Converts a v2 `FlowMetaTheme` into a `RecursivePartial<ThemeConfig>` that
|
|
21
|
+
* `createTheme` can consume.
|
|
22
|
+
*
|
|
23
|
+
* Only fields explicitly present in the FlowMeta response are included so that
|
|
24
|
+
* `createTheme` can deep-merge them onto its base (light/dark) defaults without
|
|
25
|
+
* accidentally dropping sibling keys that were not returned by the server.
|
|
26
|
+
*
|
|
27
|
+
* For example, when FlowMeta returns only `background.default` and
|
|
28
|
+
* `background.paper`, only `body.main` and `surface` are set — the base
|
|
29
|
+
* theme's `background.disabled` and `background.dark` are **not** overridden
|
|
30
|
+
* and therefore keep their default CSS variable values.
|
|
31
|
+
*/
|
|
32
|
+
declare const buildThemeConfigFromFlowMeta: (flowMetaTheme: FlowMetaTheme, colorScheme: "light" | "dark") => RecursivePartial<ThemeConfig>;
|
|
33
|
+
export default buildThemeConfigFromFlowMeta;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "React implementation of Asgardeo JavaScript SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"asgardeo",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"@testing-library/react": "16.3.0",
|
|
37
37
|
"@types/node": "22.15.3",
|
|
38
38
|
"@types/react": "19.1.5",
|
|
39
|
-
"@wso2/eslint-plugin": "git+https://github.com/brionmario/wso2-ui-configs.git#
|
|
40
|
-
"@wso2/prettier-config": "git+https://github.com/brionmario/wso2-ui-configs.git#
|
|
39
|
+
"@wso2/eslint-plugin": "git+https://github.com/brionmario/wso2-ui-configs.git#d3041825a4f8f235c8f9fa36b55cf29d54e791c8&path:packages/eslint-plugin",
|
|
40
|
+
"@wso2/prettier-config": "git+https://github.com/brionmario/wso2-ui-configs.git#d3041825a4f8f235c8f9fa36b55cf29d54e791c8&path:packages/prettier-config",
|
|
41
41
|
"esbuild-plugin-preserve-directives": "0.0.11",
|
|
42
42
|
"eslint": "8.57.0",
|
|
43
43
|
"jsdom": "26.1.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"react-dom": "19.1.4",
|
|
60
60
|
"tslib": "2.8.1",
|
|
61
61
|
"@asgardeo/i18n": "0.4.2",
|
|
62
|
-
"@asgardeo/browser": "0.
|
|
62
|
+
"@asgardeo/browser": "0.3.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|