@rolatech/angular-account 17.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +7 -0
  2. package/esm2022/index.mjs +3 -0
  3. package/esm2022/lib/account.routes.mjs +72 -0
  4. package/esm2022/lib/components/avatar-update-dialog/avatar-update-dialog.component.mjs +65 -0
  5. package/esm2022/lib/components/forgot-password/forgot-password.component.mjs +13 -0
  6. package/esm2022/lib/components/login/login-wechat/login-wechat.component.mjs +42 -0
  7. package/esm2022/lib/components/login/login.routes.mjs +4 -0
  8. package/esm2022/lib/components/logout/logout.component.mjs +46 -0
  9. package/esm2022/lib/components/passwordreset/passwordreset.component.mjs +13 -0
  10. package/esm2022/lib/components/signin/signin.component.mjs +148 -0
  11. package/esm2022/lib/components/signup/signup.component.mjs +82 -0
  12. package/esm2022/lib/contant/user.mjs +7 -0
  13. package/esm2022/lib/pages/myaccount/email/email.component.mjs +41 -0
  14. package/esm2022/lib/pages/myaccount/email-verification/email-verification.component.mjs +26 -0
  15. package/esm2022/lib/pages/myaccount/gender/gender.component.mjs +46 -0
  16. package/esm2022/lib/pages/myaccount/home/home.component.mjs +22 -0
  17. package/esm2022/lib/pages/myaccount/personal-info/info.component.mjs +45 -0
  18. package/esm2022/lib/pages/myaccount/personal-info/profile/profile.component.mjs +41 -0
  19. package/esm2022/lib/pages/myaccount/personal-info/username/username.component.mjs +41 -0
  20. package/esm2022/lib/pages/myaccount/phone/phone.component.mjs +70 -0
  21. package/esm2022/lib/pages/myaccount/security/security-faceid/security-faceid.component.mjs +13 -0
  22. package/esm2022/lib/pages/myaccount/security/security-index/security-index.component.mjs +64 -0
  23. package/esm2022/lib/pages/myaccount/security/security-password/security-password.component.mjs +50 -0
  24. package/esm2022/lib/pages/myaccount/security/security-verification/security-verification.component.mjs +88 -0
  25. package/esm2022/lib/pages/myaccount/security/security.routes.mjs +20 -0
  26. package/esm2022/lib/services/wechat-login.service.mjs +16 -0
  27. package/esm2022/provider.mjs +14 -0
  28. package/esm2022/rolatech-angular-account.mjs +5 -0
  29. package/fesm2022/rolatech-angular-account-email-verification.component-4RClhLI4.mjs +29 -0
  30. package/fesm2022/rolatech-angular-account-email-verification.component-4RClhLI4.mjs.map +1 -0
  31. package/fesm2022/rolatech-angular-account-email.component-oRTdxJLo.mjs +44 -0
  32. package/fesm2022/rolatech-angular-account-email.component-oRTdxJLo.mjs.map +1 -0
  33. package/fesm2022/rolatech-angular-account-gender.component-egCF_zI_.mjs +49 -0
  34. package/fesm2022/rolatech-angular-account-gender.component-egCF_zI_.mjs.map +1 -0
  35. package/fesm2022/rolatech-angular-account-home.component-B2Rmr4Iw.mjs +25 -0
  36. package/fesm2022/rolatech-angular-account-home.component-B2Rmr4Iw.mjs.map +1 -0
  37. package/fesm2022/rolatech-angular-account-info.component-CMWD6CDB.mjs +107 -0
  38. package/fesm2022/rolatech-angular-account-info.component-CMWD6CDB.mjs.map +1 -0
  39. package/fesm2022/rolatech-angular-account-login.routes-NPLzDeHN.mjs +56 -0
  40. package/fesm2022/rolatech-angular-account-login.routes-NPLzDeHN.mjs.map +1 -0
  41. package/fesm2022/rolatech-angular-account-phone.component-CJ8DeuFr.mjs +73 -0
  42. package/fesm2022/rolatech-angular-account-phone.component-CJ8DeuFr.mjs.map +1 -0
  43. package/fesm2022/rolatech-angular-account-profile.component-BN_pBKMU.mjs +44 -0
  44. package/fesm2022/rolatech-angular-account-profile.component-BN_pBKMU.mjs.map +1 -0
  45. package/fesm2022/rolatech-angular-account-rolatech-angular-account-Dqz2XIdy.mjs +380 -0
  46. package/fesm2022/rolatech-angular-account-rolatech-angular-account-Dqz2XIdy.mjs.map +1 -0
  47. package/fesm2022/rolatech-angular-account-security.routes-S3BzviKf.mjs +206 -0
  48. package/fesm2022/rolatech-angular-account-security.routes-S3BzviKf.mjs.map +1 -0
  49. package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs +9 -0
  50. package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs.map +1 -0
  51. package/fesm2022/rolatech-angular-account-username.component-C6pM8g84.mjs +44 -0
  52. package/fesm2022/rolatech-angular-account-username.component-C6pM8g84.mjs.map +1 -0
  53. package/fesm2022/rolatech-angular-account.mjs +15 -0
  54. package/fesm2022/rolatech-angular-account.mjs.map +1 -0
  55. package/index.d.ts +2 -0
  56. package/lib/account.routes.d.ts +3 -0
  57. package/lib/components/avatar-update-dialog/avatar-update-dialog.component.d.ts +23 -0
  58. package/lib/components/forgot-password/forgot-password.component.d.ts +8 -0
  59. package/lib/components/login/login-wechat/login-wechat.component.d.ts +15 -0
  60. package/lib/components/login/login.routes.d.ts +3 -0
  61. package/lib/components/logout/logout.component.d.ts +19 -0
  62. package/lib/components/passwordreset/passwordreset.component.d.ts +8 -0
  63. package/lib/components/signin/signin.component.d.ts +39 -0
  64. package/lib/components/signup/signup.component.d.ts +21 -0
  65. package/lib/contant/user.d.ts +5 -0
  66. package/lib/pages/myaccount/email/email.component.d.ts +14 -0
  67. package/lib/pages/myaccount/email-verification/email-verification.component.d.ts +9 -0
  68. package/lib/pages/myaccount/gender/gender.component.d.ts +14 -0
  69. package/lib/pages/myaccount/home/home.component.d.ts +12 -0
  70. package/lib/pages/myaccount/personal-info/info.component.d.ts +16 -0
  71. package/lib/pages/myaccount/personal-info/profile/profile.component.d.ts +14 -0
  72. package/lib/pages/myaccount/personal-info/username/username.component.d.ts +14 -0
  73. package/lib/pages/myaccount/phone/phone.component.d.ts +19 -0
  74. package/lib/pages/myaccount/security/security-faceid/security-faceid.component.d.ts +5 -0
  75. package/lib/pages/myaccount/security/security-index/security-index.component.d.ts +18 -0
  76. package/lib/pages/myaccount/security/security-password/security-password.component.d.ts +16 -0
  77. package/lib/pages/myaccount/security/security-verification/security-verification.component.d.ts +24 -0
  78. package/lib/pages/myaccount/security/security.routes.d.ts +3 -0
  79. package/lib/services/wechat-login.service.d.ts +8 -0
  80. package/package.json +31 -0
  81. package/provider.d.ts +2 -0
  82. package/themes/_default.scss +1 -0
