favesalon-embed 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
  3. package/dist/cjs/chat-button.cjs.entry.js +118 -0
  4. package/dist/cjs/colors-38421769.js +69 -0
  5. package/dist/cjs/favesalon-embed.cjs.js +24 -0
  6. package/dist/cjs/google-map_5.cjs.entry.js +310 -0
  7. package/{cjs/index-7d179a70.js → dist/cjs/index-47c2a5f6.js} +587 -199
  8. package/dist/cjs/index-7f190886.js +4396 -0
  9. package/dist/cjs/loader.cjs.js +23 -0
  10. package/dist/cjs/relativeTime-3721080d.js +9 -0
  11. package/dist/cjs/salon-booking-modal.cjs.entry.js +30 -0
  12. package/dist/cjs/salon-booking.cjs.entry.js +51 -0
  13. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
  14. package/dist/cjs/salon-gift-card.cjs.entry.js +51 -0
  15. package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
  16. package/dist/cjs/salon-lookbook.cjs.entry.js +222 -0
  17. package/dist/cjs/salon-ranking.cjs.entry.js +60 -0
  18. package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
  19. package/dist/cjs/salon-services.cjs.entry.js +81 -0
  20. package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
  21. package/dist/cjs/services-125c82d8.js +21492 -0
  22. package/dist/cjs/style-detail.cjs.entry.js +312 -0
  23. package/dist/cjs/user-avatar.cjs.entry.js +45 -0
  24. package/dist/cjs/utils-c5a33b3c.js +23 -0
  25. package/{collection → dist/collection}/collection-manifest.json +5 -4
  26. package/dist/collection/components/chat-button/index.css +122 -0
  27. package/dist/collection/components/chat-button/index.js +218 -0
  28. package/dist/collection/components/chat-conversation/index.js +103 -0
  29. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  30. package/{collection → dist/collection}/components/google-map/index.css +0 -1
  31. package/dist/collection/components/google-map/index.js +90 -0
  32. package/{collection → dist/collection}/components/salon-booking/index.css +11 -20
  33. package/dist/collection/components/salon-booking/index.js +126 -0
  34. package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
  35. package/dist/collection/components/salon-gift-card/index.css +30 -0
  36. package/dist/collection/components/salon-gift-card/index.js +126 -0
  37. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
  38. package/dist/collection/components/salon-info/index.js +77 -0
  39. package/dist/collection/components/salon-latest-reviews/index.js +163 -0
  40. package/dist/collection/components/salon-latest-styles/index.css +12 -0
  41. package/dist/collection/components/salon-latest-styles/index.js +183 -0
  42. package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +7 -4
  43. package/dist/collection/components/salon-locations/index.js +143 -0
  44. package/dist/collection/components/salon-lookbook/index.css +15 -0
  45. package/dist/collection/components/salon-lookbook/index.js +368 -0
  46. package/dist/collection/components/salon-ranking/index.js +117 -0
  47. package/dist/collection/components/salon-reviews/index.css +18 -0
  48. package/dist/collection/components/salon-reviews/index.js +249 -0
  49. package/dist/collection/components/salon-schedules/index.css +18 -0
  50. package/dist/collection/components/salon-schedules/index.js +167 -0
  51. package/dist/collection/components/salon-services/index.css +1 -0
  52. package/dist/collection/components/salon-services/index.js +146 -0
  53. package/dist/collection/components/salon-stylists/index.js +184 -0
  54. package/dist/collection/components/style-detail/index.css +76 -0
  55. package/dist/collection/components/style-detail/index.js +386 -0
  56. package/dist/collection/components/user-avatar/index.js +134 -0
  57. package/dist/collection/constants/colors.js +65 -0
  58. package/dist/collection/mocks/users.js +10 -0
  59. package/dist/collection/services/services.js +295 -0
  60. package/dist/collection/types/chat.js +23 -0
  61. package/dist/collection/types/common.js +11 -0
  62. package/{collection → dist/collection}/types/review.js +9 -5
  63. package/dist/collection/types/salon.js +58 -0
  64. package/dist/collection/types/style.js +128 -0
  65. package/dist/collection/types/stylist.js +30 -0
  66. package/dist/collection/types/user.js +10 -0
  67. package/{custom-elements → dist/custom-elements}/index.d.ts +18 -12
  68. package/dist/custom-elements/index.js +28340 -0
  69. package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
  70. package/dist/esm/chat-button.entry.js +114 -0
  71. package/dist/esm/colors-ea36347a.js +67 -0
  72. package/dist/esm/favesalon-embed.js +19 -0
  73. package/dist/esm/google-map_5.entry.js +302 -0
  74. package/{esm/index-2160b80b.js → dist/esm/index-3fae868e.js} +586 -200
  75. package/dist/esm/index-80523fec.js +4393 -0
  76. package/dist/esm/index.js +1 -0
  77. package/dist/esm/loader.js +19 -0
  78. package/dist/esm/polyfills/css-shim.js +1 -0
  79. package/dist/esm/relativeTime-cd452e6d.js +7 -0
  80. package/dist/esm/salon-booking-modal.entry.js +26 -0
  81. package/dist/esm/salon-booking.entry.js +47 -0
  82. package/dist/esm/salon-gift-card-modal.entry.js +25 -0
  83. package/dist/esm/salon-gift-card.entry.js +47 -0
  84. package/dist/esm/salon-latest-reviews.entry.js +93 -0
  85. package/dist/esm/salon-lookbook.entry.js +218 -0
  86. package/dist/esm/salon-ranking.entry.js +56 -0
  87. package/dist/esm/salon-reviews.entry.js +189 -0
  88. package/dist/esm/salon-services.entry.js +77 -0
  89. package/dist/esm/salon-stylists.entry.js +114 -0
  90. package/dist/esm/services-40a3e622.js +21485 -0
  91. package/dist/esm/style-detail.entry.js +308 -0
  92. package/dist/esm/user-avatar.entry.js +41 -0
  93. package/dist/esm/utils-e97485e0.js +19 -0
  94. package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
  95. package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
  96. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
  97. package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
  98. package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
  99. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
  100. package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
  101. package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
  102. package/dist/favesalon-embed/p-22093506.entry.js +1 -0
  103. package/dist/favesalon-embed/p-32b314e9.js +2 -0
  104. package/dist/favesalon-embed/p-47e646f8.js +1 -0
  105. package/dist/favesalon-embed/p-4a5eca9a.js +6 -0
  106. package/dist/favesalon-embed/p-58d2e9be.js +1 -0
  107. package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
  108. package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
  109. package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
  110. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  111. package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
  112. package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
  113. package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
  114. package/dist/favesalon-embed/p-b630ae68.js +1580 -0
  115. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
  116. package/dist/favesalon-embed/p-d6083940.js +1 -0
  117. package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
  118. package/dist/favesalon-embed/p-fc9a5551.js +6 -0
  119. package/dist/types/components/chat-button/index.d.ts +24 -0
  120. package/dist/types/components/google-map/index.d.ts +5 -0
  121. package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
  122. package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
  123. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
  124. package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
  125. package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
  126. package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
  127. package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
  128. package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
  129. package/dist/types/components/salon-reviews/index.d.ts +24 -0
  130. package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
  131. package/{types → dist/types}/components/salon-services/index.d.ts +1 -0
  132. package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
  133. package/dist/types/components/style-detail/index.d.ts +24 -0
  134. package/{types → dist/types}/components.d.ts +82 -41
  135. package/dist/types/constants/colors.d.ts +65 -0
  136. package/dist/types/mocks/users.d.ts +10 -0
  137. package/dist/types/services/services.d.ts +75 -0
  138. package/{types → dist/types}/stencil-public-runtime.d.ts +85 -11
  139. package/dist/types/types/chat.d.ts +17 -0
  140. package/dist/types/types/common.d.ts +11 -0
  141. package/{types → dist/types}/types/review.d.ts +4 -0
  142. package/{types → dist/types}/types/salon.d.ts +3 -1
  143. package/dist/types/types/style.d.ts +88 -0
  144. package/{types → dist/types}/types/stylist.d.ts +2 -1
  145. package/{types → dist/types}/types/user.d.ts +2 -2
  146. package/loader/cdn.js +3 -0
  147. package/loader/index.cjs.js +3 -0
  148. package/loader/index.d.ts +21 -0
  149. package/loader/index.es2017.js +3 -0
  150. package/loader/index.js +4 -0
  151. package/loader/package.json +11 -0
  152. package/package.json +19 -14
  153. package/readme.md +25 -2
  154. package/cjs/favesalon-embed.cjs.js +0 -20
  155. package/cjs/google-map_15.cjs.entry.js +0 -6632
  156. package/cjs/loader.cjs.js +0 -22
  157. package/cjs/salon-booking-modal.cjs.entry.js +0 -23
  158. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
  159. package/collection/components/google-map/index.js +0 -97
  160. package/collection/components/salon-booking/index.js +0 -103
  161. package/collection/components/salon-booking/salon-booking-modal.js +0 -82
  162. package/collection/components/salon-contact/index.js +0 -88
  163. package/collection/components/salon-gift-card/index.css +0 -25
  164. package/collection/components/salon-gift-card/index.js +0 -83
  165. package/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -43
  166. package/collection/components/salon-info/index.css +0 -3
  167. package/collection/components/salon-info/index.js +0 -97
  168. package/collection/components/salon-latest-reviews/index.js +0 -108
  169. package/collection/components/salon-locations/index.js +0 -80
  170. package/collection/components/salon-lookbook/index.css +0 -12
  171. package/collection/components/salon-lookbook/index.js +0 -303
  172. package/collection/components/salon-ranking/index.js +0 -114
  173. package/collection/components/salon-reviews/index.js +0 -291
  174. package/collection/components/salon-schedules/index.css +0 -14
  175. package/collection/components/salon-schedules/index.js +0 -103
  176. package/collection/components/salon-services/index.css +0 -0
  177. package/collection/components/salon-services/index.js +0 -113
  178. package/collection/components/salon-styles/index.css +0 -23
  179. package/collection/components/salon-styles/index.js +0 -100
  180. package/collection/components/salon-stylists/index.js +0 -96
  181. package/collection/components/user-avatar/index.css +0 -0
  182. package/collection/components/user-avatar/index.js +0 -127
  183. package/collection/constants/colors.js +0 -91
  184. package/collection/services/services.js +0 -203
  185. package/collection/types/common.js +0 -2
  186. package/collection/types/salon.js +0 -52
  187. package/collection/types/style.js +0 -28
  188. package/collection/types/stylist.js +0 -13
  189. package/collection/types/user.js +0 -10
  190. package/custom-elements/index.js +0 -7410
  191. package/esm/favesalon-embed.js +0 -18
  192. package/esm/google-map_15.entry.js +0 -6614
  193. package/esm/loader.js +0 -18
  194. package/esm/polyfills/css-shim.js +0 -1
  195. package/esm/salon-booking-modal.entry.js +0 -19
  196. package/esm/salon-gift-card-modal.entry.js +0 -16
  197. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  198. package/favesalon-embed/p-1432ab16.entry.js +0 -1
  199. package/favesalon-embed/p-2da2ed75.js +0 -1
  200. package/favesalon-embed/p-4a5eca9a.js +0 -6
  201. package/favesalon-embed/p-94a0991e.entry.js +0 -1
  202. package/favesalon-embed/p-f15bcb43.entry.js +0 -1
  203. package/types/components/google-map/index.d.ts +0 -10
  204. package/types/components/salon-contact/index.d.ts +0 -9
  205. package/types/components/salon-reviews/index.d.ts +0 -23
  206. package/types/components/salon-styles/index.d.ts +0 -9
  207. package/types/constants/colors.d.ts +0 -88
  208. package/types/services/services.d.ts +0 -24
  209. package/types/types/common.d.ts +0 -2
  210. package/types/types/style.d.ts +0 -49
  211. package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
  212. package/{cjs → dist/cjs}/index.cjs.js +0 -0
  213. package/{esm/index.js → dist/collection/components/salon-info/index.css} +0 -0
  214. package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -0
  215. package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
  216. package/{collection → dist/collection}/components/salon-stylists/index.css +0 -0
  217. package/{collection/components/salon-locations → dist/collection/components/user-avatar}/index.css +0 -0
  218. package/{collection → dist/collection}/global/global.js +0 -0
  219. package/{collection → dist/collection}/index.js +0 -0
  220. package/{collection → dist/collection}/types/service.js +0 -0
  221. package/{collection → dist/collection}/utils/utils.js +0 -0
  222. package/{esm → dist/esm}/global-e1089ffd.js +0 -0
  223. package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  224. package/{esm → dist/esm}/polyfills/dom.js +0 -0
  225. package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  226. package/{esm → dist/esm}/polyfills/index.js +0 -0
  227. package/{esm → dist/esm}/polyfills/system.js +0 -0
  228. package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
  229. package/{index.cjs.js → dist/index.cjs.js} +0 -0
  230. package/{index.js → dist/index.js} +0 -0
  231. package/{collection/components/salon-reviews/index.css → dist/types/components/chat-conversation/index.d.ts} +0 -0
  232. package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
  233. /package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
  234. /package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
  235. /package/{types → dist/types}/index.d.ts +0 -0
  236. /package/{types → dist/types}/types/service.d.ts +0 -0
  237. /package/{types → dist/types}/utils/utils.d.ts +0 -0
