favesalon-embed 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -0,0 +1,17 @@
1
+ import { User } from './user';
2
+ export interface ChatMessage {
3
+ uid: string;
4
+ message: string;
5
+ timestamp: number;
6
+ unRead: number;
7
+ senderId: number;
8
+ }
9
+ export declare function createChatMessage(blob: any): ChatMessage;
10
+ export declare class ChatRoom {
11
+ id: number;
12
+ uid: string;
13
+ members: User[];
14
+ messages: ChatMessage[];
15
+ constructor(fields: any);
16
+ }
17
+ export declare function createChatRoom(blob: any): ChatRoom;
@@ -0,0 +1,11 @@
1
+ export declare const timeFormat = "HH:mm:ss";
2
+ export declare const timeFormatAmPm = "hh:mm A";
3
+ export declare const dateName = "dddd";
4
+ export declare const dateFormat = "YYYY-MM-DD";
5
+ export declare const dateTimeFormat = "YYYY-MM-DD HH:mm:ss";
6
+ export declare const dateTimeFormatAmPm = "YYYY-MM-DD hh:mm A";
7
+ export declare const shortDateFormat = "ddd, MMM DD";
8
+ export declare const shortDateYearFormat = "ddd, MMM DD YYYY";
9
+ export declare const apiV1Prefix = "api";
10
+ export declare const apiV2Prefix = "api-ver2";
11
+ export declare const defaultImage = "https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png";
@@ -1,3 +1,5 @@
1
+ import { Salon } from "./salon";
2
+ import { Stylist } from "./stylist";
1
3
  import { User } from "./user";
