@meetelise/chat 1.54.0 → 1.55.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/Scheduler/tour-scheduler.d.ts +21 -0
- package/dist/src/WebComponent/actions/email-us-window.d.ts +1 -7
- package/dist/src/WebComponent/brokerReferral.d.ts +17 -0
- package/package.json +1 -1
- package/public/dist/index.js +550 -357
- package/src/WebComponent/Scheduler/tour-scheduler.ts +253 -32
- package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +67 -1
- package/src/WebComponent/actions/email-us-window.ts +72 -51
- package/src/WebComponent/brokerReferral.ts +55 -0
- package/src/WebComponent/launcher/Launcher.ts +1 -0
- package/src/brokerReferralSubmission.test.ts +149 -0
|
@@ -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 type { BrokerReferral } from "../brokerReferral";
|
|
12
13
|
export declare class TourScheduler extends LitElement {
|
|
13
14
|
connectedCallback(): void;
|
|
14
15
|
private openSelfGuidedTour;
|
|
@@ -31,6 +32,8 @@ export declare class TourScheduler extends LitElement {
|
|
|
31
32
|
orgSlug: string;
|
|
32
33
|
hasDynamicSchedulingEnabled: boolean;
|
|
33
34
|
bedroomPreferenceRequired: boolean;
|
|
35
|
+
/** Broker intake is on for the building: offer the broker referral fields. */
|
|
36
|
+
brokerIntakeEnabled: boolean;
|
|
34
37
|
private leadSourceClient;
|
|
35
38
|
private leadSourceMultitouchClient;
|
|
36
39
|
buildingName: string;
|
|
@@ -55,6 +58,11 @@ export declare class TourScheduler extends LitElement {
|
|
|
55
58
|
private shouldAllowScheduleLoading;
|
|
56
59
|
private promptForReschedule;
|
|
57
60
|
private canceledReschedule;
|
|
61
|
+
isBrokerReferral: boolean;
|
|
62
|
+
brokerFirstName: string;
|
|
63
|
+
brokerLastName: string;
|
|
64
|
+
brokerEmail: string;
|
|
65
|
+
brokerFirmName: string;
|
|
58
66
|
leadSources: string[];
|
|
59
67
|
orgLegalName: string;
|
|
60
68
|
country: string | null;
|
|
@@ -102,11 +110,20 @@ export declare class TourScheduler extends LitElement {
|
|
|
102
110
|
}> | Map<PropertyKey, unknown>) => Promise<void>;
|
|
103
111
|
onChangePhoneNumber: (event: CustomEvent<InternationalPhoneChangeDetail>) => void;
|
|
104
112
|
onChangeEmail: (e: Event) => void;
|
|
113
|
+
/**
|
|
114
|
+
* A broker usually starts typing their own details before ticking the box, so ticking it moves
|
|
115
|
+
* the name and email into the broker's empty details and leaves the client's fields empty. Once
|
|
116
|
+
* the broker's details are filled, re-ticking leaves both sections alone, as on the email form.
|
|
117
|
+
*/
|
|
118
|
+
onToggleBrokerReferral: (e: Event) => void;
|
|
119
|
+
/** The broker's details to send, only when the submitter says they're referring a client. */
|
|
120
|
+
brokerReferral: () => BrokerReferral | null;
|
|
105
121
|
validators: {
|
|
106
122
|
tourType: () => boolean;
|
|
107
123
|
dateAndTime: () => boolean;
|
|
108
124
|
leadInfo: () => boolean;
|
|
109
125
|
layout: () => boolean;
|
|
126
|
+
broker: () => boolean;
|
|
110
127
|
};
|
|
111
128
|
formIsValidForSubmission: () => boolean;
|
|
112
129
|
/** E.g., `timeStringToHoursAndMinutes("4:15pm")` -> `[16, 15]`
|
|
@@ -130,8 +147,12 @@ export declare class TourScheduler extends LitElement {
|
|
|
130
147
|
nextButtonAction: null;
|
|
131
148
|
render: () => TemplateResult;
|
|
132
149
|
})[];
|
|
150
|
+
renderBrokerToggle: () => TemplateResult;
|
|
151
|
+
renderBrokerSection(): TemplateResult;
|
|
133
152
|
userInfoAndLayoutMenu(): TemplateResult;
|
|
134
153
|
confirmationMessage(): TemplateResult;
|
|
154
|
+
/** The broker isn't the one touring: the client gets the confirmation email. */
|
|
155
|
+
private referralConfirmation;
|
|
135
156
|
loadingIcon(size?: number): TemplateResult;
|
|
136
157
|
render(): TemplateResult;
|
|
137
158
|
private renderCenteredCard;
|
|
@@ -3,6 +3,7 @@ import "../me-select.ts";
|
|
|
3
3
|
import { MESelect } from "../me-select";
|
|
4
4
|
import "./international-phone-input";
|
|
5
5
|
import type { InternationalPhoneChangeDetail } from "./international-phone-input";
|
|
6
|
+
import type { BrokerReferral } from "../brokerReferral";
|
|
6
7
|
export declare class EmailUsWindow extends LitElement {
|
|
7
8
|
static styles: import("lit").CSSResult[];
|
|
8
9
|
leadSources: string[];
|
|
@@ -71,10 +72,3 @@ export declare class EmailUsWindow extends LitElement {
|
|
|
71
72
|
render: () => TemplateResult;
|
|
72
73
|
}
|
|
73
74
|
export declare const installEmailUsWindow: () => void;
|
|
74
|
-
/** A broker submitting the form for a client: sent as the request's broker fields. */
|
|
75
|
-
export declare type BrokerReferral = {
|
|
76
|
-
firstName: string;
|
|
77
|
-
lastName: string;
|
|
78
|
-
email: string;
|
|
79
|
-
firmName: string;
|
|
80
|
-
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** A broker submitting a form for a client: sent as the request's broker fields. */
|
|
2
|
+
export declare type BrokerReferral = {
|
|
3
|
+
firstName: string;
|
|
4
|
+
lastName: string;
|
|
5
|
+
email: string;
|
|
6
|
+
firmName: string;
|
|
7
|
+
};
|
|
8
|
+
/** The broker's typed details, trimmed, as a referral. */
|
|
9
|
+
export declare const toBrokerReferral: (firstName: string, lastName: string, email: string, firmName: string) => BrokerReferral;
|
|
10
|
+
export declare const brokerNameIsMissing: (broker: BrokerReferral) => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* What's wrong with the broker's email, or null. Broker intake opens a broker thread only for a
|
|
13
|
+
* broker email, and a broker can't be their own client.
|
|
14
|
+
*/
|
|
15
|
+
export declare const brokerEmailError: (broker: BrokerReferral, clientEmail: string) => string | null;
|
|
16
|
+
/** The request's broker fields. The prospect fields stay the client's; broker intake links the broker to them. */
|
|
17
|
+
export declare const brokerRequestFields: (broker: BrokerReferral | null | undefined) => Record<string, string | null>;
|