favesalon-embed 1.0.3 → 1.0.4

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 (161) hide show
  1. package/dist/{favesalon-embed/_commonjsHelpers-9bc404fc.js → cjs/_commonjsHelpers-5cfcba41.js} +6 -14
  2. package/dist/cjs/chat-box_5.cjs.entry.js +17439 -0
  3. package/dist/cjs/chat-button.cjs.entry.js +55 -0
  4. package/dist/cjs/colors-38421769.js +69 -0
  5. package/dist/cjs/favesalon-embed.cjs.js +23 -0
  6. package/dist/cjs/google-map.cjs.entry.js +52 -0
  7. package/dist/{favesalon-embed/index-ac52896a.js → cjs/index-7f190886.js} +47 -454
  8. package/dist/cjs/index-dd8176c4.js +1531 -0
  9. package/dist/cjs/index.cjs.js +2 -0
  10. package/dist/cjs/loader.cjs.js +22 -0
  11. package/dist/cjs/relativeTime-3721080d.js +9 -0
  12. package/dist/cjs/salon-booking-modal.cjs.entry.js +30 -0
  13. package/dist/cjs/salon-booking.cjs.entry.js +51 -0
  14. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
  15. package/dist/cjs/salon-gift-card.cjs.entry.js +51 -0
  16. package/dist/cjs/salon-info.cjs.entry.js +33 -0
  17. package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
  18. package/dist/cjs/salon-latest-styles_3.cjs.entry.js +241 -0
  19. package/dist/cjs/salon-lookbook.cjs.entry.js +222 -0
  20. package/dist/cjs/salon-ranking.cjs.entry.js +60 -0
  21. package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
  22. package/dist/cjs/salon-services.cjs.entry.js +81 -0
  23. package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
  24. package/dist/{favesalon-embed/services-7cb8f2a6.js → cjs/services-d1bdf299.js} +55 -2415
  25. package/dist/cjs/style-detail.cjs.entry.js +312 -0
  26. package/dist/cjs/utils-c5a33b3c.js +23 -0
  27. package/dist/collection/collection-manifest.json +33 -0
  28. package/dist/collection/components/chat-box/index.css +105 -0
  29. package/dist/collection/components/chat-box/index.js +138 -0
  30. package/dist/collection/components/chat-button/index.css +101 -0
  31. package/dist/collection/components/chat-button/index.js +155 -0
  32. package/dist/collection/components/chat-form/index.css +40 -0
  33. package/dist/collection/components/chat-form/index.js +79 -0
  34. package/dist/collection/components/chat-messages/index.css +48 -0
  35. package/dist/collection/components/chat-messages/index.js +142 -0
  36. package/dist/collection/components/chat-rooms/index.css +102 -0
  37. package/dist/collection/components/chat-rooms/index.js +157 -0
  38. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  39. package/dist/collection/components/google-map/index.css +5 -0
  40. package/dist/collection/components/google-map/index.js +90 -0
  41. package/dist/collection/components/salon-booking/index.css +30 -0
  42. package/dist/collection/components/salon-booking/index.js +126 -0
  43. package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
  44. package/dist/collection/components/salon-gift-card/index.css +30 -0
  45. package/dist/collection/components/salon-gift-card/index.js +126 -0
  46. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
  47. package/dist/collection/components/salon-info/index.css +1 -0
  48. package/dist/collection/components/salon-info/index.js +77 -0
  49. package/dist/collection/components/salon-latest-reviews/index.css +11 -0
  50. package/dist/collection/components/salon-latest-reviews/index.js +163 -0
  51. package/dist/collection/components/salon-latest-styles/index.css +12 -0
  52. package/dist/{favesalon-embed/salon-latest-styles.entry.js → collection/components/salon-latest-styles/index.js} +99 -14
  53. package/dist/collection/components/salon-locations/index.css +24 -0
  54. package/dist/{favesalon-embed/salon-locations.entry.js → collection/components/salon-locations/index.js} +95 -15
  55. package/dist/collection/components/salon-lookbook/index.css +15 -0
  56. package/dist/collection/components/salon-lookbook/index.js +368 -0
  57. package/dist/collection/components/salon-ranking/index.css +3 -0
  58. package/dist/collection/components/salon-ranking/index.js +117 -0
  59. package/dist/collection/components/salon-reviews/index.css +18 -0
  60. package/dist/collection/components/salon-reviews/index.js +249 -0
  61. package/dist/collection/components/salon-schedules/index.css +18 -0
  62. package/dist/{favesalon-embed/salon-schedules.entry.js → collection/components/salon-schedules/index.js} +95 -14
  63. package/dist/collection/components/salon-services/index.css +1 -0
  64. package/dist/collection/components/salon-services/index.js +146 -0
  65. package/dist/collection/components/salon-stylists/index.css +43 -0
  66. package/dist/collection/components/salon-stylists/index.js +184 -0
  67. package/dist/collection/components/style-detail/index.css +76 -0
  68. package/dist/collection/components/style-detail/index.js +386 -0
  69. package/dist/collection/components/user-avatar/index.css +0 -0
  70. package/dist/collection/components/user-avatar/index.js +159 -0
  71. package/dist/collection/constants/colors.js +65 -0
  72. package/dist/collection/global/global.js +0 -0
  73. package/dist/collection/index.js +1 -0
  74. package/dist/collection/mocks/users.js +10 -0
  75. package/dist/collection/services/services.js +295 -0
  76. package/dist/collection/types/chat.js +23 -0
  77. package/dist/collection/types/common.js +11 -0
  78. package/dist/collection/types/review.js +39 -0
  79. package/dist/collection/types/salon.js +58 -0
  80. package/dist/collection/types/service.js +24 -0
  81. package/dist/collection/types/style.js +128 -0
  82. package/dist/collection/types/stylist.js +30 -0
  83. package/dist/collection/types/user.js +10 -0
  84. package/dist/collection/utils/utils.js +23 -0
  85. package/dist/custom-elements/index.js +44974 -0
  86. package/dist/{favesalon-embed/_commonjsHelpers-a4f66ccd.js → esm/_commonjsHelpers-66ac50f5.js} +2 -14
  87. package/dist/{favesalon-embed/chat-rooms.entry.js → esm/chat-box_5.entry.js} +182 -30
  88. package/dist/{favesalon-embed → esm}/chat-button.entry.js +3 -3
  89. package/dist/esm/favesalon-embed.js +18 -0
  90. package/dist/{favesalon-embed → esm}/google-map.entry.js +1 -1
  91. package/dist/esm/index-0494771f.js +1504 -0
  92. package/dist/{favesalon-embed/index-00b83e1c.js → esm/index-a1c7583c.js} +15 -425
  93. package/dist/esm/index.js +1 -0
  94. package/dist/esm/loader.js +18 -0
  95. package/dist/esm/polyfills/core-js.js +11 -0
  96. package/dist/esm/polyfills/css-shim.js +1 -0
  97. package/dist/esm/polyfills/dom.js +79 -0
  98. package/dist/esm/polyfills/es5-html-element.js +1 -0
  99. package/dist/esm/polyfills/index.js +34 -0
  100. package/dist/esm/polyfills/system.js +6 -0
  101. package/dist/esm/relativeTime-baa50aa2.js +7 -0
  102. package/dist/{favesalon-embed → esm}/salon-booking-modal.entry.js +1 -1
  103. package/dist/{favesalon-embed → esm}/salon-booking.entry.js +3 -3
  104. package/dist/{favesalon-embed → esm}/salon-gift-card-modal.entry.js +1 -1
  105. package/dist/{favesalon-embed → esm}/salon-gift-card.entry.js +3 -3
  106. package/dist/{favesalon-embed → esm}/salon-info.entry.js +3 -3
  107. package/dist/{favesalon-embed → esm}/salon-latest-reviews.entry.js +4 -4
  108. package/dist/esm/salon-latest-styles_3.entry.js +235 -0
  109. package/dist/{favesalon-embed → esm}/salon-lookbook.entry.js +3 -3
  110. package/dist/{favesalon-embed → esm}/salon-ranking.entry.js +1 -1
  111. package/dist/{favesalon-embed → esm}/salon-reviews.entry.js +3 -3
  112. package/dist/{favesalon-embed → esm}/salon-services.entry.js +3 -3
  113. package/dist/{favesalon-embed → esm}/salon-stylists.entry.js +3 -3
  114. package/dist/{favesalon-embed/services-7c46a2fd.js → esm/services-257442e2.js} +99 -2467
  115. package/dist/{favesalon-embed → esm}/style-detail.entry.js +4 -4
  116. package/dist/{favesalon-embed/utils-2c19db45.js → esm/utils-e97485e0.js} +0 -6
  117. package/dist/favesalon-embed/favesalon-embed.css +1 -2439
  118. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -148
  119. package/dist/favesalon-embed/index.esm.js +0 -1
  120. package/dist/favesalon-embed/p-05a1c88a.entry.js +1 -0
  121. package/dist/favesalon-embed/p-0acf0447.entry.js +1 -0
  122. package/dist/favesalon-embed/p-0bc4f624.js +1 -0
  123. package/dist/favesalon-embed/p-1af1515f.entry.js +1 -0
  124. package/dist/favesalon-embed/p-1cba5fc9.entry.js +1 -0
  125. package/dist/favesalon-embed/p-39a4ef15.entry.js +1 -0
  126. package/dist/favesalon-embed/p-3e2cb05b.entry.js +1 -0
  127. package/dist/favesalon-embed/p-47e646f8.js +1 -0
  128. package/dist/favesalon-embed/p-487b311f.entry.js +1 -0
  129. package/dist/favesalon-embed/p-55387c2f.entry.js +1 -0
  130. package/dist/favesalon-embed/p-566f05b4.entry.js +1 -0
  131. package/dist/favesalon-embed/p-862a0de0.entry.js +1 -0
  132. package/dist/favesalon-embed/p-9fe0cbeb.js +2 -0
  133. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  134. package/dist/favesalon-embed/p-aeeb7b5f.entry.js +1 -0
  135. package/dist/favesalon-embed/p-b08e5b54.js +6 -0
  136. package/dist/favesalon-embed/p-b5cca5fc.entry.js +1 -0
  137. package/dist/favesalon-embed/p-c7fb7af5.js +1580 -0
  138. package/dist/favesalon-embed/p-ccab56d8.js +1 -0
  139. package/dist/favesalon-embed/p-d6e13053.entry.js +1 -0
  140. package/dist/favesalon-embed/p-dee42d34.entry.js +1 -0
  141. package/dist/favesalon-embed/p-e661ca1d.entry.js +1 -0
  142. package/dist/favesalon-embed/p-eeceab9c.entry.js +1 -0
  143. package/dist/index.cjs.js +1 -0
  144. package/dist/index.js +1 -0
  145. package/package.json +1 -1
  146. package/dist/favesalon-embed/app-globals-437cc3f3.js +0 -712
  147. package/dist/favesalon-embed/app-globals-60769a2c.js +0 -712
  148. package/dist/favesalon-embed/chat-box.entry.js +0 -54
  149. package/dist/favesalon-embed/chat-form.entry.js +0 -39
  150. package/dist/favesalon-embed/chat-messages.entry.js +0 -53
  151. package/dist/favesalon-embed/css-shim-b7d3d95f.js +0 -4
  152. package/dist/favesalon-embed/dom-64053c71.js +0 -73
  153. package/dist/favesalon-embed/index-04c09911.js +0 -3371
  154. package/dist/favesalon-embed/index-888e99e3.js +0 -3371
  155. package/dist/favesalon-embed/isObject-13b86c17.js +0 -203
  156. package/dist/favesalon-embed/relativeTime-15477f02.js +0 -7
  157. package/dist/favesalon-embed/relativeTime-268e64b0.js +0 -7
  158. package/dist/favesalon-embed/services-55a87166.js +0 -23655
  159. package/dist/favesalon-embed/shadow-css-98135883.js +0 -387
  160. package/dist/favesalon-embed/user-avatar.entry.js +0 -50
  161. /package/dist/{favesalon-embed → esm}/colors-ea36347a.js +0 -0
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+
7
+ /*
8
+ Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
9
+ */
10
+ const patchEsm = () => {
11
+ return index.promiseResolve();
12
+ };
13
+
14
+ const defineCustomElements = (win, options) => {
15
+ if (typeof window === 'undefined') return Promise.resolve();
16
+ return patchEsm().then(() => {
17
+ return index.bootstrapLazy([["salon-info.cjs",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}]]],["chat-box_5.cjs",[[0,"chat-box",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"chatRooms":[32],"activeRoom":[32],"fetchData":[64]}],[0,"chat-rooms",{"senderId":[2,"sender-id"],"chatRooms":[16],"activeRoom":[16],"onClickRoom":[16],"keyword":[32]}],[0,"chat-messages",{"sender":[16],"receiver":[16],"messages":[16],"chatRoomId":[1,"chat-room-id"]}],[0,"chat-form",{"senderId":[2,"sender-id"],"chatRoomId":[1,"chat-room-id"]}],[0,"user-avatar",{"size":[2],"name":[1],"description":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]],["chat-button.cjs",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"receiverId":[1,"receiver-id"],"senderInfo":[32],"receiverInfo":[32],"chatRoom":[32],"chatMessages":[32],"isChatExpanded":[32],"fetchData":[64]}]]],["salon-latest-reviews.cjs",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook.cjs",[[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"sortBy":[32],"filterBy":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onChangeFiltering":[64],"onChangeSorting":[64],"onLoadMore":[64],"fetchCategories":[64]}]]],["salon-reviews.cjs",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"stats":[32],"totalReviews":[32],"allReviews":[32],"isLoading":[32],"isSorting":[32],"isFiltering":[32],"isLoadingMore":[32],"canLoadMore":[32],"page":[32],"filterBy":[32],"sortBy":[32]}]]],["style-detail.cjs",[[0,"style-detail",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"isModalOpen":[32],"currentMediaIdx":[32],"currentMedia":[32],"albumMedias":[32],"similarStyles":[32],"totalComments":[32],"lookbookComments":[32],"isLayoutSetup":[32],"fetchData":[64]}]]],["salon-booking.cjs",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["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.cjs",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal.cjs",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking.cjs",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services.cjs",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists.cjs",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["google-map.cjs",[[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]],["salon-latest-styles_3.cjs",[[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}]]]], options);
18
+ });
19
+ };
20
+
21
+ exports.setNonce = index.setNonce;
22
+ exports.defineCustomElements = defineCustomElements;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const _commonjsHelpers = require('./_commonjsHelpers-5cfcba41.js');
4
+
5
+ var relativeTime = _commonjsHelpers.createCommonjsModule(function (module, exports) {
6
+ !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)};}}));
7
+ });
8
+
9
+ exports.relativeTime = relativeTime;
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const colors = require('./colors-38421769.js');
7
+
8
+ const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
9
+
10
+ const SalonBookingModal = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.salonId = undefined;
14
+ this.primaryColor = colors.Colors.Primary;
15
+ this.redirectUrl = window.btoa(window.location.href);
16
+ this.isModalOpen = true;
17
+ }
18
+ closeModal() {
19
+ this.isModalOpen = false;
20
+ const el = document.querySelector('salon-booking-modal');
21
+ el.remove();
22
+ }
23
+ render() {
24
+ const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
25
+ 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.closeModal() }), index.h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), 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}&closeAble=false` })))))));
26
+ }
27
+ };
28
+ SalonBookingModal.style = indexCss;
29
+
30
+ exports.salon_booking_modal = SalonBookingModal;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const index$1 = require('./index-7f190886.js');
7
+ const colors = require('./colors-38421769.js');
8
+ require('./_commonjsHelpers-5cfcba41.js');
9
+
10
+ const indexCss = ".salon-modal.salon-modal--booking:before{display:none}.salon-modal.salon-modal--booking .salon-modal--inner,.salon-modal.salon-modal--booking .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--booking .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--booking .salon-modal--close{right:20px;top:20px}}";
11
+
12
+ const SalonBooking = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.salonId = undefined;
16
+ this.buttonClass = '';
17
+ this.buttonText = 'Book now';
18
+ this.primaryColor = colors.Colors.Primary;
19
+ }
20
+ openModal() {
21
+ const elBookingModal = document.createElement('div');
22
+ elBookingModal.innerHTML = `
23
+ <salon-booking-modal
24
+ salon-id=${this.salonId}
25
+ primary-color=${this.primaryColor}
26
+ ></salon-booking-modal>
27
+ `;
28
+ document.body.appendChild(elBookingModal);
29
+ }
30
+ render() {
31
+ const buttonClass = this.buttonClass || 'btn btn-primary';
32
+ let buttonStyle = {};
33
+ if (!this.buttonClass) {
34
+ const primaryColor = index$1.color(this.primaryColor);
35
+ const primaryColorHover = primaryColor.darken(0.05);
36
+ buttonStyle = index$1.lib.css({
37
+ backgroundColor: this.primaryColor,
38
+ borderColor: this.primaryColor,
39
+ color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
40
+ ':hover': {
41
+ backgroundColor: primaryColorHover,
42
+ borderColor: primaryColorHover,
43
+ },
44
+ });
45
+ }
46
+ return (index.h("div", { class: "salon-booking" }, index.h("div", { class: "salon-booking--button" }, index.h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
47
+ }
48
+ };
49
+ SalonBooking.style = indexCss;
50
+
51
+ exports.salon_booking = SalonBooking;
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const colors = require('./colors-38421769.js');
7
+
8
+ const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
9
+
10
+ const SalonGiftCardModal = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.salonId = undefined;
14
+ this.primaryColor = colors.Colors.Primary;
15
+ this.isModalOpen = true;
16
+ }
17
+ closeModal() {
18
+ this.isModalOpen = false;
19
+ const el = document.querySelector('salon-gift-card-modal');
20
+ el.remove();
21
+ }
22
+ render() {
23
+ const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
24
+ 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.closeModal() }), index.h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), 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/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
25
+ }
26
+ };
27
+ SalonGiftCardModal.style = indexCss;
28
+
29
+ exports.salon_gift_card_modal = SalonGiftCardModal;
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const index$1 = require('./index-7f190886.js');
7
+ const colors = require('./colors-38421769.js');
8
+ require('./_commonjsHelpers-5cfcba41.js');
9
+
10
+ const indexCss = ".salon-modal.salon-modal--gift-card:before{display:none}.salon-modal.salon-modal--gift-card .salon-modal--inner,.salon-modal.salon-modal--gift-card .salon-modal--content{max-width:none;width:100%;height:100%}.salon-modal.salon-modal--gift-card .salon-modal--close{background-color:#EFEFEF;width:40px;height:40px;right:16px;top:16px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}@media (min-width: 768px){.salon-modal.salon-modal--gift-card .salon-modal--close{right:20px;top:20px}}";
11
+
12
+ const SalonGiftCard = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.salonId = undefined;
16
+ this.buttonClass = '';
17
+ this.buttonText = 'Buy Gift card';
18
+ this.primaryColor = colors.Colors.Primary;
19
+ }
20
+ openModal() {
21
+ const elBookingModal = document.createElement('div');
22
+ elBookingModal.innerHTML = `
23
+ <salon-gift-card-modal
24
+ salon-id=${this.salonId}
25
+ primary-color=${this.primaryColor}
26
+ ></salon-gift-card-modal>
27
+ `;
28
+ document.body.appendChild(elBookingModal);
29
+ }
30
+ render() {
31
+ const buttonClass = this.buttonClass || 'btn btn-primary';
32
+ let buttonStyle = {};
33
+ if (!this.buttonClass) {
34
+ const primaryColor = index$1.color(this.primaryColor);
35
+ const primaryColorHover = primaryColor.darken(0.05);
36
+ buttonStyle = index$1.lib.css({
37
+ backgroundColor: this.primaryColor,
38
+ borderColor: this.primaryColor,
39
+ color: primaryColor.isLight() ? colors.Colors.Black01 : colors.Colors.White,
40
+ ':hover': {
41
+ backgroundColor: primaryColorHover,
42
+ borderColor: primaryColorHover,
43
+ },
44
+ });
45
+ }
46
+ return (index.h("div", { class: "salon-gift-card" }, index.h("div", { class: "salon-gift-card--button" }, index.h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
47
+ }
48
+ };
49
+ SalonGiftCard.style = indexCss;
50
+
51
+ exports.salon_gift_card = SalonGiftCard;
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const services = require('./services-d1bdf299.js');
7
+ require('./_commonjsHelpers-5cfcba41.js');
8
+ require('./colors-38421769.js');
9
+
10
+ const indexCss = "";
11
+
12
+ const SalonInfo = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ this.salonId = undefined;
16
+ this.salonInfo = undefined;
17
+ }
18
+ componentWillLoad() {
19
+ this.fetchData();
20
+ }
21
+ async fetchData() {
22
+ try {
23
+ this.salonInfo = await services.HttpService().fetchSalonInfo(this.salonId);
24
+ }
25
+ catch (e) { }
26
+ }
27
+ render() {
28
+ return (index.h("div", { class: "salon-info" }, index.h("div", { class: "container" }, index.h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } }, index.h("salon-schedules", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), index.h("div", { class: "row" }, index.h("div", { class: "col-md-5", style: { marginBottom: '24px' } }, index.h("salon-locations", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), index.h("div", { class: "col-md-7", style: { marginBottom: '24px' } }, index.h("salon-latest-styles", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))))));
29
+ }
30
+ };
31
+ SalonInfo.style = indexCss;
32
+
33
+ exports.salon_info = SalonInfo;
@@ -0,0 +1,97 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const services = require('./services-d1bdf299.js');
7
+ const colors = require('./colors-38421769.js');
8
+ const utils = require('./utils-c5a33b3c.js');
9
+ require('./_commonjsHelpers-5cfcba41.js');
10
+
11
+ const indexCss = ".salon-latest-reviews .salon-review{min-width:280px}@media (min-width: 768px){.salon-latest-reviews .salon-review{min-width:300px}}";
12
+
13
+ const SalonLatestReviews = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.salonId = undefined;
17
+ this.primaryColor = colors.Colors.Primary;
18
+ this.salonReviews = [];
19
+ this.isLoading = undefined;
20
+ }
21
+ componentWillLoad() {
22
+ this.fetchData();
23
+ }
24
+ async fetchData() {
25
+ this.isLoading = true;
26
+ try {
27
+ const { data: allReviews } = await services.HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
28
+ this.salonReviews = [...allReviews];
29
+ }
30
+ catch (e) { }
31
+ this.isLoading = false;
32
+ }
33
+ render() {
34
+ if (this.isLoading) {
35
+ return (index.h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, index.h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index$1) => {
36
+ return (index.h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${colors.Colors.Gray02}`, background: colors.Colors.White, borderRadius: '8px', overflow: 'hidden' }, index$1 > 0 ? { marginLeft: '16px' } : {}) }, index.h("div", { class: "card", style: { border: 'none' } }, index.h("div", { class: "card-body" }, index.h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, index.h("div", { style: {
37
+ backgroundColor: colors.Colors.Gray02,
38
+ borderRadius: '50px',
39
+ height: '48px',
40
+ width: '48px',
41
+ float: 'left',
42
+ } }), index.h("div", { style: {
43
+ backgroundColor: colors.Colors.Gray01,
44
+ height: '16px',
45
+ width: '120px',
46
+ marginLeft: '16px',
47
+ marginTop: '14px',
48
+ float: 'left',
49
+ } })), index.h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (index.h("div", { style: {
50
+ backgroundColor: colors.Colors.Gray01,
51
+ height: '20px',
52
+ width: '20px',
53
+ marginRight: '8px',
54
+ float: 'left',
55
+ } })))), index.h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, index.h("div", { style: {
56
+ backgroundColor: colors.Colors.Gray01,
57
+ height: '16px',
58
+ width: '132px',
59
+ } })), index.h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, index.h("div", { class: "salon-review--description", style: {
60
+ fontSize: '16px',
61
+ lineHeight: '26px',
62
+ overflow: 'hidden',
63
+ } }, index.h("div", { style: {
64
+ backgroundColor: colors.Colors.Gray01,
65
+ height: '16px',
66
+ width: '240px',
67
+ float: 'left',
68
+ } })))))));
69
+ }))));
70
+ }
71
+ const ratingTexts = utils.getRatingText();
72
+ return (index.h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, index.h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index$1) => {
73
+ const { user } = review;
74
+ return (index.h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${colors.Colors.Gray02}`, background: colors.Colors.White, borderRadius: '8px', overflow: 'hidden' }, index$1 > 0 ? { marginLeft: '16px' } : {}) }, index.h("div", { class: "card", style: { border: 'none' } }, index.h("div", { class: "card-body" }, index.h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, index.h("user-avatar", { size: 48, name: index.h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), index.h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (index.h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: colors.Colors.Gray04 }) }))), index.h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: colors.Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, services.dayjs_min(review.createdDate).format(services.shortDateYearFormat))), index.h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (index.h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, index.h("div", { class: "salon-review--description", style: {
75
+ fontSize: '16px',
76
+ lineHeight: '26px',
77
+ overflow: 'hidden',
78
+ maxHeight: review.photos.length > 0 ? '52px' : '104px',
79
+ } }, review.title || review.description))), review.photos.length > 0 && (index.h("div", { style: {
80
+ display: 'flex',
81
+ flexDirection: 'row',
82
+ overflowX: 'auto',
83
+ } }, review.photos.map(photo => (index.h("div", { style: {
84
+ border: '1px solid #d9d9d9',
85
+ position: 'relative',
86
+ cursor: 'pointer',
87
+ borderRadius: '2px',
88
+ height: '66px',
89
+ marginTop: '12px',
90
+ marginRight: '12px',
91
+ } }, index.h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
92
+ }))));
93
+ }
94
+ };
95
+ SalonLatestReviews.style = indexCss;
96
+
97
+ exports.salon_latest_reviews = SalonLatestReviews;
@@ -0,0 +1,241 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd8176c4.js');
6
+ const colors = require('./colors-38421769.js');
7
+ const services = require('./services-d1bdf299.js');
8
+ const utils = require('./utils-c5a33b3c.js');
9
+ require('./_commonjsHelpers-5cfcba41.js');
10
+
11
+ const indexCss$2 = "salon-latest-styles .view--salon-styles--item{width:120px;height:120px}@media (min-width: 1024px){salon-latest-styles .view--salon-styles--item{width:200px;height:200px}}";
12
+
13
+ const SalonLatestStyles = class {
14
+ constructor(hostRef) {
15
+ index.registerInstance(this, hostRef);
16
+ this.salonId = undefined;
17
+ this.isLoading = undefined;
18
+ this.withBorder = undefined;
19
+ this.isLoadingState = undefined;
20
+ this.latestStyles = undefined;
21
+ }
22
+ componentDidLoad() {
23
+ this.fetchData();
24
+ }
25
+ async fetchData() {
26
+ this.isLoadingState = true;
27
+ try {
28
+ const promises = [
29
+ services.HttpService().fetchSalonLatestStyles(this.salonId, { limit: 6 })
30
+ .then(salonStyles => this.latestStyles = salonStyles),
31
+ ];
32
+ return Promise.all(promises)
33
+ .then(() => this.isLoadingState = false)
34
+ .catch(() => this.isLoadingState = false);
35
+ }
36
+ catch (e) { }
37
+ }
38
+ onClickLookbook(style) {
39
+ const elLookbookModal = document.createElement('div');
40
+ elLookbookModal.innerHTML = `
41
+ <style-detail
42
+ salon-id=${this.salonId}
43
+ salon-lookbook='${JSON.stringify(style)}'
44
+ ></style-detail>
45
+ `;
46
+ document.body.appendChild(elLookbookModal);
47
+ }
48
+ render() {
49
+ if (this.isLoading || this.isLoadingState) {
50
+ return (index.h("div", { class: "view view--salon-styles" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
51
+ backgroundColor: colors.Colors.Gray02,
52
+ height: '20px',
53
+ width: '120px',
54
+ } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
55
+ overflow: 'hidden',
56
+ marginLeft: '-16px',
57
+ marginBottom: '-16px',
58
+ } }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
59
+ float: 'left',
60
+ paddingLeft: '16px',
61
+ marginBottom: '16px',
62
+ } }, index.h("div", { style: {
63
+ backgroundColor: colors.Colors.Gray01,
64
+ borderRadius: '8px',
65
+ width: '120px',
66
+ height: '120px',
67
+ overflow: 'hidden',
68
+ position: 'relative',
69
+ cursor: 'pointer',
70
+ } })))))))));
71
+ }
72
+ return (index.h("div", { class: "view view--salon-styles" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Photos"), index.h("div", { style: {
73
+ overflow: 'hidden',
74
+ marginLeft: '-16px',
75
+ marginBottom: '-16px',
76
+ marginTop: '16px',
77
+ } }, (this.latestStyles || []).map((faveStyle, idx) => {
78
+ const { imageThumb, albumMedias } = faveStyle;
79
+ const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
80
+ const isVideo = firstMedia ? services.isVideoMedia(firstMedia) : false;
81
+ return (index.h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
82
+ float: 'left',
83
+ paddingLeft: '16px',
84
+ marginBottom: '16px',
85
+ } }, index.h("div", { class: "view--salon-styles--item", style: Object.assign({ backgroundColor: colors.Colors.Gray01, borderRadius: '8px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, !isVideo && firstMedia ? {
86
+ backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
87
+ backgroundRepeat: 'no-repeat',
88
+ backgroundPosition: 'center center',
89
+ backgroundSize: 'cover',
90
+ } : {}), onClick: () => this.onClickLookbook(faveStyle) }, isVideo && firstMedia && (index.h("div", null, index.h("video", { muted: true, width: "100%", height: "100%", poster: imageThumb }, index.h("source", { src: firstMedia.mediaUrl, type: "video/mp4" })), index.h("i", { class: "ri-play-circle-fill", style: {
91
+ fontSize: '48px',
92
+ color: colors.Colors.TextColor,
93
+ position: 'absolute',
94
+ left: '50%',
95
+ top: '50%',
96
+ transform: 'translate(-50%, -50%)',
97
+ } }))))));
98
+ })))));
99
+ }
100
+ };
101
+ SalonLatestStyles.style = indexCss$2;
102
+
103
+ const indexCss$1 = "@media (min-width: 768px){salon-locations .salon-contact--links{overflow:hidden;margin-left:-32px}salon-locations .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px}salon-locations .salon-contact--links-item:nth-child(2n+1){clear:left}salon-locations .salon-contact--links-item+.salon-contact--links-item{margin-top:8px}}";
104
+
105
+ const SalonLocations = class {
106
+ constructor(hostRef) {
107
+ index.registerInstance(this, hostRef);
108
+ this.salonId = undefined;
109
+ this.salonInfo = undefined;
110
+ this.isLoading = undefined;
111
+ this.withBorder = undefined;
112
+ this.salonInfoState = undefined;
113
+ }
114
+ componentWillLoad() {
115
+ if (this.salonInfo) {
116
+ this.salonInfoState = JSON.parse(this.salonInfo);
117
+ }
118
+ else {
119
+ this.fetchData();
120
+ }
121
+ }
122
+ fetchData() {
123
+ try {
124
+ services.HttpService().fetchSalonInfo(this.salonId)
125
+ .then(salonInfo => this.salonInfoState = salonInfo);
126
+ }
127
+ catch (e) { }
128
+ }
129
+ render() {
130
+ if (this.isLoading) {
131
+ return (index.h("div", { class: "view view--salon-locations" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
132
+ backgroundColor: colors.Colors.Gray02,
133
+ height: '20px',
134
+ width: '120px',
135
+ } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
136
+ backgroundColor: colors.Colors.Gray01,
137
+ height: '16px',
138
+ width: '50%',
139
+ } }), index.h("div", { style: {
140
+ backgroundColor: colors.Colors.Gray01,
141
+ height: '16px',
142
+ width: '50%',
143
+ marginTop: '8px',
144
+ } }), index.h("div", { style: {
145
+ backgroundColor: colors.Colors.Gray01,
146
+ height: '192px',
147
+ width: '100%',
148
+ marginTop: '24px',
149
+ } })))));
150
+ }
151
+ const { businessPhone, businessName, website, email, } = this.salonInfoState || {};
152
+ const websiteUrl = utils.formatWebsiteUrl(website);
153
+ const fullAddress = utils.formatFullAddress(this.salonInfoState);
154
+ return (index.h("div", { class: "view view--salon-locations" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Contact"), index.h("div", { class: "salon-contact--links", style: { marginTop: '16px' } }, businessPhone && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-phone-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { href: `tel:${businessPhone}`, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, businessPhone))), websiteUrl && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-links-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { target: websiteUrl && websiteUrl.indexOf(window.location.hostname) === -1 ? '_blank' : undefined, href: websiteUrl, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, websiteUrl))), email && (index.h("div", { class: "salon-contact--links-item" }, index.h("i", { class: "ri-mail-line", style: { color: colors.Colors.Gray04, fontSize: '18px', marginRight: '6px' } }), " ", index.h("a", { href: `mailto:${email}`, style: { color: colors.Colors.TextColor, textDecoration: 'none' } }, email)))), index.h("div", { class: "view--salon-info--map", style: { marginTop: '24px' } }, index.h("google-map", { "location-name": businessName, "location-address": fullAddress })))));
155
+ }
156
+ };
157
+ SalonLocations.style = indexCss$1;
158
+
159
+ const indexCss = "salon-schedules .salon-schedules--day{display:flex;flex-direction:row;min-width:240px}@media (min-width: 768px){salon-schedules .salon-schedules--dates{overflow:hidden;margin-left:-32px}salon-schedules .salon-schedules--day{float:left;padding-left:32px}}";
160
+
161
+ const SalonSchedules = class {
162
+ constructor(hostRef) {
163
+ index.registerInstance(this, hostRef);
164
+ this.salonId = undefined;
165
+ this.salonInfo = undefined;
166
+ this.isLoading = undefined;
167
+ this.withBorder = undefined;
168
+ this.salonInfoState = undefined;
169
+ }
170
+ componentWillLoad() {
171
+ if (this.salonInfo) {
172
+ this.salonInfoState = JSON.parse(this.salonInfo);
173
+ }
174
+ else {
175
+ this.fetchData();
176
+ }
177
+ }
178
+ fetchData() {
179
+ try {
180
+ services.HttpService().fetchSalonInfo(this.salonId)
181
+ .then(salonInfo => this.salonInfoState = salonInfo);
182
+ }
183
+ catch (e) { }
184
+ }
185
+ renderBusinessHour(businessHour) {
186
+ if (businessHour.status === services.BusinessHourStatus.ByAppointment) {
187
+ return 'By Appointment';
188
+ }
189
+ if (businessHour.status === services.BusinessHourStatus.Close) {
190
+ return 'Close';
191
+ }
192
+ return `${businessHour.openTime} - ${businessHour.closeTime}`;
193
+ }
194
+ render() {
195
+ if (this.isLoading) {
196
+ return (index.h("div", { class: "view view--salon-contact" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: {
197
+ backgroundColor: colors.Colors.Gray02,
198
+ height: '20px',
199
+ width: '120px',
200
+ } }), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
201
+ backgroundColor: colors.Colors.Gray01,
202
+ height: '16px',
203
+ width: '30%',
204
+ } }), index.h("div", { style: {
205
+ backgroundColor: colors.Colors.Gray01,
206
+ height: '16px',
207
+ width: '40%',
208
+ marginTop: '8px',
209
+ } }), index.h("div", { style: {
210
+ backgroundColor: colors.Colors.Gray01,
211
+ height: '16px',
212
+ width: '75%',
213
+ marginTop: '12px',
214
+ } }), index.h("div", { style: {
215
+ backgroundColor: colors.Colors.Gray01,
216
+ height: '16px',
217
+ width: '75%',
218
+ marginTop: '8px',
219
+ } })), index.h("div", { style: { marginTop: '24px' } }, index.h("div", { style: {
220
+ overflow: 'hidden',
221
+ marginLeft: '-16px',
222
+ marginBottom: '-16px',
223
+ } }, [1, 2, 3, 4, 5, 6, 7].map((fakeId, idx) => (index.h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
224
+ float: 'left',
225
+ paddingLeft: '16px',
226
+ marginBottom: '16px',
227
+ } }, index.h("div", { style: {
228
+ backgroundColor: colors.Colors.Gray01,
229
+ width: '120px',
230
+ height: '20px',
231
+ } })))))))));
232
+ }
233
+ const { about, businessHours, } = (this.salonInfoState || {});
234
+ return (index.h("div", { class: "view view--salon-contact" }, index.h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${colors.Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, index.h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "About"), about && (index.h("div", { class: "salon-contact--info--desc", style: { fontSize: '16px', marginTop: '16px' }, innerHTML: about })), businessHours && businessHours.length > 0 && (index.h("div", { class: "salon-schedules", style: { marginTop: '24px' } }, index.h("div", { class: "salon-schedules--title", style: { fontSize: '16px', fontWeight: 'bold' } }, "Working hours"), index.h("div", { class: "salon-schedules--dates" }, index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Mon"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[0]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Tue"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[1]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Wed"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[2]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Thur"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[3]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Fri"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[4]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sat"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[5]))), index.h("div", { class: "salon-schedules--day", style: { marginTop: '8px' } }, index.h("div", { class: "salon-schedules--day-name", style: { fontWeight: 'bold', minWidth: '40px' } }, "Sun"), index.h("div", { class: "salon-schedules--day-time" }, this.renderBusinessHour(businessHours[6])))))))));
235
+ }
236
+ };
237
+ SalonSchedules.style = indexCss;
238
+
239
+ exports.salon_latest_styles = SalonLatestStyles;
240
+ exports.salon_locations = SalonLocations;
241
+ exports.salon_schedules = SalonSchedules;