@aws-amplify/ui-angular 2.0.1-next.5 → 2.0.3

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