@meetelise/chat 1.69.2 → 1.70.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.
@@ -4,10 +4,10 @@ import "../shared/simple-tooltip";
4
4
  import { CommunitiesResponse, CommunityFilters, CommunitySummary } from "./tourItineraryApi";
5
5
  export declare type CommunityLoader = (filters: CommunityFilters) => Promise<CommunitiesResponse>;
6
6
  /**
7
- * Lists a central group's top communities so the prospect can pick up to the
8
- * number of stops left. In the "extend" variant it offers more communities
9
- * after a booking. Ranking and every reason come from the server. The cards and
10
- * badges are the fee calculator's. The scheduler holds the picks and shows them,
7
+ * Lists a central group's top communities so the prospect can pick one, or, in
8
+ * the "extend" variant after a booking, up to the number of stops left. Ranking
9
+ * and every reason come from the server. The cards and badges are the fee
10
+ * calculator's. The scheduler holds the picks; after a booking it shows them,
11
11
  * with Continue, in its footer (`renderSelectionTray`).
12
12
  */
13
13
  export declare class CommunityPicker extends LitElement {
@@ -32,11 +32,15 @@ export declare class ItineraryEditor extends LitElement {
32
32
  single: boolean;
33
33
  /** The prospect may change which communities they tour. */
34
34
  canEditCommunities: boolean;
35
- /** The server allows another stop. */
36
- canAddStop: boolean;
37
35
  loading: boolean;
36
+ /**
37
+ * The server has planned these choices. Until it has, as after a failed
38
+ * request, empty lists mean nothing is known yet, not that nothing is offered.
39
+ */
40
+ planned: boolean;
38
41
  primaryColor: string;
39
42
  foregroundColorOnPrimaryBackgroundColor: string;
43
+ private get offersKnown();
40
44
  private editingTimeFor;
41
45
  private dragIndex;
42
46
  private dropIndex;
@@ -11,9 +11,8 @@ import type LeadSourceClient from "../LeadSourceClient";
11
11
  import type { LeadSourceMultitouchClient } from "../LeadSourceMultitouchClient";
12
12
  /**
13
13
  * The rebuilt tour scheduler, behind the `webchat_tour_scheduler_v2` rollout.
14
- * It books one community, or up to the server's cap of communities in a
15
- * central group as one same-day itinerary, and offers more communities after a
16
- * booking. The server decides which communities can tour, their order, the
14
+ * It books one community, then offers nearby communities in its central group
15
+ * to add after the booking, up to the server's cap, as one same-day itinerary. The server decides which communities can tour, their order, the
17
16
  * chained times and the cap; this element keeps only the step, the prospect's
18
17
  * choices and the form.
19
18
  */
@@ -150,13 +149,21 @@ export declare class TourSchedulerV2 extends LitElement {
150
149
  private isMultiStop;
151
150
  private canSubmit;
152
151
  /**
153
- * The form offers this widget's building's layouts, so a building with none
154
- * (a group's parent building) has no preference to ask for.
152
+ * What the form offers as a bedroom preference: the bedroom counts listed at
153
+ * the communities on this itinerary. Where the server sent none (a building
154
+ * outside a group, or communities with no listed units), this widget's own
155
+ * building's layouts.
155
156
  */
157
+ private get bedroomOptions();
158
+ /** A preference can only be required where there is one to choose. */
156
159
  private get bedroomsRequired();
157
160
  private disclaimer;
158
161
  /** Today's scheduler's body area, which scrolls the whole sheet on phones. */
159
162
  private container;
163
+ /**
164
+ * The design's first page: one community, which opens its schedule. More
165
+ * communities join the itinerary after the booking, from the confirmation.
166
+ */
160
167
  private renderPicker;
161
168
  private onPicksChange;
162
169
  private renderTray;
@@ -21,6 +21,11 @@ export interface Community {
21
21
  bedrooms: number;
22
22
  amount: number;
23
23
  } | null;
24
+ /**
25
+ * Every bedroom count with a listed unit, ascending (0 is a studio). Missing
26
+ * from a server that predates the field.
27
+ */
28
+ bedrooms?: number[];
24
29
  next_available: {
25
30
  date: string;
26
31
  time: string;
@@ -37,6 +42,7 @@ export interface CommunitySummary {
37
42
  name: string;
38
43
  address: CommunityAddress | null;
39
44
  timezone: string | null;
45
+ bedrooms?: number[];
40
46
  }
41
47
  export declare const toCommunitySummary: (c: Community) => CommunitySummary;
42
48
  export declare const formatAddress: (address: CommunityAddress | null) => string;
@@ -1 +1,4 @@
1
+ import type { LayoutOption } from "../../fetchBuildingWebchatView";
1
2
  export declare const layoutToBedrooms: (layout: number) => number;
3
+ /** The layout option for a bedroom count, valued and labelled as a building's own layout options are. */
4
+ export declare const bedroomsToLayoutOption: (bedrooms: number) => LayoutOption;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.69.2",
3
+ "version": "1.70.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",