favesalon-embed 1.0.1 → 1.0.3
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/custom-elements/index.d.ts +24 -0
- package/dist/{cjs/_commonjsHelpers-5cfcba41.js → favesalon-embed/_commonjsHelpers-9bc404fc.js} +14 -6
- package/dist/{esm/_commonjsHelpers-098d5b27.js → favesalon-embed/_commonjsHelpers-a4f66ccd.js} +14 -2
- package/dist/{cjs/global-9073d10e.js → favesalon-embed/app-globals-437cc3f3.js} +15 -8
- package/dist/{esm/global-e1089ffd.js → favesalon-embed/app-globals-60769a2c.js} +16 -7
- package/dist/favesalon-embed/chat-box.entry.js +54 -0
- package/dist/favesalon-embed/chat-button.entry.js +51 -0
- package/dist/favesalon-embed/chat-form.entry.js +39 -0
- package/dist/favesalon-embed/chat-messages.entry.js +53 -0
- package/dist/favesalon-embed/chat-rooms.entry.js +17279 -0
- package/dist/favesalon-embed/css-shim-b7d3d95f.js +4 -0
- package/dist/favesalon-embed/dom-64053c71.js +73 -0
- package/dist/favesalon-embed/favesalon-embed.css +2433 -4
- package/dist/favesalon-embed/favesalon-embed.esm.js +148 -1
- package/dist/{collection/components/google-map/index.js → favesalon-embed/google-map.entry.js} +12 -54
- package/dist/{esm/index-80523fec.js → favesalon-embed/index-00b83e1c.js} +425 -15
- package/dist/favesalon-embed/index-04c09911.js +3371 -0
- package/dist/favesalon-embed/index-888e99e3.js +3371 -0
- package/dist/{cjs/index-7f190886.js → favesalon-embed/index-ac52896a.js} +454 -47
- package/dist/favesalon-embed/index.esm.js +1 -0
- package/dist/favesalon-embed/isObject-13b86c17.js +203 -0
- package/dist/favesalon-embed/relativeTime-15477f02.js +7 -0
- package/dist/favesalon-embed/relativeTime-268e64b0.js +7 -0
- package/dist/{esm → favesalon-embed}/salon-booking-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-booking.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-gift-card-modal.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-gift-card.entry.js +3 -3
- package/dist/favesalon-embed/salon-info.entry.js +29 -0
- package/dist/{esm → favesalon-embed}/salon-latest-reviews.entry.js +4 -4
- package/dist/{collection/components/salon-latest-styles/index.js → favesalon-embed/salon-latest-styles.entry.js} +14 -99
- package/dist/{collection/components/salon-locations/index.js → favesalon-embed/salon-locations.entry.js} +15 -95
- package/dist/{esm → favesalon-embed}/salon-lookbook.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-ranking.entry.js +1 -1
- package/dist/{esm → favesalon-embed}/salon-reviews.entry.js +3 -3
- package/dist/{collection/components/salon-schedules/index.js → favesalon-embed/salon-schedules.entry.js} +14 -95
- package/dist/{esm → favesalon-embed}/salon-services.entry.js +3 -3
- package/dist/{esm → favesalon-embed}/salon-stylists.entry.js +3 -3
- package/dist/{custom-elements/index.js → favesalon-embed/services-55a87166.js} +2465 -7150
- package/dist/{cjs/services-125c82d8.js → favesalon-embed/services-7c46a2fd.js} +2465 -103
- package/dist/{esm/services-40a3e622.js → favesalon-embed/services-7cb8f2a6.js} +2469 -100
- package/dist/favesalon-embed/shadow-css-98135883.js +387 -0
- package/dist/{esm → favesalon-embed}/style-detail.entry.js +4 -4
- package/dist/{esm → favesalon-embed}/user-avatar.entry.js +13 -4
- package/dist/{esm/utils-e97485e0.js → favesalon-embed/utils-2c19db45.js} +6 -0
- package/dist/types/components/chat-box/index.d.ts +12 -0
- package/dist/types/components/chat-button/index.d.ts +0 -8
- package/dist/types/components/chat-form/index.d.ts +6 -0
- package/dist/types/components/chat-messages/index.d.ts +14 -0
- package/dist/types/components/chat-rooms/index.d.ts +12 -0
- package/dist/types/components/user-avatar/index.d.ts +2 -1
- package/dist/types/components.d.ts +84 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/chat-button.cjs.entry.js +0 -118
- package/dist/cjs/colors-38421769.js +0 -69
- package/dist/cjs/favesalon-embed.cjs.js +0 -24
- package/dist/cjs/google-map_5.cjs.entry.js +0 -310
- package/dist/cjs/index-47c2a5f6.js +0 -1533
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -23
- package/dist/cjs/relativeTime-3721080d.js +0 -9
- package/dist/cjs/salon-booking-modal.cjs.entry.js +0 -30
- package/dist/cjs/salon-booking.cjs.entry.js +0 -51
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +0 -29
- package/dist/cjs/salon-gift-card.cjs.entry.js +0 -51
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +0 -97
- package/dist/cjs/salon-lookbook.cjs.entry.js +0 -222
- package/dist/cjs/salon-ranking.cjs.entry.js +0 -60
- package/dist/cjs/salon-reviews.cjs.entry.js +0 -193
- package/dist/cjs/salon-services.cjs.entry.js +0 -81
- package/dist/cjs/salon-stylists.cjs.entry.js +0 -118
- package/dist/cjs/style-detail.cjs.entry.js +0 -312
- package/dist/cjs/user-avatar.cjs.entry.js +0 -45
- package/dist/cjs/utils-c5a33b3c.js +0 -23
- package/dist/collection/collection-manifest.json +0 -29
- package/dist/collection/components/chat-button/index.css +0 -122
- package/dist/collection/components/chat-button/index.js +0 -218
- package/dist/collection/components/chat-conversation/index.js +0 -103
- package/dist/collection/components/google-map/assets/map--placeholder.jpeg +0 -0
- package/dist/collection/components/google-map/index.css +0 -5
- package/dist/collection/components/salon-booking/index.css +0 -30
- package/dist/collection/components/salon-booking/index.js +0 -126
- package/dist/collection/components/salon-booking/salon-booking-modal.js +0 -92
- package/dist/collection/components/salon-gift-card/index.css +0 -30
- package/dist/collection/components/salon-gift-card/index.js +0 -126
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +0 -73
- package/dist/collection/components/salon-info/index.css +0 -1
- package/dist/collection/components/salon-info/index.js +0 -77
- package/dist/collection/components/salon-latest-reviews/index.css +0 -11
- package/dist/collection/components/salon-latest-reviews/index.js +0 -163
- package/dist/collection/components/salon-latest-styles/index.css +0 -12
- package/dist/collection/components/salon-locations/index.css +0 -24
- package/dist/collection/components/salon-lookbook/index.css +0 -15
- package/dist/collection/components/salon-lookbook/index.js +0 -368
- package/dist/collection/components/salon-ranking/index.css +0 -3
- package/dist/collection/components/salon-ranking/index.js +0 -117
- package/dist/collection/components/salon-reviews/index.css +0 -18
- package/dist/collection/components/salon-reviews/index.js +0 -249
- package/dist/collection/components/salon-schedules/index.css +0 -18
- package/dist/collection/components/salon-services/index.css +0 -1
- package/dist/collection/components/salon-services/index.js +0 -146
- package/dist/collection/components/salon-stylists/index.css +0 -43
- package/dist/collection/components/salon-stylists/index.js +0 -184
- package/dist/collection/components/style-detail/index.css +0 -76
- package/dist/collection/components/style-detail/index.js +0 -386
- package/dist/collection/components/user-avatar/index.css +0 -0
- package/dist/collection/components/user-avatar/index.js +0 -134
- package/dist/collection/constants/colors.js +0 -65
- package/dist/collection/global/global.js +0 -8
- package/dist/collection/index.js +0 -1
- package/dist/collection/mocks/users.js +0 -10
- package/dist/collection/services/services.js +0 -295
- package/dist/collection/types/chat.js +0 -23
- package/dist/collection/types/common.js +0 -11
- package/dist/collection/types/review.js +0 -39
- package/dist/collection/types/salon.js +0 -58
- package/dist/collection/types/service.js +0 -24
- package/dist/collection/types/style.js +0 -128
- package/dist/collection/types/stylist.js +0 -30
- package/dist/collection/types/user.js +0 -10
- package/dist/collection/utils/utils.js +0 -20
- package/dist/esm/chat-button.entry.js +0 -114
- package/dist/esm/favesalon-embed.js +0 -19
- package/dist/esm/google-map_5.entry.js +0 -302
- package/dist/esm/index-3fae868e.js +0 -1506
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -19
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/relativeTime-cd452e6d.js +0 -7
- package/dist/favesalon-embed/p-019c5ccd.entry.js +0 -1
- package/dist/favesalon-embed/p-083a8821.entry.js +0 -1
- package/dist/favesalon-embed/p-0d0ed9ea.entry.js +0 -1
- package/dist/favesalon-embed/p-119db8de.entry.js +0 -1
- package/dist/favesalon-embed/p-1432c51b.entry.js +0 -1
- package/dist/favesalon-embed/p-22093506.entry.js +0 -1
- package/dist/favesalon-embed/p-32b314e9.js +0 -2
- package/dist/favesalon-embed/p-47e646f8.js +0 -1
- package/dist/favesalon-embed/p-4a5eca9a.js +0 -6
- package/dist/favesalon-embed/p-58d2e9be.js +0 -1
- package/dist/favesalon-embed/p-71404b6a.entry.js +0 -1
- package/dist/favesalon-embed/p-857c3a61.entry.js +0 -1
- package/dist/favesalon-embed/p-99ec77f7.entry.js +0 -1
- package/dist/favesalon-embed/p-a33331cc.js +0 -1
- package/dist/favesalon-embed/p-b0c3673a.entry.js +0 -1
- package/dist/favesalon-embed/p-b287b1ea.entry.js +0 -1
- package/dist/favesalon-embed/p-b3af7842.entry.js +0 -1
- package/dist/favesalon-embed/p-b630ae68.js +0 -1580
- package/dist/favesalon-embed/p-ce2c1c9a.entry.js +0 -1
- package/dist/favesalon-embed/p-d6083940.js +0 -1
- package/dist/favesalon-embed/p-d9b7ad58.entry.js +0 -1
- package/dist/favesalon-embed/p-fc9a5551.js +0 -6
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/types/components/chat-conversation/index.d.ts +0 -0
- /package/dist/{esm → favesalon-embed}/colors-ea36347a.js +0 -0
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import Color from 'color';
|
|
3
|
-
import { css } from 'glamor';
|
|
4
|
-
import { Colors } from '../../constants/colors';
|
|
5
|
-
export class SalonGiftCard {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.salonId = undefined;
|
|
8
|
-
this.buttonClass = '';
|
|
9
|
-
this.buttonText = 'Buy Gift card';
|
|
10
|
-
this.primaryColor = Colors.Primary;
|
|
11
|
-
}
|
|
12
|
-
openModal() {
|
|
13
|
-
const elBookingModal = document.createElement('div');
|
|
14
|
-
elBookingModal.innerHTML = `
|
|
15
|
-
<salon-gift-card-modal
|
|
16
|
-
salon-id=${this.salonId}
|
|
17
|
-
primary-color=${this.primaryColor}
|
|
18
|
-
></salon-gift-card-modal>
|
|
19
|
-
`;
|
|
20
|
-
document.body.appendChild(elBookingModal);
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const buttonClass = this.buttonClass || 'btn btn-primary';
|
|
24
|
-
let buttonStyle = {};
|
|
25
|
-
if (!this.buttonClass) {
|
|
26
|
-
const primaryColor = Color(this.primaryColor);
|
|
27
|
-
const primaryColorHover = primaryColor.darken(0.05);
|
|
28
|
-
buttonStyle = css({
|
|
29
|
-
backgroundColor: this.primaryColor,
|
|
30
|
-
borderColor: this.primaryColor,
|
|
31
|
-
color: primaryColor.isLight() ? Colors.Black01 : Colors.White,
|
|
32
|
-
':hover': {
|
|
33
|
-
backgroundColor: primaryColorHover,
|
|
34
|
-
borderColor: primaryColorHover,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
return (h("div", { class: "salon-gift-card" }, h("div", { class: "salon-gift-card--button" }, h("button", Object.assign({ type: "button", class: buttonClass, onClick: () => this.openModal() }, buttonStyle), this.buttonText))));
|
|
39
|
-
}
|
|
40
|
-
static get is() { return "salon-gift-card"; }
|
|
41
|
-
static get originalStyleUrls() {
|
|
42
|
-
return {
|
|
43
|
-
"$": ["index.css"]
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
static get styleUrls() {
|
|
47
|
-
return {
|
|
48
|
-
"$": ["index.css"]
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
static get properties() {
|
|
52
|
-
return {
|
|
53
|
-
"salonId": {
|
|
54
|
-
"type": "number",
|
|
55
|
-
"mutable": false,
|
|
56
|
-
"complexType": {
|
|
57
|
-
"original": "number",
|
|
58
|
-
"resolved": "number",
|
|
59
|
-
"references": {}
|
|
60
|
-
},
|
|
61
|
-
"required": false,
|
|
62
|
-
"optional": false,
|
|
63
|
-
"docs": {
|
|
64
|
-
"tags": [],
|
|
65
|
-
"text": ""
|
|
66
|
-
},
|
|
67
|
-
"attribute": "salon-id",
|
|
68
|
-
"reflect": false
|
|
69
|
-
},
|
|
70
|
-
"buttonClass": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"mutable": false,
|
|
73
|
-
"complexType": {
|
|
74
|
-
"original": "string",
|
|
75
|
-
"resolved": "string",
|
|
76
|
-
"references": {}
|
|
77
|
-
},
|
|
78
|
-
"required": false,
|
|
79
|
-
"optional": false,
|
|
80
|
-
"docs": {
|
|
81
|
-
"tags": [],
|
|
82
|
-
"text": ""
|
|
83
|
-
},
|
|
84
|
-
"attribute": "button-class",
|
|
85
|
-
"reflect": false,
|
|
86
|
-
"defaultValue": "''"
|
|
87
|
-
},
|
|
88
|
-
"buttonText": {
|
|
89
|
-
"type": "string",
|
|
90
|
-
"mutable": false,
|
|
91
|
-
"complexType": {
|
|
92
|
-
"original": "string",
|
|
93
|
-
"resolved": "string",
|
|
94
|
-
"references": {}
|
|
95
|
-
},
|
|
96
|
-
"required": false,
|
|
97
|
-
"optional": false,
|
|
98
|
-
"docs": {
|
|
99
|
-
"tags": [],
|
|
100
|
-
"text": ""
|
|
101
|
-
},
|
|
102
|
-
"attribute": "button-text",
|
|
103
|
-
"reflect": false,
|
|
104
|
-
"defaultValue": "'Buy Gift card'"
|
|
105
|
-
},
|
|
106
|
-
"primaryColor": {
|
|
107
|
-
"type": "string",
|
|
108
|
-
"mutable": false,
|
|
109
|
-
"complexType": {
|
|
110
|
-
"original": "string",
|
|
111
|
-
"resolved": "string",
|
|
112
|
-
"references": {}
|
|
113
|
-
},
|
|
114
|
-
"required": false,
|
|
115
|
-
"optional": false,
|
|
116
|
-
"docs": {
|
|
117
|
-
"tags": [],
|
|
118
|
-
"text": ""
|
|
119
|
-
},
|
|
120
|
-
"attribute": "primary-color",
|
|
121
|
-
"reflect": false,
|
|
122
|
-
"defaultValue": "Colors.Primary"
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import { Colors } from '../../constants/colors';
|
|
3
|
-
export class SalonGiftCardModal {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.salonId = undefined;
|
|
6
|
-
this.primaryColor = Colors.Primary;
|
|
7
|
-
this.isModalOpen = true;
|
|
8
|
-
}
|
|
9
|
-
closeModal() {
|
|
10
|
-
this.isModalOpen = false;
|
|
11
|
-
const el = document.querySelector('salon-gift-card-modal');
|
|
12
|
-
el.remove();
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
const primaryColor = this.primaryColor.split('#')[1] || 'd47b99';
|
|
16
|
-
return (h("div", { class: "salon-gift-card--modal" }, this.isModalOpen && (h("div", { class: "salon-modal salon-modal--gift-card" }, h("div", { class: "salon-modal--backdrop", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--close", onClick: () => this.closeModal() }), h("div", { class: "salon-modal--inner" }, h("div", { class: "salon-modal--content" }, h("iframe", { height: "100%", width: "100%", style: { border: 'none', display: 'block', height: '100%' }, src: `https://www.favesalon.com/r/buy-gift-card?salonId=${this.salonId}&primaryColor=${primaryColor}&closeAble=false` })))))));
|
|
17
|
-
}
|
|
18
|
-
static get is() { return "salon-gift-card-modal"; }
|
|
19
|
-
static get originalStyleUrls() {
|
|
20
|
-
return {
|
|
21
|
-
"$": ["index.css"]
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
static get styleUrls() {
|
|
25
|
-
return {
|
|
26
|
-
"$": ["index.css"]
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
static get properties() {
|
|
30
|
-
return {
|
|
31
|
-
"salonId": {
|
|
32
|
-
"type": "number",
|
|
33
|
-
"mutable": false,
|
|
34
|
-
"complexType": {
|
|
35
|
-
"original": "number",
|
|
36
|
-
"resolved": "number",
|
|
37
|
-
"references": {}
|
|
38
|
-
},
|
|
39
|
-
"required": false,
|
|
40
|
-
"optional": false,
|
|
41
|
-
"docs": {
|
|
42
|
-
"tags": [],
|
|
43
|
-
"text": ""
|
|
44
|
-
},
|
|
45
|
-
"attribute": "salon-id",
|
|
46
|
-
"reflect": false
|
|
47
|
-
},
|
|
48
|
-
"primaryColor": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"mutable": false,
|
|
51
|
-
"complexType": {
|
|
52
|
-
"original": "string",
|
|
53
|
-
"resolved": "string",
|
|
54
|
-
"references": {}
|
|
55
|
-
},
|
|
56
|
-
"required": false,
|
|
57
|
-
"optional": false,
|
|
58
|
-
"docs": {
|
|
59
|
-
"tags": [],
|
|
60
|
-
"text": ""
|
|
61
|
-
},
|
|
62
|
-
"attribute": "primary-color",
|
|
63
|
-
"reflect": false,
|
|
64
|
-
"defaultValue": "Colors.Primary"
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
static get states() {
|
|
69
|
-
return {
|
|
70
|
-
"isModalOpen": {}
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import HttpService from '../../services/services';
|
|
3
|
-
export class SalonInfo {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.salonId = undefined;
|
|
6
|
-
this.salonInfo = undefined;
|
|
7
|
-
}
|
|
8
|
-
componentWillLoad() {
|
|
9
|
-
this.fetchData();
|
|
10
|
-
}
|
|
11
|
-
async fetchData() {
|
|
12
|
-
try {
|
|
13
|
-
this.salonInfo = await HttpService().fetchSalonInfo(this.salonId);
|
|
14
|
-
}
|
|
15
|
-
catch (e) { }
|
|
16
|
-
}
|
|
17
|
-
render() {
|
|
18
|
-
return (h("div", { class: "salon-info" }, h("div", { class: "container" }, h("div", { class: "salon-info--schedules", style: { marginBottom: '24px' } }, h("salon-schedules", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "row" }, h("div", { class: "col-md-5", style: { marginBottom: '24px' } }, h("salon-locations", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) })), h("div", { class: "col-md-7", style: { marginBottom: '24px' } }, h("salon-latest-styles", { "with-border": true, "is-loading": !this.salonInfo, "salon-id": 49989, "salon-info": JSON.stringify(this.salonInfo) }))))));
|
|
19
|
-
}
|
|
20
|
-
static get is() { return "salon-info"; }
|
|
21
|
-
static get originalStyleUrls() {
|
|
22
|
-
return {
|
|
23
|
-
"$": ["index.css"]
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
static get styleUrls() {
|
|
27
|
-
return {
|
|
28
|
-
"$": ["index.css"]
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
static get properties() {
|
|
32
|
-
return {
|
|
33
|
-
"salonId": {
|
|
34
|
-
"type": "number",
|
|
35
|
-
"mutable": false,
|
|
36
|
-
"complexType": {
|
|
37
|
-
"original": "number",
|
|
38
|
-
"resolved": "number",
|
|
39
|
-
"references": {}
|
|
40
|
-
},
|
|
41
|
-
"required": false,
|
|
42
|
-
"optional": false,
|
|
43
|
-
"docs": {
|
|
44
|
-
"tags": [],
|
|
45
|
-
"text": ""
|
|
46
|
-
},
|
|
47
|
-
"attribute": "salon-id",
|
|
48
|
-
"reflect": false
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
static get states() {
|
|
53
|
-
return {
|
|
54
|
-
"salonInfo": {}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
static get methods() {
|
|
58
|
-
return {
|
|
59
|
-
"fetchData": {
|
|
60
|
-
"complexType": {
|
|
61
|
-
"signature": "() => Promise<void>",
|
|
62
|
-
"parameters": [],
|
|
63
|
-
"references": {
|
|
64
|
-
"Promise": {
|
|
65
|
-
"location": "global"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"return": "Promise<void>"
|
|
69
|
-
},
|
|
70
|
-
"docs": {
|
|
71
|
-
"text": "",
|
|
72
|
-
"tags": []
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import dayjs from 'dayjs';
|
|
3
|
-
import { Colors } from '../../constants/colors';
|
|
4
|
-
import { shortDateYearFormat } from '../../types/common';
|
|
5
|
-
import { getRatingText } from '../../utils/utils';
|
|
6
|
-
import HttpService from '../../services/services';
|
|
7
|
-
export class SalonLatestReviews {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.salonId = undefined;
|
|
10
|
-
this.primaryColor = Colors.Primary;
|
|
11
|
-
this.salonReviews = [];
|
|
12
|
-
this.isLoading = undefined;
|
|
13
|
-
}
|
|
14
|
-
componentWillLoad() {
|
|
15
|
-
this.fetchData();
|
|
16
|
-
}
|
|
17
|
-
async fetchData() {
|
|
18
|
-
this.isLoading = true;
|
|
19
|
-
try {
|
|
20
|
-
const { data: allReviews } = await HttpService().fetchSalonReviews(this.salonId, { limit: 5 });
|
|
21
|
-
this.salonReviews = [...allReviews];
|
|
22
|
-
}
|
|
23
|
-
catch (e) { }
|
|
24
|
-
this.isLoading = false;
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
if (this.isLoading) {
|
|
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
|
-
}))));
|
|
63
|
-
}
|
|
64
|
-
const ratingTexts = getRatingText();
|
|
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
|
-
}))));
|
|
86
|
-
}
|
|
87
|
-
static get is() { return "salon-latest-reviews"; }
|
|
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": {}
|
|
107
|
-
},
|
|
108
|
-
"required": false,
|
|
109
|
-
"optional": false,
|
|
110
|
-
"docs": {
|
|
111
|
-
"tags": [],
|
|
112
|
-
"text": ""
|
|
113
|
-
},
|
|
114
|
-
"attribute": "salon-id",
|
|
115
|
-
"reflect": false
|
|
116
|
-
},
|
|
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"
|
|
134
|
-
}
|
|
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
|
-
}
|
|
163
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@media (min-width: 768px) {
|
|
2
|
-
salon-locations .salon-contact--links {
|
|
3
|
-
overflow: hidden;
|
|
4
|
-
margin-left: -32px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
salon-locations .salon-contact--links-item {
|
|
8
|
-
float: left;
|
|
9
|
-
display: flex;
|
|
10
|
-
flex-direction: row;
|
|
11
|
-
align-items: center;
|
|
12
|
-
font-size: 16px;
|
|
13
|
-
min-width: 300px;
|
|
14
|
-
padding-left: 32px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
salon-locations .salon-contact--links-item:nth-child(2n + 1) {
|
|
18
|
-
clear: left;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
salon-locations .salon-contact--links-item + .salon-contact--links-item {
|
|
22
|
-
margin-top: 8px;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
@media (max-width: 768px) {
|
|
2
|
-
salon-lookbook .view-header {
|
|
3
|
-
display: block !important;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
salon-lookbook .salon-loobook--serch-result {
|
|
7
|
-
margin-bottom: 16px;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
salon-lookbook .salon-loobook--filter-wrapper > label,
|
|
11
|
-
salon-lookbook .salon-loobook--sort-wrapper > label {
|
|
12
|
-
display: none !important;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|