@mxenabled/connect-widget 2.6.0 → 2.8.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 CHANGED
@@ -5316,6 +5316,30 @@ const addManualAccountSuccess = (account, member, institution) => ({
5316
5316
  payload: { account, member, institution }
5317
5317
  });
5318
5318
 
5319
+ const ConnectionStatusMap = {
5320
+ 0: "CREATED",
5321
+ 1: "PREVENTED",
5322
+ 2: "DENIED",
5323
+ 3: "CHALLENGED",
5324
+ 4: "REJECTED",
5325
+ 5: "LOCKED",
5326
+ 6: "CONNECTED",
5327
+ 7: "IMPEDED",
5328
+ 8: "RECONNECTED",
5329
+ 9: "DEGRADED",
5330
+ 10: "DISCONNECTED",
5331
+ 11: "DISCONTINUED",
5332
+ 12: "CLOSED",
5333
+ 13: "DELAYED",
5334
+ 14: "FAILED",
5335
+ 15: "UPDATED",
5336
+ 16: "DISABLED",
5337
+ 17: "IMPORTED",
5338
+ 18: "RESUMED",
5339
+ 19: "EXPIRED",
5340
+ 20: "IMPAIRED",
5341
+ 21: "PENDING"
5342
+ };
5319
5343
  const ReadableStatuses$1 = {
5320
5344
  PREVENTED: 1,
5321
5345
  DENIED: 2,
@@ -9185,6 +9209,19 @@ const CODES_REQUIRING_MFA = [
9185
9209
  ACTIONABLE_ERROR_CODES.INCORRECT_MFA,
9186
9210
  ACTIONABLE_ERROR_CODES.MFA_TIMEOUT
9187
9211
  ];
9212
+ const ACTIONABLE_ERROR_CODES_READABLE = {
9213
+ [ACTIONABLE_ERROR_CODES.NO_ELIGIBLE_ACCOUNTS]: "NO_VERIFIABLE_ACCOUNTS",
9214
+ [ACTIONABLE_ERROR_CODES.NO_ACCOUNTS]: "NO_ACCOUNTS",
9215
+ [ACTIONABLE_ERROR_CODES.ACCESS_DENIED]: "ACCESS_DENIED",
9216
+ [ACTIONABLE_ERROR_CODES.INCORRECT_OTP]: "INCORRECT_OTP",
9217
+ [ACTIONABLE_ERROR_CODES.INCORRECT_MFA]: "INCORRECT_MFA",
9218
+ [ACTIONABLE_ERROR_CODES.MFA_TIMEOUT]: "MFA_TIMEOUT",
9219
+ [ACTIONABLE_ERROR_CODES.REAUTHORIZATION_REQUIRED]: "REAUTHORIZATION_REQUIRED",
9220
+ [ACTIONABLE_ERROR_CODES.INVALID_CREDENTIALS]: "INVALID_CREDENTIALS",
9221
+ [ACTIONABLE_ERROR_CODES.INSTITUTION_DOWN]: "INSTITUTION_DOWN",
9222
+ [ACTIONABLE_ERROR_CODES.INSTITUTION_MAINTENANCE]: "INSTITUTION_MAINTENANCE",
9223
+ [ACTIONABLE_ERROR_CODES.INSTITUTION_UNAVAILABLE]: "INSTITUTION_UNAVAILABLE"
9224
+ };
9188
9225
  const ACTIVE_ACTIONABLE_ERROR_CODES = Object.values(ACTIONABLE_ERROR_CODES);
9189
9226
  const canHandleActionableError = (errorCode, mode) => {
9190
9227
  if (errorCode === ACTIONABLE_ERROR_CODES.NO_ELIGIBLE_ACCOUNTS && mode !== VERIFY_MODE) {
@@ -52299,6 +52336,7 @@ const defaultEventMetadata = {
52299
52336
  };
52300
52337
  const PageviewInfo = {
52301
52338
  CONNECT: ["Connect", "/connect"],
52339
+ CONNECT_ACTIONABLE_ERROR: ["Connect Actionable Error", "/actionable_error"],
52302
52340
  CONNECT_CONNECTED: ["Connect Successful", "/connected"],
52303
52341
  CONNECT_CONNECTING: ["Connect Connecting", "/connecting"],
52304
52342
  CONNECT_CREATE_CREDENTIALS: [
@@ -76912,7 +76950,10 @@ const LoginError = React__default.forwardRef(
76912
76950
  const connectConfig = useSelector(selectConnectConfig);
76913
76951
  const initialConfig = useSelector(selectInitialConfig);
76914
76952
  const pageViewInfo = PageviewInfo.CONNECT_LOGIN_ERROR;
76915
- useAnalyticsPath(...pageViewInfo);
76953
+ useAnalyticsPath(...pageViewInfo, {
76954
+ connection_status: member.connection_status || "UNKNOWN",
76955
+ readable_status: ConnectionStatusMap[member.connection_status] || "UNKNOWN"
76956
+ });
76916
76957
  const [isLeaving, setIsLeaving] = useState(false);
76917
76958
  const [showSupportView, setShowSupportView] = useState(false);
76918
76959
  const getNextDelay = getDelay();
@@ -77207,6 +77248,11 @@ const ActionableError = () => {
77207
77248
  const institution = useSelector((state) => state.connect.selectedInstitution);
77208
77249
  const currentMember = useSelector(getCurrentMember);
77209
77250
  const jobDetailCode = currentMember.error.error_code;
77251
+ const [name, path] = PageviewInfo.CONNECT_ACTIONABLE_ERROR;
77252
+ useAnalyticsPath(name, path, {
77253
+ error_code: jobDetailCode,
77254
+ readable_error: ACTIONABLE_ERROR_CODES_READABLE[jobDetailCode]
77255
+ });
77210
77256
  const tokens = useTokens();
77211
77257
  const styles = getStyles$A(tokens);
77212
77258
  const getNextDelay = getDelay();