@aws-amplify/ui-angular 2.0.2 → 2.0.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 +21 -8
- 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/authenticator.module.js +2 -3
- package/esm2015/lib/components/authenticator/components/form-field/form-field.component.js +6 -2
- package/esm2015/lib/primitives/password-field/password-field.component.js +6 -4
- package/esm2015/lib/services/authenticator.service.js +4 -1
- package/fesm2015/aws-amplify-ui-angular.js +13 -5
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +2 -0
- package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +2 -0
- package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +2 -0
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +2 -0
- package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +2 -0
- package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +2 -0
- package/lib/components/authenticator/components/form-field/form-field.component.d.ts +1 -0
- package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +2 -0
- package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +2 -0
- package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +2 -0
- package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +2 -0
- package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +2 -0
- package/lib/primitives/password-field/password-field.component.d.ts +2 -0
- package/lib/services/authenticator.service.d.ts +3 -0
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@aws-amplify/ui-angular', ['exports', '@angular/core', '@angular/common', '@
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["aws-amplify"] = global["aws-amplify"] || {}, global["aws-amplify"]["ui-angular"] = {}), global.ng.core, global.ng.common, global.
|
|
5
|
-
})(this, (function (exports, i0, common,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@aws-amplify/ui'), require('@aws-amplify/core'), require('xstate'), require('aws-amplify'), require('qrcode'), require('nanoid')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@aws-amplify/ui-angular', ['exports', '@angular/core', '@angular/common', '@aws-amplify/ui', '@aws-amplify/core', 'xstate', 'aws-amplify', 'qrcode', 'nanoid'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["aws-amplify"] = global["aws-amplify"] || {}, global["aws-amplify"]["ui-angular"] = {}), global.ng.core, global.ng.common, global.ui, global.core, global.xstate, global["aws-amplify"], global.QRCode, global.nanoid));
|
|
5
|
+
})(this, (function (exports, i0, common, ui, core, xstate, awsAmplify, QRCode, nanoid) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -170,6 +170,13 @@
|
|
|
170
170
|
enumerable: false,
|
|
171
171
|
configurable: true
|
|
172
172
|
});
|
|
173
|
+
Object.defineProperty(AuthenticatorService.prototype, "updateBlur", {
|
|
174
|
+
get: function () {
|
|
175
|
+
return this._sendEventAliases.updateBlur;
|
|
176
|
+
},
|
|
177
|
+
enumerable: false,
|
|
178
|
+
configurable: true
|
|
179
|
+
});
|
|
173
180
|
Object.defineProperty(AuthenticatorService.prototype, "resendCode", {
|
|
174
181
|
get: function () {
|
|
175
182
|
return this._sendEventAliases.resendCode;
|
|
@@ -721,6 +728,10 @@
|
|
|
721
728
|
enumerable: false,
|
|
722
729
|
configurable: true
|
|
723
730
|
});
|
|
731
|
+
FormFieldComponent.prototype.onBlur = function ($event) {
|
|
732
|
+
var name = $event.target.name;
|
|
733
|
+
this.authenticator.updateBlur({ name: name });
|
|
734
|
+
};
|
|
724
735
|
FormFieldComponent.prototype.inferLabel = function () {
|
|
725
736
|
var _a;
|
|
726
737
|
var label = this.label || ((_a = this.attributeMap[this.name]) === null || _a === void 0 ? void 0 : _a.label);
|
|
@@ -753,7 +764,7 @@
|
|
|
753
764
|
FormFieldComponent.decorators = [
|
|
754
765
|
{ type: i0.Component, args: [{
|
|
755
766
|
selector: 'amplify-form-field',
|
|
756
|
-
template: "<div class=\"amplify-flex amplify-field\" style=\"flex-direction: column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [defaultCountryCode]=\"defaultCountryCode\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n ></amplify-text-field>\n\n <amplify-error *ngIf=\"error\">\n {{ error }}\n </amplify-error>\n</div>\n"
|
|
767
|
+
template: "<div class=\"amplify-flex amplify-field\" style=\"flex-direction: column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [defaultCountryCode]=\"defaultCountryCode\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [labelHidden]=\"labelHidden\"\n [autocomplete]=\"inferAutocomplete()\"\n ></amplify-text-field>\n\n <amplify-error *ngIf=\"error\">\n {{ error }}\n </amplify-error>\n</div>\n"
|
|
757
768
|
},] }
|
|
758
769
|
];
|
|
759
770
|
FormFieldComponent.ctorParameters = function () { return [
|
|
@@ -1506,6 +1517,7 @@
|
|
|
1506
1517
|
this.placeholder = '';
|
|
1507
1518
|
this.required = true;
|
|
1508
1519
|
this.labelHidden = false;
|
|
1520
|
+
this.setBlur = new i0.EventEmitter();
|
|
1509
1521
|
this.type = 'password';
|
|
1510
1522
|
this.showPassword = false;
|
|
1511
1523
|
this.showPasswordButtonlabel = ui.translate('Show password');
|
|
@@ -1522,7 +1534,7 @@
|
|
|
1522
1534
|
PasswordFieldComponent.decorators = [
|
|
1523
1535
|
{ type: i0.Component, args: [{
|
|
1524
1536
|
selector: 'amplify-password-field',
|
|
1525
|
-
template: "<label class=\"amplify-label\" [class.sr-only]=\"labelHidden\" [for]=\"fieldId\">\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 />\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"
|
|
1537
|
+
template: "<label class=\"amplify-label\" [class.sr-only]=\"labelHidden\" [for]=\"fieldId\">\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"
|
|
1526
1538
|
},] }
|
|
1527
1539
|
];
|
|
1528
1540
|
PasswordFieldComponent.propDecorators = {
|
|
@@ -1534,7 +1546,8 @@
|
|
|
1534
1546
|
name: [{ type: i0.Input }],
|
|
1535
1547
|
placeholder: [{ type: i0.Input }],
|
|
1536
1548
|
required: [{ type: i0.Input }],
|
|
1537
|
-
labelHidden: [{ type: i0.Input }]
|
|
1549
|
+
labelHidden: [{ type: i0.Input }],
|
|
1550
|
+
setBlur: [{ type: i0.Output }]
|
|
1538
1551
|
};
|
|
1539
1552
|
|
|
1540
1553
|
var PhoneNumberFieldComponent = /** @class */ (function () {
|
|
@@ -1758,7 +1771,7 @@
|
|
|
1758
1771
|
UserNameAliasComponent,
|
|
1759
1772
|
VerifyUserComponent,
|
|
1760
1773
|
],
|
|
1761
|
-
imports: [common.CommonModule
|
|
1774
|
+
imports: [common.CommonModule],
|
|
1762
1775
|
exports: [
|
|
1763
1776
|
AmplifySlotDirective,
|
|
1764
1777
|
AuthenticatorComponent,
|