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.
Files changed (127) hide show
  1. package/dist/cjs/chat-button.cjs.entry.js +118 -0
  2. package/dist/cjs/favesalon-embed.cjs.js +7 -3
  3. package/dist/cjs/google-map_5.cjs.entry.js +26 -7
  4. package/dist/cjs/{index-e6bea8f5.js → index-47c2a5f6.js} +512 -208
  5. package/dist/cjs/loader.cjs.js +4 -3
  6. package/dist/cjs/relativeTime-3721080d.js +9 -0
  7. package/dist/cjs/salon-booking-modal.cjs.entry.js +3 -2
  8. package/dist/cjs/salon-booking.cjs.entry.js +3 -2
  9. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +3 -2
  10. package/dist/cjs/salon-gift-card.cjs.entry.js +3 -2
  11. package/dist/cjs/salon-latest-reviews.cjs.entry.js +5 -3
  12. package/dist/cjs/salon-lookbook.cjs.entry.js +7 -3
  13. package/dist/cjs/salon-ranking.cjs.entry.js +3 -2
  14. package/dist/cjs/salon-reviews.cjs.entry.js +10 -3
  15. package/dist/cjs/salon-services.cjs.entry.js +6 -3
  16. package/dist/cjs/salon-stylists.cjs.entry.js +9 -3
  17. package/dist/cjs/services-125c82d8.js +21492 -0
  18. package/dist/cjs/style-detail.cjs.entry.js +11 -9
  19. package/dist/cjs/user-avatar.cjs.entry.js +7 -3
  20. package/dist/collection/collection-manifest.json +3 -2
  21. package/dist/collection/components/chat-button/index.css +122 -0
  22. package/dist/collection/components/chat-button/index.js +218 -0
  23. package/dist/collection/components/chat-conversation/index.js +103 -0
  24. package/dist/collection/components/google-map/index.js +72 -68
  25. package/dist/collection/components/salon-booking/index.css +5 -0
  26. package/dist/collection/components/salon-booking/index.js +85 -80
  27. package/dist/collection/components/salon-booking/salon-booking-modal.js +73 -69
  28. package/dist/collection/components/salon-gift-card/index.css +6 -1
  29. package/dist/collection/components/salon-gift-card/index.js +85 -80
  30. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +56 -52
  31. package/dist/collection/components/salon-info/index.css +1 -0
  32. package/dist/collection/components/salon-info/index.js +60 -54
  33. package/dist/collection/components/salon-latest-reviews/index.css +3 -0
  34. package/dist/collection/components/salon-latest-reviews/index.js +131 -144
  35. package/dist/collection/components/salon-latest-styles/index.css +2 -0
  36. package/dist/collection/components/salon-latest-styles/index.js +143 -138
  37. package/dist/collection/components/salon-locations/index.css +3 -0
  38. package/dist/collection/components/salon-locations/index.js +112 -120
  39. package/dist/collection/components/salon-lookbook/index.css +3 -0
  40. package/dist/collection/components/salon-lookbook/index.js +182 -190
  41. package/dist/collection/components/salon-ranking/index.js +68 -65
  42. package/dist/collection/components/salon-reviews/index.css +3 -0
  43. package/dist/collection/components/salon-reviews/index.js +146 -183
  44. package/dist/collection/components/salon-schedules/index.css +3 -0
  45. package/dist/collection/components/salon-schedules/index.js +129 -151
  46. package/dist/collection/components/salon-services/index.css +1 -0
  47. package/dist/collection/components/salon-services/index.js +117 -127
  48. package/dist/collection/components/salon-stylists/index.css +8 -0
  49. package/dist/collection/components/salon-stylists/index.js +137 -136
  50. package/dist/collection/components/style-detail/index.css +14 -0
  51. package/dist/collection/components/style-detail/index.js +265 -340
  52. package/dist/collection/components/user-avatar/index.js +119 -112
  53. package/dist/collection/mocks/users.js +10 -0
  54. package/dist/collection/services/services.js +121 -0
  55. package/dist/collection/types/chat.js +23 -0
  56. package/dist/collection/types/user.js +1 -1
  57. package/dist/custom-elements/index.d.ts +6 -0
  58. package/dist/custom-elements/index.js +24628 -8605
  59. package/dist/esm/chat-button.entry.js +114 -0
  60. package/dist/esm/favesalon-embed.js +4 -3
  61. package/dist/esm/google-map_5.entry.js +26 -7
  62. package/dist/esm/{index-6af0a03d.js → index-3fae868e.js} +512 -209
  63. package/dist/esm/loader.js +4 -3
  64. package/dist/esm/polyfills/css-shim.js +1 -1
  65. package/dist/esm/relativeTime-cd452e6d.js +7 -0
  66. package/dist/esm/salon-booking-modal.entry.js +3 -2
  67. package/dist/esm/salon-booking.entry.js +3 -2
  68. package/dist/esm/salon-gift-card-modal.entry.js +3 -2
  69. package/dist/esm/salon-gift-card.entry.js +3 -2
  70. package/dist/esm/salon-latest-reviews.entry.js +5 -3
  71. package/dist/esm/salon-lookbook.entry.js +7 -3
  72. package/dist/esm/salon-ranking.entry.js +3 -2
  73. package/dist/esm/salon-reviews.entry.js +10 -3
  74. package/dist/esm/salon-services.entry.js +6 -3
  75. package/dist/esm/salon-stylists.entry.js +9 -3
  76. package/dist/esm/services-40a3e622.js +21485 -0
  77. package/dist/esm/style-detail.entry.js +10 -8
  78. package/dist/esm/user-avatar.entry.js +7 -3
  79. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
  80. package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
  81. package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
  82. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
  83. package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
  84. package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
  85. package/dist/favesalon-embed/p-22093506.entry.js +1 -0
  86. package/dist/favesalon-embed/p-32b314e9.js +2 -0
  87. package/dist/favesalon-embed/p-4a5eca9a.js +1 -1
  88. package/dist/favesalon-embed/p-58d2e9be.js +1 -0
  89. package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
  90. package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
  91. package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
  92. package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
  93. package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
  94. package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
  95. package/dist/favesalon-embed/p-b630ae68.js +1580 -0
  96. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
  97. package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
  98. package/dist/favesalon-embed/p-fc9a5551.js +1 -1
  99. package/dist/types/components/chat-button/index.d.ts +24 -0
  100. package/dist/types/components.d.ts +22 -0
  101. package/dist/types/mocks/users.d.ts +10 -0
  102. package/dist/types/services/services.d.ts +15 -0
  103. package/dist/types/stencil-public-runtime.d.ts +85 -11
  104. package/dist/types/types/chat.d.ts +17 -0
  105. package/loader/index.d.ts +9 -0
  106. package/loader/package.json +1 -0
  107. package/package.json +3 -3
  108. package/readme.md +2 -2
  109. package/dist/cjs/services-eee8f251.js +0 -5634
  110. package/dist/esm/services-295247b1.js +0 -5627
  111. package/dist/favesalon-embed/p-292b97ba.entry.js +0 -1
  112. package/dist/favesalon-embed/p-4869dfed.entry.js +0 -1
  113. package/dist/favesalon-embed/p-4aee4fd9.entry.js +0 -1
  114. package/dist/favesalon-embed/p-5528c705.entry.js +0 -1
  115. package/dist/favesalon-embed/p-612ad685.entry.js +0 -1
  116. package/dist/favesalon-embed/p-75aef7e0.entry.js +0 -1
  117. package/dist/favesalon-embed/p-8c780874.entry.js +0 -1
  118. package/dist/favesalon-embed/p-8dbf04c5.js +0 -1
  119. package/dist/favesalon-embed/p-9f31061a.entry.js +0 -1
  120. package/dist/favesalon-embed/p-a60d78e9.entry.js +0 -1
  121. package/dist/favesalon-embed/p-a6debdae.entry.js +0 -1
  122. package/dist/favesalon-embed/p-bad1e9a7.entry.js +0 -1
  123. package/dist/favesalon-embed/p-c2ecb365.js +0 -1
  124. package/dist/favesalon-embed/p-c7dea70c.entry.js +0 -1
  125. package/dist/favesalon-embed/p-f0e14641.entry.js +0 -1
  126. package/dist/types/types/tmp.d.ts +0 -0
  127. /package/dist/{collection/types/tmp.js → types/components/chat-conversation/index.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { Component, Prop, h, State, Method } from '@stencil/core';
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
- h("div", { class: "salon-modal--inner" },
117
- h("div", { class: "salon-modal--content" },
118
- h("div", { class: "style-detail" },
119
- h("div", { class: "style-detail--header" },
120
- h("div", { style: {
121
- position: 'relative',
122
- overflow: 'hidden',
123
- } },
124
- 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}")` } : {}) }),
125
- h("div", { style: {
126
- zIndex: '2',
127
- position: 'relative',
128
- width: '100%',
129
- backgroundColor: 'rgba(0, 0, 0, 0.25)',
130
- padding: '12px 16px',
131
- overflow: 'hidden',
132
- } },
133
- h("span", { style: {
134
- color: Colors.White,
135
- border: 'none',
136
- display: 'flex',
137
- alignItems: 'center',
138
- justifyContent: 'center',
139
- height: '32px',
140
- } },
141
- h("span", null,
142
- this.currentMediaIdx + 1,
143
- " / ",
144
- this.albumMedias.length)),
145
- h("div", { style: {
146
- display: 'flex',
147
- alignItems: 'center',
148
- position: 'absolute',
149
- right: '16px',
150
- top: '50%',
151
- transform: 'translate(0, -50%)',
152
- } },
153
- h("button", { type: "text", class: "btn btn-light", style: {
154
- backgroundColor: Colors.White,
155
- borderColor: Colors.White,
156
- border: 'none',
157
- borderRadius: '50px',
158
- display: 'flex',
159
- alignItems: 'center',
160
- justifyContent: 'center',
161
- height: '32px',
162
- width: '32px',
163
- marginLeft: '12px',
164
- }, onClick: () => this.closeModal() },
165
- h("i", { class: "ri-close-fill", style: { fontSize: '16px', lineHeight: '1' } })))),
166
- h("div", { style: { position: 'relative', zIndex: "3" } },
167
- h("div", { class: "style-detail--slides", style: {
168
- marginTop: '16px',
169
- marginBottom: '12px',
170
- } },
171
- h("div", { class: "style-detail--slides--image", style: {
172
- width: '100%',
173
- position: 'relative',
174
- height: '360px',
175
- } },
176
- isVideo && (h("video", { muted: true, controls: true, width: "100%", height: "100%" },
177
- h("source", { src: mediaUrl, type: "video/mp4" }))),
178
- !isVideo && (h("div", { style: {
179
- position: 'absolute',
180
- inset: '0',
181
- zIndex: '2',
182
- display: 'flex',
183
- alignItems: 'center',
184
- justifyContent: 'center',
185
- } },
186
- h("img", { src: mediaUrl, alt: caption, style: {
187
- objectFit: 'contain',
188
- maxHeight: '100%',
189
- maxWidth: '100%',
190
- } })))),
191
- h("div", { class: "style-detail--slides--thumbnails", style: {
192
- width: '100%',
193
- position: 'relative',
194
- } }, this.albumMedias.map((media, idx) => {
195
- const isStyleVideo = isVideoMedia(media);
196
- 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 ? {
197
- backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
198
- backgroundRepeat: 'no-repeat',
199
- backgroundPosition: 'center center',
200
- backgroundSize: 'cover',
201
- } : {}), onClick: () => {
202
- this.currentMedia = media;
203
- this.currentMediaIdx = idx;
204
- } }, isStyleVideo && (h("div", null,
205
- h("video", { muted: true, width: "100%", height: "100%", poster: media.imageThumb },
206
- h("source", { src: media.mediaUrl, type: "video/mp4" })),
207
- h("i", { class: "ri-play-circle-fill", style: {
208
- fontSize: '48px',
209
- color: Colors.TextColor,
210
- position: 'absolute',
211
- left: '50%',
212
- top: '50%',
213
- transform: 'translate(-50%, -50%)',
214
- } })))));
215
- }))),
216
- this.albumMedias.length > 1 && (h("div", null,
217
- h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--prev", onClick: () => this.onClickPrev() },
218
- h("i", { class: "ri-arrow-left-line", style: { color: Colors.TextColor, fontSize: '18px' } })),
219
- h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--next", onClick: () => this.onClickNext() },
220
- h("i", { class: "ri-arrow-right-line", style: { color: Colors.TextColor, fontSize: '18px' } }))))))),
221
- h("div", { class: "style-detail--content" },
222
- h("div", { class: "container" },
223
- h("div", { style: {
224
- paddingBottom: '24px',
225
- paddingTop: '24px',
226
- } },
227
- h("div", { class: "row" },
228
- h("div", { class: this.similarStyles.length > 0 ? 'col-md-8' : 'col-md-12', style: { marginBottom: '24px' } },
229
- h("div", { class: "row" },
230
- salon && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } },
231
- h("div", { style: {
232
- backgroundColor: Colors.Red01,
233
- borderRadius: '4px',
234
- padding: '8px',
235
- display: 'flex',
236
- alignItems: 'center',
237
- justifyContent: 'space-between',
238
- } },
239
- h("div", { style: { paddingLeft: '8px' } },
240
- h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "At salon"),
241
- h("div", { style: {
242
- color: Colors.Secondary,
243
- fontSize: '20px',
244
- lineHeight: '24px',
245
- } }, salon.businessName)),
246
- h("div", { style: {
247
- backgroundImage: `url("${getSalonImage(salon)}")`,
248
- backgroundColor: Colors.Red02,
249
- backgroundSize: 'cover',
250
- backgroundRepeat: 'no-repeat',
251
- backgroundPosition: '0 0',
252
- borderRadius: '4px',
253
- height: '48px',
254
- width: '48px',
255
- } })))),
256
- stylist && stylist.id && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } },
257
- h("div", { style: {
258
- backgroundColor: Colors.Yellow01,
259
- borderRadius: '4px',
260
- padding: '8px',
261
- display: 'flex',
262
- alignItems: 'center',
263
- justifyContent: 'space-between',
264
- } },
265
- h("div", { style: { paddingLeft: '8px' } },
266
- h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "By stylist"),
267
- h("div", { style: {
268
- color: Colors.Secondary,
269
- fontSize: '20px',
270
- lineHeight: '24px',
271
- } }, stylist.fullName)),
272
- h("div", { style: {
273
- backgroundImage: `url("${stylist.avatar}")`,
274
- backgroundColor: Colors.Yellow02,
275
- backgroundSize: 'cover',
276
- backgroundRepeat: 'no-repeat',
277
- backgroundPosition: '0 0',
278
- borderRadius: '4px',
279
- height: '48px',
280
- width: '48px',
281
- } }))))),
282
- h("div", { style: {
283
- borderBottom: `1px solid ${Colors.Gray02}`,
284
- borderTop: `1px solid ${Colors.Gray02}`,
285
- display: 'flex',
286
- alignItems: 'center',
287
- justifyContent: 'space-between',
288
- paddingBottom: '16px',
289
- paddingTop: '16px',
290
- } },
291
- h("div", { style: {
292
- display: 'flex',
293
- alignItems: 'center',
294
- justifyContent: 'space-around',
295
- flexShrink: '1',
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() { return {
391
- "$": ["index.less"]
392
- }; }
393
- static get styleUrls() { return {
394
- "$": ["index.css"]
395
- }; }
396
- static get properties() { return {
397
- "salonId": {
398
- "type": "number",
399
- "mutable": false,
400
- "complexType": {
401
- "original": "number",
402
- "resolved": "number",
403
- "references": {}
404
- },
405
- "required": false,
406
- "optional": false,
407
- "docs": {
408
- "tags": [],
409
- "text": ""
410
- },
411
- "attribute": "salon-id",
412
- "reflect": false
413
- },
414
- "salonLookbook": {
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
- "return": "Promise<any[]>"
331
+ "attribute": "salon-id",
332
+ "reflect": false
454
333
  },
455
- "docs": {
456
- "text": "",
457
- "tags": []
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
  }