2
4
  interface ReviewPhoto {
3
5
  id: number;
@@ -20,6 +22,8 @@ export declare class Review {
20
22
  helpful: number;
21
23
  recommend: number;
22
24
  user: User;
25
+ salon: Salon;
26
+ stylist: Stylist;
23
27
  photos: ReviewPhoto[];
24
28
  }
25
29
  export declare function createReview(blob: any): Review;
@@ -13,9 +13,9 @@ export interface Salon {
13
13
  id: number;
14
14
  about: string;
15
15
  email: string;
16
+ ownerName: string;
16
17
  fullProfileImage: string;
17
18
  fullCoverImage: string;
18
- ownerName: string;
19
19
  subdomain: string;
20
20
  website: string;
21
21
  businessName: string;
@@ -29,5 +29,7 @@ export interface Salon {
29
29
  businessHours: BusinessHour[];
30
30
  rating: number;
31
31
  primaryColor: string;
32
+ salonImages: string[];
32
33
  }
33
34
  export declare function createSalon(blob: any): Salon;
35
+ export declare function getSalonImage({ salonImages, fullProfileImage }: Salon): string;
@@ -0,0 +1,88 @@
1
+ import { Salon } from './salon';
2
+ import { Service } from './service';
3
+ import { Stylist } from './stylist';
4
+ import { User } from './user';
5
+ export declare enum MediaType {
6
+ Photo = 0,
7
+ Video = 1
8
+ }
9
+ export declare class AlbumMedia {
10
+ id: number;
11
+ caption: string;
12
+ description: string;
13
+ createdDate: number;
14
+ updatedDate: number;
15
+ mediaUrl: string;
16
+ imageThumb: string;
17
+ imageThumbMedium: string;
18
+ imageWidth: number;
19
+ imageHeight: number;
20
+ mediaType: MediaType;
21
+ totalLike: number;
22
+ totalDislike: number;
23
+ totalShare: number;
24
+ totalView: number;
25
+ totalBooking: number;
26
+ constructor(fields: any);
27
+ }
28
+ export declare function createAlbumMedia(blob: any): AlbumMedia;
29
+ export declare class Album {
30
+ id: number;
31
+ name: string;
32
+ caption: string;
33
+ description: string;
34
+ tags: string[];
35
+ salonId: number;
36
+ stylistId: number;
37
+ service: Service;
38
+ totalMedias: number;
39
+ isPublic: boolean;
40
+ constructor(fields: any);
41
+ }
42
+ export declare function createAlbum(blob: any): Album;
43
+ export declare class FaveStyleComment {
44
+ id: number;
45
+ type: number;
46
+ title: string;
47
+ description: string;
48
+ createdDate: number;
49
+ updatedDate: number;
50
+ parentCommentId: number;
51
+ childComments: FaveStyleComment[];
52
+ user: User;
53
+ constructor(fields: any);
54
+ }
55
+ export declare function createFaveStyleComment(blob: any): FaveStyleComment;
56
+ export declare class FaveStyle {
57
+ id: number;
58
+ caption: string;
59
+ description: string;
60
+ createdDate: number;
61
+ updatedDate: number;
62
+ imageUrl: string;
63
+ imageThumb: string;
64
+ imageThumbMedium: string;
65
+ imageWidth: number;
66
+ imageHeight: number;
67
+ mediaType: number;
68
+ isPublic: boolean;
69
+ totalLike: number;
70
+ totalDislike: number;
71
+ totalShare: number;
72
+ totalView: number;
73
+ totalBooking: number;
74
+ owner: User;
75
+ album: Album;
76
+ albumMedias: AlbumMedia[];
77
+ salonId: number;
78
+ salon: Salon;
79
+ stylistId: number;
80
+ stylist: Stylist;
81
+ isLiked: boolean;
82
+ serviceId: number;
83
+ salonServiceId: number;
84
+ productBrand: string;
85
+ constructor(fields: any);
86
+ }
87
+ export declare function createFaveStyle(blob: any): FaveStyle;
88
+ export declare function isVideoMedia({ mediaType }: AlbumMedia): boolean;
@@ -1,6 +1,6 @@
1
1
  export interface Stylist {
2
2
  id: number;
3
- name: string;
3
+ fullName: string;
4
4
  firstName: string;
5
5
  lastName: string;
6
6
  avatar: string;
@@ -1,14 +1,14 @@
1
1
  export interface User {
2
2
  id: number;
3
- name: string;
3
+ fullName: string;
4
4
  firstName: string;
5
5
  lastName: string;
6
6
  avatar: string;
7
7
  }
8
8
  export declare function createUser(blob: any): {
9
9
  id: any;
10
- name: any;
11
10
  firstName: any;
12
11
  lastName: any;
12
+ fullName: any;
13
13
  avatar: any;
14
14
  };
package/loader/cdn.js ADDED
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,3 @@
1
+
2
+ module.exports = require('../dist/cjs/loader.cjs.js');
3
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -0,0 +1,21 @@
1
+ export * from '../dist/types/components';
2
+ export interface CustomElementsDefineOptions {
3
+ exclude?: string[];
4
+ resourcesUrl?: string;
5
+ syncQueue?: boolean;
6
+ jmp?: (c: Function) => any;
7
+ raf?: (c: FrameRequestCallback) => number;
8
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
+ }
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
12
+ export declare function applyPolyfills(): Promise<void>;
13
+
14
+ /**
15
+ * Used to specify a nonce value that corresponds with an application's CSP.
16
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
17
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
18
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
19
+ * will result in the same behavior.
20
+ */
21
+ export declare function setNonce(nonce: string): void;
@@ -0,0 +1,3 @@
1
+
2
+ export * from '../dist/esm/polyfills/index.js';
3
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,4 @@
1
+
2
+ (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
+ export * from '../dist/esm/polyfills/index.js';
4
+ export * from '../dist/esm/loader.js';
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "favesalon-embed-loader",
3
+ "private": true,
4
+ "typings": "./index.d.ts",
5
+ "module": "./index.js",
6
+ "main": "./index.cjs.js",
7
+ "jsnext:main": "./index.es2017.js",
8
+ "es2015": "./index.es2017.js",
9
+ "es2017": "./index.es2017.js",
10
+ "unpkg": "./cdn.js"
11
+ }
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "favesalon-embed",
3
- "version": "0.0.4",
4
- "description": "Favesalon Components",
5
- "license": "MIT",
6
- "keywords": ["Favesalon", "Favesalon Components", "Favesalon Embedding"],
3
+ "version": "0.0.5",
4
+ "description": "Favesalon Embed",
7
5
  "author": "Trung Luu <trung@favesalon.com> (https://favesalon.com)",
8
- "main": "index.cjs.js",
9
- "module": "custom-elements/index.js",
10
- "es2015": "esm/index.mjs",
11
- "es2017": "esm/index.mjs",
12
- "types": "custom-elements/index.d.ts",
13
- "collection": "collection/collection-manifest.json",
14
- "collection:main": "collection/index.js",
15
- "unpkg": "favesalon-embed/favesalon-embed.esm.js",
6
+ "main": "dist/index.cjs.js",
7
+ "module": "dist/custom-elements/index.js",
8
+ "es2015": "dist/esm/index.mjs",
9
+ "es2017": "dist/esm/index.mjs",
10
+ "types": "dist/custom-elements/index.d.ts",
11
+ "collection": "dist/collection/collection-manifest.json",
12
+ "collection:main": "dist/collection/index.js",
13
+ "unpkg": "dist/favesalon-embed/favesalon-embed.esm.js",
14
+ "files": [
15
+ "dist/",
16
+ "loader/"
17
+ ],
16
18
  "scripts": {
17
19
  "build": "stencil build --docs",
18
20
  "start": "stencil build --dev --watch --serve",
@@ -21,9 +23,11 @@
21
23
  "generate": "stencil generate"
22
24
  },
23
25
  "dependencies": {
24
- "@stencil/core": "^2.7.0",
26
+ "@stencil/core": "^2.22.3",
25
27
  "axios": "^0.22.0",
28
+ "color": "^4.0.1",
26
29
  "dayjs": "^1.10.7",
30
+ "firebase": "^10.0.0",
27
31
  "glamor": "^2.20.40",
28
32
  "lodash": "^4.17.21"
29
33
  },
@@ -32,5 +36,6 @@
32
36
  "jest": "^26.6.3",
33
37
  "jest-cli": "^26.6.3",
34
38
  "puppeteer": "^10.0.0"
35
- }
39
+ },
40
+ "license": "MIT"
36
41
  }
