favesalon-embed 0.1.0 → 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 (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,4 +1,4 @@
1
- import { Component, Prop, h, Method, State } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import dayjs from 'dayjs';
3
3
  import { Colors } from '../../constants/colors';
4
4
  import { shortDateYearFormat } from '../../types/common';
@@ -6,8 +6,10 @@ import { getRatingText } from '../../utils/utils';
6
6
  import HttpService from '../../services/services';
7
7
  export class SalonLatestReviews {
8
8
  constructor() {
9
+ this.salonId = undefined;
9
10
  this.primaryColor = Colors.Primary;
10
11
  this.salonReviews = [];
12
+ this.isLoading = undefined;
11
13
  }
12
14
  componentWillLoad() {
13
15
  this.fetchData();
@@ -23,154 +25,139 @@ export class SalonLatestReviews {
23
25
  }
24
26
  render() {
25
27
  if (this.isLoading) {
26
- return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } },
27
- h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index) => {
28
- return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) },
29
- h("div", { class: "card", style: { border: 'none' } },
30
- h("div", { class: "card-body" },
31
- h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } },
32
- h("div", { style: {
33
- backgroundColor: Colors.Gray02,
34
- borderRadius: '50px',
35
- height: '48px',
36
- width: '48px',
37
- float: 'left',
38
- } }),
39
- h("div", { style: {
40
- backgroundColor: Colors.Gray01,
41
- height: '16px',
42
- width: '120px',
43
- marginLeft: '16px',
44
- marginTop: '14px',
45
- float: 'left',
46
- } })),
47
- h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (h("div", { style: {
48
- backgroundColor: Colors.Gray01,
49
- height: '20px',
50
- width: '20px',
51
- marginRight: '8px',
52
- float: 'left',
53
- } })))),
54
- h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } },
55
- h("div", { style: {
56
- backgroundColor: Colors.Gray01,
57
- height: '16px',
58
- width: '132px',
59
- } })),
60
- h("div", { class: "salon-review--detail", style: { marginTop: '8px' } },
61
- h("div", { class: "salon-review--description", style: {
62
- fontSize: '16px',
63
- lineHeight: '26px',
64
- overflow: 'hidden',
65
- } },
66
- h("div", { style: {
67
- backgroundColor: Colors.Gray01,
68
- height: '16px',
69
- width: '240px',
70
- float: 'left',
71
- } })))))));
72
- }))));
28
+ return (h("div", { class: "salon-latest-reviews", style: { overflow: 'hidden' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, [1, 2, 3, 4, 5].map((fakeId, index) => {
29
+ return (h("div", { key: `salon-latest-review--${fakeId}`, class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px', overflow: 'hidden' } }, h("div", { style: {
30
+ backgroundColor: Colors.Gray02,
31
+ borderRadius: '50px',
32
+ height: '48px',
33
+ width: '48px',
34
+ float: 'left',
35
+ } }), h("div", { style: {
36
+ backgroundColor: Colors.Gray01,
37
+ height: '16px',
38
+ width: '120px',
39
+ marginLeft: '16px',
40
+ marginTop: '14px',
41
+ float: 'left',
42
+ } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(() => (h("div", { style: {
43
+ backgroundColor: Colors.Gray01,
44
+ height: '20px',
45
+ width: '20px',
46
+ marginRight: '8px',
47
+ float: 'left',
48
+ } })))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold', marginTop: '16px' } }, h("div", { style: {
49
+ backgroundColor: Colors.Gray01,
50
+ height: '16px',
51
+ width: '132px',
52
+ } })), h("div", { class: "salon-review--detail", style: { marginTop: '8px' } }, h("div", { class: "salon-review--description", style: {
53
+ fontSize: '16px',
54
+ lineHeight: '26px',
55
+ overflow: 'hidden',
56
+ } }, h("div", { style: {
57
+ backgroundColor: Colors.Gray01,
58
+ height: '16px',
59
+ width: '240px',
60
+ float: 'left',
61
+ } })))))));
62
+ }))));
73
63
  }
74
64
  const ratingTexts = getRatingText();
