@meetelise/chat 1.21.0 → 1.21.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.
Files changed (76) hide show
  1. package/.github/pull_request_template.md +61 -0
  2. package/.idea/codeStyles/Project.xml +57 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/.idea/workspace.xml +67 -0
  7. package/README.md +29 -14
  8. package/declarations.d.ts +12 -0
  9. package/package.json +5 -1
  10. package/public/demo/index.html +62 -4
  11. package/public/demo/secret.html +63 -0
  12. package/public/dist/index.js +3184 -1105
  13. package/public/dist/index.js.LICENSE.txt +19 -9
  14. package/public/index.html +6 -4
  15. package/src/MEChat.ts +207 -52
  16. package/src/MyPubnub.ts +657 -0
  17. package/src/WebComponent/LeadSourceClient.ts +300 -0
  18. package/src/WebComponent/Scheduler/date-picker.ts +1 -1
  19. package/src/WebComponent/Scheduler/time-picker.ts +86 -76
  20. package/src/WebComponent/Scheduler/tour-scheduler.ts +694 -764
  21. package/src/WebComponent/Scheduler/tour-type-option.ts +17 -3
  22. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
  23. package/src/WebComponent/actions/InputStyles.ts +32 -10
  24. package/src/WebComponent/actions/action-confirm-button.ts +16 -11
  25. package/src/WebComponent/actions/call-us-window.ts +341 -58
  26. package/src/WebComponent/actions/details-window.ts +30 -16
  27. package/src/WebComponent/actions/email-us-window.ts +89 -58
  28. package/src/WebComponent/actions/formatPhoneNumber.ts +15 -1
  29. package/src/WebComponent/actions/minimize-expand-button.ts +92 -0
  30. package/src/WebComponent/health-chat.ts +267 -0
  31. package/src/WebComponent/healthcare/healthcare-launcher-styles.ts +34 -0
  32. package/src/WebComponent/healthcare/healthcare-launcher.ts +100 -0
  33. package/src/WebComponent/healthchat-styles.ts +119 -0
  34. package/src/WebComponent/index.ts +1 -1
  35. package/src/WebComponent/launcher/Launcher.ts +919 -0
  36. package/src/WebComponent/{launcherStyles.ts → launcher/launcherStyles.ts} +172 -29
  37. package/src/WebComponent/launcher/mobile-launcher.ts +127 -0
  38. package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
  39. package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
  40. package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
  41. package/src/WebComponent/leasing-chat-styles.ts +114 -0
  42. package/src/WebComponent/me-chat.ts +964 -351
  43. package/src/WebComponent/me-select.ts +48 -21
  44. package/src/WebComponent/mini-loader.ts +28 -0
  45. package/src/WebComponent/pubnub-chat-styles.ts +192 -0
  46. package/src/WebComponent/pubnub-chat.ts +707 -0
  47. package/src/WebComponent/pubnub-media.ts +208 -0
  48. package/src/WebComponent/pubnub-message-styles.ts +54 -0
  49. package/src/WebComponent/pubnub-message.ts +421 -0
  50. package/src/analytics.ts +114 -14
  51. package/src/assetUrls.ts +2 -0
  52. package/src/disclaimers.ts +56 -0
  53. package/src/fetchBuildingABTestType.ts +4 -0
  54. package/src/fetchBuildingInfo.ts +25 -17
  55. package/src/fetchFeatureFlag.ts +147 -0
  56. package/src/fetchLeadSources.ts +67 -1
  57. package/src/fetchPhoneNumberFromSource.ts +31 -0
  58. package/src/fetchWebchatPreferences.ts +55 -0
  59. package/src/getAvailabilities.ts +7 -3
  60. package/src/getBuildingPhoneNumber.ts +26 -0
  61. package/src/getShouldAllowScheduling.ts +16 -0
  62. package/src/getTimezoneString.ts +39 -0
  63. package/src/gtm.ts +17 -0
  64. package/src/handleChatId.ts +101 -0
  65. package/src/insertDNIIntoWebsite.ts +136 -0
  66. package/src/insertLeadSourceIntoSchedulerLinks.ts +50 -0
  67. package/src/postLeadSources.ts +39 -35
  68. package/src/svgIcons.ts +62 -53
  69. package/src/themes.ts +47 -121
  70. package/src/utils.ts +88 -1
  71. package/src/WebComponent/Launcher.ts +0 -559
  72. package/src/WebComponent/actions/text-us-window.ts +0 -279
  73. package/src/chatID.ts +0 -64
  74. package/src/createConversation.ts +0 -57
  75. package/src/fetchCurrentParsedLeadSource.ts +0 -24
  76. package/src/getRegisteredPhoneNumbers.ts +0 -56
