favesalon-embed 0.1.0 → 1.0.1

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 (127) hide show
  1. package/dist/cjs/chat-button.cjs.entry.js +118 -0
  2. package/dist/cjs/favesalon-embed.cjs.js +7 -3
  3. package/dist/cjs/google-map_5.cjs.entry.js +26 -7
  4. package/dist/cjs/{index-e6bea8f5.js → index-47c2a5f6.js} +512 -208
  5. package/dist/cjs/loader.cjs.js +4 -3
  6. package/dist/cjs/relativeTime-3721080d.js +9 -0
  7. package/dist/cjs/salon-booking-modal.cjs.entry.js +3 -2
  8. package/dist/cjs/salon-booking.cjs.entry.js +3 -2
  9. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +3 -2
  10. package/dist/cjs/salon-gift-card.cjs.entry.js +3 -2
  11. package/dist/cjs/salon-latest-reviews.cjs.entry.js +5 -3
  12. package/dist/cjs/salon-lookbook.cjs.entry.js +7 -3
  13. package/dist/cjs/salon-ranking.cjs.entry.js +3 -2
  14. package/dist/cjs/salon-reviews.cjs.entry.js +10 -3
  15. package/dist/cjs/salon-services.cjs.entry.js +6 -3
  16. package/dist/cjs/salon-stylists.cjs.entry.js +9 -3
  17. package/dist/cjs/services-125c82d8.js +21492 -0
  18. package/dist/cjs/style-detail.cjs.entry.js +11 -9
  19. package/dist/cjs/user-avatar.cjs.entry.js +7 -3
  20. package/dist/collection/collection-manifest.json +3 -2
  21. package/dist/collection/components/chat-button/index.css +122 -0
  22. package/dist/collection/components/chat-button/index.js +218 -0
  23. package/dist/collection/components/chat-conversation/index.js +103 -0
  24. package/dist/collection/components/google-map/index.js +72 -68
  25. package/dist/collection/components/salon-booking/index.css +5 -0
  26. package/dist/collection/components/salon-booking/index.js +85 -80
  27. package/dist/collection/components/salon-booking/salon-booking-modal.js +73 -69
  28. package/dist/collection/components/salon-gift-card/index.css +6 -1
  29. package/dist/collection/components/salon-gift-card/index.js +85 -80
  30. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +56 -52
  31. package/dist/collection/components/salon-info/index.css +1 -0
  32. package/dist/collection/components/salon-info/index.js +60 -54
  33. package/dist/collection/components/salon-latest-reviews/index.css +3 -0
  34. package/dist/collection/components/salon-latest-reviews/index.js +131 -144
  35. package/dist/collection/components/salon-latest-styles/index.css +2 -0
  36. package/dist/collection/components/salon-latest-styles/index.js +143 -138
  37. package/dist/collection/components/salon-locations/index.css +3 -0
  38. package/dist/collection/components/salon-locations/index.js +112 -120
  39. package/dist/collection/components/salon-lookbook/index.css +3 -0
  40. package/dist/collection/components/salon-lookbook/index.js +182 -190
  41. package/dist/collection/components/salon-ranking/index.js +68 -65
  42. package/dist/collection/components/salon-reviews/index.css +3 -0
  43. package/dist/collection/components/salon-reviews/index.js +146 -183
  44. package/dist/collection/components/salon-schedules/index.css +3 -0
  45. package/dist/collection/components/salon-schedules/index.js +129 -151
  46. package/dist/collection/components/salon-services/index.css +1 -0
  47. package/dist/collection/components/salon-services/index.js +117 -127
  48. package/dist/collection/components/salon-stylists/index.css +8 -0
  49. package/dist/collection/components/salon-stylists/index.js +137 -136
  50. package/dist/collection/components/style-detail/index.css +14 -0
  51. package/dist/collection/components/style-detail/index.js +265 -340
  52. package/dist/collection/components/user-avatar/index.js +119 -112
  53. package/dist/collection/mocks/users.js +10 -0
  54. package/dist/collection/services/services.js +121 -0
  55. package/dist/collection/types/chat.js +23 -0
  56. package/dist/collection/types/user.js +1 -1
  57. package/dist/custom-elements/index.d.ts +6 -0
  58. package/dist/custom-elements/index.js +24628 -8605
  59. package/dist/esm/chat-button.entry.js +114 -0
  60. package/dist/esm/favesalon-embed.js +4 -3
  61. package/dist/esm/google-map_5.entry.js +26 -7
  62. package/dist/esm/{index-6af0a03d.js → index-3fae868e.js} +512 -209
  63. package/dist/esm/loader.js +4 -3
  64. package/dist/esm/polyfills/css-shim.js +1 -1
  65. package/dist/esm/relativeTime-cd452e6d.js +7 -0
  66. package/dist/esm/salon-booking-modal.entry.js +3 -2
  67. package/dist/esm/salon-booking.entry.js +3 -2
  68. package/dist/esm/salon-gift-card-modal.entry.js +3 -2
  69. package/dist/esm/salon-gift-card.entry.js +3 -2
  70. package/dist/esm/salon-latest-reviews.entry.js +5 -3
  71. package/dist/esm/salon-lookbook.entry.js +7 -3
  72. package/dist/esm/salon-ranking.entry.js +3 -2
  73. package/dist/esm/salon-reviews.entry.js +10 -3
  74. package/dist/esm/salon-services.entry.js +6 -3
  75. package/dist/esm/salon-stylists.entry.js +9 -3
  76. package/dist/esm/services-40a3e622.js +21485 -0
  77. package/dist/esm/style-detail.entry.js +10 -8
  78. package/dist/esm/user-avatar.entry.js +7 -3
  79. package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
  80. package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
  81. package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
  82. package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
  83. package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
  84. package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
  85. package/dist/favesalon-embed/p-22093506.entry.js +1 -0
  86. package/dist/favesalon-embed/p-32b314e9.js +2 -0
  87. package/dist/favesalon-embed/p-4a5eca9a.js +1 -1
  88. package/dist/favesalon-embed/p-58d2e9be.js +1 -0
  89. package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
  90. package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
  91. package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
  92. package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
  93. package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
  94. package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
  95. package/dist/favesalon-embed/p-b630ae68.js +1580 -0
  96. package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
  97. package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
  98. package/dist/favesalon-embed/p-fc9a5551.js +1 -1
  99. package/dist/types/components/chat-button/index.d.ts +24 -0
  100. package/dist/types/components.d.ts +22 -0
  101. package/dist/types/mocks/users.d.ts +10 -0
  102. package/dist/types/services/services.d.ts +15 -0
  103. package/dist/types/stencil-public-runtime.d.ts +85 -11
  104. package/dist/types/types/chat.d.ts +17 -0
  105. package/loader/index.d.ts +9 -0
  106. package/loader/package.json +1 -0
  107. package/package.json +3 -3
  108. package/readme.md +2 -2
  109. package/dist/cjs/services-eee8f251.js +0 -5634
  110. package/dist/esm/services-295247b1.js +0 -5627
  111. package/dist/favesalon-embed/p-292b97ba.entry.js +0 -1
  112. package/dist/favesalon-embed/p-4869dfed.entry.js +0 -1
  113. package/dist/favesalon-embed/p-4aee4fd9.entry.js +0 -1
  114. package/dist/favesalon-embed/p-5528c705.entry.js +0 -1
  115. package/dist/favesalon-embed/p-612ad685.entry.js +0 -1
  116. package/dist/favesalon-embed/p-75aef7e0.entry.js +0 -1
  117. package/dist/favesalon-embed/p-8c780874.entry.js +0 -1
  118. package/dist/favesalon-embed/p-8dbf04c5.js +0 -1
  119. package/dist/favesalon-embed/p-9f31061a.entry.js +0 -1
  120. package/dist/favesalon-embed/p-a60d78e9.entry.js +0 -1
  121. package/dist/favesalon-embed/p-a6debdae.entry.js +0 -1
  122. package/dist/favesalon-embed/p-bad1e9a7.entry.js +0 -1
  123. package/dist/favesalon-embed/p-c2ecb365.js +0 -1
  124. package/dist/favesalon-embed/p-c7dea70c.entry.js +0 -1
  125. package/dist/favesalon-embed/p-f0e14641.entry.js +0 -1
  126. package/dist/types/types/tmp.d.ts +0 -0
  127. /package/dist/{collection/types/tmp.js → types/components/chat-conversation/index.d.ts} +0 -0