75
- return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } },
76
- h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
77
- const { user } = review;
78
- return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) },
79
- h("div", { class: "card", style: { border: 'none' } },
80
- h("div", { class: "card-body" },
81
- h("div", { class: "salon-review--user", style: { marginBottom: '16px' } },
82
- h("user-avatar", { size: 48, name: h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })),
83
- h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } },
84
- [1, 2, 3, 4, 5].map(score => (h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: Colors.Gray04 }) }))),
85
- h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs(review.createdDate).format(shortDateYearFormat))),
86
- h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]),
87
- (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } },
88
- h("div", { class: "salon-review--description", style: {
89
- fontSize: '16px',
90
- lineHeight: '26px',
91
- overflow: 'hidden',
92
- maxHeight: review.photos.length > 0 ? '52px' : '104px',
93
- } }, review.title || review.description))),
94
- review.photos.length > 0 && (h("div", { style: {
95
- display: 'flex',
96
- flexDirection: 'row',
97
- overflowX: 'auto',
98
- } }, review.photos.map(photo => (h("div", { style: {
99
- border: '1px solid #d9d9d9',
100
- position: 'relative',
101
- cursor: 'pointer',
102
- borderRadius: '2px',
103
- height: '66px',
104
- marginTop: '12px',
105
- marginRight: '12px',
106
- } },
107
- h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
108
- }))));
65
+ return (h("div", { class: "salon-latest-reviews", style: { overflowX: 'auto' } }, h("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, (this.salonReviews || []).map((review, index) => {
66
+ const { user } = review;
67
+ return (h("div", { class: "salon-review", style: Object.assign({ border: `1px solid ${Colors.Gray02}`, background: Colors.White, borderRadius: '8px', overflow: 'hidden' }, index > 0 ? { marginLeft: '16px' } : {}) }, h("div", { class: "card", style: { border: 'none' } }, h("div", { class: "card-body" }, h("div", { class: "salon-review--user", style: { marginBottom: '16px' } }, h("user-avatar", { size: 48, name: h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, avatar: user.avatar, nameStyle: { fontWeight: 'bold' } })), h("div", { class: "salon-review--rating", style: { display: 'flex', flexDirection: 'row', marginBottom: '4px' } }, [1, 2, 3, 4, 5].map(score => (h("i", { class: score <= review.point ? 'ri-heart-fill' : 'ri-heart-line', style: Object.assign({ fontSize: '16px', marginRight: '4px' }, score <= review.point ? { color: this.primaryColor } : { color: Colors.Gray04 }) }))), h("div", { class: "salon-review--rating--date", style: { fontSize: '14px', color: Colors.Gray04, marginLeft: '16px', position: 'relative', top: '2px' } }, dayjs(review.createdDate).format(shortDateYearFormat))), h("div", { class: "salon-review--rating-text", style: { fontSize: '16px', fontWeight: 'bold' } }, ratingTexts[review.point]), (review.title || review.description) && (h("div", { class: "salon-review--detail", style: { marginTop: '16px' } }, h("div", { class: "salon-review--description", style: {
68
+ fontSize: '16px',
69
+ lineHeight: '26px',
70
+ overflow: 'hidden',
71
+ maxHeight: review.photos.length > 0 ? '52px' : '104px',
72
+ } }, review.title || review.description))), review.photos.length > 0 && (h("div", { style: {
73
+ display: 'flex',
74
+ flexDirection: 'row',
75
+ overflowX: 'auto',
76
+ } }, review.photos.map(photo => (h("div", { style: {
77
+ border: '1px solid #d9d9d9',
78
+ position: 'relative',
79
+ cursor: 'pointer',
80
+ borderRadius: '2px',
81
+ height: '66px',
82
+ marginTop: '12px',
83
+ marginRight: '12px',
84
+ } }, h("img", { alt: "", src: photo.imageUrlThumb, height: "64", style: { width: 'auto' } }))))))))));
85
+ }))));
109
86
  }
110
87
  static get is() { return "salon-latest-reviews"; }
