@aws-amplify/ui-angular 4.0.9 → 5.0.0

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.
Files changed (26) hide show
  1. package/esm2020/lib/components/authenticator/authenticator.module.mjs +4 -4
  2. package/esm2020/lib/components/authenticator/components/authenticator/authenticator.component.mjs +9 -7
  3. package/esm2020/lib/components/authenticator/components/forgot-password/forgot-password.component.mjs +44 -0
  4. package/esm2020/lib/components/authenticator/components/index.mjs +2 -2
  5. package/esm2020/lib/components/authenticator/components/setup-totp/setup-totp.component.mjs +8 -8
  6. package/esm2020/lib/components/authenticator/components/sign-in/sign-in.component.mjs +3 -3
  7. package/esm2020/lib/components/authenticator/components/verify-user/verify-user.component.mjs +5 -5
  8. package/esm2020/lib/primitives/password-field/password-field.component.mjs +3 -3
  9. package/esm2020/lib/primitives/phone-number-field/phone-number-field.component.mjs +3 -3
  10. package/esm2020/lib/primitives/select/select.component.mjs +3 -3
  11. package/esm2020/lib/primitives/tab-item/tab-item.component.mjs +3 -3
  12. package/esm2020/lib/primitives/tabs/tabs.component.mjs +5 -5
  13. package/esm2020/lib/services/authenticator.service.mjs +10 -7
  14. package/fesm2015/aws-amplify-ui-angular.mjs +51 -46
  15. package/fesm2015/aws-amplify-ui-angular.mjs.map +1 -1
  16. package/fesm2020/aws-amplify-ui-angular.mjs +50 -46
  17. package/fesm2020/aws-amplify-ui-angular.mjs.map +1 -1
  18. package/lib/components/authenticator/authenticator.module.d.ts +2 -2
  19. package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +1 -0
  20. package/lib/components/authenticator/components/{reset-password/reset-password.component.d.ts → forgot-password/forgot-password.component.d.ts} +3 -3
  21. package/lib/components/authenticator/components/index.d.ts +1 -1
  22. package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +3 -3
  23. package/lib/primitives/password-field/password-field.component.d.ts +163 -4
  24. package/lib/services/authenticator.service.d.ts +5 -3
  25. package/package.json +4 -5
  26. package/esm2020/lib/components/authenticator/components/reset-password/reset-password.component.mjs +0 -44
@@ -17,7 +17,7 @@ import * as i15 from "./components/force-new-password/force-new-password-form-fi
17
17
  import * as i16 from "./components/form-field/form-field.component";
18
18
  import * as i17 from "../../primitives/password-field/password-field.component";
19
19
  import * as i18 from "../../primitives/phone-number-field/phone-number-field.component";
20
- import * as i19 from "./components/reset-password/reset-password.component";
20
+ import * as i19 from "./components/forgot-password/forgot-password.component";
21
21
  import * as i20 from "../../primitives/select/select.component";
22
22
  import * as i21 from "./components/setup-totp/setup-totp.component";
23
23
  import * as i22 from "./components/sign-in/sign-in.component";
@@ -30,6 +30,6 @@ import * as i28 from "./components/verify-user/verify-user.component";
30
30
  import * as i29 from "@angular/common";
