@rolatech/angular-account 20.1.6-beta.5 → 20.1.6-beta.7
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/{rolatech-angular-account-address-add.component-DVeS8sPO.mjs → rolatech-angular-account-address-add.component-B9SKEKyt.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-address-add.component-B9SKEKyt.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-billing.component-DyPQFuES.mjs → rolatech-angular-account-address-billing.component-C215WphF.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-address-billing.component-C215WphF.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-detail.component-CZJq-UqB.mjs → rolatech-angular-account-address-detail.component-C9Mk-YUq.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-address-detail.component-C9Mk-YUq.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-home.component-Djtakfnb.mjs → rolatech-angular-account-address-home.component-43Ji9YSt.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-address-home.component-43Ji9YSt.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-address-shipping.component-Ca7S6fCE.mjs +40 -0
- package/fesm2022/rolatech-angular-account-address-shipping.component-Ca7S6fCE.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-work.component-D7gz0q_p.mjs → rolatech-angular-account-address-work.component-VqNDFGIN.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-address-work.component-VqNDFGIN.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address.routes-BdCcECYB.mjs → rolatech-angular-account-address.routes-Cu4mkO2W.mjs} +7 -7
- package/fesm2022/rolatech-angular-account-address.routes-Cu4mkO2W.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-email-verification.component-DvtDSIjI.mjs → rolatech-angular-account-email-verification.component-DxiQzxW3.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-email-verification.component-DxiQzxW3.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-email.component-BynqqKKU.mjs +44 -0
- package/fesm2022/rolatech-angular-account-email.component-BynqqKKU.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-gender.component-Crfnpf9z.mjs → rolatech-angular-account-gender.component-FNEDW0nR.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-gender.component-FNEDW0nR.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-home.component-BpIaDfkX.mjs +23 -0
- package/fesm2022/rolatech-angular-account-home.component-BpIaDfkX.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-info.component-D5V48qZ4.mjs → rolatech-angular-account-info.component-CQJCmE6-.mjs} +8 -8
- package/fesm2022/rolatech-angular-account-info.component-CQJCmE6-.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-phone.component-DhwsgCt7.mjs → rolatech-angular-account-phone.component-BJNSuDg7.mjs} +4 -4
- package/fesm2022/rolatech-angular-account-phone.component-BJNSuDg7.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-profile.component-DnayEoq7.mjs +43 -0
- package/fesm2022/rolatech-angular-account-profile.component-DnayEoq7.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-security.routes-DVE08AOh.mjs → rolatech-angular-account-security.routes-B1JSrouK.mjs} +11 -11
- package/fesm2022/rolatech-angular-account-security.routes-B1JSrouK.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-user-CJa0pCxF.mjs.map +1 -1
- package/fesm2022/rolatech-angular-account-username.component-DpNlhAWc.mjs +42 -0
- package/fesm2022/rolatech-angular-account-username.component-DpNlhAWc.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account.mjs +119 -59
- package/fesm2022/rolatech-angular-account.mjs.map +1 -1
- package/package.json +6 -6
- package/fesm2022/rolatech-angular-account-address-add.component-DVeS8sPO.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-billing.component-DyPQFuES.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-detail.component-CZJq-UqB.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-home.component-Djtakfnb.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-shipping.component-Di2l28kV.mjs +0 -40
- package/fesm2022/rolatech-angular-account-address-shipping.component-Di2l28kV.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-work.component-D7gz0q_p.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address.routes-BdCcECYB.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-email-verification.component-DvtDSIjI.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-email.component-MuBe6xXF.mjs +0 -44
- package/fesm2022/rolatech-angular-account-email.component-MuBe6xXF.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-gender.component-Crfnpf9z.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-home.component-Bwcb7J1X.mjs +0 -23
- package/fesm2022/rolatech-angular-account-home.component-Bwcb7J1X.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-info.component-D5V48qZ4.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-phone.component-DhwsgCt7.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-profile.component-M-qA9CUM.mjs +0 -43
- package/fesm2022/rolatech-angular-account-profile.component-M-qA9CUM.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-security.routes-DVE08AOh.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-username.component-Q_8wrqQW.mjs +0 -42
- package/fesm2022/rolatech-angular-account-username.component-Q_8wrqQW.mjs.map +0 -1
|
@@ -10,10 +10,11 @@ import { AuthService, AUTH_METHODS, AuthMethod, AuthUserService, AuthGuard, Unau
|
|
|
10
10
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
11
11
|
import { AngularComponentsModule, BaseComponent, TabsComponent, TabComponent } from '@rolatech/angular-components';
|
|
12
12
|
import * as i1 from '@angular/forms';
|
|
13
|
-
import { FormBuilder, Validators } from '@angular/forms';
|
|
13
|
+
import { FormBuilder, Validators, FormsModule } from '@angular/forms';
|
|
14
14
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
15
15
|
import * as i3 from '@angular/material/form-field';
|
|
16
16
|
import * as i4 from '@angular/material/input';
|
|
17
|
+
import { MatInputModule } from '@angular/material/input';
|
|
17
18
|
|
|
18
19
|
class TopbarLoginComponent {
|
|
19
20
|
constructor() {
|
|
@@ -75,24 +76,13 @@ class TopbarLoginComponent {
|
|
|
75
76
|
const urlSegment = url.split('/').join('');
|
|
76
77
|
return path === urlSegment;
|
|
77
78
|
}
|
|
78
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
79
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TopbarLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
80
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.12", type: TopbarLoginComponent, isStandalone: true, selector: "rolatech-account-topbar-login", inputs: { service: { classPropertyName: "service", publicName: "service", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"flex items-center\">\n <a mat-stroked-button class=\"mr-2 max-h-9 md:max-h-10\" [href]=\"signinUrl\"><span i18n>Sign in</span></a>\n <a mat-flat-button class=\"max-h-9 md:max-h-10\" [href]=\"signupUrl\"><span i18n>Sign up</span></a>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
80
81
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TopbarLoginComponent, decorators: [{
|
|
82
83
|
type: Component,
|
|
83
84
|
args: [{ selector: 'rolatech-account-topbar-login', imports: [CommonModule, MatButtonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex items-center\">\n <a mat-stroked-button class=\"mr-2 max-h-9 md:max-h-10\" [href]=\"signinUrl\"><span i18n>Sign in</span></a>\n <a mat-flat-button class=\"max-h-9 md:max-h-10\" [href]=\"signupUrl\"><span i18n>Sign up</span></a>\n</div>\n" }]
|
|
84
|
-
}] });
|
|
85
|
-
|
|
86
|
-
class ForgotPasswordComponent {
|
|
87
|
-
constructor() { }
|
|
88
|
-
ngOnInit() { }
|
|
89
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
90
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: ForgotPasswordComponent, isStandalone: true, selector: "rolatech-account-forgot-password", ngImport: i0, template: "<p>forgot-password works!</p>\n", styles: [""] }); }
|
|
91
|
-
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
|
|
93
|
-
type: Component,
|
|
94
|
-
args: [{ selector: 'rolatech-account-forgot-password', template: "<p>forgot-password works!</p>\n" }]
|
|
95
|
-
}], ctorParameters: () => [] });
|
|
85
|
+
}], propDecorators: { service: [{ type: i0.Input, args: [{ isSignal: true, alias: "service", required: false }] }] } });
|
|
96
86
|
|
|
97
87
|
class LogoutComponent {
|
|
98
88
|
constructor() {
|
|
@@ -127,34 +117,23 @@ class LogoutComponent {
|
|
|
127
117
|
},
|
|
128
118
|
});
|
|
129
119
|
}
|
|
130
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
131
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
120
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
121
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: LogoutComponent, isStandalone: true, selector: "rolatech-account-logout", ngImport: i0, template: "<p>Please waiting...</p>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
|
|
132
122
|
}
|
|
133
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LogoutComponent, decorators: [{
|
|
134
124
|
type: Component,
|
|
135
125
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-logout', template: "<p>Please waiting...</p>\n" }]
|
|
136
126
|
}] });
|
|
137
127
|
|
|
138
|
-
class PasswordresetComponent {
|
|
139
|
-
constructor() { }
|
|
140
|
-
ngOnInit() { }
|
|
141
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PasswordresetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
142
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: PasswordresetComponent, isStandalone: true, selector: "rolatech-account-passwordreset", ngImport: i0, template: "<p>passwordreset works!</p>\n", styles: [""] }); }
|
|
143
|
-
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PasswordresetComponent, decorators: [{
|
|
145
|
-
type: Component,
|
|
146
|
-
args: [{ selector: 'rolatech-account-passwordreset', template: "<p>passwordreset works!</p>\n" }]
|
|
147
|
-
}], ctorParameters: () => [] });
|
|
148
|
-
|
|
149
128
|
class WeChatLoginService {
|
|
150
129
|
constructor() {
|
|
151
130
|
this.onWeChatLogin = new EventEmitter();
|
|
152
131
|
}
|
|
153
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
154
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
155
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
132
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WeChatLoginService, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
133
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.12", type: WeChatLoginService, isStandalone: true, ngImport: i0 }); }
|
|
134
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WeChatLoginService, providedIn: 'root' }); }
|
|
156
135
|
}
|
|
157
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
136
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: WeChatLoginService, decorators: [{
|
|
158
137
|
type: Injectable,
|
|
159
138
|
args: [{
|
|
160
139
|
providedIn: 'root',
|
|
@@ -189,6 +168,7 @@ class SigninComponent extends BaseComponent {
|
|
|
189
168
|
this.sanitizer = inject(DomSanitizer);
|
|
190
169
|
this.continue = '';
|
|
191
170
|
this.signUpUrl = '';
|
|
171
|
+
this.forGotUrl = '';
|
|
192
172
|
this.tabIndex = signal(0, ...(ngDevMode ? [{ debugName: "tabIndex" }] : []));
|
|
193
173
|
this.countDown = false;
|
|
194
174
|
this.countDownTime = 60;
|
|
@@ -239,6 +219,7 @@ class SigninComponent extends BaseComponent {
|
|
|
239
219
|
this.continue = params['continue'] || '/'; // Default to home if no continue param
|
|
240
220
|
const decodedUrl = decodeURIComponent(this.continue);
|
|
241
221
|
this.signUpUrl = this.continue ? `signup?continue=${decodedUrl}` : 'signup';
|
|
222
|
+
this.forGotUrl = 'signin/forgot';
|
|
242
223
|
});
|
|
243
224
|
// this.continue = this.route.snapshot.queryParams['continue'];
|
|
244
225
|
// if (this.continue) {
|
|
@@ -314,12 +295,12 @@ class SigninComponent extends BaseComponent {
|
|
|
314
295
|
const src = `${this.baseUrl}?appid=${this.appid}&response_type=code&self_redirect=true&scope=snsapi_login&stylelite=1&redirect_uri=${encodedURI}&state=${this.state}#wechat_redirect`;
|
|
315
296
|
this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(src);
|
|
316
297
|
}
|
|
317
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
318
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SigninComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
299
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: SigninComponent, isStandalone: true, selector: "rolatech-account-signin", host: { listeners: { "window:message": "onLogin($event)" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n\n <div class=\"flex flex-col justify-between lg:w-1/2\">\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Sign in</div>\n <div class=\"text-md ml-2\" i18n>Use your {{ environment.name }} Account</div>\n </div>\n <!-- <div>\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"forGotUrl\" i18n>Forgot?</a>\n </div> -->\n </div>\n <div class=\"lg:w-1/2\">\n <rolatech-tabs [(select)]=\"tabIndex\">\n @if (hasPassword) {\n <rolatech-tab label=\"Password\"></rolatech-tab>\n }\n @if (hasOTP) {\n <rolatech-tab label=\"OTP\"></rolatech-tab>\n }\n @if (hasWeChat) {\n <rolatech-tab label=\"WeChat\"></rolatech-tab>\n }\n </rolatech-tabs>\n <!-- content -->\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n @if (tabIndex() === 0) {\n <form [formGroup]=\"passrodForm\" class=\"flex flex-col\">\n @if (hasPassword) {\n <mat-form-field>\n <mat-label i18n> Email/Username </mat-label>\n <input matInput formControlName=\"account\" required />\n @if (passrodForm.controls['account'].touched && passrodForm.controls['account'].invalid) {\n <mat-error>\n @if (passrodForm.controls['account'].errors?.['required']) {\n <span i18n>Email is required</span>\n }\n @if (passrodForm.controls['account'].errors?.['pattern']) {\n <span i18n>Invalid email</span>\n }\n </mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field>\n <mat-label i18n> Password </mat-label>\n <input autocomplete matInput formControlName=\"password\" type=\"password\" />\n @if (passrodForm.controls['password'].touched && passrodForm.controls['password'].invalid) {\n <mat-error>\n @if (passrodForm.controls['password'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (passrodForm.controls['password'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </form>\n }\n @if (tabIndex() === 1) {\n <form [formGroup]=\"codeForm\" class=\"flex flex-col\">\n @if (hasOTP) {\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input autocomplete matInput formControlName=\"phone\" required />\n @if (codeForm.controls['phone'].touched && codeForm.controls['phone'].invalid) {\n <mat-error>\n @if (codeForm.controls['phone'].errors?.['required']) {\n <span i18n> Phone required</span>\n }\n @if (codeForm.controls['phone'].errors?.['pattern']) {\n <span i18n> Phone invalid </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <div class=\"flex justify-between items-center\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Code </mat-label>\n <input matInput formControlName=\"code\" required />\n @if (codeForm.controls['code'].touched && codeForm.controls['code'].invalid) {\n <mat-error>\n @if (codeForm.controls['code'].errors?.['required']) {\n <span i18n>Code required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button\n mat-flat-button\n (click)=\"sendSMSCode()\"\n [disabled]=\"countDown\"\n class=\"max-w-[128px] text-white text-center\"\n >\n <span i18n>{{ showButtonText }}</span>\n </button>\n </div>\n }\n </form>\n }\n @if (tabIndex() === 2) {\n <div class=\"w-[190px] h-[190px] ml-[56px]\">\n <iframe [src]=\"urlSafe\" class=\"w-full h-full inline\" scrolling=\"no\" frameBorder=\"no\" #iframe></iframe>\n </div>\n }\n </div>\n <!-- actions -->\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signUpUrl\" i18n>Create account</a>\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"forGotUrl\" i18n>Forgot?</a>\n <button mat-flat-button (click)=\"login()\" class=\"w-[128px]\" i18n>Sign in</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-signin{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-signin{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: TabsComponent, selector: "rolatech-tabs", inputs: ["select", "loading"], outputs: ["selectChange"] }, { kind: "component", type: TabComponent, selector: "rolatech-tab", inputs: ["label"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
319
300
|
}
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SigninComponent, decorators: [{
|
|
321
302
|
type: Component,
|
|
322
|
-
args: [{ imports: [AngularCommonModule, AngularComponentsModule, TabsComponent, TabComponent], selector: 'rolatech-account-signin', encapsulation: ViewEncapsulation.None, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[
|
|
303
|
+
args: [{ imports: [AngularCommonModule, AngularComponentsModule, TabsComponent, TabComponent], selector: 'rolatech-account-signin', encapsulation: ViewEncapsulation.None, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n\n <div class=\"flex flex-col justify-between lg:w-1/2\">\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Sign in</div>\n <div class=\"text-md ml-2\" i18n>Use your {{ environment.name }} Account</div>\n </div>\n <!-- <div>\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"forGotUrl\" i18n>Forgot?</a>\n </div> -->\n </div>\n <div class=\"lg:w-1/2\">\n <rolatech-tabs [(select)]=\"tabIndex\">\n @if (hasPassword) {\n <rolatech-tab label=\"Password\"></rolatech-tab>\n }\n @if (hasOTP) {\n <rolatech-tab label=\"OTP\"></rolatech-tab>\n }\n @if (hasWeChat) {\n <rolatech-tab label=\"WeChat\"></rolatech-tab>\n }\n </rolatech-tabs>\n <!-- content -->\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n @if (tabIndex() === 0) {\n <form [formGroup]=\"passrodForm\" class=\"flex flex-col\">\n @if (hasPassword) {\n <mat-form-field>\n <mat-label i18n> Email/Username </mat-label>\n <input matInput formControlName=\"account\" required />\n @if (passrodForm.controls['account'].touched && passrodForm.controls['account'].invalid) {\n <mat-error>\n @if (passrodForm.controls['account'].errors?.['required']) {\n <span i18n>Email is required</span>\n }\n @if (passrodForm.controls['account'].errors?.['pattern']) {\n <span i18n>Invalid email</span>\n }\n </mat-error>\n }\n </mat-form-field>\n }\n <mat-form-field>\n <mat-label i18n> Password </mat-label>\n <input autocomplete matInput formControlName=\"password\" type=\"password\" />\n @if (passrodForm.controls['password'].touched && passrodForm.controls['password'].invalid) {\n <mat-error>\n @if (passrodForm.controls['password'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (passrodForm.controls['password'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </form>\n }\n @if (tabIndex() === 1) {\n <form [formGroup]=\"codeForm\" class=\"flex flex-col\">\n @if (hasOTP) {\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input autocomplete matInput formControlName=\"phone\" required />\n @if (codeForm.controls['phone'].touched && codeForm.controls['phone'].invalid) {\n <mat-error>\n @if (codeForm.controls['phone'].errors?.['required']) {\n <span i18n> Phone required</span>\n }\n @if (codeForm.controls['phone'].errors?.['pattern']) {\n <span i18n> Phone invalid </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <div class=\"flex justify-between items-center\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Code </mat-label>\n <input matInput formControlName=\"code\" required />\n @if (codeForm.controls['code'].touched && codeForm.controls['code'].invalid) {\n <mat-error>\n @if (codeForm.controls['code'].errors?.['required']) {\n <span i18n>Code required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button\n mat-flat-button\n (click)=\"sendSMSCode()\"\n [disabled]=\"countDown\"\n class=\"max-w-[128px] text-white text-center\"\n >\n <span i18n>{{ showButtonText }}</span>\n </button>\n </div>\n }\n </form>\n }\n @if (tabIndex() === 2) {\n <div class=\"w-[190px] h-[190px] ml-[56px]\">\n <iframe [src]=\"urlSafe\" class=\"w-full h-full inline\" scrolling=\"no\" frameBorder=\"no\" #iframe></iframe>\n </div>\n }\n </div>\n <!-- actions -->\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signUpUrl\" i18n>Create account</a>\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"forGotUrl\" i18n>Forgot?</a>\n <button mat-flat-button (click)=\"login()\" class=\"w-[128px]\" i18n>Sign in</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-signin{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-signin{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}\n"] }]
|
|
323
304
|
}], ctorParameters: () => [], propDecorators: { onLogin: [{
|
|
324
305
|
type: HostListener,
|
|
325
306
|
args: ['window:message', ['$event']]
|
|
@@ -401,12 +382,91 @@ class SignupComponent extends BaseComponent {
|
|
|
401
382
|
},
|
|
402
383
|
});
|
|
403
384
|
}
|
|
404
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
405
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
385
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SignupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
386
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: SignupComponent, isStandalone: true, selector: "rolatech-account-signup", usesInheritance: true, ngImport: i0, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full md:h-auto justify-start md:justify-between p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Create your {{ environment.name }} account</div>\n <div class=\"text-md ml-2\" i18n>Sign up, Get more.</div>\n </div>\n <div class=\"min-w-[320px]\">\n <form [formGroup]=\"signupForm\" (submit)=\"submit()\" class=\"flex flex-col\">\n @if (usePhone) {\n <!-- name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput formControlName=\"name\" required />\n @if (signupForm.controls['name'].touched && signupForm.controls['name'].invalid) {\n <mat-error>\n @if (signupForm.controls['name'].errors?.['required']) {\n <span i18n>Name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput formControlName=\"phone\" required />\n @if (signupForm.controls['phone'].touched && signupForm.controls['phone'].invalid) {\n <mat-error>\n @if (signupForm.controls['phone'].errors?.['required']) {\n <span i18n>Phone is required</span>\n }\n @if (signupForm.controls['phone'].errors?.['pattern']) {\n <span i18n>Invalid Phone </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone code -->\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\" class=\"w-full\">\n <mat-label i18n> Code </mat-label>\n <input matInput type=\"text\" formControlName=\"code\" autocomplete=\"new-password\" required />\n @if (signupForm.controls['code'].touched && signupForm.controls['code'].invalid) {\n <mat-error>\n @if (signupForm.controls['code'].errors?.['required']) {\n <span i18n>Code is required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px] text-white text-center\">\n <span>{{ showButtonText }}</span>\n </button>\n </div>\n }\n <div class=\"flex flex-col md:flex-row gap-3 items-center\">\n <!--First name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Fist name </mat-label>\n <input matInput formControlName=\"firstName\" required />\n @if (signupForm.controls['firstName'].touched && signupForm.controls['firstName'].invalid) {\n <mat-error>\n @if (signupForm.controls['firstName'].errors?.['required']) {\n <span i18n>First name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- Last name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Last name </mat-label>\n <input matInput formControlName=\"lastName\" required />\n @if (signupForm.controls['lastName'].touched && signupForm.controls['lastName'].invalid) {\n <mat-error>\n @if (signupForm.controls['lastName'].errors?.['required']) {\n <span i18n>Last name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </div>\n <!-- Email account -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Email </mat-label>\n <input matInput formControlName=\"email\" required />\n @if (signupForm.controls['email'].touched && signupForm.controls['email'].invalid) {\n <mat-error>\n @if (signupForm.controls['email'].errors?.['required']) {\n <span i18n>Email is required</span>\n }\n @if (signupForm.controls['email'].errors?.['pattern']) {\n <span i18n>Invalid email</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- Password -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput formControlName=\"password\" type=\"password\" autocomplete=\"password\" />\n @if (signupForm.controls['password'].touched && signupForm.controls['password'].invalid) {\n <mat-error>\n @if (signupForm.controls['password'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (signupForm.controls['password'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n\n <!-- password confirm -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput formControlName=\"rePassword\" type=\"password\" autocomplete=\"rePassword\" />\n @if (signupForm.controls['rePassword'].touched && signupForm.controls['rePassword'].invalid) {\n <mat-error>\n @if (signupForm.controls['rePassword'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (signupForm.controls['rePassword'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </form>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a mat-button [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"submit()\" class=\"w-[128px]\" i18n>Sign up</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-signup{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-signup{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
387
|
+
}
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SignupComponent, decorators: [{
|
|
389
|
+
type: Component,
|
|
390
|
+
args: [{ imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-signup', encapsulation: ViewEncapsulation.None, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full md:h-auto justify-start md:justify-between p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Create your {{ environment.name }} account</div>\n <div class=\"text-md ml-2\" i18n>Sign up, Get more.</div>\n </div>\n <div class=\"min-w-[320px]\">\n <form [formGroup]=\"signupForm\" (submit)=\"submit()\" class=\"flex flex-col\">\n @if (usePhone) {\n <!-- name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Name </mat-label>\n <input matInput formControlName=\"name\" required />\n @if (signupForm.controls['name'].touched && signupForm.controls['name'].invalid) {\n <mat-error>\n @if (signupForm.controls['name'].errors?.['required']) {\n <span i18n>Name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput formControlName=\"phone\" required />\n @if (signupForm.controls['phone'].touched && signupForm.controls['phone'].invalid) {\n <mat-error>\n @if (signupForm.controls['phone'].errors?.['required']) {\n <span i18n>Phone is required</span>\n }\n @if (signupForm.controls['phone'].errors?.['pattern']) {\n <span i18n>Invalid Phone </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone code -->\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\" class=\"w-full\">\n <mat-label i18n> Code </mat-label>\n <input matInput type=\"text\" formControlName=\"code\" autocomplete=\"new-password\" required />\n @if (signupForm.controls['code'].touched && signupForm.controls['code'].invalid) {\n <mat-error>\n @if (signupForm.controls['code'].errors?.['required']) {\n <span i18n>Code is required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px] text-white text-center\">\n <span>{{ showButtonText }}</span>\n </button>\n </div>\n }\n <div class=\"flex flex-col md:flex-row gap-3 items-center\">\n <!--First name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Fist name </mat-label>\n <input matInput formControlName=\"firstName\" required />\n @if (signupForm.controls['firstName'].touched && signupForm.controls['firstName'].invalid) {\n <mat-error>\n @if (signupForm.controls['firstName'].errors?.['required']) {\n <span i18n>First name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- Last name -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Last name </mat-label>\n <input matInput formControlName=\"lastName\" required />\n @if (signupForm.controls['lastName'].touched && signupForm.controls['lastName'].invalid) {\n <mat-error>\n @if (signupForm.controls['lastName'].errors?.['required']) {\n <span i18n>Last name required</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </div>\n <!-- Email account -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Email </mat-label>\n <input matInput formControlName=\"email\" required />\n @if (signupForm.controls['email'].touched && signupForm.controls['email'].invalid) {\n <mat-error>\n @if (signupForm.controls['email'].errors?.['required']) {\n <span i18n>Email is required</span>\n }\n @if (signupForm.controls['email'].errors?.['pattern']) {\n <span i18n>Invalid email</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- Password -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput formControlName=\"password\" type=\"password\" autocomplete=\"password\" />\n @if (signupForm.controls['password'].touched && signupForm.controls['password'].invalid) {\n <mat-error>\n @if (signupForm.controls['password'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (signupForm.controls['password'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n\n <!-- password confirm -->\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput formControlName=\"rePassword\" type=\"password\" autocomplete=\"rePassword\" />\n @if (signupForm.controls['rePassword'].touched && signupForm.controls['rePassword'].invalid) {\n <mat-error>\n @if (signupForm.controls['rePassword'].errors?.['required']) {\n <span i18n>Password required</span>\n }\n @if (signupForm.controls['rePassword'].errors?.['minlength']) {\n <span i18n>Password too short</span>\n }\n </mat-error>\n }\n </mat-form-field>\n </form>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a mat-button [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"submit()\" class=\"w-[128px]\" i18n>Sign up</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-signup{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-signup{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"] }]
|
|
391
|
+
}] });
|
|
392
|
+
|
|
393
|
+
class Forgot extends BaseComponent {
|
|
394
|
+
constructor() {
|
|
395
|
+
super(...arguments);
|
|
396
|
+
this.authService = inject(AuthService);
|
|
397
|
+
this.email = '';
|
|
398
|
+
this.signInUrl = '';
|
|
399
|
+
}
|
|
400
|
+
ngOnInit() {
|
|
401
|
+
this.titleService.setTitle('Sign up');
|
|
402
|
+
this.signInUrl = `signin`;
|
|
403
|
+
}
|
|
404
|
+
send() {
|
|
405
|
+
this.authService.requestPasswordReset(this.email).subscribe({
|
|
406
|
+
next: () => {
|
|
407
|
+
this.snackBarService.open('Password reset link sent.');
|
|
408
|
+
},
|
|
409
|
+
error: (error) => {
|
|
410
|
+
this.snackBarService.open(error.message);
|
|
411
|
+
},
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: Forgot, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
415
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: Forgot, isStandalone: true, selector: "rolatech-account-forgot", usesInheritance: true, ngImport: i0, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6 lg:w-1/2 lg:pr-4\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Reset password</div>\n <div class=\"text-md ml-2\" i18n>Enter your email, password reset link will send to this email.</div>\n </div>\n <div class=\"lg:w-1/2 lg:pl-4\">\n <!-- content -->\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Email </mat-label>\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\n </div>\n <!-- actions -->\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <!-- <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signUpUrl\" i18n>Sign in</a> -->\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"send()\" class=\"w-[128px]\" i18n>Send</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-forgot{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-forgot{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
406
416
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: Forgot, decorators: [{
|
|
408
418
|
type: Component,
|
|
409
|
-
args: [{
|
|
419
|
+
args: [{ selector: 'rolatech-account-forgot', imports: [FormsModule, MatInputModule, CommonModule, MatButtonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6 lg:w-1/2 lg:pr-4\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Reset password</div>\n <div class=\"text-md ml-2\" i18n>Enter your email, password reset link will send to this email.</div>\n </div>\n <div class=\"lg:w-1/2 lg:pl-4\">\n <!-- content -->\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Email </mat-label>\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\n </div>\n <!-- actions -->\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <!-- <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signUpUrl\" i18n>Sign in</a> -->\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"send()\" class=\"w-[128px]\" i18n>Send</button>\n </div>\n </div>\n </div>\n</div>\n", styles: ["rolatech-account-forgot{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-forgot{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"] }]
|
|
420
|
+
}] });
|
|
421
|
+
|
|
422
|
+
class PasswordReset extends BaseComponent {
|
|
423
|
+
constructor() {
|
|
424
|
+
super(...arguments);
|
|
425
|
+
this.authService = inject(AuthService);
|
|
426
|
+
this.invalidToken = false;
|
|
427
|
+
this.signInUrl = '';
|
|
428
|
+
this.token = '';
|
|
429
|
+
this.password = '';
|
|
430
|
+
this.newPassword = '';
|
|
431
|
+
}
|
|
432
|
+
ngOnInit() {
|
|
433
|
+
this.titleService.setTitle('Sign up');
|
|
434
|
+
this.signInUrl = `signin`;
|
|
435
|
+
const token = this.route.snapshot.queryParams['token'] ?? undefined;
|
|
436
|
+
if (token) {
|
|
437
|
+
this.authService.validatePasswordRestToken(token).subscribe({
|
|
438
|
+
next: (res) => {
|
|
439
|
+
this.token = token;
|
|
440
|
+
},
|
|
441
|
+
error: (error) => {
|
|
442
|
+
console.log(error);
|
|
443
|
+
this.invalidToken = true;
|
|
444
|
+
},
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
resetPassword() {
|
|
449
|
+
if (this.password !== this.newPassword) {
|
|
450
|
+
this.snackBarService.open('Password not match');
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
if (this.password.length < 8) {
|
|
454
|
+
this.snackBarService.open('Password too weak');
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
this.authService.resetPassword({ token: this.token, newPassword: this.newPassword }).subscribe({
|
|
458
|
+
next: (res) => {
|
|
459
|
+
this.snackBarService.open('Password reset');
|
|
460
|
+
this.router.navigateByUrl('/signin');
|
|
461
|
+
},
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PasswordReset, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
465
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.12", type: PasswordReset, isStandalone: true, selector: "rolatech-account-password-reset", usesInheritance: true, ngImport: i0, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n @if (invalidToken) {\n <div>\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Link invalid or expired</div>\n <div class=\"text-md ml-2\" i18n>\n To reset your password, return to the login page and select \"Forgot?\" to send a new email.\n </div>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n </div>\n </div>\n\n } @else {\n <div class=\"flex flex-col py-6 lg:w-1/2 lg:pr-4\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Reset password</div>\n <div class=\"text-md ml-2\" i18n>Enter your new password.</div>\n </div>\n <div class=\"lg:w-1/2 lg:pl-4\">\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput [(ngModel)]=\"password\" required type=\"password\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput [(ngModel)]=\"newPassword\" required type=\"password\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"resetPassword()\" class=\"w-[128px]\" i18n>Reset</button>\n </div>\n </div>\n }\n </div>\n</div>\n", styles: ["rolatech-account-password-reset{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-password-reset{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
466
|
+
}
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PasswordReset, decorators: [{
|
|
468
|
+
type: Component,
|
|
469
|
+
args: [{ selector: 'rolatech-account-password-reset', imports: [FormsModule, MatInputModule, CommonModule, MatButtonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"h-full flex items-start sm:items-center sm:justify-center\">\n <div\n class=\"w-full h-full justify-start md:h-auto p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row md:justify-between xl:w-[1000px] lg:w-[900px] md:w-[600px]\"\n >\n @if (invalidToken) {\n <div>\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Link invalid or expired</div>\n <div class=\"text-md ml-2\" i18n>\n To reset your password, return to the login page and select \"Forgot?\" to send a new email.\n </div>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n </div>\n </div>\n\n } @else {\n <div class=\"flex flex-col py-6 lg:w-1/2 lg:pr-4\">\n <div class=\"text-3xl font-medium mb-3 ml-2\" i18n>Reset password</div>\n <div class=\"text-md ml-2\" i18n>Enter your new password.</div>\n </div>\n <div class=\"lg:w-1/2 lg:pl-4\">\n <div class=\"pt-6 min-w-[320px] min-h-[214px]\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput [(ngModel)]=\"password\" required type=\"password\" />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Password </mat-label>\n <input matInput [(ngModel)]=\"newPassword\" required type=\"password\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-between items-center py-3 pl-2\">\n <a class=\"underline underline-offset-4 text-sm text-[--rt-brand-color]\" [href]=\"signInUrl\" i18n>Sign in</a>\n <button mat-flat-button (click)=\"resetPassword()\" class=\"w-[128px]\" i18n>Reset</button>\n </div>\n </div>\n }\n </div>\n</div>\n", styles: ["rolatech-account-password-reset{height:100%;color:var(--rt-text-primary, #0f0f0f);background:var(--rt-signin-background)}@media (max-width: 600px){rolatech-account-password-reset{background:var(--rt-signin-inner-background)}}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition:background-color 0s 600000s,color 0s 600000s!important}mat-form-field{width:100%}\n"] }]
|
|
410
470
|
}] });
|
|
411
471
|
|
|
412
472
|
const accountRoutes = [
|
|
@@ -416,19 +476,19 @@ const accountRoutes = [
|
|
|
416
476
|
redirectTo: 'signin',
|
|
417
477
|
},
|
|
418
478
|
{ path: 'signin', canActivate: [AuthGuard], component: SigninComponent, data: { title: 'Signin' } },
|
|
479
|
+
{
|
|
480
|
+
path: 'signin/forgot',
|
|
481
|
+
component: Forgot,
|
|
482
|
+
data: { title: 'Forgot Password' },
|
|
483
|
+
},
|
|
419
484
|
{ path: 'signup', component: SignupComponent, data: { title: 'Signup' } },
|
|
420
485
|
{ path: 'logout', component: LogoutComponent },
|
|
421
486
|
// { path: 'login', loadChildren: () => import('./components/login/login.routes') },
|
|
422
487
|
{
|
|
423
|
-
path: '
|
|
424
|
-
component:
|
|
488
|
+
path: 'reset-password',
|
|
489
|
+
component: PasswordReset,
|
|
425
490
|
data: { title: 'Password Reset' },
|
|
426
491
|
},
|
|
427
|
-
{
|
|
428
|
-
path: 'forgot',
|
|
429
|
-
component: ForgotPasswordComponent,
|
|
430
|
-
data: { title: 'Forgot Password' },
|
|
431
|
-
},
|
|
432
492
|
{
|
|
433
493
|
path: 'unauthorized',
|
|
434
494
|
component: UnauthorizedComponent,
|
|
@@ -442,35 +502,35 @@ const accountRoutes = [
|
|
|
442
502
|
const myaccountRoutes = [
|
|
443
503
|
{
|
|
444
504
|
path: '',
|
|
445
|
-
loadComponent: () => import('./rolatech-angular-account-home.component-
|
|
505
|
+
loadComponent: () => import('./rolatech-angular-account-home.component-BpIaDfkX.mjs').then((c) => c.HomeComponent),
|
|
446
506
|
data: { title: '首页' },
|
|
447
507
|
},
|
|
448
508
|
{
|
|
449
509
|
path: 'personal-info',
|
|
450
|
-
loadComponent: () => import('./rolatech-angular-account-info.component-
|
|
510
|
+
loadComponent: () => import('./rolatech-angular-account-info.component-CQJCmE6-.mjs').then((c) => c.InfoComponent),
|
|
451
511
|
},
|
|
452
512
|
{
|
|
453
513
|
path: 'profile',
|
|
454
|
-
loadComponent: () => import('./rolatech-angular-account-profile.component-
|
|
514
|
+
loadComponent: () => import('./rolatech-angular-account-profile.component-DnayEoq7.mjs').then((c) => c.ProfileComponent),
|
|
455
515
|
},
|
|
456
516
|
{
|
|
457
517
|
path: 'username',
|
|
458
|
-
loadComponent: () => import('./rolatech-angular-account-username.component-
|
|
518
|
+
loadComponent: () => import('./rolatech-angular-account-username.component-DpNlhAWc.mjs').then((c) => c.UsernameComponent),
|
|
459
519
|
},
|
|
460
|
-
{ path: 'gender', loadComponent: () => import('./rolatech-angular-account-gender.component-
|
|
461
|
-
{ path: 'email', loadComponent: () => import('./rolatech-angular-account-email.component-
|
|
520
|
+
{ path: 'gender', loadComponent: () => import('./rolatech-angular-account-gender.component-FNEDW0nR.mjs').then((c) => c.GenderComponent) },
|
|
521
|
+
{ path: 'email', loadComponent: () => import('./rolatech-angular-account-email.component-BynqqKKU.mjs').then((c) => c.EmailComponent) },
|
|
462
522
|
{
|
|
463
523
|
path: 'email-verification/:id',
|
|
464
|
-
loadComponent: () => import('./rolatech-angular-account-email-verification.component-
|
|
524
|
+
loadComponent: () => import('./rolatech-angular-account-email-verification.component-DxiQzxW3.mjs').then((c) => c.EmailVerificationComponent),
|
|
465
525
|
},
|
|
466
|
-
{ path: 'phone', loadComponent: () => import('./rolatech-angular-account-phone.component-
|
|
526
|
+
{ path: 'phone', loadComponent: () => import('./rolatech-angular-account-phone.component-BJNSuDg7.mjs').then((c) => c.PhoneComponent) },
|
|
467
527
|
{
|
|
468
528
|
path: 'address',
|
|
469
|
-
loadChildren: () => import('./rolatech-angular-account-address.routes-
|
|
529
|
+
loadChildren: () => import('./rolatech-angular-account-address.routes-Cu4mkO2W.mjs').then((r) => r.addressRoutes),
|
|
470
530
|
},
|
|
471
531
|
{
|
|
472
532
|
path: 'security',
|
|
473
|
-
loadChildren: () => import('./rolatech-angular-account-security.routes-
|
|
533
|
+
loadChildren: () => import('./rolatech-angular-account-security.routes-B1JSrouK.mjs'),
|
|
474
534
|
data: { title: 'Security' },
|
|
475
535
|
},
|
|
476
536
|
{
|