111
- static get originalStyleUrls() { return {
112
- "$": ["index.less"]
113
- }; }
114
- static get styleUrls() { return {
115
- "$": ["index.css"]
116
- }; }
117
- static get properties() { return {
118
- "salonId": {
119
- "type": "number",
120
- "mutable": false,
121
- "complexType": {
122
- "original": "number",
123
- "resolved": "number",
124
- "references": {}
125
- },
126
- "required": false,
127
- "optional": false,
128
- "docs": {
129
- "tags": [],
130
- "text": ""
131
- },
132
- "attribute": "salon-id",
133
- "reflect": false
134
- },
135
- "primaryColor": {
136
- "type": "string",
137
- "mutable": false,
138
- "complexType": {
139
- "original": "string",
140
- "resolved": "string",
141
- "references": {}
142
- },
143
- "required": false,
144
- "optional": false,
145
- "docs": {
146
- "tags": [],
147
- "text": ""
148
- },
149
- "attribute": "primary-color",
150
- "reflect": false,
151
- "defaultValue": "Colors.Primary"
152
- }
153
- }; }
154
- static get states() { return {
155
- "salonReviews": {},
156
- "isLoading": {}
157
- }; }
158
- static get methods() { return {
159
- "fetchData": {
160
- "complexType": {
161
- "signature": "() => Promise<void>",
162
- "parameters": [],
163
- "references": {
164
- "Promise": {
165
- "location": "global"
166
- }
88
+ static get originalStyleUrls() {
89
+ return {
90
+ "$": ["index.css"]
91
+ };
92
+ }
93
+ static get styleUrls() {
94
+ return {
95
+ "$": ["index.css"]
96
+ };
97
+ }
98
+ static get properties() {
99
+ return {
100
+ "salonId": {
101
+ "type": "number",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "number",
105
+ "resolved": "number",
106
+ "references": {}
167
107
  },
168
- "return": "Promise<void>"
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": ""
113
+ },
114
+ "attribute": "salon-id",
115
+ "reflect": false
169
116
  },
170
- "docs": {
171
- "text": "",
172
- "tags": []
117
+ "primaryColor": {
118
+ "type": "string",
119
+ "mutable": false,
120
+ "complexType": {
121
+ "original": "string",
122
+ "resolved": "string",
123
+ "references": {}
124
+ },
125
+ "required": false,
126
+ "optional": false,
127
+ "docs": {
128
+ "tags": [],
129
+ "text": ""
130
+ },
131
+ "attribute": "primary-color",
132
+ "reflect": false,
133
+ "defaultValue": "Colors.Primary"
173
134
  }
174
- }
175
- }; }
135
+ };
136
+ }
137
+ static get states() {
138
+ return {
139
+ "salonReviews": {},
140
+ "isLoading": {}
141
+ };
142
+ }
143
+ static get methods() {
144
+ return {
145
+ "fetchData": {
146
+ "complexType": {
147
+ "signature": "() => Promise<void>",
148
+ "parameters": [],
149
+ "references": {
150
+ "Promise": {
151
+ "location": "global"
152
+ }
153
+ },
154
+ "return": "Promise<void>"
155
+ },
156
+ "docs": {
157
+ "text": "",
158
+ "tags": []
159
+ }
160
+ }
161
+ };
162
+ }
176
163
  }
@@ -2,6 +2,8 @@ salon-latest-styles .view--salon-styles--item {
2
2
  width: 120px;
3
3
  height: 120px;
4
4
  }
5
+
6
+
5
7
  @media (min-width: 1024px) {
6
8
  salon-latest-styles .view--salon-styles--item {
7
9
  width: 200px;
@@ -1,8 +1,15 @@
1
- import { Component, Prop, h, Method, State } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import { Colors } from '../../constants/colors';
3
3
  import { isVideoMedia } from '../../types/style';
4
4
  import HttpService from '../../services/services';
5
5
  export class SalonLatestStyles {
6
+ constructor() {
7
+ this.salonId = undefined;
8
+ this.isLoading = undefined;
9
+ this.withBorder = undefined;
10
+ this.isLoadingState = undefined;
11
+ this.latestStyles = undefined;
12
+ }
6
13
  componentDidLoad() {
7
14
  this.fetchData();
8
15
  }
@@ -31,148 +38,146 @@ export class SalonLatestStyles {
31
38
  }
32
39
  render() {
33
40
  if (this.isLoading || this.isLoadingState) {
34
- return (h("div", { class: "view view--salon-styles" },
35
- h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } },
36
- h("div", { style: {
37
- backgroundColor: Colors.Gray02,
38
- height: '20px',
39
- width: '120px',
40
- } }),
41
- h("div", { style: { marginTop: '24px' } },
42
- h("div", { style: {
43
- overflow: 'hidden',
44
- marginLeft: '-16px',
45
- marginBottom: '-16px',
46
- } }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
47
- float: 'left',
48
- paddingLeft: '16px',
49
- marginBottom: '16px',
50
- } },
51
- h("div", { style: {
52
- backgroundColor: Colors.Gray01,
53
- borderRadius: '8px',
54
- width: '120px',
55
- height: '120px',
56
- overflow: 'hidden',
57
- position: 'relative',
58
- cursor: 'pointer',
59
- } })))))))));
41
+ return (h("div", { class: "view view--salon-styles" }, h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, h("div", { style: {
42
+ backgroundColor: Colors.Gray02,
43
+ height: '20px',
44
+ width: '120px',
45
+ } }), h("div", { style: { marginTop: '24px' } }, h("div", { style: {
46
+ overflow: 'hidden',
47
+ marginLeft: '-16px',
48
+ marginBottom: '-16px',
49
+ } }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((fakeId, idx) => (h("div", { key: `style-listing--item-${fakeId}-${idx}`, style: {
50
+ float: 'left',
51
+ paddingLeft: '16px',
52
+ marginBottom: '16px',
53
+ } }, h("div", { style: {
54
+ backgroundColor: Colors.Gray01,
55
+ borderRadius: '8px',
56
+ width: '120px',
57
+ height: '120px',
58
+ overflow: 'hidden',
59
+ position: 'relative',
60
+ cursor: 'pointer',
61
+ } })))))))));
60
62
  }
