favesalon-embed 0.0.4 → 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 (241) hide show
  1. package/LICENSE +21 -0
  2. package/{cjs → dist/cjs}/_commonjsHelpers-5cfcba41.js +0 -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/{cjs/index-48ac68d0.js → dist/cjs/index-7f190886.js} +1924 -0
  8. package/{cjs/index-d5de0b9d.js → dist/cjs/index-e6bea8f5.js} +10 -0
  9. package/{cjs → dist/cjs}/index.cjs.js +0 -0
  10. package/dist/cjs/loader.cjs.js +22 -0
  11. package/{cjs → dist/cjs}/salon-booking-modal.cjs.entry.js +5 -5
  12. package/{cjs → dist/cjs}/salon-booking.cjs.entry.js +6 -7
  13. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
  14. package/{cjs → dist/cjs}/salon-gift-card.cjs.entry.js +7 -7
  15. package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
  16. package/{cjs/salon-lookbook_2.cjs.entry.js → dist/cjs/salon-lookbook.cjs.entry.js} +23 -57
  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-f1102d4a.js → dist/cjs/services-eee8f251.js} +265 -393
  22. package/dist/cjs/style-detail.cjs.entry.js +310 -0
  23. package/dist/cjs/user-avatar.cjs.entry.js +41 -0
  24. package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
  25. package/{collection → dist/collection}/collection-manifest.json +2 -3
  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 +3 -3
  31. package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +4 -4
  32. package/dist/collection/components/salon-gift-card/index.css +25 -0
  33. package/{collection → dist/collection}/components/salon-gift-card/index.js +4 -3
  34. package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +24 -3
  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/{collection → dist/collection}/components/salon-lookbook/index.css +0 -9
  44. package/{collection → dist/collection}/components/salon-lookbook/index.js +19 -19
  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/{collection → dist/collection}/components/salon-reviews/index.css +0 -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 → dist/collection}/components/salon-services/index.css +0 -0
  52. package/{collection → dist/collection}/components/salon-services/index.js +51 -8
  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 → 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/{collection → dist/collection}/types/stylist.js +12 -9
  69. package/{favesalon-embed/index.esm.js → 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 -18
  73. package/{custom-elements → dist/custom-elements}/index.js +1227 -1035
  74. package/{esm → dist/esm}/_commonjsHelpers-098d5b27.js +0 -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-0f8eed73.js → dist/esm/index-6af0a03d.js} +10 -1
  80. package/{esm/index-67d677ba.js → dist/esm/index-80523fec.js} +1924 -1
  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/{esm → dist/esm}/salon-booking-modal.entry.js +5 -5
  90. package/{esm → dist/esm}/salon-booking.entry.js +5 -6
  91. package/dist/esm/salon-gift-card-modal.entry.js +24 -0
  92. package/{esm → dist/esm}/salon-gift-card.entry.js +6 -6
  93. package/dist/esm/salon-latest-reviews.entry.js +91 -0
  94. package/{esm/salon-lookbook_2.entry.js → dist/esm/salon-lookbook.entry.js} +24 -57
  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-74d84ca9.js → dist/esm/services-295247b1.js} +263 -392
  100. package/dist/esm/style-detail.entry.js +306 -0
  101. package/dist/esm/user-avatar.entry.js +37 -0
  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/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/{favesalon-embed → dist/favesalon-embed}/p-d6083940.js +0 -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 +0 -0
  131. package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +0 -0
  132. package/{types → dist/types}/components/salon-gift-card/index.d.ts +0 -0
  133. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +1 -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 +3 -3
  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 +1 -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 +54 -59
  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 +1 -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 +24 -7
  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/index-95daad08.js +0 -1928
  172. package/cjs/loader.cjs.js +0 -22
  173. package/cjs/salon-contact_4.cjs.entry.js +0 -155
  174. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -25
  175. package/cjs/salon-info.cjs.entry.js +0 -35
  176. package/cjs/salon-latest-reviews.cjs.entry.js +0 -58
  177. package/cjs/salon-lookbook-modal.cjs.entry.js +0 -141
  178. package/cjs/salon-reviews.cjs.entry.js +0 -205
  179. package/cjs/salon-services.cjs.entry.js +0 -47
  180. package/cjs/salon-stylists.cjs.entry.js +0 -54
  181. package/collection/components/google-map/index.js +0 -97
  182. package/collection/components/salon-contact/index.js +0 -88
  183. package/collection/components/salon-gift-card/index.css +0 -25
  184. package/collection/components/salon-info/index.css +0 -3
  185. package/collection/components/salon-latest-reviews/index.js +0 -108
  186. package/collection/components/salon-locations/index.js +0 -80
  187. package/collection/components/salon-lookbook/lookbook-modal.css +0 -72
  188. package/collection/components/salon-lookbook/salon-lookbook-modal.js +0 -248
  189. package/collection/components/salon-reviews/index.js +0 -317
  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-styles/index.css +0 -23
  193. package/collection/components/salon-styles/index.js +0 -100
  194. package/collection/components/salon-stylists/index.js +0 -96
  195. package/collection/constants/colors.js +0 -91
  196. package/collection/services/services.js +0 -225
  197. package/collection/types/common.js +0 -2
  198. package/collection/types/salon.js +0 -52
  199. package/collection/types/style.js +0 -103
  200. package/esm/colors-1ec90c5f.js +0 -93
  201. package/esm/favesalon-embed.js +0 -18
  202. package/esm/google-map.entry.js +0 -43
  203. package/esm/index-09d43e3e.js +0 -1926
  204. package/esm/loader.js +0 -18
  205. package/esm/salon-contact_4.entry.js +0 -148
  206. package/esm/salon-gift-card-modal.entry.js +0 -21
  207. package/esm/salon-info.entry.js +0 -31
  208. package/esm/salon-latest-reviews.entry.js +0 -54
  209. package/esm/salon-lookbook-modal.entry.js +0 -137
  210. package/esm/salon-reviews.entry.js +0 -201
  211. package/esm/salon-services.entry.js +0 -43
  212. package/esm/salon-stylists.entry.js +0 -50
  213. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  214. package/favesalon-embed/p-0188d4dc.entry.js +0 -1
  215. package/favesalon-embed/p-0318501e.js +0 -1
  216. package/favesalon-embed/p-078f242d.entry.js +0 -1
  217. package/favesalon-embed/p-13e23c61.entry.js +0 -1
  218. package/favesalon-embed/p-17df13ad.js +0 -1
  219. package/favesalon-embed/p-1a3179c8.entry.js +0 -1
  220. package/favesalon-embed/p-20aa75de.js +0 -6
  221. package/favesalon-embed/p-2901a6d6.entry.js +0 -1
  222. package/favesalon-embed/p-2b861430.entry.js +0 -1
  223. package/favesalon-embed/p-44d810a0.js +0 -1
  224. package/favesalon-embed/p-4c68700f.entry.js +0 -1
  225. package/favesalon-embed/p-4e2d7b29.js +0 -1
  226. package/favesalon-embed/p-6b845bf1.entry.js +0 -1
  227. package/favesalon-embed/p-7350f6b5.entry.js +0 -1
  228. package/favesalon-embed/p-897c2b1c.entry.js +0 -1
  229. package/favesalon-embed/p-8e60f56f.entry.js +0 -1
  230. package/favesalon-embed/p-a49afdc1.entry.js +0 -1
  231. package/favesalon-embed/p-c93867c4.entry.js +0 -1
  232. package/favesalon-embed/p-ea6a097f.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-lookbook/salon-lookbook-modal.d.ts +0 -13
  236. package/types/components/salon-reviews/index.d.ts +0 -24
  237. package/types/components/salon-styles/index.d.ts +0 -9
  238. package/types/constants/colors.d.ts +0 -88
  239. package/types/services/services.d.ts +0 -26
  240. package/types/types/common.d.ts +0 -2
  241. package/types/types/style.d.ts +0 -59
