@aws-amplify/ui-angular 3.2.17 → 3.2.19
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/bundles/aws-amplify-ui-angular.umd.js +55 -54
- package/bundles/aws-amplify-ui-angular.umd.js.map +1 -1
- package/esm2015/lib/common/types/component-types.js +1 -1
- package/esm2015/lib/components/authenticator/components/authenticator/authenticator.component.js +9 -9
- package/esm2015/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.js +4 -4
- package/esm2015/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/form-field/form-field.component.js +5 -5
- package/esm2015/lib/components/authenticator/components/reset-password/reset-password.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/setup-totp/setup-totp.component.js +4 -4
- package/esm2015/lib/components/authenticator/components/sign-in/sign-in.component.js +1 -1
- package/esm2015/lib/components/authenticator/components/sign-up/sign-up.component.js +7 -5
- package/esm2015/lib/components/authenticator/components/verify-user/verify-user.component.js +7 -8
- package/esm2015/lib/primitives/button/button.component.js +1 -1
- package/esm2015/lib/primitives/checkbox/checkbox.component.js +1 -1
- package/esm2015/lib/primitives/error/error.component.js +1 -1
- package/esm2015/lib/primitives/password-field/password-field.component.js +1 -1
- package/esm2015/lib/primitives/phone-number-field/phone-number-field.component.js +1 -1
- package/esm2015/lib/primitives/tabs/tabs.component.js +1 -1
- package/esm2015/lib/primitives/text-field/text-field.component.js +1 -1
- package/esm2015/lib/services/authenticator.service.js +7 -7
- package/esm2015/lib/utilities/amplify-slot/amplify-slot.component.js +2 -2
- package/esm2015/lib/utilities/amplify-slot/amplify-slot.directive.js +1 -1
- package/esm2015/version.js +2 -2
- package/fesm2015/aws-amplify-ui-angular.js +38 -37
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/common/types/component-types.d.ts +1 -1
- package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +2 -26
- package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +1 -25
- package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +1 -25
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +1 -25
- package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +1 -25
- package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +1 -25
- package/lib/components/authenticator/components/form-field/form-field.component.d.ts +1 -1
- package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +1 -25
- package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +1 -25
- package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +1 -25
- package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +1 -25
- package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +3 -26
- package/lib/services/authenticator.service.d.ts +25 -47
- package/lib/utilities/amplify-slot/amplify-slot.component.d.ts +2 -2
- package/lib/utilities/amplify-slot/amplify-slot.directive.d.ts +2 -2
- package/package.json +2 -2
- package/version.d.ts +1 -1
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}]
|
|
82
82
|
}] });
|
|
83
83
|
|
|
84
|
-
var VERSION = '3.2.
|
|
84
|
+
var VERSION = '3.2.19';
|
|
85
85
|
|
|
86
86
|
/******************************************************************************
|
|
87
87
|
Copyright (c) Microsoft Corporation.
|
|
@@ -481,12 +481,6 @@
|
|
|
481
481
|
this.setupHubListener();
|
|
482
482
|
this.getInitialAuthStatus();
|
|
483
483
|
}
|
|
484
|
-
AuthenticatorService.prototype.ngOnDestroy = function () {
|
|
485
|
-
if (this._machineSubscription)
|
|
486
|
-
this._machineSubscription.unsubscribe();
|
|
487
|
-
if (this._unsubscribeHub)
|
|
488
|
-
this._unsubscribeHub();
|
|
489
|
-
};
|
|
490
484
|
Object.defineProperty(AuthenticatorService.prototype, "error", {
|
|
491
485
|
/**
|
|
492
486
|
* Context facades
|
|
@@ -697,6 +691,12 @@
|
|
|
697
691
|
});
|
|
698
692
|
return subscription;
|
|
699
693
|
};
|
|
694
|
+
AuthenticatorService.prototype.ngOnDestroy = function () {
|
|
695
|
+
if (this._machineSubscription)
|
|
696
|
+
this._machineSubscription.unsubscribe();
|
|
697
|
+
if (this._unsubscribeHub)
|
|
698
|
+
this._unsubscribeHub();
|
|
699
|
+
};
|
|
700
700
|
/** @deprecated For internal use only */
|
|
701
701
|
AuthenticatorService.prototype.send = function (event) {
|
|
702
702
|
this.authService.send(event);
|
|
@@ -1240,6 +1240,13 @@
|
|
|
1240
1240
|
this.countryDialCodesValue = ui.countryDialCodes;
|
|
1241
1241
|
this.errorId = nanoid.nanoid(12);
|
|
1242
1242
|
}
|
|
1243
|
+
Object.defineProperty(FormFieldComponent.prototype, "ariaDescribedBy", {
|
|
1244
|
+
get: function () {
|
|
1245
|
+
return this.hasError() ? this.errorId : undefined;
|
|
1246
|
+
},
|
|
1247
|
+
enumerable: false,
|
|
1248
|
+
configurable: true
|
|
1249
|
+
});
|
|
1243
1250
|
Object.defineProperty(FormFieldComponent.prototype, "errors", {
|
|
1244
1251
|
get: function () {
|
|
1245
1252
|
var validationErrors = this.authenticator.validationErrors;
|
|
@@ -1262,13 +1269,6 @@
|
|
|
1262
1269
|
var _a;
|
|
1263
1270
|
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1264
1271
|
};
|
|
1265
|
-
Object.defineProperty(FormFieldComponent.prototype, "ariaDescribedBy", {
|
|
1266
|
-
get: function () {
|
|
1267
|
-
return this.hasError() ? this.errorId : undefined;
|
|
1268
|
-
},
|
|
1269
|
-
enumerable: false,
|
|
1270
|
-
configurable: true
|
|
1271
|
-
});
|
|
1272
1272
|
FormFieldComponent.prototype.translate = function (phrase) {
|
|
1273
1273
|
return ui.translate(phrase);
|
|
1274
1274
|
};
|
|
@@ -1410,9 +1410,11 @@
|
|
|
1410
1410
|
});
|
|
1411
1411
|
SignUpComponent.prototype.onInput = function (event) {
|
|
1412
1412
|
var _a = event.target, checked = _a.checked, name = _a.name, type = _a.type, value = _a.value;
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1413
|
+
var isUncheckedCheckbox = type === 'checkbox' && !checked;
|
|
1414
|
+
this.authenticator.updateForm({
|
|
1415
|
+
name: name,
|
|
1416
|
+
value: isUncheckedCheckbox ? undefined : value,
|
|
1417
|
+
});
|
|
1416
1418
|
};
|
|
1417
1419
|
SignUpComponent.prototype.onSubmit = function (event) {
|
|
1418
1420
|
event.preventDefault();
|
|
@@ -1497,9 +1499,6 @@
|
|
|
1497
1499
|
this.confirmText = getConfirmText$1();
|
|
1498
1500
|
this.backToSignInText = getBackToSignInText$4();
|
|
1499
1501
|
}
|
|
1500
|
-
ConfirmSignInComponent.prototype.ngOnInit = function () {
|
|
1501
|
-
this.setHeaderText();
|
|
1502
|
-
};
|
|
1503
1502
|
Object.defineProperty(ConfirmSignInComponent.prototype, "context", {
|
|
1504
1503
|
get: function () {
|
|
1505
1504
|
return this.authenticator.slotContext;
|
|
@@ -1507,6 +1506,9 @@
|
|
|
1507
1506
|
enumerable: false,
|
|
1508
1507
|
configurable: true
|
|
1509
1508
|
});
|
|
1509
|
+
ConfirmSignInComponent.prototype.ngOnInit = function () {
|
|
1510
|
+
this.setHeaderText();
|
|
1511
|
+
};
|
|
1510
1512
|
ConfirmSignInComponent.prototype.setHeaderText = function () {
|
|
1511
1513
|
var state = this.authenticator.authState;
|
|
1512
1514
|
var actorContext = ui.getActorContext(state);
|
|
@@ -1551,6 +1553,13 @@
|
|
|
1551
1553
|
this.backToSignInText = getBackToSignInText$3();
|
|
1552
1554
|
this.confirmText = getConfirmText();
|
|
1553
1555
|
}
|
|
1556
|
+
Object.defineProperty(SetupTotpComponent.prototype, "context", {
|
|
1557
|
+
get: function () {
|
|
1558
|
+
return this.authenticator.slotContext;
|
|
1559
|
+
},
|
|
1560
|
+
enumerable: false,
|
|
1561
|
+
configurable: true
|
|
1562
|
+
});
|
|
1554
1563
|
SetupTotpComponent.prototype.ngOnInit = function () {
|
|
1555
1564
|
return __awaiter(this, void 0, void 0, function () {
|
|
1556
1565
|
return __generator(this, function (_c) {
|
|
@@ -1563,13 +1572,6 @@
|
|
|
1563
1572
|
});
|
|
1564
1573
|
});
|
|
1565
1574
|
};
|
|
1566
|
-
Object.defineProperty(SetupTotpComponent.prototype, "context", {
|
|
1567
|
-
get: function () {
|
|
1568
|
-
return this.authenticator.slotContext;
|
|
1569
|
-
},
|
|
1570
|
-
enumerable: false,
|
|
1571
|
-
configurable: true
|
|
1572
|
-
});
|
|
1573
1575
|
SetupTotpComponent.prototype.generateQRCode = function () {
|
|
1574
1576
|
var _a, _b;
|
|
1575
1577
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1787,10 +1789,6 @@
|
|
|
1787
1789
|
this.skipText = getSkipText$1();
|
|
1788
1790
|
this.verifyText = getVerifyText();
|
|
1789
1791
|
}
|
|
1790
|
-
VerifyUserComponent.prototype.ngOnInit = function () {
|
|
1791
|
-
var actorState = ui.getActorState(this.authenticator.authState);
|
|
1792
|
-
this.unverifiedContactMethods = actorState.context.unverifiedContactMethods;
|
|
1793
|
-
};
|
|
1794
1792
|
Object.defineProperty(VerifyUserComponent.prototype, "context", {
|
|
1795
1793
|
get: function () {
|
|
1796
1794
|
return this.authenticator.slotContext;
|
|
@@ -1798,15 +1796,18 @@
|
|
|
1798
1796
|
enumerable: false,
|
|
1799
1797
|
configurable: true
|
|
1800
1798
|
});
|
|
1801
|
-
VerifyUserComponent.prototype.
|
|
1802
|
-
var
|
|
1799
|
+
VerifyUserComponent.prototype.ngOnInit = function () {
|
|
1800
|
+
var actorState = ui.getActorState(this.authenticator.authState);
|
|
1801
|
+
this.unverifiedContactMethods = actorState.context.unverifiedContactMethods;
|
|
1802
|
+
};
|
|
1803
|
+
VerifyUserComponent.prototype.getLabel = function (attr) {
|
|
1803
1804
|
var attributeMap = getAttributeMap();
|
|
1804
|
-
var label =
|
|
1805
|
+
var label = attributeMap[attr].label;
|
|
1805
1806
|
return ui.translate(label);
|
|
1806
1807
|
};
|
|
1807
1808
|
VerifyUserComponent.prototype.onInput = function (event) {
|
|
1808
1809
|
event.preventDefault();
|
|
1809
|
-
var
|
|
1810
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1810
1811
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1811
1812
|
};
|
|
1812
1813
|
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
@@ -1816,7 +1817,7 @@
|
|
|
1816
1817
|
return VerifyUserComponent;
|
|
1817
1818
|
}());
|
|
1818
1819
|
VerifyUserComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1819
|
-
VerifyUserComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-verifyuser": "this.dataAttr" } }, ngImport: i0__namespace, 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\">{{
|
|
1820
|
+
VerifyUserComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-verifyuser": "this.dataAttr" } }, ngImport: i0__namespace, 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\">{{ getLabel(unverifiedContactMethod.key) }}</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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "keyvalue": i6__namespace.KeyValuePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1820
1821
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: VerifyUserComponent, decorators: [{
|
|
1821
1822
|
type: i0.Component,
|
|
1822
1823
|
args: [{
|
|
@@ -1887,6 +1888,21 @@
|
|
|
1887
1888
|
this.hasInitialized = false;
|
|
1888
1889
|
this.isHandlingHubEvent = false;
|
|
1889
1890
|
}
|
|
1891
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "context", {
|
|
1892
|
+
// context passed to "authenticated" slot
|
|
1893
|
+
get: function () {
|
|
1894
|
+
return this.authenticator.slotContext;
|
|
1895
|
+
},
|
|
1896
|
+
enumerable: false,
|
|
1897
|
+
configurable: true
|
|
1898
|
+
});
|
|
1899
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "route", {
|
|
1900
|
+
get: function () {
|
|
1901
|
+
return this.authenticator.route;
|
|
1902
|
+
},
|
|
1903
|
+
enumerable: false,
|
|
1904
|
+
configurable: true
|
|
1905
|
+
});
|
|
1890
1906
|
AuthenticatorComponent.prototype.ngOnInit = function () {
|
|
1891
1907
|
var _this = this;
|
|
1892
1908
|
var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms, services = _a.services, signUpAttributes = _a.signUpAttributes, socialProviders = _a.socialProviders, formFields = _a.formFields;
|
|
@@ -1957,24 +1973,9 @@
|
|
|
1957
1973
|
if (this.unsubscribeMachine)
|
|
1958
1974
|
this.unsubscribeMachine();
|
|
1959
1975
|
};
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
*/
|
|
1964
|
-
// context passed to "authenticated" slot
|
|
1965
|
-
get: function () {
|
|
1966
|
-
return this.authenticator.slotContext;
|
|
1967
|
-
},
|
|
1968
|
-
enumerable: false,
|
|
1969
|
-
configurable: true
|
|
1970
|
-
});
|
|
1971
|
-
Object.defineProperty(AuthenticatorComponent.prototype, "route", {
|
|
1972
|
-
get: function () {
|
|
1973
|
-
return this.authenticator.route;
|
|
1974
|
-
},
|
|
1975
|
-
enumerable: false,
|
|
1976
|
-
configurable: true
|
|
1977
|
-
});
|
|
1976
|
+
/**
|
|
1977
|
+
* Class Functions
|
|
1978
|
+
*/
|
|
1978
1979
|
AuthenticatorComponent.prototype.onTabChange = function () {
|
|
1979
1980
|
var route = this.authenticator.route;
|
|
1980
1981
|
if (route === 'signIn') {
|