@meetelise/chat 1.20.57 → 1.20.58
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 +1 -1
- package/public/dist/index.js +36 -37
- package/src/MEChat.ts +2 -2
- package/src/WebComponent/me-chat.ts +51 -49
package/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -2927,9 +2927,8 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2927
2927
|
${this.isCallToActionWindowOpen()?"":this.renderActionPills()}
|
|
2928
2928
|
</div>
|
|
2929
2929
|
`}};Gi.styles=li,Hi([ue({type:Boolean})],Gi.prototype,"isMobile",void 0),Hi([ue({type:Boolean})],Gi.prototype,"isMinimized",void 0),Hi([ue({type:Boolean})],Gi.prototype,"isFirstMount",void 0),Hi([ue()],Gi.prototype,"backgroundColor",void 0),Hi([ue()],Gi.prototype,"textColor",void 0),Hi([ue({type:Boolean})],Gi.prototype,"isMini",void 0),Hi([ue({attribute:!1})],Gi.prototype,"autoOpenChatWidget",void 0),Hi([ue()],Gi.prototype,"phoneNumber",void 0),Hi([ue({attribute:!0})],Gi.prototype,"chatId",void 0),Hi([ue({attribute:!0})],Gi.prototype,"chatCallUsHeader",void 0),Hi([ue({attribute:!1})],Gi.prototype,"buildingId",void 0),Hi([ue({attribute:!0})],Gi.prototype,"buildingSlug",void 0),Hi([ue({attribute:!0})],Gi.prototype,"orgSlug",void 0),Hi([ue({attribute:!0})],Gi.prototype,"sgtUrl",void 0),Hi([ue({attribute:!0})],Gi.prototype,"buildingABTestType",void 0),Hi([ue({attribute:!0})],Gi.prototype,"featureFlagShowDropdown",void 0),Hi([ue({attribute:!1})],Gi.prototype,"leadSources",void 0),Hi([ue({attribute:!0})],Gi.prototype,"currentLeadSource",void 0),Hi([ue({attribute:!0})],Gi.prototype,"escortedToursLink",void 0),Hi([ue({attribute:!0})],Gi.prototype,"virtualToursLink",void 0),Hi([ue({type:Boolean})],Gi.prototype,"hasCallUsEnabled",void 0),Hi([ue({type:Boolean})],Gi.prototype,"hasChatEnabled",void 0),Hi([ue({type:Boolean})],Gi.prototype,"hasEmailEnabled",void 0),Hi([ue({type:Boolean})],Gi.prototype,"hasSSTEnabled",void 0),Hi([ue({type:Boolean})],Gi.prototype,"hasTextUsEnabled",void 0),Hi([ue({attribute:!1})],Gi.prototype,"layoutOptions",void 0),Hi([ue({attribute:!1})],Gi.prototype,"unitOptions",void 0),Hi([ue({attribute:!1})],Gi.prototype,"tourTypeOptions",void 0),Hi([ue({attribute:!1})],Gi.prototype,"onChatTapped",void 0),Hi([ue({attribute:!1})],Gi.prototype,"launcherStyles",void 0),Hi([le()],Gi.prototype,"isEmailWindowOpen",void 0),Hi([le()],Gi.prototype,"isCallUsWindowOpen",void 0),Hi([le()],Gi.prototype,"isSSTWindowOpen",void 0),Hi([le()],Gi.prototype,"isTextUsWindowOpen",void 0),Gi=Hi([ae("meetelise-launcher")],Gi);var Wi=n(3379),Qi=n.n(Wi),zi=n(7795),Vi=n.n(zi),Xi=n(569),Yi=n.n(Xi),Ki=n(3565),Zi=n.n(Ki),$i=n(9216),er=n.n($i),tr=n(4589),nr=n.n(tr),ir=n(3631),rr={};async function or(e){try{return(await t().get(`https://app.meetelise.com/platformApi/webchat/${e}/lead-sources`)).data}catch(e){return[]}}rr.styleTagTransform=nr(),rr.setAttributes=Zi(),rr.insert=Yi().bind(null,"head"),rr.domAPI=Vi(),rr.insertStyleElement=er(),Qi()(ir.Z,rr),ir.Z&&ir.Z.locals&&ir.Z.locals;var ar,sr=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 ur=ar=class extends re{constructor(){super(...arguments),this.buildingSlug="",this.orgSlug="",this.themeId="Glass",this.useMiniWidget=!0,this.launcherStyles={},this.popup=null,this.theme=ii(),this.chatId="",this.analytics=null,this.isMobile=xn(),this.launcher=null,this.building=null,this.buildingABTestType=null,this.leadSources=null,this.currentLeadSource=null,this.featureFlagShowDropdown=Cn.always,this.hasMounted=!1,this.hideLauncher=!1,this.isLoading=!0,this.talkjsPopupElement=null,this.yardiDNIScriptInterval=null,this.launcherRef=Ae(),this.initializeInstanceVariables=async()=>{await this.setBuildingDerivedInfo(),await this.initializeLaunchJS(),this.attachOnClickToLauncher(),this.isLoading=!1},this.setBuildingDerivedInfo=async()=>{var e,t;if(!this.buildingSlug||!this.orgSlug)return;const[n,i,r,o,a]=await Promise.all([oi(this.orgSlug,this.buildingSlug),si(this.buildingSlug),or(this.buildingSlug),Fn(this.buildingSlug),ui(this.buildingSlug,document.referrer)]);this.building=n,this.buildingABTestType=null!==(e=null==i?void 0:i.abTestType)&&void 0!==e?e:"",this.leadSources=r,this.featureFlagShowDropdown=o,this.currentLeadSource=a,this.currentLeadSource&&(this.leadSources.includes(this.currentLeadSource)||this.leadSources.push(this.currentLeadSource)),bn(this.building.id),this.chatId=function(e,t){const n=Yn(e,t),i=localStorage.getItem(n);return i&&!function(e,t){const n=Kn(e,t),i=localStorage.getItem(n)||Xn(e,t),r=new Date(new Date(i).getTime()+216e5);return new Date>r}(e,t)?i:Vn(e,t)}(this.orgSlug,this.buildingSlug),this.avatarSrc=this.avatarSrc||this.building.avatarSrc,this.theme=ii(null!==(t=this.themeId)&&void 0!==t?t:this.building.themeId),this.analytics=new Bn(this.orgSlug,this.buildingSlug,this.chatId),this.analytics.ping("webchat_heartbeat")},this.initializeLaunchJS=async()=>{var e;if(!this.building||!this.theme)return;if(this.popup&&this.launcher)return;const[t,n,i,r]=await Promise.all([this.building,this.theme,this.avatarSrc,ar.session]);if(t.conversationMaintenanceMode)return new Promise((()=>{console.warn("MeetElise Chat is in maintenance mode. Chat icon will not appear.")}));await this.configureTalkJSPopup(t,n,r,i),this.configureLauncherElement(),null===(e=this.analytics)||void 0===e||e.ping("load"),this.yardiDNIScriptInterval=setInterval((()=>this.pollForYardiCampaignSource()),1e3),setTimeout(clearInterval,15e3,this.yardiDNIScriptInterval)},this.configureLauncherElement=()=>{this.popup&&this.launcherRef.value&&(this.launcher=this.launcherRef.value)},this.configureTalkJSPopup=async(e,t,n,i)=>{var r;const o=n.createPopup(ri(n,e,t,i||e.avatarSrc,this.chatId,this.isMobile),{launcher:"never",showCloseInHeader:!0,messageField:{placeholder:"Ask a question..."}});await o.mount({show:!1}),o.on("close",(()=>{this.hideLauncher=!1}));const a=document.querySelector(".__talkjs_popup");if(this.talkjsPopupElement=a,!a)throw new Error("Failed to find chat window");a.classList.add("meetelise-chat","pane"),this.isMobile||a.classList.add("launcher__desktop"),a.style.zIndex="99999999999",this.popup=o;const s=sessionStorage.getItem("autoOpenedTimestamp"),u=!s||s&&nn(on(s));e.autoOpenChatWidget&&u&&!xn()&&(this.popup.show(),this.hideLauncher=!0,this.hasMounted=!0,sessionStorage.setItem("autoOpenedTimestamp",Zt(function(e,t){Pe(2,arguments);var n=Ke(t);return Ze(e,6e4*n)}(new Date,15))),null===(r=this.analytics)||void 0===r||r.ping("autoOpen"))},this.firstUpdated=()=>{this.initializeInstanceVariables()},this.handleContactClicked=e=>{var t,n;null===(t=this.popup)||void 0===t||t.hide(),this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickEmailOption(e)},this.handleTourClicked=e=>{var t,n;null===(t=this.popup)||void 0===t||t.hide(),this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickSSTOption(e)},this.handleContactTabClicked=e=>{var t,n;null===(t=this.popup)||void 0===t||t.hide(),this.hideLauncher=!1,null===(n=this.launcherRef.value)||void 0===n||n.onClickPhoneOption(e)},this.adjustTopHeaderContactCoords=()=>{var e;if(this.talkjsPopupElement){const t=function(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}(this.talkjsPopupElement),n=null===(e=this.shadowRoot)||void 0===e?void 0:e.getElementById("contactTabPopup");if(!n)return;n.style.left=`${t.left+20}px`,n.style.top=t.top-50+"px"}},this.attachOnClickToLauncher=()=>{const e=this.launcherRef.value;e&&(e.onChatTapped=async()=>{var e;this.popup&&(this.popup.show(),null===(e=this.analytics)||void 0===e||e.ping("open"),this.hideLauncher=!0,this.hasMounted=!0)})}}pollForYardiCampaignSource(){var e,t,n;(null===(t=null===(e=window.RCTPCampaign)||void 0===e?void 0:e.CampaignDetails)||void 0===t?void 0:t.Source)&&(null===(n=this.analytics)||void 0===n||n.ping("yardi-DNI-init"),this.yardiDNIScriptInterval&&clearInterval(this.yardiDNIScriptInterval))}async restartConversation(){if(!(this.analytics&&this.analytics.chatId&&this.building&&this.popup&&ar.session))return;this.chatId=Vn(this.orgSlug,this.buildingSlug);const e=await ar.session;this.analytics.chatId=this.chatId,this.popup.select(ri(e,this.building,this.theme,this.avatarSrc||this.building.avatarSrc,this.chatId,this.isMobile))}remove(){var e;null===(e=this.popup)||void 0===e||e.destroy()}open(){var e;null===(e=this.popup)||void 0===e||e.show()}close(){var e;null===(e=this.popup)||void 0===e||e.hide()}show(){this.launcher&&(this.launcher.style.display="")}hide(){this.launcher&&(this.launcher.style.display="none")}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.adjustTopHeaderContactCoords)}disconnectedCallback(){window.removeEventListener("resize",this.adjustTopHeaderContactCoords),super.disconnectedCallback()}updated(){this.adjustTopHeaderContactCoords()}render(){var e,t,n,i,r,o,a,s,u,l,d,c,p,f,h,m,v,g,y,w,b,S,T,A,x,C,O,I,N,R,E,F;window.customElements.get("meetelise-launcher")||window.customElements.define("meetelise-launcher",Gi);const _=!this.hideLauncher||this.isLoading||this.buildingABTestType!==ai.ConceptBlueBlack&&this.buildingABTestType!==ai.ConceptBlueWhite||this.isMobile;return U`
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
<div id="aria-describe" style="display: none;">
|
|
2930
|
+
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=1">
|
|
2931
|
+
<div id="aria-describe-info" style="display: none;">
|
|
2933
2932
|
EliseAI widget that allows you to chat with a virtual assistant, book
|
|
2934
2933
|
a tour, contact the leasing office, and more.
|
|
2935
2934
|
</div>
|
|
@@ -2952,40 +2951,40 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
2952
2951
|
class=${he({launcherContainer:!0,launcher__mobile:this.isMobile,launcher__desktop:!this.isMobile,"meetelise-chat":!0,launcher:!0,shouldBeVisible:!0,hideTab:this.isLoading})}
|
|
2953
2952
|
>
|
|
2954
2953
|
${this.building?U`<meetelise-launcher
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2954
|
+
${Oe(this.launcherRef)}
|
|
2955
|
+
.isMobile=${this.isMobile}
|
|
2956
|
+
.isFirstMount=${!this.hasMounted}
|
|
2957
|
+
.isMini=${this.useMiniWidget}
|
|
2958
|
+
.buildingId=${null!==(t=null===(e=this.building)||void 0===e?void 0:e.id)&&void 0!==t?t:0}
|
|
2959
|
+
.layoutOptions=${null!==(i=null===(n=this.building)||void 0===n?void 0:n.layoutOptionsV2)&&void 0!==i?i:[]}
|
|
2960
|
+
.unitOptions=${null!==(o=null===(r=this.building)||void 0===r?void 0:r.unitOptionsV2)&&void 0!==o?o:[]}
|
|
2961
|
+
.tourTypeOptions=${null!==(s=null===(a=this.building)||void 0===a?void 0:a.tourTypeOptions)&&void 0!==s?s:[]}
|
|
2962
|
+
.launcherStyles=${this.launcherStyles}
|
|
2963
|
+
.autoOpenChatWidget=${null!==(u=this.building.autoOpenChatWidget)&&void 0!==u&&u}
|
|
2964
|
+
chatCallUsHeader=${null!==(d=null===(l=this.building)||void 0===l?void 0:l.chatCallUsHeader)&&void 0!==d?d:""}
|
|
2965
|
+
chatId="${this.chatId}"
|
|
2966
|
+
phoneNumber="${null!==(p=null===(c=this.building)||void 0===c?void 0:c.phoneNumber)&&void 0!==p?p:""}"
|
|
2967
|
+
textColor="${this.theme.chatHeader.textColor}"
|
|
2968
|
+
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
2969
|
+
orgSlug="${this.orgSlug}"
|
|
2970
|
+
buildingSlug="${this.buildingSlug}"
|
|
2971
|
+
sgtUrl="${null!==(h=null===(f=this.building)||void 0===f?void 0:f.sgtUrl)&&void 0!==h?h:""}"
|
|
2972
|
+
buildingABTestType="${null!==(m=this.buildingABTestType)&&void 0!==m?m:""}"
|
|
2973
|
+
currentLeadSource="${null!==(v=this.currentLeadSource)&&void 0!==v?v:""}"
|
|
2974
|
+
featureFlagShowDropdown="${this.featureFlagShowDropdown}"
|
|
2975
|
+
.leadSources="${null!==(g=this.leadSources)&&void 0!==g?g:[]}"
|
|
2976
|
+
escortedToursLink="${null!==(w=null===(y=this.building)||void 0===y?void 0:y.escortedToursLink)&&void 0!==w?w:""}"
|
|
2977
|
+
virtualToursLink="${null!==(S=null===(b=this.building)||void 0===b?void 0:b.virtualToursLink)&&void 0!==S?S:""}"
|
|
2978
|
+
?hidden=${this.hideLauncher}
|
|
2979
|
+
?hasCallUsEnabled=${!(null===(T=this.building)||void 0===T?void 0:T.chatWidgets)||(null===(A=this.building)||void 0===A?void 0:A.chatWidgets.includes("CALL"))}
|
|
2980
|
+
?hasChatEnabled=${!(null===(x=this.building)||void 0===x?void 0:x.chatWidgets)||(null===(C=this.building)||void 0===C?void 0:C.chatWidgets.includes("CHAT"))}
|
|
2981
|
+
?hasEmailEnabled=${!(null===(O=this.building)||void 0===O?void 0:O.chatWidgets)||(null===(I=this.building)||void 0===I?void 0:I.chatWidgets.includes("EMAIL"))}
|
|
2982
|
+
?hasTextUsEnabled=${!(null===(N=this.building)||void 0===N?void 0:N.chatWidgets)||(null===(R=this.building)||void 0===R?void 0:R.chatWidgets.includes("SMS"))}
|
|
2983
|
+
?hasSSTEnabled=${!(null===(E=this.building)||void 0===E?void 0:E.chatWidgets)||(null===(F=this.building)||void 0===F?void 0:F.chatWidgets.includes("SST"))}
|
|
2984
|
+
>
|
|
2985
|
+
</meetelise-launcher>`:""}
|
|
2987
2986
|
</div>
|
|
2988
|
-
</
|
|
2987
|
+
</meta>
|
|
2989
2988
|
`}};ur.styles=u`
|
|
2990
2989
|
:host {
|
|
2991
2990
|
all: initial;
|
|
@@ -3042,4 +3041,4 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
|
|
|
3042
3041
|
.heavyLabel {
|
|
3043
3042
|
font-weight: bold;
|
|
3044
3043
|
}
|
|
3045
|
-
`,ur.session=Ie.ready.then((()=>{const e=new Ie.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Ie.Session({appId:"ogKIvCor",me:e})})),sr([ue({type:String})],ur.prototype,"buildingSlug",void 0),sr([ue({type:String})],ur.prototype,"orgSlug",void 0),sr([ue({type:String})],ur.prototype,"themeId",void 0),sr([ue({attribute:!1})],ur.prototype,"avatarSrc",void 0),sr([ue({type:Boolean})],ur.prototype,"useMiniWidget",void 0),sr([ue({type:Object})],ur.prototype,"launcherStyles",void 0),sr([le()],ur.prototype,"popup",void 0),sr([le()],ur.prototype,"theme",void 0),sr([le()],ur.prototype,"chatId",void 0),sr([le()],ur.prototype,"analytics",void 0),sr([le()],ur.prototype,"isMobile",void 0),sr([le()],ur.prototype,"launcher",void 0),sr([le()],ur.prototype,"building",void 0),sr([le()],ur.prototype,"buildingABTestType",void 0),sr([le()],ur.prototype,"leadSources",void 0),sr([le()],ur.prototype,"currentLeadSource",void 0),sr([le()],ur.prototype,"featureFlagShowDropdown",void 0),sr([le()],ur.prototype,"hasMounted",void 0),sr([le()],ur.prototype,"hideLauncher",void 0),sr([le()],ur.prototype,"isLoading",void 0),sr([le()],ur.prototype,"talkjsPopupElement",void 0),ur=ar=sr([ae("me-chat")],ur);class lr{static start(e,t=!0){if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;t&&(this.orgSlug=e.organization,this.hasBuildingSlug=!!e.building),dr(),cr();const n=document.createElement("me-chat");n.setAttribute("orgSlug",e.organization),this.handleBuildingslug(n,e.building),n.setAttribute("class","meetelise-chat"),n.setAttribute("role","dialog"),n.setAttribute("aria-
|
|
3044
|
+
`,ur.session=Ie.ready.then((()=>{const e=new Ie.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Ie.Session({appId:"ogKIvCor",me:e})})),sr([ue({type:String})],ur.prototype,"buildingSlug",void 0),sr([ue({type:String})],ur.prototype,"orgSlug",void 0),sr([ue({type:String})],ur.prototype,"themeId",void 0),sr([ue({attribute:!1})],ur.prototype,"avatarSrc",void 0),sr([ue({type:Boolean})],ur.prototype,"useMiniWidget",void 0),sr([ue({type:Object})],ur.prototype,"launcherStyles",void 0),sr([le()],ur.prototype,"popup",void 0),sr([le()],ur.prototype,"theme",void 0),sr([le()],ur.prototype,"chatId",void 0),sr([le()],ur.prototype,"analytics",void 0),sr([le()],ur.prototype,"isMobile",void 0),sr([le()],ur.prototype,"launcher",void 0),sr([le()],ur.prototype,"building",void 0),sr([le()],ur.prototype,"buildingABTestType",void 0),sr([le()],ur.prototype,"leadSources",void 0),sr([le()],ur.prototype,"currentLeadSource",void 0),sr([le()],ur.prototype,"featureFlagShowDropdown",void 0),sr([le()],ur.prototype,"hasMounted",void 0),sr([le()],ur.prototype,"hideLauncher",void 0),sr([le()],ur.prototype,"isLoading",void 0),sr([le()],ur.prototype,"talkjsPopupElement",void 0),ur=ar=sr([ae("me-chat")],ur);class lr{static start(e,t=!0){if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;t&&(this.orgSlug=e.organization,this.hasBuildingSlug=!!e.building),dr(),cr();const n=document.createElement("me-chat");n.setAttribute("orgSlug",e.organization),this.handleBuildingslug(n,e.building),n.setAttribute("class","meetelise-chat"),n.setAttribute("role","dialog"),n.setAttribute("aria-label","EliseAI Widget"),n.setAttribute("aria-describedby","aria-describe-info"),n.setAttribute("aria-modal","true"),e.themeId&&n.setAttribute("themeId",e.themeId),e.avatarSrc&&n.setAttribute("avatarSrc",e.avatarSrc),void 0!==e.mini&&(n.useMiniWidget=e.mini),e.launcherStyles&&(n.launcherStyles=e.launcherStyles),document.body.appendChild(n),lr.meChat=n}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),lr.meChat=null)}static async handleBuildingslug(e,t){t?e.setAttribute("buildingSlug",t):this.mutationObserver||(this.handleSingleFamilyUrl(),this.previousUrl=window.location.href,document.body.addEventListener("click",(()=>{requestAnimationFrame((()=>{this.previousUrl===window.location.href||this.hasBuildingSlug||(this.previousUrl=window.location.href,this.handleSingleFamilyUrl())}))}),!0))}static async handleSingleFamilyUrl(){if(this.hasBuildingSlug)return;this.remove();const e=window.location.href,n=`https://app.meetelise.com/eliseCrmApi/webchat/microsite_slug?uri=${encodeURIComponent(e)}`,i=await t().get(n,{headers:{"org-slug":this.orgSlug}});if(!i||!i.data)return;const r={organization:this.orgSlug,building:i.data};this.start(r,!1)}}lr.meChat=null,lr.orgSlug="",lr.mutationObserver=null,lr.previousUrl="",lr.hasBuildingSlug=null;const dr=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),document.head.appendChild(e)},cr=()=>{const e=document.createElement("meta");e.setAttribute("name","viewport"),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=2"),document.head.appendChild(e)}})();var r=i.Z;export{r as default};
|
package/src/MEChat.ts
CHANGED
|
@@ -43,8 +43,8 @@ export default class MEChat {
|
|
|
43
43
|
this.handleBuildingslug(meChat, opts.building);
|
|
44
44
|
meChat.setAttribute("class", "meetelise-chat");
|
|
45
45
|
meChat.setAttribute("role", "dialog");
|
|
46
|
-
meChat.setAttribute("aria-
|
|
47
|
-
meChat.setAttribute("aria-describedby", "aria-describe");
|
|
46
|
+
meChat.setAttribute("aria-label", "EliseAI Widget");
|
|
47
|
+
meChat.setAttribute("aria-describedby", "aria-describe-info");
|
|
48
48
|
meChat.setAttribute("aria-modal", "true");
|
|
49
49
|
if (opts.themeId) {
|
|
50
50
|
meChat.setAttribute("themeId", opts.themeId);
|
|
@@ -434,9 +434,8 @@ export class MEChat extends LitElement {
|
|
|
434
434
|
this.isMobile;
|
|
435
435
|
|
|
436
436
|
return html`
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<div id="aria-describe" style="display: none;">
|
|
437
|
+
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=1">
|
|
438
|
+
<div id="aria-describe-info" style="display: none;">
|
|
440
439
|
EliseAI widget that allows you to chat with a virtual assistant, book
|
|
441
440
|
a tour, contact the leasing office, and more.
|
|
442
441
|
</div>
|
|
@@ -469,53 +468,56 @@ export class MEChat extends LitElement {
|
|
|
469
468
|
["hideTab"]: this.isLoading,
|
|
470
469
|
})}
|
|
471
470
|
>
|
|
472
|
-
${
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
?
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
471
|
+
${
|
|
472
|
+
this.building
|
|
473
|
+
? html`<meetelise-launcher
|
|
474
|
+
${ref(this.launcherRef)}
|
|
475
|
+
.isMobile=${this.isMobile}
|
|
476
|
+
.isFirstMount=${!this.hasMounted}
|
|
477
|
+
.isMini=${this.useMiniWidget}
|
|
478
|
+
.buildingId=${this.building?.id ?? 0}
|
|
479
|
+
.layoutOptions=${this.building?.layoutOptionsV2 ?? []}
|
|
480
|
+
.unitOptions=${this.building?.unitOptionsV2 ?? []}
|
|
481
|
+
.tourTypeOptions=${this.building?.tourTypeOptions ?? []}
|
|
482
|
+
.launcherStyles=${this.launcherStyles}
|
|
483
|
+
.autoOpenChatWidget=${this.building.autoOpenChatWidget ??
|
|
484
|
+
false}
|
|
485
|
+
chatCallUsHeader=${this.building?.chatCallUsHeader ?? ""}
|
|
486
|
+
chatId="${this.chatId}"
|
|
487
|
+
phoneNumber="${this.building?.phoneNumber ?? ""}"
|
|
488
|
+
textColor="${this.theme.chatHeader.textColor}"
|
|
489
|
+
backgroundColor="${this.theme.chatPaneBackgroundColor}"
|
|
490
|
+
orgSlug="${this.orgSlug}"
|
|
491
|
+
buildingSlug="${this.buildingSlug}"
|
|
492
|
+
sgtUrl="${this.building?.sgtUrl ?? ""}"
|
|
493
|
+
buildingABTestType="${this.buildingABTestType ?? ""}"
|
|
494
|
+
currentLeadSource="${this.currentLeadSource ?? ""}"
|
|
495
|
+
featureFlagShowDropdown="${this.featureFlagShowDropdown}"
|
|
496
|
+
.leadSources="${this.leadSources ?? []}"
|
|
497
|
+
escortedToursLink="${this.building?.escortedToursLink ?? ""}"
|
|
498
|
+
virtualToursLink="${this.building?.virtualToursLink ?? ""}"
|
|
499
|
+
?hidden=${this.hideLauncher}
|
|
500
|
+
?hasCallUsEnabled=${!this.building?.chatWidgets
|
|
501
|
+
? true
|
|
502
|
+
: this.building?.chatWidgets.includes("CALL")}
|
|
503
|
+
?hasChatEnabled=${!this.building?.chatWidgets
|
|
504
|
+
? true
|
|
505
|
+
: this.building?.chatWidgets.includes("CHAT")}
|
|
506
|
+
?hasEmailEnabled=${!this.building?.chatWidgets
|
|
507
|
+
? true
|
|
508
|
+
: this.building?.chatWidgets.includes("EMAIL")}
|
|
509
|
+
?hasTextUsEnabled=${!this.building?.chatWidgets
|
|
510
|
+
? true
|
|
511
|
+
: this.building?.chatWidgets.includes("SMS")}
|
|
512
|
+
?hasSSTEnabled=${!this.building?.chatWidgets
|
|
513
|
+
? true
|
|
514
|
+
: this.building?.chatWidgets.includes("SST")}
|
|
515
|
+
>
|
|
516
|
+
</meetelise-launcher>`
|
|
517
|
+
: ""
|
|
518
|
+
}
|
|
517
519
|
</div>
|
|
518
|
-
</
|
|
520
|
+
</meta>
|
|
519
521
|
`;
|
|
520
522
|
}
|
|
521
523
|
|