@meetelise/chat 1.71.0 → 1.73.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.
@@ -9,6 +9,7 @@ import { TourAvailabilityResponse, TourAvailabilityResponseRankOrderedSupportedT
9
9
  import { MESelect } from "../me-select";
10
10
  import { LabeledOption } from "../../fetchBuildingInfo";
11
11
  import { LayoutOption } from "../../fetchBuildingWebchatView";
12
+ import { FloorplanOption } from "../../fetchFloorplanOptions";
12
13
  import type { BrokerReferral } from "../brokerReferral";
13
14
  export declare class TourScheduler extends LitElement {
14
15
  connectedCallback(): void;
@@ -86,11 +87,15 @@ export declare class TourScheduler extends LitElement {
86
87
  emailInput: HTMLInputElement;
87
88
  selectedLeadSource: MESelect;
88
89
  selectedLayoutEl?: MESelect;
90
+ selectedFloorplanEl?: MESelect;
89
91
  selectedUnitEl?: MESelect;
90
92
  firstNameInputValue: string;
91
93
  lastNameInputValue: string;
92
94
  leadSourceInputValue: string;
93
95
  selectedLayoutValue: string;
96
+ /** Filled when the building is on the WEBCHAT_FLOORPLAN_PREFERENCE switch; the floor plan dropdown then replaces the bedroom one. */
97
+ floorplanOptions: FloorplanOption[];
98
+ selectedFloorplanName: string;
94
99
  selectedUnitValue: string;
95
100
  private units;
96
101
  private allowOccupiedUnitTours;
@@ -169,6 +174,8 @@ export declare class TourScheduler extends LitElement {
169
174
  * picked before the broker switch was turned on isn't sent.
170
175
  */
171
176
  showLeadSourceSelect(): boolean;
177
+ /** Sets the canonical layout ("studio", "1br", ...) picked from the bedroom or floor plan dropdown. */
178
+ private selectLayout;
172
179
  userInfoAndLayoutMenu(): TemplateResult;
173
180
  confirmationMessage(): TemplateResult;
174
181
  /** The broker isn't the one touring: the client gets the confirmation email. */
@@ -1,25 +1,21 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
2
  import "../actions/action-confirm-button";
3
- import "../shared/simple-tooltip";
4
3
  import "./scheduler-popover";
5
4
  import { CommunitiesResponse, CommunityFilters, CommunitySummary } from "./tourItineraryApi";
6
5
  export declare type CommunityLoader = (filters: CommunityFilters) => Promise<CommunitiesResponse>;
7
6
  /**
8
- * Lists a central group's top communities so the prospect can pick one, or, in
9
- * the "extend" variant after a booking, up to the number of stops left. Ranking
10
- * and every reason come from the server. The cards and badges are the fee
11
- * calculator's. The scheduler holds the picks; after a booking it shows them,
12
- * with Continue, in its footer (`renderSelectionTray`).
7
+ * Lists a central group's top communities so the prospect can pick one: the
8
+ * community to tour, or, in the "extend" variant after a booking, the next stop
9
+ * to add. Ranking and every reason come from the server. The cards and badges
10
+ * are the fee calculator's.
13
11
  */
14
12
  export declare class CommunityPicker extends LitElement {
15
13
  variant: "select" | "extend";
16
14
  load: CommunityLoader | null;
17
15
  /** The first, unfiltered page, when the scheduler already has it. */
18
16
  initial: CommunitiesResponse | null;
19
- /** The picks so far; a click asks for a change with `selection-change`. */
17
+ /** The pick so far, if any; a click asks for a change with `selection-change`. */
20
18
  selected: CommunitySummary[];
21
- /** How many communities may be picked: the stops left in the itinerary. */
22
- maxSelectable: number;
23
19
  /**
24
20
  * The prospect's filters, which the scheduler shares with its form for this
25
21
  * visit; a change is reported with `filters-change`.
@@ -55,21 +51,6 @@ export declare class CommunityPicker extends LitElement {
55
51
  render(): TemplateResult;
56
52
  static styles: import("lit").CSSResult[];
57
53
  }
58
- /**
59
- * The picks and Continue, in the scheduler's footer under either picker. The
60
- * scheduler renders it so the footer stays its own, as on every other step.
61
- */
62
- export declare const renderSelectionTray: ({ selected, mobile, onRemove, onContinue, }: {
63
- selected: CommunitySummary[];
64
- mobile: boolean;
65
- onRemove: (buildingId: number) => void;
66
- onContinue: () => void;
67
- }) => TemplateResult | string;
68
- /**
69
- * Styles for `renderSelectionTray`: the fee calculator's badges (its padding and
70
- * radius), without the rest of its stylesheet, which also styles `:host`.
71
- */
72
- export declare const selectionTrayStyles: import("lit").CSSResult;
73
54
  declare global {
74
55
  interface HTMLElementTagNameMap {
75
56
  "community-picker": CommunityPicker;
@@ -32,6 +32,10 @@ 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
+ /** Adding stops to a booking: only the stops, as the design's itinerary. */
36
+ stopsOnly: boolean;
37
+ /** With `stopsOnly`, the itinerary has room for another stop. */
38
+ canAddStop: boolean;
35
39
  loading: boolean;
36
40
  /**
37
41
  * The server has planned these choices. Until it has, as after a failed
@@ -65,6 +69,7 @@ export declare class ItineraryEditor extends LitElement {
65
69
  private renderProblem;
66
70
  /** Several communities: the date sits under the tour type, as in the design. */
67
71
  private renderItineraryDate;
72
+ private renderStops;
68
73
  private renderItinerary;
69
74
  render(): TemplateResult;
70
75
  static styles: import("lit").CSSResult[];
@@ -5,6 +5,7 @@ import "./contact-form";
5
5
  import "./booking-confirmation";
6
6
  import "../actions/action-confirm-button";
7
7
  import "../loaders/mega-loader";
8
+ import "../mini-loader";
8
9
  import { LabeledOption } from "../../fetchBuildingInfo";
9
10
  import type { LayoutOption } from "../../fetchBuildingWebchatView";
10
11
  import type LeadSourceClient from "../LeadSourceClient";
@@ -53,8 +54,10 @@ export declare class TourSchedulerV2 extends LitElement {
53
54
  private group;
54
55
  private communities;
55
56
  private selectedIds;
56
- /** The open picker's picks, shown in the footer until Continue. */
57
+ /** The picker's pick, marked when the prospect goes back to it. */
57
58
  private picks;
59
+ /** Adding stops: the nearby communities are open under the itinerary. */
60
+ private addingStop;
58
61
  private existingEventIds;
59
62
  private tourType;
60
63
  /** A tour type this building books on its own page, once picked. */
@@ -143,6 +146,19 @@ export declare class TourSchedulerV2 extends LitElement {
143
146
  */
144
147
  private extendQueryFromBooking;
145
148
  private stopsRemaining;
149
+ /**
150
+ * Another stop fits after the booked ones and those added so far, and the
151
+ * plan shown is for these stops, so the list can start after its last one.
152
+ */
153
+ private get canAddStop();
154
+ /**
155
+ * As `extendQueryFromBooking`, from the itinerary being added: times after
156
+ * its last planned stop, near it, without any community already in it.
157
+ */
158
+ private extendQueryFromPlan;
159
+ private loadAddStopCommunities;
160
+ /** One more community joins the itinerary, after the stops already in it. */
161
+ private onStopAdded;
146
162
  /** Offers more communities while the itinerary has stops left. */
147
163
  private loadExtension;
148
164
  private onBookingError;
@@ -179,8 +195,10 @@ export declare class TourSchedulerV2 extends LitElement {
179
195
  * communities join the itinerary after the booking, from the confirmation.
180
196
  */
181
197
  private renderPicker;
182
- private onPicksChange;
183
- private renderTray;
198
+ /** Adding stops to a booking: the design's itinerary heading. */
199
+ private renderItineraryHeading;
200
+ /** "Add another stop": the nearby communities, under the itinerary. */
201
+ private renderAddStop;
184
202
  private renderSchedule;
185
203
  /** Today's reschedule prompt, with the server's reason. */
186
204
  private renderReschedulePrompt;
@@ -0,0 +1,10 @@
1
+ export declare type FloorplanOption = {
2
+ name: string;
3
+ bedrooms: number | null;
4
+ };
5
+ /**
6
+ * The building's unit-editor floor plans that have an active unit. Empty when the building is off the
7
+ * WEBCHAT_FLOORPLAN_PREFERENCE switch, or when they can't be read.
8
+ */
9
+ declare const fetchFloorplanOptions: (buildingSlug: string) => Promise<FloorplanOption[]>;
10
+ export default fetchFloorplanOptions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.71.0",
3
+ "version": "1.73.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",