@aws-amplify/ui-angular 0.0.0-next-poc-202198192630

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 (84) hide show
  1. package/aws-amplify-ui-angular.d.ts +28 -0
  2. package/aws-amplify-ui-angular.metadata.json +1 -0
  3. package/bundles/aws-amplify-ui-angular.umd.js +3818 -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 +29 -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 +85 -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 +83 -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 +78 -0
  23. package/esm2015/lib/components/amplify-sign-up/amplify-sign-up.component.js +97 -0
  24. package/esm2015/lib/components/amplify-verify-user/amplify-verify-user.component.js +78 -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 +66 -0
  27. package/esm2015/lib/components/index.js +14 -0
  28. package/esm2015/lib/directives/amplify-slot.directive.js +21 -0
  29. package/esm2015/lib/primitives/amplify-button/amplify-button.component.js +38 -0
  30. package/esm2015/lib/primitives/amplify-error/amplify-error.component.js +10 -0
  31. package/esm2015/lib/primitives/amplify-form-field/amplify-form-field.component.js +91 -0
  32. package/esm2015/lib/primitives/amplify-password-field/amplify-password-field.component.js +39 -0
  33. package/esm2015/lib/primitives/amplify-select/amplify-select.component.js +17 -0
  34. package/esm2015/lib/primitives/amplify-text-field/amplify-text-field.component.js +29 -0
  35. package/esm2015/lib/primitives/amplify-user-name-alias/amplify-user-name-alias.component.js +35 -0
  36. package/esm2015/lib/primitives/index.js +3 -0
  37. package/esm2015/lib/primitives/phone-number-field/phone-number-field.component.js +33 -0
  38. package/esm2015/lib/primitives/tab-item/tab-item.component.js +20 -0
  39. package/esm2015/lib/primitives/tabs/tabs.component.js +45 -0
  40. package/esm2015/lib/proxies.js +1839 -0
  41. package/esm2015/lib/services/authenticator-context.service.js +28 -0
  42. package/esm2015/lib/services/state-machine.service.js +51 -0
  43. package/esm2015/lib/ui-angular.module.js +103 -0
  44. package/fesm2015/aws-amplify-ui-angular.js +3209 -0
  45. package/fesm2015/aws-amplify-ui-angular.js.map +1 -0
  46. package/index.d.ts +8 -0
  47. package/lib/common/helpers.d.ts +2 -0
  48. package/lib/common/index.d.ts +2 -0
  49. package/lib/common/types/auth-types.d.ts +6 -0
  50. package/lib/common/types/component-types.d.ts +23 -0
  51. package/lib/common/types/index.d.ts +2 -0
  52. package/lib/components/amplify-authenticator/amplify-authenticator.component.d.ts +35 -0
  53. package/lib/components/amplify-confirm-sign-in/amplify-confirm-sign-in.component.d.ts +31 -0
  54. package/lib/components/amplify-confirm-sign-up/amplify-confirm-sign-up.component.d.ts +34 -0
  55. package/lib/components/amplify-federated-sign-in/amplify-federated-sign-in.component.d.ts +16 -0
  56. package/lib/components/amplify-federated-sign-in-button/amplify-federated-sign-in-button.component.d.ts +9 -0
  57. package/lib/components/amplify-force-new-password/amplify-force-new-password.component.d.ts +31 -0
  58. package/lib/components/amplify-reset-password/amplify-reset-password.component.d.ts +30 -0
  59. package/lib/components/amplify-setup-totp/amplify-setup-totp.component.d.ts +31 -0
  60. package/lib/components/amplify-sign-in/amplify-sign-in.component.d.ts +32 -0
  61. package/lib/components/amplify-sign-up/amplify-sign-up.component.d.ts +32 -0
  62. package/lib/components/amplify-verify-user/amplify-verify-user.component.d.ts +32 -0
  63. package/lib/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +34 -0
  64. package/lib/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +28 -0
  65. package/lib/components/index.d.ts +13 -0
  66. package/lib/directives/amplify-slot.directive.d.ts +7 -0
  67. package/lib/primitives/amplify-button/amplify-button.component.d.ts +15 -0
  68. package/lib/primitives/amplify-error/amplify-error.component.d.ts +2 -0
  69. package/lib/primitives/amplify-form-field/amplify-form-field.component.d.ts +34 -0
  70. package/lib/primitives/amplify-password-field/amplify-password-field.component.d.ts +14 -0
  71. package/lib/primitives/amplify-select/amplify-select.component.d.ts +7 -0
  72. package/lib/primitives/amplify-text-field/amplify-text-field.component.d.ts +11 -0
  73. package/lib/primitives/amplify-user-name-alias/amplify-user-name-alias.component.d.ts +15 -0
  74. package/lib/primitives/index.d.ts +2 -0
  75. package/lib/primitives/phone-number-field/phone-number-field.component.d.ts +14 -0
  76. package/lib/primitives/tab-item/tab-item.component.d.ts +7 -0
  77. package/lib/primitives/tabs/tabs.component.d.ts +9 -0
  78. package/lib/proxies.d.ts +395 -0
  79. package/lib/services/authenticator-context.service.d.ts +10 -0
  80. package/lib/services/state-machine.service.d.ts +29 -0
  81. package/lib/ui-angular.module.d.ts +2 -0
  82. package/package.json +29 -0
  83. package/styles/component.css +169 -0
  84. package/theme.css +2 -0
