@aws-amplify/ui-angular 2.4.22 → 2.4.23
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/aws-amplify-ui-angular.metadata.json +1 -1
- package/bundles/aws-amplify-ui-angular.umd.js +20 -16
- package/bundles/aws-amplify-ui-angular.umd.js.map +1 -1
- package/bundles/aws-amplify-ui-angular.umd.min.js +1 -1
- package/bundles/aws-amplify-ui-angular.umd.min.js.map +1 -1
- package/esm2015/lib/components/authenticator/components/authenticator/authenticator.component.js +9 -12
- package/esm2015/lib/components/authenticator/components/setup-totp/setup-totp.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/verify-user/verify-user.component.js +4 -4
- package/esm2015/lib/services/authenticator.service.js +4 -1
- package/fesm2015/aws-amplify-ui-angular.js +16 -16
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +9 -3
- package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +8 -2
- package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +8 -2
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +8 -2
- package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +8 -2
- package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +8 -2
- package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +8 -2
- package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +8 -2
- package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +8 -2
- package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +8 -2
- package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +9 -3
- package/lib/services/authenticator.service.d.ts +10 -3
- package/package.json +2 -2
|
@@ -165,10 +165,17 @@
|
|
|
165
165
|
enumerable: false,
|
|
166
166
|
configurable: true
|
|
167
167
|
});
|
|
168
|
-
Object.defineProperty(AuthenticatorService.prototype, "
|
|
168
|
+
Object.defineProperty(AuthenticatorService.prototype, "initializeMachine", {
|
|
169
169
|
/**
|
|
170
170
|
* Service facades
|
|
171
171
|
*/
|
|
172
|
+
get: function () {
|
|
173
|
+
return this._sendEventAliases.initializeMachine;
|
|
174
|
+
},
|
|
175
|
+
enumerable: false,
|
|
176
|
+
configurable: true
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(AuthenticatorService.prototype, "updateForm", {
|
|
172
179
|
get: function () {
|
|
173
180
|
return this._sendEventAliases.updateForm;
|
|
174
181
|
},
|
|
@@ -315,7 +322,7 @@
|
|
|
315
322
|
AuthenticatorComponent.prototype.ngOnInit = function () {
|
|
316
323
|
var _this = this;
|
|
317
324
|
var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms, services = _a.services, signUpAttributes = _a.signUpAttributes, socialProviders = _a.socialProviders, formFields = _a.formFields;
|
|
318
|
-
var
|
|
325
|
+
var _b = this.authenticator, authService = _b.authService, initializeMachine = _b.initializeMachine;
|
|
319
326
|
this.unsubscribeHub = ui.listenToAuthHub(authService, function (data, service) {
|
|
320
327
|
ui.defaultAuthHubHandler(data, service);
|
|
321
328
|
/**
|
|
@@ -351,16 +358,13 @@
|
|
|
351
358
|
}
|
|
352
359
|
}
|
|
353
360
|
if (!_this.hasInitialized && route === 'setup') {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
socialProviders: socialProviders,
|
|
362
|
-
formFields: formFields,
|
|
363
|
-
},
|
|
361
|
+
initializeMachine({
|
|
362
|
+
initialState: initialState,
|
|
363
|
+
loginMechanisms: loginMechanisms,
|
|
364
|
+
services: services,
|
|
365
|
+
signUpAttributes: signUpAttributes,
|
|
366
|
+
socialProviders: socialProviders,
|
|
367
|
+
formFields: formFields,
|
|
364
368
|
});
|
|
365
369
|
_this.hasInitialized = true;
|
|
366
370
|
}
|
|
@@ -1276,7 +1280,7 @@
|
|
|
1276
1280
|
return [4 /*yield*/, awsAmplify.Auth.setupTOTP(user)];
|
|
1277
1281
|
case 2:
|
|
1278
1282
|
_f.secretKey = _h.sent();
|
|
1279
|
-
totpCode = ui.
|
|
1283
|
+
totpCode = ui.getTotpCodeURL(totpIssuer, totpUsername, this.secretKey);
|
|
1280
1284
|
logger.info('totp code was generated:', totpCode);
|
|
1281
1285
|
_g = this;
|
|
1282
1286
|
return [4 /*yield*/, QRCode__default["default"].toDataURL(totpCode)];
|
|
@@ -1421,7 +1425,7 @@
|
|
|
1421
1425
|
this.authenticator = authenticator;
|
|
1422
1426
|
this.dataAttr = '';
|
|
1423
1427
|
this.headerText = ui.translate('Account recovery requires verified contact information');
|
|
1424
|
-
this.
|
|
1428
|
+
this.unverifiedContactMethods = {};
|
|
1425
1429
|
this.labelId = nanoid.nanoid(12);
|
|
1426
1430
|
// translated texts
|
|
1427
1431
|
this.skipText = ui.translate('Skip');
|
|
@@ -1429,7 +1433,7 @@
|
|
|
1429
1433
|
}
|
|
1430
1434
|
VerifyUserComponent.prototype.ngOnInit = function () {
|
|
1431
1435
|
var actorState = ui.getActorState(this.authenticator.authState);
|
|
1432
|
-
this.
|
|
1436
|
+
this.unverifiedContactMethods = actorState.context.unverifiedContactMethods;
|
|
1433
1437
|
};
|
|
1434
1438
|
Object.defineProperty(VerifyUserComponent.prototype, "context", {
|
|
1435
1439
|
get: function () {
|
|
@@ -1458,7 +1462,7 @@
|
|
|
1458
1462
|
VerifyUserComponent.decorators = [
|
|
1459
1463
|
{ type: i0.Component, args: [{
|
|
1460
1464
|
selector: 'amplify-verify-user',
|
|
1461
|
-
template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div
|
|
1465
|
+
template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div\n *ngFor=\"\n let unverifiedContactMethod of unverifiedContactMethods | keyvalue\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedContactMethod.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{\n getLabelForAttr(unverifiedContactMethod.key)\n }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ verifyText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"verify-user-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n",
|
|
1462
1466
|
encapsulation: i0.ViewEncapsulation.None
|
|
1463
1467
|
},] }
|
|
1464
1468
|
];
|