@thunderid/vue 0.13.0 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/getUsersMeMeta.d.ts +22 -0
- package/dist/api/getUsersMeMeta.d.ts.map +1 -0
- package/dist/cjs/index.cjs +801 -252
- package/dist/components/adapters/GoogleButton.d.ts.map +1 -1
- package/dist/components/presentation/user-dropdown/BaseUserDropdown.d.ts.map +1 -1
- package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts +1 -1
- package/dist/components/presentation/user-dropdown/UserDropdown.css.d.ts.map +1 -1
- package/dist/components/presentation/user-profile/BaseUserProfile.d.ts +4 -1
- package/dist/components/presentation/user-profile/BaseUserProfile.d.ts.map +1 -1
- package/dist/components/presentation/user-profile/UserProfile.css.d.ts +2 -12
- 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 +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +803 -255
- package/dist/models/contexts.d.ts +9 -5
- package/dist/models/contexts.d.ts.map +1 -1
- package/dist/providers/ThunderIDProvider.d.ts.map +1 -1
- package/dist/providers/UserProvider.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -574,20 +574,23 @@ const UserProvider = (0, vue.defineComponent)({
|
|
|
574
574
|
updateProfile: {
|
|
575
575
|
default: void 0,
|
|
576
576
|
type: Function
|
|
577
|
+
},
|
|
578
|
+
userSchema: {
|
|
579
|
+
default: null,
|
|
580
|
+
type: Object
|
|
577
581
|
}
|
|
578
582
|
},
|
|
579
583
|
setup(props, { slots }) {
|
|
580
584
|
const profileRef = (0, vue.computed)(() => props.profile);
|
|
585
|
+
const flattenedProfileRef = (0, vue.computed)(() => props.profile?.flattenedProfile ?? null);
|
|
586
|
+
const userSchemaRef = (0, vue.computed)(() => props.profile?.userSchema ?? props.userSchema ?? null);
|
|
581
587
|
(0, vue.provide)(USER_KEY, {
|
|
582
|
-
flattenedProfile:
|
|
588
|
+
flattenedProfile: flattenedProfileRef,
|
|
583
589
|
onUpdateProfile: props.onUpdateProfile ?? (() => {}),
|
|
584
590
|
profile: profileRef,
|
|
585
591
|
revalidateProfile: props.revalidateProfile,
|
|
586
|
-
updateProfile: props.updateProfile
|
|
587
|
-
|
|
588
|
-
error: "updateProfile callback not provided",
|
|
589
|
-
success: false
|
|
590
|
-
}))
|
|
592
|
+
updateProfile: props.updateProfile,
|
|
593
|
+
userSchema: userSchemaRef
|
|
591
594
|
});
|
|
592
595
|
return () => (0, vue.h)("div", { style: "display:contents" }, slots["default"]?.());
|
|
593
596
|
}
|
|
@@ -618,6 +621,34 @@ const getUsersMe = async ({ fetcher, instanceId = 0,...requestConfig }) => {
|
|
|
618
621
|
};
|
|
619
622
|
var getUsersMe_default = getUsersMe;
|
|
620
623
|
|
|
624
|
+
//#endregion
|
|
625
|
+
//#region src/api/getUsersMeMeta.ts
|
|
626
|
+
/**
|
|
627
|
+
* Retrieves the user schema metadata from the specified /users/me/meta endpoint.
|
|
628
|
+
* Uses ThunderID SPA client FetchHttpClient by default with multi-instance support.
|
|
629
|
+
*/
|
|
630
|
+
const getUsersMeMeta = async ({ fetcher, instanceId = 0,...requestConfig }) => {
|
|
631
|
+
const defaultFetcher = async (url, config) => {
|
|
632
|
+
const response = await __thunderid_browser.FetchHttpClient.getInstance(instanceId).request({
|
|
633
|
+
headers: config.headers,
|
|
634
|
+
method: config.method ?? "GET",
|
|
635
|
+
url
|
|
636
|
+
});
|
|
637
|
+
return {
|
|
638
|
+
json: () => Promise.resolve(response.data),
|
|
639
|
+
ok: response.status >= 200 && response.status < 300,
|
|
640
|
+
status: response.status,
|
|
641
|
+
statusText: response.statusText || "",
|
|
642
|
+
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
643
|
+
};
|
|
644
|
+
};
|
|
645
|
+
return (0, __thunderid_browser.getUsersMeMeta)({
|
|
646
|
+
...requestConfig,
|
|
647
|
+
fetcher: fetcher ?? defaultFetcher
|
|
648
|
+
});
|
|
649
|
+
};
|
|
650
|
+
var getUsersMeMeta_default = getUsersMeMeta;
|
|
651
|
+
|
|
621
652
|
//#endregion
|
|
622
653
|
//#region src/ThunderIDVueClient.ts
|
|
623
654
|
/**
|
|
@@ -863,6 +894,10 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
863
894
|
default: void 0,
|
|
864
895
|
type: String
|
|
865
896
|
},
|
|
897
|
+
preferences: {
|
|
898
|
+
default: void 0,
|
|
899
|
+
type: Object
|
|
900
|
+
},
|
|
866
901
|
scopes: {
|
|
867
902
|
default: void 0,
|
|
868
903
|
type: [Array, String]
|
|
@@ -900,6 +935,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
900
935
|
const isLoading = (0, vue.ref)(true);
|
|
901
936
|
const user = (0, vue.shallowRef)(null);
|
|
902
937
|
const userProfile = (0, vue.shallowRef)(null);
|
|
938
|
+
const userSchema = (0, vue.ref)(null);
|
|
903
939
|
const resolvedBaseUrl = (0, vue.ref)(props.baseUrl);
|
|
904
940
|
let isUpdatingSession = false;
|
|
905
941
|
let signInCheckInterval;
|
|
@@ -914,6 +950,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
914
950
|
endpoints: props.endpoints,
|
|
915
951
|
organizationChain: props.organizationChain,
|
|
916
952
|
organizationHandle: props.organizationHandle,
|
|
953
|
+
preferences: props.preferences,
|
|
917
954
|
scopes: props.scopes,
|
|
918
955
|
signInOptions: props.signInOptions,
|
|
919
956
|
signInUrl: props.signInUrl,
|
|
@@ -933,13 +970,40 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
933
970
|
baseUrl = `${(await client.getConfiguration()).baseUrl}/o`;
|
|
934
971
|
resolvedBaseUrl.value = baseUrl;
|
|
935
972
|
}
|
|
973
|
+
const shouldFetchProfile = props.preferences?.user?.fetchUserProfile !== false;
|
|
936
974
|
const claims = (0, __thunderid_browser.extractUserClaimsFromIdToken)(decodedToken);
|
|
937
|
-
|
|
975
|
+
let profileData = claims;
|
|
976
|
+
const currentSignInStatus = await client.isSignedIn();
|
|
977
|
+
if (currentSignInStatus && shouldFetchProfile) {
|
|
978
|
+
try {
|
|
979
|
+
const fetchedProfile = await getUsersMe_default({
|
|
980
|
+
baseUrl,
|
|
981
|
+
url: (0, __thunderid_browser.resolveResourceEndpoint)("usersMe", { endpoints: props.endpoints }),
|
|
982
|
+
instanceId: props.instanceId
|
|
983
|
+
});
|
|
984
|
+
profileData = {
|
|
985
|
+
...claims,
|
|
986
|
+
...fetchedProfile
|
|
987
|
+
};
|
|
988
|
+
} catch {}
|
|
989
|
+
try {
|
|
990
|
+
const metaRes = await getUsersMeMeta_default({
|
|
991
|
+
baseUrl,
|
|
992
|
+
url: (0, __thunderid_browser.resolveResourceEndpoint)("usersMeMeta", { endpoints: props.endpoints }),
|
|
993
|
+
instanceId: props.instanceId
|
|
994
|
+
});
|
|
995
|
+
if (metaRes?.schema) userSchema.value = metaRes.schema;
|
|
996
|
+
else userSchema.value = null;
|
|
997
|
+
} catch {
|
|
998
|
+
userSchema.value = null;
|
|
999
|
+
}
|
|
1000
|
+
} else userSchema.value = null;
|
|
1001
|
+
user.value = profileData;
|
|
938
1002
|
userProfile.value = {
|
|
939
|
-
flattenedProfile:
|
|
940
|
-
profile:
|
|
1003
|
+
flattenedProfile: (0, __thunderid_browser.generateFlattenedUserProfile)(profileData),
|
|
1004
|
+
profile: profileData
|
|
941
1005
|
};
|
|
942
|
-
isSignedIn.value =
|
|
1006
|
+
isSignedIn.value = currentSignInStatus;
|
|
943
1007
|
} catch {} finally {
|
|
944
1008
|
isUpdatingSession = false;
|
|
945
1009
|
isLoading.value = client.isLoading();
|
|
@@ -1005,6 +1069,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1005
1069
|
isLoading,
|
|
1006
1070
|
isSignedIn,
|
|
1007
1071
|
organizationHandle: props.organizationHandle,
|
|
1072
|
+
preferences: props.preferences,
|
|
1008
1073
|
reInitialize: async (config) => {
|
|
1009
1074
|
const result = await client.reInitialize(config);
|
|
1010
1075
|
return typeof result === "boolean" ? result : true;
|
|
@@ -1018,6 +1083,7 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1018
1083
|
signUpUrl: props.signUpUrl,
|
|
1019
1084
|
storage: props.storage,
|
|
1020
1085
|
user,
|
|
1086
|
+
userSchema,
|
|
1021
1087
|
vendor
|
|
1022
1088
|
});
|
|
1023
1089
|
(0, vue.onMounted)(async () => {
|
|
@@ -1083,15 +1149,9 @@ const ThunderIDProvider = (0, vue.defineComponent)({
|
|
|
1083
1149
|
},
|
|
1084
1150
|
profile: userProfile.value,
|
|
1085
1151
|
revalidateProfile: async () => {
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
userProfile.value = {
|
|
1090
|
-
flattenedProfile: claims,
|
|
1091
|
-
profile: claims
|
|
1092
|
-
};
|
|
1093
|
-
} catch {}
|
|
1094
|
-
}
|
|
1152
|
+
await updateSession();
|
|
1153
|
+
},
|
|
1154
|
+
userSchema: userSchema.value
|
|
1095
1155
|
}, { default: () => slots["default"]?.() }) }) }) }) });
|
|
1096
1156
|
}
|
|
1097
1157
|
});
|
|
@@ -1508,6 +1568,8 @@ const USER_DROPDOWN_CSS = `
|
|
|
1508
1568
|
justify-content: center;
|
|
1509
1569
|
width: 32px;
|
|
1510
1570
|
height: 32px;
|
|
1571
|
+
max-width: 32px;
|
|
1572
|
+
max-height: 32px;
|
|
1511
1573
|
border-radius: 50%;
|
|
1512
1574
|
color: #ffffff;
|
|
1513
1575
|
flex-shrink: 0;
|
|
@@ -1516,12 +1578,20 @@ const USER_DROPDOWN_CSS = `
|
|
|
1516
1578
|
line-height: 1;
|
|
1517
1579
|
user-select: none;
|
|
1518
1580
|
pointer-events: none;
|
|
1581
|
+
object-fit: cover;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
img.thunderid-user-dropdown__avatar {
|
|
1585
|
+
object-fit: cover;
|
|
1586
|
+
border-radius: 50%;
|
|
1519
1587
|
}
|
|
1520
1588
|
|
|
1521
1589
|
/* sm — 28 px */
|
|
1522
1590
|
.thunderid-user-dropdown__avatar--sm {
|
|
1523
1591
|
width: 28px;
|
|
1524
1592
|
height: 28px;
|
|
1593
|
+
max-width: 28px;
|
|
1594
|
+
max-height: 28px;
|
|
1525
1595
|
font-size: var(--thunder-typography-fontSize-xs);
|
|
1526
1596
|
}
|
|
1527
1597
|
|
|
@@ -1529,6 +1599,8 @@ const USER_DROPDOWN_CSS = `
|
|
|
1529
1599
|
.thunderid-user-dropdown__avatar--lg {
|
|
1530
1600
|
width: 38px;
|
|
1531
1601
|
height: 38px;
|
|
1602
|
+
max-width: 38px;
|
|
1603
|
+
max-height: 38px;
|
|
1532
1604
|
font-size: var(--thunder-typography-fontSize-md);
|
|
1533
1605
|
}
|
|
1534
1606
|
|
|
@@ -1648,6 +1720,12 @@ const USER_DROPDOWN_CSS = `
|
|
|
1648
1720
|
font-weight: var(--thunder-typography-fontWeight-semibold);
|
|
1649
1721
|
line-height: 1;
|
|
1650
1722
|
user-select: none;
|
|
1723
|
+
object-fit: cover;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
img.thunderid-user-dropdown__menu-header-avatar {
|
|
1727
|
+
object-fit: cover;
|
|
1728
|
+
border-radius: 50%;
|
|
1651
1729
|
}
|
|
1652
1730
|
|
|
1653
1731
|
.thunderid-user-dropdown__menu-header-info {
|
|
@@ -1734,6 +1812,7 @@ const USER_DROPDOWN_CSS = `
|
|
|
1734
1812
|
justify-content: center;
|
|
1735
1813
|
z-index: 9999;
|
|
1736
1814
|
backdrop-filter: blur(3px);
|
|
1815
|
+
box-sizing: border-box;
|
|
1737
1816
|
animation: thunderid-overlay-enter var(--thunder-transition-fast) ease;
|
|
1738
1817
|
}
|
|
1739
1818
|
|
|
@@ -1748,11 +1827,14 @@ const USER_DROPDOWN_CSS = `
|
|
|
1748
1827
|
background: var(--thunder-color-background-surface);
|
|
1749
1828
|
border-radius: var(--thunder-border-radius-large);
|
|
1750
1829
|
box-shadow: var(--thunder-shadow-large);
|
|
1751
|
-
max-width:
|
|
1830
|
+
max-width: 640px;
|
|
1752
1831
|
width: 92%;
|
|
1753
1832
|
max-height: 90vh;
|
|
1754
1833
|
overflow-y: auto;
|
|
1755
1834
|
position: relative;
|
|
1835
|
+
margin: auto;
|
|
1836
|
+
padding: calc(var(--thunder-spacing-unit) * 3);
|
|
1837
|
+
box-sizing: border-box;
|
|
1756
1838
|
animation: thunderid-modal-enter var(--thunder-transition-normal) ease;
|
|
1757
1839
|
}
|
|
1758
1840
|
|
|
@@ -1805,51 +1887,24 @@ var UserDropdown_css_default = USER_DROPDOWN_CSS;
|
|
|
1805
1887
|
//#region src/components/presentation/user-profile/UserProfile.css.ts
|
|
1806
1888
|
/**
|
|
1807
1889
|
* Styles for the UserProfile presentation component.
|
|
1808
|
-
*
|
|
1809
|
-
* BEM block: `.thunderid-user-profile`
|
|
1810
|
-
*
|
|
1811
|
-
* Modifiers:
|
|
1812
|
-
* --compact – reduced field padding for modal / dropdown embedding
|
|
1813
|
-
*
|
|
1814
|
-
* New elements in this version:
|
|
1815
|
-
* __hero – avatar + name + subtitle banner
|
|
1816
|
-
* __avatar--sm/md/lg – avatar size variants
|
|
1817
|
-
* __hero-name – prominent display name
|
|
1818
|
-
* __hero-subtitle – secondary line (email / username)
|
|
1890
|
+
* Parity target: `@thunderid/react` BaseUserProfile.styles.ts
|
|
1819
1891
|
*/
|
|
1820
1892
|
const USER_PROFILE_CSS = `
|
|
1821
1893
|
/* ============================================================
|
|
1822
|
-
UserProfile
|
|
1894
|
+
UserProfile (React Parity)
|
|
1823
1895
|
============================================================ */
|
|
1824
1896
|
|
|
1825
1897
|
.thunderid-user-profile {
|
|
1826
1898
|
display: flex;
|
|
1827
1899
|
flex-direction: column;
|
|
1828
|
-
|
|
1829
|
-
|
|
1900
|
+
padding: calc(var(--thunder-spacing-unit) * 4);
|
|
1901
|
+
width: 100%;
|
|
1902
|
+
max-width: 600px;
|
|
1903
|
+
margin: 0 auto;
|
|
1830
1904
|
font-family: var(--thunder-typography-fontFamily);
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
.thunderid-user-profile__header {
|
|
1836
|
-
display: flex;
|
|
1837
|
-
align-items: center;
|
|
1838
|
-
justify-content: space-between;
|
|
1839
|
-
padding: calc(var(--thunder-spacing-unit) * 2) calc(var(--thunder-spacing-unit) * 2.5)
|
|
1840
|
-
calc(var(--thunder-spacing-unit) * 1.75);
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
.thunderid-user-profile__title {
|
|
1844
|
-
margin: 0;
|
|
1845
|
-
font-size: var(--thunder-typography-fontSize-md);
|
|
1846
|
-
font-weight: var(--thunder-typography-fontWeight-semibold);
|
|
1847
|
-
color: var(--thunder-color-text-primary);
|
|
1848
|
-
letter-spacing: var(--thunder-typography-letterSpacing-tight);
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
.thunderid-user-profile__header-divider {
|
|
1852
|
-
margin: 0;
|
|
1905
|
+
background: var(--thunder-color-background-surface);
|
|
1906
|
+
border-radius: var(--thunder-border-radius-large, 8px);
|
|
1907
|
+
box-sizing: border-box;
|
|
1853
1908
|
}
|
|
1854
1909
|
|
|
1855
1910
|
/* ── Hero (avatar + name + subtitle) ────────────────────────── */
|
|
@@ -1857,43 +1912,35 @@ const USER_PROFILE_CSS = `
|
|
|
1857
1912
|
.thunderid-user-profile__hero {
|
|
1858
1913
|
display: flex;
|
|
1859
1914
|
flex-direction: column;
|
|
1860
|
-
align-items:
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
background: linear-gradient(
|
|
1865
|
-
180deg,
|
|
1866
|
-
var(--thunder-color-primary-light) 0%,
|
|
1867
|
-
var(--thunder-color-background-surface) 100%
|
|
1868
|
-
);
|
|
1915
|
+
align-items: flex-start;
|
|
1916
|
+
gap: calc(var(--thunder-spacing-unit) * 1);
|
|
1917
|
+
padding-bottom: calc(var(--thunder-spacing-unit) * 2);
|
|
1918
|
+
margin-bottom: calc(var(--thunder-spacing-unit) * 2);
|
|
1869
1919
|
border-bottom: 1px solid var(--thunder-color-border);
|
|
1870
1920
|
}
|
|
1871
1921
|
|
|
1872
1922
|
.thunderid-user-profile__avatar-wrapper {
|
|
1873
1923
|
position: relative;
|
|
1874
1924
|
border-radius: 50%;
|
|
1875
|
-
padding: 3px;
|
|
1876
|
-
background: linear-gradient(
|
|
1877
|
-
135deg,
|
|
1878
|
-
var(--thunder-color-primary-main),
|
|
1879
|
-
var(--thunder-color-primary-dark)
|
|
1880
|
-
);
|
|
1881
|
-
box-shadow: 0 4px 14px rgba(75, 110, 245, 0.28);
|
|
1882
1925
|
}
|
|
1883
1926
|
|
|
1884
1927
|
.thunderid-user-profile__avatar {
|
|
1885
|
-
|
|
1886
|
-
|
|
1928
|
+
border-radius: 50%;
|
|
1929
|
+
object-fit: cover;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
img.thunderid-user-profile__avatar {
|
|
1933
|
+
border-radius: 50%;
|
|
1934
|
+
object-fit: cover;
|
|
1935
|
+
width: 70px;
|
|
1936
|
+
height: 70px;
|
|
1887
1937
|
border-radius: 50%;
|
|
1888
1938
|
display: flex;
|
|
1889
1939
|
align-items: center;
|
|
1890
1940
|
justify-content: center;
|
|
1891
1941
|
flex-shrink: 0;
|
|
1892
|
-
border: 2px solid var(--thunder-color-background-surface);
|
|
1893
1942
|
}
|
|
1894
1943
|
|
|
1895
|
-
/* Avatar size variants */
|
|
1896
|
-
|
|
1897
1944
|
.thunderid-user-profile__avatar--sm {
|
|
1898
1945
|
width: 48px;
|
|
1899
1946
|
height: 48px;
|
|
@@ -1913,17 +1960,17 @@ const USER_PROFILE_CSS = `
|
|
|
1913
1960
|
}
|
|
1914
1961
|
|
|
1915
1962
|
.thunderid-user-profile__avatar--lg {
|
|
1916
|
-
width:
|
|
1917
|
-
height:
|
|
1963
|
+
width: 70px;
|
|
1964
|
+
height: 70px;
|
|
1918
1965
|
}
|
|
1919
1966
|
|
|
1920
1967
|
.thunderid-user-profile__avatar--lg .thunderid-user-profile__avatar-initials {
|
|
1921
|
-
font-size: 1.
|
|
1968
|
+
font-size: 1.5rem;
|
|
1922
1969
|
}
|
|
1923
1970
|
|
|
1924
1971
|
.thunderid-user-profile__avatar-initials {
|
|
1925
1972
|
color: #ffffff;
|
|
1926
|
-
font-weight: var(--thunder-typography-fontWeight-semibold);
|
|
1973
|
+
font-weight: var(--thunder-typography-fontWeight-semibold, 600);
|
|
1927
1974
|
line-height: 1;
|
|
1928
1975
|
letter-spacing: 0.02em;
|
|
1929
1976
|
pointer-events: none;
|
|
@@ -1933,37 +1980,36 @@ const USER_PROFILE_CSS = `
|
|
|
1933
1980
|
.thunderid-user-profile__hero-info {
|
|
1934
1981
|
display: flex;
|
|
1935
1982
|
flex-direction: column;
|
|
1936
|
-
align-items:
|
|
1937
|
-
|
|
1938
|
-
text-align: center;
|
|
1983
|
+
align-items: flex-start;
|
|
1984
|
+
margin-top: calc(var(--thunder-spacing-unit) * 0.5);
|
|
1939
1985
|
}
|
|
1940
1986
|
|
|
1941
1987
|
.thunderid-user-profile__hero-name {
|
|
1942
|
-
font-size: var(--thunder-typography-fontSize-
|
|
1943
|
-
font-weight: var(--thunder-typography-fontWeight-semibold);
|
|
1988
|
+
font-size: var(--thunder-typography-fontSize-xl, 1.5rem);
|
|
1989
|
+
font-weight: var(--thunder-typography-fontWeight-semibold, 600);
|
|
1944
1990
|
color: var(--thunder-color-text-primary);
|
|
1945
|
-
|
|
1946
|
-
|
|
1991
|
+
margin: 0;
|
|
1992
|
+
line-height: var(--thunder-typography-lineHeight-tight, 1.2);
|
|
1947
1993
|
}
|
|
1948
1994
|
|
|
1949
1995
|
.thunderid-user-profile__hero-subtitle {
|
|
1950
|
-
font-size: var(--thunder-typography-fontSize-sm);
|
|
1996
|
+
font-size: var(--thunder-typography-fontSize-sm, 0.875rem);
|
|
1951
1997
|
color: var(--thunder-color-text-secondary);
|
|
1952
|
-
|
|
1998
|
+
margin-top: calc(var(--thunder-spacing-unit) * 0.5);
|
|
1999
|
+
line-height: var(--thunder-typography-lineHeight-normal, 1.4);
|
|
1953
2000
|
}
|
|
1954
2001
|
|
|
1955
2002
|
/* ── Alerts & loading ────────────────────────────────────────── */
|
|
1956
2003
|
|
|
1957
2004
|
.thunderid-user-profile__error {
|
|
1958
|
-
margin: calc(var(--thunder-spacing-unit) *
|
|
1959
|
-
calc(var(--thunder-spacing-unit) * 0.5);
|
|
2005
|
+
margin-bottom: calc(var(--thunder-spacing-unit) * 3);
|
|
1960
2006
|
}
|
|
1961
2007
|
|
|
1962
2008
|
.thunderid-user-profile__loading {
|
|
1963
2009
|
display: flex;
|
|
1964
2010
|
align-items: center;
|
|
1965
2011
|
justify-content: center;
|
|
1966
|
-
padding: calc(var(--thunder-spacing-unit) *
|
|
2012
|
+
padding: calc(var(--thunder-spacing-unit) * 4) 0;
|
|
1967
2013
|
}
|
|
1968
2014
|
|
|
1969
2015
|
/* ── Fields ──────────────────────────────────────────────────── */
|
|
@@ -1974,141 +2020,119 @@ const USER_PROFILE_CSS = `
|
|
|
1974
2020
|
}
|
|
1975
2021
|
|
|
1976
2022
|
.thunderid-user-profile__field {
|
|
1977
|
-
display:
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
padding: calc(var(--thunder-spacing-unit) * 1.5)
|
|
1981
|
-
|
|
2023
|
+
display: flex;
|
|
2024
|
+
align-items: center;
|
|
2025
|
+
justify-content: space-between;
|
|
2026
|
+
padding: calc(var(--thunder-spacing-unit) * 1.5) 0;
|
|
2027
|
+
border-bottom: 1px solid var(--thunder-color-border);
|
|
2028
|
+
min-height: 28px;
|
|
1982
2029
|
box-sizing: border-box;
|
|
1983
|
-
transition: background-color var(--thunder-transition-fast);
|
|
1984
2030
|
}
|
|
1985
2031
|
|
|
1986
|
-
.thunderid-user-profile__field:
|
|
1987
|
-
|
|
2032
|
+
.thunderid-user-profile__field:last-child {
|
|
2033
|
+
border-bottom: none;
|
|
1988
2034
|
}
|
|
1989
2035
|
|
|
1990
|
-
.thunderid-user-profile__field
|
|
1991
|
-
|
|
2036
|
+
.thunderid-user-profile__field-inner {
|
|
2037
|
+
flex: 1;
|
|
2038
|
+
display: flex;
|
|
2039
|
+
align-items: center;
|
|
2040
|
+
gap: var(--thunder-spacing-unit);
|
|
1992
2041
|
}
|
|
1993
2042
|
|
|
1994
2043
|
.thunderid-user-profile__field-label {
|
|
2044
|
+
font-size: var(--thunder-typography-fontSize-sm, 0.875rem);
|
|
2045
|
+
font-weight: var(--thunder-typography-fontWeight-medium, 500);
|
|
1995
2046
|
color: var(--thunder-color-text-secondary);
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
.thunderid-user-profile__field-display {
|
|
2002
|
-
display: flex;
|
|
2003
|
-
align-items: center;
|
|
2004
|
-
justify-content: space-between;
|
|
2005
|
-
gap: calc(var(--thunder-spacing-unit) * 0.5);
|
|
2006
|
-
min-height: 1.5rem;
|
|
2047
|
+
width: 120px;
|
|
2048
|
+
flex-shrink: 0;
|
|
2049
|
+
line-height: 28px;
|
|
2050
|
+
text-align: start;
|
|
2007
2051
|
}
|
|
2008
2052
|
|
|
2009
2053
|
.thunderid-user-profile__field-value {
|
|
2010
2054
|
color: var(--thunder-color-text-primary);
|
|
2011
|
-
word-break: break-word;
|
|
2012
2055
|
flex: 1;
|
|
2013
|
-
|
|
2056
|
+
display: inline-block;
|
|
2057
|
+
align-items: center;
|
|
2058
|
+
font-size: var(--thunder-typography-fontSize-sm, 0.875rem);
|
|
2059
|
+
line-height: 28px;
|
|
2060
|
+
word-break: break-word;
|
|
2061
|
+
text-overflow: ellipsis;
|
|
2062
|
+
white-space: nowrap;
|
|
2063
|
+
max-width: 350px;
|
|
2064
|
+
text-align: start;
|
|
2065
|
+
overflow: hidden;
|
|
2014
2066
|
}
|
|
2015
2067
|
|
|
2016
2068
|
.thunderid-user-profile__field-placeholder {
|
|
2017
|
-
|
|
2018
|
-
font-size: var(--thunder-typography-fontSize-sm);
|
|
2069
|
+
font-size: var(--thunder-typography-fontSize-sm, 0.875rem);
|
|
2019
2070
|
font-style: italic;
|
|
2020
|
-
|
|
2071
|
+
color: var(--thunder-color-text-secondary);
|
|
2072
|
+
opacity: 0.7;
|
|
2021
2073
|
cursor: pointer;
|
|
2022
2074
|
text-decoration: underline;
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
opacity: 0.8;
|
|
2026
|
-
transition: opacity var(--thunder-transition-fast);
|
|
2075
|
+
white-space: nowrap;
|
|
2076
|
+
line-height: 28px;
|
|
2027
2077
|
}
|
|
2028
2078
|
|
|
2029
2079
|
.thunderid-user-profile__field-placeholder:hover {
|
|
2030
2080
|
opacity: 1;
|
|
2031
2081
|
}
|
|
2032
2082
|
|
|
2033
|
-
|
|
2083
|
+
.thunderid-user-profile__field-actions {
|
|
2084
|
+
display: flex;
|
|
2085
|
+
gap: calc(var(--thunder-spacing-unit) * 0.5);
|
|
2086
|
+
align-items: center;
|
|
2087
|
+
margin-inline-start: calc(var(--thunder-spacing-unit) * 4);
|
|
2088
|
+
}
|
|
2034
2089
|
|
|
2035
2090
|
.thunderid-user-profile__field-edit-btn {
|
|
2036
2091
|
display: inline-flex;
|
|
2037
2092
|
align-items: center;
|
|
2038
2093
|
justify-content: center;
|
|
2039
|
-
background:
|
|
2094
|
+
background: transparent;
|
|
2040
2095
|
border: none;
|
|
2041
2096
|
cursor: pointer;
|
|
2042
2097
|
color: var(--thunder-color-text-secondary);
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
transition:
|
|
2047
|
-
color var(--thunder-transition-fast),
|
|
2048
|
-
background-color var(--thunder-transition-fast),
|
|
2049
|
-
opacity var(--thunder-transition-fast);
|
|
2050
|
-
opacity: 0;
|
|
2098
|
+
padding: 0;
|
|
2099
|
+
min-height: auto;
|
|
2100
|
+
opacity: 0.7;
|
|
2051
2101
|
line-height: 0;
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
.thunderid-user-profile__field:hover .thunderid-user-profile__field-edit-btn {
|
|
2055
|
-
opacity: 1;
|
|
2102
|
+
transition: opacity var(--thunder-transition-fast, 0.15s ease);
|
|
2056
2103
|
}
|
|
2057
2104
|
|
|
2058
2105
|
.thunderid-user-profile__field-edit-btn:hover {
|
|
2059
|
-
color: var(--thunder-color-primary-main);
|
|
2060
|
-
background-color: var(--thunder-color-primary-light);
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
.thunderid-user-profile__field-edit-btn:focus-visible {
|
|
2064
2106
|
opacity: 1;
|
|
2065
|
-
|
|
2066
|
-
box-shadow: 0 0 0 var(--thunder-focus-ring-width) var(--thunder-focus-ring-color);
|
|
2107
|
+
background: transparent;
|
|
2067
2108
|
}
|
|
2068
2109
|
|
|
2069
|
-
/* ── Edit mode ───────────────────────────────────────────────── */
|
|
2070
|
-
|
|
2071
2110
|
.thunderid-user-profile__field-edit {
|
|
2111
|
+
flex: 1;
|
|
2072
2112
|
display: flex;
|
|
2073
2113
|
flex-direction: column;
|
|
2074
|
-
gap: calc(var(--thunder-spacing-unit) * 0.
|
|
2075
|
-
padding: calc(var(--thunder-spacing-unit) * 0.25) 0;
|
|
2114
|
+
gap: calc(var(--thunder-spacing-unit) * 0.5);
|
|
2076
2115
|
}
|
|
2077
2116
|
|
|
2078
|
-
.thunderid-user-profile__field-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2117
|
+
.thunderid-user-profile__field-error {
|
|
2118
|
+
color: var(--thunder-color-error, #d32f2f);
|
|
2119
|
+
font-size: var(--thunder-typography-fontSize-xs, 0.8rem);
|
|
2120
|
+
font-weight: var(--thunder-typography-fontWeight-medium, 500);
|
|
2121
|
+
margin-top: calc(var(--thunder-spacing-unit) * 0.5);
|
|
2082
2122
|
}
|
|
2083
2123
|
|
|
2084
|
-
/* ── Footer
|
|
2124
|
+
/* ── Footer ──────────────────────────────────────────────────── */
|
|
2085
2125
|
|
|
2086
2126
|
.thunderid-user-profile__footer {
|
|
2087
|
-
padding: calc(var(--thunder-spacing-unit) *
|
|
2127
|
+
padding-top: calc(var(--thunder-spacing-unit) * 2);
|
|
2088
2128
|
border-top: 1px solid var(--thunder-color-border);
|
|
2089
2129
|
}
|
|
2090
2130
|
|
|
2091
2131
|
/* ── Compact modifier ────────────────────────────────────────── */
|
|
2092
2132
|
|
|
2093
|
-
.thunderid-user-profile--compact
|
|
2094
|
-
padding: calc(var(--thunder-spacing-unit) * 2)
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
.thunderid-user-profile--compact .thunderid-user-profile__avatar--lg {
|
|
2098
|
-
width: 56px;
|
|
2099
|
-
height: 56px;
|
|
2100
|
-
}
|
|
2101
|
-
|
|
2102
|
-
.thunderid-user-profile--compact .thunderid-user-profile__avatar--lg .thunderid-user-profile__avatar-initials {
|
|
2103
|
-
font-size: 1.125rem;
|
|
2104
|
-
}
|
|
2105
|
-
|
|
2106
|
-
.thunderid-user-profile--compact .thunderid-user-profile__field {
|
|
2107
|
-
padding: calc(var(--thunder-spacing-unit) * 1) calc(var(--thunder-spacing-unit) * 2);
|
|
2108
|
-
}
|
|
2109
|
-
|
|
2110
|
-
.thunderid-user-profile--compact .thunderid-user-profile__hero-name {
|
|
2111
|
-
font-size: var(--thunder-typography-fontSize-md);
|
|
2133
|
+
.thunderid-user-profile--compact {
|
|
2134
|
+
padding: calc(var(--thunder-spacing-unit) * 2);
|
|
2135
|
+
width: 100%;
|
|
2112
2136
|
}
|
|
2113
2137
|
`;
|
|
2114
2138
|
var UserProfile_css_default = USER_PROFILE_CSS;
|
|
@@ -5134,31 +5158,393 @@ const GoogleButton = (0, vue.defineComponent)({
|
|
|
5134
5158
|
const { t } = useI18n_default();
|
|
5135
5159
|
const googleIcon = () => (0, vue.h)("svg", {
|
|
5136
5160
|
height: "18",
|
|
5137
|
-
viewBox: "0 0
|
|
5161
|
+
viewBox: "0 0 268.1522 273.8827",
|
|
5138
5162
|
width: "18",
|
|
5139
5163
|
xmlns: "http://www.w3.org/2000/svg"
|
|
5140
|
-
}, [(0, vue.h)("
|
|
5164
|
+
}, [(0, vue.h)("defs", {}, [
|
|
5165
|
+
(0, vue.h)("linearGradient", { id: "google-btn-a" }, [(0, vue.h)("stop", {
|
|
5166
|
+
offset: "0",
|
|
5167
|
+
"stop-color": "#0fbc5c"
|
|
5168
|
+
}), (0, vue.h)("stop", {
|
|
5169
|
+
offset: "1",
|
|
5170
|
+
"stop-color": "#0cba65"
|
|
5171
|
+
})]),
|
|
5172
|
+
(0, vue.h)("linearGradient", { id: "google-btn-g" }, [
|
|
5173
|
+
(0, vue.h)("stop", {
|
|
5174
|
+
offset: ".2312727",
|
|
5175
|
+
"stop-color": "#0fbc5f"
|
|
5176
|
+
}),
|
|
5177
|
+
(0, vue.h)("stop", {
|
|
5178
|
+
offset: ".3115468",
|
|
5179
|
+
"stop-color": "#0fbc5f"
|
|
5180
|
+
}),
|
|
5181
|
+
(0, vue.h)("stop", {
|
|
5182
|
+
offset: ".3660131",
|
|
5183
|
+
"stop-color": "#0fbc5e"
|
|
5184
|
+
}),
|
|
5185
|
+
(0, vue.h)("stop", {
|
|
5186
|
+
offset: ".4575163",
|
|
5187
|
+
"stop-color": "#0fbc5d"
|
|
5188
|
+
}),
|
|
5189
|
+
(0, vue.h)("stop", {
|
|
5190
|
+
offset: ".540305",
|
|
5191
|
+
"stop-color": "#12bc58"
|
|
5192
|
+
}),
|
|
5193
|
+
(0, vue.h)("stop", {
|
|
5194
|
+
offset: ".6993464",
|
|
5195
|
+
"stop-color": "#28bf3c"
|
|
5196
|
+
}),
|
|
5197
|
+
(0, vue.h)("stop", {
|
|
5198
|
+
offset: ".7712418",
|
|
5199
|
+
"stop-color": "#38c02b"
|
|
5200
|
+
}),
|
|
5201
|
+
(0, vue.h)("stop", {
|
|
5202
|
+
offset: ".8605665",
|
|
5203
|
+
"stop-color": "#52c218"
|
|
5204
|
+
}),
|
|
5205
|
+
(0, vue.h)("stop", {
|
|
5206
|
+
offset: ".9150327",
|
|
5207
|
+
"stop-color": "#67c30f"
|
|
5208
|
+
}),
|
|
5209
|
+
(0, vue.h)("stop", {
|
|
5210
|
+
offset: "1",
|
|
5211
|
+
"stop-color": "#86c504"
|
|
5212
|
+
})
|
|
5213
|
+
]),
|
|
5214
|
+
(0, vue.h)("linearGradient", { id: "google-btn-h" }, [
|
|
5215
|
+
(0, vue.h)("stop", {
|
|
5216
|
+
offset: ".1416122",
|
|
5217
|
+
"stop-color": "#1abd4d"
|
|
5218
|
+
}),
|
|
5219
|
+
(0, vue.h)("stop", {
|
|
5220
|
+
offset: ".2475151",
|
|
5221
|
+
"stop-color": "#6ec30d"
|
|
5222
|
+
}),
|
|
5223
|
+
(0, vue.h)("stop", {
|
|
5224
|
+
offset: ".3115468",
|
|
5225
|
+
"stop-color": "#8ac502"
|
|
5226
|
+
}),
|
|
5227
|
+
(0, vue.h)("stop", {
|
|
5228
|
+
offset: ".3660131",
|
|
5229
|
+
"stop-color": "#a2c600"
|
|
5230
|
+
}),
|
|
5231
|
+
(0, vue.h)("stop", {
|
|
5232
|
+
offset: ".4456735",
|
|
5233
|
+
"stop-color": "#c8c903"
|
|
5234
|
+
}),
|
|
5235
|
+
(0, vue.h)("stop", {
|
|
5236
|
+
offset: ".540305",
|
|
5237
|
+
"stop-color": "#ebcb03"
|
|
5238
|
+
}),
|
|
5239
|
+
(0, vue.h)("stop", {
|
|
5240
|
+
offset: ".6156363",
|
|
5241
|
+
"stop-color": "#f7cd07"
|
|
5242
|
+
}),
|
|
5243
|
+
(0, vue.h)("stop", {
|
|
5244
|
+
offset: ".6993454",
|
|
5245
|
+
"stop-color": "#fdcd04"
|
|
5246
|
+
}),
|
|
5247
|
+
(0, vue.h)("stop", {
|
|
5248
|
+
offset: ".7712418",
|
|
5249
|
+
"stop-color": "#fdce05"
|
|
5250
|
+
}),
|
|
5251
|
+
(0, vue.h)("stop", {
|
|
5252
|
+
offset: ".8605661",
|
|
5253
|
+
"stop-color": "#ffce0a"
|
|
5254
|
+
})
|
|
5255
|
+
]),
|
|
5256
|
+
(0, vue.h)("linearGradient", { id: "google-btn-f" }, [
|
|
5257
|
+
(0, vue.h)("stop", {
|
|
5258
|
+
offset: ".3159041",
|
|
5259
|
+
"stop-color": "#ff4c3c"
|
|
5260
|
+
}),
|
|
5261
|
+
(0, vue.h)("stop", {
|
|
5262
|
+
offset: ".6038179",
|
|
5263
|
+
"stop-color": "#ff692c"
|
|
5264
|
+
}),
|
|
5265
|
+
(0, vue.h)("stop", {
|
|
5266
|
+
offset: ".7268366",
|
|
5267
|
+
"stop-color": "#ff7825"
|
|
5268
|
+
}),
|
|
5269
|
+
(0, vue.h)("stop", {
|
|
5270
|
+
offset: ".884534",
|
|
5271
|
+
"stop-color": "#ff8d1b"
|
|
5272
|
+
}),
|
|
5273
|
+
(0, vue.h)("stop", {
|
|
5274
|
+
offset: "1",
|
|
5275
|
+
"stop-color": "#ff9f13"
|
|
5276
|
+
})
|
|
5277
|
+
]),
|
|
5278
|
+
(0, vue.h)("linearGradient", { id: "google-btn-b" }, [
|
|
5279
|
+
(0, vue.h)("stop", {
|
|
5280
|
+
offset: ".2312727",
|
|
5281
|
+
"stop-color": "#ff4541"
|
|
5282
|
+
}),
|
|
5283
|
+
(0, vue.h)("stop", {
|
|
5284
|
+
offset: ".3115468",
|
|
5285
|
+
"stop-color": "#ff4540"
|
|
5286
|
+
}),
|
|
5287
|
+
(0, vue.h)("stop", {
|
|
5288
|
+
offset: ".4575163",
|
|
5289
|
+
"stop-color": "#ff4640"
|
|
5290
|
+
}),
|
|
5291
|
+
(0, vue.h)("stop", {
|
|
5292
|
+
offset: ".540305",
|
|
5293
|
+
"stop-color": "#ff473f"
|
|
5294
|
+
}),
|
|
5295
|
+
(0, vue.h)("stop", {
|
|
5296
|
+
offset: ".6993464",
|
|
5297
|
+
"stop-color": "#ff5138"
|
|
5298
|
+
}),
|
|
5299
|
+
(0, vue.h)("stop", {
|
|
5300
|
+
offset: ".7712418",
|
|
5301
|
+
"stop-color": "#ff5b33"
|
|
5302
|
+
}),
|
|
5303
|
+
(0, vue.h)("stop", {
|
|
5304
|
+
offset: ".8605665",
|
|
5305
|
+
"stop-color": "#ff6c29"
|
|
5306
|
+
}),
|
|
5307
|
+
(0, vue.h)("stop", {
|
|
5308
|
+
offset: "1",
|
|
5309
|
+
"stop-color": "#ff8c18"
|
|
5310
|
+
})
|
|
5311
|
+
]),
|
|
5312
|
+
(0, vue.h)("linearGradient", { id: "google-btn-d" }, [(0, vue.h)("stop", {
|
|
5313
|
+
offset: ".4084578",
|
|
5314
|
+
"stop-color": "#fb4e5a"
|
|
5315
|
+
}), (0, vue.h)("stop", {
|
|
5316
|
+
offset: "1",
|
|
5317
|
+
"stop-color": "#ff4540"
|
|
5318
|
+
})]),
|
|
5319
|
+
(0, vue.h)("linearGradient", { id: "google-btn-c" }, [
|
|
5320
|
+
(0, vue.h)("stop", {
|
|
5321
|
+
offset: ".1315461",
|
|
5322
|
+
"stop-color": "#0cba65"
|
|
5323
|
+
}),
|
|
5324
|
+
(0, vue.h)("stop", {
|
|
5325
|
+
offset: ".2097843",
|
|
5326
|
+
"stop-color": "#0bb86d"
|
|
5327
|
+
}),
|
|
5328
|
+
(0, vue.h)("stop", {
|
|
5329
|
+
offset: ".2972969",
|
|
5330
|
+
"stop-color": "#09b479"
|
|
5331
|
+
}),
|
|
5332
|
+
(0, vue.h)("stop", {
|
|
5333
|
+
offset: ".3962575",
|
|
5334
|
+
"stop-color": "#08ad93"
|
|
5335
|
+
}),
|
|
5336
|
+
(0, vue.h)("stop", {
|
|
5337
|
+
offset: ".4771242",
|
|
5338
|
+
"stop-color": "#0aa6a9"
|
|
5339
|
+
}),
|
|
5340
|
+
(0, vue.h)("stop", {
|
|
5341
|
+
offset: ".5684245",
|
|
5342
|
+
"stop-color": "#0d9cc6"
|
|
5343
|
+
}),
|
|
5344
|
+
(0, vue.h)("stop", {
|
|
5345
|
+
offset: ".667385",
|
|
5346
|
+
"stop-color": "#1893dd"
|
|
5347
|
+
}),
|
|
5348
|
+
(0, vue.h)("stop", {
|
|
5349
|
+
offset: ".7687273",
|
|
5350
|
+
"stop-color": "#258bf1"
|
|
5351
|
+
}),
|
|
5352
|
+
(0, vue.h)("stop", {
|
|
5353
|
+
offset: ".8585063",
|
|
5354
|
+
"stop-color": "#3086ff"
|
|
5355
|
+
})
|
|
5356
|
+
]),
|
|
5357
|
+
(0, vue.h)("linearGradient", { id: "google-btn-e" }, [
|
|
5358
|
+
(0, vue.h)("stop", {
|
|
5359
|
+
offset: ".3660131",
|
|
5360
|
+
"stop-color": "#ff4e3a"
|
|
5361
|
+
}),
|
|
5362
|
+
(0, vue.h)("stop", {
|
|
5363
|
+
offset: ".4575163",
|
|
5364
|
+
"stop-color": "#ff8a1b"
|
|
5365
|
+
}),
|
|
5366
|
+
(0, vue.h)("stop", {
|
|
5367
|
+
offset: ".540305",
|
|
5368
|
+
"stop-color": "#ffa312"
|
|
5369
|
+
}),
|
|
5370
|
+
(0, vue.h)("stop", {
|
|
5371
|
+
offset: ".6156363",
|
|
5372
|
+
"stop-color": "#ffb60c"
|
|
5373
|
+
}),
|
|
5374
|
+
(0, vue.h)("stop", {
|
|
5375
|
+
offset: ".7712418",
|
|
5376
|
+
"stop-color": "#ffcd0a"
|
|
5377
|
+
}),
|
|
5378
|
+
(0, vue.h)("stop", {
|
|
5379
|
+
offset: ".8605665",
|
|
5380
|
+
"stop-color": "#fecf0a"
|
|
5381
|
+
}),
|
|
5382
|
+
(0, vue.h)("stop", {
|
|
5383
|
+
offset: ".9150327",
|
|
5384
|
+
"stop-color": "#fecf08"
|
|
5385
|
+
}),
|
|
5386
|
+
(0, vue.h)("stop", {
|
|
5387
|
+
offset: "1",
|
|
5388
|
+
"stop-color": "#fdcd01"
|
|
5389
|
+
})
|
|
5390
|
+
]),
|
|
5391
|
+
(0, vue.h)("linearGradient", {
|
|
5392
|
+
href: "#google-btn-a",
|
|
5393
|
+
id: "google-btn-s",
|
|
5394
|
+
x1: "219.6997",
|
|
5395
|
+
y1: "329.5351",
|
|
5396
|
+
x2: "254.4673",
|
|
5397
|
+
y2: "329.5351",
|
|
5398
|
+
gradientUnits: "userSpaceOnUse"
|
|
5399
|
+
}),
|
|
5400
|
+
(0, vue.h)("radialGradient", {
|
|
5401
|
+
href: "#google-btn-b",
|
|
5402
|
+
id: "google-btn-m",
|
|
5403
|
+
gradientUnits: "userSpaceOnUse",
|
|
5404
|
+
gradientTransform: "matrix(-1.936885,1.043001,1.455731,2.555422,290.5254,-400.6338)",
|
|
5405
|
+
cx: "109.6267",
|
|
5406
|
+
cy: "135.8619",
|
|
5407
|
+
fx: "109.6267",
|
|
5408
|
+
fy: "135.8619",
|
|
5409
|
+
r: "71.46001"
|
|
5410
|
+
}),
|
|
5411
|
+
(0, vue.h)("radialGradient", {
|
|
5412
|
+
href: "#google-btn-c",
|
|
5413
|
+
id: "google-btn-n",
|
|
5414
|
+
gradientUnits: "userSpaceOnUse",
|
|
5415
|
+
gradientTransform: "matrix(-3.512595,-4.45809,-1.692547,1.260616,870.8006,191.554)",
|
|
5416
|
+
cx: "45.25866",
|
|
5417
|
+
cy: "279.2738",
|
|
5418
|
+
fx: "45.25866",
|
|
5419
|
+
fy: "279.2738",
|
|
5420
|
+
r: "71.46001"
|
|
5421
|
+
}),
|
|
5422
|
+
(0, vue.h)("radialGradient", {
|
|
5423
|
+
href: "#google-btn-d",
|
|
5424
|
+
id: "google-btn-l",
|
|
5425
|
+
cx: "304.0166",
|
|
5426
|
+
cy: "118.0089",
|
|
5427
|
+
fx: "304.0166",
|
|
5428
|
+
fy: "118.0089",
|
|
5429
|
+
r: "47.85445",
|
|
5430
|
+
gradientTransform: "matrix(2.064353,-4.926832e-6,-2.901531e-6,2.592041,-297.6788,-151.7469)",
|
|
5431
|
+
gradientUnits: "userSpaceOnUse"
|
|
5432
|
+
}),
|
|
5433
|
+
(0, vue.h)("radialGradient", {
|
|
5434
|
+
href: "#google-btn-e",
|
|
5435
|
+
id: "google-btn-o",
|
|
5436
|
+
gradientUnits: "userSpaceOnUse",
|
|
5437
|
+
gradientTransform: "matrix(-0.2485783,2.083138,2.962486,0.3341668,-255.1463,-331.1636)",
|
|
5438
|
+
cx: "181.001",
|
|
5439
|
+
cy: "177.2013",
|
|
5440
|
+
fx: "181.001",
|
|
5441
|
+
fy: "177.2013",
|
|
5442
|
+
r: "71.46001"
|
|
5443
|
+
}),
|
|
5444
|
+
(0, vue.h)("radialGradient", {
|
|
5445
|
+
href: "#google-btn-f",
|
|
5446
|
+
id: "google-btn-p",
|
|
5447
|
+
cx: "207.6733",
|
|
5448
|
+
cy: "108.0972",
|
|
5449
|
+
fx: "207.6733",
|
|
5450
|
+
fy: "108.0972",
|
|
5451
|
+
r: "41.1025",
|
|
5452
|
+
gradientTransform: "matrix(-1.249206,1.343263,-3.896837,-3.425693,880.5011,194.9051)",
|
|
5453
|
+
gradientUnits: "userSpaceOnUse"
|
|
5454
|
+
}),
|
|
5455
|
+
(0, vue.h)("radialGradient", {
|
|
5456
|
+
href: "#google-btn-g",
|
|
5457
|
+
id: "google-btn-r",
|
|
5458
|
+
gradientUnits: "userSpaceOnUse",
|
|
5459
|
+
gradientTransform: "matrix(-1.936885,-1.043001,1.455731,-2.555422,290.5254,838.6834)",
|
|
5460
|
+
cx: "109.6267",
|
|
5461
|
+
cy: "135.8619",
|
|
5462
|
+
fx: "109.6267",
|
|
5463
|
+
fy: "135.8619",
|
|
5464
|
+
r: "71.46001"
|
|
5465
|
+
}),
|
|
5466
|
+
(0, vue.h)("radialGradient", {
|
|
5467
|
+
href: "#google-btn-h",
|
|
5468
|
+
id: "google-btn-j",
|
|
5469
|
+
gradientUnits: "userSpaceOnUse",
|
|
5470
|
+
gradientTransform: "matrix(-0.081402,-1.93722,2.926737,-0.1162508,-215.1345,632.8606)",
|
|
5471
|
+
cx: "154.8697",
|
|
5472
|
+
cy: "145.9691",
|
|
5473
|
+
fx: "154.8697",
|
|
5474
|
+
fy: "145.9691",
|
|
5475
|
+
r: "71.46001"
|
|
5476
|
+
}),
|
|
5477
|
+
(0, vue.h)("filter", {
|
|
5478
|
+
id: "google-btn-q",
|
|
5479
|
+
x: "-.04842873",
|
|
5480
|
+
y: "-.0582241",
|
|
5481
|
+
width: "1.096857",
|
|
5482
|
+
height: "1.116448",
|
|
5483
|
+
"color-interpolation-filters": "sRGB"
|
|
5484
|
+
}, [(0, vue.h)("feGaussianBlur", { stdDeviation: "1.700914" })]),
|
|
5485
|
+
(0, vue.h)("filter", {
|
|
5486
|
+
id: "google-btn-k",
|
|
5487
|
+
x: "-.01670084",
|
|
5488
|
+
y: "-.01009856",
|
|
5489
|
+
width: "1.033402",
|
|
5490
|
+
height: "1.020197",
|
|
5491
|
+
"color-interpolation-filters": "sRGB"
|
|
5492
|
+
}, [(0, vue.h)("feGaussianBlur", { stdDeviation: ".2419367" })]),
|
|
5493
|
+
(0, vue.h)("clipPath", {
|
|
5494
|
+
clipPathUnits: "userSpaceOnUse",
|
|
5495
|
+
id: "google-btn-i"
|
|
5496
|
+
}, [(0, vue.h)("path", {
|
|
5497
|
+
d: "M371.3784 193.2406H237.0825v53.4375h77.167c-1.2405 7.5627-4.0259 15.0024-8.1049 21.7862-4.6734 7.7723-10.4511 13.6895-16.373 18.1957-17.7389 13.4983-38.42 16.2584-52.7828 16.2584-36.2824 0-67.2833-23.2865-79.2844-54.9287-.4843-1.1482-.8059-2.3344-1.1975-3.5068-2.652-8.0533-4.101-16.5825-4.101-25.4474 0-9.226 1.5691-18.0575 4.4301-26.3985 11.2851-32.8967 42.9849-57.4674 80.1789-57.4674 7.4811 0 14.6854.8843 21.5173 2.6481 15.6135 4.0309 26.6578 11.9698 33.4252 18.2494l40.834-39.7111c-24.839-22.616-57.2194-36.3201-95.8444-36.3201-30.8782-.00066-59.3863 9.55308-82.7477 25.6992-18.9454 13.0941-34.4833 30.6254-44.9695 50.9861-9.75366 18.8785-15.09441 39.7994-15.09441 62.2934 0 22.495 5.34891 43.6334 15.10261 62.3374v.126c10.3023 19.8567 25.3678 36.9537 43.6783 49.9878 15.9962 11.3866 44.6789 26.5516 84.0307 26.5516 22.6301 0 42.6867-4.0517 60.3748-11.6447 12.76-5.4775 24.0655-12.6217 34.3012-21.8036 13.5247-12.1323 24.1168-27.1388 31.3465-44.4041 7.2297-17.2654 11.097-36.7895 11.097-57.957 0-9.858-.9971-19.8694-2.6881-28.9684Z",
|
|
5498
|
+
fill: "#000"
|
|
5499
|
+
})])
|
|
5500
|
+
]), (0, vue.h)("g", { transform: "matrix(0.957922,0,0,0.985255,-90.17436,-78.85577)" }, [(0, vue.h)("g", { "clip-path": "url(#google-btn-i)" }, [
|
|
5501
|
+
(0, vue.h)("path", {
|
|
5502
|
+
d: "M92.07563 219.9585c.14844 22.14 6.5014 44.983 16.11767 63.4234v.1269c6.9482 13.3919 16.4444 23.9704 27.2604 34.4518l65.326-23.67c-12.3593-6.2344-14.2452-10.0546-23.1048-17.0253-9.0537-9.0658-15.8015-19.4735-20.0038-31.677h-.1693l.1693-.1269c-2.7646-8.0587-3.0373-16.6129-3.1393-25.5029Z",
|
|
5503
|
+
fill: "url(#google-btn-j)",
|
|
5504
|
+
filter: "url(#google-btn-k)"
|
|
5505
|
+
}),
|
|
5506
|
+
(0, vue.h)("path", {
|
|
5507
|
+
d: "M237.0835 79.02491c-6.4568 22.52569-3.988 44.42139 0 57.16129 7.4561.0055 14.6388.8881 21.4494 2.6464 15.6135 4.0309 26.6566 11.97 33.424 18.2496l41.8794-40.7256c-24.8094-22.58904-54.6663-37.2961-96.7528-37.33169Z",
|
|
5508
|
+
fill: "url(#google-btn-l)",
|
|
5509
|
+
filter: "url(#google-btn-k)"
|
|
5510
|
+
}),
|
|
5511
|
+
(0, vue.h)("path", {
|
|
5512
|
+
d: "M236.9434 78.84678c-31.6709-.00068-60.9107 9.79833-84.8718 26.35902-8.8968 6.149-17.0612 13.2521-24.3311 21.1509-1.9045 17.7429 14.2569 39.5507 46.2615 39.3702 15.5284-17.9373 38.4946-29.5427 64.0561-29.5427.0233 0 .046.0019.0693.002l-1.0439-57.33536c-.0472-.00003-.0929-.00406-.1401-.00406Z",
|
|
5513
|
+
fill: "url(#google-btn-m)",
|
|
5514
|
+
filter: "url(#google-btn-k)"
|
|
5515
|
+
}),
|
|
5516
|
+
(0, vue.h)("path", {
|
|
5517
|
+
d: "m341.4751 226.3788-28.2685 19.2848c-1.2405 7.5627-4.0278 15.0023-8.1068 21.7861-4.6734 7.7723-10.4506 13.6898-16.3725 18.196-17.7022 13.4704-38.3286 16.2439-52.6877 16.2553-14.8415 25.1018-17.4435 37.6749 1.0439 57.9342 22.8762-.0167 43.157-4.1174 61.0458-11.7965 12.9312-5.551 24.3879-12.7913 34.7609-22.0964 13.7061-12.295 24.4421-27.5034 31.7688-45.0003 7.3267-17.497 11.2446-37.2822 11.2446-58.7336Z",
|
|
5518
|
+
fill: "url(#google-btn-n)",
|
|
5519
|
+
filter: "url(#google-btn-k)"
|
|
5520
|
+
}),
|
|
5141
5521
|
(0, vue.h)("path", {
|
|
5142
|
-
d: "
|
|
5143
|
-
fill: "#
|
|
5144
|
-
|
|
5522
|
+
d: "M234.9956 191.2104v57.4981h136.0062c1.1962-7.8745 5.1523-18.0644 5.1523-26.5001 0-9.858-.9963-21.899-2.6873-30.998Z",
|
|
5523
|
+
fill: "#3086ff",
|
|
5524
|
+
filter: "url(#google-btn-k)"
|
|
5145
5525
|
}),
|
|
5146
5526
|
(0, vue.h)("path", {
|
|
5147
|
-
d: "
|
|
5148
|
-
fill: "#
|
|
5149
|
-
|
|
5527
|
+
d: "M128.3894 124.3268c-8.393 9.1191-15.5632 19.326-21.2483 30.3646-9.75351 18.8785-15.09402 41.8295-15.09402 64.3235 0 .317.02642.6271.02855.9436 4.31953 8.2244 59.66647 6.6495 62.45617 0-.0035-.3103-.0387-.6128-.0387-.9238 0-9.226 1.5696-16.0262 4.4306-24.3672 3.5294-10.2885 9.0557-19.7628 16.1223-27.9257 1.6019-2.0309 5.8748-6.3969 7.1214-9.0157.4749-.9975-.8621-1.5574-.9369-1.9085-.0836-.3927-1.8762-.0769-2.2778-.3694-1.2751-.9288-3.8001-1.4138-5.3334-1.8449-3.2772-.9215-8.7085-2.9536-11.7252-5.0601-9.5357-6.6586-24.417-14.6122-33.5047-24.2164Z",
|
|
5528
|
+
fill: "url(#google-btn-o)",
|
|
5529
|
+
filter: "url(#google-btn-k)"
|
|
5150
5530
|
}),
|
|
5151
5531
|
(0, vue.h)("path", {
|
|
5152
|
-
d: "
|
|
5153
|
-
fill: "#
|
|
5154
|
-
|
|
5532
|
+
d: "M162.0989 155.8569c22.1123 13.3013 28.4714-6.7139 43.173-12.9771L179.698 90.21568c-9.4075 3.92642-18.2957 8.80465-26.5426 14.50442-12.316 8.5122-23.192 18.8995-32.1763 30.7204Z",
|
|
5533
|
+
fill: "url(#google-btn-p)",
|
|
5534
|
+
filter: "url(#google-btn-q)"
|
|
5155
5535
|
}),
|
|
5156
5536
|
(0, vue.h)("path", {
|
|
5157
|
-
d: "
|
|
5158
|
-
fill: "#
|
|
5159
|
-
|
|
5537
|
+
d: "M171.0987 290.222c-29.6829 10.6413-34.3299 11.023-37.0622 29.2903 5.2213 5.0597 10.8312 9.74 16.7926 13.9835 15.9962 11.3867 46.766 26.5517 86.1178 26.5517.0462 0 .0904-.004.1366-.004v-59.1574c-.0298.0001-.064.002-.0938.002-14.7359 0-26.5113-3.8435-38.5848-10.5273-2.9768-1.6479-8.3775 2.7772-11.1229.799-3.7865-2.7284-12.8991 2.3508-16.1833-.9378Z",
|
|
5538
|
+
fill: "url(#google-btn-r)",
|
|
5539
|
+
filter: "url(#google-btn-k)"
|
|
5540
|
+
}),
|
|
5541
|
+
(0, vue.h)("path", {
|
|
5542
|
+
d: "M219.6997 299.0227v59.9959c5.506.6402 11.2361 1.0289 17.2472 1.0289 6.0259 0 11.8556-.3073 17.5204-.8723v-59.7481c-6.3482 1.0777-12.3272 1.461-17.4776 1.461-5.9318 0-11.7005-.6858-17.29-1.8654Z",
|
|
5543
|
+
opacity: ".5",
|
|
5544
|
+
fill: "url(#google-btn-s)",
|
|
5545
|
+
filter: "url(#google-btn-k)"
|
|
5160
5546
|
})
|
|
5161
|
-
])]);
|
|
5547
|
+
])])]);
|
|
5162
5548
|
return () => (0, vue.h)(Button_default, {
|
|
5163
5549
|
...attrs,
|
|
5164
5550
|
color: "secondary",
|
|
@@ -7550,22 +7936,31 @@ const FIELDS_TO_SKIP = [
|
|
|
7550
7936
|
"verifiedEmailAddresses",
|
|
7551
7937
|
"phoneNumbers.mobile",
|
|
7552
7938
|
"emailAddresses",
|
|
7553
|
-
"preferredMFAOption"
|
|
7939
|
+
"preferredMFAOption",
|
|
7940
|
+
"attributes",
|
|
7941
|
+
"isReadOnly",
|
|
7942
|
+
"isReadonly"
|
|
7554
7943
|
];
|
|
7555
7944
|
const READONLY_FIELDS = [
|
|
7556
7945
|
"username",
|
|
7557
7946
|
"userName",
|
|
7558
|
-
"user_name"
|
|
7947
|
+
"user_name",
|
|
7948
|
+
"sub",
|
|
7949
|
+
"id",
|
|
7950
|
+
"ouId",
|
|
7951
|
+
"attributes",
|
|
7952
|
+
"isReadOnly",
|
|
7953
|
+
"isReadonly"
|
|
7559
7954
|
];
|
|
7560
7955
|
const DEFAULT_ATTRIBUTE_MAPPINGS$1 = {
|
|
7561
7956
|
email: ["emails", "email"],
|
|
7562
7957
|
firstName: ["name.givenName", "given_name"],
|
|
7563
7958
|
lastName: ["name.familyName", "family_name"],
|
|
7564
7959
|
picture: [
|
|
7565
|
-
"profile",
|
|
7566
|
-
"profileUrl",
|
|
7567
7960
|
"picture",
|
|
7568
|
-
"
|
|
7961
|
+
"avatar",
|
|
7962
|
+
"pictureUrl",
|
|
7963
|
+
"attributes.picture"
|
|
7569
7964
|
],
|
|
7570
7965
|
username: [
|
|
7571
7966
|
"userName",
|
|
@@ -7652,6 +8047,10 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7652
8047
|
default: void 0,
|
|
7653
8048
|
type: Function
|
|
7654
8049
|
},
|
|
8050
|
+
preferences: {
|
|
8051
|
+
default: void 0,
|
|
8052
|
+
type: Object
|
|
8053
|
+
},
|
|
7655
8054
|
profile: {
|
|
7656
8055
|
default: null,
|
|
7657
8056
|
type: Object
|
|
@@ -7668,21 +8067,38 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7668
8067
|
default: () => [],
|
|
7669
8068
|
type: Array
|
|
7670
8069
|
},
|
|
8070
|
+
t: {
|
|
8071
|
+
default: void 0,
|
|
8072
|
+
type: Function
|
|
8073
|
+
},
|
|
7671
8074
|
title: {
|
|
7672
8075
|
default: "Profile",
|
|
7673
8076
|
type: String
|
|
8077
|
+
},
|
|
8078
|
+
userSchema: {
|
|
8079
|
+
default: null,
|
|
8080
|
+
type: Object
|
|
7674
8081
|
}
|
|
7675
8082
|
},
|
|
7676
8083
|
setup(props, { slots }) {
|
|
7677
8084
|
const editingFields = (0, vue.ref)({});
|
|
7678
8085
|
const editedValues = (0, vue.ref)({});
|
|
7679
8086
|
const px = __thunderid_browser.withVendorCSSClassPrefix;
|
|
7680
|
-
|
|
7681
|
-
|
|
8087
|
+
const regexCache = /* @__PURE__ */ new Map();
|
|
8088
|
+
const t = (key, fallback) => {
|
|
8089
|
+
if (props.t) {
|
|
8090
|
+
const res = props.t(key);
|
|
8091
|
+
if (res && res !== key) return res;
|
|
8092
|
+
}
|
|
8093
|
+
return fallback ?? key;
|
|
8094
|
+
};
|
|
8095
|
+
function shouldShowField(fieldName, isSchemaBased = false) {
|
|
8096
|
+
if (!isSchemaBased && FIELDS_TO_SKIP.includes(fieldName)) return false;
|
|
7682
8097
|
if (props.hideFields && props.hideFields.length > 0 && props.hideFields.includes(fieldName)) return false;
|
|
7683
8098
|
if (props.showFields && props.showFields.length > 0) return props.showFields.includes(fieldName);
|
|
7684
8099
|
return true;
|
|
7685
8100
|
}
|
|
8101
|
+
const fieldErrors = (0, vue.ref)({});
|
|
7686
8102
|
function startEditing(fieldName, currentValue) {
|
|
7687
8103
|
editedValues.value = {
|
|
7688
8104
|
...editedValues.value,
|
|
@@ -7692,9 +8108,14 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7692
8108
|
...editingFields.value,
|
|
7693
8109
|
[fieldName]: true
|
|
7694
8110
|
};
|
|
8111
|
+
fieldErrors.value = {
|
|
8112
|
+
...fieldErrors.value,
|
|
8113
|
+
[fieldName]: ""
|
|
8114
|
+
};
|
|
7695
8115
|
}
|
|
7696
8116
|
function cancelEditing(fieldName) {
|
|
7697
|
-
const
|
|
8117
|
+
const data = props.flattenedProfile ?? props.profile ?? null;
|
|
8118
|
+
const originalValue = data?.[fieldName] ?? data?.attributes?.[fieldName] ?? "";
|
|
7698
8119
|
editedValues.value = {
|
|
7699
8120
|
...editedValues.value,
|
|
7700
8121
|
[fieldName]: originalValue
|
|
@@ -7703,16 +8124,54 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7703
8124
|
...editingFields.value,
|
|
7704
8125
|
[fieldName]: false
|
|
7705
8126
|
};
|
|
8127
|
+
fieldErrors.value = {
|
|
8128
|
+
...fieldErrors.value,
|
|
8129
|
+
[fieldName]: ""
|
|
8130
|
+
};
|
|
7706
8131
|
}
|
|
7707
|
-
function saveField(schema) {
|
|
8132
|
+
async function saveField(schema) {
|
|
7708
8133
|
if (!props.onUpdate || !schema.name) return;
|
|
7709
|
-
const
|
|
7710
|
-
const
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
8134
|
+
const fieldName = schema.name;
|
|
8135
|
+
const value = editedValues.value[fieldName] ?? "";
|
|
8136
|
+
const strVal = String(value ?? "").trim();
|
|
8137
|
+
const fieldLabel = schema.displayName || formatLabel(fieldName);
|
|
8138
|
+
if (schema.required && !strVal) {
|
|
8139
|
+
fieldErrors.value = {
|
|
8140
|
+
...fieldErrors.value,
|
|
8141
|
+
[fieldName]: t("userProfile.field.required", `${fieldLabel} is required.`)
|
|
8142
|
+
};
|
|
8143
|
+
return;
|
|
8144
|
+
}
|
|
8145
|
+
if (schema.regex && strVal) if (schema.regex.length > 250) console.warn(`Regex pattern for field "${fieldName}" exceeds maximum length limit (250 chars).`);
|
|
8146
|
+
else {
|
|
8147
|
+
let reg = regexCache.get(schema.regex);
|
|
8148
|
+
if (reg === void 0) try {
|
|
8149
|
+
reg = new RegExp(schema.regex);
|
|
8150
|
+
regexCache.set(schema.regex, reg);
|
|
8151
|
+
} catch (err) {
|
|
8152
|
+
regexCache.set(schema.regex, null);
|
|
8153
|
+
console.warn(`Invalid regular expression syntax in user schema for field "${fieldName}":`, err);
|
|
8154
|
+
}
|
|
8155
|
+
if (reg && !reg.test(strVal)) {
|
|
8156
|
+
fieldErrors.value = {
|
|
8157
|
+
...fieldErrors.value,
|
|
8158
|
+
[fieldName]: t("userProfile.field.invalidFormat", `${fieldLabel} has an invalid format.`)
|
|
8159
|
+
};
|
|
8160
|
+
return;
|
|
8161
|
+
}
|
|
8162
|
+
}
|
|
8163
|
+
fieldErrors.value = {
|
|
8164
|
+
...fieldErrors.value,
|
|
8165
|
+
[fieldName]: ""
|
|
7715
8166
|
};
|
|
8167
|
+
const payload = buildPatchValue(fieldName, typeof value === "string" ? strVal : value, schema.schemaId, schema.multiValued);
|
|
8168
|
+
try {
|
|
8169
|
+
await props.onUpdate(payload);
|
|
8170
|
+
editingFields.value = {
|
|
8171
|
+
...editingFields.value,
|
|
8172
|
+
[fieldName]: false
|
|
8173
|
+
};
|
|
8174
|
+
} catch {}
|
|
7716
8175
|
}
|
|
7717
8176
|
function renderInput(schema) {
|
|
7718
8177
|
const fieldName = schema.name ?? "";
|
|
@@ -7765,30 +8224,29 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7765
8224
|
class: px("user-profile__field-placeholder"),
|
|
7766
8225
|
onClick: () => startEditing(name, value)
|
|
7767
8226
|
}, `Enter your ${label.toLowerCase()}`) : null;
|
|
7768
|
-
const displayValueNode = hasValue ? (0, vue.h)(
|
|
7769
|
-
class: px("user-profile__field-value"),
|
|
7770
|
-
variant: "body1"
|
|
7771
|
-
}, () => String(value)) : editablePlaceholder;
|
|
8227
|
+
const displayValueNode = hasValue ? (0, vue.h)("span", { class: px("user-profile__field-value") }, String(value)) : editablePlaceholder;
|
|
7772
8228
|
return (0, vue.h)("div", {
|
|
7773
8229
|
class: px("user-profile__field"),
|
|
7774
8230
|
key: name
|
|
7775
|
-
}, [(0, vue.h)("div", { class: px("user-profile__field-label-
|
|
7776
|
-
|
|
7777
|
-
variant: "body2"
|
|
7778
|
-
}, () => label)]), (0, vue.h)("div", { class: px("user-profile__field-value-col") }, [isEditing ? (0, vue.h)("div", { class: px("user-profile__field-edit") }, [renderInput(schema), (0, vue.h)("div", { class: px("user-profile__field-edit-actions") }, [(0, vue.h)(Button_default, {
|
|
8231
|
+
}, [(0, vue.h)("div", { class: px("user-profile__field-inner") }, [(0, vue.h)("span", { class: px("user-profile__field-label") }, label), isEditing ? (0, vue.h)("div", { class: px("user-profile__field-edit") }, [renderInput(schema), fieldErrors.value[name] ? (0, vue.h)("div", { class: px("user-profile__field-error") }, fieldErrors.value[name]) : null]) : displayValueNode]), isEditable && !isReadonly ? (0, vue.h)("div", { class: px("user-profile__field-actions") }, [isEditing ? [(0, vue.h)(Button_default, {
|
|
8232
|
+
color: "primary",
|
|
7779
8233
|
onClick: () => saveField(schema),
|
|
7780
8234
|
size: "small",
|
|
7781
8235
|
variant: "solid"
|
|
7782
|
-
}, () => "Save"), (0, vue.h)(Button_default, {
|
|
8236
|
+
}, () => t("userProfile.actions.save", "Save")), (0, vue.h)(Button_default, {
|
|
8237
|
+
color: "secondary",
|
|
7783
8238
|
onClick: () => cancelEditing(name),
|
|
7784
8239
|
size: "small",
|
|
7785
|
-
variant: "
|
|
7786
|
-
}, () => "
|
|
7787
|
-
"aria-label": `Edit ${label}`,
|
|
8240
|
+
variant: "solid"
|
|
8241
|
+
}, () => t("userProfile.actions.cancel", "Cancel"))] : hasValue ? (0, vue.h)(Button_default, {
|
|
7788
8242
|
class: px("user-profile__field-edit-btn"),
|
|
8243
|
+
color: "secondary",
|
|
7789
8244
|
onClick: () => startEditing(name, value),
|
|
7790
|
-
|
|
7791
|
-
|
|
8245
|
+
size: "small",
|
|
8246
|
+
startIcon: (0, vue.h)(PencilIcon),
|
|
8247
|
+
title: t("userProfile.actions.edit", "Edit"),
|
|
8248
|
+
variant: "ghost"
|
|
8249
|
+
}) : null]) : null]);
|
|
7792
8250
|
}
|
|
7793
8251
|
function renderProfileWithoutSchemas() {
|
|
7794
8252
|
const data = props.flattenedProfile || props.profile;
|
|
@@ -7799,21 +8257,20 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7799
8257
|
}).sort(([a], [b]) => a.localeCompare(b)).map(([key, value]) => (0, vue.h)("div", {
|
|
7800
8258
|
class: px("user-profile__field"),
|
|
7801
8259
|
key
|
|
7802
|
-
}, [(0, vue.h)("div", { class: px("user-profile__field-
|
|
7803
|
-
class: px("user-profile__field-label"),
|
|
7804
|
-
variant: "body2"
|
|
7805
|
-
}, () => formatLabel(key))]), (0, vue.h)("div", { class: px("user-profile__field-value-col") }, [(0, vue.h)(Typography_default, {
|
|
7806
|
-
class: px("user-profile__field-value"),
|
|
7807
|
-
variant: "body1"
|
|
7808
|
-
}, () => typeof value === "object" ? JSON.stringify(value) : String(value))])]));
|
|
8260
|
+
}, [(0, vue.h)("div", { class: px("user-profile__field-inner") }, [(0, vue.h)("span", { class: px("user-profile__field-label") }, formatLabel(key)), (0, vue.h)("span", { class: px("user-profile__field-value") }, typeof value === "object" ? JSON.stringify(value) : String(value))])]));
|
|
7809
8261
|
}
|
|
7810
8262
|
function renderHero(currentUser) {
|
|
7811
8263
|
const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS$1, currentUser);
|
|
7812
8264
|
const email = getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS$1, currentUser) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS$1, currentUser);
|
|
8265
|
+
const picture = getMappedUserProfileValue_default("picture", DEFAULT_ATTRIBUTE_MAPPINGS$1, currentUser) || null;
|
|
7813
8266
|
const avatarGradient = getAvatarGradient$1(String(currentUser["username"] || currentUser["userName"] || currentUser["email"] || currentUser["sub"] || displayName));
|
|
7814
8267
|
const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
|
|
7815
8268
|
const avatarSizeClass = px(`user-profile__avatar--${props.avatarSize ?? "lg"}`);
|
|
7816
|
-
return (0, vue.h)("div", { class: px("user-profile__hero") }, [(0, vue.h)("div", { class: px("user-profile__avatar-wrapper") }, [(0, vue.h)("
|
|
8269
|
+
return (0, vue.h)("div", { class: px("user-profile__hero") }, [(0, vue.h)("div", { class: px("user-profile__avatar-wrapper") }, [picture ? (0, vue.h)("img", {
|
|
8270
|
+
alt: displayName,
|
|
8271
|
+
class: [px("user-profile__avatar"), avatarSizeClass].join(" "),
|
|
8272
|
+
src: picture
|
|
8273
|
+
}) : (0, vue.h)("div", {
|
|
7817
8274
|
class: [px("user-profile__avatar"), avatarSizeClass].join(" "),
|
|
7818
8275
|
style: { background: avatarGradient }
|
|
7819
8276
|
}, [(0, vue.h)("span", { class: px("user-profile__avatar-initials") }, initials)])]), (0, vue.h)("div", { class: px("user-profile__hero-info") }, [(0, vue.h)("span", { class: px("user-profile__hero-name") }, displayName), email ? (0, vue.h)("span", { class: px("user-profile__hero-subtitle") }, String(email)) : null])]);
|
|
@@ -7839,15 +8296,31 @@ const BaseUserProfile = (0, vue.defineComponent)({
|
|
|
7839
8296
|
props.className ?? ""
|
|
7840
8297
|
].filter(Boolean).join(" ");
|
|
7841
8298
|
const children = [];
|
|
7842
|
-
children.push((0, vue.h)("div", { class: px("user-profile__header") }, [(0, vue.h)("span", { class: px("user-profile__title") }, props.title ?? "Profile")]));
|
|
7843
|
-
children.push((0, vue.h)(Divider_default, { class: px("user-profile__header-divider") }));
|
|
7844
8299
|
if (props.showAvatar !== false && currentUser) children.push(renderHero(currentUser));
|
|
7845
8300
|
if (props.error) children.push((0, vue.h)(Alert_default, {
|
|
7846
8301
|
class: px("user-profile__error"),
|
|
7847
8302
|
severity: "error"
|
|
7848
8303
|
}, () => props.error));
|
|
7849
8304
|
if (props.isLoading) children.push((0, vue.h)("div", { class: px("user-profile__loading") }, [(0, vue.h)(Spinner_default)]));
|
|
7850
|
-
else if (
|
|
8305
|
+
else if (props.userSchema && typeof props.userSchema === "object" && Object.keys(props.userSchema).length > 0) {
|
|
8306
|
+
const fieldRows = Object.entries(props.userSchema).filter(([key, metaAttr]) => {
|
|
8307
|
+
if (metaAttr?.credential) return false;
|
|
8308
|
+
return shouldShowField(key, true);
|
|
8309
|
+
}).map(([key, metaAttr]) => {
|
|
8310
|
+
const val = editedValues.value?.[key] ?? currentUser?.attributes?.[key] ?? currentUser?.[key] ?? "";
|
|
8311
|
+
const isReadonly = metaAttr.readOnly === true || metaAttr.mutability === "READ_ONLY" || READONLY_FIELDS.includes(key);
|
|
8312
|
+
return {
|
|
8313
|
+
displayName: metaAttr.displayName ?? (key ? (0, __thunderid_browser.startCase)(key) : ""),
|
|
8314
|
+
mutability: isReadonly ? "READ_ONLY" : "READ_WRITE",
|
|
8315
|
+
name: key,
|
|
8316
|
+
regex: metaAttr.regex,
|
|
8317
|
+
required: !!metaAttr.required,
|
|
8318
|
+
type: (metaAttr.type ?? "STRING").toUpperCase(),
|
|
8319
|
+
value: val
|
|
8320
|
+
};
|
|
8321
|
+
}).map((schema) => renderSchemaFieldRow(schema)).filter((node) => node !== null);
|
|
8322
|
+
children.push((0, vue.h)("div", { class: px("user-profile__fields") }, fieldRows));
|
|
8323
|
+
} else if (hasSchemas) {
|
|
7851
8324
|
const fieldRows = schemas.filter((s) => s.name && shouldShowField(s.name)).sort((a, b) => {
|
|
7852
8325
|
return (a.displayOrder ? parseInt(a.displayOrder, 10) : 999) - (b.displayOrder ? parseInt(b.displayOrder, 10) : 999);
|
|
7853
8326
|
}).map((schema) => {
|
|
@@ -7877,7 +8350,7 @@ const updateMeProfile = async ({ fetcher, instanceId = 0,...requestConfig }) =>
|
|
|
7877
8350
|
const response = await __thunderid_browser.FetchHttpClient.getInstance(instanceId).request({
|
|
7878
8351
|
data: config.body ? JSON.parse(config.body) : void 0,
|
|
7879
8352
|
headers: config.headers,
|
|
7880
|
-
method: config.method || "
|
|
8353
|
+
method: config.method || "PUT",
|
|
7881
8354
|
url
|
|
7882
8355
|
});
|
|
7883
8356
|
return {
|
|
@@ -7928,6 +8401,10 @@ const UserProfile = (0, vue.defineComponent)({
|
|
|
7928
8401
|
default: () => [],
|
|
7929
8402
|
type: Array
|
|
7930
8403
|
},
|
|
8404
|
+
preferences: {
|
|
8405
|
+
default: void 0,
|
|
8406
|
+
type: Object
|
|
8407
|
+
},
|
|
7931
8408
|
showAvatar: {
|
|
7932
8409
|
default: true,
|
|
7933
8410
|
type: Boolean
|
|
@@ -7942,19 +8419,37 @@ const UserProfile = (0, vue.defineComponent)({
|
|
|
7942
8419
|
}
|
|
7943
8420
|
},
|
|
7944
8421
|
setup(props, { slots }) {
|
|
7945
|
-
const { baseUrl, endpoints, instanceId } = useThunderID_default();
|
|
7946
|
-
const { flattenedProfile, profile, onUpdateProfile } = useUser_default();
|
|
8422
|
+
const { baseUrl, endpoints, instanceId, preferences: contextPreferences } = useThunderID_default();
|
|
8423
|
+
const { flattenedProfile, profile, onUpdateProfile, updateProfile, userSchema } = useUser_default();
|
|
7947
8424
|
const { t } = useI18n_default();
|
|
8425
|
+
const resolvedPreferences = (0, vue.computed)(() => ({
|
|
8426
|
+
...contextPreferences,
|
|
8427
|
+
...props.preferences,
|
|
8428
|
+
user: {
|
|
8429
|
+
...contextPreferences?.user,
|
|
8430
|
+
...props.preferences?.user
|
|
8431
|
+
}
|
|
8432
|
+
}));
|
|
8433
|
+
const isEditableProfile = (0, vue.computed)(() => resolvedPreferences.value?.user?.fetchUserProfile === false ? false : props.editable);
|
|
7948
8434
|
const error = (0, vue.ref)(null);
|
|
7949
8435
|
async function handleProfileUpdate(payload) {
|
|
7950
|
-
if (!baseUrl) return;
|
|
7951
8436
|
error.value = null;
|
|
7952
8437
|
try {
|
|
8438
|
+
const updatedAttributes = (0, __thunderid_browser.deepMerge)((profile?.value?.profile ?? profile?.value)?.["attributes"] ?? {}, payload);
|
|
8439
|
+
Object.keys(updatedAttributes).forEach((key) => {
|
|
8440
|
+
if (updatedAttributes[key] === void 0 || updatedAttributes[key] === null) delete updatedAttributes[key];
|
|
8441
|
+
});
|
|
8442
|
+
if (updateProfile) {
|
|
8443
|
+
const res = await updateProfile({ payload: updatedAttributes });
|
|
8444
|
+
if (res && !res.success && res.error) error.value = res.error;
|
|
8445
|
+
return;
|
|
8446
|
+
}
|
|
8447
|
+
if (!baseUrl) return;
|
|
7953
8448
|
onUpdateProfile(await updateMeProfile_default({
|
|
7954
8449
|
baseUrl,
|
|
7955
8450
|
url: (0, __thunderid_browser.resolveResourceEndpoint)("usersMe", { endpoints }),
|
|
7956
8451
|
instanceId,
|
|
7957
|
-
payload
|
|
8452
|
+
payload: updatedAttributes
|
|
7958
8453
|
}));
|
|
7959
8454
|
} catch (caughtError) {
|
|
7960
8455
|
let message = t("user.profile.update.generic.error") || "Failed to update profile. Please try again.";
|
|
@@ -7969,15 +8464,18 @@ const UserProfile = (0, vue.defineComponent)({
|
|
|
7969
8464
|
class: (0, __thunderid_browser.withVendorCSSClassPrefix)("user-profile--styled"),
|
|
7970
8465
|
className: props.className,
|
|
7971
8466
|
compact: props.compact,
|
|
7972
|
-
editable:
|
|
8467
|
+
editable: isEditableProfile.value,
|
|
7973
8468
|
error: error.value,
|
|
7974
8469
|
flattenedProfile: flattenedProfile?.value,
|
|
7975
8470
|
hideFields: props.hideFields,
|
|
7976
|
-
onUpdate: handleProfileUpdate,
|
|
8471
|
+
onUpdate: isEditableProfile.value ? handleProfileUpdate : void 0,
|
|
8472
|
+
preferences: resolvedPreferences.value,
|
|
7977
8473
|
profile: profile?.value?.profile ?? flattenedProfile?.value,
|
|
7978
8474
|
showAvatar: props.showAvatar,
|
|
7979
8475
|
showFields: props.showFields,
|
|
7980
|
-
|
|
8476
|
+
t,
|
|
8477
|
+
title: props.title,
|
|
8478
|
+
userSchema: userSchema?.value
|
|
7981
8479
|
}, slots);
|
|
7982
8480
|
}
|
|
7983
8481
|
});
|
|
@@ -7989,18 +8487,18 @@ const DEFAULT_ATTRIBUTE_MAPPINGS = {
|
|
|
7989
8487
|
email: ["emails", "email"],
|
|
7990
8488
|
firstName: ["name.givenName", "given_name"],
|
|
7991
8489
|
lastName: ["name.familyName", "family_name"],
|
|
8490
|
+
picture: [
|
|
8491
|
+
"picture",
|
|
8492
|
+
"avatar",
|
|
8493
|
+
"pictureUrl",
|
|
8494
|
+
"attributes.picture"
|
|
8495
|
+
],
|
|
7992
8496
|
username: [
|
|
7993
8497
|
"userName",
|
|
7994
8498
|
"username",
|
|
7995
8499
|
"user_name"
|
|
7996
8500
|
]
|
|
7997
8501
|
};
|
|
7998
|
-
/** Approximate min-width for each size, used for auto-alignment decisions. */
|
|
7999
|
-
const MENU_MIN_WIDTHS = {
|
|
8000
|
-
lg: 280,
|
|
8001
|
-
md: 220,
|
|
8002
|
-
sm: 180
|
|
8003
|
-
};
|
|
8004
8502
|
const AVATAR_GRADIENTS = [
|
|
8005
8503
|
"linear-gradient(135deg, #4b6ef5 0%, #7c3aed 100%)",
|
|
8006
8504
|
"linear-gradient(135deg, #0ea5e9 0%, #4b6ef5 100%)",
|
|
@@ -8022,16 +8520,19 @@ function resolveUserInfo(user) {
|
|
|
8022
8520
|
displayName: "User",
|
|
8023
8521
|
gradient: AVATAR_GRADIENTS[0],
|
|
8024
8522
|
initials: "?",
|
|
8523
|
+
picture: null,
|
|
8025
8524
|
subtitle: ""
|
|
8026
8525
|
};
|
|
8027
8526
|
const displayName = getDisplayName_default(DEFAULT_ATTRIBUTE_MAPPINGS, user) || "User";
|
|
8028
8527
|
const initials = displayName.split(" ").map((w) => w.charAt(0)).slice(0, 2).join("").toUpperCase() || "?";
|
|
8528
|
+
const picture = getMappedUserProfileValue_default("picture", DEFAULT_ATTRIBUTE_MAPPINGS, user) || null;
|
|
8029
8529
|
const seed = String(getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS, user) || getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS, user) || displayName);
|
|
8030
8530
|
const subtitle = String(getMappedUserProfileValue_default("email", DEFAULT_ATTRIBUTE_MAPPINGS, user) || getMappedUserProfileValue_default("username", DEFAULT_ATTRIBUTE_MAPPINGS, user) || "");
|
|
8031
8531
|
return {
|
|
8032
8532
|
displayName,
|
|
8033
8533
|
gradient: getAvatarGradient(seed),
|
|
8034
8534
|
initials,
|
|
8535
|
+
picture,
|
|
8035
8536
|
subtitle
|
|
8036
8537
|
};
|
|
8037
8538
|
}
|
|
@@ -8087,13 +8588,46 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8087
8588
|
setup(props, { slots }) {
|
|
8088
8589
|
const isOpen = (0, vue.ref)(false);
|
|
8089
8590
|
const containerRef = (0, vue.ref)(null);
|
|
8591
|
+
const modalOverlayRef = (0, vue.ref)(null);
|
|
8592
|
+
const avatarImageError = (0, vue.ref)(false);
|
|
8090
8593
|
const px = __thunderid_browser.withVendorCSSClassPrefix;
|
|
8594
|
+
(0, vue.watch)(() => resolveUserInfo(props.user ?? null).picture, () => {
|
|
8595
|
+
avatarImageError.value = false;
|
|
8596
|
+
});
|
|
8091
8597
|
function handleClickOutside(event) {
|
|
8092
8598
|
if (containerRef.value && !containerRef.value.contains(event.target)) isOpen.value = false;
|
|
8093
8599
|
}
|
|
8600
|
+
function handleModalClose() {
|
|
8601
|
+
props.onProfileModalClose?.();
|
|
8602
|
+
(containerRef.value?.querySelector(`.${px("user-dropdown__trigger")}`))?.focus();
|
|
8603
|
+
}
|
|
8094
8604
|
function handleKeyDown(event) {
|
|
8095
|
-
if (
|
|
8605
|
+
if (props.isProfileModalOpen) {
|
|
8606
|
+
if (event.key === "Escape") handleModalClose();
|
|
8607
|
+
else if (event.key === "Tab") {
|
|
8608
|
+
const overlay = modalOverlayRef.value;
|
|
8609
|
+
if (overlay) {
|
|
8610
|
+
const focusables = overlay.querySelectorAll("button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])");
|
|
8611
|
+
if (focusables.length > 0) {
|
|
8612
|
+
const first = focusables[0];
|
|
8613
|
+
const last = focusables[focusables.length - 1];
|
|
8614
|
+
if (event.shiftKey && document.activeElement === first) {
|
|
8615
|
+
event.preventDefault();
|
|
8616
|
+
last.focus();
|
|
8617
|
+
} else if (!event.shiftKey && document.activeElement === last) {
|
|
8618
|
+
event.preventDefault();
|
|
8619
|
+
first.focus();
|
|
8620
|
+
}
|
|
8621
|
+
}
|
|
8622
|
+
}
|
|
8623
|
+
}
|
|
8624
|
+
} else if (event.key === "Escape") isOpen.value = false;
|
|
8096
8625
|
}
|
|
8626
|
+
(0, vue.watch)(() => props.isProfileModalOpen, (open) => {
|
|
8627
|
+
if (open) (0, vue.nextTick)(() => {
|
|
8628
|
+
(modalOverlayRef.value?.querySelector(`.${px("user-dropdown__modal-close")}`))?.focus();
|
|
8629
|
+
});
|
|
8630
|
+
});
|
|
8097
8631
|
(0, vue.onMounted)(() => {
|
|
8098
8632
|
document.addEventListener("click", handleClickOutside);
|
|
8099
8633
|
document.addEventListener("keydown", handleKeyDown);
|
|
@@ -8106,8 +8640,7 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8106
8640
|
if (props.menuAlign !== "auto") return props.menuAlign ?? "right";
|
|
8107
8641
|
if (!containerRef.value) return "right";
|
|
8108
8642
|
const rect = containerRef.value.getBoundingClientRect();
|
|
8109
|
-
|
|
8110
|
-
return window.innerWidth - rect.right >= menuWidth ? "right" : "left";
|
|
8643
|
+
return window.innerWidth - rect.left >= rect.right ? "left" : "right";
|
|
8111
8644
|
}
|
|
8112
8645
|
return () => {
|
|
8113
8646
|
if (slots.default) return slots.default({
|
|
@@ -8117,7 +8650,7 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8117
8650
|
},
|
|
8118
8651
|
user: props.user
|
|
8119
8652
|
});
|
|
8120
|
-
const { displayName, initials, gradient, subtitle } = resolveUserInfo(props.user ?? null);
|
|
8653
|
+
const { displayName, initials, gradient, picture, subtitle } = resolveUserInfo(props.user ?? null);
|
|
8121
8654
|
const size = props.size ?? "md";
|
|
8122
8655
|
const avatarSizeClass = size !== "md" ? px(`user-dropdown__avatar--${size}`) : "";
|
|
8123
8656
|
const triggerClass = [px("user-dropdown__trigger"), isOpen.value ? px("user-dropdown__trigger--open") : ""].filter(Boolean).join(" ");
|
|
@@ -8130,7 +8663,14 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8130
8663
|
isOpen.value = !isOpen.value;
|
|
8131
8664
|
},
|
|
8132
8665
|
type: "button"
|
|
8133
|
-
}, [(0, vue.h)("
|
|
8666
|
+
}, [picture && !avatarImageError.value ? (0, vue.h)("img", {
|
|
8667
|
+
alt: displayName,
|
|
8668
|
+
class: [px("user-dropdown__avatar"), avatarSizeClass].filter(Boolean).join(" "),
|
|
8669
|
+
onError: () => {
|
|
8670
|
+
avatarImageError.value = true;
|
|
8671
|
+
},
|
|
8672
|
+
src: picture
|
|
8673
|
+
}) : (0, vue.h)("span", {
|
|
8134
8674
|
class: [px("user-dropdown__avatar"), avatarSizeClass].filter(Boolean).join(" "),
|
|
8135
8675
|
style: { background: gradient }
|
|
8136
8676
|
}, initials), props.showChevron ? (0, vue.h)("span", { class: px("user-dropdown__chevron") }, [(0, vue.h)(ChevronDownIcon, { size: 14 })]) : null]);
|
|
@@ -8144,7 +8684,11 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8144
8684
|
sizeClass
|
|
8145
8685
|
].filter(Boolean).join(" ");
|
|
8146
8686
|
const menuChildren = [];
|
|
8147
|
-
menuChildren.push((0, vue.h)("div", { class: px("user-dropdown__menu-header") }, [(0, vue.h)("
|
|
8687
|
+
menuChildren.push((0, vue.h)("div", { class: px("user-dropdown__menu-header") }, [picture ? (0, vue.h)("img", {
|
|
8688
|
+
alt: displayName,
|
|
8689
|
+
class: px("user-dropdown__menu-header-avatar"),
|
|
8690
|
+
src: picture
|
|
8691
|
+
}) : (0, vue.h)("div", {
|
|
8148
8692
|
class: px("user-dropdown__menu-header-avatar"),
|
|
8149
8693
|
style: { background: gradient }
|
|
8150
8694
|
}, initials), (0, vue.h)("div", { class: px("user-dropdown__menu-header-info") }, [(0, vue.h)("span", { class: px("user-dropdown__menu-header-name") }, displayName), subtitle ? (0, vue.h)("span", { class: px("user-dropdown__menu-header-subtitle") }, subtitle) : null])]));
|
|
@@ -8190,17 +8734,21 @@ const BaseUserDropdown = (0, vue.defineComponent)({
|
|
|
8190
8734
|
class: [px("user-dropdown"), props.className].filter(Boolean).join(" "),
|
|
8191
8735
|
ref: containerRef
|
|
8192
8736
|
}, [trigger, menu]);
|
|
8193
|
-
if (props.isProfileModalOpen) return (0, vue.h)("div", [container, (0, vue.h)("div", {
|
|
8737
|
+
if (props.isProfileModalOpen) return (0, vue.h)("div", [container, (0, vue.h)(vue.Teleport, { to: "body" }, [(0, vue.h)("div", {
|
|
8738
|
+
"aria-label": "User profile",
|
|
8739
|
+
"aria-modal": "true",
|
|
8194
8740
|
class: px("user-dropdown__modal-overlay"),
|
|
8741
|
+
ref: modalOverlayRef,
|
|
8742
|
+
role: "dialog",
|
|
8195
8743
|
onClick: (e) => {
|
|
8196
|
-
if (e.target.classList.contains(px("user-dropdown__modal-overlay")))
|
|
8744
|
+
if (e.target.classList.contains(px("user-dropdown__modal-overlay"))) handleModalClose();
|
|
8197
8745
|
}
|
|
8198
8746
|
}, [(0, vue.h)("div", { class: px("user-dropdown__modal-content") }, [(0, vue.h)("button", {
|
|
8199
8747
|
"aria-label": "Close profile",
|
|
8200
8748
|
class: px("user-dropdown__modal-close"),
|
|
8201
|
-
onClick:
|
|
8749
|
+
onClick: handleModalClose,
|
|
8202
8750
|
type: "button"
|
|
8203
|
-
}, [(0, vue.h)(XIcon, { size: 18 })]), props.profileContent])])]);
|
|
8751
|
+
}, [(0, vue.h)(XIcon, { size: 18 })]), props.profileContent])])])]);
|
|
8204
8752
|
return container;
|
|
8205
8753
|
};
|
|
8206
8754
|
}
|
|
@@ -9704,6 +10252,7 @@ Object.defineProperty(exports, 'getActiveTheme', {
|
|
|
9704
10252
|
}
|
|
9705
10253
|
});
|
|
9706
10254
|
exports.getAuthComponentHeadings = getAuthComponentHeadings_default;
|
|
10255
|
+
exports.getUsersMeMeta = getUsersMeMeta_default;
|
|
9707
10256
|
Object.defineProperty(exports, 'handleWebAuthnAuthentication', {
|
|
9708
10257
|
enumerable: true,
|
|
9709
10258
|
get: function () {
|