@@ -0,0 +1,3818 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@aws-amplify/ui'), require('aws-amplify'), require('xstate'), require('qrcode'), require('lodash'), require('nanoid'), require('rxjs'), require('@aws-amplify/ui-components/dist/components')) :
3
+ typeof define === 'function' && define.amd ? define('@aws-amplify/ui-angular', ['exports', '@angular/core', '@angular/common', '@aws-amplify/ui', 'aws-amplify', 'xstate', 'qrcode', 'lodash', 'nanoid', 'rxjs', '@aws-amplify/ui-components/dist/components'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["aws-amplify"] = global["aws-amplify"] || {}, global["aws-amplify"]["ui-angular"] = {}), global.ng.core, global.ng.common, global.ui, global["aws-amplify"], global.xstate, global.QRCode, global.lodash, global.nanoid, global.rxjs, global.components));
5
+ })(this, (function (exports, i0, common, ui, awsAmplify, xstate, QRCode, lodash, nanoid, rxjs, components) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n["default"] = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
+ var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode);
29
+
30
+ var AmplifySlotDirective = /** @class */ (function () {
31
+ function AmplifySlotDirective(template) {
32
+ this.template = template;
33
+ }
34
+ Object.defineProperty(AmplifySlotDirective.prototype, "amplifySlot", {
35
+ set: function (component) {
36
+ this.name = component;
37
+ },
38
+ enumerable: false,
39
+ configurable: true
40
+ });
41
+ return AmplifySlotDirective;
42
+ }());
43
+ AmplifySlotDirective.decorators = [
44
+ { type: i0.Directive, args: [{
45
+ selector: '[amplifySlot]',
46
+ },] }
47
+ ];
48
+ AmplifySlotDirective.ctorParameters = function () { return [
49
+ { type: i0.TemplateRef }
50
+ ]; };
51
+ AmplifySlotDirective.propDecorators = {
52
+ amplifySlot: [{ type: i0.Input }]
53
+ };
54
+
55
+ var AuthPropService = /** @class */ (function () {
56
+ function AuthPropService() {
57
+ this._customComponents = {};
58
+ this._props = {};
59
+ }
60
+ Object.defineProperty(AuthPropService.prototype, "customComponents", {
61
+ get: function () {
62
+ return this._customComponents;
63
+ },
64
+ set: function (customComponents) {
65
+ this._customComponents = Object.assign(Object.assign({}, this._customComponents), customComponents);
66
+ },
67
+ enumerable: false,
68
+ configurable: true
69
+ });
70
+ Object.defineProperty(AuthPropService.prototype, "props", {
71
+ get: function () {
72
+ return this._props;
73
+ },
74
+ set: function (props) {
75
+ this._props = Object.assign(Object.assign({}, this._props), props);
76
+ },
77
+ enumerable: false,
78
+ configurable: true
79
+ });
80
+ return AuthPropService;
81
+ }());
82
+ AuthPropService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AuthPropService_Factory() { return new AuthPropService(); }, token: AuthPropService, providedIn: "root" });
83
+ AuthPropService.decorators = [
84
+ { type: i0.Injectable, args: [{
85
+ providedIn: 'root',
86
+ },] }
87
+ ];
88
+ AuthPropService.ctorParameters = function () { return []; };
89
+
90
+ /**
91
+ * AmplifyContextService contains access to the xstate machine
92
+ * and custom components passed by the user.
93
+ */
94
+ var StateMachineService = /** @class */ (function () {
95
+ function StateMachineService() {
96
+ }
97
+ StateMachineService.prototype.startMachine = function (_a) {
98
+ var _this = this;
99
+ var initialState = _a.initialState, loginMechanisms = _a.loginMechanisms;
100
+ var machine = ui.createAuthenticatorMachine({
101
+ initialState: initialState,
102
+ loginMechanisms: loginMechanisms,
103
+ });
104
+ var authService = xstate.interpret(machine, {
105
+ devTools: process.env.NODE_ENV === 'development',
106
+ })
107
+ .onTransition(function (state) {
108
+ _this._user = state.context.user;
109
+ _this._authState = state;
110
+ })
111
+ .start();
112
+ this._services = ui.getSendEventAliases(authService.send);
113
+ this._authService = authService;
114
+ };
115
+ Object.defineProperty(StateMachineService.prototype, "services", {
116
+ get: function () {
117
+ return this._services;
118
+ },
119
+ enumerable: false,
120
+ configurable: true
121
+ });
122
+ Object.defineProperty(StateMachineService.prototype, "authState", {
123
+ get: function () {
124
+ return this._authState;
125
+ },
126
+ enumerable: false,
127
+ configurable: true
128
+ });
129
+ Object.defineProperty(StateMachineService.prototype, "authService", {
130
+ get: function () {
131
+ return this._authService;
132
+ },
133
+ enumerable: false,
134
+ configurable: true
135
+ });
136
+ Object.defineProperty(StateMachineService.prototype, "user", {
137
+ get: function () {
138
+ return this._user;
139
+ },
140
+ enumerable: false,
141
+ configurable: true
142
+ });
143
+ Object.defineProperty(StateMachineService.prototype, "context", {
144
+ get: function () {
145
+ return this._authState.context;
146
+ },
147
+ enumerable: false,
148
+ configurable: true
149
+ });
150
+ StateMachineService.prototype.send = function (event) {
151
+ this.authService.send(event);
152
+ };
153
+ return StateMachineService;
154
+ }());
155
+ StateMachineService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function StateMachineService_Factory() { return new StateMachineService(); }, token: StateMachineService, providedIn: "root" });
156
+ StateMachineService.decorators = [
157
+ { type: i0.Injectable, args: [{
158
+ providedIn: 'root',
159
+ },] }
160
+ ];
161
+
162
+ var AmplifyAuthenticatorComponent = /** @class */ (function () {
163
+ function AmplifyAuthenticatorComponent(stateMachine, contextService) {
164
+ this.stateMachine = stateMachine;
165
+ this.contextService = contextService;
166
+ this.customComponentQuery = null;
167
+ this.customComponents = {};
168
+ // translated texts
169
+ this.signInTitle = ui.translate('Sign In');
170
+ this.signUpTitle = ui.translate('Create Account');
171
+ }
172
+ AmplifyAuthenticatorComponent.prototype.ngOnInit = function () {
173
+ awsAmplify.I18n.putVocabularies(ui.translations);
174
+ var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms;
175
+ this.stateMachine.startMachine({ initialState: initialState, loginMechanisms: loginMechanisms });
176
+ /**
177
+ * handling translations after content init, because authenticator and its
178
+ * translations might be initialized before the main app's `ngOnInit` is run.
179
+ **/
180
+ this.signInTitle = ui.translate('Sign In');
181
+ this.signUpTitle = ui.translate('Create Account');
182
+ };
183
+ /**
184
+ * Lifecycle Methods
185
+ */
186
+ AmplifyAuthenticatorComponent.prototype.ngAfterContentInit = function () {
187
+ this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
188
+ this.customComponents = this.contextService.customComponents;
189
+ };
190
+ Object.defineProperty(AmplifyAuthenticatorComponent.prototype, "context", {
191
+ /**
192
+ * Class Functions
193
+ */
194
+ get: function () {
195
+ var signOut = this.stateMachine.services.signOut;
196
+ var user = this.stateMachine.user;
197
+ return { signOut: signOut, user: user };
198
+ },
199
+ enumerable: false,
200
+ configurable: true
201
+ });
202
+ Object.defineProperty(AmplifyAuthenticatorComponent.prototype, "actorState", {
203
+ get: function () {
204
+ return ui.getActorState(this.stateMachine.authState);
205
+ },
206
+ enumerable: false,
207
+ configurable: true
208
+ });
209
+ Object.defineProperty(AmplifyAuthenticatorComponent.prototype, "authenticatorState", {
210
+ get: function () {
211
+ return this.stateMachine.authState;
212
+ },
213
+ enumerable: false,
214
+ configurable: true
215
+ });
216
+ AmplifyAuthenticatorComponent.prototype.onTabChange = function () {
217
+ var currentState = this.stateMachine.authState.value;
218
+ if (currentState === 'signIn') {
219
+ this.stateMachine.send('SIGN_UP');
220
+ }
221
+ else {
222
+ this.stateMachine.send('SIGN_IN');
223
+ }
224
+ };
225
+ AmplifyAuthenticatorComponent.prototype.mapCustomComponents = function (componentQuery) {
226
+ if (!componentQuery)
227
+ return {};
228
+ var customComponents = {};
229
+ componentQuery.forEach(function (component) {
230
+ customComponents[component.name] = component.template;
231
+ });
232
+ return customComponents;
233
+ };
234
+ return AmplifyAuthenticatorComponent;
235
+ }());
236
+ AmplifyAuthenticatorComponent.decorators = [
237
+ { type: i0.Component, args: [{
238
+ selector: 'amplify-authenticator',
239
+ 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<div data-amplify-authenticator>\n <div data-amplify-modal></div>\n\n <div data-amplify-container>\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"actorState?.matches('signIn') || actorState?.matches('signUp')\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"actorState?.matches('signIn')\"\n >\n <!-- signIn component -->\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signIn || signIn\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('signIn')\"\n ></ng-container>\n </amplify-tab-item>\n <amplify-tab-item\n [title]=\"signUpTitle\"\n [active]=\"actorState?.matches('signUp')\"\n >\n <!-- signUp component -->\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUp || signUp\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('signUp')\"\n ></ng-container>\n </amplify-tab-item>\n </amplify-tabs>\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]=\"\n customComponents.confirmVerifyUser || confirmVerifyUser\n \"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"actorState?.matches('confirmVerifyUser')\"\n >\n </ng-container>\n </div>\n</div>\n\n<!-- signedIn content is rendered outside authenticator so it's not styled by authenticator -->\n<ng-container\n [ngTemplateOutlet]=\"customComponents.authenticated || authenticated\"\n [ngTemplateOutletContext]=\"context\"\n *ngIf=\"authenticatorState.matches('authenticated')\"\n>\n</ng-container>\n",
240
+ providers: [AuthPropService],
241
+ encapsulation: i0.ViewEncapsulation.None
242
+ },] }
243
+ ];
244
+ AmplifyAuthenticatorComponent.ctorParameters = function () { return [
245
+ { type: StateMachineService },
246
+ { type: AuthPropService }
247
+ ]; };
248
+ AmplifyAuthenticatorComponent.propDecorators = {
249
+ initialState: [{ type: i0.Input }],
250
+ loginMechanisms: [{ type: i0.Input }],
251
+ customComponentQuery: [{ type: i0.ContentChildren, args: [AmplifySlotDirective,] }]
252
+ };
253
+
254
+ var logger$3 = new awsAmplify.Logger('ConfirmSignIn');
255
+ var AmplifyConfirmSignInComponent = /** @class */ (function () {
256
+ function AmplifyConfirmSignInComponent(stateMachine, contextService) {
257
+ this.stateMachine = stateMachine;
258
+ this.contextService = contextService;
259
+ this.dataAttr = '';
260
+ this.customComponents = {};
261
+ this.remoteError = '';
262
+ this.isPending = false;
263
+ this.confirmText = ui.translate('Confirm');
264
+ this.backToSignInText = ui.translate('Back to Sign In');
265
+ }
266
+ AmplifyConfirmSignInComponent.prototype.ngOnInit = function () {
267
+ var _this = this;
268
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) {
269
+ _this.onStateUpdate(state);
270
+ });
271
+ this.setHeaderText();
272
+ };
273
+ AmplifyConfirmSignInComponent.prototype.ngAfterContentInit = function () {
274
+ this.customComponents = this.contextService.customComponents;
275
+ };
276
+ AmplifyConfirmSignInComponent.prototype.ngOnDestroy = function () {
277
+ this.authSubscription.unsubscribe();
278
+ };
279
+ Object.defineProperty(AmplifyConfirmSignInComponent.prototype, "context", {
280
+ get: function () {
281
+ var _a = this.stateMachine.services, change = _a.change, signIn = _a.signIn, submit = _a.submit;
282
+ var remoteError = this.remoteError;
283
+ return { change: change, remoteError: remoteError, signIn: signIn, submit: submit };
284
+ },
285
+ enumerable: false,
286
+ configurable: true
287
+ });
288
+ AmplifyConfirmSignInComponent.prototype.setHeaderText = function () {
289
+ var state = this.stateMachine.authState;
290
+ var actorContext = ui.getActorContext(state);
291
+ var challengeName = actorContext.challengeName;
292
+ switch (challengeName) {
293
+ case ui.AuthChallengeNames.SOFTWARE_TOKEN_MFA:
294
+ // TODO: this string should be centralized and translated from ui.
295
+ this.headerText = ui.translate('Confirm TOTP Code');
296
+ break;
297
+ case ui.AuthChallengeNames.SMS_MFA:
298
+ this.headerText = ui.translate('Confirm SMS Code');
299
+ break;
300
+ default:
301
+ logger$3.error('Unexpected challengeName', challengeName);
302
+ }
303
+ };
304
+ AmplifyConfirmSignInComponent.prototype.onStateUpdate = function (state) {
305
+ var actorState = ui.getActorState(state);
306
+ this.remoteError = actorState.context.remoteError;
307
+ this.isPending = !actorState.matches('confirmSignIn.edit');
308
+ };
309
+ AmplifyConfirmSignInComponent.prototype.onInput = function (event) {
310
+ event.preventDefault();
311
+ var _a = event.target, name = _a.name, value = _a.value;
312
+ this.stateMachine.send({
313
+ type: 'CHANGE',
314
+ data: { name: name, value: value },
315
+ });
316
+ };
317
+ AmplifyConfirmSignInComponent.prototype.onSubmit = function (event) {
318
+ event.preventDefault();
319
+ // TODO: handle form data within the state machine
320
+ var formData = new FormData(event.target);
321
+ this.stateMachine.send({
322
+ type: 'SUBMIT',
323
+ data: Object.fromEntries(formData),
324
+ });
325
+ };
326
+ AmplifyConfirmSignInComponent.prototype.toSignIn = function () {
327
+ this.stateMachine.send('SIGN_IN');
328
+ };
329
+ return AmplifyConfirmSignInComponent;
330
+ }());
331
+ AmplifyConfirmSignInComponent.decorators = [
332
+ { type: i0.Component, args: [{
333
+ selector: 'amplify-confirm-sign-in',
334
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmSignInButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ confirmText }}\n </button>\n</ng-template>\n\n<ng-template #confirmSignInForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ headerText }}</h3>\n <amplify-form-field\n name=\"confirmation_code\"\n label=\"Code *\"\n type=\"text\"\n autocomplete=\"one-time-code\"\n ></amplify-form-field>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmSignInButton || confirmSignInButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || confirmSignInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
335
+ },] }
336
+ ];
337
+ AmplifyConfirmSignInComponent.ctorParameters = function () { return [
338
+ { type: StateMachineService },
339
+ { type: AuthPropService }
340
+ ]; };
341
+ AmplifyConfirmSignInComponent.propDecorators = {
342
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }]
343
+ };
344
+
345
+ var AmplifyConfirmSignUpComponent = /** @class */ (function () {
346
+ function AmplifyConfirmSignUpComponent(stateMachine, contextService) {
347
+ this.stateMachine = stateMachine;
348
+ this.contextService = contextService;
349
+ this.dataAttr = '';
350
+ this.headerText = ui.translate('Confirm Sign Up');
351
+ this.customComponents = {};
352
+ this.remoteError = '';
353
+ this.isPending = false;
354
+ // translated texts
355
+ this.resendCodeText = ui.translate('Resend Code');
356
+ this.lostCodeText = ui.translate('Lost your code? ');
357
+ this.confirmText = ui.translate('Confirm');
358
+ }
359
+ AmplifyConfirmSignUpComponent.prototype.ngOnInit = function () {
360
+ var _this = this;
361
+ // TODO: alias for subscribe
362
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
363
+ };
364
+ AmplifyConfirmSignUpComponent.prototype.ngAfterContentInit = function () {
365
+ this.customComponents = this.contextService.customComponents;
366
+ };
367
+ AmplifyConfirmSignUpComponent.prototype.ngOnDestroy = function () {
368
+ this.authSubscription.unsubscribe();
369
+ };
370
+ AmplifyConfirmSignUpComponent.prototype.onStateUpdate = function (state) {
371
+ var actorState = ui.getActorState(state);
372
+ this.remoteError = actorState.context.remoteError;
373
+ this.isPending = !actorState.matches('confirmSignUp.edit');
374
+ };
375
+ Object.defineProperty(AmplifyConfirmSignUpComponent.prototype, "context", {
376
+ get: function () {
377
+ var _a = this.stateMachine.services, change = _a.change, resend = _a.resend, signIn = _a.signIn, submit = _a.submit;
378
+ var remoteError = this.remoteError;
379
+ var username = this.username;
380
+ return { change: change, remoteError: remoteError, resend: resend, signIn: signIn, submit: submit, username: username };
381
+ },
382
+ enumerable: false,
383
+ configurable: true
384
+ });
385
+ AmplifyConfirmSignUpComponent.prototype.resend = function () {
386
+ this.stateMachine.send({
387
+ type: 'RESEND',
388
+ data: {
389
+ username: this.username,
390
+ },
391
+ });
392
+ };
393
+ AmplifyConfirmSignUpComponent.prototype.onInput = function ($event) {
394
+ $event.preventDefault();
395
+ var _a = $event.target, name = _a.name, value = _a.value;
396
+ this.stateMachine.send({
397
+ type: 'CHANGE',
398
+ data: { name: name, value: value },
399
+ });
400
+ };
401
+ AmplifyConfirmSignUpComponent.prototype.onSubmit = function (event) {
402
+ event.preventDefault();
403
+ var state = this.stateMachine.authState;
404
+ var actorContext = ui.getActorContext(state);
405
+ var formValues = actorContext.formValues;
406
+ var username = formValues.username, confirmation_code = formValues.confirmation_code;
407
+ this.stateMachine.send({
408
+ type: 'SUBMIT',
409
+ data: { username: username, confirmation_code: confirmation_code },
410
+ });
411
+ };
412
+ return AmplifyConfirmSignUpComponent;
413
+ }());
414
+ AmplifyConfirmSignUpComponent.decorators = [
415
+ { type: i0.Component, args: [{
416
+ selector: 'amplify-confirm-sign-up',
417
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmSignUpButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ confirmText }}\n </button>\n</ng-template>\n\n<ng-template #confirmSignUpForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <amplify-form-field\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-field>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmSignUpButton || confirmSignUpButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <button amplify-button fontWeight=\"normal\" (click)=\"resend()\">\n {{ resendCodeText }}\n </button>\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 <ng-container\n [ngTemplateOutlet]=\"customComponents.confirmSignUpForm || confirmSignUpForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
418
+ },] }
419
+ ];
420
+ AmplifyConfirmSignUpComponent.ctorParameters = function () { return [
421
+ { type: StateMachineService },
422
+ { type: AuthPropService }
423
+ ]; };
424
+ AmplifyConfirmSignUpComponent.propDecorators = {
425
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignup',] }],
426
+ headerText: [{ type: i0.Input }]
427
+ };
428
+
429
+ var AmplifyFederatedSignInButtonComponent = /** @class */ (function () {
430
+ function AmplifyFederatedSignInButtonComponent(stateMachine) {
431
+ var _this = this;
432
+ this.stateMachine = stateMachine;
433
+ this.onClick = function () {
434
+ _this.stateMachine.send({
435
+ type: 'FEDERATED_SIGN_IN',
436
+ data: { provider: _this.provider },
437
+ });
438
+ };
439
+ }
440
+ return AmplifyFederatedSignInButtonComponent;
441
+ }());
442
+ AmplifyFederatedSignInButtonComponent.decorators = [
443
+ { type: i0.Component, args: [{
444
+ selector: 'amplify-federated-sign-in-button',
445
+ template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n style=\"display: block\"\n (click)=\"onClick()\"\n>\n <div\n class=\"amplify-flex federated-sign-in-button-row\"\n style=\"flex-direction: row; justify-content: center\"\n >\n <ng-content></ng-content>\n </div>\n</button>\n"
446
+ },] }
447
+ ];
448
+ AmplifyFederatedSignInButtonComponent.ctorParameters = function () { return [
449
+ { type: StateMachineService }
450
+ ]; };
451
+ AmplifyFederatedSignInButtonComponent.propDecorators = {
452
+ provider: [{ type: i0.Input }],
453
+ text: [{ type: i0.Input }]
454
+ };
455
+
456
+ var AmplifyFederatedSignInComponent = /** @class */ (function () {
457
+ function AmplifyFederatedSignInComponent(stateMachine) {
458
+ this.stateMachine = stateMachine;
459
+ this.FederatedProviders = ui.FederatedIdentityProviders;
460
+ this.includeFacebook = false;
461
+ this.includeGoogle = false;
462
+ this.includeAmazon = false;
463
+ this.shouldShowFederatedSignIn = false;
464
+ // translated texts
465
+ this.signInFacebookText = ui.translate('Sign In with Facebook');
466
+ this.signInGoogleText = ui.translate('Sign In with Google');
467
+ this.signInAmazonText = ui.translate('Sign In with Amazon');
468
+ }
469
+ AmplifyFederatedSignInComponent.prototype.ngOnInit = function () {
470
+ var _a, _b;
471
+ var loginMechanisms = (_b = (_a = this.stateMachine.context) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.login_mechanisms;
472
+ this.includeFacebook = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('facebook');
473
+ this.includeGoogle = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('google');
474
+ this.includeAmazon = loginMechanisms === null || loginMechanisms === void 0 ? void 0 : loginMechanisms.includes('amazon');
475
+ this.shouldShowFederatedSignIn =
476
+ this.includeFacebook || this.includeGoogle || this.includeAmazon;
477
+ };
478
+ return AmplifyFederatedSignInComponent;
479
+ }());
480
+ AmplifyFederatedSignInComponent.decorators = [
481
+ { type: i0.Component, args: [{
482
+ selector: 'amplify-federated-sign-in',
483
+ template: "<div\n class=\"amplify-flex federated-sign-in-container\"\n style=\"flex-direction: column\"\n *ngIf=\"shouldShowFederatedSignIn\"\n data-orientation=\"horizontal\"\n data-size=\"small\"\n>\n <hr\n class=\"amplify-divider\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n style=\"margin: '1rem 0'\"\n />\n <amplify-federated-sign-in-button\n *ngIf=\"includeGoogle\"\n [provider]=\"FederatedProviders.Google\"\n >\n <svg\n aria-label=\"Google icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 256 262\"\n xmlns=\"http://www.w3.org/2000/svg\"\n preserveAspectRatio=\"xMidYMid\"\n >\n <path\n d=\"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027\"\n fill=\"#4285F4\"\n ></path>\n <path\n d=\"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1\"\n fill=\"#34A853\"\n ></path>\n <path\n d=\"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782\"\n fill=\"#FBBC05\"\n ></path>\n <path\n d=\"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251\"\n fill=\"#EB4335\"\n ></path>\n </svg>\n <p class=\"amplify-text\" style=\"align-self: center\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeFacebook\"\n [text]=\"signInFacebookText\"\n [provider]=\"FederatedProviders.Facebook\"\n >\n <svg\n aria-label=\"Facebook icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 279 538\"\n >\n <path\n d=\"M82.3409742,538 L82.3409742,292.936652 L0,292.936652 L0,196.990154 L82.2410458,196.990154 L82.2410458,126.4295 C82.2410458,44.575144 132.205229,0 205.252865,0 C240.227794,0 270.306232,2.59855099 279,3.79788222 L279,89.2502322 L228.536175,89.2502322 C188.964542,89.2502322 181.270057,108.139699 181.270057,135.824262 L181.270057,196.89021 L276.202006,196.89021 L263.810888,292.836708 L181.16913,292.836708 L181.16913,538 L82.3409742,538 Z\"\n fill=\"#1877F2\"\n ></path>\n </svg>\n <p class=\"amplify-text\" style=\"align-self: center\">\n {{ signInFacebookText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <amplify-federated-sign-in-button\n *ngIf=\"includeAmazon\"\n [text]=\"signInAmazonText\"\n [provider]=\"FederatedProviders.Amazon\"\n >\n <svg\n aria-label=\"Amazon icon\"\n class=\"amplify-icon federated-sign-in-icon\"\n viewBox=\"0 0 248 268\"\n >\n <path\n d=\"M139.056521,147.024612 C133.548808,156.744524 124.782731,162.726926 115.087401,162.726926 C101.790721,162.726926 93.9937779,152.612964 93.9937779,137.68681 C93.9937779,108.224571 120.447551,102.879017 145.533369,102.879017 L145.533369,110.365976 C145.533369,123.831358 145.876354,135.063787 139.056521,147.024612 M207.206992,162.579655 C209.400505,165.692256 209.887066,169.437725 207.063416,171.770186 C199.996315,177.653081 187.429476,188.590967 180.513926,194.716661 L180.46208,194.621133 C178.176838,196.663031 174.862638,196.810303 172.27828,195.445057 C160.780281,185.9162 158.686473,181.494078 152.405048,172.403055 C133.405233,191.751331 119.909143,197.534719 95.309886,197.534719 C66.1281801,197.534719 43.4791563,179.599451 43.4791563,143.669212 C43.4791563,115.616003 58.6782107,96.5105248 80.4019706,87.1727225 C99.2063636,78.9096034 125.464714,77.4528107 145.533369,75.1641337 L145.533369,70.694248 C145.533369,62.4749122 146.167493,52.7510201 141.297893,45.6541312 C137.110277,39.2856386 129.018206,36.6586354 121.859376,36.6586354 C108.658413,36.6586354 96.9171331,43.4171982 94.0416364,57.4199213 C93.4593582,60.532522 91.1701278,63.5933787 88.003492,63.7406501 L54.4387473,60.1424518 C51.6150972,59.5095829 48.4484614,57.2248862 49.2740201,52.8982915 C56.9712583,12.2553679 93.7983558,0 126.732964,0 C143.587124,0 165.606011,4.47386604 178.902691,17.2148315 C195.760839,32.917146 194.149604,53.8694866 194.149604,76.6726704 L194.149604,130.542157 C194.149604,146.734049 200.87372,153.830938 207.206992,162.579655 Z M233.826346,208.038962 C230.467669,203.683255 211.550709,205.9821 203.056405,206.998432 C200.470662,207.321077 200.076227,205.042397 202.406981,203.404973 C217.475208,192.664928 242.201125,195.766353 245.081698,199.363845 C247.966255,202.981502 244.336653,228.071183 230.172839,240.049379 C228.001452,241.888455 225.929671,240.904388 226.89783,238.468418 C230.077218,230.430525 237.204944,212.418868 233.826346,208.038962 Z M126.768855,264 C74.0234043,264 42.0764048,241.955028 17.7852554,217.541992 C12.9733903,212.705982 6.71799208,206.295994 3.31151296,200.690918 C1.90227474,198.372135 5.59096074,195.021875 8.0442063,196.84375 C38.2390146,219.267578 82.1011654,239.538304 125.529506,239.538304 C154.819967,239.538304 191.046475,227.469543 220.66851,214.867659 C225.146771,212.966167 225.146771,219.180222 224.511585,221.060516 C224.183264,222.03242 209.514625,236.221149 189.247207,247.047411 C170.304273,257.166172 146.397132,264 126.768855,264 Z\"\n fill=\"#FF9900\"\n ></path>\n </svg>\n\n <p class=\"amplify-text\" style=\"align-self: center\">\n {{ signInAmazonText }}\n </p>\n </amplify-federated-sign-in-button>\n</div>\n"
484
+ },] }
485
+ ];
486
+ AmplifyFederatedSignInComponent.ctorParameters = function () { return [
487
+ { type: StateMachineService }
488
+ ]; };
489
+
490
+ var logger$2 = new awsAmplify.Logger('ForceNewPassword');
491
+ var AmplifyForceNewPasswordComponent = /** @class */ (function () {
492
+ function AmplifyForceNewPasswordComponent(stateMachine, contextService) {
493
+ this.stateMachine = stateMachine;
494
+ this.contextService = contextService;
495
+ this.dataAttr = '';
496
+ this.headerText = ui.translate('Change Password');
497
+ this.customComponents = {};
498
+ this.remoteError = '';
499
+ this.isPending = false;
500
+ // translated texts
501
+ this.changePasswordText = ui.translate('Change Password');
502
+ this.backToSignInText = ui.translate('Back to Sign In');
503
+ }
504
+ AmplifyForceNewPasswordComponent.prototype.ngOnInit = function () {
505
+ var _this = this;
506
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
507
+ };
508
+ AmplifyForceNewPasswordComponent.prototype.ngAfterContentInit = function () {
509
+ this.customComponents = this.contextService.customComponents;
510
+ };
511
+ AmplifyForceNewPasswordComponent.prototype.ngOnDestroy = function () {
512
+ logger$2.log('sign in destroyed, unsubscribing from state machine...');
513
+ this.authSubscription.unsubscribe();
514
+ };
515
+ AmplifyForceNewPasswordComponent.prototype.onStateUpdate = function (state) {
516
+ var actorState = ui.getActorState(state);
517
+ this.remoteError = actorState.context.remoteError;
518
+ this.isPending = actorState.matches({
519
+ signUp: {
520
+ submission: 'idle',
521
+ },
522
+ });
523
+ };
524
+ Object.defineProperty(AmplifyForceNewPasswordComponent.prototype, "context", {
525
+ get: function () {
526
+ var _a = this.stateMachine.services, change = _a.change, signIn = _a.signIn, submit = _a.submit;
527
+ var user = this.stateMachine.user;
528
+ var remoteError = this.remoteError;
529
+ return { change: change, remoteError: remoteError, signIn: signIn, submit: submit, user: user };
530
+ },
531
+ enumerable: false,
532
+ configurable: true
533
+ });
534
+ AmplifyForceNewPasswordComponent.prototype.toSignIn = function () {
535
+ this.stateMachine.send('SIGN_IN');
536
+ };
537
+ AmplifyForceNewPasswordComponent.prototype.onInput = function (event) {
538
+ event.preventDefault();
539
+ var _a = event.target, name = _a.name, value = _a.value;
540
+ this.stateMachine.send({
541
+ type: 'CHANGE',
542
+ data: { name: name, value: value },
543
+ });
544
+ };
545
+ AmplifyForceNewPasswordComponent.prototype.onSubmit = function (event) {
546
+ event.preventDefault();
547
+ // consider stateMachine directly providing actorState / actorContext
548
+ var state = this.stateMachine.authState;
549
+ var actorState = ui.getActorContext(state);
550
+ var formValues = actorState.formValues;
551
+ this.stateMachine.send({
552
+ type: 'SUBMIT',
553
+ data: formValues,
554
+ });
555
+ };
556
+ return AmplifyForceNewPasswordComponent;
557
+ }());
558
+ AmplifyForceNewPasswordComponent.decorators = [
559
+ { type: i0.Component, args: [{
560
+ selector: 'amplify-force-new-password',
561
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #forceNewPasswordSubmitButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ changePasswordText }}\n </button>\n</ng-template>\n\n<ng-template #signInForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <amplify-form-field\n name=\"password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <amplify-form-field\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.forceNewPasswordSubmitButton ||\n forceNewPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render force new password component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || signInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
562
+ },] }
563
+ ];
564
+ AmplifyForceNewPasswordComponent.ctorParameters = function () { return [
565
+ { type: StateMachineService },
566
+ { type: AuthPropService }
567
+ ]; };
568
+ AmplifyForceNewPasswordComponent.propDecorators = {
569
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-forcenewpassword',] }],
570
+ headerText: [{ type: i0.Input }]
571
+ };
572
+
573
+ var AmplifyResetPasswordComponent = /** @class */ (function () {
574
+ function AmplifyResetPasswordComponent(stateMachine, contextService) {
575
+ this.stateMachine = stateMachine;
576
+ this.contextService = contextService;
577
+ this.dataAttr = '';
578
+ this.headerText = ui.translate('Reset your password');
579
+ this.customComponents = {};
580
+ this.remoteError = '';
581
+ this.isPending = false;
582
+ // translated texts
583
+ this.sendCodeText = ui.translate('Send Code');
584
+ this.backToSignInText = ui.translate('Back to Sign In');
585
+ }
586
+ AmplifyResetPasswordComponent.prototype.ngOnInit = function () {
587
+ var _this = this;
588
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
589
+ };
590
+ AmplifyResetPasswordComponent.prototype.ngAfterContentInit = function () {
591
+ this.customComponents = this.contextService.customComponents;
592
+ };
593
+ AmplifyResetPasswordComponent.prototype.ngOnDestroy = function () {
594
+ this.authSubscription.unsubscribe();
595
+ };
596
+ AmplifyResetPasswordComponent.prototype.onStateUpdate = function (state) {
597
+ var actorState = ui.getActorState(state);
598
+ this.remoteError = actorState.context.remoteError;
599
+ this.isPending = !actorState.matches('resetPassword.edit');
600
+ };
601
+ Object.defineProperty(AmplifyResetPasswordComponent.prototype, "context", {
602
+ get: function () {
603
+ var _a = this.stateMachine.services, change = _a.change, signIn = _a.signIn, submit = _a.submit;
604
+ var remoteError = this.remoteError;
605
+ return { change: change, remoteError: remoteError, signIn: signIn, submit: submit };
606
+ },
607
+ enumerable: false,
608
+ configurable: true
609
+ });
610
+ AmplifyResetPasswordComponent.prototype.toSignIn = function () {
611
+ this.stateMachine.send('SIGN_IN');
612
+ };
613
+ AmplifyResetPasswordComponent.prototype.onInput = function (event) {
614
+ event.preventDefault();
615
+ var _a = event.target, name = _a.name, value = _a.value;
616
+ this.stateMachine.send({
617
+ type: 'CHANGE',
618
+ data: { name: name, value: value },
619
+ });
620
+ };
621
+ AmplifyResetPasswordComponent.prototype.onSubmit = function (event) {
622
+ event.preventDefault();
623
+ this.stateMachine.send('SUBMIT');
624
+ };
625
+ return AmplifyResetPasswordComponent;
626
+ }());
627
+ AmplifyResetPasswordComponent.decorators = [
628
+ { type: i0.Component, args: [{
629
+ selector: 'amplify-reset-password',
630
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #resetPasswordSubmitButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ sendCodeText }}\n </button>\n</ng-template>\n\n<ng-template #resetPasswordForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <amplify-form-field\n name=\"username\"\n type=\"username\"\n autocomplete=\"username\"\n ></amplify-form-field>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.resetPasswordSubmitButton ||\n resetPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render reset passsword component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.resetPasswordForm || resetPasswordForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
631
+ },] }
632
+ ];
633
+ AmplifyResetPasswordComponent.ctorParameters = function () { return [
634
+ { type: StateMachineService },
635
+ { type: AuthPropService }
636
+ ]; };
637
+ AmplifyResetPasswordComponent.propDecorators = {
638
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-resetPassword',] }],
639
+ headerText: [{ type: i0.Input }]
640
+ };
641
+
642
+ /*! *****************************************************************************
643
+ Copyright (c) Microsoft Corporation.
644
+
645
+ Permission to use, copy, modify, and/or distribute this software for any
646
+ purpose with or without fee is hereby granted.
647
+
648
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
649
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
650
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
651
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
652
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
653
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
654
+ PERFORMANCE OF THIS SOFTWARE.
655
+ ***************************************************************************** */
656
+ /* global Reflect, Promise */
657
+ var extendStatics = function (d, b) {
658
+ extendStatics = Object.setPrototypeOf ||
659
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
660
+ function (d, b) { for (var p in b)
661
+ if (Object.prototype.hasOwnProperty.call(b, p))
662
+ d[p] = b[p]; };
663
+ return extendStatics(d, b);
664
+ };
665
+ function __extends(d, b) {
666
+ if (typeof b !== "function" && b !== null)
667
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
668
+ extendStatics(d, b);
669
+ function __() { this.constructor = d; }
670
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
671
+ }
672
+ var __assign = function () {
673
+ __assign = Object.assign || function __assign(t) {
674
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
675
+ s = arguments[i];
676
+ for (var p in s)
677
+ if (Object.prototype.hasOwnProperty.call(s, p))
678
+ t[p] = s[p];
679
+ }
680
+ return t;
681
+ };
682
+ return __assign.apply(this, arguments);
683
+ };
684
+ function __rest(s, e) {
685
+ var t = {};
686
+ for (var p in s)
687
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
688
+ t[p] = s[p];
689
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
690
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
691
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
692
+ t[p[i]] = s[p[i]];
693
+ }
694
+ return t;
695
+ }
696
+ function __decorate(decorators, target, key, desc) {
697
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
698
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
699
+ r = Reflect.decorate(decorators, target, key, desc);
700
+ else
701
+ for (var i = decorators.length - 1; i >= 0; i--)
702
+ if (d = decorators[i])
703
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
704
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
705
+ }
706
+ function __param(paramIndex, decorator) {
707
+ return function (target, key) { decorator(target, key, paramIndex); };
708
+ }
709
+ function __metadata(metadataKey, metadataValue) {
710
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
711
+ return Reflect.metadata(metadataKey, metadataValue);
712
+ }
713
+ function __awaiter(thisArg, _arguments, P, generator) {
714
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
715
+ return new (P || (P = Promise))(function (resolve, reject) {
716
+ function fulfilled(value) { try {
717
+ step(generator.next(value));
718
+ }
719
+ catch (e) {
720
+ reject(e);
721
+ } }
722
+ function rejected(value) { try {
723
+ step(generator["throw"](value));
724
+ }
725
+ catch (e) {
726
+ reject(e);
727
+ } }
728
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
729
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
730
+ });
731
+ }
732
+ function __generator(thisArg, body) {
733
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
734
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
735
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
736
+ function verb(n) { return function (v) { return step([n, v]); }; }
737
+ function step(op) {
738
+ if (f)
739
+ throw new TypeError("Generator is already executing.");
740
+ while (_)
741
+ try {
742
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
743
+ return t;
744
+ if (y = 0, t)
745
+ op = [op[0] & 2, t.value];
746
+ switch (op[0]) {
747
+ case 0:
748
+ case 1:
749
+ t = op;
750
+ break;
751
+ case 4:
752
+ _.label++;
753
+ return { value: op[1], done: false };
754
+ case 5:
755
+ _.label++;
756
+ y = op[1];
757
+ op = [0];
758
+ continue;
759
+ case 7:
760
+ op = _.ops.pop();
761
+ _.trys.pop();
762
+ continue;
763
+ default:
764
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
765
+ _ = 0;
766
+ continue;
767
+ }
768
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
769
+ _.label = op[1];
770
+ break;
771
+ }
772
+ if (op[0] === 6 && _.label < t[1]) {
773
+ _.label = t[1];
774
+ t = op;
775
+ break;
776
+ }
777
+ if (t && _.label < t[2]) {
778
+ _.label = t[2];
779
+ _.ops.push(op);
780
+ break;
781
+ }
782
+ if (t[2])
783
+ _.ops.pop();
784
+ _.trys.pop();
785
+ continue;
786
+ }
787
+ op = body.call(thisArg, _);
788
+ }
789
+ catch (e) {
790
+ op = [6, e];
791
+ y = 0;
792
+ }
793
+ finally {
794
+ f = t = 0;
795
+ }
796
+ if (op[0] & 5)
797
+ throw op[1];
798
+ return { value: op[0] ? op[1] : void 0, done: true };
799
+ }
800
+ }
801
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
802
+ if (k2 === undefined)
803
+ k2 = k;
804
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
805
+ }) : (function (o, m, k, k2) {
806
+ if (k2 === undefined)
807
+ k2 = k;
808
+ o[k2] = m[k];
809
+ });
810
+ function __exportStar(m, o) {
811
+ for (var p in m)
812
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
813
+ __createBinding(o, m, p);
814
+ }
815
+ function __values(o) {
816
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
817
+ if (m)
818
+ return m.call(o);
819
+ if (o && typeof o.length === "number")
820
+ return {
821
+ next: function () {
822
+ if (o && i >= o.length)
823
+ o = void 0;
824
+ return { value: o && o[i++], done: !o };
825
+ }
826
+ };
827
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
828
+ }
829
+ function __read(o, n) {
830
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
831
+ if (!m)
832
+ return o;
833
+ var i = m.call(o), r, ar = [], e;
834
+ try {
835
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
836
+ ar.push(r.value);
837
+ }
838
+ catch (error) {
839
+ e = { error: error };
840
+ }
841
+ finally {
842
+ try {
843
+ if (r && !r.done && (m = i["return"]))
844
+ m.call(i);
845
+ }
846
+ finally {
847
+ if (e)
848
+ throw e.error;
849
+ }
850
+ }
851
+ return ar;
852
+ }
853
+ /** @deprecated */
854
+ function __spread() {
855
+ for (var ar = [], i = 0; i < arguments.length; i++)
856
+ ar = ar.concat(__read(arguments[i]));
857
+ return ar;
858
+ }
859
+ /** @deprecated */
860
+ function __spreadArrays() {
861
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
862
+ s += arguments[i].length;
863
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
864
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
865
+ r[k] = a[j];
866
+ return r;
867
+ }
868
+ function __spreadArray(to, from, pack) {
869
+ if (pack || arguments.length === 2)
870
+ for (var i = 0, l = from.length, ar; i < l; i++) {
871
+ if (ar || !(i in from)) {
872
+ if (!ar)
873
+ ar = Array.prototype.slice.call(from, 0, i);
874
+ ar[i] = from[i];
875
+ }
876
+ }
877
+ return to.concat(ar || Array.prototype.slice.call(from));
878
+ }
879
+ function __await(v) {
880
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
881
+ }
882
+ function __asyncGenerator(thisArg, _arguments, generator) {
883
+ if (!Symbol.asyncIterator)
884
+ throw new TypeError("Symbol.asyncIterator is not defined.");
885
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
886
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
887
+ function verb(n) { if (g[n])
888
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
889
+ function resume(n, v) { try {
890
+ step(g[n](v));
891
+ }
892
+ catch (e) {
893
+ settle(q[0][3], e);
894
+ } }
895
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
896
+ function fulfill(value) { resume("next", value); }
897
+ function reject(value) { resume("throw", value); }
898
+ function settle(f, v) { if (f(v), q.shift(), q.length)
899
+ resume(q[0][0], q[0][1]); }
900
+ }
901
+ function __asyncDelegator(o) {
902
+ var i, p;
903
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
904
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
905
+ }
906
+ function __asyncValues(o) {
907
+ if (!Symbol.asyncIterator)
908
+ throw new TypeError("Symbol.asyncIterator is not defined.");
909
+ var m = o[Symbol.asyncIterator], i;
910
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
911
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
912
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
913
+ }
914
+ function __makeTemplateObject(cooked, raw) {
915
+ if (Object.defineProperty) {
916
+ Object.defineProperty(cooked, "raw", { value: raw });
917
+ }
918
+ else {
919
+ cooked.raw = raw;
920
+ }
921
+ return cooked;
922
+ }
923
+ ;
924
+ var __setModuleDefault = Object.create ? (function (o, v) {
925
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
926
+ }) : function (o, v) {
927
+ o["default"] = v;
928
+ };
929
+ function __importStar(mod) {
930
+ if (mod && mod.__esModule)
931
+ return mod;
932
+ var result = {};
933
+ if (mod != null)
934
+ for (var k in mod)
935
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
936
+ __createBinding(result, mod, k);
937
+ __setModuleDefault(result, mod);
938
+ return result;
939
+ }
940
+ function __importDefault(mod) {
941
+ return (mod && mod.__esModule) ? mod : { default: mod };
942
+ }
943
+ function __classPrivateFieldGet(receiver, state, kind, f) {
944
+ if (kind === "a" && !f)
945
+ throw new TypeError("Private accessor was defined without a getter");
946
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
947
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
948
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
949
+ }
950
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
951
+ if (kind === "m")
952
+ throw new TypeError("Private method is not writable");
953
+ if (kind === "a" && !f)
954
+ throw new TypeError("Private accessor was defined without a setter");
955
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
956
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
957
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
958
+ }
959
+
960
+ var logger$1 = new awsAmplify.Logger('SetupTotp');
961
+ var AmplifySetupTotpComponent = /** @class */ (function () {
962
+ function AmplifySetupTotpComponent(stateMachine, contextService) {
963
+ this.stateMachine = stateMachine;
964
+ this.contextService = contextService;
965
+ this.customComponents = {};
966
+ this.remoteError = '';
967
+ this.isPending = false;
968
+ this.headerText = ui.translate('Setup TOTP');
969
+ this.qrCodeSource = '';
970
+ // translated texts
971
+ this.backToSignInText = ui.translate('Back to Sign In');
972
+ this.confirmText = ui.translate('Confirm');
973
+ }
974
+ AmplifySetupTotpComponent.prototype.ngOnInit = function () {
975
+ var _this = this;
976
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) {
977
+ _this.onStateUpdate(state);
978
+ });
979
+ this.generateQRCode();
980
+ };
981
+ AmplifySetupTotpComponent.prototype.ngAfterContentInit = function () {
982
+ this.customComponents = this.contextService.customComponents;
983
+ };
984
+ AmplifySetupTotpComponent.prototype.ngOnDestroy = function () {
985
+ this.authSubscription.unsubscribe();
986
+ };
987
+ AmplifySetupTotpComponent.prototype.onStateUpdate = function (state) {
988
+ var actorState = ui.getActorState(state);
989
+ this.remoteError = actorState.context.remoteError;
990
+ this.isPending = !actorState.matches('setupTOTP.edit');
991
+ };
992
+ Object.defineProperty(AmplifySetupTotpComponent.prototype, "context", {
993
+ get: function () {
994
+ var _b = this.stateMachine.services, change = _b.change, submit = _b.submit;
995
+ var remoteError = this.remoteError;
996
+ var user = this.stateMachine.user;
997
+ return { change: change, remoteError: remoteError, submit: submit, user: user };
998
+ },
999
+ enumerable: false,
1000
+ configurable: true
1001
+ });
1002
+ AmplifySetupTotpComponent.prototype.generateQRCode = function () {
1003
+ var _a;
1004
+ return __awaiter(this, void 0, void 0, function () {
1005
+ var state, actorContext, user, secretKey, issuer, totpCode, _b, err_1;
1006
+ return __generator(this, function (_c) {
1007
+ switch (_c.label) {
1008
+ case 0:
1009
+ state = this.stateMachine.authState;
1010
+ actorContext = ui.getActorContext(state);
1011
+ user = actorContext.user;
1012
+ _c.label = 1;
1013
+ case 1:
1014
+ _c.trys.push([1, 4, , 5]);
1015
+ return [4 /*yield*/, awsAmplify.Auth.setupTOTP(user)];
1016
+ case 2:
1017
+ secretKey = _c.sent();
1018
+ issuer = 'AWSCognito';
1019
+ totpCode = "otpauth://totp/" + issuer + ":" + user.username + "?secret=" + secretKey + "&issuer=" + issuer;
1020
+ logger$1.info('totp code was generated:', totpCode);
1021
+ _b = this;
1022
+ return [4 /*yield*/, QRCode__default["default"].toDataURL(totpCode)];
1023
+ case 3:
1024
+ _b.qrCodeSource = _c.sent();
1025
+ return [3 /*break*/, 5];
1026
+ case 4:
1027
+ err_1 = _c.sent();
1028
+ this.remoteError = (_a = err_1.message) !== null && _a !== void 0 ? _a : err_1;
1029
+ logger$1.error(err_1);
1030
+ return [3 /*break*/, 5];
1031
+ case 5: return [2 /*return*/];
1032
+ }
1033
+ });
1034
+ });
1035
+ };
1036
+ AmplifySetupTotpComponent.prototype.onInput = function (event) {
1037
+ event.preventDefault();
1038
+ var _b = event.target, name = _b.name, value = _b.value;
1039
+ this.stateMachine.send({
1040
+ type: 'CHANGE',
1041
+ data: { name: name, value: value },
1042
+ });
1043
+ };
1044
+ AmplifySetupTotpComponent.prototype.onSubmit = function (event) {
1045
+ event.preventDefault();
1046
+ // TODO: handle form data within the state machine
1047
+ var formData = new FormData(event.target);
1048
+ this.stateMachine.send({
1049
+ type: 'SUBMIT',
1050
+ data: Object.fromEntries(formData),
1051
+ });
1052
+ };
1053
+ AmplifySetupTotpComponent.prototype.toSignIn = function () {
1054
+ this.stateMachine.send('SIGN_IN');
1055
+ };
1056
+ return AmplifySetupTotpComponent;
1057
+ }());
1058
+ AmplifySetupTotpComponent.decorators = [
1059
+ { type: i0.Component, args: [{
1060
+ selector: 'amplify-setup-totp',
1061
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #setupTotpButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ confirmText }}\n </button>\n</ng-template>\n\n<ng-template #setupTotpForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <p *ngIf=\"!qrCodeSource\">Loading...</p>\n <img\n *ngIf=\"qrCodeSource\"\n [src]=\"qrCodeSource\"\n alt=\"qr code\"\n data-amplify-qrcode\n />\n <amplify-form-field\n name=\"confirmation_code\"\n label=\"Code *\"\n type=\"text\"\n autocomplete=\"one-time-code\"\n ></amplify-form-field>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.setupTotpButton || setupTotpButton\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"toSignIn()\"\n >\n {{ backToSignInText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.setupTotpForm || setupTotpForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
1062
+ },] }
1063
+ ];
1064
+ AmplifySetupTotpComponent.ctorParameters = function () { return [
1065
+ { type: StateMachineService },
1066
+ { type: AuthPropService }
1067
+ ]; };
1068
+ AmplifySetupTotpComponent.propDecorators = {
1069
+ customComponents: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-setup-totp',] }]
1070
+ };
1071
+
1072
+ var logger = new awsAmplify.Logger('SignIn');
1073
+ var AmplifySignInComponent = /** @class */ (function () {
1074
+ function AmplifySignInComponent(stateMachine, contextService) {
1075
+ this.stateMachine = stateMachine;
1076
+ this.contextService = contextService;
1077
+ this.dataAttr = '';
1078
+ this.headerText = ui.translate('Sign in to your account');
1079
+ this.customComponents = {};
1080
+ this.remoteError = '';
1081
+ this.isPending = false;
1082
+ // translated phrases
1083
+ this.forgotPasswordText = ui.translate('Forgot your password? ');
1084
+ this.signInButtonText = ui.translate('Sign in');
1085
+ this.noAccountText = ui.translate('No account? ');
1086
+ }
1087
+ AmplifySignInComponent.prototype.ngOnInit = function () {
1088
+ var _this = this;
1089
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
1090
+ };
1091
+ AmplifySignInComponent.prototype.ngAfterContentInit = function () {
1092
+ this.customComponents = this.contextService.customComponents;
1093
+ };
1094
+ AmplifySignInComponent.prototype.ngOnDestroy = function () {
1095
+ logger.log('sign in destroyed, unsubscribing from state machine...');
1096
+ this.authSubscription.unsubscribe();
1097
+ };
1098
+ AmplifySignInComponent.prototype.onStateUpdate = function (state) {
1099
+ var actorState = ui.getActorState(state);
1100
+ this.remoteError = actorState.context.remoteError;
1101
+ this.isPending = !actorState.matches('signIn.edit');
1102
+ };
1103
+ Object.defineProperty(AmplifySignInComponent.prototype, "context", {
1104
+ get: function () {
1105
+ var _a = this.stateMachine.services, change = _a.change, resetPassword = _a.resetPassword, signUp = _a.signUp, submit = _a.submit;
1106
+ var remoteError = this.remoteError;
1107
+ return { change: change, remoteError: remoteError, resetPassword: resetPassword, signUp: signUp, submit: submit };
1108
+ },
1109
+ enumerable: false,
1110
+ configurable: true
1111
+ });
1112
+ AmplifySignInComponent.prototype.toResetPassword = function () {
1113
+ this.stateMachine.send('RESET_PASSWORD');
1114
+ };
1115
+ AmplifySignInComponent.prototype.onInput = function (event) {
1116
+ event.preventDefault();
1117
+ var _a = event.target, name = _a.name, value = _a.value;
1118
+ this.stateMachine.send({
1119
+ type: 'CHANGE',
1120
+ data: { name: name, value: value },
1121
+ });
1122
+ };
1123
+ AmplifySignInComponent.prototype.onSubmit = function (event) {
1124
+ return __awaiter(this, void 0, void 0, function () {
1125
+ return __generator(this, function (_a) {
1126
+ event.preventDefault();
1127
+ this.stateMachine.send({
1128
+ type: 'SUBMIT',
1129
+ });
1130
+ return [2 /*return*/];
1131
+ });
1132
+ });
1133
+ };
1134
+ return AmplifySignInComponent;
1135
+ }());
1136
+ AmplifySignInComponent.decorators = [
1137
+ { type: i0.Component, args: [{
1138
+ selector: 'amplify-sign-in',
1139
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #signInButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ signInButtonText }}\n </button>\n</ng-template>\n\n<ng-template #signInForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <amplify-user-name-alias></amplify-user-name-alias>\n <amplify-form-field\n data-amplify-password\n name=\"password\"\n type=\"password\"\n autocomplete=\"current-password\"\n ></amplify-form-field>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInButton || signInButton\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <button\n amplify-button\n fontWeight=\"normal\"\n size=\"small\"\n variation=\"link\"\n (click)=\"toResetPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n <amplify-federated-sign-in></amplify-federated-sign-in>\n </form>\n</ng-template>\n\n<!-- \n Render sign in component\n-->\n\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signInForm || signInForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n",
1140
+ encapsulation: i0.ViewEncapsulation.None
1141
+ },] }
1142
+ ];
1143
+ AmplifySignInComponent.ctorParameters = function () { return [
1144
+ { type: StateMachineService },
1145
+ { type: AuthPropService }
1146
+ ]; };
1147
+ AmplifySignInComponent.propDecorators = {
1148
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-signin',] }],
1149
+ headerText: [{ type: i0.Input }]
1150
+ };
1151
+
1152
+ var AmplifySignUpComponent = /** @class */ (function () {
1153
+ function AmplifySignUpComponent(stateMachine, contextService) {
1154
+ this.stateMachine = stateMachine;
1155
+ this.contextService = contextService;
1156
+ this.dataAttr = '';
1157
+ this.headerText = ui.translate('Create a new account');
1158
+ this.remoteError = '';
1159
+ this.isPending = false;
1160
+ this.primaryAlias = '';
1161
+ this.secondaryAliases = [];
1162
+ this.validationError = {};
1163
+ // translated texts
1164
+ this.createAccountText = ui.translate('Create Account');
1165
+ }
1166
+ Object.defineProperty(AmplifySignUpComponent.prototype, "context", {
1167
+ get: function () {
1168
+ var _a = this.stateMachine.services, change = _a.change, signIn = _a.signIn, submit = _a.submit;
1169
+ var remoteError = this.remoteError;
1170
+ var validationError = this.validationError;
1171
+ return {
1172
+ change: change,
1173
+ remoteError: remoteError,
1174
+ signIn: signIn,
1175
+ submit: submit,
1176
+ validationError: validationError,
1177
+ };
1178
+ },
1179
+ enumerable: false,
1180
+ configurable: true
1181
+ });
1182
+ AmplifySignUpComponent.prototype.ngOnInit = function () {
1183
+ var _this = this;
1184
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
1185
+ var context = this.stateMachine.context;
1186
+ var _a = ui.getConfiguredAliases(context), primaryAlias = _a.primaryAlias, secondaryAliases = _a.secondaryAliases;
1187
+ /**
1188
+ * If the login_mechanisms are configured to use ONLY username, we need
1189
+ * to ask for some sort of secondary contact information in order to
1190
+ * verify the user for Cognito. Currently matching this to how Vue is
1191
+ * set up.
1192
+ */
1193
+ if (primaryAlias === 'username' && lodash.isEmpty(secondaryAliases)) {
1194
+ secondaryAliases.push('email', 'phone_number');
1195
+ }
1196
+ this.primaryAlias = primaryAlias;
1197
+ this.secondaryAliases = secondaryAliases;
1198
+ };
1199
+ AmplifySignUpComponent.prototype.ngAfterContentInit = function () {
1200
+ this.customComponents = this.contextService.customComponents;
1201
+ };
1202
+ AmplifySignUpComponent.prototype.ngOnDestroy = function () {
1203
+ this.authSubscription.unsubscribe();
1204
+ };
1205
+ AmplifySignUpComponent.prototype.onStateUpdate = function (state) {
1206
+ var actorState = ui.getActorState(state);
1207
+ var actorContext = ui.getActorContext(state);
1208
+ this.remoteError = actorContext.remoteError;
1209
+ this.validationError = actorContext.validationError;
1210
+ this.isPending = !actorState.matches({
1211
+ signUp: {
1212
+ submission: 'idle',
1213
+ },
1214
+ });
1215
+ };
1216
+ AmplifySignUpComponent.prototype.onSubmit = function ($event) {
1217
+ return __awaiter(this, void 0, void 0, function () {
1218
+ return __generator(this, function (_a) {
1219
+ $event.preventDefault();
1220
+ this.stateMachine.send('SUBMIT');
1221
+ return [2 /*return*/];
1222
+ });
1223
+ });
1224
+ };
1225
+ AmplifySignUpComponent.prototype.onInput = function (event) {
1226
+ event.preventDefault();
1227
+ var _a = event.target, name = _a.name, value = _a.value;
1228
+ this.stateMachine.send({
1229
+ type: 'CHANGE',
1230
+ data: { name: name, value: value },
1231
+ });
1232
+ };
1233
+ return AmplifySignUpComponent;
1234
+ }());
1235
+ AmplifySignUpComponent.decorators = [
1236
+ { type: i0.Component, args: [{
1237
+ selector: 'amplify-sign-up',
1238
+ template: "<ng-template #signUpButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ createAccountText }}\n </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-field\n name=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n</ng-template>\n\n<ng-template #signUpConfirmPassword>\n <amplify-form-field\n name=\"confirm_password\"\n label=\"Confirm Password\"\n type=\"password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n</ng-template>\n\n<ng-template #signUpFieldset>\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\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-field [name]=\"secondaryAlias\"></amplify-form-field>\n </ng-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.signUpButton || signUpButton\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n <amplify-federated-sign-in></amplify-federated-sign-in>\n</ng-template>\n\n<div data-amplify-container>\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 </form>\n</div>\n"
1239
+ },] }
1240
+ ];
1241
+ AmplifySignUpComponent.ctorParameters = function () { return [
1242
+ { type: StateMachineService },
1243
+ { type: AuthPropService }
1244
+ ]; };
1245
+ AmplifySignUpComponent.propDecorators = {
1246
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-signup',] }],
1247
+ headerText: [{ type: i0.Input }]
1248
+ };
1249
+
1250
+ var getAttributeMap = function () { return ui.authInputAttributes; };
1251
+
1252
+ var AmplifyVerifyUserComponent = /** @class */ (function () {
1253
+ function AmplifyVerifyUserComponent(stateMachine, contextService) {
1254
+ this.stateMachine = stateMachine;
1255
+ this.contextService = contextService;
1256
+ this.dataAttr = '';
1257
+ this.headerText = ui.translate('Account recovery requires verified contact information');
1258
+ this.customComponents = {};
1259
+ this.unverifiedAttributes = {};
1260
+ this.remoteError = '';
1261
+ this.isPending = false;
1262
+ this.labelId = nanoid.nanoid(12);
1263
+ // translated texts
1264
+ this.skipText = ui.translate('Skip');
1265
+ this.verifyText = ui.translate('Verify');
1266
+ }
1267
+ AmplifyVerifyUserComponent.prototype.ngOnInit = function () {
1268
+ var _this = this;
1269
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
1270
+ };
1271
+ AmplifyVerifyUserComponent.prototype.ngAfterContentInit = function () {
1272
+ this.customComponents = this.contextService.customComponents;
1273
+ };
1274
+ AmplifyVerifyUserComponent.prototype.ngOnDestroy = function () {
1275
+ this.authSubscription.unsubscribe();
1276
+ };
1277
+ AmplifyVerifyUserComponent.prototype.onStateUpdate = function (state) {
1278
+ var actorState = ui.getActorState(state);
1279
+ this.unverifiedAttributes = actorState.context.unverifiedAttributes;
1280
+ this.remoteError = actorState.context.remoteError;
1281
+ this.isPending = !actorState.matches('verifyUser.edit');
1282
+ };
1283
+ Object.defineProperty(AmplifyVerifyUserComponent.prototype, "context", {
1284
+ get: function () {
1285
+ var _b = this.stateMachine.services, change = _b.change, skip = _b.skip, submit = _b.submit;
1286
+ var remoteError = this.remoteError;
1287
+ return { change: change, remoteError: remoteError, skip: skip, submit: submit };
1288
+ },
1289
+ enumerable: false,
1290
+ configurable: true
1291
+ });
1292
+ AmplifyVerifyUserComponent.prototype.skipVerify = function () {
1293
+ this.stateMachine.send('SKIP');
1294
+ };
1295
+ AmplifyVerifyUserComponent.prototype.getLabelForAttr = function (authAttr) {
1296
+ var _a;
1297
+ var attributeMap = getAttributeMap();
1298
+ var label = (_a = attributeMap[authAttr]) === null || _a === void 0 ? void 0 : _a.label;
1299
+ return ui.translate(label);
1300
+ };
1301
+ AmplifyVerifyUserComponent.prototype.onSubmit = function (event) {
1302
+ return __awaiter(this, void 0, void 0, function () {
1303
+ var formData;
1304
+ return __generator(this, function (_b) {
1305
+ event.preventDefault();
1306
+ formData = new FormData(event.target);
1307
+ this.stateMachine.send({
1308
+ type: 'SUBMIT',
1309
+ data: Object.fromEntries(formData),
1310
+ });
1311
+ return [2 /*return*/];
1312
+ });
1313
+ });
1314
+ };
1315
+ return AmplifyVerifyUserComponent;
1316
+ }());
1317
+ AmplifyVerifyUserComponent.decorators = [
1318
+ { type: i0.Component, args: [{
1319
+ selector: 'amplify-verify-user',
1320
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #verifyButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ verifyText }}\n </button>\n</ng-template>\n\n<ng-template #verifyUserForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n\n <div *ngFor=\"let unverifiedAttribute of unverifiedAttributes | keyvalue\">\n <!-- TODO: match React implementation -->\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedAttribute.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{\n getLabelForAttr(unverifiedAttribute.key)\n }}</label>\n </div>\n\n <ng-container\n [ngTemplateOutlet]=\"customComponents.verifyButton || verifyButton\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"skipVerify()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render verify user component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"customComponents.verifyUserForm || verifyUserForm\"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n",
1321
+ encapsulation: i0.ViewEncapsulation.None
1322
+ },] }
1323
+ ];
1324
+ AmplifyVerifyUserComponent.ctorParameters = function () { return [
1325
+ { type: StateMachineService },
1326
+ { type: AuthPropService }
1327
+ ]; };
1328
+ AmplifyVerifyUserComponent.propDecorators = {
1329
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-verifyuser',] }],
1330
+ headerText: [{ type: i0.Input }]
1331
+ };
1332
+
1333
+ var ConfirmResetPasswordComponent = /** @class */ (function () {
1334
+ function ConfirmResetPasswordComponent(stateMachine, contextService) {
1335
+ this.stateMachine = stateMachine;
1336
+ this.contextService = contextService;
1337
+ this.dataAttr = '';
1338
+ this.headerText = ui.translate('Reset your password');
1339
+ this.customComponents = {};
1340
+ this.remoteError = '';
1341
+ this.isPending = false;
1342
+ // translated strings
1343
+ this.sendCodeText = ui.translate('Send Code');
1344
+ this.backToSignInText = ui.translate('Back to Sign In');
1345
+ this.lostCodeText = ui.translate('Lost your code? ');
1346
+ this.resendCodeText = ui.translate('Resend Code');
1347
+ }
1348
+ ConfirmResetPasswordComponent.prototype.ngOnInit = function () {
1349
+ var _this = this;
1350
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
1351
+ };
1352
+ ConfirmResetPasswordComponent.prototype.ngAfterContentInit = function () {
1353
+ this.customComponents = this.contextService.customComponents;
1354
+ };
1355
+ ConfirmResetPasswordComponent.prototype.ngOnDestroy = function () {
1356
+ this.authSubscription.unsubscribe();
1357
+ };
1358
+ ConfirmResetPasswordComponent.prototype.onStateUpdate = function (state) {
1359
+ var actorState = ui.getActorState(state);
1360
+ this.remoteError = actorState.context.remoteError;
1361
+ this.isPending = !actorState.matches('confirmResetPassword.edit');
1362
+ };
1363
+ Object.defineProperty(ConfirmResetPasswordComponent.prototype, "context", {
1364
+ get: function () {
1365
+ var _a = this.stateMachine.services, change = _a.change, resend = _a.resend, signIn = _a.signIn, submit = _a.submit;
1366
+ var remoteError = this.remoteError;
1367
+ return { change: change, resend: resend, remoteError: remoteError, signIn: signIn, submit: submit };
1368
+ },
1369
+ enumerable: false,
1370
+ configurable: true
1371
+ });
1372
+ ConfirmResetPasswordComponent.prototype.toSignIn = function () {
1373
+ this.stateMachine.send('SIGN_IN');
1374
+ };
1375
+ ConfirmResetPasswordComponent.prototype.resend = function () {
1376
+ this.stateMachine.send('RESEND');
1377
+ };
1378
+ ConfirmResetPasswordComponent.prototype.onInput = function (event) {
1379
+ event.preventDefault();
1380
+ var _a = event.target, name = _a.name, value = _a.value;
1381
+ this.stateMachine.send({
1382
+ type: 'CHANGE',
1383
+ data: { name: name, value: value },
1384
+ });
1385
+ };
1386
+ ConfirmResetPasswordComponent.prototype.onSubmit = function (event) {
1387
+ return __awaiter(this, void 0, void 0, function () {
1388
+ return __generator(this, function (_a) {
1389
+ event.preventDefault();
1390
+ this.stateMachine.send('SUBMIT');
1391
+ return [2 /*return*/];
1392
+ });
1393
+ });
1394
+ };
1395
+ return ConfirmResetPasswordComponent;
1396
+ }());
1397
+ ConfirmResetPasswordComponent.decorators = [
1398
+ { type: i0.Component, args: [{
1399
+ selector: 'amplify-confirm-reset-password',
1400
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmResetPasswordSubmitButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ sendCodeText }}\n </button>\n</ng-template>\n<ng-template #confirmResetPasswordForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ headerText }}</h3>\n <amplify-form-field\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-field>\n <amplify-form-field\n name=\"password\"\n label=\"New password\"\n autocomplete=\"new-password\"\n ></amplify-form-field>\n\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPasswordSubmitButton ||\n confirmResetPasswordSubmitButton\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n type=\"button\"\n (click)=\"resend()\"\n >\n {{ resendCodeText }}\n </button>\n\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render confirm reset password component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmResetPasswordForm || confirmResetPasswordForm\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
1401
+ },] }
1402
+ ];
1403
+ ConfirmResetPasswordComponent.ctorParameters = function () { return [
1404
+ { type: StateMachineService },
1405
+ { type: AuthPropService }
1406
+ ]; };
1407
+ ConfirmResetPasswordComponent.propDecorators = {
1408
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }],
1409
+ headerText: [{ type: i0.Input }]
1410
+ };
1411
+
1412
+ var ConfirmVerifyUserComponent = /** @class */ (function () {
1413
+ function ConfirmVerifyUserComponent(stateMachine, contextService) {
1414
+ this.stateMachine = stateMachine;
1415
+ this.contextService = contextService;
1416
+ this.dataAttr = '';
1417
+ this.headerText = ui.translate('Account recovery requires verified contact information');
1418
+ this.customComponents = {};
1419
+ this.remoteError = '';
1420
+ this.isPending = false;
1421
+ // translated texts
1422
+ this.skipText = ui.translate('Skip');
1423
+ this.submitText = ui.translate('Submit');
1424
+ }
1425
+ ConfirmVerifyUserComponent.prototype.ngOnInit = function () {
1426
+ var _this = this;
1427
+ this.authSubscription = this.stateMachine.authService.subscribe(function (state) { return _this.onStateUpdate(state); });
1428
+ };
1429
+ ConfirmVerifyUserComponent.prototype.ngAfterContentInit = function () {
1430
+ this.customComponents = this.contextService.customComponents;
1431
+ };
1432
+ ConfirmVerifyUserComponent.prototype.ngOnDestroy = function () {
1433
+ this.authSubscription.unsubscribe();
1434
+ };
1435
+ ConfirmVerifyUserComponent.prototype.onStateUpdate = function (state) {
1436
+ var actorState = ui.getActorState(state);
1437
+ this.remoteError = actorState.context.remoteError;
1438
+ this.isPending = !actorState.matches('confirmVerifyUser.edit');
1439
+ };
1440
+ Object.defineProperty(ConfirmVerifyUserComponent.prototype, "context", {
1441
+ get: function () {
1442
+ var _a = this.stateMachine.services, skip = _a.skip, submit = _a.submit;
1443
+ var remoteError = this.remoteError;
1444
+ return { remoteError: remoteError, skip: skip, submit: submit };
1445
+ },
1446
+ enumerable: false,
1447
+ configurable: true
1448
+ });
1449
+ ConfirmVerifyUserComponent.prototype.skipVerify = function () {
1450
+ this.stateMachine.send('SKIP');
1451
+ };
1452
+ ConfirmVerifyUserComponent.prototype.onSubmit = function (event) {
1453
+ return __awaiter(this, void 0, void 0, function () {
1454
+ var formData;
1455
+ return __generator(this, function (_a) {
1456
+ event.preventDefault();
1457
+ formData = new FormData(event.target);
1458
+ this.stateMachine.send({
1459
+ type: 'SUBMIT',
1460
+ data: Object.fromEntries(formData),
1461
+ });
1462
+ return [2 /*return*/];
1463
+ });
1464
+ });
1465
+ };
1466
+ return ConfirmVerifyUserComponent;
1467
+ }());
1468
+ ConfirmVerifyUserComponent.decorators = [
1469
+ { type: i0.Component, args: [{
1470
+ selector: 'amplify-confirm-verify-user',
1471
+ template: "<!-- \n Define default contents here\n-->\n<ng-template #confirmVerifyButton>\n <button amplify-button variation=\"primary\" fullWidth=\"true\" type=\"submit\">\n {{ submitText }}\n </button>\n</ng-template>\n\n<ng-template #confirmVerifyUserForm>\n <form data-amplify-form (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"isPending\"\n >\n <h3 class=\"amplify-heading\">{{ this.headerText }}</h3>\n <amplify-form-field\n name=\"confirmation_code\"\n type=\"number\"\n autocomplete=\"one-time-code\"\n ></amplify-form-field>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmVerifyButton || confirmVerifyButton\n \"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"skipVerify()\"\n >\n {{ skipText }}\n </button>\n <amplify-error *ngIf=\"remoteError\">\n {{ remoteError }}\n </amplify-error>\n </fieldset>\n </form>\n</ng-template>\n\n<!-- \n Render confirm reset password component\n-->\n<div data-amplify-container>\n <ng-container\n [ngTemplateOutlet]=\"\n customComponents.confirmVerifyUserForm || confirmVerifyUserForm\n \"\n [ngTemplateOutletContext]=\"context\"\n >\n </ng-container>\n</div>\n"
1472
+ },] }
1473
+ ];
1474
+ ConfirmVerifyUserComponent.ctorParameters = function () { return [
1475
+ { type: StateMachineService },
1476
+ { type: AuthPropService }
1477
+ ]; };
1478
+ ConfirmVerifyUserComponent.propDecorators = {
1479
+ dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmverifyuser',] }],
1480
+ headerText: [{ type: i0.Input }]
1481
+ };
1482
+
1483
+ var AmplifyButtonComponent = /** @class */ (function () {
1484
+ function AmplifyButtonComponent() {
1485
+ this.type = 'button';
1486
+ this.fullWidth = false;
1487
+ this.size = 'medium';
1488
+ this.variation = 'default';
1489
+ this.fontWeight = 'normal';
1490
+ this.defaultClass = true;
1491
+ }
1492
+ AmplifyButtonComponent.prototype.ngOnInit = function () {
1493
+ this.typeAttr = this.type;
1494
+ this.fullWidthAttr = this.fullWidth;
1495
+ this.sizeAttr = this.size;
1496
+ this.variationAttr = this.variation;
1497
+ this.fontWeightAttr = this.fontWeight;
1498
+ };
1499
+ return AmplifyButtonComponent;
1500
+ }());
1501
+ AmplifyButtonComponent.decorators = [
1502
+ { type: i0.Component, args: [{
1503
+ selector: 'button[amplify-button]',
1504
+ template: "<ng-content></ng-content>\n"
1505
+ },] }
1506
+ ];
1507
+ AmplifyButtonComponent.propDecorators = {
1508
+ type: [{ type: i0.Input }],
1509
+ fullWidth: [{ type: i0.Input }],
1510
+ size: [{ type: i0.Input }],
1511
+ variation: [{ type: i0.Input }],
1512
+ fontWeight: [{ type: i0.Input }],
1513
+ typeAttr: [{ type: i0.HostBinding, args: ['type',] }],
1514
+ fullWidthAttr: [{ type: i0.HostBinding, args: ['attr.data-fullwidth',] }],
1515
+ sizeAttr: [{ type: i0.HostBinding, args: ['attr.data-size',] }],
1516
+ variationAttr: [{ type: i0.HostBinding, args: ['attr.data-variation',] }],
1517
+ defaultClass: [{ type: i0.HostBinding, args: ['class.amplify-button',] }],
1518
+ fontWeightAttr: [{ type: i0.HostBinding, args: ['style.font-weight',] }]
1519
+ };
1520
+
1521
+ var AmplifyErrorComponent = /** @class */ (function () {
1522
+ function AmplifyErrorComponent() {
1523
+ }
1524
+ return AmplifyErrorComponent;
1525
+ }());
1526
+ AmplifyErrorComponent.decorators = [
1527
+ { type: i0.Component, args: [{
1528
+ selector: 'amplify-error',
1529
+ template: "<span data-ui-error>\n <ng-content></ng-content>\n</span>\n"
1530
+ },] }
1531
+ ];
1532
+
1533
+ /**
1534
+ * Input interface opinionated for authenticator usage.
1535
+ *
1536
+ * TODO: Separate this component out to two parts -- 1) amplify-auth-input that
1537
+ * contains authenticator opinionated logic and 2) amplify-text-field primitive
1538
+ * that does not make any auth-related inference.
1539
+ */
1540
+ var AmplifyFormFieldComponent = /** @class */ (function () {
1541
+ function AmplifyFormFieldComponent(stateMachine) {
1542
+ this.stateMachine = stateMachine;
1543
+ this.required = true;
1544
+ this.placeholder = '';
1545
+ this.label = '';
1546
+ this.initialValue = '';
1547
+ this.disabled = false;
1548
+ this.autocomplete = '';
1549
+ this.countryDialCodes = ui.countryDialCodes;
1550
+ }
1551
+ AmplifyFormFieldComponent.prototype.ngOnInit = function () {
1552
+ // TODO: field primtiives should have generate these by default.
1553
+ this.textFieldId = "amplify-field-" + nanoid.nanoid(12);
1554
+ this.selectFieldId = "amplify-field-" + nanoid.nanoid(12);
1555
+ // TODO: consider better default handling mechanisms across frameworks
1556
+ if (this.isPhoneField()) {
1557
+ var state = this.stateMachine.authState;
1558
+ var country_code = ui.getActorContext(state).country_code;
1559
+ this.defaultCountryCode = country_code;
1560
+ // TODO: remove this side-effect
1561
+ this.stateMachine.send({
1562
+ type: 'CHANGE',
1563
+ data: { name: 'country_code', value: country_code },
1564
+ });
1565
+ }
1566
+ };
1567
+ Object.defineProperty(AmplifyFormFieldComponent.prototype, "attributeMap", {
1568
+ get: function () {
1569
+ return getAttributeMap();
1570
+ },
1571
+ enumerable: false,
1572
+ configurable: true
1573
+ });
1574
+ Object.defineProperty(AmplifyFormFieldComponent.prototype, "error", {
1575
+ get: function () {
1576
+ var formContext = ui.getActorContext(this.stateMachine.authState);
1577
+ var validationError = formContext.validationError;
1578
+ return validationError[this.name];
1579
+ },
1580
+ enumerable: false,
1581
+ configurable: true
1582
+ });
1583
+ AmplifyFormFieldComponent.prototype.inferLabel = function () {
1584
+ var _a;
1585
+ var label = this.label || ((_a = this.attributeMap[this.name]) === null || _a === void 0 ? void 0 : _a.label);
1586
+ return ui.translate(label);
1587
+ };
1588
+ AmplifyFormFieldComponent.prototype.inferPlaceholder = function () {
1589
+ var _a;
1590
+ var placeholder = this.placeholder || ((_a = this.attributeMap[this.name]) === null || _a === void 0 ? void 0 : _a.placeholder) ||
1591
+ this.inferLabel();
1592
+ return ui.translate(placeholder);
1593
+ };
1594
+ // infers what the `type` of underlying input element should be.
1595
+ AmplifyFormFieldComponent.prototype.inferType = function () {
1596
+ var _a, _b, _c;
1597
+ 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';
1598
+ };
1599
+ // TODO(enhancement): use enum to differentiate special field types
1600
+ AmplifyFormFieldComponent.prototype.isPasswordField = function () {
1601
+ return this.inferType() === 'password';
1602
+ };
1603
+ AmplifyFormFieldComponent.prototype.isPhoneField = function () {
1604
+ return this.inferType() === 'tel';
1605
+ };
1606
+ return AmplifyFormFieldComponent;
1607
+ }());
1608
+ AmplifyFormFieldComponent.decorators = [
1609
+ { type: i0.Component, args: [{
1610
+ selector: 'amplify-form-field',
1611
+ template: "<div class=\"amplify-flex\" style=\"flex-direction: column; gap: 0\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [selectFieldId]=\"selectFieldId\"\n [defaultCountryCode]=\"defaultCountryCode\"\n [textFieldId]=\"textFieldId\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [initialValue]=\"initialValue\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [id]=\"textFieldId\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [id]=\"textFieldId\"\n [type]=\"inferType()\"\n [name]=\"name\"\n [label]=\"inferLabel()\"\n [placeholder]=\"inferPlaceholder()\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [disabled]=\"disabled\"\n [autocomplete]=\"autocomplete\"\n ></amplify-text-field>\n\n <amplify-error *ngIf=\"error\">\n {{ error }}\n </amplify-error>\n</div>\n"
1612
+ },] }
1613
+ ];
1614
+ AmplifyFormFieldComponent.ctorParameters = function () { return [
1615
+ { type: StateMachineService }
1616
+ ]; };
1617
+ AmplifyFormFieldComponent.propDecorators = {
1618
+ name: [{ type: i0.Input }],
1619
+ type: [{ type: i0.Input }],
1620
+ required: [{ type: i0.Input }],
1621
+ placeholder: [{ type: i0.Input }],
1622
+ label: [{ type: i0.Input }],
1623
+ initialValue: [{ type: i0.Input }],
1624
+ disabled: [{ type: i0.Input }],
1625
+ autocomplete: [{ type: i0.Input }]
1626
+ };
1627
+
1628
+ var AmplifyPasswordFieldComponent = /** @class */ (function () {
1629
+ function AmplifyPasswordFieldComponent() {
1630
+ this.autocomplete = 'new-password';
1631
+ this.disabled = false;
1632
+ this.initialValue = '';
1633
+ this.label = '';
1634
+ this.placeholder = '';
1635
+ this.required = true;
1636
+ this.type = 'password';
1637
+ this.showPassword = false;
1638
+ this.showPasswordButtonlabel = ui.translate('Show password');
1639
+ }
1640
+ AmplifyPasswordFieldComponent.prototype.togglePasswordText = function () {
1641
+ this.showPassword = !this.showPassword;
1642
+ this.showPasswordButtonlabel = this.showPassword
1643
+ ? ui.translate('Show password')
1644
+ : ui.translate('Hide password');
1645
+ this.type = this.showPassword ? 'text' : 'password';
1646
+ };
1647
+ return AmplifyPasswordFieldComponent;
1648
+ }());
1649
+ AmplifyPasswordFieldComponent.decorators = [
1650
+ { type: i0.Component, args: [{
1651
+ selector: 'amplify-password-field',
1652
+ template: "<label class=\"amplify-label sr-only\" [for]=\"id\">\n {{ label }}\n</label>\n<div class=\"amplify-flex amplify-field-group\">\n <input\n class=\"amplify-input amplify-field-group__control\"\n [id]=\"id\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n />\n <div class=\"amplify-field-group__outer-end\">\n <button\n amplify-button\n [attr.aria-label]=\"showPasswordButtonlabel\"\n class=\"amplify-field-group__control amplify-field__show-password\"\n (click)=\"togglePasswordText()\"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n</div>\n"
1653
+ },] }
1654
+ ];
1655
+ AmplifyPasswordFieldComponent.propDecorators = {
1656
+ autocomplete: [{ type: i0.Input }],
1657
+ disabled: [{ type: i0.Input }],
1658
+ id: [{ type: i0.Input }],
1659
+ initialValue: [{ type: i0.Input }],
1660
+ label: [{ type: i0.Input }],
1661
+ name: [{ type: i0.Input }],
1662
+ placeholder: [{ type: i0.Input }],
1663
+ required: [{ type: i0.Input }]
1664
+ };
1665
+
1666
+ var AmplifySelectComponent = /** @class */ (function () {
1667
+ function AmplifySelectComponent() {
1668
+ }
1669
+ return AmplifySelectComponent;
1670
+ }());
1671
+ AmplifySelectComponent.decorators = [
1672
+ { type: i0.Component, args: [{
1673
+ selector: 'amplify-form-select',
1674
+ template: "<label class=\"amplify-label sr-only\" [for]=\"id\">{{ label }}</label>\n<div class=\"amplify-select__wrapper\">\n <select\n class=\"amplify-select amplify-field-group__control\"\n autocomplete=\"tel-country-code\"\n [id]=\"id\"\n [name]=\"name\"\n >\n <option\n *ngFor=\"let item of items\"\n [value]=\"item\"\n [selected]=\"item === defaultValue\"\n >\n {{ item }}\n </option>\n </select>\n <div\n class=\"amplify-flex amplify-select__icon-wrapper\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n"
1675
+ },] }
1676
+ ];
1677
+ AmplifySelectComponent.propDecorators = {
1678
+ items: [{ type: i0.Input }],
1679
+ name: [{ type: i0.Input }],
1680
+ label: [{ type: i0.Input }],
1681
+ id: [{ type: i0.Input }],
1682
+ defaultValue: [{ type: i0.Input }]
1683
+ };
1684
+
1685
+ var TabItemComponent = /** @class */ (function () {
1686
+ function TabItemComponent() {
1687
+ this.active = false;
1688
+ }
1689
+ return TabItemComponent;
1690
+ }());
1691
+ TabItemComponent.decorators = [
1692
+ { type: i0.Component, args: [{
1693
+ selector: 'amplify-tab-item',
1694
+ template: "<div\n data-orientation=\"horizontal\"\n role=\"tabpanel\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.data-state]=\"active ? 'active' : 'inactive'\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n"
1695
+ },] }
1696
+ ];
1697
+ TabItemComponent.propDecorators = {
1698
+ title: [{ type: i0.Input }],
1699
+ active: [{ type: i0.Input }],
1700
+ id: [{ type: i0.Input }],
1701
+ labelledById: [{ type: i0.Input }],
1702
+ tabIndex: [{ type: i0.Input }]
1703
+ };
1704
+
1705
+ var TabsComponent = /** @class */ (function () {
1706
+ function TabsComponent() {
1707
+ this.tabChange = new i0.EventEmitter();
1708
+ }
1709
+ TabsComponent.prototype.ngAfterContentInit = function () {
1710
+ // assign ids
1711
+ this.tabs.forEach(function (tab, index) {
1712
+ tab.id = "radix-id-" + nanoid.nanoid(12) + "-1-content-" + index;
1713
+ tab.labelledById = "radix-id-" + nanoid.nanoid(12) + "-1-trigger-" + index;
1714
+ });
1715
+ // find active tab
1716
+ // TODO(enhancement): more declarative way for choosing the initial tab to render
1717
+ var activeTabs = this.tabs.filter(function (tab) { return tab.active; });
1718
+ // set active tab
1719
+ if (activeTabs.length !== 1) {
1720
+ this.selectTab(this.tabs.first);
1721
+ }
1722
+ };
1723
+ TabsComponent.prototype.selectTab = function (tab) {
1724
+ this.tabs.forEach(function (tab) {
1725
+ tab.active = false;
1726
+ });
1727
+ tab.active = true;
1728
+ };
1729
+ TabsComponent.prototype.handleTabClick = function (tab) {
1730
+ if (tab.active)
1731
+ return; // don't do anything if clicks the current active tab
1732
+ this.tabChange.emit();
1733
+ this.selectTab(tab);
1734
+ };
1735
+ return TabsComponent;
1736
+ }());
1737
+ TabsComponent.decorators = [
1738
+ { type: i0.Component, args: [{
1739
+ selector: 'amplify-tabs',
1740
+ template: "<div\n tabindex=\"0\"\n aria-orientation=\"horizontal\"\n data-orientation=\"horizontal\"\n role=\"tablist\"\n style=\"outline: none\"\n>\n <div\n class=\"amplify-flex amplify-tabs\"\n data-indicator-position=\"top\"\n style=\"gap: 0px; justify-content: center\"\n >\n <div\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs-item\"\n data-grow=\"equal\"\n data-orientation=\"horizontal\"\n role=\"tab\"\n [id]=\"tab.labelledById\"\n [tabindex]=\"tab.active ? '0' : '1'\"\n [attr.aria-selected]=\"tab.active\"\n [attr.aria-controls]=\"tab.id\"\n [attr.data-state]=\"tab.active ? 'active' : 'inactive'\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </div>\n </div>\n</div>\n\n<ng-content></ng-content>\n"
1741
+ },] }
1742
+ ];
1743
+ TabsComponent.propDecorators = {
1744
+ tabs: [{ type: i0.ContentChildren, args: [TabItemComponent,] }],
1745
+ tabChange: [{ type: i0.Output }]
1746
+ };
1747
+
1748
+ var AmplifyTextFieldComponent = /** @class */ (function () {
1749
+ function AmplifyTextFieldComponent() {
1750
+ this.autocomplete = 'new-password';
1751
+ this.disabled = false;
1752
+ this.initialValue = '';
1753
+ this.label = '';
1754
+ this.placeholder = '';
1755
+ this.required = true;
1756
+ }
1757
+ return AmplifyTextFieldComponent;
1758
+ }());
1759
+ AmplifyTextFieldComponent.decorators = [
1760
+ { type: i0.Component, args: [{
1761
+ selector: 'amplify-text-field',
1762
+ template: "<label class=\"amplify-label sr-only\" [for]=\"id\">\n {{ label }}\n</label>\n<input\n class=\"amplify-input\"\n [id]=\"id\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n/>\n"
1763
+ },] }
1764
+ ];
1765
+ AmplifyTextFieldComponent.propDecorators = {
1766
+ autocomplete: [{ type: i0.Input }],
1767
+ disabled: [{ type: i0.Input }],
1768
+ id: [{ type: i0.Input }],
1769
+ initialValue: [{ type: i0.Input }],
1770
+ label: [{ type: i0.Input }],
1771
+ name: [{ type: i0.Input }],
1772
+ placeholder: [{ type: i0.Input }],
1773
+ required: [{ type: i0.Input }],
1774
+ type: [{ type: i0.Input }]
1775
+ };
1776
+
1777
+ var AmplifyUserNameAliasComponent = /** @class */ (function () {
1778
+ function AmplifyUserNameAliasComponent(stateMachine) {
1779
+ this.stateMachine = stateMachine;
1780
+ this.name = 'username';
1781
+ this.disabled = false;
1782
+ this.initialValue = '';
1783
+ this.required = true;
1784
+ }
1785
+ AmplifyUserNameAliasComponent.prototype.ngOnInit = function () {
1786
+ var context = this.stateMachine.context;
1787
+ var _a = ui.getAliasInfoFromContext(context), label = _a.label, type = _a.type;
1788
+ this.label = label;
1789
+ this.type = type;
1790
+ this.placeholder = label;
1791
+ };
1792
+ return AmplifyUserNameAliasComponent;
1793
+ }());
1794
+ AmplifyUserNameAliasComponent.decorators = [
1795
+ { type: i0.Component, args: [{
1796
+ selector: 'amplify-user-name-alias',
1797
+ template: "<amplify-form-field\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-field>\n"
1798
+ },] }
1799
+ ];
1800
+ AmplifyUserNameAliasComponent.ctorParameters = function () { return [
1801
+ { type: StateMachineService }
1802
+ ]; };
1803
+ AmplifyUserNameAliasComponent.propDecorators = {
1804
+ name: [{ type: i0.Input }],
1805
+ disabled: [{ type: i0.Input }],
1806
+ initialValue: [{ type: i0.Input }],
1807
+ required: [{ type: i0.Input }]
1808
+ };
1809
+
1810
+ var proxyInputs = function (Cmp, inputs) {
1811
+ var Prototype = Cmp.prototype;
1812
+ inputs.forEach(function (item) {
1813
+ Object.defineProperty(Prototype, item, {
1814
+ get: function () {
1815
+ return this.el[item];
1816
+ },
1817
+ set: function (val) {
1818
+ var _this = this;
1819
+ this.z.runOutsideAngular(function () { return (_this.el[item] = val); });
1820
+ },
1821
+ });
1822
+ });
1823
+ };
1824
+ var proxyMethods = function (Cmp, methods) {
1825
+ var Prototype = Cmp.prototype;
1826
+ methods.forEach(function (methodName) {
1827
+ Prototype[methodName] = function () {
1828
+ var _this = this;
1829
+ var args = arguments;
1830
+ return this.z.runOutsideAngular(function () { return _this.el[methodName].apply(_this.el, args); });
1831
+ };
1832
+ });
1833
+ };
1834
+ var proxyOutputs = function (instance, el, events) {
1835
+ events.forEach(function (eventName) { return (instance[eventName] = rxjs.fromEvent(el, eventName)); });
1836
+ };
1837
+ // tslint:disable-next-line: only-arrow-functions
1838
+ function ProxyCmp(opts) {
1839
+ var decorator = function (cls) {
1840
+ if (opts.inputs) {
1841
+ proxyInputs(cls, opts.inputs);
1842
+ }
1843
+ if (opts.methods) {
1844
+ proxyMethods(cls, opts.methods);
1845
+ }
1846
+ return cls;
1847
+ };
1848
+ return decorator;
1849
+ }
1850
+ var AmplifyAmazonButton = /** @class */ (function () {
1851
+ function AmplifyAmazonButton(c, r, z) {
1852
+ this.z = z;
1853
+ c.detach();
1854
+ this.el = r.nativeElement;
1855
+ }
1856
+ return AmplifyAmazonButton;
1857
+ }());
1858
+ AmplifyAmazonButton.decorators = [
1859
+ { type: i0.Component, args: [{
1860
+ selector: 'amplify-amazon-button',
1861
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1862
+ template: '<ng-content></ng-content>',
1863
+ inputs: ['clientId', 'handleAuthStateChange']
1864
+ },] }
1865
+ ];
1866
+ AmplifyAmazonButton.ctorParameters = function () { return [
1867
+ { type: i0.ChangeDetectorRef },
1868
+ { type: i0.ElementRef },
1869
+ { type: i0.NgZone }
1870
+ ]; };
1871
+ AmplifyAmazonButton = __decorate([
1872
+ ProxyCmp({ inputs: ['clientId', 'handleAuthStateChange'] })
1873
+ ], AmplifyAmazonButton);
1874
+ var AmplifyAuthContainer = /** @class */ (function () {
1875
+ function AmplifyAuthContainer(c, r, z) {
1876
+ this.z = z;
1877
+ c.detach();
1878
+ this.el = r.nativeElement;
1879
+ }
1880
+ return AmplifyAuthContainer;
1881
+ }());
1882
+ AmplifyAuthContainer.decorators = [
1883
+ { type: i0.Component, args: [{
1884
+ selector: 'amplify-auth-container',
1885
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1886
+ template: '<ng-content></ng-content>'
1887
+ },] }
1888
+ ];
1889
+ AmplifyAuthContainer.ctorParameters = function () { return [
1890
+ { type: i0.ChangeDetectorRef },
1891
+ { type: i0.ElementRef },
1892
+ { type: i0.NgZone }
1893
+ ]; };
1894
+ var AmplifyAuthFields = /** @class */ (function () {
1895
+ function AmplifyAuthFields(c, r, z) {
1896
+ this.z = z;
1897
+ c.detach();
1898
+ this.el = r.nativeElement;
1899
+ }
1900
+ return AmplifyAuthFields;
1901
+ }());
1902
+ AmplifyAuthFields.decorators = [
1903
+ { type: i0.Component, args: [{
1904
+ selector: 'amplify-auth-fields',
1905
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1906
+ template: '<ng-content></ng-content>',
1907
+ inputs: ['formFields']
1908
+ },] }
1909
+ ];
1910
+ AmplifyAuthFields.ctorParameters = function () { return [
1911
+ { type: i0.ChangeDetectorRef },
1912
+ { type: i0.ElementRef },
1913
+ { type: i0.NgZone }
1914
+ ]; };
1915
+ AmplifyAuthFields = __decorate([
1916
+ ProxyCmp({ inputs: ['formFields'] })
1917
+ ], AmplifyAuthFields);
1918
+ var AmplifyAuth0Button = /** @class */ (function () {
1919
+ function AmplifyAuth0Button(c, r, z) {
1920
+ this.z = z;
1921
+ c.detach();
1922
+ this.el = r.nativeElement;
1923
+ }
1924
+ return AmplifyAuth0Button;
1925
+ }());
1926
+ AmplifyAuth0Button.decorators = [
1927
+ { type: i0.Component, args: [{
1928
+ selector: 'amplify-auth0-button',
1929
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1930
+ template: '<ng-content></ng-content>',
1931
+ inputs: ['config', 'handleAuthStateChange']
1932
+ },] }
1933
+ ];
1934
+ AmplifyAuth0Button.ctorParameters = function () { return [
1935
+ { type: i0.ChangeDetectorRef },
1936
+ { type: i0.ElementRef },
1937
+ { type: i0.NgZone }
1938
+ ]; };
1939
+ AmplifyAuth0Button = __decorate([
1940
+ ProxyCmp({ inputs: ['config', 'handleAuthStateChange'] })
1941
+ ], AmplifyAuth0Button);
1942
+ var AmplifyAuthenticator = /** @class */ (function () {
1943
+ function AmplifyAuthenticator(c, r, z) {
1944
+ this.z = z;
1945
+ c.detach();
1946
+ this.el = r.nativeElement;
1947
+ }
1948
+ return AmplifyAuthenticator;
1949
+ }());
1950
+ AmplifyAuthenticator.decorators = [
1951
+ { type: i0.Component, args: [{
1952
+ selector: 'amplify-authenticator',
1953
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1954
+ template: '<ng-content></ng-content>',
1955
+ inputs: [
1956
+ 'federated',
1957
+ 'handleAuthStateChange',
1958
+ 'hideToast',
1959
+ 'initialAuthState',
1960
+ 'usernameAlias',
1961
+ ]
1962
+ },] }
1963
+ ];
1964
+ AmplifyAuthenticator.ctorParameters = function () { return [
1965
+ { type: i0.ChangeDetectorRef },
1966
+ { type: i0.ElementRef },
1967
+ { type: i0.NgZone }
1968
+ ]; };
1969
+ AmplifyAuthenticator = __decorate([
1970
+ ProxyCmp({
1971
+ inputs: [
1972
+ 'federated',
1973
+ 'handleAuthStateChange',
1974
+ 'hideToast',
1975
+ 'initialAuthState',
1976
+ 'usernameAlias',
1977
+ ],
1978
+ })
1979
+ ], AmplifyAuthenticator);
1980
+ exports.AmplifyButton = /** @class */ (function () {
1981
+ function AmplifyButton(c, r, z) {
1982
+ this.z = z;
1983
+ c.detach();
1984
+ this.el = r.nativeElement;
1985
+ }
1986
+ return AmplifyButton;
1987
+ }());
1988
+ exports.AmplifyButton.decorators = [
1989
+ { type: i0.Component, args: [{
1990
+ selector: 'amplify-button',
1991
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1992
+ template: '<ng-content></ng-content>',
1993
+ inputs: ['disabled', 'handleButtonClick', 'icon', 'type', 'variant']
1994
+ },] }
1995
+ ];
1996
+ exports.AmplifyButton.ctorParameters = function () { return [
1997
+ { type: i0.ChangeDetectorRef },
1998
+ { type: i0.ElementRef },
1999
+ { type: i0.NgZone }
2000
+ ]; };
2001
+ exports.AmplifyButton = __decorate([
2002
+ ProxyCmp({
2003
+ inputs: ['disabled', 'handleButtonClick', 'icon', 'type', 'variant'],
2004
+ })
2005
+ ], exports.AmplifyButton);
2006
+ exports.AmplifyChatbot = /** @class */ (function () {
2007
+ function AmplifyChatbot(c, r, z) {
2008
+ this.z = z;
2009
+ c.detach();
2010
+ this.el = r.nativeElement;
2011
+ proxyOutputs(this, this.el, ['chatCompleted']);
2012
+ }
2013
+ return AmplifyChatbot;
2014
+ }());
2015
+ exports.AmplifyChatbot.decorators = [
2016
+ { type: i0.Component, args: [{
2017
+ selector: 'amplify-chatbot',
2018
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2019
+ template: '<ng-content></ng-content>',
2020
+ inputs: [
2021
+ 'botName',
2022
+ 'botTitle',
2023
+ 'clearOnComplete',
2024
+ 'conversationModeOn',
2025
+ 'silenceThreshold',
2026
+ 'silenceTime',
2027
+ 'textEnabled',
2028
+ 'voiceEnabled',
2029
+ 'welcomeMessage',
2030
+ ]
2031
+ },] }
2032
+ ];
2033
+ exports.AmplifyChatbot.ctorParameters = function () { return [
2034
+ { type: i0.ChangeDetectorRef },
2035
+ { type: i0.ElementRef },
2036
+ { type: i0.NgZone }
2037
+ ]; };
2038
+ exports.AmplifyChatbot = __decorate([
2039
+ ProxyCmp({
2040
+ inputs: [
2041
+ 'botName',
2042
+ 'botTitle',
2043
+ 'clearOnComplete',
2044
+ 'conversationModeOn',
2045
+ 'silenceThreshold',
2046
+ 'silenceTime',
2047
+ 'textEnabled',
2048
+ 'voiceEnabled',
2049
+ 'welcomeMessage',
2050
+ ],
2051
+ })
2052
+ ], exports.AmplifyChatbot);
2053
+ var AmplifyCheckbox = /** @class */ (function () {
2054
+ function AmplifyCheckbox(c, r, z) {
2055
+ this.z = z;
2056
+ c.detach();
2057
+ this.el = r.nativeElement;
2058
+ }
2059
+ return AmplifyCheckbox;
2060
+ }());
2061
+ AmplifyCheckbox.decorators = [
2062
+ { type: i0.Component, args: [{
2063
+ selector: 'amplify-checkbox',
2064
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2065
+ template: '<ng-content></ng-content>',
2066
+ inputs: ['checked', 'disabled', 'fieldId', 'label', 'name', 'value']
2067
+ },] }
2068
+ ];
2069
+ AmplifyCheckbox.ctorParameters = function () { return [
2070
+ { type: i0.ChangeDetectorRef },
2071
+ { type: i0.ElementRef },
2072
+ { type: i0.NgZone }
2073
+ ]; };
2074
+ AmplifyCheckbox = __decorate([
2075
+ ProxyCmp({
2076
+ inputs: ['checked', 'disabled', 'fieldId', 'label', 'name', 'value'],
2077
+ })
2078
+ ], AmplifyCheckbox);
2079
+ var AmplifyCodeField = /** @class */ (function () {
2080
+ function AmplifyCodeField(c, r, z) {
2081
+ this.z = z;
2082
+ c.detach();
2083
+ this.el = r.nativeElement;
2084
+ }
2085
+ return AmplifyCodeField;
2086
+ }());
2087
+ AmplifyCodeField.decorators = [
2088
+ { type: i0.Component, args: [{
2089
+ selector: 'amplify-code-field',
2090
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2091
+ template: '<ng-content></ng-content>',
2092
+ inputs: [
2093
+ 'disabled',
2094
+ 'fieldId',
2095
+ 'handleInputChange',
2096
+ 'hint',
2097
+ 'inputProps',
2098
+ 'label',
2099
+ 'placeholder',
2100
+ 'required',
2101
+ 'value',
2102
+ ]
2103
+ },] }
2104
+ ];
2105
+ AmplifyCodeField.ctorParameters = function () { return [
2106
+ { type: i0.ChangeDetectorRef },
2107
+ { type: i0.ElementRef },
2108
+ { type: i0.NgZone }
2109
+ ]; };
2110
+ AmplifyCodeField = __decorate([
2111
+ ProxyCmp({
2112
+ inputs: [
2113
+ 'disabled',
2114
+ 'fieldId',
2115
+ 'handleInputChange',
2116
+ 'hint',
2117
+ 'inputProps',
2118
+ 'label',
2119
+ 'placeholder',
2120
+ 'required',
2121
+ 'value',
2122
+ ],
2123
+ })
2124
+ ], AmplifyCodeField);
2125
+ var AmplifyConfirmSignIn = /** @class */ (function () {
2126
+ function AmplifyConfirmSignIn(c, r, z) {
2127
+ this.z = z;
2128
+ c.detach();
2129
+ this.el = r.nativeElement;
2130
+ }
2131
+ return AmplifyConfirmSignIn;
2132
+ }());
2133
+ AmplifyConfirmSignIn.decorators = [
2134
+ { type: i0.Component, args: [{
2135
+ selector: 'amplify-confirm-sign-in',
2136
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2137
+ template: '<ng-content></ng-content>',
2138
+ inputs: [
2139
+ 'formFields',
2140
+ 'handleAuthStateChange',
2141
+ 'handleSubmit',
2142
+ 'headerText',
2143
+ 'submitButtonText',
2144
+ 'user',
2145
+ ]
2146
+ },] }
2147
+ ];
2148
+ AmplifyConfirmSignIn.ctorParameters = function () { return [
2149
+ { type: i0.ChangeDetectorRef },
2150
+ { type: i0.ElementRef },
2151
+ { type: i0.NgZone }
2152
+ ]; };
2153
+ AmplifyConfirmSignIn = __decorate([
2154
+ ProxyCmp({
2155
+ inputs: [
2156
+ 'formFields',
2157
+ 'handleAuthStateChange',
2158
+ 'handleSubmit',
2159
+ 'headerText',
2160
+ 'submitButtonText',
2161
+ 'user',
2162
+ ],
2163
+ })
2164
+ ], AmplifyConfirmSignIn);
2165
+ var AmplifyConfirmSignUp = /** @class */ (function () {
2166
+ function AmplifyConfirmSignUp(c, r, z) {
2167
+ this.z = z;
2168
+ c.detach();
2169
+ this.el = r.nativeElement;
2170
+ }
2171
+ return AmplifyConfirmSignUp;
2172
+ }());
2173
+ AmplifyConfirmSignUp.decorators = [
2174
+ { type: i0.Component, args: [{
2175
+ selector: 'amplify-confirm-sign-up',
2176
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2177
+ template: '<ng-content></ng-content>',
2178
+ inputs: [
2179
+ 'formFields',
2180
+ 'handleAuthStateChange',
2181
+ 'handleSubmit',
2182
+ 'headerText',
2183
+ 'submitButtonText',
2184
+ 'user',
2185
+ 'usernameAlias',
2186
+ ]
2187
+ },] }
2188
+ ];
2189
+ AmplifyConfirmSignUp.ctorParameters = function () { return [
2190
+ { type: i0.ChangeDetectorRef },
2191
+ { type: i0.ElementRef },
2192
+ { type: i0.NgZone }
2193
+ ]; };
2194
+ AmplifyConfirmSignUp = __decorate([
2195
+ ProxyCmp({
2196
+ inputs: [
2197
+ 'formFields',
2198
+ 'handleAuthStateChange',
2199
+ 'handleSubmit',
2200
+ 'headerText',
2201
+ 'submitButtonText',
2202
+ 'user',
2203
+ 'usernameAlias',
2204
+ ],
2205
+ })
2206
+ ], AmplifyConfirmSignUp);
2207
+ var AmplifyContainer = /** @class */ (function () {
2208
+ function AmplifyContainer(c, r, z) {
2209
+ this.z = z;
2210
+ c.detach();
2211
+ this.el = r.nativeElement;
2212
+ }
2213
+ return AmplifyContainer;
2214
+ }());
2215
+ AmplifyContainer.decorators = [
2216
+ { type: i0.Component, args: [{
2217
+ selector: 'amplify-container',
2218
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2219
+ template: '<ng-content></ng-content>'
2220
+ },] }
2221
+ ];
2222
+ AmplifyContainer.ctorParameters = function () { return [
2223
+ { type: i0.ChangeDetectorRef },
2224
+ { type: i0.ElementRef },
2225
+ { type: i0.NgZone }
2226
+ ]; };
2227
+ var AmplifyCountryDialCode = /** @class */ (function () {
2228
+ function AmplifyCountryDialCode(c, r, z) {
2229
+ this.z = z;
2230
+ c.detach();
2231
+ this.el = r.nativeElement;
2232
+ }
2233
+ return AmplifyCountryDialCode;
2234
+ }());
2235
+ AmplifyCountryDialCode.decorators = [
2236
+ { type: i0.Component, args: [{
2237
+ selector: 'amplify-country-dial-code',
2238
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2239
+ template: '<ng-content></ng-content>',
2240
+ inputs: ['dialCode', 'fieldId', 'handleInputChange', 'options']
2241
+ },] }
2242
+ ];
2243
+ AmplifyCountryDialCode.ctorParameters = function () { return [
2244
+ { type: i0.ChangeDetectorRef },
2245
+ { type: i0.ElementRef },
2246
+ { type: i0.NgZone }
2247
+ ]; };
2248
+ AmplifyCountryDialCode = __decorate([
2249
+ ProxyCmp({ inputs: ['dialCode', 'fieldId', 'handleInputChange', 'options'] })
2250
+ ], AmplifyCountryDialCode);
2251
+ var AmplifyEmailField = /** @class */ (function () {
2252
+ function AmplifyEmailField(c, r, z) {
2253
+ this.z = z;
2254
+ c.detach();
2255
+ this.el = r.nativeElement;
2256
+ }
2257
+ return AmplifyEmailField;
2258
+ }());
2259
+ AmplifyEmailField.decorators = [
2260
+ { type: i0.Component, args: [{
2261
+ selector: 'amplify-email-field',
2262
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2263
+ template: '<ng-content></ng-content>',
2264
+ inputs: [
2265
+ 'disabled',
2266
+ 'fieldId',
2267
+ 'handleInputChange',
2268
+ 'hint',
2269
+ 'inputProps',
2270
+ 'label',
2271
+ 'placeholder',
2272
+ 'required',
2273
+ 'value',
2274
+ ]
2275
+ },] }
2276
+ ];
2277
+ AmplifyEmailField.ctorParameters = function () { return [
2278
+ { type: i0.ChangeDetectorRef },
2279
+ { type: i0.ElementRef },
2280
+ { type: i0.NgZone }
2281
+ ]; };
2282
+ AmplifyEmailField = __decorate([
2283
+ ProxyCmp({
2284
+ inputs: [
2285
+ 'disabled',
2286
+ 'fieldId',
2287
+ 'handleInputChange',
2288
+ 'hint',
2289
+ 'inputProps',
2290
+ 'label',
2291
+ 'placeholder',
2292
+ 'required',
2293
+ 'value',
2294
+ ],
2295
+ })
2296
+ ], AmplifyEmailField);
2297
+ var AmplifyFacebookButton = /** @class */ (function () {
2298
+ function AmplifyFacebookButton(c, r, z) {
2299
+ this.z = z;
2300
+ c.detach();
2301
+ this.el = r.nativeElement;
2302
+ }
2303
+ return AmplifyFacebookButton;
2304
+ }());
2305
+ AmplifyFacebookButton.decorators = [
2306
+ { type: i0.Component, args: [{
2307
+ selector: 'amplify-facebook-button',
2308
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2309
+ template: '<ng-content></ng-content>',
2310
+ inputs: ['appId', 'handleAuthStateChange']
2311
+ },] }
2312
+ ];
2313
+ AmplifyFacebookButton.ctorParameters = function () { return [
2314
+ { type: i0.ChangeDetectorRef },
2315
+ { type: i0.ElementRef },
2316
+ { type: i0.NgZone }
2317
+ ]; };
2318
+ AmplifyFacebookButton = __decorate([
2319
+ ProxyCmp({ inputs: ['appId', 'handleAuthStateChange'] })
2320
+ ], AmplifyFacebookButton);
2321
+ var AmplifyFederatedButtons = /** @class */ (function () {
2322
+ function AmplifyFederatedButtons(c, r, z) {
2323
+ this.z = z;
2324
+ c.detach();
2325
+ this.el = r.nativeElement;
2326
+ }
2327
+ return AmplifyFederatedButtons;
2328
+ }());
2329
+ AmplifyFederatedButtons.decorators = [
2330
+ { type: i0.Component, args: [{
2331
+ selector: 'amplify-federated-buttons',
2332
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2333
+ template: '<ng-content></ng-content>',
2334
+ inputs: ['authState', 'federated', 'handleAuthStateChange']
2335
+ },] }
2336
+ ];
2337
+ AmplifyFederatedButtons.ctorParameters = function () { return [
2338
+ { type: i0.ChangeDetectorRef },
2339
+ { type: i0.ElementRef },
2340
+ { type: i0.NgZone }
2341
+ ]; };
2342
+ AmplifyFederatedButtons = __decorate([
2343
+ ProxyCmp({ inputs: ['authState', 'federated', 'handleAuthStateChange'] })
2344
+ ], AmplifyFederatedButtons);
2345
+ var AmplifyFederatedSignIn = /** @class */ (function () {
2346
+ function AmplifyFederatedSignIn(c, r, z) {
2347
+ this.z = z;
2348
+ c.detach();
2349
+ this.el = r.nativeElement;
2350
+ }
2351
+ return AmplifyFederatedSignIn;
2352
+ }());
2353
+ AmplifyFederatedSignIn.decorators = [
2354
+ { type: i0.Component, args: [{
2355
+ selector: 'amplify-federated-sign-in',
2356
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2357
+ template: '<ng-content></ng-content>',
2358
+ inputs: ['authState', 'federated']
2359
+ },] }
2360
+ ];
2361
+ AmplifyFederatedSignIn.ctorParameters = function () { return [
2362
+ { type: i0.ChangeDetectorRef },
2363
+ { type: i0.ElementRef },
2364
+ { type: i0.NgZone }
2365
+ ]; };
2366
+ AmplifyFederatedSignIn = __decorate([
2367
+ ProxyCmp({ inputs: ['authState', 'federated'] })
2368
+ ], AmplifyFederatedSignIn);
2369
+ var AmplifyForgotPassword = /** @class */ (function () {
2370
+ function AmplifyForgotPassword(c, r, z) {
2371
+ this.z = z;
2372
+ c.detach();
2373
+ this.el = r.nativeElement;
2374
+ }
2375
+ return AmplifyForgotPassword;
2376
+ }());
2377
+ AmplifyForgotPassword.decorators = [
2378
+ { type: i0.Component, args: [{
2379
+ selector: 'amplify-forgot-password',
2380
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2381
+ template: '<ng-content></ng-content>',
2382
+ inputs: [
2383
+ 'formFields',
2384
+ 'handleAuthStateChange',
2385
+ 'handleSend',
2386
+ 'handleSubmit',
2387
+ 'headerText',
2388
+ 'sendButtonText',
2389
+ 'submitButtonText',
2390
+ 'usernameAlias',
2391
+ ]
2392
+ },] }
2393
+ ];
2394
+ AmplifyForgotPassword.ctorParameters = function () { return [
2395
+ { type: i0.ChangeDetectorRef },
2396
+ { type: i0.ElementRef },
2397
+ { type: i0.NgZone }
2398
+ ]; };
2399
+ AmplifyForgotPassword = __decorate([
2400
+ ProxyCmp({
2401
+ inputs: [
2402
+ 'formFields',
2403
+ 'handleAuthStateChange',
2404
+ 'handleSend',
2405
+ 'handleSubmit',
2406
+ 'headerText',
2407
+ 'sendButtonText',
2408
+ 'submitButtonText',
2409
+ 'usernameAlias',
2410
+ ],
2411
+ })
2412
+ ], AmplifyForgotPassword);
2413
+ var AmplifyFormField = /** @class */ (function () {
2414
+ function AmplifyFormField(c, r, z) {
2415
+ this.z = z;
2416
+ c.detach();
2417
+ this.el = r.nativeElement;
2418
+ }
2419
+ return AmplifyFormField;
2420
+ }());
2421
+ AmplifyFormField.decorators = [
2422
+ { type: i0.Component, args: [{
2423
+ selector: 'amplify-form-field',
2424
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2425
+ template: '<ng-content></ng-content>',
2426
+ inputs: [
2427
+ 'description',
2428
+ 'disabled',
2429
+ 'fieldId',
2430
+ 'handleInputChange',
2431
+ 'hint',
2432
+ 'inputProps',
2433
+ 'label',
2434
+ 'name',
2435
+ 'placeholder',
2436
+ 'required',
2437
+ 'type',
2438
+ 'value',
2439
+ ]
2440
+ },] }
2441
+ ];
2442
+ AmplifyFormField.ctorParameters = function () { return [
2443
+ { type: i0.ChangeDetectorRef },
2444
+ { type: i0.ElementRef },
2445
+ { type: i0.NgZone }
2446
+ ]; };
2447
+ AmplifyFormField = __decorate([
2448
+ ProxyCmp({
2449
+ inputs: [
2450
+ 'description',
2451
+ 'disabled',
2452
+ 'fieldId',
2453
+ 'handleInputChange',
2454
+ 'hint',
2455
+ 'inputProps',
2456
+ 'label',
2457
+ 'name',
2458
+ 'placeholder',
2459
+ 'required',
2460
+ 'type',
2461
+ 'value',
2462
+ ],
2463
+ })
2464
+ ], AmplifyFormField);
2465
+ var AmplifyFormSection = /** @class */ (function () {
2466
+ function AmplifyFormSection(c, r, z) {
2467
+ this.z = z;
2468
+ c.detach();
2469
+ this.el = r.nativeElement;
2470
+ }
2471
+ return AmplifyFormSection;
2472
+ }());
2473
+ AmplifyFormSection.decorators = [
2474
+ { type: i0.Component, args: [{
2475
+ selector: 'amplify-form-section',
2476
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2477
+ template: '<ng-content></ng-content>',
2478
+ inputs: [
2479
+ 'handleSubmit',
2480
+ 'headerText',
2481
+ 'loading',
2482
+ 'secondaryFooterContent',
2483
+ 'submitButtonText',
2484
+ 'testDataPrefix',
2485
+ ]
2486
+ },] }
2487
+ ];
2488
+ AmplifyFormSection.ctorParameters = function () { return [
2489
+ { type: i0.ChangeDetectorRef },
2490
+ { type: i0.ElementRef },
2491
+ { type: i0.NgZone }
2492
+ ]; };
2493
+ AmplifyFormSection = __decorate([
2494
+ ProxyCmp({
2495
+ inputs: [
2496
+ 'handleSubmit',
2497
+ 'headerText',
2498
+ 'loading',
2499
+ 'secondaryFooterContent',
2500
+ 'submitButtonText',
2501
+ 'testDataPrefix',
2502
+ ],
2503
+ })
2504
+ ], AmplifyFormSection);
2505
+ var AmplifyGoogleButton = /** @class */ (function () {
2506
+ function AmplifyGoogleButton(c, r, z) {
2507
+ this.z = z;
2508
+ c.detach();
2509
+ this.el = r.nativeElement;
2510
+ }
2511
+ return AmplifyGoogleButton;
2512
+ }());
2513
+ AmplifyGoogleButton.decorators = [
2514
+ { type: i0.Component, args: [{
2515
+ selector: 'amplify-google-button',
2516
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2517
+ template: '<ng-content></ng-content>',
2518
+ inputs: ['clientId', 'handleAuthStateChange']
2519
+ },] }
2520
+ ];
2521
+ AmplifyGoogleButton.ctorParameters = function () { return [
2522
+ { type: i0.ChangeDetectorRef },
2523
+ { type: i0.ElementRef },
2524
+ { type: i0.NgZone }
2525
+ ]; };
2526
+ AmplifyGoogleButton = __decorate([
2527
+ ProxyCmp({ inputs: ['clientId', 'handleAuthStateChange'] })
2528
+ ], AmplifyGoogleButton);
2529
+ var AmplifyGreetings = /** @class */ (function () {
2530
+ function AmplifyGreetings(c, r, z) {
2531
+ this.z = z;
2532
+ c.detach();
2533
+ this.el = r.nativeElement;
2534
+ }
2535
+ return AmplifyGreetings;
2536
+ }());
2537
+ AmplifyGreetings.decorators = [
2538
+ { type: i0.Component, args: [{
2539
+ selector: 'amplify-greetings',
2540
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2541
+ template: '<ng-content></ng-content>',
2542
+ inputs: ['handleAuthStateChange', 'logo', 'username']
2543
+ },] }
2544
+ ];
2545
+ AmplifyGreetings.ctorParameters = function () { return [
2546
+ { type: i0.ChangeDetectorRef },
2547
+ { type: i0.ElementRef },
2548
+ { type: i0.NgZone }
2549
+ ]; };
2550
+ AmplifyGreetings = __decorate([
2551
+ ProxyCmp({ inputs: ['handleAuthStateChange', 'logo', 'username'] })
2552
+ ], AmplifyGreetings);
2553
+ var AmplifyHint = /** @class */ (function () {
2554
+ function AmplifyHint(c, r, z) {
2555
+ this.z = z;
2556
+ c.detach();
2557
+ this.el = r.nativeElement;
2558
+ }
2559
+ return AmplifyHint;
2560
+ }());
2561
+ AmplifyHint.decorators = [
2562
+ { type: i0.Component, args: [{
2563
+ selector: 'amplify-hint',
2564
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2565
+ template: '<ng-content></ng-content>'
2566
+ },] }
2567
+ ];
2568
+ AmplifyHint.ctorParameters = function () { return [
2569
+ { type: i0.ChangeDetectorRef },
2570
+ { type: i0.ElementRef },
2571
+ { type: i0.NgZone }
2572
+ ]; };
2573
+ var AmplifyIcon = /** @class */ (function () {
2574
+ function AmplifyIcon(c, r, z) {
2575
+ this.z = z;
2576
+ c.detach();
2577
+ this.el = r.nativeElement;
2578
+ }
2579
+ return AmplifyIcon;
2580
+ }());
2581
+ AmplifyIcon.decorators = [
2582
+ { type: i0.Component, args: [{
2583
+ selector: 'amplify-icon',
2584
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2585
+ template: '<ng-content></ng-content>',
2586
+ inputs: ['name']
2587
+ },] }
2588
+ ];
2589
+ AmplifyIcon.ctorParameters = function () { return [
2590
+ { type: i0.ChangeDetectorRef },
2591
+ { type: i0.ElementRef },
2592
+ { type: i0.NgZone }
2593
+ ]; };
2594
+ AmplifyIcon = __decorate([
2595
+ ProxyCmp({ inputs: ['name'] })
2596
+ ], AmplifyIcon);
2597
+ var AmplifyIconButton = /** @class */ (function () {
2598
+ function AmplifyIconButton(c, r, z) {
2599
+ this.z = z;
2600
+ c.detach();
2601
+ this.el = r.nativeElement;
2602
+ }
2603
+ return AmplifyIconButton;
2604
+ }());
2605
+ AmplifyIconButton.decorators = [
2606
+ { type: i0.Component, args: [{
2607
+ selector: 'amplify-icon-button',
2608
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2609
+ template: '<ng-content></ng-content>',
2610
+ inputs: ['autoShowTooltip', 'name', 'tooltip']
2611
+ },] }
2612
+ ];
2613
+ AmplifyIconButton.ctorParameters = function () { return [
2614
+ { type: i0.ChangeDetectorRef },
2615
+ { type: i0.ElementRef },
2616
+ { type: i0.NgZone }
2617
+ ]; };
2618
+ AmplifyIconButton = __decorate([
2619
+ ProxyCmp({ inputs: ['autoShowTooltip', 'name', 'tooltip'] })
2620
+ ], AmplifyIconButton);
2621
+ exports.AmplifyInput = /** @class */ (function () {
2622
+ function AmplifyInput(c, r, z) {
2623
+ this.z = z;
2624
+ c.detach();
2625
+ this.el = r.nativeElement;
2626
+ }
2627
+ return AmplifyInput;
2628
+ }());
2629
+ exports.AmplifyInput.decorators = [
2630
+ { type: i0.Component, args: [{
2631
+ selector: 'amplify-input',
2632
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2633
+ template: '<ng-content></ng-content>',
2634
+ inputs: [
2635
+ 'description',
2636
+ 'disabled',
2637
+ 'fieldId',
2638
+ 'handleInputChange',
2639
+ 'inputProps',
2640
+ 'name',
2641
+ 'placeholder',
2642
+ 'required',
2643
+ 'type',
2644
+ 'value',
2645
+ ]
2646
+ },] }
2647
+ ];
2648
+ exports.AmplifyInput.ctorParameters = function () { return [
2649
+ { type: i0.ChangeDetectorRef },
2650
+ { type: i0.ElementRef },
2651
+ { type: i0.NgZone }
2652
+ ]; };
2653
+ exports.AmplifyInput = __decorate([
2654
+ ProxyCmp({
2655
+ inputs: [
2656
+ 'description',
2657
+ 'disabled',
2658
+ 'fieldId',
2659
+ 'handleInputChange',
2660
+ 'inputProps',
2661
+ 'name',
2662
+ 'placeholder',
2663
+ 'required',
2664
+ 'type',
2665
+ 'value',
2666
+ ],
2667
+ })
2668
+ ], exports.AmplifyInput);
2669
+ var AmplifyLabel = /** @class */ (function () {
2670
+ function AmplifyLabel(c, r, z) {
2671
+ this.z = z;
2672
+ c.detach();
2673
+ this.el = r.nativeElement;
2674
+ }
2675
+ return AmplifyLabel;
2676
+ }());
2677
+ AmplifyLabel.decorators = [
2678
+ { type: i0.Component, args: [{
2679
+ selector: 'amplify-label',
2680
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2681
+ template: '<ng-content></ng-content>',
2682
+ inputs: ['htmlFor']
2683
+ },] }
2684
+ ];
2685
+ AmplifyLabel.ctorParameters = function () { return [
2686
+ { type: i0.ChangeDetectorRef },
2687
+ { type: i0.ElementRef },
2688
+ { type: i0.NgZone }
2689
+ ]; };
2690
+ AmplifyLabel = __decorate([
2691
+ ProxyCmp({ inputs: ['htmlFor'] })
2692
+ ], AmplifyLabel);
2693
+ var AmplifyLink = /** @class */ (function () {
2694
+ function AmplifyLink(c, r, z) {
2695
+ this.z = z;
2696
+ c.detach();
2697
+ this.el = r.nativeElement;
2698
+ }
2699
+ return AmplifyLink;
2700
+ }());
2701
+ AmplifyLink.decorators = [
2702
+ { type: i0.Component, args: [{
2703
+ selector: 'amplify-link',
2704
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2705
+ template: '<ng-content></ng-content>',
2706
+ inputs: ['role']
2707
+ },] }
2708
+ ];
2709
+ AmplifyLink.ctorParameters = function () { return [
2710
+ { type: i0.ChangeDetectorRef },
2711
+ { type: i0.ElementRef },
2712
+ { type: i0.NgZone }
2713
+ ]; };
2714
+ AmplifyLink = __decorate([
2715
+ ProxyCmp({ inputs: ['role'] })
2716
+ ], AmplifyLink);
2717
+ var AmplifyLoadingSpinner = /** @class */ (function () {
2718
+ function AmplifyLoadingSpinner(c, r, z) {
2719
+ this.z = z;
2720
+ c.detach();
2721
+ this.el = r.nativeElement;
2722
+ }
2723
+ return AmplifyLoadingSpinner;
2724
+ }());
2725
+ AmplifyLoadingSpinner.decorators = [
2726
+ { type: i0.Component, args: [{
2727
+ selector: 'amplify-loading-spinner',
2728
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2729
+ template: '<ng-content></ng-content>'
2730
+ },] }
2731
+ ];
2732
+ AmplifyLoadingSpinner.ctorParameters = function () { return [
2733
+ { type: i0.ChangeDetectorRef },
2734
+ { type: i0.ElementRef },
2735
+ { type: i0.NgZone }
2736
+ ]; };
2737
+ var AmplifyNav = /** @class */ (function () {
2738
+ function AmplifyNav(c, r, z) {
2739
+ this.z = z;
2740
+ c.detach();
2741
+ this.el = r.nativeElement;
2742
+ }
2743
+ return AmplifyNav;
2744
+ }());
2745
+ AmplifyNav.decorators = [
2746
+ { type: i0.Component, args: [{
2747
+ selector: 'amplify-nav',
2748
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2749
+ template: '<ng-content></ng-content>'
2750
+ },] }
2751
+ ];
2752
+ AmplifyNav.ctorParameters = function () { return [
2753
+ { type: i0.ChangeDetectorRef },
2754
+ { type: i0.ElementRef },
2755
+ { type: i0.NgZone }
2756
+ ]; };
2757
+ var AmplifyOauthButton = /** @class */ (function () {
2758
+ function AmplifyOauthButton(c, r, z) {
2759
+ this.z = z;
2760
+ c.detach();
2761
+ this.el = r.nativeElement;
2762
+ }
2763
+ return AmplifyOauthButton;
2764
+ }());
2765
+ AmplifyOauthButton.decorators = [
2766
+ { type: i0.Component, args: [{
2767
+ selector: 'amplify-oauth-button',
2768
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2769
+ template: '<ng-content></ng-content>',
2770
+ inputs: ['config']
2771
+ },] }
2772
+ ];
2773
+ AmplifyOauthButton.ctorParameters = function () { return [
2774
+ { type: i0.ChangeDetectorRef },
2775
+ { type: i0.ElementRef },
2776
+ { type: i0.NgZone }
2777
+ ]; };
2778
+ AmplifyOauthButton = __decorate([
2779
+ ProxyCmp({ inputs: ['config'] })
2780
+ ], AmplifyOauthButton);
2781
+ var AmplifyPasswordField = /** @class */ (function () {
2782
+ function AmplifyPasswordField(c, r, z) {
2783
+ this.z = z;
2784
+ c.detach();
2785
+ this.el = r.nativeElement;
2786
+ }
2787
+ return AmplifyPasswordField;
2788
+ }());
2789
+ AmplifyPasswordField.decorators = [
2790
+ { type: i0.Component, args: [{
2791
+ selector: 'amplify-password-field',
2792
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2793
+ template: '<ng-content></ng-content>',
2794
+ inputs: [
2795
+ 'disabled',
2796
+ 'fieldId',
2797
+ 'handleInputChange',
2798
+ 'hint',
2799
+ 'inputProps',
2800
+ 'label',
2801
+ 'placeholder',
2802
+ 'required',
2803
+ 'value',
2804
+ ]
2805
+ },] }
2806
+ ];
2807
+ AmplifyPasswordField.ctorParameters = function () { return [
2808
+ { type: i0.ChangeDetectorRef },
2809
+ { type: i0.ElementRef },
2810
+ { type: i0.NgZone }
2811
+ ]; };
2812
+ AmplifyPasswordField = __decorate([
2813
+ ProxyCmp({
2814
+ inputs: [
2815
+ 'disabled',
2816
+ 'fieldId',
2817
+ 'handleInputChange',
2818
+ 'hint',
2819
+ 'inputProps',
2820
+ 'label',
2821
+ 'placeholder',
2822
+ 'required',
2823
+ 'value',
2824
+ ],
2825
+ })
2826
+ ], AmplifyPasswordField);
2827
+ var AmplifyPhoneField = /** @class */ (function () {
2828
+ function AmplifyPhoneField(c, r, z) {
2829
+ this.z = z;
2830
+ c.detach();
2831
+ this.el = r.nativeElement;
2832
+ }
2833
+ return AmplifyPhoneField;
2834
+ }());
2835
+ AmplifyPhoneField.decorators = [
2836
+ { type: i0.Component, args: [{
2837
+ selector: 'amplify-phone-field',
2838
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2839
+ template: '<ng-content></ng-content>',
2840
+ inputs: [
2841
+ 'dialCode',
2842
+ 'disabled',
2843
+ 'fieldId',
2844
+ 'handleInputChange',
2845
+ 'hint',
2846
+ 'inputProps',
2847
+ 'label',
2848
+ 'placeholder',
2849
+ 'required',
2850
+ 'value',
2851
+ ]
2852
+ },] }
2853
+ ];
2854
+ AmplifyPhoneField.ctorParameters = function () { return [
2855
+ { type: i0.ChangeDetectorRef },
2856
+ { type: i0.ElementRef },
2857
+ { type: i0.NgZone }
2858
+ ]; };
2859
+ AmplifyPhoneField = __decorate([
2860
+ ProxyCmp({
2861
+ inputs: [
2862
+ 'dialCode',
2863
+ 'disabled',
2864
+ 'fieldId',
2865
+ 'handleInputChange',
2866
+ 'hint',
2867
+ 'inputProps',
2868
+ 'label',
2869
+ 'placeholder',
2870
+ 'required',
2871
+ 'value',
2872
+ ],
2873
+ })
2874
+ ], AmplifyPhoneField);
2875
+ exports.AmplifyPhotoPicker = /** @class */ (function () {
2876
+ function AmplifyPhotoPicker(c, r, z) {
2877
+ this.z = z;
2878
+ c.detach();
2879
+ this.el = r.nativeElement;
2880
+ }
2881
+ return AmplifyPhotoPicker;
2882
+ }());
2883
+ exports.AmplifyPhotoPicker.decorators = [
2884
+ { type: i0.Component, args: [{
2885
+ selector: 'amplify-photo-picker',
2886
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2887
+ template: '<ng-content></ng-content>',
2888
+ inputs: [
2889
+ 'buttonText',
2890
+ 'handleClick',
2891
+ 'headerHint',
2892
+ 'headerTitle',
2893
+ 'placeholderHint',
2894
+ 'previewSrc',
2895
+ ]
2896
+ },] }
2897
+ ];
2898
+ exports.AmplifyPhotoPicker.ctorParameters = function () { return [
2899
+ { type: i0.ChangeDetectorRef },
2900
+ { type: i0.ElementRef },
2901
+ { type: i0.NgZone }
2902
+ ]; };
2903
+ exports.AmplifyPhotoPicker = __decorate([
2904
+ ProxyCmp({
2905
+ inputs: [
2906
+ 'buttonText',
2907
+ 'handleClick',
2908
+ 'headerHint',
2909
+ 'headerTitle',
2910
+ 'placeholderHint',
2911
+ 'previewSrc',
2912
+ ],
2913
+ })
2914
+ ], exports.AmplifyPhotoPicker);
2915
+ exports.AmplifyPicker = /** @class */ (function () {
2916
+ function AmplifyPicker(c, r, z) {
2917
+ this.z = z;
2918
+ c.detach();
2919
+ this.el = r.nativeElement;
2920
+ }
2921
+ return AmplifyPicker;
2922
+ }());
2923
+ exports.AmplifyPicker.decorators = [
2924
+ { type: i0.Component, args: [{
2925
+ selector: 'amplify-picker',
2926
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2927
+ template: '<ng-content></ng-content>',
2928
+ inputs: ['acceptValue', 'inputHandler', 'pickerText']
2929
+ },] }
2930
+ ];
2931
+ exports.AmplifyPicker.ctorParameters = function () { return [
2932
+ { type: i0.ChangeDetectorRef },
2933
+ { type: i0.ElementRef },
2934
+ { type: i0.NgZone }
2935
+ ]; };
2936
+ exports.AmplifyPicker = __decorate([
2937
+ ProxyCmp({ inputs: ['acceptValue', 'inputHandler', 'pickerText'] })
2938
+ ], exports.AmplifyPicker);
2939
+ var AmplifyRadioButton = /** @class */ (function () {
2940
+ function AmplifyRadioButton(c, r, z) {
2941
+ this.z = z;
2942
+ c.detach();
2943
+ this.el = r.nativeElement;
2944
+ }
2945
+ return AmplifyRadioButton;
2946
+ }());
2947
+ AmplifyRadioButton.decorators = [
2948
+ { type: i0.Component, args: [{
2949
+ selector: 'amplify-radio-button',
2950
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2951
+ template: '<ng-content></ng-content>',
2952
+ inputs: [
2953
+ 'checked',
2954
+ 'disabled',
2955
+ 'fieldId',
2956
+ 'handleInputChange',
2957
+ 'inputProps',
2958
+ 'label',
2959
+ 'name',
2960
+ 'placeholder',
2961
+ 'value',
2962
+ ]
2963
+ },] }
2964
+ ];
2965
+ AmplifyRadioButton.ctorParameters = function () { return [
2966
+ { type: i0.ChangeDetectorRef },
2967
+ { type: i0.ElementRef },
2968
+ { type: i0.NgZone }
2969
+ ]; };
2970
+ AmplifyRadioButton = __decorate([
2971
+ ProxyCmp({
2972
+ inputs: [
2973
+ 'checked',
2974
+ 'disabled',
2975
+ 'fieldId',
2976
+ 'handleInputChange',
2977
+ 'inputProps',
2978
+ 'label',
2979
+ 'name',
2980
+ 'placeholder',
2981
+ 'value',
2982
+ ],
2983
+ })
2984
+ ], AmplifyRadioButton);
2985
+ var AmplifyRequireNewPassword = /** @class */ (function () {
2986
+ function AmplifyRequireNewPassword(c, r, z) {
2987
+ this.z = z;
2988
+ c.detach();
2989
+ this.el = r.nativeElement;
2990
+ }
2991
+ return AmplifyRequireNewPassword;
2992
+ }());
2993
+ AmplifyRequireNewPassword.decorators = [
2994
+ { type: i0.Component, args: [{
2995
+ selector: 'amplify-require-new-password',
2996
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
2997
+ template: '<ng-content></ng-content>',
2998
+ inputs: [
2999
+ 'formFields',
3000
+ 'handleAuthStateChange',
3001
+ 'handleSubmit',
3002
+ 'headerText',
3003
+ 'submitButtonText',
3004
+ 'user',
3005
+ ]
3006
+ },] }
3007
+ ];
3008
+ AmplifyRequireNewPassword.ctorParameters = function () { return [
3009
+ { type: i0.ChangeDetectorRef },
3010
+ { type: i0.ElementRef },
3011
+ { type: i0.NgZone }
3012
+ ]; };
3013
+ AmplifyRequireNewPassword = __decorate([
3014
+ ProxyCmp({
3015
+ inputs: [
3016
+ 'formFields',
3017
+ 'handleAuthStateChange',
3018
+ 'handleSubmit',
3019
+ 'headerText',
3020
+ 'submitButtonText',
3021
+ 'user',
3022
+ ],
3023
+ })
3024
+ ], AmplifyRequireNewPassword);
3025
+ exports.AmplifyS3Album = /** @class */ (function () {
3026
+ function AmplifyS3Album(c, r, z) {
3027
+ this.z = z;
3028
+ c.detach();
3029
+ this.el = r.nativeElement;
3030
+ }
3031
+ return AmplifyS3Album;
3032
+ }());
3033
+ exports.AmplifyS3Album.decorators = [
3034
+ { type: i0.Component, args: [{
3035
+ selector: 'amplify-s3-album',
3036
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3037
+ template: '<ng-content></ng-content>',
3038
+ inputs: [
3039
+ 'contentType',
3040
+ 'fileToKey',
3041
+ 'filter',
3042
+ 'handleOnError',
3043
+ 'handleOnLoad',
3044
+ 'identityId',
3045
+ 'level',
3046
+ 'path',
3047
+ 'picker',
3048
+ 'pickerText',
3049
+ 'sort',
3050
+ 'track',
3051
+ ]
3052
+ },] }
3053
+ ];
3054
+ exports.AmplifyS3Album.ctorParameters = function () { return [
3055
+ { type: i0.ChangeDetectorRef },
3056
+ { type: i0.ElementRef },
3057
+ { type: i0.NgZone }
3058
+ ]; };
3059
+ exports.AmplifyS3Album = __decorate([
3060
+ ProxyCmp({
3061
+ inputs: [
3062
+ 'contentType',
3063
+ 'fileToKey',
3064
+ 'filter',
3065
+ 'handleOnError',
3066
+ 'handleOnLoad',
3067
+ 'identityId',
3068
+ 'level',
3069
+ 'path',
3070
+ 'picker',
3071
+ 'pickerText',
3072
+ 'sort',
3073
+ 'track',
3074
+ ],
3075
+ })
3076
+ ], exports.AmplifyS3Album);
3077
+ exports.AmplifyS3Image = /** @class */ (function () {
3078
+ function AmplifyS3Image(c, r, z) {
3079
+ this.z = z;
3080
+ c.detach();
3081
+ this.el = r.nativeElement;
3082
+ }
3083
+ return AmplifyS3Image;
3084
+ }());
3085
+ exports.AmplifyS3Image.decorators = [
3086
+ { type: i0.Component, args: [{
3087
+ selector: 'amplify-s3-image',
3088
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3089
+ template: '<ng-content></ng-content>',
3090
+ inputs: [
3091
+ 'alt',
3092
+ 'body',
3093
+ 'contentType',
3094
+ 'handleOnError',
3095
+ 'handleOnLoad',
3096
+ 'identityId',
3097
+ 'imgKey',
3098
+ 'imgProps',
3099
+ 'level',
3100
+ 'path',
3101
+ 'track',
3102
+ ]
3103
+ },] }
3104
+ ];
3105
+ exports.AmplifyS3Image.ctorParameters = function () { return [
3106
+ { type: i0.ChangeDetectorRef },
3107
+ { type: i0.ElementRef },
3108
+ { type: i0.NgZone }
3109
+ ]; };
3110
+ exports.AmplifyS3Image = __decorate([
3111
+ ProxyCmp({
3112
+ inputs: [
3113
+ 'alt',
3114
+ 'body',
3115
+ 'contentType',
3116
+ 'handleOnError',
3117
+ 'handleOnLoad',
3118
+ 'identityId',
3119
+ 'imgKey',
3120
+ 'imgProps',
3121
+ 'level',
3122
+ 'path',
3123
+ 'track',
3124
+ ],
3125
+ })
3126
+ ], exports.AmplifyS3Image);
3127
+ exports.AmplifyS3ImagePicker = /** @class */ (function () {
3128
+ function AmplifyS3ImagePicker(c, r, z) {
3129
+ this.z = z;
3130
+ c.detach();
3131
+ this.el = r.nativeElement;
3132
+ }
3133
+ return AmplifyS3ImagePicker;
3134
+ }());
3135
+ exports.AmplifyS3ImagePicker.decorators = [
3136
+ { type: i0.Component, args: [{
3137
+ selector: 'amplify-s3-image-picker',
3138
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3139
+ template: '<ng-content></ng-content>',
3140
+ inputs: [
3141
+ 'buttonText',
3142
+ 'contentType',
3143
+ 'fileToKey',
3144
+ 'headerHint',
3145
+ 'headerTitle',
3146
+ 'identityId',
3147
+ 'level',
3148
+ 'path',
3149
+ 'placeholderHint',
3150
+ 'track',
3151
+ ]
3152
+ },] }
3153
+ ];
3154
+ exports.AmplifyS3ImagePicker.ctorParameters = function () { return [
3155
+ { type: i0.ChangeDetectorRef },
3156
+ { type: i0.ElementRef },
3157
+ { type: i0.NgZone }
3158
+ ]; };
3159
+ exports.AmplifyS3ImagePicker = __decorate([
3160
+ ProxyCmp({
3161
+ inputs: [
3162
+ 'buttonText',
3163
+ 'contentType',
3164
+ 'fileToKey',
3165
+ 'headerHint',
3166
+ 'headerTitle',
3167
+ 'identityId',
3168
+ 'level',
3169
+ 'path',
3170
+ 'placeholderHint',
3171
+ 'track',
3172
+ ],
3173
+ })
3174
+ ], exports.AmplifyS3ImagePicker);
3175
+ exports.AmplifyS3Text = /** @class */ (function () {
3176
+ function AmplifyS3Text(c, r, z) {
3177
+ this.z = z;
3178
+ c.detach();
3179
+ this.el = r.nativeElement;
3180
+ }
3181
+ return AmplifyS3Text;
3182
+ }());
3183
+ exports.AmplifyS3Text.decorators = [
3184
+ { type: i0.Component, args: [{
3185
+ selector: 'amplify-s3-text',
3186
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3187
+ template: '<ng-content></ng-content>',
3188
+ inputs: [
3189
+ 'body',
3190
+ 'contentType',
3191
+ 'fallbackText',
3192
+ 'identityId',
3193
+ 'level',
3194
+ 'path',
3195
+ 'textKey',
3196
+ 'track',
3197
+ ]
3198
+ },] }
3199
+ ];
3200
+ exports.AmplifyS3Text.ctorParameters = function () { return [
3201
+ { type: i0.ChangeDetectorRef },
3202
+ { type: i0.ElementRef },
3203
+ { type: i0.NgZone }
3204
+ ]; };
3205
+ exports.AmplifyS3Text = __decorate([
3206
+ ProxyCmp({
3207
+ inputs: [
3208
+ 'body',
3209
+ 'contentType',
3210
+ 'fallbackText',
3211
+ 'identityId',
3212
+ 'level',
3213
+ 'path',
3214
+ 'textKey',
3215
+ 'track',
3216
+ ],
3217
+ })
3218
+ ], exports.AmplifyS3Text);
3219
+ exports.AmplifyS3TextPicker = /** @class */ (function () {
3220
+ function AmplifyS3TextPicker(c, r, z) {
3221
+ this.z = z;
3222
+ c.detach();
3223
+ this.el = r.nativeElement;
3224
+ }
3225
+ return AmplifyS3TextPicker;
3226
+ }());
3227
+ exports.AmplifyS3TextPicker.decorators = [
3228
+ { type: i0.Component, args: [{
3229
+ selector: 'amplify-s3-text-picker',
3230
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3231
+ template: '<ng-content></ng-content>',
3232
+ inputs: [
3233
+ 'contentType',
3234
+ 'fallbackText',
3235
+ 'fileToKey',
3236
+ 'identityId',
3237
+ 'level',
3238
+ 'path',
3239
+ 'track',
3240
+ ]
3241
+ },] }
3242
+ ];
3243
+ exports.AmplifyS3TextPicker.ctorParameters = function () { return [
3244
+ { type: i0.ChangeDetectorRef },
3245
+ { type: i0.ElementRef },
3246
+ { type: i0.NgZone }
3247
+ ]; };
3248
+ exports.AmplifyS3TextPicker = __decorate([
3249
+ ProxyCmp({
3250
+ inputs: [
3251
+ 'contentType',
3252
+ 'fallbackText',
3253
+ 'fileToKey',
3254
+ 'identityId',
3255
+ 'level',
3256
+ 'path',
3257
+ 'track',
3258
+ ],
3259
+ })
3260
+ ], exports.AmplifyS3TextPicker);
3261
+ var AmplifySection = /** @class */ (function () {
3262
+ function AmplifySection(c, r, z) {
3263
+ this.z = z;
3264
+ c.detach();
3265
+ this.el = r.nativeElement;
3266
+ }
3267
+ return AmplifySection;
3268
+ }());
3269
+ AmplifySection.decorators = [
3270
+ { type: i0.Component, args: [{
3271
+ selector: 'amplify-section',
3272
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3273
+ template: '<ng-content></ng-content>',
3274
+ inputs: ['role']
3275
+ },] }
3276
+ ];
3277
+ AmplifySection.ctorParameters = function () { return [
3278
+ { type: i0.ChangeDetectorRef },
3279
+ { type: i0.ElementRef },
3280
+ { type: i0.NgZone }
3281
+ ]; };
3282
+ AmplifySection = __decorate([
3283
+ ProxyCmp({ inputs: ['role'] })
3284
+ ], AmplifySection);
3285
+ var AmplifySelect = /** @class */ (function () {
3286
+ function AmplifySelect(c, r, z) {
3287
+ this.z = z;
3288
+ c.detach();
3289
+ this.el = r.nativeElement;
3290
+ }
3291
+ return AmplifySelect;
3292
+ }());
3293
+ AmplifySelect.decorators = [
3294
+ { type: i0.Component, args: [{
3295
+ selector: 'amplify-select',
3296
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3297
+ template: '<ng-content></ng-content>',
3298
+ inputs: ['fieldId', 'handleInputChange', 'options', 'selected']
3299
+ },] }
3300
+ ];
3301
+ AmplifySelect.ctorParameters = function () { return [
3302
+ { type: i0.ChangeDetectorRef },
3303
+ { type: i0.ElementRef },
3304
+ { type: i0.NgZone }
3305
+ ]; };
3306
+ AmplifySelect = __decorate([
3307
+ ProxyCmp({ inputs: ['fieldId', 'handleInputChange', 'options', 'selected'] })
3308
+ ], AmplifySelect);
3309
+ var AmplifySelectMfaType = /** @class */ (function () {
3310
+ function AmplifySelectMfaType(c, r, z) {
3311
+ this.z = z;
3312
+ c.detach();
3313
+ this.el = r.nativeElement;
3314
+ }
3315
+ return AmplifySelectMfaType;
3316
+ }());
3317
+ AmplifySelectMfaType.decorators = [
3318
+ { type: i0.Component, args: [{
3319
+ selector: 'amplify-select-mfa-type',
3320
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3321
+ template: '<ng-content></ng-content>',
3322
+ inputs: ['MFATypes', 'authData', 'handleSubmit']
3323
+ },] }
3324
+ ];
3325
+ AmplifySelectMfaType.ctorParameters = function () { return [
3326
+ { type: i0.ChangeDetectorRef },
3327
+ { type: i0.ElementRef },
3328
+ { type: i0.NgZone }
3329
+ ]; };
3330
+ AmplifySelectMfaType = __decorate([
3331
+ ProxyCmp({ inputs: ['MFATypes', 'authData', 'handleSubmit'] })
3332
+ ], AmplifySelectMfaType);
3333
+ var AmplifySignIn = /** @class */ (function () {
3334
+ function AmplifySignIn(c, r, z) {
3335
+ this.z = z;
3336
+ c.detach();
3337
+ this.el = r.nativeElement;
3338
+ }
3339
+ return AmplifySignIn;
3340
+ }());
3341
+ AmplifySignIn.decorators = [
3342
+ { type: i0.Component, args: [{
3343
+ selector: 'amplify-sign-in',
3344
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3345
+ template: '<ng-content></ng-content>',
3346
+ inputs: [
3347
+ 'federated',
3348
+ 'formFields',
3349
+ 'handleAuthStateChange',
3350
+ 'handleSubmit',
3351
+ 'headerText',
3352
+ 'hideSignUp',
3353
+ 'submitButtonText',
3354
+ 'usernameAlias',
3355
+ ]
3356
+ },] }
3357
+ ];
3358
+ AmplifySignIn.ctorParameters = function () { return [
3359
+ { type: i0.ChangeDetectorRef },
3360
+ { type: i0.ElementRef },
3361
+ { type: i0.NgZone }
3362
+ ]; };
3363
+ AmplifySignIn = __decorate([
3364
+ ProxyCmp({
3365
+ inputs: [
3366
+ 'federated',
3367
+ 'formFields',
3368
+ 'handleAuthStateChange',
3369
+ 'handleSubmit',
3370
+ 'headerText',
3371
+ 'hideSignUp',
3372
+ 'submitButtonText',
3373
+ 'usernameAlias',
3374
+ ],
3375
+ })
3376
+ ], AmplifySignIn);
3377
+ var AmplifySignInButton = /** @class */ (function () {
3378
+ function AmplifySignInButton(c, r, z) {
3379
+ this.z = z;
3380
+ c.detach();
3381
+ this.el = r.nativeElement;
3382
+ }
3383
+ return AmplifySignInButton;
3384
+ }());
3385
+ AmplifySignInButton.decorators = [
3386
+ { type: i0.Component, args: [{
3387
+ selector: 'amplify-sign-in-button',
3388
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3389
+ template: '<ng-content></ng-content>',
3390
+ inputs: ['provider']
3391
+ },] }
3392
+ ];
3393
+ AmplifySignInButton.ctorParameters = function () { return [
3394
+ { type: i0.ChangeDetectorRef },
3395
+ { type: i0.ElementRef },
3396
+ { type: i0.NgZone }
3397
+ ]; };
3398
+ AmplifySignInButton = __decorate([
3399
+ ProxyCmp({ inputs: ['provider'] })
3400
+ ], AmplifySignInButton);
3401
+ var AmplifySignOut = /** @class */ (function () {
3402
+ function AmplifySignOut(c, r, z) {
3403
+ this.z = z;
3404
+ c.detach();
3405
+ this.el = r.nativeElement;
3406
+ }
3407
+ return AmplifySignOut;
3408
+ }());
3409
+ AmplifySignOut.decorators = [
3410
+ { type: i0.Component, args: [{
3411
+ selector: 'amplify-sign-out',
3412
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3413
+ template: '<ng-content></ng-content>',
3414
+ inputs: ['buttonText', 'handleAuthStateChange']
3415
+ },] }
3416
+ ];
3417
+ AmplifySignOut.ctorParameters = function () { return [
3418
+ { type: i0.ChangeDetectorRef },
3419
+ { type: i0.ElementRef },
3420
+ { type: i0.NgZone }
3421
+ ]; };
3422
+ AmplifySignOut = __decorate([
3423
+ ProxyCmp({ inputs: ['buttonText', 'handleAuthStateChange'] })
3424
+ ], AmplifySignOut);
3425
+ var AmplifySignUp = /** @class */ (function () {
3426
+ function AmplifySignUp(c, r, z) {
3427
+ this.z = z;
3428
+ c.detach();
3429
+ this.el = r.nativeElement;
3430
+ }
3431
+ return AmplifySignUp;
3432
+ }());
3433
+ AmplifySignUp.decorators = [
3434
+ { type: i0.Component, args: [{
3435
+ selector: 'amplify-sign-up',
3436
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3437
+ template: '<ng-content></ng-content>',
3438
+ inputs: [
3439
+ 'formFields',
3440
+ 'handleAuthStateChange',
3441
+ 'handleSignUp',
3442
+ 'handleSubmit',
3443
+ 'haveAccountText',
3444
+ 'headerText',
3445
+ 'signInText',
3446
+ 'submitButtonText',
3447
+ 'usernameAlias',
3448
+ 'validationErrors',
3449
+ ]
3450
+ },] }
3451
+ ];
3452
+ AmplifySignUp.ctorParameters = function () { return [
3453
+ { type: i0.ChangeDetectorRef },
3454
+ { type: i0.ElementRef },
3455
+ { type: i0.NgZone }
3456
+ ]; };
3457
+ AmplifySignUp = __decorate([
3458
+ ProxyCmp({
3459
+ inputs: [
3460
+ 'formFields',
3461
+ 'handleAuthStateChange',
3462
+ 'handleSignUp',
3463
+ 'handleSubmit',
3464
+ 'haveAccountText',
3465
+ 'headerText',
3466
+ 'signInText',
3467
+ 'submitButtonText',
3468
+ 'usernameAlias',
3469
+ 'validationErrors',
3470
+ ],
3471
+ })
3472
+ ], AmplifySignUp);
3473
+ var AmplifyStrike = /** @class */ (function () {
3474
+ function AmplifyStrike(c, r, z) {
3475
+ this.z = z;
3476
+ c.detach();
3477
+ this.el = r.nativeElement;
3478
+ }
3479
+ return AmplifyStrike;
3480
+ }());
3481
+ AmplifyStrike.decorators = [
3482
+ { type: i0.Component, args: [{
3483
+ selector: 'amplify-strike',
3484
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3485
+ template: '<ng-content></ng-content>'
3486
+ },] }
3487
+ ];
3488
+ AmplifyStrike.ctorParameters = function () { return [
3489
+ { type: i0.ChangeDetectorRef },
3490
+ { type: i0.ElementRef },
3491
+ { type: i0.NgZone }
3492
+ ]; };
3493
+ exports.AmplifyToast = /** @class */ (function () {
3494
+ function AmplifyToast(c, r, z) {
3495
+ this.z = z;
3496
+ c.detach();
3497
+ this.el = r.nativeElement;
3498
+ }
3499
+ return AmplifyToast;
3500
+ }());
3501
+ exports.AmplifyToast.decorators = [
3502
+ { type: i0.Component, args: [{
3503
+ selector: 'amplify-toast',
3504
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3505
+ template: '<ng-content></ng-content>',
3506
+ inputs: ['handleClose', 'message']
3507
+ },] }
3508
+ ];
3509
+ exports.AmplifyToast.ctorParameters = function () { return [
3510
+ { type: i0.ChangeDetectorRef },
3511
+ { type: i0.ElementRef },
3512
+ { type: i0.NgZone }
3513
+ ]; };
3514
+ exports.AmplifyToast = __decorate([
3515
+ ProxyCmp({ inputs: ['handleClose', 'message'] })
3516
+ ], exports.AmplifyToast);
3517
+ var AmplifyTooltip = /** @class */ (function () {
3518
+ function AmplifyTooltip(c, r, z) {
3519
+ this.z = z;
3520
+ c.detach();
3521
+ this.el = r.nativeElement;
3522
+ }
3523
+ return AmplifyTooltip;
3524
+ }());
3525
+ AmplifyTooltip.decorators = [
3526
+ { type: i0.Component, args: [{
3527
+ selector: 'amplify-tooltip',
3528
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3529
+ template: '<ng-content></ng-content>',
3530
+ inputs: ['shouldAutoShow', 'text']
3531
+ },] }
3532
+ ];
3533
+ AmplifyTooltip.ctorParameters = function () { return [
3534
+ { type: i0.ChangeDetectorRef },
3535
+ { type: i0.ElementRef },
3536
+ { type: i0.NgZone }
3537
+ ]; };
3538
+ AmplifyTooltip = __decorate([
3539
+ ProxyCmp({ inputs: ['shouldAutoShow', 'text'] })
3540
+ ], AmplifyTooltip);
3541
+ var AmplifyTotpSetup = /** @class */ (function () {
3542
+ function AmplifyTotpSetup(c, r, z) {
3543
+ this.z = z;
3544
+ c.detach();
3545
+ this.el = r.nativeElement;
3546
+ }
3547
+ return AmplifyTotpSetup;
3548
+ }());
3549
+ AmplifyTotpSetup.decorators = [
3550
+ { type: i0.Component, args: [{
3551
+ selector: 'amplify-totp-setup',
3552
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3553
+ template: '<ng-content></ng-content>',
3554
+ inputs: [
3555
+ 'handleAuthStateChange',
3556
+ 'handleComplete',
3557
+ 'headerText',
3558
+ 'issuer',
3559
+ 'standalone',
3560
+ 'user',
3561
+ ]
3562
+ },] }
3563
+ ];
3564
+ AmplifyTotpSetup.ctorParameters = function () { return [
3565
+ { type: i0.ChangeDetectorRef },
3566
+ { type: i0.ElementRef },
3567
+ { type: i0.NgZone }
3568
+ ]; };
3569
+ AmplifyTotpSetup = __decorate([
3570
+ ProxyCmp({
3571
+ inputs: [
3572
+ 'handleAuthStateChange',
3573
+ 'handleComplete',
3574
+ 'headerText',
3575
+ 'issuer',
3576
+ 'standalone',
3577
+ 'user',
3578
+ ],
3579
+ })
3580
+ ], AmplifyTotpSetup);
3581
+ var AmplifyUsernameField = /** @class */ (function () {
3582
+ function AmplifyUsernameField(c, r, z) {
3583
+ this.z = z;
3584
+ c.detach();
3585
+ this.el = r.nativeElement;
3586
+ }
3587
+ return AmplifyUsernameField;
3588
+ }());
3589
+ AmplifyUsernameField.decorators = [
3590
+ { type: i0.Component, args: [{
3591
+ selector: 'amplify-username-field',
3592
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3593
+ template: '<ng-content></ng-content>',
3594
+ inputs: [
3595
+ 'disabled',
3596
+ 'fieldId',
3597
+ 'handleInputChange',
3598
+ 'hint',
3599
+ 'inputProps',
3600
+ 'label',
3601
+ 'placeholder',
3602
+ 'required',
3603
+ 'value',
3604
+ ]
3605
+ },] }
3606
+ ];
3607
+ AmplifyUsernameField.ctorParameters = function () { return [
3608
+ { type: i0.ChangeDetectorRef },
3609
+ { type: i0.ElementRef },
3610
+ { type: i0.NgZone }
3611
+ ]; };
3612
+ AmplifyUsernameField = __decorate([
3613
+ ProxyCmp({
3614
+ inputs: [
3615
+ 'disabled',
3616
+ 'fieldId',
3617
+ 'handleInputChange',
3618
+ 'hint',
3619
+ 'inputProps',
3620
+ 'label',
3621
+ 'placeholder',
3622
+ 'required',
3623
+ 'value',
3624
+ ],
3625
+ })
3626
+ ], AmplifyUsernameField);
3627
+ var AmplifyVerifyContact = /** @class */ (function () {
3628
+ function AmplifyVerifyContact(c, r, z) {
3629
+ this.z = z;
3630
+ c.detach();
3631
+ this.el = r.nativeElement;
3632
+ }
3633
+ return AmplifyVerifyContact;
3634
+ }());
3635
+ AmplifyVerifyContact.decorators = [
3636
+ { type: i0.Component, args: [{
3637
+ selector: 'amplify-verify-contact',
3638
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
3639
+ template: '<ng-content></ng-content>',
3640
+ inputs: ['handleAuthStateChange', 'user']
3641
+ },] }
3642
+ ];
3643
+ AmplifyVerifyContact.ctorParameters = function () { return [
3644
+ { type: i0.ChangeDetectorRef },
3645
+ { type: i0.ElementRef },
3646
+ { type: i0.NgZone }
3647
+ ]; };
3648
+ AmplifyVerifyContact = __decorate([
3649
+ ProxyCmp({ inputs: ['handleAuthStateChange', 'user'] })
3650
+ ], AmplifyVerifyContact);
3651
+
3652
+ var PhoneNumberFieldComponent = /** @class */ (function () {
3653
+ function PhoneNumberFieldComponent() {
3654
+ this.autocomplete = 'new-password';
3655
+ this.disabled = false;
3656
+ this.initialValue = '';
3657
+ this.label = '';
3658
+ this.placeholder = '';
3659
+ this.required = true;
3660
+ this.countryDialCodes = ui.countryDialCodes;
3661
+ }
3662
+ return PhoneNumberFieldComponent;
3663
+ }());
3664
+ PhoneNumberFieldComponent.decorators = [
3665
+ { type: i0.Component, args: [{
3666
+ selector: 'amplify-phone-number-field',
3667
+ template: "<div\n class=\"amplify-flex amplify-phonenumberfield\"\n amplify-field-group\n style=\"gap: 0px\"\n>\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\" amplify-flex amplify-field amplify-selectfield amplify-countrycodeselect\"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodes\"\n [defaultValue]=\"defaultCountryCode\"\n ></amplify-form-select>\n </div>\n </div>\n\n <label class=\"sr-only amplify-label\" [for]=\"textFieldId\">\n {{ label }}\n </label>\n <input\n class=\"amplify-input\"\n [id]=\"textFieldId\"\n [type]=\"type\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [value]=\"initialValue\"\n [attr.disabled]=\"disabled ? '' : null\"\n [autocomplete]=\"autocomplete\"\n />\n</div>\n"
3668
+ },] }
3669
+ ];
3670
+ PhoneNumberFieldComponent.propDecorators = {
3671
+ autocomplete: [{ type: i0.Input }],
3672
+ disabled: [{ type: i0.Input }],
3673
+ defaultCountryCode: [{ type: i0.Input }],
3674
+ selectFieldId: [{ type: i0.Input }],
3675
+ textFieldId: [{ type: i0.Input }],
3676
+ initialValue: [{ type: i0.Input }],
3677
+ label: [{ type: i0.Input }],
3678
+ name: [{ type: i0.Input }],
3679
+ placeholder: [{ type: i0.Input }],
3680
+ required: [{ type: i0.Input }],
3681
+ type: [{ type: i0.Input }]
3682
+ };
3683
+
3684
+ customElements.define('amplify-button', components.AmplifyButton);
3685
+ customElements.define('amplify-input', components.AmplifyInput);
3686
+ customElements.define('amplify-toast', components.AmplifyToast);
3687
+ customElements.define('amplify-chatbot', components.AmplifyChatbot);
3688
+ customElements.define('amplify-s3-album', components.AmplifyS3Album);
3689
+ customElements.define('amplify-s3-image-picker', components.AmplifyS3ImagePicker);
3690
+ customElements.define('amplify-s3-text', components.AmplifyS3Text);
3691
+ customElements.define('amplify-s3-text-picker', components.AmplifyS3TextPicker);
3692
+ customElements.define('amplify-s3-image', components.AmplifyS3Image);
3693
+ customElements.define('amplify-picker', components.AmplifyPicker);
3694
+ customElements.define('amplify-photo-picker', components.AmplifyPhotoPicker);
3695
+ var UiAngularModule = /** @class */ (function () {
3696
+ function UiAngularModule() {
3697
+ }
3698
+ return UiAngularModule;
3699
+ }());
3700
+ UiAngularModule.decorators = [
3701
+ { type: i0.NgModule, args: [{
3702
+ declarations: [
3703
+ exports.AmplifyChatbot,
3704
+ exports.AmplifyToast,
3705
+ exports.AmplifyInput,
3706
+ exports.AmplifyButton,
3707
+ exports.AmplifyS3Album,
3708
+ exports.AmplifyS3ImagePicker,
3709
+ exports.AmplifyS3Text,
3710
+ exports.AmplifyS3TextPicker,
3711
+ exports.AmplifyS3Image,
3712
+ exports.AmplifyPicker,
3713
+ exports.AmplifyPhotoPicker,
3714
+ AmplifyAuthenticatorComponent,
3715
+ AmplifySignInComponent,
3716
+ AmplifySignUpComponent,
3717
+ AmplifyFormFieldComponent,
3718
+ AmplifyErrorComponent,
3719
+ AmplifySlotDirective,
3720
+ AmplifyConfirmSignUpComponent,
3721
+ AmplifyUserNameAliasComponent,
3722
+ AmplifyConfirmSignInComponent,
3723
+ AmplifySetupTotpComponent,
3724
+ AmplifyForceNewPasswordComponent,
3725
+ AmplifyFederatedSignInComponent,
3726
+ AmplifyFederatedSignInButtonComponent,
3727
+ AmplifyResetPasswordComponent,
3728
+ AmplifyVerifyUserComponent,
3729
+ ConfirmResetPasswordComponent,
3730
+ ConfirmVerifyUserComponent,
3731
+ AmplifySelectComponent,
3732
+ AmplifyButtonComponent,
3733
+ AmplifyPasswordFieldComponent,
3734
+ AmplifyTextFieldComponent,
3735
+ TabsComponent,
3736
+ TabItemComponent,
3737
+ PhoneNumberFieldComponent,
3738
+ ],
3739
+ imports: [common.CommonModule],
3740
+ exports: [
3741
+ exports.AmplifyChatbot,
3742
+ exports.AmplifyToast,
3743
+ exports.AmplifyInput,
3744
+ exports.AmplifyButton,
3745
+ exports.AmplifyS3Album,
3746
+ exports.AmplifyS3ImagePicker,
3747
+ exports.AmplifyS3Text,
3748
+ exports.AmplifyS3TextPicker,
3749
+ exports.AmplifyS3Image,
3750
+ exports.AmplifyPicker,
3751
+ exports.AmplifyPhotoPicker,
3752
+ AmplifyAuthenticatorComponent,
3753
+ AmplifySignInComponent,
3754
+ AmplifyFormFieldComponent,
3755
+ AmplifyErrorComponent,
3756
+ AmplifySlotDirective,
3757
+ ],
3758
+ schemas: [i0.CUSTOM_ELEMENTS_SCHEMA],
3759
+ },] }
3760
+ ];
3761
+
3762
+ /*
3763
+ * Public API Surface of ui-angular
3764
+ */
3765
+
3766
+ /**
3767
+ * Generated bundle index. Do not edit.
3768
+ */
3769
+
3770
+ exports.AmplifyAuthenticatorComponent = AmplifyAuthenticatorComponent;
3771
+ exports.AmplifyConfirmSignInComponent = AmplifyConfirmSignInComponent;
3772
+ exports.AmplifyConfirmSignUpComponent = AmplifyConfirmSignUpComponent;
3773
+ exports.AmplifyErrorComponent = AmplifyErrorComponent;
3774
+ exports.AmplifyFederatedSignInButtonComponent = AmplifyFederatedSignInButtonComponent;
3775
+ exports.AmplifyFederatedSignInComponent = AmplifyFederatedSignInComponent;
3776
+ exports.AmplifyForceNewPasswordComponent = AmplifyForceNewPasswordComponent;
3777
+ exports.AmplifyFormFieldComponent = AmplifyFormFieldComponent;
3778
+ exports.AmplifyResetPasswordComponent = AmplifyResetPasswordComponent;
3779
+ exports.AmplifySetupTotpComponent = AmplifySetupTotpComponent;
3780
+ exports.AmplifySignInComponent = AmplifySignInComponent;
3781
+ exports.AmplifySignUpComponent = AmplifySignUpComponent;
3782
+ exports.AmplifySlotDirective = AmplifySlotDirective;
3783
+ exports.AmplifyVerifyUserComponent = AmplifyVerifyUserComponent;
3784
+ exports.AuthPropService = AuthPropService;
3785
+ exports.ConfirmResetPasswordComponent = ConfirmResetPasswordComponent;
3786
+ exports.ConfirmVerifyUserComponent = ConfirmVerifyUserComponent;
3787
+ exports.StateMachineService = StateMachineService;
3788
+ exports.UiAngularModule = UiAngularModule;
3789
+ exports.getAttributeMap = getAttributeMap;
3790
+ exports["ɵa"] = ProxyCmp;
3791
+ exports["ɵb"] = AmplifyAuthenticatorComponent;
3792
+ exports["ɵc"] = AmplifySignInComponent;
3793
+ exports["ɵd"] = AmplifySignUpComponent;
3794
+ exports["ɵe"] = AmplifyFormFieldComponent;
3795
+ exports["ɵf"] = AmplifyErrorComponent;
3796
+ exports["ɵg"] = AmplifyConfirmSignUpComponent;
3797
+ exports["ɵh"] = AmplifyUserNameAliasComponent;
3798
+ exports["ɵi"] = AmplifyConfirmSignInComponent;
3799
+ exports["ɵj"] = AmplifySetupTotpComponent;
3800
+ exports["ɵk"] = AmplifyForceNewPasswordComponent;
3801
+ exports["ɵl"] = AmplifyFederatedSignInComponent;
3802
+ exports["ɵm"] = AmplifyFederatedSignInButtonComponent;
3803
+ exports["ɵn"] = AmplifyResetPasswordComponent;
3804
+ exports["ɵo"] = AmplifyVerifyUserComponent;
3805
+ exports["ɵp"] = ConfirmResetPasswordComponent;
3806
+ exports["ɵq"] = ConfirmVerifyUserComponent;
3807
+ exports["ɵr"] = AmplifySelectComponent;
3808
+ exports["ɵs"] = AmplifyButtonComponent;
3809
+ exports["ɵt"] = AmplifyPasswordFieldComponent;
3810
+ exports["ɵu"] = AmplifyTextFieldComponent;
3811
+ exports["ɵv"] = TabsComponent;
3812
+ exports["ɵw"] = TabItemComponent;
3813
+ exports["ɵx"] = PhoneNumberFieldComponent;
3814
+
3815
+ Object.defineProperty(exports, '__esModule', { value: true });
3816
+
3817
+ }));
3818
+ //# sourceMappingURL=aws-amplify-ui-angular.umd.js.map