@asgardeo/react 0.5.25 → 0.5.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +337 -337
- package/dist/cjs/index.js.map +2 -2
- package/dist/contexts/I18n/I18nContext.d.ts +1 -1
- package/dist/index.js +3 -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
|
|
@@ -1013,8 +1013,8 @@ var FlowProvider_default = FlowProvider;
|
|
|
1013
1013
|
|
|
1014
1014
|
// src/contexts/I18n/I18nProvider.tsx
|
|
1015
1015
|
var import_react5 = require("react");
|
|
1016
|
+
var import_i18n = require("@asgardeo/i18n");
|
|
1016
1017
|
var import_browser8 = require("@asgardeo/browser");
|
|
1017
|
-
var import_browser9 = require("@asgardeo/browser");
|
|
1018
1018
|
|
|
1019
1019
|
// src/contexts/I18n/I18nContext.ts
|
|
1020
1020
|
var import_react4 = require("react");
|
|
@@ -1054,7 +1054,7 @@ var I18nProvider = ({
|
|
|
1054
1054
|
children,
|
|
1055
1055
|
preferences
|
|
1056
1056
|
}) => {
|
|
1057
|
-
const defaultBundles = (0,
|
|
1057
|
+
const defaultBundles = (0, import_i18n.getDefaultI18nBundles)();
|
|
1058
1058
|
const determineInitialLanguage = () => {
|
|
1059
1059
|
const configLanguage = preferences?.language;
|
|
1060
1060
|
const storedLanguage = getStoredLanguage();
|
|
@@ -1140,7 +1140,7 @@ var I18nProvider = ({
|
|
|
1140
1140
|
var I18nProvider_default = I18nProvider;
|
|
1141
1141
|
|
|
1142
1142
|
// src/contexts/Organization/OrganizationProvider.tsx
|
|
1143
|
-
var
|
|
1143
|
+
var import_browser9 = require("@asgardeo/browser");
|
|
1144
1144
|
var import_react7 = require("react");
|
|
1145
1145
|
|
|
1146
1146
|
// src/contexts/Organization/OrganizationContext.ts
|
|
@@ -1178,7 +1178,7 @@ var OrganizationProvider = ({
|
|
|
1178
1178
|
const switchOrganization = (0, import_react7.useCallback)(
|
|
1179
1179
|
async (organization) => {
|
|
1180
1180
|
if (!onOrganizationSwitch) {
|
|
1181
|
-
throw new
|
|
1181
|
+
throw new import_browser9.AsgardeoRuntimeError(
|
|
1182
1182
|
"onOrganizationSwitch callback is required",
|
|
1183
1183
|
"OrganizationProvider-SwitchError-001",
|
|
1184
1184
|
"react",
|
|
@@ -1230,7 +1230,7 @@ var OrganizationProvider_default = OrganizationProvider;
|
|
|
1230
1230
|
|
|
1231
1231
|
// src/contexts/Theme/ThemeProvider.tsx
|
|
1232
1232
|
var import_react11 = require("react");
|
|
1233
|
-
var
|
|
1233
|
+
var import_browser10 = require("@asgardeo/browser");
|
|
1234
1234
|
|
|
1235
1235
|
// src/contexts/Theme/ThemeContext.ts
|
|
1236
1236
|
var import_react8 = require("react");
|
|
@@ -1267,7 +1267,7 @@ var applyThemeToDOM = (theme) => {
|
|
|
1267
1267
|
var ThemeProvider = ({
|
|
1268
1268
|
children,
|
|
1269
1269
|
theme: themeConfig,
|
|
1270
|
-
mode =
|
|
1270
|
+
mode = import_browser10.DEFAULT_THEME,
|
|
1271
1271
|
detection = {},
|
|
1272
1272
|
inheritFromBranding = true
|
|
1273
1273
|
}) => {
|
|
@@ -1276,9 +1276,9 @@ var ThemeProvider = ({
|
|
|
1276
1276
|
return mode;
|
|
1277
1277
|
}
|
|
1278
1278
|
if (mode === "branding") {
|
|
1279
|
-
return (0,
|
|
1279
|
+
return (0, import_browser10.detectThemeMode)("system", detection);
|
|
1280
1280
|
}
|
|
1281
|
-
return (0,
|
|
1281
|
+
return (0, import_browser10.detectThemeMode)(mode, detection);
|
|
1282
1282
|
});
|
|
1283
1283
|
let brandingTheme = null;
|
|
1284
1284
|
let brandingActiveTheme = null;
|
|
@@ -1347,7 +1347,7 @@ var ThemeProvider = ({
|
|
|
1347
1347
|
}
|
|
1348
1348
|
};
|
|
1349
1349
|
}, [inheritFromBranding, brandingTheme, themeConfig]);
|
|
1350
|
-
const theme = (0, import_react11.useMemo)(() => (0,
|
|
1350
|
+
const theme = (0, import_react11.useMemo)(() => (0, import_browser10.createTheme)(finalThemeConfig, colorScheme === "dark"), [finalThemeConfig, colorScheme]);
|
|
1351
1351
|
const handleThemeChange = (0, import_react11.useCallback)((isDark) => {
|
|
1352
1352
|
setColorScheme(isDark ? "dark" : "light");
|
|
1353
1353
|
}, []);
|
|
@@ -1363,11 +1363,11 @@ var ThemeProvider = ({
|
|
|
1363
1363
|
if (mode === "class") {
|
|
1364
1364
|
const targetElement = detection.targetElement || document.documentElement;
|
|
1365
1365
|
if (targetElement) {
|
|
1366
|
-
observer = (0,
|
|
1366
|
+
observer = (0, import_browser10.createClassObserver)(targetElement, handleThemeChange, detection);
|
|
1367
1367
|
}
|
|
1368
1368
|
} else if (mode === "system") {
|
|
1369
1369
|
if (!inheritFromBranding || !brandingActiveTheme) {
|
|
1370
|
-
mediaQuery = (0,
|
|
1370
|
+
mediaQuery = (0, import_browser10.createMediaQueryListener)(handleThemeChange);
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
return () => {
|
|
@@ -1400,7 +1400,7 @@ var ThemeProvider_default = ThemeProvider;
|
|
|
1400
1400
|
|
|
1401
1401
|
// src/contexts/Branding/BrandingProvider.tsx
|
|
1402
1402
|
var import_react12 = require("react");
|
|
1403
|
-
var
|
|
1403
|
+
var import_browser11 = require("@asgardeo/browser");
|
|
1404
1404
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1405
1405
|
var BrandingProvider = ({
|
|
1406
1406
|
children,
|
|
@@ -1428,7 +1428,7 @@ var BrandingProvider = ({
|
|
|
1428
1428
|
}
|
|
1429
1429
|
}
|
|
1430
1430
|
setActiveTheme(extractedActiveTheme);
|
|
1431
|
-
const transformedTheme = (0,
|
|
1431
|
+
const transformedTheme = (0, import_browser11.transformBrandingPreferenceToTheme)(externalBrandingPreference, forceTheme);
|
|
1432
1432
|
setTheme(transformedTheme);
|
|
1433
1433
|
}, [externalBrandingPreference, forceTheme, enabled]);
|
|
1434
1434
|
(0, import_react12.useEffect)(() => {
|
|
@@ -1676,7 +1676,7 @@ var AsgardeoProvider = ({
|
|
|
1676
1676
|
locale: preferences?.i18n?.language
|
|
1677
1677
|
// Add other branding config options as needed
|
|
1678
1678
|
};
|
|
1679
|
-
const brandingData = await (0,
|
|
1679
|
+
const brandingData = await (0, import_browser12.getBrandingPreference)(getBrandingConfig);
|
|
1680
1680
|
setBrandingPreference(brandingData);
|
|
1681
1681
|
setHasFetchedBranding(true);
|
|
1682
1682
|
} catch (err) {
|
|
@@ -1731,7 +1731,7 @@ var AsgardeoProvider = ({
|
|
|
1731
1731
|
}
|
|
1732
1732
|
return response;
|
|
1733
1733
|
} catch (error) {
|
|
1734
|
-
throw new
|
|
1734
|
+
throw new import_browser12.AsgardeoRuntimeError(
|
|
1735
1735
|
`Error while signing in silently: ${error.message || error}`,
|
|
1736
1736
|
"asgardeo-signInSilently-Error",
|
|
1737
1737
|
"react",
|
|
@@ -1751,7 +1751,7 @@ var AsgardeoProvider = ({
|
|
|
1751
1751
|
await updateSession();
|
|
1752
1752
|
}
|
|
1753
1753
|
} catch (error) {
|
|
1754
|
-
throw new
|
|
1754
|
+
throw new import_browser12.AsgardeoRuntimeError(
|
|
1755
1755
|
`Failed to switch organization: ${error.message || error}`,
|
|
1756
1756
|
"asgardeo-switchOrganization-Error",
|
|
1757
1757
|
"react",
|
|
@@ -1767,7 +1767,7 @@ var AsgardeoProvider = ({
|
|
|
1767
1767
|
setUserProfile((prev) => ({
|
|
1768
1768
|
...prev,
|
|
1769
1769
|
profile: payload,
|
|
1770
|
-
flattenedProfile: (0,
|
|
1770
|
+
flattenedProfile: (0, import_browser12.generateFlattenedUserProfile)(payload, prev?.schemas)
|
|
1771
1771
|
}));
|
|
1772
1772
|
};
|
|
1773
1773
|
const value = (0, import_react15.useMemo)(
|
|
@@ -1830,7 +1830,7 @@ var AsgardeoProvider = ({
|
|
|
1830
1830
|
{
|
|
1831
1831
|
inheritFromBranding: preferences?.theme?.inheritFromBranding,
|
|
1832
1832
|
theme: preferences?.theme?.overrides,
|
|
1833
|
-
mode: (0,
|
|
1833
|
+
mode: (0, import_browser12.getActiveTheme)(preferences?.theme?.mode),
|
|
1834
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)(
|
|
1835
1835
|
OrganizationProvider_default,
|
|
1836
1836
|
{
|
|
@@ -1919,7 +1919,7 @@ var useTheme_default = useTheme;
|
|
|
1919
1919
|
|
|
1920
1920
|
// src/hooks/useTranslation.ts
|
|
1921
1921
|
var import_react22 = require("react");
|
|
1922
|
-
var
|
|
1922
|
+
var import_browser13 = require("@asgardeo/browser");
|
|
1923
1923
|
var useTranslation = (componentPreferences) => {
|
|
1924
1924
|
const context = (0, import_react22.useContext)(I18nContext_default);
|
|
1925
1925
|
if (!context) {
|
|
@@ -1940,7 +1940,7 @@ var useTranslation = (componentPreferences) => {
|
|
|
1940
1940
|
if (merged[key]) {
|
|
1941
1941
|
merged[key] = {
|
|
1942
1942
|
...merged[key],
|
|
1943
|
-
translations: (0,
|
|
1943
|
+
translations: (0, import_browser13.deepMerge)(merged[key].translations, componentBundle.translations),
|
|
1944
1944
|
metadata: componentBundle.metadata ? { ...merged[key].metadata, ...componentBundle.metadata } : merged[key].metadata
|
|
1945
1945
|
};
|
|
1946
1946
|
} else {
|
|
@@ -2201,17 +2201,17 @@ var useBranding = (config = {}) => {
|
|
|
2201
2201
|
var useBranding_default = useBranding;
|
|
2202
2202
|
|
|
2203
2203
|
// src/components/actions/SignInButton/BaseSignInButton.tsx
|
|
2204
|
-
var
|
|
2204
|
+
var import_browser16 = require("@asgardeo/browser");
|
|
2205
2205
|
var import_css5 = require("@emotion/css");
|
|
2206
2206
|
var import_react27 = require("react");
|
|
2207
2207
|
|
|
2208
2208
|
// src/components/primitives/Button/Button.tsx
|
|
2209
2209
|
var import_react26 = require("react");
|
|
2210
|
-
var
|
|
2210
|
+
var import_browser15 = require("@asgardeo/browser");
|
|
2211
2211
|
var import_css4 = require("@emotion/css");
|
|
2212
2212
|
|
|
2213
2213
|
// src/components/primitives/Spinner/Spinner.tsx
|
|
2214
|
-
var
|
|
2214
|
+
var import_browser14 = require("@asgardeo/browser");
|
|
2215
2215
|
var import_css2 = require("@emotion/css");
|
|
2216
2216
|
|
|
2217
2217
|
// src/components/primitives/Spinner/Spinner.styles.ts
|
|
@@ -2271,7 +2271,7 @@ var Spinner = ({ size = "medium", color, className, style }) => {
|
|
|
2271
2271
|
const { theme, colorScheme } = useTheme_default();
|
|
2272
2272
|
const styles = Spinner_styles_default(theme, colorScheme, size, color);
|
|
2273
2273
|
const spinnerClassName = (0, import_css2.cx)(
|
|
2274
|
-
(0,
|
|
2274
|
+
(0, import_browser14.withVendorCSSClassPrefix)((0, import_browser14.bem)("spinner")),
|
|
2275
2275
|
styles.spinner,
|
|
2276
2276
|
size === "small" && styles.spinnerSmall,
|
|
2277
2277
|
size === "medium" && styles.spinnerMedium,
|
|
@@ -2625,14 +2625,14 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2625
2625
|
ref,
|
|
2626
2626
|
style,
|
|
2627
2627
|
className: (0, import_css4.cx)(
|
|
2628
|
-
(0,
|
|
2629
|
-
(0,
|
|
2630
|
-
(0,
|
|
2631
|
-
(0,
|
|
2632
|
-
(0,
|
|
2633
|
-
fullWidth ? (0,
|
|
2634
|
-
loading ? (0,
|
|
2635
|
-
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,
|
|
2636
2636
|
styles.button,
|
|
2637
2637
|
styles.size,
|
|
2638
2638
|
styles.variant,
|
|
@@ -2644,7 +2644,7 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2644
2644
|
disabled: disabled || loading,
|
|
2645
2645
|
...rest,
|
|
2646
2646
|
children: [
|
|
2647
|
-
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)(
|
|
2648
2648
|
Spinner_default,
|
|
2649
2649
|
{
|
|
2650
2650
|
size,
|
|
@@ -2655,10 +2655,10 @@ var Button = (0, import_react26.forwardRef)(
|
|
|
2655
2655
|
}
|
|
2656
2656
|
}
|
|
2657
2657
|
) }),
|
|
2658
|
-
!loading && isIconVariant && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2659
|
-
!loading && !isIconVariant && startIcon && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2660
|
-
!isIconVariant && children && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_css4.cx)((0,
|
|
2661
|
-
!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 })
|
|
2662
2662
|
]
|
|
2663
2663
|
}
|
|
2664
2664
|
);
|
|
@@ -2678,7 +2678,7 @@ var BaseSignInButton = (0, import_react27.forwardRef)(
|
|
|
2678
2678
|
Button_default,
|
|
2679
2679
|
{
|
|
2680
2680
|
ref,
|
|
2681
|
-
className: (0, import_css5.cx)((0,
|
|
2681
|
+
className: (0, import_css5.cx)((0, import_browser16.withVendorCSSClassPrefix)("sign-in-button"), className),
|
|
2682
2682
|
style,
|
|
2683
2683
|
disabled: isLoading,
|
|
2684
2684
|
loading: isLoading,
|
|
@@ -2693,7 +2693,7 @@ BaseSignInButton.displayName = "BaseSignInButton";
|
|
|
2693
2693
|
var BaseSignInButton_default = BaseSignInButton;
|
|
2694
2694
|
|
|
2695
2695
|
// src/components/actions/SignInButton/SignInButton.tsx
|
|
2696
|
-
var
|
|
2696
|
+
var import_browser17 = require("@asgardeo/browser");
|
|
2697
2697
|
var import_react28 = require("react");
|
|
2698
2698
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2699
2699
|
var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferences, signInOptions: overriddenSignInOptions = {}, ...rest }, ref) => {
|
|
@@ -2704,7 +2704,7 @@ var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferen
|
|
|
2704
2704
|
try {
|
|
2705
2705
|
setIsLoading(true);
|
|
2706
2706
|
if (signInUrl) {
|
|
2707
|
-
(0,
|
|
2707
|
+
(0, import_browser17.navigate)(signInUrl);
|
|
2708
2708
|
} else {
|
|
2709
2709
|
await signIn(overriddenSignInOptions ?? signInOptions);
|
|
2710
2710
|
}
|
|
@@ -2712,7 +2712,7 @@ var SignInButton = (0, import_react28.forwardRef)(({ children, onClick, preferen
|
|
|
2712
2712
|
onClick(e);
|
|
2713
2713
|
}
|
|
2714
2714
|
} catch (error) {
|
|
2715
|
-
throw new
|
|
2715
|
+
throw new import_browser17.AsgardeoRuntimeError(
|
|
2716
2716
|
`Sign in failed: ${error instanceof Error ? error.message : String(JSON.stringify(error))}`,
|
|
2717
2717
|
"SignInButton-handleSignIn-RuntimeError-001",
|
|
2718
2718
|
"react",
|
|
@@ -2739,7 +2739,7 @@ SignInButton.displayName = "SignInButton";
|
|
|
2739
2739
|
var SignInButton_default = SignInButton;
|
|
2740
2740
|
|
|
2741
2741
|
// src/components/actions/SignOutButton/BaseSignOutButton.tsx
|
|
2742
|
-
var
|
|
2742
|
+
var import_browser18 = require("@asgardeo/browser");
|
|
2743
2743
|
var import_css6 = require("@emotion/css");
|
|
2744
2744
|
var import_react29 = require("react");
|
|
2745
2745
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
@@ -2752,7 +2752,7 @@ var BaseSignOutButton = (0, import_react29.forwardRef)(
|
|
|
2752
2752
|
Button_default,
|
|
2753
2753
|
{
|
|
2754
2754
|
ref,
|
|
2755
|
-
className: (0, import_css6.cx)((0,
|
|
2755
|
+
className: (0, import_css6.cx)((0, import_browser18.withVendorCSSClassPrefix)("sign-out-button"), className),
|
|
2756
2756
|
style,
|
|
2757
2757
|
disabled: isLoading,
|
|
2758
2758
|
loading: isLoading,
|
|
@@ -2767,7 +2767,7 @@ BaseSignOutButton.displayName = "BaseSignOutButton";
|
|
|
2767
2767
|
var BaseSignOutButton_default = BaseSignOutButton;
|
|
2768
2768
|
|
|
2769
2769
|
// src/components/actions/SignOutButton/SignOutButton.tsx
|
|
2770
|
-
var
|
|
2770
|
+
var import_browser19 = require("@asgardeo/browser");
|
|
2771
2771
|
var import_react30 = require("react");
|
|
2772
2772
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
2773
2773
|
var SignOutButton = (0, import_react30.forwardRef)(({ children, onClick, preferences, ...rest }, ref) => {
|
|
@@ -2782,7 +2782,7 @@ var SignOutButton = (0, import_react30.forwardRef)(({ children, onClick, prefere
|
|
|
2782
2782
|
onClick(e);
|
|
2783
2783
|
}
|
|
2784
2784
|
} catch (error) {
|
|
2785
|
-
throw new
|
|
2785
|
+
throw new import_browser19.AsgardeoRuntimeError(
|
|
2786
2786
|
`Sign out failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
2787
2787
|
"SignOutButton-handleSignOut-RuntimeError-001",
|
|
2788
2788
|
"react",
|
|
@@ -2809,7 +2809,7 @@ SignOutButton.displayName = "SignOutButton";
|
|
|
2809
2809
|
var SignOutButton_default = SignOutButton;
|
|
2810
2810
|
|
|
2811
2811
|
// src/components/actions/SignUpButton/BaseSignUpButton.tsx
|
|
2812
|
-
var
|
|
2812
|
+
var import_browser20 = require("@asgardeo/browser");
|
|
2813
2813
|
var import_css7 = require("@emotion/css");
|
|
2814
2814
|
var import_react31 = require("react");
|
|
2815
2815
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
@@ -2822,7 +2822,7 @@ var BaseSignUpButton = (0, import_react31.forwardRef)(
|
|
|
2822
2822
|
Button_default,
|
|
2823
2823
|
{
|
|
2824
2824
|
ref,
|
|
2825
|
-
className: (0, import_css7.cx)((0,
|
|
2825
|
+
className: (0, import_css7.cx)((0, import_browser20.withVendorCSSClassPrefix)("sign-up-button"), className),
|
|
2826
2826
|
style,
|
|
2827
2827
|
disabled: isLoading,
|
|
2828
2828
|
loading: isLoading,
|
|
@@ -2839,8 +2839,8 @@ BaseSignUpButton.displayName = "BaseSignUpButton";
|
|
|
2839
2839
|
var BaseSignUpButton_default = BaseSignUpButton;
|
|
2840
2840
|
|
|
2841
2841
|
// src/components/actions/SignUpButton/SignUpButton.tsx
|
|
2842
|
+
var import_browser21 = require("@asgardeo/browser");
|
|
2842
2843
|
var import_browser22 = require("@asgardeo/browser");
|
|
2843
|
-
var import_browser23 = require("@asgardeo/browser");
|
|
2844
2844
|
var import_react32 = require("react");
|
|
2845
2845
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2846
2846
|
var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferences, ...rest }, ref) => {
|
|
@@ -2851,7 +2851,7 @@ var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferen
|
|
|
2851
2851
|
try {
|
|
2852
2852
|
setIsLoading(true);
|
|
2853
2853
|
if (signUpUrl) {
|
|
2854
|
-
(0,
|
|
2854
|
+
(0, import_browser22.navigate)(signUpUrl);
|
|
2855
2855
|
} else {
|
|
2856
2856
|
await signUp();
|
|
2857
2857
|
}
|
|
@@ -2859,7 +2859,7 @@ var SignUpButton = (0, import_react32.forwardRef)(({ children, onClick, preferen
|
|
|
2859
2859
|
onClick(e);
|
|
2860
2860
|
}
|
|
2861
2861
|
} catch (error) {
|
|
2862
|
-
throw new
|
|
2862
|
+
throw new import_browser21.AsgardeoRuntimeError(
|
|
2863
2863
|
`Sign up failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
2864
2864
|
"SignUpButton-handleSignUp-RuntimeError-001",
|
|
2865
2865
|
"react",
|
|
@@ -2928,15 +2928,15 @@ Loading.displayName = "Loading";
|
|
|
2928
2928
|
var Loading_default = Loading;
|
|
2929
2929
|
|
|
2930
2930
|
// src/components/presentation/SignIn/BaseSignIn.tsx
|
|
2931
|
-
var
|
|
2931
|
+
var import_browser44 = require("@asgardeo/browser");
|
|
2932
2932
|
var import_css35 = require("@emotion/css");
|
|
2933
2933
|
var import_react56 = require("react");
|
|
2934
2934
|
|
|
2935
2935
|
// src/components/presentation/SignIn/options/SignInOptionFactory.tsx
|
|
2936
|
-
var
|
|
2936
|
+
var import_browser39 = require("@asgardeo/browser");
|
|
2937
2937
|
|
|
2938
2938
|
// src/components/presentation/SignIn/options/UsernamePassword.tsx
|
|
2939
|
-
var
|
|
2939
|
+
var import_browser33 = require("@asgardeo/browser");
|
|
2940
2940
|
var import_react44 = require("react");
|
|
2941
2941
|
|
|
2942
2942
|
// src/components/primitives/TextField/TextField.tsx
|
|
@@ -2944,11 +2944,11 @@ var import_css15 = require("@emotion/css");
|
|
|
2944
2944
|
|
|
2945
2945
|
// src/components/primitives/FormControl/FormControl.tsx
|
|
2946
2946
|
var import_css11 = require("@emotion/css");
|
|
2947
|
-
var
|
|
2947
|
+
var import_browser24 = require("@asgardeo/browser");
|
|
2948
2948
|
|
|
2949
2949
|
// src/components/primitives/Typography/Typography.tsx
|
|
2950
2950
|
var import_css9 = require("@emotion/css");
|
|
2951
|
-
var
|
|
2951
|
+
var import_browser23 = require("@asgardeo/browser");
|
|
2952
2952
|
|
|
2953
2953
|
// src/components/primitives/Typography/Typography.styles.ts
|
|
2954
2954
|
var import_css8 = require("@emotion/css");
|
|
@@ -3296,8 +3296,8 @@ var Typography = ({
|
|
|
3296
3296
|
}
|
|
3297
3297
|
};
|
|
3298
3298
|
const typographyClassName = (0, import_css9.cx)(
|
|
3299
|
-
(0,
|
|
3300
|
-
(0,
|
|
3299
|
+
(0, import_browser23.withVendorCSSClassPrefix)((0, import_browser23.bem)("typography")),
|
|
3300
|
+
(0, import_browser23.withVendorCSSClassPrefix)((0, import_browser23.bem)("typography", variant)),
|
|
3301
3301
|
styles.typography,
|
|
3302
3302
|
getVariantClass(variant),
|
|
3303
3303
|
noWrap && styles.typographyNoWrap,
|
|
@@ -3347,15 +3347,15 @@ var FormControl = ({
|
|
|
3347
3347
|
}) => {
|
|
3348
3348
|
const { theme, colorScheme } = useTheme_default();
|
|
3349
3349
|
const styles = FormControl_styles_default(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);
|
|
3350
|
-
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: [
|
|
3351
3351
|
children,
|
|
3352
3352
|
(error || helperText) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3353
3353
|
Typography_default,
|
|
3354
3354
|
{
|
|
3355
3355
|
variant: "caption",
|
|
3356
3356
|
color: error ? "error" : "textSecondary",
|
|
3357
|
-
className: (0, import_css11.cx)((0,
|
|
3358
|
-
[(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,
|
|
3359
3359
|
[styles.helperTextError]: !!error
|
|
3360
3360
|
}),
|
|
3361
3361
|
children: error || helperText
|
|
@@ -3367,7 +3367,7 @@ var FormControl_default = FormControl;
|
|
|
3367
3367
|
|
|
3368
3368
|
// src/components/primitives/InputLabel/InputLabel.tsx
|
|
3369
3369
|
var import_css13 = require("@emotion/css");
|
|
3370
|
-
var
|
|
3370
|
+
var import_browser25 = require("@asgardeo/browser");
|
|
3371
3371
|
|
|
3372
3372
|
// src/components/primitives/InputLabel/InputLabel.styles.ts
|
|
3373
3373
|
var import_css12 = require("@emotion/css");
|
|
@@ -3426,12 +3426,12 @@ var InputLabel = ({
|
|
|
3426
3426
|
"label",
|
|
3427
3427
|
{
|
|
3428
3428
|
className: (0, import_css13.cx)(
|
|
3429
|
-
(0,
|
|
3430
|
-
(0,
|
|
3429
|
+
(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label")),
|
|
3430
|
+
(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label", variant)),
|
|
3431
3431
|
styles.label,
|
|
3432
3432
|
variant === "block" ? styles.block : styles.inline,
|
|
3433
3433
|
{
|
|
3434
|
-
[(0,
|
|
3434
|
+
[(0, import_browser25.withVendorCSSClassPrefix)((0, import_browser25.bem)("input-label", "error"))]: error,
|
|
3435
3435
|
[styles.error]: error
|
|
3436
3436
|
},
|
|
3437
3437
|
className
|
|
@@ -3440,7 +3440,7 @@ var InputLabel = ({
|
|
|
3440
3440
|
...rest,
|
|
3441
3441
|
children: [
|
|
3442
3442
|
children,
|
|
3443
|
-
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: " *" })
|
|
3444
3444
|
]
|
|
3445
3445
|
}
|
|
3446
3446
|
);
|
|
@@ -3448,7 +3448,7 @@ var InputLabel = ({
|
|
|
3448
3448
|
var InputLabel_default = InputLabel;
|
|
3449
3449
|
|
|
3450
3450
|
// src/components/primitives/TextField/TextField.tsx
|
|
3451
|
-
var
|
|
3451
|
+
var import_browser26 = require("@asgardeo/browser");
|
|
3452
3452
|
|
|
3453
3453
|
// src/components/primitives/TextField/TextField.styles.ts
|
|
3454
3454
|
var import_css14 = require("@emotion/css");
|
|
@@ -3577,20 +3577,20 @@ var TextField = ({
|
|
|
3577
3577
|
const hasEndIcon = !!endIcon;
|
|
3578
3578
|
const styles = TextField_styles_default(theme, colorScheme, disabled, hasError, hasStartIcon, hasEndIcon);
|
|
3579
3579
|
const inputClassName = (0, import_css15.cx)(
|
|
3580
|
-
(0,
|
|
3580
|
+
(0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field", "input")),
|
|
3581
3581
|
styles.input,
|
|
3582
3582
|
hasError && styles.inputError,
|
|
3583
3583
|
disabled && styles.inputDisabled
|
|
3584
3584
|
);
|
|
3585
|
-
const containerClassName = (0, import_css15.cx)((0,
|
|
3586
|
-
const startIconClassName = (0, import_css15.cx)((0,
|
|
3587
|
-
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);
|
|
3588
3588
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3589
3589
|
FormControl_default,
|
|
3590
3590
|
{
|
|
3591
3591
|
error,
|
|
3592
3592
|
helperText,
|
|
3593
|
-
className: (0, import_css15.cx)((0,
|
|
3593
|
+
className: (0, import_css15.cx)((0, import_browser26.withVendorCSSClassPrefix)((0, import_browser26.bem)("text-field")), className),
|
|
3594
3594
|
style,
|
|
3595
3595
|
children: [
|
|
3596
3596
|
label && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(InputLabel_default, { required, error: hasError, children: label }),
|
|
@@ -3637,7 +3637,7 @@ var TextField_default = TextField;
|
|
|
3637
3637
|
|
|
3638
3638
|
// src/components/primitives/Select/Select.tsx
|
|
3639
3639
|
var import_css17 = require("@emotion/css");
|
|
3640
|
-
var
|
|
3640
|
+
var import_browser27 = require("@asgardeo/browser");
|
|
3641
3641
|
|
|
3642
3642
|
// src/components/primitives/Select/Select.styles.ts
|
|
3643
3643
|
var import_css16 = require("@emotion/css");
|
|
@@ -3735,7 +3735,7 @@ var Select = ({
|
|
|
3735
3735
|
const hasError = !!error;
|
|
3736
3736
|
const styles = Select_styles_default(theme, colorScheme, disabled, hasError);
|
|
3737
3737
|
const selectClassName = (0, import_css17.cx)(
|
|
3738
|
-
(0,
|
|
3738
|
+
(0, import_browser27.withVendorCSSClassPrefix)((0, import_browser27.bem)("select", "input")),
|
|
3739
3739
|
styles.select,
|
|
3740
3740
|
hasError && styles.selectError,
|
|
3741
3741
|
disabled && styles.selectDisabled
|
|
@@ -3745,7 +3745,7 @@ var Select = ({
|
|
|
3745
3745
|
{
|
|
3746
3746
|
error,
|
|
3747
3747
|
helperText,
|
|
3748
|
-
className: (0, import_css17.cx)((0,
|
|
3748
|
+
className: (0, import_css17.cx)((0, import_browser27.withVendorCSSClassPrefix)((0, import_browser27.bem)("select")), className),
|
|
3749
3749
|
style,
|
|
3750
3750
|
children: [
|
|
3751
3751
|
label && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(InputLabel_default, { required, error: hasError, children: label }),
|
|
@@ -3769,7 +3769,7 @@ var Select_default = Select;
|
|
|
3769
3769
|
// src/components/primitives/OtpField/OtpField.tsx
|
|
3770
3770
|
var import_react39 = require("react");
|
|
3771
3771
|
var import_css19 = require("@emotion/css");
|
|
3772
|
-
var
|
|
3772
|
+
var import_browser28 = require("@asgardeo/browser");
|
|
3773
3773
|
|
|
3774
3774
|
// src/components/primitives/OtpField/OtpField.styles.ts
|
|
3775
3775
|
var import_css18 = require("@emotion/css");
|
|
@@ -3945,12 +3945,12 @@ var OtpField = ({
|
|
|
3945
3945
|
{
|
|
3946
3946
|
error,
|
|
3947
3947
|
helperText,
|
|
3948
|
-
className: (0, import_css19.cx)((0,
|
|
3948
|
+
className: (0, import_css19.cx)((0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field")), className),
|
|
3949
3949
|
helperTextAlign: "center",
|
|
3950
3950
|
style,
|
|
3951
3951
|
children: [
|
|
3952
3952
|
label && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(InputLabel_default, { required, error: !!error, children: label }),
|
|
3953
|
-
/* @__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)(
|
|
3954
3954
|
"input",
|
|
3955
3955
|
{
|
|
3956
3956
|
ref: (el) => {
|
|
@@ -3962,10 +3962,10 @@ var OtpField = ({
|
|
|
3962
3962
|
onChange: (event) => handleChange(index, event),
|
|
3963
3963
|
onKeyDown: (event) => handleKeyDown(index, event),
|
|
3964
3964
|
onPaste: handlePaste,
|
|
3965
|
-
className: (0, import_css19.cx)((0,
|
|
3966
|
-
[(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,
|
|
3967
3967
|
[styles.inputError]: !!error,
|
|
3968
|
-
[(0,
|
|
3968
|
+
[(0, import_browser28.withVendorCSSClassPrefix)((0, import_browser28.bem)("otp-field", "input", "disabled"))]: !!disabled,
|
|
3969
3969
|
[styles.inputDisabled]: !!disabled
|
|
3970
3970
|
}),
|
|
3971
3971
|
maxLength: 1,
|
|
@@ -3987,7 +3987,7 @@ var OtpField_default = OtpField;
|
|
|
3987
3987
|
// src/components/primitives/PasswordField/PasswordField.tsx
|
|
3988
3988
|
var import_react41 = require("react");
|
|
3989
3989
|
var import_css21 = require("@emotion/css");
|
|
3990
|
-
var
|
|
3990
|
+
var import_browser29 = require("@asgardeo/browser");
|
|
3991
3991
|
|
|
3992
3992
|
// src/components/primitives/Icons/Eye.tsx
|
|
3993
3993
|
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
@@ -4083,7 +4083,7 @@ var PasswordField = ({ onChange, className, disabled, error, ...textFieldProps }
|
|
|
4083
4083
|
TextField_default,
|
|
4084
4084
|
{
|
|
4085
4085
|
...textFieldProps,
|
|
4086
|
-
className: (0, import_css21.cx)((0,
|
|
4086
|
+
className: (0, import_css21.cx)((0, import_browser29.withVendorCSSClassPrefix)((0, import_browser29.bem)("password-field")), className),
|
|
4087
4087
|
type: showPassword ? "text" : "password",
|
|
4088
4088
|
onChange: (e) => onChange(e.target.value),
|
|
4089
4089
|
autoComplete: "current-password",
|
|
@@ -4095,7 +4095,7 @@ var PasswordField = ({ onChange, className, disabled, error, ...textFieldProps }
|
|
|
4095
4095
|
width: 16,
|
|
4096
4096
|
height: 16,
|
|
4097
4097
|
className: (0, import_css21.cx)(
|
|
4098
|
-
(0,
|
|
4098
|
+
(0, import_browser29.withVendorCSSClassPrefix)((0, import_browser29.bem)("password-field", "toggle-icon")),
|
|
4099
4099
|
styles.toggleIcon,
|
|
4100
4100
|
showPassword ? styles.visibleIcon : styles.hiddenIcon
|
|
4101
4101
|
)
|
|
@@ -4109,7 +4109,7 @@ var PasswordField_default = PasswordField;
|
|
|
4109
4109
|
|
|
4110
4110
|
// src/components/primitives/DatePicker/DatePicker.tsx
|
|
4111
4111
|
var import_css23 = require("@emotion/css");
|
|
4112
|
-
var
|
|
4112
|
+
var import_browser30 = require("@asgardeo/browser");
|
|
4113
4113
|
|
|
4114
4114
|
// src/components/primitives/DatePicker/DatePicker.styles.ts
|
|
4115
4115
|
var import_css22 = require("@emotion/css");
|
|
@@ -4198,7 +4198,7 @@ var DatePicker = ({
|
|
|
4198
4198
|
{
|
|
4199
4199
|
error,
|
|
4200
4200
|
helperText,
|
|
4201
|
-
className: (0, import_css23.cx)((0,
|
|
4201
|
+
className: (0, import_css23.cx)((0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker")), className),
|
|
4202
4202
|
style,
|
|
4203
4203
|
children: [
|
|
4204
4204
|
label && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
@@ -4206,7 +4206,7 @@ var DatePicker = ({
|
|
|
4206
4206
|
{
|
|
4207
4207
|
required,
|
|
4208
4208
|
error: hasError,
|
|
4209
|
-
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),
|
|
4210
4210
|
children: label
|
|
4211
4211
|
}
|
|
4212
4212
|
),
|
|
@@ -4217,13 +4217,13 @@ var DatePicker = ({
|
|
|
4217
4217
|
pattern: "\\d{4}-\\d{2}-\\d{2}",
|
|
4218
4218
|
placeholder: dateFormat,
|
|
4219
4219
|
className: (0, import_css23.cx)(
|
|
4220
|
-
(0,
|
|
4220
|
+
(0, import_browser30.withVendorCSSClassPrefix)((0, import_browser30.bem)("date-picker", "input")),
|
|
4221
4221
|
styles.input,
|
|
4222
4222
|
styles.errorInput,
|
|
4223
4223
|
styles.disabledInput,
|
|
4224
4224
|
{
|
|
4225
|
-
[(0,
|
|
4226
|
-
[(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
|
|
4227
4227
|
}
|
|
4228
4228
|
),
|
|
4229
4229
|
disabled,
|
|
@@ -4240,7 +4240,7 @@ var DatePicker_default = DatePicker;
|
|
|
4240
4240
|
|
|
4241
4241
|
// src/components/primitives/Checkbox/Checkbox.tsx
|
|
4242
4242
|
var import_css25 = require("@emotion/css");
|
|
4243
|
-
var
|
|
4243
|
+
var import_browser31 = require("@asgardeo/browser");
|
|
4244
4244
|
|
|
4245
4245
|
// src/components/primitives/Checkbox/Checkbox.styles.ts
|
|
4246
4246
|
var import_css24 = require("@emotion/css");
|
|
@@ -4313,15 +4313,15 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4313
4313
|
{
|
|
4314
4314
|
error,
|
|
4315
4315
|
helperText,
|
|
4316
|
-
className: (0, import_css25.cx)((0,
|
|
4316
|
+
className: (0, import_css25.cx)((0, import_browser31.withVendorCSSClassPrefix)((0, import_browser31.bem)("checkbox")), className),
|
|
4317
4317
|
helperTextMarginLeft: `calc(${theme.vars.spacing.unit} * 3.5)`,
|
|
4318
|
-
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: [
|
|
4319
4319
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
4320
4320
|
"input",
|
|
4321
4321
|
{
|
|
4322
4322
|
type: "checkbox",
|
|
4323
|
-
className: (0, import_css25.cx)((0,
|
|
4324
|
-
[(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
|
|
4325
4325
|
}),
|
|
4326
4326
|
"aria-invalid": hasError,
|
|
4327
4327
|
"aria-required": required,
|
|
@@ -4334,8 +4334,8 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4334
4334
|
required,
|
|
4335
4335
|
error: hasError,
|
|
4336
4336
|
variant: "inline",
|
|
4337
|
-
className: (0, import_css25.cx)((0,
|
|
4338
|
-
[(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
|
|
4339
4339
|
}),
|
|
4340
4340
|
children: label
|
|
4341
4341
|
}
|
|
@@ -4347,7 +4347,7 @@ var Checkbox = ({ label, error, className, required, helperText, style = {}, ...
|
|
|
4347
4347
|
var Checkbox_default = Checkbox;
|
|
4348
4348
|
|
|
4349
4349
|
// src/components/factories/FieldFactory.tsx
|
|
4350
|
-
var
|
|
4350
|
+
var import_browser32 = require("@asgardeo/browser");
|
|
4351
4351
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
4352
4352
|
var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
4353
4353
|
if (required && touched && (!value || value.trim() === "")) {
|
|
@@ -4357,7 +4357,7 @@ var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
|
4357
4357
|
return null;
|
|
4358
4358
|
}
|
|
4359
4359
|
switch (type) {
|
|
4360
|
-
case
|
|
4360
|
+
case import_browser32.FieldType.Number:
|
|
4361
4361
|
const numValue = parseInt(value, 10);
|
|
4362
4362
|
if (isNaN(numValue)) {
|
|
4363
4363
|
return "Please enter a valid number";
|
|
@@ -4393,20 +4393,20 @@ var createField = (config) => {
|
|
|
4393
4393
|
placeholder
|
|
4394
4394
|
};
|
|
4395
4395
|
switch (type) {
|
|
4396
|
-
case
|
|
4396
|
+
case import_browser32.FieldType.Password:
|
|
4397
4397
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PasswordField_default, { ...commonProps, onChange });
|
|
4398
|
-
case
|
|
4398
|
+
case import_browser32.FieldType.Text:
|
|
4399
4399
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextField_default, { ...commonProps, type: "text", onChange: (e) => onChange(e.target.value), autoComplete: "off" });
|
|
4400
|
-
case
|
|
4400
|
+
case import_browser32.FieldType.Email:
|
|
4401
4401
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(TextField_default, { ...commonProps, type: "email", onChange: (e) => onChange(e.target.value), autoComplete: "email" });
|
|
4402
|
-
case
|
|
4402
|
+
case import_browser32.FieldType.Date:
|
|
4403
4403
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(DatePicker_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
4404
|
-
case
|
|
4404
|
+
case import_browser32.FieldType.Checkbox:
|
|
4405
4405
|
const isChecked = value === "true" || value === true;
|
|
4406
4406
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Checkbox_default, { ...commonProps, checked: isChecked, onChange: (e) => onChange(e.target.checked.toString()) });
|
|
4407
|
-
case
|
|
4407
|
+
case import_browser32.FieldType.Otp:
|
|
4408
4408
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(OtpField_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
4409
|
-
case
|
|
4409
|
+
case import_browser32.FieldType.Number:
|
|
4410
4410
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
4411
4411
|
TextField_default,
|
|
4412
4412
|
{
|
|
@@ -4416,7 +4416,7 @@ var createField = (config) => {
|
|
|
4416
4416
|
helperText: "Enter a numeric value"
|
|
4417
4417
|
}
|
|
4418
4418
|
);
|
|
4419
|
-
case
|
|
4419
|
+
case import_browser32.FieldType.Select:
|
|
4420
4420
|
const fieldOptions = options.length > 0 ? options : [];
|
|
4421
4421
|
if (fieldOptions.length > 0) {
|
|
4422
4422
|
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
@@ -4479,7 +4479,7 @@ var UsernamePassword = ({
|
|
|
4479
4479
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
4480
4480
|
formFields.map((param) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { children: createField({
|
|
4481
4481
|
name: param.param,
|
|
4482
|
-
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,
|
|
4483
4483
|
label: param.displayName,
|
|
4484
4484
|
required: authenticator.requiredParams.includes(param.param),
|
|
4485
4485
|
value: formValues[param.param] || "",
|
|
@@ -4510,7 +4510,7 @@ var UsernamePassword = ({
|
|
|
4510
4510
|
var UsernamePassword_default = UsernamePassword;
|
|
4511
4511
|
|
|
4512
4512
|
// src/components/presentation/SignIn/options/IdentifierFirst.tsx
|
|
4513
|
-
var
|
|
4513
|
+
var import_browser34 = require("@asgardeo/browser");
|
|
4514
4514
|
var import_react45 = require("react");
|
|
4515
4515
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
4516
4516
|
var IdentifierFirst = ({
|
|
@@ -4535,7 +4535,7 @@ var IdentifierFirst = ({
|
|
|
4535
4535
|
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_jsx_runtime32.Fragment, { children: [
|
|
4536
4536
|
formFields.map((param) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children: createField({
|
|
4537
4537
|
name: param.param,
|
|
4538
|
-
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,
|
|
4539
4539
|
label: param.displayName,
|
|
4540
4540
|
required: authenticator.requiredParams.includes(param.param),
|
|
4541
4541
|
value: formValues[param.param] || "",
|
|
@@ -4788,7 +4788,7 @@ var SignInWithEthereumButton = ({
|
|
|
4788
4788
|
var SignInWithEthereumButton_default = SignInWithEthereumButton;
|
|
4789
4789
|
|
|
4790
4790
|
// src/components/presentation/SignIn/options/EmailOtp.tsx
|
|
4791
|
-
var
|
|
4791
|
+
var import_browser35 = require("@asgardeo/browser");
|
|
4792
4792
|
var import_react46 = require("react");
|
|
4793
4793
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4794
4794
|
var EmailOtp = ({
|
|
@@ -4827,7 +4827,7 @@ var EmailOtp = ({
|
|
|
4827
4827
|
}
|
|
4828
4828
|
) : createField({
|
|
4829
4829
|
name: param.param,
|
|
4830
|
-
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,
|
|
4831
4831
|
label: param.displayName,
|
|
4832
4832
|
required: authenticator.requiredParams.includes(param.param),
|
|
4833
4833
|
value: formValues[param.param] || "",
|
|
@@ -4856,7 +4856,7 @@ var EmailOtp = ({
|
|
|
4856
4856
|
var EmailOtp_default = EmailOtp;
|
|
4857
4857
|
|
|
4858
4858
|
// src/components/presentation/SignIn/options/Totp.tsx
|
|
4859
|
-
var
|
|
4859
|
+
var import_browser36 = require("@asgardeo/browser");
|
|
4860
4860
|
var import_react47 = require("react");
|
|
4861
4861
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4862
4862
|
var Totp = ({
|
|
@@ -4895,7 +4895,7 @@ var Totp = ({
|
|
|
4895
4895
|
}
|
|
4896
4896
|
) : createField({
|
|
4897
4897
|
name: param.param,
|
|
4898
|
-
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,
|
|
4899
4899
|
label: param.displayName,
|
|
4900
4900
|
required: authenticator.requiredParams.includes(param.param),
|
|
4901
4901
|
value: formValues[param.param] || "",
|
|
@@ -4924,7 +4924,7 @@ var Totp = ({
|
|
|
4924
4924
|
var Totp_default = Totp;
|
|
4925
4925
|
|
|
4926
4926
|
// src/components/presentation/SignIn/options/SmsOtp.tsx
|
|
4927
|
-
var
|
|
4927
|
+
var import_browser37 = require("@asgardeo/browser");
|
|
4928
4928
|
var import_react48 = require("react");
|
|
4929
4929
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4930
4930
|
var SmsOtp = ({
|
|
@@ -4963,7 +4963,7 @@ var SmsOtp = ({
|
|
|
4963
4963
|
}
|
|
4964
4964
|
) : createField({
|
|
4965
4965
|
name: param.param,
|
|
4966
|
-
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,
|
|
4967
4967
|
label: param.displayName,
|
|
4968
4968
|
required: authenticator.requiredParams.includes(param.param),
|
|
4969
4969
|
value: formValues[param.param] || "",
|
|
@@ -5023,7 +5023,7 @@ var SocialLogin = ({
|
|
|
5023
5023
|
var SocialButton_default = SocialLogin;
|
|
5024
5024
|
|
|
5025
5025
|
// src/components/presentation/SignIn/options/MultiOptionButton.tsx
|
|
5026
|
-
var
|
|
5026
|
+
var import_browser38 = require("@asgardeo/browser");
|
|
5027
5027
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5028
5028
|
var MultiOptionButton = ({
|
|
5029
5029
|
authenticator,
|
|
@@ -5035,7 +5035,7 @@ var MultiOptionButton = ({
|
|
|
5035
5035
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5036
5036
|
const getDisplayName = () => {
|
|
5037
5037
|
let authenticatorName = authenticator.authenticator;
|
|
5038
|
-
if (authenticator.idp !==
|
|
5038
|
+
if (authenticator.idp !== import_browser38.EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
|
|
5039
5039
|
authenticatorName = authenticator.idp;
|
|
5040
5040
|
}
|
|
5041
5041
|
switch (authenticatorName) {
|
|
@@ -5046,7 +5046,7 @@ var MultiOptionButton = ({
|
|
|
5046
5046
|
const getIcon = () => {
|
|
5047
5047
|
const authenticatorId = authenticator.authenticatorId;
|
|
5048
5048
|
switch (authenticatorId) {
|
|
5049
|
-
case
|
|
5049
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
5050
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)(
|
|
5051
5051
|
"path",
|
|
5052
5052
|
{
|
|
@@ -5054,7 +5054,7 @@ var MultiOptionButton = ({
|
|
|
5054
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"
|
|
5055
5055
|
}
|
|
5056
5056
|
) });
|
|
5057
|
-
case
|
|
5057
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
5058
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)(
|
|
5059
5059
|
"path",
|
|
5060
5060
|
{
|
|
@@ -5062,9 +5062,9 @@ var MultiOptionButton = ({
|
|
|
5062
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"
|
|
5063
5063
|
}
|
|
5064
5064
|
) });
|
|
5065
|
-
case
|
|
5065
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
5066
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" }) });
|
|
5067
|
-
case
|
|
5067
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.PushNotification:
|
|
5068
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)(
|
|
5069
5069
|
"path",
|
|
5070
5070
|
{
|
|
@@ -5072,7 +5072,7 @@ var MultiOptionButton = ({
|
|
|
5072
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"
|
|
5073
5073
|
}
|
|
5074
5074
|
) });
|
|
5075
|
-
case
|
|
5075
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey:
|
|
5076
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: [
|
|
5077
5077
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
|
|
5078
5078
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("g", { id: "SVGRepo_tracerCarrier", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
@@ -5081,7 +5081,7 @@ var MultiOptionButton = ({
|
|
|
5081
5081
|
" "
|
|
5082
5082
|
] })
|
|
5083
5083
|
] });
|
|
5084
|
-
case
|
|
5084
|
+
case import_browser38.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.MagicLink:
|
|
5085
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)(
|
|
5086
5086
|
"path",
|
|
5087
5087
|
{
|
|
@@ -5130,11 +5130,11 @@ var createSignInOption = ({
|
|
|
5130
5130
|
}) => {
|
|
5131
5131
|
const hasParams = authenticator.metadata?.params && authenticator.metadata.params.length > 0;
|
|
5132
5132
|
switch (authenticator.authenticatorId) {
|
|
5133
|
-
case
|
|
5133
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.UsernamePassword:
|
|
5134
5134
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(UsernamePassword_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5135
|
-
case
|
|
5135
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.IdentifierFirst:
|
|
5136
5136
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(IdentifierFirst_default, { authenticator, preferences, onSubmit, ...rest });
|
|
5137
|
-
case
|
|
5137
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Google:
|
|
5138
5138
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5139
5139
|
GoogleButton_default,
|
|
5140
5140
|
{
|
|
@@ -5145,7 +5145,7 @@ var createSignInOption = ({
|
|
|
5145
5145
|
...rest
|
|
5146
5146
|
}
|
|
5147
5147
|
);
|
|
5148
|
-
case
|
|
5148
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.GitHub:
|
|
5149
5149
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5150
5150
|
GitHubButton_default,
|
|
5151
5151
|
{
|
|
@@ -5156,7 +5156,7 @@ var createSignInOption = ({
|
|
|
5156
5156
|
...rest
|
|
5157
5157
|
}
|
|
5158
5158
|
);
|
|
5159
|
-
case
|
|
5159
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Microsoft:
|
|
5160
5160
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5161
5161
|
MicrosoftButton_default,
|
|
5162
5162
|
{
|
|
@@ -5167,7 +5167,7 @@ var createSignInOption = ({
|
|
|
5167
5167
|
...rest
|
|
5168
5168
|
}
|
|
5169
5169
|
);
|
|
5170
|
-
case
|
|
5170
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Facebook:
|
|
5171
5171
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5172
5172
|
FacebookButton_default,
|
|
5173
5173
|
{
|
|
@@ -5178,7 +5178,7 @@ var createSignInOption = ({
|
|
|
5178
5178
|
...rest
|
|
5179
5179
|
}
|
|
5180
5180
|
);
|
|
5181
|
-
case
|
|
5181
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.LinkedIn:
|
|
5182
5182
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5183
5183
|
LinkedInButton_default,
|
|
5184
5184
|
{
|
|
@@ -5189,7 +5189,7 @@ var createSignInOption = ({
|
|
|
5189
5189
|
...rest
|
|
5190
5190
|
}
|
|
5191
5191
|
);
|
|
5192
|
-
case
|
|
5192
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SignInWithEthereum:
|
|
5193
5193
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5194
5194
|
SignInWithEthereumButton_default,
|
|
5195
5195
|
{
|
|
@@ -5200,14 +5200,14 @@ var createSignInOption = ({
|
|
|
5200
5200
|
...rest
|
|
5201
5201
|
}
|
|
5202
5202
|
);
|
|
5203
|
-
case
|
|
5203
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
5204
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 });
|
|
5205
|
-
case
|
|
5205
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
5206
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 });
|
|
5207
|
-
case
|
|
5207
|
+
case import_browser39.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
5208
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 });
|
|
5209
5209
|
default:
|
|
5210
|
-
if (authenticator.idp !==
|
|
5210
|
+
if (authenticator.idp !== import_browser39.EmbeddedSignInFlowAuthenticatorKnownIdPType.Local) {
|
|
5211
5211
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5212
5212
|
SocialButton_default,
|
|
5213
5213
|
{
|
|
@@ -5241,7 +5241,7 @@ var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFie
|
|
|
5241
5241
|
|
|
5242
5242
|
// src/components/primitives/Alert/Alert.tsx
|
|
5243
5243
|
var import_react50 = require("react");
|
|
5244
|
-
var
|
|
5244
|
+
var import_browser40 = require("@asgardeo/browser");
|
|
5245
5245
|
var import_css27 = require("@emotion/css");
|
|
5246
5246
|
|
|
5247
5247
|
// src/components/primitives/Icons/CircleCheck.tsx
|
|
@@ -5442,16 +5442,16 @@ var Alert = (0, import_react50.forwardRef)(
|
|
|
5442
5442
|
role: "alert",
|
|
5443
5443
|
style,
|
|
5444
5444
|
className: (0, import_css27.cx)(
|
|
5445
|
-
(0,
|
|
5445
|
+
(0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert")),
|
|
5446
5446
|
styles.alert,
|
|
5447
5447
|
styles.variant,
|
|
5448
|
-
(0,
|
|
5448
|
+
(0, import_browser40.withVendorCSSClassPrefix)((0, import_browser40.bem)("alert", null, variant)),
|
|
5449
5449
|
className
|
|
5450
5450
|
),
|
|
5451
5451
|
...rest,
|
|
5452
5452
|
children: [
|
|
5453
|
-
showIcon && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: (0, import_css27.cx)((0,
|
|
5454
|
-
/* @__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 })
|
|
5455
5455
|
]
|
|
5456
5456
|
}
|
|
5457
5457
|
) });
|
|
@@ -5469,7 +5469,7 @@ var AlertTitle = (0, import_react50.forwardRef)(({ children, className, style, .
|
|
|
5469
5469
|
variant: "h6",
|
|
5470
5470
|
fontWeight: 600,
|
|
5471
5471
|
style,
|
|
5472
|
-
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),
|
|
5473
5473
|
...filteredRest,
|
|
5474
5474
|
children
|
|
5475
5475
|
}
|
|
@@ -5487,7 +5487,7 @@ var AlertDescription = (0, import_react50.forwardRef)(
|
|
|
5487
5487
|
component: "p",
|
|
5488
5488
|
variant: "body2",
|
|
5489
5489
|
style,
|
|
5490
|
-
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),
|
|
5491
5491
|
...filteredRest,
|
|
5492
5492
|
children
|
|
5493
5493
|
}
|
|
@@ -5502,7 +5502,7 @@ Alert.Description = AlertDescription;
|
|
|
5502
5502
|
var Alert_default = Alert;
|
|
5503
5503
|
|
|
5504
5504
|
// src/components/primitives/Card/Card.tsx
|
|
5505
|
-
var
|
|
5505
|
+
var import_browser41 = require("@asgardeo/browser");
|
|
5506
5506
|
var import_css29 = require("@emotion/css");
|
|
5507
5507
|
var import_react52 = require("react");
|
|
5508
5508
|
|
|
@@ -5597,13 +5597,13 @@ var Card = (0, import_react52.forwardRef)(
|
|
|
5597
5597
|
ref,
|
|
5598
5598
|
style,
|
|
5599
5599
|
className: (0, import_css29.cx)(
|
|
5600
|
-
(0,
|
|
5600
|
+
(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card")),
|
|
5601
5601
|
styles.card,
|
|
5602
5602
|
styles.variant,
|
|
5603
5603
|
styles.clickable,
|
|
5604
|
-
(0,
|
|
5604
|
+
(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", null, variant)),
|
|
5605
5605
|
{
|
|
5606
|
-
[(0,
|
|
5606
|
+
[(0, import_browser41.withVendorCSSClassPrefix)((0, import_browser41.bem)("card", null, "clickable"))]: clickable
|
|
5607
5607
|
},
|
|
5608
5608
|
className
|
|
5609
5609
|
),
|
|
@@ -5621,7 +5621,7 @@ var CardHeader = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5621
5621
|
{
|
|
5622
5622
|
ref,
|
|
5623
5623
|
style,
|
|
5624
|
-
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),
|
|
5625
5625
|
...rest,
|
|
5626
5626
|
children
|
|
5627
5627
|
}
|
|
@@ -5674,7 +5674,7 @@ var CardTitle = (0, import_react52.forwardRef)(
|
|
|
5674
5674
|
component: getComponentFromLevel(level),
|
|
5675
5675
|
variant: getVariantFromLevel(level),
|
|
5676
5676
|
style,
|
|
5677
|
-
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),
|
|
5678
5678
|
fontWeight: 600,
|
|
5679
5679
|
...filteredRest,
|
|
5680
5680
|
children
|
|
@@ -5694,7 +5694,7 @@ var CardDescription = (0, import_react52.forwardRef)(
|
|
|
5694
5694
|
variant: "body2",
|
|
5695
5695
|
color: "textSecondary",
|
|
5696
5696
|
style,
|
|
5697
|
-
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),
|
|
5698
5698
|
...filteredRest,
|
|
5699
5699
|
children
|
|
5700
5700
|
}
|
|
@@ -5709,7 +5709,7 @@ var CardAction = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5709
5709
|
{
|
|
5710
5710
|
ref,
|
|
5711
5711
|
style,
|
|
5712
|
-
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),
|
|
5713
5713
|
...rest,
|
|
5714
5714
|
children
|
|
5715
5715
|
}
|
|
@@ -5723,7 +5723,7 @@ var CardContent = (0, import_react52.forwardRef)(({ children, className, style,
|
|
|
5723
5723
|
{
|
|
5724
5724
|
ref,
|
|
5725
5725
|
style,
|
|
5726
|
-
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),
|
|
5727
5727
|
...rest,
|
|
5728
5728
|
children
|
|
5729
5729
|
}
|
|
@@ -5737,7 +5737,7 @@ var CardFooter = (0, import_react52.forwardRef)(({ children, className, style, .
|
|
|
5737
5737
|
{
|
|
5738
5738
|
ref,
|
|
5739
5739
|
style,
|
|
5740
|
-
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),
|
|
5741
5741
|
...rest,
|
|
5742
5742
|
children
|
|
5743
5743
|
}
|
|
@@ -5759,7 +5759,7 @@ Card.Footer = CardFooter;
|
|
|
5759
5759
|
var Card_default = Card;
|
|
5760
5760
|
|
|
5761
5761
|
// src/components/primitives/Divider/Divider.tsx
|
|
5762
|
-
var
|
|
5762
|
+
var import_browser42 = require("@asgardeo/browser");
|
|
5763
5763
|
var import_css31 = require("@emotion/css");
|
|
5764
5764
|
|
|
5765
5765
|
// src/components/primitives/Divider/Divider.styles.ts
|
|
@@ -5828,8 +5828,8 @@ var Divider = ({
|
|
|
5828
5828
|
"div",
|
|
5829
5829
|
{
|
|
5830
5830
|
className: (0, import_css31.cx)(
|
|
5831
|
-
(0,
|
|
5832
|
-
(0,
|
|
5831
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider")),
|
|
5832
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "vertical")),
|
|
5833
5833
|
styles.divider,
|
|
5834
5834
|
styles.vertical,
|
|
5835
5835
|
className
|
|
@@ -5846,9 +5846,9 @@ var Divider = ({
|
|
|
5846
5846
|
"div",
|
|
5847
5847
|
{
|
|
5848
5848
|
className: (0, import_css31.cx)(
|
|
5849
|
-
(0,
|
|
5850
|
-
(0,
|
|
5851
|
-
(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")),
|
|
5852
5852
|
styles.divider,
|
|
5853
5853
|
styles.horizontal,
|
|
5854
5854
|
className
|
|
@@ -5858,18 +5858,18 @@ var Divider = ({
|
|
|
5858
5858
|
"aria-orientation": "horizontal",
|
|
5859
5859
|
...rest,
|
|
5860
5860
|
children: [
|
|
5861
|
-
/* @__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) }),
|
|
5862
5862
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
5863
5863
|
Typography_default,
|
|
5864
5864
|
{
|
|
5865
5865
|
variant: "body2",
|
|
5866
5866
|
color: "textSecondary",
|
|
5867
|
-
className: (0, import_css31.cx)((0,
|
|
5867
|
+
className: (0, import_css31.cx)((0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "text")), styles.text),
|
|
5868
5868
|
inline: true,
|
|
5869
5869
|
children
|
|
5870
5870
|
}
|
|
5871
5871
|
),
|
|
5872
|
-
/* @__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) })
|
|
5873
5873
|
]
|
|
5874
5874
|
}
|
|
5875
5875
|
);
|
|
@@ -5878,8 +5878,8 @@ var Divider = ({
|
|
|
5878
5878
|
"div",
|
|
5879
5879
|
{
|
|
5880
5880
|
className: (0, import_css31.cx)(
|
|
5881
|
-
(0,
|
|
5882
|
-
(0,
|
|
5881
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider")),
|
|
5882
|
+
(0, import_browser42.withVendorCSSClassPrefix)((0, import_browser42.bem)("divider", "horizontal")),
|
|
5883
5883
|
styles.divider,
|
|
5884
5884
|
styles.horizontal,
|
|
5885
5885
|
className
|
|
@@ -5895,7 +5895,7 @@ var Divider_default = Divider;
|
|
|
5895
5895
|
|
|
5896
5896
|
// src/components/primitives/Logo/Logo.tsx
|
|
5897
5897
|
var import_css33 = require("@emotion/css");
|
|
5898
|
-
var
|
|
5898
|
+
var import_browser43 = require("@asgardeo/browser");
|
|
5899
5899
|
|
|
5900
5900
|
// src/components/primitives/Logo/Logo.styles.ts
|
|
5901
5901
|
var import_css32 = require("@emotion/css");
|
|
@@ -5954,8 +5954,8 @@ var Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
|
5954
5954
|
alt: logoAlt,
|
|
5955
5955
|
title: logoTitle,
|
|
5956
5956
|
className: (0, import_css33.cx)(
|
|
5957
|
-
(0,
|
|
5958
|
-
(0,
|
|
5957
|
+
(0, import_browser43.withVendorCSSClassPrefix)((0, import_browser43.bem)("logo")),
|
|
5958
|
+
(0, import_browser43.withVendorCSSClassPrefix)((0, import_browser43.bem)("logo", size)),
|
|
5959
5959
|
styles.logo,
|
|
5960
5960
|
styles.size,
|
|
5961
5961
|
className
|
|
@@ -6221,7 +6221,7 @@ var handleWebAuthnAuthentication = async (challengeData) => {
|
|
|
6221
6221
|
throw new Error(`Passkey authentication failed: ${error instanceof Error ? error.message : "Unknown error"}`);
|
|
6222
6222
|
}
|
|
6223
6223
|
};
|
|
6224
|
-
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;
|
|
6225
6225
|
var BaseSignIn = (props) => {
|
|
6226
6226
|
const { theme } = useTheme_default();
|
|
6227
6227
|
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
@@ -6307,9 +6307,9 @@ var BaseSignInContent = ({
|
|
|
6307
6307
|
touchAllFields();
|
|
6308
6308
|
};
|
|
6309
6309
|
const handleRedirectionIfNeeded = (response) => {
|
|
6310
|
-
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) {
|
|
6311
6311
|
const responseAuthenticator = response.nextStep.authenticators[0];
|
|
6312
|
-
if (responseAuthenticator.metadata?.promptType ===
|
|
6312
|
+
if (responseAuthenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt && responseAuthenticator.metadata?.additionalData?.redirectUrl) {
|
|
6313
6313
|
const redirectUrl = responseAuthenticator.metadata?.additionalData?.redirectUrl;
|
|
6314
6314
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
6315
6315
|
if (!popup) {
|
|
@@ -6395,7 +6395,7 @@ var BaseSignInContent = ({
|
|
|
6395
6395
|
});
|
|
6396
6396
|
popup.close();
|
|
6397
6397
|
onFlowChange?.(response2);
|
|
6398
|
-
if (response2?.flowStatus ===
|
|
6398
|
+
if (response2?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6399
6399
|
onSuccess?.(response2.authData);
|
|
6400
6400
|
}
|
|
6401
6401
|
}
|
|
@@ -6436,11 +6436,11 @@ var BaseSignInContent = ({
|
|
|
6436
6436
|
url: currentFlow?.links[0].href
|
|
6437
6437
|
});
|
|
6438
6438
|
onFlowChange?.(response);
|
|
6439
|
-
if (response?.flowStatus ===
|
|
6439
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6440
6440
|
onSuccess?.(response.authData);
|
|
6441
6441
|
return;
|
|
6442
6442
|
}
|
|
6443
|
-
if (response?.flowStatus ===
|
|
6443
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6444
6444
|
setError(t("errors.sign.in.flow.completion.failure"));
|
|
6445
6445
|
return;
|
|
6446
6446
|
}
|
|
@@ -6451,7 +6451,7 @@ var BaseSignInContent = ({
|
|
|
6451
6451
|
const nextStepResponse = response;
|
|
6452
6452
|
setCurrentFlow(nextStepResponse);
|
|
6453
6453
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6454
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6454
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6455
6455
|
setCurrentAuthenticator(null);
|
|
6456
6456
|
} else {
|
|
6457
6457
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6469,7 +6469,7 @@ var BaseSignInContent = ({
|
|
|
6469
6469
|
}
|
|
6470
6470
|
}
|
|
6471
6471
|
} catch (err) {
|
|
6472
|
-
const errorMessage = err instanceof
|
|
6472
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err.message : t("errors.sign.in.flow.failure");
|
|
6473
6473
|
setError(errorMessage);
|
|
6474
6474
|
onError?.(err);
|
|
6475
6475
|
} finally {
|
|
@@ -6508,11 +6508,11 @@ var BaseSignInContent = ({
|
|
|
6508
6508
|
url: currentFlow?.links[0].href
|
|
6509
6509
|
});
|
|
6510
6510
|
onFlowChange?.(response);
|
|
6511
|
-
if (response?.flowStatus ===
|
|
6511
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6512
6512
|
onSuccess?.(response.authData);
|
|
6513
6513
|
return;
|
|
6514
6514
|
}
|
|
6515
|
-
if (response?.flowStatus ===
|
|
6515
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6516
6516
|
setError(t("errors.sign.in.flow.passkeys.completion.failure"));
|
|
6517
6517
|
return;
|
|
6518
6518
|
}
|
|
@@ -6520,7 +6520,7 @@ var BaseSignInContent = ({
|
|
|
6520
6520
|
const nextStepResponse = response;
|
|
6521
6521
|
setCurrentFlow(nextStepResponse);
|
|
6522
6522
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6523
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6523
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6524
6524
|
setCurrentAuthenticator(null);
|
|
6525
6525
|
} else {
|
|
6526
6526
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6549,7 +6549,7 @@ var BaseSignInContent = ({
|
|
|
6549
6549
|
}
|
|
6550
6550
|
setError(errorMessage);
|
|
6551
6551
|
}
|
|
6552
|
-
} else if (authenticator.metadata?.promptType ===
|
|
6552
|
+
} else if (authenticator.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt) {
|
|
6553
6553
|
const payload = {
|
|
6554
6554
|
flowId: currentFlow.flowId,
|
|
6555
6555
|
selectedAuthenticator: {
|
|
@@ -6562,7 +6562,7 @@ var BaseSignInContent = ({
|
|
|
6562
6562
|
url: currentFlow?.links[0].href
|
|
6563
6563
|
});
|
|
6564
6564
|
onFlowChange?.(response);
|
|
6565
|
-
if (response?.flowStatus ===
|
|
6565
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6566
6566
|
onSuccess?.(response.authData);
|
|
6567
6567
|
return;
|
|
6568
6568
|
}
|
|
@@ -6585,11 +6585,11 @@ var BaseSignInContent = ({
|
|
|
6585
6585
|
url: currentFlow?.links[0].href
|
|
6586
6586
|
});
|
|
6587
6587
|
onFlowChange?.(response);
|
|
6588
|
-
if (response?.flowStatus ===
|
|
6588
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6589
6589
|
onSuccess?.(response.authData);
|
|
6590
6590
|
return;
|
|
6591
6591
|
}
|
|
6592
|
-
if (response?.flowStatus ===
|
|
6592
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6593
6593
|
setError("Authentication failed. Please check your credentials and try again.");
|
|
6594
6594
|
return;
|
|
6595
6595
|
}
|
|
@@ -6600,7 +6600,7 @@ var BaseSignInContent = ({
|
|
|
6600
6600
|
const nextStepResponse = response;
|
|
6601
6601
|
setCurrentFlow(nextStepResponse);
|
|
6602
6602
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6603
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6603
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6604
6604
|
setCurrentAuthenticator(null);
|
|
6605
6605
|
} else {
|
|
6606
6606
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6636,11 +6636,11 @@ var BaseSignInContent = ({
|
|
|
6636
6636
|
url: currentFlow?.links[0].href
|
|
6637
6637
|
});
|
|
6638
6638
|
onFlowChange?.(response);
|
|
6639
|
-
if (response?.flowStatus ===
|
|
6639
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6640
6640
|
onSuccess?.(response.authData);
|
|
6641
6641
|
return;
|
|
6642
6642
|
}
|
|
6643
|
-
if (response?.flowStatus ===
|
|
6643
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.FailIncomplete) {
|
|
6644
6644
|
setError("Authentication failed. Please try again.");
|
|
6645
6645
|
return;
|
|
6646
6646
|
}
|
|
@@ -6651,7 +6651,7 @@ var BaseSignInContent = ({
|
|
|
6651
6651
|
const nextStepResponse = response;
|
|
6652
6652
|
setCurrentFlow(nextStepResponse);
|
|
6653
6653
|
if (nextStepResponse.nextStep?.authenticators?.length > 0) {
|
|
6654
|
-
if (nextStepResponse.nextStep.stepType ===
|
|
6654
|
+
if (nextStepResponse.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) {
|
|
6655
6655
|
setCurrentAuthenticator(null);
|
|
6656
6656
|
} else {
|
|
6657
6657
|
const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
|
|
@@ -6678,7 +6678,7 @@ var BaseSignInContent = ({
|
|
|
6678
6678
|
}
|
|
6679
6679
|
}
|
|
6680
6680
|
} catch (err) {
|
|
6681
|
-
const errorMessage = err instanceof
|
|
6681
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err?.message : "Authenticator selection failed";
|
|
6682
6682
|
setError(errorMessage);
|
|
6683
6683
|
onError?.(err);
|
|
6684
6684
|
} finally {
|
|
@@ -6690,7 +6690,7 @@ var BaseSignInContent = ({
|
|
|
6690
6690
|
setFormTouched(param, true);
|
|
6691
6691
|
};
|
|
6692
6692
|
const hasMultipleOptions = (0, import_react56.useCallback)(
|
|
6693
|
-
() => 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,
|
|
6694
6694
|
[currentFlow]
|
|
6695
6695
|
);
|
|
6696
6696
|
const getAvailableAuthenticators = (0, import_react56.useCallback)(() => {
|
|
@@ -6701,30 +6701,30 @@ var BaseSignInContent = ({
|
|
|
6701
6701
|
}, [currentFlow]);
|
|
6702
6702
|
const containerClasses = (0, import_css35.cx)(
|
|
6703
6703
|
[
|
|
6704
|
-
(0,
|
|
6705
|
-
(0,
|
|
6706
|
-
(0,
|
|
6704
|
+
(0, import_browser44.withVendorCSSClassPrefix)("signin"),
|
|
6705
|
+
(0, import_browser44.withVendorCSSClassPrefix)(`signin--${size}`),
|
|
6706
|
+
(0, import_browser44.withVendorCSSClassPrefix)(`signin--${variant}`)
|
|
6707
6707
|
],
|
|
6708
6708
|
className
|
|
6709
6709
|
);
|
|
6710
6710
|
const inputClasses = (0, import_css35.cx)(
|
|
6711
6711
|
[
|
|
6712
|
-
(0,
|
|
6713
|
-
size === "small" && (0,
|
|
6714
|
-
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")
|
|
6715
6715
|
],
|
|
6716
6716
|
inputClassName
|
|
6717
6717
|
);
|
|
6718
6718
|
const buttonClasses = (0, import_css35.cx)(
|
|
6719
6719
|
[
|
|
6720
|
-
(0,
|
|
6721
|
-
size === "small" && (0,
|
|
6722
|
-
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")
|
|
6723
6723
|
],
|
|
6724
6724
|
buttonClassName
|
|
6725
6725
|
);
|
|
6726
|
-
const errorClasses = (0, import_css35.cx)([(0,
|
|
6727
|
-
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);
|
|
6728
6728
|
(0, import_react56.useEffect)(() => {
|
|
6729
6729
|
if (isLoading) {
|
|
6730
6730
|
return;
|
|
@@ -6741,12 +6741,12 @@ var BaseSignInContent = ({
|
|
|
6741
6741
|
setCurrentFlow(response);
|
|
6742
6742
|
setIsInitialized(true);
|
|
6743
6743
|
onFlowChange?.(response);
|
|
6744
|
-
if (response?.flowStatus ===
|
|
6744
|
+
if (response?.flowStatus === import_browser44.EmbeddedSignInFlowStatus.SuccessCompleted) {
|
|
6745
6745
|
onSuccess?.(response.authData || {});
|
|
6746
6746
|
return;
|
|
6747
6747
|
}
|
|
6748
6748
|
if (response?.nextStep?.authenticators?.length > 0) {
|
|
6749
|
-
if (response.nextStep.stepType ===
|
|
6749
|
+
if (response.nextStep.stepType === import_browser44.EmbeddedSignInFlowStepType.MultiOptionsPrompt && response.nextStep.authenticators.length > 1) {
|
|
6750
6750
|
setCurrentAuthenticator(null);
|
|
6751
6751
|
} else {
|
|
6752
6752
|
const authenticator = response.nextStep.authenticators[0];
|
|
@@ -6764,7 +6764,7 @@ var BaseSignInContent = ({
|
|
|
6764
6764
|
);
|
|
6765
6765
|
}
|
|
6766
6766
|
} catch (err) {
|
|
6767
|
-
const errorMessage = err instanceof
|
|
6767
|
+
const errorMessage = err instanceof import_browser44.AsgardeoAPIError ? err.message : t("errors.sign.in.initialization");
|
|
6768
6768
|
setError(errorMessage);
|
|
6769
6769
|
onError?.(err);
|
|
6770
6770
|
} finally {
|
|
@@ -6781,7 +6781,7 @@ var BaseSignInContent = ({
|
|
|
6781
6781
|
if (hasMultipleOptions() && !currentAuthenticator) {
|
|
6782
6782
|
const availableAuthenticators = getAvailableAuthenticators();
|
|
6783
6783
|
const userPromptAuthenticators = availableAuthenticators.filter(
|
|
6784
|
-
(auth) => auth.metadata?.promptType ===
|
|
6784
|
+
(auth) => auth.metadata?.promptType === import_browser44.EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt || // Fallback: LOCAL authenticators with params are typically user prompts
|
|
6785
6785
|
auth.idp === "LOCAL" && auth.metadata?.params && auth.metadata.params.length > 0
|
|
6786
6786
|
);
|
|
6787
6787
|
const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
|
|
@@ -6966,15 +6966,15 @@ var SignIn = ({ className, size = "medium", ...rest }) => {
|
|
|
6966
6966
|
var SignIn_default = SignIn;
|
|
6967
6967
|
|
|
6968
6968
|
// src/components/presentation/SignUp/BaseSignUp.tsx
|
|
6969
|
-
var
|
|
6969
|
+
var import_browser52 = require("@asgardeo/browser");
|
|
6970
6970
|
var import_css37 = require("@emotion/css");
|
|
6971
6971
|
var import_react58 = require("react");
|
|
6972
6972
|
|
|
6973
6973
|
// src/components/presentation/SignUp/options/SignUpOptionFactory.tsx
|
|
6974
|
-
var
|
|
6974
|
+
var import_browser51 = require("@asgardeo/browser");
|
|
6975
6975
|
|
|
6976
6976
|
// src/components/presentation/SignUp/options/CheckboxInput.tsx
|
|
6977
|
-
var
|
|
6977
|
+
var import_browser45 = require("@asgardeo/browser");
|
|
6978
6978
|
var CheckboxInput = ({
|
|
6979
6979
|
component,
|
|
6980
6980
|
formValues,
|
|
@@ -6988,7 +6988,7 @@ var CheckboxInput = ({
|
|
|
6988
6988
|
const value = formValues[fieldName] || "";
|
|
6989
6989
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
6990
6990
|
return createField({
|
|
6991
|
-
type:
|
|
6991
|
+
type: import_browser45.FieldType.Checkbox,
|
|
6992
6992
|
name: fieldName,
|
|
6993
6993
|
label: config["label"] || "",
|
|
6994
6994
|
placeholder: config["placeholder"] || "",
|
|
@@ -7002,7 +7002,7 @@ var CheckboxInput = ({
|
|
|
7002
7002
|
var CheckboxInput_default = CheckboxInput;
|
|
7003
7003
|
|
|
7004
7004
|
// src/components/presentation/SignUp/options/DateInput.tsx
|
|
7005
|
-
var
|
|
7005
|
+
var import_browser46 = require("@asgardeo/browser");
|
|
7006
7006
|
var DateInput = ({
|
|
7007
7007
|
component,
|
|
7008
7008
|
formValues,
|
|
@@ -7016,7 +7016,7 @@ var DateInput = ({
|
|
|
7016
7016
|
const value = formValues[fieldName] || "";
|
|
7017
7017
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7018
7018
|
return createField({
|
|
7019
|
-
type:
|
|
7019
|
+
type: import_browser46.FieldType.Date,
|
|
7020
7020
|
name: fieldName,
|
|
7021
7021
|
label: config["label"] || "",
|
|
7022
7022
|
placeholder: config["placeholder"] || "",
|
|
@@ -7049,7 +7049,7 @@ var DividerComponent = ({ component }) => {
|
|
|
7049
7049
|
var DividerComponent_default = DividerComponent;
|
|
7050
7050
|
|
|
7051
7051
|
// src/components/presentation/SignUp/options/EmailInput.tsx
|
|
7052
|
-
var
|
|
7052
|
+
var import_browser47 = require("@asgardeo/browser");
|
|
7053
7053
|
var EmailInput = ({
|
|
7054
7054
|
component,
|
|
7055
7055
|
formValues,
|
|
@@ -7063,7 +7063,7 @@ var EmailInput = ({
|
|
|
7063
7063
|
const value = formValues[fieldName] || "";
|
|
7064
7064
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7065
7065
|
return createField({
|
|
7066
|
-
type:
|
|
7066
|
+
type: import_browser47.FieldType.Email,
|
|
7067
7067
|
name: fieldName,
|
|
7068
7068
|
label: config["label"] || "Email",
|
|
7069
7069
|
placeholder: config["placeholder"] || "Enter your email",
|
|
@@ -7134,7 +7134,7 @@ var ImageComponent = ({ component }) => {
|
|
|
7134
7134
|
var ImageComponent_default = ImageComponent;
|
|
7135
7135
|
|
|
7136
7136
|
// src/components/presentation/SignUp/options/NumberInput.tsx
|
|
7137
|
-
var
|
|
7137
|
+
var import_browser48 = require("@asgardeo/browser");
|
|
7138
7138
|
var NumberInput = ({
|
|
7139
7139
|
component,
|
|
7140
7140
|
formValues,
|
|
@@ -7148,7 +7148,7 @@ var NumberInput = ({
|
|
|
7148
7148
|
const value = formValues[fieldName] || "";
|
|
7149
7149
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7150
7150
|
return createField({
|
|
7151
|
-
type:
|
|
7151
|
+
type: import_browser48.FieldType.Number,
|
|
7152
7152
|
name: fieldName,
|
|
7153
7153
|
label: config["label"] || "",
|
|
7154
7154
|
placeholder: config["placeholder"] || "",
|
|
@@ -7162,7 +7162,7 @@ var NumberInput = ({
|
|
|
7162
7162
|
var NumberInput_default = NumberInput;
|
|
7163
7163
|
|
|
7164
7164
|
// src/components/presentation/SignUp/options/PasswordInput.tsx
|
|
7165
|
-
var
|
|
7165
|
+
var import_browser49 = require("@asgardeo/browser");
|
|
7166
7166
|
var PasswordInput = ({
|
|
7167
7167
|
component,
|
|
7168
7168
|
formValues,
|
|
@@ -7208,7 +7208,7 @@ var PasswordInput = ({
|
|
|
7208
7208
|
});
|
|
7209
7209
|
const hint = validationHints.length > 0 ? validationHints.join(", ") : config["hint"] || "";
|
|
7210
7210
|
return createField({
|
|
7211
|
-
type:
|
|
7211
|
+
type: import_browser49.FieldType.Password,
|
|
7212
7212
|
name: fieldName,
|
|
7213
7213
|
label: config["label"] || "Password",
|
|
7214
7214
|
placeholder: config["placeholder"] || "Enter your password",
|
|
@@ -7307,7 +7307,7 @@ var TelephoneInput = ({
|
|
|
7307
7307
|
var TelephoneInput_default = TelephoneInput;
|
|
7308
7308
|
|
|
7309
7309
|
// src/components/presentation/SignUp/options/TextInput.tsx
|
|
7310
|
-
var
|
|
7310
|
+
var import_browser50 = require("@asgardeo/browser");
|
|
7311
7311
|
var TextInput = ({
|
|
7312
7312
|
component,
|
|
7313
7313
|
formValues,
|
|
@@ -7321,7 +7321,7 @@ var TextInput = ({
|
|
|
7321
7321
|
const value = formValues[fieldName] || "";
|
|
7322
7322
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
7323
7323
|
return createField({
|
|
7324
|
-
type:
|
|
7324
|
+
type: import_browser50.FieldType.Text,
|
|
7325
7325
|
name: fieldName,
|
|
7326
7326
|
label: config["label"] || "",
|
|
7327
7327
|
placeholder: config["placeholder"] || "",
|
|
@@ -7392,9 +7392,9 @@ var Typography_default2 = TypographyComponent;
|
|
|
7392
7392
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
7393
7393
|
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
7394
7394
|
switch (component.type) {
|
|
7395
|
-
case
|
|
7395
|
+
case import_browser51.EmbeddedFlowComponentType.Typography:
|
|
7396
7396
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Typography_default2, { component, onSubmit, ...rest });
|
|
7397
|
-
case
|
|
7397
|
+
case import_browser51.EmbeddedFlowComponentType.Input:
|
|
7398
7398
|
const inputVariant = component.variant?.toUpperCase();
|
|
7399
7399
|
const inputType = component.config["type"]?.toLowerCase();
|
|
7400
7400
|
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
@@ -7416,7 +7416,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
7416
7416
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CheckboxInput_default, { component, onSubmit, ...rest });
|
|
7417
7417
|
}
|
|
7418
7418
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TextInput_default, { component, onSubmit, ...rest });
|
|
7419
|
-
case
|
|
7419
|
+
case import_browser51.EmbeddedFlowComponentType.Button: {
|
|
7420
7420
|
const buttonVariant = component.variant?.toUpperCase();
|
|
7421
7421
|
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
7422
7422
|
if (buttonVariant === "SOCIAL") {
|
|
@@ -7441,11 +7441,11 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
7441
7441
|
}
|
|
7442
7442
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
|
|
7443
7443
|
}
|
|
7444
|
-
case
|
|
7444
|
+
case import_browser51.EmbeddedFlowComponentType.Form:
|
|
7445
7445
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(FormContainer_default, { component, onSubmit, ...rest });
|
|
7446
|
-
case
|
|
7446
|
+
case import_browser51.EmbeddedFlowComponentType.Divider:
|
|
7447
7447
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
|
|
7448
|
-
case
|
|
7448
|
+
case import_browser51.EmbeddedFlowComponentType.Image:
|
|
7449
7449
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
|
|
7450
7450
|
default:
|
|
7451
7451
|
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", {});
|
|
@@ -7660,7 +7660,7 @@ var BaseSignUpContent = ({
|
|
|
7660
7660
|
const fields = [];
|
|
7661
7661
|
const processComponents = (comps) => {
|
|
7662
7662
|
comps.forEach((component) => {
|
|
7663
|
-
if (component.type ===
|
|
7663
|
+
if (component.type === import_browser52.EmbeddedFlowComponentType.Input) {
|
|
7664
7664
|
const config = component.config || {};
|
|
7665
7665
|
fields.push({
|
|
7666
7666
|
name: config.name || component.id,
|
|
@@ -7752,11 +7752,11 @@ var BaseSignUpContent = ({
|
|
|
7752
7752
|
};
|
|
7753
7753
|
const response = await onSubmit(payload);
|
|
7754
7754
|
onFlowChange?.(response);
|
|
7755
|
-
if (response.flowStatus ===
|
|
7755
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7756
7756
|
onComplete?.(response);
|
|
7757
7757
|
return;
|
|
7758
7758
|
}
|
|
7759
|
-
if (response.flowStatus ===
|
|
7759
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7760
7760
|
if (handleRedirectionIfNeeded(response, component)) {
|
|
7761
7761
|
return;
|
|
7762
7762
|
}
|
|
@@ -7764,7 +7764,7 @@ var BaseSignUpContent = ({
|
|
|
7764
7764
|
setupFormFields(response);
|
|
7765
7765
|
}
|
|
7766
7766
|
} catch (err) {
|
|
7767
|
-
const errorMessage = err instanceof
|
|
7767
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7768
7768
|
setError(errorMessage);
|
|
7769
7769
|
onError?.(err);
|
|
7770
7770
|
} finally {
|
|
@@ -7772,7 +7772,7 @@ var BaseSignUpContent = ({
|
|
|
7772
7772
|
}
|
|
7773
7773
|
};
|
|
7774
7774
|
const handleRedirectionIfNeeded = (response, component) => {
|
|
7775
|
-
if (response?.type ===
|
|
7775
|
+
if (response?.type === import_browser52.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
|
|
7776
7776
|
const redirectUrl = response.data.redirectURL;
|
|
7777
7777
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
7778
7778
|
if (!popup) {
|
|
@@ -7801,16 +7801,16 @@ var BaseSignUpContent = ({
|
|
|
7801
7801
|
try {
|
|
7802
7802
|
const continueResponse = await onSubmit(payload);
|
|
7803
7803
|
onFlowChange?.(continueResponse);
|
|
7804
|
-
if (continueResponse.flowStatus ===
|
|
7804
|
+
if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7805
7805
|
onComplete?.(continueResponse);
|
|
7806
|
-
} else if (continueResponse.flowStatus ===
|
|
7806
|
+
} else if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7807
7807
|
setCurrentFlow(continueResponse);
|
|
7808
7808
|
setupFormFields(continueResponse);
|
|
7809
7809
|
}
|
|
7810
7810
|
popup.close();
|
|
7811
7811
|
cleanup();
|
|
7812
7812
|
} catch (err) {
|
|
7813
|
-
const errorMessage = err instanceof
|
|
7813
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7814
7814
|
setError(errorMessage);
|
|
7815
7815
|
onError?.(err);
|
|
7816
7816
|
popup.close();
|
|
@@ -7862,15 +7862,15 @@ var BaseSignUpContent = ({
|
|
|
7862
7862
|
try {
|
|
7863
7863
|
const continueResponse = await onSubmit(payload);
|
|
7864
7864
|
onFlowChange?.(continueResponse);
|
|
7865
|
-
if (continueResponse.flowStatus ===
|
|
7865
|
+
if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7866
7866
|
onComplete?.(continueResponse);
|
|
7867
|
-
} else if (continueResponse.flowStatus ===
|
|
7867
|
+
} else if (continueResponse.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7868
7868
|
setCurrentFlow(continueResponse);
|
|
7869
7869
|
setupFormFields(continueResponse);
|
|
7870
7870
|
}
|
|
7871
7871
|
popup.close();
|
|
7872
7872
|
} catch (err) {
|
|
7873
|
-
const errorMessage = err instanceof
|
|
7873
|
+
const errorMessage = err instanceof import_browser52.AsgardeoAPIError ? err.message : t("errors.sign.up.flow.failure");
|
|
7874
7874
|
setError(errorMessage);
|
|
7875
7875
|
onError?.(err);
|
|
7876
7876
|
popup.close();
|
|
@@ -7889,30 +7889,30 @@ var BaseSignUpContent = ({
|
|
|
7889
7889
|
};
|
|
7890
7890
|
const containerClasses = (0, import_css37.cx)(
|
|
7891
7891
|
[
|
|
7892
|
-
(0,
|
|
7893
|
-
(0,
|
|
7894
|
-
(0,
|
|
7892
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signup"),
|
|
7893
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signup--${size}`),
|
|
7894
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signup--${variant}`)
|
|
7895
7895
|
],
|
|
7896
7896
|
className
|
|
7897
7897
|
);
|
|
7898
7898
|
const inputClasses = (0, import_css37.cx)(
|
|
7899
7899
|
[
|
|
7900
|
-
(0,
|
|
7901
|
-
size === "small" && (0,
|
|
7902
|
-
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")
|
|
7903
7903
|
],
|
|
7904
7904
|
inputClassName
|
|
7905
7905
|
);
|
|
7906
7906
|
const buttonClasses = (0, import_css37.cx)(
|
|
7907
7907
|
[
|
|
7908
|
-
(0,
|
|
7909
|
-
size === "small" && (0,
|
|
7910
|
-
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")
|
|
7911
7911
|
],
|
|
7912
7912
|
buttonClassName
|
|
7913
7913
|
);
|
|
7914
|
-
const errorClasses = (0, import_css37.cx)([(0,
|
|
7915
|
-
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);
|
|
7916
7916
|
const renderComponents = (0, import_react58.useCallback)(
|
|
7917
7917
|
(components) => renderSignUpComponents(
|
|
7918
7918
|
components,
|
|
@@ -7956,11 +7956,11 @@ var BaseSignUpContent = ({
|
|
|
7956
7956
|
setCurrentFlow(response);
|
|
7957
7957
|
setIsFlowInitialized(true);
|
|
7958
7958
|
onFlowChange?.(response);
|
|
7959
|
-
if (response.flowStatus ===
|
|
7959
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Complete) {
|
|
7960
7960
|
onComplete?.(response);
|
|
7961
7961
|
return;
|
|
7962
7962
|
}
|
|
7963
|
-
if (response.flowStatus ===
|
|
7963
|
+
if (response.flowStatus === import_browser52.EmbeddedFlowStatus.Incomplete) {
|
|
7964
7964
|
setupFormFields(response);
|
|
7965
7965
|
}
|
|
7966
7966
|
} catch (err) {
|
|
@@ -8014,7 +8014,7 @@ var BaseSignUpContent = ({
|
|
|
8014
8014
|
var BaseSignUp_default = BaseSignUp;
|
|
8015
8015
|
|
|
8016
8016
|
// src/components/presentation/SignUp/SignUp.tsx
|
|
8017
|
-
var
|
|
8017
|
+
var import_browser53 = require("@asgardeo/browser");
|
|
8018
8018
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8019
8019
|
var SignUp = ({
|
|
8020
8020
|
className,
|
|
@@ -8028,16 +8028,16 @@ var SignUp = ({
|
|
|
8028
8028
|
const { signUp, isInitialized } = useAsgardeo_default();
|
|
8029
8029
|
const handleInitialize = async (payload) => await signUp(
|
|
8030
8030
|
payload || {
|
|
8031
|
-
flowType:
|
|
8031
|
+
flowType: import_browser53.EmbeddedFlowType.Registration
|
|
8032
8032
|
}
|
|
8033
8033
|
);
|
|
8034
8034
|
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
8035
8035
|
const handleComplete = (response) => {
|
|
8036
8036
|
onComplete?.(response);
|
|
8037
|
-
if (shouldRedirectAfterSignUp && response?.type !==
|
|
8037
|
+
if (shouldRedirectAfterSignUp && response?.type !== import_browser53.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
|
|
8038
8038
|
window.location.href = afterSignUpUrl;
|
|
8039
8039
|
}
|
|
8040
|
-
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
|
|
8041
8041
|
!response.data.redirectURL.includes("auth")) {
|
|
8042
8042
|
window.location.href = response.data.redirectURL;
|
|
8043
8043
|
}
|
|
@@ -8100,35 +8100,35 @@ Organization5.displayName = "Organization";
|
|
|
8100
8100
|
var Organization_default = Organization5;
|
|
8101
8101
|
|
|
8102
8102
|
// src/components/presentation/UserProfile/BaseUserProfile.tsx
|
|
8103
|
-
var
|
|
8103
|
+
var import_browser59 = require("@asgardeo/browser");
|
|
8104
8104
|
var import_css45 = require("@emotion/css");
|
|
8105
8105
|
var import_react67 = require("react");
|
|
8106
8106
|
|
|
8107
8107
|
// src/utils/getMappedUserProfileValue.ts
|
|
8108
|
-
var
|
|
8108
|
+
var import_browser54 = require("@asgardeo/browser");
|
|
8109
8109
|
var getMappedUserProfileValue = (key, mappings, user) => {
|
|
8110
8110
|
if (!key || !mappings || !user) {
|
|
8111
8111
|
return void 0;
|
|
8112
8112
|
}
|
|
8113
8113
|
const mapping = mappings[key];
|
|
8114
8114
|
if (!mapping) {
|
|
8115
|
-
return (0,
|
|
8115
|
+
return (0, import_browser54.get)(user, key);
|
|
8116
8116
|
}
|
|
8117
8117
|
if (Array.isArray(mapping)) {
|
|
8118
8118
|
for (const path of mapping) {
|
|
8119
|
-
const value = (0,
|
|
8119
|
+
const value = (0, import_browser54.get)(user, path);
|
|
8120
8120
|
if (value !== void 0 && value !== null && value !== "") {
|
|
8121
8121
|
return value;
|
|
8122
8122
|
}
|
|
8123
8123
|
}
|
|
8124
8124
|
return void 0;
|
|
8125
8125
|
}
|
|
8126
|
-
return (0,
|
|
8126
|
+
return (0, import_browser54.get)(user, mapping);
|
|
8127
8127
|
};
|
|
8128
8128
|
var getMappedUserProfileValue_default = getMappedUserProfileValue;
|
|
8129
8129
|
|
|
8130
8130
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
8131
|
-
var
|
|
8131
|
+
var import_browser55 = require("@asgardeo/browser");
|
|
8132
8132
|
var import_css39 = require("@emotion/css");
|
|
8133
8133
|
var import_react60 = require("react");
|
|
8134
8134
|
|
|
@@ -8247,20 +8247,20 @@ var Avatar = ({
|
|
|
8247
8247
|
const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
|
|
8248
8248
|
const renderContent = () => {
|
|
8249
8249
|
if (imageUrl) {
|
|
8250
|
-
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) });
|
|
8251
8251
|
}
|
|
8252
8252
|
if (name) {
|
|
8253
8253
|
return getInitials(name);
|
|
8254
8254
|
}
|
|
8255
8255
|
if (isLoading) {
|
|
8256
|
-
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) });
|
|
8257
8257
|
}
|
|
8258
8258
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
8259
8259
|
"svg",
|
|
8260
8260
|
{
|
|
8261
8261
|
xmlns: "http://www.w3.org/2000/svg",
|
|
8262
8262
|
viewBox: "0 0 640 640",
|
|
8263
|
-
className: (0, import_css39.cx)((0,
|
|
8263
|
+
className: (0, import_css39.cx)((0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar", "icon")), styles.icon),
|
|
8264
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" })
|
|
8265
8265
|
}
|
|
8266
8266
|
);
|
|
@@ -8269,11 +8269,11 @@ var Avatar = ({
|
|
|
8269
8269
|
"div",
|
|
8270
8270
|
{
|
|
8271
8271
|
className: (0, import_css39.cx)(
|
|
8272
|
-
(0,
|
|
8272
|
+
(0, import_browser55.withVendorCSSClassPrefix)((0, import_browser55.bem)("avatar")),
|
|
8273
8273
|
styles.avatar,
|
|
8274
8274
|
styles.variant,
|
|
8275
|
-
(0,
|
|
8276
|
-
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")),
|
|
8277
8277
|
className
|
|
8278
8278
|
),
|
|
8279
8279
|
children: renderContent()
|
|
@@ -8283,7 +8283,7 @@ var Avatar = ({
|
|
|
8283
8283
|
var Avatar_default = Avatar;
|
|
8284
8284
|
|
|
8285
8285
|
// src/components/primitives/Dialog/Dialog.tsx
|
|
8286
|
-
var
|
|
8286
|
+
var import_browser56 = require("@asgardeo/browser");
|
|
8287
8287
|
var import_react62 = require("@floating-ui/react");
|
|
8288
8288
|
var import_css41 = require("@emotion/css");
|
|
8289
8289
|
var import_react63 = __toESM(require("react"), 1);
|
|
@@ -8520,11 +8520,11 @@ var DialogContent = import_react63.default.forwardRef((props, propRef) => {
|
|
|
8520
8520
|
const styles = Dialog_styles_default(theme, colorScheme);
|
|
8521
8521
|
const ref = (0, import_react62.useMergeRefs)([context.refs.setFloating, propRef]);
|
|
8522
8522
|
if (!floatingContext.open) return null;
|
|
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,
|
|
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)(
|
|
8524
8524
|
"div",
|
|
8525
8525
|
{
|
|
8526
8526
|
ref,
|
|
8527
|
-
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),
|
|
8528
8528
|
"aria-labelledby": context.labelId,
|
|
8529
8529
|
"aria-describedby": context.descriptionId,
|
|
8530
8530
|
...context.getFloatingProps(props),
|
|
@@ -8542,14 +8542,14 @@ var DialogHeading = import_react63.default.forwardRef(
|
|
|
8542
8542
|
context.setLabelId(id);
|
|
8543
8543
|
return () => context.setLabelId(void 0);
|
|
8544
8544
|
}, [id, context.setLabelId]);
|
|
8545
|
-
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: [
|
|
8546
8546
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
8547
8547
|
"h2",
|
|
8548
8548
|
{
|
|
8549
8549
|
...props,
|
|
8550
8550
|
ref,
|
|
8551
8551
|
id,
|
|
8552
|
-
className: (0, import_css41.cx)((0,
|
|
8552
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "title")), styles.headerTitle),
|
|
8553
8553
|
children
|
|
8554
8554
|
}
|
|
8555
8555
|
),
|
|
@@ -8584,7 +8584,7 @@ var DialogDescription = import_react63.default.forwardRef(
|
|
|
8584
8584
|
...props,
|
|
8585
8585
|
ref,
|
|
8586
8586
|
id,
|
|
8587
|
-
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),
|
|
8588
8588
|
children
|
|
8589
8589
|
}
|
|
8590
8590
|
);
|
|
@@ -8614,7 +8614,7 @@ var DialogClose = import_react63.default.forwardRef(({ children, asChild = false
|
|
|
8614
8614
|
...props,
|
|
8615
8615
|
ref,
|
|
8616
8616
|
onClick: handleClick,
|
|
8617
|
-
className: (0, import_css41.cx)((0,
|
|
8617
|
+
className: (0, import_css41.cx)((0, import_browser56.withVendorCSSClassPrefix)((0, import_browser56.bem)("dialog", "close")), props.className),
|
|
8618
8618
|
variant: "text",
|
|
8619
8619
|
children
|
|
8620
8620
|
}
|
|
@@ -8635,7 +8635,7 @@ var Dialog_default = Dialog;
|
|
|
8635
8635
|
// src/components/primitives/MultiInput/MultiInput.tsx
|
|
8636
8636
|
var import_react65 = require("react");
|
|
8637
8637
|
var import_css43 = require("@emotion/css");
|
|
8638
|
-
var
|
|
8638
|
+
var import_browser57 = require("@asgardeo/browser");
|
|
8639
8639
|
|
|
8640
8640
|
// src/components/primitives/MultiInput/MultiInput.styles.ts
|
|
8641
8641
|
var import_css42 = require("@emotion/css");
|
|
@@ -8827,26 +8827,26 @@ var MultiInput = ({
|
|
|
8827
8827
|
{
|
|
8828
8828
|
error,
|
|
8829
8829
|
helperText,
|
|
8830
|
-
className: (0, import_css43.cx)((0,
|
|
8830
|
+
className: (0, import_css43.cx)((0, import_browser57.withVendorCSSClassPrefix)((0, import_browser57.bem)("multi-input")), className),
|
|
8831
8831
|
style,
|
|
8832
8832
|
children: [
|
|
8833
8833
|
label && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(InputLabel_default, { required, error: !!error, children: label }),
|
|
8834
|
-
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: (0, import_css43.cx)((0,
|
|
8835
|
-
/* @__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(
|
|
8836
8836
|
currentInputValue,
|
|
8837
8837
|
setCurrentInputValue,
|
|
8838
8838
|
canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlusIcon, { className: styles.plusIcon }) : void 0,
|
|
8839
8839
|
canAddMore ? handleInputSubmit : void 0
|
|
8840
8840
|
) }) }),
|
|
8841
|
-
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)(
|
|
8842
8842
|
"div",
|
|
8843
8843
|
{
|
|
8844
|
-
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),
|
|
8845
8845
|
children: [
|
|
8846
8846
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
8847
8847
|
"span",
|
|
8848
8848
|
{
|
|
8849
|
-
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),
|
|
8850
8850
|
children: value
|
|
8851
8851
|
}
|
|
8852
8852
|
),
|
|
@@ -8856,7 +8856,7 @@ var MultiInput = ({
|
|
|
8856
8856
|
type: "button",
|
|
8857
8857
|
onClick: () => handleRemoveValue(index),
|
|
8858
8858
|
disabled,
|
|
8859
|
-
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),
|
|
8860
8860
|
title: "Remove value",
|
|
8861
8861
|
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(BinIcon, { className: styles.icon })
|
|
8862
8862
|
}
|
|
@@ -8875,7 +8875,7 @@ var MultiInput_default = MultiInput;
|
|
|
8875
8875
|
// src/components/presentation/UserProfile/BaseUserProfile.styles.ts
|
|
8876
8876
|
var import_css44 = require("@emotion/css");
|
|
8877
8877
|
var import_react66 = require("react");
|
|
8878
|
-
var
|
|
8878
|
+
var import_browser58 = require("@asgardeo/browser");
|
|
8879
8879
|
var useStyles21 = (theme, colorScheme) => {
|
|
8880
8880
|
const valuePlaceholder = import_css44.css`
|
|
8881
8881
|
font-style: italic;
|
|
@@ -8986,7 +8986,7 @@ var useStyles21 = (theme, colorScheme) => {
|
|
|
8986
8986
|
max-width: 350px;
|
|
8987
8987
|
text-align: left;
|
|
8988
8988
|
|
|
8989
|
-
.${(0,
|
|
8989
|
+
.${(0, import_browser58.withVendorCSSClassPrefix)("form-control")} {
|
|
8990
8990
|
margin-bottom: 0;
|
|
8991
8991
|
}
|
|
8992
8992
|
|
|
@@ -9174,7 +9174,7 @@ var BaseUserProfile = ({
|
|
|
9174
9174
|
fieldValue = fieldValue.filter((v) => v !== void 0 && v !== null && v !== "");
|
|
9175
9175
|
}
|
|
9176
9176
|
let payload = {};
|
|
9177
|
-
if (schema.schemaId && schema.schemaId !==
|
|
9177
|
+
if (schema.schemaId && schema.schemaId !== import_browser59.WellKnownSchemaIds.User) {
|
|
9178
9178
|
payload = {
|
|
9179
9179
|
[schema.schemaId]: {
|
|
9180
9180
|
[fieldName]: fieldValue
|
|
@@ -9413,7 +9413,7 @@ var BaseUserProfile = ({
|
|
|
9413
9413
|
const containerClasses = (0, import_css45.cx)(
|
|
9414
9414
|
styles.root,
|
|
9415
9415
|
cardLayout ? styles.card : "",
|
|
9416
|
-
(0,
|
|
9416
|
+
(0, import_browser59.withVendorCSSClassPrefix)("user-profile"),
|
|
9417
9417
|
className
|
|
9418
9418
|
);
|
|
9419
9419
|
const currentUser = flattenedProfile || profile;
|
|
@@ -9431,7 +9431,7 @@ var BaseUserProfile = ({
|
|
|
9431
9431
|
] }, key)) });
|
|
9432
9432
|
};
|
|
9433
9433
|
const profileContent = /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(Card_default, { className: containerClasses, children: [
|
|
9434
|
-
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: [
|
|
9435
9435
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Alert_default.Title, { children: t("errors.title") || "Error" }),
|
|
9436
9436
|
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Alert_default.Description, { children: error })
|
|
9437
9437
|
] }),
|
|
@@ -9479,8 +9479,8 @@ var BaseUserProfile_default = BaseUserProfile;
|
|
|
9479
9479
|
var import_react68 = require("react");
|
|
9480
9480
|
|
|
9481
9481
|
// src/api/updateMeProfile.ts
|
|
9482
|
-
var
|
|
9483
|
-
var httpClient5 =
|
|
9482
|
+
var import_browser60 = require("@asgardeo/browser");
|
|
9483
|
+
var httpClient5 = import_browser60.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser60.AsgardeoSPAClient.getInstance());
|
|
9484
9484
|
var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
9485
9485
|
const defaultFetcher = async (url, config) => {
|
|
9486
9486
|
const response = await httpClient5({
|
|
@@ -9497,7 +9497,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
|
9497
9497
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
9498
9498
|
};
|
|
9499
9499
|
};
|
|
9500
|
-
return (0,
|
|
9500
|
+
return (0, import_browser60.updateMeProfile)({
|
|
9501
9501
|
...requestConfig,
|
|
9502
9502
|
fetcher: fetcher || defaultFetcher
|
|
9503
9503
|
});
|
|
@@ -9505,7 +9505,7 @@ var updateMeProfile = async ({ fetcher, ...requestConfig }) => {
|
|
|
9505
9505
|
var updateMeProfile_default = updateMeProfile;
|
|
9506
9506
|
|
|
9507
9507
|
// src/components/presentation/UserProfile/UserProfile.tsx
|
|
9508
|
-
var
|
|
9508
|
+
var import_browser61 = require("@asgardeo/browser");
|
|
9509
9509
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
9510
9510
|
var UserProfile3 = ({ ...rest }) => {
|
|
9511
9511
|
const { baseUrl, isLoading } = useAsgardeo_default();
|
|
@@ -9519,7 +9519,7 @@ var UserProfile3 = ({ ...rest }) => {
|
|
|
9519
9519
|
onUpdateProfile(response);
|
|
9520
9520
|
} catch (error2) {
|
|
9521
9521
|
let message = t("user.profile.update.generic.error");
|
|
9522
|
-
if (error2 instanceof
|
|
9522
|
+
if (error2 instanceof import_browser61.AsgardeoError) {
|
|
9523
9523
|
message = error2?.message;
|
|
9524
9524
|
}
|
|
9525
9525
|
setError(message);
|
|
@@ -9540,7 +9540,7 @@ var UserProfile3 = ({ ...rest }) => {
|
|
|
9540
9540
|
var UserProfile_default = UserProfile3;
|
|
9541
9541
|
|
|
9542
9542
|
// src/components/presentation/UserDropdown/BaseUserDropdown.tsx
|
|
9543
|
-
var
|
|
9543
|
+
var import_browser62 = require("@asgardeo/browser");
|
|
9544
9544
|
var import_react70 = require("@floating-ui/react");
|
|
9545
9545
|
var import_css47 = require("@emotion/css");
|
|
9546
9546
|
var import_react71 = require("react");
|
|
@@ -9806,12 +9806,12 @@ var BaseUserDropdown = ({
|
|
|
9806
9806
|
}
|
|
9807
9807
|
allMenuItems.push(...defaultMenuItems);
|
|
9808
9808
|
}
|
|
9809
|
-
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: [
|
|
9810
9810
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
9811
9811
|
Button_default,
|
|
9812
9812
|
{
|
|
9813
9813
|
ref: refs.setReference,
|
|
9814
|
-
className: (0, import_css47.cx)((0,
|
|
9814
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles.trigger),
|
|
9815
9815
|
color: "tertiary",
|
|
9816
9816
|
variant: "text",
|
|
9817
9817
|
size: "medium",
|
|
@@ -9830,7 +9830,7 @@ var BaseUserDropdown = ({
|
|
|
9830
9830
|
Typography_default,
|
|
9831
9831
|
{
|
|
9832
9832
|
variant: "body2",
|
|
9833
|
-
className: (0, import_css47.cx)((0,
|
|
9833
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles.userName),
|
|
9834
9834
|
children: getDisplayName()
|
|
9835
9835
|
}
|
|
9836
9836
|
)
|
|
@@ -9841,11 +9841,11 @@ var BaseUserDropdown = ({
|
|
|
9841
9841
|
"div",
|
|
9842
9842
|
{
|
|
9843
9843
|
ref: refs.setFloating,
|
|
9844
|
-
className: (0, import_css47.cx)((0,
|
|
9844
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__content"), styles.dropdownContent),
|
|
9845
9845
|
style: floatingStyles,
|
|
9846
9846
|
...getFloatingProps(),
|
|
9847
9847
|
children: [
|
|
9848
|
-
/* @__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: [
|
|
9849
9849
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
9850
9850
|
Avatar,
|
|
9851
9851
|
{
|
|
@@ -9855,12 +9855,12 @@ var BaseUserDropdown = ({
|
|
|
9855
9855
|
alt: `${getDisplayName()}'s avatar`
|
|
9856
9856
|
}
|
|
9857
9857
|
),
|
|
9858
|
-
/* @__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: [
|
|
9859
9859
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
9860
9860
|
Typography_default,
|
|
9861
9861
|
{
|
|
9862
9862
|
noWrap: true,
|
|
9863
|
-
className: (0,
|
|
9863
|
+
className: (0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header-name"),
|
|
9864
9864
|
variant: "body1",
|
|
9865
9865
|
fontWeight: "medium",
|
|
9866
9866
|
children: getDisplayName()
|
|
@@ -9870,7 +9870,7 @@ var BaseUserDropdown = ({
|
|
|
9870
9870
|
Typography_default,
|
|
9871
9871
|
{
|
|
9872
9872
|
noWrap: true,
|
|
9873
|
-
className: (0,
|
|
9873
|
+
className: (0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__header-email"),
|
|
9874
9874
|
variant: "caption",
|
|
9875
9875
|
color: "secondary",
|
|
9876
9876
|
children: getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user)
|
|
@@ -9878,14 +9878,14 @@ var BaseUserDropdown = ({
|
|
|
9878
9878
|
)
|
|
9879
9879
|
] })
|
|
9880
9880
|
] }),
|
|
9881
|
-
/* @__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)(
|
|
9882
9882
|
"a",
|
|
9883
9883
|
{
|
|
9884
9884
|
href: item.href,
|
|
9885
9885
|
style: {
|
|
9886
9886
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
9887
9887
|
},
|
|
9888
|
-
className: (0, import_css47.cx)((0,
|
|
9888
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItemAnchor),
|
|
9889
9889
|
onMouseEnter: () => setHoveredItemIndex(index),
|
|
9890
9890
|
onMouseLeave: () => setHoveredItemIndex(null),
|
|
9891
9891
|
onFocus: () => setHoveredItemIndex(index),
|
|
@@ -9902,7 +9902,7 @@ var BaseUserDropdown = ({
|
|
|
9902
9902
|
style: {
|
|
9903
9903
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
9904
9904
|
},
|
|
9905
|
-
className: (0, import_css47.cx)((0,
|
|
9905
|
+
className: (0, import_css47.cx)((0, import_browser62.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles.menuItem),
|
|
9906
9906
|
color: "tertiary",
|
|
9907
9907
|
variant: "text",
|
|
9908
9908
|
size: "small",
|
|
@@ -10804,8 +10804,8 @@ var BaseCreateOrganization = ({
|
|
|
10804
10804
|
};
|
|
10805
10805
|
|
|
10806
10806
|
// src/api/createOrganization.ts
|
|
10807
|
-
var
|
|
10808
|
-
var httpClient6 =
|
|
10807
|
+
var import_browser63 = require("@asgardeo/browser");
|
|
10808
|
+
var httpClient6 = import_browser63.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser63.AsgardeoSPAClient.getInstance());
|
|
10809
10809
|
var createOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
10810
10810
|
const defaultFetcher = async (url, config) => {
|
|
10811
10811
|
const response = await httpClient6({
|
|
@@ -10822,7 +10822,7 @@ var createOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
10822
10822
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
10823
10823
|
};
|
|
10824
10824
|
};
|
|
10825
|
-
return (0,
|
|
10825
|
+
return (0, import_browser63.createOrganization)({
|
|
10826
10826
|
...requestConfig,
|
|
10827
10827
|
fetcher: fetcher || defaultFetcher
|
|
10828
10828
|
});
|
|
@@ -10897,12 +10897,12 @@ var CreateOrganization = ({
|
|
|
10897
10897
|
var import_react83 = require("react");
|
|
10898
10898
|
|
|
10899
10899
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
|
|
10900
|
-
var
|
|
10900
|
+
var import_browser65 = require("@asgardeo/browser");
|
|
10901
10901
|
var import_css55 = require("@emotion/css");
|
|
10902
10902
|
var import_react82 = require("react");
|
|
10903
10903
|
|
|
10904
10904
|
// src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
10905
|
-
var
|
|
10905
|
+
var import_browser64 = require("@asgardeo/browser");
|
|
10906
10906
|
var import_css53 = require("@emotion/css");
|
|
10907
10907
|
var import_react80 = require("react");
|
|
10908
10908
|
|
|
@@ -11137,27 +11137,27 @@ var KeyValueInput = ({
|
|
|
11137
11137
|
);
|
|
11138
11138
|
const canAddMore = !maxPairs || pairs.length < maxPairs;
|
|
11139
11139
|
const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
|
|
11140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11141
|
-
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: [
|
|
11142
11142
|
label,
|
|
11143
11143
|
required && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11144
11144
|
"span",
|
|
11145
11145
|
{
|
|
11146
|
-
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),
|
|
11147
11147
|
children: " *"
|
|
11148
11148
|
}
|
|
11149
11149
|
)
|
|
11150
11150
|
] }),
|
|
11151
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: (0, import_css53.cx)((0,
|
|
11152
|
-
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)(
|
|
11153
11153
|
"div",
|
|
11154
11154
|
{
|
|
11155
|
-
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),
|
|
11156
11156
|
children: [
|
|
11157
11157
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
11158
11158
|
"span",
|
|
11159
11159
|
{
|
|
11160
|
-
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),
|
|
11161
11161
|
children: [
|
|
11162
11162
|
pair.key,
|
|
11163
11163
|
":"
|
|
@@ -11167,7 +11167,7 @@ var KeyValueInput = ({
|
|
|
11167
11167
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11168
11168
|
"span",
|
|
11169
11169
|
{
|
|
11170
|
-
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),
|
|
11171
11171
|
children: pair.value
|
|
11172
11172
|
}
|
|
11173
11173
|
)
|
|
@@ -11177,7 +11177,7 @@ var KeyValueInput = ({
|
|
|
11177
11177
|
)) : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
11178
11178
|
"div",
|
|
11179
11179
|
{
|
|
11180
|
-
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),
|
|
11181
11181
|
children: [
|
|
11182
11182
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11183
11183
|
TextField_default,
|
|
@@ -11186,7 +11186,7 @@ var KeyValueInput = ({
|
|
|
11186
11186
|
value: pair.key,
|
|
11187
11187
|
onChange: (e) => handleUpdatePair(index, "key", e.target.value),
|
|
11188
11188
|
disabled: disabled || readOnly,
|
|
11189
|
-
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),
|
|
11190
11190
|
"aria-label": `${keyLabel} ${index + 1}`
|
|
11191
11191
|
}
|
|
11192
11192
|
),
|
|
@@ -11197,7 +11197,7 @@ var KeyValueInput = ({
|
|
|
11197
11197
|
value: pair.value,
|
|
11198
11198
|
onChange: (e) => handleUpdatePair(index, "value", e.target.value),
|
|
11199
11199
|
disabled: disabled || readOnly,
|
|
11200
|
-
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),
|
|
11201
11201
|
"aria-label": `${valueLabel} ${index + 1}`
|
|
11202
11202
|
}
|
|
11203
11203
|
),
|
|
@@ -11207,7 +11207,7 @@ var KeyValueInput = ({
|
|
|
11207
11207
|
type: "button",
|
|
11208
11208
|
onClick: () => handleRemovePair(index),
|
|
11209
11209
|
disabled,
|
|
11210
|
-
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),
|
|
11211
11211
|
"aria-label": `${removeButtonText} ${pair.key}`,
|
|
11212
11212
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(X_default, { width: 16, height: 16 })
|
|
11213
11213
|
}
|
|
@@ -11216,7 +11216,7 @@ var KeyValueInput = ({
|
|
|
11216
11216
|
},
|
|
11217
11217
|
`${pair.key}-${index}`
|
|
11218
11218
|
)),
|
|
11219
|
-
!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: [
|
|
11220
11220
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
11221
11221
|
TextField_default,
|
|
11222
11222
|
{
|
|
@@ -11224,7 +11224,7 @@ var KeyValueInput = ({
|
|
|
11224
11224
|
value: newKey,
|
|
11225
11225
|
onChange: (e) => setNewKey(e.target.value),
|
|
11226
11226
|
disabled,
|
|
11227
|
-
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),
|
|
11228
11228
|
"aria-label": "New key"
|
|
11229
11229
|
}
|
|
11230
11230
|
),
|
|
@@ -11235,7 +11235,7 @@ var KeyValueInput = ({
|
|
|
11235
11235
|
value: newValue,
|
|
11236
11236
|
onChange: (e) => setNewValue(e.target.value),
|
|
11237
11237
|
disabled,
|
|
11238
|
-
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),
|
|
11239
11239
|
"aria-label": "New value",
|
|
11240
11240
|
onKeyPress: (e) => {
|
|
11241
11241
|
if (e.key === "Enter" && !isAddDisabled) {
|
|
@@ -11250,15 +11250,15 @@ var KeyValueInput = ({
|
|
|
11250
11250
|
type: "button",
|
|
11251
11251
|
onClick: handleAddPair,
|
|
11252
11252
|
disabled: isAddDisabled,
|
|
11253
|
-
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),
|
|
11254
11254
|
"aria-label": "Add new key-value pair",
|
|
11255
11255
|
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Plus_default, { width: 16, height: 16 })
|
|
11256
11256
|
}
|
|
11257
11257
|
)
|
|
11258
11258
|
] })
|
|
11259
11259
|
] }),
|
|
11260
|
-
(helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: (0, import_css53.cx)((0,
|
|
11261
|
-
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: [
|
|
11262
11262
|
pairs.length,
|
|
11263
11263
|
" of ",
|
|
11264
11264
|
maxPairs,
|
|
@@ -11462,13 +11462,13 @@ var BaseOrganizationProfile = ({
|
|
|
11462
11462
|
key: "created",
|
|
11463
11463
|
label: "Created Date",
|
|
11464
11464
|
editable: false,
|
|
11465
|
-
render: (value) => (0,
|
|
11465
|
+
render: (value) => (0, import_browser65.formatDate)(value)
|
|
11466
11466
|
},
|
|
11467
11467
|
{
|
|
11468
11468
|
key: "lastModified",
|
|
11469
11469
|
label: "Last Modified Date",
|
|
11470
11470
|
editable: false,
|
|
11471
|
-
render: (value) => (0,
|
|
11471
|
+
render: (value) => (0, import_browser65.formatDate)(value)
|
|
11472
11472
|
}
|
|
11473
11473
|
]
|
|
11474
11474
|
}) => {
|
|
@@ -11705,8 +11705,8 @@ var BaseOrganizationProfile = ({
|
|
|
11705
11705
|
var BaseOrganizationProfile_default = BaseOrganizationProfile;
|
|
11706
11706
|
|
|
11707
11707
|
// src/api/getOrganization.ts
|
|
11708
|
-
var
|
|
11709
|
-
var httpClient7 =
|
|
11708
|
+
var import_browser66 = require("@asgardeo/browser");
|
|
11709
|
+
var httpClient7 = import_browser66.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser66.AsgardeoSPAClient.getInstance());
|
|
11710
11710
|
var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
11711
11711
|
const defaultFetcher = async (url, config) => {
|
|
11712
11712
|
const response = await httpClient7({
|
|
@@ -11722,7 +11722,7 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
11722
11722
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
11723
11723
|
};
|
|
11724
11724
|
};
|
|
11725
|
-
return (0,
|
|
11725
|
+
return (0, import_browser66.getOrganization)({
|
|
11726
11726
|
...requestConfig,
|
|
11727
11727
|
fetcher: fetcher || defaultFetcher
|
|
11728
11728
|
});
|
|
@@ -11730,8 +11730,8 @@ var getOrganization = async ({ fetcher, ...requestConfig }) => {
|
|
|
11730
11730
|
var getOrganization_default = getOrganization;
|
|
11731
11731
|
|
|
11732
11732
|
// src/api/updateOrganization.ts
|
|
11733
|
-
var
|
|
11734
|
-
var httpClient8 =
|
|
11733
|
+
var import_browser67 = require("@asgardeo/browser");
|
|
11734
|
+
var httpClient8 = import_browser67.AsgardeoSPAClient.getInstance().httpRequest.bind(import_browser67.AsgardeoSPAClient.getInstance());
|
|
11735
11735
|
var updateOrganization = async ({
|
|
11736
11736
|
fetcher,
|
|
11737
11737
|
...requestConfig
|
|
@@ -11751,7 +11751,7 @@ var updateOrganization = async ({
|
|
|
11751
11751
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
11752
11752
|
};
|
|
11753
11753
|
};
|
|
11754
|
-
return (0,
|
|
11754
|
+
return (0, import_browser67.updateOrganization)({
|
|
11755
11755
|
...requestConfig,
|
|
11756
11756
|
fetcher: fetcher || defaultFetcher
|
|
11757
11757
|
});
|
|
@@ -11804,7 +11804,7 @@ var OrganizationProfile = ({
|
|
|
11804
11804
|
const handleOrganizationUpdate = async (payload) => {
|
|
11805
11805
|
if (!baseUrl || !organizationId) return;
|
|
11806
11806
|
try {
|
|
11807
|
-
const operations = (0,
|
|
11807
|
+
const operations = (0, import_browser67.createPatchOperations)(payload);
|
|
11808
11808
|
await updateOrganization_default({
|
|
11809
11809
|
baseUrl,
|
|
11810
11810
|
organizationId,
|
|
@@ -12460,5 +12460,5 @@ var OrganizationSwitcher = ({
|
|
|
12460
12460
|
var OrganizationSwitcher_default = OrganizationSwitcher;
|
|
12461
12461
|
|
|
12462
12462
|
// src/index.ts
|
|
12463
|
-
var
|
|
12463
|
+
var import_browser68 = require("@asgardeo/browser");
|
|
12464
12464
|
//# sourceMappingURL=index.js.map
|