31
31
  export declare class AmplifyAuthenticatorModule {
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<AmplifyAuthenticatorModule, never>;
33
- static ɵmod: i0.ɵɵNgModuleDeclaration<AmplifyAuthenticatorModule, [typeof i1.AmplifySlotComponent, typeof i2.AmplifySlotDirective, typeof i3.AuthenticatorComponent, typeof i4.BaseFormFieldsComponent, typeof i5.ButtonComponent, typeof i6.CheckboxComponent, typeof i7.ConfirmResetPasswordComponent, typeof i8.ConfirmSignInComponent, typeof i9.ConfirmSignUpComponent, typeof i10.ConfirmVerifyUserComponent, typeof i11.ErrorComponent, typeof i12.FederatedSignInButtonComponent, typeof i13.FederatedSignInComponent, typeof i14.ForceNewPasswordComponent, typeof i15.ForceNewPasswordFormFieldsComponent, typeof i16.FormFieldComponent, typeof i17.PasswordFieldComponent, typeof i18.PhoneNumberFieldComponent, typeof i19.ResetPasswordComponent, typeof i20.SelectComponent, typeof i21.SetupTotpComponent, typeof i22.SignInComponent, typeof i23.SignUpComponent, typeof i24.SignUpFormFieldsComponent, typeof i25.TabItemComponent, typeof i26.TabsComponent, typeof i27.TextFieldComponent, typeof i28.VerifyUserComponent], [typeof i29.CommonModule], [typeof i2.AmplifySlotDirective, typeof i3.AuthenticatorComponent, typeof i6.CheckboxComponent, typeof i24.SignUpFormFieldsComponent, typeof i15.ForceNewPasswordFormFieldsComponent, typeof i27.TextFieldComponent]>;
33
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AmplifyAuthenticatorModule, [typeof i1.AmplifySlotComponent, typeof i2.AmplifySlotDirective, typeof i3.AuthenticatorComponent, typeof i4.BaseFormFieldsComponent, typeof i5.ButtonComponent, typeof i6.CheckboxComponent, typeof i7.ConfirmResetPasswordComponent, typeof i8.ConfirmSignInComponent, typeof i9.ConfirmSignUpComponent, typeof i10.ConfirmVerifyUserComponent, typeof i11.ErrorComponent, typeof i12.FederatedSignInButtonComponent, typeof i13.FederatedSignInComponent, typeof i14.ForceNewPasswordComponent, typeof i15.ForceNewPasswordFormFieldsComponent, typeof i16.FormFieldComponent, typeof i17.PasswordFieldComponent, typeof i18.PhoneNumberFieldComponent, typeof i19.ForgotPasswordComponent, typeof i20.SelectComponent, typeof i21.SetupTotpComponent, typeof i22.SignInComponent, typeof i23.SignUpComponent, typeof i24.SignUpFormFieldsComponent, typeof i25.TabItemComponent, typeof i26.TabsComponent, typeof i27.TextFieldComponent, typeof i28.VerifyUserComponent], [typeof i29.CommonModule], [typeof i2.AmplifySlotDirective, typeof i3.AuthenticatorComponent, typeof i6.CheckboxComponent, typeof i24.SignUpFormFieldsComponent, typeof i15.ForceNewPasswordFormFieldsComponent, typeof i27.TextFieldComponent]>;
34
34
  static ɵinj: i0.ɵɵInjectorDeclaration<AmplifyAuthenticatorModule>;
35
35
  }
@@ -21,6 +21,7 @@ export declare class AuthenticatorComponent implements OnInit, AfterContentInit,
21
21
  private hasInitialized;
22
22
  private isHandlingHubEvent;
23
23
  private unsubscribeMachine;
24
+ private clearUserAgent;
24
25
  constructor(authenticator: AuthenticatorService, contextService: CustomComponentsService, changeDetector: ChangeDetectorRef);
25
26
  get context(): AuthenticatorService['slotContext'];
26
27
  get route(): AuthenticatorService['route'];
@@ -1,7 +1,7 @@
1
1
  import { AuthenticatorService } from '../../../../services/authenticator.service';
2
2
  import { FormFieldsArray } from '@aws-amplify/ui';
3
3
  import * as i0 from "@angular/core";
