@asgardeo/react 0.5.24 → 0.5.26
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/AsgardeoReactClient.d.ts +1 -0
- package/dist/cjs/index.js +357 -338
- package/dist/cjs/index.js.map +2 -2
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +10 -0
- package/dist/contexts/I18n/I18nContext.d.ts +1 -1
- package/dist/index.js +22 -3
- package/dist/index.js.map +2 -2
- package/package.json +3 -2
package/dist/cjs/index.js
CHANGED
|
@@ -36,7 +36,7 @@ __export(index_exports, {
|
|
|
36
36
|
AlertTitle: () => AlertTitle,
|
|
37
37
|
AsgardeoContext: () => AsgardeoContext_default,
|
|
38
38
|
AsgardeoProvider: () => AsgardeoProvider_default,
|
|
39
|
-
AsgardeoRuntimeError: () =>
|
|
39
|
+
AsgardeoRuntimeError: () => import_browser68.AsgardeoRuntimeError,
|
|
40
40
|
BaseCreateOrganization: () => BaseCreateOrganization,
|
|
41
41
|
BaseOrganization: () => BaseOrganization_default,
|
|
42
42
|
BaseOrganizationList: () => BaseOrganizationList_default,
|
|
@@ -125,16 +125,16 @@ __export(index_exports, {
|
|
|
125
125
|
UsernamePassword: () => UsernamePassword_default,
|
|
126
126
|
createField: () => createField,
|
|
127
127
|
createOrganization: () => createOrganization_default,
|
|
128
|
-
createPatchOperations: () =>
|
|
128
|
+
createPatchOperations: () => import_browser67.createPatchOperations,
|
|
129
129
|
createSignInOption: () => createSignInOption,
|
|
130
130
|
createSignInOptionFromAuthenticator: () => createSignInOptionFromAuthenticator,
|
|
131
|
-
getActiveTheme: () =>
|
|
131
|
+
getActiveTheme: () => import_browser68.getActiveTheme,
|
|
132
132
|
getAllOrganizations: () => getAllOrganizations_default,
|
|
133
133
|
getMeOrganizations: () => getMeOrganizations_default,
|
|
134
134
|
getMeProfile: () => getScim2Me_default,
|
|
135
135
|
getOrganization: () => getOrganization_default,
|
|
136
136
|
getSchemas: () => getSchemas_default,
|
|
137
|
-
http: () =>
|
|
137
|
+
http: () => import_browser68.http,
|
|
138
138
|
updateMeProfile: () => updateMeProfile_default,
|
|
139
139
|
updateOrganization: () => updateOrganization_default,
|
|
140
140
|
useAlertVariant: () => useAlertVariant,
|
|
@@ -154,7 +154,7 @@ __export(index_exports, {
|
|
|
154
154
|
module.exports = __toCommonJS(index_exports);
|
|
155
155
|
|
|
156
156
|
// src/contexts/Asgardeo/AsgardeoProvider.tsx
|
|
157
|
-
var
|
|
157
|
+
var import_browser12 = require("@asgardeo/browser");
|
|
158
158
|
var import_react15 = require("react");
|
|
159
159
|
|
|
160
160
|
// src/contexts/Asgardeo/AsgardeoContext.ts
|
|
@@ -183,7 +183,8 @@ var AsgardeoContext = (0, import_react.createContext)({
|
|
|
183
183
|
getDecodedIdToken: null,
|
|
184
184
|
getAccessToken: null,
|
|
185
185
|
exchangeToken: null,
|
|
186
|
-
storage: "sessionStorage"
|
|
186
|
+
storage: "sessionStorage",
|
|
187
|
+
reInitialize: null
|
|
187
188
|
});
|
|
188
189
|
AsgardeoContext.displayName = "AsgardeoContext";
|
|
189
190
|
var AsgardeoContext_default = AsgardeoContext;
|
|
@@ -663,6 +664,23 @@ var AsgardeoReactClient = class extends import_browser6.AsgardeoBrowserClient {
|
|
|
663
664
|
return this.asgardeo.init({ ...config, organizationHandle: resolvedOrganizationHandle });
|
|
664
665
|
});
|
|
665
666
|
}
|
|
667
|
+
reInitialize(config) {
|
|
668
|
+
return this.withLoading(async () => {
|
|
669
|
+
let isInitialized;
|
|
670
|
+
try {
|
|
671
|
+
await this.asgardeo.reInitialize(config);
|
|
672
|
+
isInitialized = true;
|
|
673
|
+
} catch (error) {
|
|
674
|
+
throw new import_browser6.AsgardeoRuntimeError(
|
|
675
|
+
`Failed to check if the client is initialized: ${error instanceof Error ? error.message : String(error)}`,
|
|
676
|
+
"AsgardeoReactClient-reInitialize-RuntimeError-001",
|
|
677
|
+
"react",
|
|
678
|
+
"An error occurred while checking the initialization status of the client."
|
|
679
|
+
);
|
|
680
|
+
}
|
|
681
|
+
return isInitialized;
|
|
682
|
+
});
|
|
683
|
+
}
|
|
666
684
|
async updateUserProfile(payload, userId) {
|
|
667
685
|
throw new Error("Not implemented");
|
|
668
686
|
}
|
|
@@ -995,8 +1013,8 @@ var FlowProvider_default = FlowProvider;
|
|
|
995
1013
|
|
|
996
1014
|
// src/contexts/I18n/I18nProvider.tsx
|
|
997
1015
|
var import_react5 = require("react");
|
|
1016
|
+
var import_i18n = require("@asgardeo/i18n");
|
|
998
1017
|
var import_browser8 = require("@asgardeo/browser");
|
|
999
|
-
var import_browser9 = require("@asgardeo/browser");
|
|
1000
1018
|
|
|
1001
1019
|
// src/contexts/I18n/I18nContext.ts
|
|
1002
1020
|
var import_react4 = require("react");
|
|
@@ -1036,7 +1054,7 @@ var I18nProvider = ({
|
|
|
1036
1054
|
children,
|
|
1037
1055
|
preferences
|
|
1038
1056
|
}) => {
|
|
1039
|
-
const defaultBundles = (0,
|
|
1057
|
+
const defaultBundles = (0, import_i18n.getDefaultI18nBundles)();
|
|
1040
1058
|
const determineInitialLanguage = () => {
|
|
1041
1059
|
const configLanguage = preferences?.language;
|
|
1042
1060
|
const storedLanguage = getStoredLanguage();
|
|
@@ -1122,7 +1140,7 @@ var I18nProvider = ({
|
|
|
1122
1140
|
var I18nProvider_default = I18nProvider;
|
|
1123
1141
|
|
|
1124
1142
|
// src/contexts/Organization/OrganizationProvider.tsx
|
|
1125
|
-
var
|
|
1143
|
+
var import_browser9 = require("@asgardeo/browser");
|
|
1126
1144
|
var import_react7 = require("react");
|
|
1127
1145
|
|
|
1128
1146
|
// src/contexts/Organization/OrganizationContext.ts
|
|
@@ -1160,7 +1178,7 @@ var OrganizationProvider = ({
|
|
|
1160
1178
|
const switchOrganization = (0, import_react7.useCallback)(
|
|
1161
1179
|
async (organization) => {
|
|
1162
1180
|
if (!onOrganizationSwitch) {
|
|
1163
|
-
throw new
|
|
1181
|
+
throw new import_browser9.AsgardeoRuntimeError(
|
|
1164
1182
|
"onOrganizationSwitch callback is required",
|
|
1165
1183
|
"OrganizationProvider-SwitchError-001",
|
|
1166
1184
|
"react",
|
|
@@ -1212,7 +1230,7 @@ var OrganizationProvider_default = OrganizationProvider;
|
|
|
1212
1230
|
|
|
1213
1231
|
// src/contexts/Theme/ThemeProvider.tsx
|
|
1214
1232
|
var import_react11 = require("react");
|
|
1215
|
-
var
|
|
1233
|
+
var import_browser10 = require("@asgardeo/browser");
|
|
1216
1234
|
|
|
1217
1235
|
// src/contexts/Theme/ThemeContext.ts
|
|
1218
1236
|
var import_react8 = require("react");
|
|
@@ -1249,7 +1267,7 @@ var applyThemeToDOM = (theme) => {
|
|
|
1249
1267
|
var ThemeProvider = ({
|
|
1250
1268
|
children,
|
|
1251
1269
|
theme: themeConfig,
|
|
1252
|
-
mode =
|
|
1270
|
+
mode = import_browser10.DEFAULT_THEME,
|
|
1253
1271
|
detection = {},
|
|
1254
1272
|
inheritFromBranding = true
|
|
1255
1273
|
}) => {
|
|
@@ -1258,9 +1276,9 @@ var ThemeProvider = ({
|
|
|
1258
1276
|
return mode;
|
|
1259
1277
|
}
|
|
1260
1278
|
if (mode === "branding") {
|
|
1261
|
-
return (0,
|
|
1279
|
+
return (0, import_browser10.detectThemeMode)("system", detection);
|
|
1262
1280
|
}
|
|
1263
|
-
return (0,
|
|
1281
|
+
return (0, import_browser10.detectThemeMode)(mode, detection);
|
|
1264
1282
|
});
|
|
1265
1283
|
let brandingTheme = null;
|
|
1266
1284
|
let brandingActiveTheme = null;
|
|
@@ -1329,7 +1347,7 @@ var ThemeProvider = ({
|
|
|
1329
1347
|
}
|
|
1330
1348
|
};
|
|
1331
1349
|
}, [inheritFromBranding, brandingTheme, themeConfig]);
|
|
1332
|
-
const theme = (0, import_react11.useMemo)(() => (0,
|
|
1350
|
+
const theme = (0, import_react11.useMemo)(() => (0, import_browser10.createTheme)(finalThemeConfig, colorScheme === "dark"), [finalThemeConfig, colorScheme]);
|
|
1333
1351
|
const handleThemeChange = (0, import_react11.useCallback)((isDark) => {
|
|
1334
1352
|
setColorScheme(isDark ? "dark" : "light");
|
|
1335
1353
|
}, []);
|
|
@@ -1345,11 +1363,11 @@ var ThemeProvider = ({
|
|
|
1345
1363
|
if (mode === "class") {
|
|
1346
1364
|
const targetElement = detection.targetElement || document.documentElement;
|
|
1347
1365
|
if (targetElement) {
|
|
1348
|
-
observer = (0,
|
|
1366
|
+
observer = (0, import_browser10.createClassObserver)(targetElement, handleThemeChange, detection);
|
|
1349
1367
|
}
|
|
1350
1368
|
} else if (mode === "system") {
|
|
1351
1369
|
if (!inheritFromBranding || !brandingActiveTheme) {
|
|
1352
|
-
mediaQuery = (0,
|
|
1370
|
+
mediaQuery = (0, import_browser10.createMediaQueryListener)(handleThemeChange);
|
|
1353
1371
|
}
|
|
1354
1372
|
}
|
|
1355
1373
|
return () => {
|
|
@@ -1382,7 +1400,7 @@ var ThemeProvider_default = ThemeProvider;
|
|
|
1382
1400
|
|
|
1383
1401
|
// src/contexts/Branding/BrandingProvider.tsx
|
|
1384
1402
|
var import_react12 = require("react");
|
|
1385
|
-
var
|
|
1403
|
+
var import_browser11 = require("@asgardeo/browser");
|
|
1386
1404
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1387
1405
|
var BrandingProvider = ({
|
|
1388
1406
|
children,
|
|
@@ -1410,7 +1428,7 @@ var BrandingProvider = ({
|
|
|
1410
1428
|
}
|
|
1411
1429
|
}
|
|
1412
1430
|
setActiveTheme(extractedActiveTheme);
|
|
1413
|
-
const transformedTheme = (0,
|
|
1431
|
+
const transformedTheme = (0, import_browser11.transformBrandingPreferenceToTheme)(externalBrandingPreference, forceTheme);
|
|
1414
1432
|
setTheme(transformedTheme);
|
|
1415
1433
|
}, [externalBrandingPreference, forceTheme, enabled]);
|
|
1416
1434
|
(0, import_react12.useEffect)(() => {
|
|
@@ -1658,7 +1676,7 @@ var AsgardeoProvider = ({
|
|
|
1658
1676
|
locale: preferences?.i18n?.language
|
|
1659
1677
|
// Add other branding config options as needed
|
|
1660
1678
|
};
|
|
1661
|
-
const brandingData = await (0,
|
|
1679
|
+
const brandingData = await (0, import_browser12.getBrandingPreference)(getBrandingConfig);
|
|
1662
1680
|
setBrandingPreference(brandingData);
|
|
1663
1681
|
setHasFetchedBranding(true);
|
|
1664
1682
|
} catch (err) {
|
|
@@ -1713,7 +1731,7 @@ var AsgardeoProvider = ({
|
|
|
1713
1731
|
}
|
|
1714
1732
|
return response;
|
|
1715
1733
|
} catch (error) {
|
|
1716
|
-
throw new
|
|
1734
|
+
throw new import_browser12.AsgardeoRuntimeError(
|
|
1717
1735
|
`Error while signing in silently: ${error.message || error}`,
|
|
1718
1736
|
"asgardeo-signInSilently-Error",
|
|
1719
1737
|
"react",
|
|
@@ -1733,7 +1751,7 @@ var AsgardeoProvider = ({
|
|
|
1733
1751
|
await updateSession();
|
|
1734
1752
|
}
|
|
1735
1753
|
} catch (error) {
|
|
1736
|
-
throw new
|
|
1754
|
+
throw new import_browser12.AsgardeoRuntimeError(
|
|
1737
1755
|
`Failed to switch organization: ${error.message || error}`,
|
|
1738
1756
|
"asgardeo-switchOrganization-Error",
|
|
1739
1757
|
"react",
|
|
@@ -1749,7 +1767,7 @@ var AsgardeoProvider = ({
|
|
|
1749
1767
|
setUserProfile((prev) => ({
|
|
1750
1768
|
...prev,
|
|
1751
1769
|
profile: payload,
|
|
1752
|
-
flattenedProfile: (0,
|
|
1770
|
+
flattenedProfile: (0, import_browser12.generateFlattenedUserProfile)(payload, prev?.schemas)
|
|
1753
1771
|
}));
|
|
1754
1772
|
};
|
|
1755
1773
|
const value = (0, import_react15.useMemo)(
|
|
@@ -1774,6 +1792,7 @@ var AsgardeoProvider = ({
|
|
|
1774
1792
|
request: asgardeo.request.bind(asgardeo),
|
|
1775
1793
|
requestAll: asgardeo.requestAll.bind(asgardeo)
|
|
1776
1794
|
},
|
|
1795
|
+
reInitialize: asgardeo.reInitialize.bind(asgardeo),
|
|
1777
1796
|
signInOptions,
|
|
1778
1797
|
getDecodedIdToken: asgardeo.getDecodedIdToken.bind(asgardeo),
|
|
1779
1798
|
exchangeToken: asgardeo.exchangeToken.bind(asgardeo),
|
|
@@ -1811,7 +1830,7 @@ var AsgardeoProvider = ({
|
|
|
1811
1830
|
{
|
|
1812
1831
|
inheritFromBranding: preferences?.theme?.inheritFromBranding,
|
|
1813
1832
|
theme: preferences?.theme?.overrides,
|
|
1814
|
-
mode: (0,
|
|
1833
|
+
mode: (0, import_browser12.getActiveTheme)(preferences.theme.mode),
|
|
1815
1834
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(UserProvider_default, { profile: userProfile, onUpdateProfile: handleProfileUpdate, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1816
1835
|
OrganizationProvider_default,
|
|
1817
1836
|
{
|
|
@@ -1900,7 +1919,7 @@ var useTheme_default = useTheme;
|
|
|
1900
1919
|
|
|
1901
1920
|
// src/hooks/useTranslation.ts
|
|
1902
1921
|
var import_react22 = require("react");
|
|
1903
|
-
var
|
|
1922
|
+
var import_browser13 = require("@asgardeo/browser");
|
|
1904
1923
|
var useTranslation = (componentPreferences) => {
|
|
1905
1924
|
const context = (0, import_react22.useContext)(I18nContext_default);
|
|
1906
1925
|
if (!context) {
|
|
@@ -1921,7 +1940,7 @@ var useTranslation = (componentPreferences) => {
|
|
|
1921
1940
|
if (merged[key]) {
|
|
1922
1941
|
merged[key] = {
|
|
1923
1942
|
...merged[key],
|
|
1924
|
-
translations: (0,
|
|
1943
|
+
translations: (0, import_browser13.deepMerge)(merged[key].translations, componentBundle.translations),
|
|
1925
1944
|
metadata: componentBundle.metadata ? { ...merged[key].metadata, ...componentBundle.metadata } : merged[key].metadata
|
|
1926
1945
|
};
|
|
1927
1946
|
} else {
|
|
@@ -2182,17 +2201,17 @@ var useBranding = (config = {}) => {
|
|
|
2182
2201
|
var useBranding_default = useBranding;
|
|
2183
2202
|
|
|
2184
2203
|
// src/components/actions/SignInButton/BaseSignInButton.tsx
|
|
2185
|
-
var
|
|
2204
|
+
var import_browser16 = require("@asgardeo/browser");
|
|
2186
2205
|
var import_css5 = require("@emotion/css");
|
|
2187
2206
|
var import_react27 = require("react");
|
|
2188
2207
|
|
|
2189
2208
|
// src/components/primitives/Button/Button.tsx
|
|
2190
2209
|
var import_react26 = require("react");
|
|
2191
|
-
var
|
|
2210
|
+
var import_browser15 = require("@asgardeo/browser");
|
|
2192
2211
|
var import_css4 = require("@emotion/css");
|
|
2193
2212
|
|
|
2194
2213
|
// src/components/primitives/Spinner/Spinner.tsx
|
|
2195
|
-
var
|
|
2214
|
+
var import_browser14 = require("@asgardeo/browser");
|
|
2196
2215
|
var import_css2 = require("@emotion/css");
|
|
2197
2216
|
|
|
2198
2217
|
// src/components/primitives/Spinner/Spinner.styles.ts
|
|
@@ -2252,7 +2271,7 @@ var Spinner = ({ size = "medium", color, className, style }) => {
|
|
|
2252
2271
|
const { theme, colorScheme } = useTheme_default();
|
|
2253
2272
|
const styles = Spinner_styles_default(theme, colorScheme, size, color);
|
|
2254
2273
|
const spinnerClassName = (0, import_css2.cx)(
|
|
2255
|
-
(0,
|
|
2274
|
+
(0, import_browser14.withVendorCSSClassPrefix)((0, import_browser14.bem)("spinner")),
|
|
2256
2275
|
styles.spinner,
|
|
2257
2276
|
size === "small" && styles.spinnerSmall,
|
|
2258
2277
|
size === "medium" && styles.spinnerMedium,
|
|
@@ -2606,14 +2625,14 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2606
2625
|
ref,
|
|
2607
2626
|
style,
|
|
2608
2627
|
className: (0, import_css4.cx)(
|
|
2609
|
-
(0,
|
|
2610
|
-
(0,
|
|
2611
|
-
(0,
|
|
2612
|
-
(0,
|
|
2613
|
-
(0,
|
|
2614
|
-
fullWidth ? (0,
|
|
2615
|
-
loading ? (0,
|
|
2616
|
-
disabled || loading ? (0,
|
|
2628
|
+
(0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button")),
|
|
2629
|
+
(0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", variant)),
|
|
2630
|
+
(0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", color)),
|
|
2631
|
+
(0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", size)),
|
|
2632
|
+
(0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", shape)),
|
|
2633
|
+
fullWidth ? (0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "fullWidth")) : void 0,
|
|
2634
|
+
loading ? (0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "loading")) : void 0,
|
|
2635
|
+
disabled || loading ? (0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "disabled")) : void 0,
|
|
2617
2636
|
styles.button,
|
|
2618
2637
|
styles.size,
|
|
2619
2638
|
styles.variant,
|
|
@@ -2625,7 +2644,7 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2625
2644
|
disabled: disabled || loading,
|
|
2626
2645
|
...rest,
|
|
2627
2646
|
children: [
|
|
2628
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2647
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "spinner")), styles.spinner), children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2629
2648
|
Spinner_default,
|
|
2630
2649
|
{
|
|
2631
2650
|
size,
|
|
@@ -2636,10 +2655,10 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2636
2655
|
}
|
|
2637
2656
|
}
|
|
2638
2657
|
) }),
|
|
2639
|
-
!loading && isIconVariant && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2640
|
-
!loading && !isIconVariant && startIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2641
|
-
!isIconVariant && children && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2642
|
-
!loading && !isIconVariant && endIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2658
|
+
!loading && isIconVariant && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "icon")), styles.icon), children: children || startIcon || endIcon }),
|
|
2659
|
+
!loading && !isIconVariant && startIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "start-icon")), styles.startIcon), children: startIcon }),
|
|
2660
|
+
!isIconVariant && children && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "content")), styles.content), children }),
|
|
2661
|
+
!loading && !isIconVariant && endIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0, import_browser15.withVendorCSSClassPrefix)((0, import_browser15.bem)("button", "end-icon")), styles.endIcon), children: endIcon })
|
|
2643
2662
|
]
|
|
2644
2663
|
}
|
|
2645
2664
|
);
|
|
@@ -2659,7 +2678,7 @@ var BaseSignInButton = (0, import_react27.forwardRef)(
|
|
|
2659
2678
|
Button_default,
|
|
2660
2679
|
{
|
|
2661
2680
|
ref,
|
|
2662
|
-
className: (0, import_css5.cx)((0,
|
|
2681
|
+
className: (0, import_css5.cx)((0, import_browser16.withVendorCSSClassPrefix)("sign-in-button"), className),
|
|
2663
2682
|
style,
|
|
2664
2683
|
disabled: isLoading,
|
|
2665
2684
|
loading: isLoading,
|
|
@@ -2674,7 +2693,7 @@ BaseSignInButton.displayName = "BaseSignInButton";
|
|
|
2674
2693
|
var BaseSignInButton_default = BaseSignInButton;
|
|
2675
2694
|
|
|
2676
2695
|
// src/components/actions/SignInButton/SignInButton.tsx
|
|
2677
|
-
var
|
|
2696
|
+
var import_browser17 = require("@asgardeo/browser");
|
|
2678
2697
|
var import_react28 = require("react");
|
|
2679
2698
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2680
2699
|
var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferences, signInOptions: overriddenSignInOptions = {}, ...rest }, ref) => {
|
|
@@ -2685,7 +2704,7 @@ var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferen
|
|
|
2685
2704
|
try {
|
|
2686
2705
|
setIsLoading(true);
|
|
2687
2706
|
if (signInUrl) {
|
|
2688
|
-
(0,
|
|
2707
|
+
(0, import_browser17.navigate)(signInUrl);
|
|
2689
2708
|
} else {
|
|
2690
2709
|
await signIn(overriddenSignInOptions ?? signInOptions);
|
|
2691
2710
|
}
|
|
@@ -2693,7 +2712,7 @@ var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferen
|
|
|
2693
2712
|
onClick(e);
|
|
2694
2713
|
}
|
|
2695
2714
|
} catch (error) {
|
|
2696
|
-
throw new
|
|
2715
|
+
throw new import_browser17.AsgardeoRuntimeError(
|
|
2697
2716
|
`Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,
|
|
2698
2717
|
"SignInButton-handleSignIn-RuntimeError-001",
|
|
2699
2718
|
"react",
|
|
@@ -2720,7 +2739,7 @@ SignInButton.displayName = "SignInButton";
|
|
|
2720
2739
|
var SignInButton_default = SignInButton;
|
|
2721
2740
|
|
|
2722
2741
|
// src/components/actions/SignOutButton/BaseSignOutButton.tsx
|
|
2723
|
-
var
|
|
2742
|
+
var import_browser18 = require("@asgardeo/browser");
|
|
2724
2743
|
var import_css6 = require("@emotion/css");
|
|
2725
2744
|
var import_react29 = require("react");
|
|
2726
2745
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
@@ -2733,7 +2752,7 @@ var BaseSignOutButton = (0, import_react29.forwardRef)(
|
|
|
2733
2752
|
Button_default,
|
|
2734
2753
|
{
|
|
2735
2754
|
ref,
|
|
2736
|
-
className: (0, import_css6.cx)((0,
|
|
2755
|
+
className: (0, import_css6.cx)((0, import_browser18.withVendorCSSClassPrefix)("sign-out-button"), className),
|
|
2737
2756
|
style,
|
|
2738
2757
|
disabled: isLoading,
|
|
2739
2758
|
loading: isLoading,
|
|
@@ -2748,7 +2767,7 @@ BaseSignOutButton.displayName = "BaseSignOutButton";
|
|
|
2748
2767
|
var BaseSignOutButton_default = BaseSignOutButton;
|
|
2749
2768
|
|
|
2750
2769
|
// src/components/actions/SignOutButton/SignOutButton.tsx
|
|
2751
|
-
var
|
|
2770
|
+
var import_browser19 = require("@asgardeo/browser");
|
|
2752
2771
|
var import_react30 = require("react");
|
|
2753
2772
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2754
2773
|
var SignOutButton = (0, import_react30.forwardRef)(({ children, onClick, preferences, ...rest }, ref) => {
|
|
@@ -2763,7 +2782,7 @@ var SignOutButton = (0, import_react30.forwardRef)(({ children, onClick, prefere
|
|
|
2763
2782
|
onClick(e);
|
|
2764
2783
|
}
|
|
2765
2784
|
} catch (error) {
|
|
2766
|
-
throw new
|
|
2785
|
+
throw new import_browser19.AsgardeoRuntimeError(
|
|
2767
2786
|
`Sign out failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
2768
2787
|
"SignOutButton-handleSignOut-RuntimeError-001",
|
|
2769
2788
|
"react",
|
|
@@ -2790,7 +2809,7 @@ SignOutButton.displayName = "SignOutButton";
|
|
|
2790
2809
|
var SignOutButton_default = SignOutButton;
|
|
2791
2810
|
|
|
2792
2811
|
// src/components/actions/SignUpButton/BaseSignUpButton.tsx
|
|
2793
|
-
var
|
|
2812
|
+
var import_browser20 = require("@asgardeo/browser");
|
|
2794
2813
|
var import_css7 = require("@emotion/css");
|
|
2795
2814
|
var import_react31 = require("react");
|
|
2796
2815
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -2803,7 +2822,7 @@ var BaseSignUpButton = (0, import_react31.forwardRef)(
|
|
|
2803
2822
|
Button_default,
|
|
2804
2823
|
{
|
|
2805
2824
|
ref,
|
|
2806
|
-
className: (0, import_css7.cx)((0,
|
|
2825
|
+
className: (0, import_css7.cx)((0, import_browser20.withVendorCSSClassPrefix)("sign-up-button"), className),
|
|
2807
2826
|
style,
|
|
2808
2827
|
disabled: isLoading,
|
|
2809
2828
|
loading: isLoading,
|
|
@@ -2820,8 +2839,8 @@ BaseSignUpButton.displayName = "BaseSignUpButton";
|
|
|
2820
2839
|
var BaseSignUpButton_default = BaseSignUpButton;
|
|
2821
2840
|
|
|
2822
2841
|
// src/components/actions/SignUpButton/SignUpButton.tsx
|
|
2842
|
+
var import_browser21 = require("@asgardeo/browser");
|
|
2823
2843
|
var import_browser22 = require("@asgardeo/browser");
|
|
2824
|
-
var import_browser23 = require("@asgardeo/browser");
|
|
2825
2844
|
var import_react32 = require("react");
|
|
2826
2845
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2827
2846
|
var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferences, ...rest }, ref) => {
|
|
@@ -2832,7 +2851,7 @@ var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferen
|
|
|
2832
2851
|
try {
|
|
2833
2852
|
setIsLoading(true);
|
|
2834
2853
|
if (signUpUrl) {
|
|
2835
|
-
(0,
|
|
2854
|
+
(0, import_browser22.navigate)(signUpUrl);
|
|
2836
2855
|
} else {
|
|
2837
2856
|
await signUp();
|
|
2838
2857
|
}
|
|
@@ -2840,7 +2859,7 @@ var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferen
|
|
|
2840
2859
|
onClick(e);
|
|
2841
2860
|
}
|
|
2842
2861
|
} catch (error) {
|
|
2843
|
-
throw new
|
|
2862
|
+
throw new import_browser21.AsgardeoRuntimeError(
|
|
2844
2863
|
`Sign up failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
2845
2864
|
"SignUpButton-handleSignUp-RuntimeError-001",
|
|
2846
2865
|
"react",
|
|
@@ -2909,15 +2928,15 @@ Loading.displayName = "Loading";
|
|
|
2909
2928
|
var Loading_default = Loading;
|
|
2910
2929
|
|
|
2911
2930
|
// src/components/presentation/SignIn/BaseSignIn.tsx
|
|
2912
|
-
var
|
|
2931
|
+
var import_browser44 = require("@asgardeo/browser");
|
|
2913
2932
|
var import_css35 = require("@emotion/css");
|
|
2914
2933
|
var import_react56 = require("react");
|
|
2915
2934
|
|
|
2916
2935
|
// src/components/presentation/SignIn/options/SignInOptionFactory.tsx
|
|
2917
|
-
var
|
|
2936
|
+
var import_browser39 = require("@asgardeo/browser");
|
|
2918
2937
|
|
|
2919
2938
|
// src/components/presentation/SignIn/options/UsernamePassword.tsx
|
|
2920
|
-
var
|
|
2939
|
+
var import_browser33 = require("@asgardeo/browser");
|
|
2921
2940
|
var import_react44 = require("react");
|
|
2922
2941
|
|
|
2923
2942
|
// src/components/primitives/TextField/TextField.tsx
|
|
@@ -2925,11 +2944,11 @@ var import_css15 = require("@emotion/css");
|
|
|
2925
2944
|
|
|
2926
2945
|
// src/components/primitives/FormControl/FormControl.tsx
|
|
2927
2946
|
var import_css11 = require("@emotion/css");
|
|
2928
|
-
var
|
|
2947
|
+
var import_browser24 = require("@asgardeo/browser");
|
|
2929
2948
|
|
|
2930
2949
|
// src/components/primitives/Typography/Typography.tsx
|
|
2931
2950
|
var import_css9 = require("@emotion/css");
|
|
2932
|
-
var
|
|
2951
|
+
var import_browser23 = require("@asgardeo/browser");
|
|
2933
2952
|
|
|
2934
2953
|
// src/components/primitives/Typography/Typography.styles.ts
|
|
2935
2954
|
var import_css8 = require("@emotion/css");
|
|
@@ -3277,8 +3296,8 @@ var Typography = ({
|
|
|
3277
3296
|
}
|
|
3278
3297
|
};
|
|
3279
3298
|
const typographyClassName = (0, import_css9.cx)(
|
|
3280
|
-
(0,
|
|
3281
|
-
(0,
|
|
3299
|
+
(0, import_browser23.withVendorCSSClassPrefix)((0, import_browser23.bem)("typography")),
|
|
3300
|
+
(0, import_browser23.withVendorCSSClassPrefix)((0, import_browser23.bem)("typography", variant)),
|
|
3282
3301
|
styles.typography,
|
|
3283
3302
|
getVariantClass(variant),
|
|
3284
3303
|
noWrap && styles.typographyNoWrap,
|
|
@@ -3328,15 +3347,15 @@ var FormControl = ({
|
|
|
3328
3347
|
}) => {
|
|
3329
3348
|
const { theme, colorScheme } = useTheme_default();
|
|
3330
3349
|
const styles = FormControl_styles_default(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);
|
|
3331
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_css11.cx)((0,
|
|
3350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: (0, import_css11.cx)((0, import_browser24.withVendorCSSClassPrefix)((0, import_browser24.bem)("form-control")), styles.formControl, className), children: [
|
|
3332
3351
|
children,
|
|
3333
3352
|
(error || helperText) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3334
3353
|
Typography_default,
|
|
3335
3354
|
{
|
|
3336
3355
|
variant: "caption",
|
|
3337
3356
|
color: error ? "error" : "textSecondary",
|
|
3338
|
-
className: (0, import_css11.cx)((0,
|
|
3339
|
-
[(0,
|
|
3357
|
+
className: (0, import_css11.cx)((0, import_browser24.withVendorCSSClassPrefix)((0, import_browser24.bem)("form-control", "helper-text")), styles.helperText, {
|
|
3358
|
+
[(0, import_browser24.withVendorCSSClassPrefix)((0, import_browser24.bem)("form-control", "helper-text", "error"))]: !!error,
|
|
3340
3359
|
[styles.helperTextError]: !!error
|
|
3341
3360
|
}),
|
|
3342
3361
|
children: error || helperText
|
|
@@ -3348,7 +3367,7 @@ var FormControl_default = FormControl;
|
|
|
3348
3367
|
|
|
3349
3368
|
// src/components/primitives/InputLabel/InputLabel.tsx
|
|
3350
3369
|
var import_css13 = require("@emotion/css");
|
|
3351
|
-
var
|
|
3370
|
+
var import_browser25 = require("@asgardeo/browser");
|
|
3352
3371
|
|
|
3353
3372
|
// src/components/primitives/InputLabel/InputLabel.styles.ts
|
|
3354
3373
|
var import_css12 = require("@emotion/css");
|
|
@@ -3407,12 +3426,12 @@ var InputLabel = ({
|
|
|
3407
3426
|
"label",
|
|
3408
3427
|
{
|
|
3409
3428
|
className: (0, import_css13.cx)(
|
|
3410
|
-
(0,
|
|
3411
|
-
(0,
|
|
3429
|
+
(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label")),
|
|
3430
|
+
(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label", variant)),
|
|
3412
3431
|
styles.label,
|
|
3413
3432
|
variant === "block" ? styles.block : styles.inline,
|
|
3414
3433
|
{
|
|
3415
|
-
[(0,
|
|
3434
|
+
[(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label", "error"))]: error,
|
|
3416
3435
|
[styles.error]: error
|
|
3417
3436
|
},
|
|
3418
3437
|
className
|
|
@@ -3421,7 +3440,7 @@ var InputLabel = ({
|
|
|
3421
3440
|
...rest,
|
|
3422
3441
|
children: [
|
|
3423
3442
|
children,
|
|
3424
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: (0, import_css13.cx)((0,
|
|
3443
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: (0, import_css13.cx)((0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label", "required")), styles.requiredIndicator), children: " *" })
|
|
3425
3444
|
]
|
|
3426
3445
|
}
|
|
3427
3446
|
);
|
|
@@ -3429,7 +3448,7 @@ var InputLabel = ({
|
|
|
3429
3448
|
var InputLabel_default = InputLabel;
|
|
3430
3449
|
|
|
3431
3450
|
// src/components/primitives/TextField/TextField.tsx
|
|
3432
|
-
var
|
|
3451
|
+
var import_browser26 = require("@asgardeo/browser");
|
|
3433
3452
|
|
|
3434
3453
|
// src/components/primitives/TextField/TextField.styles.ts
|
|
3435
3454
|
var import_css14 = require("@emotion/css");
|
|
@@ -3558,20 +3577,20 @@ var TextField = ({
|
|
|
3558
3577
|
const hasEndIcon = !!endIcon;
|
|
3559
3578
|
const styles = TextField_styles_default(theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIcon);
|
|
3560
3579
|
const inputClassName = (0, import_css15.cx)(
|
|
3561
|
-
(0,
|
|
3580
|
+
(0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field", "input")),
|
|
3562
3581
|
styles.input,
|
|
3563
3582
|
hasError && styles.inputError,
|
|
3564
3583
|
disabled && styles.inputDisabled
|
|
3565
3584
|
);
|
|
3566
|
-
const containerClassName = (0, import_css15.cx)((0,
|
|
3567
|
-
const startIconClassName = (0, import_css15.cx)((0,
|
|
3568
|
-
const endIconClassName = (0, import_css15.cx)((0,
|
|
3585
|
+
const containerClassName = (0, import_css15.cx)((0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field", "container")), styles.inputContainer);
|
|
3586
|
+
const startIconClassName = (0, import_css15.cx)((0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field", "start-icon")), styles.startIcon);
|
|
3587
|
+
const endIconClassName = (0, import_css15.cx)((0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field", "end-icon")), styles.endIcon);
|
|
3569
3588
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3570
3589
|
FormControl_default,
|
|
3571
3590
|
{
|
|
3572
3591
|
error,
|
|
3573
3592
|
helperText,
|
|
3574
|
-
className: (0, import_css15.cx)((0,
|
|
3593
|
+
className: (0, import_css15.cx)((0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field")), className),
|
|
3575
3594
|
style,
|
|
3576
3595
|
children: [
|
|
3577
3596
|
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InputLabel_default, { required, error: hasError, children: label }),
|
|
@@ -3618,7 +3637,7 @@ var TextField_default = TextField;
|
|
|
3618
3637
|
|
|
3619
3638
|
// src/components/primitives/Select/Select.tsx
|
|
3620
3639
|
var import_css17 = require("@emotion/css");
|
|
3621
|
-
var
|
|
3640
|
+
var import_browser27 = require("@asgardeo/browser");
|
|
3622
3641
|
|
|
3623
3642
|
// src/components/primitives/Select/Select.styles.ts
|
|
3624
3643
|
var import_css16 = require("@emotion/css");
|
|
@@ -3716,7 +3735,7 @@ var Select = ({
|
|
|
3716
3735
|
const hasError = !!error;
|
|
3717
3736
|
const styles = Select_styles_default(theme, colorScheme, disabled, hasError);
|
|
3718
3737
|
const selectClassName = (0, import_css17.cx)(
|
|
3719
|
-
(0,
|
|
3738
|
+
(0, import_browser27.withVendorCSSClassPrefix)((0, import_browser27.bem)("select", "input")),
|
|
3720
3739
|
styles.select,
|
|
3721
3740
|
hasError && styles.selectError,
|
|
3722
3741
|
disabled && styles.selectDisabled
|
|
@@ -3726,7 +3745,7 @@ var Select = ({
|
|
|
3726
3745
|
{
|
|
3727
3746
|
error,
|
|
3728
3747
|
helperText,
|
|
3729
|
-
className: (0, import_css17.cx)((0,
|
|
3748
|
+
className: (0, import_css17.cx)((0, import_browser27.withVendorCSSClassPrefix)((0, import_browser27.bem)("select")), className),
|
|
3730
3749
|
style,
|
|
3731
3750
|
children: [
|
|
3732
3751
|
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InputLabel_default, { required, error: hasError, children: label }),
|
|
@@ -3750,7 +3769,7 @@ var Select_default = Select;
|
|
|
3750
3769
|
// src/components/primitives/OtpField/OtpField.tsx
|
|
3751
3770
|
var import_react39 = require("react");
|
|
3752
3771
|
var import_css19 = require("@emotion/css");
|
|
3753
|
-
var
|
|
3772
|
+
var import_browser28 = require("@asgardeo/browser");
|
|
3754
3773
|
|
|
3755
3774
|
// src/components/primitives/OtpField/OtpField.styles.ts
|
|
3756
3775
|
var import_css18 = require("@emotion/css");
|
|
@@ -3926,12 +3945,12 @@ var OtpField = ({
|
|
|
3926
3945
|
{
|
|
3927
3946
|
error,
|
|
3928
3947
|
helperText,
|
|
3929
|
-
className: (0, import_css19.cx)((0,
|
|
3948
|
+
className: (0, import_css19.cx)((0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field")), className),
|
|
3930
3949
|
helperTextAlign: "center",
|
|
3931
3950
|
style,
|
|
3932
3951
|
children: [
|
|
3933
3952
|
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(InputLabel_default, { required, error: !!error, children: label }),
|
|
3934
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: (0, import_css19.cx)((0,
|
|
3953
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: (0, import_css19.cx)((0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field", "input-container")), styles.inputContainer), children: Array.from({ length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3935
3954
|
"input",
|
|
3936
3955
|
{
|
|
3937
3956
|
ref: (el) => {
|
|
@@ -3943,10 +3962,10 @@ var OtpField = ({
|
|
|
3943
3962
|
onChange: (event) => handleChange(index, event),
|
|
3944
3963
|
onKeyDown: (event) => handleKeyDown(index, event),
|
|
3945
3964
|
onPaste: handlePaste,
|
|
3946
|
-
className: (0, import_css19.cx)((0,
|
|
3947
|
-
[(0,
|
|
3965
|
+
className: (0, import_css19.cx)((0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field", "input")), styles.input, {
|
|
3966
|
+
[(0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field", "input", "error"))]: !!error,
|
|
3948
3967
|
[styles.inputError]: !!error,
|
|
3949
|
-
[(0,
|
|
3968
|
+
[(0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field", "input", "disabled"))]: !!disabled,
|
|
3950
3969
|
[styles.inputDisabled]: !!disabled
|
|
3951
3970
|
}),
|
|
3952
3971
|
maxLength: 1,
|
|
@@ -3968,7 +3987,7 @@ var OtpField_default = OtpField;
|
|
|
3968
3987
|
// src/components/primitives/PasswordField/PasswordField.tsx
|
|
3969
3988
|
var import_react41 = require("react");
|
|
3970
3989
|
var import_css21 = require("@emotion/css");
|
|
3971
|
-
var
|
|
3990
|
+
var import_browser29 = require("@asgardeo/browser");
|
|
3972
3991
|
|
|
3973
3992
|
// src/components/primitives/Icons/Eye.tsx
|
|
3974
3993
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
@@ -4064,7 +4083,7 @@ var PasswordField = ({ onChange, className, disabled, error, ...textFieldProps }
|
|
|
4064
4083
|
TextField_default,
|
|
4065
4084
|
{
|
|
4066
4085
|
...textFieldProps,
|
|
4067
|
-
className: (0, import_css21.cx)((0,
|
|
4086
|
+
className: (0, import_css21.cx)((0, import_browser29.withVendorCSSClassPrefix)((0, import_browser29.bem)("password-field")), className),
|
|
4068
4087
|
type: showPassword ? "text" : "password",
|
|
4069
4088
|
onChange: (e) => onChange(e.target.value),
|
|
4070
4089
|
autoComplete: "current-password",
|
|
@@ -4076,7 +4095,7 @@ var PasswordField = ({ onChange, className, disabled, error, ...textFieldProps }
|
|
|
4076
4095
|
width: 16,
|
|
4077
4096
|
height: 16,
|
|
4078
4097
|
className: (0, import_css21.cx)(
|
|
4079
|
-
(0,
|
|
4098
|
+
(0, import_browser29.withVendorCSSClassPrefix)((0, import_browser29.bem)("password-field", "toggle-icon")),
|
|
4080
4099
|
styles.toggleIcon,
|
|
4081
4100
|
showPassword ? styles.visibleIcon : styles.hiddenIcon
|
|
4082
4101
|
)
|
|
@@ -4090,7 +4109,7 @@ var PasswordField_default = PasswordField;
|
|
|
4090
4109
|
|
|
4091
4110
|
// src/components/primitives/DatePicker/DatePicker.tsx
|
|
4092
4111
|
var import_css23 = require("@emotion/css");
|
|
4093
|
-
var
|
|
4112
|
+
var import_browser30 = require("@asgardeo/browser");
|
|
4094
4113
|
|
|
4095
4114
|
// src/components/primitives/DatePicker/DatePicker.styles.ts
|
|
4096
4115
|
var import_css22 = require("@emotion/css");
|
|
@@ -4179,7 +4198,7 @@ var DatePicker = ({
|
|
|
4179
4198
|
{
|
|
4180
4199
|
error,
|
|
4181
4200
|
helperText,
|
|
4182
|
-
className: (0, import_css23.cx)((0,
|
|
4201
|
+
className: (0, import_css23.cx)((0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker")), className),
|
|
4183
4202
|
style,
|
|
4184
4203
|
children: [
|
|
4185
4204
|
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -4187,7 +4206,7 @@ var DatePicker = ({
|
|
|
4187
4206
|
{
|
|
4188
4207
|
required,
|
|
4189
4208
|
error: hasError,
|
|
4190
|
-
className: (0, import_css23.cx)((0,
|
|
4209
|
+
className: (0, import_css23.cx)((0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker", "label")), styles.label),
|
|
4191
4210
|
children: label
|
|
4192
4211
|
}
|
|
4193
4212
|
),
|
|
@@ -4198,13 +4217,13 @@ var DatePicker = ({
|
|
|
4198
4217
|
pattern: "\\d{4}-\\d{2}-\\d{2}",
|
|
4199
4218
|
placeholder: dateFormat,
|
|
4200
4219
|
className: (0, import_css23.cx)(
|
|
4201
|
-
(0,
|
|
4220
|
+
(0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker", "input")),
|
|
4202
4221
|
styles.input,
|
|
4203
4222
|
styles.errorInput,
|
|
4204
4223
|
styles.disabledInput,
|
|
4205
4224
|
{
|
|
4206
|
-
[(0,
|
|
4207
|
-
[(0,
|
|
4225
|
+
[(0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker", "input", "error"))]: hasError,
|
|
4226
|
+
[(0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker", "input", "disabled"))]: disabled
|
|
4208
4227
|
}
|
|
4209
4228
|
),
|
|
4210
4229
|
disabled,
|
|
@@ -4221,7 +4240,7 @@ var DatePicker_default = DatePicker;
|
|
|
4221
4240
|
|
|
4222
4241
|
// src/components/primitives/Checkbox/Checkbox.tsx
|
|
4223
4242
|
var import_css25 = require("@emotion/css");
|
|
4224
|
-
var
|
|
4243
|
+
var import_browser31 = require("@asgardeo/browser");
|
|
4225
4244
|
|
|
4226
4245
|
// src/components/primitives/Checkbox/Checkbox.styles.ts
|
|
4227
4246
|
var import_css24 = require("@emotion/css");
|
|
@@ -4294,15 +4313,15 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4294
4313
|
{
|
|
4295
4314
|
error,
|
|
4296
4315
|
helperText,
|
|
4297
|
-
className: (0, import_css25.cx)((0,
|
|
4316
|
+
className: (0, import_css25.cx)((0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox")), className),
|
|
4298
4317
|
helperTextMarginLeft: `calc(${theme.vars.spacing.unit} * 3.5)`,
|
|
4299
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style, className: (0, import_css25.cx)((0,
|
|
4318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style, className: (0, import_css25.cx)((0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox", "container")), styles.container), children: [
|
|
4300
4319
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4301
4320
|
"input",
|
|
4302
4321
|
{
|
|
4303
4322
|
type: "checkbox",
|
|
4304
|
-
className: (0, import_css25.cx)((0,
|
|
4305
|
-
[(0,
|
|
4323
|
+
className: (0, import_css25.cx)((0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox", "input")), styles.input, styles.errorInput, {
|
|
4324
|
+
[(0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox", "input", "error"))]: hasError
|
|
4306
4325
|
}),
|
|
4307
4326
|
"aria-invalid": hasError,
|
|
4308
4327
|
"aria-required": required,
|
|
@@ -4315,8 +4334,8 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4315
4334
|
required,
|
|
4316
4335
|
error: hasError,
|
|
4317
4336
|
variant: "inline",
|
|
4318
|
-
className: (0, import_css25.cx)((0,
|
|
4319
|
-
[(0,
|
|
4337
|
+
className: (0, import_css25.cx)((0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox", "label")), styles.label, styles.errorLabel, {
|
|
4338
|
+
[(0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox", "label", "error"))]: hasError
|
|
4320
4339
|
}),
|
|
4321
4340
|
children: label
|
|
4322
4341
|
}
|
|
@@ -4328,7 +4347,7 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4328
4347
|
var Checkbox_default = Checkbox;
|
|
4329
4348
|
|
|
4330
4349
|
// src/components/factories/FieldFactory.tsx
|
|
4331
|
-
var
|
|
4350
|
+
var import_browser32 = require("@asgardeo/browser");
|
|
4332
4351
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4333
4352
|
var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
4334
4353
|
if (required && touched && (!value || value.trim() === "")) {
|
|
@@ -4338,7 +4357,7 @@ var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
|
4338
4357
|
return null;
|
|
4339
4358
|
}
|
|
4340
4359
|
switch (type) {
|
|
4341
|
-
case
|
|
4360
|
+
case import_browser32.FieldType.Number:
|
|
4342
4361
|
const numValue = parseInt(value, 10);
|
|
4343
4362
|
if (isNaN(numValue)) {
|
|
4344
4363
|
return "Please enter a valid number";
|
|
@@ -4374,20 +4393,20 @@ var createField = (config) => {
|
|
|
4374
4393
|
placeholder
|
|
4375
4394
|
};
|
|
4376
4395
|
switch (type) {
|
|
4377
|
-
case
|
|
4396
|
+
case import_browser32.FieldType.Password:
|
|
4378
4397
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PasswordField_default, { ...commonProps, onChange });
|
|
4379
|
-
case
|
|
4398
|
+
case import_browser32.FieldType.Text:
|
|
4380
4399
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextField_default, { ...commonProps, type: "text", onChange: (e) => onChange(e.target.value), autoComplete: "off" });
|
|
4381
|
-
case
|
|
4400
|
+
case import_browser32.FieldType.Email:
|
|
4382
4401
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextField_default, { ...commonProps, type: "email", onChange: (e) => onChange(e.target.value), autoComplete: "email" });
|
|
4383
|
-
case
|
|
4402
|
+
case import_browser32.FieldType.Date:
|
|
4384
4403
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DatePicker_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
4385
|
-
case
|
|
4404
|
+
case import_browser32.FieldType.Checkbox:
|
|
4386
4405
|
const isChecked = value === "true" || value === true;
|
|
4387
4406
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Checkbox_default, { ...commonProps, checked: isChecked, onChange: (e) => onChange(e.target.checked.toString()) });
|
|
4388
|
-
case
|
|
4407
|
+
case import_browser32.FieldType.Otp:
|
|
4389
4408
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(OtpField_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
4390
|
-
case
|
|
4409
|
+
case import_browser32.FieldType.Number:
|
|
4391
4410
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4392
4411
|
TextField_default,
|
|
4393
4412
|
{
|
|
@@ -4397,7 +4416,7 @@ var createField = (config) => {
|
|
|
4397
4416
|
helperText: "Enter a numeric value"
|
|
4398
4417
|
}
|
|
4399
4418
|
);
|
|
4400
|
-
case
|
|
4419
|
+
case import_browser32.FieldType.Select:
|
|
4401
4420
|
const fieldOptions = options.length > 0 ? options : [];
|
|
4402
4421
|
if (fieldOptions.length > 0) {
|
|
4403
4422
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
@@ -4460,7 +4479,7 @@ var UsernamePassword = ({
|
|
|
4460
4479
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
4461
4480
|
formFields.map((param) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: createField({
|
|
4462
4481
|
name: param.param,
|
|
4463
|
-
type: param.type ===
|
|
4482
|
+
type: param.type === import_browser33.EmbeddedSignInFlowAuthenticatorParamType.String ? param.confidential ? import_browser33.FieldType.Password : import_browser33.FieldType.Text : import_browser33.FieldType.Text,
|
|
4464
4483
|
label: param.displayName,
|
|
4465
4484
|
required: authenticator.requiredParams.includes(param.param),
|
|
4466
4485
|
value: formValues[param.param] || "",
|
|
@@ -4491,7 +4510,7 @@ var UsernamePassword = ({
|
|
|
4491
4510
|
var UsernamePassword_default = UsernamePassword;
|
|
4492
4511
|
|
|
4493
4512
|
// src/components/presentation/SignIn/options/IdentifierFirst.tsx
|
|
4494
|
-
var
|
|
4513
|
+
var import_browser34 = require("@asgardeo/browser");
|
|
4495
4514
|
var import_react45 = require("react");
|
|
4496
4515
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4497
4516
|
var IdentifierFirst = ({
|
|
@@ -4516,7 +4535,7 @@ var IdentifierFirst = ({
|
|
|
4516
4535
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
4517
4536
|
formFields.map((param) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: createField({
|
|
4518
4537
|
name: param.param,
|
|
4519
|
-
type: param.type ===
|
|
4538
|
+
type: param.type === import_browser34.EmbeddedSignInFlowAuthenticatorParamType.String ? param.confidential ? import_browser34.FieldType.Password : import_browser34.FieldType.Text : import_browser34.FieldType.Text,
|
|
4520
4539
|
label: param.displayName,
|
|
4521
4540
|
required: authenticator.requiredParams.includes(param.param),
|
|
4522
4541
|
value: formValues[param.param] || "",
|
|
@@ -4769,7 +4788,7 @@ var SignInWithEthereumButton = ({
|
|
|
4769
4788
|
var SignInWithEthereumButton_default = SignInWithEthereumButton;
|
|
4770
4789
|
|
|
4771
4790
|
// src/components/presentation/SignIn/options/EmailOtp.tsx
|
|
4772
|
-
var
|
|
4791
|
+
var import_browser35 = require("@asgardeo/browser");
|
|
4773
4792
|
var import_react46 = require("react");
|
|
4774
4793
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4775
4794
|
var EmailOtp = ({
|
|
@@ -4808,7 +4827,7 @@ var EmailOtp = ({
|
|
|
4808
4827
|
}
|
|
4809
4828
|
) : createField({
|
|
4810
4829
|
name: param.param,
|
|
4811
|
-
type: param.type ===
|
|
4830
|
+
type: param.type === import_browser35.EmbeddedSignInFlowAuthenticatorParamType.String ? param.confidential ? import_browser35.FieldType.Password : import_browser35.FieldType.Text : import_browser35.FieldType.Text,
|
|
4812
4831
|
label: param.displayName,
|
|
4813
4832
|
required: authenticator.requiredParams.includes(param.param),
|
|
4814
4833
|
value: formValues[param.param] || "",
|
|
@@ -4837,7 +4856,7 @@ var EmailOtp = ({
|
|
|
4837
4856
|
var EmailOtp_default = EmailOtp;
|
|
4838
4857
|
|
|
4839
4858
|
// src/components/presentation/SignIn/options/Totp.tsx
|
|
4840
|
-
var
|
|
4859
|
+
var import_browser36 = require("@asgardeo/browser");
|
|
4841
4860
|
var import_react47 = require("react");
|
|
4842
4861
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4843
4862
|
var Totp = ({
|
|
@@ -4876,7 +4895,7 @@ var Totp = ({
|
|
|
4876
4895
|
}
|
|
4877
4896
|
) : createField({
|
|
4878
4897
|
name: param.param,
|
|
4879
|
-
type: param.type ===
|
|
4898
|
+
type: param.type === import_browser36.EmbeddedSignInFlowAuthenticatorParamType.String ? param.confidential ? import_browser36.FieldType.Password : import_browser36.FieldType.Text : import_browser36.FieldType.Text,
|
|
4880
4899
|
label: param.displayName,
|
|
4881
4900
|
required: authenticator.requiredParams.includes(param.param),
|
|
4882
4901
|
value: formValues[param.param] || "",
|
|
@@ -4905,7 +4924,7 @@ var Totp = ({
|
|
|
4905
4924
|
var Totp_default = Totp;
|
|
4906
4925
|
|
|
4907
4926
|
// src/components/presentation/SignIn/options/SmsOtp.tsx
|
|
4908
|
-
var
|
|
4927
|
+
var import_browser37 = require("@asgardeo/browser");
|
|
4909
4928
|
var import_react48 = require("react");
|
|
4910
4929
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4911
4930
|
var SmsOtp = ({
|
|
@@ -4944,7 +4963,7 @@ var SmsOtp = ({
|
|
|
4944
4963
|
}
|
|
4945
4964
|
) : createField({
|
|
4946
4965
|
name: param.param,
|
|
4947
|
-
type: param.type ===
|
|
4966
|
+
type: param.type === import_browser37.EmbeddedSignInFlowAuthenticatorParamType.String ? param.confidential ? import_browser37.FieldType.Password : import_browser37.FieldType.Text : import_browser37.FieldType.Text,
|
|
4948
4967
|
label: param.displayName,
|
|
4949
4968
|
required: authenticator.requiredParams.includes(param.param),
|
|
4950
4969
|
value: formValues[param.param] || "",
|
|
@@ -5004,7 +5023,7 @@ var SocialLogin = ({
|
|
|
5004
5023
|
var SocialButton_default = SocialLogin;
|
|
5005
5024
|
|
|
5006
5025
|
// src/components/presentation/SignIn/options/MultiOptionButton.tsx
|
|
5007
|
-
var
|
|
5026
|
+
var import_browser38 = require("@asgardeo/browser");
|
|
5008
5027
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5009
5028
|
var MultiOptionButton = ({
|
|
5010
5029
|
authenticator,
|
|
@@ -5016,7 +5035,7 @@ var MultiOptionButton = ({
|
|
|
5016
5035
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5017
5036
|
const getDisplayName = () => {
|
|
5018
5037
|
let authenticatorName = authenticator.authenticator;
|
|
5019
|
-
if (authenticator.idp !==
|
|
5038
|
+
if (authenticator.idp !== import_browser38.EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
|
|
5020
5039
|
authenticatorName = authenticator.idp;
|
|
5021
5040
|
}
|
|
5022
5041
|
switch (authenticatorName) {
|
|
@@ -5027,7 +5046,7 @@ var MultiOptionButton = ({
|
|
|
5027
5046
|
const getIcon = () => {
|
|
5028
5047
|
const authenticatorId = authenticator.authenticatorId;
|
|
5029
5048
|
switch (authenticatorId) {
|
|
5030
|
-
case
|
|
5049
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
5031
5050
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5032
5051
|
"path",
|
|
5033
5052
|
{
|
|
@@ -5035,7 +5054,7 @@ var MultiOptionButton = ({
|
|
|
5035
5054
|
d: "M20 15.5c-1.25 0-2.45-.2-3.57-.57a1.02 1.02 0 0 0-1.02.24l-2.2 2.2a15.074 15.074 0 0 1-6.59-6.59l2.2-2.2c.27-.27.35-.67.24-1.02A11.36 11.36 0 0 1 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1M12 3v10l3-3h6V3z"
|
|
5036
5055
|
}
|
|
5037
5056
|
) });
|
|
5038
|
-
case
|
|
5057
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
5039
5058
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5040
5059
|
"path",
|
|
5041
5060
|
{
|
|
@@ -5043,9 +5062,9 @@ var MultiOptionButton = ({
|
|
|
5043
5062
|
d: "M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 4l-8 5l-8-5V6l8 5l8-5z"
|
|
5044
5063
|
}
|
|
5045
5064
|
) });
|
|
5046
|
-
case
|
|
5065
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
5047
5066
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { fill: "currentColor", d: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z" }) });
|
|
5048
|
-
case
|
|
5067
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.PushNotification:
|
|
5049
5068
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5050
5069
|
"path",
|
|
5051
5070
|
{
|
|
@@ -5053,7 +5072,7 @@ var MultiOptionButton = ({
|
|
|
5053
5072
|
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m1-13h-2v6h2zm0 8h-2v2h2z"
|
|
5054
5073
|
}
|
|
5055
5074
|
) });
|
|
5056
|
-
case
|
|
5075
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey:
|
|
5057
5076
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("svg", { fill: "currentColor", width: "18", height: "18", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5058
5077
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
|
|
5059
5078
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("g", { id: "SVGRepo_tracerCarrier", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
@@ -5062,7 +5081,7 @@ var MultiOptionButton = ({
|
|
|
5062
5081
|
" "
|
|
5063
5082
|
] })
|
|
5064
5083
|
] });
|
|
5065
|
-
case
|
|
5084
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.MagicLink:
|
|
5066
5085
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5067
5086
|
"path",
|
|
5068
5087
|
{
|
|
@@ -5111,11 +5130,11 @@ var createSignInOption = ({
|
|
|
5111
5130
|
}) => {
|
|
5112
5131
|
const hasParams = authenticator.metadata?.params && authenticator.metadata.params.length > 0;
|
|
5113
5132
|
switch (authenticator.authenticatorId) {
|
|
5114
|
-
case
|
|
5133
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:
|
|
5115
5134
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(UsernamePassword_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5116
|
-
case
|
|
5135
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:
|
|
5117
5136
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IdentifierFirst_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5118
|
-
case
|
|
5137
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:
|
|
5119
5138
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5120
5139
|
GoogleButton_default,
|
|
5121
5140
|
{
|
|
@@ -5126,7 +5145,7 @@ var createSignInOption = ({
|
|
|
5126
5145
|
...rest
|
|
5127
5146
|
}
|
|
5128
5147
|
);
|
|
5129
|
-
case
|
|
5148
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:
|
|
5130
5149
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5131
5150
|
GitHubButton_default,
|
|
5132
5151
|
{
|
|
@@ -5137,7 +5156,7 @@ var createSignInOption = ({
|
|
|
5137
5156
|
...rest
|
|
5138
5157
|
}
|
|
5139
5158
|
);
|
|
5140
|
-
case
|
|
5159
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:
|
|
5141
5160
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5142
5161
|
MicrosoftButton_default,
|
|
5143
5162
|
{
|
|
@@ -5148,7 +5167,7 @@ var createSignInOption = ({
|
|
|
5148
5167
|
...rest
|
|
5149
5168
|
}
|
|
5150
5169
|
);
|
|
5151
|
-
case
|
|
5170
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:
|
|
5152
5171
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5153
5172
|
FacebookButton_default,
|
|
5154
5173
|
{
|
|
@@ -5159,7 +5178,7 @@ var createSignInOption = ({
|
|
|
5159
5178
|
...rest
|
|
5160
5179
|
}
|
|
5161
5180
|
);
|
|
5162
|
-
case
|
|
5181
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.LinkedIn:
|
|
5163
5182
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5164
5183
|
LinkedInButton_default,
|
|
5165
5184
|
{
|
|
@@ -5170,7 +5189,7 @@ var createSignInOption = ({
|
|
|
5170
5189
|
...rest
|
|
5171
5190
|
}
|
|
5172
5191
|
);
|
|
5173
|
-
case
|
|
5192
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SignInWithEthereum:
|
|
5174
5193
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5175
5194
|
SignInWithEthereumButton_default,
|
|
5176
5195
|
{
|
|
@@ -5181,14 +5200,14 @@ var createSignInOption = ({
|
|
|
5181
5200
|
...rest
|
|
5182
5201
|
}
|
|
5183
5202
|
);
|
|
5184
|
-
case
|
|
5203
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
5185
5204
|
return hasParams ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(EmailOtp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5186
|
-
case
|
|
5205
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
5187
5206
|
return hasParams ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Totp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5188
|
-
case
|
|
5207
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
5189
5208
|
return hasParams ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SmsOtp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5190
5209
|
default:
|
|
5191
|
-
if (authenticator.idp !==
|
|
5210
|
+
if (authenticator.idp !== import_browser39.EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
|
|
5192
5211
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5193
5212
|
SocialButton_default,
|
|
5194
5213
|
{
|
|
@@ -5222,7 +5241,7 @@ var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFie
|
|
|
5222
5241
|
|
|
5223
5242
|
// src/components/primitives/Alert/Alert.tsx
|
|
5224
5243
|
var import_react50 = require("react");
|
|
5225
|
-
var
|
|
5244
|
+
var import_browser40 = require("@asgardeo/browser");
|
|
5226
5245
|
var import_css27 = require("@emotion/css");
|
|
5227
5246
|
|
|
5228
5247
|
// src/components/primitives/Icons/CircleCheck.tsx
|
|
@@ -5423,16 +5442,16 @@ var Alert = (0, import_react50.forwardRef)(
|
|
|
5423
5442
|
role: "alert",
|
|
5424
5443
|
style,
|
|
5425
5444
|
className: (0, import_css27.cx)(
|
|
5426
|
-
(0,
|
|
5445
|
+
(0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert")),
|
|
5427
5446
|
styles.alert,
|
|
5428
5447
|
styles.variant,
|
|
5429
|
-
(0,
|
|
5448
|
+
(0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", null, variant)),
|
|
5430
5449
|
className
|
|
5431
5450
|
),
|
|
5432
5451
|
...rest,
|
|
5433
5452
|
children: [
|
|
5434
|
-
showIcon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: (0, import_css27.cx)((0,
|
|
5435
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: (0, import_css27.cx)((0,
|
|
5453
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: (0, import_css27.cx)((0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", "icon")), styles.icon), children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(IconComponent, {}) }),
|
|
5454
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: (0, import_css27.cx)((0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", "content")), styles.content), children })
|
|
5436
5455
|
]
|
|
5437
5456
|
}
|
|
5438
5457
|
) });
|
|
@@ -5450,7 +5469,7 @@ var AlertTitle = (0, import_react50.forwardRef)(({ children, className, style, .
|
|
|
5450
5469
|
variant: "h6",
|
|
5451
5470
|
fontWeight: 600,
|
|
5452
5471
|
style,
|
|
5453
|
-
className: (0, import_css27.cx)((0,
|
|
5472
|
+
className: (0, import_css27.cx)((0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", "title")), styles.title, className),
|
|
5454
5473
|
...filteredRest,
|
|
5455
5474
|
children
|
|
5456
5475
|
}
|
|
@@ -5468,7 +5487,7 @@ var AlertDescription = (0, import_react50.forwardRef)(
|
|
|
5468
5487
|
component: "p",
|
|
5469
5488
|
variant: "body2",
|
|
5470
5489
|
style,
|
|
5471
|
-
className: (0, import_css27.cx)((0,
|
|
5490
|
+
className: (0, import_css27.cx)((0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", "description")), styles.description, className),
|
|
5472
5491
|
...filteredRest,
|
|
5473
5492
|
children
|
|
5474
5493
|
}
|
|
@@ -5483,7 +5502,7 @@ Alert.Description = AlertDescription;
|
|
|
5483
5502
|
var Alert_default = Alert;
|
|
5484
5503
|
|
|
5485
5504
|
// src/components/primitives/Card/Card.tsx
|
|
5486
|
-
var
|
|
5505
|
+
var import_browser41 = require("@asgardeo/browser");
|
|
5487
5506
|
var import_css29 = require("@emotion/css");
|
|
5488
5507
|
var import_react52 = require("react");
|
|
5489
5508
|
|
|
@@ -5578,13 +5597,13 @@ var Card = (0, import_react52.forwardRef)(
|
|
|
5578
5597
|
ref,
|
|
5579
5598
|
style,
|
|
5580
5599
|
className: (0, import_css29.cx)(
|
|
5581
|
-
(0,
|
|
5600
|
+
(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card")),
|
|
5582
5601
|
styles.card,
|
|
5583
5602
|
styles.variant,
|
|
5584
5603
|
styles.clickable,
|
|
5585
|
-
(0,
|
|
5604
|
+
(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", null, variant)),
|
|
5586
5605
|
{
|
|
5587
|
-
[(0,
|
|
5606
|
+
[(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", null, "clickable"))]: clickable
|
|
5588
5607
|
},
|
|
5589
5608
|
className
|
|
5590
5609
|
),
|
|
@@ -5602,7 +5621,7 @@ var CardHeader = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5602
5621
|
{
|
|
5603
5622
|
ref,
|
|
5604
5623
|
style,
|
|
5605
|
-
className: (0, import_css29.cx)((0,
|
|
5624
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "header")), styles.header, className),
|
|
5606
5625
|
...rest,
|
|
5607
5626
|
children
|
|
5608
5627
|
}
|
|
@@ -5655,7 +5674,7 @@ var CardTitle = (0, import_react52.forwardRef)(
|
|
|
5655
5674
|
component: getComponentFromLevel(level),
|
|
5656
5675
|
variant: getVariantFromLevel(level),
|
|
5657
5676
|
style,
|
|
5658
|
-
className: (0, import_css29.cx)((0,
|
|
5677
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "title")), styles.title, className),
|
|
5659
5678
|
fontWeight: 600,
|
|
5660
5679
|
...filteredRest,
|
|
5661
5680
|
children
|
|
@@ -5675,7 +5694,7 @@ var CardDescription = (0, import_react52.forwardRef)(
|
|
|
5675
5694
|
variant: "body2",
|
|
5676
5695
|
color: "textSecondary",
|
|
5677
5696
|
style,
|
|
5678
|
-
className: (0, import_css29.cx)((0,
|
|
5697
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "description")), styles.description, className),
|
|
5679
5698
|
...filteredRest,
|
|
5680
5699
|
children
|
|
5681
5700
|
}
|
|
@@ -5690,7 +5709,7 @@ var CardAction = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5690
5709
|
{
|
|
5691
5710
|
ref,
|
|
5692
5711
|
style,
|
|
5693
|
-
className: (0, import_css29.cx)((0,
|
|
5712
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "action")), styles.action, className),
|
|
5694
5713
|
...rest,
|
|
5695
5714
|
children
|
|
5696
5715
|
}
|
|
@@ -5704,7 +5723,7 @@ var CardContent = (0, import_react52.forwardRef)(({ children, className, style,
|
|
|
5704
5723
|
{
|
|
5705
5724
|
ref,
|
|
5706
5725
|
style,
|
|
5707
|
-
className: (0, import_css29.cx)((0,
|
|
5726
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "content")), styles.content, className),
|
|
5708
5727
|
...rest,
|
|
5709
5728
|
children
|
|
5710
5729
|
}
|
|
@@ -5718,7 +5737,7 @@ var CardFooter = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5718
5737
|
{
|
|
5719
5738
|
ref,
|
|
5720
5739
|
style,
|
|
5721
|
-
className: (0, import_css29.cx)((0,
|
|
5740
|
+
className: (0, import_css29.cx)((0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", "footer")), styles.footer, className),
|
|
5722
5741
|
...rest,
|
|
5723
5742
|
children
|
|
5724
5743
|
}
|
|
@@ -5740,7 +5759,7 @@ Card.Footer = CardFooter;
|
|
|
5740
5759
|
var Card_default = Card;
|
|
5741
5760
|
|
|
5742
5761
|
// src/components/primitives/Divider/Divider.tsx
|
|
5743
|
-
var
|
|
5762
|
+
var import_browser42 = require("@asgardeo/browser");
|
|
5744
5763
|
var import_css31 = require("@emotion/css");
|
|
5745
5764
|
|
|
5746
5765
|
// src/components/primitives/Divider/Divider.styles.ts
|
|
@@ -5809,8 +5828,8 @@ var Divider = ({
|
|
|
5809
5828
|
"div",
|
|
5810
5829
|
{
|
|
5811
5830
|
className: (0, import_css31.cx)(
|
|
5812
|
-
(0,
|
|
5813
|
-
(0,
|
|
5831
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider")),
|
|
5832
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "vertical")),
|
|
5814
5833
|
styles.divider,
|
|
5815
5834
|
styles.vertical,
|
|
5816
5835
|
className
|
|
@@ -5827,9 +5846,9 @@ var Divider = ({
|
|
|
5827
5846
|
"div",
|
|
5828
5847
|
{
|
|
5829
5848
|
className: (0, import_css31.cx)(
|
|
5830
|
-
(0,
|
|
5831
|
-
(0,
|
|
5832
|
-
(0,
|
|
5849
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider")),
|
|
5850
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "horizontal")),
|
|
5851
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "with-text")),
|
|
5833
5852
|
styles.divider,
|
|
5834
5853
|
styles.horizontal,
|
|
5835
5854
|
className
|
|
@@ -5839,18 +5858,18 @@ var Divider = ({
|
|
|
5839
5858
|
"aria-orientation": "horizontal",
|
|
5840
5859
|
...rest,
|
|
5841
5860
|
children: [
|
|
5842
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: (0, import_css31.cx)((0,
|
|
5861
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: (0, import_css31.cx)((0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "line")), styles.line) }),
|
|
5843
5862
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
5844
5863
|
Typography_default,
|
|
5845
5864
|
{
|
|
5846
5865
|
variant: "body2",
|
|
5847
5866
|
color: "textSecondary",
|
|
5848
|
-
className: (0, import_css31.cx)((0,
|
|
5867
|
+
className: (0, import_css31.cx)((0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "text")), styles.text),
|
|
5849
5868
|
inline: true,
|
|
5850
5869
|
children
|
|
5851
5870
|
}
|
|
5852
5871
|
),
|
|
5853
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: (0, import_css31.cx)((0,
|
|
5872
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: (0, import_css31.cx)((0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "line")), styles.line) })
|
|
5854
5873
|
]
|
|
5855
5874
|
}
|
|
5856
5875
|
);
|
|
@@ -5859,8 +5878,8 @@ var Divider = ({
|
|
|
5859
5878
|
"div",
|
|
5860
5879
|
{
|
|
5861
5880
|
className: (0, import_css31.cx)(
|
|
5862
|
-
(0,
|
|
5863
|
-
(0,
|
|
5881
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider")),
|
|
5882
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "horizontal")),
|
|
5864
5883
|
styles.divider,
|
|
5865
5884
|
styles.horizontal,
|
|
5866
5885
|
className
|
|
@@ -5876,7 +5895,7 @@ var Divider_default = Divider;
|
|
|
5876
5895
|
|
|
5877
5896
|
// src/components/primitives/Logo/Logo.tsx
|
|
5878
5897
|
var import_css33 = require("@emotion/css");
|
|
5879
|
-
var
|
|
5898
|
+
var import_browser43 = require("@asgardeo/browser");
|
|
5880
5899
|
|
|
5881
5900
|
// src/components/primitives/Logo/Logo.styles.ts
|
|
5882
5901
|
var import_css32 = require("@emotion/css");
|
|
@@ -5935,8 +5954,8 @@ var Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
|
5935
5954
|
alt: logoAlt,
|
|
5936
5955
|
title: logoTitle,
|
|
5937
5956
|
className: (0, import_css33.cx)(
|
|
5938
|
-
(0,
|
|
5939
|
-
(0,
|
|
5957
|
+
(0, import_browser43.withVendorCSSClassPrefix)((0, import_browser43.bem)("logo")),
|
|
5958
|
+
(0, import_browser43.withVendorCSSClassPrefix)((0, import_browser43.bem)("logo", size)),
|
|
5940
5959
|
styles.logo,
|
|
5941
5960
|
styles.size,
|
|
5942
5961
|
className
|
|
@@ -6202,7 +6221,7 @@ var handleWebAuthnAuthentication = async (challengeData) => {
|
|
|
6202
6221
|
throw new Error(`Passkey authentication failed: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
6203
6222
|
}
|
|
6204
6223
|
};
|
|
6205
|
-
var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId ===
|
|
6224
|
+
var isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === import_browser44.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && authenticator.metadata?.additionalData?.challengeData;
|
|
6206
6225
|
var BaseSignIn = (props) => {
|
|
6207
6226
|
const { theme } = useTheme_default();
|
|
6208
6227
|
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
@@ -6288,9 +6307,9 @@ var BaseSignInContent = ({
|
|
|
6288
6307
|
touchAllFields();
|
|
6289
6308
|
};
|
|
6290
6309
|
const handleRedirectionIfNeeded = (response) => {
|
|
6291
|
-
if (response && "nextStep" in response && response.nextStep && response.nextStep.stepType ===
|
|
6310
|
+
if (response && "nextStep" in response && response.nextStep && response.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.AuthenticatorPrompt && response.nextStep.authenticators && response.nextStep.authenticators.length === 1) {
|
|
6292
6311
|
const responseAuthenticator = response.nextStep.authenticators[0];
|
|
6293
|
-
if (responseAuthenticator.metadata?.promptType ===
|
|
6312
|
+
if (responseAuthenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt && responseAuthenticator.metadata?.additionalData?.redirectUrl) {
|
|
6294
6313
|
const redirectUrl = responseAuthenticator.metadata?.additionalData?.redirectUrl;
|
|
6295
6314
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
6296
6315
|
if (!popup) {
|
|
@@ -6376,7 +6395,7 @@ var BaseSignInContent = ({
|
|
|
6376
6395
|
});
|
|
6377
6396
|
popup.close();
|
|
6378
6397
|
onFlowChange?.(response2);
|
|
6379
|
-
if (response2?.flowStatus ===
|
|
6398
|
+
if (response2?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6380
6399
|
onSuccess?.(response2.authData);
|
|
6381
6400
|
}
|
|
6382
6401
|
}
|
|
@@ -6417,11 +6436,11 @@ var BaseSignInContent = ({
|
|
|
6417
6436
|
url: currentFlow?.links[0].href
|
|
6418
6437
|
});
|
|
6419
6438
|
onFlowChange?.(response);
|
|
6420
|
-
if (response?.flowStatus ===
|
|
6439
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6421
6440
|
onSuccess?.(response.authData);
|
|
6422
6441
|
return;
|
|
6423
6442
|
}
|
|
6424
|
-
if (response?.flowStatus ===
|
|
6443
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6425
6444
|
setError(t("errors.sign.in.flow.completion.failure"));
|
|
6426
6445
|
return;
|
|
6427
6446
|
}
|
|
@@ -6432,7 +6451,7 @@ var BaseSignInContent = ({
|
|
|
6432
6451
|
const nextStepResponse = response;
|
|
6433
6452
|
setCurrentFlow(nextStepResponse);
|
|
6434
6453
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6435
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6454
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6436
6455
|
setCurrentAuthenticator(null);
|
|
6437
6456
|
} else {
|
|
6438
6457
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6450,7 +6469,7 @@ var BaseSignInContent = ({
|
|
|
6450
6469
|
}
|
|
6451
6470
|
}
|
|
6452
6471
|
} catch (err) {
|
|
6453
|
-
const errorMessage = err instanceof
|
|
6472
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err.message : t("errors.sign.in.flow.failure");
|
|
6454
6473
|
setError(errorMessage);
|
|
6455
6474
|
onError?.(err);
|
|
6456
6475
|
} finally {
|
|
@@ -6489,11 +6508,11 @@ var BaseSignInContent = ({
|
|
|
6489
6508
|
url: currentFlow?.links[0].href
|
|
6490
6509
|
});
|
|
6491
6510
|
onFlowChange?.(response);
|
|
6492
|
-
if (response?.flowStatus ===
|
|
6511
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6493
6512
|
onSuccess?.(response.authData);
|
|
6494
6513
|
return;
|
|
6495
6514
|
}
|
|
6496
|
-
if (response?.flowStatus ===
|
|
6515
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6497
6516
|
setError(t("errors.sign.in.flow.passkeys.completion.failure"));
|
|
6498
6517
|
return;
|
|
6499
6518
|
}
|
|
@@ -6501,7 +6520,7 @@ var BaseSignInContent = ({
|
|
|
6501
6520
|
const nextStepResponse = response;
|
|
6502
6521
|
setCurrentFlow(nextStepResponse);
|
|
6503
6522
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6504
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6523
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6505
6524
|
setCurrentAuthenticator(null);
|
|
6506
6525
|
} else {
|
|
6507
6526
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6530,7 +6549,7 @@ var BaseSignInContent = ({
|
|
|
6530
6549
|
}
|
|
6531
6550
|
setError(errorMessage);
|
|
6532
6551
|
}
|
|
6533
|
-
} else if (authenticator.metadata?.promptType ===
|
|
6552
|
+
} else if (authenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt) {
|
|
6534
6553
|
const payload = {
|
|
6535
6554
|
flowId: currentFlow.flowId,
|
|
6536
6555
|
selectedAuthenticator: {
|
|
@@ -6543,7 +6562,7 @@ var BaseSignInContent = ({
|
|
|
6543
6562
|
url: currentFlow?.links[0].href
|
|
6544
6563
|
});
|
|
6545
6564
|
onFlowChange?.(response);
|
|
6546
|
-
if (response?.flowStatus ===
|
|
6565
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6547
6566
|
onSuccess?.(response.authData);
|
|
6548
6567
|
return;
|
|
6549
6568
|
}
|
|
@@ -6566,11 +6585,11 @@ var BaseSignInContent = ({
|
|
|
6566
6585
|
url: currentFlow?.links[0].href
|
|
6567
6586
|
});
|
|
6568
6587
|
onFlowChange?.(response);
|
|
6569
|
-
if (response?.flowStatus ===
|
|
6588
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6570
6589
|
onSuccess?.(response.authData);
|
|
6571
6590
|
return;
|
|
6572
6591
|
}
|
|
6573
|
-
if (response?.flowStatus ===
|
|
6592
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6574
6593
|
setError("Authentication failed. Please check your credentials and try again.");
|
|
6575
6594
|
return;
|
|
6576
6595
|
}
|
|
@@ -6581,7 +6600,7 @@ var BaseSignInContent = ({
|
|
|
6581
6600
|
const nextStepResponse = response;
|
|
6582
6601
|
setCurrentFlow(nextStepResponse);
|
|
6583
6602
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6584
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6603
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6585
6604
|
setCurrentAuthenticator(null);
|
|
6586
6605
|
} else {
|
|
6587
6606
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6617,11 +6636,11 @@ var BaseSignInContent = ({
|
|
|
6617
6636
|
url: currentFlow?.links[0].href
|
|
6618
6637
|
});
|
|
6619
6638
|
onFlowChange?.(response);
|
|
6620
|
-
if (response?.flowStatus ===
|
|
6639
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6621
6640
|
onSuccess?.(response.authData);
|
|
6622
6641
|
return;
|
|
6623
6642
|
}
|
|
6624
|
-
if (response?.flowStatus ===
|
|
6643
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6625
6644
|
setError("Authentication failed. Please try again.");
|
|
6626
6645
|
return;
|
|
6627
6646
|
}
|
|
@@ -6632,7 +6651,7 @@ var BaseSignInContent = ({
|
|
|
6632
6651
|
const nextStepResponse = response;
|
|
6633
6652
|
setCurrentFlow(nextStepResponse);
|
|
6634
6653
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6635
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6654
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6636
6655
|
setCurrentAuthenticator(null);
|
|
6637
6656
|
} else {
|
|
6638
6657
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6659,7 +6678,7 @@ var BaseSignInContent = ({
|
|
|
6659
6678
|
}
|
|
6660
6679
|
}
|
|
6661
6680
|
} catch (err) {
|
|
6662
|
-
const errorMessage = err instanceof
|
|
6681
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err?.message : "Authenticator selection failed";
|
|
6663
6682
|
setError(errorMessage);
|
|
6664
6683
|
onError?.(err);
|
|
6665
6684
|
} finally {
|
|
@@ -6671,7 +6690,7 @@ var BaseSignInContent = ({
|
|
|
6671
6690
|
setFormTouched(param, true);
|
|
6672
6691
|
};
|
|
6673
6692
|
const hasMultipleOptions = (0, import_react56.useCallback)(
|
|
6674
|
-
() => currentFlow && "nextStep" in currentFlow && currentFlow.nextStep?.stepType ===
|
|
6693
|
+
() => currentFlow && "nextStep" in currentFlow && currentFlow.nextStep?.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && currentFlow.nextStep?.authenticators && currentFlow.nextStep.authenticators.length > 1,
|
|
6675
6694
|
[currentFlow]
|
|
6676
6695
|
);
|
|
6677
6696
|
const getAvailableAuthenticators = (0, import_react56.useCallback)(() => {
|
|
@@ -6682,30 +6701,30 @@ var BaseSignInContent = ({
|
|
|
6682
6701
|
}, [currentFlow]);
|
|
6683
6702
|
const containerClasses = (0, import_css35.cx)(
|
|
6684
6703
|
[
|
|
6685
|
-
(0,
|
|
6686
|
-
(0,
|
|
6687
|
-
(0,
|
|
6704
|
+
(0, import_browser44.withVendorCSSClassPrefix)("signin"),
|
|
6705
|
+
(0, import_browser44.withVendorCSSClassPrefix)(`signin--${size}`),
|
|
6706
|
+
(0, import_browser44.withVendorCSSClassPrefix)(`signin--${variant}`)
|
|
6688
6707
|
],
|
|
6689
6708
|
className
|
|
6690
6709
|
);
|
|
6691
6710
|
const inputClasses = (0, import_css35.cx)(
|
|
6692
6711
|
[
|
|
6693
|
-
(0,
|
|
6694
|
-
size === "small" && (0,
|
|
6695
|
-
size === "large" && (0,
|
|
6712
|
+
(0, import_browser44.withVendorCSSClassPrefix)("signin__input"),
|
|
6713
|
+
size === "small" && (0, import_browser44.withVendorCSSClassPrefix)("signin__input--small"),
|
|
6714
|
+
size === "large" && (0, import_browser44.withVendorCSSClassPrefix)("signin__input--large")
|
|
6696
6715
|
],
|
|
6697
6716
|
inputClassName
|
|
6698
6717
|
);
|
|
6699
6718
|
const buttonClasses = (0, import_css35.cx)(
|
|
6700
6719
|
[
|
|
6701
|
-
(0,
|
|
6702
|
-
size === "small" && (0,
|
|
6703
|
-
size === "large" && (0,
|
|
6720
|
+
(0, import_browser44.withVendorCSSClassPrefix)("signin__button"),
|
|
6721
|
+
size === "small" && (0, import_browser44.withVendorCSSClassPrefix)("signin__button--small"),
|
|
6722
|
+
size === "large" && (0, import_browser44.withVendorCSSClassPrefix)("signin__button--large")
|
|
6704
6723
|
],
|
|
6705
6724
|
buttonClassName
|
|
6706
6725
|
);
|
|
6707
|
-
const errorClasses = (0, import_css35.cx)([(0,
|
|
6708
|
-
const messageClasses = (0, import_css35.cx)([(0,
|
|
6726
|
+
const errorClasses = (0, import_css35.cx)([(0, import_browser44.withVendorCSSClassPrefix)("signin__error")], errorClassName);
|
|
6727
|
+
const messageClasses = (0, import_css35.cx)([(0, import_browser44.withVendorCSSClassPrefix)("signin__messages")], messageClassName);
|
|
6709
6728
|
(0, import_react56.useEffect)(() => {
|
|
6710
6729
|
if (isLoading) {
|
|
6711
6730
|
return;
|
|
@@ -6722,12 +6741,12 @@ var BaseSignInContent = ({
|
|
|
6722
6741
|
setCurrentFlow(response);
|
|
6723
6742
|
setIsInitialized(true);
|
|
6724
6743
|
onFlowChange?.(response);
|
|
6725
|
-
if (response?.flowStatus ===
|
|
6744
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6726
6745
|
onSuccess?.(response.authData || {});
|
|
6727
6746
|
return;
|
|
6728
6747
|
}
|
|
6729
6748
|
if (response?.nextStep?.authenticators?.length > 0) {
|
|
6730
|
-
if (response.nextStep.stepType ===
|
|
6749
|
+
if (response.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && response.nextStep.authenticators.length > 1) {
|
|
6731
6750
|
setCurrentAuthenticator(null);
|
|
6732
6751
|
} else {
|
|
6733
6752
|
const authenticator = response.nextStep.authenticators[0];
|
|
@@ -6745,7 +6764,7 @@ var BaseSignInContent = ({
|
|
|
6745
6764
|
);
|
|
6746
6765
|
}
|
|
6747
6766
|
} catch (err) {
|
|
6748
|
-
const errorMessage = err instanceof
|
|
6767
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err.message : t("errors.sign.in.initialization");
|
|
6749
6768
|
setError(errorMessage);
|
|
6750
6769
|
onError?.(err);
|
|
6751
6770
|
} finally {
|
|
@@ -6762,7 +6781,7 @@ var BaseSignInContent = ({
|
|
|
6762
6781
|
if (hasMultipleOptions() && !currentAuthenticator) {
|
|
6763
6782
|
const availableAuthenticators = getAvailableAuthenticators();
|
|
6764
6783
|
const userPromptAuthenticators = availableAuthenticators.filter(
|
|
6765
|
-
(auth) => auth.metadata?.promptType ===
|
|
6784
|
+
(auth) => auth.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt || // Fallback: LOCAL authenticators with params are typically user prompts
|
|
6766
6785
|
auth.idp === "LOCAL" && auth.metadata?.params && auth.metadata.params.length > 0
|
|
6767
6786
|
);
|
|
6768
6787
|
const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
|
|
@@ -6947,15 +6966,15 @@ var SignIn = ({ className, size = "medium", ...rest }) => {
|
|
|
6947
6966
|
var SignIn_default = SignIn;
|
|
6948
6967
|
|
|
6949
6968
|
// src/components/presentation/SignUp/BaseSignUp.tsx
|
|
6950
|
-
var
|
|
6969
|
+
var import_browser52 = require("@asgardeo/browser");
|
|
6951
6970
|
var import_css37 = require("@emotion/css");
|
|
6952
6971
|
var import_react58 = require("react");
|
|
6953
6972
|
|
|
6954
6973
|
// src/components/presentation/SignUp/options/SignUpOptionFactory.tsx
|
|
6955
|
-
var
|
|
6974
|
+
var import_browser51 = require("@asgardeo/browser");
|
|
6956
6975
|
|
|
6957
6976
|
// src/components/presentation/SignUp/options/CheckboxInput.tsx
|
|
6958
|
-
var
|
|
6977
|
+
var import_browser45 = require("@asgardeo/browser");
|
|
6959
6978
|
var CheckboxInput = ({
|
|
6960
6979
|
component,
|
|
6961
6980
|
formValues,
|
|
@@ -6969,7 +6988,7 @@ var CheckboxInput = ({
|
|
|
6969
6988
|
const value = formValues[fieldName] || "";
|
|
6970
6989
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
6971
6990
|
return createField({
|
|
6972
|
-
type:
|
|
6991
|
+
type: import_browser45.FieldType.Checkbox,
|
|
6973
6992
|
name: fieldName,
|
|
6974
6993
|
label: config["label"] || "",
|
|
6975
6994
|
placeholder: config["placeholder"] || "",
|
|
@@ -6983,7 +7002,7 @@ var CheckboxInput = ({
|
|
|
6983
7002
|
var CheckboxInput_default = CheckboxInput;
|
|
6984
7003
|
|
|
6985
7004
|
// src/components/presentation/SignUp/options/DateInput.tsx
|
|
6986
|
-
var
|
|
7005
|
+
var import_browser46 = require("@asgardeo/browser");
|
|
6987
7006
|
var DateInput = ({
|
|
6988
7007
|
component,
|
|
6989
7008
|
formValues,
|
|
@@ -6997,7 +7016,7 @@ var DateInput = ({
|
|
|
6997
7016
|
const value = formValues[fieldName] || "";
|
|
6998
7017
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
6999
7018
|
return createField({
|
|
7000
|
-
type:
|
|
7019
|
+
type: import_browser46.FieldType.Date,
|
|
7001
7020
|
name: fieldName,
|
|
7002
7021
|
label: config["label"] || "",
|
|
7003
7022
|
placeholder: config["placeholder"] || "",
|
|
@@ -7030,7 +7049,7 @@ var DividerComponent = ({ component }) => {
|
|
|
7030
7049
|
var DividerComponent_default = DividerComponent;
|
|
7031
7050
|
|
|
7032
7051
|
// src/components/presentation/SignUp/options/EmailInput.tsx
|
|
7033
|
-
var
|
|
7052
|
+
var import_browser47 = require("@asgardeo/browser");
|
|
7034
7053
|
var EmailInput = ({
|
|
7035
7054
|
component,
|
|
7036
7055
|
formValues,
|
|
@@ -7044,7 +7063,7 @@ var EmailInput = ({
|
|
|
7044
7063
|
const value = formValues[fieldName] || "";
|
|
7045
7064
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7046
7065
|
return createField({
|
|
7047
|
-
type:
|
|
7066
|
+
type: import_browser47.FieldType.Email,
|
|
7048
7067
|
name: fieldName,
|
|
7049
7068
|
label: config["label"] || "Email",
|
|
7050
7069
|
placeholder: config["placeholder"] || "Enter your email",
|
|
@@ -7115,7 +7134,7 @@ var ImageComponent = ({ component }) => {
|
|
|
7115
7134
|
var ImageComponent_default = ImageComponent;
|
|
7116
7135
|
|
|
7117
7136
|
// src/components/presentation/SignUp/options/NumberInput.tsx
|
|
7118
|
-
var
|
|
7137
|
+
var import_browser48 = require("@asgardeo/browser");
|
|
7119
7138
|
var NumberInput = ({
|
|
7120
7139
|
component,
|
|
7121
7140
|
formValues,
|
|
@@ -7129,7 +7148,7 @@ var NumberInput = ({
|
|
|
7129
7148
|
const value = formValues[fieldName] || "";
|
|
7130
7149
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7131
7150
|
return createField({
|
|
7132
|
-
type:
|
|
7151
|
+
type: import_browser48.FieldType.Number,
|
|
7133
7152
|
name: fieldName,
|
|
7134
7153
|
label: config["label"] || "",
|
|
7135
7154
|
placeholder: config["placeholder"] || "",
|
|
@@ -7143,7 +7162,7 @@ var NumberInput = ({
|
|
|
7143
7162
|
var NumberInput_default = NumberInput;
|
|
7144
7163
|
|
|
7145
7164
|
// src/components/presentation/SignUp/options/PasswordInput.tsx
|
|
7146
|
-
var
|
|
7165
|
+
var import_browser49 = require("@asgardeo/browser");
|
|
7147
7166
|
var PasswordInput = ({
|
|
7148
7167
|
component,
|
|
7149
7168
|
formValues,
|
|
@@ -7189,7 +7208,7 @@ var PasswordInput = ({
|
|
|
7189
7208
|
});
|
|
7190
7209
|
const hint = validationHints.length > 0 ? validationHints.join(", ") : config["hint"] || "";
|
|
7191
7210
|
return createField({
|
|
7192
|
-
type:
|
|
7211
|
+
type: import_browser49.FieldType.Password,
|
|
7193
7212
|
name: fieldName,
|
|
7194
7213
|
label: config["label"] || "Password",
|
|
7195
7214
|
placeholder: config["placeholder"] || "Enter your password",
|
|
@@ -7288,7 +7307,7 @@ var TelephoneInput = ({
|
|
|
7288
7307
|
var TelephoneInput_default = TelephoneInput;
|
|
7289
7308
|
|
|
7290
7309
|
// src/components/presentation/SignUp/options/TextInput.tsx
|
|
7291
|
-
var
|
|
7310
|
+
var import_browser50 = require("@asgardeo/browser");
|
|
7292
7311
|
var TextInput = ({
|
|
7293
7312
|
component,
|
|
7294
7313
|
formValues,
|
|
@@ -7302,7 +7321,7 @@ var TextInput = ({
|
|
|
7302
7321
|
const value = formValues[fieldName] || "";
|
|
7303
7322
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7304
7323
|
return createField({
|
|
7305
|
-
type:
|
|
7324
|
+
type: import_browser50.FieldType.Text,
|
|
7306
7325
|
name: fieldName,
|
|
7307
7326
|
label: config["label"] || "",
|
|
7308
7327
|
placeholder: config["placeholder"] || "",
|
|
@@ -7373,9 +7392,9 @@ var Typography_default2 = TypographyComponent;
|
|
|
7373
7392
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7374
7393
|
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
7375
7394
|
switch (component.type) {
|
|
7376
|
-
case
|
|
7395
|
+
case import_browser51.EmbeddedFlowComponentType.Typography:
|
|
7377
7396
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Typography_default2, { component, onSubmit, ...rest });
|
|
7378
|
-
case
|
|
7397
|
+
case import_browser51.EmbeddedFlowComponentType.Input:
|
|
7379
7398
|
const inputVariant = component.variant?.toUpperCase();
|
|
7380
7399
|
const inputType = component.config["type"]?.toLowerCase();
|
|
7381
7400
|
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
@@ -7397,7 +7416,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
7397
7416
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CheckboxInput_default, { component, onSubmit, ...rest });
|
|
7398
7417
|
}
|
|
7399
7418
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TextInput_default, { component, onSubmit, ...rest });
|
|
7400
|
-
case
|
|
7419
|
+
case import_browser51.EmbeddedFlowComponentType.Button: {
|
|
7401
7420
|
const buttonVariant = component.variant?.toUpperCase();
|
|
7402
7421
|
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
7403
7422
|
if (buttonVariant === "SOCIAL") {
|
|
@@ -7422,11 +7441,11 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
7422
7441
|
}
|
|
7423
7442
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
|
|
7424
7443
|
}
|
|
7425
|
-
case
|
|
7444
|
+
case import_browser51.EmbeddedFlowComponentType.Form:
|
|
7426
7445
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FormContainer_default, { component, onSubmit, ...rest });
|
|
7427
|
-
case
|
|
7446
|
+
case import_browser51.EmbeddedFlowComponentType.Divider:
|
|
7428
7447
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
|
|
7429
|
-
case
|
|
7448
|
+
case import_browser51.EmbeddedFlowComponentType.Image:
|
|
7430
7449
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
|
|
7431
7450
|
default:
|
|
7432
7451
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", {});
|
|
@@ -7641,7 +7660,7 @@ var BaseSignUpContent = ({
|
|
|
7641
7660
|
const fields = [];
|
|
7642
7661
|
const processComponents = (comps) => {
|
|
7643
7662
|
comps.forEach((component) => {
|
|
7644
|
-
if (component.type ===
|
|
7663
|
+
if (component.type === import_browser52.EmbeddedFlowComponentType.Input) {
|
|
7645
7664
|
const config = component.config || {};
|
|
7646
7665
|
fields.push({
|
|
7647
7666
|
name: config.name || component.id,
|
|
@@ -7733,11 +7752,11 @@ var BaseSignUpContent = ({
|
|
|
7733
7752
|
};
|
|
7734
7753
|
const response = await onSubmit(payload);
|
|
7735
7754
|
onFlowChange?.(response);
|
|
7736
|
-
if (response.flowStatus ===
|
|
7755
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7737
7756
|
onComplete?.(response);
|
|
7738
7757
|
return;
|
|
7739
7758
|
}
|
|
7740
|
-
if (response.flowStatus ===
|
|
7759
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7741
7760
|
if (handleRedirectionIfNeeded(response, component)) {
|
|
7742
7761
|
return;
|
|
7743
7762
|
}
|
|
@@ -7745,7 +7764,7 @@ var BaseSignUpContent = ({
|
|
|
7745
7764
|
setupFormFields(response);
|
|
7746
7765
|
}
|
|
7747
7766
|
} catch (err) {
|
|
7748
|
-
const errorMessage = err instanceof
|
|
7767
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7749
7768
|
setError(errorMessage);
|
|
7750
7769
|
onError?.(err);
|
|
7751
7770
|
} finally {
|
|
@@ -7753,7 +7772,7 @@ var BaseSignUpContent = ({
|
|
|
7753
7772
|
}
|
|
7754
7773
|
};
|
|
7755
7774
|
const handleRedirectionIfNeeded = (response, component) => {
|
|
7756
|
-
if (response?.type ===
|
|
7775
|
+
if (response?.type === import_browser52.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
|
|
7757
7776
|
const redirectUrl = response.data.redirectURL;
|
|
7758
7777
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
7759
7778
|
if (!popup) {
|
|
@@ -7782,16 +7801,16 @@ var BaseSignUpContent = ({
|
|
|
7782
7801
|
try {
|
|
7783
7802
|
const continueResponse = await onSubmit(payload);
|
|
7784
7803
|
onFlowChange?.(continueResponse);
|
|
7785
|
-
if (continueResponse.flowStatus ===
|
|
7804
|
+
if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7786
7805
|
onComplete?.(continueResponse);
|
|
7787
|
-
} else if (continueResponse.flowStatus ===
|
|
7806
|
+
} else if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7788
7807
|
setCurrentFlow(continueResponse);
|
|
7789
7808
|
setupFormFields(continueResponse);
|
|
7790
7809
|
}
|
|
7791
7810
|
popup.close();
|
|
7792
7811
|
cleanup();
|
|
7793
7812
|
} catch (err) {
|
|
7794
|
-
const errorMessage = err instanceof
|
|
7813
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7795
7814
|
setError(errorMessage);
|
|
7796
7815
|
onError?.(err);
|
|
7797
7816
|
popup.close();
|
|
@@ -7843,15 +7862,15 @@ var BaseSignUpContent = ({
|
|
|
7843
7862
|
try {
|
|
7844
7863
|
const continueResponse = await onSubmit(payload);
|
|
7845
7864
|
onFlowChange?.(continueResponse);
|
|
7846
|
-
if (continueResponse.flowStatus ===
|
|
7865
|
+
if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7847
7866
|
onComplete?.(continueResponse);
|
|
7848
|
-
} else if (continueResponse.flowStatus ===
|
|
7867
|
+
} else if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7849
7868
|
setCurrentFlow(continueResponse);
|
|
7850
7869
|
setupFormFields(continueResponse);
|
|
7851
7870
|
}
|
|
7852
7871
|
popup.close();
|
|
7853
7872
|
} catch (err) {
|
|
7854
|
-
const errorMessage = err instanceof
|
|
7873
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7855
7874
|
setError(errorMessage);
|
|
7856
7875
|
onError?.(err);
|
|
7857
7876
|
popup.close();
|
|
@@ -7870,30 +7889,30 @@ var BaseSignUpContent = ({
|
|
|
7870
7889
|
};
|
|
7871
7890
|
const containerClasses = (0, import_css37.cx)(
|
|
7872
7891
|
[
|
|
7873
|
-
(0,
|
|
7874
|
-
(0,
|
|
7875
|
-
(0,
|
|
7892
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signup"),
|
|
7893
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signup--${size}`),
|
|
7894
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signup--${variant}`)
|
|
7876
7895
|
],
|
|
7877
7896
|
className
|
|
7878
7897
|
);
|
|
7879
7898
|
const inputClasses = (0, import_css37.cx)(
|
|
7880
7899
|
[
|
|
7881
|
-
(0,
|
|
7882
|
-
size === "small" && (0,
|
|
7883
|
-
size === "large" && (0,
|
|
7900
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signup__input"),
|
|
7901
|
+
size === "small" && (0, import_browser52.withVendorCSSClassPrefix)("signup__input--small"),
|
|
7902
|
+
size === "large" && (0, import_browser52.withVendorCSSClassPrefix)("signup__input--large")
|
|
7884
7903
|
],
|
|
7885
7904
|
inputClassName
|
|
7886
7905
|
);
|
|
7887
7906
|
const buttonClasses = (0, import_css37.cx)(
|
|
7888
7907
|
[
|
|
7889
|
-
(0,
|
|
7890
|
-
size === "small" && (0,
|
|
7891
|
-
size === "large" && (0,
|
|
7908
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signup__button"),
|
|
7909
|
+
size === "small" && (0, import_browser52.withVendorCSSClassPrefix)("signup__button--small"),
|
|
7910
|
+
size === "large" && (0, import_browser52.withVendorCSSClassPrefix)("signup__button--large")
|
|
7892
7911
|
],
|
|
7893
7912
|
buttonClassName
|
|
7894
7913
|
);
|
|
7895
|
-
const errorClasses = (0, import_css37.cx)([(0,
|
|
7896
|
-
const messageClasses = (0, import_css37.cx)([(0,
|
|
7914
|
+
const errorClasses = (0, import_css37.cx)([(0, import_browser52.withVendorCSSClassPrefix)("signup__error")], errorClassName);
|
|
7915
|
+
const messageClasses = (0, import_css37.cx)([(0, import_browser52.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
|
|
7897
7916
|
const renderComponents = (0, import_react58.useCallback)(
|
|
7898
7917
|
(components) => renderSignUpComponents(
|
|
7899
7918
|
components,
|
|
@@ -7937,11 +7956,11 @@ var BaseSignUpContent = ({
|
|
|
7937
7956
|
setCurrentFlow(response);
|
|
7938
7957
|
setIsFlowInitialized(true);
|
|
7939
7958
|
onFlowChange?.(response);
|
|
7940
|
-
if (response.flowStatus ===
|
|
7959
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7941
7960
|
onComplete?.(response);
|
|
7942
7961
|
return;
|
|
7943
7962
|
}
|
|
7944
|
-
if (response.flowStatus ===
|
|
7963
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7945
7964
|
setupFormFields(response);
|
|
7946
7965
|
}
|
|
7947
7966
|
} catch (err) {
|
|
@@ -7995,7 +8014,7 @@ var BaseSignUpContent = ({
|
|
|
7995
8014
|
var BaseSignUp_default = BaseSignUp;
|
|
7996
8015
|
|
|
7997
8016
|
// src/components/presentation/SignUp/SignUp.tsx
|
|
7998
|
-
var
|
|
8017
|
+
var import_browser53 = require("@asgardeo/browser");
|
|
7999
8018
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8000
8019
|
var SignUp = ({
|
|
8001
8020
|
className,
|
|
@@ -8009,16 +8028,16 @@ var SignUp = ({
|
|
|
8009
8028
|
const { signUp, isInitialized } = useAsgardeo_default();
|
|
8010
8029
|
const handleInitialize = async (payload) => await signUp(
|
|
8011
8030
|
payload || {
|
|
8012
|
-
flowType:
|
|
8031
|
+
flowType: import_browser53.EmbeddedFlowType.Registration
|
|
8013
8032
|
}
|
|
8014
8033
|
);
|
|
8015
8034
|
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
8016
8035
|
const handleComplete = (response) => {
|
|
8017
8036
|
onComplete?.(response);
|
|
8018
|
-
if (shouldRedirectAfterSignUp && response?.type !==
|
|
8037
|
+
if (shouldRedirectAfterSignUp && response?.type !== import_browser53.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
|
|
8019
8038
|
window.location.href = afterSignUpUrl;
|
|
8020
8039
|
}
|
|
8021
|
-
if (shouldRedirectAfterSignUp && response?.type ===
|
|
8040
|
+
if (shouldRedirectAfterSignUp && response?.type === import_browser53.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
|
|
8022
8041
|
!response.data.redirectURL.includes("auth")) {
|
|
8023
8042
|
window.location.href = response.data.redirectURL;
|
|
8024
8043
|
}
|
|
@@ -8081,35 +8100,35 @@ Organization5.displayName = "Organization";
|
|
|
8081
8100
|
var Organization_default = Organization5;
|
|
8082
8101
|
|
|
8083
8102
|
// src/components/presentation/UserProfile/BaseUserProfile.tsx
|
|
8084
|
-
var
|
|
8103
|
+
var import_browser59 = require("@asgardeo/browser");
|
|
8085
8104
|
var import_css45 = require("@emotion/css");
|
|
8086
8105
|
var import_react67 = require("react");
|
|
8087
8106
|
|
|
8088
8107
|
// src/utils/getMappedUserProfileValue.ts
|
|
8089
|
-
var
|
|
8108
|
+
var import_browser54 = require("@asgardeo/browser");
|
|
8090
8109
|
var getMappedUserProfileValue = (key, mappings, user) => {
|
|
8091
8110
|
if (!key || !mappings || !user) {
|
|
8092
8111
|
return void 0;
|
|
8093
8112
|
}
|
|
8094
8113
|
const mapping = mappings[key];
|
|
8095
8114
|
if (!mapping) {
|
|
8096
|
-
return (0,
|
|
8115
|
+
return (0, import_browser54.get)(user, key);
|
|
8097
8116
|
}
|
|
8098
8117
|
if (Array.isArray(mapping)) {
|
|
8099
8118
|
for (const path of mapping) {
|
|
8100
|
-
const value = (0,
|
|
8119
|
+
const value = (0, import_browser54.get)(user, path);
|
|
8101
8120
|
if (value !== void 0 && value !== null && value !== "") {
|
|
8102
8121
|
return value;
|
|
8103
8122
|
}
|
|
8104
8123
|
}
|
|
8105
8124
|
return void 0;
|
|
8106
8125
|
}
|
|
8107
|
-
return (0,
|
|
8126
|
+
return (0, import_browser54.get)(user, mapping);
|
|
8108
8127
|
};
|
|
8109
8128
|
var getMappedUserProfileValue_default = getMappedUserProfileValue;
|
|
8110
8129
|
|
|
8111
8130
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
8112
|
-
var
|
|
8131
|
+
var import_browser55 = require("@asgardeo/browser");
|
|
8113
8132
|
var import_css39 = require("@emotion/css");
|
|
8114
8133
|
var import_react60 = require("react");
|
|
8115
8134
|
|
|
@@ -8228,20 +8247,20 @@ var Avatar = ({
|
|
|
8228
8247
|
const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
|
|
8229
8248
|
const renderContent = () => {
|
|
8230
8249
|
if (imageUrl) {
|
|
8231
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { src: imageUrl, alt, className: (0, import_css39.cx)((0,
|
|
8250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("img", { src: imageUrl, alt, className: (0, import_css39.cx)((0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", "image")), styles.image) });
|
|
8232
8251
|
}
|
|
8233
8252
|
if (name) {
|
|
8234
8253
|
return getInitials(name);
|
|
8235
8254
|
}
|
|
8236
8255
|
if (isLoading) {
|
|
8237
|
-
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: (0, import_css39.cx)((0,
|
|
8256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: (0, import_css39.cx)((0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", "skeleton")), styles.skeleton) });
|
|
8238
8257
|
}
|
|
8239
8258
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8240
8259
|
"svg",
|
|
8241
8260
|
{
|
|
8242
8261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8243
8262
|
viewBox: "0 0 640 640",
|
|
8244
|
-
className: (0, import_css39.cx)((0,
|
|
8263
|
+
className: (0, import_css39.cx)((0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", "icon")), styles.icon),
|
|
8245
8264
|
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
|
|
8246
8265
|
}
|
|
8247
8266
|
);
|
|
@@ -8250,11 +8269,11 @@ var Avatar = ({
|
|
|
8250
8269
|
"div",
|
|
8251
8270
|
{
|
|
8252
8271
|
className: (0, import_css39.cx)(
|
|
8253
|
-
(0,
|
|
8272
|
+
(0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar")),
|
|
8254
8273
|
styles.avatar,
|
|
8255
8274
|
styles.variant,
|
|
8256
|
-
(0,
|
|
8257
|
-
isDefaultState && (0,
|
|
8275
|
+
(0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", null, variant)),
|
|
8276
|
+
isDefaultState && (0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", "default")),
|
|
8258
8277
|
className
|
|
8259
8278
|
),
|
|
8260
8279
|
children: renderContent()
|
|
@@ -8264,7 +8283,7 @@ var Avatar = ({
|
|
|
8264
8283
|
var Avatar_default = Avatar;
|
|
8265
8284
|
|
|
8266
8285
|
// src/components/primitives/Dialog/Dialog.tsx
|
|
8267
|
-
var
|
|
8286
|
+
var import_browser56 = require("@asgardeo/browser");
|
|
8268
8287
|
var import_react62 = require("@floating-ui/react");
|
|
8269
8288
|
var import_css41 = require("@emotion/css");
|
|
8270
8289
|
var import_react63 = __toESM(require("react"), 1);
|
|
@@ -8501,11 +8520,11 @@ var DialogContent = import_react63.default.forwardRef((props, propRef) => {
|
|
|
8501
8520
|
const styles = Dialog_styles_default(theme, colorScheme);
|
|
8502
8521
|
const ref = (0, import_react62.useMergeRefs)([context.refs.setFloating, propRef]);
|
|
8503
8522
|
if (!floatingContext.open) return null;
|
|
8504
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react62.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react62.FloatingOverlay, { className: (0, import_css41.cx)((0,
|
|
8523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react62.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react62.FloatingOverlay, { className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "overlay")), styles.overlay), lockScroll: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react62.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8505
8524
|
"div",
|
|
8506
8525
|
{
|
|
8507
8526
|
ref,
|
|
8508
|
-
className: (0, import_css41.cx)((0,
|
|
8527
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "content")), styles.content, props.className),
|
|
8509
8528
|
"aria-labelledby": context.labelId,
|
|
8510
8529
|
"aria-describedby": context.descriptionId,
|
|
8511
8530
|
...context.getFloatingProps(props),
|
|
@@ -8523,14 +8542,14 @@ var DialogHeading = import_react63.default.forwardRef(
|
|
|
8523
8542
|
context.setLabelId(id);
|
|
8524
8543
|
return () => context.setLabelId(void 0);
|
|
8525
8544
|
}, [id, context.setLabelId]);
|
|
8526
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: (0, import_css41.cx)((0,
|
|
8545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "header")), styles.header), children: [
|
|
8527
8546
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8528
8547
|
"h2",
|
|
8529
8548
|
{
|
|
8530
8549
|
...props,
|
|
8531
8550
|
ref,
|
|
8532
8551
|
id,
|
|
8533
|
-
className: (0, import_css41.cx)((0,
|
|
8552
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "title")), styles.headerTitle),
|
|
8534
8553
|
children
|
|
8535
8554
|
}
|
|
8536
8555
|
),
|
|
@@ -8565,7 +8584,7 @@ var DialogDescription = import_react63.default.forwardRef(
|
|
|
8565
8584
|
...props,
|
|
8566
8585
|
ref,
|
|
8567
8586
|
id,
|
|
8568
|
-
className: (0, import_css41.cx)((0,
|
|
8587
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "description")), styles.description, props.className),
|
|
8569
8588
|
children
|
|
8570
8589
|
}
|
|
8571
8590
|
);
|
|
@@ -8595,7 +8614,7 @@ var DialogClose = import_react63.default.forwardRef(({ children, asChild = false
|
|
|
8595
8614
|
...props,
|
|
8596
8615
|
ref,
|
|
8597
8616
|
onClick: handleClick,
|
|
8598
|
-
className: (0, import_css41.cx)((0,
|
|
8617
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "close")), props.className),
|
|
8599
8618
|
variant: "text",
|
|
8600
8619
|
children
|
|
8601
8620
|
}
|
|
@@ -8616,7 +8635,7 @@ var Dialog_default = Dialog;
|
|
|
8616
8635
|
// src/components/primitives/MultiInput/MultiInput.tsx
|
|
8617
8636
|
var import_react65 = require("react");
|
|
8618
8637
|
var import_css43 = require("@emotion/css");
|
|
8619
|
-
var
|
|
8638
|
+
var import_browser57 = require("@asgardeo/browser");
|
|
8620
8639
|
|
|
8621
8640
|
// src/components/primitives/MultiInput/MultiInput.styles.ts
|
|
8622
8641
|
var import_css42 = require("@emotion/css");
|
|
@@ -8808,26 +8827,26 @@ var MultiInput = ({
|
|
|
8808
8827
|
{
|
|
8809
8828
|
error,
|
|
8810
8829
|
helperText,
|
|
8811
|
-
className: (0, import_css43.cx)((0,
|
|
8830
|
+
className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input")), className),
|
|
8812
8831
|
style,
|
|
8813
8832
|
children: [
|
|
8814
8833
|
label && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(InputLabel_default, { required, error: !!error, children: label }),
|
|
8815
|
-
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: (0, import_css43.cx)((0,
|
|
8816
|
-
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: (0, import_css43.cx)((0,
|
|
8834
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "container")), styles.container), children: [
|
|
8835
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "input-row")), styles.inputRow), children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "input-wrapper")), styles.inputWrapper), children: renderInputField(
|
|
8817
8836
|
currentInputValue,
|
|
8818
8837
|
setCurrentInputValue,
|
|
8819
8838
|
canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlusIcon, { className: styles.plusIcon }) : void 0,
|
|
8820
8839
|
canAddMore ? handleInputSubmit : void 0
|
|
8821
8840
|
) }) }),
|
|
8822
|
-
values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: (0, import_css43.cx)((0,
|
|
8841
|
+
values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "list-container")), styles.listContainer), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
8823
8842
|
"div",
|
|
8824
8843
|
{
|
|
8825
|
-
className: (0, import_css43.cx)((0,
|
|
8844
|
+
className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "list-item")), styles.listItem),
|
|
8826
8845
|
children: [
|
|
8827
8846
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8828
8847
|
"span",
|
|
8829
8848
|
{
|
|
8830
|
-
className: (0, import_css43.cx)((0,
|
|
8849
|
+
className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "list-item-text")), styles.listItemText),
|
|
8831
8850
|
children: value
|
|
8832
8851
|
}
|
|
8833
8852
|
),
|
|
@@ -8837,7 +8856,7 @@ var MultiInput = ({
|
|
|
8837
8856
|
type: "button",
|
|
8838
8857
|
onClick: () => handleRemoveValue(index),
|
|
8839
8858
|
disabled,
|
|
8840
|
-
className: (0, import_css43.cx)((0,
|
|
8859
|
+
className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input", "remove-button")), styles.removeButton),
|
|
8841
8860
|
title: "Remove value",
|
|
8842
8861
|
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(BinIcon, { className: styles.icon })
|
|
8843
8862
|
}
|
|
@@ -8856,7 +8875,7 @@ var MultiInput_default = MultiInput;
|
|
|
8856
8875
|
// src/components/presentation/UserProfile/BaseUserProfile.styles.ts
|
|
8857
8876
|
var import_css44 = require("@emotion/css");
|
|
8858
8877
|
var import_react66 = require("react");
|
|
8859
|
-
var
|
|
8878
|
+
var import_browser58 = require("@asgardeo/browser");
|
|
8860
8879
|
var useStyles21 = (theme, colorScheme) => {
|
|
8861
8880
|
const valuePlaceholder = import_css44.css`
|
|
8862
8881
|
font-style: italic;
|
|
@@ -8967,7 +8986,7 @@ var useStyles21 = (theme, colorScheme) => {
|
|
|
8967
8986
|
max-width: 350px;
|
|
8968
8987
|
text-align: left;
|
|
8969
8988
|
|
|
8970
|
-
.${(0,
|
|
8989
|
+
.${(0, import_browser58.withVendorCSSClassPrefix)("form-control")} {
|
|
8971
8990
|
margin-bottom: 0;
|
|
8972
8991
|
}
|
|
8973
8992
|
|
|
@@ -9155,7 +9174,7 @@ var BaseUserProfile = ({
|
|
|
9155
9174
|
fieldValue = fieldValue.filter((v) => v !== void 0 && v !== null && v !== "");
|
|
9156
9175
|
}
|
|
9157
9176
|
let payload = {};
|
|
9158
|
-
if (schema.schemaId && schema.schemaId !==
|
|
9177
|
+
if (schema.schemaId && schema.schemaId !== import_browser59.WellKnownSchemaIds.User) {
|
|
9159
9178
|
payload = {
|
|
9160
9179
|
[schema.schemaId]: {
|
|
9161
9180
|
[fieldName]: fieldValue
|
|
@@ -9394,7 +9413,7 @@ var BaseUserProfile = ({
|
|
|
9394
9413
|
const containerClasses = (0, import_css45.cx)(
|
|
9395
9414
|
styles.root,
|
|
9396
9415
|
cardLayout ? styles.card : "",
|
|
9397
|
-
(0,
|
|
9416
|
+
(0, import_browser59.withVendorCSSClassPrefix)("user-profile"),
|
|
9398
9417
|
className
|
|
9399
9418
|
);
|
|
9400
9419
|
const currentUser = flattenedProfile || profile;
|
|
@@ -9412,7 +9431,7 @@ var BaseUserProfile = ({
|
|
|
9412
9431
|
] }, key)) });
|
|
9413
9432
|
};
|
|
9414
9433
|
const profileContent = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Card_default, { className: containerClasses, children: [
|
|
9415
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Alert_default, { variant: "error", className: (0, import_css45.cx)((0,
|
|
9434
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Alert_default, { variant: "error", className: (0, import_css45.cx)((0, import_browser59.withVendorCSSClassPrefix)((0, import_browser59.bem)("user-profile", "alert")), styles.alert), children: [
|
|
9416
9435
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Alert_default.Title, { children: t("errors.title") || "Error" }),
|
|
9417
9436
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Alert_default.Description, { children: error })
|
|
9418
9437
|
] }),
|
|
@@ -9460,8 +9479,8 @@ var BaseUserProfile_default = BaseUserProfile;
|
|
|
9460
9479
|
var import_react68 = require("react");
|
|
9461
9480
|
|
|
9462
9481
|
// src/api/updateMeProfile.ts
|
|
9463
|
-
var
|
|
9464
|
-
var httpClient5 =
|
|
9482
|
+
var import_browser60 = require("@asgardeo/browser");
|
|
9483
|
+
var httpClient5 = import_browser60.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser60.AsgardeoSPAClient.getInstance());
|
|
9465
9484
|
var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
9466
9485
|
const defaultFetcher = async (url, config) => {
|
|
9467
9486
|
const response = await httpClient5({
|
|
@@ -9478,7 +9497,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
|
9478
9497
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
9479
9498
|
};
|
|
9480
9499
|
};
|
|
9481
|
-
return (0,
|
|
9500
|
+
return (0, import_browser60.updateMeProfile)({
|
|
9482
9501
|
...requestConfig,
|
|
9483
9502
|
fetcher: fetcher || defaultFetcher
|
|
9484
9503
|
});
|
|
@@ -9486,7 +9505,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
|
9486
9505
|
var updateMeProfile_default = updateMeProfile;
|
|
9487
9506
|
|
|
9488
9507
|
// src/components/presentation/UserProfile/UserProfile.tsx
|
|
9489
|
-
var
|
|
9508
|
+
var import_browser61 = require("@asgardeo/browser");
|
|
9490
9509
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
9491
9510
|
var UserProfile3 = ({ ...rest }) => {
|
|
9492
9511
|
const { baseUrl, isLoading } = useAsgardeo_default();
|
|
@@ -9500,7 +9519,7 @@ var UserProfile3 = ({ ...rest }) => {
|
|
|
9500
9519
|
onUpdateProfile(response);
|
|
9501
9520
|
} catch (error2) {
|
|
9502
9521
|
let message = t("user.profile.update.generic.error");
|
|
9503
|
-
if (error2 instanceof
|
|
9522
|
+
if (error2 instanceof import_browser61.AsgardeoError) {
|
|
9504
9523
|
message = error2?.message;
|
|
9505
9524
|
}
|
|
9506
9525
|
setError(message);
|
|
@@ -9521,7 +9540,7 @@ var UserProfile3 = ({ ...rest }) => {
|
|
|
9521
9540
|
var UserProfile_default = UserProfile3;
|
|
9522
9541
|
|
|
9523
9542
|
// src/components/presentation/UserDropdown/BaseUserDropdown.tsx
|
|
9524
|
-
var
|
|
9543
|
+
var import_browser62 = require("@asgardeo/browser");
|
|
9525
9544
|
var import_react70 = require("@floating-ui/react");
|
|
9526
9545
|
var import_css47 = require("@emotion/css");
|
|
9527
9546
|
var import_react71 = require("react");
|
|
@@ -9787,12 +9806,12 @@ var BaseUserDropdown = ({
|
|
|
9787
9806
|
}
|
|
9788
9807
|
allMenuItems.push(...defaultMenuItems);
|
|
9789
9808
|
}
|
|
9790
|
-
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0,
|
|
9809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
|
|
9791
9810
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
9792
9811
|
Button_default,
|
|
9793
9812
|
{
|
|
9794
9813
|
ref: refs.setReference,
|
|
9795
|
-
className: (0, import_css47.cx)((0,
|
|
9814
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
|
|
9796
9815
|
color: "tertiary",
|
|
9797
9816
|
variant: "text",
|
|
9798
9817
|
size: "medium",
|
|
@@ -9811,7 +9830,7 @@ var BaseUserDropdown = ({
|
|
|
9811
9830
|
Typography_default,
|
|
9812
9831
|
{
|
|
9813
9832
|
variant: "body2",
|
|
9814
|
-
className: (0, import_css47.cx)((0,
|
|
9833
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
|
|
9815
9834
|
children: getDisplayName()
|
|
9816
9835
|
}
|
|
9817
9836
|
)
|
|
@@ -9822,11 +9841,11 @@ var BaseUserDropdown = ({
|
|
|
9822
9841
|
"div",
|
|
9823
9842
|
{
|
|
9824
9843
|
ref: refs.setFloating,
|
|
9825
|
-
className: (0, import_css47.cx)((0,
|
|
9844
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
|
|
9826
9845
|
style: floatingStyles,
|
|
9827
9846
|
...getFloatingProps(),
|
|
9828
9847
|
children: [
|
|
9829
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0,
|
|
9848
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header"), styles.dropdownHeader), children: [
|
|
9830
9849
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
9831
9850
|
Avatar,
|
|
9832
9851
|
{
|
|
@@ -9836,12 +9855,12 @@ var BaseUserDropdown = ({
|
|
|
9836
9855
|
alt: `${getDisplayName()}'s avatar`
|
|
9837
9856
|
}
|
|
9838
9857
|
),
|
|
9839
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0,
|
|
9858
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles.headerInfo), children: [
|
|
9840
9859
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
9841
9860
|
Typography_default,
|
|
9842
9861
|
{
|
|
9843
9862
|
noWrap: true,
|
|
9844
|
-
className: (0,
|
|
9863
|
+
className: (0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header-name"),
|
|
9845
9864
|
variant: "body1",
|
|
9846
9865
|
fontWeight: "medium",
|
|
9847
9866
|
children: getDisplayName()
|
|
@@ -9851,7 +9870,7 @@ var BaseUserDropdown = ({
|
|
|
9851
9870
|
Typography_default,
|
|
9852
9871
|
{
|
|
9853
9872
|
noWrap: true,
|
|
9854
|
-
className: (0,
|
|
9873
|
+
className: (0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header-email"),
|
|
9855
9874
|
variant: "caption",
|
|
9856
9875
|
color: "secondary",
|
|
9857
9876
|
children: getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user)
|
|
@@ -9859,14 +9878,14 @@ var BaseUserDropdown = ({
|
|
|
9859
9878
|
)
|
|
9860
9879
|
] })
|
|
9861
9880
|
] }),
|
|
9862
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: (0, import_css47.cx)((0,
|
|
9881
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu"), styles.dropdownMenu), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: item.label === "" ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles.divider) }) : item.href ? /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
9863
9882
|
"a",
|
|
9864
9883
|
{
|
|
9865
9884
|
href: item.href,
|
|
9866
9885
|
style: {
|
|
9867
9886
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
9868
9887
|
},
|
|
9869
|
-
className: (0, import_css47.cx)((0,
|
|
9888
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
|
|
9870
9889
|
onMouseEnter: () => setHoveredItemIndex(index),
|
|
9871
9890
|
onMouseLeave: () => setHoveredItemIndex(null),
|
|
9872
9891
|
onFocus: () => setHoveredItemIndex(index),
|
|
@@ -9883,7 +9902,7 @@ var BaseUserDropdown = ({
|
|
|
9883
9902
|
style: {
|
|
9884
9903
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
9885
9904
|
},
|
|
9886
|
-
className: (0, import_css47.cx)((0,
|
|
9905
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
|
|
9887
9906
|
color: "tertiary",
|
|
9888
9907
|
variant: "text",
|
|
9889
9908
|
size: "small",
|
|
@@ -10785,8 +10804,8 @@ var BaseCreateOrganization = ({
|
|
|
10785
10804
|
};
|
|
10786
10805
|
|
|
10787
10806
|
// src/api/createOrganization.ts
|
|
10788
|
-
var
|
|
10789
|
-
var httpClient6 =
|
|
10807
|
+
var import_browser63 = require("@asgardeo/browser");
|
|
10808
|
+
var httpClient6 = import_browser63.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser63.AsgardeoSPAClient.getInstance());
|
|
10790
10809
|
var createOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
10791
10810
|
const defaultFetcher = async (url, config) => {
|
|
10792
10811
|
const response = await httpClient6({
|
|
@@ -10803,7 +10822,7 @@ var createOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
10803
10822
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
10804
10823
|
};
|
|
10805
10824
|
};
|
|
10806
|
-
return (0,
|
|
10825
|
+
return (0, import_browser63.createOrganization)({
|
|
10807
10826
|
...requestConfig,
|
|
10808
10827
|
fetcher: fetcher || defaultFetcher
|
|
10809
10828
|
});
|
|
@@ -10878,12 +10897,12 @@ var CreateOrganization = ({
|
|
|
10878
10897
|
var import_react83 = require("react");
|
|
10879
10898
|
|
|
10880
10899
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
|
|
10881
|
-
var
|
|
10900
|
+
var import_browser65 = require("@asgardeo/browser");
|
|
10882
10901
|
var import_css55 = require("@emotion/css");
|
|
10883
10902
|
var import_react82 = require("react");
|
|
10884
10903
|
|
|
10885
10904
|
// src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
10886
|
-
var
|
|
10905
|
+
var import_browser64 = require("@asgardeo/browser");
|
|
10887
10906
|
var import_css53 = require("@emotion/css");
|
|
10888
10907
|
var import_react80 = require("react");
|
|
10889
10908
|
|
|
@@ -11118,27 +11137,27 @@ var KeyValueInput = ({
|
|
|
11118
11137
|
);
|
|
11119
11138
|
const canAddMore = !maxPairs || pairs.length < maxPairs;
|
|
11120
11139
|
const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
|
|
11121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11122
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("label", { className: (0, import_css53.cx)((0,
|
|
11140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input")), styles.container, className), children: [
|
|
11141
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("label", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "label")), styles.label), children: [
|
|
11123
11142
|
label,
|
|
11124
11143
|
required && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11125
11144
|
"span",
|
|
11126
11145
|
{
|
|
11127
|
-
className: (0, import_css53.cx)((0,
|
|
11146
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "required")), styles.requiredIndicator),
|
|
11128
11147
|
children: " *"
|
|
11129
11148
|
}
|
|
11130
11149
|
)
|
|
11131
11150
|
] }),
|
|
11132
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11133
|
-
pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: (0, import_css53.cx)((0,
|
|
11151
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pairs-list")), styles.pairsList), children: [
|
|
11152
|
+
pairs.length === 0 && readOnly ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "empty-state")), styles.emptyState), children: "No attributes defined" }) : readOnly ? pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
11134
11153
|
"div",
|
|
11135
11154
|
{
|
|
11136
|
-
className: (0, import_css53.cx)((0,
|
|
11155
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "readonly-pair")), styles.readOnlyPair),
|
|
11137
11156
|
children: [
|
|
11138
11157
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
11139
11158
|
"span",
|
|
11140
11159
|
{
|
|
11141
|
-
className: (0, import_css53.cx)((0,
|
|
11160
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "readonly-key")), styles.readOnlyKey),
|
|
11142
11161
|
children: [
|
|
11143
11162
|
pair.key,
|
|
11144
11163
|
":"
|
|
@@ -11148,7 +11167,7 @@ var KeyValueInput = ({
|
|
|
11148
11167
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11149
11168
|
"span",
|
|
11150
11169
|
{
|
|
11151
|
-
className: (0, import_css53.cx)((0,
|
|
11170
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "readonly-value")), styles.readOnlyValue),
|
|
11152
11171
|
children: pair.value
|
|
11153
11172
|
}
|
|
11154
11173
|
)
|
|
@@ -11158,7 +11177,7 @@ var KeyValueInput = ({
|
|
|
11158
11177
|
)) : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
11159
11178
|
"div",
|
|
11160
11179
|
{
|
|
11161
|
-
className: (0, import_css53.cx)((0,
|
|
11180
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pair-row")), styles.pairRow),
|
|
11162
11181
|
children: [
|
|
11163
11182
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11164
11183
|
TextField_default,
|
|
@@ -11167,7 +11186,7 @@ var KeyValueInput = ({
|
|
|
11167
11186
|
value: pair.key,
|
|
11168
11187
|
onChange: (e) => handleUpdatePair(index, "key", e.target.value),
|
|
11169
11188
|
disabled: disabled || readOnly,
|
|
11170
|
-
className: (0, import_css53.cx)((0,
|
|
11189
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pair-input")), styles.pairInput),
|
|
11171
11190
|
"aria-label": `${keyLabel} ${index + 1}`
|
|
11172
11191
|
}
|
|
11173
11192
|
),
|
|
@@ -11178,7 +11197,7 @@ var KeyValueInput = ({
|
|
|
11178
11197
|
value: pair.value,
|
|
11179
11198
|
onChange: (e) => handleUpdatePair(index, "value", e.target.value),
|
|
11180
11199
|
disabled: disabled || readOnly,
|
|
11181
|
-
className: (0, import_css53.cx)((0,
|
|
11200
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pair-input")), styles.pairInput),
|
|
11182
11201
|
"aria-label": `${valueLabel} ${index + 1}`
|
|
11183
11202
|
}
|
|
11184
11203
|
),
|
|
@@ -11188,7 +11207,7 @@ var KeyValueInput = ({
|
|
|
11188
11207
|
type: "button",
|
|
11189
11208
|
onClick: () => handleRemovePair(index),
|
|
11190
11209
|
disabled,
|
|
11191
|
-
className: (0, import_css53.cx)((0,
|
|
11210
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "remove-button")), styles.removeButton),
|
|
11192
11211
|
"aria-label": `${removeButtonText} ${pair.key}`,
|
|
11193
11212
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(X_default, { width: 16, height: 16 })
|
|
11194
11213
|
}
|
|
@@ -11197,7 +11216,7 @@ var KeyValueInput = ({
|
|
|
11197
11216
|
},
|
|
11198
11217
|
`${pair.key}-${index}`
|
|
11199
11218
|
)),
|
|
11200
|
-
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11219
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "add-row")), styles.addRow), children: [
|
|
11201
11220
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11202
11221
|
TextField_default,
|
|
11203
11222
|
{
|
|
@@ -11205,7 +11224,7 @@ var KeyValueInput = ({
|
|
|
11205
11224
|
value: newKey,
|
|
11206
11225
|
onChange: (e) => setNewKey(e.target.value),
|
|
11207
11226
|
disabled,
|
|
11208
|
-
className: (0, import_css53.cx)((0,
|
|
11227
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pair-input")), styles.pairInput),
|
|
11209
11228
|
"aria-label": "New key"
|
|
11210
11229
|
}
|
|
11211
11230
|
),
|
|
@@ -11216,7 +11235,7 @@ var KeyValueInput = ({
|
|
|
11216
11235
|
value: newValue,
|
|
11217
11236
|
onChange: (e) => setNewValue(e.target.value),
|
|
11218
11237
|
disabled,
|
|
11219
|
-
className: (0, import_css53.cx)((0,
|
|
11238
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "pair-input")), styles.pairInput),
|
|
11220
11239
|
"aria-label": "New value",
|
|
11221
11240
|
onKeyPress: (e) => {
|
|
11222
11241
|
if (e.key === "Enter" && !isAddDisabled) {
|
|
@@ -11231,15 +11250,15 @@ var KeyValueInput = ({
|
|
|
11231
11250
|
type: "button",
|
|
11232
11251
|
onClick: handleAddPair,
|
|
11233
11252
|
disabled: isAddDisabled,
|
|
11234
|
-
className: (0, import_css53.cx)((0,
|
|
11253
|
+
className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "add-button")), styles.addButton),
|
|
11235
11254
|
"aria-label": "Add new key-value pair",
|
|
11236
11255
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Plus_default, { width: 16, height: 16 })
|
|
11237
11256
|
}
|
|
11238
11257
|
)
|
|
11239
11258
|
] })
|
|
11240
11259
|
] }),
|
|
11241
|
-
(helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: (0, import_css53.cx)((0,
|
|
11242
|
-
maxPairs && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11260
|
+
(helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "helper-text")), styles.helperText), children: error || helperText }),
|
|
11261
|
+
maxPairs && /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0, import_browser64.withVendorCSSClassPrefix)((0, import_browser64.bem)("key-value-input", "counter")), styles.counterText), children: [
|
|
11243
11262
|
pairs.length,
|
|
11244
11263
|
" of ",
|
|
11245
11264
|
maxPairs,
|
|
@@ -11443,13 +11462,13 @@ var BaseOrganizationProfile = ({
|
|
|
11443
11462
|
key: "created",
|
|
11444
11463
|
label: "Created Date",
|
|
11445
11464
|
editable: false,
|
|
11446
|
-
render: (value) => (0,
|
|
11465
|
+
render: (value) => (0, import_browser65.formatDate)(value)
|
|
11447
11466
|
},
|
|
11448
11467
|
{
|
|
11449
11468
|
key: "lastModified",
|
|
11450
11469
|
label: "Last Modified Date",
|
|
11451
11470
|
editable: false,
|
|
11452
|
-
render: (value) => (0,
|
|
11471
|
+
render: (value) => (0, import_browser65.formatDate)(value)
|
|
11453
11472
|
}
|
|
11454
11473
|
]
|
|
11455
11474
|
}) => {
|
|
@@ -11686,8 +11705,8 @@ var BaseOrganizationProfile = ({
|
|
|
11686
11705
|
var BaseOrganizationProfile_default = BaseOrganizationProfile;
|
|
11687
11706
|
|
|
11688
11707
|
// src/api/getOrganization.ts
|
|
11689
|
-
var
|
|
11690
|
-
var httpClient7 =
|
|
11708
|
+
var import_browser66 = require("@asgardeo/browser");
|
|
11709
|
+
var httpClient7 = import_browser66.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser66.AsgardeoSPAClient.getInstance());
|
|
11691
11710
|
var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
11692
11711
|
const defaultFetcher = async (url, config) => {
|
|
11693
11712
|
const response = await httpClient7({
|
|
@@ -11703,7 +11722,7 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
11703
11722
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
11704
11723
|
};
|
|
11705
11724
|
};
|
|
11706
|
-
return (0,
|
|
11725
|
+
return (0, import_browser66.getOrganization)({
|
|
11707
11726
|
...requestConfig,
|
|
11708
11727
|
fetcher: fetcher || defaultFetcher
|
|
11709
11728
|
});
|
|
@@ -11711,8 +11730,8 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
11711
11730
|
var getOrganization_default = getOrganization;
|
|
11712
11731
|
|
|
11713
11732
|
// src/api/updateOrganization.ts
|
|
11714
|
-
var
|
|
11715
|
-
var httpClient8 =
|
|
11733
|
+
var import_browser67 = require("@asgardeo/browser");
|
|
11734
|
+
var httpClient8 = import_browser67.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser67.AsgardeoSPAClient.getInstance());
|
|
11716
11735
|
var updateOrganization = async ({
|
|
11717
11736
|
fetcher,
|
|
11718
11737
|
...requestConfig
|
|
@@ -11732,7 +11751,7 @@ var updateOrganization = async ({
|
|
|
11732
11751
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
11733
11752
|
};
|
|
11734
11753
|
};
|
|
11735
|
-
return (0,
|
|
11754
|
+
return (0, import_browser67.updateOrganization)({
|
|
11736
11755
|
...requestConfig,
|
|
11737
11756
|
fetcher: fetcher || defaultFetcher
|
|
11738
11757
|
});
|
|
@@ -11785,7 +11804,7 @@ var OrganizationProfile = ({
|
|
|
11785
11804
|
const handleOrganizationUpdate = async (payload) => {
|
|
11786
11805
|
if (!baseUrl || !organizationId) return;
|
|
11787
11806
|
try {
|
|
11788
|
-
const operations = (0,
|
|
11807
|
+
const operations = (0, import_browser67.createPatchOperations)(payload);
|
|
11789
11808
|
await updateOrganization_default({
|
|
11790
11809
|
baseUrl,
|
|
11791
11810
|
organizationId,
|
|
@@ -12441,5 +12460,5 @@ var OrganizationSwitcher = ({
|
|
|
12441
12460
|
var OrganizationSwitcher_default = OrganizationSwitcher;
|
|
12442
12461
|
|
|
12443
12462
|
// src/index.ts
|
|
12444
|
-
var
|
|
12463
|
+
var import_browser68 = require("@asgardeo/browser");
|
|
12445
12464
|
//# sourceMappingURL=index.js.map
|