simpo-component-library 1.9.97 → 1.9.98
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/ecommerce/sections/authentication-required/authentication-required.component.mjs +11 -1
- package/esm2022/lib/sections/navbar-section/navbar-section.component.mjs +2 -2
- package/fesm2022/simpo-component-library.mjs +91 -82
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/background-directive.d.ts +1 -1
- package/lib/directive/button-directive.directive.d.ts +1 -1
- package/lib/directive/color.directive.d.ts +1 -1
- package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
- package/package.json +1 -1
- package/simpo-component-library-1.9.98.tgz +0 -0
- package/simpo-component-library-1.9.97.tgz +0 -0
@@ -22,12 +22,12 @@ import { ToastModule } from 'primeng/toast';
|
|
22
22
|
import * as i5$1 from 'primeng/api';
|
23
23
|
import { MessageService } from 'primeng/api';
|
24
24
|
import Swal from 'sweetalert2';
|
25
|
-
import * as i11 from '@angular/material/progress-spinner';
|
26
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
27
25
|
import { map, forkJoin } from 'rxjs';
|
28
26
|
import * as i1$1 from '@angular/common/http';
|
29
27
|
import * as i2$3 from '@angular/router';
|
30
28
|
import * as i2$2 from 'ngx-cookie-service';
|
29
|
+
import * as i11 from '@angular/material/progress-spinner';
|
30
|
+
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
31
31
|
import * as i3 from 'primeng/rating';
|
32
32
|
import { RatingModule } from 'primeng/rating';
|
33
33
|
import * as i6 from 'primeng/progressbar';
|
@@ -3846,6 +3846,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
3846
3846
|
}]
|
3847
3847
|
}], ctorParameters: () => [{ type: EventsService }, { type: i2$2.CookieService }, { type: RestService }, { type: i2$3.Router }] });
|
3848
3848
|
|
3849
|
+
class UserBasicInfoComponent {
|
3850
|
+
constructor(restService, router, dialogRef, storageService, messageService) {
|
3851
|
+
this.restService = restService;
|
3852
|
+
this.router = router;
|
3853
|
+
this.dialogRef = dialogRef;
|
3854
|
+
this.storageService = storageService;
|
3855
|
+
this.messageService = messageService;
|
3856
|
+
this.gender = null;
|
3857
|
+
this.firstName = "";
|
3858
|
+
this.middleName = "";
|
3859
|
+
this.lastName = "";
|
3860
|
+
this.mobile = "";
|
3861
|
+
this.email = "";
|
3862
|
+
this.profilePic = "";
|
3863
|
+
this.userDetails = null;
|
3864
|
+
this.isEdit = false;
|
3865
|
+
}
|
3866
|
+
ngOnInit() {
|
3867
|
+
this.userDetails = this.storageService.getUser();
|
3868
|
+
this.isEdit = !!this.userDetails;
|
3869
|
+
this.firstName = this.userDetails?.contact?.name?.split(" ")?.[0] ?? "";
|
3870
|
+
// this.middleName = this.userDetails?.contact?.name?.split(" ")?.[1] ?? "";
|
3871
|
+
this.lastName = this.userDetails?.contact?.name?.split(" ")?.[1] ?? "";
|
3872
|
+
this.email = this.userDetails?.contact?.email ?? "";
|
3873
|
+
this.mobile = this.userDetails?.contact.mobile ?? "";
|
3874
|
+
this.gender = this.userDetails?.gender;
|
3875
|
+
this.profilePic = this.userDetails?.profilePic ?? "";
|
3876
|
+
}
|
3877
|
+
close() {
|
3878
|
+
this.dialogRef.close();
|
3879
|
+
}
|
3880
|
+
saveProfile() {
|
3881
|
+
const payload = {
|
3882
|
+
userId: this.userDetails?.userId,
|
3883
|
+
businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
3884
|
+
gender: this.gender,
|
3885
|
+
profilePic: this.profilePic,
|
3886
|
+
contact: {
|
3887
|
+
countryCode: "91",
|
3888
|
+
email: this.email,
|
3889
|
+
name: this.firstName + " " + (this.middleName?.length > 0 ? this.middleName + " " : "") + this.lastName
|
3890
|
+
}
|
3891
|
+
};
|
3892
|
+
this.restService.updateProfile(payload).subscribe((response) => {
|
3893
|
+
this.storageService.setUser(response.data);
|
3894
|
+
this.messageService.add({ severity: 'success', summary: 'Updated Successfully', detail: 'User detail updated' });
|
3895
|
+
if (this.dialogRef)
|
3896
|
+
this.dialogRef.close();
|
3897
|
+
else
|
3898
|
+
this.router.navigate(['/']);
|
3899
|
+
}, (error) => {
|
3900
|
+
this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Failed to update your details try agin.' });
|
3901
|
+
});
|
3902
|
+
}
|
3903
|
+
validateName(event) {
|
3904
|
+
if ((event.keyCode >= 65 && event.keyCode <= 90) || event.keyCode == 16 || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46) {
|
3905
|
+
return;
|
3906
|
+
}
|
3907
|
+
event.preventDefault();
|
3908
|
+
}
|
3909
|
+
get isMobile() {
|
3910
|
+
return window.innerWidth < 475;
|
3911
|
+
}
|
3912
|
+
get isEmailValid() {
|
3913
|
+
return this.email?.includes("@") && this.email.includes(".com") || (this.email?.length == 0);
|
3914
|
+
}
|
3915
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, deps: [{ token: RestService }, { token: i2$3.Router }, { token: i5.MatDialogRef }, { token: StorageServiceService }, { token: i5$1.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
3916
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: UserBasicInfoComponent, isStandalone: true, selector: "simpo-user-basic-info", providers: [MessageService], ngImport: i0, template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n <!-- <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div> -->\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n\r\n <div class=\"form-control-group\" *ngIf=\"isEdit\">\r\n <div class=\"label required\">Mobile</div>\r\n <input type=\"number\" placeholder=\"Enter mobile\" [(ngModel)]=\"mobile\" disabled>\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n <span class=\"error-msg\" [style.visibility]=\"isEmailValid ? 'hidden' : 'visible'\">Please enter valid email</span>\r\n </div>\r\n \r\n <div class=\"form-control-group-full\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">{{!isEdit ? 'Skip' : 'Close'}}</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>\r\n<p-toast position=\"bottom-right\" [baseZIndex]=\"10000000000\" [autoZIndex]=\"true\" [showTransformOptions]=\"isMobile ? 'translateY(-100%)' : ''\"></p-toast>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:100%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}img{height:60px;width:60px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.active{border:2px solid #0267C1}.form-control-group{margin:10px 0}.action-btn{position:relative;bottom:0;right:0;display:flex;align-items:center;justify-content:flex-end;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}.required:after{content:\"*\";color:tomato}.error-msg{color:tomato}@media screen and (max-width: 475px){.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.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: i8.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i17.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
|
3917
|
+
}
|
3918
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, decorators: [{
|
3919
|
+
type: Component,
|
3920
|
+
args: [{ selector: 'simpo-user-basic-info', standalone: true, imports: [
|
3921
|
+
CommonModule,
|
3922
|
+
MatDialogModule,
|
3923
|
+
FormsModule,
|
3924
|
+
ToastModule
|
3925
|
+
], providers: [MessageService], template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n <!-- <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div> -->\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n\r\n <div class=\"form-control-group\" *ngIf=\"isEdit\">\r\n <div class=\"label required\">Mobile</div>\r\n <input type=\"number\" placeholder=\"Enter mobile\" [(ngModel)]=\"mobile\" disabled>\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n <span class=\"error-msg\" [style.visibility]=\"isEmailValid ? 'hidden' : 'visible'\">Please enter valid email</span>\r\n </div>\r\n \r\n <div class=\"form-control-group-full\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">{{!isEdit ? 'Skip' : 'Close'}}</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>\r\n<p-toast position=\"bottom-right\" [baseZIndex]=\"10000000000\" [autoZIndex]=\"true\" [showTransformOptions]=\"isMobile ? 'translateY(-100%)' : ''\"></p-toast>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:100%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}img{height:60px;width:60px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.active{border:2px solid #0267C1}.form-control-group{margin:10px 0}.action-btn{position:relative;bottom:0;right:0;display:flex;align-items:center;justify-content:flex-end;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}.required:after{content:\"*\";color:tomato}.error-msg{color:tomato}@media screen and (max-width: 475px){.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}}\n"] }]
|
3926
|
+
}], ctorParameters: () => [{ type: RestService }, { type: i2$3.Router }, { type: i5.MatDialogRef }, { type: StorageServiceService }, { type: i5$1.MessageService }] });
|
3927
|
+
|
3849
3928
|
class AuthenticationRequiredComponent {
|
3850
3929
|
constructor(restService, router, messageService, storageService, matDialog, dialogRef, bottomsheetRef) {
|
3851
3930
|
this.restService = restService;
|
@@ -3973,6 +4052,15 @@ class AuthenticationRequiredComponent {
|
|
3973
4052
|
confirmButtonText: "I loved it",
|
3974
4053
|
cancelButtonText: "Fill other basic details",
|
3975
4054
|
cancelButtonColor: "#928c8c",
|
4055
|
+
}).then((result) => {
|
4056
|
+
if (result.isDismissed) {
|
4057
|
+
this.matDialog.open(UserBasicInfoComponent, {
|
4058
|
+
height: '50vh',
|
4059
|
+
width: window.innerWidth > 475 ? '40vw' : '95vw',
|
4060
|
+
maxWidth: window.innerWidth > 475 ? '100vw' : '80vw',
|
4061
|
+
data: {}
|
4062
|
+
});
|
4063
|
+
}
|
3976
4064
|
});
|
3977
4065
|
}, (error) => {
|
3978
4066
|
this.buttonLoading = false;
|
@@ -5231,7 +5319,7 @@ class NavbarSectionComponent {
|
|
5231
5319
|
this.router.navigate(['/profile']);
|
5232
5320
|
}
|
5233
5321
|
else {
|
5234
|
-
this.matDialog.open(AuthenticationRequiredComponent, {
|
5322
|
+
this.matDialog.open(AuthenticationRequiredComponent, { panelClass: "authenticate" });
|
5235
5323
|
}
|
5236
5324
|
}
|
5237
5325
|
goToWishlist() {
|
@@ -9237,85 +9325,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
9237
9325
|
type: Output
|
9238
9326
|
}] } });
|
9239
9327
|
|
9240
|
-
class UserBasicInfoComponent {
|
9241
|
-
constructor(restService, router, dialogRef, storageService, messageService) {
|
9242
|
-
this.restService = restService;
|
9243
|
-
this.router = router;
|
9244
|
-
this.dialogRef = dialogRef;
|
9245
|
-
this.storageService = storageService;
|
9246
|
-
this.messageService = messageService;
|
9247
|
-
this.gender = null;
|
9248
|
-
this.firstName = "";
|
9249
|
-
this.middleName = "";
|
9250
|
-
this.lastName = "";
|
9251
|
-
this.mobile = "";
|
9252
|
-
this.email = "";
|
9253
|
-
this.profilePic = "";
|
9254
|
-
this.userDetails = null;
|
9255
|
-
this.isEdit = false;
|
9256
|
-
}
|
9257
|
-
ngOnInit() {
|
9258
|
-
this.userDetails = this.storageService.getUser();
|
9259
|
-
this.isEdit = !!this.userDetails;
|
9260
|
-
this.firstName = this.userDetails?.contact?.name?.split(" ")?.[0] ?? "";
|
9261
|
-
// this.middleName = this.userDetails?.contact?.name?.split(" ")?.[1] ?? "";
|
9262
|
-
this.lastName = this.userDetails?.contact?.name?.split(" ")?.[1] ?? "";
|
9263
|
-
this.email = this.userDetails?.contact?.email ?? "";
|
9264
|
-
this.mobile = this.userDetails?.contact.mobile ?? "";
|
9265
|
-
this.gender = this.userDetails?.gender;
|
9266
|
-
this.profilePic = this.userDetails?.profilePic ?? "";
|
9267
|
-
}
|
9268
|
-
close() {
|
9269
|
-
this.dialogRef.close();
|
9270
|
-
}
|
9271
|
-
saveProfile() {
|
9272
|
-
const payload = {
|
9273
|
-
userId: this.userDetails?.userId,
|
9274
|
-
businessId: localStorage.getItem("bId") ?? localStorage.getItem("businessId"),
|
9275
|
-
gender: this.gender,
|
9276
|
-
profilePic: this.profilePic,
|
9277
|
-
contact: {
|
9278
|
-
countryCode: "91",
|
9279
|
-
email: this.email,
|
9280
|
-
name: this.firstName + " " + (this.middleName?.length > 0 ? this.middleName + " " : "") + this.lastName
|
9281
|
-
}
|
9282
|
-
};
|
9283
|
-
this.restService.updateProfile(payload).subscribe((response) => {
|
9284
|
-
this.storageService.setUser(response.data);
|
9285
|
-
this.messageService.add({ severity: 'success', summary: 'Updated Successfully', detail: 'User detail updated' });
|
9286
|
-
if (this.dialogRef)
|
9287
|
-
this.dialogRef.close();
|
9288
|
-
else
|
9289
|
-
this.router.navigate(['/']);
|
9290
|
-
}, (error) => {
|
9291
|
-
this.messageService.add({ severity: 'error', summary: 'Error', detail: 'Failed to update your details try agin.' });
|
9292
|
-
});
|
9293
|
-
}
|
9294
|
-
validateName(event) {
|
9295
|
-
if ((event.keyCode >= 65 && event.keyCode <= 90) || event.keyCode == 16 || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46) {
|
9296
|
-
return;
|
9297
|
-
}
|
9298
|
-
event.preventDefault();
|
9299
|
-
}
|
9300
|
-
get isMobile() {
|
9301
|
-
return window.innerWidth < 475;
|
9302
|
-
}
|
9303
|
-
get isEmailValid() {
|
9304
|
-
return this.email?.includes("@") && this.email.includes(".com") || (this.email?.length == 0);
|
9305
|
-
}
|
9306
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, deps: [{ token: RestService }, { token: i2$3.Router }, { token: i5.MatDialogRef }, { token: StorageServiceService }, { token: i5$1.MessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
9307
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.4", type: UserBasicInfoComponent, isStandalone: true, selector: "simpo-user-basic-info", providers: [MessageService], ngImport: i0, template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n <!-- <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div> -->\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n\r\n <div class=\"form-control-group\" *ngIf=\"isEdit\">\r\n <div class=\"label required\">Mobile</div>\r\n <input type=\"number\" placeholder=\"Enter mobile\" [(ngModel)]=\"mobile\" disabled>\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n <span class=\"error-msg\" [style.visibility]=\"isEmailValid ? 'hidden' : 'visible'\">Please enter valid email</span>\r\n </div>\r\n \r\n <div class=\"form-control-group-full\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">{{!isEdit ? 'Skip' : 'Close'}}</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>\r\n<p-toast position=\"bottom-right\" [baseZIndex]=\"10000000000\" [autoZIndex]=\"true\" [showTransformOptions]=\"isMobile ? 'translateY(-100%)' : ''\"></p-toast>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:100%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}img{height:60px;width:60px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.active{border:2px solid #0267C1}.form-control-group{margin:10px 0}.action-btn{position:relative;bottom:0;right:0;display:flex;align-items:center;justify-content:flex-end;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}.required:after{content:\"*\";color:tomato}.error-msg{color:tomato}@media screen and (max-width: 475px){.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i8.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: i8.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ToastModule }, { kind: "component", type: i17.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }] }); }
|
9308
|
-
}
|
9309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: UserBasicInfoComponent, decorators: [{
|
9310
|
-
type: Component,
|
9311
|
-
args: [{ selector: 'simpo-user-basic-info', standalone: true, imports: [
|
9312
|
-
CommonModule,
|
9313
|
-
MatDialogModule,
|
9314
|
-
FormsModule,
|
9315
|
-
ToastModule
|
9316
|
-
], providers: [MessageService], template: "<section style=\"padding: 20px\" class=\"position-relative\">\r\n <div class=\"d-flex flex-wrap justify-content-between\">\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">First Name</div>\r\n <input type=\"text\" placeholder=\"Enter first name\" [(ngModel)]=\"firstName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n <!-- <div class=\"form-control-group-3\">\r\n <div class=\"label\">Middle Name</div>\r\n <input type=\"text\" placeholder=\"Enter middle name\" [(ngModel)]=\"middleName\">\r\n </div> -->\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Last Name</div>\r\n <input type=\"text\" placeholder=\"Enter last name\" [(ngModel)]=\"lastName\" (keydown)=\"validateName($event)\">\r\n </div>\r\n\r\n <div class=\"form-control-group\" *ngIf=\"isEdit\">\r\n <div class=\"label required\">Mobile</div>\r\n <input type=\"number\" placeholder=\"Enter mobile\" [(ngModel)]=\"mobile\" disabled>\r\n </div>\r\n <div class=\"form-control-group\">\r\n <div class=\"label\">Email</div>\r\n <input type=\"text\" placeholder=\"Enter email\" [(ngModel)]=\"email\">\r\n <span class=\"error-msg\" [style.visibility]=\"isEmailValid ? 'hidden' : 'visible'\">Please enter valid email</span>\r\n </div>\r\n \r\n <div class=\"form-control-group-full\">\r\n <div class=\"label\">Select Gender</div>\r\n <div class=\"d-flex align-items-center\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108296&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'MALE'\" [ngClass]=\"{'active': gender == 'MALE' }\">\r\n <img loading=\"lazy\" onerror=\"this.src='https://i.postimg.cc/hPS2JpV0/no-image-available.jpg'\" src=\"https://img.icons8.com/?size=100&id=108295&format=png&color=000000\" alt=\"\"\r\n (click)=\"gender = 'FEMALE'\" [ngClass]=\"{'active': gender == 'FEMALE'}\">\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"action-btn\">\r\n <span class=\"skip-btn\" (click)=\"close()\">{{!isEdit ? 'Skip' : 'Close'}}</span>\r\n <button (click)=\"saveProfile()\">Save Profile</button>\r\n </div>\r\n</section>\r\n<p-toast position=\"bottom-right\" [baseZIndex]=\"10000000000\" [autoZIndex]=\"true\" [showTransformOptions]=\"isMobile ? 'translateY(-100%)' : ''\"></p-toast>", styles: [".form-control-group,.form-control-group-3,.form-control-group-full{width:100%}:is(.form-control-group,.form-control-group-3,.form-control-group-full)>input{width:100%;padding:10px;border-radius:3px;border:1.5px solid lightgray}.label{color:#000}.form-control-group-3{width:32%!important}.form-control-group-full{width:100%}img{height:60px;width:60px;object-fit:cover;margin:0 5px;border:2px solid transparent;cursor:pointer;border-radius:50%}.active{border:2px solid #0267C1}.form-control-group{margin:10px 0}.action-btn{position:relative;bottom:0;right:0;display:flex;align-items:center;justify-content:flex-end;gap:20px}.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}.required:after{content:\"*\";color:tomato}.error-msg{color:tomato}@media screen and (max-width: 475px){.action-btn .skip-btn{color:#0267c1;cursor:pointer}.action-btn button{width:100px!important;border:none;background-color:#0267c1;color:#fff;cursor:pointer;border-radius:3px;padding:8px 0;font-size:14px!important;font-weight:500!important}}\n"] }]
|
9317
|
-
}], ctorParameters: () => [{ type: RestService }, { type: i2$3.Router }, { type: i5.MatDialogRef }, { type: StorageServiceService }, { type: i5$1.MessageService }] });
|
9318
|
-
|
9319
9328
|
class UserProfileComponent extends BaseSection {
|
9320
9329
|
constructor(router, _eventService, restService, storageService, cartService, matDialog, matBottomSheet, cookieService, messageService) {
|
9321
9330
|
super();
|