@rolatech/angular-account 17.2.10 → 19.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/fesm2022/rolatech-angular-account-address-add.component-Ce3hAH2I.mjs +36 -0
  2. package/fesm2022/rolatech-angular-account-address-add.component-Ce3hAH2I.mjs.map +1 -0
  3. package/fesm2022/rolatech-angular-account-address-billing.component-iJ9e714P.mjs +35 -0
  4. package/fesm2022/rolatech-angular-account-address-billing.component-iJ9e714P.mjs.map +1 -0
  5. package/fesm2022/rolatech-angular-account-address-detail.component-YrEBTrX3.mjs +72 -0
  6. package/fesm2022/rolatech-angular-account-address-detail.component-YrEBTrX3.mjs.map +1 -0
  7. package/fesm2022/rolatech-angular-account-address-home.component-ChXk3WBo.mjs +55 -0
  8. package/fesm2022/rolatech-angular-account-address-home.component-ChXk3WBo.mjs.map +1 -0
  9. package/fesm2022/rolatech-angular-account-address-shipping.component-DIHcCOMD.mjs +40 -0
  10. package/fesm2022/rolatech-angular-account-address-shipping.component-DIHcCOMD.mjs.map +1 -0
  11. package/fesm2022/rolatech-angular-account-address-work.component-D_J4DR-s.mjs +35 -0
  12. package/fesm2022/rolatech-angular-account-address-work.component-D_J4DR-s.mjs.map +1 -0
  13. package/fesm2022/rolatech-angular-account-address.routes-B7dDMeuH.mjs +29 -0
  14. package/fesm2022/rolatech-angular-account-address.routes-B7dDMeuH.mjs.map +1 -0
  15. package/fesm2022/{rolatech-angular-account-email-verification.component-BMf1IfbK.mjs → rolatech-angular-account-email-verification.component-CkRt0ILC.mjs} +5 -5
  16. package/fesm2022/rolatech-angular-account-email-verification.component-CkRt0ILC.mjs.map +1 -0
  17. package/fesm2022/rolatech-angular-account-email.component-DuA61oxk.mjs +44 -0
  18. package/fesm2022/rolatech-angular-account-email.component-DuA61oxk.mjs.map +1 -0
  19. package/fesm2022/rolatech-angular-account-gender.component-RKepKjrL.mjs +55 -0
  20. package/fesm2022/rolatech-angular-account-gender.component-RKepKjrL.mjs.map +1 -0
  21. package/fesm2022/rolatech-angular-account-home.component-CIvRJUb9.mjs +23 -0
  22. package/fesm2022/rolatech-angular-account-home.component-CIvRJUb9.mjs.map +1 -0
  23. package/fesm2022/rolatech-angular-account-info.component-D2dwWQTF.mjs +112 -0
  24. package/fesm2022/rolatech-angular-account-info.component-D2dwWQTF.mjs.map +1 -0
  25. package/fesm2022/{rolatech-angular-account-login.routes-DC_HIcUQ.mjs → rolatech-angular-account-login.routes-C97QVyJ0.mjs} +6 -14
  26. package/fesm2022/rolatech-angular-account-login.routes-C97QVyJ0.mjs.map +1 -0
  27. package/fesm2022/rolatech-angular-account-phone.component-Kxe2MDen.mjs +76 -0
  28. package/fesm2022/rolatech-angular-account-phone.component-Kxe2MDen.mjs.map +1 -0
  29. package/fesm2022/rolatech-angular-account-profile.component-CKN-gbiM.mjs +43 -0
  30. package/fesm2022/rolatech-angular-account-profile.component-CKN-gbiM.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-rolatech-angular-account-BNEg6V8a.mjs +487 -0
  32. package/fesm2022/rolatech-angular-account-rolatech-angular-account-BNEg6V8a.mjs.map +1 -0
  33. package/fesm2022/rolatech-angular-account-security.routes-KlF9MNKj.mjs +237 -0
  34. package/fesm2022/rolatech-angular-account-security.routes-KlF9MNKj.mjs.map +1 -0
  35. package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs.map +1 -1
  36. package/fesm2022/rolatech-angular-account-username.component-DyUMdNt7.mjs +42 -0
  37. package/fesm2022/rolatech-angular-account-username.component-DyUMdNt7.mjs.map +1 -0
  38. package/fesm2022/rolatech-angular-account.mjs +1 -13
  39. package/fesm2022/rolatech-angular-account.mjs.map +1 -1
  40. package/lib/components/topbar-login/topbar-login.component.d.ts +9 -2
  41. package/lib/pages/myaccount/address/address-add/address-add.component.d.ts +11 -0
  42. package/lib/pages/myaccount/address/address-billing/address-billing.component.d.ts +12 -0
  43. package/lib/pages/myaccount/address/address-detail/address-detail.component.d.ts +14 -0
  44. package/lib/pages/myaccount/address/address-home/address-home.component.d.ts +12 -0
  45. package/lib/pages/myaccount/address/address-shipping/address-shipping.component.d.ts +12 -0
  46. package/lib/pages/myaccount/address/address-work/address-work.component.d.ts +12 -0
  47. package/lib/pages/myaccount/address/address.routes.d.ts +2 -0
  48. package/lib/pages/myaccount/email/email.component.d.ts +1 -1
  49. package/lib/pages/myaccount/email-verification/email-verification.component.d.ts +1 -1
  50. package/lib/pages/myaccount/gender/gender.component.d.ts +1 -1
  51. package/lib/pages/myaccount/home/home.component.d.ts +3 -9
  52. package/lib/pages/myaccount/personal-info/info.component.d.ts +5 -1
  53. package/lib/pages/myaccount/personal-info/profile/profile.component.d.ts +1 -1
  54. package/lib/pages/myaccount/personal-info/username/username.component.d.ts +1 -1
  55. package/lib/pages/myaccount/phone/phone.component.d.ts +1 -1
  56. package/lib/pages/myaccount/security/security-index/security-index.component.d.ts +4 -0
  57. package/lib/services/wechat-login.service.d.ts +1 -1
  58. package/package.json +21 -7
  59. package/themes/_default.scss +1 -1
  60. package/esm2022/index.mjs +0 -5
  61. package/esm2022/lib/account.routes.mjs +0 -36
  62. package/esm2022/lib/components/avatar-update-dialog/avatar-update-dialog.component.mjs +0 -63
  63. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +0 -13
  64. package/esm2022/lib/components/index.mjs +0 -3
  65. package/esm2022/lib/components/login/login-wechat/login-wechat.component.mjs +0 -38
  66. package/esm2022/lib/components/login/login.routes.mjs +0 -4
  67. package/esm2022/lib/components/logout/logout.component.mjs +0 -46
  68. package/esm2022/lib/components/passwordreset/passwordreset.component.mjs +0 -13
  69. package/esm2022/lib/components/topbar-login/topbar-login.component.mjs +0 -29
  70. package/esm2022/lib/components/user-item/user-item.component.mjs +0 -31
  71. package/esm2022/lib/contant/user.mjs +0 -7
  72. package/esm2022/lib/myaccount.routes.mjs +0 -37
  73. package/esm2022/lib/pages/accounts/signin/signin.component.mjs +0 -159
  74. package/esm2022/lib/pages/accounts/signup/signup.component.mjs +0 -82
  75. package/esm2022/lib/pages/myaccount/email/email.component.mjs +0 -41
  76. package/esm2022/lib/pages/myaccount/email-verification/email-verification.component.mjs +0 -26
  77. package/esm2022/lib/pages/myaccount/gender/gender.component.mjs +0 -52
  78. package/esm2022/lib/pages/myaccount/home/home.component.mjs +0 -66
  79. package/esm2022/lib/pages/myaccount/personal-info/info.component.mjs +0 -38
  80. package/esm2022/lib/pages/myaccount/personal-info/profile/profile.component.mjs +0 -47
  81. package/esm2022/lib/pages/myaccount/personal-info/username/username.component.mjs +0 -39
  82. package/esm2022/lib/pages/myaccount/phone/phone.component.mjs +0 -65
  83. package/esm2022/lib/pages/myaccount/security/security-faceid/security-faceid.component.mjs +0 -13
  84. package/esm2022/lib/pages/myaccount/security/security-index/security-index.component.mjs +0 -64
  85. package/esm2022/lib/pages/myaccount/security/security-password/security-password.component.mjs +0 -47
  86. package/esm2022/lib/pages/myaccount/security/security-verification/security-verification.component.mjs +0 -86
  87. package/esm2022/lib/pages/myaccount/security/security.routes.mjs +0 -20
  88. package/esm2022/lib/services/wechat-login.service.mjs +0 -19
  89. package/esm2022/provider.mjs +0 -14
  90. package/esm2022/rolatech-angular-account.mjs +0 -5
  91. package/fesm2022/rolatech-angular-account-email-verification.component-BMf1IfbK.mjs.map +0 -1
  92. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs +0 -44
  93. package/fesm2022/rolatech-angular-account-email.component-BQaELPci.mjs.map +0 -1
  94. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs +0 -55
  95. package/fesm2022/rolatech-angular-account-gender.component-9GJeEE9U.mjs.map +0 -1
  96. package/fesm2022/rolatech-angular-account-home.component-BB9zBFKT.mjs +0 -77
  97. package/fesm2022/rolatech-angular-account-home.component-BB9zBFKT.mjs.map +0 -1
  98. package/fesm2022/rolatech-angular-account-info.component-Be9isgwX.mjs +0 -98
  99. package/fesm2022/rolatech-angular-account-info.component-Be9isgwX.mjs.map +0 -1
  100. package/fesm2022/rolatech-angular-account-login.routes-DC_HIcUQ.mjs.map +0 -1
  101. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs +0 -68
  102. package/fesm2022/rolatech-angular-account-phone.component-D2v9enci.mjs.map +0 -1
  103. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs +0 -50
  104. package/fesm2022/rolatech-angular-account-profile.component-WwV7Jpjy.mjs.map +0 -1
  105. package/fesm2022/rolatech-angular-account-rolatech-angular-account-BuEBlu0U.mjs +0 -444
  106. package/fesm2022/rolatech-angular-account-rolatech-angular-account-BuEBlu0U.mjs.map +0 -1
  107. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs +0 -203
  108. package/fesm2022/rolatech-angular-account-security.routes-DiAm22Qh.mjs.map +0 -1
  109. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs +0 -42
  110. package/fesm2022/rolatech-angular-account-username.component-D8DPlm9P.mjs.map +0 -1