4
- export declare class ResetPasswordComponent {
4
+ export declare class ForgotPasswordComponent {
5
5
  authenticator: AuthenticatorService;
6
6
  dataAttr: string;
7
7
  headerText: string;
@@ -12,6 +12,6 @@ export declare class ResetPasswordComponent {
12
12
  get context(): AuthenticatorService['slotContext'];
13
13
  onInput(event: Event): void;
14
14
  onSubmit(event: Event): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<ResetPasswordComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<ResetPasswordComponent, "amplify-reset-password", never, { "headerText": "headerText"; }, {}, never, never, false>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "amplify-forgot-password", never, { "headerText": "headerText"; }, {}, never, never, false>;
17
17
  }
@@ -7,7 +7,7 @@ export { FederatedSignInButtonComponent } from './federated-sign-in-button/feder
7
7
  export { FederatedSignInComponent } from './federated-sign-in/federated-sign-in.component';
8
8
  export { ForceNewPasswordComponent } from './force-new-password/force-new-password.component';
9
9
  export { FormFieldComponent } from './form-field/form-field.component';
10
- export { ResetPasswordComponent } from './reset-password/reset-password.component';
10
+ export { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
11
11
  export { SetupTotpComponent } from './setup-totp/setup-totp.component';
12
12
  export { SignInComponent } from './sign-in/sign-in.component';
13
13
  export { SignUpComponent } from './sign-up/sign-up.component';
@@ -1,19 +1,19 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { UnverifiedContactMethods } from '@aws-amplify/ui';
2
+ import { UnverifiedUserAttributes } from '@aws-amplify/ui';
3
3
  import { AuthenticatorService } from '../../../../services/authenticator.service';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class VerifyUserComponent implements OnInit {
6
6
  authenticator: AuthenticatorService;
7
7
  dataAttr: string;
8
8
  headerText: string;
9
- unverifiedContactMethods: {};
9
+ unverifiedUserAttributes: {};
10
10
  labelId: string;
11
11
  skipText: string;
12
12
  verifyText: string;
13
13
  constructor(authenticator: AuthenticatorService);
14
14
  get context(): AuthenticatorService['slotContext'];
15
15
  ngOnInit(): void;
16
- getLabel(attr: keyof UnverifiedContactMethods): string;
16
+ getLabel(attr: keyof UnverifiedUserAttributes): string;
17
17
  onInput(event: Event): void;
18
18
  onSubmit(event: Event): void;
19
19
  static ɵfac: i0.ɵɵFactoryDeclaration<VerifyUserComponent, never>;
@@ -1,6 +1,4 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { ComponentClassName } from '@aws-amplify/ui';
3
- import classnames from 'classnames';
4
2
  import * as i0 from "@angular/core";
5
3
  export declare class PasswordFieldComponent {
6
4
  autocomplete: string;
@@ -18,8 +16,169 @@ export declare class PasswordFieldComponent {
18
16
  type: 'text' | 'password';
19
17
  showPassword: boolean;
20
18
  showPasswordButtonlabel: string;
21
- classnames: typeof classnames;
22
- ComponentClassName: typeof ComponentClassName;
19
+ classnames: (...args: (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | (string | number | boolean | Record<string, unknown> | any)[])[])[])[])[])[])[])[])[])[])[]) => string;
20
+ ComponentClassName: {
21
+ readonly Accordion: "amplify-accordion";
22
+ readonly AccordionItem: "amplify-accordion__item";
23
+ readonly AccordionItemTrigger: "amplify-accordion__item__trigger";
24
+ readonly AccordionItemContent: "amplify-accordion__item__content";
25
+ readonly AccordionItemIcon: "amplify-accordion__item__icon";
26
+ readonly Alert: "amplify-alert";
27
+ readonly AlertIcon: "amplify-alert__icon";
28
+ readonly AlertHeading: "amplify-alert__heading";
29
+ readonly AlertBody: "amplify-alert__body";
30
+ readonly AlertDismiss: "amplify-alert__dismiss";
31
+ readonly Autocomplete: "amplify-autocomplete";
32
+ readonly AutocompleteMenu: "amplify-autocomplete__menu";
33
+ readonly AutocompleteMenuEmpty: "amplify-autocomplete__menu--empty";
34
+ readonly AutocompleteMenuFooter: "amplify-autocomplete__menu__footer";
35
+ readonly AutocompleteMenuHeader: "amplify-autocomplete__menu__header";
36
+ readonly AutocompleteMenuLoading: "amplify-autocomplete__menu--loading";
37
+ readonly AutocompleteMenuOption: "amplify-autocomplete__menu__option";
38
+ readonly AutocompleteMenuOptions: "amplify-autocomplete__menu__options";
39
+ readonly Badge: "amplify-badge";
40
+ readonly Breadcrumbs: "amplify-breadcrumbs";
41
+ readonly BreadcrumbsList: "amplify-breadcrumbs__list";
42
+ readonly BreadcrumbsItem: "amplify-breadcrumbs__item";
43
+ readonly BreadcrumbsSeparator: "amplify-breadcrumbs__separator";
44
+ readonly BreadcrumbsLink: "amplify-breadcrumbs__link";
45
+ readonly Button: "amplify-button";
46
+ readonly ButtonGroup: "amplify-buttongroup";
47
+ readonly ButtonLoaderWrapper: "amplify-button__loader-wrapper";
48
+ readonly Card: "amplify-card";
49
+ readonly Checkbox: "amplify-checkbox";
50
+ readonly CheckboxButton: "amplify-checkbox__button";
51
+ readonly CheckboxIcon: "amplify-checkbox__icon";
52
+ readonly CheckboxInput: "amplify-checkbox__input";
53
+ readonly CheckboxLabel: "amplify-checkbox__label";
54
+ readonly CheckboxField: "amplify-checkboxfield";
55
+ readonly Collection: "amplify-collection";
56
+ readonly CollectionItems: "amplify-collection-items";
57
+ readonly CollectionSearch: "amplify-collection-search";
58
+ readonly CollectionPagination: "amplify-collection-pagination";
59
+ readonly CountryCodeSelect: "amplify-countrycodeselect";
60
+ readonly DialCodeSelect: "amplify-dialcodeselect";
61
+ readonly Divider: "amplify-divider";
62
+ readonly DividerLabel: "amplify-divider--label";
63
+ readonly DropZone: "amplify-dropzone";
64
+ readonly Field: "amplify-field";
65
+ readonly FieldDescription: "amplify-field__description";
66
+ readonly FieldErrorMessage: "amplify-field__error-message";
67
+ readonly FieldGroup: "amplify-field-group";
68
+ readonly FieldGroupControl: "amplify-field-group__control";
69
+ readonly FieldGroupOuterEnd: "amplify-field-group__outer-end";
70
+ readonly FieldGroupOuterStart: "amplify-field-group__outer-start";
71
+ readonly FieldGroupInnerEnd: "amplify-field-group__inner-end";
72
+ readonly FieldGroupInnerStart: "amplify-field-group__inner-start";
73
+ readonly FieldGroupIcon: "amplify-field-group__icon";
74
+ readonly FieldGroupIconButton: "amplify-field-group__icon-button";
75
+ readonly FieldGroupHasInnerEnd: "amplify-field-group--has-inner-end";
76
+ readonly FieldGroupHasInnerStart: "amplify-field-group--has-inner-start";
77
+ readonly FieldShowPassword: "amplify-field__show-password";
78
+ readonly FieldGroupFieldWrapper: "amplify-field-group__field-wrapper";
79
+ readonly Fieldset: "amplify-fieldset";
80
+ readonly FieldsetLegend: "amplify-fieldset__legend";
81
+ readonly Flex: "amplify-flex";
82
+ readonly Grid: "amplify-grid";
83
+ readonly Heading: "amplify-heading";
84
+ readonly HighlightMatch: "amplify-highlightmatch";
85
+ readonly HighlightMatchHighlighted: "amplify-highlightmatch__highlighted";
86
+ readonly Icon: "amplify-icon";
87
+ readonly Image: "amplify-image";
88
+ readonly Input: "amplify-input";
89
+ readonly Label: "amplify-label";
90
+ readonly Link: "amplify-link";
91
+ readonly Loader: "amplify-loader";
92
+ readonly LoaderLabel: "amplify-loader__label";
93
+ readonly MenuContent: "amplify-menu__content";
94
+ readonly MenuItem: "amplify-menu__content__item";
95
+ readonly MenuTrigger: "amplify-menu__trigger";
96
+ readonly MenuWrapper: "amplify-menu__wrapper";
97
+ readonly Message: "amplify-message";
98
+ readonly MessageIcon: "amplify-message__icon";
99
+ readonly MessageHeading: "amplify-message__heading";
100
+ readonly MessageBody: "amplify-message__body";
101
+ readonly MessageContent: "amplify-message__content";
102
+ readonly MessageDismiss: "amplify-message__dismiss";
103
+ readonly Pagination: "amplify-pagination";
104
+ readonly PaginationItem: "amplify-pagination__item";
105
+ readonly PasswordField: "amplify-passwordfield";
106
+ readonly PhoneNumberField: "amplify-phonenumberfield";
107
+ readonly Placeholder: "amplify-placeholder";
108
+ readonly Radio: "amplify-radio";
109
+ readonly RadioButton: "amplify-radio__button";
110
+ readonly RadioInput: "amplify-radio__input";
111
+ readonly RadioLabel: "amplify-radio__label";
112
+ readonly RadioGroupField: "amplify-radiogroupfield";
113
+ readonly RadioGroup: "amplify-radiogroup";
114
+ readonly Rating: "amplify-rating";
115
+ readonly RatingItem: "amplify-rating__item";
116
+ readonly RatingIcon: "amplify-rating__icon";
117
+ readonly RatingLabel: "amplify-rating__label";
118
+ readonly ScrollView: "amplify-scrollview";
119
+ readonly SearchField: "amplify-searchfield";
120
+ readonly SearchFieldClear: "amplify-searchfield__clear";
121
+ readonly SearchFieldSearch: "amplify-searchfield__search";
122
+ readonly Select: "amplify-select";
123
+ readonly SelectField: "amplify-selectfield";
124
+ readonly SelectWrapper: "amplify-select__wrapper";
125
+ readonly SelectIcon: "amplify-select__icon";
126
+ readonly SliderField: "amplify-sliderfield";
127
+ readonly SliderFieldGroup: "amplify-sliderfield__group";
128
+ readonly SliderFieldLabel: "amplify-sliderfield__label";
129
+ readonly SliderFieldRange: "amplify-sliderfield__range";
130
+ readonly SliderFieldRoot: "amplify-sliderfield__root";
131
+ readonly SliderFieldThumb: "amplify-sliderfield__thumb";
132
+ readonly SliderFieldTrack: "amplify-sliderfield__track";
133
+ readonly StepperField: "amplify-stepperfield";
134
+ readonly StepperFieldButtonDecrease: "amplify-stepperfield__button--decrease";
135
+ readonly StepperFieldButtonIncrease: "amplify-stepperfield__button--increase";
136
+ readonly StepperFieldInput: "amplify-stepperfield__input";
137
+ readonly StorageImage: "amplify-storageimage";
138
+ readonly StorageManager: "amplify-storagemanager";
139
+ readonly StorageManagerDropZone: "amplify-storagemanager__dropzone";
140
+ readonly StorageManagerDropZoneIcon: "amplify-storagemanager__dropzone__icon";
141
+ readonly StorageManagerDropZoneText: "amplify-storagemanager__dropzone__text";
142
+ readonly StorageManagerFilePicker: "amplify-storagemanager__file__picker";
143
+ readonly StorageManagerFile: "amplify-storagemanager__file";
144
+ readonly StorageManagerFileWrapper: "amplify-storagemanager__file__wrapper";
145
+ readonly StorageManagerFileList: "amplify-storagemanager__file__list";
146
+ readonly StorageManagerFileName: "amplify-storagemanager__file__name";
147
+ readonly StorageManagerFileSize: "amplify-storagemanager__file__size";
148
+ readonly StorageManagerFileInfo: "amplify-storagemanager__file__info";
149
+ readonly StorageManagerFileImage: "amplify-storagemanager__file__image";
150
+ readonly StorageManagerFileMain: "amplify-storagemanager__file__main";
151
+ readonly StorageManagerFileStatus: "amplify-storagemanager__file__status";
152
+ readonly StorageManagerLoader: "amplify-storagemanager__loader";
153
+ readonly StorageManagerPreviewer: "amplify-storagemanager__previewer";
154
+ readonly StorageManagerPreviewerText: "amplify-storagemanager__previewer__text";
155
+ readonly StorageManagerPreviewerActions: "amplify-storagemanager__previewer__actions";
156
+ readonly StorageManagerPreviewerFooter: "amplify-storagemanager__previewer__footer";
157
+ readonly SwitchField: "amplify-switchfield";
158
+ readonly SwitchLabel: "amplify-switch__label";
159
+ readonly SwitchThumb: "amplify-switch__thumb";
160
+ readonly SwitchTrack: "amplify-switch__track";
161
+ readonly SwitchWrapper: "amplify-switch__wrapper";
162
+ readonly Table: "amplify-table";
163
+ readonly TableCaption: "amplify-table__caption";
164
+ readonly TableBody: "amplify-table__body";
165
+ readonly TableTd: "amplify-table__td";
166
+ readonly TableTh: "amplify-table__th";
167
+ readonly TableFoot: "amplify-table__foot";
168
+ readonly TableHead: "amplify-table__head";
169
+ readonly TableRow: "amplify-table__row";
170
+ readonly Tabs: "amplify-tabs";
171
+ readonly TabsList: "amplify-tabs__list";
172
+ readonly TabsItem: "amplify-tabs__item";
173
+ readonly TabsPanel: "amplify-tabs__panel";
174
+ readonly Text: "amplify-text";
175
+ readonly Textarea: "amplify-textarea";
176
+ readonly TextAreaField: "amplify-textareafield";
177
+ readonly TextField: "amplify-textfield";
178
+ readonly ToggleButton: "amplify-togglebutton";
179
+ readonly ToggleButtonGroup: "amplify-togglebuttongroup";
180
+ readonly VisuallyHidden: "amplify-visually-hidden";
181
+ };
23
182
  togglePasswordText(): void;
