favesalon-embed 1.0.5 → 1.0.7

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 (53) hide show
  1. package/dist/custom-elements/index.d.ts +36 -0
  2. package/dist/favesalon-embed/activate-form.entry.js +70 -0
  3. package/dist/favesalon-embed/change-password-form.entry.js +81 -0
  4. package/dist/favesalon-embed/chat-box.entry.js +1 -1
  5. package/dist/favesalon-embed/chat-button.entry.js +43 -12
  6. package/dist/favesalon-embed/chat-form.entry.js +1 -1
  7. package/dist/favesalon-embed/chat-messages.entry.js +1 -1
  8. package/dist/favesalon-embed/chat-rooms.entry.js +1 -1
  9. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
  10. package/dist/favesalon-embed/login-form.entry.js +67 -0
  11. package/dist/favesalon-embed/notify-sounds.entry.js +1 -1
  12. package/dist/favesalon-embed/register-form.entry.js +88 -0
  13. package/dist/favesalon-embed/reset-password-form.entry.js +47 -0
  14. package/dist/favesalon-embed/salon-booking.entry.js +1 -1
  15. package/dist/favesalon-embed/salon-gift-card.entry.js +1 -1
  16. package/dist/favesalon-embed/salon-info.entry.js +1 -1
  17. package/dist/favesalon-embed/salon-latest-reviews.entry.js +19 -3
  18. package/dist/favesalon-embed/salon-latest-styles.entry.js +14 -7
  19. package/dist/favesalon-embed/salon-locations.entry.js +1 -1
  20. package/dist/favesalon-embed/salon-lookbook.entry.js +16 -4
  21. package/dist/favesalon-embed/salon-reviews.entry.js +18 -4
  22. package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
  23. package/dist/favesalon-embed/salon-services.entry.js +23 -11
  24. package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
  25. package/dist/favesalon-embed/{services-260ea6eb.js → services-d71be591.js} +36 -0
  26. package/dist/favesalon-embed/style-detail.entry.js +26 -8
  27. package/dist/favesalon-embed/user-avatar.entry.js +3 -1
  28. package/dist/favesalon-embed/user-form.entry.js +44 -0
  29. package/dist/types/components/activate-form/activate-form.d.ts +12 -0
  30. package/dist/types/components/change-password-form/change-password-form.d.ts +12 -0
  31. package/dist/types/components/chat-button/index.d.ts +6 -2
  32. package/dist/types/components/login-form/login-form.d.ts +10 -0
  33. package/dist/types/components/register-form/register-form.d.ts +13 -0
  34. package/dist/types/components/reset-password-form/reset-password-form.d.ts +9 -0
  35. package/dist/types/components/user-form/user-form.d.ts +7 -0
  36. package/dist/types/components.d.ts +106 -2
  37. package/dist/types/services/services.d.ts +16 -0
  38. package/dist/types/types/user.d.ts +6 -0
  39. package/package.json +1 -1
  40. package/dist/favesalon-embed/services-122dcf73.js +0 -23886
  41. package/dist/favesalon-embed/services-23eda072.js +0 -23877
  42. package/dist/favesalon-embed/services-243eef47.js +0 -23880
  43. package/dist/favesalon-embed/services-27607998.js +0 -23886
  44. package/dist/favesalon-embed/services-46b2f0aa.js +0 -23867
  45. package/dist/favesalon-embed/services-65a8cf4a.js +0 -23887
  46. package/dist/favesalon-embed/services-8f52210f.js +0 -23880
  47. package/dist/favesalon-embed/services-de32365e.js +0 -23880
  48. package/dist/favesalon-embed/services-e9cfcd2b.js +0 -23885
  49. package/dist/favesalon-embed/services-f7278483.js +0 -23880
  50. package/dist/favesalon-embed/services-f9872bea.js +0 -23880
  51. package/dist/favesalon-embed/utils-2c19db45.js +0 -25
  52. package/dist/favesalon-embed/utils-89c2cff2.js +0 -32
  53. package/dist/favesalon-embed/utils-e226fa04.js +0 -32
@@ -8,6 +8,19 @@ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { User } from "./types/user";
9
9
  import { ChatMessage, ChatRoom } from "./types/chat";
