@mxenabled/connect-widget 0.18.3 → 0.19.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/index.es.js +68 -38
- package/dist/index.es.js.map +1 -1
- package/dist/lastBuild.txt +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -66478,52 +66478,71 @@ const MFAOptions = (props) => {
|
|
|
66478
66478
|
const tokens = useTokens();
|
|
66479
66479
|
const styles = getStyles$Z(tokens);
|
|
66480
66480
|
const mfaLabel = mfaCredentials.map((credential) => credential.label);
|
|
66481
|
-
const
|
|
66481
|
+
const dynamicMFALabel = mfaLabel[0] ? mfaLabel[0] : __("Choose an authentication method.");
|
|
66482
|
+
const dynamicLabel = isSAS ? __("Select an account to connect") : dynamicMFALabel;
|
|
66482
66483
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
66483
|
-
|
|
66484
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabel$1, { sx: { display: "flex" }, children: [
|
|
66485
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(x, { component: "p", style: styles.label, truncate: false, variant: "Paragraph", children: dynamicLabel }),
|
|
66486
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 15 }, children: "*" })
|
|
66487
|
+
] }),
|
|
66484
66488
|
mfaCredentials.map((credential) => {
|
|
66485
66489
|
return credential.options.map((option, i) => {
|
|
66486
66490
|
const isSelected = selectedOption.guid === option.guid;
|
|
66487
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66488
|
-
|
|
66491
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66492
|
+
"span",
|
|
66489
66493
|
{
|
|
66490
|
-
|
|
66491
|
-
|
|
66492
|
-
|
|
66493
|
-
|
|
66494
|
-
|
|
66495
|
-
|
|
66494
|
+
"aria-checked": isSelected,
|
|
66495
|
+
"aria-required": "true",
|
|
66496
|
+
"data-test": option.label.replace(/\s/g, "-"),
|
|
66497
|
+
role: "radio",
|
|
66498
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66499
|
+
ProtectedSelectionBox,
|
|
66496
66500
|
{
|
|
66497
|
-
|
|
66498
|
-
|
|
66499
|
-
|
|
66500
|
-
|
|
66501
|
-
|
|
66502
|
-
|
|
66503
|
-
|
|
66504
|
-
|
|
66505
|
-
|
|
66506
|
-
|
|
66507
|
-
|
|
66508
|
-
|
|
66509
|
-
|
|
66510
|
-
)
|
|
66511
|
-
|
|
66512
|
-
|
|
66513
|
-
|
|
66514
|
-
|
|
66515
|
-
|
|
66516
|
-
|
|
66517
|
-
|
|
66518
|
-
|
|
66519
|
-
|
|
66520
|
-
|
|
66521
|
-
|
|
66501
|
+
autoFocus: i === 0,
|
|
66502
|
+
checked: isSelected,
|
|
66503
|
+
disabled: isSubmitting,
|
|
66504
|
+
id: `${option.guid}`,
|
|
66505
|
+
label: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66506
|
+
x,
|
|
66507
|
+
{
|
|
66508
|
+
bold: true,
|
|
66509
|
+
"data-test": option.label.replace(/\s/g, "-"),
|
|
66510
|
+
truncate: false,
|
|
66511
|
+
variant: "Paragraph",
|
|
66512
|
+
children: option.label
|
|
66513
|
+
}
|
|
66514
|
+
),
|
|
66515
|
+
name: "options-selection-box",
|
|
66516
|
+
onChange: () => {
|
|
66517
|
+
setSelectedOption({ guid: option.guid });
|
|
66518
|
+
setCredentials(
|
|
66519
|
+
credentialsToSubmit.map(
|
|
66520
|
+
(cred) => credential.guid === option.credential_guid ? { guid: option.credential_guid, value: option.guid } : cred
|
|
66521
|
+
)
|
|
66522
|
+
);
|
|
66523
|
+
sendPosthogEvent(AnalyticEvents.MFA_SELECTED_OPTION, {
|
|
66524
|
+
institution_guid: institution.guid,
|
|
66525
|
+
institution_name: institution.name,
|
|
66526
|
+
selectedOption: option.value,
|
|
66527
|
+
member_guid: sha256Exports.sha256(currentMember.guid)
|
|
66528
|
+
});
|
|
66529
|
+
},
|
|
66530
|
+
style: styles.card,
|
|
66531
|
+
value: option.label,
|
|
66532
|
+
variant: "radio"
|
|
66533
|
+
},
|
|
66534
|
+
`${option.guid}`
|
|
66535
|
+
)
|
|
66522
66536
|
},
|
|
66523
66537
|
`${option.guid}`
|
|
66524
|
-
)
|
|
66538
|
+
);
|
|
66525
66539
|
});
|
|
66526
66540
|
}),
|
|
66541
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13, marginBottom: 12 }, children: [
|
|
66542
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
|
|
66543
|
+
" ",
|
|
66544
|
+
__("Required")
|
|
66545
|
+
] }),
|
|
66527
66546
|
isSubmitted && _isEmpty(selectedOption) && /* @__PURE__ */ jsxRuntimeExports.jsxs("section", { role: "alert", style: styles.errorContent, children: [
|
|
66528
66547
|
/* @__PURE__ */ jsxRuntimeExports.jsx(AttentionFilled, { color: tokens.Color.Error300 }),
|
|
66529
66548
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { style: styles.errorMessage, children: isSAS ? __("Account selection is required.") : __("Choose an option") })
|
|
@@ -69815,7 +69834,14 @@ const OAuthStep = React__default.forwardRef((props, navigationRef) => {
|
|
|
69815
69834
|
member$ = of(pendingOauthMember);
|
|
69816
69835
|
} else {
|
|
69817
69836
|
const newMemberStream$ = defer(
|
|
69818
|
-
() => api.addMember(
|
|
69837
|
+
() => api.addMember(
|
|
69838
|
+
{
|
|
69839
|
+
is_oauth: true,
|
|
69840
|
+
institution_guid: institution.guid,
|
|
69841
|
+
rawInstitutionData: { ...institution }
|
|
69842
|
+
},
|
|
69843
|
+
config
|
|
69844
|
+
)
|
|
69819
69845
|
).pipe(pluck("member")).subscribe(
|
|
69820
69846
|
(member2) => {
|
|
69821
69847
|
sendPosthogEvent(AnalyticEvents.OAUTH_PENDING_MEMBER_CREATED, {
|
|
@@ -70772,7 +70798,11 @@ const CreateMemberForm = (props) => {
|
|
|
70772
70798
|
postMessageFunctions.onPostMessage("connect/enterCredentials", {
|
|
70773
70799
|
institution: { guid: institution.guid, code: institution.code }
|
|
70774
70800
|
});
|
|
70775
|
-
const memberData = {
|
|
70801
|
+
const memberData = {
|
|
70802
|
+
institution_guid: institution.guid,
|
|
70803
|
+
credentials: userCredentials,
|
|
70804
|
+
rawInstitutionData: { ...institution }
|
|
70805
|
+
};
|
|
70776
70806
|
const createMember$ = defer(() => api.addMember(memberData, config, isHuman)).pipe(
|
|
70777
70807
|
// this delay is dumb, but if we don't wait long enough after the
|
|
70778
70808
|
// create, then the job afterward is gonna 404.
|