favesalon-embed 0.1.0 → 1.0.0
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/cjs/chat-button.cjs.entry.js +118 -0
- package/dist/cjs/favesalon-embed.cjs.js +7 -3
- package/dist/cjs/google-map_5.cjs.entry.js +26 -7
- package/dist/cjs/{index-e6bea8f5.js → index-47c2a5f6.js} +512 -208
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/relativeTime-3721080d.js +9 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-booking.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card.cjs.entry.js +3 -2
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +5 -3
- package/dist/cjs/salon-lookbook.cjs.entry.js +7 -3
- package/dist/cjs/salon-ranking.cjs.entry.js +3 -2
- package/dist/cjs/salon-reviews.cjs.entry.js +10 -3
- package/dist/cjs/salon-services.cjs.entry.js +6 -3
- package/dist/cjs/salon-stylists.cjs.entry.js +9 -3
- package/dist/cjs/services-125c82d8.js +21492 -0
- package/dist/cjs/style-detail.cjs.entry.js +11 -9
- package/dist/cjs/user-avatar.cjs.entry.js +7 -3
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/chat-button/index.css +122 -0
- package/dist/collection/components/chat-button/index.js +218 -0
- package/dist/collection/components/chat-conversation/index.js +103 -0
- package/dist/collection/components/google-map/index.js +72 -68
- package/dist/collection/components/salon-booking/index.css +5 -0
- package/dist/collection/components/salon-booking/index.js +85 -80
- package/dist/collection/components/salon-booking/salon-booking-modal.js +73 -69
- package/dist/collection/components/salon-gift-card/index.css +6 -1
- package/dist/collection/components/salon-gift-card/index.js +85 -80
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +56 -52
- package/dist/collection/components/salon-info/index.css +1 -0
- package/dist/collection/components/salon-info/index.js +60 -54
- package/dist/collection/components/salon-latest-reviews/index.css +3 -0
- package/dist/collection/components/salon-latest-reviews/index.js +131 -144
- package/dist/collection/components/salon-latest-styles/index.css +2 -0
- package/dist/collection/components/salon-latest-styles/index.js +143 -138
- package/dist/collection/components/salon-locations/index.css +3 -0
- package/dist/collection/components/salon-locations/index.js +112 -120
- package/dist/collection/components/salon-lookbook/index.css +3 -0
- package/dist/collection/components/salon-lookbook/index.js +182 -190
- package/dist/collection/components/salon-ranking/index.js +68 -65
- package/dist/collection/components/salon-reviews/index.css +3 -0
- package/dist/collection/components/salon-reviews/index.js +146 -183
- package/dist/collection/components/salon-schedules/index.css +3 -0
- package/dist/collection/components/salon-schedules/index.js +129 -151
- package/dist/collection/components/salon-services/index.css +1 -0
- package/dist/collection/components/salon-services/index.js +117 -127
- package/dist/collection/components/salon-stylists/index.css +8 -0
- package/dist/collection/components/salon-stylists/index.js +137 -136
- package/dist/collection/components/style-detail/index.css +14 -0
- package/dist/collection/components/style-detail/index.js +265 -340
- package/dist/collection/components/user-avatar/index.js +119 -112
- package/dist/collection/mocks/users.js +10 -0
- package/dist/collection/services/services.js +121 -0
- package/dist/collection/types/chat.js +23 -0
- package/dist/collection/types/user.js +1 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +24628 -8605
- package/dist/esm/chat-button.entry.js +114 -0
- package/dist/esm/favesalon-embed.js +4 -3
- package/dist/esm/google-map_5.entry.js +26 -7
- package/dist/esm/{index-6af0a03d.js → index-3fae868e.js} +512 -209
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/relativeTime-cd452e6d.js +7 -0
- package/dist/esm/salon-booking-modal.entry.js +3 -2
- package/dist/esm/salon-booking.entry.js +3 -2
- package/dist/esm/salon-gift-card-modal.entry.js +3 -2
- package/dist/esm/salon-gift-card.entry.js +3 -2
- package/dist/esm/salon-latest-reviews.entry.js +5 -3
- package/dist/esm/salon-lookbook.entry.js +7 -3
- package/dist/esm/salon-ranking.entry.js +3 -2
- package/dist/esm/salon-reviews.entry.js +10 -3
- package/dist/esm/salon-services.entry.js +6 -3
- package/dist/esm/salon-stylists.entry.js +9 -3
- package/dist/esm/services-40a3e622.js +21485 -0
- package/dist/esm/style-detail.entry.js +10 -8
- package/dist/esm/user-avatar.entry.js +7 -3
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
- package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
- package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
- package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
- package/dist/favesalon-embed/p-22093506.entry.js +1 -0
- package/dist/favesalon-embed/p-32b314e9.js +2 -0
- package/dist/favesalon-embed/p-4a5eca9a.js +1 -1
- package/dist/favesalon-embed/p-58d2e9be.js +1 -0
- package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
- package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
- package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
- package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
- package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
- package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
- package/dist/favesalon-embed/p-b630ae68.js +1580 -0
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +1 -1
- package/dist/types/components/chat-button/index.d.ts +24 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/mocks/users.d.ts +10 -0
- package/dist/types/services/services.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +85 -11
- package/dist/types/types/chat.d.ts +17 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +3 -3
- package/readme.md +2 -2
- package/dist/cjs/services-eee8f251.js +0 -5634
- package/dist/esm/services-295247b1.js +0 -5627
- package/dist/favesalon-embed/p-292b97ba.entry.js +0 -1
- package/dist/favesalon-embed/p-4869dfed.entry.js +0 -1
- package/dist/favesalon-embed/p-4aee4fd9.entry.js +0 -1
- package/dist/favesalon-embed/p-5528c705.entry.js +0 -1
- package/dist/favesalon-embed/p-612ad685.entry.js +0 -1
- package/dist/favesalon-embed/p-75aef7e0.entry.js +0 -1
- package/dist/favesalon-embed/p-8c780874.entry.js +0 -1
- package/dist/favesalon-embed/p-8dbf04c5.js +0 -1
- package/dist/favesalon-embed/p-9f31061a.entry.js +0 -1
- package/dist/favesalon-embed/p-a60d78e9.entry.js +0 -1
- package/dist/favesalon-embed/p-a6debdae.entry.js +0 -1
- package/dist/favesalon-embed/p-bad1e9a7.entry.js +0 -1
- package/dist/favesalon-embed/p-c2ecb365.js +0 -1
- package/dist/favesalon-embed/p-c7dea70c.entry.js +0 -1
- package/dist/favesalon-embed/p-f0e14641.entry.js +0 -1
- package/dist/types/types/tmp.d.ts +0 -0
- /package/dist/{collection/types/tmp.js → types/components/chat-conversation/index.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
3
|
import { Colors } from '../../constants/colors';
|
|
4
4
|
import { shortDateYearFormat } from '../../types/common';
|
|
@@ -6,8 +6,10 @@ import { getRatingText } from '../../utils/utils';
|
|
|
6
6
|
import HttpService from '../../services/services';
|
|
7
7
|
export class SalonLatestReviews {
|
|
8
8
|
constructor() {
|
|
9
|
+
this.salonId = undefined;
|
|
9
10
|
this.primaryColor = Colors.Primary;
|
|
10
11
|
this.salonReviews = [];
|
|
12
|
+
this.isLoading = undefined;
|
|
11
13
|
}
|
|
12
14
|
componentWillLoad() {
|
|
13
15
|
this.fetchData();
|
|
@@ -23,154 +25,139 @@ export class SalonLatestReviews {
|
|
|
23
25
|
}
|
|
24
26
|
render() {
|
|
25
27
|
if (this.isLoading) {
|
|
26
|
-
return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } },
|
|
27
|
-
h("div", { style: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
h("div", { class: "salon-review--description", style: {
|
|
62
|
-
fontSize: '16px',
|
|
63
|
-
lineHeight: '26px',
|
|
64
|
-
overflow: 'hidden',
|
|
65
|
-
} },
|
|
66
|
-
h("div", { style: {
|
|
67
|
-
backgroundColor: Colors.Gray01,
|
|
68
|
-
height: '16px',
|
|
69
|
-
width: '240px',
|
|
70
|
-
float: 'left',
|
|
71
|
-
} })))))));
|
|
72
|
-
}))));
|
|
28
|
+
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) => {
|
|
29
|
+
return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, 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: {
|
|
30
|
+
backgroundColor: Colors.Gray02,
|
|
31
|
+
borderRadius: '50px',
|
|
32
|
+
height: '48px',
|
|
33
|
+
width: '48px',
|
|
34
|
+
float: 'left',
|
|
35
|
+
} }), h("div", { style: {
|
|
36
|
+
backgroundColor: Colors.Gray01,
|
|
37
|
+
height: '16px',
|
|
38
|
+
width: '120px',
|
|
39
|
+
marginLeft: '16px',
|
|
40
|
+
marginTop: '14px',
|
|
41
|
+
float: 'left',
|
|
42
|
+
} })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (h("div", { style: {
|
|
43
|
+
backgroundColor: Colors.Gray01,
|
|
44
|
+
height: '20px',
|
|
45
|
+
width: '20px',
|
|
46
|
+
marginRight: '8px',
|
|
47
|
+
float: 'left',
|
|
48
|
+
} })))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, h("div", { style: {
|
|
49
|
+
backgroundColor: Colors.Gray01,
|
|
50
|
+
height: '16px',
|
|
51
|
+
width: '132px',
|
|
52
|
+
} })), h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, h("div", { class: "salon-review--description", style: {
|
|
53
|
+
fontSize: '16px',
|
|
54
|
+
lineHeight: '26px',
|
|
55
|
+
overflow: 'hidden',
|
|
56
|
+
} }, h("div", { style: {
|
|
57
|
+
backgroundColor: Colors.Gray01,
|
|
58
|
+
height: '16px',
|
|
59
|
+
width: '240px',
|
|
60
|
+
float: 'left',
|
|
61
|
+
} })))))));
|
|
62
|
+
}))));
|
|
73
63
|
}
|
|
74
64
|
const ratingTexts = getRatingText();
|
|
75
|
-
return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } },
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
flexDirection: 'row',
|
|
97
|
-
overflowX: 'auto',
|
|
98
|
-
} }, review.photos.map(photo => (h("div", { style: {
|
|
99
|
-
border: '1px solid #d9d9d9',
|
|
100
|
-
position: 'relative',
|
|
101
|
-
cursor: 'pointer',
|
|
102
|
-
borderRadius: '2px',
|
|
103
|
-
height: '66px',
|
|
104
|
-
marginTop: '12px',
|
|
105
|
-
marginRight: '12px',
|
|
106
|
-
} },
|
|
107
|
-
h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
|
|
108
|
-
}))));
|
|
65
|
+
return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
|
|
66
|
+
const { user } = review;
|
|
67
|
+
return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, 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: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: Colors.Gray04 }) }))), h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs(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: {
|
|
68
|
+
fontSize: '16px',
|
|
69
|
+
lineHeight: '26px',
|
|
70
|
+
overflow: 'hidden',
|
|
71
|
+
maxHeight: review.photos.length > 0 ? '52px' : '104px',
|
|
72
|
+
} }, review.title || review.description))), review.photos.length > 0 && (h("div", { style: {
|
|
73
|
+
display: 'flex',
|
|
74
|
+
flexDirection: 'row',
|
|
75
|
+
overflowX: 'auto',
|
|
76
|
+
} }, review.photos.map(photo => (h("div", { style: {
|
|
77
|
+
border: '1px solid #d9d9d9',
|
|
78
|
+
position: 'relative',
|
|
79
|
+
cursor: 'pointer',
|
|
80
|
+
borderRadius: '2px',
|
|
81
|
+
height: '66px',
|
|
82
|
+
marginTop: '12px',
|
|
83
|
+
marginRight: '12px',
|
|
84
|
+
} }, h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
|
|
85
|
+
}))));
|
|
109
86
|
}
|
|
110
87
|
static get is() { return "salon-latest-reviews"; }
|
|
111
|
-
static get originalStyleUrls() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"text": ""
|
|
131
|
-
},
|
|
132
|
-
"attribute": "salon-id",
|
|
133
|
-
"reflect": false
|
|
134
|
-
},
|
|
135
|
-
"primaryColor": {
|
|
136
|
-
"type": "string",
|
|
137
|
-
"mutable": false,
|
|
138
|
-
"complexType": {
|
|
139
|
-
"original": "string",
|
|
140
|
-
"resolved": "string",
|
|
141
|
-
"references": {}
|
|
142
|
-
},
|
|
143
|
-
"required": false,
|
|
144
|
-
"optional": false,
|
|
145
|
-
"docs": {
|
|
146
|
-
"tags": [],
|
|
147
|
-
"text": ""
|
|
148
|
-
},
|
|
149
|
-
"attribute": "primary-color",
|
|
150
|
-
"reflect": false,
|
|
151
|
-
"defaultValue": "Colors.Primary"
|
|
152
|
-
}
|
|
153
|
-
}; }
|
|
154
|
-
static get states() { return {
|
|
155
|
-
"salonReviews": {},
|
|
156
|
-
"isLoading": {}
|
|
157
|
-
}; }
|
|
158
|
-
static get methods() { return {
|
|
159
|
-
"fetchData": {
|
|
160
|
-
"complexType": {
|
|
161
|
-
"signature": "() => Promise<void>",
|
|
162
|
-
"parameters": [],
|
|
163
|
-
"references": {
|
|
164
|
-
"Promise": {
|
|
165
|
-
"location": "global"
|
|
166
|
-
}
|
|
88
|
+
static get originalStyleUrls() {
|
|
89
|
+
return {
|
|
90
|
+
"$": ["index.css"]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get styleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["index.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get properties() {
|
|
99
|
+
return {
|
|
100
|
+
"salonId": {
|
|
101
|
+
"type": "number",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "number",
|
|
105
|
+
"resolved": "number",
|
|
106
|
+
"references": {}
|
|
167
107
|
},
|
|
168
|
-
"
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"attribute": "salon-id",
|
|
115
|
+
"reflect": false
|
|
169
116
|
},
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
117
|
+
"primaryColor": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": ""
|
|
130
|
+
},
|
|
131
|
+
"attribute": "primary-color",
|
|
132
|
+
"reflect": false,
|
|
133
|
+
"defaultValue": "Colors.Primary"
|
|
173
134
|
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
static get states() {
|
|
138
|
+
return {
|
|
139
|
+
"salonReviews": {},
|
|
140
|
+
"isLoading": {}
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
static get methods() {
|
|
144
|
+
return {
|
|
145
|
+
"fetchData": {
|
|
146
|
+
"complexType": {
|
|
147
|
+
"signature": "() => Promise<void>",
|
|
148
|
+
"parameters": [],
|
|
149
|
+
"references": {
|
|
150
|
+
"Promise": {
|
|
151
|
+
"location": "global"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"return": "Promise<void>"
|
|
155
|
+
},
|
|
156
|
+
"docs": {
|
|
157
|
+
"text": "",
|
|
158
|
+
"tags": []
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
176
163
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
2
|
import { Colors } from '../../constants/colors';
|
|
3
3
|
import { isVideoMedia } from '../../types/style';
|
|
4
4
|
import HttpService from '../../services/services';
|
|
5
5
|
export class SalonLatestStyles {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.salonId = undefined;
|
|
8
|
+
this.isLoading = undefined;
|
|
9
|
+
this.withBorder = undefined;
|
|
10
|
+
this.isLoadingState = undefined;
|
|
11
|
+
this.latestStyles = undefined;
|
|
12
|
+
}
|
|
6
13
|
componentDidLoad() {
|
|
7
14
|
this.fetchData();
|
|
8
15
|
}
|
|
@@ -31,148 +38,146 @@ export class SalonLatestStyles {
|
|
|
31
38
|
}
|
|
32
39
|
render() {
|
|
33
40
|
if (this.isLoading || this.isLoadingState) {
|
|
34
|
-
return (h("div", { class: "view view--salon-styles" },
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
height: '120px',
|
|
56
|
-
overflow: 'hidden',
|
|
57
|
-
position: 'relative',
|
|
58
|
-
cursor: 'pointer',
|
|
59
|
-
} })))))))));
|
|
41
|
+
return (h("div", { class: "view view--salon-styles" }, h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, h("div", { style: {
|
|
42
|
+
backgroundColor: Colors.Gray02,
|
|
43
|
+
height: '20px',
|
|
44
|
+
width: '120px',
|
|
45
|
+
} }), h("div", { style: { marginTop: '24px' } }, h("div", { style: {
|
|
46
|
+
overflow: 'hidden',
|
|
47
|
+
marginLeft: '-16px',
|
|
48
|
+
marginBottom: '-16px',
|
|
49
|
+
} }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
|
|
50
|
+
float: 'left',
|
|
51
|
+
paddingLeft: '16px',
|
|
52
|
+
marginBottom: '16px',
|
|
53
|
+
} }, h("div", { style: {
|
|
54
|
+
backgroundColor: Colors.Gray01,
|
|
55
|
+
borderRadius: '8px',
|
|
56
|
+
width: '120px',
|
|
57
|
+
height: '120px',
|
|
58
|
+
overflow: 'hidden',
|
|
59
|
+
position: 'relative',
|
|
60
|
+
cursor: 'pointer',
|
|
61
|
+
} })))))))));
|
|
60
62
|
}
|
|
61
|
-
return (h("div", { class: "view view--salon-styles" },
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
color: Colors.TextColor,
|
|
89
|
-
position: 'absolute',
|
|
90
|
-
left: '50%',
|
|
91
|
-
top: '50%',
|
|
92
|
-
transform: 'translate(-50%, -50%)',
|
|
93
|
-
} }))))));
|
|
94
|
-
})))));
|
|
63
|
+
return (h("div", { class: "view view--salon-styles" }, h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Photos"), h("div", { style: {
|
|
64
|
+
overflow: 'hidden',
|
|
65
|
+
marginLeft: '-16px',
|
|
66
|
+
marginBottom: '-16px',
|
|
67
|
+
marginTop: '16px',
|
|
68
|
+
} }, (this.latestStyles || []).map((faveStyle, idx) => {
|
|
69
|
+
const { imageThumb, albumMedias } = faveStyle;
|
|
70
|
+
const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
|
|
71
|
+
const isVideo = firstMedia ? isVideoMedia(firstMedia) : false;
|
|
72
|
+
return (h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
|
|
73
|
+
float: 'left',
|
|
74
|
+
paddingLeft: '16px',
|
|
75
|
+
marginBottom: '16px',
|
|
76
|
+
} }, h("div", { class: "view--salon-styles--item", style: Object.assign({ backgroundColor: Colors.Gray01, borderRadius: '8px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, !isVideo && firstMedia ? {
|
|
77
|
+
backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
|
|
78
|
+
backgroundRepeat: 'no-repeat',
|
|
79
|
+
backgroundPosition: 'center center',
|
|
80
|
+
backgroundSize: 'cover',
|
|
81
|
+
} : {}), 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: {
|
|
82
|
+
fontSize: '48px',
|
|
83
|
+
color: Colors.TextColor,
|
|
84
|
+
position: 'absolute',
|
|
85
|
+
left: '50%',
|
|
86
|
+
top: '50%',
|
|
87
|
+
transform: 'translate(-50%, -50%)',
|
|
88
|
+
} }))))));
|
|
89
|
+
})))));
|
|
95
90
|
}
|
|
96
91
|
static get is() { return "salon-latest-styles"; }
|
|
97
|
-
static get originalStyleUrls() {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"original": "boolean",
|
|
126
|
-
"resolved": "boolean",
|
|
127
|
-
"references": {}
|
|
128
|
-
},
|
|
129
|
-
"required": false,
|
|
130
|
-
"optional": true,
|
|
131
|
-
"docs": {
|
|
132
|
-
"tags": [],
|
|
133
|
-
"text": ""
|
|
134
|
-
},
|
|
135
|
-
"attribute": "is-loading",
|
|
136
|
-
"reflect": false
|
|
137
|
-
},
|
|
138
|
-
"withBorder": {
|
|
139
|
-
"type": "boolean",
|
|
140
|
-
"mutable": false,
|
|
141
|
-
"complexType": {
|
|
142
|
-
"original": "boolean",
|
|
143
|
-
"resolved": "boolean",
|
|
144
|
-
"references": {}
|
|
145
|
-
},
|
|
146
|
-
"required": false,
|
|
147
|
-
"optional": true,
|
|
148
|
-
"docs": {
|
|
149
|
-
"tags": [],
|
|
150
|
-
"text": ""
|
|
92
|
+
static get originalStyleUrls() {
|
|
93
|
+
return {
|
|
94
|
+
"$": ["index.css"]
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
static get styleUrls() {
|
|
98
|
+
return {
|
|
99
|
+
"$": ["index.css"]
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static get properties() {
|
|
103
|
+
return {
|
|
104
|
+
"salonId": {
|
|
105
|
+
"type": "number",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "number",
|
|
109
|
+
"resolved": "number",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": false,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [],
|
|
116
|
+
"text": ""
|
|
117
|
+
},
|
|
118
|
+
"attribute": "salon-id",
|
|
119
|
+
"reflect": false
|
|
151
120
|
},
|
|
152
|
-
"
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"references": {
|
|
166
|
-
"Promise": {
|
|
167
|
-
"location": "global"
|
|
168
|
-
}
|
|
121
|
+
"isLoading": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"mutable": false,
|
|
124
|
+
"complexType": {
|
|
125
|
+
"original": "boolean",
|
|
126
|
+
"resolved": "boolean",
|
|
127
|
+
"references": {}
|
|
128
|
+
},
|
|
129
|
+
"required": false,
|
|
130
|
+
"optional": true,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": ""
|
|
169
134
|
},
|
|
170
|
-
"
|
|
135
|
+
"attribute": "is-loading",
|
|
136
|
+
"reflect": false
|
|
171
137
|
},
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
138
|
+
"withBorder": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"mutable": false,
|
|
141
|
+
"complexType": {
|
|
142
|
+
"original": "boolean",
|
|
143
|
+
"resolved": "boolean",
|
|
144
|
+
"references": {}
|
|
145
|
+
},
|
|
146
|
+
"required": false,
|
|
147
|
+
"optional": true,
|
|
148
|
+
"docs": {
|
|
149
|
+
"tags": [],
|
|
150
|
+
"text": ""
|
|
151
|
+
},
|
|
152
|
+
"attribute": "with-border",
|
|
153
|
+
"reflect": false
|
|
175
154
|
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
static get states() {
|
|
158
|
+
return {
|
|
159
|
+
"isLoadingState": {},
|
|
160
|
+
"latestStyles": {}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
static get methods() {
|
|
164
|
+
return {
|
|
165
|
+
"fetchData": {
|
|
166
|
+
"complexType": {
|
|
167
|
+
"signature": "() => Promise<boolean>",
|
|
168
|
+
"parameters": [],
|
|
169
|
+
"references": {
|
|
170
|
+
"Promise": {
|
|
171
|
+
"location": "global"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"return": "Promise<boolean>"
|
|
175
|
+
},
|
|
176
|
+
"docs": {
|
|
177
|
+
"text": "",
|
|
178
|
+
"tags": []
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
178
183
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
margin-left: -32px;
|
|
5
5
|
}
|
|
6
|
+
|
|
6
7
|
salon-locations .salon-contact--links-item {
|
|
7
8
|
float: left;
|
|
8
9
|
display: flex;
|
|
@@ -12,9 +13,11 @@
|
|
|
12
13
|
min-width: 300px;
|
|
13
14
|
padding-left: 32px;
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
salon-locations .salon-contact--links-item:nth-child(2n + 1) {
|
|
16
18
|
clear: left;
|
|
17
19
|
}
|
|
20
|
+
|
|
18
21
|
salon-locations .salon-contact--links-item + .salon-contact--links-item {
|
|
19
22
|
margin-top: 8px;
|
|
20
23
|
}
|