@aws-amplify/ui-angular 2.1.0 → 2.1.3
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 +25 -17
- 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/index.js +5 -1
- package/esm2015/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.js +10 -6
- package/esm2015/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/reset-password/reset-password.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/setup-totp/setup-totp.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/sign-in/sign-in.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/sign-up/sign-up.component.js +3 -3
- package/esm2015/lib/components/authenticator/components/verify-user/verify-user.component.js +3 -3
- package/esm2015/lib/primitives/password-field/password-field.component.js +2 -2
- package/esm2015/lib/primitives/phone-number-field/phone-number-field.component.js +2 -2
- package/esm2015/lib/primitives/select/select.component.js +2 -2
- package/esm2015/lib/primitives/text-field/text-field.component.js +2 -2
- package/fesm2015/aws-amplify-ui-angular.js +23 -18
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/index.d.ts +4 -0
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +4 -0
- package/package.json +2 -2
|
@@ -427,7 +427,7 @@
|
|
|
427
427
|
};
|
|
428
428
|
ConfirmResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
429
429
|
event.preventDefault();
|
|
430
|
-
this.authenticator.submitForm();
|
|
430
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
431
431
|
};
|
|
432
432
|
return ConfirmResetPasswordComponent;
|
|
433
433
|
}());
|
|
@@ -485,7 +485,7 @@
|
|
|
485
485
|
};
|
|
486
486
|
ConfirmSignInComponent.prototype.onSubmit = function (event) {
|
|
487
487
|
event.preventDefault();
|
|
488
|
-
this.authenticator.submitForm();
|
|
488
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
489
489
|
};
|
|
490
490
|
return ConfirmSignInComponent;
|
|
491
491
|
}());
|
|
@@ -510,6 +510,10 @@
|
|
|
510
510
|
// translated texts
|
|
511
511
|
this.resendCodeText = ui.translate('Resend Code');
|
|
512
512
|
this.confirmText = ui.translate('Confirm');
|
|
513
|
+
this.emailMessage = ui.translate('Your code is on the way. To log in, enter the code we emailed to');
|
|
514
|
+
this.textedMessage = ui.translate('Your code is on the way. To log in, enter the code we texted to');
|
|
515
|
+
this.defaultMessage = ui.translate('Your code is on the way. To log in, enter the code we sent you. It may take a minute to arrive.');
|
|
516
|
+
this.minutesMessage = ui.translate('It may take a minute to arrive.');
|
|
513
517
|
}
|
|
514
518
|
Object.defineProperty(ConfirmSignUpComponent.prototype, "context", {
|
|
515
519
|
get: function () {
|
|
@@ -534,10 +538,10 @@
|
|
|
534
538
|
get: function () {
|
|
535
539
|
var _a = this.authenticator.codeDeliveryDetails, _b = _a === void 0 ? {} : _a, DeliveryMedium = _b.DeliveryMedium, Destination = _b.Destination;
|
|
536
540
|
return DeliveryMedium === 'EMAIL'
|
|
537
|
-
?
|
|
541
|
+
? this.emailMessage + " " + Destination + ". " + this.minutesMessage
|
|
538
542
|
: DeliveryMedium === 'SMS'
|
|
539
|
-
?
|
|
540
|
-
: ui.translate("
|
|
543
|
+
? this.textedMessage + " " + Destination + ". " + this.minutesMessage
|
|
544
|
+
: ui.translate("" + this.defaultMessage);
|
|
541
545
|
},
|
|
542
546
|
enumerable: false,
|
|
543
547
|
configurable: true
|
|
@@ -549,7 +553,7 @@
|
|
|
549
553
|
};
|
|
550
554
|
ConfirmSignUpComponent.prototype.onSubmit = function (event) {
|
|
551
555
|
event.preventDefault();
|
|
552
|
-
this.authenticator.submitForm();
|
|
556
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
553
557
|
};
|
|
554
558
|
return ConfirmSignUpComponent;
|
|
555
559
|
}());
|
|
@@ -590,7 +594,7 @@
|
|
|
590
594
|
};
|
|
591
595
|
ConfirmVerifyUserComponent.prototype.onSubmit = function (event) {
|
|
592
596
|
event.preventDefault();
|
|
593
|
-
this.authenticator.submitForm();
|
|
597
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
594
598
|
};
|
|
595
599
|
return ConfirmVerifyUserComponent;
|
|
596
600
|
}());
|
|
@@ -702,7 +706,7 @@
|
|
|
702
706
|
};
|
|
703
707
|
ForceNewPasswordComponent.prototype.onSubmit = function (event) {
|
|
704
708
|
event.preventDefault();
|
|
705
|
-
this.authenticator.submitForm();
|
|
709
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
706
710
|
};
|
|
707
711
|
return ForceNewPasswordComponent;
|
|
708
712
|
}());
|
|
@@ -876,7 +880,7 @@
|
|
|
876
880
|
};
|
|
877
881
|
ResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
878
882
|
event.preventDefault();
|
|
879
|
-
this.authenticator.submitForm();
|
|
883
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
880
884
|
};
|
|
881
885
|
return ResetPasswordComponent;
|
|
882
886
|
}());
|
|
@@ -1275,7 +1279,7 @@
|
|
|
1275
1279
|
};
|
|
1276
1280
|
SetupTotpComponent.prototype.onSubmit = function (event) {
|
|
1277
1281
|
event.preventDefault();
|
|
1278
|
-
this.authenticator.submitForm();
|
|
1282
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1279
1283
|
};
|
|
1280
1284
|
SetupTotpComponent.prototype.copyText = function () {
|
|
1281
1285
|
navigator.clipboard.writeText(this.secretKey);
|
|
@@ -1321,7 +1325,7 @@
|
|
|
1321
1325
|
};
|
|
1322
1326
|
SignInComponent.prototype.onSubmit = function (event) {
|
|
1323
1327
|
event.preventDefault();
|
|
1324
|
-
this.authenticator.submitForm();
|
|
1328
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1325
1329
|
};
|
|
1326
1330
|
return SignInComponent;
|
|
1327
1331
|
}());
|
|
@@ -1361,7 +1365,7 @@
|
|
|
1361
1365
|
};
|
|
1362
1366
|
SignUpComponent.prototype.onSubmit = function (event) {
|
|
1363
1367
|
event.preventDefault();
|
|
1364
|
-
this.authenticator.submitForm();
|
|
1368
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1365
1369
|
};
|
|
1366
1370
|
return SignUpComponent;
|
|
1367
1371
|
}());
|
|
@@ -1478,7 +1482,7 @@
|
|
|
1478
1482
|
};
|
|
1479
1483
|
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1480
1484
|
event.preventDefault();
|
|
1481
|
-
this.authenticator.submitForm();
|
|
1485
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1482
1486
|
};
|
|
1483
1487
|
return VerifyUserComponent;
|
|
1484
1488
|
}());
|
|
@@ -1609,7 +1613,7 @@
|
|
|
1609
1613
|
PasswordFieldComponent.decorators = [
|
|
1610
1614
|
{ type: i0.Component, args: [{
|
|
1611
1615
|
selector: 'amplify-password-field',
|
|
1612
|
-
template: "<label
|
|
1616
|
+
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<div class=\"amplify-flex amplify-field-group\">\n <input\n class=\"amplify-input amplify-field-group__control\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n (blur)=\"setBlur.emit($event)\"\n />\n <div class=\"amplify-field-group__outer-end\">\n <button\n amplify-button\n [attr.aria-label]=\"showPasswordButtonlabel\"\n class=\"amplify-field-group__control amplify-field__show-password\"\n (click)=\"togglePasswordText()\"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n</div>\n"
|
|
1613
1617
|
},] }
|
|
1614
1618
|
];
|
|
1615
1619
|
PasswordFieldComponent.propDecorators = {
|
|
@@ -1644,7 +1648,7 @@
|
|
|
1644
1648
|
PhoneNumberFieldComponent.decorators = [
|
|
1645
1649
|
{ type: i0.Component, args: [{
|
|
1646
1650
|
selector: 'amplify-phone-number-field',
|
|
1647
|
-
template: "<label
|
|
1651
|
+
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n>\n {{ label }}\n</label>\n<div\n class=\"amplify-flex amplify-phonenumberfield\"\n amplify-field-group\n style=\"gap: 0px\"\n>\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"\n amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect\n \"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodes\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <input\n class=\"amplify-input\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n />\n</div>\n"
|
|
1648
1652
|
},] }
|
|
1649
1653
|
];
|
|
1650
1654
|
PhoneNumberFieldComponent.propDecorators = {
|
|
@@ -1671,7 +1675,7 @@
|
|
|
1671
1675
|
SelectComponent.decorators = [
|
|
1672
1676
|
{ type: i0.Component, args: [{
|
|
1673
1677
|
selector: 'amplify-form-select',
|
|
1674
|
-
template: "<label class=\"amplify-label
|
|
1678
|
+
template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon-wrapper\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n"
|
|
1675
1679
|
},] }
|
|
1676
1680
|
];
|
|
1677
1681
|
SelectComponent.propDecorators = {
|
|
@@ -1764,7 +1768,7 @@
|
|
|
1764
1768
|
TextFieldComponent.decorators = [
|
|
1765
1769
|
{ type: i0.Component, args: [{
|
|
1766
1770
|
selector: 'amplify-text-field',
|
|
1767
|
-
template: "<label
|
|
1771
|
+
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n/>\n"
|
|
1768
1772
|
},] }
|
|
1769
1773
|
];
|
|
1770
1774
|
TextFieldComponent.propDecorators = {
|
|
@@ -1869,6 +1873,10 @@
|
|
|
1869
1873
|
* Generated bundle index. Do not edit.
|
|
1870
1874
|
*/
|
|
1871
1875
|
|
|
1876
|
+
Object.defineProperty(exports, 'translations', {
|
|
1877
|
+
enumerable: true,
|
|
1878
|
+
get: function () { return ui.translations; }
|
|
1879
|
+
});
|
|
1872
1880
|
exports.AmplifyAuthenticatorModule = AmplifyAuthenticatorModule;
|
|
1873
1881
|
exports.AmplifySlotDirective = AmplifySlotDirective;
|
|
1874
1882
|
exports.AuthenticatorComponent = AuthenticatorComponent;
|