@rolatech/angular-account 19.0.0-beta.9 → 20.0.0-beta.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.
- package/fesm2022/rolatech-angular-account-address-add.component-wa2bcup4.mjs +36 -0
- package/fesm2022/rolatech-angular-account-address-add.component-wa2bcup4.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-address-billing.component-BQez3wKq.mjs +35 -0
- package/fesm2022/rolatech-angular-account-address-billing.component-BQez3wKq.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-detail.component-ZOfWc_yz.mjs → rolatech-angular-account-address-detail.component-BLlet9GE.mjs} +6 -6
- package/fesm2022/rolatech-angular-account-address-detail.component-BLlet9GE.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address-home.component-C4QYRh5u.mjs → rolatech-angular-account-address-home.component-Cq8df4BZ.mjs} +5 -5
- package/fesm2022/rolatech-angular-account-address-home.component-Cq8df4BZ.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-address-shipping.component-BoCUP8BP.mjs +40 -0
- package/fesm2022/rolatech-angular-account-address-shipping.component-BoCUP8BP.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-address-work.component-DZVmQk00.mjs +35 -0
- package/fesm2022/rolatech-angular-account-address-work.component-DZVmQk00.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-address.routes-Ch53Z6As.mjs → rolatech-angular-account-address.routes-BG537bit.mjs} +7 -7
- package/fesm2022/rolatech-angular-account-address.routes-BG537bit.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-email-verification.component-B8pTGyx9.mjs → rolatech-angular-account-email-verification.component-CFXEcDgQ.mjs} +5 -5
- package/fesm2022/rolatech-angular-account-email-verification.component-CFXEcDgQ.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-email.component-Cln1gL9k.mjs +44 -0
- package/fesm2022/rolatech-angular-account-email.component-Cln1gL9k.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-gender.component-BSNLzoVL.mjs +55 -0
- package/fesm2022/rolatech-angular-account-gender.component-BSNLzoVL.mjs.map +1 -0
- package/fesm2022/{rolatech-angular-account-home.component-DnsqsRNc.mjs → rolatech-angular-account-home.component-BNs5snXX.mjs} +5 -5
- package/fesm2022/rolatech-angular-account-home.component-BNs5snXX.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-info.component-3eu2_7TG.mjs +111 -0
- package/fesm2022/rolatech-angular-account-info.component-3eu2_7TG.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-phone.component-BLHE_waH.mjs +76 -0
- package/fesm2022/rolatech-angular-account-phone.component-BLHE_waH.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-profile.component-CLXgdPX-.mjs +43 -0
- package/fesm2022/rolatech-angular-account-profile.component-CLXgdPX-.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-security.routes-CQH41xZs.mjs +237 -0
- package/fesm2022/rolatech-angular-account-security.routes-CQH41xZs.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-user-CJa0pCxF.mjs +9 -0
- package/fesm2022/rolatech-angular-account-user-CJa0pCxF.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account-username.component-BmX7QCbs.mjs +42 -0
- package/fesm2022/rolatech-angular-account-username.component-BmX7QCbs.mjs.map +1 -0
- package/fesm2022/rolatech-angular-account.mjs +511 -1
- package/fesm2022/rolatech-angular-account.mjs.map +1 -1
- package/index.d.ts +29 -4
- package/package.json +11 -13
- package/fesm2022/rolatech-angular-account-address-add.component-Bj6pnCLm.mjs +0 -36
- package/fesm2022/rolatech-angular-account-address-add.component-Bj6pnCLm.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-billing.component-P1YV-5wC.mjs +0 -35
- package/fesm2022/rolatech-angular-account-address-billing.component-P1YV-5wC.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-detail.component-ZOfWc_yz.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-home.component-C4QYRh5u.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs +0 -40
- package/fesm2022/rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address-work.component-DELZ5ymv.mjs +0 -35
- package/fesm2022/rolatech-angular-account-address-work.component-DELZ5ymv.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-address.routes-Ch53Z6As.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-email-verification.component-B8pTGyx9.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-email.component-Q9ZpDLPX.mjs +0 -44
- package/fesm2022/rolatech-angular-account-email.component-Q9ZpDLPX.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-gender.component-DrxiKHvu.mjs +0 -55
- package/fesm2022/rolatech-angular-account-gender.component-DrxiKHvu.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-home.component-DnsqsRNc.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-info.component-BwS2LI6u.mjs +0 -112
- package/fesm2022/rolatech-angular-account-info.component-BwS2LI6u.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-login.routes-CHrOk4GX.mjs +0 -43
- package/fesm2022/rolatech-angular-account-login.routes-CHrOk4GX.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-phone.component-CYHAQ-Zb.mjs +0 -76
- package/fesm2022/rolatech-angular-account-phone.component-CYHAQ-Zb.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-profile.component-JIuW8kyu.mjs +0 -43
- package/fesm2022/rolatech-angular-account-profile.component-JIuW8kyu.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs +0 -465
- package/fesm2022/rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-security.routes-ezGjJPgA.mjs +0 -237
- package/fesm2022/rolatech-angular-account-security.routes-ezGjJPgA.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs +0 -9
- package/fesm2022/rolatech-angular-account-user-CK_zEFn_.mjs.map +0 -1
- package/fesm2022/rolatech-angular-account-username.component-C4k-jzFG.mjs +0 -42
- package/fesm2022/rolatech-angular-account-username.component-C4k-jzFG.mjs.map +0 -1
- package/lib/account.routes.d.ts +0 -2
- package/lib/components/avatar-update-dialog/avatar-update-dialog.component.d.ts +0 -22
- package/lib/components/forgot-password/forgot-password.component.d.ts +0 -8
- package/lib/components/index.d.ts +0 -1
- package/lib/components/login/login-wechat/login-wechat.component.d.ts +0 -15
- package/lib/components/login/login.routes.d.ts +0 -3
- package/lib/components/logout/logout.component.d.ts +0 -19
- package/lib/components/passwordreset/passwordreset.component.d.ts +0 -8
- package/lib/components/topbar-login/topbar-login.component.d.ts +0 -20
- package/lib/contant/user.d.ts +0 -5
- package/lib/myaccount.routes.d.ts +0 -2
- package/lib/pages/accounts/signin/signin.component.d.ts +0 -39
- package/lib/pages/accounts/signup/signup.component.d.ts +0 -21
- package/lib/pages/myaccount/address/address-add/address-add.component.d.ts +0 -11
- package/lib/pages/myaccount/address/address-billing/address-billing.component.d.ts +0 -12
- package/lib/pages/myaccount/address/address-detail/address-detail.component.d.ts +0 -14
- package/lib/pages/myaccount/address/address-home/address-home.component.d.ts +0 -12
- package/lib/pages/myaccount/address/address-shipping/address-shipping.component.d.ts +0 -12
- package/lib/pages/myaccount/address/address-work/address-work.component.d.ts +0 -12
- package/lib/pages/myaccount/address/address.routes.d.ts +0 -2
- package/lib/pages/myaccount/email/email.component.d.ts +0 -15
- package/lib/pages/myaccount/email-verification/email-verification.component.d.ts +0 -9
- package/lib/pages/myaccount/gender/gender.component.d.ts +0 -17
- package/lib/pages/myaccount/home/home.component.d.ts +0 -11
- package/lib/pages/myaccount/personal-info/info.component.d.ts +0 -18
- package/lib/pages/myaccount/personal-info/profile/profile.component.d.ts +0 -14
- package/lib/pages/myaccount/personal-info/username/username.component.d.ts +0 -14
- package/lib/pages/myaccount/phone/phone.component.d.ts +0 -19
- package/lib/pages/myaccount/security/security-faceid/security-faceid.component.d.ts +0 -5
- package/lib/pages/myaccount/security/security-index/security-index.component.d.ts +0 -22
- package/lib/pages/myaccount/security/security-password/security-password.component.d.ts +0 -16
- package/lib/pages/myaccount/security/security-verification/security-verification.component.d.ts +0 -24
- package/lib/pages/myaccount/security/security.routes.d.ts +0 -3
- package/lib/services/wechat-login.service.d.ts +0 -9
- package/provider.d.ts +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-address-home.component-C4QYRh5u.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/address/address-home/address-home.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/address/address-home/address-home.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AddressComponent, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-account-address-home',\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n BackButtonDirective,\n ContainerComponent,\n ToolbarComponent,\n AddressComponent,\n ],\n templateUrl: './address-home.component.html',\n styleUrl: './address-home.component.scss',\n})\nexport class AddressHomeComponent implements OnInit {\n authUserService = inject(AuthUserService);\n address: any = { type: 'HOME' };\n\n ngOnInit(): void {\n this.find();\n }\n find() {\n const options = {\n filter: 'type:HOME',\n };\n this.authUserService.findAllAddress(options).subscribe({\n next: (res) => {\n this.address = res.data[0];\n },\n });\n }\n save() {\n if (this.address.id) {\n this.authUserService.updateAddress(this.address.id, this.address).subscribe({\n next: (res) => {},\n });\n } else {\n this.authUserService.addAddress(this.address).subscribe({\n next: (res) => {},\n });\n }\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"住宅地址\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">填写您的地址, 可以在其他服务中快速使用.</p>\n <rolatech-address [(address)]=\"address\"></rolatech-address>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-container>\n"],"names":["i1"],"mappings":";;;;;;;;MAmBa,oBAAoB,CAAA;AAbjC,IAAA,WAAA,GAAA;AAcE,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;AA0BhC;IAxBC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE;;IAEb,IAAI,GAAA;AACF,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,MAAM,EAAE,WAAW;SACpB;QACD,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACrD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;gBACZ,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3B;AACF,SAAA,CAAC;;IAEJ,IAAI,GAAA;AACF,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE;AACnB,YAAA,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AAC1E,gBAAA,IAAI,EAAE,CAAC,GAAG,QAAO;AAClB,aAAA,CAAC;;aACG;YACL,IAAI,CAAC,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACtD,gBAAA,IAAI,EAAE,CAAC,GAAG,QAAO;AAClB,aAAA,CAAC;;;8GAzBK,oBAAoB,EAAA,IA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wBAChB,gBAAgB;AACjB,qBAAA,EAAA,QAAA,EAAA,inBAAA,EAAA;;;;;"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component } from '@angular/core';
|
|
3
|
-
import { AuthUserService } from '@rolatech/angular-auth';
|
|
4
|
-
import { AngularCommonModule, AddressFormatPipe } from '@rolatech/angular-common';
|
|
5
|
-
import { AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
|
|
6
|
-
import * as i1 from '@angular/router';
|
|
7
|
-
import * as i2 from '@angular/material/button';
|
|
8
|
-
import * as i2$1 from '@angular/material/divider';
|
|
9
|
-
import * as i3 from '@angular/material/icon';
|
|
10
|
-
import * as i4 from '@angular/material/list';
|
|
11
|
-
|
|
12
|
-
class AddressShippingComponent {
|
|
13
|
-
constructor() {
|
|
14
|
-
this.authUserService = inject(AuthUserService);
|
|
15
|
-
this.addresses = [];
|
|
16
|
-
}
|
|
17
|
-
ngOnInit() {
|
|
18
|
-
this.find();
|
|
19
|
-
}
|
|
20
|
-
find() {
|
|
21
|
-
const options = {
|
|
22
|
-
filter: 'type:SHIPPING',
|
|
23
|
-
};
|
|
24
|
-
this.authUserService.findAllAddress(options).subscribe({
|
|
25
|
-
next: (res) => {
|
|
26
|
-
this.addresses = res.data;
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
save() { }
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AddressShippingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: AddressShippingComponent, isStandalone: true, selector: "rolatech-account-address-shipping", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u5730\u5740\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <button mat-stroked-button routerLink=\"../add\">\n <mat-icon>add</mat-icon>\n \u6DFB\u52A0\u5730\u5740\n </button>\n <mat-nav-list>\n @for (item of addresses; track $index) {\n <mat-list-item [routerLink]=\"['../', item.id]\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span>{{ item | address }}</span>\n </div>\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-divider></mat-divider>\n }\n </mat-nav-list>\n </div>\n</rolatech-container>\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.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i2$1.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"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "pipe", type: AddressFormatPipe, name: "address" }] }); }
|
|
33
|
-
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AddressShippingComponent, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: 'rolatech-account-address-shipping', imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent, ToolbarComponent, AddressFormatPipe], template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8D2D\u7269\u5730\u5740\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <button mat-stroked-button routerLink=\"../add\">\n <mat-icon>add</mat-icon>\n \u6DFB\u52A0\u5730\u5740\n </button>\n <mat-nav-list>\n @for (item of addresses; track $index) {\n <mat-list-item [routerLink]=\"['../', item.id]\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span>{{ item | address }}</span>\n </div>\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-divider></mat-divider>\n }\n </mat-nav-list>\n </div>\n</rolatech-container>\n" }]
|
|
37
|
-
}] });
|
|
38
|
-
|
|
39
|
-
export { AddressShippingComponent };
|
|
40
|
-
//# sourceMappingURL=rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-address-shipping.component-DhXX3Ksi.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/address/address-shipping/address-shipping.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/address/address-shipping/address-shipping.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { AddressFormatPipe, AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\n\n@Component({\n selector: 'rolatech-account-address-shipping',\n imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent, ToolbarComponent, AddressFormatPipe],\n templateUrl: './address-shipping.component.html',\n styleUrl: './address-shipping.component.scss',\n})\nexport class AddressShippingComponent implements OnInit {\n authUserService = inject(AuthUserService);\n addresses: any = [];\n\n ngOnInit(): void {\n this.find();\n }\n find() {\n const options = {\n filter: 'type:SHIPPING',\n };\n this.authUserService.findAllAddress(options).subscribe({\n next: (res) => {\n this.addresses = res.data;\n },\n });\n }\n save() {}\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"购物地址\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <button mat-stroked-button routerLink=\"../add\">\n <mat-icon>add</mat-icon>\n 添加地址\n </button>\n <mat-nav-list>\n @for (item of addresses; track $index) {\n <mat-list-item [routerLink]=\"['../', item.id]\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span>{{ item | address }}</span>\n </div>\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-divider></mat-divider>\n }\n </mat-nav-list>\n </div>\n</rolatech-container>\n"],"names":["i3","i4","i5"],"mappings":";;;;;;;;;;;MAWa,wBAAwB,CAAA;AANrC,IAAA,WAAA,GAAA;AAOE,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QACzC,IAAS,CAAA,SAAA,GAAQ,EAAE;AAgBpB;IAdC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE;;IAEb,IAAI,GAAA;AACF,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,MAAM,EAAE,eAAe;SACxB;QACD,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACrD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,IAAI;aAC1B;AACF,SAAA,CAAC;;AAEJ,IAAA,IAAI;8GAjBO,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA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AA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,WAAA,EAAA,QAAA,EAAA,wDAAA,EAAA,MAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAIpG,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,mCAAmC,EAAA,OAAA,EACpC,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EAAA,+4BAAA,EAAA;;;;;"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component } from '@angular/core';
|
|
3
|
-
import { AuthUserService, AddressComponent } from '@rolatech/angular-auth';
|
|
4
|
-
import { AngularCommonModule } from '@rolatech/angular-common';
|
|
5
|
-
import { AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
|
|
6
|
-
import { BackButtonDirective } from '@rolatech/angular-services';
|
|
7
|
-
import * as i2 from '@angular/material/button';
|
|
8
|
-
|
|
9
|
-
class AddressWorkComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.authUserService = inject(AuthUserService);
|
|
12
|
-
this.address = { type: 'WORK' };
|
|
13
|
-
}
|
|
14
|
-
ngOnInit() {
|
|
15
|
-
this.find();
|
|
16
|
-
}
|
|
17
|
-
find() { }
|
|
18
|
-
save() { }
|
|
19
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AddressWorkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: AddressWorkComponent, isStandalone: true, selector: "rolatech-account-address-work", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u5DE5\u4F5C\u5730\u5740\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u586B\u5199\u60A8\u7684\u5730\u5740, \u53EF\u4EE5\u5728\u5176\u4ED6\u670D\u52A1\u4E2D\u5FEB\u901F\u4F7F\u7528.</p>\n <rolatech-address [(address)]=\"address\"></rolatech-address>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { 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: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "component", type: AddressComponent, selector: "rolatech-address", inputs: ["address"], outputs: ["addressChange", "output"] }] }); }
|
|
21
|
-
}
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AddressWorkComponent, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'rolatech-account-address-work', imports: [
|
|
25
|
-
AngularCommonModule,
|
|
26
|
-
AngularComponentsModule,
|
|
27
|
-
BackButtonDirective,
|
|
28
|
-
ContainerComponent,
|
|
29
|
-
ToolbarComponent,
|
|
30
|
-
AddressComponent,
|
|
31
|
-
], template: "<rolatech-container>\n <rolatech-toolbar title=\"\u5DE5\u4F5C\u5730\u5740\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u586B\u5199\u60A8\u7684\u5730\u5740, \u53EF\u4EE5\u5728\u5176\u4ED6\u670D\u52A1\u4E2D\u5FEB\u901F\u4F7F\u7528.</p>\n <rolatech-address [(address)]=\"address\"></rolatech-address>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\n" }]
|
|
32
|
-
}] });
|
|
33
|
-
|
|
34
|
-
export { AddressWorkComponent };
|
|
35
|
-
//# sourceMappingURL=rolatech-angular-account-address-work.component-DELZ5ymv.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-address-work.component-DELZ5ymv.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/address/address-work/address-work.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/address/address-work/address-work.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AddressComponent, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-account-address-work',\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n BackButtonDirective,\n ContainerComponent,\n ToolbarComponent,\n AddressComponent,\n ],\n templateUrl: './address-work.component.html',\n styleUrl: './address-work.component.scss',\n})\nexport class AddressWorkComponent implements OnInit {\n authUserService = inject(AuthUserService);\n address: any = { type: 'WORK' };\n ngOnInit(): void {\n this.find();\n }\n find() {}\n save() {}\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"工作地址\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">填写您的地址, 可以在其他服务中快速使用.</p>\n <rolatech-address [(address)]=\"address\"></rolatech-address>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-container>\n"],"names":["i1"],"mappings":";;;;;;;;MAmBa,oBAAoB,CAAA;AAbjC,IAAA,WAAA,GAAA;AAcE,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,QAAA,IAAA,CAAA,OAAO,GAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;AAMhC;IALC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE;;AAEb,IAAA,IAAI;AACJ,IAAA,IAAI;8GAPO,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,ECnBjC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,+BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,inBAWA,EDFI,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,EACnB,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,uBAAuB,EACvB,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,EAAA,CAAA,SAAA,EAAA,QAAA,EAAA,6GAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,mBAAmB,EACnB,QAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,EAClB,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,gBAAgB,gIAChB,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+BAA+B,EAChC,OAAA,EAAA;wBACP,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBACnB,kBAAkB;wBAClB,gBAAgB;wBAChB,gBAAgB;AACjB,qBAAA,EAAA,QAAA,EAAA,inBAAA,EAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-address.routes-Ch53Z6As.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/address/address.routes.ts"],"sourcesContent":["import { Route } from '@angular/router';\n\nexport const addressRoutes: Route[] = [\n {\n path: 'home',\n loadComponent: () => import('./address-home/address-home.component').then((c) => c.AddressHomeComponent),\n },\n {\n path: 'work',\n loadComponent: () => import('./address-work/address-work.component').then((c) => c.AddressWorkComponent),\n },\n {\n path: 'billing',\n loadComponent: () => import('./address-billing/address-billing.component').then((c) => c.AddressBillingComponent),\n },\n {\n path: 'shipping',\n loadComponent: () => import('./address-shipping/address-shipping.component').then((c) => c.AddressShippingComponent),\n },\n {\n path: 'add',\n loadComponent: () => import('./address-add/address-add.component').then((c) => c.AddressAddComponent),\n },\n {\n path: ':id',\n loadComponent: () => import('./address-detail/address-detail.component').then((c) => c.AddressDetailComponent),\n },\n];\n"],"names":[],"mappings":"AAEa,MAAA,aAAa,GAAY;AACpC,IAAA;AACE,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,aAAa,EAAE,MAAM,OAAO,gEAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC;AACzG,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,aAAa,EAAE,MAAM,OAAO,gEAAuC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC;AACzG,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,SAAS;AACf,QAAA,aAAa,EAAE,MAAM,OAAO,mEAA6C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,uBAAuB,CAAC;AAClH,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,UAAU;AAChB,QAAA,aAAa,EAAE,MAAM,OAAO,oEAA+C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,wBAAwB,CAAC;AACrH,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,aAAa,EAAE,MAAM,OAAO,+DAAqC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,CAAC;AACtG,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,aAAa,EAAE,MAAM,OAAO,kEAA2C,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,sBAAsB,CAAC;AAC/G,KAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-email-verification.component-B8pTGyx9.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/email-verification/email-verification.component.html"],"sourcesContent":["import { Component, inject, OnInit } from '@angular/core';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-account-email-verification',\n templateUrl: './email-verification.component.html',\n styleUrls: ['./email-verification.component.scss'],\n})\nexport class EmailVerificationComponent extends BaseComponent implements OnInit {\n ngOnInit(): void {\n this.show();\n }\n show() {\n const options = {\n title: '确认删除吗',\n message: 'CONFIRM.DOWNLOAD.JOB.MESSAGE',\n cancelText: '取消',\n confirmText: '确认',\n };\n this.dialogService.open(options);\n this.dialogService.confirmed().subscribe((confirmed) => {});\n }\n}\n","<div class=\"p-3\">Email verification</div>\n"],"names":[],"mappings":";;;;;AAUM,MAAO,0BAA2B,SAAQ,aAAa,CAAA;IAC3D,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,EAAE;;IAEb,IAAI,GAAA;AACF,QAAA,MAAM,OAAO,GAAG;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,OAAO,EAAE,8BAA8B;AACvC,YAAA,UAAU,EAAE,IAAI;AAChB,YAAA,WAAW,EAAE,IAAI;SAClB;AACD,QAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC;AAChC,QAAA,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,CAAC,SAAS,KAAM,GAAC,CAAC;;8GAZlD,0BAA0B,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA1B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,0BAA0B,ECVvC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qCAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,+CACA,EDIY,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,8BAAE,uBAAuB,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAK3C,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBANtC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,YAC7C,qCAAqC,EAAA,QAAA,EAAA,+CAAA,EAAA;;;;;"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, effect, Component } from '@angular/core';
|
|
3
|
-
import { AuthUserService, AuthStore } from '@rolatech/angular-auth';
|
|
4
|
-
import { AngularCommonModule } from '@rolatech/angular-common';
|
|
5
|
-
import { BaseComponent, AngularComponentsModule, ContainerComponent, ToolbarComponent } 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 EmailComponent extends BaseComponent {
|
|
13
|
-
constructor() {
|
|
14
|
-
super();
|
|
15
|
-
this.authUserService = inject(AuthUserService);
|
|
16
|
-
this.authStore = inject(AuthStore);
|
|
17
|
-
this.user = this.authStore.user;
|
|
18
|
-
this.email = '';
|
|
19
|
-
effect(() => {
|
|
20
|
-
this.email = this.user()?.email;
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
ngOnInit() { }
|
|
24
|
-
save() {
|
|
25
|
-
this.authUserService.update({ email: this.email }).subscribe({
|
|
26
|
-
next: (res) => {
|
|
27
|
-
this.snackBarService.open('修改成功');
|
|
28
|
-
this.authStore.updateEmail(this.email);
|
|
29
|
-
},
|
|
30
|
-
error: (error) => {
|
|
31
|
-
this.snackBarService.open(error.message);
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EmailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
36
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: EmailComponent, isStandalone: true, selector: "rolatech-account-email", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u90AE\u7BB1\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u60A8\u53EF\u4EE5\u901A\u8FC7\u90AE\u7BB1\u83B7\u5F97\u66F4\u591A\u6211\u4EEC\u7684\u4EA7\u54C1\u4FE1\u606F</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\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 mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\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: 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: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }] }); }
|
|
37
|
-
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: EmailComponent, decorators: [{
|
|
39
|
-
type: Component,
|
|
40
|
-
args: [{ imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective, ContainerComponent, ToolbarComponent], selector: 'rolatech-account-email', template: "<rolatech-container>\n <rolatech-toolbar title=\"\u4FEE\u6539\u90AE\u7BB1\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">\u60A8\u53EF\u4EE5\u901A\u8FC7\u90AE\u7BB1\u83B7\u5F97\u66F4\u591A\u6211\u4EEC\u7684\u4EA7\u54C1\u4FE1\u606F</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\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 mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\n" }]
|
|
41
|
-
}], ctorParameters: () => [] });
|
|
42
|
-
|
|
43
|
-
export { EmailComponent };
|
|
44
|
-
//# sourceMappingURL=rolatech-angular-account-email.component-Q9ZpDLPX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-email.component-Q9ZpDLPX.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/email/email.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/email/email.component.html"],"sourcesContent":["import { Component, OnInit, PLATFORM_ID, computed, effect, inject, model, signal } from '@angular/core';\nimport { AuthService, AuthStore, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, BackButtonDirective, ContainerComponent, ToolbarComponent],\n selector: 'rolatech-account-email',\n templateUrl: './email.component.html',\n styleUrls: ['./email.component.scss'],\n})\nexport class EmailComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n authStore = inject(AuthStore);\n user = this.authStore.user;\n email: string | undefined = '';\n constructor() {\n super();\n effect(() => {\n this.email = this.user()?.email;\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.update({ email: this.email }).subscribe({\n next: (res) => {\n this.snackBarService.open('修改成功');\n this.authStore.updateEmail(this.email!);\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"修改邮箱\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\">您可以通过邮箱获得更多我们的产品信息</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"email\" />\n </mat-form-field>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-container>\n"],"names":[],"mappings":";;;;;;;;;;;AAYM,MAAO,cAAe,SAAQ,aAAa,CAAA;AAK/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AALT,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,QAAA,IAAA,CAAA,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI;QAC1B,IAAK,CAAA,KAAA,GAAuB,EAAE;QAG5B,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK;AACjC,SAAC,CAAC;;AAEJ,IAAA,QAAQ;IAER,IAAI,GAAA;AACF,QAAA,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC;AAC3D,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC;gBACjC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,KAAM,CAAC;aACxC;AACD,YAAA,KAAK,EAAE,CAAC,KAAK,KAAI;gBACf,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;aACzC;AACF,SAAA,CAAC;;8GAtBO,cAAc,EAAA,IAA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,EAAA,IAAA,EAAA,EAAA,CAAA,QAAA,EAAA,QAAA,EAAA,yHAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,IAAA,EAAA,aAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,kBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,UAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,QAAA,EAAA,sBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,UAAA,EAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKtG,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;8BACC,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EACxG,wBAAwB,EAAA,QAAA,EAAA,stBAAA,EAAA;;;;;"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, effect, Component } from '@angular/core';
|
|
3
|
-
import * as i3 from '@angular/material/radio';
|
|
4
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
5
|
-
import { AuthUserService, AuthService } from '@rolatech/angular-auth';
|
|
6
|
-
import { AngularCommonModule } from '@rolatech/angular-common';
|
|
7
|
-
import { BaseComponent, AngularComponentsModule, ContainerComponent, ToolbarComponent } from '@rolatech/angular-components';
|
|
8
|
-
import { BackButtonDirective } from '@rolatech/angular-services';
|
|
9
|
-
import { U as UserGender } from './rolatech-angular-account-user-CK_zEFn_.mjs';
|
|
10
|
-
import * as i2 from '@angular/material/button';
|
|
11
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
12
|
-
import * as i1 from '@angular/forms';
|
|
13
|
-
|
|
14
|
-
class GenderComponent extends BaseComponent {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
this.authUserService = inject(AuthUserService);
|
|
18
|
-
this.GENDERS = ['男', '女', '不公开'];
|
|
19
|
-
this.gender = UserGender;
|
|
20
|
-
this.selectedGender = '';
|
|
21
|
-
this.user = inject(AuthService).user;
|
|
22
|
-
this.email = '';
|
|
23
|
-
effect(() => {
|
|
24
|
-
this.selectedGender = this.gender[this.user().gender];
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
ngOnInit() { }
|
|
28
|
-
save() {
|
|
29
|
-
this.authUserService.update({ gender: this.gender[this.selectedGender] }).subscribe({
|
|
30
|
-
next: (res) => {
|
|
31
|
-
this.snackBarService.open('修改成功');
|
|
32
|
-
},
|
|
33
|
-
error: (error) => {
|
|
34
|
-
this.snackBarService.open(error.message);
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: GenderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: GenderComponent, isStandalone: true, selector: "rolatech-account-gender", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8BBE\u7F6E\u6027\u522B\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <span class=\"px-2\">\u6027\u522B\u9009\u62E9</span>\n <mat-radio-group class=\"flex flex-col\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 p-2 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { 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: "directive", type: i3.MatRadioGroup, selector: "mat-radio-group", inputs: ["color", "name", "labelPosition", "value", "selected", "disabled", "required", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["id", "name", "aria-label", "aria-labelledby", "aria-describedby", "disableRipple", "tabIndex", "checked", "value", "labelPosition", "disabled", "required", "color", "disabledInteractive"], outputs: ["change"], exportAs: ["matRadioButton"] }, { kind: "ngmodule", type: MatRadioModule }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }] }); }
|
|
40
|
-
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: GenderComponent, decorators: [{
|
|
42
|
-
type: Component,
|
|
43
|
-
args: [{ imports: [
|
|
44
|
-
AngularCommonModule,
|
|
45
|
-
AngularComponentsModule,
|
|
46
|
-
MatRadioModule,
|
|
47
|
-
BackButtonDirective,
|
|
48
|
-
ContainerComponent,
|
|
49
|
-
ToolbarComponent,
|
|
50
|
-
MatButtonModule,
|
|
51
|
-
], selector: 'rolatech-account-gender', template: "<rolatech-container>\n <rolatech-toolbar title=\"\u8BBE\u7F6E\u6027\u522B\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <span class=\"px-2\">\u6027\u522B\u9009\u62E9</span>\n <mat-radio-group class=\"flex flex-col\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>\u53D6\u6D88</button>\n <button mat-flat-button class=\"w-20 p-2 ml-3\" (click)=\"save()\">\u4FDD\u5B58</button>\n </div>\n </div>\n</rolatech-container>\n" }]
|
|
52
|
-
}], ctorParameters: () => [] });
|
|
53
|
-
|
|
54
|
-
export { GenderComponent };
|
|
55
|
-
//# sourceMappingURL=rolatech-angular-account-gender.component-DrxiKHvu.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-gender.component-DrxiKHvu.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/gender/gender.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/gender/gender.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, BaseComponent, ToolbarComponent } from '@rolatech/angular-components';\nimport { BackButtonDirective } from '@rolatech/angular-services';\nimport { UserGender } from '../../../contant/user';\nimport { MatButtonModule } from '@angular/material/button';\n\n@Component({\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n MatRadioModule,\n BackButtonDirective,\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n ],\n selector: 'rolatech-account-gender',\n templateUrl: './gender.component.html',\n styleUrls: ['./gender.component.scss'],\n})\nexport class GenderComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n GENDERS: string[] = ['男', '女', '不公开'];\n gender: any = UserGender;\n selectedGender = '';\n\n user = inject(AuthService).user;\n email: string | undefined = '';\n constructor() {\n super();\n effect(() => {\n this.selectedGender = this.gender[this.user()!.gender!];\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.update({ gender: this.gender[this.selectedGender] }).subscribe({\n next: (res) => {\n this.snackBarService.open('修改成功');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"设置性别\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <span class=\"px-2\">性别选择</span>\n <mat-radio-group class=\"flex flex-col\" [(ngModel)]=\"selectedGender\">\n @for (gender of GENDERS; track gender) {\n <mat-radio-button [value]=\"gender\">{{ gender }}</mat-radio-button>\n }\n </mat-radio-group>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton>取消</button>\n <button mat-flat-button class=\"w-20 p-2 ml-3\" (click)=\"save()\">保存</button>\n </div>\n </div>\n</rolatech-container>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuBM,MAAO,eAAgB,SAAQ,aAAa,CAAA;AAQhD,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AART,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QACzC,IAAO,CAAA,OAAA,GAAa,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC;QACrC,IAAM,CAAA,MAAA,GAAQ,UAAU;QACxB,IAAc,CAAA,cAAA,GAAG,EAAE;AAEnB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,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S,yBAAyB,EAAA,QAAA,EAAA,2sBAAA,EAAA;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-home.component-DnsqsRNc.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/home/home.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/home/home.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, model, OnInit } from '@angular/core';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { AngularComponentsModule, ContainerComponent, BaseComponent } from '@rolatech/angular-components';\nimport { AngularCommonModule } from '@rolatech/angular-common';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent],\n selector: 'rolatech-account-home',\n templateUrl: './home.component.html',\n styleUrls: ['./home.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class HomeComponent extends BaseComponent implements OnInit {\n user = inject(AuthService).user;\n selectIndex = model(1);\n constructor() {\n super();\n }\n ngOnInit(): void {}\n}\n","@if (user(); as user) {\n <rolatech-container>\n <div class=\"max-w-[820px] m-3\">\n <div class=\"flex flex-col justify-center items-center p-3 mb-12\">\n <div class=\"p-3 mb-3\">\n <div class=\"w-20 h-20 rounded-full bg-[--rt-brand-color]\">\n @if (user.avatar) {\n <img class=\"w-20 h-20 rounded-full object-cover\" [src]=\"user.avatar\" alt=\"avatar img\" />\n }\n </div>\n </div>\n <p class=\"text-3xl\" i18n>欢迎回来, {{ user.name }}</p>\n <p class=\"text-md\">用户中心, 方便您维护个人信息, 这会有一个很好的体验</p>\n </div>\n </div>\n </rolatech-container>\n}\n"],"names":[],"mappings":";;;;;;AAYM,MAAO,aAAc,SAAQ,aAAa,CAAA;AAG9C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AAHT,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI;AAC/B,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC;;AAItB,IAAA,QAAQ;8GANG,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,6SCZ1B,wwBAiBA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDXY,mBAAmB,EAAE,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,uBAAuB,+BAAE,kBAAkB,EAAA,QAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAM/D,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;8BACC,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,kBAAkB,CAAC,EAAA,QAAA,EACjE,uBAAuB,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,wwBAAA,EAAA;;;;;"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, output, Inject, Component } from '@angular/core';
|
|
3
|
-
import { AuthUserService, AuthService } from '@rolatech/angular-auth';
|
|
4
|
-
import { AngularCommonModule, AddressFormatPipe } from '@rolatech/angular-common';
|
|
5
|
-
import { AngularComponentsModule, SpinnerComponent, ContainerComponent } from '@rolatech/angular-components';
|
|
6
|
-
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
|
|
7
|
-
import { U as UserGender } from './rolatech-angular-account-user-CK_zEFn_.mjs';
|
|
8
|
-
import { CommonModule } from '@angular/common';
|
|
9
|
-
import * as i2 from '@angular/material/button';
|
|
10
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
-
import * as i3 from '@angular/material/icon';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import { SnackBarService } from '@rolatech/angular-services';
|
|
14
|
-
import * as i1 from '@angular/router';
|
|
15
|
-
import * as i2$1 from '@angular/material/divider';
|
|
16
|
-
import * as i4 from '@angular/material/list';
|
|
17
|
-
|
|
18
|
-
class AvatarUpdateDialogComponent {
|
|
19
|
-
constructor(data) {
|
|
20
|
-
this.data = data;
|
|
21
|
-
this.dialogRef = inject(MatDialogRef);
|
|
22
|
-
this.authUserService = inject(AuthUserService);
|
|
23
|
-
this.snackBarService = inject(SnackBarService);
|
|
24
|
-
this.avatar = '';
|
|
25
|
-
this.save = output();
|
|
26
|
-
this.avatar = data.avatar;
|
|
27
|
-
}
|
|
28
|
-
cancel() {
|
|
29
|
-
this.dialogRef.close();
|
|
30
|
-
}
|
|
31
|
-
onSave() {
|
|
32
|
-
this.save.emit(this.avatar);
|
|
33
|
-
}
|
|
34
|
-
onUpload(event) {
|
|
35
|
-
const file = event.target.files[0];
|
|
36
|
-
if (file) {
|
|
37
|
-
const reader = new FileReader();
|
|
38
|
-
reader.readAsDataURL(file);
|
|
39
|
-
reader.onload = () => {
|
|
40
|
-
this.avatar = reader.result;
|
|
41
|
-
// this.isUploading = true;
|
|
42
|
-
const formData = new FormData();
|
|
43
|
-
formData.append('file', file);
|
|
44
|
-
this.authUserService.uploadAvatar(formData).subscribe({
|
|
45
|
-
next: (res) => {
|
|
46
|
-
this.snackBarService.open('更新成功');
|
|
47
|
-
// this.isUploading = false;
|
|
48
|
-
},
|
|
49
|
-
error: (e) => {
|
|
50
|
-
// this.isUploading = false;
|
|
51
|
-
// this.snackBar.open('上传失败: ' + e.message);
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
};
|
|
55
|
-
reader.onerror = (error) => {
|
|
56
|
-
// this.isUploading = false;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AvatarUpdateDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: AvatarUpdateDialogComponent, isStandalone: true, selector: "rolatech-account-avatar-update-dialog", outputs: { save: "save" }, ngImport: i0, template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4FEE\u6539\u5934\u50CF</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-[--rt-brand-color] w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>\u66F4\u6362\u5934\u50CF</span>\n </button>\n </div>\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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
62
|
-
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: AvatarUpdateDialogComponent, decorators: [{
|
|
64
|
-
type: Component,
|
|
65
|
-
args: [{ selector: 'rolatech-account-avatar-update-dialog', imports: [CommonModule, MatButtonModule, MatIconModule], template: "<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">\u4FEE\u6539\u5934\u50CF</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-[--rt-brand-color] w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>\u66F4\u6362\u5934\u50CF</span>\n </button>\n </div>\n</div>\n" }]
|
|
66
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
67
|
-
type: Inject,
|
|
68
|
-
args: [MAT_DIALOG_DATA]
|
|
69
|
-
}] }] });
|
|
70
|
-
|
|
71
|
-
class InfoComponent {
|
|
72
|
-
constructor() {
|
|
73
|
-
this.authUserService = inject(AuthUserService);
|
|
74
|
-
this.dialog = inject(MatDialog);
|
|
75
|
-
this.user = inject(AuthService).user;
|
|
76
|
-
this.gender = UserGender;
|
|
77
|
-
this.homeAddress = {};
|
|
78
|
-
this.workAddress = {};
|
|
79
|
-
this.billingAddress = {};
|
|
80
|
-
}
|
|
81
|
-
ngOnInit() {
|
|
82
|
-
this.findUserAddress();
|
|
83
|
-
}
|
|
84
|
-
updateAvatar(avatar) {
|
|
85
|
-
const dialogRef = this.dialog.open(AvatarUpdateDialogComponent, {
|
|
86
|
-
data: {
|
|
87
|
-
avatar: avatar,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
dialogRef.afterClosed().subscribe((result) => {
|
|
91
|
-
location.reload();
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
findUserAddress() {
|
|
95
|
-
this.authUserService.findAllAddress({}).subscribe({
|
|
96
|
-
next: (res) => {
|
|
97
|
-
this.homeAddress = res.data.filter((item) => item.type === 'HOME')[0];
|
|
98
|
-
this.workAddress = res.data.filter((item) => item.type === 'WORK')[0];
|
|
99
|
-
this.billingAddress = res.data.filter((item) => item.type === 'BILLING')[0];
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
104
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.2", type: InfoComponent, isStandalone: true, selector: "rolatech-account-info", ngImport: i0, template: "<rolatech-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-8\">\n <p class=\"text-3xl\">\u4E2A\u4EBA\u4FE1\u606F</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5168\u90E8\u5185\u5BB9</p>\n </div>\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u5934\u50CF</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\">\u8D26\u6237\u7684\u5934\u50CF</span>\n </div>\n <div\n class=\"mr-6 bg-[--rt-brand-color] w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u59D3\u540D</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u6027\u522B</span>\n <span>{{ gender[user.gender] || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u7528\u6237\u540D</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">\u8054\u7CFB\u65B9\u5F0F</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u90AE\u7BB1</span>\n <span>{{ user.email || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u7535\u8BDD</span>\n <span>{{ user.phone || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\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 <!-- address -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u5730\u5740</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../address/home\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u4F4F\u5B85\u5730\u5740</span>\n <span>{{ homeAddress | address }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../address/work\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u5DE5\u4F5C\u5730\u5740</span>\n <span>{{ workAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/billing\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u8D26\u5355\u5730\u5740</span>\n <span>{{ billingAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/shipping\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u8D2D\u7269\u5730\u5740</span>\n <!-- <span>{{ shippingAddress || '\u672A\u8BBE\u7F6E' }}</span> -->\n </div>\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 }\n </div>\n</rolatech-container>\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$1.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"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "pipe", type: AddressFormatPipe, name: "address" }] }); }
|
|
105
|
-
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: InfoComponent, decorators: [{
|
|
107
|
-
type: Component,
|
|
108
|
-
args: [{ imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent, ContainerComponent, AddressFormatPipe], selector: 'rolatech-account-info', template: "<rolatech-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-8\">\n <p class=\"text-3xl\">\u4E2A\u4EBA\u4FE1\u606F</p>\n <p class=\"text-md\">\u7528\u6237\u4FE1\u606F\u7684\u5168\u90E8\u5185\u5BB9</p>\n </div>\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">\u57FA\u672C\u8BBE\u7F6E</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u5934\u50CF</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\">\u8D26\u6237\u7684\u5934\u50CF</span>\n </div>\n <div\n class=\"mr-6 bg-[--rt-brand-color] w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u59D3\u540D</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u6027\u522B</span>\n <span>{{ gender[user.gender] || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u7528\u6237\u540D</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">\u8054\u7CFB\u65B9\u5F0F</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u90AE\u7BB1</span>\n <span>{{ user.email || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u7535\u8BDD</span>\n <span>{{ user.phone || '\u672A\u8BBE\u7F6E' }}</span>\n </div>\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 <!-- address -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">\u5730\u5740</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../address/home\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u4F4F\u5B85\u5730\u5740</span>\n <span>{{ homeAddress | address }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../address/work\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u5DE5\u4F5C\u5730\u5740</span>\n <span>{{ workAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/billing\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u8D26\u5355\u5730\u5740</span>\n <span>{{ billingAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/shipping\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">\u8D2D\u7269\u5730\u5740</span>\n <!-- <span>{{ shippingAddress || '\u672A\u8BBE\u7F6E' }}</span> -->\n </div>\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 }\n </div>\n</rolatech-container>\n" }]
|
|
109
|
-
}] });
|
|
110
|
-
|
|
111
|
-
export { InfoComponent };
|
|
112
|
-
//# sourceMappingURL=rolatech-angular-account-info.component-BwS2LI6u.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-info.component-BwS2LI6u.mjs","sources":["../../../../packages/angular-account/src/lib/components/avatar-update-dialog/avatar-update-dialog.component.ts","../../../../packages/angular-account/src/lib/components/avatar-update-dialog/avatar-update-dialog.component.html","../../../../packages/angular-account/src/lib/pages/myaccount/personal-info/info.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/personal-info/info.component.html"],"sourcesContent":["import { Component, Inject, inject, input, output } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { AuthUserService } from '@rolatech/angular-auth';\nimport { MatIconModule } from '@angular/material/icon';\nimport { SnackBarService } from '@rolatech/angular-services';\n\n@Component({\n selector: 'rolatech-account-avatar-update-dialog',\n imports: [CommonModule, MatButtonModule, MatIconModule],\n templateUrl: './avatar-update-dialog.component.html',\n styleUrl: './avatar-update-dialog.component.scss',\n})\nexport class AvatarUpdateDialogComponent {\n dialogRef = inject(MatDialogRef);\n authUserService = inject(AuthUserService);\n snackBarService = inject(SnackBarService);\n avatar: any = '';\n save = output<any>();\n\n constructor(@Inject(MAT_DIALOG_DATA) public data: { avatar: string }) {\n this.avatar = data.avatar;\n }\n\n cancel() {\n this.dialogRef.close();\n }\n onSave() {\n this.save.emit(this.avatar);\n }\n onUpload(event: any) {\n const file = event.target.files[0];\n if (file) {\n const reader = new FileReader();\n reader.readAsDataURL(file);\n reader.onload = () => {\n this.avatar = reader.result;\n // this.isUploading = true;\n const formData = new FormData();\n formData.append('file', file);\n\n this.authUserService.uploadAvatar(formData).subscribe({\n next: (res: any) => {\n this.snackBarService.open('更新成功');\n // this.isUploading = false;\n },\n error: (e) => {\n // this.isUploading = false;\n // this.snackBar.open('上传失败: ' + e.message);\n },\n });\n };\n reader.onerror = (error) => {\n // this.isUploading = false;\n };\n }\n }\n}\n","<div class=\"flex flex-col p-3 max-w-[500px] mx-auto\">\n <div class=\"text-xl font-bold p-3\">修改头像</div>\n <!-- <div class=\"w-[256px] h-[256px] mx-auto flex justify-center items-center\">\n <img [src]=\"avatar\" />\n </div> -->\n <div class=\"px-3 py-8\">\n <div\n class=\"bg-[--rt-brand-color] w-[256px] h-[256px] rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (avatar) {\n <div class=\"w-[256px] h-[256px]\">\n <img [src]=\"avatar\" class=\"w-[256px] h-[256px] rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n\n <div class=\"py-3\">\n <input style=\"display: none\" type=\"file\" accept=\"image/*\" (change)=\"onUpload($event)\" #fileInput />\n <button mat-flat-button (click)=\"fileInput.click()\">\n <mat-icon>edit</mat-icon>\n <span>更换头像</span>\n </button>\n </div>\n</div>\n","import { Component, computed, inject, OnInit } from '@angular/core';\nimport { AuthService, AuthUserService } from '@rolatech/angular-auth';\nimport { AddressFormatPipe, AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, ContainerComponent, SpinnerComponent } from '@rolatech/angular-components';\nimport { MatDialog } from '@angular/material/dialog';\nimport { UserGender } from '../../../contant/user';\nimport { AvatarUpdateDialogComponent } from '../../../components/avatar-update-dialog/avatar-update-dialog.component';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent, ContainerComponent, AddressFormatPipe],\n selector: 'rolatech-account-info',\n templateUrl: './info.component.html',\n styleUrls: ['./info.component.scss'],\n})\nexport class InfoComponent implements OnInit {\n authUserService = inject(AuthUserService);\n dialog = inject(MatDialog);\n user = inject(AuthService).user;\n gender: any = UserGender;\n homeAddress = {};\n workAddress = {};\n billingAddress = {};\n\n ngOnInit(): void {\n this.findUserAddress();\n }\n updateAvatar(avatar: any) {\n const dialogRef = this.dialog.open(AvatarUpdateDialogComponent, {\n data: {\n avatar: avatar,\n },\n });\n dialogRef.afterClosed().subscribe((result) => {\n location.reload();\n });\n }\n findUserAddress() {\n this.authUserService.findAllAddress({}).subscribe({\n next: (res) => {\n this.homeAddress = res.data.filter((item) => item.type === 'HOME')[0];\n this.workAddress = res.data.filter((item) => item.type === 'WORK')[0];\n this.billingAddress = res.data.filter((item) => item.type === 'BILLING')[0];\n },\n });\n }\n}\n","<rolatech-container>\n <div class=\"max-w-[820px] m-3\">\n <rolatech-spinner></rolatech-spinner>\n @if (user(); as user) {\n <div>\n <div class=\"flex flex-col justify-center items-center p-3 mb-8\">\n <p class=\"text-3xl\">个人信息</p>\n <p class=\"text-md\">用户信息的全部内容</p>\n </div>\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">基本设置</div>\n <mat-nav-list>\n <mat-list-item (click)=\"updateAvatar(user?.avatar)\" class=\"h-16\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">头像</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\">账户的头像</span>\n </div>\n <div\n class=\"mr-6 bg-[--rt-brand-color] w-9 h-9 rounded-full cursor-pointer hover:outline-gray-200 outline outline-transparent outline-4\"\n >\n @if (user.avatar) {\n <div class=\"w-9 h-9\">\n <img [src]=\"user.avatar\" class=\"w-9 h-9 rounded-full object-cover\" alt=\"avatar img\" />\n </div>\n }\n </div>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../profile\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">姓名</span>\n <span>{{ user?.name }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../gender\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">性别</span>\n <span>{{ gender[user.gender] || '未设置' }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n <mat-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../username\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">用户名</span>\n <span>{{ user.username }}</span>\n </div>\n <span>\n <mat-icon> navigate_next </mat-icon>\n </span>\n </div>\n </mat-list-item>\n </mat-nav-list>\n </div>\n <!-- contact -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3 mb-8\">\n <div class=\"p-3 text-xl\">联系方式</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../email\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">邮箱</span>\n <span>{{ user.email || '未设置' }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../phone\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">电话</span>\n <span>{{ user.phone || '未设置' }}</span>\n </div>\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 <!-- address -->\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\">地址</div>\n <mat-nav-list>\n <mat-list-item routerLink=\"../address/home\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">住宅地址</span>\n <span>{{ homeAddress | address }}</span>\n </div>\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-divider class=\"mx-3\"></mat-divider>\n <mat-list-item routerLink=\"../address/work\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">工作地址</span>\n <span>{{ workAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/billing\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">账单地址</span>\n <span>{{ billingAddress | address }}</span>\n </div>\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-list-item routerLink=\"../address/shipping\">\n <div class=\"flex items-center justify-between\">\n <div class=\"flex flex-1 items-center\">\n <span class=\"w-24 text-sm\">购物地址</span>\n <!-- <span>{{ shippingAddress || '未设置' }}</span> -->\n </div>\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 }\n </div>\n</rolatech-container>\n"],"names":["i2"],"mappings":";;;;;;;;;;;;;;;;;MAca,2BAA2B,CAAA;AAOtC,IAAA,WAAA,CAA4C,IAAwB,EAAA;QAAxB,IAAI,CAAA,IAAA,GAAJ,IAAI;AANhD,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AAChC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;AACzC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QACzC,IAAM,CAAA,MAAA,GAAQ,EAAE;QAChB,IAAI,CAAA,IAAA,GAAG,MAAM,EAAO;AAGlB,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM;;IAG3B,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;;IAExB,MAAM,GAAA;QACJ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,I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AAmB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EACtG,uBAAuB,EAAA,QAAA,EAAA,iqOAAA,EAAA;;;;;"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, PLATFORM_ID, Component } from '@angular/core';
|
|
3
|
-
import { AuthService } from '@rolatech/angular-auth';
|
|
4
|
-
import { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';
|
|
5
|
-
import { BaseComponent, AngularComponentsModule } from '@rolatech/angular-components';
|
|
6
|
-
import { W as WeChatLoginService } from './rolatech-angular-account-rolatech-angular-account-B10UbSq5.mjs';
|
|
7
|
-
|
|
8
|
-
class LoginWechatComponent extends BaseComponent {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.authService = inject(AuthService);
|
|
12
|
-
this.environment = inject(APP_CONFIG);
|
|
13
|
-
this.platformId = inject(PLATFORM_ID);
|
|
14
|
-
this.wechtLoginService = inject(WeChatLoginService);
|
|
15
|
-
}
|
|
16
|
-
ngOnInit() {
|
|
17
|
-
this.route.queryParams.subscribe({
|
|
18
|
-
next: (params) => {
|
|
19
|
-
this.wechatLogin(params.code, params.state);
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
wechatLogin(code, state) {
|
|
24
|
-
this.authService.wechatLogin(code, state).subscribe({
|
|
25
|
-
next: (res) => {
|
|
26
|
-
if (res.name) {
|
|
27
|
-
window.parent.postMessage({ code: 200 }, this.environment.accountsUrl);
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LoginWechatComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
33
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.2", type: LoginWechatComponent, isStandalone: true, selector: "rolatech-account-login-wechat", usesInheritance: true, ngImport: i0, template: "<div>loading...</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }] }); }
|
|
34
|
-
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.2", ngImport: i0, type: LoginWechatComponent, decorators: [{
|
|
36
|
-
type: Component,
|
|
37
|
-
args: [{ imports: [AngularCommonModule, AngularComponentsModule], selector: 'rolatech-account-login-wechat', template: "<div>loading...</div>\n" }]
|
|
38
|
-
}] });
|
|
39
|
-
|
|
40
|
-
const loginRoutes = [{ path: '', component: LoginWechatComponent }];
|
|
41
|
-
|
|
42
|
-
export { loginRoutes as default };
|
|
43
|
-
//# sourceMappingURL=rolatech-angular-account-login.routes-CHrOk4GX.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-login.routes-CHrOk4GX.mjs","sources":["../../../../packages/angular-account/src/lib/components/login/login-wechat/login-wechat.component.ts","../../../../packages/angular-account/src/lib/components/login/login-wechat/login-wechat.component.html","../../../../packages/angular-account/src/lib/components/login/login.routes.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Component, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { AuthService } from '@rolatech/angular-auth';\nimport { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';\nimport { AngularComponentsModule, BaseComponent } from '@rolatech/angular-components';\nimport { WeChatLoginService } from '../../../services/wechat-login.service';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule],\n selector: 'rolatech-account-login-wechat',\n templateUrl: './login-wechat.component.html',\n styleUrls: ['./login-wechat.component.scss'],\n})\nexport class LoginWechatComponent extends BaseComponent implements OnInit {\n authService = inject(AuthService);\n environment = inject(APP_CONFIG);\n platformId = inject(PLATFORM_ID);\n wechtLoginService = inject(WeChatLoginService);\n\n ngOnInit(): void {\n this.route.queryParams.subscribe({\n next: (params: any) => {\n this.wechatLogin(params.code, params.state);\n },\n });\n }\n wechatLogin(code: string, state: string) {\n this.authService.wechatLogin(code, state).subscribe({\n next: (res) => {\n if (res.name) {\n window.parent.postMessage({ code: 200 }, this.environment.accountsUrl);\n }\n },\n });\n }\n}\n","<div>loading...</div>\n","import { Routes } from '@angular/router';\nimport { LoginWechatComponent } from './login-wechat/login-wechat.component';\n\nconst loginRoutes: Routes = [{ path: '', component: LoginWechatComponent }];\nexport default loginRoutes;\n"],"names":[],"mappings":";;;;;;;AAaM,MAAO,oBAAqB,SAAQ,aAAa,CAAA;AANvD,IAAA,WAAA,GAAA;;AAOE,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAkB/C;IAhBC,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC;AAC/B,YAAA,IAAI,EAAE,CAAC,MAAW,KAAI;gBACpB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC;aAC5C;AACF,SAAA,CAAC;;IAEJ,WAAW,CAAC,IAAY,EAAE,KAAa,EAAA;QACrC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,SAAS,CAAC;AAClD,YAAA,IAAI,EAAE,CAAC,GAAG,KAAI;AACZ,gBAAA,IAAI,GAAG,CAAC,IAAI,EAAE;AACZ,oBAAA,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,GAAG,EAA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