@rolatech/angular-account 20.2.6-beta.1 → 20.2.7-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-CbT9H3P_.mjs → rolatech-angular-account-address-add.component-BEgWg_no.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-add.component-CbT9H3P_.mjs.map → rolatech-angular-account-address-add.component-BEgWg_no.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address-billing.component-Dhe_S6nC.mjs → rolatech-angular-account-address-billing.component-Ctvgeea9.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-billing.component-Dhe_S6nC.mjs.map → rolatech-angular-account-address-billing.component-Ctvgeea9.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address-detail.component-BOhVYiNE.mjs → rolatech-angular-account-address-detail.component-78h4m9-h.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-detail.component-BOhVYiNE.mjs.map → rolatech-angular-account-address-detail.component-78h4m9-h.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address-home.component-BSZNuGEJ.mjs → rolatech-angular-account-address-home.component-DfEsaB1k.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-home.component-BSZNuGEJ.mjs.map → rolatech-angular-account-address-home.component-DfEsaB1k.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address-shipping.component-LJGkiIt4.mjs → rolatech-angular-account-address-shipping.component-mkK154C4.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-shipping.component-LJGkiIt4.mjs.map → rolatech-angular-account-address-shipping.component-mkK154C4.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address-work.component-IX2zTWxc.mjs → rolatech-angular-account-address-work.component-BtMlK__N.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-address-work.component-IX2zTWxc.mjs.map → rolatech-angular-account-address-work.component-BtMlK__N.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-address.routes-fnshCuFj.mjs → rolatech-angular-account-address.routes-D5E3MO2k.mjs} +7 -7
- package/fesm2022/{rolatech-angular-account-address.routes-fnshCuFj.mjs.map → rolatech-angular-account-address.routes-D5E3MO2k.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-email-verification.component-Bsy6ZdCU.mjs → rolatech-angular-account-email-verification.component-UzTBlGxH.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-email-verification.component-Bsy6ZdCU.mjs.map → rolatech-angular-account-email-verification.component-UzTBlGxH.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-email.component-cAEhB6ZQ.mjs → rolatech-angular-account-email.component-BIJH10kH.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-email.component-cAEhB6ZQ.mjs.map → rolatech-angular-account-email.component-BIJH10kH.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-gender.component-C-0x9sI0.mjs → rolatech-angular-account-gender.component-DfCw15Dj.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-gender.component-C-0x9sI0.mjs.map → rolatech-angular-account-gender.component-DfCw15Dj.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-home.component-B1YNtE-j.mjs → rolatech-angular-account-home.component-CsNpoHq_.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-home.component-B1YNtE-j.mjs.map → rolatech-angular-account-home.component-CsNpoHq_.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-info.component-1s2Ab1r_.mjs → rolatech-angular-account-info.component-BBNpSZeR.mjs} +7 -7
- package/fesm2022/{rolatech-angular-account-info.component-1s2Ab1r_.mjs.map → rolatech-angular-account-info.component-BBNpSZeR.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-phone.component-BCi_YLwF.mjs → rolatech-angular-account-phone.component-DdGvrN0V.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-phone.component-BCi_YLwF.mjs.map → rolatech-angular-account-phone.component-DdGvrN0V.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-profile.component-CWvjxZ94.mjs → rolatech-angular-account-profile.component-DmGkFTUx.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-profile.component-CWvjxZ94.mjs.map → rolatech-angular-account-profile.component-DmGkFTUx.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-security.routes-AVoRPb_g.mjs → rolatech-angular-account-security.routes-FUsaVReF.mjs} +10 -10
- package/fesm2022/{rolatech-angular-account-security.routes-AVoRPb_g.mjs.map → rolatech-angular-account-security.routes-FUsaVReF.mjs.map} +1 -1
- package/fesm2022/{rolatech-angular-account-username.component-B2ZnicXO.mjs → rolatech-angular-account-username.component-D8La3yTd.mjs} +4 -4
- package/fesm2022/{rolatech-angular-account-username.component-B2ZnicXO.mjs.map → rolatech-angular-account-username.component-D8La3yTd.mjs.map} +1 -1
- package/fesm2022/rolatech-angular-account.mjs +32 -32
- package/fesm2022/rolatech-angular-account.mjs.map +1 -1
- package/package.json +6 -6
|
@@ -11,13 +11,13 @@ class HomeComponent extends BaseComponent {
|
|
|
11
11
|
this.selectIndex = model(1, ...(ngDevMode ? [{ debugName: "selectIndex" }] : []));
|
|
12
12
|
}
|
|
13
13
|
ngOnInit() { }
|
|
14
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
15
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
14
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: HomeComponent, isStandalone: true, selector: "rolatech-account-home", inputs: { selectIndex: { classPropertyName: "selectIndex", publicName: "selectIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectIndex: "selectIndexChange" }, usesInheritance: true, ngImport: i0, template: "@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>Welcome back, {{ user.name }}</p>\n <p class=\"text-md\" i18n>Manage your info, privacy, and security to make work better for you.</p>\n </div>\n </div>\n </rolatech-container>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: AngularCommonModule }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
16
16
|
}
|
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: HomeComponent, decorators: [{
|
|
18
18
|
type: Component,
|
|
19
19
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent], selector: 'rolatech-account-home', changeDetection: ChangeDetectionStrategy.OnPush, template: "@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>Welcome back, {{ user.name }}</p>\n <p class=\"text-md\" i18n>Manage your info, privacy, and security to make work better for you.</p>\n </div>\n </div>\n </rolatech-container>\n}\n" }]
|
|
20
20
|
}], ctorParameters: () => [], propDecorators: { selectIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectIndex", required: false }] }, { type: i0.Output, args: ["selectIndexChange"] }] } });
|
|
21
21
|
|
|
22
22
|
export { HomeComponent };
|
|
23
|
-
//# sourceMappingURL=rolatech-angular-account-home.component-
|
|
23
|
+
//# sourceMappingURL=rolatech-angular-account-home.component-CsNpoHq_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-home.component-
|
|
1
|
+
{"version":3,"file":"rolatech-angular-account-home.component-CsNpoHq_.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>Welcome back, {{ user.name }}</p>\n <p class=\"text-md\" i18n>Manage your info, privacy, and security to make work better for you.</p>\n </div>\n </div>\n </rolatech-container>\n}\n"],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ɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AvatarUpdateDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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\" i18n>Update profile picture</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 i18n>Change profile picture</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[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AvatarUpdateDialogComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
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\" i18n>Update profile picture</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 i18n>Change profile picture</span>\n </button>\n </div>\n</div>\n" }]
|
|
66
66
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
@@ -99,13 +99,13 @@ class InfoComponent {
|
|
|
99
99
|
},
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
103
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
102
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", 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\" i18n>Personal info</p>\n <p class=\"text-md\" i18n>Personal info and options to manage it.</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\" i18n>Basic info</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\" i18n>Profile picture</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\" i18n>A picture helps people recognize you</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\" i18n>Name</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\" i18n>Gender</span>\n <span>{{ gender[user.gender] || 'Untitled' }}</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\">Username</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\" i18n>Contact</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\" i18n>Email</span>\n <span i18n>{{ user.email || 'Untitled' }}</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\" i18n>Phone</span>\n <span i18n>{{ user.phone || 'Untitled' }}</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\" i18n>Addresses</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Home address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Work address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Billing address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Shipping address</span>\n <!-- <span>{{ shippingAddress || 'Untitled' }}</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" }] }); }
|
|
104
104
|
}
|
|
105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: InfoComponent, decorators: [{
|
|
106
106
|
type: Component,
|
|
107
107
|
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\" i18n>Personal info</p>\n <p class=\"text-md\" i18n>Personal info and options to manage it.</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\" i18n>Basic info</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\" i18n>Profile picture</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\" i18n>A picture helps people recognize you</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\" i18n>Name</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\" i18n>Gender</span>\n <span>{{ gender[user.gender] || 'Untitled' }}</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\">Username</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\" i18n>Contact</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\" i18n>Email</span>\n <span i18n>{{ user.email || 'Untitled' }}</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\" i18n>Phone</span>\n <span i18n>{{ user.phone || 'Untitled' }}</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\" i18n>Addresses</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Home address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Work address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Billing address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Shipping address</span>\n <!-- <span>{{ shippingAddress || 'Untitled' }}</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" }]
|
|
108
108
|
}] });
|
|
109
109
|
|
|
110
110
|
export { InfoComponent };
|
|
111
|
-
//# sourceMappingURL=rolatech-angular-account-info.component-
|
|
111
|
+
//# sourceMappingURL=rolatech-angular-account-info.component-BBNpSZeR.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-info.component-1s2Ab1r_.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('Update successfully');\n // this.isUploading = false;\n },\n error: (e) => {\n // this.isUploading = false;\n // this.snackBar.open('Upload failed: ' + 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\" i18n>Update profile picture</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 i18n>Change profile picture</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 if (res.data) {\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}\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\" i18n>Personal info</p>\n <p class=\"text-md\" i18n>Personal info and options to manage it.</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\" i18n>Basic info</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\" i18n>Profile picture</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\" i18n>A picture helps people recognize you</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\" i18n>Name</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\" i18n>Gender</span>\n <span>{{ gender[user.gender] || 'Untitled' }}</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\">Username</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\" i18n>Contact</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\" i18n>Email</span>\n <span i18n>{{ user.email || 'Untitled' }}</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\" i18n>Phone</span>\n <span i18n>{{ user.phone || 'Untitled' }}</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\" i18n>Addresses</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Home address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Work address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Billing address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Shipping address</span>\n <!-- <span>{{ shippingAddress || 'Untitled' }}</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,IAAA,CAAA,IAAI,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,C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AA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKpG,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;8BACC,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EACtG,uBAAuB,EAAA,QAAA,EAAA,4oOAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"rolatech-angular-account-info.component-BBNpSZeR.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('Update successfully');\n // this.isUploading = false;\n },\n error: (e) => {\n // this.isUploading = false;\n // this.snackBar.open('Upload failed: ' + 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\" i18n>Update profile picture</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 i18n>Change profile picture</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 if (res.data) {\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}\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\" i18n>Personal info</p>\n <p class=\"text-md\" i18n>Personal info and options to manage it.</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\" i18n>Basic info</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\" i18n>Profile picture</span>\n <span class=\"w-24 text-sm text-[--rt-text-primary]\" i18n>A picture helps people recognize you</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\" i18n>Name</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\" i18n>Gender</span>\n <span>{{ gender[user.gender] || 'Untitled' }}</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\">Username</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\" i18n>Contact</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\" i18n>Email</span>\n <span i18n>{{ user.email || 'Untitled' }}</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\" i18n>Phone</span>\n <span i18n>{{ user.phone || 'Untitled' }}</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\" i18n>Addresses</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Home address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Work address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Billing address</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 justify-between\">\n <span class=\"w-24 text-sm\" i18n>Shipping address</span>\n <!-- <span>{{ shippingAddress || 'Untitled' }}</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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,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,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,gBAAgB,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,oBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,iBAAiB,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAKpG,aAAa,EAAA,UAAA,EAAA,CAAA;kBANzB,SAAS;8BACC,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC,EAAA,QAAA,EACtG,uBAAuB,EAAA,QAAA,EAAA,4oOAAA,EAAA;;;;;"}
|
|
@@ -57,10 +57,10 @@ class PhoneComponent extends BaseComponent {
|
|
|
57
57
|
},
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
61
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.
|
|
60
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
61
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: PhoneComponent, isStandalone: true, selector: "rolatech-account-phone", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"Your phone\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\" i18n>Your phone number is unique identifier on this site.</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"phone\" required />\n </mat-form-field>\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Code </mat-label>\n <input matInput [(ngModel)]=\"code\" required />\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px]\">\n <span class=\"text-sm\">{{ showButtonText }}</span>\n </button>\n </div>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton i18n>Cancel</button>\n <button mat-flat-button class=\"w-[128px] ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\n </div>\n</rolatech-container>\n", styles: ["mat-form-field{width:100%}\n"], 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AngularComponentsModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }] }); }
|
|
62
62
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: PhoneComponent, decorators: [{
|
|
64
64
|
type: Component,
|
|
65
65
|
args: [{ imports: [
|
|
66
66
|
AngularCommonModule,
|
|
@@ -73,4 +73,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
73
73
|
}], ctorParameters: () => [] });
|
|
74
74
|
|
|
75
75
|
export { PhoneComponent };
|
|
76
|
-
//# sourceMappingURL=rolatech-angular-account-phone.component-
|
|
76
|
+
//# sourceMappingURL=rolatech-angular-account-phone.component-DdGvrN0V.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-phone.component-
|
|
1
|
+
{"version":3,"file":"rolatech-angular-account-phone.component-DdGvrN0V.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/phone/phone.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/phone/phone.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\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';\n\n@Component({\n imports: [\n AngularCommonModule,\n AngularComponentsModule,\n ContainerComponent,\n ToolbarComponent,\n MatButtonModule,\n BackButtonDirective,\n ],\n selector: 'rolatech-account-phone',\n templateUrl: './phone.component.html',\n styleUrls: ['./phone.component.scss'],\n})\nexport class PhoneComponent extends BaseComponent implements OnInit {\n user = inject(AuthService).user;\n authUserService = inject(AuthUserService);\n phone = '';\n code = '';\n countDown = false;\n countDownTime = 60;\n showButtonText = 'Send';\n constructor() {\n super();\n effect(() => {\n this.phone = this.user()!.phone;\n });\n }\n ngOnInit(): void {}\n\n sendSMSCode() {\n this.countDown = true;\n const start = setInterval(() => {\n if (this.countDownTime >= 0) {\n this.showButtonText = `${this.countDownTime--}s resend`;\n } else {\n clearInterval(start);\n this.showButtonText = 'Resend';\n this.countDown = false;\n this.countDownTime = 60;\n }\n }, 1000);\n\n this.authUserService.sendSMSCode('+86', this.phone).subscribe({\n next: (res) => {\n this.snackBarService.open('success');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n save() {\n this.authUserService.changePhone(this.phone, this.code).subscribe({\n next: (res) => {\n this.snackBarService.open('success');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"Your phone\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\" i18n>Your phone number is unique identifier on this site.</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Phone </mat-label>\n <input matInput [(ngModel)]=\"phone\" required />\n </mat-form-field>\n <div class=\"flex justify-between items-center gap-3\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Code </mat-label>\n <input matInput [(ngModel)]=\"code\" required />\n </mat-form-field>\n <button mat-button (click)=\"sendSMSCode()\" [disabled]=\"countDown\" class=\"w-[128px]\">\n <span class=\"text-sm\">{{ showButtonText }}</span>\n </button>\n </div>\n </div>\n <div class=\"flex justify-end items-center mt-3\">\n <button mat-button rolatechBackButton i18n>Cancel</button>\n <button mat-flat-button class=\"w-[128px] ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\n </div>\n</rolatech-container>\n"],"names":[],"mappings":";;;;;;;;;;;;AAoBM,MAAO,cAAe,SAAQ,aAAa,CAAA;AAQ/C,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AART,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI;AAC/B,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QACzC,IAAA,CAAA,KAAK,GAAG,EAAE;QACV,IAAA,CAAA,IAAI,GAAG,EAAE;QACT,IAAA,CAAA,SAAS,GAAG,KAAK;QACjB,IAAA,CAAA,aAAa,GAAG,EAAE;QAClB,IAAA,CAAA,cAAc,GAAG,MAAM;QAGrB,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,EAAG,CAAC,KAAK;AACjC,QAAA,CAAC,CAAC;IACJ;AACA,IAAA,QAAQ,KAAU;IAElB,WAAW,GAAA;AACT,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI;AACrB,QAAA,MAAM,KAAK,GAAG,WAAW,CAAC,MAAK;AAC7B,YAAA,IAAI,IAAI,CAAC,aAAa,IAAI,CAAC,EAAE;gBAC3B,IAAI,CAAC,cAAc,GAAG,CAAA,EAAG,IAAI,CAAC,aAAa,EAAE,CAAA,QA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34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ProfileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ProfileComponent, isStandalone: true, selector: "rolatech-account-profile", usesInheritance: true, ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"Your profiles\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\" i18n>Name, which can be your real name or nickname</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton i18n>Cancel</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\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[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: 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"] }] }); }
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ProfileComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule, MatButton, BackButtonDirective, ContainerComponent, ToolbarComponent], selector: 'rolatech-account-profile', template: "<rolatech-container>\n <rolatech-toolbar title=\"Your profiles\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\" i18n>Name, which can be your real name or nickname</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton i18n>Cancel</button>\n <button mat-flat-button class=\"w-20 ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\n </div>\n </div>\n</rolatech-container>\n" }]
|
|
40
40
|
}], ctorParameters: () => [] });
|
|
41
41
|
|
|
42
42
|
export { ProfileComponent };
|
|
43
|
-
//# sourceMappingURL=rolatech-angular-account-profile.component-
|
|
43
|
+
//# sourceMappingURL=rolatech-angular-account-profile.component-DmGkFTUx.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rolatech-angular-account-profile.component-
|
|
1
|
+
{"version":3,"file":"rolatech-angular-account-profile.component-DmGkFTUx.mjs","sources":["../../../../packages/angular-account/src/lib/pages/myaccount/personal-info/profile/profile.component.ts","../../../../packages/angular-account/src/lib/pages/myaccount/personal-info/profile/profile.component.html"],"sourcesContent":["import { Component, OnInit, effect, inject } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\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';\n\n@Component({\n imports: [AngularCommonModule, AngularComponentsModule, MatButton, BackButtonDirective, ContainerComponent, ToolbarComponent],\n selector: 'rolatech-account-profile',\n templateUrl: './profile.component.html',\n styleUrls: ['./profile.component.scss'],\n})\nexport class ProfileComponent extends BaseComponent implements OnInit {\n authUserService = inject(AuthUserService);\n user = inject(AuthService).user;\n name = '';\n constructor() {\n super();\n effect(() => {\n this.name = this.user()!.name!;\n });\n }\n ngOnInit(): void {}\n\n save() {\n this.authUserService.changeName(this.name).subscribe({\n next: (res) => {\n this.snackBarService.open('Update successfully');\n },\n error: (error) => {\n this.snackBarService.open(error.message);\n },\n });\n }\n}\n","<rolatech-container>\n <rolatech-toolbar title=\"Your profiles\" link=\"/personal-info\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <p class=\"text-md\" i18n>Name, which can be your real name or nickname</p>\n <div class=\"flex flex-col mt-6\">\n <mat-form-field appearance=\"fill\">\n <input matInput [(ngModel)]=\"name\" />\n </mat-form-field>\n <div class=\"flex justify-end items-center p-2\">\n <button mat-button rolatechBackButton i18n>C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AAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAa,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;;2FAKjH,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,mBAAmB,EAAE,uBAAuB,EAAE,SAAS,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,YACnH,0BAA0B,EAAA,QAAA,EAAA,mpBAAA,EAAA;;;;;"}
|
|
@@ -98,10 +98,10 @@ class SecurityIndexComponent {
|
|
|
98
98
|
},
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
102
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
101
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityIndexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
102
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: SecurityIndexComponent, isStandalone: true, selector: "rolatech-account-security-index", ngImport: i0, template: "<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 <p class=\"text-3xl\" i18n>Security</p>\n <p class=\"text-md\" i18n>Your account security settings</p>\n </div>\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\" i18n>Security info</div>\n <mat-nav-list>\n <mat-list-item (click)=\"faceId()\">\n <div class=\"flex items-center justify-between\">\n <span i18n>Real-name authentication</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!verified) {\n <span class=\"mr-3\" i18n> Unverified </span>\n }\n @if (verified) {\n <a class=\"mr-3\" i18n> Verified </a>\n }\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item (click)=\"connectWeChat()\">\n <div class=\"flex items-center justify-between\">\n <span i18n>WeChat connect</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!bind) {\n <span class=\"mr-3\" i18n> Connect </span>\n }\n @if (bind) {\n <a class=\"mr-3\" i18n> Connected </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 i18n>Password set</span>\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</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.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" }] }); }
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityIndexComponent, decorators: [{
|
|
105
105
|
type: Component,
|
|
106
106
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent], selector: 'rolatech-account-security-index', template: "<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 <p class=\"text-3xl\" i18n>Security</p>\n <p class=\"text-md\" i18n>Your account security settings</p>\n </div>\n <div class=\"border border-[--rt-border-color] rounded px-3 pt-3\">\n <div class=\"p-3 text-xl\" i18n>Security info</div>\n <mat-nav-list>\n <mat-list-item (click)=\"faceId()\">\n <div class=\"flex items-center justify-between\">\n <span i18n>Real-name authentication</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!verified) {\n <span class=\"mr-3\" i18n> Unverified </span>\n }\n @if (verified) {\n <a class=\"mr-3\" i18n> Verified </a>\n }\n </div>\n </mat-list-item>\n <mat-divider></mat-divider>\n <mat-list-item (click)=\"connectWeChat()\">\n <div class=\"flex items-center justify-between\">\n <span i18n>WeChat connect</span>\n <!-- <mat-icon mat-list-icon>arrow_drop_down</mat-icon> -->\n @if (!bind) {\n <span class=\"mr-3\" i18n> Connect </span>\n }\n @if (bind) {\n <a class=\"mr-3\" i18n> Connected </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 i18n>Password set</span>\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</rolatech-container>\n" }]
|
|
107
107
|
}], ctorParameters: () => [] });
|
|
@@ -132,10 +132,10 @@ class SecurityPasswordComponent {
|
|
|
132
132
|
},
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
136
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.
|
|
135
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityPasswordComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.AuthService }, { token: i3$1.MatSnackBar }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
136
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: SecurityPasswordComponent, isStandalone: true, selector: "rolatech-account-security-password", ngImport: i0, template: "<rolatech-container>\n <rolatech-toolbar title=\"Password\" subtitle=\"Change password\" link=\"/security\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <form [formGroup]=\"passwordForm\">\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Old password</mat-label>\n <input matInput type=\"password\" formControlName=\"oldPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> New Password </mat-label>\n <input matInput type=\"password\" formControlName=\"newPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> New password </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 i18n>Cancel</button>\n <button mat-flat-button class=\"w-[128px] p-2 ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\n </div>\n</rolatech-container>\n<div class=\"max-w-[1120px] m-auto px-6\"></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],[formArray],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[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i3$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", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: ContainerComponent, selector: "rolatech-container" }, { kind: "component", type: ToolbarComponent, selector: "rolatech-toolbar", inputs: ["title", "subtitle", "back", "link", "large", "divider"] }, { kind: "directive", type: BackButtonDirective, selector: "[rolatechBackButton]" }] }); }
|
|
137
137
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityPasswordComponent, decorators: [{
|
|
139
139
|
type: Component,
|
|
140
140
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule, ContainerComponent, ToolbarComponent, BackButtonDirective], selector: 'rolatech-account-security-password', template: "<rolatech-container>\n <rolatech-toolbar title=\"Password\" subtitle=\"Change password\" link=\"/security\" divider></rolatech-toolbar>\n <div class=\"py-3\">\n <form [formGroup]=\"passwordForm\">\n <div class=\"flex flex-col\">\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> Old password</mat-label>\n <input matInput type=\"password\" formControlName=\"oldPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> New Password </mat-label>\n <input matInput type=\"password\" formControlName=\"newPassword\" required />\n </mat-form-field>\n <mat-form-field appearance=\"fill\">\n <mat-label i18n> New password </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 i18n>Cancel</button>\n <button mat-flat-button class=\"w-[128px] p-2 ml-3\" (click)=\"save()\" i18n>Save</button>\n </div>\n </div>\n</rolatech-container>\n<div class=\"max-w-[1120px] m-auto px-6\"></div>\n" }]
|
|
141
141
|
}], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.AuthService }, { type: i3$1.MatSnackBar }] });
|
|
@@ -209,10 +209,10 @@ class SecurityVerificationComponent {
|
|
|
209
209
|
this.renderer.removeChild(this.qrcElement().nativeElement, node);
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.
|
|
213
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.
|
|
212
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityVerificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: SecurityVerificationComponent, isStandalone: true, selector: "rolatech-account-security-verification", viewQueries: [{ propertyName: "qrcElement", first: true, predicate: ["qrcode"], descendants: true, isSignal: 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\" i18n>Verify real-name</p>\n <p class=\"text-md\" i18n>More secure after authentication</p>\n </div>\n </div>\n @if (verified) {\n <div class=\"p-3\">\n <div class=\"text-md font-bold py-3\" i18n>Verified</div>\n <div class=\"flex flex-col\">\n <div><span class=\"text-[--rt-text-secondary]\" i18n>Name: </span></div>\n <div><span class=\"text-[--rt-text-secondary]\" i18n>ID: </span></div>\n </div>\n </div>\n } @else {\n <div i18n>Unverified</div>\n <button mat-raised-button (click)=\"verify()\" i18n>Verify</button>\n <div #qrcode>\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-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[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: SpinnerComponent, selector: "rolatech-spinner", inputs: ["title"] }] }); }
|
|
214
214
|
}
|
|
215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.
|
|
215
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SecurityVerificationComponent, decorators: [{
|
|
216
216
|
type: Component,
|
|
217
217
|
args: [{ imports: [AngularCommonModule, AngularComponentsModule, SpinnerComponent], 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\" i18n>Verify real-name</p>\n <p class=\"text-md\" i18n>More secure after authentication</p>\n </div>\n </div>\n @if (verified) {\n <div class=\"p-3\">\n <div class=\"text-md font-bold py-3\" i18n>Verified</div>\n <div class=\"flex flex-col\">\n <div><span class=\"text-[--rt-text-secondary]\" i18n>Name: </span></div>\n <div><span class=\"text-[--rt-text-secondary]\" i18n>ID: </span></div>\n </div>\n </div>\n } @else {\n <div i18n>Unverified</div>\n <button mat-raised-button (click)=\"verify()\" i18n>Verify</button>\n <div #qrcode>\n @if (loading) {\n <div>\n <rolatech-spinner></rolatech-spinner>\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
218
218
|
}], propDecorators: { qrcElement: [{ type: i0.ViewChild, args: ['qrcode', { isSignal: true }] }] } });
|
|
@@ -234,4 +234,4 @@ const securityRoutes = [
|
|
|
234
234
|
];
|
|
235
235
|
|
|
236
236
|
export { securityRoutes as default };
|
|
237
|
-
//# sourceMappingURL=rolatech-angular-account-security.routes-
|
|
237
|
+
//# sourceMappingURL=rolatech-angular-account-security.routes-FUsaVReF.mjs.map
|