@asgardeo/react 0.13.0 → 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2421 -1778
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +7 -1
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.d.ts +79 -0
- package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.styles.d.ts +20 -0
- package/dist/components/presentation/LanguageSwitcher/LanguageSwitcher.d.ts +77 -0
- package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +7 -1
- package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +7 -1
- package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +7 -0
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +7 -1
- package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +7 -1
- package/dist/components/presentation/auth/AuthOptionFactory.d.ts +14 -1
- package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +7 -1
- package/dist/components/presentation/auth/SignIn/SignIn.d.ts +5 -0
- package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +7 -1
- package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +7 -1
- package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +7 -1
- package/dist/{utils/v2/resolveTranslation.d.ts → components/primitives/Icons/ArrowLeftRight.d.ts} +11 -9
- package/dist/components/primitives/Icons/flowIconRegistry.d.ts +28 -0
- package/dist/components/primitives/Icons/index.d.ts +1 -0
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +13 -0
- package/dist/contexts/FlowMeta/FlowMetaContext.d.ts +5 -0
- package/dist/contexts/I18n/ComponentPreferencesContext.d.ts +26 -0
- package/dist/contexts/I18n/I18nContext.d.ts +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1604 -947
- package/dist/index.js.map +4 -4
- package/dist/utils/v2/flowTransformer.d.ts +3 -3
- package/dist/utils/v2/resolveTranslationsInArray.d.ts +4 -2
- package/dist/utils/v2/resolveTranslationsInObject.d.ts +5 -3
- package/package.json +4 -3
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* This transformer is used by both SignIn and SignUp v2 components to ensure
|
|
41
41
|
* consistent response handling across all embedded flows.
|
|
42
42
|
*/
|
|
43
|
-
import { EmbeddedFlowComponentV2 as EmbeddedFlowComponent } from '@asgardeo/browser';
|
|
43
|
+
import { EmbeddedFlowComponentV2 as EmbeddedFlowComponent, FlowMetadataResponse } from '@asgardeo/browser';
|
|
44
44
|
import { UseTranslation } from '../../hooks/useTranslation';
|
|
45
45
|
/**
|
|
46
46
|
* Generic flow error response interface that covers common error structure
|
|
@@ -81,7 +81,7 @@ export interface FlowTransformOptions {
|
|
|
81
81
|
* @param resolveTranslations - Whether to resolve translation strings or keep them as i18n keys (default: true)
|
|
82
82
|
* @returns Array of flow components with resolved or unresolved translations
|
|
83
83
|
*/
|
|
84
|
-
export declare const transformComponents: (response: any, t: UseTranslation["t"], resolveTranslations?: boolean) => EmbeddedFlowComponent[];
|
|
84
|
+
export declare const transformComponents: (response: any, t: UseTranslation["t"], resolveTranslations?: boolean, meta?: FlowMetadataResponse | null) => EmbeddedFlowComponent[];
|
|
85
85
|
/**
|
|
86
86
|
* Extract error message from flow error response.
|
|
87
87
|
* Supports any flow error response that follows the standard structure.
|
|
@@ -113,7 +113,7 @@ export declare const checkForErrorResponse: (response: any, t: UseTranslation["t
|
|
|
113
113
|
* @returns Normalized flow response with flowId and transformed components
|
|
114
114
|
* @throws {any} The original response if it's an error and throwOnError is true
|
|
115
115
|
*/
|
|
116
|
-
export declare const normalizeFlowResponse: (response: any, t: UseTranslation["t"], options?: FlowTransformOptions) => {
|
|
116
|
+
export declare const normalizeFlowResponse: (response: any, t: UseTranslation["t"], options?: FlowTransformOptions, meta?: FlowMetadataResponse | null) => {
|
|
117
117
|
components: EmbeddedFlowComponent[];
|
|
118
118
|
flowId: string;
|
|
119
119
|
};
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { FlowMetadataResponse } from '@asgardeo/browser';
|
|
18
19
|
import { UseTranslation } from '../../hooks/useTranslation';
|
|
19
20
|
/**
|
|
20
|
-
* Recursively resolves translation strings in an array of objects.
|
|
21
|
+
* Recursively resolves translation and meta template strings in an array of objects.
|
|
21
22
|
* @param items - Array of objects to process
|
|
22
23
|
* @param t - The translation function from useTranslation
|
|
23
24
|
* @param properties - Array of property names to resolve (optional)
|
|
25
|
+
* @param meta - Optional flow metadata for resolving meta() expressions
|
|
24
26
|
* @returns A new array with resolved translations
|
|
25
27
|
*/
|
|
26
|
-
declare const resolveTranslationsInArray: <T extends Record<string, any>>(items: T[], t: UseTranslation["t"], properties?: string[]) => T[];
|
|
28
|
+
declare const resolveTranslationsInArray: <T extends Record<string, any>>(items: T[], t: UseTranslation["t"], properties?: string[], meta?: FlowMetadataResponse | null) => T[];
|
|
27
29
|
export default resolveTranslationsInArray;
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { FlowMetadataResponse } from '@asgardeo/browser';
|
|
18
19
|
import { UseTranslation } from '../../hooks/useTranslation';
|
|
19
20
|
/**
|
|
20
|
-
* Resolves
|
|
21
|
+
* Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.
|
|
21
22
|
* @param obj - The object to process
|
|
22
23
|
* @param t - The translation function from useTranslation
|
|
23
24
|
* @param properties - Array of property names to resolve (optional, defaults to common properties)
|
|
24
|
-
* @
|
|
25
|
+
* @param meta - Optional flow metadata for resolving meta() expressions
|
|
26
|
+
* @returns A new object with resolved template strings
|
|
25
27
|
*/
|
|
26
|
-
export declare const resolveTranslationsInObject: <T extends Record<string, any>>(obj: T, t: UseTranslation["t"], properties?: string[]) => T;
|
|
28
|
+
export declare const resolveTranslationsInObject: <T extends Record<string, any>>(obj: T, t: UseTranslation["t"], properties?: string[], meta?: FlowMetadataResponse | null) => T;
|
|
27
29
|
export default resolveTranslationsInObject;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "React implementation of Asgardeo JavaScript SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"asgardeo",
|
|
@@ -55,11 +55,12 @@
|
|
|
55
55
|
"@emotion/css": "11.13.5",
|
|
56
56
|
"@floating-ui/react": "0.27.12",
|
|
57
57
|
"@types/react-dom": "19.1.5",
|
|
58
|
+
"dompurify": "3.3.1",
|
|
58
59
|
"esbuild": "0.25.9",
|
|
59
60
|
"react-dom": "19.1.4",
|
|
60
61
|
"tslib": "2.8.1",
|
|
61
|
-
"@asgardeo/
|
|
62
|
-
"@asgardeo/
|
|
62
|
+
"@asgardeo/browser": "0.4.2",
|
|
63
|
+
"@asgardeo/i18n": "0.4.3"
|
|
63
64
|
},
|
|
64
65
|
"publishConfig": {
|
|
65
66
|
"access": "public"
|