favesalon-embed 0.0.2 → 0.1.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 (240) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
  3. package/dist/cjs/colors-38421769.js +69 -0
  4. package/dist/cjs/favesalon-embed.cjs.js +20 -0
  5. package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
  6. package/dist/cjs/google-map_5.cjs.entry.js +291 -0
  7. package/dist/cjs/index-7f190886.js +4396 -0
  8. package/{cjs/index-7d179a70.js → dist/cjs/index-e6bea8f5.js} +87 -3
  9. package/{cjs → dist/cjs}/index.cjs.js +0 -0
  10. package/dist/cjs/loader.cjs.js +22 -0
  11. package/dist/cjs/salon-booking-modal.cjs.entry.js +29 -0
  12. package/dist/cjs/salon-booking.cjs.entry.js +50 -0
  13. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
  14. package/dist/cjs/salon-gift-card.cjs.entry.js +50 -0
  15. package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
  16. package/dist/cjs/salon-lookbook.cjs.entry.js +218 -0
  17. package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +7 -7
  18. package/dist/cjs/salon-reviews.cjs.entry.js +186 -0
  19. package/dist/cjs/salon-services.cjs.entry.js +78 -0
  20. package/dist/cjs/salon-stylists.cjs.entry.js +112 -0
  21. package/{cjs/services-d6f8214c.js → dist/cjs/services-eee8f251.js} +317 -361
  22. package/dist/cjs/style-detail.cjs.entry.js +310 -0
  23. package/{cjs → dist/cjs}/user-avatar.cjs.entry.js +4 -4
  24. package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
  25. package/{collection → dist/collection}/collection-manifest.json +2 -2
  26. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  27. package/{collection → dist/collection}/components/google-map/index.css +0 -1
  28. package/dist/collection/components/google-map/index.js +86 -0
  29. package/{collection → dist/collection}/components/salon-booking/index.css +10 -24
  30. package/{collection → dist/collection}/components/salon-booking/index.js +29 -11
  31. package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +12 -6
  32. package/dist/collection/components/salon-gift-card/index.css +25 -0
  33. package/{collection → dist/collection}/components/salon-gift-card/index.js +44 -6
  34. package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +30 -4
  35. package/{collection/components/salon-locations → dist/collection/components/salon-info}/index.css +0 -0
  36. package/{collection → dist/collection}/components/salon-info/index.js +6 -32
  37. package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -3
  38. package/dist/collection/components/salon-latest-reviews/index.js +176 -0
  39. package/dist/collection/components/salon-latest-styles/index.css +10 -0
  40. package/dist/collection/components/salon-latest-styles/index.js +178 -0
  41. package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +6 -6
  42. package/dist/collection/components/salon-locations/index.js +151 -0
  43. package/dist/collection/components/salon-lookbook/index.css +12 -0
  44. package/{collection → dist/collection}/components/salon-lookbook/index.js +122 -49
  45. package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
  46. package/{collection → dist/collection}/components/salon-ranking/index.js +5 -5
  47. package/dist/collection/components/salon-reviews/index.css +15 -0
  48. package/dist/collection/components/salon-reviews/index.js +286 -0
  49. package/dist/collection/components/salon-schedules/index.css +15 -0
  50. package/dist/collection/components/salon-schedules/index.js +189 -0
  51. package/{collection/components/salon-reviews → dist/collection/components/salon-services}/index.css +0 -0
  52. package/dist/collection/components/salon-services/index.js +156 -0
  53. package/{collection → dist/collection}/components/salon-stylists/index.css +0 -8
  54. package/dist/collection/components/salon-stylists/index.js +183 -0
  55. package/dist/collection/components/style-detail/index.css +62 -0
  56. package/dist/collection/components/style-detail/index.js +461 -0
  57. package/{collection/components/salon-services → dist/collection/components/user-avatar}/index.css +0 -0
  58. package/{collection → dist/collection}/components/user-avatar/index.js +2 -2
  59. package/dist/collection/constants/colors.js +65 -0
  60. package/{collection → dist/collection}/global/global.js +0 -0
  61. package/{collection → dist/collection}/index.js +0 -0
  62. package/dist/collection/services/services.js +174 -0
  63. package/dist/collection/types/common.js +11 -0
  64. package/{collection → dist/collection}/types/review.js +9 -5
  65. package/dist/collection/types/salon.js +58 -0
  66. package/{collection → dist/collection}/types/service.js +0 -0
  67. package/dist/collection/types/style.js +128 -0
  68. package/dist/collection/types/stylist.js +30 -0
  69. package/{collection/components/user-avatar/index.css → dist/collection/types/tmp.js} +0 -0
  70. package/{collection → dist/collection}/types/user.js +2 -2
  71. package/{collection → dist/collection}/utils/utils.js +0 -0
  72. package/{custom-elements → dist/custom-elements}/index.d.ts +12 -12
  73. package/{custom-elements → dist/custom-elements}/index.js +5783 -870
  74. package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
  75. package/dist/esm/colors-ea36347a.js +67 -0
  76. package/dist/esm/favesalon-embed.js +18 -0
  77. package/{esm → dist/esm}/global-e1089ffd.js +0 -0
  78. package/dist/esm/google-map_5.entry.js +283 -0
  79. package/{esm/index-2160b80b.js → dist/esm/index-6af0a03d.js} +87 -4
  80. package/dist/esm/index-80523fec.js +4393 -0
  81. package/{esm → dist/esm}/index.js +0 -0
  82. package/dist/esm/loader.js +18 -0
  83. package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  84. package/{esm → dist/esm}/polyfills/css-shim.js +0 -0
  85. package/{esm → dist/esm}/polyfills/dom.js +0 -0
  86. package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  87. package/{esm → dist/esm}/polyfills/index.js +0 -0
  88. package/{esm → dist/esm}/polyfills/system.js +0 -0
  89. package/dist/esm/salon-booking-modal.entry.js +25 -0
  90. package/dist/esm/salon-booking.entry.js +46 -0
  91. package/dist/esm/salon-gift-card-modal.entry.js +24 -0
  92. package/dist/esm/salon-gift-card.entry.js +46 -0
  93. package/dist/esm/salon-latest-reviews.entry.js +91 -0
  94. package/dist/esm/salon-lookbook.entry.js +214 -0
  95. package/{esm → dist/esm}/salon-ranking.entry.js +7 -7
  96. package/dist/esm/salon-reviews.entry.js +182 -0
  97. package/dist/esm/salon-services.entry.js +74 -0
  98. package/dist/esm/salon-stylists.entry.js +108 -0
  99. package/{esm/services-57fadd0a.js → dist/esm/services-295247b1.js} +310 -355
  100. package/dist/esm/style-detail.entry.js +306 -0
  101. package/{esm → dist/esm}/user-avatar.entry.js +4 -4
  102. package/{esm → dist/esm}/utils-e97485e0.js +0 -0
  103. package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
  104. package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
  105. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
  106. package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
  107. package/dist/favesalon-embed/p-292b97ba.entry.js +1 -0
  108. package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
  109. package/dist/favesalon-embed/p-4869dfed.entry.js +1 -0
  110. package/{favesalon-embed → dist/favesalon-embed}/p-4a5eca9a.js +0 -0
  111. package/dist/favesalon-embed/p-4aee4fd9.entry.js +1 -0
  112. package/dist/favesalon-embed/p-5528c705.entry.js +1 -0
  113. package/dist/favesalon-embed/p-612ad685.entry.js +1 -0
  114. package/dist/favesalon-embed/p-75aef7e0.entry.js +1 -0
  115. package/dist/favesalon-embed/p-8c780874.entry.js +1 -0
  116. package/dist/favesalon-embed/p-8dbf04c5.js +1 -0
  117. package/dist/favesalon-embed/p-9f31061a.entry.js +1 -0
  118. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  119. package/dist/favesalon-embed/p-a60d78e9.entry.js +1 -0
  120. package/dist/favesalon-embed/p-a6debdae.entry.js +1 -0
  121. package/dist/favesalon-embed/p-bad1e9a7.entry.js +1 -0
  122. package/dist/favesalon-embed/p-c2ecb365.js +1 -0
  123. package/dist/favesalon-embed/p-c7dea70c.entry.js +1 -0
  124. package/dist/favesalon-embed/p-d6083940.js +1 -0
  125. package/dist/favesalon-embed/p-f0e14641.entry.js +1 -0
  126. package/dist/favesalon-embed/p-fc9a5551.js +6 -0
  127. package/{index.cjs.js → dist/index.cjs.js} +0 -0
  128. package/{index.js → dist/index.js} +0 -0
  129. package/dist/types/components/google-map/index.d.ts +5 -0
  130. package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
  131. package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
  132. package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
  133. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
  134. package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
  135. package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
  136. package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
  137. package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
  138. package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
  139. package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
  140. package/dist/types/components/salon-reviews/index.d.ts +24 -0
  141. package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
  142. package/{types → dist/types}/components/salon-services/index.d.ts +2 -0
  143. package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
  144. package/dist/types/components/style-detail/index.d.ts +24 -0
  145. package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
  146. package/{types → dist/types}/components.d.ts +62 -41
  147. package/dist/types/constants/colors.d.ts +65 -0
  148. package/{types → dist/types}/index.d.ts +0 -0
  149. package/dist/types/services/services.d.ts +60 -0
  150. package/{types → dist/types}/stencil-public-runtime.d.ts +0 -0
  151. package/dist/types/types/common.d.ts +11 -0
  152. package/{types → dist/types}/types/review.d.ts +4 -0
  153. package/{types → dist/types}/types/salon.d.ts +3 -1
  154. package/{types → dist/types}/types/service.d.ts +0 -0
  155. package/dist/types/types/style.d.ts +88 -0
  156. package/{types → dist/types}/types/stylist.d.ts +2 -1
  157. package/dist/types/types/tmp.d.ts +0 -0
  158. package/{types → dist/types}/types/user.d.ts +2 -2
  159. package/{types → dist/types}/utils/utils.d.ts +0 -0
  160. package/loader/cdn.js +3 -0
  161. package/loader/index.cjs.js +3 -0
  162. package/loader/index.d.ts +12 -0
  163. package/loader/index.es2017.js +3 -0
  164. package/loader/index.js +4 -0
  165. package/loader/package.json +10 -0
  166. package/package.json +18 -13
  167. package/readme.md +23 -2
  168. package/cjs/colors-7f354880.js +0 -95
  169. package/cjs/favesalon-embed.cjs.js +0 -20
  170. package/cjs/google-map.cjs.entry.js +0 -47
  171. package/cjs/loader.cjs.js +0 -22
  172. package/cjs/salon-booking-modal.cjs.entry.js +0 -23
  173. package/cjs/salon-booking_2.cjs.entry.js +0 -56
  174. package/cjs/salon-contact_4.cjs.entry.js +0 -154
  175. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
  176. package/cjs/salon-info.cjs.entry.js +0 -34
  177. package/cjs/salon-latest-reviews.cjs.entry.js +0 -57
  178. package/cjs/salon-lookbook.cjs.entry.js +0 -187
  179. package/cjs/salon-reviews.cjs.entry.js +0 -196
  180. package/cjs/salon-services.cjs.entry.js +0 -40
  181. package/cjs/salon-stylists.cjs.entry.js +0 -53
  182. package/collection/components/google-map/index.js +0 -97
  183. package/collection/components/salon-contact/index.js +0 -88
  184. package/collection/components/salon-gift-card/index.css +0 -25
  185. package/collection/components/salon-info/index.css +0 -3
  186. package/collection/components/salon-latest-reviews/index.js +0 -108
  187. package/collection/components/salon-locations/index.js +0 -80
  188. package/collection/components/salon-lookbook/index.css +0 -12
  189. package/collection/components/salon-reviews/index.js +0 -291
  190. package/collection/components/salon-schedules/index.css +0 -14
  191. package/collection/components/salon-schedules/index.js +0 -103
  192. package/collection/components/salon-services/index.js +0 -86
  193. package/collection/components/salon-styles/index.css +0 -23
  194. package/collection/components/salon-styles/index.js +0 -100
  195. package/collection/components/salon-stylists/index.js +0 -96
  196. package/collection/constants/colors.js +0 -91
  197. package/collection/services/services.js +0 -203
  198. package/collection/types/common.js +0 -2
  199. package/collection/types/salon.js +0 -52
  200. package/collection/types/style.js +0 -28
  201. package/collection/types/stylist.js +0 -13
  202. package/esm/colors-1ec90c5f.js +0 -93
  203. package/esm/favesalon-embed.js +0 -18
  204. package/esm/google-map.entry.js +0 -43
  205. package/esm/loader.js +0 -18
  206. package/esm/salon-booking-modal.entry.js +0 -19
  207. package/esm/salon-booking_2.entry.js +0 -51
  208. package/esm/salon-contact_4.entry.js +0 -147
  209. package/esm/salon-gift-card-modal.entry.js +0 -16
  210. package/esm/salon-info.entry.js +0 -30
  211. package/esm/salon-latest-reviews.entry.js +0 -53
  212. package/esm/salon-lookbook.entry.js +0 -183
  213. package/esm/salon-reviews.entry.js +0 -192
  214. package/esm/salon-services.entry.js +0 -36
  215. package/esm/salon-stylists.entry.js +0 -49
  216. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  217. package/favesalon-embed/p-14a46adf.entry.js +0 -1
  218. package/favesalon-embed/p-2da2ed75.js +0 -1
  219. package/favesalon-embed/p-3712d9ab.entry.js +0 -1
  220. package/favesalon-embed/p-38066f9f.entry.js +0 -1
  221. package/favesalon-embed/p-4e2d7b29.js +0 -1
  222. package/favesalon-embed/p-520c8ffb.entry.js +0 -1
  223. package/favesalon-embed/p-54a1c294.entry.js +0 -1
  224. package/favesalon-embed/p-762520f2.js +0 -1
  225. package/favesalon-embed/p-94a0991e.entry.js +0 -1
  226. package/favesalon-embed/p-94b179eb.entry.js +0 -1
  227. package/favesalon-embed/p-977bd8bc.entry.js +0 -1
  228. package/favesalon-embed/p-bc363938.entry.js +0 -1
  229. package/favesalon-embed/p-bf9c83a3.entry.js +0 -1
  230. package/favesalon-embed/p-c5ebd3c9.entry.js +0 -1
  231. package/favesalon-embed/p-d84b61b0.entry.js +0 -1
  232. package/favesalon-embed/p-f15bcb43.entry.js +0 -1
  233. package/types/components/google-map/index.d.ts +0 -10
  234. package/types/components/salon-contact/index.d.ts +0 -9
  235. package/types/components/salon-reviews/index.d.ts +0 -23
  236. package/types/components/salon-styles/index.d.ts +0 -9
  237. package/types/constants/colors.d.ts +0 -88
  238. package/types/services/services.d.ts +0 -24
  239. package/types/types/common.d.ts +0 -2
  240. package/types/types/style.d.ts +0 -49
