@aws-amplify/ui-angular 5.1.6 → 5.2.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 (83) hide show
  1. package/fesm2022/aws-amplify-ui-angular.mjs +1583 -0
  2. package/fesm2022/aws-amplify-ui-angular.mjs.map +1 -0
  3. package/lib/common/types/auth-types.d.ts +2 -2
  4. package/lib/common/types/component-types.d.ts +1 -1
  5. package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +1 -1
  6. package/lib/components/authenticator/components/base-form-fields/base-form-fields.component.d.ts +1 -1
  7. package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +1 -1
  8. package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +1 -1
  9. package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +1 -1
  10. package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +1 -1
  11. package/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.d.ts +1 -1
  12. package/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.d.ts +1 -1
  13. package/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.d.ts +1 -1
  14. package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +1 -1
  15. package/lib/components/authenticator/components/forgot-password/forgot-password.component.d.ts +1 -1
  16. package/lib/components/authenticator/components/form-field/form-field.component.d.ts +1 -1
  17. package/lib/components/authenticator/components/select-mfa-type/select-mfa-type.component.d.ts +1 -1
  18. package/lib/components/authenticator/components/setup-email/setup-email.component.d.ts +1 -1
  19. package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +1 -1
  20. package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +1 -1
  21. package/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.d.ts +1 -1
  22. package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +1 -1
  23. package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +1 -1
  24. package/lib/primitives/button/button.component.d.ts +1 -1
  25. package/lib/primitives/checkbox/checkbox.component.d.ts +1 -1
  26. package/lib/primitives/error/error.component.d.ts +1 -1
  27. package/lib/primitives/password-field/password-field.component.d.ts +1 -1
  28. package/lib/primitives/phone-number-field/phone-number-field.component.d.ts +1 -1
  29. package/lib/primitives/select/select.component.d.ts +1 -1
  30. package/lib/primitives/tab-item/tab-item.component.d.ts +1 -1
  31. package/lib/primitives/tabs/tabs.component.d.ts +1 -1
  32. package/lib/primitives/text-field/text-field.component.d.ts +1 -1
  33. package/lib/utilities/amplify-slot/amplify-slot.component.d.ts +1 -1
  34. package/lib/utilities/amplify-slot/amplify-slot.directive.d.ts +1 -1
  35. package/package.json +7 -15
  36. package/version.d.ts +1 -1
  37. package/esm2020/aws-amplify-ui-angular.mjs +0 -5
  38. package/esm2020/index.mjs +0 -30
  39. package/esm2020/lib/common/helpers.mjs +0 -3
  40. package/esm2020/lib/common/index.mjs +0 -3
  41. package/esm2020/lib/common/types/auth-types.mjs +0 -2
  42. package/esm2020/lib/common/types/component-types.mjs +0 -2
  43. package/esm2020/lib/common/types/index.mjs +0 -3
  44. package/esm2020/lib/components/authenticator/authenticator.module.mjs +0 -124
  45. package/esm2020/lib/components/authenticator/components/authenticator/authenticator.component.mjs +0 -180
  46. package/esm2020/lib/components/authenticator/components/base-form-fields/base-form-fields.component.mjs +0 -32
  47. package/esm2020/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.mjs +0 -45
  48. package/esm2020/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.mjs +0 -49
  49. package/esm2020/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.mjs +0 -49
  50. package/esm2020/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.mjs +0 -44
  51. package/esm2020/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.mjs +0 -47
  52. package/esm2020/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.mjs +0 -26
  53. package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.mjs +0 -12
  54. package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password.component.mjs +0 -44
  55. package/esm2020/lib/components/authenticator/components/forgot-password/forgot-password.component.mjs +0 -44
  56. package/esm2020/lib/components/authenticator/components/form-field/form-field.component.mjs +0 -50
  57. package/esm2020/lib/components/authenticator/components/index.mjs +0 -18
  58. package/esm2020/lib/components/authenticator/components/select-mfa-type/select-mfa-type.component.mjs +0 -52
  59. package/esm2020/lib/components/authenticator/components/setup-email/setup-email.component.mjs +0 -39
  60. package/esm2020/lib/components/authenticator/components/setup-totp/setup-totp.component.mjs +0 -69
  61. package/esm2020/lib/components/authenticator/components/sign-in/sign-in.component.mjs +0 -41
  62. package/esm2020/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.mjs +0 -12
  63. package/esm2020/lib/components/authenticator/components/sign-up/sign-up.component.mjs +0 -44
  64. package/esm2020/lib/components/authenticator/components/verify-user/verify-user.component.mjs +0 -58
  65. package/esm2020/lib/primitives/button/button.component.mjs +0 -78
  66. package/esm2020/lib/primitives/checkbox/checkbox.component.mjs +0 -37
  67. package/esm2020/lib/primitives/error/error.component.mjs +0 -21
  68. package/esm2020/lib/primitives/index.mjs +0 -10
  69. package/esm2020/lib/primitives/password-field/password-field.component.mjs +0 -64
  70. package/esm2020/lib/primitives/phone-number-field/phone-number-field.component.mjs +0 -62
  71. package/esm2020/lib/primitives/select/select.component.mjs +0 -22
  72. package/esm2020/lib/primitives/tab-item/tab-item.component.mjs +0 -29
  73. package/esm2020/lib/primitives/tabs/tabs.component.mjs +0 -48
  74. package/esm2020/lib/primitives/text-field/text-field.component.mjs +0 -50
  75. package/esm2020/lib/services/authenticator.service.mjs +0 -180
  76. package/esm2020/lib/services/custom-components.service.mjs +0 -25
  77. package/esm2020/lib/utilities/amplify-slot/amplify-slot.component.mjs +0 -33
  78. package/esm2020/lib/utilities/amplify-slot/amplify-slot.directive.mjs +0 -21
  79. package/esm2020/version.mjs +0 -2
  80. package/fesm2015/aws-amplify-ui-angular.mjs +0 -1521
  81. package/fesm2015/aws-amplify-ui-angular.mjs.map +0 -1
  82. package/fesm2020/aws-amplify-ui-angular.mjs +0 -1504
  83. package/fesm2020/aws-amplify-ui-angular.mjs.map +0 -1
