@meetelise/chat 1.73.0 → 1.75.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 (24) hide show
  1. package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +6 -0
  2. package/dist/src/WebComponent/SchedulerV2/booking-confirmation.d.ts +2 -0
  3. package/dist/src/WebComponent/SchedulerV2/community-picker.d.ts +6 -0
  4. package/dist/src/WebComponent/SchedulerV2/contact-form.d.ts +8 -3
  5. package/dist/src/WebComponent/SchedulerV2/itinerary-editor.d.ts +3 -0
  6. package/dist/src/WebComponent/SchedulerV2/scheduler-popover.d.ts +9 -1
  7. package/dist/src/WebComponent/SchedulerV2/schedulerRequests.d.ts +2 -0
  8. package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +6 -5
  9. package/dist/src/WebComponent/SchedulerV2/tourItineraryApi.d.ts +12 -0
  10. package/dist/src/WebComponent/SchedulerV2/tourTimes.d.ts +2 -0
  11. package/package.json +1 -1
  12. package/public/dist/index.js +441 -426
  13. package/src/WebComponent/Scheduler/tour-scheduler.ts +60 -9
  14. package/src/WebComponent/SchedulerV2/booking-confirmation.ts +13 -8
  15. package/src/WebComponent/SchedulerV2/community-picker.ts +19 -2
  16. package/src/WebComponent/SchedulerV2/contact-form.ts +54 -22
  17. package/src/WebComponent/SchedulerV2/itinerary-editor.ts +40 -17
  18. package/src/WebComponent/SchedulerV2/scheduler-popover.ts +17 -1
  19. package/src/WebComponent/SchedulerV2/schedulerRequests.ts +10 -0
  20. package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +82 -15
  21. package/src/WebComponent/SchedulerV2/tourItineraryApi.ts +12 -0
  22. package/src/WebComponent/SchedulerV2/tourTimes.ts +12 -0
  23. package/src/existingTourReschedulePrompt.test.ts +97 -0
  24. package/src/tourSchedulerV2Booking.test.ts +197 -13
