favesalon-embed 1.0.3 → 1.0.4
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/dist/{favesalon-embed/_commonjsHelpers-9bc404fc.js → cjs/_commonjsHelpers-5cfcba41.js} +6 -14
- package/dist/cjs/chat-box_5.cjs.entry.js +17439 -0
- package/dist/cjs/chat-button.cjs.entry.js +55 -0
- package/dist/cjs/colors-38421769.js +69 -0
- package/dist/cjs/favesalon-embed.cjs.js +23 -0
- package/dist/cjs/google-map.cjs.entry.js +52 -0
- package/dist/{favesalon-embed/index-ac52896a.js → cjs/index-7f190886.js} +47 -454
- package/dist/cjs/index-dd8176c4.js +1531 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -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-info.cjs.entry.js +33 -0
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +97 -0
- package/dist/cjs/salon-latest-styles_3.cjs.entry.js +241 -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/{favesalon-embed/services-7cb8f2a6.js → cjs/services-d1bdf299.js} +55 -2415
- package/dist/cjs/style-detail.cjs.entry.js +312 -0
- package/dist/cjs/utils-c5a33b3c.js +23 -0
- package/dist/collection/collection-manifest.json +33 -0
- package/dist/collection/components/chat-box/index.css +105 -0
- package/dist/collection/components/chat-box/index.js +138 -0
- package/dist/collection/components/chat-button/index.css +101 -0
- package/dist/collection/components/chat-button/index.js +155 -0
- package/dist/collection/components/chat-form/index.css +40 -0
- package/dist/collection/components/chat-form/index.js +79 -0
- package/dist/collection/components/chat-messages/index.css +48 -0
- package/dist/collection/components/chat-messages/index.js +142 -0
- package/dist/collection/components/chat-rooms/index.css +102 -0
- package/dist/collection/components/chat-rooms/index.js +157 -0
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/dist/collection/components/google-map/index.css +5 -0
- package/dist/collection/components/google-map/index.js +90 -0
- package/dist/collection/components/salon-booking/index.css +30 -0
- 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.css +1 -0
- package/dist/collection/components/salon-info/index.js +77 -0
- package/dist/collection/components/salon-latest-reviews/index.css +11 -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/{favesalon-embed/salon-latest-styles.entry.js → collection/components/salon-latest-styles/index.js} +99 -14
- package/dist/collection/components/salon-locations/index.css +24 -0
- package/dist/{favesalon-embed/salon-locations.entry.js → collection/components/salon-locations/index.js} +95 -15
- 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.css +3 -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/{favesalon-embed/salon-schedules.entry.js → collection/components/salon-schedules/index.js} +95 -14
- 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.css +43 -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.css +0 -0
- package/dist/collection/components/user-avatar/index.js +159 -0
- package/dist/collection/constants/colors.js +65 -0
- package/dist/collection/global/global.js +0 -0
- package/dist/collection/index.js +1 -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/dist/collection/types/review.js +39 -0
- package/dist/collection/types/salon.js +58 -0
- package/dist/collection/types/service.js +24 -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/dist/collection/utils/utils.js +23 -0
- package/dist/custom-elements/index.js +44974 -0
- package/dist/{favesalon-embed/_commonjsHelpers-a4f66ccd.js → esm/_commonjsHelpers-66ac50f5.js} +2 -14
- package/dist/{favesalon-embed/chat-rooms.entry.js → esm/chat-box_5.entry.js} +182 -30
- package/dist/{favesalon-embed → esm}/chat-button.entry.js +3 -3
- package/dist/esm/favesalon-embed.js +18 -0
- package/dist/{favesalon-embed → esm}/google-map.entry.js +1 -1
- package/dist/esm/index-0494771f.js +1504 -0
- package/dist/{favesalon-embed/index-00b83e1c.js → esm/index-a1c7583c.js} +15 -425
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/relativeTime-baa50aa2.js +7 -0
- package/dist/{favesalon-embed → esm}/salon-booking-modal.entry.js +1 -1
- package/dist/{favesalon-embed → esm}/salon-booking.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-gift-card-modal.entry.js +1 -1
- package/dist/{favesalon-embed → esm}/salon-gift-card.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-info.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-latest-reviews.entry.js +4 -4
- package/dist/esm/salon-latest-styles_3.entry.js +235 -0
- package/dist/{favesalon-embed → esm}/salon-lookbook.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-ranking.entry.js +1 -1
- package/dist/{favesalon-embed → esm}/salon-reviews.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-services.entry.js +3 -3
- package/dist/{favesalon-embed → esm}/salon-stylists.entry.js +3 -3
- package/dist/{favesalon-embed/services-7c46a2fd.js → esm/services-257442e2.js} +99 -2467
- package/dist/{favesalon-embed → esm}/style-detail.entry.js +4 -4
- package/dist/{favesalon-embed/utils-2c19db45.js → esm/utils-e97485e0.js} +0 -6
- package/dist/favesalon-embed/favesalon-embed.css +1 -2439
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -148
- package/dist/favesalon-embed/index.esm.js +0 -1
- package/dist/favesalon-embed/p-05a1c88a.entry.js +1 -0
- package/dist/favesalon-embed/p-0acf0447.entry.js +1 -0
- package/dist/favesalon-embed/p-0bc4f624.js +1 -0
- package/dist/favesalon-embed/p-1af1515f.entry.js +1 -0
- package/dist/favesalon-embed/p-1cba5fc9.entry.js +1 -0
- package/dist/favesalon-embed/p-39a4ef15.entry.js +1 -0
- package/dist/favesalon-embed/p-3e2cb05b.entry.js +1 -0
- package/dist/favesalon-embed/p-47e646f8.js +1 -0
- package/dist/favesalon-embed/p-487b311f.entry.js +1 -0
- package/dist/favesalon-embed/p-55387c2f.entry.js +1 -0
- package/dist/favesalon-embed/p-566f05b4.entry.js +1 -0
- package/dist/favesalon-embed/p-862a0de0.entry.js +1 -0
- package/dist/favesalon-embed/p-9fe0cbeb.js +2 -0
- package/dist/favesalon-embed/p-a33331cc.js +1 -0
- package/dist/favesalon-embed/p-aeeb7b5f.entry.js +1 -0
- package/dist/favesalon-embed/p-b08e5b54.js +6 -0
- package/dist/favesalon-embed/p-b5cca5fc.entry.js +1 -0
- package/dist/favesalon-embed/p-c7fb7af5.js +1580 -0
- package/dist/favesalon-embed/p-ccab56d8.js +1 -0
- package/dist/favesalon-embed/p-d6e13053.entry.js +1 -0
- package/dist/favesalon-embed/p-dee42d34.entry.js +1 -0
- package/dist/favesalon-embed/p-e661ca1d.entry.js +1 -0
- package/dist/favesalon-embed/p-eeceab9c.entry.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
- package/dist/favesalon-embed/app-globals-437cc3f3.js +0 -712
- package/dist/favesalon-embed/app-globals-60769a2c.js +0 -712
- package/dist/favesalon-embed/chat-box.entry.js +0 -54
- package/dist/favesalon-embed/chat-form.entry.js +0 -39
- package/dist/favesalon-embed/chat-messages.entry.js +0 -53
- package/dist/favesalon-embed/css-shim-b7d3d95f.js +0 -4
- package/dist/favesalon-embed/dom-64053c71.js +0 -73
- package/dist/favesalon-embed/index-04c09911.js +0 -3371
- package/dist/favesalon-embed/index-888e99e3.js +0 -3371
- package/dist/favesalon-embed/isObject-13b86c17.js +0 -203
- package/dist/favesalon-embed/relativeTime-15477f02.js +0 -7
- package/dist/favesalon-embed/relativeTime-268e64b0.js +0 -7
- package/dist/favesalon-embed/services-55a87166.js +0 -23655
- package/dist/favesalon-embed/shadow-css-98135883.js +0 -387
- package/dist/favesalon-embed/user-avatar.entry.js +0 -50
- /package/dist/{favesalon-embed → esm}/colors-ea36347a.js +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-dd8176c4.js');
|
|
6
|
+
const colors = require('./colors-38421769.js');
|
|
7
|
+
const services = require('./services-d1bdf299.js');
|
|
8
|
+
require('./_commonjsHelpers-5cfcba41.js');
|
|
9
|
+
|
|
10
|
+
const indexCss = ".view--salon-stylists{overflow:hidden;margin-left:-12px;margin-top:-12px}.view--salon-stylists .salon-stylist{float:left;padding-left:12px;padding-top:12px;width:50%}.view--salon-stylists .salon-stylist--avatar{height:180px}@media (min-width: 576px){.view--salon-stylists .salon-stylist{width:33.33%;max-width:240px}}@media (min-width: 768px){.view--salon-stylists{margin-left:-24px;margin-top:-24px}.view--salon-stylists .salon-stylist{padding-left:24px;padding-top:24px;width:264px;max-width:none}.view--salon-stylists .salon-stylist--avatar{height:240px}}";
|
|
11
|
+
|
|
12
|
+
const pageLimit = 20;
|
|
13
|
+
const SalonStylists = class {
|
|
14
|
+
constructor(hostRef) {
|
|
15
|
+
index.registerInstance(this, hostRef);
|
|
16
|
+
this.salonId = undefined;
|
|
17
|
+
this.salonStylists = undefined;
|
|
18
|
+
this.totalStylists = undefined;
|
|
19
|
+
this.page = 1;
|
|
20
|
+
this.isLoading = undefined;
|
|
21
|
+
this.isLoadingMore = undefined;
|
|
22
|
+
this.canLoadMore = undefined;
|
|
23
|
+
}
|
|
24
|
+
componentWillLoad() {
|
|
25
|
+
this.fetchData();
|
|
26
|
+
}
|
|
27
|
+
async fetchData() {
|
|
28
|
+
this.isLoading = true;
|
|
29
|
+
try {
|
|
30
|
+
const { total, data } = await services.HttpService().fetchSalonStylists(this.salonId, { page: 1, limit: pageLimit });
|
|
31
|
+
this.totalStylists = total;
|
|
32
|
+
this.salonStylists = data;
|
|
33
|
+
this.canLoadMore = data.length === pageLimit;
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
this.totalStylists = 0;
|
|
37
|
+
this.salonStylists = [];
|
|
38
|
+
this.canLoadMore = false;
|
|
39
|
+
}
|
|
40
|
+
this.isLoading = false;
|
|
41
|
+
}
|
|
42
|
+
async onLoadMore() {
|
|
43
|
+
this.isLoadingMore = true;
|
|
44
|
+
try {
|
|
45
|
+
const { data } = await services.HttpService().fetchSalonStylists(this.salonId, { page: this.page + 1, limit: pageLimit });
|
|
46
|
+
this.salonStylists = this.salonStylists.concat(data || []);
|
|
47
|
+
this.canLoadMore = data.length === pageLimit;
|
|
48
|
+
this.page += 1;
|
|
49
|
+
}
|
|
50
|
+
catch (e) { }
|
|
51
|
+
this.isLoadingMore = false;
|
|
52
|
+
}
|
|
53
|
+
render() {
|
|
54
|
+
if (this.isLoading) {
|
|
55
|
+
return (index.h("div", null, index.h("div", { class: "view--salon-stylists" }, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].map((fakeId, index$1) => (index.h("div", { class: "salon-stylist" }, index.h("div", { class: "card", style: {
|
|
56
|
+
background: 'none',
|
|
57
|
+
border: 'none',
|
|
58
|
+
overflow: 'hidden',
|
|
59
|
+
} }, index.h("div", { class: "salon-stylist--avatar", style: {
|
|
60
|
+
backgroundColor: colors.Colors.Gray01,
|
|
61
|
+
backgroundRepeat: 'no-repeat',
|
|
62
|
+
backgroundPosition: 'center top',
|
|
63
|
+
backgroundSize: 'cover',
|
|
64
|
+
border: `1px solid ${colors.Colors.Gray01}`,
|
|
65
|
+
borderRadius: '8px',
|
|
66
|
+
position: 'relative',
|
|
67
|
+
display: 'flex',
|
|
68
|
+
width: '100%',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
justifyContent: 'center',
|
|
71
|
+
} }), index.h("div", { class: "card-body" }, index.h("div", { key: `stylist--${fakeId}--${index$1}`, style: {
|
|
72
|
+
backgroundColor: colors.Colors.Gray01,
|
|
73
|
+
height: '16px',
|
|
74
|
+
width: '120px',
|
|
75
|
+
margin: 'auto',
|
|
76
|
+
} })))))))));
|
|
77
|
+
}
|
|
78
|
+
return (index.h("div", null, index.h("div", { class: "view--salon-stylists" }, (this.salonStylists || []).map(stylist => (index.h("div", { class: "salon-stylist" }, index.h("div", { class: "card", style: {
|
|
79
|
+
background: 'none',
|
|
80
|
+
border: 'none',
|
|
81
|
+
overflow: 'hidden',
|
|
82
|
+
} }, index.h("div", { class: "salon-stylist--avatar", style: {
|
|
83
|
+
backgroundImage: `url("${stylist.avatar}")`,
|
|
84
|
+
backgroundColor: colors.Colors.Gray01,
|
|
85
|
+
backgroundRepeat: 'no-repeat',
|
|
86
|
+
backgroundPosition: 'center top',
|
|
87
|
+
backgroundSize: 'cover',
|
|
88
|
+
border: `1px solid ${colors.Colors.Gray01}`,
|
|
89
|
+
borderRadius: '8px',
|
|
90
|
+
position: 'relative',
|
|
91
|
+
display: 'flex',
|
|
92
|
+
width: '100%',
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
justifyContent: 'center',
|
|
95
|
+
} }, !stylist.avatar && (index.h("span", { style: {
|
|
96
|
+
fontSize: '32px',
|
|
97
|
+
fontWeight: 'bold',
|
|
98
|
+
textTransform: 'uppercase',
|
|
99
|
+
} }, (stylist.firstName || '').charAt(0), " ", (stylist.lastName || '').charAt(0)))), index.h("div", { class: "card-body" }, index.h("div", { style: {
|
|
100
|
+
fontSize: '18px',
|
|
101
|
+
fontWeight: '600',
|
|
102
|
+
textAlign: 'center',
|
|
103
|
+
} }, stylist.fullName))))))), this.canLoadMore && (index.h("div", { class: "view-footer", style: {
|
|
104
|
+
textAlign: 'center',
|
|
105
|
+
paddingTop: '32px',
|
|
106
|
+
paddingBottom: '16px',
|
|
107
|
+
} }, index.h("button", { type: "button", class: "btn btn-lg", disabled: this.isLoadingMore, style: {
|
|
108
|
+
background: colors.Colors.White,
|
|
109
|
+
border: `1px solid ${colors.Colors.Gray02}`,
|
|
110
|
+
borderRadius: '4px',
|
|
111
|
+
paddingLeft: '24px',
|
|
112
|
+
paddingRight: '24px',
|
|
113
|
+
}, onClick: () => this.onLoadMore() }, "Load more")))));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
SalonStylists.style = indexCss;
|
|
117
|
+
|
|
118
|
+
exports.salon_stylists = SalonStylists;
|