@aws-amplify/ui-angular 5.1.7 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/aws-amplify-ui-angular.mjs +1583 -0
- package/fesm2022/aws-amplify-ui-angular.mjs.map +1 -0
- package/lib/common/types/auth-types.d.ts +2 -2
- package/lib/common/types/component-types.d.ts +1 -1
- 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/forgot-password/forgot-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/select-mfa-type/select-mfa-type.component.d.ts +1 -1
- package/lib/components/authenticator/components/setup-email/setup-email.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 +7 -15
- package/version.d.ts +1 -1
- package/esm2020/aws-amplify-ui-angular.mjs +0 -5
- package/esm2020/index.mjs +0 -30
- package/esm2020/lib/common/helpers.mjs +0 -3
- package/esm2020/lib/common/index.mjs +0 -3
- package/esm2020/lib/common/types/auth-types.mjs +0 -2
- package/esm2020/lib/common/types/component-types.mjs +0 -2
- package/esm2020/lib/common/types/index.mjs +0 -3
- package/esm2020/lib/components/authenticator/authenticator.module.mjs +0 -124
- package/esm2020/lib/components/authenticator/components/authenticator/authenticator.component.mjs +0 -180
- package/esm2020/lib/components/authenticator/components/base-form-fields/base-form-fields.component.mjs +0 -32
- package/esm2020/lib/components/authenticator/components/confirm-reset-password/amplify-confirm-reset-password.component.mjs +0 -45
- package/esm2020/lib/components/authenticator/components/confirm-sign-in/confirm-sign-in.component.mjs +0 -49
- package/esm2020/lib/components/authenticator/components/confirm-sign-up/confirm-sign-up.component.mjs +0 -49
- package/esm2020/lib/components/authenticator/components/confirm-verify-user/amplify-confirm-verify-user.component.mjs +0 -44
- package/esm2020/lib/components/authenticator/components/federated-sign-in/federated-sign-in.component.mjs +0 -47
- package/esm2020/lib/components/authenticator/components/federated-sign-in-button/federated-sign-in-button.component.mjs +0 -26
- package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password-form-fields/force-new-password-form-fields.component.mjs +0 -12
- package/esm2020/lib/components/authenticator/components/force-new-password/force-new-password.component.mjs +0 -44
- package/esm2020/lib/components/authenticator/components/forgot-password/forgot-password.component.mjs +0 -44
- package/esm2020/lib/components/authenticator/components/form-field/form-field.component.mjs +0 -50
- package/esm2020/lib/components/authenticator/components/index.mjs +0 -18
- package/esm2020/lib/components/authenticator/components/select-mfa-type/select-mfa-type.component.mjs +0 -52
- package/esm2020/lib/components/authenticator/components/setup-email/setup-email.component.mjs +0 -39
- package/esm2020/lib/components/authenticator/components/setup-totp/setup-totp.component.mjs +0 -69
- package/esm2020/lib/components/authenticator/components/sign-in/sign-in.component.mjs +0 -41
- package/esm2020/lib/components/authenticator/components/sign-up/sign-up-form-fields/sign-up-form-fields.component.mjs +0 -12
- package/esm2020/lib/components/authenticator/components/sign-up/sign-up.component.mjs +0 -44
- package/esm2020/lib/components/authenticator/components/verify-user/verify-user.component.mjs +0 -58
- package/esm2020/lib/primitives/button/button.component.mjs +0 -78
- package/esm2020/lib/primitives/checkbox/checkbox.component.mjs +0 -37
- package/esm2020/lib/primitives/error/error.component.mjs +0 -21
- package/esm2020/lib/primitives/index.mjs +0 -10
- package/esm2020/lib/primitives/password-field/password-field.component.mjs +0 -64
- package/esm2020/lib/primitives/phone-number-field/phone-number-field.component.mjs +0 -62
- package/esm2020/lib/primitives/select/select.component.mjs +0 -22
- package/esm2020/lib/primitives/tab-item/tab-item.component.mjs +0 -29
- package/esm2020/lib/primitives/tabs/tabs.component.mjs +0 -48
- package/esm2020/lib/primitives/text-field/text-field.component.mjs +0 -50
- package/esm2020/lib/services/authenticator.service.mjs +0 -180
- package/esm2020/lib/services/custom-components.service.mjs +0 -25
- package/esm2020/lib/utilities/amplify-slot/amplify-slot.component.mjs +0 -33
- package/esm2020/lib/utilities/amplify-slot/amplify-slot.directive.mjs +0 -21
- package/esm2020/version.mjs +0 -2
- package/fesm2015/aws-amplify-ui-angular.mjs +0 -1521
- package/fesm2015/aws-amplify-ui-angular.mjs.map +0 -1
- package/fesm2020/aws-amplify-ui-angular.mjs +0 -1504
- package/fesm2020/aws-amplify-ui-angular.mjs.map +0 -1
|
@@ -1,1521 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, Directive, Injectable, HostBinding, Component, EventEmitter, Output, ViewEncapsulation, ContentChildren, NgModule } from '@angular/core';
|
|
3
|
-
import * as i2 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { createAuthenticatorMachine, translate, listenToAuthHub, defaultAuthHubHandler, getServiceFacade, classNames, ComponentClassName, countryDialCodes, getErrors, getSortedFormFields, authenticatorTextUtil, getFormDataFromEvent, getActorContext, getTotpCodeURL, FederatedIdentityProviders, defaultFormFieldOptions, getActorState, censorContactMethod, setUserAgent } from '@aws-amplify/ui';
|
|
6
|
-
export { translations } from '@aws-amplify/ui';
|
|
7
|
-
import { __awaiter } from 'tslib';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { interpret } from 'xstate';
|
|
10
|
-
import { getCurrentUser } from 'aws-amplify/auth';
|
|
11
|
-
import { ConsoleLogger } from 'aws-amplify/utils';
|
|
12
|
-
import { nanoid } from 'nanoid';
|
|
13
|
-
import QRCode from 'qrcode';
|
|
14
|
-
|
|
15
|
-
class AmplifySlotDirective {
|
|
16
|
-
constructor(template) {
|
|
17
|
-
this.template = template;
|
|
18
|
-
}
|
|
19
|
-
set amplifySlot(component) {
|
|
20
|
-
this.name = component;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
AmplifySlotDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
24
|
-
AmplifySlotDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotDirective, selector: "[amplifySlot]", inputs: { amplifySlot: "amplifySlot" }, ngImport: i0 });
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotDirective, decorators: [{
|
|
26
|
-
type: Directive,
|
|
27
|
-
args: [{
|
|
28
|
-
selector: '[amplifySlot]',
|
|
29
|
-
}]
|
|
30
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { amplifySlot: [{
|
|
31
|
-
type: Input
|
|
32
|
-
}] } });
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Stores and provides custom components that users provide with `amplify-slot`.
|
|
36
|
-
*/
|
|
37
|
-
class CustomComponentsService {
|
|
38
|
-
constructor() {
|
|
39
|
-
this._customComponents = {};
|
|
40
|
-
}
|
|
41
|
-
get customComponents() {
|
|
42
|
-
return this._customComponents;
|
|
43
|
-
}
|
|
44
|
-
set customComponents(customComponents) {
|
|
45
|
-
this._customComponents = Object.assign(Object.assign({}, this._customComponents), customComponents);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
CustomComponentsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
-
CustomComponentsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, providedIn: 'root' });
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CustomComponentsService, decorators: [{
|
|
51
|
-
type: Injectable,
|
|
52
|
-
args: [{
|
|
53
|
-
providedIn: 'root',
|
|
54
|
-
}]
|
|
55
|
-
}] });
|
|
56
|
-
|
|
57
|
-
const VERSION = '5.1.7';
|
|
58
|
-
|
|
59
|
-
const logger$1 = new ConsoleLogger('state-machine');
|
|
60
|
-
/**
|
|
61
|
-
* AuthenticatorService provides access to the authenticator state and context.
|
|
62
|
-
*/
|
|
63
|
-
class AuthenticatorService {
|
|
64
|
-
constructor() {
|
|
65
|
-
this._authStatus = 'configuring';
|
|
66
|
-
const machine = createAuthenticatorMachine();
|
|
67
|
-
this._authService = interpret(machine).start();
|
|
68
|
-
this.getInitialAuthStatus();
|
|
69
|
-
this.setupMachineSubscription();
|
|
70
|
-
this.setupHubListener();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Context facades
|
|
74
|
-
*/
|
|
75
|
-
get error() {
|
|
76
|
-
var _a;
|
|
77
|
-
return translate((_a = this._facade) === null || _a === void 0 ? void 0 : _a.error);
|
|
78
|
-
}
|
|
79
|
-
get hasValidationErrors() {
|
|
80
|
-
var _a;
|
|
81
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.hasValidationErrors;
|
|
82
|
-
}
|
|
83
|
-
get isPending() {
|
|
84
|
-
var _a;
|
|
85
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.isPending;
|
|
86
|
-
}
|
|
87
|
-
get route() {
|
|
88
|
-
var _a;
|
|
89
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.route;
|
|
90
|
-
}
|
|
91
|
-
get authStatus() {
|
|
92
|
-
return this._authStatus;
|
|
93
|
-
}
|
|
94
|
-
get user() {
|
|
95
|
-
var _a;
|
|
96
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.user;
|
|
97
|
-
}
|
|
98
|
-
get username() {
|
|
99
|
-
var _a;
|
|
100
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.username;
|
|
101
|
-
}
|
|
102
|
-
get validationErrors() {
|
|
103
|
-
var _a;
|
|
104
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
105
|
-
}
|
|
106
|
-
get codeDeliveryDetails() {
|
|
107
|
-
var _a;
|
|
108
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.codeDeliveryDetails;
|
|
109
|
-
}
|
|
110
|
-
get totpSecretCode() {
|
|
111
|
-
var _a;
|
|
112
|
-
return (_a = this._facade) === null || _a === void 0 ? void 0 : _a.totpSecretCode;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Service facades
|
|
116
|
-
*/
|
|
117
|
-
get initializeMachine() {
|
|
118
|
-
return this._facade.initializeMachine;
|
|
119
|
-
}
|
|
120
|
-
get updateForm() {
|
|
121
|
-
return this._facade.updateForm;
|
|
122
|
-
}
|
|
123
|
-
get updateBlur() {
|
|
124
|
-
return this._facade.updateBlur;
|
|
125
|
-
}
|
|
126
|
-
get resendCode() {
|
|
127
|
-
return this._facade.resendCode;
|
|
128
|
-
}
|
|
129
|
-
get signOut() {
|
|
130
|
-
return this._facade.signOut;
|
|
131
|
-
}
|
|
132
|
-
get submitForm() {
|
|
133
|
-
return this._facade.submitForm;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Transition facades
|
|
137
|
-
*/
|
|
138
|
-
get toFederatedSignIn() {
|
|
139
|
-
return this._facade.toFederatedSignIn;
|
|
140
|
-
}
|
|
141
|
-
get toForgotPassword() {
|
|
142
|
-
return this._facade.toForgotPassword;
|
|
143
|
-
}
|
|
144
|
-
get toSignIn() {
|
|
145
|
-
return this._facade.toSignIn;
|
|
146
|
-
}
|
|
147
|
-
get toSignUp() {
|
|
148
|
-
return this._facade.toSignUp;
|
|
149
|
-
}
|
|
150
|
-
get skipVerification() {
|
|
151
|
-
return this._facade.skipVerification;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Internal utility functions
|
|
155
|
-
*/
|
|
156
|
-
/** @deprecated For internal use only */
|
|
157
|
-
get authState() {
|
|
158
|
-
return this._authState;
|
|
159
|
-
}
|
|
160
|
-
/** @deprecated For internal use only */
|
|
161
|
-
get authService() {
|
|
162
|
-
return this._authService;
|
|
163
|
-
}
|
|
164
|
-
/** @deprecated For internal use only */
|
|
165
|
-
get context() {
|
|
166
|
-
return this._authState.context;
|
|
167
|
-
}
|
|
168
|
-
/** @deprecated For internal use only */
|
|
169
|
-
get slotContext() {
|
|
170
|
-
return Object.assign(Object.assign({}, this._facade), { $implicit: this._facade });
|
|
171
|
-
}
|
|
172
|
-
/** @deprecated For internal use only */
|
|
173
|
-
get hubSubject() {
|
|
174
|
-
return this._hubSubject;
|
|
175
|
-
}
|
|
176
|
-
subscribe(callback) {
|
|
177
|
-
if (!this._authService) {
|
|
178
|
-
logger$1.error('Subscription attempted before machine was created. This is likely a bug on the library, please consider filing a bug.');
|
|
179
|
-
}
|
|
180
|
-
const subscription = this._authService.subscribe(() => {
|
|
181
|
-
callback(this._facade);
|
|
182
|
-
});
|
|
183
|
-
return subscription;
|
|
184
|
-
}
|
|
185
|
-
ngOnDestroy() {
|
|
186
|
-
if (this._machineSubscription)
|
|
187
|
-
this._machineSubscription.unsubscribe();
|
|
188
|
-
if (this._unsubscribeHub)
|
|
189
|
-
this._unsubscribeHub();
|
|
190
|
-
this._authService.stop();
|
|
191
|
-
}
|
|
192
|
-
/** @deprecated For internal use only */
|
|
193
|
-
send(event) {
|
|
194
|
-
this.authService.send(event);
|
|
195
|
-
}
|
|
196
|
-
getInitialAuthStatus() {
|
|
197
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
-
try {
|
|
199
|
-
yield getCurrentUser();
|
|
200
|
-
this._authStatus = 'authenticated';
|
|
201
|
-
}
|
|
202
|
-
catch (e) {
|
|
203
|
-
this._authStatus = 'unauthenticated';
|
|
204
|
-
}
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
setupHubListener() {
|
|
208
|
-
this._hubSubject = new Subject();
|
|
209
|
-
const onSignIn = () => {
|
|
210
|
-
this._authStatus = 'authenticated';
|
|
211
|
-
};
|
|
212
|
-
const onSignOut = () => {
|
|
213
|
-
this._authStatus = 'unauthenticated';
|
|
214
|
-
};
|
|
215
|
-
this._unsubscribeHub = listenToAuthHub(this._authService, (data, service) => {
|
|
216
|
-
defaultAuthHubHandler(data, service, { onSignIn, onSignOut });
|
|
217
|
-
this._hubSubject.next();
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
setupMachineSubscription() {
|
|
221
|
-
this._machineSubscription = this._authService.subscribe((state) => {
|
|
222
|
-
const newState = state;
|
|
223
|
-
this._authState = newState;
|
|
224
|
-
this._facade = getServiceFacade({
|
|
225
|
-
send: this._authService.send,
|
|
226
|
-
state: newState,
|
|
227
|
-
});
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
AuthenticatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
232
|
-
AuthenticatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, providedIn: 'root' });
|
|
233
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorService, decorators: [{
|
|
234
|
-
type: Injectable,
|
|
235
|
-
args: [{
|
|
236
|
-
providedIn: 'root', // ensure we have a singleton service
|
|
237
|
-
}]
|
|
238
|
-
}], ctorParameters: function () { return []; } });
|
|
239
|
-
|
|
240
|
-
class AmplifySlotComponent {
|
|
241
|
-
constructor(propService) {
|
|
242
|
-
this.propService = propService;
|
|
243
|
-
this.display = 'contents';
|
|
244
|
-
this.isOverriden = false;
|
|
245
|
-
}
|
|
246
|
-
ngAfterContentInit() {
|
|
247
|
-
const { customComponents } = this.propService;
|
|
248
|
-
const overridingComponent = customComponents[this.name];
|
|
249
|
-
if (overridingComponent) {
|
|
250
|
-
this.overridingComponent = overridingComponent;
|
|
251
|
-
this.isOverriden = true;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
AmplifySlotComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, deps: [{ token: CustomComponentsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
256
|
-
AmplifySlotComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: AmplifySlotComponent, selector: "amplify-slot", inputs: { name: "name", context: "context" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
257
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifySlotComponent, decorators: [{
|
|
258
|
-
type: Component,
|
|
259
|
-
args: [{ selector: 'amplify-slot', 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" }]
|
|
260
|
-
}], ctorParameters: function () { return [{ type: CustomComponentsService }]; }, propDecorators: { name: [{
|
|
261
|
-
type: Input
|
|
262
|
-
}], context: [{
|
|
263
|
-
type: Input
|
|
264
|
-
}], display: [{
|
|
265
|
-
type: HostBinding,
|
|
266
|
-
args: ['style.display']
|
|
267
|
-
}] } });
|
|
268
|
-
|
|
269
|
-
class ButtonComponent {
|
|
270
|
-
constructor() {
|
|
271
|
-
this.type = 'button';
|
|
272
|
-
this.fullWidth = false;
|
|
273
|
-
this.isDisabled = false;
|
|
274
|
-
this.size = 'medium';
|
|
275
|
-
this.variation = 'default';
|
|
276
|
-
this.fontWeight = 'normal';
|
|
277
|
-
}
|
|
278
|
-
get getDisabled() {
|
|
279
|
-
return this.isDisabled ? '' : null;
|
|
280
|
-
}
|
|
281
|
-
get classNames() {
|
|
282
|
-
let className = 'amplify-button';
|
|
283
|
-
if (this.variation) {
|
|
284
|
-
className += ` amplify-button--${this.variation}`;
|
|
285
|
-
}
|
|
286
|
-
if (this.size) {
|
|
287
|
-
className += ` amplify-button--${this.size}`;
|
|
288
|
-
}
|
|
289
|
-
if (this.fullWidth) {
|
|
290
|
-
className += ` amplify-button--fullwidth`;
|
|
291
|
-
}
|
|
292
|
-
if (this.isDisabled) {
|
|
293
|
-
className += ` amplify-button--disabled amplify-button--loading`;
|
|
294
|
-
}
|
|
295
|
-
return className;
|
|
296
|
-
}
|
|
297
|
-
ngOnInit() {
|
|
298
|
-
this.typeAttr = this.type;
|
|
299
|
-
this.fullWidthAttr = this.fullWidth;
|
|
300
|
-
this.sizeAttr = this.size;
|
|
301
|
-
this.variationAttr = this.variation;
|
|
302
|
-
this.fontWeightAttr = this.fontWeight;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
306
|
-
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, template: "<ng-content></ng-content>\n" });
|
|
307
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
308
|
-
type: Component,
|
|
309
|
-
args: [{ selector: 'button[amplify-button]', template: "<ng-content></ng-content>\n" }]
|
|
310
|
-
}], propDecorators: { type: [{
|
|
311
|
-
type: Input
|
|
312
|
-
}], fullWidth: [{
|
|
313
|
-
type: Input
|
|
314
|
-
}], isDisabled: [{
|
|
315
|
-
type: Input
|
|
316
|
-
}], size: [{
|
|
317
|
-
type: Input
|
|
318
|
-
}], variation: [{
|
|
319
|
-
type: Input
|
|
320
|
-
}], fontWeight: [{
|
|
321
|
-
type: Input
|
|
322
|
-
}], typeAttr: [{
|
|
323
|
-
type: HostBinding,
|
|
324
|
-
args: ['type']
|
|
325
|
-
}], fullWidthAttr: [{
|
|
326
|
-
type: HostBinding,
|
|
327
|
-
args: ['attr.data-fullwidth']
|
|
328
|
-
}], sizeAttr: [{
|
|
329
|
-
type: HostBinding,
|
|
330
|
-
args: ['attr.data-size']
|
|
331
|
-
}], variationAttr: [{
|
|
332
|
-
type: HostBinding,
|
|
333
|
-
args: ['attr.data-variation']
|
|
334
|
-
}], fontWeightAttr: [{
|
|
335
|
-
type: HostBinding,
|
|
336
|
-
args: ['style.font-weight']
|
|
337
|
-
}], getDisabled: [{
|
|
338
|
-
type: HostBinding,
|
|
339
|
-
args: ['attr.disabled']
|
|
340
|
-
}], classNames: [{
|
|
341
|
-
type: HostBinding,
|
|
342
|
-
args: ['class']
|
|
343
|
-
}] } });
|
|
344
|
-
|
|
345
|
-
class PasswordFieldComponent {
|
|
346
|
-
constructor() {
|
|
347
|
-
this.autocomplete = 'new-password';
|
|
348
|
-
this.disabled = false;
|
|
349
|
-
this.fieldId = `amplify-field-${nanoid(12)}`;
|
|
350
|
-
this.initialValue = '';
|
|
351
|
-
this.label = '';
|
|
352
|
-
this.placeholder = '';
|
|
353
|
-
this.required = true;
|
|
354
|
-
this.labelHidden = false;
|
|
355
|
-
this.setBlur = new EventEmitter();
|
|
356
|
-
this.type = 'password';
|
|
357
|
-
this.showPassword = false;
|
|
358
|
-
this.showPasswordButtonlabel = translate('Show password');
|
|
359
|
-
// re-export utilities so that template html can use them
|
|
360
|
-
this.classnames = classNames;
|
|
361
|
-
this.ComponentClassName = ComponentClassName;
|
|
362
|
-
}
|
|
363
|
-
togglePasswordText() {
|
|
364
|
-
this.showPassword = !this.showPassword;
|
|
365
|
-
this.showPasswordButtonlabel = this.showPassword
|
|
366
|
-
? translate('Hide password')
|
|
367
|
-
: translate('Show password');
|
|
368
|
-
this.type = this.showPassword ? 'text' : 'password';
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
PasswordFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
372
|
-
PasswordFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, 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 autocapitalize=\"off\"\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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PasswordFieldComponent, decorators: [{
|
|
374
|
-
type: Component,
|
|
375
|
-
args: [{ selector: 'amplify-password-field', 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 autocapitalize=\"off\"\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" }]
|
|
376
|
-
}], propDecorators: { autocomplete: [{
|
|
377
|
-
type: Input
|
|
378
|
-
}], disabled: [{
|
|
379
|
-
type: Input
|
|
380
|
-
}], fieldId: [{
|
|
381
|
-
type: Input
|
|
382
|
-
}], initialValue: [{
|
|
383
|
-
type: Input
|
|
384
|
-
}], label: [{
|
|
385
|
-
type: Input
|
|
386
|
-
}], name: [{
|
|
387
|
-
type: Input
|
|
388
|
-
}], placeholder: [{
|
|
389
|
-
type: Input
|
|
390
|
-
}], required: [{
|
|
391
|
-
type: Input
|
|
392
|
-
}], labelHidden: [{
|
|
393
|
-
type: Input
|
|
394
|
-
}], hasError: [{
|
|
395
|
-
type: Input
|
|
396
|
-
}], describedBy: [{
|
|
397
|
-
type: Input
|
|
398
|
-
}], setBlur: [{
|
|
399
|
-
type: Output
|
|
400
|
-
}] } });
|
|
401
|
-
|
|
402
|
-
class SelectComponent {
|
|
403
|
-
}
|
|
404
|
-
SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
405
|
-
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SelectComponent, selector: "amplify-form-select", inputs: { items: "items", name: "name", label: "label", id: "id", defaultValue: "defaultValue" }, ngImport: i0, 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\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectComponent, decorators: [{
|
|
407
|
-
type: Component,
|
|
408
|
-
args: [{ selector: 'amplify-form-select', 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\"\n style=\"align-items: center; justify-content: center\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n class=\"amplify-icon\"\n viewBox=\"0 0 24 24\"\n data-size=\"large\"\n fill=\"currentColor\"\n >\n <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z\"></path>\n </svg>\n </div>\n</div>\n" }]
|
|
409
|
-
}], propDecorators: { items: [{
|
|
410
|
-
type: Input
|
|
411
|
-
}], name: [{
|
|
412
|
-
type: Input
|
|
413
|
-
}], label: [{
|
|
414
|
-
type: Input
|
|
415
|
-
}], id: [{
|
|
416
|
-
type: Input
|
|
417
|
-
}], defaultValue: [{
|
|
418
|
-
type: Input
|
|
419
|
-
}] } });
|
|
420
|
-
|
|
421
|
-
class PhoneNumberFieldComponent {
|
|
422
|
-
constructor() {
|
|
423
|
-
this.autocomplete = 'new-password';
|
|
424
|
-
this.disabled = false;
|
|
425
|
-
this.selectFieldId = `amplify-field-${nanoid(12)}`;
|
|
426
|
-
this.textFieldId = `amplify-field-${nanoid(12)}`;
|
|
427
|
-
this.initialValue = '';
|
|
428
|
-
this.label = '';
|
|
429
|
-
this.placeholder = '';
|
|
430
|
-
this.required = true;
|
|
431
|
-
this.labelHidden = false;
|
|
432
|
-
this.display = 'contents';
|
|
433
|
-
}
|
|
434
|
-
ngOnInit() {
|
|
435
|
-
var _a;
|
|
436
|
-
this.countryDialCodesValues = (_a = this.dialCodeList) !== null && _a !== void 0 ? _a : countryDialCodes;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
PhoneNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
440
|
-
PhoneNumberFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, template: "<div\n class=\"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield\"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n >\n {{ label }}\n </label>\n <div class=\"amplify-flex amplify-field-group amplify-field-group--horizontal\">\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"amplify-flex amplify-field amplify-selectfield amplify-dialcodeselect\"\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 <div\n class=\"amplify-field-group__field-wrapper amplify-field-group__field-wrapper--horizontal\"\n >\n <input\n class=\"amplify-input amplify-field-group__control\"\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 </div>\n</div>\n", dependencies: [{ kind: "component", type: SelectComponent, selector: "amplify-form-select", inputs: ["items", "name", "label", "id", "defaultValue"] }] });
|
|
441
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: PhoneNumberFieldComponent, decorators: [{
|
|
442
|
-
type: Component,
|
|
443
|
-
args: [{ selector: 'amplify-phone-number-field', template: "<div\n class=\"amplify-flex amplify-field amplify-textfield amplify-phonenumberfield\"\n>\n <label\n class=\"amplify-label\"\n [class.amplify-visually-hidden]=\"labelHidden\"\n [for]=\"textFieldId\"\n >\n {{ label }}\n </label>\n <div class=\"amplify-flex amplify-field-group amplify-field-group--horizontal\">\n <div class=\"amplify-field-group__outer-start\">\n <div\n class=\"amplify-flex amplify-field amplify-selectfield amplify-dialcodeselect\"\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 <div\n class=\"amplify-field-group__field-wrapper amplify-field-group__field-wrapper--horizontal\"\n >\n <input\n class=\"amplify-input amplify-field-group__control\"\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 </div>\n</div>\n" }]
|
|
444
|
-
}], propDecorators: { autocomplete: [{
|
|
445
|
-
type: Input
|
|
446
|
-
}], disabled: [{
|
|
447
|
-
type: Input
|
|
448
|
-
}], defaultCountryCode: [{
|
|
449
|
-
type: Input
|
|
450
|
-
}], selectFieldId: [{
|
|
451
|
-
type: Input
|
|
452
|
-
}], textFieldId: [{
|
|
453
|
-
type: Input
|
|
454
|
-
}], initialValue: [{
|
|
455
|
-
type: Input
|
|
456
|
-
}], label: [{
|
|
457
|
-
type: Input
|
|
458
|
-
}], name: [{
|
|
459
|
-
type: Input
|
|
460
|
-
}], placeholder: [{
|
|
461
|
-
type: Input
|
|
462
|
-
}], required: [{
|
|
463
|
-
type: Input
|
|
464
|
-
}], type: [{
|
|
465
|
-
type: Input
|
|
466
|
-
}], labelHidden: [{
|
|
467
|
-
type: Input
|
|
468
|
-
}], dialCodeList: [{
|
|
469
|
-
type: Input
|
|
470
|
-
}], hasError: [{
|
|
471
|
-
type: Input
|
|
472
|
-
}], describedBy: [{
|
|
473
|
-
type: Input
|
|
474
|
-
}], display: [{
|
|
475
|
-
type: HostBinding,
|
|
476
|
-
args: ['style.display']
|
|
477
|
-
}] } });
|
|
478
|
-
|
|
479
|
-
class TextFieldComponent {
|
|
480
|
-
constructor() {
|
|
481
|
-
this.autocomplete = 'new-password';
|
|
482
|
-
this.disabled = false;
|
|
483
|
-
this.fieldId = `amplify-field-${nanoid(12)}`;
|
|
484
|
-
this.initialValue = '';
|
|
485
|
-
this.label = '';
|
|
486
|
-
this.placeholder = '';
|
|
487
|
-
this.required = true;
|
|
488
|
-
this.labelHidden = false;
|
|
489
|
-
this.display = 'contents';
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
TextFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
493
|
-
TextFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, 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 autocapitalize=\"off\"\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" });
|
|
494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TextFieldComponent, decorators: [{
|
|
495
|
-
type: Component,
|
|
496
|
-
args: [{ selector: 'amplify-text-field', 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 autocapitalize=\"off\"\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" }]
|
|
497
|
-
}], propDecorators: { autocomplete: [{
|
|
498
|
-
type: Input
|
|
499
|
-
}], disabled: [{
|
|
500
|
-
type: Input
|
|
501
|
-
}], fieldId: [{
|
|
502
|
-
type: Input
|
|
503
|
-
}], initialValue: [{
|
|
504
|
-
type: Input
|
|
505
|
-
}], label: [{
|
|
506
|
-
type: Input
|
|
507
|
-
}], name: [{
|
|
508
|
-
type: Input
|
|
509
|
-
}], placeholder: [{
|
|
510
|
-
type: Input
|
|
511
|
-
}], required: [{
|
|
512
|
-
type: Input
|
|
513
|
-
}], type: [{
|
|
514
|
-
type: Input
|
|
515
|
-
}], labelHidden: [{
|
|
516
|
-
type: Input
|
|
517
|
-
}], hasError: [{
|
|
518
|
-
type: Input
|
|
519
|
-
}], describedBy: [{
|
|
520
|
-
type: Input
|
|
521
|
-
}], display: [{
|
|
522
|
-
type: HostBinding,
|
|
523
|
-
args: ['style.display']
|
|
524
|
-
}] } });
|
|
525
|
-
|
|
526
|
-
class FormFieldComponent {
|
|
527
|
-
constructor(authenticator) {
|
|
528
|
-
this.authenticator = authenticator;
|
|
529
|
-
this.countryDialCodesValue = countryDialCodes;
|
|
530
|
-
this.errorId = nanoid(12);
|
|
531
|
-
}
|
|
532
|
-
get ariaDescribedBy() {
|
|
533
|
-
return this.hasError() ? this.errorId : undefined;
|
|
534
|
-
}
|
|
535
|
-
get errors() {
|
|
536
|
-
const { validationErrors } = this.authenticator;
|
|
537
|
-
return getErrors(validationErrors[this.name]);
|
|
538
|
-
}
|
|
539
|
-
onBlur($event) {
|
|
540
|
-
const { name } = $event.target;
|
|
541
|
-
this.authenticator.updateBlur({ name });
|
|
542
|
-
}
|
|
543
|
-
isPasswordField() {
|
|
544
|
-
return this.formField.type === 'password';
|
|
545
|
-
}
|
|
546
|
-
isPhoneField() {
|
|
547
|
-
return this.formField.type === 'tel';
|
|
548
|
-
}
|
|
549
|
-
hasError() {
|
|
550
|
-
var _a;
|
|
551
|
-
return ((_a = this.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
552
|
-
}
|
|
553
|
-
translate(phrase) {
|
|
554
|
-
return translate(phrase);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
FormFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
558
|
-
FormFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormFieldComponent, selector: "amplify-form-field", inputs: { name: "name", formField: "formField" }, ngImport: i0, 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\n data-amplify-sign-up-errors\n *ngIf=\"hasError()\"\n [id]=\"errorId\"\n >\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>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: PasswordFieldComponent, selector: "amplify-password-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "labelHidden", "hasError", "describedBy"], outputs: ["setBlur"] }, { kind: "component", type: PhoneNumberFieldComponent, selector: "amplify-phone-number-field", inputs: ["autocomplete", "disabled", "defaultCountryCode", "selectFieldId", "textFieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "dialCodeList", "hasError", "describedBy"] }, { kind: "component", type: TextFieldComponent, selector: "amplify-text-field", inputs: ["autocomplete", "disabled", "fieldId", "initialValue", "label", "name", "placeholder", "required", "type", "labelHidden", "hasError", "describedBy"] }] });
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
560
|
-
type: Component,
|
|
561
|
-
args: [{ selector: 'amplify-form-field', 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\n data-amplify-sign-up-errors\n *ngIf=\"hasError()\"\n [id]=\"errorId\"\n >\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>" }]
|
|
562
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { name: [{
|
|
563
|
-
type: Input
|
|
564
|
-
}], formField: [{
|
|
565
|
-
type: Input
|
|
566
|
-
}] } });
|
|
567
|
-
|
|
568
|
-
/**
|
|
569
|
-
* Sorts the given formFields, then renders them in order.
|
|
570
|
-
*/
|
|
571
|
-
class BaseFormFieldsComponent {
|
|
572
|
-
constructor(authenticator) {
|
|
573
|
-
this.authenticator = authenticator;
|
|
574
|
-
this.display = 'contents';
|
|
575
|
-
this.formFields = [];
|
|
576
|
-
}
|
|
577
|
-
ngOnInit() {
|
|
578
|
-
const state = this.authenticator.authState;
|
|
579
|
-
this.formFields = getSortedFormFields(this.route, state);
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
BaseFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
583
|
-
BaseFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: { route: "route" }, host: { properties: { "style.display": "this.display" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: FormFieldComponent, selector: "amplify-form-field", inputs: ["name", "formField"] }] });
|
|
584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BaseFormFieldsComponent, decorators: [{
|
|
585
|
-
type: Component,
|
|
586
|
-
args: [{ selector: 'amplify-base-form-fields', 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" }]
|
|
587
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { route: [{
|
|
588
|
-
type: Input
|
|
589
|
-
}], display: [{
|
|
590
|
-
type: HostBinding,
|
|
591
|
-
args: ['style.display']
|
|
592
|
-
}] } });
|
|
593
|
-
|
|
594
|
-
class ErrorComponent {
|
|
595
|
-
constructor() {
|
|
596
|
-
this.isVisible = true;
|
|
597
|
-
this.dismissAriaLabel = translate('Dismiss alert');
|
|
598
|
-
}
|
|
599
|
-
close() {
|
|
600
|
-
this.isVisible = false;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
ErrorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
604
|
-
ErrorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ErrorComponent, selector: "amplify-error", ngImport: i0, 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 [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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
|
|
605
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
606
|
-
type: Component,
|
|
607
|
-
args: [{ selector: 'amplify-error', 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 [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" }]
|
|
608
|
-
}] });
|
|
609
|
-
|
|
610
|
-
const { getBackToSignInText: getBackToSignInText$6, getResendCodeText: getResendCodeText$1, getSubmitText: getSubmitText$1, getResetYourPasswordText: getResetYourPasswordText$1, } = authenticatorTextUtil;
|
|
611
|
-
class ConfirmResetPasswordComponent {
|
|
612
|
-
constructor(authenticator) {
|
|
613
|
-
this.authenticator = authenticator;
|
|
614
|
-
this.dataAttr = '';
|
|
615
|
-
this.headerText = getResetYourPasswordText$1();
|
|
616
|
-
// translated strings
|
|
617
|
-
this.backToSignInText = getBackToSignInText$6();
|
|
618
|
-
this.resendCodeText = getResendCodeText$1();
|
|
619
|
-
this.submitText = getSubmitText$1();
|
|
620
|
-
}
|
|
621
|
-
get context() {
|
|
622
|
-
return this.authenticator.slotContext;
|
|
623
|
-
}
|
|
624
|
-
onInput(event) {
|
|
625
|
-
event.preventDefault();
|
|
626
|
-
const { name, value } = event.target;
|
|
627
|
-
this.authenticator.updateForm({ name, value });
|
|
628
|
-
}
|
|
629
|
-
onSubmit(event) {
|
|
630
|
-
event.preventDefault();
|
|
631
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
ConfirmResetPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
635
|
-
ConfirmResetPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmResetPasswordComponent, decorators: [{
|
|
637
|
-
type: Component,
|
|
638
|
-
args: [{ selector: 'amplify-confirm-reset-password', 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" }]
|
|
639
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
640
|
-
type: HostBinding,
|
|
641
|
-
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
642
|
-
}], headerText: [{
|
|
643
|
-
type: Input
|
|
644
|
-
}] } });
|
|
645
|
-
|
|
646
|
-
const { getConfirmText: getConfirmText$4, getBackToSignInText: getBackToSignInText$5, getChallengeText } = authenticatorTextUtil;
|
|
647
|
-
class ConfirmSignInComponent {
|
|
648
|
-
constructor(authenticator) {
|
|
649
|
-
this.authenticator = authenticator;
|
|
650
|
-
this.dataAttr = '';
|
|
651
|
-
this.confirmText = getConfirmText$4();
|
|
652
|
-
this.backToSignInText = getBackToSignInText$5();
|
|
653
|
-
}
|
|
654
|
-
get context() {
|
|
655
|
-
return this.authenticator.slotContext;
|
|
656
|
-
}
|
|
657
|
-
ngOnInit() {
|
|
658
|
-
this.setHeaderText();
|
|
659
|
-
}
|
|
660
|
-
setHeaderText() {
|
|
661
|
-
const state = this.authenticator.authState;
|
|
662
|
-
const actorContext = getActorContext(state);
|
|
663
|
-
const { challengeName } = actorContext;
|
|
664
|
-
this.headerText = getChallengeText(challengeName);
|
|
665
|
-
}
|
|
666
|
-
onInput(event) {
|
|
667
|
-
event.preventDefault();
|
|
668
|
-
const { name, value } = event.target;
|
|
669
|
-
this.authenticator.updateForm({ name, value });
|
|
670
|
-
}
|
|
671
|
-
onSubmit(event) {
|
|
672
|
-
event.preventDefault();
|
|
673
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
ConfirmSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
677
|
-
ConfirmSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in", host: { properties: { "attr.data-amplify-authenticator-confirmsignin": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignInComponent, decorators: [{
|
|
679
|
-
type: Component,
|
|
680
|
-
args: [{ selector: 'amplify-confirm-sign-in', 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" }]
|
|
681
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
682
|
-
type: HostBinding,
|
|
683
|
-
args: ['attr.data-amplify-authenticator-confirmsignin']
|
|
684
|
-
}] } });
|
|
685
|
-
|
|
686
|
-
const { getResendCodeText, getConfirmText: getConfirmText$3, getDeliveryMethodText, getDeliveryMessageText, } = authenticatorTextUtil;
|
|
687
|
-
class ConfirmSignUpComponent {
|
|
688
|
-
constructor(authenticator) {
|
|
689
|
-
this.authenticator = authenticator;
|
|
690
|
-
this.dataAttr = '';
|
|
691
|
-
// translated texts
|
|
692
|
-
this.resendCodeText = getResendCodeText();
|
|
693
|
-
this.confirmText = getConfirmText$3();
|
|
694
|
-
}
|
|
695
|
-
get context() {
|
|
696
|
-
return this.authenticator.slotContext;
|
|
697
|
-
}
|
|
698
|
-
get confirmSignUpHeading() {
|
|
699
|
-
const { codeDeliveryDetails } = this.authenticator;
|
|
700
|
-
return getDeliveryMethodText(codeDeliveryDetails);
|
|
701
|
-
}
|
|
702
|
-
get subtitleText() {
|
|
703
|
-
const { codeDeliveryDetails } = this.authenticator;
|
|
704
|
-
return getDeliveryMessageText(codeDeliveryDetails);
|
|
705
|
-
}
|
|
706
|
-
onInput(event) {
|
|
707
|
-
event.preventDefault();
|
|
708
|
-
const { name, value } = event.target;
|
|
709
|
-
this.authenticator.updateForm({ name, value });
|
|
710
|
-
}
|
|
711
|
-
onSubmit(event) {
|
|
712
|
-
event.preventDefault();
|
|
713
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
ConfirmSignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
717
|
-
ConfirmSignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up", host: { properties: { "attr.data-amplify-authenticator-confirmsignup": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
718
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmSignUpComponent, decorators: [{
|
|
719
|
-
type: Component,
|
|
720
|
-
args: [{ selector: 'amplify-confirm-sign-up', 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" }]
|
|
721
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
722
|
-
type: HostBinding,
|
|
723
|
-
args: ['attr.data-amplify-authenticator-confirmsignup']
|
|
724
|
-
}] } });
|
|
725
|
-
|
|
726
|
-
const { getAccountRecoveryInfoText: getAccountRecoveryInfoText$1, getSkipText: getSkipText$1, getSubmitText } = authenticatorTextUtil;
|
|
727
|
-
class ConfirmVerifyUserComponent {
|
|
728
|
-
constructor(authenticator) {
|
|
729
|
-
this.authenticator = authenticator;
|
|
730
|
-
this.dataAttr = '';
|
|
731
|
-
this.headerText = getAccountRecoveryInfoText$1();
|
|
732
|
-
// translated texts
|
|
733
|
-
this.skipText = getSkipText$1();
|
|
734
|
-
this.submitText = getSubmitText();
|
|
735
|
-
}
|
|
736
|
-
get context() {
|
|
737
|
-
return this.authenticator.slotContext;
|
|
738
|
-
}
|
|
739
|
-
onInput(event) {
|
|
740
|
-
event.preventDefault();
|
|
741
|
-
const { name, value } = event.target;
|
|
742
|
-
this.authenticator.updateForm({ name, value });
|
|
743
|
-
}
|
|
744
|
-
onSubmit(event) {
|
|
745
|
-
event.preventDefault();
|
|
746
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
ConfirmVerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
750
|
-
ConfirmVerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-confirmverifyuser": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
751
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ConfirmVerifyUserComponent, decorators: [{
|
|
752
|
-
type: Component,
|
|
753
|
-
args: [{ selector: 'amplify-confirm-verify-user', 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" }]
|
|
754
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
755
|
-
type: HostBinding,
|
|
756
|
-
args: ['attr.data-amplify-authenticator-confirmverifyuser']
|
|
757
|
-
}], headerText: [{
|
|
758
|
-
type: Input
|
|
759
|
-
}] } });
|
|
760
|
-
|
|
761
|
-
class ForceNewPasswordFormFieldsComponent {
|
|
762
|
-
}
|
|
763
|
-
ForceNewPasswordFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
764
|
-
ForceNewPasswordFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields", ngImport: i0, 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", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
|
|
765
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordFormFieldsComponent, decorators: [{
|
|
766
|
-
type: Component,
|
|
767
|
-
args: [{ selector: 'amplify-force-new-password-form-fields', 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" }]
|
|
768
|
-
}] });
|
|
769
|
-
|
|
770
|
-
const { getChangePasswordText, getBackToSignInText: getBackToSignInText$4 } = authenticatorTextUtil;
|
|
771
|
-
class ForceNewPasswordComponent {
|
|
772
|
-
constructor(authenticator) {
|
|
773
|
-
this.authenticator = authenticator;
|
|
774
|
-
this.dataAttr = '';
|
|
775
|
-
this.headerText = getChangePasswordText();
|
|
776
|
-
// translated texts
|
|
777
|
-
this.changePasswordText = getChangePasswordText();
|
|
778
|
-
this.backToSignInText = getBackToSignInText$4();
|
|
779
|
-
}
|
|
780
|
-
get context() {
|
|
781
|
-
return this.authenticator.slotContext;
|
|
782
|
-
}
|
|
783
|
-
onInput(event) {
|
|
784
|
-
event.preventDefault();
|
|
785
|
-
const { name, value } = event.target;
|
|
786
|
-
this.authenticator.updateForm({ name, value });
|
|
787
|
-
}
|
|
788
|
-
onSubmit(event) {
|
|
789
|
-
event.preventDefault();
|
|
790
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
ForceNewPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
794
|
-
ForceNewPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forcenewpassword": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: ForceNewPasswordFormFieldsComponent, selector: "amplify-force-new-password-form-fields" }] });
|
|
795
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForceNewPasswordComponent, decorators: [{
|
|
796
|
-
type: Component,
|
|
797
|
-
args: [{ selector: 'amplify-force-new-password', 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" }]
|
|
798
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
799
|
-
type: HostBinding,
|
|
800
|
-
args: ['attr.data-amplify-authenticator-forcenewpassword']
|
|
801
|
-
}], headerText: [{
|
|
802
|
-
type: Input
|
|
803
|
-
}] } });
|
|
804
|
-
|
|
805
|
-
const { getResetYourPasswordText, getSendCodeText, getBackToSignInText: getBackToSignInText$3 } = authenticatorTextUtil;
|
|
806
|
-
class ForgotPasswordComponent {
|
|
807
|
-
constructor(authenticator) {
|
|
808
|
-
this.authenticator = authenticator;
|
|
809
|
-
this.dataAttr = '';
|
|
810
|
-
this.headerText = getResetYourPasswordText();
|
|
811
|
-
// translated texts
|
|
812
|
-
this.sendCodeText = getSendCodeText();
|
|
813
|
-
this.backToSignInText = getBackToSignInText$3();
|
|
814
|
-
}
|
|
815
|
-
get context() {
|
|
816
|
-
return this.authenticator.slotContext;
|
|
817
|
-
}
|
|
818
|
-
onInput(event) {
|
|
819
|
-
event.preventDefault();
|
|
820
|
-
const { name, value } = event.target;
|
|
821
|
-
this.authenticator.updateForm({ name, value });
|
|
822
|
-
}
|
|
823
|
-
onSubmit(event) {
|
|
824
|
-
event.preventDefault();
|
|
825
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
ForgotPasswordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForgotPasswordComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
829
|
-
ForgotPasswordComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: ForgotPasswordComponent, selector: "amplify-forgot-password", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-forgotpassword": "this.dataAttr" } }, ngImport: i0, 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=\"forgot-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=\"forgotPassword\"></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=\"forgot-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
831
|
-
type: Component,
|
|
832
|
-
args: [{ selector: 'amplify-forgot-password', 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=\"forgot-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=\"forgotPassword\"></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=\"forgot-password-footer\" [context]=\"context\">\n </amplify-slot>\n</form>\n" }]
|
|
833
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
834
|
-
type: HostBinding,
|
|
835
|
-
args: ['attr.data-amplify-authenticator-forgotpassword']
|
|
836
|
-
}], headerText: [{
|
|
837
|
-
type: Input
|
|
838
|
-
}] } });
|
|
839
|
-
|
|
840
|
-
const { getConfirmText: getConfirmText$2, getBackToSignInText: getBackToSignInText$2, getSelectMfaTypeText, getSelectMfaTypeByChallengeName, getMfaTypeLabelByValue, } = authenticatorTextUtil;
|
|
841
|
-
class SelectMfaTypeComponent {
|
|
842
|
-
constructor(authenticator) {
|
|
843
|
-
this.authenticator = authenticator;
|
|
844
|
-
this.confirmText = getConfirmText$2();
|
|
845
|
-
this.backToSignInText = getBackToSignInText$2();
|
|
846
|
-
this.selectMfaTypeText = getSelectMfaTypeText();
|
|
847
|
-
this.getMfaTypeLabelByValue = getMfaTypeLabelByValue;
|
|
848
|
-
this.allowedMfaTypes = [];
|
|
849
|
-
this.classNames = classNames;
|
|
850
|
-
this.ComponentClassName = ComponentClassName;
|
|
851
|
-
}
|
|
852
|
-
get context() {
|
|
853
|
-
return this.authenticator.slotContext;
|
|
854
|
-
}
|
|
855
|
-
ngOnInit() {
|
|
856
|
-
this.setHeaderText();
|
|
857
|
-
this.setAllowedMfaTypes();
|
|
858
|
-
}
|
|
859
|
-
setHeaderText() {
|
|
860
|
-
const actorContext = getActorContext(this.authenticator.authState);
|
|
861
|
-
this.headerText = getSelectMfaTypeByChallengeName(actorContext.challengeName);
|
|
862
|
-
}
|
|
863
|
-
setAllowedMfaTypes() {
|
|
864
|
-
const actorContext = getActorContext(this.authenticator.authState);
|
|
865
|
-
this.allowedMfaTypes = actorContext.allowedMfaTypes;
|
|
866
|
-
}
|
|
867
|
-
onInput(event) {
|
|
868
|
-
event.preventDefault();
|
|
869
|
-
const { name, value } = event.target;
|
|
870
|
-
this.authenticator.updateForm({ name, value });
|
|
871
|
-
}
|
|
872
|
-
onSubmit(event) {
|
|
873
|
-
event.preventDefault();
|
|
874
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
SelectMfaTypeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectMfaTypeComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
878
|
-
SelectMfaTypeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SelectMfaTypeComponent, selector: "amplify-select-mfa-type", ngImport: i0, template: "<form\n data-amplify-form\n data-amplify-authenticator-select-mfa-type\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"select-mfa-type-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <div\n *ngFor=\"let mfaType of allowedMfaTypes; index as i\"\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Field, ComponentClassName.RadioGroupField)\"\n role=\"radiogroup\"\n >\n <label\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Radio)\"\n [attr.data-amplify-radio-control-label]\n >\n <span [class]=\"classNames(ComponentClassName.Text, ComponentClassName.RadioLabel)\">\n {{getMfaTypeLabelByValue(mfaType)}}\n </span>\n <input\n [class]=\"classNames(ComponentClassName.Input, ComponentClassName.FieldGroupControl, ComponentClassName.VisuallyHidden, ComponentClassName.RadioInput)\"\n [attr.data-amplify-radio-control-input]\n [value]=\"mfaType\"\n [checked]=\"i === 0\"\n name=\"mfa_type\"\n type=\"radio\"\n required\n />\n <span\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.RadioButton)\"\n [attr.aria-hidden]=\"true\"\n ></span>\n </label>\n </div>\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=\"select-mfa-type-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
879
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SelectMfaTypeComponent, decorators: [{
|
|
880
|
-
type: Component,
|
|
881
|
-
args: [{ selector: 'amplify-select-mfa-type', template: "<form\n data-amplify-form\n data-amplify-authenticator-select-mfa-type\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"select-mfa-type-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <div\n *ngFor=\"let mfaType of allowedMfaTypes; index as i\"\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Field, ComponentClassName.RadioGroupField)\"\n role=\"radiogroup\"\n >\n <label\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.Radio)\"\n [attr.data-amplify-radio-control-label]\n >\n <span [class]=\"classNames(ComponentClassName.Text, ComponentClassName.RadioLabel)\">\n {{getMfaTypeLabelByValue(mfaType)}}\n </span>\n <input\n [class]=\"classNames(ComponentClassName.Input, ComponentClassName.FieldGroupControl, ComponentClassName.VisuallyHidden, ComponentClassName.RadioInput)\"\n [attr.data-amplify-radio-control-input]\n [value]=\"mfaType\"\n [checked]=\"i === 0\"\n name=\"mfa_type\"\n type=\"radio\"\n required\n />\n <span\n [class]=\"classNames(ComponentClassName.Flex, ComponentClassName.RadioButton)\"\n [attr.aria-hidden]=\"true\"\n ></span>\n </label>\n </div>\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=\"select-mfa-type-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>" }]
|
|
882
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
|
|
883
|
-
|
|
884
|
-
const { getConfirmText: getConfirmText$1, getBackToSignInText: getBackToSignInText$1, getSetupEmailText } = authenticatorTextUtil;
|
|
885
|
-
class SetupEmailComponent {
|
|
886
|
-
constructor(authenticator) {
|
|
887
|
-
this.authenticator = authenticator;
|
|
888
|
-
this.headerText = getSetupEmailText();
|
|
889
|
-
this.confirmText = getConfirmText$1();
|
|
890
|
-
this.backToSignInText = getBackToSignInText$1();
|
|
891
|
-
this.classNames = classNames;
|
|
892
|
-
this.ComponentClassName = ComponentClassName;
|
|
893
|
-
}
|
|
894
|
-
get context() {
|
|
895
|
-
return this.authenticator.slotContext;
|
|
896
|
-
}
|
|
897
|
-
onInput(event) {
|
|
898
|
-
event.preventDefault();
|
|
899
|
-
const { name, value } = event.target;
|
|
900
|
-
this.authenticator.updateForm({ name, value });
|
|
901
|
-
}
|
|
902
|
-
onSubmit(event) {
|
|
903
|
-
event.preventDefault();
|
|
904
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
SetupEmailComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupEmailComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
908
|
-
SetupEmailComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SetupEmailComponent, selector: "amplify-setup-email", ngImport: i0, template: "<form\n data-amplify-form\n data-amplify-authenticator-setup-email\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"setup-email-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"setupEmail\"></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=\"setup-email-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
909
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupEmailComponent, decorators: [{
|
|
910
|
-
type: Component,
|
|
911
|
-
args: [{ selector: 'amplify-setup-email', template: "<form\n data-amplify-form\n data-amplify-authenticator-setup-email\n (submit)=\"onSubmit($event)\"\n (input)=\"onInput($event)\"\n>\n <fieldset\n [class]=\"classNames(ComponentClassName.Flex, 'amplify-authenticator__column')\"\n data-amplify-fieldset\n [disabled]=\"authenticator.isPending\"\n >\n <amplify-slot\n name=\"setup-email-header\"\n [context]=\"context\"\n >\n <h3 [class]=\"classNames(ComponentClassName.Heading, 'amplify-heading--3')\">{{ headerText }}</h3>\n </amplify-slot>\n <amplify-base-form-fields route=\"setupEmail\"></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=\"setup-email-footer\"\n [context]=\"context\"\n ></amplify-slot>\n</form>" }]
|
|
912
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
|
|
913
|
-
|
|
914
|
-
const logger = new ConsoleLogger('SetupTotp');
|
|
915
|
-
const { getSetupTotpText, getCopyText, getBackToSignInText, getConfirmText, getCopiedText, } = authenticatorTextUtil;
|
|
916
|
-
class SetupTotpComponent {
|
|
917
|
-
constructor(authenticator) {
|
|
918
|
-
this.authenticator = authenticator;
|
|
919
|
-
this.dataAttr = '';
|
|
920
|
-
this.headerText = getSetupTotpText();
|
|
921
|
-
this.qrCodeSource = '';
|
|
922
|
-
this.totpSecretCode = '';
|
|
923
|
-
this.copyTextLabel = getCopyText();
|
|
924
|
-
// translated texts
|
|
925
|
-
this.backToSignInText = getBackToSignInText();
|
|
926
|
-
this.confirmText = getConfirmText();
|
|
927
|
-
}
|
|
928
|
-
get context() {
|
|
929
|
-
return this.authenticator.slotContext;
|
|
930
|
-
}
|
|
931
|
-
ngOnInit() {
|
|
932
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
933
|
-
yield this.generateQRCode();
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
generateQRCode() {
|
|
937
|
-
var _a, _b;
|
|
938
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
939
|
-
const { authState: state, totpSecretCode, username } = this.authenticator;
|
|
940
|
-
const { formFields } = getActorContext(state);
|
|
941
|
-
const { totpIssuer = 'AWSCognito', totpUsername = username } = (_b = (_a = formFields === null || formFields === void 0 ? void 0 : formFields.setupTotp) === null || _a === void 0 ? void 0 : _a.QR) !== null && _b !== void 0 ? _b : {};
|
|
942
|
-
this.totpSecretCode = totpSecretCode;
|
|
943
|
-
try {
|
|
944
|
-
const totpCode = getTotpCodeURL(totpIssuer, totpUsername, this.totpSecretCode);
|
|
945
|
-
logger.info('totp code was generated:', totpCode);
|
|
946
|
-
this.qrCodeSource = yield QRCode.toDataURL(totpCode);
|
|
947
|
-
}
|
|
948
|
-
catch (err) {
|
|
949
|
-
logger.error(err);
|
|
950
|
-
}
|
|
951
|
-
});
|
|
952
|
-
}
|
|
953
|
-
onInput(event) {
|
|
954
|
-
event.preventDefault();
|
|
955
|
-
const { name, value } = event.target;
|
|
956
|
-
this.authenticator.updateForm({ name, value });
|
|
957
|
-
}
|
|
958
|
-
onSubmit(event) {
|
|
959
|
-
event.preventDefault();
|
|
960
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
961
|
-
}
|
|
962
|
-
copyText() {
|
|
963
|
-
navigator.clipboard.writeText(this.totpSecretCode);
|
|
964
|
-
this.copyTextLabel = getCopiedText();
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
SetupTotpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
968
|
-
SetupTotpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SetupTotpComponent, selector: "amplify-setup-totp", host: { properties: { "attr.data-amplify-authenticator-setup-totp": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }] });
|
|
969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SetupTotpComponent, decorators: [{
|
|
970
|
-
type: Component,
|
|
971
|
-
args: [{ selector: 'amplify-setup-totp', 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" }]
|
|
972
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
973
|
-
type: HostBinding,
|
|
974
|
-
args: ['attr.data-amplify-authenticator-setup-totp']
|
|
975
|
-
}] } });
|
|
976
|
-
|
|
977
|
-
class FederatedSignInButtonComponent {
|
|
978
|
-
constructor(authenticator) {
|
|
979
|
-
this.authenticator = authenticator;
|
|
980
|
-
this.onClick = () => {
|
|
981
|
-
this.authenticator.send({
|
|
982
|
-
type: 'FEDERATED_SIGN_IN',
|
|
983
|
-
data: { provider: this.provider },
|
|
984
|
-
});
|
|
985
|
-
};
|
|
986
|
-
}
|
|
987
|
-
}
|
|
988
|
-
FederatedSignInButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
989
|
-
FederatedSignInButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: { provider: "provider", text: "text" }, ngImport: i0, 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", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }] });
|
|
990
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInButtonComponent, decorators: [{
|
|
991
|
-
type: Component,
|
|
992
|
-
args: [{ selector: 'amplify-federated-sign-in-button', 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" }]
|
|
993
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { provider: [{
|
|
994
|
-
type: Input
|
|
995
|
-
}], text: [{
|
|
996
|
-
type: Input
|
|
997
|
-
}] } });
|
|
998
|
-
|
|
999
|
-
const { getSignInWithFederationText, getOrText } = authenticatorTextUtil;
|
|
1000
|
-
class FederatedSignInComponent {
|
|
1001
|
-
constructor(authenticator) {
|
|
1002
|
-
this.authenticator = authenticator;
|
|
1003
|
-
this.FederatedProviders = FederatedIdentityProviders;
|
|
1004
|
-
this.includeAmazon = false;
|
|
1005
|
-
this.includeApple = false;
|
|
1006
|
-
this.includeFacebook = false;
|
|
1007
|
-
this.includeGoogle = false;
|
|
1008
|
-
this.shouldShowFederatedSignIn = false;
|
|
1009
|
-
}
|
|
1010
|
-
ngOnInit() {
|
|
1011
|
-
var _a, _b;
|
|
1012
|
-
const socialProviders = (_b = (_a = this.authenticator.context) === null || _a === void 0 ? void 0 : _a.config) === null || _b === void 0 ? void 0 : _b.socialProviders;
|
|
1013
|
-
this.setFederatedTexts();
|
|
1014
|
-
this.includeAmazon = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('amazon');
|
|
1015
|
-
this.includeApple = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('apple');
|
|
1016
|
-
this.includeGoogle = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('google');
|
|
1017
|
-
this.includeFacebook = socialProviders === null || socialProviders === void 0 ? void 0 : socialProviders.includes('facebook');
|
|
1018
|
-
this.shouldShowFederatedSignIn =
|
|
1019
|
-
this.includeAmazon ||
|
|
1020
|
-
this.includeApple ||
|
|
1021
|
-
this.includeFacebook ||
|
|
1022
|
-
this.includeGoogle;
|
|
1023
|
-
}
|
|
1024
|
-
setFederatedTexts() {
|
|
1025
|
-
const { route } = this.authenticator;
|
|
1026
|
-
this.orText = getOrText();
|
|
1027
|
-
this.signInAmazonText = getSignInWithFederationText(route, 'amazon');
|
|
1028
|
-
this.signInAppleText = getSignInWithFederationText(route, 'apple');
|
|
1029
|
-
this.signInFacebookText = getSignInWithFederationText(route, 'facebook');
|
|
1030
|
-
this.signInGoogleText = getSignInWithFederationText(route, 'google');
|
|
1031
|
-
}
|
|
1032
|
-
}
|
|
1033
|
-
FederatedSignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1034
|
-
FederatedSignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FederatedSignInComponent, selector: "amplify-federated-sign-in", ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FederatedSignInButtonComponent, selector: "amplify-federated-sign-in-button", inputs: ["provider", "text"] }] });
|
|
1035
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FederatedSignInComponent, decorators: [{
|
|
1036
|
-
type: Component,
|
|
1037
|
-
args: [{ selector: 'amplify-federated-sign-in', 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" }]
|
|
1038
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; } });
|
|
1039
|
-
|
|
1040
|
-
const { getForgotPasswordText, getSignInText } = authenticatorTextUtil;
|
|
1041
|
-
class SignInComponent {
|
|
1042
|
-
constructor(authenticator) {
|
|
1043
|
-
this.authenticator = authenticator;
|
|
1044
|
-
this.dataAttr = '';
|
|
1045
|
-
this.forgotPasswordText = getForgotPasswordText();
|
|
1046
|
-
this.signInButtonText = getSignInText();
|
|
1047
|
-
}
|
|
1048
|
-
get context() {
|
|
1049
|
-
return this.authenticator.slotContext;
|
|
1050
|
-
}
|
|
1051
|
-
onInput(event) {
|
|
1052
|
-
event.preventDefault();
|
|
1053
|
-
const { name, value } = event.target;
|
|
1054
|
-
this.authenticator.updateForm({ name, value });
|
|
1055
|
-
}
|
|
1056
|
-
onSubmit(event) {
|
|
1057
|
-
event.preventDefault();
|
|
1058
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
SignInComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1062
|
-
SignInComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignInComponent, selector: "amplify-sign-in", host: { properties: { "attr.data-amplify-authenticator-signin": "this.dataAttr" } }, ngImport: i0, 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.toForgotPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1063
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignInComponent, decorators: [{
|
|
1064
|
-
type: Component,
|
|
1065
|
-
args: [{ selector: 'amplify-sign-in', encapsulation: ViewEncapsulation.None, 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.toForgotPassword()\"\n >\n {{ forgotPasswordText }}\n </button>\n </div>\n</amplify-slot>\n" }]
|
|
1066
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1067
|
-
type: HostBinding,
|
|
1068
|
-
args: ['attr.data-amplify-authenticator-signin']
|
|
1069
|
-
}] } });
|
|
1070
|
-
|
|
1071
|
-
class SignUpFormFieldsComponent {
|
|
1072
|
-
}
|
|
1073
|
-
SignUpFormFieldsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1074
|
-
SignUpFormFieldsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields", ngImport: i0, 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", dependencies: [{ kind: "component", type: BaseFormFieldsComponent, selector: "amplify-base-form-fields", inputs: ["route"] }] });
|
|
1075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpFormFieldsComponent, decorators: [{
|
|
1076
|
-
type: Component,
|
|
1077
|
-
args: [{ selector: 'amplify-sign-up-form-fields', 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" }]
|
|
1078
|
-
}] });
|
|
1079
|
-
|
|
1080
|
-
const { getCreateAccountText } = authenticatorTextUtil;
|
|
1081
|
-
class SignUpComponent {
|
|
1082
|
-
constructor(authenticator) {
|
|
1083
|
-
this.authenticator = authenticator;
|
|
1084
|
-
this.dataAttr = '';
|
|
1085
|
-
// translated texts
|
|
1086
|
-
this.createAccountText = getCreateAccountText();
|
|
1087
|
-
}
|
|
1088
|
-
get context() {
|
|
1089
|
-
return this.authenticator.slotContext;
|
|
1090
|
-
}
|
|
1091
|
-
onInput(event) {
|
|
1092
|
-
const { checked, name, type, value } = event.target;
|
|
1093
|
-
const isUncheckedCheckbox = type === 'checkbox' && !checked;
|
|
1094
|
-
this.authenticator.updateForm({
|
|
1095
|
-
name,
|
|
1096
|
-
value: isUncheckedCheckbox ? undefined : value,
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
onSubmit(event) {
|
|
1100
|
-
event.preventDefault();
|
|
1101
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
1102
|
-
}
|
|
1103
|
-
}
|
|
1104
|
-
SignUpComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1105
|
-
SignUpComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SignUpComponent, selector: "amplify-sign-up", host: { properties: { "attr.data-amplify-authenticator-signup": "this.dataAttr" } }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "component", type: FederatedSignInComponent, selector: "amplify-federated-sign-in" }, { kind: "component", type: SignUpFormFieldsComponent, selector: "amplify-sign-up-form-fields" }] });
|
|
1106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SignUpComponent, decorators: [{
|
|
1107
|
-
type: Component,
|
|
1108
|
-
args: [{ selector: 'amplify-sign-up', 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" }]
|
|
1109
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1110
|
-
type: HostBinding,
|
|
1111
|
-
args: ['attr.data-amplify-authenticator-signup']
|
|
1112
|
-
}] } });
|
|
1113
|
-
|
|
1114
|
-
class TabItemComponent {
|
|
1115
|
-
constructor() {
|
|
1116
|
-
this.active = false;
|
|
1117
|
-
this.display = 'block'; // emulate div behavior
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
TabItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1121
|
-
TabItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, template: "<div\n role=\"tabpanel\"\n class=\"amplify-tabs__panel\"\n [class]=\"active ? 'amplify-tabs__panel--active' : ''\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
1123
|
-
type: Component,
|
|
1124
|
-
args: [{ selector: 'amplify-tab-item', template: "<div\n role=\"tabpanel\"\n class=\"amplify-tabs__panel\"\n [class]=\"active ? 'amplify-tabs__panel--active' : ''\"\n [id]=\"id\"\n [attr.aria-labelledby]=\"labelledById\"\n [attr.tabindex]=\"tabIndex\"\n>\n <ng-content *ngIf=\"active\"></ng-content>\n</div>\n" }]
|
|
1125
|
-
}], propDecorators: { title: [{
|
|
1126
|
-
type: Input
|
|
1127
|
-
}], active: [{
|
|
1128
|
-
type: Input
|
|
1129
|
-
}], id: [{
|
|
1130
|
-
type: Input
|
|
1131
|
-
}], labelledById: [{
|
|
1132
|
-
type: Input
|
|
1133
|
-
}], tabIndex: [{
|
|
1134
|
-
type: Input
|
|
1135
|
-
}], display: [{
|
|
1136
|
-
type: HostBinding,
|
|
1137
|
-
args: ['style.display']
|
|
1138
|
-
}] } });
|
|
1139
|
-
|
|
1140
|
-
class TabsComponent {
|
|
1141
|
-
constructor() {
|
|
1142
|
-
this.tabChange = new EventEmitter();
|
|
1143
|
-
}
|
|
1144
|
-
ngAfterContentInit() {
|
|
1145
|
-
// assign ids
|
|
1146
|
-
this.tabs.forEach((tab, index) => {
|
|
1147
|
-
tab.id = `tab-${nanoid(12)}-panel-${index}`;
|
|
1148
|
-
tab.labelledById = `tab-${nanoid(12)}-tab-${index}`;
|
|
1149
|
-
});
|
|
1150
|
-
// find active tab
|
|
1151
|
-
// TODO(enhancement): more declarative way for choosing the initial tab to render
|
|
1152
|
-
const activeTabs = this.tabs.filter((tab) => tab.active);
|
|
1153
|
-
// set active tab
|
|
1154
|
-
if (activeTabs.length !== 1) {
|
|
1155
|
-
this.selectTab(this.tabs.first);
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
selectTab(tab) {
|
|
1159
|
-
this.tabs.forEach((tab) => {
|
|
1160
|
-
tab.active = false;
|
|
1161
|
-
});
|
|
1162
|
-
tab.active = true;
|
|
1163
|
-
}
|
|
1164
|
-
handleTabClick(tab) {
|
|
1165
|
-
if (tab.active)
|
|
1166
|
-
return; // don't do anything if clicks the current active tab
|
|
1167
|
-
this.tabChange.emit();
|
|
1168
|
-
this.selectTab(tab);
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1172
|
-
TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: TabsComponent, selector: "amplify-tabs", outputs: { tabChange: "tabChange" }, queries: [{ propertyName: "tabs", predicate: TabItemComponent }], ngImport: i0, template: "<div class=\"amplify-tabs\">\n <div\n class=\"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal\"\n role=\"tablist\"\n >\n <button\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs__item\"\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 [class]=\"tab.active ? 'amplify-tabs__item--active' : ''\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </button>\n </div>\n</div>\n\n<ng-content></ng-content>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TabsComponent, decorators: [{
|
|
1174
|
-
type: Component,
|
|
1175
|
-
args: [{ selector: 'amplify-tabs', template: "<div class=\"amplify-tabs\">\n <div\n class=\"amplify-tabs__list amplify-tabs__list--top amplify-tabs__list--equal\"\n role=\"tablist\"\n >\n <button\n *ngFor=\"let tab of tabs\"\n class=\"amplify-tabs__item\"\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 [class]=\"tab.active ? 'amplify-tabs__item--active' : ''\"\n (click)=\"handleTabClick(tab)\"\n >\n {{ tab.title }}\n </button>\n </div>\n</div>\n\n<ng-content></ng-content>\n" }]
|
|
1176
|
-
}], propDecorators: { tabs: [{
|
|
1177
|
-
type: ContentChildren,
|
|
1178
|
-
args: [TabItemComponent]
|
|
1179
|
-
}], tabChange: [{
|
|
1180
|
-
type: Output
|
|
1181
|
-
}] } });
|
|
1182
|
-
|
|
1183
|
-
const getAttributeMap = () => defaultFormFieldOptions;
|
|
1184
|
-
|
|
1185
|
-
const { getSkipText, getVerifyText, getAccountRecoveryInfoText } = authenticatorTextUtil;
|
|
1186
|
-
class VerifyUserComponent {
|
|
1187
|
-
constructor(authenticator) {
|
|
1188
|
-
this.authenticator = authenticator;
|
|
1189
|
-
this.dataAttr = '';
|
|
1190
|
-
this.headerText = getAccountRecoveryInfoText();
|
|
1191
|
-
this.unverifiedUserAttributes = {};
|
|
1192
|
-
this.labelId = nanoid(12);
|
|
1193
|
-
// translated texts
|
|
1194
|
-
this.skipText = getSkipText();
|
|
1195
|
-
this.verifyText = getVerifyText();
|
|
1196
|
-
}
|
|
1197
|
-
get context() {
|
|
1198
|
-
return this.authenticator.slotContext;
|
|
1199
|
-
}
|
|
1200
|
-
ngOnInit() {
|
|
1201
|
-
const actorState = getActorState(this.authenticator.authState);
|
|
1202
|
-
this.unverifiedUserAttributes = actorState.context.unverifiedUserAttributes;
|
|
1203
|
-
}
|
|
1204
|
-
getLabel(attr, value) {
|
|
1205
|
-
const attributeMap = getAttributeMap();
|
|
1206
|
-
const { label } = attributeMap[attr];
|
|
1207
|
-
const translatedTypeLabel = translate(label);
|
|
1208
|
-
const censoredAttributeValue = censorContactMethod(label, value);
|
|
1209
|
-
return `${translatedTypeLabel}: ${censoredAttributeValue}`;
|
|
1210
|
-
}
|
|
1211
|
-
onInput(event) {
|
|
1212
|
-
event.preventDefault();
|
|
1213
|
-
const { name, value } = event.target;
|
|
1214
|
-
this.authenticator.updateForm({ name, value });
|
|
1215
|
-
}
|
|
1216
|
-
onSubmit(event) {
|
|
1217
|
-
event.preventDefault();
|
|
1218
|
-
this.authenticator.submitForm(getFormDataFromEvent(event));
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
VerifyUserComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, deps: [{ token: AuthenticatorService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1222
|
-
VerifyUserComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: { headerText: "headerText" }, host: { properties: { "attr.data-amplify-authenticator-verifyuser": "this.dataAttr" } }, ngImport: i0, 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 unverifiedUserAttribute of unverifiedUserAttributes | keyvalue\n let i = index;\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedUserAttribute.key\"\n [id]=\"labelId\"\n [checked]=\"i === 0\"\n />\n <label [for]=\"labelId\">{{\n getLabel(unverifiedUserAttribute.key, unverifiedUserAttribute.value)\n }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ verifyText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"verify-user-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ButtonComponent, selector: "button[amplify-button]", inputs: ["type", "fullWidth", "isDisabled", "size", "variation", "fontWeight"] }, { kind: "component", type: ErrorComponent, selector: "amplify-error" }, { kind: "pipe", type: i2.KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None });
|
|
1223
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: VerifyUserComponent, decorators: [{
|
|
1224
|
-
type: Component,
|
|
1225
|
-
args: [{ selector: 'amplify-verify-user', encapsulation: ViewEncapsulation.None, 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 unverifiedUserAttribute of unverifiedUserAttributes | keyvalue\n let i = index;\n \"\n >\n <input\n name=\"unverifiedAttr\"\n type=\"radio\"\n [value]=\"unverifiedUserAttribute.key\"\n [id]=\"labelId\"\n [checked]=\"i === 0\"\n />\n <label [for]=\"labelId\">{{\n getLabel(unverifiedUserAttribute.key, unverifiedUserAttribute.value)\n }}</label>\n </div>\n\n <button\n amplify-button\n variation=\"primary\"\n fullWidth=\"true\"\n type=\"submit\"\n [isDisabled]=\"authenticator.isPending\"\n >\n {{ verifyText }}\n </button>\n\n <button\n amplify-button\n size=\"small\"\n variation=\"link\"\n fontWeight=\"normal\"\n fullWidth=\"true\"\n (click)=\"authenticator.skipVerification()\"\n >\n {{ skipText }}\n </button>\n\n <amplify-error *ngIf=\"authenticator.error\">\n {{ authenticator.error }}\n </amplify-error>\n </fieldset>\n <amplify-slot name=\"verify-user-footer\" [context]=\"context\"> </amplify-slot>\n</form>\n" }]
|
|
1226
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }]; }, propDecorators: { dataAttr: [{
|
|
1227
|
-
type: HostBinding,
|
|
1228
|
-
args: ['attr.data-amplify-authenticator-verifyuser']
|
|
1229
|
-
}], headerText: [{
|
|
1230
|
-
type: Input
|
|
1231
|
-
}] } });
|
|
1232
|
-
|
|
1233
|
-
const { getSignInTabText, getSignUpTabText } = authenticatorTextUtil;
|
|
1234
|
-
class AuthenticatorComponent {
|
|
1235
|
-
constructor(authenticator, contextService, changeDetector) {
|
|
1236
|
-
this.authenticator = authenticator;
|
|
1237
|
-
this.contextService = contextService;
|
|
1238
|
-
this.changeDetector = changeDetector;
|
|
1239
|
-
this.customComponentQuery = null;
|
|
1240
|
-
// translated texts
|
|
1241
|
-
this.signInTitle = getSignInTabText();
|
|
1242
|
-
this.signUpTitle = getSignUpTabText();
|
|
1243
|
-
this.hasInitialized = false;
|
|
1244
|
-
this.isHandlingHubEvent = false;
|
|
1245
|
-
}
|
|
1246
|
-
// context passed to "authenticated" slot
|
|
1247
|
-
get context() {
|
|
1248
|
-
return this.authenticator.slotContext;
|
|
1249
|
-
}
|
|
1250
|
-
get route() {
|
|
1251
|
-
return this.authenticator.route;
|
|
1252
|
-
}
|
|
1253
|
-
ngOnInit() {
|
|
1254
|
-
const { initialState, loginMechanisms, services, signUpAttributes, socialProviders, formFields, } = this;
|
|
1255
|
-
this.clearUserAgent = setUserAgent({
|
|
1256
|
-
componentName: 'Authenticator',
|
|
1257
|
-
packageName: 'angular',
|
|
1258
|
-
version: VERSION,
|
|
1259
|
-
});
|
|
1260
|
-
const { initializeMachine } = this.authenticator;
|
|
1261
|
-
this.authenticator.hubSubject.subscribe(() => {
|
|
1262
|
-
/*
|
|
1263
|
-
* Hub events aren't properly caught by Angular, because they are
|
|
1264
|
-
* synchronous events. Angular tracks async network events and
|
|
1265
|
-
* html events, but not synchronous events like hub.
|
|
1266
|
-
*
|
|
1267
|
-
* On any notable hub events, we run change detection manually.
|
|
1268
|
-
*/
|
|
1269
|
-
this.changeDetector.detectChanges();
|
|
1270
|
-
/*
|
|
1271
|
-
* Hub events that we handle can lead to multiple state changes:
|
|
1272
|
-
* e.g. `authenticated` -> `signOut` -> initialState.
|
|
1273
|
-
*
|
|
1274
|
-
* We want to ensure change detection runs all the way, until
|
|
1275
|
-
* we reach back to the initial state. Setting the below flag
|
|
1276
|
-
* to true to until we reach initial state.
|
|
1277
|
-
*/
|
|
1278
|
-
this.isHandlingHubEvent = true;
|
|
1279
|
-
});
|
|
1280
|
-
/**
|
|
1281
|
-
* Subscribes to state machine changes and sends INIT event
|
|
1282
|
-
* once machine reaches 'setup' state.
|
|
1283
|
-
*/
|
|
1284
|
-
this.unsubscribeMachine = this.authenticator.subscribe(() => {
|
|
1285
|
-
const { route } = this.authenticator;
|
|
1286
|
-
if (this.isHandlingHubEvent) {
|
|
1287
|
-
this.changeDetector.detectChanges();
|
|
1288
|
-
const initialStateWithDefault = initialState !== null && initialState !== void 0 ? initialState : 'signIn';
|
|
1289
|
-
// We can stop manual change detection if we're back to the initial state
|
|
1290
|
-
if (route === initialStateWithDefault) {
|
|
1291
|
-
this.isHandlingHubEvent = false;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
if (!this.hasInitialized && route === 'setup') {
|
|
1295
|
-
initializeMachine({
|
|
1296
|
-
initialState,
|
|
1297
|
-
loginMechanisms,
|
|
1298
|
-
services,
|
|
1299
|
-
signUpAttributes,
|
|
1300
|
-
socialProviders,
|
|
1301
|
-
formFields,
|
|
1302
|
-
});
|
|
1303
|
-
this.hasInitialized = true;
|
|
1304
|
-
}
|
|
1305
|
-
}).unsubscribe;
|
|
1306
|
-
/**
|
|
1307
|
-
* handling translations after content init, because authenticator and its
|
|
1308
|
-
* translations might be initialized before the main app's `ngOnInit` is run.
|
|
1309
|
-
*/
|
|
1310
|
-
this.signInTitle = getSignInTabText();
|
|
1311
|
-
this.signUpTitle = getSignUpTabText();
|
|
1312
|
-
}
|
|
1313
|
-
/**
|
|
1314
|
-
* Lifecycle Methods
|
|
1315
|
-
*/
|
|
1316
|
-
ngAfterContentInit() {
|
|
1317
|
-
this.contextService.customComponents = this.mapCustomComponents(this.customComponentQuery);
|
|
1318
|
-
}
|
|
1319
|
-
ngOnDestroy() {
|
|
1320
|
-
this.clearUserAgent();
|
|
1321
|
-
if (this.unsubscribeMachine)
|
|
1322
|
-
this.unsubscribeMachine();
|
|
1323
|
-
}
|
|
1324
|
-
/**
|
|
1325
|
-
* Class Functions
|
|
1326
|
-
*/
|
|
1327
|
-
onTabChange() {
|
|
1328
|
-
const { route } = this.authenticator;
|
|
1329
|
-
if (route === 'signIn') {
|
|
1330
|
-
this.authenticator.toSignUp();
|
|
1331
|
-
}
|
|
1332
|
-
else {
|
|
1333
|
-
this.authenticator.toSignIn();
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
hasTabs() {
|
|
1337
|
-
const { route } = this.authenticator;
|
|
1338
|
-
return route === 'signIn' || route === 'signUp';
|
|
1339
|
-
}
|
|
1340
|
-
hasRouteComponent() {
|
|
1341
|
-
const { route } = this.authenticator;
|
|
1342
|
-
switch (route) {
|
|
1343
|
-
case 'authenticated':
|
|
1344
|
-
case 'idle':
|
|
1345
|
-
case 'setup':
|
|
1346
|
-
case 'signOut':
|
|
1347
|
-
case 'transition':
|
|
1348
|
-
return false;
|
|
1349
|
-
default:
|
|
1350
|
-
return true;
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
mapCustomComponents(componentQuery) {
|
|
1354
|
-
if (!componentQuery)
|
|
1355
|
-
return {};
|
|
1356
|
-
const customComponents = {};
|
|
1357
|
-
componentQuery.forEach((component) => {
|
|
1358
|
-
customComponents[component.name] = component.template;
|
|
1359
|
-
});
|
|
1360
|
-
return customComponents;
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
AuthenticatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, deps: [{ token: AuthenticatorService }, { token: CustomComponentsService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1364
|
-
AuthenticatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot\n name=\"header\"\n [context]=\"context\"\n ></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 <!-- forgotPassword content -->\n <amplify-slot\n name=\"forgot-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forgotPassword'\"\n >\n <amplify-forgot-password></amplify-forgot-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\n <!-- selectMfaType content -->\n <amplify-slot\n name=\"select-mfa-type\"\n [context]=\"context\"\n *ngIf=\"route === 'selectMfaType'\"\n >\n <amplify-select-mfa-type></amplify-select-mfa-type>\n </amplify-slot>\n\n <!-- setupEmail content -->\n <amplify-slot\n name=\"setup-email\"\n [context]=\"context\"\n *ngIf=\"route === 'setupEmail'\"\n >\n <amplify-setup-email></amplify-setup-email>\n </amplify-slot>\n </div>\n\n <amplify-slot\n name=\"footer\"\n [context]=\"context\"\n ></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>", dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: AmplifySlotComponent, selector: "amplify-slot", inputs: ["name", "context"] }, { kind: "component", type: ConfirmResetPasswordComponent, selector: "amplify-confirm-reset-password", inputs: ["headerText"] }, { kind: "component", type: ConfirmSignInComponent, selector: "amplify-confirm-sign-in" }, { kind: "component", type: ConfirmSignUpComponent, selector: "amplify-confirm-sign-up" }, { kind: "component", type: ConfirmVerifyUserComponent, selector: "amplify-confirm-verify-user", inputs: ["headerText"] }, { kind: "component", type: ForceNewPasswordComponent, selector: "amplify-force-new-password", inputs: ["headerText"] }, { kind: "component", type: ForgotPasswordComponent, selector: "amplify-forgot-password", inputs: ["headerText"] }, { kind: "component", type: SelectMfaTypeComponent, selector: "amplify-select-mfa-type" }, { kind: "component", type: SetupEmailComponent, selector: "amplify-setup-email" }, { kind: "component", type: SetupTotpComponent, selector: "amplify-setup-totp" }, { kind: "component", type: SignInComponent, selector: "amplify-sign-in" }, { kind: "component", type: SignUpComponent, selector: "amplify-sign-up" }, { kind: "component", type: TabItemComponent, selector: "amplify-tab-item", inputs: ["title", "active", "id", "labelledById", "tabIndex"] }, { kind: "component", type: TabsComponent, selector: "amplify-tabs", outputs: ["tabChange"] }, { kind: "component", type: VerifyUserComponent, selector: "amplify-verify-user", inputs: ["headerText"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AuthenticatorComponent, decorators: [{
|
|
1366
|
-
type: Component,
|
|
1367
|
-
args: [{ selector: 'amplify-authenticator', providers: [CustomComponentsService], encapsulation: ViewEncapsulation.None, template: "<div\n data-amplify-authenticator\n [attr.data-variation]=\"variation\"\n *ngIf=\"hasRouteComponent()\"\n>\n <div data-amplify-container>\n <amplify-slot\n name=\"header\"\n [context]=\"context\"\n ></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 <!-- forgotPassword content -->\n <amplify-slot\n name=\"forgot-password\"\n [context]=\"context\"\n *ngIf=\"route === 'forgotPassword'\"\n >\n <amplify-forgot-password></amplify-forgot-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\n <!-- selectMfaType content -->\n <amplify-slot\n name=\"select-mfa-type\"\n [context]=\"context\"\n *ngIf=\"route === 'selectMfaType'\"\n >\n <amplify-select-mfa-type></amplify-select-mfa-type>\n </amplify-slot>\n\n <!-- setupEmail content -->\n <amplify-slot\n name=\"setup-email\"\n [context]=\"context\"\n *ngIf=\"route === 'setupEmail'\"\n >\n <amplify-setup-email></amplify-setup-email>\n </amplify-slot>\n </div>\n\n <amplify-slot\n name=\"footer\"\n [context]=\"context\"\n ></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>" }]
|
|
1368
|
-
}], ctorParameters: function () { return [{ type: AuthenticatorService }, { type: CustomComponentsService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { formFields: [{
|
|
1369
|
-
type: Input
|
|
1370
|
-
}], initialState: [{
|
|
1371
|
-
type: Input
|
|
1372
|
-
}], loginMechanisms: [{
|
|
1373
|
-
type: Input
|
|
1374
|
-
}], services: [{
|
|
1375
|
-
type: Input
|
|
1376
|
-
}], signUpAttributes: [{
|
|
1377
|
-
type: Input
|
|
1378
|
-
}], socialProviders: [{
|
|
1379
|
-
type: Input
|
|
1380
|
-
}], variation: [{
|
|
1381
|
-
type: Input
|
|
1382
|
-
}], hideSignUp: [{
|
|
1383
|
-
type: Input
|
|
1384
|
-
}], customComponentQuery: [{
|
|
1385
|
-
type: ContentChildren,
|
|
1386
|
-
args: [AmplifySlotDirective]
|
|
1387
|
-
}] } });
|
|
1388
|
-
|
|
1389
|
-
class CheckboxComponent {
|
|
1390
|
-
constructor() {
|
|
1391
|
-
this.defaultChecked = false;
|
|
1392
|
-
this.hasError = false;
|
|
1393
|
-
this.isChecked = false;
|
|
1394
|
-
}
|
|
1395
|
-
ngOnInit() {
|
|
1396
|
-
if (this.defaultChecked) {
|
|
1397
|
-
this.isChecked = true;
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
handleClick() {
|
|
1401
|
-
this.isChecked = !this.isChecked;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1405
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CheckboxComponent, selector: "amplify-checkbox", inputs: { defaultChecked: "defaultChecked", errorMessage: "errorMessage", hasError: "hasError", label: "label", name: "name", value: "value" }, ngImport: i0, 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", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
1407
|
-
type: Component,
|
|
1408
|
-
args: [{ selector: 'amplify-checkbox', 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" }]
|
|
1409
|
-
}], propDecorators: { defaultChecked: [{
|
|
1410
|
-
type: Input
|
|
1411
|
-
}], errorMessage: [{
|
|
1412
|
-
type: Input
|
|
1413
|
-
}], hasError: [{
|
|
1414
|
-
type: Input
|
|
1415
|
-
}], label: [{
|
|
1416
|
-
type: Input
|
|
1417
|
-
}], name: [{
|
|
1418
|
-
type: Input
|
|
1419
|
-
}], value: [{
|
|
1420
|
-
type: Input
|
|
1421
|
-
}] } });
|
|
1422
|
-
|
|
1423
|
-
class AmplifyAuthenticatorModule {
|
|
1424
|
-
}
|
|
1425
|
-
AmplifyAuthenticatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1426
|
-
AmplifyAuthenticatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, declarations: [AmplifySlotComponent,
|
|
1427
|
-
AmplifySlotDirective,
|
|
1428
|
-
AuthenticatorComponent,
|
|
1429
|
-
BaseFormFieldsComponent,
|
|
1430
|
-
ButtonComponent,
|
|
1431
|
-
CheckboxComponent,
|
|
1432
|
-
ConfirmResetPasswordComponent,
|
|
1433
|
-
ConfirmSignInComponent,
|
|
1434
|
-
ConfirmSignUpComponent,
|
|
1435
|
-
ConfirmVerifyUserComponent,
|
|
1436
|
-
ErrorComponent,
|
|
1437
|
-
FederatedSignInButtonComponent,
|
|
1438
|
-
FederatedSignInComponent,
|
|
1439
|
-
ForceNewPasswordComponent,
|
|
1440
|
-
ForceNewPasswordFormFieldsComponent,
|
|
1441
|
-
FormFieldComponent,
|
|
1442
|
-
PasswordFieldComponent,
|
|
1443
|
-
PhoneNumberFieldComponent,
|
|
1444
|
-
ForgotPasswordComponent,
|
|
1445
|
-
SelectComponent,
|
|
1446
|
-
SelectMfaTypeComponent,
|
|
1447
|
-
SetupEmailComponent,
|
|
1448
|
-
SetupTotpComponent,
|
|
1449
|
-
SignInComponent,
|
|
1450
|
-
SignUpComponent,
|
|
1451
|
-
SignUpFormFieldsComponent,
|
|
1452
|
-
TabItemComponent,
|
|
1453
|
-
TabsComponent,
|
|
1454
|
-
TextFieldComponent,
|
|
1455
|
-
VerifyUserComponent], imports: [CommonModule], exports: [AmplifySlotDirective,
|
|
1456
|
-
AuthenticatorComponent,
|
|
1457
|
-
CheckboxComponent,
|
|
1458
|
-
SignUpFormFieldsComponent,
|
|
1459
|
-
ForceNewPasswordFormFieldsComponent,
|
|
1460
|
-
TextFieldComponent] });
|
|
1461
|
-
AmplifyAuthenticatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, imports: [CommonModule] });
|
|
1462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: AmplifyAuthenticatorModule, decorators: [{
|
|
1463
|
-
type: NgModule,
|
|
1464
|
-
args: [{
|
|
1465
|
-
declarations: [
|
|
1466
|
-
AmplifySlotComponent,
|
|
1467
|
-
AmplifySlotDirective,
|
|
1468
|
-
AuthenticatorComponent,
|
|
1469
|
-
BaseFormFieldsComponent,
|
|
1470
|
-
ButtonComponent,
|
|
1471
|
-
CheckboxComponent,
|
|
1472
|
-
ConfirmResetPasswordComponent,
|
|
1473
|
-
ConfirmSignInComponent,
|
|
1474
|
-
ConfirmSignUpComponent,
|
|
1475
|
-
ConfirmVerifyUserComponent,
|
|
1476
|
-
ErrorComponent,
|
|
1477
|
-
FederatedSignInButtonComponent,
|
|
1478
|
-
FederatedSignInComponent,
|
|
1479
|
-
ForceNewPasswordComponent,
|
|
1480
|
-
ForceNewPasswordFormFieldsComponent,
|
|
1481
|
-
FormFieldComponent,
|
|
1482
|
-
PasswordFieldComponent,
|
|
1483
|
-
PhoneNumberFieldComponent,
|
|
1484
|
-
ForgotPasswordComponent,
|
|
1485
|
-
SelectComponent,
|
|
1486
|
-
SelectMfaTypeComponent,
|
|
1487
|
-
SetupEmailComponent,
|
|
1488
|
-
SetupTotpComponent,
|
|
1489
|
-
SignInComponent,
|
|
1490
|
-
SignUpComponent,
|
|
1491
|
-
SignUpFormFieldsComponent,
|
|
1492
|
-
TabItemComponent,
|
|
1493
|
-
TabsComponent,
|
|
1494
|
-
TextFieldComponent,
|
|
1495
|
-
VerifyUserComponent,
|
|
1496
|
-
],
|
|
1497
|
-
imports: [CommonModule],
|
|
1498
|
-
exports: [
|
|
1499
|
-
AmplifySlotDirective,
|
|
1500
|
-
AuthenticatorComponent,
|
|
1501
|
-
CheckboxComponent,
|
|
1502
|
-
SignUpFormFieldsComponent,
|
|
1503
|
-
ForceNewPasswordFormFieldsComponent,
|
|
1504
|
-
TextFieldComponent,
|
|
1505
|
-
],
|
|
1506
|
-
}]
|
|
1507
|
-
}] });
|
|
1508
|
-
|
|
1509
|
-
/*
|
|
1510
|
-
* Public API Surface of ui-angular
|
|
1511
|
-
*/
|
|
1512
|
-
/**
|
|
1513
|
-
* Modules
|
|
1514
|
-
*/
|
|
1515
|
-
|
|
1516
|
-
/**
|
|
1517
|
-
* Generated bundle index. Do not edit.
|
|
1518
|
-
*/
|
|
1519
|
-
|
|
1520
|
-
export { AmplifyAuthenticatorModule, AmplifySlotDirective, AuthenticatorComponent, AuthenticatorService, BaseFormFieldsComponent, ButtonComponent, CheckboxComponent, ConfirmResetPasswordComponent, ConfirmSignInComponent, ConfirmSignUpComponent, ConfirmVerifyUserComponent, CustomComponentsService, ErrorComponent, FederatedSignInButtonComponent, FederatedSignInComponent, ForceNewPasswordComponent, ForceNewPasswordFormFieldsComponent, ForgotPasswordComponent, FormFieldComponent, PasswordFieldComponent, PhoneNumberFieldComponent, SelectComponent, SetupTotpComponent, SignInComponent, SignUpComponent, SignUpFormFieldsComponent, TabItemComponent, TabsComponent, TextFieldComponent, VerifyUserComponent, getAttributeMap };
|
|
1521
|
-
//# sourceMappingURL=aws-amplify-ui-angular.mjs.map
|