@@ -0,0 +1,206 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, Renderer2, ViewChild } from '@angular/core';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import * as i2$1 from '@rolatech/angular-auth';
5
+ import { AuthService, FaceidDetectDialogComponent } from '@rolatech/angular-auth';
6
+ import { AngularCommonModule } from '@rolatech/angular-common';
7
+ import { WechatConnectDialogComponent, AngularComponentsModule, LoadingSpinnerComponent } from '@rolatech/angular-components';
8
+ import * as i1 from '@angular/router';
9
+ import * as i2 from '@angular/material/divider';
10
+ import * as i3 from '@angular/material/icon';
11
+ import * as i4 from '@angular/material/list';
12
+ import * as i1$1 from '@angular/forms';
13
+ import { Validators } from '@angular/forms';
14
+ import * as i3$1 from '@angular/material/snack-bar';
15
+ import { BackButtonDirective } from '@rolatech/angular-services';
16
+ import * as i2$2 from '@angular/material/button';
17
+ import * as i3$2 from '@angular/material/form-field';
18
+ import * as i4$1 from '@angular/material/input';
19
+ import * as QRCode from 'qrcode';
20
+
21
+ class SecurityIndexComponent {
22
+ constructor() {
23
+ this.dialog = inject(MatDialog);
24
+ this.authService = inject(AuthService);
25
+ this.bind = false;
26
+ this.verified = false;
27
+ }
28
+ ngOnInit() {
29
+ this.wechatStatus();
30
+ }
31
+ faceId() {
32
+ const dialogRef = this.dialog.open(FaceidDetectDialogComponent, {
33
+ data: {},
34
+ });
35
+ dialogRef.afterClosed().subscribe((result) => {
36
+ this.verified = result;
37
+ });
38
+ }
39
+ connectWeChat() {
40
+ // const redirectUri = 'https://accounts.pinxiaoke.cn/login';
41
+ const redirectUri = `${window.location.origin}/login`;
42
+ const dialogRef = this.dialog.open(WechatConnectDialogComponent, {
43
+ data: {
44
+ appid: 'wx567acbea73439828',
45
+ redirect_uri: redirectUri,
46
+ state: 'add',
47
+ },
48
+ });
49
+ dialogRef.afterClosed().subscribe((result) => {
50
+ this.wechatStatus();
51
+ });
52
+ }
53
+ disconnectWeChat() {
54
+ this.authService.wechatDisconnect().subscribe({
55
+ next: (res) => {
56
+ this.bind = false;
57
+ },
58
+ });
59
+ }
60
+ wechatStatus() {
61
+ this.authService.wechatStatus({ id: 'me' }).subscribe({
62
+ next: (res) => {
63
+ this.bind = res.data?.openid !== undefined;
64
+ },
65
+ });
66
+ }
67
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: SecurityIndexComponent, isStandalone: true, selector: "rolatech-account-security-index", ngImport: i0, template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u5B89\u5168\u8BBE\u7F6E</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5B89\u5168\u8BBE\u7F6E</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"faceId()\">\n <div class=\"flex items-center justify-between\">\n <span>\u5B9E\u540D\u8BA4\u8BC1</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!verified) {\n <span class=\"mr-3\"> \u672A\u8BA4\u8BC1 </span>\n }\n @if (verified) {\n <a class=\"mr-3\"> \u5DF2\u8BA4\u8BC1 </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> \u89E3\u7ED1 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item>\n <div class=\"flex items-center justify-between\">\n <span>\u5FAE\u4FE1\u7ED1\u5B9A</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!bind) {\n <span class=\"mr-3\" (click)=\"connectWeChat()\"> \u7ED1\u5B9A </span>\n }\n @if (bind) {\n <a class=\"mr-3\"> \u5DF2\u7ED1\u5B9A </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> \u89E3\u7ED1 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item routerLink=\"./password\">\n <div class=\"flex items-center justify-between\">\n <span>\u5BC6\u7801\u8BBE\u7F6E</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i4.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }] }); }
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityIndexComponent, decorators: [{
71
+ type: Component,
72
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-security-index', template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u5B89\u5168\u8BBE\u7F6E</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5B89\u5168\u8BBE\u7F6E</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"faceId()\">\n <div class=\"flex items-center justify-between\">\n <span>\u5B9E\u540D\u8BA4\u8BC1</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!verified) {\n <span class=\"mr-3\"> \u672A\u8BA4\u8BC1 </span>\n }\n @if (verified) {\n <a class=\"mr-3\"> \u5DF2\u8BA4\u8BC1 </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> \u89E3\u7ED1 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item>\n <div class=\"flex items-center justify-between\">\n <span>\u5FAE\u4FE1\u7ED1\u5B9A</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!bind) {\n <span class=\"mr-3\" (click)=\"connectWeChat()\"> \u7ED1\u5B9A </span>\n }\n @if (bind) {\n <a class=\"mr-3\"> \u5DF2\u7ED1\u5B9A </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> \u89E3\u7ED1 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item routerLink=\"./password\">\n <div class=\"flex items-center justify-between\">\n <span>\u5BC6\u7801\u8BBE\u7F6E</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n</div>\n" }]
73
+ }], ctorParameters: () => [] });
74
+
75
+ class SecurityPasswordComponent {
76
+ constructor(formBuilder, authService, snackBar) {
77
+ this.formBuilder = formBuilder;
78
+ this.authService = authService;
79
+ this.snackBar = snackBar;
80
+ }
81
+ ngOnInit() {
82
+ this.passwordForm = this.formBuilder.group({
83
+ oldPassword: ['', Validators.required],
84
+ newPassword: ['', Validators.required],
85
+ ne2Password: ['', Validators.required],
86
+ });
87
+ }
88
+ save() {
89
+ if (!this.passwordForm.valid) {
90
+ return;
91
+ }
92
+ this.authService.changePassword(this.passwordForm.value).subscribe({
93
+ next: (res) => {
94
+ this.snackBar.open(res.message);
95
+ },
96
+ error: (e) => {
97
+ this.snackBar.open(e.message);
98
+ },
99
+ });
100
+ }
101
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.AuthService }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component }); }
102
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: SecurityPasswordComponent, isStandalone: true, selector: "rolatech-account-security-password", ngImport: i0, template: "<div>\n <div class=\"px-3 max-w-[1120px] m-auto\">\n <div class=\"flex items-center\">\n <div class=\"flex items-center justify-center w-11 h-11 cursor-pointer\" rolatechBackButton>\n <mat-icon>arrow_back</mat-icon>\n </div>\n <span class=\"text-xl font-medium\">\u4FEE\u6539\u5BC6\u7801</span>\n </div>\n </div>\n <div class=\"px-4\">\n <mat-divider></mat-divider>\n </div>\n</div>\n<div class=\"max-w-[1120px] m-auto px-6\">\n <p class=\"text-md my-3\">\u4FEE\u6539\u7528\u6237\u5BC6\u7801</p>\n <div class=\"mt-3\">\n <form [formGroup]=\"passwordForm\">\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u539F\u5BC6\u7801</mat-label>\n <input matInput type=\"password\" formControlName=\"oldPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u65B0\u5BC6\u7801 </mat-label>\n <input matInput type=\"password\" formControlName=\"newPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u65B0\u5BC6\u7801 </mat-label>\n <input matInput type=\"password\" formControlName=\"ne2Password\" required />\n </mat-form-field>\n </div>\n </form>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-[128px] p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n \u4FDD\u5B58\n </button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }] }); }
103
+ }
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityPasswordComponent, decorators: [{
105
+ type: Component,
106
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective], selector: 'rolatech-account-security-password', template: "<div>\n <div class=\"px-3 max-w-[1120px] m-auto\">\n <div class=\"flex items-center\">\n <div class=\"flex items-center justify-center w-11 h-11 cursor-pointer\" rolatechBackButton>\n <mat-icon>arrow_back</mat-icon>\n </div>\n <span class=\"text-xl font-medium\">\u4FEE\u6539\u5BC6\u7801</span>\n </div>\n </div>\n <div class=\"px-4\">\n <mat-divider></mat-divider>\n </div>\n</div>\n<div class=\"max-w-[1120px] m-auto px-6\">\n <p class=\"text-md my-3\">\u4FEE\u6539\u7528\u6237\u5BC6\u7801</p>\n <div class=\"mt-3\">\n <form [formGroup]=\"passwordForm\">\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> \u539F\u5BC6\u7801</mat-label>\n <input matInput type=\"password\" formControlName=\"oldPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u65B0\u5BC6\u7801 </mat-label>\n <input matInput type=\"password\" formControlName=\"newPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> \u65B0\u5BC6\u7801 </mat-label>\n <input matInput type=\"password\" formControlName=\"ne2Password\" required />\n </mat-form-field>\n </div>\n </form>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-[128px] p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n \u4FDD\u5B58\n </button>\n </div>\n </div>\n</div>\n" }]
107
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.AuthService }, { type: i3$1.MatSnackBar }] });
108
+
109
+ class SecurityVerificationComponent {
110
+ constructor() {
111
+ this.dialog = inject(MatDialog);
112
+ this.authService = inject(AuthService);
113
+ this.verified = false;
114
+ this.renderer = inject(Renderer2);
115
+ this.loading = false;
116
+ this.BizToken = '';
117
+ this.identification = {};
118
+ }
119
+ ngOnInit() {
120
+ this.check();
121
+ }
122
+ check() {
123
+ this.authService.faceIdStatus().subscribe({
124
+ next: (res) => {
125
+ this.verified = res.data.verified;
126
+ },
127
+ });
128
+ }
129
+ verify() {
130
+ this.loading = true;
131
+ this.authService.requestFaceIdDetect().subscribe({
132
+ next: ({ data }) => {
133
+ this.genQRCode(data.url);
134
+ // this.loop();
135
+ },
136
+ error: () => {
137
+ this.loading = false;
138
+ },
139
+ });
140
+ }
141
+ loop() {
142
+ const interval = setInterval(() => {
143
+ this.authService.faceIdStatus().subscribe({
144
+ next: (res) => {
145
+ if (res) {
146
+ clearInterval(interval);
147
+ }
148
+ },
149
+ });
150
+ this;
151
+ }, 2000);
152
+ }
153
+ genQRCode(url) {
154
+ const element = this.renderer.createElement('canvas');
155
+ this.toCanvas(element, url)
156
+ .then(() => {
157
+ this.renderElement(element);
158
+ })
159
+ .catch((e) => {
160
+ this.removeElementChildren();
161
+ });
162
+ }
163
+ toCanvas(canvas, url) {
164
+ return QRCode.toCanvas(canvas, url, {
165
+ errorCorrectionLevel: 'M',
166
+ width: 200,
167
+ });
168
+ }
169
+ renderElement(element) {
170
+ this.removeElementChildren();
171
+ this.renderer.appendChild(this.qrcElement.nativeElement, element);
172
+ }
173
+ removeElementChildren() {
174
+ for (const node of this.qrcElement.nativeElement.childNodes) {
175
+ this.renderer.removeChild(this.qrcElement.nativeElement, node);
176
+ }
177
+ }
178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityVerificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.2.1", type: SecurityVerificationComponent, isStandalone: true, selector: "rolatech-account-security-verification", viewQueries: [{ propertyName: "qrcElement", first: true, predicate: ["qrcode"], descendants: true }], ngImport: i0, template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px]\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u5B9E\u540D\u8BA4\u8BC1</p>\n <p class=\"text-md\">\u5B9E\u540D\u8BA4\u8BC1, \u4F1A\u8BA9\u4F60\u7684\u8D26\u6237\u66F4\u52A0\u5B89\u5168</p>\n </div>\n </div>\n @if (verified) {\n <div class=\"p-3\">\n <div class=\"text-md font-bold py-3\">\u60A8\u5DF2\u7ECF\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1</div>\n <div class=\"flex flex-col\">\n <div><span class=\"text-gray-600\">\u59D3\u540D: </span> <span>22</span></div>\n <div><span class=\"text-gray-600\">\u8EAB\u4EFD\u8BC1: </span><span>22</span></div>\n </div>\n </div>\n } @else {\n <div>\u672A\u8BA4\u8BC1</div>\n <button mat-raised-button (click)=\"verify()\" color=\"primary\">\u8BF7\u6C42\u8BA4\u8BC1</button>\n <div #qrcode>\n @if (loading) {\n <div>\n <rolatech-loading-spinner></rolatech-loading-spinner>\n </div>\n }\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: LoadingSpinnerComponent, selector: "rolatech-loading-spinner", inputs: ["title"] }] }); }
180
+ }
181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: SecurityVerificationComponent, decorators: [{
182
+ type: Component,
183
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, LoadingSpinnerComponent], selector: 'rolatech-account-security-verification', template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px]\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u5B9E\u540D\u8BA4\u8BC1</p>\n <p class=\"text-md\">\u5B9E\u540D\u8BA4\u8BC1, \u4F1A\u8BA9\u4F60\u7684\u8D26\u6237\u66F4\u52A0\u5B89\u5168</p>\n </div>\n </div>\n @if (verified) {\n <div class=\"p-3\">\n <div class=\"text-md font-bold py-3\">\u60A8\u5DF2\u7ECF\u5B8C\u6210\u5B9E\u540D\u8BA4\u8BC1</div>\n <div class=\"flex flex-col\">\n <div><span class=\"text-gray-600\">\u59D3\u540D: </span> <span>22</span></div>\n <div><span class=\"text-gray-600\">\u8EAB\u4EFD\u8BC1: </span><span>22</span></div>\n </div>\n </div>\n } @else {\n <div>\u672A\u8BA4\u8BC1</div>\n <button mat-raised-button (click)=\"verify()\" color=\"primary\">\u8BF7\u6C42\u8BA4\u8BC1</button>\n <div #qrcode>\n @if (loading) {\n <div>\n <rolatech-loading-spinner></rolatech-loading-spinner>\n </div>\n }\n </div>\n }\n</div>\n" }]
184
+ }], propDecorators: { qrcElement: [{
185
+ type: ViewChild,
186
+ args: ['qrcode', { static: false }]
187
+ }] } });
188
+
189
+ const securityRoutes = [
190
+ {
191
+ path: '',
192
+ component: SecurityIndexComponent,
193
+ },
194
+ {
195
+ path: 'verification',
196
+ component: SecurityVerificationComponent,
197
+ },
198
+ // {
199
+ // path: 'faceid',
200
+ // component: SecurityFaceidComponent,
201
+ // },
202
+ { path: 'password', component: SecurityPasswordComponent },
203
+ ];
204
+
205
+ export { securityRoutes as default };
206
+ //# sourceMappingURL=rolatech-angular-account-security.routes-S3BzviKf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-security.routes-S3BzviKf.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/security/security-index/security-index.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/security/security-index/security-index.component.html","../../../../libs/angular-account/src/lib/pages/myaccount/security/security-password/security-password.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/security/security-password/security-password.component.html","../../../../libs/angular-account/src/lib/pages/myaccount/security/security-verification/security-verification.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/security/security-verification/security-verification.component.html","../../../../libs/angular-account/src/lib/pages/myaccount/security/security.routes.ts"],"sourcesContent":["import { Component, OnInit, inject } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuthService, FaceidDetectDialogComponent } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, WechatConnectDialogComponent } from '@rolatech/angular-components';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-account-security-index',\n templateUrl: './security-index.component.html',\n styleUrls: ['./security-index.component.scss'],\n})\nexport class SecurityIndexComponent implements OnInit {\n dialog = inject(MatDialog);\n authService = inject(AuthService);\n bind = false;\n verified = false;\n\n constructor() {}\n\n ngOnInit(): void {\n this.wechatStatus();\n }\n faceId() {\n const dialogRef = this.dialog.open(FaceidDetectDialogComponent, {\n data: {},\n });\n dialogRef.afterClosed().subscribe((result) => {\n this.verified = result;\n });\n }\n connectWeChat() {\n // const redirectUri = 'https://accounts.pinxiaoke.cn/login';\n const redirectUri = `${window.location.origin}/login`;\n\n const dialogRef = this.dialog.open(WechatConnectDialogComponent, {\n data: {\n appid: 'wx567acbea73439828',\n redirect_uri: redirectUri,\n state: 'add',\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n this.wechatStatus();\n });\n }\n disconnectWeChat() {\n this.authService.wechatDisconnect().subscribe({\n next: (res) => {\n this.bind = false;\n },\n });\n }\n wechatStatus() {\n this.authService.wechatStatus({ id: 'me' }).subscribe({\n next: (res) => {\n this.bind = res.data?.openid !== undefined;\n },\n });\n }\n}\n","<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">安全设置</p>\n <p class=\"text-md\">用户信息的安全设置</p>\n </div>\n <div class=\"border border-grap-400 rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">基本设置</div>\n <mat-nav-list>\n <mat-list-item (click)=\"faceId()\">\n <div class=\"flex items-center justify-between\">\n <span>实名认证</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!verified) {\n <span class=\"mr-3\"> 未认证 </span>\n }\n @if (verified) {\n <a class=\"mr-3\"> 已认证 </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> 解绑 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item>\n <div class=\"flex items-center justify-between\">\n <span>微信绑定</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!bind) {\n <span class=\"mr-3\" (click)=\"connectWeChat()\"> 绑定 </span>\n }\n @if (bind) {\n <a class=\"mr-3\"> 已绑定 </a>\n }\n <!-- @if (bind) {\n <a class=\"mr-3\" (click)=\"disconnectWeChat()\"> 解绑 </a>\n } -->\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item routerLink=\"./password\">\n <div class=\"flex items-center justify-between\">\n <span>密码设置</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n </div>\n</div>\n","import { Component, OnInit } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective],\n selector: 'rolatech-account-security-password',\n templateUrl: './security-password.component.html',\n styleUrls: ['./security-password.component.scss'],\n})\nexport class SecurityPasswordComponent implements OnInit {\n passwordForm!: FormGroup;\n\n constructor(\n private formBuilder: FormBuilder,\n private authService: AuthService,\n private snackBar: MatSnackBar,\n ) {}\n\n ngOnInit(): void {\n this.passwordForm = this.formBuilder.group({\n oldPassword: ['', Validators.required],\n newPassword: ['', Validators.required],\n ne2Password: ['', Validators.required],\n });\n }\n save() {\n if (!this.passwordForm.valid) {\n return;\n }\n this.authService.changePassword(this.passwordForm.value).subscribe({\n next: (res: any) => {\n this.snackBar.open(res.message);\n },\n error: (e) => {\n this.snackBar.open(e.message);\n },\n });\n }\n}\n","<div>\n <div class=\"px-3 max-w-[1120px] m-auto\">\n <div class=\"flex items-center\">\n <div class=\"flex items-center justify-center w-11 h-11 cursor-pointer\" rolatechBackButton>\n <mat-icon>arrow_back</mat-icon>\n </div>\n <span class=\"text-xl font-medium\">修改密码</span>\n </div>\n </div>\n <div class=\"px-4\">\n <mat-divider></mat-divider>\n </div>\n</div>\n<div class=\"max-w-[1120px] m-auto px-6\">\n <p class=\"text-md my-3\">修改用户密码</p>\n <div class=\"mt-3\">\n <form [formGroup]=\"passwordForm\">\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label> 原密码</mat-label>\n <input matInput type=\"password\" formControlName=\"oldPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 新密码 </mat-label>\n <input matInput type=\"password\" formControlName=\"newPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label> 新密码 </mat-label>\n <input matInput type=\"password\" formControlName=\"ne2Password\" required />\n </mat-form-field>\n </div>\n </form>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-[128px] p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n 保存\n </button>\n </div>\n </div>\n</div>\n","import { Component, ElementRef, OnInit, Renderer2, ViewChild, inject } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, LoadingSpinnerComponent } from '@rolatech/angular-components';\nimport * as QRCode from 'qrcode';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, LoadingSpinnerComponent],\n selector: 'rolatech-account-security-verification',\n templateUrl: './security-verification.component.html',\n styleUrls: ['./security-verification.component.scss'],\n})\nexport class SecurityVerificationComponent implements OnInit {\n dialog = inject(MatDialog);\n authService = inject(AuthService);\n verified = false;\n renderer = inject(Renderer2);\n @ViewChild('qrcode', { static: false }) qrcElement!: ElementRef;\n loading = false;\n BizToken = '';\n identification = {};\n ngOnInit(): void {\n this.check();\n }\n check() {\n this.authService.faceIdStatus().subscribe({\n next: (res) => {\n this.verified = res.data.verified;\n },\n });\n }\n verify() {\n this.loading = true;\n this.authService.requestFaceIdDetect().subscribe({\n next: ({ data }) => {\n this.genQRCode(data.url);\n // this.loop();\n },\n error: () => {\n this.loading = false;\n },\n });\n }\n loop() {\n const interval = setInterval(() => {\n this.authService.faceIdStatus().subscribe({\n next: (res) => {\n if (res) {\n clearInterval(interval);\n }\n },\n });\n this;\n }, 2000);\n }\n\n genQRCode(url: string) {\n const element: Element = this.renderer.createElement('canvas');\n this.toCanvas(element, url)\n .then(() => {\n this.renderElement(element);\n })\n .catch((e) => {\n this.removeElementChildren();\n });\n }\n\n private toCanvas(canvas: any, url: any): Promise<any> {\n return QRCode.toCanvas(canvas, url, {\n errorCorrectionLevel: 'M',\n width: 200,\n });\n }\n private renderElement(element: any): void {\n this.removeElementChildren();\n this.renderer.appendChild(this.qrcElement.nativeElement, element);\n }\n private removeElementChildren(): void {\n for (const node of this.qrcElement.nativeElement.childNodes) {\n this.renderer.removeChild(this.qrcElement.nativeElement, node);\n }\n }\n}\n","<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px]\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">实名认证</p>\n <p class=\"text-md\">实名认证, 会让你的账户更加安全</p>\n </div>\n </div>\n @if (verified) {\n <div class=\"p-3\">\n <div class=\"text-md font-bold py-3\">您已经完成实名认证</div>\n <div class=\"flex flex-col\">\n <div><span class=\"text-gray-600\">姓名: </span> <span>22</span></div>\n <div><span class=\"text-gray-600\">身份证: </span><span>22</span></div>\n </div>\n </div>\n } @else {\n <div>未认证</div>\n <button mat-raised-button (click)=\"verify()\" color=\"primary\">请求认证</button>\n <div #qrcode>\n @if (loading) {\n <div>\n <rolatech-loading-spinner></rolatech-loading-spinner>\n </div>\n }\n </div>\n }\n</div>\n","import { Routes } from '@angular/router';\nimport { SecurityIndexComponent } from './security-index/security-index.component';\nimport { SecurityPasswordComponent } from './security-password/security-password.component';\nimport { SecurityFaceidComponent } from './security-faceid/security-faceid.component';\nimport { SecurityVerificationComponent } from './security-verification/security-verification.component';\n\nconst securityRoutes: Routes = [\n {\n path: '',\n component: SecurityIndexComponent,\n },\n {\n path: 'verification',\n component: SecurityVerificationComponent,\n },\n // {\n // path: 'faceid',\n // component: SecurityFaceidComponent,\n // },\n { path: 'password', component: SecurityPasswordComponent },\n];\n\nexport default securityRoutes;\n"],"names":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;MAaa,sBAAsB,CAAA;AAMjC,IAAA,WAAA,GAAA;AALA,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAC3B,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QAClC,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;QACb,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAED;IAEhB,QAAQ,GAAA;QACN,IAAI,CAAC,YAAY,EAAE,CAAC;KACrB;IACD,MAAM,GAAA;QACJ,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE;AAC9D,YAAA,IAAI,EAAE,EAAE;AACT,SAAA,CAAC,CAAC;QACH,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;AAC3C,YAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;AACzB,SAAC,CAAC,CAAC;KACJ;IACD,aAAa,GAAA;;QAEX,MAAM,WAAW,GAAG,CAAG,EAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAA,MAAA,CAAQ,CAAC;QAEtD,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,EAAE;AAC/D,YAAA,IAAI,EAAE;AACJ,gBAAA,KAAK,EAAE,oBAAoB;AAC3B,gBAAA,YAAY,EAAE,WAAW;AACzB,gBAAA,KAAK,EAAE,KAAK;AACb,aAAA;AACF,SAAA,CAAC,CAAC;QACH,SAAS,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,KAAI;YAC3C,IAAI,CAAC,YAAY,EAAE,CAAC;AACtB,SAAC,CAAC,CAAC;KACJ;IACD,gBAAgB,GAAA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AAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDlBY,mBAAmB,EAAE,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,uBAAuB,8NAAE,uBAAuB,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKpE,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAPzC,SAAS;iCACI,IAAI,EAAA,OAAA,EACP,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC,EAAA,QAAA,EACtE,wCAAwC,EAAA,QAAA,EAAA,yiCAAA,EAAA,CAAA;8BASV,UAAU,EAAA,CAAA;sBAAjD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,QAAQ,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;;;AEbxC,MAAM,cAAc,GAAW;AAC7B,IAAA;AACE,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,SAAS,EAAE,sBAAsB;AAClC,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,SAAS,EAAE,6BAA6B;AACzC,KAAA;;;;;AAKD,IAAA,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,yBAAyB,EAAE;;;;;"}
@@ -0,0 +1,9 @@
1
+ var UserGender;
2
+ (function (UserGender) {
3
+ UserGender[UserGender["MALE"] = '男'] = "MALE";
4
+ UserGender[UserGender["FEMALE"] = '女'] = "FEMALE";
5
+ UserGender[UserGender["RATHER_NOT_SAY"] = '不公开'] = "RATHER_NOT_SAY";
6
+ })(UserGender || (UserGender = {}));
7
+
8
+ export { UserGender as U };
9
+ //# sourceMappingURL=rolatech-angular-account-user-CK_zEFn_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-user-CK_zEFn_.mjs","sources":["../../../../libs/angular-account/src/lib/contant/user.ts"],"sourcesContent":["export enum UserGender {\n MALE = <any>'男',\n FEMALE = <any>'女',\n RATHER_NOT_SAY = <any>'不公开',\n}\n"],"names":[],"mappings":"IAAY,WAIX;AAJD,CAAA,UAAY,UAAU,EAAA;IACpB,UAAY,CAAA,UAAA,CAAA,MAAA,CAAA,GAAA,GAAG,UAAA,CAAA;IACf,UAAc,CAAA,UAAA,CAAA,QAAA,CAAA,GAAA,GAAG,YAAA,CAAA;IACjB,UAAsB,CAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,KAAK,oBAAA,CAAA;AAC7B,CAAC,EAJW,UAAU,KAAV,UAAU,GAIrB,EAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,44 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, ViewEncapsulation } from '@angular/core';
3
+ import { AuthUserService } from '@rolatech/angular-auth';
4
+ import { AngularCommonModule } from '@rolatech/angular-common';
5
+ import { BaseComponent, AngularComponentsModule } from '@rolatech/angular-components';
6
+ import { BackButtonDirective } from '@rolatech/angular-services';
7
+ import * as i1 from '@angular/forms';
8
+ import * as i2 from '@angular/material/button';
9
+ import * as i3 from '@angular/material/form-field';
10
+ import * as i4 from '@angular/material/input';
11
+
12
+ class UsernameComponent extends BaseComponent {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.authUserService = inject(AuthUserService);
16
+ this.username = '';
17
+ }
18
+ ngOnInit() {
19
+ this.authUserService.me().subscribe({
20
+ next: (res) => {
21
+ this.username = res.username;
22
+ },
23
+ });
24
+ }
25
+ save() {
26
+ this.authUserService.changeUsername(this.username).subscribe({
27
+ next: (res) => {
28
+ this.snackBarService.open(res.data);
29
+ },
30
+ error: (error) => {
31
+ this.snackBarService.open(error.message);
32
+ },
33
+ });
34
+ }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UsernameComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
36
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.2.1", type: UsernameComponent, isStandalone: true, selector: "rolatech-account-username", usesInheritance: true, ngImport: i0, template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] p-4\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u4FEE\u6539\u7528\u6237\u540D</p>\n <p class=\"text-md\">\u7528\u6237\u540D\u662F\u60A8\u5728\u672C\u7AD9\u7684\u552F\u4E00\u6807\u8BC6</p>\n </div>\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <span matTextPrefix>&#64;</span>\n <input matInput [(ngModel)]=\"username\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-20 p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n \u4FDD\u5B58\n </button>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: 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.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { 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"], exportAs: ["matInput"] }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }], encapsulation: i0.ViewEncapsulation.None }); }
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.2.1", ngImport: i0, type: UsernameComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ standalone: true, imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective], selector: 'rolatech-account-username', encapsulation: ViewEncapsulation.None, template: "<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] p-4\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">\u4FEE\u6539\u7528\u6237\u540D</p>\n <p class=\"text-md\">\u7528\u6237\u540D\u662F\u60A8\u5728\u672C\u7AD9\u7684\u552F\u4E00\u6807\u8BC6</p>\n </div>\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <span matTextPrefix>&#64;</span>\n <input matInput [(ngModel)]=\"username\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-20 p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n \u4FDD\u5B58\n </button>\n </div>\n </div>\n</div>\n" }]
41
+ }] });
42
+
43
+ export { UsernameComponent };
44
+ //# sourceMappingURL=rolatech-angular-account-username.component-C6pM8g84.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account-username.component-C6pM8g84.mjs","sources":["../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/username/username.component.ts","../../../../libs/angular-account/src/lib/pages/myaccount/personal-info/username/username.component.html"],"sourcesContent":["import { Component, OnInit, ViewEncapsulation, inject } from '@angular/core';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\nimport { Observable } from 'rxjs';\n\n@Component({\n standalone: true,\n imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective],\n selector: 'rolatech-account-username',\n templateUrl: './username.component.html',\n styleUrls: ['./username.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class UsernameComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n user$!: Observable<any>;\n username = '';\n\n ngOnInit(): void {\n this.authUserService.me().subscribe({\n next: (res) => {\n this.username = res.username;\n },\n });\n }\n\n save() {\n this.authUserService.changeUsername(this.username).subscribe({\n next: (res) => {\n this.snackBarService.open(res.data);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<div class=\"max-w-[1120px] m-auto\">\n <div class=\"max-w-[820px] p-4\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <p class=\"text-3xl\">修改用户名</p>\n <p class=\"text-md\">用户名是您在本站的唯一标识</p>\n </div>\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <span matTextPrefix>&#64;</span>\n <input matInput [(ngModel)]=\"username\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button\n class=\"bg-orange-600 shadow shadow-gray-300 cursor-pointer w-20 p-2 text-white rounded text-center ml-3\"\n (click)=\"save()\"\n >\n 保存\n </button>\n </div>\n </div>\n</div>\n"],"names":[],"mappings":";;;;;;;;;;;AAeM,MAAO,iBAAkB,SAAQ,aAAa,CAAA;AARpD,IAAA,WAAA,GA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A,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,uBAAuB,o3BAAE,mBAAmB,EAAA,QAAA,EAAA,sBAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAMhE,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAR7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,CAAC,EAClE,QAAA,EAAA,2BAA2B,EAGtB,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,64BAAA,EAAA,CAAA;;;;;"}
@@ -0,0 +1,15 @@
1
+ export { a as accountRoutes, m as myaccountRoutes, p as provideAngularAuthRoutes } from './rolatech-angular-account-rolatech-angular-account-Dqz2XIdy.mjs';
2
+ import '@rolatech/angular-auth';
3
+ import '@angular/core';
4
+ import '@angular/common';
5
+ import '@angular/material/snack-bar';
6
+ import '@angular/router';
7
+ import '@rolatech/angular-common';
8
+ import '@rolatech/angular-components';
9
+ import '@angular/forms';
10
+ import '@angular/platform-browser';
11
+ import '@angular/material/form-field';
12
+ import '@angular/material/input';
13
+ import '@angular/material/tabs';
14
+ import '@angular/material/button';
15
+ //# sourceMappingURL=rolatech-angular-account.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rolatech-angular-account.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/account.routes';
2
+ export * from './provider';
@@ -0,0 +1,3 @@
1
+ import { Routes } from '@angular/router';
2
+ export declare const accountRoutes: Routes;
3
+ export declare const myaccountRoutes: Routes;
@@ -0,0 +1,23 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { MatDialogRef } from '@angular/material/dialog';
3
+ import { AuthUserService } from '@rolatech/angular-auth';
4
+ import { SnackBarService } from '@rolatech/angular-services';
5
+ import * as i0 from "@angular/core";
6
+ export declare class AvatarUpdateDialogComponent {
7
+ data: {
8
+ avatar: string;
9
+ };
10
+ dialogRef: MatDialogRef<any, any>;
11
+ authUserService: AuthUserService;
12
+ snackBarService: SnackBarService;
13
+ avatar: any;
14
+ save: EventEmitter<any>;
15
+ constructor(data: {
16
+ avatar: string;
17
+ });
18
+ cancel(): void;
19
+ onSave(): void;
20
+ onUpload(event: any): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<AvatarUpdateDialogComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarUpdateDialogComponent, "rolatech-account-avatar-update-dialog", never, {}, { "save": "save"; }, never, never, true, never>;
23
+ }
@@ -0,0 +1,8 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ForgotPasswordComponent implements OnInit {
4
+ constructor();
5
+ ngOnInit(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ForgotPasswordComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<ForgotPasswordComponent, "rolatech-account-forgot-password", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,15 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { AuthService } from '@rolatech/angular-auth';
3
+ import { BaseComponent } from '@rolatech/angular-components';
4
+ import { WeChatLoginService } from '../../../services/wechat-login.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LoginWechatComponent extends BaseComponent implements OnInit {
7
+ authService: AuthService;
8
+ environment: any;
9
+ platformId: Object;
10
+ wechtLoginService: WeChatLoginService;
11
+ ngOnInit(): void;
12
+ wechatLogin(code: string, state: string): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoginWechatComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoginWechatComponent, "rolatech-account-login-wechat", never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,3 @@
1
+ import { Routes } from '@angular/router';
2
+ declare const loginRoutes: Routes;
3
+ export default loginRoutes;
@@ -0,0 +1,19 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatSnackBar } from '@angular/material/snack-bar';
3
+ import { ActivatedRoute, Router } from '@angular/router';
4
+ import { AuthService } from '@rolatech/angular-auth';
5
+ import * as i0 from "@angular/core";
6
+ export declare class LogoutComponent implements OnInit {
7
+ service: string;
8
+ continue: string;
9
+ environment: any;
10
+ platformId: Object;
11
+ route: ActivatedRoute;
12
+ router: Router;
13
+ authService: AuthService;
14
+ snackBar: MatSnackBar;
15
+ ngOnInit(): void;
16
+ logout(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<LogoutComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<LogoutComponent, "rolatech-account-logout", never, {}, {}, never, never, true, never>;
19
+ }
@@ -0,0 +1,8 @@
1
+ import { OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PasswordresetComponent implements OnInit {
4
+ constructor();
5
+ ngOnInit(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<PasswordresetComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<PasswordresetComponent, "rolatech-account-passwordreset", never, {}, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,39 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { MatTabChangeEvent } from '@angular/material/tabs';
4
+ import { SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
5
+ import { BaseComponent } from '@rolatech/angular-components';
6
+ import { AuthService, AuthUserService } from '@rolatech/angular-auth';
7
+ import { WeChatLoginService } from '../../services/wechat-login.service';
8
+ import * as i0 from "@angular/core";
9
+ export declare class SigninComponent extends BaseComponent implements OnInit {
10
+ passrodForm: FormGroup;
11
+ codeForm: FormGroup;
12
+ continue: string;
13
+ environment: any;
14
+ platformId: Object;
15
+ formBuilder: FormBuilder;
16
+ authService: AuthService;
17
+ authUserService: AuthUserService;
18
+ wechtLoginService: WeChatLoginService;
19
+ tabIndex: number;
20
+ countDown: boolean;
21
+ countDownTime: number;
22
+ showButtonText: string;
23
+ appid: string;
24
+ state: string;
25
+ urlSafe: SafeResourceUrl;
26
+ sanitizer: DomSanitizer;
27
+ baseUrl: string;
28
+ onLogin(event: any): void;
29
+ ngOnInit(): void;
30
+ get form(): {
31
+ [key: string]: import("@angular/forms").AbstractControl<any, any>;
32
+ };
33
+ sendSMSCode(): void;
34
+ login(): void;
35
+ onSelectedTabChange(e: MatTabChangeEvent): void;
36
+ wechat(): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<SigninComponent, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<SigninComponent, "rolatech-account-auth-signin", never, {}, {}, never, never, true, never>;
39
+ }
@@ -0,0 +1,21 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { BaseComponent } from '@rolatech/angular-components';
4
+ import { AuthUserService } from '@rolatech/angular-auth';
5
+ import * as i0 from "@angular/core";
6
+ export declare class SignupComponent extends BaseComponent implements OnInit {
7
+ signupForm: FormGroup;
8
+ continue: string;
9
+ authUserService: AuthUserService;
10
+ formBuilder: FormBuilder;
11
+ environment: any;
12
+ window: Window;
13
+ countDown: boolean;
14
+ countDownTime: number;
15
+ showButtonText: string;
16
+ ngOnInit(): void;
17
+ sendSMSCode(): void;
18
+ submit(): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<SignupComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<SignupComponent, "rolatech-account-signup", never, {}, {}, never, never, true, never>;
21
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum UserGender {
2
+ MALE,
3
+ FEMALE,
4
+ RATHER_NOT_SAY
5
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { AuthUserService } from '@rolatech/angular-auth';
3
+ import { BaseComponent } from '@rolatech/angular-components';
4
+ import { Observable } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ export declare class EmailComponent extends BaseComponent implements OnInit {
7
+ authUserService: AuthUserService;
8
+ user$: Observable<any>;
9
+ email: string;
10
+ ngOnInit(): void;
11
+ save(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<EmailComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<EmailComponent, "rolatech-account-email", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,9 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { BaseComponent } from '@rolatech/angular-components';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EmailVerificationComponent extends BaseComponent implements OnInit {
5
+ ngOnInit(): void;
6
+ show(): void;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<EmailVerificationComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<EmailVerificationComponent, "myaccount-email-verification", never, {}, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { AuthUserService } from '@rolatech/angular-auth';
3
+ import { BaseComponent } from '@rolatech/angular-components';
4
+ import * as i0 from "@angular/core";
5
+ export declare class GenderComponent extends BaseComponent implements OnInit {
6
+ authUserService: AuthUserService;
7
+ genders: string[];
8
+ gender: any;
9
+ selectedGender: string;
10
+ ngOnInit(): void;
11
+ save(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<GenderComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<GenderComponent, "rolatech-account-gender", never, {}, {}, never, never, true, never>;
14
+ }
@@ -0,0 +1,12 @@
1
+ import { Observable } from 'rxjs';
2
+ import { OnInit } from '@angular/core';
3
+ import { AuthUserService } from '@rolatech/angular-auth';
4
+ import { BaseComponent } from '@rolatech/angular-components';
5
+ import * as i0 from "@angular/core";
6
+ export declare class HomeComponent extends BaseComponent implements OnInit {
7
+ user$: Observable<any>;
8
+ authUserService: AuthUserService;
9
+ ngOnInit(): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<HomeComponent, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<HomeComponent, "rolatech-account-home", never, {}, {}, never, never, true, never>;
12
+ }