@meetelise/chat 1.19.1 → 1.19.2

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.19.1",
3
+ "version": "1.19.2",
4
4
  "description": "",
5
5
  "main": "public/dist/index.js",
6
6
  "type": "module",
@@ -2117,4 +2117,4 @@ var e={8005:function(e,t,n){var i,r=this&&this.__extends||(i=function(e,t){retur
2117
2117
  width: 100%;
2118
2118
  height: 100px;
2119
2119
  }
2120
- `,yi.session=Oe.ready.then((()=>{const e=new Oe.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Oe.Session({appId:"ogKIvCor",me:e})})),gi([oe({type:String})],yi.prototype,"buildingSlug",void 0),gi([oe({type:String})],yi.prototype,"orgSlug",void 0),gi([oe({type:String})],yi.prototype,"themeId",void 0),gi([oe({attribute:!1})],yi.prototype,"avatarSrc",void 0),gi([oe({type:Boolean})],yi.prototype,"useMiniWidget",void 0),gi([oe({type:Object})],yi.prototype,"launcherStyles",void 0),gi([ae()],yi.prototype,"popup",void 0),gi([ae()],yi.prototype,"theme",void 0),gi([ae()],yi.prototype,"chatId",void 0),gi([ae()],yi.prototype,"analytics",void 0),gi([ae()],yi.prototype,"isMobile",void 0),gi([ae()],yi.prototype,"launcher",void 0),gi([ae()],yi.prototype,"building",void 0),gi([ae()],yi.prototype,"hasMounted",void 0),gi([ae()],yi.prototype,"hideLauncher",void 0),yi=vi=gi([ie("me-chat")],yi);class wi{static start(e){bi(),Si();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),wi.meChat=t}static async restartConversation(){this.meChat&&await this.meChat.restartConversation()}static async remove(){this.meChat&&await this.meChat.remove()}}wi.meChat=null;const bi=()=>{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)},Si=()=>{const e=document.createElement("meta");e.setAttribute("name","viewport"),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1"),document.head.appendChild(e)}})();var r=i.Z;export{r as default};
2120
+ `,yi.session=Oe.ready.then((()=>{const e=new Oe.User({id:"anonymous",name:"Me",email:null,role:"Default"});return new Oe.Session({appId:"ogKIvCor",me:e})})),gi([oe({type:String})],yi.prototype,"buildingSlug",void 0),gi([oe({type:String})],yi.prototype,"orgSlug",void 0),gi([oe({type:String})],yi.prototype,"themeId",void 0),gi([oe({attribute:!1})],yi.prototype,"avatarSrc",void 0),gi([oe({type:Boolean})],yi.prototype,"useMiniWidget",void 0),gi([oe({type:Object})],yi.prototype,"launcherStyles",void 0),gi([ae()],yi.prototype,"popup",void 0),gi([ae()],yi.prototype,"theme",void 0),gi([ae()],yi.prototype,"chatId",void 0),gi([ae()],yi.prototype,"analytics",void 0),gi([ae()],yi.prototype,"isMobile",void 0),gi([ae()],yi.prototype,"launcher",void 0),gi([ae()],yi.prototype,"building",void 0),gi([ae()],yi.prototype,"hasMounted",void 0),gi([ae()],yi.prototype,"hideLauncher",void 0),yi=vi=gi([ie("me-chat")],yi);class wi{static start(e){bi(),Si();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),wi.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),wi.meChat=null)}}wi.meChat=null;const bi=()=>{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)},Si=()=>{const e=document.createElement("meta");e.setAttribute("name","viewport"),e.setAttribute("content","width=device-width, initial-scale=1, maximum-scale=1"),document.head.appendChild(e)}})();var r=i.Z;export{r as default};
package/src/MEChat.ts CHANGED
@@ -53,6 +53,8 @@ export default class MEChat {
53
53
  return;
54
54
  }
55
55
  await this.meChat.remove();
56
+ document.body.removeChild(this.meChat);
57
+ MEChat.meChat = null;
56
58
  }
57
59
  }
58
60