@@ -63,6 +63,10 @@ export declare class TourScheduler extends LitElement {
63
63
  private shouldAllowScheduleLoading;
64
64
  private promptForReschedule;
65
65
  private canceledReschedule;
66
+ /** The existing tour's community, from the "already has a tour" 409. */
67
+ private existingTourBuildingName?;
68
+ /** The existing tour's readable time, in its own UTC offset, from the same 409. */
69
+ private existingTourStartTime?;
66
70
  isBrokerReferral: boolean;
67
71
  brokerFirstName: string;
68
72
  brokerLastName: string;
@@ -178,6 +182,8 @@ export declare class TourScheduler extends LitElement {
178
182
  private selectLayout;
179
183
  userInfoAndLayoutMenu(): TemplateResult;
180
184
  confirmationMessage(): TemplateResult;
185
+ /** Names the existing tour's community and time when the 409 sent both. */
186
+ rescheduleExplanation(): TemplateResult;
181
187
  /** The broker isn't the one touring: the client gets the confirmation email. */
182
188
  private referralConfirmation;
183
189
  loadingIcon(size?: number): TemplateResult;
@@ -8,6 +8,7 @@ export interface ConfirmedStop {
8
8
  /** The server's prospect-facing reason, for a failed stop. */
9
9
  error: string | null;
10
10
  distanceFromPrevMi: number | null;
11
+ travelMinutesFromPrev: number | null;
11
12
  }
12
13
  /**
13
14
  * The Central Agent design's "Your Tour Is Booked" header, then an itinerary's
@@ -22,6 +23,7 @@ export declare class BookingConfirmation extends LitElement {
22
23
  private heading;
23
24
  /** Where, how and when, as one line: the stops list shows each stop's own time. */
24
25
  private summary;
26
+ private renderLeg;
25
27
  private renderStops;
26
28
  render(): TemplateResult;
27
29
  static styles: import("lit").CSSResult[];
@@ -45,6 +45,12 @@ export declare class CommunityPicker extends LitElement {
45
45
  private filterLabel;
46
46
  /** Each filter's controls, in the panel its chip opens. */
47
47
  private renderFilterPanel;
48
+ /**
49
+ * A move-in date or budget, once set, closes its panel and so removes the
50
+ * input that had focus. Focus goes back to the chip, as on Escape, rather
51
+ * than out of the dialog, unless the prospect already moved it elsewhere.
52
+ */
53
+ private closeCommittedFilter;
48
54
  private renderFilters;
49
55
  private renderCard;
50
56
  private renderList;
@@ -9,8 +9,8 @@ export interface ContactValues {
9
9
  phone: string;
10
10
  phoneE164: string | null;
11
11
  phoneCountry: string | null;
12
- /** The building's layout option value picked, or null. */
13
- layout: number | null;
12
+ /** The building's layout option values picked, in the options' order. */
13
+ layouts: number[];
14
14
  moveIn: string;
15
15
  notes: string;
16
16
  /** Picked in "How did you hear about us?", when that is shown. */
@@ -19,7 +19,7 @@ export interface ContactValues {
19
19
  export declare const EMPTY_CONTACT: ContactValues;
20
20
  /**
21
21
  * Today's scheduler's rules: a first or last name, a valid email and phone,
22
- * and a bedroom preference only where the building requires one.
22
+ * and at least one bedroom preference only where the building requires one.
23
23
  */
24
24
  export declare const contactIsValid: (values: ContactValues, bedroomsRequired: boolean) => boolean;
25
25
  /**
@@ -39,6 +39,11 @@ export declare class ContactForm extends LitElement {
39
39
  private phoneHasBlurred;
40
40
  private setValues;
41
41
  private inputClasses;
42
+ /**
43
+ * The bedroom preferences as the filters' chips: each tap picks or clears
44
+ * one, as the Bedrooms filter does.
45
+ */
46
+ private renderLayouts;
42
47
  render(): TemplateResult;
43
48
  static styles: import("lit").CSSResult[];
44
49
  }
@@ -60,7 +60,10 @@ export declare class ItineraryEditor extends LitElement {
60
60
  private endDrag;
61
61
  private renderCommunity;
62
62
  private renderTourTypes;
63
+ /** Today's date picker over `dates`, reporting a picked day other than `date`. */
63
64
  private renderDatePicker;
65
+ /** One stop's own day: moving it there makes it a separate tour. */
66
+ private renderStopDatePicker;
64
67
  private renderTimePicker;
65
68
  private renderLinkPrompt;
66
69
  private renderSingleDateAndTime;
@@ -2,7 +2,9 @@ import { LitElement, TemplateResult } from "lit";
2
2
  /**
3
3
  * A trigger and the small panel it opens, for the v2 scheduler's secondary
4
4
  * choices. The panel floats under the trigger with `me-select`'s list surface
5
- * and closes, as that list does, on a click outside it, or on Escape. With
5
+ * and closes, as that list does, on a click outside it, or on Escape, and
6
+ * when focus moves out of it, so a later Escape closes the scheduler only
7
+ * once no panel is open. With
6
8
  * `inline` (phones) it opens in place instead, after its siblings in the
7
9
  * parent's flex row, as the filter row always did there.
8
10
  *
@@ -18,6 +20,12 @@ export declare class SchedulerPopover extends LitElement {
18
20
  private requestClose;
19
21
  /** As `me-select`: a click anywhere outside, trigger included, closes it. */
20
22
  private onDocumentClick;
23
+ /**
24
+ * Tabbing on to another control. Not when focus goes nowhere (a click on
25
+ * the panel's own text), nor inline, where closing would move what is
26
+ * being tapped.
27
+ */
28
+ private onFocusout;
21
29
  private onKeydown;
22
30
  render(): TemplateResult;
23
31
  static styles: import("lit").CSSResult;
@@ -10,6 +10,8 @@ export interface ItineraryChoice {
10
10
  firstStart: string | null;
11
11
  /** ISO starts picked for later new stops, by building id. */
12
12
  laterStarts: Record<number, string>;
13
+ /** "YYYY-MM-DD" days new stops moved to on their own, away from `date`, by building id. */
14
+ stopDates: Record<number, string>;
13
15
  /** Booked events this itinerary extends, in order; the last one is fixed first. */
14
16
  existingEventIds: number[];
15
17
  }
@@ -65,6 +65,8 @@ export declare class TourSchedulerV2 extends LitElement {
65
65
  private date;
66
66
  private firstStart;
67
67
  private laterStarts;
68
+ /** Stops the prospect moved to their own day, away from `date`. */
69
+ private stopDates;
68
70
  private plan;
69
71
  private planLoading;
70
72
  private planError;
@@ -130,6 +132,8 @@ export declare class TourSchedulerV2 extends LitElement {
130
132
  private get activeLinkType();
131
133
  private onTourType;
132
134
  private onDate;
135
+ private stopDatesWithout;
136
+ private onStopDate;
133
137
  private onStopTime;
134
138
  private onReorder;
135
139
  private onRemove;
@@ -176,11 +180,8 @@ export declare class TourSchedulerV2 extends LitElement {
176
180
  * building's layouts.
177
181
  */
178
182
  private get bedroomOptions();
179
- /**
180
- * The form's bedroom preference, from the shared bedrooms: the one offered
181
- * option they name, or none when they name no offered option or several.
182
- */
183
- private get preferredLayout();
183
+ /** The form's bedroom preferences: every offered option the shared bedrooms name. */
184
+ private get preferredLayouts();
184
185
  /** The form's values, with bedrooms and move-in from the shared preferences. */
185
186
  private get formValues();
186
187
  private onContactChange;
@@ -85,6 +85,8 @@ export interface PlanRequest {
85
85
  start_time: string | null;
86
86
  /** Times picked for later stops, by building id; empty when none are picked. */
87
87
  stop_starts: Record<string, string>;
88
+ /** A stop's own day when it isn't `date`, by building id; empty when none is moved. */
89
+ stop_dates: Record<string, string>;
88
90
  fixed_first: {
89
91
  calendar_event_id: number;
90
92
  } | null;
@@ -95,7 +97,17 @@ export interface PlanStop {
95
97
  end: string;
96
98
  timezone: string;
97
99
  distance_from_prev_mi: number | null;
100
+ /**
101
+ * Whole minutes to drive here from the stop before, already left free in the
102
+ * times. Missing from a server that predates the field.
103
+ */
104
+ travel_minutes_from_prev?: number | null;
98
105
  alternatives: string[];
106
+ /**
107
+ * The days this stop could move to on its own, within the next 30. Empty once
108
+ * a stop is booked, and missing from a server that predates the field.
109
+ */
110
+ dates?: string[];
99
111
  fixed: boolean;
100
112
  }
101
113
  export interface PlanResponse {
@@ -18,6 +18,8 @@ export declare const formatShortDate: (date: string) => string;
18
18
  export declare const formatMonthDay: (date: string) => string;
19
19
  /** "2026-10-15" -> "Thu, Oct 15, 2026" */
20
20
  export declare const formatLongDate: (date: string) => string;
21
+ /** "1.8 mi · 12 min drive" between two stops, or "" when neither is known. */
22
+ export declare const formatLeg: (distanceMi: number | null, travelMinutes: number | null | undefined) => string;
21
23
  /** A Date as the "YYYY-MM-DD" the API uses. */
22
24
  export declare const toIsoDate: (date: Date) => string;
23
25
  /** The Central Agent design's names for each tour type, with today's icons. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.73.0",
3
+ "version": "1.75.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",