@aws-amplify/ui-angular 2.4.25 → 3.0.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 +1560 -1473
- package/bundles/aws-amplify-ui-angular.umd.js.map +1 -1
- package/esm2015/aws-amplify-ui-angular.js +1 -28
- 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 +9 -8
- 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 +1035 -928
- package/fesm2015/aws-amplify-ui-angular.js.map +1 -1
- package/lib/components/authenticator/authenticator.module.d.ts +33 -0
- package/lib/components/authenticator/components/authenticator/authenticator.component.d.ts +27 -24
- 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 +28 -30
- package/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.d.ts +27 -24
- package/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.d.ts +27 -29
- package/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.d.ts +27 -24
- 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 +27 -24
- 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 +27 -24
- package/lib/components/authenticator/components/setup-totp/setup-totp.component.d.ts +27 -24
- package/lib/components/authenticator/components/sign-in/sign-in.component.d.ts +27 -24
- 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 +27 -24
- package/lib/components/authenticator/components/verify-user/verify-user.component.d.ts +27 -24
- 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 +39 -36
- 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
|
*/
|
|
@@ -251,997 +580,844 @@
|
|
|
251
580
|
Object.defineProperty(AuthenticatorService.prototype, "authState", {
|
|
252
581
|
/**
|
|
253
582
|
* 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", {
|
|
583
|
+
*/
|
|
584
|
+
/** @deprecated For internal use only */
|
|
532
585
|
get: function () {
|
|
533
|
-
return this.
|
|
586
|
+
return this._authState;
|
|
534
587
|
},
|
|
535
588
|
enumerable: false,
|
|
536
589
|
configurable: true
|
|
537
590
|
});
|
|
538
|
-
|
|
539
|
-
|
|
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", {
|
|
591
|
+
Object.defineProperty(AuthenticatorService.prototype, "authService", {
|
|
592
|
+
/** @deprecated For internal use only */
|
|
591
593
|
get: function () {
|
|
592
|
-
return this.
|
|
594
|
+
return this._authService;
|
|
593
595
|
},
|
|
594
596
|
enumerable: false,
|
|
595
597
|
configurable: true
|
|
596
598
|
});
|
|
597
|
-
Object.defineProperty(
|
|
599
|
+
Object.defineProperty(AuthenticatorService.prototype, "context", {
|
|
600
|
+
/** @deprecated For internal use only */
|
|
598
601
|
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');
|
|
602
|
+
return this._authState.context;
|
|
605
603
|
},
|
|
606
604
|
enumerable: false,
|
|
607
605
|
configurable: true
|
|
608
606
|
});
|
|
609
|
-
Object.defineProperty(
|
|
607
|
+
Object.defineProperty(AuthenticatorService.prototype, "slotContext", {
|
|
608
|
+
/** @deprecated For internal use only */
|
|
610
609
|
get: function () {
|
|
611
|
-
var
|
|
612
|
-
return
|
|
613
|
-
? this.emailMessage + " " + Destination + ". " + this.minutesMessage
|
|
614
|
-
: DeliveryMedium === 'SMS'
|
|
615
|
-
? this.textedMessage + " " + Destination + ". " + this.minutesMessage
|
|
616
|
-
: ui.translate("" + this.defaultMessage);
|
|
610
|
+
var slotContext = Object.assign(Object.assign({}, this._facade), this._sendEventAliases);
|
|
611
|
+
return Object.assign(Object.assign({}, slotContext), { $implicit: Object.assign({}, slotContext) });
|
|
617
612
|
},
|
|
618
613
|
enumerable: false,
|
|
619
614
|
configurable: true
|
|
620
615
|
});
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
616
|
+
/** @deprecated For internal use only */
|
|
617
|
+
AuthenticatorService.prototype.subscribe = function (callback) {
|
|
618
|
+
if (this._authService) {
|
|
619
|
+
return this._authService.subscribe(callback);
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
|
|
623
|
+
}
|
|
625
624
|
};
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
this.
|
|
625
|
+
/** @deprecated For internal use only */
|
|
626
|
+
AuthenticatorService.prototype.send = function (event) {
|
|
627
|
+
this.authService.send(event);
|
|
629
628
|
};
|
|
630
|
-
return
|
|
629
|
+
return AuthenticatorService;
|
|
631
630
|
}());
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
]; };
|
|
641
|
-
ConfirmSignUpComponent.propDecorators = {
|
|
642
|
-
headerText: [{ type: i0.Input }],
|
|
643
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-confirmsignup',] }]
|
|
644
|
-
};
|
|
631
|
+
AuthenticatorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
632
|
+
AuthenticatorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, providedIn: 'root' });
|
|
633
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorService, decorators: [{
|
|
634
|
+
type: i0.Injectable,
|
|
635
|
+
args: [{
|
|
636
|
+
providedIn: 'root', // ensure we have a singleton service
|
|
637
|
+
}]
|
|
638
|
+
}], ctorParameters: function () { return []; } });
|
|
645
639
|
|
|
646
|
-
var
|
|
647
|
-
function
|
|
648
|
-
this.
|
|
649
|
-
this.
|
|
650
|
-
this.
|
|
651
|
-
// translated texts
|
|
652
|
-
this.skipText = ui.translate('Skip');
|
|
653
|
-
this.submitText = ui.translate('Submit');
|
|
640
|
+
var AmplifySlotComponent = /** @class */ (function () {
|
|
641
|
+
function AmplifySlotComponent(propService) {
|
|
642
|
+
this.propService = propService;
|
|
643
|
+
this.display = 'contents';
|
|
644
|
+
this.isOverriden = false;
|
|
654
645
|
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
ConfirmVerifyUserComponent.prototype.onInput = function (event) {
|
|
663
|
-
event.preventDefault();
|
|
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));
|
|
646
|
+
AmplifySlotComponent.prototype.ngAfterContentInit = function () {
|
|
647
|
+
var customComponents = this.propService.customComponents;
|
|
648
|
+
var overridingComponent = customComponents[this.name];
|
|
649
|
+
if (overridingComponent) {
|
|
650
|
+
this.overridingComponent = overridingComponent;
|
|
651
|
+
this.isOverriden = true;
|
|
652
|
+
}
|
|
670
653
|
};
|
|
671
|
-
return
|
|
654
|
+
return AmplifySlotComponent;
|
|
672
655
|
}());
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
656
|
+
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 });
|
|
657
|
+
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"] }] });
|
|
658
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifySlotComponent, decorators: [{
|
|
659
|
+
type: i0.Component,
|
|
660
|
+
args: [{
|
|
661
|
+
selector: 'amplify-slot',
|
|
662
|
+
templateUrl: './amplify-slot.component.html',
|
|
663
|
+
}]
|
|
664
|
+
}], ctorParameters: function () { return [{ type: CustomComponentsService }]; }, propDecorators: { name: [{
|
|
665
|
+
type: i0.Input
|
|
666
|
+
}], context: [{
|
|
667
|
+
type: i0.Input
|
|
668
|
+
}], display: [{
|
|
669
|
+
type: i0.HostBinding,
|
|
670
|
+
args: ['style.display']
|
|
671
|
+
}] } });
|
|
686
672
|
|
|
687
|
-
var
|
|
688
|
-
function
|
|
689
|
-
|
|
690
|
-
this.
|
|
691
|
-
this.onClick = function () {
|
|
692
|
-
_this.authenticator.send({
|
|
693
|
-
type: 'FEDERATED_SIGN_IN',
|
|
694
|
-
data: { provider: _this.provider },
|
|
695
|
-
});
|
|
696
|
-
};
|
|
673
|
+
var TabItemComponent = /** @class */ (function () {
|
|
674
|
+
function TabItemComponent() {
|
|
675
|
+
this.active = false;
|
|
676
|
+
this.display = 'block'; // emulate div behavior
|
|
697
677
|
}
|
|
698
|
-
return
|
|
678
|
+
return TabItemComponent;
|
|
699
679
|
}());
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
680
|
+
TabItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabItemComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
681
|
+
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"] }] });
|
|
682
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabItemComponent, decorators: [{
|
|
683
|
+
type: i0.Component,
|
|
684
|
+
args: [{
|
|
685
|
+
selector: 'amplify-tab-item',
|
|
686
|
+
templateUrl: './tab-item.component.html',
|
|
687
|
+
}]
|
|
688
|
+
}], propDecorators: { title: [{
|
|
689
|
+
type: i0.Input
|
|
690
|
+
}], active: [{
|
|
691
|
+
type: i0.Input
|
|
692
|
+
}], id: [{
|
|
693
|
+
type: i0.Input
|
|
694
|
+
}], labelledById: [{
|
|
695
|
+
type: i0.Input
|
|
696
|
+
}], tabIndex: [{
|
|
697
|
+
type: i0.Input
|
|
698
|
+
}], display: [{
|
|
699
|
+
type: i0.HostBinding,
|
|
700
|
+
args: ['style.display']
|
|
701
|
+
}] } });
|
|
713
702
|
|
|
714
|
-
var
|
|
715
|
-
function
|
|
716
|
-
this.
|
|
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;
|
|
703
|
+
var TabsComponent = /** @class */ (function () {
|
|
704
|
+
function TabsComponent() {
|
|
705
|
+
this.tabChange = new i0.EventEmitter();
|
|
723
706
|
}
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
this.
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
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");
|
|
707
|
+
TabsComponent.prototype.ngAfterContentInit = function () {
|
|
708
|
+
// assign ids
|
|
709
|
+
this.tabs.forEach(function (tab, index) {
|
|
710
|
+
tab.id = "radix-id-" + nanoid.nanoid(12) + "-1-content-" + index;
|
|
711
|
+
tab.labelledById = "radix-id-" + nanoid.nanoid(12) + "-1-trigger-" + index;
|
|
712
|
+
});
|
|
713
|
+
// find active tab
|
|
714
|
+
// TODO(enhancement): more declarative way for choosing the initial tab to render
|
|
715
|
+
var activeTabs = this.tabs.filter(function (tab) { return tab.active; });
|
|
716
|
+
// set active tab
|
|
717
|
+
if (activeTabs.length !== 1) {
|
|
718
|
+
this.selectTab(this.tabs.first);
|
|
719
|
+
}
|
|
745
720
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
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", {
|
|
768
|
-
get: function () {
|
|
769
|
-
return this.authenticator.slotContext;
|
|
770
|
-
},
|
|
771
|
-
enumerable: false,
|
|
772
|
-
configurable: true
|
|
773
|
-
});
|
|
774
|
-
ForceNewPasswordComponent.prototype.onInput = function (event) {
|
|
775
|
-
event.preventDefault();
|
|
776
|
-
var _a = event.target, name = _a.name, value = _a.value;
|
|
777
|
-
this.authenticator.updateForm({ name: name, value: value });
|
|
721
|
+
TabsComponent.prototype.selectTab = function (tab) {
|
|
722
|
+
this.tabs.forEach(function (tab) {
|
|
723
|
+
tab.active = false;
|
|
724
|
+
});
|
|
725
|
+
tab.active = true;
|
|
778
726
|
};
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
727
|
+
TabsComponent.prototype.handleTabClick = function (tab) {
|
|
728
|
+
if (tab.active)
|
|
729
|
+
return; // don't do anything if clicks the current active tab
|
|
730
|
+
this.tabChange.emit();
|
|
731
|
+
this.selectTab(tab);
|
|
782
732
|
};
|
|
783
|
-
return
|
|
784
|
-
}());
|
|
785
|
-
ForceNewPasswordComponent.decorators = [
|
|
786
|
-
{ type: i0.Component, args: [{
|
|
787
|
-
selector: 'amplify-force-new-password',
|
|
788
|
-
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"
|
|
789
|
-
},] }
|
|
790
|
-
];
|
|
791
|
-
ForceNewPasswordComponent.ctorParameters = function () { return [
|
|
792
|
-
{ type: AuthenticatorService }
|
|
793
|
-
]; };
|
|
794
|
-
ForceNewPasswordComponent.propDecorators = {
|
|
795
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-forcenewpassword',] }],
|
|
796
|
-
headerText: [{ type: i0.Input }]
|
|
797
|
-
};
|
|
798
|
-
|
|
799
|
-
var ForceNewPasswordFormFieldsComponent = /** @class */ (function () {
|
|
800
|
-
function ForceNewPasswordFormFieldsComponent() {
|
|
801
|
-
}
|
|
802
|
-
return ForceNewPasswordFormFieldsComponent;
|
|
733
|
+
return TabsComponent;
|
|
803
734
|
}());
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
735
|
+
TabsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
736
|
+
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"] }] });
|
|
737
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TabsComponent, decorators: [{
|
|
738
|
+
type: i0.Component,
|
|
739
|
+
args: [{
|
|
740
|
+
selector: 'amplify-tabs',
|
|
741
|
+
templateUrl: './tabs.component.html',
|
|
742
|
+
}]
|
|
743
|
+
}], propDecorators: { tabs: [{
|
|
744
|
+
type: i0.ContentChildren,
|
|
745
|
+
args: [TabItemComponent]
|
|
746
|
+
}], tabChange: [{
|
|
747
|
+
type: i0.Output
|
|
748
|
+
}] } });
|
|
810
749
|
|
|
811
|
-
var
|
|
812
|
-
function
|
|
813
|
-
this.
|
|
814
|
-
this.
|
|
815
|
-
this.
|
|
750
|
+
var ButtonComponent = /** @class */ (function () {
|
|
751
|
+
function ButtonComponent() {
|
|
752
|
+
this.type = 'button';
|
|
753
|
+
this.fullWidth = false;
|
|
754
|
+
this.isDisabled = false;
|
|
755
|
+
this.size = 'medium';
|
|
756
|
+
this.variation = 'default';
|
|
757
|
+
this.fontWeight = 'normal';
|
|
816
758
|
}
|
|
817
|
-
Object.defineProperty(
|
|
759
|
+
Object.defineProperty(ButtonComponent.prototype, "getDisabled", {
|
|
818
760
|
get: function () {
|
|
819
|
-
|
|
820
|
-
return ui.getErrors(validationErrors[this.name]);
|
|
761
|
+
return this.isDisabled ? '' : null;
|
|
821
762
|
},
|
|
822
763
|
enumerable: false,
|
|
823
764
|
configurable: true
|
|
824
765
|
});
|
|
825
|
-
|
|
826
|
-
var name = $event.target.name;
|
|
827
|
-
this.authenticator.updateBlur({ name: name });
|
|
828
|
-
};
|
|
829
|
-
FormFieldComponent.prototype.isPasswordField = function () {
|
|
830
|
-
return this.formField.type === 'password';
|
|
831
|
-
};
|
|
832
|
-
FormFieldComponent.prototype.isPhoneField = function () {
|
|
833
|
-
return this.formField.type === 'tel';
|
|
834
|
-
};
|
|
835
|
-
FormFieldComponent.prototype.hasError = function () {
|
|
836
|
-
var _a;
|
|
837
|
-
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
838
|
-
};
|
|
839
|
-
Object.defineProperty(FormFieldComponent.prototype, "ariaDescribedBy", {
|
|
766
|
+
Object.defineProperty(ButtonComponent.prototype, "classNames", {
|
|
840
767
|
get: function () {
|
|
841
|
-
|
|
768
|
+
var className = 'amplify-button';
|
|
769
|
+
if (this.variation) {
|
|
770
|
+
className += " amplify-button--" + this.variation;
|
|
771
|
+
}
|
|
772
|
+
if (this.size) {
|
|
773
|
+
className += " amplify-button--" + this.size;
|
|
774
|
+
}
|
|
775
|
+
if (this.fullWidth) {
|
|
776
|
+
className += " amplify-button--fullwidth";
|
|
777
|
+
}
|
|
778
|
+
if (this.isDisabled) {
|
|
779
|
+
className += " amplify-button--disabled amplify-button--loading";
|
|
780
|
+
}
|
|
781
|
+
return className;
|
|
842
782
|
},
|
|
843
783
|
enumerable: false,
|
|
844
784
|
configurable: true
|
|
845
785
|
});
|
|
846
|
-
|
|
847
|
-
|
|
786
|
+
ButtonComponent.prototype.ngOnInit = function () {
|
|
787
|
+
this.typeAttr = this.type;
|
|
788
|
+
this.fullWidthAttr = this.fullWidth;
|
|
789
|
+
this.sizeAttr = this.size;
|
|
790
|
+
this.variationAttr = this.variation;
|
|
791
|
+
this.fontWeightAttr = this.fontWeight;
|
|
848
792
|
};
|
|
849
|
-
return
|
|
793
|
+
return ButtonComponent;
|
|
850
794
|
}());
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
795
|
+
ButtonComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ButtonComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
796
|
+
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" });
|
|
797
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ButtonComponent, decorators: [{
|
|
798
|
+
type: i0.Component,
|
|
799
|
+
args: [{
|
|
800
|
+
selector: 'button[amplify-button]',
|
|
801
|
+
templateUrl: './button.component.html',
|
|
802
|
+
}]
|
|
803
|
+
}], propDecorators: { type: [{
|
|
804
|
+
type: i0.Input
|
|
805
|
+
}], fullWidth: [{
|
|
806
|
+
type: i0.Input
|
|
807
|
+
}], isDisabled: [{
|
|
808
|
+
type: i0.Input
|
|
809
|
+
}], size: [{
|
|
810
|
+
type: i0.Input
|
|
811
|
+
}], variation: [{
|
|
812
|
+
type: i0.Input
|
|
813
|
+
}], fontWeight: [{
|
|
814
|
+
type: i0.Input
|
|
815
|
+
}], typeAttr: [{
|
|
816
|
+
type: i0.HostBinding,
|
|
817
|
+
args: ['type']
|
|
818
|
+
}], fullWidthAttr: [{
|
|
819
|
+
type: i0.HostBinding,
|
|
820
|
+
args: ['attr.data-fullwidth']
|
|
821
|
+
}], sizeAttr: [{
|
|
822
|
+
type: i0.HostBinding,
|
|
823
|
+
args: ['attr.data-size']
|
|
824
|
+
}], variationAttr: [{
|
|
825
|
+
type: i0.HostBinding,
|
|
826
|
+
args: ['attr.data-variation']
|
|
827
|
+
}], fontWeightAttr: [{
|
|
828
|
+
type: i0.HostBinding,
|
|
829
|
+
args: ['style.font-weight']
|
|
830
|
+
}], getDisabled: [{
|
|
831
|
+
type: i0.HostBinding,
|
|
832
|
+
args: ['attr.disabled']
|
|
833
|
+
}], classNames: [{
|
|
834
|
+
type: i0.HostBinding,
|
|
835
|
+
args: ['class']
|
|
836
|
+
}] } });
|
|
864
837
|
|
|
865
|
-
var
|
|
866
|
-
function
|
|
838
|
+
var FederatedSignInButtonComponent = /** @class */ (function () {
|
|
839
|
+
function FederatedSignInButtonComponent(authenticator) {
|
|
840
|
+
var _this = this;
|
|
867
841
|
this.authenticator = authenticator;
|
|
868
|
-
this.
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
842
|
+
this.onClick = function () {
|
|
843
|
+
_this.authenticator.send({
|
|
844
|
+
type: 'FEDERATED_SIGN_IN',
|
|
845
|
+
data: { provider: _this.provider },
|
|
846
|
+
});
|
|
847
|
+
};
|
|
873
848
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
849
|
+
return FederatedSignInButtonComponent;
|
|
850
|
+
}());
|
|
851
|
+
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 });
|
|
852
|
+
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"] }] });
|
|
853
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInButtonComponent, decorators: [{
|
|
854
|
+
type: i0.Component,
|
|
855
|
+
args: [{
|
|
856
|
+
selector: 'amplify-federated-sign-in-button',
|
|
857
|
+
templateUrl: './federated-sign-in-button.component.html',
|
|
858
|
+
}]
|
|
859
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { provider: [{
|
|
860
|
+
type: i0.Input
|
|
861
|
+
}], text: [{
|
|
862
|
+
type: i0.Input
|
|
863
|
+
}] } });
|
|
864
|
+
|
|
865
|
+
var getSignInWithFederationText = ui.authenticatorTextUtil.getSignInWithFederationText;
|
|
866
|
+
var FederatedSignInComponent = /** @class */ (function () {
|
|
867
|
+
function FederatedSignInComponent(authenticator) {
|
|
868
|
+
this.authenticator = authenticator;
|
|
869
|
+
this.FederatedProviders = ui.FederatedIdentityProviders;
|
|
870
|
+
this.includeAmazon = false;
|
|
871
|
+
this.includeApple = false;
|
|
872
|
+
this.includeFacebook = false;
|
|
873
|
+
this.includeGoogle = false;
|
|
874
|
+
this.shouldShowFederatedSignIn = false;
|
|
875
|
+
}
|
|
876
|
+
FederatedSignInComponent.prototype.ngOnInit = function () {
|
|
877
|
+
var _a;
|
|
878
|
+
var socialProviders = ((_a = this.authenticator.context) === null || _a === void 0 ? void 0 : _a.config).socialProviders;
|
|
879
|
+
this.setFederatedTexts();
|
|
880
|
+
this.includeAmazon = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('amazon');
|
|
881
|
+
this.includeApple = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('apple');
|
|
882
|
+
this.includeGoogle = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('google');
|
|
883
|
+
this.includeFacebook = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('facebook');
|
|
884
|
+
this.shouldShowFederatedSignIn =
|
|
885
|
+
this.includeAmazon ||
|
|
886
|
+
this.includeApple ||
|
|
887
|
+
this.includeFacebook ||
|
|
888
|
+
this.includeGoogle;
|
|
885
889
|
};
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
this.
|
|
890
|
+
FederatedSignInComponent.prototype.setFederatedTexts = function () {
|
|
891
|
+
var route = this.authenticator.route;
|
|
892
|
+
this.signInAmazonText = getSignInWithFederationText(route, 'amazon');
|
|
893
|
+
this.signInAppleText = getSignInWithFederationText(route, 'apple');
|
|
894
|
+
this.signInFacebookText = getSignInWithFederationText(route, 'facebook');
|
|
895
|
+
this.signInGoogleText = getSignInWithFederationText(route, 'google');
|
|
889
896
|
};
|
|
890
|
-
return
|
|
897
|
+
return FederatedSignInComponent;
|
|
891
898
|
}());
|
|
892
|
-
|
|
893
|
-
{ type:
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
ResetPasswordComponent.propDecorators = {
|
|
902
|
-
dataAttr: [{ type: i0.HostBinding, args: ['attr.data-amplify-authenticator-resetPassword',] }],
|
|
903
|
-
headerText: [{ type: i0.Input }]
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
/******************************************************************************
|
|
907
|
-
Copyright (c) Microsoft Corporation.
|
|
899
|
+
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 });
|
|
900
|
+
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"] }] });
|
|
901
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FederatedSignInComponent, decorators: [{
|
|
902
|
+
type: i0.Component,
|
|
903
|
+
args: [{
|
|
904
|
+
selector: 'amplify-federated-sign-in',
|
|
905
|
+
templateUrl: './federated-sign-in.component.html',
|
|
906
|
+
}]
|
|
907
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
|
|
908
908
|
|
|
909
|
-
|
|
910
|
-
|
|
909
|
+
var SelectComponent = /** @class */ (function () {
|
|
910
|
+
function SelectComponent() {
|
|
911
|
+
}
|
|
912
|
+
return SelectComponent;
|
|
913
|
+
}());
|
|
914
|
+
SelectComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SelectComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
915
|
+
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"] }] });
|
|
916
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SelectComponent, decorators: [{
|
|
917
|
+
type: i0.Component,
|
|
918
|
+
args: [{
|
|
919
|
+
selector: 'amplify-form-select',
|
|
920
|
+
templateUrl: './select.component.html',
|
|
921
|
+
}]
|
|
922
|
+
}], propDecorators: { items: [{
|
|
923
|
+
type: i0.Input
|
|
924
|
+
}], name: [{
|
|
925
|
+
type: i0.Input
|
|
926
|
+
}], label: [{
|
|
927
|
+
type: i0.Input
|
|
928
|
+
}], id: [{
|
|
929
|
+
type: i0.Input
|
|
930
|
+
}], defaultValue: [{
|
|
931
|
+
type: i0.Input
|
|
932
|
+
}] } });
|
|
911
933
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
};
|
|
929
|
-
function __extends(d, b) {
|
|
930
|
-
if (typeof b !== "function" && b !== null)
|
|
931
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
932
|
-
extendStatics(d, b);
|
|
933
|
-
function __() { this.constructor = d; }
|
|
934
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
935
|
-
}
|
|
936
|
-
var __assign = function () {
|
|
937
|
-
__assign = Object.assign || function __assign(t) {
|
|
938
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
939
|
-
s = arguments[i];
|
|
940
|
-
for (var p in s)
|
|
941
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
942
|
-
t[p] = s[p];
|
|
943
|
-
}
|
|
944
|
-
return t;
|
|
934
|
+
var PhoneNumberFieldComponent = /** @class */ (function () {
|
|
935
|
+
function PhoneNumberFieldComponent() {
|
|
936
|
+
this.autocomplete = 'new-password';
|
|
937
|
+
this.disabled = false;
|
|
938
|
+
this.selectFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
939
|
+
this.textFieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
940
|
+
this.initialValue = '';
|
|
941
|
+
this.label = '';
|
|
942
|
+
this.placeholder = '';
|
|
943
|
+
this.required = true;
|
|
944
|
+
this.labelHidden = false;
|
|
945
|
+
this.display = 'contents';
|
|
946
|
+
}
|
|
947
|
+
PhoneNumberFieldComponent.prototype.ngOnInit = function () {
|
|
948
|
+
var _a;
|
|
949
|
+
this.countryDialCodesValues = (_a = this.dialCodeList) !== null && _a !== void 0 ? _a : ui.countryDialCodes;
|
|
945
950
|
};
|
|
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 };
|
|
951
|
+
return PhoneNumberFieldComponent;
|
|
952
|
+
}());
|
|
953
|
+
PhoneNumberFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PhoneNumberFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
954
|
+
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"] }] });
|
|
955
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PhoneNumberFieldComponent, decorators: [{
|
|
956
|
+
type: i0.Component,
|
|
957
|
+
args: [{
|
|
958
|
+
selector: 'amplify-phone-number-field',
|
|
959
|
+
templateUrl: './phone-number-field.component.html',
|
|
960
|
+
}]
|
|
961
|
+
}], propDecorators: { autocomplete: [{
|
|
962
|
+
type: i0.Input
|
|
963
|
+
}], disabled: [{
|
|
964
|
+
type: i0.Input
|
|
965
|
+
}], defaultCountryCode: [{
|
|
966
|
+
type: i0.Input
|
|
967
|
+
}], selectFieldId: [{
|
|
968
|
+
type: i0.Input
|
|
969
|
+
}], textFieldId: [{
|
|
970
|
+
type: i0.Input
|
|
971
|
+
}], initialValue: [{
|
|
972
|
+
type: i0.Input
|
|
973
|
+
}], label: [{
|
|
974
|
+
type: i0.Input
|
|
975
|
+
}], name: [{
|
|
976
|
+
type: i0.Input
|
|
977
|
+
}], placeholder: [{
|
|
978
|
+
type: i0.Input
|
|
979
|
+
}], required: [{
|
|
980
|
+
type: i0.Input
|
|
981
|
+
}], type: [{
|
|
982
|
+
type: i0.Input
|
|
983
|
+
}], labelHidden: [{
|
|
984
|
+
type: i0.Input
|
|
985
|
+
}], dialCodeList: [{
|
|
986
|
+
type: i0.Input
|
|
987
|
+
}], hasError: [{
|
|
988
|
+
type: i0.Input
|
|
989
|
+
}], describedBy: [{
|
|
990
|
+
type: i0.Input
|
|
991
|
+
}], display: [{
|
|
992
|
+
type: i0.HostBinding,
|
|
993
|
+
args: ['style.display']
|
|
994
|
+
}] } });
|
|
995
|
+
|
|
996
|
+
var PasswordFieldComponent = /** @class */ (function () {
|
|
997
|
+
function PasswordFieldComponent() {
|
|
998
|
+
this.autocomplete = 'new-password';
|
|
999
|
+
this.disabled = false;
|
|
1000
|
+
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1001
|
+
this.initialValue = '';
|
|
1002
|
+
this.label = '';
|
|
1003
|
+
this.placeholder = '';
|
|
1004
|
+
this.required = true;
|
|
1005
|
+
this.labelHidden = false;
|
|
1006
|
+
this.setBlur = new i0.EventEmitter();
|
|
1007
|
+
this.type = 'password';
|
|
1008
|
+
this.showPassword = false;
|
|
1009
|
+
this.showPasswordButtonlabel = ui.translate('Show password');
|
|
1010
|
+
}
|
|
1011
|
+
PasswordFieldComponent.prototype.togglePasswordText = function () {
|
|
1012
|
+
this.showPassword = !this.showPassword;
|
|
1013
|
+
this.showPasswordButtonlabel = this.showPassword
|
|
1014
|
+
? ui.translate('Show password')
|
|
1015
|
+
: ui.translate('Hide password');
|
|
1016
|
+
this.type = this.showPassword ? 'text' : 'password';
|
|
1017
|
+
};
|
|
1018
|
+
return PasswordFieldComponent;
|
|
1019
|
+
}());
|
|
1020
|
+
PasswordFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PasswordFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1021
|
+
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"] }] });
|
|
1022
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: PasswordFieldComponent, decorators: [{
|
|
1023
|
+
type: i0.Component,
|
|
1024
|
+
args: [{
|
|
1025
|
+
selector: 'amplify-password-field',
|
|
1026
|
+
templateUrl: './password-field.component.html',
|
|
1027
|
+
}]
|
|
1028
|
+
}], propDecorators: { autocomplete: [{
|
|
1029
|
+
type: i0.Input
|
|
1030
|
+
}], disabled: [{
|
|
1031
|
+
type: i0.Input
|
|
1032
|
+
}], fieldId: [{
|
|
1033
|
+
type: i0.Input
|
|
1034
|
+
}], initialValue: [{
|
|
1035
|
+
type: i0.Input
|
|
1036
|
+
}], label: [{
|
|
1037
|
+
type: i0.Input
|
|
1038
|
+
}], name: [{
|
|
1039
|
+
type: i0.Input
|
|
1040
|
+
}], placeholder: [{
|
|
1041
|
+
type: i0.Input
|
|
1042
|
+
}], required: [{
|
|
1043
|
+
type: i0.Input
|
|
1044
|
+
}], labelHidden: [{
|
|
1045
|
+
type: i0.Input
|
|
1046
|
+
}], hasError: [{
|
|
1047
|
+
type: i0.Input
|
|
1048
|
+
}], describedBy: [{
|
|
1049
|
+
type: i0.Input
|
|
1050
|
+
}], setBlur: [{
|
|
1051
|
+
type: i0.Output
|
|
1052
|
+
}] } });
|
|
1053
|
+
|
|
1054
|
+
var TextFieldComponent = /** @class */ (function () {
|
|
1055
|
+
function TextFieldComponent() {
|
|
1056
|
+
this.autocomplete = 'new-password';
|
|
1057
|
+
this.disabled = false;
|
|
1058
|
+
this.fieldId = "amplify-field-" + nanoid.nanoid(12);
|
|
1059
|
+
this.initialValue = '';
|
|
1060
|
+
this.label = '';
|
|
1061
|
+
this.placeholder = '';
|
|
1062
|
+
this.required = true;
|
|
1063
|
+
this.labelHidden = false;
|
|
1064
|
+
this.display = 'contents';
|
|
1063
1065
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1066
|
+
return TextFieldComponent;
|
|
1067
|
+
}());
|
|
1068
|
+
TextFieldComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TextFieldComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1069
|
+
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" });
|
|
1070
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TextFieldComponent, decorators: [{
|
|
1071
|
+
type: i0.Component,
|
|
1072
|
+
args: [{
|
|
1073
|
+
selector: 'amplify-text-field',
|
|
1074
|
+
templateUrl: './text-field.component.html',
|
|
1075
|
+
}]
|
|
1076
|
+
}], propDecorators: { autocomplete: [{
|
|
1077
|
+
type: i0.Input
|
|
1078
|
+
}], disabled: [{
|
|
1079
|
+
type: i0.Input
|
|
1080
|
+
}], fieldId: [{
|
|
1081
|
+
type: i0.Input
|
|
1082
|
+
}], initialValue: [{
|
|
1083
|
+
type: i0.Input
|
|
1084
|
+
}], label: [{
|
|
1085
|
+
type: i0.Input
|
|
1086
|
+
}], name: [{
|
|
1087
|
+
type: i0.Input
|
|
1088
|
+
}], placeholder: [{
|
|
1089
|
+
type: i0.Input
|
|
1090
|
+
}], required: [{
|
|
1091
|
+
type: i0.Input
|
|
1092
|
+
}], type: [{
|
|
1093
|
+
type: i0.Input
|
|
1094
|
+
}], labelHidden: [{
|
|
1095
|
+
type: i0.Input
|
|
1096
|
+
}], hasError: [{
|
|
1097
|
+
type: i0.Input
|
|
1098
|
+
}], describedBy: [{
|
|
1099
|
+
type: i0.Input
|
|
1100
|
+
}], display: [{
|
|
1101
|
+
type: i0.HostBinding,
|
|
1102
|
+
args: ['style.display']
|
|
1103
|
+
}] } });
|
|
1104
|
+
|
|
1105
|
+
var FormFieldComponent = /** @class */ (function () {
|
|
1106
|
+
function FormFieldComponent(authenticator) {
|
|
1107
|
+
this.authenticator = authenticator;
|
|
1108
|
+
this.countryDialCodesValue = ui.countryDialCodes;
|
|
1109
|
+
this.errorId = nanoid.nanoid(12);
|
|
1071
1110
|
}
|
|
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
|
-
|
|
1111
|
+
Object.defineProperty(FormFieldComponent.prototype, "errors", {
|
|
1112
|
+
get: function () {
|
|
1113
|
+
var validationErrors = this.authenticator.validationErrors;
|
|
1114
|
+
return ui.getErrors(validationErrors[this.name]);
|
|
1115
|
+
},
|
|
1116
|
+
enumerable: false,
|
|
1117
|
+
configurable: true
|
|
1118
|
+
});
|
|
1119
|
+
FormFieldComponent.prototype.onBlur = function ($event) {
|
|
1120
|
+
var name = $event.target.name;
|
|
1121
|
+
this.authenticator.updateBlur({ name: name });
|
|
1122
|
+
};
|
|
1123
|
+
FormFieldComponent.prototype.isPasswordField = function () {
|
|
1124
|
+
return this.formField.type === 'password';
|
|
1125
|
+
};
|
|
1126
|
+
FormFieldComponent.prototype.isPhoneField = function () {
|
|
1127
|
+
return this.formField.type === 'tel';
|
|
1128
|
+
};
|
|
1129
|
+
FormFieldComponent.prototype.hasError = function () {
|
|
1130
|
+
var _a;
|
|
1131
|
+
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1132
|
+
};
|
|
1133
|
+
Object.defineProperty(FormFieldComponent.prototype, "ariaDescribedBy", {
|
|
1134
|
+
get: function () {
|
|
1135
|
+
return this.hasError() ? this.errorId : undefined;
|
|
1136
|
+
},
|
|
1137
|
+
enumerable: false,
|
|
1138
|
+
configurable: true
|
|
1139
|
+
});
|
|
1140
|
+
FormFieldComponent.prototype.translate = function (phrase) {
|
|
1141
|
+
return ui.translate(phrase);
|
|
1142
|
+
};
|
|
1143
|
+
return FormFieldComponent;
|
|
1144
|
+
}());
|
|
1145
|
+
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 });
|
|
1146
|
+
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"] }] });
|
|
1147
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FormFieldComponent, decorators: [{
|
|
1148
|
+
type: i0.Component,
|
|
1149
|
+
args: [{
|
|
1150
|
+
selector: 'amplify-form-field',
|
|
1151
|
+
templateUrl: './form-field.component.html',
|
|
1152
|
+
}]
|
|
1153
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { name: [{
|
|
1154
|
+
type: i0.Input
|
|
1155
|
+
}], formField: [{
|
|
1156
|
+
type: i0.Input
|
|
1157
|
+
}] } });
|
|
1158
|
+
|
|
1159
|
+
/**
|
|
1160
|
+
* Sorts the given formFields, then renders them in order.
|
|
1161
|
+
*/
|
|
1162
|
+
var BaseFormFieldsComponent = /** @class */ (function () {
|
|
1163
|
+
function BaseFormFieldsComponent(authenticator) {
|
|
1164
|
+
this.authenticator = authenticator;
|
|
1165
|
+
this.display = 'contents';
|
|
1166
|
+
this.formFields = [];
|
|
1105
1167
|
}
|
|
1106
|
-
|
|
1107
|
-
|
|
1168
|
+
BaseFormFieldsComponent.prototype.ngOnInit = function () {
|
|
1169
|
+
var state = this.authenticator.authState;
|
|
1170
|
+
this.formFields = ui.getSortedFormFields(this.route, state);
|
|
1171
|
+
};
|
|
1172
|
+
return BaseFormFieldsComponent;
|
|
1173
|
+
}());
|
|
1174
|
+
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 });
|
|
1175
|
+
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"] }] });
|
|
1176
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BaseFormFieldsComponent, decorators: [{
|
|
1177
|
+
type: i0.Component,
|
|
1178
|
+
args: [{
|
|
1179
|
+
selector: 'amplify-base-form-fields',
|
|
1180
|
+
templateUrl: './base-form-fields.component.html',
|
|
1181
|
+
}]
|
|
1182
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { route: [{
|
|
1183
|
+
type: i0.Input
|
|
1184
|
+
}], display: [{
|
|
1185
|
+
type: i0.HostBinding,
|
|
1186
|
+
args: ['style.display']
|
|
1187
|
+
}] } });
|
|
1188
|
+
|
|
1189
|
+
var ErrorComponent = /** @class */ (function () {
|
|
1190
|
+
function ErrorComponent() {
|
|
1191
|
+
this.isVisible = true;
|
|
1192
|
+
this.dismissAriaLabel = ui.translate('Dismiss alert');
|
|
1108
1193
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1194
|
+
ErrorComponent.prototype.close = function () {
|
|
1195
|
+
this.isVisible = false;
|
|
1196
|
+
};
|
|
1197
|
+
return ErrorComponent;
|
|
1198
|
+
}());
|
|
1199
|
+
ErrorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ErrorComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1200
|
+
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"] }] });
|
|
1201
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ErrorComponent, decorators: [{
|
|
1202
|
+
type: i0.Component,
|
|
1203
|
+
args: [{
|
|
1204
|
+
selector: 'amplify-error',
|
|
1205
|
+
templateUrl: './error.component.html',
|
|
1206
|
+
}]
|
|
1207
|
+
}] });
|
|
1208
|
+
|
|
1209
|
+
var getForgotPasswordText = ui.authenticatorTextUtil.getForgotPasswordText, getSignInText = ui.authenticatorTextUtil.getSignInText;
|
|
1210
|
+
var SignInComponent = /** @class */ (function () {
|
|
1211
|
+
function SignInComponent(authenticator) {
|
|
1212
|
+
this.authenticator = authenticator;
|
|
1213
|
+
this.dataAttr = '';
|
|
1214
|
+
this.forgotPasswordText = getForgotPasswordText();
|
|
1215
|
+
this.signInButtonText = getSignInText();
|
|
1118
1216
|
}
|
|
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));
|
|
1217
|
+
Object.defineProperty(SignInComponent.prototype, "context", {
|
|
1218
|
+
get: function () {
|
|
1219
|
+
return this.authenticator.slotContext;
|
|
1220
|
+
},
|
|
1221
|
+
enumerable: false,
|
|
1222
|
+
configurable: true
|
|
1223
|
+
});
|
|
1224
|
+
SignInComponent.prototype.onInput = function (event) {
|
|
1225
|
+
event.preventDefault();
|
|
1226
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1227
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1228
|
+
};
|
|
1229
|
+
SignInComponent.prototype.onSubmit = function (event) {
|
|
1230
|
+
event.preventDefault();
|
|
1231
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1232
|
+
};
|
|
1233
|
+
return SignInComponent;
|
|
1234
|
+
}());
|
|
1235
|
+
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 });
|
|
1236
|
+
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 });
|
|
1237
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignInComponent, decorators: [{
|
|
1238
|
+
type: i0.Component,
|
|
1239
|
+
args: [{
|
|
1240
|
+
selector: 'amplify-sign-in',
|
|
1241
|
+
templateUrl: './sign-in.component.html',
|
|
1242
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1243
|
+
}]
|
|
1244
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1245
|
+
type: i0.HostBinding,
|
|
1246
|
+
args: ['attr.data-amplify-authenticator-signin']
|
|
1247
|
+
}] } });
|
|
1248
|
+
|
|
1249
|
+
var SignUpFormFieldsComponent = /** @class */ (function () {
|
|
1250
|
+
function SignUpFormFieldsComponent() {
|
|
1159
1251
|
}
|
|
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
|
-
|
|
1252
|
+
return SignUpFormFieldsComponent;
|
|
1253
|
+
}());
|
|
1254
|
+
SignUpFormFieldsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpFormFieldsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1255
|
+
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"] }] });
|
|
1256
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpFormFieldsComponent, decorators: [{
|
|
1257
|
+
type: i0.Component,
|
|
1258
|
+
args: [{
|
|
1259
|
+
selector: 'amplify-sign-up-form-fields',
|
|
1260
|
+
templateUrl: './sign-up-form-fields.component.html',
|
|
1261
|
+
}]
|
|
1262
|
+
}] });
|
|
1263
|
+
|
|
1264
|
+
var getCreateAccountText = ui.authenticatorTextUtil.getCreateAccountText;
|
|
1265
|
+
var SignUpComponent = /** @class */ (function () {
|
|
1266
|
+
function SignUpComponent(authenticator) {
|
|
1267
|
+
this.authenticator = authenticator;
|
|
1268
|
+
this.dataAttr = '';
|
|
1269
|
+
// translated texts
|
|
1270
|
+
this.createAccountText = getCreateAccountText();
|
|
1271
|
+
}
|
|
1272
|
+
Object.defineProperty(SignUpComponent.prototype, "context", {
|
|
1273
|
+
get: function () {
|
|
1274
|
+
return this.authenticator.slotContext;
|
|
1275
|
+
},
|
|
1276
|
+
enumerable: false,
|
|
1277
|
+
configurable: true
|
|
1278
|
+
});
|
|
1279
|
+
SignUpComponent.prototype.onInput = function (event) {
|
|
1280
|
+
var _a = event.target, checked = _a.checked, name = _a.name, type = _a.type, value = _a.value;
|
|
1281
|
+
if (type === 'checkbox' && !checked)
|
|
1282
|
+
value = undefined;
|
|
1283
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1284
|
+
};
|
|
1285
|
+
SignUpComponent.prototype.onSubmit = function (event) {
|
|
1286
|
+
event.preventDefault();
|
|
1287
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1288
|
+
};
|
|
1289
|
+
return SignUpComponent;
|
|
1290
|
+
}());
|
|
1291
|
+
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 });
|
|
1292
|
+
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"] }] });
|
|
1293
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SignUpComponent, decorators: [{
|
|
1294
|
+
type: i0.Component,
|
|
1295
|
+
args: [{
|
|
1296
|
+
selector: 'amplify-sign-up',
|
|
1297
|
+
templateUrl: './sign-up.component.html',
|
|
1298
|
+
}]
|
|
1299
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1300
|
+
type: i0.HostBinding,
|
|
1301
|
+
args: ['attr.data-amplify-authenticator-signup']
|
|
1302
|
+
}] } });
|
|
1303
|
+
|
|
1304
|
+
var getResendCodeText$1 = ui.authenticatorTextUtil.getResendCodeText, getConfirmText$2 = ui.authenticatorTextUtil.getConfirmText, getDeliveryMethodText = ui.authenticatorTextUtil.getDeliveryMethodText, getDeliveryMessageText = ui.authenticatorTextUtil.getDeliveryMessageText;
|
|
1305
|
+
var ConfirmSignUpComponent = /** @class */ (function () {
|
|
1306
|
+
function ConfirmSignUpComponent(authenticator) {
|
|
1307
|
+
this.authenticator = authenticator;
|
|
1308
|
+
this.dataAttr = '';
|
|
1309
|
+
// translated texts
|
|
1310
|
+
this.resendCodeText = getResendCodeText$1();
|
|
1311
|
+
this.confirmText = getConfirmText$2();
|
|
1185
1312
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1313
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "context", {
|
|
1314
|
+
get: function () {
|
|
1315
|
+
return this.authenticator.slotContext;
|
|
1316
|
+
},
|
|
1317
|
+
enumerable: false,
|
|
1318
|
+
configurable: true
|
|
1319
|
+
});
|
|
1320
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "confirmSignUpHeading", {
|
|
1321
|
+
get: function () {
|
|
1322
|
+
var codeDeliveryDetails = this.authenticator.codeDeliveryDetails;
|
|
1323
|
+
return getDeliveryMethodText(codeDeliveryDetails);
|
|
1324
|
+
},
|
|
1325
|
+
enumerable: false,
|
|
1326
|
+
configurable: true
|
|
1327
|
+
});
|
|
1328
|
+
Object.defineProperty(ConfirmSignUpComponent.prototype, "subtitleText", {
|
|
1329
|
+
get: function () {
|
|
1330
|
+
var codeDeliveryDetails = this.authenticator.codeDeliveryDetails;
|
|
1331
|
+
return getDeliveryMessageText(codeDeliveryDetails);
|
|
1332
|
+
},
|
|
1333
|
+
enumerable: false,
|
|
1334
|
+
configurable: true
|
|
1335
|
+
});
|
|
1336
|
+
ConfirmSignUpComponent.prototype.onInput = function (event) {
|
|
1337
|
+
event.preventDefault();
|
|
1338
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1339
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1340
|
+
};
|
|
1341
|
+
ConfirmSignUpComponent.prototype.onSubmit = function (event) {
|
|
1342
|
+
event.preventDefault();
|
|
1343
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1344
|
+
};
|
|
1345
|
+
return ConfirmSignUpComponent;
|
|
1346
|
+
}());
|
|
1347
|
+
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 });
|
|
1348
|
+
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"] }] });
|
|
1349
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignUpComponent, decorators: [{
|
|
1350
|
+
type: i0.Component,
|
|
1351
|
+
args: [{
|
|
1352
|
+
selector: 'amplify-confirm-sign-up',
|
|
1353
|
+
templateUrl: './confirm-sign-up.component.html',
|
|
1354
|
+
}]
|
|
1355
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1356
|
+
type: i0.HostBinding,
|
|
1357
|
+
args: ['attr.data-amplify-authenticator-confirmsignup']
|
|
1358
|
+
}] } });
|
|
1359
|
+
|
|
1360
|
+
var getConfirmText$1 = ui.authenticatorTextUtil.getConfirmText, getBackToSignInText$4 = ui.authenticatorTextUtil.getBackToSignInText, getChallengeText = ui.authenticatorTextUtil.getChallengeText;
|
|
1361
|
+
var ConfirmSignInComponent = /** @class */ (function () {
|
|
1362
|
+
function ConfirmSignInComponent(authenticator) {
|
|
1363
|
+
this.authenticator = authenticator;
|
|
1364
|
+
this.dataAttr = '';
|
|
1365
|
+
this.confirmText = getConfirmText$1();
|
|
1366
|
+
this.backToSignInText = getBackToSignInText$4();
|
|
1188
1367
|
}
|
|
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
|
-
}
|
|
1368
|
+
ConfirmSignInComponent.prototype.ngOnInit = function () {
|
|
1369
|
+
this.setHeaderText();
|
|
1370
|
+
};
|
|
1371
|
+
Object.defineProperty(ConfirmSignInComponent.prototype, "context", {
|
|
1372
|
+
get: function () {
|
|
1373
|
+
return this.authenticator.slotContext;
|
|
1374
|
+
},
|
|
1375
|
+
enumerable: false,
|
|
1376
|
+
configurable: true
|
|
1377
|
+
});
|
|
1378
|
+
ConfirmSignInComponent.prototype.setHeaderText = function () {
|
|
1379
|
+
var state = this.authenticator.authState;
|
|
1380
|
+
var actorContext = ui.getActorContext(state);
|
|
1381
|
+
var challengeName = actorContext.challengeName;
|
|
1382
|
+
this.headerText = getChallengeText(challengeName);
|
|
1383
|
+
};
|
|
1384
|
+
ConfirmSignInComponent.prototype.onInput = function (event) {
|
|
1385
|
+
event.preventDefault();
|
|
1386
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1387
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1388
|
+
};
|
|
1389
|
+
ConfirmSignInComponent.prototype.onSubmit = function (event) {
|
|
1390
|
+
event.preventDefault();
|
|
1391
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1392
|
+
};
|
|
1393
|
+
return ConfirmSignInComponent;
|
|
1394
|
+
}());
|
|
1395
|
+
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 });
|
|
1396
|
+
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"] }] });
|
|
1397
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmSignInComponent, decorators: [{
|
|
1398
|
+
type: i0.Component,
|
|
1399
|
+
args: [{
|
|
1400
|
+
selector: 'amplify-confirm-sign-in',
|
|
1401
|
+
templateUrl: './confirm-sign-in.component.html',
|
|
1402
|
+
}]
|
|
1403
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1404
|
+
type: i0.HostBinding,
|
|
1405
|
+
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
1406
|
+
}] } });
|
|
1232
1407
|
|
|
1233
1408
|
var logger = new awsAmplify.Logger('SetupTotp');
|
|
1409
|
+
var getSetupTOTPText = ui.authenticatorTextUtil.getSetupTOTPText, getCopyText = ui.authenticatorTextUtil.getCopyText, getBackToSignInText$3 = ui.authenticatorTextUtil.getBackToSignInText, getConfirmText = ui.authenticatorTextUtil.getConfirmText, getCopiedText = ui.authenticatorTextUtil.getCopiedText;
|
|
1234
1410
|
var SetupTotpComponent = /** @class */ (function () {
|
|
1235
1411
|
function SetupTotpComponent(authenticator) {
|
|
1236
1412
|
this.authenticator = authenticator;
|
|
1237
1413
|
this.dataAttr = '';
|
|
1238
|
-
this.headerText =
|
|
1414
|
+
this.headerText = getSetupTOTPText();
|
|
1239
1415
|
this.qrCodeSource = '';
|
|
1240
1416
|
this.secretKey = '';
|
|
1241
|
-
this.copyTextLabel =
|
|
1417
|
+
this.copyTextLabel = getCopyText();
|
|
1242
1418
|
// translated texts
|
|
1243
|
-
this.backToSignInText =
|
|
1244
|
-
this.confirmText =
|
|
1419
|
+
this.backToSignInText = getBackToSignInText$3();
|
|
1420
|
+
this.confirmText = getConfirmText();
|
|
1245
1421
|
}
|
|
1246
1422
|
SetupTotpComponent.prototype.ngOnInit = function () {
|
|
1247
1423
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -1307,129 +1483,181 @@
|
|
|
1307
1483
|
};
|
|
1308
1484
|
SetupTotpComponent.prototype.copyText = function () {
|
|
1309
1485
|
navigator.clipboard.writeText(this.secretKey);
|
|
1310
|
-
this.copyTextLabel =
|
|
1486
|
+
this.copyTextLabel = getCopiedText();
|
|
1311
1487
|
};
|
|
1312
1488
|
return SetupTotpComponent;
|
|
1313
1489
|
}());
|
|
1314
|
-
SetupTotpComponent
|
|
1315
|
-
{ type:
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1490
|
+
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 });
|
|
1491
|
+
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"] }] });
|
|
1492
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SetupTotpComponent, decorators: [{
|
|
1493
|
+
type: i0.Component,
|
|
1494
|
+
args: [{
|
|
1495
|
+
selector: 'amplify-setup-totp',
|
|
1496
|
+
templateUrl: './setup-totp.component.html',
|
|
1497
|
+
}]
|
|
1498
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1499
|
+
type: i0.HostBinding,
|
|
1500
|
+
args: ['attr.data-amplify-authenticator-setup-totp']
|
|
1501
|
+
}] } });
|
|
1326
1502
|
|
|
1327
|
-
var
|
|
1328
|
-
function
|
|
1503
|
+
var ForceNewPasswordFormFieldsComponent = /** @class */ (function () {
|
|
1504
|
+
function ForceNewPasswordFormFieldsComponent() {
|
|
1505
|
+
}
|
|
1506
|
+
return ForceNewPasswordFormFieldsComponent;
|
|
1507
|
+
}());
|
|
1508
|
+
ForceNewPasswordFormFieldsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordFormFieldsComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1509
|
+
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"] }] });
|
|
1510
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordFormFieldsComponent, decorators: [{
|
|
1511
|
+
type: i0.Component,
|
|
1512
|
+
args: [{
|
|
1513
|
+
selector: 'amplify-force-new-password-form-fields',
|
|
1514
|
+
templateUrl: './force-new-password-form-fields.component.html',
|
|
1515
|
+
}]
|
|
1516
|
+
}] });
|
|
1517
|
+
|
|
1518
|
+
var getChangePasswordText = ui.authenticatorTextUtil.getChangePasswordText, getBackToSignInText$2 = ui.authenticatorTextUtil.getBackToSignInText;
|
|
1519
|
+
var ForceNewPasswordComponent = /** @class */ (function () {
|
|
1520
|
+
function ForceNewPasswordComponent(authenticator) {
|
|
1329
1521
|
this.authenticator = authenticator;
|
|
1330
1522
|
this.dataAttr = '';
|
|
1331
|
-
|
|
1332
|
-
//
|
|
1333
|
-
this.
|
|
1334
|
-
|
|
1335
|
-
: ui.translate('Forgot your password? ');
|
|
1336
|
-
this.signInButtonText = ui.translate('Sign in');
|
|
1523
|
+
this.headerText = getChangePasswordText();
|
|
1524
|
+
// translated texts
|
|
1525
|
+
this.changePasswordText = getChangePasswordText();
|
|
1526
|
+
this.backToSignInText = getBackToSignInText$2();
|
|
1337
1527
|
}
|
|
1338
|
-
Object.defineProperty(
|
|
1528
|
+
Object.defineProperty(ForceNewPasswordComponent.prototype, "context", {
|
|
1339
1529
|
get: function () {
|
|
1340
1530
|
return this.authenticator.slotContext;
|
|
1341
1531
|
},
|
|
1342
1532
|
enumerable: false,
|
|
1343
1533
|
configurable: true
|
|
1344
1534
|
});
|
|
1345
|
-
|
|
1535
|
+
ForceNewPasswordComponent.prototype.onInput = function (event) {
|
|
1346
1536
|
event.preventDefault();
|
|
1347
1537
|
var _a = event.target, name = _a.name, value = _a.value;
|
|
1348
1538
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1349
1539
|
};
|
|
1350
|
-
|
|
1540
|
+
ForceNewPasswordComponent.prototype.onSubmit = function (event) {
|
|
1351
1541
|
event.preventDefault();
|
|
1352
1542
|
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1353
1543
|
};
|
|
1354
|
-
return
|
|
1544
|
+
return ForceNewPasswordComponent;
|
|
1355
1545
|
}());
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1546
|
+
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 });
|
|
1547
|
+
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"] }] });
|
|
1548
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ForceNewPasswordComponent, decorators: [{
|
|
1549
|
+
type: i0.Component,
|
|
1550
|
+
args: [{
|
|
1551
|
+
selector: 'amplify-force-new-password',
|
|
1552
|
+
templateUrl: './force-new-password.component.html',
|
|
1553
|
+
}]
|
|
1554
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1555
|
+
type: i0.HostBinding,
|
|
1556
|
+
args: ['attr.data-amplify-authenticator-forcenewpassword']
|
|
1557
|
+
}], headerText: [{
|
|
1558
|
+
type: i0.Input
|
|
1559
|
+
}] } });
|
|
1369
1560
|
|
|
1370
|
-
var
|
|
1371
|
-
|
|
1561
|
+
var getResetYourPasswordText$1 = ui.authenticatorTextUtil.getResetYourPasswordText, getSendCodeText = ui.authenticatorTextUtil.getSendCodeText, getBackToSignInText$1 = ui.authenticatorTextUtil.getBackToSignInText;
|
|
1562
|
+
var ResetPasswordComponent = /** @class */ (function () {
|
|
1563
|
+
function ResetPasswordComponent(authenticator) {
|
|
1372
1564
|
this.authenticator = authenticator;
|
|
1373
1565
|
this.dataAttr = '';
|
|
1566
|
+
this.headerText = getResetYourPasswordText$1();
|
|
1374
1567
|
// translated texts
|
|
1375
|
-
this.
|
|
1568
|
+
this.sendCodeText = getSendCodeText();
|
|
1569
|
+
this.backToSignInText = getBackToSignInText$1();
|
|
1376
1570
|
}
|
|
1377
|
-
Object.defineProperty(
|
|
1571
|
+
Object.defineProperty(ResetPasswordComponent.prototype, "context", {
|
|
1378
1572
|
get: function () {
|
|
1379
1573
|
return this.authenticator.slotContext;
|
|
1380
1574
|
},
|
|
1381
1575
|
enumerable: false,
|
|
1382
1576
|
configurable: true
|
|
1383
1577
|
});
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
value = undefined;
|
|
1578
|
+
ResetPasswordComponent.prototype.onInput = function (event) {
|
|
1579
|
+
event.preventDefault();
|
|
1580
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1388
1581
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1389
1582
|
};
|
|
1390
|
-
|
|
1583
|
+
ResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
1391
1584
|
event.preventDefault();
|
|
1392
1585
|
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1393
1586
|
};
|
|
1394
|
-
return
|
|
1587
|
+
return ResetPasswordComponent;
|
|
1395
1588
|
}());
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1589
|
+
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 });
|
|
1590
|
+
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"] }] });
|
|
1591
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ResetPasswordComponent, decorators: [{
|
|
1592
|
+
type: i0.Component,
|
|
1593
|
+
args: [{
|
|
1594
|
+
selector: 'amplify-reset-password',
|
|
1595
|
+
templateUrl: './reset-password.component.html',
|
|
1596
|
+
}]
|
|
1597
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1598
|
+
type: i0.HostBinding,
|
|
1599
|
+
args: ['attr.data-amplify-authenticator-resetPassword']
|
|
1600
|
+
}], headerText: [{
|
|
1601
|
+
type: i0.Input
|
|
1602
|
+
}] } });
|
|
1408
1603
|
|
|
1409
|
-
var
|
|
1410
|
-
|
|
1604
|
+
var getBackToSignInText = ui.authenticatorTextUtil.getBackToSignInText, getResendCodeText = ui.authenticatorTextUtil.getResendCodeText, getSubmitText$1 = ui.authenticatorTextUtil.getSubmitText, getResetYourPasswordText = ui.authenticatorTextUtil.getResetYourPasswordText;
|
|
1605
|
+
var ConfirmResetPasswordComponent = /** @class */ (function () {
|
|
1606
|
+
function ConfirmResetPasswordComponent(authenticator) {
|
|
1607
|
+
this.authenticator = authenticator;
|
|
1608
|
+
this.dataAttr = '';
|
|
1609
|
+
this.headerText = getResetYourPasswordText();
|
|
1610
|
+
// translated strings
|
|
1611
|
+
this.backToSignInText = getBackToSignInText();
|
|
1612
|
+
this.resendCodeText = getResendCodeText();
|
|
1613
|
+
this.submitText = getSubmitText$1();
|
|
1411
1614
|
}
|
|
1412
|
-
|
|
1615
|
+
Object.defineProperty(ConfirmResetPasswordComponent.prototype, "context", {
|
|
1616
|
+
get: function () {
|
|
1617
|
+
return this.authenticator.slotContext;
|
|
1618
|
+
},
|
|
1619
|
+
enumerable: false,
|
|
1620
|
+
configurable: true
|
|
1621
|
+
});
|
|
1622
|
+
ConfirmResetPasswordComponent.prototype.onInput = function (event) {
|
|
1623
|
+
event.preventDefault();
|
|
1624
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1625
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1626
|
+
};
|
|
1627
|
+
ConfirmResetPasswordComponent.prototype.onSubmit = function (event) {
|
|
1628
|
+
event.preventDefault();
|
|
1629
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1630
|
+
};
|
|
1631
|
+
return ConfirmResetPasswordComponent;
|
|
1413
1632
|
}());
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1633
|
+
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 });
|
|
1634
|
+
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"] }] });
|
|
1635
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmResetPasswordComponent, decorators: [{
|
|
1636
|
+
type: i0.Component,
|
|
1637
|
+
args: [{
|
|
1638
|
+
selector: 'amplify-confirm-reset-password',
|
|
1639
|
+
templateUrl: './amplify-confirm-reset-password.component.html',
|
|
1640
|
+
}]
|
|
1641
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1642
|
+
type: i0.HostBinding,
|
|
1643
|
+
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
1644
|
+
}], headerText: [{
|
|
1645
|
+
type: i0.Input
|
|
1646
|
+
}] } });
|
|
1420
1647
|
|
|
1421
1648
|
var getAttributeMap = function () { return ui.defaultFormFieldOptions; };
|
|
1422
1649
|
|
|
1650
|
+
var getSkipText$1 = ui.authenticatorTextUtil.getSkipText, getVerifyText = ui.authenticatorTextUtil.getVerifyText, getAccountRecoveryInfoText$1 = ui.authenticatorTextUtil.getAccountRecoveryInfoText;
|
|
1423
1651
|
var VerifyUserComponent = /** @class */ (function () {
|
|
1424
1652
|
function VerifyUserComponent(authenticator) {
|
|
1425
1653
|
this.authenticator = authenticator;
|
|
1426
1654
|
this.dataAttr = '';
|
|
1427
|
-
this.headerText =
|
|
1655
|
+
this.headerText = getAccountRecoveryInfoText$1();
|
|
1428
1656
|
this.unverifiedContactMethods = {};
|
|
1429
1657
|
this.labelId = nanoid.nanoid(12);
|
|
1430
1658
|
// translated texts
|
|
1431
|
-
this.skipText =
|
|
1432
|
-
this.verifyText =
|
|
1659
|
+
this.skipText = getSkipText$1();
|
|
1660
|
+
this.verifyText = getVerifyText();
|
|
1433
1661
|
}
|
|
1434
1662
|
VerifyUserComponent.prototype.ngOnInit = function () {
|
|
1435
1663
|
var actorState = ui.getActorState(this.authenticator.authState);
|
|
@@ -1453,145 +1681,245 @@
|
|
|
1453
1681
|
var _b = event.target, name = _b.name, value = _b.value;
|
|
1454
1682
|
this.authenticator.updateForm({ name: name, value: value });
|
|
1455
1683
|
};
|
|
1456
|
-
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1457
|
-
event.preventDefault();
|
|
1458
|
-
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1684
|
+
VerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1685
|
+
event.preventDefault();
|
|
1686
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1687
|
+
};
|
|
1688
|
+
return VerifyUserComponent;
|
|
1689
|
+
}());
|
|
1690
|
+
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 });
|
|
1691
|
+
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 });
|
|
1692
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: VerifyUserComponent, decorators: [{
|
|
1693
|
+
type: i0.Component,
|
|
1694
|
+
args: [{
|
|
1695
|
+
selector: 'amplify-verify-user',
|
|
1696
|
+
templateUrl: './verify-user.component.html',
|
|
1697
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1698
|
+
}]
|
|
1699
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1700
|
+
type: i0.HostBinding,
|
|
1701
|
+
args: ['attr.data-amplify-authenticator-verifyuser']
|
|
1702
|
+
}], headerText: [{
|
|
1703
|
+
type: i0.Input
|
|
1704
|
+
}] } });
|
|
1705
|
+
|
|
1706
|
+
var getAccountRecoveryInfoText = ui.authenticatorTextUtil.getAccountRecoveryInfoText, getSkipText = ui.authenticatorTextUtil.getSkipText, getSubmitText = ui.authenticatorTextUtil.getSubmitText;
|
|
1707
|
+
var ConfirmVerifyUserComponent = /** @class */ (function () {
|
|
1708
|
+
function ConfirmVerifyUserComponent(authenticator) {
|
|
1709
|
+
this.authenticator = authenticator;
|
|
1710
|
+
this.dataAttr = '';
|
|
1711
|
+
this.headerText = getAccountRecoveryInfoText();
|
|
1712
|
+
// translated texts
|
|
1713
|
+
this.skipText = getSkipText();
|
|
1714
|
+
this.submitText = getSubmitText();
|
|
1715
|
+
}
|
|
1716
|
+
Object.defineProperty(ConfirmVerifyUserComponent.prototype, "context", {
|
|
1717
|
+
get: function () {
|
|
1718
|
+
return this.authenticator.slotContext;
|
|
1719
|
+
},
|
|
1720
|
+
enumerable: false,
|
|
1721
|
+
configurable: true
|
|
1722
|
+
});
|
|
1723
|
+
ConfirmVerifyUserComponent.prototype.onInput = function (event) {
|
|
1724
|
+
event.preventDefault();
|
|
1725
|
+
var _a = event.target, name = _a.name, value = _a.value;
|
|
1726
|
+
this.authenticator.updateForm({ name: name, value: value });
|
|
1727
|
+
};
|
|
1728
|
+
ConfirmVerifyUserComponent.prototype.onSubmit = function (event) {
|
|
1729
|
+
event.preventDefault();
|
|
1730
|
+
this.authenticator.submitForm(ui.getFormDataFromEvent(event));
|
|
1731
|
+
};
|
|
1732
|
+
return ConfirmVerifyUserComponent;
|
|
1733
|
+
}());
|
|
1734
|
+
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 });
|
|
1735
|
+
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"] }] });
|
|
1736
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ConfirmVerifyUserComponent, decorators: [{
|
|
1737
|
+
type: i0.Component,
|
|
1738
|
+
args: [{
|
|
1739
|
+
selector: 'amplify-confirm-verify-user',
|
|
1740
|
+
templateUrl: './amplify-confirm-verify-user.component.html',
|
|
1741
|
+
}]
|
|
1742
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1743
|
+
type: i0.HostBinding,
|
|
1744
|
+
args: ['attr.data-amplify-authenticator-confirmverifyuser']
|
|
1745
|
+
}], headerText: [{
|
|
1746
|
+
type: i0.Input
|
|
1747
|
+
}] } });
|
|
1748
|
+
|
|
1749
|
+
var getSignInTabText = ui.authenticatorTextUtil.getSignInTabText, getSignUpTabText = ui.authenticatorTextUtil.getSignUpTabText;
|
|
1750
|
+
var AuthenticatorComponent = /** @class */ (function () {
|
|
1751
|
+
function AuthenticatorComponent(authenticator, contextService, changeDetector) {
|
|
1752
|
+
this.authenticator = authenticator;
|
|
1753
|
+
this.contextService = contextService;
|
|
1754
|
+
this.changeDetector = changeDetector;
|
|
1755
|
+
this.customComponentQuery = null;
|
|
1756
|
+
// translated texts
|
|
1757
|
+
this.signInTitle = getSignInTabText();
|
|
1758
|
+
this.signUpTitle = getSignUpTabText();
|
|
1759
|
+
this.hasInitialized = false;
|
|
1760
|
+
this.isHandlingHubEvent = false;
|
|
1761
|
+
}
|
|
1762
|
+
AuthenticatorComponent.prototype.ngOnInit = function () {
|
|
1763
|
+
var _this = this;
|
|
1764
|
+
var _a = this, initialState = _a.initialState, loginMechanisms = _a.loginMechanisms, services = _a.services, signUpAttributes = _a.signUpAttributes, socialProviders = _a.socialProviders, formFields = _a.formFields;
|
|
1765
|
+
var _b = this.authenticator, authService = _b.authService, initializeMachine = _b.initializeMachine;
|
|
1766
|
+
this.unsubscribeHub = ui.listenToAuthHub(authService, function (data, service) { return __awaiter(_this, void 0, void 0, function () {
|
|
1767
|
+
return __generator(this, function (_a) {
|
|
1768
|
+
switch (_a.label) {
|
|
1769
|
+
case 0: return [4 /*yield*/, ui.defaultAuthHubHandler(data, service)];
|
|
1770
|
+
case 1:
|
|
1771
|
+
_a.sent();
|
|
1772
|
+
/**
|
|
1773
|
+
* Hub events aren't properly caught by Angular, because they are
|
|
1774
|
+
* synchronous events. Angular tracks async network events and
|
|
1775
|
+
* html events, but not synchronous events like hub.
|
|
1776
|
+
*
|
|
1777
|
+
* On any notable hub events, we run change detection manually.
|
|
1778
|
+
*/
|
|
1779
|
+
this.changeDetector.detectChanges();
|
|
1780
|
+
/**
|
|
1781
|
+
* Hub events that we handle can lead to multiple state changes:
|
|
1782
|
+
* e.g. `authenticated` -> `signOut` -> initialState.
|
|
1783
|
+
*
|
|
1784
|
+
* We want to ensure change detection runs all the way, until
|
|
1785
|
+
* we reach back to the initial state. Setting the below flag
|
|
1786
|
+
* to true to until we reach initial state.
|
|
1787
|
+
*/
|
|
1788
|
+
this.isHandlingHubEvent = true;
|
|
1789
|
+
return [2 /*return*/];
|
|
1790
|
+
}
|
|
1791
|
+
});
|
|
1792
|
+
}); });
|
|
1793
|
+
/**
|
|
1794
|
+
* Subscribes to state machine changes and sends INIT event
|
|
1795
|
+
* once machine reaches 'setup' state.
|
|
1796
|
+
*/
|
|
1797
|
+
this.unsubscribeMachine = this.authenticator.subscribe(function () {
|
|
1798
|
+
var route = _this.authenticator.route;
|
|
1799
|
+
if (_this.isHandlingHubEvent) {
|
|
1800
|
+
_this.changeDetector.detectChanges();
|
|
1801
|
+
var initialStateWithDefault = initialState !== null && initialState !== void 0 ? initialState : 'signIn';
|
|
1802
|
+
// We can stop manual change detection if we're back to the initial state
|
|
1803
|
+
if (route === initialStateWithDefault) {
|
|
1804
|
+
_this.isHandlingHubEvent = false;
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
if (!_this.hasInitialized && route === 'setup') {
|
|
1808
|
+
initializeMachine({
|
|
1809
|
+
initialState: initialState,
|
|
1810
|
+
loginMechanisms: loginMechanisms,
|
|
1811
|
+
services: services,
|
|
1812
|
+
signUpAttributes: signUpAttributes,
|
|
1813
|
+
socialProviders: socialProviders,
|
|
1814
|
+
formFields: formFields,
|
|
1815
|
+
});
|
|
1816
|
+
_this.hasInitialized = true;
|
|
1817
|
+
}
|
|
1818
|
+
}).unsubscribe;
|
|
1819
|
+
/**
|
|
1820
|
+
* handling translations after content init, because authenticator and its
|
|
1821
|
+
* translations might be initialized before the main app's `ngOnInit` is run.
|
|
1822
|
+
*/
|
|
1823
|
+
this.signInTitle = getSignInTabText();
|
|
1824
|
+
this.signUpTitle = getSignUpTabText();
|
|
1825
|
+
};
|
|
1826
|
+
/**
|
|
1827
|
+
* Lifecycle Methods
|
|
1828
|
+
*/
|
|
1829
|
+
AuthenticatorComponent.prototype.ngAfterContentInit = function () {
|
|
1830
|
+
this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
|
|
1459
1831
|
};
|
|
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
|
-
}
|
|
1832
|
+
AuthenticatorComponent.prototype.ngOnDestroy = function () {
|
|
1833
|
+
if (this.unsubscribeMachine)
|
|
1834
|
+
this.unsubscribeMachine();
|
|
1835
|
+
if (this.unsubscribeHub)
|
|
1836
|
+
this.unsubscribeHub();
|
|
1492
1837
|
};
|
|
1493
|
-
|
|
1838
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "context", {
|
|
1494
1839
|
/**
|
|
1495
|
-
*
|
|
1496
|
-
*
|
|
1497
|
-
* Translating here in a backwards-compatible manner, but should be resolved in next major version.
|
|
1840
|
+
* Class Functions
|
|
1498
1841
|
*/
|
|
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", {
|
|
1842
|
+
// context passed to "authenticated" slot
|
|
1539
1843
|
get: function () {
|
|
1540
|
-
return this.
|
|
1844
|
+
return this.authenticator.slotContext;
|
|
1541
1845
|
},
|
|
1542
1846
|
enumerable: false,
|
|
1543
1847
|
configurable: true
|
|
1544
1848
|
});
|
|
1545
|
-
Object.defineProperty(
|
|
1849
|
+
Object.defineProperty(AuthenticatorComponent.prototype, "route", {
|
|
1546
1850
|
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;
|
|
1851
|
+
return this.authenticator.route;
|
|
1561
1852
|
},
|
|
1562
1853
|
enumerable: false,
|
|
1563
1854
|
configurable: true
|
|
1564
1855
|
});
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1856
|
+
AuthenticatorComponent.prototype.onTabChange = function () {
|
|
1857
|
+
var route = this.authenticator.route;
|
|
1858
|
+
if (route === 'signIn') {
|
|
1859
|
+
this.authenticator.toSignUp();
|
|
1860
|
+
}
|
|
1861
|
+
else {
|
|
1862
|
+
this.authenticator.toSignIn();
|
|
1863
|
+
}
|
|
1571
1864
|
};
|
|
1572
|
-
|
|
1865
|
+
AuthenticatorComponent.prototype.hasTabs = function () {
|
|
1866
|
+
var route = this.authenticator.route;
|
|
1867
|
+
return route === 'signIn' || route === 'signUp';
|
|
1868
|
+
};
|
|
1869
|
+
AuthenticatorComponent.prototype.hasRouteComponent = function () {
|
|
1870
|
+
var route = this.authenticator.route;
|
|
1871
|
+
switch (route) {
|
|
1872
|
+
case 'authenticated':
|
|
1873
|
+
case 'idle':
|
|
1874
|
+
case 'setup':
|
|
1875
|
+
case 'signOut':
|
|
1876
|
+
case 'transition':
|
|
1877
|
+
return false;
|
|
1878
|
+
default:
|
|
1879
|
+
return true;
|
|
1880
|
+
}
|
|
1881
|
+
};
|
|
1882
|
+
AuthenticatorComponent.prototype.mapCustomComponents = function (componentQuery) {
|
|
1883
|
+
if (!componentQuery)
|
|
1884
|
+
return {};
|
|
1885
|
+
var customComponents = {};
|
|
1886
|
+
componentQuery.forEach(function (component) {
|
|
1887
|
+
customComponents[component.name] = component.template;
|
|
1888
|
+
});
|
|
1889
|
+
return customComponents;
|
|
1890
|
+
};
|
|
1891
|
+
return AuthenticatorComponent;
|
|
1573
1892
|
}());
|
|
1574
|
-
|
|
1575
|
-
{ type:
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1893
|
+
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 });
|
|
1894
|
+
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 });
|
|
1895
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AuthenticatorComponent, decorators: [{
|
|
1896
|
+
type: i0.Component,
|
|
1897
|
+
args: [{
|
|
1898
|
+
selector: 'amplify-authenticator',
|
|
1899
|
+
templateUrl: './authenticator.component.html',
|
|
1900
|
+
providers: [CustomComponentsService],
|
|
1901
|
+
encapsulation: i0.ViewEncapsulation.None,
|
|
1902
|
+
}]
|
|
1903
|
+
}], ctorParameters: function () { return [{ type: AuthenticatorService }, { type: CustomComponentsService }, { type: i0__namespace.ChangeDetectorRef }]; }, propDecorators: { formFields: [{
|
|
1904
|
+
type: i0.Input
|
|
1905
|
+
}], initialState: [{
|
|
1906
|
+
type: i0.Input
|
|
1907
|
+
}], loginMechanisms: [{
|
|
1908
|
+
type: i0.Input
|
|
1909
|
+
}], services: [{
|
|
1910
|
+
type: i0.Input
|
|
1911
|
+
}], signUpAttributes: [{
|
|
1912
|
+
type: i0.Input
|
|
1913
|
+
}], socialProviders: [{
|
|
1914
|
+
type: i0.Input
|
|
1915
|
+
}], variation: [{
|
|
1916
|
+
type: i0.Input
|
|
1917
|
+
}], hideSignUp: [{
|
|
1918
|
+
type: i0.Input
|
|
1919
|
+
}], customComponentQuery: [{
|
|
1920
|
+
type: i0.ContentChildren,
|
|
1921
|
+
args: [AmplifySlotDirective]
|
|
1922
|
+
}] } });
|
|
1595
1923
|
|
|
1596
1924
|
var CheckboxComponent = /** @class */ (function () {
|
|
1597
1925
|
function CheckboxComponent() {
|
|
@@ -1609,326 +1937,112 @@
|
|
|
1609
1937
|
};
|
|
1610
1938
|
return CheckboxComponent;
|
|
1611
1939
|
}());
|
|
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
|
-
};
|
|
1940
|
+
CheckboxComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CheckboxComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1941
|
+
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"] }] });
|
|
1942
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: CheckboxComponent, decorators: [{
|
|
1943
|
+
type: i0.Component,
|
|
1944
|
+
args: [{
|
|
1945
|
+
selector: 'amplify-checkbox',
|
|
1946
|
+
templateUrl: './checkbox.component.html',
|
|
1947
|
+
}]
|
|
1948
|
+
}], propDecorators: { defaultChecked: [{
|
|
1949
|
+
type: i0.Input
|
|
1950
|
+
}], errorMessage: [{
|
|
1951
|
+
type: i0.Input
|
|
1952
|
+
}], hasError: [{
|
|
1953
|
+
type: i0.Input
|
|
1954
|
+
}], label: [{
|
|
1955
|
+
type: i0.Input
|
|
1956
|
+
}], name: [{
|
|
1957
|
+
type: i0.Input
|
|
1958
|
+
}], value: [{
|
|
1959
|
+
type: i0.Input
|
|
1960
|
+
}] } });
|
|
1883
1961
|
|
|
1884
1962
|
var AmplifyAuthenticatorModule = /** @class */ (function () {
|
|
1885
1963
|
function AmplifyAuthenticatorModule() {
|
|
1886
1964
|
}
|
|
1887
1965
|
return AmplifyAuthenticatorModule;
|
|
1888
1966
|
}());
|
|
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
|
-
|
|
1967
|
+
AmplifyAuthenticatorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1968
|
+
AmplifyAuthenticatorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, declarations: [AmplifySlotComponent,
|
|
1969
|
+
AmplifySlotDirective,
|
|
1970
|
+
AuthenticatorComponent,
|
|
1971
|
+
BaseFormFieldsComponent,
|
|
1972
|
+
ButtonComponent,
|
|
1973
|
+
CheckboxComponent,
|
|
1974
|
+
ConfirmResetPasswordComponent,
|
|
1975
|
+
ConfirmSignInComponent,
|
|
1976
|
+
ConfirmSignUpComponent,
|
|
1977
|
+
ConfirmVerifyUserComponent,
|
|
1978
|
+
ErrorComponent,
|
|
1979
|
+
FederatedSignInButtonComponent,
|
|
1980
|
+
FederatedSignInComponent,
|
|
1981
|
+
ForceNewPasswordComponent,
|
|
1982
|
+
ForceNewPasswordFormFieldsComponent,
|
|
1983
|
+
FormFieldComponent,
|
|
1984
|
+
PasswordFieldComponent,
|
|
1985
|
+
PhoneNumberFieldComponent,
|
|
1986
|
+
ResetPasswordComponent,
|
|
1987
|
+
SelectComponent,
|
|
1988
|
+
SetupTotpComponent,
|
|
1989
|
+
SignInComponent,
|
|
1990
|
+
SignUpComponent,
|
|
1991
|
+
SignUpFormFieldsComponent,
|
|
1992
|
+
TabItemComponent,
|
|
1993
|
+
TabsComponent,
|
|
1994
|
+
TextFieldComponent,
|
|
1995
|
+
VerifyUserComponent], imports: [i6.CommonModule], exports: [AmplifySlotDirective,
|
|
1996
|
+
AuthenticatorComponent,
|
|
1997
|
+
CheckboxComponent,
|
|
1998
|
+
SignUpFormFieldsComponent,
|
|
1999
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2000
|
+
TextFieldComponent] });
|
|
2001
|
+
AmplifyAuthenticatorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, imports: [[i6.CommonModule]] });
|
|
2002
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AmplifyAuthenticatorModule, decorators: [{
|
|
2003
|
+
type: i0.NgModule,
|
|
2004
|
+
args: [{
|
|
2005
|
+
declarations: [
|
|
2006
|
+
AmplifySlotComponent,
|
|
2007
|
+
AmplifySlotDirective,
|
|
2008
|
+
AuthenticatorComponent,
|
|
2009
|
+
BaseFormFieldsComponent,
|
|
2010
|
+
ButtonComponent,
|
|
2011
|
+
CheckboxComponent,
|
|
2012
|
+
ConfirmResetPasswordComponent,
|
|
2013
|
+
ConfirmSignInComponent,
|
|
2014
|
+
ConfirmSignUpComponent,
|
|
2015
|
+
ConfirmVerifyUserComponent,
|
|
2016
|
+
ErrorComponent,
|
|
2017
|
+
FederatedSignInButtonComponent,
|
|
2018
|
+
FederatedSignInComponent,
|
|
2019
|
+
ForceNewPasswordComponent,
|
|
2020
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2021
|
+
FormFieldComponent,
|
|
2022
|
+
PasswordFieldComponent,
|
|
2023
|
+
PhoneNumberFieldComponent,
|
|
2024
|
+
ResetPasswordComponent,
|
|
2025
|
+
SelectComponent,
|
|
2026
|
+
SetupTotpComponent,
|
|
2027
|
+
SignInComponent,
|
|
2028
|
+
SignUpComponent,
|
|
2029
|
+
SignUpFormFieldsComponent,
|
|
2030
|
+
TabItemComponent,
|
|
2031
|
+
TabsComponent,
|
|
2032
|
+
TextFieldComponent,
|
|
2033
|
+
VerifyUserComponent,
|
|
2034
|
+
],
|
|
2035
|
+
imports: [i6.CommonModule],
|
|
2036
|
+
exports: [
|
|
2037
|
+
AmplifySlotDirective,
|
|
2038
|
+
AuthenticatorComponent,
|
|
2039
|
+
CheckboxComponent,
|
|
2040
|
+
SignUpFormFieldsComponent,
|
|
2041
|
+
ForceNewPasswordFormFieldsComponent,
|
|
2042
|
+
TextFieldComponent,
|
|
2043
|
+
],
|
|
2044
|
+
}]
|
|
2045
|
+
}] });
|
|
1932
2046
|
|
|
1933
2047
|
/*
|
|
1934
2048
|
* Public API Surface of ui-angular
|
|
@@ -1973,33 +2087,6 @@
|
|
|
1973
2087
|
exports.TextFieldComponent = TextFieldComponent;
|
|
1974
2088
|
exports.VerifyUserComponent = VerifyUserComponent;
|
|
1975
2089
|
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
2090
|
|
|
2004
2091
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2005
2092
|
|