@asgardeo/react 0.22.5 → 0.23.1
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 +1439 -1406
- package/dist/cjs/index.js.map +4 -4
- package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +36 -0
- package/dist/contexts/ComponentRenderer/ComponentRendererProvider.d.ts +24 -0
- package/dist/index.js +778 -745
- package/dist/index.js.map +4 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1006,17 +1006,30 @@ var BrandingProvider = ({
|
|
|
1006
1006
|
};
|
|
1007
1007
|
var BrandingProvider_default = BrandingProvider;
|
|
1008
1008
|
|
|
1009
|
+
// src/contexts/ComponentRenderer/ComponentRendererContext.ts
|
|
1010
|
+
import { createContext as createContext3 } from "react";
|
|
1011
|
+
var ComponentRendererContext = createContext3({});
|
|
1012
|
+
var ComponentRendererContext_default = ComponentRendererContext;
|
|
1013
|
+
|
|
1014
|
+
// src/contexts/ComponentRenderer/ComponentRendererProvider.tsx
|
|
1015
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
1016
|
+
var ComponentRendererProvider = ({
|
|
1017
|
+
renderers,
|
|
1018
|
+
children
|
|
1019
|
+
}) => /* @__PURE__ */ jsx2(ComponentRendererContext_default.Provider, { value: renderers, children });
|
|
1020
|
+
var ComponentRendererProvider_default = ComponentRendererProvider;
|
|
1021
|
+
|
|
1009
1022
|
// src/contexts/Flow/FlowProvider.tsx
|
|
1010
1023
|
import { useCallback as useCallback2, useMemo, useState as useState2 } from "react";
|
|
1011
1024
|
|
|
1012
1025
|
// src/contexts/Flow/FlowContext.ts
|
|
1013
|
-
import { createContext as
|
|
1014
|
-
var FlowContext =
|
|
1026
|
+
import { createContext as createContext4 } from "react";
|
|
1027
|
+
var FlowContext = createContext4(void 0);
|
|
1015
1028
|
FlowContext.displayName = "FlowContext";
|
|
1016
1029
|
var FlowContext_default = FlowContext;
|
|
1017
1030
|
|
|
1018
1031
|
// src/contexts/Flow/FlowProvider.tsx
|
|
1019
|
-
import { jsx as
|
|
1032
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1020
1033
|
var FlowProvider = ({
|
|
1021
1034
|
children,
|
|
1022
1035
|
initialStep = null,
|
|
@@ -1125,7 +1138,7 @@ var FlowProvider = ({
|
|
|
1125
1138
|
navigateToFlow
|
|
1126
1139
|
]
|
|
1127
1140
|
);
|
|
1128
|
-
return /* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsx3(FlowContext_default.Provider, { value: contextValue, children });
|
|
1129
1142
|
};
|
|
1130
1143
|
var FlowProvider_default = FlowProvider;
|
|
1131
1144
|
|
|
@@ -1135,8 +1148,8 @@ import { TranslationBundleConstants } from "@asgardeo/i18n";
|
|
|
1135
1148
|
import { useCallback as useCallback3, useEffect as useEffect2, useRef, useState as useState3 } from "react";
|
|
1136
1149
|
|
|
1137
1150
|
// src/contexts/FlowMeta/FlowMetaContext.ts
|
|
1138
|
-
import { createContext as
|
|
1139
|
-
var FlowMetaContext =
|
|
1151
|
+
import { createContext as createContext5 } from "react";
|
|
1152
|
+
var FlowMetaContext = createContext5(null);
|
|
1140
1153
|
FlowMetaContext.displayName = "FlowMetaContext";
|
|
1141
1154
|
var FlowMetaContext_default = FlowMetaContext;
|
|
1142
1155
|
|
|
@@ -1145,8 +1158,8 @@ import { resolveFlowTemplateLiterals } from "@asgardeo/browser";
|
|
|
1145
1158
|
import { useContext } from "react";
|
|
1146
1159
|
|
|
1147
1160
|
// src/contexts/I18n/I18nContext.ts
|
|
1148
|
-
import { createContext as
|
|
1149
|
-
var I18nContext =
|
|
1161
|
+
import { createContext as createContext6 } from "react";
|
|
1162
|
+
var I18nContext = createContext6(null);
|
|
1150
1163
|
I18nContext.displayName = "I18nContext";
|
|
1151
1164
|
var I18nContext_default = I18nContext;
|
|
1152
1165
|
|
|
@@ -1186,7 +1199,7 @@ var useI18n = () => {
|
|
|
1186
1199
|
var useI18n_default = useI18n;
|
|
1187
1200
|
|
|
1188
1201
|
// src/contexts/FlowMeta/FlowMetaProvider.tsx
|
|
1189
|
-
import { jsx as
|
|
1202
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1190
1203
|
var FlowMetaProvider = ({
|
|
1191
1204
|
children,
|
|
1192
1205
|
enabled = true
|
|
@@ -1294,7 +1307,7 @@ var FlowMetaProvider = ({
|
|
|
1294
1307
|
meta,
|
|
1295
1308
|
switchLanguage
|
|
1296
1309
|
};
|
|
1297
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx4(FlowMetaContext_default.Provider, { value, children });
|
|
1298
1311
|
};
|
|
1299
1312
|
var FlowMetaProvider_default = FlowMetaProvider;
|
|
1300
1313
|
|
|
@@ -1306,7 +1319,7 @@ import {
|
|
|
1306
1319
|
normalizeTranslations
|
|
1307
1320
|
} from "@asgardeo/i18n";
|
|
1308
1321
|
import { useCallback as useCallback4, useEffect as useEffect3, useMemo as useMemo2, useState as useState4 } from "react";
|
|
1309
|
-
import { jsx as
|
|
1322
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1310
1323
|
var logger = createPackageComponentLogger(
|
|
1311
1324
|
"@asgardeo/react",
|
|
1312
1325
|
"I18nProvider"
|
|
@@ -1525,7 +1538,7 @@ var I18nProvider = ({
|
|
|
1525
1538
|
}),
|
|
1526
1539
|
[currentLanguage, fallbackLanguage, injectBundles, mergedBundles, setLanguage, t]
|
|
1527
1540
|
);
|
|
1528
|
-
return /* @__PURE__ */
|
|
1541
|
+
return /* @__PURE__ */ jsx5(I18nContext_default.Provider, { value: contextValue, children });
|
|
1529
1542
|
};
|
|
1530
1543
|
var I18nProvider_default = I18nProvider;
|
|
1531
1544
|
|
|
@@ -1536,8 +1549,8 @@ import {
|
|
|
1536
1549
|
import { useCallback as useCallback5, useMemo as useMemo3, useState as useState5 } from "react";
|
|
1537
1550
|
|
|
1538
1551
|
// src/contexts/Organization/OrganizationContext.ts
|
|
1539
|
-
import { createContext as
|
|
1540
|
-
var OrganizationContext =
|
|
1552
|
+
import { createContext as createContext7 } from "react";
|
|
1553
|
+
var OrganizationContext = createContext7({
|
|
1541
1554
|
createOrganization: () => null,
|
|
1542
1555
|
currentOrganization: null,
|
|
1543
1556
|
error: null,
|
|
@@ -1554,7 +1567,7 @@ OrganizationContext.displayName = "OrganizationContext";
|
|
|
1554
1567
|
var OrganizationContext_default = OrganizationContext;
|
|
1555
1568
|
|
|
1556
1569
|
// src/contexts/Organization/OrganizationProvider.tsx
|
|
1557
|
-
import { jsx as
|
|
1570
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1558
1571
|
var OrganizationProvider = ({
|
|
1559
1572
|
children,
|
|
1560
1573
|
currentOrganization,
|
|
@@ -1616,7 +1629,7 @@ var OrganizationProvider = ({
|
|
|
1616
1629
|
createOrganization2
|
|
1617
1630
|
]
|
|
1618
1631
|
);
|
|
1619
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ jsx6(OrganizationContext_default.Provider, { value: contextValue, children });
|
|
1620
1633
|
};
|
|
1621
1634
|
var OrganizationProvider_default = OrganizationProvider;
|
|
1622
1635
|
|
|
@@ -1678,13 +1691,13 @@ var useBrandingContext = () => {
|
|
|
1678
1691
|
var useBrandingContext_default = useBrandingContext;
|
|
1679
1692
|
|
|
1680
1693
|
// src/contexts/Theme/ThemeContext.ts
|
|
1681
|
-
import { createContext as
|
|
1682
|
-
var ThemeContext =
|
|
1694
|
+
import { createContext as createContext8 } from "react";
|
|
1695
|
+
var ThemeContext = createContext8(null);
|
|
1683
1696
|
ThemeContext.displayName = "ThemeContext";
|
|
1684
1697
|
var ThemeContext_default = ThemeContext;
|
|
1685
1698
|
|
|
1686
1699
|
// src/contexts/Theme/v1/ThemeProvider.tsx
|
|
1687
|
-
import { jsx as
|
|
1700
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1688
1701
|
var logger2 = createPackageComponentLogger2(
|
|
1689
1702
|
"@asgardeo/react",
|
|
1690
1703
|
"ThemeProvider"
|
|
@@ -1830,7 +1843,7 @@ var ThemeProvider = ({
|
|
|
1830
1843
|
theme,
|
|
1831
1844
|
toggleTheme
|
|
1832
1845
|
};
|
|
1833
|
-
return /* @__PURE__ */
|
|
1846
|
+
return /* @__PURE__ */ jsx7(ThemeContext_default.Provider, { value, children });
|
|
1834
1847
|
};
|
|
1835
1848
|
var ThemeProvider_default = ThemeProvider;
|
|
1836
1849
|
|
|
@@ -1884,7 +1897,7 @@ var buildThemeConfigFromFlowMeta = (flowMetaTheme, colorScheme) => {
|
|
|
1884
1897
|
var buildThemeConfigFromFlowMeta_default = buildThemeConfigFromFlowMeta;
|
|
1885
1898
|
|
|
1886
1899
|
// src/contexts/Theme/v2/ThemeProvider.tsx
|
|
1887
|
-
import { jsx as
|
|
1900
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1888
1901
|
var ThemeProvider2 = ({
|
|
1889
1902
|
children,
|
|
1890
1903
|
theme: themeOverrideProp
|
|
@@ -1954,12 +1967,12 @@ var ThemeProvider2 = ({
|
|
|
1954
1967
|
theme,
|
|
1955
1968
|
toggleTheme
|
|
1956
1969
|
};
|
|
1957
|
-
return /* @__PURE__ */
|
|
1970
|
+
return /* @__PURE__ */ jsx8(ThemeContext_default.Provider, { value, children });
|
|
1958
1971
|
};
|
|
1959
1972
|
var ThemeProvider_default2 = ThemeProvider2;
|
|
1960
1973
|
|
|
1961
1974
|
// src/contexts/Theme/ThemeProvider.tsx
|
|
1962
|
-
import { jsx as
|
|
1975
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1963
1976
|
var ThemeProvider3 = ({
|
|
1964
1977
|
children,
|
|
1965
1978
|
theme,
|
|
@@ -1970,9 +1983,9 @@ var ThemeProvider3 = ({
|
|
|
1970
1983
|
const { platform } = useAsgardeo_default();
|
|
1971
1984
|
if (platform === Platform3.AsgardeoV2) {
|
|
1972
1985
|
const v2Props = { theme };
|
|
1973
|
-
return /* @__PURE__ */
|
|
1986
|
+
return /* @__PURE__ */ jsx9(ThemeProvider_default2, { ...v2Props, children });
|
|
1974
1987
|
}
|
|
1975
|
-
return /* @__PURE__ */
|
|
1988
|
+
return /* @__PURE__ */ jsx9(ThemeProvider_default, { detection, inheritFromBranding, mode, theme, children });
|
|
1976
1989
|
};
|
|
1977
1990
|
var ThemeProvider_default3 = ThemeProvider3;
|
|
1978
1991
|
|
|
@@ -1980,8 +1993,8 @@ var ThemeProvider_default3 = ThemeProvider3;
|
|
|
1980
1993
|
import { useMemo as useMemo6 } from "react";
|
|
1981
1994
|
|
|
1982
1995
|
// src/contexts/User/UserContext.ts
|
|
1983
|
-
import { createContext as
|
|
1984
|
-
var UserContext =
|
|
1996
|
+
import { createContext as createContext9 } from "react";
|
|
1997
|
+
var UserContext = createContext9({
|
|
1985
1998
|
flattenedProfile: null,
|
|
1986
1999
|
onUpdateProfile: () => null,
|
|
1987
2000
|
profile: null,
|
|
@@ -1993,7 +2006,7 @@ UserContext.displayName = "UserContext";
|
|
|
1993
2006
|
var UserContext_default = UserContext;
|
|
1994
2007
|
|
|
1995
2008
|
// src/contexts/User/UserProvider.tsx
|
|
1996
|
-
import { jsx as
|
|
2009
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1997
2010
|
var UserProvider = ({
|
|
1998
2011
|
children,
|
|
1999
2012
|
profile,
|
|
@@ -2012,12 +2025,12 @@ var UserProvider = ({
|
|
|
2012
2025
|
}),
|
|
2013
2026
|
[profile, onUpdateProfile, revalidateProfile, updateProfile]
|
|
2014
2027
|
);
|
|
2015
|
-
return /* @__PURE__ */
|
|
2028
|
+
return /* @__PURE__ */ jsx10(UserContext_default.Provider, { value: contextValue, children });
|
|
2016
2029
|
};
|
|
2017
2030
|
var UserProvider_default = UserProvider;
|
|
2018
2031
|
|
|
2019
2032
|
// src/contexts/Asgardeo/AsgardeoProvider.tsx
|
|
2020
|
-
import { jsx as
|
|
2033
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
2021
2034
|
var logger3 = createPackageComponentLogger3(
|
|
2022
2035
|
"@asgardeo/react",
|
|
2023
2036
|
"AsgardeoProvider"
|
|
@@ -2028,6 +2041,7 @@ var AsgardeoProvider = ({
|
|
|
2028
2041
|
baseUrl: initialBaseUrl,
|
|
2029
2042
|
clientId,
|
|
2030
2043
|
children,
|
|
2044
|
+
extensions,
|
|
2031
2045
|
scopes,
|
|
2032
2046
|
preferences,
|
|
2033
2047
|
signInUrl,
|
|
@@ -2499,7 +2513,7 @@ var AsgardeoProvider = ({
|
|
|
2499
2513
|
organizationChain
|
|
2500
2514
|
]
|
|
2501
2515
|
);
|
|
2502
|
-
return /* @__PURE__ */
|
|
2516
|
+
return /* @__PURE__ */ jsx11(AsgardeoContext_default.Provider, { value, children: /* @__PURE__ */ jsx11(I18nProvider_default, { preferences: preferences?.i18n, children: /* @__PURE__ */ jsx11(FlowMetaProvider_default, { enabled: preferences?.resolveFromMeta !== false, children: /* @__PURE__ */ jsx11(
|
|
2503
2517
|
BrandingProvider_default,
|
|
2504
2518
|
{
|
|
2505
2519
|
brandingPreference,
|
|
@@ -2507,7 +2521,7 @@ var AsgardeoProvider = ({
|
|
|
2507
2521
|
error: brandingError,
|
|
2508
2522
|
enabled: preferences?.theme?.inheritFromBranding !== false,
|
|
2509
2523
|
refetch: refetchBranding,
|
|
2510
|
-
children: /* @__PURE__ */
|
|
2524
|
+
children: /* @__PURE__ */ jsx11(
|
|
2511
2525
|
ThemeProvider_default3,
|
|
2512
2526
|
{
|
|
2513
2527
|
inheritFromBranding: preferences?.theme?.inheritFromBranding,
|
|
@@ -2516,7 +2530,7 @@ var AsgardeoProvider = ({
|
|
|
2516
2530
|
direction: preferences?.theme?.direction
|
|
2517
2531
|
},
|
|
2518
2532
|
mode: getActiveTheme(preferences?.theme?.mode),
|
|
2519
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ jsx11(FlowProvider_default, { children: /* @__PURE__ */ jsx11(UserProvider_default, { profile: userProfile, onUpdateProfile: handleProfileUpdate, children: /* @__PURE__ */ jsx11(
|
|
2520
2534
|
OrganizationProvider_default,
|
|
2521
2535
|
{
|
|
2522
2536
|
getAllOrganizations: async () => asgardeo.getAllOrganizations(),
|
|
@@ -2524,7 +2538,7 @@ var AsgardeoProvider = ({
|
|
|
2524
2538
|
currentOrganization,
|
|
2525
2539
|
onOrganizationSwitch: switchOrganization,
|
|
2526
2540
|
revalidateMyOrganizations: async () => asgardeo.getMyOrganizations(),
|
|
2527
|
-
children
|
|
2541
|
+
children: /* @__PURE__ */ jsx11(ComponentRendererProvider_default, { renderers: extensions?.components?.renderers ?? {}, children })
|
|
2528
2542
|
}
|
|
2529
2543
|
) }) })
|
|
2530
2544
|
}
|
|
@@ -2584,8 +2598,8 @@ import { normalizeTranslations as normalizeTranslations2 } from "@asgardeo/i18n"
|
|
|
2584
2598
|
import { useContext as useContext9, useMemo as useMemo8 } from "react";
|
|
2585
2599
|
|
|
2586
2600
|
// src/contexts/I18n/ComponentPreferencesContext.ts
|
|
2587
|
-
import { createContext as
|
|
2588
|
-
var ComponentPreferencesContext =
|
|
2601
|
+
import { createContext as createContext10 } from "react";
|
|
2602
|
+
var ComponentPreferencesContext = createContext10(void 0);
|
|
2589
2603
|
var ComponentPreferencesContext_default = ComponentPreferencesContext;
|
|
2590
2604
|
|
|
2591
2605
|
// src/hooks/useTranslation.ts
|
|
@@ -3273,7 +3287,7 @@ var useStyles2 = (theme, colorScheme, size, color) => useMemo10(() => {
|
|
|
3273
3287
|
var Spinner_styles_default = useStyles2;
|
|
3274
3288
|
|
|
3275
3289
|
// src/components/primitives/Spinner/Spinner.tsx
|
|
3276
|
-
import { jsx as
|
|
3290
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3277
3291
|
var Spinner = ({ size = "medium", color, className, style }) => {
|
|
3278
3292
|
const { theme, colorScheme } = useTheme_default();
|
|
3279
3293
|
const styles = Spinner_styles_default(theme, colorScheme, size, color);
|
|
@@ -3285,12 +3299,12 @@ var Spinner = ({ size = "medium", color, className, style }) => {
|
|
|
3285
3299
|
size === "large" && styles["spinnerLarge"],
|
|
3286
3300
|
className
|
|
3287
3301
|
);
|
|
3288
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ jsx12("span", { className: spinnerClassName, style, role: "status", "aria-label": "Loading" });
|
|
3289
3303
|
};
|
|
3290
3304
|
var Spinner_default = Spinner;
|
|
3291
3305
|
|
|
3292
3306
|
// src/components/primitives/Button/Button.tsx
|
|
3293
|
-
import { jsx as
|
|
3307
|
+
import { jsx as jsx13, jsxs } from "react/jsx-runtime";
|
|
3294
3308
|
var getSpinnerWidth = (sizeVal, spacingUnit) => {
|
|
3295
3309
|
if (sizeVal === "small") {
|
|
3296
3310
|
return `calc(${spacingUnit} * 1.5)`;
|
|
@@ -3355,7 +3369,7 @@ var Button = forwardRef(
|
|
|
3355
3369
|
disabled: disabled || loading,
|
|
3356
3370
|
...rest,
|
|
3357
3371
|
children: [
|
|
3358
|
-
loading && /* @__PURE__ */
|
|
3372
|
+
loading && /* @__PURE__ */ jsx13("span", { className: cx2(withVendorCSSClassPrefix2(bem2("button", "spinner")), styles["spinner"]), children: /* @__PURE__ */ jsx13(
|
|
3359
3373
|
Spinner_default,
|
|
3360
3374
|
{
|
|
3361
3375
|
size,
|
|
@@ -3366,10 +3380,10 @@ var Button = forwardRef(
|
|
|
3366
3380
|
}
|
|
3367
3381
|
}
|
|
3368
3382
|
) }),
|
|
3369
|
-
!loading && isIconVariant && /* @__PURE__ */
|
|
3370
|
-
!loading && !isIconVariant && startIcon && /* @__PURE__ */
|
|
3371
|
-
!isIconVariant && children && /* @__PURE__ */
|
|
3372
|
-
!loading && !isIconVariant && endIcon && /* @__PURE__ */
|
|
3383
|
+
!loading && isIconVariant && /* @__PURE__ */ jsx13("span", { className: cx2(withVendorCSSClassPrefix2(bem2("button", "icon")), styles["icon"]), children: children || startIcon || endIcon }),
|
|
3384
|
+
!loading && !isIconVariant && startIcon && /* @__PURE__ */ jsx13("span", { className: cx2(withVendorCSSClassPrefix2(bem2("button", "start-icon")), styles["startIcon"]), children: startIcon }),
|
|
3385
|
+
!isIconVariant && children && /* @__PURE__ */ jsx13("span", { className: cx2(withVendorCSSClassPrefix2(bem2("button", "content")), styles["content"]), children }),
|
|
3386
|
+
!loading && !isIconVariant && endIcon && /* @__PURE__ */ jsx13("span", { className: cx2(withVendorCSSClassPrefix2(bem2("button", "end-icon")), styles["endIcon"]), children: endIcon })
|
|
3373
3387
|
]
|
|
3374
3388
|
}
|
|
3375
3389
|
);
|
|
@@ -3379,13 +3393,13 @@ Button.displayName = "Button";
|
|
|
3379
3393
|
var Button_default = Button;
|
|
3380
3394
|
|
|
3381
3395
|
// src/components/actions/SignInButton/BaseSignInButton.tsx
|
|
3382
|
-
import { Fragment, jsx as
|
|
3396
|
+
import { Fragment, jsx as jsx14 } from "react/jsx-runtime";
|
|
3383
3397
|
var BaseSignInButton = forwardRef2(
|
|
3384
3398
|
({ children, className, style, signIn, isLoading, meta, preferences, ...rest }, ref) => {
|
|
3385
3399
|
if (typeof children === "function") {
|
|
3386
|
-
return /* @__PURE__ */
|
|
3400
|
+
return /* @__PURE__ */ jsx14(Fragment, { children: children({ isLoading, meta, signIn }) });
|
|
3387
3401
|
}
|
|
3388
|
-
return /* @__PURE__ */
|
|
3402
|
+
return /* @__PURE__ */ jsx14(
|
|
3389
3403
|
Button_default,
|
|
3390
3404
|
{
|
|
3391
3405
|
ref,
|
|
@@ -3406,7 +3420,7 @@ var BaseSignInButton_default = BaseSignInButton;
|
|
|
3406
3420
|
// src/components/actions/SignInButton/SignInButton.tsx
|
|
3407
3421
|
import { AsgardeoRuntimeError as AsgardeoRuntimeError4, navigate as navigate2 } from "@asgardeo/browser";
|
|
3408
3422
|
import { forwardRef as forwardRef3, useState as useState10 } from "react";
|
|
3409
|
-
import { jsx as
|
|
3423
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
3410
3424
|
var SignInButton = forwardRef3(
|
|
3411
3425
|
({ children, onClick, preferences, signInOptions: overriddenSignInOptions = {}, ...rest }, ref) => {
|
|
3412
3426
|
const { signIn, signInUrl, signInOptions, meta } = useAsgardeo_default();
|
|
@@ -3434,7 +3448,7 @@ var SignInButton = forwardRef3(
|
|
|
3434
3448
|
setIsLoading(false);
|
|
3435
3449
|
}
|
|
3436
3450
|
};
|
|
3437
|
-
return /* @__PURE__ */
|
|
3451
|
+
return /* @__PURE__ */ jsx15(
|
|
3438
3452
|
BaseSignInButton_default,
|
|
3439
3453
|
{
|
|
3440
3454
|
ref,
|
|
@@ -3458,13 +3472,13 @@ import { cx as cx4 } from "@emotion/css";
|
|
|
3458
3472
|
import {
|
|
3459
3473
|
forwardRef as forwardRef4
|
|
3460
3474
|
} from "react";
|
|
3461
|
-
import { Fragment as Fragment2, jsx as
|
|
3475
|
+
import { Fragment as Fragment2, jsx as jsx16 } from "react/jsx-runtime";
|
|
3462
3476
|
var BaseSignOutButton = forwardRef4(
|
|
3463
3477
|
({ children, className, style, signOut, isLoading, meta, preferences, ...rest }, ref) => {
|
|
3464
3478
|
if (typeof children === "function") {
|
|
3465
|
-
return /* @__PURE__ */
|
|
3479
|
+
return /* @__PURE__ */ jsx16(Fragment2, { children: children({ isLoading, meta, signOut }) });
|
|
3466
3480
|
}
|
|
3467
|
-
return /* @__PURE__ */
|
|
3481
|
+
return /* @__PURE__ */ jsx16(
|
|
3468
3482
|
Button_default,
|
|
3469
3483
|
{
|
|
3470
3484
|
ref,
|
|
@@ -3485,7 +3499,7 @@ var BaseSignOutButton_default = BaseSignOutButton;
|
|
|
3485
3499
|
// src/components/actions/SignOutButton/SignOutButton.tsx
|
|
3486
3500
|
import { AsgardeoRuntimeError as AsgardeoRuntimeError5 } from "@asgardeo/browser";
|
|
3487
3501
|
import { forwardRef as forwardRef5, useState as useState11 } from "react";
|
|
3488
|
-
import { jsx as
|
|
3502
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3489
3503
|
var SignOutButton = forwardRef5(({ children, onClick, preferences, ...rest }, ref) => {
|
|
3490
3504
|
const { signOut, meta } = useAsgardeo_default();
|
|
3491
3505
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
@@ -3508,7 +3522,7 @@ var SignOutButton = forwardRef5(({ children, onClick, preferences, ...rest }, re
|
|
|
3508
3522
|
setIsLoading(false);
|
|
3509
3523
|
}
|
|
3510
3524
|
};
|
|
3511
|
-
return /* @__PURE__ */
|
|
3525
|
+
return /* @__PURE__ */ jsx17(
|
|
3512
3526
|
BaseSignOutButton_default,
|
|
3513
3527
|
{
|
|
3514
3528
|
ref,
|
|
@@ -3531,13 +3545,13 @@ import { cx as cx5 } from "@emotion/css";
|
|
|
3531
3545
|
import {
|
|
3532
3546
|
forwardRef as forwardRef6
|
|
3533
3547
|
} from "react";
|
|
3534
|
-
import { Fragment as Fragment3, jsx as
|
|
3548
|
+
import { Fragment as Fragment3, jsx as jsx18 } from "react/jsx-runtime";
|
|
3535
3549
|
var BaseSignUpButton = forwardRef6(
|
|
3536
3550
|
({ children, className, style, signUp, isLoading, meta, preferences, ...rest }, ref) => {
|
|
3537
3551
|
if (typeof children === "function") {
|
|
3538
|
-
return /* @__PURE__ */
|
|
3552
|
+
return /* @__PURE__ */ jsx18(Fragment3, { children: children({ isLoading, meta, signUp }) });
|
|
3539
3553
|
}
|
|
3540
|
-
return /* @__PURE__ */
|
|
3554
|
+
return /* @__PURE__ */ jsx18(
|
|
3541
3555
|
Button_default,
|
|
3542
3556
|
{
|
|
3543
3557
|
ref,
|
|
@@ -3560,7 +3574,7 @@ var BaseSignUpButton_default = BaseSignUpButton;
|
|
|
3560
3574
|
// src/components/actions/SignUpButton/SignUpButton.tsx
|
|
3561
3575
|
import { AsgardeoRuntimeError as AsgardeoRuntimeError6, navigate as navigate3 } from "@asgardeo/browser";
|
|
3562
3576
|
import { forwardRef as forwardRef7, useState as useState12 } from "react";
|
|
3563
|
-
import { jsx as
|
|
3577
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
3564
3578
|
var SignUpButton = forwardRef7(({ children, onClick, preferences, ...rest }, ref) => {
|
|
3565
3579
|
const { signUp, signUpUrl, meta } = useAsgardeo_default();
|
|
3566
3580
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
@@ -3587,7 +3601,7 @@ var SignUpButton = forwardRef7(({ children, onClick, preferences, ...rest }, ref
|
|
|
3587
3601
|
setIsLoading(false);
|
|
3588
3602
|
}
|
|
3589
3603
|
};
|
|
3590
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx19(
|
|
3591
3605
|
BaseSignUpButton_default,
|
|
3592
3606
|
{
|
|
3593
3607
|
ref,
|
|
@@ -3605,50 +3619,50 @@ SignUpButton.displayName = "SignUpButton";
|
|
|
3605
3619
|
var SignUpButton_default = SignUpButton;
|
|
3606
3620
|
|
|
3607
3621
|
// src/components/control/SignedIn.tsx
|
|
3608
|
-
import { Fragment as Fragment4, jsx as
|
|
3622
|
+
import { Fragment as Fragment4, jsx as jsx20 } from "react/jsx-runtime";
|
|
3609
3623
|
var SignedIn = ({
|
|
3610
3624
|
children,
|
|
3611
3625
|
fallback = null
|
|
3612
3626
|
}) => {
|
|
3613
3627
|
const { isSignedIn } = useAsgardeo_default();
|
|
3614
3628
|
if (!isSignedIn) {
|
|
3615
|
-
return /* @__PURE__ */
|
|
3629
|
+
return /* @__PURE__ */ jsx20(Fragment4, { children: fallback });
|
|
3616
3630
|
}
|
|
3617
|
-
return /* @__PURE__ */
|
|
3631
|
+
return /* @__PURE__ */ jsx20(Fragment4, { children });
|
|
3618
3632
|
};
|
|
3619
3633
|
SignedIn.displayName = "SignedIn";
|
|
3620
3634
|
var SignedIn_default = SignedIn;
|
|
3621
3635
|
|
|
3622
3636
|
// src/components/control/SignedOut.tsx
|
|
3623
|
-
import { Fragment as Fragment5, jsx as
|
|
3637
|
+
import { Fragment as Fragment5, jsx as jsx21 } from "react/jsx-runtime";
|
|
3624
3638
|
var SignedOut = ({
|
|
3625
3639
|
children,
|
|
3626
3640
|
fallback = null
|
|
3627
3641
|
}) => {
|
|
3628
3642
|
const { isSignedIn } = useAsgardeo_default();
|
|
3629
3643
|
if (!isSignedIn) {
|
|
3630
|
-
return /* @__PURE__ */
|
|
3644
|
+
return /* @__PURE__ */ jsx21(Fragment5, { children });
|
|
3631
3645
|
}
|
|
3632
|
-
return /* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ jsx21(Fragment5, { children: fallback });
|
|
3633
3647
|
};
|
|
3634
3648
|
SignedOut.displayName = "SignedOut";
|
|
3635
3649
|
var SignedOut_default = SignedOut;
|
|
3636
3650
|
|
|
3637
3651
|
// src/components/control/Loading.tsx
|
|
3638
|
-
import { Fragment as Fragment6, jsx as
|
|
3652
|
+
import { Fragment as Fragment6, jsx as jsx22 } from "react/jsx-runtime";
|
|
3639
3653
|
var Loading = ({ children, fallback = null }) => {
|
|
3640
3654
|
const { isLoading } = useAsgardeo_default();
|
|
3641
3655
|
if (!isLoading) {
|
|
3642
|
-
return /* @__PURE__ */
|
|
3656
|
+
return /* @__PURE__ */ jsx22(Fragment6, { children: fallback });
|
|
3643
3657
|
}
|
|
3644
|
-
return /* @__PURE__ */
|
|
3658
|
+
return /* @__PURE__ */ jsx22(Fragment6, { children });
|
|
3645
3659
|
};
|
|
3646
3660
|
Loading.displayName = "Loading";
|
|
3647
3661
|
var Loading_default = Loading;
|
|
3648
3662
|
|
|
3649
3663
|
// src/components/control/OrganizationContext/OrganizationContextController.tsx
|
|
3650
3664
|
import { useEffect as useEffect7, useRef as useRef3 } from "react";
|
|
3651
|
-
import { Fragment as Fragment7, jsx as
|
|
3665
|
+
import { Fragment as Fragment7, jsx as jsx23 } from "react/jsx-runtime";
|
|
3652
3666
|
var OrganizationContextController = ({
|
|
3653
3667
|
targetOrganizationId,
|
|
3654
3668
|
isSourceSignedIn,
|
|
@@ -3692,12 +3706,12 @@ var OrganizationContextController = ({
|
|
|
3692
3706
|
};
|
|
3693
3707
|
performOrganizationSwitch();
|
|
3694
3708
|
}, [isInitialized, isSignedIn, isLoading, isSourceSignedIn, targetOrganizationId, switchOrganization]);
|
|
3695
|
-
return /* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ jsx23(Fragment7, { children });
|
|
3696
3710
|
};
|
|
3697
3711
|
var OrganizationContextController_default = OrganizationContextController;
|
|
3698
3712
|
|
|
3699
3713
|
// src/components/control/OrganizationContext/OrganizationContext.tsx
|
|
3700
|
-
import { jsx as
|
|
3714
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3701
3715
|
var OrganizationContext2 = ({
|
|
3702
3716
|
instanceId,
|
|
3703
3717
|
baseUrl,
|
|
@@ -3716,7 +3730,7 @@ var OrganizationContext2 = ({
|
|
|
3716
3730
|
baseUrl: sourceBaseUrl,
|
|
3717
3731
|
clientId: sourceClientId
|
|
3718
3732
|
} = useAsgardeo_default();
|
|
3719
|
-
return /* @__PURE__ */
|
|
3733
|
+
return /* @__PURE__ */ jsx24(
|
|
3720
3734
|
AsgardeoProvider_default,
|
|
3721
3735
|
{
|
|
3722
3736
|
instanceId,
|
|
@@ -3730,7 +3744,7 @@ var OrganizationContext2 = ({
|
|
|
3730
3744
|
targetOrganizationId
|
|
3731
3745
|
},
|
|
3732
3746
|
...rest,
|
|
3733
|
-
children: /* @__PURE__ */
|
|
3747
|
+
children: /* @__PURE__ */ jsx24(OrganizationContextController_default, { targetOrganizationId, isSourceSignedIn, children })
|
|
3734
3748
|
}
|
|
3735
3749
|
);
|
|
3736
3750
|
};
|
|
@@ -4126,7 +4140,7 @@ var useStyles5 = (theme, colorScheme, variant, align, color, noWrap, inline, gut
|
|
|
4126
4140
|
var Typography_styles_default = useStyles5;
|
|
4127
4141
|
|
|
4128
4142
|
// src/components/primitives/Typography/Typography.tsx
|
|
4129
|
-
import { jsx as
|
|
4143
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
4130
4144
|
var variantMapping = {
|
|
4131
4145
|
body1: "p",
|
|
4132
4146
|
body2: "p",
|
|
@@ -4215,12 +4229,12 @@ var Typography = ({
|
|
|
4215
4229
|
gutterBottom && styles["typographyGutterBottom"],
|
|
4216
4230
|
className
|
|
4217
4231
|
);
|
|
4218
|
-
return /* @__PURE__ */
|
|
4232
|
+
return /* @__PURE__ */ jsx25(Component, { className: typographyClassName, style, ...rest, children });
|
|
4219
4233
|
};
|
|
4220
4234
|
var Typography_default = Typography;
|
|
4221
4235
|
|
|
4222
4236
|
// src/components/primitives/FormControl/FormControl.tsx
|
|
4223
|
-
import { jsx as
|
|
4237
|
+
import { jsx as jsx26, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
4224
4238
|
var FormControl = ({
|
|
4225
4239
|
children,
|
|
4226
4240
|
error,
|
|
@@ -4233,7 +4247,7 @@ var FormControl = ({
|
|
|
4233
4247
|
const styles = FormControl_styles_default(theme, colorScheme, helperTextAlign, helperTextMarginLeft, !!error);
|
|
4234
4248
|
return /* @__PURE__ */ jsxs2("div", { className: cx7(withVendorCSSClassPrefix7(bem4("form-control")), styles["formControl"], className), children: [
|
|
4235
4249
|
children,
|
|
4236
|
-
(error || helperText) && /* @__PURE__ */
|
|
4250
|
+
(error || helperText) && /* @__PURE__ */ jsx26(
|
|
4237
4251
|
Typography_default,
|
|
4238
4252
|
{
|
|
4239
4253
|
variant: "caption",
|
|
@@ -4292,7 +4306,7 @@ var useStyles6 = (theme, colorScheme, variant, error, marginBottom) => useMemo14
|
|
|
4292
4306
|
var InputLabel_styles_default = useStyles6;
|
|
4293
4307
|
|
|
4294
4308
|
// src/components/primitives/InputLabel/InputLabel.tsx
|
|
4295
|
-
import { jsx as
|
|
4309
|
+
import { jsx as jsx27, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
4296
4310
|
var InputLabel = ({
|
|
4297
4311
|
children,
|
|
4298
4312
|
required = false,
|
|
@@ -4323,7 +4337,7 @@ var InputLabel = ({
|
|
|
4323
4337
|
...rest,
|
|
4324
4338
|
children: [
|
|
4325
4339
|
children,
|
|
4326
|
-
required && /* @__PURE__ */
|
|
4340
|
+
required && /* @__PURE__ */ jsx27("span", { className: cx8(withVendorCSSClassPrefix8(bem5("input-label", "required")), styles["requiredIndicator"]), children: " *" })
|
|
4327
4341
|
]
|
|
4328
4342
|
}
|
|
4329
4343
|
);
|
|
@@ -4331,7 +4345,7 @@ var InputLabel = ({
|
|
|
4331
4345
|
var InputLabel_default = InputLabel;
|
|
4332
4346
|
|
|
4333
4347
|
// src/components/primitives/Checkbox/Checkbox.tsx
|
|
4334
|
-
import { jsx as
|
|
4348
|
+
import { jsx as jsx28, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4335
4349
|
var Checkbox = ({
|
|
4336
4350
|
label,
|
|
4337
4351
|
error,
|
|
@@ -4344,7 +4358,7 @@ var Checkbox = ({
|
|
|
4344
4358
|
const { theme, colorScheme } = useTheme_default();
|
|
4345
4359
|
const hasError = !!error;
|
|
4346
4360
|
const styles = Checkbox_styles_default(theme, colorScheme, hasError, !!required);
|
|
4347
|
-
return /* @__PURE__ */
|
|
4361
|
+
return /* @__PURE__ */ jsx28(
|
|
4348
4362
|
FormControl_default,
|
|
4349
4363
|
{
|
|
4350
4364
|
error,
|
|
@@ -4352,7 +4366,7 @@ var Checkbox = ({
|
|
|
4352
4366
|
className: cx9(withVendorCSSClassPrefix9(bem6("checkbox")), className),
|
|
4353
4367
|
helperTextMarginLeft: `calc(${theme.vars.spacing.unit} * 3.5)`,
|
|
4354
4368
|
children: /* @__PURE__ */ jsxs4("div", { style, className: cx9(withVendorCSSClassPrefix9(bem6("checkbox", "container")), styles["container"]), children: [
|
|
4355
|
-
/* @__PURE__ */
|
|
4369
|
+
/* @__PURE__ */ jsx28(
|
|
4356
4370
|
"input",
|
|
4357
4371
|
{
|
|
4358
4372
|
type: "checkbox",
|
|
@@ -4364,7 +4378,7 @@ var Checkbox = ({
|
|
|
4364
4378
|
...rest
|
|
4365
4379
|
}
|
|
4366
4380
|
),
|
|
4367
|
-
label && /* @__PURE__ */
|
|
4381
|
+
label && /* @__PURE__ */ jsx28(
|
|
4368
4382
|
InputLabel_default,
|
|
4369
4383
|
{
|
|
4370
4384
|
required,
|
|
@@ -4452,7 +4466,7 @@ var useStyles7 = (theme, colorScheme, hasError, disabled) => useMemo15(() => {
|
|
|
4452
4466
|
var DatePicker_styles_default = useStyles7;
|
|
4453
4467
|
|
|
4454
4468
|
// src/components/primitives/DatePicker/DatePicker.tsx
|
|
4455
|
-
import { jsx as
|
|
4469
|
+
import { jsx as jsx29, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4456
4470
|
var DatePicker = ({
|
|
4457
4471
|
label,
|
|
4458
4472
|
error,
|
|
@@ -4475,7 +4489,7 @@ var DatePicker = ({
|
|
|
4475
4489
|
className: cx10(withVendorCSSClassPrefix10(bem7("date-picker")), className),
|
|
4476
4490
|
style,
|
|
4477
4491
|
children: [
|
|
4478
|
-
label && /* @__PURE__ */
|
|
4492
|
+
label && /* @__PURE__ */ jsx29(
|
|
4479
4493
|
InputLabel_default,
|
|
4480
4494
|
{
|
|
4481
4495
|
required,
|
|
@@ -4484,7 +4498,7 @@ var DatePicker = ({
|
|
|
4484
4498
|
children: label
|
|
4485
4499
|
}
|
|
4486
4500
|
),
|
|
4487
|
-
/* @__PURE__ */
|
|
4501
|
+
/* @__PURE__ */ jsx29(
|
|
4488
4502
|
"input",
|
|
4489
4503
|
{
|
|
4490
4504
|
type: "date",
|
|
@@ -4584,7 +4598,7 @@ var useStyles8 = (theme, colorScheme, disabled, hasError, length) => useMemo16((
|
|
|
4584
4598
|
var OtpField_styles_default = useStyles8;
|
|
4585
4599
|
|
|
4586
4600
|
// src/components/primitives/OtpField/OtpField.tsx
|
|
4587
|
-
import { jsx as
|
|
4601
|
+
import { jsx as jsx30, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
4588
4602
|
var OtpField = ({
|
|
4589
4603
|
label,
|
|
4590
4604
|
error,
|
|
@@ -4698,8 +4712,8 @@ var OtpField = ({
|
|
|
4698
4712
|
helperTextAlign: "center",
|
|
4699
4713
|
style,
|
|
4700
4714
|
children: [
|
|
4701
|
-
label && /* @__PURE__ */
|
|
4702
|
-
/* @__PURE__ */
|
|
4715
|
+
label && /* @__PURE__ */ jsx30(InputLabel_default, { required, error: !!error, children: label }),
|
|
4716
|
+
/* @__PURE__ */ jsx30("div", { className: cx11(withVendorCSSClassPrefix11(bem8("otp-field", "input-container")), styles["inputContainer"]), children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx30(
|
|
4703
4717
|
"input",
|
|
4704
4718
|
{
|
|
4705
4719
|
ref: (el) => {
|
|
@@ -4767,7 +4781,7 @@ var useStyles9 = (theme, colorScheme, showPassword, disabled, hasError) => useMe
|
|
|
4767
4781
|
var PasswordField_styles_default = useStyles9;
|
|
4768
4782
|
|
|
4769
4783
|
// src/components/primitives/Icons/Eye.tsx
|
|
4770
|
-
import { jsx as
|
|
4784
|
+
import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
4771
4785
|
var Eye = (props) => /* @__PURE__ */ jsxs7(
|
|
4772
4786
|
"svg",
|
|
4773
4787
|
{
|
|
@@ -4782,15 +4796,15 @@ var Eye = (props) => /* @__PURE__ */ jsxs7(
|
|
|
4782
4796
|
strokeLinejoin: "round",
|
|
4783
4797
|
...props,
|
|
4784
4798
|
children: [
|
|
4785
|
-
/* @__PURE__ */
|
|
4786
|
-
/* @__PURE__ */
|
|
4799
|
+
/* @__PURE__ */ jsx31("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" }),
|
|
4800
|
+
/* @__PURE__ */ jsx31("circle", { cx: "12", cy: "12", r: "3" })
|
|
4787
4801
|
]
|
|
4788
4802
|
}
|
|
4789
4803
|
);
|
|
4790
4804
|
var Eye_default = Eye;
|
|
4791
4805
|
|
|
4792
4806
|
// src/components/primitives/Icons/EyeOff.tsx
|
|
4793
|
-
import { jsx as
|
|
4807
|
+
import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
4794
4808
|
var EyeOff = (props) => /* @__PURE__ */ jsxs8(
|
|
4795
4809
|
"svg",
|
|
4796
4810
|
{
|
|
@@ -4805,10 +4819,10 @@ var EyeOff = (props) => /* @__PURE__ */ jsxs8(
|
|
|
4805
4819
|
strokeLinejoin: "round",
|
|
4806
4820
|
...props,
|
|
4807
4821
|
children: [
|
|
4808
|
-
/* @__PURE__ */
|
|
4809
|
-
/* @__PURE__ */
|
|
4810
|
-
/* @__PURE__ */
|
|
4811
|
-
/* @__PURE__ */
|
|
4822
|
+
/* @__PURE__ */ jsx32("path", { d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49" }),
|
|
4823
|
+
/* @__PURE__ */ jsx32("path", { d: "M14.084 14.158a3 3 0 0 1-4.242-4.242" }),
|
|
4824
|
+
/* @__PURE__ */ jsx32("path", { d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143" }),
|
|
4825
|
+
/* @__PURE__ */ jsx32("path", { d: "m2 2 20 20" })
|
|
4812
4826
|
]
|
|
4813
4827
|
}
|
|
4814
4828
|
);
|
|
@@ -4924,7 +4938,7 @@ var useStyles10 = (theme, colorScheme, disabled, hasError, hasStartIcon, hasEndI
|
|
|
4924
4938
|
var TextField_styles_default = useStyles10;
|
|
4925
4939
|
|
|
4926
4940
|
// src/components/primitives/TextField/TextField.tsx
|
|
4927
|
-
import { jsx as
|
|
4941
|
+
import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
4928
4942
|
var TextField = ({
|
|
4929
4943
|
label,
|
|
4930
4944
|
error,
|
|
@@ -4965,9 +4979,9 @@ var TextField = ({
|
|
|
4965
4979
|
className: cx12(withVendorCSSClassPrefix12(bem9("text-field")), className),
|
|
4966
4980
|
style,
|
|
4967
4981
|
children: [
|
|
4968
|
-
label && /* @__PURE__ */
|
|
4982
|
+
label && /* @__PURE__ */ jsx33(InputLabel_default, { required, error: hasError, children: label }),
|
|
4969
4983
|
/* @__PURE__ */ jsxs9("div", { className: containerClassName, children: [
|
|
4970
|
-
startIcon && /* @__PURE__ */
|
|
4984
|
+
startIcon && /* @__PURE__ */ jsx33(
|
|
4971
4985
|
"div",
|
|
4972
4986
|
{
|
|
4973
4987
|
className: startIconClassName,
|
|
@@ -4978,7 +4992,7 @@ var TextField = ({
|
|
|
4978
4992
|
children: startIcon
|
|
4979
4993
|
}
|
|
4980
4994
|
),
|
|
4981
|
-
/* @__PURE__ */
|
|
4995
|
+
/* @__PURE__ */ jsx33(
|
|
4982
4996
|
"input",
|
|
4983
4997
|
{
|
|
4984
4998
|
className: inputClassName,
|
|
@@ -4989,7 +5003,7 @@ var TextField = ({
|
|
|
4989
5003
|
...rest
|
|
4990
5004
|
}
|
|
4991
5005
|
),
|
|
4992
|
-
endIcon && /* @__PURE__ */
|
|
5006
|
+
endIcon && /* @__PURE__ */ jsx33(
|
|
4993
5007
|
"div",
|
|
4994
5008
|
{
|
|
4995
5009
|
className: endIconClassName,
|
|
@@ -5008,7 +5022,7 @@ var TextField = ({
|
|
|
5008
5022
|
var TextField_default = TextField;
|
|
5009
5023
|
|
|
5010
5024
|
// src/components/primitives/PasswordField/PasswordField.tsx
|
|
5011
|
-
import { jsx as
|
|
5025
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
5012
5026
|
var PasswordField = ({
|
|
5013
5027
|
onChange,
|
|
5014
5028
|
className,
|
|
@@ -5025,7 +5039,7 @@ var PasswordField = ({
|
|
|
5025
5039
|
}
|
|
5026
5040
|
};
|
|
5027
5041
|
const IconComponent = showPassword ? EyeOff_default : Eye_default;
|
|
5028
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsx34(
|
|
5029
5043
|
TextField_default,
|
|
5030
5044
|
{
|
|
5031
5045
|
...textFieldProps,
|
|
@@ -5035,7 +5049,7 @@ var PasswordField = ({
|
|
|
5035
5049
|
autoComplete: "current-password",
|
|
5036
5050
|
disabled,
|
|
5037
5051
|
error,
|
|
5038
|
-
endIcon: /* @__PURE__ */
|
|
5052
|
+
endIcon: /* @__PURE__ */ jsx34(
|
|
5039
5053
|
IconComponent,
|
|
5040
5054
|
{
|
|
5041
5055
|
width: 16,
|
|
@@ -5136,7 +5150,7 @@ var useStyles11 = (theme, colorScheme, disabled, hasError) => useMemo19(() => {
|
|
|
5136
5150
|
var Select_styles_default = useStyles11;
|
|
5137
5151
|
|
|
5138
5152
|
// src/components/primitives/Select/Select.tsx
|
|
5139
|
-
import { jsx as
|
|
5153
|
+
import { jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5140
5154
|
var Select = ({
|
|
5141
5155
|
label,
|
|
5142
5156
|
error,
|
|
@@ -5166,7 +5180,7 @@ var Select = ({
|
|
|
5166
5180
|
className: cx14(withVendorCSSClassPrefix14(bem11("select")), className),
|
|
5167
5181
|
style,
|
|
5168
5182
|
children: [
|
|
5169
|
-
label && /* @__PURE__ */
|
|
5183
|
+
label && /* @__PURE__ */ jsx35(InputLabel_default, { required, error: hasError, children: label }),
|
|
5170
5184
|
/* @__PURE__ */ jsxs10(
|
|
5171
5185
|
"select",
|
|
5172
5186
|
{
|
|
@@ -5176,8 +5190,8 @@ var Select = ({
|
|
|
5176
5190
|
"aria-required": required,
|
|
5177
5191
|
...rest,
|
|
5178
5192
|
children: [
|
|
5179
|
-
placeholder && /* @__PURE__ */
|
|
5180
|
-
options.map((option) => /* @__PURE__ */
|
|
5193
|
+
placeholder && /* @__PURE__ */ jsx35("option", { value: "", disabled: true, children: placeholder }),
|
|
5194
|
+
options.map((option) => /* @__PURE__ */ jsx35("option", { value: option.value, className: styles["option"], children: option.label }, option.value))
|
|
5181
5195
|
]
|
|
5182
5196
|
}
|
|
5183
5197
|
)
|
|
@@ -5188,7 +5202,7 @@ var Select = ({
|
|
|
5188
5202
|
var Select_default = Select;
|
|
5189
5203
|
|
|
5190
5204
|
// src/components/factories/FieldFactory.tsx
|
|
5191
|
-
import { jsx as
|
|
5205
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
5192
5206
|
var validateFieldValue = (value, type, required = false, touched = false) => {
|
|
5193
5207
|
if (required && touched && (!value || value.trim() === "")) {
|
|
5194
5208
|
return "This field is required";
|
|
@@ -5240,9 +5254,9 @@ var createField = (config) => {
|
|
|
5240
5254
|
};
|
|
5241
5255
|
switch (type) {
|
|
5242
5256
|
case FieldType.Password:
|
|
5243
|
-
return /* @__PURE__ */
|
|
5257
|
+
return /* @__PURE__ */ jsx36(PasswordField_default, { ...commonProps, onChange });
|
|
5244
5258
|
case FieldType.Text:
|
|
5245
|
-
return /* @__PURE__ */
|
|
5259
|
+
return /* @__PURE__ */ jsx36(
|
|
5246
5260
|
TextField_default,
|
|
5247
5261
|
{
|
|
5248
5262
|
...commonProps,
|
|
@@ -5252,7 +5266,7 @@ var createField = (config) => {
|
|
|
5252
5266
|
}
|
|
5253
5267
|
);
|
|
5254
5268
|
case FieldType.Email:
|
|
5255
|
-
return /* @__PURE__ */
|
|
5269
|
+
return /* @__PURE__ */ jsx36(
|
|
5256
5270
|
TextField_default,
|
|
5257
5271
|
{
|
|
5258
5272
|
...commonProps,
|
|
@@ -5262,7 +5276,7 @@ var createField = (config) => {
|
|
|
5262
5276
|
}
|
|
5263
5277
|
);
|
|
5264
5278
|
case FieldType.Tel:
|
|
5265
|
-
return /* @__PURE__ */
|
|
5279
|
+
return /* @__PURE__ */ jsx36(
|
|
5266
5280
|
TextField_default,
|
|
5267
5281
|
{
|
|
5268
5282
|
...commonProps,
|
|
@@ -5272,10 +5286,10 @@ var createField = (config) => {
|
|
|
5272
5286
|
}
|
|
5273
5287
|
);
|
|
5274
5288
|
case FieldType.Date:
|
|
5275
|
-
return /* @__PURE__ */
|
|
5289
|
+
return /* @__PURE__ */ jsx36(DatePicker_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
5276
5290
|
case FieldType.Checkbox: {
|
|
5277
5291
|
const isChecked = value === "true" || value === true;
|
|
5278
|
-
return /* @__PURE__ */
|
|
5292
|
+
return /* @__PURE__ */ jsx36(
|
|
5279
5293
|
Checkbox_default,
|
|
5280
5294
|
{
|
|
5281
5295
|
...commonProps,
|
|
@@ -5285,9 +5299,9 @@ var createField = (config) => {
|
|
|
5285
5299
|
);
|
|
5286
5300
|
}
|
|
5287
5301
|
case FieldType.Otp:
|
|
5288
|
-
return /* @__PURE__ */
|
|
5302
|
+
return /* @__PURE__ */ jsx36(OtpField_default, { ...commonProps, onChange: (e) => onChange(e.target.value) });
|
|
5289
5303
|
case FieldType.Number:
|
|
5290
|
-
return /* @__PURE__ */
|
|
5304
|
+
return /* @__PURE__ */ jsx36(
|
|
5291
5305
|
TextField_default,
|
|
5292
5306
|
{
|
|
5293
5307
|
...commonProps,
|
|
@@ -5299,7 +5313,7 @@ var createField = (config) => {
|
|
|
5299
5313
|
case FieldType.Select: {
|
|
5300
5314
|
const fieldOptions = options.length > 0 ? options : [];
|
|
5301
5315
|
if (fieldOptions.length > 0) {
|
|
5302
|
-
return /* @__PURE__ */
|
|
5316
|
+
return /* @__PURE__ */ jsx36(
|
|
5303
5317
|
Select_default,
|
|
5304
5318
|
{
|
|
5305
5319
|
...commonProps,
|
|
@@ -5309,7 +5323,7 @@ var createField = (config) => {
|
|
|
5309
5323
|
}
|
|
5310
5324
|
);
|
|
5311
5325
|
}
|
|
5312
|
-
return /* @__PURE__ */
|
|
5326
|
+
return /* @__PURE__ */ jsx36(
|
|
5313
5327
|
TextField_default,
|
|
5314
5328
|
{
|
|
5315
5329
|
...commonProps,
|
|
@@ -5321,7 +5335,7 @@ var createField = (config) => {
|
|
|
5321
5335
|
);
|
|
5322
5336
|
}
|
|
5323
5337
|
default:
|
|
5324
|
-
return /* @__PURE__ */
|
|
5338
|
+
return /* @__PURE__ */ jsx36(
|
|
5325
5339
|
TextField_default,
|
|
5326
5340
|
{
|
|
5327
5341
|
...commonProps,
|
|
@@ -5335,7 +5349,7 @@ var createField = (config) => {
|
|
|
5335
5349
|
var FieldFactory = (props) => createField(props);
|
|
5336
5350
|
|
|
5337
5351
|
// src/components/presentation/auth/SignIn/v1/options/EmailOtp.tsx
|
|
5338
|
-
import { Fragment as Fragment8, jsx as
|
|
5352
|
+
import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5339
5353
|
var EmailOtp = ({
|
|
5340
5354
|
authenticator,
|
|
5341
5355
|
formValues,
|
|
@@ -5360,7 +5374,7 @@ var EmailOtp = ({
|
|
|
5360
5374
|
return /* @__PURE__ */ jsxs11(Fragment8, { children: [
|
|
5361
5375
|
formFields.map((param) => {
|
|
5362
5376
|
const isOtpParam = param.param.toLowerCase().includes("otp") || param.param.toLowerCase().includes("code");
|
|
5363
|
-
return /* @__PURE__ */
|
|
5377
|
+
return /* @__PURE__ */ jsx37("div", { children: isOtpParam && hasOtpField ? /* @__PURE__ */ jsx37(
|
|
5364
5378
|
OtpField_default,
|
|
5365
5379
|
{
|
|
5366
5380
|
length: 6,
|
|
@@ -5381,7 +5395,7 @@ var EmailOtp = ({
|
|
|
5381
5395
|
value: formValues[param.param] || ""
|
|
5382
5396
|
}) }, param.param);
|
|
5383
5397
|
}),
|
|
5384
|
-
/* @__PURE__ */
|
|
5398
|
+
/* @__PURE__ */ jsx37(
|
|
5385
5399
|
Button_default,
|
|
5386
5400
|
{
|
|
5387
5401
|
fullWidth: true,
|
|
@@ -5402,7 +5416,7 @@ var EmailOtp_default = EmailOtp;
|
|
|
5402
5416
|
// src/components/presentation/auth/SignIn/v1/options/IdentifierFirst.tsx
|
|
5403
5417
|
import { EmbeddedSignInFlowAuthenticatorParamType as EmbeddedSignInFlowAuthenticatorParamType2, FieldType as FieldType3 } from "@asgardeo/browser";
|
|
5404
5418
|
import { useEffect as useEffect10 } from "react";
|
|
5405
|
-
import { Fragment as Fragment9, jsx as
|
|
5419
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5406
5420
|
var IdentifierFirst = ({
|
|
5407
5421
|
authenticator,
|
|
5408
5422
|
formValues,
|
|
@@ -5422,7 +5436,7 @@ var IdentifierFirst = ({
|
|
|
5422
5436
|
setSubtitle(t("identifier.first.subheading"));
|
|
5423
5437
|
}, [setTitle, setSubtitle, t]);
|
|
5424
5438
|
return /* @__PURE__ */ jsxs12(Fragment9, { children: [
|
|
5425
|
-
formFields.map((param) => /* @__PURE__ */
|
|
5439
|
+
formFields.map((param) => /* @__PURE__ */ jsx38("div", { children: createField({
|
|
5426
5440
|
className: inputClassName,
|
|
5427
5441
|
disabled: isLoading,
|
|
5428
5442
|
label: param.displayName,
|
|
@@ -5436,7 +5450,7 @@ var IdentifierFirst = ({
|
|
|
5436
5450
|
type: param.type === EmbeddedSignInFlowAuthenticatorParamType2.String && param.confidential ? FieldType3.Password : FieldType3.Text,
|
|
5437
5451
|
value: formValues[param.param] || ""
|
|
5438
5452
|
}) }, param.param)),
|
|
5439
|
-
/* @__PURE__ */
|
|
5453
|
+
/* @__PURE__ */ jsx38(
|
|
5440
5454
|
Button_default,
|
|
5441
5455
|
{
|
|
5442
5456
|
fullWidth: true,
|
|
@@ -5456,7 +5470,7 @@ var IdentifierFirst_default = IdentifierFirst;
|
|
|
5456
5470
|
|
|
5457
5471
|
// src/components/presentation/auth/SignIn/v1/options/MultiOptionButton.tsx
|
|
5458
5472
|
import { ApplicationNativeAuthenticationConstants, EmbeddedSignInFlowAuthenticatorKnownIdPType } from "@asgardeo/browser";
|
|
5459
|
-
import { jsx as
|
|
5473
|
+
import { jsx as jsx39, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
5460
5474
|
var MultiOptionButton = ({
|
|
5461
5475
|
authenticator,
|
|
5462
5476
|
isLoading,
|
|
@@ -5479,7 +5493,7 @@ var MultiOptionButton = ({
|
|
|
5479
5493
|
const { authenticatorId } = authenticator;
|
|
5480
5494
|
switch (authenticatorId) {
|
|
5481
5495
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.SmsOtp:
|
|
5482
|
-
return /* @__PURE__ */
|
|
5496
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39(
|
|
5483
5497
|
"path",
|
|
5484
5498
|
{
|
|
5485
5499
|
fill: "currentColor",
|
|
@@ -5487,7 +5501,7 @@ var MultiOptionButton = ({
|
|
|
5487
5501
|
}
|
|
5488
5502
|
) });
|
|
5489
5503
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.EmailOtp:
|
|
5490
|
-
return /* @__PURE__ */
|
|
5504
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39(
|
|
5491
5505
|
"path",
|
|
5492
5506
|
{
|
|
5493
5507
|
fill: "currentColor",
|
|
@@ -5495,9 +5509,9 @@ var MultiOptionButton = ({
|
|
|
5495
5509
|
}
|
|
5496
5510
|
) });
|
|
5497
5511
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Totp:
|
|
5498
|
-
return /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39("path", { fill: "currentColor", d: "M12 1L3 5v6c0 5.55 3.84 10.74 9 12c5.16-1.26 9-6.45 9-12V5z" }) });
|
|
5499
5513
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.PushNotification:
|
|
5500
|
-
return /* @__PURE__ */
|
|
5514
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39(
|
|
5501
5515
|
"path",
|
|
5502
5516
|
{
|
|
5503
5517
|
fill: "currentColor",
|
|
@@ -5506,15 +5520,15 @@ var MultiOptionButton = ({
|
|
|
5506
5520
|
) });
|
|
5507
5521
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey:
|
|
5508
5522
|
return /* @__PURE__ */ jsxs13("svg", { fill: "currentColor", width: "18", height: "18", viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5509
|
-
/* @__PURE__ */
|
|
5510
|
-
/* @__PURE__ */
|
|
5523
|
+
/* @__PURE__ */ jsx39("g", { id: "SVGRepo_bgCarrier", strokeWidth: "0" }),
|
|
5524
|
+
/* @__PURE__ */ jsx39("g", { id: "SVGRepo_tracerCarrier", "stroke-linecap": "round", "stroke-linejoin": "round" }),
|
|
5511
5525
|
/* @__PURE__ */ jsxs13("g", { id: "SVGRepo_iconCarrier", children: [
|
|
5512
|
-
/* @__PURE__ */
|
|
5526
|
+
/* @__PURE__ */ jsx39("path", { d: "M7.7 4.7C9.36 3.07 12.68 2 16.17 2S23 3.06 24.6 4.7A1 1 0 0 0 26 3.3C23.6.86 19.34 0 16.16 0S8.72.87 6.3 3.3a1 1 0 0 0 1.4 1.4zM29.2 12.55C26.38 6.88 22 4 16.17 4s-10.22 2.88-13 8.55a1 1 0 0 0 .44 1.34 1 1 0 0 0 1.35-.45C7.4 8.45 11.08 6 16.15 6s8.77 2.44 11.27 7.45a1 1 0 0 0 .9.55.87.87 0 0 0 .44-.1 1 1 0 0 0 .45-1.35zM19.4 28.08c-4.13-1.77-5.8-4.5-6-6.5a2.87 2.87 0 0 1 1.13-2.75c.85-.57 2.1.24 3.87 1.52s4.13 3 6.17 1.45c1.8-1.35 2.34-3.76 1.45-6.44A10.85 10.85 0 0 0 16.16 8C7.2 8 4 15.75 4 23a1 1 0 0 0 2 0c0-3 .73-13 10.16-13 3.9 0 7 3.1 8 6 .3.87.8 3-.75 4.2-.8.6-2-.2-3.8-1.47s-4.07-2.94-6.14-1.56a4.87 4.87 0 0 0-2 4.6c.24 2.56 2.24 6 7.18 8.15A1 1 0 0 0 19 30a1 1 0 0 0 .4-1.92zM10 19.24a7.06 7.06 0 0 1 5.2-4.65c2.24-.43 4.32.6 6 3a1 1 0 1 0 1.62-1.17c-2.9-4.07-6.27-4.12-8-3.8A9.1 9.1 0 0 0 8 18.77c-1 3.94.43 8.27 4.2 12.87a1 1 0 0 0 .8.37.94.94 0 0 0 .63-.23 1 1 0 0 0 .14-1.4c-3.34-4.1-4.62-7.83-3.77-11.13zM25.3 24.3a3 3 0 0 1-3.06.63c-2.4-.57-4.78-2.7-5.3-4.25a1 1 0 1 0-1.9.64c.8 2.33 3.87 4.88 6.74 5.56a6.84 6.84 0 0 0 1.52.18 4.7 4.7 0 0 0 3.4-1.35 1 1 0 0 0-1.4-1.4z" }),
|
|
5513
5527
|
" "
|
|
5514
5528
|
] })
|
|
5515
5529
|
] });
|
|
5516
5530
|
case ApplicationNativeAuthenticationConstants.SupportedAuthenticators.MagicLink:
|
|
5517
|
-
return /* @__PURE__ */
|
|
5531
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39(
|
|
5518
5532
|
"path",
|
|
5519
5533
|
{
|
|
5520
5534
|
fill: "currentColor",
|
|
@@ -5522,7 +5536,7 @@ var MultiOptionButton = ({
|
|
|
5522
5536
|
}
|
|
5523
5537
|
) });
|
|
5524
5538
|
default:
|
|
5525
|
-
return /* @__PURE__ */
|
|
5539
|
+
return /* @__PURE__ */ jsx39("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx39(
|
|
5526
5540
|
"path",
|
|
5527
5541
|
{
|
|
5528
5542
|
fill: "currentColor",
|
|
@@ -5534,7 +5548,7 @@ var MultiOptionButton = ({
|
|
|
5534
5548
|
const handleClick = () => {
|
|
5535
5549
|
onSubmit(authenticator);
|
|
5536
5550
|
};
|
|
5537
|
-
return /* @__PURE__ */
|
|
5551
|
+
return /* @__PURE__ */ jsx39(
|
|
5538
5552
|
Button_default,
|
|
5539
5553
|
{
|
|
5540
5554
|
fullWidth: true,
|
|
@@ -5554,7 +5568,7 @@ var MultiOptionButton_default = MultiOptionButton;
|
|
|
5554
5568
|
// src/components/presentation/auth/SignIn/v1/options/SmsOtp.tsx
|
|
5555
5569
|
import { EmbeddedSignInFlowAuthenticatorParamType as EmbeddedSignInFlowAuthenticatorParamType3, FieldType as FieldType4 } from "@asgardeo/browser";
|
|
5556
5570
|
import { useEffect as useEffect11 } from "react";
|
|
5557
|
-
import { Fragment as Fragment10, jsx as
|
|
5571
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
5558
5572
|
var SmsOtp = ({
|
|
5559
5573
|
authenticator,
|
|
5560
5574
|
formValues,
|
|
@@ -5579,7 +5593,7 @@ var SmsOtp = ({
|
|
|
5579
5593
|
return /* @__PURE__ */ jsxs14(Fragment10, { children: [
|
|
5580
5594
|
formFields.map((param) => {
|
|
5581
5595
|
const isOtpParam = param.param.toLowerCase().includes("otp") || param.param.toLowerCase().includes("code");
|
|
5582
|
-
return /* @__PURE__ */
|
|
5596
|
+
return /* @__PURE__ */ jsx40("div", { children: isOtpParam && hasOtpField ? /* @__PURE__ */ jsx40(
|
|
5583
5597
|
OtpField_default,
|
|
5584
5598
|
{
|
|
5585
5599
|
length: 6,
|
|
@@ -5600,7 +5614,7 @@ var SmsOtp = ({
|
|
|
5600
5614
|
value: formValues[param.param] || ""
|
|
5601
5615
|
}) }, param.param);
|
|
5602
5616
|
}),
|
|
5603
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ jsx40(
|
|
5604
5618
|
Button_default,
|
|
5605
5619
|
{
|
|
5606
5620
|
fullWidth: true,
|
|
@@ -5619,7 +5633,7 @@ var SmsOtp = ({
|
|
|
5619
5633
|
var SmsOtp_default = SmsOtp;
|
|
5620
5634
|
|
|
5621
5635
|
// src/components/presentation/auth/SignIn/v1/options/SocialButton.tsx
|
|
5622
|
-
import { jsx as
|
|
5636
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
5623
5637
|
var SocialLogin = ({
|
|
5624
5638
|
isLoading,
|
|
5625
5639
|
preferences,
|
|
@@ -5627,7 +5641,7 @@ var SocialLogin = ({
|
|
|
5627
5641
|
...rest
|
|
5628
5642
|
}) => {
|
|
5629
5643
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5630
|
-
return /* @__PURE__ */
|
|
5644
|
+
return /* @__PURE__ */ jsx41(
|
|
5631
5645
|
Button_default,
|
|
5632
5646
|
{
|
|
5633
5647
|
...rest,
|
|
@@ -5636,7 +5650,7 @@ var SocialLogin = ({
|
|
|
5636
5650
|
color: "secondary",
|
|
5637
5651
|
variant: "outline",
|
|
5638
5652
|
disabled: isLoading,
|
|
5639
|
-
startIcon: /* @__PURE__ */
|
|
5653
|
+
startIcon: /* @__PURE__ */ jsx41("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx41(
|
|
5640
5654
|
"path",
|
|
5641
5655
|
{
|
|
5642
5656
|
fill: "currentColor",
|
|
@@ -5652,7 +5666,7 @@ var SocialButton_default = SocialLogin;
|
|
|
5652
5666
|
// src/components/presentation/auth/SignIn/v1/options/Totp.tsx
|
|
5653
5667
|
import { EmbeddedSignInFlowAuthenticatorParamType as EmbeddedSignInFlowAuthenticatorParamType4, FieldType as FieldType5 } from "@asgardeo/browser";
|
|
5654
5668
|
import { useEffect as useEffect12 } from "react";
|
|
5655
|
-
import { Fragment as Fragment11, jsx as
|
|
5669
|
+
import { Fragment as Fragment11, jsx as jsx42, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
5656
5670
|
var Totp = ({
|
|
5657
5671
|
authenticator,
|
|
5658
5672
|
formValues,
|
|
@@ -5677,7 +5691,7 @@ var Totp = ({
|
|
|
5677
5691
|
return /* @__PURE__ */ jsxs15(Fragment11, { children: [
|
|
5678
5692
|
formFields.map((param) => {
|
|
5679
5693
|
const isTotpParam = param.param.toLowerCase().includes("totp") || param.param.toLowerCase().includes("token");
|
|
5680
|
-
return /* @__PURE__ */
|
|
5694
|
+
return /* @__PURE__ */ jsx42("div", { children: isTotpParam && hasTotpField ? /* @__PURE__ */ jsx42(
|
|
5681
5695
|
OtpField_default,
|
|
5682
5696
|
{
|
|
5683
5697
|
length: 6,
|
|
@@ -5698,7 +5712,7 @@ var Totp = ({
|
|
|
5698
5712
|
value: formValues[param.param] || ""
|
|
5699
5713
|
}) }, param.param);
|
|
5700
5714
|
}),
|
|
5701
|
-
/* @__PURE__ */
|
|
5715
|
+
/* @__PURE__ */ jsx42(
|
|
5702
5716
|
Button_default,
|
|
5703
5717
|
{
|
|
5704
5718
|
fullWidth: true,
|
|
@@ -5719,7 +5733,7 @@ var Totp_default = Totp;
|
|
|
5719
5733
|
// src/components/presentation/auth/SignIn/v1/options/UsernamePassword.tsx
|
|
5720
5734
|
import { EmbeddedSignInFlowAuthenticatorParamType as EmbeddedSignInFlowAuthenticatorParamType5, FieldType as FieldType6 } from "@asgardeo/browser";
|
|
5721
5735
|
import { useEffect as useEffect13 } from "react";
|
|
5722
|
-
import { Fragment as Fragment12, jsx as
|
|
5736
|
+
import { Fragment as Fragment12, jsx as jsx43, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5723
5737
|
var UsernamePassword = ({
|
|
5724
5738
|
authenticator,
|
|
5725
5739
|
formValues,
|
|
@@ -5739,7 +5753,7 @@ var UsernamePassword = ({
|
|
|
5739
5753
|
setSubtitle(t("username.password.subheading"));
|
|
5740
5754
|
}, [setTitle, setSubtitle, t]);
|
|
5741
5755
|
return /* @__PURE__ */ jsxs16(Fragment12, { children: [
|
|
5742
|
-
formFields.map((param) => /* @__PURE__ */
|
|
5756
|
+
formFields.map((param) => /* @__PURE__ */ jsx43("div", { children: createField({
|
|
5743
5757
|
className: inputClassName,
|
|
5744
5758
|
disabled: isLoading,
|
|
5745
5759
|
label: param.displayName,
|
|
@@ -5753,7 +5767,7 @@ var UsernamePassword = ({
|
|
|
5753
5767
|
type: param.type === EmbeddedSignInFlowAuthenticatorParamType5.String && param.confidential ? FieldType6.Password : FieldType6.Text,
|
|
5754
5768
|
value: formValues[param.param] || ""
|
|
5755
5769
|
}) }, param.param)),
|
|
5756
|
-
/* @__PURE__ */
|
|
5770
|
+
/* @__PURE__ */ jsx43(
|
|
5757
5771
|
Button_default,
|
|
5758
5772
|
{
|
|
5759
5773
|
fullWidth: true,
|
|
@@ -5773,7 +5787,7 @@ var UsernamePassword = ({
|
|
|
5773
5787
|
var UsernamePassword_default = UsernamePassword;
|
|
5774
5788
|
|
|
5775
5789
|
// src/components/adapters/FacebookButton.tsx
|
|
5776
|
-
import { jsx as
|
|
5790
|
+
import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5777
5791
|
var FacebookButton = ({
|
|
5778
5792
|
isLoading,
|
|
5779
5793
|
preferences,
|
|
@@ -5781,7 +5795,7 @@ var FacebookButton = ({
|
|
|
5781
5795
|
...rest
|
|
5782
5796
|
}) => {
|
|
5783
5797
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5784
|
-
return /* @__PURE__ */
|
|
5798
|
+
return /* @__PURE__ */ jsx44(
|
|
5785
5799
|
Button_default,
|
|
5786
5800
|
{
|
|
5787
5801
|
...rest,
|
|
@@ -5791,14 +5805,14 @@ var FacebookButton = ({
|
|
|
5791
5805
|
variant: "solid",
|
|
5792
5806
|
disabled: isLoading,
|
|
5793
5807
|
startIcon: /* @__PURE__ */ jsxs17("svg", { width: "18", height: "18", viewBox: "0 0 512 512", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5794
|
-
/* @__PURE__ */
|
|
5808
|
+
/* @__PURE__ */ jsx44(
|
|
5795
5809
|
"path",
|
|
5796
5810
|
{
|
|
5797
5811
|
fill: "#1976D2",
|
|
5798
5812
|
d: "M448,0H64C28.704,0,0,28.704,0,64v384c0,35.296,28.704,64,64,64h384c35.296,0,64-28.704,64-64V64C512,28.704,483.296,0,448,0z"
|
|
5799
5813
|
}
|
|
5800
5814
|
),
|
|
5801
|
-
/* @__PURE__ */
|
|
5815
|
+
/* @__PURE__ */ jsx44(
|
|
5802
5816
|
"path",
|
|
5803
5817
|
{
|
|
5804
5818
|
fill: "#FAFAFA",
|
|
@@ -5813,7 +5827,7 @@ var FacebookButton = ({
|
|
|
5813
5827
|
var FacebookButton_default = FacebookButton;
|
|
5814
5828
|
|
|
5815
5829
|
// src/components/adapters/GitHubButton.tsx
|
|
5816
|
-
import { jsx as
|
|
5830
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
5817
5831
|
var GitHubButton = ({
|
|
5818
5832
|
isLoading,
|
|
5819
5833
|
preferences,
|
|
@@ -5821,7 +5835,7 @@ var GitHubButton = ({
|
|
|
5821
5835
|
...rest
|
|
5822
5836
|
}) => {
|
|
5823
5837
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5824
|
-
return /* @__PURE__ */
|
|
5838
|
+
return /* @__PURE__ */ jsx45(
|
|
5825
5839
|
Button_default,
|
|
5826
5840
|
{
|
|
5827
5841
|
...rest,
|
|
@@ -5830,7 +5844,7 @@ var GitHubButton = ({
|
|
|
5830
5844
|
color: "secondary",
|
|
5831
5845
|
variant: "solid",
|
|
5832
5846
|
disabled: isLoading,
|
|
5833
|
-
startIcon: /* @__PURE__ */
|
|
5847
|
+
startIcon: /* @__PURE__ */ jsx45("svg", { width: "18", height: "18", viewBox: "0 0 67.91 66.233", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx45("g", { transform: "translate(-386.96 658.072)", children: /* @__PURE__ */ jsx45(
|
|
5834
5848
|
"path",
|
|
5835
5849
|
{
|
|
5836
5850
|
d: "M420.915-658.072a33.956,33.956,0,0,0-33.955,33.955,33.963,33.963,0,0,0,23.221,32.22c1.7.314,2.32-.737,2.32-1.633,0-.81-.031-3.484-.046-6.322-9.446,2.054-11.44-4.006-11.44-4.006-1.545-3.925-3.77-4.968-3.77-4.968-3.081-2.107.232-2.064.232-2.064,3.41.239,5.205,3.5,5.205,3.5,3.028,5.19,7.943,3.69,9.881,2.822a7.23,7.23,0,0,1,2.156-4.54c-7.542-.859-15.47-3.77-15.47-16.781a13.141,13.141,0,0,1,3.5-9.114,12.2,12.2,0,0,1,.329-8.986s2.851-.913,9.34,3.48a32.545,32.545,0,0,1,8.5-1.143,32.629,32.629,0,0,1,8.506,1.143c6.481-4.393,9.328-3.48,9.328-3.48a12.185,12.185,0,0,1,.333,8.986,13.115,13.115,0,0,1,3.495,9.114c0,13.042-7.943,15.913-15.5,16.754,1.218,1.054,2.3,3.12,2.3,6.288,0,4.543-.039,8.2-.039,9.318,0,.9.611,1.962,2.332,1.629a33.959,33.959,0,0,0,23.2-32.215,33.955,33.955,0,0,0-33.955-33.955",
|
|
@@ -5844,7 +5858,7 @@ var GitHubButton = ({
|
|
|
5844
5858
|
var GitHubButton_default = GitHubButton;
|
|
5845
5859
|
|
|
5846
5860
|
// src/components/adapters/GoogleButton.tsx
|
|
5847
|
-
import { jsx as
|
|
5861
|
+
import { jsx as jsx46, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5848
5862
|
var GoogleButton = ({
|
|
5849
5863
|
isLoading,
|
|
5850
5864
|
preferences,
|
|
@@ -5852,7 +5866,7 @@ var GoogleButton = ({
|
|
|
5852
5866
|
...rest
|
|
5853
5867
|
}) => {
|
|
5854
5868
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5855
|
-
return /* @__PURE__ */
|
|
5869
|
+
return /* @__PURE__ */ jsx46(
|
|
5856
5870
|
Button_default,
|
|
5857
5871
|
{
|
|
5858
5872
|
...rest,
|
|
@@ -5861,8 +5875,8 @@ var GoogleButton = ({
|
|
|
5861
5875
|
color: "secondary",
|
|
5862
5876
|
variant: "solid",
|
|
5863
5877
|
disabled: isLoading,
|
|
5864
|
-
startIcon: /* @__PURE__ */
|
|
5865
|
-
/* @__PURE__ */
|
|
5878
|
+
startIcon: /* @__PURE__ */ jsx46("svg", { width: "18", height: "18", viewBox: "0 0 67.91 67.901", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxs18("g", { transform: "translate(-0.001 -0.001)", children: [
|
|
5879
|
+
/* @__PURE__ */ jsx46(
|
|
5866
5880
|
"path",
|
|
5867
5881
|
{
|
|
5868
5882
|
d: "M15.049,160.965l-2.364,8.824-8.639.183a34.011,34.011,0,0,1-.25-31.7h0l7.691,1.41,3.369,7.645a20.262,20.262,0,0,0,.19,13.642Z",
|
|
@@ -5870,7 +5884,7 @@ var GoogleButton = ({
|
|
|
5870
5884
|
fill: "#fbbb00"
|
|
5871
5885
|
}
|
|
5872
5886
|
),
|
|
5873
|
-
/* @__PURE__ */
|
|
5887
|
+
/* @__PURE__ */ jsx46(
|
|
5874
5888
|
"path",
|
|
5875
5889
|
{
|
|
5876
5890
|
d: "M294.24,208.176A33.939,33.939,0,0,1,282.137,241h0l-9.687-.494-1.371-8.559a20.235,20.235,0,0,0,8.706-10.333H261.628V208.176Z",
|
|
@@ -5878,7 +5892,7 @@ var GoogleButton = ({
|
|
|
5878
5892
|
fill: "#518ef8"
|
|
5879
5893
|
}
|
|
5880
5894
|
),
|
|
5881
|
-
/* @__PURE__ */
|
|
5895
|
+
/* @__PURE__ */ jsx46(
|
|
5882
5896
|
"path",
|
|
5883
5897
|
{
|
|
5884
5898
|
d: "M81.668,328.8h0a33.962,33.962,0,0,1-51.161-10.387l11-9.006a20.192,20.192,0,0,0,29.1,10.338Z",
|
|
@@ -5886,7 +5900,7 @@ var GoogleButton = ({
|
|
|
5886
5900
|
fill: "#28b446"
|
|
5887
5901
|
}
|
|
5888
5902
|
),
|
|
5889
|
-
/* @__PURE__ */
|
|
5903
|
+
/* @__PURE__ */ jsx46(
|
|
5890
5904
|
"path",
|
|
5891
5905
|
{
|
|
5892
5906
|
d: "M80.451,7.816l-11,9A20.19,20.19,0,0,0,39.686,27.393l-11.06-9.055h0A33.959,33.959,0,0,1,80.451,7.816Z",
|
|
@@ -5902,7 +5916,7 @@ var GoogleButton = ({
|
|
|
5902
5916
|
var GoogleButton_default = GoogleButton;
|
|
5903
5917
|
|
|
5904
5918
|
// src/components/adapters/LinkedInButton.tsx
|
|
5905
|
-
import { jsx as
|
|
5919
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5906
5920
|
var LinkedInButton = ({
|
|
5907
5921
|
isLoading,
|
|
5908
5922
|
preferences,
|
|
@@ -5910,7 +5924,7 @@ var LinkedInButton = ({
|
|
|
5910
5924
|
...rest
|
|
5911
5925
|
}) => {
|
|
5912
5926
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5913
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ jsx47(
|
|
5914
5928
|
Button_default,
|
|
5915
5929
|
{
|
|
5916
5930
|
...rest,
|
|
@@ -5919,7 +5933,7 @@ var LinkedInButton = ({
|
|
|
5919
5933
|
color: "secondary",
|
|
5920
5934
|
variant: "solid",
|
|
5921
5935
|
disabled: isLoading,
|
|
5922
|
-
startIcon: /* @__PURE__ */
|
|
5936
|
+
startIcon: /* @__PURE__ */ jsx47("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx47(
|
|
5923
5937
|
"path",
|
|
5924
5938
|
{
|
|
5925
5939
|
fill: "#0077B5",
|
|
@@ -5933,7 +5947,7 @@ var LinkedInButton = ({
|
|
|
5933
5947
|
var LinkedInButton_default = LinkedInButton;
|
|
5934
5948
|
|
|
5935
5949
|
// src/components/adapters/MicrosoftButton.tsx
|
|
5936
|
-
import { jsx as
|
|
5950
|
+
import { jsx as jsx48, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5937
5951
|
var MicrosoftButton = ({
|
|
5938
5952
|
isLoading,
|
|
5939
5953
|
preferences,
|
|
@@ -5941,7 +5955,7 @@ var MicrosoftButton = ({
|
|
|
5941
5955
|
...rest
|
|
5942
5956
|
}) => {
|
|
5943
5957
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5944
|
-
return /* @__PURE__ */
|
|
5958
|
+
return /* @__PURE__ */ jsx48(
|
|
5945
5959
|
Button_default,
|
|
5946
5960
|
{
|
|
5947
5961
|
...rest,
|
|
@@ -5951,11 +5965,11 @@ var MicrosoftButton = ({
|
|
|
5951
5965
|
variant: "solid",
|
|
5952
5966
|
disabled: isLoading,
|
|
5953
5967
|
startIcon: /* @__PURE__ */ jsxs19("svg", { width: "14", height: "14", viewBox: "0 0 23 23", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5954
|
-
/* @__PURE__ */
|
|
5955
|
-
/* @__PURE__ */
|
|
5956
|
-
/* @__PURE__ */
|
|
5957
|
-
/* @__PURE__ */
|
|
5958
|
-
/* @__PURE__ */
|
|
5968
|
+
/* @__PURE__ */ jsx48("path", { fill: "#f3f3f3", d: "M0 0h23v23H0z" }),
|
|
5969
|
+
/* @__PURE__ */ jsx48("path", { fill: "#f35325", d: "M1 1h10v10H1z" }),
|
|
5970
|
+
/* @__PURE__ */ jsx48("path", { fill: "#81bc06", d: "M12 1h10v10H12z" }),
|
|
5971
|
+
/* @__PURE__ */ jsx48("path", { fill: "#05a6f0", d: "M1 12h10v10H1z" }),
|
|
5972
|
+
/* @__PURE__ */ jsx48("path", { fill: "#ffba08", d: "M12 12h10v10H12z" })
|
|
5959
5973
|
] }),
|
|
5960
5974
|
children: children ?? t("elements.buttons.microsoft.text")
|
|
5961
5975
|
}
|
|
@@ -5964,7 +5978,7 @@ var MicrosoftButton = ({
|
|
|
5964
5978
|
var MicrosoftButton_default = MicrosoftButton;
|
|
5965
5979
|
|
|
5966
5980
|
// src/components/adapters/SignInWithEthereumButton.tsx
|
|
5967
|
-
import { jsx as
|
|
5981
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5968
5982
|
var SignInWithEthereumButton = ({
|
|
5969
5983
|
isLoading,
|
|
5970
5984
|
preferences,
|
|
@@ -5972,7 +5986,7 @@ var SignInWithEthereumButton = ({
|
|
|
5972
5986
|
...rest
|
|
5973
5987
|
}) => {
|
|
5974
5988
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
5975
|
-
return /* @__PURE__ */
|
|
5989
|
+
return /* @__PURE__ */ jsx49(
|
|
5976
5990
|
Button_default,
|
|
5977
5991
|
{
|
|
5978
5992
|
...rest,
|
|
@@ -5981,7 +5995,7 @@ var SignInWithEthereumButton = ({
|
|
|
5981
5995
|
color: "secondary",
|
|
5982
5996
|
variant: "solid",
|
|
5983
5997
|
disabled: isLoading,
|
|
5984
|
-
startIcon: /* @__PURE__ */
|
|
5998
|
+
startIcon: /* @__PURE__ */ jsx49("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx49(
|
|
5985
5999
|
"path",
|
|
5986
6000
|
{
|
|
5987
6001
|
fill: "#627EEA",
|
|
@@ -5995,7 +6009,7 @@ var SignInWithEthereumButton = ({
|
|
|
5995
6009
|
var SignInWithEthereumButton_default = SignInWithEthereumButton;
|
|
5996
6010
|
|
|
5997
6011
|
// src/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.tsx
|
|
5998
|
-
import { jsx as
|
|
6012
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5999
6013
|
var createSignInOption = ({
|
|
6000
6014
|
authenticator,
|
|
6001
6015
|
onSubmit,
|
|
@@ -6006,11 +6020,11 @@ var createSignInOption = ({
|
|
|
6006
6020
|
const hasParams = authenticator.metadata?.params && authenticator.metadata.params.length > 0;
|
|
6007
6021
|
switch (authenticator.authenticatorId) {
|
|
6008
6022
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.UsernamePassword:
|
|
6009
|
-
return /* @__PURE__ */
|
|
6023
|
+
return /* @__PURE__ */ jsx50(UsernamePassword_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6010
6024
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.IdentifierFirst:
|
|
6011
|
-
return /* @__PURE__ */
|
|
6025
|
+
return /* @__PURE__ */ jsx50(IdentifierFirst_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6012
6026
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.Google:
|
|
6013
|
-
return /* @__PURE__ */
|
|
6027
|
+
return /* @__PURE__ */ jsx50(
|
|
6014
6028
|
GoogleButton_default,
|
|
6015
6029
|
{
|
|
6016
6030
|
className: buttonClassName,
|
|
@@ -6020,7 +6034,7 @@ var createSignInOption = ({
|
|
|
6020
6034
|
}
|
|
6021
6035
|
);
|
|
6022
6036
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.GitHub:
|
|
6023
|
-
return /* @__PURE__ */
|
|
6037
|
+
return /* @__PURE__ */ jsx50(
|
|
6024
6038
|
GitHubButton_default,
|
|
6025
6039
|
{
|
|
6026
6040
|
preferences,
|
|
@@ -6030,7 +6044,7 @@ var createSignInOption = ({
|
|
|
6030
6044
|
}
|
|
6031
6045
|
);
|
|
6032
6046
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.Microsoft:
|
|
6033
|
-
return /* @__PURE__ */
|
|
6047
|
+
return /* @__PURE__ */ jsx50(
|
|
6034
6048
|
MicrosoftButton_default,
|
|
6035
6049
|
{
|
|
6036
6050
|
preferences,
|
|
@@ -6040,7 +6054,7 @@ var createSignInOption = ({
|
|
|
6040
6054
|
}
|
|
6041
6055
|
);
|
|
6042
6056
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.Facebook:
|
|
6043
|
-
return /* @__PURE__ */
|
|
6057
|
+
return /* @__PURE__ */ jsx50(
|
|
6044
6058
|
FacebookButton_default,
|
|
6045
6059
|
{
|
|
6046
6060
|
preferences,
|
|
@@ -6050,7 +6064,7 @@ var createSignInOption = ({
|
|
|
6050
6064
|
}
|
|
6051
6065
|
);
|
|
6052
6066
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.LinkedIn:
|
|
6053
|
-
return /* @__PURE__ */
|
|
6067
|
+
return /* @__PURE__ */ jsx50(
|
|
6054
6068
|
LinkedInButton_default,
|
|
6055
6069
|
{
|
|
6056
6070
|
preferences,
|
|
@@ -6060,7 +6074,7 @@ var createSignInOption = ({
|
|
|
6060
6074
|
}
|
|
6061
6075
|
);
|
|
6062
6076
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.SignInWithEthereum:
|
|
6063
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ jsx50(
|
|
6064
6078
|
SignInWithEthereumButton_default,
|
|
6065
6079
|
{
|
|
6066
6080
|
preferences,
|
|
@@ -6070,14 +6084,14 @@ var createSignInOption = ({
|
|
|
6070
6084
|
}
|
|
6071
6085
|
);
|
|
6072
6086
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.EmailOtp:
|
|
6073
|
-
return hasParams ? /* @__PURE__ */
|
|
6087
|
+
return hasParams ? /* @__PURE__ */ jsx50(EmailOtp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ jsx50(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6074
6088
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.Totp:
|
|
6075
|
-
return hasParams ? /* @__PURE__ */
|
|
6089
|
+
return hasParams ? /* @__PURE__ */ jsx50(Totp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ jsx50(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6076
6090
|
case ApplicationNativeAuthenticationConstants2.SupportedAuthenticators.SmsOtp:
|
|
6077
|
-
return hasParams ? /* @__PURE__ */
|
|
6091
|
+
return hasParams ? /* @__PURE__ */ jsx50(SmsOtp_default, { authenticator, preferences, onSubmit, ...rest }) : /* @__PURE__ */ jsx50(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6078
6092
|
default:
|
|
6079
6093
|
if (authenticator.idp !== EmbeddedSignInFlowAuthenticatorKnownIdPType2.Local) {
|
|
6080
|
-
return /* @__PURE__ */
|
|
6094
|
+
return /* @__PURE__ */ jsx50(
|
|
6081
6095
|
SocialButton_default,
|
|
6082
6096
|
{
|
|
6083
6097
|
authenticator,
|
|
@@ -6090,9 +6104,9 @@ var createSignInOption = ({
|
|
|
6090
6104
|
);
|
|
6091
6105
|
}
|
|
6092
6106
|
if (hasParams) {
|
|
6093
|
-
return /* @__PURE__ */
|
|
6107
|
+
return /* @__PURE__ */ jsx50(UsernamePassword_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6094
6108
|
}
|
|
6095
|
-
return /* @__PURE__ */
|
|
6109
|
+
return /* @__PURE__ */ jsx50(MultiOptionButton_default, { authenticator, preferences, onSubmit, ...rest });
|
|
6096
6110
|
}
|
|
6097
6111
|
};
|
|
6098
6112
|
var createSignInOptionFromAuthenticator = (authenticator, formValues, touchedFields, isLoading, onInputChange, onSubmit, options) => createSignInOption({
|
|
@@ -6110,7 +6124,7 @@ import { withVendorCSSClassPrefix as withVendorCSSClassPrefix15, bem as bem12 }
|
|
|
6110
6124
|
import { cx as cx15 } from "@emotion/css";
|
|
6111
6125
|
import {
|
|
6112
6126
|
forwardRef as forwardRef8,
|
|
6113
|
-
createContext as
|
|
6127
|
+
createContext as createContext11,
|
|
6114
6128
|
useContext as useContext10
|
|
6115
6129
|
} from "react";
|
|
6116
6130
|
|
|
@@ -6187,7 +6201,7 @@ var useStyles12 = (theme, colorScheme, variant) => useMemo20(() => {
|
|
|
6187
6201
|
var Alert_styles_default = useStyles12;
|
|
6188
6202
|
|
|
6189
6203
|
// src/components/primitives/Icons/CircleAlert.tsx
|
|
6190
|
-
import { jsx as
|
|
6204
|
+
import { jsx as jsx51, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
6191
6205
|
var CircleAlert = (props) => /* @__PURE__ */ jsxs20(
|
|
6192
6206
|
"svg",
|
|
6193
6207
|
{
|
|
@@ -6202,16 +6216,16 @@ var CircleAlert = (props) => /* @__PURE__ */ jsxs20(
|
|
|
6202
6216
|
strokeLinejoin: "round",
|
|
6203
6217
|
...props,
|
|
6204
6218
|
children: [
|
|
6205
|
-
/* @__PURE__ */
|
|
6206
|
-
/* @__PURE__ */
|
|
6207
|
-
/* @__PURE__ */
|
|
6219
|
+
/* @__PURE__ */ jsx51("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6220
|
+
/* @__PURE__ */ jsx51("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
6221
|
+
/* @__PURE__ */ jsx51("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
6208
6222
|
]
|
|
6209
6223
|
}
|
|
6210
6224
|
);
|
|
6211
6225
|
var CircleAlert_default = CircleAlert;
|
|
6212
6226
|
|
|
6213
6227
|
// src/components/primitives/Icons/CircleCheck.tsx
|
|
6214
|
-
import { jsx as
|
|
6228
|
+
import { jsx as jsx52, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
6215
6229
|
var CircleCheck = (props) => /* @__PURE__ */ jsxs21(
|
|
6216
6230
|
"svg",
|
|
6217
6231
|
{
|
|
@@ -6226,15 +6240,15 @@ var CircleCheck = (props) => /* @__PURE__ */ jsxs21(
|
|
|
6226
6240
|
strokeLinejoin: "round",
|
|
6227
6241
|
...props,
|
|
6228
6242
|
children: [
|
|
6229
|
-
/* @__PURE__ */
|
|
6230
|
-
/* @__PURE__ */
|
|
6243
|
+
/* @__PURE__ */ jsx52("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6244
|
+
/* @__PURE__ */ jsx52("path", { d: "m9 12 2 2 4-4" })
|
|
6231
6245
|
]
|
|
6232
6246
|
}
|
|
6233
6247
|
);
|
|
6234
6248
|
var CircleCheck_default = CircleCheck;
|
|
6235
6249
|
|
|
6236
6250
|
// src/components/primitives/Icons/Info.tsx
|
|
6237
|
-
import { jsx as
|
|
6251
|
+
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6238
6252
|
var Info = (props) => /* @__PURE__ */ jsxs22(
|
|
6239
6253
|
"svg",
|
|
6240
6254
|
{
|
|
@@ -6249,16 +6263,16 @@ var Info = (props) => /* @__PURE__ */ jsxs22(
|
|
|
6249
6263
|
strokeLinejoin: "round",
|
|
6250
6264
|
...props,
|
|
6251
6265
|
children: [
|
|
6252
|
-
/* @__PURE__ */
|
|
6253
|
-
/* @__PURE__ */
|
|
6254
|
-
/* @__PURE__ */
|
|
6266
|
+
/* @__PURE__ */ jsx53("circle", { cx: "12", cy: "12", r: "10" }),
|
|
6267
|
+
/* @__PURE__ */ jsx53("path", { d: "M12 16v-4" }),
|
|
6268
|
+
/* @__PURE__ */ jsx53("path", { d: "M12 8h.01" })
|
|
6255
6269
|
]
|
|
6256
6270
|
}
|
|
6257
6271
|
);
|
|
6258
6272
|
var Info_default = Info;
|
|
6259
6273
|
|
|
6260
6274
|
// src/components/primitives/Icons/TriangleAlert.tsx
|
|
6261
|
-
import { jsx as
|
|
6275
|
+
import { jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6262
6276
|
var TriangleAlert = (props) => /* @__PURE__ */ jsxs23(
|
|
6263
6277
|
"svg",
|
|
6264
6278
|
{
|
|
@@ -6273,16 +6287,16 @@ var TriangleAlert = (props) => /* @__PURE__ */ jsxs23(
|
|
|
6273
6287
|
strokeLinejoin: "round",
|
|
6274
6288
|
...props,
|
|
6275
6289
|
children: [
|
|
6276
|
-
/* @__PURE__ */
|
|
6277
|
-
/* @__PURE__ */
|
|
6278
|
-
/* @__PURE__ */
|
|
6290
|
+
/* @__PURE__ */ jsx54("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
|
|
6291
|
+
/* @__PURE__ */ jsx54("path", { d: "M12 9v4" }),
|
|
6292
|
+
/* @__PURE__ */ jsx54("path", { d: "M12 17h.01" })
|
|
6279
6293
|
]
|
|
6280
6294
|
}
|
|
6281
6295
|
);
|
|
6282
6296
|
var TriangleAlert_default = TriangleAlert;
|
|
6283
6297
|
|
|
6284
6298
|
// src/components/primitives/Alert/Alert.tsx
|
|
6285
|
-
import { jsx as
|
|
6299
|
+
import { jsx as jsx55, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6286
6300
|
var getDefaultIcon = (variant) => {
|
|
6287
6301
|
switch (variant) {
|
|
6288
6302
|
case "success":
|
|
@@ -6297,13 +6311,13 @@ var getDefaultIcon = (variant) => {
|
|
|
6297
6311
|
return Info_default;
|
|
6298
6312
|
}
|
|
6299
6313
|
};
|
|
6300
|
-
var AlertVariantContext =
|
|
6314
|
+
var AlertVariantContext = createContext11("info");
|
|
6301
6315
|
var useAlertVariant = () => useContext10(AlertVariantContext);
|
|
6302
6316
|
var Alert = forwardRef8(({ variant = "info", showIcon = true, children, className, style, ...rest }, ref) => {
|
|
6303
6317
|
const { theme, colorScheme } = useTheme_default();
|
|
6304
6318
|
const styles = Alert_styles_default(theme, colorScheme, variant);
|
|
6305
6319
|
const IconComponent = getDefaultIcon(variant);
|
|
6306
|
-
return /* @__PURE__ */
|
|
6320
|
+
return /* @__PURE__ */ jsx55(AlertVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxs24(
|
|
6307
6321
|
"div",
|
|
6308
6322
|
{
|
|
6309
6323
|
ref,
|
|
@@ -6318,8 +6332,8 @@ var Alert = forwardRef8(({ variant = "info", showIcon = true, children, classNam
|
|
|
6318
6332
|
),
|
|
6319
6333
|
...rest,
|
|
6320
6334
|
children: [
|
|
6321
|
-
showIcon && /* @__PURE__ */
|
|
6322
|
-
/* @__PURE__ */
|
|
6335
|
+
showIcon && /* @__PURE__ */ jsx55("div", { className: cx15(withVendorCSSClassPrefix15(bem12("alert", "icon")), styles["icon"]), children: /* @__PURE__ */ jsx55(IconComponent, {}) }),
|
|
6336
|
+
/* @__PURE__ */ jsx55("div", { className: cx15(withVendorCSSClassPrefix15(bem12("alert", "content")), styles["content"]), children })
|
|
6323
6337
|
]
|
|
6324
6338
|
}
|
|
6325
6339
|
) });
|
|
@@ -6329,7 +6343,7 @@ var AlertTitle = ({ children, className, style, ...rest }) => {
|
|
|
6329
6343
|
const variant = useAlertVariant();
|
|
6330
6344
|
const styles = Alert_styles_default(theme, colorScheme, variant);
|
|
6331
6345
|
const { color, ...filteredRest } = rest;
|
|
6332
|
-
return /* @__PURE__ */
|
|
6346
|
+
return /* @__PURE__ */ jsx55(
|
|
6333
6347
|
Typography_default,
|
|
6334
6348
|
{
|
|
6335
6349
|
component: "h3",
|
|
@@ -6347,7 +6361,7 @@ var AlertDescription = ({ children, className, style, ...rest }) => {
|
|
|
6347
6361
|
const variant = useAlertVariant();
|
|
6348
6362
|
const styles = Alert_styles_default(theme, colorScheme, variant);
|
|
6349
6363
|
const { color, ...filteredRest } = rest;
|
|
6350
|
-
return /* @__PURE__ */
|
|
6364
|
+
return /* @__PURE__ */ jsx55(
|
|
6351
6365
|
Typography_default,
|
|
6352
6366
|
{
|
|
6353
6367
|
component: "p",
|
|
@@ -6454,12 +6468,12 @@ var useStyles13 = (theme, colorScheme, variant, clickable) => useMemo21(() => {
|
|
|
6454
6468
|
var Card_styles_default = useStyles13;
|
|
6455
6469
|
|
|
6456
6470
|
// src/components/primitives/Card/Card.tsx
|
|
6457
|
-
import { jsx as
|
|
6471
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
6458
6472
|
var Card = forwardRef9(
|
|
6459
6473
|
({ variant = "default", clickable = false, children, className, style, ...rest }, ref) => {
|
|
6460
6474
|
const { theme, colorScheme } = useTheme_default();
|
|
6461
6475
|
const styles = Card_styles_default(theme, colorScheme, variant, clickable);
|
|
6462
|
-
return /* @__PURE__ */
|
|
6476
|
+
return /* @__PURE__ */ jsx56(
|
|
6463
6477
|
"div",
|
|
6464
6478
|
{
|
|
6465
6479
|
ref,
|
|
@@ -6484,7 +6498,7 @@ var Card = forwardRef9(
|
|
|
6484
6498
|
var CardHeader = forwardRef9(({ children, className, style, ...rest }, ref) => {
|
|
6485
6499
|
const { theme, colorScheme } = useTheme_default();
|
|
6486
6500
|
const styles = Card_styles_default(theme, colorScheme, "default", false);
|
|
6487
|
-
return /* @__PURE__ */
|
|
6501
|
+
return /* @__PURE__ */ jsx56(
|
|
6488
6502
|
"div",
|
|
6489
6503
|
{
|
|
6490
6504
|
ref,
|
|
@@ -6535,7 +6549,7 @@ var CardTitle = ({ children, level = 3, className, style, ...rest }) => {
|
|
|
6535
6549
|
}
|
|
6536
6550
|
};
|
|
6537
6551
|
const { color, ...filteredRest } = rest;
|
|
6538
|
-
return /* @__PURE__ */
|
|
6552
|
+
return /* @__PURE__ */ jsx56(
|
|
6539
6553
|
Typography_default,
|
|
6540
6554
|
{
|
|
6541
6555
|
component: getComponentFromLevel(level),
|
|
@@ -6552,7 +6566,7 @@ var CardDescription = ({ children, className, style, ...rest }) => {
|
|
|
6552
6566
|
const { theme, colorScheme } = useTheme_default();
|
|
6553
6567
|
const styles = Card_styles_default(theme, colorScheme, "default", false);
|
|
6554
6568
|
const { color, ...filteredRest } = rest;
|
|
6555
|
-
return /* @__PURE__ */
|
|
6569
|
+
return /* @__PURE__ */ jsx56(
|
|
6556
6570
|
Typography_default,
|
|
6557
6571
|
{
|
|
6558
6572
|
component: "p",
|
|
@@ -6568,7 +6582,7 @@ var CardDescription = ({ children, className, style, ...rest }) => {
|
|
|
6568
6582
|
var CardAction = forwardRef9(({ children, className, style, ...rest }, ref) => {
|
|
6569
6583
|
const { theme, colorScheme } = useTheme_default();
|
|
6570
6584
|
const styles = Card_styles_default(theme, colorScheme, "default", false);
|
|
6571
|
-
return /* @__PURE__ */
|
|
6585
|
+
return /* @__PURE__ */ jsx56(
|
|
6572
6586
|
"div",
|
|
6573
6587
|
{
|
|
6574
6588
|
ref,
|
|
@@ -6582,7 +6596,7 @@ var CardAction = forwardRef9(({ children, className, style, ...rest }, ref) => {
|
|
|
6582
6596
|
var CardContent = forwardRef9(({ children, className, style, ...rest }, ref) => {
|
|
6583
6597
|
const { theme, colorScheme } = useTheme_default();
|
|
6584
6598
|
const styles = Card_styles_default(theme, colorScheme, "default", false);
|
|
6585
|
-
return /* @__PURE__ */
|
|
6599
|
+
return /* @__PURE__ */ jsx56(
|
|
6586
6600
|
"div",
|
|
6587
6601
|
{
|
|
6588
6602
|
ref,
|
|
@@ -6596,7 +6610,7 @@ var CardContent = forwardRef9(({ children, className, style, ...rest }, ref) =>
|
|
|
6596
6610
|
var CardFooter = forwardRef9(({ children, className, style, ...rest }, ref) => {
|
|
6597
6611
|
const { theme, colorScheme } = useTheme_default();
|
|
6598
6612
|
const styles = Card_styles_default(theme, colorScheme, "default", false);
|
|
6599
|
-
return /* @__PURE__ */
|
|
6613
|
+
return /* @__PURE__ */ jsx56(
|
|
6600
6614
|
"div",
|
|
6601
6615
|
{
|
|
6602
6616
|
ref,
|
|
@@ -6682,7 +6696,7 @@ var useStyles14 = (theme, colorScheme, orientation, variant, color, hasChildren)
|
|
|
6682
6696
|
var Divider_styles_default = useStyles14;
|
|
6683
6697
|
|
|
6684
6698
|
// src/components/primitives/Divider/Divider.tsx
|
|
6685
|
-
import { jsx as
|
|
6699
|
+
import { jsx as jsx57, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6686
6700
|
var Divider = ({
|
|
6687
6701
|
orientation = "horizontal",
|
|
6688
6702
|
variant = "solid",
|
|
@@ -6695,7 +6709,7 @@ var Divider = ({
|
|
|
6695
6709
|
const { theme, colorScheme } = useTheme_default();
|
|
6696
6710
|
const styles = Divider_styles_default(theme, colorScheme, orientation, variant, color, !!children);
|
|
6697
6711
|
if (orientation === "vertical") {
|
|
6698
|
-
return /* @__PURE__ */
|
|
6712
|
+
return /* @__PURE__ */ jsx57(
|
|
6699
6713
|
"div",
|
|
6700
6714
|
{
|
|
6701
6715
|
className: cx17(
|
|
@@ -6729,8 +6743,8 @@ var Divider = ({
|
|
|
6729
6743
|
"aria-orientation": "horizontal",
|
|
6730
6744
|
...rest,
|
|
6731
6745
|
children: [
|
|
6732
|
-
/* @__PURE__ */
|
|
6733
|
-
/* @__PURE__ */
|
|
6746
|
+
/* @__PURE__ */ jsx57("div", { className: cx17(withVendorCSSClassPrefix17(bem14("divider", "line")), styles["line"]) }),
|
|
6747
|
+
/* @__PURE__ */ jsx57(
|
|
6734
6748
|
Typography_default,
|
|
6735
6749
|
{
|
|
6736
6750
|
variant: "body2",
|
|
@@ -6740,12 +6754,12 @@ var Divider = ({
|
|
|
6740
6754
|
children
|
|
6741
6755
|
}
|
|
6742
6756
|
),
|
|
6743
|
-
/* @__PURE__ */
|
|
6757
|
+
/* @__PURE__ */ jsx57("div", { className: cx17(withVendorCSSClassPrefix17(bem14("divider", "line")), styles["line"]) })
|
|
6744
6758
|
]
|
|
6745
6759
|
}
|
|
6746
6760
|
);
|
|
6747
6761
|
}
|
|
6748
|
-
return /* @__PURE__ */
|
|
6762
|
+
return /* @__PURE__ */ jsx57(
|
|
6749
6763
|
"div",
|
|
6750
6764
|
{
|
|
6751
6765
|
className: cx17(
|
|
@@ -6805,7 +6819,7 @@ var useStyles15 = (theme, colorScheme, size) => useMemo23(() => {
|
|
|
6805
6819
|
var Logo_styles_default = useStyles15;
|
|
6806
6820
|
|
|
6807
6821
|
// src/components/primitives/Logo/Logo.tsx
|
|
6808
|
-
import { jsx as
|
|
6822
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
6809
6823
|
var Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
6810
6824
|
const { theme, colorScheme } = useTheme_default();
|
|
6811
6825
|
const styles = Logo_styles_default(theme, colorScheme, size);
|
|
@@ -6816,7 +6830,7 @@ var Logo = ({ className, src, alt, title, size = "medium" }) => {
|
|
|
6816
6830
|
if (!logoSrc) {
|
|
6817
6831
|
return null;
|
|
6818
6832
|
}
|
|
6819
|
-
return /* @__PURE__ */
|
|
6833
|
+
return /* @__PURE__ */ jsx58(
|
|
6820
6834
|
"img",
|
|
6821
6835
|
{
|
|
6822
6836
|
src: logoSrc,
|
|
@@ -6977,7 +6991,7 @@ var useStyles16 = (theme, colorScheme) => useMemo24(() => {
|
|
|
6977
6991
|
var BaseSignIn_styles_default = useStyles16;
|
|
6978
6992
|
|
|
6979
6993
|
// src/components/presentation/auth/SignIn/v1/BaseSignIn.tsx
|
|
6980
|
-
import { jsx as
|
|
6994
|
+
import { jsx as jsx59, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6981
6995
|
var logger5 = createPackageComponentLogger5(
|
|
6982
6996
|
"@asgardeo/react",
|
|
6983
6997
|
"BaseSignIn"
|
|
@@ -7527,9 +7541,9 @@ var BaseSignInContent = ({
|
|
|
7527
7541
|
})();
|
|
7528
7542
|
}, [isLoading]);
|
|
7529
7543
|
if (!isInitialized && isLoading) {
|
|
7530
|
-
return /* @__PURE__ */
|
|
7531
|
-
/* @__PURE__ */
|
|
7532
|
-
/* @__PURE__ */
|
|
7544
|
+
return /* @__PURE__ */ jsx59(Card_default, { className: cx19(containerClasses, styles["card"]), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx59(Card_default.Content, { children: /* @__PURE__ */ jsxs26("div", { className: styles["loadingContainer"], children: [
|
|
7545
|
+
/* @__PURE__ */ jsx59(Spinner_default, { size: "medium" }),
|
|
7546
|
+
/* @__PURE__ */ jsx59(Typography_default, { variant: "body1", className: styles["loadingText"], children: t("messages.loading.placeholder") })
|
|
7533
7547
|
] }) }) });
|
|
7534
7548
|
}
|
|
7535
7549
|
if (hasMultipleOptions() && !currentAuthenticator) {
|
|
@@ -7541,20 +7555,20 @@ var BaseSignInContent = ({
|
|
|
7541
7555
|
const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
|
|
7542
7556
|
return /* @__PURE__ */ jsxs26(Card_default, { className: cx19(containerClasses, styles["card"]), "data-testid": "asgardeo-signin", variant, children: [
|
|
7543
7557
|
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs26(Card_default.Header, { className: styles["header"], children: [
|
|
7544
|
-
showTitle && /* @__PURE__ */
|
|
7545
|
-
showSubtitle && /* @__PURE__ */
|
|
7558
|
+
showTitle && /* @__PURE__ */ jsx59(Card_default.Title, { level: 2, className: styles["title"], children: flowTitle || t("signin.heading") }),
|
|
7559
|
+
showSubtitle && /* @__PURE__ */ jsx59(Typography_default, { variant: "body1", className: styles["subtitle"], children: flowSubtitle || t("signin.subheading") })
|
|
7546
7560
|
] }),
|
|
7547
7561
|
/* @__PURE__ */ jsxs26(Card_default.Content, { children: [
|
|
7548
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */
|
|
7562
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx59("div", { className: styles["flowMessagesContainer"], children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ jsx59(
|
|
7549
7563
|
Alert_default,
|
|
7550
7564
|
{
|
|
7551
7565
|
variant: flowMessage.type,
|
|
7552
7566
|
className: cx19(styles["flowMessageItem"], messageClasses),
|
|
7553
|
-
children: /* @__PURE__ */
|
|
7567
|
+
children: /* @__PURE__ */ jsx59(Alert_default.Description, { children: flowMessage.message })
|
|
7554
7568
|
},
|
|
7555
7569
|
flowMessage.id || index
|
|
7556
7570
|
)) }),
|
|
7557
|
-
messages.length > 0 && /* @__PURE__ */
|
|
7571
|
+
messages.length > 0 && /* @__PURE__ */ jsx59("div", { className: styles["messagesContainer"], children: messages.map((message, index) => {
|
|
7558
7572
|
let messageVariant;
|
|
7559
7573
|
const lowerType = message.type.toLowerCase();
|
|
7560
7574
|
if (lowerType === "error") {
|
|
@@ -7566,24 +7580,24 @@ var BaseSignInContent = ({
|
|
|
7566
7580
|
} else {
|
|
7567
7581
|
messageVariant = "info";
|
|
7568
7582
|
}
|
|
7569
|
-
return /* @__PURE__ */
|
|
7583
|
+
return /* @__PURE__ */ jsx59(
|
|
7570
7584
|
Alert_default,
|
|
7571
7585
|
{
|
|
7572
7586
|
variant: messageVariant,
|
|
7573
7587
|
className: cx19(styles["messageItem"], messageClasses),
|
|
7574
|
-
children: /* @__PURE__ */
|
|
7588
|
+
children: /* @__PURE__ */ jsx59(Alert_default.Description, { children: message.message })
|
|
7575
7589
|
},
|
|
7576
7590
|
index
|
|
7577
7591
|
);
|
|
7578
7592
|
}) }),
|
|
7579
7593
|
error && /* @__PURE__ */ jsxs26(Alert_default, { variant: "error", className: cx19(styles["errorContainer"], errorClasses), children: [
|
|
7580
|
-
/* @__PURE__ */
|
|
7581
|
-
/* @__PURE__ */
|
|
7594
|
+
/* @__PURE__ */ jsx59(Alert_default.Title, { children: "Error" }),
|
|
7595
|
+
/* @__PURE__ */ jsx59(Alert_default.Description, { children: error })
|
|
7582
7596
|
] }),
|
|
7583
7597
|
/* @__PURE__ */ jsxs26("div", { className: styles["contentContainer"], children: [
|
|
7584
7598
|
userPromptAuthenticators.map((authenticator, index) => /* @__PURE__ */ jsxs26("div", { className: styles["authenticatorItem"], children: [
|
|
7585
|
-
index > 0 && /* @__PURE__ */
|
|
7586
|
-
/* @__PURE__ */
|
|
7599
|
+
index > 0 && /* @__PURE__ */ jsx59(Divider_default, { className: styles["divider"], children: "OR" }),
|
|
7600
|
+
/* @__PURE__ */ jsx59(
|
|
7587
7601
|
"form",
|
|
7588
7602
|
{
|
|
7589
7603
|
className: styles["form"],
|
|
@@ -7611,8 +7625,8 @@ var BaseSignInContent = ({
|
|
|
7611
7625
|
}
|
|
7612
7626
|
)
|
|
7613
7627
|
] }, authenticator.authenticatorId)),
|
|
7614
|
-
userPromptAuthenticators.length > 0 && optionAuthenticators.length > 0 && /* @__PURE__ */
|
|
7615
|
-
optionAuthenticators.map((authenticator) => /* @__PURE__ */
|
|
7628
|
+
userPromptAuthenticators.length > 0 && optionAuthenticators.length > 0 && /* @__PURE__ */ jsx59(Divider_default, { className: styles["divider"], children: "OR" }),
|
|
7629
|
+
optionAuthenticators.map((authenticator) => /* @__PURE__ */ jsx59("div", { className: styles["authenticatorItem"], children: createSignInOptionFromAuthenticator(
|
|
7616
7630
|
authenticator,
|
|
7617
7631
|
formValues,
|
|
7618
7632
|
touchedFields,
|
|
@@ -7630,15 +7644,15 @@ var BaseSignInContent = ({
|
|
|
7630
7644
|
] });
|
|
7631
7645
|
}
|
|
7632
7646
|
if (!currentAuthenticator) {
|
|
7633
|
-
return /* @__PURE__ */
|
|
7647
|
+
return /* @__PURE__ */ jsx59(
|
|
7634
7648
|
Card_default,
|
|
7635
7649
|
{
|
|
7636
7650
|
className: cx19(containerClasses, styles["noAuthenticatorCard"]),
|
|
7637
7651
|
"data-testid": "asgardeo-signin",
|
|
7638
7652
|
variant,
|
|
7639
|
-
children: /* @__PURE__ */
|
|
7640
|
-
/* @__PURE__ */
|
|
7641
|
-
/* @__PURE__ */
|
|
7653
|
+
children: /* @__PURE__ */ jsx59(Card_default.Content, { children: error && /* @__PURE__ */ jsxs26(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
|
|
7654
|
+
/* @__PURE__ */ jsx59(Alert_default.Title, { children: t("errors.heading") || "Error" }),
|
|
7655
|
+
/* @__PURE__ */ jsx59(Alert_default.Description, { children: error })
|
|
7642
7656
|
] }) })
|
|
7643
7657
|
}
|
|
7644
7658
|
);
|
|
@@ -7647,38 +7661,38 @@ var BaseSignInContent = ({
|
|
|
7647
7661
|
useEffect14(() => {
|
|
7648
7662
|
handleAuthenticatorSelection(currentAuthenticator);
|
|
7649
7663
|
}, [currentAuthenticator]);
|
|
7650
|
-
return /* @__PURE__ */
|
|
7651
|
-
/* @__PURE__ */
|
|
7652
|
-
/* @__PURE__ */
|
|
7653
|
-
/* @__PURE__ */
|
|
7664
|
+
return /* @__PURE__ */ jsx59(Card_default, { className: cx19(containerClasses, styles["card"]), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx59(Card_default.Content, { children: /* @__PURE__ */ jsxs26("div", { className: styles["centeredContainer"], children: [
|
|
7665
|
+
/* @__PURE__ */ jsx59("div", { className: styles["passkeyContainer"], children: /* @__PURE__ */ jsx59(Spinner_default, { size: "large" }) }),
|
|
7666
|
+
/* @__PURE__ */ jsx59(Typography_default, { variant: "body1", children: t("passkey.authenticating") || "Authenticating with passkey..." }),
|
|
7667
|
+
/* @__PURE__ */ jsx59(Typography_default, { variant: "body2", className: styles["passkeyText"], children: t("passkey.instruction") || "Please use your fingerprint, face, or security key to authenticate." })
|
|
7654
7668
|
] }) }) });
|
|
7655
7669
|
}
|
|
7656
7670
|
return /* @__PURE__ */ jsxs26(Card_default, { className: cx19(containerClasses, styles["card"]), "data-testid": "asgardeo-signin", variant, children: [
|
|
7657
7671
|
/* @__PURE__ */ jsxs26(Card_default.Header, { className: styles["header"], children: [
|
|
7658
|
-
/* @__PURE__ */
|
|
7659
|
-
/* @__PURE__ */
|
|
7660
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */
|
|
7672
|
+
/* @__PURE__ */ jsx59(Card_default.Title, { level: 2, className: styles["title"], children: flowTitle || t("signin.heading") }),
|
|
7673
|
+
/* @__PURE__ */ jsx59(Typography_default, { variant: "body1", className: styles["subtitle"], children: flowSubtitle || t("signin.subheading") }),
|
|
7674
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx59("div", { className: styles["flowMessagesContainer"], children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ jsx59(
|
|
7661
7675
|
Alert_default,
|
|
7662
7676
|
{
|
|
7663
7677
|
variant: flowMessage.type,
|
|
7664
7678
|
className: cx19(styles["flowMessageItem"], messageClasses),
|
|
7665
|
-
children: /* @__PURE__ */
|
|
7679
|
+
children: /* @__PURE__ */ jsx59(Alert_default.Description, { children: flowMessage.message })
|
|
7666
7680
|
},
|
|
7667
7681
|
flowMessage.id || index
|
|
7668
7682
|
)) }),
|
|
7669
|
-
messages.length > 0 && /* @__PURE__ */
|
|
7683
|
+
messages.length > 0 && /* @__PURE__ */ jsx59("div", { className: styles["messagesContainer"], children: messages.map((message, index) => {
|
|
7670
7684
|
const messageTypeToVariant = {
|
|
7671
7685
|
error: "error",
|
|
7672
7686
|
success: "success",
|
|
7673
7687
|
warning: "warning"
|
|
7674
7688
|
};
|
|
7675
7689
|
const alertVariant = messageTypeToVariant[message.type.toLowerCase()] || "info";
|
|
7676
|
-
return /* @__PURE__ */
|
|
7690
|
+
return /* @__PURE__ */ jsx59(
|
|
7677
7691
|
Alert_default,
|
|
7678
7692
|
{
|
|
7679
7693
|
variant: alertVariant,
|
|
7680
7694
|
className: cx19(styles["messageItem"], messageClasses),
|
|
7681
|
-
children: /* @__PURE__ */
|
|
7695
|
+
children: /* @__PURE__ */ jsx59(Alert_default.Description, { children: message.message })
|
|
7682
7696
|
},
|
|
7683
7697
|
index
|
|
7684
7698
|
);
|
|
@@ -7686,10 +7700,10 @@ var BaseSignInContent = ({
|
|
|
7686
7700
|
] }),
|
|
7687
7701
|
/* @__PURE__ */ jsxs26(Card_default.Content, { children: [
|
|
7688
7702
|
error && /* @__PURE__ */ jsxs26(Alert_default, { variant: "error", className: cx19(styles["errorContainer"], errorClasses), children: [
|
|
7689
|
-
/* @__PURE__ */
|
|
7690
|
-
/* @__PURE__ */
|
|
7703
|
+
/* @__PURE__ */ jsx59(Alert_default.Title, { children: t("errors.heading") }),
|
|
7704
|
+
/* @__PURE__ */ jsx59(Alert_default.Description, { children: error })
|
|
7691
7705
|
] }),
|
|
7692
|
-
/* @__PURE__ */
|
|
7706
|
+
/* @__PURE__ */ jsx59(
|
|
7693
7707
|
"form",
|
|
7694
7708
|
{
|
|
7695
7709
|
className: styles["form"],
|
|
@@ -7723,8 +7737,8 @@ var BaseSignIn = ({ showLogo = true, ...rest }) => {
|
|
|
7723
7737
|
const { theme } = useTheme_default();
|
|
7724
7738
|
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
7725
7739
|
return /* @__PURE__ */ jsxs26("div", { children: [
|
|
7726
|
-
showLogo && /* @__PURE__ */
|
|
7727
|
-
/* @__PURE__ */
|
|
7740
|
+
showLogo && /* @__PURE__ */ jsx59("div", { className: styles["logoContainer"], children: /* @__PURE__ */ jsx59(Logo_default, { size: "large" }) }),
|
|
7741
|
+
/* @__PURE__ */ jsx59(FlowProvider_default, { children: /* @__PURE__ */ jsx59(BaseSignInContent, { showLogo, ...rest }) })
|
|
7728
7742
|
] });
|
|
7729
7743
|
};
|
|
7730
7744
|
var BaseSignIn_default = BaseSignIn;
|
|
@@ -7872,7 +7886,7 @@ import {
|
|
|
7872
7886
|
} from "@asgardeo/browser";
|
|
7873
7887
|
import { css as css21 } from "@emotion/css";
|
|
7874
7888
|
import DOMPurify from "dompurify";
|
|
7875
|
-
import { cloneElement } from "react";
|
|
7889
|
+
import { cloneElement, useContext as useContext11 } from "react";
|
|
7876
7890
|
|
|
7877
7891
|
// src/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.tsx
|
|
7878
7892
|
import { cx as cx20 } from "@emotion/css";
|
|
@@ -8003,7 +8017,7 @@ var useStyles17 = (theme) => useMemo25(() => {
|
|
|
8003
8017
|
var OrganizationUnitPicker_styles_default = useStyles17;
|
|
8004
8018
|
|
|
8005
8019
|
// src/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.tsx
|
|
8006
|
-
import { Fragment as Fragment13, jsx as
|
|
8020
|
+
import { Fragment as Fragment13, jsx as jsx60, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
8007
8021
|
var OrganizationUnitPicker = ({
|
|
8008
8022
|
rootOuId,
|
|
8009
8023
|
selectedOuId,
|
|
@@ -8095,12 +8109,12 @@ var OrganizationUnitPicker = ({
|
|
|
8095
8109
|
},
|
|
8096
8110
|
[nodeStates, loadChildren]
|
|
8097
8111
|
);
|
|
8098
|
-
const renderLoadingPlaceholders = (depth) => /* @__PURE__ */
|
|
8112
|
+
const renderLoadingPlaceholders = (depth) => /* @__PURE__ */ jsx60(Fragment13, { children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx60(
|
|
8099
8113
|
"div",
|
|
8100
8114
|
{
|
|
8101
8115
|
className: styles["loadingPlaceholder"],
|
|
8102
8116
|
style: { paddingLeft: `${(depth + 1) * 20}px` },
|
|
8103
|
-
children: /* @__PURE__ */
|
|
8117
|
+
children: /* @__PURE__ */ jsx60("div", { className: styles["skeleton"], style: { width: `${100 - i * 20}px` } })
|
|
8104
8118
|
},
|
|
8105
8119
|
`skeleton-${i}`
|
|
8106
8120
|
)) });
|
|
@@ -8128,7 +8142,7 @@ var OrganizationUnitPicker = ({
|
|
|
8128
8142
|
},
|
|
8129
8143
|
tabIndex: 0,
|
|
8130
8144
|
children: [
|
|
8131
|
-
hasChildren ? /* @__PURE__ */
|
|
8145
|
+
hasChildren ? /* @__PURE__ */ jsx60(
|
|
8132
8146
|
"button",
|
|
8133
8147
|
{
|
|
8134
8148
|
className: styles["toggleButton"],
|
|
@@ -8140,14 +8154,14 @@ var OrganizationUnitPicker = ({
|
|
|
8140
8154
|
type: "button",
|
|
8141
8155
|
children: isExpanded ? "\u25BE" : "\u25B8"
|
|
8142
8156
|
}
|
|
8143
|
-
) : /* @__PURE__ */
|
|
8144
|
-
/* @__PURE__ */
|
|
8157
|
+
) : /* @__PURE__ */ jsx60("span", { className: styles["togglePlaceholder"] }),
|
|
8158
|
+
/* @__PURE__ */ jsx60("span", { className: styles["nodeName"], children: ou.name })
|
|
8145
8159
|
]
|
|
8146
8160
|
}
|
|
8147
8161
|
),
|
|
8148
8162
|
isExpanded && isLoading && !state?.children.length && renderLoadingPlaceholders(depth),
|
|
8149
8163
|
isExpanded && state?.children.map((child) => renderNode(child, depth + 1)),
|
|
8150
|
-
isExpanded && state?.hasMore && /* @__PURE__ */
|
|
8164
|
+
isExpanded && state?.hasMore && /* @__PURE__ */ jsx60(
|
|
8151
8165
|
"button",
|
|
8152
8166
|
{
|
|
8153
8167
|
className: styles["loadMoreButton"],
|
|
@@ -8165,7 +8179,7 @@ var OrganizationUnitPicker = ({
|
|
|
8165
8179
|
return /* @__PURE__ */ jsxs27("div", { className: cx20(styles["container"], className), role: "tree", "aria-label": "Organization unit picker", children: [
|
|
8166
8180
|
isRootLoading && renderLoadingPlaceholders(0),
|
|
8167
8181
|
rootState?.children.map((ou) => renderNode(ou, 0)),
|
|
8168
|
-
rootState?.hasMore && /* @__PURE__ */
|
|
8182
|
+
rootState?.hasMore && /* @__PURE__ */ jsx60(
|
|
8169
8183
|
"button",
|
|
8170
8184
|
{
|
|
8171
8185
|
className: styles["loadMoreButton"],
|
|
@@ -8319,12 +8333,12 @@ var useStyles19 = (theme, colorScheme, hasError, required) => useMemo27(() => {
|
|
|
8319
8333
|
var Toggle_styles_default = useStyles19;
|
|
8320
8334
|
|
|
8321
8335
|
// src/components/primitives/Toggle/Toggle.tsx
|
|
8322
|
-
import { jsx as
|
|
8336
|
+
import { jsx as jsx61, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
8323
8337
|
var Toggle = ({ label, error, className, required, helperText, style = {}, ...rest }) => {
|
|
8324
8338
|
const { theme, colorScheme } = useTheme_default();
|
|
8325
8339
|
const hasError = !!error;
|
|
8326
8340
|
const styles = Toggle_styles_default(theme, colorScheme, hasError, !!required);
|
|
8327
|
-
return /* @__PURE__ */
|
|
8341
|
+
return /* @__PURE__ */ jsx61(
|
|
8328
8342
|
FormControl_default,
|
|
8329
8343
|
{
|
|
8330
8344
|
error,
|
|
@@ -8332,7 +8346,7 @@ var Toggle = ({ label, error, className, required, helperText, style = {}, ...re
|
|
|
8332
8346
|
className: cx21(withVendorCSSClassPrefix20(bem16("toggle")), className),
|
|
8333
8347
|
helperTextMarginLeft: `calc(${theme.vars.spacing.unit} * 5.5)`,
|
|
8334
8348
|
children: /* @__PURE__ */ jsxs28("label", { style, className: cx21(withVendorCSSClassPrefix20(bem16("toggle", "container")), styles["container"]), children: [
|
|
8335
|
-
/* @__PURE__ */
|
|
8349
|
+
/* @__PURE__ */ jsx61(
|
|
8336
8350
|
"input",
|
|
8337
8351
|
{
|
|
8338
8352
|
type: "checkbox",
|
|
@@ -8343,8 +8357,8 @@ var Toggle = ({ label, error, className, required, helperText, style = {}, ...re
|
|
|
8343
8357
|
...rest
|
|
8344
8358
|
}
|
|
8345
8359
|
),
|
|
8346
|
-
/* @__PURE__ */
|
|
8347
|
-
label && /* @__PURE__ */
|
|
8360
|
+
/* @__PURE__ */ jsx61("div", { className: cx21(withVendorCSSClassPrefix20(bem16("toggle", "track")), styles["track"]), children: /* @__PURE__ */ jsx61("span", { className: cx21(withVendorCSSClassPrefix20(bem16("toggle", "thumb")), styles["thumb"]) }) }),
|
|
8361
|
+
label && /* @__PURE__ */ jsx61(
|
|
8348
8362
|
InputLabel_default,
|
|
8349
8363
|
{
|
|
8350
8364
|
required,
|
|
@@ -8363,7 +8377,7 @@ var Toggle = ({ label, error, className, required, helperText, style = {}, ...re
|
|
|
8363
8377
|
var Toggle_default = Toggle;
|
|
8364
8378
|
|
|
8365
8379
|
// src/components/adapters/ConsentCheckboxList.tsx
|
|
8366
|
-
import { Fragment as Fragment14, jsx as
|
|
8380
|
+
import { Fragment as Fragment14, jsx as jsx62, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
8367
8381
|
var getConsentOptionalKey = (purposeId, attrName) => `__consent_opt__${purposeId}__${attrName}`;
|
|
8368
8382
|
var ConsentCheckboxList = ({
|
|
8369
8383
|
variant,
|
|
@@ -8391,9 +8405,9 @@ var ConsentCheckboxList = ({
|
|
|
8391
8405
|
onInputChange(key, checked ? "true" : "false");
|
|
8392
8406
|
};
|
|
8393
8407
|
if (children) {
|
|
8394
|
-
return /* @__PURE__ */
|
|
8408
|
+
return /* @__PURE__ */ jsx62(Fragment14, { children: children({ attributes, handleChange, isChecked, variant }) });
|
|
8395
8409
|
}
|
|
8396
|
-
return /* @__PURE__ */
|
|
8410
|
+
return /* @__PURE__ */ jsx62("div", { className: cx22(withVendorCSSClassPrefix21(bem17("consent-checkbox-list")), styles["listContainer"]), children: attributes.map((attr) => {
|
|
8397
8411
|
const inputId = `consent_${isEssential ? "ess" : "opt"}_${purpose.purposeId}_${attr}`;
|
|
8398
8412
|
const checked = isChecked(attr);
|
|
8399
8413
|
return /* @__PURE__ */ jsxs29(
|
|
@@ -8410,13 +8424,13 @@ var ConsentCheckboxList = ({
|
|
|
8410
8424
|
styles["labelContainer"]
|
|
8411
8425
|
),
|
|
8412
8426
|
children: [
|
|
8413
|
-
/* @__PURE__ */
|
|
8427
|
+
/* @__PURE__ */ jsx62(
|
|
8414
8428
|
"div",
|
|
8415
8429
|
{
|
|
8416
8430
|
className: cx22(withVendorCSSClassPrefix21(bem17("consent-checkbox-list", "bullet")), styles["bullet"])
|
|
8417
8431
|
}
|
|
8418
8432
|
),
|
|
8419
|
-
/* @__PURE__ */
|
|
8433
|
+
/* @__PURE__ */ jsx62(
|
|
8420
8434
|
Typography_default,
|
|
8421
8435
|
{
|
|
8422
8436
|
variant: "body2",
|
|
@@ -8430,7 +8444,7 @@ var ConsentCheckboxList = ({
|
|
|
8430
8444
|
]
|
|
8431
8445
|
}
|
|
8432
8446
|
),
|
|
8433
|
-
/* @__PURE__ */
|
|
8447
|
+
/* @__PURE__ */ jsx62(
|
|
8434
8448
|
Toggle_default,
|
|
8435
8449
|
{
|
|
8436
8450
|
id: inputId,
|
|
@@ -8440,7 +8454,7 @@ var ConsentCheckboxList = ({
|
|
|
8440
8454
|
}
|
|
8441
8455
|
)
|
|
8442
8456
|
] }),
|
|
8443
|
-
/* @__PURE__ */
|
|
8457
|
+
/* @__PURE__ */ jsx62(
|
|
8444
8458
|
Divider_default,
|
|
8445
8459
|
{
|
|
8446
8460
|
className: cx22(withVendorCSSClassPrefix21(bem17("consent-checkbox-list", "divider")), styles["divider"])
|
|
@@ -8455,7 +8469,7 @@ var ConsentCheckboxList = ({
|
|
|
8455
8469
|
var ConsentCheckboxList_default = ConsentCheckboxList;
|
|
8456
8470
|
|
|
8457
8471
|
// src/components/adapters/Consent.tsx
|
|
8458
|
-
import { Fragment as Fragment15, jsx as
|
|
8472
|
+
import { Fragment as Fragment15, jsx as jsx63, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
8459
8473
|
var Consent = ({ consentData, formValues, onInputChange, children }) => {
|
|
8460
8474
|
if (!consentData) return null;
|
|
8461
8475
|
let purposes = [];
|
|
@@ -8467,12 +8481,12 @@ var Consent = ({ consentData, formValues, onInputChange, children }) => {
|
|
|
8467
8481
|
}
|
|
8468
8482
|
if (purposes.length === 0) return null;
|
|
8469
8483
|
if (children) {
|
|
8470
|
-
return /* @__PURE__ */
|
|
8484
|
+
return /* @__PURE__ */ jsx63(Fragment15, { children: children({ formValues, onInputChange, purposes }) });
|
|
8471
8485
|
}
|
|
8472
|
-
return /* @__PURE__ */
|
|
8486
|
+
return /* @__PURE__ */ jsx63("div", { style: { display: "flex", flexDirection: "column", gap: "1rem", marginTop: "0.25rem" }, children: purposes.map((purpose, purposeIndex) => /* @__PURE__ */ jsxs30("div", { style: { paddingBottom: "1rem" }, children: [
|
|
8473
8487
|
purpose.essential && purpose.essential.length > 0 && /* @__PURE__ */ jsxs30("div", { style: { marginTop: "0.5rem" }, children: [
|
|
8474
|
-
/* @__PURE__ */
|
|
8475
|
-
/* @__PURE__ */
|
|
8488
|
+
/* @__PURE__ */ jsx63(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Essential Attributes" }),
|
|
8489
|
+
/* @__PURE__ */ jsx63(
|
|
8476
8490
|
ConsentCheckboxList_default,
|
|
8477
8491
|
{
|
|
8478
8492
|
variant: "ESSENTIAL",
|
|
@@ -8483,8 +8497,8 @@ var Consent = ({ consentData, formValues, onInputChange, children }) => {
|
|
|
8483
8497
|
)
|
|
8484
8498
|
] }),
|
|
8485
8499
|
purpose.optional && purpose.optional.length > 0 && /* @__PURE__ */ jsxs30("div", { style: { marginTop: "0.5rem" }, children: [
|
|
8486
|
-
/* @__PURE__ */
|
|
8487
|
-
/* @__PURE__ */
|
|
8500
|
+
/* @__PURE__ */ jsx63(Typography_default, { variant: "subtitle2", fontWeight: "bold", children: "Optional Attributes" }),
|
|
8501
|
+
/* @__PURE__ */ jsx63(
|
|
8488
8502
|
ConsentCheckboxList_default,
|
|
8489
8503
|
{
|
|
8490
8504
|
variant: "OPTIONAL",
|
|
@@ -8500,7 +8514,7 @@ var Consent_default = Consent;
|
|
|
8500
8514
|
|
|
8501
8515
|
// src/components/adapters/FlowTimer.tsx
|
|
8502
8516
|
import { useEffect as useEffect16, useState as useState17 } from "react";
|
|
8503
|
-
import { Fragment as Fragment16, jsx as
|
|
8517
|
+
import { Fragment as Fragment16, jsx as jsx64 } from "react/jsx-runtime";
|
|
8504
8518
|
var FlowTimer = ({
|
|
8505
8519
|
expiresIn = 0,
|
|
8506
8520
|
textTemplate = "Time remaining: {time}",
|
|
@@ -8537,16 +8551,16 @@ var FlowTimer = ({
|
|
|
8537
8551
|
const isExpired = remaining <= 0;
|
|
8538
8552
|
const formattedTime = formatTime(remaining);
|
|
8539
8553
|
if (children) {
|
|
8540
|
-
return /* @__PURE__ */
|
|
8554
|
+
return /* @__PURE__ */ jsx64(Fragment16, { children: children({ formattedTime, isExpired, remaining }) });
|
|
8541
8555
|
}
|
|
8542
8556
|
const displayText = isExpired ? "Timed out" : textTemplate.replace("{time}", formattedTime);
|
|
8543
|
-
return /* @__PURE__ */
|
|
8557
|
+
return /* @__PURE__ */ jsx64(Typography_default, { variant: "body2", children: displayText });
|
|
8544
8558
|
};
|
|
8545
8559
|
var FlowTimer_default = FlowTimer;
|
|
8546
8560
|
|
|
8547
8561
|
// src/components/adapters/ImageComponent.tsx
|
|
8548
8562
|
import { extractEmojiFromUri, isEmojiUri } from "@asgardeo/browser";
|
|
8549
|
-
import { jsx as
|
|
8563
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
8550
8564
|
var DEFAULT_EMOJI_CONTAINER_HEIGHT = "4em";
|
|
8551
8565
|
var ImageComponent = ({ component }) => {
|
|
8552
8566
|
const { theme } = useTheme_default();
|
|
@@ -8577,7 +8591,7 @@ var ImageComponent = ({ component }) => {
|
|
|
8577
8591
|
} else {
|
|
8578
8592
|
containerHeight = DEFAULT_EMOJI_CONTAINER_HEIGHT;
|
|
8579
8593
|
}
|
|
8580
|
-
return /* @__PURE__ */
|
|
8594
|
+
return /* @__PURE__ */ jsx65("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx65(
|
|
8581
8595
|
"span",
|
|
8582
8596
|
{
|
|
8583
8597
|
style: {
|
|
@@ -8588,11 +8602,11 @@ var ImageComponent = ({ component }) => {
|
|
|
8588
8602
|
placeItems: "center",
|
|
8589
8603
|
width: cssWidth
|
|
8590
8604
|
},
|
|
8591
|
-
children: /* @__PURE__ */
|
|
8605
|
+
children: /* @__PURE__ */ jsx65("span", { "aria-label": alt, role: "img", style: { fontSize: "100cqmin", lineHeight: 1 }, children: extractEmojiFromUri(src) })
|
|
8592
8606
|
}
|
|
8593
8607
|
) }, component.id);
|
|
8594
8608
|
}
|
|
8595
|
-
return /* @__PURE__ */
|
|
8609
|
+
return /* @__PURE__ */ jsx65("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ jsx65(
|
|
8596
8610
|
"img",
|
|
8597
8611
|
{
|
|
8598
8612
|
src,
|
|
@@ -8609,7 +8623,7 @@ var ImageComponent = ({ component }) => {
|
|
|
8609
8623
|
var ImageComponent_default = ImageComponent;
|
|
8610
8624
|
|
|
8611
8625
|
// src/components/adapters/SmsOtpButton.tsx
|
|
8612
|
-
import { jsx as
|
|
8626
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
8613
8627
|
var SmsOtpButton = ({
|
|
8614
8628
|
isLoading,
|
|
8615
8629
|
preferences,
|
|
@@ -8617,7 +8631,7 @@ var SmsOtpButton = ({
|
|
|
8617
8631
|
...rest
|
|
8618
8632
|
}) => {
|
|
8619
8633
|
const { t } = useTranslation_default(preferences?.i18n);
|
|
8620
|
-
return /* @__PURE__ */
|
|
8634
|
+
return /* @__PURE__ */ jsx66(
|
|
8621
8635
|
Button_default,
|
|
8622
8636
|
{
|
|
8623
8637
|
...rest,
|
|
@@ -8626,7 +8640,7 @@ var SmsOtpButton = ({
|
|
|
8626
8640
|
color: "secondary",
|
|
8627
8641
|
variant: "solid",
|
|
8628
8642
|
disabled: isLoading,
|
|
8629
|
-
startIcon: /* @__PURE__ */
|
|
8643
|
+
startIcon: /* @__PURE__ */ jsx66("svg", { width: "18", height: "18", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx66(
|
|
8630
8644
|
"path",
|
|
8631
8645
|
{
|
|
8632
8646
|
fill: "currentColor",
|
|
@@ -8687,7 +8701,7 @@ var useStyles20 = (theme) => useMemo28(
|
|
|
8687
8701
|
var CopyableText_styles_default = useStyles20;
|
|
8688
8702
|
|
|
8689
8703
|
// src/components/primitives/CopyableText/CopyableText.tsx
|
|
8690
|
-
import { jsx as
|
|
8704
|
+
import { jsx as jsx67, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
8691
8705
|
var CopyableText = ({ label, value }) => {
|
|
8692
8706
|
const { theme } = useTheme_default();
|
|
8693
8707
|
const styles = CopyableText_styles_default(theme);
|
|
@@ -8708,10 +8722,10 @@ var CopyableText = ({ label, value }) => {
|
|
|
8708
8722
|
setTimeout(() => setCopied(false), 3e3);
|
|
8709
8723
|
}, [value]);
|
|
8710
8724
|
return /* @__PURE__ */ jsxs31("div", { className: styles["container"], children: [
|
|
8711
|
-
label && /* @__PURE__ */
|
|
8725
|
+
label && /* @__PURE__ */ jsx67("span", { className: styles["label"], children: label }),
|
|
8712
8726
|
/* @__PURE__ */ jsxs31("div", { className: styles["valueBox"], children: [
|
|
8713
|
-
/* @__PURE__ */
|
|
8714
|
-
/* @__PURE__ */
|
|
8727
|
+
/* @__PURE__ */ jsx67("span", { className: styles["valueText"], children: value }),
|
|
8728
|
+
/* @__PURE__ */ jsx67(
|
|
8715
8729
|
Button_default,
|
|
8716
8730
|
{
|
|
8717
8731
|
variant: "outline",
|
|
@@ -8729,7 +8743,7 @@ var CopyableText = ({ label, value }) => {
|
|
|
8729
8743
|
var CopyableText_default = CopyableText;
|
|
8730
8744
|
|
|
8731
8745
|
// src/components/primitives/Icons/ArrowLeftRight.tsx
|
|
8732
|
-
import { jsx as
|
|
8746
|
+
import { jsx as jsx68, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8733
8747
|
var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs32(
|
|
8734
8748
|
"svg",
|
|
8735
8749
|
{
|
|
@@ -8743,10 +8757,10 @@ var ArrowLeftRight = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */
|
|
|
8743
8757
|
strokeLinecap: "round",
|
|
8744
8758
|
strokeLinejoin: "round",
|
|
8745
8759
|
children: [
|
|
8746
|
-
/* @__PURE__ */
|
|
8747
|
-
/* @__PURE__ */
|
|
8748
|
-
/* @__PURE__ */
|
|
8749
|
-
/* @__PURE__ */
|
|
8760
|
+
/* @__PURE__ */ jsx68("path", { d: "M8 3 4 7l4 4" }),
|
|
8761
|
+
/* @__PURE__ */ jsx68("path", { d: "M4 7h16" }),
|
|
8762
|
+
/* @__PURE__ */ jsx68("path", { d: "m16 21 4-4-4-4" }),
|
|
8763
|
+
/* @__PURE__ */ jsx68("path", { d: "M20 17H4" })
|
|
8750
8764
|
]
|
|
8751
8765
|
}
|
|
8752
8766
|
);
|
|
@@ -8754,7 +8768,7 @@ ArrowLeftRight.displayName = "ArrowLeftRight";
|
|
|
8754
8768
|
var ArrowLeftRight_default = ArrowLeftRight;
|
|
8755
8769
|
|
|
8756
8770
|
// src/components/primitives/Icons/ArrowRightLeft.tsx
|
|
8757
|
-
import { jsx as
|
|
8771
|
+
import { jsx as jsx69, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
8758
8772
|
var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */ jsxs33(
|
|
8759
8773
|
"svg",
|
|
8760
8774
|
{
|
|
@@ -8768,10 +8782,10 @@ var ArrowRightLeft = ({ color = "currentColor", size = 24 }) => /* @__PURE__ */
|
|
|
8768
8782
|
strokeLinecap: "round",
|
|
8769
8783
|
strokeLinejoin: "round",
|
|
8770
8784
|
children: [
|
|
8771
|
-
/* @__PURE__ */
|
|
8772
|
-
/* @__PURE__ */
|
|
8773
|
-
/* @__PURE__ */
|
|
8774
|
-
/* @__PURE__ */
|
|
8785
|
+
/* @__PURE__ */ jsx69("path", { d: "m16 3 4 4-4 4" }),
|
|
8786
|
+
/* @__PURE__ */ jsx69("path", { d: "M20 7H4" }),
|
|
8787
|
+
/* @__PURE__ */ jsx69("path", { d: "m8 21-4-4 4-4" }),
|
|
8788
|
+
/* @__PURE__ */ jsx69("path", { d: "M4 17h16" })
|
|
8775
8789
|
]
|
|
8776
8790
|
}
|
|
8777
8791
|
);
|
|
@@ -8786,7 +8800,7 @@ var flowIconRegistry = {
|
|
|
8786
8800
|
var flowIconRegistry_default = flowIconRegistry;
|
|
8787
8801
|
|
|
8788
8802
|
// src/components/presentation/auth/AuthOptionFactory.tsx
|
|
8789
|
-
import { jsx as
|
|
8803
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
8790
8804
|
var logger6 = createPackageComponentLogger6(
|
|
8791
8805
|
"@asgardeo/react",
|
|
8792
8806
|
"AuthOptionFactory"
|
|
@@ -8861,7 +8875,25 @@ var matchesSocialProvider = (actionId, eventType, buttonText, provider, authType
|
|
|
8861
8875
|
};
|
|
8862
8876
|
var createAuthComponentFromFlow = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, authType, options = {}) => {
|
|
8863
8877
|
const { theme } = useTheme_default();
|
|
8878
|
+
const customRenderers = useContext11(ComponentRendererContext_default);
|
|
8864
8879
|
const key = options.key || component.id;
|
|
8880
|
+
const customRenderer = customRenderers[component.id] ?? customRenderers[component.type];
|
|
8881
|
+
if (customRenderer) {
|
|
8882
|
+
const renderCtx = {
|
|
8883
|
+
additionalData: options.additionalData,
|
|
8884
|
+
authType,
|
|
8885
|
+
formErrors,
|
|
8886
|
+
formValues,
|
|
8887
|
+
isFormValid,
|
|
8888
|
+
isLoading,
|
|
8889
|
+
meta: options.meta,
|
|
8890
|
+
onInputBlur: options.onInputBlur,
|
|
8891
|
+
onInputChange,
|
|
8892
|
+
onSubmit: options.onSubmit,
|
|
8893
|
+
touchedFields
|
|
8894
|
+
};
|
|
8895
|
+
return customRenderer(component, renderCtx);
|
|
8896
|
+
}
|
|
8865
8897
|
const resolve = (text) => {
|
|
8866
8898
|
if (!text || !options.t && !options.meta) {
|
|
8867
8899
|
return text || "";
|
|
@@ -8949,27 +8981,27 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8949
8981
|
}
|
|
8950
8982
|
};
|
|
8951
8983
|
if (matchesSocialProvider(actionId, eventType, buttonText, "google", authType, componentVariant)) {
|
|
8952
|
-
return /* @__PURE__ */
|
|
8984
|
+
return /* @__PURE__ */ jsx70(GoogleButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8953
8985
|
}
|
|
8954
8986
|
if (matchesSocialProvider(actionId, eventType, buttonText, "github", authType, componentVariant)) {
|
|
8955
|
-
return /* @__PURE__ */
|
|
8987
|
+
return /* @__PURE__ */ jsx70(GitHubButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8956
8988
|
}
|
|
8957
8989
|
if (matchesSocialProvider(actionId, eventType, buttonText, "facebook", authType, componentVariant)) {
|
|
8958
|
-
return /* @__PURE__ */
|
|
8990
|
+
return /* @__PURE__ */ jsx70(FacebookButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8959
8991
|
}
|
|
8960
8992
|
if (matchesSocialProvider(actionId, eventType, buttonText, "microsoft", authType, componentVariant)) {
|
|
8961
|
-
return /* @__PURE__ */
|
|
8993
|
+
return /* @__PURE__ */ jsx70(MicrosoftButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8962
8994
|
}
|
|
8963
8995
|
if (matchesSocialProvider(actionId, eventType, buttonText, "linkedin", authType, componentVariant)) {
|
|
8964
|
-
return /* @__PURE__ */
|
|
8996
|
+
return /* @__PURE__ */ jsx70(LinkedInButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8965
8997
|
}
|
|
8966
8998
|
if (matchesSocialProvider(actionId, eventType, buttonText, "ethereum", authType, componentVariant)) {
|
|
8967
|
-
return /* @__PURE__ */
|
|
8999
|
+
return /* @__PURE__ */ jsx70(SignInWithEthereumButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8968
9000
|
}
|
|
8969
9001
|
if (actionId === "prompt_mobile" || eventType === "prompt_mobile") {
|
|
8970
|
-
return /* @__PURE__ */
|
|
9002
|
+
return /* @__PURE__ */ jsx70(SmsOtpButton_default, { onClick: handleClick, className: options.buttonClassName }, key);
|
|
8971
9003
|
}
|
|
8972
|
-
const startIconEl = component.startIcon ? /* @__PURE__ */
|
|
9004
|
+
const startIconEl = component.startIcon ? /* @__PURE__ */ jsx70(
|
|
8973
9005
|
"img",
|
|
8974
9006
|
{
|
|
8975
9007
|
src: component.startIcon,
|
|
@@ -8978,7 +9010,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8978
9010
|
style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
|
|
8979
9011
|
}
|
|
8980
9012
|
) : null;
|
|
8981
|
-
const endIconEl = component.endIcon ? /* @__PURE__ */
|
|
9013
|
+
const endIconEl = component.endIcon ? /* @__PURE__ */ jsx70(
|
|
8982
9014
|
"img",
|
|
8983
9015
|
{
|
|
8984
9016
|
src: component.endIcon,
|
|
@@ -8987,7 +9019,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8987
9019
|
style: { height: "1.25em", objectFit: "contain", width: "1.25em" }
|
|
8988
9020
|
}
|
|
8989
9021
|
) : null;
|
|
8990
|
-
return /* @__PURE__ */
|
|
9022
|
+
return /* @__PURE__ */ jsx70(
|
|
8991
9023
|
Button_default,
|
|
8992
9024
|
{
|
|
8993
9025
|
fullWidth: true,
|
|
@@ -9006,7 +9038,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9006
9038
|
}
|
|
9007
9039
|
case EmbeddedFlowComponentType.Text: {
|
|
9008
9040
|
const variant = getTypographyVariant(component.variant);
|
|
9009
|
-
return /* @__PURE__ */
|
|
9041
|
+
return /* @__PURE__ */ jsx70(
|
|
9010
9042
|
Typography_default,
|
|
9011
9043
|
{
|
|
9012
9044
|
variant,
|
|
@@ -9020,7 +9052,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9020
9052
|
);
|
|
9021
9053
|
}
|
|
9022
9054
|
case EmbeddedFlowComponentType.Divider: {
|
|
9023
|
-
return /* @__PURE__ */
|
|
9055
|
+
return /* @__PURE__ */ jsx70(Divider_default, { children: resolve(component.label) || "" }, key);
|
|
9024
9056
|
}
|
|
9025
9057
|
case EmbeddedFlowComponentType.Select: {
|
|
9026
9058
|
const identifier = component.ref;
|
|
@@ -9031,7 +9063,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9031
9063
|
label: typeof opt === "string" ? opt : String(opt.label ?? opt.value ?? ""),
|
|
9032
9064
|
value: typeof opt === "string" ? opt : String(opt.value ?? "")
|
|
9033
9065
|
}));
|
|
9034
|
-
return /* @__PURE__ */
|
|
9066
|
+
return /* @__PURE__ */ jsx70(
|
|
9035
9067
|
Select_default,
|
|
9036
9068
|
{
|
|
9037
9069
|
name: identifier,
|
|
@@ -9055,7 +9087,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9055
9087
|
logger6.warn("OU_SELECT requires additionalData.rootOuId and fetchOrganizationUnitChildren. Skipping render.");
|
|
9056
9088
|
return null;
|
|
9057
9089
|
}
|
|
9058
|
-
return /* @__PURE__ */
|
|
9090
|
+
return /* @__PURE__ */ jsx70(
|
|
9059
9091
|
OrganizationUnitPicker_default,
|
|
9060
9092
|
{
|
|
9061
9093
|
rootOuId,
|
|
@@ -9089,12 +9121,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9089
9121
|
}
|
|
9090
9122
|
)
|
|
9091
9123
|
).filter(Boolean);
|
|
9092
|
-
return /* @__PURE__ */
|
|
9124
|
+
return /* @__PURE__ */ jsx70("form", { id: component.id, style: formStyles, children: blockComponents }, key);
|
|
9093
9125
|
}
|
|
9094
9126
|
return null;
|
|
9095
9127
|
}
|
|
9096
9128
|
case EmbeddedFlowComponentType.RichText: {
|
|
9097
|
-
return /* @__PURE__ */
|
|
9129
|
+
return /* @__PURE__ */ jsx70(
|
|
9098
9130
|
"div",
|
|
9099
9131
|
{
|
|
9100
9132
|
className: richTextClass,
|
|
@@ -9106,7 +9138,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9106
9138
|
case EmbeddedFlowComponentType.Image: {
|
|
9107
9139
|
const explicitHeight = resolve(component.height?.toString());
|
|
9108
9140
|
const explicitWidth = resolve(component.width?.toString());
|
|
9109
|
-
return /* @__PURE__ */
|
|
9141
|
+
return /* @__PURE__ */ jsx70(
|
|
9110
9142
|
ImageComponent_default,
|
|
9111
9143
|
{
|
|
9112
9144
|
component: {
|
|
@@ -9136,7 +9168,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9136
9168
|
logger6.warn(`Unknown icon name: "${iconName}". Skipping render.`);
|
|
9137
9169
|
return null;
|
|
9138
9170
|
}
|
|
9139
|
-
return /* @__PURE__ */
|
|
9171
|
+
return /* @__PURE__ */ jsx70(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
|
|
9140
9172
|
}
|
|
9141
9173
|
case EmbeddedFlowComponentType.Stack: {
|
|
9142
9174
|
const direction = component.direction || "row";
|
|
@@ -9168,11 +9200,11 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9168
9200
|
}
|
|
9169
9201
|
)
|
|
9170
9202
|
) : [];
|
|
9171
|
-
return /* @__PURE__ */
|
|
9203
|
+
return /* @__PURE__ */ jsx70("div", { style: stackStyle, children: stackChildren }, key);
|
|
9172
9204
|
}
|
|
9173
9205
|
case EmbeddedFlowComponentType.Consent: {
|
|
9174
9206
|
const consentPromptRawData = options.additionalData?.["consentPrompt"];
|
|
9175
|
-
return /* @__PURE__ */
|
|
9207
|
+
return /* @__PURE__ */ jsx70(
|
|
9176
9208
|
Consent_default,
|
|
9177
9209
|
{
|
|
9178
9210
|
consentData: consentPromptRawData,
|
|
@@ -9186,13 +9218,13 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
9186
9218
|
const textTemplate = resolve(component.label) || "Time remaining: {time}";
|
|
9187
9219
|
const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
|
|
9188
9220
|
const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
|
|
9189
|
-
return /* @__PURE__ */
|
|
9221
|
+
return /* @__PURE__ */ jsx70(FlowTimer_default, { expiresIn, textTemplate }, key);
|
|
9190
9222
|
}
|
|
9191
9223
|
case EmbeddedFlowComponentType.CopyableText: {
|
|
9192
9224
|
const sourceKey = component.source;
|
|
9193
9225
|
const value = sourceKey && options.additionalData ? String(options.additionalData[sourceKey] ?? "") : "";
|
|
9194
9226
|
const labelText = resolve(component.label) || void 0;
|
|
9195
|
-
return /* @__PURE__ */
|
|
9227
|
+
return /* @__PURE__ */ jsx70(CopyableText_default, { label: labelText, value }, key);
|
|
9196
9228
|
}
|
|
9197
9229
|
default:
|
|
9198
9230
|
logger6.warn(`Unsupported component type: ${component.type}. Skipping render.`);
|
|
@@ -9249,7 +9281,7 @@ var renderInviteUserComponents = (components, formValues, touchedFields, formErr
|
|
|
9249
9281
|
).filter(Boolean);
|
|
9250
9282
|
|
|
9251
9283
|
// src/components/presentation/auth/SignIn/v2/BaseSignIn.tsx
|
|
9252
|
-
import { jsx as
|
|
9284
|
+
import { jsx as jsx71, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
9253
9285
|
var BaseSignInContent2 = ({
|
|
9254
9286
|
components = [],
|
|
9255
9287
|
onSubmit,
|
|
@@ -9462,43 +9494,43 @@ var BaseSignInContent2 = ({
|
|
|
9462
9494
|
},
|
|
9463
9495
|
values: formValues
|
|
9464
9496
|
};
|
|
9465
|
-
return /* @__PURE__ */
|
|
9497
|
+
return /* @__PURE__ */ jsx71("div", { className: containerClasses, "data-testid": "asgardeo-signin", children: children(renderProps) });
|
|
9466
9498
|
}
|
|
9467
9499
|
if (isLoading) {
|
|
9468
|
-
return /* @__PURE__ */
|
|
9500
|
+
return /* @__PURE__ */ jsx71(Card_default, { className: cx23(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx71(Card_default.Content, { children: /* @__PURE__ */ jsx71("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx71(Spinner_default, {}) }) }) });
|
|
9469
9501
|
}
|
|
9470
9502
|
if (!components || components.length === 0) {
|
|
9471
|
-
return /* @__PURE__ */
|
|
9503
|
+
return /* @__PURE__ */ jsx71(Card_default, { className: cx23(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsx71(Card_default.Content, { children: /* @__PURE__ */ jsx71(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx71(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
|
|
9472
9504
|
}
|
|
9473
|
-
return /* @__PURE__ */
|
|
9474
|
-
externalError && /* @__PURE__ */
|
|
9475
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */
|
|
9505
|
+
return /* @__PURE__ */ jsx71(Card_default, { className: cx23(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ jsxs34(Card_default.Content, { children: [
|
|
9506
|
+
externalError && /* @__PURE__ */ jsx71("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx71(Alert_default, { variant: "error", className: cx23(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx71(Alert_default.Description, { children: externalError.message }) }) }),
|
|
9507
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx71("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx71(
|
|
9476
9508
|
Alert_default,
|
|
9477
9509
|
{
|
|
9478
9510
|
variant: message.type === "error" ? "error" : "info",
|
|
9479
9511
|
className: cx23(styles.flowMessageItem, messageClasses),
|
|
9480
|
-
children: /* @__PURE__ */
|
|
9512
|
+
children: /* @__PURE__ */ jsx71(Alert_default.Description, { children: message.message })
|
|
9481
9513
|
},
|
|
9482
9514
|
index
|
|
9483
9515
|
)) }),
|
|
9484
|
-
/* @__PURE__ */
|
|
9516
|
+
/* @__PURE__ */ jsx71("div", { className: styles.contentContainer, children: renderComponents(components) })
|
|
9485
9517
|
] }) });
|
|
9486
9518
|
};
|
|
9487
9519
|
var BaseSignIn2 = ({ preferences, ...rest }) => {
|
|
9488
|
-
const content = /* @__PURE__ */
|
|
9520
|
+
const content = /* @__PURE__ */ jsx71(FlowProvider_default, { children: /* @__PURE__ */ jsx71(BaseSignInContent2, { ...rest }) });
|
|
9489
9521
|
if (!preferences) return content;
|
|
9490
|
-
return /* @__PURE__ */
|
|
9522
|
+
return /* @__PURE__ */ jsx71(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
|
|
9491
9523
|
};
|
|
9492
9524
|
var BaseSignIn_default2 = BaseSignIn2;
|
|
9493
9525
|
|
|
9494
9526
|
// src/components/presentation/auth/SignIn/BaseSignIn.tsx
|
|
9495
|
-
import { jsx as
|
|
9527
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
9496
9528
|
var BaseSignIn3 = (props) => {
|
|
9497
9529
|
const { platform } = useAsgardeo_default();
|
|
9498
9530
|
if (platform === Platform5.AsgardeoV2) {
|
|
9499
|
-
return /* @__PURE__ */
|
|
9531
|
+
return /* @__PURE__ */ jsx72(BaseSignIn_default2, { ...props });
|
|
9500
9532
|
}
|
|
9501
|
-
return /* @__PURE__ */
|
|
9533
|
+
return /* @__PURE__ */ jsx72(BaseSignIn_default, { ...props });
|
|
9502
9534
|
};
|
|
9503
9535
|
var BaseSignIn_default3 = BaseSignIn3;
|
|
9504
9536
|
|
|
@@ -9791,7 +9823,7 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
9791
9823
|
};
|
|
9792
9824
|
|
|
9793
9825
|
// src/components/presentation/auth/SignIn/v2/SignIn.tsx
|
|
9794
|
-
import { Fragment as Fragment17, jsx as
|
|
9826
|
+
import { Fragment as Fragment17, jsx as jsx73 } from "react/jsx-runtime";
|
|
9795
9827
|
var SignIn = ({
|
|
9796
9828
|
className,
|
|
9797
9829
|
preferences,
|
|
@@ -10254,9 +10286,9 @@ var SignIn = ({
|
|
|
10254
10286
|
meta,
|
|
10255
10287
|
onSubmit: handleSubmit
|
|
10256
10288
|
};
|
|
10257
|
-
return /* @__PURE__ */
|
|
10289
|
+
return /* @__PURE__ */ jsx73(Fragment17, { children: children(renderProps) });
|
|
10258
10290
|
}
|
|
10259
|
-
return /* @__PURE__ */
|
|
10291
|
+
return /* @__PURE__ */ jsx73(
|
|
10260
10292
|
BaseSignIn_default2,
|
|
10261
10293
|
{
|
|
10262
10294
|
additionalData,
|
|
@@ -10276,7 +10308,7 @@ var SignIn = ({
|
|
|
10276
10308
|
var SignIn_default = SignIn;
|
|
10277
10309
|
|
|
10278
10310
|
// src/components/presentation/auth/SignIn/SignIn.tsx
|
|
10279
|
-
import { jsx as
|
|
10311
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
10280
10312
|
var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) => {
|
|
10281
10313
|
const { signIn, afterSignInUrl, isInitialized, isLoading, platform } = useAsgardeo_default();
|
|
10282
10314
|
const handleInitialize = async () => await signIn({ response_mode: "direct" });
|
|
@@ -10293,7 +10325,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
|
|
|
10293
10325
|
}
|
|
10294
10326
|
};
|
|
10295
10327
|
if (platform === Platform6.AsgardeoV2) {
|
|
10296
|
-
return /* @__PURE__ */
|
|
10328
|
+
return /* @__PURE__ */ jsx74(
|
|
10297
10329
|
SignIn_default,
|
|
10298
10330
|
{
|
|
10299
10331
|
className,
|
|
@@ -10306,7 +10338,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
|
|
|
10306
10338
|
}
|
|
10307
10339
|
);
|
|
10308
10340
|
}
|
|
10309
|
-
return /* @__PURE__ */
|
|
10341
|
+
return /* @__PURE__ */ jsx74(
|
|
10310
10342
|
BaseSignIn_default3,
|
|
10311
10343
|
{
|
|
10312
10344
|
isLoading: isLoading || !isInitialized,
|
|
@@ -10400,13 +10432,13 @@ var DateInput = ({
|
|
|
10400
10432
|
var DateInput_default = DateInput;
|
|
10401
10433
|
|
|
10402
10434
|
// src/components/adapters/DividerComponent.tsx
|
|
10403
|
-
import { jsx as
|
|
10435
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
10404
10436
|
var DividerComponent = ({ component }) => {
|
|
10405
10437
|
const { theme } = useTheme_default();
|
|
10406
10438
|
const config = component.config || {};
|
|
10407
10439
|
const text = config["text"] || "";
|
|
10408
10440
|
const variant = component.variant?.toLowerCase() || "horizontal";
|
|
10409
|
-
return /* @__PURE__ */
|
|
10441
|
+
return /* @__PURE__ */ jsx75(
|
|
10410
10442
|
Divider_default,
|
|
10411
10443
|
{
|
|
10412
10444
|
orientation: variant === "vertical" ? "vertical" : "horizontal",
|
|
@@ -10447,7 +10479,7 @@ var EmailInput = ({
|
|
|
10447
10479
|
var EmailInput_default = EmailInput;
|
|
10448
10480
|
|
|
10449
10481
|
// src/components/adapters/FormContainer.tsx
|
|
10450
|
-
import { jsx as
|
|
10482
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
10451
10483
|
var FormContainer = (props) => {
|
|
10452
10484
|
const { component } = props;
|
|
10453
10485
|
if (component.components && component.components.length > 0) {
|
|
@@ -10460,14 +10492,14 @@ var FormContainer = (props) => {
|
|
|
10460
10492
|
props.onSubmit(submitButton, props.formValues);
|
|
10461
10493
|
}
|
|
10462
10494
|
};
|
|
10463
|
-
return /* @__PURE__ */
|
|
10495
|
+
return /* @__PURE__ */ jsx76("form", { onSubmit: handleFormSubmit, style: { display: "flex", flexDirection: "column" }, children: component.components.map(
|
|
10464
10496
|
(childComponent) => createSignUpComponent({
|
|
10465
10497
|
...props,
|
|
10466
10498
|
component: childComponent
|
|
10467
10499
|
})
|
|
10468
10500
|
) }, component.id);
|
|
10469
10501
|
}
|
|
10470
|
-
return /* @__PURE__ */
|
|
10502
|
+
return /* @__PURE__ */ jsx76("div", {}, component.id);
|
|
10471
10503
|
};
|
|
10472
10504
|
var FormContainer_default = FormContainer;
|
|
10473
10505
|
|
|
@@ -10593,7 +10625,7 @@ var SelectInput = ({
|
|
|
10593
10625
|
var SelectInput_default = SelectInput;
|
|
10594
10626
|
|
|
10595
10627
|
// src/components/adapters/SubmitButton.tsx
|
|
10596
|
-
import { jsx as
|
|
10628
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
10597
10629
|
var ButtonComponent = ({
|
|
10598
10630
|
component,
|
|
10599
10631
|
isLoading,
|
|
@@ -10627,7 +10659,7 @@ var ButtonComponent = ({
|
|
|
10627
10659
|
onSubmit(component);
|
|
10628
10660
|
}
|
|
10629
10661
|
};
|
|
10630
|
-
return /* @__PURE__ */
|
|
10662
|
+
return /* @__PURE__ */ jsx77(
|
|
10631
10663
|
Button_default,
|
|
10632
10664
|
{
|
|
10633
10665
|
type: buttonType === "submit" ? "submit" : "button",
|
|
@@ -10638,7 +10670,7 @@ var ButtonComponent = ({
|
|
|
10638
10670
|
onClick: buttonType !== "submit" ? handleClick : void 0,
|
|
10639
10671
|
className: buttonClassName,
|
|
10640
10672
|
style: { width: "100%" },
|
|
10641
|
-
children: isLoading ? /* @__PURE__ */
|
|
10673
|
+
children: isLoading ? /* @__PURE__ */ jsx77(Spinner_default, { size: "small" }) : buttonText
|
|
10642
10674
|
},
|
|
10643
10675
|
component.id
|
|
10644
10676
|
);
|
|
@@ -10646,7 +10678,7 @@ var ButtonComponent = ({
|
|
|
10646
10678
|
var SubmitButton_default = ButtonComponent;
|
|
10647
10679
|
|
|
10648
10680
|
// src/components/adapters/TelephoneInput.tsx
|
|
10649
|
-
import { jsx as
|
|
10681
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
10650
10682
|
var TelephoneInput = ({
|
|
10651
10683
|
component,
|
|
10652
10684
|
formValues,
|
|
@@ -10659,7 +10691,7 @@ var TelephoneInput = ({
|
|
|
10659
10691
|
const fieldName = config["identifier"] || config["name"] || component.id;
|
|
10660
10692
|
const value = formValues[fieldName] || "";
|
|
10661
10693
|
const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
|
|
10662
|
-
return /* @__PURE__ */
|
|
10694
|
+
return /* @__PURE__ */ jsx78(
|
|
10663
10695
|
TextField_default,
|
|
10664
10696
|
{
|
|
10665
10697
|
name: fieldName,
|
|
@@ -10707,7 +10739,7 @@ var TextInput = ({
|
|
|
10707
10739
|
var TextInput_default = TextInput;
|
|
10708
10740
|
|
|
10709
10741
|
// src/components/adapters/Typography.tsx
|
|
10710
|
-
import { jsx as
|
|
10742
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
10711
10743
|
var TypographyComponent = ({ component }) => {
|
|
10712
10744
|
const { theme } = useTheme_default();
|
|
10713
10745
|
const config = component.config || {};
|
|
@@ -10748,7 +10780,7 @@ var TypographyComponent = ({ component }) => {
|
|
|
10748
10780
|
default:
|
|
10749
10781
|
typographyVariant = "body1";
|
|
10750
10782
|
}
|
|
10751
|
-
return /* @__PURE__ */
|
|
10783
|
+
return /* @__PURE__ */ jsx79(
|
|
10752
10784
|
Typography_default,
|
|
10753
10785
|
{
|
|
10754
10786
|
variant: typographyVariant,
|
|
@@ -10761,69 +10793,69 @@ var TypographyComponent = ({ component }) => {
|
|
|
10761
10793
|
var Typography_default2 = TypographyComponent;
|
|
10762
10794
|
|
|
10763
10795
|
// src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
|
|
10764
|
-
import { jsx as
|
|
10796
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
10765
10797
|
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
10766
10798
|
switch (component.type) {
|
|
10767
10799
|
case EmbeddedFlowComponentType2.Typography:
|
|
10768
|
-
return /* @__PURE__ */
|
|
10800
|
+
return /* @__PURE__ */ jsx80(Typography_default2, { component, onSubmit, ...rest });
|
|
10769
10801
|
case EmbeddedFlowComponentType2.Input: {
|
|
10770
10802
|
const inputVariant = component.variant?.toUpperCase();
|
|
10771
10803
|
const inputType = component.config["type"]?.toLowerCase();
|
|
10772
10804
|
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
10773
|
-
return /* @__PURE__ */
|
|
10805
|
+
return /* @__PURE__ */ jsx80(EmailInput_default, { component, onSubmit, ...rest });
|
|
10774
10806
|
}
|
|
10775
10807
|
if (inputVariant === "PASSWORD" || inputType === "password") {
|
|
10776
|
-
return /* @__PURE__ */
|
|
10808
|
+
return /* @__PURE__ */ jsx80(PasswordInput_default, { component, onSubmit, ...rest });
|
|
10777
10809
|
}
|
|
10778
10810
|
if (inputVariant === "TELEPHONE" || inputType === "tel") {
|
|
10779
|
-
return /* @__PURE__ */
|
|
10811
|
+
return /* @__PURE__ */ jsx80(TelephoneInput_default, { component, onSubmit, ...rest });
|
|
10780
10812
|
}
|
|
10781
10813
|
if (inputVariant === "NUMBER" || inputType === "number") {
|
|
10782
|
-
return /* @__PURE__ */
|
|
10814
|
+
return /* @__PURE__ */ jsx80(NumberInput_default, { component, onSubmit, ...rest });
|
|
10783
10815
|
}
|
|
10784
10816
|
if (inputVariant === "DATE" || inputType === "date") {
|
|
10785
|
-
return /* @__PURE__ */
|
|
10817
|
+
return /* @__PURE__ */ jsx80(DateInput_default, { component, onSubmit, ...rest });
|
|
10786
10818
|
}
|
|
10787
10819
|
if (inputVariant === "CHECKBOX" || inputType === "checkbox") {
|
|
10788
|
-
return /* @__PURE__ */
|
|
10820
|
+
return /* @__PURE__ */ jsx80(CheckboxInput_default, { component, onSubmit, ...rest });
|
|
10789
10821
|
}
|
|
10790
|
-
return /* @__PURE__ */
|
|
10822
|
+
return /* @__PURE__ */ jsx80(TextInput_default, { component, onSubmit, ...rest });
|
|
10791
10823
|
}
|
|
10792
10824
|
case EmbeddedFlowComponentType2.Button: {
|
|
10793
10825
|
const buttonVariant = component.variant?.toUpperCase();
|
|
10794
10826
|
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
10795
10827
|
if (buttonVariant === "SOCIAL") {
|
|
10796
10828
|
if (buttonText.toLowerCase().includes("google")) {
|
|
10797
|
-
return /* @__PURE__ */
|
|
10829
|
+
return /* @__PURE__ */ jsx80(GoogleButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10798
10830
|
}
|
|
10799
10831
|
if (buttonText.toLowerCase().includes("github")) {
|
|
10800
|
-
return /* @__PURE__ */
|
|
10832
|
+
return /* @__PURE__ */ jsx80(GitHubButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10801
10833
|
}
|
|
10802
10834
|
if (buttonText.toLowerCase().includes("microsoft")) {
|
|
10803
|
-
return /* @__PURE__ */
|
|
10835
|
+
return /* @__PURE__ */ jsx80(MicrosoftButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10804
10836
|
}
|
|
10805
10837
|
if (buttonText.toLowerCase().includes("facebook")) {
|
|
10806
|
-
return /* @__PURE__ */
|
|
10838
|
+
return /* @__PURE__ */ jsx80(FacebookButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10807
10839
|
}
|
|
10808
10840
|
if (buttonText.toLowerCase().includes("linkedin")) {
|
|
10809
|
-
return /* @__PURE__ */
|
|
10841
|
+
return /* @__PURE__ */ jsx80(LinkedInButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10810
10842
|
}
|
|
10811
10843
|
if (buttonText.toLowerCase().includes("ethereum")) {
|
|
10812
|
-
return /* @__PURE__ */
|
|
10844
|
+
return /* @__PURE__ */ jsx80(SignInWithEthereumButton_default, { onClick: () => onSubmit(component, {}), ...rest, children: buttonText });
|
|
10813
10845
|
}
|
|
10814
10846
|
}
|
|
10815
|
-
return /* @__PURE__ */
|
|
10847
|
+
return /* @__PURE__ */ jsx80(SubmitButton_default, { component, onSubmit, ...rest });
|
|
10816
10848
|
}
|
|
10817
10849
|
case EmbeddedFlowComponentType2.Form:
|
|
10818
|
-
return /* @__PURE__ */
|
|
10850
|
+
return /* @__PURE__ */ jsx80(FormContainer_default, { component, onSubmit, ...rest });
|
|
10819
10851
|
case EmbeddedFlowComponentType2.Select:
|
|
10820
|
-
return /* @__PURE__ */
|
|
10852
|
+
return /* @__PURE__ */ jsx80(SelectInput_default, { component, onSubmit, ...rest });
|
|
10821
10853
|
case EmbeddedFlowComponentType2.Divider:
|
|
10822
|
-
return /* @__PURE__ */
|
|
10854
|
+
return /* @__PURE__ */ jsx80(DividerComponent_default, { component, onSubmit, ...rest });
|
|
10823
10855
|
case EmbeddedFlowComponentType2.Image:
|
|
10824
|
-
return /* @__PURE__ */
|
|
10856
|
+
return /* @__PURE__ */ jsx80(ImageComponent_default, { component, onSubmit, ...rest });
|
|
10825
10857
|
default:
|
|
10826
|
-
return /* @__PURE__ */
|
|
10858
|
+
return /* @__PURE__ */ jsx80("div", {});
|
|
10827
10859
|
}
|
|
10828
10860
|
};
|
|
10829
10861
|
var createSignUpOptionFromComponent = (component, formValues, touchedFields, formErrors, isLoading, isFormValid, onInputChange, options) => createSignUpComponent({
|
|
@@ -10992,7 +11024,7 @@ var useStyles21 = (theme, colorScheme) => useMemo29(() => {
|
|
|
10992
11024
|
var BaseSignUp_styles_default = useStyles21;
|
|
10993
11025
|
|
|
10994
11026
|
// src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
|
|
10995
|
-
import { jsx as
|
|
11027
|
+
import { jsx as jsx81, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
10996
11028
|
var logger8 = createPackageComponentLogger7(
|
|
10997
11029
|
"@asgardeo/react",
|
|
10998
11030
|
"BaseSignUp"
|
|
@@ -11395,33 +11427,33 @@ var BaseSignUpContent = ({
|
|
|
11395
11427
|
validateForm,
|
|
11396
11428
|
values: formValues
|
|
11397
11429
|
};
|
|
11398
|
-
return /* @__PURE__ */
|
|
11430
|
+
return /* @__PURE__ */ jsx81("div", { className: containerClasses, children: children(renderProps) });
|
|
11399
11431
|
}
|
|
11400
11432
|
if (!isFlowInitialized && isLoading) {
|
|
11401
|
-
return /* @__PURE__ */
|
|
11433
|
+
return /* @__PURE__ */ jsx81(Card_default, { className: cx24(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx81(Card_default.Content, { children: /* @__PURE__ */ jsx81("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx81(Spinner_default, { size: "medium" }) }) }) });
|
|
11402
11434
|
}
|
|
11403
11435
|
if (!currentFlow) {
|
|
11404
|
-
return /* @__PURE__ */
|
|
11405
|
-
/* @__PURE__ */
|
|
11406
|
-
/* @__PURE__ */
|
|
11436
|
+
return /* @__PURE__ */ jsx81(Card_default, { className: cx24(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx81(Card_default.Content, { children: /* @__PURE__ */ jsxs35(Alert_default, { variant: "error", className: errorClasses, children: [
|
|
11437
|
+
/* @__PURE__ */ jsx81(Alert_default.Title, { children: t("errors.heading") }),
|
|
11438
|
+
/* @__PURE__ */ jsx81(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
|
|
11407
11439
|
] }) }) });
|
|
11408
11440
|
}
|
|
11409
11441
|
return /* @__PURE__ */ jsxs35(Card_default, { className: cx24(containerClasses, styles.card), variant, children: [
|
|
11410
11442
|
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs35(Card_default.Header, { className: styles.header, children: [
|
|
11411
|
-
showTitle && /* @__PURE__ */
|
|
11412
|
-
showSubtitle && /* @__PURE__ */
|
|
11443
|
+
showTitle && /* @__PURE__ */ jsx81(Card_default.Title, { level: 2, className: styles.title, children: flowTitle || t("signup.heading") }),
|
|
11444
|
+
showSubtitle && /* @__PURE__ */ jsx81(Typography_default, { variant: "body1", className: styles.subtitle, children: flowSubtitle || t("signup.subheading") })
|
|
11413
11445
|
] }),
|
|
11414
11446
|
/* @__PURE__ */ jsxs35(Card_default.Content, { children: [
|
|
11415
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */
|
|
11447
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx81("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx81(
|
|
11416
11448
|
Alert_default,
|
|
11417
11449
|
{
|
|
11418
11450
|
variant: message.type?.toLowerCase() === "error" ? "error" : "info",
|
|
11419
11451
|
className: cx24(styles.flowMessageItem, messageClasses),
|
|
11420
|
-
children: /* @__PURE__ */
|
|
11452
|
+
children: /* @__PURE__ */ jsx81(Alert_default.Description, { children: message.message })
|
|
11421
11453
|
},
|
|
11422
11454
|
message.id || index
|
|
11423
11455
|
)) }),
|
|
11424
|
-
/* @__PURE__ */
|
|
11456
|
+
/* @__PURE__ */ jsx81("div", { className: styles.contentContainer, children: currentFlow.data?.components && currentFlow.data.components.length > 0 ? renderComponents(currentFlow.data.components) : /* @__PURE__ */ jsx81(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx81(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
|
|
11425
11457
|
] })
|
|
11426
11458
|
] });
|
|
11427
11459
|
};
|
|
@@ -11429,8 +11461,8 @@ var BaseSignUp = ({ showLogo = true, ...rest }) => {
|
|
|
11429
11461
|
const { theme, colorScheme } = useTheme_default();
|
|
11430
11462
|
const styles = BaseSignUp_styles_default(theme, colorScheme);
|
|
11431
11463
|
return /* @__PURE__ */ jsxs35("div", { children: [
|
|
11432
|
-
showLogo && /* @__PURE__ */
|
|
11433
|
-
/* @__PURE__ */
|
|
11464
|
+
showLogo && /* @__PURE__ */ jsx81("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx81(Logo_default, { size: "large" }) }),
|
|
11465
|
+
/* @__PURE__ */ jsx81(FlowProvider_default, { children: /* @__PURE__ */ jsx81(BaseSignUpContent, { showLogo, ...rest }) })
|
|
11434
11466
|
] });
|
|
11435
11467
|
};
|
|
11436
11468
|
var BaseSignUp_default = BaseSignUp;
|
|
@@ -11507,7 +11539,7 @@ var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitl
|
|
|
11507
11539
|
var getAuthComponentHeadings_default = getAuthComponentHeadings;
|
|
11508
11540
|
|
|
11509
11541
|
// src/components/presentation/auth/SignUp/v2/BaseSignUp.tsx
|
|
11510
|
-
import { jsx as
|
|
11542
|
+
import { jsx as jsx82, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
11511
11543
|
var logger9 = createPackageComponentLogger8(
|
|
11512
11544
|
"@asgardeo/react",
|
|
11513
11545
|
"BaseSignUp"
|
|
@@ -11895,7 +11927,8 @@ var BaseSignUpContent2 = ({
|
|
|
11895
11927
|
actionId: passkeyState.actionId || "submit",
|
|
11896
11928
|
executionId: passkeyState.executionId,
|
|
11897
11929
|
flowType: currentFlow?.flowType || "REGISTRATION",
|
|
11898
|
-
inputs
|
|
11930
|
+
inputs,
|
|
11931
|
+
...challengeTokenRef.current ? { challengeToken: challengeTokenRef.current } : {}
|
|
11899
11932
|
};
|
|
11900
11933
|
const nextResponse = await onSubmit(payload);
|
|
11901
11934
|
const processedResponse = normalizeFlowResponseLocal(nextResponse);
|
|
@@ -12045,15 +12078,15 @@ var BaseSignUpContent2 = ({
|
|
|
12045
12078
|
},
|
|
12046
12079
|
values: formValues
|
|
12047
12080
|
};
|
|
12048
|
-
return /* @__PURE__ */
|
|
12081
|
+
return /* @__PURE__ */ jsx82("div", { className: containerClasses, children: children(renderProps) });
|
|
12049
12082
|
}
|
|
12050
12083
|
if (!isFlowInitialized && isLoading) {
|
|
12051
|
-
return /* @__PURE__ */
|
|
12084
|
+
return /* @__PURE__ */ jsx82(Card_default, { className: cx25(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx82(Card_default.Content, { children: /* @__PURE__ */ jsx82("div", { className: styles.loadingContainer, children: /* @__PURE__ */ jsx82(Spinner_default, { size: "medium" }) }) }) });
|
|
12052
12085
|
}
|
|
12053
12086
|
if (!currentFlow) {
|
|
12054
|
-
return /* @__PURE__ */
|
|
12055
|
-
/* @__PURE__ */
|
|
12056
|
-
/* @__PURE__ */
|
|
12087
|
+
return /* @__PURE__ */ jsx82(Card_default, { className: cx25(containerClasses, styles.card), variant, children: /* @__PURE__ */ jsx82(Card_default.Content, { children: /* @__PURE__ */ jsxs36(Alert_default, { variant: "error", className: errorClasses, children: [
|
|
12088
|
+
/* @__PURE__ */ jsx82(Alert_default.Title, { children: t("errors.heading") }),
|
|
12089
|
+
/* @__PURE__ */ jsx82(Alert_default.Description, { children: t("errors.signup.flow.initialization.failure") })
|
|
12057
12090
|
] }) }) });
|
|
12058
12091
|
}
|
|
12059
12092
|
const componentsToRender = currentFlow.data?.components || [];
|
|
@@ -12066,21 +12099,21 @@ var BaseSignUpContent2 = ({
|
|
|
12066
12099
|
);
|
|
12067
12100
|
return /* @__PURE__ */ jsxs36(Card_default, { className: cx25(containerClasses, styles.card), variant, children: [
|
|
12068
12101
|
(showTitle || showSubtitle) && /* @__PURE__ */ jsxs36(Card_default.Header, { className: styles.header, children: [
|
|
12069
|
-
showTitle && /* @__PURE__ */
|
|
12070
|
-
showSubtitle && /* @__PURE__ */
|
|
12102
|
+
showTitle && /* @__PURE__ */ jsx82(Card_default.Title, { level: 2, className: styles.title, children: title }),
|
|
12103
|
+
showSubtitle && /* @__PURE__ */ jsx82(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
|
|
12071
12104
|
] }),
|
|
12072
12105
|
/* @__PURE__ */ jsxs36(Card_default.Content, { children: [
|
|
12073
|
-
externalError && /* @__PURE__ */
|
|
12074
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */
|
|
12106
|
+
externalError && /* @__PURE__ */ jsx82("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ jsx82(Alert_default, { variant: "error", className: cx25(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ jsx82(Alert_default.Description, { children: externalError.message }) }) }),
|
|
12107
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ jsx82("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ jsx82(
|
|
12075
12108
|
Alert_default,
|
|
12076
12109
|
{
|
|
12077
12110
|
variant: message.type?.toLowerCase() === "error" ? "error" : "info",
|
|
12078
12111
|
className: cx25(styles.flowMessageItem, messageClasses),
|
|
12079
|
-
children: /* @__PURE__ */
|
|
12112
|
+
children: /* @__PURE__ */ jsx82(Alert_default.Description, { children: message.message })
|
|
12080
12113
|
},
|
|
12081
12114
|
message.id || index
|
|
12082
12115
|
)) }),
|
|
12083
|
-
/* @__PURE__ */
|
|
12116
|
+
/* @__PURE__ */ jsx82("div", { className: styles.contentContainer, children: componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : /* @__PURE__ */ jsx82(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx82(Typography_default, { variant: "body1", children: t("errors.signup.components.not.available") }) }) })
|
|
12084
12117
|
] })
|
|
12085
12118
|
] });
|
|
12086
12119
|
};
|
|
@@ -12088,22 +12121,22 @@ var BaseSignUp2 = ({ preferences, showLogo = true, ...rest }) => {
|
|
|
12088
12121
|
const { theme, colorScheme } = useTheme_default();
|
|
12089
12122
|
const styles = BaseSignUp_styles_default(theme, colorScheme);
|
|
12090
12123
|
const content = /* @__PURE__ */ jsxs36("div", { children: [
|
|
12091
|
-
showLogo && /* @__PURE__ */
|
|
12092
|
-
/* @__PURE__ */
|
|
12124
|
+
showLogo && /* @__PURE__ */ jsx82("div", { className: styles.logoContainer, children: /* @__PURE__ */ jsx82(Logo_default, { size: "large" }) }),
|
|
12125
|
+
/* @__PURE__ */ jsx82(FlowProvider_default, { children: /* @__PURE__ */ jsx82(BaseSignUpContent2, { showLogo, ...rest }) })
|
|
12093
12126
|
] });
|
|
12094
12127
|
if (!preferences) return content;
|
|
12095
|
-
return /* @__PURE__ */
|
|
12128
|
+
return /* @__PURE__ */ jsx82(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
|
|
12096
12129
|
};
|
|
12097
12130
|
var BaseSignUp_default2 = BaseSignUp2;
|
|
12098
12131
|
|
|
12099
12132
|
// src/components/presentation/auth/SignUp/BaseSignUp.tsx
|
|
12100
|
-
import { jsx as
|
|
12133
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
12101
12134
|
var BaseSignUp3 = (props) => {
|
|
12102
12135
|
const { platform } = useAsgardeo_default();
|
|
12103
12136
|
if (platform === Platform7.AsgardeoV2) {
|
|
12104
|
-
return /* @__PURE__ */
|
|
12137
|
+
return /* @__PURE__ */ jsx83(BaseSignUp_default2, { ...props });
|
|
12105
12138
|
}
|
|
12106
|
-
return /* @__PURE__ */
|
|
12139
|
+
return /* @__PURE__ */ jsx83(BaseSignUp_default, { ...props });
|
|
12107
12140
|
};
|
|
12108
12141
|
var BaseSignUp_default3 = BaseSignUp3;
|
|
12109
12142
|
|
|
@@ -12115,7 +12148,7 @@ import {
|
|
|
12115
12148
|
EmbeddedFlowResponseType as EmbeddedFlowResponseType3,
|
|
12116
12149
|
EmbeddedFlowType as EmbeddedFlowType2
|
|
12117
12150
|
} from "@asgardeo/browser";
|
|
12118
|
-
import { jsx as
|
|
12151
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
12119
12152
|
var SignUp = ({
|
|
12120
12153
|
className,
|
|
12121
12154
|
size = "medium",
|
|
@@ -12144,7 +12177,7 @@ var SignUp = ({
|
|
|
12144
12177
|
window.location.href = response.data.redirectURL;
|
|
12145
12178
|
}
|
|
12146
12179
|
};
|
|
12147
|
-
return /* @__PURE__ */
|
|
12180
|
+
return /* @__PURE__ */ jsx84(
|
|
12148
12181
|
BaseSignUp_default,
|
|
12149
12182
|
{
|
|
12150
12183
|
afterSignUpUrl,
|
|
@@ -12170,7 +12203,7 @@ import {
|
|
|
12170
12203
|
EmbeddedFlowResponseType as EmbeddedFlowResponseType4,
|
|
12171
12204
|
EmbeddedFlowType as EmbeddedFlowType3
|
|
12172
12205
|
} from "@asgardeo/browser";
|
|
12173
|
-
import { jsx as
|
|
12206
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
12174
12207
|
var SignUp2 = ({
|
|
12175
12208
|
className,
|
|
12176
12209
|
size = "medium",
|
|
@@ -12208,7 +12241,7 @@ var SignUp2 = ({
|
|
|
12208
12241
|
window.location.href = response.data.redirectURL;
|
|
12209
12242
|
}
|
|
12210
12243
|
};
|
|
12211
|
-
return /* @__PURE__ */
|
|
12244
|
+
return /* @__PURE__ */ jsx85(
|
|
12212
12245
|
BaseSignUp_default2,
|
|
12213
12246
|
{
|
|
12214
12247
|
afterSignUpUrl,
|
|
@@ -12229,13 +12262,13 @@ var SignUp2 = ({
|
|
|
12229
12262
|
var SignUp_default2 = SignUp2;
|
|
12230
12263
|
|
|
12231
12264
|
// src/components/presentation/auth/SignUp/SignUp.tsx
|
|
12232
|
-
import { jsx as
|
|
12265
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
12233
12266
|
var SignUp3 = (props) => {
|
|
12234
12267
|
const { platform } = useAsgardeo_default();
|
|
12235
12268
|
if (platform === Platform8.AsgardeoV2) {
|
|
12236
|
-
return /* @__PURE__ */
|
|
12269
|
+
return /* @__PURE__ */ jsx86(SignUp_default2, { ...props });
|
|
12237
12270
|
}
|
|
12238
|
-
return /* @__PURE__ */
|
|
12271
|
+
return /* @__PURE__ */ jsx86(SignUp_default, { ...props });
|
|
12239
12272
|
};
|
|
12240
12273
|
var SignUp_default3 = SignUp3;
|
|
12241
12274
|
|
|
@@ -12292,7 +12325,7 @@ var useStyles22 = (theme, colorScheme) => useMemo30(() => {
|
|
|
12292
12325
|
var BaseInviteUser_styles_default = useStyles22;
|
|
12293
12326
|
|
|
12294
12327
|
// src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
|
|
12295
|
-
import { jsx as
|
|
12328
|
+
import { jsx as jsx87, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
12296
12329
|
var BaseInviteUser = ({
|
|
12297
12330
|
onInitialize,
|
|
12298
12331
|
onSubmit,
|
|
@@ -12593,30 +12626,30 @@ var BaseInviteUser = ({
|
|
|
12593
12626
|
values: formValues
|
|
12594
12627
|
};
|
|
12595
12628
|
if (children) {
|
|
12596
|
-
return /* @__PURE__ */
|
|
12629
|
+
return /* @__PURE__ */ jsx87("div", { className, children: children(renderProps) });
|
|
12597
12630
|
}
|
|
12598
12631
|
if (!isInitialized) {
|
|
12599
|
-
return /* @__PURE__ */
|
|
12632
|
+
return /* @__PURE__ */ jsx87(Card_default, { className: cx26(className, styles.card), variant, children: /* @__PURE__ */ jsx87(Card_default.Content, { children: /* @__PURE__ */ jsx87("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx87(Spinner_default, { size: "medium" }) }) }) });
|
|
12600
12633
|
}
|
|
12601
12634
|
if (!isFlowInitialized && isLoading) {
|
|
12602
|
-
return /* @__PURE__ */
|
|
12635
|
+
return /* @__PURE__ */ jsx87(Card_default, { className: cx26(className, styles.card), variant, children: /* @__PURE__ */ jsx87(Card_default.Content, { children: /* @__PURE__ */ jsx87("div", { style: { display: "flex", justifyContent: "center", padding: "2rem" }, children: /* @__PURE__ */ jsx87(Spinner_default, { size: "medium" }) }) }) });
|
|
12603
12636
|
}
|
|
12604
12637
|
if (!currentFlow && apiError) {
|
|
12605
|
-
return /* @__PURE__ */
|
|
12606
|
-
/* @__PURE__ */
|
|
12607
|
-
/* @__PURE__ */
|
|
12638
|
+
return /* @__PURE__ */ jsx87(Card_default, { className: cx26(className, styles.card), variant, children: /* @__PURE__ */ jsx87(Card_default.Content, { children: /* @__PURE__ */ jsxs37(Alert_default, { variant: "error", children: [
|
|
12639
|
+
/* @__PURE__ */ jsx87(Alert_default.Title, { children: "Error" }),
|
|
12640
|
+
/* @__PURE__ */ jsx87(Alert_default.Description, { children: apiError.message })
|
|
12608
12641
|
] }) }) });
|
|
12609
12642
|
}
|
|
12610
12643
|
return /* @__PURE__ */ jsxs37(Card_default, { className: cx26(className, styles.card), variant, children: [
|
|
12611
12644
|
(showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs37(Card_default.Header, { className: styles.header, children: [
|
|
12612
|
-
showTitle && title && /* @__PURE__ */
|
|
12613
|
-
showSubtitle && subtitle && /* @__PURE__ */
|
|
12645
|
+
showTitle && title && /* @__PURE__ */ jsx87(Card_default.Title, { level: 2, className: styles.title, children: title }),
|
|
12646
|
+
showSubtitle && subtitle && /* @__PURE__ */ jsx87(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
|
|
12614
12647
|
] }),
|
|
12615
12648
|
/* @__PURE__ */ jsxs37(Card_default.Content, { children: [
|
|
12616
|
-
apiError && /* @__PURE__ */
|
|
12649
|
+
apiError && /* @__PURE__ */ jsx87("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx87(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx87(Alert_default.Description, { children: apiError.message }) }) }),
|
|
12617
12650
|
/* @__PURE__ */ jsxs37("div", { children: [
|
|
12618
|
-
componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */
|
|
12619
|
-
isLoading && /* @__PURE__ */
|
|
12651
|
+
componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderComponents(componentsWithoutHeadings) : !isLoading && /* @__PURE__ */ jsx87(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx87(Typography_default, { variant: "body1", children: "No form components available" }) }),
|
|
12652
|
+
isLoading && /* @__PURE__ */ jsx87("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx87(Spinner_default, { size: "small" }) })
|
|
12620
12653
|
] })
|
|
12621
12654
|
] })
|
|
12622
12655
|
] });
|
|
@@ -12624,7 +12657,7 @@ var BaseInviteUser = ({
|
|
|
12624
12657
|
var BaseInviteUser_default = BaseInviteUser;
|
|
12625
12658
|
|
|
12626
12659
|
// src/components/presentation/auth/InviteUser/v2/InviteUser.tsx
|
|
12627
|
-
import { jsx as
|
|
12660
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
12628
12661
|
var InviteUser = ({
|
|
12629
12662
|
onError,
|
|
12630
12663
|
onFlowChange,
|
|
@@ -12680,7 +12713,7 @@ var InviteUser = ({
|
|
|
12680
12713
|
},
|
|
12681
12714
|
[baseUrl, getAccessToken]
|
|
12682
12715
|
);
|
|
12683
|
-
return /* @__PURE__ */
|
|
12716
|
+
return /* @__PURE__ */ jsx88(
|
|
12684
12717
|
BaseInviteUser_default,
|
|
12685
12718
|
{
|
|
12686
12719
|
onInitialize: handleInitialize,
|
|
@@ -12748,7 +12781,7 @@ var useStyles23 = (theme, colorScheme) => useMemo31(() => {
|
|
|
12748
12781
|
var BaseAcceptInvite_styles_default = useStyles23;
|
|
12749
12782
|
|
|
12750
12783
|
// src/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.tsx
|
|
12751
|
-
import { jsx as
|
|
12784
|
+
import { jsx as jsx89, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
12752
12785
|
var BaseAcceptInvite = ({
|
|
12753
12786
|
executionId,
|
|
12754
12787
|
inviteToken,
|
|
@@ -13074,33 +13107,33 @@ var BaseAcceptInvite = ({
|
|
|
13074
13107
|
values: formValues
|
|
13075
13108
|
};
|
|
13076
13109
|
if (children) {
|
|
13077
|
-
return /* @__PURE__ */
|
|
13110
|
+
return /* @__PURE__ */ jsx89("div", { className, children: children(renderProps) });
|
|
13078
13111
|
}
|
|
13079
13112
|
if (isValidatingToken) {
|
|
13080
|
-
return /* @__PURE__ */
|
|
13081
|
-
/* @__PURE__ */
|
|
13082
|
-
/* @__PURE__ */
|
|
13113
|
+
return /* @__PURE__ */ jsx89(Card_default, { className: cx27(className, styles.card), variant, children: /* @__PURE__ */ jsx89(Card_default.Content, { children: /* @__PURE__ */ jsxs38("div", { style: { alignItems: "center", display: "flex", flexDirection: "column", gap: "1rem", padding: "2rem" }, children: [
|
|
13114
|
+
/* @__PURE__ */ jsx89(Spinner_default, { size: "medium" }),
|
|
13115
|
+
/* @__PURE__ */ jsx89(Typography_default, { variant: "body1", children: "Validating your invite link..." })
|
|
13083
13116
|
] }) }) });
|
|
13084
13117
|
}
|
|
13085
13118
|
if (isTokenInvalid) {
|
|
13086
13119
|
return /* @__PURE__ */ jsxs38(Card_default, { className: cx27(className, styles.card), variant, children: [
|
|
13087
|
-
/* @__PURE__ */
|
|
13120
|
+
/* @__PURE__ */ jsx89(Card_default.Header, { className: styles.header, children: /* @__PURE__ */ jsx89(Card_default.Title, { level: 2, className: styles.title, children: "Invalid Invite Link" }) }),
|
|
13088
13121
|
/* @__PURE__ */ jsxs38(Card_default.Content, { children: [
|
|
13089
13122
|
/* @__PURE__ */ jsxs38(Alert_default, { variant: "error", children: [
|
|
13090
|
-
/* @__PURE__ */
|
|
13091
|
-
/* @__PURE__ */
|
|
13123
|
+
/* @__PURE__ */ jsx89(Alert_default.Title, { children: "Unable to verify invite" }),
|
|
13124
|
+
/* @__PURE__ */ jsx89(Alert_default.Description, { children: apiError?.message || "This invite link is invalid or has expired. Please contact your administrator for a new invite." })
|
|
13092
13125
|
] }),
|
|
13093
|
-
onGoToSignIn && /* @__PURE__ */
|
|
13126
|
+
onGoToSignIn && /* @__PURE__ */ jsx89("div", { style: { display: "flex", justifyContent: "center", marginTop: "1.5rem" }, children: /* @__PURE__ */ jsx89(Button_default, { variant: "outline", onClick: onGoToSignIn, children: "Go to Sign In" }) })
|
|
13094
13127
|
] })
|
|
13095
13128
|
] });
|
|
13096
13129
|
}
|
|
13097
13130
|
return /* @__PURE__ */ jsxs38(Card_default, { className: cx27(className, styles.card), variant, children: [
|
|
13098
13131
|
(showTitle || showSubtitle) && (title || subtitle) && /* @__PURE__ */ jsxs38(Card_default.Header, { className: styles.header, children: [
|
|
13099
|
-
showTitle && title && /* @__PURE__ */
|
|
13100
|
-
showSubtitle && subtitle && /* @__PURE__ */
|
|
13132
|
+
showTitle && title && /* @__PURE__ */ jsx89(Card_default.Title, { level: 2, className: styles.title, children: title }),
|
|
13133
|
+
showSubtitle && subtitle && /* @__PURE__ */ jsx89(Typography_default, { variant: "body1", className: styles.subtitle, children: subtitle })
|
|
13101
13134
|
] }),
|
|
13102
13135
|
/* @__PURE__ */ jsxs38(Card_default.Content, { children: [
|
|
13103
|
-
apiError && /* @__PURE__ */
|
|
13136
|
+
apiError && /* @__PURE__ */ jsx89("div", { style: { marginBottom: "1rem" }, children: /* @__PURE__ */ jsx89(Alert_default, { variant: "error", children: /* @__PURE__ */ jsx89(Alert_default.Description, { children: apiError.message }) }) }),
|
|
13104
13137
|
/* @__PURE__ */ jsxs38("div", { children: [
|
|
13105
13138
|
componentsWithoutHeadings && componentsWithoutHeadings.length > 0 ? renderInviteUserComponents(
|
|
13106
13139
|
componentsWithoutHeadings,
|
|
@@ -13116,13 +13149,13 @@ var BaseAcceptInvite = ({
|
|
|
13116
13149
|
size,
|
|
13117
13150
|
variant
|
|
13118
13151
|
}
|
|
13119
|
-
) : !isLoading && /* @__PURE__ */
|
|
13120
|
-
isLoading && /* @__PURE__ */
|
|
13152
|
+
) : !isLoading && /* @__PURE__ */ jsx89(Alert_default, { variant: "warning", children: /* @__PURE__ */ jsx89(Typography_default, { variant: "body1", children: "No form components available" }) }),
|
|
13153
|
+
isLoading && /* @__PURE__ */ jsx89("div", { style: { display: "flex", justifyContent: "center", padding: "1rem" }, children: /* @__PURE__ */ jsx89(Spinner_default, { size: "small" }) })
|
|
13121
13154
|
] }),
|
|
13122
|
-
onGoToSignIn && /* @__PURE__ */
|
|
13155
|
+
onGoToSignIn && /* @__PURE__ */ jsx89("div", { style: { marginTop: "1.5rem", textAlign: "center" }, children: /* @__PURE__ */ jsxs38(Typography_default, { variant: "body2", children: [
|
|
13123
13156
|
"Already have an account?",
|
|
13124
13157
|
" ",
|
|
13125
|
-
/* @__PURE__ */
|
|
13158
|
+
/* @__PURE__ */ jsx89(Button_default, { variant: "text", onClick: onGoToSignIn, style: { minWidth: "auto", padding: 0 }, children: "Sign In" })
|
|
13126
13159
|
] }) })
|
|
13127
13160
|
] })
|
|
13128
13161
|
] });
|
|
@@ -13130,7 +13163,7 @@ var BaseAcceptInvite = ({
|
|
|
13130
13163
|
var BaseAcceptInvite_default = BaseAcceptInvite;
|
|
13131
13164
|
|
|
13132
13165
|
// src/components/presentation/auth/AcceptInvite/v2/AcceptInvite.tsx
|
|
13133
|
-
import { jsx as
|
|
13166
|
+
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
13134
13167
|
var getUrlParams = () => {
|
|
13135
13168
|
if (typeof window === "undefined") {
|
|
13136
13169
|
return {};
|
|
@@ -13186,7 +13219,7 @@ var AcceptInvite = ({
|
|
|
13186
13219
|
}
|
|
13187
13220
|
return response.json();
|
|
13188
13221
|
};
|
|
13189
|
-
return /* @__PURE__ */
|
|
13222
|
+
return /* @__PURE__ */ jsx90(
|
|
13190
13223
|
BaseAcceptInvite_default,
|
|
13191
13224
|
{
|
|
13192
13225
|
executionId,
|
|
@@ -13297,45 +13330,45 @@ var Callback = ({ onNavigate, onError }) => {
|
|
|
13297
13330
|
};
|
|
13298
13331
|
|
|
13299
13332
|
// src/components/presentation/User/BaseUser.tsx
|
|
13300
|
-
import { Fragment as Fragment18, jsx as
|
|
13333
|
+
import { Fragment as Fragment18, jsx as jsx91 } from "react/jsx-runtime";
|
|
13301
13334
|
var BaseUser = ({ user, children, fallback = null }) => {
|
|
13302
13335
|
if (!user) {
|
|
13303
|
-
return /* @__PURE__ */
|
|
13336
|
+
return /* @__PURE__ */ jsx91(Fragment18, { children: fallback });
|
|
13304
13337
|
}
|
|
13305
|
-
return /* @__PURE__ */
|
|
13338
|
+
return /* @__PURE__ */ jsx91(Fragment18, { children: children(user) });
|
|
13306
13339
|
};
|
|
13307
13340
|
BaseUser.displayName = "BaseUser";
|
|
13308
13341
|
var BaseUser_default = BaseUser;
|
|
13309
13342
|
|
|
13310
13343
|
// src/components/presentation/User/User.tsx
|
|
13311
|
-
import { jsx as
|
|
13344
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
13312
13345
|
var User5 = ({ children, fallback = null }) => {
|
|
13313
13346
|
const { user } = useAsgardeo_default();
|
|
13314
|
-
return /* @__PURE__ */
|
|
13347
|
+
return /* @__PURE__ */ jsx92(BaseUser_default, { user, fallback, children });
|
|
13315
13348
|
};
|
|
13316
13349
|
User5.displayName = "User";
|
|
13317
13350
|
var User_default = User5;
|
|
13318
13351
|
|
|
13319
13352
|
// src/components/presentation/Organization/BaseOrganization.tsx
|
|
13320
|
-
import { Fragment as Fragment19, jsx as
|
|
13353
|
+
import { Fragment as Fragment19, jsx as jsx93 } from "react/jsx-runtime";
|
|
13321
13354
|
var BaseOrganization = ({
|
|
13322
13355
|
children,
|
|
13323
13356
|
fallback = null,
|
|
13324
13357
|
organization
|
|
13325
13358
|
}) => {
|
|
13326
13359
|
if (!organization) {
|
|
13327
|
-
return /* @__PURE__ */
|
|
13360
|
+
return /* @__PURE__ */ jsx93(Fragment19, { children: fallback });
|
|
13328
13361
|
}
|
|
13329
|
-
return /* @__PURE__ */
|
|
13362
|
+
return /* @__PURE__ */ jsx93(Fragment19, { children: children(organization) });
|
|
13330
13363
|
};
|
|
13331
13364
|
BaseOrganization.displayName = "BaseOrganization";
|
|
13332
13365
|
var BaseOrganization_default = BaseOrganization;
|
|
13333
13366
|
|
|
13334
13367
|
// src/components/presentation/Organization/Organization.tsx
|
|
13335
|
-
import { jsx as
|
|
13368
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
13336
13369
|
var Organization5 = ({ children, fallback = null }) => {
|
|
13337
13370
|
const { currentOrganization } = useOrganization_default();
|
|
13338
|
-
return /* @__PURE__ */
|
|
13371
|
+
return /* @__PURE__ */ jsx94(BaseOrganization_default, { organization: currentOrganization, fallback, children });
|
|
13339
13372
|
};
|
|
13340
13373
|
Organization5.displayName = "Organization";
|
|
13341
13374
|
var Organization_default = Organization5;
|
|
@@ -13674,7 +13707,7 @@ var useStyles25 = (theme, colorScheme, size, variant, backgroundColor) => useMem
|
|
|
13674
13707
|
var Avatar_styles_default = useStyles25;
|
|
13675
13708
|
|
|
13676
13709
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
13677
|
-
import { jsx as
|
|
13710
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
13678
13711
|
var Avatar = ({
|
|
13679
13712
|
alt = "User avatar",
|
|
13680
13713
|
background = "random",
|
|
@@ -13721,7 +13754,7 @@ var Avatar = ({
|
|
|
13721
13754
|
const getInitials = (fullName) => fullName.split(" ").map((part) => part[0]).slice(0, 2).join("").toUpperCase();
|
|
13722
13755
|
const renderContent = () => {
|
|
13723
13756
|
if (imageUrl) {
|
|
13724
|
-
return /* @__PURE__ */
|
|
13757
|
+
return /* @__PURE__ */ jsx95(
|
|
13725
13758
|
"img",
|
|
13726
13759
|
{
|
|
13727
13760
|
src: imageUrl,
|
|
@@ -13734,19 +13767,19 @@ var Avatar = ({
|
|
|
13734
13767
|
return getInitials(name);
|
|
13735
13768
|
}
|
|
13736
13769
|
if (isLoading) {
|
|
13737
|
-
return /* @__PURE__ */
|
|
13770
|
+
return /* @__PURE__ */ jsx95("div", { className: cx28(withVendorCSSClassPrefix26(bem18("avatar", "skeleton")), styles["skeleton"]) });
|
|
13738
13771
|
}
|
|
13739
|
-
return /* @__PURE__ */
|
|
13772
|
+
return /* @__PURE__ */ jsx95(
|
|
13740
13773
|
"svg",
|
|
13741
13774
|
{
|
|
13742
13775
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13743
13776
|
viewBox: "0 0 640 640",
|
|
13744
13777
|
className: cx28(withVendorCSSClassPrefix26(bem18("avatar", "icon")), styles["icon"]),
|
|
13745
|
-
children: /* @__PURE__ */
|
|
13778
|
+
children: /* @__PURE__ */ jsx95("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" })
|
|
13746
13779
|
}
|
|
13747
13780
|
);
|
|
13748
13781
|
};
|
|
13749
|
-
return /* @__PURE__ */
|
|
13782
|
+
return /* @__PURE__ */ jsx95(
|
|
13750
13783
|
"div",
|
|
13751
13784
|
{
|
|
13752
13785
|
className: cx28(
|
|
@@ -13779,10 +13812,10 @@ import {
|
|
|
13779
13812
|
} from "@floating-ui/react";
|
|
13780
13813
|
import {
|
|
13781
13814
|
cloneElement as cloneElement2,
|
|
13782
|
-
createContext as
|
|
13815
|
+
createContext as createContext12,
|
|
13783
13816
|
forwardRef as forwardRef10,
|
|
13784
13817
|
isValidElement,
|
|
13785
|
-
useContext as
|
|
13818
|
+
useContext as useContext12,
|
|
13786
13819
|
useLayoutEffect,
|
|
13787
13820
|
useMemo as useMemo37,
|
|
13788
13821
|
useState as useState25
|
|
@@ -13853,7 +13886,7 @@ var useStyles26 = (theme, colorScheme) => useMemo36(() => {
|
|
|
13853
13886
|
var Dialog_styles_default = useStyles26;
|
|
13854
13887
|
|
|
13855
13888
|
// src/components/primitives/Icons/LogOut.tsx
|
|
13856
|
-
import { jsx as
|
|
13889
|
+
import { jsx as jsx96, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
13857
13890
|
var LogOut = (props) => /* @__PURE__ */ jsxs39(
|
|
13858
13891
|
"svg",
|
|
13859
13892
|
{
|
|
@@ -13868,16 +13901,16 @@ var LogOut = (props) => /* @__PURE__ */ jsxs39(
|
|
|
13868
13901
|
strokeLinejoin: "round",
|
|
13869
13902
|
...props,
|
|
13870
13903
|
children: [
|
|
13871
|
-
/* @__PURE__ */
|
|
13872
|
-
/* @__PURE__ */
|
|
13873
|
-
/* @__PURE__ */
|
|
13904
|
+
/* @__PURE__ */ jsx96("path", { d: "m16 17 5-5-5-5" }),
|
|
13905
|
+
/* @__PURE__ */ jsx96("path", { d: "M21 12H9" }),
|
|
13906
|
+
/* @__PURE__ */ jsx96("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" })
|
|
13874
13907
|
]
|
|
13875
13908
|
}
|
|
13876
13909
|
);
|
|
13877
13910
|
var LogOut_default = LogOut;
|
|
13878
13911
|
|
|
13879
13912
|
// src/components/primitives/Icons/Plus.tsx
|
|
13880
|
-
import { jsx as
|
|
13913
|
+
import { jsx as jsx97, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
13881
13914
|
var Plus = (props) => /* @__PURE__ */ jsxs40(
|
|
13882
13915
|
"svg",
|
|
13883
13916
|
{
|
|
@@ -13892,15 +13925,15 @@ var Plus = (props) => /* @__PURE__ */ jsxs40(
|
|
|
13892
13925
|
strokeLinejoin: "round",
|
|
13893
13926
|
...props,
|
|
13894
13927
|
children: [
|
|
13895
|
-
/* @__PURE__ */
|
|
13896
|
-
/* @__PURE__ */
|
|
13928
|
+
/* @__PURE__ */ jsx97("path", { d: "M5 12h14" }),
|
|
13929
|
+
/* @__PURE__ */ jsx97("path", { d: "M12 5v14" })
|
|
13897
13930
|
]
|
|
13898
13931
|
}
|
|
13899
13932
|
);
|
|
13900
13933
|
var Plus_default = Plus;
|
|
13901
13934
|
|
|
13902
13935
|
// src/components/primitives/Icons/User.tsx
|
|
13903
|
-
import { jsx as
|
|
13936
|
+
import { jsx as jsx98, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
13904
13937
|
var User7 = (props) => /* @__PURE__ */ jsxs41(
|
|
13905
13938
|
"svg",
|
|
13906
13939
|
{
|
|
@@ -13915,15 +13948,15 @@ var User7 = (props) => /* @__PURE__ */ jsxs41(
|
|
|
13915
13948
|
strokeLinejoin: "round",
|
|
13916
13949
|
...props,
|
|
13917
13950
|
children: [
|
|
13918
|
-
/* @__PURE__ */
|
|
13919
|
-
/* @__PURE__ */
|
|
13951
|
+
/* @__PURE__ */ jsx98("path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" }),
|
|
13952
|
+
/* @__PURE__ */ jsx98("circle", { cx: "12", cy: "7", r: "4" })
|
|
13920
13953
|
]
|
|
13921
13954
|
}
|
|
13922
13955
|
);
|
|
13923
13956
|
var User_default2 = User7;
|
|
13924
13957
|
|
|
13925
13958
|
// src/components/primitives/Icons/X.tsx
|
|
13926
|
-
import { jsx as
|
|
13959
|
+
import { jsx as jsx99, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
13927
13960
|
var X = (props) => /* @__PURE__ */ jsxs42(
|
|
13928
13961
|
"svg",
|
|
13929
13962
|
{
|
|
@@ -13938,15 +13971,15 @@ var X = (props) => /* @__PURE__ */ jsxs42(
|
|
|
13938
13971
|
strokeLinejoin: "round",
|
|
13939
13972
|
...props,
|
|
13940
13973
|
children: [
|
|
13941
|
-
/* @__PURE__ */
|
|
13942
|
-
/* @__PURE__ */
|
|
13974
|
+
/* @__PURE__ */ jsx99("path", { d: "M18 6 6 18" }),
|
|
13975
|
+
/* @__PURE__ */ jsx99("path", { d: "m6 6 12 12" })
|
|
13943
13976
|
]
|
|
13944
13977
|
}
|
|
13945
13978
|
);
|
|
13946
13979
|
var X_default = X;
|
|
13947
13980
|
|
|
13948
13981
|
// src/components/primitives/Dialog/Dialog.tsx
|
|
13949
|
-
import { jsx as
|
|
13982
|
+
import { jsx as jsx100, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
13950
13983
|
function useDialog({
|
|
13951
13984
|
initialOpen = false,
|
|
13952
13985
|
open: controlledOpen,
|
|
@@ -13982,9 +14015,9 @@ function useDialog({
|
|
|
13982
14015
|
[open, setOpen, interactions, data, labelId, descriptionId]
|
|
13983
14016
|
);
|
|
13984
14017
|
}
|
|
13985
|
-
var DialogContext =
|
|
14018
|
+
var DialogContext = createContext12(null);
|
|
13986
14019
|
var useDialogContext = () => {
|
|
13987
|
-
const context =
|
|
14020
|
+
const context = useContext12(DialogContext);
|
|
13988
14021
|
if (context == null) {
|
|
13989
14022
|
throw new Error("Dialog components must be wrapped in <Dialog />");
|
|
13990
14023
|
}
|
|
@@ -13992,7 +14025,7 @@ var useDialogContext = () => {
|
|
|
13992
14025
|
};
|
|
13993
14026
|
function Dialog({ children, ...options }) {
|
|
13994
14027
|
const dialog = useDialog(options);
|
|
13995
|
-
return /* @__PURE__ */
|
|
14028
|
+
return /* @__PURE__ */ jsx100(DialogContext.Provider, { value: dialog, children });
|
|
13996
14029
|
}
|
|
13997
14030
|
var DialogTrigger = forwardRef10(
|
|
13998
14031
|
({ children, asChild = false, ...props }, propRef) => {
|
|
@@ -14010,7 +14043,7 @@ var DialogTrigger = forwardRef10(
|
|
|
14010
14043
|
})
|
|
14011
14044
|
);
|
|
14012
14045
|
}
|
|
14013
|
-
return /* @__PURE__ */
|
|
14046
|
+
return /* @__PURE__ */ jsx100("button", { ref, "data-state": context.open ? "open" : "closed", ...context.getReferenceProps(props), children });
|
|
14014
14047
|
}
|
|
14015
14048
|
);
|
|
14016
14049
|
var DialogContent = forwardRef10(
|
|
@@ -14020,12 +14053,12 @@ var DialogContent = forwardRef10(
|
|
|
14020
14053
|
const styles = Dialog_styles_default(theme, colorScheme);
|
|
14021
14054
|
const ref = useMergeRefs([context.refs.setFloating, propRef]);
|
|
14022
14055
|
if (!floatingContext.open) return null;
|
|
14023
|
-
return /* @__PURE__ */
|
|
14056
|
+
return /* @__PURE__ */ jsx100(FloatingPortal, { children: /* @__PURE__ */ jsx100(
|
|
14024
14057
|
FloatingOverlay,
|
|
14025
14058
|
{
|
|
14026
14059
|
className: cx29(withVendorCSSClassPrefix27(bem19("dialog", "overlay")), styles["overlay"]),
|
|
14027
14060
|
lockScroll: true,
|
|
14028
|
-
children: /* @__PURE__ */
|
|
14061
|
+
children: /* @__PURE__ */ jsx100(FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ jsx100(
|
|
14029
14062
|
"div",
|
|
14030
14063
|
{
|
|
14031
14064
|
ref,
|
|
@@ -14053,7 +14086,7 @@ var DialogHeading = forwardRef10(
|
|
|
14053
14086
|
};
|
|
14054
14087
|
}, [id, context.setLabelId]);
|
|
14055
14088
|
return /* @__PURE__ */ jsxs43("div", { className: cx29(withVendorCSSClassPrefix27(bem19("dialog", "header")), styles["header"]), children: [
|
|
14056
|
-
/* @__PURE__ */
|
|
14089
|
+
/* @__PURE__ */ jsx100(
|
|
14057
14090
|
"h2",
|
|
14058
14091
|
{
|
|
14059
14092
|
...props,
|
|
@@ -14063,7 +14096,7 @@ var DialogHeading = forwardRef10(
|
|
|
14063
14096
|
children
|
|
14064
14097
|
}
|
|
14065
14098
|
),
|
|
14066
|
-
/* @__PURE__ */
|
|
14099
|
+
/* @__PURE__ */ jsx100(
|
|
14067
14100
|
Button_default,
|
|
14068
14101
|
{
|
|
14069
14102
|
color: "tertiary",
|
|
@@ -14074,7 +14107,7 @@ var DialogHeading = forwardRef10(
|
|
|
14074
14107
|
context.setOpen(false);
|
|
14075
14108
|
},
|
|
14076
14109
|
"aria-label": "Close",
|
|
14077
|
-
children: /* @__PURE__ */
|
|
14110
|
+
children: /* @__PURE__ */ jsx100(X_default, { width: 16, height: 16 })
|
|
14078
14111
|
}
|
|
14079
14112
|
)
|
|
14080
14113
|
] });
|
|
@@ -14092,7 +14125,7 @@ var DialogDescription = forwardRef10(
|
|
|
14092
14125
|
context.setDescriptionId(void 0);
|
|
14093
14126
|
};
|
|
14094
14127
|
}, [id, context.setDescriptionId]);
|
|
14095
|
-
return /* @__PURE__ */
|
|
14128
|
+
return /* @__PURE__ */ jsx100(
|
|
14096
14129
|
"p",
|
|
14097
14130
|
{
|
|
14098
14131
|
...props,
|
|
@@ -14121,7 +14154,7 @@ var DialogClose = forwardRef10(
|
|
|
14121
14154
|
onClick: handleClick
|
|
14122
14155
|
});
|
|
14123
14156
|
}
|
|
14124
|
-
return /* @__PURE__ */
|
|
14157
|
+
return /* @__PURE__ */ jsx100(
|
|
14125
14158
|
Button_default,
|
|
14126
14159
|
{
|
|
14127
14160
|
...props,
|
|
@@ -14244,7 +14277,7 @@ var useStyles27 = (theme, colorScheme, disabled, hasError, canAddMore, canRemove
|
|
|
14244
14277
|
var MultiInput_styles_default = useStyles27;
|
|
14245
14278
|
|
|
14246
14279
|
// src/components/primitives/MultiInput/MultiInput.tsx
|
|
14247
|
-
import { jsx as
|
|
14280
|
+
import { jsx as jsx101, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
14248
14281
|
var MultiInput = ({
|
|
14249
14282
|
label,
|
|
14250
14283
|
error,
|
|
@@ -14267,8 +14300,8 @@ var MultiInput = ({
|
|
|
14267
14300
|
const canAddMore = !maxFields || values.length < maxFields;
|
|
14268
14301
|
const canRemove = values.length > minFields;
|
|
14269
14302
|
const styles = MultiInput_styles_default(theme, colorScheme, !!disabled, !!error, canAddMore, canRemove);
|
|
14270
|
-
const PlusIcon = ({ iconClassName }) => /* @__PURE__ */
|
|
14271
|
-
const BinIcon = ({ iconClassName }) => /* @__PURE__ */
|
|
14303
|
+
const PlusIcon = ({ iconClassName }) => /* @__PURE__ */ jsx101("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx30(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx101("path", { d: "M12 5v14M5 12h14" }) });
|
|
14304
|
+
const BinIcon = ({ iconClassName }) => /* @__PURE__ */ jsx101("svg", { width: "16", height: "16", viewBox: "0 0 24 24", className: cx30(styles["icon"], iconClassName), children: /* @__PURE__ */ jsx101("path", { d: "M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14ZM10 11v6M14 11v6" }) });
|
|
14272
14305
|
const handleAddValue = useCallback19(
|
|
14273
14306
|
(newValue) => {
|
|
14274
14307
|
if (newValue.trim() !== "" && (!maxFields || values.length < maxFields)) {
|
|
@@ -14312,9 +14345,9 @@ var MultiInput = ({
|
|
|
14312
14345
|
};
|
|
14313
14346
|
switch (fieldType) {
|
|
14314
14347
|
case "DATE_TIME":
|
|
14315
|
-
return /* @__PURE__ */
|
|
14348
|
+
return /* @__PURE__ */ jsx101(DatePicker_default, { ...commonProps });
|
|
14316
14349
|
case "BOOLEAN":
|
|
14317
|
-
return /* @__PURE__ */
|
|
14350
|
+
return /* @__PURE__ */ jsx101(
|
|
14318
14351
|
Checkbox_default,
|
|
14319
14352
|
{
|
|
14320
14353
|
...commonProps,
|
|
@@ -14323,7 +14356,7 @@ var MultiInput = ({
|
|
|
14323
14356
|
}
|
|
14324
14357
|
);
|
|
14325
14358
|
default:
|
|
14326
|
-
return /* @__PURE__ */
|
|
14359
|
+
return /* @__PURE__ */ jsx101(TextField_default, { ...commonProps, type });
|
|
14327
14360
|
}
|
|
14328
14361
|
},
|
|
14329
14362
|
[placeholder, disabled, startIcon, endIcon, error, fieldType, type]
|
|
@@ -14343,27 +14376,27 @@ var MultiInput = ({
|
|
|
14343
14376
|
className: cx30(withVendorCSSClassPrefix28(bem20("multi-input")), className),
|
|
14344
14377
|
style,
|
|
14345
14378
|
children: [
|
|
14346
|
-
label && /* @__PURE__ */
|
|
14379
|
+
label && /* @__PURE__ */ jsx101(InputLabel_default, { required, error: !!error, children: label }),
|
|
14347
14380
|
/* @__PURE__ */ jsxs44("div", { className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "container")), styles["container"]), children: [
|
|
14348
|
-
/* @__PURE__ */
|
|
14381
|
+
/* @__PURE__ */ jsx101("div", { className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ jsx101("div", { className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
|
|
14349
14382
|
currentInputValue,
|
|
14350
14383
|
setCurrentInputValue,
|
|
14351
|
-
canAddMore ? /* @__PURE__ */
|
|
14384
|
+
canAddMore ? /* @__PURE__ */ jsx101(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
|
|
14352
14385
|
canAddMore ? handleInputSubmit : void 0
|
|
14353
14386
|
) }) }),
|
|
14354
|
-
values.length > 0 && /* @__PURE__ */
|
|
14387
|
+
values.length > 0 && /* @__PURE__ */ jsx101("div", { className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ jsxs44(
|
|
14355
14388
|
"div",
|
|
14356
14389
|
{
|
|
14357
14390
|
className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "list-item")), styles["listItem"]),
|
|
14358
14391
|
children: [
|
|
14359
|
-
/* @__PURE__ */
|
|
14392
|
+
/* @__PURE__ */ jsx101(
|
|
14360
14393
|
"span",
|
|
14361
14394
|
{
|
|
14362
14395
|
className: cx30(withVendorCSSClassPrefix28(bem20("multi-input", "list-item-text")), styles["listItemText"]),
|
|
14363
14396
|
children: value
|
|
14364
14397
|
}
|
|
14365
14398
|
),
|
|
14366
|
-
canRemove && /* @__PURE__ */
|
|
14399
|
+
canRemove && /* @__PURE__ */ jsx101(
|
|
14367
14400
|
"button",
|
|
14368
14401
|
{
|
|
14369
14402
|
type: "button",
|
|
@@ -14374,7 +14407,7 @@ var MultiInput = ({
|
|
|
14374
14407
|
styles["removeButton"]
|
|
14375
14408
|
),
|
|
14376
14409
|
title: "Remove value",
|
|
14377
|
-
children: /* @__PURE__ */
|
|
14410
|
+
children: /* @__PURE__ */ jsx101(BinIcon, { iconClassName: styles["icon"] })
|
|
14378
14411
|
}
|
|
14379
14412
|
)
|
|
14380
14413
|
]
|
|
@@ -14389,7 +14422,7 @@ var MultiInput = ({
|
|
|
14389
14422
|
var MultiInput_default = MultiInput;
|
|
14390
14423
|
|
|
14391
14424
|
// src/components/presentation/UserProfile/BaseUserProfile.tsx
|
|
14392
|
-
import { Fragment as Fragment20, jsx as
|
|
14425
|
+
import { Fragment as Fragment20, jsx as jsx102, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
14393
14426
|
var fieldsToSkip = [
|
|
14394
14427
|
"roles.default",
|
|
14395
14428
|
"active",
|
|
@@ -14451,7 +14484,7 @@ var BaseUserProfile = ({
|
|
|
14451
14484
|
},
|
|
14452
14485
|
[showFields, hideFields]
|
|
14453
14486
|
);
|
|
14454
|
-
const PencilIcon = () => /* @__PURE__ */
|
|
14487
|
+
const PencilIcon = () => /* @__PURE__ */ jsx102(
|
|
14455
14488
|
"svg",
|
|
14456
14489
|
{
|
|
14457
14490
|
width: "16",
|
|
@@ -14462,7 +14495,7 @@ var BaseUserProfile = ({
|
|
|
14462
14495
|
strokeWidth: "2",
|
|
14463
14496
|
strokeLinecap: "round",
|
|
14464
14497
|
strokeLinejoin: "round",
|
|
14465
|
-
children: /* @__PURE__ */
|
|
14498
|
+
children: /* @__PURE__ */ jsx102("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
|
|
14466
14499
|
}
|
|
14467
14500
|
);
|
|
14468
14501
|
const toggleFieldEdit = useCallback20((fieldName) => {
|
|
@@ -14492,12 +14525,12 @@ var BaseUserProfile = ({
|
|
|
14492
14525
|
const styles = BaseUserProfile_styles_default(theme, colorScheme);
|
|
14493
14526
|
const ObjectDisplay = ({ data }) => {
|
|
14494
14527
|
if (!data || typeof data !== "object") return null;
|
|
14495
|
-
return /* @__PURE__ */
|
|
14496
|
-
/* @__PURE__ */
|
|
14528
|
+
return /* @__PURE__ */ jsx102("table", { className: styles.value, children: /* @__PURE__ */ jsx102("tbody", { children: Object.entries(data).map(([key, value]) => /* @__PURE__ */ jsxs45("tr", { children: [
|
|
14529
|
+
/* @__PURE__ */ jsx102("td", { className: styles.objectKey, children: /* @__PURE__ */ jsxs45("strong", { children: [
|
|
14497
14530
|
formatLabel(key),
|
|
14498
14531
|
":"
|
|
14499
14532
|
] }) }),
|
|
14500
|
-
/* @__PURE__ */
|
|
14533
|
+
/* @__PURE__ */ jsx102("td", { className: styles.objectValue, children: typeof value === "object" ? /* @__PURE__ */ jsx102(ObjectDisplay, { data: value }) : String(value) })
|
|
14501
14534
|
] }, key)) }) });
|
|
14502
14535
|
};
|
|
14503
14536
|
function set(obj, path, value) {
|
|
@@ -14572,7 +14605,7 @@ var BaseUserProfile = ({
|
|
|
14572
14605
|
const { value, displayName, description, name, type, required, mutability, subAttributes, multiValued } = schema;
|
|
14573
14606
|
const label = displayName || description || name || "";
|
|
14574
14607
|
if (subAttributes && Array.isArray(subAttributes)) {
|
|
14575
|
-
return /* @__PURE__ */
|
|
14608
|
+
return /* @__PURE__ */ jsx102(Fragment20, { children: subAttributes.map((subAttr, index) => {
|
|
14576
14609
|
let displayValue2;
|
|
14577
14610
|
if (Array.isArray(subAttr.value)) {
|
|
14578
14611
|
displayValue2 = subAttr.value.map((item) => typeof item === "object" ? JSON.stringify(item) : String(item)).join(", ");
|
|
@@ -14582,8 +14615,8 @@ var BaseUserProfile = ({
|
|
|
14582
14615
|
displayValue2 = String(subAttr.value);
|
|
14583
14616
|
}
|
|
14584
14617
|
return /* @__PURE__ */ jsxs45("div", { className: styles.field, children: [
|
|
14585
|
-
/* @__PURE__ */
|
|
14586
|
-
/* @__PURE__ */
|
|
14618
|
+
/* @__PURE__ */ jsx102("span", { className: styles.label, children: subAttr.displayName || subAttr.description || "" }),
|
|
14619
|
+
/* @__PURE__ */ jsx102("div", { className: styles.value, children: displayValue2 })
|
|
14587
14620
|
] }, index);
|
|
14588
14621
|
}) });
|
|
14589
14622
|
}
|
|
@@ -14608,8 +14641,8 @@ var BaseUserProfile = ({
|
|
|
14608
14641
|
fieldValues = [];
|
|
14609
14642
|
}
|
|
14610
14643
|
return /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14611
|
-
/* @__PURE__ */
|
|
14612
|
-
/* @__PURE__ */
|
|
14644
|
+
/* @__PURE__ */ jsx102("span", { className: styles.label, children: label }),
|
|
14645
|
+
/* @__PURE__ */ jsx102("div", { className: styles.value, children: /* @__PURE__ */ jsx102(
|
|
14613
14646
|
MultiInput_default,
|
|
14614
14647
|
{
|
|
14615
14648
|
values: fieldValues,
|
|
@@ -14641,8 +14674,8 @@ var BaseUserProfile = ({
|
|
|
14641
14674
|
displayValue2 = "-";
|
|
14642
14675
|
}
|
|
14643
14676
|
return /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14644
|
-
/* @__PURE__ */
|
|
14645
|
-
/* @__PURE__ */
|
|
14677
|
+
/* @__PURE__ */ jsx102("span", { className: styles.label, children: label }),
|
|
14678
|
+
/* @__PURE__ */ jsx102("div", { className: cx31(styles.value, !hasValues ? styles.valuePlaceholder : ""), children: !hasValues && isEditable2 && onStartEdit ? /* @__PURE__ */ jsx102(
|
|
14646
14679
|
Button_default,
|
|
14647
14680
|
{
|
|
14648
14681
|
onClick: onStartEdit,
|
|
@@ -14657,7 +14690,7 @@ var BaseUserProfile = ({
|
|
|
14657
14690
|
] });
|
|
14658
14691
|
}
|
|
14659
14692
|
if (type === "COMPLEX" && typeof value === "object") {
|
|
14660
|
-
return /* @__PURE__ */
|
|
14693
|
+
return /* @__PURE__ */ jsx102(ObjectDisplay, { data: value });
|
|
14661
14694
|
}
|
|
14662
14695
|
if (isEditing && onEditValue && mutability !== "READ_ONLY" && !readonlyFields.includes(name || "")) {
|
|
14663
14696
|
let fieldValue;
|
|
@@ -14679,13 +14712,13 @@ var BaseUserProfile = ({
|
|
|
14679
14712
|
let field;
|
|
14680
14713
|
switch (type) {
|
|
14681
14714
|
case "STRING":
|
|
14682
|
-
field = /* @__PURE__ */
|
|
14715
|
+
field = /* @__PURE__ */ jsx102(TextField_default, { ...commonProps });
|
|
14683
14716
|
break;
|
|
14684
14717
|
case "DATE_TIME":
|
|
14685
|
-
field = /* @__PURE__ */
|
|
14718
|
+
field = /* @__PURE__ */ jsx102(DatePicker_default, { ...commonProps });
|
|
14686
14719
|
break;
|
|
14687
14720
|
case "BOOLEAN":
|
|
14688
|
-
field = /* @__PURE__ */
|
|
14721
|
+
field = /* @__PURE__ */ jsx102(
|
|
14689
14722
|
Checkbox_default,
|
|
14690
14723
|
{
|
|
14691
14724
|
...commonProps,
|
|
@@ -14697,7 +14730,7 @@ var BaseUserProfile = ({
|
|
|
14697
14730
|
);
|
|
14698
14731
|
break;
|
|
14699
14732
|
case "COMPLEX":
|
|
14700
|
-
field = /* @__PURE__ */
|
|
14733
|
+
field = /* @__PURE__ */ jsx102(
|
|
14701
14734
|
"textarea",
|
|
14702
14735
|
{
|
|
14703
14736
|
value: fieldValue,
|
|
@@ -14709,11 +14742,11 @@ var BaseUserProfile = ({
|
|
|
14709
14742
|
);
|
|
14710
14743
|
break;
|
|
14711
14744
|
default:
|
|
14712
|
-
field = /* @__PURE__ */
|
|
14745
|
+
field = /* @__PURE__ */ jsx102(TextField_default, { ...commonProps });
|
|
14713
14746
|
}
|
|
14714
14747
|
return /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14715
|
-
/* @__PURE__ */
|
|
14716
|
-
/* @__PURE__ */
|
|
14748
|
+
/* @__PURE__ */ jsx102("span", { className: styles.label, children: label }),
|
|
14749
|
+
/* @__PURE__ */ jsx102("div", { className: styles.value, children: field })
|
|
14717
14750
|
] });
|
|
14718
14751
|
}
|
|
14719
14752
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
@@ -14727,8 +14760,8 @@ var BaseUserProfile = ({
|
|
|
14727
14760
|
displayValue = "-";
|
|
14728
14761
|
}
|
|
14729
14762
|
return /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14730
|
-
/* @__PURE__ */
|
|
14731
|
-
/* @__PURE__ */
|
|
14763
|
+
/* @__PURE__ */ jsx102("span", { className: styles.label, children: label }),
|
|
14764
|
+
/* @__PURE__ */ jsx102("div", { className: cx31(styles.value, !hasValue ? styles.valuePlaceholder : ""), children: !hasValue && isEditable && onStartEdit ? /* @__PURE__ */ jsx102(
|
|
14732
14765
|
Button_default,
|
|
14733
14766
|
{
|
|
14734
14767
|
onClick: onStartEdit,
|
|
@@ -14752,7 +14785,7 @@ var BaseUserProfile = ({
|
|
|
14752
14785
|
return null;
|
|
14753
14786
|
}
|
|
14754
14787
|
return /* @__PURE__ */ jsxs45("div", { className: styles.field, children: [
|
|
14755
|
-
/* @__PURE__ */
|
|
14788
|
+
/* @__PURE__ */ jsx102("div", { className: styles.fieldInner, children: renderSchemaField(
|
|
14756
14789
|
schema,
|
|
14757
14790
|
isFieldEditing,
|
|
14758
14791
|
(value) => {
|
|
@@ -14764,8 +14797,8 @@ var BaseUserProfile = ({
|
|
|
14764
14797
|
) }),
|
|
14765
14798
|
editable && schema.mutability !== "READ_ONLY" && !isReadonlyField && /* @__PURE__ */ jsxs45("div", { className: styles.fieldActions, children: [
|
|
14766
14799
|
isFieldEditing && /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14767
|
-
/* @__PURE__ */
|
|
14768
|
-
/* @__PURE__ */
|
|
14800
|
+
/* @__PURE__ */ jsx102(Button_default, { size: "small", color: "primary", variant: "solid", onClick: () => handleFieldSave(schema), children: "Save" }),
|
|
14801
|
+
/* @__PURE__ */ jsx102(
|
|
14769
14802
|
Button_default,
|
|
14770
14803
|
{
|
|
14771
14804
|
size: "small",
|
|
@@ -14776,7 +14809,7 @@ var BaseUserProfile = ({
|
|
|
14776
14809
|
}
|
|
14777
14810
|
)
|
|
14778
14811
|
] }),
|
|
14779
|
-
!isFieldEditing && hasValue && /* @__PURE__ */
|
|
14812
|
+
!isFieldEditing && hasValue && /* @__PURE__ */ jsx102(
|
|
14780
14813
|
Button_default,
|
|
14781
14814
|
{
|
|
14782
14815
|
size: "small",
|
|
@@ -14785,7 +14818,7 @@ var BaseUserProfile = ({
|
|
|
14785
14818
|
onClick: () => toggleFieldEdit(schema.name),
|
|
14786
14819
|
title: "Edit",
|
|
14787
14820
|
className: styles.editButton,
|
|
14788
|
-
children: /* @__PURE__ */
|
|
14821
|
+
children: /* @__PURE__ */ jsx102(PencilIcon, {})
|
|
14789
14822
|
}
|
|
14790
14823
|
)
|
|
14791
14824
|
] })
|
|
@@ -14810,7 +14843,7 @@ var BaseUserProfile = ({
|
|
|
14810
14843
|
}).sort(([a], [b]) => a.localeCompare(b));
|
|
14811
14844
|
return /* @__PURE__ */ jsxs45(Fragment20, { children: [
|
|
14812
14845
|
/* @__PURE__ */ jsxs45("div", { className: styles.profileSummary, children: [
|
|
14813
|
-
/* @__PURE__ */
|
|
14846
|
+
/* @__PURE__ */ jsx102(
|
|
14814
14847
|
Avatar,
|
|
14815
14848
|
{
|
|
14816
14849
|
imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
|
|
@@ -14820,16 +14853,16 @@ var BaseUserProfile = ({
|
|
|
14820
14853
|
isLoading
|
|
14821
14854
|
}
|
|
14822
14855
|
),
|
|
14823
|
-
/* @__PURE__ */
|
|
14824
|
-
getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */
|
|
14856
|
+
/* @__PURE__ */ jsx102(Typography_default, { variant: "h3", fontWeight: "medium", children: displayName }),
|
|
14857
|
+
getMappedUserProfileValue_default("email", mergedMappings, currentUser) && /* @__PURE__ */ jsx102(Typography_default, { variant: "body2", color: "textSecondary", children: getMappedUserProfileValue_default("email", mergedMappings, currentUser) })
|
|
14825
14858
|
] }),
|
|
14826
|
-
/* @__PURE__ */
|
|
14859
|
+
/* @__PURE__ */ jsx102(Divider_default, {}),
|
|
14827
14860
|
profileEntries.map(([key, value], index) => /* @__PURE__ */ jsxs45("div", { children: [
|
|
14828
14861
|
/* @__PURE__ */ jsxs45("div", { className: styles.sectionRow, children: [
|
|
14829
|
-
/* @__PURE__ */
|
|
14830
|
-
/* @__PURE__ */
|
|
14862
|
+
/* @__PURE__ */ jsx102("div", { className: styles.sectionLabel, children: formatLabel(key) }),
|
|
14863
|
+
/* @__PURE__ */ jsx102("div", { className: styles.sectionValue, children: typeof value === "object" ? /* @__PURE__ */ jsx102(ObjectDisplay, { data: value }) : String(value) })
|
|
14831
14864
|
] }),
|
|
14832
|
-
index < profileEntries.length - 1 && /* @__PURE__ */
|
|
14865
|
+
index < profileEntries.length - 1 && /* @__PURE__ */ jsx102(Divider_default, {})
|
|
14833
14866
|
] }, key))
|
|
14834
14867
|
] });
|
|
14835
14868
|
};
|
|
@@ -14840,12 +14873,12 @@ var BaseUserProfile = ({
|
|
|
14840
14873
|
variant: "error",
|
|
14841
14874
|
className: cx31(withVendorCSSClassPrefix29(bem21("user-profile", "alert")), styles.alert),
|
|
14842
14875
|
children: [
|
|
14843
|
-
/* @__PURE__ */
|
|
14844
|
-
/* @__PURE__ */
|
|
14876
|
+
/* @__PURE__ */ jsx102(Alert_default.Title, { children: t("errors.heading") || "Error" }),
|
|
14877
|
+
/* @__PURE__ */ jsx102(Alert_default.Description, { children: error })
|
|
14845
14878
|
]
|
|
14846
14879
|
}
|
|
14847
14880
|
),
|
|
14848
|
-
schemas && schemas.length > 0 && /* @__PURE__ */
|
|
14881
|
+
schemas && schemas.length > 0 && /* @__PURE__ */ jsx102("div", { className: styles.header, children: /* @__PURE__ */ jsx102(
|
|
14849
14882
|
Avatar,
|
|
14850
14883
|
{
|
|
14851
14884
|
imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, currentUser),
|
|
@@ -14855,7 +14888,7 @@ var BaseUserProfile = ({
|
|
|
14855
14888
|
isLoading
|
|
14856
14889
|
}
|
|
14857
14890
|
) }),
|
|
14858
|
-
/* @__PURE__ */
|
|
14891
|
+
/* @__PURE__ */ jsx102("div", { className: styles.infoContainer, children: schemas && schemas.length > 0 ? schemas.filter((schema) => {
|
|
14859
14892
|
if (!schema.name || !shouldShowField(schema.name)) return false;
|
|
14860
14893
|
if (!editable) {
|
|
14861
14894
|
const value = flattenedProfile && schema.name ? flattenedProfile[schema.name] : void 0;
|
|
@@ -14872,13 +14905,13 @@ var BaseUserProfile = ({
|
|
|
14872
14905
|
...schema,
|
|
14873
14906
|
value
|
|
14874
14907
|
};
|
|
14875
|
-
return /* @__PURE__ */
|
|
14908
|
+
return /* @__PURE__ */ jsx102("div", { className: styles.info, children: renderUserInfo(schemaWithValue) }, schema.name || index);
|
|
14876
14909
|
}) : renderProfileWithoutSchemas() })
|
|
14877
14910
|
] });
|
|
14878
14911
|
if (mode === "popup") {
|
|
14879
|
-
return /* @__PURE__ */
|
|
14880
|
-
/* @__PURE__ */
|
|
14881
|
-
/* @__PURE__ */
|
|
14912
|
+
return /* @__PURE__ */ jsx102(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs45(Dialog_default.Content, { children: [
|
|
14913
|
+
/* @__PURE__ */ jsx102(Dialog_default.Heading, { children: title ?? t("user.profile.heading") }),
|
|
14914
|
+
/* @__PURE__ */ jsx102("div", { className: styles.popup, children: profileContent })
|
|
14882
14915
|
] }) });
|
|
14883
14916
|
}
|
|
14884
14917
|
return profileContent;
|
|
@@ -14920,7 +14953,7 @@ var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
|
|
|
14920
14953
|
var updateMeProfile_default = updateMeProfile;
|
|
14921
14954
|
|
|
14922
14955
|
// src/components/presentation/UserProfile/UserProfile.tsx
|
|
14923
|
-
import { jsx as
|
|
14956
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
14924
14957
|
var UserProfile3 = ({ preferences, ...rest }) => {
|
|
14925
14958
|
const { baseUrl, instanceId } = useAsgardeo_default();
|
|
14926
14959
|
const { profile, flattenedProfile, schemas, onUpdateProfile } = useUser_default();
|
|
@@ -14939,7 +14972,7 @@ var UserProfile3 = ({ preferences, ...rest }) => {
|
|
|
14939
14972
|
setError(message);
|
|
14940
14973
|
}
|
|
14941
14974
|
};
|
|
14942
|
-
return /* @__PURE__ */
|
|
14975
|
+
return /* @__PURE__ */ jsx103(
|
|
14943
14976
|
BaseUserProfile_default,
|
|
14944
14977
|
{
|
|
14945
14978
|
profile,
|
|
@@ -15162,7 +15195,7 @@ var useStyles28 = (theme, colorScheme) => useMemo39(() => {
|
|
|
15162
15195
|
var BaseUserDropdown_styles_default = useStyles28;
|
|
15163
15196
|
|
|
15164
15197
|
// src/components/presentation/UserDropdown/BaseUserDropdown.tsx
|
|
15165
|
-
import { jsx as
|
|
15198
|
+
import { jsx as jsx104, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15166
15199
|
var BaseUserDropdown = ({
|
|
15167
15200
|
fallback = null,
|
|
15168
15201
|
className = "",
|
|
@@ -15214,14 +15247,14 @@ var BaseUserDropdown = ({
|
|
|
15214
15247
|
const defaultMenuItems = [];
|
|
15215
15248
|
if (onManageProfile) {
|
|
15216
15249
|
defaultMenuItems.push({
|
|
15217
|
-
icon: /* @__PURE__ */
|
|
15250
|
+
icon: /* @__PURE__ */ jsx104(User_default2, { width: "16", height: "16" }),
|
|
15218
15251
|
label: "Manage Profile",
|
|
15219
15252
|
onClick: onManageProfile
|
|
15220
15253
|
});
|
|
15221
15254
|
}
|
|
15222
15255
|
if (onSignOut) {
|
|
15223
15256
|
defaultMenuItems.push({
|
|
15224
|
-
icon: /* @__PURE__ */
|
|
15257
|
+
icon: /* @__PURE__ */ jsx104(LogOut_default, { width: "16", height: "16" }),
|
|
15225
15258
|
label: "Sign Out",
|
|
15226
15259
|
onClick: onSignOut
|
|
15227
15260
|
});
|
|
@@ -15245,7 +15278,7 @@ var BaseUserDropdown = ({
|
|
|
15245
15278
|
"data-testid": "asgardeo-user-dropdown-trigger",
|
|
15246
15279
|
...getReferenceProps(),
|
|
15247
15280
|
children: [
|
|
15248
|
-
/* @__PURE__ */
|
|
15281
|
+
/* @__PURE__ */ jsx104(
|
|
15249
15282
|
Avatar,
|
|
15250
15283
|
{
|
|
15251
15284
|
imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
|
|
@@ -15254,7 +15287,7 @@ var BaseUserDropdown = ({
|
|
|
15254
15287
|
alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
|
|
15255
15288
|
}
|
|
15256
15289
|
),
|
|
15257
|
-
showTriggerLabel && /* @__PURE__ */
|
|
15290
|
+
showTriggerLabel && /* @__PURE__ */ jsx104(
|
|
15258
15291
|
Typography_default,
|
|
15259
15292
|
{
|
|
15260
15293
|
variant: "body2",
|
|
@@ -15265,7 +15298,7 @@ var BaseUserDropdown = ({
|
|
|
15265
15298
|
]
|
|
15266
15299
|
}
|
|
15267
15300
|
),
|
|
15268
|
-
isOpen && /* @__PURE__ */
|
|
15301
|
+
isOpen && /* @__PURE__ */ jsx104(FloatingPortal2, { id: portalId, children: /* @__PURE__ */ jsx104(FloatingFocusManager2, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs46(
|
|
15269
15302
|
"div",
|
|
15270
15303
|
{
|
|
15271
15304
|
ref: refs.setFloating,
|
|
@@ -15279,7 +15312,7 @@ var BaseUserDropdown = ({
|
|
|
15279
15312
|
...getFloatingProps(),
|
|
15280
15313
|
children: [
|
|
15281
15314
|
/* @__PURE__ */ jsxs46("div", { className: cx32(withVendorCSSClassPrefix30("user-dropdown__header"), styles["dropdownHeader"]), children: [
|
|
15282
|
-
/* @__PURE__ */
|
|
15315
|
+
/* @__PURE__ */ jsx104(
|
|
15283
15316
|
Avatar,
|
|
15284
15317
|
{
|
|
15285
15318
|
imageUrl: getMappedUserProfileValue_default("picture", mergedMappings, user),
|
|
@@ -15289,7 +15322,7 @@ var BaseUserDropdown = ({
|
|
|
15289
15322
|
}
|
|
15290
15323
|
),
|
|
15291
15324
|
/* @__PURE__ */ jsxs46("div", { className: cx32(withVendorCSSClassPrefix30("user-dropdown__header-info"), styles["headerInfo"]), children: [
|
|
15292
|
-
/* @__PURE__ */
|
|
15325
|
+
/* @__PURE__ */ jsx104(
|
|
15293
15326
|
Typography_default,
|
|
15294
15327
|
{
|
|
15295
15328
|
noWrap: true,
|
|
@@ -15299,7 +15332,7 @@ var BaseUserDropdown = ({
|
|
|
15299
15332
|
children: getDisplayName_default(mergedMappings, user)
|
|
15300
15333
|
}
|
|
15301
15334
|
),
|
|
15302
|
-
/* @__PURE__ */
|
|
15335
|
+
/* @__PURE__ */ jsx104(
|
|
15303
15336
|
Typography_default,
|
|
15304
15337
|
{
|
|
15305
15338
|
noWrap: true,
|
|
@@ -15311,9 +15344,9 @@ var BaseUserDropdown = ({
|
|
|
15311
15344
|
)
|
|
15312
15345
|
] })
|
|
15313
15346
|
] }),
|
|
15314
|
-
/* @__PURE__ */
|
|
15347
|
+
/* @__PURE__ */ jsx104("div", { className: cx32(withVendorCSSClassPrefix30("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ jsx104("div", { children: (() => {
|
|
15315
15348
|
if (item.label === "") {
|
|
15316
|
-
return /* @__PURE__ */
|
|
15349
|
+
return /* @__PURE__ */ jsx104(
|
|
15317
15350
|
"div",
|
|
15318
15351
|
{
|
|
15319
15352
|
className: cx32(withVendorCSSClassPrefix30("user-dropdown__menu-divider"), styles["divider"])
|
|
@@ -15338,12 +15371,12 @@ var BaseUserDropdown = ({
|
|
|
15338
15371
|
onBlur: () => setHoveredItemIndex(null),
|
|
15339
15372
|
children: [
|
|
15340
15373
|
item.icon,
|
|
15341
|
-
/* @__PURE__ */
|
|
15374
|
+
/* @__PURE__ */ jsx104("span", { children: item.label })
|
|
15342
15375
|
]
|
|
15343
15376
|
}
|
|
15344
15377
|
);
|
|
15345
15378
|
}
|
|
15346
|
-
return /* @__PURE__ */
|
|
15379
|
+
return /* @__PURE__ */ jsx104(
|
|
15347
15380
|
Button_default,
|
|
15348
15381
|
{
|
|
15349
15382
|
onClick: () => handleMenuItemClick(item),
|
|
@@ -15370,7 +15403,7 @@ var BaseUserDropdown_default = BaseUserDropdown;
|
|
|
15370
15403
|
|
|
15371
15404
|
// src/components/presentation/UserDropdown/UserDropdown.tsx
|
|
15372
15405
|
import { useState as useState30 } from "react";
|
|
15373
|
-
import { Fragment as Fragment21, jsx as
|
|
15406
|
+
import { Fragment as Fragment21, jsx as jsx105, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15374
15407
|
var UserDropdown = ({
|
|
15375
15408
|
children,
|
|
15376
15409
|
renderTrigger,
|
|
@@ -15404,12 +15437,12 @@ var UserDropdown = ({
|
|
|
15404
15437
|
if (children) {
|
|
15405
15438
|
return /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
15406
15439
|
children(renderProps),
|
|
15407
|
-
/* @__PURE__ */
|
|
15440
|
+
/* @__PURE__ */ jsx105(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
|
|
15408
15441
|
] });
|
|
15409
15442
|
}
|
|
15410
15443
|
if (renderTrigger || renderDropdown) {
|
|
15411
15444
|
return /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
15412
|
-
renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */
|
|
15445
|
+
renderTrigger ? renderTrigger(renderProps) : /* @__PURE__ */ jsx105(
|
|
15413
15446
|
BaseUserDropdown,
|
|
15414
15447
|
{
|
|
15415
15448
|
user,
|
|
@@ -15419,11 +15452,11 @@ var UserDropdown = ({
|
|
|
15419
15452
|
...rest
|
|
15420
15453
|
}
|
|
15421
15454
|
),
|
|
15422
|
-
/* @__PURE__ */
|
|
15455
|
+
/* @__PURE__ */ jsx105(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
|
|
15423
15456
|
] });
|
|
15424
15457
|
}
|
|
15425
15458
|
return /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
15426
|
-
/* @__PURE__ */
|
|
15459
|
+
/* @__PURE__ */ jsx105(
|
|
15427
15460
|
BaseUserDropdown,
|
|
15428
15461
|
{
|
|
15429
15462
|
user,
|
|
@@ -15433,7 +15466,7 @@ var UserDropdown = ({
|
|
|
15433
15466
|
...rest
|
|
15434
15467
|
}
|
|
15435
15468
|
),
|
|
15436
|
-
isProfileOpen && /* @__PURE__ */
|
|
15469
|
+
isProfileOpen && /* @__PURE__ */ jsx105(UserProfile_default, { mode: "popup", open: isProfileOpen, onOpenChange: setIsProfileOpen })
|
|
15437
15470
|
] });
|
|
15438
15471
|
};
|
|
15439
15472
|
var UserDropdown_default = UserDropdown;
|
|
@@ -15681,9 +15714,9 @@ var useStyles29 = (theme, colorScheme) => useMemo40(() => {
|
|
|
15681
15714
|
var BaseOrganizationSwitcher_styles_default = useStyles29;
|
|
15682
15715
|
|
|
15683
15716
|
// src/components/primitives/Icons/Building.tsx
|
|
15684
|
-
import { jsx as
|
|
15717
|
+
import { jsx as jsx106, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15685
15718
|
var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsxs48("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
15686
|
-
/* @__PURE__ */
|
|
15719
|
+
/* @__PURE__ */ jsx106(
|
|
15687
15720
|
"path",
|
|
15688
15721
|
{
|
|
15689
15722
|
d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",
|
|
@@ -15693,30 +15726,30 @@ var Building = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PU
|
|
|
15693
15726
|
strokeLinejoin: "round"
|
|
15694
15727
|
}
|
|
15695
15728
|
),
|
|
15696
|
-
/* @__PURE__ */
|
|
15697
|
-
/* @__PURE__ */
|
|
15698
|
-
/* @__PURE__ */
|
|
15699
|
-
/* @__PURE__ */
|
|
15700
|
-
/* @__PURE__ */
|
|
15701
|
-
/* @__PURE__ */
|
|
15729
|
+
/* @__PURE__ */ jsx106("path", { d: "M6 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15730
|
+
/* @__PURE__ */ jsx106("path", { d: "M6 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15731
|
+
/* @__PURE__ */ jsx106("path", { d: "M14 8h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15732
|
+
/* @__PURE__ */ jsx106("path", { d: "M14 12h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15733
|
+
/* @__PURE__ */ jsx106("path", { d: "M6 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
15734
|
+
/* @__PURE__ */ jsx106("path", { d: "M14 18h4", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
15702
15735
|
] });
|
|
15703
15736
|
Building.displayName = "Building";
|
|
15704
15737
|
var Building_default = Building;
|
|
15705
15738
|
|
|
15706
15739
|
// src/components/primitives/Icons/Check.tsx
|
|
15707
|
-
import { jsx as
|
|
15708
|
-
var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */
|
|
15740
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
15741
|
+
var Check = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx107("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx107("path", { d: "M20 6 9 17l-5-5", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
15709
15742
|
Check.displayName = "Check";
|
|
15710
15743
|
var Check_default = Check;
|
|
15711
15744
|
|
|
15712
15745
|
// src/components/primitives/Icons/ChevronDown.tsx
|
|
15713
|
-
import { jsx as
|
|
15714
|
-
var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */
|
|
15746
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
15747
|
+
var ChevronDown = ({ color = "currentColor", height = 24, width = 24 }) => /* @__PURE__ */ jsx108("svg", { width, height, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx108("path", { d: "m6 9 6 6 6-6", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
15715
15748
|
ChevronDown.displayName = "ChevronDown";
|
|
15716
15749
|
var ChevronDown_default = ChevronDown;
|
|
15717
15750
|
|
|
15718
15751
|
// src/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.tsx
|
|
15719
|
-
import { Fragment as Fragment22, jsx as
|
|
15752
|
+
import { Fragment as Fragment22, jsx as jsx109, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
15720
15753
|
var BaseOrganizationSwitcher = ({
|
|
15721
15754
|
organizations,
|
|
15722
15755
|
currentOrganization,
|
|
@@ -15772,7 +15805,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
15772
15805
|
(org) => org.id !== currentOrganization?.id
|
|
15773
15806
|
);
|
|
15774
15807
|
const defaultRenderOrganization2 = (organization, isSelected) => /* @__PURE__ */ jsxs49(Fragment22, { children: [
|
|
15775
|
-
/* @__PURE__ */
|
|
15808
|
+
/* @__PURE__ */ jsx109(
|
|
15776
15809
|
Avatar,
|
|
15777
15810
|
{
|
|
15778
15811
|
variant: "square",
|
|
@@ -15783,21 +15816,21 @@ var BaseOrganizationSwitcher = ({
|
|
|
15783
15816
|
}
|
|
15784
15817
|
),
|
|
15785
15818
|
/* @__PURE__ */ jsxs49("div", { className: cx33(styles["organizationInfo"]), children: [
|
|
15786
|
-
/* @__PURE__ */
|
|
15819
|
+
/* @__PURE__ */ jsx109(Typography_default, { variant: "body2", fontWeight: "medium", className: cx33(styles["organizationName"]), children: organization.name }),
|
|
15787
15820
|
/* @__PURE__ */ jsxs49("div", { className: cx33(styles["organizationMeta"]), children: [
|
|
15788
15821
|
showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsxs49("span", { children: [
|
|
15789
15822
|
organization.memberCount,
|
|
15790
15823
|
" ",
|
|
15791
15824
|
organization.memberCount === 1 ? t("organization.switcher.member") : t("organization.switcher.members")
|
|
15792
15825
|
] }),
|
|
15793
|
-
showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */
|
|
15794
|
-
showRole && organization.role && /* @__PURE__ */
|
|
15826
|
+
showRole && organization.role && showMemberCount && organization.memberCount !== void 0 && /* @__PURE__ */ jsx109("span", { children: " \u2022 " }),
|
|
15827
|
+
showRole && organization.role && /* @__PURE__ */ jsx109("span", { className: cx33(styles["roleCapitalized"]), children: organization.role })
|
|
15795
15828
|
] })
|
|
15796
15829
|
] }),
|
|
15797
|
-
isSelected && /* @__PURE__ */
|
|
15830
|
+
isSelected && /* @__PURE__ */ jsx109(Check_default, { width: "16", height: "16", color: theme.vars.colors.text.primary })
|
|
15798
15831
|
] });
|
|
15799
|
-
const defaultRenderLoading2 = () => /* @__PURE__ */
|
|
15800
|
-
const defaultRenderError2 = (errorMessage) => /* @__PURE__ */
|
|
15832
|
+
const defaultRenderLoading2 = () => /* @__PURE__ */ jsx109("div", { className: cx33(styles["loadingContainer"]), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "caption", className: cx33(styles["loadingText"]), children: t("organization.switcher.loading.placeholder.organizations") }) });
|
|
15833
|
+
const defaultRenderError2 = (errorMessage) => /* @__PURE__ */ jsx109("div", { className: cx33(styles["errorContainer"]), children: /* @__PURE__ */ jsx109(Typography_default, { variant: "caption", className: cx33(styles["errorText"]), children: errorMessage }) });
|
|
15801
15834
|
return /* @__PURE__ */ jsxs49("div", { className: cx33(styles["root"], className), style, children: [
|
|
15802
15835
|
/* @__PURE__ */ jsxs49(
|
|
15803
15836
|
Button_default,
|
|
@@ -15810,7 +15843,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
15810
15843
|
...getReferenceProps(),
|
|
15811
15844
|
children: [
|
|
15812
15845
|
currentOrganization ? /* @__PURE__ */ jsxs49(Fragment22, { children: [
|
|
15813
|
-
/* @__PURE__ */
|
|
15846
|
+
/* @__PURE__ */ jsx109(
|
|
15814
15847
|
Avatar,
|
|
15815
15848
|
{
|
|
15816
15849
|
variant: "square",
|
|
@@ -15820,16 +15853,16 @@ var BaseOrganizationSwitcher = ({
|
|
|
15820
15853
|
alt: `${currentOrganization.name} avatar`
|
|
15821
15854
|
}
|
|
15822
15855
|
),
|
|
15823
|
-
showTriggerLabel && /* @__PURE__ */
|
|
15856
|
+
showTriggerLabel && /* @__PURE__ */ jsx109(Typography_default, { variant: "body2", className: cx33(styles["triggerLabel"]), children: currentOrganization.name })
|
|
15824
15857
|
] }) : /* @__PURE__ */ jsxs49(Fragment22, { children: [
|
|
15825
|
-
/* @__PURE__ */
|
|
15826
|
-
showTriggerLabel && /* @__PURE__ */
|
|
15858
|
+
/* @__PURE__ */ jsx109(Building_default, { width: avatarSize, height: avatarSize }),
|
|
15859
|
+
showTriggerLabel && /* @__PURE__ */ jsx109(Typography_default, { variant: "body2", className: cx33(styles["triggerLabel"]), children: t("elements.fields.organization.select.label") })
|
|
15827
15860
|
] }),
|
|
15828
|
-
/* @__PURE__ */
|
|
15861
|
+
/* @__PURE__ */ jsx109("span", { style: { display: "inline-flex", transform: isRTL ? "scaleX(-1)" : "none" }, children: /* @__PURE__ */ jsx109(ChevronDown_default, { width: "16", height: "16" }) })
|
|
15829
15862
|
]
|
|
15830
15863
|
}
|
|
15831
15864
|
),
|
|
15832
|
-
isOpen && /* @__PURE__ */
|
|
15865
|
+
isOpen && /* @__PURE__ */ jsx109(FloatingPortal3, { id: portalId, children: /* @__PURE__ */ jsx109(FloatingFocusManager3, { context, modal: false, initialFocus: -1, children: /* @__PURE__ */ jsxs49(
|
|
15833
15866
|
"div",
|
|
15834
15867
|
{
|
|
15835
15868
|
ref: refs.setFloating,
|
|
@@ -15838,7 +15871,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
15838
15871
|
...getFloatingProps(),
|
|
15839
15872
|
children: [
|
|
15840
15873
|
currentOrganization && /* @__PURE__ */ jsxs49("div", { className: cx33(styles["header"]), children: [
|
|
15841
|
-
/* @__PURE__ */
|
|
15874
|
+
/* @__PURE__ */ jsx109(
|
|
15842
15875
|
Avatar,
|
|
15843
15876
|
{
|
|
15844
15877
|
variant: "square",
|
|
@@ -15849,7 +15882,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
15849
15882
|
}
|
|
15850
15883
|
),
|
|
15851
15884
|
/* @__PURE__ */ jsxs49("div", { className: cx33(styles["headerInfo"]), children: [
|
|
15852
|
-
/* @__PURE__ */
|
|
15885
|
+
/* @__PURE__ */ jsx109(Typography_default, { noWrap: true, className: cx33(styles["headerName"]), variant: "body1", fontWeight: "medium", children: currentOrganization.name }),
|
|
15853
15886
|
/* @__PURE__ */ jsxs49("div", { className: cx33(styles["headerMeta"]), children: [
|
|
15854
15887
|
showMemberCount && currentOrganization.memberCount !== void 0 && /* @__PURE__ */ jsxs49(
|
|
15855
15888
|
Typography_default,
|
|
@@ -15868,10 +15901,10 @@ var BaseOrganizationSwitcher = ({
|
|
|
15868
15901
|
]
|
|
15869
15902
|
}
|
|
15870
15903
|
),
|
|
15871
|
-
showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */
|
|
15904
|
+
showRole && currentOrganization.role && (!showMemberCount || currentOrganization.memberCount === void 0) && /* @__PURE__ */ jsx109(Typography_default, { noWrap: true, className: cx33(styles["headerRole"]), variant: "caption", color: "secondary", children: currentOrganization.role })
|
|
15872
15905
|
] })
|
|
15873
15906
|
] }),
|
|
15874
|
-
onManageProfile && /* @__PURE__ */
|
|
15907
|
+
onManageProfile && /* @__PURE__ */ jsx109(
|
|
15875
15908
|
Button_default,
|
|
15876
15909
|
{
|
|
15877
15910
|
onClick: onManageProfile,
|
|
@@ -15892,8 +15925,8 @@ var BaseOrganizationSwitcher = ({
|
|
|
15892
15925
|
strokeLinecap: "round",
|
|
15893
15926
|
strokeLinejoin: "round",
|
|
15894
15927
|
children: [
|
|
15895
|
-
/* @__PURE__ */
|
|
15896
|
-
/* @__PURE__ */
|
|
15928
|
+
/* @__PURE__ */ jsx109("circle", { cx: "12", cy: "12", r: "3" }),
|
|
15929
|
+
/* @__PURE__ */ jsx109("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1 1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" })
|
|
15897
15930
|
]
|
|
15898
15931
|
}
|
|
15899
15932
|
),
|
|
@@ -15901,17 +15934,17 @@ var BaseOrganizationSwitcher = ({
|
|
|
15901
15934
|
}
|
|
15902
15935
|
)
|
|
15903
15936
|
] }),
|
|
15904
|
-
organizations.length > 1 && /* @__PURE__ */
|
|
15937
|
+
organizations.length > 1 && /* @__PURE__ */ jsx109(
|
|
15905
15938
|
"div",
|
|
15906
15939
|
{
|
|
15907
15940
|
className: cx33(styles["header"], styles["sectionHeaderContainer"]),
|
|
15908
15941
|
style: {
|
|
15909
15942
|
borderTop: currentOrganization ? `1px solid ${theme.vars.colors.border}` : "none"
|
|
15910
15943
|
},
|
|
15911
|
-
children: /* @__PURE__ */
|
|
15944
|
+
children: /* @__PURE__ */ jsx109(Typography_default, { variant: "caption", fontWeight: 600, className: cx33(styles["sectionHeader"]), children: t("organization.switcher.switch.organization") })
|
|
15912
15945
|
}
|
|
15913
15946
|
),
|
|
15914
|
-
/* @__PURE__ */
|
|
15947
|
+
/* @__PURE__ */ jsx109("div", { className: cx33(styles["menu"]), children: (() => {
|
|
15915
15948
|
if (loading) {
|
|
15916
15949
|
return renderLoading ? renderLoading() : defaultRenderLoading2();
|
|
15917
15950
|
}
|
|
@@ -15921,7 +15954,7 @@ var BaseOrganizationSwitcher = ({
|
|
|
15921
15954
|
return /* @__PURE__ */ jsxs49(Fragment22, { children: [
|
|
15922
15955
|
switchableOrganizations.map((organization) => {
|
|
15923
15956
|
const isSelected = false;
|
|
15924
|
-
return /* @__PURE__ */
|
|
15957
|
+
return /* @__PURE__ */ jsx109(
|
|
15925
15958
|
Button_default,
|
|
15926
15959
|
{
|
|
15927
15960
|
onClick: () => handleOrganizationSwitch(organization),
|
|
@@ -15940,9 +15973,9 @@ var BaseOrganizationSwitcher = ({
|
|
|
15940
15973
|
);
|
|
15941
15974
|
}),
|
|
15942
15975
|
menuItems.length > 0 && /* @__PURE__ */ jsxs49(Fragment22, { children: [
|
|
15943
|
-
/* @__PURE__ */
|
|
15976
|
+
/* @__PURE__ */ jsx109("div", { className: cx33(styles["menuDivider"]) }),
|
|
15944
15977
|
menuItems.map(
|
|
15945
|
-
(item, index) => /* @__PURE__ */
|
|
15978
|
+
(item, index) => /* @__PURE__ */ jsx109("div", { children: item.href ? /* @__PURE__ */ jsxs49(
|
|
15946
15979
|
"a",
|
|
15947
15980
|
{
|
|
15948
15981
|
href: item.href,
|
|
@@ -15956,10 +15989,10 @@ var BaseOrganizationSwitcher = ({
|
|
|
15956
15989
|
onBlur: () => setHoveredItemIndex(null),
|
|
15957
15990
|
children: [
|
|
15958
15991
|
item.icon,
|
|
15959
|
-
/* @__PURE__ */
|
|
15992
|
+
/* @__PURE__ */ jsx109("span", { children: item.label })
|
|
15960
15993
|
]
|
|
15961
15994
|
}
|
|
15962
|
-
) : /* @__PURE__ */
|
|
15995
|
+
) : /* @__PURE__ */ jsx109(
|
|
15963
15996
|
Button_default,
|
|
15964
15997
|
{
|
|
15965
15998
|
onClick: () => handleMenuItemClick(item),
|
|
@@ -15991,7 +16024,7 @@ var BaseOrganizationSwitcher_default = BaseOrganizationSwitcher;
|
|
|
15991
16024
|
import { useState as useState38 } from "react";
|
|
15992
16025
|
|
|
15993
16026
|
// src/components/primitives/Icons/BuildingAlt.tsx
|
|
15994
|
-
import { jsx as
|
|
16027
|
+
import { jsx as jsx110, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
15995
16028
|
var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs50(
|
|
15996
16029
|
"svg",
|
|
15997
16030
|
{
|
|
@@ -16005,13 +16038,13 @@ var BuildingAlt = ({ height = 24, width = 24 }) => /* @__PURE__ */ jsxs50(
|
|
|
16005
16038
|
strokeLinecap: "round",
|
|
16006
16039
|
strokeLinejoin: "round",
|
|
16007
16040
|
children: [
|
|
16008
|
-
/* @__PURE__ */
|
|
16009
|
-
/* @__PURE__ */
|
|
16010
|
-
/* @__PURE__ */
|
|
16011
|
-
/* @__PURE__ */
|
|
16012
|
-
/* @__PURE__ */
|
|
16013
|
-
/* @__PURE__ */
|
|
16014
|
-
/* @__PURE__ */
|
|
16041
|
+
/* @__PURE__ */ jsx110("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
|
|
16042
|
+
/* @__PURE__ */ jsx110("path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2" }),
|
|
16043
|
+
/* @__PURE__ */ jsx110("path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2" }),
|
|
16044
|
+
/* @__PURE__ */ jsx110("path", { d: "M10 6h4" }),
|
|
16045
|
+
/* @__PURE__ */ jsx110("path", { d: "M10 10h4" }),
|
|
16046
|
+
/* @__PURE__ */ jsx110("path", { d: "M10 14h4" }),
|
|
16047
|
+
/* @__PURE__ */ jsx110("path", { d: "M10 18h4" })
|
|
16015
16048
|
]
|
|
16016
16049
|
}
|
|
16017
16050
|
);
|
|
@@ -16165,7 +16198,7 @@ var useStyles30 = (theme, colorScheme) => useMemo41(() => {
|
|
|
16165
16198
|
var BaseCreateOrganization_styles_default = useStyles30;
|
|
16166
16199
|
|
|
16167
16200
|
// src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
|
|
16168
|
-
import { jsx as
|
|
16201
|
+
import { jsx as jsx111, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
16169
16202
|
var logger11 = createPackageComponentLogger9(
|
|
16170
16203
|
"@asgardeo/react",
|
|
16171
16204
|
"BaseCreateOrganization"
|
|
@@ -16255,13 +16288,13 @@ var BaseCreateOrganization = ({
|
|
|
16255
16288
|
logger11.error("Form submission error:");
|
|
16256
16289
|
}
|
|
16257
16290
|
};
|
|
16258
|
-
const createOrganizationContent = /* @__PURE__ */
|
|
16291
|
+
const createOrganizationContent = /* @__PURE__ */ jsx111("div", { className: cx34(styles["root"], cardLayout && styles["card"], className), style, children: /* @__PURE__ */ jsxs51("div", { className: cx34(styles["content"]), children: [
|
|
16259
16292
|
/* @__PURE__ */ jsxs51("form", { id: "create-organization-form", className: cx34(styles["form"]), onSubmit: handleSubmit, children: [
|
|
16260
16293
|
error && /* @__PURE__ */ jsxs51(Alert_default, { variant: "error", className: styles["errorAlert"], children: [
|
|
16261
|
-
/* @__PURE__ */
|
|
16262
|
-
/* @__PURE__ */
|
|
16294
|
+
/* @__PURE__ */ jsx111(Alert_default.Title, { children: "Error" }),
|
|
16295
|
+
/* @__PURE__ */ jsx111(Alert_default.Description, { children: error })
|
|
16263
16296
|
] }),
|
|
16264
|
-
/* @__PURE__ */
|
|
16297
|
+
/* @__PURE__ */ jsx111("div", { className: cx34(styles["fieldGroup"]), children: /* @__PURE__ */ jsx111(
|
|
16265
16298
|
TextField_default,
|
|
16266
16299
|
{
|
|
16267
16300
|
label: `${t("elements.fields.organization.name.label")}`,
|
|
@@ -16274,7 +16307,7 @@ var BaseCreateOrganization = ({
|
|
|
16274
16307
|
className: cx34(styles["input"])
|
|
16275
16308
|
}
|
|
16276
16309
|
) }),
|
|
16277
|
-
/* @__PURE__ */
|
|
16310
|
+
/* @__PURE__ */ jsx111("div", { className: cx34(styles["fieldGroup"]), children: /* @__PURE__ */ jsx111(
|
|
16278
16311
|
TextField_default,
|
|
16279
16312
|
{
|
|
16280
16313
|
label: `${t("elements.fields.organization.handle.label") || "Organization Handle"}`,
|
|
@@ -16288,9 +16321,9 @@ var BaseCreateOrganization = ({
|
|
|
16288
16321
|
className: cx34(styles["input"])
|
|
16289
16322
|
}
|
|
16290
16323
|
) }),
|
|
16291
|
-
/* @__PURE__ */
|
|
16292
|
-
/* @__PURE__ */
|
|
16293
|
-
/* @__PURE__ */
|
|
16324
|
+
/* @__PURE__ */ jsx111("div", { className: cx34(styles["fieldGroup"]), children: /* @__PURE__ */ jsxs51(FormControl_default, { error: formErrors.description, children: [
|
|
16325
|
+
/* @__PURE__ */ jsx111(InputLabel_default, { required: true, children: t("elements.fields.organization.description.label") }),
|
|
16326
|
+
/* @__PURE__ */ jsx111(
|
|
16294
16327
|
"textarea",
|
|
16295
16328
|
{
|
|
16296
16329
|
className: cx34(styles["textarea"], formErrors.description && styles["textareaError"]),
|
|
@@ -16305,14 +16338,14 @@ var BaseCreateOrganization = ({
|
|
|
16305
16338
|
renderAdditionalFields && renderAdditionalFields()
|
|
16306
16339
|
] }),
|
|
16307
16340
|
/* @__PURE__ */ jsxs51("div", { className: cx34(styles["actions"]), children: [
|
|
16308
|
-
onCancel && /* @__PURE__ */
|
|
16309
|
-
/* @__PURE__ */
|
|
16341
|
+
onCancel && /* @__PURE__ */ jsx111(Button_default, { type: "button", variant: "outline", onClick: onCancel, disabled: loading, children: t("organization.create.buttons.cancel.text") }),
|
|
16342
|
+
/* @__PURE__ */ jsx111(Button_default, { type: "submit", variant: "solid", color: "primary", disabled: loading, form: "create-organization-form", children: loading ? t("organization.create.buttons.create_organization.loading.text") : t("organization.create.buttons.create_organization.text") })
|
|
16310
16343
|
] })
|
|
16311
16344
|
] }) });
|
|
16312
16345
|
if (mode === "popup") {
|
|
16313
|
-
return /* @__PURE__ */
|
|
16314
|
-
/* @__PURE__ */
|
|
16315
|
-
/* @__PURE__ */
|
|
16346
|
+
return /* @__PURE__ */ jsx111(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs51(Dialog_default.Content, { children: [
|
|
16347
|
+
/* @__PURE__ */ jsx111(Dialog_default.Heading, { children: title }),
|
|
16348
|
+
/* @__PURE__ */ jsx111("div", { className: styles["popup"], children: createOrganizationContent })
|
|
16316
16349
|
] }) });
|
|
16317
16350
|
}
|
|
16318
16351
|
return createOrganizationContent;
|
|
@@ -16353,7 +16386,7 @@ var createOrganization = async ({
|
|
|
16353
16386
|
var createOrganization_default = createOrganization;
|
|
16354
16387
|
|
|
16355
16388
|
// src/components/presentation/CreateOrganization/CreateOrganization.tsx
|
|
16356
|
-
import { Fragment as Fragment23, jsx as
|
|
16389
|
+
import { Fragment as Fragment23, jsx as jsx112 } from "react/jsx-runtime";
|
|
16357
16390
|
var CreateOrganization = ({
|
|
16358
16391
|
onCreateOrganization,
|
|
16359
16392
|
fallback = null,
|
|
@@ -16369,7 +16402,7 @@ var CreateOrganization = ({
|
|
|
16369
16402
|
return fallback;
|
|
16370
16403
|
}
|
|
16371
16404
|
if (!isSignedIn) {
|
|
16372
|
-
return /* @__PURE__ */
|
|
16405
|
+
return /* @__PURE__ */ jsx112(Fragment23, {});
|
|
16373
16406
|
}
|
|
16374
16407
|
const parentId = defaultParentId || currentOrganization?.id || "";
|
|
16375
16408
|
const handleSubmit = async (payload) => {
|
|
@@ -16404,7 +16437,7 @@ var CreateOrganization = ({
|
|
|
16404
16437
|
setLoading(false);
|
|
16405
16438
|
}
|
|
16406
16439
|
};
|
|
16407
|
-
return /* @__PURE__ */
|
|
16440
|
+
return /* @__PURE__ */ jsx112(
|
|
16408
16441
|
BaseCreateOrganization,
|
|
16409
16442
|
{
|
|
16410
16443
|
onSubmit: handleSubmit,
|
|
@@ -16652,12 +16685,12 @@ var useStyles31 = (theme, colorScheme) => useMemo42(() => {
|
|
|
16652
16685
|
var BaseOrganizationList_styles_default = useStyles31;
|
|
16653
16686
|
|
|
16654
16687
|
// src/components/presentation/OrganizationList/BaseOrganizationList.tsx
|
|
16655
|
-
import { jsx as
|
|
16688
|
+
import { jsx as jsx113, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16656
16689
|
var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect, showStatus) => /* @__PURE__ */ jsxs52("div", { className: cx35(styles.organizationItem), children: [
|
|
16657
16690
|
/* @__PURE__ */ jsxs52("div", { className: cx35(styles.organizationContent), children: [
|
|
16658
|
-
/* @__PURE__ */
|
|
16691
|
+
/* @__PURE__ */ jsx113(Avatar, { variant: "square", name: organization.name, size: 48, alt: `${organization.name} logo` }),
|
|
16659
16692
|
/* @__PURE__ */ jsxs52("div", { className: cx35(styles.organizationInfo), children: [
|
|
16660
|
-
/* @__PURE__ */
|
|
16693
|
+
/* @__PURE__ */ jsx113(Typography_default, { variant: "h6", className: cx35(styles.organizationName), children: organization.name }),
|
|
16661
16694
|
/* @__PURE__ */ jsxs52(Typography_default, { variant: "body2", color: "textSecondary", className: cx35(styles.organizationHandle), children: [
|
|
16662
16695
|
"@",
|
|
16663
16696
|
organization.orgHandle
|
|
@@ -16665,7 +16698,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
|
|
|
16665
16698
|
showStatus && /* @__PURE__ */ jsxs52(Typography_default, { variant: "body2", color: "textSecondary", className: cx35(styles.organizationStatus), children: [
|
|
16666
16699
|
t("organization.switcher.status.label"),
|
|
16667
16700
|
" ",
|
|
16668
|
-
/* @__PURE__ */
|
|
16701
|
+
/* @__PURE__ */ jsx113(
|
|
16669
16702
|
"span",
|
|
16670
16703
|
{
|
|
16671
16704
|
className: cx35(
|
|
@@ -16678,7 +16711,7 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
|
|
|
16678
16711
|
] })
|
|
16679
16712
|
] })
|
|
16680
16713
|
] }),
|
|
16681
|
-
organization.canSwitch && /* @__PURE__ */
|
|
16714
|
+
organization.canSwitch && /* @__PURE__ */ jsx113("div", { className: cx35(styles.organizationActions), children: /* @__PURE__ */ jsx113(
|
|
16682
16715
|
Button_default,
|
|
16683
16716
|
{
|
|
16684
16717
|
onClick: (e) => {
|
|
@@ -16692,16 +16725,16 @@ var defaultRenderOrganization = (organization, styles, t, onOrganizationSelect,
|
|
|
16692
16725
|
) })
|
|
16693
16726
|
] }, organization.id);
|
|
16694
16727
|
var defaultRenderLoading = (t, styles) => /* @__PURE__ */ jsxs52("div", { className: cx35(styles.loadingContainer), children: [
|
|
16695
|
-
/* @__PURE__ */
|
|
16696
|
-
/* @__PURE__ */
|
|
16728
|
+
/* @__PURE__ */ jsx113(Spinner_default, { size: "medium" }),
|
|
16729
|
+
/* @__PURE__ */ jsx113(Typography_default, { variant: "body1", color: "textSecondary", className: cx35(styles.loadingText), children: t("organization.switcher.loading.placeholder.organizations") })
|
|
16697
16730
|
] });
|
|
16698
|
-
var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */
|
|
16699
|
-
/* @__PURE__ */
|
|
16731
|
+
var defaultRenderError = (errorMessage, t, styles) => /* @__PURE__ */ jsx113("div", { className: cx35(styles.errorContainer), children: /* @__PURE__ */ jsxs52(Typography_default, { variant: "body1", color: "error", children: [
|
|
16732
|
+
/* @__PURE__ */ jsx113("strong", { children: t("organization.switcher.error.prefix") }),
|
|
16700
16733
|
" ",
|
|
16701
16734
|
errorMessage
|
|
16702
16735
|
] }) });
|
|
16703
|
-
var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */
|
|
16704
|
-
var defaultRenderEmpty = (t, styles) => /* @__PURE__ */
|
|
16736
|
+
var defaultRenderLoadMore = (onLoadMore, isLoadingMore, t, styles) => /* @__PURE__ */ jsx113(Button_default, { onClick: onLoadMore, disabled: isLoadingMore, className: cx35(styles.loadMoreButton), type: "button", fullWidth: true, children: isLoadingMore ? t("organization.switcher.loading.more") : t("organization.switcher.buttons.load_more.text") });
|
|
16737
|
+
var defaultRenderEmpty = (t, styles) => /* @__PURE__ */ jsx113("div", { className: cx35(styles.emptyContainer), children: /* @__PURE__ */ jsx113(Typography_default, { variant: "body1", color: "textSecondary", className: cx35(styles.emptyText), children: t("organization.switcher.no.organizations") }) });
|
|
16705
16738
|
var BaseOrganizationList = ({
|
|
16706
16739
|
className = "",
|
|
16707
16740
|
allOrganizations,
|
|
@@ -16745,42 +16778,42 @@ var BaseOrganizationList = ({
|
|
|
16745
16778
|
const renderLoadMoreWithStyles = renderLoadMore || ((onLoadMore, loadingMore) => defaultRenderLoadMore(onLoadMore, loadingMore, t, styles));
|
|
16746
16779
|
const renderOrganizationWithStyles = renderOrganization || ((org) => defaultRenderOrganization(org, styles, t, onOrganizationSelect, showStatus));
|
|
16747
16780
|
if (isLoading && organizationsWithSwitchAccess?.length === 0) {
|
|
16748
|
-
const loadingContent = /* @__PURE__ */
|
|
16781
|
+
const loadingContent = /* @__PURE__ */ jsx113("div", { className: cx35(styles["root"], className), style, children: renderLoadingWithStyles() });
|
|
16749
16782
|
if (mode === "popup") {
|
|
16750
|
-
return /* @__PURE__ */
|
|
16751
|
-
/* @__PURE__ */
|
|
16752
|
-
/* @__PURE__ */
|
|
16783
|
+
return /* @__PURE__ */ jsx113(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs52(Dialog_default.Content, { children: [
|
|
16784
|
+
/* @__PURE__ */ jsx113(Dialog_default.Heading, { children: title }),
|
|
16785
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["popupContent"]), children: loadingContent })
|
|
16753
16786
|
] }) });
|
|
16754
16787
|
}
|
|
16755
16788
|
return loadingContent;
|
|
16756
16789
|
}
|
|
16757
16790
|
if (error && organizationsWithSwitchAccess?.length === 0) {
|
|
16758
|
-
const errorContent = /* @__PURE__ */
|
|
16791
|
+
const errorContent = /* @__PURE__ */ jsx113("div", { className: cx35(styles["root"], className), style, children: renderErrorWithStyles(error) });
|
|
16759
16792
|
if (mode === "popup") {
|
|
16760
|
-
return /* @__PURE__ */
|
|
16761
|
-
/* @__PURE__ */
|
|
16762
|
-
/* @__PURE__ */
|
|
16793
|
+
return /* @__PURE__ */ jsx113(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs52(Dialog_default.Content, { children: [
|
|
16794
|
+
/* @__PURE__ */ jsx113(Dialog_default.Heading, { children: title }),
|
|
16795
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["popupContent"]), children: errorContent })
|
|
16763
16796
|
] }) });
|
|
16764
16797
|
}
|
|
16765
16798
|
return errorContent;
|
|
16766
16799
|
}
|
|
16767
16800
|
if (!isLoading && organizationsWithSwitchAccess?.length === 0) {
|
|
16768
|
-
const emptyContent = /* @__PURE__ */
|
|
16801
|
+
const emptyContent = /* @__PURE__ */ jsx113("div", { className: cx35(styles["root"], className), style, children: renderEmptyWithStyles() });
|
|
16769
16802
|
if (mode === "popup") {
|
|
16770
|
-
return /* @__PURE__ */
|
|
16771
|
-
/* @__PURE__ */
|
|
16772
|
-
/* @__PURE__ */
|
|
16803
|
+
return /* @__PURE__ */ jsx113(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs52(Dialog_default.Content, { children: [
|
|
16804
|
+
/* @__PURE__ */ jsx113(Dialog_default.Heading, { children: title }),
|
|
16805
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["popupContent"]), children: emptyContent })
|
|
16773
16806
|
] }) });
|
|
16774
16807
|
}
|
|
16775
16808
|
return emptyContent;
|
|
16776
16809
|
}
|
|
16777
16810
|
const organizationListContent = /* @__PURE__ */ jsxs52("div", { className: cx35(styles["root"], className), style, children: [
|
|
16778
16811
|
/* @__PURE__ */ jsxs52("div", { className: cx35(styles["header"]), children: [
|
|
16779
|
-
/* @__PURE__ */
|
|
16812
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["headerInfo"]), children: /* @__PURE__ */ jsx113(Typography_default, { variant: "body2", color: "textSecondary", className: cx35(styles["subtitle"]), children: t("organization.switcher.showing.count", {
|
|
16780
16813
|
showing: organizationsWithSwitchAccess?.length,
|
|
16781
16814
|
total: allOrganizations?.organizations?.length || 0
|
|
16782
16815
|
}) }) }),
|
|
16783
|
-
onRefresh && /* @__PURE__ */
|
|
16816
|
+
onRefresh && /* @__PURE__ */ jsx113(
|
|
16784
16817
|
Button_default,
|
|
16785
16818
|
{
|
|
16786
16819
|
onClick: onRefresh,
|
|
@@ -16792,16 +16825,16 @@ var BaseOrganizationList = ({
|
|
|
16792
16825
|
}
|
|
16793
16826
|
)
|
|
16794
16827
|
] }),
|
|
16795
|
-
/* @__PURE__ */
|
|
16828
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["listContainer"]), children: organizationsWithSwitchAccess?.map(
|
|
16796
16829
|
(organization, index) => renderOrganizationWithStyles(organization, index)
|
|
16797
16830
|
) }),
|
|
16798
|
-
error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */
|
|
16799
|
-
hasMore && fetchMore && /* @__PURE__ */
|
|
16831
|
+
error && organizationsWithSwitchAccess?.length > 0 && /* @__PURE__ */ jsx113("div", { className: cx35(styles["errorMargin"]), children: renderErrorWithStyles(error) }),
|
|
16832
|
+
hasMore && fetchMore && /* @__PURE__ */ jsx113("div", { className: cx35(styles["loadMoreMargin"]), children: renderLoadMoreWithStyles(fetchMore, isLoadingMore) })
|
|
16800
16833
|
] });
|
|
16801
16834
|
if (mode === "popup") {
|
|
16802
|
-
return /* @__PURE__ */
|
|
16803
|
-
/* @__PURE__ */
|
|
16804
|
-
/* @__PURE__ */
|
|
16835
|
+
return /* @__PURE__ */ jsx113(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs52(Dialog_default.Content, { children: [
|
|
16836
|
+
/* @__PURE__ */ jsx113(Dialog_default.Heading, { children: title }),
|
|
16837
|
+
/* @__PURE__ */ jsx113("div", { className: cx35(styles["popupContent"]), children: organizationListContent })
|
|
16805
16838
|
] }) });
|
|
16806
16839
|
}
|
|
16807
16840
|
return organizationListContent;
|
|
@@ -16871,7 +16904,7 @@ var useStyles32 = (theme, colorScheme) => useMemo44(() => {
|
|
|
16871
16904
|
var OrganizationList_styles_default = useStyles32;
|
|
16872
16905
|
|
|
16873
16906
|
// src/components/presentation/OrganizationList/OrganizationList.tsx
|
|
16874
|
-
import { jsx as
|
|
16907
|
+
import { jsx as jsx114 } from "react/jsx-runtime";
|
|
16875
16908
|
var OrganizationList = (props) => {
|
|
16876
16909
|
const { onOrganizationSelect, className = "", style, ...baseProps } = props;
|
|
16877
16910
|
const { autoFetch, filter, limit, recursive, ...filteredBaseProps } = baseProps;
|
|
@@ -16886,7 +16919,7 @@ var OrganizationList = (props) => {
|
|
|
16886
16919
|
setAllOrganizations(await getAllOrganizations2());
|
|
16887
16920
|
})();
|
|
16888
16921
|
}, []);
|
|
16889
|
-
return /* @__PURE__ */
|
|
16922
|
+
return /* @__PURE__ */ jsx114("div", { className: cx36(styles["root"], className), style, children: /* @__PURE__ */ jsx114("div", { className: cx36(styles["container"]), children: /* @__PURE__ */ jsx114(
|
|
16890
16923
|
BaseOrganizationList,
|
|
16891
16924
|
{
|
|
16892
16925
|
allOrganizations,
|
|
@@ -17225,7 +17258,7 @@ var useStyles34 = (theme, colorScheme, disabled, readOnly, hasError) => useMemo4
|
|
|
17225
17258
|
var KeyValueInput_styles_default = useStyles34;
|
|
17226
17259
|
|
|
17227
17260
|
// src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
17228
|
-
import { jsx as
|
|
17261
|
+
import { jsx as jsx115, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
17229
17262
|
var KeyValueInput = ({
|
|
17230
17263
|
className = "",
|
|
17231
17264
|
disabled = false,
|
|
@@ -17302,7 +17335,7 @@ var KeyValueInput = ({
|
|
|
17302
17335
|
const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
|
|
17303
17336
|
const renderReadOnlyContent = () => {
|
|
17304
17337
|
if (pairs.length === 0) {
|
|
17305
|
-
return /* @__PURE__ */
|
|
17338
|
+
return /* @__PURE__ */ jsx115("div", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
|
|
17306
17339
|
}
|
|
17307
17340
|
return pairs.map((pair, index) => /* @__PURE__ */ jsxs53(
|
|
17308
17341
|
"div",
|
|
@@ -17313,7 +17346,7 @@ var KeyValueInput = ({
|
|
|
17313
17346
|
pair.key,
|
|
17314
17347
|
":"
|
|
17315
17348
|
] }),
|
|
17316
|
-
/* @__PURE__ */
|
|
17349
|
+
/* @__PURE__ */ jsx115(
|
|
17317
17350
|
"span",
|
|
17318
17351
|
{
|
|
17319
17352
|
className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "readonly-value")), styles["readOnlyValue"]),
|
|
@@ -17328,7 +17361,7 @@ var KeyValueInput = ({
|
|
|
17328
17361
|
return /* @__PURE__ */ jsxs53("div", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input")), styles["container"], className), children: [
|
|
17329
17362
|
label && /* @__PURE__ */ jsxs53("label", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "label")), styles["label"]), children: [
|
|
17330
17363
|
label,
|
|
17331
|
-
required && /* @__PURE__ */
|
|
17364
|
+
required && /* @__PURE__ */ jsx115(
|
|
17332
17365
|
"span",
|
|
17333
17366
|
{
|
|
17334
17367
|
className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "required")), styles["requiredIndicator"]),
|
|
@@ -17342,7 +17375,7 @@ var KeyValueInput = ({
|
|
|
17342
17375
|
{
|
|
17343
17376
|
className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "pair-row")), styles["pairRow"]),
|
|
17344
17377
|
children: [
|
|
17345
|
-
/* @__PURE__ */
|
|
17378
|
+
/* @__PURE__ */ jsx115(
|
|
17346
17379
|
TextField_default,
|
|
17347
17380
|
{
|
|
17348
17381
|
placeholder: keyPlaceholder,
|
|
@@ -17353,7 +17386,7 @@ var KeyValueInput = ({
|
|
|
17353
17386
|
"aria-label": `${keyLabel} ${index + 1}`
|
|
17354
17387
|
}
|
|
17355
17388
|
),
|
|
17356
|
-
/* @__PURE__ */
|
|
17389
|
+
/* @__PURE__ */ jsx115(
|
|
17357
17390
|
TextField_default,
|
|
17358
17391
|
{
|
|
17359
17392
|
placeholder: valuePlaceholder,
|
|
@@ -17364,7 +17397,7 @@ var KeyValueInput = ({
|
|
|
17364
17397
|
"aria-label": `${valueLabel} ${index + 1}`
|
|
17365
17398
|
}
|
|
17366
17399
|
),
|
|
17367
|
-
!readOnly && /* @__PURE__ */
|
|
17400
|
+
!readOnly && /* @__PURE__ */ jsx115(
|
|
17368
17401
|
"button",
|
|
17369
17402
|
{
|
|
17370
17403
|
type: "button",
|
|
@@ -17375,7 +17408,7 @@ var KeyValueInput = ({
|
|
|
17375
17408
|
styles["removeButton"]
|
|
17376
17409
|
),
|
|
17377
17410
|
"aria-label": `${removeButtonText} ${pair.key}`,
|
|
17378
|
-
children: /* @__PURE__ */
|
|
17411
|
+
children: /* @__PURE__ */ jsx115(X_default, { width: 16, height: 16 })
|
|
17379
17412
|
}
|
|
17380
17413
|
)
|
|
17381
17414
|
]
|
|
@@ -17383,7 +17416,7 @@ var KeyValueInput = ({
|
|
|
17383
17416
|
`${pair.key}-${index}`
|
|
17384
17417
|
)),
|
|
17385
17418
|
!readOnly && /* @__PURE__ */ jsxs53("div", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "add-row")), styles["addRow"]), children: [
|
|
17386
|
-
/* @__PURE__ */
|
|
17419
|
+
/* @__PURE__ */ jsx115(
|
|
17387
17420
|
TextField_default,
|
|
17388
17421
|
{
|
|
17389
17422
|
placeholder: keyPlaceholder,
|
|
@@ -17394,7 +17427,7 @@ var KeyValueInput = ({
|
|
|
17394
17427
|
"aria-label": "New key"
|
|
17395
17428
|
}
|
|
17396
17429
|
),
|
|
17397
|
-
/* @__PURE__ */
|
|
17430
|
+
/* @__PURE__ */ jsx115(
|
|
17398
17431
|
TextField_default,
|
|
17399
17432
|
{
|
|
17400
17433
|
placeholder: valuePlaceholder,
|
|
@@ -17410,7 +17443,7 @@ var KeyValueInput = ({
|
|
|
17410
17443
|
}
|
|
17411
17444
|
}
|
|
17412
17445
|
),
|
|
17413
|
-
/* @__PURE__ */
|
|
17446
|
+
/* @__PURE__ */ jsx115(
|
|
17414
17447
|
"button",
|
|
17415
17448
|
{
|
|
17416
17449
|
type: "button",
|
|
@@ -17418,12 +17451,12 @@ var KeyValueInput = ({
|
|
|
17418
17451
|
disabled: isAddDisabled,
|
|
17419
17452
|
className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "add-button")), styles["addButton"]),
|
|
17420
17453
|
"aria-label": "Add new key-value pair",
|
|
17421
|
-
children: /* @__PURE__ */
|
|
17454
|
+
children: /* @__PURE__ */ jsx115(Plus_default, { width: 16, height: 16 })
|
|
17422
17455
|
}
|
|
17423
17456
|
)
|
|
17424
17457
|
] })
|
|
17425
17458
|
] }),
|
|
17426
|
-
(helperText || error) && /* @__PURE__ */
|
|
17459
|
+
(helperText || error) && /* @__PURE__ */ jsx115("div", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
|
|
17427
17460
|
maxPairs && /* @__PURE__ */ jsxs53("div", { className: cx37(withVendorCSSClassPrefix31(bem22("key-value-input", "counter")), styles["counterText"]), children: [
|
|
17428
17461
|
pairs.length,
|
|
17429
17462
|
" of ",
|
|
@@ -17435,7 +17468,7 @@ var KeyValueInput = ({
|
|
|
17435
17468
|
var KeyValueInput_default = KeyValueInput;
|
|
17436
17469
|
|
|
17437
17470
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
|
|
17438
|
-
import { Fragment as Fragment24, jsx as
|
|
17471
|
+
import { Fragment as Fragment24, jsx as jsx116, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
17439
17472
|
var BaseOrganizationProfile = ({
|
|
17440
17473
|
fallback = null,
|
|
17441
17474
|
className = "",
|
|
@@ -17484,7 +17517,7 @@ var BaseOrganizationProfile = ({
|
|
|
17484
17517
|
const styles = BaseOrganizationProfile_styles_default(theme, colorScheme);
|
|
17485
17518
|
const [editedOrganization, setEditedOrganization] = useState36(organization);
|
|
17486
17519
|
const [editingFields, setEditingFields] = useState36({});
|
|
17487
|
-
const PencilIcon = () => /* @__PURE__ */
|
|
17520
|
+
const PencilIcon = () => /* @__PURE__ */ jsx116(
|
|
17488
17521
|
"svg",
|
|
17489
17522
|
{
|
|
17490
17523
|
width: "16",
|
|
@@ -17495,7 +17528,7 @@ var BaseOrganizationProfile = ({
|
|
|
17495
17528
|
strokeWidth: "2",
|
|
17496
17529
|
strokeLinecap: "round",
|
|
17497
17530
|
strokeLinejoin: "round",
|
|
17498
|
-
children: /* @__PURE__ */
|
|
17531
|
+
children: /* @__PURE__ */ jsx116("path", { d: "M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" })
|
|
17499
17532
|
}
|
|
17500
17533
|
);
|
|
17501
17534
|
const toggleFieldEdit = useCallback22((fieldName) => {
|
|
@@ -17565,7 +17598,7 @@ var BaseOrganizationProfile = ({
|
|
|
17565
17598
|
let fieldInput;
|
|
17566
17599
|
if (key === "attributes") {
|
|
17567
17600
|
const attributesValue = typeof fieldValue === "object" && fieldValue !== null ? fieldValue : {};
|
|
17568
|
-
fieldInput = /* @__PURE__ */
|
|
17601
|
+
fieldInput = /* @__PURE__ */ jsx116(
|
|
17569
17602
|
KeyValueInput_default,
|
|
17570
17603
|
{
|
|
17571
17604
|
value: attributesValue,
|
|
@@ -17603,26 +17636,26 @@ var BaseOrganizationProfile = ({
|
|
|
17603
17636
|
}
|
|
17604
17637
|
);
|
|
17605
17638
|
} else {
|
|
17606
|
-
fieldInput = /* @__PURE__ */
|
|
17639
|
+
fieldInput = /* @__PURE__ */ jsx116(TextField_default, { ...commonProps });
|
|
17607
17640
|
}
|
|
17608
17641
|
return /* @__PURE__ */ jsxs54(Fragment24, { children: [
|
|
17609
|
-
/* @__PURE__ */
|
|
17610
|
-
/* @__PURE__ */
|
|
17642
|
+
/* @__PURE__ */ jsx116("span", { className: cx38(styles["label"]), children: label }),
|
|
17643
|
+
/* @__PURE__ */ jsx116("div", { className: cx38(styles["value"]), children: fieldInput })
|
|
17611
17644
|
] });
|
|
17612
17645
|
}
|
|
17613
17646
|
const hasValue = value !== void 0 && value !== null && value !== "";
|
|
17614
17647
|
const isFieldEditable = editable && fieldEditable;
|
|
17615
17648
|
let displayValue;
|
|
17616
17649
|
if (hasValue) {
|
|
17617
|
-
displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */
|
|
17650
|
+
displayValue = key === "attributes" && typeof value === "object" && value !== null ? /* @__PURE__ */ jsx116(KeyValueInput_default, { value, readOnly: true, label: "" }) : String(renderedValue);
|
|
17618
17651
|
} else if (isFieldEditable) {
|
|
17619
17652
|
displayValue = getFieldPlaceholder(key);
|
|
17620
17653
|
} else {
|
|
17621
17654
|
displayValue = "-";
|
|
17622
17655
|
}
|
|
17623
17656
|
return /* @__PURE__ */ jsxs54(Fragment24, { children: [
|
|
17624
|
-
/* @__PURE__ */
|
|
17625
|
-
/* @__PURE__ */
|
|
17657
|
+
/* @__PURE__ */ jsx116("span", { className: cx38(styles["label"]), children: label }),
|
|
17658
|
+
/* @__PURE__ */ jsx116("div", { className: cx38(styles["value"], !hasValue && styles["valueEmpty"]), children: !hasValue && isFieldEditable && onStartEdit ? /* @__PURE__ */ jsx116(
|
|
17626
17659
|
Button_default,
|
|
17627
17660
|
{
|
|
17628
17661
|
onClick: onStartEdit,
|
|
@@ -17646,7 +17679,7 @@ var BaseOrganizationProfile = ({
|
|
|
17646
17679
|
return null;
|
|
17647
17680
|
}
|
|
17648
17681
|
return /* @__PURE__ */ jsxs54("div", { className: cx38(styles["field"]), children: [
|
|
17649
|
-
/* @__PURE__ */
|
|
17682
|
+
/* @__PURE__ */ jsx116("div", { className: cx38(styles["fieldContent"]), children: renderField(
|
|
17650
17683
|
field,
|
|
17651
17684
|
isFieldEditing,
|
|
17652
17685
|
(value) => {
|
|
@@ -17656,8 +17689,8 @@ var BaseOrganizationProfile = ({
|
|
|
17656
17689
|
},
|
|
17657
17690
|
() => toggleFieldEdit(field.key)
|
|
17658
17691
|
) }),
|
|
17659
|
-
isFieldEditable && /* @__PURE__ */
|
|
17660
|
-
/* @__PURE__ */
|
|
17692
|
+
isFieldEditable && /* @__PURE__ */ jsx116("div", { className: cx38(styles["fieldActions"]), children: isFieldEditing ? /* @__PURE__ */ jsxs54(Fragment24, { children: [
|
|
17693
|
+
/* @__PURE__ */ jsx116(
|
|
17661
17694
|
Button_default,
|
|
17662
17695
|
{
|
|
17663
17696
|
onClick: () => handleFieldSave(field.key),
|
|
@@ -17668,7 +17701,7 @@ var BaseOrganizationProfile = ({
|
|
|
17668
17701
|
children: saveButtonText
|
|
17669
17702
|
}
|
|
17670
17703
|
),
|
|
17671
|
-
/* @__PURE__ */
|
|
17704
|
+
/* @__PURE__ */ jsx116(
|
|
17672
17705
|
Button_default,
|
|
17673
17706
|
{
|
|
17674
17707
|
onClick: () => handleFieldCancel(field.key),
|
|
@@ -17679,7 +17712,7 @@ var BaseOrganizationProfile = ({
|
|
|
17679
17712
|
children: cancelButtonText
|
|
17680
17713
|
}
|
|
17681
17714
|
)
|
|
17682
|
-
] }) : hasValue && /* @__PURE__ */
|
|
17715
|
+
] }) : hasValue && /* @__PURE__ */ jsx116(
|
|
17683
17716
|
Button_default,
|
|
17684
17717
|
{
|
|
17685
17718
|
onClick: () => toggleFieldEdit(field.key),
|
|
@@ -17688,7 +17721,7 @@ var BaseOrganizationProfile = ({
|
|
|
17688
17721
|
size: "small",
|
|
17689
17722
|
title: "Edit field",
|
|
17690
17723
|
className: cx38(styles["editButton"]),
|
|
17691
|
-
children: /* @__PURE__ */
|
|
17724
|
+
children: /* @__PURE__ */ jsx116(PencilIcon, {})
|
|
17692
17725
|
}
|
|
17693
17726
|
) })
|
|
17694
17727
|
] }, field.key);
|
|
@@ -17698,21 +17731,21 @@ var BaseOrganizationProfile = ({
|
|
|
17698
17731
|
}
|
|
17699
17732
|
const profileContent = /* @__PURE__ */ jsxs54(Card_default, { className: cx38(styles["root"], cardLayout && styles["card"], className), children: [
|
|
17700
17733
|
/* @__PURE__ */ jsxs54("div", { className: cx38(styles["header"]), children: [
|
|
17701
|
-
/* @__PURE__ */
|
|
17734
|
+
/* @__PURE__ */ jsx116(Avatar, { name: getOrgInitials(organization.name), size: 80, alt: `${organization.name} logo` }),
|
|
17702
17735
|
/* @__PURE__ */ jsxs54("div", { className: cx38(styles["orgInfo"]), children: [
|
|
17703
|
-
/* @__PURE__ */
|
|
17736
|
+
/* @__PURE__ */ jsx116("h2", { className: cx38(styles["name"]), children: organization.name }),
|
|
17704
17737
|
organization.orgHandle && /* @__PURE__ */ jsxs54("p", { className: cx38(styles["handle"]), children: [
|
|
17705
17738
|
"@",
|
|
17706
17739
|
organization.orgHandle
|
|
17707
17740
|
] })
|
|
17708
17741
|
] })
|
|
17709
17742
|
] }),
|
|
17710
|
-
/* @__PURE__ */
|
|
17743
|
+
/* @__PURE__ */ jsx116("div", { className: cx38(styles["infoContainer"]), children: fields.map((field) => renderOrganizationField(field)) })
|
|
17711
17744
|
] });
|
|
17712
17745
|
if (mode === "popup") {
|
|
17713
|
-
return /* @__PURE__ */
|
|
17714
|
-
/* @__PURE__ */
|
|
17715
|
-
/* @__PURE__ */
|
|
17746
|
+
return /* @__PURE__ */ jsx116(Dialog_default, { open, onOpenChange, children: /* @__PURE__ */ jsxs54(Dialog_default.Content, { children: [
|
|
17747
|
+
/* @__PURE__ */ jsx116(Dialog_default.Heading, { children: title }),
|
|
17748
|
+
/* @__PURE__ */ jsx116("div", { className: cx38(styles["popup"]), children: profileContent })
|
|
17716
17749
|
] }) });
|
|
17717
17750
|
}
|
|
17718
17751
|
return profileContent;
|
|
@@ -17788,7 +17821,7 @@ var updateOrganization = async ({
|
|
|
17788
17821
|
var updateOrganization_default = updateOrganization;
|
|
17789
17822
|
|
|
17790
17823
|
// src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
|
|
17791
|
-
import { jsx as
|
|
17824
|
+
import { jsx as jsx117 } from "react/jsx-runtime";
|
|
17792
17825
|
var logger12 = createPackageComponentLogger10(
|
|
17793
17826
|
"@asgardeo/react",
|
|
17794
17827
|
"OrganizationProfile"
|
|
@@ -17846,7 +17879,7 @@ var OrganizationProfile = ({
|
|
|
17846
17879
|
throw err;
|
|
17847
17880
|
}
|
|
17848
17881
|
};
|
|
17849
|
-
return /* @__PURE__ */
|
|
17882
|
+
return /* @__PURE__ */ jsx117(
|
|
17850
17883
|
BaseOrganizationProfile_default,
|
|
17851
17884
|
{
|
|
17852
17885
|
organization,
|
|
@@ -17863,7 +17896,7 @@ var OrganizationProfile = ({
|
|
|
17863
17896
|
var OrganizationProfile_default = OrganizationProfile;
|
|
17864
17897
|
|
|
17865
17898
|
// src/components/presentation/OrganizationSwitcher/OrganizationSwitcher.tsx
|
|
17866
|
-
import { Fragment as Fragment25, jsx as
|
|
17899
|
+
import { Fragment as Fragment25, jsx as jsx118, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
17867
17900
|
var OrganizationSwitcher = ({
|
|
17868
17901
|
currentOrganization: propCurrentOrganization,
|
|
17869
17902
|
fallback = null,
|
|
@@ -17888,7 +17921,7 @@ var OrganizationSwitcher = ({
|
|
|
17888
17921
|
return fallback;
|
|
17889
17922
|
}
|
|
17890
17923
|
if (!isSignedIn) {
|
|
17891
|
-
return /* @__PURE__ */
|
|
17924
|
+
return /* @__PURE__ */ jsx118(Fragment25, {});
|
|
17892
17925
|
}
|
|
17893
17926
|
const organizations = propOrganizations || contextOrganizations || [];
|
|
17894
17927
|
const currentOrganization = propCurrentOrganization || contextCurrentOrganization;
|
|
@@ -17902,19 +17935,19 @@ var OrganizationSwitcher = ({
|
|
|
17902
17935
|
const defaultMenuItems = [];
|
|
17903
17936
|
if (currentOrganization) {
|
|
17904
17937
|
defaultMenuItems.push({
|
|
17905
|
-
icon: /* @__PURE__ */
|
|
17938
|
+
icon: /* @__PURE__ */ jsx118(BuildingAlt_default, {}),
|
|
17906
17939
|
label: t("organization.switcher.manage.organizations"),
|
|
17907
17940
|
onClick: handleManageOrganizations
|
|
17908
17941
|
});
|
|
17909
17942
|
}
|
|
17910
17943
|
defaultMenuItems.push({
|
|
17911
|
-
icon: /* @__PURE__ */
|
|
17944
|
+
icon: /* @__PURE__ */ jsx118("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ jsx118("path", { d: "M12 5v14m-7-7h14" }) }),
|
|
17912
17945
|
label: t("organization.switcher.create.organization"),
|
|
17913
17946
|
onClick: () => setIsCreateOrgOpen(true)
|
|
17914
17947
|
});
|
|
17915
17948
|
const menuItems = props.menuItems ? [...defaultMenuItems, ...props.menuItems] : defaultMenuItems;
|
|
17916
17949
|
return /* @__PURE__ */ jsxs55(Fragment25, { children: [
|
|
17917
|
-
/* @__PURE__ */
|
|
17950
|
+
/* @__PURE__ */ jsx118(
|
|
17918
17951
|
BaseOrganizationSwitcher,
|
|
17919
17952
|
{
|
|
17920
17953
|
organizations,
|
|
@@ -17928,7 +17961,7 @@ var OrganizationSwitcher = ({
|
|
|
17928
17961
|
...props
|
|
17929
17962
|
}
|
|
17930
17963
|
),
|
|
17931
|
-
/* @__PURE__ */
|
|
17964
|
+
/* @__PURE__ */ jsx118(
|
|
17932
17965
|
CreateOrganization,
|
|
17933
17966
|
{
|
|
17934
17967
|
mode: "popup",
|
|
@@ -17942,7 +17975,7 @@ var OrganizationSwitcher = ({
|
|
|
17942
17975
|
}
|
|
17943
17976
|
}
|
|
17944
17977
|
),
|
|
17945
|
-
currentOrganization && /* @__PURE__ */
|
|
17978
|
+
currentOrganization && /* @__PURE__ */ jsx118(
|
|
17946
17979
|
OrganizationProfile_default,
|
|
17947
17980
|
{
|
|
17948
17981
|
organizationId: currentOrganization.id,
|
|
@@ -17950,11 +17983,11 @@ var OrganizationSwitcher = ({
|
|
|
17950
17983
|
open: isProfileOpen,
|
|
17951
17984
|
onOpenChange: setIsProfileOpen,
|
|
17952
17985
|
cardLayout: true,
|
|
17953
|
-
loadingFallback: /* @__PURE__ */
|
|
17954
|
-
errorFallback: /* @__PURE__ */
|
|
17986
|
+
loadingFallback: /* @__PURE__ */ jsx118("div", { children: t("organization.profile.loading") }),
|
|
17987
|
+
errorFallback: /* @__PURE__ */ jsx118("div", { children: t("organization.profile.error") })
|
|
17955
17988
|
}
|
|
17956
17989
|
),
|
|
17957
|
-
/* @__PURE__ */
|
|
17990
|
+
/* @__PURE__ */ jsx118(
|
|
17958
17991
|
OrganizationList_default,
|
|
17959
17992
|
{
|
|
17960
17993
|
mode: "popup",
|
|
@@ -18103,7 +18136,7 @@ var useStyles35 = (theme, colorScheme) => useMemo47(() => {
|
|
|
18103
18136
|
var BaseLanguageSwitcher_styles_default = useStyles35;
|
|
18104
18137
|
|
|
18105
18138
|
// src/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.tsx
|
|
18106
|
-
import { Fragment as Fragment26, jsx as
|
|
18139
|
+
import { Fragment as Fragment26, jsx as jsx119, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
18107
18140
|
var BaseLanguageSwitcher = ({
|
|
18108
18141
|
children,
|
|
18109
18142
|
className,
|
|
@@ -18133,7 +18166,7 @@ var BaseLanguageSwitcher = ({
|
|
|
18133
18166
|
const { getReferenceProps, getFloatingProps } = useInteractions4([click, dismiss, role]);
|
|
18134
18167
|
const currentOption = languages.find((l) => l.code === currentLanguage);
|
|
18135
18168
|
if (children) {
|
|
18136
|
-
return /* @__PURE__ */
|
|
18169
|
+
return /* @__PURE__ */ jsx119(Fragment26, { children: children({
|
|
18137
18170
|
currentLanguage,
|
|
18138
18171
|
isLoading,
|
|
18139
18172
|
languages,
|
|
@@ -18151,13 +18184,13 @@ var BaseLanguageSwitcher = ({
|
|
|
18151
18184
|
...getReferenceProps(),
|
|
18152
18185
|
className: styles["trigger"],
|
|
18153
18186
|
children: [
|
|
18154
|
-
currentOption && /* @__PURE__ */
|
|
18155
|
-
/* @__PURE__ */
|
|
18156
|
-
hasMultipleLanguages && /* @__PURE__ */
|
|
18187
|
+
currentOption && /* @__PURE__ */ jsx119("span", { className: styles["triggerEmoji"], children: currentOption.emoji }),
|
|
18188
|
+
/* @__PURE__ */ jsx119("span", { className: styles["triggerLabel"], children: currentOption?.displayName ?? currentLanguage }),
|
|
18189
|
+
hasMultipleLanguages && /* @__PURE__ */ jsx119(ChevronDown_default, {})
|
|
18157
18190
|
]
|
|
18158
18191
|
}
|
|
18159
18192
|
),
|
|
18160
|
-
isOpen && hasMultipleLanguages && /* @__PURE__ */
|
|
18193
|
+
isOpen && hasMultipleLanguages && /* @__PURE__ */ jsx119(FloatingPortal4, { children: /* @__PURE__ */ jsx119(FloatingFocusManager4, { context, modal: false, children: /* @__PURE__ */ jsx119(
|
|
18161
18194
|
"div",
|
|
18162
18195
|
{
|
|
18163
18196
|
ref: refs.setFloating,
|
|
@@ -18178,9 +18211,9 @@ var BaseLanguageSwitcher = ({
|
|
|
18178
18211
|
setIsOpen(false);
|
|
18179
18212
|
},
|
|
18180
18213
|
children: [
|
|
18181
|
-
/* @__PURE__ */
|
|
18182
|
-
/* @__PURE__ */
|
|
18183
|
-
lang.code === currentLanguage && /* @__PURE__ */
|
|
18214
|
+
/* @__PURE__ */ jsx119("span", { className: styles["optionEmoji"], children: lang.emoji }),
|
|
18215
|
+
/* @__PURE__ */ jsx119("span", { className: styles["optionLabel"], children: lang.displayName }),
|
|
18216
|
+
lang.code === currentLanguage && /* @__PURE__ */ jsx119("span", { className: styles["checkIcon"], children: /* @__PURE__ */ jsx119(Check_default, {}) })
|
|
18184
18217
|
]
|
|
18185
18218
|
},
|
|
18186
18219
|
lang.code
|
|
@@ -18196,9 +18229,9 @@ import { resolveLocaleDisplayName, resolveLocaleEmoji } from "@asgardeo/browser"
|
|
|
18196
18229
|
import { useEffect as useEffect27, useMemo as useMemo48 } from "react";
|
|
18197
18230
|
|
|
18198
18231
|
// src/contexts/FlowMeta/useFlowMeta.ts
|
|
18199
|
-
import { useContext as
|
|
18232
|
+
import { useContext as useContext13 } from "react";
|
|
18200
18233
|
var useFlowMeta = () => {
|
|
18201
|
-
const context =
|
|
18234
|
+
const context = useContext13(FlowMetaContext_default);
|
|
18202
18235
|
if (!context) {
|
|
18203
18236
|
throw new Error("useFlowMeta must be used within a FlowMetaProvider");
|
|
18204
18237
|
}
|
|
@@ -18207,7 +18240,7 @@ var useFlowMeta = () => {
|
|
|
18207
18240
|
var useFlowMeta_default = useFlowMeta;
|
|
18208
18241
|
|
|
18209
18242
|
// src/components/presentation/LanguageSwitcher/LanguageSwitcher.tsx
|
|
18210
|
-
import { jsx as
|
|
18243
|
+
import { jsx as jsx120 } from "react/jsx-runtime";
|
|
18211
18244
|
var LanguageSwitcher = ({ children, className }) => {
|
|
18212
18245
|
const { meta, switchLanguage, isLoading } = useFlowMeta_default();
|
|
18213
18246
|
const { currentLanguage } = useTranslation_default();
|
|
@@ -18235,7 +18268,7 @@ var LanguageSwitcher = ({ children, className }) => {
|
|
|
18235
18268
|
switchLanguage(language);
|
|
18236
18269
|
}
|
|
18237
18270
|
};
|
|
18238
|
-
return /* @__PURE__ */
|
|
18271
|
+
return /* @__PURE__ */ jsx120(
|
|
18239
18272
|
BaseLanguageSwitcher_default,
|
|
18240
18273
|
{
|
|
18241
18274
|
currentLanguage,
|