@meetelise/chat 1.11.0 → 1.12.0

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.
Files changed (56) hide show
  1. package/.eslintrc.cjs +1 -0
  2. package/.github/workflows/release.yml +1 -0
  3. package/.vscode/settings.json +6 -1
  4. package/CONTRIBUTING.md +8 -0
  5. package/package.json +9 -10
  6. package/public/demo/index.html +78 -11
  7. package/public/dist/index.js +1714 -1
  8. package/public/dist/index.js.LICENSE.txt +26 -14
  9. package/public/index.html +2 -1
  10. package/src/MEChat.test.ts +5 -5
  11. package/src/MEChat.ts +53 -0
  12. package/src/WebComponent/InHouseLauncher.ts +446 -0
  13. package/src/WebComponent/MEChat.css +5 -0
  14. package/src/WebComponent/MEChat.ts +282 -0
  15. package/src/WebComponent/OfficeHours.ts +73 -0
  16. package/src/WebComponent/Scheduler/date-picker.ts +320 -0
  17. package/src/WebComponent/Scheduler/me-select.ts +244 -0
  18. package/src/WebComponent/Scheduler/time-picker.ts +101 -0
  19. package/src/WebComponent/Scheduler/tour-scheduler.ts +383 -0
  20. package/src/WebComponent/Scheduler/tour-type-option.ts +92 -0
  21. package/src/WebComponent/actions/ActionConfirmButton.ts +94 -0
  22. package/src/WebComponent/actions/CallUsWindow.ts +110 -0
  23. package/src/WebComponent/actions/DetailsWindow.ts +109 -0
  24. package/src/WebComponent/actions/EmailUsWindow.ts +432 -0
  25. package/src/WebComponent/actions/InputStyles.ts +31 -0
  26. package/src/WebComponent/actions/TextUsWindow.ts +226 -0
  27. package/src/WebComponent/actions/formatPhoneNumber.ts +42 -0
  28. package/src/WebComponent/inHouseLauncherStyles.ts +300 -0
  29. package/src/WebComponent/index.ts +2 -0
  30. package/src/WebComponent/utils.ts +82 -0
  31. package/src/fetchBuildingInfo.ts +1 -0
  32. package/src/getAvailabilities.ts +71 -0
  33. package/src/themes.ts +5 -3
  34. package/tsconfig.json +9 -3
  35. package/web-test-runner.config.js +0 -6
  36. package/webpack.config.cjs +8 -25
  37. package/public/dist/index.d.ts +0 -1
  38. package/public/dist/src/ChatButton.d.ts +0 -9
  39. package/public/dist/src/ChatIcon.d.ts +0 -6
  40. package/public/dist/src/InHouseLauncher.d.ts +0 -11
  41. package/public/dist/src/MEChat.d.ts +0 -73
  42. package/public/dist/src/analytics.d.ts +0 -34
  43. package/public/dist/src/assetUrls.d.ts +0 -2
  44. package/public/dist/src/chatID.d.ts +0 -11
  45. package/public/dist/src/createConversation.d.ts +0 -4
  46. package/public/dist/src/fetchBuildingInfo.d.ts +0 -25
  47. package/public/dist/src/themes.d.ts +0 -52
  48. package/public/dist/src/utils.d.ts +0 -2
  49. package/src/ChatButton.module.scss +0 -51
  50. package/src/ChatButton.tsx +0 -38
  51. package/src/ChatIcon.tsx +0 -26
  52. package/src/DemoApp.tsx +0 -113
  53. package/src/InHouseLauncher.module.scss +0 -139
  54. package/src/InHouseLauncher.tsx +0 -69
  55. package/src/MEChat.module.scss +0 -22
  56. package/src/MEChat.tsx +0 -293
@@ -10,22 +10,34 @@ object-assign
10
10
  http://jedwatson.github.io/classnames
11
11
  */
12
12
 
13
- /** @license React v0.20.2
14
- * scheduler.production.min.js
15
- *
16
- * Copyright (c) Facebook, Inc. and its affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
13
+ /**
14
+ * @license
15
+ * Copyright 2017 Google LLC
16
+ * SPDX-License-Identifier: BSD-3-Clause
20
17
  */
21
18
 
22
- /** @license React v17.0.2
23
- * react-dom.production.min.js
24
- *
25
- * Copyright (c) Facebook, Inc. and its affiliates.
26
- *
27
- * This source code is licensed under the MIT license found in the
28
- * LICENSE file in the root directory of this source tree.
19
+ /**
20
+ * @license
21
+ * Copyright 2018 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+
25
+ /**
26
+ * @license
27
+ * Copyright 2019 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+
31
+ /**
32
+ * @license
33
+ * Copyright 2020 Google LLC
34
+ * SPDX-License-Identifier: BSD-3-Clause
35
+ */
36
+
37
+ /**
38
+ * @license
39
+ * Copyright 2021 Google LLC
40
+ * SPDX-License-Identifier: BSD-3-Clause
29
41
  */
30
42
 
