@rolatech/angular-account 19.0.0-beta.9 → 19.1.0-beta.3

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.
Files changed (106) hide show
  1. package/fesm2022/rolatech-angular-account-address-add.component-wa2bcup4.mjs +36 -0
  2. package/fesm2022/rolatech-angular-account-address-add.component-wa2bcup4.mjs.map +1 -0
  3. package/fesm2022/rolatech-angular-account-address-billing.component-BQez3wKq.mjs +35 -0
  4. package/fesm2022/rolatech-angular-account-address-billing.component-BQez3wKq.mjs.map +1 -0
  5. package/fesm2022/{rolatech-angular-account-address-detail.component-ZOfWc_yz.mjs → rolatech-angular-account-address-detail.component-BLlet9GE.mjs} +6 -6
  6. package/fesm2022/rolatech-angular-account-address-detail.component-BLlet9GE.mjs.map +1 -0
  7. package/fesm2022/{rolatech-angular-account-address-home.component-C4QYRh5u.mjs → rolatech-angular-account-address-home.component-Cq8df4BZ.mjs} +5 -5
  8. package/fesm2022/rolatech-angular-account-address-home.component-Cq8df4BZ.mjs.map +1 -0
  9. package/fesm2022/rolatech-angular-account-address-shipping.component-BoCUP8BP.mjs +40 -0
  10. package/fesm2022/rolatech-angular-account-address-shipping.component-BoCUP8BP.mjs.map +1 -0
  11. package/fesm2022/rolatech-angular-account-address-work.component-DZVmQk00.mjs +35 -0
  12. package/fesm2022/rolatech-angular-account-address-work.component-DZVmQk00.mjs.map +1 -0
  13. package/fesm2022/{rolatech-angular-account-address.routes-Ch53Z6As.mjs → rolatech-angular-account-address.routes-BG537bit.mjs} +7 -7
  14. package/fesm2022/rolatech-angular-account-address.routes-BG537bit.mjs.map +1 -0
  15. package/fesm2022/{rolatech-angular-account-email-verification.component-B8pTGyx9.mjs → rolatech-angular-account-email-verification.component-CFXEcDgQ.mjs} +5 -5
  16. package/fesm2022/rolatech-angular-account-email-verification.component-CFXEcDgQ.mjs.map +1 -0
  17. package/fesm2022/rolatech-angular-account-email.component-Cln1gL9k.mjs +44 -0
  18. package/fesm2022/rolatech-angular-account-email.component-Cln1gL9k.mjs.map +1 -0
  19. package/fesm2022/rolatech-angular-account-gender.component-BSNLzoVL.mjs +55 -0
  20. package/fesm2022/rolatech-angular-account-gender.component-BSNLzoVL.mjs.map +1 -0
  21. package/fesm2022/{rolatech-angular-account-home.component-DnsqsRNc.mjs → rolatech-angular-account-home.component-BNs5snXX.mjs} +5 -5
  22. package/fesm2022/rolatech-angular-account-home.component-BNs5snXX.mjs.map +1 -0
  23. package/fesm2022/rolatech-angular-account-info.component-3eu2_7TG.mjs +111 -0
  24. package/fesm2022/rolatech-angular-account-info.component-3eu2_7TG.mjs.map +1 -0
  25. package/fesm2022/rolatech-angular-account-phone.component-BLHE_waH.mjs +76 -0
  26. package/fesm2022/rolatech-angular-account-phone.component-BLHE_waH.mjs.map +1 -0
  27. package/fesm2022/rolatech-angular-account-profile.component-CLXgdPX-.mjs +43 -0
  28. package/fesm2022/rolatech-angular-account-profile.component-CLXgdPX-.mjs.map +1 -0
  29. package/fesm2022/rolatech-angular-account-security.routes-CQH41xZs.mjs +237 -0
  30. package/fesm2022/rolatech-angular-account-security.routes-CQH41xZs.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-user-CJa0pCxF.mjs +9 -0
  32. package/fesm2022/rolatech-angular-account-user-CJa0pCxF.mjs.map +1 -0
  33. package/fesm2022/rolatech-angular-account-username.component-BmX7QCbs.mjs +42 -0
  34. package/fesm2022/rolatech-angular-account-username.component-BmX7QCbs.mjs.map +1 -0
  35. package/fesm2022/rolatech-angular-account.mjs +511 -1
  36. package/fesm2022/rolatech-angular-account.mjs.map +1 -1
  37. package/index.d.ts +29 -4
  38. package/package.json +6 -6
  39. package/fesm2022/rolatech-angular-account-address-add.component-Bj6pnCLm.mjs +0 -36
  40. package/fesm2022/rolatech-angular-account-address-add.component-Bj6pnCLm.mjs.map +0 -1
  41. package/fesm2022/rolatech-angular-account-address-billing.component-P1YV-5wC.mjs +0 -35
  42. package/fesm2022/rolatech-angular-account-address-billing.component-P1YV-5wC.mjs.map +0 -1
  43. package/fesm2022/rolatech-angular-account-address-detail.component-ZOfWc_yz.mjs.map +0 -1
  44. package/fesm2022/rolatech-angular-account-address-home.component-C4QYRh5u.mjs.map +0 -1
  45. package/fesm2022/rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs +0 -40
  46. package/fesm2022/rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs.map +0 -1
  47. package/fesm2022/rolatech-angular-account-address-work.component-DELZ5ymv.mjs +0 -35
  48. package/fesm2022/rolatech-angular-account-address-work.component-DELZ5ymv.mjs.map +0 -1
  49. package/fesm2022/rolatech-angular-account-address.routes-Ch53Z6As.mjs.map +0 -1
  50. package/fesm2022/rolatech-angular-account-email-verification.component-B8pTGyx9.mjs.map +0 -1
  51. package/fesm2022/rolatech-angular-account-email.component-Q9ZpDLPX.mjs +0 -44
  52. package/fesm2022/rolatech-angular-account-email.component-Q9ZpDLPX.mjs.map +0 -1
  53. package/fesm2022/rolatech-angular-account-gender.component-DrxiKHvu.mjs +0 -55
  54. package/fesm2022/rolatech-angular-account-gender.component-DrxiKHvu.mjs.map +0 -1
  55. package/fesm2022/rolatech-angular-account-home.component-DnsqsRNc.mjs.map +0 -1
  56. package/fesm2022/rolatech-angular-account-info.component-BwS2LI6u.mjs +0 -112
  57. package/fesm2022/rolatech-angular-account-info.component-BwS2LI6u.mjs.map +0 -1
  58. package/fesm2022/rolatech-angular-account-login.routes-CHrOk4GX.mjs +0 -43
  59. package/fesm2022/rolatech-angular-account-login.routes-CHrOk4GX.mjs.map +0 -1
  60. package/fesm2022/rolatech-angular-account-phone.component-CYHAQ-Zb.mjs +0 -76
  61. package/fesm2022/rolatech-angular-account-phone.component-CYHAQ-Zb.mjs.map +0 -1
  62. package/fesm2022/rolatech-angular-account-profile.component-JIuW8kyu.mjs +0 -43
  63. package/fesm2022/rolatech-angular-account-profile.component-JIuW8kyu.mjs.map +0 -1
  64. package/fesm2022/rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs +0 -465
  65. package/fesm2022/rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs.map +0 -1
  66. package/fesm2022/rolatech-angular-account-security.routes-ezGjJPgA.mjs +0 -237
  67. package/fesm2022/rolatech-angular-account-security.routes-ezGjJPgA.mjs.map +0 -1
  68. package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs +0 -9
  69. package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs.map +0 -1
  70. package/fesm2022/rolatech-angular-account-username.component-C4k-jzFG.mjs +0 -42
  71. package/fesm2022/rolatech-angular-account-username.component-C4k-jzFG.mjs.map +0 -1
  72. package/lib/account.routes.d.ts +0 -2
  73. package/lib/components/avatar-update-dialog/avatar-update-dialog.component.d.ts +0 -22
  74. package/lib/components/forgot-password/forgot-password.component.d.ts +0 -8
  75. package/lib/components/index.d.ts +0 -1
  76. package/lib/components/login/login-wechat/login-wechat.component.d.ts +0 -15
  77. package/lib/components/login/login.routes.d.ts +0 -3
  78. package/lib/components/logout/logout.component.d.ts +0 -19
  79. package/lib/components/passwordreset/passwordreset.component.d.ts +0 -8
  80. package/lib/components/topbar-login/topbar-login.component.d.ts +0 -20
  81. package/lib/contant/user.d.ts +0 -5
  82. package/lib/myaccount.routes.d.ts +0 -2
  83. package/lib/pages/accounts/signin/signin.component.d.ts +0 -39
  84. package/lib/pages/accounts/signup/signup.component.d.ts +0 -21
  85. package/lib/pages/myaccount/address/address-add/address-add.component.d.ts +0 -11
  86. package/lib/pages/myaccount/address/address-billing/address-billing.component.d.ts +0 -12
  87. package/lib/pages/myaccount/address/address-detail/address-detail.component.d.ts +0 -14
  88. package/lib/pages/myaccount/address/address-home/address-home.component.d.ts +0 -12
  89. package/lib/pages/myaccount/address/address-shipping/address-shipping.component.d.ts +0 -12
  90. package/lib/pages/myaccount/address/address-work/address-work.component.d.ts +0 -12
  91. package/lib/pages/myaccount/address/address.routes.d.ts +0 -2
  92. package/lib/pages/myaccount/email/email.component.d.ts +0 -15
  93. package/lib/pages/myaccount/email-verification/email-verification.component.d.ts +0 -9
  94. package/lib/pages/myaccount/gender/gender.component.d.ts +0 -17
  95. package/lib/pages/myaccount/home/home.component.d.ts +0 -11
  96. package/lib/pages/myaccount/personal-info/info.component.d.ts +0 -18
  97. package/lib/pages/myaccount/personal-info/profile/profile.component.d.ts +0 -14
  98. package/lib/pages/myaccount/personal-info/username/username.component.d.ts +0 -14
  99. package/lib/pages/myaccount/phone/phone.component.d.ts +0 -19
  100. package/lib/pages/myaccount/security/security-faceid/security-faceid.component.d.ts +0 -5
  101. package/lib/pages/myaccount/security/security-index/security-index.component.d.ts +0 -22
  102. package/lib/pages/myaccount/security/security-password/security-password.component.d.ts +0 -16
  103. package/lib/pages/myaccount/security/security-verification/security-verification.component.d.ts +0 -24
  104. package/lib/pages/myaccount/security/security.routes.d.ts +0 -3
  105. package/lib/services/wechat-login.service.d.ts +0 -9
  106. package/provider.d.ts +0 -2
