favesalon-embed 1.0.9 → 1.0.11
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/activate-form.entry.js +1 -1
- package/dist/favesalon-embed/app-globals-74127f4b.js +7 -0
- package/dist/favesalon-embed/change-password-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-box.entry.js +1 -1
- package/dist/favesalon-embed/chat-button.entry.js +49 -35
- package/dist/favesalon-embed/chat-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-messages.entry.js +2 -2
- package/dist/favesalon-embed/chat-rooms.entry.js +1 -1
- package/dist/favesalon-embed/favesalon-embed.esm.js +4 -4
- package/dist/favesalon-embed/google-map.entry.js +1 -1
- package/dist/favesalon-embed/index-888e99e3.js +3371 -0
- package/dist/favesalon-embed/login-form.entry.js +1 -1
- package/dist/favesalon-embed/notify-sounds.entry.js +2 -2
- package/dist/favesalon-embed/register-form.entry.js +1 -1
- package/dist/favesalon-embed/reset-password-form.entry.js +1 -1
- package/dist/favesalon-embed/salon-booking-modal.entry.js +1 -1
- package/dist/favesalon-embed/salon-booking.entry.js +1 -1
- package/dist/favesalon-embed/salon-gift-card-modal.entry.js +1 -1
- package/dist/favesalon-embed/salon-gift-card.entry.js +1 -1
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-styles.entry.js +1 -1
- package/dist/favesalon-embed/salon-locations.entry.js +1 -1
- package/dist/favesalon-embed/salon-lookbook.entry.js +1 -1
- package/dist/favesalon-embed/salon-ranking.entry.js +1 -1
- package/dist/favesalon-embed/salon-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
- package/dist/favesalon-embed/salon-services.entry.js +1 -1
- package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
- package/dist/favesalon-embed/style-detail.entry.js +1 -1
- package/dist/favesalon-embed/user-avatar.entry.js +1 -1
- package/dist/favesalon-embed/user-form.entry.js +1 -1
- package/dist/types/components/chat-button/index.d.ts +6 -2
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
@@ -1,44 +1,51 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
import { H as HttpService } from './services-d71be591.js';
|
|
4
4
|
import './_commonjsHelpers-a4f66ccd.js';
|
|
5
5
|
|
|
6
|
-
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); chat-button{display: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;top:0px;height:8px;width:8px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.chat-box{font-family:'Roboto', sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-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.25) 0px 0px 24px;-webkit-box-shadow:rgba(0, 0, 0, 0.25) 0px 0px 24px;box-shadow:rgba(0, 0, 0, 0.25) 0px 0px 24px;background-color:#fff;display:flex;flex-direction:column;position:fixed;right:1px;bottom:0px;z-index:20000;font-size:16px;text-align:left;color:#141414;width:80vw;height:480px;max-height:80vh}.chat-box--header{display:flex;justify-content:space-between;padding:16px;position:relative;-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}.chat-box--title{color:#fff;font-size:24px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:space-between;margin:0}.chat-box--close{cursor:pointer;display:block;position:absolute;z-index:1000;top:50%;right:0;width:40px;height:40px;transform:translate(0, -50%);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}@media (min-width: 768px){.chat-box{border:1px solid #fff;height:480px;max-height:90vh;width:560px}.chat-box--header{-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}}";
|
|
6
|
+
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); chat-button{display: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;top:0px;height:8px;width:8px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.chat-box{font-family:'Roboto', sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-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.25) 0px 0px 24px;-webkit-box-shadow:rgba(0, 0, 0, 0.25) 0px 0px 24px;box-shadow:rgba(0, 0, 0, 0.25) 0px 0px 24px;background-color:#fff;display:flex;flex-direction:column;position:fixed;right:1px;bottom:0px;z-index:20000;font-size:16px;text-align:left;color:#141414;width:80vw;height:480px;max-height:80vh}.chat-box--header{display:flex;justify-content:space-between;padding:16px;position:relative;-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}.chat-box--title{color:#fff;font-size:24px;font-weight:600;line-height:1;display:flex;align-items:center;justify-content:space-between;margin:0}.chat-box--close:hover{opacity:0.85}.chat-box--close{cursor:pointer;display:block;position:absolute;z-index:1000;top:50%;right:0;width:40px;height:40px;transform:translate(0, -50%);background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}.chat-box--help{font-family:'Roboto', sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:fixed;right:16px;bottom:16px;z-index:20000}.chat-box--help-icon{background-color:rgba(0, 21, 41, 1);cursor:pointer;color:#fff;height:50px;width:50px;display:flex;align-items:center;justify-content:center;-moz-border-radius:50px;-webkit-border-radius:50px;border-radius:50px}.chat-box--help-icon:hover{background-color:rgba(0, 21, 41, 0.85)}.chat-box--help-icon svg{height:30px;width:30px}.chat-box--help-close:hover{opacity:0.85}.chat-box--help-close{cursor:pointer;display:block;position:absolute;z-index:1000;top:6px;right:6px;width:24px;height:24px;background-size:contain;background-repeat:no-repeat;background-position:center center;background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAAXNSR0IArs4c6QAAA3hJREFUaAXlm8+K00Acx7MiCIJH/yw+gA9g25O49SL4AO3Bp1jw5NvktC+wF88qevK4BU97EmzxUBCEolK/n5gp3W6TTJPfpNPNF37MNsl85/vN/DaTmU6PknC4K+pniqeKJ3k8UnkvDxXJzzy+q/yaxxeVHxW/FNHjgRSeKt4rFoplzaAuHHDBGR2eS9G54reirsmienDCTRt7xwsp+KAoEmt9nLaGitZxrBbPFNaGfPloGw2t4JVamSt8xYW6Dg1oCYo3Yv+rCGViV160oMkcd8SYKnYV1Nb1aEOjCe6L5ZOiLfF120EjWhuBu3YIZt1NQmujnk5F4MgOpURzLfAwOBSTmzp3fpDxuI/pabxpqOoz2r2HLAb0GMbZKlNV5/Hg9XJypguryA7lPF5KMdTZQzHjqxNPhWhzIuAruOl1eNqKEx1tSh5rfbxdw7mOxCq4qS68ZTjKS1YVvilu559vWvFHhh4rZrdyZ69Vmpgdj8fJbDZLJpNJ0uv1cnr/gjrUhQMuI+ANjyuwftQ0bbL6Erp0mM/ny8Fg4M3LtdRxgMtKl3jwmIHVxYXChFy94/Rmpa/pTbNUhstKV+4Rr8lLQ9KlUvJKLyG8yvQ2s9SBy1Jb7jV5a0yapfF6apaZLjLLcWtd4sNrmJUMHyM+1xibTjH82Zh01TNlhsrOhdKTe00uAzZQmN6+KW+sDa/JD2PSVQ873m29yf+1Q9VDzfEYlHi1G5LKBBWZbtEsHbFwb1oYDwr1ZiF/2bnCSg1OBE/pfr9/bWx26UxJL3ONPISOLKUvQza0LZUxSKyjpdTGa/vDEr25rddbMM0Q3O6Lx3rqFvU+x6UrRKQY7tyrZecmD9FODy8uLizTmilwNj0kraNcAJhOp5aGVwsAGD5VmJBrWWbJSgWT9zrzWepQF47RaGSiKfeGx6Szi3gzmX/HHbihwBser4B9UJYpFBNX4R6vTn3VQnez0SymnrHQMsRYGTr1dSk34ljRqS/EMd2pLQ8YBp3a1PLfcqCpo8gtHkZFHKkTX6fs3MY0blKnth66rKCnU0VRGu37ONrQaA4eZDFtWAu2fXj9zjFkxTBOo8F7t926gTp/83Kyzzcy2kZD6xiqxTYnHLRFm3vHiRSwNSjkz3hoIzo8lCKWUlg/YtGs7tObunDAZfpDLbfEI15zsEIY3U/x/gHHc/G1zltnAgAAAABJRU5ErkJggg==')}.chat-box--help-content-wrapper{background-color:#fff;border:1px solid #f5f5f5;width:290px;padding:24px;position:absolute;bottom:100%;right:-8px;margin-bottom:16px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;-moz-box-shadow:rgba(0, 0, 0, 0.15) 0px 0px 24px;-webkit-box-shadow:rgba(0, 0, 0, 0.15) 0px 0px 24px;box-shadow:rgba(0, 0, 0, 0.15) 0px 0px 24px}.chat-box--help-content{cursor:pointer;display:flex;align-items:center}.chat-box--help-content:hover{opacity:0.85}.chat-box--help-content:before{content:' ';position:absolute;top:100%;right:22px;border-style:solid;border-width:10px;border-color:#f5f5f5 transparent transparent transparent}.chat-box--help-content:after{content:' ';position:absolute;margin-top:-1px;top:100%;right:22px;border-style:solid;border-width:10px;border-color:#fff transparent transparent transparent}.chat-box--help-avatar{margin-right:16px;height:48px;min-width:48px;max-width:48px;overflow:hidden;-moz-border-radius:48px;-webkit-border-radius:48px;border-radius:48px}.chat-box--help-avatar img{height:100%;width:100%;object-fit:cover}.chat-box--help-text{color:#141414;font-size:16px;line-height:1.3;text-align:left}@media (min-width: 768px){.chat-box{border:1px solid #fff;height:480px;max-height:90vh;width:560px}.chat-box--header{-moz-border-radius:8px 8px 0px 0px;-webkit-border-radius:8px 8px 0px 0px;border-radius:8px 8px 0px 0px}}";
|
|
7
7
|
|
|
8
8
|
const ChatButton = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.primaryColor = undefined;
|
|
12
12
|
this.receiverId = undefined;
|
|
13
|
+
this.receiverAvatar = undefined;
|
|
13
14
|
this.accessToken = undefined;
|
|
14
15
|
this.senderId = undefined;
|
|
15
16
|
this.senderIdState = undefined;
|
|
16
17
|
this.accessTokenState = undefined;
|
|
17
|
-
this.isChatVerificationExpanded = undefined;
|
|
18
18
|
this.senderInfo = {};
|
|
19
19
|
this.receiverInfo = {};
|
|
20
20
|
this.chatRoom = {};
|
|
21
21
|
this.chatMessages = undefined;
|
|
22
|
+
this.isChatIconVisible = undefined;
|
|
23
|
+
this.isChatHelpVisible = undefined;
|
|
22
24
|
this.isChatExpanded = undefined;
|
|
25
|
+
this.isChatVerificationExpanded = undefined;
|
|
23
26
|
this.isChatExpandedOnScroll = undefined;
|
|
24
27
|
}
|
|
25
28
|
componentWillLoad() {
|
|
26
29
|
this.senderIdState = this.senderId;
|
|
27
30
|
this.accessTokenState = this.accessToken;
|
|
28
31
|
this.senderIdState && this.accessTokenState && this.fetchData();
|
|
32
|
+
setTimeout(() => this.onSetupChat(), 500);
|
|
29
33
|
}
|
|
30
|
-
|
|
31
|
-
const {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
this.
|
|
34
|
+
onSetupChat() {
|
|
35
|
+
const { hostname, pathname } = window.location || {};
|
|
36
|
+
const isHomepage = hostname === 'localhost' || hostname.indexOf('192.168.2') > -1 || !pathname || pathname === '/' || pathname === '/index.html';
|
|
37
|
+
if (isHomepage) {
|
|
38
|
+
this.isChatIconVisible = true;
|
|
39
|
+
this.isChatHelpVisible = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
onClickChat() {
|
|
43
|
+
this.isChatHelpVisible = false;
|
|
44
|
+
if (this.senderIdState && this.accessTokenState) {
|
|
45
|
+
this.isChatExpanded = true;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.isChatVerificationExpanded = true;
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
51
|
async fetchData() {
|
|
@@ -55,33 +62,40 @@ const ChatButton = class {
|
|
|
55
62
|
onVerificationSuccess(user) {
|
|
56
63
|
if (user.id && user.accessToken) {
|
|
57
64
|
this.isChatExpanded = true;
|
|
65
|
+
this.isChatVerificationExpanded = false;
|
|
58
66
|
this.senderIdState = String(user.id);
|
|
59
67
|
this.accessTokenState = user.accessToken;
|
|
60
68
|
setTimeout(() => this.fetchData(), 350);
|
|
61
69
|
}
|
|
62
70
|
}
|
|
63
71
|
render() {
|
|
64
|
-
if (this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
if (this.isChatIconVisible || this.isChatHelpVisible) {
|
|
73
|
+
if (this.isChatExpanded) {
|
|
74
|
+
const unreadMessages = (this.chatMessages || []).filter(message => {
|
|
75
|
+
return Boolean(message.unRead) && message.senderId !== this.senderInfo.id;
|
|
76
|
+
});
|
|
77
|
+
return (h("div", null, unreadMessages.length > 0 && h("notify-sounds", null), h("div", { class: "chat-button--indicator" }, unreadMessages.length > 0 && h("span", { class: "chat-button--counter" })), h("div", { class: "chat-box" }, h("div", { class: "chat-box--header", style: {
|
|
78
|
+
backgroundColor: this.primaryColor || '#f05a61',
|
|
79
|
+
} }, h("h3", { class: "chat-box--title" }, "Chat"), h("div", { style: { position: 'relative' } }, h("div", { class: "chat-box--close", onClick: () => this.isChatExpanded = false }))), h("div", { style: {
|
|
80
|
+
flexShrink: '1',
|
|
81
|
+
flexGrow: '1',
|
|
82
|
+
overflowY: 'auto',
|
|
83
|
+
padding: '16px',
|
|
84
|
+
} }, h("chat-messages", { sender: this.senderInfo, receiver: this.receiverInfo, messages: this.chatMessages || [], "chat-room-id": this.chatRoom.uid })), h("div", { style: { borderTop: `1px solid ${Colors.Gray02}` } }, h("chat-form", { "sender-id": this.senderInfo.id ? Number(this.senderInfo.id) : null, "chat-room-id": this.chatRoom.uid })))));
|
|
85
|
+
}
|
|
86
|
+
if (this.isChatVerificationExpanded) {
|
|
87
|
+
return (h("div", null, h("div", { class: "chat-button--indicator" }), h("div", { class: "chat-box" }, h("div", { class: "chat-box--header", style: {
|
|
88
|
+
backgroundColor: this.primaryColor || '#f05a61',
|
|
89
|
+
} }, h("h3", { class: "chat-box--title" }, "Chat"), h("div", { style: { position: 'relative' } }, h("div", { class: "chat-box--close", onClick: () => this.isChatVerificationExpanded = false }))), h("div", { style: {
|
|
90
|
+
flexShrink: '1',
|
|
91
|
+
flexGrow: '1',
|
|
92
|
+
overflowY: 'auto',
|
|
93
|
+
padding: '16px',
|
|
94
|
+
} }, h("user-form", { onSuccess: user => this.onVerificationSuccess(user) })))));
|
|
95
|
+
}
|
|
96
|
+
return (h("div", null, h("div", { class: "chat-button--indicator", onClick: () => this.onClickChat() }), h("div", { class: "chat-box--help" }, h("div", { class: "chat-box--help-icon", onClick: () => this.onClickChat() }, h("svg", { width: "64", height: "64", viewBox: "0 0 64 64", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M5.33325 23.9833C5.33325 15.156 12.4707 8 21.335 8H42.6647C51.5023 8 58.6666 15.1861 58.6666 23.9833V56H21.335C12.4975 56 5.33325 48.8139 5.33325 40.0168V23.9833ZM53.3333 50.6667V23.9833C53.3333 18.121 48.5463 13.3333 42.6647 13.3333H21.335C15.4255 13.3333 10.6666 18.0922 10.6666 23.9833V40.0168C10.6666 45.8789 15.4536 50.6667 21.335 50.6667H53.3333ZM37.3333 29.3333H42.6666V34.6667H37.3333V29.3333ZM21.3333 29.3333H26.6666V34.6667H21.3333V29.3333Z", fill: "currentColor" }))), this.isChatHelpVisible && (h("div", { class: "chat-box--help-content-wrapper" }, h("div", { class: "chat-box--help-close", onClick: () => this.isChatHelpVisible = false }), h("div", { class: "chat-box--help-content", onClick: () => this.onClickChat() }, this.receiverAvatar && (h("div", { class: "chat-box--help-avatar" }, h("img", { src: this.receiverAvatar }))), h("div", { class: "chat-box--help-text" }, "Hi there, have a question? Text us here.")))))));
|
|
76
97
|
}
|
|
77
|
-
return
|
|
78
|
-
backgroundColor: this.primaryColor || '#f05a61',
|
|
79
|
-
} }, h("h3", { class: "chat-box--title" }, "Chat"), h("div", { style: { position: 'relative' } }, h("div", { class: "chat-box--close", onClick: () => this.isChatVerificationExpanded = false }))), h("div", { style: {
|
|
80
|
-
flexShrink: '1',
|
|
81
|
-
flexGrow: '1',
|
|
82
|
-
overflowY: 'auto',
|
|
83
|
-
padding: '16px',
|
|
84
|
-
} }, h("user-form", { onSuccess: user => this.onVerificationSuccess(user) })))));
|
|
98
|
+
return null;
|
|
85
99
|
}
|
|
86
100
|
};
|
|
87
101
|
ChatButton.style = indexCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { d as dayjs_min, H as HttpService, t as timeFormatAmPm } from './services-d71be591.js';
|
|
3
3
|
import { l as lodash } from './lodash-d5526b38.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
@@ -29,7 +29,7 @@ const ChatMessages = class {
|
|
|
29
29
|
this.renderMessage = (chatMessage) => {
|
|
30
30
|
const { message, senderId, timestamp } = chatMessage;
|
|
31
31
|
const isOwner = this.sender.id === senderId;
|
|
32
|
-
return (h("div", { class: `chat-message ${isOwner ? 'is-
|
|
32
|
+
return (h("div", { class: `chat-message ${isOwner ? 'is-guest' : 'is-owner'}` }, h("div", { class: "chat-message--meta" }, h("user-avatar", { size: 40, shortName: String(((isOwner ? this.sender : this.receiver) || {}).fullName || '').charAt(0), avatar: ((isOwner ? this.sender : this.receiver) || {}).avatar }), h("div", { class: "chat-message--content" }, h("div", { class: "chat-message--title" }, message), timestamp && (h("div", { class: "chat-message--time" }, dayjs_min(timestamp).format(timeFormatAmPm)))))));
|
|
33
33
|
};
|
|
34
34
|
this.sender = {};
|
|
35
35
|
this.receiver = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
2
|
import { l as lodash } from './lodash-d5526b38.js';
|
|
3
3
|
import { C as Colors } from './colors-ea36347a.js';
|
|
4
4
|
import { H as HttpService } from './services-d71be591.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
1
|
+
import { B as BUILD, c as consoleDevInfo, p as plt, w as win, H, d as doc, N as NAMESPACE, a as promiseResolve, b as bootstrapLazy } from './index-888e99e3.js';
|
|
2
|
+
export { s as setNonce } from './index-888e99e3.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-74127f4b.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -144,5 +144,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
144
144
|
|
|
145
145
|
patchBrowser().then(options => {
|
|
146
146
|
globalScripts();
|
|
147
|
-
return bootstrapLazy([["chat-button",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"receiverId":[1,"receiver-id"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"senderIdState":[32],"accessTokenState":[32],"
|
|
147
|
+
return bootstrapLazy([["chat-button",[[0,"chat-button",{"primaryColor":[1,"primary-color"],"receiverId":[1,"receiver-id"],"receiverAvatar":[1,"receiver-avatar"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"senderIdState":[32],"accessTokenState":[32],"senderInfo":[32],"receiverInfo":[32],"chatRoom":[32],"chatMessages":[32],"isChatIconVisible":[32],"isChatHelpVisible":[32],"isChatExpanded":[32],"isChatVerificationExpanded":[32],"isChatExpandedOnScroll":[32],"onSetupChat":[64],"onClickChat":[64],"fetchData":[64],"onVerificationSuccess":[64]}]]],["chat-box",[[0,"chat-box",{"primaryColor":[1,"primary-color"],"accessToken":[1,"access-token"],"senderId":[1,"sender-id"],"salonId":[1,"salon-id"],"chatRooms":[32],"activeRoom":[32],"fetchData":[64]}]]],["salon-info",[[0,"salon-info",{"salonId":[2,"salon-id"],"salonInfo":[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]}]]],["user-form",[[0,"user-form",{"onSuccess":[16],"type":[32],"currentUser":[32]}]]],["chat-rooms",[[0,"chat-rooms",{"senderId":[2,"sender-id"],"salonId":[2,"salon-id"],"chatRooms":[16],"clients":[16],"activeRoom":[16],"accessToken":[1,"access-token"],"onClickRoom":[16],"keyword":[32]}]]],["salon-locations",[[0,"salon-locations",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}]]],["notify-sounds",[[0,"notify-sounds"]]],["salon-latest-styles",[[0,"salon-latest-styles",{"salonId":[2,"salon-id"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"isLoadingState":[32],"latestStyles":[32],"fetchData":[64]}]]],["salon-schedules",[[0,"salon-schedules",{"salonId":[2,"salon-id"],"salonInfo":[1,"salon-info"],"isLoading":[4,"is-loading"],"withBorder":[4,"with-border"],"salonInfoState":[32]}]]],["chat-messages",[[0,"chat-messages",{"sender":[16],"receiver":[16],"messages":[16],"chatRoomId":[1,"chat-room-id"]}]]],["activate-form",[[0,"activate-form",{"username":[1],"password":[1],"onSuccess":[16],"isSubmitting":[32],"error":[32],"confirmCode":[32],"onSubmit":[64],"resendCode":[64]}]]],["change-password-form",[[0,"change-password-form",{"username":[1],"onSuccess":[16],"isSubmitting":[32],"error":[32],"confirmCode":[32],"password":[32],"onSubmit":[64],"resendCode":[64]}]]],["chat-form",[[0,"chat-form",{"senderId":[2,"sender-id"],"chatRoomId":[1,"chat-room-id"]}]]],["google-map",[[0,"google-map",{"locationName":[1,"location-name"],"locationAddress":[1,"location-address"]}]]],["login-form",[[0,"login-form",{"onSuccess":[16],"isSubmitting":[32],"error":[32],"username":[32],"password":[32],"onSubmit":[64]}]]],["register-form",[[0,"register-form",{"onSuccess":[16],"isSubmitting":[32],"error":[32],"firstName":[32],"lastName":[32],"email":[32],"phone":[32],"password":[32],"onSubmit":[64]}]]],["reset-password-form",[[0,"reset-password-form",{"onSuccess":[16],"isSubmitting":[32],"error":[32],"username":[32],"onSubmit":[64]}]]],["user-avatar",[[0,"user-avatar",{"size":[2],"name":[1],"description":[1],"nameStyle":[16],"shortName":[1,"short-name"],"avatar":[1]}]]]], options);
|
|
148
148
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, g as getAssetPath, h } from './index-
|
|
1
|
+
import { r as registerInstance, g as getAssetPath, h } from './index-888e99e3.js';
|
|
2
2
|
import { C as Colors } from './colors-ea36347a.js';
|
|
3
3
|
|
|
4
4
|
const indexCss = "google-map{display:block;width:100%;height:100%}";
|