@@ -1,9 +1,10 @@
1
- import { Component, Prop, h } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import Color from 'color';
3
3
  import { css } from 'glamor';
4
4
  import { Colors } from '../../constants/colors';
5
5
  export class SalonGiftCard {
6
6
  constructor() {
7
+ this.salonId = undefined;
7
8
  this.buttonClass = '';
8
9
  this.buttonText = 'Buy Gift card';
9
10
  this.primaryColor = Colors.Primary;
@@ -34,88 +35,92 @@ export class SalonGiftCard {
34
35
  },
35
36
  });
36
37
  }
37
- return (h("div", { class: "salon-gift-card" },
38
- h("div", { class: "salon-gift-card--button" },
39
- h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
38
+ return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
40
39
  }
41
40
  static get is() { return "salon-gift-card"; }
42
- static get originalStyleUrls() { return {
43
- "$": ["index.less"]
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": ""
41
+ static get originalStyleUrls() {
42
+ return {
43
+ "$": ["index.css"]
44
+ };
45
+ }
46
+ static get styleUrls() {
47
+ return {
48
+ "$": ["index.css"]
49
+ };
50
+ }
51
+ static get properties() {
52
+ return {
53
+ "salonId": {
54
+ "type": "number",
55
+ "mutable": false,
56
+ "complexType": {
57
+ "original": "number",
58
+ "resolved": "number",
59
+ "references": {}
60
+ },
61
+ "required": false,
62
+ "optional": false,
63
+ "docs": {
64
+ "tags": [],
65
+ "text": ""
66
+ },
67
+ "attribute": "salon-id",
68
+ "reflect": false
97
69
  },
98
- "attribute": "button-text",
99
- "reflect": false,
100
- "defaultValue": "'Buy Gift card'"
101
- },
102
- "primaryColor": {
103
- "type": "string",
104
- "mutable": false,
105
- "complexType": {
106
- "original": "string",
107
- "resolved": "string",
108
- "references": {}
70
+ "buttonClass": {
71
+ "type": "string",
72
+ "mutable": false,
73
+ "complexType": {
74
+ "original": "string",
75
+ "resolved": "string",
76
+ "references": {}
77
+ },
78
+ "required": false,
79
+ "optional": false,
80
+ "docs": {
81
+ "tags": [],
82
+ "text": ""
83
+ },
84
+ "attribute": "button-class",
85
+ "reflect": false,
86
+ "defaultValue": "''"
109
87
  },
110
- "required": false,
111
- "optional": false,
112
- "docs": {
113
- "tags": [],
114
- "text": ""
88
+ "buttonText": {
89
+ "type": "string",
90
+ "mutable": false,
91
+ "complexType": {
92
+ "original": "string",
93
+ "resolved": "string",
94
+ "references": {}
95
+ },
96
+ "required": false,
97
+ "optional": false,
98
+ "docs": {
99
+ "tags": [],
100
+ "text": ""
101
+ },
102
+ "attribute": "button-text",
103
+ "reflect": false,
104
+ "defaultValue": "'Buy Gift card'"
115
105
  },
116
- "attribute": "primary-color",
117
- "reflect": false,
118
- "defaultValue": "Colors.Primary"
119
- }
120
- }; }
106
+ "primaryColor": {
107
+ "type": "string",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "string",
111
+ "resolved": "string",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": false,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": ""
119
+ },
120
+ "attribute": "primary-color",
121
+ "reflect": false,
122
+ "defaultValue": "Colors.Primary"
123
+ }
124
+ };
125
+ }
121
126
  }
@@ -1,7 +1,8 @@
1
- import { Component, Prop, h, State } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { Colors } from '../../constants/colors';
3
3
  export class SalonGiftCardModal {
4
4
  constructor() {
5
+ this.salonId = undefined;
5
6
  this.primaryColor = Colors.Primary;
6
7
  this.isModalOpen = true;
7
8
  }
@@ -12,58 +13,61 @@ export class SalonGiftCardModal {
12
13
  }
13
14
  render() {
14
15
  const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
15
- return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" },
16
- h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }),
17
- h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }),
18
- h("div", { class: "salon-modal--inner" },
19
- h("div", { class: "salon-modal--content" },
20
- h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
16
+ return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
21
17
  }
22
18
  static get is() { return "salon-gift-card-modal"; }
23
- static get originalStyleUrls() { return {
24
- "$": ["index.less"]
25
- }; }
26
- static get styleUrls() { return {
27
- "$": ["index.css"]
28
- }; }
29
- static get properties() { return {
30
- "salonId": {
31
- "type": "number",
32
- "mutable": false,
33
- "complexType": {
34
- "original": "number",
35
- "resolved": "number",
36
- "references": {}
37
- },
38
- "required": false,
39
- "optional": false,
40
- "docs": {
41
- "tags": [],
42
- "text": ""
43
- },
44
- "attribute": "salon-id",
45
- "reflect": false
46
- },
47
- "primaryColor": {
48
- "type": "string",
49
- "mutable": false,
50
- "complexType": {
51
- "original": "string",
52
- "resolved": "string",
53
- "references": {}
54
- },
55
- "required": false,
56
- "optional": false,
57
- "docs": {
58
- "tags": [],
59
- "text": ""
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["index.css"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["index.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ 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
60
47
  },
61
- "attribute": "primary-color",
62
- "reflect": false,
63
- "defaultValue": "Colors.Primary"
64
- }
65
- }; }
66
- static get states() { return {
67
- "isModalOpen": {}
68
- }; }
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.Primary"
65
+ }
66
+ };
67
+ }
68
+ static get states() {
69
+ return {
70
+ "isModalOpen": {}
71
+ };
72
+ }
69
73
  }
