favesalon-embed 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/chat-button.cjs.entry.js +118 -0
- package/dist/cjs/favesalon-embed.cjs.js +7 -3
- package/dist/cjs/google-map_5.cjs.entry.js +26 -7
- package/dist/cjs/{index-e6bea8f5.js → index-47c2a5f6.js} +512 -208
- package/dist/cjs/loader.cjs.js +4 -3
- package/dist/cjs/relativeTime-3721080d.js +9 -0
- package/dist/cjs/salon-booking-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-booking.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card-modal.cjs.entry.js +3 -2
- package/dist/cjs/salon-gift-card.cjs.entry.js +3 -2
- package/dist/cjs/salon-latest-reviews.cjs.entry.js +5 -3
- package/dist/cjs/salon-lookbook.cjs.entry.js +7 -3
- package/dist/cjs/salon-ranking.cjs.entry.js +3 -2
- package/dist/cjs/salon-reviews.cjs.entry.js +10 -3
- package/dist/cjs/salon-services.cjs.entry.js +6 -3
- package/dist/cjs/salon-stylists.cjs.entry.js +9 -3
- package/dist/cjs/services-125c82d8.js +21492 -0
- package/dist/cjs/style-detail.cjs.entry.js +11 -9
- package/dist/cjs/user-avatar.cjs.entry.js +7 -3
- package/dist/collection/collection-manifest.json +3 -2
- 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/index.js +72 -68
- package/dist/collection/components/salon-booking/index.css +5 -0
- package/dist/collection/components/salon-booking/index.js +85 -80
- package/dist/collection/components/salon-booking/salon-booking-modal.js +73 -69
- package/dist/collection/components/salon-gift-card/index.css +6 -1
- package/dist/collection/components/salon-gift-card/index.js +85 -80
- package/dist/collection/components/salon-gift-card/salon-gift-card-modal.js +56 -52
- package/dist/collection/components/salon-info/index.css +1 -0
- package/dist/collection/components/salon-info/index.js +60 -54
- package/dist/collection/components/salon-latest-reviews/index.css +3 -0
- package/dist/collection/components/salon-latest-reviews/index.js +131 -144
- package/dist/collection/components/salon-latest-styles/index.css +2 -0
- package/dist/collection/components/salon-latest-styles/index.js +143 -138
- package/dist/collection/components/salon-locations/index.css +3 -0
- package/dist/collection/components/salon-locations/index.js +112 -120
- package/dist/collection/components/salon-lookbook/index.css +3 -0
- package/dist/collection/components/salon-lookbook/index.js +182 -190
- package/dist/collection/components/salon-ranking/index.js +68 -65
- package/dist/collection/components/salon-reviews/index.css +3 -0
- package/dist/collection/components/salon-reviews/index.js +146 -183
- package/dist/collection/components/salon-schedules/index.css +3 -0
- package/dist/collection/components/salon-schedules/index.js +129 -151
- package/dist/collection/components/salon-services/index.css +1 -0
- package/dist/collection/components/salon-services/index.js +117 -127
- package/dist/collection/components/salon-stylists/index.css +8 -0
- package/dist/collection/components/salon-stylists/index.js +137 -136
- package/dist/collection/components/style-detail/index.css +14 -0
- package/dist/collection/components/style-detail/index.js +265 -340
- package/dist/collection/components/user-avatar/index.js +119 -112
- package/dist/collection/mocks/users.js +10 -0
- package/dist/collection/services/services.js +121 -0
- package/dist/collection/types/chat.js +23 -0
- package/dist/collection/types/user.js +1 -1
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +24628 -8605
- package/dist/esm/chat-button.entry.js +114 -0
- package/dist/esm/favesalon-embed.js +4 -3
- package/dist/esm/google-map_5.entry.js +26 -7
- package/dist/esm/{index-6af0a03d.js → index-3fae868e.js} +512 -209
- package/dist/esm/loader.js +4 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/relativeTime-cd452e6d.js +7 -0
- package/dist/esm/salon-booking-modal.entry.js +3 -2
- package/dist/esm/salon-booking.entry.js +3 -2
- package/dist/esm/salon-gift-card-modal.entry.js +3 -2
- package/dist/esm/salon-gift-card.entry.js +3 -2
- package/dist/esm/salon-latest-reviews.entry.js +5 -3
- package/dist/esm/salon-lookbook.entry.js +7 -3
- package/dist/esm/salon-ranking.entry.js +3 -2
- package/dist/esm/salon-reviews.entry.js +10 -3
- package/dist/esm/salon-services.entry.js +6 -3
- package/dist/esm/salon-stylists.entry.js +9 -3
- package/dist/esm/services-40a3e622.js +21485 -0
- package/dist/esm/style-detail.entry.js +10 -8
- package/dist/esm/user-avatar.entry.js +7 -3
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- 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-4a5eca9a.js +1 -1
- 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-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-d9b7ad58.entry.js +1 -0
- package/dist/favesalon-embed/p-fc9a5551.js +1 -1
- package/dist/types/components/chat-button/index.d.ts +24 -0
- package/dist/types/components.d.ts +22 -0
- package/dist/types/mocks/users.d.ts +10 -0
- package/dist/types/services/services.d.ts +15 -0
- package/dist/types/stencil-public-runtime.d.ts +85 -11
- package/dist/types/types/chat.d.ts +17 -0
- package/loader/index.d.ts +9 -0
- package/loader/package.json +1 -0
- package/package.json +3 -3
- package/readme.md +2 -2
- package/dist/cjs/services-eee8f251.js +0 -5634
- package/dist/esm/services-295247b1.js +0 -5627
- package/dist/favesalon-embed/p-292b97ba.entry.js +0 -1
- package/dist/favesalon-embed/p-4869dfed.entry.js +0 -1
- package/dist/favesalon-embed/p-4aee4fd9.entry.js +0 -1
- package/dist/favesalon-embed/p-5528c705.entry.js +0 -1
- package/dist/favesalon-embed/p-612ad685.entry.js +0 -1
- package/dist/favesalon-embed/p-75aef7e0.entry.js +0 -1
- package/dist/favesalon-embed/p-8c780874.entry.js +0 -1
- package/dist/favesalon-embed/p-8dbf04c5.js +0 -1
- package/dist/favesalon-embed/p-9f31061a.entry.js +0 -1
- package/dist/favesalon-embed/p-a60d78e9.entry.js +0 -1
- package/dist/favesalon-embed/p-a6debdae.entry.js +0 -1
- package/dist/favesalon-embed/p-bad1e9a7.entry.js +0 -1
- package/dist/favesalon-embed/p-c2ecb365.js +0 -1
- package/dist/favesalon-embed/p-c7dea70c.entry.js +0 -1
- package/dist/favesalon-embed/p-f0e14641.entry.js +0 -1
- package/dist/types/types/tmp.d.ts +0 -0
- /package/dist/{collection/types/tmp.js → types/components/chat-conversation/index.d.ts} +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index-3fae868e.js';
|
|
2
|
+
import { d as dayjs_min, H as HttpService } from './services-40a3e622.js';
|
|
3
|
+
import { r as relativeTime } from './relativeTime-cd452e6d.js';
|
|
4
|
+
import './_commonjsHelpers-098d5b27.js';
|
|
5
|
+
import './colors-ea36347a.js';
|
|
6
|
+
|
|
7
|
+
const indexCss = "chat-button{display:inline-block;position:relative}.chat-button--indicator{cursor:pointer;position:absolute;inset:0}.chat-button--counter{background-color:rgb(240, 90, 97);border:1px solid rgb(255, 255, 255);position:absolute;right:-6px;bottom:12px;height:8px;width:8px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.chat-box{background-color:#fff;display:flex;flex-direction:column;position:fixed;inset:0px;z-index:20000}.chat-box--header{display:flex;justify-content:space-between;padding:16px;position:relative}.chat-box--header-title{color:#fff;font-size:20px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:space-between;margin:0}.chat-message{overflow:hidden;clear:both;min-width:240px}.chat-message--meta{display:flex}.chat-message--message{background-color:#F1F1F1;padding:8px 12px;position:relative;float:left;margin-top:6px;-moz-border-radius:0 10px 10px 10px;-webkit-border-radius:0 10px 10px 10px;border-radius:0 10px 10px 10px}.chat-conversation--time{clear:both;color:#999;font-size:75%;padding-top:2px}.chat-message.is-owner .chat-message--content{margin-left:12px}.chat-message.is-guest .chat-message--meta{flex-direction:row-reverse}.chat-message.is-guest .chat-message--message{background-color:#EFF7FF;float:right;margin-right:12px;text-align:right;-moz-border-radius:10px 0 10px 10px;-webkit-border-radius:10px 0 10px 10px;border-radius:10px 0 10px 10px}@media (min-width: 768px){.chat-box{border:1px solid #fff;left:unset;top:unset;right:1px;bottom:0px;height:420px;max-height:90vh;width:600px;-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px;-moz-box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px;-webkit-box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px;box-shadow:rgba(0, 0, 0, 0.1) 0px 0px 24px}.chat-box--header{-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}}";
|
|
8
|
+
|
|
9
|
+
dayjs_min.extend(relativeTime);
|
|
10
|
+
const ChatButton = class {
|
|
11
|
+
constructor(hostRef) {
|
|
12
|
+
registerInstance(this, hostRef);
|
|
13
|
+
this.onSubmitMessage = async () => {
|
|
14
|
+
try {
|
|
15
|
+
const elNewMessage = document.getElementById('chat-form--input');
|
|
16
|
+
await HttpService().sendChatMessage({
|
|
17
|
+
message: elNewMessage.value,
|
|
18
|
+
senderId: this.senderInfo.id,
|
|
19
|
+
chatRoomId: this.chatRoom.uid,
|
|
20
|
+
});
|
|
21
|
+
elNewMessage.value = '';
|
|
22
|
+
}
|
|
23
|
+
catch (error) { }
|
|
24
|
+
};
|
|
25
|
+
this.markMessagesAsRead = async () => {
|
|
26
|
+
try {
|
|
27
|
+
const unreadMessages = (this.chatMessages || []).filter(message => {
|
|
28
|
+
return Boolean(message.unRead) && message.senderId !== this.senderInfo.id;
|
|
29
|
+
});
|
|
30
|
+
if (unreadMessages.length > 0) {
|
|
31
|
+
await HttpService().markMessagesAsRead(this.chatRoom.uid, unreadMessages);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (e) { }
|
|
35
|
+
};
|
|
36
|
+
this.scrollToLastMessage = () => {
|
|
37
|
+
const targetElement = document.getElementById('chat--last-message');
|
|
38
|
+
targetElement && targetElement.scrollIntoView();
|
|
39
|
+
};
|
|
40
|
+
this.renderMessage = (chatMessage) => {
|
|
41
|
+
const { message, senderId, timestamp } = chatMessage;
|
|
42
|
+
const isOwner = this.senderInfo.id === senderId;
|
|
43
|
+
return (h("div", { class: `chat-message ${isOwner ? 'is-owner' : 'is-guest'}` }, h("div", { class: "chat-message--meta" }, h("user-avatar", { size: 40, shortName: String(((isOwner ? this.senderInfo : this.receiverInfo) || {}).fullName || '').charAt(0), avatar: ((isOwner ? this.senderInfo : this.receiverInfo) || {}).avatar }), h("div", { class: "chat-message--content" }, h("div", { class: "chat-message--message" }, message), timestamp && (h("div", { class: "chat-conversation--time" }, dayjs_min(timestamp).format('HH:mm')))))));
|
|
44
|
+
};
|
|
45
|
+
this.renderMessages = () => {
|
|
46
|
+
const isEmpty = (this.chatMessages || []).length === 0;
|
|
47
|
+
return (h("div", { class: "chat-messages" }, !isEmpty && this.chatMessages.map(this.renderMessage), isEmpty && (h("div", { style: { paddingTop: '48px', textAlign: 'center' } }, h("i", { class: "ri-bubble-chart-line", style: { fontSize: '48px' } }), h("div", { style: { color: 'rgba(0, 0, 0, 0.45)', marginTop: '8px' } }, "Enter a message on below to get starting"))), h("div", { id: "chat--last-message" })));
|
|
48
|
+
};
|
|
49
|
+
this.primaryColor = undefined;
|
|
50
|
+
this.accessToken = undefined;
|
|
51
|
+
this.senderId = undefined;
|
|
52
|
+
this.receiverId = undefined;
|
|
53
|
+
this.senderInfo = {};
|
|
54
|
+
this.receiverInfo = {};
|
|
55
|
+
this.chatRoom = undefined;
|
|
56
|
+
this.chatMessages = undefined;
|
|
57
|
+
this.isChatExpanded = undefined;
|
|
58
|
+
}
|
|
59
|
+
componentWillLoad() {
|
|
60
|
+
this.fetchData();
|
|
61
|
+
}
|
|
62
|
+
componentDidLoad() {
|
|
63
|
+
this.scrollToLastMessage();
|
|
64
|
+
this.markMessagesAsRead();
|
|
65
|
+
}
|
|
66
|
+
componentWillUpdate() {
|
|
67
|
+
this.scrollToLastMessage();
|
|
68
|
+
}
|
|
69
|
+
async fetchData() {
|
|
70
|
+
try {
|
|
71
|
+
this.chatRoom = await HttpService().createChatRoom(this.receiverId, this.accessToken);
|
|
72
|
+
if (this.chatRoom) {
|
|
73
|
+
HttpService().fetchChatMessages(this.chatRoom.uid, (messages) => this.chatMessages = messages);
|
|
74
|
+
this.senderInfo = this.chatRoom.members.find(user => user.id === Number(this.senderId));
|
|
75
|
+
this.receiverInfo = this.chatRoom.members.find(user => user.id === Number(this.receiverId));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
catch (e) { }
|
|
79
|
+
}
|
|
80
|
+
renderForm() {
|
|
81
|
+
return (h("div", { style: { display: 'flex', height: '100%' } }, h("input", { id: "chat-form--input", type: "text", class: "form-control", placeholder: "Enter a message...", style: { border: 'none' }, onKeyPress: (evt) => {
|
|
82
|
+
if (evt.key === 'Enter') {
|
|
83
|
+
evt.preventDefault();
|
|
84
|
+
this.onSubmitMessage();
|
|
85
|
+
}
|
|
86
|
+
} }), h("button", { type: "button", class: "btn btn-link", style: {
|
|
87
|
+
textDecoration: 'none',
|
|
88
|
+
display: 'flex',
|
|
89
|
+
height: '100%',
|
|
90
|
+
alignItems: 'center',
|
|
91
|
+
}, onClick: () => this.onSubmitMessage() }, h("i", { class: "ri-send-plane-2-line", style: { color: '#111', fontSize: '24px', lineHeight: '1' } }))));
|
|
92
|
+
}
|
|
93
|
+
render() {
|
|
94
|
+
const unreadMessages = (this.chatMessages || []).filter(message => {
|
|
95
|
+
return Boolean(message.unRead) && message.senderId !== this.senderInfo.id;
|
|
96
|
+
});
|
|
97
|
+
return (h("div", null, h("div", { class: "chat-button--indicator", onClick: () => this.isChatExpanded = true }, unreadMessages.length > 0 && h("span", { class: "chat-button--counter" })), h("div", { class: "chat-box", style: this.isChatExpanded ? {} : { display: 'none' } }, h("div", { class: "chat-box--header", style: {
|
|
98
|
+
backgroundColor: this.primaryColor || '#f05a61',
|
|
99
|
+
} }, h("h3", { class: "chat-box--header-title" }, "Chat"), h("div", { class: "salon-modal--close", onClick: () => this.isChatExpanded = false, style: { position: 'static' } })), h("div", { style: {
|
|
100
|
+
flexShrink: '1',
|
|
101
|
+
flexGrow: '1',
|
|
102
|
+
overflowY: 'auto',
|
|
103
|
+
padding: '16px',
|
|
104
|
+
} }, this.renderMessages()), h("div", { style: {
|
|
105
|
+
height: '50px',
|
|
106
|
+
minHeight: '50px',
|
|
107
|
+
paddingTop: '1',
|
|
108
|
+
borderTop: '1px solid rgb(245, 245, 245)',
|
|
109
|
+
} }, this.renderForm()))));
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
ChatButton.style = indexCss;
|
|
113
|
+
|
|
114
|
+
export { ChatButton as chat_button };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-3fae868e.js';
|
|
2
|
+
export { s as setNonce } from './index-3fae868e.js';
|
|
2
3
|
import './global-e1089ffd.js';
|
|
3
4
|
|
|
4
5
|
/*
|
|
5
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
6
7
|
*/
|
|
7
8
|
const patchBrowser = () => {
|
|
8
9
|
const importMeta = import.meta.url;
|
|
@@ -14,5 +15,5 @@ const patchBrowser = () => {
|
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["salon-latest-reviews",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook",[[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"sortBy":[32],"filterBy":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onChangeFiltering":[64],"onChangeSorting":[64],"onLoadMore":[64],"fetchCategories":[64]}]]],["salon-reviews",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"stats":[32],"totalReviews":[32],"allReviews":[32],"isLoading":[32],"isSorting":[32],"isFiltering":[32],"isLoadingMore":[32],"canLoadMore":[32],"page":[32],"filterBy":[32],"sortBy":[32]}]]],["style-detail",[[0,"style-detail",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"isModalOpen":[32],"currentMediaIdx":[32],"currentMedia":[32],"albumMedias":[32],"similarStyles":[32],"totalComments":[32],"lookbookComments":[32],"isLayoutSetup":[32],"fetchData":[64]}]]],["salon-booking",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-booking-modal",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["
|
|
18
|
+
return bootstrapLazy([["chat-button",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"receiverId":[1,"receiver-id"],"senderInfo":[32],"receiverInfo":[32],"chatRoom":[32],"chatMessages":[32],"isChatExpanded":[32],"fetchData":[64]}]]],["salon-latest-reviews",[[0,"salon-latest-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonReviews":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-lookbook",[[0,"salon-lookbook",{"salonId":[2,"salon-id"],"isLoading":[32],"isLoadingMore":[32],"hideLoadMore":[32],"currentPage":[32],"totalLookbooks":[32],"salonCategories":[32],"salonLookbooks":[32],"sortBy":[32],"filterBy":[32],"isLayoutSetup":[32],"fetchData":[64],"fetchLookbooks":[64],"onChangeFiltering":[64],"onChangeSorting":[64],"onLoadMore":[64],"fetchCategories":[64]}]]],["salon-reviews",[[0,"salon-reviews",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"salonInfo":[32],"stats":[32],"totalReviews":[32],"allReviews":[32],"isLoading":[32],"isSorting":[32],"isFiltering":[32],"isLoadingMore":[32],"canLoadMore":[32],"page":[32],"filterBy":[32],"sortBy":[32]}]]],["style-detail",[[0,"style-detail",{"salonId":[2,"salon-id"],"salonLookbook":[1,"salon-lookbook"],"lookbookInfo":[32],"isModalOpen":[32],"currentMediaIdx":[32],"currentMedia":[32],"albumMedias":[32],"similarStyles":[32],"totalComments":[32],"lookbookComments":[32],"isLayoutSetup":[32],"fetchData":[64]}]]],["salon-booking",[[0,"salon-booking",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-booking-modal",[[0,"salon-booking-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"redirectUrl":[1,"redirect-url"],"isModalOpen":[32]}]]],["salon-gift-card",[[0,"salon-gift-card",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"buttonText":[1,"button-text"],"primaryColor":[1,"primary-color"]}]]],["salon-gift-card-modal",[[0,"salon-gift-card-modal",{"salonId":[2,"salon-id"],"primaryColor":[1,"primary-color"],"isModalOpen":[32]}]]],["salon-ranking",[[0,"salon-ranking",{"ranking":[2],"height":[2],"width":[2]}]]],["salon-services",[[0,"salon-services",{"salonId":[2,"salon-id"],"buttonClass":[1,"button-class"],"salonServices":[32],"isLoading":[32],"fetchData":[64]}]]],["salon-stylists",[[0,"salon-stylists",{"salonId":[2,"salon-id"],"salonStylists":[32],"totalStylists":[32],"page":[32],"isLoading":[32],"isLoadingMore":[32],"canLoadMore":[32],"fetchData":[64],"onLoadMore":[64]}]]],["google-map_5",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[32],"fetchData":[64]}],[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}],[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}],[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]],["user-avatar",[[0,"user-avatar",{"size":[2],"name":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
|
|
18
19
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { r as registerInstance, g as getAssetPath, h } from './index-
|
|
1
|
+
import { r as registerInstance, g as getAssetPath, h } from './index-3fae868e.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
|
-
import { H as HttpService, i as isVideoMedia, B as BusinessHourStatus } from './services-
|
|
3
|
+
import { H as HttpService, i as isVideoMedia, B as BusinessHourStatus } from './services-40a3e622.js';
|
|
4
4
|
import { f as formatWebsiteUrl, a as formatFullAddress } from './utils-e97485e0.js';
|
|
5
5
|
import './_commonjsHelpers-098d5b27.js';
|
|
6
6
|
|
|
7
7
|
const indexCss$4 = "google-map{display:block;width:100%;height:100%}";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
const GoogleMap = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
registerInstance(this, hostRef);
|
|
12
|
+
this.locationName = undefined;
|
|
13
|
+
this.locationAddress = undefined;
|
|
12
14
|
}
|
|
13
15
|
render() {
|
|
14
16
|
const mapPlaceholder = getAssetPath('./assets/map--placeholder.jpeg');
|
|
@@ -48,9 +50,11 @@ GoogleMap.style = indexCss$4;
|
|
|
48
50
|
|
|
49
51
|
const indexCss$3 = "";
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
const SalonInfo = class {
|
|
52
54
|
constructor(hostRef) {
|
|
53
55
|
registerInstance(this, hostRef);
|
|
56
|
+
this.salonId = undefined;
|
|
57
|
+
this.salonInfo = undefined;
|
|
54
58
|
}
|
|
55
59
|
componentWillLoad() {
|
|
56
60
|
this.fetchData();
|
|
@@ -69,9 +73,14 @@ SalonInfo.style = indexCss$3;
|
|
|
69
73
|
|
|
70
74
|
const indexCss$2 = "salon-latest-styles .view--salon-styles--item{width:120px;height:120px}@media (min-width: 1024px){salon-latest-styles .view--salon-styles--item{width:200px;height:200px}}";
|
|
71
75
|
|
|
72
|
-
|
|
76
|
+
const SalonLatestStyles = class {
|
|
73
77
|
constructor(hostRef) {
|
|
74
78
|
registerInstance(this, hostRef);
|
|
79
|
+
this.salonId = undefined;
|
|
80
|
+
this.isLoading = undefined;
|
|
81
|
+
this.withBorder = undefined;
|
|
82
|
+
this.isLoadingState = undefined;
|
|
83
|
+
this.latestStyles = undefined;
|
|
75
84
|
}
|
|
76
85
|
componentDidLoad() {
|
|
77
86
|
this.fetchData();
|
|
@@ -156,9 +165,14 @@ SalonLatestStyles.style = indexCss$2;
|
|
|
156
165
|
|
|
157
166
|
const indexCss$1 = "@media (min-width: 768px){salon-locations .salon-contact--links{overflow:hidden;margin-left:-32px}salon-locations .salon-contact--links-item{float:left;display:flex;flex-direction:row;align-items:center;font-size:16px;min-width:300px;padding-left:32px}salon-locations .salon-contact--links-item:nth-child(2n+1){clear:left}salon-locations .salon-contact--links-item+.salon-contact--links-item{margin-top:8px}}";
|
|
158
167
|
|
|
159
|
-
|
|
168
|
+
const SalonLocations = class {
|
|
160
169
|
constructor(hostRef) {
|
|
161
170
|
registerInstance(this, hostRef);
|
|
171
|
+
this.salonId = undefined;
|
|
172
|
+
this.salonInfo = undefined;
|
|
173
|
+
this.isLoading = undefined;
|
|
174
|
+
this.withBorder = undefined;
|
|
175
|
+
this.salonInfoState = undefined;
|
|
162
176
|
}
|
|
163
177
|
componentWillLoad() {
|
|
164
178
|
if (this.salonInfo) {
|
|
@@ -207,9 +221,14 @@ SalonLocations.style = indexCss$1;
|
|
|
207
221
|
|
|
208
222
|
const indexCss = "salon-schedules .salon-schedules--day{display:flex;flex-direction:row;min-width:240px}@media (min-width: 768px){salon-schedules .salon-schedules--dates{overflow:hidden;margin-left:-32px}salon-schedules .salon-schedules--day{float:left;padding-left:32px}}";
|
|
209
223
|
|
|
210
|
-
|
|
224
|
+
const SalonSchedules = class {
|
|
211
225
|
constructor(hostRef) {
|
|
212
226
|
registerInstance(this, hostRef);
|
|
227
|
+
this.salonId = undefined;
|
|
228
|
+
this.salonInfo = undefined;
|
|
229
|
+
this.isLoading = undefined;
|
|
230
|
+
this.withBorder = undefined;
|
|
231
|
+
this.salonInfoState = undefined;
|
|
213
232
|
}
|
|
214
233
|
componentWillLoad() {
|
|
215
234
|
if (this.salonInfo) {
|