package/readme.md CHANGED
@@ -1,6 +1,27 @@
1
1
  # Favesalon Embed
2
2
 
3
- A set of Favesalon components that use for showing salon info (business info, services, stylists,...) in any websites.
3
+ A set of Favesalon components that use for embedding in any websites.
4
+
5
+ ## Development
6
+
7
+ To start the components, run:
8
+
9
+ ```bash
10
+ npm install
11
+ npm start
12
+ ```
13
+
14
+ To build the component for production, run:
15
+
16
+ ```bash
17
+ npm run build
18
+ ```
19
+
20
+ To run the unit tests for the components, run:
21
+
22
+ ```bash
23
+ npm test
24
+ ```
4
25
 
5
26
 
6
27
  ## Using this component
@@ -13,10 +34,6 @@ npm i favesalon-embed --save
13
34
 
14
35
  or use the hosted version from unpkg:
15
36
  ```html
16
- <link rel="stylesheet" href="https://unpkg.com/favesalon-embed@0.0.4/favesalon-embed/favesalon-embed.css" />
17
- <script type="module" src="https://unpkg.com/favesalon-embed@0.0.4/favesalon-embed/favesalon-embed.esm.js"></script>
37
+ <link rel="stylesheet" href="https://unpkg.com/favesalon-embed@1.0.0/favesalon-embed/favesalon-embed.css" />
38
+ <script type="module" src="https://unpkg.com/favesalon-embed@1.0.0/favesalon-embed/favesalon-embed.esm.js"></script>
18
39
  ```