31
43
  /** @license React v17.0.2
package/public/index.html CHANGED
@@ -83,10 +83,11 @@
83
83
  </main>
84
84
  <script type="module">
85
85
  import { debounce } from "https://cdn.skypack.dev/lodash";
86
- import MEChat from "./dist/index.js";
86
+ import "./dist/index.js";
87
87
  const chat = MEChat.start({
88
88
  organization: "test-company",
89
89
  building: "e2e-test-yardi-building",
90
+ mini: false,
90
91
  });
91
92
  //////////////////////////////////////////////////////////////////
92
93
  // The above code is all a client would need. //
@@ -41,14 +41,14 @@ const waitForElementWithSelectorToExist = async (
41
41
  });
42
42
  };
43
43
 
44
- const wait = (delay, ...args) =>
45
- new Promise((resolve) => setTimeout(resolve, delay, ...args));
44
+ // const wait = (delay, ...args) =>
45
+ // new Promise((resolve) => setTimeout(resolve, delay, ...args));
46
46
 
47
47
  afterEach(() => {
48
48
  restore();
49
49
  });
50
50
 
51
- it("shows the launcher", async function () {
51
+ it.skip("shows the launcher", async function () {
52
52
  // Given an API that returns this building theme
53
53
  stub(window, "fetch").resolves(stubResponse);
54
54
 
@@ -73,7 +73,7 @@ it("shows the launcher", async function () {
73
73
 
74
74
  launcher.click();
75
75
  // Without waiting, the popup doesn't open in time for the next assertion
76
- await wait(0);
76
+ //await wait.skip(0);
77
77
 
78
78
  // Then the popup should be visible
79
79
  const popupStyle2 = window.getComputedStyle(popup);
@@ -84,7 +84,7 @@ it("shows the launcher", async function () {
84
84
  // Ideally, expect theme colors, but we can't select inside the iframe
85
85
  });
86
86
 
87
- it("works via the programmatic interface", async function () {
87
+ it.skip("works via the programmatic interface", async function () {
88
88
  // Given an API that returns this building theme
89
89
  stub(window, "fetch").resolves(stubResponse);
90
90
 
package/src/MEChat.ts ADDED
@@ -0,0 +1,53 @@
1
+ import { ThemeIdString } from "./themes";
2
+ import "./WebComponent/MEChat";
3
+
4
+ /**
5
+ * The interface to MeetElise chat.
6
+ *
7
+ * To add meetelise chat to the screen, call its static method
8
+ * `start()` with your building and organization slug.
9
+ *
10
+ * @example
11
+ * MEChat.start({
12
+ * organization: 'the-jacobson-group',
13
+ * building: 'twin-rivers-pointe'
14
+ * });
15
+ */
16
+ export default class MEChat {
17
+ static start(opts: Options): void {
18
+ installFont();
19
+ const meChat = document.createElement("me-chat");
20
+ meChat.setAttribute("orgSlug", opts.organization);
21
+ meChat.setAttribute("buildingSlug", opts.building);
22
+ if (opts.themeId) {
23
+ meChat.setAttribute("themeId", opts.themeId);
24
+ }
25
+ if (opts.avatarSrc) {
26
+ meChat.setAttribute("avatarSrc", opts.avatarSrc);
27
+ }
28
+ if (opts.mini !== undefined) {
29
+ meChat.useMiniWidget = opts.mini;
30
+ }
31
+ document.body.appendChild(meChat);
32
+ }
33
+ }
34
+
35
+ export interface Options {
36
+ building: string;
37
+ organization: string;
38
+ themeId?: ThemeIdString;
39
+ avatarSrc?: string;
40
+ mini?: boolean;
41
+ }
42
+
43
+ /** You can't install a font from CSS in a shadow DOM, so we use JS to do it here in the regular DOM. */
44
+ const installFont = () => {
45
+ const link = document.createElement("link");
46
+ link.setAttribute("rel", "stylesheet");
47
+ link.setAttribute("type", "text/css");
48
+ link.setAttribute(
49
+ "href",
50
+ "https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;900&display=swap"
51
+ );
52
+ document.head.appendChild(link);
53
+ };
@@ -0,0 +1,446 @@
1
+ import classnames from "classnames";
2
+ import { html, LitElement, TemplateResult } from "lit";
3
+ import { customElement, property, state } from "lit/decorators.js";
4
+ import { createRef, ref, Ref } from "lit/directives/ref.js";
5
+ import { glowBarMp4, glowBarWebm } from "../assetUrls";
6
+ import { inHousLauncherStyles } from "./inHouseLauncherStyles";
7
+ import { EmailUsWindow, installEmailUsWindow } from "./actions/EmailUsWindow";
8
+ import { installTextUsWindow, TextUsWindow } from "./actions/TextUsWindow";
9
+ import { styleMap } from "lit/directives/style-map.js";
10
+ import { classMap } from "lit/directives/class-map.js";
11
+ import { installCallUsWindow } from "./actions/CallUsWindow";
12
+
13
+ @customElement("in-house-launcher")
14
+ export class InHouseLauncher extends LitElement {
15
+ static styles = inHousLauncherStyles;
16
+
17
+ @property({ type: Boolean })
18
+ isMobile = false;
19
+
20
+ @property({ type: Boolean })
21
+ isFirstMount = false;
22
+
23
+ @property()
24
+ backgroundColor = "rgba(255, 255, 255, 0.75)";
25
+
26
+ @property()
27
+ textColor = "#202020";
28
+
29
+ @property({ type: Boolean })
30
+ isMini = true;
31
+
32
+ @property()
33
+ phoneNumber = "";
34
+ @property({ attribute: false })
35
+ buildingId = 0;
36
+ @property({ type: Boolean })
37
+ hasEmailEnabled = true;
38
+ @property({ type: Boolean })
39
+ hasSSTEnabled = false;
40
+ @property({ type: Boolean })
41
+ hasTextUsEnabled = true;
42
+ @property({ attribute: false })
43
+ onChatTapped: () => void = () => {
44
+ return;
45
+ };
46
+
47
+ @state()
48
+ isEmailWindowOpen = false;
49
+ @state()
50
+ isCallUsWindowOpen = false;
51
+ @state()
52
+ isSSTWindowOpen = false;
53
+ @state()
54
+ isTextUsWindowOpen = false;
55
+
56
+ getNumCallToActions = (): number => {
57
+ return [
58
+ this.hasEmailEnabled,
59
+ !!this.phoneNumber,
60
+ this.hasSSTEnabled,
61
+ this.hasTextUsEnabled,
62
+ ].filter((v) => v).length;
63
+ };
64
+
65
+ emailUsWindowRef: Ref<EmailUsWindow> = createRef();
66
+ textUsWindowRef: Ref<TextUsWindow> = createRef();
67
+
68
+ updated = (): void => {
69
+ this.attachOnClickToEmailUsWindow();
70
+ this.attachOnClickToTextUsWindow();
71
+ };
72
+
73
+ attachOnClickToEmailUsWindow = (): void => {
74
+ const emailUsWindowRef = this.emailUsWindowRef.value;
75
+ if (!emailUsWindowRef) {
76
+ return;
77
+ }
78
+ emailUsWindowRef.onCloseClicked = this.onCloseEmailWindow;
79
+ };
80
+
81
+ attachOnClickToTextUsWindow = (): void => {
82
+ const textUsWindowRef = this.textUsWindowRef.value;
83
+ if (!textUsWindowRef) {
84
+ return;
85
+ }
86
+ textUsWindowRef.onCloseClicked = this.onCloseTextUsWindow;
87
+ };
88
+
89
+ onClickEmailOption = (e: MouseEvent): void => {
90
+ e.preventDefault();
91
+ e.stopPropagation();
92
+ this.isEmailWindowOpen = true;
93
+ };
94
+
95
+ onCloseEmailWindow = (): void => {
96
+ this.isEmailWindowOpen = false;
97
+ };
98
+
99
+ renderEmailOption = (): TemplateResult => {
100
+ const text = this.getNumCallToActions() > 2 ? "Email" : "Email us";
101
+ return html`
102
+ <div
103
+ @click=${this.onClickEmailOption}
104
+ class="in-house-launcher__call-to-action-option"
105
+ >
106
+ ${text}
107
+ </div>
108
+ `;
109
+ };
110
+
111
+ onClickPhoneOption = (e: MouseEvent): void => {
112
+ e.preventDefault();
113
+ e.stopPropagation();
114
+ this.isCallUsWindowOpen = true;
115
+ };
116
+
117
+ onClosePhoneWindow = (): void => {
118
+ this.isCallUsWindowOpen = false;
119
+ };
120
+
121
+ renderCallUsOption = (): TemplateResult => {
122
+ const text = this.getNumCallToActions() > 2 ? "Phone" : "Hours/Phone";
123
+ return html`
124
+ <div class="in-house-launcher__call-to-action-option">${text}</div>
125
+ `;
126
+ };
127
+
128
+ onClickSSTOption = (e: MouseEvent): void => {
129
+ e.preventDefault();
130
+ e.stopPropagation();
131
+ this.isSSTWindowOpen = true;
132
+ };
133
+
134
+ onCloseSSTWindow = (): void => {
135
+ this.isSSTWindowOpen = false;
136
+ };
137
+
138
+ renderSSTOption = (): TemplateResult => {
139
+ const text = this.getNumCallToActions() > 2 ? "Book" : "Book a tour";
140
+ return html`
141
+ <div class="in-house-launcher__call-to-action-option">${text}</div>
142
+ `;
143
+ };
144
+
145
+ onClickTextUsOption = (e: MouseEvent): void => {
146
+ e.preventDefault();
147
+ e.stopPropagation();
148
+ this.isTextUsWindowOpen = true;
149
+ };
150
+
151
+ onCloseTextUsWindow = (): void => {
152
+ this.isTextUsWindowOpen = false;
153
+ };
154
+
155
+ renderTextUsOption = (): TemplateResult => {
156
+ return html`
157
+ <div
158
+ @click=${this.onClickTextUsOption}
159
+ class="in-house-launcher__call-to-action-option"
160
+ >
161
+ Text us
162
+ </div>
163
+ `;
164
+ };
165
+
166
+ renderCallToActions = (): TemplateResult => {
167
+ if (this.getNumCallToActions() === 0) {
168
+ return html``;
169
+ }
170
+
171
+ return html`
172
+ <div class="in-house-launcher__call-to-actions-wrapper">
173
+ ${this.hasEmailEnabled ? this.renderEmailOption() : ""}
174
+ ${this.phoneNumber ? this.renderCallUsOption() : ""}
175
+ ${this.hasTextUsEnabled ? this.renderTextUsOption() : ""}
176
+ ${this.hasSSTEnabled ? this.renderSSTOption() : ""}
177
+ </div>
178
+ `;
179
+ };
180
+
181
+ isCallToActionWindowOpen = (): boolean => {
182
+ return (
183
+ [
184
+ this.isEmailWindowOpen,
185
+ this.isCallUsWindowOpen,
186
+ this.isSSTWindowOpen,
187
+ this.isTextUsWindowOpen,
188
+ ].filter((v) => v).length === 1
189
+ );
190
+ };
191
+
192
+ renderMiniOption = (
193
+ content: TemplateResult,
194
+ onClick?: (e: MouseEvent) => void,
195
+ isSecondaryAction?: boolean
196
+ ): TemplateResult => {
197
+ return html`
198
+ <div class="in-house-launcher__mini-option-wrapper">
199
+ <div
200
+ @click=${onClick}
201
+ class=${classMap({
202
+ ["in-house-launcher__mini-option"]: true,
203
+ ["in-house-launcher__secondary-option"]: !!isSecondaryAction,
204
+ })}
205
+ >
206
+ ${content}
207
+ </div>
208
+ </div>
209
+ `;
210
+ };
211
+
212
+ renderMiniLauncher = (): TemplateResult => {
213
+ return html`
214
+ <div class="in-house-launcher__mini-launcher-wrapper">
215
+ ${this.isEmailWindowOpen
216
+ ? html`<div class="in-house-launcher__window-wrapper">
217
+ <email-us-window
218
+ ${ref(this.emailUsWindowRef)}
219
+ .buildingId=${this.buildingId}
220
+ >
221
+ </email-us-window>
222
+ </div>`
223
+ : ""}
224
+ ${this.isTextUsWindowOpen
225
+ ? html`<div class="in-house-launcher__window-wrapper">
226
+ <text-us-window
227
+ ${ref(this.textUsWindowRef)}
228
+ .buildingId=${this.buildingId}
229
+ ></text-us-window>
230
+ </div>`
231
+ : ""}
232
+ ${this.isCallUsWindowOpen
233
+ ? html`
234
+ <div class="in-house-launcher__window-wrapper">
235
+ <call-us-window
236
+ .onCloseClicked=${this.onClosePhoneWindow}
237
+ phoneNumber="${this.phoneNumber}"
238
+ .buildingId=${this.buildingId}
239
+ ></call-us-window>
240
+ </div>
241
+ `
242
+ : ""}
243
+ ${!this.isCallToActionWindowOpen()
244
+ ? this.renderMiniOption(
245
+ html`<svg
246
+ width="21"
247
+ height="20"
248
+ viewBox="0 0 21 20"
249
+ fill="none"
250
+ xmlns="http://www.w3.org/2000/svg"
251
+ >
252
+ <path
253
+ d="M15.0282 7H5.02819C4.76297 7 4.50862 7.10536 4.32108 7.29289C4.13354 7.48043 4.02819 7.73478 4.02819 8C4.02819 8.26522 4.13354 8.51957 4.32108 8.70711C4.50862 8.89464 4.76297 9 5.02819 9H15.0282C15.2934 9 15.5478 8.89464 15.7353 8.70711C15.9228 8.51957 16.0282 8.26522 16.0282 8C16.0282 7.73478 15.9228 7.48043 15.7353 7.29289C15.5478 7.10536 15.2934 7 15.0282 7ZM11.0282 11H5.02819C4.76297 11 4.50862 11.1054 4.32108 11.2929C4.13354 11.4804 4.02819 11.7348 4.02819 12C4.02819 12.2652 4.13354 12.5196 4.32108 12.7071C4.50862 12.8946 4.76297 13 5.02819 13H11.0282C11.2934 13 11.5478 12.8946 11.7353 12.7071C11.9228 12.5196 12.0282 12.2652 12.0282 12C12.0282 11.7348 11.9228 11.4804 11.7353 11.2929C11.5478 11.1054 11.2934 11 11.0282 11ZM10.0282 0C8.71497 0 7.41461 0.258658 6.20135 0.761205C4.9881 1.26375 3.8857 2.00035 2.95712 2.92893C1.08175 4.8043 0.0281864 7.34784 0.0281864 10C0.0194442 12.3091 0.818979 14.5485 2.28819 16.33L0.288186 18.33C0.149429 18.4706 0.0554325 18.6492 0.0180584 18.8432C-0.0193158 19.0372 0.0016069 19.2379 0.0781863 19.42C0.161244 19.5999 0.29589 19.7511 0.465033 19.8544C0.634176 19.9577 0.830187 20.0083 1.02819 20H10.0282C12.6804 20 15.2239 18.9464 17.0993 17.0711C18.9746 15.1957 20.0282 12.6522 20.0282 10C20.0282 7.34784 18.9746 4.8043 17.0993 2.92893C15.2239 1.05357 12.6804 0 10.0282 0ZM10.0282 18H3.43819L4.36819 17.07C4.55444 16.8826 4.65898 16.6292 4.65898 16.365C4.65898 16.1008 4.55444 15.8474 4.36819 15.66C3.05877 14.352 2.24336 12.6305 2.06088 10.7888C1.87839 8.94705 2.34013 7.09901 3.36741 5.55952C4.3947 4.02004 5.92398 2.88436 7.6947 2.34597C9.46543 1.80759 11.368 1.8998 13.0784 2.60691C14.7888 3.31402 16.201 4.59227 17.0746 6.22389C17.9482 7.85551 18.2291 9.73954 17.8693 11.555C17.5096 13.3705 16.5315 15.005 15.1017 16.1802C13.672 17.3554 11.8789 17.9985 10.0282 18Z"
254
+ fill="#1E1E1E"
255
+ />
256
+ </svg>`,
257
+ this.onChatTapped
258
+ )
259
+ : ""}
260
+ ${this.hasEmailEnabled && !this.isCallToActionWindowOpen()
261
+ ? this.renderMiniOption(
262
+ html`
263
+ <svg
264
+ width="19"
265
+ height="15"
266
+ viewBox="0 0 19 15"
267
+ fill="none"
268
+ xmlns="http://www.w3.org/2000/svg"
269
+ >
270
+ <path
271
+ d="M15.9375 0H2.8125C2.06658 0 1.35121 0.296316 0.823762 0.823762C0.296316 1.35121 0 2.06658 0 2.8125V12.1875C0 12.9334 0.296316 13.6488 0.823762 14.1762C1.35121 14.7037 2.06658 15 2.8125 15H15.9375C16.6834 15 17.3988 14.7037 17.9262 14.1762C18.4537 13.6488 18.75 12.9334 18.75 12.1875V2.8125C18.75 2.06658 18.4537 1.35121 17.9262 0.823762C17.3988 0.296316 16.6834 0 15.9375 0ZM15.5531 1.875L10.0406 7.3875C9.95347 7.47537 9.84978 7.54511 9.73554 7.59271C9.6213 7.64031 9.49876 7.66481 9.375 7.66481C9.25124 7.66481 9.1287 7.64031 9.01446 7.59271C8.90022 7.54511 8.79653 7.47537 8.70938 7.3875L3.19687 1.875H15.5531ZM16.875 12.1875C16.875 12.4361 16.7762 12.6746 16.6004 12.8504C16.4246 13.0262 16.1861 13.125 15.9375 13.125H2.8125C2.56386 13.125 2.3254 13.0262 2.14959 12.8504C1.97377 12.6746 1.875 12.4361 1.875 12.1875V3.19687L7.3875 8.70938C7.91484 9.23606 8.62969 9.5319 9.375 9.5319C10.1203 9.5319 10.8352 9.23606 11.3625 8.70938L16.875 3.19687V12.1875Z"
272
+ fill="#1E1E1E"
273
+ />
274
+ </svg>
275
+ `,
276
+ this.onClickEmailOption,
277
+ true
278
+ )
279
+ : ""}
280
+ ${this.hasSSTEnabled && !this.isCallToActionWindowOpen()
281
+ ? this.renderMiniOption(
282
+ html`
283
+ <svg
284
+ width="18"
285
+ height="18"
286
+ viewBox="0 0 18 18"
287
+ fill="none"
288
+ xmlns="http://www.w3.org/2000/svg"
289
+ >
290
+ <path
291
+ d="M15.3 1.8H13.5V0.9C13.5 0.661305 13.4052 0.432387 13.2364 0.263604C13.0676 0.0948211 12.8387 0 12.6 0C12.3613 0 12.1324 0.0948211 11.9636 0.263604C11.7948 0.432387 11.7 0.661305 11.7 0.9V1.8H6.3V0.9C6.3 0.661305 6.20518 0.432387 6.0364 0.263604C5.86761 0.0948211 5.63869 0 5.4 0C5.1613 0 4.93239 0.0948211 4.7636 0.263604C4.59482 0.432387 4.5 0.661305 4.5 0.9V1.8H2.7C1.98392 1.8 1.29716 2.08446 0.790812 2.59081C0.284464 3.09716 0 3.78392 0 4.5V15.3C0 16.0161 0.284464 16.7028 0.790812 17.2092C1.29716 17.7155 1.98392 18 2.7 18H15.3C16.0161 18 16.7028 17.7155 17.2092 17.2092C17.7155 16.7028 18 16.0161 18 15.3V4.5C18 3.78392 17.7155 3.09716 17.2092 2.59081C16.7028 2.08446 16.0161 1.8 15.3 1.8ZM16.2 15.3C16.2 15.5387 16.1052 15.7676 15.9364 15.9364C15.7676 16.1052 15.5387 16.2 15.3 16.2H2.7C2.46131 16.2 2.23239 16.1052 2.0636 15.9364C1.89482 15.7676 1.8 15.5387 1.8 15.3V9H16.2V15.3ZM16.2 7.2H1.8V4.5C1.8 4.2613 1.89482 4.03239 2.0636 3.8636C2.23239 3.69482 2.46131 3.6 2.7 3.6H4.5V4.5C4.5 4.73869 4.59482 4.96761 4.7636 5.1364C4.93239 5.30518 5.1613 5.4 5.4 5.4C5.63869 5.4 5.86761 5.30518 6.0364 5.1364C6.20518 4.96761 6.3 4.73869 6.3 4.5V3.6H11.7V4.5C11.7 4.73869 11.7948 4.96761 11.9636 5.1364C12.1324 5.30518 12.3613 5.4 12.6 5.4C12.8387 5.4 13.0676 5.30518 13.2364 5.1364C13.4052 4.96761 13.5 4.73869 13.5 4.5V3.6H15.3C15.5387 3.6 15.7676 3.69482 15.9364 3.8636C16.1052 4.03239 16.2 4.2613 16.2 4.5V7.2Z"
292
+ fill="#1E1E1E"
293
+ />
294
+ </svg>
295
+ `,
296
+ undefined,
297
+ true
298
+ )
299
+ : ""}
300
+ ${this.phoneNumber && !this.isCallToActionWindowOpen()
301
+ ? this.renderMiniOption(
302
+ html`
303
+ <svg
304
+ width="18"
305
+ height="18"
306
+ viewBox="0 0 18 18"
307
+ fill="none"
308
+ xmlns="http://www.w3.org/2000/svg"
309
+ >
310
+ <path
311
+ d="M15.7007 9.85696C15.5028 9.85696 15.296 9.794 15.0981 9.74904C14.6975 9.66074 14.3037 9.54352 13.92 9.3983C13.5028 9.24652 13.0442 9.2544 12.6324 9.42043C12.2207 9.58645 11.8849 9.8989 11.6897 10.2976L11.4918 10.7023C10.6159 10.215 9.81094 9.60985 9.09958 8.90366C8.3934 8.19231 7.7882 7.38739 7.30092 6.51144L7.67864 6.25963C8.07737 6.0644 8.38981 5.7286 8.55584 5.31685C8.72187 4.90511 8.72975 4.4465 8.57797 4.02929C8.43518 3.64476 8.31801 3.25119 8.22723 2.85117C8.18227 2.65331 8.14629 2.44647 8.11931 2.23962C8.0101 1.60615 7.6783 1.03249 7.18367 0.621939C6.68903 0.211391 6.06407 -0.00905972 5.42132 0.00028536H2.72333C2.33574 -0.00335382 1.95192 0.0765607 1.598 0.234589C1.24408 0.392616 0.928359 0.625047 0.672338 0.916058C0.416316 1.20707 0.226004 1.54983 0.114355 1.921C0.00270581 2.29217 -0.0276575 2.68304 0.0253316 3.067C0.50444 6.83465 2.22512 10.3353 4.91558 13.016C7.60604 15.6967 11.1129 17.4046 14.8823 17.87H15.224C15.8872 17.871 16.5275 17.6277 17.0227 17.1865C17.3072 16.932 17.5345 16.6201 17.6895 16.2713C17.8445 15.9225 17.9238 15.5447 17.922 15.163V12.465C17.911 11.8403 17.6835 11.2388 17.2784 10.7632C16.8733 10.2875 16.3157 9.96724 15.7007 9.85696ZM16.1503 15.2529C16.1502 15.3806 16.1228 15.5068 16.0701 15.6231C16.0174 15.7394 15.9405 15.8432 15.8446 15.9274C15.7441 16.0142 15.6266 16.079 15.4996 16.1177C15.3726 16.1565 15.2389 16.1682 15.1071 16.1523C11.739 15.7204 8.61056 14.1796 6.21517 11.7728C3.81979 9.36601 2.29381 6.23026 1.87795 2.86016C1.86364 2.72842 1.87618 2.59515 1.91483 2.4684C1.95347 2.34165 2.01741 2.22405 2.10279 2.12271C2.18706 2.02678 2.2908 1.94989 2.4071 1.89717C2.5234 1.84445 2.64959 1.8171 2.77729 1.81693H5.47528C5.68441 1.81228 5.88863 1.88068 6.05278 2.01035C6.21692 2.14003 6.33073 2.32287 6.37461 2.52741C6.41058 2.77322 6.45555 3.01604 6.50951 3.25586C6.6134 3.72994 6.75166 4.19583 6.9232 4.64983L5.66414 5.23439C5.55649 5.28379 5.45965 5.35396 5.37919 5.44088C5.29873 5.5278 5.23624 5.62975 5.19529 5.74089C5.15434 5.85203 5.13576 5.97016 5.14059 6.08851C5.14543 6.20685 5.17359 6.32307 5.22347 6.4305C6.51778 9.20292 8.74637 11.4315 11.5188 12.7258C11.7377 12.8158 11.9833 12.8158 12.2023 12.7258C12.3144 12.6857 12.4175 12.6237 12.5055 12.5434C12.5935 12.4631 12.6647 12.3662 12.7149 12.2582L13.2725 10.9991C13.7374 11.1654 14.2119 11.3035 14.6934 11.4128C14.9332 11.4668 15.1761 11.5117 15.4219 11.5477C15.6264 11.5916 15.8093 11.7054 15.9389 11.8695C16.0686 12.0337 16.137 12.2379 16.1324 12.447L16.1503 15.2529Z"
312
+ fill="#1E1E1E"
313
+ />
314
+ </svg>
315
+ `,
316
+ this.onClickPhoneOption,
317
+ true
318
+ )
319
+ : ""}
320
+ ${this.hasTextUsEnabled && !this.isCallToActionWindowOpen()
321
+ ? this.renderMiniOption(
322
+ html`
323
+ <svg
324
+ width="19"
325
+ height="18"
326
+ viewBox="0 0 19 18"
327
+ fill="none"
328
+ xmlns="http://www.w3.org/2000/svg"
329
+ >
330
+ <path
331
+ d="M5.42513 8.09964C5.24713 8.09964 5.07313 8.15242 4.92514 8.25131C4.77714 8.3502 4.66179 8.49076 4.59367 8.6552C4.52556 8.81965 4.50773 9.0006 4.54246 9.17517C4.57719 9.34975 4.6629 9.51011 4.78876 9.63597C4.91462 9.76183 5.07498 9.84754 5.24955 9.88227C5.42413 9.91699 5.60508 9.89917 5.76953 9.83106C5.93397 9.76294 6.07453 9.64759 6.17342 9.49959C6.27231 9.35159 6.32509 9.1776 6.32509 8.9996C6.32509 8.76092 6.23027 8.53201 6.0615 8.36323C5.89272 8.19446 5.66381 8.09964 5.42513 8.09964ZM9.02497 8.09964C8.84697 8.09964 8.67297 8.15242 8.52498 8.25131C8.37698 8.3502 8.26163 8.49076 8.19351 8.6552C8.1254 8.81965 8.10758 9.0006 8.1423 9.17517C8.17703 9.34975 8.26274 9.51011 8.3886 9.63597C8.51446 9.76183 8.67482 9.84754 8.84939 9.88227C9.02397 9.91699 9.20492 9.89917 9.36937 9.83106C9.53382 9.76294 9.67437 9.64759 9.77326 9.49959C9.87215 9.35159 9.92493 9.1776 9.92493 8.9996C9.92493 8.76092 9.83011 8.53201 9.66134 8.36323C9.49256 8.19446 9.26365 8.09964 9.02497 8.09964ZM12.6248 8.09964C12.4468 8.09964 12.2728 8.15242 12.1248 8.25131C11.9768 8.3502 11.8615 8.49076 11.7934 8.6552C11.7252 8.81965 11.7074 9.0006 11.7421 9.17517C11.7769 9.34975 11.8626 9.51011 11.9884 9.63597C12.1143 9.76183 12.2747 9.84754 12.4492 9.88227C12.6238 9.91699 12.8048 9.89917 12.9692 9.83106C13.1337 9.76294 13.2742 9.64759 13.3731 9.49959C13.472 9.35159 13.5248 9.1776 13.5248 8.9996C13.5248 8.76092 13.43 8.53201 13.2612 8.36323C13.0924 8.19446 12.8635 8.09964 12.6248 8.09964ZM9.02497 0C7.84312 0 6.67285 0.232782 5.58097 0.685054C4.48909 1.13733 3.49698 1.80023 2.66129 2.63592C0.973536 4.32368 0.0253666 6.61276 0.0253666 8.9996C0.017499 11.0777 0.737048 13.0931 2.05928 14.6963L0.259356 16.4963C0.13448 16.6228 0.049887 16.7835 0.0162518 16.9581C-0.0173834 17.1327 0.00144614 17.3133 0.0703646 17.4772C0.145113 17.6392 0.26629 17.7752 0.418511 17.8682C0.570733 17.9611 0.747135 18.0067 0.925327 17.9992H9.02497C11.4118 17.9992 13.7009 17.051 15.3886 15.3633C17.0764 13.6755 18.0246 11.3864 18.0246 8.9996C18.0246 6.61276 17.0764 4.32368 15.3886 2.63592C13.7009 0.94817 11.4118 0 9.02497 0ZM9.02497 16.1993H3.09423L3.93119 15.3623C4.01623 15.279 4.08388 15.1796 4.13022 15.0699C4.17657 14.9602 4.20069 14.8424 4.20118 14.7233C4.1978 14.486 4.10076 14.2595 3.93119 14.0934C2.75277 12.9163 2.01894 11.367 1.85471 9.70948C1.69048 8.05199 2.10602 6.38882 3.03054 5.00335C3.95505 3.61787 5.33134 2.59581 6.92492 2.11128C8.51851 1.62676 10.2308 1.70975 11.77 2.34612C13.3093 2.98249 14.5803 4.13286 15.3665 5.60125C16.1527 7.06964 16.4054 8.7652 16.0817 10.399C15.7579 12.0329 14.8777 13.5039 13.591 14.5616C12.3042 15.6192 10.6906 16.198 9.02497 16.1993Z"
332
+ fill="#1E1E1E"
333
+ />
334
+ </svg>
335
+ `,
336
+ this.onClickTextUsOption,
337
+ true
338
+ )
339
+ : ""}
340
+ </div>
341
+ `;
342
+ };
343
+
344
+ render(): TemplateResult {
345
+ installEmailUsWindow();
346
+ installTextUsWindow();
347
+ installCallUsWindow();
348
+ if (this.isMini) {
349
+ return this.renderMiniLauncher();
350
+ }
351
+
352
+ return html`
353
+ <div>
354
+ ${this.isEmailWindowOpen
355
+ ? html`<div class="in-house-launcher__window-wrapper">
356
+ <email-us-window
357
+ ${ref(this.emailUsWindowRef)}
358
+ .buildingId=${this.buildingId}
359
+ >
360
+ </email-us-window>
361
+ </div>`
362
+ : ""}
363
+ ${this.isTextUsWindowOpen
364
+ ? html`<div class="in-house-launcher__window-wrapper">
365
+ <text-us-window
366
+ ${ref(this.textUsWindowRef)}
367
+ .buildingId=${this.buildingId}
368
+ ></text-us-window>
369
+ </div>`
370
+ : ""}
371
+ ${this.isCallUsWindowOpen && this.phoneNumber
372
+ ? html`
373
+ <div class="in-house-launcher__window-wrapper">
374
+ <call-us-window
375
+ .onCloseClicked=${this.onClosePhoneWindow}
376
+ phoneNumber="${this.phoneNumber}"
377
+ .buildingId=${this.buildingId}
378
+ ></call-us-window>
379
+ </div>
380
+ `
381
+ : ""}
382
+ ${!this.isCallToActionWindowOpen()
383
+ ? html`
384
+ <div
385
+ @click=${this.onChatTapped}
386
+ class="${classnames(
387
+ "launcher",
388
+ this.isMobile
389
+ ? "in-house-launcher__mobile"
390
+ : "in-house-launcher__desktop",
391
+ {
392
+ firstMount: this.isFirstMount,
393
+ }
394
+ )}"
395
+ style="background-color: ${this.backgroundColor}; color: ${this
396
+ .textColor};"
397
+ >
398
+ <div
399
+ style=${styleMap({
400
+ position: "absolute",
401
+ })}
402
+ ></div>
403
+ <video class="glowBar" autoplay loop muted playsinline>
404
+ <source src="${glowBarWebm}" type="video/webm" />
405
+ <source src="${glowBarMp4}" type="video/mp4" />
406
+ </video>
407
+ <div class="content">
408
+ <div class="in-house-launcher__primary-action">
409
+ <div class="in-house-launcher__primary-action-text">
410
+ Ask a question
411
+ <svg
412
+ width="21"
413
+ height="20"
414
+ viewBox="0 0 21 20"
415
+ fill="none"
416
+ xmlns="http://www.w3.org/2000/svg"
417
+ >
418
+ <path
419
+ d="M15.0282 7H5.02819C4.76297 7 4.50862 7.10536 4.32108 7.29289C4.13354 7.48043 4.02819 7.73478 4.02819 8C4.02819 8.26522 4.13354 8.51957 4.32108 8.70711C4.50862 8.89464 4.76297 9 5.02819 9H15.0282C15.2934 9 15.5478 8.89464 15.7353 8.70711C15.9228 8.51957 16.0282 8.26522 16.0282 8C16.0282 7.73478 15.9228 7.48043 15.7353 7.29289C15.5478 7.10536 15.2934 7 15.0282 7ZM11.0282 11H5.02819C4.76297 11 4.50862 11.1054 4.32108 11.2929C4.13354 11.4804 4.02819 11.7348 4.02819 12C4.02819 12.2652 4.13354 12.5196 4.32108 12.7071C4.50862 12.8946 4.76297 13 5.02819 13H11.0282C11.2934 13 11.5478 12.8946 11.7353 12.7071C11.9228 12.5196 12.0282 12.2652 12.0282 12C12.0282 11.7348 11.9228 11.4804 11.7353 11.2929C11.5478 11.1054 11.2934 11 11.0282 11ZM10.0282 0C8.71497 0 7.41461 0.258658 6.20135 0.761205C4.9881 1.26375 3.8857 2.00035 2.95712 2.92893C1.08175 4.8043 0.0281864 7.34784 0.0281864 10C0.0194442 12.3091 0.818979 14.5485 2.28819 16.33L0.288186 18.33C0.149429 18.4706 0.0554325 18.6492 0.0180584 18.8432C-0.0193158 19.0372 0.0016069 19.2379 0.0781863 19.42C0.161244 19.5999 0.29589 19.7511 0.465033 19.8544C0.634176 19.9577 0.830187 20.0083 1.02819 20H10.0282C12.6804 20 15.2239 18.9464 17.0993 17.0711C18.9746 15.1957 20.0282 12.6522 20.0282 10C20.0282 7.34784 18.9746 4.8043 17.0993 2.92893C15.2239 1.05357 12.6804 0 10.0282 0ZM10.0282 18H3.43819L4.36819 17.07C4.55444 16.8826 4.65898 16.6292 4.65898 16.365C4.65898 16.1008 4.55444 15.8474 4.36819 15.66C3.05877 14.352 2.24336 12.6305 2.06088 10.7888C1.87839 8.94705 2.34013 7.09901 3.36741 5.55952C4.3947 4.02004 5.92398 2.88436 7.6947 2.34597C9.46543 1.80759 11.368 1.8998 13.0784 2.60691C14.7888 3.31402 16.201 4.59227 17.0746 6.22389C17.9482 7.85551 18.2291 9.73954 17.8693 11.555C17.5096 13.3705 16.5315 15.005 15.1017 16.1802C13.672 17.3554 11.8789 17.9985 10.0282 18Z"
420
+ fill="#1E1E1E"
421
+ />
422
+ </svg>
423
+ </div>
424
+ <div class="in-house-launcher__ask-underline"></div>
425
+ </div>
426
+ ${this.getNumCallToActions() === 0
427
+ ? html`
428
+ <div class="in-house-launcher__filler-text">
429
+ I can also help you schedule a tour
430
+ </div>
431
+ `
432
+ : this.renderCallToActions()}
433
+ </div>
434
+ </div>
435
+ `
436
+ : ""}
437
+ </div>
438
+ `;
439
+ }
440
+ }
441
+
442
+ export const installInHouseLauncher = (): void => {
443
+ if (!window.customElements.get("in-house-launcher")) {
444
+ window.customElements.define("in-house-launcher", InHouseLauncher);
445
+ }
446
+ };
@@ -0,0 +1,5 @@
1
+ @media screen and (min-width: 767px) {
2
+ .meetelise-chat.pane.in-house-launcher__desktop {
3
+ right: -32px;
4
+ }
5
+ }