@@ -1,6 +1,10 @@
1
- import { Component, Prop, h, Method, State } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import HttpService from '../../services/services';
3
3
  export class SalonInfo {
4
+ constructor() {
5
+ this.salonId = undefined;
6
+ this.salonInfo = undefined;
7
+ }
4
8
  componentWillLoad() {
5
9
  this.fetchData();
6
10
  }
@@ -11,61 +15,63 @@ export class SalonInfo {
11
15
  catch (e) { }
12
16
  }
13
17
  render() {
14
- return (h("div", { class: "salon-info" },
15
- h("div", { class: "container" },
16
- h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } },
17
- h("salon-schedules", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })),
18
- h("div", { class: "row" },
19
- h("div", { class: "col-md-5", style: { marginBottom: '24px' } },
20
- h("salon-locations", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })),
21
- h("div", { class: "col-md-7", style: { marginBottom: '24px' } },
22
- h("salon-latest-styles", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))))));
18
+ return (h("div", { class: "salon-info" }, h("div", { class: "container" }, h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } }, h("salon-schedules", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "row" }, h("div", { class: "col-md-5", style: { marginBottom: '24px' } }, h("salon-locations", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "col-md-7", style: { marginBottom: '24px' } }, h("salon-latest-styles", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))))));
23
19
  }
