@aws-amplify/ui-angular 2.0.9 → 2.0.10
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.d.ts +15 -14
- package/aws-amplify-ui-angular.metadata.json +1 -1
- package/bundles/aws-amplify-ui-angular.umd.js +53 -18
- 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/aws-amplify-ui-angular.js +16 -15
- package/esm2015/lib/components/authenticator/authenticator.module.js +4 -1
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.js +30 -0
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password.component.js +2 -2
- package/esm2015/lib/components/authenticator/components/index.js +2 -1
- package/esm2015/lib/services/authenticator.service.js +8 -5
- package/fesm2015/aws-amplify-ui-angular.js +38 -6
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.d.ts +8 -0
- package/lib/components/authenticator/components/index.d.ts +1 -0
- package/lib/services/authenticator.service.d.ts +2 -1
- package/package.json +2 -2
|
@@ -100,16 +100,19 @@
|
|
|
100
100
|
services: services,
|
|
101
101
|
},
|
|
102
102
|
});
|
|
103
|
-
this.
|
|
103
|
+
this._machineSubscription = authService.subscribe(function (state) {
|
|
104
104
|
_this._authState = state;
|
|
105
105
|
_this._facade = ui.getServiceContextFacade(state);
|
|
106
106
|
});
|
|
107
|
+
this._hubSubscription = ui.listenToAuthHub(authService.send);
|
|
107
108
|
this._sendEventAliases = ui.getSendEventAliases(authService.send);
|
|
108
109
|
this._authService = authService;
|
|
109
110
|
};
|
|
110
111
|
AuthenticatorService.prototype.ngOnDestroy = function () {
|
|
111
|
-
if (this.
|
|
112
|
-
this.
|
|
112
|
+
if (this._machineSubscription)
|
|
113
|
+
this._machineSubscription.unsubscribe();
|
|
114
|
+
if (this._hubSubscription)
|
|
115
|
+
this._hubSubscription();
|
|
113
116
|
};
|
|
114
117
|
Object.defineProperty(AuthenticatorService.prototype, "error", {
|
|
115
118
|
/**
|
|
@@ -705,7 +708,7 @@
|
|
|
705
708
|
ForceNewPasswordComponent.decorators = [
|
|
706
709
|
{ type: i0.Component, args: [{
|
|
707
710
|
selector: 'amplify-force-new-password',
|
|
708
|
-
template: "<div data-amplify-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-form-field\n name=\"password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <amplify-form-field\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ changePasswordText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"force-new-password-footer\" [context]=\"context\">\n </amplify-slot>\n </form>\n</div>\n"
|
|
711
|
+
template: "<div data-amplify-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-form-field\n name=\"password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <amplify-form-field\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n <amplify-slot name=\"force-new-form-fields\" [context]=\"context\">\n <amplify-force-new-password-form-fields></amplify-force-new-password-form-fields>\n </amplify-slot>\n\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ changePasswordText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"force-new-password-footer\" [context]=\"context\">\n </amplify-slot>\n </form>\n</div>\n"
|
|
709
712
|
},] }
|
|
710
713
|
];
|
|
711
714
|
ForceNewPasswordComponent.ctorParameters = function () { return [
|
|
@@ -716,6 +719,34 @@
|
|
|
716
719
|
headerText: [{ type: i0.Input }]
|
|
717
720
|
};
|
|
718
721
|
|
|
722
|
+
var ForceNewPasswordFormFieldsComponent = /** @class */ (function () {
|
|
723
|
+
function ForceNewPasswordFormFieldsComponent(authenticator) {
|
|
724
|
+
this.authenticator = authenticator;
|
|
725
|
+
}
|
|
726
|
+
ForceNewPasswordFormFieldsComponent.prototype.ngOnInit = function () {
|
|
727
|
+
var state = this.authenticator.authState;
|
|
728
|
+
var actorContext = ui.getActorContext(state);
|
|
729
|
+
var requiredAttributes = actorContext.requiredAttributes;
|
|
730
|
+
this.fieldNames = requiredAttributes.filter(function (fieldName) {
|
|
731
|
+
var hasDefaultField = !!ui.authInputAttributes[fieldName];
|
|
732
|
+
if (!hasDefaultField) {
|
|
733
|
+
console.debug("Authenticator does not have a default implementation for " + fieldName + ". Customize Authenticator.SignUp.FormFields to add your own.");
|
|
734
|
+
}
|
|
735
|
+
return hasDefaultField;
|
|
736
|
+
});
|
|
737
|
+
};
|
|
738
|
+
return ForceNewPasswordFormFieldsComponent;
|
|
739
|
+
}());
|
|
740
|
+
ForceNewPasswordFormFieldsComponent.decorators = [
|
|
741
|
+
{ type: i0.Component, args: [{
|
|
742
|
+
selector: 'amplify-force-new-password-form-fields',
|
|
743
|
+
template: "<div class=\"amplify-flex\" style=\"flex-direction: column\" data-amplify-fieldset>\n <ng-container *ngFor=\"let field of fieldNames\">\n <amplify-form-field\n [name]=\"field\"\n [labelHidden]=\"false\"\n ></amplify-form-field>\n </ng-container>\n</div>\n"
|
|
744
|
+
},] }
|
|
745
|
+
];
|
|
746
|
+
ForceNewPasswordFormFieldsComponent.ctorParameters = function () { return [
|
|
747
|
+
{ type: AuthenticatorService }
|
|
748
|
+
]; };
|
|
749
|
+
|
|
719
750
|
var getAttributeMap = function () { return ui.authInputAttributes; };
|
|
720
751
|
|
|
721
752
|
/**
|
|
@@ -1801,6 +1832,7 @@
|
|
|
1801
1832
|
FederatedSignInButtonComponent,
|
|
1802
1833
|
FederatedSignInComponent,
|
|
1803
1834
|
ForceNewPasswordComponent,
|
|
1835
|
+
ForceNewPasswordFormFieldsComponent,
|
|
1804
1836
|
FormFieldComponent,
|
|
1805
1837
|
PasswordFieldComponent,
|
|
1806
1838
|
PhoneNumberFieldComponent,
|
|
@@ -1822,6 +1854,7 @@
|
|
|
1822
1854
|
AuthenticatorComponent,
|
|
1823
1855
|
CheckboxComponent,
|
|
1824
1856
|
SignUpFormFieldsComponent,
|
|
1857
|
+
ForceNewPasswordFormFieldsComponent,
|
|
1825
1858
|
TextFieldComponent,
|
|
1826
1859
|
],
|
|
1827
1860
|
},] }
|
|
@@ -1850,6 +1883,7 @@
|
|
|
1850
1883
|
exports.FederatedSignInButtonComponent = FederatedSignInButtonComponent;
|
|
1851
1884
|
exports.FederatedSignInComponent = FederatedSignInComponent;
|
|
1852
1885
|
exports.ForceNewPasswordComponent = ForceNewPasswordComponent;
|
|
1886
|
+
exports.ForceNewPasswordFormFieldsComponent = ForceNewPasswordFormFieldsComponent;
|
|
1853
1887
|
exports.FormFieldComponent = FormFieldComponent;
|
|
1854
1888
|
exports.PasswordFieldComponent = PasswordFieldComponent;
|
|
1855
1889
|
exports.PhoneNumberFieldComponent = PhoneNumberFieldComponent;
|
|
@@ -1867,6 +1901,7 @@
|
|
|
1867
1901
|
exports.getAttributeMap = getAttributeMap;
|
|
1868
1902
|
exports["ɵa"] = AmplifySlotComponent;
|
|
1869
1903
|
exports["ɵb"] = AuthenticatorComponent;
|
|
1904
|
+
exports["ɵba"] = VerifyUserComponent;
|
|
1870
1905
|
exports["ɵc"] = ButtonComponent;
|
|
1871
1906
|
exports["ɵd"] = CheckboxComponent;
|
|
1872
1907
|
exports["ɵe"] = ConfirmResetPasswordComponent;
|
|
@@ -1877,20 +1912,20 @@
|
|
|
1877
1912
|
exports["ɵj"] = FederatedSignInButtonComponent;
|
|
1878
1913
|
exports["ɵk"] = FederatedSignInComponent;
|
|
1879
1914
|
exports["ɵl"] = ForceNewPasswordComponent;
|
|
1880
|
-
exports["ɵm"] =
|
|
1881
|
-
exports["ɵn"] =
|
|
1882
|
-
exports["ɵo"] =
|
|
1883
|
-
exports["ɵp"] =
|
|
1884
|
-
exports["ɵq"] =
|
|
1885
|
-
exports["ɵr"] =
|
|
1886
|
-
exports["ɵs"] =
|
|
1887
|
-
exports["ɵt"] =
|
|
1888
|
-
exports["ɵu"] =
|
|
1889
|
-
exports["ɵv"] =
|
|
1890
|
-
exports["ɵw"] =
|
|
1891
|
-
exports["ɵx"] =
|
|
1892
|
-
exports["ɵy"] =
|
|
1893
|
-
exports["ɵz"] =
|
|
1915
|
+
exports["ɵm"] = ForceNewPasswordFormFieldsComponent;
|
|
1916
|
+
exports["ɵn"] = FormFieldComponent;
|
|
1917
|
+
exports["ɵo"] = PasswordFieldComponent;
|
|
1918
|
+
exports["ɵp"] = PhoneNumberFieldComponent;
|
|
1919
|
+
exports["ɵq"] = ResetPasswordComponent;
|
|
1920
|
+
exports["ɵr"] = SelectComponent;
|
|
1921
|
+
exports["ɵs"] = SetupTotpComponent;
|
|
1922
|
+
exports["ɵt"] = SignInComponent;
|
|
1923
|
+
exports["ɵu"] = SignUpComponent;
|
|
1924
|
+
exports["ɵv"] = SignUpFormFieldsComponent;
|
|
1925
|
+
exports["ɵw"] = TabItemComponent;
|
|
1926
|
+
exports["ɵx"] = TabsComponent;
|
|
1927
|
+
exports["ɵy"] = TextFieldComponent;
|
|
1928
|
+
exports["ɵz"] = UserNameAliasComponent;
|
|
1894
1929
|
|
|
1895
1930
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1896
1931
|
|