favesalon-embed 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/_commonjsHelpers-5cfcba41.js +36 -0
- package/dist/cjs/chat-button.cjs.entry.js +118 -0
- package/dist/cjs/colors-38421769.js +69 -0
- package/dist/cjs/favesalon-embed.cjs.js +24 -0
- package/dist/cjs/google-map_5.cjs.entry.js +310 -0
- package/{cjs/index-7d179a70.js → dist/cjs/index-47c2a5f6.js} +587 -199
- package/dist/cjs/index-7f190886.js +4396 -0
- package/dist/cjs/loader.cjs.js +23 -0
- package/dist/cjs/relativeTime-3721080d.js +9 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +30 -0
- package/dist/cjs/salon-booking.cjs.entry.js +51 -0
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +29 -0
- package/dist/cjs/salon-gift-card.cjs.entry.js +51 -0
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
- package/dist/cjs/salon-lookbook.cjs.entry.js +222 -0
- package/dist/cjs/salon-ranking.cjs.entry.js +60 -0
- package/dist/cjs/salon-reviews.cjs.entry.js +193 -0
- package/dist/cjs/salon-services.cjs.entry.js +81 -0
- package/dist/cjs/salon-stylists.cjs.entry.js +118 -0
- package/dist/cjs/services-125c82d8.js +21492 -0
- package/dist/cjs/style-detail.cjs.entry.js +312 -0
- package/dist/cjs/user-avatar.cjs.entry.js +45 -0
- package/dist/cjs/utils-c5a33b3c.js +23 -0
- package/{collection → dist/collection}/collection-manifest.json +5 -4
- package/dist/collection/components/chat-button/index.css +122 -0
- package/dist/collection/components/chat-button/index.js +218 -0
- package/dist/collection/components/chat-conversation/index.js +103 -0
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/{collection → dist/collection}/components/google-map/index.css +0 -1
- package/dist/collection/components/google-map/index.js +90 -0
- package/{collection → dist/collection}/components/salon-booking/index.css +11 -20
- package/dist/collection/components/salon-booking/index.js +126 -0
- package/dist/collection/components/salon-booking/salon-booking-modal.js +92 -0
- package/dist/collection/components/salon-gift-card/index.css +30 -0
- package/dist/collection/components/salon-gift-card/index.js +126 -0
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +73 -0
- package/dist/collection/components/salon-info/index.js +77 -0
- package/dist/collection/components/salon-latest-reviews/index.js +163 -0
- package/dist/collection/components/salon-latest-styles/index.css +12 -0
- package/dist/collection/components/salon-latest-styles/index.js +183 -0
- package/{collection/components/salon-contact → dist/collection/components/salon-locations}/index.css +7 -4
- package/dist/collection/components/salon-locations/index.js +143 -0
- package/dist/collection/components/salon-lookbook/index.css +15 -0
- package/dist/collection/components/salon-lookbook/index.js +368 -0
- package/dist/collection/components/salon-ranking/index.js +117 -0
- package/dist/collection/components/salon-reviews/index.css +18 -0
- package/dist/collection/components/salon-reviews/index.js +249 -0
- package/dist/collection/components/salon-schedules/index.css +18 -0
- package/dist/collection/components/salon-schedules/index.js +167 -0
- package/dist/collection/components/salon-services/index.css +1 -0
- package/dist/collection/components/salon-services/index.js +146 -0
- package/dist/collection/components/salon-stylists/index.js +184 -0
- package/dist/collection/components/style-detail/index.css +76 -0
- package/dist/collection/components/style-detail/index.js +386 -0
- package/dist/collection/components/user-avatar/index.js +134 -0
- package/dist/collection/constants/colors.js +65 -0
- package/dist/collection/mocks/users.js +10 -0
- package/dist/collection/services/services.js +295 -0
- package/dist/collection/types/chat.js +23 -0
- package/dist/collection/types/common.js +11 -0
- package/{collection → dist/collection}/types/review.js +9 -5
- package/dist/collection/types/salon.js +58 -0
- package/dist/collection/types/style.js +128 -0
- package/dist/collection/types/stylist.js +30 -0
- package/dist/collection/types/user.js +10 -0
- package/{custom-elements → dist/custom-elements}/index.d.ts +18 -12
- package/dist/custom-elements/index.js +28340 -0
- package/dist/esm/_commonjsHelpers-098d5b27.js +32 -0
- package/dist/esm/chat-button.entry.js +114 -0
- package/dist/esm/colors-ea36347a.js +67 -0
- package/dist/esm/favesalon-embed.js +19 -0
- package/dist/esm/google-map_5.entry.js +302 -0
- package/{esm/index-2160b80b.js → dist/esm/index-3fae868e.js} +586 -200
- package/dist/esm/index-80523fec.js +4393 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +19 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/relativeTime-cd452e6d.js +7 -0
- package/dist/esm/salon-booking-modal.entry.js +26 -0
- package/dist/esm/salon-booking.entry.js +47 -0
- package/dist/esm/salon-gift-card-modal.entry.js +25 -0
- package/dist/esm/salon-gift-card.entry.js +47 -0
- package/dist/esm/salon-latest-reviews.entry.js +93 -0
- package/dist/esm/salon-lookbook.entry.js +218 -0
- package/dist/esm/salon-ranking.entry.js +56 -0
- package/dist/esm/salon-reviews.entry.js +189 -0
- package/dist/esm/salon-services.entry.js +77 -0
- package/dist/esm/salon-stylists.entry.js +114 -0
- package/dist/esm/services-40a3e622.js +21485 -0
- package/dist/esm/style-detail.entry.js +308 -0
- package/dist/esm/user-avatar.entry.js +41 -0
- package/dist/esm/utils-e97485e0.js +19 -0
- package/dist/favesalon-embed/assets/map--placeholder.jpeg +0 -0
- package/{favesalon-embed → dist/favesalon-embed}/favesalon-embed.css +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -0
- package/dist/favesalon-embed/p-019c5ccd.entry.js +1 -0
- package/dist/favesalon-embed/p-083a8821.entry.js +1 -0
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +1 -0
- package/dist/favesalon-embed/p-119db8de.entry.js +1 -0
- package/dist/favesalon-embed/p-1432c51b.entry.js +1 -0
- package/dist/favesalon-embed/p-22093506.entry.js +1 -0
- package/dist/favesalon-embed/p-32b314e9.js +2 -0
- package/dist/favesalon-embed/p-47e646f8.js +1 -0
- package/dist/favesalon-embed/p-4a5eca9a.js +6 -0
- package/dist/favesalon-embed/p-58d2e9be.js +1 -0
- package/dist/favesalon-embed/p-71404b6a.entry.js +1 -0
- package/dist/favesalon-embed/p-857c3a61.entry.js +1 -0
- package/dist/favesalon-embed/p-99ec77f7.entry.js +1 -0
- package/dist/favesalon-embed/p-a33331cc.js +1 -0
- package/dist/favesalon-embed/p-b0c3673a.entry.js +1 -0
- package/dist/favesalon-embed/p-b287b1ea.entry.js +1 -0
- package/dist/favesalon-embed/p-b3af7842.entry.js +1 -0
- package/dist/favesalon-embed/p-b630ae68.js +1580 -0
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +1 -0
- package/dist/favesalon-embed/p-d6083940.js +1 -0
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +6 -0
- package/dist/types/components/chat-button/index.d.ts +24 -0
- package/dist/types/components/google-map/index.d.ts +5 -0
- package/{types → dist/types}/components/salon-booking/salon-booking-modal.d.ts +1 -0
- package/{types → dist/types}/components/salon-gift-card/index.d.ts +2 -1
- package/{types → dist/types}/components/salon-gift-card/salon-gift-card-modal.d.ts +2 -0
- package/{types → dist/types}/components/salon-info/index.d.ts +0 -1
- package/{types → dist/types}/components/salon-latest-reviews/index.d.ts +2 -0
- package/dist/types/components/salon-latest-styles/index.d.ts +12 -0
- package/{types → dist/types}/components/salon-locations/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-lookbook/index.d.ts +7 -2
- package/dist/types/components/salon-reviews/index.d.ts +24 -0
- package/{types → dist/types}/components/salon-schedules/index.d.ts +2 -0
- package/{types → dist/types}/components/salon-services/index.d.ts +1 -0
- package/{types → dist/types}/components/salon-stylists/index.d.ts +6 -0
- package/dist/types/components/style-detail/index.d.ts +24 -0
- package/{types → dist/types}/components.d.ts +82 -41
- package/dist/types/constants/colors.d.ts +65 -0
- package/dist/types/mocks/users.d.ts +10 -0
- package/dist/types/services/services.d.ts +75 -0
- package/{types → dist/types}/stencil-public-runtime.d.ts +85 -11
- package/dist/types/types/chat.d.ts +17 -0
- package/dist/types/types/common.d.ts +11 -0
- package/{types → dist/types}/types/review.d.ts +4 -0
- package/{types → dist/types}/types/salon.d.ts +3 -1
- package/dist/types/types/style.d.ts +88 -0
- package/{types → dist/types}/types/stylist.d.ts +2 -1
- package/{types → dist/types}/types/user.d.ts +2 -2
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +19 -14
- package/readme.md +25 -2
- package/cjs/favesalon-embed.cjs.js +0 -20
- package/cjs/google-map_15.cjs.entry.js +0 -6632
- package/cjs/loader.cjs.js +0 -22
- package/cjs/salon-booking-modal.cjs.entry.js +0 -23
- package/cjs/salon-gift-card-modal.cjs.entry.js +0 -20
- package/collection/components/google-map/index.js +0 -97
- package/collection/components/salon-booking/index.js +0 -103
- package/collection/components/salon-booking/salon-booking-modal.js +0 -82
- package/collection/components/salon-contact/index.js +0 -88
- package/collection/components/salon-gift-card/index.css +0 -25
- package/collection/components/salon-gift-card/index.js +0 -83
- package/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -43
- package/collection/components/salon-info/index.css +0 -3
- package/collection/components/salon-info/index.js +0 -97
- package/collection/components/salon-latest-reviews/index.js +0 -108
- package/collection/components/salon-locations/index.js +0 -80
- package/collection/components/salon-lookbook/index.css +0 -12
- package/collection/components/salon-lookbook/index.js +0 -303
- package/collection/components/salon-ranking/index.js +0 -114
- package/collection/components/salon-reviews/index.js +0 -291
- package/collection/components/salon-schedules/index.css +0 -14
- package/collection/components/salon-schedules/index.js +0 -103
- package/collection/components/salon-services/index.css +0 -0
- package/collection/components/salon-services/index.js +0 -113
- package/collection/components/salon-styles/index.css +0 -23
- package/collection/components/salon-styles/index.js +0 -100
- package/collection/components/salon-stylists/index.js +0 -96
- package/collection/components/user-avatar/index.css +0 -0
- package/collection/components/user-avatar/index.js +0 -127
- package/collection/constants/colors.js +0 -91
- package/collection/services/services.js +0 -203
- package/collection/types/common.js +0 -2
- package/collection/types/salon.js +0 -52
- package/collection/types/style.js +0 -28
- package/collection/types/stylist.js +0 -13
- package/collection/types/user.js +0 -10
- package/custom-elements/index.js +0 -7410
- package/esm/favesalon-embed.js +0 -18
- package/esm/google-map_15.entry.js +0 -6614
- package/esm/loader.js +0 -18
- package/esm/polyfills/css-shim.js +0 -1
- package/esm/salon-booking-modal.entry.js +0 -19
- package/esm/salon-gift-card-modal.entry.js +0 -16
- package/favesalon-embed/favesalon-embed.esm.js +0 -1
- package/favesalon-embed/p-1432ab16.entry.js +0 -1
- package/favesalon-embed/p-2da2ed75.js +0 -1
- package/favesalon-embed/p-4a5eca9a.js +0 -6
- package/favesalon-embed/p-94a0991e.entry.js +0 -1
- package/favesalon-embed/p-f15bcb43.entry.js +0 -1
- package/types/components/google-map/index.d.ts +0 -10
- package/types/components/salon-contact/index.d.ts +0 -9
- package/types/components/salon-reviews/index.d.ts +0 -23
- package/types/components/salon-styles/index.d.ts +0 -9
- package/types/constants/colors.d.ts +0 -88
- package/types/services/services.d.ts +0 -24
- package/types/types/common.d.ts +0 -2
- package/types/types/style.d.ts +0 -49
- package/{cjs → dist/cjs}/global-9073d10e.js +0 -0
- package/{cjs → dist/cjs}/index.cjs.js +0 -0
- package/{esm/index.js → dist/collection/components/salon-info/index.css} +0 -0
- package/{collection → dist/collection}/components/salon-latest-reviews/index.css +0 -0
- package/{collection → dist/collection}/components/salon-ranking/index.css +0 -0
- package/{collection → dist/collection}/components/salon-stylists/index.css +0 -0
- package/{collection/components/salon-locations → dist/collection/components/user-avatar}/index.css +0 -0
- package/{collection → dist/collection}/global/global.js +0 -0
- package/{collection → dist/collection}/index.js +0 -0
- package/{collection → dist/collection}/types/service.js +0 -0
- package/{collection → dist/collection}/utils/utils.js +0 -0
- package/{esm → dist/esm}/global-e1089ffd.js +0 -0
- package/{esm → dist/esm}/polyfills/core-js.js +0 -0
- package/{esm → dist/esm}/polyfills/dom.js +0 -0
- package/{esm → dist/esm}/polyfills/es5-html-element.js +0 -0
- package/{esm → dist/esm}/polyfills/index.js +0 -0
- package/{esm → dist/esm}/polyfills/system.js +0 -0
- package/{favesalon-embed → dist/favesalon-embed}/index.esm.js +0 -0
- package/{index.cjs.js → dist/index.cjs.js} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/{collection/components/salon-reviews/index.css → dist/types/components/chat-conversation/index.d.ts} +0 -0
- package/{types → dist/types}/components/salon-booking/index.d.ts +1 -1
- /package/{types → dist/types}/components/salon-ranking/index.d.ts +0 -0
- /package/{types → dist/types}/components/user-avatar/index.d.ts +0 -0
- /package/{types → dist/types}/index.d.ts +0 -0
- /package/{types → dist/types}/types/service.d.ts +0 -0
- /package/{types → dist/types}/utils/utils.d.ts +0 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-3fae868e.js';
|
|
2
|
+
import { d as dayjs_min, H as HttpService, i as isVideoMedia, g as getSalonImage, s as shortDateYearFormat } from './services-40a3e622.js';
|
|
3
|
+
import { r as relativeTime } from './relativeTime-cd452e6d.js';
|
|
4
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
5
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
6
|
+
|
|
7
|
+
const indexCss = ".salon-modal.salon-modal--lookbook-detail .salon-modal--close{display:none !important}.salon-modal.salon-modal--lookbook-detail .salon-modal--content{background-color:#fff;position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1000;overflow-y:auto}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:240px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnails{text-align:center}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{display:inline-block;margin-top:12px;margin-right:12px;height:40px;width:60px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--button{border:none;position:absolute;top:50%;z-index:20;height:40px;width:40px;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px;-moz-transform:translate(0, -50%);-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--prev{left:24px}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--next{right:24px}@media (min-width: 768px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:360px !important}}@media (min-width: 992px){.salon-modal.salon-modal--lookbook-detail .style-detail--slides--image{height:480px !important}.salon-modal.salon-modal--lookbook-detail .style-detail--slides--thumbnail{height:56px;width:72px}}";
|
|
8
|
+
|
|
9
|
+
dayjs_min.extend(relativeTime);
|
|
10
|
+
const StyleDetail = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
this.salonId = undefined;
|
|
14
|
+
this.salonLookbook = undefined;
|
|
15
|
+
this.lookbookInfo = undefined;
|
|
16
|
+
this.isModalOpen = true;
|
|
17
|
+
this.currentMediaIdx = 0;
|
|
18
|
+
this.currentMedia = undefined;
|
|
19
|
+
this.albumMedias = [];
|
|
20
|
+
this.similarStyles = [];
|
|
21
|
+
this.totalComments = 0;
|
|
22
|
+
this.lookbookComments = [];
|
|
23
|
+
this.isLayoutSetup = undefined;
|
|
24
|
+
}
|
|
25
|
+
componentWillLoad() {
|
|
26
|
+
this.injectSDK();
|
|
27
|
+
if (!!this.salonLookbook) {
|
|
28
|
+
this.lookbookInfo = JSON.parse(this.salonLookbook);
|
|
29
|
+
this.fetchData();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
componentDidRender() {
|
|
33
|
+
this.setupGridLayout();
|
|
34
|
+
}
|
|
35
|
+
injectSDK() {
|
|
36
|
+
return new Promise((resolve) => {
|
|
37
|
+
const script = document.createElement('script');
|
|
38
|
+
script.type = 'text/javascript';
|
|
39
|
+
script.src = 'https://cdn.jsdelivr.net/npm/macy@2';
|
|
40
|
+
document.body.appendChild(script);
|
|
41
|
+
return resolve(true);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
setupGridLayout() {
|
|
45
|
+
if (!this.isLayoutSetup && this.similarStyles.length > 0 && document.querySelector('#similar-styles--grid')) {
|
|
46
|
+
const script = document.createElement('script');
|
|
47
|
+
script.type = 'text/javascript';
|
|
48
|
+
script.innerHTML = `
|
|
49
|
+
var masonry = new Macy({
|
|
50
|
+
container: '#similar-styles--grid',
|
|
51
|
+
useContainerForBreakpoints: true,
|
|
52
|
+
margin: 16,
|
|
53
|
+
columns: 2,
|
|
54
|
+
});
|
|
55
|
+
`;
|
|
56
|
+
document.body.appendChild(script);
|
|
57
|
+
this.isLayoutSetup = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
fetchData() {
|
|
61
|
+
try {
|
|
62
|
+
const promises = [
|
|
63
|
+
HttpService().fetchStyleDetail(this.lookbookInfo.id).then(response => {
|
|
64
|
+
const { styleInfo, similarStyles } = response;
|
|
65
|
+
this.similarStyles = similarStyles;
|
|
66
|
+
if (styleInfo) {
|
|
67
|
+
this.lookbookInfo = styleInfo;
|
|
68
|
+
this.albumMedias = styleInfo.albumMedias || [];
|
|
69
|
+
this.currentMedia = (styleInfo.albumMedias || [])[0];
|
|
70
|
+
}
|
|
71
|
+
}),
|
|
72
|
+
HttpService().fetchStyleComments(this.lookbookInfo.id).then(response => {
|
|
73
|
+
this.totalComments = response.total;
|
|
74
|
+
this.lookbookComments = response.data;
|
|
75
|
+
}),
|
|
76
|
+
];
|
|
77
|
+
return Promise.all(promises);
|
|
78
|
+
}
|
|
79
|
+
catch (e) { }
|
|
80
|
+
}
|
|
81
|
+
closeModal() {
|
|
82
|
+
this.isModalOpen = false;
|
|
83
|
+
const el = document.querySelector('style-detail');
|
|
84
|
+
el.remove();
|
|
85
|
+
}
|
|
86
|
+
onClickLookbook(style) {
|
|
87
|
+
const elLookbookModal = document.createElement('div');
|
|
88
|
+
elLookbookModal.innerHTML = `
|
|
89
|
+
<style-detail
|
|
90
|
+
salon-id=${this.salonId}
|
|
91
|
+
salon-lookbook='${JSON.stringify(style)}'
|
|
92
|
+
></style-detail>
|
|
93
|
+
`;
|
|
94
|
+
document.body.appendChild(elLookbookModal);
|
|
95
|
+
}
|
|
96
|
+
onClickPrev() {
|
|
97
|
+
if (this.currentMediaIdx === 0) {
|
|
98
|
+
this.currentMediaIdx = this.albumMedias.length - 1;
|
|
99
|
+
this.currentMedia = this.albumMedias[this.currentMediaIdx];
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.currentMediaIdx = this.currentMediaIdx - 1;
|
|
103
|
+
this.currentMedia = this.albumMedias[this.currentMediaIdx];
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
onClickNext() {
|
|
107
|
+
if (this.currentMediaIdx === this.albumMedias.length - 1) {
|
|
108
|
+
this.currentMediaIdx = 0;
|
|
109
|
+
this.currentMedia = this.albumMedias[0];
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
this.currentMediaIdx = this.currentMediaIdx + 1;
|
|
113
|
+
this.currentMedia = this.albumMedias[this.currentMediaIdx];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
const { createdDate, totalView, totalLike, totalBooking, album, salon, stylist, } = this.lookbookInfo;
|
|
118
|
+
if (this.isModalOpen) {
|
|
119
|
+
const { caption, description, mediaUrl } = this.currentMedia || {};
|
|
120
|
+
const isVideo = isVideoMedia((this.currentMedia || {}));
|
|
121
|
+
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: {
|
|
122
|
+
position: 'relative',
|
|
123
|
+
overflow: 'hidden',
|
|
124
|
+
} }, 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: {
|
|
125
|
+
zIndex: '2',
|
|
126
|
+
position: 'relative',
|
|
127
|
+
width: '100%',
|
|
128
|
+
backgroundColor: 'rgba(0, 0, 0, 0.25)',
|
|
129
|
+
padding: '12px 16px',
|
|
130
|
+
overflow: 'hidden',
|
|
131
|
+
} }, h("span", { style: {
|
|
132
|
+
color: Colors.White,
|
|
133
|
+
border: 'none',
|
|
134
|
+
display: 'flex',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
justifyContent: 'center',
|
|
137
|
+
height: '32px',
|
|
138
|
+
} }, h("span", null, this.currentMediaIdx + 1, " / ", this.albumMedias.length)), h("div", { style: {
|
|
139
|
+
display: 'flex',
|
|
140
|
+
alignItems: 'center',
|
|
141
|
+
position: 'absolute',
|
|
142
|
+
right: '16px',
|
|
143
|
+
top: '50%',
|
|
144
|
+
transform: 'translate(0, -50%)',
|
|
145
|
+
} }, h("button", { type: "text", class: "btn btn-light", style: {
|
|
146
|
+
backgroundColor: Colors.White,
|
|
147
|
+
borderColor: Colors.White,
|
|
148
|
+
border: 'none',
|
|
149
|
+
borderRadius: '50px',
|
|
150
|
+
display: 'flex',
|
|
151
|
+
alignItems: 'center',
|
|
152
|
+
justifyContent: 'center',
|
|
153
|
+
height: '32px',
|
|
154
|
+
width: '32px',
|
|
155
|
+
marginLeft: '12px',
|
|
156
|
+
}, 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: {
|
|
157
|
+
marginTop: '16px',
|
|
158
|
+
marginBottom: '12px',
|
|
159
|
+
} }, h("div", { class: "style-detail--slides--image", style: {
|
|
160
|
+
width: '100%',
|
|
161
|
+
position: 'relative',
|
|
162
|
+
height: '360px',
|
|
163
|
+
} }, isVideo && (h("video", { muted: true, controls: true, width: "100%", height: "100%" }, h("source", { src: mediaUrl, type: "video/mp4" }))), !isVideo && (h("div", { style: {
|
|
164
|
+
position: 'absolute',
|
|
165
|
+
inset: '0',
|
|
166
|
+
zIndex: '2',
|
|
167
|
+
display: 'flex',
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
} }, h("img", { src: mediaUrl, alt: caption, style: {
|
|
171
|
+
objectFit: 'contain',
|
|
172
|
+
maxHeight: '100%',
|
|
173
|
+
maxWidth: '100%',
|
|
174
|
+
} })))), h("div", { class: "style-detail--slides--thumbnails", style: {
|
|
175
|
+
width: '100%',
|
|
176
|
+
position: 'relative',
|
|
177
|
+
} }, this.albumMedias.map((media, idx) => {
|
|
178
|
+
const isStyleVideo = isVideoMedia(media);
|
|
179
|
+
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 ? {
|
|
180
|
+
backgroundImage: `url("${media.imageThumb || media.imageThumbMedium}")`,
|
|
181
|
+
backgroundRepeat: 'no-repeat',
|
|
182
|
+
backgroundPosition: 'center center',
|
|
183
|
+
backgroundSize: 'cover',
|
|
184
|
+
} : {}), onClick: () => {
|
|
185
|
+
this.currentMedia = media;
|
|
186
|
+
this.currentMediaIdx = idx;
|
|
187
|
+
} }, 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: {
|
|
188
|
+
fontSize: '48px',
|
|
189
|
+
color: Colors.TextColor,
|
|
190
|
+
position: 'absolute',
|
|
191
|
+
left: '50%',
|
|
192
|
+
top: '50%',
|
|
193
|
+
transform: 'translate(-50%, -50%)',
|
|
194
|
+
} })))));
|
|
195
|
+
}))), 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: {
|
|
196
|
+
paddingBottom: '24px',
|
|
197
|
+
paddingTop: '24px',
|
|
198
|
+
} }, 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: {
|
|
199
|
+
backgroundColor: Colors.Red01,
|
|
200
|
+
borderRadius: '4px',
|
|
201
|
+
padding: '8px',
|
|
202
|
+
display: 'flex',
|
|
203
|
+
alignItems: 'center',
|
|
204
|
+
justifyContent: 'space-between',
|
|
205
|
+
} }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "At salon"), h("div", { style: {
|
|
206
|
+
color: Colors.Secondary,
|
|
207
|
+
fontSize: '20px',
|
|
208
|
+
lineHeight: '24px',
|
|
209
|
+
} }, salon.businessName)), h("div", { style: {
|
|
210
|
+
backgroundImage: `url("${getSalonImage(salon)}")`,
|
|
211
|
+
backgroundColor: Colors.Red02,
|
|
212
|
+
backgroundSize: 'cover',
|
|
213
|
+
backgroundRepeat: 'no-repeat',
|
|
214
|
+
backgroundPosition: '0 0',
|
|
215
|
+
borderRadius: '4px',
|
|
216
|
+
height: '48px',
|
|
217
|
+
width: '48px',
|
|
218
|
+
} })))), stylist && stylist.id && (h("div", { class: "col-sm-6 col-md-5", style: { marginBottom: '24px' } }, h("div", { style: {
|
|
219
|
+
backgroundColor: Colors.Yellow01,
|
|
220
|
+
borderRadius: '4px',
|
|
221
|
+
padding: '8px',
|
|
222
|
+
display: 'flex',
|
|
223
|
+
alignItems: 'center',
|
|
224
|
+
justifyContent: 'space-between',
|
|
225
|
+
} }, h("div", { style: { paddingLeft: '8px' } }, h("div", { style: { color: Colors.Gray05, fontSize: '12px' } }, "By stylist"), h("div", { style: {
|
|
226
|
+
color: Colors.Secondary,
|
|
227
|
+
fontSize: '20px',
|
|
228
|
+
lineHeight: '24px',
|
|
229
|
+
} }, stylist.fullName)), h("div", { style: {
|
|
230
|
+
backgroundImage: `url("${stylist.avatar}")`,
|
|
231
|
+
backgroundColor: Colors.Yellow02,
|
|
232
|
+
backgroundSize: 'cover',
|
|
233
|
+
backgroundRepeat: 'no-repeat',
|
|
234
|
+
backgroundPosition: '0 0',
|
|
235
|
+
borderRadius: '4px',
|
|
236
|
+
height: '48px',
|
|
237
|
+
width: '48px',
|
|
238
|
+
} }))))), h("div", { style: {
|
|
239
|
+
borderBottom: `1px solid ${Colors.Gray02}`,
|
|
240
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
241
|
+
display: 'flex',
|
|
242
|
+
alignItems: 'center',
|
|
243
|
+
justifyContent: 'space-between',
|
|
244
|
+
paddingBottom: '16px',
|
|
245
|
+
paddingTop: '16px',
|
|
246
|
+
} }, h("div", { style: {
|
|
247
|
+
display: 'flex',
|
|
248
|
+
alignItems: 'center',
|
|
249
|
+
justifyContent: 'space-around',
|
|
250
|
+
flexShrink: '1',
|
|
251
|
+
flexGrow: '1',
|
|
252
|
+
} }, 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_min(createdDate).format(shortDateYearFormat)), h("div", { style: { fontSize: '24px' } }, caption), h("div", { style: {
|
|
253
|
+
fontSize: '16px',
|
|
254
|
+
paddingTop: caption ? '16px' : '0',
|
|
255
|
+
} }, description))), album && album.tags.length > 0 && (h("div", { style: {
|
|
256
|
+
paddingTop: '24px',
|
|
257
|
+
marginBottom: '-12px',
|
|
258
|
+
} }, album.tags.map((tag, idx) => (h("button", { class: "btn btn-light", key: `album--tag-${idx}`, style: {
|
|
259
|
+
backgroundColor: Colors.Gray01,
|
|
260
|
+
borderColor: Colors.Gray01,
|
|
261
|
+
borderRadius: '4px',
|
|
262
|
+
marginRight: '12px',
|
|
263
|
+
marginBottom: '12px',
|
|
264
|
+
} }, 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: {
|
|
265
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
266
|
+
paddingTop: '24px',
|
|
267
|
+
paddingBottom: '24px',
|
|
268
|
+
} }, this.lookbookComments.map((comment, idx) => {
|
|
269
|
+
const { user, title, description, createdDate } = comment;
|
|
270
|
+
return (h("div", { key: `style-info--comment-${idx}`, style: idx > 0 ? {
|
|
271
|
+
borderTop: `1px solid ${Colors.Gray02}`,
|
|
272
|
+
marginTop: '24px',
|
|
273
|
+
paddingTop: '24px',
|
|
274
|
+
} : {} }, 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_min(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: {
|
|
275
|
+
color: Colors.Black,
|
|
276
|
+
fontSize: '16px',
|
|
277
|
+
paddingTop: '16px',
|
|
278
|
+
} }, title), description && (h("div", { style: {
|
|
279
|
+
color: Colors.Gray05,
|
|
280
|
+
paddingTop: '8px',
|
|
281
|
+
} }, description))));
|
|
282
|
+
})))))), 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: {
|
|
283
|
+
lineHeight: '1.2',
|
|
284
|
+
fontSize: '24px',
|
|
285
|
+
color: Colors.Secondary,
|
|
286
|
+
} }, "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 => {
|
|
287
|
+
const { caption, imageThumbMedium, owner } = style;
|
|
288
|
+
return (h("div", { class: "similar-styles--grid-item", onClick: () => {
|
|
289
|
+
this.closeModal();
|
|
290
|
+
this.onClickLookbook(style);
|
|
291
|
+
} }, h("div", { class: "card", style: {
|
|
292
|
+
background: 'none',
|
|
293
|
+
border: 'none',
|
|
294
|
+
cursor: 'pointer',
|
|
295
|
+
} }, h("div", { class: "similar-styles--grid-item--image", style: {
|
|
296
|
+
borderRadius: '8px',
|
|
297
|
+
overflow: 'hidden',
|
|
298
|
+
minHeight: '80px',
|
|
299
|
+
background: Colors.Gray01,
|
|
300
|
+
} }, 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 }))))));
|
|
301
|
+
}))))))))))))))));
|
|
302
|
+
}
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
StyleDetail.style = indexCss;
|
|
307
|
+
|
|
308
|
+
export { StyleDetail as style_detail };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-3fae868e.js';
|
|
2
|
+
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
+
|
|
4
|
+
const indexCss = "";
|
|
5
|
+
|
|
6
|
+
const UserAvatar = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.size = 24;
|
|
10
|
+
this.name = undefined;
|
|
11
|
+
this.nameStyle = undefined;
|
|
12
|
+
this.shortName = undefined;
|
|
13
|
+
this.avatar = undefined;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h("div", { style: { display: "flex", alignItems: "center" } }, this.avatar && (h("div", { style: {
|
|
17
|
+
backgroundImage: `url("${this.avatar}")`,
|
|
18
|
+
backgroundColor: Colors.Gray01,
|
|
19
|
+
backgroundPosition: 'center center',
|
|
20
|
+
backgroundSize: 'cover',
|
|
21
|
+
borderRadius: '50%',
|
|
22
|
+
height: `${this.size}px`,
|
|
23
|
+
width: `${this.size}px`,
|
|
24
|
+
minWidth: `${this.size}px`,
|
|
25
|
+
} })), !this.avatar && (h("div", { style: {
|
|
26
|
+
backgroundColor: Colors.Gray01,
|
|
27
|
+
backgroundPosition: 'center center',
|
|
28
|
+
backgroundSize: 'cover',
|
|
29
|
+
borderRadius: '50%',
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
justifyContent: 'center',
|
|
33
|
+
height: `${this.size}px`,
|
|
34
|
+
width: `${this.size}px`,
|
|
35
|
+
minWidth: `${this.size}px`,
|
|
36
|
+
} }, this.shortName)), this.name && (h("div", { style: Object.assign({ flexShrink: '1', flexGrow: '1', marginLeft: '12px', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }, this.nameStyle) }, this.name))));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
UserAvatar.style = indexCss;
|
|
40
|
+
|
|
41
|
+
export { UserAvatar as user_avatar };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function formatWebsiteUrl(website) {
|
|
2
|
+
return !!website ? website.indexOf('http') > -1 ? website : `http://${website}` : null;
|
|
3
|
+
}
|
|
4
|
+
function formatFullAddress(salon) {
|
|
5
|
+
const { businessAddress, city, state, zipcode, } = salon || {};
|
|
6
|
+
const stateFields = [state, zipcode].filter(field => !!field);
|
|
7
|
+
if (businessAddress) {
|
|
8
|
+
return [businessAddress, city]
|
|
9
|
+
.filter(field => !!field)
|
|
10
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
11
|
+
.join(', ');
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
function getRatingText() {
|
|
16
|
+
return ['', 'Poor', 'Sufficient', 'Average', 'Well', 'Very good'];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { formatFullAddress as a, formatWebsiteUrl as f, getRatingText as g };
|
|
Binary file
|