24
20
  static get is() { return "salon-info"; }
25
- static get originalStyleUrls() { return {
26
- "$": ["index.less"]
27
- }; }
28
- static get styleUrls() { return {
29
- "$": ["index.css"]
30
- }; }
31
- static get properties() { return {
32
- "salonId": {
33
- "type": "number",
34
- "mutable": false,
35
- "complexType": {
36
- "original": "number",
37
- "resolved": "number",
38
- "references": {}
39
- },
40
- "required": false,
41
- "optional": false,
42
- "docs": {
43
- "tags": [],
44
- "text": ""
45
- },
46
- "attribute": "salon-id",
47
- "reflect": false
48
- }
49
- }; }
50
- static get states() { return {
51
- "salonInfo": {}
52
- }; }
53
- static get methods() { return {
54
- "fetchData": {
55
- "complexType": {
56
- "signature": "() => Promise<void>",
57
- "parameters": [],
58
- "references": {
59
- "Promise": {
60
- "location": "global"
61
- }
21
+ static get originalStyleUrls() {
22
+ return {
23
+ "$": ["index.css"]
24
+ };
25
+ }
26
+ static get styleUrls() {
27
+ return {
28
+ "$": ["index.css"]
29
+ };
30
+ }
31
+ static get properties() {
32
+ return {
33
+ "salonId": {
34
+ "type": "number",
35
+ "mutable": false,
36
+ "complexType": {
37
+ "original": "number",
38
+ "resolved": "number",
39
+ "references": {}
40
+ },
41
+ "required": false,
42
+ "optional": false,
43
+ "docs": {
44
+ "tags": [],
45
+ "text": ""
62
46
  },
63
- "return": "Promise<void>"
64
- },
65
- "docs": {
66
- "text": "",
67
- "tags": []
47
+ "attribute": "salon-id",
48
+ "reflect": false
68
49
  }
69
- }
70
- }; }
50
+ };
51
+ }
52
+ static get states() {
53
+ return {
54
+ "salonInfo": {}
55
+ };
56
+ }
57
+ static get methods() {
58
+ return {
59
+ "fetchData": {
60
+ "complexType": {
61
+ "signature": "() => Promise<void>",
62
+ "parameters": [],
63
+ "references": {
64
+ "Promise": {
65
+ "location": "global"
66
+ }
67
+ },
68
+ "return": "Promise<void>"
69
+ },
70
+ "docs": {
71
+ "text": "",
72
+ "tags": []
73
+ }
74
+ }
75
+ };
76
+ }
71
77
  }
@@ -1,6 +1,9 @@
1
1
  .salon-latest-reviews .salon-review {
2
2
  min-width: 280px;
3
3
  }
4
+
5
+
6
+
4
7
  @media (min-width: 768px) {
5
8
  .salon-latest-reviews .salon-review {
6
9
  min-width: 300px;