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 relativeTime from 'dayjs/plugin/relativeTime';
|
|
4
4
|
import { isVideoMedia } from '../../types/style';
|
|
@@ -9,12 +9,17 @@ import { shortDateYearFormat } from '../../types/common';
|
|
|
9
9
|
dayjs.extend(relativeTime);
|
|
10
10
|
export class StyleDetail {
|
|
11
11
|
constructor() {
|
|
12
|
+
this.salonId = undefined;
|
|
13
|
+
this.salonLookbook = undefined;
|
|
14
|
+
this.lookbookInfo = undefined;
|
|
12
15
|
this.isModalOpen = true;
|
|
13
16
|
this.currentMediaIdx = 0;
|
|
17
|
+
this.currentMedia = undefined;
|
|
14
18
|
this.albumMedias = [];
|
|
15
19
|
this.similarStyles = [];
|
|
16
20
|
this.totalComments = 0;
|
|
17
21
|
this.lookbookComments = [];
|
|
22
|
+
this.isLayoutSetup = undefined;
|
|
18
23
|
}
|
|
19
24
|
componentWillLoad() {
|
|
20
25
|
this.injectSDK();
|
|
@@ -112,350 +117,270 @@ export class StyleDetail {
|
|
|
112
117
|
if (this.isModalOpen) {
|
|
113
118
|
const { caption, description, mediaUrl } = this.currentMedia || {};
|
|
114
119
|
const isVideo = isVideoMedia((this.currentMedia || {}));
|
|
115
|
-
return (h("div", { class: "salon-modal salon-modal--lookbook-detail" },
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
flexGrow: '1',
|
|
297
|
-
} },
|
|
298
|
-
h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } },
|
|
299
|
-
h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalLike),
|
|
300
|
-
h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "faves")),
|
|
301
|
-
h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } },
|
|
302
|
-
h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalBooking),
|
|
303
|
-
h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "booked")),
|
|
304
|
-
h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } },
|
|
305
|
-
h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalView),
|
|
306
|
-
h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "views")),
|
|
307
|
-
h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } },
|
|
308
|
-
h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, this.totalComments),
|
|
309
|
-
h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "comments")))),
|
|
310
|
-
(caption || description) && (h("div", { style: { paddingTop: '24px' } },
|
|
311
|
-
h("div", { style: { color: Colors.Gray04, fontSize: '14px' } }, createdDate && dayjs(createdDate).format(shortDateYearFormat)),
|
|
312
|
-
h("div", { style: { fontSize: '24px' } }, caption),
|
|
313
|
-
h("div", { style: {
|
|
314
|
-
fontSize: '16px',
|
|
315
|
-
paddingTop: caption ? '16px' : '0',
|
|
316
|
-
} }, description))),
|
|
317
|
-
album && album.tags.length > 0 && (h("div", { style: {
|
|
318
|
-
paddingTop: '24px',
|
|
319
|
-
marginBottom: '-12px',
|
|
320
|
-
} }, album.tags.map((tag, idx) => (h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
|
|
321
|
-
backgroundColor: Colors.Gray01,
|
|
322
|
-
borderColor: Colors.Gray01,
|
|
323
|
-
borderRadius: '4px',
|
|
324
|
-
marginRight: '12px',
|
|
325
|
-
marginBottom: '12px',
|
|
326
|
-
} }, tag))))),
|
|
327
|
-
h("div", { style: { marginTop: '32px' } }, this.lookbookComments && this.lookbookComments.length > 0 && (h("div", null,
|
|
328
|
-
h("div", { style: { fontWeight: '600', marginBottom: '8px' } },
|
|
329
|
-
this.totalComments,
|
|
330
|
-
" ",
|
|
331
|
-
this.totalComments === 1 ? 'comment' : 'comments'),
|
|
332
|
-
h("div", { class: "view view--style-comments", style: {
|
|
333
|
-
borderTop: `1px solid ${Colors.Gray02}`,
|
|
334
|
-
paddingTop: '24px',
|
|
335
|
-
paddingBottom: '24px',
|
|
336
|
-
} }, this.lookbookComments.map((comment, idx) => {
|
|
337
|
-
const { user, title, description, createdDate } = comment;
|
|
338
|
-
return (h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
|
|
339
|
-
borderTop: `1px solid ${Colors.Gray02}`,
|
|
340
|
-
marginTop: '24px',
|
|
341
|
-
paddingTop: '24px',
|
|
342
|
-
} : {} },
|
|
343
|
-
h("div", { style: { overflow: 'hidden' } },
|
|
344
|
-
h("user-avatar", { size: 48, avatar: user.avatar, name: h("div", null,
|
|
345
|
-
h("div", { style: { color: Colors.Gray04, lineHeight: '1', fontSize: '12px', fontWeight: '400' } }, dayjs(createdDate).fromNow()),
|
|
346
|
-
h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName)), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, nameStyle: { fontWeight: 'bold' } })),
|
|
347
|
-
h("div", { style: {
|
|
348
|
-
color: Colors.Black,
|
|
349
|
-
fontSize: '16px',
|
|
350
|
-
paddingTop: '16px',
|
|
351
|
-
} }, title),
|
|
352
|
-
description && (h("div", { style: {
|
|
353
|
-
color: Colors.Gray05,
|
|
354
|
-
paddingTop: '8px',
|
|
355
|
-
} }, description))));
|
|
356
|
-
})))))),
|
|
357
|
-
h("div", { class: "col-md-4", style: { marginBottom: '24px' } },
|
|
358
|
-
h("div", { class: "block block--similar-styles" }, this.similarStyles.length > 0 && (h("div", { class: "block--content" },
|
|
359
|
-
h("h3", { style: {
|
|
360
|
-
lineHeight: '1.2',
|
|
361
|
-
fontSize: '24px',
|
|
362
|
-
color: Colors.Secondary,
|
|
363
|
-
} }, "More like this"),
|
|
364
|
-
h("div", { style: { marginTop: '16px' } },
|
|
365
|
-
h("div", { class: "similar-styles--grid", id: "similar-styles--grid" }, this.similarStyles.slice(0, 6).map(style => {
|
|
366
|
-
const { caption, imageThumbMedium, owner } = style;
|
|
367
|
-
return (h("div", { class: "similar-styles--grid-item", onClick: () => {
|
|
368
|
-
this.closeModal();
|
|
369
|
-
this.onClickLookbook(style);
|
|
370
|
-
} },
|
|
371
|
-
h("div", { class: "card", style: {
|
|
372
|
-
background: 'none',
|
|
373
|
-
border: 'none',
|
|
374
|
-
cursor: 'pointer',
|
|
375
|
-
} },
|
|
376
|
-
h("div", { class: "similar-styles--grid-item--image", style: {
|
|
377
|
-
borderRadius: '8px',
|
|
378
|
-
overflow: 'hidden',
|
|
379
|
-
minHeight: '80px',
|
|
380
|
-
background: Colors.Gray01,
|
|
381
|
-
} },
|
|
382
|
-
h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })),
|
|
383
|
-
owner && (h("div", { class: "card-body", style: { paddingLeft: '0' } },
|
|
384
|
-
h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
|
|
385
|
-
}))))))))))))))));
|
|
120
|
+
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: {
|
|
121
|
+
position: 'relative',
|
|
122
|
+
overflow: 'hidden',
|
|
123
|
+
} }, h("div", { style: Object.assign({ backgroundColor: Colors.Gray01, backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: '0 0', filter: 'blur(30px)', position: 'absolute', inset: '0', zIndex: '1' }, this.currentMedia && !isVideoMedia(this.currentMedia) ? { backgroundImage: `url("${this.currentMedia.imageThumb}")` } : {}) }), h("div", { style: {
|
|
124
|
+
zIndex: '2',
|
|
125
|
+
position: 'relative',
|
|
126
|
+
width: '100%',
|
|
127
|
+
backgroundColor: 'rgba(0, 0, 0, 0.25)',
|
|
128
|
+
padding: '12px 16px',
|
|
129
|
+
overflow: 'hidden',
|
|
130
|
+
} }, h("span", { style: {
|
|
131
|
+
color: Colors.White,
|
|
132
|
+
border: 'none',
|
|
133
|
+
display: 'flex',
|
|
134
|
+
alignItems: 'center',
|
|
135
|
+
justifyContent: 'center',
|
|
136
|
+
height: '32px',
|
|
137
|
+
} }, h("span", null, this.currentMediaIdx + 1, " / ", this.albumMedias.length)), h("div", { style: {
|
|
138
|
+
display: 'flex',
|
|
139
|
+
alignItems: 'center',
|
|
140
|
+
position: 'absolute',
|
|
141
|
+
right: '16px',
|
|
142
|
+
top: '50%',
|
|
143
|
+
transform: 'translate(0, -50%)',
|
|
144
|
+
} }, h("button", { type: "text", class: "btn btn-light", style: {
|
|
145
|
+
backgroundColor: Colors.White,
|
|
146
|
+
borderColor: Colors.White,
|
|
147
|
+
border: 'none',
|
|
148
|
+
borderRadius: '50px',
|
|
149
|
+
display: 'flex',
|
|
150
|
+
alignItems: 'center',
|
|
151
|
+
justifyContent: 'center',
|
|
152
|
+
height: '32px',
|
|
153
|
+
width: '32px',
|
|
154
|
+
marginLeft: '12px',
|
|
155
|
+
}, onClick: () => this.closeModal() }, h("i", { class: "ri-close-fill", style: { fontSize: '16px', lineHeight: '1' } })))), h("div", { style: { position: 'relative', zIndex: "3" } }, h("div", { class: "style-detail--slides", style: {
|
|
156
|
+
marginTop: '16px',
|
|
157
|
+
marginBottom: '12px',
|
|
158
|
+
} }, h("div", { class: "style-detail--slides--image", style: {
|
|
159
|
+
width: '100%',
|
|
160
|
+
position: 'relative',
|
|
161
|
+
height: '360px',
|
|
162
|
+
} }, isVideo && (h("video", { muted: true, controls: true, width: "100%", height: "100%" }, h("source", { src: mediaUrl, type: "video/mp4" }))), !isVideo && (h("div", { style: {
|
|
163
|
+
position: 'absolute',
|
|
164
|
+
inset: '0',
|
|
165
|
+
zIndex: '2',
|
|
166
|
+
display: 'flex',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
justifyContent: 'center',
|
|
169
|
+
} }, h("img", { src: mediaUrl, alt: caption, style: {
|
|
170
|
+
objectFit: 'contain',
|
|
171
|
+
maxHeight: '100%',
|
|
172
|
+
maxWidth: '100%',
|
|
173
|
+
} })))), h("div", { class: "style-detail--slides--thumbnails", style: {
|
|
174
|
+
width: '100%',
|
|
175
|
+
position: 'relative',
|
|
176
|
+
} }, this.albumMedias.map((media, idx) => {
|
|
177
|
+
const isStyleVideo = isVideoMedia(media);
|
|
178
|
+
return (h("div", { class: "style-detail--slides--thumbnail", style: Object.assign(Object.assign({ backgroundColor: Colors.Gray01, borderRadius: '4px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, this.currentMediaIdx !== idx ? { opacity: '0.75' } : {}), !isStyleVideo ? {
|
|
179
|
+
backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
|
|
180
|
+
backgroundRepeat: 'no-repeat',
|
|
181
|
+
backgroundPosition: 'center center',
|
|
182
|
+
backgroundSize: 'cover',
|
|
183
|
+
} : {}), onClick: () => {
|
|
184
|
+
this.currentMedia = media;
|
|
185
|
+
this.currentMediaIdx = idx;
|
|
186
|
+
} }, 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: {
|
|
187
|
+
fontSize: '48px',
|
|
188
|
+
color: Colors.TextColor,
|
|
189
|
+
position: 'absolute',
|
|
190
|
+
left: '50%',
|
|
191
|
+
top: '50%',
|
|
192
|
+
transform: 'translate(-50%, -50%)',
|
|
193
|
+
} })))));
|
|
194
|
+
}))), this.albumMedias.length > 1 && (h("div", null, h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--prev", onClick: () => this.onClickPrev() }, h("i", { class: "ri-arrow-left-line", style: { color: Colors.TextColor, fontSize: '18px' } })), h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--next", onClick: () => this.onClickNext() }, h("i", { class: "ri-arrow-right-line", style: { color: Colors.TextColor, fontSize: '18px' } }))))))), h("div", { class: "style-detail--content" }, h("div", { class: "container" }, h("div", { style: {
|
|
195
|
+
paddingBottom: '24px',
|
|
196
|
+
paddingTop: '24px',
|
|
197
|
+
} }, h("div", { class: "row" }, h("div", { class: this.similarStyles.length > 0 ? 'col-md-8' : 'col-md-12', style: { marginBottom: '24px' } }, h("div", { class: "row" }, salon && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, h("div", { style: {
|
|
198
|
+
backgroundColor: Colors.Red01,
|
|
199
|
+
borderRadius: '4px',
|
|
200
|
+
padding: '8px',
|
|
201
|
+
display: 'flex',
|
|
202
|
+
alignItems: 'center',
|
|
203
|
+
justifyContent: 'space-between',
|
|
204
|
+
} }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "At salon"), h("div", { style: {
|
|
205
|
+
color: Colors.Secondary,
|
|
206
|
+
fontSize: '20px',
|
|
207
|
+
lineHeight: '24px',
|
|
208
|
+
} }, salon.businessName)), h("div", { style: {
|
|
209
|
+
backgroundImage: `url("${getSalonImage(salon)}")`,
|
|
210
|
+
backgroundColor: Colors.Red02,
|
|
211
|
+
backgroundSize: 'cover',
|
|
212
|
+
backgroundRepeat: 'no-repeat',
|
|
213
|
+
backgroundPosition: '0 0',
|
|
214
|
+
borderRadius: '4px',
|
|
215
|
+
height: '48px',
|
|
216
|
+
width: '48px',
|
|
217
|
+
} })))), stylist && stylist.id && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, h("div", { style: {
|
|
218
|
+
backgroundColor: Colors.Yellow01,
|
|
219
|
+
borderRadius: '4px',
|
|
220
|
+
padding: '8px',
|
|
221
|
+
display: 'flex',
|
|
222
|
+
alignItems: 'center',
|
|
223
|
+
justifyContent: 'space-between',
|
|
224
|
+
} }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "By stylist"), h("div", { style: {
|
|
225
|
+
color: Colors.Secondary,
|
|
226
|
+
fontSize: '20px',
|
|
227
|
+
lineHeight: '24px',
|
|
228
|
+
} }, stylist.fullName)), h("div", { style: {
|
|
229
|
+
backgroundImage: `url("${stylist.avatar}")`,
|
|
230
|
+
backgroundColor: Colors.Yellow02,
|
|
231
|
+
backgroundSize: 'cover',
|
|
232
|
+
backgroundRepeat: 'no-repeat',
|
|
233
|
+
backgroundPosition: '0 0',
|
|
234
|
+
borderRadius: '4px',
|
|
235
|
+
height: '48px',
|
|
236
|
+
width: '48px',
|
|
237
|
+
} }))))), h("div", { style: {
|
|
238
|
+
borderBottom: `1px solid ${Colors.Gray02}`,
|
|
239
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
240
|
+
display: 'flex',
|
|
241
|
+
alignItems: 'center',
|
|
242
|
+
justifyContent: 'space-between',
|
|
243
|
+
paddingBottom: '16px',
|
|
244
|
+
paddingTop: '16px',
|
|
245
|
+
} }, h("div", { style: {
|
|
246
|
+
display: 'flex',
|
|
247
|
+
alignItems: 'center',
|
|
248
|
+
justifyContent: 'space-around',
|
|
249
|
+
flexShrink: '1',
|
|
250
|
+
flexGrow: '1',
|
|
251
|
+
} }, h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalLike), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "faves")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalBooking), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "booked")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalView), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "views")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, this.totalComments), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "comments")))), (caption || description) && (h("div", { style: { paddingTop: '24px' } }, h("div", { style: { color: Colors.Gray04, fontSize: '14px' } }, createdDate && dayjs(createdDate).format(shortDateYearFormat)), h("div", { style: { fontSize: '24px' } }, caption), h("div", { style: {
|
|
252
|
+
fontSize: '16px',
|
|
253
|
+
paddingTop: caption ? '16px' : '0',
|
|
254
|
+
} }, description))), album && album.tags.length > 0 && (h("div", { style: {
|
|
255
|
+
paddingTop: '24px',
|
|
256
|
+
marginBottom: '-12px',
|
|
257
|
+
} }, album.tags.map((tag, idx) => (h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
|
|
258
|
+
backgroundColor: Colors.Gray01,
|
|
259
|
+
borderColor: Colors.Gray01,
|
|
260
|
+
borderRadius: '4px',
|
|
261
|
+
marginRight: '12px',
|
|
262
|
+
marginBottom: '12px',
|
|
263
|
+
} }, tag))))), h("div", { style: { marginTop: '32px' } }, this.lookbookComments && this.lookbookComments.length > 0 && (h("div", null, h("div", { style: { fontWeight: '600', marginBottom: '8px' } }, this.totalComments, " ", this.totalComments === 1 ? 'comment' : 'comments'), h("div", { class: "view view--style-comments", style: {
|
|
264
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
265
|
+
paddingTop: '24px',
|
|
266
|
+
paddingBottom: '24px',
|
|
267
|
+
} }, this.lookbookComments.map((comment, idx) => {
|
|
268
|
+
const { user, title, description, createdDate } = comment;
|
|
269
|
+
return (h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
|
|
270
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
271
|
+
marginTop: '24px',
|
|
272
|
+
paddingTop: '24px',
|
|
273
|
+
} : {} }, h("div", { style: { overflow: 'hidden' } }, h("user-avatar", { size: 48, avatar: user.avatar, name: h("div", null, h("div", { style: { color: Colors.Gray04, lineHeight: '1', fontSize: '12px', fontWeight: '400' } }, dayjs(createdDate).fromNow()), h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName)), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, nameStyle: { fontWeight: 'bold' } })), h("div", { style: {
|
|
274
|
+
color: Colors.Black,
|
|
275
|
+
fontSize: '16px',
|
|
276
|
+
paddingTop: '16px',
|
|
277
|
+
} }, title), description && (h("div", { style: {
|
|
278
|
+
color: Colors.Gray05,
|
|
279
|
+
paddingTop: '8px',
|
|
280
|
+
} }, description))));
|
|
281
|
+
})))))), h("div", { class: "col-md-4", style: { marginBottom: '24px' } }, h("div", { class: "block block--similar-styles" }, this.similarStyles.length > 0 && (h("div", { class: "block--content" }, h("h3", { style: {
|
|
282
|
+
lineHeight: '1.2',
|
|
283
|
+
fontSize: '24px',
|
|
284
|
+
color: Colors.Secondary,
|
|
285
|
+
} }, "More like this"), h("div", { style: { marginTop: '16px' } }, h("div", { class: "similar-styles--grid", id: "similar-styles--grid" }, this.similarStyles.slice(0, 6).map(style => {
|
|
286
|
+
const { caption, imageThumbMedium, owner } = style;
|
|
287
|
+
return (h("div", { class: "similar-styles--grid-item", onClick: () => {
|
|
288
|
+
this.closeModal();
|
|
289
|
+
this.onClickLookbook(style);
|
|
290
|
+
} }, h("div", { class: "card", style: {
|
|
291
|
+
background: 'none',
|
|
292
|
+
border: 'none',
|
|
293
|
+
cursor: 'pointer',
|
|
294
|
+
} }, h("div", { class: "similar-styles--grid-item--image", style: {
|
|
295
|
+
borderRadius: '8px',
|
|
296
|
+
overflow: 'hidden',
|
|
297
|
+
minHeight: '80px',
|
|
298
|
+
background: Colors.Gray01,
|
|
299
|
+
} }, h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (h("div", { class: "card-body", style: { paddingLeft: '0' } }, h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
|
|
300
|
+
}))))))))))))))));
|
|
386
301
|
}
|
|
387
302
|
return null;
|
|
388
303
|
}
|
|
389
304
|
static get is() { return "style-detail"; }
|
|
390
|
-
static get originalStyleUrls() {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
"
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
"type": "string",
|
|
416
|
-
"mutable": false,
|
|
417
|
-
"complexType": {
|
|
418
|
-
"original": "string",
|
|
419
|
-
"resolved": "string",
|
|
420
|
-
"references": {}
|
|
421
|
-
},
|
|
422
|
-
"required": false,
|
|
423
|
-
"optional": false,
|
|
424
|
-
"docs": {
|
|
425
|
-
"tags": [],
|
|
426
|
-
"text": ""
|
|
427
|
-
},
|
|
428
|
-
"attribute": "salon-lookbook",
|
|
429
|
-
"reflect": false
|
|
430
|
-
}
|
|
431
|
-
}; }
|
|
432
|
-
static get states() { return {
|
|
433
|
-
"lookbookInfo": {},
|
|
434
|
-
"isModalOpen": {},
|
|
435
|
-
"currentMediaIdx": {},
|
|
436
|
-
"currentMedia": {},
|
|
437
|
-
"albumMedias": {},
|
|
438
|
-
"similarStyles": {},
|
|
439
|
-
"totalComments": {},
|
|
440
|
-
"lookbookComments": {},
|
|
441
|
-
"isLayoutSetup": {}
|
|
442
|
-
}; }
|
|
443
|
-
static get methods() { return {
|
|
444
|
-
"fetchData": {
|
|
445
|
-
"complexType": {
|
|
446
|
-
"signature": "() => Promise<any[]>",
|
|
447
|
-
"parameters": [],
|
|
448
|
-
"references": {
|
|
449
|
-
"Promise": {
|
|
450
|
-
"location": "global"
|
|
451
|
-
}
|
|
305
|
+
static get originalStyleUrls() {
|
|
306
|
+
return {
|
|
307
|
+
"$": ["index.css"]
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
static get styleUrls() {
|
|
311
|
+
return {
|
|
312
|
+
"$": ["index.css"]
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
static get properties() {
|
|
316
|
+
return {
|
|
317
|
+
"salonId": {
|
|
318
|
+
"type": "number",
|
|
319
|
+
"mutable": false,
|
|
320
|
+
"complexType": {
|
|
321
|
+
"original": "number",
|
|
322
|
+
"resolved": "number",
|
|
323
|
+
"references": {}
|
|
324
|
+
},
|
|
325
|
+
"required": false,
|
|
326
|
+
"optional": false,
|
|
327
|
+
"docs": {
|
|
328
|
+
"tags": [],
|
|
329
|
+
"text": ""
|
|
452
330
|
},
|
|
453
|
-
"
|
|
331
|
+
"attribute": "salon-id",
|
|
332
|
+
"reflect": false
|
|
454
333
|
},
|
|
455
|
-
"
|
|
456
|
-
"
|
|
457
|
-
"
|
|
334
|
+
"salonLookbook": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"mutable": false,
|
|
337
|
+
"complexType": {
|
|
338
|
+
"original": "string",
|
|
339
|
+
"resolved": "string",
|
|
340
|
+
"references": {}
|
|
341
|
+
},
|
|
342
|
+
"required": false,
|
|
343
|
+
"optional": false,
|
|
344
|
+
"docs": {
|
|
345
|
+
"tags": [],
|
|
346
|
+
"text": ""
|
|
347
|
+
},
|
|
348
|
+
"attribute": "salon-lookbook",
|
|
349
|
+
"reflect": false
|
|
458
350
|
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
static get states() {
|
|
354
|
+
return {
|
|
355
|
+
"lookbookInfo": {},
|
|
356
|
+
"isModalOpen": {},
|
|
357
|
+
"currentMediaIdx": {},
|
|
358
|
+
"currentMedia": {},
|
|
359
|
+
"albumMedias": {},
|
|
360
|
+
"similarStyles": {},
|
|
361
|
+
"totalComments": {},
|
|
362
|
+
"lookbookComments": {},
|
|
363
|
+
"isLayoutSetup": {}
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
static get methods() {
|
|
367
|
+
return {
|
|
368
|
+
"fetchData": {
|
|
369
|
+
"complexType": {
|
|
370
|
+
"signature": "() => Promise<any[]>",
|
|
371
|
+
"parameters": [],
|
|
372
|
+
"references": {
|
|
373
|
+
"Promise": {
|
|
374
|
+
"location": "global"
|
|
375
|
+
}
|
|
376
|
+
},
|
|
377
|
+
"return": "Promise<any[]>"
|
|
378
|
+
},
|
|
379
|
+
"docs": {
|
|
380
|
+
"text": "",
|
|
381
|
+
"tags": []
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
}
|
|
461
386
|
}
|