@asgardeo/vue 0.3.10 → 0.4.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/README.md +2 -32
- package/dist/api/updateMeProfile.d.ts +25 -0
- package/dist/api/updateMeProfile.d.ts.map +1 -0
- package/dist/cjs/index.js +1437 -774
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/auth/sign-in/AuthOptionFactory.d.ts.map +1 -0
- package/dist/components/auth/sign-in/AuthOptionFactoryCore.d.ts.map +1 -0
- package/dist/components/auth/sign-in/BaseSignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-in/SignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v1/BaseSignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v1/SignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v1/options/SignInOptionFactory.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v2/AuthOptionFactory.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v2/BaseSignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-in/v2/SignIn.d.ts.map +1 -0
- package/dist/components/auth/sign-up/BaseSignUp.d.ts.map +1 -0
- package/dist/components/auth/sign-up/SignUp.d.ts.map +1 -0
- package/dist/components/auth/sign-up/v1/BaseSignUp.d.ts.map +1 -0
- package/dist/components/auth/sign-up/v1/SignUp.d.ts.map +1 -0
- package/dist/components/auth/sign-up/v1/options/SignUpOptionFactory.d.ts.map +1 -0
- package/dist/components/auth/sign-up/v2/BaseSignUp.d.ts.map +1 -0
- package/dist/components/auth/sign-up/v2/SignUp.d.ts.map +1 -0
- package/dist/components/{control → presentation}/organization/Organization.d.ts +1 -1
- package/dist/components/presentation/organization/Organization.d.ts.map +1 -0
- package/dist/components/{control → presentation}/user/User.d.ts +2 -2
- package/dist/components/presentation/user/User.d.ts.map +1 -0
- package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts +28 -3
- package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts +18 -8
- package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts.map +1 -1
- package/dist/components/presentation/user-dropdown/UserDropdown.d.ts +20 -2
- package/dist/components/presentation/user-dropdown/UserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/user-profile/BaseUserProfile.d.ts +9 -17
- package/dist/components/presentation/user-profile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/user-profile/UserProfile.css.d.ts +9 -0
- package/dist/components/presentation/user-profile/UserProfile.css.d.ts.map +1 -1
- package/dist/components/presentation/user-profile/UserProfile.d.ts.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1391 -721
- package/dist/index.js.map +4 -4
- package/dist/models/contexts.d.ts +2 -0
- package/dist/models/contexts.d.ts.map +1 -1
- package/dist/providers/AsgardeoProvider.d.ts.map +1 -1
- package/dist/providers/UserProvider.d.ts.map +1 -1
- package/dist/utils/getDisplayName.d.ts +23 -0
- package/dist/utils/getDisplayName.d.ts.map +1 -0
- package/dist/utils/getMappedUserProfileValue.d.ts +21 -0
- package/dist/utils/getMappedUserProfileValue.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/components/control/organization/Organization.d.ts.map +0 -1
- package/dist/components/control/user/User.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/AuthOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/AuthOptionFactoryCore.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/BaseSignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/SignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v1/BaseSignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v1/SignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v1/options/SignInOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v2/AuthOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v2/BaseSignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-in/v2/SignIn.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/BaseSignUp.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/SignUp.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/v1/BaseSignUp.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/v1/SignUp.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/v1/options/SignUpOptionFactory.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/v2/BaseSignUp.d.ts.map +0 -1
- package/dist/components/presentation/sign-up/v2/SignUp.d.ts.map +0 -1
- /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactory.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/AuthOptionFactoryCore.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/BaseSignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/SignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v1/BaseSignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v1/SignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v1/options/SignInOptionFactory.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v2/AuthOptionFactory.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v2/BaseSignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-in/v2/SignIn.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/BaseSignUp.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/SignUp.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/v1/BaseSignUp.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/v1/SignUp.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/v1/options/SignUpOptionFactory.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/v2/BaseSignUp.d.ts +0 -0
- /package/dist/components/{presentation → auth}/sign-up/v2/SignUp.d.ts +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -37,7 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
ArrowLeftRightIcon: () => ArrowLeftRightIcon,
|
|
38
38
|
AsgardeoPlugin: () => AsgardeoPlugin_default,
|
|
39
39
|
AsgardeoProvider: () => AsgardeoProvider_default,
|
|
40
|
-
AsgardeoRuntimeError: () =>
|
|
40
|
+
AsgardeoRuntimeError: () => import_browser79.AsgardeoRuntimeError,
|
|
41
41
|
AsgardeoVueClient: () => AsgardeoVueClient_default,
|
|
42
42
|
BRANDING_KEY: () => BRANDING_KEY,
|
|
43
43
|
BaseAcceptInvite: () => BaseAcceptInvite_default,
|
|
@@ -67,19 +67,19 @@ __export(index_exports, {
|
|
|
67
67
|
CreateOrganization: () => CreateOrganization_default,
|
|
68
68
|
DatePicker: () => DatePicker_default,
|
|
69
69
|
Divider: () => Divider_default,
|
|
70
|
-
EmbeddedFlowActionVariant: () =>
|
|
71
|
-
EmbeddedFlowComponentType: () =>
|
|
72
|
-
EmbeddedFlowEventType: () =>
|
|
73
|
-
EmbeddedFlowTextVariant: () =>
|
|
74
|
-
EmbeddedSignInFlowStatus: () =>
|
|
75
|
-
EmbeddedSignInFlowType: () =>
|
|
70
|
+
EmbeddedFlowActionVariant: () => import_browser79.EmbeddedFlowActionVariantV2,
|
|
71
|
+
EmbeddedFlowComponentType: () => import_browser79.EmbeddedFlowComponentTypeV2,
|
|
72
|
+
EmbeddedFlowEventType: () => import_browser79.EmbeddedFlowEventTypeV2,
|
|
73
|
+
EmbeddedFlowTextVariant: () => import_browser79.EmbeddedFlowTextVariantV2,
|
|
74
|
+
EmbeddedSignInFlowStatus: () => import_browser79.EmbeddedSignInFlowStatusV2,
|
|
75
|
+
EmbeddedSignInFlowType: () => import_browser79.EmbeddedSignInFlowTypeV2,
|
|
76
76
|
EyeIcon: () => EyeIcon,
|
|
77
77
|
EyeOffIcon: () => EyeOffIcon,
|
|
78
78
|
FLOW_KEY: () => FLOW_KEY,
|
|
79
79
|
FLOW_META_KEY: () => FLOW_META_KEY,
|
|
80
80
|
FacebookButton: () => FacebookButton_default,
|
|
81
81
|
FieldFactory: () => FieldFactory_default,
|
|
82
|
-
FieldType: () =>
|
|
82
|
+
FieldType: () => import_browser78.FieldType,
|
|
83
83
|
FlowMetaProvider: () => FlowMetaProvider_default,
|
|
84
84
|
FlowProvider: () => FlowProvider_default,
|
|
85
85
|
GitHubButton: () => GitHubButton_default,
|
|
@@ -95,7 +95,7 @@ __export(index_exports, {
|
|
|
95
95
|
Logo: () => Logo_default,
|
|
96
96
|
MicrosoftButton: () => MicrosoftButton_default,
|
|
97
97
|
ORGANIZATION_KEY: () => ORGANIZATION_KEY,
|
|
98
|
-
|
|
98
|
+
Organization: () => Organization_default,
|
|
99
99
|
OrganizationList: () => OrganizationList_default,
|
|
100
100
|
OrganizationProfile: () => OrganizationProfile_default,
|
|
101
101
|
OrganizationProvider: () => OrganizationProvider_default,
|
|
@@ -119,7 +119,7 @@ __export(index_exports, {
|
|
|
119
119
|
TriangleAlertIcon: () => TriangleAlertIcon,
|
|
120
120
|
Typography: () => Typography_default,
|
|
121
121
|
USER_KEY: () => USER_KEY,
|
|
122
|
-
|
|
122
|
+
User: () => User_default,
|
|
123
123
|
UserDropdown: () => UserDropdown_default,
|
|
124
124
|
UserIcon: () => UserIcon,
|
|
125
125
|
UserProfile: () => UserProfile_default,
|
|
@@ -128,17 +128,17 @@ __export(index_exports, {
|
|
|
128
128
|
buildThemeConfigFromFlowMeta: () => buildThemeConfigFromFlowMeta_default,
|
|
129
129
|
createAsgardeoGuard: () => createAsgardeoGuard,
|
|
130
130
|
createCallbackRoute: () => createCallbackRoute,
|
|
131
|
-
createClassObserver: () =>
|
|
131
|
+
createClassObserver: () => import_browser77.createClassObserver,
|
|
132
132
|
createField: () => createField,
|
|
133
|
-
createMediaQueryListener: () =>
|
|
134
|
-
detectThemeMode: () =>
|
|
135
|
-
getActiveTheme: () =>
|
|
133
|
+
createMediaQueryListener: () => import_browser77.createMediaQueryListener,
|
|
134
|
+
detectThemeMode: () => import_browser77.detectThemeMode,
|
|
135
|
+
getActiveTheme: () => import_browser76.getActiveTheme,
|
|
136
136
|
getAuthComponentHeadings: () => getAuthComponentHeadings_default,
|
|
137
|
-
handleWebAuthnAuthentication: () =>
|
|
138
|
-
hasAuthParamsInUrl: () =>
|
|
139
|
-
http: () =>
|
|
137
|
+
handleWebAuthnAuthentication: () => import_browser72.handleWebAuthnAuthentication,
|
|
138
|
+
hasAuthParamsInUrl: () => import_browser73.hasAuthParamsInUrl,
|
|
139
|
+
http: () => import_browser75.http,
|
|
140
140
|
initiateOAuthRedirect: () => initiateOAuthRedirect,
|
|
141
|
-
navigate: () =>
|
|
141
|
+
navigate: () => import_browser74.navigate,
|
|
142
142
|
useAsgardeo: () => useAsgardeo_default,
|
|
143
143
|
useBranding: () => useBranding_default,
|
|
144
144
|
useFlow: () => useFlow_default,
|
|
@@ -924,17 +924,13 @@ var import_vue7 = require("vue");
|
|
|
924
924
|
var UserProvider = (0, import_vue7.defineComponent)({
|
|
925
925
|
name: "UserProvider",
|
|
926
926
|
props: {
|
|
927
|
-
/**
|
|
928
|
-
flattenedProfile: { default: null, type: Object },
|
|
929
|
-
/** Optional callback run after the profile is updated locally. */
|
|
927
|
+
/** Callback to sync a successfully-saved profile back up to AsgardeoProvider. */
|
|
930
928
|
onUpdateProfile: { default: void 0, type: Function },
|
|
931
929
|
/** The full user profile data (nested + flat + schemas). */
|
|
932
930
|
profile: { default: null, type: Object },
|
|
933
931
|
/** Re-fetch the user profile from the server. */
|
|
934
932
|
revalidateProfile: { default: async () => {
|
|
935
933
|
}, type: Function },
|
|
936
|
-
/** The SCIM2 schemas describing user profile attributes. */
|
|
937
|
-
schemas: { default: null, type: Array },
|
|
938
934
|
/** Update the user profile via SCIM2 PATCH. */
|
|
939
935
|
updateProfile: {
|
|
940
936
|
default: void 0,
|
|
@@ -942,11 +938,13 @@ var UserProvider = (0, import_vue7.defineComponent)({
|
|
|
942
938
|
}
|
|
943
939
|
},
|
|
944
940
|
setup(props, { slots }) {
|
|
945
|
-
const flattenedProfileRef = (0, import_vue7.computed)(() => props.flattenedProfile);
|
|
946
941
|
const profileRef = (0, import_vue7.computed)(() => props.profile);
|
|
947
|
-
const
|
|
942
|
+
const flattenedProfileRef = (0, import_vue7.computed)(() => props.profile?.flattenedProfile ?? null);
|
|
943
|
+
const schemasRef = (0, import_vue7.computed)(() => props.profile?.schemas ?? null);
|
|
948
944
|
const context = {
|
|
949
945
|
flattenedProfile: flattenedProfileRef,
|
|
946
|
+
onUpdateProfile: props.onUpdateProfile ?? (() => {
|
|
947
|
+
}),
|
|
950
948
|
profile: profileRef,
|
|
951
949
|
revalidateProfile: props.revalidateProfile,
|
|
952
950
|
schemas: schemasRef,
|
|
@@ -1662,8 +1660,6 @@ var AsgardeoProvider = (0, import_vue8.defineComponent)({
|
|
|
1662
1660
|
const currentOrganization = (0, import_vue8.shallowRef)(null);
|
|
1663
1661
|
const myOrganizations = (0, import_vue8.shallowRef)([]);
|
|
1664
1662
|
const userProfile = (0, import_vue8.shallowRef)(null);
|
|
1665
|
-
const flattenedProfile = (0, import_vue8.shallowRef)(null);
|
|
1666
|
-
const schemas = (0, import_vue8.shallowRef)([]);
|
|
1667
1663
|
const resolvedBaseUrl = (0, import_vue8.ref)(props.baseUrl);
|
|
1668
1664
|
let isUpdatingSession = false;
|
|
1669
1665
|
let signInCheckInterval;
|
|
@@ -1700,6 +1696,12 @@ var AsgardeoProvider = (0, import_vue8.defineComponent)({
|
|
|
1700
1696
|
if (config.platform === import_browser13.Platform.AsgardeoV2) {
|
|
1701
1697
|
const claims = (0, import_browser13.extractUserClaimsFromIdToken)(decodedToken);
|
|
1702
1698
|
user.value = claims;
|
|
1699
|
+
const profileData = {
|
|
1700
|
+
flattenedProfile: claims,
|
|
1701
|
+
profile: claims,
|
|
1702
|
+
schemas: []
|
|
1703
|
+
};
|
|
1704
|
+
userProfile.value = profileData;
|
|
1703
1705
|
} else {
|
|
1704
1706
|
try {
|
|
1705
1707
|
const fetchedUser = await asgardeo.getUser({ baseUrl });
|
|
@@ -1719,8 +1721,6 @@ var AsgardeoProvider = (0, import_vue8.defineComponent)({
|
|
|
1719
1721
|
try {
|
|
1720
1722
|
const profileData = await asgardeo.getUserProfile({ baseUrl });
|
|
1721
1723
|
userProfile.value = profileData;
|
|
1722
|
-
flattenedProfile.value = profileData.flattenedProfile || null;
|
|
1723
|
-
schemas.value = profileData.schemas || [];
|
|
1724
1724
|
} catch {
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
@@ -1940,19 +1940,42 @@ var AsgardeoProvider = (0, import_vue8.defineComponent)({
|
|
|
1940
1940
|
default: () => (0, import_vue8.h)(
|
|
1941
1941
|
UserProvider_default,
|
|
1942
1942
|
{
|
|
1943
|
-
|
|
1943
|
+
onUpdateProfile: (updatedUser) => {
|
|
1944
|
+
user.value = updatedUser;
|
|
1945
|
+
userProfile.value = {
|
|
1946
|
+
flattenedProfile: (0, import_browser13.generateFlattenedUserProfile)(
|
|
1947
|
+
updatedUser,
|
|
1948
|
+
userProfile.value?.schemas
|
|
1949
|
+
),
|
|
1950
|
+
profile: updatedUser,
|
|
1951
|
+
schemas: userProfile.value?.schemas ?? []
|
|
1952
|
+
};
|
|
1953
|
+
},
|
|
1944
1954
|
profile: userProfile.value,
|
|
1945
1955
|
revalidateProfile: async () => {
|
|
1946
|
-
const
|
|
1956
|
+
const revalConfig = buildConfig();
|
|
1957
|
+
if (revalConfig.platform === import_browser13.Platform.AsgardeoV2) {
|
|
1958
|
+
try {
|
|
1959
|
+
const decodedToken = await asgardeo.getDecodedIdToken();
|
|
1960
|
+
const claims = (0, import_browser13.extractUserClaimsFromIdToken)(decodedToken);
|
|
1961
|
+
user.value = claims;
|
|
1962
|
+
userProfile.value = {
|
|
1963
|
+
flattenedProfile: claims,
|
|
1964
|
+
profile: claims,
|
|
1965
|
+
schemas: []
|
|
1966
|
+
};
|
|
1967
|
+
} catch {
|
|
1968
|
+
}
|
|
1969
|
+
return;
|
|
1970
|
+
}
|
|
1947
1971
|
try {
|
|
1948
|
-
const profileData = await asgardeo.getUserProfile({
|
|
1972
|
+
const profileData = await asgardeo.getUserProfile({
|
|
1973
|
+
baseUrl: resolvedBaseUrl.value
|
|
1974
|
+
});
|
|
1949
1975
|
userProfile.value = profileData;
|
|
1950
|
-
flattenedProfile.value = profileData.flattenedProfile || null;
|
|
1951
|
-
schemas.value = profileData.schemas || [];
|
|
1952
1976
|
} catch {
|
|
1953
1977
|
}
|
|
1954
|
-
}
|
|
1955
|
-
schemas: schemas.value
|
|
1978
|
+
}
|
|
1956
1979
|
},
|
|
1957
1980
|
{
|
|
1958
1981
|
default: () => (0, import_vue8.h)(
|
|
@@ -2699,68 +2722,90 @@ var USER_DROPDOWN_CSS = `
|
|
|
2699
2722
|
font-family: var(--asgardeo-typography-fontFamily);
|
|
2700
2723
|
}
|
|
2701
2724
|
|
|
2702
|
-
/* Trigger
|
|
2725
|
+
/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2703
2726
|
|
|
2704
2727
|
.asgardeo-user-dropdown__trigger {
|
|
2705
2728
|
display: inline-flex;
|
|
2706
2729
|
align-items: center;
|
|
2707
|
-
gap: calc(var(--asgardeo-spacing-unit) * 0.
|
|
2708
|
-
padding:
|
|
2709
|
-
calc(var(--asgardeo-spacing-unit) * 0.5) calc(var(--asgardeo-spacing-unit) * 0.5);
|
|
2730
|
+
gap: calc(var(--asgardeo-spacing-unit) * 0.5);
|
|
2731
|
+
padding: 3px;
|
|
2710
2732
|
background: none;
|
|
2711
|
-
border:
|
|
2712
|
-
border-radius:
|
|
2733
|
+
border: 2px solid transparent;
|
|
2734
|
+
border-radius: var(--asgardeo-border-radius-full);
|
|
2713
2735
|
cursor: pointer;
|
|
2714
2736
|
color: var(--asgardeo-color-text-primary);
|
|
2715
|
-
font-family: var(--asgardeo-typography-fontFamily);
|
|
2716
|
-
font-size: var(--asgardeo-typography-fontSize-md);
|
|
2717
2737
|
transition:
|
|
2718
|
-
background-color var(--asgardeo-transition-fast),
|
|
2719
2738
|
border-color var(--asgardeo-transition-fast),
|
|
2720
2739
|
box-shadow var(--asgardeo-transition-fast);
|
|
2721
2740
|
box-sizing: border-box;
|
|
2741
|
+
outline: none;
|
|
2722
2742
|
}
|
|
2723
2743
|
|
|
2724
2744
|
.asgardeo-user-dropdown__trigger:hover {
|
|
2725
|
-
background-color: var(--asgardeo-color-action-hover);
|
|
2726
2745
|
border-color: var(--asgardeo-color-primary-main);
|
|
2727
2746
|
}
|
|
2728
2747
|
|
|
2748
|
+
.asgardeo-user-dropdown__trigger--open {
|
|
2749
|
+
border-color: var(--asgardeo-color-primary-main);
|
|
2750
|
+
box-shadow: 0 0 0 3px var(--asgardeo-focus-ring-color);
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2729
2753
|
.asgardeo-user-dropdown__trigger:focus-visible {
|
|
2730
|
-
|
|
2754
|
+
border-color: var(--asgardeo-color-primary-main);
|
|
2731
2755
|
box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);
|
|
2732
2756
|
}
|
|
2733
2757
|
|
|
2734
|
-
/*
|
|
2758
|
+
/* \u2500\u2500 Trigger avatar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2735
2759
|
|
|
2736
2760
|
.asgardeo-user-dropdown__avatar {
|
|
2737
2761
|
display: flex;
|
|
2738
2762
|
align-items: center;
|
|
2739
2763
|
justify-content: center;
|
|
2740
|
-
width:
|
|
2741
|
-
height:
|
|
2764
|
+
width: 32px;
|
|
2765
|
+
height: 32px;
|
|
2742
2766
|
border-radius: 50%;
|
|
2743
|
-
|
|
2744
|
-
color: var(--asgardeo-color-primary-contrastText);
|
|
2767
|
+
color: #ffffff;
|
|
2745
2768
|
flex-shrink: 0;
|
|
2746
2769
|
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
2747
|
-
font-weight: var(--asgardeo-typography-fontWeight-
|
|
2770
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
2771
|
+
line-height: 1;
|
|
2772
|
+
user-select: none;
|
|
2773
|
+
pointer-events: none;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2776
|
+
/* sm \u2014 28 px */
|
|
2777
|
+
.asgardeo-user-dropdown__avatar--sm {
|
|
2778
|
+
width: 28px;
|
|
2779
|
+
height: 28px;
|
|
2780
|
+
font-size: var(--asgardeo-typography-fontSize-xs);
|
|
2748
2781
|
}
|
|
2749
2782
|
|
|
2750
|
-
/*
|
|
2783
|
+
/* lg \u2014 38 px */
|
|
2784
|
+
.asgardeo-user-dropdown__avatar--lg {
|
|
2785
|
+
width: 38px;
|
|
2786
|
+
height: 38px;
|
|
2787
|
+
font-size: var(--asgardeo-typography-fontSize-md);
|
|
2788
|
+
}
|
|
2751
2789
|
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2790
|
+
/* \u2500\u2500 Chevron \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2791
|
+
|
|
2792
|
+
.asgardeo-user-dropdown__chevron {
|
|
2793
|
+
display: inline-flex;
|
|
2794
|
+
align-items: center;
|
|
2795
|
+
color: var(--asgardeo-color-text-secondary);
|
|
2796
|
+
transition: transform var(--asgardeo-transition-normal);
|
|
2797
|
+
padding-right: calc(var(--asgardeo-spacing-unit) * 0.25);
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
.asgardeo-user-dropdown__trigger--open .asgardeo-user-dropdown__chevron {
|
|
2801
|
+
transform: rotate(180deg);
|
|
2757
2802
|
}
|
|
2758
2803
|
|
|
2759
|
-
/* Dropdown menu
|
|
2804
|
+
/* \u2500\u2500 Dropdown menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2760
2805
|
|
|
2761
2806
|
.asgardeo-user-dropdown__menu {
|
|
2762
2807
|
position: absolute;
|
|
2763
|
-
top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.
|
|
2808
|
+
top: calc(100% + calc(var(--asgardeo-spacing-unit) * 0.75));
|
|
2764
2809
|
right: 0;
|
|
2765
2810
|
z-index: 1000;
|
|
2766
2811
|
background-color: var(--asgardeo-color-background-surface);
|
|
@@ -2768,20 +2813,141 @@ var USER_DROPDOWN_CSS = `
|
|
|
2768
2813
|
border-radius: var(--asgardeo-dropdown-borderRadius);
|
|
2769
2814
|
box-shadow: var(--asgardeo-dropdown-shadow);
|
|
2770
2815
|
overflow: hidden;
|
|
2771
|
-
min-width:
|
|
2816
|
+
min-width: 220px;
|
|
2772
2817
|
display: flex;
|
|
2773
2818
|
flex-direction: column;
|
|
2774
|
-
|
|
2819
|
+
animation: asgardeo-dropdown-enter var(--asgardeo-transition-fast) ease;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
/* Alignment */
|
|
2823
|
+
|
|
2824
|
+
.asgardeo-user-dropdown__menu--align-left {
|
|
2825
|
+
right: auto;
|
|
2826
|
+
left: 0;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
/* Size: sm */
|
|
2830
|
+
|
|
2831
|
+
.asgardeo-user-dropdown__menu--size-sm {
|
|
2832
|
+
min-width: 180px;
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header {
|
|
2836
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 1.5);
|
|
2837
|
+
gap: calc(var(--asgardeo-spacing-unit) * 1);
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__menu-header-avatar {
|
|
2841
|
+
width: 30px;
|
|
2842
|
+
height: 30px;
|
|
2843
|
+
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
.asgardeo-user-dropdown__menu--size-sm .asgardeo-user-dropdown__item {
|
|
2847
|
+
padding: calc(var(--asgardeo-spacing-unit) * 0.75) calc(var(--asgardeo-spacing-unit) * 1.5);
|
|
2848
|
+
font-size: var(--asgardeo-typography-fontSize-xs);
|
|
2849
|
+
}
|
|
2850
|
+
|
|
2851
|
+
/* Size: lg */
|
|
2852
|
+
|
|
2853
|
+
.asgardeo-user-dropdown__menu--size-lg {
|
|
2854
|
+
min-width: 280px;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header {
|
|
2858
|
+
padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);
|
|
2859
|
+
gap: calc(var(--asgardeo-spacing-unit) * 1.5);
|
|
2860
|
+
}
|
|
2861
|
+
|
|
2862
|
+
.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__menu-header-avatar {
|
|
2863
|
+
width: 42px;
|
|
2864
|
+
height: 42px;
|
|
2865
|
+
font-size: var(--asgardeo-typography-fontSize-lg);
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
.asgardeo-user-dropdown__menu--size-lg .asgardeo-user-dropdown__item {
|
|
2869
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1.25) calc(var(--asgardeo-spacing-unit) * 2);
|
|
2870
|
+
font-size: var(--asgardeo-typography-fontSize-md);
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2873
|
+
@keyframes asgardeo-dropdown-enter {
|
|
2874
|
+
from {
|
|
2875
|
+
opacity: 0;
|
|
2876
|
+
transform: translateY(-6px) scale(0.97);
|
|
2877
|
+
}
|
|
2878
|
+
to {
|
|
2879
|
+
opacity: 1;
|
|
2880
|
+
transform: translateY(0) scale(1);
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/* \u2500\u2500 Menu header (user identity) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2885
|
+
|
|
2886
|
+
.asgardeo-user-dropdown__menu-header {
|
|
2887
|
+
display: flex;
|
|
2888
|
+
align-items: center;
|
|
2889
|
+
gap: calc(var(--asgardeo-spacing-unit) * 1.25);
|
|
2890
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 1.75);
|
|
2891
|
+
}
|
|
2892
|
+
|
|
2893
|
+
.asgardeo-user-dropdown__menu-header-avatar {
|
|
2894
|
+
display: flex;
|
|
2895
|
+
align-items: center;
|
|
2896
|
+
justify-content: center;
|
|
2897
|
+
width: 36px;
|
|
2898
|
+
height: 36px;
|
|
2899
|
+
border-radius: 50%;
|
|
2900
|
+
color: #ffffff;
|
|
2901
|
+
flex-shrink: 0;
|
|
2902
|
+
font-size: var(--asgardeo-typography-fontSize-md);
|
|
2903
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
2904
|
+
line-height: 1;
|
|
2905
|
+
user-select: none;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
.asgardeo-user-dropdown__menu-header-info {
|
|
2909
|
+
display: flex;
|
|
2910
|
+
flex-direction: column;
|
|
2911
|
+
gap: 2px;
|
|
2912
|
+
min-width: 0;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
.asgardeo-user-dropdown__menu-header-name {
|
|
2916
|
+
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
2917
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
2918
|
+
color: var(--asgardeo-color-text-primary);
|
|
2919
|
+
white-space: nowrap;
|
|
2920
|
+
overflow: hidden;
|
|
2921
|
+
text-overflow: ellipsis;
|
|
2922
|
+
line-height: var(--asgardeo-typography-lineHeight-tight);
|
|
2923
|
+
}
|
|
2924
|
+
|
|
2925
|
+
.asgardeo-user-dropdown__menu-header-subtitle {
|
|
2926
|
+
font-size: var(--asgardeo-typography-fontSize-xs);
|
|
2927
|
+
color: var(--asgardeo-color-text-secondary);
|
|
2928
|
+
white-space: nowrap;
|
|
2929
|
+
overflow: hidden;
|
|
2930
|
+
text-overflow: ellipsis;
|
|
2931
|
+
line-height: var(--asgardeo-typography-lineHeight-normal);
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
/* \u2500\u2500 Menu divider \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2935
|
+
|
|
2936
|
+
.asgardeo-user-dropdown__menu-divider {
|
|
2937
|
+
height: 1px;
|
|
2938
|
+
background-color: var(--asgardeo-color-border);
|
|
2939
|
+
margin: calc(var(--asgardeo-spacing-unit) * 0.5) 0;
|
|
2940
|
+
flex-shrink: 0;
|
|
2775
2941
|
}
|
|
2776
2942
|
|
|
2777
|
-
/* Menu items
|
|
2943
|
+
/* \u2500\u2500 Menu items \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2778
2944
|
|
|
2779
2945
|
.asgardeo-user-dropdown__item {
|
|
2780
2946
|
display: flex;
|
|
2781
2947
|
align-items: center;
|
|
2782
|
-
gap: calc(var(--asgardeo-spacing-unit) *
|
|
2948
|
+
gap: calc(var(--asgardeo-spacing-unit) * 1);
|
|
2783
2949
|
width: 100%;
|
|
2784
|
-
padding: var(--asgardeo-
|
|
2950
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 1.75);
|
|
2785
2951
|
background: none;
|
|
2786
2952
|
border: none;
|
|
2787
2953
|
cursor: pointer;
|
|
@@ -2802,36 +2968,61 @@ var USER_DROPDOWN_CSS = `
|
|
|
2802
2968
|
background-color: var(--asgardeo-color-action-focus);
|
|
2803
2969
|
}
|
|
2804
2970
|
|
|
2805
|
-
/*
|
|
2971
|
+
/* Danger variant (sign-out) */
|
|
2972
|
+
|
|
2973
|
+
.asgardeo-user-dropdown__item--danger {
|
|
2974
|
+
color: var(--asgardeo-color-error-main);
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
.asgardeo-user-dropdown__item--danger:hover {
|
|
2978
|
+
background-color: var(--asgardeo-color-error-light);
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2981
|
+
/* \u2500\u2500 Modal overlay \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2806
2982
|
|
|
2807
2983
|
.asgardeo-user-dropdown__modal-overlay {
|
|
2808
2984
|
position: fixed;
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
right: 0;
|
|
2812
|
-
bottom: 0;
|
|
2813
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
2985
|
+
inset: 0;
|
|
2986
|
+
background-color: rgba(0, 0, 0, 0.45);
|
|
2814
2987
|
display: flex;
|
|
2815
2988
|
align-items: center;
|
|
2816
2989
|
justify-content: center;
|
|
2817
2990
|
z-index: 9999;
|
|
2818
|
-
backdrop-filter: blur(
|
|
2991
|
+
backdrop-filter: blur(3px);
|
|
2992
|
+
animation: asgardeo-overlay-enter var(--asgardeo-transition-fast) ease;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
@keyframes asgardeo-overlay-enter {
|
|
2996
|
+
from { opacity: 0; }
|
|
2997
|
+
to { opacity: 1; }
|
|
2819
2998
|
}
|
|
2820
2999
|
|
|
2821
|
-
/* Modal content
|
|
3000
|
+
/* \u2500\u2500 Modal content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2822
3001
|
|
|
2823
3002
|
.asgardeo-user-dropdown__modal-content {
|
|
2824
3003
|
background: var(--asgardeo-color-background-surface);
|
|
2825
|
-
border-radius: var(--asgardeo-border-radius-
|
|
3004
|
+
border-radius: var(--asgardeo-border-radius-large);
|
|
2826
3005
|
box-shadow: var(--asgardeo-shadow-large);
|
|
2827
|
-
max-width:
|
|
2828
|
-
width:
|
|
3006
|
+
max-width: 480px;
|
|
3007
|
+
width: 92%;
|
|
2829
3008
|
max-height: 90vh;
|
|
2830
3009
|
overflow-y: auto;
|
|
2831
3010
|
position: relative;
|
|
3011
|
+
animation: asgardeo-modal-enter var(--asgardeo-transition-normal) ease;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
@keyframes asgardeo-modal-enter {
|
|
3015
|
+
from {
|
|
3016
|
+
opacity: 0;
|
|
3017
|
+
transform: translateY(12px) scale(0.97);
|
|
3018
|
+
}
|
|
3019
|
+
to {
|
|
3020
|
+
opacity: 1;
|
|
3021
|
+
transform: translateY(0) scale(1);
|
|
3022
|
+
}
|
|
2832
3023
|
}
|
|
2833
3024
|
|
|
2834
|
-
/* Modal close button
|
|
3025
|
+
/* \u2500\u2500 Modal close button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2835
3026
|
|
|
2836
3027
|
.asgardeo-user-dropdown__modal-close {
|
|
2837
3028
|
position: absolute;
|
|
@@ -2844,7 +3035,7 @@ var USER_DROPDOWN_CSS = `
|
|
|
2844
3035
|
display: flex;
|
|
2845
3036
|
align-items: center;
|
|
2846
3037
|
justify-content: center;
|
|
2847
|
-
padding: calc(var(--asgardeo-spacing-unit) * 0.
|
|
3038
|
+
padding: calc(var(--asgardeo-spacing-unit) * 0.625);
|
|
2848
3039
|
border-radius: var(--asgardeo-border-radius-small);
|
|
2849
3040
|
z-index: 10001;
|
|
2850
3041
|
transition:
|
|
@@ -2868,74 +3059,154 @@ var UserDropdown_css_default = USER_DROPDOWN_CSS;
|
|
|
2868
3059
|
// src/components/presentation/user-profile/UserProfile.css.ts
|
|
2869
3060
|
var USER_PROFILE_CSS = `
|
|
2870
3061
|
/* ============================================================
|
|
2871
|
-
UserProfile
|
|
3062
|
+
UserProfile (modern redesign)
|
|
2872
3063
|
============================================================ */
|
|
2873
3064
|
|
|
2874
3065
|
.asgardeo-user-profile {
|
|
2875
3066
|
display: flex;
|
|
2876
3067
|
flex-direction: column;
|
|
2877
3068
|
min-width: 320px;
|
|
2878
|
-
padding: 0;
|
|
2879
3069
|
overflow: hidden;
|
|
3070
|
+
font-family: var(--asgardeo-typography-fontFamily);
|
|
2880
3071
|
}
|
|
2881
3072
|
|
|
2882
|
-
/* Header
|
|
3073
|
+
/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2883
3074
|
|
|
2884
3075
|
.asgardeo-user-profile__header {
|
|
2885
|
-
|
|
2886
|
-
|
|
3076
|
+
display: flex;
|
|
3077
|
+
align-items: center;
|
|
3078
|
+
justify-content: space-between;
|
|
3079
|
+
padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2.5)
|
|
3080
|
+
calc(var(--asgardeo-spacing-unit) * 1.75);
|
|
2887
3081
|
}
|
|
2888
3082
|
|
|
2889
3083
|
.asgardeo-user-profile__title {
|
|
2890
3084
|
margin: 0;
|
|
3085
|
+
font-size: var(--asgardeo-typography-fontSize-md);
|
|
3086
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
3087
|
+
color: var(--asgardeo-color-text-primary);
|
|
3088
|
+
letter-spacing: var(--asgardeo-typography-letterSpacing-tight);
|
|
2891
3089
|
}
|
|
2892
3090
|
|
|
2893
3091
|
.asgardeo-user-profile__header-divider {
|
|
2894
3092
|
margin: 0;
|
|
2895
3093
|
}
|
|
2896
3094
|
|
|
2897
|
-
/*
|
|
3095
|
+
/* \u2500\u2500 Hero (avatar + name + subtitle) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2898
3096
|
|
|
2899
|
-
.asgardeo-user-
|
|
3097
|
+
.asgardeo-user-profile__hero {
|
|
2900
3098
|
display: flex;
|
|
2901
|
-
|
|
2902
|
-
|
|
3099
|
+
flex-direction: column;
|
|
3100
|
+
align-items: center;
|
|
3101
|
+
padding: calc(var(--asgardeo-spacing-unit) * 3) calc(var(--asgardeo-spacing-unit) * 2.5)
|
|
3102
|
+
calc(var(--asgardeo-spacing-unit) * 2);
|
|
3103
|
+
gap: calc(var(--asgardeo-spacing-unit) * 1.25);
|
|
3104
|
+
background: linear-gradient(
|
|
3105
|
+
180deg,
|
|
3106
|
+
var(--asgardeo-color-primary-light) 0%,
|
|
3107
|
+
var(--asgardeo-color-background-surface) 100%
|
|
3108
|
+
);
|
|
3109
|
+
border-bottom: 1px solid var(--asgardeo-color-border);
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
.asgardeo-user-profile__avatar-wrapper {
|
|
3113
|
+
position: relative;
|
|
3114
|
+
border-radius: 50%;
|
|
3115
|
+
padding: 3px;
|
|
3116
|
+
background: linear-gradient(
|
|
3117
|
+
135deg,
|
|
3118
|
+
var(--asgardeo-color-primary-main),
|
|
3119
|
+
var(--asgardeo-color-primary-dark)
|
|
3120
|
+
);
|
|
3121
|
+
box-shadow: 0 4px 14px rgba(75, 110, 245, 0.28);
|
|
2903
3122
|
}
|
|
2904
3123
|
|
|
2905
3124
|
.asgardeo-user-profile__avatar {
|
|
2906
|
-
width: var(--asgardeo-avatar-size);
|
|
2907
|
-
height: var(--asgardeo-avatar-size);
|
|
3125
|
+
width: var(--asgardeo-avatar-size, 72px);
|
|
3126
|
+
height: var(--asgardeo-avatar-size, 72px);
|
|
2908
3127
|
border-radius: 50%;
|
|
2909
3128
|
display: flex;
|
|
2910
3129
|
align-items: center;
|
|
2911
3130
|
justify-content: center;
|
|
2912
3131
|
flex-shrink: 0;
|
|
3132
|
+
border: 2px solid var(--asgardeo-color-background-surface);
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
/* Avatar size variants */
|
|
3136
|
+
|
|
3137
|
+
.asgardeo-user-profile__avatar--sm {
|
|
3138
|
+
width: 48px;
|
|
3139
|
+
height: 48px;
|
|
3140
|
+
}
|
|
3141
|
+
|
|
3142
|
+
.asgardeo-user-profile__avatar--sm .asgardeo-user-profile__avatar-initials {
|
|
3143
|
+
font-size: 1rem;
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3146
|
+
.asgardeo-user-profile__avatar--md {
|
|
3147
|
+
width: 64px;
|
|
3148
|
+
height: 64px;
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
.asgardeo-user-profile__avatar--md .asgardeo-user-profile__avatar-initials {
|
|
3152
|
+
font-size: 1.25rem;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
.asgardeo-user-profile__avatar--lg {
|
|
3156
|
+
width: 80px;
|
|
3157
|
+
height: 80px;
|
|
3158
|
+
}
|
|
3159
|
+
|
|
3160
|
+
.asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {
|
|
3161
|
+
font-size: 1.625rem;
|
|
2913
3162
|
}
|
|
2914
3163
|
|
|
2915
3164
|
.asgardeo-user-profile__avatar-initials {
|
|
2916
3165
|
color: #ffffff;
|
|
2917
|
-
font-
|
|
2918
|
-
font-weight: 600;
|
|
3166
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
2919
3167
|
line-height: 1;
|
|
2920
3168
|
letter-spacing: 0.02em;
|
|
2921
3169
|
pointer-events: none;
|
|
2922
3170
|
user-select: none;
|
|
2923
3171
|
}
|
|
2924
3172
|
|
|
2925
|
-
|
|
3173
|
+
.asgardeo-user-profile__hero-info {
|
|
3174
|
+
display: flex;
|
|
3175
|
+
flex-direction: column;
|
|
3176
|
+
align-items: center;
|
|
3177
|
+
gap: calc(var(--asgardeo-spacing-unit) * 0.375);
|
|
3178
|
+
text-align: center;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
.asgardeo-user-profile__hero-name {
|
|
3182
|
+
font-size: var(--asgardeo-typography-fontSize-lg);
|
|
3183
|
+
font-weight: var(--asgardeo-typography-fontWeight-semibold);
|
|
3184
|
+
color: var(--asgardeo-color-text-primary);
|
|
3185
|
+
line-height: var(--asgardeo-typography-lineHeight-tight);
|
|
3186
|
+
letter-spacing: var(--asgardeo-typography-letterSpacing-tight);
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
.asgardeo-user-profile__hero-subtitle {
|
|
3190
|
+
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
3191
|
+
color: var(--asgardeo-color-text-secondary);
|
|
3192
|
+
line-height: var(--asgardeo-typography-lineHeight-normal);
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
/* \u2500\u2500 Alerts & loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2926
3196
|
|
|
2927
3197
|
.asgardeo-user-profile__error {
|
|
2928
|
-
margin:
|
|
3198
|
+
margin: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5)
|
|
3199
|
+
calc(var(--asgardeo-spacing-unit) * 0.5);
|
|
2929
3200
|
}
|
|
2930
3201
|
|
|
2931
3202
|
.asgardeo-user-profile__loading {
|
|
2932
3203
|
display: flex;
|
|
2933
3204
|
align-items: center;
|
|
2934
3205
|
justify-content: center;
|
|
2935
|
-
padding: calc(var(--asgardeo-spacing-unit) * 3) 0;
|
|
3206
|
+
padding: calc(var(--asgardeo-spacing-unit) * 3.5) 0;
|
|
2936
3207
|
}
|
|
2937
3208
|
|
|
2938
|
-
/* Fields
|
|
3209
|
+
/* \u2500\u2500 Fields \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2939
3210
|
|
|
2940
3211
|
.asgardeo-user-profile__fields {
|
|
2941
3212
|
display: flex;
|
|
@@ -2944,9 +3215,9 @@ var USER_PROFILE_CSS = `
|
|
|
2944
3215
|
|
|
2945
3216
|
.asgardeo-user-profile__field {
|
|
2946
3217
|
display: grid;
|
|
2947
|
-
grid-template-columns:
|
|
2948
|
-
align-items:
|
|
2949
|
-
padding: calc(var(--asgardeo-spacing-unit) * 1.
|
|
3218
|
+
grid-template-columns: 38% 62%;
|
|
3219
|
+
align-items: start;
|
|
3220
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);
|
|
2950
3221
|
gap: calc(var(--asgardeo-spacing-unit) * 0.75);
|
|
2951
3222
|
box-sizing: border-box;
|
|
2952
3223
|
transition: background-color var(--asgardeo-transition-fast);
|
|
@@ -2960,17 +3231,11 @@ var USER_PROFILE_CSS = `
|
|
|
2960
3231
|
border-top: 1px solid var(--asgardeo-color-border);
|
|
2961
3232
|
}
|
|
2962
3233
|
|
|
2963
|
-
.asgardeo-user-profile__field-label-col {
|
|
2964
|
-
/* label column */
|
|
2965
|
-
}
|
|
2966
|
-
|
|
2967
3234
|
.asgardeo-user-profile__field-label {
|
|
2968
3235
|
color: var(--asgardeo-color-text-secondary);
|
|
2969
3236
|
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
.asgardeo-user-profile__field-value-col {
|
|
2973
|
-
/* value column */
|
|
3237
|
+
font-weight: var(--asgardeo-typography-fontWeight-medium);
|
|
3238
|
+
padding-top: 2px;
|
|
2974
3239
|
}
|
|
2975
3240
|
|
|
2976
3241
|
.asgardeo-user-profile__field-display {
|
|
@@ -2990,16 +3255,22 @@ var USER_PROFILE_CSS = `
|
|
|
2990
3255
|
|
|
2991
3256
|
.asgardeo-user-profile__field-placeholder {
|
|
2992
3257
|
color: var(--asgardeo-color-primary-main);
|
|
2993
|
-
font-style: italic;
|
|
2994
3258
|
font-size: var(--asgardeo-typography-fontSize-sm);
|
|
3259
|
+
font-style: italic;
|
|
2995
3260
|
flex: 1;
|
|
2996
3261
|
cursor: pointer;
|
|
2997
3262
|
text-decoration: underline;
|
|
2998
3263
|
text-decoration-style: dotted;
|
|
2999
3264
|
text-underline-offset: 2px;
|
|
3265
|
+
opacity: 0.8;
|
|
3266
|
+
transition: opacity var(--asgardeo-transition-fast);
|
|
3000
3267
|
}
|
|
3001
3268
|
|
|
3002
|
-
|
|
3269
|
+
.asgardeo-user-profile__field-placeholder:hover {
|
|
3270
|
+
opacity: 1;
|
|
3271
|
+
}
|
|
3272
|
+
|
|
3273
|
+
/* \u2500\u2500 Edit button (pencil) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3003
3274
|
|
|
3004
3275
|
.asgardeo-user-profile__field-edit-btn {
|
|
3005
3276
|
display: inline-flex;
|
|
@@ -3035,12 +3306,13 @@ var USER_PROFILE_CSS = `
|
|
|
3035
3306
|
box-shadow: 0 0 0 var(--asgardeo-focus-ring-width) var(--asgardeo-focus-ring-color);
|
|
3036
3307
|
}
|
|
3037
3308
|
|
|
3038
|
-
/* Edit mode
|
|
3309
|
+
/* \u2500\u2500 Edit mode \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3039
3310
|
|
|
3040
3311
|
.asgardeo-user-profile__field-edit {
|
|
3041
3312
|
display: flex;
|
|
3042
3313
|
flex-direction: column;
|
|
3043
3314
|
gap: calc(var(--asgardeo-spacing-unit) * 0.75);
|
|
3315
|
+
padding: calc(var(--asgardeo-spacing-unit) * 0.25) 0;
|
|
3044
3316
|
}
|
|
3045
3317
|
|
|
3046
3318
|
.asgardeo-user-profile__field-edit-actions {
|
|
@@ -3049,12 +3321,35 @@ var USER_PROFILE_CSS = `
|
|
|
3049
3321
|
gap: calc(var(--asgardeo-spacing-unit) * 0.75);
|
|
3050
3322
|
}
|
|
3051
3323
|
|
|
3052
|
-
/* Footer slot
|
|
3324
|
+
/* \u2500\u2500 Footer slot \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3053
3325
|
|
|
3054
3326
|
.asgardeo-user-profile__footer {
|
|
3055
3327
|
padding: calc(var(--asgardeo-spacing-unit) * 1.5) calc(var(--asgardeo-spacing-unit) * 2.5);
|
|
3056
3328
|
border-top: 1px solid var(--asgardeo-color-border);
|
|
3057
3329
|
}
|
|
3330
|
+
|
|
3331
|
+
/* \u2500\u2500 Compact modifier \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3332
|
+
|
|
3333
|
+
.asgardeo-user-profile--compact .asgardeo-user-profile__hero {
|
|
3334
|
+
padding: calc(var(--asgardeo-spacing-unit) * 2) calc(var(--asgardeo-spacing-unit) * 2);
|
|
3335
|
+
}
|
|
3336
|
+
|
|
3337
|
+
.asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg {
|
|
3338
|
+
width: 56px;
|
|
3339
|
+
height: 56px;
|
|
3340
|
+
}
|
|
3341
|
+
|
|
3342
|
+
.asgardeo-user-profile--compact .asgardeo-user-profile__avatar--lg .asgardeo-user-profile__avatar-initials {
|
|
3343
|
+
font-size: 1.125rem;
|
|
3344
|
+
}
|
|
3345
|
+
|
|
3346
|
+
.asgardeo-user-profile--compact .asgardeo-user-profile__field {
|
|
3347
|
+
padding: calc(var(--asgardeo-spacing-unit) * 1) calc(var(--asgardeo-spacing-unit) * 2);
|
|
3348
|
+
}
|
|
3349
|
+
|
|
3350
|
+
.asgardeo-user-profile--compact .asgardeo-user-profile__hero-name {
|
|
3351
|
+
font-size: var(--asgardeo-typography-fontSize-md);
|
|
3352
|
+
}
|
|
3058
3353
|
`;
|
|
3059
3354
|
var UserProfile_css_default = USER_PROFILE_CSS;
|
|
3060
3355
|
|
|
@@ -5617,114 +5912,24 @@ var Callback = (0, import_vue39.defineComponent)({
|
|
|
5617
5912
|
});
|
|
5618
5913
|
var Callback_default = Callback;
|
|
5619
5914
|
|
|
5620
|
-
// src/components/
|
|
5621
|
-
var
|
|
5622
|
-
var
|
|
5623
|
-
name: "SignedIn",
|
|
5624
|
-
setup(_props, { slots }) {
|
|
5625
|
-
const { isSignedIn } = useAsgardeo_default();
|
|
5626
|
-
return () => {
|
|
5627
|
-
if (!isSignedIn.value) {
|
|
5628
|
-
const fallbackContent = slots["fallback"]?.();
|
|
5629
|
-
return fallbackContent ? (0, import_vue40.h)(import_vue40.Fragment, {}, fallbackContent) : null;
|
|
5630
|
-
}
|
|
5631
|
-
const defaultContent = slots["default"]?.();
|
|
5632
|
-
return defaultContent ? (0, import_vue40.h)(import_vue40.Fragment, {}, defaultContent) : null;
|
|
5633
|
-
};
|
|
5634
|
-
}
|
|
5635
|
-
});
|
|
5636
|
-
var SignedIn_default = SignedIn;
|
|
5915
|
+
// src/components/auth/sign-in/SignIn.ts
|
|
5916
|
+
var import_browser44 = require("@asgardeo/browser");
|
|
5917
|
+
var import_vue51 = require("vue");
|
|
5637
5918
|
|
|
5638
|
-
// src/components/
|
|
5639
|
-
var
|
|
5640
|
-
var SignedOut = (0, import_vue41.defineComponent)({
|
|
5641
|
-
name: "SignedOut",
|
|
5642
|
-
setup(_props, { slots }) {
|
|
5643
|
-
const { isSignedIn } = useAsgardeo_default();
|
|
5644
|
-
return () => {
|
|
5645
|
-
if (isSignedIn.value) {
|
|
5646
|
-
const fallbackContent = slots["fallback"]?.();
|
|
5647
|
-
return fallbackContent ? (0, import_vue41.h)(import_vue41.Fragment, {}, fallbackContent) : null;
|
|
5648
|
-
}
|
|
5649
|
-
const defaultContent = slots["default"]?.();
|
|
5650
|
-
return defaultContent ? (0, import_vue41.h)(import_vue41.Fragment, {}, defaultContent) : null;
|
|
5651
|
-
};
|
|
5652
|
-
}
|
|
5653
|
-
});
|
|
5654
|
-
var SignedOut_default = SignedOut;
|
|
5655
|
-
|
|
5656
|
-
// src/components/control/Loading.ts
|
|
5657
|
-
var import_vue42 = require("vue");
|
|
5658
|
-
var Loading = (0, import_vue42.defineComponent)({
|
|
5659
|
-
name: "Loading",
|
|
5660
|
-
setup(_props, { slots }) {
|
|
5661
|
-
const { isLoading } = useAsgardeo_default();
|
|
5662
|
-
return () => {
|
|
5663
|
-
if (!isLoading.value) {
|
|
5664
|
-
const fallbackContent = slots["fallback"]?.();
|
|
5665
|
-
return fallbackContent ? (0, import_vue42.h)(import_vue42.Fragment, {}, fallbackContent) : null;
|
|
5666
|
-
}
|
|
5667
|
-
const defaultContent = slots["default"]?.();
|
|
5668
|
-
return defaultContent ? (0, import_vue42.h)(import_vue42.Fragment, {}, defaultContent) : null;
|
|
5669
|
-
};
|
|
5670
|
-
}
|
|
5671
|
-
});
|
|
5672
|
-
var Loading_default = Loading;
|
|
5673
|
-
|
|
5674
|
-
// src/components/control/user/User.ts
|
|
5675
|
-
var import_vue43 = require("vue");
|
|
5676
|
-
var User5 = (0, import_vue43.defineComponent)({
|
|
5677
|
-
name: "User",
|
|
5678
|
-
setup(_props, { slots }) {
|
|
5679
|
-
const { user } = useAsgardeo_default();
|
|
5680
|
-
return () => {
|
|
5681
|
-
if (!user.value) {
|
|
5682
|
-
const fallbackContent = slots["fallback"]?.();
|
|
5683
|
-
return fallbackContent ? (0, import_vue43.h)(import_vue43.Fragment, {}, fallbackContent) : null;
|
|
5684
|
-
}
|
|
5685
|
-
const defaultContent = slots["default"]?.({ user: user.value });
|
|
5686
|
-
return defaultContent ? (0, import_vue43.h)(import_vue43.Fragment, {}, defaultContent) : null;
|
|
5687
|
-
};
|
|
5688
|
-
}
|
|
5689
|
-
});
|
|
5690
|
-
var User_default = User5;
|
|
5691
|
-
|
|
5692
|
-
// src/components/control/organization/Organization.ts
|
|
5693
|
-
var import_vue44 = require("vue");
|
|
5694
|
-
var Organization5 = (0, import_vue44.defineComponent)({
|
|
5695
|
-
name: "Organization",
|
|
5696
|
-
setup(_props, { slots }) {
|
|
5697
|
-
const { currentOrganization } = useOrganization_default();
|
|
5698
|
-
return () => {
|
|
5699
|
-
if (!currentOrganization?.value) {
|
|
5700
|
-
const fallbackContent = slots["fallback"]?.();
|
|
5701
|
-
return fallbackContent ? (0, import_vue44.h)(import_vue44.Fragment, {}, fallbackContent) : null;
|
|
5702
|
-
}
|
|
5703
|
-
const defaultContent = slots["default"]?.({ organization: currentOrganization.value });
|
|
5704
|
-
return defaultContent ? (0, import_vue44.h)(import_vue44.Fragment, {}, defaultContent) : null;
|
|
5705
|
-
};
|
|
5706
|
-
}
|
|
5707
|
-
});
|
|
5708
|
-
var Organization_default = Organization5;
|
|
5709
|
-
|
|
5710
|
-
// src/components/presentation/sign-in/SignIn.ts
|
|
5711
|
-
var import_browser44 = require("@asgardeo/browser");
|
|
5712
|
-
var import_vue56 = require("vue");
|
|
5713
|
-
|
|
5714
|
-
// src/components/presentation/sign-in/v1/SignIn.ts
|
|
5715
|
-
var import_vue52 = require("vue");
|
|
5919
|
+
// src/components/auth/sign-in/v1/SignIn.ts
|
|
5920
|
+
var import_vue47 = require("vue");
|
|
5716
5921
|
|
|
5717
|
-
// src/components/
|
|
5922
|
+
// src/components/auth/sign-in/v1/BaseSignIn.ts
|
|
5718
5923
|
var import_browser37 = require("@asgardeo/browser");
|
|
5719
|
-
var
|
|
5924
|
+
var import_vue46 = require("vue");
|
|
5720
5925
|
|
|
5721
|
-
// src/components/
|
|
5926
|
+
// src/components/auth/sign-in/v1/options/SignInOptionFactory.ts
|
|
5722
5927
|
var import_browser36 = require("@asgardeo/browser");
|
|
5723
|
-
var
|
|
5928
|
+
var import_vue45 = require("vue");
|
|
5724
5929
|
|
|
5725
5930
|
// src/components/adapters/FacebookButton.ts
|
|
5726
|
-
var
|
|
5727
|
-
var FacebookButton = (0,
|
|
5931
|
+
var import_vue40 = require("vue");
|
|
5932
|
+
var FacebookButton = (0, import_vue40.defineComponent)({
|
|
5728
5933
|
emits: ["click"],
|
|
5729
5934
|
name: "FacebookButton",
|
|
5730
5935
|
props: {
|
|
@@ -5732,17 +5937,17 @@ var FacebookButton = (0, import_vue45.defineComponent)({
|
|
|
5732
5937
|
},
|
|
5733
5938
|
setup(props, { slots, emit, attrs }) {
|
|
5734
5939
|
const { t } = useI18n_default();
|
|
5735
|
-
const facebookIcon = () => (0,
|
|
5736
|
-
(0,
|
|
5940
|
+
const facebookIcon = () => (0, import_vue40.h)("svg", { height: "18", viewBox: "0 0 512 512", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
|
|
5941
|
+
(0, import_vue40.h)("path", {
|
|
5737
5942
|
d: "M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64C512,28.704,483.296,0,448,0z",
|
|
5738
5943
|
fill: "#1976D2"
|
|
5739
5944
|
}),
|
|
5740
|
-
(0,
|
|
5945
|
+
(0, import_vue40.h)("path", {
|
|
5741
5946
|
d: "M432,256h-80v-64c0-17.664,14.336-16,32-16h32V96h-64l0,0c-53.024,0-96,42.976-96,96v64h-64v80h64v176h96V336h48L432,256z",
|
|
5742
5947
|
fill: "#FAFAFA"
|
|
5743
5948
|
})
|
|
5744
5949
|
]);
|
|
5745
|
-
return () => (0,
|
|
5950
|
+
return () => (0, import_vue40.h)(
|
|
5746
5951
|
Button_default,
|
|
5747
5952
|
{
|
|
5748
5953
|
...attrs,
|
|
@@ -5761,8 +5966,8 @@ var FacebookButton = (0, import_vue45.defineComponent)({
|
|
|
5761
5966
|
var FacebookButton_default = FacebookButton;
|
|
5762
5967
|
|
|
5763
5968
|
// src/components/adapters/GitHubButton.ts
|
|
5764
|
-
var
|
|
5765
|
-
var GitHubButton = (0,
|
|
5969
|
+
var import_vue41 = require("vue");
|
|
5970
|
+
var GitHubButton = (0, import_vue41.defineComponent)({
|
|
5766
5971
|
emits: ["click"],
|
|
5767
5972
|
name: "GitHubButton",
|
|
5768
5973
|
props: {
|
|
@@ -5770,15 +5975,15 @@ var GitHubButton = (0, import_vue46.defineComponent)({
|
|
|
5770
5975
|
},
|
|
5771
5976
|
setup(props, { slots, emit, attrs }) {
|
|
5772
5977
|
const { t } = useI18n_default();
|
|
5773
|
-
const gitHubIcon = () => (0,
|
|
5774
|
-
(0,
|
|
5775
|
-
(0,
|
|
5978
|
+
const gitHubIcon = () => (0, import_vue41.h)("svg", { height: "18", viewBox: "0 0 67.91 66.233", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
|
|
5979
|
+
(0, import_vue41.h)("g", { transform: "translate(-386.96 658.072)" }, [
|
|
5980
|
+
(0, import_vue41.h)("path", {
|
|
5776
5981
|
d: "M420.915-658.072a33.956,33.956,0,0,0-33.955,33.955,33.963,33.963,0,0,0,23.221,32.22c1.7.314,2.32-.737,2.32-1.633,0-.81-.031-3.484-.046-6.322-9.446,2.054-11.44-4.006-11.44-4.006-1.545-3.925-3.77-4.968-3.77-4.968-3.081-2.107.232-2.064.232-2.064,3.41.239,5.205,3.5,5.205,3.5,3.028,5.19,7.943,3.69,9.881,2.822a7.23,7.23,0,0,1,2.156-4.54c-7.542-.859-15.47-3.77-15.47-16.781a13.141,13.141,0,0,1,3.5-9.114,12.2,12.2,0,0,1,.329-8.986s2.851-.913,9.34,3.48a32.545,32.545,0,0,1,8.5-1.143,32.629,32.629,0,0,1,8.506,1.143c6.481-4.393,9.328-3.48,9.328-3.48a12.185,12.185,0,0,1,.333,8.986,13.115,13.115,0,0,1,3.495,9.114c0,13.042-7.943,15.913-15.5,16.754,1.218,1.054,2.3,3.12,2.3,6.288,0,4.543-.039,8.2-.039,9.318,0,.9.611,1.962,2.332,1.629a33.959,33.959,0,0,0,23.2-32.215,33.955,33.955,0,0,0-33.955-33.955",
|
|
5777
5982
|
fill: "currentColor"
|
|
5778
5983
|
})
|
|
5779
5984
|
])
|
|
5780
5985
|
]);
|
|
5781
|
-
return () => (0,
|
|
5986
|
+
return () => (0, import_vue41.h)(
|
|
5782
5987
|
Button_default,
|
|
5783
5988
|
{
|
|
5784
5989
|
...attrs,
|
|
@@ -5797,8 +6002,8 @@ var GitHubButton = (0, import_vue46.defineComponent)({
|
|
|
5797
6002
|
var GitHubButton_default = GitHubButton;
|
|
5798
6003
|
|
|
5799
6004
|
// src/components/adapters/GoogleButton.ts
|
|
5800
|
-
var
|
|
5801
|
-
var GoogleButton = (0,
|
|
6005
|
+
var import_vue42 = require("vue");
|
|
6006
|
+
var GoogleButton = (0, import_vue42.defineComponent)({
|
|
5802
6007
|
emits: ["click"],
|
|
5803
6008
|
name: "GoogleButton",
|
|
5804
6009
|
props: {
|
|
@@ -5806,31 +6011,31 @@ var GoogleButton = (0, import_vue47.defineComponent)({
|
|
|
5806
6011
|
},
|
|
5807
6012
|
setup(props, { slots, emit, attrs }) {
|
|
5808
6013
|
const { t } = useI18n_default();
|
|
5809
|
-
const googleIcon = () => (0,
|
|
5810
|
-
(0,
|
|
5811
|
-
(0,
|
|
6014
|
+
const googleIcon = () => (0, import_vue42.h)("svg", { height: "18", viewBox: "0 0 67.91 67.901", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
|
|
6015
|
+
(0, import_vue42.h)("g", { transform: "translate(-0.001 -0.001)" }, [
|
|
6016
|
+
(0, import_vue42.h)("path", {
|
|
5812
6017
|
d: "M15.049,160.965l-2.364,8.824-8.639.183a34.011,34.011,0,0,1-.25-31.7h0l7.691,1.41,3.369,7.645a20.262,20.262,0,0,0,.19,13.642Z",
|
|
5813
6018
|
fill: "#fbbb00",
|
|
5814
6019
|
transform: "translate(0 -119.93)"
|
|
5815
6020
|
}),
|
|
5816
|
-
(0,
|
|
6021
|
+
(0, import_vue42.h)("path", {
|
|
5817
6022
|
d: "M294.24,208.176A33.939,33.939,0,0,1,282.137,241h0l-9.687-.494-1.371-8.559a20.235,20.235,0,0,0,8.706-10.333H261.628V208.176Z",
|
|
5818
6023
|
fill: "#518ef8",
|
|
5819
6024
|
transform: "translate(-226.93 -180.567)"
|
|
5820
6025
|
}),
|
|
5821
|
-
(0,
|
|
6026
|
+
(0, import_vue42.h)("path", {
|
|
5822
6027
|
d: "M81.668,328.8h0a33.962,33.962,0,0,1-51.161-10.387l11-9.006a20.192,20.192,0,0,0,29.1,10.338Z",
|
|
5823
6028
|
fill: "#28b446",
|
|
5824
6029
|
transform: "translate(-26.463 -268.374)"
|
|
5825
6030
|
}),
|
|
5826
|
-
(0,
|
|
6031
|
+
(0, import_vue42.h)("path", {
|
|
5827
6032
|
d: "M80.451,7.816l-11,9A20.19,20.19,0,0,0,39.686,27.393l-11.06-9.055h0A33.959,33.959,0,0,1,80.451,7.816Z",
|
|
5828
6033
|
fill: "#f14336",
|
|
5829
6034
|
transform: "translate(-24.828)"
|
|
5830
6035
|
})
|
|
5831
6036
|
])
|
|
5832
6037
|
]);
|
|
5833
|
-
return () => (0,
|
|
6038
|
+
return () => (0, import_vue42.h)(
|
|
5834
6039
|
Button_default,
|
|
5835
6040
|
{
|
|
5836
6041
|
...attrs,
|
|
@@ -5849,8 +6054,8 @@ var GoogleButton = (0, import_vue47.defineComponent)({
|
|
|
5849
6054
|
var GoogleButton_default = GoogleButton;
|
|
5850
6055
|
|
|
5851
6056
|
// src/components/adapters/MicrosoftButton.ts
|
|
5852
|
-
var
|
|
5853
|
-
var MicrosoftButton = (0,
|
|
6057
|
+
var import_vue43 = require("vue");
|
|
6058
|
+
var MicrosoftButton = (0, import_vue43.defineComponent)({
|
|
5854
6059
|
emits: ["click"],
|
|
5855
6060
|
name: "MicrosoftButton",
|
|
5856
6061
|
props: {
|
|
@@ -5858,14 +6063,14 @@ var MicrosoftButton = (0, import_vue48.defineComponent)({
|
|
|
5858
6063
|
},
|
|
5859
6064
|
setup(props, { slots, emit, attrs }) {
|
|
5860
6065
|
const { t } = useI18n_default();
|
|
5861
|
-
const microsoftIcon = () => (0,
|
|
5862
|
-
(0,
|
|
5863
|
-
(0,
|
|
5864
|
-
(0,
|
|
5865
|
-
(0,
|
|
5866
|
-
(0,
|
|
6066
|
+
const microsoftIcon = () => (0, import_vue43.h)("svg", { height: "14", viewBox: "0 0 23 23", width: "14", xmlns: "http://www.w3.org/2000/svg" }, [
|
|
6067
|
+
(0, import_vue43.h)("path", { d: "M0 0h23v23H0z", fill: "#f3f3f3" }),
|
|
6068
|
+
(0, import_vue43.h)("path", { d: "M1 1h10v10H1z", fill: "#f35325" }),
|
|
6069
|
+
(0, import_vue43.h)("path", { d: "M12 1h10v10H12z", fill: "#81bc06" }),
|
|
6070
|
+
(0, import_vue43.h)("path", { d: "M1 12h10v10H1z", fill: "#05a6f0" }),
|
|
6071
|
+
(0, import_vue43.h)("path", { d: "M12 12h10v10H12z", fill: "#ffba08" })
|
|
5867
6072
|
]);
|
|
5868
|
-
return () => (0,
|
|
6073
|
+
return () => (0, import_vue43.h)(
|
|
5869
6074
|
Button_default,
|
|
5870
6075
|
{
|
|
5871
6076
|
...attrs,
|
|
@@ -5885,7 +6090,7 @@ var MicrosoftButton_default = MicrosoftButton;
|
|
|
5885
6090
|
|
|
5886
6091
|
// src/components/factories/FieldFactory.ts
|
|
5887
6092
|
var import_browser35 = require("@asgardeo/browser");
|
|
5888
|
-
var
|
|
6093
|
+
var import_vue44 = require("vue");
|
|
5889
6094
|
var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
5890
6095
|
if (required && touched && (!value || value.trim() === "")) {
|
|
5891
6096
|
return "This field is required";
|
|
@@ -5937,44 +6142,44 @@ var createField = (config) => {
|
|
|
5937
6142
|
};
|
|
5938
6143
|
switch (type) {
|
|
5939
6144
|
case import_browser35.FieldType.Password:
|
|
5940
|
-
return (0,
|
|
6145
|
+
return (0, import_vue44.h)(PasswordField_default, {
|
|
5941
6146
|
...commonProps,
|
|
5942
6147
|
"onUpdate:modelValue": onChange
|
|
5943
6148
|
});
|
|
5944
6149
|
case import_browser35.FieldType.Text:
|
|
5945
|
-
return (0,
|
|
6150
|
+
return (0, import_vue44.h)(TextField_default, {
|
|
5946
6151
|
...commonProps,
|
|
5947
6152
|
autocomplete: "off",
|
|
5948
6153
|
"onUpdate:modelValue": onChange,
|
|
5949
6154
|
type: "text"
|
|
5950
6155
|
});
|
|
5951
6156
|
case import_browser35.FieldType.Email:
|
|
5952
|
-
return (0,
|
|
6157
|
+
return (0, import_vue44.h)(TextField_default, {
|
|
5953
6158
|
...commonProps,
|
|
5954
6159
|
autocomplete: "email",
|
|
5955
6160
|
"onUpdate:modelValue": onChange,
|
|
5956
6161
|
type: "email"
|
|
5957
6162
|
});
|
|
5958
6163
|
case import_browser35.FieldType.Date:
|
|
5959
|
-
return (0,
|
|
6164
|
+
return (0, import_vue44.h)(DatePicker_default, {
|
|
5960
6165
|
...commonProps,
|
|
5961
6166
|
"onUpdate:modelValue": onChange
|
|
5962
6167
|
});
|
|
5963
6168
|
case import_browser35.FieldType.Checkbox: {
|
|
5964
6169
|
const isChecked = value === "true" || value === true;
|
|
5965
|
-
return (0,
|
|
6170
|
+
return (0, import_vue44.h)(Checkbox_default, {
|
|
5966
6171
|
...commonProps,
|
|
5967
6172
|
modelValue: isChecked,
|
|
5968
6173
|
"onUpdate:modelValue": (checked) => onChange(checked.toString())
|
|
5969
6174
|
});
|
|
5970
6175
|
}
|
|
5971
6176
|
case import_browser35.FieldType.Otp:
|
|
5972
|
-
return (0,
|
|
6177
|
+
return (0, import_vue44.h)(OtpField_default, {
|
|
5973
6178
|
...commonProps,
|
|
5974
6179
|
"onUpdate:modelValue": onChange
|
|
5975
6180
|
});
|
|
5976
6181
|
case import_browser35.FieldType.Number:
|
|
5977
|
-
return (0,
|
|
6182
|
+
return (0, import_vue44.h)(TextField_default, {
|
|
5978
6183
|
...commonProps,
|
|
5979
6184
|
helperText: "Enter a numeric value",
|
|
5980
6185
|
"onUpdate:modelValue": onChange,
|
|
@@ -5983,14 +6188,14 @@ var createField = (config) => {
|
|
|
5983
6188
|
case import_browser35.FieldType.Select: {
|
|
5984
6189
|
const fieldOptions = options.length > 0 ? options : [];
|
|
5985
6190
|
if (fieldOptions.length > 0) {
|
|
5986
|
-
return (0,
|
|
6191
|
+
return (0, import_vue44.h)(Select_default, {
|
|
5987
6192
|
...commonProps,
|
|
5988
6193
|
helperText: "Select from available options",
|
|
5989
6194
|
"onUpdate:modelValue": onChange,
|
|
5990
6195
|
options: fieldOptions
|
|
5991
6196
|
});
|
|
5992
6197
|
}
|
|
5993
|
-
return (0,
|
|
6198
|
+
return (0, import_vue44.h)(TextField_default, {
|
|
5994
6199
|
...commonProps,
|
|
5995
6200
|
helperText: "Enter multiple values separated by commas (e.g., value1, value2, value3)",
|
|
5996
6201
|
"onUpdate:modelValue": onChange,
|
|
@@ -5999,7 +6204,7 @@ var createField = (config) => {
|
|
|
5999
6204
|
});
|
|
6000
6205
|
}
|
|
6001
6206
|
default:
|
|
6002
|
-
return (0,
|
|
6207
|
+
return (0, import_vue44.h)(TextField_default, {
|
|
6003
6208
|
...commonProps,
|
|
6004
6209
|
helperText: "Unknown field type, treating as text",
|
|
6005
6210
|
"onUpdate:modelValue": onChange,
|
|
@@ -6007,7 +6212,7 @@ var createField = (config) => {
|
|
|
6007
6212
|
});
|
|
6008
6213
|
}
|
|
6009
6214
|
};
|
|
6010
|
-
var FieldFactory = (0,
|
|
6215
|
+
var FieldFactory = (0, import_vue44.defineComponent)({
|
|
6011
6216
|
emits: ["change", "blur"],
|
|
6012
6217
|
name: "FieldFactory",
|
|
6013
6218
|
props: {
|
|
@@ -6043,12 +6248,12 @@ var FieldFactory = (0, import_vue49.defineComponent)({
|
|
|
6043
6248
|
});
|
|
6044
6249
|
var FieldFactory_default = FieldFactory;
|
|
6045
6250
|
|
|
6046
|
-
// src/components/
|
|
6251
|
+
// src/components/auth/sign-in/v1/options/SignInOptionFactory.ts
|
|
6047
6252
|
var renderFormFields = (props) => {
|
|
6048
6253
|
const { authenticator, formValues, touchedFields, isLoading, onInputChange, inputClassName, buttonClassName, t } = props;
|
|
6049
6254
|
const formFields = authenticator.metadata?.params?.sort((a, b) => a.order - b.order)?.filter((param) => param.param !== "totp") || [];
|
|
6050
6255
|
const fieldNodes = formFields.map(
|
|
6051
|
-
(param) => (0,
|
|
6256
|
+
(param) => (0, import_vue45.h)(
|
|
6052
6257
|
"div",
|
|
6053
6258
|
{ key: param.param },
|
|
6054
6259
|
createField({
|
|
@@ -6068,7 +6273,7 @@ var renderFormFields = (props) => {
|
|
|
6068
6273
|
)
|
|
6069
6274
|
);
|
|
6070
6275
|
fieldNodes.push(
|
|
6071
|
-
(0,
|
|
6276
|
+
(0, import_vue45.h)(
|
|
6072
6277
|
Button_default,
|
|
6073
6278
|
{
|
|
6074
6279
|
class: buttonClassName,
|
|
@@ -6098,10 +6303,10 @@ var renderMultiOptionButton = (props) => {
|
|
|
6098
6303
|
[import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp]: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z"
|
|
6099
6304
|
};
|
|
6100
6305
|
const iconPath = iconPathMap[authenticator.authenticatorId] || "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8z";
|
|
6101
|
-
const icon2 = (0,
|
|
6102
|
-
(0,
|
|
6306
|
+
const icon2 = (0, import_vue45.h)("svg", { height: "18", viewBox: "0 0 24 24", width: "18", xmlns: "http://www.w3.org/2000/svg" }, [
|
|
6307
|
+
(0, import_vue45.h)("path", { d: iconPath, fill: "currentColor" })
|
|
6103
6308
|
]);
|
|
6104
|
-
return (0,
|
|
6309
|
+
return (0, import_vue45.h)(
|
|
6105
6310
|
Button_default,
|
|
6106
6311
|
{
|
|
6107
6312
|
class: buttonClassName,
|
|
@@ -6118,17 +6323,17 @@ var renderMultiOptionButton = (props) => {
|
|
|
6118
6323
|
};
|
|
6119
6324
|
var renderSocialButton = (props) => {
|
|
6120
6325
|
const { authenticator, isLoading, onSubmit, buttonClassName, t } = props;
|
|
6121
|
-
const socialIcon = (0,
|
|
6326
|
+
const socialIcon = (0, import_vue45.h)(
|
|
6122
6327
|
"svg",
|
|
6123
6328
|
{ height: "18", viewBox: "0 0 24 24", width: "18", xmlns: "http://www.w3.org/2000/svg" },
|
|
6124
6329
|
[
|
|
6125
|
-
(0,
|
|
6330
|
+
(0, import_vue45.h)("path", {
|
|
6126
6331
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
|
|
6127
6332
|
fill: "currentColor"
|
|
6128
6333
|
})
|
|
6129
6334
|
]
|
|
6130
6335
|
);
|
|
6131
|
-
return (0,
|
|
6336
|
+
return (0, import_vue45.h)(
|
|
6132
6337
|
Button_default,
|
|
6133
6338
|
{
|
|
6134
6339
|
class: buttonClassName,
|
|
@@ -6149,27 +6354,27 @@ var createSignInOption = (props) => {
|
|
|
6149
6354
|
switch (authenticator.authenticatorId) {
|
|
6150
6355
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:
|
|
6151
6356
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:
|
|
6152
|
-
return (0,
|
|
6357
|
+
return (0, import_vue45.h)("div", {}, renderFormFields(props));
|
|
6153
6358
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:
|
|
6154
|
-
return (0,
|
|
6359
|
+
return (0, import_vue45.h)(GoogleButton_default, {
|
|
6155
6360
|
class: buttonClassName,
|
|
6156
6361
|
isLoading,
|
|
6157
6362
|
onClick: () => onSubmit(authenticator)
|
|
6158
6363
|
});
|
|
6159
6364
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:
|
|
6160
|
-
return (0,
|
|
6365
|
+
return (0, import_vue45.h)(GitHubButton_default, {
|
|
6161
6366
|
class: buttonClassName,
|
|
6162
6367
|
isLoading,
|
|
6163
6368
|
onClick: () => onSubmit(authenticator)
|
|
6164
6369
|
});
|
|
6165
6370
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:
|
|
6166
|
-
return (0,
|
|
6371
|
+
return (0, import_vue45.h)(MicrosoftButton_default, {
|
|
6167
6372
|
class: buttonClassName,
|
|
6168
6373
|
isLoading,
|
|
6169
6374
|
onClick: () => onSubmit(authenticator)
|
|
6170
6375
|
});
|
|
6171
6376
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:
|
|
6172
|
-
return (0,
|
|
6377
|
+
return (0, import_vue45.h)(FacebookButton_default, {
|
|
6173
6378
|
class: buttonClassName,
|
|
6174
6379
|
isLoading,
|
|
6175
6380
|
onClick: () => onSubmit(authenticator)
|
|
@@ -6177,12 +6382,12 @@ var createSignInOption = (props) => {
|
|
|
6177
6382
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
6178
6383
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
6179
6384
|
case import_browser36.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
6180
|
-
return hasParams ? (0,
|
|
6385
|
+
return hasParams ? (0, import_vue45.h)("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
|
|
6181
6386
|
default:
|
|
6182
6387
|
if (authenticator.idp !== import_browser36.EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
|
|
6183
6388
|
return renderSocialButton(props);
|
|
6184
6389
|
}
|
|
6185
|
-
return hasParams ? (0,
|
|
6390
|
+
return hasParams ? (0, import_vue45.h)("div", {}, renderFormFields(props)) : renderMultiOptionButton(props);
|
|
6186
6391
|
}
|
|
6187
6392
|
};
|
|
6188
6393
|
var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFields, isLoading, onInputChange, onSubmit, t, options) => createSignInOption({
|
|
@@ -6196,10 +6401,10 @@ var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFie
|
|
|
6196
6401
|
...options
|
|
6197
6402
|
});
|
|
6198
6403
|
|
|
6199
|
-
// src/components/
|
|
6404
|
+
// src/components/auth/sign-in/v1/BaseSignIn.ts
|
|
6200
6405
|
var HIDDEN_AUTHENTICATORS = ["T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08"];
|
|
6201
6406
|
var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === import_browser37.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === import_browser37.EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && !!authenticator.metadata?.additionalData?.challengeData;
|
|
6202
|
-
var BaseSignIn = (0,
|
|
6407
|
+
var BaseSignIn = (0, import_vue46.defineComponent)({
|
|
6203
6408
|
emits: ["error", "flowChange", "success"],
|
|
6204
6409
|
name: "BaseSignInV1",
|
|
6205
6410
|
props: {
|
|
@@ -6224,14 +6429,14 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6224
6429
|
setup(props, { emit }) {
|
|
6225
6430
|
const { t } = useI18n_default();
|
|
6226
6431
|
const { title: flowTitle, subtitle: flowSubtitle, messages: flowMessages } = useFlow_default();
|
|
6227
|
-
const isInitRequestLoading = (0,
|
|
6228
|
-
const isInitialized = (0,
|
|
6229
|
-
const currentFlow = (0,
|
|
6230
|
-
const currentAuthenticator = (0,
|
|
6231
|
-
const error = (0,
|
|
6232
|
-
const messages = (0,
|
|
6233
|
-
const formValues = (0,
|
|
6234
|
-
const touchedFields = (0,
|
|
6432
|
+
const isInitRequestLoading = (0, import_vue46.ref)(false);
|
|
6433
|
+
const isInitialized = (0, import_vue46.ref)(false);
|
|
6434
|
+
const currentFlow = (0, import_vue46.ref)(null);
|
|
6435
|
+
const currentAuthenticator = (0, import_vue46.ref)(null);
|
|
6436
|
+
const error = (0, import_vue46.ref)(null);
|
|
6437
|
+
const messages = (0, import_vue46.ref)([]);
|
|
6438
|
+
const formValues = (0, import_vue46.ref)({});
|
|
6439
|
+
const touchedFields = (0, import_vue46.ref)({});
|
|
6235
6440
|
const isLoading = () => props.isLoading || isInitRequestLoading.value;
|
|
6236
6441
|
const setupFormFields = (authenticator) => {
|
|
6237
6442
|
const vals = {};
|
|
@@ -6537,7 +6742,7 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6537
6742
|
return currentFlow.value.nextStep.authenticators;
|
|
6538
6743
|
};
|
|
6539
6744
|
let initAttempted = false;
|
|
6540
|
-
(0,
|
|
6745
|
+
(0, import_vue46.watch)(
|
|
6541
6746
|
() => props.isLoading,
|
|
6542
6747
|
(loading) => {
|
|
6543
6748
|
if (!loading && !initAttempted && props.onInitialize) {
|
|
@@ -6588,9 +6793,9 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6588
6793
|
return "info";
|
|
6589
6794
|
};
|
|
6590
6795
|
const renderMessages = () => messages.value.map(
|
|
6591
|
-
(msg, i) => (0,
|
|
6796
|
+
(msg, i) => (0, import_vue46.h)(Alert_default, { key: i, severity: renderAlertVariant(msg.type) }, { default: () => msg.message })
|
|
6592
6797
|
);
|
|
6593
|
-
const renderError = () => error.value ? (0,
|
|
6798
|
+
const renderError = () => error.value ? (0, import_vue46.h)(Alert_default, { severity: "error" }, { default: () => error.value }) : null;
|
|
6594
6799
|
return () => {
|
|
6595
6800
|
const cardClass = [
|
|
6596
6801
|
(0, import_browser37.withVendorCSSClassPrefix)("signin"),
|
|
@@ -6599,16 +6804,16 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6599
6804
|
props.className
|
|
6600
6805
|
].filter(Boolean).join(" ");
|
|
6601
6806
|
if (!isInitialized.value && isLoading()) {
|
|
6602
|
-
return (0,
|
|
6603
|
-
props.showLogo ? (0,
|
|
6604
|
-
(0,
|
|
6807
|
+
return (0, import_vue46.h)("div", {}, [
|
|
6808
|
+
props.showLogo ? (0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__logo") }, [(0, import_vue46.h)(Logo_default)]) : null,
|
|
6809
|
+
(0, import_vue46.h)(
|
|
6605
6810
|
Card_default,
|
|
6606
6811
|
{ class: cardClass, variant: props.variant },
|
|
6607
6812
|
{
|
|
6608
6813
|
default: () => [
|
|
6609
|
-
(0,
|
|
6610
|
-
(0,
|
|
6611
|
-
(0,
|
|
6814
|
+
(0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__loading") }, [
|
|
6815
|
+
(0, import_vue46.h)(Spinner_default, { size: "medium" }),
|
|
6816
|
+
(0, import_vue46.h)(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })
|
|
6612
6817
|
])
|
|
6613
6818
|
]
|
|
6614
6819
|
}
|
|
@@ -6621,9 +6826,9 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6621
6826
|
(auth) => auth.metadata?.promptType === import_browser37.EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt || auth.idp === "LOCAL" && auth.metadata?.params && auth.metadata.params.length > 0
|
|
6622
6827
|
);
|
|
6623
6828
|
const optionAuths = available.filter((auth) => !userPromptAuths.includes(auth)).filter((auth) => !HIDDEN_AUTHENTICATORS.includes(auth.authenticatorId));
|
|
6624
|
-
return (0,
|
|
6625
|
-
props.showLogo ? (0,
|
|
6626
|
-
(0,
|
|
6829
|
+
return (0, import_vue46.h)("div", {}, [
|
|
6830
|
+
props.showLogo ? (0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__logo") }, [(0, import_vue46.h)(Logo_default)]) : null,
|
|
6831
|
+
(0, import_vue46.h)(
|
|
6627
6832
|
Card_default,
|
|
6628
6833
|
{ class: cardClass, variant: props.variant },
|
|
6629
6834
|
{
|
|
@@ -6631,9 +6836,9 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6631
6836
|
const children = [];
|
|
6632
6837
|
if (props.showTitle || props.showSubtitle) {
|
|
6633
6838
|
children.push(
|
|
6634
|
-
(0,
|
|
6635
|
-
props.showTitle ? (0,
|
|
6636
|
-
props.showSubtitle ? (0,
|
|
6839
|
+
(0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__header") }, [
|
|
6840
|
+
props.showTitle ? (0, import_vue46.h)(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }) : null,
|
|
6841
|
+
props.showSubtitle ? (0, import_vue46.h)(
|
|
6637
6842
|
Typography_default,
|
|
6638
6843
|
{ variant: "body1" },
|
|
6639
6844
|
{ default: () => flowSubtitle.value || t("signin.subheading") }
|
|
@@ -6643,22 +6848,22 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6643
6848
|
}
|
|
6644
6849
|
if (flowMessages.value?.length > 0) {
|
|
6645
6850
|
children.push(
|
|
6646
|
-
(0,
|
|
6851
|
+
(0, import_vue46.h)(
|
|
6647
6852
|
"div",
|
|
6648
6853
|
{ class: (0, import_browser37.withVendorCSSClassPrefix)("signin__flow-messages") },
|
|
6649
6854
|
flowMessages.value.map(
|
|
6650
|
-
(fm, i) => (0,
|
|
6855
|
+
(fm, i) => (0, import_vue46.h)(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
|
|
6651
6856
|
)
|
|
6652
6857
|
)
|
|
6653
6858
|
);
|
|
6654
6859
|
}
|
|
6655
|
-
if (messages.value.length > 0) children.push((0,
|
|
6860
|
+
if (messages.value.length > 0) children.push((0, import_vue46.h)("div", {}, renderMessages()));
|
|
6656
6861
|
const errNode = renderError();
|
|
6657
6862
|
if (errNode) children.push(errNode);
|
|
6658
6863
|
userPromptAuths.forEach((auth, index) => {
|
|
6659
|
-
if (index > 0) children.push((0,
|
|
6864
|
+
if (index > 0) children.push((0, import_vue46.h)(Divider_default, {}, { default: () => "OR" }));
|
|
6660
6865
|
children.push(
|
|
6661
|
-
(0,
|
|
6866
|
+
(0, import_vue46.h)(
|
|
6662
6867
|
"form",
|
|
6663
6868
|
{
|
|
6664
6869
|
onSubmit: (e) => {
|
|
@@ -6690,11 +6895,11 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6690
6895
|
);
|
|
6691
6896
|
});
|
|
6692
6897
|
if (userPromptAuths.length > 0 && optionAuths.length > 0) {
|
|
6693
|
-
children.push((0,
|
|
6898
|
+
children.push((0, import_vue46.h)(Divider_default, {}, { default: () => "OR" }));
|
|
6694
6899
|
}
|
|
6695
6900
|
optionAuths.forEach((auth) => {
|
|
6696
6901
|
children.push(
|
|
6697
|
-
(0,
|
|
6902
|
+
(0, import_vue46.h)("div", { key: auth.authenticatorId }, [
|
|
6698
6903
|
createSignInOptionFromAuthenticator(
|
|
6699
6904
|
auth,
|
|
6700
6905
|
formValues.value,
|
|
@@ -6719,15 +6924,15 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6719
6924
|
]);
|
|
6720
6925
|
}
|
|
6721
6926
|
if (!currentAuthenticator.value) {
|
|
6722
|
-
return (0,
|
|
6723
|
-
props.showLogo ? (0,
|
|
6724
|
-
(0,
|
|
6927
|
+
return (0, import_vue46.h)("div", {}, [
|
|
6928
|
+
props.showLogo ? (0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__logo") }, [(0, import_vue46.h)(Logo_default)]) : null,
|
|
6929
|
+
(0, import_vue46.h)(
|
|
6725
6930
|
Card_default,
|
|
6726
6931
|
{ class: cardClass, variant: props.variant },
|
|
6727
6932
|
{
|
|
6728
6933
|
default: () => {
|
|
6729
6934
|
const errNode = renderError();
|
|
6730
|
-
return errNode ? [errNode] : [(0,
|
|
6935
|
+
return errNode ? [errNode] : [(0, import_vue46.h)(Typography_default, { variant: "body1" }, { default: () => t("messages.loading.placeholder") })];
|
|
6731
6936
|
}
|
|
6732
6937
|
}
|
|
6733
6938
|
)
|
|
@@ -6735,16 +6940,16 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6735
6940
|
}
|
|
6736
6941
|
if (isPasskeyAuthenticator(currentAuthenticator.value) && !isLoading()) {
|
|
6737
6942
|
handleAuthenticatorSelection(currentAuthenticator.value);
|
|
6738
|
-
return (0,
|
|
6739
|
-
props.showLogo ? (0,
|
|
6740
|
-
(0,
|
|
6943
|
+
return (0, import_vue46.h)("div", {}, [
|
|
6944
|
+
props.showLogo ? (0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__logo") }, [(0, import_vue46.h)(Logo_default)]) : null,
|
|
6945
|
+
(0, import_vue46.h)(
|
|
6741
6946
|
Card_default,
|
|
6742
6947
|
{ class: cardClass, variant: props.variant },
|
|
6743
6948
|
{
|
|
6744
6949
|
default: () => [
|
|
6745
|
-
(0,
|
|
6746
|
-
(0,
|
|
6747
|
-
(0,
|
|
6950
|
+
(0, import_vue46.h)("div", { style: "text-align:center" }, [
|
|
6951
|
+
(0, import_vue46.h)(Spinner_default, { size: "large" }),
|
|
6952
|
+
(0, import_vue46.h)(
|
|
6748
6953
|
Typography_default,
|
|
6749
6954
|
{ variant: "body1" },
|
|
6750
6955
|
{ default: () => t("passkey.authenticating") || "Authenticating with passkey..." }
|
|
@@ -6755,36 +6960,36 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6755
6960
|
)
|
|
6756
6961
|
]);
|
|
6757
6962
|
}
|
|
6758
|
-
return (0,
|
|
6759
|
-
props.showLogo ? (0,
|
|
6760
|
-
(0,
|
|
6963
|
+
return (0, import_vue46.h)("div", {}, [
|
|
6964
|
+
props.showLogo ? (0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__logo") }, [(0, import_vue46.h)(Logo_default)]) : null,
|
|
6965
|
+
(0, import_vue46.h)(
|
|
6761
6966
|
Card_default,
|
|
6762
6967
|
{ class: cardClass, variant: props.variant },
|
|
6763
6968
|
{
|
|
6764
6969
|
default: () => {
|
|
6765
6970
|
const children = [];
|
|
6766
6971
|
children.push(
|
|
6767
|
-
(0,
|
|
6768
|
-
(0,
|
|
6769
|
-
(0,
|
|
6972
|
+
(0, import_vue46.h)("div", { class: (0, import_browser37.withVendorCSSClassPrefix)("signin__header") }, [
|
|
6973
|
+
(0, import_vue46.h)(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signin.heading") }),
|
|
6974
|
+
(0, import_vue46.h)(Typography_default, { variant: "body1" }, { default: () => flowSubtitle.value || t("signin.subheading") })
|
|
6770
6975
|
])
|
|
6771
6976
|
);
|
|
6772
6977
|
if (flowMessages.value?.length > 0) {
|
|
6773
6978
|
children.push(
|
|
6774
|
-
(0,
|
|
6979
|
+
(0, import_vue46.h)(
|
|
6775
6980
|
"div",
|
|
6776
6981
|
{ class: (0, import_browser37.withVendorCSSClassPrefix)("signin__flow-messages") },
|
|
6777
6982
|
flowMessages.value.map(
|
|
6778
|
-
(fm, i) => (0,
|
|
6983
|
+
(fm, i) => (0, import_vue46.h)(Alert_default, { key: fm.id || i, severity: fm.type }, { default: () => fm.message })
|
|
6779
6984
|
)
|
|
6780
6985
|
)
|
|
6781
6986
|
);
|
|
6782
6987
|
}
|
|
6783
|
-
if (messages.value.length > 0) children.push((0,
|
|
6988
|
+
if (messages.value.length > 0) children.push((0, import_vue46.h)("div", {}, renderMessages()));
|
|
6784
6989
|
const errNode = renderError();
|
|
6785
6990
|
if (errNode) children.push(errNode);
|
|
6786
6991
|
children.push(
|
|
6787
|
-
(0,
|
|
6992
|
+
(0, import_vue46.h)(
|
|
6788
6993
|
"form",
|
|
6789
6994
|
{
|
|
6790
6995
|
class: (0, import_browser37.withVendorCSSClassPrefix)("signin__form"),
|
|
@@ -6825,8 +7030,8 @@ var BaseSignIn = (0, import_vue51.defineComponent)({
|
|
|
6825
7030
|
});
|
|
6826
7031
|
var BaseSignIn_default = BaseSignIn;
|
|
6827
7032
|
|
|
6828
|
-
// src/components/
|
|
6829
|
-
var SignIn = (0,
|
|
7033
|
+
// src/components/auth/sign-in/v1/SignIn.ts
|
|
7034
|
+
var SignIn = (0, import_vue47.defineComponent)({
|
|
6830
7035
|
emits: ["error", "success"],
|
|
6831
7036
|
name: "SignInV1",
|
|
6832
7037
|
props: {
|
|
@@ -6856,7 +7061,7 @@ var SignIn = (0, import_vue52.defineComponent)({
|
|
|
6856
7061
|
window.location.href = url.toString();
|
|
6857
7062
|
}
|
|
6858
7063
|
};
|
|
6859
|
-
return () => (0,
|
|
7064
|
+
return () => (0, import_vue47.h)(BaseSignIn_default, {
|
|
6860
7065
|
...attrs,
|
|
6861
7066
|
afterSignInUrl,
|
|
6862
7067
|
class: props.className,
|
|
@@ -6875,18 +7080,18 @@ var SignIn = (0, import_vue52.defineComponent)({
|
|
|
6875
7080
|
});
|
|
6876
7081
|
var SignIn_default = SignIn;
|
|
6877
7082
|
|
|
6878
|
-
// src/components/
|
|
7083
|
+
// src/components/auth/sign-in/v2/SignIn.ts
|
|
6879
7084
|
var import_browser43 = require("@asgardeo/browser");
|
|
6880
|
-
var
|
|
7085
|
+
var import_vue50 = require("vue");
|
|
6881
7086
|
|
|
6882
|
-
// src/components/
|
|
7087
|
+
// src/components/auth/sign-in/v2/BaseSignIn.ts
|
|
6883
7088
|
var import_browser40 = require("@asgardeo/browser");
|
|
6884
|
-
var
|
|
7089
|
+
var import_vue49 = require("vue");
|
|
6885
7090
|
|
|
6886
|
-
// src/components/
|
|
7091
|
+
// src/components/auth/sign-in/AuthOptionFactoryCore.ts
|
|
6887
7092
|
var import_browser38 = require("@asgardeo/browser");
|
|
6888
7093
|
var import_dompurify = __toESM(require("dompurify"), 1);
|
|
6889
|
-
var
|
|
7094
|
+
var import_vue48 = require("vue");
|
|
6890
7095
|
var logger5 = createVueLogger("AuthOptionFactory");
|
|
6891
7096
|
var getConsentOptionalKey = (purposeId, attr) => `consent_${purposeId}_${attr}`;
|
|
6892
7097
|
var resolveEmojiUrisInHtml = (html) => {
|
|
@@ -7012,30 +7217,30 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7012
7217
|
}
|
|
7013
7218
|
};
|
|
7014
7219
|
if (matchesSocialProvider(actionId, eventType, buttonText, "google")) {
|
|
7015
|
-
return (0,
|
|
7220
|
+
return (0, import_vue48.h)(GoogleButton_default, { class: options.buttonClassName, key, onClick: handleClick });
|
|
7016
7221
|
}
|
|
7017
7222
|
if (matchesSocialProvider(actionId, eventType, buttonText, "github")) {
|
|
7018
|
-
return (0,
|
|
7223
|
+
return (0, import_vue48.h)(GitHubButton_default, { class: options.buttonClassName, key, onClick: handleClick });
|
|
7019
7224
|
}
|
|
7020
7225
|
if (matchesSocialProvider(actionId, eventType, buttonText, "facebook")) {
|
|
7021
|
-
return (0,
|
|
7226
|
+
return (0, import_vue48.h)(FacebookButton_default, { class: options.buttonClassName, key, onClick: handleClick });
|
|
7022
7227
|
}
|
|
7023
7228
|
if (matchesSocialProvider(actionId, eventType, buttonText, "microsoft")) {
|
|
7024
|
-
return (0,
|
|
7229
|
+
return (0, import_vue48.h)(MicrosoftButton_default, { class: options.buttonClassName, key, onClick: handleClick });
|
|
7025
7230
|
}
|
|
7026
|
-
const startIconVNode = component.startIcon ? (0,
|
|
7231
|
+
const startIconVNode = component.startIcon ? (0, import_vue48.h)("img", {
|
|
7027
7232
|
alt: "",
|
|
7028
7233
|
"aria-hidden": "true",
|
|
7029
7234
|
src: component.startIcon,
|
|
7030
7235
|
style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
|
|
7031
7236
|
}) : null;
|
|
7032
|
-
const endIconVNode = component.endIcon ? (0,
|
|
7237
|
+
const endIconVNode = component.endIcon ? (0, import_vue48.h)("img", {
|
|
7033
7238
|
alt: "",
|
|
7034
7239
|
"aria-hidden": "true",
|
|
7035
7240
|
src: component.endIcon,
|
|
7036
7241
|
style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
|
|
7037
7242
|
}) : null;
|
|
7038
|
-
return (0,
|
|
7243
|
+
return (0, import_vue48.h)(
|
|
7039
7244
|
Button_default,
|
|
7040
7245
|
{
|
|
7041
7246
|
class: options.buttonClassName,
|
|
@@ -7055,7 +7260,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7055
7260
|
case import_browser38.EmbeddedFlowComponentTypeV2.Text: {
|
|
7056
7261
|
const variant = getTypographyVariant(component.variant);
|
|
7057
7262
|
const align = typeof component["align"] === "string" ? component["align"] : "left";
|
|
7058
|
-
return (0,
|
|
7263
|
+
return (0, import_vue48.h)(
|
|
7059
7264
|
Typography_default,
|
|
7060
7265
|
{
|
|
7061
7266
|
key,
|
|
@@ -7067,7 +7272,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7067
7272
|
}
|
|
7068
7273
|
case import_browser38.EmbeddedFlowComponentTypeV2.Divider: {
|
|
7069
7274
|
const dividerLabel = resolve(component.label) || "";
|
|
7070
|
-
return (0,
|
|
7275
|
+
return (0, import_vue48.h)(Divider_default, { key }, dividerLabel ? { default: () => dividerLabel } : void 0);
|
|
7071
7276
|
}
|
|
7072
7277
|
case import_browser38.EmbeddedFlowComponentTypeV2.Select: {
|
|
7073
7278
|
const identifier = component.ref;
|
|
@@ -7080,7 +7285,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7080
7285
|
value: typeof opt === "string" ? opt : String(opt.value ?? "")
|
|
7081
7286
|
})
|
|
7082
7287
|
);
|
|
7083
|
-
return (0,
|
|
7288
|
+
return (0, import_vue48.h)(Select_default, {
|
|
7084
7289
|
class: options.inputClassName,
|
|
7085
7290
|
error,
|
|
7086
7291
|
key,
|
|
@@ -7111,12 +7316,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7111
7316
|
}
|
|
7112
7317
|
)
|
|
7113
7318
|
).filter(Boolean);
|
|
7114
|
-
return (0,
|
|
7319
|
+
return (0, import_vue48.h)("form", { id: component.id, key }, blockChildren);
|
|
7115
7320
|
}
|
|
7116
7321
|
return null;
|
|
7117
7322
|
}
|
|
7118
7323
|
case import_browser38.EmbeddedFlowComponentTypeV2.RichText: {
|
|
7119
|
-
return (0,
|
|
7324
|
+
return (0, import_vue48.h)("div", {
|
|
7120
7325
|
innerHTML: import_dompurify.default.sanitize(resolveEmojiUrisInHtml(resolve(component.label))),
|
|
7121
7326
|
key,
|
|
7122
7327
|
style: { overflowWrap: "anywhere" }
|
|
@@ -7125,7 +7330,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7125
7330
|
case import_browser38.EmbeddedFlowComponentTypeV2.Image: {
|
|
7126
7331
|
const explicitHeight = resolve(component.height?.toString());
|
|
7127
7332
|
const explicitWidth = resolve(component.width?.toString());
|
|
7128
|
-
return (0,
|
|
7333
|
+
return (0, import_vue48.h)("img", {
|
|
7129
7334
|
alt: resolve(component.alt) || resolve(component.label) || "Image",
|
|
7130
7335
|
key,
|
|
7131
7336
|
src: resolve(component.src),
|
|
@@ -7169,7 +7374,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7169
7374
|
}
|
|
7170
7375
|
)
|
|
7171
7376
|
) : [];
|
|
7172
|
-
return (0,
|
|
7377
|
+
return (0, import_vue48.h)("div", { key, style: stackStyle }, stackChildren.filter(Boolean));
|
|
7173
7378
|
}
|
|
7174
7379
|
case import_browser38.EmbeddedFlowComponentTypeV2.Consent: {
|
|
7175
7380
|
logger5.warn(`Consent component type is not yet fully supported in the Vue SDK.`);
|
|
@@ -7180,7 +7385,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
7180
7385
|
const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
|
|
7181
7386
|
const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
|
|
7182
7387
|
const timerText = textTemplate.replace("{time}", String(expiresIn));
|
|
7183
|
-
return (0,
|
|
7388
|
+
return (0, import_vue48.h)("div", { class: "asgardeo-flow-timer", key }, timerText);
|
|
7184
7389
|
}
|
|
7185
7390
|
default:
|
|
7186
7391
|
logger5.warn(`Unsupported component type: ${component.type}. Skipping render.`);
|
|
@@ -7358,7 +7563,7 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
|
|
|
7358
7563
|
};
|
|
7359
7564
|
};
|
|
7360
7565
|
|
|
7361
|
-
// src/components/
|
|
7566
|
+
// src/components/auth/sign-in/v2/BaseSignIn.ts
|
|
7362
7567
|
var extractFormFields = (flowComponents) => {
|
|
7363
7568
|
const fields = [];
|
|
7364
7569
|
const process = (comps) => {
|
|
@@ -7374,7 +7579,7 @@ var extractFormFields = (flowComponents) => {
|
|
|
7374
7579
|
process(flowComponents);
|
|
7375
7580
|
return fields;
|
|
7376
7581
|
};
|
|
7377
|
-
var BaseSignIn2 = (0,
|
|
7582
|
+
var BaseSignIn2 = (0, import_vue49.defineComponent)({
|
|
7378
7583
|
emits: ["error", "success"],
|
|
7379
7584
|
name: "BaseSignIn",
|
|
7380
7585
|
props: {
|
|
@@ -7407,12 +7612,12 @@ var BaseSignIn2 = (0, import_vue54.defineComponent)({
|
|
|
7407
7612
|
const { meta: metaRef } = useFlowMeta_default();
|
|
7408
7613
|
const { t } = useI18n_default();
|
|
7409
7614
|
const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
|
|
7410
|
-
const isSubmitting = (0,
|
|
7411
|
-
const apiError = (0,
|
|
7412
|
-
const isLoading = (0,
|
|
7413
|
-
const formValues = (0,
|
|
7414
|
-
const touchedFields = (0,
|
|
7415
|
-
(0,
|
|
7615
|
+
const isSubmitting = (0, import_vue49.ref)(false);
|
|
7616
|
+
const apiError = (0, import_vue49.ref)(null);
|
|
7617
|
+
const isLoading = (0, import_vue49.computed)(() => props.isLoading || isSubmitting.value);
|
|
7618
|
+
const formValues = (0, import_vue49.ref)({});
|
|
7619
|
+
const touchedFields = (0, import_vue49.ref)({});
|
|
7620
|
+
(0, import_vue49.watch)(
|
|
7416
7621
|
() => props.components,
|
|
7417
7622
|
(newComponents) => {
|
|
7418
7623
|
const fields = extractFormFields(newComponents || []);
|
|
@@ -7425,7 +7630,7 @@ var BaseSignIn2 = (0, import_vue54.defineComponent)({
|
|
|
7425
7630
|
},
|
|
7426
7631
|
{ deep: false, immediate: true }
|
|
7427
7632
|
);
|
|
7428
|
-
const formErrors = (0,
|
|
7633
|
+
const formErrors = (0, import_vue49.computed)(() => {
|
|
7429
7634
|
const fields = extractFormFields(props.components || []);
|
|
7430
7635
|
const errors = {};
|
|
7431
7636
|
fields.forEach((field) => {
|
|
@@ -7440,7 +7645,7 @@ var BaseSignIn2 = (0, import_vue54.defineComponent)({
|
|
|
7440
7645
|
});
|
|
7441
7646
|
return errors;
|
|
7442
7647
|
});
|
|
7443
|
-
const isFormValid = (0,
|
|
7648
|
+
const isFormValid = (0, import_vue49.computed)(() => Object.keys(formErrors.value).length === 0);
|
|
7444
7649
|
const handleError = (error) => {
|
|
7445
7650
|
const errorMessage = error?.failureReason || extractErrorMessage(error, t);
|
|
7446
7651
|
apiError.value = error instanceof Error ? error : new Error(errorMessage);
|
|
@@ -7540,23 +7745,23 @@ var BaseSignIn2 = (0, import_vue54.defineComponent)({
|
|
|
7540
7745
|
validateForm,
|
|
7541
7746
|
values: formValues.value
|
|
7542
7747
|
};
|
|
7543
|
-
return (0,
|
|
7748
|
+
return (0, import_vue49.h)("div", { class: containerClass, ...attrs }, slots["default"](renderProps));
|
|
7544
7749
|
}
|
|
7545
7750
|
if (isLoading.value && (!props.components || props.components.length === 0)) {
|
|
7546
|
-
return (0,
|
|
7751
|
+
return (0, import_vue49.h)(
|
|
7547
7752
|
Card_default,
|
|
7548
7753
|
{ class: containerClass, variant: props.variant },
|
|
7549
|
-
() => (0,
|
|
7754
|
+
() => (0, import_vue49.h)("div", { style: "display:flex;justify-content:center;padding:2rem" }, (0, import_vue49.h)(Spinner_default))
|
|
7550
7755
|
);
|
|
7551
7756
|
}
|
|
7552
7757
|
if (!props.components || props.components.length === 0) {
|
|
7553
|
-
return (0,
|
|
7758
|
+
return (0, import_vue49.h)(
|
|
7554
7759
|
Card_default,
|
|
7555
7760
|
{ class: containerClass, variant: props.variant },
|
|
7556
|
-
() => (0,
|
|
7761
|
+
() => (0, import_vue49.h)(
|
|
7557
7762
|
Alert_default,
|
|
7558
7763
|
{ severity: "warning" },
|
|
7559
|
-
() => (0,
|
|
7764
|
+
() => (0, import_vue49.h)(
|
|
7560
7765
|
Typography_default,
|
|
7561
7766
|
{ variant: "body1" },
|
|
7562
7767
|
() => t("errors.signin.components.not.available") || "No sign-in options available"
|
|
@@ -7566,24 +7771,24 @@ var BaseSignIn2 = (0, import_vue54.defineComponent)({
|
|
|
7566
7771
|
}
|
|
7567
7772
|
const messages = flowMessages.value || [];
|
|
7568
7773
|
const externalError = props.error;
|
|
7569
|
-
return (0,
|
|
7774
|
+
return (0, import_vue49.h)(Card_default, { class: containerClass, ...attrs, variant: props.variant }, () => [
|
|
7570
7775
|
// Show errors and flow messages
|
|
7571
|
-
(externalError || messages.length > 0) && (0,
|
|
7776
|
+
(externalError || messages.length > 0) && (0, import_vue49.h)(
|
|
7572
7777
|
"div",
|
|
7573
7778
|
{ class: [(0, import_browser40.withVendorCSSClassPrefix)("signin__messages"), props.messageClassName].filter(Boolean).join(" ") },
|
|
7574
7779
|
[
|
|
7575
|
-
externalError && (0,
|
|
7780
|
+
externalError && (0, import_vue49.h)(Alert_default, { severity: "error" }, () => (0, import_vue49.h)(Typography_default, { variant: "body2" }, () => externalError.message)),
|
|
7576
7781
|
...messages.map(
|
|
7577
|
-
(msg, index) => (0,
|
|
7782
|
+
(msg, index) => (0, import_vue49.h)(
|
|
7578
7783
|
Alert_default,
|
|
7579
7784
|
{ key: index, severity: msg.type === "error" ? "error" : "info" },
|
|
7580
|
-
() => (0,
|
|
7785
|
+
() => (0, import_vue49.h)(Typography_default, { variant: "body2" }, () => msg.message)
|
|
7581
7786
|
)
|
|
7582
7787
|
)
|
|
7583
7788
|
]
|
|
7584
7789
|
),
|
|
7585
7790
|
// Render flow components
|
|
7586
|
-
(0,
|
|
7791
|
+
(0, import_vue49.h)("div", { class: (0, import_browser40.withVendorCSSClassPrefix)("signin__content") }, renderComponents())
|
|
7587
7792
|
]);
|
|
7588
7793
|
};
|
|
7589
7794
|
}
|
|
@@ -7757,10 +7962,10 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
7757
7962
|
}
|
|
7758
7963
|
};
|
|
7759
7964
|
|
|
7760
|
-
// src/components/
|
|
7965
|
+
// src/components/auth/sign-in/v2/SignIn.ts
|
|
7761
7966
|
var EXECUTION_ID_STORAGE_KEY = "asgardeo_execution_id";
|
|
7762
7967
|
var AUTH_ID_STORAGE_KEY = "asgardeo_auth_id";
|
|
7763
|
-
var SignIn2 = (0,
|
|
7968
|
+
var SignIn2 = (0, import_vue50.defineComponent)({
|
|
7764
7969
|
emits: ["error", "success"],
|
|
7765
7970
|
name: "SignIn",
|
|
7766
7971
|
props: {
|
|
@@ -7778,14 +7983,14 @@ var SignIn2 = (0, import_vue55.defineComponent)({
|
|
|
7778
7983
|
const { applicationId, afterSignInUrl, signIn, isInitialized, isLoading: sdkLoading } = useAsgardeo_default();
|
|
7779
7984
|
const { meta: flowMeta } = useFlowMeta_default();
|
|
7780
7985
|
const { t } = useI18n_default();
|
|
7781
|
-
const components = (0,
|
|
7782
|
-
const additionalData = (0,
|
|
7783
|
-
const currentExecutionId = (0,
|
|
7784
|
-
const isFlowInitialized = (0,
|
|
7785
|
-
const flowError = (0,
|
|
7786
|
-
const isSubmitting = (0,
|
|
7787
|
-
const isTimeoutDisabled = (0,
|
|
7788
|
-
const passkeyState = (0,
|
|
7986
|
+
const components = (0, import_vue50.ref)([]);
|
|
7987
|
+
const additionalData = (0, import_vue50.ref)({});
|
|
7988
|
+
const currentExecutionId = (0, import_vue50.ref)(null);
|
|
7989
|
+
const isFlowInitialized = (0, import_vue50.ref)(false);
|
|
7990
|
+
const flowError = (0, import_vue50.ref)(null);
|
|
7991
|
+
const isSubmitting = (0, import_vue50.ref)(false);
|
|
7992
|
+
const isTimeoutDisabled = (0, import_vue50.ref)(false);
|
|
7993
|
+
const passkeyState = (0, import_vue50.ref)({
|
|
7789
7994
|
actionId: null,
|
|
7790
7995
|
challenge: null,
|
|
7791
7996
|
creationOptions: null,
|
|
@@ -8044,16 +8249,16 @@ var SignIn2 = (0, import_vue55.defineComponent)({
|
|
|
8044
8249
|
setError(new Error(t("errors.signin.timeout") || "Time allowed to complete the step has expired."));
|
|
8045
8250
|
}, remaining * 1e3);
|
|
8046
8251
|
};
|
|
8047
|
-
(0,
|
|
8252
|
+
(0, import_vue50.watch)(
|
|
8048
8253
|
() => [additionalData.value?.["stepTimeout"], isFlowInitialized.value],
|
|
8049
8254
|
([timeoutMs]) => {
|
|
8050
8255
|
scheduleTimeout(Number(timeoutMs) || 0);
|
|
8051
8256
|
}
|
|
8052
8257
|
);
|
|
8053
|
-
(0,
|
|
8258
|
+
(0, import_vue50.onUnmounted)(() => {
|
|
8054
8259
|
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
8055
8260
|
});
|
|
8056
|
-
(0,
|
|
8261
|
+
(0, import_vue50.watch)(
|
|
8057
8262
|
() => passkeyState.value,
|
|
8058
8263
|
async (state) => {
|
|
8059
8264
|
if (!state.isActive || !state.challenge && !state.creationOptions || !state.executionId) return;
|
|
@@ -8115,13 +8320,13 @@ var SignIn2 = (0, import_vue55.defineComponent)({
|
|
|
8115
8320
|
processedFlag: oauthCodeProcessedFlag,
|
|
8116
8321
|
setExecutionId: persistExecutionId
|
|
8117
8322
|
});
|
|
8118
|
-
(0,
|
|
8323
|
+
(0, import_vue50.onMounted)(() => {
|
|
8119
8324
|
const urlParams = getUrlParams2();
|
|
8120
8325
|
if (urlParams.authId) {
|
|
8121
8326
|
sessionStorage.setItem(AUTH_ID_STORAGE_KEY, urlParams.authId);
|
|
8122
8327
|
}
|
|
8123
8328
|
});
|
|
8124
|
-
(0,
|
|
8329
|
+
(0, import_vue50.watch)(
|
|
8125
8330
|
() => [
|
|
8126
8331
|
isInitialized.value,
|
|
8127
8332
|
sdkLoading.value,
|
|
@@ -8153,9 +8358,9 @@ var SignIn2 = (0, import_vue55.defineComponent)({
|
|
|
8153
8358
|
meta: flowMeta.value,
|
|
8154
8359
|
onSubmit: handleSubmit
|
|
8155
8360
|
};
|
|
8156
|
-
return (0,
|
|
8361
|
+
return (0, import_vue50.h)("div", {}, slots["default"](renderProps));
|
|
8157
8362
|
}
|
|
8158
|
-
return (0,
|
|
8363
|
+
return (0, import_vue50.h)(BaseSignIn_default2, {
|
|
8159
8364
|
...attrs,
|
|
8160
8365
|
additionalData: additionalData.value,
|
|
8161
8366
|
class: props.className,
|
|
@@ -8173,8 +8378,8 @@ var SignIn2 = (0, import_vue55.defineComponent)({
|
|
|
8173
8378
|
});
|
|
8174
8379
|
var SignIn_default2 = SignIn2;
|
|
8175
8380
|
|
|
8176
|
-
// src/components/
|
|
8177
|
-
var SignIn3 = (0,
|
|
8381
|
+
// src/components/auth/sign-in/SignIn.ts
|
|
8382
|
+
var SignIn3 = (0, import_vue51.defineComponent)({
|
|
8178
8383
|
emits: ["error", "success"],
|
|
8179
8384
|
name: "SignIn",
|
|
8180
8385
|
props: {
|
|
@@ -8192,7 +8397,7 @@ var SignIn3 = (0, import_vue56.defineComponent)({
|
|
|
8192
8397
|
const { platform } = useAsgardeo_default();
|
|
8193
8398
|
return () => {
|
|
8194
8399
|
if (platform === import_browser44.Platform.AsgardeoV2) {
|
|
8195
|
-
return (0,
|
|
8400
|
+
return (0, import_vue51.h)(
|
|
8196
8401
|
SignIn_default2,
|
|
8197
8402
|
{
|
|
8198
8403
|
...attrs,
|
|
@@ -8205,7 +8410,7 @@ var SignIn3 = (0, import_vue56.defineComponent)({
|
|
|
8205
8410
|
slots
|
|
8206
8411
|
);
|
|
8207
8412
|
}
|
|
8208
|
-
return (0,
|
|
8413
|
+
return (0, import_vue51.h)(
|
|
8209
8414
|
SignIn_default,
|
|
8210
8415
|
{
|
|
8211
8416
|
...attrs,
|
|
@@ -8222,39 +8427,39 @@ var SignIn3 = (0, import_vue56.defineComponent)({
|
|
|
8222
8427
|
});
|
|
8223
8428
|
var SignIn_default3 = SignIn3;
|
|
8224
8429
|
|
|
8225
|
-
// src/components/
|
|
8430
|
+
// src/components/auth/sign-in/BaseSignIn.ts
|
|
8226
8431
|
var import_browser45 = require("@asgardeo/browser");
|
|
8227
|
-
var
|
|
8228
|
-
var BaseSignIn3 = (0,
|
|
8432
|
+
var import_vue52 = require("vue");
|
|
8433
|
+
var BaseSignIn3 = (0, import_vue52.defineComponent)({
|
|
8229
8434
|
inheritAttrs: false,
|
|
8230
8435
|
name: "BaseSignIn",
|
|
8231
8436
|
setup(_props, { attrs, slots }) {
|
|
8232
8437
|
const { platform } = useAsgardeo_default();
|
|
8233
8438
|
return () => {
|
|
8234
8439
|
if (platform === import_browser45.Platform.AsgardeoV2) {
|
|
8235
|
-
return (0,
|
|
8440
|
+
return (0, import_vue52.h)(BaseSignIn_default2, { ...attrs }, slots);
|
|
8236
8441
|
}
|
|
8237
|
-
return (0,
|
|
8442
|
+
return (0, import_vue52.h)(BaseSignIn_default, { ...attrs }, slots);
|
|
8238
8443
|
};
|
|
8239
8444
|
}
|
|
8240
8445
|
});
|
|
8241
8446
|
var BaseSignIn_default3 = BaseSignIn3;
|
|
8242
8447
|
|
|
8243
|
-
// src/components/
|
|
8448
|
+
// src/components/auth/sign-up/SignUp.ts
|
|
8244
8449
|
var import_browser51 = require("@asgardeo/browser");
|
|
8245
|
-
var
|
|
8450
|
+
var import_vue58 = require("vue");
|
|
8246
8451
|
|
|
8247
|
-
// src/components/
|
|
8452
|
+
// src/components/auth/sign-up/v1/SignUp.ts
|
|
8248
8453
|
var import_browser48 = require("@asgardeo/browser");
|
|
8249
|
-
var
|
|
8454
|
+
var import_vue55 = require("vue");
|
|
8250
8455
|
|
|
8251
|
-
// src/components/
|
|
8456
|
+
// src/components/auth/sign-up/v1/BaseSignUp.ts
|
|
8252
8457
|
var import_browser47 = require("@asgardeo/browser");
|
|
8253
|
-
var
|
|
8458
|
+
var import_vue54 = require("vue");
|
|
8254
8459
|
|
|
8255
|
-
// src/components/
|
|
8460
|
+
// src/components/auth/sign-up/v1/options/SignUpOptionFactory.ts
|
|
8256
8461
|
var import_browser46 = require("@asgardeo/browser");
|
|
8257
|
-
var
|
|
8462
|
+
var import_vue53 = require("vue");
|
|
8258
8463
|
var getInputName = (component) => {
|
|
8259
8464
|
const cfg = component.config || {};
|
|
8260
8465
|
return cfg.name || cfg.identifier || component.id;
|
|
@@ -8322,7 +8527,7 @@ var createSignUpComponent = (props) => {
|
|
|
8322
8527
|
switch (component.type) {
|
|
8323
8528
|
case import_browser46.EmbeddedFlowComponentType.Typography: {
|
|
8324
8529
|
const text = String(cfg.text || cfg.label || "");
|
|
8325
|
-
return (0,
|
|
8530
|
+
return (0, import_vue53.h)(
|
|
8326
8531
|
Typography_default,
|
|
8327
8532
|
{ style: "margin-bottom:0.5rem", variant: inferTypographyVariant(component) },
|
|
8328
8533
|
{ default: () => text }
|
|
@@ -8354,18 +8559,18 @@ var createSignUpComponent = (props) => {
|
|
|
8354
8559
|
const isPrimary = variant === "PRIMARY";
|
|
8355
8560
|
const handleClick = () => onSubmit(component, void 0);
|
|
8356
8561
|
if (matchesSocialProvider2(component, "google")) {
|
|
8357
|
-
return (0,
|
|
8562
|
+
return (0, import_vue53.h)(GoogleButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8358
8563
|
}
|
|
8359
8564
|
if (matchesSocialProvider2(component, "github")) {
|
|
8360
|
-
return (0,
|
|
8565
|
+
return (0, import_vue53.h)(GitHubButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8361
8566
|
}
|
|
8362
8567
|
if (matchesSocialProvider2(component, "microsoft")) {
|
|
8363
|
-
return (0,
|
|
8568
|
+
return (0, import_vue53.h)(MicrosoftButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8364
8569
|
}
|
|
8365
8570
|
if (matchesSocialProvider2(component, "facebook")) {
|
|
8366
|
-
return (0,
|
|
8571
|
+
return (0, import_vue53.h)(FacebookButton_default, { class: buttonClassName, isLoading, onClick: handleClick });
|
|
8367
8572
|
}
|
|
8368
|
-
return (0,
|
|
8573
|
+
return (0, import_vue53.h)(
|
|
8369
8574
|
Button_default,
|
|
8370
8575
|
{
|
|
8371
8576
|
class: buttonClassName,
|
|
@@ -8393,7 +8598,7 @@ var createSignUpComponent = (props) => {
|
|
|
8393
8598
|
return nodes;
|
|
8394
8599
|
}
|
|
8395
8600
|
case import_browser46.EmbeddedFlowComponentType.Divider: {
|
|
8396
|
-
return (0,
|
|
8601
|
+
return (0, import_vue53.h)("hr", {
|
|
8397
8602
|
class: "asgardeo-signup__divider",
|
|
8398
8603
|
style: "margin:0.75rem 0;border:0;border-top:1px solid #e5e7eb"
|
|
8399
8604
|
});
|
|
@@ -8402,12 +8607,12 @@ var createSignUpComponent = (props) => {
|
|
|
8402
8607
|
const src = String(cfg.src || cfg.url || "");
|
|
8403
8608
|
const alt = String(cfg.alt || "");
|
|
8404
8609
|
if (!src) return null;
|
|
8405
|
-
return (0,
|
|
8610
|
+
return (0, import_vue53.h)("img", { alt, src, style: "max-width:100%;height:auto;display:block;margin:0.5rem auto" });
|
|
8406
8611
|
}
|
|
8407
8612
|
default: {
|
|
8408
8613
|
if (String(component.type).toUpperCase() === "RICH_TEXT") {
|
|
8409
8614
|
const html = String(cfg.text || cfg.label || "");
|
|
8410
|
-
return (0,
|
|
8615
|
+
return (0, import_vue53.h)("div", { class: "asgardeo-signup__rich-text", innerHTML: html });
|
|
8411
8616
|
}
|
|
8412
8617
|
return null;
|
|
8413
8618
|
}
|
|
@@ -8436,9 +8641,9 @@ var renderSignUpComponents2 = (components, formValues, touchedFields, formErrors
|
|
|
8436
8641
|
return result;
|
|
8437
8642
|
};
|
|
8438
8643
|
|
|
8439
|
-
// src/components/
|
|
8644
|
+
// src/components/auth/sign-up/v1/BaseSignUp.ts
|
|
8440
8645
|
var logger6 = createVueLogger("BaseSignUpV1");
|
|
8441
|
-
var BaseSignUp = (0,
|
|
8646
|
+
var BaseSignUp = (0, import_vue54.defineComponent)({
|
|
8442
8647
|
emits: ["error", "flowChange", "complete"],
|
|
8443
8648
|
name: "BaseSignUpV1",
|
|
8444
8649
|
props: {
|
|
@@ -8473,12 +8678,12 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8473
8678
|
setup(props, { slots, emit }) {
|
|
8474
8679
|
const { t } = useI18n_default();
|
|
8475
8680
|
const { title: flowTitle, subtitle: flowSubtitle, messages: flowMessages, addMessage, clearMessages } = useFlow_default();
|
|
8476
|
-
const isLoading = (0,
|
|
8477
|
-
const isFlowInitialized = (0,
|
|
8478
|
-
const currentFlow = (0,
|
|
8479
|
-
const formValues = (0,
|
|
8480
|
-
const touchedFields = (0,
|
|
8481
|
-
const formErrors = (0,
|
|
8681
|
+
const isLoading = (0, import_vue54.ref)(false);
|
|
8682
|
+
const isFlowInitialized = (0, import_vue54.ref)(false);
|
|
8683
|
+
const currentFlow = (0, import_vue54.ref)(null);
|
|
8684
|
+
const formValues = (0, import_vue54.ref)({});
|
|
8685
|
+
const touchedFields = (0, import_vue54.ref)({});
|
|
8686
|
+
const formErrors = (0, import_vue54.ref)({});
|
|
8482
8687
|
let initializationAttempted = false;
|
|
8483
8688
|
const handleError = (err) => {
|
|
8484
8689
|
let errorMessage = t("errors.signup.flow.failure") || "Sign-up failed";
|
|
@@ -8668,7 +8873,7 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8668
8873
|
isLoading.value = false;
|
|
8669
8874
|
}
|
|
8670
8875
|
};
|
|
8671
|
-
(0,
|
|
8876
|
+
(0, import_vue54.watch)(
|
|
8672
8877
|
() => [props.isInitialized, isFlowInitialized.value],
|
|
8673
8878
|
([initialized, flowInit]) => {
|
|
8674
8879
|
if (!initialized || flowInit || initializationAttempted) return;
|
|
@@ -8723,20 +8928,20 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8723
8928
|
touched: touchedFields.value,
|
|
8724
8929
|
values: formValues.value
|
|
8725
8930
|
};
|
|
8726
|
-
return (0,
|
|
8931
|
+
return (0, import_vue54.h)("div", { class: containerClass }, slots["default"](renderProps));
|
|
8727
8932
|
}
|
|
8728
8933
|
if (!isFlowInitialized.value && isLoading.value) {
|
|
8729
|
-
return (0,
|
|
8934
|
+
return (0, import_vue54.h)(
|
|
8730
8935
|
Card_default,
|
|
8731
8936
|
{ class: containerClass, variant: props.variant },
|
|
8732
|
-
() => (0,
|
|
8937
|
+
() => (0, import_vue54.h)("div", { style: "display:flex;justify-content:center;padding:2rem" }, (0, import_vue54.h)(Spinner_default))
|
|
8733
8938
|
);
|
|
8734
8939
|
}
|
|
8735
8940
|
if (!currentFlow.value) {
|
|
8736
|
-
return (0,
|
|
8941
|
+
return (0, import_vue54.h)(
|
|
8737
8942
|
Card_default,
|
|
8738
8943
|
{ class: containerClass, variant: props.variant },
|
|
8739
|
-
() => (0,
|
|
8944
|
+
() => (0, import_vue54.h)(
|
|
8740
8945
|
Alert_default,
|
|
8741
8946
|
{ variant: "error" },
|
|
8742
8947
|
() => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
|
|
@@ -8761,33 +8966,33 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8761
8966
|
);
|
|
8762
8967
|
const cardChildren = [];
|
|
8763
8968
|
if (props.showLogo) {
|
|
8764
|
-
cardChildren.push((0,
|
|
8969
|
+
cardChildren.push((0, import_vue54.h)("div", { style: "display:flex;justify-content:center;margin-bottom:1rem" }, [(0, import_vue54.h)(Logo_default)]));
|
|
8765
8970
|
}
|
|
8766
8971
|
if (props.showTitle || props.showSubtitle) {
|
|
8767
8972
|
const headerChildren = [];
|
|
8768
8973
|
if (props.showTitle) {
|
|
8769
8974
|
headerChildren.push(
|
|
8770
|
-
(0,
|
|
8975
|
+
(0, import_vue54.h)(Typography_default, { variant: "h2" }, { default: () => flowTitle.value || t("signup.heading") || "Sign Up" })
|
|
8771
8976
|
);
|
|
8772
8977
|
}
|
|
8773
8978
|
if (props.showSubtitle) {
|
|
8774
8979
|
headerChildren.push(
|
|
8775
|
-
(0,
|
|
8980
|
+
(0, import_vue54.h)(
|
|
8776
8981
|
Typography_default,
|
|
8777
8982
|
{ variant: "body1" },
|
|
8778
8983
|
{ default: () => flowSubtitle.value || t("signup.subheading") || "Create your account" }
|
|
8779
8984
|
)
|
|
8780
8985
|
);
|
|
8781
8986
|
}
|
|
8782
|
-
cardChildren.push((0,
|
|
8987
|
+
cardChildren.push((0, import_vue54.h)("div", { style: "padding: 0 1rem 1rem" }, headerChildren));
|
|
8783
8988
|
}
|
|
8784
8989
|
if (flowMessages.value && flowMessages.value.length > 0) {
|
|
8785
8990
|
cardChildren.push(
|
|
8786
|
-
(0,
|
|
8991
|
+
(0, import_vue54.h)(
|
|
8787
8992
|
"div",
|
|
8788
8993
|
{ style: "padding: 0 1rem" },
|
|
8789
8994
|
flowMessages.value.map(
|
|
8790
|
-
(msg, i) => (0,
|
|
8995
|
+
(msg, i) => (0, import_vue54.h)(
|
|
8791
8996
|
Alert_default,
|
|
8792
8997
|
{
|
|
8793
8998
|
class: props.messageClassName,
|
|
@@ -8801,7 +9006,7 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8801
9006
|
);
|
|
8802
9007
|
}
|
|
8803
9008
|
cardChildren.push(
|
|
8804
|
-
(0,
|
|
9009
|
+
(0, import_vue54.h)(
|
|
8805
9010
|
"form",
|
|
8806
9011
|
{
|
|
8807
9012
|
class: (0, import_browser47.withVendorCSSClassPrefix)("signup__form"),
|
|
@@ -8812,7 +9017,7 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8812
9017
|
style: "padding: 1rem;display:flex;flex-direction:column;gap:0.75rem"
|
|
8813
9018
|
},
|
|
8814
9019
|
rendered.length > 0 ? rendered : [
|
|
8815
|
-
(0,
|
|
9020
|
+
(0, import_vue54.h)(
|
|
8816
9021
|
Alert_default,
|
|
8817
9022
|
{ variant: "warning" },
|
|
8818
9023
|
() => t("errors.signup.components.not.available") || "No components available"
|
|
@@ -8820,14 +9025,14 @@ var BaseSignUp = (0, import_vue59.defineComponent)({
|
|
|
8820
9025
|
]
|
|
8821
9026
|
)
|
|
8822
9027
|
);
|
|
8823
|
-
return (0,
|
|
9028
|
+
return (0, import_vue54.h)(Card_default, { class: containerClass, variant: props.variant }, () => cardChildren);
|
|
8824
9029
|
};
|
|
8825
9030
|
}
|
|
8826
9031
|
});
|
|
8827
9032
|
var BaseSignUp_default = BaseSignUp;
|
|
8828
9033
|
|
|
8829
|
-
// src/components/
|
|
8830
|
-
var SignUp = (0,
|
|
9034
|
+
// src/components/auth/sign-up/v1/SignUp.ts
|
|
9035
|
+
var SignUp = (0, import_vue55.defineComponent)({
|
|
8831
9036
|
name: "SignUpV1",
|
|
8832
9037
|
props: {
|
|
8833
9038
|
afterSignUpUrl: { default: void 0, type: String },
|
|
@@ -8871,7 +9076,7 @@ var SignUp = (0, import_vue60.defineComponent)({
|
|
|
8871
9076
|
}
|
|
8872
9077
|
}
|
|
8873
9078
|
};
|
|
8874
|
-
return () => (0,
|
|
9079
|
+
return () => (0, import_vue55.h)(
|
|
8875
9080
|
BaseSignUp_default,
|
|
8876
9081
|
{
|
|
8877
9082
|
afterSignUpUrl: props.afterSignUpUrl,
|
|
@@ -8896,13 +9101,13 @@ var SignUp = (0, import_vue60.defineComponent)({
|
|
|
8896
9101
|
});
|
|
8897
9102
|
var SignUp_default = SignUp;
|
|
8898
9103
|
|
|
8899
|
-
// src/components/
|
|
9104
|
+
// src/components/auth/sign-up/v2/SignUp.ts
|
|
8900
9105
|
var import_browser50 = require("@asgardeo/browser");
|
|
8901
|
-
var
|
|
9106
|
+
var import_vue57 = require("vue");
|
|
8902
9107
|
|
|
8903
|
-
// src/components/
|
|
9108
|
+
// src/components/auth/sign-up/v2/BaseSignUp.ts
|
|
8904
9109
|
var import_browser49 = require("@asgardeo/browser");
|
|
8905
|
-
var
|
|
9110
|
+
var import_vue56 = require("vue");
|
|
8906
9111
|
|
|
8907
9112
|
// src/utils/v2/getAuthComponentHeadings.ts
|
|
8908
9113
|
var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitle, defaultSubtitle) => {
|
|
@@ -8965,7 +9170,7 @@ var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitl
|
|
|
8965
9170
|
};
|
|
8966
9171
|
var getAuthComponentHeadings_default = getAuthComponentHeadings;
|
|
8967
9172
|
|
|
8968
|
-
// src/components/
|
|
9173
|
+
// src/components/auth/sign-up/v2/BaseSignUp.ts
|
|
8969
9174
|
var logger7 = createVueLogger("BaseSignUp");
|
|
8970
9175
|
var extractFormFields2 = (components) => {
|
|
8971
9176
|
const fields = [];
|
|
@@ -8983,7 +9188,7 @@ var extractFormFields2 = (components) => {
|
|
|
8983
9188
|
process(components);
|
|
8984
9189
|
return fields;
|
|
8985
9190
|
};
|
|
8986
|
-
var BaseSignUp2 = (0,
|
|
9191
|
+
var BaseSignUp2 = (0, import_vue56.defineComponent)({
|
|
8987
9192
|
emits: ["error", "complete", "flowChange"],
|
|
8988
9193
|
name: "BaseSignUp",
|
|
8989
9194
|
props: {
|
|
@@ -9023,22 +9228,22 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9023
9228
|
setup(props, { slots }) {
|
|
9024
9229
|
const { meta: flowMetaRef } = useFlowMeta_default();
|
|
9025
9230
|
const { t } = useI18n_default();
|
|
9026
|
-
const isLoading = (0,
|
|
9027
|
-
const isFlowInitialized = (0,
|
|
9028
|
-
const currentFlow = (0,
|
|
9029
|
-
const apiError = (0,
|
|
9030
|
-
const flowMessages = (0,
|
|
9031
|
-
const passkeyState = (0,
|
|
9231
|
+
const isLoading = (0, import_vue56.ref)(false);
|
|
9232
|
+
const isFlowInitialized = (0, import_vue56.ref)(false);
|
|
9233
|
+
const currentFlow = (0, import_vue56.ref)(null);
|
|
9234
|
+
const apiError = (0, import_vue56.ref)(null);
|
|
9235
|
+
const flowMessages = (0, import_vue56.ref)([]);
|
|
9236
|
+
const passkeyState = (0, import_vue56.ref)({
|
|
9032
9237
|
actionId: null,
|
|
9033
9238
|
creationOptions: null,
|
|
9034
9239
|
error: null,
|
|
9035
9240
|
flowId: null,
|
|
9036
9241
|
isActive: false
|
|
9037
9242
|
});
|
|
9038
|
-
const formValues = (0,
|
|
9039
|
-
const touchedFields = (0,
|
|
9040
|
-
const formErrors = (0,
|
|
9041
|
-
const isFormValid = (0,
|
|
9243
|
+
const formValues = (0, import_vue56.ref)({});
|
|
9244
|
+
const touchedFields = (0, import_vue56.ref)({});
|
|
9245
|
+
const formErrors = (0, import_vue56.ref)({});
|
|
9246
|
+
const isFormValid = (0, import_vue56.ref)(true);
|
|
9042
9247
|
let initializationAttempted = false;
|
|
9043
9248
|
let passkeyProcessed = false;
|
|
9044
9249
|
const handleError = (error) => {
|
|
@@ -9255,7 +9460,7 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9255
9460
|
isLoading.value = false;
|
|
9256
9461
|
}
|
|
9257
9462
|
};
|
|
9258
|
-
(0,
|
|
9463
|
+
(0, import_vue56.watch)(
|
|
9259
9464
|
() => passkeyState.value,
|
|
9260
9465
|
async (state) => {
|
|
9261
9466
|
if (!state.isActive || !state.creationOptions || !state.flowId) return;
|
|
@@ -9293,7 +9498,7 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9293
9498
|
},
|
|
9294
9499
|
{ deep: true }
|
|
9295
9500
|
);
|
|
9296
|
-
(0,
|
|
9501
|
+
(0, import_vue56.watch)(
|
|
9297
9502
|
() => [props.isInitialized, isFlowInitialized.value],
|
|
9298
9503
|
([initialized, flowInit]) => {
|
|
9299
9504
|
const urlParams = new URL(window.location.href).searchParams;
|
|
@@ -9354,20 +9559,20 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9354
9559
|
},
|
|
9355
9560
|
values: formValues.value
|
|
9356
9561
|
};
|
|
9357
|
-
return (0,
|
|
9562
|
+
return (0, import_vue56.h)("div", { class: containerClass }, slots["default"](renderProps));
|
|
9358
9563
|
}
|
|
9359
9564
|
if (!isFlowInitialized.value && isLoading.value) {
|
|
9360
|
-
return (0,
|
|
9565
|
+
return (0, import_vue56.h)(
|
|
9361
9566
|
Card_default,
|
|
9362
9567
|
{ class: containerClass, variant: props.variant },
|
|
9363
|
-
() => (0,
|
|
9568
|
+
() => (0, import_vue56.h)("div", { style: "display:flex;justify-content:center;padding:2rem" }, (0, import_vue56.h)(Spinner_default))
|
|
9364
9569
|
);
|
|
9365
9570
|
}
|
|
9366
9571
|
if (!currentFlow.value) {
|
|
9367
|
-
return (0,
|
|
9572
|
+
return (0, import_vue56.h)(
|
|
9368
9573
|
Card_default,
|
|
9369
9574
|
{ class: containerClass, variant: props.variant },
|
|
9370
|
-
() => (0,
|
|
9575
|
+
() => (0, import_vue56.h)(
|
|
9371
9576
|
Alert_default,
|
|
9372
9577
|
{ variant: "error" },
|
|
9373
9578
|
() => t("errors.signup.flow.initialization.failure") || "Failed to initialize sign-up flow"
|
|
@@ -9402,32 +9607,32 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9402
9607
|
variant: props.variant
|
|
9403
9608
|
}
|
|
9404
9609
|
) : [];
|
|
9405
|
-
return (0,
|
|
9610
|
+
return (0, import_vue56.h)(Card_default, { class: containerClass, variant: props.variant }, () => [
|
|
9406
9611
|
// Header with title/subtitle
|
|
9407
|
-
props.showTitle || props.showSubtitle ? (0,
|
|
9408
|
-
props.showTitle ? (0,
|
|
9409
|
-
props.showSubtitle ? (0,
|
|
9612
|
+
props.showTitle || props.showSubtitle ? (0, import_vue56.h)("div", { style: "padding: 1rem 1rem 0" }, [
|
|
9613
|
+
props.showTitle ? (0, import_vue56.h)(Typography_default, { variant: "h5" }, () => title) : null,
|
|
9614
|
+
props.showSubtitle ? (0, import_vue56.h)(Typography_default, { style: "margin-top: 0.25rem", variant: "body1" }, () => subtitle) : null
|
|
9410
9615
|
]) : null,
|
|
9411
9616
|
// External error
|
|
9412
|
-
props.error ? (0,
|
|
9617
|
+
props.error ? (0, import_vue56.h)(
|
|
9413
9618
|
"div",
|
|
9414
9619
|
{ style: "padding: 0 1rem" },
|
|
9415
|
-
(0,
|
|
9620
|
+
(0, import_vue56.h)(Alert_default, { variant: "error" }, () => props.error.message)
|
|
9416
9621
|
) : null,
|
|
9417
9622
|
// Flow messages
|
|
9418
|
-
flowMessages.value.length > 0 ? (0,
|
|
9623
|
+
flowMessages.value.length > 0 ? (0, import_vue56.h)(
|
|
9419
9624
|
"div",
|
|
9420
9625
|
{ style: "padding: 0 1rem" },
|
|
9421
9626
|
flowMessages.value.map(
|
|
9422
|
-
(msg, i) => (0,
|
|
9627
|
+
(msg, i) => (0, import_vue56.h)(Alert_default, { key: i, variant: msg.type === "error" ? "error" : "info" }, () => msg.message)
|
|
9423
9628
|
)
|
|
9424
9629
|
) : null,
|
|
9425
9630
|
// Components
|
|
9426
|
-
(0,
|
|
9631
|
+
(0, import_vue56.h)(
|
|
9427
9632
|
"div",
|
|
9428
9633
|
{ style: "padding: 1rem" },
|
|
9429
9634
|
renderedComponents.length > 0 ? renderedComponents : [
|
|
9430
|
-
(0,
|
|
9635
|
+
(0, import_vue56.h)(
|
|
9431
9636
|
Alert_default,
|
|
9432
9637
|
{ variant: "warning" },
|
|
9433
9638
|
() => t("errors.signup.components.not.available") || "No components available"
|
|
@@ -9440,8 +9645,8 @@ var BaseSignUp2 = (0, import_vue61.defineComponent)({
|
|
|
9440
9645
|
});
|
|
9441
9646
|
var BaseSignUp_default2 = BaseSignUp2;
|
|
9442
9647
|
|
|
9443
|
-
// src/components/
|
|
9444
|
-
var SignUp2 = (0,
|
|
9648
|
+
// src/components/auth/sign-up/v2/SignUp.ts
|
|
9649
|
+
var SignUp2 = (0, import_vue57.defineComponent)({
|
|
9445
9650
|
name: "SignUp",
|
|
9446
9651
|
props: {
|
|
9447
9652
|
afterSignUpUrl: { default: void 0, type: String },
|
|
@@ -9485,7 +9690,7 @@ var SignUp2 = (0, import_vue62.defineComponent)({
|
|
|
9485
9690
|
window.location.href = response.data.redirectURL;
|
|
9486
9691
|
}
|
|
9487
9692
|
};
|
|
9488
|
-
return () => (0,
|
|
9693
|
+
return () => (0, import_vue57.h)(
|
|
9489
9694
|
BaseSignUp_default2,
|
|
9490
9695
|
{
|
|
9491
9696
|
afterSignUpUrl: props.afterSignUpUrl,
|
|
@@ -9510,75 +9715,237 @@ var SignUp2 = (0, import_vue62.defineComponent)({
|
|
|
9510
9715
|
});
|
|
9511
9716
|
var SignUp_default2 = SignUp2;
|
|
9512
9717
|
|
|
9513
|
-
// src/components/
|
|
9514
|
-
var SignUp3 = (0,
|
|
9718
|
+
// src/components/auth/sign-up/SignUp.ts
|
|
9719
|
+
var SignUp3 = (0, import_vue58.defineComponent)({
|
|
9515
9720
|
inheritAttrs: false,
|
|
9516
9721
|
name: "SignUp",
|
|
9517
9722
|
setup(_props, { attrs, slots }) {
|
|
9518
9723
|
const { platform } = useAsgardeo_default();
|
|
9519
9724
|
return () => {
|
|
9520
9725
|
if (platform === import_browser51.Platform.AsgardeoV2) {
|
|
9521
|
-
return (0,
|
|
9726
|
+
return (0, import_vue58.h)(SignUp_default2, { ...attrs }, slots);
|
|
9522
9727
|
}
|
|
9523
|
-
return (0,
|
|
9728
|
+
return (0, import_vue58.h)(SignUp_default, { ...attrs }, slots);
|
|
9524
9729
|
};
|
|
9525
9730
|
}
|
|
9526
9731
|
});
|
|
9527
9732
|
var SignUp_default3 = SignUp3;
|
|
9528
9733
|
|
|
9529
|
-
// src/components/
|
|
9734
|
+
// src/components/auth/sign-up/BaseSignUp.ts
|
|
9530
9735
|
var import_browser52 = require("@asgardeo/browser");
|
|
9531
|
-
var
|
|
9532
|
-
var BaseSignUp3 = (0,
|
|
9736
|
+
var import_vue59 = require("vue");
|
|
9737
|
+
var BaseSignUp3 = (0, import_vue59.defineComponent)({
|
|
9533
9738
|
inheritAttrs: false,
|
|
9534
9739
|
name: "BaseSignUp",
|
|
9535
9740
|
setup(_props, { attrs, slots }) {
|
|
9536
9741
|
const { platform } = useAsgardeo_default();
|
|
9537
9742
|
return () => {
|
|
9538
9743
|
if (platform === import_browser52.Platform.AsgardeoV2) {
|
|
9539
|
-
return (0,
|
|
9744
|
+
return (0, import_vue59.h)(BaseSignUp_default2, { ...attrs }, slots);
|
|
9540
9745
|
}
|
|
9541
|
-
return (0,
|
|
9746
|
+
return (0, import_vue59.h)(BaseSignUp_default, { ...attrs }, slots);
|
|
9542
9747
|
};
|
|
9543
9748
|
}
|
|
9544
9749
|
});
|
|
9545
9750
|
var BaseSignUp_default3 = BaseSignUp3;
|
|
9546
9751
|
|
|
9752
|
+
// src/components/control/SignedIn.ts
|
|
9753
|
+
var import_vue60 = require("vue");
|
|
9754
|
+
var SignedIn = (0, import_vue60.defineComponent)({
|
|
9755
|
+
name: "SignedIn",
|
|
9756
|
+
setup(_props, { slots }) {
|
|
9757
|
+
const { isSignedIn } = useAsgardeo_default();
|
|
9758
|
+
return () => {
|
|
9759
|
+
if (!isSignedIn.value) {
|
|
9760
|
+
const fallbackContent = slots["fallback"]?.();
|
|
9761
|
+
return fallbackContent ? (0, import_vue60.h)(import_vue60.Fragment, {}, fallbackContent) : null;
|
|
9762
|
+
}
|
|
9763
|
+
const defaultContent = slots["default"]?.();
|
|
9764
|
+
return defaultContent ? (0, import_vue60.h)(import_vue60.Fragment, {}, defaultContent) : null;
|
|
9765
|
+
};
|
|
9766
|
+
}
|
|
9767
|
+
});
|
|
9768
|
+
var SignedIn_default = SignedIn;
|
|
9769
|
+
|
|
9770
|
+
// src/components/control/SignedOut.ts
|
|
9771
|
+
var import_vue61 = require("vue");
|
|
9772
|
+
var SignedOut = (0, import_vue61.defineComponent)({
|
|
9773
|
+
name: "SignedOut",
|
|
9774
|
+
setup(_props, { slots }) {
|
|
9775
|
+
const { isSignedIn } = useAsgardeo_default();
|
|
9776
|
+
return () => {
|
|
9777
|
+
if (isSignedIn.value) {
|
|
9778
|
+
const fallbackContent = slots["fallback"]?.();
|
|
9779
|
+
return fallbackContent ? (0, import_vue61.h)(import_vue61.Fragment, {}, fallbackContent) : null;
|
|
9780
|
+
}
|
|
9781
|
+
const defaultContent = slots["default"]?.();
|
|
9782
|
+
return defaultContent ? (0, import_vue61.h)(import_vue61.Fragment, {}, defaultContent) : null;
|
|
9783
|
+
};
|
|
9784
|
+
}
|
|
9785
|
+
});
|
|
9786
|
+
var SignedOut_default = SignedOut;
|
|
9787
|
+
|
|
9788
|
+
// src/components/control/Loading.ts
|
|
9789
|
+
var import_vue62 = require("vue");
|
|
9790
|
+
var Loading = (0, import_vue62.defineComponent)({
|
|
9791
|
+
name: "Loading",
|
|
9792
|
+
setup(_props, { slots }) {
|
|
9793
|
+
const { isLoading } = useAsgardeo_default();
|
|
9794
|
+
return () => {
|
|
9795
|
+
if (!isLoading.value) {
|
|
9796
|
+
const fallbackContent = slots["fallback"]?.();
|
|
9797
|
+
return fallbackContent ? (0, import_vue62.h)(import_vue62.Fragment, {}, fallbackContent) : null;
|
|
9798
|
+
}
|
|
9799
|
+
const defaultContent = slots["default"]?.();
|
|
9800
|
+
return defaultContent ? (0, import_vue62.h)(import_vue62.Fragment, {}, defaultContent) : null;
|
|
9801
|
+
};
|
|
9802
|
+
}
|
|
9803
|
+
});
|
|
9804
|
+
var Loading_default = Loading;
|
|
9805
|
+
|
|
9806
|
+
// src/components/presentation/user/User.ts
|
|
9807
|
+
var import_vue63 = require("vue");
|
|
9808
|
+
var User5 = (0, import_vue63.defineComponent)({
|
|
9809
|
+
name: "User",
|
|
9810
|
+
setup(_props, { slots }) {
|
|
9811
|
+
const { user } = useAsgardeo_default();
|
|
9812
|
+
return () => {
|
|
9813
|
+
if (!user.value) {
|
|
9814
|
+
const fallbackContent = slots["fallback"]?.();
|
|
9815
|
+
return fallbackContent ? (0, import_vue63.h)(import_vue63.Fragment, {}, fallbackContent) : null;
|
|
9816
|
+
}
|
|
9817
|
+
const defaultContent = slots["default"]?.({ user: user.value });
|
|
9818
|
+
return defaultContent ? (0, import_vue63.h)(import_vue63.Fragment, {}, defaultContent) : null;
|
|
9819
|
+
};
|
|
9820
|
+
}
|
|
9821
|
+
});
|
|
9822
|
+
var User_default = User5;
|
|
9823
|
+
|
|
9824
|
+
// src/components/presentation/organization/Organization.ts
|
|
9825
|
+
var import_vue64 = require("vue");
|
|
9826
|
+
var Organization5 = (0, import_vue64.defineComponent)({
|
|
9827
|
+
name: "Organization",
|
|
9828
|
+
setup(_props, { slots }) {
|
|
9829
|
+
const { currentOrganization } = useOrganization_default();
|
|
9830
|
+
return () => {
|
|
9831
|
+
if (!currentOrganization?.value) {
|
|
9832
|
+
const fallbackContent = slots["fallback"]?.();
|
|
9833
|
+
return fallbackContent ? (0, import_vue64.h)(import_vue64.Fragment, {}, fallbackContent) : null;
|
|
9834
|
+
}
|
|
9835
|
+
const defaultContent = slots["default"]?.({ organization: currentOrganization.value });
|
|
9836
|
+
return defaultContent ? (0, import_vue64.h)(import_vue64.Fragment, {}, defaultContent) : null;
|
|
9837
|
+
};
|
|
9838
|
+
}
|
|
9839
|
+
});
|
|
9840
|
+
var Organization_default = Organization5;
|
|
9841
|
+
|
|
9547
9842
|
// src/components/presentation/user-profile/UserProfile.ts
|
|
9548
|
-
var
|
|
9843
|
+
var import_browser56 = require("@asgardeo/browser");
|
|
9549
9844
|
var import_vue66 = require("vue");
|
|
9550
9845
|
|
|
9551
9846
|
// src/components/presentation/user-profile/BaseUserProfile.ts
|
|
9552
|
-
var
|
|
9847
|
+
var import_browser54 = require("@asgardeo/browser");
|
|
9553
9848
|
var import_vue65 = require("vue");
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9849
|
+
|
|
9850
|
+
// src/utils/getMappedUserProfileValue.ts
|
|
9851
|
+
var import_browser53 = require("@asgardeo/browser");
|
|
9852
|
+
var getMappedUserProfileValue = (key, mappings, user) => {
|
|
9853
|
+
if (!key || !mappings || !user) return void 0;
|
|
9854
|
+
const mapping = mappings[key];
|
|
9855
|
+
if (!mapping) return (0, import_browser53.get)(user, key);
|
|
9856
|
+
if (Array.isArray(mapping)) {
|
|
9857
|
+
let foundValue;
|
|
9858
|
+
let found = false;
|
|
9859
|
+
mapping.some((path) => {
|
|
9860
|
+
const value = (0, import_browser53.get)(user, path);
|
|
9861
|
+
if (value !== void 0 && value !== null && value !== "") {
|
|
9862
|
+
foundValue = value;
|
|
9863
|
+
found = true;
|
|
9864
|
+
return true;
|
|
9865
|
+
}
|
|
9866
|
+
return false;
|
|
9867
|
+
});
|
|
9868
|
+
return found ? foundValue : void 0;
|
|
9572
9869
|
}
|
|
9573
|
-
|
|
9870
|
+
return (0, import_browser53.get)(user, mapping);
|
|
9871
|
+
};
|
|
9872
|
+
var getMappedUserProfileValue_default = getMappedUserProfileValue;
|
|
9873
|
+
|
|
9874
|
+
// src/utils/getDisplayName.ts
|
|
9875
|
+
var getDisplayName = (mergedMappings, user, displayAttributes) => {
|
|
9876
|
+
if (displayAttributes && displayAttributes.length > 0) {
|
|
9877
|
+
let foundValue;
|
|
9878
|
+
displayAttributes.some((attr) => {
|
|
9879
|
+
const value = getMappedUserProfileValue_default(attr, mergedMappings, user);
|
|
9880
|
+
if (value !== void 0 && value !== null && value !== "") {
|
|
9881
|
+
foundValue = String(value);
|
|
9882
|
+
return true;
|
|
9883
|
+
}
|
|
9884
|
+
return false;
|
|
9885
|
+
});
|
|
9886
|
+
if (foundValue !== void 0) return foundValue;
|
|
9887
|
+
}
|
|
9888
|
+
const firstName = getMappedUserProfileValue_default("firstName", mergedMappings, user);
|
|
9889
|
+
const lastName = getMappedUserProfileValue_default("lastName", mergedMappings, user);
|
|
9890
|
+
if (firstName && lastName) return `${firstName} ${lastName}`;
|
|
9891
|
+
return getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user) || getMappedUserProfileValue_default("name", mergedMappings, user) || "User";
|
|
9892
|
+
};
|
|
9893
|
+
var getDisplayName_default = getDisplayName;
|
|
9894
|
+
|
|
9895
|
+
// src/components/presentation/user-profile/BaseUserProfile.ts
|
|
9896
|
+
var FIELDS_TO_SKIP = [
|
|
9897
|
+
"roles.default",
|
|
9898
|
+
"active",
|
|
9899
|
+
"groups",
|
|
9900
|
+
"accountLocked",
|
|
9901
|
+
"accountDisabled",
|
|
9902
|
+
"oneTimePassword",
|
|
9903
|
+
"userSourceId",
|
|
9904
|
+
"idpType",
|
|
9905
|
+
"localCredentialExists",
|
|
9906
|
+
"ResourceType",
|
|
9907
|
+
"ExternalID",
|
|
9908
|
+
"MetaData",
|
|
9909
|
+
"verifiedMobileNumbers",
|
|
9910
|
+
"verifiedEmailAddresses",
|
|
9911
|
+
"phoneNumbers.mobile",
|
|
9912
|
+
"emailAddresses",
|
|
9913
|
+
"preferredMFAOption"
|
|
9914
|
+
];
|
|
9915
|
+
var READONLY_FIELDS = ["username", "userName", "user_name"];
|
|
9916
|
+
var DEFAULT_ATTRIBUTE_MAPPINGS = {
|
|
9917
|
+
email: ["emails", "email"],
|
|
9918
|
+
firstName: ["name.givenName", "given_name"],
|
|
9919
|
+
lastName: ["name.familyName", "family_name"],
|
|
9920
|
+
picture: ["profile", "profileUrl", "picture", "URL"],
|
|
9921
|
+
username: ["userName", "username", "user_name"]
|
|
9574
9922
|
};
|
|
9575
|
-
var
|
|
9576
|
-
|
|
9577
|
-
|
|
9923
|
+
var AVATAR_GRADIENTS = [
|
|
9924
|
+
"linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)",
|
|
9925
|
+
"linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)",
|
|
9926
|
+
"linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)",
|
|
9927
|
+
"linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
|
|
9928
|
+
"linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)",
|
|
9929
|
+
"linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)",
|
|
9930
|
+
"linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
|
|
9931
|
+
"linear-gradient(135deg, #f97316 0%, #ec4899 100%)"
|
|
9932
|
+
];
|
|
9933
|
+
function getAvatarGradient(seed) {
|
|
9934
|
+
if (!seed) return AVATAR_GRADIENTS[0];
|
|
9935
|
+
let hash = 0;
|
|
9936
|
+
for (let i = 0; i < seed.length; i += 1) {
|
|
9937
|
+
hash = hash * 31 + seed.charCodeAt(i) >>> 0;
|
|
9938
|
+
}
|
|
9939
|
+
return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];
|
|
9940
|
+
}
|
|
9941
|
+
function formatLabel(key) {
|
|
9942
|
+
return key.split(/(?=[A-Z])|[_.]/).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
|
|
9943
|
+
}
|
|
9944
|
+
function buildScimPatchValue(flatKey, rawValue, schemaId, multiValued) {
|
|
9578
9945
|
if (flatKey === "phoneNumbers.mobile") {
|
|
9579
9946
|
return {
|
|
9580
9947
|
phoneNumbers: [{ type: "mobile", value: rawValue }],
|
|
9581
|
-
[
|
|
9948
|
+
[import_browser54.WellKnownSchemaIds.SystemUser]: { mobileNumbers: [rawValue] }
|
|
9582
9949
|
};
|
|
9583
9950
|
}
|
|
9584
9951
|
const complexMultiValued = /* @__PURE__ */ new Set([
|
|
@@ -9599,240 +9966,359 @@ var buildScimPatchValue = (flatKey, rawValue, schemas) => {
|
|
|
9599
9966
|
return { [head]: [{ type: tail, value: rawValue }] };
|
|
9600
9967
|
}
|
|
9601
9968
|
}
|
|
9602
|
-
const value =
|
|
9969
|
+
const value = multiValued ? [rawValue] : rawValue;
|
|
9970
|
+
if (schemaId && schemaId !== import_browser54.WellKnownSchemaIds.User) {
|
|
9971
|
+
return { [schemaId]: { [flatKey]: value } };
|
|
9972
|
+
}
|
|
9603
9973
|
const segments = flatKey.split(".");
|
|
9604
9974
|
const nested = {};
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9975
|
+
let cursor = nested;
|
|
9976
|
+
for (let i = 0; i < segments.length - 1; i += 1) {
|
|
9977
|
+
cursor[segments[i]] = {};
|
|
9978
|
+
cursor = cursor[segments[i]];
|
|
9609
9979
|
}
|
|
9980
|
+
cursor[segments[segments.length - 1]] = value;
|
|
9610
9981
|
return nested;
|
|
9611
|
-
}
|
|
9612
|
-
var AVATAR_GRADIENTS = [
|
|
9613
|
-
"linear-gradient(135deg, #a855f7 0%, #ec4899 100%)",
|
|
9614
|
-
"linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%)",
|
|
9615
|
-
"linear-gradient(135deg, #22c55e 0%, #10b981 100%)",
|
|
9616
|
-
"linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
|
|
9617
|
-
"linear-gradient(135deg, #ec4899 0%, #f43f5e 100%)",
|
|
9618
|
-
"linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)",
|
|
9619
|
-
"linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
|
|
9620
|
-
"linear-gradient(135deg, #f97316 0%, #eab308 100%)"
|
|
9621
|
-
];
|
|
9622
|
-
var getAvatarGradient = (seed) => {
|
|
9623
|
-
if (!seed) return AVATAR_GRADIENTS[0];
|
|
9624
|
-
let hash = 0;
|
|
9625
|
-
for (let i = 0; i < seed.length; i += 1) {
|
|
9626
|
-
const char = seed.charCodeAt(i);
|
|
9627
|
-
hash = hash * 31 + char >>> 0;
|
|
9628
|
-
}
|
|
9629
|
-
return AVATAR_GRADIENTS[Math.abs(hash) % AVATAR_GRADIENTS.length];
|
|
9630
|
-
};
|
|
9631
|
-
var getUserInitials = (user) => {
|
|
9632
|
-
if (!user) return "?";
|
|
9633
|
-
const given = String(user["givenName"] || user["firstName"] || "");
|
|
9634
|
-
const family = String(user["familyName"] || user["lastName"] || "");
|
|
9635
|
-
if (given || family) return `${given.charAt(0)}${family.charAt(0)}`.toUpperCase();
|
|
9636
|
-
const fallback = String(user["username"] || user["userName"] || user["email"] || user["sub"] || "");
|
|
9637
|
-
return fallback.charAt(0).toUpperCase() || "?";
|
|
9638
|
-
};
|
|
9982
|
+
}
|
|
9639
9983
|
var BaseUserProfile = (0, import_vue65.defineComponent)({
|
|
9640
9984
|
inheritAttrs: false,
|
|
9641
9985
|
name: "BaseUserProfile",
|
|
9642
9986
|
props: {
|
|
9987
|
+
/** Avatar circle size. */
|
|
9988
|
+
avatarSize: {
|
|
9989
|
+
default: "lg",
|
|
9990
|
+
type: String
|
|
9991
|
+
},
|
|
9643
9992
|
cardLayout: { default: true, type: Boolean },
|
|
9993
|
+
/** Shadow / border style of the Card wrapper. */
|
|
9994
|
+
cardVariant: {
|
|
9995
|
+
default: "elevated",
|
|
9996
|
+
type: String
|
|
9997
|
+
},
|
|
9644
9998
|
className: { default: "", type: String },
|
|
9999
|
+
/** Tighter field spacing for modal / dropdown contexts. */
|
|
10000
|
+
compact: { default: false, type: Boolean },
|
|
9645
10001
|
editable: { default: true, type: Boolean },
|
|
9646
10002
|
error: { default: null, type: String },
|
|
9647
10003
|
flattenedProfile: { default: null, type: Object },
|
|
9648
10004
|
hideFields: { default: () => [], type: Array },
|
|
9649
10005
|
isLoading: { default: false, type: Boolean },
|
|
9650
|
-
onUpdate: {
|
|
9651
|
-
default: void 0,
|
|
9652
|
-
type: Function
|
|
9653
|
-
},
|
|
10006
|
+
onUpdate: { default: void 0, type: Function },
|
|
9654
10007
|
profile: { default: null, type: Object },
|
|
9655
10008
|
schemas: { default: () => [], type: Array },
|
|
10009
|
+
/** Whether to render the avatar hero banner. */
|
|
10010
|
+
showAvatar: { default: true, type: Boolean },
|
|
9656
10011
|
showFields: { default: () => [], type: Array },
|
|
9657
10012
|
title: { default: "Profile", type: String }
|
|
9658
10013
|
},
|
|
9659
10014
|
setup(props, { slots }) {
|
|
9660
10015
|
const editingFields = (0, import_vue65.ref)({});
|
|
9661
10016
|
const editedValues = (0, import_vue65.ref)({});
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
10017
|
+
const px = import_browser54.withVendorCSSClassPrefix;
|
|
10018
|
+
function shouldShowField(fieldName) {
|
|
10019
|
+
if (FIELDS_TO_SKIP.includes(fieldName)) return false;
|
|
10020
|
+
if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(fieldName)) return false;
|
|
10021
|
+
if (props.showFields && props.showFields.length > 0) return props.showFields.includes(fieldName);
|
|
10022
|
+
return true;
|
|
10023
|
+
}
|
|
10024
|
+
function startEditing(fieldName, currentValue) {
|
|
10025
|
+
editedValues.value = { ...editedValues.value, [fieldName]: currentValue ?? "" };
|
|
10026
|
+
editingFields.value = { ...editingFields.value, [fieldName]: true };
|
|
10027
|
+
}
|
|
10028
|
+
function cancelEditing(fieldName) {
|
|
10029
|
+
const data = props.flattenedProfile || props.profile;
|
|
10030
|
+
const originalValue = data?.[fieldName] ?? "";
|
|
10031
|
+
editedValues.value = { ...editedValues.value, [fieldName]: originalValue };
|
|
10032
|
+
editingFields.value = { ...editingFields.value, [fieldName]: false };
|
|
10033
|
+
}
|
|
10034
|
+
function saveField(schema) {
|
|
10035
|
+
if (!props.onUpdate || !schema.name) return;
|
|
10036
|
+
const value = editedValues.value[schema.name] ?? "";
|
|
10037
|
+
const payload = buildScimPatchValue(
|
|
10038
|
+
schema.name,
|
|
10039
|
+
value,
|
|
10040
|
+
schema.schemaId,
|
|
10041
|
+
schema.multiValued
|
|
10042
|
+
);
|
|
10043
|
+
props.onUpdate(payload);
|
|
10044
|
+
editingFields.value = { ...editingFields.value, [schema.name]: false };
|
|
10045
|
+
}
|
|
10046
|
+
function renderInput(schema) {
|
|
10047
|
+
const fieldName = schema.name;
|
|
10048
|
+
const currentValue = editedValues.value[fieldName];
|
|
10049
|
+
switch (schema.type) {
|
|
10050
|
+
case "DATE_TIME":
|
|
10051
|
+
return (0, import_vue65.h)(DatePicker_default, {
|
|
10052
|
+
modelValue: String(currentValue ?? ""),
|
|
10053
|
+
"onUpdate:modelValue": (v) => {
|
|
10054
|
+
editedValues.value = { ...editedValues.value, [fieldName]: v };
|
|
10055
|
+
},
|
|
10056
|
+
placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,
|
|
10057
|
+
required: schema.required
|
|
10058
|
+
});
|
|
10059
|
+
case "BOOLEAN":
|
|
10060
|
+
return (0, import_vue65.h)(Checkbox_default, {
|
|
10061
|
+
label: schema.displayName || fieldName,
|
|
10062
|
+
modelValue: Boolean(currentValue),
|
|
10063
|
+
"onUpdate:modelValue": (v) => {
|
|
10064
|
+
editedValues.value = { ...editedValues.value, [fieldName]: v };
|
|
10065
|
+
}
|
|
10066
|
+
});
|
|
10067
|
+
default:
|
|
10068
|
+
return (0, import_vue65.h)(TextField_default, {
|
|
10069
|
+
modelValue: String(currentValue ?? ""),
|
|
10070
|
+
"onUpdate:modelValue": (v) => {
|
|
10071
|
+
editedValues.value = { ...editedValues.value, [fieldName]: v };
|
|
10072
|
+
},
|
|
10073
|
+
placeholder: `Enter your ${(schema.displayName || fieldName).toLowerCase()}`,
|
|
10074
|
+
required: schema.required
|
|
10075
|
+
});
|
|
9669
10076
|
}
|
|
9670
|
-
|
|
10077
|
+
}
|
|
10078
|
+
function renderSchemaFieldRow(schema) {
|
|
10079
|
+
const { name, displayName, description, mutability, value } = schema;
|
|
10080
|
+
if (!name || !shouldShowField(name)) return null;
|
|
10081
|
+
const label = displayName || description || formatLabel(name);
|
|
10082
|
+
const isReadonly = mutability === "READ_ONLY" || READONLY_FIELDS.includes(name);
|
|
10083
|
+
const isEditable = Boolean(props.editable) && !isReadonly;
|
|
10084
|
+
const isEditing = Boolean(editingFields.value[name]);
|
|
10085
|
+
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
10086
|
+
if (!hasValue && !isEditing && !(isEditable && mutability === "READ_WRITE")) return null;
|
|
10087
|
+
const editablePlaceholder = isEditable ? (0, import_vue65.h)(
|
|
10088
|
+
"span",
|
|
10089
|
+
{ class: px("user-profile__field-placeholder"), onClick: () => startEditing(name, value) },
|
|
10090
|
+
`Enter your ${label.toLowerCase()}`
|
|
10091
|
+
) : null;
|
|
10092
|
+
const displayValueNode = hasValue ? (0, import_vue65.h)(Typography_default, { class: px("user-profile__field-value"), variant: "body1" }, () => String(value)) : editablePlaceholder;
|
|
10093
|
+
return (0, import_vue65.h)("div", { class: px("user-profile__field"), key: name }, [
|
|
10094
|
+
(0, import_vue65.h)("div", { class: px("user-profile__field-label-col") }, [
|
|
10095
|
+
(0, import_vue65.h)(Typography_default, { class: px("user-profile__field-label"), variant: "body2" }, () => label)
|
|
10096
|
+
]),
|
|
10097
|
+
(0, import_vue65.h)("div", { class: px("user-profile__field-value-col") }, [
|
|
10098
|
+
isEditing ? (0, import_vue65.h)("div", { class: px("user-profile__field-edit") }, [
|
|
10099
|
+
renderInput(schema),
|
|
10100
|
+
(0, import_vue65.h)("div", { class: px("user-profile__field-edit-actions") }, [
|
|
10101
|
+
(0, import_vue65.h)(
|
|
10102
|
+
Button_default,
|
|
10103
|
+
{ onClick: () => saveField(schema), size: "small", variant: "solid" },
|
|
10104
|
+
() => "Save"
|
|
10105
|
+
),
|
|
10106
|
+
(0, import_vue65.h)(
|
|
10107
|
+
Button_default,
|
|
10108
|
+
{ onClick: () => cancelEditing(name), size: "small", variant: "text" },
|
|
10109
|
+
() => "Cancel"
|
|
10110
|
+
)
|
|
10111
|
+
])
|
|
10112
|
+
]) : (0, import_vue65.h)("div", { class: px("user-profile__field-display") }, [
|
|
10113
|
+
displayValueNode,
|
|
10114
|
+
isEditable ? (0, import_vue65.h)(
|
|
10115
|
+
"button",
|
|
10116
|
+
{
|
|
10117
|
+
"aria-label": `Edit ${label}`,
|
|
10118
|
+
class: px("user-profile__field-edit-btn"),
|
|
10119
|
+
onClick: () => startEditing(name, value),
|
|
10120
|
+
type: "button"
|
|
10121
|
+
},
|
|
10122
|
+
[(0, import_vue65.h)(PencilIcon)]
|
|
10123
|
+
) : null
|
|
10124
|
+
])
|
|
10125
|
+
])
|
|
10126
|
+
]);
|
|
10127
|
+
}
|
|
10128
|
+
function renderProfileWithoutSchemas() {
|
|
9671
10129
|
const data = props.flattenedProfile || props.profile;
|
|
9672
|
-
|
|
9673
|
-
|
|
10130
|
+
if (!data) return [];
|
|
10131
|
+
return Object.entries(data).filter(([key, value]) => {
|
|
10132
|
+
if (!shouldShowField(key)) return false;
|
|
10133
|
+
return value !== void 0 && value !== null && value !== "";
|
|
10134
|
+
}).sort(([a], [b]) => a.localeCompare(b)).map(
|
|
10135
|
+
([key, value]) => (0, import_vue65.h)("div", { class: px("user-profile__field"), key }, [
|
|
10136
|
+
(0, import_vue65.h)("div", { class: px("user-profile__field-label-col") }, [
|
|
10137
|
+
(0, import_vue65.h)(Typography_default, { class: px("user-profile__field-label"), variant: "body2" }, () => formatLabel(key))
|
|
10138
|
+
]),
|
|
10139
|
+
(0, import_vue65.h)("div", { class: px("user-profile__field-value-col") }, [
|
|
10140
|
+
(0, import_vue65.h)(
|
|
10141
|
+
Typography_default,
|
|
10142
|
+
{ class: px("user-profile__field-value"), variant: "body1" },
|
|
10143
|
+
() => typeof value === "object" ? JSON.stringify(value) : String(value)
|
|
10144
|
+
)
|
|
10145
|
+
])
|
|
10146
|
+
])
|
|
10147
|
+
);
|
|
10148
|
+
}
|
|
10149
|
+
function renderHero(currentUser) {
|
|
10150
|
+
const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS, currentUser);
|
|
10151
|
+
const email = getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS, currentUser) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS, currentUser);
|
|
9674
10152
|
const avatarSeed = String(
|
|
9675
|
-
|
|
10153
|
+
currentUser["username"] || currentUser["userName"] || currentUser["email"] || currentUser["sub"] || displayName
|
|
9676
10154
|
);
|
|
9677
10155
|
const avatarGradient = getAvatarGradient(avatarSeed);
|
|
9678
|
-
const
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
])
|
|
9683
|
-
);
|
|
9684
|
-
children.push((0, import_vue65.h)(Divider_default, { class: prefix("user-profile__header-divider") }));
|
|
9685
|
-
children.push(
|
|
9686
|
-
(0, import_vue65.h)("div", { class: prefix("user-profile__avatar-section") }, [
|
|
10156
|
+
const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
|
|
10157
|
+
const avatarSizeClass = px(`user-profile__avatar--${props.avatarSize ?? "lg"}`);
|
|
10158
|
+
return (0, import_vue65.h)("div", { class: px("user-profile__hero") }, [
|
|
10159
|
+
(0, import_vue65.h)("div", { class: px("user-profile__avatar-wrapper") }, [
|
|
9687
10160
|
(0, import_vue65.h)(
|
|
9688
10161
|
"div",
|
|
9689
|
-
{
|
|
9690
|
-
|
|
9691
|
-
style: { background: avatarGradient }
|
|
9692
|
-
},
|
|
9693
|
-
[(0, import_vue65.h)("span", { class: prefix("user-profile__avatar-initials") }, initials)]
|
|
10162
|
+
{ class: [px("user-profile__avatar"), avatarSizeClass].join(" "), style: { background: avatarGradient } },
|
|
10163
|
+
[(0, import_vue65.h)("span", { class: px("user-profile__avatar-initials") }, initials)]
|
|
9694
10164
|
)
|
|
10165
|
+
]),
|
|
10166
|
+
(0, import_vue65.h)("div", { class: px("user-profile__hero-info") }, [
|
|
10167
|
+
(0, import_vue65.h)("span", { class: px("user-profile__hero-name") }, displayName),
|
|
10168
|
+
email ? (0, import_vue65.h)("span", { class: px("user-profile__hero-subtitle") }, String(email)) : null
|
|
10169
|
+
])
|
|
10170
|
+
]);
|
|
10171
|
+
}
|
|
10172
|
+
return () => {
|
|
10173
|
+
const data = props.flattenedProfile || props.profile;
|
|
10174
|
+
if (!data && !props.isLoading) {
|
|
10175
|
+
return slots["default"] ? slots["default"]({ error: props.error, isLoading: props.isLoading, profile: null }) : null;
|
|
10176
|
+
}
|
|
10177
|
+
if (slots["default"]) {
|
|
10178
|
+
return slots["default"]({ error: props.error, isLoading: props.isLoading, profile: data });
|
|
10179
|
+
}
|
|
10180
|
+
const currentUser = data;
|
|
10181
|
+
const schemas = props.schemas ?? [];
|
|
10182
|
+
const hasSchemas = schemas.length > 0;
|
|
10183
|
+
const rootClasses = [
|
|
10184
|
+
px("user-profile"),
|
|
10185
|
+
props.compact ? px("user-profile--compact") : "",
|
|
10186
|
+
props.className ?? ""
|
|
10187
|
+
].filter(Boolean).join(" ");
|
|
10188
|
+
const children = [];
|
|
10189
|
+
children.push(
|
|
10190
|
+
(0, import_vue65.h)("div", { class: px("user-profile__header") }, [
|
|
10191
|
+
(0, import_vue65.h)("span", { class: px("user-profile__title") }, props.title ?? "Profile")
|
|
9695
10192
|
])
|
|
9696
10193
|
);
|
|
10194
|
+
children.push((0, import_vue65.h)(Divider_default, { class: px("user-profile__header-divider") }));
|
|
10195
|
+
if (props.showAvatar !== false && currentUser) {
|
|
10196
|
+
children.push(renderHero(currentUser));
|
|
10197
|
+
}
|
|
9697
10198
|
if (props.error) {
|
|
9698
|
-
children.push((0, import_vue65.h)(Alert_default, { class:
|
|
10199
|
+
children.push((0, import_vue65.h)(Alert_default, { class: px("user-profile__error"), severity: "error" }, () => props.error));
|
|
9699
10200
|
}
|
|
9700
10201
|
if (props.isLoading) {
|
|
9701
|
-
children.push((0, import_vue65.h)("div", { class:
|
|
9702
|
-
} else if (
|
|
9703
|
-
const
|
|
9704
|
-
|
|
9705
|
-
const
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
});
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
const key = descriptor.keys.find((k) => k in fieldDataRecord) ?? descriptor.keys[0];
|
|
9715
|
-
const value = fieldDataRecord[key];
|
|
9716
|
-
const isReadonly = descriptor.readonly;
|
|
9717
|
-
const isEditing = editingFields.value[key];
|
|
9718
|
-
const isEmpty2 = value == null || value === "";
|
|
9719
|
-
const { label } = descriptor;
|
|
9720
|
-
fieldRows.push(
|
|
9721
|
-
(0, import_vue65.h)("div", { class: prefix("user-profile__field"), key }, [
|
|
9722
|
-
// Label column
|
|
9723
|
-
(0, import_vue65.h)("div", { class: prefix("user-profile__field-label-col") }, [
|
|
9724
|
-
(0, import_vue65.h)(Typography_default, { class: prefix("user-profile__field-label"), variant: "body2" }, () => label)
|
|
9725
|
-
]),
|
|
9726
|
-
// Value column
|
|
9727
|
-
(0, import_vue65.h)("div", { class: prefix("user-profile__field-value-col") }, [
|
|
9728
|
-
isEditing ? (0, import_vue65.h)("div", { class: prefix("user-profile__field-edit") }, [
|
|
9729
|
-
(0, import_vue65.h)(TextField_default, {
|
|
9730
|
-
modelValue: editedValues.value[key] ?? String(value ?? ""),
|
|
9731
|
-
"onUpdate:modelValue": (v) => {
|
|
9732
|
-
editedValues.value = { ...editedValues.value, [key]: v };
|
|
9733
|
-
}
|
|
9734
|
-
}),
|
|
9735
|
-
(0, import_vue65.h)("div", { class: prefix("user-profile__field-edit-actions") }, [
|
|
9736
|
-
(0, import_vue65.h)(
|
|
9737
|
-
Button_default,
|
|
9738
|
-
{
|
|
9739
|
-
onClick: async () => {
|
|
9740
|
-
if (props.onUpdate) {
|
|
9741
|
-
await props.onUpdate({
|
|
9742
|
-
payload: buildScimPatchValue(key, editedValues.value[key] ?? "", props.schemas)
|
|
9743
|
-
});
|
|
9744
|
-
}
|
|
9745
|
-
editingFields.value = { ...editingFields.value, [key]: false };
|
|
9746
|
-
},
|
|
9747
|
-
size: "small",
|
|
9748
|
-
variant: "solid"
|
|
9749
|
-
},
|
|
9750
|
-
() => "Save"
|
|
9751
|
-
),
|
|
9752
|
-
(0, import_vue65.h)(
|
|
9753
|
-
Button_default,
|
|
9754
|
-
{
|
|
9755
|
-
onClick: () => {
|
|
9756
|
-
editingFields.value = { ...editingFields.value, [key]: false };
|
|
9757
|
-
},
|
|
9758
|
-
size: "small",
|
|
9759
|
-
variant: "text"
|
|
9760
|
-
},
|
|
9761
|
-
() => "Cancel"
|
|
9762
|
-
)
|
|
9763
|
-
])
|
|
9764
|
-
]) : (0, import_vue65.h)("div", { class: prefix("user-profile__field-display") }, [
|
|
9765
|
-
isEmpty2 ? (0, import_vue65.h)(
|
|
9766
|
-
"span",
|
|
9767
|
-
{
|
|
9768
|
-
class: prefix("user-profile__field-placeholder"),
|
|
9769
|
-
onClick: props.editable && !isReadonly ? () => {
|
|
9770
|
-
editingFields.value = { ...editingFields.value, [key]: true };
|
|
9771
|
-
editedValues.value = { ...editedValues.value, [key]: "" };
|
|
9772
|
-
} : void 0
|
|
9773
|
-
},
|
|
9774
|
-
`Enter your ${label.toLowerCase()}`
|
|
9775
|
-
) : (0, import_vue65.h)(
|
|
9776
|
-
Typography_default,
|
|
9777
|
-
{ class: prefix("user-profile__field-value"), variant: "body1" },
|
|
9778
|
-
() => String(value)
|
|
9779
|
-
),
|
|
9780
|
-
props.editable && !isReadonly ? (0, import_vue65.h)(
|
|
9781
|
-
"button",
|
|
9782
|
-
{
|
|
9783
|
-
"aria-label": `Edit ${label}`,
|
|
9784
|
-
class: prefix("user-profile__field-edit-btn"),
|
|
9785
|
-
onClick: () => {
|
|
9786
|
-
editingFields.value = { ...editingFields.value, [key]: true };
|
|
9787
|
-
editedValues.value = { ...editedValues.value, [key]: String(value ?? "") };
|
|
9788
|
-
},
|
|
9789
|
-
type: "button"
|
|
9790
|
-
},
|
|
9791
|
-
[(0, import_vue65.h)(PencilIcon)]
|
|
9792
|
-
) : null
|
|
9793
|
-
])
|
|
9794
|
-
])
|
|
9795
|
-
])
|
|
9796
|
-
);
|
|
9797
|
-
});
|
|
9798
|
-
children.push((0, import_vue65.h)("div", { class: prefix("user-profile__fields") }, fieldRows));
|
|
10202
|
+
children.push((0, import_vue65.h)("div", { class: px("user-profile__loading") }, [(0, import_vue65.h)(Spinner_default)]));
|
|
10203
|
+
} else if (hasSchemas) {
|
|
10204
|
+
const fieldRows = schemas.filter((s) => s.name && shouldShowField(s.name)).sort((a, b) => {
|
|
10205
|
+
const orderA = a.displayOrder ? parseInt(a.displayOrder, 10) : 999;
|
|
10206
|
+
const orderB = b.displayOrder ? parseInt(b.displayOrder, 10) : 999;
|
|
10207
|
+
return orderA - orderB;
|
|
10208
|
+
}).map((schema) => {
|
|
10209
|
+
const value = currentUser && schema.name ? currentUser[schema.name] : void 0;
|
|
10210
|
+
return renderSchemaFieldRow({ ...schema, value });
|
|
10211
|
+
}).filter((node) => node !== null);
|
|
10212
|
+
children.push((0, import_vue65.h)("div", { class: px("user-profile__fields") }, fieldRows));
|
|
10213
|
+
} else {
|
|
10214
|
+
children.push((0, import_vue65.h)("div", { class: px("user-profile__fields") }, renderProfileWithoutSchemas()));
|
|
9799
10215
|
}
|
|
9800
10216
|
if (slots["footer"]) {
|
|
9801
|
-
children.push((0, import_vue65.h)("div", { class:
|
|
10217
|
+
children.push((0, import_vue65.h)("div", { class: px("user-profile__footer") }, slots["footer"]()));
|
|
9802
10218
|
}
|
|
9803
10219
|
if (props.cardLayout) {
|
|
9804
|
-
return (0, import_vue65.h)(Card_default, { class:
|
|
10220
|
+
return (0, import_vue65.h)(Card_default, { class: rootClasses, variant: props.cardVariant ?? "elevated" }, () => children);
|
|
9805
10221
|
}
|
|
9806
|
-
return (0, import_vue65.h)("div", { class:
|
|
10222
|
+
return (0, import_vue65.h)("div", { class: rootClasses }, children);
|
|
9807
10223
|
};
|
|
9808
10224
|
}
|
|
9809
10225
|
});
|
|
9810
10226
|
var BaseUserProfile_default = BaseUserProfile;
|
|
9811
10227
|
|
|
10228
|
+
// src/api/updateMeProfile.ts
|
|
10229
|
+
var import_browser55 = require("@asgardeo/browser");
|
|
10230
|
+
var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
|
|
10231
|
+
const defaultFetcher = async (url, config) => {
|
|
10232
|
+
const client = import_browser55.AsgardeoSPAClient.getInstance(instanceId);
|
|
10233
|
+
const httpClient = client.httpRequest.bind(client);
|
|
10234
|
+
const response = await httpClient({
|
|
10235
|
+
data: config.body ? JSON.parse(config.body) : void 0,
|
|
10236
|
+
headers: config.headers,
|
|
10237
|
+
method: config.method || "PATCH",
|
|
10238
|
+
url
|
|
10239
|
+
});
|
|
10240
|
+
return {
|
|
10241
|
+
json: () => Promise.resolve(response.data),
|
|
10242
|
+
ok: response.status >= 200 && response.status < 300,
|
|
10243
|
+
status: response.status,
|
|
10244
|
+
statusText: response.statusText || "",
|
|
10245
|
+
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
10246
|
+
};
|
|
10247
|
+
};
|
|
10248
|
+
return (0, import_browser55.updateMeProfile)({
|
|
10249
|
+
...requestConfig,
|
|
10250
|
+
fetcher: fetcher || defaultFetcher
|
|
10251
|
+
});
|
|
10252
|
+
};
|
|
10253
|
+
var updateMeProfile_default = updateMeProfile;
|
|
10254
|
+
|
|
9812
10255
|
// src/components/presentation/user-profile/UserProfile.ts
|
|
9813
10256
|
var UserProfile3 = (0, import_vue66.defineComponent)({
|
|
9814
10257
|
name: "UserProfile",
|
|
9815
10258
|
props: {
|
|
10259
|
+
/** Avatar circle size. */
|
|
10260
|
+
avatarSize: {
|
|
10261
|
+
default: "lg",
|
|
10262
|
+
type: String
|
|
10263
|
+
},
|
|
10264
|
+
/** Whether to render the component inside a Card wrapper. */
|
|
9816
10265
|
cardLayout: { default: true, type: Boolean },
|
|
10266
|
+
/** Shadow / border style of the card wrapper. */
|
|
10267
|
+
cardVariant: {
|
|
10268
|
+
default: "elevated",
|
|
10269
|
+
type: String
|
|
10270
|
+
},
|
|
10271
|
+
/** Extra CSS class added to the root element. */
|
|
9817
10272
|
className: { default: "", type: String },
|
|
10273
|
+
/** Tighter spacing — useful when embedded in a modal or dropdown. */
|
|
10274
|
+
compact: { default: false, type: Boolean },
|
|
10275
|
+
/** Whether fields can be edited inline. */
|
|
9818
10276
|
editable: { default: true, type: Boolean },
|
|
10277
|
+
/** Fields to hide by name. */
|
|
9819
10278
|
hideFields: { default: () => [], type: Array },
|
|
10279
|
+
/** Whether to render the avatar hero section. */
|
|
10280
|
+
showAvatar: { default: true, type: Boolean },
|
|
10281
|
+
/** Fields to show exclusively (empty = show all). */
|
|
9820
10282
|
showFields: { default: () => [], type: Array },
|
|
10283
|
+
/** Card header title. */
|
|
9821
10284
|
title: { default: "Profile", type: String }
|
|
9822
10285
|
},
|
|
9823
10286
|
setup(props, { slots }) {
|
|
9824
|
-
const {
|
|
10287
|
+
const { baseUrl, instanceId } = useAsgardeo_default();
|
|
10288
|
+
const { flattenedProfile, profile, schemas, onUpdateProfile } = useUser_default();
|
|
10289
|
+
const { t } = useI18n_default();
|
|
10290
|
+
const error = (0, import_vue66.ref)(null);
|
|
10291
|
+
async function handleProfileUpdate(payload) {
|
|
10292
|
+
if (!baseUrl) return;
|
|
10293
|
+
error.value = null;
|
|
10294
|
+
try {
|
|
10295
|
+
const response = await updateMeProfile_default({ baseUrl, instanceId, payload });
|
|
10296
|
+
onUpdateProfile(response);
|
|
10297
|
+
} catch (caughtError) {
|
|
10298
|
+
let message = t("user.profile.update.generic.error") || "Failed to update profile. Please try again.";
|
|
10299
|
+
if (caughtError instanceof import_browser56.AsgardeoError) {
|
|
10300
|
+
message = caughtError.message;
|
|
10301
|
+
}
|
|
10302
|
+
error.value = message;
|
|
10303
|
+
}
|
|
10304
|
+
}
|
|
9825
10305
|
return () => (0, import_vue66.h)(
|
|
9826
10306
|
BaseUserProfile_default,
|
|
9827
10307
|
{
|
|
10308
|
+
avatarSize: props.avatarSize,
|
|
9828
10309
|
cardLayout: props.cardLayout,
|
|
9829
|
-
|
|
10310
|
+
cardVariant: props.cardVariant,
|
|
10311
|
+
class: (0, import_browser56.withVendorCSSClassPrefix)("user-profile--styled"),
|
|
9830
10312
|
className: props.className,
|
|
10313
|
+
compact: props.compact,
|
|
9831
10314
|
editable: props.editable,
|
|
10315
|
+
error: error.value,
|
|
9832
10316
|
flattenedProfile: flattenedProfile?.value,
|
|
9833
10317
|
hideFields: props.hideFields,
|
|
9834
|
-
onUpdate:
|
|
10318
|
+
onUpdate: handleProfileUpdate,
|
|
10319
|
+
profile: profile?.value?.profile ?? flattenedProfile?.value,
|
|
9835
10320
|
schemas: schemas?.value,
|
|
10321
|
+
showAvatar: props.showAvatar,
|
|
9836
10322
|
showFields: props.showFields,
|
|
9837
10323
|
title: props.title
|
|
9838
10324
|
},
|
|
@@ -9843,27 +10329,106 @@ var UserProfile3 = (0, import_vue66.defineComponent)({
|
|
|
9843
10329
|
var UserProfile_default = UserProfile3;
|
|
9844
10330
|
|
|
9845
10331
|
// src/components/presentation/user-dropdown/UserDropdown.ts
|
|
9846
|
-
var
|
|
10332
|
+
var import_browser58 = require("@asgardeo/browser");
|
|
9847
10333
|
var import_vue68 = require("vue");
|
|
9848
10334
|
|
|
9849
10335
|
// src/components/presentation/user-dropdown/BaseUserDropdown.ts
|
|
9850
|
-
var
|
|
10336
|
+
var import_browser57 = require("@asgardeo/browser");
|
|
9851
10337
|
var import_vue67 = require("vue");
|
|
10338
|
+
var DEFAULT_ATTRIBUTE_MAPPINGS2 = {
|
|
10339
|
+
email: ["emails", "email"],
|
|
10340
|
+
firstName: ["name.givenName", "given_name"],
|
|
10341
|
+
lastName: ["name.familyName", "family_name"],
|
|
10342
|
+
username: ["userName", "username", "user_name"]
|
|
10343
|
+
};
|
|
10344
|
+
var MENU_MIN_WIDTHS = { lg: 280, md: 220, sm: 180 };
|
|
10345
|
+
var AVATAR_GRADIENTS2 = [
|
|
10346
|
+
"linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)",
|
|
10347
|
+
"linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)",
|
|
10348
|
+
"linear-gradient(135deg, #10b981 0%, #0ea5e9 100%)",
|
|
10349
|
+
"linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)",
|
|
10350
|
+
"linear-gradient(135deg, #ec4899 0%, #7c3aed 100%)",
|
|
10351
|
+
"linear-gradient(135deg, #8b5cf6 0%, #4b6ef5 100%)",
|
|
10352
|
+
"linear-gradient(135deg, #14b8a6 0%, #0ea5e9 100%)",
|
|
10353
|
+
"linear-gradient(135deg, #f97316 0%, #ec4899 100%)"
|
|
10354
|
+
];
|
|
10355
|
+
function getAvatarGradient2(seed) {
|
|
10356
|
+
if (!seed) return AVATAR_GRADIENTS2[0];
|
|
10357
|
+
let hash = 0;
|
|
10358
|
+
for (let i = 0; i < seed.length; i += 1) {
|
|
10359
|
+
hash = hash * 31 + seed.charCodeAt(i) >>> 0;
|
|
10360
|
+
}
|
|
10361
|
+
return AVATAR_GRADIENTS2[Math.abs(hash) % AVATAR_GRADIENTS2.length];
|
|
10362
|
+
}
|
|
10363
|
+
function resolveUserInfo(user) {
|
|
10364
|
+
if (!user) {
|
|
10365
|
+
return { displayName: "User", gradient: AVATAR_GRADIENTS2[0], initials: "?", subtitle: "" };
|
|
10366
|
+
}
|
|
10367
|
+
const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS2, user) || "User";
|
|
10368
|
+
const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
|
|
10369
|
+
const seed = String(
|
|
10370
|
+
getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || displayName
|
|
10371
|
+
);
|
|
10372
|
+
const subtitle = String(
|
|
10373
|
+
getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS2, user) || ""
|
|
10374
|
+
);
|
|
10375
|
+
return { displayName, gradient: getAvatarGradient2(seed), initials, subtitle };
|
|
10376
|
+
}
|
|
9852
10377
|
var BaseUserDropdown = (0, import_vue67.defineComponent)({
|
|
9853
10378
|
inheritAttrs: false,
|
|
9854
10379
|
name: "BaseUserDropdown",
|
|
9855
10380
|
props: {
|
|
9856
10381
|
className: { default: "", type: String },
|
|
9857
10382
|
isProfileModalOpen: { default: false, type: Boolean },
|
|
10383
|
+
/**
|
|
10384
|
+
* How to align the dropdown panel relative to the trigger.
|
|
10385
|
+
* - `'auto'` (default) — opens toward the side with more viewport space.
|
|
10386
|
+
* - `'left'` — panel left edge aligns with trigger left edge.
|
|
10387
|
+
* - `'right'` — panel right edge aligns with trigger right edge.
|
|
10388
|
+
*/
|
|
10389
|
+
menuAlign: { default: "auto", type: String },
|
|
10390
|
+
/**
|
|
10391
|
+
* Extra items rendered between the Profile link and Sign Out.
|
|
10392
|
+
* Each item can carry an icon, a danger flag, and a separatorBefore flag.
|
|
10393
|
+
*/
|
|
10394
|
+
menuItems: { default: void 0, type: Array },
|
|
9858
10395
|
onProfileClick: { default: void 0, type: Function },
|
|
9859
10396
|
onProfileModalClose: { default: void 0, type: Function },
|
|
9860
10397
|
onSignOut: { default: void 0, type: Function },
|
|
9861
10398
|
profileContent: { default: null, type: Object },
|
|
10399
|
+
/** Show the animated chevron on the trigger. Default `false`. */
|
|
10400
|
+
showChevron: { default: false, type: Boolean },
|
|
10401
|
+
/** Controls avatar size on the trigger and spacing density of the menu. */
|
|
10402
|
+
size: { default: "md", type: String },
|
|
9862
10403
|
user: { default: null, type: Object }
|
|
9863
10404
|
},
|
|
9864
10405
|
setup(props, { slots }) {
|
|
9865
10406
|
const isOpen = (0, import_vue67.ref)(false);
|
|
9866
|
-
const
|
|
10407
|
+
const containerRef = (0, import_vue67.ref)(null);
|
|
10408
|
+
const px = import_browser57.withVendorCSSClassPrefix;
|
|
10409
|
+
function handleClickOutside(event) {
|
|
10410
|
+
if (containerRef.value && !containerRef.value.contains(event.target)) {
|
|
10411
|
+
isOpen.value = false;
|
|
10412
|
+
}
|
|
10413
|
+
}
|
|
10414
|
+
function handleKeyDown(event) {
|
|
10415
|
+
if (event.key === "Escape") isOpen.value = false;
|
|
10416
|
+
}
|
|
10417
|
+
(0, import_vue67.onMounted)(() => {
|
|
10418
|
+
document.addEventListener("click", handleClickOutside);
|
|
10419
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
10420
|
+
});
|
|
10421
|
+
(0, import_vue67.onUnmounted)(() => {
|
|
10422
|
+
document.removeEventListener("click", handleClickOutside);
|
|
10423
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
10424
|
+
});
|
|
10425
|
+
function resolveMenuAlign() {
|
|
10426
|
+
if (props.menuAlign !== "auto") return props.menuAlign;
|
|
10427
|
+
if (!containerRef.value) return "right";
|
|
10428
|
+
const rect = containerRef.value.getBoundingClientRect();
|
|
10429
|
+
const menuWidth = MENU_MIN_WIDTHS[props.size ?? "md"] ?? 220;
|
|
10430
|
+
return window.innerWidth - rect.right >= menuWidth ? "right" : "left";
|
|
10431
|
+
}
|
|
9867
10432
|
return () => {
|
|
9868
10433
|
if (slots["default"]) {
|
|
9869
10434
|
return slots["default"]({
|
|
@@ -9874,85 +10439,148 @@ var BaseUserDropdown = (0, import_vue67.defineComponent)({
|
|
|
9874
10439
|
user: props.user
|
|
9875
10440
|
});
|
|
9876
10441
|
}
|
|
9877
|
-
const
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
|
|
9884
|
-
|
|
9885
|
-
|
|
9886
|
-
|
|
9887
|
-
|
|
9888
|
-
|
|
9889
|
-
|
|
9890
|
-
|
|
9891
|
-
|
|
9892
|
-
|
|
9893
|
-
children.push(
|
|
9894
|
-
(0, import_vue67.h)(
|
|
9895
|
-
"button",
|
|
9896
|
-
{
|
|
9897
|
-
class: prefix("user-dropdown__trigger"),
|
|
9898
|
-
onClick: () => {
|
|
9899
|
-
isOpen.value = !isOpen.value;
|
|
9900
|
-
},
|
|
9901
|
-
type: "button"
|
|
10442
|
+
const { displayName, initials, gradient, subtitle } = resolveUserInfo(props.user ?? null);
|
|
10443
|
+
const size = props.size ?? "md";
|
|
10444
|
+
const avatarSizeClass = size !== "md" ? px(`user-dropdown__avatar--${size}`) : "";
|
|
10445
|
+
const triggerClass = [
|
|
10446
|
+
px("user-dropdown__trigger"),
|
|
10447
|
+
isOpen.value ? px("user-dropdown__trigger--open") : ""
|
|
10448
|
+
].filter(Boolean).join(" ");
|
|
10449
|
+
const trigger = (0, import_vue67.h)(
|
|
10450
|
+
"button",
|
|
10451
|
+
{
|
|
10452
|
+
"aria-expanded": isOpen.value,
|
|
10453
|
+
"aria-haspopup": "true",
|
|
10454
|
+
class: triggerClass,
|
|
10455
|
+
onClick: (e) => {
|
|
10456
|
+
e.stopPropagation();
|
|
10457
|
+
isOpen.value = !isOpen.value;
|
|
9902
10458
|
},
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
|
|
10459
|
+
type: "button"
|
|
10460
|
+
},
|
|
10461
|
+
[
|
|
10462
|
+
(0, import_vue67.h)(
|
|
10463
|
+
"span",
|
|
10464
|
+
{
|
|
10465
|
+
class: [px("user-dropdown__avatar"), avatarSizeClass].filter(Boolean).join(" "),
|
|
10466
|
+
style: { background: gradient }
|
|
10467
|
+
},
|
|
10468
|
+
initials
|
|
10469
|
+
),
|
|
10470
|
+
props.showChevron ? (0, import_vue67.h)("span", { class: px("user-dropdown__chevron") }, [(0, import_vue67.h)(ChevronDownIcon, { size: 14 })]) : null
|
|
10471
|
+
]
|
|
9909
10472
|
);
|
|
10473
|
+
let menu = null;
|
|
9910
10474
|
if (isOpen.value) {
|
|
9911
|
-
const
|
|
9912
|
-
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
10475
|
+
const resolvedAlign = resolveMenuAlign();
|
|
10476
|
+
const alignClass = resolvedAlign === "left" ? px("user-dropdown__menu--align-left") : "";
|
|
10477
|
+
const sizeClass = size !== "md" ? px(`user-dropdown__menu--size-${size}`) : "";
|
|
10478
|
+
const menuClass = [px("user-dropdown__menu"), alignClass, sizeClass].filter(Boolean).join(" ");
|
|
10479
|
+
const menuChildren = [];
|
|
10480
|
+
menuChildren.push(
|
|
10481
|
+
(0, import_vue67.h)("div", { class: px("user-dropdown__menu-header") }, [
|
|
10482
|
+
(0, import_vue67.h)("div", { class: px("user-dropdown__menu-header-avatar"), style: { background: gradient } }, initials),
|
|
10483
|
+
(0, import_vue67.h)("div", { class: px("user-dropdown__menu-header-info") }, [
|
|
10484
|
+
(0, import_vue67.h)("span", { class: px("user-dropdown__menu-header-name") }, displayName),
|
|
10485
|
+
subtitle ? (0, import_vue67.h)("span", { class: px("user-dropdown__menu-header-subtitle") }, subtitle) : null
|
|
9917
10486
|
])
|
|
10487
|
+
])
|
|
10488
|
+
);
|
|
10489
|
+
menuChildren.push((0, import_vue67.h)("div", { class: px("user-dropdown__menu-divider") }));
|
|
10490
|
+
if (props.onProfileClick) {
|
|
10491
|
+
menuChildren.push(
|
|
10492
|
+
(0, import_vue67.h)(
|
|
10493
|
+
"button",
|
|
10494
|
+
{
|
|
10495
|
+
class: px("user-dropdown__item"),
|
|
10496
|
+
onClick: () => {
|
|
10497
|
+
isOpen.value = false;
|
|
10498
|
+
props.onProfileClick();
|
|
10499
|
+
},
|
|
10500
|
+
type: "button"
|
|
10501
|
+
},
|
|
10502
|
+
[(0, import_vue67.h)(UserIcon, { size: 15 }), (0, import_vue67.h)("span", null, "Profile")]
|
|
10503
|
+
)
|
|
9918
10504
|
);
|
|
9919
10505
|
}
|
|
10506
|
+
if (props.menuItems && props.menuItems.length > 0) {
|
|
10507
|
+
props.menuItems.forEach((item, idx) => {
|
|
10508
|
+
if (item.separatorBefore) {
|
|
10509
|
+
menuChildren.push((0, import_vue67.h)("div", { class: px("user-dropdown__menu-divider"), key: `sep-${idx}` }));
|
|
10510
|
+
}
|
|
10511
|
+
menuChildren.push(
|
|
10512
|
+
(0, import_vue67.h)(
|
|
10513
|
+
"button",
|
|
10514
|
+
{
|
|
10515
|
+
class: [px("user-dropdown__item"), item.danger ? px("user-dropdown__item--danger") : ""].filter(Boolean).join(" "),
|
|
10516
|
+
key: `item-${idx}`,
|
|
10517
|
+
onClick: () => {
|
|
10518
|
+
isOpen.value = false;
|
|
10519
|
+
item.onClick();
|
|
10520
|
+
},
|
|
10521
|
+
type: "button"
|
|
10522
|
+
},
|
|
10523
|
+
[item.icon ?? null, (0, import_vue67.h)("span", null, item.label)]
|
|
10524
|
+
)
|
|
10525
|
+
);
|
|
10526
|
+
});
|
|
10527
|
+
}
|
|
9920
10528
|
if (slots["items"]) {
|
|
9921
|
-
|
|
10529
|
+
menuChildren.push(...slots["items"]() ?? []);
|
|
9922
10530
|
}
|
|
9923
10531
|
if (props.onSignOut) {
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
10532
|
+
menuChildren.push((0, import_vue67.h)("div", { class: px("user-dropdown__menu-divider") }));
|
|
10533
|
+
menuChildren.push(
|
|
10534
|
+
(0, import_vue67.h)(
|
|
10535
|
+
"button",
|
|
10536
|
+
{
|
|
10537
|
+
class: [px("user-dropdown__item"), px("user-dropdown__item--danger")].join(" "),
|
|
10538
|
+
onClick: () => {
|
|
10539
|
+
isOpen.value = false;
|
|
10540
|
+
props.onSignOut();
|
|
10541
|
+
},
|
|
10542
|
+
type: "button"
|
|
10543
|
+
},
|
|
10544
|
+
[(0, import_vue67.h)(LogOutIcon, { size: 15 }), (0, import_vue67.h)("span", null, "Sign Out")]
|
|
10545
|
+
)
|
|
9929
10546
|
);
|
|
9930
10547
|
}
|
|
9931
|
-
|
|
10548
|
+
menu = (0, import_vue67.h)("div", { class: menuClass }, menuChildren.filter(Boolean));
|
|
9932
10549
|
}
|
|
9933
10550
|
const container = (0, import_vue67.h)(
|
|
9934
10551
|
"div",
|
|
9935
|
-
{ class: [
|
|
9936
|
-
|
|
10552
|
+
{ class: [px("user-dropdown"), props.className].filter(Boolean).join(" "), ref: containerRef },
|
|
10553
|
+
[trigger, menu]
|
|
9937
10554
|
);
|
|
9938
10555
|
if (props.isProfileModalOpen) {
|
|
9939
10556
|
return (0, import_vue67.h)("div", [
|
|
9940
10557
|
container,
|
|
9941
|
-
(0, import_vue67.h)(
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
),
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
10558
|
+
(0, import_vue67.h)(
|
|
10559
|
+
"div",
|
|
10560
|
+
{
|
|
10561
|
+
class: px("user-dropdown__modal-overlay"),
|
|
10562
|
+
onClick: (e) => {
|
|
10563
|
+
if (e.target.classList.contains(px("user-dropdown__modal-overlay"))) {
|
|
10564
|
+
props.onProfileModalClose?.();
|
|
10565
|
+
}
|
|
10566
|
+
}
|
|
10567
|
+
},
|
|
10568
|
+
[
|
|
10569
|
+
(0, import_vue67.h)("div", { class: px("user-dropdown__modal-content") }, [
|
|
10570
|
+
(0, import_vue67.h)(
|
|
10571
|
+
"button",
|
|
10572
|
+
{
|
|
10573
|
+
"aria-label": "Close profile",
|
|
10574
|
+
class: px("user-dropdown__modal-close"),
|
|
10575
|
+
onClick: props.onProfileModalClose,
|
|
10576
|
+
type: "button"
|
|
10577
|
+
},
|
|
10578
|
+
[(0, import_vue67.h)(XIcon, { size: 18 })]
|
|
10579
|
+
),
|
|
10580
|
+
props.profileContent
|
|
10581
|
+
])
|
|
10582
|
+
]
|
|
10583
|
+
)
|
|
9956
10584
|
]);
|
|
9957
10585
|
}
|
|
9958
10586
|
return container;
|
|
@@ -9966,8 +10594,38 @@ var UserDropdown = (0, import_vue68.defineComponent)({
|
|
|
9966
10594
|
emits: ["profileClick"],
|
|
9967
10595
|
name: "UserDropdown",
|
|
9968
10596
|
props: {
|
|
9969
|
-
|
|
9970
|
-
|
|
10597
|
+
/** Extra CSS class added to the root element. */
|
|
10598
|
+
className: { default: "", type: String },
|
|
10599
|
+
/**
|
|
10600
|
+
* How to align the dropdown panel relative to the trigger button.
|
|
10601
|
+
* - `'auto'` (default) — picks the side with more available viewport space at open time.
|
|
10602
|
+
* - `'left'` — panel left edge aligns with trigger left edge.
|
|
10603
|
+
* - `'right'` — panel right edge aligns with trigger right edge.
|
|
10604
|
+
*/
|
|
10605
|
+
menuAlign: {
|
|
10606
|
+
default: "auto",
|
|
10607
|
+
type: String
|
|
10608
|
+
},
|
|
10609
|
+
/**
|
|
10610
|
+
* Extra items inserted between the Profile link and Sign Out.
|
|
10611
|
+
* Set `separatorBefore: true` on any item to add a divider line before it.
|
|
10612
|
+
* Set `danger: true` for destructive actions (red styling).
|
|
10613
|
+
* Pass an `icon` VNode to render an icon to the left of the label.
|
|
10614
|
+
*/
|
|
10615
|
+
menuItems: {
|
|
10616
|
+
default: void 0,
|
|
10617
|
+
type: Array
|
|
10618
|
+
},
|
|
10619
|
+
/** Whether to show the animated down-chevron beside the avatar. Default `false`. */
|
|
10620
|
+
showChevron: { default: false, type: Boolean },
|
|
10621
|
+
/**
|
|
10622
|
+
* Overall density / avatar size of the component.
|
|
10623
|
+
* - `'sm'` — 28 px avatar, compact menu (180 px min-width).
|
|
10624
|
+
* - `'md'` (default) — 32 px avatar, standard menu (220 px min-width).
|
|
10625
|
+
* - `'lg'` — 38 px avatar, spacious menu (280 px min-width).
|
|
10626
|
+
*/
|
|
10627
|
+
size: {
|
|
10628
|
+
default: "md",
|
|
9971
10629
|
type: String
|
|
9972
10630
|
}
|
|
9973
10631
|
},
|
|
@@ -9977,9 +10635,11 @@ var UserDropdown = (0, import_vue68.defineComponent)({
|
|
|
9977
10635
|
return () => (0, import_vue68.h)(
|
|
9978
10636
|
BaseUserDropdown_default,
|
|
9979
10637
|
{
|
|
9980
|
-
class: (0,
|
|
10638
|
+
class: (0, import_browser58.withVendorCSSClassPrefix)("user-dropdown--styled"),
|
|
9981
10639
|
className: props.className,
|
|
9982
10640
|
isProfileModalOpen: isProfileModalOpen.value,
|
|
10641
|
+
menuAlign: props.menuAlign,
|
|
10642
|
+
menuItems: props.menuItems,
|
|
9983
10643
|
onProfileClick: () => {
|
|
9984
10644
|
isProfileModalOpen.value = true;
|
|
9985
10645
|
emit("profileClick");
|
|
@@ -9992,8 +10652,11 @@ var UserDropdown = (0, import_vue68.defineComponent)({
|
|
|
9992
10652
|
},
|
|
9993
10653
|
profileContent: isProfileModalOpen.value ? (0, import_vue68.h)(UserProfile_default, {
|
|
9994
10654
|
cardLayout: false,
|
|
10655
|
+
compact: true,
|
|
9995
10656
|
editable: true
|
|
9996
10657
|
}) : null,
|
|
10658
|
+
showChevron: props.showChevron,
|
|
10659
|
+
size: props.size,
|
|
9997
10660
|
user: user.value
|
|
9998
10661
|
},
|
|
9999
10662
|
slots
|
|
@@ -10006,7 +10669,7 @@ var UserDropdown_default = UserDropdown;
|
|
|
10006
10669
|
var import_vue70 = require("vue");
|
|
10007
10670
|
|
|
10008
10671
|
// src/components/presentation/accept-invite/BaseAcceptInvite.ts
|
|
10009
|
-
var
|
|
10672
|
+
var import_browser59 = require("@asgardeo/browser");
|
|
10010
10673
|
var import_vue69 = require("vue");
|
|
10011
10674
|
var BaseAcceptInvite = (0, import_vue69.defineComponent)({
|
|
10012
10675
|
name: "BaseAcceptInvite",
|
|
@@ -10234,7 +10897,7 @@ var BaseAcceptInvite = (0, import_vue69.defineComponent)({
|
|
|
10234
10897
|
(comp) => !(comp.type === "TEXT" && (comp.variant === "HEADING_1" || comp.variant === "HEADING_2"))
|
|
10235
10898
|
);
|
|
10236
10899
|
return () => {
|
|
10237
|
-
const containerClass = [(0,
|
|
10900
|
+
const containerClass = [(0, import_browser59.withVendorCSSClassPrefix)("accept-invite"), props.className].filter(Boolean).join(" ");
|
|
10238
10901
|
const components = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];
|
|
10239
10902
|
const { title, subtitle } = extractHeadings(components);
|
|
10240
10903
|
const componentsWithoutHeadings = filterHeadings(components);
|
|
@@ -10434,11 +11097,11 @@ var AcceptInvite = (0, import_vue70.defineComponent)({
|
|
|
10434
11097
|
var AcceptInvite_default = AcceptInvite;
|
|
10435
11098
|
|
|
10436
11099
|
// src/components/presentation/invite-user/InviteUser.ts
|
|
10437
|
-
var
|
|
11100
|
+
var import_browser61 = require("@asgardeo/browser");
|
|
10438
11101
|
var import_vue72 = require("vue");
|
|
10439
11102
|
|
|
10440
11103
|
// src/components/presentation/invite-user/BaseInviteUser.ts
|
|
10441
|
-
var
|
|
11104
|
+
var import_browser60 = require("@asgardeo/browser");
|
|
10442
11105
|
var import_vue71 = require("vue");
|
|
10443
11106
|
var BaseInviteUser = (0, import_vue71.defineComponent)({
|
|
10444
11107
|
name: "BaseInviteUser",
|
|
@@ -10623,7 +11286,7 @@ var BaseInviteUser = (0, import_vue71.defineComponent)({
|
|
|
10623
11286
|
isLoading.value = true;
|
|
10624
11287
|
apiError.value = null;
|
|
10625
11288
|
try {
|
|
10626
|
-
const payload = { flowType:
|
|
11289
|
+
const payload = { flowType: import_browser60.EmbeddedFlowType.UserOnboarding, verbose: true };
|
|
10627
11290
|
const rawResponse = await props.onInitialize(payload);
|
|
10628
11291
|
const response = normalizeFlowResponseLocal(rawResponse);
|
|
10629
11292
|
currentFlow.value = response;
|
|
@@ -10657,7 +11320,7 @@ var BaseInviteUser = (0, import_vue71.defineComponent)({
|
|
|
10657
11320
|
(comp) => !(comp.type === "TEXT" && (comp.variant === "HEADING_1" || comp.variant === "HEADING_2"))
|
|
10658
11321
|
);
|
|
10659
11322
|
return () => {
|
|
10660
|
-
const containerClass = [(0,
|
|
11323
|
+
const containerClass = [(0, import_browser60.withVendorCSSClassPrefix)("invite-user"), props.className].filter(Boolean).join(" ");
|
|
10661
11324
|
const components = currentFlow.value?.data?.components || currentFlow.value?.data?.meta?.components || [];
|
|
10662
11325
|
const { title, subtitle } = extractHeadings(components);
|
|
10663
11326
|
const componentsWithoutHeadings = filterHeadings(components);
|
|
@@ -10822,7 +11485,7 @@ var InviteUser = (0, import_vue72.defineComponent)({
|
|
|
10822
11485
|
const { http: http3, baseUrl, isInitialized } = useAsgardeo_default();
|
|
10823
11486
|
const handleInitialize = async (payload) => {
|
|
10824
11487
|
const response = await http3.request({
|
|
10825
|
-
data: { ...payload, flowType:
|
|
11488
|
+
data: { ...payload, flowType: import_browser61.EmbeddedFlowType.UserOnboarding, verbose: true },
|
|
10826
11489
|
headers: { Accept: "application/json", "Content-Type": "application/json" },
|
|
10827
11490
|
method: "POST",
|
|
10828
11491
|
url: `${baseUrl}/flow/execute`
|
|
@@ -10860,11 +11523,11 @@ var InviteUser = (0, import_vue72.defineComponent)({
|
|
|
10860
11523
|
var InviteUser_default = InviteUser;
|
|
10861
11524
|
|
|
10862
11525
|
// src/components/presentation/organization-list/OrganizationList.ts
|
|
10863
|
-
var
|
|
11526
|
+
var import_browser63 = require("@asgardeo/browser");
|
|
10864
11527
|
var import_vue74 = require("vue");
|
|
10865
11528
|
|
|
10866
11529
|
// src/components/presentation/organization-list/BaseOrganizationList.ts
|
|
10867
|
-
var
|
|
11530
|
+
var import_browser62 = require("@asgardeo/browser");
|
|
10868
11531
|
var import_vue73 = require("vue");
|
|
10869
11532
|
var BaseOrganizationList = (0, import_vue73.defineComponent)({
|
|
10870
11533
|
inheritAttrs: false,
|
|
@@ -10880,7 +11543,7 @@ var BaseOrganizationList = (0, import_vue73.defineComponent)({
|
|
|
10880
11543
|
if (slots["default"]) {
|
|
10881
11544
|
return slots["default"]({ isLoading: props.isLoading, organizations: props.organizations });
|
|
10882
11545
|
}
|
|
10883
|
-
const prefix =
|
|
11546
|
+
const prefix = import_browser62.withVendorCSSClassPrefix;
|
|
10884
11547
|
const children = [];
|
|
10885
11548
|
if (props.isLoading) {
|
|
10886
11549
|
children.push((0, import_vue73.h)("div", { class: prefix("organization-list__loading") }, [(0, import_vue73.h)(Spinner_default)]));
|
|
@@ -10929,7 +11592,7 @@ var OrganizationList = (0, import_vue74.defineComponent)({
|
|
|
10929
11592
|
return () => (0, import_vue74.h)(
|
|
10930
11593
|
BaseOrganizationList_default,
|
|
10931
11594
|
{
|
|
10932
|
-
class: (0,
|
|
11595
|
+
class: (0, import_browser63.withVendorCSSClassPrefix)("organization-list--styled"),
|
|
10933
11596
|
className: props.className,
|
|
10934
11597
|
isLoading: isLoading.value,
|
|
10935
11598
|
onSelect: handleSelect,
|
|
@@ -10942,11 +11605,11 @@ var OrganizationList = (0, import_vue74.defineComponent)({
|
|
|
10942
11605
|
var OrganizationList_default = OrganizationList;
|
|
10943
11606
|
|
|
10944
11607
|
// src/components/presentation/organization-profile/OrganizationProfile.ts
|
|
10945
|
-
var
|
|
11608
|
+
var import_browser65 = require("@asgardeo/browser");
|
|
10946
11609
|
var import_vue76 = require("vue");
|
|
10947
11610
|
|
|
10948
11611
|
// src/components/presentation/organization-profile/BaseOrganizationProfile.ts
|
|
10949
|
-
var
|
|
11612
|
+
var import_browser64 = require("@asgardeo/browser");
|
|
10950
11613
|
var import_vue75 = require("vue");
|
|
10951
11614
|
var ORG_AVATAR_GRADIENTS = [
|
|
10952
11615
|
"linear-gradient(135deg, #22d3ee 0%, #2dd4bf 100%)",
|
|
@@ -11003,7 +11666,7 @@ var BaseOrganizationProfile = (0, import_vue75.defineComponent)({
|
|
|
11003
11666
|
if (!props.organization) {
|
|
11004
11667
|
return slots["fallback"]?.() ?? null;
|
|
11005
11668
|
}
|
|
11006
|
-
const prefix =
|
|
11669
|
+
const prefix = import_browser64.withVendorCSSClassPrefix;
|
|
11007
11670
|
const org = props.organization;
|
|
11008
11671
|
const orgName = String(org["name"] || org["displayName"] || "");
|
|
11009
11672
|
const orgHandle = String(org["orgHandle"] || "");
|
|
@@ -11282,7 +11945,7 @@ var OrganizationProfile = (0, import_vue76.defineComponent)({
|
|
|
11282
11945
|
return () => (0, import_vue76.h)(
|
|
11283
11946
|
BaseOrganizationProfile_default,
|
|
11284
11947
|
{
|
|
11285
|
-
class: (0,
|
|
11948
|
+
class: (0, import_browser65.withVendorCSSClassPrefix)("organization-profile--styled"),
|
|
11286
11949
|
className: props.className,
|
|
11287
11950
|
editable: props.editable,
|
|
11288
11951
|
onUpdate: props.onUpdate,
|
|
@@ -11296,13 +11959,13 @@ var OrganizationProfile = (0, import_vue76.defineComponent)({
|
|
|
11296
11959
|
var OrganizationProfile_default = OrganizationProfile;
|
|
11297
11960
|
|
|
11298
11961
|
// src/components/presentation/organization-switcher/OrganizationSwitcher.ts
|
|
11299
|
-
var
|
|
11962
|
+
var import_browser67 = require("@asgardeo/browser");
|
|
11300
11963
|
var import_vue78 = require("vue");
|
|
11301
11964
|
|
|
11302
11965
|
// src/components/presentation/organization-switcher/BaseOrganizationSwitcher.ts
|
|
11303
|
-
var
|
|
11966
|
+
var import_browser66 = require("@asgardeo/browser");
|
|
11304
11967
|
var import_vue77 = require("vue");
|
|
11305
|
-
var cls = (name) => (0,
|
|
11968
|
+
var cls = (name) => (0, import_browser66.withVendorCSSClassPrefix)(`organization-switcher${name}`);
|
|
11306
11969
|
var BaseOrganizationSwitcher = (0, import_vue77.defineComponent)({
|
|
11307
11970
|
inheritAttrs: false,
|
|
11308
11971
|
name: "BaseOrganizationSwitcher",
|
|
@@ -11392,7 +12055,7 @@ var OrganizationSwitcher = (0, import_vue78.defineComponent)({
|
|
|
11392
12055
|
return () => (0, import_vue78.h)(
|
|
11393
12056
|
BaseOrganizationSwitcher_default,
|
|
11394
12057
|
{
|
|
11395
|
-
class: (0,
|
|
12058
|
+
class: (0, import_browser67.withVendorCSSClassPrefix)("organization-switcher--styled"),
|
|
11396
12059
|
className: props.className,
|
|
11397
12060
|
currentOrganization: currentOrganization?.value ?? null,
|
|
11398
12061
|
isLoading: isLoading?.value ?? false,
|
|
@@ -11406,13 +12069,13 @@ var OrganizationSwitcher = (0, import_vue78.defineComponent)({
|
|
|
11406
12069
|
var OrganizationSwitcher_default = OrganizationSwitcher;
|
|
11407
12070
|
|
|
11408
12071
|
// src/components/presentation/create-organization/CreateOrganization.ts
|
|
11409
|
-
var
|
|
12072
|
+
var import_browser69 = require("@asgardeo/browser");
|
|
11410
12073
|
var import_vue80 = require("vue");
|
|
11411
12074
|
|
|
11412
12075
|
// src/components/presentation/create-organization/BaseCreateOrganization.ts
|
|
11413
|
-
var
|
|
12076
|
+
var import_browser68 = require("@asgardeo/browser");
|
|
11414
12077
|
var import_vue79 = require("vue");
|
|
11415
|
-
var cls2 = (name) => (0,
|
|
12078
|
+
var cls2 = (name) => (0, import_browser68.withVendorCSSClassPrefix)(`create-organization${name}`);
|
|
11416
12079
|
var BaseCreateOrganization = (0, import_vue79.defineComponent)({
|
|
11417
12080
|
name: "BaseCreateOrganization",
|
|
11418
12081
|
props: {
|
|
@@ -11498,7 +12161,7 @@ var CreateOrganization = (0, import_vue80.defineComponent)({
|
|
|
11498
12161
|
return () => (0, import_vue80.h)(
|
|
11499
12162
|
BaseCreateOrganization_default,
|
|
11500
12163
|
{
|
|
11501
|
-
class: (0,
|
|
12164
|
+
class: (0, import_browser69.withVendorCSSClassPrefix)("create-organization--styled"),
|
|
11502
12165
|
className: props.className,
|
|
11503
12166
|
description: props.description,
|
|
11504
12167
|
onCreate: createOrganization ? async (name) => {
|
|
@@ -11513,13 +12176,13 @@ var CreateOrganization = (0, import_vue80.defineComponent)({
|
|
|
11513
12176
|
var CreateOrganization_default = CreateOrganization;
|
|
11514
12177
|
|
|
11515
12178
|
// src/components/presentation/language-switcher/LanguageSwitcher.ts
|
|
11516
|
-
var
|
|
12179
|
+
var import_browser71 = require("@asgardeo/browser");
|
|
11517
12180
|
var import_vue82 = require("vue");
|
|
11518
12181
|
|
|
11519
12182
|
// src/components/presentation/language-switcher/BaseLanguageSwitcher.ts
|
|
11520
|
-
var
|
|
12183
|
+
var import_browser70 = require("@asgardeo/browser");
|
|
11521
12184
|
var import_vue81 = require("vue");
|
|
11522
|
-
var cls3 = (name) => (0,
|
|
12185
|
+
var cls3 = (name) => (0, import_browser70.withVendorCSSClassPrefix)(`language-switcher${name}`);
|
|
11523
12186
|
var BaseLanguageSwitcher = (0, import_vue81.defineComponent)({
|
|
11524
12187
|
name: "BaseLanguageSwitcher",
|
|
11525
12188
|
props: {
|
|
@@ -11604,7 +12267,7 @@ var LanguageSwitcher = (0, import_vue82.defineComponent)({
|
|
|
11604
12267
|
return () => (0, import_vue82.h)(
|
|
11605
12268
|
BaseLanguageSwitcher_default,
|
|
11606
12269
|
{
|
|
11607
|
-
class: (0,
|
|
12270
|
+
class: (0, import_browser71.withVendorCSSClassPrefix)("language-switcher--styled"),
|
|
11608
12271
|
className: props.className,
|
|
11609
12272
|
currentLanguage: currentLanguage?.value ?? "en",
|
|
11610
12273
|
languages: props.languages,
|
|
@@ -11662,19 +12325,19 @@ var buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
|
11662
12325
|
var buildThemeConfigFromFlowMeta_default = buildThemeConfigFromFlowMeta;
|
|
11663
12326
|
|
|
11664
12327
|
// src/index.ts
|
|
11665
|
-
var
|
|
12328
|
+
var import_browser78 = require("@asgardeo/browser");
|
|
11666
12329
|
|
|
11667
12330
|
// src/utils/handleWebAuthnAuthentication.ts
|
|
11668
|
-
var
|
|
12331
|
+
var import_browser72 = require("@asgardeo/browser");
|
|
11669
12332
|
|
|
11670
12333
|
// src/utils/hasAuthParamsInUrl.ts
|
|
11671
|
-
var
|
|
12334
|
+
var import_browser73 = require("@asgardeo/browser");
|
|
11672
12335
|
|
|
11673
12336
|
// src/utils/navigate.ts
|
|
11674
|
-
var
|
|
12337
|
+
var import_browser74 = require("@asgardeo/browser");
|
|
11675
12338
|
|
|
11676
12339
|
// src/utils/http.ts
|
|
11677
|
-
var
|
|
12340
|
+
var import_browser75 = require("@asgardeo/browser");
|
|
11678
12341
|
|
|
11679
12342
|
// src/router/guard.ts
|
|
11680
12343
|
var import_vue83 = require("vue");
|
|
@@ -11749,11 +12412,11 @@ var createCallbackRoute = (options = {}) => {
|
|
|
11749
12412
|
};
|
|
11750
12413
|
|
|
11751
12414
|
// src/theme/getActiveTheme.ts
|
|
11752
|
-
var
|
|
12415
|
+
var import_browser76 = require("@asgardeo/browser");
|
|
11753
12416
|
|
|
11754
12417
|
// src/theme/themeDetection.ts
|
|
11755
|
-
var
|
|
12418
|
+
var import_browser77 = require("@asgardeo/browser");
|
|
11756
12419
|
|
|
11757
12420
|
// src/index.ts
|
|
11758
|
-
var
|
|
12421
|
+
var import_browser79 = require("@asgardeo/browser");
|
|
11759
12422
|
//# sourceMappingURL=index.js.map
|