@aws-amplify/ui-angular 2.4.26 → 3.1.0
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.
- package/README.md +0 -3
- package/aws-amplify-ui-angular.d.ts +1 -27
- package/bundles/aws-amplify-ui-angular.umd.js +1607 -1517
- package/bundles/aws-amplify-ui-angular.umd.js.map +1 -1
- package/esm2015/aws-amplify-ui-angular.js +1 -28
- package/esm2015/lib/common/types/auth-types.js +1 -1
- package/esm2015/lib/components/authenticator/authenticator.module.js +81 -44
- package/esm2015/lib/components/authenticator/components/authenticator/authenticator.component.js +60 -36
- package/esm2015/lib/components/authenticator/components/base-form-fields/base-form-fields.component.js +20 -39
- package/esm2015/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.js +28 -27
- package/esm2015/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.js +25 -30
- package/esm2015/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.js +29 -36
- package/esm2015/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.js +27 -19
- package/esm2015/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.js +20 -17
- package/esm2015/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.js +17 -15
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.js +12 -7
- package/esm2015/lib/components/authenticator/components/force-new-password/force-new-password.component.js +27 -19
- package/esm2015/lib/components/authenticator/components/form-field/form-field.component.js +20 -15
- package/esm2015/lib/components/authenticator/components/reset-password/reset-password.component.js +27 -19
- package/esm2015/lib/components/authenticator/components/setup-totp/setup-totp.component.js +27 -21
- package/esm2015/lib/components/authenticator/components/sign-in/sign-in.component.js +27 -23
- package/esm2015/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.js +12 -7
- package/esm2015/lib/components/authenticator/components/sign-up/sign-up.component.js +24 -16
- package/esm2015/lib/components/authenticator/components/verify-user/verify-user.component.js +27 -20
- package/esm2015/lib/primitives/button/button.component.js +44 -22
- package/esm2015/lib/primitives/checkbox/checkbox.component.js +24 -15
- package/esm2015/lib/primitives/error/error.component.js +13 -7
- package/esm2015/lib/primitives/password-field/password-field.component.js +37 -21
- package/esm2015/lib/primitives/phone-number-field/phone-number-field.component.js +45 -25
- package/esm2015/lib/primitives/select/select.component.js +22 -14
- package/esm2015/lib/primitives/tab-item/tab-item.component.js +25 -15
- package/esm2015/lib/primitives/tabs/tabs.component.js +17 -11
- package/esm2015/lib/primitives/text-field/text-field.component.js +38 -22
- package/esm2015/lib/services/authenticator.service.js +33 -30
- package/esm2015/lib/services/custom-components.service.js +9 -7
- package/esm2015/lib/utilities/amplify-slot/amplify-slot.component.js +20 -16
- package/esm2015/lib/utilities/amplify-slot/amplify-slot.directive.js +13 -13
- package/fesm2015/aws-amplify-ui-angular.js +1066 -957
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/common/types/auth-types.d.ts +2 -2
- package/lib/components/authenticator/authenticator.module.d.ts +33 -0
- package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +16 -35
- package/lib/components/authenticator/components/base-form-fields/base-form-fields.component.d.ts +3 -1
- package/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.d.ts +17 -41
- package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +16 -35
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +16 -40
- package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +16 -35
- package/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.d.ts +3 -0
- package/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.d.ts +3 -0
- package/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.d.ts +3 -0
- package/lib/components/authenticator/components/force-new-password/force-new-password.component.d.ts +16 -35
- package/lib/components/authenticator/components/form-field/form-field.component.d.ts +3 -0
- package/lib/components/authenticator/components/reset-password/reset-password.component.d.ts +16 -35
- package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +16 -35
- package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +16 -35
- package/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.d.ts +3 -0
- package/lib/components/authenticator/components/sign-up/sign-up.component.d.ts +16 -35
- package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +16 -35
- package/lib/primitives/button/button.component.d.ts +3 -0
- package/lib/primitives/checkbox/checkbox.component.d.ts +3 -0
- package/lib/primitives/error/error.component.d.ts +3 -0
- package/lib/primitives/password-field/password-field.component.d.ts +3 -0
- package/lib/primitives/phone-number-field/phone-number-field.component.d.ts +3 -0
- package/lib/primitives/select/select.component.d.ts +3 -0
- package/lib/primitives/tab-item/tab-item.component.d.ts +3 -0
- package/lib/primitives/tabs/tabs.component.d.ts +3 -0
- package/lib/primitives/text-field/text-field.component.d.ts +3 -0
- package/lib/services/authenticator.service.d.ts +28 -49
- package/lib/services/custom-components.service.d.ts +3 -0
- package/lib/utilities/amplify-slot/amplify-slot.component.d.ts +3 -0
- package/lib/utilities/amplify-slot/amplify-slot.directive.d.ts +3 -0
- package/package.json +3 -6
- package/aws-amplify-ui-angular.metadata.json +0 -1
- package/bundles/aws-amplify-ui-angular-legacy.umd.js +0 -2238
- package/bundles/aws-amplify-ui-angular-legacy.umd.js.map +0 -1
- package/bundles/aws-amplify-ui-angular-legacy.umd.min.js +0 -2
- package/bundles/aws-amplify-ui-angular-legacy.umd.min.js.map +0 -1
- package/bundles/aws-amplify-ui-angular.umd.min.js +0 -2
- package/bundles/aws-amplify-ui-angular.umd.min.js.map +0 -1
- package/esm2015/legacy/aws-amplify-ui-angular-legacy.js +0 -6
- package/esm2015/legacy/index.js +0 -3
- package/esm2015/legacy/legacy-ui-angular.module.js +0 -53
- package/esm2015/legacy/proxies.js +0 -1839
- package/fesm2015/aws-amplify-ui-angular-legacy.js +0 -1846
- package/fesm2015/aws-amplify-ui-angular-legacy.js.map +0 -1
- package/legacy/aws-amplify-ui-angular-legacy.d.ts +0 -5
- package/legacy/aws-amplify-ui-angular-legacy.metadata.json +0 -1
- package/legacy/index.d.ts +0 -2
- package/legacy/legacy-ui-angular.module.d.ts +0 -2
- package/legacy/package.json +0 -11
- package/legacy/proxies.d.ts +0 -395
|
@@ -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/core'), require('xstate'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@aws-amplify/ui-angular', ['exports', '@angular/core', '@angular/common', '@aws-amplify/ui', '@aws-amplify/core', 'xstate', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["aws-amplify"] = global["aws-amplify"] || {}, global["aws-amplify"]["ui-angular"] = {}), global.ng.core, global.ng.common, global.ui, global.core, global.xstate, global["aws-amplify"]
|
|
5
|
-
})(this, (function (exports, i0,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@aws-amplify/ui'), require('@aws-amplify/core'), require('xstate'), require('nanoid'), require('qrcode'), require('aws-amplify')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@aws-amplify/ui-angular', ['exports', '@angular/core', '@angular/common', '@aws-amplify/ui', '@aws-amplify/core', 'xstate', 'nanoid', 'qrcode', 'aws-amplify'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["aws-amplify"] = global["aws-amplify"] || {}, global["aws-amplify"]["ui-angular"] = {}), global.ng.core, global.ng.common, global.ui, global.core, global.xstate, global.nanoid, global.QRCode, global["aws-amplify"]));
|
|
5
|
+
})(this, (function (exports, i0, i6, ui, core, xstate, nanoid, QRCode, awsAmplify) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -25,8 +25,336 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
28
29
|
var QRCode__default = /*#__PURE__*/_interopDefaultLegacy(QRCode);
|
|
29
30
|
|
|
31
|
+
/******************************************************************************
|
|
32
|
+
Copyright (c) Microsoft Corporation.
|
|
33
|
+
|
|
34
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
35
|
+
purpose with or without fee is hereby granted.
|
|
36
|
+
|
|
37
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
38
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
39
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
40
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
41
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
42
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
44
|
+
***************************************************************************** */
|
|
45
|
+
/* global Reflect, Promise */
|
|
46
|
+
var extendStatics = function (d, b) {
|
|
47
|
+
extendStatics = Object.setPrototypeOf ||
|
|
48
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
49
|
+
function (d, b) { for (var p in b)
|
|
50
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
51
|
+
d[p] = b[p]; };
|
|
52
|
+
return extendStatics(d, b);
|
|
53
|
+
};
|
|
54
|
+
function __extends(d, b) {
|
|
55
|
+
if (typeof b !== "function" && b !== null)
|
|
56
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
57
|
+
extendStatics(d, b);
|
|
58
|
+
function __() { this.constructor = d; }
|
|
59
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
60
|
+
}
|
|
61
|
+
var __assign = function () {
|
|
62
|
+
__assign = Object.assign || function __assign(t) {
|
|
63
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
64
|
+
s = arguments[i];
|
|
65
|
+
for (var p in s)
|
|
66
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
67
|
+
t[p] = s[p];
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
};
|
|
71
|
+
return __assign.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
function __rest(s, e) {
|
|
74
|
+
var t = {};
|
|
75
|
+
for (var p in s)
|
|
76
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
77
|
+
t[p] = s[p];
|
|
78
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
79
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
80
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
81
|
+
t[p[i]] = s[p[i]];
|
|
82
|
+
}
|
|
83
|
+
return t;
|
|
84
|
+
}
|
|
85
|
+
function __decorate(decorators, target, key, desc) {
|
|
86
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
87
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
88
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
89
|
+
else
|
|
90
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
91
|
+
if (d = decorators[i])
|
|
92
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
93
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
94
|
+
}
|
|
95
|
+
function __param(paramIndex, decorator) {
|
|
96
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
97
|
+
}
|
|
98
|
+
function __metadata(metadataKey, metadataValue) {
|
|
99
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
100
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
101
|
+
}
|
|
102
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
103
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
104
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
105
|
+
function fulfilled(value) { try {
|
|
106
|
+
step(generator.next(value));
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
reject(e);
|
|
110
|
+
} }
|
|
111
|
+
function rejected(value) { try {
|
|
112
|
+
step(generator["throw"](value));
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
reject(e);
|
|
116
|
+
} }
|
|
117
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
118
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function __generator(thisArg, body) {
|
|
122
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
123
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
124
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
125
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
126
|
+
function step(op) {
|
|
127
|
+
if (f)
|
|
128
|
+
throw new TypeError("Generator is already executing.");
|
|
129
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
130
|
+
try {
|
|
131
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
132
|
+
return t;
|
|
133
|
+
if (y = 0, t)
|
|
134
|
+
op = [op[0] & 2, t.value];
|
|
135
|
+
switch (op[0]) {
|
|
136
|
+
case 0:
|
|
137
|
+
case 1:
|
|
138
|
+
t = op;
|
|
139
|
+
break;
|
|
140
|
+
case 4:
|
|
141
|
+
_.label++;
|
|
142
|
+
return { value: op[1], done: false };
|
|
143
|
+
case 5:
|
|
144
|
+
_.label++;
|
|
145
|
+
y = op[1];
|
|
146
|
+
op = [0];
|
|
147
|
+
continue;
|
|
148
|
+
case 7:
|
|
149
|
+
op = _.ops.pop();
|
|
150
|
+
_.trys.pop();
|
|
151
|
+
continue;
|
|
152
|
+
default:
|
|
153
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
154
|
+
_ = 0;
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
158
|
+
_.label = op[1];
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
162
|
+
_.label = t[1];
|
|
163
|
+
t = op;
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
if (t && _.label < t[2]) {
|
|
167
|
+
_.label = t[2];
|
|
168
|
+
_.ops.push(op);
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
if (t[2])
|
|
172
|
+
_.ops.pop();
|
|
173
|
+
_.trys.pop();
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
op = body.call(thisArg, _);
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
op = [6, e];
|
|
180
|
+
y = 0;
|
|
181
|
+
}
|
|
182
|
+
finally {
|
|
183
|
+
f = t = 0;
|
|
184
|
+
}
|
|
185
|
+
if (op[0] & 5)
|
|
186
|
+
throw op[1];
|
|
187
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
191
|
+
if (k2 === undefined)
|
|
192
|
+
k2 = k;
|
|
193
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
194
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
195
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
196
|
+
}
|
|
197
|
+
Object.defineProperty(o, k2, desc);
|
|
198
|
+
}) : (function (o, m, k, k2) {
|
|
199
|
+
if (k2 === undefined)
|
|
200
|
+
k2 = k;
|
|
201
|
+
o[k2] = m[k];
|
|
202
|
+
});
|
|
203
|
+
function __exportStar(m, o) {
|
|
204
|
+
for (var p in m)
|
|
205
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
206
|
+
__createBinding(o, m, p);
|
|
207
|
+
}
|
|
208
|
+
function __values(o) {
|
|
209
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
210
|
+
if (m)
|
|
211
|
+
return m.call(o);
|
|
212
|
+
if (o && typeof o.length === "number")
|
|
213
|
+
return {
|
|
214
|
+
next: function () {
|
|
215
|
+
if (o && i >= o.length)
|
|
216
|
+
o = void 0;
|
|
217
|
+
return { value: o && o[i++], done: !o };
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
221
|
+
}
|
|
222
|
+
function __read(o, n) {
|
|
223
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
224
|
+
if (!m)
|
|
225
|
+
return o;
|
|
226
|
+
var i = m.call(o), r, ar = [], e;
|
|
227
|
+
try {
|
|
228
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
229
|
+
ar.push(r.value);
|
|
230
|
+
}
|
|
231
|
+
catch (error) {
|
|
232
|
+
e = { error: error };
|
|
233
|
+
}
|
|
234
|
+
finally {
|
|
235
|
+
try {
|
|
236
|
+
if (r && !r.done && (m = i["return"]))
|
|
237
|
+
m.call(i);
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
if (e)
|
|
241
|
+
throw e.error;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return ar;
|
|
245
|
+
}
|
|
246
|
+
/** @deprecated */
|
|
247
|
+
function __spread() {
|
|
248
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
249
|
+
ar = ar.concat(__read(arguments[i]));
|
|
250
|
+
return ar;
|
|
251
|
+
}
|
|
252
|
+
/** @deprecated */
|
|
253
|
+
function __spreadArrays() {
|
|
254
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
255
|
+
s += arguments[i].length;
|
|
256
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
257
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
258
|
+
r[k] = a[j];
|
|
259
|
+
return r;
|
|
260
|
+
}
|
|
261
|
+
function __spreadArray(to, from, pack) {
|
|
262
|
+
if (pack || arguments.length === 2)
|
|
263
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
264
|
+
if (ar || !(i in from)) {
|
|
265
|
+
if (!ar)
|
|
266
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
267
|
+
ar[i] = from[i];
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
271
|
+
}
|
|
272
|
+
function __await(v) {
|
|
273
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
274
|
+
}
|
|
275
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
276
|
+
if (!Symbol.asyncIterator)
|
|
277
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
278
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
279
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
280
|
+
function verb(n) { if (g[n])
|
|
281
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
282
|
+
function resume(n, v) { try {
|
|
283
|
+
step(g[n](v));
|
|
284
|
+
}
|
|
285
|
+
catch (e) {
|
|
286
|
+
settle(q[0][3], e);
|
|
287
|
+
} }
|
|
288
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
289
|
+
function fulfill(value) { resume("next", value); }
|
|
290
|
+
function reject(value) { resume("throw", value); }
|
|
291
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
292
|
+
resume(q[0][0], q[0][1]); }
|
|
293
|
+
}
|
|
294
|
+
function __asyncDelegator(o) {
|
|
295
|
+
var i, p;
|
|
296
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
297
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
298
|
+
}
|
|
299
|
+
function __asyncValues(o) {
|
|
300
|
+
if (!Symbol.asyncIterator)
|
|
301
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
302
|
+
var m = o[Symbol.asyncIterator], i;
|
|
303
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
304
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
305
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
306
|
+
}
|
|
307
|
+
function __makeTemplateObject(cooked, raw) {
|
|
308
|
+
if (Object.defineProperty) {
|
|
309
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
cooked.raw = raw;
|
|
313
|
+
}
|
|
314
|
+
return cooked;
|
|
315
|
+
}
|
|
316
|
+
;
|
|
317
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
318
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
319
|
+
}) : function (o, v) {
|
|
320
|
+
o["default"] = v;
|
|
321
|
+
};
|
|
322
|
+
function __importStar(mod) {
|
|
323
|
+
if (mod && mod.__esModule)
|
|
324
|
+
return mod;
|
|
325
|
+
var result = {};
|
|
326
|
+
if (mod != null)
|
|
327
|
+
for (var k in mod)
|
|
328
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
329
|
+
__createBinding(result, mod, k);
|
|
330
|
+
__setModuleDefault(result, mod);
|
|
331
|
+
return result;
|
|
332
|
+
}
|
|
333
|
+
function __importDefault(mod) {
|
|
334
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
335
|
+
}
|
|
336
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
337
|
+
if (kind === "a" && !f)
|
|
338
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
339
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
340
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
341
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
342
|
+
}
|
|
343
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
344
|
+
if (kind === "m")
|
|
345
|
+
throw new TypeError("Private method is not writable");
|
|
346
|
+
if (kind === "a" && !f)
|
|
347
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
348
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
349
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
350
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
351
|
+
}
|
|
352
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
353
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
354
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
355
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
356
|
+
}
|
|
357
|
+
|
|
30
358
|
var AmplifySlotDirective = /** @class */ (function () {
|
|
31
359
|
function AmplifySlotDirective(template) {
|
|
32
360
|
this.template = template;
|
|
@@ -40,17 +368,16 @@
|
|
|
40
368
|
});
|
|
41
369
|
return AmplifySlotDirective;
|
|
42
370
|
}());
|
|
43
|
-
AmplifySlotDirective
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
371
|
+
AmplifySlotDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifySlotDirective, deps: [{ token: i0__namespace.TemplateRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
372
|
+
AmplifySlotDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: AmplifySlotDirective, selector: "[amplifySlot]", inputs: { amplifySlot: "amplifySlot" }, ngImport: i0__namespace });
|
|
373
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifySlotDirective, decorators: [{
|
|
374
|
+
type: i0.Directive,
|
|
375
|
+
args: [{
|
|
376
|
+
selector: '[amplifySlot]',
|
|
377
|
+
}]
|
|
378
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.TemplateRef }]; }, propDecorators: { amplifySlot: [{
|
|
379
|
+
type: i0.Input
|
|
380
|
+
}] } });
|
|
54
381
|
|
|
55
382
|
/**
|
|
56
383
|
* Stores and provides custom components that users provide with `amplify-slot`.
|
|
@@ -71,14 +398,16 @@
|
|
|
71
398
|
});
|
|
72
399
|
return CustomComponentsService;
|
|
73
400
|
}());
|
|
74
|
-
CustomComponentsService.ɵ
|
|
75
|
-
CustomComponentsService
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
401
|
+
CustomComponentsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomComponentsService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
402
|
+
CustomComponentsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomComponentsService, providedIn: 'root' });
|
|
403
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CustomComponentsService, decorators: [{
|
|
404
|
+
type: i0.Injectable,
|
|
405
|
+
args: [{
|
|
406
|
+
providedIn: 'root',
|
|
407
|
+
}]
|
|
408
|
+
}] });
|
|
80
409
|
|
|
81
|
-
var logger$
|
|
410
|
+
var logger$1 = new core.Logger('state-machine');
|
|
82
411
|
/**
|
|
83
412
|
* AuthenticatorService provides access to the authenticator state and context.
|
|
84
413
|
*/
|
|
@@ -88,10 +417,13 @@
|
|
|
88
417
|
var machine = ui.createAuthenticatorMachine();
|
|
89
418
|
var authService = xstate.interpret(machine).start();
|
|
90
419
|
this._machineSubscription = authService.subscribe(function (state) {
|
|
91
|
-
|
|
92
|
-
_this.
|
|
420
|
+
var newState = state;
|
|
421
|
+
_this._authState = newState;
|
|
422
|
+
_this._facade = ui.getServiceFacade({
|
|
423
|
+
send: authService.send,
|
|
424
|
+
state: newState,
|
|
425
|
+
});
|
|
93
426
|
});
|
|
94
|
-
this._sendEventAliases = ui.getSendEventAliases(authService.send);
|
|
95
427
|
this._authService = authService;
|
|
96
428
|
}
|
|
97
429
|
AuthenticatorService.prototype.ngOnDestroy = function () {
|
|
@@ -170,42 +502,42 @@
|
|
|
170
502
|
* Service facades
|
|
171
503
|
*/
|
|
172
504
|
get: function () {
|
|
173
|
-
return this.
|
|
505
|
+
return this._facade.initializeMachine;
|
|
174
506
|
},
|
|
175
507
|
enumerable: false,
|
|
176
508
|
configurable: true
|
|
177
509
|
});
|
|
178
510
|
Object.defineProperty(AuthenticatorService.prototype, "updateForm", {
|
|
179
511
|
get: function () {
|
|
180
|
-
return this.
|
|
512
|
+
return this._facade.updateForm;
|
|
181
513
|
},
|
|
182
514
|
enumerable: false,
|
|
183
515
|
configurable: true
|
|
184
516
|
});
|
|
185
517
|
Object.defineProperty(AuthenticatorService.prototype, "updateBlur", {
|
|
186
518
|
get: function () {
|
|
187
|
-
return this.
|
|
519
|
+
return this._facade.updateBlur;
|
|
188
520
|
},
|
|
189
521
|
enumerable: false,
|
|
190
522
|
configurable: true
|
|
191
523
|
});
|
|
192
524
|
Object.defineProperty(AuthenticatorService.prototype, "resendCode", {
|
|
193
525
|
get: function () {
|
|
194
|
-
return this.
|
|
526
|
+
return this._facade.resendCode;
|
|
195
527
|
},
|
|
196
528
|
enumerable: false,
|
|
197
529
|
configurable: true
|
|
198
530
|
});
|
|
199
531
|
Object.defineProperty(AuthenticatorService.prototype, "signOut", {
|
|
200
532
|
get: function () {
|
|
201
|
-
return this.
|
|
533
|
+
return this._facade.signOut;
|
|
202
534
|
},
|
|
203
535
|
enumerable: false,
|
|
204
536
|
configurable: true
|
|
205
537
|
});
|
|
206
538
|
Object.defineProperty(AuthenticatorService.prototype, "submitForm", {
|
|
207
539
|
get: function () {
|
|
208
|
-
return this.
|
|
540
|
+
return this._facade.submitForm;
|
|
209
541
|
},
|
|
210
542
|
enumerable: false,
|
|
211
543
|
configurable: true
|
|
@@ -215,1033 +547,880 @@
|
|
|
215
547
|
* Transition facades
|
|
216
548
|
*/
|
|
217
549
|
get: function () {
|
|
218
|
-
return this.
|
|
550
|
+
return this._facade.toFederatedSignIn;
|
|
219
551
|
},
|
|
220
552
|
enumerable: false,
|
|
221
553
|
configurable: true
|
|
222
554
|
});
|
|
223
555
|
Object.defineProperty(AuthenticatorService.prototype, "toResetPassword", {
|
|
224
556
|
get: function () {
|
|
225
|
-
return this.
|
|
226
|
-
},
|
|
227
|
-
enumerable: false,
|
|
228
|
-
configurable: true
|
|
229
|
-
});
|
|
230
|
-
Object.defineProperty(AuthenticatorService.prototype, "toSignIn", {
|
|
231
|
-
get: function () {
|
|
232
|
-
return this._sendEventAliases.toSignIn;
|
|
233
|
-
},
|
|
234
|
-
enumerable: false,
|
|
235
|
-
configurable: true
|
|
236
|
-
});
|
|
237
|
-
Object.defineProperty(AuthenticatorService.prototype, "toSignUp", {
|
|
238
|
-
get: function () {
|
|
239
|
-
return this._sendEventAliases.toSignUp;
|
|
240
|
-
},
|
|
241
|
-
enumerable: false,
|
|
242
|
-
configurable: true
|
|
243
|
-
});
|
|
244
|
-
Object.defineProperty(AuthenticatorService.prototype, "skipVerification", {
|
|
245
|
-
get: function () {
|
|
246
|
-
return this._sendEventAliases.skipVerification;
|
|
247
|
-
},
|
|
248
|
-
enumerable: false,
|
|
249
|
-
configurable: true
|
|
250
|
-
});
|
|
251
|
-
Object.defineProperty(AuthenticatorService.prototype, "authState", {
|
|
252
|
-
/**
|
|
253
|
-
* Internal utility functions
|
|
254
|
-
*/
|
|
255
|
-
/** @deprecated For internal use only */
|
|
256
|
-
get: function () {
|
|
257
|
-
return this._authState;
|
|
258
|
-
},
|
|
259
|
-
enumerable: false,
|
|
260
|
-
configurable: true
|
|
261
|
-
});
|
|
262
|
-
Object.defineProperty(AuthenticatorService.prototype, "authService", {
|
|
263
|
-
/** @deprecated For internal use only */
|
|
264
|
-
get: function () {
|
|
265
|
-
return this._authService;
|
|
266
|
-
},
|
|
267
|
-
enumerable: false,
|
|
268
|
-
configurable: true
|
|
269
|
-
});
|
|
270
|
-
Object.defineProperty(AuthenticatorService.prototype, "context", {
|
|
271
|
-
/** @deprecated For internal use only */
|
|
272
|
-
get: function () {
|
|
273
|
-
return this._authState.context;
|
|
274
|
-
},
|
|
275
|
-
enumerable: false,
|
|
276
|
-
configurable: true
|
|
277
|
-
});
|
|
278
|
-
Object.defineProperty(AuthenticatorService.prototype, "slotContext", {
|
|
279
|
-
/** @deprecated For internal use only */
|
|
280
|
-
get: function () {
|
|
281
|
-
var slotContext = Object.assign(Object.assign({}, this._facade), this._sendEventAliases);
|
|
282
|
-
return Object.assign(Object.assign({}, slotContext), { $implicit: Object.assign({}, slotContext) });
|
|
283
|
-
},
|
|
284
|
-
enumerable: false,
|
|
285
|
-
configurable: true
|
|
286
|
-
});
|
|
287
|
-
/** @deprecated For internal use only */
|
|
288
|
-
AuthenticatorService.prototype.subscribe = function (callback) {
|
|
289
|
-
if (this._authService) {
|
|
290
|
-
return this._authService.subscribe(callback);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
logger$2.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
|
|
294
|
-
}
|
|
295
|
-
};
|
|
296
|
-
/** @deprecated For internal use only */
|
|
297
|
-
AuthenticatorService.prototype.send = function (event) {
|
|
298
|
-
this.authService.send(event);
|
|
299
|
-
};
|
|
300
|
-
return AuthenticatorService;
|
|
301
|
-
}());
|
|
302
|
-
AuthenticatorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function AuthenticatorService_Factory() { return new AuthenticatorService(); }, token: AuthenticatorService, providedIn: "root" });
|
|
303
|
-
AuthenticatorService.decorators = [
|
|
304
|
-
{ type: i0.Injectable, args: [{
|
|
305
|
-
providedIn: 'root',
|
|
306
|
-
},] }
|
|
307
|
-
];
|
|
308
|
-
AuthenticatorService.ctorParameters = function () { return []; };
|
|
309
|
-
|
|
310
|
-
var AuthenticatorComponent = /** @class */ (function () {
|
|
311
|
-
function AuthenticatorComponent(authenticator, contextService, changeDetector) {
|
|
312
|
-
this.authenticator = authenticator;
|
|
313
|
-
this.contextService = contextService;
|
|
314
|
-
this.changeDetector = changeDetector;
|
|
315
|
-
this.customComponentQuery = null;
|
|
316
|
-
// translated texts
|
|
317
|
-
this.signInTitle = ui.translate('Sign In');
|
|
318
|
-
this.signUpTitle = ui.translate('Create Account');
|
|
319
|
-
this.hasInitialized = false;
|
|
320
|
-
this.isHandlingHubEvent = false;
|
|
321
|
-
}
|
|
322
|
-
AuthenticatorComponent.prototype.ngOnInit = function () {
|
|
323
|
-
var _this = this;
|
|
324
|
-
var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms, services = _a.services, signUpAttributes = _a.signUpAttributes, socialProviders = _a.socialProviders, formFields = _a.formFields;
|
|
325
|
-
var _b = this.authenticator, authService = _b.authService, initializeMachine = _b.initializeMachine;
|
|
326
|
-
this.unsubscribeHub = ui.listenToAuthHub(authService, function (data, service) {
|
|
327
|
-
ui.defaultAuthHubHandler(data, service);
|
|
328
|
-
/**
|
|
329
|
-
* Hub events aren't properly caught by Angular, because they are
|
|
330
|
-
* synchronous events. Angular tracks async network events and
|
|
331
|
-
* html events, but not synchronous events like hub.
|
|
332
|
-
*
|
|
333
|
-
* On any notable hub events, we run change detection manually.
|
|
334
|
-
*/
|
|
335
|
-
_this.changeDetector.detectChanges();
|
|
336
|
-
/**
|
|
337
|
-
* Hub events that we handle can lead to multiple state changes:
|
|
338
|
-
* e.g. `authenticated` -> `signOut` -> initialState.
|
|
339
|
-
*
|
|
340
|
-
* We want to ensure change detection runs all the way, until
|
|
341
|
-
* we reach back to the initial state. Setting the below flag
|
|
342
|
-
* to true to until we reach initial state.
|
|
343
|
-
*/
|
|
344
|
-
_this.isHandlingHubEvent = true;
|
|
345
|
-
});
|
|
346
|
-
/**
|
|
347
|
-
* Subscribes to state machine changes and sends INIT event
|
|
348
|
-
* once machine reaches 'setup' state.
|
|
349
|
-
*/
|
|
350
|
-
this.unsubscribeMachine = this.authenticator.subscribe(function () {
|
|
351
|
-
var route = _this.authenticator.route;
|
|
352
|
-
if (_this.isHandlingHubEvent) {
|
|
353
|
-
_this.changeDetector.detectChanges();
|
|
354
|
-
var initialStateWithDefault = initialState !== null && initialState !== void 0 ? initialState : 'signIn';
|
|
355
|
-
// We can stop manual change detection if we're back to the initial state
|
|
356
|
-
if (route === initialStateWithDefault) {
|
|
357
|
-
_this.isHandlingHubEvent = false;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (!_this.hasInitialized && route === 'setup') {
|
|
361
|
-
initializeMachine({
|
|
362
|
-
initialState: initialState,
|
|
363
|
-
loginMechanisms: loginMechanisms,
|
|
364
|
-
services: services,
|
|
365
|
-
signUpAttributes: signUpAttributes,
|
|
366
|
-
socialProviders: socialProviders,
|
|
367
|
-
formFields: formFields,
|
|
368
|
-
});
|
|
369
|
-
_this.hasInitialized = true;
|
|
370
|
-
}
|
|
371
|
-
}).unsubscribe;
|
|
372
|
-
/**
|
|
373
|
-
* handling translations after content init, because authenticator and its
|
|
374
|
-
* translations might be initialized before the main app's `ngOnInit` is run.
|
|
375
|
-
*/
|
|
376
|
-
this.signInTitle = ui.translate('Sign In');
|
|
377
|
-
this.signUpTitle = ui.translate('Create Account');
|
|
378
|
-
};
|
|
379
|
-
/**
|
|
380
|
-
* Lifecycle Methods
|
|
381
|
-
*/
|
|
382
|
-
AuthenticatorComponent.prototype.ngAfterContentInit = function () {
|
|
383
|
-
this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
|
|
384
|
-
};
|
|
385
|
-
AuthenticatorComponent.prototype.ngOnDestroy = function () {
|
|
386
|
-
if (this.unsubscribeMachine)
|
|
387
|
-
this.unsubscribeMachine();
|
|
388
|
-
if (this.unsubscribeHub)
|
|
389
|
-
this.unsubscribeHub();
|
|
390
|
-
};
|
|
391
|
-
Object.defineProperty(AuthenticatorComponent.prototype, "context", {
|
|
392
|
-
/**
|
|
393
|
-
* Class Functions
|
|
394
|
-
*/
|
|
395
|
-
// context passed to "authenticated" slot
|
|
396
|
-
get: function () {
|
|
397
|
-
return this.authenticator.slotContext;
|
|
398
|
-
},
|
|
399
|
-
enumerable: false,
|
|
400
|
-
configurable: true
|
|
401
|
-
});
|
|
402
|
-
Object.defineProperty(AuthenticatorComponent.prototype, "route", {
|
|
403
|
-
get: function () {
|
|
404
|
-
return this.authenticator.route;
|
|
405
|
-
},
|
|
406
|
-
enumerable: false,
|
|
407
|
-
configurable: true
|
|
408
|
-
});
|
|
409
|
-
AuthenticatorComponent.prototype.onTabChange = function () {
|
|
410
|
-
var route = this.authenticator.route;
|
|
411
|
-
if (route === 'signIn') {
|
|
412
|
-
this.authenticator.toSignUp();
|
|
413
|
-
}
|
|
414
|
-
else {
|
|
415
|
-
this.authenticator.toSignIn();
|
|
416
|
-
}
|
|
417
|
-
};
|
|
418
|
-
AuthenticatorComponent.prototype.hasTabs = function () {
|
|
419
|
-
var route = this.authenticator.route;
|
|
420
|
-
return route === 'signIn' || route === 'signUp';
|
|
421
|
-
};
|
|
422
|
-
AuthenticatorComponent.prototype.hasRouteComponent = function () {
|
|
423
|
-
var route = this.authenticator.route;
|
|
424
|
-
switch (route) {
|
|
425
|
-
case 'authenticated':
|
|
426
|
-
case 'idle':
|
|
427
|
-
case 'setup':
|
|
428
|
-
case 'signOut':
|
|
429
|
-
case 'autoSignIn':
|
|
430
|
-
return false;
|
|
431
|
-
default:
|
|
432
|
-
return true;
|
|
433
|
-
}
|
|
434
|
-
};
|
|
435
|
-
AuthenticatorComponent.prototype.mapCustomComponents = function (componentQuery) {
|
|
436
|
-
if (!componentQuery)
|
|
437
|
-
return {};
|
|
438
|
-
var customComponents = {};
|
|
439
|
-
componentQuery.forEach(function (component) {
|
|
440
|
-
customComponents[component.name] = component.template;
|
|
441
|
-
});
|
|
442
|
-
return customComponents;
|
|
443
|
-
};
|
|
444
|
-
return AuthenticatorComponent;
|
|
445
|
-
}());
|
|
446
|
-
AuthenticatorComponent.decorators = [
|
|
447
|
-
{ type: i0.Component, args: [{
|
|
448
|
-
selector: 'amplify-authenticator',
|
|
449
|
-
template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot name=\"header\" [context]=\"context\"></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\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\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\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 <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\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",
|
|
450
|
-
providers: [CustomComponentsService],
|
|
451
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
452
|
-
},] }
|
|
453
|
-
];
|
|
454
|
-
AuthenticatorComponent.ctorParameters = function () { return [
|
|
455
|
-
{ type: AuthenticatorService },
|
|
456
|
-
{ type: CustomComponentsService },
|
|
457
|
-
{ type: i0.ChangeDetectorRef }
|
|
458
|
-
]; };
|
|
459
|
-
AuthenticatorComponent.propDecorators = {
|
|
460
|
-
formFields: [{ type: i0.Input }],
|
|
461
|
-
initialState: [{ type: i0.Input }],
|
|
462
|
-
loginMechanisms: [{ type: i0.Input }],
|
|
463
|
-
services: [{ type: i0.Input }],
|
|
464
|
-
signUpAttributes: [{ type: i0.Input }],
|
|
465
|
-
socialProviders: [{ type: i0.Input }],
|
|
466
|
-
variation: [{ type: i0.Input }],
|
|
467
|
-
hideSignUp: [{ type: i0.Input }],
|
|
468
|
-
customComponentQuery: [{ type: i0.ContentChildren, args: [AmplifySlotDirective,] }]
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
var ConfirmResetPasswordComponent = /** @class */ (function () {
|
|
472
|
-
function ConfirmResetPasswordComponent(authenticator) {
|
|
473
|
-
this.authenticator = authenticator;
|
|
474
|
-
this.dataAttr = '';
|
|
475
|
-
this.headerText = ui.translate('Reset your password');
|
|
476
|
-
// translated strings
|
|
477
|
-
this.backToSignInText = ui.translate('Back to Sign In');
|
|
478
|
-
this.resendCodeText = ui.translate('Resend Code');
|
|
479
|
-
/**
|
|
480
|
-
* Support backwards compatibility for erroneous 'Send Code' text
|
|
481
|
-
* See https://github.com/aws-amplify/amplify-ui/issues/1784
|
|
482
|
-
* TODO: Remove support for 'Send Code' translation in next Major release
|
|
483
|
-
*/
|
|
484
|
-
this.submitText = !ui.hasTranslation('Send Code')
|
|
485
|
-
? ui.translate('Submit')
|
|
486
|
-
: ui.translate('Send Code');
|
|
487
|
-
}
|
|
488
|
-
Object.defineProperty(ConfirmResetPasswordComponent.prototype, "context", {
|
|
489
|
-
get: function () {
|
|
490
|
-
return this.authenticator.slotContext;
|
|
491
|
-
},
|
|
492
|
-
enumerable: false,
|
|
493
|
-
configurable: true
|
|
494
|
-
});
|
|
495
|
-
ConfirmResetPasswordComponent.prototype.onInput = function (event) {
|
|
496
|
-
event.preventDefault();
|
|
497
|
-
var _a = event.target, name = _a.name, value = _a.value;
|
|
498
|
-
this.authenticator.updateForm({ name: name, value: value });
|
|
499
|
-
};
|
|
500
|
-
ConfirmResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
501
|
-
event.preventDefault();
|
|
502
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
503
|
-
};
|
|
504
|
-
return ConfirmResetPasswordComponent;
|
|
505
|
-
}());
|
|
506
|
-
ConfirmResetPasswordComponent.decorators = [
|
|
507
|
-
{ type: i0.Component, args: [{
|
|
508
|
-
selector: 'amplify-confirm-reset-password',
|
|
509
|
-
template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\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"
|
|
510
|
-
},] }
|
|
511
|
-
];
|
|
512
|
-
ConfirmResetPasswordComponent.ctorParameters = function () { return [
|
|
513
|
-
{ type: AuthenticatorService }
|
|
514
|
-
]; };
|
|
515
|
-
ConfirmResetPasswordComponent.propDecorators = {
|
|
516
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }],
|
|
517
|
-
headerText: [{ type: i0.Input }]
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
var logger$1 = new awsAmplify.Logger('ConfirmSignIn');
|
|
521
|
-
var ConfirmSignInComponent = /** @class */ (function () {
|
|
522
|
-
function ConfirmSignInComponent(authenticator) {
|
|
523
|
-
this.authenticator = authenticator;
|
|
524
|
-
this.dataAttr = '';
|
|
525
|
-
this.confirmText = ui.translate('Confirm');
|
|
526
|
-
this.backToSignInText = ui.translate('Back to Sign In');
|
|
527
|
-
}
|
|
528
|
-
ConfirmSignInComponent.prototype.ngOnInit = function () {
|
|
529
|
-
this.setHeaderText();
|
|
530
|
-
};
|
|
531
|
-
Object.defineProperty(ConfirmSignInComponent.prototype, "context", {
|
|
532
|
-
get: function () {
|
|
533
|
-
return this.authenticator.slotContext;
|
|
557
|
+
return this._facade.toResetPassword;
|
|
534
558
|
},
|
|
535
559
|
enumerable: false,
|
|
536
|
-
configurable: true
|
|
537
|
-
});
|
|
538
|
-
|
|
539
|
-
var state = this.authenticator.authState;
|
|
540
|
-
var actorContext = ui.getActorContext(state);
|
|
541
|
-
var challengeName = actorContext.challengeName;
|
|
542
|
-
switch (challengeName) {
|
|
543
|
-
case 'SOFTWARE_TOKEN_MFA':
|
|
544
|
-
this.headerText = ui.translate('Confirm TOTP Code');
|
|
545
|
-
break;
|
|
546
|
-
case 'SMS_MFA':
|
|
547
|
-
this.headerText = ui.translate('Confirm SMS Code');
|
|
548
|
-
break;
|
|
549
|
-
default:
|
|
550
|
-
logger$1.error('Unexpected challengeName', challengeName);
|
|
551
|
-
}
|
|
552
|
-
};
|
|
553
|
-
ConfirmSignInComponent.prototype.onInput = function (event) {
|
|
554
|
-
event.preventDefault();
|
|
555
|
-
var _a = event.target, name = _a.name, value = _a.value;
|
|
556
|
-
this.authenticator.updateForm({ name: name, value: value });
|
|
557
|
-
};
|
|
558
|
-
ConfirmSignInComponent.prototype.onSubmit = function (event) {
|
|
559
|
-
event.preventDefault();
|
|
560
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
561
|
-
};
|
|
562
|
-
return ConfirmSignInComponent;
|
|
563
|
-
}());
|
|
564
|
-
ConfirmSignInComponent.decorators = [
|
|
565
|
-
{ type: i0.Component, args: [{
|
|
566
|
-
selector: 'amplify-confirm-sign-in',
|
|
567
|
-
template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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"
|
|
568
|
-
},] }
|
|
569
|
-
];
|
|
570
|
-
ConfirmSignInComponent.ctorParameters = function () { return [
|
|
571
|
-
{ type: AuthenticatorService }
|
|
572
|
-
]; };
|
|
573
|
-
ConfirmSignInComponent.propDecorators = {
|
|
574
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignin',] }]
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
var ConfirmSignUpComponent = /** @class */ (function () {
|
|
578
|
-
function ConfirmSignUpComponent(authenticator) {
|
|
579
|
-
this.authenticator = authenticator;
|
|
580
|
-
this.headerText = ui.translate('Confirm Sign Up');
|
|
581
|
-
this.dataAttr = '';
|
|
582
|
-
// translated texts
|
|
583
|
-
this.resendCodeText = ui.translate('Resend Code');
|
|
584
|
-
this.confirmText = ui.translate('Confirm');
|
|
585
|
-
this.emailMessage = ui.translate('Your code is on the way. To log in, enter the code we emailed to');
|
|
586
|
-
this.textedMessage = ui.translate('Your code is on the way. To log in, enter the code we texted to');
|
|
587
|
-
this.defaultMessage = ui.translate('Your code is on the way. To log in, enter the code we sent you. It may take a minute to arrive.');
|
|
588
|
-
this.minutesMessage = ui.translate('It may take a minute to arrive.');
|
|
589
|
-
}
|
|
590
|
-
Object.defineProperty(ConfirmSignUpComponent.prototype, "context", {
|
|
560
|
+
configurable: true
|
|
561
|
+
});
|
|
562
|
+
Object.defineProperty(AuthenticatorService.prototype, "toSignIn", {
|
|
591
563
|
get: function () {
|
|
592
|
-
return this.
|
|
564
|
+
return this._facade.toSignIn;
|
|
593
565
|
},
|
|
594
566
|
enumerable: false,
|
|
595
567
|
configurable: true
|
|
596
568
|
});
|
|
597
|
-
Object.defineProperty(
|
|
569
|
+
Object.defineProperty(AuthenticatorService.prototype, "toSignUp", {
|
|
598
570
|
get: function () {
|
|
599
|
-
|
|
600
|
-
return DeliveryMedium === 'EMAIL'
|
|
601
|
-
? ui.translate('We Emailed You')
|
|
602
|
-
: DeliveryMedium === 'SMS'
|
|
603
|
-
? ui.translate('We Texted You')
|
|
604
|
-
: ui.translate('We Sent A Code');
|
|
571
|
+
return this._facade.toSignUp;
|
|
605
572
|
},
|
|
606
573
|
enumerable: false,
|
|
607
574
|
configurable: true
|
|
608
575
|
});
|
|
609
|
-
Object.defineProperty(
|
|
576
|
+
Object.defineProperty(AuthenticatorService.prototype, "skipVerification", {
|
|
610
577
|
get: function () {
|
|
611
|
-
|
|
612
|
-
return DeliveryMedium === 'EMAIL'
|
|
613
|
-
? this.emailMessage + " " + Destination + ". " + this.minutesMessage
|
|
614
|
-
: DeliveryMedium === 'SMS'
|
|
615
|
-
? this.textedMessage + " " + Destination + ". " + this.minutesMessage
|
|
616
|
-
: ui.translate("" + this.defaultMessage);
|
|
578
|
+
return this._facade.skipVerification;
|
|
617
579
|
},
|
|
618
580
|
enumerable: false,
|
|
619
581
|
configurable: true
|
|
620
582
|
});
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
ConfirmSignUpComponent.prototype.onSubmit = function (event) {
|
|
627
|
-
event.preventDefault();
|
|
628
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
629
|
-
};
|
|
630
|
-
return ConfirmSignUpComponent;
|
|
631
|
-
}());
|
|
632
|
-
ConfirmSignUpComponent.decorators = [
|
|
633
|
-
{ type: i0.Component, args: [{
|
|
634
|
-
selector: 'amplify-confirm-sign-up',
|
|
635
|
-
template: "<ng-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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</ng-container>\n"
|
|
636
|
-
},] }
|
|
637
|
-
];
|
|
638
|
-
ConfirmSignUpComponent.ctorParameters = function () { return [
|
|
639
|
-
{ type: AuthenticatorService }
|
|
640
|
-
]; };
|
|
641
|
-
ConfirmSignUpComponent.propDecorators = {
|
|
642
|
-
headerText: [{ type: i0.Input }],
|
|
643
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignup',] }]
|
|
644
|
-
};
|
|
645
|
-
|
|
646
|
-
var ConfirmVerifyUserComponent = /** @class */ (function () {
|
|
647
|
-
function ConfirmVerifyUserComponent(authenticator) {
|
|
648
|
-
this.authenticator = authenticator;
|
|
649
|
-
this.dataAttr = '';
|
|
650
|
-
this.headerText = ui.translate('Account recovery requires verified contact information');
|
|
651
|
-
// translated texts
|
|
652
|
-
this.skipText = ui.translate('Skip');
|
|
653
|
-
this.submitText = ui.translate('Submit');
|
|
654
|
-
}
|
|
655
|
-
Object.defineProperty(ConfirmVerifyUserComponent.prototype, "context", {
|
|
583
|
+
Object.defineProperty(AuthenticatorService.prototype, "authState", {
|
|
584
|
+
/**
|
|
585
|
+
* Internal utility functions
|
|
586
|
+
*/
|
|
587
|
+
/** @deprecated For internal use only */
|
|
656
588
|
get: function () {
|
|
657
|
-
return this.
|
|
589
|
+
return this._authState;
|
|
658
590
|
},
|
|
659
591
|
enumerable: false,
|
|
660
592
|
configurable: true
|
|
661
593
|
});
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
var _a = event.target, name = _a.name, value = _a.value;
|
|
665
|
-
this.authenticator.updateForm({ name: name, value: value });
|
|
666
|
-
};
|
|
667
|
-
ConfirmVerifyUserComponent.prototype.onSubmit = function (event) {
|
|
668
|
-
event.preventDefault();
|
|
669
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
670
|
-
};
|
|
671
|
-
return ConfirmVerifyUserComponent;
|
|
672
|
-
}());
|
|
673
|
-
ConfirmVerifyUserComponent.decorators = [
|
|
674
|
-
{ type: i0.Component, args: [{
|
|
675
|
-
selector: 'amplify-confirm-verify-user',
|
|
676
|
-
template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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"
|
|
677
|
-
},] }
|
|
678
|
-
];
|
|
679
|
-
ConfirmVerifyUserComponent.ctorParameters = function () { return [
|
|
680
|
-
{ type: AuthenticatorService }
|
|
681
|
-
]; };
|
|
682
|
-
ConfirmVerifyUserComponent.propDecorators = {
|
|
683
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmverifyuser',] }],
|
|
684
|
-
headerText: [{ type: i0.Input }]
|
|
685
|
-
};
|
|
686
|
-
|
|
687
|
-
var FederatedSignInButtonComponent = /** @class */ (function () {
|
|
688
|
-
function FederatedSignInButtonComponent(authenticator) {
|
|
689
|
-
var _this = this;
|
|
690
|
-
this.authenticator = authenticator;
|
|
691
|
-
this.onClick = function () {
|
|
692
|
-
_this.authenticator.send({
|
|
693
|
-
type: 'FEDERATED_SIGN_IN',
|
|
694
|
-
data: { provider: _this.provider },
|
|
695
|
-
});
|
|
696
|
-
};
|
|
697
|
-
}
|
|
698
|
-
return FederatedSignInButtonComponent;
|
|
699
|
-
}());
|
|
700
|
-
FederatedSignInButtonComponent.decorators = [
|
|
701
|
-
{ type: i0.Component, args: [{
|
|
702
|
-
selector: 'amplify-federated-sign-in-button',
|
|
703
|
-
template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n"
|
|
704
|
-
},] }
|
|
705
|
-
];
|
|
706
|
-
FederatedSignInButtonComponent.ctorParameters = function () { return [
|
|
707
|
-
{ type: AuthenticatorService }
|
|
708
|
-
]; };
|
|
709
|
-
FederatedSignInButtonComponent.propDecorators = {
|
|
710
|
-
provider: [{ type: i0.Input }],
|
|
711
|
-
text: [{ type: i0.Input }]
|
|
712
|
-
};
|
|
713
|
-
|
|
714
|
-
var FederatedSignInComponent = /** @class */ (function () {
|
|
715
|
-
function FederatedSignInComponent(authenticator) {
|
|
716
|
-
this.authenticator = authenticator;
|
|
717
|
-
this.FederatedProviders = ui.FederatedIdentityProviders;
|
|
718
|
-
this.includeAmazon = false;
|
|
719
|
-
this.includeApple = false;
|
|
720
|
-
this.includeFacebook = false;
|
|
721
|
-
this.includeGoogle = false;
|
|
722
|
-
this.shouldShowFederatedSignIn = false;
|
|
723
|
-
}
|
|
724
|
-
FederatedSignInComponent.prototype.ngOnInit = function () {
|
|
725
|
-
var _a;
|
|
726
|
-
var socialProviders = ((_a = this.authenticator.context) === null || _a === void 0 ? void 0 : _a.config).socialProviders;
|
|
727
|
-
this.setFederatedTexts();
|
|
728
|
-
this.includeAmazon = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('amazon');
|
|
729
|
-
this.includeApple = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('apple');
|
|
730
|
-
this.includeGoogle = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('google');
|
|
731
|
-
this.includeFacebook = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('facebook');
|
|
732
|
-
this.shouldShowFederatedSignIn =
|
|
733
|
-
this.includeAmazon ||
|
|
734
|
-
this.includeApple ||
|
|
735
|
-
this.includeFacebook ||
|
|
736
|
-
this.includeGoogle;
|
|
737
|
-
};
|
|
738
|
-
FederatedSignInComponent.prototype.setFederatedTexts = function () {
|
|
739
|
-
var route = this.authenticator.route;
|
|
740
|
-
var federatedText = route === 'signUp' ? 'Up' : 'In';
|
|
741
|
-
this.signInAmazonText = ui.translate("Sign " + federatedText + " with Amazon");
|
|
742
|
-
this.signInAppleText = ui.translate("Sign " + federatedText + " with Apple");
|
|
743
|
-
this.signInFacebookText = ui.translate("Sign " + federatedText + " with Facebook");
|
|
744
|
-
this.signInGoogleText = ui.translate("Sign " + federatedText + " with Google");
|
|
745
|
-
};
|
|
746
|
-
return FederatedSignInComponent;
|
|
747
|
-
}());
|
|
748
|
-
FederatedSignInComponent.decorators = [
|
|
749
|
-
{ type: i0.Component, args: [{
|
|
750
|
-
selector: 'amplify-federated-sign-in',
|
|
751
|
-
template: "<div\n class=\"amplify-flex federated-sign-in-container\"\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n data-label=\"or\"\n />\n</div>\n"
|
|
752
|
-
},] }
|
|
753
|
-
];
|
|
754
|
-
FederatedSignInComponent.ctorParameters = function () { return [
|
|
755
|
-
{ type: AuthenticatorService }
|
|
756
|
-
]; };
|
|
757
|
-
|
|
758
|
-
var ForceNewPasswordComponent = /** @class */ (function () {
|
|
759
|
-
function ForceNewPasswordComponent(authenticator) {
|
|
760
|
-
this.authenticator = authenticator;
|
|
761
|
-
this.dataAttr = '';
|
|
762
|
-
this.headerText = ui.translate('Change Password');
|
|
763
|
-
// translated texts
|
|
764
|
-
this.changePasswordText = ui.translate('Change Password');
|
|
765
|
-
this.backToSignInText = ui.translate('Back to Sign In');
|
|
766
|
-
}
|
|
767
|
-
Object.defineProperty(ForceNewPasswordComponent.prototype, "context", {
|
|
594
|
+
Object.defineProperty(AuthenticatorService.prototype, "authService", {
|
|
595
|
+
/** @deprecated For internal use only */
|
|
768
596
|
get: function () {
|
|
769
|
-
return this.
|
|
597
|
+
return this._authService;
|
|
770
598
|
},
|
|
771
599
|
enumerable: false,
|
|
772
600
|
configurable: true
|
|
773
601
|
});
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
602
|
+
Object.defineProperty(AuthenticatorService.prototype, "context", {
|
|
603
|
+
/** @deprecated For internal use only */
|
|
604
|
+
get: function () {
|
|
605
|
+
return this._authState.context;
|
|
606
|
+
},
|
|
607
|
+
enumerable: false,
|
|
608
|
+
configurable: true
|
|
609
|
+
});
|
|
610
|
+
Object.defineProperty(AuthenticatorService.prototype, "slotContext", {
|
|
611
|
+
/** @deprecated For internal use only */
|
|
612
|
+
get: function () {
|
|
613
|
+
return Object.assign(Object.assign({}, this._facade), { $implicit: this._facade });
|
|
614
|
+
},
|
|
615
|
+
enumerable: false,
|
|
616
|
+
configurable: true
|
|
617
|
+
});
|
|
618
|
+
AuthenticatorService.prototype.subscribe = function (callback) {
|
|
619
|
+
var _this = this;
|
|
620
|
+
if (!this._authService) {
|
|
621
|
+
logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
|
|
622
|
+
}
|
|
623
|
+
var subscription = this._authService.subscribe(function () {
|
|
624
|
+
callback(_this._facade);
|
|
625
|
+
});
|
|
626
|
+
return subscription;
|
|
778
627
|
};
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
this.
|
|
628
|
+
/** @deprecated For internal use only */
|
|
629
|
+
AuthenticatorService.prototype.send = function (event) {
|
|
630
|
+
this.authService.send(event);
|
|
782
631
|
};
|
|
783
|
-
return
|
|
632
|
+
return AuthenticatorService;
|
|
784
633
|
}());
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
]; };
|
|
794
|
-
ForceNewPasswordComponent.propDecorators = {
|
|
795
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-forcenewpassword',] }],
|
|
796
|
-
headerText: [{ type: i0.Input }]
|
|
797
|
-
};
|
|
634
|
+
AuthenticatorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
635
|
+
AuthenticatorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, providedIn: 'root' });
|
|
636
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, decorators: [{
|
|
637
|
+
type: i0.Injectable,
|
|
638
|
+
args: [{
|
|
639
|
+
providedIn: 'root', // ensure we have a singleton service
|
|
640
|
+
}]
|
|
641
|
+
}], ctorParameters: function () { return []; } });
|
|
798
642
|
|
|
799
|
-
var
|
|
800
|
-
function
|
|
643
|
+
var AmplifySlotComponent = /** @class */ (function () {
|
|
644
|
+
function AmplifySlotComponent(propService) {
|
|
645
|
+
this.propService = propService;
|
|
646
|
+
this.display = 'contents';
|
|
647
|
+
this.isOverriden = false;
|
|
801
648
|
}
|
|
802
|
-
|
|
649
|
+
AmplifySlotComponent.prototype.ngAfterContentInit = function () {
|
|
650
|
+
var customComponents = this.propService.customComponents;
|
|
651
|
+
var overridingComponent = customComponents[this.name];
|
|
652
|
+
if (overridingComponent) {
|
|
653
|
+
this.overridingComponent = overridingComponent;
|
|
654
|
+
this.isOverriden = true;
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
return AmplifySlotComponent;
|
|
803
658
|
}());
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
659
|
+
AmplifySlotComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifySlotComponent, deps: [{ token: CustomComponentsService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
660
|
+
AmplifySlotComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AmplifySlotComponent, selector: "amplify-slot", inputs: { name: "name", context: "context" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0__namespace, 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", directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
661
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifySlotComponent, decorators: [{
|
|
662
|
+
type: i0.Component,
|
|
663
|
+
args: [{
|
|
664
|
+
selector: 'amplify-slot',
|
|
665
|
+
templateUrl: './amplify-slot.component.html',
|
|
666
|
+
}]
|
|
667
|
+
}], ctorParameters: function () { return [{ type: CustomComponentsService }]; }, propDecorators: { name: [{
|
|
668
|
+
type: i0.Input
|
|
669
|
+
}], context: [{
|
|
670
|
+
type: i0.Input
|
|
671
|
+
}], display: [{
|
|
672
|
+
type: i0.HostBinding,
|
|
673
|
+
args: ['style.display']
|
|
674
|
+
}] } });
|
|
810
675
|
|
|
811
|
-
var
|
|
812
|
-
function
|
|
813
|
-
this.
|
|
814
|
-
this.
|
|
815
|
-
this.errorId = nanoid.nanoid(12);
|
|
676
|
+
var TabItemComponent = /** @class */ (function () {
|
|
677
|
+
function TabItemComponent() {
|
|
678
|
+
this.active = false;
|
|
679
|
+
this.display = 'block'; // emulate div behavior
|
|
816
680
|
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
681
|
+
return TabItemComponent;
|
|
682
|
+
}());
|
|
683
|
+
TabItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
684
|
+
TabItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TabItemComponent, selector: "amplify-tab-item", inputs: { title: "title", active: "active", id: "id", labelledById: "labelledById", tabIndex: "tabIndex" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0__namespace, template: "<div\n data-orientation=\"horizontal\"\n role=\"tabpanel\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.data-state]=\"active ? 'active' : 'inactive'\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n", directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
685
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabItemComponent, decorators: [{
|
|
686
|
+
type: i0.Component,
|
|
687
|
+
args: [{
|
|
688
|
+
selector: 'amplify-tab-item',
|
|
689
|
+
templateUrl: './tab-item.component.html',
|
|
690
|
+
}]
|
|
691
|
+
}], propDecorators: { title: [{
|
|
692
|
+
type: i0.Input
|
|
693
|
+
}], active: [{
|
|
694
|
+
type: i0.Input
|
|
695
|
+
}], id: [{
|
|
696
|
+
type: i0.Input
|
|
697
|
+
}], labelledById: [{
|
|
698
|
+
type: i0.Input
|
|
699
|
+
}], tabIndex: [{
|
|
700
|
+
type: i0.Input
|
|
701
|
+
}], display: [{
|
|
702
|
+
type: i0.HostBinding,
|
|
703
|
+
args: ['style.display']
|
|
704
|
+
}] } });
|
|
705
|
+
|
|
706
|
+
var TabsComponent = /** @class */ (function () {
|
|
707
|
+
function TabsComponent() {
|
|
708
|
+
this.tabChange = new i0.EventEmitter();
|
|
709
|
+
}
|
|
710
|
+
TabsComponent.prototype.ngAfterContentInit = function () {
|
|
711
|
+
// assign ids
|
|
712
|
+
this.tabs.forEach(function (tab, index) {
|
|
713
|
+
tab.id = "radix-id-" + nanoid.nanoid(12) + "-1-content-" + index;
|
|
714
|
+
tab.labelledById = "radix-id-" + nanoid.nanoid(12) + "-1-trigger-" + index;
|
|
715
|
+
});
|
|
716
|
+
// find active tab
|
|
717
|
+
// TODO(enhancement): more declarative way for choosing the initial tab to render
|
|
718
|
+
var activeTabs = this.tabs.filter(function (tab) { return tab.active; });
|
|
719
|
+
// set active tab
|
|
720
|
+
if (activeTabs.length !== 1) {
|
|
721
|
+
this.selectTab(this.tabs.first);
|
|
722
|
+
}
|
|
831
723
|
};
|
|
832
|
-
|
|
833
|
-
|
|
724
|
+
TabsComponent.prototype.selectTab = function (tab) {
|
|
725
|
+
this.tabs.forEach(function (tab) {
|
|
726
|
+
tab.active = false;
|
|
727
|
+
});
|
|
728
|
+
tab.active = true;
|
|
834
729
|
};
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
730
|
+
TabsComponent.prototype.handleTabClick = function (tab) {
|
|
731
|
+
if (tab.active)
|
|
732
|
+
return; // don't do anything if clicks the current active tab
|
|
733
|
+
this.tabChange.emit();
|
|
734
|
+
this.selectTab(tab);
|
|
838
735
|
};
|
|
839
|
-
|
|
736
|
+
return TabsComponent;
|
|
737
|
+
}());
|
|
738
|
+
TabsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
739
|
+
TabsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TabsComponent, selector: "amplify-tabs", outputs: { tabChange: "tabChange" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], ngImport: i0__namespace, 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", directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
740
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabsComponent, decorators: [{
|
|
741
|
+
type: i0.Component,
|
|
742
|
+
args: [{
|
|
743
|
+
selector: 'amplify-tabs',
|
|
744
|
+
templateUrl: './tabs.component.html',
|
|
745
|
+
}]
|
|
746
|
+
}], propDecorators: { tabs: [{
|
|
747
|
+
type: i0.ContentChildren,
|
|
748
|
+
args: [TabItemComponent]
|
|
749
|
+
}], tabChange: [{
|
|
750
|
+
type: i0.Output
|
|
751
|
+
}] } });
|
|
752
|
+
|
|
753
|
+
var ButtonComponent = /** @class */ (function () {
|
|
754
|
+
function ButtonComponent() {
|
|
755
|
+
this.type = 'button';
|
|
756
|
+
this.fullWidth = false;
|
|
757
|
+
this.isDisabled = false;
|
|
758
|
+
this.size = 'medium';
|
|
759
|
+
this.variation = 'default';
|
|
760
|
+
this.fontWeight = 'normal';
|
|
761
|
+
}
|
|
762
|
+
Object.defineProperty(ButtonComponent.prototype, "getDisabled", {
|
|
840
763
|
get: function () {
|
|
841
|
-
return this.
|
|
764
|
+
return this.isDisabled ? '' : null;
|
|
842
765
|
},
|
|
843
766
|
enumerable: false,
|
|
844
767
|
configurable: true
|
|
845
768
|
});
|
|
846
|
-
|
|
847
|
-
return ui.translate(phrase);
|
|
848
|
-
};
|
|
849
|
-
return FormFieldComponent;
|
|
850
|
-
}());
|
|
851
|
-
FormFieldComponent.decorators = [
|
|
852
|
-
{ type: i0.Component, args: [{
|
|
853
|
-
selector: 'amplify-form-field',
|
|
854
|
-
template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div data-amplify-sign-up-errors *ngIf=\"hasError()\" [id]=\"errorId\">\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>\n"
|
|
855
|
-
},] }
|
|
856
|
-
];
|
|
857
|
-
FormFieldComponent.ctorParameters = function () { return [
|
|
858
|
-
{ type: AuthenticatorService }
|
|
859
|
-
]; };
|
|
860
|
-
FormFieldComponent.propDecorators = {
|
|
861
|
-
name: [{ type: i0.Input }],
|
|
862
|
-
formField: [{ type: i0.Input }]
|
|
863
|
-
};
|
|
864
|
-
|
|
865
|
-
var ResetPasswordComponent = /** @class */ (function () {
|
|
866
|
-
function ResetPasswordComponent(authenticator) {
|
|
867
|
-
this.authenticator = authenticator;
|
|
868
|
-
this.dataAttr = '';
|
|
869
|
-
this.headerText = ui.translate('Reset your password');
|
|
870
|
-
// translated texts
|
|
871
|
-
this.sendCodeText = ui.translate('Send Code');
|
|
872
|
-
this.backToSignInText = ui.translate('Back to Sign In');
|
|
873
|
-
}
|
|
874
|
-
Object.defineProperty(ResetPasswordComponent.prototype, "context", {
|
|
769
|
+
Object.defineProperty(ButtonComponent.prototype, "classNames", {
|
|
875
770
|
get: function () {
|
|
876
|
-
|
|
771
|
+
var className = 'amplify-button';
|
|
772
|
+
if (this.variation) {
|
|
773
|
+
className += " amplify-button--" + this.variation;
|
|
774
|
+
}
|
|
775
|
+
if (this.size) {
|
|
776
|
+
className += " amplify-button--" + this.size;
|
|
777
|
+
}
|
|
778
|
+
if (this.fullWidth) {
|
|
779
|
+
className += " amplify-button--fullwidth";
|
|
780
|
+
}
|
|
781
|
+
if (this.isDisabled) {
|
|
782
|
+
className += " amplify-button--disabled amplify-button--loading";
|
|
783
|
+
}
|
|
784
|
+
return className;
|
|
877
785
|
},
|
|
878
786
|
enumerable: false,
|
|
879
787
|
configurable: true
|
|
880
788
|
});
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
this.
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
event.preventDefault();
|
|
888
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
789
|
+
ButtonComponent.prototype.ngOnInit = function () {
|
|
790
|
+
this.typeAttr = this.type;
|
|
791
|
+
this.fullWidthAttr = this.fullWidth;
|
|
792
|
+
this.sizeAttr = this.size;
|
|
793
|
+
this.variationAttr = this.variation;
|
|
794
|
+
this.fontWeightAttr = this.fontWeight;
|
|
889
795
|
};
|
|
890
|
-
return
|
|
796
|
+
return ButtonComponent;
|
|
891
797
|
}());
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
798
|
+
ButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
799
|
+
ButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ButtonComponent, selector: "button[amplify-button]", inputs: { type: "type", fullWidth: "fullWidth", isDisabled: "isDisabled", size: "size", variation: "variation", fontWeight: "fontWeight" }, host: { properties: { "type": "this.typeAttr", "attr.data-fullwidth": "this.fullWidthAttr", "attr.data-size": "this.sizeAttr", "attr.data-variation": "this.variationAttr", "style.font-weight": "this.fontWeightAttr", "attr.disabled": "this.getDisabled", "class": "this.classNames" } }, ngImport: i0__namespace, template: "<ng-content></ng-content>\n" });
|
|
800
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ButtonComponent, decorators: [{
|
|
801
|
+
type: i0.Component,
|
|
802
|
+
args: [{
|
|
803
|
+
selector: 'button[amplify-button]',
|
|
804
|
+
templateUrl: './button.component.html',
|
|
805
|
+
}]
|
|
806
|
+
}], propDecorators: { type: [{
|
|
807
|
+
type: i0.Input
|
|
808
|
+
}], fullWidth: [{
|
|
809
|
+
type: i0.Input
|
|
810
|
+
}], isDisabled: [{
|
|
811
|
+
type: i0.Input
|
|
812
|
+
}], size: [{
|
|
813
|
+
type: i0.Input
|
|
814
|
+
}], variation: [{
|
|
815
|
+
type: i0.Input
|
|
816
|
+
}], fontWeight: [{
|
|
817
|
+
type: i0.Input
|
|
818
|
+
}], typeAttr: [{
|
|
819
|
+
type: i0.HostBinding,
|
|
820
|
+
args: ['type']
|
|
821
|
+
}], fullWidthAttr: [{
|
|
822
|
+
type: i0.HostBinding,
|
|
823
|
+
args: ['attr.data-fullwidth']
|
|
824
|
+
}], sizeAttr: [{
|
|
825
|
+
type: i0.HostBinding,
|
|
826
|
+
args: ['attr.data-size']
|
|
827
|
+
}], variationAttr: [{
|
|
828
|
+
type: i0.HostBinding,
|
|
829
|
+
args: ['attr.data-variation']
|
|
830
|
+
}], fontWeightAttr: [{
|
|
831
|
+
type: i0.HostBinding,
|
|
832
|
+
args: ['style.font-weight']
|
|
833
|
+
}], getDisabled: [{
|
|
834
|
+
type: i0.HostBinding,
|
|
835
|
+
args: ['attr.disabled']
|
|
836
|
+
}], classNames: [{
|
|
837
|
+
type: i0.HostBinding,
|
|
838
|
+
args: ['class']
|
|
839
|
+
}] } });
|
|
905
840
|
|
|
906
|
-
|
|
907
|
-
|
|
841
|
+
var FederatedSignInButtonComponent = /** @class */ (function () {
|
|
842
|
+
function FederatedSignInButtonComponent(authenticator) {
|
|
843
|
+
var _this = this;
|
|
844
|
+
this.authenticator = authenticator;
|
|
845
|
+
this.onClick = function () {
|
|
846
|
+
_this.authenticator.send({
|
|
847
|
+
type: 'FEDERATED_SIGN_IN',
|
|
848
|
+
data: { provider: _this.provider },
|
|
849
|
+
});
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
return FederatedSignInButtonComponent;
|
|
853
|
+
}());
|
|
854
|
+
FederatedSignInButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInButtonComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
855
|
+
FederatedSignInButtonComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: { provider: "provider", text: "text" }, ngImport: i0__namespace, template: "<button\n amplify-button\n class=\"amplify-field-group__control federated-sign-in-button\"\n fullWidth=\"true\"\n fontWeight=\"normal\"\n (click)=\"onClick()\"\n>\n <div class=\"amplify-flex federated-sign-in-button-row\">\n <ng-content></ng-content>\n </div>\n</button>\n", components: [{ type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
|
|
856
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInButtonComponent, decorators: [{
|
|
857
|
+
type: i0.Component,
|
|
858
|
+
args: [{
|
|
859
|
+
selector: 'amplify-federated-sign-in-button',
|
|
860
|
+
templateUrl: './federated-sign-in-button.component.html',
|
|
861
|
+
}]
|
|
862
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { provider: [{
|
|
863
|
+
type: i0.Input
|
|
864
|
+
}], text: [{
|
|
865
|
+
type: i0.Input
|
|
866
|
+
}] } });
|
|
908
867
|
|
|
909
|
-
|
|
910
|
-
|
|
868
|
+
var getSignInWithFederationText = ui.authenticatorTextUtil.getSignInWithFederationText;
|
|
869
|
+
var FederatedSignInComponent = /** @class */ (function () {
|
|
870
|
+
function FederatedSignInComponent(authenticator) {
|
|
871
|
+
this.authenticator = authenticator;
|
|
872
|
+
this.FederatedProviders = ui.FederatedIdentityProviders;
|
|
873
|
+
this.includeAmazon = false;
|
|
874
|
+
this.includeApple = false;
|
|
875
|
+
this.includeFacebook = false;
|
|
876
|
+
this.includeGoogle = false;
|
|
877
|
+
this.shouldShowFederatedSignIn = false;
|
|
878
|
+
}
|
|
879
|
+
FederatedSignInComponent.prototype.ngOnInit = function () {
|
|
880
|
+
var _a;
|
|
881
|
+
var socialProviders = ((_a = this.authenticator.context) === null || _a === void 0 ? void 0 : _a.config).socialProviders;
|
|
882
|
+
this.setFederatedTexts();
|
|
883
|
+
this.includeAmazon = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('amazon');
|
|
884
|
+
this.includeApple = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('apple');
|
|
885
|
+
this.includeGoogle = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('google');
|
|
886
|
+
this.includeFacebook = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('facebook');
|
|
887
|
+
this.shouldShowFederatedSignIn =
|
|
888
|
+
this.includeAmazon ||
|
|
889
|
+
this.includeApple ||
|
|
890
|
+
this.includeFacebook ||
|
|
891
|
+
this.includeGoogle;
|
|
892
|
+
};
|
|
893
|
+
FederatedSignInComponent.prototype.setFederatedTexts = function () {
|
|
894
|
+
var route = this.authenticator.route;
|
|
895
|
+
this.signInAmazonText = getSignInWithFederationText(route, 'amazon');
|
|
896
|
+
this.signInAppleText = getSignInWithFederationText(route, 'apple');
|
|
897
|
+
this.signInFacebookText = getSignInWithFederationText(route, 'facebook');
|
|
898
|
+
this.signInGoogleText = getSignInWithFederationText(route, 'google');
|
|
899
|
+
};
|
|
900
|
+
return FederatedSignInComponent;
|
|
901
|
+
}());
|
|
902
|
+
FederatedSignInComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
903
|
+
FederatedSignInComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FederatedSignInComponent, selector: "amplify-federated-sign-in", ngImport: i0__namespace, template: "<div\n class=\"amplify-flex federated-sign-in-container\"\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\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 amplify-authenticator__federated-text\">\n {{ signInGoogleText }}\n </p>\n </amplify-federated-sign-in-button>\n\n <hr\n class=\"amplify-divider amplify-divider--label amplify-divider--small\"\n aria-orientation=\"horizontal\"\n data-size=\"small\"\n data-label=\"or\"\n />\n</div>\n", components: [{ type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: ["provider", "text"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
904
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInComponent, decorators: [{
|
|
905
|
+
type: i0.Component,
|
|
906
|
+
args: [{
|
|
907
|
+
selector: 'amplify-federated-sign-in',
|
|
908
|
+
templateUrl: './federated-sign-in.component.html',
|
|
909
|
+
}]
|
|
910
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
|
|
911
911
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
912
|
+
var SelectComponent = /** @class */ (function () {
|
|
913
|
+
function SelectComponent() {
|
|
914
|
+
}
|
|
915
|
+
return SelectComponent;
|
|
916
|
+
}());
|
|
917
|
+
SelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SelectComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
918
|
+
SelectComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SelectComponent, selector: "amplify-form-select", inputs: { items: "items", name: "name", label: "label", id: "id", defaultValue: "defaultValue" }, ngImport: i0__namespace, template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</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 amplify-icon--large\"\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", directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
919
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SelectComponent, decorators: [{
|
|
920
|
+
type: i0.Component,
|
|
921
|
+
args: [{
|
|
922
|
+
selector: 'amplify-form-select',
|
|
923
|
+
templateUrl: './select.component.html',
|
|
924
|
+
}]
|
|
925
|
+
}], propDecorators: { items: [{
|
|
926
|
+
type: i0.Input
|
|
927
|
+
}], name: [{
|
|
928
|
+
type: i0.Input
|
|
929
|
+
}], label: [{
|
|
930
|
+
type: i0.Input
|
|
931
|
+
}], id: [{
|
|
932
|
+
type: i0.Input
|
|
933
|
+
}], defaultValue: [{
|
|
934
|
+
type: i0.Input
|
|
935
|
+
}] } });
|
|
936
|
+
|
|
937
|
+
var PhoneNumberFieldComponent = /** @class */ (function () {
|
|
938
|
+
function PhoneNumberFieldComponent() {
|
|
939
|
+
this.autocomplete = 'new-password';
|
|
940
|
+
this.disabled = false;
|
|
941
|
+
this.selectFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
942
|
+
this.textFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
943
|
+
this.initialValue = '';
|
|
944
|
+
this.label = '';
|
|
945
|
+
this.placeholder = '';
|
|
946
|
+
this.required = true;
|
|
947
|
+
this.labelHidden = false;
|
|
948
|
+
this.display = 'contents';
|
|
949
|
+
}
|
|
950
|
+
PhoneNumberFieldComponent.prototype.ngOnInit = function () {
|
|
951
|
+
var _a;
|
|
952
|
+
this.countryDialCodesValues = (_a = this.dialCodeList) !== null && _a !== void 0 ? _a : ui.countryDialCodes;
|
|
945
953
|
};
|
|
946
|
-
return
|
|
947
|
-
};
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
if (op[0] & 5)
|
|
1061
|
-
throw op[1];
|
|
1062
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
954
|
+
return PhoneNumberFieldComponent;
|
|
955
|
+
}());
|
|
956
|
+
PhoneNumberFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PhoneNumberFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
957
|
+
PhoneNumberFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", defaultCountryCode: "defaultCountryCode", selectFieldId: "selectFieldId", textFieldId: "textFieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", dialCodeList: "dialCodeList", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0__namespace, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n>\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\n amplify-field\n amplify-selectfield\n amplify-countrycodeselect\n amplify-dialcodeselect\n \"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n</div>\n", components: [{ type: SelectComponent, selector: "amplify-form-select", inputs: ["items", "name", "label", "id", "defaultValue"] }] });
|
|
958
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PhoneNumberFieldComponent, decorators: [{
|
|
959
|
+
type: i0.Component,
|
|
960
|
+
args: [{
|
|
961
|
+
selector: 'amplify-phone-number-field',
|
|
962
|
+
templateUrl: './phone-number-field.component.html',
|
|
963
|
+
}]
|
|
964
|
+
}], propDecorators: { autocomplete: [{
|
|
965
|
+
type: i0.Input
|
|
966
|
+
}], disabled: [{
|
|
967
|
+
type: i0.Input
|
|
968
|
+
}], defaultCountryCode: [{
|
|
969
|
+
type: i0.Input
|
|
970
|
+
}], selectFieldId: [{
|
|
971
|
+
type: i0.Input
|
|
972
|
+
}], textFieldId: [{
|
|
973
|
+
type: i0.Input
|
|
974
|
+
}], initialValue: [{
|
|
975
|
+
type: i0.Input
|
|
976
|
+
}], label: [{
|
|
977
|
+
type: i0.Input
|
|
978
|
+
}], name: [{
|
|
979
|
+
type: i0.Input
|
|
980
|
+
}], placeholder: [{
|
|
981
|
+
type: i0.Input
|
|
982
|
+
}], required: [{
|
|
983
|
+
type: i0.Input
|
|
984
|
+
}], type: [{
|
|
985
|
+
type: i0.Input
|
|
986
|
+
}], labelHidden: [{
|
|
987
|
+
type: i0.Input
|
|
988
|
+
}], dialCodeList: [{
|
|
989
|
+
type: i0.Input
|
|
990
|
+
}], hasError: [{
|
|
991
|
+
type: i0.Input
|
|
992
|
+
}], describedBy: [{
|
|
993
|
+
type: i0.Input
|
|
994
|
+
}], display: [{
|
|
995
|
+
type: i0.HostBinding,
|
|
996
|
+
args: ['style.display']
|
|
997
|
+
}] } });
|
|
998
|
+
|
|
999
|
+
var PasswordFieldComponent = /** @class */ (function () {
|
|
1000
|
+
function PasswordFieldComponent() {
|
|
1001
|
+
this.autocomplete = 'new-password';
|
|
1002
|
+
this.disabled = false;
|
|
1003
|
+
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1004
|
+
this.initialValue = '';
|
|
1005
|
+
this.label = '';
|
|
1006
|
+
this.placeholder = '';
|
|
1007
|
+
this.required = true;
|
|
1008
|
+
this.labelHidden = false;
|
|
1009
|
+
this.setBlur = new i0.EventEmitter();
|
|
1010
|
+
this.type = 'password';
|
|
1011
|
+
this.showPassword = false;
|
|
1012
|
+
this.showPasswordButtonlabel = ui.translate('Show password');
|
|
1013
|
+
}
|
|
1014
|
+
PasswordFieldComponent.prototype.togglePasswordText = function () {
|
|
1015
|
+
this.showPassword = !this.showPassword;
|
|
1016
|
+
this.showPasswordButtonlabel = this.showPassword
|
|
1017
|
+
? ui.translate('Show password')
|
|
1018
|
+
: ui.translate('Hide password');
|
|
1019
|
+
this.type = this.showPassword ? 'text' : 'password';
|
|
1020
|
+
};
|
|
1021
|
+
return PasswordFieldComponent;
|
|
1022
|
+
}());
|
|
1023
|
+
PasswordFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PasswordFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1024
|
+
PasswordFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, outputs: { setBlur: "setBlur" }, ngImport: i0__namespace, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n <div class=\"amplify-field-group__outer-end\">\n <button\n amplify-button\n [attr.aria-label]=\"showPasswordButtonlabel\"\n class=\"amplify-field-group__control amplify-field__show-password\"\n (click)=\"togglePasswordText()\"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n</div>\n", components: [{ type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1025
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PasswordFieldComponent, decorators: [{
|
|
1026
|
+
type: i0.Component,
|
|
1027
|
+
args: [{
|
|
1028
|
+
selector: 'amplify-password-field',
|
|
1029
|
+
templateUrl: './password-field.component.html',
|
|
1030
|
+
}]
|
|
1031
|
+
}], propDecorators: { autocomplete: [{
|
|
1032
|
+
type: i0.Input
|
|
1033
|
+
}], disabled: [{
|
|
1034
|
+
type: i0.Input
|
|
1035
|
+
}], fieldId: [{
|
|
1036
|
+
type: i0.Input
|
|
1037
|
+
}], initialValue: [{
|
|
1038
|
+
type: i0.Input
|
|
1039
|
+
}], label: [{
|
|
1040
|
+
type: i0.Input
|
|
1041
|
+
}], name: [{
|
|
1042
|
+
type: i0.Input
|
|
1043
|
+
}], placeholder: [{
|
|
1044
|
+
type: i0.Input
|
|
1045
|
+
}], required: [{
|
|
1046
|
+
type: i0.Input
|
|
1047
|
+
}], labelHidden: [{
|
|
1048
|
+
type: i0.Input
|
|
1049
|
+
}], hasError: [{
|
|
1050
|
+
type: i0.Input
|
|
1051
|
+
}], describedBy: [{
|
|
1052
|
+
type: i0.Input
|
|
1053
|
+
}], setBlur: [{
|
|
1054
|
+
type: i0.Output
|
|
1055
|
+
}] } });
|
|
1056
|
+
|
|
1057
|
+
var TextFieldComponent = /** @class */ (function () {
|
|
1058
|
+
function TextFieldComponent() {
|
|
1059
|
+
this.autocomplete = 'new-password';
|
|
1060
|
+
this.disabled = false;
|
|
1061
|
+
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1062
|
+
this.initialValue = '';
|
|
1063
|
+
this.label = '';
|
|
1064
|
+
this.placeholder = '';
|
|
1065
|
+
this.required = true;
|
|
1066
|
+
this.labelHidden = false;
|
|
1067
|
+
this.display = 'contents';
|
|
1063
1068
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1069
|
+
return TextFieldComponent;
|
|
1070
|
+
}());
|
|
1071
|
+
TextFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TextFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1072
|
+
TextFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TextFieldComponent, selector: "amplify-text-field", inputs: { autocomplete: "autocomplete", disabled: "disabled", fieldId: "fieldId", initialValue: "initialValue", label: "label", name: "name", placeholder: "placeholder", required: "required", type: "type", labelHidden: "labelHidden", hasError: "hasError", describedBy: "describedBy" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0__namespace, template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n" });
|
|
1073
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TextFieldComponent, decorators: [{
|
|
1074
|
+
type: i0.Component,
|
|
1075
|
+
args: [{
|
|
1076
|
+
selector: 'amplify-text-field',
|
|
1077
|
+
templateUrl: './text-field.component.html',
|
|
1078
|
+
}]
|
|
1079
|
+
}], propDecorators: { autocomplete: [{
|
|
1080
|
+
type: i0.Input
|
|
1081
|
+
}], disabled: [{
|
|
1082
|
+
type: i0.Input
|
|
1083
|
+
}], fieldId: [{
|
|
1084
|
+
type: i0.Input
|
|
1085
|
+
}], initialValue: [{
|
|
1086
|
+
type: i0.Input
|
|
1087
|
+
}], label: [{
|
|
1088
|
+
type: i0.Input
|
|
1089
|
+
}], name: [{
|
|
1090
|
+
type: i0.Input
|
|
1091
|
+
}], placeholder: [{
|
|
1092
|
+
type: i0.Input
|
|
1093
|
+
}], required: [{
|
|
1094
|
+
type: i0.Input
|
|
1095
|
+
}], type: [{
|
|
1096
|
+
type: i0.Input
|
|
1097
|
+
}], labelHidden: [{
|
|
1098
|
+
type: i0.Input
|
|
1099
|
+
}], hasError: [{
|
|
1100
|
+
type: i0.Input
|
|
1101
|
+
}], describedBy: [{
|
|
1102
|
+
type: i0.Input
|
|
1103
|
+
}], display: [{
|
|
1104
|
+
type: i0.HostBinding,
|
|
1105
|
+
args: ['style.display']
|
|
1106
|
+
}] } });
|
|
1107
|
+
|
|
1108
|
+
var FormFieldComponent = /** @class */ (function () {
|
|
1109
|
+
function FormFieldComponent(authenticator) {
|
|
1110
|
+
this.authenticator = authenticator;
|
|
1111
|
+
this.countryDialCodesValue = ui.countryDialCodes;
|
|
1112
|
+
this.errorId = nanoid.nanoid(12);
|
|
1071
1113
|
}
|
|
1072
|
-
Object.defineProperty(
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
return
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1114
|
+
Object.defineProperty(FormFieldComponent.prototype, "errors", {
|
|
1115
|
+
get: function () {
|
|
1116
|
+
var validationErrors = this.authenticator.validationErrors;
|
|
1117
|
+
return ui.getErrors(validationErrors[this.name]);
|
|
1118
|
+
},
|
|
1119
|
+
enumerable: false,
|
|
1120
|
+
configurable: true
|
|
1121
|
+
});
|
|
1122
|
+
FormFieldComponent.prototype.onBlur = function ($event) {
|
|
1123
|
+
var name = $event.target.name;
|
|
1124
|
+
this.authenticator.updateBlur({ name: name });
|
|
1125
|
+
};
|
|
1126
|
+
FormFieldComponent.prototype.isPasswordField = function () {
|
|
1127
|
+
return this.formField.type === 'password';
|
|
1128
|
+
};
|
|
1129
|
+
FormFieldComponent.prototype.isPhoneField = function () {
|
|
1130
|
+
return this.formField.type === 'tel';
|
|
1131
|
+
};
|
|
1132
|
+
FormFieldComponent.prototype.hasError = function () {
|
|
1133
|
+
var _a;
|
|
1134
|
+
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1135
|
+
};
|
|
1136
|
+
Object.defineProperty(FormFieldComponent.prototype, "ariaDescribedBy", {
|
|
1137
|
+
get: function () {
|
|
1138
|
+
return this.hasError() ? this.errorId : undefined;
|
|
1139
|
+
},
|
|
1140
|
+
enumerable: false,
|
|
1141
|
+
configurable: true
|
|
1142
|
+
});
|
|
1143
|
+
FormFieldComponent.prototype.translate = function (phrase) {
|
|
1144
|
+
return ui.translate(phrase);
|
|
1145
|
+
};
|
|
1146
|
+
return FormFieldComponent;
|
|
1147
|
+
}());
|
|
1148
|
+
FormFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FormFieldComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1149
|
+
FormFieldComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FormFieldComponent, selector: "amplify-form-field", inputs: { name: "name", formField: "formField" }, ngImport: i0__namespace, template: "<div class=\"amplify-flex amplify-field amplify-authenticator__column\">\n <!-- Country code field -->\n <amplify-phone-number-field\n *ngIf=\"isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [defaultCountryCode]=\"formField.dialCode\"\n [dialCodeList]=\"formField.dialCodeList\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n type=\"tel\"\n ></amplify-phone-number-field>\n\n <amplify-password-field\n *ngIf=\"isPasswordField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n (setBlur)=\"onBlur($event)\"\n ></amplify-password-field>\n\n <amplify-text-field\n *ngIf=\"!isPasswordField() && !isPhoneField()\"\n [name]=\"name\"\n [label]=\"formField.label\"\n [placeholder]=\"formField.placeholder\"\n [required]=\"formField.isRequired\"\n [labelHidden]=\"formField.labelHidden\"\n [autocomplete]=\"formField.autocomplete\"\n [type]=\"formField.type\"\n [hasError]=\"hasError\"\n [describedBy]=\"ariaDescribedBy\"\n ></amplify-text-field>\n\n <div data-amplify-sign-up-errors *ngIf=\"hasError()\" [id]=\"errorId\">\n <div\n class=\"amplify-text amplify-text--error\"\n data-variation=\"error\"\n *ngFor=\"let error of errors\"\n >\n {{ translate(error) }}\n </div>\n </div>\n</div>\n", components: [{ type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: ["autocomplete", "disabled", "defaultCountryCode", "selectFieldId", "textFieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "dialCodeList", "hasError", "describedBy"] }, { type: PasswordFieldComponent, selector: "amplify-password-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "labelHidden", "hasError", "describedBy"], outputs: ["setBlur"] }, { type: TextFieldComponent, selector: "amplify-text-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "hasError", "describedBy"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1150
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FormFieldComponent, decorators: [{
|
|
1151
|
+
type: i0.Component,
|
|
1152
|
+
args: [{
|
|
1153
|
+
selector: 'amplify-form-field',
|
|
1154
|
+
templateUrl: './form-field.component.html',
|
|
1155
|
+
}]
|
|
1156
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { name: [{
|
|
1157
|
+
type: i0.Input
|
|
1158
|
+
}], formField: [{
|
|
1159
|
+
type: i0.Input
|
|
1160
|
+
}] } });
|
|
1161
|
+
|
|
1162
|
+
/**
|
|
1163
|
+
* Sorts the given formFields, then renders them in order.
|
|
1164
|
+
*/
|
|
1165
|
+
var BaseFormFieldsComponent = /** @class */ (function () {
|
|
1166
|
+
function BaseFormFieldsComponent(authenticator) {
|
|
1167
|
+
this.authenticator = authenticator;
|
|
1168
|
+
this.display = 'contents';
|
|
1169
|
+
this.formFields = [];
|
|
1105
1170
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1171
|
+
BaseFormFieldsComponent.prototype.ngOnInit = function () {
|
|
1172
|
+
var state = this.authenticator.authState;
|
|
1173
|
+
this.formFields = ui.getSortedFormFields(this.route, state);
|
|
1174
|
+
};
|
|
1175
|
+
return BaseFormFieldsComponent;
|
|
1176
|
+
}());
|
|
1177
|
+
BaseFormFieldsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BaseFormFieldsComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1178
|
+
BaseFormFieldsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: { route: "route" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0__namespace, template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n", components: [{ type: FormFieldComponent, selector: "amplify-form-field", inputs: ["name", "formField"] }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1179
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BaseFormFieldsComponent, decorators: [{
|
|
1180
|
+
type: i0.Component,
|
|
1181
|
+
args: [{
|
|
1182
|
+
selector: 'amplify-base-form-fields',
|
|
1183
|
+
templateUrl: './base-form-fields.component.html',
|
|
1184
|
+
}]
|
|
1185
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { route: [{
|
|
1186
|
+
type: i0.Input
|
|
1187
|
+
}], display: [{
|
|
1188
|
+
type: i0.HostBinding,
|
|
1189
|
+
args: ['style.display']
|
|
1190
|
+
}] } });
|
|
1191
|
+
|
|
1192
|
+
var ErrorComponent = /** @class */ (function () {
|
|
1193
|
+
function ErrorComponent() {
|
|
1194
|
+
this.isVisible = true;
|
|
1195
|
+
this.dismissAriaLabel = ui.translate('Dismiss alert');
|
|
1108
1196
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1197
|
+
ErrorComponent.prototype.close = function () {
|
|
1198
|
+
this.isVisible = false;
|
|
1199
|
+
};
|
|
1200
|
+
return ErrorComponent;
|
|
1201
|
+
}());
|
|
1202
|
+
ErrorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ErrorComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1203
|
+
ErrorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ErrorComponent, selector: "amplify-error", ngImport: i0__namespace, template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\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 [attr.aria-hidden]=\"true\"\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 amplify-alert__dismiss\"\n [attr.aria-label]=\"dismissAriaLabel\"\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 [attr.aria-hidden]=\"true\"\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", components: [{ type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1204
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ErrorComponent, decorators: [{
|
|
1205
|
+
type: i0.Component,
|
|
1206
|
+
args: [{
|
|
1207
|
+
selector: 'amplify-error',
|
|
1208
|
+
templateUrl: './error.component.html',
|
|
1209
|
+
}]
|
|
1210
|
+
}] });
|
|
1211
|
+
|
|
1212
|
+
var getForgotPasswordText = ui.authenticatorTextUtil.getForgotPasswordText, getSignInText = ui.authenticatorTextUtil.getSignInText;
|
|
1213
|
+
var SignInComponent = /** @class */ (function () {
|
|
1214
|
+
function SignInComponent(authenticator) {
|
|
1215
|
+
this.authenticator = authenticator;
|
|
1216
|
+
this.dataAttr = '';
|
|
1217
|
+
this.forgotPasswordText = getForgotPasswordText();
|
|
1218
|
+
this.signInButtonText = getSignInText();
|
|
1118
1219
|
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
1154
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
1155
|
-
function verb(n) { if (g[n])
|
|
1156
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
1157
|
-
function resume(n, v) { try {
|
|
1158
|
-
step(g[n](v));
|
|
1220
|
+
Object.defineProperty(SignInComponent.prototype, "context", {
|
|
1221
|
+
get: function () {
|
|
1222
|
+
return this.authenticator.slotContext;
|
|
1223
|
+
},
|
|
1224
|
+
enumerable: false,
|
|
1225
|
+
configurable: true
|
|
1226
|
+
});
|
|
1227
|
+
SignInComponent.prototype.onInput = function (event) {
|
|
1228
|
+
event.preventDefault();
|
|
1229
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1230
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1231
|
+
};
|
|
1232
|
+
SignInComponent.prototype.onSubmit = function (event) {
|
|
1233
|
+
event.preventDefault();
|
|
1234
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1235
|
+
};
|
|
1236
|
+
return SignInComponent;
|
|
1237
|
+
}());
|
|
1238
|
+
SignInComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignInComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1239
|
+
SignInComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SignInComponent, selector: "amplify-sign-in", host: { properties: { "attr.data-amplify-authenticator-signin": "this.dataAttr" } }, ngImport: i0__namespace, template: "<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 amplify-authenticator__column\"\n style=\"flex-direction: column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <legend class=\"amplify-visually-hidden\">Sign in</legend>\n <amplify-base-form-fields route=\"signIn\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1240
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignInComponent, decorators: [{
|
|
1241
|
+
type: i0.Component,
|
|
1242
|
+
args: [{
|
|
1243
|
+
selector: 'amplify-sign-in',
|
|
1244
|
+
templateUrl: './sign-in.component.html',
|
|
1245
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1246
|
+
}]
|
|
1247
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1248
|
+
type: i0.HostBinding,
|
|
1249
|
+
args: ['attr.data-amplify-authenticator-signin']
|
|
1250
|
+
}] } });
|
|
1251
|
+
|
|
1252
|
+
var SignUpFormFieldsComponent = /** @class */ (function () {
|
|
1253
|
+
function SignUpFormFieldsComponent() {
|
|
1159
1254
|
}
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1255
|
+
return SignUpFormFieldsComponent;
|
|
1256
|
+
}());
|
|
1257
|
+
SignUpFormFieldsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpFormFieldsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1258
|
+
SignUpFormFieldsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields", ngImport: i0__namespace, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"signUp\"></amplify-base-form-fields>\n</div>\n", components: [{ type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
|
|
1259
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpFormFieldsComponent, decorators: [{
|
|
1260
|
+
type: i0.Component,
|
|
1261
|
+
args: [{
|
|
1262
|
+
selector: 'amplify-sign-up-form-fields',
|
|
1263
|
+
templateUrl: './sign-up-form-fields.component.html',
|
|
1264
|
+
}]
|
|
1265
|
+
}] });
|
|
1266
|
+
|
|
1267
|
+
var getCreateAccountText = ui.authenticatorTextUtil.getCreateAccountText;
|
|
1268
|
+
var SignUpComponent = /** @class */ (function () {
|
|
1269
|
+
function SignUpComponent(authenticator) {
|
|
1270
|
+
this.authenticator = authenticator;
|
|
1271
|
+
this.dataAttr = '';
|
|
1272
|
+
// translated texts
|
|
1273
|
+
this.createAccountText = getCreateAccountText();
|
|
1274
|
+
}
|
|
1275
|
+
Object.defineProperty(SignUpComponent.prototype, "context", {
|
|
1276
|
+
get: function () {
|
|
1277
|
+
return this.authenticator.slotContext;
|
|
1278
|
+
},
|
|
1279
|
+
enumerable: false,
|
|
1280
|
+
configurable: true
|
|
1281
|
+
});
|
|
1282
|
+
SignUpComponent.prototype.onInput = function (event) {
|
|
1283
|
+
var _a = event.target, checked = _a.checked, name = _a.name, type = _a.type, value = _a.value;
|
|
1284
|
+
if (type === 'checkbox' && !checked)
|
|
1285
|
+
value = undefined;
|
|
1286
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1287
|
+
};
|
|
1288
|
+
SignUpComponent.prototype.onSubmit = function (event) {
|
|
1289
|
+
event.preventDefault();
|
|
1290
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1291
|
+
};
|
|
1292
|
+
return SignUpComponent;
|
|
1293
|
+
}());
|
|
1294
|
+
SignUpComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1295
|
+
SignUpComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SignUpComponent, selector: "amplify-sign-up", host: { properties: { "attr.data-amplify-authenticator-signup": "this.dataAttr" } }, ngImport: i0__namespace, 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 amplify-authenticator__column\">\n <div class=\"amplify-flex amplify-authenticator__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 [isDisabled]=\"\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }, { type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields" }, { type: ErrorComponent, selector: "amplify-error" }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1296
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpComponent, decorators: [{
|
|
1297
|
+
type: i0.Component,
|
|
1298
|
+
args: [{
|
|
1299
|
+
selector: 'amplify-sign-up',
|
|
1300
|
+
templateUrl: './sign-up.component.html',
|
|
1301
|
+
}]
|
|
1302
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1303
|
+
type: i0.HostBinding,
|
|
1304
|
+
args: ['attr.data-amplify-authenticator-signup']
|
|
1305
|
+
}] } });
|
|
1306
|
+
|
|
1307
|
+
var getResendCodeText$1 = ui.authenticatorTextUtil.getResendCodeText, getConfirmText$2 = ui.authenticatorTextUtil.getConfirmText, getDeliveryMethodText = ui.authenticatorTextUtil.getDeliveryMethodText, getDeliveryMessageText = ui.authenticatorTextUtil.getDeliveryMessageText;
|
|
1308
|
+
var ConfirmSignUpComponent = /** @class */ (function () {
|
|
1309
|
+
function ConfirmSignUpComponent(authenticator) {
|
|
1310
|
+
this.authenticator = authenticator;
|
|
1311
|
+
this.dataAttr = '';
|
|
1312
|
+
// translated texts
|
|
1313
|
+
this.resendCodeText = getResendCodeText$1();
|
|
1314
|
+
this.confirmText = getConfirmText$2();
|
|
1185
1315
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1316
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "context", {
|
|
1317
|
+
get: function () {
|
|
1318
|
+
return this.authenticator.slotContext;
|
|
1319
|
+
},
|
|
1320
|
+
enumerable: false,
|
|
1321
|
+
configurable: true
|
|
1322
|
+
});
|
|
1323
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "confirmSignUpHeading", {
|
|
1324
|
+
get: function () {
|
|
1325
|
+
var codeDeliveryDetails = this.authenticator.codeDeliveryDetails;
|
|
1326
|
+
return getDeliveryMethodText(codeDeliveryDetails);
|
|
1327
|
+
},
|
|
1328
|
+
enumerable: false,
|
|
1329
|
+
configurable: true
|
|
1330
|
+
});
|
|
1331
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "subtitleText", {
|
|
1332
|
+
get: function () {
|
|
1333
|
+
var codeDeliveryDetails = this.authenticator.codeDeliveryDetails;
|
|
1334
|
+
return getDeliveryMessageText(codeDeliveryDetails);
|
|
1335
|
+
},
|
|
1336
|
+
enumerable: false,
|
|
1337
|
+
configurable: true
|
|
1338
|
+
});
|
|
1339
|
+
ConfirmSignUpComponent.prototype.onInput = function (event) {
|
|
1340
|
+
event.preventDefault();
|
|
1341
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1342
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1343
|
+
};
|
|
1344
|
+
ConfirmSignUpComponent.prototype.onSubmit = function (event) {
|
|
1345
|
+
event.preventDefault();
|
|
1346
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1347
|
+
};
|
|
1348
|
+
return ConfirmSignUpComponent;
|
|
1349
|
+
}());
|
|
1350
|
+
ConfirmSignUpComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignUpComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1351
|
+
ConfirmSignUpComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up", host: { properties: { "attr.data-amplify-authenticator-confirmsignup": "this.dataAttr" } }, ngImport: i0__namespace, template: "<ng-container>\n <form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"context.isPending\"\n >\n <amplify-slot name=\"confirm-sign-up-header\" [context]=\"context\">\n <h3\n class=\"amplify-heading amplify-authenticator__heading\"\n style=\"font-size: 1.5rem\"\n >\n {{ confirmSignUpHeading }}\n </h3>\n </amplify-slot>\n <span class=\"amplify-authenticator__subtitle\">\n {{ subtitleText }}\n </span>\n <amplify-base-form-fields\n route=\"confirmSignUp\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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</ng-container>\n", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1352
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignUpComponent, decorators: [{
|
|
1353
|
+
type: i0.Component,
|
|
1354
|
+
args: [{
|
|
1355
|
+
selector: 'amplify-confirm-sign-up',
|
|
1356
|
+
templateUrl: './confirm-sign-up.component.html',
|
|
1357
|
+
}]
|
|
1358
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1359
|
+
type: i0.HostBinding,
|
|
1360
|
+
args: ['attr.data-amplify-authenticator-confirmsignup']
|
|
1361
|
+
}] } });
|
|
1362
|
+
|
|
1363
|
+
var getConfirmText$1 = ui.authenticatorTextUtil.getConfirmText, getBackToSignInText$4 = ui.authenticatorTextUtil.getBackToSignInText, getChallengeText = ui.authenticatorTextUtil.getChallengeText;
|
|
1364
|
+
var ConfirmSignInComponent = /** @class */ (function () {
|
|
1365
|
+
function ConfirmSignInComponent(authenticator) {
|
|
1366
|
+
this.authenticator = authenticator;
|
|
1367
|
+
this.dataAttr = '';
|
|
1368
|
+
this.confirmText = getConfirmText$1();
|
|
1369
|
+
this.backToSignInText = getBackToSignInText$4();
|
|
1188
1370
|
}
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
1229
|
-
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
1230
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
1231
|
-
}
|
|
1371
|
+
ConfirmSignInComponent.prototype.ngOnInit = function () {
|
|
1372
|
+
this.setHeaderText();
|
|
1373
|
+
};
|
|
1374
|
+
Object.defineProperty(ConfirmSignInComponent.prototype, "context", {
|
|
1375
|
+
get: function () {
|
|
1376
|
+
return this.authenticator.slotContext;
|
|
1377
|
+
},
|
|
1378
|
+
enumerable: false,
|
|
1379
|
+
configurable: true
|
|
1380
|
+
});
|
|
1381
|
+
ConfirmSignInComponent.prototype.setHeaderText = function () {
|
|
1382
|
+
var state = this.authenticator.authState;
|
|
1383
|
+
var actorContext = ui.getActorContext(state);
|
|
1384
|
+
var challengeName = actorContext.challengeName;
|
|
1385
|
+
this.headerText = getChallengeText(challengeName);
|
|
1386
|
+
};
|
|
1387
|
+
ConfirmSignInComponent.prototype.onInput = function (event) {
|
|
1388
|
+
event.preventDefault();
|
|
1389
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1390
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1391
|
+
};
|
|
1392
|
+
ConfirmSignInComponent.prototype.onSubmit = function (event) {
|
|
1393
|
+
event.preventDefault();
|
|
1394
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1395
|
+
};
|
|
1396
|
+
return ConfirmSignInComponent;
|
|
1397
|
+
}());
|
|
1398
|
+
ConfirmSignInComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignInComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1399
|
+
ConfirmSignInComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in", host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"confirmSignIn\"></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1400
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignInComponent, decorators: [{
|
|
1401
|
+
type: i0.Component,
|
|
1402
|
+
args: [{
|
|
1403
|
+
selector: 'amplify-confirm-sign-in',
|
|
1404
|
+
templateUrl: './confirm-sign-in.component.html',
|
|
1405
|
+
}]
|
|
1406
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1407
|
+
type: i0.HostBinding,
|
|
1408
|
+
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
1409
|
+
}] } });
|
|
1232
1410
|
|
|
1233
1411
|
var logger = new awsAmplify.Logger('SetupTotp');
|
|
1412
|
+
var getSetupTOTPText = ui.authenticatorTextUtil.getSetupTOTPText, getCopyText = ui.authenticatorTextUtil.getCopyText, getBackToSignInText$3 = ui.authenticatorTextUtil.getBackToSignInText, getConfirmText = ui.authenticatorTextUtil.getConfirmText, getCopiedText = ui.authenticatorTextUtil.getCopiedText;
|
|
1234
1413
|
var SetupTotpComponent = /** @class */ (function () {
|
|
1235
1414
|
function SetupTotpComponent(authenticator) {
|
|
1236
1415
|
this.authenticator = authenticator;
|
|
1237
1416
|
this.dataAttr = '';
|
|
1238
|
-
this.headerText =
|
|
1417
|
+
this.headerText = getSetupTOTPText();
|
|
1239
1418
|
this.qrCodeSource = '';
|
|
1240
1419
|
this.secretKey = '';
|
|
1241
|
-
this.copyTextLabel =
|
|
1420
|
+
this.copyTextLabel = getCopyText();
|
|
1242
1421
|
// translated texts
|
|
1243
|
-
this.backToSignInText =
|
|
1244
|
-
this.confirmText =
|
|
1422
|
+
this.backToSignInText = getBackToSignInText$3();
|
|
1423
|
+
this.confirmText = getConfirmText();
|
|
1245
1424
|
}
|
|
1246
1425
|
SetupTotpComponent.prototype.ngOnInit = function () {
|
|
1247
1426
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1307,129 +1486,181 @@
|
|
|
1307
1486
|
};
|
|
1308
1487
|
SetupTotpComponent.prototype.copyText = function () {
|
|
1309
1488
|
navigator.clipboard.writeText(this.secretKey);
|
|
1310
|
-
this.copyTextLabel =
|
|
1489
|
+
this.copyTextLabel = getCopiedText();
|
|
1311
1490
|
};
|
|
1312
1491
|
return SetupTotpComponent;
|
|
1313
1492
|
}());
|
|
1314
|
-
SetupTotpComponent
|
|
1315
|
-
{ type:
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1493
|
+
SetupTotpComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SetupTotpComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1494
|
+
SetupTotpComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SetupTotpComponent, selector: "amplify-setup-totp", host: { properties: { "attr.data-amplify-authenticator-setup-totp": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"setup-totp-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ 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 <div class=\"amplify-flex\" data-amplify-copy>\n <div>{{ secretKey }}</div>\n <div data-amplify-copy-svg (click)=\"copyText()\">\n <div data-amplify-copy-tooltip>{{ copyTextLabel }}</div>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16 1H4C2.9 1 2 1.9 2 3V17H4V3H16V1ZM15 5H8C6.9 5 6.01 5.9 6.01 7L6 21C6 22.1 6.89 23 7.99 23H19C20.1 23 21 22.1 21 21V11L15 5ZM8 21V7H14V12H19V21H8Z\"\n />\n </svg>\n </div>\n </div>\n\n <amplify-base-form-fields route=\"setupTOTP\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1495
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SetupTotpComponent, decorators: [{
|
|
1496
|
+
type: i0.Component,
|
|
1497
|
+
args: [{
|
|
1498
|
+
selector: 'amplify-setup-totp',
|
|
1499
|
+
templateUrl: './setup-totp.component.html',
|
|
1500
|
+
}]
|
|
1501
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1502
|
+
type: i0.HostBinding,
|
|
1503
|
+
args: ['attr.data-amplify-authenticator-setup-totp']
|
|
1504
|
+
}] } });
|
|
1326
1505
|
|
|
1327
|
-
var
|
|
1328
|
-
function
|
|
1506
|
+
var ForceNewPasswordFormFieldsComponent = /** @class */ (function () {
|
|
1507
|
+
function ForceNewPasswordFormFieldsComponent() {
|
|
1508
|
+
}
|
|
1509
|
+
return ForceNewPasswordFormFieldsComponent;
|
|
1510
|
+
}());
|
|
1511
|
+
ForceNewPasswordFormFieldsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordFormFieldsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1512
|
+
ForceNewPasswordFormFieldsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields", ngImport: i0__namespace, template: "<div class=\"amplify-flex amplify-authenticator__column\" data-amplify-fieldset>\n <amplify-base-form-fields route=\"forceNewPassword\"></amplify-base-form-fields>\n</div>\n", components: [{ type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
|
|
1513
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordFormFieldsComponent, decorators: [{
|
|
1514
|
+
type: i0.Component,
|
|
1515
|
+
args: [{
|
|
1516
|
+
selector: 'amplify-force-new-password-form-fields',
|
|
1517
|
+
templateUrl: './force-new-password-form-fields.component.html',
|
|
1518
|
+
}]
|
|
1519
|
+
}] });
|
|
1520
|
+
|
|
1521
|
+
var getChangePasswordText = ui.authenticatorTextUtil.getChangePasswordText, getBackToSignInText$2 = ui.authenticatorTextUtil.getBackToSignInText;
|
|
1522
|
+
var ForceNewPasswordComponent = /** @class */ (function () {
|
|
1523
|
+
function ForceNewPasswordComponent(authenticator) {
|
|
1329
1524
|
this.authenticator = authenticator;
|
|
1330
1525
|
this.dataAttr = '';
|
|
1331
|
-
|
|
1332
|
-
//
|
|
1333
|
-
this.
|
|
1334
|
-
|
|
1335
|
-
: ui.translate('Forgot your password? ');
|
|
1336
|
-
this.signInButtonText = ui.translate('Sign in');
|
|
1526
|
+
this.headerText = getChangePasswordText();
|
|
1527
|
+
// translated texts
|
|
1528
|
+
this.changePasswordText = getChangePasswordText();
|
|
1529
|
+
this.backToSignInText = getBackToSignInText$2();
|
|
1337
1530
|
}
|
|
1338
|
-
Object.defineProperty(
|
|
1531
|
+
Object.defineProperty(ForceNewPasswordComponent.prototype, "context", {
|
|
1339
1532
|
get: function () {
|
|
1340
1533
|
return this.authenticator.slotContext;
|
|
1341
1534
|
},
|
|
1342
1535
|
enumerable: false,
|
|
1343
1536
|
configurable: true
|
|
1344
1537
|
});
|
|
1345
|
-
|
|
1538
|
+
ForceNewPasswordComponent.prototype.onInput = function (event) {
|
|
1346
1539
|
event.preventDefault();
|
|
1347
1540
|
var _a = event.target, name = _a.name, value = _a.value;
|
|
1348
1541
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1349
1542
|
};
|
|
1350
|
-
|
|
1543
|
+
ForceNewPasswordComponent.prototype.onSubmit = function (event) {
|
|
1351
1544
|
event.preventDefault();
|
|
1352
1545
|
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1353
1546
|
};
|
|
1354
|
-
return
|
|
1547
|
+
return ForceNewPasswordComponent;
|
|
1355
1548
|
}());
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1549
|
+
ForceNewPasswordComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1550
|
+
ForceNewPasswordComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forcenewpassword": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-slot name=\"force-new-form-fields\" [context]=\"context\">\n <amplify-force-new-password-form-fields></amplify-force-new-password-form-fields>\n </amplify-slot>\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields" }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1551
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordComponent, decorators: [{
|
|
1552
|
+
type: i0.Component,
|
|
1553
|
+
args: [{
|
|
1554
|
+
selector: 'amplify-force-new-password',
|
|
1555
|
+
templateUrl: './force-new-password.component.html',
|
|
1556
|
+
}]
|
|
1557
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1558
|
+
type: i0.HostBinding,
|
|
1559
|
+
args: ['attr.data-amplify-authenticator-forcenewpassword']
|
|
1560
|
+
}], headerText: [{
|
|
1561
|
+
type: i0.Input
|
|
1562
|
+
}] } });
|
|
1369
1563
|
|
|
1370
|
-
var
|
|
1371
|
-
|
|
1564
|
+
var getResetYourPasswordText$1 = ui.authenticatorTextUtil.getResetYourPasswordText, getSendCodeText = ui.authenticatorTextUtil.getSendCodeText, getBackToSignInText$1 = ui.authenticatorTextUtil.getBackToSignInText;
|
|
1565
|
+
var ResetPasswordComponent = /** @class */ (function () {
|
|
1566
|
+
function ResetPasswordComponent(authenticator) {
|
|
1372
1567
|
this.authenticator = authenticator;
|
|
1373
1568
|
this.dataAttr = '';
|
|
1569
|
+
this.headerText = getResetYourPasswordText$1();
|
|
1374
1570
|
// translated texts
|
|
1375
|
-
this.
|
|
1571
|
+
this.sendCodeText = getSendCodeText();
|
|
1572
|
+
this.backToSignInText = getBackToSignInText$1();
|
|
1376
1573
|
}
|
|
1377
|
-
Object.defineProperty(
|
|
1574
|
+
Object.defineProperty(ResetPasswordComponent.prototype, "context", {
|
|
1378
1575
|
get: function () {
|
|
1379
1576
|
return this.authenticator.slotContext;
|
|
1380
1577
|
},
|
|
1381
1578
|
enumerable: false,
|
|
1382
1579
|
configurable: true
|
|
1383
1580
|
});
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
value = undefined;
|
|
1581
|
+
ResetPasswordComponent.prototype.onInput = function (event) {
|
|
1582
|
+
event.preventDefault();
|
|
1583
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1388
1584
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1389
1585
|
};
|
|
1390
|
-
|
|
1586
|
+
ResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
1391
1587
|
event.preventDefault();
|
|
1392
1588
|
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1393
1589
|
};
|
|
1394
|
-
return
|
|
1590
|
+
return ResetPasswordComponent;
|
|
1395
1591
|
}());
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1592
|
+
ResetPasswordComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1593
|
+
ResetPasswordComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ResetPasswordComponent, selector: "amplify-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-resetPassword": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields route=\"resetPassword\"></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1594
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResetPasswordComponent, decorators: [{
|
|
1595
|
+
type: i0.Component,
|
|
1596
|
+
args: [{
|
|
1597
|
+
selector: 'amplify-reset-password',
|
|
1598
|
+
templateUrl: './reset-password.component.html',
|
|
1599
|
+
}]
|
|
1600
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1601
|
+
type: i0.HostBinding,
|
|
1602
|
+
args: ['attr.data-amplify-authenticator-resetPassword']
|
|
1603
|
+
}], headerText: [{
|
|
1604
|
+
type: i0.Input
|
|
1605
|
+
}] } });
|
|
1408
1606
|
|
|
1409
|
-
var
|
|
1410
|
-
|
|
1607
|
+
var getBackToSignInText = ui.authenticatorTextUtil.getBackToSignInText, getResendCodeText = ui.authenticatorTextUtil.getResendCodeText, getSubmitText$1 = ui.authenticatorTextUtil.getSubmitText, getResetYourPasswordText = ui.authenticatorTextUtil.getResetYourPasswordText;
|
|
1608
|
+
var ConfirmResetPasswordComponent = /** @class */ (function () {
|
|
1609
|
+
function ConfirmResetPasswordComponent(authenticator) {
|
|
1610
|
+
this.authenticator = authenticator;
|
|
1611
|
+
this.dataAttr = '';
|
|
1612
|
+
this.headerText = getResetYourPasswordText();
|
|
1613
|
+
// translated strings
|
|
1614
|
+
this.backToSignInText = getBackToSignInText();
|
|
1615
|
+
this.resendCodeText = getResendCodeText();
|
|
1616
|
+
this.submitText = getSubmitText$1();
|
|
1411
1617
|
}
|
|
1412
|
-
|
|
1618
|
+
Object.defineProperty(ConfirmResetPasswordComponent.prototype, "context", {
|
|
1619
|
+
get: function () {
|
|
1620
|
+
return this.authenticator.slotContext;
|
|
1621
|
+
},
|
|
1622
|
+
enumerable: false,
|
|
1623
|
+
configurable: true
|
|
1624
|
+
});
|
|
1625
|
+
ConfirmResetPasswordComponent.prototype.onInput = function (event) {
|
|
1626
|
+
event.preventDefault();
|
|
1627
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1628
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1629
|
+
};
|
|
1630
|
+
ConfirmResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
1631
|
+
event.preventDefault();
|
|
1632
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1633
|
+
};
|
|
1634
|
+
return ConfirmResetPasswordComponent;
|
|
1413
1635
|
}());
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1636
|
+
ConfirmResetPasswordComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1637
|
+
ConfirmResetPasswordComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (submit)=\"onSubmit($event)\" (input)=\"onInput($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ headerText }}</h3>\n </amplify-slot>\n\n <amplify-base-form-fields\n route=\"confirmResetPassword\"\n ></amplify-base-form-fields>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ submitText }}\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1638
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmResetPasswordComponent, decorators: [{
|
|
1639
|
+
type: i0.Component,
|
|
1640
|
+
args: [{
|
|
1641
|
+
selector: 'amplify-confirm-reset-password',
|
|
1642
|
+
templateUrl: './amplify-confirm-reset-password.component.html',
|
|
1643
|
+
}]
|
|
1644
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1645
|
+
type: i0.HostBinding,
|
|
1646
|
+
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
1647
|
+
}], headerText: [{
|
|
1648
|
+
type: i0.Input
|
|
1649
|
+
}] } });
|
|
1420
1650
|
|
|
1421
1651
|
var getAttributeMap = function () { return ui.defaultFormFieldOptions; };
|
|
1422
1652
|
|
|
1653
|
+
var getSkipText$1 = ui.authenticatorTextUtil.getSkipText, getVerifyText = ui.authenticatorTextUtil.getVerifyText, getAccountRecoveryInfoText$1 = ui.authenticatorTextUtil.getAccountRecoveryInfoText;
|
|
1423
1654
|
var VerifyUserComponent = /** @class */ (function () {
|
|
1424
1655
|
function VerifyUserComponent(authenticator) {
|
|
1425
1656
|
this.authenticator = authenticator;
|
|
1426
1657
|
this.dataAttr = '';
|
|
1427
|
-
this.headerText =
|
|
1658
|
+
this.headerText = getAccountRecoveryInfoText$1();
|
|
1428
1659
|
this.unverifiedContactMethods = {};
|
|
1429
1660
|
this.labelId = nanoid.nanoid(12);
|
|
1430
1661
|
// translated texts
|
|
1431
|
-
this.skipText =
|
|
1432
|
-
this.verifyText =
|
|
1662
|
+
this.skipText = getSkipText$1();
|
|
1663
|
+
this.verifyText = getVerifyText();
|
|
1433
1664
|
}
|
|
1434
1665
|
VerifyUserComponent.prototype.ngOnInit = function () {
|
|
1435
1666
|
var actorState = ui.getActorState(this.authenticator.authState);
|
|
@@ -1453,145 +1684,245 @@
|
|
|
1453
1684
|
var _b = event.target, name = _b.name, value = _b.value;
|
|
1454
1685
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1455
1686
|
};
|
|
1456
|
-
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1457
|
-
event.preventDefault();
|
|
1458
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1687
|
+
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1688
|
+
event.preventDefault();
|
|
1689
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1690
|
+
};
|
|
1691
|
+
return VerifyUserComponent;
|
|
1692
|
+
}());
|
|
1693
|
+
VerifyUserComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1694
|
+
VerifyUserComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-verifyuser": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div\n *ngFor=\"\n let unverifiedContactMethod of unverifiedContactMethods | keyvalue\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedContactMethod.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{\n getLabelForAttr(unverifiedContactMethod.key)\n }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "keyvalue": i6__namespace.KeyValuePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1695
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerifyUserComponent, decorators: [{
|
|
1696
|
+
type: i0.Component,
|
|
1697
|
+
args: [{
|
|
1698
|
+
selector: 'amplify-verify-user',
|
|
1699
|
+
templateUrl: './verify-user.component.html',
|
|
1700
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1701
|
+
}]
|
|
1702
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1703
|
+
type: i0.HostBinding,
|
|
1704
|
+
args: ['attr.data-amplify-authenticator-verifyuser']
|
|
1705
|
+
}], headerText: [{
|
|
1706
|
+
type: i0.Input
|
|
1707
|
+
}] } });
|
|
1708
|
+
|
|
1709
|
+
var getAccountRecoveryInfoText = ui.authenticatorTextUtil.getAccountRecoveryInfoText, getSkipText = ui.authenticatorTextUtil.getSkipText, getSubmitText = ui.authenticatorTextUtil.getSubmitText;
|
|
1710
|
+
var ConfirmVerifyUserComponent = /** @class */ (function () {
|
|
1711
|
+
function ConfirmVerifyUserComponent(authenticator) {
|
|
1712
|
+
this.authenticator = authenticator;
|
|
1713
|
+
this.dataAttr = '';
|
|
1714
|
+
this.headerText = getAccountRecoveryInfoText();
|
|
1715
|
+
// translated texts
|
|
1716
|
+
this.skipText = getSkipText();
|
|
1717
|
+
this.submitText = getSubmitText();
|
|
1718
|
+
}
|
|
1719
|
+
Object.defineProperty(ConfirmVerifyUserComponent.prototype, "context", {
|
|
1720
|
+
get: function () {
|
|
1721
|
+
return this.authenticator.slotContext;
|
|
1722
|
+
},
|
|
1723
|
+
enumerable: false,
|
|
1724
|
+
configurable: true
|
|
1725
|
+
});
|
|
1726
|
+
ConfirmVerifyUserComponent.prototype.onInput = function (event) {
|
|
1727
|
+
event.preventDefault();
|
|
1728
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1729
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1730
|
+
};
|
|
1731
|
+
ConfirmVerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1732
|
+
event.preventDefault();
|
|
1733
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1734
|
+
};
|
|
1735
|
+
return ConfirmVerifyUserComponent;
|
|
1736
|
+
}());
|
|
1737
|
+
ConfirmVerifyUserComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmVerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1738
|
+
ConfirmVerifyUserComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmverifyuser": "this.dataAttr" } }, ngImport: i0__namespace, template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__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 amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields\n route=\"confirmVerifyUser\"\n ></amplify-base-form-fields>\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { type: ErrorComponent, selector: "amplify-error" }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1739
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmVerifyUserComponent, decorators: [{
|
|
1740
|
+
type: i0.Component,
|
|
1741
|
+
args: [{
|
|
1742
|
+
selector: 'amplify-confirm-verify-user',
|
|
1743
|
+
templateUrl: './amplify-confirm-verify-user.component.html',
|
|
1744
|
+
}]
|
|
1745
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1746
|
+
type: i0.HostBinding,
|
|
1747
|
+
args: ['attr.data-amplify-authenticator-confirmverifyuser']
|
|
1748
|
+
}], headerText: [{
|
|
1749
|
+
type: i0.Input
|
|
1750
|
+
}] } });
|
|
1751
|
+
|
|
1752
|
+
var getSignInTabText = ui.authenticatorTextUtil.getSignInTabText, getSignUpTabText = ui.authenticatorTextUtil.getSignUpTabText;
|
|
1753
|
+
var AuthenticatorComponent = /** @class */ (function () {
|
|
1754
|
+
function AuthenticatorComponent(authenticator, contextService, changeDetector) {
|
|
1755
|
+
this.authenticator = authenticator;
|
|
1756
|
+
this.contextService = contextService;
|
|
1757
|
+
this.changeDetector = changeDetector;
|
|
1758
|
+
this.customComponentQuery = null;
|
|
1759
|
+
// translated texts
|
|
1760
|
+
this.signInTitle = getSignInTabText();
|
|
1761
|
+
this.signUpTitle = getSignUpTabText();
|
|
1762
|
+
this.hasInitialized = false;
|
|
1763
|
+
this.isHandlingHubEvent = false;
|
|
1764
|
+
}
|
|
1765
|
+
AuthenticatorComponent.prototype.ngOnInit = function () {
|
|
1766
|
+
var _this = this;
|
|
1767
|
+
var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms, services = _a.services, signUpAttributes = _a.signUpAttributes, socialProviders = _a.socialProviders, formFields = _a.formFields;
|
|
1768
|
+
var _b = this.authenticator, authService = _b.authService, initializeMachine = _b.initializeMachine;
|
|
1769
|
+
this.unsubscribeHub = ui.listenToAuthHub(authService, function (data, service) { return __awaiter(_this, void 0, void 0, function () {
|
|
1770
|
+
return __generator(this, function (_a) {
|
|
1771
|
+
switch (_a.label) {
|
|
1772
|
+
case 0: return [4 /*yield*/, ui.defaultAuthHubHandler(data, service)];
|
|
1773
|
+
case 1:
|
|
1774
|
+
_a.sent();
|
|
1775
|
+
/**
|
|
1776
|
+
* Hub events aren't properly caught by Angular, because they are
|
|
1777
|
+
* synchronous events. Angular tracks async network events and
|
|
1778
|
+
* html events, but not synchronous events like hub.
|
|
1779
|
+
*
|
|
1780
|
+
* On any notable hub events, we run change detection manually.
|
|
1781
|
+
*/
|
|
1782
|
+
this.changeDetector.detectChanges();
|
|
1783
|
+
/**
|
|
1784
|
+
* Hub events that we handle can lead to multiple state changes:
|
|
1785
|
+
* e.g. `authenticated` -> `signOut` -> initialState.
|
|
1786
|
+
*
|
|
1787
|
+
* We want to ensure change detection runs all the way, until
|
|
1788
|
+
* we reach back to the initial state. Setting the below flag
|
|
1789
|
+
* to true to until we reach initial state.
|
|
1790
|
+
*/
|
|
1791
|
+
this.isHandlingHubEvent = true;
|
|
1792
|
+
return [2 /*return*/];
|
|
1793
|
+
}
|
|
1794
|
+
});
|
|
1795
|
+
}); });
|
|
1796
|
+
/**
|
|
1797
|
+
* Subscribes to state machine changes and sends INIT event
|
|
1798
|
+
* once machine reaches 'setup' state.
|
|
1799
|
+
*/
|
|
1800
|
+
this.unsubscribeMachine = this.authenticator.subscribe(function () {
|
|
1801
|
+
var route = _this.authenticator.route;
|
|
1802
|
+
if (_this.isHandlingHubEvent) {
|
|
1803
|
+
_this.changeDetector.detectChanges();
|
|
1804
|
+
var initialStateWithDefault = initialState !== null && initialState !== void 0 ? initialState : 'signIn';
|
|
1805
|
+
// We can stop manual change detection if we're back to the initial state
|
|
1806
|
+
if (route === initialStateWithDefault) {
|
|
1807
|
+
_this.isHandlingHubEvent = false;
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
if (!_this.hasInitialized && route === 'setup') {
|
|
1811
|
+
initializeMachine({
|
|
1812
|
+
initialState: initialState,
|
|
1813
|
+
loginMechanisms: loginMechanisms,
|
|
1814
|
+
services: services,
|
|
1815
|
+
signUpAttributes: signUpAttributes,
|
|
1816
|
+
socialProviders: socialProviders,
|
|
1817
|
+
formFields: formFields,
|
|
1818
|
+
});
|
|
1819
|
+
_this.hasInitialized = true;
|
|
1820
|
+
}
|
|
1821
|
+
}).unsubscribe;
|
|
1822
|
+
/**
|
|
1823
|
+
* handling translations after content init, because authenticator and its
|
|
1824
|
+
* translations might be initialized before the main app's `ngOnInit` is run.
|
|
1825
|
+
*/
|
|
1826
|
+
this.signInTitle = getSignInTabText();
|
|
1827
|
+
this.signUpTitle = getSignUpTabText();
|
|
1828
|
+
};
|
|
1829
|
+
/**
|
|
1830
|
+
* Lifecycle Methods
|
|
1831
|
+
*/
|
|
1832
|
+
AuthenticatorComponent.prototype.ngAfterContentInit = function () {
|
|
1833
|
+
this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
|
|
1459
1834
|
};
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
template: "<form data-amplify-form (input)=\"onInput($event)\" (submit)=\"onSubmit($event)\">\n <fieldset\n class=\"amplify-flex amplify-authenticator__column\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot name=\"verify-user-header\" [context]=\"context\">\n <h3 class=\"amplify-heading amplify-heading--3\">{{ this.headerText }}</h3>\n </amplify-slot>\n\n <div\n *ngFor=\"\n let unverifiedContactMethod of unverifiedContactMethods | keyvalue\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedContactMethod.key\"\n [id]=\"labelId\"\n />\n <label [for]=\"labelId\">{{\n getLabelForAttr(unverifiedContactMethod.key)\n }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\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",
|
|
1466
|
-
encapsulation: i0.ViewEncapsulation.None
|
|
1467
|
-
},] }
|
|
1468
|
-
];
|
|
1469
|
-
VerifyUserComponent.ctorParameters = function () { return [
|
|
1470
|
-
{ type: AuthenticatorService }
|
|
1471
|
-
]; };
|
|
1472
|
-
VerifyUserComponent.propDecorators = {
|
|
1473
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-verifyuser',] }],
|
|
1474
|
-
headerText: [{ type: i0.Input }]
|
|
1475
|
-
};
|
|
1476
|
-
|
|
1477
|
-
/**
|
|
1478
|
-
* Sorts the given formFields, then renders them in order.
|
|
1479
|
-
*/
|
|
1480
|
-
var BaseFormFieldsComponent = /** @class */ (function () {
|
|
1481
|
-
function BaseFormFieldsComponent(authenticator) {
|
|
1482
|
-
this.authenticator = authenticator;
|
|
1483
|
-
this.display = 'contents';
|
|
1484
|
-
this.formFields = [];
|
|
1485
|
-
}
|
|
1486
|
-
BaseFormFieldsComponent.prototype.ngOnInit = function () {
|
|
1487
|
-
var state = this.authenticator.authState;
|
|
1488
|
-
this.formFields = ui.getSortedFormFields(this.route, state);
|
|
1489
|
-
if (this.route === 'confirmSignUp') {
|
|
1490
|
-
this.handleConfirmSignUp();
|
|
1491
|
-
}
|
|
1835
|
+
AuthenticatorComponent.prototype.ngOnDestroy = function () {
|
|
1836
|
+
if (this.unsubscribeMachine)
|
|
1837
|
+
this.unsubscribeMachine();
|
|
1838
|
+
if (this.unsubscribeHub)
|
|
1839
|
+
this.unsubscribeHub();
|
|
1492
1840
|
};
|
|
1493
|
-
|
|
1841
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "context", {
|
|
1494
1842
|
/**
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
* Translating here in a backwards-compatible manner, but should be resolved in next major version.
|
|
1843
|
+
* Class Functions
|
|
1498
1844
|
*/
|
|
1499
|
-
|
|
1500
|
-
var state = this.authenticator.authState;
|
|
1501
|
-
// backwards compatible placeholder text
|
|
1502
|
-
var placeholder = !ui.hasTranslation('Confirmation Code')
|
|
1503
|
-
? ui.translate('Enter your code') // prioritize new placeholder
|
|
1504
|
-
: ui.translate('Confirmation Code'); // legacy placeholder
|
|
1505
|
-
var defaultFormFields = ui.getDefaultFormFields(this.route, state);
|
|
1506
|
-
if (defaultFormFields.confirmation_code.placeholder) {
|
|
1507
|
-
defaultFormFields.confirmation_code.placeholder = placeholder;
|
|
1508
|
-
}
|
|
1509
|
-
var customFormFields = ((_a = ui.getActorContext(state).formFields) === null || _a === void 0 ? void 0 : _a.confirmSignUp) || {};
|
|
1510
|
-
var newFormFields = ui.applyDefaults(defaultFormFields, customFormFields);
|
|
1511
|
-
this.formFields = ui.sortFormFields(newFormFields);
|
|
1512
|
-
};
|
|
1513
|
-
return BaseFormFieldsComponent;
|
|
1514
|
-
}());
|
|
1515
|
-
BaseFormFieldsComponent.decorators = [
|
|
1516
|
-
{ type: i0.Component, args: [{
|
|
1517
|
-
selector: 'amplify-base-form-fields',
|
|
1518
|
-
template: "<ng-container *ngFor=\"let formField of formFields\">\n <amplify-form-field\n [name]=\"formField[0]\"\n [formField]=\"formField[1]\"\n ></amplify-form-field>\n</ng-container>\n"
|
|
1519
|
-
},] }
|
|
1520
|
-
];
|
|
1521
|
-
BaseFormFieldsComponent.ctorParameters = function () { return [
|
|
1522
|
-
{ type: AuthenticatorService }
|
|
1523
|
-
]; };
|
|
1524
|
-
BaseFormFieldsComponent.propDecorators = {
|
|
1525
|
-
route: [{ type: i0.Input }],
|
|
1526
|
-
display: [{ type: i0.HostBinding, args: ['style.display',] }]
|
|
1527
|
-
};
|
|
1528
|
-
|
|
1529
|
-
var ButtonComponent = /** @class */ (function () {
|
|
1530
|
-
function ButtonComponent() {
|
|
1531
|
-
this.type = 'button';
|
|
1532
|
-
this.fullWidth = false;
|
|
1533
|
-
this.isDisabled = false;
|
|
1534
|
-
this.size = 'medium';
|
|
1535
|
-
this.variation = 'default';
|
|
1536
|
-
this.fontWeight = 'normal';
|
|
1537
|
-
}
|
|
1538
|
-
Object.defineProperty(ButtonComponent.prototype, "getDisabled", {
|
|
1845
|
+
// context passed to "authenticated" slot
|
|
1539
1846
|
get: function () {
|
|
1540
|
-
return this.
|
|
1847
|
+
return this.authenticator.slotContext;
|
|
1541
1848
|
},
|
|
1542
1849
|
enumerable: false,
|
|
1543
1850
|
configurable: true
|
|
1544
1851
|
});
|
|
1545
|
-
Object.defineProperty(
|
|
1852
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "route", {
|
|
1546
1853
|
get: function () {
|
|
1547
|
-
|
|
1548
|
-
if (this.variation) {
|
|
1549
|
-
className += " amplify-button--" + this.variation;
|
|
1550
|
-
}
|
|
1551
|
-
if (this.size) {
|
|
1552
|
-
className += " amplify-button--" + this.size;
|
|
1553
|
-
}
|
|
1554
|
-
if (this.fullWidth) {
|
|
1555
|
-
className += " amplify-button--fullwidth";
|
|
1556
|
-
}
|
|
1557
|
-
if (this.isDisabled) {
|
|
1558
|
-
className += " amplify-button--disabled amplify-button--loading";
|
|
1559
|
-
}
|
|
1560
|
-
return className;
|
|
1854
|
+
return this.authenticator.route;
|
|
1561
1855
|
},
|
|
1562
1856
|
enumerable: false,
|
|
1563
1857
|
configurable: true
|
|
1564
1858
|
});
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1859
|
+
AuthenticatorComponent.prototype.onTabChange = function () {
|
|
1860
|
+
var route = this.authenticator.route;
|
|
1861
|
+
if (route === 'signIn') {
|
|
1862
|
+
this.authenticator.toSignUp();
|
|
1863
|
+
}
|
|
1864
|
+
else {
|
|
1865
|
+
this.authenticator.toSignIn();
|
|
1866
|
+
}
|
|
1571
1867
|
};
|
|
1572
|
-
|
|
1868
|
+
AuthenticatorComponent.prototype.hasTabs = function () {
|
|
1869
|
+
var route = this.authenticator.route;
|
|
1870
|
+
return route === 'signIn' || route === 'signUp';
|
|
1871
|
+
};
|
|
1872
|
+
AuthenticatorComponent.prototype.hasRouteComponent = function () {
|
|
1873
|
+
var route = this.authenticator.route;
|
|
1874
|
+
switch (route) {
|
|
1875
|
+
case 'authenticated':
|
|
1876
|
+
case 'idle':
|
|
1877
|
+
case 'setup':
|
|
1878
|
+
case 'signOut':
|
|
1879
|
+
case 'transition':
|
|
1880
|
+
return false;
|
|
1881
|
+
default:
|
|
1882
|
+
return true;
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1885
|
+
AuthenticatorComponent.prototype.mapCustomComponents = function (componentQuery) {
|
|
1886
|
+
if (!componentQuery)
|
|
1887
|
+
return {};
|
|
1888
|
+
var customComponents = {};
|
|
1889
|
+
componentQuery.forEach(function (component) {
|
|
1890
|
+
customComponents[component.name] = component.template;
|
|
1891
|
+
});
|
|
1892
|
+
return customComponents;
|
|
1893
|
+
};
|
|
1894
|
+
return AuthenticatorComponent;
|
|
1573
1895
|
}());
|
|
1574
|
-
|
|
1575
|
-
{ type:
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1896
|
+
AuthenticatorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorComponent, deps: [{ token: AuthenticatorService }, { token: CustomComponentsService }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1897
|
+
AuthenticatorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AuthenticatorComponent, selector: "amplify-authenticator", inputs: { formFields: "formFields", initialState: "initialState", loginMechanisms: "loginMechanisms", services: "services", signUpAttributes: "signUpAttributes", socialProviders: "socialProviders", variation: "variation", hideSignUp: "hideSignUp" }, providers: [CustomComponentsService], queries: [{ propertyName: "customComponentQuery", predicate: AmplifySlotDirective }], ngImport: i0__namespace, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot name=\"header\" [context]=\"context\"></amplify-slot>\n <div\n data-amplify-router\n [attr.data-amplify-router-content]=\"hasTabs() ? undefined : ''\"\n >\n <amplify-tabs\n (tabChange)=\"onTabChange()\"\n *ngIf=\"(route === 'signIn' || route === 'signUp') && !hideSignUp\"\n >\n <amplify-tab-item\n [title]=\"signInTitle\"\n [active]=\"route === 'signIn'\"\n data-amplify-router-content\n >\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\n [title]=\"signUpTitle\"\n [active]=\"route === 'signUp'\"\n data-amplify-router-content\n >\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 <amplify-slot\n name=\"sign-in\"\n [context]=\"context\"\n *ngIf=\"route === 'signIn' && hideSignUp\"\n >\n <amplify-sign-in></amplify-sign-in>\n </amplify-slot>\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", components: [{ type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { type: TabsComponent, selector: "amplify-tabs", outputs: ["tabChange"] }, { type: TabItemComponent, selector: "amplify-tab-item", inputs: ["title", "active", "id", "labelledById", "tabIndex"] }, { type: SignInComponent, selector: "amplify-sign-in" }, { type: SignUpComponent, selector: "amplify-sign-up" }, { type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up" }, { type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in" }, { type: SetupTotpComponent, selector: "amplify-setup-totp" }, { type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: ["headerText"] }, { type: ResetPasswordComponent, selector: "amplify-reset-password", inputs: ["headerText"] }, { type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: ["headerText"] }, { type: VerifyUserComponent, selector: "amplify-verify-user", inputs: ["headerText"] }, { type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: ["headerText"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1898
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorComponent, decorators: [{
|
|
1899
|
+
type: i0.Component,
|
|
1900
|
+
args: [{
|
|
1901
|
+
selector: 'amplify-authenticator',
|
|
1902
|
+
templateUrl: './authenticator.component.html',
|
|
1903
|
+
providers: [CustomComponentsService],
|
|
1904
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1905
|
+
}]
|
|
1906
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }, { type: CustomComponentsService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { formFields: [{
|
|
1907
|
+
type: i0.Input
|
|
1908
|
+
}], initialState: [{
|
|
1909
|
+
type: i0.Input
|
|
1910
|
+
}], loginMechanisms: [{
|
|
1911
|
+
type: i0.Input
|
|
1912
|
+
}], services: [{
|
|
1913
|
+
type: i0.Input
|
|
1914
|
+
}], signUpAttributes: [{
|
|
1915
|
+
type: i0.Input
|
|
1916
|
+
}], socialProviders: [{
|
|
1917
|
+
type: i0.Input
|
|
1918
|
+
}], variation: [{
|
|
1919
|
+
type: i0.Input
|
|
1920
|
+
}], hideSignUp: [{
|
|
1921
|
+
type: i0.Input
|
|
1922
|
+
}], customComponentQuery: [{
|
|
1923
|
+
type: i0.ContentChildren,
|
|
1924
|
+
args: [AmplifySlotDirective]
|
|
1925
|
+
}] } });
|
|
1595
1926
|
|
|
1596
1927
|
var CheckboxComponent = /** @class */ (function () {
|
|
1597
1928
|
function CheckboxComponent() {
|
|
@@ -1609,326 +1940,112 @@
|
|
|
1609
1940
|
};
|
|
1610
1941
|
return CheckboxComponent;
|
|
1611
1942
|
}());
|
|
1612
|
-
CheckboxComponent
|
|
1613
|
-
{ type:
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
this.isVisible = false;
|
|
1634
|
-
};
|
|
1635
|
-
return ErrorComponent;
|
|
1636
|
-
}());
|
|
1637
|
-
ErrorComponent.decorators = [
|
|
1638
|
-
{ type: i0.Component, args: [{
|
|
1639
|
-
selector: 'amplify-error',
|
|
1640
|
-
template: "<div\n class=\"amplify-flex amplify-alert amplify-alert--error\"\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 [attr.aria-hidden]=\"true\"\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 amplify-alert__dismiss\"\n [attr.aria-label]=\"dismissAriaLabel\"\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 [attr.aria-hidden]=\"true\"\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"
|
|
1641
|
-
},] }
|
|
1642
|
-
];
|
|
1643
|
-
|
|
1644
|
-
var PasswordFieldComponent = /** @class */ (function () {
|
|
1645
|
-
function PasswordFieldComponent() {
|
|
1646
|
-
this.autocomplete = 'new-password';
|
|
1647
|
-
this.disabled = false;
|
|
1648
|
-
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1649
|
-
this.initialValue = '';
|
|
1650
|
-
this.label = '';
|
|
1651
|
-
this.placeholder = '';
|
|
1652
|
-
this.required = true;
|
|
1653
|
-
this.labelHidden = false;
|
|
1654
|
-
this.setBlur = new i0.EventEmitter();
|
|
1655
|
-
this.type = 'password';
|
|
1656
|
-
this.showPassword = false;
|
|
1657
|
-
this.showPasswordButtonlabel = ui.translate('Show password');
|
|
1658
|
-
}
|
|
1659
|
-
PasswordFieldComponent.prototype.togglePasswordText = function () {
|
|
1660
|
-
this.showPassword = !this.showPassword;
|
|
1661
|
-
this.showPasswordButtonlabel = this.showPassword
|
|
1662
|
-
? ui.translate('Show password')
|
|
1663
|
-
: ui.translate('Hide password');
|
|
1664
|
-
this.type = this.showPassword ? 'text' : 'password';
|
|
1665
|
-
};
|
|
1666
|
-
return PasswordFieldComponent;
|
|
1667
|
-
}());
|
|
1668
|
-
PasswordFieldComponent.decorators = [
|
|
1669
|
-
{ type: i0.Component, args: [{
|
|
1670
|
-
selector: 'amplify-password-field',
|
|
1671
|
-
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n (blur)=\"setBlur.emit($event)\"\n />\n <div class=\"amplify-field-group__outer-end\">\n <button\n amplify-button\n [attr.aria-label]=\"showPasswordButtonlabel\"\n class=\"amplify-field-group__control amplify-field__show-password\"\n (click)=\"togglePasswordText()\"\n >\n <svg\n *ngIf=\"!showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z\"\n ></path>\n </svg>\n <svg\n *ngIf=\"showPassword\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n class=\"amplify-icon\"\n >\n <path\n d=\"M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z\"\n fill=\"none\"\n ></path>\n <path\n d=\"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z\"\n ></path>\n </svg>\n </button>\n </div>\n</div>\n"
|
|
1672
|
-
},] }
|
|
1673
|
-
];
|
|
1674
|
-
PasswordFieldComponent.propDecorators = {
|
|
1675
|
-
autocomplete: [{ type: i0.Input }],
|
|
1676
|
-
disabled: [{ type: i0.Input }],
|
|
1677
|
-
fieldId: [{ type: i0.Input }],
|
|
1678
|
-
initialValue: [{ type: i0.Input }],
|
|
1679
|
-
label: [{ type: i0.Input }],
|
|
1680
|
-
name: [{ type: i0.Input }],
|
|
1681
|
-
placeholder: [{ type: i0.Input }],
|
|
1682
|
-
required: [{ type: i0.Input }],
|
|
1683
|
-
labelHidden: [{ type: i0.Input }],
|
|
1684
|
-
hasError: [{ type: i0.Input }],
|
|
1685
|
-
describedBy: [{ type: i0.Input }],
|
|
1686
|
-
setBlur: [{ type: i0.Output }]
|
|
1687
|
-
};
|
|
1688
|
-
|
|
1689
|
-
var PhoneNumberFieldComponent = /** @class */ (function () {
|
|
1690
|
-
function PhoneNumberFieldComponent() {
|
|
1691
|
-
this.autocomplete = 'new-password';
|
|
1692
|
-
this.disabled = false;
|
|
1693
|
-
this.selectFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1694
|
-
this.textFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1695
|
-
this.initialValue = '';
|
|
1696
|
-
this.label = '';
|
|
1697
|
-
this.placeholder = '';
|
|
1698
|
-
this.required = true;
|
|
1699
|
-
this.labelHidden = false;
|
|
1700
|
-
this.display = 'contents';
|
|
1701
|
-
}
|
|
1702
|
-
PhoneNumberFieldComponent.prototype.ngOnInit = function () {
|
|
1703
|
-
var _a;
|
|
1704
|
-
this.countryDialCodesValues = (_a = this.dialCodeList) !== null && _a !== void 0 ? _a : ui.countryDialCodes;
|
|
1705
|
-
};
|
|
1706
|
-
return PhoneNumberFieldComponent;
|
|
1707
|
-
}());
|
|
1708
|
-
PhoneNumberFieldComponent.decorators = [
|
|
1709
|
-
{ type: i0.Component, args: [{
|
|
1710
|
-
selector: 'amplify-phone-number-field',
|
|
1711
|
-
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n>\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\n amplify-field\n amplify-selectfield\n amplify-countrycodeselect\n amplify-dialcodeselect\n \"\n style=\"flex-direction: column\"\n >\n <amplify-form-select\n name=\"country_code\"\n label=\"Country Code\"\n [id]=\"selectFieldId\"\n [items]=\"countryDialCodesValues\"\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n />\n</div>\n"
|
|
1712
|
-
},] }
|
|
1713
|
-
];
|
|
1714
|
-
PhoneNumberFieldComponent.propDecorators = {
|
|
1715
|
-
autocomplete: [{ type: i0.Input }],
|
|
1716
|
-
disabled: [{ type: i0.Input }],
|
|
1717
|
-
defaultCountryCode: [{ type: i0.Input }],
|
|
1718
|
-
selectFieldId: [{ type: i0.Input }],
|
|
1719
|
-
textFieldId: [{ type: i0.Input }],
|
|
1720
|
-
initialValue: [{ type: i0.Input }],
|
|
1721
|
-
label: [{ type: i0.Input }],
|
|
1722
|
-
name: [{ type: i0.Input }],
|
|
1723
|
-
placeholder: [{ type: i0.Input }],
|
|
1724
|
-
required: [{ type: i0.Input }],
|
|
1725
|
-
type: [{ type: i0.Input }],
|
|
1726
|
-
labelHidden: [{ type: i0.Input }],
|
|
1727
|
-
dialCodeList: [{ type: i0.Input }],
|
|
1728
|
-
hasError: [{ type: i0.Input }],
|
|
1729
|
-
describedBy: [{ type: i0.Input }],
|
|
1730
|
-
display: [{ type: i0.HostBinding, args: ['style.display',] }]
|
|
1731
|
-
};
|
|
1732
|
-
|
|
1733
|
-
var SelectComponent = /** @class */ (function () {
|
|
1734
|
-
function SelectComponent() {
|
|
1735
|
-
}
|
|
1736
|
-
return SelectComponent;
|
|
1737
|
-
}());
|
|
1738
|
-
SelectComponent.decorators = [
|
|
1739
|
-
{ type: i0.Component, args: [{
|
|
1740
|
-
selector: 'amplify-form-select',
|
|
1741
|
-
template: "<label class=\"amplify-label amplify-visually-hidden\" [for]=\"id\">{{\n label\n}}</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 amplify-icon--large\"\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"
|
|
1742
|
-
},] }
|
|
1743
|
-
];
|
|
1744
|
-
SelectComponent.propDecorators = {
|
|
1745
|
-
items: [{ type: i0.Input }],
|
|
1746
|
-
name: [{ type: i0.Input }],
|
|
1747
|
-
label: [{ type: i0.Input }],
|
|
1748
|
-
id: [{ type: i0.Input }],
|
|
1749
|
-
defaultValue: [{ type: i0.Input }]
|
|
1750
|
-
};
|
|
1751
|
-
|
|
1752
|
-
var TabItemComponent = /** @class */ (function () {
|
|
1753
|
-
function TabItemComponent() {
|
|
1754
|
-
this.active = false;
|
|
1755
|
-
this.display = 'block'; // emulate div behavior
|
|
1756
|
-
}
|
|
1757
|
-
return TabItemComponent;
|
|
1758
|
-
}());
|
|
1759
|
-
TabItemComponent.decorators = [
|
|
1760
|
-
{ type: i0.Component, args: [{
|
|
1761
|
-
selector: 'amplify-tab-item',
|
|
1762
|
-
template: "<div\n data-orientation=\"horizontal\"\n role=\"tabpanel\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.data-state]=\"active ? 'active' : 'inactive'\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n"
|
|
1763
|
-
},] }
|
|
1764
|
-
];
|
|
1765
|
-
TabItemComponent.propDecorators = {
|
|
1766
|
-
title: [{ type: i0.Input }],
|
|
1767
|
-
active: [{ type: i0.Input }],
|
|
1768
|
-
id: [{ type: i0.Input }],
|
|
1769
|
-
labelledById: [{ type: i0.Input }],
|
|
1770
|
-
tabIndex: [{ type: i0.Input }],
|
|
1771
|
-
display: [{ type: i0.HostBinding, args: ['style.display',] }]
|
|
1772
|
-
};
|
|
1773
|
-
|
|
1774
|
-
var TabsComponent = /** @class */ (function () {
|
|
1775
|
-
function TabsComponent() {
|
|
1776
|
-
this.tabChange = new i0.EventEmitter();
|
|
1777
|
-
}
|
|
1778
|
-
TabsComponent.prototype.ngAfterContentInit = function () {
|
|
1779
|
-
// assign ids
|
|
1780
|
-
this.tabs.forEach(function (tab, index) {
|
|
1781
|
-
tab.id = "radix-id-" + nanoid.nanoid(12) + "-1-content-" + index;
|
|
1782
|
-
tab.labelledById = "radix-id-" + nanoid.nanoid(12) + "-1-trigger-" + index;
|
|
1783
|
-
});
|
|
1784
|
-
// find active tab
|
|
1785
|
-
// TODO(enhancement): more declarative way for choosing the initial tab to render
|
|
1786
|
-
var activeTabs = this.tabs.filter(function (tab) { return tab.active; });
|
|
1787
|
-
// set active tab
|
|
1788
|
-
if (activeTabs.length !== 1) {
|
|
1789
|
-
this.selectTab(this.tabs.first);
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
TabsComponent.prototype.selectTab = function (tab) {
|
|
1793
|
-
this.tabs.forEach(function (tab) {
|
|
1794
|
-
tab.active = false;
|
|
1795
|
-
});
|
|
1796
|
-
tab.active = true;
|
|
1797
|
-
};
|
|
1798
|
-
TabsComponent.prototype.handleTabClick = function (tab) {
|
|
1799
|
-
if (tab.active)
|
|
1800
|
-
return; // don't do anything if clicks the current active tab
|
|
1801
|
-
this.tabChange.emit();
|
|
1802
|
-
this.selectTab(tab);
|
|
1803
|
-
};
|
|
1804
|
-
return TabsComponent;
|
|
1805
|
-
}());
|
|
1806
|
-
TabsComponent.decorators = [
|
|
1807
|
-
{ type: i0.Component, args: [{
|
|
1808
|
-
selector: 'amplify-tabs',
|
|
1809
|
-
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"
|
|
1810
|
-
},] }
|
|
1811
|
-
];
|
|
1812
|
-
TabsComponent.propDecorators = {
|
|
1813
|
-
tabs: [{ type: i0.ContentChildren, args: [TabItemComponent,] }],
|
|
1814
|
-
tabChange: [{ type: i0.Output }]
|
|
1815
|
-
};
|
|
1816
|
-
|
|
1817
|
-
var TextFieldComponent = /** @class */ (function () {
|
|
1818
|
-
function TextFieldComponent() {
|
|
1819
|
-
this.autocomplete = 'new-password';
|
|
1820
|
-
this.disabled = false;
|
|
1821
|
-
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1822
|
-
this.initialValue = '';
|
|
1823
|
-
this.label = '';
|
|
1824
|
-
this.placeholder = '';
|
|
1825
|
-
this.required = true;
|
|
1826
|
-
this.labelHidden = false;
|
|
1827
|
-
this.display = 'contents';
|
|
1828
|
-
}
|
|
1829
|
-
return TextFieldComponent;
|
|
1830
|
-
}());
|
|
1831
|
-
TextFieldComponent.decorators = [
|
|
1832
|
-
{ type: i0.Component, args: [{
|
|
1833
|
-
selector: 'amplify-text-field',
|
|
1834
|
-
template: "<label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"fieldId\"\n>\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 [autocomplete]=\"autocomplete\"\n [attr.disabled]=\"disabled ? '' : null\"\n [attr.aria-invalid]=\"hasError ? 'true' : 'false'\"\n [attr.aria-describedby]=\"describedBy\"\n/>\n"
|
|
1835
|
-
},] }
|
|
1836
|
-
];
|
|
1837
|
-
TextFieldComponent.propDecorators = {
|
|
1838
|
-
autocomplete: [{ type: i0.Input }],
|
|
1839
|
-
disabled: [{ type: i0.Input }],
|
|
1840
|
-
fieldId: [{ type: i0.Input }],
|
|
1841
|
-
initialValue: [{ type: i0.Input }],
|
|
1842
|
-
label: [{ type: i0.Input }],
|
|
1843
|
-
name: [{ type: i0.Input }],
|
|
1844
|
-
placeholder: [{ type: i0.Input }],
|
|
1845
|
-
required: [{ type: i0.Input }],
|
|
1846
|
-
type: [{ type: i0.Input }],
|
|
1847
|
-
labelHidden: [{ type: i0.Input }],
|
|
1848
|
-
hasError: [{ type: i0.Input }],
|
|
1849
|
-
describedBy: [{ type: i0.Input }],
|
|
1850
|
-
display: [{ type: i0.HostBinding, args: ['style.display',] }]
|
|
1851
|
-
};
|
|
1852
|
-
|
|
1853
|
-
var AmplifySlotComponent = /** @class */ (function () {
|
|
1854
|
-
function AmplifySlotComponent(propService) {
|
|
1855
|
-
this.propService = propService;
|
|
1856
|
-
this.display = 'contents';
|
|
1857
|
-
this.isOverriden = false;
|
|
1858
|
-
}
|
|
1859
|
-
AmplifySlotComponent.prototype.ngAfterContentInit = function () {
|
|
1860
|
-
var customComponents = this.propService.customComponents;
|
|
1861
|
-
var overridingComponent = customComponents[this.name];
|
|
1862
|
-
if (overridingComponent) {
|
|
1863
|
-
this.overridingComponent = overridingComponent;
|
|
1864
|
-
this.isOverriden = true;
|
|
1865
|
-
}
|
|
1866
|
-
};
|
|
1867
|
-
return AmplifySlotComponent;
|
|
1868
|
-
}());
|
|
1869
|
-
AmplifySlotComponent.decorators = [
|
|
1870
|
-
{ type: i0.Component, args: [{
|
|
1871
|
-
selector: 'amplify-slot',
|
|
1872
|
-
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"
|
|
1873
|
-
},] }
|
|
1874
|
-
];
|
|
1875
|
-
AmplifySlotComponent.ctorParameters = function () { return [
|
|
1876
|
-
{ type: CustomComponentsService }
|
|
1877
|
-
]; };
|
|
1878
|
-
AmplifySlotComponent.propDecorators = {
|
|
1879
|
-
name: [{ type: i0.Input }],
|
|
1880
|
-
context: [{ type: i0.Input }],
|
|
1881
|
-
display: [{ type: i0.HostBinding, args: ['style.display',] }]
|
|
1882
|
-
};
|
|
1943
|
+
CheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CheckboxComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1944
|
+
CheckboxComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: CheckboxComponent, selector: "amplify-checkbox", inputs: { defaultChecked: "defaultChecked", errorMessage: "errorMessage", hasError: "hasError", label: "label", name: "name", value: "value" }, ngImport: i0__namespace, 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 [ngClass]=\"{\n 'amplify-checkbox__button--error': hasError\n }\"\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 [ngClass]=\"{\n 'amplify-checkbox__icon--checked': isChecked\n }\"\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", directives: [{ type: i6__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1945
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CheckboxComponent, decorators: [{
|
|
1946
|
+
type: i0.Component,
|
|
1947
|
+
args: [{
|
|
1948
|
+
selector: 'amplify-checkbox',
|
|
1949
|
+
templateUrl: './checkbox.component.html',
|
|
1950
|
+
}]
|
|
1951
|
+
}], propDecorators: { defaultChecked: [{
|
|
1952
|
+
type: i0.Input
|
|
1953
|
+
}], errorMessage: [{
|
|
1954
|
+
type: i0.Input
|
|
1955
|
+
}], hasError: [{
|
|
1956
|
+
type: i0.Input
|
|
1957
|
+
}], label: [{
|
|
1958
|
+
type: i0.Input
|
|
1959
|
+
}], name: [{
|
|
1960
|
+
type: i0.Input
|
|
1961
|
+
}], value: [{
|
|
1962
|
+
type: i0.Input
|
|
1963
|
+
}] } });
|
|
1883
1964
|
|
|
1884
1965
|
var AmplifyAuthenticatorModule = /** @class */ (function () {
|
|
1885
1966
|
function AmplifyAuthenticatorModule() {
|
|
1886
1967
|
}
|
|
1887
1968
|
return AmplifyAuthenticatorModule;
|
|
1888
1969
|
}());
|
|
1889
|
-
AmplifyAuthenticatorModule
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1970
|
+
AmplifyAuthenticatorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1971
|
+
AmplifyAuthenticatorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, declarations: [AmplifySlotComponent,
|
|
1972
|
+
AmplifySlotDirective,
|
|
1973
|
+
AuthenticatorComponent,
|
|
1974
|
+
BaseFormFieldsComponent,
|
|
1975
|
+
ButtonComponent,
|
|
1976
|
+
CheckboxComponent,
|
|
1977
|
+
ConfirmResetPasswordComponent,
|
|
1978
|
+
ConfirmSignInComponent,
|
|
1979
|
+
ConfirmSignUpComponent,
|
|
1980
|
+
ConfirmVerifyUserComponent,
|
|
1981
|
+
ErrorComponent,
|
|
1982
|
+
FederatedSignInButtonComponent,
|
|
1983
|
+
FederatedSignInComponent,
|
|
1984
|
+
ForceNewPasswordComponent,
|
|
1985
|
+
ForceNewPasswordFormFieldsComponent,
|
|
1986
|
+
FormFieldComponent,
|
|
1987
|
+
PasswordFieldComponent,
|
|
1988
|
+
PhoneNumberFieldComponent,
|
|
1989
|
+
ResetPasswordComponent,
|
|
1990
|
+
SelectComponent,
|
|
1991
|
+
SetupTotpComponent,
|
|
1992
|
+
SignInComponent,
|
|
1993
|
+
SignUpComponent,
|
|
1994
|
+
SignUpFormFieldsComponent,
|
|
1995
|
+
TabItemComponent,
|
|
1996
|
+
TabsComponent,
|
|
1997
|
+
TextFieldComponent,
|
|
1998
|
+
VerifyUserComponent], imports: [i6.CommonModule], exports: [AmplifySlotDirective,
|
|
1999
|
+
AuthenticatorComponent,
|
|
2000
|
+
CheckboxComponent,
|
|
2001
|
+
SignUpFormFieldsComponent,
|
|
2002
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2003
|
+
TextFieldComponent] });
|
|
2004
|
+
AmplifyAuthenticatorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, imports: [[i6.CommonModule]] });
|
|
2005
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, decorators: [{
|
|
2006
|
+
type: i0.NgModule,
|
|
2007
|
+
args: [{
|
|
2008
|
+
declarations: [
|
|
2009
|
+
AmplifySlotComponent,
|
|
2010
|
+
AmplifySlotDirective,
|
|
2011
|
+
AuthenticatorComponent,
|
|
2012
|
+
BaseFormFieldsComponent,
|
|
2013
|
+
ButtonComponent,
|
|
2014
|
+
CheckboxComponent,
|
|
2015
|
+
ConfirmResetPasswordComponent,
|
|
2016
|
+
ConfirmSignInComponent,
|
|
2017
|
+
ConfirmSignUpComponent,
|
|
2018
|
+
ConfirmVerifyUserComponent,
|
|
2019
|
+
ErrorComponent,
|
|
2020
|
+
FederatedSignInButtonComponent,
|
|
2021
|
+
FederatedSignInComponent,
|
|
2022
|
+
ForceNewPasswordComponent,
|
|
2023
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2024
|
+
FormFieldComponent,
|
|
2025
|
+
PasswordFieldComponent,
|
|
2026
|
+
PhoneNumberFieldComponent,
|
|
2027
|
+
ResetPasswordComponent,
|
|
2028
|
+
SelectComponent,
|
|
2029
|
+
SetupTotpComponent,
|
|
2030
|
+
SignInComponent,
|
|
2031
|
+
SignUpComponent,
|
|
2032
|
+
SignUpFormFieldsComponent,
|
|
2033
|
+
TabItemComponent,
|
|
2034
|
+
TabsComponent,
|
|
2035
|
+
TextFieldComponent,
|
|
2036
|
+
VerifyUserComponent,
|
|
2037
|
+
],
|
|
2038
|
+
imports: [i6.CommonModule],
|
|
2039
|
+
exports: [
|
|
2040
|
+
AmplifySlotDirective,
|
|
2041
|
+
AuthenticatorComponent,
|
|
2042
|
+
CheckboxComponent,
|
|
2043
|
+
SignUpFormFieldsComponent,
|
|
2044
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2045
|
+
TextFieldComponent,
|
|
2046
|
+
],
|
|
2047
|
+
}]
|
|
2048
|
+
}] });
|
|
1932
2049
|
|
|
1933
2050
|
/*
|
|
1934
2051
|
* Public API Surface of ui-angular
|
|
@@ -1973,33 +2090,6 @@
|
|
|
1973
2090
|
exports.TextFieldComponent = TextFieldComponent;
|
|
1974
2091
|
exports.VerifyUserComponent = VerifyUserComponent;
|
|
1975
2092
|
exports.getAttributeMap = getAttributeMap;
|
|
1976
|
-
exports["ɵa"] = AmplifySlotComponent;
|
|
1977
|
-
exports["ɵb"] = AuthenticatorComponent;
|
|
1978
|
-
exports["ɵba"] = VerifyUserComponent;
|
|
1979
|
-
exports["ɵc"] = BaseFormFieldsComponent;
|
|
1980
|
-
exports["ɵd"] = ButtonComponent;
|
|
1981
|
-
exports["ɵe"] = CheckboxComponent;
|
|
1982
|
-
exports["ɵf"] = ConfirmResetPasswordComponent;
|
|
1983
|
-
exports["ɵg"] = ConfirmSignInComponent;
|
|
1984
|
-
exports["ɵh"] = ConfirmSignUpComponent;
|
|
1985
|
-
exports["ɵi"] = ConfirmVerifyUserComponent;
|
|
1986
|
-
exports["ɵj"] = ErrorComponent;
|
|
1987
|
-
exports["ɵk"] = FederatedSignInButtonComponent;
|
|
1988
|
-
exports["ɵl"] = FederatedSignInComponent;
|
|
1989
|
-
exports["ɵm"] = ForceNewPasswordComponent;
|
|
1990
|
-
exports["ɵn"] = ForceNewPasswordFormFieldsComponent;
|
|
1991
|
-
exports["ɵo"] = FormFieldComponent;
|
|
1992
|
-
exports["ɵp"] = PasswordFieldComponent;
|
|
1993
|
-
exports["ɵq"] = PhoneNumberFieldComponent;
|
|
1994
|
-
exports["ɵr"] = ResetPasswordComponent;
|
|
1995
|
-
exports["ɵs"] = SelectComponent;
|
|
1996
|
-
exports["ɵt"] = SetupTotpComponent;
|
|
1997
|
-
exports["ɵu"] = SignInComponent;
|
|
1998
|
-
exports["ɵv"] = SignUpComponent;
|
|
1999
|
-
exports["ɵw"] = SignUpFormFieldsComponent;
|
|
2000
|
-
exports["ɵx"] = TabItemComponent;
|
|
2001
|
-
exports["ɵy"] = TabsComponent;
|
|
2002
|
-
exports["ɵz"] = TextFieldComponent;
|
|
2003
2093
|
|
|
2004
2094
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2005
2095
|
|