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