favesalon-embed 0.0.4 → 1.0.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 (270) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/chat-button.cjs.entry.js +118 -0
  3. package/dist/cjs/colors-38421769.js +69 -0
  4. package/dist/cjs/favesalon-embed.cjs.js +24 -0
  5. package/dist/cjs/google-map_5.cjs.entry.js +310 -0
  6. package/{cjs/index-d5de0b9d.js → dist/cjs/index-47c2a5f6.js} +513 -199
  7. package/{cjs/index-48ac68d0.js → dist/cjs/index-7f190886.js} +1924 -0
  8. package/dist/cjs/loader.cjs.js +23 -0
  9. package/dist/cjs/relativeTime-3721080d.js +9 -0
  10. package/{cjs → dist/cjs}/salon-booking-modal.cjs.entry.js +7 -6
  11. package/{cjs → dist/cjs}/salon-booking.cjs.entry.js +8 -8
  12. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
  13. package/{cjs → dist/cjs}/salon-gift-card.cjs.entry.js +9 -8
  14. package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
  15. package/{cjs/salon-lookbook_2.cjs.entry.js → dist/cjs/salon-lookbook.cjs.entry.js} +28 -58
  16. package/{cjs → dist/cjs}/salon-ranking.cjs.entry.js +9 -8
  17. package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
  18. package/dist/cjs/salon-services.cjs.entry.js +81 -0
  19. package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
  20. package/dist/cjs/services-125c82d8.js +21492 -0
  21. package/dist/cjs/style-detail.cjs.entry.js +312 -0
  22. package/dist/cjs/user-avatar.cjs.entry.js +45 -0
  23. package/{collection → dist/collection}/collection-manifest.json +5 -5
  24. package/dist/collection/components/chat-button/index.css +122 -0
  25. package/dist/collection/components/chat-button/index.js +218 -0
  26. package/dist/collection/components/chat-conversation/index.js +103 -0
  27. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  28. package/{collection → dist/collection}/components/google-map/index.css +0 -1
  29. package/dist/collection/components/google-map/index.js +90 -0
  30. package/{collection → dist/collection}/components/salon-booking/index.css +11 -20
  31. package/dist/collection/components/salon-booking/index.js +126 -0
  32. package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
  33. package/dist/collection/components/salon-gift-card/index.css +30 -0
  34. package/dist/collection/components/salon-gift-card/index.js +126 -0
  35. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
  36. package/dist/collection/components/salon-info/index.js +77 -0
  37. package/dist/collection/components/salon-latest-reviews/index.js +163 -0
  38. package/dist/collection/components/salon-latest-styles/index.css +12 -0
  39. package/dist/collection/components/salon-latest-styles/index.js +183 -0
  40. package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +7 -4
  41. package/dist/collection/components/salon-locations/index.js +143 -0
  42. package/{collection → dist/collection}/components/salon-lookbook/index.css +3 -9
  43. package/dist/collection/components/salon-lookbook/index.js +368 -0
  44. package/dist/collection/components/salon-ranking/index.js +117 -0
  45. package/{collection → dist/collection}/components/salon-reviews/index.css +3 -0
  46. package/dist/collection/components/salon-reviews/index.js +249 -0
  47. package/dist/collection/components/salon-schedules/index.css +18 -0
  48. package/dist/collection/components/salon-schedules/index.js +167 -0
  49. package/dist/collection/components/salon-services/index.css +1 -0
  50. package/dist/collection/components/salon-services/index.js +146 -0
  51. package/dist/collection/components/salon-stylists/index.js +184 -0
  52. package/dist/collection/components/style-detail/index.css +76 -0
  53. package/dist/collection/components/style-detail/index.js +386 -0
  54. package/dist/collection/components/user-avatar/index.js +134 -0
  55. package/dist/collection/constants/colors.js +65 -0
  56. package/dist/collection/mocks/users.js +10 -0
  57. package/dist/collection/services/services.js +295 -0
  58. package/dist/collection/types/chat.js +23 -0
  59. package/dist/collection/types/common.js +11 -0
  60. package/{collection → dist/collection}/types/review.js +9 -5
  61. package/dist/collection/types/salon.js +58 -0
  62. package/dist/collection/types/style.js +128 -0
  63. package/{collection → dist/collection}/types/stylist.js +12 -9
  64. package/dist/collection/types/user.js +10 -0
  65. package/{custom-elements → dist/custom-elements}/index.d.ts +18 -18
  66. package/dist/custom-elements/index.js +28340 -0
  67. package/dist/esm/chat-button.entry.js +114 -0
  68. package/dist/esm/colors-ea36347a.js +67 -0
  69. package/dist/esm/favesalon-embed.js +19 -0
  70. package/dist/esm/google-map_5.entry.js +302 -0
  71. package/{esm/index-0f8eed73.js → dist/esm/index-3fae868e.js} +512 -200
  72. package/{esm/index-67d677ba.js → dist/esm/index-80523fec.js} +1924 -1
  73. package/dist/esm/index.js +1 -0
  74. package/dist/esm/loader.js +19 -0
  75. package/dist/esm/polyfills/css-shim.js +1 -0
  76. package/dist/esm/relativeTime-cd452e6d.js +7 -0
  77. package/{esm → dist/esm}/salon-booking-modal.entry.js +7 -6
  78. package/{esm → dist/esm}/salon-booking.entry.js +7 -7
  79. package/dist/esm/salon-gift-card-modal.entry.js +25 -0
  80. package/{esm → dist/esm}/salon-gift-card.entry.js +8 -7
  81. package/dist/esm/salon-latest-reviews.entry.js +93 -0
  82. package/{esm/salon-lookbook_2.entry.js → dist/esm/salon-lookbook.entry.js} +29 -58
  83. package/{esm → dist/esm}/salon-ranking.entry.js +9 -8
  84. package/dist/esm/salon-reviews.entry.js +189 -0
  85. package/dist/esm/salon-services.entry.js +77 -0
  86. package/dist/esm/salon-stylists.entry.js +114 -0
  87. package/dist/esm/services-40a3e622.js +21485 -0
  88. package/dist/esm/style-detail.entry.js +308 -0
  89. package/dist/esm/user-avatar.entry.js +41 -0
  90. package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
  91. package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
  92. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
  93. package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
  94. package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
  95. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
  96. package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
  97. package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
  98. package/dist/favesalon-embed/p-22093506.entry.js +1 -0
  99. package/dist/favesalon-embed/p-32b314e9.js +2 -0
  100. package/dist/favesalon-embed/p-4a5eca9a.js +6 -0
  101. package/dist/favesalon-embed/p-58d2e9be.js +1 -0
  102. package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
  103. package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
  104. package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
  105. package/dist/favesalon-embed/p-a33331cc.js +1 -0
  106. package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
  107. package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
  108. package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
  109. package/dist/favesalon-embed/p-b630ae68.js +1580 -0
  110. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
  111. package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
  112. package/dist/favesalon-embed/p-fc9a5551.js +6 -0
  113. package/dist/types/components/chat-button/index.d.ts +24 -0
  114. package/dist/types/components/google-map/index.d.ts +5 -0
  115. package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +1 -0
  116. package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
  117. package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
  118. package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
  119. package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
  120. package/{types → dist/types}/components/salon-lookbook/index.d.ts +3 -3
  121. package/dist/types/components/salon-reviews/index.d.ts +24 -0
  122. package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
  123. package/{types → dist/types}/components/salon-services/index.d.ts +1 -0
  124. package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
  125. package/dist/types/components/style-detail/index.d.ts +24 -0
  126. package/{types → dist/types}/components.d.ts +76 -59
  127. package/dist/types/constants/colors.d.ts +65 -0
  128. package/dist/types/mocks/users.d.ts +10 -0
  129. package/dist/types/services/services.d.ts +75 -0
  130. package/{types → dist/types}/stencil-public-runtime.d.ts +85 -11
  131. package/dist/types/types/chat.d.ts +17 -0
  132. package/dist/types/types/common.d.ts +11 -0
  133. package/{types → dist/types}/types/review.d.ts +4 -0
  134. package/{types → dist/types}/types/salon.d.ts +3 -1
  135. package/dist/types/types/style.d.ts +88 -0
  136. package/{types → dist/types}/types/stylist.d.ts +1 -1
  137. package/{types → dist/types}/types/user.d.ts +2 -2
  138. package/loader/cdn.js +3 -0
  139. package/loader/index.cjs.js +3 -0
  140. package/loader/index.d.ts +21 -0
  141. package/loader/index.es2017.js +3 -0
  142. package/loader/index.js +4 -0
  143. package/loader/package.json +11 -0
  144. package/package.json +19 -14
  145. package/readme.md +24 -7
  146. package/cjs/colors-7f354880.js +0 -95
  147. package/cjs/favesalon-embed.cjs.js +0 -20
  148. package/cjs/google-map.cjs.entry.js +0 -47
  149. package/cjs/index-95daad08.js +0 -1928
  150. package/cjs/loader.cjs.js +0 -22
  151. package/cjs/salon-contact_4.cjs.entry.js +0 -155
  152. package/cjs/salon-gift-card-modal.cjs.entry.js +0 -25
  153. package/cjs/salon-info.cjs.entry.js +0 -35
  154. package/cjs/salon-latest-reviews.cjs.entry.js +0 -58
  155. package/cjs/salon-lookbook-modal.cjs.entry.js +0 -141
  156. package/cjs/salon-reviews.cjs.entry.js +0 -205
  157. package/cjs/salon-services.cjs.entry.js +0 -47
  158. package/cjs/salon-stylists.cjs.entry.js +0 -54
  159. package/cjs/services-f1102d4a.js +0 -5762
  160. package/collection/components/google-map/index.js +0 -97
  161. package/collection/components/salon-booking/index.js +0 -121
  162. package/collection/components/salon-booking/salon-booking-modal.js +0 -88
  163. package/collection/components/salon-contact/index.js +0 -88
  164. package/collection/components/salon-gift-card/index.css +0 -25
  165. package/collection/components/salon-gift-card/index.js +0 -120
  166. package/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -48
  167. package/collection/components/salon-info/index.css +0 -3
  168. package/collection/components/salon-info/index.js +0 -97
  169. package/collection/components/salon-latest-reviews/index.js +0 -108
  170. package/collection/components/salon-locations/index.js +0 -80
  171. package/collection/components/salon-lookbook/index.js +0 -376
  172. package/collection/components/salon-lookbook/lookbook-modal.css +0 -72
  173. package/collection/components/salon-lookbook/salon-lookbook-modal.js +0 -248
  174. package/collection/components/salon-ranking/index.js +0 -114
  175. package/collection/components/salon-reviews/index.js +0 -317
  176. package/collection/components/salon-schedules/index.css +0 -14
  177. package/collection/components/salon-schedules/index.js +0 -103
  178. package/collection/components/salon-services/index.js +0 -113
  179. package/collection/components/salon-styles/index.css +0 -23
  180. package/collection/components/salon-styles/index.js +0 -100
  181. package/collection/components/salon-stylists/index.js +0 -96
  182. package/collection/components/user-avatar/index.css +0 -0
  183. package/collection/components/user-avatar/index.js +0 -127
  184. package/collection/constants/colors.js +0 -91
  185. package/collection/services/services.js +0 -225
  186. package/collection/types/common.js +0 -2
  187. package/collection/types/salon.js +0 -52
  188. package/collection/types/style.js +0 -103
  189. package/collection/types/user.js +0 -10
  190. package/custom-elements/index.js +0 -12125
  191. package/esm/colors-1ec90c5f.js +0 -93
  192. package/esm/favesalon-embed.js +0 -18
  193. package/esm/google-map.entry.js +0 -43
  194. package/esm/index-09d43e3e.js +0 -1926
  195. package/esm/loader.js +0 -18
  196. package/esm/polyfills/css-shim.js +0 -1
  197. package/esm/salon-contact_4.entry.js +0 -148
  198. package/esm/salon-gift-card-modal.entry.js +0 -21
  199. package/esm/salon-info.entry.js +0 -31
  200. package/esm/salon-latest-reviews.entry.js +0 -54
  201. package/esm/salon-lookbook-modal.entry.js +0 -137
  202. package/esm/salon-reviews.entry.js +0 -201
  203. package/esm/salon-services.entry.js +0 -43
  204. package/esm/salon-stylists.entry.js +0 -50
  205. package/esm/services-74d84ca9.js +0 -5756
  206. package/favesalon-embed/favesalon-embed.esm.js +0 -1
  207. package/favesalon-embed/p-0188d4dc.entry.js +0 -1
  208. package/favesalon-embed/p-0318501e.js +0 -1
  209. package/favesalon-embed/p-078f242d.entry.js +0 -1
  210. package/favesalon-embed/p-13e23c61.entry.js +0 -1
  211. package/favesalon-embed/p-17df13ad.js +0 -1
  212. package/favesalon-embed/p-1a3179c8.entry.js +0 -1
  213. package/favesalon-embed/p-20aa75de.js +0 -6
  214. package/favesalon-embed/p-2901a6d6.entry.js +0 -1
  215. package/favesalon-embed/p-2b861430.entry.js +0 -1
  216. package/favesalon-embed/p-44d810a0.js +0 -1
  217. package/favesalon-embed/p-4a5eca9a.js +0 -6
  218. package/favesalon-embed/p-4c68700f.entry.js +0 -1
  219. package/favesalon-embed/p-4e2d7b29.js +0 -1
  220. package/favesalon-embed/p-6b845bf1.entry.js +0 -1
  221. package/favesalon-embed/p-7350f6b5.entry.js +0 -1
  222. package/favesalon-embed/p-897c2b1c.entry.js +0 -1
  223. package/favesalon-embed/p-8e60f56f.entry.js +0 -1
  224. package/favesalon-embed/p-a49afdc1.entry.js +0 -1
  225. package/favesalon-embed/p-c93867c4.entry.js +0 -1
  226. package/favesalon-embed/p-ea6a097f.entry.js +0 -1
  227. package/types/components/google-map/index.d.ts +0 -10
  228. package/types/components/salon-contact/index.d.ts +0 -9
  229. package/types/components/salon-lookbook/salon-lookbook-modal.d.ts +0 -13
  230. package/types/components/salon-reviews/index.d.ts +0 -24
  231. package/types/components/salon-styles/index.d.ts +0 -9
  232. package/types/constants/colors.d.ts +0 -88
  233. package/types/services/services.d.ts +0 -26
  234. package/types/types/common.d.ts +0 -2
  235. package/types/types/style.d.ts +0 -59
  236. /package/{cjs → dist/cjs}/_commonjsHelpers-5cfcba41.js +0 -0
  237. /package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
  238. /package/{cjs → dist/cjs}/index.cjs.js +0 -0
  239. /package/{cjs → dist/cjs}/utils-c5a33b3c.js +0 -0
  240. /package/{esm/index.js → dist/collection/components/salon-info/index.css} +0 -0
  241. /package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -0
  242. /package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
  243. /package/{collection → dist/collection}/components/salon-stylists/index.css +0 -0
  244. /package/{collection/components/salon-locations → dist/collection/components/user-avatar}/index.css +0 -0
  245. /package/{collection → dist/collection}/global/global.js +0 -0
  246. /package/{collection → dist/collection}/index.js +0 -0
  247. /package/{collection → dist/collection}/types/service.js +0 -0
  248. /package/{collection → dist/collection}/utils/utils.js +0 -0
  249. /package/{esm → dist/esm}/_commonjsHelpers-098d5b27.js +0 -0
  250. /package/{esm → dist/esm}/global-e1089ffd.js +0 -0
  251. /package/{esm → dist/esm}/polyfills/core-js.js +0 -0
  252. /package/{esm → dist/esm}/polyfills/dom.js +0 -0
  253. /package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
  254. /package/{esm → dist/esm}/polyfills/index.js +0 -0
  255. /package/{esm → dist/esm}/polyfills/system.js +0 -0
  256. /package/{esm → dist/esm}/utils-e97485e0.js +0 -0
  257. /package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
  258. /package/{favesalon-embed → dist/favesalon-embed}/p-47e646f8.js +0 -0
  259. /package/{favesalon-embed → dist/favesalon-embed}/p-d6083940.js +0 -0
  260. /package/{index.cjs.js → dist/index.cjs.js} +0 -0
  261. /package/{index.js → dist/index.js} +0 -0
  262. /package/{collection/components/salon-services/index.css → dist/types/components/chat-conversation/index.d.ts} +0 -0
  263. /package/{types → dist/types}/components/salon-booking/index.d.ts +0 -0
  264. /package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +0 -0
  265. /package/{types → dist/types}/components/salon-gift-card/index.d.ts +0 -0
  266. /package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
  267. /package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
  268. /package/{types → dist/types}/index.d.ts +0 -0
  269. /package/{types → dist/types}/types/service.d.ts +0 -0
  270. /package/{types → dist/types}/utils/utils.d.ts +0 -0