61
- return (h("div", { class: "view view--salon-styles" },
62
- h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } },
63
- h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Photos"),
64
- h("div", { style: {
65
- overflow: 'hidden',
66
- marginLeft: '-16px',
67
- marginBottom: '-16px',
68
- marginTop: '16px',
69
- } }, (this.latestStyles || []).map((faveStyle, idx) => {
70
- const { imageThumb, albumMedias } = faveStyle;
71
- const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
72
- const isVideo = firstMedia ? isVideoMedia(firstMedia) : false;
73
- return (h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
74
- float: 'left',
75
- paddingLeft: '16px',
76
- marginBottom: '16px',
77
- } },
78
- h("div", { class: "view--salon-styles--item", style: Object.assign({ backgroundColor: Colors.Gray01, borderRadius: '8px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, !isVideo && firstMedia ? {
79
- backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
80
- backgroundRepeat: 'no-repeat',
81
- backgroundPosition: 'center center',
82
- backgroundSize: 'cover',
83
- } : {}), onClick: () => this.onClickLookbook(faveStyle) }, isVideo && firstMedia && (h("div", null,
84
- h("video", { muted: true, width: "100%", height: "100%", poster: imageThumb },
85
- h("source", { src: firstMedia.mediaUrl, type: "video/mp4" })),
86
- h("i", { class: "ri-play-circle-fill", style: {
87
- fontSize: '48px',
88
- color: Colors.TextColor,
89
- position: 'absolute',
90
- left: '50%',
91
- top: '50%',
92
- transform: 'translate(-50%, -50%)',
93
- } }))))));
94
- })))));
63
+ return (h("div", { class: "view view--salon-styles" }, h("div", { class: "view-content", style: this.withBorder ? { border: `1px solid ${Colors.Gray02}`, borderRadius: '4px' } : { padding: '0px' } }, h("div", { style: { fontSize: '18px', fontWeight: 'bold' } }, "Photos"), h("div", { style: {
64
+ overflow: 'hidden',
65
+ marginLeft: '-16px',
66
+ marginBottom: '-16px',
67
+ marginTop: '16px',
68
+ } }, (this.latestStyles || []).map((faveStyle, idx) => {
69
+ const { imageThumb, albumMedias } = faveStyle;
70
+ const firstMedia = albumMedias.length > 0 ? albumMedias[0] : null;
71
+ const isVideo = firstMedia ? isVideoMedia(firstMedia) : false;
72
+ return (h("div", { key: `style-listing--item-${faveStyle.id}-${idx}`, style: {
73
+ float: 'left',
74
+ paddingLeft: '16px',
75
+ marginBottom: '16px',
76
+ } }, h("div", { class: "view--salon-styles--item", style: Object.assign({ backgroundColor: Colors.Gray01, borderRadius: '8px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, !isVideo && firstMedia ? {
77
+ backgroundImage: `url("${firstMedia.imageThumb || firstMedia.imageThumbMedium}")`,
78
+ backgroundRepeat: 'no-repeat',
79
+ backgroundPosition: 'center center',
80
+ backgroundSize: 'cover',
81
+ } : {}), onClick: () => this.onClickLookbook(faveStyle) }, isVideo && firstMedia && (h("div", null, h("video", { muted: true, width: "100%", height: "100%", poster: imageThumb }, h("source", { src: firstMedia.mediaUrl, type: "video/mp4" })), h("i", { class: "ri-play-circle-fill", style: {
82
+ fontSize: '48px',
83
+ color: Colors.TextColor,
84
+ position: 'absolute',
85
+ left: '50%',
86
+ top: '50%',
87
+ transform: 'translate(-50%, -50%)',
88
+ } }))))));
89
+ })))));
95
90
  }
96
91
  static get is() { return "salon-latest-styles"; }