@@ -0,0 +1,487 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, Component, ViewEncapsulation, HostBinding, inject, PLATFORM_ID, EventEmitter, Injectable, Directive, signal, effect, HostListener, makeEnvironmentProviders } from '@angular/core';
3
+ import { CommonModule, isPlatformBrowser } from '@angular/common';
4
+ import * as i2 from '@angular/material/button';
5
+ import { MatButtonModule } from '@angular/material/button';
6
+ import { APP_CONFIG, AngularCommonModule, WINDOW } from '@rolatech/angular-common';
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 UserItemComponent {
19
+ constructor() {
20
+ this.hasClass = true;
21
+ this.user = input();
22
+ this.isFollowing = input(true);
23
+ this.follow = output();
24
+ this.unfollow = output();
25
+ this.own = input();
26
+ }
27
+ onFollow() {
28
+ this.follow.emit(this.user().username);
29
+ }
30
+ onUnFollow() {
31
+ this.unfollow.emit(this.user().username);
32
+ }
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UserItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
34
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", type: UserItemComponent, isStandalone: true, selector: "rolatech-account-user-item", inputs: { user: { classPropertyName: "user", publicName: "user", isSignal: true, isRequired: false, transformFunction: null }, isFollowing: { classPropertyName: "isFollowing", publicName: "isFollowing", isSignal: true, isRequired: false, transformFunction: null }, own: { classPropertyName: "own", publicName: "own", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { follow: "follow", unfollow: "unfollow" }, host: { properties: { "class.rolatech-account-user-item": "this.hasClass" } }, ngImport: i0, template: "<div class=\"flex w-full justify-between items-center p-2 hover:bg-[--rt-raised-background] cursor-pointer\">\n <div class=\"flex items-center\">\n <div class=\"bg-[--rt-brand-color] w-12 h-12 rounded-full\">\n @if (user().avatar) {\n <img class=\"w-12 h-12 object-cover rounded-full\" [src]=\"user().avatar\" alt=\"avatar img\" />\n }\n </div>\n <div class=\"flex flex-col ml-3\">\n <a class=\"text-lg font-bold\">\n <span>{{ user().name }}</span>\n </a>\n <a class=\"text-md\">\n <span>{{ user().username }}</span>\n </a>\n </div>\n </div>\n @if (!own()) {\n @if (isFollowing()) {\n <button mat-flat-button class=\"w-28 max-h-8\" (click)=\"onUnFollow()\">\u53D6\u6D88\u5173\u6CE8</button>\n } @else {\n <button mat-flat-button class=\"w-28 max-h-8\" (click)=\"onFollow()\">\u5173\u6CE8</button>\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], encapsulation: i0.ViewEncapsulation.None }); }
35
+ }
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: UserItemComponent, decorators: [{
37
+ type: Component,
38
+ args: [{ selector: 'rolatech-account-user-item', imports: [CommonModule, MatButtonModule], encapsulation: ViewEncapsulation.None, template: "<div class=\"flex w-full justify-between items-center p-2 hover:bg-[--rt-raised-background] cursor-pointer\">\n <div class=\"flex items-center\">\n <div class=\"bg-[--rt-brand-color] w-12 h-12 rounded-full\">\n @if (user().avatar) {\n <img class=\"w-12 h-12 object-cover rounded-full\" [src]=\"user().avatar\" alt=\"avatar img\" />\n }\n </div>\n <div class=\"flex flex-col ml-3\">\n <a class=\"text-lg font-bold\">\n <span>{{ user().name }}</span>\n </a>\n <a class=\"text-md\">\n <span>{{ user().username }}</span>\n </a>\n </div>\n </div>\n @if (!own()) {\n @if (isFollowing()) {\n <button mat-flat-button class=\"w-28 max-h-8\" (click)=\"onUnFollow()\">\u53D6\u6D88\u5173\u6CE8</button>\n } @else {\n <button mat-flat-button class=\"w-28 max-h-8\" (click)=\"onFollow()\">\u5173\u6CE8</button>\n }\n }\n</div>\n" }]
39
+ }], propDecorators: { hasClass: [{
40
+ type: HostBinding,
41
+ args: ['class.rolatech-account-user-item']
42
+ }] } });
43
+
44
+ class TopbarLoginComponent {
45
+ constructor() {
46
+ this.environment = inject(APP_CONFIG);
47
+ this.platformId = inject(PLATFORM_ID);
48
+ this.route = inject(ActivatedRoute);
49
+ this.router = inject(Router);
50
+ this.service = input('www');
51
+ this.signinUrl = '';
52
+ this.signupUrl = this.environment.accountsUrl + '/signup';
53
+ this.logoutUrl = this.environment.accountsUrl + `/logout?service=${this.service()}`;
54
+ }
55
+ ngOnInit() {
56
+ if (isPlatformBrowser(this.platformId)) {
57
+ this.signinUrl = `${this.environment.accountsUrl}/signin?continue=` + window.location.href;
58
+ this.logoutUrl = this.environment.accountsUrl + `/logout?service=${this.service()}&continue=` + window.location.origin;
59
+ }
60
+ this.routerSubscription = this.router.events
61
+ .pipe(filter((event) => event instanceof NavigationStart))
62
+ .subscribe((event) => {
63
+ this.signinUrl = `${this.environment.accountsUrl}/signin?continue=` + window.location.origin + event.url;
64
+ // this.checkRouteGuard(event.url);
65
+ const currentUrl = this.router.url; // Get the current URL
66
+ const matchedRoute = this.findRouteConfig(currentUrl);
67
+ if (matchedRoute) {
68
+ console.log('Matched Route Config:', matchedRoute);
69
+ }
70
+ else {
71
+ console.log('No matching route found.');
72
+ }
73
+ });
74
+ }
75
+ ngOnDestroy() {
76
+ this.routerSubscription?.unsubscribe();
77
+ }
78
+ // checkRouteGuard(url: string): void {
79
+ // // const route = this.router.config.find((r) => r.path === routePath);
80
+ // const route = this.router.config.find((r: any) => this.matchRoute(url, r.path));
81
+ // if (route) {
82
+ // if (route.canActivate && route.canActivate.length > 0) {
83
+ // console.log(`Route "${url}" has canActivate guards:`, route.canActivate);
84
+ // } else {
85
+ // console.log(`Route "${url}" does not have canActivate guards.`);
86
+ // }
87
+ // } else {
88
+ // console.log(`Route "${url}" not found.`);
89
+ // }
90
+ // }
91
+ // matchRoute(url: string, routePath: string): boolean {
92
+ // // Strip leading/trailing slashes from URL and routePath and compare
93
+ // return url.replace(/^\/|\/$/g, '') === routePath.replace(/^\/|\/$/g, '');
94
+ // }
95
+ findRouteConfig(url) {
96
+ return this.router.config.find((route) => this.matchRoute(route, url));
97
+ }
98
+ // Helper function to check if a route matches the current URL
99
+ matchRoute(route, url) {
100
+ const path = route.path?.split('/').join('');
101
+ const urlSegment = url.split('/').join('');
102
+ return path === urlSegment;
103
+ }
104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TopbarLoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", 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 }); }
106
+ }
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: TopbarLoginComponent, decorators: [{
108
+ type: Component,
109
+ 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" }]
110
+ }] });
111
+
112
+ class ForgotPasswordComponent {
113
+ constructor() { }
114
+ ngOnInit() { }
115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ForgotPasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
116
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: ForgotPasswordComponent, isStandalone: true, selector: "rolatech-account-forgot-password", ngImport: i0, template: "<p>forgot-password works!</p>\n", styles: [""] }); }
117
+ }
118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: ForgotPasswordComponent, decorators: [{
119
+ type: Component,
120
+ args: [{ selector: 'rolatech-account-forgot-password', template: "<p>forgot-password works!</p>\n" }]
121
+ }], ctorParameters: () => [] });
122
+
123
+ class LogoutComponent {
124
+ constructor() {
125
+ this.service = '';
126
+ this.continue = '';
127
+ this.environment = inject(APP_CONFIG);
128
+ this.platformId = inject(PLATFORM_ID);
129
+ this.route = inject(ActivatedRoute);
130
+ this.router = inject(Router);
131
+ this.authService = inject(AuthService);
132
+ this.snackBar = inject(MatSnackBar);
133
+ }
134
+ ngOnInit() {
135
+ this.service = this.route.snapshot.queryParams['service'] || 'www';
136
+ this.continue = this.route.snapshot.queryParams['continue'] || '/';
137
+ if (isPlatformBrowser(this.platformId)) {
138
+ this.logout();
139
+ }
140
+ }
141
+ logout() {
142
+ this.authService.logout().subscribe({
143
+ next: (res) => {
144
+ // this.router.navigate(['/signin'], {
145
+ // queryParams: { continue: this.continue },
146
+ // });
147
+ // this.router.navigate([this.continue]);
148
+ // this.router.navigateByUrl(this.continue);
149
+ window.location.href = this.continue;
150
+ },
151
+ error: (error) => {
152
+ this.snackBar.open(error.message);
153
+ },
154
+ });
155
+ }
156
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: LogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
157
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", 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 }] }); }
158
+ }
159
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: LogoutComponent, decorators: [{
160
+ type: Component,
161
+ args: [{ imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-logout', template: "<p>Please waiting...</p>\n" }]
162
+ }] });
163
+
164
+ class PasswordresetComponent {
165
+ constructor() { }
166
+ ngOnInit() { }
167
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: PasswordresetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
168
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: PasswordresetComponent, isStandalone: true, selector: "rolatech-account-passwordreset", ngImport: i0, template: "<p>passwordreset works!</p>\n", styles: [""] }); }
169
+ }
170
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: PasswordresetComponent, decorators: [{
171
+ type: Component,
172
+ args: [{ selector: 'rolatech-account-passwordreset', template: "<p>passwordreset works!</p>\n" }]
173
+ }], ctorParameters: () => [] });
174
+
175
+ class WeChatLoginService {
176
+ constructor() {
177
+ this.onWeChatLogin = new EventEmitter();
178
+ }
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: WeChatLoginService, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
180
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.3", type: WeChatLoginService, isStandalone: true, ngImport: i0 }); }
181
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: WeChatLoginService, providedIn: 'root' }); }
182
+ }
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: WeChatLoginService, decorators: [{
184
+ type: Injectable,
185
+ args: [{
186
+ providedIn: 'root',
187
+ }]
188
+ }, {
189
+ type: Directive
190
+ }], ctorParameters: () => [] });
191
+
192
+ class SigninComponent extends BaseComponent {
193
+ onLogin(event) {
194
+ if (event.origin !== window.location.origin ||
195
+ /react-devtools/gi.test(event.data.source) ||
196
+ /angular-devtools/gi.test(event.data.source)) {
197
+ return;
198
+ }
199
+ if (event.origin === this.environment.accountsUrl && event.data.code === 200) {
200
+ window.location.href = this.continue === this.environment.accountsUrl ? this.environment.myaccountUrl : this.continue;
201
+ }
202
+ }
203
+ constructor() {
204
+ super();
205
+ this.continue = '';
206
+ this.environment = inject(APP_CONFIG);
207
+ this.platformId = inject(PLATFORM_ID);
208
+ this.formBuilder = inject(FormBuilder);
209
+ this.authService = inject(AuthService);
210
+ this.authUserService = inject(AuthUserService);
211
+ this.wechtLoginService = inject(WeChatLoginService);
212
+ this.sanitizer = inject(DomSanitizer);
213
+ this.tabIndex = signal(0);
214
+ this.countDown = false;
215
+ this.countDownTime = 60;
216
+ this.showButtonText = '发送验证码';
217
+ this.appid = 'wx567acbea73439828';
218
+ this.state = 'add';
219
+ this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl('');
220
+ this.baseUrl = 'https://open.weixin.qq.com/connect/qrconnect';
221
+ effect(() => {
222
+ const index = this.tabIndex();
223
+ if (index === 0) {
224
+ this.codeForm.reset();
225
+ }
226
+ if (index === 1) {
227
+ this.passrodForm.reset();
228
+ }
229
+ if (index === 2) {
230
+ this.codeForm.reset();
231
+ this.passrodForm.reset();
232
+ this.wechat();
233
+ }
234
+ });
235
+ }
236
+ ngOnInit() {
237
+ this.titleService.setTitle(`账号登录 - ${this.environment.name}`);
238
+ this.passrodForm = this.formBuilder.group({
239
+ account: [null, Validators.required],
240
+ password: [null, Validators.required],
241
+ });
242
+ this.codeForm = this.formBuilder.group({
243
+ phone: [null, [Validators.required, Validators.pattern('1(3|4|5|6|7|8|9)\\d{9}')]],
244
+ code: [null, Validators.required],
245
+ });
246
+ this.continue = this.route.snapshot.queryParams['continue'] || '/';
247
+ }
248
+ get form() {
249
+ return this.tabIndex() === 0 ? this.passrodForm.controls : this.codeForm.controls;
250
+ }
251
+ sendSMSCode() {
252
+ const phoneControl = this.codeForm.get('phone');
253
+ if (!phoneControl?.valid) {
254
+ return;
255
+ }
256
+ const phone = phoneControl.value;
257
+ this.countDown = true;
258
+ const start = setInterval(() => {
259
+ if (this.countDownTime >= 0) {
260
+ this.showButtonText = `${this.countDownTime--}秒重发`;
261
+ }
262
+ else {
263
+ clearInterval(start);
264
+ this.showButtonText = '重新发送';
265
+ this.countDown = false;
266
+ this.countDownTime = 60;
267
+ }
268
+ }, 1000);
269
+ this.authUserService.sendSMSCode('+86', phone).subscribe({
270
+ next: (res) => {
271
+ this.snackBarService.open('发送成功');
272
+ },
273
+ error: (error) => {
274
+ this.snackBarService.open(error.message);
275
+ },
276
+ });
277
+ }
278
+ login() {
279
+ let data = {};
280
+ if (this.tabIndex() === 0) {
281
+ if (!this.passrodForm.valid) {
282
+ return;
283
+ }
284
+ data = {
285
+ account: this.form['account'].value,
286
+ password: this.form['password'].value,
287
+ };
288
+ }
289
+ if (this.tabIndex() === 1) {
290
+ if (!this.codeForm.valid) {
291
+ return;
292
+ }
293
+ data = {
294
+ phone: this.form['phone'].value,
295
+ code: this.form['code'].value,
296
+ };
297
+ }
298
+ this.authService.login(data).subscribe({
299
+ next: () => {
300
+ if (isPlatformBrowser(this.platformId)) {
301
+ window.location.href = this.continue === this.environment.accountsUrl ? this.environment.myaccountUrl : this.continue;
302
+ }
303
+ },
304
+ error: (error) => {
305
+ this.snackBarService.open(error.message);
306
+ },
307
+ });
308
+ }
309
+ wechat() {
310
+ const redirectUri = 'https://accounts.pinxiaoke.cn/login?continue';
311
+ // const redirectUri = `${window.location.origin}/login?continue`;
312
+ const href = 'https://cloudcache.tencent-cloud.com/open_proj/proj_qcloud_v2/gateway/login-regist/css/link-wx-login.css';
313
+ const encodedURI = encodeURI(redirectUri);
314
+ const src = `${this.baseUrl}?appid=${this.appid}&response_type=code&self_redirect=true&scope=snsapi_login&href=${href}&redirect_uri=${encodedURI}&state=${this.state}#wechat_redirect`;
315
+ this.urlSafe = this.sanitizer.bypassSecurityTrustResourceUrl(src);
316
+ }
317
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SigninComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
318
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", 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></div>\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 }); }
319
+ }
320
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SigninComponent, decorators: [{
321
+ 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 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></div>\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"] }]
323
+ }], ctorParameters: () => [], propDecorators: { onLogin: [{
324
+ type: HostListener,
325
+ args: ['window:message', ['$event']]
326
+ }] } });
327
+
328
+ class SignupComponent extends BaseComponent {
329
+ constructor() {
330
+ super(...arguments);
331
+ this.continue = '/';
332
+ this.authUserService = inject(AuthUserService);
333
+ this.formBuilder = inject(FormBuilder);
334
+ this.environment = inject(APP_CONFIG);
335
+ this.window = inject(WINDOW);
336
+ this.countDown = false;
337
+ this.countDownTime = 60;
338
+ this.showButtonText = '发送验证码';
339
+ }
340
+ ngOnInit() {
341
+ this.titleService.setTitle(`账号注册 - ${this.environment.name}`);
342
+ this.signupForm = this.formBuilder.group({
343
+ name: [null, Validators.required],
344
+ phone: [null, [Validators.required, Validators.pattern('1(3|4|5|6|7|8|9)\\d{9}')]],
345
+ code: [null, Validators.required],
346
+ password: [null, Validators.required],
347
+ rePassword: [null, Validators.required],
348
+ });
349
+ this.continue = this.route.snapshot.queryParams['continue'] || '/';
350
+ }
351
+ sendSMSCode() {
352
+ const phoneControl = this.signupForm.get('phone');
353
+ if (!phoneControl?.valid) {
354
+ return;
355
+ }
356
+ const phone = phoneControl.value;
357
+ this.countDown = true;
358
+ const start = setInterval(() => {
359
+ if (this.countDownTime >= 0) {
360
+ this.showButtonText = `${this.countDownTime--}秒重发`;
361
+ }
362
+ else {
363
+ clearInterval(start);
364
+ this.showButtonText = '重新发送';
365
+ this.countDown = false;
366
+ this.countDownTime = 60;
367
+ }
368
+ }, 1000);
369
+ this.authUserService.sendSMSCode('+86', phone).subscribe({
370
+ next: (res) => {
371
+ this.snackBarService.open('发送成功');
372
+ },
373
+ error: (error) => {
374
+ this.snackBarService.open(error.message);
375
+ },
376
+ });
377
+ }
378
+ submit() {
379
+ if (!this.signupForm.valid) {
380
+ return;
381
+ }
382
+ const data = {};
383
+ this.authUserService.signup(this.signupForm.value).subscribe({
384
+ next: (res) => {
385
+ this.window.location.href = this.continue ? this.continue : this.environment.myaccountUrl;
386
+ },
387
+ error: (error) => {
388
+ this.snackBarService.open(error.message);
389
+ },
390
+ });
391
+ }
392
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SignupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
393
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.3", 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 }); }
394
+ }
395
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: SignupComponent, decorators: [{
396
+ type: Component,
397
+ 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"] }]
398
+ }] });
399
+
400
+ const accountRoutes = [
401
+ {
402
+ path: '',
403
+ pathMatch: 'full',
404
+ redirectTo: 'signin',
405
+ },
406
+ { path: 'signin', canActivate: [AuthGuard], component: SigninComponent, data: { title: 'Signin' } },
407
+ { path: 'signup', component: SignupComponent, data: { title: 'Signup' } },
408
+ { path: 'logout', component: LogoutComponent },
409
+ { path: 'login', loadChildren: () => import('./rolatech-angular-account-login.routes-C97QVyJ0.mjs') },
410
+ {
411
+ path: 'passwordreset/:token',
412
+ component: PasswordresetComponent,
413
+ data: { title: 'Password Reset' },
414
+ },
415
+ {
416
+ path: 'forgot',
417
+ component: ForgotPasswordComponent,
418
+ data: { title: 'Forgot Password' },
419
+ },
420
+ {
421
+ path: 'unauthorized',
422
+ component: UnauthorizedComponent,
423
+ },
424
+ {
425
+ path: 'forbidden',
426
+ component: ForbiddenComponent,
427
+ },
428
+ ];
429
+
430
+ const myaccountRoutes = [
431
+ {
432
+ path: '',
433
+ loadComponent: () => import('./rolatech-angular-account-home.component-CIvRJUb9.mjs').then((c) => c.HomeComponent),
434
+ data: { title: '首页' },
435
+ },
436
+ {
437
+ path: 'personal-info',
438
+ loadComponent: () => import('./rolatech-angular-account-info.component-D2dwWQTF.mjs').then((c) => c.InfoComponent),
439
+ },
440
+ {
441
+ path: 'profile',
442
+ loadComponent: () => import('./rolatech-angular-account-profile.component-CKN-gbiM.mjs').then((c) => c.ProfileComponent),
443
+ },
444
+ {
445
+ path: 'username',
446
+ loadComponent: () => import('./rolatech-angular-account-username.component-DyUMdNt7.mjs').then((c) => c.UsernameComponent),
447
+ },
448
+ { path: 'gender', loadComponent: () => import('./rolatech-angular-account-gender.component-RKepKjrL.mjs').then((c) => c.GenderComponent) },
449
+ { path: 'email', loadComponent: () => import('./rolatech-angular-account-email.component-DuA61oxk.mjs').then((c) => c.EmailComponent) },
450
+ {
451
+ path: 'email-verification/:id',
452
+ loadComponent: () => import('./rolatech-angular-account-email-verification.component-CkRt0ILC.mjs').then((c) => c.EmailVerificationComponent),
453
+ },
454
+ { path: 'phone', loadComponent: () => import('./rolatech-angular-account-phone.component-Kxe2MDen.mjs').then((c) => c.PhoneComponent) },
455
+ {
456
+ path: 'address',
457
+ loadChildren: () => import('./rolatech-angular-account-address.routes-B7dDMeuH.mjs').then((r) => r.addressRoutes),
458
+ },
459
+ {
460
+ path: 'security',
461
+ loadChildren: () => import('./rolatech-angular-account-security.routes-KlF9MNKj.mjs'),
462
+ data: { title: 'Security' },
463
+ },
464
+ {
465
+ path: 'notifications',
466
+ loadChildren: () => import('@rolatech/angular-notification').then((m) => m.notificationRoutes),
467
+ data: { title: '通知中心' },
468
+ },
469
+ ];
470
+
471
+ function provideAngularAuthRoutes() {
472
+ const provider = [
473
+ {
474
+ provide: ROUTES,
475
+ useValue: accountRoutes,
476
+ multi: true,
477
+ },
478
+ ];
479
+ return makeEnvironmentProviders(provider);
480
+ }
481
+
482
+ /**
483
+ * Generated bundle index. Do not edit.
484
+ */
485
+
486
+ export { TopbarLoginComponent as T, UserItemComponent as U, WeChatLoginService as W, accountRoutes as a, myaccountRoutes as m, provideAngularAuthRoutes as p };
487
+ //# sourceMappingURL=rolatech-angular-account-rolatech-angular-account-BNEg6V8a.mjs.map