@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
|
@@ -55,7 +55,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
55
55
|
}]
|
|
56
56
|
}] });
|
|
57
57
|
|
|
58
|
-
const VERSION = '3.2.
|
|
58
|
+
const VERSION = '3.2.19';
|
|
59
59
|
|
|
60
60
|
const logger$1 = new Logger('state-machine');
|
|
61
61
|
/**
|
|
@@ -70,12 +70,6 @@ class AuthenticatorService {
|
|
|
70
70
|
this.setupHubListener();
|
|
71
71
|
this.getInitialAuthStatus();
|
|
72
72
|
}
|
|
73
|
-
ngOnDestroy() {
|
|
74
|
-
if (this._machineSubscription)
|
|
75
|
-
this._machineSubscription.unsubscribe();
|
|
76
|
-
if (this._unsubscribeHub)
|
|
77
|
-
this._unsubscribeHub();
|
|
78
|
-
}
|
|
79
73
|
/**
|
|
80
74
|
* Context facades
|
|
81
75
|
*/
|
|
@@ -185,6 +179,12 @@ class AuthenticatorService {
|
|
|
185
179
|
});
|
|
186
180
|
return subscription;
|
|
187
181
|
}
|
|
182
|
+
ngOnDestroy() {
|
|
183
|
+
if (this._machineSubscription)
|
|
184
|
+
this._machineSubscription.unsubscribe();
|
|
185
|
+
if (this._unsubscribeHub)
|
|
186
|
+
this._unsubscribeHub();
|
|
187
|
+
}
|
|
188
188
|
/** @deprecated For internal use only */
|
|
189
189
|
send(event) {
|
|
190
190
|
this.authService.send(event);
|
|
@@ -240,7 +240,7 @@ class AmplifySlotComponent {
|
|
|
240
240
|
this.isOverriden = false;
|
|
241
241
|
}
|
|
242
242
|
ngAfterContentInit() {
|
|
243
|
-
const customComponents = this.propService
|
|
243
|
+
const { customComponents } = this.propService;
|
|
244
244
|
const overridingComponent = customComponents[this.name];
|
|
245
245
|
if (overridingComponent) {
|
|
246
246
|
this.overridingComponent = overridingComponent;
|
|
@@ -687,12 +687,15 @@ class FormFieldComponent {
|
|
|
687
687
|
this.countryDialCodesValue = countryDialCodes;
|
|
688
688
|
this.errorId = nanoid(12);
|
|
689
689
|
}
|
|
690
|
+
get ariaDescribedBy() {
|
|
691
|
+
return this.hasError() ? this.errorId : undefined;
|
|
692
|
+
}
|
|
690
693
|
get errors() {
|
|
691
694
|
const { validationErrors } = this.authenticator;
|
|
692
695
|
return getErrors(validationErrors[this.name]);
|
|
693
696
|
}
|
|
694
697
|
onBlur($event) {
|
|
695
|
-
|
|
698
|
+
const { name } = $event.target;
|
|
696
699
|
this.authenticator.updateBlur({ name });
|
|
697
700
|
}
|
|
698
701
|
isPasswordField() {
|
|
@@ -705,9 +708,6 @@ class FormFieldComponent {
|
|
|
705
708
|
var _a;
|
|
706
709
|
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
707
710
|
}
|
|
708
|
-
get ariaDescribedBy() {
|
|
709
|
-
return this.hasError() ? this.errorId : undefined;
|
|
710
|
-
}
|
|
711
711
|
translate(phrase) {
|
|
712
712
|
return translate(phrase);
|
|
713
713
|
}
|
|
@@ -833,10 +833,12 @@ class SignUpComponent {
|
|
|
833
833
|
return this.authenticator.slotContext;
|
|
834
834
|
}
|
|
835
835
|
onInput(event) {
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
836
|
+
const { checked, name, type, value } = event.target;
|
|
837
|
+
const isUncheckedCheckbox = type === 'checkbox' && !checked;
|
|
838
|
+
this.authenticator.updateForm({
|
|
839
|
+
name,
|
|
840
|
+
value: isUncheckedCheckbox ? undefined : value,
|
|
841
|
+
});
|
|
840
842
|
}
|
|
841
843
|
onSubmit(event) {
|
|
842
844
|
event.preventDefault();
|
|
@@ -907,12 +909,12 @@ class ConfirmSignInComponent {
|
|
|
907
909
|
this.confirmText = getConfirmText$1();
|
|
908
910
|
this.backToSignInText = getBackToSignInText$4();
|
|
909
911
|
}
|
|
910
|
-
ngOnInit() {
|
|
911
|
-
this.setHeaderText();
|
|
912
|
-
}
|
|
913
912
|
get context() {
|
|
914
913
|
return this.authenticator.slotContext;
|
|
915
914
|
}
|
|
915
|
+
ngOnInit() {
|
|
916
|
+
this.setHeaderText();
|
|
917
|
+
}
|
|
916
918
|
setHeaderText() {
|
|
917
919
|
const state = this.authenticator.authState;
|
|
918
920
|
const actorContext = getActorContext(state);
|
|
@@ -956,14 +958,14 @@ class SetupTotpComponent {
|
|
|
956
958
|
this.backToSignInText = getBackToSignInText$3();
|
|
957
959
|
this.confirmText = getConfirmText();
|
|
958
960
|
}
|
|
961
|
+
get context() {
|
|
962
|
+
return this.authenticator.slotContext;
|
|
963
|
+
}
|
|
959
964
|
ngOnInit() {
|
|
960
965
|
return __awaiter(this, void 0, void 0, function* () {
|
|
961
966
|
yield this.generateQRCode();
|
|
962
967
|
});
|
|
963
968
|
}
|
|
964
|
-
get context() {
|
|
965
|
-
return this.authenticator.slotContext;
|
|
966
|
-
}
|
|
967
969
|
generateQRCode() {
|
|
968
970
|
var _a, _b;
|
|
969
971
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1149,17 +1151,16 @@ class VerifyUserComponent {
|
|
|
1149
1151
|
this.skipText = getSkipText$1();
|
|
1150
1152
|
this.verifyText = getVerifyText();
|
|
1151
1153
|
}
|
|
1154
|
+
get context() {
|
|
1155
|
+
return this.authenticator.slotContext;
|
|
1156
|
+
}
|
|
1152
1157
|
ngOnInit() {
|
|
1153
1158
|
const actorState = getActorState(this.authenticator.authState);
|
|
1154
1159
|
this.unverifiedContactMethods = actorState.context.unverifiedContactMethods;
|
|
1155
1160
|
}
|
|
1156
|
-
|
|
1157
|
-
return this.authenticator.slotContext;
|
|
1158
|
-
}
|
|
1159
|
-
getLabelForAttr(authAttr) {
|
|
1160
|
-
var _a;
|
|
1161
|
+
getLabel(attr) {
|
|
1161
1162
|
const attributeMap = getAttributeMap();
|
|
1162
|
-
const label
|
|
1163
|
+
const { label } = attributeMap[attr];
|
|
1163
1164
|
return translate(label);
|
|
1164
1165
|
}
|
|
1165
1166
|
onInput(event) {
|
|
@@ -1173,7 +1174,7 @@ class VerifyUserComponent {
|
|
|
1173
1174
|
}
|
|
1174
1175
|
}
|
|
1175
1176
|
VerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1176
|
-
VerifyUserComponent.ɵcmp = i0.ɵɵ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, 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\">{{
|
|
1177
|
+
VerifyUserComponent.ɵcmp = i0.ɵɵ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, 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.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "keyvalue": i6.KeyValuePipe }, encapsulation: i0.ViewEncapsulation.None });
|
|
1177
1178
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: VerifyUserComponent, decorators: [{
|
|
1178
1179
|
type: Component,
|
|
1179
1180
|
args: [{
|
|
@@ -1239,6 +1240,13 @@ class AuthenticatorComponent {
|
|
|
1239
1240
|
this.hasInitialized = false;
|
|
1240
1241
|
this.isHandlingHubEvent = false;
|
|
1241
1242
|
}
|
|
1243
|
+
// context passed to "authenticated" slot
|
|
1244
|
+
get context() {
|
|
1245
|
+
return this.authenticator.slotContext;
|
|
1246
|
+
}
|
|
1247
|
+
get route() {
|
|
1248
|
+
return this.authenticator.route;
|
|
1249
|
+
}
|
|
1242
1250
|
ngOnInit() {
|
|
1243
1251
|
const { initialState, loginMechanisms, services, signUpAttributes, socialProviders, formFields, } = this;
|
|
1244
1252
|
configureComponent({
|
|
@@ -1311,15 +1319,8 @@ class AuthenticatorComponent {
|
|
|
1311
1319
|
/**
|
|
1312
1320
|
* Class Functions
|
|
1313
1321
|
*/
|
|
1314
|
-
// context passed to "authenticated" slot
|
|
1315
|
-
get context() {
|
|
1316
|
-
return this.authenticator.slotContext;
|
|
1317
|
-
}
|
|
1318
|
-
get route() {
|
|
1319
|
-
return this.authenticator.route;
|
|
1320
|
-
}
|
|
1321
1322
|
onTabChange() {
|
|
1322
|
-
const route = this.authenticator
|
|
1323
|
+
const { route } = this.authenticator;
|
|
1323
1324
|
if (route === 'signIn') {
|
|
1324
1325
|
this.authenticator.toSignUp();
|
|
1325
1326
|
}
|