@meetelise/chat 1.74.0 → 1.76.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 (35) hide show
  1. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +6 -0
  2. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +1 -1
  3. package/dist/src/WebComponent/SchedulerV2/booking-confirmation.d.ts +2 -0
  4. package/dist/src/WebComponent/SchedulerV2/contact-form.d.ts +9 -3
  5. package/dist/src/WebComponent/SchedulerV2/itinerary-editor.d.ts +18 -1
  6. package/dist/src/WebComponent/SchedulerV2/itineraryStopStyles.d.ts +1 -2
  7. package/dist/src/WebComponent/SchedulerV2/schedulerIcons.d.ts +18 -0
  8. package/dist/src/WebComponent/SchedulerV2/schedulerRequests.d.ts +2 -0
  9. package/dist/src/WebComponent/SchedulerV2/schedulerV2Styles.d.ts +9 -0
  10. package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +17 -1
  11. package/dist/src/WebComponent/SchedulerV2/tourItineraryApi.d.ts +12 -0
  12. package/dist/src/WebComponent/SchedulerV2/tourTimes.d.ts +3 -1
  13. package/dist/src/WebComponent/actions/international-phone-input.d.ts +7 -0
  14. package/dist/src/WebComponent/me-select.d.ts +2 -0
  15. package/package.json +1 -1
  16. package/public/dist/index.js +2411 -1446
  17. package/src/WebComponent/Scheduler/date-picker.ts +130 -51
  18. package/src/WebComponent/Scheduler/time-picker.ts +62 -0
  19. package/src/WebComponent/Scheduler/tour-type-option.ts +31 -10
  20. package/src/WebComponent/SchedulerV2/booking-confirmation.ts +54 -45
  21. package/src/WebComponent/SchedulerV2/community-picker.ts +222 -160
  22. package/src/WebComponent/SchedulerV2/contact-form.ts +100 -70
  23. package/src/WebComponent/SchedulerV2/itinerary-editor.ts +316 -151
  24. package/src/WebComponent/SchedulerV2/itineraryStopStyles.ts +44 -21
  25. package/src/WebComponent/SchedulerV2/scheduler-popover.ts +6 -6
  26. package/src/WebComponent/SchedulerV2/schedulerIcons.ts +143 -0
  27. package/src/WebComponent/SchedulerV2/schedulerRequests.ts +10 -0
  28. package/src/WebComponent/SchedulerV2/schedulerV2Styles.ts +347 -0
  29. package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +493 -172
  30. package/src/WebComponent/SchedulerV2/tourItineraryApi.ts +12 -0
  31. package/src/WebComponent/SchedulerV2/tourTimes.ts +16 -3
  32. package/src/WebComponent/actions/action-confirm-button.ts +4 -3
  33. package/src/WebComponent/actions/international-phone-input.ts +84 -1
  34. package/src/WebComponent/me-select.ts +74 -0
  35. package/src/tourSchedulerV2Booking.test.ts +129 -7
@@ -3,11 +3,13 @@ import { customElement, property, state } from "lit/decorators.js";
3
3
  import { classMap } from "lit/directives/class-map.js";
4
4
  import "../actions/action-confirm-button";
5
5
  import "./scheduler-popover";
