@meetelise/chat 1.67.0 → 1.69.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/MyPubnub.d.ts +2 -0
- package/dist/src/WebComponent/SchedulerV2/tour-scheduler-v2.d.ts +171 -0
- package/dist/src/WebComponent/launcher/Launcher.d.ts +11 -0
- package/dist/src/WebComponent/me-chat.d.ts +4 -0
- package/dist/src/fetchFeatureFlag.d.ts +2 -0
- package/package.json +1 -1
- package/public/dist/index.js +2077 -912
- package/src/MyPubnub.ts +5 -0
- package/src/WebComponent/SchedulerV2/tour-scheduler-v2.ts +1202 -0
- package/src/WebComponent/launcher/Launcher.ts +63 -3
- package/src/WebComponent/me-chat.ts +13 -0
- package/src/fetchFeatureFlag.ts +20 -0
- package/src/tourSchedulerV2Booking.test.ts +478 -0
- package/src/tourSchedulerV2Rollout.test.ts +190 -0
package/dist/src/MyPubnub.d.ts
CHANGED
|
@@ -118,6 +118,8 @@ declare class MyPubnub {
|
|
|
118
118
|
isFirstChatMessageSent: boolean;
|
|
119
119
|
private streamingMessageTimeout;
|
|
120
120
|
constructor(buildingSlug: string, buildingDetails: BuildingWebchatView | null, orgSlug: string, leadSource: string | null | undefined, leadUserId: string, leadSourceMultitouchClient: LeadSourceMultitouchClient | null, leadSourceClient?: LeadSourceClient | null, widgetType?: WidgetType);
|
|
121
|
+
/** The /webchat/init session token, once the session exists. */
|
|
122
|
+
getSessionToken(): string | null;
|
|
121
123
|
initSession(buildingSlug: string, orgSlug: string, existingLeadId?: string): Promise<{
|
|
122
124
|
session_token: string;
|
|
123
125
|
lead_id: string;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { LitElement, PropertyValues, TemplateResult } from "lit";
|
|
2
|
+
import "./community-picker";
|
|
3
|
+
import "./itinerary-editor";
|
|
4
|
+
import "./contact-form";
|
|
5
|
+
import "./booking-confirmation";
|
|
6
|
+
import "../actions/action-confirm-button";
|
|
7
|
+
import "../loaders/mega-loader";
|
|
8
|
+
import { LabeledOption } from "../../fetchBuildingInfo";
|
|
9
|
+
import type { LayoutOption } from "../../fetchBuildingWebchatView";
|
|
10
|
+
import type LeadSourceClient from "../LeadSourceClient";
|
|
11
|
+
import type { LeadSourceMultitouchClient } from "../LeadSourceMultitouchClient";
|
|
12
|
+
/**
|
|
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
|
|
17
|
+
* chained times and the cap; this element keeps only the step, the prospect's
|
|
18
|
+
* choices and the form.
|
|
19
|
+
*/
|
|
20
|
+
export declare class TourSchedulerV2 extends LitElement {
|
|
21
|
+
orgSlug: string;
|
|
22
|
+
buildingSlug: string;
|
|
23
|
+
buildingId: number;
|
|
24
|
+
orgId: number;
|
|
25
|
+
buildingName: string;
|
|
26
|
+
sgtUrl: string;
|
|
27
|
+
selfGuidedToursTypeOffered: string;
|
|
28
|
+
escortedToursLink: string;
|
|
29
|
+
escortedToursTypeOffered: string;
|
|
30
|
+
virtualToursLink: string;
|
|
31
|
+
virtualToursTypeOffered: string;
|
|
32
|
+
tourTypeOptions: LabeledOption[];
|
|
33
|
+
layoutOptions: LayoutOption[];
|
|
34
|
+
currentLeadSource: string;
|
|
35
|
+
leadSources: string[];
|
|
36
|
+
featureFlagShowDropdown: string;
|
|
37
|
+
bedroomPreferenceRequired: boolean;
|
|
38
|
+
orgLegalName: string;
|
|
39
|
+
country: string | null;
|
|
40
|
+
buildingState: string | null;
|
|
41
|
+
primaryColor: string;
|
|
42
|
+
foregroundColorOnPrimaryBackgroundColor: string;
|
|
43
|
+
compactDesign: boolean | string;
|
|
44
|
+
leadSourceClient: LeadSourceClient | null;
|
|
45
|
+
leadSourceMultitouchClient: LeadSourceMultitouchClient | null;
|
|
46
|
+
/** The /webchat/init session token, read when each request is sent. */
|
|
47
|
+
getSessionToken: () => string | null;
|
|
48
|
+
private api;
|
|
49
|
+
onCloseClicked?: (e: MouseEvent) => void;
|
|
50
|
+
private step;
|
|
51
|
+
private loadError;
|
|
52
|
+
private mobile;
|
|
53
|
+
/** Null outside a central group, where only this building can be toured. */
|
|
54
|
+
private group;
|
|
55
|
+
private communities;
|
|
56
|
+
private selectedIds;
|
|
57
|
+
/** The open picker's picks, shown in the footer until Continue. */
|
|
58
|
+
private picks;
|
|
59
|
+
private existingEventIds;
|
|
60
|
+
private tourType;
|
|
61
|
+
/** A tour type this building books on its own page, once picked. */
|
|
62
|
+
private linkTourType;
|
|
63
|
+
private date;
|
|
64
|
+
private firstStart;
|
|
65
|
+
private laterStarts;
|
|
66
|
+
private plan;
|
|
67
|
+
private planLoading;
|
|
68
|
+
private planError;
|
|
69
|
+
private notice;
|
|
70
|
+
private contact;
|
|
71
|
+
private submitting;
|
|
72
|
+
private bookingError;
|
|
73
|
+
private reschedulePrompt;
|
|
74
|
+
private confirmed;
|
|
75
|
+
private bookedTourType;
|
|
76
|
+
private bookedEventIds;
|
|
77
|
+
private extendInitial;
|
|
78
|
+
/** The booking the extend picker adds stops after. */
|
|
79
|
+
private extendFrom;
|
|
80
|
+
/** The schedule step is adding stops to a booking. */
|
|
81
|
+
private extending;
|
|
82
|
+
/** The prospect agreed to move a tour they already had. */
|
|
83
|
+
private rescheduled;
|
|
84
|
+
/** The prospect kept the tour they already had. */
|
|
85
|
+
private rescheduleCanceled;
|
|
86
|
+
private planRequestId;
|
|
87
|
+
private idempotency;
|
|
88
|
+
private cleanupMobileListener?;
|
|
89
|
+
connectedCallback(): void;
|
|
90
|
+
disconnectedCallback(): void;
|
|
91
|
+
private onKeydown;
|
|
92
|
+
private close;
|
|
93
|
+
private get client();
|
|
94
|
+
willUpdate(changed: PropertyValues<this>): void;
|
|
95
|
+
firstUpdated(): void;
|
|
96
|
+
updated(changed: PropertyValues): void;
|
|
97
|
+
private start;
|
|
98
|
+
private goTo;
|
|
99
|
+
private remember;
|
|
100
|
+
private rememberOne;
|
|
101
|
+
private startSchedule;
|
|
102
|
+
private choice;
|
|
103
|
+
/**
|
|
104
|
+
* Asks /plan for the chained times. When the server reports that the tour
|
|
105
|
+
* type or date isn't offered, moves to the first one it offers and asks again.
|
|
106
|
+
*/
|
|
107
|
+
private runPlan;
|
|
108
|
+
private tourLink;
|
|
109
|
+
/**
|
|
110
|
+
* Only a lone tour of this widget's own building can use its links: the widget
|
|
111
|
+
* has its own building's tour settings and no other's. An itinerary with
|
|
112
|
+
* other buildings offers only the tour types /plan serves for all of them.
|
|
113
|
+
*/
|
|
114
|
+
private get bookingOwnBuildingAlone();
|
|
115
|
+
private openTourLink;
|
|
116
|
+
private tourTypeChoices;
|
|
117
|
+
/** The tour type shown as chosen: a link type the prospect picked, or the plan's. */
|
|
118
|
+
private get shownTourType();
|
|
119
|
+
/**
|
|
120
|
+
* The shown tour type when this building books it on its own page, whether the
|
|
121
|
+
* prospect picked it or the plan did. It replaces the times and blocks booking.
|
|
122
|
+
*/
|
|
123
|
+
private get activeLinkType();
|
|
124
|
+
private onTourType;
|
|
125
|
+
private onDate;
|
|
126
|
+
private onStopTime;
|
|
127
|
+
private onReorder;
|
|
128
|
+
private onRemove;
|
|
129
|
+
private onEditCommunities;
|
|
130
|
+
private loadSelectCommunities;
|
|
131
|
+
private loadExtendCommunities;
|
|
132
|
+
private rememberPage;
|
|
133
|
+
private onCommunitiesSelected;
|
|
134
|
+
private submit;
|
|
135
|
+
private onBooked;
|
|
136
|
+
/**
|
|
137
|
+
* What the server needs to offer stops after this booking: when its last stop
|
|
138
|
+
* ends, its tour type, where that stop is, and every building already in it.
|
|
139
|
+
*/
|
|
140
|
+
private extendQueryFromBooking;
|
|
141
|
+
private stopsRemaining;
|
|
142
|
+
/** Offers more communities while the itinerary has stops left. */
|
|
143
|
+
private loadExtension;
|
|
144
|
+
private onBookingError;
|
|
145
|
+
private showLeadSourceDropdown;
|
|
146
|
+
private log;
|
|
147
|
+
/** Where the back button goes from the current step, if anywhere. */
|
|
148
|
+
private backStep;
|
|
149
|
+
private problems;
|
|
150
|
+
private isMultiStop;
|
|
151
|
+
private canSubmit;
|
|
152
|
+
private disclaimer;
|
|
153
|
+
/** Today's scheduler's body area, which scrolls the whole sheet on phones. */
|
|
154
|
+
private container;
|
|
155
|
+
private renderPicker;
|
|
156
|
+
private onPicksChange;
|
|
157
|
+
private renderTray;
|
|
158
|
+
private renderSchedule;
|
|
159
|
+
/** Today's reschedule prompt, with the server's reason. */
|
|
160
|
+
private renderReschedulePrompt;
|
|
161
|
+
private renderRescheduleCanceled;
|
|
162
|
+
private renderBooked;
|
|
163
|
+
private renderBody;
|
|
164
|
+
render(): TemplateResult;
|
|
165
|
+
static styles: import("lit").CSSResult[];
|
|
166
|
+
}
|
|
167
|
+
declare global {
|
|
168
|
+
interface HTMLElementTagNameMap {
|
|
169
|
+
"tour-scheduler-v2": TourSchedulerV2;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -3,6 +3,8 @@ import { Ref } from "lit/directives/ref.js";
|
|
|
3
3
|
import { EmailUsWindow } from "../actions/email-us-window";
|
|
4
4
|
import { StyleInfo } from "lit/directives/style-map.js";
|
|
5
5
|
import { TourScheduler } from "../Scheduler/tour-scheduler";
|
|
6
|
+
import "../SchedulerV2/tour-scheduler-v2";
|
|
7
|
+
import type { TourSchedulerV2 } from "../SchedulerV2/tour-scheduler-v2";
|
|
6
8
|
import { FeeCalculator } from "../FeeCalculator/fee-calculator";
|
|
7
9
|
import { LabeledOption } from "../../fetchBuildingInfo";
|
|
8
10
|
import "./mobile-launcher";
|
|
@@ -57,6 +59,9 @@ export declare class Launcher extends LitElement {
|
|
|
57
59
|
layoutOptions: LayoutOption[];
|
|
58
60
|
bedroomPreferenceRequired: boolean;
|
|
59
61
|
brokerIntakeEnabled: boolean;
|
|
62
|
+
/** The building is on the `webchat_tour_scheduler_v2` rollout. */
|
|
63
|
+
tourSchedulerV2: boolean;
|
|
64
|
+
getSessionToken: () => string | null;
|
|
60
65
|
hasDynamicSchedulingEnabled: boolean;
|
|
61
66
|
hasPricingCalculatorEnabledDesktop: boolean;
|
|
62
67
|
hasPricingCalculatorEnabledMobile: boolean;
|
|
@@ -92,6 +97,12 @@ export declare class Launcher extends LitElement {
|
|
|
92
97
|
getNumCallToActions: () => number;
|
|
93
98
|
emailUsWindowRef: Ref<EmailUsWindow>;
|
|
94
99
|
tourSchedulerRef: Ref<TourScheduler>;
|
|
100
|
+
tourSchedulerV2Ref: Ref<TourSchedulerV2>;
|
|
101
|
+
/**
|
|
102
|
+
* Which scheduler the open window shows, fixed when it opens so that the
|
|
103
|
+
* rollout answer arriving later can't swap it mid-booking.
|
|
104
|
+
*/
|
|
105
|
+
private sstWindowIsV2;
|
|
95
106
|
calculatorWindowRef: Ref<FeeCalculator>;
|
|
96
107
|
willUpdate(changedProperties: PropertyValues<this>): void;
|
|
97
108
|
updated: () => Promise<void>;
|
|
@@ -49,6 +49,8 @@ export declare class MEChat extends LitElement {
|
|
|
49
49
|
private currentLeadSource;
|
|
50
50
|
private featureFlagShowDropdown;
|
|
51
51
|
private bedroomPreferenceRequired;
|
|
52
|
+
/** The building is on the `webchat_tour_scheduler_v2` rollout. */
|
|
53
|
+
private tourSchedulerV2;
|
|
52
54
|
private brokerIntakeEnabled;
|
|
53
55
|
private phoneNumberForSource;
|
|
54
56
|
private hasMounted;
|
|
@@ -61,6 +63,8 @@ export declare class MEChat extends LitElement {
|
|
|
61
63
|
/** Set only for a user-initiated open, so auto-open does not steal focus. */
|
|
62
64
|
private focusChatOnMount;
|
|
63
65
|
private myPubnub;
|
|
66
|
+
/** For the v2 tour scheduler, which calls the session-authenticated endpoints. */
|
|
67
|
+
private getSessionToken;
|
|
64
68
|
private LeadSourceClient;
|
|
65
69
|
private LeadSourceMultitouchClient;
|
|
66
70
|
private sampleRateToUse;
|
|
@@ -9,5 +9,7 @@ export declare function fetchFeatureFlagShowUtilities(orgSlug: string): Promise<
|
|
|
9
9
|
export declare function fetchFeatureFlagUseApplicationsLinkReplacement(buildingSlug: string): Promise<boolean>;
|
|
10
10
|
export declare function fetchTrackedRolloutBedroomPreferenceRequired(buildingSlug: string): Promise<boolean>;
|
|
11
11
|
export declare function fetchTrackedRolloutCoastalCustomTourTypes(buildingSlug: string): Promise<boolean>;
|
|
12
|
+
/** Whether the building shows the rebuilt tour scheduler (<tour-scheduler-v2>) instead of today's. */
|
|
13
|
+
export declare function fetchTrackedRolloutTourSchedulerV2(buildingSlug: string): Promise<boolean>;
|
|
12
14
|
/** Whether brokers are on for the building (the broker_rollout rollout), so the email form offers the broker referral fields. */
|
|
13
15
|
export declare function fetchTrackedRolloutBrokerIntake(buildingSlug: string): Promise<boolean>;
|