@meetelise/chat 1.15.0 → 1.16.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.
|
@@ -61,6 +61,8 @@ export class TourScheduler extends LitElement {
|
|
|
61
61
|
@state()
|
|
62
62
|
private mobilePageIndex = 0;
|
|
63
63
|
@state()
|
|
64
|
+
private isSubmitting = false;
|
|
65
|
+
@state()
|
|
64
66
|
private tourIsBooked = false;
|
|
65
67
|
|
|
66
68
|
@query(".inputContainer#firstName input")
|
|
@@ -308,10 +310,12 @@ export class TourScheduler extends LitElement {
|
|
|
308
310
|
tour_time: `${this.selectedTime.datetime}${this.selectedTime.offset}`, // e.g., "2022-06-27T09:00:00-07:00"
|
|
309
311
|
};
|
|
310
312
|
const url = `https://app.meetelise.com/platformApi/state/create/scheduleMe`;
|
|
313
|
+
this.isSubmitting = true;
|
|
311
314
|
const response = await axios.post(url, data, {
|
|
312
315
|
headers: { ["X-SecurityKey"]: "JRL8jV4VcSCwOSir5gWkpgNLfKghmhBG" },
|
|
313
316
|
});
|
|
314
317
|
if (response.status === 200) {
|
|
318
|
+
this.isSubmitting = false;
|
|
315
319
|
this.tourIsBooked = true;
|
|
316
320
|
}
|
|
317
321
|
};
|
|
@@ -485,36 +489,14 @@ export class TourScheduler extends LitElement {
|
|
|
485
489
|
padding-top: 32px;
|
|
486
490
|
}
|
|
487
491
|
|
|
488
|
-
|
|
492
|
+
#schedule {
|
|
489
493
|
width: 145px;
|
|
490
494
|
height: 50px;
|
|
491
|
-
background: #202020;
|
|
492
|
-
border: 1px solid #ffffff;
|
|
493
|
-
border-radius: 10px;
|
|
494
495
|
grid-row: 7;
|
|
495
496
|
grid-column: 3;
|
|
496
497
|
justify-self: end;
|
|
497
498
|
align-self: start;
|
|
498
499
|
margin-top: 18px;
|
|
499
|
-
font-family: "Poppins";
|
|
500
|
-
font-weight: 700;
|
|
501
|
-
font-size: 14px;
|
|
502
|
-
color: #ffffff;
|
|
503
|
-
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
button#schedule:not(:disabled):hover {
|
|
507
|
-
opacity: 0.7;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
button#schedule:not(:disabled):active {
|
|
511
|
-
box-shadow: none;
|
|
512
|
-
opacity: 1;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
button#schedule:disabled {
|
|
516
|
-
background: #e7e7e7;
|
|
517
|
-
box-shadow: none;
|
|
518
500
|
}
|
|
519
501
|
|
|
520
502
|
#confirmationMessage {
|
|
@@ -909,8 +891,18 @@ export class TourScheduler extends LitElement {
|
|
|
909
891
|
},
|
|
910
892
|
{
|
|
911
893
|
validate: (): boolean => this.validators.leadInfo(),
|
|
912
|
-
|
|
913
|
-
|
|
894
|
+
// last page gets <action-confirm-button> instead of the regular button
|
|
895
|
+
nextButtonText: null,
|
|
896
|
+
renderNextButton: (): TemplateResult => html`<action-confirm-button
|
|
897
|
+
id="schedule"
|
|
898
|
+
.onClick=${this.submit}
|
|
899
|
+
.isLoading=${this.isSubmitting}
|
|
900
|
+
height="50px"
|
|
901
|
+
width="145px"
|
|
902
|
+
text="Schedule tour"
|
|
903
|
+
?disabled=${!this.formIsValidForSubmission()}
|
|
904
|
+
></action-confirm-button>`,
|
|
905
|
+
nextButtonAction: null,
|
|
914
906
|
render: (): TemplateResult => {
|
|
915
907
|
return html`${this.userInfoAndLayoutMenu()}`;
|
|
916
908
|
},
|
|
@@ -1059,13 +1051,15 @@ export class TourScheduler extends LitElement {
|
|
|
1059
1051
|
We’ll send a confirmation and any follow-ups to your email
|
|
1060
1052
|
address.
|
|
1061
1053
|
</p>
|
|
1062
|
-
<button
|
|
1054
|
+
<action-confirm-button
|
|
1063
1055
|
id="schedule"
|
|
1056
|
+
.onClick=${this.submit}
|
|
1057
|
+
.isLoading=${this.isSubmitting}
|
|
1058
|
+
height="50px"
|
|
1059
|
+
width="145px"
|
|
1060
|
+
text="Schedule tour"
|
|
1064
1061
|
?disabled=${!this.formIsValidForSubmission()}
|
|
1065
|
-
|
|
1066
|
-
>
|
|
1067
|
-
Schedule tour
|
|
1068
|
-
</button>`}
|
|
1062
|
+
></action-confirm-button>`}
|
|
1069
1063
|
</div>
|
|
1070
1064
|
`;
|
|
1071
1065
|
} else {
|
|
@@ -1086,18 +1080,20 @@ export class TourScheduler extends LitElement {
|
|
|
1086
1080
|
</div>
|
|
1087
1081
|
${this.tourIsBooked
|
|
1088
1082
|
? this.confirmationMessage()
|
|
1089
|
-
: html
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1083
|
+
: html` ${currentPage.render()}
|
|
1084
|
+
${!currentPage.renderNextButton
|
|
1085
|
+
? html` <button
|
|
1086
|
+
id="next"
|
|
1087
|
+
@click=${currentPage.nextButtonAction}
|
|
1088
|
+
?disabled=${(() => {
|
|
1089
|
+
return (
|
|
1090
|
+
!currentPage.validate() || this.waitingForAvailabilities
|
|
1091
|
+
);
|
|
1092
|
+
})()}
|
|
1093
|
+
>
|
|
1094
|
+
${currentPage.nextButtonText}
|
|
1095
|
+
</button>`
|
|
1096
|
+
: currentPage.renderNextButton()}`}
|
|
1101
1097
|
</div>
|
|
1102
1098
|
`;
|
|
1103
1099
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import classnames from "classnames";
|
|
1
2
|
import { css, html, LitElement, TemplateResult } from "lit";
|
|
2
3
|
import { customElement, property } from "lit/decorators.js";
|
|
3
4
|
|
|
@@ -6,6 +7,9 @@ export class ActionConfirmButton extends LitElement {
|
|
|
6
7
|
static styles = [
|
|
7
8
|
css`
|
|
8
9
|
.action-confirm-button {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
9
13
|
background: #1e1e1e;
|
|
10
14
|
border: 2px solid #ffffff;
|
|
11
15
|
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
|
|
@@ -23,11 +27,24 @@ export class ActionConfirmButton extends LitElement {
|
|
|
23
27
|
cursor: pointer;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
.action-confirm-button:
|
|
30
|
+
.action-confirm-button:disabled {
|
|
31
|
+
background: #e7e7e7;
|
|
32
|
+
box-shadow: none;
|
|
33
|
+
cursor: initial;
|
|
34
|
+
}
|
|
35
|
+
.action-confirm-button:not(:is(:disabled, .loading)):active {
|
|
27
36
|
transform: translateY(2px);
|
|
28
37
|
box-shadow: 0px 0px 0px rgba(36, 53, 141, 0.25);
|
|
29
38
|
}
|
|
30
39
|
|
|
40
|
+
.action-confirm-button:not(:is(:active, :disabled, .loading)):hover {
|
|
41
|
+
opacity: 0.7;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.loading {
|
|
45
|
+
cursor: initial;
|
|
46
|
+
}
|
|
47
|
+
|
|
31
48
|
.lds-ring {
|
|
32
49
|
display: inline-block;
|
|
33
50
|
position: relative;
|
|
@@ -71,9 +88,20 @@ export class ActionConfirmButton extends LitElement {
|
|
|
71
88
|
text = "Submit";
|
|
72
89
|
@property({ attribute: false })
|
|
73
90
|
isLoading = false;
|
|
91
|
+
@property({ type: Boolean })
|
|
92
|
+
disabled = false;
|
|
93
|
+
@property({ type: String })
|
|
94
|
+
height = "initial";
|
|
95
|
+
@property({ type: String })
|
|
96
|
+
width = "initial";
|
|
74
97
|
|
|
75
98
|
render = (): TemplateResult => {
|
|
76
|
-
return html`<button
|
|
99
|
+
return html`<button
|
|
100
|
+
class=${classnames("action-confirm-button", { loading: this.isLoading })}
|
|
101
|
+
@click=${!this.isLoading ? this.onClick : null}
|
|
102
|
+
?disabled=${this.disabled}
|
|
103
|
+
style=${`height: ${this.height}; width: ${this.width};`}
|
|
104
|
+
>
|
|
77
105
|
${!this.isLoading
|
|
78
106
|
? this.text
|
|
79
107
|
: html`<div class="lds-ring">
|
|
@@ -136,6 +136,8 @@ export class MEChat extends LitElement {
|
|
|
136
136
|
await this.configureTalkJSPopup(building, theme, session, avatarSrc);
|
|
137
137
|
this.configureLauncherElement();
|
|
138
138
|
|
|
139
|
+
this.analytics?.ping("load");
|
|
140
|
+
|
|
139
141
|
this.yardiDNIScriptInterval = setInterval(
|
|
140
142
|
() => this.pollForYardiCampaignSource(),
|
|
141
143
|
1000
|
|
@@ -263,7 +265,7 @@ export class MEChat extends LitElement {
|
|
|
263
265
|
};
|
|
264
266
|
|
|
265
267
|
render(): TemplateResult {
|
|
266
|
-
if (this.building?.
|
|
268
|
+
if (this.building?.id === 4930) {
|
|
267
269
|
return html``;
|
|
268
270
|
}
|
|
269
271
|
installLauncher();
|
|
@@ -321,6 +323,7 @@ declare global {
|
|
|
321
323
|
interface HTMLElementTagNameMap {
|
|
322
324
|
"me-chat": MEChat;
|
|
323
325
|
}
|
|
326
|
+
|
|
324
327
|
interface Window {
|
|
325
328
|
RCTPCampaign?: { CampaignDetails: { Source: string } };
|
|
326
329
|
}
|