@aws-amplify/ui-angular 1.0.26-unstable.2 → 2.0.1-next.3

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 (80) hide show
  1. package/aws-amplify-ui-angular.d.ts +22 -0
  2. package/aws-amplify-ui-angular.metadata.json +1 -0
  3. package/bundles/aws-amplify-ui-angular.umd.js +3587 -0
  4. package/bundles/aws-amplify-ui-angular.umd.js.map +1 -0
  5. package/bundles/aws-amplify-ui-angular.umd.min.js +2 -0
  6. package/bundles/aws-amplify-ui-angular.umd.min.js.map +1 -0
  7. package/esm2015/aws-amplify-ui-angular.js +23 -0
  8. package/esm2015/index.js +12 -0
  9. package/esm2015/lib/common/helpers.js +3 -0
  10. package/esm2015/lib/common/index.js +3 -0
  11. package/esm2015/lib/common/types/auth-types.js +2 -0
  12. package/esm2015/lib/common/types/component-types.js +2 -0
  13. package/esm2015/lib/common/types/index.js +3 -0
  14. package/esm2015/lib/components/amplify-authenticator/amplify-authenticator.component.js +66 -0
  15. package/esm2015/lib/components/amplify-confirm-sign-in/amplify-confirm-sign-in.component.js +91 -0
  16. package/esm2015/lib/components/amplify-confirm-sign-up/amplify-confirm-sign-up.component.js +102 -0
  17. package/esm2015/lib/components/amplify-federated-sign-in/amplify-federated-sign-in.component.js +37 -0
  18. package/esm2015/lib/components/amplify-federated-sign-in-button/amplify-federated-sign-in-button.component.js +27 -0
  19. package/esm2015/lib/components/amplify-force-new-password/amplify-force-new-password.component.js +83 -0
  20. package/esm2015/lib/components/amplify-reset-password/amplify-reset-password.component.js +68 -0
  21. package/esm2015/lib/components/amplify-setup-totp/amplify-setup-totp.component.js +100 -0
  22. package/esm2015/lib/components/amplify-sign-in/amplify-sign-in.component.js +82 -0
  23. package/esm2015/lib/components/amplify-sign-up/amplify-sign-up.component.js +92 -0
  24. package/esm2015/lib/components/amplify-verify-user/amplify-verify-user.component.js +73 -0
  25. package/esm2015/lib/components/confirm-reset-password/amplify-confirm-reset-password.component.js +76 -0
  26. package/esm2015/lib/components/confirm-verify-user/amplify-confirm-verify-user.component.js +63 -0
  27. package/esm2015/lib/components/index.js +14 -0
  28. package/esm2015/lib/directives/amplify-override.directive.js +21 -0
  29. package/esm2015/lib/primitives/amplify-error/amplify-error.component.js +10 -0
  30. package/esm2015/lib/primitives/amplify-input/amplify-input.component.js +82 -0
  31. package/esm2015/lib/primitives/amplify-select/amplify-select.component.js +17 -0
  32. package/esm2015/lib/primitives/amplify-user-name-alias/amplify-user-name-alias.component.js +35 -0
  33. package/esm2015/lib/primitives/index.js +3 -0
  34. package/esm2015/lib/proxies.js +1839 -0
  35. package/esm2015/lib/services/authenticator-context.service.js +28 -0
  36. package/esm2015/lib/services/state-machine.service.js +46 -0
  37. package/esm2015/lib/ui-angular.module.js +91 -0
  38. package/fesm2015/aws-amplify-ui-angular.js +2989 -0
  39. package/fesm2015/aws-amplify-ui-angular.js.map +1 -0
  40. package/index.d.ts +8 -0
  41. package/lib/common/helpers.d.ts +2 -0
  42. package/lib/common/index.d.ts +2 -0
  43. package/lib/common/types/auth-types.d.ts +6 -0
  44. package/lib/common/types/component-types.d.ts +23 -0
  45. package/lib/common/types/index.d.ts +2 -0
  46. package/lib/components/amplify-authenticator/amplify-authenticator.component.d.ts +31 -0
  47. package/lib/components/amplify-confirm-sign-in/amplify-confirm-sign-in.component.d.ts +31 -0
  48. package/lib/components/amplify-confirm-sign-up/amplify-confirm-sign-up.component.d.ts +37 -0
  49. package/lib/components/amplify-federated-sign-in/amplify-federated-sign-in.component.d.ts +16 -0
  50. package/lib/components/amplify-federated-sign-in-button/amplify-federated-sign-in-button.component.d.ts +9 -0
  51. package/lib/components/amplify-force-new-password/amplify-force-new-password.component.d.ts +31 -0
  52. package/lib/components/amplify-reset-password/amplify-reset-password.component.d.ts +30 -0
  53. package/lib/components/amplify-setup-totp/amplify-setup-totp.component.d.ts +31 -0
  54. package/lib/components/amplify-sign-in/amplify-sign-in.component.d.ts +34 -0
  55. package/lib/components/amplify-sign-up/amplify-sign-up.component.d.ts +35 -0
  56. package/lib/components/amplify-verify-user/amplify-verify-user.component.d.ts +31 -0
  57. package/lib/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +34 -0
  58. package/lib/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +26 -0
  59. package/lib/components/index.d.ts +13 -0
  60. package/lib/directives/amplify-override.directive.d.ts +7 -0
  61. package/lib/primitives/amplify-error/amplify-error.component.d.ts +2 -0
  62. package/lib/primitives/amplify-input/amplify-input.component.d.ts +31 -0
  63. package/lib/primitives/amplify-select/amplify-select.component.d.ts +7 -0
  64. package/lib/primitives/amplify-user-name-alias/amplify-user-name-alias.component.d.ts +15 -0
  65. package/lib/primitives/index.d.ts +2 -0
  66. package/{dist/directives → lib}/proxies.d.ts +0 -0
  67. package/lib/services/authenticator-context.service.d.ts +10 -0
  68. package/lib/services/state-machine.service.d.ts +29 -0
  69. package/lib/ui-angular.module.d.ts +2 -0
  70. package/package.json +27 -49
  71. package/theme.css +99 -0
  72. package/CHANGELOG.md +0 -536
  73. package/LICENSE +0 -201
  74. package/README.md +0 -1
  75. package/dist/amplify-module.d.ts +0 -2
  76. package/dist/core.d.ts +0 -4
  77. package/dist/core.metadata.json +0 -1
  78. package/dist/fesm2015.js +0 -1532
  79. package/dist/fesm5.js +0 -1319
  80. package/dist/index.d.ts +0 -2
