@aws-amplify/ui-angular 2.0.1-next.6 → 2.0.1

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