@meetelise/chat 1.71.0 → 1.72.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.
- package/dist/src/WebComponent/SchedulerV2/community-picker.d.ts +5 -24
- package/dist/src/WebComponent/SchedulerV2/itinerary-editor.d.ts +5 -0
- package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +21 -3
- package/package.json +1 -1
- package/public/dist/index.js +261 -248
- package/src/WebComponent/SchedulerV2/community-picker.ts +56 -175
- package/src/WebComponent/SchedulerV2/itinerary-editor.ts +41 -7
- package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +151 -25
- package/src/tourSchedulerV2Booking.test.ts +84 -3
|
@@ -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
|
|
9
|
-
* the "extend" variant after a booking,
|
|
10
|
-
* and every reason come from the server. The cards and badges
|
|
11
|
-
* calculator's.
|
|
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
|
|
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
|
|
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
|
-
|
|
183
|
-
private
|
|
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;
|