@mxenabled/connect-widget 0.20.0 → 0.20.2

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
  }
@@ -9146,6 +9146,14 @@ function _additionalProductReset(state) {
9146
9146
  const { addVerificationData, addAggregationData, additionalProductReset } = configSlice.actions;
9147
9147
  const configSlice$1 = configSlice.reducer;
9148
9148
 
9149
+ const ACTIONABLE_ERROR_CODES = {
9150
+ NO_ELIGIBLE_ACCOUNTS: 1e3
9151
+ };
9152
+ const ACTIVE_ACTIONABLE_ERROR_CODES = Object.values(ACTIONABLE_ERROR_CODES);
9153
+ const canHandleActionableError = (errorCode) => {
9154
+ return ACTIVE_ACTIONABLE_ERROR_CODES.includes(errorCode);
9155
+ };
9156
+
9149
9157
  const defaultState$1 = {
9150
9158
  error: null,
9151
9159
  // The most recent job request error, if any
@@ -9552,7 +9560,7 @@ function getStartingStep(members, member, microdeposit, config, institution, wid
9552
9560
  }
9553
9561
  function getStepFromMember(member) {
9554
9562
  const connection_status = member.connection_status;
9555
- if (member?.most_recent_job_detail_code || hasNoSingleAccountSelectOptions(member))
9563
+ if (member?.most_recent_job_detail_code && canHandleActionableError(member?.most_recent_job_detail_code) || hasNoSingleAccountSelectOptions(member))
9556
9564
  return STEPS.ACTIONABLE_ERROR;
9557
9565
  else if (connection_status === ReadableStatuses$1.CHALLENGED)
9558
9566
  return STEPS.MFA;
@@ -13096,9 +13104,9 @@ const require$$1$1 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1)
13096
13104
  /**
13097
13105
  * [js-sha256]{@link https://github.com/emn178/js-sha256}
13098
13106
  *
13099
- * @version 0.11.0
13107
+ * @version 0.11.1
13100
13108
  * @author Chen, Yi-Cyuan [emn178@gmail.com]
13101
- * @copyright Chen, Yi-Cyuan 2014-2024
13109
+ * @copyright Chen, Yi-Cyuan 2014-2025
13102
13110
  * @license MIT
13103
13111
  */
13104
13112
 
@@ -13111,7 +13119,7 @@ const require$$1$1 = /*@__PURE__*/getAugmentedNamespace(__viteBrowserExternal$1)
13111
13119
  WINDOW = false;
13112
13120
  }
13113
13121
  var WEB_WORKER = !WINDOW && typeof self === "object";
13114
- 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";
13115
13123
  if (NODE_JS) {
13116
13124
  root = commonjsGlobal;
13117
13125
  } else if (WEB_WORKER) {
@@ -72071,10 +72079,6 @@ LoginError.propTypes = {
72071
72079
  };
72072
72080
  LoginError.displayName = "LoginError";
72073
72081
 
72074
- const ACTIONABLE_ERROR_CODES = {
72075
- NO_ELIGIBLE_ACCOUNTS: 1e3
72076
- };
72077
-
72078
72082
  const ActionableError = () => {
72079
72083
  const postMessageFunctions = useContext(PostMessageContext);
72080
72084
  const institution = useSelector((state) => state.connect.selectedInstitution);
@@ -77482,9 +77486,8 @@ const RenderConnectStep = (props) => {
77482
77486
  }
77483
77487
  );
77484
77488
  } else if (step === STEPS.ACTIONABLE_ERROR) {
77485
- connectStepView = [ACTIONABLE_ERROR_CODES.NO_ELIGIBLE_ACCOUNTS].includes(
77486
- currentMember?.most_recent_job_detail_code ?? -1
77487
- ) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
77489
+ const jobDetailCode = currentMember?.most_recent_job_detail_code ?? null;
77490
+ connectStepView = canHandleActionableError(jobDetailCode) ? /* @__PURE__ */ jsxRuntimeExports.jsx(ActionableError, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
77488
77491
  LoginError,
77489
77492
  {
77490
77493
  institution: selectedInstitution,