@@ -1,465 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, PLATFORM_ID, input, ViewEncapsulation, Component, EventEmitter, Injectable, Directive, signal, effect, HostListener, makeEnvironmentProviders } from '@angular/core';
3
- import { isPlatformBrowser, CommonModule } from '@angular/common';
4
- import { APP_CONFIG, AngularCommonModule, WINDOW } from '@rolatech/angular-common';
5
- import * as i2 from '@angular/material/button';
6
- import { MatButtonModule } from '@angular/material/button';
7
- import { ActivatedRoute, Router, NavigationStart, ROUTES } from '@angular/router';
8
- import { filter } from 'rxjs';
9
- import { AuthService, AuthUserService, AuthGuard, UnauthorizedComponent, ForbiddenComponent } from '@rolatech/angular-auth';
10
- import { MatSnackBar } from '@angular/material/snack-bar';
11
- import { AngularComponentsModule, BaseComponent, TabsComponent, TabComponent } from '@rolatech/angular-components';
12
- import * as i1 from '@angular/forms';
13
- import { FormBuilder, Validators } from '@angular/forms';
14
- import { DomSanitizer } from '@angular/platform-browser';
15
- import * as i3 from '@angular/material/form-field';
16
- import * as i4 from '@angular/material/input';
17
-
18
- class TopbarLoginComponent {
19
- constructor() {
20
- this.environment = inject(APP_CONFIG);
21
- this.platformId = inject(PLATFORM_ID);
22
- this.route = inject(ActivatedRoute);
23
- this.router = inject(Router);
24
- this.service = input('www');
25
- this.signinUrl = '';
26
- this.signupUrl = this.environment.accountsUrl + '/signup';
27
- this.logoutUrl = this.environment.accountsUrl + `/logout?service=${this.service()}`;
28
- }
29
- ngOnInit() {
30
- if (isPlatformBrowser(this.platformId)) {
31
- this.signinUrl = `${this.environment.accountsUrl}/signin?continue=` + window.location.href;
32
- this.logoutUrl = this.environment.accountsUrl + `/logout?service=${this.service()}&continue=` + window.location.origin;
33
- }
34
- this.routerSubscription = this.router.events
35
- .pipe(filter((event) => event instanceof NavigationStart))
36
- .subscribe((event) => {
37
- this.signinUrl = `${this.environment.accountsUrl}/signin?continue=` + window.location.origin + event.url;
38
- // this.checkRouteGuard(event.url);
39
- const currentUrl = this.router.url; // Get the current URL
40
- const matchedRoute = this.findRouteConfig(currentUrl);
41
- if (matchedRoute) {
42
- console.log('Matched Route Config:', matchedRoute);
43
- }
44
- else {
45
- console.log('No matching route found.');
46
- }
47
- });
48
- }
49
- ngOnDestroy() {
50
- this.routerSubscription?.unsubscribe();
51
- }
52
- // checkRouteGuard(url: string): void {
53
- // // const route = this.router.config.find((r) => r.path === routePath);
54
- // const route = this.router.config.find((r: any) => this.matchRoute(url, r.path));
55
- // if (route) {
56
- // if (route.canActivate && route.canActivate.length > 0) {
57
- // console.log(`Route "${url}" has canActivate guards:`, route.canActivate);
58
- // } else {
59
- // console.log(`Route "${url}" does not have canActivate guards.`);
60
- // }
61
- // } else {
62
- // console.log(`Route "${url}" not found.`);
63
- // }
64
- // }
65
- // matchRoute(url: string, routePath: string): boolean {
66
- // // Strip leading/trailing slashes from URL and routePath and compare
67
- // return url.replace(/^\/|\/$/g, '') === routePath.replace(/^\/|\/$/g, '');
68
- // }
69
- findRouteConfig(url) {
70
- return this.router.config.find((route) => this.matchRoute(route, url));
71
- }
72
- // Helper function to check if a route matches the current URL
73
- matchRoute(route, url) {
74
- const path = route.path?.split('/').join('');
75
- const urlSegment = url.split('/').join('');
76
- return path === urlSegment;
77
- }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TopbarLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.2", 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>\u767B\u5F55</span></a>\n <a mat-flat-button class=\"max-h-9 md:max-h-10\" [href]=\"signupUrl\"><span>\u6CE8\u518C</span></a>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }], encapsulation: i0.ViewEncapsulation.None }); }
80
- }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: TopbarLoginComponent, decorators: [{
82
- type: Component,
83
- 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>\u767B\u5F55</span></a>\n <a mat-flat-button class=\"max-h-9 md:max-h-10\" [href]=\"signupUrl\"><span>\u6CE8\u518C</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: "19.2.2", ngImport: i0, type: ForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", 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: "19.2.2", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
93
- type: Component,
94
- args: [{ selector: 'rolatech-account-forgot-password', template: "<p>forgot-password works!</p>\n" }]
95
- }], ctorParameters: () => [] });
96
-
97
- class LogoutComponent {
98
- constructor() {
99
- this.service = '';
100
- this.continue = '';
101
- this.environment = inject(APP_CONFIG);
102
- this.platformId = inject(PLATFORM_ID);
103
- this.route = inject(ActivatedRoute);
104
- this.router = inject(Router);
105
- this.authService = inject(AuthService);
106
- this.snackBar = inject(MatSnackBar);
107
- }
108
- ngOnInit() {
109
- this.service = this.route.snapshot.queryParams['service'] || 'www';
110
- this.continue = this.route.snapshot.queryParams['continue'] || '/';
111
- if (isPlatformBrowser(this.platformId)) {
112
- this.logout();
113
- }
114
- }
115
- logout() {
116
- this.authService.logout().subscribe({
117
- next: (res) => {
118
- // this.router.navigate(['/signin'], {
119
- // queryParams: { continue: this.continue },
120
- // });
121
- // this.router.navigate([this.continue]);
122
- // this.router.navigateByUrl(this.continue);
123
- window.location.href = this.continue;
124
- },
125
- error: (error) => {
126
- this.snackBar.open(error.message);
127
- },
128
- });
129
- }
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", 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
- }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LogoutComponent, decorators: [{
134
- type: Component,
135
- args: [{ imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-logout', template: "<p>Please waiting...</p>\n" }]
136
- }] });
137
-
138
- class PasswordresetComponent {
139
- constructor() { }
140
- ngOnInit() { }
141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: PasswordresetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
142
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", 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: "19.2.2", ngImport: i0, type: PasswordresetComponent, decorators: [{
145
- type: Component,
146
- args: [{ selector: 'rolatech-account-passwordreset', template: "<p>passwordreset works!</p>\n" }]
147
- }], ctorParameters: () => [] });
148
-
149
- class WeChatLoginService {
150
- constructor() {
151
- this.onWeChatLogin = new EventEmitter();
152
- }
153
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: WeChatLoginService, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
154
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.2", type: WeChatLoginService, isStandalone: true, ngImport: i0 }); }
155
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: WeChatLoginService, providedIn: 'root' }); }
156
- }
157
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: WeChatLoginService, decorators: [{
158
- type: Injectable,
159
- args: [{
160
- providedIn: 'root',
161
- }]
162
- }, {
163
- type: Directive
164
- }], ctorParameters: () => [] });
165
-
166
- class SigninComponent extends BaseComponent {
167
- onLogin(event) {
168
- if (event.origin !== window.location.origin ||
169
- /react-devtools/gi.test(event.data.source) ||
170
- /angular-devtools/gi.test(event.data.source)) {
171
- return;
172
- }
173
- if (event.origin === this.environment.accountsUrl && event.data.code === 200) {
174
- window.location.href = this.continue === this.environment.accountsUrl ? this.environment.myaccountUrl : this.continue;
175
- }
176
- }
177
- constructor() {
178
- super();
179
- this.continue = '';
180
- this.environment = inject(APP_CONFIG);
181
- this.platformId = inject(PLATFORM_ID);
182
- this.formBuilder = inject(FormBuilder);
183
- this.authService = inject(AuthService);
184
- this.authUserService = inject(AuthUserService);
185
- this.wechtLoginService = inject(WeChatLoginService);
186
- this.sanitizer = inject(DomSanitizer);
187
- this.tabIndex = signal(0);
188
- this.countDown = false;
189
- this.countDownTime = 60;
190
- this.showButtonText = '发送验证码';
191
- this.appid = 'wx567acbea73439828';
192
- this.state = 'add';
193
- this.isLoading = false;
194
- this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl('');
195
- this.baseUrl = 'https://open.weixin.qq.com/connect/qrconnect';
196
- effect(() => {
197
- const index = this.tabIndex();
198
- if (index === 0) {
199
- this.codeForm.reset();
200
- }
201
- if (index === 1) {
202
- this.passrodForm.reset();
203
- }
204
- if (index === 2) {
205
- this.isLoading = true;
206
- this.codeForm.reset();
207
- this.passrodForm.reset();
208
- this.wechat();
209
- }
210
- });
211
- }
212
- ngOnInit() {
213
- this.titleService.setTitle('账号登录');
214
- this.passrodForm = this.formBuilder.group({
215
- account: [null, Validators.required],
216
- password: [null, Validators.required],
217
- });
218
- this.codeForm = this.formBuilder.group({
219
- phone: [null, [Validators.required, Validators.pattern('1(3|4|5|6|7|8|9)\\d{9}')]],
220
- code: [null, Validators.required],
221
- });
222
- this.continue = this.route.snapshot.queryParams['continue'] || '/';
223
- }
224
- get form() {
225
- return this.tabIndex() === 0 ? this.passrodForm.controls : this.codeForm.controls;
226
- }
227
- sendSMSCode() {
228
- const phoneControl = this.codeForm.get('phone');
229
- if (!phoneControl?.valid) {
230
- return;
231
- }
232
- const phone = phoneControl.value;
233
- this.countDown = true;
234
- const start = setInterval(() => {
235
- if (this.countDownTime >= 0) {
236
- this.showButtonText = `${this.countDownTime--}秒重发`;
237
- }
238
- else {
239
- clearInterval(start);
240
- this.showButtonText = '重新发送';
241
- this.countDown = false;
242
- this.countDownTime = 60;
243
- }
244
- }, 1000);
245
- this.authUserService.sendSMSCode('+86', phone).subscribe({
246
- next: (res) => {
247
- this.snackBarService.open('发送成功');
248
- },
249
- error: (error) => {
250
- this.snackBarService.open(error.message);
251
- },
252
- });
253
- }
254
- login() {
255
- let data = {};
256
- if (this.tabIndex() === 0) {
257
- if (!this.passrodForm.valid) {
258
- return;
259
- }
260
- data = {
261
- account: this.form['account'].value,
262
- password: this.form['password'].value,
263
- };
264
- }
265
- if (this.tabIndex() === 1) {
266
- if (!this.codeForm.valid) {
267
- return;
268
- }
269
- data = {
270
- phone: this.form['phone'].value,
271
- code: this.form['code'].value,
272
- };
273
- }
274
- this.authService.login(data).subscribe({
275
- next: () => {
276
- if (isPlatformBrowser(this.platformId)) {
277
- window.location.href = this.continue === this.environment.accountsUrl ? this.environment.myaccountUrl : this.continue;
278
- }
279
- },
280
- error: (error) => {
281
- this.snackBarService.open(error.message);
282
- },
283
- });
284
- }
285
- wechat() {
286
- const redirectUri = 'https://accounts.pinxiaoke.cn/login?continue';
287
- // const redirectUri = `${window.location.origin}/login?continue`;
288
- const encodedURI = encodeURI(redirectUri);
289
- 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`;
290
- this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(src);
291
- // setTimeout(() => {
292
- // this.isLoading = false;
293
- // }, 3000);
294
- }
295
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SigninComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
296
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", 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 p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row justify-between xl:w-[800px] lg:w-[600px] sm:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\">\u767B\u5F55</div>\n <div class=\"text-md ml-2\">\u4F7F\u7528{{ environment.name }}\u8D26\u53F7\u767B\u5F55</div>\n </div>\n <div>\n <rolatech-tabs [(select)]=\"tabIndex\">\n <rolatech-tab label=\"\u8D26\u53F7\u5BC6\u7801\"></rolatech-tab>\n <rolatech-tab label=\"\u77ED\u4FE1\u9A8C\u8BC1\u7801\"></rolatech-tab>\n <rolatech-tab label=\"\u5FAE\u4FE1\u626B\u7801\"></rolatech-tab>\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 <mat-form-field>\n <mat-label> \u7528\u6237\u540D/\u624B\u673A\u53F7 </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>\u7528\u6237\u540D\u5FC5\u586B</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <mat-form-field>\n <mat-label> \u5BC6\u7801 </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>\u8BF7\u8F93\u5165\u5BC6\u7801</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 <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </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> \u624B\u673A\u53F7\u5FC5\u586B</span>\n }\n @if (codeForm.controls['phone'].errors?.['pattern']) {\n <span> \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF </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> \u9A8C\u8BC1\u7801 </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> \u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801 </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"max-w-[128px] text-white text-center\">\n <span>{{ showButtonText }}</span>\n </button>\n </div>\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\" href=\"signup\">\u521B\u5EFA\u8D26\u53F7</a>\n <button mat-flat-button (click)=\"login()\" class=\"w-[128px]\">\u767B\u5F55</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[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { 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 }); }
297
- }
298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SigninComponent, decorators: [{
299
- type: Component,
300
- 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 p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row justify-between xl:w-[800px] lg:w-[600px] sm:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\">\u767B\u5F55</div>\n <div class=\"text-md ml-2\">\u4F7F\u7528{{ environment.name }}\u8D26\u53F7\u767B\u5F55</div>\n </div>\n <div>\n <rolatech-tabs [(select)]=\"tabIndex\">\n <rolatech-tab label=\"\u8D26\u53F7\u5BC6\u7801\"></rolatech-tab>\n <rolatech-tab label=\"\u77ED\u4FE1\u9A8C\u8BC1\u7801\"></rolatech-tab>\n <rolatech-tab label=\"\u5FAE\u4FE1\u626B\u7801\"></rolatech-tab>\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 <mat-form-field>\n <mat-label> \u7528\u6237\u540D/\u624B\u673A\u53F7 </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>\u7528\u6237\u540D\u5FC5\u586B</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <mat-form-field>\n <mat-label> \u5BC6\u7801 </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>\u8BF7\u8F93\u5165\u5BC6\u7801</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 <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </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> \u624B\u673A\u53F7\u5FC5\u586B</span>\n }\n @if (codeForm.controls['phone'].errors?.['pattern']) {\n <span> \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF </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> \u9A8C\u8BC1\u7801 </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> \u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801 </span>\n }\n </mat-error>\n }\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"max-w-[128px] text-white text-center\">\n <span>{{ showButtonText }}</span>\n </button>\n </div>\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\" href=\"signup\">\u521B\u5EFA\u8D26\u53F7</a>\n <button mat-flat-button (click)=\"login()\" class=\"w-[128px]\">\u767B\u5F55</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"] }]
301
- }], ctorParameters: () => [], propDecorators: { onLogin: [{
302
- type: HostListener,
303
- args: ['window:message', ['$event']]
304
- }] } });
305
-
306
- class SignupComponent extends BaseComponent {
307
- constructor() {
308
- super(...arguments);
309
- this.continue = '/';
310
- this.authUserService = inject(AuthUserService);
311
- this.formBuilder = inject(FormBuilder);
312
- this.environment = inject(APP_CONFIG);
313
- this.window = inject(WINDOW);
314
- this.countDown = false;
315
- this.countDownTime = 60;
316
- this.showButtonText = '发送验证码';
317
- }
318
- ngOnInit() {
319
- this.titleService.setTitle('账号注册');
320
- this.signupForm = this.formBuilder.group({
321
- name: [null, Validators.required],
322
- phone: [null, [Validators.required, Validators.pattern('1(3|4|5|6|7|8|9)\\d{9}')]],
323
- code: [null, Validators.required],
324
- password: [null, Validators.required],
325
- rePassword: [null, Validators.required],
326
- });
327
- this.continue = this.route.snapshot.queryParams['continue'] || '/';
328
- }
329
- sendSMSCode() {
330
- const phoneControl = this.signupForm.get('phone');
331
- if (!phoneControl?.valid) {
332
- return;
333
- }
334
- const phone = phoneControl.value;
335
- this.countDown = true;
336
- const start = setInterval(() => {
337
- if (this.countDownTime >= 0) {
338
- this.showButtonText = `${this.countDownTime--}秒重发`;
339
- }
340
- else {
341
- clearInterval(start);
342
- this.showButtonText = '重新发送';
343
- this.countDown = false;
344
- this.countDownTime = 60;
345
- }
346
- }, 1000);
347
- this.authUserService.sendSMSCode('+86', phone).subscribe({
348
- next: (res) => {
349
- this.snackBarService.open('发送成功');
350
- },
351
- error: (error) => {
352
- this.snackBarService.open(error.message);
353
- },
354
- });
355
- }
356
- submit() {
357
- if (!this.signupForm.valid) {
358
- return;
359
- }
360
- const data = {};
361
- this.authUserService.signup(this.signupForm.value).subscribe({
362
- next: (res) => {
363
- this.window.location.href = this.continue ? this.continue : this.environment.myaccountUrl;
364
- },
365
- error: (error) => {
366
- this.snackBarService.open(error.message);
367
- },
368
- });
369
- }
370
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SignupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
371
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", 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 p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row justify-between xl:w-[800px] lg:w-[600px] sm:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\">\u6CE8\u518C</div>\n <div class=\"text-md ml-2\">\u521B\u5EFA\u8D26\u53F7, \u83B7\u5F97\u66F4\u591A\u529F\u80FD</div>\n </div>\n <div>\n <form [formGroup]=\"signupForm\" (submit)=\"submit()\" class=\"flex flex-col\">\n <!-- name -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u59D3\u540D </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>\u59D3\u540D\u5FC5\u586B</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </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>\u624B\u673A\u53F7\u5FC5\u586B</span>\n }\n @if (signupForm.controls['phone'].errors?.['pattern']) {\n <span> \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF </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> \u9A8C\u8BC1\u7801 </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>\u9A8C\u8BC1\u7801\u5FC5\u586B</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 <!-- password -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5BC6\u7801 </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>\u8BF7\u8F93\u5165\u5BC6\u7801</span>\n }\n </mat-error>\n }\n </mat-form-field>\n\n <!-- password confirm -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u786E\u8BA4\u5BC6\u7801 </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>\u8BF7\u786E\u8BA4\u5BC6\u7801</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=\"/signin\">\u767B\u5F55</a>\n <button mat-flat-button (click)=\"submit()\" class=\"w-[128px]\">\u6CE8\u518C</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}\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.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { 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 }); }
372
- }
373
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: SignupComponent, decorators: [{
374
- type: Component,
375
- 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 p-6 lg:p-11 rounded-xl bg-[--rt-signin-inner-background] flex flex-col lg:flex-row justify-between xl:w-[800px] lg:w-[600px] sm:w-[600px]\"\n >\n <!-- header -->\n <div class=\"flex flex-col py-6\">\n <div class=\"text-3xl font-medium mb-3 ml-2\">\u6CE8\u518C</div>\n <div class=\"text-md ml-2\">\u521B\u5EFA\u8D26\u53F7, \u83B7\u5F97\u66F4\u591A\u529F\u80FD</div>\n </div>\n <div>\n <form [formGroup]=\"signupForm\" (submit)=\"submit()\" class=\"flex flex-col\">\n <!-- name -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u59D3\u540D </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>\u59D3\u540D\u5FC5\u586B</span>\n }\n </mat-error>\n }\n </mat-form-field>\n <!-- phone -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u624B\u673A\u53F7 </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>\u624B\u673A\u53F7\u5FC5\u586B</span>\n }\n @if (signupForm.controls['phone'].errors?.['pattern']) {\n <span> \u624B\u673A\u53F7\u683C\u5F0F\u9519\u8BEF </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> \u9A8C\u8BC1\u7801 </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>\u9A8C\u8BC1\u7801\u5FC5\u586B</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 <!-- password -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u5BC6\u7801 </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>\u8BF7\u8F93\u5165\u5BC6\u7801</span>\n }\n </mat-error>\n }\n </mat-form-field>\n\n <!-- password confirm -->\n <mat-form-field appearance=\"fill\">\n <mat-label> \u786E\u8BA4\u5BC6\u7801 </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>\u8BF7\u786E\u8BA4\u5BC6\u7801</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=\"/signin\">\u767B\u5F55</a>\n <button mat-flat-button (click)=\"submit()\" class=\"w-[128px]\">\u6CE8\u518C</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}\n"] }]
376
- }] });
377
-
378
- const accountRoutes = [
379
- {
380
- path: '',
381
- pathMatch: 'full',
382
- redirectTo: 'signin',
383
- },
384
- { path: 'signin', canActivate: [AuthGuard], component: SigninComponent, data: { title: 'Signin' } },
385
- { path: 'signup', component: SignupComponent, data: { title: 'Signup' } },
386
- { path: 'logout', component: LogoutComponent },
387
- { path: 'login', loadChildren: () => import('./rolatech-angular-account-login.routes-CHrOk4GX.mjs') },
388
- {
389
- path: 'passwordreset/:token',
390
- component: PasswordresetComponent,
391
- data: { title: 'Password Reset' },
392
- },
393
- {
394
- path: 'forgot',
395
- component: ForgotPasswordComponent,
396
- data: { title: 'Forgot Password' },
397
- },
398
- {
399
- path: 'unauthorized',
400
- component: UnauthorizedComponent,
401
- },
402
- {
403
- path: 'forbidden',
404
- component: ForbiddenComponent,
405
- },
406
- ];
407
-
408
- const myaccountRoutes = [
409
- {
410
- path: '',
411
- loadComponent: () => import('./rolatech-angular-account-home.component-DnsqsRNc.mjs').then((c) => c.HomeComponent),
412
- data: { title: '首页' },
413
- },
414
- {
415
- path: 'personal-info',
416
- loadComponent: () => import('./rolatech-angular-account-info.component-BwS2LI6u.mjs').then((c) => c.InfoComponent),
417
- },
418
- {
419
- path: 'profile',
420
- loadComponent: () => import('./rolatech-angular-account-profile.component-JIuW8kyu.mjs').then((c) => c.ProfileComponent),
421
- },
422
- {
423
- path: 'username',
424
- loadComponent: () => import('./rolatech-angular-account-username.component-C4k-jzFG.mjs').then((c) => c.UsernameComponent),
425
- },
426
- { path: 'gender', loadComponent: () => import('./rolatech-angular-account-gender.component-DrxiKHvu.mjs').then((c) => c.GenderComponent) },
427
- { path: 'email', loadComponent: () => import('./rolatech-angular-account-email.component-Q9ZpDLPX.mjs').then((c) => c.EmailComponent) },
428
- {
429
- path: 'email-verification/:id',
430
- loadComponent: () => import('./rolatech-angular-account-email-verification.component-B8pTGyx9.mjs').then((c) => c.EmailVerificationComponent),
431
- },
432
- { path: 'phone', loadComponent: () => import('./rolatech-angular-account-phone.component-CYHAQ-Zb.mjs').then((c) => c.PhoneComponent) },
433
- {
434
- path: 'address',
435
- loadChildren: () => import('./rolatech-angular-account-address.routes-Ch53Z6As.mjs').then((r) => r.addressRoutes),
436
- },
437
- {
438
- path: 'security',
439
- loadChildren: () => import('./rolatech-angular-account-security.routes-ezGjJPgA.mjs'),
440
- data: { title: 'Security' },
441
- },
442
- {
443
- path: 'notifications',
444
- loadChildren: () => import('@rolatech/angular-notification').then((m) => m.notificationRoutes),
445
- data: { title: '通知中心' },
446
- },
447
- ];
448
-
449
- function provideAngularAuthRoutes() {
450
- const provider = [
451
- {
452
- provide: ROUTES,
453
- useValue: accountRoutes,
454
- multi: true,
455
- },
456
- ];
457
- return makeEnvironmentProviders(provider);
458
- }
459
-
460
- /**
461
- * Generated bundle index. Do not edit.
462
- */
463
-
464
- export { TopbarLoginComponent as T, WeChatLoginService as W, accountRoutes as a, myaccountRoutes as m, provideAngularAuthRoutes as p };
465
- //# sourceMappingURL=rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs.map