@@ -0,0 +1,2989 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, TemplateRef, Input, Injectable, Component, ViewEncapsulation, HostBinding, ContentChildren, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, NgZone, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { authMachine, getSendEventAliases, getActorState, translate, getConfiguredAliases, getActorContext, authInputAttributes, countryDialCodes, getAliasInfoFromContext, AuthChallengeNames, FederatedIdentityProviders } from '@aws-amplify/ui';
5
+ import { interpret } from 'xstate';
6
+ import { __awaiter, __decorate } from 'tslib';
7
+ import { Logger, Auth } from 'aws-amplify';
8
+ import QRCode from 'qrcode';
9
+ import { fromEvent } from 'rxjs';
10
+ import { AmplifyButton as AmplifyButton$1, AmplifyInput as AmplifyInput$1, AmplifyToast as AmplifyToast$1, AmplifyChatbot as AmplifyChatbot$1, AmplifyS3Album as AmplifyS3Album$1, AmplifyS3ImagePicker as AmplifyS3ImagePicker$1, AmplifyS3Text as AmplifyS3Text$1, AmplifyS3TextPicker as AmplifyS3TextPicker$1, AmplifyS3Image as AmplifyS3Image$1, AmplifyPicker as AmplifyPicker$1, AmplifyPhotoPicker as AmplifyPhotoPicker$1 } from '@aws-amplify/ui-components/dist/components';
11
+
12
+ class AmplifyOverrideDirective {
13
+ constructor(template) {
14
+ this.template = template;
15
+ }
16
+ set amplifyOverride(component) {
17
+ this.name = component;
18
+ }
19
+ }
20
+ AmplifyOverrideDirective.decorators = [
21
+ { type: Directive, args: [{
22
+ selector: '[amplifyOverride]',
23
+ },] }
24
+ ];
25
+ AmplifyOverrideDirective.ctorParameters = () => [
26
+ { type: TemplateRef }
27
+ ];
28
+ AmplifyOverrideDirective.propDecorators = {
29
+ amplifyOverride: [{ type: Input }]
30
+ };
31
+
32
+ /**
33
+ * AmplifyContextService contains access to the xstate machine
34
+ * and custom components passed by the user.
35
+ */
36
+ class StateMachineService {
37
+ constructor() {
38
+ const interpreter = interpret(authMachine, { devTools: true })
39
+ .onTransition((state) => {
40
+ this._user = state.context.user;
41
+ this._authState = state;
42
+ })
43
+ .start();
44
+ this._services = getSendEventAliases(interpreter.send);
45
+ this._authService = interpreter;
46
+ }
47
+ get services() {
48
+ return this._services;
49
+ }
50
+ get authState() {
51
+ return this._authState;
52
+ }
53
+ get authService() {
54
+ return this._authService;
55
+ }
56
+ get user() {
57
+ return this._user;
58
+ }
59
+ get context() {
60
+ return this._authState.context;
61
+ }
62
+ send(event) {
63
+ this.authService.send(event);
64
+ }
65
+ }
66
+ StateMachineService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StateMachineService_Factory() { return new StateMachineService(); }, token: StateMachineService, providedIn: "root" });
67
+ StateMachineService.decorators = [
68
+ { type: Injectable, args: [{
69
+ providedIn: 'root',
70
+ },] }
71
+ ];
72
+ StateMachineService.ctorParameters = () => [];
73
+
74
+ class AuthPropService {
75
+ constructor() {
76
+ this._customComponents = {};
77
+ this._props = {};
78
+ }
79
+ get customComponents() {
80
+ return this._customComponents;
81
+ }
82
+ set customComponents(customComponents) {
83
+ this._customComponents = Object.assign(Object.assign({}, this._customComponents), customComponents);
84
+ }
85
+ get props() {
86
+ return this._props;
87
+ }
88
+ set props(props) {
89
+ this._props = Object.assign(Object.assign({}, this._props), props);
90
+ }
91
+ }
92
+ AuthPropService.ɵprov = i0.ɵɵdefineInjectable({ factory: function AuthPropService_Factory() { return new AuthPropService(); }, token: AuthPropService, providedIn: "root" });
93
+ AuthPropService.decorators = [
94
+ { type: Injectable, args: [{
95
+ providedIn: 'root',
96
+ },] }
97
+ ];
98
+ AuthPropService.ctorParameters = () => [];
99
+
100
+ class AmplifyAuthenticatorComponent {
101
+ constructor(stateMachine, contextService) {
102
+ this.stateMachine = stateMachine;
103
+ this.contextService = contextService;
104
+ /**
105
+ * TODO: Add back custom events
106
+ */
107
+ this.initialAuthState = 'signIn';
108
+ this.dataAttr = '';
109
+ this.customComponentQuery = null;
110
+ this.customComponents = {};
111
+ }
112
+ /**
113
+ * Lifecycle Methods
114
+ */
115
+ ngAfterContentInit() {
116
+ this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
117
+ this.customComponents = this.contextService.customComponents;
118
+ }
119
+ /**
120
+ * Class Functions
121
+ */
122
+ get context() {
123
+ const { signOut } = this.stateMachine.services;
124
+ const user = this.stateMachine.user;
125
+ return { signOut, user };
126
+ }
127
+ get actorState() {
128
+ return getActorState(this.stateMachine.authState);
129
+ }
130
+ get authenticatorState() {
131
+ return this.stateMachine.authState;
132
+ }
133
+ mapCustomComponents(componentQuery) {
134
+ if (!componentQuery)
135
+ return {};
136
+ const customComponents = {};
137
+ componentQuery.forEach((component) => {
138
+ customComponents[component.name] = component.template;
139
+ });
140
+ return customComponents;
141
+ }
142
+ }
143
+ AmplifyAuthenticatorComponent.decorators = [
144
+ { type: Component, args: [{
145
+ selector: 'amplify-authenticator',
146
+ template: "<!-- \n Define default contents here.\n-->\n<ng-template #signIn>\n <amplify-sign-in></amplify-sign-in>\n</ng-template>\n<ng-template #signUp>\n <amplify-sign-up></amplify-sign-up>\n</ng-template>\n<ng-template #confirmSignUp>\n <amplify-confirm-sign-up></amplify-confirm-sign-up>\n</ng-template>\n<ng-template #confirmSignIn>\n <amplify-confirm-sign-in></amplify-confirm-sign-in>\n</ng-template>\n<ng-template #authenticated> <ng-content></ng-content> </ng-template>\n<ng-template #setupTOTP>\n <amplify-setup-totp></amplify-setup-totp>\n</ng-template>\n<ng-template #forceNewPassword>\n <amplify-force-new-password></amplify-force-new-password>\n</ng-template>\n<ng-template #resetPassword>\n <amplify-reset-password></amplify-reset-password>\n</ng-template>\n<ng-template #confirmResetPassword>\n <amplify-confirm-reset-password></amplify-confirm-reset-password>\n</ng-template>\n<ng-template #verifyUser>\n <amplify-verify-user></amplify-verify-user>\n</ng-template>\n<ng-template #confirmVerifyUser>\n <amplify-confirm-verify-user></amplify-confirm-verify-user>\n</ng-template>\n\n<!-- \n Next, we render respective auth subcomponent respective to the current authState.\n If customer is overriding that component, we render customer's template instead.\n-->\n\n<!-- signIn component -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.signIn || signIn\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('signIn')\"\n>\n</ng-container>\n\n<!-- signUp component -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.signUp || signUp\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('signUp')\"\n>\n</ng-container>\n\n<!-- confirmSignUp content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.confirmSignUp || confirmSignUp\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('confirmSignUp')\"\n>\n</ng-container>\n\n<!-- confirmSignIn content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.confirmSignIn || confirmSignIn\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('confirmSignIn')\"\n>\n</ng-container>\n\n<!-- setupTotp content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.setupTOTP || setupTOTP\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('setupTOTP')\"\n>\n</ng-container>\n\n<!-- forceNewPassword content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.forceNewPassword || forceNewPassword\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('forceNewPassword')\"\n>\n</ng-container>\n\n<!-- resetPassword content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.resetPassword || resetPassword\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('resetPassword')\"\n>\n</ng-container>\n\n<!-- confirmResetPassword content -->\n<ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPassword || confirmResetPassword\n \"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('confirmResetPassword')\"\n>\n</ng-container>\n\n<!-- verifyUser content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.verifyUser || verifyUser\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('verifyUser')\"\n>\n</ng-container>\n\n<!-- confirmVerifyUser content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.confirmVerifyUser || confirmVerifyUser\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('confirmVerifyUser')\"\n>\n</ng-container>\n\n<!-- signedIn content -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.authenticated || authenticated\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"authenticatorState.matches('authenticated')\"\n>\n</ng-container>\n",
147
+ providers: [AuthPropService],
148
+ encapsulation: ViewEncapsulation.None
149
+ },] }
150
+ ];
151
+ AmplifyAuthenticatorComponent.ctorParameters = () => [
152
+ { type: StateMachineService },
153
+ { type: AuthPropService }
154
+ ];
155
+ AmplifyAuthenticatorComponent.propDecorators = {
156
+ initialAuthState: [{ type: Input }],
157
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator',] }],
158
+ customComponentQuery: [{ type: ContentChildren, args: [AmplifyOverrideDirective,] }]
159
+ };
160
+
161
+ const logger$3 = new Logger('SignIn');
162
+ class AmplifySignInComponent {
163
+ constructor(stateMachine, contextService) {
164
+ this.stateMachine = stateMachine;
165
+ this.contextService = contextService;
166
+ this.dataAttr = '';
167
+ this.headerText = translate('Sign in to your account');
168
+ this.customComponents = {};
169
+ this.remoteError = '';
170
+ this.isPending = false;
171
+ // translated phrases
172
+ this.forgotPasswordText = translate('Forgot your password? ');
173
+ this.signInButtonText = translate('Sign in');
174
+ this.noAccountText = translate('No account? ');
175
+ this.createAccountText = translate('Create account');
176
+ }
177
+ ngOnInit() {
178
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
179
+ }
180
+ ngAfterContentInit() {
181
+ this.customComponents = this.contextService.customComponents;
182
+ }
183
+ ngOnDestroy() {
184
+ logger$3.log('sign in destroyed, unsubscribing from state machine...');
185
+ this.authSubscription.unsubscribe();
186
+ }
187
+ onStateUpdate(state) {
188
+ const actorState = getActorState(state);
189
+ this.remoteError = actorState.context.remoteError;
190
+ this.isPending = !actorState.matches('signIn.edit');
191
+ }
192
+ get context() {
193
+ const { change, resetPassword, signUp, submit } = this.stateMachine.services;
194
+ const remoteError = this.remoteError;
195
+ return { change, remoteError, resetPassword, signUp, submit };
196
+ }
197
+ toSignUp() {
198
+ this.stateMachine.send('SIGN_UP');
199
+ }
200
+ toResetPassword() {
201
+ this.stateMachine.send('RESET_PASSWORD');
202
+ }
203
+ onInput(event) {
204
+ event.preventDefault();
205
+ const { name, value } = event.target;
206
+ this.stateMachine.send({
207
+ type: 'CHANGE',
208
+ data: { name, value },
209
+ });
210
+ }
211
+ onSubmit(event) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ event.preventDefault();
214
+ this.stateMachine.send({
215
+ type: 'SUBMIT',
216
+ });
217
+ });
218
+ }
219
+ }
220
+ AmplifySignInComponent.decorators = [
221
+ { type: Component, args: [{
222
+ selector: 'amplify-sign-in',
223
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #signInButton>\n <button data-amplify-button type=\"submit\">{{ signInButtonText }}</button>\n</ng-template>\n\n<ng-template #signInForm>\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-user-name-alias></amplify-user-name-alias>\n <amplify-form-input\n data-amplify-password\n name=\"password\"\n type=\"password\"\n autocomplete=\"current-password\"\n ></amplify-form-input>\n <button type=\"button\" (click)=\"toResetPassword()\">\n {{ forgotPasswordText }}\n </button>\n <div data-amplify-footer>\n <div>\n {{ noAccountText }}\n <button type=\"button\" (click)=\"toSignUp()\">\n {{ createAccountText }}\n </button>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInButton || signInButton\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || signInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n",
224
+ encapsulation: ViewEncapsulation.None
225
+ },] }
226
+ ];
227
+ AmplifySignInComponent.ctorParameters = () => [
228
+ { type: StateMachineService },
229
+ { type: AuthPropService }
230
+ ];
231
+ AmplifySignInComponent.propDecorators = {
232
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-signin',] }],
233
+ headerText: [{ type: Input }]
234
+ };
235
+
236
+ class AmplifySignUpComponent {
237
+ constructor(stateMachine, contextService) {
238
+ this.stateMachine = stateMachine;
239
+ this.contextService = contextService;
240
+ this.dataAttr = '';
241
+ this.headerText = translate('Create a new account');
242
+ this.remoteError = '';
243
+ this.isPending = false;
244
+ this.primaryAlias = '';
245
+ this.secondaryAliases = [];
246
+ this.validationError = {};
247
+ // translated texts
248
+ this.createAccountText = translate('Back to Sign In');
249
+ this.haveAccountText = translate('Have an account? ');
250
+ this.signInText = translate('Sign in');
251
+ }
252
+ get context() {
253
+ const { change, signIn, submit } = this.stateMachine.services;
254
+ const remoteError = this.remoteError;
255
+ const validationError = this.validationError;
256
+ return {
257
+ change,
258
+ remoteError,
259
+ signIn,
260
+ submit,
261
+ validationError,
262
+ };
263
+ }
264
+ ngOnInit() {
265
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
266
+ const context = this.stateMachine.context;
267
+ const { primaryAlias, secondaryAliases } = getConfiguredAliases(context);
268
+ this.primaryAlias = primaryAlias;
269
+ this.secondaryAliases = secondaryAliases;
270
+ }
271
+ ngAfterContentInit() {
272
+ this.customComponents = this.contextService.customComponents;
273
+ }
274
+ ngOnDestroy() {
275
+ this.authSubscription.unsubscribe();
276
+ }
277
+ onStateUpdate(state) {
278
+ const actorState = getActorState(state);
279
+ const actorContext = getActorContext(state);
280
+ this.remoteError = actorContext.remoteError;
281
+ this.validationError = actorContext.validationError;
282
+ this.isPending = !actorState.matches({
283
+ signUp: {
284
+ submission: 'idle',
285
+ },
286
+ });
287
+ }
288
+ onSubmit($event) {
289
+ return __awaiter(this, void 0, void 0, function* () {
290
+ $event.preventDefault();
291
+ this.stateMachine.send('SUBMIT');
292
+ });
293
+ }
294
+ onInput(event) {
295
+ event.preventDefault();
296
+ const { name, value } = event.target;
297
+ this.stateMachine.send({
298
+ type: 'CHANGE',
299
+ data: { name, value },
300
+ });
301
+ }
302
+ toSignIn() {
303
+ this.stateMachine.send('SIGN_IN');
304
+ }
305
+ }
306
+ AmplifySignUpComponent.decorators = [
307
+ { type: Component, args: [{
308
+ selector: 'amplify-sign-up',
309
+ template: "<ng-template #signUpButton>\n <button data-amplify-button type=\"submit\">{{ createAccountText }}</button>\n</ng-template>\n\n<ng-template #signUpUsername>\n <amplify-user-name-alias [name]=\"primaryAlias\"></amplify-user-name-alias>\n</ng-template>\n\n<ng-template #signUpPassword>\n <amplify-form-input\n name=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-input>\n</ng-template>\n\n<ng-template #signUpConfirmPassword>\n <amplify-form-input\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-input>\n</ng-template>\n\n<ng-template #signUpFieldset>\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-federated-sign-in></amplify-federated-sign-in>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUpUsername || signUpUsername\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUpPassword || signUpPassword\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.signUpConfirmPassword || signUpConfirmPassword\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <ng-container *ngFor=\"let secondaryAlias of secondaryAliases\">\n <amplify-form-input [name]=\"secondaryAlias\"></amplify-form-input>\n </ng-container>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n</ng-template>\n\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUpFieldset || signUpFieldset\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <div data-amplify-footer>\n <div>\n {{ haveAccountText }}\n <button type=\"button\" (click)=\"toSignIn()\">{{ signInText }}</button>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUpButton || signUpButton\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </form>\n</div>\n"
310
+ },] }
311
+ ];
312
+ AmplifySignUpComponent.ctorParameters = () => [
313
+ { type: StateMachineService },
314
+ { type: AuthPropService }
315
+ ];
316
+ AmplifySignUpComponent.propDecorators = {
317
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-signup',] }],
318
+ headerText: [{ type: Input }]
319
+ };
320
+
321
+ const getAttributeMap = () => authInputAttributes;
322
+
323
+ /**
324
+ * Input interface opinionated for authenticator usage.
325
+ *
326
+ * TODO: Separate this component out to two parts -- 1) amplify-auth-input that
327
+ * contains authenticator opinionated logic and 2) amplify-text-field primitive
328
+ * that does not make any auth-related inference.
329
+ */
330
+ class AmplifyInputComponent {
331
+ constructor(stateMachine) {
332
+ this.stateMachine = stateMachine;
333
+ this.required = true;
334
+ this.placeholder = '';
335
+ this.label = '';
336
+ this.initialValue = '';
337
+ this.disabled = false;
338
+ this.autocomplete = '';
339
+ this.countryDialCodes = countryDialCodes;
340
+ }
341
+ ngOnInit() {
342
+ const state = this.stateMachine.authState;
343
+ const { country_code } = getActorContext(state);
344
+ this.defaultCountryCode = country_code;
345
+ // TODO: consider better default handling mechanisms across frameworks
346
+ if (this.isTelInput()) {
347
+ this.stateMachine.send({
348
+ type: 'CHANGE',
349
+ data: { name: 'country_code', value: country_code },
350
+ });
351
+ }
352
+ }
353
+ get attributeMap() {
354
+ return getAttributeMap();
355
+ }
356
+ get error() {
357
+ const formContext = getActorContext(this.stateMachine.authState);
358
+ const { validationError } = formContext;
359
+ return validationError[this.name];
360
+ }
361
+ isTelInput() {
362
+ return this.inferType() === 'tel';
363
+ }
364
+ inferLabel() {
365
+ var _a;
366
+ const label = this.label || ((_a = this.attributeMap[this.name]) === null || _a === void 0 ? void 0 : _a.label);
367
+ return translate(label);
368
+ }
369
+ inferPlaceholder() {
370
+ var _a;
371
+ const placeholder = this.placeholder || ((_a = this.attributeMap[this.name]) === null || _a === void 0 ? void 0 : _a.placeholder) ||
372
+ this.inferLabel();
373
+ return translate(placeholder);
374
+ }
375
+ // infers what the `type` of underlying input element should be.
376
+ inferType() {
377
+ var _a, _b, _c;
378
+ return (_c = (_a = this.type) !== null && _a !== void 0 ? _a : (_b = this.attributeMap[this.name]) === null || _b === void 0 ? void 0 : _b.type) !== null && _c !== void 0 ? _c : 'text';
379
+ }
380
+ }
381
+ AmplifyInputComponent.decorators = [
382
+ { type: Component, args: [{
383
+ selector: 'amplify-form-input',
384
+ template: "<!-- Country code field -->\n<amplify-form-select\n *ngIf=\"isTelInput()\"\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"'country-code'\"\n [items]=\"countryDialCodes\"\n [initialValue]=\"defaultCountryCode\"\n></amplify-form-select>\n<!-- Textbox field -->\n<label>\n <div data-amplify-label>{{ inferLabel() }}</div>\n <input\n data-amplify-form-input\n [type]=\"inferType()\"\n [name]=\"name\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n />\n <amplify-error *ngIf=\"error\">\n {{ error }}\n </amplify-error>\n</label>\n"
385
+ },] }
386
+ ];
387
+ AmplifyInputComponent.ctorParameters = () => [
388
+ { type: StateMachineService }
389
+ ];
390
+ AmplifyInputComponent.propDecorators = {
391
+ name: [{ type: Input }],
392
+ type: [{ type: Input }],
393
+ required: [{ type: Input }],
394
+ placeholder: [{ type: Input }],
395
+ label: [{ type: Input }],
396
+ initialValue: [{ type: Input }],
397
+ disabled: [{ type: Input }],
398
+ autocomplete: [{ type: Input }]
399
+ };
400
+
401
+ class AmplifyErrorComponent {
402
+ }
403
+ AmplifyErrorComponent.decorators = [
404
+ { type: Component, args: [{
405
+ selector: 'amplify-error',
406
+ template: "<span data-amplify-error>\n <ng-content></ng-content>\n</span>\n"
407
+ },] }
408
+ ];
409
+
410
+ class AmplifyConfirmSignUpComponent {
411
+ constructor(stateMachine, contextService) {
412
+ this.stateMachine = stateMachine;
413
+ this.contextService = contextService;
414
+ this.dataAttr = '';
415
+ this.headerText = translate('Confirm Sign Up');
416
+ this.customComponents = {};
417
+ this.remoteError = '';
418
+ this.isPending = false;
419
+ // translated texts
420
+ this.signInText = translate('Sign in');
421
+ this.resendCodeText = translate('Resend Code');
422
+ this.lostCodeText = translate('Lost your code? ');
423
+ this.confirmText = translate('Confirm');
424
+ }
425
+ ngOnInit() {
426
+ // TODO: alias for subscribe
427
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
428
+ this.setUsername();
429
+ }
430
+ setUsername() {
431
+ var _a;
432
+ const state = this.stateMachine.authState;
433
+ const actorContext = getActorContext(state);
434
+ const { user, authAttributes } = actorContext;
435
+ const username = (_a = user === null || user === void 0 ? void 0 : user.username) !== null && _a !== void 0 ? _a : authAttributes === null || authAttributes === void 0 ? void 0 : authAttributes.username;
436
+ if (username) {
437
+ this.username = username;
438
+ this.stateMachine.send({
439
+ type: 'CHANGE',
440
+ data: { name: 'username', value: this.username },
441
+ });
442
+ }
443
+ }
444
+ ngAfterContentInit() {
445
+ this.customComponents = this.contextService.customComponents;
446
+ }
447
+ ngOnDestroy() {
448
+ this.authSubscription.unsubscribe();
449
+ }
450
+ onStateUpdate(state) {
451
+ const actorState = getActorState(state);
452
+ this.remoteError = actorState.context.remoteError;
453
+ this.isPending = !actorState.matches('confirmSignUp.edit');
454
+ }
455
+ get context() {
456
+ const { change, resend, signIn, submit } = this.stateMachine.services;
457
+ const remoteError = this.remoteError;
458
+ const username = this.username;
459
+ return { change, remoteError, resend, signIn, submit, username };
460
+ }
461
+ toSignIn() {
462
+ this.stateMachine.send('SIGN_IN');
463
+ }
464
+ resend() {
465
+ this.stateMachine.send({
466
+ type: 'RESEND',
467
+ data: {
468
+ username: this.username,
469
+ },
470
+ });
471
+ }
472
+ onInput($event) {
473
+ $event.preventDefault();
474
+ const { name, value } = $event.target;
475
+ this.stateMachine.send({
476
+ type: 'CHANGE',
477
+ data: { name, value },
478
+ });
479
+ }
480
+ onSubmit(event) {
481
+ event.preventDefault();
482
+ const state = this.stateMachine.authState;
483
+ const actorContext = getActorContext(state);
484
+ const { formValues } = actorContext;
485
+ const { username, confirmation_code } = formValues;
486
+ this.stateMachine.send({
487
+ type: 'SUBMIT',
488
+ data: { username, confirmation_code },
489
+ });
490
+ }
491
+ }
492
+ AmplifyConfirmSignUpComponent.decorators = [
493
+ { type: Component, args: [{
494
+ selector: 'amplify-confirm-sign-up',
495
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmSignUpButton>\n <button data-amplify-button type=\"submit\">{{ confirmText }}</button>\n</ng-template>\n\n<ng-template #confirmSignUpForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"username\"\n [initialValue]=\"username ? username : null\"\n [disabled]=\"!!username\"\n ></amplify-form-input>\n <amplify-form-input\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-input>\n\n <div data-amplify-resend>\n {{ lostCodeText }}\n <a data-amplify-link (click)=\"resend()\">{{ resendCodeText }}</a>\n </div>\n\n <div data-amplify-footer>\n <div>\n Back to{{ ' ' }}\n <a data-amplify-link (click)=\"toSignIn()\">{{ signInText }}</a>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmSignUpButton || confirmSignUpButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render confirm sign up component\n-->\n\n<div data-amplify-container>\n <h2 data-amplify-header>{{ headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.confirmSignUpForm || confirmSignUpForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
496
+ },] }
497
+ ];
498
+ AmplifyConfirmSignUpComponent.ctorParameters = () => [
499
+ { type: StateMachineService },
500
+ { type: AuthPropService }
501
+ ];
502
+ AmplifyConfirmSignUpComponent.propDecorators = {
503
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-confirmsignup',] }],
504
+ headerText: [{ type: Input }]
505
+ };
506
+
507
+ class AmplifyUserNameAliasComponent {
508
+ constructor(stateMachine) {
509
+ this.stateMachine = stateMachine;
510
+ this.name = 'username';
511
+ this.disabled = false;
512
+ this.initialValue = '';
513
+ this.required = true;
514
+ }
515
+ ngOnInit() {
516
+ const context = this.stateMachine.context;
517
+ const { label, type } = getAliasInfoFromContext(context);
518
+ this.label = label;
519
+ this.type = type;
520
+ this.placeholder = label;
521
+ }
522
+ }
523
+ AmplifyUserNameAliasComponent.decorators = [
524
+ { type: Component, args: [{
525
+ selector: 'amplify-user-name-alias',
526
+ template: "<amplify-form-input\n data-amplify-usernamealias\n [name]=\"name\"\n [label]=\"label\"\n [type]=\"type\"\n [placeholder]=\"placeholder\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n autocomplete=\"username\"\n>\n</amplify-form-input>\n"
527
+ },] }
528
+ ];
529
+ AmplifyUserNameAliasComponent.ctorParameters = () => [
530
+ { type: StateMachineService }
531
+ ];
532
+ AmplifyUserNameAliasComponent.propDecorators = {
533
+ name: [{ type: Input }],
534
+ disabled: [{ type: Input }],
535
+ initialValue: [{ type: Input }],
536
+ required: [{ type: Input }]
537
+ };
538
+
539
+ const logger$2 = new Logger('ConfirmSignIn');
540
+ class AmplifyConfirmSignInComponent {
541
+ constructor(stateMachine, contextService) {
542
+ this.stateMachine = stateMachine;
543
+ this.contextService = contextService;
544
+ this.dataAttr = '';
545
+ this.customComponents = {};
546
+ this.remoteError = '';
547
+ this.isPending = false;
548
+ this.confirmText = translate('Confirm');
549
+ this.backToSignInText = translate('Back to Sign In');
550
+ }
551
+ ngOnInit() {
552
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => {
553
+ this.onStateUpdate(state);
554
+ });
555
+ this.setHeaderText();
556
+ }
557
+ ngAfterContentInit() {
558
+ this.customComponents = this.contextService.customComponents;
559
+ }
560
+ ngOnDestroy() {
561
+ this.authSubscription.unsubscribe();
562
+ }
563
+ get context() {
564
+ const { change, signIn, submit } = this.stateMachine.services;
565
+ const remoteError = this.remoteError;
566
+ return { change, remoteError, signIn, submit };
567
+ }
568
+ setHeaderText() {
569
+ const state = this.stateMachine.authState;
570
+ const actorContext = getActorContext(state);
571
+ const { challengeName } = actorContext;
572
+ switch (challengeName) {
573
+ case AuthChallengeNames.SOFTWARE_TOKEN_MFA:
574
+ // TODO: this string should be centralized and translated from ui.
575
+ this.headerText = translate('Confirm TOTP Code');
576
+ break;
577
+ case AuthChallengeNames.SMS_MFA:
578
+ this.headerText = translate('Confirm SMS Code');
579
+ break;
580
+ default:
581
+ logger$2.error('Unexpected challengeName', challengeName);
582
+ }
583
+ }
584
+ onStateUpdate(state) {
585
+ const actorState = getActorState(state);
586
+ this.remoteError = actorState.context.remoteError;
587
+ this.isPending = !actorState.matches('confirmSignIn.edit');
588
+ }
589
+ onInput(event) {
590
+ event.preventDefault();
591
+ const { name, value } = event.target;
592
+ this.stateMachine.send({
593
+ type: 'CHANGE',
594
+ data: { name, value },
595
+ });
596
+ }
597
+ onSubmit(event) {
598
+ event.preventDefault();
599
+ // TODO: handle form data within the state machine
600
+ const formData = new FormData(event.target);
601
+ this.stateMachine.send({
602
+ type: 'SUBMIT',
603
+ data: Object.fromEntries(formData),
604
+ });
605
+ }
606
+ toSignIn() {
607
+ this.stateMachine.send('SIGN_IN');
608
+ }
609
+ }
610
+ AmplifyConfirmSignInComponent.decorators = [
611
+ { type: Component, args: [{
612
+ selector: 'amplify-confirm-sign-in',
613
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmSignInButton>\n <button data-amplify-button type=\"submit\">{{ confirmText }}</button>\n</ng-template>\n\n<ng-template #confirmSignInForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-input>\n\n <div data-amplify-footer>\n <button type=\"button\" (click)=\"toSignIn()\">\n {{ backToSignInText }}\n </button>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmSignInButton || confirmSignInButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n\n<div data-amplify-container>\n <h2 data-amplify-header>{{ headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || confirmSignInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
614
+ },] }
615
+ ];
616
+ AmplifyConfirmSignInComponent.ctorParameters = () => [
617
+ { type: StateMachineService },
618
+ { type: AuthPropService }
619
+ ];
620
+ AmplifyConfirmSignInComponent.propDecorators = {
621
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }]
622
+ };
623
+
624
+ const logger$1 = new Logger('SetupTotp');
625
+ class AmplifySetupTotpComponent {
626
+ constructor(stateMachine, contextService) {
627
+ this.stateMachine = stateMachine;
628
+ this.contextService = contextService;
629
+ this.customComponents = {};
630
+ this.remoteError = '';
631
+ this.isPending = false;
632
+ this.headerText = translate('Setup TOTP');
633
+ this.qrCodeSource = '';
634
+ // translated texts
635
+ this.backToSignInText = translate('Back to Sign In');
636
+ this.confirmText = translate('Confirm');
637
+ }
638
+ ngOnInit() {
639
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => {
640
+ this.onStateUpdate(state);
641
+ });
642
+ this.generateQRCode();
643
+ }
644
+ ngAfterContentInit() {
645
+ this.customComponents = this.contextService.customComponents;
646
+ }
647
+ ngOnDestroy() {
648
+ this.authSubscription.unsubscribe();
649
+ }
650
+ onStateUpdate(state) {
651
+ const actorState = getActorState(state);
652
+ this.remoteError = actorState.context.remoteError;
653
+ this.isPending = !actorState.matches('setupTOTP.edit');
654
+ }
655
+ get context() {
656
+ const { change, submit } = this.stateMachine.services;
657
+ const remoteError = this.remoteError;
658
+ const user = this.stateMachine.user;
659
+ return { change, remoteError, submit, user };
660
+ }
661
+ generateQRCode() {
662
+ var _a;
663
+ return __awaiter(this, void 0, void 0, function* () {
664
+ // TODO: This should be handled in core.
665
+ const state = this.stateMachine.authState;
666
+ const actorContext = getActorContext(state);
667
+ const { user } = actorContext;
668
+ try {
669
+ const secretKey = yield Auth.setupTOTP(user);
670
+ const issuer = 'AWSCognito';
671
+ const totpCode = `otpauth://totp/${issuer}:${user.username}?secret=${secretKey}&issuer=${issuer}`;
672
+ logger$1.info('totp code was generated:', totpCode);
673
+ this.qrCodeSource = yield QRCode.toDataURL(totpCode);
674
+ }
675
+ catch (err) {
676
+ this.remoteError = (_a = err.message) !== null && _a !== void 0 ? _a : err;
677
+ logger$1.error(err);
678
+ }
679
+ });
680
+ }
681
+ onInput(event) {
682
+ event.preventDefault();
683
+ const { name, value } = event.target;
684
+ this.stateMachine.send({
685
+ type: 'CHANGE',
686
+ data: { name, value },
687
+ });
688
+ }
689
+ onSubmit(event) {
690
+ event.preventDefault();
691
+ // TODO: handle form data within the state machine
692
+ const formData = new FormData(event.target);
693
+ this.stateMachine.send({
694
+ type: 'SUBMIT',
695
+ data: Object.fromEntries(formData),
696
+ });
697
+ }
698
+ toSignIn() {
699
+ this.stateMachine.send('SIGN_IN');
700
+ }
701
+ }
702
+ AmplifySetupTotpComponent.decorators = [
703
+ { type: Component, args: [{
704
+ selector: 'amplify-setup-totp',
705
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #setupTotpButton>\n <button data-amplify-button type=\"submit\">{{ confirmText }}</button>\n</ng-template>\n\n<ng-template #setupTotpForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img *ngIf=\"qrCodeSource\" [src]=\"qrCodeSource\" alt=\"qr code\" />\n <amplify-form-input\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-input>\n\n <div data-amplify-footer>\n <button (click)=\"toSignIn()\">{{ backToSignInText }}</button>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.setupTotpButton || setupTotpButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.setupTotpForm || setupTotpForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
706
+ },] }
707
+ ];
708
+ AmplifySetupTotpComponent.ctorParameters = () => [
709
+ { type: StateMachineService },
710
+ { type: AuthPropService }
711
+ ];
712
+ AmplifySetupTotpComponent.propDecorators = {
713
+ customComponents: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-setup-totp',] }]
714
+ };
715
+
716
+ const logger = new Logger('ForceNewPassword');
717
+ class AmplifyForceNewPasswordComponent {
718
+ constructor(stateMachine, contextService) {
719
+ this.stateMachine = stateMachine;
720
+ this.contextService = contextService;
721
+ this.dataAttr = '';
722
+ this.headerText = translate('Reset your password');
723
+ this.customComponents = {};
724
+ this.remoteError = '';
725
+ this.isPending = false;
726
+ // translated texts
727
+ this.changePasswordText = translate('Change Password');
728
+ this.backToSignInText = translate('Back to Sign In');
729
+ }
730
+ ngOnInit() {
731
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
732
+ }
733
+ ngAfterContentInit() {
734
+ this.customComponents = this.contextService.customComponents;
735
+ }
736
+ ngOnDestroy() {
737
+ logger.log('sign in destroyed, unsubscribing from state machine...');
738
+ this.authSubscription.unsubscribe();
739
+ }
740
+ onStateUpdate(state) {
741
+ const actorState = getActorState(state);
742
+ this.remoteError = actorState.context.remoteError;
743
+ this.isPending = actorState.matches({
744
+ signUp: {
745
+ submission: 'idle',
746
+ },
747
+ });
748
+ }
749
+ get context() {
750
+ const { change, signIn, submit } = this.stateMachine.services;
751
+ const user = this.stateMachine.user;
752
+ const remoteError = this.remoteError;
753
+ return { change, remoteError, signIn, submit, user };
754
+ }
755
+ toSignIn() {
756
+ this.stateMachine.send('SIGN_IN');
757
+ }
758
+ onInput(event) {
759
+ event.preventDefault();
760
+ const { name, value } = event.target;
761
+ this.stateMachine.send({
762
+ type: 'CHANGE',
763
+ data: { name, value },
764
+ });
765
+ }
766
+ onSubmit(event) {
767
+ event.preventDefault();
768
+ // consider stateMachine directly providing actorState / actorContext
769
+ const state = this.stateMachine.authState;
770
+ const actorState = getActorContext(state);
771
+ const { formValues } = actorState;
772
+ this.stateMachine.send({
773
+ type: 'SUBMIT',
774
+ data: formValues,
775
+ });
776
+ }
777
+ }
778
+ AmplifyForceNewPasswordComponent.decorators = [
779
+ { type: Component, args: [{
780
+ selector: 'amplify-force-new-password',
781
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #forceNewPasswordSubmitButton>\n <button data-amplify-button type=\"submit\">{{ changePasswordText }}</button>\n</ng-template>\n\n<ng-template #signInForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-input>\n\n <amplify-form-input\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-input>\n\n <div data-amplify-footer>\n <button type=\"button\" (click)=\"toSignIn()\">\n {{ backToSignInText }}\n </button>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.forceNewPasswordSubmitButton ||\n forceNewPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || signInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
782
+ },] }
783
+ ];
784
+ AmplifyForceNewPasswordComponent.ctorParameters = () => [
785
+ { type: StateMachineService },
786
+ { type: AuthPropService }
787
+ ];
788
+ AmplifyForceNewPasswordComponent.propDecorators = {
789
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-forcenewpassword',] }],
790
+ headerText: [{ type: Input }]
791
+ };
792
+
793
+ class AmplifyFederatedSignInComponent {
794
+ constructor(stateMachine) {
795
+ this.stateMachine = stateMachine;
796
+ this.FederatedProviders = FederatedIdentityProviders;
797
+ this.includeFacebook = false;
798
+ this.includeGoogle = false;
799
+ this.includeAmazon = false;
800
+ this.shouldShowFederatedSignIn = false;
801
+ // translated texts
802
+ this.signInFacebookText = translate('Sign In with Facebook');
803
+ this.signInGoogleText = translate('Sign In with Google');
804
+ this.signInAmazonText = translate('Sign In with Amazon');
805
+ }
806
+ ngOnInit() {
807
+ var _a, _b;
808
+ const loginMechanisms = (_b = (_a = this.stateMachine.context) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.login_mechanisms;
809
+ this.includeFacebook = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('facebook');
810
+ this.includeGoogle = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('google');
811
+ this.includeAmazon = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('amazon');
812
+ this.shouldShowFederatedSignIn =
813
+ this.includeFacebook || this.includeGoogle || this.includeAmazon;
814
+ }
815
+ }
816
+ AmplifyFederatedSignInComponent.decorators = [
817
+ { type: Component, args: [{
818
+ selector: 'amplify-federated-sign-in',
819
+ template: "<div data-amplify-federated>\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n ></amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [text]=\"signInGoogleText\"\n [provider]=\"FederatedProviders.Google\"\n ></amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n ></amplify-federated-sign-in-button>\n</div>\n"
820
+ },] }
821
+ ];
822
+ AmplifyFederatedSignInComponent.ctorParameters = () => [
823
+ { type: StateMachineService }
824
+ ];
825
+
826
+ class AmplifyFederatedSignInButtonComponent {
827
+ constructor(stateMachine) {
828
+ this.stateMachine = stateMachine;
829
+ this.onClick = () => {
830
+ this.stateMachine.send({
831
+ type: 'FEDERATED_SIGN_IN',
832
+ data: { provider: this.provider },
833
+ });
834
+ };
835
+ }
836
+ }
837
+ AmplifyFederatedSignInButtonComponent.decorators = [
838
+ { type: Component, args: [{
839
+ selector: 'amplify-federated-sign-in-button',
840
+ template: "<button data-amplify-button (click)=\"onClick()\">{{ text }}</button>\n"
841
+ },] }
842
+ ];
843
+ AmplifyFederatedSignInButtonComponent.ctorParameters = () => [
844
+ { type: StateMachineService }
845
+ ];
846
+ AmplifyFederatedSignInButtonComponent.propDecorators = {
847
+ provider: [{ type: Input }],
848
+ text: [{ type: Input }]
849
+ };
850
+
851
+ class AmplifyResetPasswordComponent {
852
+ constructor(stateMachine, contextService) {
853
+ this.stateMachine = stateMachine;
854
+ this.contextService = contextService;
855
+ this.dataAttr = '';
856
+ this.headerText = translate('Reset your password');
857
+ this.customComponents = {};
858
+ this.remoteError = '';
859
+ this.isPending = false;
860
+ // translated texts
861
+ this.sendCodeText = translate('Send Code');
862
+ this.backToSignInText = translate('Back to Sign In');
863
+ }
864
+ ngOnInit() {
865
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
866
+ }
867
+ ngAfterContentInit() {
868
+ this.customComponents = this.contextService.customComponents;
869
+ }
870
+ ngOnDestroy() {
871
+ this.authSubscription.unsubscribe();
872
+ }
873
+ onStateUpdate(state) {
874
+ const actorState = getActorState(state);
875
+ this.remoteError = actorState.context.remoteError;
876
+ this.isPending = !actorState.matches('resetPassword.edit');
877
+ }
878
+ get context() {
879
+ const { change, signIn, submit } = this.stateMachine.services;
880
+ const remoteError = this.remoteError;
881
+ return { change, remoteError, signIn, submit };
882
+ }
883
+ toSignIn() {
884
+ this.stateMachine.send('SIGN_IN');
885
+ }
886
+ onInput(event) {
887
+ event.preventDefault();
888
+ const { name, value } = event.target;
889
+ this.stateMachine.send({
890
+ type: 'CHANGE',
891
+ data: { name, value },
892
+ });
893
+ }
894
+ onSubmit(event) {
895
+ event.preventDefault();
896
+ this.stateMachine.send('SUBMIT');
897
+ }
898
+ }
899
+ AmplifyResetPasswordComponent.decorators = [
900
+ { type: Component, args: [{
901
+ selector: 'amplify-reset-password',
902
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #resetPasswordSubmitButton>\n <button data-amplify-button type=\"submit\">{{ sendCodeText }}</button>\n</ng-template>\n\n<ng-template #resetPasswordFooter>\n <div data-amplify-footer>\n <button type=\"button\" (click)=\"toSignIn()\">{{ backToSignInText }}</button>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.resetPasswordSubmitButton || resetPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #resetPasswordForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"username\"\n type=\"username\"\n autocomplete=\"username\"\n ></amplify-form-input>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.resetPasswordFooter || resetPasswordFooter\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render reset passsword component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.resetPasswordForm || resetPasswordForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
903
+ },] }
904
+ ];
905
+ AmplifyResetPasswordComponent.ctorParameters = () => [
906
+ { type: StateMachineService },
907
+ { type: AuthPropService }
908
+ ];
909
+ AmplifyResetPasswordComponent.propDecorators = {
910
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-resetPassword',] }],
911
+ headerText: [{ type: Input }]
912
+ };
913
+
914
+ class AmplifyVerifyUserComponent {
915
+ constructor(stateMachine, contextService) {
916
+ this.stateMachine = stateMachine;
917
+ this.contextService = contextService;
918
+ this.dataAttr = '';
919
+ this.headerText = translate('Account recovery requires verified contact information');
920
+ this.customComponents = {};
921
+ this.unverifiedAttributes = {};
922
+ this.remoteError = '';
923
+ this.isPending = false;
924
+ // translated texts
925
+ this.skipText = translate('Skip');
926
+ this.verifyText = translate('Verify');
927
+ }
928
+ ngOnInit() {
929
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
930
+ }
931
+ ngAfterContentInit() {
932
+ this.customComponents = this.contextService.customComponents;
933
+ }
934
+ ngOnDestroy() {
935
+ this.authSubscription.unsubscribe();
936
+ }
937
+ onStateUpdate(state) {
938
+ const actorState = getActorState(state);
939
+ this.unverifiedAttributes = actorState.context.unverifiedAttributes;
940
+ this.remoteError = actorState.context.remoteError;
941
+ this.isPending = !actorState.matches('verifyUser.edit');
942
+ }
943
+ get context() {
944
+ const { change, skip, submit } = this.stateMachine.services;
945
+ const remoteError = this.remoteError;
946
+ return { change, remoteError, skip, submit };
947
+ }
948
+ skipVerify() {
949
+ this.stateMachine.send('SKIP');
950
+ }
951
+ // enable translate to be used inside the template
952
+ translate(phrase) {
953
+ return translate(phrase);
954
+ }
955
+ onSubmit(event) {
956
+ return __awaiter(this, void 0, void 0, function* () {
957
+ event.preventDefault();
958
+ const formData = new FormData(event.target);
959
+ this.stateMachine.send({
960
+ type: 'SUBMIT',
961
+ data: Object.fromEntries(formData),
962
+ });
963
+ });
964
+ }
965
+ }
966
+ AmplifyVerifyUserComponent.decorators = [
967
+ { type: Component, args: [{
968
+ selector: 'amplify-verify-user',
969
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #verifyUserFooter>\n <div data-amplify-footer>\n <button data-amplify-button (click)=\"skipVerify()\">{{ skipText }}</button>\n <button data-amplify-button type=\"submit\">{{ verifyText }}</button>\n </div>\n</ng-template>\n\n<ng-template #verifyUserForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <ng-container\n *ngFor=\"let unverifiedAttribute of unverifiedAttributes | keyvalue\"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedAttribute.key\"\n />\n <span>{{ translate(unverifiedAttribute.key) }}</span>\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.verifyUserFooter || verifyUserFooter\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render verify user component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.verifyUserForm || verifyUserForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n",
970
+ encapsulation: ViewEncapsulation.None
971
+ },] }
972
+ ];
973
+ AmplifyVerifyUserComponent.ctorParameters = () => [
974
+ { type: StateMachineService },
975
+ { type: AuthPropService }
976
+ ];
977
+ AmplifyVerifyUserComponent.propDecorators = {
978
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-verifyuser',] }],
979
+ headerText: [{ type: Input }]
980
+ };
981
+
982
+ class ConfirmResetPasswordComponent {
983
+ constructor(stateMachine, contextService) {
984
+ this.stateMachine = stateMachine;
985
+ this.contextService = contextService;
986
+ this.dataAttr = '';
987
+ this.headerText = translate('Reset your password');
988
+ this.customComponents = {};
989
+ this.remoteError = '';
990
+ this.isPending = false;
991
+ // translated strings
992
+ this.sendCodeText = translate('Send Code');
993
+ this.backToSignInText = translate('Back to Sign In');
994
+ this.lostCodeText = translate('Lost your code? ');
995
+ this.resendCodeText = translate('Resend Code');
996
+ }
997
+ ngOnInit() {
998
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
999
+ }
1000
+ ngAfterContentInit() {
1001
+ this.customComponents = this.contextService.customComponents;
1002
+ }
1003
+ ngOnDestroy() {
1004
+ this.authSubscription.unsubscribe();
1005
+ }
1006
+ onStateUpdate(state) {
1007
+ const actorState = getActorState(state);
1008
+ this.remoteError = actorState.context.remoteError;
1009
+ this.isPending = !actorState.matches('confirmResetPassword.edit');
1010
+ }
1011
+ get context() {
1012
+ const { change, resend, signIn, submit } = this.stateMachine.services;
1013
+ const remoteError = this.remoteError;
1014
+ return { change, resend, remoteError, signIn, submit };
1015
+ }
1016
+ toSignIn() {
1017
+ this.stateMachine.send('SIGN_IN');
1018
+ }
1019
+ resend() {
1020
+ this.stateMachine.send('RESEND');
1021
+ }
1022
+ onInput(event) {
1023
+ event.preventDefault();
1024
+ const { name, value } = event.target;
1025
+ this.stateMachine.send({
1026
+ type: 'CHANGE',
1027
+ data: { name, value },
1028
+ });
1029
+ }
1030
+ onSubmit(event) {
1031
+ return __awaiter(this, void 0, void 0, function* () {
1032
+ event.preventDefault();
1033
+ this.stateMachine.send('SUBMIT');
1034
+ });
1035
+ }
1036
+ }
1037
+ ConfirmResetPasswordComponent.decorators = [
1038
+ { type: Component, args: [{
1039
+ selector: 'amplify-confirm-reset-password',
1040
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmResetPasswordSubmitButton>\n <button data-amplify-button type=\"submit\">{{ sendCodeText }}</button>\n</ng-template>\n\n<ng-template #confirmResetPasswordFooter>\n <div data-amplify-footer>\n <div>\n <button type=\"button\" (click)=\"toSignIn()\">{{ backToSignInText }}</button>\n </div>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPasswordSubmitButton ||\n confirmResetPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </div>\n</ng-template>\n\n<ng-template #confirmResetPasswordForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-input>\n <amplify-form-input\n name=\"password\"\n label=\"New password\"\n autocomplete=\"new-password\"\n ></amplify-form-input>\n\n <div data-amplify-resend>\n {{ lostCodeText }}\n <button type=\"button\" (click)=\"resend()\">{{ resendCodeText }}</button>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPasswordFooter ||\n confirmResetPasswordFooter\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render confirm reset password component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPasswordForm || confirmResetPasswordForm\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
1041
+ },] }
1042
+ ];
1043
+ ConfirmResetPasswordComponent.ctorParameters = () => [
1044
+ { type: StateMachineService },
1045
+ { type: AuthPropService }
1046
+ ];
1047
+ ConfirmResetPasswordComponent.propDecorators = {
1048
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }],
1049
+ headerText: [{ type: Input }]
1050
+ };
1051
+
1052
+ class ConfirmVerifyUserComponent {
1053
+ constructor(stateMachine, contextService) {
1054
+ this.stateMachine = stateMachine;
1055
+ this.contextService = contextService;
1056
+ this.dataAttr = '';
1057
+ this.headerText = 'Account recovery requires verified contact information';
1058
+ this.customComponents = {};
1059
+ this.remoteError = '';
1060
+ this.isPending = false;
1061
+ }
1062
+ ngOnInit() {
1063
+ this.authSubscription = this.stateMachine.authService.subscribe((state) => this.onStateUpdate(state));
1064
+ }
1065
+ ngAfterContentInit() {
1066
+ this.customComponents = this.contextService.customComponents;
1067
+ }
1068
+ ngOnDestroy() {
1069
+ this.authSubscription.unsubscribe();
1070
+ }
1071
+ onStateUpdate(state) {
1072
+ const actorState = getActorState(state);
1073
+ this.remoteError = actorState.context.remoteError;
1074
+ this.isPending = !actorState.matches('confirmVerifyUser.edit');
1075
+ }
1076
+ get context() {
1077
+ const { skip, submit } = this.stateMachine.services;
1078
+ const remoteError = this.remoteError;
1079
+ return { remoteError, skip, submit };
1080
+ }
1081
+ skipVerify() {
1082
+ this.stateMachine.send('SKIP');
1083
+ }
1084
+ onSubmit(event) {
1085
+ return __awaiter(this, void 0, void 0, function* () {
1086
+ event.preventDefault();
1087
+ const formData = new FormData(event.target);
1088
+ this.stateMachine.send({
1089
+ type: 'SUBMIT',
1090
+ data: Object.fromEntries(formData),
1091
+ });
1092
+ });
1093
+ }
1094
+ }
1095
+ ConfirmVerifyUserComponent.decorators = [
1096
+ { type: Component, args: [{
1097
+ selector: 'amplify-confirm-verify-user',
1098
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #verifyUserFooter>\n <div data-amplify-footer>\n <button data-amplify-button (click)=\"skipVerify()\">Skip</button>\n <button data-amplify-button type=\"submit\">Submit</button>\n </div>\n</ng-template>\n\n<ng-template #confirmVerifyUserForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\">\n <fieldset data-amplify-fieldset [disabled]=\"isPending\">\n <amplify-form-input\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-input>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.verifyUserFooter || verifyUserFooter\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n </fieldset>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </form>\n</ng-template>\n\n<!-- \n Render confirm reset password component\n-->\n<div data-amplify-container>\n <h2 data-amplify-header>{{ this.headerText }}</h2>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmVerifyUserForm || confirmVerifyUserForm\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
1099
+ },] }
1100
+ ];
1101
+ ConfirmVerifyUserComponent.ctorParameters = () => [
1102
+ { type: StateMachineService },
1103
+ { type: AuthPropService }
1104
+ ];
1105
+ ConfirmVerifyUserComponent.propDecorators = {
1106
+ dataAttr: [{ type: HostBinding, args: ['attr.data-amplify-authenticator-confirmverifyuser',] }],
1107
+ headerText: [{ type: Input }]
1108
+ };
1109
+
1110
+ class AmplifySelectComponent {
1111
+ }
1112
+ AmplifySelectComponent.decorators = [
1113
+ { type: Component, args: [{
1114
+ selector: 'amplify-form-select',
1115
+ template: "<select [id]=\"id\" [name]=\"name\" [attr.aria-label]=\"label\">\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === initialValue\"\n >\n {{ item }}\n </option>\n</select>\n"
1116
+ },] }
1117
+ ];
1118
+ AmplifySelectComponent.propDecorators = {
1119
+ items: [{ type: Input }],
1120
+ name: [{ type: Input }],
1121
+ label: [{ type: Input }],
1122
+ id: [{ type: Input }],
1123
+ initialValue: [{ type: Input }]
1124
+ };
1125
+
1126
+ const proxyInputs = (Cmp, inputs) => {
1127
+ const Prototype = Cmp.prototype;
1128
+ inputs.forEach((item) => {
1129
+ Object.defineProperty(Prototype, item, {
1130
+ get() {
1131
+ return this.el[item];
1132
+ },
1133
+ set(val) {
1134
+ this.z.runOutsideAngular(() => (this.el[item] = val));
1135
+ },
1136
+ });
1137
+ });
1138
+ };
1139
+ const proxyMethods = (Cmp, methods) => {
1140
+ const Prototype = Cmp.prototype;
1141
+ methods.forEach((methodName) => {
1142
+ Prototype[methodName] = function () {
1143
+ const args = arguments;
1144
+ return this.z.runOutsideAngular(() => this.el[methodName].apply(this.el, args));
1145
+ };
1146
+ });
1147
+ };
1148
+ const proxyOutputs = (instance, el, events) => {
1149
+ events.forEach((eventName) => (instance[eventName] = fromEvent(el, eventName)));
1150
+ };
1151
+ // tslint:disable-next-line: only-arrow-functions
1152
+ function ProxyCmp(opts) {
1153
+ const decorator = function (cls) {
1154
+ if (opts.inputs) {
1155
+ proxyInputs(cls, opts.inputs);
1156
+ }
1157
+ if (opts.methods) {
1158
+ proxyMethods(cls, opts.methods);
1159
+ }
1160
+ return cls;
1161
+ };
1162
+ return decorator;
1163
+ }
1164
+ let AmplifyAmazonButton = class AmplifyAmazonButton {
1165
+ constructor(c, r, z) {
1166
+ this.z = z;
1167
+ c.detach();
1168
+ this.el = r.nativeElement;
1169
+ }
1170
+ };
1171
+ AmplifyAmazonButton.decorators = [
1172
+ { type: Component, args: [{
1173
+ selector: 'amplify-amazon-button',
1174
+ changeDetection: ChangeDetectionStrategy.OnPush,
1175
+ template: '<ng-content></ng-content>',
1176
+ inputs: ['clientId', 'handleAuthStateChange']
1177
+ },] }
1178
+ ];
1179
+ AmplifyAmazonButton.ctorParameters = () => [
1180
+ { type: ChangeDetectorRef },
1181
+ { type: ElementRef },
1182
+ { type: NgZone }
1183
+ ];
1184
+ AmplifyAmazonButton = __decorate([
1185
+ ProxyCmp({ inputs: ['clientId', 'handleAuthStateChange'] })
1186
+ ], AmplifyAmazonButton);
1187
+ class AmplifyAuthContainer {
1188
+ constructor(c, r, z) {
1189
+ this.z = z;
1190
+ c.detach();
1191
+ this.el = r.nativeElement;
1192
+ }
1193
+ }
1194
+ AmplifyAuthContainer.decorators = [
1195
+ { type: Component, args: [{
1196
+ selector: 'amplify-auth-container',
1197
+ changeDetection: ChangeDetectionStrategy.OnPush,
1198
+ template: '<ng-content></ng-content>'
1199
+ },] }
1200
+ ];
1201
+ AmplifyAuthContainer.ctorParameters = () => [
1202
+ { type: ChangeDetectorRef },
1203
+ { type: ElementRef },
1204
+ { type: NgZone }
1205
+ ];
1206
+ let AmplifyAuthFields = class AmplifyAuthFields {
1207
+ constructor(c, r, z) {
1208
+ this.z = z;
1209
+ c.detach();
1210
+ this.el = r.nativeElement;
1211
+ }
1212
+ };
1213
+ AmplifyAuthFields.decorators = [
1214
+ { type: Component, args: [{
1215
+ selector: 'amplify-auth-fields',
1216
+ changeDetection: ChangeDetectionStrategy.OnPush,
1217
+ template: '<ng-content></ng-content>',
1218
+ inputs: ['formFields']
1219
+ },] }
1220
+ ];
1221
+ AmplifyAuthFields.ctorParameters = () => [
1222
+ { type: ChangeDetectorRef },
1223
+ { type: ElementRef },
1224
+ { type: NgZone }
1225
+ ];
1226
+ AmplifyAuthFields = __decorate([
1227
+ ProxyCmp({ inputs: ['formFields'] })
1228
+ ], AmplifyAuthFields);
1229
+ let AmplifyAuth0Button = class AmplifyAuth0Button {
1230
+ constructor(c, r, z) {
1231
+ this.z = z;
1232
+ c.detach();
1233
+ this.el = r.nativeElement;
1234
+ }
1235
+ };
1236
+ AmplifyAuth0Button.decorators = [
1237
+ { type: Component, args: [{
1238
+ selector: 'amplify-auth0-button',
1239
+ changeDetection: ChangeDetectionStrategy.OnPush,
1240
+ template: '<ng-content></ng-content>',
1241
+ inputs: ['config', 'handleAuthStateChange']
1242
+ },] }
1243
+ ];
1244
+ AmplifyAuth0Button.ctorParameters = () => [
1245
+ { type: ChangeDetectorRef },
1246
+ { type: ElementRef },
1247
+ { type: NgZone }
1248
+ ];
1249
+ AmplifyAuth0Button = __decorate([
1250
+ ProxyCmp({ inputs: ['config', 'handleAuthStateChange'] })
1251
+ ], AmplifyAuth0Button);
1252
+ let AmplifyAuthenticator = class AmplifyAuthenticator {
1253
+ constructor(c, r, z) {
1254
+ this.z = z;
1255
+ c.detach();
1256
+ this.el = r.nativeElement;
1257
+ }
1258
+ };
1259
+ AmplifyAuthenticator.decorators = [
1260
+ { type: Component, args: [{
1261
+ selector: 'amplify-authenticator',
1262
+ changeDetection: ChangeDetectionStrategy.OnPush,
1263
+ template: '<ng-content></ng-content>',
1264
+ inputs: [
1265
+ 'federated',
1266
+ 'handleAuthStateChange',
1267
+ 'hideToast',
1268
+ 'initialAuthState',
1269
+ 'usernameAlias',
1270
+ ]
1271
+ },] }
1272
+ ];
1273
+ AmplifyAuthenticator.ctorParameters = () => [
1274
+ { type: ChangeDetectorRef },
1275
+ { type: ElementRef },
1276
+ { type: NgZone }
1277
+ ];
1278
+ AmplifyAuthenticator = __decorate([
1279
+ ProxyCmp({
1280
+ inputs: [
1281
+ 'federated',
1282
+ 'handleAuthStateChange',
1283
+ 'hideToast',
1284
+ 'initialAuthState',
1285
+ 'usernameAlias',
1286
+ ],
1287
+ })
1288
+ ], AmplifyAuthenticator);
1289
+ let AmplifyButton = class AmplifyButton {
1290
+ constructor(c, r, z) {
1291
+ this.z = z;
1292
+ c.detach();
1293
+ this.el = r.nativeElement;
1294
+ }
1295
+ };
1296
+ AmplifyButton.decorators = [
1297
+ { type: Component, args: [{
1298
+ selector: 'amplify-button',
1299
+ changeDetection: ChangeDetectionStrategy.OnPush,
1300
+ template: '<ng-content></ng-content>',
1301
+ inputs: ['disabled', 'handleButtonClick', 'icon', 'type', 'variant']
1302
+ },] }
1303
+ ];
1304
+ AmplifyButton.ctorParameters = () => [
1305
+ { type: ChangeDetectorRef },
1306
+ { type: ElementRef },
1307
+ { type: NgZone }
1308
+ ];
1309
+ AmplifyButton = __decorate([
1310
+ ProxyCmp({
1311
+ inputs: ['disabled', 'handleButtonClick', 'icon', 'type', 'variant'],
1312
+ })
1313
+ ], AmplifyButton);
1314
+ let AmplifyChatbot = class AmplifyChatbot {
1315
+ constructor(c, r, z) {
1316
+ this.z = z;
1317
+ c.detach();
1318
+ this.el = r.nativeElement;
1319
+ proxyOutputs(this, this.el, ['chatCompleted']);
1320
+ }
1321
+ };
1322
+ AmplifyChatbot.decorators = [
1323
+ { type: Component, args: [{
1324
+ selector: 'amplify-chatbot',
1325
+ changeDetection: ChangeDetectionStrategy.OnPush,
1326
+ template: '<ng-content></ng-content>',
1327
+ inputs: [
1328
+ 'botName',
1329
+ 'botTitle',
1330
+ 'clearOnComplete',
1331
+ 'conversationModeOn',
1332
+ 'silenceThreshold',
1333
+ 'silenceTime',
1334
+ 'textEnabled',
1335
+ 'voiceEnabled',
1336
+ 'welcomeMessage',
1337
+ ]
1338
+ },] }
1339
+ ];
1340
+ AmplifyChatbot.ctorParameters = () => [
1341
+ { type: ChangeDetectorRef },
1342
+ { type: ElementRef },
1343
+ { type: NgZone }
1344
+ ];
1345
+ AmplifyChatbot = __decorate([
1346
+ ProxyCmp({
1347
+ inputs: [
1348
+ 'botName',
1349
+ 'botTitle',
1350
+ 'clearOnComplete',
1351
+ 'conversationModeOn',
1352
+ 'silenceThreshold',
1353
+ 'silenceTime',
1354
+ 'textEnabled',
1355
+ 'voiceEnabled',
1356
+ 'welcomeMessage',
1357
+ ],
1358
+ })
1359
+ ], AmplifyChatbot);
1360
+ let AmplifyCheckbox = class AmplifyCheckbox {
1361
+ constructor(c, r, z) {
1362
+ this.z = z;
1363
+ c.detach();
1364
+ this.el = r.nativeElement;
1365
+ }
1366
+ };
1367
+ AmplifyCheckbox.decorators = [
1368
+ { type: Component, args: [{
1369
+ selector: 'amplify-checkbox',
1370
+ changeDetection: ChangeDetectionStrategy.OnPush,
1371
+ template: '<ng-content></ng-content>',
1372
+ inputs: ['checked', 'disabled', 'fieldId', 'label', 'name', 'value']
1373
+ },] }
1374
+ ];
1375
+ AmplifyCheckbox.ctorParameters = () => [
1376
+ { type: ChangeDetectorRef },
1377
+ { type: ElementRef },
1378
+ { type: NgZone }
1379
+ ];
1380
+ AmplifyCheckbox = __decorate([
1381
+ ProxyCmp({
1382
+ inputs: ['checked', 'disabled', 'fieldId', 'label', 'name', 'value'],
1383
+ })
1384
+ ], AmplifyCheckbox);
1385
+ let AmplifyCodeField = class AmplifyCodeField {
1386
+ constructor(c, r, z) {
1387
+ this.z = z;
1388
+ c.detach();
1389
+ this.el = r.nativeElement;
1390
+ }
1391
+ };
1392
+ AmplifyCodeField.decorators = [
1393
+ { type: Component, args: [{
1394
+ selector: 'amplify-code-field',
1395
+ changeDetection: ChangeDetectionStrategy.OnPush,
1396
+ template: '<ng-content></ng-content>',
1397
+ inputs: [
1398
+ 'disabled',
1399
+ 'fieldId',
1400
+ 'handleInputChange',
1401
+ 'hint',
1402
+ 'inputProps',
1403
+ 'label',
1404
+ 'placeholder',
1405
+ 'required',
1406
+ 'value',
1407
+ ]
1408
+ },] }
1409
+ ];
1410
+ AmplifyCodeField.ctorParameters = () => [
1411
+ { type: ChangeDetectorRef },
1412
+ { type: ElementRef },
1413
+ { type: NgZone }
1414
+ ];
1415
+ AmplifyCodeField = __decorate([
1416
+ ProxyCmp({
1417
+ inputs: [
1418
+ 'disabled',
1419
+ 'fieldId',
1420
+ 'handleInputChange',
1421
+ 'hint',
1422
+ 'inputProps',
1423
+ 'label',
1424
+ 'placeholder',
1425
+ 'required',
1426
+ 'value',
1427
+ ],
1428
+ })
1429
+ ], AmplifyCodeField);
1430
+ let AmplifyConfirmSignIn = class AmplifyConfirmSignIn {
1431
+ constructor(c, r, z) {
1432
+ this.z = z;
1433
+ c.detach();
1434
+ this.el = r.nativeElement;
1435
+ }
1436
+ };
1437
+ AmplifyConfirmSignIn.decorators = [
1438
+ { type: Component, args: [{
1439
+ selector: 'amplify-confirm-sign-in',
1440
+ changeDetection: ChangeDetectionStrategy.OnPush,
1441
+ template: '<ng-content></ng-content>',
1442
+ inputs: [
1443
+ 'formFields',
1444
+ 'handleAuthStateChange',
1445
+ 'handleSubmit',
1446
+ 'headerText',
1447
+ 'submitButtonText',
1448
+ 'user',
1449
+ ]
1450
+ },] }
1451
+ ];
1452
+ AmplifyConfirmSignIn.ctorParameters = () => [
1453
+ { type: ChangeDetectorRef },
1454
+ { type: ElementRef },
1455
+ { type: NgZone }
1456
+ ];
1457
+ AmplifyConfirmSignIn = __decorate([
1458
+ ProxyCmp({
1459
+ inputs: [
1460
+ 'formFields',
1461
+ 'handleAuthStateChange',
1462
+ 'handleSubmit',
1463
+ 'headerText',
1464
+ 'submitButtonText',
1465
+ 'user',
1466
+ ],
1467
+ })
1468
+ ], AmplifyConfirmSignIn);
1469
+ let AmplifyConfirmSignUp = class AmplifyConfirmSignUp {
1470
+ constructor(c, r, z) {
1471
+ this.z = z;
1472
+ c.detach();
1473
+ this.el = r.nativeElement;
1474
+ }
1475
+ };
1476
+ AmplifyConfirmSignUp.decorators = [
1477
+ { type: Component, args: [{
1478
+ selector: 'amplify-confirm-sign-up',
1479
+ changeDetection: ChangeDetectionStrategy.OnPush,
1480
+ template: '<ng-content></ng-content>',
1481
+ inputs: [
1482
+ 'formFields',
1483
+ 'handleAuthStateChange',
1484
+ 'handleSubmit',
1485
+ 'headerText',
1486
+ 'submitButtonText',
1487
+ 'user',
1488
+ 'usernameAlias',
1489
+ ]
1490
+ },] }
1491
+ ];
1492
+ AmplifyConfirmSignUp.ctorParameters = () => [
1493
+ { type: ChangeDetectorRef },
1494
+ { type: ElementRef },
1495
+ { type: NgZone }
1496
+ ];
1497
+ AmplifyConfirmSignUp = __decorate([
1498
+ ProxyCmp({
1499
+ inputs: [
1500
+ 'formFields',
1501
+ 'handleAuthStateChange',
1502
+ 'handleSubmit',
1503
+ 'headerText',
1504
+ 'submitButtonText',
1505
+ 'user',
1506
+ 'usernameAlias',
1507
+ ],
1508
+ })
1509
+ ], AmplifyConfirmSignUp);
1510
+ class AmplifyContainer {
1511
+ constructor(c, r, z) {
1512
+ this.z = z;
1513
+ c.detach();
1514
+ this.el = r.nativeElement;
1515
+ }
1516
+ }
1517
+ AmplifyContainer.decorators = [
1518
+ { type: Component, args: [{
1519
+ selector: 'amplify-container',
1520
+ changeDetection: ChangeDetectionStrategy.OnPush,
1521
+ template: '<ng-content></ng-content>'
1522
+ },] }
1523
+ ];
1524
+ AmplifyContainer.ctorParameters = () => [
1525
+ { type: ChangeDetectorRef },
1526
+ { type: ElementRef },
1527
+ { type: NgZone }
1528
+ ];
1529
+ let AmplifyCountryDialCode = class AmplifyCountryDialCode {
1530
+ constructor(c, r, z) {
1531
+ this.z = z;
1532
+ c.detach();
1533
+ this.el = r.nativeElement;
1534
+ }
1535
+ };
1536
+ AmplifyCountryDialCode.decorators = [
1537
+ { type: Component, args: [{
1538
+ selector: 'amplify-country-dial-code',
1539
+ changeDetection: ChangeDetectionStrategy.OnPush,
1540
+ template: '<ng-content></ng-content>',
1541
+ inputs: ['dialCode', 'fieldId', 'handleInputChange', 'options']
1542
+ },] }
1543
+ ];
1544
+ AmplifyCountryDialCode.ctorParameters = () => [
1545
+ { type: ChangeDetectorRef },
1546
+ { type: ElementRef },
1547
+ { type: NgZone }
1548
+ ];
1549
+ AmplifyCountryDialCode = __decorate([
1550
+ ProxyCmp({ inputs: ['dialCode', 'fieldId', 'handleInputChange', 'options'] })
1551
+ ], AmplifyCountryDialCode);
1552
+ let AmplifyEmailField = class AmplifyEmailField {
1553
+ constructor(c, r, z) {
1554
+ this.z = z;
1555
+ c.detach();
1556
+ this.el = r.nativeElement;
1557
+ }
1558
+ };
1559
+ AmplifyEmailField.decorators = [
1560
+ { type: Component, args: [{
1561
+ selector: 'amplify-email-field',
1562
+ changeDetection: ChangeDetectionStrategy.OnPush,
1563
+ template: '<ng-content></ng-content>',
1564
+ inputs: [
1565
+ 'disabled',
1566
+ 'fieldId',
1567
+ 'handleInputChange',
1568
+ 'hint',
1569
+ 'inputProps',
1570
+ 'label',
1571
+ 'placeholder',
1572
+ 'required',
1573
+ 'value',
1574
+ ]
1575
+ },] }
1576
+ ];
1577
+ AmplifyEmailField.ctorParameters = () => [
1578
+ { type: ChangeDetectorRef },
1579
+ { type: ElementRef },
1580
+ { type: NgZone }
1581
+ ];
1582
+ AmplifyEmailField = __decorate([
1583
+ ProxyCmp({
1584
+ inputs: [
1585
+ 'disabled',
1586
+ 'fieldId',
1587
+ 'handleInputChange',
1588
+ 'hint',
1589
+ 'inputProps',
1590
+ 'label',
1591
+ 'placeholder',
1592
+ 'required',
1593
+ 'value',
1594
+ ],
1595
+ })
1596
+ ], AmplifyEmailField);
1597
+ let AmplifyFacebookButton = class AmplifyFacebookButton {
1598
+ constructor(c, r, z) {
1599
+ this.z = z;
1600
+ c.detach();
1601
+ this.el = r.nativeElement;
1602
+ }
1603
+ };
1604
+ AmplifyFacebookButton.decorators = [
1605
+ { type: Component, args: [{
1606
+ selector: 'amplify-facebook-button',
1607
+ changeDetection: ChangeDetectionStrategy.OnPush,
1608
+ template: '<ng-content></ng-content>',
1609
+ inputs: ['appId', 'handleAuthStateChange']
1610
+ },] }
1611
+ ];
1612
+ AmplifyFacebookButton.ctorParameters = () => [
1613
+ { type: ChangeDetectorRef },
1614
+ { type: ElementRef },
1615
+ { type: NgZone }
1616
+ ];
1617
+ AmplifyFacebookButton = __decorate([
1618
+ ProxyCmp({ inputs: ['appId', 'handleAuthStateChange'] })
1619
+ ], AmplifyFacebookButton);
1620
+ let AmplifyFederatedButtons = class AmplifyFederatedButtons {
1621
+ constructor(c, r, z) {
1622
+ this.z = z;
1623
+ c.detach();
1624
+ this.el = r.nativeElement;
1625
+ }
1626
+ };
1627
+ AmplifyFederatedButtons.decorators = [
1628
+ { type: Component, args: [{
1629
+ selector: 'amplify-federated-buttons',
1630
+ changeDetection: ChangeDetectionStrategy.OnPush,
1631
+ template: '<ng-content></ng-content>',
1632
+ inputs: ['authState', 'federated', 'handleAuthStateChange']
1633
+ },] }
1634
+ ];
1635
+ AmplifyFederatedButtons.ctorParameters = () => [
1636
+ { type: ChangeDetectorRef },
1637
+ { type: ElementRef },
1638
+ { type: NgZone }
1639
+ ];
1640
+ AmplifyFederatedButtons = __decorate([
1641
+ ProxyCmp({ inputs: ['authState', 'federated', 'handleAuthStateChange'] })
1642
+ ], AmplifyFederatedButtons);
1643
+ let AmplifyFederatedSignIn = class AmplifyFederatedSignIn {
1644
+ constructor(c, r, z) {
1645
+ this.z = z;
1646
+ c.detach();
1647
+ this.el = r.nativeElement;
1648
+ }
1649
+ };
1650
+ AmplifyFederatedSignIn.decorators = [
1651
+ { type: Component, args: [{
1652
+ selector: 'amplify-federated-sign-in',
1653
+ changeDetection: ChangeDetectionStrategy.OnPush,
1654
+ template: '<ng-content></ng-content>',
1655
+ inputs: ['authState', 'federated']
1656
+ },] }
1657
+ ];
1658
+ AmplifyFederatedSignIn.ctorParameters = () => [
1659
+ { type: ChangeDetectorRef },
1660
+ { type: ElementRef },
1661
+ { type: NgZone }
1662
+ ];
1663
+ AmplifyFederatedSignIn = __decorate([
1664
+ ProxyCmp({ inputs: ['authState', 'federated'] })
1665
+ ], AmplifyFederatedSignIn);
1666
+ let AmplifyForgotPassword = class AmplifyForgotPassword {
1667
+ constructor(c, r, z) {
1668
+ this.z = z;
1669
+ c.detach();
1670
+ this.el = r.nativeElement;
1671
+ }
1672
+ };
1673
+ AmplifyForgotPassword.decorators = [
1674
+ { type: Component, args: [{
1675
+ selector: 'amplify-forgot-password',
1676
+ changeDetection: ChangeDetectionStrategy.OnPush,
1677
+ template: '<ng-content></ng-content>',
1678
+ inputs: [
1679
+ 'formFields',
1680
+ 'handleAuthStateChange',
1681
+ 'handleSend',
1682
+ 'handleSubmit',
1683
+ 'headerText',
1684
+ 'sendButtonText',
1685
+ 'submitButtonText',
1686
+ 'usernameAlias',
1687
+ ]
1688
+ },] }
1689
+ ];
1690
+ AmplifyForgotPassword.ctorParameters = () => [
1691
+ { type: ChangeDetectorRef },
1692
+ { type: ElementRef },
1693
+ { type: NgZone }
1694
+ ];
1695
+ AmplifyForgotPassword = __decorate([
1696
+ ProxyCmp({
1697
+ inputs: [
1698
+ 'formFields',
1699
+ 'handleAuthStateChange',
1700
+ 'handleSend',
1701
+ 'handleSubmit',
1702
+ 'headerText',
1703
+ 'sendButtonText',
1704
+ 'submitButtonText',
1705
+ 'usernameAlias',
1706
+ ],
1707
+ })
1708
+ ], AmplifyForgotPassword);
1709
+ let AmplifyFormField = class AmplifyFormField {
1710
+ constructor(c, r, z) {
1711
+ this.z = z;
1712
+ c.detach();
1713
+ this.el = r.nativeElement;
1714
+ }
1715
+ };
1716
+ AmplifyFormField.decorators = [
1717
+ { type: Component, args: [{
1718
+ selector: 'amplify-form-field',
1719
+ changeDetection: ChangeDetectionStrategy.OnPush,
1720
+ template: '<ng-content></ng-content>',
1721
+ inputs: [
1722
+ 'description',
1723
+ 'disabled',
1724
+ 'fieldId',
1725
+ 'handleInputChange',
1726
+ 'hint',
1727
+ 'inputProps',
1728
+ 'label',
1729
+ 'name',
1730
+ 'placeholder',
1731
+ 'required',
1732
+ 'type',
1733
+ 'value',
1734
+ ]
1735
+ },] }
1736
+ ];
1737
+ AmplifyFormField.ctorParameters = () => [
1738
+ { type: ChangeDetectorRef },
1739
+ { type: ElementRef },
1740
+ { type: NgZone }
1741
+ ];
1742
+ AmplifyFormField = __decorate([
1743
+ ProxyCmp({
1744
+ inputs: [
1745
+ 'description',
1746
+ 'disabled',
1747
+ 'fieldId',
1748
+ 'handleInputChange',
1749
+ 'hint',
1750
+ 'inputProps',
1751
+ 'label',
1752
+ 'name',
1753
+ 'placeholder',
1754
+ 'required',
1755
+ 'type',
1756
+ 'value',
1757
+ ],
1758
+ })
1759
+ ], AmplifyFormField);
1760
+ let AmplifyFormSection = class AmplifyFormSection {
1761
+ constructor(c, r, z) {
1762
+ this.z = z;
1763
+ c.detach();
1764
+ this.el = r.nativeElement;
1765
+ }
1766
+ };
1767
+ AmplifyFormSection.decorators = [
1768
+ { type: Component, args: [{
1769
+ selector: 'amplify-form-section',
1770
+ changeDetection: ChangeDetectionStrategy.OnPush,
1771
+ template: '<ng-content></ng-content>',
1772
+ inputs: [
1773
+ 'handleSubmit',
1774
+ 'headerText',
1775
+ 'loading',
1776
+ 'secondaryFooterContent',
1777
+ 'submitButtonText',
1778
+ 'testDataPrefix',
1779
+ ]
1780
+ },] }
1781
+ ];
1782
+ AmplifyFormSection.ctorParameters = () => [
1783
+ { type: ChangeDetectorRef },
1784
+ { type: ElementRef },
1785
+ { type: NgZone }
1786
+ ];
1787
+ AmplifyFormSection = __decorate([
1788
+ ProxyCmp({
1789
+ inputs: [
1790
+ 'handleSubmit',
1791
+ 'headerText',
1792
+ 'loading',
1793
+ 'secondaryFooterContent',
1794
+ 'submitButtonText',
1795
+ 'testDataPrefix',
1796
+ ],
1797
+ })
1798
+ ], AmplifyFormSection);
1799
+ let AmplifyGoogleButton = class AmplifyGoogleButton {
1800
+ constructor(c, r, z) {
1801
+ this.z = z;
1802
+ c.detach();
1803
+ this.el = r.nativeElement;
1804
+ }
1805
+ };
1806
+ AmplifyGoogleButton.decorators = [
1807
+ { type: Component, args: [{
1808
+ selector: 'amplify-google-button',
1809
+ changeDetection: ChangeDetectionStrategy.OnPush,
1810
+ template: '<ng-content></ng-content>',
1811
+ inputs: ['clientId', 'handleAuthStateChange']
1812
+ },] }
1813
+ ];
1814
+ AmplifyGoogleButton.ctorParameters = () => [
1815
+ { type: ChangeDetectorRef },
1816
+ { type: ElementRef },
1817
+ { type: NgZone }
1818
+ ];
1819
+ AmplifyGoogleButton = __decorate([
1820
+ ProxyCmp({ inputs: ['clientId', 'handleAuthStateChange'] })
1821
+ ], AmplifyGoogleButton);
1822
+ let AmplifyGreetings = class AmplifyGreetings {
1823
+ constructor(c, r, z) {
1824
+ this.z = z;
1825
+ c.detach();
1826
+ this.el = r.nativeElement;
1827
+ }
1828
+ };
1829
+ AmplifyGreetings.decorators = [
1830
+ { type: Component, args: [{
1831
+ selector: 'amplify-greetings',
1832
+ changeDetection: ChangeDetectionStrategy.OnPush,
1833
+ template: '<ng-content></ng-content>',
1834
+ inputs: ['handleAuthStateChange', 'logo', 'username']
1835
+ },] }
1836
+ ];
1837
+ AmplifyGreetings.ctorParameters = () => [
1838
+ { type: ChangeDetectorRef },
1839
+ { type: ElementRef },
1840
+ { type: NgZone }
1841
+ ];
1842
+ AmplifyGreetings = __decorate([
1843
+ ProxyCmp({ inputs: ['handleAuthStateChange', 'logo', 'username'] })
1844
+ ], AmplifyGreetings);
1845
+ class AmplifyHint {
1846
+ constructor(c, r, z) {
1847
+ this.z = z;
1848
+ c.detach();
1849
+ this.el = r.nativeElement;
1850
+ }
1851
+ }
1852
+ AmplifyHint.decorators = [
1853
+ { type: Component, args: [{
1854
+ selector: 'amplify-hint',
1855
+ changeDetection: ChangeDetectionStrategy.OnPush,
1856
+ template: '<ng-content></ng-content>'
1857
+ },] }
1858
+ ];
1859
+ AmplifyHint.ctorParameters = () => [
1860
+ { type: ChangeDetectorRef },
1861
+ { type: ElementRef },
1862
+ { type: NgZone }
1863
+ ];
1864
+ let AmplifyIcon = class AmplifyIcon {
1865
+ constructor(c, r, z) {
1866
+ this.z = z;
1867
+ c.detach();
1868
+ this.el = r.nativeElement;
1869
+ }
1870
+ };
1871
+ AmplifyIcon.decorators = [
1872
+ { type: Component, args: [{
1873
+ selector: 'amplify-icon',
1874
+ changeDetection: ChangeDetectionStrategy.OnPush,
1875
+ template: '<ng-content></ng-content>',
1876
+ inputs: ['name']
1877
+ },] }
1878
+ ];
1879
+ AmplifyIcon.ctorParameters = () => [
1880
+ { type: ChangeDetectorRef },
1881
+ { type: ElementRef },
1882
+ { type: NgZone }
1883
+ ];
1884
+ AmplifyIcon = __decorate([
1885
+ ProxyCmp({ inputs: ['name'] })
1886
+ ], AmplifyIcon);
1887
+ let AmplifyIconButton = class AmplifyIconButton {
1888
+ constructor(c, r, z) {
1889
+ this.z = z;
1890
+ c.detach();
1891
+ this.el = r.nativeElement;
1892
+ }
1893
+ };
1894
+ AmplifyIconButton.decorators = [
1895
+ { type: Component, args: [{
1896
+ selector: 'amplify-icon-button',
1897
+ changeDetection: ChangeDetectionStrategy.OnPush,
1898
+ template: '<ng-content></ng-content>',
1899
+ inputs: ['autoShowTooltip', 'name', 'tooltip']
1900
+ },] }
1901
+ ];
1902
+ AmplifyIconButton.ctorParameters = () => [
1903
+ { type: ChangeDetectorRef },
1904
+ { type: ElementRef },
1905
+ { type: NgZone }
1906
+ ];
1907
+ AmplifyIconButton = __decorate([
1908
+ ProxyCmp({ inputs: ['autoShowTooltip', 'name', 'tooltip'] })
1909
+ ], AmplifyIconButton);
1910
+ let AmplifyInput = class AmplifyInput {
1911
+ constructor(c, r, z) {
1912
+ this.z = z;
1913
+ c.detach();
1914
+ this.el = r.nativeElement;
1915
+ }
1916
+ };
1917
+ AmplifyInput.decorators = [
1918
+ { type: Component, args: [{
1919
+ selector: 'amplify-input',
1920
+ changeDetection: ChangeDetectionStrategy.OnPush,
1921
+ template: '<ng-content></ng-content>',
1922
+ inputs: [
1923
+ 'description',
1924
+ 'disabled',
1925
+ 'fieldId',
1926
+ 'handleInputChange',
1927
+ 'inputProps',
1928
+ 'name',
1929
+ 'placeholder',
1930
+ 'required',
1931
+ 'type',
1932
+ 'value',
1933
+ ]
1934
+ },] }
1935
+ ];
1936
+ AmplifyInput.ctorParameters = () => [
1937
+ { type: ChangeDetectorRef },
1938
+ { type: ElementRef },
1939
+ { type: NgZone }
1940
+ ];
1941
+ AmplifyInput = __decorate([
1942
+ ProxyCmp({
1943
+ inputs: [
1944
+ 'description',
1945
+ 'disabled',
1946
+ 'fieldId',
1947
+ 'handleInputChange',
1948
+ 'inputProps',
1949
+ 'name',
1950
+ 'placeholder',
1951
+ 'required',
1952
+ 'type',
1953
+ 'value',
1954
+ ],
1955
+ })
1956
+ ], AmplifyInput);
1957
+ let AmplifyLabel = class AmplifyLabel {
1958
+ constructor(c, r, z) {
1959
+ this.z = z;
1960
+ c.detach();
1961
+ this.el = r.nativeElement;
1962
+ }
1963
+ };
1964
+ AmplifyLabel.decorators = [
1965
+ { type: Component, args: [{
1966
+ selector: 'amplify-label',
1967
+ changeDetection: ChangeDetectionStrategy.OnPush,
1968
+ template: '<ng-content></ng-content>',
1969
+ inputs: ['htmlFor']
1970
+ },] }
1971
+ ];
1972
+ AmplifyLabel.ctorParameters = () => [
1973
+ { type: ChangeDetectorRef },
1974
+ { type: ElementRef },
1975
+ { type: NgZone }
1976
+ ];
1977
+ AmplifyLabel = __decorate([
1978
+ ProxyCmp({ inputs: ['htmlFor'] })
1979
+ ], AmplifyLabel);
1980
+ let AmplifyLink = class AmplifyLink {
1981
+ constructor(c, r, z) {
1982
+ this.z = z;
1983
+ c.detach();
1984
+ this.el = r.nativeElement;
1985
+ }
1986
+ };
1987
+ AmplifyLink.decorators = [
1988
+ { type: Component, args: [{
1989
+ selector: 'amplify-link',
1990
+ changeDetection: ChangeDetectionStrategy.OnPush,
1991
+ template: '<ng-content></ng-content>',
1992
+ inputs: ['role']
1993
+ },] }
1994
+ ];
1995
+ AmplifyLink.ctorParameters = () => [
1996
+ { type: ChangeDetectorRef },
1997
+ { type: ElementRef },
1998
+ { type: NgZone }
1999
+ ];
2000
+ AmplifyLink = __decorate([
2001
+ ProxyCmp({ inputs: ['role'] })
2002
+ ], AmplifyLink);
2003
+ class AmplifyLoadingSpinner {
2004
+ constructor(c, r, z) {
2005
+ this.z = z;
2006
+ c.detach();
2007
+ this.el = r.nativeElement;
2008
+ }
2009
+ }
2010
+ AmplifyLoadingSpinner.decorators = [
2011
+ { type: Component, args: [{
2012
+ selector: 'amplify-loading-spinner',
2013
+ changeDetection: ChangeDetectionStrategy.OnPush,
2014
+ template: '<ng-content></ng-content>'
2015
+ },] }
2016
+ ];
2017
+ AmplifyLoadingSpinner.ctorParameters = () => [
2018
+ { type: ChangeDetectorRef },
2019
+ { type: ElementRef },
2020
+ { type: NgZone }
2021
+ ];
2022
+ class AmplifyNav {
2023
+ constructor(c, r, z) {
2024
+ this.z = z;
2025
+ c.detach();
2026
+ this.el = r.nativeElement;
2027
+ }
2028
+ }
2029
+ AmplifyNav.decorators = [
2030
+ { type: Component, args: [{
2031
+ selector: 'amplify-nav',
2032
+ changeDetection: ChangeDetectionStrategy.OnPush,
2033
+ template: '<ng-content></ng-content>'
2034
+ },] }
2035
+ ];
2036
+ AmplifyNav.ctorParameters = () => [
2037
+ { type: ChangeDetectorRef },
2038
+ { type: ElementRef },
2039
+ { type: NgZone }
2040
+ ];
2041
+ let AmplifyOauthButton = class AmplifyOauthButton {
2042
+ constructor(c, r, z) {
2043
+ this.z = z;
2044
+ c.detach();
2045
+ this.el = r.nativeElement;
2046
+ }
2047
+ };
2048
+ AmplifyOauthButton.decorators = [
2049
+ { type: Component, args: [{
2050
+ selector: 'amplify-oauth-button',
2051
+ changeDetection: ChangeDetectionStrategy.OnPush,
2052
+ template: '<ng-content></ng-content>',
2053
+ inputs: ['config']
2054
+ },] }
2055
+ ];
2056
+ AmplifyOauthButton.ctorParameters = () => [
2057
+ { type: ChangeDetectorRef },
2058
+ { type: ElementRef },
2059
+ { type: NgZone }
2060
+ ];
2061
+ AmplifyOauthButton = __decorate([
2062
+ ProxyCmp({ inputs: ['config'] })
2063
+ ], AmplifyOauthButton);
2064
+ let AmplifyPasswordField = class AmplifyPasswordField {
2065
+ constructor(c, r, z) {
2066
+ this.z = z;
2067
+ c.detach();
2068
+ this.el = r.nativeElement;
2069
+ }
2070
+ };
2071
+ AmplifyPasswordField.decorators = [
2072
+ { type: Component, args: [{
2073
+ selector: 'amplify-password-field',
2074
+ changeDetection: ChangeDetectionStrategy.OnPush,
2075
+ template: '<ng-content></ng-content>',
2076
+ inputs: [
2077
+ 'disabled',
2078
+ 'fieldId',
2079
+ 'handleInputChange',
2080
+ 'hint',
2081
+ 'inputProps',
2082
+ 'label',
2083
+ 'placeholder',
2084
+ 'required',
2085
+ 'value',
2086
+ ]
2087
+ },] }
2088
+ ];
2089
+ AmplifyPasswordField.ctorParameters = () => [
2090
+ { type: ChangeDetectorRef },
2091
+ { type: ElementRef },
2092
+ { type: NgZone }
2093
+ ];
2094
+ AmplifyPasswordField = __decorate([
2095
+ ProxyCmp({
2096
+ inputs: [
2097
+ 'disabled',
2098
+ 'fieldId',
2099
+ 'handleInputChange',
2100
+ 'hint',
2101
+ 'inputProps',
2102
+ 'label',
2103
+ 'placeholder',
2104
+ 'required',
2105
+ 'value',
2106
+ ],
2107
+ })
2108
+ ], AmplifyPasswordField);
2109
+ let AmplifyPhoneField = class AmplifyPhoneField {
2110
+ constructor(c, r, z) {
2111
+ this.z = z;
2112
+ c.detach();
2113
+ this.el = r.nativeElement;
2114
+ }
2115
+ };
2116
+ AmplifyPhoneField.decorators = [
2117
+ { type: Component, args: [{
2118
+ selector: 'amplify-phone-field',
2119
+ changeDetection: ChangeDetectionStrategy.OnPush,
2120
+ template: '<ng-content></ng-content>',
2121
+ inputs: [
2122
+ 'dialCode',
2123
+ 'disabled',
2124
+ 'fieldId',
2125
+ 'handleInputChange',
2126
+ 'hint',
2127
+ 'inputProps',
2128
+ 'label',
2129
+ 'placeholder',
2130
+ 'required',
2131
+ 'value',
2132
+ ]
2133
+ },] }
2134
+ ];
2135
+ AmplifyPhoneField.ctorParameters = () => [
2136
+ { type: ChangeDetectorRef },
2137
+ { type: ElementRef },
2138
+ { type: NgZone }
2139
+ ];
2140
+ AmplifyPhoneField = __decorate([
2141
+ ProxyCmp({
2142
+ inputs: [
2143
+ 'dialCode',
2144
+ 'disabled',
2145
+ 'fieldId',
2146
+ 'handleInputChange',
2147
+ 'hint',
2148
+ 'inputProps',
2149
+ 'label',
2150
+ 'placeholder',
2151
+ 'required',
2152
+ 'value',
2153
+ ],
2154
+ })
2155
+ ], AmplifyPhoneField);
2156
+ let AmplifyPhotoPicker = class AmplifyPhotoPicker {
2157
+ constructor(c, r, z) {
2158
+ this.z = z;
2159
+ c.detach();
2160
+ this.el = r.nativeElement;
2161
+ }
2162
+ };
2163
+ AmplifyPhotoPicker.decorators = [
2164
+ { type: Component, args: [{
2165
+ selector: 'amplify-photo-picker',
2166
+ changeDetection: ChangeDetectionStrategy.OnPush,
2167
+ template: '<ng-content></ng-content>',
2168
+ inputs: [
2169
+ 'buttonText',
2170
+ 'handleClick',
2171
+ 'headerHint',
2172
+ 'headerTitle',
2173
+ 'placeholderHint',
2174
+ 'previewSrc',
2175
+ ]
2176
+ },] }
2177
+ ];
2178
+ AmplifyPhotoPicker.ctorParameters = () => [
2179
+ { type: ChangeDetectorRef },
2180
+ { type: ElementRef },
2181
+ { type: NgZone }
2182
+ ];
2183
+ AmplifyPhotoPicker = __decorate([
2184
+ ProxyCmp({
2185
+ inputs: [
2186
+ 'buttonText',
2187
+ 'handleClick',
2188
+ 'headerHint',
2189
+ 'headerTitle',
2190
+ 'placeholderHint',
2191
+ 'previewSrc',
2192
+ ],
2193
+ })
2194
+ ], AmplifyPhotoPicker);
2195
+ let AmplifyPicker = class AmplifyPicker {
2196
+ constructor(c, r, z) {
2197
+ this.z = z;
2198
+ c.detach();
2199
+ this.el = r.nativeElement;
2200
+ }
2201
+ };
2202
+ AmplifyPicker.decorators = [
2203
+ { type: Component, args: [{
2204
+ selector: 'amplify-picker',
2205
+ changeDetection: ChangeDetectionStrategy.OnPush,
2206
+ template: '<ng-content></ng-content>',
2207
+ inputs: ['acceptValue', 'inputHandler', 'pickerText']
2208
+ },] }
2209
+ ];
2210
+ AmplifyPicker.ctorParameters = () => [
2211
+ { type: ChangeDetectorRef },
2212
+ { type: ElementRef },
2213
+ { type: NgZone }
2214
+ ];
2215
+ AmplifyPicker = __decorate([
2216
+ ProxyCmp({ inputs: ['acceptValue', 'inputHandler', 'pickerText'] })
2217
+ ], AmplifyPicker);
2218
+ let AmplifyRadioButton = class AmplifyRadioButton {
2219
+ constructor(c, r, z) {
2220
+ this.z = z;
2221
+ c.detach();
2222
+ this.el = r.nativeElement;
2223
+ }
2224
+ };
2225
+ AmplifyRadioButton.decorators = [
2226
+ { type: Component, args: [{
2227
+ selector: 'amplify-radio-button',
2228
+ changeDetection: ChangeDetectionStrategy.OnPush,
2229
+ template: '<ng-content></ng-content>',
2230
+ inputs: [
2231
+ 'checked',
2232
+ 'disabled',
2233
+ 'fieldId',
2234
+ 'handleInputChange',
2235
+ 'inputProps',
2236
+ 'label',
2237
+ 'name',
2238
+ 'placeholder',
2239
+ 'value',
2240
+ ]
2241
+ },] }
2242
+ ];
2243
+ AmplifyRadioButton.ctorParameters = () => [
2244
+ { type: ChangeDetectorRef },
2245
+ { type: ElementRef },
2246
+ { type: NgZone }
2247
+ ];
2248
+ AmplifyRadioButton = __decorate([
2249
+ ProxyCmp({
2250
+ inputs: [
2251
+ 'checked',
2252
+ 'disabled',
2253
+ 'fieldId',
2254
+ 'handleInputChange',
2255
+ 'inputProps',
2256
+ 'label',
2257
+ 'name',
2258
+ 'placeholder',
2259
+ 'value',
2260
+ ],
2261
+ })
2262
+ ], AmplifyRadioButton);
2263
+ let AmplifyRequireNewPassword = class AmplifyRequireNewPassword {
2264
+ constructor(c, r, z) {
2265
+ this.z = z;
2266
+ c.detach();
2267
+ this.el = r.nativeElement;
2268
+ }
2269
+ };
2270
+ AmplifyRequireNewPassword.decorators = [
2271
+ { type: Component, args: [{
2272
+ selector: 'amplify-require-new-password',
2273
+ changeDetection: ChangeDetectionStrategy.OnPush,
2274
+ template: '<ng-content></ng-content>',
2275
+ inputs: [
2276
+ 'formFields',
2277
+ 'handleAuthStateChange',
2278
+ 'handleSubmit',
2279
+ 'headerText',
2280
+ 'submitButtonText',
2281
+ 'user',
2282
+ ]
2283
+ },] }
2284
+ ];
2285
+ AmplifyRequireNewPassword.ctorParameters = () => [
2286
+ { type: ChangeDetectorRef },
2287
+ { type: ElementRef },
2288
+ { type: NgZone }
2289
+ ];
2290
+ AmplifyRequireNewPassword = __decorate([
2291
+ ProxyCmp({
2292
+ inputs: [
2293
+ 'formFields',
2294
+ 'handleAuthStateChange',
2295
+ 'handleSubmit',
2296
+ 'headerText',
2297
+ 'submitButtonText',
2298
+ 'user',
2299
+ ],
2300
+ })
2301
+ ], AmplifyRequireNewPassword);
2302
+ let AmplifyS3Album = class AmplifyS3Album {
2303
+ constructor(c, r, z) {
2304
+ this.z = z;
2305
+ c.detach();
2306
+ this.el = r.nativeElement;
2307
+ }
2308
+ };
2309
+ AmplifyS3Album.decorators = [
2310
+ { type: Component, args: [{
2311
+ selector: 'amplify-s3-album',
2312
+ changeDetection: ChangeDetectionStrategy.OnPush,
2313
+ template: '<ng-content></ng-content>',
2314
+ inputs: [
2315
+ 'contentType',
2316
+ 'fileToKey',
2317
+ 'filter',
2318
+ 'handleOnError',
2319
+ 'handleOnLoad',
2320
+ 'identityId',
2321
+ 'level',
2322
+ 'path',
2323
+ 'picker',
2324
+ 'pickerText',
2325
+ 'sort',
2326
+ 'track',
2327
+ ]
2328
+ },] }
2329
+ ];
2330
+ AmplifyS3Album.ctorParameters = () => [
2331
+ { type: ChangeDetectorRef },
2332
+ { type: ElementRef },
2333
+ { type: NgZone }
2334
+ ];
2335
+ AmplifyS3Album = __decorate([
2336
+ ProxyCmp({
2337
+ inputs: [
2338
+ 'contentType',
2339
+ 'fileToKey',
2340
+ 'filter',
2341
+ 'handleOnError',
2342
+ 'handleOnLoad',
2343
+ 'identityId',
2344
+ 'level',
2345
+ 'path',
2346
+ 'picker',
2347
+ 'pickerText',
2348
+ 'sort',
2349
+ 'track',
2350
+ ],
2351
+ })
2352
+ ], AmplifyS3Album);
2353
+ let AmplifyS3Image = class AmplifyS3Image {
2354
+ constructor(c, r, z) {
2355
+ this.z = z;
2356
+ c.detach();
2357
+ this.el = r.nativeElement;
2358
+ }
2359
+ };
2360
+ AmplifyS3Image.decorators = [
2361
+ { type: Component, args: [{
2362
+ selector: 'amplify-s3-image',
2363
+ changeDetection: ChangeDetectionStrategy.OnPush,
2364
+ template: '<ng-content></ng-content>',
2365
+ inputs: [
2366
+ 'alt',
2367
+ 'body',
2368
+ 'contentType',
2369
+ 'handleOnError',
2370
+ 'handleOnLoad',
2371
+ 'identityId',
2372
+ 'imgKey',
2373
+ 'imgProps',
2374
+ 'level',
2375
+ 'path',
2376
+ 'track',
2377
+ ]
2378
+ },] }
2379
+ ];
2380
+ AmplifyS3Image.ctorParameters = () => [
2381
+ { type: ChangeDetectorRef },
2382
+ { type: ElementRef },
2383
+ { type: NgZone }
2384
+ ];
2385
+ AmplifyS3Image = __decorate([
2386
+ ProxyCmp({
2387
+ inputs: [
2388
+ 'alt',
2389
+ 'body',
2390
+ 'contentType',
2391
+ 'handleOnError',
2392
+ 'handleOnLoad',
2393
+ 'identityId',
2394
+ 'imgKey',
2395
+ 'imgProps',
2396
+ 'level',
2397
+ 'path',
2398
+ 'track',
2399
+ ],
2400
+ })
2401
+ ], AmplifyS3Image);
2402
+ let AmplifyS3ImagePicker = class AmplifyS3ImagePicker {
2403
+ constructor(c, r, z) {
2404
+ this.z = z;
2405
+ c.detach();
2406
+ this.el = r.nativeElement;
2407
+ }
2408
+ };
2409
+ AmplifyS3ImagePicker.decorators = [
2410
+ { type: Component, args: [{
2411
+ selector: 'amplify-s3-image-picker',
2412
+ changeDetection: ChangeDetectionStrategy.OnPush,
2413
+ template: '<ng-content></ng-content>',
2414
+ inputs: [
2415
+ 'buttonText',
2416
+ 'contentType',
2417
+ 'fileToKey',
2418
+ 'headerHint',
2419
+ 'headerTitle',
2420
+ 'identityId',
2421
+ 'level',
2422
+ 'path',
2423
+ 'placeholderHint',
2424
+ 'track',
2425
+ ]
2426
+ },] }
2427
+ ];
2428
+ AmplifyS3ImagePicker.ctorParameters = () => [
2429
+ { type: ChangeDetectorRef },
2430
+ { type: ElementRef },
2431
+ { type: NgZone }
2432
+ ];
2433
+ AmplifyS3ImagePicker = __decorate([
2434
+ ProxyCmp({
2435
+ inputs: [
2436
+ 'buttonText',
2437
+ 'contentType',
2438
+ 'fileToKey',
2439
+ 'headerHint',
2440
+ 'headerTitle',
2441
+ 'identityId',
2442
+ 'level',
2443
+ 'path',
2444
+ 'placeholderHint',
2445
+ 'track',
2446
+ ],
2447
+ })
2448
+ ], AmplifyS3ImagePicker);
2449
+ let AmplifyS3Text = class AmplifyS3Text {
2450
+ constructor(c, r, z) {
2451
+ this.z = z;
2452
+ c.detach();
2453
+ this.el = r.nativeElement;
2454
+ }
2455
+ };
2456
+ AmplifyS3Text.decorators = [
2457
+ { type: Component, args: [{
2458
+ selector: 'amplify-s3-text',
2459
+ changeDetection: ChangeDetectionStrategy.OnPush,
2460
+ template: '<ng-content></ng-content>',
2461
+ inputs: [
2462
+ 'body',
2463
+ 'contentType',
2464
+ 'fallbackText',
2465
+ 'identityId',
2466
+ 'level',
2467
+ 'path',
2468
+ 'textKey',
2469
+ 'track',
2470
+ ]
2471
+ },] }
2472
+ ];
2473
+ AmplifyS3Text.ctorParameters = () => [
2474
+ { type: ChangeDetectorRef },
2475
+ { type: ElementRef },
2476
+ { type: NgZone }
2477
+ ];
2478
+ AmplifyS3Text = __decorate([
2479
+ ProxyCmp({
2480
+ inputs: [
2481
+ 'body',
2482
+ 'contentType',
2483
+ 'fallbackText',
2484
+ 'identityId',
2485
+ 'level',
2486
+ 'path',
2487
+ 'textKey',
2488
+ 'track',
2489
+ ],
2490
+ })
2491
+ ], AmplifyS3Text);
2492
+ let AmplifyS3TextPicker = class AmplifyS3TextPicker {
2493
+ constructor(c, r, z) {
2494
+ this.z = z;
2495
+ c.detach();
2496
+ this.el = r.nativeElement;
2497
+ }
2498
+ };
2499
+ AmplifyS3TextPicker.decorators = [
2500
+ { type: Component, args: [{
2501
+ selector: 'amplify-s3-text-picker',
2502
+ changeDetection: ChangeDetectionStrategy.OnPush,
2503
+ template: '<ng-content></ng-content>',
2504
+ inputs: [
2505
+ 'contentType',
2506
+ 'fallbackText',
2507
+ 'fileToKey',
2508
+ 'identityId',
2509
+ 'level',
2510
+ 'path',
2511
+ 'track',
2512
+ ]
2513
+ },] }
2514
+ ];
2515
+ AmplifyS3TextPicker.ctorParameters = () => [
2516
+ { type: ChangeDetectorRef },
2517
+ { type: ElementRef },
2518
+ { type: NgZone }
2519
+ ];
2520
+ AmplifyS3TextPicker = __decorate([
2521
+ ProxyCmp({
2522
+ inputs: [
2523
+ 'contentType',
2524
+ 'fallbackText',
2525
+ 'fileToKey',
2526
+ 'identityId',
2527
+ 'level',
2528
+ 'path',
2529
+ 'track',
2530
+ ],
2531
+ })
2532
+ ], AmplifyS3TextPicker);
2533
+ let AmplifySection = class AmplifySection {
2534
+ constructor(c, r, z) {
2535
+ this.z = z;
2536
+ c.detach();
2537
+ this.el = r.nativeElement;
2538
+ }
2539
+ };
2540
+ AmplifySection.decorators = [
2541
+ { type: Component, args: [{
2542
+ selector: 'amplify-section',
2543
+ changeDetection: ChangeDetectionStrategy.OnPush,
2544
+ template: '<ng-content></ng-content>',
2545
+ inputs: ['role']
2546
+ },] }
2547
+ ];
2548
+ AmplifySection.ctorParameters = () => [
2549
+ { type: ChangeDetectorRef },
2550
+ { type: ElementRef },
2551
+ { type: NgZone }
2552
+ ];
2553
+ AmplifySection = __decorate([
2554
+ ProxyCmp({ inputs: ['role'] })
2555
+ ], AmplifySection);
2556
+ let AmplifySelect = class AmplifySelect {
2557
+ constructor(c, r, z) {
2558
+ this.z = z;
2559
+ c.detach();
2560
+ this.el = r.nativeElement;
2561
+ }
2562
+ };
2563
+ AmplifySelect.decorators = [
2564
+ { type: Component, args: [{
2565
+ selector: 'amplify-select',
2566
+ changeDetection: ChangeDetectionStrategy.OnPush,
2567
+ template: '<ng-content></ng-content>',
2568
+ inputs: ['fieldId', 'handleInputChange', 'options', 'selected']
2569
+ },] }
2570
+ ];
2571
+ AmplifySelect.ctorParameters = () => [
2572
+ { type: ChangeDetectorRef },
2573
+ { type: ElementRef },
2574
+ { type: NgZone }
2575
+ ];
2576
+ AmplifySelect = __decorate([
2577
+ ProxyCmp({ inputs: ['fieldId', 'handleInputChange', 'options', 'selected'] })
2578
+ ], AmplifySelect);
2579
+ let AmplifySelectMfaType = class AmplifySelectMfaType {
2580
+ constructor(c, r, z) {
2581
+ this.z = z;
2582
+ c.detach();
2583
+ this.el = r.nativeElement;
2584
+ }
2585
+ };
2586
+ AmplifySelectMfaType.decorators = [
2587
+ { type: Component, args: [{
2588
+ selector: 'amplify-select-mfa-type',
2589
+ changeDetection: ChangeDetectionStrategy.OnPush,
2590
+ template: '<ng-content></ng-content>',
2591
+ inputs: ['MFATypes', 'authData', 'handleSubmit']
2592
+ },] }
2593
+ ];
2594
+ AmplifySelectMfaType.ctorParameters = () => [
2595
+ { type: ChangeDetectorRef },
2596
+ { type: ElementRef },
2597
+ { type: NgZone }
2598
+ ];
2599
+ AmplifySelectMfaType = __decorate([
2600
+ ProxyCmp({ inputs: ['MFATypes', 'authData', 'handleSubmit'] })
2601
+ ], AmplifySelectMfaType);
2602
+ let AmplifySignIn = class AmplifySignIn {
2603
+ constructor(c, r, z) {
2604
+ this.z = z;
2605
+ c.detach();
2606
+ this.el = r.nativeElement;
2607
+ }
2608
+ };
2609
+ AmplifySignIn.decorators = [
2610
+ { type: Component, args: [{
2611
+ selector: 'amplify-sign-in',
2612
+ changeDetection: ChangeDetectionStrategy.OnPush,
2613
+ template: '<ng-content></ng-content>',
2614
+ inputs: [
2615
+ 'federated',
2616
+ 'formFields',
2617
+ 'handleAuthStateChange',
2618
+ 'handleSubmit',
2619
+ 'headerText',
2620
+ 'hideSignUp',
2621
+ 'submitButtonText',
2622
+ 'usernameAlias',
2623
+ ]
2624
+ },] }
2625
+ ];
2626
+ AmplifySignIn.ctorParameters = () => [
2627
+ { type: ChangeDetectorRef },
2628
+ { type: ElementRef },
2629
+ { type: NgZone }
2630
+ ];
2631
+ AmplifySignIn = __decorate([
2632
+ ProxyCmp({
2633
+ inputs: [
2634
+ 'federated',
2635
+ 'formFields',
2636
+ 'handleAuthStateChange',
2637
+ 'handleSubmit',
2638
+ 'headerText',
2639
+ 'hideSignUp',
2640
+ 'submitButtonText',
2641
+ 'usernameAlias',
2642
+ ],
2643
+ })
2644
+ ], AmplifySignIn);
2645
+ let AmplifySignInButton = class AmplifySignInButton {
2646
+ constructor(c, r, z) {
2647
+ this.z = z;
2648
+ c.detach();
2649
+ this.el = r.nativeElement;
2650
+ }
2651
+ };
2652
+ AmplifySignInButton.decorators = [
2653
+ { type: Component, args: [{
2654
+ selector: 'amplify-sign-in-button',
2655
+ changeDetection: ChangeDetectionStrategy.OnPush,
2656
+ template: '<ng-content></ng-content>',
2657
+ inputs: ['provider']
2658
+ },] }
2659
+ ];
2660
+ AmplifySignInButton.ctorParameters = () => [
2661
+ { type: ChangeDetectorRef },
2662
+ { type: ElementRef },
2663
+ { type: NgZone }
2664
+ ];
2665
+ AmplifySignInButton = __decorate([
2666
+ ProxyCmp({ inputs: ['provider'] })
2667
+ ], AmplifySignInButton);
2668
+ let AmplifySignOut = class AmplifySignOut {
2669
+ constructor(c, r, z) {
2670
+ this.z = z;
2671
+ c.detach();
2672
+ this.el = r.nativeElement;
2673
+ }
2674
+ };
2675
+ AmplifySignOut.decorators = [
2676
+ { type: Component, args: [{
2677
+ selector: 'amplify-sign-out',
2678
+ changeDetection: ChangeDetectionStrategy.OnPush,
2679
+ template: '<ng-content></ng-content>',
2680
+ inputs: ['buttonText', 'handleAuthStateChange']
2681
+ },] }
2682
+ ];
2683
+ AmplifySignOut.ctorParameters = () => [
2684
+ { type: ChangeDetectorRef },
2685
+ { type: ElementRef },
2686
+ { type: NgZone }
2687
+ ];
2688
+ AmplifySignOut = __decorate([
2689
+ ProxyCmp({ inputs: ['buttonText', 'handleAuthStateChange'] })
2690
+ ], AmplifySignOut);
2691
+ let AmplifySignUp = class AmplifySignUp {
2692
+ constructor(c, r, z) {
2693
+ this.z = z;
2694
+ c.detach();
2695
+ this.el = r.nativeElement;
2696
+ }
2697
+ };
2698
+ AmplifySignUp.decorators = [
2699
+ { type: Component, args: [{
2700
+ selector: 'amplify-sign-up',
2701
+ changeDetection: ChangeDetectionStrategy.OnPush,
2702
+ template: '<ng-content></ng-content>',
2703
+ inputs: [
2704
+ 'formFields',
2705
+ 'handleAuthStateChange',
2706
+ 'handleSignUp',
2707
+ 'handleSubmit',
2708
+ 'haveAccountText',
2709
+ 'headerText',
2710
+ 'signInText',
2711
+ 'submitButtonText',
2712
+ 'usernameAlias',
2713
+ 'validationErrors',
2714
+ ]
2715
+ },] }
2716
+ ];
2717
+ AmplifySignUp.ctorParameters = () => [
2718
+ { type: ChangeDetectorRef },
2719
+ { type: ElementRef },
2720
+ { type: NgZone }
2721
+ ];
2722
+ AmplifySignUp = __decorate([
2723
+ ProxyCmp({
2724
+ inputs: [
2725
+ 'formFields',
2726
+ 'handleAuthStateChange',
2727
+ 'handleSignUp',
2728
+ 'handleSubmit',
2729
+ 'haveAccountText',
2730
+ 'headerText',
2731
+ 'signInText',
2732
+ 'submitButtonText',
2733
+ 'usernameAlias',
2734
+ 'validationErrors',
2735
+ ],
2736
+ })
2737
+ ], AmplifySignUp);
2738
+ class AmplifyStrike {
2739
+ constructor(c, r, z) {
2740
+ this.z = z;
2741
+ c.detach();
2742
+ this.el = r.nativeElement;
2743
+ }
2744
+ }
2745
+ AmplifyStrike.decorators = [
2746
+ { type: Component, args: [{
2747
+ selector: 'amplify-strike',
2748
+ changeDetection: ChangeDetectionStrategy.OnPush,
2749
+ template: '<ng-content></ng-content>'
2750
+ },] }
2751
+ ];
2752
+ AmplifyStrike.ctorParameters = () => [
2753
+ { type: ChangeDetectorRef },
2754
+ { type: ElementRef },
2755
+ { type: NgZone }
2756
+ ];
2757
+ let AmplifyToast = class AmplifyToast {
2758
+ constructor(c, r, z) {
2759
+ this.z = z;
2760
+ c.detach();
2761
+ this.el = r.nativeElement;
2762
+ }
2763
+ };
2764
+ AmplifyToast.decorators = [
2765
+ { type: Component, args: [{
2766
+ selector: 'amplify-toast',
2767
+ changeDetection: ChangeDetectionStrategy.OnPush,
2768
+ template: '<ng-content></ng-content>',
2769
+ inputs: ['handleClose', 'message']
2770
+ },] }
2771
+ ];
2772
+ AmplifyToast.ctorParameters = () => [
2773
+ { type: ChangeDetectorRef },
2774
+ { type: ElementRef },
2775
+ { type: NgZone }
2776
+ ];
2777
+ AmplifyToast = __decorate([
2778
+ ProxyCmp({ inputs: ['handleClose', 'message'] })
2779
+ ], AmplifyToast);
2780
+ let AmplifyTooltip = class AmplifyTooltip {
2781
+ constructor(c, r, z) {
2782
+ this.z = z;
2783
+ c.detach();
2784
+ this.el = r.nativeElement;
2785
+ }
2786
+ };
2787
+ AmplifyTooltip.decorators = [
2788
+ { type: Component, args: [{
2789
+ selector: 'amplify-tooltip',
2790
+ changeDetection: ChangeDetectionStrategy.OnPush,
2791
+ template: '<ng-content></ng-content>',
2792
+ inputs: ['shouldAutoShow', 'text']
2793
+ },] }
2794
+ ];
2795
+ AmplifyTooltip.ctorParameters = () => [
2796
+ { type: ChangeDetectorRef },
2797
+ { type: ElementRef },
2798
+ { type: NgZone }
2799
+ ];
2800
+ AmplifyTooltip = __decorate([
2801
+ ProxyCmp({ inputs: ['shouldAutoShow', 'text'] })
2802
+ ], AmplifyTooltip);
2803
+ let AmplifyTotpSetup = class AmplifyTotpSetup {
2804
+ constructor(c, r, z) {
2805
+ this.z = z;
2806
+ c.detach();
2807
+ this.el = r.nativeElement;
2808
+ }
2809
+ };
2810
+ AmplifyTotpSetup.decorators = [
2811
+ { type: Component, args: [{
2812
+ selector: 'amplify-totp-setup',
2813
+ changeDetection: ChangeDetectionStrategy.OnPush,
2814
+ template: '<ng-content></ng-content>',
2815
+ inputs: [
2816
+ 'handleAuthStateChange',
2817
+ 'handleComplete',
2818
+ 'headerText',
2819
+ 'issuer',
2820
+ 'standalone',
2821
+ 'user',
2822
+ ]
2823
+ },] }
2824
+ ];
2825
+ AmplifyTotpSetup.ctorParameters = () => [
2826
+ { type: ChangeDetectorRef },
2827
+ { type: ElementRef },
2828
+ { type: NgZone }
2829
+ ];
2830
+ AmplifyTotpSetup = __decorate([
2831
+ ProxyCmp({
2832
+ inputs: [
2833
+ 'handleAuthStateChange',
2834
+ 'handleComplete',
2835
+ 'headerText',
2836
+ 'issuer',
2837
+ 'standalone',
2838
+ 'user',
2839
+ ],
2840
+ })
2841
+ ], AmplifyTotpSetup);
2842
+ let AmplifyUsernameField = class AmplifyUsernameField {
2843
+ constructor(c, r, z) {
2844
+ this.z = z;
2845
+ c.detach();
2846
+ this.el = r.nativeElement;
2847
+ }
2848
+ };
2849
+ AmplifyUsernameField.decorators = [
2850
+ { type: Component, args: [{
2851
+ selector: 'amplify-username-field',
2852
+ changeDetection: ChangeDetectionStrategy.OnPush,
2853
+ template: '<ng-content></ng-content>',
2854
+ inputs: [
2855
+ 'disabled',
2856
+ 'fieldId',
2857
+ 'handleInputChange',
2858
+ 'hint',
2859
+ 'inputProps',
2860
+ 'label',
2861
+ 'placeholder',
2862
+ 'required',
2863
+ 'value',
2864
+ ]
2865
+ },] }
2866
+ ];
2867
+ AmplifyUsernameField.ctorParameters = () => [
2868
+ { type: ChangeDetectorRef },
2869
+ { type: ElementRef },
2870
+ { type: NgZone }
2871
+ ];
2872
+ AmplifyUsernameField = __decorate([
2873
+ ProxyCmp({
2874
+ inputs: [
2875
+ 'disabled',
2876
+ 'fieldId',
2877
+ 'handleInputChange',
2878
+ 'hint',
2879
+ 'inputProps',
2880
+ 'label',
2881
+ 'placeholder',
2882
+ 'required',
2883
+ 'value',
2884
+ ],
2885
+ })
2886
+ ], AmplifyUsernameField);
2887
+ let AmplifyVerifyContact = class AmplifyVerifyContact {
2888
+ constructor(c, r, z) {
2889
+ this.z = z;
2890
+ c.detach();
2891
+ this.el = r.nativeElement;
2892
+ }
2893
+ };
2894
+ AmplifyVerifyContact.decorators = [
2895
+ { type: Component, args: [{
2896
+ selector: 'amplify-verify-contact',
2897
+ changeDetection: ChangeDetectionStrategy.OnPush,
2898
+ template: '<ng-content></ng-content>',
2899
+ inputs: ['handleAuthStateChange', 'user']
2900
+ },] }
2901
+ ];
2902
+ AmplifyVerifyContact.ctorParameters = () => [
2903
+ { type: ChangeDetectorRef },
2904
+ { type: ElementRef },
2905
+ { type: NgZone }
2906
+ ];
2907
+ AmplifyVerifyContact = __decorate([
2908
+ ProxyCmp({ inputs: ['handleAuthStateChange', 'user'] })
2909
+ ], AmplifyVerifyContact);
2910
+
2911
+ customElements.define('amplify-button', AmplifyButton$1);
2912
+ customElements.define('amplify-input', AmplifyInput$1);
2913
+ customElements.define('amplify-toast', AmplifyToast$1);
2914
+ customElements.define('amplify-chatbot', AmplifyChatbot$1);
2915
+ customElements.define('amplify-s3-album', AmplifyS3Album$1);
2916
+ customElements.define('amplify-s3-image-picker', AmplifyS3ImagePicker$1);
2917
+ customElements.define('amplify-s3-text', AmplifyS3Text$1);
2918
+ customElements.define('amplify-s3-text-picker', AmplifyS3TextPicker$1);
2919
+ customElements.define('amplify-s3-image', AmplifyS3Image$1);
2920
+ customElements.define('amplify-picker', AmplifyPicker$1);
2921
+ customElements.define('amplify-photo-picker', AmplifyPhotoPicker$1);
2922
+ class UiAngularModule {
2923
+ }
2924
+ UiAngularModule.decorators = [
2925
+ { type: NgModule, args: [{
2926
+ declarations: [
2927
+ AmplifyChatbot,
2928
+ AmplifyToast,
2929
+ AmplifyInput,
2930
+ AmplifyButton,
2931
+ AmplifyS3Album,
2932
+ AmplifyS3ImagePicker,
2933
+ AmplifyS3Text,
2934
+ AmplifyS3TextPicker,
2935
+ AmplifyS3Image,
2936
+ AmplifyPicker,
2937
+ AmplifyPhotoPicker,
2938
+ AmplifyAuthenticatorComponent,
2939
+ AmplifySignInComponent,
2940
+ AmplifySignUpComponent,
2941
+ AmplifyInputComponent,
2942
+ AmplifyErrorComponent,
2943
+ AmplifyOverrideDirective,
2944
+ AmplifyConfirmSignUpComponent,
2945
+ AmplifyUserNameAliasComponent,
2946
+ AmplifyConfirmSignInComponent,
2947
+ AmplifySetupTotpComponent,
2948
+ AmplifyForceNewPasswordComponent,
2949
+ AmplifyFederatedSignInComponent,
2950
+ AmplifyFederatedSignInButtonComponent,
2951
+ AmplifyResetPasswordComponent,
2952
+ AmplifyVerifyUserComponent,
2953
+ ConfirmResetPasswordComponent,
2954
+ ConfirmVerifyUserComponent,
2955
+ AmplifySelectComponent,
2956
+ ],
2957
+ imports: [CommonModule],
2958
+ exports: [
2959
+ AmplifyChatbot,
2960
+ AmplifyToast,
2961
+ AmplifyInput,
2962
+ AmplifyButton,
2963
+ AmplifyS3Album,
2964
+ AmplifyS3ImagePicker,
2965
+ AmplifyS3Text,
2966
+ AmplifyS3TextPicker,
2967
+ AmplifyS3Image,
2968
+ AmplifyPicker,
2969
+ AmplifyPhotoPicker,
2970
+ AmplifyAuthenticatorComponent,
2971
+ AmplifySignInComponent,
2972
+ AmplifyInputComponent,
2973
+ AmplifyErrorComponent,
2974
+ AmplifyOverrideDirective,
2975
+ ],
2976
+ schemas: [CUSTOM_ELEMENTS_SCHEMA],
2977
+ },] }
2978
+ ];
2979
+
2980
+ /*
2981
+ * Public API Surface of ui-angular
2982
+ */
2983
+
2984
+ /**
2985
+ * Generated bundle index. Do not edit.
2986
+ */
2987
+
2988
+ export { AmplifyAuthenticatorComponent, AmplifyButton, AmplifyChatbot, AmplifyConfirmSignInComponent, AmplifyConfirmSignUpComponent, AmplifyErrorComponent, AmplifyFederatedSignInButtonComponent, AmplifyFederatedSignInComponent, AmplifyForceNewPasswordComponent, AmplifyInput, AmplifyInputComponent, AmplifyOverrideDirective, AmplifyPhotoPicker, AmplifyPicker, AmplifyResetPasswordComponent, AmplifyS3Album, AmplifyS3Image, AmplifyS3ImagePicker, AmplifyS3Text, AmplifyS3TextPicker, AmplifySetupTotpComponent, AmplifySignInComponent, AmplifySignUpComponent, AmplifyToast, AmplifyVerifyUserComponent, AuthPropService, ConfirmResetPasswordComponent, ConfirmVerifyUserComponent, StateMachineService, UiAngularModule, getAttributeMap, ProxyCmp as ɵa, AmplifyAuthenticatorComponent as ɵb, AmplifySignInComponent as ɵc, AmplifySignUpComponent as ɵd, AmplifyInputComponent as ɵe, AmplifyErrorComponent as ɵf, AmplifyConfirmSignUpComponent as ɵg, AmplifyUserNameAliasComponent as ɵh, AmplifyConfirmSignInComponent as ɵi, AmplifySetupTotpComponent as ɵj, AmplifyForceNewPasswordComponent as ɵk, AmplifyFederatedSignInComponent as ɵl, AmplifyFederatedSignInButtonComponent as ɵm, AmplifyResetPasswordComponent as ɵn, AmplifyVerifyUserComponent as ɵo, ConfirmResetPasswordComponent as ɵp, ConfirmVerifyUserComponent as ɵq, AmplifySelectComponent as ɵr };
2989
+ //# sourceMappingURL=aws-amplify-ui-angular.js.map