@mxenabled/connect-widget 0.20.1 → 0.20.3

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 CHANGED
@@ -5152,7 +5152,7 @@ function toFinite$2(value) {
5152
5152
  return value === 0 ? value : 0;
5153
5153
  }
5154
5154
  value = toNumber$1(value);
5155
- if (value === INFINITY$1 || value === -Infinity) {
5155
+ if (value === INFINITY$1 || value === -INFINITY$1) {
5156
5156
  var sign = value < 0 ? -1 : 1;
5157
5157
  return sign * MAX_INTEGER;
5158
5158
  }
@@ -13104,9 +13104,9 @@ const require$$1$1 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1)
13104
13104
  /**
13105
13105
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
13106
13106
  *
13107
- * @version 0.11.0
13107
+ * @version 0.11.1
13108
13108
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
13109
- * @copyright Chen, Yi-Cyuan 2014-2024
13109
+ * @copyright Chen, Yi-Cyuan 2014-2025
13110
13110
  * @license MIT
13111
13111
  */
13112
13112
 
@@ -13119,7 +13119,7 @@ const require$$1$1 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1)
13119
13119
  WINDOW = false;
13120
13120
  }
13121
13121
  var WEB_WORKER = !WINDOW && typeof self === "object";
13122
- var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node;
13122
+ var NODE_JS = !root.JS_SHA256_NO_NODE_JS && typeof process === "object" && process.versions && process.versions.node && process.type != "renderer";
13123
13123
  if (NODE_JS) {
13124
13124
  root = commonjsGlobal;
13125
13125
  } else if (WEB_WORKER) {
@@ -65022,6 +65022,46 @@ const useApi = () => {
65022
65022
  return { api: context };
65023
65023
  };
65024
65024
 
65025
+ const RequiredFieldNote = ({ styles }) => {
65026
+ const requiredFieldNoteColor = "#666";
65027
+ const asteriskColor = "#E32727";
65028
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
65029
+ Box,
65030
+ {
65031
+ sx: {
65032
+ marginTop: 16,
65033
+ marginBottom: 32,
65034
+ ...styles
65035
+ },
65036
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
65037
+ Typography$1,
65038
+ {
65039
+ component: "span",
65040
+ sx: {
65041
+ color: requiredFieldNoteColor,
65042
+ fontSize: "13px"
65043
+ },
65044
+ variant: "caption",
65045
+ children: [
65046
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
65047
+ Typography$1,
65048
+ {
65049
+ component: "span",
65050
+ sx: {
65051
+ color: asteriskColor
65052
+ },
65053
+ children: "*"
65054
+ }
65055
+ ),
65056
+ " ",
65057
+ __("Required")
65058
+ ]
65059
+ }
65060
+ )
65061
+ }
65062
+ );
65063
+ };
65064
+
65025
65065
  const RequestInstitution = React__default.forwardRef((props, requestInstitutionRef) => {
65026
65066
  const { handleClose, handleTicketSuccess, user } = props;
65027
65067
  useAnalyticsPath(...PageviewInfo.CONNECT_SUPPORT_REQUEST_INSTITUTION);
@@ -65120,6 +65160,7 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
65120
65160
  label: schema.email.label,
65121
65161
  name: "email",
65122
65162
  onChange: handleTextInputChange,
65163
+ required: true,
65123
65164
  value: values.email
65124
65165
  }
65125
65166
  ) }),
@@ -65140,6 +65181,7 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
65140
65181
  label: schema.institutionName.label,
65141
65182
  name: "institutionName",
65142
65183
  onChange: handleTextInputChange,
65184
+ required: true,
65143
65185
  value: values.institutionName
65144
65186
  }
65145
65187
  ) }),
@@ -65159,10 +65201,11 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
65159
65201
  label: schema.institutionWebsite.label,
65160
65202
  name: "institutionWebsite",
65161
65203
  onChange: handleTextInputChange,
65204
+ required: true,
65162
65205
  value: values.institutionWebsite
65163
65206
  }
65164
65207
  ) }),
65165
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.input, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
65208
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...styles.input, marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
65166
65209
  ProtectedTextField,
65167
65210
  {
65168
65211
  "aria-label": schema.institutionLogin.label,
@@ -65183,6 +65226,7 @@ const RequestInstitution = React__default.forwardRef((props, requestInstitutionR
65183
65226
  }
65184
65227
  ) })
65185
65228
  ] }),
65229
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, {}),
65186
65230
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
65187
65231
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.buttons, children: [
65188
65232
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -65322,6 +65366,7 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
65322
65366
  label: schema.email.label,
65323
65367
  name: "email",
65324
65368
  onChange: handleTextInputChange,
65369
+ required: true,
65325
65370
  value: values.email
65326
65371
  }
65327
65372
  ) }),
@@ -65338,10 +65383,11 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
65338
65383
  label: schema.issueDescription.label,
65339
65384
  name: "issueDescription",
65340
65385
  onChange: handleTextInputChange,
65386
+ required: true,
65341
65387
  value: values.issueDescription
65342
65388
  }
65343
65389
  ) }),
65344
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.input, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
65390
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { ...styles.input, marginBottom: 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
65345
65391
  ProtectedTextField,
65346
65392
  {
65347
65393
  autoComplete: "off",
@@ -65354,11 +65400,13 @@ const GeneralSupport = React__default.forwardRef((props, generalSupportRef) => {
65354
65400
  multiline: true,
65355
65401
  name: "issueDetails",
65356
65402
  onChange: handleTextInputChange,
65403
+ required: true,
65357
65404
  rows: 4,
65358
65405
  value: values.issueDetails
65359
65406
  }
65360
65407
  ) })
