@asgardeo/react 0.14.4 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js
CHANGED
|
@@ -35,7 +35,7 @@ __export(index_exports, {
|
|
|
35
35
|
Alert: () => Alert_default,
|
|
36
36
|
AsgardeoContext: () => AsgardeoContext_default,
|
|
37
37
|
AsgardeoProvider: () => AsgardeoProvider_default,
|
|
38
|
-
AsgardeoRuntimeError: () =>
|
|
38
|
+
AsgardeoRuntimeError: () => import_browser92.AsgardeoRuntimeError,
|
|
39
39
|
BaseAcceptInvite: () => BaseAcceptInvite_default,
|
|
40
40
|
BaseCreateOrganization: () => BaseCreateOrganization,
|
|
41
41
|
BaseInviteUser: () => BaseInviteUser_default,
|
|
@@ -67,12 +67,12 @@ __export(index_exports, {
|
|
|
67
67
|
DatePicker: () => DatePicker_default,
|
|
68
68
|
Divider: () => Divider_default,
|
|
69
69
|
EmailOtp: () => EmailOtp_default,
|
|
70
|
-
EmbeddedFlowActionVariant: () =>
|
|
71
|
-
EmbeddedFlowComponentType: () =>
|
|
72
|
-
EmbeddedFlowEventType: () =>
|
|
73
|
-
EmbeddedFlowTextVariant: () =>
|
|
74
|
-
EmbeddedSignInFlowStatus: () =>
|
|
75
|
-
EmbeddedSignInFlowType: () =>
|
|
70
|
+
EmbeddedFlowActionVariant: () => import_browser92.EmbeddedFlowActionVariantV2,
|
|
71
|
+
EmbeddedFlowComponentType: () => import_browser92.EmbeddedFlowComponentTypeV2,
|
|
72
|
+
EmbeddedFlowEventType: () => import_browser92.EmbeddedFlowEventTypeV2,
|
|
73
|
+
EmbeddedFlowTextVariant: () => import_browser92.EmbeddedFlowTextVariantV2,
|
|
74
|
+
EmbeddedSignInFlowStatus: () => import_browser92.EmbeddedSignInFlowStatusV2,
|
|
75
|
+
EmbeddedSignInFlowType: () => import_browser92.EmbeddedSignInFlowTypeV2,
|
|
76
76
|
Eye: () => Eye_default,
|
|
77
77
|
EyeOff: () => EyeOff_default,
|
|
78
78
|
FacebookButton: () => FacebookButton_default,
|
|
@@ -133,18 +133,18 @@ __export(index_exports, {
|
|
|
133
133
|
UsernamePassword: () => UsernamePassword_default,
|
|
134
134
|
createField: () => createField,
|
|
135
135
|
createOrganization: () => createOrganization_default,
|
|
136
|
-
createPatchOperations: () =>
|
|
136
|
+
createPatchOperations: () => import_browser89.createPatchOperations,
|
|
137
137
|
createSignInOption: () => createSignInOption,
|
|
138
138
|
createSignInOptionFromAuthenticator: () => createSignInOptionFromAuthenticator,
|
|
139
|
-
getActiveTheme: () =>
|
|
139
|
+
getActiveTheme: () => import_browser92.getActiveTheme,
|
|
140
140
|
getAllOrganizations: () => getAllOrganizations_default,
|
|
141
141
|
getConsentOptionalKey: () => getConsentOptionalKey,
|
|
142
142
|
getMeOrganizations: () => getMeOrganizations_default,
|
|
143
143
|
getMeProfile: () => getScim2Me_default,
|
|
144
144
|
getOrganization: () => getOrganization_default,
|
|
145
145
|
getSchemas: () => getSchemas_default,
|
|
146
|
-
http: () =>
|
|
147
|
-
navigate: () =>
|
|
146
|
+
http: () => import_browser92.http,
|
|
147
|
+
navigate: () => import_browser92.navigate,
|
|
148
148
|
updateMeProfile: () => updateMeProfile_default,
|
|
149
149
|
updateOrganization: () => updateOrganization_default,
|
|
150
150
|
useAsgardeo: () => useAsgardeo_default,
|
|
@@ -192,7 +192,7 @@ var AsgardeoContext = (0, import_react.createContext)({
|
|
|
192
192
|
organizationHandle: void 0,
|
|
193
193
|
platform: void 0,
|
|
194
194
|
reInitialize: null,
|
|
195
|
-
|
|
195
|
+
resolveFlowTemplateLiterals: (text) => text ?? "",
|
|
196
196
|
signIn: () => Promise.resolve({}),
|
|
197
197
|
signInOptions: {},
|
|
198
198
|
signInSilently: () => Promise.resolve({}),
|
|
@@ -1257,7 +1257,7 @@ var useAsgardeo = () => {
|
|
|
1257
1257
|
return {
|
|
1258
1258
|
...context,
|
|
1259
1259
|
meta,
|
|
1260
|
-
|
|
1260
|
+
resolveFlowTemplateLiterals: (text) => (0, import_browser9.resolveFlowTemplateLiterals)(text, {
|
|
1261
1261
|
meta,
|
|
1262
1262
|
t: i18nContext?.t ?? ((key) => key)
|
|
1263
1263
|
})
|
|
@@ -3768,7 +3768,7 @@ var OrganizationContext2 = ({
|
|
|
3768
3768
|
var OrganizationContext_default2 = OrganizationContext2;
|
|
3769
3769
|
|
|
3770
3770
|
// src/components/presentation/auth/SignIn/BaseSignIn.tsx
|
|
3771
|
-
var
|
|
3771
|
+
var import_browser53 = require("@asgardeo/browser");
|
|
3772
3772
|
|
|
3773
3773
|
// src/components/presentation/auth/SignIn/v1/BaseSignIn.tsx
|
|
3774
3774
|
var import_browser48 = require("@asgardeo/browser");
|
|
@@ -7730,7 +7730,7 @@ var BaseSignIn = ({ showLogo = true, ...rest }) => {
|
|
|
7730
7730
|
var BaseSignIn_default = BaseSignIn;
|
|
7731
7731
|
|
|
7732
7732
|
// src/components/presentation/auth/SignIn/v2/BaseSignIn.tsx
|
|
7733
|
-
var
|
|
7733
|
+
var import_browser52 = require("@asgardeo/browser");
|
|
7734
7734
|
var import_css37 = require("@emotion/css");
|
|
7735
7735
|
var import_react64 = require("react");
|
|
7736
7736
|
|
|
@@ -7740,7 +7740,7 @@ var resolveTranslationsInObject = (obj, t, properties = ["label", "placeholder",
|
|
|
7740
7740
|
const resolved = { ...obj };
|
|
7741
7741
|
properties.forEach((prop) => {
|
|
7742
7742
|
if (resolved[prop] && typeof resolved[prop] === "string") {
|
|
7743
|
-
resolved[prop] = (0, import_browser49.
|
|
7743
|
+
resolved[prop] = (0, import_browser49.resolveFlowTemplateLiterals)(resolved[prop], { meta, t });
|
|
7744
7744
|
}
|
|
7745
7745
|
});
|
|
7746
7746
|
return resolved;
|
|
@@ -7859,68 +7859,8 @@ var normalizeFlowResponse = (response, t, options = {}, meta) => {
|
|
|
7859
7859
|
};
|
|
7860
7860
|
};
|
|
7861
7861
|
|
|
7862
|
-
// src/utils/v2/getAuthComponentHeadings.ts
|
|
7863
|
-
var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitle, defaultSubtitle) => {
|
|
7864
|
-
let heading = null;
|
|
7865
|
-
let subheading = null;
|
|
7866
|
-
const findHeadings = (comps) => {
|
|
7867
|
-
for (const component of comps) {
|
|
7868
|
-
if (component.type === "TEXT" && component.variant && component.variant.startsWith("HEADING_")) {
|
|
7869
|
-
if (!heading) {
|
|
7870
|
-
heading = component;
|
|
7871
|
-
} else if (!subheading) {
|
|
7872
|
-
subheading = component;
|
|
7873
|
-
break;
|
|
7874
|
-
}
|
|
7875
|
-
}
|
|
7876
|
-
if (component.components && component.components.length > 0) {
|
|
7877
|
-
findHeadings(component.components);
|
|
7878
|
-
if (heading && subheading) break;
|
|
7879
|
-
}
|
|
7880
|
-
}
|
|
7881
|
-
};
|
|
7882
|
-
const filterComponents = (comps) => {
|
|
7883
|
-
let foundHeadings = 0;
|
|
7884
|
-
const maxHeadings = 2;
|
|
7885
|
-
const filter = (items) => items.reduce((acc, component) => {
|
|
7886
|
-
if (foundHeadings < maxHeadings && component.type === "TEXT" && component.variant && component.variant.startsWith("HEADING_")) {
|
|
7887
|
-
foundHeadings += 1;
|
|
7888
|
-
return acc;
|
|
7889
|
-
}
|
|
7890
|
-
if (component.components && component.components.length > 0) {
|
|
7891
|
-
const filteredNestedComponents = filter(component.components);
|
|
7892
|
-
if (filteredNestedComponents.length > 0) {
|
|
7893
|
-
acc.push({
|
|
7894
|
-
...component,
|
|
7895
|
-
components: filteredNestedComponents
|
|
7896
|
-
});
|
|
7897
|
-
}
|
|
7898
|
-
} else {
|
|
7899
|
-
acc.push(component);
|
|
7900
|
-
}
|
|
7901
|
-
return acc;
|
|
7902
|
-
}, []);
|
|
7903
|
-
return filter(comps);
|
|
7904
|
-
};
|
|
7905
|
-
const getComponentText = (component) => {
|
|
7906
|
-
if (!component) return "";
|
|
7907
|
-
return component.label || "";
|
|
7908
|
-
};
|
|
7909
|
-
findHeadings(components);
|
|
7910
|
-
const headingText = getComponentText(heading);
|
|
7911
|
-
const subheadingText = getComponentText(subheading);
|
|
7912
|
-
const result = {
|
|
7913
|
-
componentsWithoutHeadings: filterComponents(components),
|
|
7914
|
-
headingComponents: { heading, subheading },
|
|
7915
|
-
subtitle: flowSubtitle || subheadingText || defaultSubtitle || "",
|
|
7916
|
-
title: flowTitle || headingText || defaultTitle || ""
|
|
7917
|
-
};
|
|
7918
|
-
return result;
|
|
7919
|
-
};
|
|
7920
|
-
var getAuthComponentHeadings_default = getAuthComponentHeadings;
|
|
7921
|
-
|
|
7922
7862
|
// src/components/presentation/auth/AuthOptionFactory.tsx
|
|
7923
|
-
var
|
|
7863
|
+
var import_browser51 = require("@asgardeo/browser");
|
|
7924
7864
|
var import_css36 = require("@emotion/css");
|
|
7925
7865
|
var import_dompurify = __toESM(require("dompurify"), 1);
|
|
7926
7866
|
var import_react63 = require("react");
|
|
@@ -8074,7 +8014,9 @@ var FlowTimer = ({
|
|
|
8074
8014
|
var FlowTimer_default = FlowTimer;
|
|
8075
8015
|
|
|
8076
8016
|
// src/components/adapters/ImageComponent.tsx
|
|
8017
|
+
var import_browser50 = require("@asgardeo/browser");
|
|
8077
8018
|
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8019
|
+
var DEFAULT_EMOJI_CONTAINER_HEIGHT = "4em";
|
|
8078
8020
|
var ImageComponent = ({ component }) => {
|
|
8079
8021
|
const { theme } = useTheme_default();
|
|
8080
8022
|
const config = component.config || {};
|
|
@@ -8091,6 +8033,34 @@ var ImageComponent = ({ component }) => {
|
|
|
8091
8033
|
if (!src) {
|
|
8092
8034
|
return null;
|
|
8093
8035
|
}
|
|
8036
|
+
if ((0, import_browser50.isEmojiUri)(src)) {
|
|
8037
|
+
const toCSSLength = (value) => /^\d+(\.\d+)?$/.test(value) ? `${value}px` : value;
|
|
8038
|
+
const cssWidth = toCSSLength(width);
|
|
8039
|
+
const cssHeight = toCSSLength(height);
|
|
8040
|
+
const isConcrete = (v) => v !== "auto" && !v.endsWith("%");
|
|
8041
|
+
let containerHeight;
|
|
8042
|
+
if (isConcrete(cssHeight)) {
|
|
8043
|
+
containerHeight = cssHeight;
|
|
8044
|
+
} else if (isConcrete(cssWidth)) {
|
|
8045
|
+
containerHeight = cssWidth;
|
|
8046
|
+
} else {
|
|
8047
|
+
containerHeight = DEFAULT_EMOJI_CONTAINER_HEIGHT;
|
|
8048
|
+
}
|
|
8049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8050
|
+
"span",
|
|
8051
|
+
{
|
|
8052
|
+
style: {
|
|
8053
|
+
...imageStyle,
|
|
8054
|
+
containerType: "size",
|
|
8055
|
+
display: "inline-grid",
|
|
8056
|
+
height: containerHeight,
|
|
8057
|
+
placeItems: "center",
|
|
8058
|
+
width: cssWidth
|
|
8059
|
+
},
|
|
8060
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { "aria-label": alt, role: "img", style: { fontSize: "100cqmin", lineHeight: 1 }, children: (0, import_browser50.extractEmojiFromUri)(src) })
|
|
8061
|
+
}
|
|
8062
|
+
) }, component.id);
|
|
8063
|
+
}
|
|
8094
8064
|
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8095
8065
|
"img",
|
|
8096
8066
|
{
|
|
@@ -8197,26 +8167,63 @@ var flowIconRegistry_default = flowIconRegistry;
|
|
|
8197
8167
|
|
|
8198
8168
|
// src/components/presentation/auth/AuthOptionFactory.tsx
|
|
8199
8169
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
8200
|
-
var logger5 = (0,
|
|
8170
|
+
var logger5 = (0, import_browser51.createPackageComponentLogger)(
|
|
8201
8171
|
"@asgardeo/react",
|
|
8202
8172
|
"AuthOptionFactory"
|
|
8203
8173
|
);
|
|
8174
|
+
var resolveEmojiUrisInHtml = (html) => {
|
|
8175
|
+
const withEmojiImages = html.replace(
|
|
8176
|
+
/<img([^>]*)src="(emoji:[^"]+)"([^>]*)\/?>/gi,
|
|
8177
|
+
(_match, pre, src, post) => {
|
|
8178
|
+
const emoji = (0, import_browser51.extractEmojiFromUri)(src);
|
|
8179
|
+
if (!emoji) {
|
|
8180
|
+
return _match;
|
|
8181
|
+
}
|
|
8182
|
+
const altMatch = (pre + post).match(/alt="([^"]*)"/i);
|
|
8183
|
+
const label = altMatch ? altMatch[1] : emoji;
|
|
8184
|
+
return `<span role="img" aria-label="${label}">${emoji}</span>`;
|
|
8185
|
+
}
|
|
8186
|
+
);
|
|
8187
|
+
return withEmojiImages.replace(
|
|
8188
|
+
/emoji:([^\s"<>&]+)/g,
|
|
8189
|
+
(_, rest) => (0, import_browser51.isEmojiUri)(`emoji:${rest}`) ? rest : `emoji:${rest}`
|
|
8190
|
+
);
|
|
8191
|
+
};
|
|
8204
8192
|
var richTextClass = import_css36.css`
|
|
8205
8193
|
overflow-wrap: anywhere;
|
|
8206
8194
|
& * {
|
|
8207
8195
|
overflow-wrap: anywhere;
|
|
8208
8196
|
word-break: break-word;
|
|
8209
8197
|
}
|
|
8198
|
+
& .rich-text-align-left {
|
|
8199
|
+
text-align: left;
|
|
8200
|
+
}
|
|
8201
|
+
& .rich-text-align-center {
|
|
8202
|
+
text-align: center;
|
|
8203
|
+
}
|
|
8204
|
+
& .rich-text-align-right {
|
|
8205
|
+
text-align: right;
|
|
8206
|
+
}
|
|
8207
|
+
& .rich-text-align-justify {
|
|
8208
|
+
text-align: justify;
|
|
8209
|
+
}
|
|
8210
|
+
& a,
|
|
8211
|
+
& .rich-text-link {
|
|
8212
|
+
text-decoration: underline;
|
|
8213
|
+
}
|
|
8214
|
+
& span[role='img'] {
|
|
8215
|
+
display: inline-block;
|
|
8216
|
+
}
|
|
8210
8217
|
`;
|
|
8211
8218
|
var getFieldType = (variant) => {
|
|
8212
8219
|
switch (variant) {
|
|
8213
|
-
case
|
|
8214
|
-
return
|
|
8215
|
-
case
|
|
8216
|
-
return
|
|
8217
|
-
case
|
|
8220
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.EmailInput:
|
|
8221
|
+
return import_browser51.FieldType.Email;
|
|
8222
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.PasswordInput:
|
|
8223
|
+
return import_browser51.FieldType.Password;
|
|
8224
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.TextInput:
|
|
8218
8225
|
default:
|
|
8219
|
-
return
|
|
8226
|
+
return import_browser51.FieldType.Text;
|
|
8220
8227
|
}
|
|
8221
8228
|
};
|
|
8222
8229
|
var getTypographyVariant = (variant) => {
|
|
@@ -8254,12 +8261,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8254
8261
|
if (!text || !options.t && !options.meta) {
|
|
8255
8262
|
return text || "";
|
|
8256
8263
|
}
|
|
8257
|
-
return (0,
|
|
8264
|
+
return (0, import_browser51.resolveFlowTemplateLiterals)(text, { meta: options.meta, t: options.t || ((k) => k) });
|
|
8258
8265
|
};
|
|
8259
8266
|
switch (component.type) {
|
|
8260
|
-
case
|
|
8261
|
-
case
|
|
8262
|
-
case
|
|
8267
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.TextInput:
|
|
8268
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.PasswordInput:
|
|
8269
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.EmailInput: {
|
|
8263
8270
|
const identifier = component.ref;
|
|
8264
8271
|
const value = formValues[identifier] || "";
|
|
8265
8272
|
const isTouched = touchedFields[identifier] || false;
|
|
@@ -8279,12 +8286,12 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8279
8286
|
});
|
|
8280
8287
|
return (0, import_react63.cloneElement)(field, { key });
|
|
8281
8288
|
}
|
|
8282
|
-
case
|
|
8289
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Action: {
|
|
8283
8290
|
const actionId = component.id;
|
|
8284
8291
|
const eventType = component.eventType || "";
|
|
8285
8292
|
const buttonText = resolve(component.label);
|
|
8286
8293
|
const componentVariant = component.variant || "";
|
|
8287
|
-
const shouldSkipValidation = eventType.toUpperCase() ===
|
|
8294
|
+
const shouldSkipValidation = eventType.toUpperCase() === import_browser51.EmbeddedFlowEventTypeV2.Trigger;
|
|
8288
8295
|
const handleClick = () => {
|
|
8289
8296
|
if (options.onSubmit) {
|
|
8290
8297
|
const formData = {};
|
|
@@ -8292,7 +8299,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8292
8299
|
formData[field] = formValues[field];
|
|
8293
8300
|
});
|
|
8294
8301
|
const consentPrompt = options.additionalData?.["consentPrompt"];
|
|
8295
|
-
if (consentPrompt && eventType.toUpperCase() ===
|
|
8302
|
+
if (consentPrompt && eventType.toUpperCase() === import_browser51.EmbeddedFlowEventTypeV2.Submit) {
|
|
8296
8303
|
const isDeny = componentVariant.toLowerCase() !== "primary";
|
|
8297
8304
|
const decisions = {
|
|
8298
8305
|
purposes: consentPrompt.purposes.map(
|
|
@@ -8372,14 +8379,25 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8372
8379
|
key
|
|
8373
8380
|
);
|
|
8374
8381
|
}
|
|
8375
|
-
case
|
|
8382
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Text: {
|
|
8376
8383
|
const variant = getTypographyVariant(component.variant);
|
|
8377
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8385
|
+
Typography_default,
|
|
8386
|
+
{
|
|
8387
|
+
variant,
|
|
8388
|
+
style: {
|
|
8389
|
+
marginBottom: 2,
|
|
8390
|
+
textAlign: typeof component?.["align"] === "string" ? component["align"] : "left"
|
|
8391
|
+
},
|
|
8392
|
+
children: resolve(component.label)
|
|
8393
|
+
},
|
|
8394
|
+
key
|
|
8395
|
+
);
|
|
8378
8396
|
}
|
|
8379
|
-
case
|
|
8397
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Divider: {
|
|
8380
8398
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Divider_default, { children: resolve(component.label) || "" }, key);
|
|
8381
8399
|
}
|
|
8382
|
-
case
|
|
8400
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Select: {
|
|
8383
8401
|
const identifier = component.ref;
|
|
8384
8402
|
const value = formValues[identifier] || "";
|
|
8385
8403
|
const isTouched = touchedFields[identifier] || false;
|
|
@@ -8405,7 +8423,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8405
8423
|
key
|
|
8406
8424
|
);
|
|
8407
8425
|
}
|
|
8408
|
-
case
|
|
8426
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Block: {
|
|
8409
8427
|
if (component.components && component.components.length > 0) {
|
|
8410
8428
|
const blockComponents = component.components.map(
|
|
8411
8429
|
(childComponent, index) => createAuthComponentFromFlow(
|
|
@@ -8427,17 +8445,17 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8427
8445
|
}
|
|
8428
8446
|
return null;
|
|
8429
8447
|
}
|
|
8430
|
-
case
|
|
8448
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.RichText: {
|
|
8431
8449
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8432
8450
|
"div",
|
|
8433
8451
|
{
|
|
8434
8452
|
className: richTextClass,
|
|
8435
|
-
dangerouslySetInnerHTML: { __html: import_dompurify.default.sanitize(resolve(component.label)) }
|
|
8453
|
+
dangerouslySetInnerHTML: { __html: import_dompurify.default.sanitize(resolveEmojiUrisInHtml(resolve(component.label))) }
|
|
8436
8454
|
},
|
|
8437
8455
|
key
|
|
8438
8456
|
);
|
|
8439
8457
|
}
|
|
8440
|
-
case
|
|
8458
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Image: {
|
|
8441
8459
|
const explicitHeight = resolve(component.height?.toString());
|
|
8442
8460
|
const explicitWidth = resolve(component.width?.toString());
|
|
8443
8461
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
@@ -8463,7 +8481,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8463
8481
|
key
|
|
8464
8482
|
);
|
|
8465
8483
|
}
|
|
8466
|
-
case
|
|
8484
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Icon: {
|
|
8467
8485
|
const iconName = component.name || "";
|
|
8468
8486
|
const IconComponent = flowIconRegistry_default[iconName];
|
|
8469
8487
|
if (!IconComponent) {
|
|
@@ -8472,7 +8490,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8472
8490
|
}
|
|
8473
8491
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(IconComponent, { size: component.size || 24, color: component.color || "currentColor" }, key);
|
|
8474
8492
|
}
|
|
8475
|
-
case
|
|
8493
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Stack: {
|
|
8476
8494
|
const direction = component.direction || "row";
|
|
8477
8495
|
const gap = component.gap ?? 2;
|
|
8478
8496
|
const align = component.align || "center";
|
|
@@ -8504,7 +8522,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8504
8522
|
) : [];
|
|
8505
8523
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { style: stackStyle, children: stackChildren }, key);
|
|
8506
8524
|
}
|
|
8507
|
-
case
|
|
8525
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Consent: {
|
|
8508
8526
|
const consentPromptRawData = options.additionalData?.["consentPrompt"];
|
|
8509
8527
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
8510
8528
|
Consent_default,
|
|
@@ -8516,7 +8534,7 @@ var createAuthComponentFromFlow = (component, formValues, touchedFields, formErr
|
|
|
8516
8534
|
key
|
|
8517
8535
|
);
|
|
8518
8536
|
}
|
|
8519
|
-
case
|
|
8537
|
+
case import_browser51.EmbeddedFlowComponentTypeV2.Timer: {
|
|
8520
8538
|
const textTemplate = resolve(component.label) || "Time remaining: {time}";
|
|
8521
8539
|
const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
|
|
8522
8540
|
const expiresIn = timeoutMs > 0 ? Math.max(0, Math.floor((timeoutMs - Date.now()) / 1e3)) : 0;
|
|
@@ -8591,8 +8609,6 @@ var BaseSignInContent2 = ({
|
|
|
8591
8609
|
variant = "outlined",
|
|
8592
8610
|
isLoading: externalIsLoading,
|
|
8593
8611
|
children,
|
|
8594
|
-
showTitle = true,
|
|
8595
|
-
showSubtitle = true,
|
|
8596
8612
|
additionalData = {},
|
|
8597
8613
|
isTimeoutDisabled = false
|
|
8598
8614
|
}) => {
|
|
@@ -8708,29 +8724,29 @@ var BaseSignInContent2 = ({
|
|
|
8708
8724
|
};
|
|
8709
8725
|
const containerClasses = (0, import_css37.cx)(
|
|
8710
8726
|
[
|
|
8711
|
-
(0,
|
|
8712
|
-
(0,
|
|
8713
|
-
(0,
|
|
8727
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signin"),
|
|
8728
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signin--${size}`),
|
|
8729
|
+
(0, import_browser52.withVendorCSSClassPrefix)(`signin--${variant}`)
|
|
8714
8730
|
],
|
|
8715
8731
|
className
|
|
8716
8732
|
);
|
|
8717
8733
|
const inputClasses = (0, import_css37.cx)(
|
|
8718
8734
|
[
|
|
8719
|
-
(0,
|
|
8720
|
-
size === "small" && (0,
|
|
8721
|
-
size === "large" && (0,
|
|
8735
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signin__input"),
|
|
8736
|
+
size === "small" && (0, import_browser52.withVendorCSSClassPrefix)("signin__input--small"),
|
|
8737
|
+
size === "large" && (0, import_browser52.withVendorCSSClassPrefix)("signin__input--large")
|
|
8722
8738
|
],
|
|
8723
8739
|
inputClassName
|
|
8724
8740
|
);
|
|
8725
8741
|
const buttonClasses = (0, import_css37.cx)(
|
|
8726
8742
|
[
|
|
8727
|
-
(0,
|
|
8728
|
-
size === "small" && (0,
|
|
8729
|
-
size === "large" && (0,
|
|
8743
|
+
(0, import_browser52.withVendorCSSClassPrefix)("signin__button"),
|
|
8744
|
+
size === "small" && (0, import_browser52.withVendorCSSClassPrefix)("signin__button--small"),
|
|
8745
|
+
size === "large" && (0, import_browser52.withVendorCSSClassPrefix)("signin__button--large")
|
|
8730
8746
|
],
|
|
8731
8747
|
buttonClassName
|
|
8732
8748
|
);
|
|
8733
|
-
const messageClasses = (0, import_css37.cx)([(0,
|
|
8749
|
+
const messageClasses = (0, import_css37.cx)([(0, import_browser52.withVendorCSSClassPrefix)("signin__messages")], messageClassName);
|
|
8734
8750
|
const renderComponents = (0, import_react64.useCallback)(
|
|
8735
8751
|
(flowComponents) => renderSignInComponents(
|
|
8736
8752
|
flowComponents,
|
|
@@ -8800,40 +8816,22 @@ var BaseSignInContent2 = ({
|
|
|
8800
8816
|
if (!components || components.length === 0) {
|
|
8801
8817
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css37.cx)(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default.Content, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default, { variant: "warning", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Typography_default, { variant: "body1", children: t("errors.signin.components.not.available") }) }) }) });
|
|
8802
8818
|
}
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
externalError && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default, { variant: "error", className: (0, import_css37.cx)(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: externalError.message }) }) }),
|
|
8817
|
-
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8818
|
-
Alert_default,
|
|
8819
|
-
{
|
|
8820
|
-
variant: message.type === "error" ? "error" : "info",
|
|
8821
|
-
className: (0, import_css37.cx)(styles.flowMessageItem, messageClasses),
|
|
8822
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: message.message })
|
|
8823
|
-
},
|
|
8824
|
-
index
|
|
8825
|
-
)) }),
|
|
8826
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.contentContainer, children: componentsWithoutHeadings && renderComponents(componentsWithoutHeadings) })
|
|
8827
|
-
] })
|
|
8828
|
-
] });
|
|
8819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Card_default, { className: (0, import_css37.cx)(containerClasses, styles.card), "data-testid": "asgardeo-signin", variant, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Card_default.Content, { children: [
|
|
8820
|
+
externalError && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.flowMessagesContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default, { variant: "error", className: (0, import_css37.cx)(styles.flowMessageItem, messageClasses), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: externalError.message }) }) }),
|
|
8821
|
+
flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.flowMessagesContainer, children: flowMessages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
8822
|
+
Alert_default,
|
|
8823
|
+
{
|
|
8824
|
+
variant: message.type === "error" ? "error" : "info",
|
|
8825
|
+
className: (0, import_css37.cx)(styles.flowMessageItem, messageClasses),
|
|
8826
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Alert_default.Description, { children: message.message })
|
|
8827
|
+
},
|
|
8828
|
+
index
|
|
8829
|
+
)) }),
|
|
8830
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.contentContainer, children: renderComponents(components) })
|
|
8831
|
+
] }) });
|
|
8829
8832
|
};
|
|
8830
|
-
var BaseSignIn2 = ({ preferences,
|
|
8831
|
-
const {
|
|
8832
|
-
const styles = BaseSignIn_styles_default(theme, theme.vars.colors.text.primary);
|
|
8833
|
-
const content = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { children: [
|
|
8834
|
-
showLogo && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: styles.logoContainer, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Logo_default, { size: "large" }) }),
|
|
8835
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BaseSignInContent2, { showLogo, ...rest }) })
|
|
8836
|
-
] });
|
|
8833
|
+
var BaseSignIn2 = ({ preferences, ...rest }) => {
|
|
8834
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(FlowProvider_default, { children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BaseSignInContent2, { ...rest }) });
|
|
8837
8835
|
if (!preferences) return content;
|
|
8838
8836
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(ComponentPreferencesContext_default.Provider, { value: preferences, children: content });
|
|
8839
8837
|
};
|
|
@@ -8843,7 +8841,7 @@ var BaseSignIn_default2 = BaseSignIn2;
|
|
|
8843
8841
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
8844
8842
|
var BaseSignIn3 = (props) => {
|
|
8845
8843
|
const { platform } = useAsgardeo_default();
|
|
8846
|
-
if (platform ===
|
|
8844
|
+
if (platform === import_browser53.Platform.AsgardeoV2) {
|
|
8847
8845
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BaseSignIn_default2, { ...props });
|
|
8848
8846
|
}
|
|
8849
8847
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(BaseSignIn_default, { ...props });
|
|
@@ -8851,10 +8849,10 @@ var BaseSignIn3 = (props) => {
|
|
|
8851
8849
|
var BaseSignIn_default3 = BaseSignIn3;
|
|
8852
8850
|
|
|
8853
8851
|
// src/components/presentation/auth/SignIn/SignIn.tsx
|
|
8854
|
-
var
|
|
8852
|
+
var import_browser57 = require("@asgardeo/browser");
|
|
8855
8853
|
|
|
8856
8854
|
// src/components/presentation/auth/SignIn/v2/SignIn.tsx
|
|
8857
|
-
var
|
|
8855
|
+
var import_browser56 = require("@asgardeo/browser");
|
|
8858
8856
|
var import_react66 = require("react");
|
|
8859
8857
|
|
|
8860
8858
|
// src/hooks/v2/useOAuthCallback.ts
|
|
@@ -8964,7 +8962,7 @@ function useOAuthCallback({
|
|
|
8964
8962
|
}
|
|
8965
8963
|
|
|
8966
8964
|
// src/utils/oauth.ts
|
|
8967
|
-
var
|
|
8965
|
+
var import_browser54 = require("@asgardeo/browser");
|
|
8968
8966
|
function initiateOAuthRedirect(redirectURL) {
|
|
8969
8967
|
const basePath = document.querySelector("base")?.getAttribute("href") || "";
|
|
8970
8968
|
let returnPath = window.location.pathname;
|
|
@@ -8981,14 +8979,14 @@ function initiateOAuthRedirect(redirectURL) {
|
|
|
8981
8979
|
);
|
|
8982
8980
|
const redirectUrlObj = new URL(redirectURL);
|
|
8983
8981
|
redirectUrlObj.searchParams.set("state", state);
|
|
8984
|
-
(0,
|
|
8982
|
+
(0, import_browser54.navigate)(redirectUrlObj.toString());
|
|
8985
8983
|
}
|
|
8986
8984
|
|
|
8987
8985
|
// src/utils/v2/passkey.ts
|
|
8988
|
-
var
|
|
8986
|
+
var import_browser55 = require("@asgardeo/browser");
|
|
8989
8987
|
var handlePasskeyRegistration = async (challengeData) => {
|
|
8990
8988
|
if (!window.navigator.credentials || !window.navigator.credentials.create) {
|
|
8991
|
-
throw new
|
|
8989
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
8992
8990
|
"WebAuthn is not supported in this browser.",
|
|
8993
8991
|
"browser-webauthn-not-supported",
|
|
8994
8992
|
"browser",
|
|
@@ -8999,15 +8997,15 @@ var handlePasskeyRegistration = async (challengeData) => {
|
|
|
8999
8997
|
const creationOptions = JSON.parse(challengeData);
|
|
9000
8998
|
const publicKey = {
|
|
9001
8999
|
...creationOptions,
|
|
9002
|
-
challenge: (0,
|
|
9000
|
+
challenge: (0, import_browser55.base64urlToArrayBuffer)(creationOptions.challenge),
|
|
9003
9001
|
user: {
|
|
9004
9002
|
...creationOptions.user,
|
|
9005
|
-
id: (0,
|
|
9003
|
+
id: (0, import_browser55.base64urlToArrayBuffer)(creationOptions.user.id)
|
|
9006
9004
|
},
|
|
9007
9005
|
...creationOptions.excludeCredentials && {
|
|
9008
9006
|
excludeCredentials: creationOptions.excludeCredentials.map((cred) => ({
|
|
9009
9007
|
...cred,
|
|
9010
|
-
id: (0,
|
|
9008
|
+
id: (0, import_browser55.base64urlToArrayBuffer)(cred.id)
|
|
9011
9009
|
}))
|
|
9012
9010
|
}
|
|
9013
9011
|
};
|
|
@@ -9015,7 +9013,7 @@ var handlePasskeyRegistration = async (challengeData) => {
|
|
|
9015
9013
|
publicKey
|
|
9016
9014
|
});
|
|
9017
9015
|
if (!credential) {
|
|
9018
|
-
throw new
|
|
9016
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9019
9017
|
"No credential returned from WebAuthn registration.",
|
|
9020
9018
|
"browser-webauthn-no-credential",
|
|
9021
9019
|
"browser",
|
|
@@ -9025,10 +9023,10 @@ var handlePasskeyRegistration = async (challengeData) => {
|
|
|
9025
9023
|
const response = credential.response;
|
|
9026
9024
|
const registrationResponse = {
|
|
9027
9025
|
id: credential.id,
|
|
9028
|
-
rawId: (0,
|
|
9026
|
+
rawId: (0, import_browser55.arrayBufferToBase64url)(credential.rawId),
|
|
9029
9027
|
response: {
|
|
9030
|
-
attestationObject: (0,
|
|
9031
|
-
clientDataJSON: (0,
|
|
9028
|
+
attestationObject: (0, import_browser55.arrayBufferToBase64url)(response.attestationObject),
|
|
9029
|
+
clientDataJSON: (0, import_browser55.arrayBufferToBase64url)(response.clientDataJSON),
|
|
9032
9030
|
...response.getTransports && {
|
|
9033
9031
|
transports: response.getTransports()
|
|
9034
9032
|
}
|
|
@@ -9040,18 +9038,18 @@ var handlePasskeyRegistration = async (challengeData) => {
|
|
|
9040
9038
|
};
|
|
9041
9039
|
return JSON.stringify(registrationResponse);
|
|
9042
9040
|
} catch (error) {
|
|
9043
|
-
if (error instanceof
|
|
9041
|
+
if (error instanceof import_browser55.AsgardeoRuntimeError) {
|
|
9044
9042
|
throw error;
|
|
9045
9043
|
}
|
|
9046
9044
|
if (error instanceof Error) {
|
|
9047
|
-
throw new
|
|
9045
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9048
9046
|
`Passkey registration failed: ${error.message}`,
|
|
9049
9047
|
"browser-webauthn-registration-error",
|
|
9050
9048
|
"browser",
|
|
9051
9049
|
`WebAuthn registration failed with error: ${error.name}`
|
|
9052
9050
|
);
|
|
9053
9051
|
}
|
|
9054
|
-
throw new
|
|
9052
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9055
9053
|
"Passkey registration failed due to an unexpected error.",
|
|
9056
9054
|
"browser-webauthn-unexpected-error",
|
|
9057
9055
|
"browser",
|
|
@@ -9061,7 +9059,7 @@ var handlePasskeyRegistration = async (challengeData) => {
|
|
|
9061
9059
|
};
|
|
9062
9060
|
var handlePasskeyAuthentication = async (challengeData) => {
|
|
9063
9061
|
if (!window.navigator.credentials || !window.navigator.credentials.get) {
|
|
9064
|
-
throw new
|
|
9062
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9065
9063
|
"WebAuthn is not supported in this browser.",
|
|
9066
9064
|
"browser-webauthn-not-supported",
|
|
9067
9065
|
"browser",
|
|
@@ -9072,11 +9070,11 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
9072
9070
|
const requestOptions = JSON.parse(challengeData);
|
|
9073
9071
|
const publicKey = {
|
|
9074
9072
|
...requestOptions,
|
|
9075
|
-
challenge: (0,
|
|
9073
|
+
challenge: (0, import_browser55.base64urlToArrayBuffer)(requestOptions.challenge),
|
|
9076
9074
|
...requestOptions.allowCredentials && {
|
|
9077
9075
|
allowCredentials: requestOptions.allowCredentials.map((cred) => ({
|
|
9078
9076
|
...cred,
|
|
9079
|
-
id: (0,
|
|
9077
|
+
id: (0, import_browser55.base64urlToArrayBuffer)(cred.id)
|
|
9080
9078
|
}))
|
|
9081
9079
|
}
|
|
9082
9080
|
};
|
|
@@ -9084,7 +9082,7 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
9084
9082
|
publicKey
|
|
9085
9083
|
});
|
|
9086
9084
|
if (!credential) {
|
|
9087
|
-
throw new
|
|
9085
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9088
9086
|
"No credential returned from WebAuthn authentication.",
|
|
9089
9087
|
"browser-webauthn-no-credential",
|
|
9090
9088
|
"browser",
|
|
@@ -9094,13 +9092,13 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
9094
9092
|
const response = credential.response;
|
|
9095
9093
|
const authenticationResponse = {
|
|
9096
9094
|
id: credential.id,
|
|
9097
|
-
rawId: (0,
|
|
9095
|
+
rawId: (0, import_browser55.arrayBufferToBase64url)(credential.rawId),
|
|
9098
9096
|
response: {
|
|
9099
|
-
authenticatorData: (0,
|
|
9100
|
-
clientDataJSON: (0,
|
|
9101
|
-
signature: (0,
|
|
9097
|
+
authenticatorData: (0, import_browser55.arrayBufferToBase64url)(response.authenticatorData),
|
|
9098
|
+
clientDataJSON: (0, import_browser55.arrayBufferToBase64url)(response.clientDataJSON),
|
|
9099
|
+
signature: (0, import_browser55.arrayBufferToBase64url)(response.signature),
|
|
9102
9100
|
...response.userHandle && {
|
|
9103
|
-
userHandle: (0,
|
|
9101
|
+
userHandle: (0, import_browser55.arrayBufferToBase64url)(response.userHandle)
|
|
9104
9102
|
}
|
|
9105
9103
|
},
|
|
9106
9104
|
type: credential.type,
|
|
@@ -9110,18 +9108,18 @@ var handlePasskeyAuthentication = async (challengeData) => {
|
|
|
9110
9108
|
};
|
|
9111
9109
|
return JSON.stringify(authenticationResponse);
|
|
9112
9110
|
} catch (error) {
|
|
9113
|
-
if (error instanceof
|
|
9111
|
+
if (error instanceof import_browser55.AsgardeoRuntimeError) {
|
|
9114
9112
|
throw error;
|
|
9115
9113
|
}
|
|
9116
9114
|
if (error instanceof Error) {
|
|
9117
|
-
throw new
|
|
9115
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9118
9116
|
`Passkey authentication failed: ${error.message}`,
|
|
9119
9117
|
"browser-webauthn-authentication-error",
|
|
9120
9118
|
"browser",
|
|
9121
9119
|
`WebAuthn authentication failed with error: ${error.name}`
|
|
9122
9120
|
);
|
|
9123
9121
|
}
|
|
9124
|
-
throw new
|
|
9122
|
+
throw new import_browser55.AsgardeoRuntimeError(
|
|
9125
9123
|
"Passkey authentication failed due to an unexpected error.",
|
|
9126
9124
|
"browser-webauthn-unexpected-error",
|
|
9127
9125
|
"browser",
|
|
@@ -9222,12 +9220,12 @@ var SignIn = ({
|
|
|
9222
9220
|
const handleOAuthError = (error, errorDescription) => {
|
|
9223
9221
|
clearFlowState();
|
|
9224
9222
|
const errorMessage = errorDescription || `OAuth error: ${error}`;
|
|
9225
|
-
const err = new
|
|
9223
|
+
const err = new import_browser56.AsgardeoRuntimeError(errorMessage, "SIGN_IN_ERROR", "react");
|
|
9226
9224
|
setError(err);
|
|
9227
9225
|
cleanupOAuthUrlParams(true);
|
|
9228
9226
|
};
|
|
9229
9227
|
const handleRedirection = (response) => {
|
|
9230
|
-
if (response.type ===
|
|
9228
|
+
if (response.type === import_browser56.EmbeddedSignInFlowTypeV2.Redirection) {
|
|
9231
9229
|
const redirectURL = response.data?.redirectURL || response?.redirectURL;
|
|
9232
9230
|
if (redirectURL && window?.location) {
|
|
9233
9231
|
if (response.flowId) {
|
|
@@ -9247,7 +9245,7 @@ var SignIn = ({
|
|
|
9247
9245
|
handleAuthId(urlParams.authId);
|
|
9248
9246
|
const effectiveApplicationId = applicationId || urlParams.applicationId;
|
|
9249
9247
|
if (!urlParams.flowId && !effectiveApplicationId) {
|
|
9250
|
-
const error = new
|
|
9248
|
+
const error = new import_browser56.AsgardeoRuntimeError(
|
|
9251
9249
|
"Either flowId or applicationId is required for authentication",
|
|
9252
9250
|
"SIGN_IN_ERROR",
|
|
9253
9251
|
"react"
|
|
@@ -9265,7 +9263,7 @@ var SignIn = ({
|
|
|
9265
9263
|
} else {
|
|
9266
9264
|
response = await signIn({
|
|
9267
9265
|
applicationId: effectiveApplicationId,
|
|
9268
|
-
flowType:
|
|
9266
|
+
flowType: import_browser56.EmbeddedFlowType.Authentication
|
|
9269
9267
|
});
|
|
9270
9268
|
}
|
|
9271
9269
|
if (handleRedirection(response)) {
|
|
@@ -9428,7 +9426,7 @@ var SignIn = ({
|
|
|
9428
9426
|
},
|
|
9429
9427
|
meta
|
|
9430
9428
|
);
|
|
9431
|
-
if (response.flowStatus ===
|
|
9429
|
+
if (response.flowStatus === import_browser56.EmbeddedSignInFlowStatusV2.Error) {
|
|
9432
9430
|
clearFlowState();
|
|
9433
9431
|
const failureReason = response?.failureReason;
|
|
9434
9432
|
const errorMessage = failureReason || "Authentication flow failed. Please try again.";
|
|
@@ -9437,7 +9435,7 @@ var SignIn = ({
|
|
|
9437
9435
|
cleanupFlowUrlParams();
|
|
9438
9436
|
throw err;
|
|
9439
9437
|
}
|
|
9440
|
-
if (response.flowStatus ===
|
|
9438
|
+
if (response.flowStatus === import_browser56.EmbeddedSignInFlowStatusV2.Complete) {
|
|
9441
9439
|
const redirectUrl = response?.redirectUrl || response?.redirect_uri;
|
|
9442
9440
|
const finalRedirectUrl = redirectUrl || afterSignInUrl;
|
|
9443
9441
|
setIsSubmitting(false);
|
|
@@ -9594,7 +9592,7 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
|
|
|
9594
9592
|
window.location.href = url.toString();
|
|
9595
9593
|
}
|
|
9596
9594
|
};
|
|
9597
|
-
if (platform ===
|
|
9595
|
+
if (platform === import_browser57.Platform.AsgardeoV2) {
|
|
9598
9596
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
9599
9597
|
SignIn_default,
|
|
9600
9598
|
{
|
|
@@ -9629,18 +9627,18 @@ var SignIn2 = ({ className, size = "medium", children, preferences, ...rest }) =
|
|
|
9629
9627
|
var SignIn_default2 = SignIn2;
|
|
9630
9628
|
|
|
9631
9629
|
// src/components/presentation/auth/SignUp/BaseSignUp.tsx
|
|
9632
|
-
var
|
|
9630
|
+
var import_browser68 = require("@asgardeo/browser");
|
|
9633
9631
|
|
|
9634
9632
|
// src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
|
|
9635
|
-
var
|
|
9633
|
+
var import_browser66 = require("@asgardeo/browser");
|
|
9636
9634
|
var import_css39 = require("@emotion/css");
|
|
9637
9635
|
var import_react68 = require("react");
|
|
9638
9636
|
|
|
9639
9637
|
// src/components/presentation/auth/SignUp/v1/SignUpOptionFactory.tsx
|
|
9640
|
-
var
|
|
9638
|
+
var import_browser65 = require("@asgardeo/browser");
|
|
9641
9639
|
|
|
9642
9640
|
// src/components/adapters/CheckboxInput.tsx
|
|
9643
|
-
var
|
|
9641
|
+
var import_browser58 = require("@asgardeo/browser");
|
|
9644
9642
|
var CheckboxInput = ({
|
|
9645
9643
|
component,
|
|
9646
9644
|
formValues,
|
|
@@ -9661,14 +9659,14 @@ var CheckboxInput = ({
|
|
|
9661
9659
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9662
9660
|
placeholder: config["placeholder"] || "",
|
|
9663
9661
|
required: config["required"] || false,
|
|
9664
|
-
type:
|
|
9662
|
+
type: import_browser58.FieldType.Checkbox,
|
|
9665
9663
|
value
|
|
9666
9664
|
});
|
|
9667
9665
|
};
|
|
9668
9666
|
var CheckboxInput_default = CheckboxInput;
|
|
9669
9667
|
|
|
9670
9668
|
// src/components/adapters/DateInput.tsx
|
|
9671
|
-
var
|
|
9669
|
+
var import_browser59 = require("@asgardeo/browser");
|
|
9672
9670
|
var DateInput = ({
|
|
9673
9671
|
component,
|
|
9674
9672
|
formValues,
|
|
@@ -9689,7 +9687,7 @@ var DateInput = ({
|
|
|
9689
9687
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9690
9688
|
placeholder: config["placeholder"] || "",
|
|
9691
9689
|
required: config["required"] || false,
|
|
9692
|
-
type:
|
|
9690
|
+
type: import_browser59.FieldType.Date,
|
|
9693
9691
|
value
|
|
9694
9692
|
});
|
|
9695
9693
|
};
|
|
@@ -9715,7 +9713,7 @@ var DividerComponent = ({ component }) => {
|
|
|
9715
9713
|
var DividerComponent_default = DividerComponent;
|
|
9716
9714
|
|
|
9717
9715
|
// src/components/adapters/EmailInput.tsx
|
|
9718
|
-
var
|
|
9716
|
+
var import_browser60 = require("@asgardeo/browser");
|
|
9719
9717
|
var EmailInput = ({
|
|
9720
9718
|
component,
|
|
9721
9719
|
formValues,
|
|
@@ -9736,7 +9734,7 @@ var EmailInput = ({
|
|
|
9736
9734
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9737
9735
|
placeholder: config["placeholder"] || "Enter your email",
|
|
9738
9736
|
required: config["required"] || false,
|
|
9739
|
-
type:
|
|
9737
|
+
type: import_browser60.FieldType.Email,
|
|
9740
9738
|
value
|
|
9741
9739
|
});
|
|
9742
9740
|
};
|
|
@@ -9768,7 +9766,7 @@ var FormContainer = (props) => {
|
|
|
9768
9766
|
var FormContainer_default = FormContainer;
|
|
9769
9767
|
|
|
9770
9768
|
// src/components/adapters/NumberInput.tsx
|
|
9771
|
-
var
|
|
9769
|
+
var import_browser61 = require("@asgardeo/browser");
|
|
9772
9770
|
var NumberInput = ({
|
|
9773
9771
|
component,
|
|
9774
9772
|
formValues,
|
|
@@ -9789,14 +9787,14 @@ var NumberInput = ({
|
|
|
9789
9787
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9790
9788
|
placeholder: config["placeholder"] || "",
|
|
9791
9789
|
required: config["required"] || false,
|
|
9792
|
-
type:
|
|
9790
|
+
type: import_browser61.FieldType.Number,
|
|
9793
9791
|
value
|
|
9794
9792
|
});
|
|
9795
9793
|
};
|
|
9796
9794
|
var NumberInput_default = NumberInput;
|
|
9797
9795
|
|
|
9798
9796
|
// src/components/adapters/PasswordInput.tsx
|
|
9799
|
-
var
|
|
9797
|
+
var import_browser62 = require("@asgardeo/browser");
|
|
9800
9798
|
var PasswordInput = ({
|
|
9801
9799
|
component,
|
|
9802
9800
|
formValues,
|
|
@@ -9848,14 +9846,14 @@ var PasswordInput = ({
|
|
|
9848
9846
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9849
9847
|
placeholder: config["placeholder"] || "Enter your password",
|
|
9850
9848
|
required: config["required"] || false,
|
|
9851
|
-
type:
|
|
9849
|
+
type: import_browser62.FieldType.Password,
|
|
9852
9850
|
value
|
|
9853
9851
|
});
|
|
9854
9852
|
};
|
|
9855
9853
|
var PasswordInput_default = PasswordInput;
|
|
9856
9854
|
|
|
9857
9855
|
// src/components/adapters/SelectInput.tsx
|
|
9858
|
-
var
|
|
9856
|
+
var import_browser63 = require("@asgardeo/browser");
|
|
9859
9857
|
var SelectInput = ({
|
|
9860
9858
|
component,
|
|
9861
9859
|
formValues,
|
|
@@ -9882,7 +9880,7 @@ var SelectInput = ({
|
|
|
9882
9880
|
options,
|
|
9883
9881
|
placeholder: config["placeholder"] || "",
|
|
9884
9882
|
required: config["required"] || false,
|
|
9885
|
-
type:
|
|
9883
|
+
type: import_browser63.FieldType.Select,
|
|
9886
9884
|
value
|
|
9887
9885
|
});
|
|
9888
9886
|
};
|
|
@@ -9975,7 +9973,7 @@ var TelephoneInput = ({
|
|
|
9975
9973
|
var TelephoneInput_default = TelephoneInput;
|
|
9976
9974
|
|
|
9977
9975
|
// src/components/adapters/TextInput.tsx
|
|
9978
|
-
var
|
|
9976
|
+
var import_browser64 = require("@asgardeo/browser");
|
|
9979
9977
|
var TextInput = ({
|
|
9980
9978
|
component,
|
|
9981
9979
|
formValues,
|
|
@@ -9996,7 +9994,7 @@ var TextInput = ({
|
|
|
9996
9994
|
onChange: (newValue) => onInputChange(fieldName, newValue),
|
|
9997
9995
|
placeholder: config["placeholder"] || "",
|
|
9998
9996
|
required: config["required"] || false,
|
|
9999
|
-
type:
|
|
9997
|
+
type: import_browser64.FieldType.Text,
|
|
10000
9998
|
value
|
|
10001
9999
|
});
|
|
10002
10000
|
};
|
|
@@ -10060,9 +10058,9 @@ var Typography_default2 = TypographyComponent;
|
|
|
10060
10058
|
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
10061
10059
|
var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
10062
10060
|
switch (component.type) {
|
|
10063
|
-
case
|
|
10061
|
+
case import_browser65.EmbeddedFlowComponentType.Typography:
|
|
10064
10062
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Typography_default2, { component, onSubmit, ...rest });
|
|
10065
|
-
case
|
|
10063
|
+
case import_browser65.EmbeddedFlowComponentType.Input: {
|
|
10066
10064
|
const inputVariant = component.variant?.toUpperCase();
|
|
10067
10065
|
const inputType = component.config["type"]?.toLowerCase();
|
|
10068
10066
|
if (inputVariant === "EMAIL" || inputType === "email") {
|
|
@@ -10085,7 +10083,7 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
10085
10083
|
}
|
|
10086
10084
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(TextInput_default, { component, onSubmit, ...rest });
|
|
10087
10085
|
}
|
|
10088
|
-
case
|
|
10086
|
+
case import_browser65.EmbeddedFlowComponentType.Button: {
|
|
10089
10087
|
const buttonVariant = component.variant?.toUpperCase();
|
|
10090
10088
|
const buttonText = component.config["text"] || component.config["label"] || "";
|
|
10091
10089
|
if (buttonVariant === "SOCIAL") {
|
|
@@ -10110,13 +10108,13 @@ var createSignUpComponent = ({ component, onSubmit, ...rest }) => {
|
|
|
10110
10108
|
}
|
|
10111
10109
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SubmitButton_default, { component, onSubmit, ...rest });
|
|
10112
10110
|
}
|
|
10113
|
-
case
|
|
10111
|
+
case import_browser65.EmbeddedFlowComponentType.Form:
|
|
10114
10112
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(FormContainer_default, { component, onSubmit, ...rest });
|
|
10115
|
-
case
|
|
10113
|
+
case import_browser65.EmbeddedFlowComponentType.Select:
|
|
10116
10114
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(SelectInput_default, { component, onSubmit, ...rest });
|
|
10117
|
-
case
|
|
10115
|
+
case import_browser65.EmbeddedFlowComponentType.Divider:
|
|
10118
10116
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(DividerComponent_default, { component, onSubmit, ...rest });
|
|
10119
|
-
case
|
|
10117
|
+
case import_browser65.EmbeddedFlowComponentType.Image:
|
|
10120
10118
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(ImageComponent_default, { component, onSubmit, ...rest });
|
|
10121
10119
|
default:
|
|
10122
10120
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", {});
|
|
@@ -10289,7 +10287,7 @@ var BaseSignUp_styles_default = useStyles17;
|
|
|
10289
10287
|
|
|
10290
10288
|
// src/components/presentation/auth/SignUp/v1/BaseSignUp.tsx
|
|
10291
10289
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
10292
|
-
var logger6 = (0,
|
|
10290
|
+
var logger6 = (0, import_browser66.createPackageComponentLogger)(
|
|
10293
10291
|
"@asgardeo/react",
|
|
10294
10292
|
"BaseSignUp"
|
|
10295
10293
|
);
|
|
@@ -10359,7 +10357,7 @@ var BaseSignUpContent = ({
|
|
|
10359
10357
|
const fields = [];
|
|
10360
10358
|
const processComponents = (comps) => {
|
|
10361
10359
|
comps.forEach((component) => {
|
|
10362
|
-
if (component.type ===
|
|
10360
|
+
if (component.type === import_browser66.EmbeddedFlowComponentType.Input) {
|
|
10363
10361
|
const config = component.config || {};
|
|
10364
10362
|
fields.push({
|
|
10365
10363
|
initialValue: config.defaultValue || "",
|
|
@@ -10426,7 +10424,7 @@ var BaseSignUpContent = ({
|
|
|
10426
10424
|
setFormTouched(name, true);
|
|
10427
10425
|
};
|
|
10428
10426
|
const handleRedirectionIfNeeded = (response) => {
|
|
10429
|
-
if (response?.type ===
|
|
10427
|
+
if (response?.type === import_browser66.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
|
|
10430
10428
|
const redirectUrl = response.data.redirectURL;
|
|
10431
10429
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
10432
10430
|
if (!popup) {
|
|
@@ -10464,9 +10462,9 @@ var BaseSignUpContent = ({
|
|
|
10464
10462
|
try {
|
|
10465
10463
|
const continueResponse = await onSubmit(payload);
|
|
10466
10464
|
onFlowChange?.(continueResponse);
|
|
10467
|
-
if (continueResponse.flowStatus ===
|
|
10465
|
+
if (continueResponse.flowStatus === import_browser66.EmbeddedFlowStatus.Complete) {
|
|
10468
10466
|
onComplete?.(continueResponse);
|
|
10469
|
-
} else if (continueResponse.flowStatus ===
|
|
10467
|
+
} else if (continueResponse.flowStatus === import_browser66.EmbeddedFlowStatus.Incomplete) {
|
|
10470
10468
|
setCurrentFlow(continueResponse);
|
|
10471
10469
|
setupFormFields(continueResponse);
|
|
10472
10470
|
}
|
|
@@ -10517,9 +10515,9 @@ var BaseSignUpContent = ({
|
|
|
10517
10515
|
try {
|
|
10518
10516
|
const continueResponse = await onSubmit(payload);
|
|
10519
10517
|
onFlowChange?.(continueResponse);
|
|
10520
|
-
if (continueResponse.flowStatus ===
|
|
10518
|
+
if (continueResponse.flowStatus === import_browser66.EmbeddedFlowStatus.Complete) {
|
|
10521
10519
|
onComplete?.(continueResponse);
|
|
10522
|
-
} else if (continueResponse.flowStatus ===
|
|
10520
|
+
} else if (continueResponse.flowStatus === import_browser66.EmbeddedFlowStatus.Incomplete) {
|
|
10523
10521
|
setCurrentFlow(continueResponse);
|
|
10524
10522
|
setupFormFields(continueResponse);
|
|
10525
10523
|
}
|
|
@@ -10565,11 +10563,11 @@ var BaseSignUpContent = ({
|
|
|
10565
10563
|
};
|
|
10566
10564
|
const response = await onSubmit(payload);
|
|
10567
10565
|
onFlowChange?.(response);
|
|
10568
|
-
if (response.flowStatus ===
|
|
10566
|
+
if (response.flowStatus === import_browser66.EmbeddedFlowStatus.Complete) {
|
|
10569
10567
|
onComplete?.(response);
|
|
10570
10568
|
return;
|
|
10571
10569
|
}
|
|
10572
|
-
if (response.flowStatus ===
|
|
10570
|
+
if (response.flowStatus === import_browser66.EmbeddedFlowStatus.Incomplete) {
|
|
10573
10571
|
if (handleRedirectionIfNeeded(response)) {
|
|
10574
10572
|
return;
|
|
10575
10573
|
}
|
|
@@ -10585,30 +10583,30 @@ var BaseSignUpContent = ({
|
|
|
10585
10583
|
};
|
|
10586
10584
|
const containerClasses = (0, import_css39.cx)(
|
|
10587
10585
|
[
|
|
10588
|
-
(0,
|
|
10589
|
-
(0,
|
|
10590
|
-
(0,
|
|
10586
|
+
(0, import_browser66.withVendorCSSClassPrefix)("signup"),
|
|
10587
|
+
(0, import_browser66.withVendorCSSClassPrefix)(`signup--${size}`),
|
|
10588
|
+
(0, import_browser66.withVendorCSSClassPrefix)(`signup--${variant}`)
|
|
10591
10589
|
],
|
|
10592
10590
|
className
|
|
10593
10591
|
);
|
|
10594
10592
|
const inputClasses = (0, import_css39.cx)(
|
|
10595
10593
|
[
|
|
10596
|
-
(0,
|
|
10597
|
-
size === "small" && (0,
|
|
10598
|
-
size === "large" && (0,
|
|
10594
|
+
(0, import_browser66.withVendorCSSClassPrefix)("signup__input"),
|
|
10595
|
+
size === "small" && (0, import_browser66.withVendorCSSClassPrefix)("signup__input--small"),
|
|
10596
|
+
size === "large" && (0, import_browser66.withVendorCSSClassPrefix)("signup__input--large")
|
|
10599
10597
|
],
|
|
10600
10598
|
inputClassName
|
|
10601
10599
|
);
|
|
10602
10600
|
const buttonClasses = (0, import_css39.cx)(
|
|
10603
10601
|
[
|
|
10604
|
-
(0,
|
|
10605
|
-
size === "small" && (0,
|
|
10606
|
-
size === "large" && (0,
|
|
10602
|
+
(0, import_browser66.withVendorCSSClassPrefix)("signup__button"),
|
|
10603
|
+
size === "small" && (0, import_browser66.withVendorCSSClassPrefix)("signup__button--small"),
|
|
10604
|
+
size === "large" && (0, import_browser66.withVendorCSSClassPrefix)("signup__button--large")
|
|
10607
10605
|
],
|
|
10608
10606
|
buttonClassName
|
|
10609
10607
|
);
|
|
10610
|
-
const errorClasses = (0, import_css39.cx)([(0,
|
|
10611
|
-
const messageClasses = (0, import_css39.cx)([(0,
|
|
10608
|
+
const errorClasses = (0, import_css39.cx)([(0, import_browser66.withVendorCSSClassPrefix)("signup__error")], errorClassName);
|
|
10609
|
+
const messageClasses = (0, import_css39.cx)([(0, import_browser66.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
|
|
10612
10610
|
const renderComponents = (0, import_react68.useCallback)(
|
|
10613
10611
|
(components) => renderSignUpComponents2(
|
|
10614
10612
|
components,
|
|
@@ -10650,11 +10648,11 @@ var BaseSignUpContent = ({
|
|
|
10650
10648
|
setCurrentFlow(response);
|
|
10651
10649
|
setIsFlowInitialized(true);
|
|
10652
10650
|
onFlowChange?.(response);
|
|
10653
|
-
if (response.flowStatus ===
|
|
10651
|
+
if (response.flowStatus === import_browser66.EmbeddedFlowStatus.Complete) {
|
|
10654
10652
|
onComplete?.(response);
|
|
10655
10653
|
return;
|
|
10656
10654
|
}
|
|
10657
|
-
if (response.flowStatus ===
|
|
10655
|
+
if (response.flowStatus === import_browser66.EmbeddedFlowStatus.Incomplete) {
|
|
10658
10656
|
setupFormFields(response);
|
|
10659
10657
|
}
|
|
10660
10658
|
} catch (err) {
|
|
@@ -10732,11 +10730,73 @@ var BaseSignUp = ({ showLogo = true, ...rest }) => {
|
|
|
10732
10730
|
var BaseSignUp_default = BaseSignUp;
|
|
10733
10731
|
|
|
10734
10732
|
// src/components/presentation/auth/SignUp/v2/BaseSignUp.tsx
|
|
10735
|
-
var
|
|
10733
|
+
var import_browser67 = require("@asgardeo/browser");
|
|
10736
10734
|
var import_css40 = require("@emotion/css");
|
|
10737
10735
|
var import_react69 = require("react");
|
|
10736
|
+
|
|
10737
|
+
// src/utils/v2/getAuthComponentHeadings.ts
|
|
10738
|
+
var getAuthComponentHeadings = (components, flowTitle, flowSubtitle, defaultTitle, defaultSubtitle) => {
|
|
10739
|
+
let heading = null;
|
|
10740
|
+
let subheading = null;
|
|
10741
|
+
const findHeadings = (comps) => {
|
|
10742
|
+
for (const component of comps) {
|
|
10743
|
+
if (component.type === "TEXT" && component.variant && component.variant.startsWith("HEADING_")) {
|
|
10744
|
+
if (!heading) {
|
|
10745
|
+
heading = component;
|
|
10746
|
+
} else if (!subheading) {
|
|
10747
|
+
subheading = component;
|
|
10748
|
+
break;
|
|
10749
|
+
}
|
|
10750
|
+
}
|
|
10751
|
+
if (component.components && component.components.length > 0) {
|
|
10752
|
+
findHeadings(component.components);
|
|
10753
|
+
if (heading && subheading) break;
|
|
10754
|
+
}
|
|
10755
|
+
}
|
|
10756
|
+
};
|
|
10757
|
+
const filterComponents = (comps) => {
|
|
10758
|
+
let foundHeadings = 0;
|
|
10759
|
+
const maxHeadings = 2;
|
|
10760
|
+
const filter = (items) => items.reduce((acc, component) => {
|
|
10761
|
+
if (foundHeadings < maxHeadings && component.type === "TEXT" && component.variant && component.variant.startsWith("HEADING_")) {
|
|
10762
|
+
foundHeadings += 1;
|
|
10763
|
+
return acc;
|
|
10764
|
+
}
|
|
10765
|
+
if (component.components && component.components.length > 0) {
|
|
10766
|
+
const filteredNestedComponents = filter(component.components);
|
|
10767
|
+
if (filteredNestedComponents.length > 0) {
|
|
10768
|
+
acc.push({
|
|
10769
|
+
...component,
|
|
10770
|
+
components: filteredNestedComponents
|
|
10771
|
+
});
|
|
10772
|
+
}
|
|
10773
|
+
} else {
|
|
10774
|
+
acc.push(component);
|
|
10775
|
+
}
|
|
10776
|
+
return acc;
|
|
10777
|
+
}, []);
|
|
10778
|
+
return filter(comps);
|
|
10779
|
+
};
|
|
10780
|
+
const getComponentText = (component) => {
|
|
10781
|
+
if (!component) return "";
|
|
10782
|
+
return component.label || "";
|
|
10783
|
+
};
|
|
10784
|
+
findHeadings(components);
|
|
10785
|
+
const headingText = getComponentText(heading);
|
|
10786
|
+
const subheadingText = getComponentText(subheading);
|
|
10787
|
+
const result = {
|
|
10788
|
+
componentsWithoutHeadings: filterComponents(components),
|
|
10789
|
+
headingComponents: { heading, subheading },
|
|
10790
|
+
subtitle: flowSubtitle || subheadingText || defaultSubtitle || "",
|
|
10791
|
+
title: flowTitle || headingText || defaultTitle || ""
|
|
10792
|
+
};
|
|
10793
|
+
return result;
|
|
10794
|
+
};
|
|
10795
|
+
var getAuthComponentHeadings_default = getAuthComponentHeadings;
|
|
10796
|
+
|
|
10797
|
+
// src/components/presentation/auth/SignUp/v2/BaseSignUp.tsx
|
|
10738
10798
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
10739
|
-
var logger7 = (0,
|
|
10799
|
+
var logger7 = (0, import_browser67.createPackageComponentLogger)(
|
|
10740
10800
|
"@asgardeo/react",
|
|
10741
10801
|
"BaseSignUp"
|
|
10742
10802
|
);
|
|
@@ -10822,7 +10882,7 @@ var BaseSignUpContent2 = ({
|
|
|
10822
10882
|
const fields = [];
|
|
10823
10883
|
const processComponents = (comps) => {
|
|
10824
10884
|
comps.forEach((component) => {
|
|
10825
|
-
if (component.type ===
|
|
10885
|
+
if (component.type === import_browser67.EmbeddedFlowComponentTypeV2.TextInput || component.type === import_browser67.EmbeddedFlowComponentTypeV2.PasswordInput || component.type === import_browser67.EmbeddedFlowComponentTypeV2.EmailInput || component.type === import_browser67.EmbeddedFlowComponentTypeV2.Select) {
|
|
10826
10886
|
const fieldName = component.ref || component.id;
|
|
10827
10887
|
fields.push({
|
|
10828
10888
|
initialValue: "",
|
|
@@ -10832,7 +10892,7 @@ var BaseSignUpContent2 = ({
|
|
|
10832
10892
|
if (component.required && (!value || value.trim() === "")) {
|
|
10833
10893
|
return t("validations.required.field.error");
|
|
10834
10894
|
}
|
|
10835
|
-
if ((component.type ===
|
|
10895
|
+
if ((component.type === import_browser67.EmbeddedFlowComponentTypeV2.EmailInput || component.variant === "EMAIL") && value && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(value)) {
|
|
10836
10896
|
return t("field.email.invalid");
|
|
10837
10897
|
}
|
|
10838
10898
|
return null;
|
|
@@ -10889,7 +10949,7 @@ var BaseSignUpContent2 = ({
|
|
|
10889
10949
|
setFormTouched(name, true);
|
|
10890
10950
|
};
|
|
10891
10951
|
const handleRedirectionIfNeeded = (response) => {
|
|
10892
|
-
if (response?.type ===
|
|
10952
|
+
if (response?.type === import_browser67.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL) {
|
|
10893
10953
|
const redirectUrl = response.data.redirectURL;
|
|
10894
10954
|
const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
|
|
10895
10955
|
if (!popup) {
|
|
@@ -10929,9 +10989,9 @@ var BaseSignUpContent2 = ({
|
|
|
10929
10989
|
try {
|
|
10930
10990
|
const continueResponse = await onSubmit(payload);
|
|
10931
10991
|
onFlowChange?.(continueResponse);
|
|
10932
|
-
if (continueResponse.flowStatus ===
|
|
10992
|
+
if (continueResponse.flowStatus === import_browser67.EmbeddedFlowStatus.Complete) {
|
|
10933
10993
|
onComplete?.(continueResponse);
|
|
10934
|
-
} else if (continueResponse.flowStatus ===
|
|
10994
|
+
} else if (continueResponse.flowStatus === import_browser67.EmbeddedFlowStatus.Incomplete) {
|
|
10935
10995
|
setCurrentFlow(continueResponse);
|
|
10936
10996
|
setupFormFields(continueResponse);
|
|
10937
10997
|
}
|
|
@@ -10982,9 +11042,9 @@ var BaseSignUpContent2 = ({
|
|
|
10982
11042
|
try {
|
|
10983
11043
|
const continueResponse = await onSubmit(payload);
|
|
10984
11044
|
onFlowChange?.(continueResponse);
|
|
10985
|
-
if (continueResponse.flowStatus ===
|
|
11045
|
+
if (continueResponse.flowStatus === import_browser67.EmbeddedFlowStatus.Complete) {
|
|
10986
11046
|
onComplete?.(continueResponse);
|
|
10987
|
-
} else if (continueResponse.flowStatus ===
|
|
11047
|
+
} else if (continueResponse.flowStatus === import_browser67.EmbeddedFlowStatus.Incomplete) {
|
|
10988
11048
|
setCurrentFlow(continueResponse);
|
|
10989
11049
|
setupFormFields(continueResponse);
|
|
10990
11050
|
}
|
|
@@ -11038,11 +11098,11 @@ var BaseSignUpContent2 = ({
|
|
|
11038
11098
|
const rawResponse = await onSubmit(payload);
|
|
11039
11099
|
const response = normalizeFlowResponseLocal(rawResponse);
|
|
11040
11100
|
onFlowChange?.(response);
|
|
11041
|
-
if (response.flowStatus ===
|
|
11101
|
+
if (response.flowStatus === import_browser67.EmbeddedFlowStatus.Complete) {
|
|
11042
11102
|
onComplete?.(response);
|
|
11043
11103
|
return;
|
|
11044
11104
|
}
|
|
11045
|
-
if (response.flowStatus ===
|
|
11105
|
+
if (response.flowStatus === import_browser67.EmbeddedFlowStatus.Incomplete) {
|
|
11046
11106
|
if (handleRedirectionIfNeeded(response)) {
|
|
11047
11107
|
return;
|
|
11048
11108
|
}
|
|
@@ -11095,7 +11155,7 @@ var BaseSignUpContent2 = ({
|
|
|
11095
11155
|
const nextResponse = await onSubmit(payload);
|
|
11096
11156
|
const processedResponse = normalizeFlowResponseLocal(nextResponse);
|
|
11097
11157
|
onFlowChange?.(processedResponse);
|
|
11098
|
-
if (processedResponse.flowStatus ===
|
|
11158
|
+
if (processedResponse.flowStatus === import_browser67.EmbeddedFlowStatus.Complete) {
|
|
11099
11159
|
onComplete?.(processedResponse);
|
|
11100
11160
|
} else {
|
|
11101
11161
|
setCurrentFlow(processedResponse);
|
|
@@ -11112,30 +11172,30 @@ var BaseSignUpContent2 = ({
|
|
|
11112
11172
|
}, [passkeyState.isActive, passkeyState.creationOptions, passkeyState.flowId]);
|
|
11113
11173
|
const containerClasses = (0, import_css40.cx)(
|
|
11114
11174
|
[
|
|
11115
|
-
(0,
|
|
11116
|
-
(0,
|
|
11117
|
-
(0,
|
|
11175
|
+
(0, import_browser67.withVendorCSSClassPrefix)("signup"),
|
|
11176
|
+
(0, import_browser67.withVendorCSSClassPrefix)(`signup--${size}`),
|
|
11177
|
+
(0, import_browser67.withVendorCSSClassPrefix)(`signup--${variant}`)
|
|
11118
11178
|
],
|
|
11119
11179
|
className
|
|
11120
11180
|
);
|
|
11121
11181
|
const inputClasses = (0, import_css40.cx)(
|
|
11122
11182
|
[
|
|
11123
|
-
(0,
|
|
11124
|
-
size === "small" && (0,
|
|
11125
|
-
size === "large" && (0,
|
|
11183
|
+
(0, import_browser67.withVendorCSSClassPrefix)("signup__input"),
|
|
11184
|
+
size === "small" && (0, import_browser67.withVendorCSSClassPrefix)("signup__input--small"),
|
|
11185
|
+
size === "large" && (0, import_browser67.withVendorCSSClassPrefix)("signup__input--large")
|
|
11126
11186
|
],
|
|
11127
11187
|
inputClassName
|
|
11128
11188
|
);
|
|
11129
11189
|
const buttonClasses = (0, import_css40.cx)(
|
|
11130
11190
|
[
|
|
11131
|
-
(0,
|
|
11132
|
-
size === "small" && (0,
|
|
11133
|
-
size === "large" && (0,
|
|
11191
|
+
(0, import_browser67.withVendorCSSClassPrefix)("signup__button"),
|
|
11192
|
+
size === "small" && (0, import_browser67.withVendorCSSClassPrefix)("signup__button--small"),
|
|
11193
|
+
size === "large" && (0, import_browser67.withVendorCSSClassPrefix)("signup__button--large")
|
|
11134
11194
|
],
|
|
11135
11195
|
buttonClassName
|
|
11136
11196
|
);
|
|
11137
|
-
const errorClasses = (0, import_css40.cx)([(0,
|
|
11138
|
-
const messageClasses = (0, import_css40.cx)([(0,
|
|
11197
|
+
const errorClasses = (0, import_css40.cx)([(0, import_browser67.withVendorCSSClassPrefix)("signup__error")], errorClassName);
|
|
11198
|
+
const messageClasses = (0, import_css40.cx)([(0, import_browser67.withVendorCSSClassPrefix)("signup__messages")], messageClassName);
|
|
11139
11199
|
const renderComponents = (0, import_react69.useCallback)(
|
|
11140
11200
|
(components) => renderSignUpComponents(
|
|
11141
11201
|
components,
|
|
@@ -11193,11 +11253,11 @@ var BaseSignUpContent2 = ({
|
|
|
11193
11253
|
setCurrentFlow(response);
|
|
11194
11254
|
setIsFlowInitialized(true);
|
|
11195
11255
|
onFlowChange?.(response);
|
|
11196
|
-
if (response.flowStatus ===
|
|
11256
|
+
if (response.flowStatus === import_browser67.EmbeddedFlowStatus.Complete) {
|
|
11197
11257
|
onComplete?.(response);
|
|
11198
11258
|
return;
|
|
11199
11259
|
}
|
|
11200
|
-
if (response.flowStatus ===
|
|
11260
|
+
if (response.flowStatus === import_browser67.EmbeddedFlowStatus.Incomplete) {
|
|
11201
11261
|
setupFormFields(response);
|
|
11202
11262
|
}
|
|
11203
11263
|
} catch (err) {
|
|
@@ -11294,7 +11354,7 @@ var BaseSignUp_default2 = BaseSignUp2;
|
|
|
11294
11354
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
11295
11355
|
var BaseSignUp3 = (props) => {
|
|
11296
11356
|
const { platform } = useAsgardeo_default();
|
|
11297
|
-
if (platform ===
|
|
11357
|
+
if (platform === import_browser68.Platform.AsgardeoV2) {
|
|
11298
11358
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BaseSignUp_default2, { ...props });
|
|
11299
11359
|
}
|
|
11300
11360
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(BaseSignUp_default, { ...props });
|
|
@@ -11302,10 +11362,10 @@ var BaseSignUp3 = (props) => {
|
|
|
11302
11362
|
var BaseSignUp_default3 = BaseSignUp3;
|
|
11303
11363
|
|
|
11304
11364
|
// src/components/presentation/auth/SignUp/SignUp.tsx
|
|
11305
|
-
var
|
|
11365
|
+
var import_browser71 = require("@asgardeo/browser");
|
|
11306
11366
|
|
|
11307
11367
|
// src/components/presentation/auth/SignUp/v1/SignUp.tsx
|
|
11308
|
-
var
|
|
11368
|
+
var import_browser69 = require("@asgardeo/browser");
|
|
11309
11369
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
11310
11370
|
var SignUp = ({
|
|
11311
11371
|
className,
|
|
@@ -11320,17 +11380,17 @@ var SignUp = ({
|
|
|
11320
11380
|
const { signUp, isInitialized } = useAsgardeo_default();
|
|
11321
11381
|
const handleInitialize = async (payload) => {
|
|
11322
11382
|
const initialPayload = payload || {
|
|
11323
|
-
flowType:
|
|
11383
|
+
flowType: import_browser69.EmbeddedFlowType.Registration
|
|
11324
11384
|
};
|
|
11325
11385
|
return await signUp(initialPayload);
|
|
11326
11386
|
};
|
|
11327
11387
|
const handleOnSubmit = async (payload) => await signUp(payload);
|
|
11328
11388
|
const handleComplete = (response) => {
|
|
11329
11389
|
onComplete?.(response);
|
|
11330
|
-
if (shouldRedirectAfterSignUp && response?.type !==
|
|
11390
|
+
if (shouldRedirectAfterSignUp && response?.type !== import_browser69.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
|
|
11331
11391
|
window.location.href = afterSignUpUrl;
|
|
11332
11392
|
}
|
|
11333
|
-
if (shouldRedirectAfterSignUp && response?.type ===
|
|
11393
|
+
if (shouldRedirectAfterSignUp && response?.type === import_browser69.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
|
|
11334
11394
|
!response.data.redirectURL.includes("auth")) {
|
|
11335
11395
|
window.location.href = response.data.redirectURL;
|
|
11336
11396
|
}
|
|
@@ -11357,7 +11417,7 @@ var SignUp = ({
|
|
|
11357
11417
|
var SignUp_default = SignUp;
|
|
11358
11418
|
|
|
11359
11419
|
// src/components/presentation/auth/SignUp/v2/SignUp.tsx
|
|
11360
|
-
var
|
|
11420
|
+
var import_browser70 = require("@asgardeo/browser");
|
|
11361
11421
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
11362
11422
|
var SignUp2 = ({
|
|
11363
11423
|
className,
|
|
@@ -11375,7 +11435,7 @@ var SignUp2 = ({
|
|
|
11375
11435
|
const applicationIdFromUrl = urlParams.get("applicationId");
|
|
11376
11436
|
const effectiveApplicationId = applicationId || applicationIdFromUrl;
|
|
11377
11437
|
const initialPayload = payload || {
|
|
11378
|
-
flowType:
|
|
11438
|
+
flowType: import_browser70.EmbeddedFlowType.Registration,
|
|
11379
11439
|
...effectiveApplicationId && { applicationId: effectiveApplicationId }
|
|
11380
11440
|
};
|
|
11381
11441
|
return await signUp(initialPayload);
|
|
@@ -11388,10 +11448,10 @@ var SignUp2 = ({
|
|
|
11388
11448
|
window.location.href = oauthRedirectUrl;
|
|
11389
11449
|
return;
|
|
11390
11450
|
}
|
|
11391
|
-
if (shouldRedirectAfterSignUp && response?.type !==
|
|
11451
|
+
if (shouldRedirectAfterSignUp && response?.type !== import_browser70.EmbeddedFlowResponseType.Redirection && afterSignUpUrl) {
|
|
11392
11452
|
window.location.href = afterSignUpUrl;
|
|
11393
11453
|
}
|
|
11394
|
-
if (shouldRedirectAfterSignUp && response?.type ===
|
|
11454
|
+
if (shouldRedirectAfterSignUp && response?.type === import_browser70.EmbeddedFlowResponseType.Redirection && response?.data?.redirectURL && !response.data.redirectURL.includes("oauth") && // Not a social provider redirect
|
|
11395
11455
|
!response.data.redirectURL.includes("auth")) {
|
|
11396
11456
|
window.location.href = response.data.redirectURL;
|
|
11397
11457
|
}
|
|
@@ -11408,7 +11468,6 @@ var SignUp2 = ({
|
|
|
11408
11468
|
size,
|
|
11409
11469
|
isInitialized,
|
|
11410
11470
|
children,
|
|
11411
|
-
showLogo: true,
|
|
11412
11471
|
showTitle: true,
|
|
11413
11472
|
showSubtitle: true,
|
|
11414
11473
|
...rest
|
|
@@ -11421,7 +11480,7 @@ var SignUp_default2 = SignUp2;
|
|
|
11421
11480
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
11422
11481
|
var SignUp3 = (props) => {
|
|
11423
11482
|
const { platform } = useAsgardeo_default();
|
|
11424
|
-
if (platform ===
|
|
11483
|
+
if (platform === import_browser71.Platform.AsgardeoV2) {
|
|
11425
11484
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SignUp_default2, { ...props });
|
|
11426
11485
|
}
|
|
11427
11486
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SignUp_default, { ...props });
|
|
@@ -11429,10 +11488,10 @@ var SignUp3 = (props) => {
|
|
|
11429
11488
|
var SignUp_default3 = SignUp3;
|
|
11430
11489
|
|
|
11431
11490
|
// src/components/presentation/auth/InviteUser/v2/InviteUser.tsx
|
|
11432
|
-
var
|
|
11491
|
+
var import_browser73 = require("@asgardeo/browser");
|
|
11433
11492
|
|
|
11434
11493
|
// src/components/presentation/auth/InviteUser/v2/BaseInviteUser.tsx
|
|
11435
|
-
var
|
|
11494
|
+
var import_browser72 = require("@asgardeo/browser");
|
|
11436
11495
|
var import_css42 = require("@emotion/css");
|
|
11437
11496
|
var import_react71 = require("react");
|
|
11438
11497
|
|
|
@@ -11683,7 +11742,7 @@ var BaseInviteUser = ({
|
|
|
11683
11742
|
setApiError(null);
|
|
11684
11743
|
try {
|
|
11685
11744
|
const payload = {
|
|
11686
|
-
flowType:
|
|
11745
|
+
flowType: import_browser72.EmbeddedFlowType.UserOnboarding,
|
|
11687
11746
|
verbose: true
|
|
11688
11747
|
};
|
|
11689
11748
|
const rawResponse = await onInitialize(payload);
|
|
@@ -11875,7 +11934,7 @@ var InviteUser = ({
|
|
|
11875
11934
|
const response = await http2.request({
|
|
11876
11935
|
data: {
|
|
11877
11936
|
...payload,
|
|
11878
|
-
flowType:
|
|
11937
|
+
flowType: import_browser73.EmbeddedFlowType.UserOnboarding,
|
|
11879
11938
|
verbose: true
|
|
11880
11939
|
},
|
|
11881
11940
|
headers: {
|
|
@@ -12428,7 +12487,7 @@ var AcceptInvite = ({
|
|
|
12428
12487
|
var AcceptInvite_default = AcceptInvite;
|
|
12429
12488
|
|
|
12430
12489
|
// src/components/auth/Callback/Callback.tsx
|
|
12431
|
-
var
|
|
12490
|
+
var import_browser74 = require("@asgardeo/browser");
|
|
12432
12491
|
var import_react75 = require("react");
|
|
12433
12492
|
var Callback = ({ onNavigate, onError }) => {
|
|
12434
12493
|
const processingRef = (0, import_react75.useRef)(false);
|
|
@@ -12436,7 +12495,7 @@ var Callback = ({ onNavigate, onError }) => {
|
|
|
12436
12495
|
if (onNavigate) {
|
|
12437
12496
|
onNavigate(path);
|
|
12438
12497
|
} else {
|
|
12439
|
-
(0,
|
|
12498
|
+
(0, import_browser74.navigate)(path);
|
|
12440
12499
|
}
|
|
12441
12500
|
};
|
|
12442
12501
|
(0, import_react75.useEffect)(() => {
|
|
@@ -12561,12 +12620,12 @@ Organization5.displayName = "Organization";
|
|
|
12561
12620
|
var Organization_default = Organization5;
|
|
12562
12621
|
|
|
12563
12622
|
// src/components/presentation/UserProfile/BaseUserProfile.tsx
|
|
12564
|
-
var
|
|
12623
|
+
var import_browser80 = require("@asgardeo/browser");
|
|
12565
12624
|
var import_css52 = require("@emotion/css");
|
|
12566
12625
|
var import_react84 = require("react");
|
|
12567
12626
|
|
|
12568
12627
|
// src/components/presentation/UserProfile/BaseUserProfile.styles.ts
|
|
12569
|
-
var
|
|
12628
|
+
var import_browser75 = require("@asgardeo/browser");
|
|
12570
12629
|
var import_css45 = require("@emotion/css");
|
|
12571
12630
|
var import_react76 = require("react");
|
|
12572
12631
|
var useStyles20 = (theme, colorScheme) => {
|
|
@@ -12705,7 +12764,7 @@ var useStyles20 = (theme, colorScheme) => {
|
|
|
12705
12764
|
max-width: 350px;
|
|
12706
12765
|
text-align: start;
|
|
12707
12766
|
|
|
12708
|
-
.${(0,
|
|
12767
|
+
.${(0, import_browser75.withVendorCSSClassPrefix)("form-control")} {
|
|
12709
12768
|
margin-bottom: 0;
|
|
12710
12769
|
}
|
|
12711
12770
|
|
|
@@ -12770,20 +12829,20 @@ var useStyles20 = (theme, colorScheme) => {
|
|
|
12770
12829
|
var BaseUserProfile_styles_default = useStyles20;
|
|
12771
12830
|
|
|
12772
12831
|
// src/utils/getMappedUserProfileValue.ts
|
|
12773
|
-
var
|
|
12832
|
+
var import_browser76 = require("@asgardeo/browser");
|
|
12774
12833
|
var getMappedUserProfileValue = (key, mappings, user) => {
|
|
12775
12834
|
if (!key || !mappings || !user) {
|
|
12776
12835
|
return void 0;
|
|
12777
12836
|
}
|
|
12778
12837
|
const mapping = mappings[key];
|
|
12779
12838
|
if (!mapping) {
|
|
12780
|
-
return (0,
|
|
12839
|
+
return (0, import_browser76.get)(user, key);
|
|
12781
12840
|
}
|
|
12782
12841
|
if (Array.isArray(mapping)) {
|
|
12783
12842
|
let foundValue;
|
|
12784
12843
|
let found = false;
|
|
12785
12844
|
mapping.some((path) => {
|
|
12786
|
-
const value = (0,
|
|
12845
|
+
const value = (0, import_browser76.get)(user, path);
|
|
12787
12846
|
if (value !== void 0 && value !== null && value !== "") {
|
|
12788
12847
|
foundValue = value;
|
|
12789
12848
|
found = true;
|
|
@@ -12793,7 +12852,7 @@ var getMappedUserProfileValue = (key, mappings, user) => {
|
|
|
12793
12852
|
});
|
|
12794
12853
|
return found ? foundValue : void 0;
|
|
12795
12854
|
}
|
|
12796
|
-
return (0,
|
|
12855
|
+
return (0, import_browser76.get)(user, mapping);
|
|
12797
12856
|
};
|
|
12798
12857
|
var getMappedUserProfileValue_default = getMappedUserProfileValue;
|
|
12799
12858
|
|
|
@@ -12823,7 +12882,7 @@ var getDisplayName = (mergedMappings, user, displayAttributes) => {
|
|
|
12823
12882
|
var getDisplayName_default = getDisplayName;
|
|
12824
12883
|
|
|
12825
12884
|
// src/components/primitives/Avatar/Avatar.tsx
|
|
12826
|
-
var
|
|
12885
|
+
var import_browser77 = require("@asgardeo/browser");
|
|
12827
12886
|
var import_css47 = require("@emotion/css");
|
|
12828
12887
|
var import_react78 = require("react");
|
|
12829
12888
|
|
|
@@ -12946,7 +13005,7 @@ var Avatar = ({
|
|
|
12946
13005
|
{
|
|
12947
13006
|
src: imageUrl,
|
|
12948
13007
|
alt,
|
|
12949
|
-
className: (0, import_css47.cx)((0,
|
|
13008
|
+
className: (0, import_css47.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar", "image")), styles["image"])
|
|
12950
13009
|
}
|
|
12951
13010
|
);
|
|
12952
13011
|
}
|
|
@@ -12954,14 +13013,14 @@ var Avatar = ({
|
|
|
12954
13013
|
return getInitials(name);
|
|
12955
13014
|
}
|
|
12956
13015
|
if (isLoading) {
|
|
12957
|
-
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css47.cx)((0,
|
|
13016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: (0, import_css47.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar", "skeleton")), styles["skeleton"]) });
|
|
12958
13017
|
}
|
|
12959
13018
|
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
12960
13019
|
"svg",
|
|
12961
13020
|
{
|
|
12962
13021
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12963
13022
|
viewBox: "0 0 640 640",
|
|
12964
|
-
className: (0, import_css47.cx)((0,
|
|
13023
|
+
className: (0, import_css47.cx)((0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar", "icon")), styles["icon"]),
|
|
12965
13024
|
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { d: "M240 192C240 147.8 275.8 112 320 112C364.2 112 400 147.8 400 192C400 236.2 364.2 272 320 272C275.8 272 240 236.2 240 192zM448 192C448 121.3 390.7 64 320 64C249.3 64 192 121.3 192 192C192 262.7 249.3 320 320 320C390.7 320 448 262.7 448 192zM144 544C144 473.3 201.3 416 272 416L368 416C438.7 416 496 473.3 496 544L496 552C496 565.3 506.7 576 520 576C533.3 576 544 565.3 544 552L544 544C544 446.8 465.2 368 368 368L272 368C174.8 368 96 446.8 96 544L96 552C96 565.3 106.7 576 120 576C133.3 576 144 565.3 144 552L144 544z" })
|
|
12966
13025
|
}
|
|
12967
13026
|
);
|
|
@@ -12970,11 +13029,11 @@ var Avatar = ({
|
|
|
12970
13029
|
"div",
|
|
12971
13030
|
{
|
|
12972
13031
|
className: (0, import_css47.cx)(
|
|
12973
|
-
(0,
|
|
13032
|
+
(0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar")),
|
|
12974
13033
|
styles["avatar"],
|
|
12975
13034
|
styles["variant"],
|
|
12976
|
-
(0,
|
|
12977
|
-
isDefaultState && (0,
|
|
13035
|
+
(0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar", null, variant)),
|
|
13036
|
+
isDefaultState && (0, import_browser77.withVendorCSSClassPrefix)((0, import_browser77.bem)("avatar", "default")),
|
|
12978
13037
|
className
|
|
12979
13038
|
),
|
|
12980
13039
|
children: renderContent()
|
|
@@ -12983,7 +13042,7 @@ var Avatar = ({
|
|
|
12983
13042
|
};
|
|
12984
13043
|
|
|
12985
13044
|
// src/components/primitives/Dialog/Dialog.tsx
|
|
12986
|
-
var
|
|
13045
|
+
var import_browser78 = require("@asgardeo/browser");
|
|
12987
13046
|
var import_css49 = require("@emotion/css");
|
|
12988
13047
|
var import_react80 = require("@floating-ui/react");
|
|
12989
13048
|
var import_react81 = require("react");
|
|
@@ -13223,13 +13282,13 @@ var DialogContent = (0, import_react81.forwardRef)(
|
|
|
13223
13282
|
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react80.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
13224
13283
|
import_react80.FloatingOverlay,
|
|
13225
13284
|
{
|
|
13226
|
-
className: (0, import_css49.cx)((0,
|
|
13285
|
+
className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "overlay")), styles["overlay"]),
|
|
13227
13286
|
lockScroll: true,
|
|
13228
13287
|
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react80.FloatingFocusManager, { context: floatingContext, initialFocus: -1, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
13229
13288
|
"div",
|
|
13230
13289
|
{
|
|
13231
13290
|
ref,
|
|
13232
|
-
className: (0, import_css49.cx)((0,
|
|
13291
|
+
className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "content")), styles["content"], props.className),
|
|
13233
13292
|
"aria-labelledby": context.labelId,
|
|
13234
13293
|
"aria-describedby": context.descriptionId,
|
|
13235
13294
|
...context.getFloatingProps(props),
|
|
@@ -13252,14 +13311,14 @@ var DialogHeading = (0, import_react81.forwardRef)(
|
|
|
13252
13311
|
context.setLabelId(void 0);
|
|
13253
13312
|
};
|
|
13254
13313
|
}, [id, context.setLabelId]);
|
|
13255
|
-
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_css49.cx)((0,
|
|
13314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "header")), styles["header"]), children: [
|
|
13256
13315
|
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
13257
13316
|
"h2",
|
|
13258
13317
|
{
|
|
13259
13318
|
...props,
|
|
13260
13319
|
ref,
|
|
13261
13320
|
id,
|
|
13262
|
-
className: (0, import_css49.cx)((0,
|
|
13321
|
+
className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "title")), styles["headerTitle"]),
|
|
13263
13322
|
children
|
|
13264
13323
|
}
|
|
13265
13324
|
),
|
|
@@ -13298,7 +13357,7 @@ var DialogDescription = (0, import_react81.forwardRef)(
|
|
|
13298
13357
|
...props,
|
|
13299
13358
|
ref,
|
|
13300
13359
|
id,
|
|
13301
|
-
className: (0, import_css49.cx)((0,
|
|
13360
|
+
className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "description")), styles["description"], props.className),
|
|
13302
13361
|
children
|
|
13303
13362
|
}
|
|
13304
13363
|
);
|
|
@@ -13327,7 +13386,7 @@ var DialogClose = (0, import_react81.forwardRef)(
|
|
|
13327
13386
|
...props,
|
|
13328
13387
|
ref,
|
|
13329
13388
|
onClick: handleClick,
|
|
13330
|
-
className: (0, import_css49.cx)((0,
|
|
13389
|
+
className: (0, import_css49.cx)((0, import_browser78.withVendorCSSClassPrefix)((0, import_browser78.bem)("dialog", "close")), props.className),
|
|
13331
13390
|
variant: "text",
|
|
13332
13391
|
children
|
|
13333
13392
|
}
|
|
@@ -13347,7 +13406,7 @@ Dialog.Close = DialogClose;
|
|
|
13347
13406
|
var Dialog_default = Dialog;
|
|
13348
13407
|
|
|
13349
13408
|
// src/components/primitives/MultiInput/MultiInput.tsx
|
|
13350
|
-
var
|
|
13409
|
+
var import_browser79 = require("@asgardeo/browser");
|
|
13351
13410
|
var import_css51 = require("@emotion/css");
|
|
13352
13411
|
var import_react83 = require("react");
|
|
13353
13412
|
|
|
@@ -13540,26 +13599,26 @@ var MultiInput = ({
|
|
|
13540
13599
|
{
|
|
13541
13600
|
error,
|
|
13542
13601
|
helperText,
|
|
13543
|
-
className: (0, import_css51.cx)((0,
|
|
13602
|
+
className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input")), className),
|
|
13544
13603
|
style,
|
|
13545
13604
|
children: [
|
|
13546
13605
|
label && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(InputLabel_default, { required, error: !!error, children: label }),
|
|
13547
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: (0, import_css51.cx)((0,
|
|
13548
|
-
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_css51.cx)((0,
|
|
13606
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "container")), styles["container"]), children: [
|
|
13607
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "input-row")), styles["inputRow"]), children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "input-wrapper")), styles["inputWrapper"]), children: renderInputField(
|
|
13549
13608
|
currentInputValue,
|
|
13550
13609
|
setCurrentInputValue,
|
|
13551
13610
|
canAddMore ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PlusIcon, { iconClassName: styles["plusIcon"] }) : void 0,
|
|
13552
13611
|
canAddMore ? handleInputSubmit : void 0
|
|
13553
13612
|
) }) }),
|
|
13554
|
-
values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_css51.cx)((0,
|
|
13613
|
+
values.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "list-container")), styles["listContainer"]), children: values.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
13555
13614
|
"div",
|
|
13556
13615
|
{
|
|
13557
|
-
className: (0, import_css51.cx)((0,
|
|
13616
|
+
className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "list-item")), styles["listItem"]),
|
|
13558
13617
|
children: [
|
|
13559
13618
|
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
13560
13619
|
"span",
|
|
13561
13620
|
{
|
|
13562
|
-
className: (0, import_css51.cx)((0,
|
|
13621
|
+
className: (0, import_css51.cx)((0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "list-item-text")), styles["listItemText"]),
|
|
13563
13622
|
children: value
|
|
13564
13623
|
}
|
|
13565
13624
|
),
|
|
@@ -13570,7 +13629,7 @@ var MultiInput = ({
|
|
|
13570
13629
|
onClick: () => handleRemoveValue(index),
|
|
13571
13630
|
disabled,
|
|
13572
13631
|
className: (0, import_css51.cx)(
|
|
13573
|
-
(0,
|
|
13632
|
+
(0, import_browser79.withVendorCSSClassPrefix)((0, import_browser79.bem)("multi-input", "remove-button")),
|
|
13574
13633
|
styles["removeButton"]
|
|
13575
13634
|
),
|
|
13576
13635
|
title: "Remove value",
|
|
@@ -13731,7 +13790,7 @@ var BaseUserProfile = ({
|
|
|
13731
13790
|
fieldValue = fieldValue.filter((v) => v !== void 0 && v !== null && v !== "");
|
|
13732
13791
|
}
|
|
13733
13792
|
let payload = {};
|
|
13734
|
-
if (schema.schemaId && schema.schemaId !==
|
|
13793
|
+
if (schema.schemaId && schema.schemaId !== import_browser80.WellKnownSchemaIds.User) {
|
|
13735
13794
|
payload = {
|
|
13736
13795
|
[schema.schemaId]: {
|
|
13737
13796
|
[fieldName]: fieldValue
|
|
@@ -13997,7 +14056,7 @@ var BaseUserProfile = ({
|
|
|
13997
14056
|
const containerClasses = (0, import_css52.cx)(
|
|
13998
14057
|
styles.root,
|
|
13999
14058
|
cardLayout ? styles.card : "",
|
|
14000
|
-
(0,
|
|
14059
|
+
(0, import_browser80.withVendorCSSClassPrefix)("user-profile"),
|
|
14001
14060
|
className
|
|
14002
14061
|
);
|
|
14003
14062
|
const currentUser = flattenedProfile || profile;
|
|
@@ -14038,7 +14097,7 @@ var BaseUserProfile = ({
|
|
|
14038
14097
|
Alert_default,
|
|
14039
14098
|
{
|
|
14040
14099
|
variant: "error",
|
|
14041
|
-
className: (0, import_css52.cx)((0,
|
|
14100
|
+
className: (0, import_css52.cx)((0, import_browser80.withVendorCSSClassPrefix)((0, import_browser80.bem)("user-profile", "alert")), styles.alert),
|
|
14042
14101
|
children: [
|
|
14043
14102
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Alert_default.Title, { children: t("errors.heading") || "Error" }),
|
|
14044
14103
|
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Alert_default.Description, { children: error })
|
|
@@ -14086,14 +14145,14 @@ var BaseUserProfile = ({
|
|
|
14086
14145
|
var BaseUserProfile_default = BaseUserProfile;
|
|
14087
14146
|
|
|
14088
14147
|
// src/components/presentation/UserProfile/UserProfile.tsx
|
|
14089
|
-
var
|
|
14148
|
+
var import_browser82 = require("@asgardeo/browser");
|
|
14090
14149
|
var import_react85 = require("react");
|
|
14091
14150
|
|
|
14092
14151
|
// src/api/updateMeProfile.ts
|
|
14093
|
-
var
|
|
14152
|
+
var import_browser81 = require("@asgardeo/browser");
|
|
14094
14153
|
var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
|
|
14095
14154
|
const defaultFetcher = async (url, config) => {
|
|
14096
|
-
const client =
|
|
14155
|
+
const client = import_browser81.AsgardeoSPAClient.getInstance(instanceId);
|
|
14097
14156
|
const httpClient = client.httpRequest.bind(client);
|
|
14098
14157
|
const response = await httpClient({
|
|
14099
14158
|
data: config.body ? JSON.parse(config.body) : void 0,
|
|
@@ -14109,7 +14168,7 @@ var updateMeProfile = async ({ fetcher, instanceId = 0, ...requestConfig }) => {
|
|
|
14109
14168
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
14110
14169
|
};
|
|
14111
14170
|
};
|
|
14112
|
-
return (0,
|
|
14171
|
+
return (0, import_browser81.updateMeProfile)({
|
|
14113
14172
|
...requestConfig,
|
|
14114
14173
|
fetcher: fetcher || defaultFetcher
|
|
14115
14174
|
});
|
|
@@ -14130,7 +14189,7 @@ var UserProfile3 = ({ preferences, ...rest }) => {
|
|
|
14130
14189
|
onUpdateProfile(response);
|
|
14131
14190
|
} catch (caughtError) {
|
|
14132
14191
|
let message = t("user.profile.update.generic.error");
|
|
14133
|
-
if (caughtError instanceof
|
|
14192
|
+
if (caughtError instanceof import_browser82.AsgardeoError) {
|
|
14134
14193
|
message = caughtError?.message;
|
|
14135
14194
|
}
|
|
14136
14195
|
setError(message);
|
|
@@ -14152,7 +14211,7 @@ var UserProfile3 = ({ preferences, ...rest }) => {
|
|
|
14152
14211
|
var UserProfile_default = UserProfile3;
|
|
14153
14212
|
|
|
14154
14213
|
// src/components/presentation/UserDropdown/BaseUserDropdown.tsx
|
|
14155
|
-
var
|
|
14214
|
+
var import_browser83 = require("@asgardeo/browser");
|
|
14156
14215
|
var import_css54 = require("@emotion/css");
|
|
14157
14216
|
var import_react87 = require("@floating-ui/react");
|
|
14158
14217
|
var import_react88 = require("react");
|
|
@@ -14418,12 +14477,12 @@ var BaseUserDropdown = ({
|
|
|
14418
14477
|
}
|
|
14419
14478
|
allMenuItems.push(...defaultMenuItems);
|
|
14420
14479
|
}
|
|
14421
|
-
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0,
|
|
14480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown"), className), children: [
|
|
14422
14481
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
14423
14482
|
Button_default,
|
|
14424
14483
|
{
|
|
14425
14484
|
ref: refs.setReference,
|
|
14426
|
-
className: (0, import_css54.cx)((0,
|
|
14485
|
+
className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__trigger"), styles["trigger"]),
|
|
14427
14486
|
color: "tertiary",
|
|
14428
14487
|
variant: "text",
|
|
14429
14488
|
size: "medium",
|
|
@@ -14443,7 +14502,7 @@ var BaseUserDropdown = ({
|
|
|
14443
14502
|
Typography_default,
|
|
14444
14503
|
{
|
|
14445
14504
|
variant: "body2",
|
|
14446
|
-
className: (0, import_css54.cx)((0,
|
|
14505
|
+
className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__trigger-label"), styles["userName"]),
|
|
14447
14506
|
children: getDisplayName_default(mergedMappings, user)
|
|
14448
14507
|
}
|
|
14449
14508
|
)
|
|
@@ -14454,7 +14513,7 @@ var BaseUserDropdown = ({
|
|
|
14454
14513
|
"div",
|
|
14455
14514
|
{
|
|
14456
14515
|
ref: refs.setFloating,
|
|
14457
|
-
className: (0, import_css54.cx)((0,
|
|
14516
|
+
className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__content"), styles["dropdownContent"]),
|
|
14458
14517
|
style: {
|
|
14459
14518
|
...floatingStyles,
|
|
14460
14519
|
// Floating UI doesn't set a z-index by default, so we set a high value to ensure the dropdown appears above other elements.
|
|
@@ -14463,7 +14522,7 @@ var BaseUserDropdown = ({
|
|
|
14463
14522
|
},
|
|
14464
14523
|
...getFloatingProps(),
|
|
14465
14524
|
children: [
|
|
14466
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0,
|
|
14525
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__header"), styles["dropdownHeader"]), children: [
|
|
14467
14526
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
14468
14527
|
Avatar,
|
|
14469
14528
|
{
|
|
@@ -14473,12 +14532,12 @@ var BaseUserDropdown = ({
|
|
|
14473
14532
|
alt: `${getDisplayName_default(mergedMappings, user)}'s avatar`
|
|
14474
14533
|
}
|
|
14475
14534
|
),
|
|
14476
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0,
|
|
14535
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__header-info"), styles["headerInfo"]), children: [
|
|
14477
14536
|
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
14478
14537
|
Typography_default,
|
|
14479
14538
|
{
|
|
14480
14539
|
noWrap: true,
|
|
14481
|
-
className: (0,
|
|
14540
|
+
className: (0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__header-name"),
|
|
14482
14541
|
variant: "body1",
|
|
14483
14542
|
fontWeight: "medium",
|
|
14484
14543
|
children: getDisplayName_default(mergedMappings, user)
|
|
@@ -14488,7 +14547,7 @@ var BaseUserDropdown = ({
|
|
|
14488
14547
|
Typography_default,
|
|
14489
14548
|
{
|
|
14490
14549
|
noWrap: true,
|
|
14491
|
-
className: (0,
|
|
14550
|
+
className: (0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__header-email"),
|
|
14492
14551
|
variant: "caption",
|
|
14493
14552
|
color: "secondary",
|
|
14494
14553
|
children: getMappedUserProfileValue_default("username", mergedMappings, user) || getMappedUserProfileValue_default("email", mergedMappings, user)
|
|
@@ -14496,12 +14555,12 @@ var BaseUserDropdown = ({
|
|
|
14496
14555
|
)
|
|
14497
14556
|
] })
|
|
14498
14557
|
] }),
|
|
14499
|
-
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: (0, import_css54.cx)((0,
|
|
14558
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__menu"), styles["dropdownMenu"]), children: allMenuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { children: (() => {
|
|
14500
14559
|
if (item.label === "") {
|
|
14501
14560
|
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
14502
14561
|
"div",
|
|
14503
14562
|
{
|
|
14504
|
-
className: (0, import_css54.cx)((0,
|
|
14563
|
+
className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__menu-divider"), styles["divider"])
|
|
14505
14564
|
}
|
|
14506
14565
|
);
|
|
14507
14566
|
}
|
|
@@ -14514,7 +14573,7 @@ var BaseUserDropdown = ({
|
|
|
14514
14573
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
14515
14574
|
},
|
|
14516
14575
|
className: (0, import_css54.cx)(
|
|
14517
|
-
(0,
|
|
14576
|
+
(0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__menu-item"),
|
|
14518
14577
|
styles["menuItemAnchor"]
|
|
14519
14578
|
),
|
|
14520
14579
|
onMouseEnter: () => setHoveredItemIndex(index),
|
|
@@ -14535,7 +14594,7 @@ var BaseUserDropdown = ({
|
|
|
14535
14594
|
style: {
|
|
14536
14595
|
backgroundColor: hoveredItemIndex === index ? theme.vars.colors.action?.hover : "transparent"
|
|
14537
14596
|
},
|
|
14538
|
-
className: (0, import_css54.cx)((0,
|
|
14597
|
+
className: (0, import_css54.cx)((0, import_browser83.withVendorCSSClassPrefix)("user-dropdown__menu-item"), styles["menuItem"]),
|
|
14539
14598
|
color: "tertiary",
|
|
14540
14599
|
variant: "text",
|
|
14541
14600
|
size: "small",
|
|
@@ -15195,7 +15254,7 @@ var BuildingAlt_default = BuildingAlt;
|
|
|
15195
15254
|
var import_react95 = require("react");
|
|
15196
15255
|
|
|
15197
15256
|
// src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
|
|
15198
|
-
var
|
|
15257
|
+
var import_browser84 = require("@asgardeo/browser");
|
|
15199
15258
|
var import_css58 = require("@emotion/css");
|
|
15200
15259
|
var import_react94 = require("react");
|
|
15201
15260
|
|
|
@@ -15339,7 +15398,7 @@ var BaseCreateOrganization_styles_default = useStyles26;
|
|
|
15339
15398
|
|
|
15340
15399
|
// src/components/presentation/CreateOrganization/BaseCreateOrganization.tsx
|
|
15341
15400
|
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
15342
|
-
var logger8 = (0,
|
|
15401
|
+
var logger8 = (0, import_browser84.createPackageComponentLogger)(
|
|
15343
15402
|
"@asgardeo/react",
|
|
15344
15403
|
"BaseCreateOrganization"
|
|
15345
15404
|
);
|
|
@@ -15492,14 +15551,14 @@ var BaseCreateOrganization = ({
|
|
|
15492
15551
|
};
|
|
15493
15552
|
|
|
15494
15553
|
// src/api/createOrganization.ts
|
|
15495
|
-
var
|
|
15554
|
+
var import_browser85 = require("@asgardeo/browser");
|
|
15496
15555
|
var createOrganization = async ({
|
|
15497
15556
|
fetcher,
|
|
15498
15557
|
instanceId = 0,
|
|
15499
15558
|
...requestConfig
|
|
15500
15559
|
}) => {
|
|
15501
15560
|
const defaultFetcher = async (url, config) => {
|
|
15502
|
-
const client =
|
|
15561
|
+
const client = import_browser85.AsgardeoSPAClient.getInstance(instanceId);
|
|
15503
15562
|
const httpClient = client.httpRequest.bind(client);
|
|
15504
15563
|
const response = await httpClient({
|
|
15505
15564
|
data: config.body ? JSON.parse(config.body) : void 0,
|
|
@@ -15515,7 +15574,7 @@ var createOrganization = async ({
|
|
|
15515
15574
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
15516
15575
|
};
|
|
15517
15576
|
};
|
|
15518
|
-
return (0,
|
|
15577
|
+
return (0, import_browser85.createOrganization)({
|
|
15519
15578
|
...requestConfig,
|
|
15520
15579
|
fetcher: fetcher || defaultFetcher
|
|
15521
15580
|
});
|
|
@@ -16071,11 +16130,11 @@ var OrganizationList = (props) => {
|
|
|
16071
16130
|
var OrganizationList_default = OrganizationList;
|
|
16072
16131
|
|
|
16073
16132
|
// src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
|
|
16074
|
-
var
|
|
16133
|
+
var import_browser90 = require("@asgardeo/browser");
|
|
16075
16134
|
var import_react104 = require("react");
|
|
16076
16135
|
|
|
16077
16136
|
// src/components/presentation/OrganizationProfile/BaseOrganizationProfile.tsx
|
|
16078
|
-
var
|
|
16137
|
+
var import_browser87 = require("@asgardeo/browser");
|
|
16079
16138
|
var import_css66 = require("@emotion/css");
|
|
16080
16139
|
var import_react103 = require("react");
|
|
16081
16140
|
|
|
@@ -16236,7 +16295,7 @@ var useStyles29 = (theme, colorScheme) => (0, import_react100.useMemo)(
|
|
|
16236
16295
|
var BaseOrganizationProfile_styles_default = useStyles29;
|
|
16237
16296
|
|
|
16238
16297
|
// src/components/primitives/KeyValueInput/KeyValueInput.tsx
|
|
16239
|
-
var
|
|
16298
|
+
var import_browser86 = require("@asgardeo/browser");
|
|
16240
16299
|
var import_css65 = require("@emotion/css");
|
|
16241
16300
|
var import_react102 = require("react");
|
|
16242
16301
|
|
|
@@ -16472,21 +16531,21 @@ var KeyValueInput = ({
|
|
|
16472
16531
|
const isAddDisabled = disabled || readOnly || !canAddMore || !newKey.trim() || !newValue.trim();
|
|
16473
16532
|
const renderReadOnlyContent = () => {
|
|
16474
16533
|
if (pairs.length === 0) {
|
|
16475
|
-
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_css65.cx)((0,
|
|
16534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "empty-state")), styles["emptyState"]), children: "No attributes defined" });
|
|
16476
16535
|
}
|
|
16477
16536
|
return pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
16478
16537
|
"div",
|
|
16479
16538
|
{
|
|
16480
|
-
className: (0, import_css65.cx)((0,
|
|
16539
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "readonly-pair")), styles["readOnlyPair"]),
|
|
16481
16540
|
children: [
|
|
16482
|
-
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: (0, import_css65.cx)((0,
|
|
16541
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("span", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "readonly-key")), styles["readOnlyKey"]), children: [
|
|
16483
16542
|
pair.key,
|
|
16484
16543
|
":"
|
|
16485
16544
|
] }),
|
|
16486
16545
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
16487
16546
|
"span",
|
|
16488
16547
|
{
|
|
16489
|
-
className: (0, import_css65.cx)((0,
|
|
16548
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "readonly-value")), styles["readOnlyValue"]),
|
|
16490
16549
|
children: pair.value
|
|
16491
16550
|
}
|
|
16492
16551
|
)
|
|
@@ -16495,22 +16554,22 @@ var KeyValueInput = ({
|
|
|
16495
16554
|
`${pair.key}-${index}`
|
|
16496
16555
|
));
|
|
16497
16556
|
};
|
|
16498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0,
|
|
16499
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("label", { className: (0, import_css65.cx)((0,
|
|
16557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input")), styles["container"], className), children: [
|
|
16558
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("label", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "label")), styles["label"]), children: [
|
|
16500
16559
|
label,
|
|
16501
16560
|
required && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
16502
16561
|
"span",
|
|
16503
16562
|
{
|
|
16504
|
-
className: (0, import_css65.cx)((0,
|
|
16563
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "required")), styles["requiredIndicator"]),
|
|
16505
16564
|
children: " *"
|
|
16506
16565
|
}
|
|
16507
16566
|
)
|
|
16508
16567
|
] }),
|
|
16509
|
-
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0,
|
|
16568
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pairs-list")), styles["pairsList"]), children: [
|
|
16510
16569
|
readOnly ? renderReadOnlyContent() : pairs.map((pair, index) => /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
16511
16570
|
"div",
|
|
16512
16571
|
{
|
|
16513
|
-
className: (0, import_css65.cx)((0,
|
|
16572
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pair-row")), styles["pairRow"]),
|
|
16514
16573
|
children: [
|
|
16515
16574
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
16516
16575
|
TextField_default,
|
|
@@ -16519,7 +16578,7 @@ var KeyValueInput = ({
|
|
|
16519
16578
|
value: pair.key,
|
|
16520
16579
|
onChange: (e) => handleUpdatePair(index, "key", e.target.value),
|
|
16521
16580
|
disabled: disabled || readOnly,
|
|
16522
|
-
className: (0, import_css65.cx)((0,
|
|
16581
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pair-input")), styles["pairInput"]),
|
|
16523
16582
|
"aria-label": `${keyLabel} ${index + 1}`
|
|
16524
16583
|
}
|
|
16525
16584
|
),
|
|
@@ -16530,7 +16589,7 @@ var KeyValueInput = ({
|
|
|
16530
16589
|
value: pair.value,
|
|
16531
16590
|
onChange: (e) => handleUpdatePair(index, "value", e.target.value),
|
|
16532
16591
|
disabled: disabled || readOnly,
|
|
16533
|
-
className: (0, import_css65.cx)((0,
|
|
16592
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pair-input")), styles["pairInput"]),
|
|
16534
16593
|
"aria-label": `${valueLabel} ${index + 1}`
|
|
16535
16594
|
}
|
|
16536
16595
|
),
|
|
@@ -16541,7 +16600,7 @@ var KeyValueInput = ({
|
|
|
16541
16600
|
onClick: () => handleRemovePair(index),
|
|
16542
16601
|
disabled,
|
|
16543
16602
|
className: (0, import_css65.cx)(
|
|
16544
|
-
(0,
|
|
16603
|
+
(0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "remove-button")),
|
|
16545
16604
|
styles["removeButton"]
|
|
16546
16605
|
),
|
|
16547
16606
|
"aria-label": `${removeButtonText} ${pair.key}`,
|
|
@@ -16552,7 +16611,7 @@ var KeyValueInput = ({
|
|
|
16552
16611
|
},
|
|
16553
16612
|
`${pair.key}-${index}`
|
|
16554
16613
|
)),
|
|
16555
|
-
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0,
|
|
16614
|
+
!readOnly && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "add-row")), styles["addRow"]), children: [
|
|
16556
16615
|
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
16557
16616
|
TextField_default,
|
|
16558
16617
|
{
|
|
@@ -16560,7 +16619,7 @@ var KeyValueInput = ({
|
|
|
16560
16619
|
value: newKey,
|
|
16561
16620
|
onChange: (e) => setNewKey(e.target.value),
|
|
16562
16621
|
disabled,
|
|
16563
|
-
className: (0, import_css65.cx)((0,
|
|
16622
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pair-input")), styles["pairInput"]),
|
|
16564
16623
|
"aria-label": "New key"
|
|
16565
16624
|
}
|
|
16566
16625
|
),
|
|
@@ -16571,7 +16630,7 @@ var KeyValueInput = ({
|
|
|
16571
16630
|
value: newValue,
|
|
16572
16631
|
onChange: (e) => setNewValue(e.target.value),
|
|
16573
16632
|
disabled,
|
|
16574
|
-
className: (0, import_css65.cx)((0,
|
|
16633
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "pair-input")), styles["pairInput"]),
|
|
16575
16634
|
"aria-label": "New value",
|
|
16576
16635
|
onKeyPress: (e) => {
|
|
16577
16636
|
if (e.key === "Enter" && !isAddDisabled) {
|
|
@@ -16586,15 +16645,15 @@ var KeyValueInput = ({
|
|
|
16586
16645
|
type: "button",
|
|
16587
16646
|
onClick: handleAddPair,
|
|
16588
16647
|
disabled: isAddDisabled,
|
|
16589
|
-
className: (0, import_css65.cx)((0,
|
|
16648
|
+
className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "add-button")), styles["addButton"]),
|
|
16590
16649
|
"aria-label": "Add new key-value pair",
|
|
16591
16650
|
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Plus_default, { width: 16, height: 16 })
|
|
16592
16651
|
}
|
|
16593
16652
|
)
|
|
16594
16653
|
] })
|
|
16595
16654
|
] }),
|
|
16596
|
-
(helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_css65.cx)((0,
|
|
16597
|
-
maxPairs && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0,
|
|
16655
|
+
(helperText || error) && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "helper-text")), styles["helperText"]), children: error || helperText }),
|
|
16656
|
+
maxPairs && /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { className: (0, import_css65.cx)((0, import_browser86.withVendorCSSClassPrefix)((0, import_browser86.bem)("key-value-input", "counter")), styles["counterText"]), children: [
|
|
16598
16657
|
pairs.length,
|
|
16599
16658
|
" of ",
|
|
16600
16659
|
maxPairs,
|
|
@@ -16640,13 +16699,13 @@ var BaseOrganizationProfile = ({
|
|
|
16640
16699
|
editable: false,
|
|
16641
16700
|
key: "created",
|
|
16642
16701
|
label: "Created Date",
|
|
16643
|
-
render: (value) => (0,
|
|
16702
|
+
render: (value) => (0, import_browser87.formatDate)(value)
|
|
16644
16703
|
},
|
|
16645
16704
|
{
|
|
16646
16705
|
editable: false,
|
|
16647
16706
|
key: "lastModified",
|
|
16648
16707
|
label: "Last Modified Date",
|
|
16649
|
-
render: (value) => (0,
|
|
16708
|
+
render: (value) => (0, import_browser87.formatDate)(value)
|
|
16650
16709
|
}
|
|
16651
16710
|
]
|
|
16652
16711
|
}) => {
|
|
@@ -16890,14 +16949,14 @@ var BaseOrganizationProfile = ({
|
|
|
16890
16949
|
var BaseOrganizationProfile_default = BaseOrganizationProfile;
|
|
16891
16950
|
|
|
16892
16951
|
// src/api/getOrganization.ts
|
|
16893
|
-
var
|
|
16952
|
+
var import_browser88 = require("@asgardeo/browser");
|
|
16894
16953
|
var getOrganization = async ({
|
|
16895
16954
|
fetcher,
|
|
16896
16955
|
instanceId = 0,
|
|
16897
16956
|
...requestConfig
|
|
16898
16957
|
}) => {
|
|
16899
16958
|
const defaultFetcher = async (url, config) => {
|
|
16900
|
-
const client =
|
|
16959
|
+
const client = import_browser88.AsgardeoSPAClient.getInstance(instanceId);
|
|
16901
16960
|
const httpClient = client.httpRequest.bind(client);
|
|
16902
16961
|
const response = await httpClient({
|
|
16903
16962
|
headers: config.headers,
|
|
@@ -16912,7 +16971,7 @@ var getOrganization = async ({
|
|
|
16912
16971
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
16913
16972
|
};
|
|
16914
16973
|
};
|
|
16915
|
-
return (0,
|
|
16974
|
+
return (0, import_browser88.getOrganization)({
|
|
16916
16975
|
...requestConfig,
|
|
16917
16976
|
fetcher: fetcher || defaultFetcher
|
|
16918
16977
|
});
|
|
@@ -16920,14 +16979,14 @@ var getOrganization = async ({
|
|
|
16920
16979
|
var getOrganization_default = getOrganization;
|
|
16921
16980
|
|
|
16922
16981
|
// src/api/updateOrganization.ts
|
|
16923
|
-
var
|
|
16982
|
+
var import_browser89 = require("@asgardeo/browser");
|
|
16924
16983
|
var updateOrganization = async ({
|
|
16925
16984
|
fetcher,
|
|
16926
16985
|
instanceId = 0,
|
|
16927
16986
|
...requestConfig
|
|
16928
16987
|
}) => {
|
|
16929
16988
|
const defaultFetcher = async (url, config) => {
|
|
16930
|
-
const client =
|
|
16989
|
+
const client = import_browser89.AsgardeoSPAClient.getInstance(instanceId);
|
|
16931
16990
|
const httpClient = client.httpRequest.bind(client);
|
|
16932
16991
|
const response = await httpClient({
|
|
16933
16992
|
data: config.body ? JSON.parse(config.body) : void 0,
|
|
@@ -16943,7 +17002,7 @@ var updateOrganization = async ({
|
|
|
16943
17002
|
text: () => Promise.resolve(typeof response.data === "string" ? response.data : JSON.stringify(response.data))
|
|
16944
17003
|
};
|
|
16945
17004
|
};
|
|
16946
|
-
return (0,
|
|
17005
|
+
return (0, import_browser89.updateOrganization)({
|
|
16947
17006
|
...requestConfig,
|
|
16948
17007
|
fetcher: fetcher || defaultFetcher
|
|
16949
17008
|
});
|
|
@@ -16952,7 +17011,7 @@ var updateOrganization_default = updateOrganization;
|
|
|
16952
17011
|
|
|
16953
17012
|
// src/components/presentation/OrganizationProfile/OrganizationProfile.tsx
|
|
16954
17013
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
16955
|
-
var logger9 = (0,
|
|
17014
|
+
var logger9 = (0, import_browser90.createPackageComponentLogger)(
|
|
16956
17015
|
"@asgardeo/react",
|
|
16957
17016
|
"OrganizationProfile"
|
|
16958
17017
|
);
|
|
@@ -16993,7 +17052,7 @@ var OrganizationProfile = ({
|
|
|
16993
17052
|
const handleOrganizationUpdate = async (payload) => {
|
|
16994
17053
|
if (!baseUrl || !organizationId) return;
|
|
16995
17054
|
try {
|
|
16996
|
-
const operations = (0,
|
|
17055
|
+
const operations = (0, import_browser89.createPatchOperations)(payload);
|
|
16997
17056
|
await updateOrganization_default({
|
|
16998
17057
|
baseUrl,
|
|
16999
17058
|
instanceId,
|
|
@@ -17343,7 +17402,7 @@ var BaseLanguageSwitcher = ({
|
|
|
17343
17402
|
var BaseLanguageSwitcher_default = BaseLanguageSwitcher;
|
|
17344
17403
|
|
|
17345
17404
|
// src/components/presentation/LanguageSwitcher/LanguageSwitcher.tsx
|
|
17346
|
-
var
|
|
17405
|
+
var import_browser91 = require("@asgardeo/browser");
|
|
17347
17406
|
var import_react110 = require("react");
|
|
17348
17407
|
|
|
17349
17408
|
// src/contexts/FlowMeta/useFlowMeta.ts
|
|
@@ -17371,8 +17430,8 @@ var LanguageSwitcher = ({ children, className }) => {
|
|
|
17371
17430
|
() => effectiveLanguageCodes.map((code) => ({
|
|
17372
17431
|
code,
|
|
17373
17432
|
// Resolve each label in its own locale so option names stay stable across UI language switches.
|
|
17374
|
-
displayName: (0,
|
|
17375
|
-
emoji: (0,
|
|
17433
|
+
displayName: (0, import_browser91.resolveLocaleDisplayName)(code, code) || code,
|
|
17434
|
+
emoji: (0, import_browser91.resolveLocaleEmoji)(code)
|
|
17376
17435
|
})),
|
|
17377
17436
|
[effectiveLanguageCodes]
|
|
17378
17437
|
);
|
|
@@ -17396,5 +17455,5 @@ var LanguageSwitcher = ({ children, className }) => {
|
|
|
17396
17455
|
var LanguageSwitcher_default = LanguageSwitcher;
|
|
17397
17456
|
|
|
17398
17457
|
// src/index.ts
|
|
17399
|
-
var
|
|
17458
|
+
var import_browser92 = require("@asgardeo/browser");
|
|
17400
17459
|
//# sourceMappingURL=index.js.map
|