@@ -1,1504 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Input, Directive, Injectable, HostBinding, Component, EventEmitter, Output, ViewEncapsulation, ContentChildren, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import { createAuthenticatorMachine, translate, listenToAuthHub, defaultAuthHubHandler, getServiceFacade, classNames, ComponentClassName, countryDialCodes, getErrors, getSortedFormFields, authenticatorTextUtil, getFormDataFromEvent, getActorContext, getTotpCodeURL, FederatedIdentityProviders, defaultFormFieldOptions, getActorState, censorContactMethod, setUserAgent } from '@aws-amplify/ui';
6
- export { translations } from '@aws-amplify/ui';
7
- import { Subject } from 'rxjs';
8
- import { interpret } from 'xstate';
9
- import { getCurrentUser } from 'aws-amplify/auth';
10
- import { ConsoleLogger } from 'aws-amplify/utils';
11
- import { nanoid } from 'nanoid';
12
- import QRCode from 'qrcode';
13
-
14
- class AmplifySlotDirective {
15
- constructor(template) {
16
- this.template = template;
17
- }
18
- set amplifySlot(component) {
19
- this.name = component;
20
- }
21
- }
22
- AmplifySlotDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
23
- AmplifySlotDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotDirective, selector: "[amplifySlot]", inputs: { amplifySlot: "amplifySlot" }, ngImport: i0 });
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, decorators: [{
25
- type: Directive,
26
- args: [{
27
- selector: '[amplifySlot]',
28
- }]
29
- }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { amplifySlot: [{
30
- type: Input
31
- }] } });
32
-
33
- /**
34
- * Stores and provides custom components that users provide with `amplify-slot`.
35
- */
36
- class CustomComponentsService {
37
- constructor() {
38
- this._customComponents = {};
39
- }
40
- get customComponents() {
41
- return this._customComponents;
42
- }
43
- set customComponents(customComponents) {
44
- this._customComponents = { ...this._customComponents, ...customComponents };
45
- }
46
- }
47
- CustomComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
48
- CustomComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, providedIn: 'root' });
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, decorators: [{
50
- type: Injectable,
51
- args: [{
52
- providedIn: 'root',
53
- }]
54
- }] });
55
-
56
- const VERSION = '5.1.6';
57
-
58
- const logger$1 = new ConsoleLogger('state-machine');
59
- /**
60
- * AuthenticatorService provides access to the authenticator state and context.
61
- */
62
- class AuthenticatorService {
63
- constructor() {
64
- this._authStatus = 'configuring';
65
- const machine = createAuthenticatorMachine();
66
- this._authService = interpret(machine).start();
67
- this.getInitialAuthStatus();
68
- this.setupMachineSubscription();
69
- this.setupHubListener();
70
- }
71
- /**
72
- * Context facades
73
- */
74
- get error() {
75
- return translate(this._facade?.error);
76
- }
77
- get hasValidationErrors() {
78
- return this._facade?.hasValidationErrors;
79
- }
80
- get isPending() {
81
- return this._facade?.isPending;
82
- }
83
- get route() {
84
- return this._facade?.route;
85
- }
86
- get authStatus() {
87
- return this._authStatus;
88
- }
89
- get user() {
90
- return this._facade?.user;
91
- }
92
- get username() {
93
- return this._facade?.username;
94
- }
95
- get validationErrors() {
96
- return this._facade?.validationErrors;
97
- }
98
- get codeDeliveryDetails() {
99
- return this._facade?.codeDeliveryDetails;
100
- }
101
- get totpSecretCode() {
102
- return this._facade?.totpSecretCode;
103
- }
104
- /**
105
- * Service facades
106
- */
107
- get initializeMachine() {
108
- return this._facade.initializeMachine;
109
- }
110
- get updateForm() {
111
- return this._facade.updateForm;
112
- }
113
- get updateBlur() {
114
- return this._facade.updateBlur;
115
- }
116
- get resendCode() {
117
- return this._facade.resendCode;
118
- }
119
- get signOut() {
120
- return this._facade.signOut;
121
- }
122
- get submitForm() {
123
- return this._facade.submitForm;
124
- }
125
- /**
126
- * Transition facades
127
- */
128
- get toFederatedSignIn() {
129
- return this._facade.toFederatedSignIn;
130
- }
131
- get toForgotPassword() {
132
- return this._facade.toForgotPassword;
133
- }
134
- get toSignIn() {
135
- return this._facade.toSignIn;
136
- }
137
- get toSignUp() {
138
- return this._facade.toSignUp;
139
- }
140
- get skipVerification() {
141
- return this._facade.skipVerification;
142
- }
143
- /**
144
- * Internal utility functions
145
- */
146
- /** @deprecated For internal use only */
147
- get authState() {
148
- return this._authState;
149
- }
150
- /** @deprecated For internal use only */
151
- get authService() {
152
- return this._authService;
153
- }
154
- /** @deprecated For internal use only */
155
- get context() {
156
- return this._authState.context;
157
- }
158
- /** @deprecated For internal use only */
159
- get slotContext() {
160
- return {
161
- ...this._facade,
162
- $implicit: this._facade,
163
- };
164
- }
165
- /** @deprecated For internal use only */
166
- get hubSubject() {
167
- return this._hubSubject;
168
- }
169
- subscribe(callback) {
170
- if (!this._authService) {
171
- logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
172
- }
173
- const subscription = this._authService.subscribe(() => {
174
- callback(this._facade);
175
- });
176
- return subscription;
177
- }
178
- ngOnDestroy() {
179
- if (this._machineSubscription)
180
- this._machineSubscription.unsubscribe();
181
- if (this._unsubscribeHub)
182
- this._unsubscribeHub();
183
- this._authService.stop();
184
- }
185
- /** @deprecated For internal use only */
186
- send(event) {
187
- this.authService.send(event);
188
- }
189
- async getInitialAuthStatus() {
190
- try {
191
- await getCurrentUser();
192
- this._authStatus = 'authenticated';
193
- }
194
- catch (e) {
195
- this._authStatus = 'unauthenticated';
196
- }
197
- }
198
- setupHubListener() {
199
- this._hubSubject = new Subject();
200
- const onSignIn = () => {
201
- this._authStatus = 'authenticated';
202
- };
203
- const onSignOut = () => {
204
- this._authStatus = 'unauthenticated';
205
- };
206
- this._unsubscribeHub = listenToAuthHub(this._authService, (data, service) => {
207
- defaultAuthHubHandler(data, service, { onSignIn, onSignOut });
208
- this._hubSubject.next();
209
- });
210
- }
211
- setupMachineSubscription() {
212
- this._machineSubscription = this._authService.subscribe((state) => {
213
- const newState = state;
214
- this._authState = newState;
215
- this._facade = getServiceFacade({
216
- send: this._authService.send,
217
- state: newState,
218
- });
219
- });
220
- }
221
- }
222
- AuthenticatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
223
- AuthenticatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, providedIn: 'root' });
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, decorators: [{
225
- type: Injectable,
226
- args: [{
227
- providedIn: 'root', // ensure we have a singleton service
228
- }]
229
- }], ctorParameters: function () { return []; } });
230
-
231
- class AmplifySlotComponent {
232
- constructor(propService) {
233
- this.propService = propService;
234
- this.display = 'contents';
235
- this.isOverriden = false;
236
- }
237
- ngAfterContentInit() {
238
- const { customComponents } = this.propService;
239
- const overridingComponent = customComponents[this.name];
240
- if (overridingComponent) {
241
- this.overridingComponent = overridingComponent;
242
- this.isOverriden = true;
243
- }
244
- }
245
- }
246
- AmplifySlotComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, deps: [{ token: CustomComponentsService }], target: i0.ɵɵFactoryTarget.Component });
247
- AmplifySlotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotComponent, selector: "amplify-slot", inputs: { name: "name", context: "context" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<!-- \n if slot isn't overwritten, we display the the default coponent, which is the \n children passed onto this component.\n-->\n<ng-content *ngIf=\"!isOverriden\"></ng-content>\n\n<!-- If slot is overwritten, we render that instead. -->\n<ng-container\n *ngIf=\"isOverriden\"\n [ngTemplateOutlet]=\"overridingComponent\"\n [ngTemplateOutletContext]=\"context\"\n></ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, decorators: [{
249
- type: Component,
250
- args: [{ selector: 'amplify-slot', template: "<!-- \n if slot isn't overwritten, we display the the default coponent, which is the \n children passed onto this component.\n-->\n<ng-content *ngIf=\"!isOverriden\"></ng-content>\n\n<!-- If slot is overwritten, we render that instead. -->\n<ng-container\n *ngIf=\"isOverriden\"\n [ngTemplateOutlet]=\"overridingComponent\"\n [ngTemplateOutletContext]=\"context\"\n></ng-container>\n" }]
251
- }], ctorParameters: function () { return [{ type: CustomComponentsService }]; }, propDecorators: { name: [{
252
- type: Input
253
- }], context: [{
254
- type: Input
255
- }], display: [{
256
- type: HostBinding,
257
- args: ['style.display']
258
- }] } });
259
-
260
- class ButtonComponent {
261
- constructor() {
262
- this.type = 'button';
263
- this.fullWidth = false;
264
- this.isDisabled = false;
265
- this.size = 'medium';
266
- this.variation = 'default';
267
- this.fontWeight = 'normal';
268
- }
269
- get getDisabled() {
270
- return this.isDisabled ? '' : null;
271
- }
272
- get classNames() {
273
- let className = 'amplify-button';
274
- if (this.variation) {
275
- className += ` amplify-button--${this.variation}`;
276
- }
277
- if (this.size) {
278
- className += ` amplify-button--${this.size}`;
279
- }
280
- if (this.fullWidth) {
281
- className += ` amplify-button--fullwidth`;
282
- }
283
- if (this.isDisabled) {
284
- className += ` amplify-button--disabled amplify-button--loading`;
285
- }
286
- return className;
287
- }
288
- ngOnInit() {
289
- this.typeAttr = this.type;
290
- this.fullWidthAttr = this.fullWidth;
291
- this.sizeAttr = this.size;
292
- this.variationAttr = this.variation;
293
- this.fontWeightAttr = this.fontWeight;
294
- }
295
- }
296
- ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
297
- ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ButtonComponent, selector: "button[amplify-button]", inputs: { type: "type", fullWidth: "fullWidth", isDisabled: "isDisabled", size: "size", variation: "variation", fontWeight: "fontWeight" }, host: { properties: { "type": "this.typeAttr", "attr.data-fullwidth": "this.fullWidthAttr", "attr.data-size": "this.sizeAttr", "attr.data-variation": "this.variationAttr", "style.font-weight": "this.fontWeightAttr", "attr.disabled": "this.getDisabled", "class": "this.classNames" } }, ngImport: i0, template: "<ng-content></ng-content>\n" });
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
299
- type: Component,
300
- args: [{ selector: 'button[amplify-button]', template: "<ng-content></ng-content>\n" }]
301
- }], propDecorators: { type: [{
302
- type: Input
303
- }], fullWidth: [{
304
- type: Input
305
- }], isDisabled: [{
306
- type: Input
307
- }], size: [{
308
- type: Input
309
- }], variation: [{
310
- type: Input
311
- }], fontWeight: [{
312
- type: Input
313
- }], typeAttr: [{
314
- type: HostBinding,
315
- args: ['type']
316
- }], fullWidthAttr: [{
317
- type: HostBinding,
318
- args: ['attr.data-fullwidth']
319
- }], sizeAttr: [{
320
- type: HostBinding,
321
- args: ['attr.data-size']
322
- }], variationAttr: [{
323
- type: HostBinding,
324
- args: ['attr.data-variation']
325
- }], fontWeightAttr: [{
326
- type: HostBinding,
327
- args: ['style.font-weight']
328
- }], getDisabled: [{
329
- type: HostBinding,
330
- args: ['attr.disabled']
331
- }], classNames: [{
332
- type: HostBinding,
333
- args: ['class']
334
- }] } });
335
-
336
- class PasswordFieldComponent {
337
- constructor() {
338
- this.autocomplete = 'new-password';
339
- this.disabled = false;
340
- this.fieldId = `amplify-field-${nanoid(12)}`;
341
- this.initialValue = '';
342
- this.label = '';
343
- this.placeholder = '';
344
- this.required = true;
345
- this.labelHidden = false;
346
- this.setBlur = new EventEmitter();
347
- this.type = 'password';
348
- this.showPassword = false;
349
- this.showPasswordButtonlabel = translate('Show password');
350
- // re-export utilities so that template html can use them
351
- this.classnames = classNames;
352
- this.ComponentClassName = ComponentClassName;
353
- }
354
- togglePasswordText() {
355
- this.showPassword = !this.showPassword;
356
- this.showPasswordButtonlabel = this.showPassword
357
- ? translate('Hide password')
358
- : translate('Show password');
359
- this.type = this.showPassword ? 'text' : 'password';
360
- }
361
- }
362
- PasswordFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
363
- PasswordFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, outputs: { setBlur: "setBlur" }, ngImport: i0, template: "<div\n [class]=\"\n classnames(\n ComponentClassName.Flex,\n ComponentClassName.Field,\n ComponentClassName.TextField,\n ComponentClassName.PasswordField\n )\n \"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n >\n {{ label }}\n </label>\n <div\n [class]=\"classnames(ComponentClassName.Flex, ComponentClassName.FieldGroup)\"\n >\n <div [class]=\"ComponentClassName.FieldGroupFieldWrapper\">\n <input\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl,\n ComponentClassName.FieldShowPassword\n )\n \"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n autocapitalize=\"off\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n </div>\n <div [class]=\"ComponentClassName.FieldGroupOuterEnd\">\n <button\n amplify-button\n role=\"switch\"\n (click)=\"togglePasswordText()\"\n [attr.aria-checked]=\"type !== 'password'\"\n [attr.aria-label]=\"showPasswordButtonlabel\"\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl\n )\n \"\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</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
364
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, decorators: [{
365
- type: Component,
366
- args: [{ selector: 'amplify-password-field', template: "<div\n [class]=\"\n classnames(\n ComponentClassName.Flex,\n ComponentClassName.Field,\n ComponentClassName.TextField,\n ComponentClassName.PasswordField\n )\n \"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n >\n {{ label }}\n </label>\n <div\n [class]=\"classnames(ComponentClassName.Flex, ComponentClassName.FieldGroup)\"\n >\n <div [class]=\"ComponentClassName.FieldGroupFieldWrapper\">\n <input\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl,\n ComponentClassName.FieldShowPassword\n )\n \"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n autocapitalize=\"off\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n </div>\n <div [class]=\"ComponentClassName.FieldGroupOuterEnd\">\n <button\n amplify-button\n role=\"switch\"\n (click)=\"togglePasswordText()\"\n [attr.aria-checked]=\"type !== 'password'\"\n [attr.aria-label]=\"showPasswordButtonlabel\"\n [class]=\"\n classnames(\n ComponentClassName.Input,\n ComponentClassName.FieldGroupControl\n )\n \"\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</div>\n" }]
367
- }], propDecorators: { autocomplete: [{
368
- type: Input
369
- }], disabled: [{
370
- type: Input
371
- }], fieldId: [{
372
- type: Input
373
- }], initialValue: [{
374
- type: Input
375
- }], label: [{
376
- type: Input
377
- }], name: [{
378
- type: Input
379
- }], placeholder: [{
380
- type: Input
381
- }], required: [{
382
- type: Input
383
- }], labelHidden: [{
384
- type: Input
385
- }], hasError: [{
386
- type: Input
387
- }], describedBy: [{
388
- type: Input
389
- }], setBlur: [{
390
- type: Output
391
- }] } });
392
-
393
- class SelectComponent {
394
- }
395
- SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
396
- SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SelectComponent, selector: "amplify-form-select", inputs: { items: "items", name: "name", label: "label", id: "id", defaultValue: "defaultValue" }, ngImport: i0, template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
397
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, decorators: [{
398
- type: Component,
399
- args: [{ selector: 'amplify-form-select', template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n" }]
400
- }], propDecorators: { items: [{
401
- type: Input
402
- }], name: [{
403
- type: Input
404
- }], label: [{
405
- type: Input
406
- }], id: [{
407
- type: Input
408
- }], defaultValue: [{
409
- type: Input
410
- }] } });
411
-
412
- class PhoneNumberFieldComponent {
413
- constructor() {
414
- this.autocomplete = 'new-password';
415
- this.disabled = false;
416
- this.selectFieldId = `amplify-field-${nanoid(12)}`;
417
- this.textFieldId = `amplify-field-${nanoid(12)}`;
418
- this.initialValue = '';
419
- this.label = '';
420
- this.placeholder = '';
421
- this.required = true;
422
- this.labelHidden = false;
423
- this.display = 'contents';
424
- }
425
- ngOnInit() {
426
- this.countryDialCodesValues = this.dialCodeList ?? countryDialCodes;
427
- }
428
- }
429
- PhoneNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
430
- PhoneNumberFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", defaultCountryCode: "defaultCountryCode", selectFieldId: "selectFieldId", textFieldId: "textFieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", dialCodeList: "dialCodeList", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<div\n class=\"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield\"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n >\n {{ label }}\n </label>\n <div class=\"amplify-flex amplify-field-group amplify-field-group--horizontal\">\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"amplify-flex amplify-field amplify-selectfield amplify-dialcodeselect\"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <div\n class=\"amplify-field-group__field-wrapper amplify-field-group__field-wrapper--horizontal\"\n >\n <input\n class=\"amplify-input amplify-field-group__control\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: SelectComponent, selector: "amplify-form-select", inputs: ["items", "name", "label", "id", "defaultValue"] }] });
431
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, decorators: [{
432
- type: Component,
433
- args: [{ selector: 'amplify-phone-number-field', template: "<div\n class=\"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield\"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n >\n {{ label }}\n </label>\n <div class=\"amplify-flex amplify-field-group amplify-field-group--horizontal\">\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"amplify-flex amplify-field amplify-selectfield amplify-dialcodeselect\"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <div\n class=\"amplify-field-group__field-wrapper amplify-field-group__field-wrapper--horizontal\"\n >\n <input\n class=\"amplify-input amplify-field-group__control\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n </div>\n </div>\n</div>\n" }]
434
- }], propDecorators: { autocomplete: [{
435
- type: Input
436
- }], disabled: [{
437
- type: Input
438
- }], defaultCountryCode: [{
439
- type: Input
440
- }], selectFieldId: [{
441
- type: Input
442
- }], textFieldId: [{
443
- type: Input
444
- }], initialValue: [{
445
- type: Input
446
- }], label: [{
447
- type: Input
448
- }], name: [{
449
- type: Input
450
- }], placeholder: [{
451
- type: Input
452
- }], required: [{
453
- type: Input
454
- }], type: [{
455
- type: Input
456
- }], labelHidden: [{
457
- type: Input
458
- }], dialCodeList: [{
459
- type: Input
460
- }], hasError: [{
461
- type: Input
462
- }], describedBy: [{
463
- type: Input
464
- }], display: [{
465
- type: HostBinding,
466
- args: ['style.display']
467
- }] } });
468
-
469
- class TextFieldComponent {
470
- constructor() {
471
- this.autocomplete = 'new-password';
472
- this.disabled = false;
473
- this.fieldId = `amplify-field-${nanoid(12)}`;
474
- this.initialValue = '';
475
- this.label = '';
476
- this.placeholder = '';
477
- this.required = true;
478
- this.labelHidden = false;
479
- this.display = 'contents';
480
- }
481
- }
482
- TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
483
- TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TextFieldComponent, selector: "amplify-text-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n autocapitalize=\"off\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n" });
484
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, decorators: [{
485
- type: Component,
486
- args: [{ selector: 'amplify-text-field', template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n autocapitalize=\"off\"\n [id]=\"fieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n" }]
487
- }], propDecorators: { autocomplete: [{
488
- type: Input
489
- }], disabled: [{
490
- type: Input
491
- }], fieldId: [{
492
- type: Input
493
- }], initialValue: [{
494
- type: Input
495
- }], label: [{
496
- type: Input
497
- }], name: [{
498
- type: Input
499
- }], placeholder: [{
500
- type: Input
501
- }], required: [{
502
- type: Input
503
- }], type: [{
504
- type: Input
505
- }], labelHidden: [{
506
- type: Input
507
- }], hasError: [{
508
- type: Input
509
- }], describedBy: [{
510
- type: Input
511
- }], display: [{
512
- type: HostBinding,
513
- args: ['style.display']
514
- }] } });
515
-
516
- class FormFieldComponent {
517
- constructor(authenticator) {
518
- this.authenticator = authenticator;
519
- this.countryDialCodesValue = countryDialCodes;
520
- this.errorId = nanoid(12);
521
- }
522
- get ariaDescribedBy() {
523
- return this.hasError() ? this.errorId : undefined;
524
- }
525
- get errors() {
526
- const { validationErrors } = this.authenticator;
527
- return getErrors(validationErrors[this.name]);
528
- }
529
- onBlur($event) {
530
- const { name } = $event.target;
531
- this.authenticator.updateBlur({ name });
532
- }
533
- isPasswordField() {
534
- return this.formField.type === 'password';
535
- }
536
- isPhoneField() {
537
- return this.formField.type === 'tel';
538
- }
539
- hasError() {
540
- return this.errors?.length > 0;
541
- }
542
- translate(phrase) {
543
- return translate(phrase);
544
- }
545
- }
546
- FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
547
- FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormFieldComponent, selector: "amplify-form-field", inputs: { name: "name", formField: "formField" }, ngImport: i0, template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div\n data-amplify-sign-up-errors\n *ngIf=\"hasError()\"\n [id]=\"errorId\"\n >\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "labelHidden", "hasError", "describedBy"], outputs: ["setBlur"] }, { kind: "component", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: ["autocomplete", "disabled", "defaultCountryCode", "selectFieldId", "textFieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "dialCodeList", "hasError", "describedBy"] }, { kind: "component", type: TextFieldComponent, selector: "amplify-text-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "hasError", "describedBy"] }] });
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, decorators: [{
549
- type: Component,
550
- args: [{ selector: 'amplify-form-field', template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div\n data-amplify-sign-up-errors\n *ngIf=\"hasError()\"\n [id]=\"errorId\"\n >\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>" }]
551
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { name: [{
552
- type: Input
553
- }], formField: [{
554
- type: Input
555
- }] } });
556
-
557
- /**
558
- * Sorts the given formFields, then renders them in order.
559
- */
560
- class BaseFormFieldsComponent {
561
- constructor(authenticator) {
562
- this.authenticator = authenticator;
563
- this.display = 'contents';
564
- this.formFields = [];
565
- }
566
- ngOnInit() {
567
- const state = this.authenticator.authState;
568
- this.formFields = getSortedFormFields(this.route, state);
569
- }
570
- }
571
- BaseFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
572
- BaseFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: { route: "route" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FormFieldComponent, selector: "amplify-form-field", inputs: ["name", "formField"] }] });
573
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, decorators: [{
574
- type: Component,
575
- args: [{ selector: 'amplify-base-form-fields', template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n" }]
576
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { route: [{
577
- type: Input
578
- }], display: [{
579
- type: HostBinding,
580
- args: ['style.display']
581
- }] } });
582
-
583
- class ErrorComponent {
584
- constructor() {
585
- this.isVisible = true;
586
- this.dismissAriaLabel = translate('Dismiss alert');
587
- }
588
- close() {
589
- this.isVisible = false;
590
- }
591
- }
592
- ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
593
- ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "amplify-error", ngImport: i0, template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\n data-variation=\"error\"\n style=\"align-items: center; justify-content: space-between\"\n *ngIf=\"isVisible\"\n role=\"alert\"\n>\n <div class=\"amplify-flex\" style=\"align-items: center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"\n ></path>\n </svg>\n <div><ng-content></ng-content></div>\n </div>\n <button\n amplify-button\n [attr.aria-label]=\"dismissAriaLabel\"\n variation=\"link\"\n [fullWidth]=\"false\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n ></path>\n </svg>\n </button>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
594
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
595
- type: Component,
596
- args: [{ selector: 'amplify-error', template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\n data-variation=\"error\"\n style=\"align-items: center; justify-content: space-between\"\n *ngIf=\"isVisible\"\n role=\"alert\"\n>\n <div class=\"amplify-flex\" style=\"align-items: center\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z\"\n ></path>\n </svg>\n <div><ng-content></ng-content></div>\n </div>\n <button\n amplify-button\n [attr.aria-label]=\"dismissAriaLabel\"\n variation=\"link\"\n [fullWidth]=\"false\"\n (click)=\"close()\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n [attr.aria-hidden]=\"true\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n ></path>\n </svg>\n </button>\n</div>\n" }]
597
- }] });
598
-
599
- const { getBackToSignInText: getBackToSignInText$6, getResendCodeText: getResendCodeText$1, getSubmitText: getSubmitText$1, getResetYourPasswordText: getResetYourPasswordText$1, } = authenticatorTextUtil;
600
- class ConfirmResetPasswordComponent {
601
- constructor(authenticator) {
602
- this.authenticator = authenticator;
603
- this.dataAttr = '';
604
- this.headerText = getResetYourPasswordText$1();
605
- // translated strings
606
- this.backToSignInText = getBackToSignInText$6();
607
- this.resendCodeText = getResendCodeText$1();
608
- this.submitText = getSubmitText$1();
609
- }
610
- get context() {
611
- return this.authenticator.slotContext;
612
- }
613
- onInput(event) {
614
- event.preventDefault();
615
- const { name, value } = event.target;
616
- this.authenticator.updateForm({ name, value });
617
- }
618
- onSubmit(event) {
619
- event.preventDefault();
620
- this.authenticator.submitForm(getFormDataFromEvent(event));
621
- }
622
- }
623
- ConfirmResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
624
- ConfirmResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "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 name=\"confirm-reset-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n type=\"button\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-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: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
625
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, decorators: [{
626
- type: Component,
627
- args: [{ selector: 'amplify-confirm-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 name=\"confirm-reset-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n type=\"button\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-reset-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
628
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
629
- type: HostBinding,
630
- args: ['attr.data-amplify-authenticator-confirmsignin']
631
- }], headerText: [{
632
- type: Input
633
- }] } });
634
-
635
- const { getConfirmText: getConfirmText$4, getBackToSignInText: getBackToSignInText$5, getChallengeText } = authenticatorTextUtil;
636
- class ConfirmSignInComponent {
637
- constructor(authenticator) {
638
- this.authenticator = authenticator;
639
- this.dataAttr = '';
640
- this.confirmText = getConfirmText$4();
641
- this.backToSignInText = getBackToSignInText$5();
642
- }
643
- get context() {
644
- return this.authenticator.slotContext;
645
- }
646
- ngOnInit() {
647
- this.setHeaderText();
648
- }
649
- setHeaderText() {
650
- const state = this.authenticator.authState;
651
- const actorContext = getActorContext(state);
652
- const { challengeName } = actorContext;
653
- this.headerText = getChallengeText(challengeName);
654
- }
655
- onInput(event) {
656
- event.preventDefault();
657
- const { name, value } = event.target;
658
- this.authenticator.updateForm({ name, value });
659
- }
660
- onSubmit(event) {
661
- event.preventDefault();
662
- this.authenticator.submitForm(getFormDataFromEvent(event));
663
- }
664
- }
665
- ConfirmSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
666
- ConfirmSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in", host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "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 name=\"confirm-sign-in-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"confirm-sign-in-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
667
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, decorators: [{
668
- type: Component,
669
- args: [{ selector: 'amplify-confirm-sign-in', 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 name=\"confirm-sign-in-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"confirm-sign-in-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>\n" }]
670
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
671
- type: HostBinding,
672
- args: ['attr.data-amplify-authenticator-confirmsignin']
673
- }] } });
674
-
675
- const { getResendCodeText, getConfirmText: getConfirmText$3, getDeliveryMethodText, getDeliveryMessageText, } = authenticatorTextUtil;
676
- class ConfirmSignUpComponent {
677
- constructor(authenticator) {
678
- this.authenticator = authenticator;
679
- this.dataAttr = '';
680
- // translated texts
681
- this.resendCodeText = getResendCodeText();
682
- this.confirmText = getConfirmText$3();
683
- }
684
- get context() {
685
- return this.authenticator.slotContext;
686
- }
687
- get confirmSignUpHeading() {
688
- const { codeDeliveryDetails } = this.authenticator;
689
- return getDeliveryMethodText(codeDeliveryDetails);
690
- }
691
- get subtitleText() {
692
- const { codeDeliveryDetails } = this.authenticator;
693
- return getDeliveryMessageText(codeDeliveryDetails);
694
- }
695
- onInput(event) {
696
- event.preventDefault();
697
- const { name, value } = event.target;
698
- this.authenticator.updateForm({ name, value });
699
- }
700
- onSubmit(event) {
701
- event.preventDefault();
702
- this.authenticator.submitForm(getFormDataFromEvent(event));
703
- }
704
- }
705
- ConfirmSignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
706
- ConfirmSignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up", host: { properties: { "attr.data-amplify-authenticator-confirmsignup": "this.dataAttr" } }, ngImport: i0, template: "<ng-container>\n <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]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n fontWeight=\"normal\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n </fieldset>\n\n <amplify-error *ngIf=\"context.error\">\n {{ authenticator.error }}\n </amplify-error>\n <amplify-slot\n name=\"confirm-sign-up-footer\"\n [context]=\"context\"\n ></amplify-slot>\n </form>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
707
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, decorators: [{
708
- type: Component,
709
- args: [{ selector: 'amplify-confirm-sign-up', template: "<ng-container>\n <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]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\n </button>\n <button\n amplify-button\n fontWeight=\"normal\"\n (click)=\"authenticator.resendCode()\"\n >\n {{ resendCodeText }}\n </button>\n </fieldset>\n\n <amplify-error *ngIf=\"context.error\">\n {{ authenticator.error }}\n </amplify-error>\n <amplify-slot\n name=\"confirm-sign-up-footer\"\n [context]=\"context\"\n ></amplify-slot>\n </form>\n</ng-container>\n" }]
710
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
711
- type: HostBinding,
712
- args: ['attr.data-amplify-authenticator-confirmsignup']
713
- }] } });
714
-
715
- const { getAccountRecoveryInfoText: getAccountRecoveryInfoText$1, getSkipText: getSkipText$1, getSubmitText } = authenticatorTextUtil;
716
- class ConfirmVerifyUserComponent {
717
- constructor(authenticator) {
718
- this.authenticator = authenticator;
719
- this.dataAttr = '';
720
- this.headerText = getAccountRecoveryInfoText$1();
721
- // translated texts
722
- this.skipText = getSkipText$1();
723
- this.submitText = getSubmitText();
724
- }
725
- get context() {
726
- return this.authenticator.slotContext;
727
- }
728
- onInput(event) {
729
- event.preventDefault();
730
- const { name, value } = event.target;
731
- this.authenticator.updateForm({ name, value });
732
- }
733
- onSubmit(event) {
734
- event.preventDefault();
735
- this.authenticator.submitForm(getFormDataFromEvent(event));
736
- }
737
- }
738
- ConfirmVerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
739
- ConfirmVerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmverifyuser": "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=\"confirm-verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\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 <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-verify-user-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
740
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, decorators: [{
741
- type: Component,
742
- args: [{ selector: 'amplify-confirm-verify-user', 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=\"confirm-verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\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 <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"confirm-verify-user-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
743
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
744
- type: HostBinding,
745
- args: ['attr.data-amplify-authenticator-confirmverifyuser']
746
- }], headerText: [{
747
- type: Input
748
- }] } });
749
-
750
- class ForceNewPasswordFormFieldsComponent {
751
- }
752
- ForceNewPasswordFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
753
- ForceNewPasswordFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields", ngImport: i0, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"forceNewPassword\"></amplify-base-form-fields>\n</div>\n", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, decorators: [{
755
- type: Component,
756
- args: [{ selector: 'amplify-force-new-password-form-fields', template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"forceNewPassword\"></amplify-base-form-fields>\n</div>\n" }]
757
- }] });
758
-
759
- const { getChangePasswordText, getBackToSignInText: getBackToSignInText$4 } = authenticatorTextUtil;
760
- class ForceNewPasswordComponent {
761
- constructor(authenticator) {
762
- this.authenticator = authenticator;
763
- this.dataAttr = '';
764
- this.headerText = getChangePasswordText();
765
- // translated texts
766
- this.changePasswordText = getChangePasswordText();
767
- this.backToSignInText = getBackToSignInText$4();
768
- }
769
- get context() {
770
- return this.authenticator.slotContext;
771
- }
772
- onInput(event) {
773
- event.preventDefault();
774
- const { name, value } = event.target;
775
- this.authenticator.updateForm({ name, value });
776
- }
777
- onSubmit(event) {
778
- event.preventDefault();
779
- this.authenticator.submitForm(getFormDataFromEvent(event));
780
- }
781
- }
782
- ForceNewPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
783
- ForceNewPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forcenewpassword": "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 name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields" }] });
784
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, decorators: [{
785
- type: Component,
786
- args: [{ selector: 'amplify-force-new-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 name=\"force-new-password-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\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" }]
787
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
788
- type: HostBinding,
789
- args: ['attr.data-amplify-authenticator-forcenewpassword']
790
- }], headerText: [{
791
- type: Input
792
- }] } });
793
-
794
- const { getResetYourPasswordText, getSendCodeText, getBackToSignInText: getBackToSignInText$3 } = authenticatorTextUtil;
795
- class ForgotPasswordComponent {
796
- constructor(authenticator) {
797
- this.authenticator = authenticator;
798
- this.dataAttr = '';
799
- this.headerText = getResetYourPasswordText();
800
- // translated texts
801
- this.sendCodeText = getSendCodeText();
802
- this.backToSignInText = getBackToSignInText$3();
803
- }
804
- get context() {
805
- return this.authenticator.slotContext;
806
- }
807
- onInput(event) {
808
- event.preventDefault();
809
- const { name, value } = event.target;
810
- this.authenticator.updateForm({ name, value });
811
- }
812
- onSubmit(event) {
813
- event.preventDefault();
814
- this.authenticator.submitForm(getFormDataFromEvent(event));
815
- }
816
- }
817
- ForgotPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
818
- ForgotPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForgotPasswordComponent, selector: "amplify-forgot-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forgotpassword": "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=\"forgot-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=\"forgotPassword\"></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=\"forgot-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: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
819
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
820
- type: Component,
821
- args: [{ selector: 'amplify-forgot-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=\"forgot-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=\"forgotPassword\"></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=\"forgot-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
822
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
823
- type: HostBinding,
824
- args: ['attr.data-amplify-authenticator-forgotpassword']
825
- }], headerText: [{
826
- type: Input
827
- }] } });
828
-
829
- const { getConfirmText: getConfirmText$2, getBackToSignInText: getBackToSignInText$2, getSelectMfaTypeText, getSelectMfaTypeByChallengeName, getMfaTypeLabelByValue, } = authenticatorTextUtil;
830
- class SelectMfaTypeComponent {
831
- constructor(authenticator) {
832
- this.authenticator = authenticator;
833
- this.confirmText = getConfirmText$2();
834
- this.backToSignInText = getBackToSignInText$2();
835
- this.selectMfaTypeText = getSelectMfaTypeText();
836
- this.getMfaTypeLabelByValue = getMfaTypeLabelByValue;
837
- this.allowedMfaTypes = [];
838
- this.classNames = classNames;
839
- this.ComponentClassName = ComponentClassName;
840
- }
841
- get context() {
842
- return this.authenticator.slotContext;
843
- }
844
- ngOnInit() {
845
- this.setHeaderText();
846
- this.setAllowedMfaTypes();
847
- }
848
- setHeaderText() {
849
- const actorContext = getActorContext(this.authenticator.authState);
850
- this.headerText = getSelectMfaTypeByChallengeName(actorContext.challengeName);
851
- }
852
- setAllowedMfaTypes() {
853
- const actorContext = getActorContext(this.authenticator.authState);
854
- this.allowedMfaTypes = actorContext.allowedMfaTypes;
855
- }
856
- onInput(event) {
857
- event.preventDefault();
858
- const { name, value } = event.target;
859
- this.authenticator.updateForm({ name, value });
860
- }
861
- onSubmit(event) {
862
- event.preventDefault();
863
- this.authenticator.submitForm(getFormDataFromEvent(event));
864
- }
865
- }
866
- SelectMfaTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectMfaTypeComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
867
- SelectMfaTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SelectMfaTypeComponent, selector: "amplify-select-mfa-type", ngImport: i0, template: "<form\n data-amplify-form\n data-amplify-authenticator-select-mfa-type\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"select-mfa-type-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <div\n *ngFor=\"let mfaType of allowedMfaTypes; index as i\"\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Field, ComponentClassName.RadioGroupField)\"\n role=\"radiogroup\"\n >\n <label\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Radio)\"\n [attr.data-amplify-radio-control-label]\n >\n <span [class]=\"classNames(ComponentClassName.Text, ComponentClassName.RadioLabel)\">\n {{getMfaTypeLabelByValue(mfaType)}}\n </span>\n <input\n [class]=\"classNames(ComponentClassName.Input, ComponentClassName.FieldGroupControl, ComponentClassName.VisuallyHidden, ComponentClassName.RadioInput)\"\n [attr.data-amplify-radio-control-input]\n [value]=\"mfaType\"\n [checked]=\"i === 0\"\n name=\"mfa_type\"\n type=\"radio\"\n required\n />\n <span\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.RadioButton)\"\n [attr.aria-hidden]=\"true\"\n ></span>\n </label>\n </div>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"select-mfa-type-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
868
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectMfaTypeComponent, decorators: [{
869
- type: Component,
870
- args: [{ selector: 'amplify-select-mfa-type', template: "<form\n data-amplify-form\n data-amplify-authenticator-select-mfa-type\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"select-mfa-type-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <div\n *ngFor=\"let mfaType of allowedMfaTypes; index as i\"\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Field, ComponentClassName.RadioGroupField)\"\n role=\"radiogroup\"\n >\n <label\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Radio)\"\n [attr.data-amplify-radio-control-label]\n >\n <span [class]=\"classNames(ComponentClassName.Text, ComponentClassName.RadioLabel)\">\n {{getMfaTypeLabelByValue(mfaType)}}\n </span>\n <input\n [class]=\"classNames(ComponentClassName.Input, ComponentClassName.FieldGroupControl, ComponentClassName.VisuallyHidden, ComponentClassName.RadioInput)\"\n [attr.data-amplify-radio-control-input]\n [value]=\"mfaType\"\n [checked]=\"i === 0\"\n name=\"mfa_type\"\n type=\"radio\"\n required\n />\n <span\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.RadioButton)\"\n [attr.aria-hidden]=\"true\"\n ></span>\n </label>\n </div>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"select-mfa-type-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>" }]
871
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
872
-
873
- const { getConfirmText: getConfirmText$1, getBackToSignInText: getBackToSignInText$1, getSetupEmailText } = authenticatorTextUtil;
874
- class SetupEmailComponent {
875
- constructor(authenticator) {
876
- this.authenticator = authenticator;
877
- this.headerText = getSetupEmailText();
878
- this.confirmText = getConfirmText$1();
879
- this.backToSignInText = getBackToSignInText$1();
880
- this.classNames = classNames;
881
- this.ComponentClassName = ComponentClassName;
882
- }
883
- get context() {
884
- return this.authenticator.slotContext;
885
- }
886
- onInput(event) {
887
- event.preventDefault();
888
- const { name, value } = event.target;
889
- this.authenticator.updateForm({ name, value });
890
- }
891
- onSubmit(event) {
892
- event.preventDefault();
893
- this.authenticator.submitForm(getFormDataFromEvent(event));
894
- }
895
- }
896
- SetupEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupEmailComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
897
- SetupEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SetupEmailComponent, selector: "amplify-setup-email", ngImport: i0, template: "<form\n data-amplify-form\n data-amplify-authenticator-setup-email\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"setup-email-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"setupEmail\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"setup-email-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
898
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupEmailComponent, decorators: [{
899
- type: Component,
900
- args: [{ selector: 'amplify-setup-email', template: "<form\n data-amplify-form\n data-amplify-authenticator-setup-email\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"setup-email-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"setupEmail\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot\n name=\"setup-email-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>" }]
901
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
902
-
903
- const logger = new ConsoleLogger('SetupTotp');
904
- const { getSetupTotpText, getCopyText, getBackToSignInText, getConfirmText, getCopiedText, } = authenticatorTextUtil;
905
- class SetupTotpComponent {
906
- constructor(authenticator) {
907
- this.authenticator = authenticator;
908
- this.dataAttr = '';
909
- this.headerText = getSetupTotpText();
910
- this.qrCodeSource = '';
911
- this.totpSecretCode = '';
912
- this.copyTextLabel = getCopyText();
913
- // translated texts
914
- this.backToSignInText = getBackToSignInText();
915
- this.confirmText = getConfirmText();
916
- }
917
- get context() {
918
- return this.authenticator.slotContext;
919
- }
920
- async ngOnInit() {
921
- await this.generateQRCode();
922
- }
923
- async generateQRCode() {
924
- const { authState: state, totpSecretCode, username } = this.authenticator;
925
- const { formFields } = getActorContext(state);
926
- const { totpIssuer = 'AWSCognito', totpUsername = username } = formFields?.setupTotp?.QR ?? {};
927
- this.totpSecretCode = totpSecretCode;
928
- try {
929
- const totpCode = getTotpCodeURL(totpIssuer, totpUsername, this.totpSecretCode);
930
- logger.info('totp code was generated:', totpCode);
931
- this.qrCodeSource = await QRCode.toDataURL(totpCode);
932
- }
933
- catch (err) {
934
- logger.error(err);
935
- }
936
- }
937
- onInput(event) {
938
- event.preventDefault();
939
- const { name, value } = event.target;
940
- this.authenticator.updateForm({ name, value });
941
- }
942
- onSubmit(event) {
943
- event.preventDefault();
944
- this.authenticator.submitForm(getFormDataFromEvent(event));
945
- }
946
- copyText() {
947
- navigator.clipboard.writeText(this.totpSecretCode);
948
- this.copyTextLabel = getCopiedText();
949
- }
950
- }
951
- SetupTotpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
952
- SetupTotpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SetupTotpComponent, selector: "amplify-setup-totp", host: { properties: { "attr.data-amplify-authenticator-setup-totp": "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 name=\"setup-totp-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img\n *ngIf=\"qrCodeSource\"\n [src]=\"qrCodeSource\"\n alt=\"qr code\"\n data-amplify-qrcode\n width=\"228\"\n height=\"228\"\n />\n <div class=\"amplify-flex\" data-amplify-copy>\n <div>{{ totpSecretCode }}</div>\n <div data-amplify-copy-svg (click)=\"copyText()\">\n <div data-amplify-copy-tooltip>{{ copyTextLabel }}</div>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z\"\n />\n </svg>\n </div>\n </div>\n\n <amplify-base-form-fields route=\"setupTotp\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot name=\"setup-totp-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
953
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, decorators: [{
954
- type: Component,
955
- args: [{ selector: 'amplify-setup-totp', 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 name=\"setup-totp-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img\n *ngIf=\"qrCodeSource\"\n [src]=\"qrCodeSource\"\n alt=\"qr code\"\n data-amplify-qrcode\n width=\"228\"\n height=\"228\"\n />\n <div class=\"amplify-flex\" data-amplify-copy>\n <div>{{ totpSecretCode }}</div>\n <div data-amplify-copy-svg (click)=\"copyText()\">\n <div data-amplify-copy-tooltip>{{ copyTextLabel }}</div>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z\"\n />\n </svg>\n </div>\n </div>\n\n <amplify-base-form-fields route=\"setupTotp\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ confirmText }}\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 <amplify-slot name=\"setup-totp-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n" }]
956
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
957
- type: HostBinding,
958
- args: ['attr.data-amplify-authenticator-setup-totp']
959
- }] } });
960
-
961
- class FederatedSignInButtonComponent {
962
- constructor(authenticator) {
963
- this.authenticator = authenticator;
964
- this.onClick = () => {
965
- this.authenticator.send({
966
- type: 'FEDERATED_SIGN_IN',
967
- data: { provider: this.provider },
968
- });
969
- };
970
- }
971
- }
972
- FederatedSignInButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
973
- FederatedSignInButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: { provider: "provider", text: "text" }, ngImport: i0, template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
974
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, decorators: [{
975
- type: Component,
976
- args: [{ selector: 'amplify-federated-sign-in-button', template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n" }]
977
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { provider: [{
978
- type: Input
979
- }], text: [{
980
- type: Input
981
- }] } });
982
-
983
- const { getSignInWithFederationText, getOrText } = authenticatorTextUtil;
984
- class FederatedSignInComponent {
985
- constructor(authenticator) {
986
- this.authenticator = authenticator;
987
- this.FederatedProviders = FederatedIdentityProviders;
988
- this.includeAmazon = false;
989
- this.includeApple = false;
990
- this.includeFacebook = false;
991
- this.includeGoogle = false;
992
- this.shouldShowFederatedSignIn = false;
993
- }
994
- ngOnInit() {
995
- const socialProviders = this.authenticator.context?.config?.socialProviders;
996
- this.setFederatedTexts();
997
- this.includeAmazon = socialProviders?.includes('amazon');
998
- this.includeApple = socialProviders?.includes('apple');
999
- this.includeGoogle = socialProviders?.includes('google');
1000
- this.includeFacebook = socialProviders?.includes('facebook');
1001
- this.shouldShowFederatedSignIn =
1002
- this.includeAmazon ||
1003
- this.includeApple ||
1004
- this.includeFacebook ||
1005
- this.includeGoogle;
1006
- }
1007
- setFederatedTexts() {
1008
- const { route } = this.authenticator;
1009
- this.orText = getOrText();
1010
- this.signInAmazonText = getSignInWithFederationText(route, 'amazon');
1011
- this.signInAppleText = getSignInWithFederationText(route, 'apple');
1012
- this.signInFacebookText = getSignInWithFederationText(route, 'facebook');
1013
- this.signInGoogleText = getSignInWithFederationText(route, 'google');
1014
- }
1015
- }
1016
- FederatedSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1017
- FederatedSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInComponent, selector: "amplify-federated-sign-in", ngImport: i0, template: "<div\n class=\"amplify-flex federated-sign-in-container\"\n *ngIf=\"shouldShowFederatedSignIn\"\n data-orientation=\"horizontal\"\n data-size=\"small\"\n>\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n >\n <svg\n aria-label=\"Amazon icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 248 268\"\n >\n <path\n d=\"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z\"\n fill=\"#FF9900\"\n ></path>\n </svg>\n\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAmazonText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeApple\"\n [provider]=\"FederatedProviders.Apple\"\n >\n <svg\n aria-label=\"Apple icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n fill=\"#000\"\n preserveAspectRatio=\"xMidYMid\"\n stroke=\"#000\"\n strokeWidth=\"0\"\n viewBox=\"0 0 1024 1024\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAppleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n >\n <svg\n aria-label=\"Facebook icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 279 538\"\n >\n <path\n d=\"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z\"\n fill=\"#1877F2\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInFacebookText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [provider]=\"FederatedProviders.Google\"\n >\n <svg\n aria-label=\"Google icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 256 262\"\n xmlns=\"http://www.w3.org/2000/svg\"\n preserveAspectRatio=\"xMidYMid\"\n >\n <path\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n fill=\"#4285F4\"\n ></path>\n <path\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n fill=\"#34A853\"\n ></path>\n <path\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782\"\n fill=\"#FBBC05\"\n ></path>\n <path\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n fill=\"#EB4335\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n [attr.data-label]=\"orText\"\n />\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: ["provider", "text"] }] });
1018
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, decorators: [{
1019
- type: Component,
1020
- args: [{ selector: 'amplify-federated-sign-in', template: "<div\n class=\"amplify-flex federated-sign-in-container\"\n *ngIf=\"shouldShowFederatedSignIn\"\n data-orientation=\"horizontal\"\n data-size=\"small\"\n>\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n >\n <svg\n aria-label=\"Amazon icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 248 268\"\n >\n <path\n d=\"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z\"\n fill=\"#FF9900\"\n ></path>\n </svg>\n\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAmazonText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeApple\"\n [provider]=\"FederatedProviders.Apple\"\n >\n <svg\n aria-label=\"Apple icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n fill=\"#000\"\n preserveAspectRatio=\"xMidYMid\"\n stroke=\"#000\"\n strokeWidth=\"0\"\n viewBox=\"0 0 1024 1024\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInAppleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n >\n <svg\n aria-label=\"Facebook icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 279 538\"\n >\n <path\n d=\"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z\"\n fill=\"#1877F2\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInFacebookText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [provider]=\"FederatedProviders.Google\"\n >\n <svg\n aria-label=\"Google icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 256 262\"\n xmlns=\"http://www.w3.org/2000/svg\"\n preserveAspectRatio=\"xMidYMid\"\n >\n <path\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n fill=\"#4285F4\"\n ></path>\n <path\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n fill=\"#34A853\"\n ></path>\n <path\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782\"\n fill=\"#FBBC05\"\n ></path>\n <path\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n fill=\"#EB4335\"\n ></path>\n </svg>\n <p class=\"amplify-text amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n [attr.data-label]=\"orText\"\n />\n</div>\n" }]
1021
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
1022
-
1023
- const { getForgotPasswordText, getSignInText } = authenticatorTextUtil;
1024
- class SignInComponent {
1025
- constructor(authenticator) {
1026
- this.authenticator = authenticator;
1027
- this.dataAttr = '';
1028
- this.forgotPasswordText = getForgotPasswordText();
1029
- this.signInButtonText = getSignInText();
1030
- }
1031
- get context() {
1032
- return this.authenticator.slotContext;
1033
- }
1034
- onInput(event) {
1035
- event.preventDefault();
1036
- const { name, value } = event.target;
1037
- this.authenticator.updateForm({ name, value });
1038
- }
1039
- onSubmit(event) {
1040
- event.preventDefault();
1041
- this.authenticator.submitForm(getFormDataFromEvent(event));
1042
- }
1043
- }
1044
- SignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1045
- SignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignInComponent, selector: "amplify-sign-in", host: { properties: { "attr.data-amplify-authenticator-signin": "this.dataAttr" } }, ngImport: i0, template: "<amplify-slot name=\"sign-in-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <legend class=\"amplify-visually-hidden\">Sign in</legend>\n <amplify-base-form-fields route=\"signIn\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ signInButtonText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n</form>\n\n<amplify-slot name=\"sign-in-footer\" [context]=\"context\">\n <div data-amplify-footer>\n <button\n amplify-button\n fontWeight=\"normal\"\n size=\"small\"\n variation=\"link\"\n fullWidth=\"true\"\n (click)=\"authenticator.toForgotPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }], encapsulation: i0.ViewEncapsulation.None });
1046
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, decorators: [{
1047
- type: Component,
1048
- args: [{ selector: 'amplify-sign-in', encapsulation: ViewEncapsulation.None, template: "<amplify-slot name=\"sign-in-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <legend class=\"amplify-visually-hidden\">Sign in</legend>\n <amplify-base-form-fields route=\"signIn\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ signInButtonText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n</form>\n\n<amplify-slot name=\"sign-in-footer\" [context]=\"context\">\n <div data-amplify-footer>\n <button\n amplify-button\n fontWeight=\"normal\"\n size=\"small\"\n variation=\"link\"\n fullWidth=\"true\"\n (click)=\"authenticator.toForgotPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n" }]
1049
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
1050
- type: HostBinding,
1051
- args: ['attr.data-amplify-authenticator-signin']
1052
- }] } });
1053
-
1054
- class SignUpFormFieldsComponent {
1055
- }
1056
- SignUpFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1057
- SignUpFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields", ngImport: i0, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"signUp\"></amplify-base-form-fields>\n</div>\n", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
1058
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, decorators: [{
1059
- type: Component,
1060
- args: [{ selector: 'amplify-sign-up-form-fields', template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"signUp\"></amplify-base-form-fields>\n</div>\n" }]
1061
- }] });
1062
-
1063
- const { getCreateAccountText } = authenticatorTextUtil;
1064
- class SignUpComponent {
1065
- constructor(authenticator) {
1066
- this.authenticator = authenticator;
1067
- this.dataAttr = '';
1068
- // translated texts
1069
- this.createAccountText = getCreateAccountText();
1070
- }
1071
- get context() {
1072
- return this.authenticator.slotContext;
1073
- }
1074
- onInput(event) {
1075
- const { checked, name, type, value } = event.target;
1076
- const isUncheckedCheckbox = type === 'checkbox' && !checked;
1077
- this.authenticator.updateForm({
1078
- name,
1079
- value: isUncheckedCheckbox ? undefined : value,
1080
- });
1081
- }
1082
- onSubmit(event) {
1083
- event.preventDefault();
1084
- this.authenticator.submitForm(getFormDataFromEvent(event));
1085
- }
1086
- }
1087
- SignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1088
- SignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpComponent, selector: "amplify-sign-up", host: { properties: { "attr.data-amplify-authenticator-signup": "this.dataAttr" } }, ngImport: i0, template: "<amplify-slot name=\"sign-up-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <div class=\"amplify-flex amplify-authenticator__column\">\n <div class=\"amplify-flex amplify-authenticator__column\">\n <amplify-slot name=\"sign-up-form-fields\" [context]=\"context\">\n <amplify-sign-up-form-fields></amplify-sign-up-form-fields>\n </amplify-slot>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </div>\n\n <amplify-slot name=\"sign-up-button\" [context]=\"context\">\n <button\n [isDisabled]=\"\n authenticator.isPending || authenticator.hasValidationErrors\n \"\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n >\n {{ createAccountText }}\n </button>\n </amplify-slot>\n </div>\n</form>\n\n<amplify-slot name=\"sign-up-footer\" [context]=\"context\"> </amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }, { kind: "component", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields" }] });
1089
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, decorators: [{
1090
- type: Component,
1091
- args: [{ selector: 'amplify-sign-up', template: "<amplify-slot name=\"sign-up-header\" [context]=\"context\"></amplify-slot>\n\n<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <div class=\"amplify-flex amplify-authenticator__column\">\n <div class=\"amplify-flex amplify-authenticator__column\">\n <amplify-slot name=\"sign-up-form-fields\" [context]=\"context\">\n <amplify-sign-up-form-fields></amplify-sign-up-form-fields>\n </amplify-slot>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </div>\n\n <amplify-slot name=\"sign-up-button\" [context]=\"context\">\n <button\n [isDisabled]=\"\n authenticator.isPending || authenticator.hasValidationErrors\n \"\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n >\n {{ createAccountText }}\n </button>\n </amplify-slot>\n </div>\n</form>\n\n<amplify-slot name=\"sign-up-footer\" [context]=\"context\"> </amplify-slot>\n" }]
1092
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
1093
- type: HostBinding,
1094
- args: ['attr.data-amplify-authenticator-signup']
1095
- }] } });
1096
-
1097
- class TabItemComponent {
1098
- constructor() {
1099
- this.active = false;
1100
- this.display = 'block'; // emulate div behavior
1101
- }
1102
- }
1103
- TabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1104
- TabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TabItemComponent, selector: "amplify-tab-item", inputs: { title: "title", active: "active", id: "id", labelledById: "labelledById", tabIndex: "tabIndex" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, template: "<div\n role=\"tabpanel\"\n class=\"amplify-tabs__panel\"\n [class]=\"active ? 'amplify-tabs__panel--active' : ''\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, decorators: [{
1106
- type: Component,
1107
- args: [{ selector: 'amplify-tab-item', template: "<div\n role=\"tabpanel\"\n class=\"amplify-tabs__panel\"\n [class]=\"active ? 'amplify-tabs__panel--active' : ''\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n" }]
1108
- }], propDecorators: { title: [{
1109
- type: Input
1110
- }], active: [{
1111
- type: Input
1112
- }], id: [{
1113
- type: Input
1114
- }], labelledById: [{
1115
- type: Input
1116
- }], tabIndex: [{
1117
- type: Input
1118
- }], display: [{
1119
- type: HostBinding,
1120
- args: ['style.display']
1121
- }] } });
1122
-
1123
- class TabsComponent {
1124
- constructor() {
1125
- this.tabChange = new EventEmitter();
1126
- }
1127
- ngAfterContentInit() {
1128
- // assign ids
1129
- this.tabs.forEach((tab, index) => {
1130
- tab.id = `tab-${nanoid(12)}-panel-${index}`;
1131
- tab.labelledById = `tab-${nanoid(12)}-tab-${index}`;
1132
- });
1133
- // find active tab
1134
- // TODO(enhancement): more declarative way for choosing the initial tab to render
1135
- const activeTabs = this.tabs.filter((tab) => tab.active);
1136
- // set active tab
1137
- if (activeTabs.length !== 1) {
1138
- this.selectTab(this.tabs.first);
1139
- }
1140
- }
1141
- selectTab(tab) {
1142
- this.tabs.forEach((tab) => {
1143
- tab.active = false;
1144
- });
1145
- tab.active = true;
1146
- }
1147
- handleTabClick(tab) {
1148
- if (tab.active)
1149
- return; // don't do anything if clicks the current active tab
1150
- this.tabChange.emit();
1151
- this.selectTab(tab);
1152
- }
1153
- }
1154
- TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1155
- TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TabsComponent, selector: "amplify-tabs", outputs: { tabChange: "tabChange" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], ngImport: i0, template: "<div class=\"amplify-tabs\">\n <div\n class=\"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal\"\n role=\"tablist\"\n >\n <button\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs__item\"\n role=\"tab\"\n [id]=\"tab.labelledById\"\n [tabindex]=\"tab.active ? '0' : '-1'\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n [class]=\"tab.active ? 'amplify-tabs__item--active' : ''\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </button>\n </div>\n</div>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
1156
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, decorators: [{
1157
- type: Component,
1158
- args: [{ selector: 'amplify-tabs', template: "<div class=\"amplify-tabs\">\n <div\n class=\"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal\"\n role=\"tablist\"\n >\n <button\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs__item\"\n role=\"tab\"\n [id]=\"tab.labelledById\"\n [tabindex]=\"tab.active ? '0' : '-1'\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n [class]=\"tab.active ? 'amplify-tabs__item--active' : ''\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </button>\n </div>\n</div>\n\n<ng-content></ng-content>\n" }]
1159
- }], propDecorators: { tabs: [{
1160
- type: ContentChildren,
1161
- args: [TabItemComponent]
1162
- }], tabChange: [{
1163
- type: Output
1164
- }] } });
1165
-
1166
- const getAttributeMap = () => defaultFormFieldOptions;
1167
-
1168
- const { getSkipText, getVerifyText, getAccountRecoveryInfoText } = authenticatorTextUtil;
1169
- class VerifyUserComponent {
1170
- constructor(authenticator) {
1171
- this.authenticator = authenticator;
1172
- this.dataAttr = '';
1173
- this.headerText = getAccountRecoveryInfoText();
1174
- this.unverifiedUserAttributes = {};
1175
- this.labelId = nanoid(12);
1176
- // translated texts
1177
- this.skipText = getSkipText();
1178
- this.verifyText = getVerifyText();
1179
- }
1180
- get context() {
1181
- return this.authenticator.slotContext;
1182
- }
1183
- ngOnInit() {
1184
- const actorState = getActorState(this.authenticator.authState);
1185
- this.unverifiedUserAttributes = actorState.context.unverifiedUserAttributes;
1186
- }
1187
- getLabel(attr, value) {
1188
- const attributeMap = getAttributeMap();
1189
- const { label } = attributeMap[attr];
1190
- const translatedTypeLabel = translate(label);
1191
- const censoredAttributeValue = censorContactMethod(label, value);
1192
- return `${translatedTypeLabel}: ${censoredAttributeValue}`;
1193
- }
1194
- onInput(event) {
1195
- event.preventDefault();
1196
- const { name, value } = event.target;
1197
- this.authenticator.updateForm({ name, value });
1198
- }
1199
- onSubmit(event) {
1200
- event.preventDefault();
1201
- this.authenticator.submitForm(getFormDataFromEvent(event));
1202
- }
1203
- }
1204
- VerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
1205
- VerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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 unverifiedUserAttribute of unverifiedUserAttributes | keyvalue\n let i = index;\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedUserAttribute.key\"\n [id]=\"labelId\"\n [checked]=\"i === 0\"\n />\n <label [for]=\"labelId\">{{\n getLabel(unverifiedUserAttribute.key, unverifiedUserAttribute.value)\n }}</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", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None });
1206
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, decorators: [{
1207
- type: Component,
1208
- args: [{ selector: 'amplify-verify-user', encapsulation: ViewEncapsulation.None, 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 unverifiedUserAttribute of unverifiedUserAttributes | keyvalue\n let i = index;\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedUserAttribute.key\"\n [id]=\"labelId\"\n [checked]=\"i === 0\"\n />\n <label [for]=\"labelId\">{{\n getLabel(unverifiedUserAttribute.key, unverifiedUserAttribute.value)\n }}</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" }]
1209
- }], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
1210
- type: HostBinding,
1211
- args: ['attr.data-amplify-authenticator-verifyuser']
1212
- }], headerText: [{
1213
- type: Input
1214
- }] } });
1215
-
1216
- const { getSignInTabText, getSignUpTabText } = authenticatorTextUtil;
1217
- class AuthenticatorComponent {
1218
- constructor(authenticator, contextService, changeDetector) {
1219
- this.authenticator = authenticator;
1220
- this.contextService = contextService;
1221
- this.changeDetector = changeDetector;
1222
- this.customComponentQuery = null;
1223
- // translated texts
1224
- this.signInTitle = getSignInTabText();
1225
- this.signUpTitle = getSignUpTabText();
1226
- this.hasInitialized = false;
1227
- this.isHandlingHubEvent = false;
1228
- }
1229
- // context passed to "authenticated" slot
1230
- get context() {
1231
- return this.authenticator.slotContext;
1232
- }
1233
- get route() {
1234
- return this.authenticator.route;
1235
- }
1236
- ngOnInit() {
1237
- const { initialState, loginMechanisms, services, signUpAttributes, socialProviders, formFields, } = this;
1238
- this.clearUserAgent = setUserAgent({
1239
- componentName: 'Authenticator',
1240
- packageName: 'angular',
1241
- version: VERSION,
1242
- });
1243
- const { initializeMachine } = this.authenticator;
1244
- this.authenticator.hubSubject.subscribe(() => {
1245
- /*
1246
- * Hub events aren't properly caught by Angular, because they are
1247
- * synchronous events. Angular tracks async network events and
1248
- * html events, but not synchronous events like hub.
1249
- *
1250
- * On any notable hub events, we run change detection manually.
1251
- */
1252
- this.changeDetector.detectChanges();
1253
- /*
1254
- * Hub events that we handle can lead to multiple state changes:
1255
- * e.g. `authenticated` -> `signOut` -> initialState.
1256
- *
1257
- * We want to ensure change detection runs all the way, until
1258
- * we reach back to the initial state. Setting the below flag
1259
- * to true to until we reach initial state.
1260
- */
1261
- this.isHandlingHubEvent = true;
1262
- });
1263
- /**
1264
- * Subscribes to state machine changes and sends INIT event
1265
- * once machine reaches 'setup' state.
1266
- */
1267
- this.unsubscribeMachine = this.authenticator.subscribe(() => {
1268
- const { route } = this.authenticator;
1269
- if (this.isHandlingHubEvent) {
1270
- this.changeDetector.detectChanges();
1271
- const initialStateWithDefault = initialState ?? 'signIn';
1272
- // We can stop manual change detection if we're back to the initial state
1273
- if (route === initialStateWithDefault) {
1274
- this.isHandlingHubEvent = false;
1275
- }
1276
- }
1277
- if (!this.hasInitialized && route === 'setup') {
1278
- initializeMachine({
1279
- initialState,
1280
- loginMechanisms,
1281
- services,
1282
- signUpAttributes,
1283
- socialProviders,
1284
- formFields,
1285
- });
1286
- this.hasInitialized = true;
1287
- }
1288
- }).unsubscribe;
1289
- /**
1290
- * handling translations after content init, because authenticator and its
1291
- * translations might be initialized before the main app's `ngOnInit` is run.
1292
- */
1293
- this.signInTitle = getSignInTabText();
1294
- this.signUpTitle = getSignUpTabText();
1295
- }
1296
- /**
1297
- * Lifecycle Methods
1298
- */
1299
- ngAfterContentInit() {
1300
- this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
1301
- }
1302
- ngOnDestroy() {
1303
- this.clearUserAgent();
1304
- if (this.unsubscribeMachine)
1305
- this.unsubscribeMachine();
1306
- }
1307
- /**
1308
- * Class Functions
1309
- */
1310
- onTabChange() {
1311
- const { route } = this.authenticator;
1312
- if (route === 'signIn') {
1313
- this.authenticator.toSignUp();
1314
- }
1315
- else {
1316
- this.authenticator.toSignIn();
1317
- }
1318
- }
1319
- hasTabs() {
1320
- const { route } = this.authenticator;
1321
- return route === 'signIn' || route === 'signUp';
1322
- }
1323
- hasRouteComponent() {
1324
- const { route } = this.authenticator;
1325
- switch (route) {
1326
- case 'authenticated':
1327
- case 'idle':
1328
- case 'setup':
1329
- case 'signOut':
1330
- case 'transition':
1331
- return false;
1332
- default:
1333
- return true;
1334
- }
1335
- }
1336
- mapCustomComponents(componentQuery) {
1337
- if (!componentQuery)
1338
- return {};
1339
- const customComponents = {};
1340
- componentQuery.forEach((component) => {
1341
- customComponents[component.name] = component.template;
1342
- });
1343
- return customComponents;
1344
- }
1345
- }
1346
- AuthenticatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, deps: [{ token: AuthenticatorService }, { token: CustomComponentsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1347
- AuthenticatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AuthenticatorComponent, selector: "amplify-authenticator", inputs: { formFields: "formFields", initialState: "initialState", loginMechanisms: "loginMechanisms", services: "services", signUpAttributes: "signUpAttributes", socialProviders: "socialProviders", variation: "variation", hideSignUp: "hideSignUp" }, providers: [CustomComponentsService], queries: [{ propertyName: "customComponentQuery", predicate: AmplifySlotDirective }], ngImport: i0, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot\n name=\"header\"\n [context]=\"context\"\n ></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\n <!-- signIn component -->\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn'\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n </amplify-tab-item>\n <amplify-tab-item\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\n <!-- signUp component -->\n <amplify-slot\n name=\"sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'signUp'\"\n >\n <amplify-sign-up></amplify-sign-up>\n </amplify-slot>\n </amplify-tab-item>\n </amplify-tabs>\n\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n\n <!-- confirmSignUp content -->\n <amplify-slot\n name=\"confirm-sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignUp'\"\n >\n <amplify-confirm-sign-up></amplify-confirm-sign-up>\n </amplify-slot>\n\n <!-- confirmSignIn content -->\n <amplify-slot\n name=\"confirm-sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignIn'\"\n >\n <amplify-confirm-sign-in></amplify-confirm-sign-in>\n </amplify-slot>\n\n <!-- setupTotp content -->\n <amplify-slot\n name=\"setup-totp\"\n [context]=\"context\"\n *ngIf=\"route === 'setupTotp'\"\n >\n <amplify-setup-totp></amplify-setup-totp>\n </amplify-slot>\n\n <!-- forceNewPassword content -->\n <amplify-slot\n name=\"force-new-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forceNewPassword'\"\n >\n <amplify-force-new-password></amplify-force-new-password>\n </amplify-slot>\n\n <!-- forgotPassword content -->\n <amplify-slot\n name=\"forgot-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forgotPassword'\"\n >\n <amplify-forgot-password></amplify-forgot-password>\n </amplify-slot>\n\n <!-- confirmResetPassword content -->\n <amplify-slot\n name=\"confirm-reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmResetPassword'\"\n >\n <amplify-confirm-reset-password></amplify-confirm-reset-password>\n </amplify-slot>\n\n <!-- verifyUser content -->\n <amplify-slot\n name=\"verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'verifyUser'\"\n >\n <amplify-verify-user></amplify-verify-user>\n </amplify-slot>\n\n <!-- confirmVerifyUser content -->\n <amplify-slot\n name=\"confirm-verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmVerifyUser'\"\n >\n <amplify-confirm-verify-user></amplify-confirm-verify-user>\n </amplify-slot>\n\n <!-- selectMfaType content -->\n <amplify-slot\n name=\"select-mfa-type\"\n [context]=\"context\"\n *ngIf=\"route === 'selectMfaType'\"\n >\n <amplify-select-mfa-type></amplify-select-mfa-type>\n </amplify-slot>\n\n <!-- setupEmail content -->\n <amplify-slot\n name=\"setup-email\"\n [context]=\"context\"\n *ngIf=\"route === 'setupEmail'\"\n >\n <amplify-setup-email></amplify-setup-email>\n </amplify-slot>\n </div>\n\n <amplify-slot\n name=\"footer\"\n [context]=\"context\"\n ></amplify-slot>\n </div>\n</div>\n\n<!-- signedIn content is rendered outside authenticator so it's not styled by authenticator -->\n<amplify-slot\n name=\"authenticated\"\n [context]=\"context\"\n *ngIf=\"route === 'authenticated'\"\n>\n <ng-content></ng-content>\n</amplify-slot>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: ["headerText"] }, { kind: "component", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in" }, { kind: "component", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up" }, { kind: "component", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: ["headerText"] }, { kind: "component", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: ["headerText"] }, { kind: "component", type: ForgotPasswordComponent, selector: "amplify-forgot-password", inputs: ["headerText"] }, { kind: "component", type: SelectMfaTypeComponent, selector: "amplify-select-mfa-type" }, { kind: "component", type: SetupEmailComponent, selector: "amplify-setup-email" }, { kind: "component", type: SetupTotpComponent, selector: "amplify-setup-totp" }, { kind: "component", type: SignInComponent, selector: "amplify-sign-in" }, { kind: "component", type: SignUpComponent, selector: "amplify-sign-up" }, { kind: "component", type: TabItemComponent, selector: "amplify-tab-item", inputs: ["title", "active", "id", "labelledById", "tabIndex"] }, { kind: "component", type: TabsComponent, selector: "amplify-tabs", outputs: ["tabChange"] }, { kind: "component", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: ["headerText"] }], encapsulation: i0.ViewEncapsulation.None });
1348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, decorators: [{
1349
- type: Component,
1350
- args: [{ selector: 'amplify-authenticator', providers: [CustomComponentsService], encapsulation: ViewEncapsulation.None, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot\n name=\"header\"\n [context]=\"context\"\n ></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\n <!-- signIn component -->\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn'\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n </amplify-tab-item>\n <amplify-tab-item\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\n <!-- signUp component -->\n <amplify-slot\n name=\"sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'signUp'\"\n >\n <amplify-sign-up></amplify-sign-up>\n </amplify-slot>\n </amplify-tab-item>\n </amplify-tabs>\n\n <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\n\n <!-- confirmSignUp content -->\n <amplify-slot\n name=\"confirm-sign-up\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignUp'\"\n >\n <amplify-confirm-sign-up></amplify-confirm-sign-up>\n </amplify-slot>\n\n <!-- confirmSignIn content -->\n <amplify-slot\n name=\"confirm-sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmSignIn'\"\n >\n <amplify-confirm-sign-in></amplify-confirm-sign-in>\n </amplify-slot>\n\n <!-- setupTotp content -->\n <amplify-slot\n name=\"setup-totp\"\n [context]=\"context\"\n *ngIf=\"route === 'setupTotp'\"\n >\n <amplify-setup-totp></amplify-setup-totp>\n </amplify-slot>\n\n <!-- forceNewPassword content -->\n <amplify-slot\n name=\"force-new-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forceNewPassword'\"\n >\n <amplify-force-new-password></amplify-force-new-password>\n </amplify-slot>\n\n <!-- forgotPassword content -->\n <amplify-slot\n name=\"forgot-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forgotPassword'\"\n >\n <amplify-forgot-password></amplify-forgot-password>\n </amplify-slot>\n\n <!-- confirmResetPassword content -->\n <amplify-slot\n name=\"confirm-reset-password\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmResetPassword'\"\n >\n <amplify-confirm-reset-password></amplify-confirm-reset-password>\n </amplify-slot>\n\n <!-- verifyUser content -->\n <amplify-slot\n name=\"verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'verifyUser'\"\n >\n <amplify-verify-user></amplify-verify-user>\n </amplify-slot>\n\n <!-- confirmVerifyUser content -->\n <amplify-slot\n name=\"confirm-verify-user\"\n [context]=\"context\"\n *ngIf=\"route === 'confirmVerifyUser'\"\n >\n <amplify-confirm-verify-user></amplify-confirm-verify-user>\n </amplify-slot>\n\n <!-- selectMfaType content -->\n <amplify-slot\n name=\"select-mfa-type\"\n [context]=\"context\"\n *ngIf=\"route === 'selectMfaType'\"\n >\n <amplify-select-mfa-type></amplify-select-mfa-type>\n </amplify-slot>\n\n <!-- setupEmail content -->\n <amplify-slot\n name=\"setup-email\"\n [context]=\"context\"\n *ngIf=\"route === 'setupEmail'\"\n >\n <amplify-setup-email></amplify-setup-email>\n </amplify-slot>\n </div>\n\n <amplify-slot\n name=\"footer\"\n [context]=\"context\"\n ></amplify-slot>\n </div>\n</div>\n\n<!-- signedIn content is rendered outside authenticator so it's not styled by authenticator -->\n<amplify-slot\n name=\"authenticated\"\n [context]=\"context\"\n *ngIf=\"route === 'authenticated'\"\n>\n <ng-content></ng-content>\n</amplify-slot>" }]
1351
- }], ctorParameters: function () { return [{ type: AuthenticatorService }, { type: CustomComponentsService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFields: [{
1352
- type: Input
1353
- }], initialState: [{
1354
- type: Input
1355
- }], loginMechanisms: [{
1356
- type: Input
1357
- }], services: [{
1358
- type: Input
1359
- }], signUpAttributes: [{
1360
- type: Input
1361
- }], socialProviders: [{
1362
- type: Input
1363
- }], variation: [{
1364
- type: Input
1365
- }], hideSignUp: [{
1366
- type: Input
1367
- }], customComponentQuery: [{
1368
- type: ContentChildren,
1369
- args: [AmplifySlotDirective]
1370
- }] } });
1371
-
1372
- class CheckboxComponent {
1373
- constructor() {
1374
- this.defaultChecked = false;
1375
- this.hasError = false;
1376
- this.isChecked = false;
1377
- }
1378
- ngOnInit() {
1379
- if (this.defaultChecked) {
1380
- this.isChecked = true;
1381
- }
1382
- }
1383
- handleClick() {
1384
- this.isChecked = !this.isChecked;
1385
- }
1386
- }
1387
- CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1388
- CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "amplify-checkbox", inputs: { defaultChecked: "defaultChecked", errorMessage: "errorMessage", hasError: "hasError", label: "label", name: "name", value: "value" }, ngImport: i0, template: "<div class=\"amplify-flex amplify-field amplify-checkboxfield\">\n <label class=\"amplify-flex amplify-checkbox\">\n <span class=\"amplify-visually-hidden\">\n <input\n (click)=\"handleClick()\"\n class=\"\n amplify-input\n amplify-field-group__control\n amplify-checkbox__input\n \"\n aria-invalid=\"false\"\n type=\"checkbox\"\n [name]=\"name\"\n [value]=\"value\"\n />\n </span>\n <span\n class=\"amplify-flex amplify-checkbox__button\"\n aria-hidden=\"true\"\n data-focus=\"false\"\n [ngClass]=\"{\n 'amplify-checkbox__button--error': hasError\n }\"\n [attr.data-error]=\"hasError\"\n [attr.data-checked]=\"isChecked\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [attr.data-checked]=\"isChecked\"\n [ngClass]=\"{\n 'amplify-checkbox__icon--checked': isChecked\n }\"\n >\n <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"></path>\n </svg>\n </span>\n <span class=\"amplify-text amplify-checkbox__label\">\n <ng-content></ng-content>\n </span>\n </label>\n <p *ngIf=\"hasError\" class=\"amplify-text amplify-field__error-message\">\n {{ errorMessage }}\n </p>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
1389
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
1390
- type: Component,
1391
- args: [{ selector: 'amplify-checkbox', template: "<div class=\"amplify-flex amplify-field amplify-checkboxfield\">\n <label class=\"amplify-flex amplify-checkbox\">\n <span class=\"amplify-visually-hidden\">\n <input\n (click)=\"handleClick()\"\n class=\"\n amplify-input\n amplify-field-group__control\n amplify-checkbox__input\n \"\n aria-invalid=\"false\"\n type=\"checkbox\"\n [name]=\"name\"\n [value]=\"value\"\n />\n </span>\n <span\n class=\"amplify-flex amplify-checkbox__button\"\n aria-hidden=\"true\"\n data-focus=\"false\"\n [ngClass]=\"{\n 'amplify-checkbox__button--error': hasError\n }\"\n [attr.data-error]=\"hasError\"\n [attr.data-checked]=\"isChecked\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon amplify-checkbox__icon\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n [attr.data-checked]=\"isChecked\"\n [ngClass]=\"{\n 'amplify-checkbox__icon--checked': isChecked\n }\"\n >\n <path d=\"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z\"></path>\n </svg>\n </span>\n <span class=\"amplify-text amplify-checkbox__label\">\n <ng-content></ng-content>\n </span>\n </label>\n <p *ngIf=\"hasError\" class=\"amplify-text amplify-field__error-message\">\n {{ errorMessage }}\n </p>\n</div>\n" }]
1392
- }], propDecorators: { defaultChecked: [{
1393
- type: Input
1394
- }], errorMessage: [{
1395
- type: Input
1396
- }], hasError: [{
1397
- type: Input
1398
- }], label: [{
1399
- type: Input
1400
- }], name: [{
1401
- type: Input
1402
- }], value: [{
1403
- type: Input
1404
- }] } });
1405
-
1406
- class AmplifyAuthenticatorModule {
1407
- }
1408
- AmplifyAuthenticatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1409
- AmplifyAuthenticatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, declarations: [AmplifySlotComponent,
1410
- AmplifySlotDirective,
1411
- AuthenticatorComponent,
1412
- BaseFormFieldsComponent,
1413
- ButtonComponent,
1414
- CheckboxComponent,
1415
- ConfirmResetPasswordComponent,
1416
- ConfirmSignInComponent,
1417
- ConfirmSignUpComponent,
1418
- ConfirmVerifyUserComponent,
1419
- ErrorComponent,
1420
- FederatedSignInButtonComponent,
1421
- FederatedSignInComponent,
1422
- ForceNewPasswordComponent,
1423
- ForceNewPasswordFormFieldsComponent,
1424
- FormFieldComponent,
1425
- PasswordFieldComponent,
1426
- PhoneNumberFieldComponent,
1427
- ForgotPasswordComponent,
1428
- SelectComponent,
1429
- SelectMfaTypeComponent,
1430
- SetupEmailComponent,
1431
- SetupTotpComponent,
1432
- SignInComponent,
1433
- SignUpComponent,
1434
- SignUpFormFieldsComponent,
1435
- TabItemComponent,
1436
- TabsComponent,
1437
- TextFieldComponent,
1438
- VerifyUserComponent], imports: [CommonModule], exports: [AmplifySlotDirective,
1439
- AuthenticatorComponent,
1440
- CheckboxComponent,
1441
- SignUpFormFieldsComponent,
1442
- ForceNewPasswordFormFieldsComponent,
1443
- TextFieldComponent] });
1444
- AmplifyAuthenticatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, imports: [CommonModule] });
1445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, decorators: [{
1446
- type: NgModule,
1447
- args: [{
1448
- declarations: [
1449
- AmplifySlotComponent,
1450
- AmplifySlotDirective,
1451
- AuthenticatorComponent,
1452
- BaseFormFieldsComponent,
1453
- ButtonComponent,
1454
- CheckboxComponent,
1455
- ConfirmResetPasswordComponent,
1456
- ConfirmSignInComponent,
1457
- ConfirmSignUpComponent,
1458
- ConfirmVerifyUserComponent,
1459
- ErrorComponent,
1460
- FederatedSignInButtonComponent,
1461
- FederatedSignInComponent,
1462
- ForceNewPasswordComponent,
1463
- ForceNewPasswordFormFieldsComponent,
1464
- FormFieldComponent,
1465
- PasswordFieldComponent,
1466
- PhoneNumberFieldComponent,
1467
- ForgotPasswordComponent,
1468
- SelectComponent,
1469
- SelectMfaTypeComponent,
1470
- SetupEmailComponent,
1471
- SetupTotpComponent,
1472
- SignInComponent,
1473
- SignUpComponent,
1474
- SignUpFormFieldsComponent,
1475
- TabItemComponent,
1476
- TabsComponent,
1477
- TextFieldComponent,
1478
- VerifyUserComponent,
1479
- ],
1480
- imports: [CommonModule],
1481
- exports: [
1482
- AmplifySlotDirective,
1483
- AuthenticatorComponent,
1484
- CheckboxComponent,
1485
- SignUpFormFieldsComponent,
1486
- ForceNewPasswordFormFieldsComponent,
1487
- TextFieldComponent,
1488
- ],
1489
- }]
1490
- }] });
1491
-
1492
- /*
1493
- * Public API Surface of ui-angular
1494
- */
1495
- /**
1496
- * Modules
1497
- */
1498
-
1499
- /**
1500
- * Generated bundle index. Do not edit.
1501
- */
1502
-
1503
- export { AmplifyAuthenticatorModule, AmplifySlotDirective, AuthenticatorComponent, AuthenticatorService, BaseFormFieldsComponent, ButtonComponent, CheckboxComponent, ConfirmResetPasswordComponent, ConfirmSignInComponent, ConfirmSignUpComponent, ConfirmVerifyUserComponent, CustomComponentsService, ErrorComponent, FederatedSignInButtonComponent, FederatedSignInComponent, ForceNewPasswordComponent, ForceNewPasswordFormFieldsComponent, ForgotPasswordComponent, FormFieldComponent, PasswordFieldComponent, PhoneNumberFieldComponent, SelectComponent, SetupTotpComponent, SignInComponent, SignUpComponent, SignUpFormFieldsComponent, TabItemComponent, TabsComponent, TextFieldComponent, VerifyUserComponent, getAttributeMap };
1504
- //# sourceMappingURL=aws-amplify-ui-angular.mjs.map