65361
65408
  ] }),
65409
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, {}),
65362
65410
  /* @__PURE__ */ jsxRuntimeExports.jsxs(SlideDown, { delay: getNextDelay(), children: [
65363
65411
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.buttons, children: [
65364
65412
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -66774,41 +66822,32 @@ const DefaultMFA = (props) => {
66774
66822
  mfaCredentials.map((credential, i) => {
66775
66823
  const metaData = credential.meta_data || credential.image_data;
66776
66824
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: styles.label, children: [
66777
- /* @__PURE__ */ jsxRuntimeExports.jsx(
66778
- x,
66779
- {
66780
- component: "p",
66781
- "data-test": "challenge-label",
66782
- style: styles.challengeLabel,
66783
- truncate: false,
66784
- variant: "Paragraph",
66785
- children: credential.label
66786
- }
66787
- ),
66788
66825
  metaData ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styles.metaData, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { alt: __("Challenge Image"), src: metaData, style: styles.mfaImage }) }) : null,
66789
66826
  /* @__PURE__ */ jsxRuntimeExports.jsx(
66790
66827
  ProtectedTextField,
66791
66828
  {
66792
66829
  disabled: isSubmitting,
66793
- error: true,
66830
+ error: !!errors[credential.label],
66794
66831
  fullWidth: true,
66795
66832
  helperText: errors[credential.label],
66796
66833
  inputProps: { "aria-label": credential.label },
66797
66834
  inputRef: i === 0 ? buttonRef : null,
66835
+ label: credential.label,
66798
66836
  name: credential.label,
66799
66837
  onChange: handleMFACodeChange,
66838
+ required: true,
66800
66839
  value: values[credential.label] || ""
66801
66840
  }
66802
66841
  )
66803
66842
  ] }, credential.label);
66804
66843
  }),
66844
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, {}),
66805
66845
  /* @__PURE__ */ jsxRuntimeExports.jsx(
66806
66846
  Button$2,
66807
66847
  {
66808
66848
  "data-test": "continue-button",
66809
66849
  fullWidth: true,
66810
66850
  onClick: handleSubmit,
66811
- style: styles.submitButton,
66812
66851
  type: "submit",
66813
66852
  variant: "contained",
66814
66853
  children: isSubmitting ? `${_p("Verifying", "Checking")}...` : __("Continue")
@@ -66826,7 +66865,7 @@ const DefaultMFA = (props) => {
66826
66865
  const getStyles$Y = (tokens) => {
66827
66866
  return {
66828
66867
  label: {
66829
- marginBottom: tokens.Spacing.Large
66868
+ marginTop: tokens.Spacing.XLarge
66830
66869
  },
66831
66870
  challengeLabel: {
66832
66871
  marginBottom: tokens.Spacing.Tiny
@@ -66844,9 +66883,6 @@ const getStyles$Y = (tokens) => {
66844
66883
  width: "auto",
66845
66884
  height: "auto",
66846
66885
  borderRadius: tokens.BorderRadius.Medium
66847
- },
66848
- submitButton: {
66849
- marginTop: tokens.Spacing.XLarge
66850
66886
  }
66851
66887
  };
66852
66888
  };
@@ -73804,11 +73840,7 @@ const RoutingNumber = (props) => {
73804
73840
  value: values.routingNumber
73805
73841
  }
73806
73842
  ) }) }),
73807
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16, marginBottom: 32 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13 }, children: [
73808
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
73809
- " ",
73810
- __("Required")
73811
- ] }) }),
73843
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, {}),
73812
73844
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
73813
73845
  Button$2,
73814
73846
  {
@@ -74008,11 +74040,7 @@ const PersonalInfoForm = ({ accountDetails, onContinue }) => {
74008
74040
  }
74009
74041
  ) })
74010
74042
  ] }),
74011
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginTop: 16, marginBottom: 32 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { color: "#666", fontSize: 13 }, children: [
74012
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#E32727", fontSize: 13 }, children: "*" }),
74013
- " ",
74014
- __("Required")
74015
- ] }) }),
74043
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, {}),
74016
74044
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { delay: getNextDelay(), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
74017
74045
  Button$2,
74018
74046
  {
@@ -74711,6 +74739,7 @@ const VerifyDeposits = ({ microdeposit, onSuccess }) => {
74711
74739
  name: "firstAmount",
74712
74740
  onChange: handleTextInputChange,
74713
74741
  placeholder: "0.00",
74742
+ required: true,
74714
74743
  value: values.firstAmount
74715
74744
  }
74716
74745
  ) }),
@@ -74731,10 +74760,12 @@ const VerifyDeposits = ({ microdeposit, onSuccess }) => {
74731
74760
  name: "secondAmount",
74732
74761
  onChange: handleTextInputChange,
74733
74762
  placeholder: "0.00",
74763
+ required: true,
74734
74764
  value: values.secondAmount
74735
74765
  }
74736
74766
  ) })
74737
74767
  ] }) }),
74768
+ /* @__PURE__ */ jsxRuntimeExports.jsx(RequiredFieldNote, { styles: { marginBottom: 0 } }),
74738
74769
  /* @__PURE__ */ jsxRuntimeExports.jsx(SlideDown, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
74739
74770
  Button$2,
74740
74771
  {