24
183
  static ɵfac: i0.ɵɵFactoryDeclaration<PasswordFieldComponent, never>;
25
184
  static ɵcmp: i0.ɵɵComponentDeclaration<PasswordFieldComponent, "amplify-password-field", never, { "autocomplete": "autocomplete"; "disabled": "disabled"; "fieldId": "fieldId"; "initialValue": "initialValue"; "label": "label"; "name": "name"; "placeholder": "placeholder"; "required": "required"; "labelHidden": "labelHidden"; "hasError": "hasError"; "describedBy": "describedBy"; }, { "setBlur": "setBlur"; }, never, never, false>;
@@ -1,7 +1,8 @@
1
1
  import { OnDestroy } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
3
  import { Event, Subscription } from 'xstate';
4
- import { AmplifyUser, AuthContext, AuthenticatorServiceFacade, AuthEvent, AuthInterpreter, AuthMachineState } from '@aws-amplify/ui';
4
+ import { AuthUser } from 'aws-amplify/auth';
5
+ import { AuthContext, AuthenticatorServiceFacade, AuthEvent, AuthInterpreter, AuthMachineState } from '@aws-amplify/ui';
5
6
  import { AuthSubscriptionCallback } from '../common/types';
6
7
  import * as i0 from "@angular/core";
7
8
  /**
@@ -24,7 +25,8 @@ export declare class AuthenticatorService implements OnDestroy {
24
25
  get isPending(): AuthenticatorServiceFacade['isPending'];
25
26
  get route(): AuthenticatorServiceFacade['route'];
26
27
  get authStatus(): AuthenticatorServiceFacade['authStatus'];
27
- get user(): AmplifyUser;
28
+ get user(): AuthUser;
29
+ get username(): string;
28
30
  get validationErrors(): AuthenticatorServiceFacade['validationErrors'];
29
31
  get codeDeliveryDetails(): AuthenticatorServiceFacade['codeDeliveryDetails'];
30
32
  get totpSecretCode(): AuthenticatorServiceFacade['totpSecretCode'];
@@ -41,7 +43,7 @@ export declare class AuthenticatorService implements OnDestroy {
41
43
  * Transition facades
42
44
  */