97
- static get originalStyleUrls() { return {
98
- "$": ["index.less"]
99
- }; }
100
- static get styleUrls() { return {
101
- "$": ["index.css"]
102
- }; }
103
- static get properties() { return {
104
- "salonId": {
105
- "type": "number",
106
- "mutable": false,
107
- "complexType": {
108
- "original": "number",
109
- "resolved": "number",
110
- "references": {}
111
- },
112
- "required": false,
113
- "optional": false,
114
- "docs": {
115
- "tags": [],
116
- "text": ""
117
- },
118
- "attribute": "salon-id",
119
- "reflect": false
120
- },
121
- "isLoading": {
122
- "type": "boolean",
123
- "mutable": false,
124
- "complexType": {
125
- "original": "boolean",
126
- "resolved": "boolean",
127
- "references": {}
128
- },
129
- "required": false,
130
- "optional": true,
131
- "docs": {
132
- "tags": [],
133
- "text": ""
134
- },
135
- "attribute": "is-loading",
136
- "reflect": false
137
- },
138
- "withBorder": {
139
- "type": "boolean",
140
- "mutable": false,
141
- "complexType": {
142
- "original": "boolean",
143
- "resolved": "boolean",
144
- "references": {}
145
- },
146
- "required": false,
147
- "optional": true,
148
- "docs": {
149
- "tags": [],
150
- "text": ""
92
+ static get originalStyleUrls() {
93
+ return {
94
+ "$": ["index.css"]
95
+ };
96
+ }
97
+ static get styleUrls() {
98
+ return {
99
+ "$": ["index.css"]
100
+ };
101
+ }
102
+ static get properties() {
103
+ return {
104
+ "salonId": {
105
+ "type": "number",
106
+ "mutable": false,
107
+ "complexType": {
108
+ "original": "number",
109
+ "resolved": "number",
110
+ "references": {}
111
+ },
112
+ "required": false,
113
+ "optional": false,
114
+ "docs": {
115
+ "tags": [],
116
+ "text": ""
117
+ },
118
+ "attribute": "salon-id",
119
+ "reflect": false
151
120
  },
152
- "attribute": "with-border",
153
- "reflect": false
154
- }
155
- }; }
156
- static get states() { return {
157
- "isLoadingState": {},
158
- "latestStyles": {}
159
- }; }
160
- static get methods() { return {
161
- "fetchData": {
162
- "complexType": {
163
- "signature": "() => Promise<boolean>",
164
- "parameters": [],
165
- "references": {
166
- "Promise": {
167
- "location": "global"
168
- }
121
+ "isLoading": {
122
+ "type": "boolean",
123
+ "mutable": false,
124
+ "complexType": {
125
+ "original": "boolean",
126
+ "resolved": "boolean",
127
+ "references": {}
128
+ },
129
+ "required": false,
130
+ "optional": true,
131
+ "docs": {
132
+ "tags": [],
133
+ "text": ""
169
134
  },
170
- "return": "Promise<boolean>"
135
+ "attribute": "is-loading",
136
+ "reflect": false
171
137
  },
172
- "docs": {
173
- "text": "",
174
- "tags": []
138
+ "withBorder": {
139
+ "type": "boolean",
140
+ "mutable": false,
141
+ "complexType": {
142
+ "original": "boolean",
143
+ "resolved": "boolean",
144
+ "references": {}
145
+ },
146
+ "required": false,
147
+ "optional": true,
148
+ "docs": {
149
+ "tags": [],
150
+ "text": ""
151
+ },
152
+ "attribute": "with-border",
153
+ "reflect": false
175
154
  }
176
- }
177
- }; }
155
+ };
156
+ }
157
+ static get states() {
158
+ return {
159
+ "isLoadingState": {},
160
+ "latestStyles": {}
161
+ };
162
+ }
163
+ static get methods() {
164
+ return {
165
+ "fetchData": {
166
+ "complexType": {
167
+ "signature": "() => Promise<boolean>",
168
+ "parameters": [],
169
+ "references": {
170
+ "Promise": {
171
+ "location": "global"
172
+ }
173
+ },
174
+ "return": "Promise<boolean>"
175
+ },
176
+ "docs": {
177
+ "text": "",
178
+ "tags": []
179
+ }
180
+ }
181
+ };
182
+ }
178
183
  }
@@ -3,6 +3,7 @@
3
3
  overflow: hidden;
4
4
  margin-left: -32px;
5
5
  }
6
+
6
7
  salon-locations .salon-contact--links-item {
7
8
  float: left;
8
9
  display: flex;
@@ -12,9 +13,11 @@
12
13
  min-width: 300px;
13
14
  padding-left: 32px;
14
15
  }
16
+
15
17
  salon-locations .salon-contact--links-item:nth-child(2n + 1) {
16
18
  clear: left;
17
19
  }
20
+
18
21
  salon-locations .salon-contact--links-item + .salon-contact--links-item {
19
22
  margin-top: 8px;
20
23
  }