favesalon-embed 1.0.4 → 1.0.6

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 (183) hide show
  1. package/dist/custom-elements/index.d.ts +42 -0
  2. package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -6
  3. package/dist/favesalon-embed/activate-form.entry.js +70 -0
  4. package/dist/favesalon-embed/app-globals-74127f4b.js +7 -0
  5. package/dist/favesalon-embed/app-globals-f954a22f.js +7 -0
  6. package/dist/favesalon-embed/change-password-form.entry.js +81 -0
  7. package/dist/favesalon-embed/chat-box.entry.js +55 -0
  8. package/dist/{esm → favesalon-embed}/chat-button.entry.js +36 -13
  9. package/dist/favesalon-embed/chat-form.entry.js +39 -0
  10. package/dist/favesalon-embed/chat-messages.entry.js +71 -0
  11. package/dist/favesalon-embed/chat-rooms.entry.js +111 -0
  12. package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
  13. package/dist/favesalon-embed/dom-64053c71.js +73 -0
  14. package/dist/favesalon-embed/favesalon-embed.css +114 -1
  15. package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
  16. package/dist/{esm → favesalon-embed}/google-map.entry.js +1 -1
  17. package/dist/{esm/index-a1c7583c.js → favesalon-embed/index-00b83e1c.js} +425 -15
  18. package/dist/favesalon-embed/index-888e99e3.js +3371 -0
  19. package/dist/favesalon-embed/index-a229b3b5.js +3371 -0
  20. package/dist/favesalon-embed/index.esm.js +1 -0
  21. package/dist/{esm/chat-box_5.entry.js → favesalon-embed/lodash-d5526b38.js} +27 -243
  22. package/dist/favesalon-embed/login-form.entry.js +67 -0
  23. package/dist/{cjs/chat-button.cjs.entry.js → favesalon-embed/notify-sounds.entry.js} +20 -44
  24. package/dist/favesalon-embed/register-form.entry.js +88 -0
  25. package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
  26. package/dist/favesalon-embed/reset-password-form.entry.js +47 -0
  27. package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
  28. package/dist/{esm → favesalon-embed}/salon-booking.entry.js +4 -4
  29. package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
  30. package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +4 -4
  31. package/dist/{esm → favesalon-embed}/salon-info.entry.js +3 -3
  32. package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +22 -6
  33. package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +27 -105
  34. package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
  35. package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +18 -6
  36. package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
  37. package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +20 -6
  38. package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
  39. package/dist/{esm → favesalon-embed}/salon-services.entry.js +25 -13
  40. package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
  41. package/dist/{esm/services-257442e2.js → favesalon-embed/services-5a4c43a6.js} +2608 -188
  42. package/dist/{cjs/services-d1bdf299.js → favesalon-embed/services-d71be591.js} +2616 -191
  43. package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
  44. package/dist/{esm → favesalon-embed}/style-detail.entry.js +29 -11
  45. package/dist/favesalon-embed/user-avatar.entry.js +52 -0
  46. package/dist/favesalon-embed/user-form.entry.js +44 -0
  47. package/dist/{collection/utils/utils.js → favesalon-embed/utils-fd30fb29.js} +14 -5
  48. package/dist/types/components/activate-form/activate-form.d.ts +12 -0
  49. package/dist/types/components/activate-form/test/activate-form.spec.d.ts +1 -0
  50. package/dist/types/components/change-password-form/change-password-form.d.ts +12 -0
  51. package/dist/types/components/chat-box/index.d.ts +1 -0
  52. package/dist/types/components/chat-button/index.d.ts +6 -2
  53. package/dist/types/components/chat-button/notify-sounds.d.ts +5 -0
  54. package/dist/types/components/chat-rooms/index.d.ts +6 -0
  55. package/dist/types/components/login-form/login-form.d.ts +10 -0
  56. package/dist/types/components/register-form/register-form.d.ts +13 -0
  57. package/dist/types/components/reset-password-form/reset-password-form.d.ts +9 -0
  58. package/dist/types/components/user-form/user-form.d.ts +7 -0
  59. package/dist/types/components.d.ts +127 -2
  60. package/dist/types/services/services.d.ts +17 -0
  61. package/dist/types/types/chat.d.ts +1 -0
  62. package/dist/types/types/user.d.ts +16 -0
  63. package/dist/types/utils/utils.d.ts +1 -0
  64. package/dist/types/utils/utils.spec.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/dist/cjs/chat-box_5.cjs.entry.js +0 -17439
  67. package/dist/cjs/colors-38421769.js +0 -69
  68. package/dist/cjs/favesalon-embed.cjs.js +0 -23
  69. package/dist/cjs/google-map.cjs.entry.js +0 -52
  70. package/dist/cjs/index-7f190886.js +0 -4396
  71. package/dist/cjs/index-dd8176c4.js +0 -1531
  72. package/dist/cjs/index.cjs.js +0 -2
  73. package/dist/cjs/loader.cjs.js +0 -22
  74. package/dist/cjs/relativeTime-3721080d.js +0 -9
  75. package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
  76. package/dist/cjs/salon-booking.cjs.entry.js +0 -51
  77. package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
  78. package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
  79. package/dist/cjs/salon-info.cjs.entry.js +0 -33
  80. package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
  81. package/dist/cjs/salon-latest-styles_3.cjs.entry.js +0 -241
  82. package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
  83. package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
  84. package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
  85. package/dist/cjs/salon-services.cjs.entry.js +0 -81
  86. package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
  87. package/dist/cjs/style-detail.cjs.entry.js +0 -312
  88. package/dist/cjs/utils-c5a33b3c.js +0 -23
  89. package/dist/collection/collection-manifest.json +0 -33
  90. package/dist/collection/components/chat-box/index.css +0 -105
  91. package/dist/collection/components/chat-box/index.js +0 -138
  92. package/dist/collection/components/chat-button/index.css +0 -101
  93. package/dist/collection/components/chat-button/index.js +0 -155
  94. package/dist/collection/components/chat-form/index.css +0 -40
  95. package/dist/collection/components/chat-form/index.js +0 -79
  96. package/dist/collection/components/chat-messages/index.css +0 -48
  97. package/dist/collection/components/chat-messages/index.js +0 -142
  98. package/dist/collection/components/chat-rooms/index.css +0 -102
  99. package/dist/collection/components/chat-rooms/index.js +0 -157
  100. package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
  101. package/dist/collection/components/google-map/index.css +0 -5
  102. package/dist/collection/components/google-map/index.js +0 -90
  103. package/dist/collection/components/salon-booking/index.css +0 -30
  104. package/dist/collection/components/salon-booking/index.js +0 -126
  105. package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
  106. package/dist/collection/components/salon-gift-card/index.css +0 -30
  107. package/dist/collection/components/salon-gift-card/index.js +0 -126
  108. package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
  109. package/dist/collection/components/salon-info/index.css +0 -1
  110. package/dist/collection/components/salon-info/index.js +0 -77
  111. package/dist/collection/components/salon-latest-reviews/index.css +0 -11
  112. package/dist/collection/components/salon-latest-reviews/index.js +0 -163
  113. package/dist/collection/components/salon-latest-styles/index.css +0 -12
  114. package/dist/collection/components/salon-locations/index.css +0 -24
  115. package/dist/collection/components/salon-lookbook/index.css +0 -15
  116. package/dist/collection/components/salon-lookbook/index.js +0 -368
  117. package/dist/collection/components/salon-ranking/index.css +0 -3
  118. package/dist/collection/components/salon-ranking/index.js +0 -117
  119. package/dist/collection/components/salon-reviews/index.css +0 -18
  120. package/dist/collection/components/salon-reviews/index.js +0 -249
  121. package/dist/collection/components/salon-schedules/index.css +0 -18
  122. package/dist/collection/components/salon-services/index.css +0 -1
  123. package/dist/collection/components/salon-services/index.js +0 -146
  124. package/dist/collection/components/salon-stylists/index.css +0 -43
  125. package/dist/collection/components/salon-stylists/index.js +0 -184
  126. package/dist/collection/components/style-detail/index.css +0 -76
  127. package/dist/collection/components/style-detail/index.js +0 -386
  128. package/dist/collection/components/user-avatar/index.css +0 -0
  129. package/dist/collection/components/user-avatar/index.js +0 -159
  130. package/dist/collection/constants/colors.js +0 -65
  131. package/dist/collection/global/global.js +0 -0
  132. package/dist/collection/mocks/users.js +0 -10
  133. package/dist/collection/services/services.js +0 -295
  134. package/dist/collection/types/chat.js +0 -23
  135. package/dist/collection/types/common.js +0 -11
  136. package/dist/collection/types/review.js +0 -39
  137. package/dist/collection/types/salon.js +0 -58
  138. package/dist/collection/types/service.js +0 -24
  139. package/dist/collection/types/style.js +0 -128
  140. package/dist/collection/types/stylist.js +0 -30
  141. package/dist/collection/types/user.js +0 -10
  142. package/dist/custom-elements/index.js +0 -44974
  143. package/dist/esm/_commonjsHelpers-66ac50f5.js +0 -32
  144. package/dist/esm/favesalon-embed.js +0 -18
  145. package/dist/esm/index-0494771f.js +0 -1504
  146. package/dist/esm/index.js +0 -1
  147. package/dist/esm/loader.js +0 -18
  148. package/dist/esm/polyfills/core-js.js +0 -11
  149. package/dist/esm/polyfills/css-shim.js +0 -1
  150. package/dist/esm/polyfills/dom.js +0 -79
  151. package/dist/esm/polyfills/es5-html-element.js +0 -1
  152. package/dist/esm/polyfills/index.js +0 -34
  153. package/dist/esm/polyfills/system.js +0 -6
  154. package/dist/esm/relativeTime-baa50aa2.js +0 -7
  155. package/dist/esm/salon-latest-styles_3.entry.js +0 -235
  156. package/dist/esm/utils-e97485e0.js +0 -19
  157. package/dist/favesalon-embed/p-05a1c88a.entry.js +0 -1
  158. package/dist/favesalon-embed/p-0acf0447.entry.js +0 -1
  159. package/dist/favesalon-embed/p-0bc4f624.js +0 -1
  160. package/dist/favesalon-embed/p-1af1515f.entry.js +0 -1
  161. package/dist/favesalon-embed/p-1cba5fc9.entry.js +0 -1
  162. package/dist/favesalon-embed/p-39a4ef15.entry.js +0 -1
  163. package/dist/favesalon-embed/p-3e2cb05b.entry.js +0 -1
  164. package/dist/favesalon-embed/p-47e646f8.js +0 -1
  165. package/dist/favesalon-embed/p-487b311f.entry.js +0 -1
  166. package/dist/favesalon-embed/p-55387c2f.entry.js +0 -1
  167. package/dist/favesalon-embed/p-566f05b4.entry.js +0 -1
  168. package/dist/favesalon-embed/p-862a0de0.entry.js +0 -1
  169. package/dist/favesalon-embed/p-9fe0cbeb.js +0 -2
  170. package/dist/favesalon-embed/p-a33331cc.js +0 -1
  171. package/dist/favesalon-embed/p-aeeb7b5f.entry.js +0 -1
  172. package/dist/favesalon-embed/p-b08e5b54.js +0 -6
  173. package/dist/favesalon-embed/p-b5cca5fc.entry.js +0 -1
  174. package/dist/favesalon-embed/p-c7fb7af5.js +0 -1580
  175. package/dist/favesalon-embed/p-ccab56d8.js +0 -1
  176. package/dist/favesalon-embed/p-d6e13053.entry.js +0 -1
  177. package/dist/favesalon-embed/p-dee42d34.entry.js +0 -1
  178. package/dist/favesalon-embed/p-e661ca1d.entry.js +0 -1
  179. package/dist/favesalon-embed/p-eeceab9c.entry.js +0 -1
  180. package/dist/index.cjs.js +0 -1
  181. package/dist/index.js +0 -1
  182. /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
  183. /package/dist/{collection/index.js → types/components/activate-form/test/activate-form.e2e.d.ts} +0 -0
