@aws-amplify/ui-vue 4.0.6 → 4.0.8
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
|
@@ -566,7 +566,7 @@ const getRoute = (state, actorState) => {
|
|
|
566
566
|
case state.matches("authenticated"):
|
|
567
567
|
return "authenticated";
|
|
568
568
|
case (actorState == null ? void 0 : actorState.matches("confirmSignUp")):
|
|
569
|
-
case (actorState == null ? void 0 : actorState.matches("
|
|
569
|
+
case (actorState == null ? void 0 : actorState.matches("resendSignUpCode")):
|
|
570
570
|
return "confirmSignUp";
|
|
571
571
|
case (actorState == null ? void 0 : actorState.matches("confirmSignIn")):
|
|
572
572
|
return "confirmSignIn";
|
|
@@ -574,8 +574,10 @@ const getRoute = (state, actorState) => {
|
|
|
574
574
|
case (actorState == null ? void 0 : actorState.matches("setupTotp.submit")):
|
|
575
575
|
return "setupTotp";
|
|
576
576
|
case (actorState == null ? void 0 : actorState.matches("signIn")):
|
|
577
|
+
case (actorState == null ? void 0 : actorState.matches("federatedSignIn")):
|
|
577
578
|
return "signIn";
|
|
578
579
|
case (actorState == null ? void 0 : actorState.matches("signUp")):
|
|
580
|
+
case (actorState == null ? void 0 : actorState.matches("autoSignIn")):
|
|
579
581
|
return "signUp";
|
|
580
582
|
case (actorState == null ? void 0 : actorState.matches("forceChangePassword")):
|
|
581
583
|
return "forceNewPassword";
|
|
@@ -588,10 +590,9 @@ const getRoute = (state, actorState) => {
|
|
|
588
590
|
case (actorState == null ? void 0 : actorState.matches("confirmVerifyUserAttribute")):
|
|
589
591
|
return "confirmVerifyUser";
|
|
590
592
|
case state.matches("getCurrentUser"):
|
|
591
|
-
case actorState.matches("fetchUserAttributes"):
|
|
593
|
+
case (actorState == null ? void 0 : actorState.matches("fetchUserAttributes")):
|
|
592
594
|
return "transition";
|
|
593
595
|
default:
|
|
594
|
-
console.debug("Cannot infer `route` from Authenticator state:", state.value);
|
|
595
596
|
return null;
|
|
596
597
|
}
|
|
597
598
|
};
|
|
@@ -9149,6 +9150,7 @@ function signUpActor({ services }) {
|
|
|
9149
9150
|
remoteError: context.remoteError,
|
|
9150
9151
|
step: context.step,
|
|
9151
9152
|
totpSecretCode: context.totpSecretCode,
|
|
9153
|
+
username: context.username,
|
|
9152
9154
|
unverifiedUserAttributes: context.unverifiedUserAttributes
|
|
9153
9155
|
})
|
|
9154
9156
|
}
|
|
@@ -10907,7 +10909,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
10907
10909
|
};
|
|
10908
10910
|
}
|
|
10909
10911
|
});
|
|
10910
|
-
const VERSION = "4.0.
|
|
10912
|
+
const VERSION = "4.0.8";
|
|
10911
10913
|
const _sfc_main$e = {};
|
|
10912
10914
|
function _sfc_render(_ctx, _cache) {
|
|
10913
10915
|
return renderSlot(_ctx.$slots, "textI", normalizeProps(guardReactiveProps(_ctx.$attrs)), () => [
|
|
@@ -13191,13 +13193,12 @@ const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("svg", {
|
|
|
13191
13193
|
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
13192
13194
|
__name: "setup-totp",
|
|
13193
13195
|
setup(__props) {
|
|
13194
|
-
var _a2;
|
|
13195
13196
|
const logger = new ConsoleLogger("SetupTotp-logger");
|
|
13196
13197
|
const facade = useAuthenticator();
|
|
13197
|
-
const { updateForm, submitForm, toSignIn } = facade;
|
|
13198
|
-
const { error: error2, isPending
|
|
13199
|
-
const { totpIssuer = "AWSCognito", totpUsername = username
|
|
13200
|
-
const totpCodeURL =
|
|
13198
|
+
const { updateForm, submitForm, toSignIn, totpSecretCode, username, QRFields } = facade;
|
|
13199
|
+
const { error: error2, isPending } = toRefs(facade);
|
|
13200
|
+
const { totpIssuer = "AWSCognito", totpUsername = username } = QRFields != null ? QRFields : {};
|
|
13201
|
+
const totpCodeURL = getTotpCodeURL(totpIssuer, totpUsername, totpSecretCode);
|
|
13201
13202
|
const qrCode = reactive({
|
|
13202
13203
|
qrCodeImageSource: "",
|
|
13203
13204
|
isLoading: true
|
|
@@ -13205,15 +13206,12 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
13205
13206
|
const { getCopyText, getCopiedText, getBackToSignInText, getConfirmText } = authenticatorTextUtil;
|
|
13206
13207
|
const copyTextLabel = ref(getCopyText());
|
|
13207
13208
|
function copyText() {
|
|
13208
|
-
if (totpSecretCode
|
|
13209
|
-
navigator.clipboard.writeText(totpSecretCode
|
|
13209
|
+
if (totpSecretCode) {
|
|
13210
|
+
navigator.clipboard.writeText(totpSecretCode);
|
|
13210
13211
|
}
|
|
13211
13212
|
copyTextLabel.value = getCopiedText();
|
|
13212
13213
|
}
|
|
13213
13214
|
onMounted(async () => {
|
|
13214
|
-
if (!username.value || !totpCodeURL) {
|
|
13215
|
-
return;
|
|
13216
|
-
}
|
|
13217
13215
|
try {
|
|
13218
13216
|
qrCode.qrCodeImageSource = await browser.toDataURL(totpCodeURL);
|
|
13219
13217
|
} catch (error22) {
|
|
@@ -14377,7 +14375,7 @@ const _hoisted_6 = /* @__PURE__ */ createElementVNode("path", { d: "M9 16.17L4.8
|
|
|
14377
14375
|
const _hoisted_7 = [
|
|
14378
14376
|
_hoisted_6
|
|
14379
14377
|
];
|
|
14380
|
-
const _hoisted_8 =
|
|
14378
|
+
const _hoisted_8 = { class: "amplify-text amplify-checkbox__label" };
|
|
14381
14379
|
const _hoisted_9 = {
|
|
14382
14380
|
key: 0,
|
|
14383
14381
|
class: "amplify-text amplify-field__error-message"
|
|
@@ -14390,6 +14388,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14390
14388
|
setup(__props) {
|
|
14391
14389
|
const props = __props;
|
|
14392
14390
|
const checked = ref(false);
|
|
14391
|
+
const checkboxLabel = ref(translate("I agree with the Terms and Conditions"));
|
|
14393
14392
|
const { errorMessage } = toRefs(props);
|
|
14394
14393
|
return (_ctx, _cache) => {
|
|
14395
14394
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
@@ -14423,7 +14422,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14423
14422
|
"data-checked": checked.value
|
|
14424
14423
|
}, _hoisted_7, 10, _hoisted_5))
|
|
14425
14424
|
], 10, _hoisted_4),
|
|
14426
|
-
_hoisted_8
|
|
14425
|
+
createElementVNode("span", _hoisted_8, toDisplayString(checkboxLabel.value), 1)
|
|
14427
14426
|
]),
|
|
14428
14427
|
!checked.value ? (openBlock(), createElementBlock("p", _hoisted_9, toDisplayString(unref(errorMessage)), 1)) : createCommentVNode("", true)
|
|
14429
14428
|
]);
|