19
-
20
- ## Copyright and license
21
-
22
- Copyright @2021 [FaveSalon, Inc](https://favesalon.com). Code released under the MIT License.
@@ -1,95 +0,0 @@
1
- 'use strict';
2
-
3
- const Colors = {
4
- // Neutral Color
5
- Black: '#000000',
6
- White: '#ffffff',
7
- Primary: '#5C1973',
8
- Danger: '#E92626',
9
- Success: '#3FB34F',
10
- Warning: '#F17714',
11
- Info: '#013385',
12
- Black01: '#141414',
13
- Black02: '#1f1f1f',
14
- Black03: '#262626',
15
- Gray01: '#333333',
16
- Gray02: '#666666',
17
- Gray03: '#999999',
18
- Gray04: '#DBDBDB',
19
- Gray05: '#EFEFEF',
20
- Gray06: '#F5F5F5',
21
- // Accent Colors
22
- DarkBlue01: '#E8E8EF',
23
- DarkBlue02: '#7674A0',
24
- DarkBlue03: '#1B1761',
25
- DarkBlue04: '#100E3A',
26
- DarkBlue05: '#08071D',
27
- Violet01: '#EFE8F1',
28
- Violet02: '#9D75AB',
29
- Violet03: '#5C1973',
30
- Violet04: '#370F45',
31
- Violet05: '#1C0722',
32
- Pink01: '#FDE9F2',
33
- Pink02: '#F27DAF',
34
- Pink03: '#E9267A',
35
- Pink04: '#8C1749',
36
- Pink05: '#2F0818',
37
- Blue01: '#E6EBF3',
38
- Blue02: '#6785B6',
39
- Blue03: '#013385',
40
- Blue04: '#011F50',
41
- Blue05: '#000F28',
42
- Green01: '#ECF7ED',
43
- Green02: '#8CD195',
44
- Green03: '#3FB34F',
45
- Green04: '#266B2F',
46
- Green05: '#0D2410',
47
- Orange01: '#FEF1E8',
48
- Orange02: '#F7AD72',
49
- Orange03: '#F17714',
50
- Orange04: '#91470C',
51
- Orange05: '#301804',
52
- Yellow01: '#FFFAED',
53
- Yellow02: '#FDE392',
54
- Yellow03: '#FCD14A',
55
- Yellow04: '#977D2C',
56
- Yellow05: '#322A0F',
57
- Red01: '#FD2727',
58
- Red02: '#FF4D4F',
59
- Red03: '#FFA39E',
60
- Red04: '#FFCCC7',
61
- Red05: '#FFF1F0',
62
- // deprecated
63
- BluePurple01: '#2D3B8A',
64
- BluePurple02: '#36459D',
65
- BluePurple03: '#5760A1',
66
- BluePurple04: '#828AB9',
67
- BluePurple05: '#ABB0D0',
68
- Coral01: '#F16B68',
69
- Coral02: '#F68A87',
70
- Coral03: '#F7A6A3',
71
- Coral04: '#FAC4C2',
72
- Coral05: '#FCE0DF',
73
- YellowLight01: '#F0E902',
74
- YellowLight02: '#F5ED33',
75
- YellowLight03: '#F8F266',
76
- YellowLight04: '#FAF599',
77
- YellowLight05: '#FCF9CC',
78
- YellowCyber01: '#FDCF00',
79
- YellowCyber02: '#FCD932',
80
- YellowCyber03: '#FFE365',
81
- YellowCyber04: '#FFED99',
82
- YellowCyber05: '#FFF5CC',
83
- Turquoise01: '#00E4CB',
84
- Turquoise02: '#33E8D6',
85
- Turquoise03: '#67F0DF',
86
- Turquoise04: '#99F4EB',
87
- Turquoise05: '#CCFAF5',
88
- Purple01: '#8A5BED',
89
- Purple02: '#9970F0',
90
- Purple03: '#B394F2',
91
- Purple04: '#CCB8F7',
92
- Purple05: '#E6DBFA',
93
- };
94
-
95
- exports.Colors = Colors;
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-d5de0b9d.js');
4
- require('./global-9073d10e.js');
5
-
6
- /*
7
- Stencil Client Patch Browser v2.9.0 | MIT Licensed | https://stenciljs.com
8
- */
9
- const patchBrowser = () => {
10
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('favesalon-embed.cjs.js', document.baseURI).href));
11
- const opts = {};
12
- if (importMeta !== '') {
13
- opts.resourcesUrl = new URL('.', importMeta).href;
14
- }
15
- return index.promiseResolve(opts);
16
- };
17
-
18
- patchBrowser().then(options => {
19
- return index.bootstrapLazy([["salon-info.cjs",[[0,"salon-info",{"salonId":[2,"salon-id"],"backgroundColor":[1,"background-color"],"salonInfo":[32],"fetchData":[64]}]]],["salon-latest-reviews.cjs",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"salonReviews":[32],"fetchData":[64]}]]],["salon-lookbook-modal.cjs",[[0,"salon-lookbook-modal",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"lookbookComments":[32],"isModalOpen":[32],"fetchData":[64]}]]],["salon-reviews.cjs",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"totalReviews":[32],"salonReviews":[32],"canLoadMore":[32],"isLoadingMore":[32],"pageOffset":[32],"ratings":[32],"sorting":[32],"fetchData":[64]}]]],["salon-stylists.cjs",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[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"],"isModalOpen":[32]}]]],["salon-services.cjs",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"fetchData":[64]}]]],["salon-ranking.cjs",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["google-map.cjs",[[0,"google-map",{"apiKey":[1,"api-key"],"lat":[2],"lng":[2]}]]],["salon-contact_4.cjs",[[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-contact",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"salonInfoState":[32]}],[0,"salon-styles",{"salonId":[2,"salon-id"],"firstPageStyles":[32],"nestPageStyles":[32],"fetchData":[64]}]]],["salon-lookbook_2.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]}],[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
20
- });
@@ -1,47 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-d5de0b9d.js');
6
-
7
- const indexCss = "#google-map-container,google-map{display:block;width:100%;height:100%}";
8
-
9
- let GoogleMap = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.apiKey = 'AIzaSyBW4PbW9aM2FXZl83Gs7jeRmekEWSzC1sY';
13
- }
14
- componentDidLoad() {
15
- this.injectSDK().then(() => {
16
- setTimeout(() => this.initMap(), 300);
17
- });
18
- }
19
- injectSDK() {
20
- return new Promise((resolve) => {
21
- window['mapInit'] = () => resolve(true);
22
- const script = document.createElement('script');
23
- script.id = 'googleMaps';
24
- if (this.apiKey) {
25
- script.src = 'https://maps.googleapis.com/maps/api/js?key=' + this.apiKey + '&callback=mapInit';
26
- }
27
- else {
28
- script.src = 'https://maps.googleapis.com/maps/api/js?callback=mapInit';
29
- }
30
- document.body.appendChild(script);
31
- return resolve(true);
32
- });
33
- }
34
- initMap() {
35
- const mapOptions = {
36
- center: { lat: this.lat, lng: this.lng },
37
- zoom: 8,
38
- };
39
- this.map = new window.google.maps.Map(document.getElementById('google-map-container'), mapOptions);
40
- }
41
- render() {
42
- return index.h("div", { id: 'google-map-container' });
43
- }
44
- };
45
- GoogleMap.style = indexCss;
46
-
47
- exports.google_map = GoogleMap;