43
45
  get toFederatedSignIn(): AuthenticatorServiceFacade['toFederatedSignIn'];
44
- get toResetPassword(): AuthenticatorServiceFacade['toResetPassword'];
46
+ get toForgotPassword(): AuthenticatorServiceFacade['toForgotPassword'];
45
47
  get toSignIn(): AuthenticatorServiceFacade['toSignIn'];
46
48
  get toSignUp(): AuthenticatorServiceFacade['toSignUp'];
47
49
  get skipVerification(): AuthenticatorServiceFacade['skipVerification'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-amplify/ui-angular",
3
- "version": "4.0.9",
3
+ "version": "5.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,14 +9,13 @@
9
9
  },
10
10
  "peerDependencies": {
11
11
  "@angular/core": ">= 14.0.0",
12
- "aws-amplify": "^5.0.1"
12
+ "aws-amplify": "^6.0.1"
13
13
  },
14
14
  "dependencies": {
15
- "@aws-amplify/ui": "5.8.1",
16
- "classnames": "2.3.1",
15
+ "@aws-amplify/ui": "6.0.0",
17
16
  "nanoid": "3.1.31",
18
17
  "qrcode": "1.5.0",
19
- "tslib": "2.3.1",
18
+ "tslib": "^2.5.2",
20
19
  "xstate": "^4.33.6"
21
20
  },
