@meetelise/chat 1.20.36 → 1.20.38

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.20.36",
3
+ "version": "1.20.38",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -2383,4 +2383,4 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
2383
2383
  .heavyLabel {
2384
2384
  font-weight: bold;
2385
2385
  }
2386
- `,Vi.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})})),$i([ae({type:String})],Vi.prototype,"buildingSlug",void 0),$i([ae({type:String})],Vi.prototype,"orgSlug",void 0),$i([ae({type:String})],Vi.prototype,"themeId",void 0),$i([ae({attribute:!1})],Vi.prototype,"avatarSrc",void 0),$i([ae({type:Boolean})],Vi.prototype,"useMiniWidget",void 0),$i([ae({type:Object})],Vi.prototype,"launcherStyles",void 0),$i([se()],Vi.prototype,"popup",void 0),$i([se()],Vi.prototype,"theme",void 0),$i([se()],Vi.prototype,"chatId",void 0),$i([se()],Vi.prototype,"analytics",void 0),$i([se()],Vi.prototype,"isMobile",void 0),$i([se()],Vi.prototype,"launcher",void 0),$i([se()],Vi.prototype,"building",void 0),$i([se()],Vi.prototype,"buildingABTestType",void 0),$i([se()],Vi.prototype,"hasMounted",void 0),$i([se()],Vi.prototype,"hideLauncher",void 0),$i([se()],Vi.prototype,"isLoading",void 0),$i([se()],Vi.prototype,"talkjsPopupElement",void 0),$i([se()],Vi.prototype,"myContactHeader",void 0),Vi=Gi=$i([re("me-chat")],Vi);class zi{static start(e){if(window.location.pathname.includes("residentservices"))return;Xi(),Zi();const t=document.createElement("me-chat");t.setAttribute("orgSlug",e.organization),t.setAttribute("buildingSlug",e.building),t.setAttribute("class","meetelise-chat"),e.themeId&&t.setAttribute("themeId",e.themeId),e.avatarSrc&&t.setAttribute("avatarSrc",e.avatarSrc),void 0!==e.mini&&(t.useMiniWidget=e.mini),e.launcherStyles&&(t.launcherStyles=e.launcherStyles),document.body.appendChild(t),zi.meChat=t}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),zi.meChat=null)}}zi.meChat=null;const Xi=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"),document.head.appendChild(e)},Zi=()=>{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};
2386
+ `,Vi.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})})),$i([ae({type:String})],Vi.prototype,"buildingSlug",void 0),$i([ae({type:String})],Vi.prototype,"orgSlug",void 0),$i([ae({type:String})],Vi.prototype,"themeId",void 0),$i([ae({attribute:!1})],Vi.prototype,"avatarSrc",void 0),$i([ae({type:Boolean})],Vi.prototype,"useMiniWidget",void 0),$i([ae({type:Object})],Vi.prototype,"launcherStyles",void 0),$i([se()],Vi.prototype,"popup",void 0),$i([se()],Vi.prototype,"theme",void 0),$i([se()],Vi.prototype,"chatId",void 0),$i([se()],Vi.prototype,"analytics",void 0),$i([se()],Vi.prototype,"isMobile",void 0),$i([se()],Vi.prototype,"launcher",void 0),$i([se()],Vi.prototype,"building",void 0),$i([se()],Vi.prototype,"buildingABTestType",void 0),$i([se()],Vi.prototype,"hasMounted",void 0),$i([se()],Vi.prototype,"hideLauncher",void 0),$i([se()],Vi.prototype,"isLoading",void 0),$i([se()],Vi.prototype,"talkjsPopupElement",void 0),$i([se()],Vi.prototype,"myContactHeader",void 0),Vi=Gi=$i([re("me-chat")],Vi);class zi{static start(e){if(window.location.pathname.includes("residentservices")||window.location.pathname.includes("onlineleasing"))return;Xi(),Zi();const t=document.createElement("me-chat");t.setAttribute("orgSlug",e.organization),t.setAttribute("buildingSlug",e.building),t.setAttribute("class","meetelise-chat"),e.themeId&&t.setAttribute("themeId",e.themeId),e.avatarSrc&&t.setAttribute("avatarSrc",e.avatarSrc),void 0!==e.mini&&(t.useMiniWidget=e.mini),e.launcherStyles&&(t.launcherStyles=e.launcherStyles),document.body.appendChild(t),zi.meChat=t}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&(await this.meChat.remove(),document.body.removeChild(this.meChat),zi.meChat=null)}}zi.meChat=null;const Xi=()=>{const e=document.createElement("link");e.setAttribute("rel","stylesheet"),e.setAttribute("type","text/css"),e.setAttribute("href","https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"),document.head.appendChild(e)},Zi=()=>{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
@@ -20,8 +20,11 @@ export default class MEChat {
20
20
 
21
21
  static start(opts: Options): void {
22
22
  // If our clients are Yardi and have a resident portal with rentcafe,
23
- // we do NOT want to display the launcher
24
- if (window.location.pathname.includes("residentservices")) {
23
+ // we do NOT want to display the launcher (if following in shows up anywhere in url)
24
+ if (
25
+ window.location.pathname.includes("residentservices") ||
26
+ window.location.pathname.includes("onlineleasing")
27
+ ) {
25
28
  return;
26
29
  }
27
30
  installFont();