@@ -1,25 +1,45 @@
1
+ import axios from "axios";
1
2
  import { css, html, LitElement, TemplateResult } from "lit";
2
- import { customElement, property } from "lit/decorators.js";
3
- import { SimplePhoneIcon } from "../../svgIcons";
3
+ import { customElement, property, state } from "lit/decorators.js";
4
+ import { classMap } from "lit/directives/class-map.js";
5
+ import { createRef, ref, Ref } from "lit/directives/ref.js";
6
+ import { pushGtmEvent } from "../../gtm";
7
+ import { PhoneBlackStrokeIcon } from "../../svgIcons";
8
+ import { isMobile } from "../../utils";
9
+ import LeadSourceClient, {
10
+ getDefaultLeadSourceAttribution,
11
+ } from "../LeadSourceClient";
4
12
 
5
13
  import { getOfficeHourText } from "../OfficeHours";
14
+ import {
15
+ formatToPhoneInput,
16
+ isModifierKey,
17
+ isNumericInput,
18
+ } from "./formatPhoneNumber";
19
+ import { InputStyles } from "./InputStyles";
6
20
 
7
21
  @customElement("call-us-window")
8
22
  export class CallUsWindow extends LitElement {
9
23
  static styles = [
24
+ InputStyles,
10
25
  css`
11
- .call-us-window__content-wrapper {
12
- font-family: Poppins;
26
+ #call-us-window__content-wrapper {
27
+ font-family: "Helvetica Neue", Arial;
28
+ font-style: normal;
13
29
  color: 11ee1e;
30
+ font-size: 14px;
14
31
  }
15
-
16
- .call-us-window__call-us-text {
17
- font-family: "Helvetica";
32
+ .call-us-window__header {
33
+ font-family: "Helvetica Neue", Arial;
18
34
  font-style: normal;
19
35
  font-weight: 700;
20
- font-size: 16px;
21
- line-height: 24px;
22
- color: #202020;
36
+ line-height: 140%;
37
+ font-size: 14px;
38
+ margin: 0;
39
+ }
40
+
41
+ .call-us-window__call-us-text {
42
+ margin: 0 0 10px;
23
43
  }
24
44
 
25
45
  .call-us-window__phone-redirect {
@@ -27,26 +47,33 @@ export class CallUsWindow extends LitElement {
27
47
  justify-content: flex-start;
28
48
  align-items: center;
29
49
  margin-bottom: 28px;
30
- gap: 5px;
50
+ gap: 8px;
51
+
52
+ color: #202020;
53
+ font-size: 18px;
54
+ line-height: 24px;
31
55
  }
32
56
  .call-us-window__phone-redirect > a {
33
57
  color: unset;
34
58
  text-decoration: underline;
35
59
  }
36
60
 
37
- .call-us-window__office-hours-header,
38
- .call-us-window__day-of-week,
61
+ .call-us-window__office-hours-wrapper {
62
+ margin: 0 0 16px;
63
+ }
64
+
65
+ .call-us-window__oh-header {
66
+ line-height: 32px;
67
+ font-weight: 400;
68
+ }
39
69
  .call-us-window__day-of-week-wrapper {
40
- font-family: "Helvetica";
41
- font-style: normal;
42
70
  font-weight: 400;
43
- font-size: 14px;
44
71
  line-height: 22px;
45
72
  color: #202020;
46
73
  }
47
74
 
48
75
  .call-us-window__day-of-week {
49
- width: 112px;
76
+ width: 100px;
50
77
  text-transform: Capitalize;
51
78
  }
52
79
 
@@ -57,29 +84,96 @@ export class CallUsWindow extends LitElement {
57
84
  }
58
85
 
59
86
  .call-us-window__open-times {
87
+ width: 123px;
60
88
  text-transform: lowercase;
89
+ text-align: right;
90
+ }
91
+
92
+ .text-us-wrapper {
93
+ color: #202020;
94
+ }
95
+ .text-us-window__header {
96
+ font-family: "Helvetica Neue", Arial;
97
+ font-style: normal;
98
+ font-weight: 700;
99
+ line-height: 140%;
100
+ font-size: 14px;
101
+ margin: 0;
102
+ }
103
+
104
+ .text-us-window__input-container {
105
+ margin-top: 8px;
106
+ margin-bottom: 8px;
107
+ width: -webkit-fill-available;
108
+ position: relative;
109
+ }
110
+ .text-us-window__submit-text {
111
+ position: absolute;
112
+ top: 14px;
113
+ right: 6px;
114
+ }
115
+ .text-us-window__vertical-spacer {
116
+ height: 20px;
117
+ }
118
+ .text-us-window__description,
119
+ .text-us-window__error {
120
+ font-family: "Helvetica Neue", Arial;
121
+ font-style: normal;
122
+ font-weight: 400;
123
+ font-size: 10px;
124
+ line-height: 14px;
125
+ }
126
+
127
+ .text-us-window__error {
128
+ color: rgb(255, 49, 3);
61
129
  }
62
130
  `,
63
131
  ];
64
132
 
133
+ @property({ attribute: true })
134
+ buildingSlug = "";
135
+ @property({ attribute: true })
136
+ orgSlug = "";
137
+
65
138
  @property({ attribute: false })
66
139
  onCloseClicked?: (e: MouseEvent) => void;
67
140
 
68
141
  @property()
69
- phoneNumber = "1-855-531-5131";
142
+ phoneNumberToCall = "";
143
+
144
+ @property()
145
+ phoneNumberToText = "";
146
+
70
147
  @property({ attribute: false })
71
148
  buildingId = 0;
149
+ @property({ attribute: false })
150
+ buildingName = "";
72
151
  @property({ attribute: true })
73
152
  chatCallUsHeader = "";
153
+
154
+ @property({ attribute: true })
155
+ hasCallUsEnabled = "";
156
+
74
157
  @property({ attribute: true })
75
158
  hasTextUsEnabled = "";
76
159
 
77
- firstUpdated = async (): Promise<void> => {
78
- if (!this.buildingId) {
79
- return;
80
- }
81
- this.officeHoursTextInfo = await getOfficeHourText(this.buildingId);
82
- };
160
+ @property({ attribute: true })
161
+ currentLeadSource = "";
162
+
163
+ @property({ attribute: true })
164
+ private leadSourceClient: LeadSourceClient | null = null;
165
+
166
+ phoneNumberInputRef: Ref<HTMLInputElement> = createRef();
167
+
168
+ @state()
169
+ hasSubmittedForm = false;
170
+ @state()
171
+ hasPhoneNumberError = false;
172
+ @state()
173
+ hasSubmissionError = false;
174
+
175
+ @state()
176
+ submittingTextUsOption = false;
83
177
 
84
178
  @property({ attribute: false })
85
179
  officeHoursTextInfo: (
@@ -87,6 +181,11 @@ export class CallUsWindow extends LitElement {
87
181
  | { dayOfWeek: string; startTime: string; endTime: string }
88
182
  )[] = [];
89
183
 
184
+ firstUpdated = async (): Promise<void> => {
185
+ if (!this.buildingId || !this.hasCallUsEnabled) return;
186
+ this.officeHoursTextInfo = await getOfficeHourText(this.buildingId);
187
+ };
188
+
90
189
  getCallLink = (phoneNumber: string): TemplateResult => {
91
190
  const rawNumber = (phoneNumber.match(/\d+/g) || []).join("");
92
191
  const rawInternationalNumber =
@@ -102,48 +201,188 @@ export class CallUsWindow extends LitElement {
102
201
  >`;
103
202
  };
104
203
 
204
+ enforcePhoneFormat = (e: KeyboardEvent): void => {
205
+ if (!isNumericInput(e) && !isModifierKey(e)) {
206
+ e.preventDefault();
207
+ }
208
+ };
209
+ onSubmitTextUs = async (): Promise<void> => {
210
+ this.hasPhoneNumberError = false;
211
+ this.hasSubmissionError = false;
212
+ if (!this.phoneNumberToText || this.phoneNumberToText.length !== 14) {
213
+ this.hasPhoneNumberError = true;
214
+ }
215
+ if (this.hasPhoneNumberError) {
216
+ return;
217
+ }
218
+ try {
219
+ this.submittingTextUsOption = true;
220
+ await createTextWithUs(
221
+ this.phoneNumberToText,
222
+ this.buildingId,
223
+ this.orgSlug,
224
+ this.buildingSlug,
225
+ [
226
+ ...new Set(
227
+ this.currentLeadSource
228
+ ? [
229
+ this.currentLeadSource,
230
+ getDefaultLeadSourceAttribution(this.orgSlug),
231
+ ]
232
+ : [getDefaultLeadSourceAttribution(this.orgSlug)]
233
+ ),
234
+ ],
235
+ this.leadSourceClient?.chatId
236
+ );
237
+ this.leadSourceClient?.checkAndHandleForLogLeadSource({
238
+ webchatAction: "text-us",
239
+ stateId: null,
240
+ });
241
+ this.hasSubmittedForm = true;
242
+ this.submittingTextUsOption = false;
243
+ } catch (e) {
244
+ this.submittingTextUsOption = false;
245
+ this.hasSubmissionError = true;
246
+ }
247
+ };
248
+
249
+ onChangePhoneNumber = (e: Event): void => {
250
+ if (!e.target || !this.phoneNumberInputRef.value) {
251
+ return;
252
+ }
253
+ if (isModifierKey(e as KeyboardEvent)) {
254
+ return;
255
+ }
256
+ const inputElement = e.target as HTMLInputElement;
257
+
258
+ this.phoneNumberToText = formatToPhoneInput(inputElement.value);
259
+
260
+ this.phoneNumberInputRef.value.value = this.phoneNumberToText;
261
+ };
262
+
263
+ private renderFormTextUsOption = (): TemplateResult => {
264
+ return html` <div class="text-us-wrapper">
265
+ <h1 class="text-us-window__header">Send Us a Text</h1>
266
+ <div class="text-us-window__input-container">
267
+ <input
268
+ ${ref(this.phoneNumberInputRef)}
269
+ maxlength="14"
270
+ type="text"
271
+ placeholder="Enter phone"
272
+ inputmode="tel"
273
+ class=${classMap({
274
+ ["webchat-input"]: true,
275
+ ["text-us-window__input-container"]: true,
276
+ ["webchat-font__desktop"]: !isMobile(),
277
+ ["webchat-font__mobile"]: isMobile(),
278
+ })}
279
+ .value=${this.phoneNumberToText}
280
+ @keydown=${this.enforcePhoneFormat}
281
+ @keyup=${this.onChangePhoneNumber}
282
+ />
283
+ <div class="text-us-window__submit-text">
284
+ <action-confirm-button
285
+ .onClick=${this.onSubmitTextUs}
286
+ .isLoading=${this.submittingTextUsOption}
287
+ text="SEND"
288
+ ></action-confirm-button>
289
+ </div>
290
+ ${this.hasPhoneNumberError
291
+ ? html`
292
+ <div class="text-us-window__error">
293
+ Enter a valid phone number
294
+ </div>
295
+ `
296
+ : ""}
297
+ </div>
298
+
299
+ <div class="text-us-window__description">
300
+ By providing your number and clicking send, you consent to recurring
301
+ marketing text messages and calls from or for ${this.buildingName} at
302
+ this number, which may be sent by an autodialer system. Replies may be
303
+ AI or human generated. This consent is not required to lease at this
304
+ property. Msg & Data rates may apply. You consent to this
305
+ <a target="_blank" href="http://bit.ly/me_privacy_policy"
306
+ >privacy policy</a
307
+ >, including having your communications recorded by a third party.
308
+ </div>
309
+ </div>`;
310
+ };
311
+
312
+ private renderSubmittedTextUsOption = (): TemplateResult => {
313
+ return html`
314
+ <div id="text-us-container-focus" class="text-us-wrapper">
315
+ <div class="text-us-window__vertical-spacer"></div>
316
+ <svg
317
+ width="20"
318
+ height="20"
319
+ viewBox="0 0 20 20"
320
+ fill="none"
321
+ xmlns="http://www.w3.org/2000/svg"
322
+ >
323
+ <path
324
+ d="M4.455 16L0 19.5V1C0 0.734784 0.105357 0.48043 0.292893 0.292893C0.48043 0.105357 0.734784 0 1 0H19C19.2652 0 19.5196 0.105357 19.7071 0.292893C19.8946 0.48043 20 0.734784 20 1V15C20 15.2652 19.8946 15.5196 19.7071 15.7071C19.5196 15.8946 19.2652 16 19 16H4.455ZM2 15.385L3.763 14H18V2H2V15.385ZM10 7V4L14 8L10 12V9H6V7H10Z"
325
+ fill="#202020"
326
+ />
327
+ </svg>
328
+ <div class="text-us-window__description">
329
+ Thank you!<br />Look for a text message from our team. We can answer
330
+ questions and help you book a tour through text.
331
+ </div>
332
+ <div class="text-us-window__description">
333
+ Opt out at anytime by texting “Stop”
334
+ </div>
335
+ </div>
336
+ `;
337
+ };
338
+
105
339
  render = (): TemplateResult => {
106
340
  return html`
107
341
  <details-window
342
+ id="details-window"
108
343
  height=${this.hasTextUsEnabled ? "600px" : "443px"}
109
- headerText="${this.chatCallUsHeader}"
110
344
  .onCloseClick=${this.onCloseClicked}
111
- useGradientDesign="true"
112
345
  >
113
- <div class="call-us-window__content-wrapper">
114
- <div class="call-us-window__call-us-text">
115
- Contact our leasing team
116
- </div>
117
- <div class="call-us-window__phone-redirect">
118
- ${SimplePhoneIcon} ${this.getCallLink(this.phoneNumber)}
119
- </div>
120
- <div class="call-us-window__office-hours-wrapper">
121
- <div class="call-us-window__office-hours-header">Office hours</div>
122
- </div>
123
- ${this.officeHoursTextInfo.map((oh) => {
124
- if (typeof oh === "string") {
125
- return html`
126
- <div class="call-us-window__day-of-week-wrapper">
127
- <div class="call-us-window__day-of-week">${oh}</div>
128
- <div class="call-us-window__closed">Closed</div>
129
- </div>
130
- `;
131
- }
132
- return html`
133
- <div class="call-us-window__day-of-week-wrapper">
134
- <div class="call-us-window__day-of-week">${oh.dayOfWeek}</div>
135
- <div class="call-us-window__open-times">
136
- ${oh.startTime}&nbsp;&ndash;&nbsp;${oh.endTime}
137
- </div>
346
+ ${this.hasCallUsEnabled
347
+ ? html` <div id="call-us-window__content-wrapper">
348
+ <h1 class="call-us-window__call-us-text call-us-window__header">
349
+ Contact Our Leasing Team
350
+ </h1>
351
+ <div class="call-us-window__phone-redirect">
352
+ ${PhoneBlackStrokeIcon}
353
+ ${this.getCallLink(this.phoneNumberToCall)}
138
354
  </div>
139
- `;
140
- })}
141
- </div>
355
+ <div class="call-us-window__office-hours-wrapper">
356
+ <h1 class="call-us-window__oh-header call-us-window__header">
357
+ Office Hours
358
+ </h1>
359
+ ${this.officeHoursTextInfo.map((oh) => {
360
+ if (typeof oh === "string") {
361
+ return html`
362
+ <div class="call-us-window__day-of-week-wrapper">
363
+ <div class="call-us-window__day-of-week">${oh}</div>
364
+ <div class="call-us-window__closed">Closed</div>
365
+ </div>
366
+ `;
367
+ }
368
+ return html`
369
+ <div class="call-us-window__day-of-week-wrapper">
370
+ <div class="call-us-window__day-of-week">
371
+ ${oh.dayOfWeek}
372
+ </div>
373
+ <div class="call-us-window__open-times">
374
+ ${oh.startTime}&nbsp;&ndash;&nbsp;${oh.endTime}
375
+ </div>
376
+ </div>
377
+ `;
378
+ })}
379
+ </div>
380
+ </div>`
381
+ : ""}
142
382
  ${this.hasTextUsEnabled
143
- ? html` <text-us-window
144
- .buildingId=${this.buildingId}
145
- inPopup=${!this.hasTextUsEnabled}
146
- ></text-us-window>`
383
+ ? this.hasSubmittedForm
384
+ ? this.renderSubmittedTextUsOption()
385
+ : this.renderFormTextUsOption()
147
386
  : ""}
148
387
  </details-window>
149
388
  `;
@@ -155,3 +394,47 @@ export const installCallUsWindow = (): void => {
155
394
  window.customElements.define("call-us-window", CallUsWindow);
156
395
  }
157
396
  };
397
+
398
+ const createTextWithUs = async (
399
+ rawPhoneNumber: string,
400
+ buildingId: number,
401
+ orgSlug: string,
402
+ buildingSlug: string,
403
+ leadSources: string[],
404
+ chatId?: string | null
405
+ ) => {
406
+ const formattedPhoneNumber =
407
+ "+1" +
408
+ rawPhoneNumber
409
+ .replace("(", "")
410
+ .replace(")", "")
411
+ .replace(" ", "")
412
+ .replace("-", "");
413
+ const queryParams = new URLSearchParams(window.location.search);
414
+ const requestBody = {
415
+ building_id: buildingId,
416
+ lead_sources: leadSources,
417
+ phone_number: formattedPhoneNumber,
418
+ referrer: document.referrer,
419
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
420
+ // @ts-ignore
421
+ query_params: Object.fromEntries(queryParams.entries()),
422
+ conversation_tracking_id: chatId,
423
+ };
424
+ pushGtmEvent("textUsSubmitted", {
425
+ phone: formattedPhoneNumber,
426
+ originatingSource:
427
+ leadSources.find((i) => i !== "property-website") || null,
428
+ });
429
+ await axios.post(
430
+ "https://app.meetelise.com/platformApi/state/create/textMe",
431
+ requestBody,
432
+ {
433
+ headers: {
434
+ ["building-slug"]: buildingSlug,
435
+ ["org-slug"]: orgSlug,
436
+ ["X-SecurityKey"]: "JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG",
437
+ },
438
+ }
439
+ );
440
+ };
@@ -1,6 +1,5 @@
1
1
  import { css, html, LitElement, TemplateResult } from "lit";
2
2
  import { customElement, property, state } from "lit/decorators.js";
3
- import { classMap } from "lit/directives/class-map.js";
4
3
  import { styleMap } from "lit/directives/style-map.js";
5
4
  import { isMobile } from "../../utils";
6
5
 
@@ -8,13 +7,25 @@ import { isMobile } from "../../utils";
8
7
  export class DetailsWindow extends LitElement {
9
8
  static styles = css`
10
9
  .details-window-wrapper {
11
- background: rgba(255, 255, 255, 0.75);
10
+ background: rgba(255, 255, 255, 0.9);
12
11
  box-shadow: 0px 0px 14px 5px rgba(0, 0, 0, 0.25);
13
- backdrop-filter: blur(10px);
14
- font-family: "Poppins";
15
- color: #202020;
16
- padding: 20px;
12
+ backdrop-filter: blur(5px);
13
+ /* Note: backdrop-filter has minimal browser support */
14
+
17
15
  border-radius: 10px 0px 0px 10px;
16
+ padding: 49px 18px 24px;
17
+ }
18
+
19
+ .close-window-button {
20
+ position: absolute;
21
+ top: 22px;
22
+ right: 20px;
23
+ cursor: pointer;
24
+ width: 20px;
25
+ height: 20px;
26
+ }
27
+ .close-window-button:hover {
28
+ filter: brightness(90%);
18
29
  }
19
30
 
20
31
  .gradient-window-wrapper {
@@ -37,14 +48,17 @@ export class DetailsWindow extends LitElement {
37
48
  justify-content: space-between;
38
49
  }
39
50
  .header-text {
40
- font-family: "Helvetica";
51
+ font-weight: 700;
52
+ font-size: 14px;
53
+ line-height: 22px;
54
+
55
+ font-family: "Helvetica", Arial;
41
56
  font-style: normal;
42
57
  font-weight: 700;
43
- font-size: 16px;
44
- line-height: 24px;
58
+ font-size: 14px;
59
+ line-height: 140%;
45
60
 
46
61
  color: #202020;
47
- margin-top: 20px;
48
62
  margin-bottom: 14px;
49
63
  }
50
64
 
@@ -87,18 +101,18 @@ export class DetailsWindow extends LitElement {
87
101
  render(): TemplateResult {
88
102
  return html`
89
103
  <div
90
- class=${classMap({
91
- ["gradient-window-wrapper"]: this.useGradientDesign,
92
- ["details-window-wrapper"]: !this.useGradientDesign,
93
- })}
104
+ id="details-window-inner"
105
+ class="details-window-wrapper"
94
106
  style=${styleMap({
95
107
  width: this.isMobileSized ? "-webkit-fill-available" : this.width,
96
108
  })}
97
109
  >
98
110
  <div class="details-window-header">
99
- <div class="header-text">${this.headerText}</div>
111
+ ${this.headerText
112
+ ? html` <div class="header-text">${this.headerText}</div>`
113
+ : ""}
100
114
  ${this.onCloseClick
101
- ? html`<div @click=${this.onCloseClick}>
115
+ ? html`<div @click=${this.onCloseClick} class="close-window-button">
102
116
  <svg
103
117
  width="19"
104
118
  height="19"