@meetelise/chat 1.70.0 → 1.71.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.
@@ -1,6 +1,7 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
2
  import "../actions/action-confirm-button";
3
3
  import "../shared/simple-tooltip";
4
+ import "./scheduler-popover";
4
5
  import { CommunitiesResponse, CommunityFilters, CommunitySummary } from "./tourItineraryApi";
5
6
  export declare type CommunityLoader = (filters: CommunityFilters) => Promise<CommunitiesResponse>;
6
7
  /**
@@ -19,12 +20,22 @@ export declare class CommunityPicker extends LitElement {
19
20
  selected: CommunitySummary[];
20
21
  /** How many communities may be picked: the stops left in the itinerary. */
21
22
  maxSelectable: number;
22
- private filters;
23
+ /**
24
+ * The prospect's filters, which the scheduler shares with its form for this
25
+ * visit; a change is reported with `filters-change`.
26
+ */
27
+ filters: CommunityFilters;
23
28
  private openFilter;
24
29
  private communities;
25
30
  private loading;
26
31
  private error;
32
+ private mobile;
27
33
  private requestId;
34
+ private cleanupMobileListener?;
35
+ connectedCallback(): void;
36
+ disconnectedCallback(): void;
37
+ /** The scheduler's unfiltered page, while no filter is set. */
38
+ private get initialPage();
28
39
  willUpdate(): void;
29
40
  firstUpdated(): void;
30
41
  private reload;
@@ -36,6 +47,8 @@ export declare class CommunityPicker extends LitElement {
36
47
  private isFilterActive;
37
48
  /** The chip's name, or the value picked once there is one. */
38
49
  private filterLabel;
50
+ /** Each filter's controls, in the panel its chip opens. */
51
+ private renderFilterPanel;
39
52
  private renderFilters;
40
53
  private renderCard;
41
54
  private renderList;
@@ -0,0 +1,29 @@
1
+ import { LitElement, TemplateResult } from "lit";
2
+ /**
3
+ * A trigger and the small panel it opens, for the v2 scheduler's secondary
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
6
+ * `inline` (phones) it opens in place instead, after its siblings in the
7
+ * parent's flex row, as the filter row always did there.
8
+ *
9
+ * The parent owns `open`; the element asks for a close with `popover-close`.
10
+ * Slot the trigger as `slot="trigger"` and the panel's content in the default
11
+ * slot, so the trigger's `aria-controls` can name an id in the parent's tree.
12
+ */
13
+ export declare class SchedulerPopover extends LitElement {
14
+ open: boolean;
15
+ inline: boolean;
16
+ connectedCallback(): void;
17
+ disconnectedCallback(): void;
18
+ private requestClose;
19
+ /** As `me-select`: a click anywhere outside, trigger included, closes it. */
20
+ private onDocumentClick;
21
+ private onKeydown;
22
+ render(): TemplateResult;
23
+ static styles: import("lit").CSSResult;
24
+ }
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ "scheduler-popover": SchedulerPopover;
28
+ }
29
+ }
@@ -36,7 +36,8 @@ export declare const buildAttribution: ({ orgSlug, selectedLeadSource, currentLe
36
36
  export declare const buildBookingRequest: ({ choice, plan, contact, attribution, conversationTrackingId, cancelExistingTours, }: {
37
37
  choice: ItineraryChoice;
38
38
  plan: PlanResponse;
39
- contact: BookingContact;
39
+ /** Null when adding stops to a booking: the server already has the prospect. */
40
+ contact: BookingContact | null;
40
41
  attribution: BookingAttribution;
41
42
  conversationTrackingId: string | null;
42
43
  cancelExistingTours: boolean;
@@ -67,6 +67,11 @@ export declare class TourSchedulerV2 extends LitElement {
67
67
  private planError;
68
68
  private notice;
69
69
  private contact;
70
+ /**
71
+ * Bedrooms, move-in and budget, shared by both pickers' filters and the form
72
+ * (which has no budget) for as long as the widget is open.
73
+ */
74
+ private preferences;
70
75
  private submitting;
71
76
  private bookingError;
72
77
  private reschedulePrompt;
@@ -155,6 +160,15 @@ export declare class TourSchedulerV2 extends LitElement {
155
160
  * building's layouts.
156
161
  */
157
162
  private get bedroomOptions();
163
+ /**
164
+ * The form's bedroom preference, from the shared bedrooms: the one offered
165
+ * option they name, or none when they name no offered option or several.
166
+ */
167
+ private get preferredLayout();
168
+ /** The form's values, with bedrooms and move-in from the shared preferences. */
169
+ private get formValues();
170
+ private onContactChange;
171
+ private onFiltersChange;
158
172
  /** A preference can only be required where there is one to choose. */
159
173
  private get bedroomsRequired();
160
174
  private disclaimer;
@@ -141,7 +141,8 @@ export interface BookingAttribution {
141
141
  export interface BookingRequest {
142
142
  tour_type: TourTypeId;
143
143
  stops: BookingStopRequest[];
144
- contact: BookingContact;
144
+ /** Left out when adding stops to a booking, which books into its conversation. */
145
+ contact?: BookingContact;
145
146
  lead_sources: BookingAttribution;
146
147
  conversation_tracking_id: string | null;
147
148
  cancel_existing_tours: boolean;
@@ -82,7 +82,9 @@ export declare class MEChat extends LitElement {
82
82
  private hideMobileFeatures;
83
83
  private privacyPolicyUrl;
84
84
  launcherRef: Ref<Launcher>;
85
+ private dniNumber;
85
86
  firstUpdated: () => Promise<void>;
87
+ reinsertDNIIntoWebsite(): void;
86
88
  private setupWebchat;
87
89
  setBuildingDerivedInfo: () => Promise<void>;
88
90
  private initializeChatVariables;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.70.0",
3
+ "version": "1.71.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",