favesalon-embed 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
  3. package/dist/cjs/colors-38421769.js +69 -0
  4. package/dist/cjs/favesalon-embed.cjs.js +20 -0
  5. package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
  6. package/dist/cjs/google-map_5.cjs.entry.js +291 -0
  7. package/dist/cjs/index-7f190886.js +4396 -0
  8. package/{cjs/index-7d179a70.js → dist/cjs/index-e6bea8f5.js} +87 -3
  9. package/{cjs → dist/cjs}/index.cjs.js +0 -0
  10. package/dist/cjs/loader.cjs.js +22 -0
  11. package/dist/cjs/salon-booking-modal.cjs.entry.js +29 -0
  12. package/dist/cjs/salon-booking.cjs.entry.js +50 -0
  13. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +28 -0
  14. package/dist/cjs/salon-gift-card.cjs.entry.js +50 -0
  15. package/dist/cjs/salon-latest-reviews.cjs.entry.js +95 -0
  16. package/dist/cjs/salon-lookbook.cjs.entry.js +218 -0
  17. package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +7 -7
  18. package/dist/cjs/salon-reviews.cjs.entry.js +186 -0
  19. package/dist/cjs/salon-services.cjs.entry.js +78 -0
  20. package/dist/cjs/salon-stylists.cjs.entry.js +112 -0
  21. package/{cjs/services-d6f8214c.js → dist/cjs/services-eee8f251.js} +317 -361
  22. package/dist/cjs/style-detail.cjs.entry.js +310 -0
  23. package/{cjs → dist/cjs}/user-avatar.cjs.entry.js +4 -4
  24. package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
  25. package/{collection → dist/collection}/collection-manifest.json +2 -2
  26. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  27. package/{collection → dist/collection}/components/google-map/index.css +0 -1
  28. package/dist/collection/components/google-map/index.js +86 -0
  29. package/{collection → dist/collection}/components/salon-booking/index.css +10 -24
  30. package/{collection → dist/collection}/components/salon-booking/index.js +29 -11
  31. package/{collection → dist/collection}/components/salon-booking/salon-booking-modal.js +12 -6
  32. package/dist/collection/components/salon-gift-card/index.css +25 -0
  33. package/{collection → dist/collection}/components/salon-gift-card/index.js +44 -6
  34. package/{collection → dist/collection}/components/salon-gift-card/salon-gift-card-modal.js +30 -4
  35. package/{collection/components/salon-locations → dist/collection/components/salon-info}/index.css +0 -0
  36. package/{collection → dist/collection}/components/salon-info/index.js +6 -32
  37. package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -3
  38. package/dist/collection/components/salon-latest-reviews/index.js +176 -0
  39. package/dist/collection/components/salon-latest-styles/index.css +10 -0
  40. package/dist/collection/components/salon-latest-styles/index.js +178 -0
  41. package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +6 -6
  42. package/dist/collection/components/salon-locations/index.js +151 -0
  43. package/dist/collection/components/salon-lookbook/index.css +12 -0
  44. package/{collection → dist/collection}/components/salon-lookbook/index.js +122 -49
  45. package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
  46. package/{collection → dist/collection}/components/salon-ranking/index.js +5 -5
  47. package/dist/collection/components/salon-reviews/index.css +15 -0
  48. package/dist/collection/components/salon-reviews/index.js +286 -0
  49. package/dist/collection/components/salon-schedules/index.css +15 -0
  50. package/dist/collection/components/salon-schedules/index.js +189 -0
  51. package/{collection/components/salon-reviews → dist/collection/components/salon-services}/index.css +0 -0
  52. package/dist/collection/components/salon-services/index.js +156 -0
  53. package/{collection → dist/collection}/components/salon-stylists/index.css +0 -8
  54. package/dist/collection/components/salon-stylists/index.js +183 -0
  55. package/dist/collection/components/style-detail/index.css +62 -0
  56. package/dist/collection/components/style-detail/index.js +461 -0
  57. package/{collection/components/salon-services → dist/collection/components/user-avatar}/index.css +0 -0
  58. package/{collection → dist/collection}/components/user-avatar/index.js +2 -2
  59. package/dist/collection/constants/colors.js +65 -0
  60. package/{collection → dist/collection}/global/global.js +0 -0
  61. package/{collection → dist/collection}/index.js +0 -0
  62. package/dist/collection/services/services.js +174 -0
  63. package/dist/collection/types/common.js +11 -0
  64. package/{collection → dist/collection}/types/review.js +9 -5
  65. package/dist/collection/types/salon.js +58 -0
  66. package/{collection → dist/collection}/types/service.js +0 -0
  67. package/dist/collection/types/style.js +128 -0
  68. package/dist/collection/types/stylist.js +30 -0
  69. package/{collection/components/user-avatar/index.css → dist/collection/types/tmp.js} +0 -0
  70. package/{collection → dist/collection}/types/user.js +2 -2
  71. package/{collection → dist/collection}/utils/utils.js +0 -0
  72. package/{custom-elements → dist/custom-elements}/index.d.ts +12 -12
  73. package/{custom-elements → dist/custom-elements}/index.js +5783 -870
  74. package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
  75. package/dist/esm/colors-ea36347a.js +67 -0
  76. package/dist/esm/favesalon-embed.js +18 -0
  77. package/{esm → dist/esm}/global-e1089ffd.js +0 -0
  78. package/dist/esm/google-map_5.entry.js +283 -0
  79. package/{esm/index-2160b80b.js → dist/esm/index-6af0a03d.js} +87 -4
  80. package/dist/esm/index-80523fec.js +4393 -0
  81. package/{esm → dist/esm}/index.js +0 -0
  82. package/dist/esm/loader.js +18 -0
  83. package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  84. package/{esm → dist/esm}/polyfills/css-shim.js +0 -0
  85. package/{esm → dist/esm}/polyfills/dom.js +0 -0
  86. package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  87. package/{esm → dist/esm}/polyfills/index.js +0 -0
  88. package/{esm → dist/esm}/polyfills/system.js +0 -0
  89. package/dist/esm/salon-booking-modal.entry.js +25 -0
  90. package/dist/esm/salon-booking.entry.js +46 -0
  91. package/dist/esm/salon-gift-card-modal.entry.js +24 -0
  92. package/dist/esm/salon-gift-card.entry.js +46 -0
  93. package/dist/esm/salon-latest-reviews.entry.js +91 -0
  94. package/dist/esm/salon-lookbook.entry.js +214 -0
  95. package/{esm → dist/esm}/salon-ranking.entry.js +7 -7
  96. package/dist/esm/salon-reviews.entry.js +182 -0
  97. package/dist/esm/salon-services.entry.js +74 -0
  98. package/dist/esm/salon-stylists.entry.js +108 -0
  99. package/{esm/services-57fadd0a.js → dist/esm/services-295247b1.js} +310 -355
  100. package/dist/esm/style-detail.entry.js +306 -0
  101. package/{esm → dist/esm}/user-avatar.entry.js +4 -4
  102. package/{esm → dist/esm}/utils-e97485e0.js +0 -0
  103. package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
  104. package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
  105. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
  106. package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
  107. package/dist/favesalon-embed/p-292b97ba.entry.js +1 -0
  108. package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
  109. package/dist/favesalon-embed/p-4869dfed.entry.js +1 -0
  110. package/{favesalon-embed → dist/favesalon-embed}/p-4a5eca9a.js +0 -0
  111. package/dist/favesalon-embed/p-4aee4fd9.entry.js +1 -0
  112. package/dist/favesalon-embed/p-5528c705.entry.js +1 -0
  113. package/dist/favesalon-embed/p-612ad685.entry.js +1 -0
  114. package/dist/favesalon-embed/p-75aef7e0.entry.js +1 -0
  115. package/dist/favesalon-embed/p-8c780874.entry.js +1 -0
  116. package/dist/favesalon-embed/p-8dbf04c5.js +1 -0
  117. package/dist/favesalon-embed/p-9f31061a.entry.js +1 -0
  118. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  119. package/dist/favesalon-embed/p-a60d78e9.entry.js +1 -0
  120. package/dist/favesalon-embed/p-a6debdae.entry.js +1 -0
  121. package/dist/favesalon-embed/p-bad1e9a7.entry.js +1 -0
  122. package/dist/favesalon-embed/p-c2ecb365.js +1 -0
  123. package/dist/favesalon-embed/p-c7dea70c.entry.js +1 -0
  124. package/dist/favesalon-embed/p-d6083940.js +1 -0
  125. package/dist/favesalon-embed/p-f0e14641.entry.js +1 -0
  126. package/dist/favesalon-embed/p-fc9a5551.js +6 -0
  127. package/{index.cjs.js → dist/index.cjs.js} +0 -0
  128. package/{index.js → dist/index.js} +0 -0
  129. package/dist/types/components/google-map/index.d.ts +5 -0
  130. package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
  131. package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
  132. package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
  133. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
  134. package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
  135. package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
  136. package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
  137. package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
  138. package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
  139. package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
  140. package/dist/types/components/salon-reviews/index.d.ts +24 -0
  141. package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
  142. package/{types → dist/types}/components/salon-services/index.d.ts +2 -0
  143. package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
  144. package/dist/types/components/style-detail/index.d.ts +24 -0
  145. package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
  146. package/{types → dist/types}/components.d.ts +62 -41
  147. package/dist/types/constants/colors.d.ts +65 -0
  148. package/{types → dist/types}/index.d.ts +0 -0
  149. package/dist/types/services/services.d.ts +60 -0
  150. package/{types → dist/types}/stencil-public-runtime.d.ts +0 -0
  151. package/dist/types/types/common.d.ts +11 -0
  152. package/{types → dist/types}/types/review.d.ts +4 -0
  153. package/{types → dist/types}/types/salon.d.ts +3 -1
  154. package/{types → dist/types}/types/service.d.ts +0 -0
  155. package/dist/types/types/style.d.ts +88 -0
  156. package/{types → dist/types}/types/stylist.d.ts +2 -1
  157. package/dist/types/types/tmp.d.ts +0 -0
  158. package/{types → dist/types}/types/user.d.ts +2 -2
  159. package/{types → dist/types}/utils/utils.d.ts +0 -0
  160. package/loader/cdn.js +3 -0
  161. package/loader/index.cjs.js +3 -0
  162. package/loader/index.d.ts +12 -0
  163. package/loader/index.es2017.js +3 -0
  164. package/loader/index.js +4 -0
  165. package/loader/package.json +10 -0
  166. package/package.json +18 -13
  167. package/readme.md +23 -2
  168. package/cjs/colors-7f354880.js +0 -95
  169. package/cjs/favesalon-embed.cjs.js +0 -20
  170. package/cjs/google-map.cjs.entry.js +0 -47
  171. package/cjs/loader.cjs.js +0 -22
  172. package/cjs/salon-booking-modal.cjs.entry.js +0 -23
  173. package/cjs/salon-booking_2.cjs.entry.js +0 -56
  174. package/cjs/salon-contact_4.cjs.entry.js +0 -154
  175. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
  176. package/cjs/salon-info.cjs.entry.js +0 -34
  177. package/cjs/salon-latest-reviews.cjs.entry.js +0 -57
  178. package/cjs/salon-lookbook.cjs.entry.js +0 -187
  179. package/cjs/salon-reviews.cjs.entry.js +0 -196
  180. package/cjs/salon-services.cjs.entry.js +0 -40
  181. package/cjs/salon-stylists.cjs.entry.js +0 -53
  182. package/collection/components/google-map/index.js +0 -97
  183. package/collection/components/salon-contact/index.js +0 -88
  184. package/collection/components/salon-gift-card/index.css +0 -25
  185. package/collection/components/salon-info/index.css +0 -3
  186. package/collection/components/salon-latest-reviews/index.js +0 -108
  187. package/collection/components/salon-locations/index.js +0 -80
  188. package/collection/components/salon-lookbook/index.css +0 -12
  189. package/collection/components/salon-reviews/index.js +0 -291
  190. package/collection/components/salon-schedules/index.css +0 -14
  191. package/collection/components/salon-schedules/index.js +0 -103
  192. package/collection/components/salon-services/index.js +0 -86
  193. package/collection/components/salon-styles/index.css +0 -23
  194. package/collection/components/salon-styles/index.js +0 -100
  195. package/collection/components/salon-stylists/index.js +0 -96
  196. package/collection/constants/colors.js +0 -91
  197. package/collection/services/services.js +0 -203
  198. package/collection/types/common.js +0 -2
  199. package/collection/types/salon.js +0 -52
  200. package/collection/types/style.js +0 -28
  201. package/collection/types/stylist.js +0 -13
  202. package/esm/colors-1ec90c5f.js +0 -93
  203. package/esm/favesalon-embed.js +0 -18
  204. package/esm/google-map.entry.js +0 -43
  205. package/esm/loader.js +0 -18
  206. package/esm/salon-booking-modal.entry.js +0 -19
  207. package/esm/salon-booking_2.entry.js +0 -51
  208. package/esm/salon-contact_4.entry.js +0 -147
  209. package/esm/salon-gift-card-modal.entry.js +0 -16
  210. package/esm/salon-info.entry.js +0 -30
  211. package/esm/salon-latest-reviews.entry.js +0 -53
  212. package/esm/salon-lookbook.entry.js +0 -183
  213. package/esm/salon-reviews.entry.js +0 -192
  214. package/esm/salon-services.entry.js +0 -36
  215. package/esm/salon-stylists.entry.js +0 -49
  216. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  217. package/favesalon-embed/p-14a46adf.entry.js +0 -1
  218. package/favesalon-embed/p-2da2ed75.js +0 -1
  219. package/favesalon-embed/p-3712d9ab.entry.js +0 -1
  220. package/favesalon-embed/p-38066f9f.entry.js +0 -1
  221. package/favesalon-embed/p-4e2d7b29.js +0 -1
  222. package/favesalon-embed/p-520c8ffb.entry.js +0 -1
  223. package/favesalon-embed/p-54a1c294.entry.js +0 -1
  224. package/favesalon-embed/p-762520f2.js +0 -1
  225. package/favesalon-embed/p-94a0991e.entry.js +0 -1
  226. package/favesalon-embed/p-94b179eb.entry.js +0 -1
  227. package/favesalon-embed/p-977bd8bc.entry.js +0 -1
  228. package/favesalon-embed/p-bc363938.entry.js +0 -1
  229. package/favesalon-embed/p-bf9c83a3.entry.js +0 -1
  230. package/favesalon-embed/p-c5ebd3c9.entry.js +0 -1
  231. package/favesalon-embed/p-d84b61b0.entry.js +0 -1
  232. package/favesalon-embed/p-f15bcb43.entry.js +0 -1
  233. package/types/components/google-map/index.d.ts +0 -10
  234. package/types/components/salon-contact/index.d.ts +0 -9
  235. package/types/components/salon-reviews/index.d.ts +0 -23
  236. package/types/components/salon-styles/index.d.ts +0 -9
  237. package/types/constants/colors.d.ts +0 -88
  238. package/types/services/services.d.ts +0 -24
  239. package/types/types/common.d.ts +0 -2
  240. package/types/types/style.d.ts +0 -49
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-7d179a70.js');
6
- const services = require('./services-d6f8214c.js');
7
- const colors = require('./colors-7f354880.js');
8
-
9
- const indexCss = "";
10
-
11
- let SalonServices = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- componentWillLoad() {
16
- this.fetchData();
17
- }
18
- async fetchData() {
19
- try {
20
- this.salonServices = await services.HttpService().fetchSalonServices(this.salonId);
21
- }
22
- catch (e) { }
23
- }
24
- render() {
25
- return (index.h("div", { class: "salon-services--container" }, index.h("div", { class: "view view--salon-services--header", style: { border: `1px solid ${colors.Colors.Gray05}` } }, index.h("div", { class: "view-content", style: { overflowX: 'auto' } }, index.h("div", { style: { whiteSpace: 'nowrap' } }, services.sortBy_1(this.salonServices || [], (['order', 'name'])).map((serviceGroup, index$1) => (index.h("button", { type: "button", class: "btn btn-light", style: index$1 > 0 ? { marginLeft: '12px' } : {} }, serviceGroup.name)))))), services.sortBy_1(this.salonServices || [], (['order', 'name'])).map(serviceGroup => {
26
- const hasMultipleCates = (serviceGroup.data || []).length > 1;
27
- return (index.h("div", { style: { marginTop: '32px' } }, index.h("h3", { style: { fontSize: '24px', marginBottom: '12px' } }, serviceGroup.name), index.h("div", { class: "view view--salon-service-type", style: { border: `1px solid ${colors.Colors.Gray05}` } }, index.h("div", { class: "view-content" }, (serviceGroup.data || []).map((subGroup, subGroupIndex) => (index.h("div", { class: "salon-service-category" }, hasMultipleCates && (index.h("h4", { style: Object.assign({ fontSize: '20px', marginBottom: '12px', paddingBottom: '12px', borderBottom: `1px solid ${colors.Colors.Gray06}` }, subGroupIndex > 0 ? { marginTop: '32px' } : {}) }, subGroup.name)), (subGroup.data || []).map((service, serviceIndex) => (index.h("div", { class: "salon-service" }, index.h("div", { class: "salon-service--name", style: Object.assign({ fontSize: '16px' }, serviceIndex > 0 ? {
28
- marginTop: '12px',
29
- paddingTop: '12px',
30
- borderTop: `1px solid ${colors.Colors.Gray06}`,
31
- } : {}) }, service.name), (!service.hideDuration || !service.hidePrice) && (index.h("div", { style: { display: 'block', marginTop: '4px' } }, [
32
- !service.hideDuration ? `${service.duration} mins` : '',
33
- !service.hidePrice ? `$${service.price}` : '',
34
- ].join(' · ')))))))))))));
35
- })));
36
- }
37
- };
38
- SalonServices.style = indexCss;
39
-
40
- exports.salon_services = SalonServices;
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-7d179a70.js');
6
- const colors = require('./colors-7f354880.js');
7
- const services = require('./services-d6f8214c.js');
8
-
9
- const indexCss = ".view--salon-stylists{overflow:hidden;margin-left:-12px;margin-top:-12px}.view--salon-stylists .salon-stylist{float:left;padding-left:12px;padding-top:12px;width:50%}.view--salon-stylists .salon-stylist--avatar{height:180px}@media (min-width: 576px){.view--salon-stylists .salon-stylist{width:33.33%;max-width:240px}}@media (min-width: 768px){.view--salon-stylists{margin-left:-24px;margin-top:-24px}.view--salon-stylists .salon-stylist{padding-left:24px;padding-top:24px;width:264px;max-width:none}.view--salon-stylists .salon-stylist--avatar{height:240px}}";
10
-
11
- let SalonStylists = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- }
15
- componentWillLoad() {
16
- this.fetchData();
17
- }
18
- async fetchData() {
19
- try {
20
- this.salonStylists = await services.HttpService().fetchSalonStylists(this.salonId);
21
- }
22
- catch (e) { }
23
- }
24
- render() {
25
- return (index.h("div", { class: "view--salon-stylists" }, (this.salonStylists || []).map(stylist => (index.h("div", { class: "salon-stylist" }, index.h("div", { class: "card", style: {
26
- border: `1px solid ${colors.Colors.Gray05}`,
27
- borderRadius: '8px',
28
- overflow: 'hidden',
29
- } }, index.h("div", { class: "salon-stylist--avatar", style: {
30
- backgroundImage: `url("${stylist.avatar}")`,
31
- backgroundColor: colors.Colors.Gray06,
32
- backgroundRepeat: 'no-repeat',
33
- backgroundPosition: 'center top',
34
- backgroundSize: 'cover',
35
- position: 'relative',
36
- display: 'flex',
37
- width: '100%',
38
- alignItems: 'center',
39
- justifyContent: 'center',
40
- } }, !stylist.avatar && (index.h("span", { style: {
41
- fontSize: '32px',
42
- fontWeight: 'bold',
43
- textTransform: 'uppercase',
44
- } }, (stylist.firstName || '').charAt(0), " ", (stylist.lastName || '').charAt(0)))), index.h("div", { class: "card-body" }, index.h("div", { style: {
45
- fontSize: '16px',
46
- fontWeight: 'bold',
47
- textAlign: 'center',
48
- } }, stylist.name), index.h("div", { style: { marginTop: '4px' } }, index.h("salon-ranking", { ranking: stylist.rating })))))))));
49
- }
50
- };
51
- SalonStylists.style = indexCss;
52
-
53
- exports.salon_stylists = SalonStylists;
@@ -1,97 +0,0 @@
1
- import { Component, h, Prop } from '@stencil/core';
2
- export class GoogleMap {
3
- constructor() {
4
- this.apiKey = 'AIzaSyBW4PbW9aM2FXZl83Gs7jeRmekEWSzC1sY';
5
- }
6
- componentDidLoad() {
7
- this.injectSDK().then(() => {
8
- setTimeout(() => this.initMap(), 300);
9
- });
10
- }
11
- injectSDK() {
12
- return new Promise((resolve) => {
13
- window['mapInit'] = () => resolve(true);
14
- const script = document.createElement('script');
15
- script.id = 'googleMaps';
16
- if (this.apiKey) {
17
- script.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.apiKey + '&callback=mapInit';
18
- }
19
- else {
20
- script.src = 'https://maps.googleapis.com/maps/api/js?callback=mapInit';
21
- }
22
- document.body.appendChild(script);
23
- return resolve(true);
24
- });
25
- }
26
- initMap() {
27
- const mapOptions = {
28
- center: { lat: this.lat, lng: this.lng },
29
- zoom: 8,
30
- };
31
- this.map = new window.google.maps.Map(document.getElementById('google-map-container'), mapOptions);
32
- }
33
- render() {
34
- return h("div", { id: 'google-map-container' });
35
- }
36
- static get is() { return "google-map"; }
37
- static get originalStyleUrls() { return {
38
- "$": ["index.css"]
39
- }; }
40
- static get styleUrls() { return {
41
- "$": ["index.css"]
42
- }; }
43
- static get properties() { return {
44
- "apiKey": {
45
- "type": "string",
46
- "mutable": false,
47
- "complexType": {
48
- "original": "string",
49
- "resolved": "string",
50
- "references": {}
51
- },
52
- "required": false,
53
- "optional": false,
54
- "docs": {
55
- "tags": [],
56
- "text": ""
57
- },
58
- "attribute": "api-key",
59
- "reflect": false,
60
- "defaultValue": "'AIzaSyBW4PbW9aM2FXZl83Gs7jeRmekEWSzC1sY'"
61
- },
62
- "lat": {
63
- "type": "number",
64
- "mutable": false,
65
- "complexType": {
66
- "original": "number",
67
- "resolved": "number",
68
- "references": {}
69
- },
70
- "required": false,
71
- "optional": false,
72
- "docs": {
73
- "tags": [],
74
- "text": ""
75
- },
76
- "attribute": "lat",
77
- "reflect": false
78
- },
79
- "lng": {
80
- "type": "number",
81
- "mutable": false,
82
- "complexType": {
83
- "original": "number",
84
- "resolved": "number",
85
- "references": {}
86
- },
87
- "required": false,
88
- "optional": false,
89
- "docs": {
90
- "tags": [],
91
- "text": ""
92
- },
93
- "attribute": "lng",
94
- "reflect": false
95
- }
96
- }; }
97
- }
@@ -1,88 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- import { Colors } from '../../constants/colors';
3
- import { formatWebsiteUrl } from '../../utils/utils';
4
- import HttpService from '../../services/services';
5
- export class SalonContact {
6
- componentWillLoad() {
7
- if (this.salonInfo) {
8
- this.salonInfoState = JSON.parse(this.salonInfo);
9
- }
10
- else {
11
- this.fetchData();
12
- }
13
- }
14
- fetchData() {
15
- try {
16
- HttpService().fetchSalonInfo(this.salonId)
17
- .then(salonInfo => this.salonInfoState = salonInfo);
18
- }
19
- catch (e) { }
20
- }
21
- render() {
22
- const { about, email, website, businessPhone, } = (this.salonInfoState || {});
23
- const websiteUrl = formatWebsiteUrl(website);
24
- return (h("div", { class: "view view--salon-contact" },
25
- h("div", { class: "view-content" },
26
- h("div", { style: { fontSize: '16px', fontWeight: 'bold' } }, "Contact info"),
27
- h("div", { class: "salon-contact--links" },
28
- businessPhone && (h("div", { class: "salon-contact--links-item" },
29
- h("i", { class: "ri-phone-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
30
- " ",
31
- businessPhone)),
32
- websiteUrl && (h("div", { class: "salon-contact--links-item" },
33
- h("i", { class: "ri-links-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
34
- " ",
35
- h("a", { target: websiteUrl && websiteUrl.indexOf(window.location.hostname) === -1 ? '_blank' : undefined, href: websiteUrl, style: { color: Colors.Gray01, textDecoration: 'none' } }, websiteUrl))),
36
- email && (h("div", { class: "salon-contact--links-item" },
37
- h("i", { class: "ri-mail-line", style: { color: Colors.Gray03, fontSize: '18px', marginRight: '6px' } }),
38
- " ",
39
- h("a", { href: `mailto:${email}`, style: { color: Colors.Gray01, textDecoration: 'none' } }, email)))),
40
- h("div", { class: "salon-contact--info--desc", style: { fontSize: '16px', marginTop: '16px' }, innerHTML: about }))));
41
- }
42
- static get is() { return "salon-contact"; }
43
- static get originalStyleUrls() { return {
44
- "$": ["index.css"]
45
- }; }
46
- static get styleUrls() { return {
47
- "$": ["index.css"]
48
- }; }
49
- static get properties() { return {
50
- "salonId": {
51
- "type": "number",
52
- "mutable": false,
53
- "complexType": {
54
- "original": "number",
55
- "resolved": "number",
56
- "references": {}
57
- },
58
- "required": false,
59
- "optional": false,
60
- "docs": {
61
- "tags": [],
62
- "text": ""
63
- },
64
- "attribute": "salon-id",
65
- "reflect": false
66
- },
67
- "salonInfo": {
68
- "type": "string",
69
- "mutable": false,
70
- "complexType": {
71
- "original": "string",
72
- "resolved": "string",
73
- "references": {}
74
- },
75
- "required": false,
76
- "optional": true,
77
- "docs": {
78
- "tags": [],
79
- "text": ""
80
- },
81
- "attribute": "salon-info",
82
- "reflect": false
83
- }
84
- }; }
85
- static get states() { return {
86
- "salonInfoState": {}
87
- }; }
88
- }
@@ -1,25 +0,0 @@
1
- .salon-modal.salon-modal--gift-card .salon-modal--title {
2
- margin: 0;
3
- }
4
-
5
- .salon-modal.salon-modal--gift-card .salon-modal--close {
6
- width: 40px;
7
- height: 40px;
8
- right: 16px;
9
- top: 16px;
10
- }
11
-
12
- .salon-modal.salon-modal--gift-card .salon-modal--header {
13
- height: 72px;
14
- padding: 16px;
15
- }
16
-
17
- .salon-modal.salon-modal--gift-card .salon-modal--inner {
18
- height: 90vh;
19
- }
20
-
21
- .salon-modal.salon-modal--gift-card .salon-modal--content {
22
- height: 90vh;
23
- padding: 0 16px;
24
- overflow-y: auto;
25
- }
@@ -1,3 +0,0 @@
1
- .salon-info .view--salon-styles .view-content {
2
- padding: 0;
3
- }
@@ -1,108 +0,0 @@
1
- import { Component, Prop, h, Method, State } from '@stencil/core';
2
- import dayjs from 'dayjs';
3
- import { Colors } from '../../constants/colors';
4
- import { getRatingText } from '../../utils/utils';
5
- import HttpService from '../../services/services';
6
- import { shortDate } from '../../types/common';
7
- export class SalonLatestReviews {
8
- constructor() {
9
- this.salonReviews = [];
10
- }
11
- componentWillLoad() {
12
- this.fetchData();
13
- }
14
- async fetchData() {
15
- try {
16
- const { allItems } = await HttpService().fetchSalonReviews(this.salonId, { noLoop: true });
17
- this.salonReviews = [...allItems];
18
- }
19
- catch (e) { }
20
- }
21
- render() {
22
- const ratingTexts = getRatingText();
23
- return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } },
24
- h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
25
- const { user } = review;
26
- return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray05}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) },
27
- h("div", { class: "card", style: { border: 'none' } },
28
- h("div", { class: "card-body" },
29
- h("div", { class: "salon-review--user", style: { marginBottom: '16px' } },
30
- h("user-avatar", { size: 48, name: user.name, shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })),
31
- h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } },
32
- [1, 2, 3, 4, 5].map(score => (h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: {
33
- fontSize: '16px',
34
- marginRight: '4px',
35
- } }))),
36
- h("div", { class: "salon-review--rating--date", style: { color: Colors.Gray03, marginLeft: '16px' } }, dayjs(review.createdDate).format(shortDate))),
37
- h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]),
38
- (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } },
39
- h("div", { class: "salon-review--description", style: {
40
- fontSize: '16px',
41
- lineHeight: '26px',
42
- overflow: 'hidden',
43
- maxHeight: review.photos.length > 0 ? '52px' : '104px',
44
- } }, review.title || review.description))),
45
- review.photos.length > 0 && (h("div", { style: {
46
- display: 'flex',
47
- flexDirection: 'row',
48
- overflowX: 'auto',
49
- } }, review.photos.map(photo => (h("div", { style: {
50
- border: '1px solid #d9d9d9',
51
- position: 'relative',
52
- cursor: 'pointer',
53
- borderRadius: '2px',
54
- height: '66px',
55
- marginTop: '16px',
56
- marginRight: '16px',
57
- } },
58
- h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
59
- }))));
60
- }
61
- static get is() { return "salon-latest-reviews"; }
62
- static get originalStyleUrls() { return {
63
- "$": ["index.css"]
64
- }; }
65
- static get styleUrls() { return {
66
- "$": ["index.css"]
67
- }; }
68
- static get properties() { return {
69
- "salonId": {
70
- "type": "number",
71
- "mutable": false,
72
- "complexType": {
73
- "original": "number",
74
- "resolved": "number",
75
- "references": {}
76
- },
77
- "required": false,
78
- "optional": false,
79
- "docs": {
80
- "tags": [],
81
- "text": ""
82
- },
83
- "attribute": "salon-id",
84
- "reflect": false
85
- }
86
- }; }
87
- static get states() { return {
88
- "salonReviews": {}
89
- }; }
90
- static get methods() { return {
91
- "fetchData": {
92
- "complexType": {
93
- "signature": "() => Promise<void>",
94
- "parameters": [],
95
- "references": {
96
- "Promise": {
97
- "location": "global"
98
- }
99
- },
100
- "return": "Promise<void>"
101
- },
102
- "docs": {
103
- "text": "",
104
- "tags": []
105
- }
106
- }
107
- }; }
108
- }
@@ -1,80 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- import { formatFullAddress } from '../../utils/utils';
3
- import HttpService from '../../services/services';
4
- export class SalonLocations {
5
- componentWillLoad() {
6
- if (this.salonInfo) {
7
- this.salonInfoState = JSON.parse(this.salonInfo);
8
- }
9
- else {
10
- this.fetchData();
11
- }
12
- }
13
- fetchData() {
14
- try {
15
- HttpService().fetchSalonInfo(this.salonId)
16
- .then(salonInfo => this.salonInfoState = salonInfo);
17
- }
18
- catch (e) { }
19
- }
20
- render() {
21
- const { businessLocationLat: lat, businessLocationLng: lng } = this.salonInfoState || {};
22
- return (h("div", { class: "view view--salon-locations" },
23
- h("div", { class: "view-content", style: { height: '380px' } },
24
- h("div", { style: {
25
- fontSize: '16px',
26
- lineHeight: '26px',
27
- maxHeight: '52px',
28
- marginBottom: '16px',
29
- overflow: 'hidden',
30
- textOverflow: 'ellipsis',
31
- } }, formatFullAddress(this.salonInfoState)),
32
- h("div", { class: "view--salon-info--map", style: { height: '264px' } }, lat && lng && h("google-map", { lat: lat, lng: lng })))));
33
- }
34
- static get is() { return "salon-locations"; }
35
- static get originalStyleUrls() { return {
36
- "$": ["index.css"]
37
- }; }
38
- static get styleUrls() { return {
39
- "$": ["index.css"]
40
- }; }
41
- static get properties() { return {
42
- "salonId": {
43
- "type": "number",
44
- "mutable": false,
45
- "complexType": {
46
- "original": "number",
47
- "resolved": "number",
48
- "references": {}
49
- },
50
- "required": false,
51
- "optional": false,
52
- "docs": {
53
- "tags": [],
54
- "text": ""
55
- },
56
- "attribute": "salon-id",
57
- "reflect": false
58
- },
59
- "salonInfo": {
60
- "type": "string",
61
- "mutable": false,
62
- "complexType": {
63
- "original": "string",
64
- "resolved": "string",
65
- "references": {}
66
- },
67
- "required": false,
68
- "optional": true,
69
- "docs": {
70
- "tags": [],
71
- "text": ""
72
- },
73
- "attribute": "salon-info",
74
- "reflect": false
75
- }
76
- }; }
77
- static get states() { return {
78
- "salonInfoState": {}
79
- }; }
80
- }
@@ -1,12 +0,0 @@
1
- .salon-loobooks--grid-item {
2
- float: left;
3
- max-width: 150px;
4
- }
5
-
6
-
7
- @media (min-width: 768px) {
8
- .salon-loobooks--grid-item {
9
- max-width: 200px;
10
- }
11
- }
12
-