10
10
  export namespace Components {
11
+ interface ActivateForm {
12
+ "onSubmit": (evt: any) => Promise<void>;
13
+ "onSuccess": (user: User) => void;
14
+ "password": string;
15
+ "resendCode": (evt: any) => Promise<void>;
16
+ "username": string;
17
+ }
18
+ interface ChangePasswordForm {
19
+ "onSubmit": (evt: any) => Promise<void>;
20
+ "onSuccess": (user: User) => void;
21
+ "resendCode": (evt: any) => Promise<void>;
22
+ "username": string;
23
+ }
11
24
  interface ChatBox {
12
25
  "accessToken": string;
13
26
  "fetchData": () => Promise<void>;
@@ -16,11 +29,12 @@ export namespace Components {
16
29
  "senderId": string;
17
30
  }
18
31
  interface ChatButton {
19
- "accessToken": string;
32
+ "accessToken"?: string;
20
33
  "fetchData": () => Promise<void>;
34
+ "onVerificationSuccess": (user: User) => Promise<void>;
21
35
  "primaryColor": string;
22
36
  "receiverId": string;
23
- "senderId": string;
37
+ "senderId"?: string;
24
38
  }
25
39
  interface ChatForm {
26
40
  "chatRoomId": string;
@@ -45,8 +59,20 @@ export namespace Components {
45
59
  "locationAddress"?: string;
46
60
  "locationName"?: string;
47
61
  }
62
+ interface LoginForm {
63
+ "onSubmit": (evt: any) => Promise<void>;
64
+ "onSuccess": (user: User) => void;
65
+ }
48
66
  interface NotifySounds {
49
67
  }
68
+ interface RegisterForm {
69
+ "onSubmit": (evt: any) => Promise<void>;
70
+ "onSuccess": (user: User) => void;
71
+ }
72
+ interface ResetPasswordForm {
73
+ "onSubmit": (evt: any) => Promise<void>;
74
+ "onSuccess": (user: User) => void;
75
+ }
50
76
  interface SalonBooking {
51
77
  "buttonClass": string;
52
78
  "buttonText": string;
@@ -136,8 +162,23 @@ export namespace Components {
136
162
  "shortName": string;
137
163
  "size": number;
138
164
  }
165
+ interface UserForm {
166
+ "onSuccess": (user: User) => void;
167
+ }
139
168
  }
140
169
  declare global {
170
+ interface HTMLActivateFormElement extends Components.ActivateForm, HTMLStencilElement {
171
+ }
172
+ var HTMLActivateFormElement: {
173
+ prototype: HTMLActivateFormElement;
174
+ new (): HTMLActivateFormElement;
175
+ };
176
+ interface HTMLChangePasswordFormElement extends Components.ChangePasswordForm, HTMLStencilElement {
177
+ }
178
+ var HTMLChangePasswordFormElement: {
179
+ prototype: HTMLChangePasswordFormElement;
180
+ new (): HTMLChangePasswordFormElement;
181
+ };
141
182
  interface HTMLChatBoxElement extends Components.ChatBox, HTMLStencilElement {
142
183
  }
143
184
  var HTMLChatBoxElement: {
@@ -174,12 +215,30 @@ declare global {
174
215
  prototype: HTMLGoogleMapElement;
175
216
  new (): HTMLGoogleMapElement;
176
217
  };
218
+ interface HTMLLoginFormElement extends Components.LoginForm, HTMLStencilElement {
219
+ }
220
+ var HTMLLoginFormElement: {
221
+ prototype: HTMLLoginFormElement;
222
+ new (): HTMLLoginFormElement;
223
+ };
177
224
  interface HTMLNotifySoundsElement extends Components.NotifySounds, HTMLStencilElement {
178
225
  }
179
226
  var HTMLNotifySoundsElement: {
180
227
  prototype: HTMLNotifySoundsElement;
181
228
  new (): HTMLNotifySoundsElement;
182
229
  };
230
+ interface HTMLRegisterFormElement extends Components.RegisterForm, HTMLStencilElement {
231
+ }
232
+ var HTMLRegisterFormElement: {
233
+ prototype: HTMLRegisterFormElement;
234
+ new (): HTMLRegisterFormElement;
235
+ };
236
+ interface HTMLResetPasswordFormElement extends Components.ResetPasswordForm, HTMLStencilElement {
237
+ }
238
+ var HTMLResetPasswordFormElement: {
239
+ prototype: HTMLResetPasswordFormElement;
240
+ new (): HTMLResetPasswordFormElement;
241
+ };
183
242
  interface HTMLSalonBookingElement extends Components.SalonBooking, HTMLStencilElement {
184
243
  }
185
244
  var HTMLSalonBookingElement: {
@@ -276,14 +335,25 @@ declare global {
276
335
  prototype: HTMLUserAvatarElement;
277
336
  new (): HTMLUserAvatarElement;
278
337
  };
338
+ interface HTMLUserFormElement extends Components.UserForm, HTMLStencilElement {
339
+ }
340
+ var HTMLUserFormElement: {
341
+ prototype: HTMLUserFormElement;
342
+ new (): HTMLUserFormElement;
343
+ };
279
344
  interface HTMLElementTagNameMap {
345
+ "activate-form": HTMLActivateFormElement;
346
+ "change-password-form": HTMLChangePasswordFormElement;
280
347
  "chat-box": HTMLChatBoxElement;
281
348
  "chat-button": HTMLChatButtonElement;
282
349
  "chat-form": HTMLChatFormElement;
283
350
  "chat-messages": HTMLChatMessagesElement;
284
351
  "chat-rooms": HTMLChatRoomsElement;
285
352
  "google-map": HTMLGoogleMapElement;
353
+ "login-form": HTMLLoginFormElement;
286
354
  "notify-sounds": HTMLNotifySoundsElement;
355
+ "register-form": HTMLRegisterFormElement;
356
+ "reset-password-form": HTMLResetPasswordFormElement;
287
357
  "salon-booking": HTMLSalonBookingElement;
288
358
  "salon-booking-modal": HTMLSalonBookingModalElement;
289
359
  "salon-gift-card": HTMLSalonGiftCardElement;
@@ -300,9 +370,19 @@ declare global {
300
370
  "salon-stylists": HTMLSalonStylistsElement;
301
371
  "style-detail": HTMLStyleDetailElement;
302
372
  "user-avatar": HTMLUserAvatarElement;
373
+ "user-form": HTMLUserFormElement;
303
374
  }
304
375
  }
305
376
  declare namespace LocalJSX {
377
+ interface ActivateForm {
378
+ "onSuccess"?: (user: User) => void;
379
+ "password"?: string;
380
+ "username"?: string;
381
+ }
382
+ interface ChangePasswordForm {
383
+ "onSuccess"?: (user: User) => void;
384
+ "username"?: string;
385
+ }
306
386
  interface ChatBox {
307
387
  "accessToken"?: string;
308
388
  "primaryColor"?: string;
@@ -338,8 +418,17 @@ declare namespace LocalJSX {
338
418
  "locationAddress"?: string;
339
419
  "locationName"?: string;
340
420
  }
421
+ interface LoginForm {
422
+ "onSuccess"?: (user: User) => void;
423
+ }
341
424
  interface NotifySounds {
342
425
  }
426
+ interface RegisterForm {
427
+ "onSuccess"?: (user: User) => void;
428
+ }
429
+ interface ResetPasswordForm {
430
+ "onSuccess"?: (user: User) => void;
431
+ }
343
432
  interface SalonBooking {
344
433
  "buttonClass"?: string;
345
434
  "buttonText"?: string;
@@ -416,14 +505,22 @@ declare namespace LocalJSX {
416
505
  "shortName"?: string;
417
506
  "size"?: number;
418
507
  }
508
+ interface UserForm {
509
+ "onSuccess"?: (user: User) => void;
510
+ }
419
511
  interface IntrinsicElements {
512
+ "activate-form": ActivateForm;
513
+ "change-password-form": ChangePasswordForm;
420
514
  "chat-box": ChatBox;
421
515
  "chat-button": ChatButton;
422
516
  "chat-form": ChatForm;
423
517
  "chat-messages": ChatMessages;
424
518
  "chat-rooms": ChatRooms;
425
519
  "google-map": GoogleMap;
520
+ "login-form": LoginForm;
426
521
  "notify-sounds": NotifySounds;
522
+ "register-form": RegisterForm;
523
+ "reset-password-form": ResetPasswordForm;
427
524
  "salon-booking": SalonBooking;
428
525
  "salon-booking-modal": SalonBookingModal;
429
526
  "salon-gift-card": SalonGiftCard;
@@ -440,19 +537,25 @@ declare namespace LocalJSX {
440
537
  "salon-stylists": SalonStylists;
441
538
  "style-detail": StyleDetail;
442
539
  "user-avatar": UserAvatar;
540
+ "user-form": UserForm;
443
541
  }
444
542
  }
445
543
  export { LocalJSX as JSX };
446
544
  declare module "@stencil/core" {
447
545
  export namespace JSX {
448
546
  interface IntrinsicElements {
547
+ "activate-form": LocalJSX.ActivateForm & JSXBase.HTMLAttributes<HTMLActivateFormElement>;
548
+ "change-password-form": LocalJSX.ChangePasswordForm & JSXBase.HTMLAttributes<HTMLChangePasswordFormElement>;
449
549
  "chat-box": LocalJSX.ChatBox & JSXBase.HTMLAttributes<HTMLChatBoxElement>;
450
550
  "chat-button": LocalJSX.ChatButton & JSXBase.HTMLAttributes<HTMLChatButtonElement>;
451
551
  "chat-form": LocalJSX.ChatForm & JSXBase.HTMLAttributes<HTMLChatFormElement>;
452
552
  "chat-messages": LocalJSX.ChatMessages & JSXBase.HTMLAttributes<HTMLChatMessagesElement>;
453
553
  "chat-rooms": LocalJSX.ChatRooms & JSXBase.HTMLAttributes<HTMLChatRoomsElement>;
454
554
  "google-map": LocalJSX.GoogleMap & JSXBase.HTMLAttributes<HTMLGoogleMapElement>;
555
+ "login-form": LocalJSX.LoginForm & JSXBase.HTMLAttributes<HTMLLoginFormElement>;
455
556
  "notify-sounds": LocalJSX.NotifySounds & JSXBase.HTMLAttributes<HTMLNotifySoundsElement>;
557
+ "register-form": LocalJSX.RegisterForm & JSXBase.HTMLAttributes<HTMLRegisterFormElement>;
558
+ "reset-password-form": LocalJSX.ResetPasswordForm & JSXBase.HTMLAttributes<HTMLResetPasswordFormElement>;
456
559
  "salon-booking": LocalJSX.SalonBooking & JSXBase.HTMLAttributes<HTMLSalonBookingElement>;
457
560
  "salon-booking-modal": LocalJSX.SalonBookingModal & JSXBase.HTMLAttributes<HTMLSalonBookingModalElement>;
458
561
  "salon-gift-card": LocalJSX.SalonGiftCard & JSXBase.HTMLAttributes<HTMLSalonGiftCardElement>;
@@ -469,6 +572,7 @@ declare module "@stencil/core" {
469
572
  "salon-stylists": LocalJSX.SalonStylists & JSXBase.HTMLAttributes<HTMLSalonStylistsElement>;
470
573
  "style-detail": LocalJSX.StyleDetail & JSXBase.HTMLAttributes<HTMLStyleDetailElement>;
471
574
  "user-avatar": LocalJSX.UserAvatar & JSXBase.HTMLAttributes<HTMLUserAvatarElement>;
575
+ "user-form": LocalJSX.UserForm & JSXBase.HTMLAttributes<HTMLUserFormElement>;
472
576
  }
473
577
  }
474
578
  }
@@ -5,6 +5,22 @@ declare class HttpService {
5
5
  firebaseDatabase: any;
6
6
  firebaseApp: any;
7
7
  constructor();
8
+ login(apiUrl: any, options: any): Promise<{
9
+ id: any;
10
+ firstName: any;
11
+ lastName: any;
12
+ fullName: any;
13
+ avatar: any;
14
+ mobilePhone: any;
15
+ accessToken: any;
16
+ email: any;
17
+ password: any;
18
+ }>;
19
+ register(options: any): Promise<import("axios").AxiosResponse<any>>;
20
+ resendActivateCode(email: string): Promise<import("axios").AxiosResponse<never>>;
21
+ activateAccount(email: any, code: any): Promise<import("axios").AxiosResponse<never>>;
22
+ resetPassword(email: string): Promise<import("axios").AxiosResponse<never>>;
23
+ onChangePassword(options: any): Promise<import("axios").AxiosResponse<any>>;
8
24
  fetchClients(salonId: number, keyword: string, accessToken: string): Promise<any>;
9
25
  fetchStyleDetail(styleId: number): Promise<{
10
26
  styleInfo: any;
@@ -4,7 +4,10 @@ export interface User {
4
4
  firstName: string;
5
5
  lastName: string;
6
6
  avatar: string;
7
+ email: string;
7
8
  mobilePhone: string;
9
+ accessToken: string;
10
+ password: string;
8
11
  }
9
12
  export declare function createUser(blob: any): {
10
13
  id: any;
@@ -13,6 +16,9 @@ export declare function createUser(blob: any): {
13
16
  fullName: any;
14
17
  avatar: any;
15
18
  mobilePhone: any;
19
+ accessToken: any;
20
+ email: any;
21
+ password: any;
16
22
  };
17
23
  export declare function createUserFromChatRoom(blob: any): {
18
24
  id: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "favesalon-embed",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Favesalon Embed",
5
5
  "author": "Trung Luu <trung@favesalon.com> (https://favesalon.com)",
6
6
  "main": "dist/index.cjs.js",