@aws-amplify/ui-angular 2.0.1-next.4 → 2.0.2

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