@aws-amplify/ui-vue 2.4.23 → 2.4.25

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.js CHANGED
@@ -59,7 +59,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
59
59
  var t$2 = function(t2) {
60
60
  var n2;
61
61
  return null === (n2 = t2.context.actorRef) || void 0 === n2 ? void 0 : n2.getSnapshot();
62
- }, n$7 = function(n2) {
62
+ }, n$8 = function(n2) {
63
63
  var o2;
64
64
  return null === (o2 = t$2(n2)) || void 0 === o2 ? void 0 : o2.context;
65
65
  };
@@ -434,10 +434,10 @@ function __spreadArray$1(to, from, pack) {
434
434
  }
435
435
  return to.concat(ar || Array.prototype.slice.call(from));
436
436
  }
437
- var r$3 = ["birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website"], n$6 = ["username", "email", "phone_number"], m$1 = __spreadArray$1(__spreadArray$1(__spreadArray$1([], n$6, true), r$3, true), ["confirmation_code", "password", "confirm_password"], false);
438
- var r$2 = function(i2) {
439
- var n2, r2 = null === (n2 = null == i2 ? void 0 : i2.context.config) || void 0 === n2 ? void 0 : n2.loginMechanisms;
440
- return (null != r2 ? r2 : ["username"])[0];
437
+ var r$2 = ["birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website"], n$7 = ["username", "email", "phone_number"], m$1 = __spreadArray$1(__spreadArray$1(__spreadArray$1([], n$7, true), r$2, true), ["confirmation_code", "password", "confirm_password"], false);
438
+ var n$6 = function(i2) {
439
+ var t2, n2 = null === (t2 = null == i2 ? void 0 : i2.context.config) || void 0 === t2 ? void 0 : t2.loginMechanisms;
440
+ return (null != n2 ? n2 : ["username"])[0];
441
441
  };
442
442
  var r$1 = function(e2) {
443
443
  var t2 = function(t3) {
@@ -446,8 +446,8 @@ var r$1 = function(e2) {
446
446
  };
447
447
  };
448
448
  return { initializeMachine: t2("INIT"), resendCode: t2("RESEND"), signOut: t2("SIGN_OUT"), submitForm: t2("SUBMIT"), updateForm: t2("CHANGE"), updateBlur: t2("BLUR"), toFederatedSignIn: t2("FEDERATED_SIGN_IN"), toResetPassword: t2("RESET_PASSWORD"), toSignIn: t2("SIGN_IN"), toSignUp: t2("SIGN_UP"), skipVerification: t2("SKIP") };
449
- }, i$3 = function(e2) {
450
- var r2, i2, s2, a2, o2, u2 = null !== (r2 = n$7(e2)) && void 0 !== r2 ? r2 : {}, c2 = u2.codeDeliveryDetails, d2 = u2.remoteError, l2 = u2.unverifiedContactMethods, v2 = u2.validationError, f2 = (null !== (s2 = null === (i2 = e2.context) || void 0 === i2 ? void 0 : i2.config) && void 0 !== s2 ? s2 : {}).socialProviders, m2 = null !== (a2 = null == u2 ? void 0 : u2.user) && void 0 !== a2 ? a2 : null === (o2 = e2.context) || void 0 === o2 ? void 0 : o2.user, h2 = v2 && Object.keys(v2).length > 0, g2 = t$2(e2), S = e2.hasTag("pending") || (null == g2 ? void 0 : g2.hasTag("pending")), p2 = function() {
449
+ }, i$4 = function(e2) {
450
+ var r2, i2, s2, a2, o2, u2 = null !== (r2 = n$8(e2)) && void 0 !== r2 ? r2 : {}, c2 = u2.codeDeliveryDetails, d2 = u2.remoteError, l2 = u2.unverifiedContactMethods, v2 = u2.validationError, f2 = (null !== (s2 = null === (i2 = e2.context) || void 0 === i2 ? void 0 : i2.config) && void 0 !== s2 ? s2 : {}).socialProviders, m2 = null !== (a2 = null == u2 ? void 0 : u2.user) && void 0 !== a2 ? a2 : null === (o2 = e2.context) || void 0 === o2 ? void 0 : o2.user, h2 = v2 && Object.keys(v2).length > 0, g2 = t$2(e2), S = e2.hasTag("pending") || (null == g2 ? void 0 : g2.hasTag("pending")), p2 = function() {
451
451
  switch (true) {
452
452
  case e2.matches("idle"):
453
453
  return "idle";
@@ -495,7 +495,7 @@ var r$1 = function(e2) {
495
495
  }(p2);
496
496
  return { authStatus: I, codeDeliveryDetails: c2, error: d2, hasValidationErrors: h2, isPending: S, route: p2, socialProviders: f2, unverifiedContactMethods: l2, user: m2, validationErrors: v2 };
497
497
  }, s$2 = function(t2) {
498
- var n2 = t2.send, s2 = t2.state, a2 = r$1(n2), o2 = i$3(s2);
498
+ var n2 = t2.send, s2 = t2.state, a2 = r$1(n2), o2 = i$4(s2);
499
499
  return __assign$2(__assign$2({}, a2), o2);
500
500
  };
501
501
  var r = ["+1", "+7", "+20", "+27", "+30", "+31", "+32", "+33", "+34", "+36", "+39", "+40", "+41", "+43", "+44", "+45", "+46", "+47", "+48", "+49", "+51", "+52", "+53", "+54", "+55", "+56", "+57", "+58", "+60", "+61", "+62", "+63", "+64", "+65", "+66", "+81", "+82", "+84", "+86", "+90", "+91", "+92", "+93", "+94", "+95", "+98", "+212", "+213", "+216", "+218", "+220", "+221", "+222", "+223", "+224", "+225", "+226", "+227", "+228", "+229", "+230", "+231", "+232", "+233", "+234", "+235", "+236", "+237", "+238", "+239", "+240", "+241", "+242", "+243", "+244", "+245", "+246", "+248", "+249", "+250", "+251", "+252", "+253", "+254", "+255", "+256", "+257", "+258", "+260", "+261", "+262", "+263", "+264", "+265", "+266", "+267", "+268", "+269", "+290", "+291", "+297", "+298", "+299", "+345", "+350", "+351", "+352", "+353", "+354", "+355", "+356", "+357", "+358", "+359", "+370", "+371", "+372", "+373", "+374", "+375", "+376", "+377", "+378", "+379", "+380", "+381", "+382", "+385", "+386", "+387", "+389", "+420", "+421", "+423", "+500", "+501", "+502", "+503", "+504", "+505", "+506", "+507", "+508", "+509", "+537", "+590", "+591", "+593", "+594", "+595", "+596", "+597", "+598", "+599", "+670", "+672", "+673", "+674", "+675", "+676", "+677", "+678", "+679", "+680", "+681", "+682", "+683", "+685", "+686", "+687", "+688", "+689", "+690", "+691", "+692", "+850", "+852", "+853", "+855", "+856", "+872", "+880", "+886", "+960", "+961", "+962", "+963", "+964", "+965", "+966", "+967", "+968", "+970", "+971", "+972", "+973", "+974", "+975", "+976", "+977", "+992", "+993", "+994", "+995", "+996", "+998"];
@@ -528,9 +528,9 @@ var l$1 = { birthdate: { label: "Birthdate", labelHidden: true, placeholder: "Bi
528
528
  var n$3 = function(r2) {
529
529
  var t2 = new FormData(r2.target);
530
530
  return Object.fromEntries(t2);
531
- }, u$3 = function(r2) {
532
- return m$1.includes(r2);
533
531
  }, o$2 = function(r2) {
532
+ return m$1.includes(r2);
533
+ }, i$3 = function(r2) {
534
534
  return r2 ? (t2 = r2, Array.isArray(t2) ? r2 : [r2]) : null;
535
535
  var t2;
536
536
  };
@@ -554,19 +554,19 @@ var o$1 = function(t2, n2) {
554
554
  });
555
555
  };
556
556
  var i$2 = function(r2, e2) {
557
- var a2 = n$7(r2).country_code, s2 = l$1[e2];
557
+ var a2 = n$8(r2).country_code, s2 = l$1[e2];
558
558
  return "tel" === s2.type && (s2 = __assign$2(__assign$2({}, s2), { dialCode: a2 })), s2;
559
559
  }, c$1 = function(r2) {
560
- var e2 = r$2(r2);
560
+ var e2 = n$6(r2);
561
561
  return __assign$2(__assign$2({}, i$2(r2, e2)), { autocomplete: "username" });
562
562
  }, d$1 = function(r2) {
563
563
  return { confirmation_code: __assign$2(__assign$2({}, i$2(r2, "confirmation_code")), { label: "Code *", placeholder: "Code" }) };
564
564
  }, u$2 = { signIn: function(r2) {
565
565
  return { username: __assign$2({}, c$1(r2)), password: __assign$2(__assign$2({}, i$2(r2, "password")), { autocomplete: "current-password" }) };
566
566
  }, signUp: function(e2) {
567
- for (var n2 = e2.context.config, t2 = n2.loginMechanisms, d2 = n2.signUpAttributes, u2 = r$2(e2), f2 = {}, m2 = 0, l2 = Array.from(new Set(__spreadArray$1(__spreadArray$1(__spreadArray$1([], t2, true), ["password", "confirm_password"], false), d2, true))); m2 < l2.length; m2++) {
567
+ for (var n2 = e2.context.config, t2 = n2.loginMechanisms, d2 = n2.signUpAttributes, u2 = n$6(e2), f2 = {}, m2 = 0, l2 = Array.from(new Set(__spreadArray$1(__spreadArray$1(__spreadArray$1([], t2, true), ["password", "confirm_password"], false), d2, true))); m2 < l2.length; m2++) {
568
568
  var p2 = l2[m2];
569
- if (u$3(p2)) {
569
+ if (o$2(p2)) {
570
570
  var w2 = p2 === u2 ? c$1(e2) : i$2(e2, p2);
571
571
  f2[p2] = __assign$2({}, w2);
572
572
  } else
@@ -578,11 +578,11 @@ var i$2 = function(r2, e2) {
578
578
  }, confirmSignIn: d$1, forceNewPassword: function(n2) {
579
579
  for (var t2 = t$2(n2).context.requiredAttributes, a2 = {}, c2 = 0, d2 = Array.from(new Set(__spreadArray$1(["password", "confirm_password"], t2, true))); c2 < d2.length; c2++) {
580
580
  var u2 = d2[c2];
581
- u$3(u2) ? a2[u2] = __assign$2({}, i$2(n2, u2)) : console.debug("Authenticator does not have a default implementation for ".concat(u2, ". Customize ForceNewPassword FormFields to add your own."));
581
+ o$2(u2) ? a2[u2] = __assign$2({}, i$2(n2, u2)) : console.debug("Authenticator does not have a default implementation for ".concat(u2, ". Customize ForceNewPassword FormFields to add your own."));
582
582
  }
583
583
  return a2;
584
584
  }, resetPassword: function(r2) {
585
- var e2 = r$2(r2), n2 = l$1[e2].label;
585
+ var e2 = n$6(r2), n2 = l$1[e2].label;
586
586
  return { username: __assign$2(__assign$2({}, c$1(r2)), { label: "Enter your ".concat(n2.toLowerCase()), placeholder: "Enter your ".concat(n2.toLowerCase()) }) };
587
587
  }, confirmResetPassword: function(r2) {
588
588
  return __assign$2(__assign$2({}, d$1(r2)), { password: __assign$2(__assign$2({}, i$2(r2, "password")), { label: "New Password", placeholder: "New Password" }), confirm_password: __assign$2(__assign$2({}, i$2(r2, "confirm_password")), { label: "Confirm Password", placeholder: "Confirm Password" }) });
@@ -8454,7 +8454,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
8454
8454
  default: withCtx(() => [
8455
8455
  createVNode(_component_base_label, mergeProps({
8456
8456
  for: "amplify-field-" + unref(random),
8457
- class: ["amplify-label", { "sr-only": unref(labelHidden) }]
8457
+ class: ["amplify-label", { "amplify-visually-hidden": unref(labelHidden) }]
8458
8458
  }, _ctx.$attrs), {
8459
8459
  default: withCtx(() => [
8460
8460
  createTextVNode(toDisplayString(unref(label)), 1)
@@ -8548,7 +8548,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
8548
8548
  const { type } = formField.value;
8549
8549
  const isPasswordField = type === "password";
8550
8550
  const errorId = nanoid(12);
8551
- const errors = computed(() => o$2(validationErrors.value[name.value]));
8551
+ const errors = computed(() => i$3(validationErrors.value[name.value]));
8552
8552
  const hasError = computed(() => {
8553
8553
  var _a2;
8554
8554
  return ((_a2 = errors.value) == null ? void 0 : _a2.length) > 0;
@@ -0,0 +1,2 @@
1
+ import '@testing-library/jest-dom';
2
+ //# sourceMappingURL=jest.setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jest.setup.d.ts","sourceRoot":"","sources":["../jest.setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=alias-control.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alias-control.spec.d.ts","sourceRoot":"","sources":["../../../../src/components/__tests__/alias-control.spec.ts"],"names":[],"mappings":""}