@@ -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,121 +0,0 @@
1
- import { Component, Prop, h } from '@stencil/core';
2
- import Color from 'color';
3
- import { css } from 'glamor';
4
- import { Colors } from '../../constants/colors';
5
- export class SalonBooking {
6
- constructor() {
7
- this.buttonClass = '';
8
- this.buttonText = 'Book now';
9
- this.primaryColor = Colors.Coral03;
10
- }
11
- openModal() {
12
- const elBookingModal = document.createElement('div');
13
- elBookingModal.innerHTML = `
14
- <salon-booking-modal
15
- salon-id=${this.salonId}
16
- primary-color=${this.primaryColor}
17
- ></salon-booking-modal>
18
- `;
19
- document.body.appendChild(elBookingModal);
20
- }
21
- render() {
22
- const buttonClass = this.buttonClass || 'btn btn-primary';
23
- let buttonStyle = {};
24
- if (!this.buttonClass) {
25
- const primaryColor = Color(this.primaryColor);
26
- const primaryColorHover = primaryColor.darken(0.05);
27
- buttonStyle = css({
28
- backgroundColor: this.primaryColor,
29
- borderColor: this.primaryColor,
30
- color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
31
- ':hover': {
32
- backgroundColor: primaryColorHover,
33
- borderColor: primaryColorHover,
34
- },
35
- });
36
- }
37
- return (h("div", { class: "salon-booking" },
38
- h("div", { class: "salon-booking--button" },
39
- h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
40
- }
41
- static get is() { return "salon-booking"; }
42
- static get originalStyleUrls() { return {
43
- "$": ["index.css"]
44
- }; }
45
- static get styleUrls() { return {
46
- "$": ["index.css"]
47
- }; }
48
- static get properties() { return {
49
- "salonId": {
50
- "type": "number",
51
- "mutable": false,
52
- "complexType": {
53
- "original": "number",
54
- "resolved": "number",
55
- "references": {}
56
- },
57
- "required": false,
58
- "optional": false,
59
- "docs": {
60
- "tags": [],
61
- "text": ""
62
- },
63
- "attribute": "salon-id",
64
- "reflect": false
65
- },
66
- "buttonClass": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": ""
79
- },
80
- "attribute": "button-class",
81
- "reflect": false,
82
- "defaultValue": "''"
83
- },
84
- "buttonText": {
85
- "type": "string",
86
- "mutable": false,
87
- "complexType": {
88
- "original": "string",
89
- "resolved": "string",
90
- "references": {}
91
- },
92
- "required": false,
93
- "optional": false,
94
- "docs": {
95
- "tags": [],
96
- "text": ""
97
- },
98
- "attribute": "button-text",
99
- "reflect": false,
100
- "defaultValue": "'Book now'"
101
- },
102
- "primaryColor": {
103
- "type": "string",
104
- "mutable": false,
105
- "complexType": {
106
- "original": "string",
107
- "resolved": "string",
108
- "references": {}
109
- },
110
- "required": false,
111
- "optional": false,
112
- "docs": {
113
- "tags": [],
114
- "text": ""
115
- },
116
- "attribute": "primary-color",
117
- "reflect": false,
118
- "defaultValue": "Colors.Coral03"
119
- }
120
- }; }
121
- }
@@ -1,88 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- import { Colors } from '../../constants/colors';
3
- export class SalonBookingModal {
4
- constructor() {
5
- this.primaryColor = Colors.Coral03;
6
- this.redirectUrl = window.btoa(window.location.href);
7
- this.isModalOpen = true;
8
- }
9
- closeModal() {
10
- this.isModalOpen = false;
11
- const el = document.querySelector('salon-booking-modal');
12
- el.remove();
13
- }
14
- render() {
15
- const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
16
- return (h("div", { class: "salon-booking--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--booking" },
17
- h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }),
18
- h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }),
19
- h("div", { class: "salon-modal--inner" },
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}` })))))));
22
- }
23
- static get is() { return "salon-booking-modal"; }
24
- static get originalStyleUrls() { return {
25
- "$": ["index.css"]
26
- }; }
27
- static get styleUrls() { return {
28
- "$": ["index.css"]
29
- }; }
30
- static get properties() { return {
31
- "salonId": {
32
- "type": "number",
33
- "mutable": false,
34
- "complexType": {
35
- "original": "number",
36
- "resolved": "number",
37
- "references": {}
38
- },
39
- "required": false,
40
- "optional": false,
41
- "docs": {
42
- "tags": [],
43
- "text": ""
44
- },
45
- "attribute": "salon-id",
46
- "reflect": false
47
- },
48
- "primaryColor": {
49
- "type": "string",
50
- "mutable": false,
51
- "complexType": {
52
- "original": "string",
53
- "resolved": "string",
54
- "references": {}
55
- },
56
- "required": false,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": ""
61
- },
62
- "attribute": "primary-color",
63
- "reflect": false,
64
- "defaultValue": "Colors.Coral03"
65
- },
66
- "redirectUrl": {
67
- "type": "string",
68
- "mutable": false,
69
- "complexType": {
70
- "original": "string",
71
- "resolved": "string",
72
- "references": {}
73
- },
74
- "required": false,
75
- "optional": false,
76
- "docs": {
77
- "tags": [],
78
- "text": ""
79
- },
80
- "attribute": "redirect-url",
81
- "reflect": false,
82
- "defaultValue": "window.btoa(window.location.href)"
83
- }
84
- }; }
85
- static get states() { return {
86
- "isModalOpen": {}
87
- }; }
88
- }
@@ -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,120 +0,0 @@
1
- import { Component, Prop, h } from '@stencil/core';
2
- import Color from 'color';
3
- import { css } from 'glamor';
4
- import { Colors } from '../../constants/colors';
5
- export class SalonGiftCard {
6
- constructor() {
7
- this.buttonClass = '';
8
- this.buttonText = 'Buy Gift card';
9
- this.primaryColor = Colors.Coral03;
10
- }
11
- openModal() {
12
- const elBookingModal = document.createElement('div');
13
- elBookingModal.innerHTML = `
14
- <salon-gift-card-modal
15
- salon-id=${this.salonId}
16
- ></salon-gift-card-modal>
17
- `;
18
- document.body.appendChild(elBookingModal);
19
- }
20
- render() {
21
- const buttonClass = this.buttonClass || 'btn btn-primary';
22
- let buttonStyle = {};
23
- if (!this.buttonClass) {
24
- const primaryColor = Color(this.primaryColor);
25
- const primaryColorHover = primaryColor.darken(0.05);
26
- buttonStyle = css({
27
- backgroundColor: this.primaryColor,
28
- borderColor: this.primaryColor,
29
- color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
30
- ':hover': {
31
- backgroundColor: primaryColorHover,
32
- borderColor: primaryColorHover,
33
- },
34
- });
35
- }
36
- return (h("div", { class: "salon-gift-card" },
37
- h("div", { class: "salon-gift-card--button" },
38
- h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
39
- }
40
- static get is() { return "salon-gift-card"; }
41
- static get originalStyleUrls() { return {
42
- "$": ["index.css"]
43
- }; }
44
- static get styleUrls() { return {
45
- "$": ["index.css"]
46
- }; }
47
- static get properties() { return {
48
- "salonId": {
49
- "type": "number",
50
- "mutable": false,
51
- "complexType": {
52
- "original": "number",
53
- "resolved": "number",
54
- "references": {}
55
- },
56
- "required": false,
57
- "optional": false,
58
- "docs": {
59
- "tags": [],
60
- "text": ""
61
- },
62
- "attribute": "salon-id",
63
- "reflect": false
64
- },
65
- "buttonClass": {
66
- "type": "string",
67
- "mutable": false,
68
- "complexType": {
69
- "original": "string",
70
- "resolved": "string",
71
- "references": {}
72
- },
73
- "required": false,
74
- "optional": false,
75
- "docs": {
76
- "tags": [],
77
- "text": ""
78
- },
79
- "attribute": "button-class",
80
- "reflect": false,
81
- "defaultValue": "''"
82
- },
83
- "buttonText": {
84
- "type": "string",
85
- "mutable": false,
86
- "complexType": {
87
- "original": "string",
88
- "resolved": "string",
89
- "references": {}
90
- },
91
- "required": false,
92
- "optional": false,
93
- "docs": {
94
- "tags": [],
95
- "text": ""
96
- },
97
- "attribute": "button-text",
98
- "reflect": false,
99
- "defaultValue": "'Buy Gift card'"
100
- },
101
- "primaryColor": {
102
- "type": "string",
103
- "mutable": false,
104
- "complexType": {
105
- "original": "string",
106
- "resolved": "string",
107
- "references": {}
108
- },
109
- "required": false,
110
- "optional": false,
111
- "docs": {
112
- "tags": [],
113
- "text": ""
114
- },
115
- "attribute": "primary-color",
116
- "reflect": false,
117
- "defaultValue": "Colors.Coral03"
118
- }
119
- }; }
120
- }
@@ -1,48 +0,0 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
2
- export class SalonGiftCardModal {
3
- constructor() {
4
- this.isModalOpen = true;
5
- }
6
- closeModal() {
7
- this.isModalOpen = false;
8
- const el = document.querySelector('salon-gift-card-modal');
9
- el.remove();
10
- }
11
- render() {
12
- return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" },
13
- h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }),
14
- h("div", { class: "salon-modal--inner" },
15
- h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }),
16
- h("div", { class: "salon-modal--content" },
17
- h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/salon/detail/${this.salonId}/gift-cards.html` })))))));
18
- }
19
- static get is() { return "salon-gift-card-modal"; }
20
- static get originalStyleUrls() { return {
21
- "$": ["index.css"]
22
- }; }
23
- static get styleUrls() { return {
24
- "$": ["index.css"]
25
- }; }
26
- static get properties() { return {
27
- "salonId": {
28
- "type": "number",
29
- "mutable": false,
30
- "complexType": {
31
- "original": "number",
32
- "resolved": "number",
33
- "references": {}
34
- },
35
- "required": false,
36
- "optional": false,
37
- "docs": {
38
- "tags": [],
39
- "text": ""
40
- },
41
- "attribute": "salon-id",
42
- "reflect": false
43
- }
44
- }; }
45
- static get states() { return {
46
- "isModalOpen": {}
47
- }; }
48
- }
@@ -1,3 +0,0 @@
1
- .salon-info .view--salon-styles .view-content {
2
- padding: 0;
3
- }
@@ -1,97 +0,0 @@
1
- import { Component, Prop, h, Method, State } from '@stencil/core';
2
- import HttpService from '../../services/services';
3
- import { Colors } from '../../constants/colors';
4
- export class SalonInfo {
5
- constructor() {
6
- this.backgroundColor = Colors.Gray06;
7
- }
8
- componentWillLoad() {
9
- this.fetchData();
10
- }
11
- async fetchData() {
12
- try {
13
- this.salonInfo = await HttpService().fetchSalonInfo(this.salonId);
14
- }
15
- catch (e) { }
16
- }
17
- render() {
18
- if (this.salonInfo) {
19
- return (h("div", { class: "salon-info", style: { background: this.backgroundColor } },
20
- h("div", { class: "row" },
21
- h("div", { class: "col-md-5", style: { marginBottom: '24px' } },
22
- h("salon-locations", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })),
23
- h("div", { class: "col-md-7", style: { marginBottom: '24px' } },
24
- h("salon-styles", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))),
25
- h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } },
26
- h("salon-schedules", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })),
27
- h("div", { class: "salon-info--contact" },
28
- h("salon-contact", { "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))));
29
- }
30
- return (h("div", { class: "salon-info", style: { padding: '24px', textAlign: 'center' } }, "Loading..."));
31
- }
32
- static get is() { return "salon-info"; }
33
- static get originalStyleUrls() { return {
34
- "$": ["index.less"]
35
- }; }
36
- static get styleUrls() { return {
37
- "$": ["index.css"]
38
- }; }
39
- static get properties() { return {
40
- "salonId": {
41
- "type": "number",
42
- "mutable": false,
43
- "complexType": {
44
- "original": "number",
45
- "resolved": "number",
46
- "references": {}
47
- },
48
- "required": false,
49
- "optional": false,
50
- "docs": {
51
- "tags": [],
52
- "text": ""
53
- },
54
- "attribute": "salon-id",
55
- "reflect": false
56
- },
57
- "backgroundColor": {
58
- "type": "string",
59
- "mutable": false,
60
- "complexType": {
61
- "original": "string",
62
- "resolved": "string",
63
- "references": {}
64
- },
65
- "required": false,
66
- "optional": false,
67
- "docs": {
68
- "tags": [],
69
- "text": ""
70
- },
71
- "attribute": "background-color",
72
- "reflect": false,
73
- "defaultValue": "Colors.Gray06"
74
- }
75
- }; }
76
- static get states() { return {
77
- "salonInfo": {}
78
- }; }
79
- static get methods() { return {
80
- "fetchData": {
81
- "complexType": {
82
- "signature": "() => Promise<void>",
83
- "parameters": [],
84
- "references": {
85
- "Promise": {
86
- "location": "global"
87
- }
88
- },
89
- "return": "Promise<void>"
90
- },
91
- "docs": {
92
- "text": "",
93
- "tags": []
94
- }
95
- }
96
- }; }
97
- }