favesalon-embed 0.0.4 → 0.0.5

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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/chat-button.cjs.entry.js +118 -0
  3. package/dist/cjs/colors-38421769.js +69 -0
  4. package/dist/cjs/favesalon-embed.cjs.js +24 -0
  5. package/dist/cjs/google-map_5.cjs.entry.js +310 -0
  6. package/{cjs/index-d5de0b9d.js → dist/cjs/index-47c2a5f6.js} +513 -199
  7. package/{cjs/index-48ac68d0.js → dist/cjs/index-7f190886.js} +1924 -0
  8. package/dist/cjs/loader.cjs.js +23 -0
  9. package/dist/cjs/relativeTime-3721080d.js +9 -0
  10. package/{cjs → dist/cjs}/salon-booking-modal.cjs.entry.js +7 -6
  11. package/{cjs → dist/cjs}/salon-booking.cjs.entry.js +8 -8
  12. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
  13. package/{cjs → dist/cjs}/salon-gift-card.cjs.entry.js +9 -8
  14. package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
  15. package/{cjs/salon-lookbook_2.cjs.entry.js → dist/cjs/salon-lookbook.cjs.entry.js} +28 -58
  16. package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +9 -8
  17. package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
  18. package/dist/cjs/salon-services.cjs.entry.js +81 -0
  19. package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
  20. package/dist/cjs/services-125c82d8.js +21492 -0
  21. package/dist/cjs/style-detail.cjs.entry.js +312 -0
  22. package/dist/cjs/user-avatar.cjs.entry.js +45 -0
  23. package/{collection → dist/collection}/collection-manifest.json +5 -5
  24. package/dist/collection/components/chat-button/index.css +122 -0
  25. package/dist/collection/components/chat-button/index.js +218 -0
  26. package/dist/collection/components/chat-conversation/index.js +103 -0
  27. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  28. package/{collection → dist/collection}/components/google-map/index.css +0 -1
  29. package/dist/collection/components/google-map/index.js +90 -0
  30. package/{collection → dist/collection}/components/salon-booking/index.css +11 -20
  31. package/dist/collection/components/salon-booking/index.js +126 -0
  32. package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
  33. package/dist/collection/components/salon-gift-card/index.css +30 -0
  34. package/dist/collection/components/salon-gift-card/index.js +126 -0
  35. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
  36. package/dist/collection/components/salon-info/index.js +77 -0
  37. package/dist/collection/components/salon-latest-reviews/index.js +163 -0
  38. package/dist/collection/components/salon-latest-styles/index.css +12 -0
  39. package/dist/collection/components/salon-latest-styles/index.js +183 -0
  40. package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +7 -4
  41. package/dist/collection/components/salon-locations/index.js +143 -0
  42. package/{collection → dist/collection}/components/salon-lookbook/index.css +3 -9
  43. package/dist/collection/components/salon-lookbook/index.js +368 -0
  44. package/dist/collection/components/salon-ranking/index.js +117 -0
  45. package/{collection → dist/collection}/components/salon-reviews/index.css +3 -0
  46. package/dist/collection/components/salon-reviews/index.js +249 -0
  47. package/dist/collection/components/salon-schedules/index.css +18 -0
  48. package/dist/collection/components/salon-schedules/index.js +167 -0
  49. package/dist/collection/components/salon-services/index.css +1 -0
  50. package/dist/collection/components/salon-services/index.js +146 -0
  51. package/dist/collection/components/salon-stylists/index.js +184 -0
  52. package/dist/collection/components/style-detail/index.css +76 -0
  53. package/dist/collection/components/style-detail/index.js +386 -0
  54. package/dist/collection/components/user-avatar/index.js +134 -0
  55. package/dist/collection/constants/colors.js +65 -0
  56. package/dist/collection/mocks/users.js +10 -0
  57. package/dist/collection/services/services.js +295 -0
  58. package/dist/collection/types/chat.js +23 -0
  59. package/dist/collection/types/common.js +11 -0
  60. package/{collection → dist/collection}/types/review.js +9 -5
  61. package/dist/collection/types/salon.js +58 -0
  62. package/dist/collection/types/style.js +128 -0
  63. package/{collection → dist/collection}/types/stylist.js +12 -9
  64. package/dist/collection/types/user.js +10 -0
  65. package/{custom-elements → dist/custom-elements}/index.d.ts +18 -18
  66. package/dist/custom-elements/index.js +28340 -0
  67. package/dist/esm/chat-button.entry.js +114 -0
  68. package/dist/esm/colors-ea36347a.js +67 -0
  69. package/dist/esm/favesalon-embed.js +19 -0
  70. package/dist/esm/google-map_5.entry.js +302 -0
  71. package/{esm/index-0f8eed73.js → dist/esm/index-3fae868e.js} +512 -200
  72. package/{esm/index-67d677ba.js → dist/esm/index-80523fec.js} +1924 -1
  73. package/dist/esm/index.js +1 -0
  74. package/dist/esm/loader.js +19 -0
  75. package/dist/esm/polyfills/css-shim.js +1 -0
  76. package/dist/esm/relativeTime-cd452e6d.js +7 -0
  77. package/{esm → dist/esm}/salon-booking-modal.entry.js +7 -6
  78. package/{esm → dist/esm}/salon-booking.entry.js +7 -7
  79. package/dist/esm/salon-gift-card-modal.entry.js +25 -0
  80. package/{esm → dist/esm}/salon-gift-card.entry.js +8 -7
  81. package/dist/esm/salon-latest-reviews.entry.js +93 -0
  82. package/{esm/salon-lookbook_2.entry.js → dist/esm/salon-lookbook.entry.js} +29 -58
  83. package/{esm → dist/esm}/salon-ranking.entry.js +9 -8
  84. package/dist/esm/salon-reviews.entry.js +189 -0
  85. package/dist/esm/salon-services.entry.js +77 -0
  86. package/dist/esm/salon-stylists.entry.js +114 -0
  87. package/dist/esm/services-40a3e622.js +21485 -0
  88. package/dist/esm/style-detail.entry.js +308 -0
  89. package/dist/esm/user-avatar.entry.js +41 -0
  90. package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
  91. package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
  92. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
  93. package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
  94. package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
  95. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
  96. package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
  97. package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
  98. package/dist/favesalon-embed/p-22093506.entry.js +1 -0
  99. package/dist/favesalon-embed/p-32b314e9.js +2 -0
  100. package/dist/favesalon-embed/p-4a5eca9a.js +6 -0
  101. package/dist/favesalon-embed/p-58d2e9be.js +1 -0
  102. package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
  103. package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
  104. package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
  105. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  106. package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
  107. package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
  108. package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
  109. package/dist/favesalon-embed/p-b630ae68.js +1580 -0
  110. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
  111. package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
  112. package/dist/favesalon-embed/p-fc9a5551.js +6 -0
  113. package/dist/types/components/chat-button/index.d.ts +24 -0
  114. package/dist/types/components/google-map/index.d.ts +5 -0
  115. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +1 -0
  116. package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
  117. package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
  118. package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
  119. package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
  120. package/{types → dist/types}/components/salon-lookbook/index.d.ts +3 -3
  121. package/dist/types/components/salon-reviews/index.d.ts +24 -0
  122. package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
  123. package/{types → dist/types}/components/salon-services/index.d.ts +1 -0
  124. package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
  125. package/dist/types/components/style-detail/index.d.ts +24 -0
  126. package/{types → dist/types}/components.d.ts +76 -59
  127. package/dist/types/constants/colors.d.ts +65 -0
  128. package/dist/types/mocks/users.d.ts +10 -0
  129. package/dist/types/services/services.d.ts +75 -0
  130. package/{types → dist/types}/stencil-public-runtime.d.ts +85 -11
  131. package/dist/types/types/chat.d.ts +17 -0
  132. package/dist/types/types/common.d.ts +11 -0
  133. package/{types → dist/types}/types/review.d.ts +4 -0
  134. package/{types → dist/types}/types/salon.d.ts +3 -1
  135. package/dist/types/types/style.d.ts +88 -0
  136. package/{types → dist/types}/types/stylist.d.ts +1 -1
  137. package/{types → dist/types}/types/user.d.ts +2 -2
  138. package/loader/cdn.js +3 -0
  139. package/loader/index.cjs.js +3 -0
  140. package/loader/index.d.ts +21 -0
  141. package/loader/index.es2017.js +3 -0
  142. package/loader/index.js +4 -0
  143. package/loader/package.json +11 -0
  144. package/package.json +19 -14
  145. package/readme.md +24 -7
  146. package/cjs/colors-7f354880.js +0 -95
  147. package/cjs/favesalon-embed.cjs.js +0 -20
  148. package/cjs/google-map.cjs.entry.js +0 -47
  149. package/cjs/index-95daad08.js +0 -1928
  150. package/cjs/loader.cjs.js +0 -22
  151. package/cjs/salon-contact_4.cjs.entry.js +0 -155
  152. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -25
  153. package/cjs/salon-info.cjs.entry.js +0 -35
  154. package/cjs/salon-latest-reviews.cjs.entry.js +0 -58
  155. package/cjs/salon-lookbook-modal.cjs.entry.js +0 -141
  156. package/cjs/salon-reviews.cjs.entry.js +0 -205
  157. package/cjs/salon-services.cjs.entry.js +0 -47
  158. package/cjs/salon-stylists.cjs.entry.js +0 -54
  159. package/cjs/services-f1102d4a.js +0 -5762
  160. package/collection/components/google-map/index.js +0 -97
  161. package/collection/components/salon-booking/index.js +0 -121
  162. package/collection/components/salon-booking/salon-booking-modal.js +0 -88
  163. package/collection/components/salon-contact/index.js +0 -88
  164. package/collection/components/salon-gift-card/index.css +0 -25
  165. package/collection/components/salon-gift-card/index.js +0 -120
  166. package/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -48
  167. package/collection/components/salon-info/index.css +0 -3
  168. package/collection/components/salon-info/index.js +0 -97
  169. package/collection/components/salon-latest-reviews/index.js +0 -108
  170. package/collection/components/salon-locations/index.js +0 -80
  171. package/collection/components/salon-lookbook/index.js +0 -376
  172. package/collection/components/salon-lookbook/lookbook-modal.css +0 -72
  173. package/collection/components/salon-lookbook/salon-lookbook-modal.js +0 -248
  174. package/collection/components/salon-ranking/index.js +0 -114
  175. package/collection/components/salon-reviews/index.js +0 -317
  176. package/collection/components/salon-schedules/index.css +0 -14
  177. package/collection/components/salon-schedules/index.js +0 -103
  178. package/collection/components/salon-services/index.js +0 -113
  179. package/collection/components/salon-styles/index.css +0 -23
  180. package/collection/components/salon-styles/index.js +0 -100
  181. package/collection/components/salon-stylists/index.js +0 -96
  182. package/collection/components/user-avatar/index.css +0 -0
  183. package/collection/components/user-avatar/index.js +0 -127
  184. package/collection/constants/colors.js +0 -91
  185. package/collection/services/services.js +0 -225
  186. package/collection/types/common.js +0 -2
  187. package/collection/types/salon.js +0 -52
  188. package/collection/types/style.js +0 -103
  189. package/collection/types/user.js +0 -10
  190. package/custom-elements/index.js +0 -12125
  191. package/esm/colors-1ec90c5f.js +0 -93
  192. package/esm/favesalon-embed.js +0 -18
  193. package/esm/google-map.entry.js +0 -43
  194. package/esm/index-09d43e3e.js +0 -1926
  195. package/esm/loader.js +0 -18
  196. package/esm/polyfills/css-shim.js +0 -1
  197. package/esm/salon-contact_4.entry.js +0 -148
  198. package/esm/salon-gift-card-modal.entry.js +0 -21
  199. package/esm/salon-info.entry.js +0 -31
  200. package/esm/salon-latest-reviews.entry.js +0 -54
  201. package/esm/salon-lookbook-modal.entry.js +0 -137
  202. package/esm/salon-reviews.entry.js +0 -201
  203. package/esm/salon-services.entry.js +0 -43
  204. package/esm/salon-stylists.entry.js +0 -50
  205. package/esm/services-74d84ca9.js +0 -5756
  206. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  207. package/favesalon-embed/p-0188d4dc.entry.js +0 -1
  208. package/favesalon-embed/p-0318501e.js +0 -1
  209. package/favesalon-embed/p-078f242d.entry.js +0 -1
  210. package/favesalon-embed/p-13e23c61.entry.js +0 -1
  211. package/favesalon-embed/p-17df13ad.js +0 -1
  212. package/favesalon-embed/p-1a3179c8.entry.js +0 -1
  213. package/favesalon-embed/p-20aa75de.js +0 -6
  214. package/favesalon-embed/p-2901a6d6.entry.js +0 -1
  215. package/favesalon-embed/p-2b861430.entry.js +0 -1
  216. package/favesalon-embed/p-44d810a0.js +0 -1
  217. package/favesalon-embed/p-4a5eca9a.js +0 -6
  218. package/favesalon-embed/p-4c68700f.entry.js +0 -1
  219. package/favesalon-embed/p-4e2d7b29.js +0 -1
  220. package/favesalon-embed/p-6b845bf1.entry.js +0 -1
  221. package/favesalon-embed/p-7350f6b5.entry.js +0 -1
  222. package/favesalon-embed/p-897c2b1c.entry.js +0 -1
  223. package/favesalon-embed/p-8e60f56f.entry.js +0 -1
  224. package/favesalon-embed/p-a49afdc1.entry.js +0 -1
  225. package/favesalon-embed/p-c93867c4.entry.js +0 -1
  226. package/favesalon-embed/p-ea6a097f.entry.js +0 -1
  227. package/types/components/google-map/index.d.ts +0 -10
  228. package/types/components/salon-contact/index.d.ts +0 -9
  229. package/types/components/salon-lookbook/salon-lookbook-modal.d.ts +0 -13
  230. package/types/components/salon-reviews/index.d.ts +0 -24
  231. package/types/components/salon-styles/index.d.ts +0 -9
  232. package/types/constants/colors.d.ts +0 -88
  233. package/types/services/services.d.ts +0 -26
  234. package/types/types/common.d.ts +0 -2
  235. package/types/types/style.d.ts +0 -59
  236. /package/{cjs → dist/cjs}/_commonjsHelpers-5cfcba41.js +0 -0
  237. /package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
  238. /package/{cjs → dist/cjs}/index.cjs.js +0 -0
  239. /package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
  240. /package/{esm/index.js → dist/collection/components/salon-info/index.css} +0 -0
  241. /package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -0
  242. /package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
  243. /package/{collection → dist/collection}/components/salon-stylists/index.css +0 -0
  244. /package/{collection/components/salon-locations → dist/collection/components/user-avatar}/index.css +0 -0
  245. /package/{collection → dist/collection}/global/global.js +0 -0
  246. /package/{collection → dist/collection}/index.js +0 -0
  247. /package/{collection → dist/collection}/types/service.js +0 -0
  248. /package/{collection → dist/collection}/utils/utils.js +0 -0
  249. /package/{esm → dist/esm}/_commonjsHelpers-098d5b27.js +0 -0
  250. /package/{esm → dist/esm}/global-e1089ffd.js +0 -0
  251. /package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  252. /package/{esm → dist/esm}/polyfills/dom.js +0 -0
  253. /package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  254. /package/{esm → dist/esm}/polyfills/index.js +0 -0
  255. /package/{esm → dist/esm}/polyfills/system.js +0 -0
  256. /package/{esm → dist/esm}/utils-e97485e0.js +0 -0
  257. /package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
  258. /package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
  259. /package/{favesalon-embed → dist/favesalon-embed}/p-d6083940.js +0 -0
  260. /package/{index.cjs.js → dist/index.cjs.js} +0 -0
  261. /package/{index.js → dist/index.js} +0 -0
  262. /package/{collection/components/salon-services/index.css → dist/types/components/chat-conversation/index.d.ts} +0 -0
  263. /package/{types → dist/types}/components/salon-booking/index.d.ts +0 -0
  264. /package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +0 -0
  265. /package/{types → dist/types}/components/salon-gift-card/index.d.ts +0 -0
  266. /package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
  267. /package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
  268. /package/{types → dist/types}/index.d.ts +0 -0
  269. /package/{types → dist/types}/types/service.d.ts +0 -0
  270. /package/{types → dist/types}/utils/utils.d.ts +0 -0