6
- import { tourSchedulerStyles } from "../Scheduler/tourSchedulerStyles";
7
- import { InputStyles } from "../actions/InputStyles";
8
- import floorplanImageCardStyles from "../FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles";
9
- import floorPlanSelectorStyles from "../FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles";
10
- import { BuildingIcon } from "../icons/BuildingIcon";
6
+ import { schedulerV2Styles } from "./schedulerV2Styles";
7
+ import {
8
+ BadgeCheckFilledIcon,
9
+ BuildingLineIcon,
10
+ CalendarLineIcon,
11
+ StarFilledIcon,
12
+ } from "./schedulerIcons";
11
13
  import {
12
14
  CommunitiesResponse,
13
15
  Community,
@@ -31,9 +33,9 @@ const EMPTY_FILTERS: CommunityFilters = {
31
33
 
32
34
  const BEDROOM_OPTIONS = [
33
35
  { value: 0, label: "Studio" },
34
- { value: 1, label: "1 bd" },
35
- { value: 2, label: "2 bd" },
36
- { value: 3, label: "3+ bd" },
36
+ { value: 1, label: "1 bed" },
37
+ { value: 2, label: "2 bed" },
38
+ { value: 3, label: "3+ bed" },
37
39
  ];
38
40
 
39
41
  type FilterId = "bedrooms" | "moveIn" | "budget";
@@ -156,7 +158,7 @@ export class CommunityPicker extends LitElement {
156
158
 
157
159
  private heading(): string {
158
160
  return this.variant === "extend"
159
- ? "Add Nearby Communities to Your Tour"
161
+ ? "Add Nearby Communities to Your Tour Itinerary"
160
162
  : "Select a Community to Tour";
161
163
  }
162
164
 
@@ -176,7 +178,7 @@ export class CommunityPicker extends LitElement {
176
178
  ? f.bedrooms
177
179
  .map(
178
180
  (n) =>
179
- BEDROOM_OPTIONS.find((o) => o.value === n)?.label ?? `${n} bd`
181
+ BEDROOM_OPTIONS.find((o) => o.value === n)?.label ?? `${n} bed`
180
182
  )
181
183
  .join(", ")
182
184
  : "Bedrooms";
@@ -193,50 +195,53 @@ export class CommunityPicker extends LitElement {
193
195
  private renderFilterPanel(id: FilterId): TemplateResult {
194
196
  const f = this.filters;
195
197
  if (id === "bedrooms") {
196
- return html`<div
197
- class="floor-plan-selector-badges"
198
- role="group"
199
- aria-label="Bedrooms"
200
- >
201
- ${BEDROOM_OPTIONS.map(
202
- (o) => html`<button
203
- class=${classMap({
204
- "floor-plan-badge": true,
205
- selected: f.bedrooms.includes(o.value),
206
- })}
207
- aria-pressed=${String(f.bedrooms.includes(o.value))}
208
- @click=${() =>
209
- this.setFilters({
210
- bedrooms: f.bedrooms.includes(o.value)
211
- ? f.bedrooms.filter((b) => b !== o.value)
212
- : [...f.bedrooms, o.value].sort(),
198
+ return html`<span class="field-label" id="bedrooms-label">Bedrooms</span>
199
+ <div class="chips" role="group" aria-labelledby="bedrooms-label">
200
+ ${BEDROOM_OPTIONS.map(
201
+ (o) => html`<button
202
+ class=${classMap({
203
+ chip: true,
204
+ selected: f.bedrooms.includes(o.value),
213
205
  })}
214
- >
215
- ${o.label}
216
- </button>`
217
- )}
218
- </div>`;
206
+ aria-pressed=${String(f.bedrooms.includes(o.value))}
207
+ @click=${() =>
208
+ this.setFilters({
209
+ bedrooms: f.bedrooms.includes(o.value)
210
+ ? f.bedrooms.filter((b) => b !== o.value)
211
+ : [...f.bedrooms, o.value].sort(),
212
+ })}
213
+ >
214
+ ${o.label}
215
+ </button>`
216
+ )}
217
+ </div>`;
219
218
  }
220
219
  if (id === "moveIn") {
221
- return html`<div class="date-field">
222
- <label for="move-in">Move-in date</label>
223
- <input
224
- id="move-in"
225
- type="date"
226
- .value=${f.moveIn ?? ""}
227
- @change=${(e: Event) => {
228
- void this.closeCommittedFilter("moveIn");
229
- this.setFilters({
230
- moveIn: (e.target as HTMLInputElement).value || null,
231
- });
232
- }}
233
- />
220
+ return html`<div class="field date-field">
221
+ <label class="field-label" for="move-in">Move-In Date</label>
222
+ <div class=${classMap({ "date-input": true, filled: !!f.moveIn })}>
223
+ <input
224
+ id="move-in"
225
+ class="input"
226
+ type="date"
227
+ .value=${f.moveIn ?? ""}
228
+ @change=${(e: Event) => {
229
+ void this.closeCommittedFilter("moveIn");
230
+ this.setFilters({
231
+ moveIn: (e.target as HTMLInputElement).value || null,
232
+ });
233
+ }}
234
+ />
235
+ <span class="date-placeholder" aria-hidden="true">Select a date</span>
236
+ ${CalendarLineIcon(14)}
237
+ </div>
234
238
  </div>`;
235
239
  }
236
- return html`<div class="date-field">
237
- <label for="max-budget">Max monthly rent ($)</label>
240
+ return html`<div class="field date-field">
241
+ <label class="field-label" for="max-budget">Max monthly rent ($)</label>
238
242
  <input
239
243
  id="max-budget"
244
+ class="input"
240
245
  type="number"
241
246
  inputmode="numeric"
242
247
  min="0"
@@ -285,7 +290,7 @@ export class CommunityPicker extends LitElement {
285
290
  <button
286
291
  slot="trigger"
287
292
  class=${classMap({
288
- "floor-plan-badge": true,
293
+ chip: true,
289
294
  selected: this.isFilterActive(id),
290
295
  })}
291
296
  aria-expanded=${String(open === id)}
@@ -327,6 +332,7 @@ export class CommunityPicker extends LitElement {
327
332
  <button
328
333
  class=${classMap({
329
334
  "floorplan-image-card": true,
335
+ card: true,
330
336
  selected,
331
337
  disabled: !c.tourable,
332
338
  })}
@@ -335,18 +341,22 @@ export class CommunityPicker extends LitElement {
335
341
  @click=${() => this.toggle(c)}
336
342
  >
337
343
  ${c.image_url
338
- ? html`<span class="section-left"
344
+ ? html`<span class="card-image"
339
345
  ><img src=${c.image_url} alt=""
340
346
  /></span>`
341
347
  : ""}
342
- <span class="section-right">
348
+ <span class="card-body">
343
349
  ${c.best_match || price || c.distance_mi !== null
344
350
  ? html`<span class="card-tags">
345
351
  ${c.best_match
346
- ? html`<span class="floor-plan-badge">Best match</span>`
352
+ ? html`<span class="tag"
353
+ >${StarFilledIcon(12)} Best Match</span
354
+ >`
347
355
  : ""}
348
356
  ${price
349
- ? html`<span class="floor-plan-badge">${price}</span>`
357
+ ? html`<span class="tag"
358
+ >${BadgeCheckFilledIcon(14)} ${price}</span
359
+ >`
350
360
  : ""}
351
361
  ${c.distance_mi !== null
352
362
  ? html`<span class="distance"
@@ -355,21 +365,24 @@ export class CommunityPicker extends LitElement {
355
365
  : ""}
356
366
  </span>`
357
367
  : ""}
358
- <span class="image-card-title">${c.name}</span>
359
- <span class="image-card-subtitle">${formatAddress(c.address)}</span>
368
+ <span class="card-name">
369
+ <span class="card-title">${c.name}</span>
370
+ <span class="subtitle">${formatAddress(c.address)}</span>
371
+ </span>
360
372
  ${!c.tourable
361
- ? html`<span class="image-card-subtitle"
362
- >${c.unavailable_reason ?? ""}</span
363
- >`
373
+ ? html`<span class="subtitle">${c.unavailable_reason ?? ""}</span>`
364
374
  : next
365
375
  ? html`<span class="next-available"
366
- >Next available:
367
- ${formatShortDate(next.date)}${this.variant === "extend"
368
- ? ` · ${formatHourMinute(next.time)}`
376
+ ><span
377
+ >Next available:
378
+ ${formatShortDate(next.date)}${this.variant === "extend"
379
+ ? ` · ${formatHourMinute(next.time)}`
380
+ : ""}</span
381
+ >${sameDay
382
+ ? html`<span class="same-day">Same Day</span>`
369
383
  : ""}</span
370
384
  >`
371
385
  : ""}
372
- ${sameDay ? html`<span class="same-day">Same day</span>` : ""}
373
386
  </span>
374
387
  </button>
375
388
  </li>`;
@@ -379,9 +392,7 @@ export class CommunityPicker extends LitElement {
379
392
  if (this.loading && this.communities.length === 0) {
380
393
  return html`<div class="community-grid" role="status">
381
394
  <span class="sr-only">Loading communities</span>
382
- ${[0, 1, 2, 3].map(
383
- () => html`<div class="unit-card-skeleton shimmer"></div>`
384
- )}
395
+ ${[0, 1, 2, 3].map(() => html`<div class="card skeleton"></div>`)}
385
396
  </div>`;
386
397
  }
387
398
  if (this.error) {
@@ -406,10 +417,18 @@ export class CommunityPicker extends LitElement {
406
417
  }
407
418
 
408
419
  render(): TemplateResult {
409
- return html`<div class=${classMap({ extend: this.variant === "extend" })}>
420
+ return html`<div
421
+ class=${classMap({
422
+ extend: this.variant === "extend",
423
+ phone: this.mobile,
424
+ })}
425
+ >
410
426
  <div class="picker-heading">
411
- ${BuildingIcon()}
412
- <h2>${this.heading()}</h2>
427
+ ${this.variant === "extend" ? "" : BuildingLineIcon(32, 1.5)}
428
+ <div class="heading-row">
429
+ <h2>${this.heading()}</h2>
430
+ <slot name="heading-action"></slot>
431
+ </div>
413
432
  </div>
414
433
  ${this.renderFilters()}
415
434
  <span class="sr-only" role="status" aria-live="polite">
@@ -422,12 +441,8 @@ export class CommunityPicker extends LitElement {
422
441
  }
423
442
 
424
443
  static styles = [
425
- tourSchedulerStyles,
426
- InputStyles,
427
- floorPlanSelectorStyles,
428
- floorplanImageCardStyles,
444
+ schedulerV2Styles,
429
445
  css`
430
- /* New layout only: the filter chips and the card grid. */
431
446
  :host {
432
447
  display: block;
433
448
  }
@@ -436,81 +451,98 @@ export class CommunityPicker extends LitElement {
436
451
  align-items: center;
437
452
  display: flex;
438
453
  flex-direction: column;
439
- gap: 8px;
440
- margin-bottom: 16px;
454
+ gap: 12px;
455
+ margin-bottom: 12px;
441
456
  text-align: center;
442
457
  }
443
458
 
459
+ .heading-row {
460
+ align-items: center;
461
+ display: flex;
462
+ gap: 4px;
463
+ justify-content: center;
464
+ }
465
+
444
466
  .picker-heading h2 {
445
467
  font-size: 20px;
446
468
  font-weight: 400;
469
+ letter-spacing: -0.01em;
470
+ line-height: 28px;
447
471
  margin: 0;
448
472
  }
449
473
 
474
+ .extend .picker-heading {
475
+ margin-bottom: 16px;
476
+ }
477
+
478
+ .extend .picker-heading h2 {
479
+ font-size: 14px;
480
+ letter-spacing: normal;
481
+ line-height: 20px;
482
+ }
483
+
450
484
  .picker-toolbar {
451
485
  align-items: center;
452
486
  display: flex;
453
487
  flex-wrap: wrap;
454
- gap: 8px;
488
+ gap: 4px;
455
489
  justify-content: center;
456
490
  margin-bottom: 16px;
457
491
  }
458
492
 
459
- .picker-toolbar [slot="trigger"].floor-plan-badge:not(.selected) {
460
- background: #ffffff;
461
- border-color: #e7e7e7;
462
- }
463
-
464
- .picker-toolbar [slot="trigger"].floor-plan-badge:not(.selected):hover {
465
- background: #f8f9fa;
466
- }
467
-
468
493
  .clear-filters {
469
494
  background: none;
470
495
  border: none;
471
- color: #737373;
496
+ color: var(--tsv2-muted);
472
497
  cursor: pointer;
473
498
  font: inherit;
474
- font-size: 0.9rem;
475
- text-decoration: underline;
499
+ font-size: 10px;
500
+ height: 32px;
501
+ line-height: 14px;
502
+ padding: 0 8px;
476
503
  }
477
504
 
478
- .filter-panel .floor-plan-selector-badges {
479
- margin: 0;
480
- overflow: visible;
505
+ .clear-filters:hover {
506
+ color: var(--tsv2-text);
507
+ }
508
+
509
+ .filter-panel {
510
+ display: flex;
511
+ flex-direction: column;
512
+ }
513
+
514
+ .filter-panel .chips {
515
+ flex-wrap: nowrap;
481
516
  }
482
517
 
483
518
  .filter-panel .date-field {
484
- margin: 0;
485
- width: 14rem;
519
+ width: 256px;
486
520
  }
487
521
 
488
522
  /* Phones: the panel opens in place under the chips, as the filter row did. */
489
- scheduler-popover[inline] .filter-panel .floor-plan-selector-badges {
523
+ scheduler-popover[inline] .filter-panel {
524
+ align-items: center;
525
+ margin-top: 4px;
526
+ }
527
+
528
+ scheduler-popover[inline] .filter-panel .chips {
490
529
  flex-wrap: wrap;
491
530
  justify-content: center;
492
531
  }
493
532
 
494
533
  scheduler-popover[inline] .filter-panel .date-field {
495
- margin: 0 auto;
496
534
  max-width: 16rem;
497
- width: auto;
498
- }
499
-
500
- .floor-plan-selector-badges {
501
- list-style: none;
502
- margin-top: 4px;
503
- max-width: none;
504
- padding: 0;
535
+ width: 100%;
505
536
  }
506
537
 
507
538
  .community-grid {
508
539
  display: grid;
509
- gap: 12px;
510
- grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
540
+ gap: 8px;
541
+ grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
542
+ justify-content: center;
511
543
  list-style: none;
512
544
  margin: 0 auto;
513
- max-width: 60rem;
545
+ max-width: 568px;
514
546
  padding: 0;
515
547
  }
516
548
 
@@ -518,99 +550,129 @@ export class CommunityPicker extends LitElement {
518
550
  opacity: 0.6;
519
551
  }
520
552
 
521
- /* White and outlined, as in the Central Agent design; the ring adds no width. */
522
- button.floorplan-image-card {
523
- background: #ffffff;
524
- border: 1px solid #e7e7e7;
525
- border-radius: 8px;
553
+ .community-grid li {
554
+ min-width: 0;
555
+ }
556
+
557
+ button.card {
526
558
  color: inherit;
527
559
  cursor: pointer;
560
+ display: flex;
528
561
  font: inherit;
562
+ gap: 12px;
529
563
  height: 100%;
530
- padding: 12px 14px;
564
+ padding: 11px;
531
565
  text-align: left;
532
- transition: border-color 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
566
+ width: 100%;
533
567
  }
534
568
 
535
- button.floorplan-image-card:not(.disabled):hover {
536
- border-color: #c4c4c4;
569
+ button.card:not(.disabled):hover {
570
+ border-color: var(--tsv2-accent);
537
571
  }
538
572
 
539
- button.floorplan-image-card.selected,
540
- button.floorplan-image-card.selected:hover {
541
- background: color-mix(
542
- in srgb,
543
- var(--primary-color, #646987) 4%,
544
- #ffffff
545
- );
546
- border-color: var(--primary-color, #646987);
547
- box-shadow: 0 0 0 1px var(--primary-color, #646987);
573
+ button.card.selected,
574
+ button.card.selected:hover {
575
+ background: var(--tsv2-tint);
576
+ border-color: var(--tsv2-tint-line);
548
577
  }
549
578
 
550
- button.floorplan-image-card img {
551
- height: 3.5rem;
552
- width: 3.5rem;
553
- }
554
-
555
- .image-card-title {
556
- color: #202020;
557
- font-size: 15px;
558
- font-weight: 500;
579
+ button.card.disabled {
580
+ cursor: default;
581
+ opacity: 0.6;
559
582
  }
560
583
 
561
- .image-card-subtitle {
562
- color: #868e96;
563
- font-size: 12px;
584
+ .card-image img {
585
+ border-radius: 4px;
586
+ display: block;
587
+ height: 56px;
588
+ object-fit: cover;
589
+ width: 56px;
564
590
  }
565
591
 
566
- .section-right {
592
+ .card-body {
593
+ display: flex;
594
+ flex: 1;
595
+ flex-direction: column;
596
+ gap: 8px;
567
597
  min-width: 0;
568
598
  }
569
599
 
570
- .image-card-subtitle {
571
- overflow: hidden;
572
- text-overflow: ellipsis;
573
- white-space: nowrap;
574
- }
575
-
576
600
  .card-tags {
577
601
  align-items: center;
578
602
  display: flex;
579
603
  gap: 4px;
580
- margin-bottom: 2px;
604
+ min-height: 20px;
581
605
  }
582
606
 
583
- .card-tags .floor-plan-badge {
584
- background: #f3f3f3;
585
- border: none;
586
- color: #404040;
587
- cursor: inherit;
588
- font-size: 11px;
589
- padding: 2px 8px;
590
- white-space: nowrap;
607
+ .tag svg {
608
+ color: var(--tsv2-label);
609
+ flex: none;
591
610
  }
592
611
 
593
612
  .distance {
594
- color: #868e96;
595
- font-size: 11px;
613
+ color: var(--tsv2-muted);
614
+ font-size: 10px;
615
+ font-weight: 500;
616
+ line-height: 14px;
596
617
  margin-left: auto;
597
618
  white-space: nowrap;
598
619
  }
599
620
 
621
+ .card-name {
622
+ display: flex;
623
+ flex-direction: column;
624
+ min-width: 0;
625
+ }
626
+
627
+ .card-title {
628
+ font-size: 14px;
629
+ line-height: 20px;
630
+ }
631
+
632
+ .card-name .subtitle,
633
+ .card-title {
634
+ overflow: hidden;
635
+ text-overflow: ellipsis;
636
+ white-space: nowrap;
637
+ }
638
+
600
639
  .next-available {
601
- color: #202020;
640
+ align-items: center;
641
+ color: var(--tsv2-label);
642
+ display: flex;
643
+ flex-wrap: wrap;
602
644
  font-size: 12px;
645
+ gap: 6px;
646
+ line-height: 16px;
603
647
  }
604
648
 
605
649
  .same-day {
606
- color: #2f855a;
607
- font-size: 11px;
608
- font-weight: 500;
650
+ color: var(--tsv2-success);
651
+ font-size: 10px;
652
+ line-height: 14px;
653
+ }
654
+
655
+ .skeleton {
656
+ animation: pulse 1.2s ease-in-out infinite;
657
+ background: var(--tsv2-fill);
658
+ height: 108px;
659
+ }
660
+
661
+ @keyframes pulse {
662
+ 50% {
663
+ opacity: 0.5;
664
+ }
609
665
  }
610
666
 
611
- .extend {
612
- border-top: 1px solid #e7e7e7;
613
- padding-top: 24px;
667
+ @media (prefers-reduced-motion: reduce) {
668
+ .skeleton {
669
+ animation: none;
670
+ }
671
+ }
672
+
673
+ .error-message,
674
+ .explanation {
675
+ text-align: center;
614
676
  }
615
677
  `,
616
678
  ];