@@ -1,76 +0,0 @@
1
- .salon-modal.salon-modal--lookbook-detail .salon-modal--close {
2
- display: none !important;
3
- }
4
-
5
- .salon-modal.salon-modal--lookbook-detail .salon-modal--content {
6
- background-color: #fff;
7
- position: fixed;
8
- top: 0;
9
- right: 0;
10
- bottom: 0;
11
- left: 0;
12
- width: 100%;
13
- height: 100%;
14
- z-index: 1000;
15
- overflow-y: auto;
16
- }
17
-
18
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--image {
19
- height: 240px !important;
20
- }
21
-
22
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnails {
23
- text-align: center;
24
- }
25
-
26
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail {
27
- display: inline-block;
28
- margin-top: 12px;
29
- margin-right: 12px;
30
- height: 40px;
31
- width: 60px;
32
- }
33
-
34
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--button {
35
- border: none;
36
- position: absolute;
37
- top: 50%;
38
- z-index: 20;
39
- height: 40px;
40
- width: 40px;
41
-
42
- -moz-border-radius: 50px;
43
- -webkit-border-radius: 50px;
44
- border-radius: 50px;
45
-
46
- -moz-transform: translate(0, -50%);
47
- -webkit-transform: translate(0, -50%);
48
- transform: translate(0, -50%);
49
- }
50
-
51
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--prev {
52
- left: 24px;
53
- }
54
-
55
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--next {
56
- right: 24px;
57
- }
58
-
59
-
60
- @media (min-width: 768px) {
61
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--image {
62
- height: 360px !important;
63
- }
64
- }
65
-
66
-
67
- @media (min-width: 992px) {
68
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--image {
69
- height: 480px !important;
70
- }
71
-
72
- .salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail {
73
- height: 56px;
74
- width: 72px;
75
- }
76
- }
@@ -1,386 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import dayjs from 'dayjs';
3
- import relativeTime from 'dayjs/plugin/relativeTime';
4
- import { isVideoMedia } from '../../types/style';
5
- import { Colors } from '../../constants/colors';
6
- import HttpService from '../../services/services';
7
- import { getSalonImage } from '../../types/salon';
8
- import { shortDateYearFormat } from '../../types/common';
9
- dayjs.extend(relativeTime);
10
- export class StyleDetail {
11
- constructor() {
12
- this.salonId = undefined;
13
- this.salonLookbook = undefined;
14
- this.lookbookInfo = undefined;
15
- this.isModalOpen = true;
16
- this.currentMediaIdx = 0;
17
- this.currentMedia = undefined;
18
- this.albumMedias = [];
19
- this.similarStyles = [];
20
- this.totalComments = 0;
21
- this.lookbookComments = [];
22
- this.isLayoutSetup = undefined;
23
- }
24
- componentWillLoad() {
25
- this.injectSDK();
26
- if (!!this.salonLookbook) {
27
- this.lookbookInfo = JSON.parse(this.salonLookbook);
28
- this.fetchData();
29
- }
30
- }
31
- componentDidRender() {
32
- this.setupGridLayout();
33
- }
34
- injectSDK() {
35
- return new Promise((resolve) => {
36
- const script = document.createElement('script');
37
- script.type = 'text/javascript';
38
- script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
39
- document.body.appendChild(script);
40
- return resolve(true);
41
- });
42
- }
43
- setupGridLayout() {
44
- if (!this.isLayoutSetup && this.similarStyles.length > 0 && document.querySelector('#similar-styles--grid')) {
45
- const script = document.createElement('script');
46
- script.type = 'text/javascript';
47
- script.innerHTML = `
48
- var masonry = new Macy({
49
- container: '#similar-styles--grid',
50
- useContainerForBreakpoints: true,
51
- margin: 16,
52
- columns: 2,
53
- });
54
- `;
55
- document.body.appendChild(script);
56
- this.isLayoutSetup = true;
57
- }
58
- }
59
- fetchData() {
60
- try {
61
- const promises = [
62
- HttpService().fetchStyleDetail(this.lookbookInfo.id).then(response => {
63
- const { styleInfo, similarStyles } = response;
64
- this.similarStyles = similarStyles;
65
- if (styleInfo) {
66
- this.lookbookInfo = styleInfo;
67
- this.albumMedias = styleInfo.albumMedias || [];
68
- this.currentMedia = (styleInfo.albumMedias || [])[0];
69
- }
70
- }),
71
- HttpService().fetchStyleComments(this.lookbookInfo.id).then(response => {
72
- this.totalComments = response.total;
73
- this.lookbookComments = response.data;
74
- }),
75
- ];
76
- return Promise.all(promises);
77
- }
78
- catch (e) { }
79
- }
80
- closeModal() {
81
- this.isModalOpen = false;
82
- const el = document.querySelector('style-detail');
83
- el.remove();
84
- }
85
- onClickLookbook(style) {
86
- const elLookbookModal = document.createElement('div');
87
- elLookbookModal.innerHTML = `
88
- <style-detail
89
- salon-id=${this.salonId}
90
- salon-lookbook='${JSON.stringify(style)}'
91
- ></style-detail>
92
- `;
93
- document.body.appendChild(elLookbookModal);
94
- }
95
- onClickPrev() {
96
- if (this.currentMediaIdx === 0) {
97
- this.currentMediaIdx = this.albumMedias.length - 1;
98
- this.currentMedia = this.albumMedias[this.currentMediaIdx];
99
- }
100
- else {
101
- this.currentMediaIdx = this.currentMediaIdx - 1;
102
- this.currentMedia = this.albumMedias[this.currentMediaIdx];
103
- }
104
- }
105
- onClickNext() {
106
- if (this.currentMediaIdx === this.albumMedias.length - 1) {
107
- this.currentMediaIdx = 0;
108
- this.currentMedia = this.albumMedias[0];
109
- }
110
- else {
111
- this.currentMediaIdx = this.currentMediaIdx + 1;
112
- this.currentMedia = this.albumMedias[this.currentMediaIdx];
113
- }
114
- }
115
- render() {
116
- const { createdDate, totalView, totalLike, totalBooking, album, salon, stylist, } = this.lookbookInfo;
117
- if (this.isModalOpen) {
118
- const { caption, description, mediaUrl } = this.currentMedia || {};
119
- const isVideo = isVideoMedia((this.currentMedia || {}));
120
- return (h("div", { class: "salon-modal salon-modal--lookbook-detail" }, h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("div", { class: "style-detail" }, h("div", { class: "style-detail--header" }, h("div", { style: {
121
- position: 'relative',
122
- overflow: 'hidden',
123
- } }, h("div", { style: Object.assign({ backgroundColor: Colors.Gray01, backgroundSize: 'cover', backgroundRepeat: 'no-repeat', backgroundPosition: '0 0', filter: 'blur(30px)', position: 'absolute', inset: '0', zIndex: '1' }, this.currentMedia && !isVideoMedia(this.currentMedia) ? { backgroundImage: `url("${this.currentMedia.imageThumb}")` } : {}) }), h("div", { style: {
124
- zIndex: '2',
125
- position: 'relative',
126
- width: '100%',
127
- backgroundColor: 'rgba(0, 0, 0, 0.25)',
128
- padding: '12px 16px',
129
- overflow: 'hidden',
130
- } }, h("span", { style: {
131
- color: Colors.White,
132
- border: 'none',
133
- display: 'flex',
134
- alignItems: 'center',
135
- justifyContent: 'center',
136
- height: '32px',
137
- } }, h("span", null, this.currentMediaIdx + 1, " / ", this.albumMedias.length)), h("div", { style: {
138
- display: 'flex',
139
- alignItems: 'center',
140
- position: 'absolute',
141
- right: '16px',
142
- top: '50%',
143
- transform: 'translate(0, -50%)',
144
- } }, h("button", { type: "text", class: "btn btn-light", style: {
145
- backgroundColor: Colors.White,
146
- borderColor: Colors.White,
147
- border: 'none',
148
- borderRadius: '50px',
149
- display: 'flex',
150
- alignItems: 'center',
151
- justifyContent: 'center',
152
- height: '32px',
153
- width: '32px',
154
- marginLeft: '12px',
155
- }, onClick: () => this.closeModal() }, h("i", { class: "ri-close-fill", style: { fontSize: '16px', lineHeight: '1' } })))), h("div", { style: { position: 'relative', zIndex: "3" } }, h("div", { class: "style-detail--slides", style: {
156
- marginTop: '16px',
157
- marginBottom: '12px',
158
- } }, h("div", { class: "style-detail--slides--image", style: {
159
- width: '100%',
160
- position: 'relative',
161
- height: '360px',
162
- } }, isVideo && (h("video", { muted: true, controls: true, width: "100%", height: "100%" }, h("source", { src: mediaUrl, type: "video/mp4" }))), !isVideo && (h("div", { style: {
163
- position: 'absolute',
164
- inset: '0',
165
- zIndex: '2',
166
- display: 'flex',
167
- alignItems: 'center',
168
- justifyContent: 'center',
169
- } }, h("img", { src: mediaUrl, alt: caption, style: {
170
- objectFit: 'contain',
171
- maxHeight: '100%',
172
- maxWidth: '100%',
173
- } })))), h("div", { class: "style-detail--slides--thumbnails", style: {
174
- width: '100%',
175
- position: 'relative',
176
- } }, this.albumMedias.map((media, idx) => {
177
- const isStyleVideo = isVideoMedia(media);
178
- return (h("div", { class: "style-detail--slides--thumbnail", style: Object.assign(Object.assign({ backgroundColor: Colors.Gray01, borderRadius: '4px', overflow: 'hidden', position: 'relative', cursor: 'pointer' }, this.currentMediaIdx !== idx ? { opacity: '0.75' } : {}), !isStyleVideo ? {
179
- backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
180
- backgroundRepeat: 'no-repeat',
181
- backgroundPosition: 'center center',
182
- backgroundSize: 'cover',
183
- } : {}), onClick: () => {
184
- this.currentMedia = media;
185
- this.currentMediaIdx = idx;
186
- } }, isStyleVideo && (h("div", null, h("video", { muted: true, width: "100%", height: "100%", poster: media.imageThumb }, h("source", { src: media.mediaUrl, type: "video/mp4" })), h("i", { class: "ri-play-circle-fill", style: {
187
- fontSize: '48px',
188
- color: Colors.TextColor,
189
- position: 'absolute',
190
- left: '50%',
191
- top: '50%',
192
- transform: 'translate(-50%, -50%)',
193
- } })))));
194
- }))), this.albumMedias.length > 1 && (h("div", null, h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--prev", onClick: () => this.onClickPrev() }, h("i", { class: "ri-arrow-left-line", style: { color: Colors.TextColor, fontSize: '18px' } })), h("button", { type: "button btn-light", class: "style-detail--slides--button style-detail--slides--next", onClick: () => this.onClickNext() }, h("i", { class: "ri-arrow-right-line", style: { color: Colors.TextColor, fontSize: '18px' } }))))))), h("div", { class: "style-detail--content" }, h("div", { class: "container" }, h("div", { style: {
195
- paddingBottom: '24px',
196
- paddingTop: '24px',
197
- } }, h("div", { class: "row" }, h("div", { class: this.similarStyles.length > 0 ? 'col-md-8' : 'col-md-12', style: { marginBottom: '24px' } }, h("div", { class: "row" }, salon && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, h("div", { style: {
198
- backgroundColor: Colors.Red01,
199
- borderRadius: '4px',
200
- padding: '8px',
201
- display: 'flex',
202
- alignItems: 'center',
203
- justifyContent: 'space-between',
204
- } }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "At salon"), h("div", { style: {
205
- color: Colors.Secondary,
206
- fontSize: '20px',
207
- lineHeight: '24px',
208
- } }, salon.businessName)), h("div", { style: {
209
- backgroundImage: `url("${getSalonImage(salon)}")`,
210
- backgroundColor: Colors.Red02,
211
- backgroundSize: 'cover',
212
- backgroundRepeat: 'no-repeat',
213
- backgroundPosition: '0 0',
214
- borderRadius: '4px',
215
- height: '48px',
216
- width: '48px',
217
- } })))), stylist && stylist.id && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, h("div", { style: {
218
- backgroundColor: Colors.Yellow01,
219
- borderRadius: '4px',
220
- padding: '8px',
221
- display: 'flex',
222
- alignItems: 'center',
223
- justifyContent: 'space-between',
224
- } }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "By stylist"), h("div", { style: {
225
- color: Colors.Secondary,
226
- fontSize: '20px',
227
- lineHeight: '24px',
228
- } }, stylist.fullName)), h("div", { style: {
229
- backgroundImage: `url("${stylist.avatar}")`,
230
- backgroundColor: Colors.Yellow02,
231
- backgroundSize: 'cover',
232
- backgroundRepeat: 'no-repeat',
233
- backgroundPosition: '0 0',
234
- borderRadius: '4px',
235
- height: '48px',
236
- width: '48px',
237
- } }))))), h("div", { style: {
238
- borderBottom: `1px solid ${Colors.Gray02}`,
239
- borderTop: `1px solid ${Colors.Gray02}`,
240
- display: 'flex',
241
- alignItems: 'center',
242
- justifyContent: 'space-between',
243
- paddingBottom: '16px',
244
- paddingTop: '16px',
245
- } }, h("div", { style: {
246
- display: 'flex',
247
- alignItems: 'center',
248
- justifyContent: 'space-around',
249
- flexShrink: '1',
250
- flexGrow: '1',
251
- } }, h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalLike), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "faves")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalBooking), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "booked")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, totalView), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "views")), h("div", { style: { width: '25%', textAlign: 'center', maxWidth: '120px' } }, h("div", { style: { fontSize: '24px', fontWeight: '600', lineHeight: '1' } }, this.totalComments), h("div", { style: { fontSize: '14px', marginTop: '4px' } }, "comments")))), (caption || description) && (h("div", { style: { paddingTop: '24px' } }, h("div", { style: { color: Colors.Gray04, fontSize: '14px' } }, createdDate && dayjs(createdDate).format(shortDateYearFormat)), h("div", { style: { fontSize: '24px' } }, caption), h("div", { style: {
252
- fontSize: '16px',
253
- paddingTop: caption ? '16px' : '0',
254
- } }, description))), album && album.tags.length > 0 && (h("div", { style: {
255
- paddingTop: '24px',
256
- marginBottom: '-12px',
257
- } }, album.tags.map((tag, idx) => (h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
258
- backgroundColor: Colors.Gray01,
259
- borderColor: Colors.Gray01,
260
- borderRadius: '4px',
261
- marginRight: '12px',
262
- marginBottom: '12px',
263
- } }, tag))))), h("div", { style: { marginTop: '32px' } }, this.lookbookComments && this.lookbookComments.length > 0 && (h("div", null, h("div", { style: { fontWeight: '600', marginBottom: '8px' } }, this.totalComments, " ", this.totalComments === 1 ? 'comment' : 'comments'), h("div", { class: "view view--style-comments", style: {
264
- borderTop: `1px solid ${Colors.Gray02}`,
265
- paddingTop: '24px',
266
- paddingBottom: '24px',
267
- } }, this.lookbookComments.map((comment, idx) => {
268
- const { user, title, description, createdDate } = comment;
269
- return (h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
270
- borderTop: `1px solid ${Colors.Gray02}`,
271
- marginTop: '24px',
272
- paddingTop: '24px',
273
- } : {} }, h("div", { style: { overflow: 'hidden' } }, h("user-avatar", { size: 48, avatar: user.avatar, name: h("div", null, h("div", { style: { color: Colors.Gray04, lineHeight: '1', fontSize: '12px', fontWeight: '400' } }, dayjs(createdDate).fromNow()), h("div", { style: { fontSize: '18px', fontWeight: '600' } }, user.fullName)), shortName: `${(user.firstName || '').charAt(0)}${(user.lastName || '').charAt(0)}`, nameStyle: { fontWeight: 'bold' } })), h("div", { style: {
274
- color: Colors.Black,
275
- fontSize: '16px',
276
- paddingTop: '16px',
277
- } }, title), description && (h("div", { style: {
278
- color: Colors.Gray05,
279
- paddingTop: '8px',
280
- } }, description))));
281
- })))))), h("div", { class: "col-md-4", style: { marginBottom: '24px' } }, h("div", { class: "block block--similar-styles" }, this.similarStyles.length > 0 && (h("div", { class: "block--content" }, h("h3", { style: {
282
- lineHeight: '1.2',
283
- fontSize: '24px',
284
- color: Colors.Secondary,
285
- } }, "More like this"), h("div", { style: { marginTop: '16px' } }, h("div", { class: "similar-styles--grid", id: "similar-styles--grid" }, this.similarStyles.slice(0, 6).map(style => {
286
- const { caption, imageThumbMedium, owner } = style;
287
- return (h("div", { class: "similar-styles--grid-item", onClick: () => {
288
- this.closeModal();
289
- this.onClickLookbook(style);
290
- } }, h("div", { class: "card", style: {
291
- background: 'none',
292
- border: 'none',
293
- cursor: 'pointer',
294
- } }, h("div", { class: "similar-styles--grid-item--image", style: {
295
- borderRadius: '8px',
296
- overflow: 'hidden',
297
- minHeight: '80px',
298
- background: Colors.Gray01,
299
- } }, h("img", { src: imageThumbMedium, alt: caption, style: { maxWidth: '100%' } })), owner && (h("div", { class: "card-body", style: { paddingLeft: '0' } }, h("user-avatar", { name: owner.fullName, shortName: `${(owner.firstName || '').charAt(0)}${(owner.lastName || '').charAt(0)}`, avatar: owner.avatar }))))));
300
- }))))))))))))))));
301
- }
302
- return null;
303
- }
304
- static get is() { return "style-detail"; }
305
- static get originalStyleUrls() {
306
- return {
307
- "$": ["index.css"]
308
- };
309
- }
310
- static get styleUrls() {
311
- return {
312
- "$": ["index.css"]
313
- };
314
- }
315
- static get properties() {
316
- return {
317
- "salonId": {
318
- "type": "number",
319
- "mutable": false,
320
- "complexType": {
321
- "original": "number",
322
- "resolved": "number",
323
- "references": {}
324
- },
325
- "required": false,
326
- "optional": false,
327
- "docs": {
328
- "tags": [],
329
- "text": ""
330
- },
331
- "attribute": "salon-id",
332
- "reflect": false
333
- },
334
- "salonLookbook": {
335
- "type": "string",
336
- "mutable": false,
337
- "complexType": {
338
- "original": "string",
339
- "resolved": "string",
340
- "references": {}
341
- },
342
- "required": false,
343
- "optional": false,
344
- "docs": {
345
- "tags": [],
346
- "text": ""
347
- },
348
- "attribute": "salon-lookbook",
349
- "reflect": false
350
- }
351
- };
352
- }
353
- static get states() {
354
- return {
355
- "lookbookInfo": {},
356
- "isModalOpen": {},
357
- "currentMediaIdx": {},
358
- "currentMedia": {},
359
- "albumMedias": {},
360
- "similarStyles": {},
361
- "totalComments": {},
362
- "lookbookComments": {},
363
- "isLayoutSetup": {}
364
- };
365
- }
366
- static get methods() {
367
- return {
368
- "fetchData": {
369
- "complexType": {
370
- "signature": "() => Promise<any[]>",
371
- "parameters": [],
372
- "references": {
373
- "Promise": {
374
- "location": "global"
375
- }
376
- },
377
- "return": "Promise<any[]>"
378
- },
379
- "docs": {
380
- "text": "",
381
- "tags": []
382
- }
383
- }
384
- };
385
- }
386
- }
File without changes
@@ -1,159 +0,0 @@
1
- import { h } from '@stencil/core';
2
- import { Colors } from '../../constants/colors';
3
- export class UserAvatar {
4
- constructor() {
5
- this.size = 24;
6
- this.name = undefined;
7
- this.description = undefined;
8
- this.nameStyle = undefined;
9
- this.shortName = undefined;
10
- this.avatar = undefined;
11
- }
12
- render() {
13
- return (h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (h("div", { style: {
14
- border: `1px solid ${Colors.White}`,
15
- backgroundImage: `url("${this.avatar}")`,
16
- backgroundColor: Colors.Gray01,
17
- backgroundPosition: 'center center',
18
- backgroundSize: 'cover',
19
- borderRadius: '50%',
20
- height: `${this.size}px`,
21
- width: `${this.size}px`,
22
- minWidth: `${this.size}px`,
23
- } })), !this.avatar && (h("div", { style: {
24
- border: `1px solid ${Colors.White}`,
25
- backgroundColor: Colors.Gray01,
26
- borderRadius: '50%',
27
- display: 'flex',
28
- alignItems: 'center',
29
- justifyContent: 'center',
30
- height: `${this.size}px`,
31
- width: `${this.size}px`,
32
- minWidth: `${this.size}px`,
33
- } }, this.shortName)), this.name && (h("div", { style: {
34
- flexShrink: '1',
35
- flexGrow: '1',
36
- marginLeft: '12px',
37
- overflow: 'hidden',
38
- whiteSpace: 'nowrap',
39
- textOverflow: 'ellipsis',
40
- } }, h("div", { style: Object.assign({}, this.nameStyle) }, this.name), this.description && h("div", { style: { color: '#999999' } }, this.description)))));
41
- }
42
- static get is() { return "user-avatar"; }
43
- static get originalStyleUrls() {
44
- return {
45
- "$": ["index.css"]
46
- };
47
- }
48
- static get styleUrls() {
49
- return {
50
- "$": ["index.css"]
51
- };
52
- }
53
- static get properties() {
54
- return {
55
- "size": {
56
- "type": "number",
57
- "mutable": false,
58
- "complexType": {
59
- "original": "number",
60
- "resolved": "number",
61
- "references": {}
62
- },
63
- "required": false,
64
- "optional": false,
65
- "docs": {
66
- "tags": [],
67
- "text": ""
68
- },
69
- "attribute": "size",
70
- "reflect": false,
71
- "defaultValue": "24"
72
- },
73
- "name": {
74
- "type": "string",
75
- "mutable": false,
76
- "complexType": {
77
- "original": "string",
78
- "resolved": "string",
79
- "references": {}
80
- },
81
- "required": false,
82
- "optional": true,
83
- "docs": {
84
- "tags": [],
85
- "text": ""
86
- },
87
- "attribute": "name",
88
- "reflect": false
89
- },
90
- "description": {
91
- "type": "string",
92
- "mutable": false,
93
- "complexType": {
94
- "original": "string",
95
- "resolved": "string",
96
- "references": {}
97
- },
98
- "required": false,
99
- "optional": true,
100
- "docs": {
101
- "tags": [],
102
- "text": ""
103
- },
104
- "attribute": "description",
105
- "reflect": false
106
- },
107
- "nameStyle": {
108
- "type": "unknown",
109
- "mutable": false,
110
- "complexType": {
111
- "original": "object",
112
- "resolved": "object",
113
- "references": {}
114
- },
115
- "required": false,
116
- "optional": true,
117
- "docs": {
118
- "tags": [],
119
- "text": ""
120
- }
121
- },
122
- "shortName": {
123
- "type": "string",
124
- "mutable": false,
125
- "complexType": {
126
- "original": "string",
127
- "resolved": "string",
128
- "references": {}
129
- },
130
- "required": false,
131
- "optional": false,
132
- "docs": {
133
- "tags": [],
134
- "text": ""
135
- },
136
- "attribute": "short-name",
137
- "reflect": false
138
- },
139
- "avatar": {
140
- "type": "string",
141
- "mutable": false,
142
- "complexType": {
143
- "original": "string",
144
- "resolved": "string",
145
- "references": {}
146
- },
147
- "required": false,
148
- "optional": false,
149
- "docs": {
150
- "tags": [],
151
- "text": ""
152
- },
153
- "attribute": "avatar",
154
- "reflect": false
155
- }
156
- };
157
- }
158
- }
159
- ;
@@ -1,65 +0,0 @@
1
- export const Colors = {
2
- TextColor: '#141414',
3
- Black: '#000000',
4
- White: '#ffffff',
5
- Primary: '#F05A61',
6
- Secondary: '#001529',
7
- Black01: '#262626',
8
- Black02: '#1f1f1f',
9
- Black03: '#141414',
10
- Gray01: '#F5F5F5',
11
- Gray02: '#EFEFEF',
12
- Gray03: '#DBDBDB',
13
- Gray04: '#999999',
14
- Gray05: '#666666',
15
- Red01: '#FEEFEF',
16
- Red02: '#F9BDC0',
17
- Red03: '#F05A61',
18
- Red04: '#C0484E',
19
- Red05: '#90363A',
20
- Orange01: '#FFF4F0',
21
- Orange02: '#FFD1C3',
22
- Orange03: '#FF8D69',
23
- Orange04: '#CC7154',
24
- Orange05: '#99553F',
25
- Yellow01: '#FDFBF4',
26
- Yellow02: '#F8EDD3',
27
- Yellow03: '#EED291',
28
- Yellow04: '#BEA874',
29
- Yellow05: '#8F7E57',
30
- Lilac01: '#F3F0F4',
31
- Lilac02: '#CFC1D4',
32
- Lilac03: '#886594',
33
- Lilac04: '#6D5176',
34
- Lilac05: '#523D59',
35
- Blue01: '#EAECEE',
36
- Blue02: '#AAB1BD',
37
- Blue03: '#2B3C59',
38
- Blue04: '#223047',
39
- Blue05: '#1A2435',
40
- Green01: '#ECF7ED',
41
- Green02: '#B2E1B9',
42
- Green03: '#3FB34F',
43
- Green04: '#328F3F',
44
- Green05: '#266B2F',
45
- Success01: '#EEF9E8',
46
- Success02: '#BAE7A3',
47
- Success03: '#52C41A',
48
- Success04: '#429D15',
49
- Success05: '#317610',
50
- Error01: '#FFEDED',
51
- Error02: '#FFB8B9',
52
- Error03: '#FF4D4F',
53
- Error04: '#CC3E3F',
54
- Error05: '#992E2F',
55
- Warning01: '#FFF7E8',
56
- Warning02: '#FDDEA1',
57
- Warning03: '#FAAD14',
58
- Warning04: '#C88A10',
59
- Warning05: '#96680C',
60
- Info01: '#E8F4FF',
61
- Info02: '#A3D3FF',
62
- Info03: '#1890FF',
63
- Info04: '#1373CC',
64
- Info05: '#0E5699',
65
- };