@@ -0,0 +1,312 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-47c2a5f6.js');
6
+ const services = require('./services-125c82d8.js');
7
+ const relativeTime = require('./relativeTime-3721080d.js');
8
+ const colors = require('./colors-38421769.js');
9
+ require('./_commonjsHelpers-5cfcba41.js');
10
+
11
+ const indexCss = ".salon-modal.salon-modal--lookbook-detail .salon-modal--close{display:none !important}.salon-modal.salon-modal--lookbook-detail .salon-modal--content{background-color:#fff;position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1000;overflow-y:auto}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:240px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnails{text-align:center}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{display:inline-block;margin-top:12px;margin-right:12px;height:40px;width:60px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--button{border:none;position:absolute;top:50%;z-index:20;height:40px;width:40px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;-moz-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--prev{left:24px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--next{right:24px}@media (min-width: 768px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:360px !important}}@media (min-width: 992px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:480px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{height:56px;width:72px}}";
12
+
13
+ services.dayjs_min.extend(relativeTime.relativeTime);
14
+ const StyleDetail = class {
15
+ constructor(hostRef) {
16
+ index.registerInstance(this, hostRef);
17
+ this.salonId = undefined;
18
+ this.salonLookbook = undefined;
19
+ this.lookbookInfo = undefined;
20
+ this.isModalOpen = true;
21
+ this.currentMediaIdx = 0;
22
+ this.currentMedia = undefined;
23
+ this.albumMedias = [];
24
+ this.similarStyles = [];
25
+ this.totalComments = 0;
26
+ this.lookbookComments = [];
27
+ this.isLayoutSetup = undefined;
28
+ }
29
+ componentWillLoad() {
30
+ this.injectSDK();
31
+ if (!!this.salonLookbook) {
32
+ this.lookbookInfo = JSON.parse(this.salonLookbook);
33
+ this.fetchData();
34
+ }
35
+ }
36
+ componentDidRender() {
37
+ this.setupGridLayout();
38
+ }
39
+ injectSDK() {
40
+ return new Promise((resolve) => {
41
+ const script = document.createElement('script');
42
+ script.type = 'text/javascript';
43
+ script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
44
+ document.body.appendChild(script);
45
+ return resolve(true);
46
+ });
47
+ }
48
+ setupGridLayout() {
49
+ if (!this.isLayoutSetup && this.similarStyles.length > 0 && document.querySelector('#similar-styles--grid')) {
50
+ const script = document.createElement('script');
51
+ script.type = 'text/javascript';
52
+ script.innerHTML = `
53
+ var masonry = new Macy({
54
+ container: '#similar-styles--grid',
55
+ useContainerForBreakpoints: true,
56
+ margin: 16,
57
+ columns: 2,
58
+ });
59
+ `;
60
+ document.body.appendChild(script);
61
+ this.isLayoutSetup = true;
62
+ }
63
+ }
64
+ fetchData() {
65
+ try {
66
+ const promises = [
67
+ services.HttpService().fetchStyleDetail(this.lookbookInfo.id).then(response => {
68
+ const { styleInfo, similarStyles } = response;
69
+ this.similarStyles = similarStyles;
70
+ if (styleInfo) {
71
+ this.lookbookInfo = styleInfo;
72
+ this.albumMedias = styleInfo.albumMedias || [];
73
+ this.currentMedia = (styleInfo.albumMedias || [])[0];
74
+ }
75
+ }),
76
+ services.HttpService().fetchStyleComments(this.lookbookInfo.id).then(response => {
77
+ this.totalComments = response.total;
78
+ this.lookbookComments = response.data;
79
+ }),
80
+ ];
81
+ return Promise.all(promises);
82
+ }
83
+ catch (e) { }
84
+ }
85
+ closeModal() {
86
+ this.isModalOpen = false;
87
+ const el = document.querySelector('style-detail');
88
+ el.remove();
89
+ }
90
+ onClickLookbook(style) {
91
+ const elLookbookModal = document.createElement('div');
92
+ elLookbookModal.innerHTML = `
93
+ <style-detail
94
+ salon-id=${this.salonId}
95
+ salon-lookbook='${JSON.stringify(style)}'
96
+ ></style-detail>
97
+ `;
98
+ document.body.appendChild(elLookbookModal);
99
+ }
100
+ onClickPrev() {
101
+ if (this.currentMediaIdx === 0) {
102
+ this.currentMediaIdx = this.albumMedias.length - 1;
103
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
104
+ }
105
+ else {
106
+ this.currentMediaIdx = this.currentMediaIdx - 1;
107
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
108
+ }
109
+ }
110
+ onClickNext() {
111
+ if (this.currentMediaIdx === this.albumMedias.length - 1) {
112
+ this.currentMediaIdx = 0;
113
+ this.currentMedia = this.albumMedias[0];
114
+ }
115
+ else {
116
+ this.currentMediaIdx = this.currentMediaIdx + 1;
117
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
118
+ }
119
+ }
120
+ render() {
121
+ const { createdDate, totalView, totalLike, totalBooking, album, salon, stylist, } = this.lookbookInfo;
122
+ if (this.isModalOpen) {
123
+ const { caption, description, mediaUrl } = this.currentMedia || {};
124
+ const isVideo = services.isVideoMedia((this.currentMedia || {}));
125
+ return (index.h("div", { class: "salon-modal salon-modal--lookbook-detail" }, index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--content" }, index.h("div", { class: "style-detail" }, index.h("div", { class: "style-detail--header" }, index.h("div", { style: {
126
+ position: 'relative',
127
+ overflow: 'hidden',
128
+ } }, index.h("div", { style: Object.assign({ backgroundColor: colors.Colors.Gray01, backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: '0 0', filter: 'blur(30px)', position: 'absolute', inset: '0', zIndex: '1' }, this.currentMedia && !services.isVideoMedia(this.currentMedia) ? { backgroundImage: `url("${this.currentMedia.imageThumb}")` } : {}) }), index.h("div", { style: {
129
+ zIndex: '2',
130
+ position: 'relative',
131
+ width: '100%',
132
+ backgroundColor: 'rgba(0, 0, 0, 0.25)',
133
+ padding: '12px 16px',
134
+ overflow: 'hidden',
135
+ } }, index.h("span", { style: {
136
+ color: colors.Colors.White,
137
+ border: 'none',
138
+ display: 'flex',
139
+ alignItems: 'center',
140
+ justifyContent: 'center',
141
+ height: '32px',
142
+ } }, index.h("span", null, this.currentMediaIdx + 1, " / ", this.albumMedias.length)), index.h("div", { style: {
143
+ display: 'flex',
144
+ alignItems: 'center',
145
+ position: 'absolute',
146
+ right: '16px',
147
+ top: '50%',
148
+ transform: 'translate(0, -50%)',
149
+ } }, index.h("button", { type: "text", class: "btn btn-light", style: {
150
+ backgroundColor: colors.Colors.White,
151
+ borderColor: colors.Colors.White,
152
+ border: 'none',
153
+ borderRadius: '50px',
154
+ display: 'flex',
155
+ alignItems: 'center',
156
+ justifyContent: 'center',
157
+ height: '32px',
158
+ width: '32px',
159
+ marginLeft: '12px',
160
+ }, onClick: () => this.closeModal() }, index.h("i", { class: "ri-close-fill", style: { fontSize: '16px', lineHeight: '1' } })))), index.h("div", { style: { position: 'relative', zIndex: "3" } }, index.h("div", { class: "style-detail--slides", style: {
161
+ marginTop: '16px',
162
+ marginBottom: '12px',
163
+ } }, index.h("div", { class: "style-detail--slides--image", style: {
164
+ width: '100%',
165
+ position: 'relative',
166
+ height: '360px',
167
+ } }, isVideo && (index.h("video", { muted: true, controls: true, width: "100%", height: "100%" }, index.h("source", { src: mediaUrl, type: "video/mp4" }))), !isVideo && (index.h("div", { style: {
168
+ position: 'absolute',
169
+ inset: '0',
170
+ zIndex: '2',
171
+ display: 'flex',
172
+ alignItems: 'center',
173
+ justifyContent: 'center',
174
+ } }, index.h("img", { src: mediaUrl, alt: caption, style: {
175
+ objectFit: 'contain',
176
+ maxHeight: '100%',
177
+ maxWidth: '100%',
178
+ } })))), index.h("div", { class: "style-detail--slides--thumbnails", style: {
179
+ width: '100%',
180
+ position: 'relative',
181
+ } }, this.albumMedias.map((media, idx) => {
182
+ const isStyleVideo = services.isVideoMedia(media);
183
+ return (index.h("div", { class: "style-detail--slides--thumbnail", style: Object.assign(Object.assign({ backgroundColor: colors.Colors.Gray01, borderRadius: '4px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, this.currentMediaIdx !== idx ? { opacity: '0.75' } : {}), !isStyleVideo ? {
184
+ backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
185
+ backgroundRepeat: 'no-repeat',
186
+ backgroundPosition: 'center center',
187
+ backgroundSize: 'cover',
188
+ } : {}), onClick: () => {
189
+ this.currentMedia = media;
190
+ this.currentMediaIdx = idx;
191
+ } }, isStyleVideo && (index.h("div", null, index.h("video", { muted: true, width: "100%", height: "100%", poster: media.imageThumb }, index.h("source", { src: media.mediaUrl, type: "video/mp4" })), index.h("i", { class: "ri-play-circle-fill", style: {
192
+ fontSize: '48px',
193
+ color: colors.Colors.TextColor,
194
+ position: 'absolute',
195
+ left: '50%',
196
+ top: '50%',
197
+ transform: 'translate(-50%, -50%)',
198
+ } })))));
199
+ }))), this.albumMedias.length > 1 && (index.h("div", null, index.h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--prev", onClick: () => this.onClickPrev() }, index.h("i", { class: "ri-arrow-left-line", style: { color: colors.Colors.TextColor, fontSize: '18px' } })), index.h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--next", onClick: () => this.onClickNext() }, index.h("i", { class: "ri-arrow-right-line", style: { color: colors.Colors.TextColor, fontSize: '18px' } }))))))), index.h("div", { class: "style-detail--content" }, index.h("div", { class: "container" }, index.h("div", { style: {
200
+ paddingBottom: '24px',
201
+ paddingTop: '24px',
202
+ } }, index.h("div", { class: "row" }, index.h("div", { class: this.similarStyles.length > 0 ? 'col-md-8' : 'col-md-12', style: { marginBottom: '24px' } }, index.h("div", { class: "row" }, salon && (index.h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, index.h("div", { style: {
203
+ backgroundColor: colors.Colors.Red01,
204
+ borderRadius: '4px',
205
+ padding: '8px',
206
+ display: 'flex',
207
+ alignItems: 'center',
208
+ justifyContent: 'space-between',
209
+ } }, index.h("div", { style: { paddingLeft: '8px' } }, index.h("div", { style: { color: colors.Colors.Gray05, fontSize: '12px' } }, "At salon"), index.h("div", { style: {
210
+ color: colors.Colors.Secondary,
211
+ fontSize: '20px',
212
+ lineHeight: '24px',
213
+ } }, salon.businessName)), index.h("div", { style: {
214
+ backgroundImage: `url("${services.getSalonImage(salon)}")`,
215
+ backgroundColor: colors.Colors.Red02,
216
+ backgroundSize: 'cover',
217
+ backgroundRepeat: 'no-repeat',
218
+ backgroundPosition: '0 0',
219
+ borderRadius: '4px',
220
+ height: '48px',
221
+ width: '48px',
222
+ } })))), stylist && stylist.id && (index.h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, index.h("div", { style: {
223
+ backgroundColor: colors.Colors.Yellow01,
224
+ borderRadius: '4px',
225
+ padding: '8px',
226
+ display: 'flex',
227
+ alignItems: 'center',
228
+ justifyContent: 'space-between',
229
+ } }, index.h("div", { style: { paddingLeft: '8px' } }, index.h("div", { style: { color: colors.Colors.Gray05, fontSize: '12px' } }, "By stylist"), index.h("div", { style: {
230
+ color: colors.Colors.Secondary,
231
+ fontSize: '20px',
232
+ lineHeight: '24px',
233
+ } }, stylist.fullName)), index.h("div", { style: {
234
+ backgroundImage: `url("${stylist.avatar}")`,
235
+ backgroundColor: colors.Colors.Yellow02,
236
+ backgroundSize: 'cover',
237
+ backgroundRepeat: 'no-repeat',
238
+ backgroundPosition: '0 0',
239
+ borderRadius: '4px',
240
+ height: '48px',
241
+ width: '48px',
242
+ } }))))), index.h("div", { style: {
243
+ borderBottom: `1px solid ${colors.Colors.Gray02}`,
244
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
245
+ display: 'flex',
246
+ alignItems: 'center',
247
+ justifyContent: 'space-between',
248
+ paddingBottom: '16px',
249
+ paddingTop: '16px',
250
+ } }, index.h("div", { style: {
251
+ display: 'flex',
252
+ alignItems: 'center',
253
+ justifyContent: 'space-around',
254
+ flexShrink: '1',
255
+ flexGrow: '1',
256
+ } }, index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalLike), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "faves")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalBooking), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "booked")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalView), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "views")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, this.totalComments), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "comments")))), (caption || description) && (index.h("div", { style: { paddingTop: '24px' } }, index.h("div", { style: { color: colors.Colors.Gray04, fontSize: '14px' } }, createdDate && services.dayjs_min(createdDate).format(services.shortDateYearFormat)), index.h("div", { style: { fontSize: '24px' } }, caption), index.h("div", { style: {
257
+ fontSize: '16px',
258
+ paddingTop: caption ? '16px' : '0',
259
+ } }, description))), album && album.tags.length > 0 && (index.h("div", { style: {
260
+ paddingTop: '24px',
261
+ marginBottom: '-12px',
262
+ } }, album.tags.map((tag, idx) => (index.h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
263
+ backgroundColor: colors.Colors.Gray01,
264
+ borderColor: colors.Colors.Gray01,
265
+ borderRadius: '4px',
266
+ marginRight: '12px',
267
+ marginBottom: '12px',
268
+ } }, tag))))), index.h("div", { style: { marginTop: '32px' } }, this.lookbookComments && this.lookbookComments.length > 0 && (index.h("div", null, index.h("div", { style: { fontWeight: '600', marginBottom: '8px' } }, this.totalComments, " ", this.totalComments === 1 ? 'comment' : 'comments'), index.h("div", { class: "view view--style-comments", style: {
269
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
270
+ paddingTop: '24px',
271
+ paddingBottom: '24px',
272
+ } }, this.lookbookComments.map((comment, idx) => {
273
+ const { user, title, description, createdDate } = comment;
274
+ return (index.h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
275
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
276
+ marginTop: '24px',
277
+ paddingTop: '24px',
278
+ } : {} }, index.h("div", { style: { overflow: 'hidden' } }, index.h("user-avatar", { size: 48, avatar: user.avatar, name: index.h("div", null, index.h("div", { style: { color: colors.Colors.Gray04, lineHeight: '1', fontSize: '12px', fontWeight: '400' } }, services.dayjs_min(createdDate).fromNow()), index.h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName)), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, nameStyle: { fontWeight: 'bold' } })), index.h("div", { style: {
279
+ color: colors.Colors.Black,
280
+ fontSize: '16px',
281
+ paddingTop: '16px',
282
+ } }, title), description && (index.h("div", { style: {
283
+ color: colors.Colors.Gray05,
284
+ paddingTop: '8px',
285
+ } }, description))));
286
+ })))))), index.h("div", { class: "col-md-4", style: { marginBottom: '24px' } }, index.h("div", { class: "block block--similar-styles" }, this.similarStyles.length > 0 && (index.h("div", { class: "block--content" }, index.h("h3", { style: {
287
+ lineHeight: '1.2',
288
+ fontSize: '24px',
289
+ color: colors.Colors.Secondary,
290
+ } }, "More like this"), index.h("div", { style: { marginTop: '16px' } }, index.h("div", { class: "similar-styles--grid", id: "similar-styles--grid" }, this.similarStyles.slice(0, 6).map(style => {
291
+ const { caption, imageThumbMedium, owner } = style;
292
+ return (index.h("div", { class: "similar-styles--grid-item", onClick: () => {
293
+ this.closeModal();
294
+ this.onClickLookbook(style);
295
+ } }, index.h("div", { class: "card", style: {
296
+ background: 'none',
297
+ border: 'none',
298
+ cursor: 'pointer',
299
+ } }, index.h("div", { class: "similar-styles--grid-item--image", style: {
300
+ borderRadius: '8px',
301
+ overflow: 'hidden',
302
+ minHeight: '80px',
303
+ background: colors.Colors.Gray01,
304
+ } }, index.h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (index.h("div", { class: "card-body", style: { paddingLeft: '0' } }, index.h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
305
+ }))))))))))))))));
306
+ }
307
+ return null;
308
+ }
309
+ };
310
+ StyleDetail.style = indexCss;
311
+
312
+ exports.style_detail = StyleDetail;
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-47c2a5f6.js');
6
+ const colors = require('./colors-38421769.js');
7
+
8
+ const indexCss = "";
9
+
10
+ const UserAvatar = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.size = 24;
14
+ this.name = undefined;
15
+ this.nameStyle = undefined;
16
+ this.shortName = undefined;
17
+ this.avatar = undefined;
18
+ }
19
+ render() {
20
+ return (index.h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (index.h("div", { style: {
21
+ backgroundImage: `url("${this.avatar}")`,
22
+ backgroundColor: colors.Colors.Gray01,
23
+ backgroundPosition: 'center center',
24
+ backgroundSize: 'cover',
25
+ borderRadius: '50%',
26
+ height: `${this.size}px`,
27
+ width: `${this.size}px`,
28
+ minWidth: `${this.size}px`,
29
+ } })), !this.avatar && (index.h("div", { style: {
30
+ backgroundColor: colors.Colors.Gray01,
31
+ backgroundPosition: 'center center',
32
+ backgroundSize: 'cover',
33
+ borderRadius: '50%',
34
+ display: 'flex',
35
+ alignItems: 'center',
36
+ justifyContent: 'center',
37
+ height: `${this.size}px`,
38
+ width: `${this.size}px`,
39
+ minWidth: `${this.size}px`,
40
+ } }, this.shortName)), this.name && (index.h("div", { style: Object.assign({ flexShrink: '1', flexGrow: '1', marginLeft: '12px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, this.nameStyle) }, this.name))));
41
+ }
42
+ };
43
+ UserAvatar.style = indexCss;
44
+
45
+ exports.user_avatar = UserAvatar;
@@ -1,28 +1,28 @@
1
1
  {
2
2
  "entries": [
3
+ "./components/chat-button/index.js",
3
4
  "./components/google-map/index.js",
4
5
  "./components/salon-booking/index.js",
5
6
  "./components/salon-booking/salon-booking-modal.js",
6
- "./components/salon-contact/index.js",
7
7
  "./components/salon-gift-card/index.js",
8
8
  "./components/salon-gift-card/salon-gift-card-modal.js",
9
9
  "./components/salon-info/index.js",
10
10
  "./components/salon-latest-reviews/index.js",
11
+ "./components/salon-latest-styles/index.js",
11
12
  "./components/salon-locations/index.js",
12
13
  "./components/salon-lookbook/index.js",
13
- "./components/salon-lookbook/salon-lookbook-modal.js",
14
14
  "./components/salon-ranking/index.js",
15
15
  "./components/salon-reviews/index.js",
16
16
  "./components/salon-schedules/index.js",
17
17
  "./components/salon-services/index.js",
18
- "./components/salon-styles/index.js",
19
18
  "./components/salon-stylists/index.js",
19
+ "./components/style-detail/index.js",
20
20
  "./components/user-avatar/index.js"
21
21
  ],
22
22
  "compiler": {
23
23
  "name": "@stencil/core",
24
- "version": "2.9.0",
25
- "typescriptVersion": "4.2.3"
24
+ "version": "2.22.3",
25
+ "typescriptVersion": "4.9.4"
26
26
  },
27
27
  "collections": [],
28
28
  "bundles": []
@@ -0,0 +1,122 @@
1
+ chat-button {
2
+ display: inline-block;
3
+ position: relative;
4
+ }
5
+
6
+ .chat-button--indicator {
7
+ cursor: pointer;
8
+ position: absolute;
9
+ inset: 0;
10
+ }
11
+
12
+ .chat-button--counter {
13
+ background-color: rgb(240, 90, 97);
14
+ border: 1px solid rgb(255, 255, 255);
15
+ position: absolute;
16
+ right: -6px;
17
+ bottom: 12px;
18
+ height: 8px;
19
+ width: 8px;
20
+ -moz-border-radius: 8px;
21
+ -webkit-border-radius: 8px;
22
+ border-radius: 8px;
23
+ }
24
+
25
+ .chat-box {
26
+ background-color: #fff;
27
+ display: flex;
28
+ flex-direction: column;
29
+ position: fixed;
30
+ inset: 0px;
31
+ z-index: 20000;
32
+ }
33
+
34
+ .chat-box--header {
35
+ display: flex;
36
+ justify-content: space-between;
37
+ padding: 16px;
38
+ position: relative;
39
+ }
40
+
41
+ .chat-box--header-title {
42
+ color: #fff;
43
+ font-size: 20px;
44
+ font-weight: 600;
45
+ line-height: 1;
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ margin: 0;
50
+ }
51
+
52
+
53
+ .chat-message {
54
+ overflow: hidden;
55
+ clear: both;
56
+ min-width: 240px;
57
+ }
58
+
59
+ .chat-message--meta {
60
+ display: flex;
61
+ }
62
+
63
+ .chat-message--message {
64
+ background-color: #F1F1F1;
65
+ padding: 8px 12px;
66
+ position: relative;
67
+ float: left;
68
+ margin-top: 6px;
69
+ -moz-border-radius: 0 10px 10px 10px;
70
+ -webkit-border-radius: 0 10px 10px 10px;
71
+ border-radius: 0 10px 10px 10px;
72
+ }
73
+
74
+ .chat-conversation--time {
75
+ clear: both;
76
+ color: #999;
77
+ font-size: 75%;
78
+ padding-top: 2px;
79
+ }
80
+
81
+ .chat-message.is-owner .chat-message--content {
82
+ margin-left: 12px;
83
+ }
84
+
85
+ .chat-message.is-guest .chat-message--meta {
86
+ flex-direction: row-reverse;
87
+ }
88
+ .chat-message.is-guest .chat-message--message {
89
+ background-color: #EFF7FF;
90
+ float: right;
91
+ margin-right: 12px;
92
+ text-align: right;
93
+ -moz-border-radius: 10px 0 10px 10px;
94
+ -webkit-border-radius: 10px 0 10px 10px;
95
+ border-radius: 10px 0 10px 10px;
96
+ }
97
+
98
+
99
+ @media (min-width: 768px) {
100
+ .chat-box {
101
+ border: 1px solid #fff;
102
+ left: unset;
103
+ top: unset;
104
+ right: 1px;
105
+ bottom: 0px;
106
+ height: 420px;
107
+ max-height: 90vh;
108
+ width: 600px;
109
+ -moz-border-radius: 8px 8px 0px 0px;
110
+ -webkit-border-radius: 8px 8px 0px 0px;
111
+ border-radius: 8px 8px 0px 0px;
112
+ -moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 24px;
113
+ -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 24px;
114
+ box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 24px;
115
+ }
116
+
117
+ .chat-box--header {
118
+ -moz-border-radius: 8px 8px 0px 0px;
119
+ -webkit-border-radius: 8px 8px 0px 0px;
120
+ border-radius: 8px 8px 0px 0px;
121
+ }
122
+ }