package/cjs/loader.cjs.js DELETED
@@ -1,22 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-7d179a70.js');
6
- require('./global-9073d10e.js');
7
-
8
- /*
9
- Stencil Client Patch Esm v2.9.0 | MIT Licensed | https://stenciljs.com
10
- */
11
- const patchEsm = () => {
12
- return index.promiseResolve();
13
- };
14
-
15
- const defineCustomElements = (win, options) => {
16
- if (typeof window === 'undefined') return Promise.resolve();
17
- return patchEsm().then(() => {
18
- return index.bootstrapLazy([["salon-booking-modal.cjs",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card-modal.cjs",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"isModalOpen":[32]}]]],["google-map_15.cjs",[[0,"salon-info",{"salonId":[2,"salon-id"],"backgroundColor":[1,"background-color"],"salonInfo":[32],"fetchData":[64]}],[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"salonReviews":[32],"fetchData":[64]}],[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onLoadMore":[64],"fetchCategories":[64]}],[0,"salon-reviews",{"salonId":[2,"salon-id"],"salonInfo":[32],"totalReviews":[32],"salonReviews":[32],"canLoadMore":[32],"isLoadingMore":[32],"pageOffset":[32],"ratings":[32],"sorting":[32],"fetchData":[64]}],[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"fetchData":[64]}],[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonText":[1,"button-text"],"buttonClass":[1,"button-class"],"primaryColor":[1,"primary-color"]}],[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonText":[1,"button-text"],"buttonClass":[1,"button-class"]}],[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"fetchData":[64]}],[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-contact",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-styles",{"salonId":[2,"salon-id"],"firstPageStyles":[32],"nestPageStyles":[32],"fetchData":[64]}],[0,"google-map",{"apiKey":[1,"api-key"],"lat":[2],"lng":[2]}],[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
19
- });
20
- };
21
-
22
- exports.defineCustomElements = defineCustomElements;
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-7d179a70.js');
6
-
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}}";
8
-
9
- let SalonBookingModal = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.primaryColor = '#d47b99';
13
- this.redirectUrl = window.btoa(window.location.href);
14
- this.isModalOpen = true;
15
- }
16
- render() {
17
- const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
18
- return (index.h("div", { class: "salon-booking--modal" }, this.isModalOpen && (index.h("div", { class: "salon-modal salon-modal--booking" }, index.h("div", { class: "salon-modal--backdrop", onClick: () => this.isModalOpen = false }), index.h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }), index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--content" }, index.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}` })))))));
19
- }
20
- };
21
- SalonBookingModal.style = indexCss;
22
-
23
- exports.salon_booking_modal = SalonBookingModal;
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-7d179a70.js');
6
-
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}";
8
-
9
- let SalonGiftCardModal = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.isModalOpen = true;
13
- }
14
- render() {
15
- return (index.h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (index.h("div", { class: "salon-modal salon-modal--gift-card" }, index.h("div", { class: "salon-modal--backdrop", onClick: () => this.isModalOpen = false }), index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }), index.h("div", { class: "salon-modal--content" }, index.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` })))))));
16
- }
17
- };
18
- SalonGiftCardModal.style = indexCss;
19
-
20
- exports.salon_gift_card_modal = SalonGiftCardModal;
@@ -1,97 +0,0 @@
1
- import { Component, h, Prop } from '@stencil/core';
2
- export class GoogleMap {
3
- constructor() {
4
- this.apiKey = 'AIzaSyBW4PbW9aM2FXZl83Gs7jeRmekEWSzC1sY';
5
- }
6
- componentDidLoad() {
7
- this.injectSDK().then(() => {
8
- setTimeout(() => this.initMap(), 300);
9
- });
10
- }
11
- injectSDK() {
12
- return new Promise((resolve) => {
13
- window['mapInit'] = () => resolve(true);
14
- const script = document.createElement('script');
15
- script.id = 'googleMaps';
16
- if (this.apiKey) {
17
- script.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.apiKey + '&callback=mapInit';
18
- }
19
- else {
20
- script.src = 'https://maps.googleapis.com/maps/api/js?callback=mapInit';
21
- }
22
- document.body.appendChild(script);
23
- return resolve(true);
24
- });
25
- }
26
- initMap() {
27
- const mapOptions = {
28
- center: { lat: this.lat, lng: this.lng },
29
- zoom: 8,
30
- };
31
- this.map = new window.google.maps.Map(document.getElementById('google-map-container'), mapOptions);
32
- }
33
- render() {
34
- return h("div", { id: 'google-map-container' });
35
- }
36
- static get is() { return "google-map"; }
37
- static get originalStyleUrls() { return {
38
- "$": ["index.css"]
39
- }; }
40
- static get styleUrls() { return {
41
- "$": ["index.css"]
42
- }; }
43
- static get properties() { return {
44
- "apiKey": {
45
- "type": "string",
46
- "mutable": false,
47
- "complexType": {
48
- "original": "string",
49
- "resolved": "string",
50
- "references": {}
51
- },
52
- "required": false,
53
- "optional": false,
54
- "docs": {
55
- "tags": [],
56
- "text": ""
57
- },
58
- "attribute": "api-key",
59
- "reflect": false,
60
- "defaultValue": "'AIzaSyBW4PbW9aM2FXZl83Gs7jeRmekEWSzC1sY'"
61
- },
62
- "lat": {
63
- "type": "number",
64
- "mutable": false,
65
- "complexType": {
66
- "original": "number",
67
- "resolved": "number",
68
- "references": {}
69
- },
70
- "required": false,
71
- "optional": false,
72
- "docs": {
73
- "tags": [],
74
- "text": ""
75
- },
76
- "attribute": "lat",
77
- "reflect": false
78
- },
79
- "lng": {
80
- "type": "number",
81
- "mutable": false,
82
- "complexType": {
83
- "original": "number",
84
- "resolved": "number",
85
- "references": {}
86
- },
87
- "required": false,
88
- "optional": false,
89
- "docs": {
90
- "tags": [],
91
- "text": ""
92
- },
93
- "attribute": "lng",
94
- "reflect": false
95
- }
96
- }; }
97
- }
@@ -1,103 +0,0 @@
1
- import { Component, Prop, h } from '@stencil/core';
2
- export class SalonBooking {
3
- constructor() {
4
- this.buttonText = 'Book now';
5
- this.buttonClass = 'btn btn-primary';
6
- this.primaryColor = '#d47b99';
7
- }
8
- openModal() {
9
- const elBookingModal = document.createElement('div');
10
- elBookingModal.innerHTML = `
11
- <salon-booking-modal
12
- salon-id=${this.salonId}
13
- primary-color=${this.primaryColor}
14
- ></salon-booking-modal>
15
- `;
16
- document.body.appendChild(elBookingModal);
17
- }
18
- render() {
19
- return (h("div", { class: "salon-booking" },
20
- h("div", { class: "salon-booking--button" },
21
- h("button", { type: "button", class: this.buttonClass, onClick: () => this.openModal() }, this.buttonText))));
22
- }
23
- static get is() { return "salon-booking"; }
24
- static get originalStyleUrls() { return {
25
- "$": ["index.css"]
26
- }; }
27
- static get styleUrls() { return {
28
- "$": ["index.css"]
29
- }; }
30
- static get properties() { return {
31
- "salonId": {
32
- "type": "number",
33
- "mutable": false,
34
- "complexType": {
35
- "original": "number",
36
- "resolved": "number",
37
- "references": {}
38
- },
39
- "required": false,
40
- "optional": false,
41
- "docs": {
42
- "tags": [],
43
- "text": ""
44
- },
45
- "attribute": "salon-id",
46
- "reflect": false
47
- },
48
- "buttonText": {
49
- "type": "string",
50
- "mutable": false,
51
- "complexType": {
52
- "original": "string",
53
- "resolved": "string",
54
- "references": {}
55
- },
56
- "required": false,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": ""
61
- },
62
- "attribute": "button-text",
63
- "reflect": false,
64
- "defaultValue": "'Book now'"
65
- },
66
- "buttonClass": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": ""
79
- },
80
- "attribute": "button-class",
81
- "reflect": false,
82
- "defaultValue": "'btn btn-primary'"
83
- },
84
- "primaryColor": {
85
- "type": "string",
86
- "mutable": false,
87
- "complexType": {
88
- "original": "string",
89
- "resolved": "string",
90
- "references": {}
91
- },
92
- "required": false,
93
- "optional": false,
94
- "docs": {
95
- "tags": [],
96
- "text": ""
97
- },
98
- "attribute": "primary-color",
99
- "reflect": false,
100
- "defaultValue": "'#d47b99'"
101
- }
102
- }; }
103
- }
@@ -1,82 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- export class SalonBookingModal {
3
- constructor() {
4
- this.primaryColor = '#d47b99';
5
- this.redirectUrl = window.btoa(window.location.href);
6
- this.isModalOpen = true;
7
- }
8
- render() {
9
- const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
10
- return (h("div", { class: "salon-booking--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--booking" },
11
- h("div", { class: "salon-modal--backdrop", onClick: () => this.isModalOpen = false }),
12
- h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }),
13
- h("div", { class: "salon-modal--inner" },
14
- h("div", { class: "salon-modal--content" },
15
- 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}` })))))));
16
- }
17
- static get is() { return "salon-booking-modal"; }
18
- static get originalStyleUrls() { return {
19
- "$": ["index.css"]
20
- }; }
21
- static get styleUrls() { return {
22
- "$": ["index.css"]
23
- }; }
24
- static get properties() { return {
25
- "salonId": {
26
- "type": "number",
27
- "mutable": false,
28
- "complexType": {
29
- "original": "number",
30
- "resolved": "number",
31
- "references": {}
32
- },
33
- "required": false,
34
- "optional": false,
35
- "docs": {
36
- "tags": [],
37
- "text": ""
38
- },
39
- "attribute": "salon-id",
40
- "reflect": false
41
- },
42
- "primaryColor": {
43
- "type": "string",
44
- "mutable": false,
45
- "complexType": {
46
- "original": "string",
47
- "resolved": "string",
48
- "references": {}
49
- },
50
- "required": false,
51
- "optional": false,
52
- "docs": {
53
- "tags": [],
54
- "text": ""
55
- },
56
- "attribute": "primary-color",
57
- "reflect": false,
58
- "defaultValue": "'#d47b99'"
59
- },
60
- "redirectUrl": {
61
- "type": "string",
62
- "mutable": false,
63
- "complexType": {
64
- "original": "string",
65
- "resolved": "string",
66
- "references": {}
67
- },
68
- "required": false,
69
- "optional": false,
70
- "docs": {
71
- "tags": [],
72
- "text": ""
73
- },
74
- "attribute": "redirect-url",
75
- "reflect": false,
76
- "defaultValue": "window.btoa(window.location.href)"
77
- }
78
- }; }
79
- static get states() { return {
80
- "isModalOpen": {}
81
- }; }
82
- }
@@ -1,88 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- import { Colors } from '../../constants/colors';
3
- import { formatWebsiteUrl } from '../../utils/utils';
4
- import HttpService from '../../services/services';
5
- export class SalonContact {
6
- componentWillLoad() {
7
- if (this.salonInfo) {
8
- this.salonInfoState = JSON.parse(this.salonInfo);
9
- }
10
- else {
11
- this.fetchData();
12
- }
13
- }
14
- fetchData() {
15
- try {
16
- HttpService().fetchSalonInfo(this.salonId)
17
- .then(salonInfo => this.salonInfoState = salonInfo);
18
- }
19
- catch (e) { }
20
- }
21
- render() {
22
- const { about, email, website, businessPhone, } = (this.salonInfoState || {});
23
- const websiteUrl = formatWebsiteUrl(website);
24
- return (h("div", { class: "view view--salon-contact" },
25
- h("div", { class: "view-content" },
26
- h("div", { style: { fontSize: '16px', fontWeight: 'bold' } }, "Contact info"),
27
- h("div", { class: "salon-contact--links" },
28
- businessPhone && (h("div", { class: "salon-contact--links-item" },
29
- h("i", { class: "ri-phone-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
30
- " ",
31
- businessPhone)),
32
- websiteUrl && (h("div", { class: "salon-contact--links-item" },
33
- h("i", { class: "ri-links-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
34
- " ",
35
- h("a", { target: websiteUrl && websiteUrl.indexOf(window.location.hostname) === -1 ? '_blank' : undefined, href: websiteUrl, style: { color: Colors.Gray01, textDecoration: 'none' } }, websiteUrl))),
36
- email && (h("div", { class: "salon-contact--links-item" },
37
- h("i", { class: "ri-mail-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
38
- " ",
39
- h("a", { href: `mailto:${email}`, style: { color: Colors.Gray01, textDecoration: 'none' } }, email)))),
40
- h("div", { class: "salon-contact--info--desc", style: { fontSize: '16px', marginTop: '16px' }, innerHTML: about }))));
41
- }
42
- static get is() { return "salon-contact"; }
43
- static get originalStyleUrls() { return {
44
- "$": ["index.css"]
45
- }; }
46
- static get styleUrls() { return {
47
- "$": ["index.css"]
48
- }; }
49
- static get properties() { return {
50
- "salonId": {
51
- "type": "number",
52
- "mutable": false,
53
- "complexType": {
54
- "original": "number",
55
- "resolved": "number",
56
- "references": {}
57
- },
58
- "required": false,
59
- "optional": false,
60
- "docs": {
61
- "tags": [],
62
- "text": ""
63
- },
64
- "attribute": "salon-id",
65
- "reflect": false
66
- },
67
- "salonInfo": {
68
- "type": "string",
69
- "mutable": false,
70
- "complexType": {
71
- "original": "string",
72
- "resolved": "string",
73
- "references": {}
74
- },
75
- "required": false,
76
- "optional": true,
77
- "docs": {
78
- "tags": [],
79
- "text": ""
80
- },
81
- "attribute": "salon-info",
82
- "reflect": false
83
- }
84
- }; }
85
- static get states() { return {
86
- "salonInfoState": {}
87
- }; }
88
- }
@@ -1,25 +0,0 @@
1
- .salon-modal.salon-modal--gift-card .salon-modal--title {
2
- margin: 0;
3
- }
4
-
5
- .salon-modal.salon-modal--gift-card .salon-modal--close {
6
- width: 40px;
7
- height: 40px;
8
- right: 16px;
9
- top: 16px;
10
- }
11
-
12
- .salon-modal.salon-modal--gift-card .salon-modal--header {
13
- height: 72px;
14
- padding: 16px;
15
- }
16
-
17
- .salon-modal.salon-modal--gift-card .salon-modal--inner {
18
- height: 90vh;
19
- }
20
-
21
- .salon-modal.salon-modal--gift-card .salon-modal--content {
22
- height: 90vh;
23
- padding: 0 16px;
24
- overflow-y: auto;
25
- }
@@ -1,83 +0,0 @@
1
- import { Component, Prop, h } from '@stencil/core';
2
- export class SalonGiftCard {
3
- constructor() {
4
- this.buttonText = 'Buy Gift card';
5
- this.buttonClass = 'btn btn-primary';
6
- }
7
- openModal() {
8
- const elBookingModal = document.createElement('div');
9
- elBookingModal.innerHTML = `
10
- <salon-gift-card-modal
11
- salon-id=${this.salonId}
12
- ></salon-gift-card-modal>
13
- `;
14
- document.body.appendChild(elBookingModal);
15
- }
16
- render() {
17
- return (h("div", { class: "salon-gift-card" },
18
- h("div", { class: "salon-gift-card--button" },
19
- h("button", { type: "button", class: this.buttonClass, onClick: () => this.openModal() }, this.buttonText))));
20
- }
21
- static get is() { return "salon-gift-card"; }
22
- static get originalStyleUrls() { return {
23
- "$": ["index.css"]
24
- }; }
25
- static get styleUrls() { return {
26
- "$": ["index.css"]
27
- }; }
28
- static get properties() { return {
29
- "salonId": {
30
- "type": "number",
31
- "mutable": false,
32
- "complexType": {
33
- "original": "number",
34
- "resolved": "number",
35
- "references": {}
36
- },
37
- "required": false,
38
- "optional": false,
39
- "docs": {
40
- "tags": [],
41
- "text": ""
42
- },
43
- "attribute": "salon-id",
44
- "reflect": false
45
- },
46
- "buttonText": {
47
- "type": "string",
48
- "mutable": false,
49
- "complexType": {
50
- "original": "string",
51
- "resolved": "string",
52
- "references": {}
53
- },
54
- "required": false,
55
- "optional": false,
56
- "docs": {
57
- "tags": [],
58
- "text": ""
59
- },
60
- "attribute": "button-text",
61
- "reflect": false,
62
- "defaultValue": "'Buy Gift card'"
63
- },
64
- "buttonClass": {
65
- "type": "string",
66
- "mutable": false,
67
- "complexType": {
68
- "original": "string",
69
- "resolved": "string",
70
- "references": {}
71
- },
72
- "required": false,
73
- "optional": false,
74
- "docs": {
75
- "tags": [],
76
- "text": ""
77
- },
78
- "attribute": "button-class",
79
- "reflect": false,
80
- "defaultValue": "'btn btn-primary'"
81
- }
82
- }; }
83
- }
@@ -1,43 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- export class SalonGiftCardModal {
3
- constructor() {
4
- this.isModalOpen = true;
5
- }
6
- render() {
7
- return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" },
8
- h("div", { class: "salon-modal--backdrop", onClick: () => this.isModalOpen = false }),
9
- h("div", { class: "salon-modal--inner" },
10
- h("div", { class: "salon-modal--close", onClick: () => this.isModalOpen = false }),
11
- h("div", { class: "salon-modal--content" },
12
- 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` })))))));
13
- }
14
- static get is() { return "salon-gift-card-modal"; }
15
- static get originalStyleUrls() { return {
16
- "$": ["index.css"]
17
- }; }
18
- static get styleUrls() { return {
19
- "$": ["index.css"]
20
- }; }
21
- static get properties() { return {
22
- "salonId": {
23
- "type": "number",
24
- "mutable": false,
25
- "complexType": {
26
- "original": "number",
27
- "resolved": "number",
28
- "references": {}
29
- },
30
- "required": false,
31
- "optional": false,
32
- "docs": {
33
- "tags": [],
34
- "text": ""
35
- },
36
- "attribute": "salon-id",
37
- "reflect": false
38
- }
39
- }; }
40
- static get states() { return {
41
- "isModalOpen": {}
42
- }; }
43
- }
@@ -1,3 +0,0 @@
1
- .salon-info .view--salon-styles .view-content {
2
- padding: 0;
3
- }