@meetelise/chat 1.20.24 → 1.20.25

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.
@@ -143,9 +143,12 @@ export class Launcher extends LitElement {
143
143
  sstWindowRef.onCloseClicked = this.onCloseSSTWindow;
144
144
  };
145
145
 
146
- onClickEmailOption = (e: MouseEvent): void => {
147
- e.preventDefault();
148
- e.stopPropagation();
146
+ onClickEmailOption = (e?: MouseEvent): void => {
147
+ if (e) {
148
+ e.preventDefault();
149
+ e.stopPropagation();
150
+ }
151
+
149
152
  this.isEmailWindowOpen = true;
150
153
  };
151
154
 
@@ -44,6 +44,38 @@ export class MEChat extends LitElement {
44
44
  width: 100%;
45
45
  height: 100px;
46
46
  }
47
+ .contactBttnPopup {
48
+ position: absolute;
49
+ bottom: 24px;
50
+ right: 0px;
51
+ width: 155px;
52
+ height: 56px;
53
+ padding-left: 20px;
54
+ padding-right: 20px;
55
+
56
+ border: none;
57
+ background: rgba(0, 0, 0, 0.9);
58
+ box-shadow: 0px 0px 14px 5px rgba(0, 0, 0, 0.25);
59
+ backdrop-filter: blur(5px);
60
+
61
+ border-radius: 10px 0px 0px 10px;
62
+
63
+ font-family: "Poppins";
64
+ font-style: normal;
65
+ font-weight: 600;
66
+ font-size: 14px;
67
+ line-height: 22px;
68
+
69
+ color: #ffffff;
70
+
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ }
75
+ .contactBttnPopup:hover {
76
+ background: rgba(0, 0, 0, 0.8);
77
+ cursor: pointer;
78
+ }
47
79
  `;
48
80
  static session: Promise<Talk.Session> = Talk.ready.then(() => {
49
81
  const me = new Talk.User({
@@ -283,59 +315,88 @@ export class MEChat extends LitElement {
283
315
  this.initializeInstanceVariables();
284
316
  };
285
317
 
318
+ handleContactClicked = (): void => {
319
+ this.popup?.hide();
320
+ this.hideLauncher = false;
321
+
322
+ this.launcherRef.value?.onClickEmailOption();
323
+ };
324
+
286
325
  render(): TemplateResult {
287
326
  installLauncher();
288
327
 
289
328
  return html`
290
- <div
291
- class=${classMap({
292
- launcherContainer: true,
293
- ["launcher__mobile"]: this.isMobile,
294
- ["launcher__desktop"]: !this.isMobile,
295
- ["meetelise-chat"]: true,
296
- launcher: true,
297
- shouldBeVisible: true,
298
- })}
299
- >
300
- ${this.building
301
- ? html`<meetelise-launcher
302
- ${ref(this.launcherRef)}
303
- .isMobile=${this.isMobile}
304
- .isFirstMount=${!this.hasMounted}
305
- .isMini=${this.useMiniWidget}
306
- .buildingId=${this.building?.id ?? 0}
307
- .layoutOptions=${this.building?.layoutOptionsV2 ?? []}
308
- .unitOptions=${this.building?.unitOptionsV2 ?? []}
309
- .tourTypeOptions=${this.building?.tourTypeOptions ?? []}
310
- .launcherStyles=${this.launcherStyles}
311
- .autoOpenChatWidget=${this.building.autoOpenChatWidget ?? false}
312
- chatCallUsHeader=${this.building?.chatCallUsHeader ?? "Call us"}
313
- phoneNumber="${this.building?.phoneNumber ?? ""}"
314
- textColor="${this.theme.chatHeader.textColor}"
315
- backgroundColor="${this.theme.chatPaneBackgroundColor}"
316
- orgSlug="${this.orgSlug}"
317
- buildingSlug="${this.buildingSlug}"
318
- sgtUrl="${this.building?.sgtUrl ?? ""}"
319
- escortedToursLink="${this.building?.escortedToursLink ?? ""}"
320
- virtualToursLink="${this.building?.virtualToursLink ?? ""}"
321
- ?hidden=${this.hideLauncher}
322
- ?hasCallUsEnabled=${!this.building?.chatWidgets
323
- ? true
324
- : this.building?.chatWidgets.includes("CALL")}
325
- ?hasChatEnabled=${!this.building?.chatWidgets
326
- ? true
327
- : this.building?.chatWidgets.includes("CHAT")}
328
- ?hasEmailEnabled=${!this.building?.chatWidgets
329
- ? true
330
- : this.building?.chatWidgets.includes("EMAIL")}
331
- ?hasTextUsEnabled=${!this.building?.chatWidgets
332
- ? true
333
- : this.building?.chatWidgets.includes("SMS")}
334
- ?hasSSTEnabled=${!this.building?.chatWidgets
335
- ? true
336
- : this.building?.chatWidgets.includes("SST")}
329
+ <div>
330
+ <div
331
+ class=${classMap({
332
+ launcherContainer: true,
333
+ ["launcher__mobile"]: this.isMobile,
334
+ ["launcher__desktop"]: !this.isMobile,
335
+ ["meetelise-chat"]: true,
336
+ launcher: true,
337
+ shouldBeVisible: true,
338
+ })}
339
+ >
340
+ ${this.building
341
+ ? html`<meetelise-launcher
342
+ ${ref(this.launcherRef)}
343
+ .isMobile=${this.isMobile}
344
+ .isFirstMount=${!this.hasMounted}
345
+ .isMini=${this.useMiniWidget}
346
+ .buildingId=${this.building?.id ?? 0}
347
+ .layoutOptions=${this.building?.layoutOptionsV2 ?? []}
348
+ .unitOptions=${this.building?.unitOptionsV2 ?? []}
349
+ .tourTypeOptions=${this.building?.tourTypeOptions ?? []}
350
+ .launcherStyles=${this.launcherStyles}
351
+ .autoOpenChatWidget=${this.building.autoOpenChatWidget ?? false}
352
+ chatCallUsHeader=${this.building?.chatCallUsHeader ?? "Call us"}
353
+ phoneNumber="${this.building?.phoneNumber ?? ""}"
354
+ textColor="${this.theme.chatHeader.textColor}"
355
+ backgroundColor="${this.theme.chatPaneBackgroundColor}"
356
+ orgSlug="${this.orgSlug}"
357
+ buildingSlug="${this.buildingSlug}"
358
+ sgtUrl="${this.building?.sgtUrl ?? ""}"
359
+ escortedToursLink="${this.building?.escortedToursLink ?? ""}"
360
+ virtualToursLink="${this.building?.virtualToursLink ?? ""}"
361
+ ?hidden=${this.hideLauncher}
362
+ ?hasCallUsEnabled=${!this.building?.chatWidgets
363
+ ? true
364
+ : this.building?.chatWidgets.includes("CALL")}
365
+ ?hasChatEnabled=${!this.building?.chatWidgets
366
+ ? true
367
+ : this.building?.chatWidgets.includes("CHAT")}
368
+ ?hasEmailEnabled=${!this.building?.chatWidgets
369
+ ? true
370
+ : this.building?.chatWidgets.includes("EMAIL")}
371
+ ?hasTextUsEnabled=${!this.building?.chatWidgets
372
+ ? true
373
+ : this.building?.chatWidgets.includes("SMS")}
374
+ ?hasSSTEnabled=${!this.building?.chatWidgets
375
+ ? true
376
+ : this.building?.chatWidgets.includes("SST")}
377
+ >
378
+ </meetelise-launcher>`
379
+ : ""}
380
+ </div>
381
+ ${this.hideLauncher
382
+ ? html` <button
383
+ class="contactBttnPopup"
384
+ @click=${this.handleContactClicked}
337
385
  >
338
- </meetelise-launcher>`
386
+ <svg
387
+ width="24"
388
+ height="23"
389
+ viewBox="0 0 24 23"
390
+ fill="none"
391
+ xmlns="http://www.w3.org/2000/svg"
392
+ >
393
+ <path
394
+ d="M17.2816 8.04964H5.78216C5.47717 8.04964 5.18468 8.1708 4.96902 8.38646C4.75336 8.60211 4.63221 8.89461 4.63221 9.19959C4.63221 9.50458 4.75336 9.79707 4.96902 10.0127C5.18468 10.2284 5.47717 10.3495 5.78216 10.3495H17.2816C17.5866 10.3495 17.8791 10.2284 18.0948 10.0127C18.3104 9.79707 18.4316 9.50458 18.4316 9.19959C18.4316 8.89461 18.3104 8.60211 18.0948 8.38646C17.8791 8.1708 17.5866 8.04964 17.2816 8.04964ZM12.6819 12.6494H5.78216C5.47717 12.6494 5.18468 12.7706 4.96902 12.9863C4.75336 13.2019 4.63221 13.4944 4.63221 13.7994C4.63221 14.1044 4.75336 14.3969 4.96902 14.6125C5.18468 14.8282 5.47717 14.9493 5.78216 14.9493H12.6819C12.9868 14.9493 13.2793 14.8282 13.495 14.6125C13.7106 14.3969 13.8318 14.1044 13.8318 13.7994C13.8318 13.4944 13.7106 13.2019 13.495 12.9863C13.2793 12.7706 12.9868 12.6494 12.6819 12.6494ZM11.5319 0C10.0218 0 8.52642 0.297443 7.13124 0.875347C5.73605 1.45325 4.46836 2.3003 3.40054 3.36812C1.24396 5.5247 0.0324129 8.44964 0.0324129 11.4995C0.0223598 14.1549 0.941784 16.7301 2.6313 18.7787L0.3314 21.0786C0.171835 21.2403 0.0637445 21.4456 0.0207662 21.6687C-0.0222121 21.8918 0.00184785 22.1226 0.0899103 22.332C0.185423 22.5389 0.340259 22.7128 0.534764 22.8315C0.72927 22.9503 0.954673 23.0086 1.18236 22.999H11.5319C14.5818 22.999 17.5067 21.7874 19.6633 19.6309C21.8198 17.4743 23.0314 14.5493 23.0314 11.4995C23.0314 8.44964 21.8198 5.5247 19.6633 3.36812C17.5067 1.21155 14.5818 0 11.5319 0ZM11.5319 20.6991H3.95374L5.02319 19.6296C5.23737 19.4142 5.35759 19.1227 5.35759 18.8189C5.35759 18.5151 5.23737 18.2237 5.02319 18.0082C3.51743 16.5041 2.57975 14.5245 2.3699 12.4066C2.16006 10.2887 2.69103 8.1635 3.87235 6.39317C5.05368 4.62284 6.81227 3.31687 8.84851 2.69775C10.8848 2.07863 13.0727 2.18468 15.0395 2.99782C17.0063 3.81096 18.6304 5.28088 19.6349 7.15716C20.6395 9.03343 20.9625 11.2 20.5488 13.2877C20.1351 15.3754 19.0104 17.255 17.3662 18.6065C15.722 19.9579 13.6602 20.6974 11.5319 20.6991Z"
395
+ fill="white"
396
+ />
397
+ </svg>
398
+ <p>Contact us</p>
399
+ </button>`
339
400
  : ""}
340
401
  </div>
341
402
  `;