@@ -1,19 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
-
3
- 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
-
5
- let SalonBookingModal = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.primaryColor = '#d47b99';
9
- this.redirectUrl = window.btoa(window.location.href);
10
- this.isModalOpen = true;
11
- }
12
- render() {
13
- const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
14
- 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.isModalOpen = false }), h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }), 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}` })))))));
15
- }
16
- };
17
- SalonBookingModal.style = indexCss;
18
-
19
- export { SalonBookingModal as salon_booking_modal };
@@ -1,51 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
-
3
- const indexCss$1 = ".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
-
5
- let SalonBooking = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.buttonText = 'Book now';
9
- this.buttonClass = 'btn btn-primary';
10
- this.primaryColor = '#d47b99';
11
- }
12
- openModal() {
13
- const elBookingModal = document.createElement('div');
14
- elBookingModal.innerHTML = `
15
- <salon-booking-modal
16
- salon-id=${this.salonId}
17
- primary-color=${this.primaryColor}
18
- ></salon-booking-modal>
19
- `;
20
- document.body.appendChild(elBookingModal);
21
- }
22
- render() {
23
- return (h("div", { class: "salon-booking" }, h("div", { class: "salon-booking--button" }, h("button", { type: "button", class: this.buttonClass, onClick: () => this.openModal() }, this.buttonText))));
24
- }
25
- };
26
- SalonBooking.style = indexCss$1;
27
-
28
- 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}";
29
-
30
- let SalonGiftCard = class {
31
- constructor(hostRef) {
32
- registerInstance(this, hostRef);
33
- this.buttonText = 'Buy Gift card';
34
- this.buttonClass = 'btn btn-primary';
35
- }
36
- openModal() {
37
- const elBookingModal = document.createElement('div');
38
- elBookingModal.innerHTML = `
39
- <salon-gift-card-modal
40
- salon-id=${this.salonId}
41
- ></salon-gift-card-modal>
42
- `;
43
- document.body.appendChild(elBookingModal);
44
- }
45
- render() {
46
- return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button", { type: "button", class: this.buttonClass, onClick: () => this.openModal() }, this.buttonText))));
47
- }
48
- };
49
- SalonGiftCard.style = indexCss;
50
-
51
- export { SalonBooking as salon_booking, SalonGiftCard as salon_gift_card };
@@ -1,147 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
- import { C as Colors } from './colors-1ec90c5f.js';
3
- import { f as formatWebsiteUrl, a as formatFullAddress } from './utils-e97485e0.js';
4
- import { H as HttpService, B as BusinessHourStatus } from './services-57fadd0a.js';
5
-
6
- const indexCss$3 = "@media (min-width: 768px){.salon-contact--links{overflow:hidden;margin-left:-32px}.salon-contact--links .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px;margin-top:8px}.salon-contact--links .salon-contact--links-item:nth-child(2n+1){clear:left}}";
7
-
8
- let SalonContact = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- }
12
- componentWillLoad() {
13
- if (this.salonInfo) {
14
- this.salonInfoState = JSON.parse(this.salonInfo);
15
- }
16
- else {
17
- this.fetchData();
18
- }
19
- }
20
- fetchData() {
21
- try {
22
- HttpService().fetchSalonInfo(this.salonId)
23
- .then(salonInfo => this.salonInfoState = salonInfo);
24
- }
25
- catch (e) { }
26
- }
27
- render() {
28
- const { about, email, website, businessPhone, } = (this.salonInfoState || {});
29
- const websiteUrl = formatWebsiteUrl(website);
30
- return (h("div", { class: "view view--salon-contact" }, h("div", { class: "view-content" }, h("div", { style: { fontSize: '16px', fontWeight: 'bold' } }, "Contact info"), h("div", { class: "salon-contact--links" }, businessPhone && (h("div", { class: "salon-contact--links-item" }, h("i", { class: "ri-phone-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }), " ", businessPhone)), websiteUrl && (h("div", { class: "salon-contact--links-item" }, h("i", { class: "ri-links-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }), " ", h("a", { target: websiteUrl && websiteUrl.indexOf(window.location.hostname) === -1 ? '_blank' : undefined, href: websiteUrl, style: { color: Colors.Gray01, textDecoration: 'none' } }, websiteUrl))), email && (h("div", { class: "salon-contact--links-item" }, h("i", { class: "ri-mail-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }), " ", h("a", { href: `mailto:${email}`, style: { color: Colors.Gray01, textDecoration: 'none' } }, email)))), h("div", { class: "salon-contact--info--desc", style: { fontSize: '16px', marginTop: '16px' }, innerHTML: about }))));
31
- }
32
- };
33
- SalonContact.style = indexCss$3;
34
-
35
- const indexCss$2 = "";
36
-
37
- let SalonLocations = class {
38
- constructor(hostRef) {
39
- registerInstance(this, hostRef);
40
- }
41
- componentWillLoad() {
42
- if (this.salonInfo) {
43
- this.salonInfoState = JSON.parse(this.salonInfo);
44
- }
45
- else {
46
- this.fetchData();
47
- }
48
- }
49
- fetchData() {
50
- try {
51
- HttpService().fetchSalonInfo(this.salonId)
52
- .then(salonInfo => this.salonInfoState = salonInfo);
53
- }
54
- catch (e) { }
55
- }
56
- render() {
57
- const { businessLocationLat: lat, businessLocationLng: lng } = this.salonInfoState || {};
58
- return (h("div", { class: "view view--salon-locations" }, h("div", { class: "view-content", style: { height: '380px' } }, h("div", { style: {
59
- fontSize: '16px',
60
- lineHeight: '26px',
61
- maxHeight: '52px',
62
- marginBottom: '16px',
63
- overflow: 'hidden',
64
- textOverflow: 'ellipsis',
65
- } }, formatFullAddress(this.salonInfoState)), h("div", { class: "view--salon-info--map", style: { height: '264px' } }, lat && lng && h("google-map", { lat: lat, lng: lng })))));
66
- }
67
- };
68
- SalonLocations.style = indexCss$2;
69
-
70
- const indexCss$1 = "@media (min-width: 768px){.salon-schedules--dates{overflow:hidden;margin-left:-32px}.salon-schedules--dates .salon-schedules--day{float:left;display:flex;flex-direction:row;min-width:240px;padding-left:32px}}";
71
-
72
- let SalonSchedules = class {
73
- constructor(hostRef) {
74
- registerInstance(this, hostRef);
75
- }
76
- componentWillLoad() {
77
- if (this.salonInfo) {
78
- this.salonInfoState = JSON.parse(this.salonInfo);
79
- }
80
- else {
81
- this.fetchData();
82
- }
83
- }
84
- fetchData() {
85
- try {
86
- HttpService().fetchSalonInfo(this.salonId)
87
- .then(salonInfo => this.salonInfoState = salonInfo);
88
- }
89
- catch (e) { }
90
- }
91
- renderBusinessHour(businessHour) {
92
- if (businessHour.status === BusinessHourStatus.ByAppointment) {
93
- return 'By Appointment';
94
- }
95
- if (businessHour.status === BusinessHourStatus.Close) {
96
- return 'Close';
97
- }
98
- return `${businessHour.openTime} - ${businessHour.closeTime}`;
99
- }
100
- render() {
101
- const businessHours = (this.salonInfoState && this.salonInfoState.businessHours) || [];
102
- return (h("div", { class: "view view--salon-schedules" }, h("div", { class: "view-content" }, businessHours.length > 0 && (h("div", { class: "salon-schedules" }, h("div", { style: { fontSize: '16px', fontWeight: 'bold' } }, "Working hours"), h("div", { class: "salon-schedules--dates" }, h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Mon"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[0]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Tue"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[1]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Wed"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[2]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Thur"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[3]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Fri"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[4]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sat"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[5]))), h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sun"), h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[6])))))))));
103
- }
104
- };
105
- SalonSchedules.style = indexCss$1;
106
-
107
- const indexCss = ".salon-styles--item-background{-moz-filter:blur(32px);-webkit-filter:blur(32px);filter:blur(32px)}.salon-styles--item .salon-styles--item-background{z-index:1}.salon-styles--item .salon-styles--item-image{position:relative;z-index:2}.salon-styles--item .carousel-caption{padding-bottom:0;z-index:2}.salon-styles--slides .carousel-control-prev{z-index:2}";
108
-
109
- let SalonStyles = class {
110
- constructor(hostRef) {
111
- registerInstance(this, hostRef);
112
- }
113
- componentDidLoad() {
114
- this.fetchData();
115
- }
116
- async fetchData() {
117
- try {
118
- const promises = [
119
- HttpService().fetchSalonPhotos(this.salonId).then(salonStyles => this.firstPageStyles = salonStyles),
120
- HttpService().fetchAllSalonPhotos(this.salonId, { page: 2 }).then(nestPageStyles => this.nestPageStyles = nestPageStyles),
121
- ];
122
- return Promise.all(promises);
123
- }
124
- catch (e) { }
125
- }
126
- render() {
127
- return (h("div", { class: "view view--salon-styles" }, h("div", { class: "view-content" }, h("div", { class: "salon-styles--slides" }, h("div", { id: "salon-styles-carousel", class: "carousel slide", "data-bs-ride": "carousel" }, h("div", { class: "carousel-inner" }, (this.firstPageStyles || []).concat(this.nestPageStyles || []).map((photo, index) => {
128
- const { caption, description,
129
- // mediaType,
130
- fullImageUrl, fullImageUrlThumb, fullImageUrlMedium, imgWidth, imgHeight, } = photo;
131
- const isLandscape = imgWidth > imgHeight;
132
- return (h("div", { class: `carousel-item salon-styles--item ${index === 0 ? 'active' : ''}` }, h("div", { class: "salon-styles--item", style: {
133
- flexDirection: isLandscape ? 'column' : 'row',
134
- justifyContent: 'center',
135
- alignItems: 'center',
136
- overflow: 'hidden',
137
- position: 'relative',
138
- display: 'flex',
139
- height: '380px',
140
- borderRadius: '8px',
141
- } }, h("div", { class: "salon-styles--item-background", style: Object.assign(Object.assign({}, fullImageUrlThumb ? { backgroundImage: `url(${fullImageUrlThumb})` } : {}), { backgroundColor: Colors.Gray06, backgroundPosition: 'center', backgroundRepeat: 'no-repeat', backgroundSize: 'cover', position: 'absolute', bottom: '0px', right: '0px', left: '0px', top: '0px' }) }), h("img", { alt: caption, class: "salon-styles--item-image", src: fullImageUrlMedium || fullImageUrl, style: Object.assign({ display: 'inline-block' }, isLandscape ? { width: '100%' } : { height: '100%' }) }), h("div", { class: "carousel-caption d-none d-md-block" }, caption && h("h5", null, caption), description && h("p", null, description)))));
142
- })), h("button", { type: "button", "data-bs-slide": "prev", class: "carousel-control-prev", "data-bs-target": "#salon-styles-carousel" }, h("span", { class: "carousel-control-prev-icon", "aria-hidden": "true" }), h("span", { class: "visually-hidden" }, "Previous")), h("button", { type: "button", "data-bs-slide": "next", class: "carousel-control-next", "data-bs-target": "#salon-styles-carousel" }, h("span", { class: "carousel-control-next-icon", "aria-hidden": "true" }), h("span", { class: "visually-hidden" }, "Next")))))));
143
- }
144
- };
145
- SalonStyles.style = indexCss;
146
-
147
- export { SalonContact as salon_contact, SalonLocations as salon_locations, SalonSchedules as salon_schedules, SalonStyles as salon_styles };
@@ -1,16 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
-
3
- 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}";
4
-
5
- let SalonGiftCardModal = class {
6
- constructor(hostRef) {
7
- registerInstance(this, hostRef);
8
- this.isModalOpen = true;
9
- }
10
- render() {
11
- 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.isModalOpen = false }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }), h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/salon/detail/${this.salonId}/gift-cards.html` })))))));
12
- }
13
- };
14
- SalonGiftCardModal.style = indexCss;
15
-
16
- export { SalonGiftCardModal as salon_gift_card_modal };
@@ -1,30 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
- import { H as HttpService } from './services-57fadd0a.js';
3
- import { C as Colors } from './colors-1ec90c5f.js';
4
-
5
- const indexCss = ".salon-info .view--salon-styles .view-content{padding:0}";
6
-
7
- let SalonInfo = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.backgroundColor = Colors.Gray06;
11
- }
12
- componentWillLoad() {
13
- this.fetchData();
14
- }
15
- async fetchData() {
16
- try {
17
- this.salonInfo = await HttpService().fetchSalonInfo(this.salonId);
18
- }
19
- catch (e) { }
20
- }
21
- render() {
22
- if (this.salonInfo) {
23
- return (h("div", { class: "salon-info", style: { background: this.backgroundColor } }, h("div", { class: "row" }, h("div", { class: "col-md-5", style: { marginBottom: '24px' } }, h("salon-locations", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "col-md-7", style: { marginBottom: '24px' } }, h("salon-styles", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))), h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } }, h("salon-schedules", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "salon-info--contact" }, h("salon-contact", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))));
24
- }
25
- return (h("div", { class: "salon-info", style: { padding: '24px', textAlign: 'center' } }, "Loading..."));
26
- }
27
- };
28
- SalonInfo.style = indexCss;
29
-
30
- export { SalonInfo as salon_info };
@@ -1,53 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
- import { H as HttpService, d as dayjs_min, s as shortDate } from './services-57fadd0a.js';
3
- import { C as Colors } from './colors-1ec90c5f.js';
4
- import { g as getRatingText } from './utils-e97485e0.js';
5
-
6
- const indexCss = ".salon-latest-reviews .salon-review{min-width:280px}@media (min-width: 768px){.salon-latest-reviews .salon-review{min-width:300px}}";
7
-
8
- let SalonLatestReviews = class {
9
- constructor(hostRef) {
10
- registerInstance(this, hostRef);
11
- this.salonReviews = [];
12
- }
13
- componentWillLoad() {
14
- this.fetchData();
15
- }
16
- async fetchData() {
17
- try {
18
- const { allItems } = await HttpService().fetchSalonReviews(this.salonId, { noLoop: true });
19
- this.salonReviews = [...allItems];
20
- }
21
- catch (e) { }
22
- }
23
- render() {
24
- const ratingTexts = getRatingText();
25
- return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
26
- const { user } = review;
27
- return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray05}`, 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: user.name, 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: {
28
- fontSize: '16px',
29
- marginRight: '4px',
30
- } }))), h("div", { class: "salon-review--rating--date", style: { color: Colors.Gray03, marginLeft: '16px' } }, dayjs_min(review.createdDate).format(shortDate))), 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: {
31
- fontSize: '16px',
32
- lineHeight: '26px',
33
- overflow: 'hidden',
34
- maxHeight: review.photos.length > 0 ? '52px' : '104px',
35
- } }, review.title || review.description))), review.photos.length > 0 && (h("div", { style: {
36
- display: 'flex',
37
- flexDirection: 'row',
38
- overflowX: 'auto',
39
- } }, review.photos.map(photo => (h("div", { style: {
40
- border: '1px solid #d9d9d9',
41
- position: 'relative',
42
- cursor: 'pointer',
43
- borderRadius: '2px',
44
- height: '66px',
45
- marginTop: '16px',
46
- marginRight: '16px',
47
- } }, h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
48
- }))));
49
- }
50
- };
51
- SalonLatestReviews.style = indexCss;
52
-
53
- export { SalonLatestReviews as salon_latest_reviews };
@@ -1,183 +0,0 @@
1
- import { r as registerInstance, h } from './index-2160b80b.js';
2
- import { C as Colors } from './colors-1ec90c5f.js';
3
- import { H as HttpService } from './services-57fadd0a.js';
4
-
5
- const indexCss = ".salon-loobooks--grid-item{float:left;max-width:150px}@media (min-width: 768px){.salon-loobooks--grid-item{max-width:200px}}";
6
-
7
- const lookbookSortOptions = [{
8
- value: 'like',
9
- label: 'Most popular',
10
- }, {
11
- value: 'newest',
12
- label: 'Newest first',
13
- }, {
14
- value: 'oldest',
15
- label: 'Oldest first',
16
- }];
17
- const lookbookFilterOptions = [{
18
- value: 'all',
19
- label: 'All Category',
20
- }];
21
- let SalonLookbook = class {
22
- constructor(hostRef) {
23
- registerInstance(this, hostRef);
24
- this.isLoading = true;
25
- this.currentPage = 1;
26
- this.totalLookbooks = 0;
27
- this.salonCategories = [];
28
- this.salonLookbooks = [];
29
- }
30
- componentWillLoad() {
31
- this.fetchData();
32
- this.injectSDK();
33
- }
34
- componentDidRender() {
35
- this.setupGridLayout();
36
- }
37
- injectSDK() {
38
- return new Promise((resolve) => {
39
- const script = document.createElement('script');
40
- script.type = 'text/javascript';
41
- script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
42
- document.body.appendChild(script);
43
- return resolve(true);
44
- });
45
- }
46
- setupGridLayout() {
47
- if (!this.isLayoutSetup && document.querySelector('#salon-loobooks--grid')) {
48
- const script = document.createElement('script');
49
- script.type = 'text/javascript';
50
- script.innerHTML = `
51
- var masonry = new Macy({
52
- container: '#salon-loobooks--grid',
53
- useContainerForBreakpoints: true,
54
- margin: 12,
55
- columns: 7,
56
- breakAt: {
57
- 1200: {
58
- margin: 16,
59
- columns: 6,
60
- },
61
- 992: {
62
- margin: 16,
63
- columns: 5,
64
- },
65
- 768: {
66
- margin: 16,
67
- columns: 3,
68
- },
69
- 576: {
70
- margin: 16,
71
- columns: 2,
72
- },
73
- },
74
- });
75
- `;
76
- document.body.appendChild(script);
77
- this.isLayoutSetup = true;
78
- }
79
- }
80
- async fetchData() {
81
- try {
82
- const promises = [
83
- this.fetchLookbooks({ page: 1 }),
84
- this.fetchCategories(),
85
- ];
86
- return Promise.all(promises);
87
- }
88
- catch (e) { }
89
- }
90
- async fetchLookbooks(options, isLoadingMore) {
91
- if (isLoadingMore) {
92
- this.isLoadingMore = true;
93
- }
94
- else {
95
- this.isLoading = true;
96
- }
97
- try {
98
- const { total, allLookbooks } = await HttpService().fetchSalonLookbooks(this.salonId, options);
99
- this.totalLookbooks = total;
100
- this.salonLookbooks = this.salonLookbooks.concat(allLookbooks);
101
- this.hideLoadMore = allLookbooks.length < 20;
102
- }
103
- catch (error) { }
104
- if (isLoadingMore) {
105
- this.isLoadingMore = false;
106
- }
107
- else {
108
- this.isLoading = false;
109
- }
110
- }
111
- async onLoadMore() {
112
- try {
113
- this.currentPage += 1;
114
- await this.fetchLookbooks({ page: this.currentPage }, true);
115
- if (window.masonry) {
116
- this.isLayoutSetup = false;
117
- }
118
- }
119
- catch (error) { }
120
- }
121
- async fetchCategories() {
122
- try {
123
- this.salonCategories = await HttpService().fetchSalonCategories();
124
- }
125
- catch (error) { }
126
- }
127
- renderHeader() {
128
- const allFilterOptions = lookbookFilterOptions.concat(([...this.salonCategories]).map(category => {
129
- return {
130
- value: category.id,
131
- label: category.name,
132
- };
133
- }));
134
- return (h("div", { class: "view-header", style: {
135
- display: 'flex',
136
- flexDirection: 'row',
137
- justifyContent: 'space-between',
138
- alignItems: 'center',
139
- marginBottom: '24px',
140
- } }, h("div", null, this.totalLookbooks, " ", this.totalLookbooks === 1 ? 'result' : 'results'), h("div", { style: {
141
- display: 'flex',
142
- flexDirection: 'row',
143
- alignItems: 'center',
144
- } }, h("div", { style: {
145
- display: 'flex',
146
- flexDirection: 'row',
147
- alignItems: 'center',
148
- marginRight: '16px',
149
- } }, h("label", { style: { marginRight: '8px' } }, "Filter by"), h("select", {
150
- // placeholder="Filter by"
151
- // value={filterBy}
152
- // onChange={onChangeCategory}
153
- class: "form-select", style: { width: '160px' }
154
- }, allFilterOptions.map(filterOption => (h("option", { value: filterOption.value }, filterOption.label))))), h("div", { class: "search--header--sort-wrapper", style: {
155
- display: 'flex',
156
- flexDirection: 'row',
157
- alignItems: 'center',
158
- } }, h("label", { style: { marginRight: '8px' } }, "Sort by"), h("select", {
159
- // placeholder="Sort by"
160
- // value={sortBy}
161
- // onChange={onChangeSorting}
162
- class: "form-select", style: { width: '160px' }
163
- }, lookbookSortOptions.map(sortOption => (h("option", { value: sortOption.value }, sortOption.label))))))));
164
- }
165
- render() {
166
- return (h("div", { class: "salon-loobooks" }, this.salonLookbooks.length > 0 && (h("div", null, h("div", { class: "view-content" }, this.renderHeader(), h("div", { class: "salon-loobooks--grid", id: "salon-loobooks--grid" }, this.salonLookbooks.map(style => {
167
- const { caption, fullImageUrlThumb, owner } = style;
168
- return (h("div", { class: "salon-lookbook salon-loobooks--grid-item" }, h("div", { class: "card", style: {
169
- background: 'none',
170
- border: 'none',
171
- maxWidth: '200px',
172
- } }, h("div", { class: "salon-lookbook--image", style: {
173
- borderRadius: '8px',
174
- overflow: 'hidden',
175
- minHeight: '80px',
176
- background: Colors.Gray06,
177
- } }, 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 }))))));
178
- }))), !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')))))));
179
- }
180
- };
181
- SalonLookbook.style = indexCss;
182
-
183
- export { SalonLookbook as salon_lookbook };