favesalon-embed 0.0.4 → 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 (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 @@
1
+
@@ -0,0 +1,19 @@
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-3fae868e.js';
2
+ export { s as setNonce } from './index-3fae868e.js';
3
+ import './global-e1089ffd.js';
4
+
5
+ /*
6
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
7
+ */
8
+ const patchEsm = () => {
9
+ return promiseResolve();
10
+ };
11
+
12
+ const defineCustomElements = (win, options) => {
13
+ if (typeof window === 'undefined') return Promise.resolve();
14
+ return patchEsm().then(() => {
15
+ return bootstrapLazy([["chat-button",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"receiverId":[1,"receiver-id"],"senderInfo":[32],"receiverInfo":[32],"chatRoom":[32],"chatMessages":[32],"isChatExpanded":[32],"fetchData":[64]}]]],["salon-latest-reviews",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook",[[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"sortBy":[32],"filterBy":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onChangeFiltering":[64],"onChangeSorting":[64],"onLoadMore":[64],"fetchCategories":[64]}]]],["salon-reviews",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"stats":[32],"totalReviews":[32],"allReviews":[32],"isLoading":[32],"isSorting":[32],"isFiltering":[32],"isLoadingMore":[32],"canLoadMore":[32],"page":[32],"filterBy":[32],"sortBy":[32]}]]],["style-detail",[[0,"style-detail",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"isModalOpen":[32],"currentMediaIdx":[32],"currentMedia":[32],"albumMedias":[32],"similarStyles":[32],"totalComments":[32],"lookbookComments":[32],"isLayoutSetup":[32],"fetchData":[64]}]]],["salon-booking",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-booking-modal",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["google-map_5",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}],[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]],["user-avatar",[[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
16
+ });
17
+ };
18
+
19
+ export { defineCustomElements };
@@ -0,0 +1 @@
1
+ var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
@@ -0,0 +1,7 @@
1
+ import { a as createCommonjsModule, c as commonjsGlobal } from './_commonjsHelpers-098d5b27.js';
2
+
3
+ var relativeTime = createCommonjsModule(function (module, exports) {
4
+ !function(r,e){module.exports=e();}(commonjsGlobal,(function(){return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return "function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)};}}));
5
+ });
6
+
7
+ export { relativeTime as r };
@@ -1,12 +1,13 @@
1
- import { r as registerInstance, h } from './index-0f8eed73.js';
2
- import { C as Colors } from './colors-1ec90c5f.js';
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { C as Colors } from './colors-ea36347a.js';
3
3
 
4
- const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{width:48px;height:48px;right:10px;top:12px}@media (min-width: 576px){.salon-modal.salon-modal--booking .salon-modal--close{right:16px}}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:24px}}@media (min-width: 1200px){.salon-modal.salon-modal--booking .salon-modal--close{right:50%;margin-right:-585px}}";
4
+ const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
5
5
 
6
- let SalonBookingModal = class {
6
+ const SalonBookingModal = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
- this.primaryColor = Colors.Coral03;
9
+ this.salonId = undefined;
10
+ this.primaryColor = Colors.Primary;
10
11
  this.redirectUrl = window.btoa(window.location.href);
11
12
  this.isModalOpen = true;
12
13
  }
@@ -17,7 +18,7 @@ let SalonBookingModal = class {
17
18
  }
18
19
  render() {
19
20
  const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
20
- return (h("div", { class: "salon-booking--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--booking" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/booking?salonId=${this.salonId}&primaryColor=${primaryColor}&redirectUrl=${this.redirectUrl}` })))))));
21
+ return (h("div", { class: "salon-booking--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--booking" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/booking?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
21
22
  }
22
23
  };
23
24
  SalonBookingModal.style = indexCss;
@@ -1,17 +1,17 @@
1
- import { r as registerInstance, h } from './index-0f8eed73.js';
2
- import { c as color } from './index-09d43e3e.js';
3
- import { l as lib } from './index-67d677ba.js';
4
- import { C as Colors } from './colors-1ec90c5f.js';
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { c as color, l as lib } from './index-80523fec.js';
3
+ import { C as Colors } from './colors-ea36347a.js';
5
4
  import './_commonjsHelpers-098d5b27.js';
6
5
 
7
- const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{width:48px;height:48px;right:10px;top:12px}@media (min-width: 576px){.salon-modal.salon-modal--booking .salon-modal--close{right:16px}}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:24px}}@media (min-width: 1200px){.salon-modal.salon-modal--booking .salon-modal--close{right:50%;margin-right:-585px}}";
6
+ const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
8
7
 
9
- let SalonBooking = class {
8
+ const SalonBooking = class {
10
9
  constructor(hostRef) {
11
10
  registerInstance(this, hostRef);
11
+ this.salonId = undefined;
12
12
  this.buttonClass = '';
13
13
  this.buttonText = 'Book now';
14
- this.primaryColor = Colors.Coral03;
14
+ this.primaryColor = Colors.Primary;
15
15
  }
16
16
  openModal() {
17
17
  const elBookingModal = document.createElement('div');
@@ -0,0 +1,25 @@
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { C as Colors } from './colors-ea36347a.js';
3
+
4
+ const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
5
+
6
+ const SalonGiftCardModal = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.salonId = undefined;
10
+ this.primaryColor = Colors.Primary;
11
+ this.isModalOpen = true;
12
+ }
13
+ closeModal() {
14
+ this.isModalOpen = false;
15
+ const el = document.querySelector('salon-gift-card-modal');
16
+ el.remove();
17
+ }
18
+ render() {
19
+ const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
20
+ return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
21
+ }
22
+ };
23
+ SalonGiftCardModal.style = indexCss;
24
+
25
+ export { SalonGiftCardModal as salon_gift_card_modal };
@@ -1,23 +1,24 @@
1
- import { r as registerInstance, h } from './index-0f8eed73.js';
2
- import { c as color } from './index-09d43e3e.js';
3
- import { l as lib } from './index-67d677ba.js';
4
- import { C as Colors } from './colors-1ec90c5f.js';
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { c as color, l as lib } from './index-80523fec.js';
3
+ import { C as Colors } from './colors-ea36347a.js';
5
4
  import './_commonjsHelpers-098d5b27.js';
6
5
 
7
- const indexCss = ".salon-modal.salon-modal--gift-card .salon-modal--title{margin:0}.salon-modal.salon-modal--gift-card .salon-modal--close{width:40px;height:40px;right:16px;top:16px}.salon-modal.salon-modal--gift-card .salon-modal--header{height:72px;padding:16px}.salon-modal.salon-modal--gift-card .salon-modal--inner{height:90vh}.salon-modal.salon-modal--gift-card .salon-modal--content{height:90vh;padding:0 16px;overflow-y:auto}";
6
+ const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
8
7
 
9
- let SalonGiftCard = class {
8
+ const SalonGiftCard = class {
10
9
  constructor(hostRef) {
11
10
  registerInstance(this, hostRef);
11
+ this.salonId = undefined;
12
12
  this.buttonClass = '';
13
13
  this.buttonText = 'Buy Gift card';
14
- this.primaryColor = Colors.Coral03;
14
+ this.primaryColor = Colors.Primary;
15
15
  }
16
16
  openModal() {
17
17
  const elBookingModal = document.createElement('div');
18
18
  elBookingModal.innerHTML = `
19
19
  <salon-gift-card-modal
20
20
  salon-id=${this.salonId}
21
+ primary-color=${this.primaryColor}
21
22
  ></salon-gift-card-modal>
22
23
  `;
23
24
  document.body.appendChild(elBookingModal);
@@ -0,0 +1,93 @@
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { H as HttpService, d as dayjs_min, s as shortDateYearFormat } from './services-40a3e622.js';
3
+ import { C as Colors } from './colors-ea36347a.js';
4
+ import { g as getRatingText } from './utils-e97485e0.js';
5
+ import './_commonjsHelpers-098d5b27.js';
6
+
7
+ const indexCss = ".salon-latest-reviews .salon-review{min-width:280px}@media (min-width: 768px){.salon-latest-reviews .salon-review{min-width:300px}}";
8
+
9
+ const SalonLatestReviews = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.salonId = undefined;
13
+ this.primaryColor = Colors.Primary;
14
+ this.salonReviews = [];
15
+ this.isLoading = undefined;
16
+ }
17
+ componentWillLoad() {
18
+ this.fetchData();
19
+ }
20
+ async fetchData() {
21
+ this.isLoading = true;
22
+ try {
23
+ const { data: allReviews } = await HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
24
+ this.salonReviews = [...allReviews];
25
+ }
26
+ catch (e) { }
27
+ this.isLoading = false;
28
+ }
29
+ render() {
30
+ if (this.isLoading) {
31
+ return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index) => {
32
+ return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, h("div", { style: {
33
+ backgroundColor: Colors.Gray02,
34
+ borderRadius: '50px',
35
+ height: '48px',
36
+ width: '48px',
37
+ float: 'left',
38
+ } }), h("div", { style: {
39
+ backgroundColor: Colors.Gray01,
40
+ height: '16px',
41
+ width: '120px',
42
+ marginLeft: '16px',
43
+ marginTop: '14px',
44
+ float: 'left',
45
+ } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (h("div", { style: {
46
+ backgroundColor: Colors.Gray01,
47
+ height: '20px',
48
+ width: '20px',
49
+ marginRight: '8px',
50
+ float: 'left',
51
+ } })))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, h("div", { style: {
52
+ backgroundColor: Colors.Gray01,
53
+ height: '16px',
54
+ width: '132px',
55
+ } })), h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, h("div", { class: "salon-review--description", style: {
56
+ fontSize: '16px',
57
+ lineHeight: '26px',
58
+ overflow: 'hidden',
59
+ } }, h("div", { style: {
60
+ backgroundColor: Colors.Gray01,
61
+ height: '16px',
62
+ width: '240px',
63
+ float: 'left',
64
+ } })))))));
65
+ }))));
66
+ }
67
+ const ratingTexts = getRatingText();
68
+ return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
69
+ const { user } = review;
70
+ return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, h("user-avatar", { size: 48, name: h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: Colors.Gray04 }) }))), h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs_min(review.createdDate).format(shortDateYearFormat))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, h("div", { class: "salon-review--description", style: {
71
+ fontSize: '16px',
72
+ lineHeight: '26px',
73
+ overflow: 'hidden',
74
+ maxHeight: review.photos.length > 0 ? '52px' : '104px',
75
+ } }, review.title || review.description))), review.photos.length > 0 && (h("div", { style: {
76
+ display: 'flex',
77
+ flexDirection: 'row',
78
+ overflowX: 'auto',
79
+ } }, review.photos.map(photo => (h("div", { style: {
80
+ border: '1px solid #d9d9d9',
81
+ position: 'relative',
82
+ cursor: 'pointer',
83
+ borderRadius: '2px',
84
+ height: '66px',
85
+ marginTop: '12px',
86
+ marginRight: '12px',
87
+ } }, h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
88
+ }))));
89
+ }
90
+ };
91
+ SalonLatestReviews.style = indexCss;
92
+
93
+ export { SalonLatestReviews as salon_latest_reviews };
@@ -1,9 +1,9 @@
1
- import { r as registerInstance, h } from './index-0f8eed73.js';
2
- import { C as Colors } from './colors-1ec90c5f.js';
3
- import { H as HttpService } from './services-74d84ca9.js';
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { C as Colors } from './colors-ea36347a.js';
3
+ import { H as HttpService } from './services-40a3e622.js';
4
4
  import './_commonjsHelpers-098d5b27.js';
5
5
 
6
- const indexCss$1 = ".salon-loobooks--grid-item{float:left;max-width:150px}@media (max-width: 768px){salon-lookbook .view-header{display:block !important}salon-lookbook .salon-loobook--serch-result{margin-bottom:16px}salon-lookbook .salon-loobook--filter-wrapper>label,salon-lookbook .salon-loobook--sort-wrapper>label{display:none !important}}@media (min-width: 768px){.salon-loobooks--grid-item{max-width:200px}}";
6
+ const indexCss = "@media (max-width: 768px){salon-lookbook .view-header{display:block !important}salon-lookbook .salon-loobook--serch-result{margin-bottom:16px}salon-lookbook .salon-loobook--filter-wrapper>label,salon-lookbook .salon-loobook--sort-wrapper>label{display:none !important}}";
7
7
 
8
8
  const lookbookSortOptions = [{
9
9
  value: 'like',
@@ -19,16 +19,20 @@ const lookbookFilterOptions = [{
19
19
  value: 'all',
20
20
  label: 'All Category',
21
21
  }];
22
- let SalonLookbook = class {
22
+ const SalonLookbook = class {
23
23
  constructor(hostRef) {
24
24
  registerInstance(this, hostRef);
25
+ this.salonId = undefined;
25
26
  this.isLoading = true;
27
+ this.isLoadingMore = undefined;
28
+ this.hideLoadMore = undefined;
26
29
  this.currentPage = 1;
27
30
  this.totalLookbooks = 0;
28
31
  this.salonCategories = [];
29
32
  this.salonLookbooks = [];
30
33
  this.sortBy = lookbookSortOptions[1].value;
31
34
  this.filterBy = lookbookFilterOptions[0].value;
35
+ this.isLayoutSetup = undefined;
32
36
  }
33
37
  componentWillLoad() {
34
38
  this.fetchData();
@@ -54,19 +58,13 @@ let SalonLookbook = class {
54
58
  var masonry = new Macy({
55
59
  container: '#salon-loobooks--grid',
56
60
  useContainerForBreakpoints: true,
57
- margin: 12,
58
- columns: 7,
61
+ margin: 16,
62
+ columns: 5,
59
63
  breakAt: {
60
- 1200: {
61
- margin: 16,
62
- columns: 6,
63
- },
64
- 992: {
65
- margin: 16,
66
- columns: 5,
64
+ 1024: {
65
+ columns: 4,
67
66
  },
68
67
  768: {
69
- margin: 16,
70
68
  columns: 3,
71
69
  },
72
70
  576: {
@@ -118,7 +116,7 @@ let SalonLookbook = class {
118
116
  this.salonLookbooks = [];
119
117
  this.hideLoadMore = true;
120
118
  this.filterBy = filterBy;
121
- await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [this.filterBy] } : {}));
119
+ await this.fetchLookbooks(Object.assign({ page: this.currentPage, sort: this.sortBy }, this.filterBy !== 'all' ? { services: [Number(this.filterBy)] } : {}));
122
120
  if (window.masonry) {
123
121
  this.isLayoutSetup = false;
124
122
  }
@@ -158,10 +156,10 @@ let SalonLookbook = class {
158
156
  onClickLookbook(style) {
159
157
  const elLookbookModal = document.createElement('div');
160
158
  elLookbookModal.innerHTML = `
161
- <salon-lookbook-modal
159
+ <style-detail
162
160
  salon-id=${this.salonId}
163
161
  salon-lookbook='${JSON.stringify(style)}'
164
- ></salon-lookbook-modal>
162
+ ></style-detail>
165
163
  `;
166
164
  document.body.appendChild(elLookbookModal);
167
165
  }
@@ -195,53 +193,26 @@ let SalonLookbook = class {
195
193
  }
196
194
  render() {
197
195
  return (h("div", { class: "salon-loobooks" }, h("div", null, h("div", { class: "view-content" }, this.renderHeader(), this.salonLookbooks.length > 0 && (h("div", { class: "salon-loobooks--grid", id: "salon-loobooks--grid" }, this.salonLookbooks.map(style => {
198
- const { caption, fullImageUrlThumb, owner } = style;
196
+ const { caption, imageThumbMedium, owner } = style;
199
197
  return (h("div", { class: "salon-lookbook salon-loobooks--grid-item", onClick: () => this.onClickLookbook(style) }, h("div", { class: "card", style: {
200
198
  background: 'none',
201
199
  border: 'none',
202
- maxWidth: '200px',
200
+ // maxWidth: '200px',
203
201
  } }, h("div", { class: "salon-lookbook--image", style: {
204
202
  borderRadius: '8px',
205
203
  overflow: 'hidden',
206
204
  minHeight: '80px',
207
- background: Colors.Gray06,
208
- } }, h("img", { src: fullImageUrlThumb, alt: caption })), owner && (h("div", { class: "card-body", style: { paddingLeft: '0' } }, h("user-avatar", { name: owner.name, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
209
- })))), this.salonLookbooks.length > 0 && !this.hideLoadMore && (h("div", { class: "view-footer", style: { paddingTop: '16px', textAlign: 'center' } }, h("button", { type: "button", class: "btn btn-light", onClick: () => this.onLoadMore() }, this.isLoadingMore ? 'Loading' : 'Load more'))))));
210
- }
211
- };
212
- SalonLookbook.style = indexCss$1;
213
-
214
- const indexCss = "";
215
-
216
- let UserAvatar = class {
217
- constructor(hostRef) {
218
- registerInstance(this, hostRef);
219
- this.size = 24;
220
- }
221
- render() {
222
- return (h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (h("div", { style: {
223
- backgroundImage: `url("${this.avatar}")`,
224
- backgroundColor: Colors.Gray06,
225
- backgroundPosition: 'center center',
226
- backgroundSize: 'cover',
227
- borderRadius: '50%',
228
- height: `${this.size}px`,
229
- width: `${this.size}px`,
230
- minWidth: `${this.size}px`,
231
- } })), !this.avatar && (h("div", { style: {
232
- backgroundColor: Colors.Gray06,
233
- backgroundPosition: 'center center',
234
- backgroundSize: 'cover',
235
- borderRadius: '50%',
236
- display: 'flex',
237
- alignItems: 'center',
238
- justifyContent: 'center',
239
- height: `${this.size}px`,
240
- width: `${this.size}px`,
241
- minWidth: `${this.size}px`,
242
- } }, this.shortName)), h("div", { style: Object.assign({ flexShrink: '1', flexGrow: '1', marginLeft: '12px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, this.nameStyle) }, this.name)));
205
+ background: Colors.Gray01,
206
+ } }, 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 }))))));
207
+ })))), this.salonLookbooks.length > 0 && !this.hideLoadMore && (h("div", { class: "view-footer", style: { paddingTop: '16px', textAlign: 'center' } }, h("button", { type: "button", class: "btn btn-light btn-lg", onClick: () => this.onLoadMore(), style: {
208
+ background: Colors.White,
209
+ border: `1px solid ${Colors.Gray02}`,
210
+ borderRadius: '4px',
211
+ paddingLeft: '24px',
212
+ paddingRight: '24px',
213
+ } }, this.isLoadingMore ? 'Loading' : 'Load more'))))));
243
214
  }
244
215
  };
245
- UserAvatar.style = indexCss;
216
+ SalonLookbook.style = indexCss;
246
217
 
247
- export { SalonLookbook as salon_lookbook, UserAvatar as user_avatar };
218
+ export { SalonLookbook as salon_lookbook };
@@ -1,41 +1,42 @@
1
- import { r as registerInstance, h } from './index-0f8eed73.js';
2
- import { C as Colors } from './colors-1ec90c5f.js';
1
+ import { r as registerInstance, h } from './index-3fae868e.js';
2
+ import { C as Colors } from './colors-ea36347a.js';
3
3
 
4
4
  const indexCss = "salon-ranking{display:block}";
5
5
 
6
- let SalonRanking = class {
6
+ const SalonRanking = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
+ this.ranking = undefined;
9
10
  this.height = 16;
10
11
  this.width = 16;
11
12
  }
12
13
  getRankingData(ranking) {
13
14
  if (ranking === 5) {
14
15
  return {
15
- color: Colors.Danger,
16
+ color: Colors.Primary,
16
17
  text: 'Viral',
17
18
  };
18
19
  }
19
20
  if (ranking === 4) {
20
21
  return {
21
- color: Colors.Pink03,
22
+ color: Colors.Orange03,
22
23
  text: 'Advancing',
23
24
  };
24
25
  }
25
26
  if (ranking === 3) {
26
27
  return {
27
- color: Colors.Orange03,
28
+ color: Colors.Lilac03,
28
29
  text: 'Progressing',
29
30
  };
30
31
  }
31
32
  if (ranking === 2) {
32
33
  return {
33
- color: Colors.DarkBlue03,
34
+ color: Colors.Blue03,
34
35
  text: 'Building',
35
36
  };
36
37
  }
37
38
  return {
38
- color: Colors.Gray01,
39
+ color: Colors.Gray05,
39
40
  text: 'Starting',
40
41
  };
41
42
  }