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

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