@@ -0,0 +1,310 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e6bea8f5.js');
6
+ const services = require('./services-eee8f251.js');
7
+ const _commonjsHelpers = require('./_commonjsHelpers-5cfcba41.js');
8
+ const colors = require('./colors-38421769.js');
9
+
10
+ var relativeTime = _commonjsHelpers.createCommonjsModule(function (module, exports) {
11
+ !function(r,e){module.exports=e();}(_commonjsHelpers.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)};}}));
12
+ });
13
+
14
+ const indexCss = ".salon-modal.salon-modal--lookbook-detail .salon-modal--close{display:none !important}.salon-modal.salon-modal--lookbook-detail .salon-modal--content{background-color:#fff;position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1000;overflow-y:auto}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:240px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnails{text-align:center}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{display:inline-block;margin-top:12px;margin-right:12px;height:40px;width:60px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--button{border:none;position:absolute;top:50%;z-index:20;height:40px;width:40px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;-moz-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--prev{left:24px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--next{right:24px}@media (min-width: 768px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:360px !important}}@media (min-width: 992px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:480px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{height:56px;width:72px}}";
15
+
16
+ services.dayjs_min.extend(relativeTime);
17
+ let StyleDetail = class {
18
+ constructor(hostRef) {
19
+ index.registerInstance(this, hostRef);
20
+ this.isModalOpen = true;
21
+ this.currentMediaIdx = 0;
22
+ this.albumMedias = [];
23
+ this.similarStyles = [];
24
+ this.totalComments = 0;
25
+ this.lookbookComments = [];
26
+ }
27
+ componentWillLoad() {
28
+ this.injectSDK();
29
+ if (!!this.salonLookbook) {
30
+ this.lookbookInfo = JSON.parse(this.salonLookbook);
31
+ this.fetchData();
32
+ }
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 && this.similarStyles.length > 0 && document.querySelector('#similar-styles--grid')) {
48
+ const script = document.createElement('script');
49
+ script.type = 'text/javascript';
50
+ script.innerHTML = `
51
+ var masonry = new Macy({
52
+ container: '#similar-styles--grid',
53
+ useContainerForBreakpoints: true,
54
+ margin: 16,
55
+ columns: 2,
56
+ });
57
+ `;
58
+ document.body.appendChild(script);
59
+ this.isLayoutSetup = true;
60
+ }
61
+ }
62
+ fetchData() {
63
+ try {
64
+ const promises = [
65
+ services.HttpService().fetchStyleDetail(this.lookbookInfo.id).then(response => {
66
+ const { styleInfo, similarStyles } = response;
67
+ this.similarStyles = similarStyles;
68
+ if (styleInfo) {
69
+ this.lookbookInfo = styleInfo;
70
+ this.albumMedias = styleInfo.albumMedias || [];
71
+ this.currentMedia = (styleInfo.albumMedias || [])[0];
72
+ }
73
+ }),
74
+ services.HttpService().fetchStyleComments(this.lookbookInfo.id).then(response => {
75
+ this.totalComments = response.total;
76
+ this.lookbookComments = response.data;
77
+ }),
78
+ ];
79
+ return Promise.all(promises);
80
+ }
81
+ catch (e) { }
82
+ }
83
+ closeModal() {
84
+ this.isModalOpen = false;
85
+ const el = document.querySelector('style-detail');
86
+ el.remove();
87
+ }
88
+ onClickLookbook(style) {
89
+ const elLookbookModal = document.createElement('div');
90
+ elLookbookModal.innerHTML = `
91
+ <style-detail
92
+ salon-id=${this.salonId}
93
+ salon-lookbook='${JSON.stringify(style)}'
94
+ ></style-detail>
95
+ `;
96
+ document.body.appendChild(elLookbookModal);
97
+ }
98
+ onClickPrev() {
99
+ if (this.currentMediaIdx === 0) {
100
+ this.currentMediaIdx = this.albumMedias.length - 1;
101
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
102
+ }
103
+ else {
104
+ this.currentMediaIdx = this.currentMediaIdx - 1;
105
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
106
+ }
107
+ }
108
+ onClickNext() {
109
+ if (this.currentMediaIdx === this.albumMedias.length - 1) {
110
+ this.currentMediaIdx = 0;
111
+ this.currentMedia = this.albumMedias[0];
112
+ }
113
+ else {
114
+ this.currentMediaIdx = this.currentMediaIdx + 1;
115
+ this.currentMedia = this.albumMedias[this.currentMediaIdx];
116
+ }
117
+ }
118
+ render() {
119
+ const { createdDate, totalView, totalLike, totalBooking, album, salon, stylist, } = this.lookbookInfo;
120
+ if (this.isModalOpen) {
121
+ const { caption, description, mediaUrl } = this.currentMedia || {};
122
+ const isVideo = services.isVideoMedia((this.currentMedia || {}));
123
+ return (index.h("div", { class: "salon-modal salon-modal--lookbook-detail" }, index.h("div", { class: "salon-modal--inner" }, index.h("div", { class: "salon-modal--content" }, index.h("div", { class: "style-detail" }, index.h("div", { class: "style-detail--header" }, index.h("div", { style: {
124
+ position: 'relative',
125
+ overflow: 'hidden',
126
+ } }, index.h("div", { style: Object.assign({ backgroundColor: colors.Colors.Gray01, backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: '0 0', filter: 'blur(30px)', position: 'absolute', inset: '0', zIndex: '1' }, this.currentMedia && !services.isVideoMedia(this.currentMedia) ? { backgroundImage: `url("${this.currentMedia.imageThumb}")` } : {}) }), index.h("div", { style: {
127
+ zIndex: '2',
128
+ position: 'relative',
129
+ width: '100%',
130
+ backgroundColor: 'rgba(0, 0, 0, 0.25)',
131
+ padding: '12px 16px',
132
+ overflow: 'hidden',
133
+ } }, index.h("span", { style: {
134
+ color: colors.Colors.White,
135
+ border: 'none',
136
+ display: 'flex',
137
+ alignItems: 'center',
138
+ justifyContent: 'center',
139
+ height: '32px',
140
+ } }, index.h("span", null, this.currentMediaIdx + 1, " / ", this.albumMedias.length)), index.h("div", { style: {
141
+ display: 'flex',
142
+ alignItems: 'center',
143
+ position: 'absolute',
144
+ right: '16px',
145
+ top: '50%',
146
+ transform: 'translate(0, -50%)',
147
+ } }, index.h("button", { type: "text", class: "btn btn-light", style: {
148
+ backgroundColor: colors.Colors.White,
149
+ borderColor: colors.Colors.White,
150
+ border: 'none',
151
+ borderRadius: '50px',
152
+ display: 'flex',
153
+ alignItems: 'center',
154
+ justifyContent: 'center',
155
+ height: '32px',
156
+ width: '32px',
157
+ marginLeft: '12px',
158
+ }, onClick: () => this.closeModal() }, index.h("i", { class: "ri-close-fill", style: { fontSize: '16px', lineHeight: '1' } })))), index.h("div", { style: { position: 'relative', zIndex: "3" } }, index.h("div", { class: "style-detail--slides", style: {
159
+ marginTop: '16px',
160
+ marginBottom: '12px',
161
+ } }, index.h("div", { class: "style-detail--slides--image", style: {
162
+ width: '100%',
163
+ position: 'relative',
164
+ height: '360px',
165
+ } }, isVideo && (index.h("video", { muted: true, controls: true, width: "100%", height: "100%" }, index.h("source", { src: mediaUrl, type: "video/mp4" }))), !isVideo && (index.h("div", { style: {
166
+ position: 'absolute',
167
+ inset: '0',
168
+ zIndex: '2',
169
+ display: 'flex',
170
+ alignItems: 'center',
171
+ justifyContent: 'center',
172
+ } }, index.h("img", { src: mediaUrl, alt: caption, style: {
173
+ objectFit: 'contain',
174
+ maxHeight: '100%',
175
+ maxWidth: '100%',
176
+ } })))), index.h("div", { class: "style-detail--slides--thumbnails", style: {
177
+ width: '100%',
178
+ position: 'relative',
179
+ } }, this.albumMedias.map((media, idx) => {
180
+ const isStyleVideo = services.isVideoMedia(media);
181
+ return (index.h("div", { class: "style-detail--slides--thumbnail", style: Object.assign(Object.assign({ backgroundColor: colors.Colors.Gray01, borderRadius: '4px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, this.currentMediaIdx !== idx ? { opacity: '0.75' } : {}), !isStyleVideo ? {
182
+ backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
183
+ backgroundRepeat: 'no-repeat',
184
+ backgroundPosition: 'center center',
185
+ backgroundSize: 'cover',
186
+ } : {}), onClick: () => {
187
+ this.currentMedia = media;
188
+ this.currentMediaIdx = idx;
189
+ } }, isStyleVideo && (index.h("div", null, index.h("video", { muted: true, width: "100%", height: "100%", poster: media.imageThumb }, index.h("source", { src: media.mediaUrl, type: "video/mp4" })), index.h("i", { class: "ri-play-circle-fill", style: {
190
+ fontSize: '48px',
191
+ color: colors.Colors.TextColor,
192
+ position: 'absolute',
193
+ left: '50%',
194
+ top: '50%',
195
+ transform: 'translate(-50%, -50%)',
196
+ } })))));
197
+ }))), this.albumMedias.length > 1 && (index.h("div", null, index.h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--prev", onClick: () => this.onClickPrev() }, index.h("i", { class: "ri-arrow-left-line", style: { color: colors.Colors.TextColor, fontSize: '18px' } })), index.h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--next", onClick: () => this.onClickNext() }, index.h("i", { class: "ri-arrow-right-line", style: { color: colors.Colors.TextColor, fontSize: '18px' } }))))))), index.h("div", { class: "style-detail--content" }, index.h("div", { class: "container" }, index.h("div", { style: {
198
+ paddingBottom: '24px',
199
+ paddingTop: '24px',
200
+ } }, index.h("div", { class: "row" }, index.h("div", { class: this.similarStyles.length > 0 ? 'col-md-8' : 'col-md-12', style: { marginBottom: '24px' } }, index.h("div", { class: "row" }, salon && (index.h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, index.h("div", { style: {
201
+ backgroundColor: colors.Colors.Red01,
202
+ borderRadius: '4px',
203
+ padding: '8px',
204
+ display: 'flex',
205
+ alignItems: 'center',
206
+ justifyContent: 'space-between',
207
+ } }, index.h("div", { style: { paddingLeft: '8px' } }, index.h("div", { style: { color: colors.Colors.Gray05, fontSize: '12px' } }, "At salon"), index.h("div", { style: {
208
+ color: colors.Colors.Secondary,
209
+ fontSize: '20px',
210
+ lineHeight: '24px',
211
+ } }, salon.businessName)), index.h("div", { style: {
212
+ backgroundImage: `url("${services.getSalonImage(salon)}")`,
213
+ backgroundColor: colors.Colors.Red02,
214
+ backgroundSize: 'cover',
215
+ backgroundRepeat: 'no-repeat',
216
+ backgroundPosition: '0 0',
217
+ borderRadius: '4px',
218
+ height: '48px',
219
+ width: '48px',
220
+ } })))), stylist && stylist.id && (index.h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, index.h("div", { style: {
221
+ backgroundColor: colors.Colors.Yellow01,
222
+ borderRadius: '4px',
223
+ padding: '8px',
224
+ display: 'flex',
225
+ alignItems: 'center',
226
+ justifyContent: 'space-between',
227
+ } }, index.h("div", { style: { paddingLeft: '8px' } }, index.h("div", { style: { color: colors.Colors.Gray05, fontSize: '12px' } }, "By stylist"), index.h("div", { style: {
228
+ color: colors.Colors.Secondary,
229
+ fontSize: '20px',
230
+ lineHeight: '24px',
231
+ } }, stylist.fullName)), index.h("div", { style: {
232
+ backgroundImage: `url("${stylist.avatar}")`,
233
+ backgroundColor: colors.Colors.Yellow02,
234
+ backgroundSize: 'cover',
235
+ backgroundRepeat: 'no-repeat',
236
+ backgroundPosition: '0 0',
237
+ borderRadius: '4px',
238
+ height: '48px',
239
+ width: '48px',
240
+ } }))))), index.h("div", { style: {
241
+ borderBottom: `1px solid ${colors.Colors.Gray02}`,
242
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
243
+ display: 'flex',
244
+ alignItems: 'center',
245
+ justifyContent: 'space-between',
246
+ paddingBottom: '16px',
247
+ paddingTop: '16px',
248
+ } }, index.h("div", { style: {
249
+ display: 'flex',
250
+ alignItems: 'center',
251
+ justifyContent: 'space-around',
252
+ flexShrink: '1',
253
+ flexGrow: '1',
254
+ } }, index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalLike), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "faves")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalBooking), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "booked")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalView), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "views")), index.h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, index.h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, this.totalComments), index.h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "comments")))), (caption || description) && (index.h("div", { style: { paddingTop: '24px' } }, index.h("div", { style: { color: colors.Colors.Gray04, fontSize: '14px' } }, createdDate && services.dayjs_min(createdDate).format(services.shortDateYearFormat)), index.h("div", { style: { fontSize: '24px' } }, caption), index.h("div", { style: {
255
+ fontSize: '16px',
256
+ paddingTop: caption ? '16px' : '0',
257
+ } }, description))), album && album.tags.length > 0 && (index.h("div", { style: {
258
+ paddingTop: '24px',
259
+ marginBottom: '-12px',
260
+ } }, album.tags.map((tag, idx) => (index.h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
261
+ backgroundColor: colors.Colors.Gray01,
262
+ borderColor: colors.Colors.Gray01,
263
+ borderRadius: '4px',
264
+ marginRight: '12px',
265
+ marginBottom: '12px',
266
+ } }, tag))))), index.h("div", { style: { marginTop: '32px' } }, this.lookbookComments && this.lookbookComments.length > 0 && (index.h("div", null, index.h("div", { style: { fontWeight: '600', marginBottom: '8px' } }, this.totalComments, " ", this.totalComments === 1 ? 'comment' : 'comments'), index.h("div", { class: "view view--style-comments", style: {
267
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
268
+ paddingTop: '24px',
269
+ paddingBottom: '24px',
270
+ } }, this.lookbookComments.map((comment, idx) => {
271
+ const { user, title, description, createdDate } = comment;
272
+ return (index.h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
273
+ borderTop: `1px solid ${colors.Colors.Gray02}`,
274
+ marginTop: '24px',
275
+ paddingTop: '24px',
276
+ } : {} }, index.h("div", { style: { overflow: 'hidden' } }, index.h("user-avatar", { size: 48, avatar: user.avatar, name: index.h("div", null, index.h("div", { style: { color: colors.Colors.Gray04, lineHeight: '1', fontSize: '12px', fontWeight: '400' } }, services.dayjs_min(createdDate).fromNow()), index.h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName)), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, nameStyle: { fontWeight: 'bold' } })), index.h("div", { style: {
277
+ color: colors.Colors.Black,
278
+ fontSize: '16px',
279
+ paddingTop: '16px',
280
+ } }, title), description && (index.h("div", { style: {
281
+ color: colors.Colors.Gray05,
282
+ paddingTop: '8px',
283
+ } }, description))));
284
+ })))))), index.h("div", { class: "col-md-4", style: { marginBottom: '24px' } }, index.h("div", { class: "block block--similar-styles" }, this.similarStyles.length > 0 && (index.h("div", { class: "block--content" }, index.h("h3", { style: {
285
+ lineHeight: '1.2',
286
+ fontSize: '24px',
287
+ color: colors.Colors.Secondary,
288
+ } }, "More like this"), index.h("div", { style: { marginTop: '16px' } }, index.h("div", { class: "similar-styles--grid", id: "similar-styles--grid" }, this.similarStyles.slice(0, 6).map(style => {
289
+ const { caption, imageThumbMedium, owner } = style;
290
+ return (index.h("div", { class: "similar-styles--grid-item", onClick: () => {
291
+ this.closeModal();
292
+ this.onClickLookbook(style);
293
+ } }, index.h("div", { class: "card", style: {
294
+ background: 'none',
295
+ border: 'none',
296
+ cursor: 'pointer',
297
+ } }, index.h("div", { class: "similar-styles--grid-item--image", style: {
298
+ borderRadius: '8px',
299
+ overflow: 'hidden',
300
+ minHeight: '80px',
301
+ background: colors.Colors.Gray01,
302
+ } }, index.h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (index.h("div", { class: "card-body", style: { paddingLeft: '0' } }, index.h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
303
+ }))))))))))))))));
304
+ }
305
+ return null;
306
+ }
307
+ };
308
+ StyleDetail.style = indexCss;
309
+
310
+ exports.style_detail = StyleDetail;
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-e6bea8f5.js');
6
+ const colors = require('./colors-38421769.js');
7
+
8
+ const indexCss = "";
9
+
10
+ let UserAvatar = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.size = 24;
14
+ }
15
+ render() {
16
+ return (index.h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (index.h("div", { style: {
17
+ backgroundImage: `url("${this.avatar}")`,
18
+ backgroundColor: colors.Colors.Gray01,
19
+ backgroundPosition: 'center center',
20
+ backgroundSize: 'cover',
21
+ borderRadius: '50%',
22
+ height: `${this.size}px`,
23
+ width: `${this.size}px`,
24
+ minWidth: `${this.size}px`,
25
+ } })), !this.avatar && (index.h("div", { style: {
26
+ backgroundColor: colors.Colors.Gray01,
27
+ backgroundPosition: 'center center',
28
+ backgroundSize: 'cover',
29
+ borderRadius: '50%',
30
+ display: 'flex',
31
+ alignItems: 'center',
32
+ justifyContent: 'center',
33
+ height: `${this.size}px`,
34
+ width: `${this.size}px`,
35
+ minWidth: `${this.size}px`,
36
+ } }, this.shortName)), index.h("div", { style: Object.assign({ flexShrink: '1', flexGrow: '1', marginLeft: '12px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, this.nameStyle) }, this.name)));
37
+ }
38
+ };
39
+ UserAvatar.style = indexCss;
40
+
41
+ exports.user_avatar = UserAvatar;
File without changes
@@ -3,20 +3,19 @@
3
3
  "./components/google-map/index.js",
4
4
  "./components/salon-booking/index.js",
5
5
  "./components/salon-booking/salon-booking-modal.js",
6
- "./components/salon-contact/index.js",
7
6
  "./components/salon-gift-card/index.js",
8
7
  "./components/salon-gift-card/salon-gift-card-modal.js",
9
8
  "./components/salon-info/index.js",
10
9
  "./components/salon-latest-reviews/index.js",
10
+ "./components/salon-latest-styles/index.js",
11
11
  "./components/salon-locations/index.js",
12
12
  "./components/salon-lookbook/index.js",
13
- "./components/salon-lookbook/salon-lookbook-modal.js",
14
13
  "./components/salon-ranking/index.js",
15
14
  "./components/salon-reviews/index.js",
16
15
  "./components/salon-schedules/index.js",
17
16
  "./components/salon-services/index.js",
18
- "./components/salon-styles/index.js",
19
17
  "./components/salon-stylists/index.js",
18
+ "./components/style-detail/index.js",
20
19
  "./components/user-avatar/index.js"
21
20
  ],
22
21
  "compiler": {
@@ -1,4 +1,3 @@
1
- #google-map-container,
2
1
  google-map {
3
2
  display: block;
4
3
  width: 100%;
@@ -0,0 +1,86 @@
1
+ import { Component, getAssetPath, h, Prop } from '@stencil/core';
2
+ import { Colors } from '../../constants/colors';
3
+ export class GoogleMap {
4
+ render() {
5
+ const mapPlaceholder = getAssetPath('./assets/map--placeholder.jpeg');
6
+ return (h("div", { style: {
7
+ backgroundImage: `url("${mapPlaceholder}")`,
8
+ backgroundColor: Colors.Gray01,
9
+ backgroundPosition: 'center center',
10
+ backgroundRepeat: 'no-repeat',
11
+ backgroundSize: 'cover',
12
+ borderRadius: '8px',
13
+ position: 'relative',
14
+ height: '296px',
15
+ } },
16
+ h("div", { style: {
17
+ position: 'absolute',
18
+ left: '50%',
19
+ top: '50%',
20
+ transform: 'translate(-50%, -50%)',
21
+ } },
22
+ h("a", { target: "_blank", rel: "noopener noreferrer", href: `https://www.google.com/maps/search/?api=1&query=${this.locationAddress}`, style: {
23
+ backgroundColor: Colors.Red01,
24
+ border: `1px solid ${Colors.Red02}`,
25
+ borderRadius: '4px',
26
+ color: Colors.TextColor,
27
+ padding: '12px',
28
+ display: 'flex',
29
+ flexWrap: 'wrap',
30
+ height: 'auto',
31
+ width: 'auto',
32
+ whiteSpace: 'normal',
33
+ textAlign: 'left',
34
+ maxWidth: '320px',
35
+ textDecoration: 'none',
36
+ } },
37
+ this.locationName && h("span", { style: { fontSize: '16px', marginBottom: '4px' } }, this.locationName),
38
+ this.locationAddress && h("span", { style: { fontSize: '12px' } }, this.locationAddress)),
39
+ h("div", { style: { marginTop: '8px', textAlign: 'center' } },
40
+ h("i", { class: "ri-map-pin-fill", style: { fontSize: '24px' } })))));
41
+ }
42
+ static get is() { return "google-map"; }
43
+ static get originalStyleUrls() { return {
44
+ "$": ["index.less"]
45
+ }; }
46
+ static get styleUrls() { return {
47
+ "$": ["index.css"]
48
+ }; }
49
+ static get assetsDirs() { return ["assets"]; }
50
+ static get properties() { return {
51
+ "locationName": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "string",
56
+ "resolved": "string",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": true,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": ""
64
+ },
65
+ "attribute": "location-name",
66
+ "reflect": false
67
+ },
68
+ "locationAddress": {
69
+ "type": "string",
70
+ "mutable": false,
71
+ "complexType": {
72
+ "original": "string",
73
+ "resolved": "string",
74
+ "references": {}
75
+ },
76
+ "required": false,
77
+ "optional": true,
78
+ "docs": {
79
+ "tags": [],
80
+ "text": ""
81
+ },
82
+ "attribute": "location-address",
83
+ "reflect": false
84
+ }
85
+ }; }
86
+ }
@@ -1,39 +1,25 @@
1
1
  .salon-modal.salon-modal--booking:before {
2
2
  display: none;
3
3
  }
4
-
5
4
  .salon-modal.salon-modal--booking .salon-modal--inner,
6
5
  .salon-modal.salon-modal--booking .salon-modal--content {
7
6
  max-width: none;
8
7
  width: 100%;
9
8
  height: 100%;
10
9
  }
11
-
12
10
  .salon-modal.salon-modal--booking .salon-modal--close {
13
- width: 48px;
14
- height: 48px;
15
- right: 10px;
16
- top: 12px;
11
+ background-color: #EFEFEF;
12
+ width: 40px;
13
+ height: 40px;
14
+ right: 16px;
15
+ top: 16px;
16
+ -moz-border-radius: 50px;
17
+ -webkit-border-radius: 50px;
18
+ border-radius: 50px;
17
19
  }
18
-
19
-
20
- @media (min-width: 576px) {
21
- .salon-modal.salon-modal--booking .salon-modal--close {
22
- right: 16px;
23
- }
24
- }
25
-
26
-
27
20
  @media (min-width: 768px) {
28
21
  .salon-modal.salon-modal--booking .salon-modal--close {
29
- right: 24px;
30
- }
31
- }
32
-
33
-
34
- @media (min-width: 1200px) {
35
- .salon-modal.salon-modal--booking .salon-modal--close {
36
- right: 50%;
37
- margin-right: -585px;
22
+ right: 20px;
23
+ top: 20px;
38
24
  }
39
25
  }
@@ -6,7 +6,7 @@ export class SalonBooking {
6
6
  constructor() {
7
7
  this.buttonClass = '';
8
8
  this.buttonText = 'Book now';
9
- this.primaryColor = Colors.Coral03;
9
+ this.primaryColor = Colors.Primary;
10
10
  }
11
11
  openModal() {
12
12
  const elBookingModal = document.createElement('div');
@@ -40,7 +40,7 @@ export class SalonBooking {
40
40
  }
41
41
  static get is() { return "salon-booking"; }
42
42
  static get originalStyleUrls() { return {
43
- "$": ["index.css"]
43
+ "$": ["index.less"]
44
44
  }; }
45
45
  static get styleUrls() { return {
46
46
  "$": ["index.css"]
@@ -115,7 +115,7 @@ export class SalonBooking {
115
115
  },
116
116
  "attribute": "primary-color",
117
117
  "reflect": false,
118
- "defaultValue": "Colors.Coral03"
118
+ "defaultValue": "Colors.Primary"
119
119
  }
120
120
  }; }
121
121
  }
@@ -2,7 +2,7 @@ import { Component, Prop, h, State } from '@stencil/core';
2
2
  import { Colors } from '../../constants/colors';
3
3
  export class SalonBookingModal {
4
4
  constructor() {
5
- this.primaryColor = Colors.Coral03;
5
+ this.primaryColor = Colors.Primary;
6
6
  this.redirectUrl = window.btoa(window.location.href);
7
7
  this.isModalOpen = true;
8
8
  }
@@ -18,11 +18,11 @@ export class SalonBookingModal {
18
18
  h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }),
19
19
  h("div", { class: "salon-modal--inner" },
20
20
  h("div", { class: "salon-modal--content" },
21
- 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
+ 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` })))))));
22
22
  }
23
23
  static get is() { return "salon-booking-modal"; }
24
24
  static get originalStyleUrls() { return {
25
- "$": ["index.css"]
25
+ "$": ["index.less"]
26
26
  }; }
27
27
  static get styleUrls() { return {
28
28
  "$": ["index.css"]
@@ -61,7 +61,7 @@ export class SalonBookingModal {
61
61
  },
62
62
  "attribute": "primary-color",
63
63
  "reflect": false,
64
- "defaultValue": "Colors.Coral03"
64
+ "defaultValue": "Colors.Primary"
65
65
  },
66
66
  "redirectUrl": {
67
67
  "type": "string",
@@ -0,0 +1,25 @@
1
+ .salon-modal.salon-modal--gift-card:before {
2
+ display: none;
3
+ }
4
+ .salon-modal.salon-modal--gift-card .salon-modal--inner,
5
+ .salon-modal.salon-modal--gift-card .salon-modal--content {
6
+ max-width: none;
7
+ width: 100%;
8
+ height: 100%;
9
+ }
10
+ .salon-modal.salon-modal--gift-card .salon-modal--close {
11
+ background-color: #EFEFEF;
12
+ width: 40px;
13
+ height: 40px;
14
+ right: 16px;
15
+ top: 16px;
16
+ -moz-border-radius: 50px;
17
+ -webkit-border-radius: 50px;
18
+ border-radius: 50px;
19
+ }
20
+ @media (min-width: 768px) {
21
+ .salon-modal.salon-modal--gift-card .salon-modal--close {
22
+ right: 20px;
23
+ top: 20px;
24
+ }
25
+ }
@@ -6,13 +6,14 @@ export class SalonGiftCard {
6
6
  constructor() {
7
7
  this.buttonClass = '';
8
8
  this.buttonText = 'Buy Gift card';
9
- this.primaryColor = Colors.Coral03;
9
+ this.primaryColor = Colors.Primary;
10
10
  }
11
11
  openModal() {
12
12
  const elBookingModal = document.createElement('div');
13
13
  elBookingModal.innerHTML = `
14
14
  <salon-gift-card-modal
15
15
  salon-id=${this.salonId}
16
+ primary-color=${this.primaryColor}
16
17
  ></salon-gift-card-modal>
17
18
  `;
18
19
  document.body.appendChild(elBookingModal);
@@ -39,7 +40,7 @@ export class SalonGiftCard {
39
40
  }
40
41
  static get is() { return "salon-gift-card"; }
41
42
  static get originalStyleUrls() { return {
42
- "$": ["index.css"]
43
+ "$": ["index.less"]
43
44
  }; }
44
45
  static get styleUrls() { return {
45
46
  "$": ["index.css"]
@@ -114,7 +115,7 @@ export class SalonGiftCard {
114
115
  },
115
116
  "attribute": "primary-color",
116
117
  "reflect": false,
117
- "defaultValue": "Colors.Coral03"
118
+ "defaultValue": "Colors.Primary"
118
119
  }
119
120
  }; }
120
121
  }