@meetelise/chat 1.43.38 → 1.43.40
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/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +1 -0
- package/dist/src/WebComponent/actions/action-confirm-button.d.ts +1 -0
- package/dist/src/WebComponent/me-select.d.ts +2 -0
- package/package.json +1 -1
- package/public/dist/index.js +177 -117
- package/src/WebComponent/Scheduler/date-picker.ts +75 -49
- package/src/WebComponent/Scheduler/time-picker.ts +25 -39
- package/src/WebComponent/Scheduler/tour-scheduler.ts +29 -16
- package/src/WebComponent/Scheduler/tour-type-option.ts +10 -6
- package/src/WebComponent/actions/action-confirm-button.ts +5 -1
- package/src/WebComponent/launcher/Launcher.ts +30 -11
- package/src/WebComponent/me-select.ts +28 -6
- package/src/disclaimers.ts +12 -1
- package/src/main/MEChat.ts +2 -4
|
@@ -140,7 +140,7 @@ export class DatePicker extends LitElement {
|
|
|
140
140
|
margin-bottom: 13px;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
h2 {
|
|
144
144
|
font-weight: 600;
|
|
145
145
|
font-size: 12px;
|
|
146
146
|
margin: 0;
|
|
@@ -154,6 +154,23 @@ export class DatePicker extends LitElement {
|
|
|
154
154
|
align-items: center;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
#arrows button {
|
|
158
|
+
background: none;
|
|
159
|
+
border: none;
|
|
160
|
+
padding: 0;
|
|
161
|
+
margin: 0;
|
|
162
|
+
cursor: pointer;
|
|
163
|
+
display: inline-flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: center;
|
|
166
|
+
color: inherit;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
#arrows button:disabled {
|
|
170
|
+
cursor: default;
|
|
171
|
+
opacity: 0.4;
|
|
172
|
+
}
|
|
173
|
+
|
|
157
174
|
#rows {
|
|
158
175
|
display: flex;
|
|
159
176
|
flex-direction: column;
|
|
@@ -306,8 +323,19 @@ export class DatePicker extends LitElement {
|
|
|
306
323
|
const hasNoAvailabilities =
|
|
307
324
|
!this.availabilities?.[dateString] ||
|
|
308
325
|
this.availabilities?.[dateString]?.length === 0;
|
|
326
|
+
const isStartOverflow = index < extraDaysAtBeginningOfMonth.length;
|
|
327
|
+
const isEndOverflow =
|
|
328
|
+
index >= extraDaysAtBeginningOfMonth.length + daysOfMonth.length;
|
|
329
|
+
const cellDate = new Date(
|
|
330
|
+
this.yearShown,
|
|
331
|
+
this.monthShown + (isStartOverflow ? -1 : isEndOverflow ? 1 : 0),
|
|
332
|
+
dayNumber
|
|
333
|
+
);
|
|
334
|
+
const cellAriaLabel = format(cellDate, "MMMM d, y");
|
|
309
335
|
return html`<button
|
|
310
336
|
?disabled=${isPast || hasNoAvailabilities || isDifferentMonth}
|
|
337
|
+
aria-label=${cellAriaLabel}
|
|
338
|
+
aria-pressed=${isSelected ? "true" : "false"}
|
|
311
339
|
class="dayNumber ${classMap({
|
|
312
340
|
past: isPast,
|
|
313
341
|
differentMonth: isDifferentMonth,
|
|
@@ -322,9 +350,15 @@ export class DatePicker extends LitElement {
|
|
|
322
350
|
const rows = chunk(7, dayElements);
|
|
323
351
|
|
|
324
352
|
return html`
|
|
325
|
-
<div
|
|
353
|
+
<div
|
|
354
|
+
id="calendar"
|
|
355
|
+
role="group"
|
|
356
|
+
aria-label="Calendar, ${monthNames[this.monthShown]} ${this.yearShown}"
|
|
357
|
+
>
|
|
326
358
|
<div id="header">
|
|
327
|
-
<
|
|
359
|
+
<h2 aria-live="polite" aria-atomic="true">
|
|
360
|
+
${monthNames[this.monthShown]} ${this.yearShown}
|
|
361
|
+
</h2>
|
|
328
362
|
<div
|
|
329
363
|
id="arrows"
|
|
330
364
|
@click="${(e: MouseEvent) => {
|
|
@@ -341,55 +375,47 @@ export class DatePicker extends LitElement {
|
|
|
341
375
|
this.monthShown++;
|
|
342
376
|
}
|
|
343
377
|
}}"
|
|
344
|
-
@keydown="${(e: KeyboardEvent) => {
|
|
345
|
-
if (![" ", "Enter"].includes(e.key)) {
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
if (
|
|
349
|
-
(e.target as HTMLElement)?.closest("#back") &&
|
|
350
|
-
!isSameMonth(
|
|
351
|
-
this.now,
|
|
352
|
-
new Date(this.yearShown, this.monthShown, 1)
|
|
353
|
-
)
|
|
354
|
-
) {
|
|
355
|
-
e.preventDefault();
|
|
356
|
-
e.stopPropagation();
|
|
357
|
-
this.monthShown--;
|
|
358
|
-
} else if ((e.target as HTMLElement)?.closest("#forward")) {
|
|
359
|
-
e.preventDefault();
|
|
360
|
-
e.stopPropagation();
|
|
361
|
-
this.monthShown++;
|
|
362
|
-
}
|
|
363
|
-
}}"
|
|
364
378
|
>
|
|
365
|
-
<
|
|
379
|
+
<button
|
|
366
380
|
id="back"
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
>
|
|
374
|
-
<path
|
|
375
|
-
d="M8.67727 2.34317L7.26305 0.928955L0.192017 8.00001L7.26308 15.0711L8.6773 13.6569L3.02044 8L8.67727 2.34317Z"
|
|
376
|
-
fill="#83818E"
|
|
377
|
-
/>
|
|
378
|
-
</svg>
|
|
379
|
-
<svg
|
|
380
|
-
id="forward"
|
|
381
|
-
tabindex="0"
|
|
382
|
-
width="9"
|
|
383
|
-
height="16"
|
|
384
|
-
viewBox="0 0 9 16"
|
|
385
|
-
fill="none"
|
|
386
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
381
|
+
type="button"
|
|
382
|
+
aria-label="Previous month"
|
|
383
|
+
?disabled=${isSameMonth(
|
|
384
|
+
this.now,
|
|
385
|
+
new Date(this.yearShown, this.monthShown, 1)
|
|
386
|
+
)}
|
|
387
387
|
>
|
|
388
|
-
<
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
388
|
+
<svg
|
|
389
|
+
aria-hidden="true"
|
|
390
|
+
focusable="false"
|
|
391
|
+
width="9"
|
|
392
|
+
height="16"
|
|
393
|
+
viewBox="0 0 9 16"
|
|
394
|
+
fill="none"
|
|
395
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
396
|
+
>
|
|
397
|
+
<path
|
|
398
|
+
d="M8.67727 2.34317L7.26305 0.928955L0.192017 8.00001L7.26308 15.0711L8.6773 13.6569L3.02044 8L8.67727 2.34317Z"
|
|
399
|
+
fill="#83818E"
|
|
400
|
+
/>
|
|
401
|
+
</svg>
|
|
402
|
+
</button>
|
|
403
|
+
<button id="forward" type="button" aria-label="Next month">
|
|
404
|
+
<svg
|
|
405
|
+
aria-hidden="true"
|
|
406
|
+
focusable="false"
|
|
407
|
+
width="9"
|
|
408
|
+
height="16"
|
|
409
|
+
viewBox="0 0 9 16"
|
|
410
|
+
fill="none"
|
|
411
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
412
|
+
>
|
|
413
|
+
<path
|
|
414
|
+
d="M0.157227 2.34315L1.57144 0.928932L8.64251 8L1.57144 15.0711L0.157227 13.6569L5.81408 8L0.157227 2.34315Z"
|
|
415
|
+
fill="#83818E"
|
|
416
|
+
/>
|
|
417
|
+
</svg>
|
|
418
|
+
</button>
|
|
393
419
|
</div>
|
|
394
420
|
</div>
|
|
395
421
|
|
|
@@ -108,7 +108,10 @@ export class TimePicker extends LitElement {
|
|
|
108
108
|
border-radius: 10px;
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-size: 14px;
|
|
111
|
+
font-family: inherit;
|
|
112
|
+
color: inherit;
|
|
111
113
|
user-select: none;
|
|
114
|
+
cursor: pointer;
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
.option.selected {
|
|
@@ -179,50 +182,33 @@ export class TimePicker extends LitElement {
|
|
|
179
182
|
<div
|
|
180
183
|
id="optionContainer"
|
|
181
184
|
@click="${(e: MouseEvent) => {
|
|
182
|
-
const target = e.target as HTMLElement |
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
const target = (e.target as HTMLElement | null)?.closest(
|
|
186
|
+
".option"
|
|
187
|
+
) as HTMLButtonElement | null;
|
|
188
|
+
if (!target) return;
|
|
189
|
+
const value = target.dataset.displayTimeZoned ?? "";
|
|
190
|
+
const isAlreadySelected =
|
|
191
|
+
value === this.selected?.displayTimeZoned;
|
|
192
|
+
this.selected = isAlreadySelected
|
|
193
|
+
? undefined
|
|
194
|
+
: getDateWithTimezoneOffset(this.options, value);
|
|
189
195
|
this.dispatchEvent(
|
|
190
196
|
new Event("change", { bubbles: true, composed: true })
|
|
191
197
|
);
|
|
192
198
|
}}"
|
|
193
|
-
@keydown="${(e: KeyboardEvent) => {
|
|
194
|
-
const target = e.target as HTMLElement | undefined;
|
|
195
|
-
if (
|
|
196
|
-
[" ", "Enter"].includes(e.key) &&
|
|
197
|
-
target?.closest(".option")
|
|
198
|
-
) {
|
|
199
|
-
e.preventDefault();
|
|
200
|
-
this.selected =
|
|
201
|
-
target.innerText !== this.selected?.displayTimeZoned
|
|
202
|
-
? getDateWithTimezoneOffset(
|
|
203
|
-
this.options,
|
|
204
|
-
target.innerText
|
|
205
|
-
)
|
|
206
|
-
: undefined;
|
|
207
|
-
this.dispatchEvent(
|
|
208
|
-
new Event("change", { bubbles: true, composed: true })
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}}"
|
|
212
199
|
>
|
|
213
|
-
${this.options.map(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
)}
|
|
200
|
+
${this.options.map((option) => {
|
|
201
|
+
const isSelected =
|
|
202
|
+
this.selected?.displayTimeZoned === option.displayTimeZoned;
|
|
203
|
+
return html`<button
|
|
204
|
+
type="button"
|
|
205
|
+
class="option ${classMap({ selected: isSelected })}"
|
|
206
|
+
aria-pressed=${isSelected ? "true" : "false"}
|
|
207
|
+
data-display-time-zoned=${option.displayTimeZoned}
|
|
208
|
+
>
|
|
209
|
+
<span>${option.displayTimeZoned}</span>
|
|
210
|
+
</button>`;
|
|
211
|
+
})}
|
|
226
212
|
</div>
|
|
227
213
|
<p class="timezone-display-text">
|
|
228
214
|
*All times displayed are in the community's local time
|
|
@@ -64,6 +64,19 @@ import { LeadSourceMultitouchClient } from "../LeadSourceMultitouchClient";
|
|
|
64
64
|
|
|
65
65
|
@customElement("tour-scheduler")
|
|
66
66
|
export class TourScheduler extends LitElement {
|
|
67
|
+
connectedCallback(): void {
|
|
68
|
+
super.connectedCallback();
|
|
69
|
+
if (!this.hasAttribute("role")) {
|
|
70
|
+
this.setAttribute("role", "dialog");
|
|
71
|
+
}
|
|
72
|
+
if (!this.hasAttribute("aria-modal")) {
|
|
73
|
+
this.setAttribute("aria-modal", "true");
|
|
74
|
+
}
|
|
75
|
+
if (!this.hasAttribute("aria-label")) {
|
|
76
|
+
this.setAttribute("aria-label", "Schedule a Tour");
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
67
80
|
@property({ attribute: false })
|
|
68
81
|
tourTypeOptions: LabeledOption[] = [];
|
|
69
82
|
@property({ attribute: true })
|
|
@@ -749,8 +762,12 @@ export class TourScheduler extends LitElement {
|
|
|
749
762
|
static styles = [tourSchedulerStyles, InputStyles];
|
|
750
763
|
|
|
751
764
|
tourTypeMenu(): TemplateResult {
|
|
752
|
-
return html`<h2 class="journey-header">Tour Type</h2>
|
|
753
|
-
<div
|
|
765
|
+
return html`<h2 id="tour-type-heading" class="journey-header">Tour Type</h2>
|
|
766
|
+
<div
|
|
767
|
+
id="tour-type-menu"
|
|
768
|
+
role="radiogroup"
|
|
769
|
+
aria-labelledby="tour-type-heading"
|
|
770
|
+
>
|
|
754
771
|
${this.shouldShowTourType[TourType.Self]
|
|
755
772
|
? html` <tour-type-option
|
|
756
773
|
heading="Take a tour"
|
|
@@ -933,10 +950,7 @@ export class TourScheduler extends LitElement {
|
|
|
933
950
|
if (
|
|
934
951
|
this.tourType === TourType.Guided &&
|
|
935
952
|
this.escortedToursLink &&
|
|
936
|
-
shouldOpenTourLink(
|
|
937
|
-
this.tourType,
|
|
938
|
-
this.escortedToursTypeOffered
|
|
939
|
-
)
|
|
953
|
+
shouldOpenTourLink(this.tourType, this.escortedToursTypeOffered)
|
|
940
954
|
) {
|
|
941
955
|
window.open(this.escortedToursLink, "_blank");
|
|
942
956
|
return;
|
|
@@ -1054,8 +1068,7 @@ export class TourScheduler extends LitElement {
|
|
|
1054
1068
|
return html` <button
|
|
1055
1069
|
id="close-button"
|
|
1056
1070
|
@click=${this.onCloseClicked}
|
|
1057
|
-
aria-label="Close"
|
|
1058
|
-
aria-describedby="close-button"
|
|
1071
|
+
aria-label="Close scheduler"
|
|
1059
1072
|
>
|
|
1060
1073
|
<svg
|
|
1061
1074
|
width="19"
|
|
@@ -1445,14 +1458,14 @@ export class TourScheduler extends LitElement {
|
|
|
1445
1458
|
<div id="scheduler-container">
|
|
1446
1459
|
<div>
|
|
1447
1460
|
<h2 class="journey-header">Reschedule Tour</h2>
|
|
1448
|
-
<
|
|
1461
|
+
<div class="explanation">
|
|
1449
1462
|
You already have a tour scheduled. Would you like to
|
|
1450
1463
|
reschedule?
|
|
1451
|
-
</
|
|
1464
|
+
</div>
|
|
1452
1465
|
</div>
|
|
1453
1466
|
</div>
|
|
1454
1467
|
<div id="tour-scheduler-footer">
|
|
1455
|
-
<
|
|
1468
|
+
<div class="explanation">
|
|
1456
1469
|
We'll send a confirmation and any follow-ups to your email
|
|
1457
1470
|
address, please reply to the email to make any appointment
|
|
1458
1471
|
changes.
|
|
@@ -1464,7 +1477,7 @@ export class TourScheduler extends LitElement {
|
|
|
1464
1477
|
orgSlug: this.orgSlug,
|
|
1465
1478
|
clickingButtonText: "schedule tour",
|
|
1466
1479
|
})}
|
|
1467
|
-
</
|
|
1480
|
+
</div>
|
|
1468
1481
|
|
|
1469
1482
|
<div class="reschedule-buttons-wrapper">
|
|
1470
1483
|
<action-confirm-button
|
|
@@ -1506,7 +1519,7 @@ export class TourScheduler extends LitElement {
|
|
|
1506
1519
|
</div>
|
|
1507
1520
|
</div>
|
|
1508
1521
|
<div id="tour-scheduler-footer">
|
|
1509
|
-
<
|
|
1522
|
+
<div class="explanation">
|
|
1510
1523
|
We'll send a confirmation and any follow-ups to your email
|
|
1511
1524
|
address, please reply to the email to make any appointment
|
|
1512
1525
|
changes.
|
|
@@ -1518,7 +1531,7 @@ export class TourScheduler extends LitElement {
|
|
|
1518
1531
|
orgSlug: this.orgSlug,
|
|
1519
1532
|
clickingButtonText: "schedule tour",
|
|
1520
1533
|
})}
|
|
1521
|
-
</
|
|
1534
|
+
</div>
|
|
1522
1535
|
|
|
1523
1536
|
<action-confirm-button
|
|
1524
1537
|
id="schedule-bttn"
|
|
@@ -1575,10 +1588,10 @@ export class TourScheduler extends LitElement {
|
|
|
1575
1588
|
? html` <div id="scheduler-container">
|
|
1576
1589
|
<div>
|
|
1577
1590
|
<h2 class="journey-header">Reschedule Tour</h2>
|
|
1578
|
-
<
|
|
1591
|
+
<div class="explanation">
|
|
1579
1592
|
You already have a tour scheduled. Would you like to
|
|
1580
1593
|
reschedule?
|
|
1581
|
-
</
|
|
1594
|
+
</div>
|
|
1582
1595
|
</div>
|
|
1583
1596
|
</div>
|
|
1584
1597
|
<div id="tour-scheduler-footer">
|
|
@@ -67,17 +67,18 @@ export class TourTypeOption extends LitElement {
|
|
|
67
67
|
color: #ffffff;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
.heading,
|
|
71
|
+
.subtitle {
|
|
72
72
|
font-size: 15px;
|
|
73
73
|
margin: 0;
|
|
74
|
+
display: block;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
.heading {
|
|
77
78
|
font-weight: 600;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
|
|
81
|
+
.subtitle {
|
|
81
82
|
font-weight: 400;
|
|
82
83
|
}
|
|
83
84
|
`,
|
|
@@ -87,7 +88,10 @@ export class TourTypeOption extends LitElement {
|
|
|
87
88
|
return html`
|
|
88
89
|
<div
|
|
89
90
|
class="tour-type-option"
|
|
91
|
+
role="radio"
|
|
90
92
|
tabindex="0"
|
|
93
|
+
aria-checked=${this.selected ? "true" : "false"}
|
|
94
|
+
aria-label="${this.heading} ${this.subtitle}"
|
|
91
95
|
style=${styleMap({
|
|
92
96
|
background: this.selected ? this.primaryColor : undefined,
|
|
93
97
|
})}
|
|
@@ -102,8 +106,8 @@ export class TourTypeOption extends LitElement {
|
|
|
102
106
|
: this.foregroundColorOnSecondaryBackgroundColor,
|
|
103
107
|
})}
|
|
104
108
|
>
|
|
105
|
-
<
|
|
106
|
-
<
|
|
109
|
+
<span class="heading">${this.heading}</span>
|
|
110
|
+
<span class="subtitle">${this.subtitle}</span>
|
|
107
111
|
</div>
|
|
108
112
|
</div>
|
|
109
113
|
</div>
|
|
@@ -4,6 +4,11 @@ import { customElement, property } from "lit/decorators.js";
|
|
|
4
4
|
|
|
5
5
|
@customElement("action-confirm-button")
|
|
6
6
|
export class ActionConfirmButton extends LitElement {
|
|
7
|
+
static shadowRootOptions: ShadowRootInit = {
|
|
8
|
+
...LitElement.shadowRootOptions,
|
|
9
|
+
delegatesFocus: true,
|
|
10
|
+
};
|
|
11
|
+
|
|
7
12
|
static styles = [
|
|
8
13
|
css`
|
|
9
14
|
.action-confirm-button {
|
|
@@ -104,7 +109,6 @@ export class ActionConfirmButton extends LitElement {
|
|
|
104
109
|
@click=${!this.isLoading ? this.onClick : null}
|
|
105
110
|
?disabled=${this.disabled}
|
|
106
111
|
style=${`height: ${this.height}; width: ${this.width};`}
|
|
107
|
-
tabindex="0"
|
|
108
112
|
>
|
|
109
113
|
${!this.isLoading
|
|
110
114
|
? this.text
|
|
@@ -797,9 +797,11 @@ export class Launcher extends LitElement {
|
|
|
797
797
|
const verticalPillListItems: {
|
|
798
798
|
pillKey: string;
|
|
799
799
|
pill: TemplateResult | null;
|
|
800
|
+
optionLabel: string;
|
|
800
801
|
}[] = [
|
|
801
802
|
{
|
|
802
803
|
pillKey: "Chat",
|
|
804
|
+
optionLabel: "Chat with us",
|
|
803
805
|
pill: this.hasChatEnabledDesktop
|
|
804
806
|
? html`
|
|
805
807
|
<button
|
|
@@ -844,6 +846,7 @@ export class Launcher extends LitElement {
|
|
|
844
846
|
},
|
|
845
847
|
{
|
|
846
848
|
pillKey: "Price Calculator",
|
|
849
|
+
optionLabel: "Calculate cost",
|
|
847
850
|
pill: this.hasPricingCalculatorEnabledDesktop
|
|
848
851
|
? html`
|
|
849
852
|
<button
|
|
@@ -875,6 +878,7 @@ export class Launcher extends LitElement {
|
|
|
875
878
|
},
|
|
876
879
|
{
|
|
877
880
|
pillKey: "SST",
|
|
881
|
+
optionLabel: "Book a tour",
|
|
878
882
|
pill: this.hasSSTEnabledDesktop
|
|
879
883
|
? html`
|
|
880
884
|
<button
|
|
@@ -921,6 +925,7 @@ export class Launcher extends LitElement {
|
|
|
921
925
|
},
|
|
922
926
|
{
|
|
923
927
|
pillKey: "Email",
|
|
928
|
+
optionLabel: "Email an agent",
|
|
924
929
|
pill: this.hasEmailEnabledDesktop
|
|
925
930
|
? html`
|
|
926
931
|
<button
|
|
@@ -958,6 +963,12 @@ export class Launcher extends LitElement {
|
|
|
958
963
|
},
|
|
959
964
|
{
|
|
960
965
|
pillKey: "Phone",
|
|
966
|
+
optionLabel:
|
|
967
|
+
this.hasCallUsEnabledDesktop && this.hasTextUsEnabledDesktop
|
|
968
|
+
? "Call or text us"
|
|
969
|
+
: this.hasCallUsEnabledDesktop
|
|
970
|
+
? "Call us"
|
|
971
|
+
: "Text us",
|
|
961
972
|
pill:
|
|
962
973
|
this.phoneNumber &&
|
|
963
974
|
(this.hasCallUsEnabledDesktop || this.hasTextUsEnabledDesktop)
|
|
@@ -1036,6 +1047,7 @@ export class Launcher extends LitElement {
|
|
|
1036
1047
|
},
|
|
1037
1048
|
{
|
|
1038
1049
|
pillKey: "Apply",
|
|
1050
|
+
optionLabel: "Apply now",
|
|
1039
1051
|
pill:
|
|
1040
1052
|
this.applicationLink && this.hasApplyNowEnabledDesktop
|
|
1041
1053
|
? html`
|
|
@@ -1081,18 +1093,25 @@ export class Launcher extends LitElement {
|
|
|
1081
1093
|
pills.unshift(sstPill);
|
|
1082
1094
|
}
|
|
1083
1095
|
}
|
|
1096
|
+
const optionLabels = pills.map((p) => p.optionLabel);
|
|
1097
|
+
if (this.overrideRentgrata && hasRentgrata()) {
|
|
1098
|
+
optionLabels.push("Contact a resident");
|
|
1099
|
+
}
|
|
1100
|
+
const navAriaLabel = optionLabels.length
|
|
1101
|
+
? `EliseAI options: ${optionLabels.join(", ")}`
|
|
1102
|
+
: "EliseAI options";
|
|
1084
1103
|
return html`
|
|
1085
1104
|
<div class="vertical-pill-list">
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
>
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1105
|
+
${this.hasChatEnabledDesktop
|
|
1106
|
+
? html`<button
|
|
1107
|
+
@click=${this.onClickMinimize}
|
|
1108
|
+
class="minimize-button"
|
|
1109
|
+
aria-label="Minimize EliseAI widget"
|
|
1110
|
+
>
|
|
1111
|
+
<div class="chevron-down">${ChevronRightIcon("black")}</div>
|
|
1112
|
+
</button>`
|
|
1113
|
+
: ""}
|
|
1114
|
+
<nav class="vertical-pill-list" aria-label=${navAriaLabel}>
|
|
1096
1115
|
${pills.map((p) => p.pill)}
|
|
1097
1116
|
${this.overrideRentgrata && hasRentgrata()
|
|
1098
1117
|
? html`<button
|
|
@@ -1118,7 +1137,7 @@ export class Launcher extends LitElement {
|
|
|
1118
1137
|
<div class="chevron-right">${ChevronRightIcon("black")}</div>
|
|
1119
1138
|
</button>`
|
|
1120
1139
|
: ""}
|
|
1121
|
-
</
|
|
1140
|
+
</nav>
|
|
1122
1141
|
</div>
|
|
1123
1142
|
`;
|
|
1124
1143
|
};
|
|
@@ -204,7 +204,17 @@ export class MESelect extends LitElement {
|
|
|
204
204
|
this.meSelect.style.color = "rgba(32, 32, 32, 1)";
|
|
205
205
|
}
|
|
206
206
|
};
|
|
207
|
+
|
|
208
|
+
private listboxId = `me-select-listbox-${Math.random()
|
|
209
|
+
.toString(36)
|
|
210
|
+
.slice(2, 9)}`;
|
|
211
|
+
|
|
212
|
+
private optionId = (index: number): string =>
|
|
213
|
+
`${this.listboxId}-opt-${index}`;
|
|
214
|
+
|
|
207
215
|
render(): TemplateResult {
|
|
216
|
+
const activeIndex = this.activeOptionIndex;
|
|
217
|
+
const accessibleName = this.placeholder ?? "Select";
|
|
208
218
|
return html`
|
|
209
219
|
<div id="outer-select-container">
|
|
210
220
|
<div
|
|
@@ -215,6 +225,14 @@ export class MESelect extends LitElement {
|
|
|
215
225
|
["webchat-font__mobile"]: isMobile(),
|
|
216
226
|
})}
|
|
217
227
|
tabindex="0"
|
|
228
|
+
role="combobox"
|
|
229
|
+
aria-haspopup="listbox"
|
|
230
|
+
aria-expanded=${this.isOpen ? "true" : "false"}
|
|
231
|
+
aria-controls=${this.listboxId}
|
|
232
|
+
aria-label=${accessibleName}
|
|
233
|
+
aria-activedescendant=${this.isOpen && activeIndex != null
|
|
234
|
+
? this.optionId(activeIndex)
|
|
235
|
+
: ""}
|
|
218
236
|
@click=${() => (this.isOpen = !this.isOpen)}
|
|
219
237
|
@keydown="${(e: KeyboardEvent) => {
|
|
220
238
|
switch (e.key) {
|
|
@@ -270,6 +288,7 @@ export class MESelect extends LitElement {
|
|
|
270
288
|
>`
|
|
271
289
|
: html` <input
|
|
272
290
|
readonly
|
|
291
|
+
tabindex="-1"
|
|
273
292
|
placeholder="${this.placeholder}"
|
|
274
293
|
.value="${this.options.find((o) => o.value === this.value)
|
|
275
294
|
?.label ||
|
|
@@ -292,24 +311,27 @@ export class MESelect extends LitElement {
|
|
|
292
311
|
</svg>
|
|
293
312
|
</div>
|
|
294
313
|
${this.isOpen
|
|
295
|
-
? html`<ul>
|
|
314
|
+
? html`<ul id=${this.listboxId} role="listbox">
|
|
296
315
|
${this.options.map(
|
|
297
|
-
(option) =>
|
|
316
|
+
(option, index) =>
|
|
298
317
|
html`<li
|
|
318
|
+
id=${this.optionId(index)}
|
|
319
|
+
role="option"
|
|
320
|
+
aria-selected=${this.value === option.value
|
|
321
|
+
? "true"
|
|
322
|
+
: "false"}
|
|
299
323
|
@click="${() => this.setSelectedOption(option)}"
|
|
300
|
-
@keydown="${this.handleKeydown(["Enter", " "], () =>
|
|
301
|
-
this.setSelectedOption(option)
|
|
302
|
-
)}"
|
|
303
324
|
@mousemove="${() => {
|
|
304
325
|
this.activeOption = option;
|
|
326
|
+
this.activeOptionIndex = index;
|
|
305
327
|
}}"
|
|
306
328
|
@mouseleave="${() => {
|
|
307
329
|
this.activeOption = null;
|
|
330
|
+
this.activeOptionIndex = null;
|
|
308
331
|
}}"
|
|
309
332
|
class="option ${classMap({
|
|
310
333
|
active: this.activeOption === option,
|
|
311
334
|
})}"
|
|
312
|
-
tabindex="0"
|
|
313
335
|
>
|
|
314
336
|
${option.label}
|
|
315
337
|
</li>`
|
package/src/disclaimers.ts
CHANGED
|
@@ -92,7 +92,18 @@ const formDisclaimer = ({
|
|
|
92
92
|
recorded and used by a third party.
|
|
93
93
|
</div>`;
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
// Default: no email or phone entered yet. Still surface the privacy policy
|
|
96
|
+
// link so it's discoverable in the tab order before the user types.
|
|
97
|
+
return html` <div style=${styleMap(disclaimerStyles.container)}>
|
|
98
|
+
By clicking ${clickingButtonText}, you consent to this
|
|
99
|
+
<a
|
|
100
|
+
style=${styleMap(disclaimerStyles.link)}
|
|
101
|
+
href="http://bit.ly/me_privacy_policy"
|
|
102
|
+
target="_blank"
|
|
103
|
+
rel="noopener noreferrer"
|
|
104
|
+
>privacy policy</a
|
|
105
|
+
>.
|
|
106
|
+
</div>`;
|
|
96
107
|
};
|
|
97
108
|
|
|
98
109
|
export const getConsentPreChatDisclaimer = (
|
package/src/main/MEChat.ts
CHANGED
|
@@ -65,10 +65,9 @@ export default class MEChat {
|
|
|
65
65
|
installFont();
|
|
66
66
|
const healthChat = document.createElement("health-chat");
|
|
67
67
|
healthChat.setAttribute("class", "health-chat");
|
|
68
|
-
healthChat.setAttribute("role", "
|
|
68
|
+
healthChat.setAttribute("role", "region");
|
|
69
69
|
healthChat.setAttribute("aria-label", "EliseAI Healthcare Widget");
|
|
70
70
|
healthChat.setAttribute("aria-describedby", "aria-describe-info");
|
|
71
|
-
healthChat.setAttribute("aria-modal", "true");
|
|
72
71
|
healthChat.setAttribute("healthcareId", opts.id);
|
|
73
72
|
|
|
74
73
|
healthChat.setAttribute("right", opts.right?.toString() || "unset");
|
|
@@ -140,10 +139,9 @@ export default class MEChat {
|
|
|
140
139
|
opts.widgetType || WidgetType.Default
|
|
141
140
|
);
|
|
142
141
|
meChatElement.setAttribute("class", "meetelise-chat");
|
|
143
|
-
meChatElement.setAttribute("role", "
|
|
142
|
+
meChatElement.setAttribute("role", "region");
|
|
144
143
|
meChatElement.setAttribute("aria-label", "EliseAI Widget");
|
|
145
144
|
meChatElement.setAttribute("aria-describedby", "aria-describe-info");
|
|
146
|
-
meChatElement.setAttribute("aria-modal", "true");
|
|
147
145
|
|
|
148
146
|
if (opts.brandColor) {
|
|
149
147
|
this.brandColor = opts.brandColor;
|