@meetelise/chat 1.12.5 → 1.12.8

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.
@@ -3,7 +3,7 @@ import { customElement, property, state } from "lit/decorators.js";
3
3
  import { classMap } from "lit/directives/class-map.js";
4
4
  import { createRef, ref, Ref } from "lit/directives/ref.js";
5
5
  import Talk from "talkjs";
6
- import { InHouseLauncher } from ".";
6
+ import { Launcher } from ".";
7
7
  import "./Scheduler/tour-scheduler";
8
8
  import Analytics from "../analytics";
9
9
  import { getChatID } from "../chatID";
@@ -11,7 +11,7 @@ import createConversation from "../createConversation";
11
11
  import fetchBuildingInfo, { Building } from "../fetchBuildingInfo";
12
12
  import { getTheme, Theme, ThemeIdString } from "../themes";
13
13
  import { isMobile } from "../utils";
14
- import { installInHouseLauncher } from "./InHouseLauncher";
14
+ import { installLauncher } from "./Launcher";
15
15
 
16
16
  import "./MEChat.css";
17
17
  import { getRawAvailabilities } from "../getAvailabilities";
@@ -35,7 +35,7 @@ export class MEChat extends LitElement {
35
35
  display: none;
36
36
  }
37
37
 
38
- .inHouseLauncherContainer.in-house-launcher__mobile {
38
+ .launcherContainer.launcher__mobile {
39
39
  width: 100%;
40
40
  height: 100px;
41
41
  }
@@ -83,12 +83,12 @@ export class MEChat extends LitElement {
83
83
  private hideLauncher = false;
84
84
 
85
85
  private yardiDNIScriptInterval: NodeJS.Timer | null = null;
86
- inHouseLauncherRef: Ref<InHouseLauncher> = createRef();
86
+ launcherRef: Ref<Launcher> = createRef();
87
87
 
88
88
  initializeInstanceVariables = async (): Promise<void> => {
89
89
  await this.setBuildingDerivedInfo();
90
90
  await this.initializeLaunchJS();
91
- this.attachOnClickToInHouseLauncher();
91
+ this.attachOnClickToLauncher();
92
92
  };
93
93
 
94
94
  setBuildingDerivedInfo = async (): Promise<void> => {
@@ -146,10 +146,10 @@ export class MEChat extends LitElement {
146
146
  }
147
147
 
148
148
  private configureLauncherElement = () => {
149
- if (!this.popup || !this.inHouseLauncherRef.value) {
149
+ if (!this.popup || !this.launcherRef.value) {
150
150
  return;
151
151
  }
152
- this.launcher = this.inHouseLauncherRef.value;
152
+ this.launcher = this.launcherRef.value;
153
153
  };
154
154
 
155
155
  private configureTalkJSPopup = async (
@@ -182,7 +182,7 @@ export class MEChat extends LitElement {
182
182
  if (!talkjsPopupElement) throw new Error("Failed to find chat window");
183
183
  talkjsPopupElement.classList.add("meetelise-chat", "pane");
184
184
  if (!this.isMobile) {
185
- talkjsPopupElement.classList.add("in-house-launcher__desktop");
185
+ talkjsPopupElement.classList.add("launcher__desktop");
186
186
  }
187
187
  (talkjsPopupElement as HTMLElement).style.zIndex = "99999999999";
188
188
  this.popup = popup;
@@ -230,21 +230,21 @@ export class MEChat extends LitElement {
230
230
  };
231
231
 
232
232
  render(): TemplateResult {
233
- installInHouseLauncher();
233
+ installLauncher();
234
234
 
235
235
  return html`
236
236
  <div
237
237
  class=${classMap({
238
- inHouseLauncherContainer: true,
239
- ["in-house-launcher__mobile"]: this.isMobile,
240
- ["in-house-launcher__desktop"]: !this.isMobile,
238
+ launcherContainer: true,
239
+ ["launcher__mobile"]: this.isMobile,
240
+ ["launcher__desktop"]: !this.isMobile,
241
241
  ["meetelise-chat"]: true,
242
242
  launcher: true,
243
243
  shouldBeVisible: true,
244
244
  })}
245
245
  >
246
- <in-house-launcher
247
- ${ref(this.inHouseLauncherRef)}
246
+ <meetelise-launcher
247
+ ${ref(this.launcherRef)}
248
248
  .isMobile=${this.isMobile}
249
249
  .isFirstMount=${!this.hasMounted}
250
250
  .isMini=${this.useMiniWidget}
@@ -256,18 +256,18 @@ export class MEChat extends LitElement {
256
256
  backgroundColor="${this.theme.chatPaneBackgroundColor}"
257
257
  ?hidden=${this.hideLauncher}
258
258
  >
259
- </in-house-launcher>
259
+ </meetelise-launcher>
260
260
  </div>
261
261
  `;
262
262
  }
263
263
 
264
- private attachOnClickToInHouseLauncher = () => {
265
- const inHouseLauncher = this.inHouseLauncherRef.value;
266
- if (!inHouseLauncher) {
264
+ private attachOnClickToLauncher = () => {
265
+ const launcher = this.launcherRef.value;
266
+ if (!launcher) {
267
267
  return;
268
268
  }
269
269
 
270
- inHouseLauncher.onChatTapped = async () => {
270
+ launcher.onChatTapped = async () => {
271
271
  if (!this.popup) {
272
272
  return;
273
273
  }