22
21
  "publishConfig": {
@@ -1,44 +0,0 @@
1
- import { Component, HostBinding, Input } from '@angular/core';
2
- import { getFormDataFromEvent, authenticatorTextUtil, } from '@aws-amplify/ui';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "../../../../services/authenticator.service";
5
- import * as i2 from "@angular/common";
6
- import * as i3 from "../../../../utilities/amplify-slot/amplify-slot.component";
7
- import * as i4 from "../base-form-fields/base-form-fields.component";
8
- import * as i5 from "../../../../primitives/button/button.component";
9
- import * as i6 from "../../../../primitives/error/error.component";
10
- const { getResetYourPasswordText, getSendCodeText, getBackToSignInText } = authenticatorTextUtil;
11
- export class ResetPasswordComponent {
12
- constructor(authenticator) {
13
- this.authenticator = authenticator;
14
- this.dataAttr = '';
15
- this.headerText = getResetYourPasswordText();
16
- // translated texts
17
- this.sendCodeText = getSendCodeText();
18
- this.backToSignInText = getBackToSignInText();
19
- }
20
- get context() {
21
- return this.authenticator.slotContext;
22
- }
23
- onInput(event) {
24
- event.preventDefault();
25
- const { name, value } = event.target;
26
- this.authenticator.updateForm({ name, value });
27
- }
28
- onSubmit(event) {
29
- event.preventDefault();
30
- this.authenticator.submitForm(getFormDataFromEvent(event));
31
- }
32
- }
33
- ResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResetPasswordComponent, deps: [{ token: i1.AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
34
- ResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ResetPasswordComponent, selector: "amplify-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-resetPassword": "this.dataAttr" } }, ngImport: i0, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n class=\"amplify-flex\"\n name=\"reset-password-header\"\n [context]=\"context\"\n >\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields route=\"resetPassword\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ sendCodeText }}\n </button>\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\n <amplify-slot name=\"reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: i4.BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: i5.ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: i6.ErrorComponent, selector: "amplify-error" }] });
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ResetPasswordComponent, decorators: [{
36
- type: Component,
37
- args: [{ selector: 'amplify-reset-password', template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n class=\"amplify-flex\"\n name=\"reset-password-header\"\n [context]=\"context\"\n >\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields route=\"resetPassword\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ sendCodeText }}\n </button>\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\n <amplify-slot name=\"reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
38
- }], ctorParameters: function () { return [{ type: i1.AuthenticatorService }]; }, propDecorators: { dataAttr: [{
39
- type: HostBinding,
40
- args: ['attr.data-amplify-authenticator-resetPassword']
41
- }], headerText: [{
42
- type: Input
43
- }] } });
44
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzZXQtcGFzc3dvcmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdWktYW5ndWxhci9zcmMvbGliL2NvbXBvbmVudHMvYXV0aGVudGljYXRvci9jb21wb25lbnRzL3Jlc2V0LXBhc3N3b3JkL3Jlc2V0LXBhc3N3b3JkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3VpLWFuZ3VsYXIvc3JjL2xpYi9jb21wb25lbnRzL2F1dGhlbnRpY2F0b3IvY29tcG9uZW50cy9yZXNldC1wYXNzd29yZC9yZXNldC1wYXNzd29yZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFOUQsT0FBTyxFQUVMLG9CQUFvQixFQUNwQixxQkFBcUIsR0FDdEIsTUFBTSxpQkFBaUIsQ0FBQzs7Ozs7Ozs7QUFFekIsTUFBTSxFQUFFLHdCQUF3QixFQUFFLGVBQWUsRUFBRSxtQkFBbUIsRUFBRSxHQUN0RSxxQkFBcUIsQ0FBQztBQU14QixNQUFNLE9BQU8sc0JBQXNCO0lBU2pDLFlBQW1CLGFBQW1DO1FBQW5DLGtCQUFhLEdBQWIsYUFBYSxDQUFzQjtRQVJRLGFBQVEsR0FBRyxFQUFFLENBQUM7UUFDNUQsZUFBVSxHQUFHLHdCQUF3QixFQUFFLENBQUM7UUFFeEQsbUJBQW1CO1FBQ1osaUJBQVksR0FBRyxlQUFlLEVBQUUs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