favesalon-embed 1.0.5 → 1.0.7
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/dist/custom-elements/index.d.ts +36 -0
- package/dist/favesalon-embed/activate-form.entry.js +70 -0
- package/dist/favesalon-embed/change-password-form.entry.js +81 -0
- package/dist/favesalon-embed/chat-box.entry.js +1 -1
- package/dist/favesalon-embed/chat-button.entry.js +43 -12
- package/dist/favesalon-embed/chat-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-messages.entry.js +1 -1
- package/dist/favesalon-embed/chat-rooms.entry.js +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/login-form.entry.js +67 -0
- package/dist/favesalon-embed/notify-sounds.entry.js +1 -1
- package/dist/favesalon-embed/register-form.entry.js +88 -0
- package/dist/favesalon-embed/reset-password-form.entry.js +47 -0
- package/dist/favesalon-embed/salon-booking.entry.js +1 -1
- package/dist/favesalon-embed/salon-gift-card.entry.js +1 -1
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +19 -3
- package/dist/favesalon-embed/salon-latest-styles.entry.js +14 -7
- package/dist/favesalon-embed/salon-locations.entry.js +1 -1
- package/dist/favesalon-embed/salon-lookbook.entry.js +16 -4
- package/dist/favesalon-embed/salon-reviews.entry.js +18 -4
- package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
- package/dist/favesalon-embed/salon-services.entry.js +23 -11
- package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
- package/dist/favesalon-embed/{services-260ea6eb.js → services-d71be591.js} +36 -0
- package/dist/favesalon-embed/style-detail.entry.js +26 -8
- package/dist/favesalon-embed/user-avatar.entry.js +3 -1
- package/dist/favesalon-embed/user-form.entry.js +44 -0
- package/dist/types/components/activate-form/activate-form.d.ts +12 -0
- package/dist/types/components/change-password-form/change-password-form.d.ts +12 -0
- package/dist/types/components/chat-button/index.d.ts +6 -2
- package/dist/types/components/login-form/login-form.d.ts +10 -0
- package/dist/types/components/register-form/register-form.d.ts +13 -0
- package/dist/types/components/reset-password-form/reset-password-form.d.ts +9 -0
- package/dist/types/components/user-form/user-form.d.ts +7 -0
- package/dist/types/components.d.ts +106 -2
- package/dist/types/services/services.d.ts +16 -0
- package/dist/types/types/user.d.ts +6 -0
- package/package.json +1 -1
- package/dist/favesalon-embed/services-122dcf73.js +0 -23886
- package/dist/favesalon-embed/services-23eda072.js +0 -23877
- package/dist/favesalon-embed/services-243eef47.js +0 -23880
- package/dist/favesalon-embed/services-27607998.js +0 -23886
- package/dist/favesalon-embed/services-46b2f0aa.js +0 -23867
- package/dist/favesalon-embed/services-65a8cf4a.js +0 -23887
- package/dist/favesalon-embed/services-8f52210f.js +0 -23880
- package/dist/favesalon-embed/services-de32365e.js +0 -23880
- package/dist/favesalon-embed/services-e9cfcd2b.js +0 -23885
- package/dist/favesalon-embed/services-f7278483.js +0 -23880
- package/dist/favesalon-embed/services-f9872bea.js +0 -23880
- package/dist/favesalon-embed/utils-2c19db45.js +0 -25
- package/dist/favesalon-embed/utils-89c2cff2.js +0 -32
- package/dist/favesalon-embed/utils-e226fa04.js +0 -32
|
@@ -39,7 +39,7 @@ const SalonBooking = class {
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
return (h("div", { class: "salon-booking" }, h("div", { class: "salon-booking--button" }, h("button",
|
|
42
|
+
return (h("div", { class: "salon-booking" }, h("div", { class: "salon-booking--button" }, h("button", { type: "button", class: buttonClass, onClick: () => this.openModal(), ...buttonStyle }, this.buttonText))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
SalonBooking.style = indexCss;
|
|
@@ -39,7 +39,7 @@ const SalonGiftCard = class {
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button",
|
|
42
|
+
return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button", { type: "button", class: buttonClass, onClick: () => this.openModal(), ...buttonStyle }, this.buttonText))));
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
SalonGiftCard.style = indexCss;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-
|
|
2
|
+
import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-d71be591.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import { g as getRatingText } from './utils-fd30fb29.js';
|
|
5
5
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -29,7 +29,13 @@ const SalonLatestReviews = class {
|
|
|
29
29
|
render() {
|
|
30
30
|
if (this.isLoading) {
|
|
31
31
|
return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index) => {
|
|
32
|
-
return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style:
|
|
32
|
+
return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: {
|
|
33
|
+
border: `1px solid ${Colors.Gray02}`,
|
|
34
|
+
background: Colors.White,
|
|
35
|
+
borderRadius: '8px',
|
|
36
|
+
overflow: 'hidden',
|
|
37
|
+
...index > 0 ? { marginLeft: '16px' } : {},
|
|
38
|
+
} }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, h("div", { style: {
|
|
33
39
|
backgroundColor: Colors.Gray02,
|
|
34
40
|
borderRadius: '50px',
|
|
35
41
|
height: '48px',
|
|
@@ -67,7 +73,17 @@ const SalonLatestReviews = class {
|
|
|
67
73
|
const ratingTexts = getRatingText();
|
|
68
74
|
return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
|
|
69
75
|
const { user } = review;
|
|
70
|
-
return (h("div", { class: "salon-review", style:
|
|
76
|
+
return (h("div", { class: "salon-review", style: {
|
|
77
|
+
border: `1px solid ${Colors.Gray02}`,
|
|
78
|
+
background: Colors.White,
|
|
79
|
+
borderRadius: '8px',
|
|
80
|
+
overflow: 'hidden',
|
|
81
|
+
...index > 0 ? { marginLeft: '16px' } : {},
|
|
82
|
+
} }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, h("user-avatar", { size: 48, name: h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: {
|
|
83
|
+
fontSize: '16px',
|
|
84
|
+
marginRight: '4px',
|
|
85
|
+
...score <= review.point ? { color: this.primaryColor } : { color: Colors.Gray04 },
|
|
86
|
+
} }))), h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs_min(review.createdDate).format(shortDateYearFormat))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, h("div", { class: "salon-review--description", style: {
|
|
71
87
|
fontSize: '16px',
|
|
72
88
|
lineHeight: '26px',
|
|
73
89
|
overflow: 'hidden',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService, i as isVideoMedia } from './services-
|
|
3
|
+
import { H as HttpService, i as isVideoMedia } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = "salon-latest-styles .view--salon-styles--item{width:120px;height:120px}@media (min-width: 1024px){salon-latest-styles .view--salon-styles--item{width:200px;height:200px}}";
|
|
@@ -77,12 +77,19 @@ const SalonLatestStyles = class {
|
|
|
77
77
|
float: 'left',
|
|
78
78
|
paddingLeft: '16px',
|
|
79
79
|
marginBottom: '16px',
|
|
80
|
-
} }, h("div", { class: "view--salon-styles--item", style:
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
} }, h("div", { class: "view--salon-styles--item", style: {
|
|
81
|
+
backgroundColor: Colors.Gray01,
|
|
82
|
+
borderRadius: '8px',
|
|
83
|
+
overflow: 'hidden',
|
|
84
|
+
position: 'relative',
|
|
85
|
+
cursor: 'pointer',
|
|
86
|
+
...!isVideo && firstMedia ? {
|
|
87
|
+
backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
|
|
88
|
+
backgroundRepeat: 'no-repeat',
|
|
89
|
+
backgroundPosition: 'center center',
|
|
90
|
+
backgroundSize: 'cover',
|
|
91
|
+
} : {},
|
|
92
|
+
}, onClick: () => this.onClickLookbook(faveStyle) }, isVideo && firstMedia && (h("div", null, h("video", { muted: true, width: "100%", height: "100%", poster: imageThumb }, h("source", { src: firstMedia.mediaUrl, type: "video/mp4" })), h("i", { class: "ri-play-circle-fill", style: {
|
|
86
93
|
fontSize: '48px',
|
|
87
94
|
color: Colors.TextColor,
|
|
88
95
|
position: 'absolute',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { a as formatWebsiteUrl, b as formatFullAddress } from './utils-fd30fb29.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
|
-
import { H as HttpService } from './services-
|
|
4
|
+
import { H as HttpService } from './services-d71be591.js';
|
|
5
5
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
6
6
|
|
|
7
7
|
const indexCss = "@media (min-width: 768px){salon-locations .salon-contact--links{overflow:hidden;margin-left:-32px}salon-locations .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px}salon-locations .salon-contact--links-item:nth-child(2n+1){clear:left}salon-locations .salon-contact--links-item+.salon-contact--links-item{margin-top:8px}}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService } from './services-
|
|
3
|
+
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = "@media (max-width: 768px){salon-lookbook .view-header{display:block !important}salon-lookbook .salon-loobook--serch-result{margin-bottom:16px}salon-lookbook .salon-loobook--filter-wrapper>label,salon-lookbook .salon-loobook--sort-wrapper>label{display:none !important}}";
|
|
@@ -81,7 +81,11 @@ const SalonLookbook = class {
|
|
|
81
81
|
async fetchData() {
|
|
82
82
|
try {
|
|
83
83
|
const promises = [
|
|
84
|
-
this.fetchLookbooks(
|
|
84
|
+
this.fetchLookbooks({
|
|
85
|
+
page: 1,
|
|
86
|
+
sort: this.sortBy,
|
|
87
|
+
...this.filterBy !== 'all' ? { services: [this.filterBy] } : {},
|
|
88
|
+
}),
|
|
85
89
|
this.fetchCategories(),
|
|
86
90
|
];
|
|
87
91
|
return Promise.all(promises);
|
|
@@ -116,7 +120,11 @@ const SalonLookbook = class {
|
|
|
116
120
|
this.salonLookbooks = [];
|
|
117
121
|
this.hideLoadMore = true;
|
|
118
122
|
this.filterBy = filterBy;
|
|
119
|
-
await this.fetchLookbooks(
|
|
123
|
+
await this.fetchLookbooks({
|
|
124
|
+
page: this.currentPage,
|
|
125
|
+
sort: this.sortBy,
|
|
126
|
+
...this.filterBy !== 'all' ? { services: [Number(this.filterBy)] } : {},
|
|
127
|
+
});
|
|
120
128
|
if (window.masonry) {
|
|
121
129
|
this.isLayoutSetup = false;
|
|
122
130
|
}
|
|
@@ -130,7 +138,11 @@ const SalonLookbook = class {
|
|
|
130
138
|
this.salonLookbooks = [];
|
|
131
139
|
this.hideLoadMore = true;
|
|
132
140
|
this.sortBy = sortBy;
|
|
133
|
-
await this.fetchLookbooks(
|
|
141
|
+
await this.fetchLookbooks({
|
|
142
|
+
page: this.currentPage,
|
|
143
|
+
sort: this.sortBy,
|
|
144
|
+
...this.filterBy !== 'all' ? { services: [this.filterBy] } : {},
|
|
145
|
+
});
|
|
134
146
|
if (window.masonry) {
|
|
135
147
|
this.isLayoutSetup = false;
|
|
136
148
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-
|
|
2
|
+
import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-d71be591.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
@@ -79,7 +79,12 @@ const SalonReviews = class {
|
|
|
79
79
|
onChangeFilter(filterBy) {
|
|
80
80
|
this.isFiltering = true;
|
|
81
81
|
try {
|
|
82
|
-
HttpService().fetchSalonReviews(this.salonId,
|
|
82
|
+
HttpService().fetchSalonReviews(this.salonId, {
|
|
83
|
+
page: 1,
|
|
84
|
+
sort: this.sortBy,
|
|
85
|
+
limit: pageLimited,
|
|
86
|
+
...filterBy.length > 0 ? { avg_point: filterBy } : {},
|
|
87
|
+
}).then(response => {
|
|
83
88
|
const { total, data: allReviews } = response;
|
|
84
89
|
this.page = 1;
|
|
85
90
|
this.totalReviews = total;
|
|
@@ -93,7 +98,12 @@ const SalonReviews = class {
|
|
|
93
98
|
onChangeSorting(sortBy) {
|
|
94
99
|
this.isSorting = true;
|
|
95
100
|
try {
|
|
96
|
-
HttpService().fetchSalonReviews(this.salonId,
|
|
101
|
+
HttpService().fetchSalonReviews(this.salonId, {
|
|
102
|
+
page: 1,
|
|
103
|
+
sort: sortBy,
|
|
104
|
+
limit: pageLimited,
|
|
105
|
+
...this.filterBy.length > 0 ? { avg_point: this.filterBy } : {},
|
|
106
|
+
}).then(response => {
|
|
97
107
|
const { total, data: allReviews } = response;
|
|
98
108
|
this.page = 1;
|
|
99
109
|
this.totalReviews = total;
|
|
@@ -107,7 +117,11 @@ const SalonReviews = class {
|
|
|
107
117
|
render() {
|
|
108
118
|
const ratingTexts = ['', 'Poor', 'Sufficient', 'Average', 'Well', 'Very good'];
|
|
109
119
|
return (h("div", { class: "view view--salon-reviews" }, h("div", { class: "salon-reviews--filters" }, h("div", { class: "salon-reviews--score" }, h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row' } }, [1, 2, 3, 4, 5].map(score => {
|
|
110
|
-
return (h("i", { class: score <= this.stats.reviewPoint ? 'ri-heart-fill' : 'ri-heart-line', style:
|
|
120
|
+
return (h("i", { class: score <= this.stats.reviewPoint ? 'ri-heart-fill' : 'ri-heart-line', style: {
|
|
121
|
+
fontSize: '32px',
|
|
122
|
+
marginRight: '4px',
|
|
123
|
+
...score <= this.stats.reviewPoint ? { color: this.primaryColor } : { color: Colors.Gray04 },
|
|
124
|
+
} }));
|
|
111
125
|
})), h("div", { class: "salon-review--rating--date", style: {
|
|
112
126
|
display: 'flex',
|
|
113
127
|
flexDirection: 'row',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, B as BusinessHourStatus } from './services-
|
|
2
|
+
import { H as HttpService, B as BusinessHourStatus } from './services-d71be591.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { H as HttpService, a as sortBy_1 } from './services-
|
|
2
|
+
import { H as HttpService, a as sortBy_1 } from './services-d71be591.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
@@ -39,11 +39,13 @@ const SalonServices = class {
|
|
|
39
39
|
backgroundColor: Colors.Gray03,
|
|
40
40
|
height: '20px',
|
|
41
41
|
width: '120px',
|
|
42
|
-
} }), h("div", { class: "view view--salon-service-type", style: { border: `1px solid ${Colors.Gray01}`, marginTop: '12px' } }, h("div", { class: "view-content" }, [1, 2, 3].map((fakeGroupId, fakeGroupIndex) => (h("div", { key: `service-group--${fakeId}--service-${fakeGroupId}--${fakeGroupIndex}`, class: "salon-service" }, h("div", { class: "salon-service--name", style:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
} }), h("div", { class: "view view--salon-service-type", style: { border: `1px solid ${Colors.Gray01}`, marginTop: '12px' } }, h("div", { class: "view-content" }, [1, 2, 3].map((fakeGroupId, fakeGroupIndex) => (h("div", { key: `service-group--${fakeId}--service-${fakeGroupId}--${fakeGroupIndex}`, class: "salon-service" }, h("div", { class: "salon-service--name", style: {
|
|
43
|
+
...fakeGroupIndex > 0 ? {
|
|
44
|
+
marginTop: '12px',
|
|
45
|
+
paddingTop: '12px',
|
|
46
|
+
borderTop: `1px solid ${Colors.Gray01}`,
|
|
47
|
+
} : {},
|
|
48
|
+
} }, h("div", { key: `service-group--${fakeId}--${index}`, style: {
|
|
47
49
|
backgroundColor: Colors.Gray01,
|
|
48
50
|
height: '16px',
|
|
49
51
|
width: '120px',
|
|
@@ -56,11 +58,21 @@ const SalonServices = class {
|
|
|
56
58
|
}
|
|
57
59
|
return (h("div", { class: "salon-services--container" }, h("div", { class: "view view--salon-services--header", style: { border: `1px solid ${Colors.Gray02}` } }, h("div", { class: "view-content", style: { overflowX: 'auto' } }, h("div", { style: { whiteSpace: 'nowrap' } }, sortBy_1(this.salonServices || [], (['order', 'name'])).map((serviceGroup, index) => (h("a", { href: `#service-group--${serviceGroup.id}` }, h("button", { type: "button", class: this.buttonClass, style: index > 0 ? { marginLeft: '12px' } : {} }, serviceGroup.name))))))), sortBy_1(this.salonServices || [], (['order', 'name'])).map(serviceGroup => {
|
|
58
60
|
const hasMultipleCates = (serviceGroup.data || []).length > 1;
|
|
59
|
-
return (h("div", { id: `service-group--${serviceGroup.id}`, style: { marginTop: '32px' } }, h("h3", { style: { fontSize: '24px', marginBottom: '12px' } }, serviceGroup.name), h("div", { class: "view view--salon-service-type", style: { border: `1px solid ${Colors.Gray02}` } }, h("div", { class: "view-content" }, (serviceGroup.data || []).map((subGroup, subGroupIndex) => (h("div", { class: "salon-service-category" }, hasMultipleCates && (h("h4", { style:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
return (h("div", { id: `service-group--${serviceGroup.id}`, style: { marginTop: '32px' } }, h("h3", { style: { fontSize: '24px', marginBottom: '12px' } }, serviceGroup.name), h("div", { class: "view view--salon-service-type", style: { border: `1px solid ${Colors.Gray02}` } }, h("div", { class: "view-content" }, (serviceGroup.data || []).map((subGroup, subGroupIndex) => (h("div", { class: "salon-service-category" }, hasMultipleCates && (h("h4", { style: {
|
|
62
|
+
fontSize: '20px',
|
|
63
|
+
marginBottom: '12px',
|
|
64
|
+
paddingBottom: '12px',
|
|
65
|
+
borderBottom: `1px solid ${Colors.Gray02}`,
|
|
66
|
+
...subGroupIndex > 0 ? { marginTop: '32px' } : {},
|
|
67
|
+
} }, subGroup.name)), (subGroup.data || []).map((service, serviceIndex) => (h("div", { class: "salon-service" }, h("div", { class: "salon-service--name", style: {
|
|
68
|
+
fontSize: '16px',
|
|
69
|
+
fontWeight: '500',
|
|
70
|
+
...serviceIndex > 0 ? {
|
|
71
|
+
marginTop: '12px',
|
|
72
|
+
paddingTop: '12px',
|
|
73
|
+
borderTop: `1px solid ${Colors.Gray01}`,
|
|
74
|
+
} : {},
|
|
75
|
+
} }, service.name), (!service.hideDuration || !service.hidePrice) && (h("div", { style: {
|
|
64
76
|
display: 'block',
|
|
65
77
|
marginTop: '4px',
|
|
66
78
|
fontSize: '90%',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService } from './services-
|
|
3
|
+
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
6
6
|
const indexCss = ".view--salon-stylists{overflow:hidden;margin-left:-12px;margin-top:-12px}.view--salon-stylists .salon-stylist{float:left;padding-left:12px;padding-top:12px;width:50%}.view--salon-stylists .salon-stylist--avatar{height:180px}@media (min-width: 576px){.view--salon-stylists .salon-stylist{width:33.33%;max-width:240px}}@media (min-width: 768px){.view--salon-stylists{margin-left:-24px;margin-top:-24px}.view--salon-stylists .salon-stylist{padding-left:24px;padding-top:24px;width:264px;max-width:none}.view--salon-stylists .salon-stylist--avatar{height:240px}}";
|
|
@@ -23387,6 +23387,9 @@ function createUser(blob) {
|
|
|
23387
23387
|
fullName: userNames.length > 0 ? userNames.join(' ') : (blob.fullName || blob.name || blob.username),
|
|
23388
23388
|
avatar: blob.avatar || blob.full_profile_image_thumb,
|
|
23389
23389
|
mobilePhone: blob.mobile_phone,
|
|
23390
|
+
accessToken: blob.access_token,
|
|
23391
|
+
email: blob.email,
|
|
23392
|
+
password: blob.password,
|
|
23390
23393
|
};
|
|
23391
23394
|
}
|
|
23392
23395
|
function createUserFromChatRoom(blob) {
|
|
@@ -23611,6 +23614,39 @@ class HttpService {
|
|
|
23611
23614
|
}
|
|
23612
23615
|
catch (error) { }
|
|
23613
23616
|
}
|
|
23617
|
+
login(apiUrl, options) {
|
|
23618
|
+
const url = `${apiUrl}/${apiV2Prefix}/user/login`;
|
|
23619
|
+
return this.http.post(url, options)
|
|
23620
|
+
.then(response => {
|
|
23621
|
+
const status = get_1(response, 'data.status');
|
|
23622
|
+
const blob = get_1(response, 'data.data');
|
|
23623
|
+
if (status && blob.id) {
|
|
23624
|
+
const userEntity = createUser(blob);
|
|
23625
|
+
return Promise.resolve(userEntity);
|
|
23626
|
+
}
|
|
23627
|
+
return Promise.reject(response);
|
|
23628
|
+
});
|
|
23629
|
+
}
|
|
23630
|
+
register(options) {
|
|
23631
|
+
const url = `${apiV2Prefix}/user/create`;
|
|
23632
|
+
return this.http.post(url, options);
|
|
23633
|
+
}
|
|
23634
|
+
resendActivateCode(email) {
|
|
23635
|
+
const url = `${apiV2Prefix}/user/resend-activate?email=${email}`;
|
|
23636
|
+
return this.http.get(url);
|
|
23637
|
+
}
|
|
23638
|
+
activateAccount(email, code) {
|
|
23639
|
+
const url = `${apiV2Prefix}/user/active?email=${email}&code=${code}`;
|
|
23640
|
+
return this.http.get(url);
|
|
23641
|
+
}
|
|
23642
|
+
resetPassword(email) {
|
|
23643
|
+
const url = `${apiV2Prefix}/user/forgot-password?${email.indexOf('@') > -1 ? 'email' : 'phone'}=${email}`;
|
|
23644
|
+
return this.http.get(url);
|
|
23645
|
+
}
|
|
23646
|
+
onChangePassword(options) {
|
|
23647
|
+
const url = `${apiV2Prefix}/user/change-password`;
|
|
23648
|
+
return this.http.post(url, options);
|
|
23649
|
+
}
|
|
23614
23650
|
fetchClients(salonId, keyword, accessToken) {
|
|
23615
23651
|
const url = `${apiV1Prefix}/salon/clients/list/${salonId}?page=1&limit=10&access_token=${accessToken}`;
|
|
23616
23652
|
const payload = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-
|
|
2
|
+
import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-d71be591.js';
|
|
3
3
|
import { r as relativeTime } from './relativeTime-268e64b0.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
5
5
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -121,7 +121,17 @@ const StyleDetail = class {
|
|
|
121
121
|
return (h("div", { class: "salon-modal salon-modal--lookbook-detail" }, h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("div", { class: "style-detail" }, h("div", { class: "style-detail--header" }, h("div", { style: {
|
|
122
122
|
position: 'relative',
|
|
123
123
|
overflow: 'hidden',
|
|
124
|
-
} }, h("div", { style:
|
|
124
|
+
} }, h("div", { style: {
|
|
125
|
+
backgroundColor: Colors.Gray01,
|
|
126
|
+
backgroundSize: 'cover',
|
|
127
|
+
backgroundRepeat: 'no-repeat',
|
|
128
|
+
backgroundPosition: '0 0',
|
|
129
|
+
filter: 'blur(30px)',
|
|
130
|
+
position: 'absolute',
|
|
131
|
+
inset: '0',
|
|
132
|
+
zIndex: '1',
|
|
133
|
+
...this.currentMedia && !isVideoMedia(this.currentMedia) ? { backgroundImage: `url("${this.currentMedia.imageThumb}")` } : {},
|
|
134
|
+
} }), h("div", { style: {
|
|
125
135
|
zIndex: '2',
|
|
126
136
|
position: 'relative',
|
|
127
137
|
width: '100%',
|
|
@@ -176,12 +186,20 @@ const StyleDetail = class {
|
|
|
176
186
|
position: 'relative',
|
|
177
187
|
} }, this.albumMedias.map((media, idx) => {
|
|
178
188
|
const isStyleVideo = isVideoMedia(media);
|
|
179
|
-
return (h("div", { class: "style-detail--slides--thumbnail", style:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
189
|
+
return (h("div", { class: "style-detail--slides--thumbnail", style: {
|
|
190
|
+
backgroundColor: Colors.Gray01,
|
|
191
|
+
borderRadius: '4px',
|
|
192
|
+
overflow: 'hidden',
|
|
193
|
+
position: 'relative',
|
|
194
|
+
cursor: 'pointer',
|
|
195
|
+
...this.currentMediaIdx !== idx ? { opacity: '0.75' } : {},
|
|
196
|
+
...!isStyleVideo ? {
|
|
197
|
+
backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
|
|
198
|
+
backgroundRepeat: 'no-repeat',
|
|
199
|
+
backgroundPosition: 'center center',
|
|
200
|
+
backgroundSize: 'cover',
|
|
201
|
+
} : {},
|
|
202
|
+
}, onClick: () => {
|
|
185
203
|
this.currentMedia = media;
|
|
186
204
|
this.currentMediaIdx = idx;
|
|
187
205
|
} }, isStyleVideo && (h("div", null, h("video", { muted: true, width: "100%", height: "100%", poster: media.imageThumb }, h("source", { src: media.mediaUrl, type: "video/mp4" })), h("i", { class: "ri-play-circle-fill", style: {
|
|
@@ -41,7 +41,9 @@ const UserAvatar = class {
|
|
|
41
41
|
overflow: 'hidden',
|
|
42
42
|
whiteSpace: 'nowrap',
|
|
43
43
|
textOverflow: 'ellipsis',
|
|
44
|
-
} }, h("div", { style:
|
|
44
|
+
} }, h("div", { style: {
|
|
45
|
+
...this.nameStyle,
|
|
46
|
+
} }, this.name), this.description && h("div", { style: { color: '#999999' } }, this.description)))));
|
|
45
47
|
}
|
|
46
48
|
};
|
|
47
49
|
;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
+
|
|
3
|
+
const userFormCss = ":host{display:block}";
|
|
4
|
+
|
|
5
|
+
var FormType;
|
|
6
|
+
(function (FormType) {
|
|
7
|
+
FormType["Login"] = "Login";
|
|
8
|
+
FormType["Register"] = "Register";
|
|
9
|
+
FormType["Activate"] = "Activate";
|
|
10
|
+
FormType["ResetPassword"] = "ResetPassword";
|
|
11
|
+
FormType["ChangePassword"] = "ChangePassword";
|
|
12
|
+
})(FormType || (FormType = {}));
|
|
13
|
+
const UserForm = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
registerInstance(this, hostRef);
|
|
16
|
+
this.onSuccess = undefined;
|
|
17
|
+
this.type = undefined;
|
|
18
|
+
this.currentUser = undefined;
|
|
19
|
+
}
|
|
20
|
+
render() {
|
|
21
|
+
if (this.type === FormType.Register) {
|
|
22
|
+
return (h("div", null, h("div", { style: { marginBottom: '24px' } }, h("h3", { style: { fontSize: '24px', margin: '8px 0' } }, "Create an account"), h("div", { style: { marginBottom: '4px' } }, "Already have an account? ", h("span", { onClick: () => this.type = FormType.Login, style: { cursor: 'pointer', textDecoration: 'underline' } }, "Signin now"))), h("register-form", { onSuccess: (user) => {
|
|
23
|
+
this.currentUser = user;
|
|
24
|
+
this.type = FormType.Activate;
|
|
25
|
+
} })));
|
|
26
|
+
}
|
|
27
|
+
if (this.type === FormType.Activate) {
|
|
28
|
+
return (h("div", null, h("div", { style: { marginBottom: '24px' } }, h("h3", { style: { fontSize: '24px', margin: '8px 0' } }, "Activate account"), h("div", { style: { marginBottom: '4px' } }, "We\u2019ve sent you a confirmation code. Please check your email inbox and enter the code below")), h("activate-form", { username: (this.currentUser || {}).email, password: (this.currentUser || {}).password, onSuccess: (user) => this.onSuccess(user) })));
|
|
29
|
+
}
|
|
30
|
+
if (this.type === FormType.ResetPassword) {
|
|
31
|
+
return (h("div", null, h("div", { style: { marginBottom: '24px' } }, h("h3", { style: { fontSize: '24px', margin: '8px 0' } }, "Reset password"), h("div", { style: { marginBottom: '4px' } }, "Already have an account? ", h("span", { onClick: () => this.type = FormType.Login, style: { cursor: 'pointer', textDecoration: 'underline' } }, "Signin now"))), h("reset-password-form", { onSuccess: (user) => {
|
|
32
|
+
this.currentUser = user;
|
|
33
|
+
this.type = FormType.ChangePassword;
|
|
34
|
+
} })));
|
|
35
|
+
}
|
|
36
|
+
if (this.type === FormType.ChangePassword) {
|
|
37
|
+
return (h("div", null, h("div", { style: { marginBottom: '24px' } }, h("h3", { style: { fontSize: '24px', margin: '8px 0' } }, "Change password"), h("div", { style: { marginBottom: '4px' } }, "We\u2019ve sent you a confirmation code. Please check your email inbox and enter the code below")), h("change-password-form", { username: (this.currentUser || {}).email, onSuccess: (user) => this.onSuccess(user) })));
|
|
38
|
+
}
|
|
39
|
+
return (h("div", null, h("div", { style: { marginBottom: '24px' } }, h("h3", { style: { fontSize: '24px', margin: '8px 0' } }, "Please login to continue"), h("div", { style: { marginBottom: '4px' } }, "Don\u2019t have an account? ", h("span", { onClick: () => this.type = FormType.Register, style: { cursor: 'pointer', textDecoration: 'underline' } }, "Signup now"))), h("login-form", { onSuccess: (user) => this.onSuccess(user) }), h("div", { style: { marginTop: '16px' } }, "Forgot your password? ", h("span", { onClick: () => this.type = FormType.ResetPassword, style: { cursor: 'pointer', textDecoration: 'underline' } }, "Reset now"))));
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
UserForm.style = userFormCss;
|
|
43
|
+
|
|
44
|
+
export { UserForm as user_form };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from '../../types/user';
|
|
2
|
+
export declare class ActivateForm {
|
|
3
|
+
username: string;
|
|
4
|
+
password: string;
|
|
5
|
+
onSuccess: (user: User) => void;
|
|
6
|
+
isSubmitting: boolean;
|
|
7
|
+
error: string;
|
|
8
|
+
confirmCode: string;
|
|
9
|
+
onSubmit(evt: any): Promise<void>;
|
|
10
|
+
resendCode(evt: any): Promise<void>;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from '../../types/user';
|
|
2
|
+
export declare class ChangePasswordForm {
|
|
3
|
+
username: string;
|
|
4
|
+
onSuccess: (user: User) => void;
|
|
5
|
+
isSubmitting: boolean;
|
|
6
|
+
error: string;
|
|
7
|
+
confirmCode: string;
|
|
8
|
+
password: string;
|
|
9
|
+
onSubmit(evt: any): Promise<void>;
|
|
10
|
+
resendCode(evt: any): Promise<void>;
|
|
11
|
+
render(): any;
|
|
12
|
+
}
|
|
@@ -2,9 +2,12 @@ import { User } from '../../types/user';
|
|
|
2
2
|
import { ChatMessage, ChatRoom } from '../../types/chat';
|
|
3
3
|
export declare class ChatButton {
|
|
4
4
|
primaryColor: string;
|
|
5
|
-
accessToken: string;
|
|
6
|
-
senderId: string;
|
|
7
5
|
receiverId: string;
|
|
6
|
+
accessToken?: string;
|
|
7
|
+
senderId?: string;
|
|
8
|
+
senderIdState: string;
|
|
9
|
+
accessTokenState: string;
|
|
10
|
+
isChatVerificationExpanded: boolean;
|
|
8
11
|
senderInfo: User;
|
|
9
12
|
receiverInfo: User;
|
|
10
13
|
chatRoom: ChatRoom;
|
|
@@ -12,5 +15,6 @@ export declare class ChatButton {
|
|
|
12
15
|
isChatExpanded: boolean;
|
|
13
16
|
componentWillLoad(): void;
|
|
14
17
|
fetchData(): Promise<void>;
|
|
18
|
+
onVerificationSuccess(user: User): void;
|
|
15
19
|
render(): any;
|
|
16
20
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { User } from '../../types/user';
|
|
2
|
+
export declare class RegisterForm {
|
|
3
|
+
onSuccess: (user: User) => void;
|
|
4
|
+
isSubmitting: boolean;
|
|
5
|
+
error: string;
|
|
6
|
+
firstName: string;
|
|
7
|
+
lastName: string;
|
|
8
|
+
email: string;
|
|
9
|
+
phone: string;
|
|
10
|
+
password: string;
|
|
11
|
+
onSubmit(evt: any): Promise<void>;
|
|
12
|
+
render(): any;
|
|
13
|
+
}
|