@meetelise/chat 1.20.184 → 1.20.185
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/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -3150,6 +3150,9 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
3150
3150
|
border: none;
|
|
3151
3151
|
cursor: pointer;
|
|
3152
3152
|
}
|
|
3153
|
+
.health-bttn-allow-access {
|
|
3154
|
+
padding-right: 28px;
|
|
3155
|
+
}
|
|
3153
3156
|
`,Mr=u`
|
|
3154
3157
|
#pubnub-chat-container {
|
|
3155
3158
|
position: fixed;
|
|
@@ -3504,7 +3507,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
3504
3507
|
</div>
|
|
3505
3508
|
</div>
|
|
3506
3509
|
</a></div> `}))}
|
|
3507
|
-
</div>`:U``}};Ur.styles=[cn,Dr],kr([ue({attribute:!0})],Ur.prototype,"message",void 0),kr([ue({attribute:!0})],Ur.prototype,"myPubnub",void 0),kr([ue({attribute:!0})],Ur.prototype,"onMount",void 0),kr([le()],Ur.prototype,"loadingPreviews",void 0),kr([le()],Ur.prototype,"parsedMessage",void 0),kr([le()],Ur.prototype,"websitePreviewInfo",void 0),kr([le()],Ur.prototype,"imagesToDisplay",void 0),kr([le()],Ur.prototype,"imageUrlError",void 0),Ur=kr([ae("pubnub-message")],Ur);var qr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Br=class extends re{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.onMount=()=>({}),this.isHealthChat=!1,this.brandColor=Fe,this.onClickExit=()=>({}),this.requiresConsent=!1,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t;this.messageInput.value="",this.autoResizeMessageInput(),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>!!this.requiresConsent&&!!this.requiresConsent&&!this.hasReceivedConsent}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.messages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener((e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading})),this.onMount()}async updated(){this.scrollToChatBottom();const e=document.getElementById("#healthchat-container");e
|
|
3510
|
+
</div>`:U``}};Ur.styles=[cn,Dr],kr([ue({attribute:!0})],Ur.prototype,"message",void 0),kr([ue({attribute:!0})],Ur.prototype,"myPubnub",void 0),kr([ue({attribute:!0})],Ur.prototype,"onMount",void 0),kr([le()],Ur.prototype,"loadingPreviews",void 0),kr([le()],Ur.prototype,"parsedMessage",void 0),kr([le()],Ur.prototype,"websitePreviewInfo",void 0),kr([le()],Ur.prototype,"imagesToDisplay",void 0),kr([le()],Ur.prototype,"imageUrlError",void 0),Ur=kr([ae("pubnub-message")],Ur);var qr=function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a};let Br=class extends re{constructor(){super(...arguments),this.right=0,this.bottom=0,this.top=0,this.left=0,this.onMount=()=>({}),this.isHealthChat=!1,this.brandColor=Fe,this.onClickExit=()=>({}),this.requiresConsent=!1,this.messages=[],this.isLoadingMessages=!1,this.hasReceivedConsent=!1,this.privacyPolicyUrl="http://bit.ly/me_privacy_policy",this.websitePreviewMapping={},this.sendMessage=async e=>{var t;this.messageInput.value="",this.autoResizeMessageInput(),await(null===(t=this.myPubnub)||void 0===t?void 0:t.sendMessage(e))},this.scrollToChatBottom=()=>{this.messageBody.scrollTo({top:this.messageBody.scrollHeight-this.messageBody.clientHeight,behavior:"smooth"})},this.autoResizeMessageInput=()=>{this.messageInput.style.height="auto",this.messageInput.style.height=this.messageInput.scrollHeight+"px"},this.needsConsent=()=>!!this.requiresConsent&&!!this.requiresConsent&&!this.hasReceivedConsent}firstUpdated(){var e,t;this.messages=(null===(e=this.myPubnub)||void 0===e?void 0:e.messages)||[],null===(t=this.myPubnub)||void 0===t||t.addChatListener((e=>{this.messages=e.messages,this.isLoadingMessages=e.isLoading})),this.onMount()}async updated(){this.scrollToChatBottom();try{const e=document.getElementById("#healthchat-container");if(!e)return;e.focus()}catch(e){console.error(e)}}render(){var e,t,n;if(!this.buildingSlug)return U``;let i={};if(i=ln()?{top:void 0,bottom:0,left:void 0,right:0}:{top:isNaN(this.top)?void 0:`${this.top}px`,bottom:isNaN(this.bottom)?"130px":`${this.bottom}px`,left:isNaN(this.left)?void 0:`${this.left}px`,right:isNaN(this.right)?"18px":`${this.right}px`},this.isHealthChat)return U`
|
|
3508
3511
|
<div
|
|
3509
3512
|
id="healthchat-container"
|
|
3510
3513
|
class=${fe({"pubnub-container__mobile":ln(),"healthchat-container__desktop":!ln()})}
|
|
@@ -3600,6 +3603,7 @@ otherwise there's some empty space at the bottom of the button, which interferes
|
|
|
3600
3603
|
></textarea>
|
|
3601
3604
|
<button
|
|
3602
3605
|
id="healthcare-send-message-bttn"
|
|
3606
|
+
class=${fe({"health-bttn-allow-access":ln()})}
|
|
3603
3607
|
@click=${()=>this.sendMessage(this.messageInput.value)}
|
|
3604
3608
|
>
|
|
3605
3609
|
${ln()?Bi:qi}
|
|
@@ -126,9 +126,14 @@ export class PubnubChat extends LitElement {
|
|
|
126
126
|
|
|
127
127
|
async updated(): Promise<void> {
|
|
128
128
|
this.scrollToChatBottom();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
try {
|
|
130
|
+
const modal = document.getElementById("#healthchat-container");
|
|
131
|
+
if (!modal) return;
|
|
132
|
+
modal.focus();
|
|
133
|
+
} catch (e) {
|
|
134
|
+
// eslint-disable-next-line no-console
|
|
135
|
+
console.error(e);
|
|
136
|
+
}
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
autoResizeMessageInput = (): void => {
|
|
@@ -304,6 +309,9 @@ export class PubnubChat extends LitElement {
|
|
|
304
309
|
></textarea>
|
|
305
310
|
<button
|
|
306
311
|
id="healthcare-send-message-bttn"
|
|
312
|
+
class=${classMap({
|
|
313
|
+
["health-bttn-allow-access"]: isMobile(),
|
|
314
|
+
})}
|
|
307
315
|
@click=${() => this.sendMessage(this.messageInput.value)}
|
|
308
316
|
>
|
|
309
317
|
${isMobile() ? SendMessageIconBlackLarge : SendMessageIconBlack}
|