@meetelise/chat 1.56.0 → 1.58.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 +8 -2
- package/dist/src/WebComponent/actions/email-us-window.d.ts +7 -1
- package/dist/src/WebComponent/actions/international-phone-input.d.ts +1 -0
- package/dist/src/WebComponent/brokerReferral.d.ts +3 -1
- package/dist/src/WebComponent/me-chat.d.ts +11 -0
- package/dist/src/main/MEChat.d.ts +12 -1
- package/package.json +1 -1
- package/public/dist/index.js +160 -135
- package/src/WebComponent/Scheduler/tour-scheduler.ts +73 -9
- package/src/WebComponent/actions/email-us-window.ts +63 -9
- package/src/WebComponent/actions/international-phone-input.ts +4 -1
- package/src/WebComponent/brokerReferral.ts +6 -1
- package/src/WebComponent/me-chat.ts +25 -4
- package/src/brokerReferralSubmission.test.ts +93 -6
- package/src/main/MEChat.ts +75 -1
- package/src/orgLevelNavigation.test.ts +114 -1
|
@@ -63,6 +63,11 @@ export declare class TourScheduler extends LitElement {
|
|
|
63
63
|
brokerLastName: string;
|
|
64
64
|
brokerEmail: string;
|
|
65
65
|
brokerFirmName: string;
|
|
66
|
+
brokerPhone: string;
|
|
67
|
+
brokerPhoneE164: string | null;
|
|
68
|
+
brokerPhoneCountry: string | null;
|
|
69
|
+
brokerPhoneIsValid: boolean;
|
|
70
|
+
brokerPhoneHasBlurred: boolean;
|
|
66
71
|
leadSources: string[];
|
|
67
72
|
orgLegalName: string;
|
|
68
73
|
country: string | null;
|
|
@@ -110,10 +115,11 @@ export declare class TourScheduler extends LitElement {
|
|
|
110
115
|
}> | Map<PropertyKey, unknown>) => Promise<void>;
|
|
111
116
|
onChangePhoneNumber: (event: CustomEvent<InternationalPhoneChangeDetail>) => void;
|
|
112
117
|
onChangeEmail: (e: Event) => void;
|
|
118
|
+
onChangeBrokerPhone: (event: CustomEvent<InternationalPhoneChangeDetail>) => void;
|
|
113
119
|
/**
|
|
114
120
|
* A broker usually starts typing their own details before ticking the box, so ticking it moves
|
|
115
|
-
* the name and
|
|
116
|
-
* the broker's details are filled, re-ticking leaves both sections alone, as on the email form.
|
|
121
|
+
* the name, email and phone into the broker's empty details and leaves the client's fields empty.
|
|
122
|
+
* Once the broker's details are filled, re-ticking leaves both sections alone, as on the email form.
|
|
117
123
|
*/
|
|
118
124
|
onToggleBrokerReferral: (e: Event) => void;
|
|
119
125
|
/** The broker's details to send, only when the submitter says they're referring a client. */
|
|
@@ -35,6 +35,11 @@ export declare class EmailUsWindow extends LitElement {
|
|
|
35
35
|
brokerLastName: string;
|
|
36
36
|
brokerEmail: string;
|
|
37
37
|
brokerFirmName: string;
|
|
38
|
+
brokerPhone: string;
|
|
39
|
+
brokerPhoneE164: string | null;
|
|
40
|
+
brokerPhoneCountry: string | null;
|
|
41
|
+
brokerPhoneIsValid: boolean;
|
|
42
|
+
hasBrokerPhoneError: boolean;
|
|
38
43
|
selectedLeadSource: MESelect;
|
|
39
44
|
currentLeadSource: string;
|
|
40
45
|
hasNameError: boolean;
|
|
@@ -51,10 +56,11 @@ export declare class EmailUsWindow extends LitElement {
|
|
|
51
56
|
onChangeLastName: (e: Event) => void;
|
|
52
57
|
onChangeEmail: (e: Event) => void;
|
|
53
58
|
onChangePhoneNumber: (e: CustomEvent<InternationalPhoneChangeDetail>) => void;
|
|
59
|
+
onChangeBrokerPhone: (e: CustomEvent<InternationalPhoneChangeDetail>) => void;
|
|
54
60
|
onChangeMessage: (e: Event) => void;
|
|
55
61
|
/**
|
|
56
62
|
* A broker usually starts typing their own details before ticking the box, so ticking it moves
|
|
57
|
-
* the name and
|
|
63
|
+
* the name, email and phone into the broker's empty details and leaves the client's fields empty. Once
|
|
58
64
|
* the broker's details are filled, re-ticking leaves both sections alone: the main fields then
|
|
59
65
|
* hold the client. Unticking with the client's fields still empty moves the details back.
|
|
60
66
|
*/
|
|
@@ -10,6 +10,7 @@ export declare class InternationalPhoneInput extends LitElement {
|
|
|
10
10
|
country: string | null;
|
|
11
11
|
value: string;
|
|
12
12
|
invalid: boolean;
|
|
13
|
+
placeholder: string;
|
|
13
14
|
private selectedCountry;
|
|
14
15
|
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
15
16
|
get e164(): string | null;
|
|
@@ -4,9 +4,11 @@ export declare type BrokerReferral = {
|
|
|
4
4
|
lastName: string;
|
|
5
5
|
email: string;
|
|
6
6
|
firmName: string;
|
|
7
|
+
/** E.164, or "" when the form has no broker phone or it was left empty. */
|
|
8
|
+
phone: string;
|
|
7
9
|
};
|
|
8
10
|
/** The broker's typed details, trimmed, as a referral. */
|
|
9
|
-
export declare const toBrokerReferral: (firstName: string, lastName: string, email: string, firmName: string) => BrokerReferral;
|
|
11
|
+
export declare const toBrokerReferral: (firstName: string, lastName: string, email: string, firmName: string, phone?: string) => BrokerReferral;
|
|
10
12
|
export declare const brokerNameIsMissing: (broker: BrokerReferral) => boolean;
|
|
11
13
|
/**
|
|
12
14
|
* What's wrong with the broker's email, or null. Broker intake opens a broker thread only for a
|
|
@@ -20,6 +20,11 @@ export declare class MEChat extends LitElement {
|
|
|
20
20
|
* org-anchored; its id is sent with visitor messages as `declaredBuildingId`.
|
|
21
21
|
*/
|
|
22
22
|
private declaredBuildingSlug;
|
|
23
|
+
/**
|
|
24
|
+
* Org-level webchat on a host that knows the page's building by id (Elise
|
|
25
|
+
* Studio), set with `setDeclaredBuildingId`. Undefined until the host sets it.
|
|
26
|
+
*/
|
|
27
|
+
private hostDeclaredBuildingId;
|
|
23
28
|
/**
|
|
24
29
|
* Org-level webchat (`centralConvo` started without a building). Stays true
|
|
25
30
|
* after the widget adopts the org's triage general building from
|
|
@@ -93,6 +98,12 @@ export declare class MEChat extends LitElement {
|
|
|
93
98
|
* its building's number (the org's triage line).
|
|
94
99
|
*/
|
|
95
100
|
private withOrgLevelContactOptions;
|
|
101
|
+
/**
|
|
102
|
+
* Org-level webchat: the page's building, sent with later visitor messages as
|
|
103
|
+
* `declaredBuildingId`. For hosts that move between pages without restarting
|
|
104
|
+
* the widget; it doesn't change config or the conversation.
|
|
105
|
+
*/
|
|
106
|
+
setDeclaredBuildingId(id: number | null): void;
|
|
96
107
|
/** The numeric id of the snippet's building in org-level webchat, if it names one. */
|
|
97
108
|
private fetchDeclaredBuildingId;
|
|
98
109
|
private shouldAutoOpenChat;
|
|
@@ -27,7 +27,7 @@ export interface HealthcareOptions extends PositioningOptions {
|
|
|
27
27
|
id: string;
|
|
28
28
|
}
|
|
29
29
|
export declare type StudioWebchatMode = "host_managed_context";
|
|
30
|
-
export declare type StudioWebchatSessionScopeType = "building" | "building_group" | "site";
|
|
30
|
+
export declare type StudioWebchatSessionScopeType = "building" | "building_group" | "site" | "org";
|
|
31
31
|
export interface StudioWebchatSessionScope {
|
|
32
32
|
type: StudioWebchatSessionScopeType;
|
|
33
33
|
key: string;
|
|
@@ -45,6 +45,11 @@ export interface StudioWebchatContext {
|
|
|
45
45
|
building?: string | null;
|
|
46
46
|
buildingGroupId?: string | number | null;
|
|
47
47
|
sessionScope?: StudioWebchatSessionScope;
|
|
48
|
+
/**
|
|
49
|
+
* Org scope only: the page's building, sent with visitor messages as
|
|
50
|
+
* `declaredBuildingId`. Null on pages with no single building.
|
|
51
|
+
*/
|
|
52
|
+
declaredBuildingId?: number | null;
|
|
48
53
|
path?: string;
|
|
49
54
|
pageId?: string;
|
|
50
55
|
}
|
|
@@ -86,6 +91,12 @@ export default class MEChat {
|
|
|
86
91
|
static removeWidget(): Promise<void>;
|
|
87
92
|
static handleStudioContext(opts: Options): void;
|
|
88
93
|
static updateStudioContext(context: StudioWebchatContext): void;
|
|
94
|
+
/**
|
|
95
|
+
* Org-level webchat on a Studio site: one org-anchored widget for the whole
|
|
96
|
+
* site, started as the org-level pixel starts it. Route changes only move the
|
|
97
|
+
* page's declared building, so the conversation carries across pages.
|
|
98
|
+
*/
|
|
99
|
+
static updateStudioOrgContext(context: StudioWebchatContext, opts: Options, updateToken: number): void;
|
|
89
100
|
static clearStudioContext(_context?: StudioWebchatClearContext): void;
|
|
90
101
|
static handleBuildingslug(meChat: MEChatLitElement, orgSlug?: string, buildingSlug?: string, originalOpts?: Options): Promise<void>;
|
|
91
102
|
static handleSingleFamilyUrl(): Promise<void>;
|