@meetelise/chat 1.25.1 → 1.25.2

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.
Files changed (209) hide show
  1. package/coverage/lcov-report/index.html +1 -1
  2. package/coverage/lcov-report/index.js.html +1 -1
  3. package/package.json +1 -1
  4. package/.prettierignore +0 -2
  5. package/dist/src/MyPubnub.d.ts +0 -116
  6. package/dist/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section-styles.d.ts +0 -2
  7. package/dist/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section.d.ts +0 -20
  8. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +0 -2
  9. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +0 -14
  10. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +0 -2
  11. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +0 -17
  12. package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +0 -3
  13. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +0 -2
  14. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +0 -13
  15. package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +0 -1
  16. package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +0 -31
  17. package/dist/src/WebComponent/FeeCalculator/index.d.ts +0 -2
  18. package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +0 -75
  19. package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +0 -23
  20. package/dist/src/WebComponent/LeadSourceClient.d.ts +0 -46
  21. package/dist/src/WebComponent/OfficeHours.d.ts +0 -21
  22. package/dist/src/WebComponent/Scheduler/date-picker.d.ts +0 -28
  23. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +0 -14
  24. package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +0 -99
  25. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +0 -13
  26. package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +0 -1
  27. package/dist/src/WebComponent/actions/InputStyles.d.ts +0 -1
  28. package/dist/src/WebComponent/actions/action-confirm-button.d.ts +0 -13
  29. package/dist/src/WebComponent/actions/call-us-window.d.ts +0 -37
  30. package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +0 -8
  31. package/dist/src/WebComponent/actions/details-window.d.ts +0 -14
  32. package/dist/src/WebComponent/actions/email-us-window.d.ts +0 -46
  33. package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +0 -17
  34. package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +0 -8
  35. package/dist/src/WebComponent/chat-additional-actions.d.ts +0 -28
  36. package/dist/src/WebComponent/health-chat.d.ts +0 -47
  37. package/dist/src/WebComponent/healthchat-styles.d.ts +0 -1
  38. package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +0 -2
  39. package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +0 -2
  40. package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +0 -2
  41. package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +0 -2
  42. package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +0 -2
  43. package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +0 -2
  44. package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +0 -2
  45. package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +0 -3
  46. package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +0 -2
  47. package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +0 -2
  48. package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +0 -2
  49. package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +0 -3
  50. package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +0 -2
  51. package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +0 -2
  52. package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +0 -2
  53. package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +0 -2
  54. package/dist/src/WebComponent/index.d.ts +0 -2
  55. package/dist/src/WebComponent/launcher/Launcher.d.ts +0 -98
  56. package/dist/src/WebComponent/launcher/launcherStyles.d.ts +0 -1
  57. package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +0 -26
  58. package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +0 -1
  59. package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +0 -1
  60. package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +0 -1
  61. package/dist/src/WebComponent/leasing-chat-styles.d.ts +0 -1
  62. package/dist/src/WebComponent/me-chat.d.ts +0 -91
  63. package/dist/src/WebComponent/me-select.d.ts +0 -24
  64. package/dist/src/WebComponent/mini-loader.d.ts +0 -5
  65. package/dist/src/WebComponent/pubnub-chat-styles.d.ts +0 -1
  66. package/dist/src/WebComponent/pubnub-chat.d.ts +0 -49
  67. package/dist/src/WebComponent/pubnub-media.d.ts +0 -14
  68. package/dist/src/WebComponent/pubnub-message-styles.d.ts +0 -1
  69. package/dist/src/WebComponent/pubnub-message.d.ts +0 -39
  70. package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +0 -1
  71. package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +0 -12
  72. package/dist/src/WebComponent/utilities-chat.d.ts +0 -47
  73. package/dist/src/WebComponent/utilities-styles.d.ts +0 -1
  74. package/dist/src/WebComponent/utils.d.ts +0 -31
  75. package/dist/src/analytics.d.ts +0 -64
  76. package/dist/src/disclaimers.d.ts +0 -8
  77. package/dist/src/fetchBuildingABTestType.d.ts +0 -8
  78. package/dist/src/fetchBuildingInfo.d.ts +0 -57
  79. package/dist/src/fetchBuildingWebchatView.d.ts +0 -122
  80. package/dist/src/fetchFeatureFlag.d.ts +0 -14
  81. package/dist/src/fetchLeadSources.d.ts +0 -4
  82. package/dist/src/fetchPhoneNumberFromSource.d.ts +0 -6
  83. package/dist/src/getAvailabilities.d.ts +0 -44
  84. package/dist/src/getBuildingPhoneNumber.d.ts +0 -1
  85. package/dist/src/getShouldAllowScheduling.d.ts +0 -1
  86. package/dist/src/getShouldShowWebchat.d.ts +0 -3
  87. package/dist/src/getTimezoneString.d.ts +0 -1
  88. package/dist/src/globals.d.ts +0 -1
  89. package/dist/src/gtm.d.ts +0 -6
  90. package/dist/src/handleChatId.d.ts +0 -11
  91. package/dist/src/insertDNIIntoWebsite.d.ts +0 -5
  92. package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +0 -4
  93. package/dist/src/main/MEChat.d.ts +0 -74
  94. package/dist/src/main/utils.d.ts +0 -2
  95. package/dist/src/postLeadSources.d.ts +0 -3
  96. package/dist/src/rentgrata.d.ts +0 -4
  97. package/dist/src/replaceSelectButtonsWithNewLink.d.ts +0 -5
  98. package/dist/src/services/fees/fetchBuildingFees.d.ts +0 -3
  99. package/dist/src/svgIcons.d.ts +0 -5
  100. package/dist/src/themes.d.ts +0 -5
  101. package/dist/src/types/rest-sdk.types.d.ts +0 -11
  102. package/dist/src/types/webchat-no-show-reason.d.ts +0 -1
  103. package/dist/src/utils.d.ts +0 -13
  104. package/public/demo/index.html +0 -347
  105. package/public/demo/secret.html +0 -63
  106. package/src/MyPubnub.ts +0 -792
  107. package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section-styles.ts +0 -86
  108. package/src/WebComponent/FeeCalculator/components/collapsible-fee-section/collapsible-fee-section.ts +0 -94
  109. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +0 -47
  110. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +0 -50
  111. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +0 -46
  112. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +0 -70
  113. package/src/WebComponent/FeeCalculator/components/index.ts +0 -3
  114. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +0 -39
  115. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +0 -39
  116. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -280
  117. package/src/WebComponent/FeeCalculator/fee-calculator.ts +0 -256
  118. package/src/WebComponent/FeeCalculator/index.ts +0 -4
  119. package/src/WebComponent/FeeCalculator/model/building-fee.ts +0 -83
  120. package/src/WebComponent/FeeCalculator/model/transaction-category.ts +0 -23
  121. package/src/WebComponent/LeadSourceClient.ts +0 -332
  122. package/src/WebComponent/MEChat.css +0 -5
  123. package/src/WebComponent/OfficeHours.ts +0 -73
  124. package/src/WebComponent/Scheduler/date-picker.ts +0 -405
  125. package/src/WebComponent/Scheduler/time-picker.ts +0 -190
  126. package/src/WebComponent/Scheduler/tour-scheduler.ts +0 -1352
  127. package/src/WebComponent/Scheduler/tour-type-option.ts +0 -112
  128. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +0 -418
  129. package/src/WebComponent/actions/InputStyles.ts +0 -57
  130. package/src/WebComponent/actions/action-confirm-button.ts +0 -125
  131. package/src/WebComponent/actions/call-us-window.ts +0 -445
  132. package/src/WebComponent/actions/collapse-expand-button.ts +0 -65
  133. package/src/WebComponent/actions/details-window.ts +0 -150
  134. package/src/WebComponent/actions/email-us-window.ts +0 -555
  135. package/src/WebComponent/actions/formatPhoneNumber.ts +0 -72
  136. package/src/WebComponent/actions/minimize-expand-button.ts +0 -93
  137. package/src/WebComponent/chat-additional-actions.ts +0 -135
  138. package/src/WebComponent/health-chat.ts +0 -270
  139. package/src/WebComponent/healthchat-styles.ts +0 -119
  140. package/src/WebComponent/icons/ApplyOutlineIcon.ts +0 -22
  141. package/src/WebComponent/icons/BookTourOutlineIcon.ts +0 -13
  142. package/src/WebComponent/icons/CalculatorOutlineIcon.ts +0 -22
  143. package/src/WebComponent/icons/ChatOutlineIcon.ts +0 -10
  144. package/src/WebComponent/icons/ChevronLeftIcon.ts +0 -7
  145. package/src/WebComponent/icons/ChevronRightIcon.ts +0 -7
  146. package/src/WebComponent/icons/ContactResidentIcon.ts +0 -9
  147. package/src/WebComponent/icons/DollarOutlineIcon.ts +0 -18
  148. package/src/WebComponent/icons/EmailOutlineIcon.ts +0 -7
  149. package/src/WebComponent/icons/HeyThereEmojiIcon.ts +0 -12
  150. package/src/WebComponent/icons/PhoneOutlineIcon.ts +0 -7
  151. package/src/WebComponent/icons/SendMessageIcon.ts +0 -17
  152. package/src/WebComponent/icons/TourSelfGuidedIcon.ts +0 -17
  153. package/src/WebComponent/icons/TourVirtuallyIcon.ts +0 -17
  154. package/src/WebComponent/icons/TourWithAgentIcon.ts +0 -17
  155. package/src/WebComponent/icons/XOutlineIcon.ts +0 -8
  156. package/src/WebComponent/index.ts +0 -2
  157. package/src/WebComponent/launcher/Launcher.ts +0 -1193
  158. package/src/WebComponent/launcher/launcherStyles.ts +0 -500
  159. package/src/WebComponent/launcher/mobile-launcher.ts +0 -159
  160. package/src/WebComponent/launcher/typeEmojiStyles.ts +0 -161
  161. package/src/WebComponent/launcher/typeMiniStyles.ts +0 -60
  162. package/src/WebComponent/launcher/typeMobileStyles.ts +0 -50
  163. package/src/WebComponent/leasing-chat-styles.ts +0 -114
  164. package/src/WebComponent/me-chat.ts +0 -1257
  165. package/src/WebComponent/me-select.ts +0 -322
  166. package/src/WebComponent/mini-loader.ts +0 -28
  167. package/src/WebComponent/pubnub-chat-styles.ts +0 -204
  168. package/src/WebComponent/pubnub-chat.ts +0 -928
  169. package/src/WebComponent/pubnub-media.ts +0 -208
  170. package/src/WebComponent/pubnub-message-styles.ts +0 -54
  171. package/src/WebComponent/pubnub-message.ts +0 -431
  172. package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +0 -34
  173. package/src/WebComponent/simple-launcher/simple-launcher.ts +0 -100
  174. package/src/WebComponent/utilities-chat.ts +0 -270
  175. package/src/WebComponent/utilities-styles.ts +0 -110
  176. package/src/WebComponent/utils.ts +0 -82
  177. package/src/analytics.ts +0 -217
  178. package/src/assetUrls.ts +0 -6
  179. package/src/disclaimers.ts +0 -58
  180. package/src/fetchBuildingABTestType.ts +0 -21
  181. package/src/fetchBuildingInfo.ts +0 -87
  182. package/src/fetchBuildingWebchatView.ts +0 -154
  183. package/src/fetchFeatureFlag.ts +0 -250
  184. package/src/fetchLeadSources.ts +0 -98
  185. package/src/fetchPhoneNumberFromSource.ts +0 -31
  186. package/src/fetchWebchatPreferences.ts +0 -54
  187. package/src/getAvailabilities.ts +0 -174
  188. package/src/getBuildingPhoneNumber.ts +0 -26
  189. package/src/getShouldAllowScheduling.ts +0 -16
  190. package/src/getShouldShowWebchat.ts +0 -114
  191. package/src/getTimezoneString.ts +0 -39
  192. package/src/globals.ts +0 -1
  193. package/src/gtm.ts +0 -17
  194. package/src/handleChatId.ts +0 -101
  195. package/src/insertDNIIntoWebsite.ts +0 -146
  196. package/src/insertLeadSourceIntoSchedulerLinks.ts +0 -71
  197. package/src/main/MEChat.test.ts +0 -110
  198. package/src/main/MEChat.ts +0 -404
  199. package/src/main/utils.ts +0 -70
  200. package/src/postLeadSources.ts +0 -44
  201. package/src/rentgrata.ts +0 -74
  202. package/src/replaceSelectButtonsWithNewLink.ts +0 -68
  203. package/src/services/fees/fetchBuildingFees.ts +0 -28
  204. package/src/svgIcons.ts +0 -14
  205. package/src/themes.ts +0 -65
  206. package/src/types/rest-sdk.types.ts +0 -13
  207. package/src/types/webchat-no-show-reason.ts +0 -6
  208. package/src/utils.ts +0 -121
  209. package/tsconfig.json +0 -84
@@ -1,1193 +0,0 @@
1
- import { html, LitElement, TemplateResult, css } from "lit";
2
- import { customElement, property, state } from "lit/decorators.js";
3
- import { createRef, ref, Ref } from "lit/directives/ref.js";
4
- import { launcherStyles } from "./launcherStyles";
5
- import { typeEmojiStyles } from "./typeEmojiStyles";
6
- import { typeMiniStyles } from "./typeMiniStyles";
7
- import {
8
- EmailUsWindow,
9
- installEmailUsWindow,
10
- } from "../actions/email-us-window";
11
- import { StyleInfo, styleMap } from "lit/directives/style-map.js";
12
- import { installCallUsWindow } from "../actions/call-us-window";
13
- import { TourScheduler } from "../Scheduler/tour-scheduler";
14
- import { FeeCalculator } from "../FeeCalculator/fee-calculator";
15
- import { installFeeCalculator } from "../FeeCalculator";
16
- import { LabeledOption } from "../../fetchBuildingInfo";
17
- import {
18
- defaultBackgroundColor,
19
- defaultPrimaryColor,
20
- hexToAlmostWhite,
21
- } from "../../themes";
22
- import "./mobile-launcher";
23
- import "../actions/collapse-expand-button";
24
- import { DesignConcepts } from "../../fetchBuildingWebchatView";
25
- import { isMobile } from "../../utils";
26
- import classNames from "classnames";
27
- import LeadSourceClient from "../LeadSourceClient";
28
-
29
- import {
30
- closeRengrataWidget,
31
- hasRentgrata,
32
- openRengrataWidget,
33
- } from "../../rentgrata";
34
- import noop from "lodash/noop";
35
- import { ChatOutlineIcon } from "../icons/ChatOutlineIcon";
36
- import { ChevronRightIcon } from "../icons/ChevronRightIcon";
37
- import { BookTourOutlineIcon } from "../icons/BookTourOutlineIcon";
38
- import { EmailOutlineIcon } from "../icons/EmailOutlineIcon";
39
- import { PhoneOutlineIcon } from "../icons/PhoneOutlineIcon";
40
- import { HeyThereEmoji } from "../icons/HeyThereEmojiIcon";
41
- import { ContactResidentIcon } from "../icons/ContactResidentIcon";
42
- import { ApplyOutlineIcon } from "../icons/ApplyOutlineIcon";
43
- import { CalculatorOutlineIcon } from "../icons/CalculatorOutlineIcon";
44
-
45
- @customElement("meetelise-launcher")
46
- export class Launcher extends LitElement {
47
- static styles = css`
48
- ${launcherStyles}
49
- ${typeEmojiStyles}
50
- ${typeMiniStyles}
51
- `;
52
-
53
- @property({ attribute: true })
54
- isMinimized = false;
55
-
56
- @property()
57
- mobileStyles: StyleInfo = {};
58
-
59
- @property({ type: Boolean })
60
- isFirstMount = false;
61
-
62
- @property({ attribute: false })
63
- autoOpenChatWidget = false;
64
-
65
- @property()
66
- phoneNumber = "";
67
- @property({ attribute: true })
68
- buildingName = "";
69
- @property({ attribute: true })
70
- chatId = "";
71
- @property({ attribute: true })
72
- orgLegalName = "";
73
- @property({ attribute: true })
74
- chatCallUsHeader = "";
75
- @property({ attribute: false })
76
- buildingId = 0;
77
- @property({ attribute: true })
78
- buildingSlug = "";
79
- @property({ attribute: true })
80
- orgSlug = "";
81
- @property({ attribute: true })
82
- sgtUrl = "";
83
- @property({ attribute: true })
84
- selfGuidedTourEnabled = false;
85
- @property({ attribute: true })
86
- selfGuidedToursTypeOffered = "";
87
- @property({ attribute: true })
88
- designConcept = "";
89
- @property({ attribute: true })
90
- featureFlagShowDropdown = "";
91
- @property({ attribute: false })
92
- leadSources: string[] = [];
93
- @property({ attribute: true })
94
- currentLeadSource = "";
95
- @property({ attribute: true })
96
- escortedToursLink = "";
97
- @property({ attribute: true })
98
- virtualToursLink = "";
99
-
100
- @property({ type: Boolean })
101
- hasChatEnabledDesktop = false;
102
- @property({ type: Boolean })
103
- hasChatEnabledMobile = false;
104
-
105
- @property({ type: Boolean })
106
- hasEmailEnabledDesktop = false;
107
- @property({ type: Boolean })
108
- hasEmailEnabledMobile = false;
109
-
110
- @property({ attribute: true })
111
- hasApplyNowEnabledDesktop = false;
112
- @property({ attribute: true })
113
- hasApplyNowEnabledMobile = false;
114
- @property({ attribute: true })
115
- applicationLink = "";
116
-
117
- @property({ type: Boolean })
118
- hasCallUsEnabledDesktop = false;
119
- @property({ type: Boolean })
120
- hasCallUsEnabledMobile = false;
121
-
122
- @property({ type: Boolean })
123
- hasTextUsEnabledDesktop = false;
124
- @property({ type: Boolean })
125
- hasTextUsEnabledMobile = false;
126
-
127
- @property({ type: Boolean })
128
- hasSSTEnabledDesktop = false;
129
- @property({ type: Boolean })
130
- hasSSTEnabledMobile = false;
131
-
132
- @property({ attribute: false })
133
- tourTypeOptions: LabeledOption[] = [];
134
- @property({ attribute: true })
135
- hasDynamicSchedulingEnabled = false;
136
-
137
- @property({ attribute: true })
138
- hasPricingCalculatorEnabledDesktop = false;
139
- @property({ attribute: true })
140
- hasPricingCalculatorEnabledMobile = false;
141
-
142
- onExitChat: () => void = () => {
143
- return;
144
- };
145
-
146
- @property({ attribute: false })
147
- hasHideMobileFeatures = false;
148
-
149
- @property({ type: Number })
150
- private right = undefined;
151
-
152
- @property({ type: Number })
153
- private bottom = undefined;
154
-
155
- @property({ type: Number })
156
- private top = undefined;
157
-
158
- @property({ type: Number })
159
- private left = undefined;
160
-
161
- @property({ attribute: true })
162
- showTourNextToChat = false;
163
-
164
- @property({ attribute: false })
165
- onChatTapped: () => void = () => {
166
- return;
167
- };
168
-
169
- @property({ attribute: true })
170
- onClickMinimize: (e: MouseEvent) => void = () => {
171
- return;
172
- };
173
-
174
- @property({ attribute: true })
175
- onSstClose: () => void = noop;
176
-
177
- @property({ attribute: true })
178
- overrideRentgrata = false;
179
-
180
- @property({ attribute: false })
181
- launcherStyles: StyleInfo = {};
182
-
183
- @property({ attribute: true })
184
- primaryColor: string = defaultPrimaryColor;
185
-
186
- @property({ attribute: true })
187
- backgroundColor: string = defaultBackgroundColor;
188
-
189
- @property({ attribute: true })
190
- foregroundColorOnPrimaryBackgroundColor = "white";
191
- @property({ attribute: true })
192
- foregroundColorOnSecondaryBackgroundColor = "black";
193
-
194
- @property({ attribute: true })
195
- private leadSourceClient: LeadSourceClient | null = null;
196
-
197
- @state()
198
- isEmailWindowOpen = false;
199
- @state()
200
- isCallUsWindowOpen = false;
201
- @state()
202
- isSSTWindowOpen = false;
203
- @state()
204
- isTextUsWindowOpen = false;
205
- @state()
206
- isCalculatorWindowOpen = false;
207
-
208
- @state()
209
- private isMobileFeaturesExpanded = false;
210
-
211
- getNumCallToActions = (): number => {
212
- const isEmailEnabled =
213
- this.hasEmailEnabledDesktop || this.hasEmailEnabledMobile;
214
- const isPhoneNumberEnabled =
215
- !!this.phoneNumber &&
216
- (this.hasCallUsEnabledDesktop || this.hasCallUsEnabledMobile);
217
- const isSSTEnabled = this.hasSSTEnabledDesktop || this.hasSSTEnabledMobile;
218
- const isTextUsEnabled =
219
- this.hasTextUsEnabledDesktop || this.hasTextUsEnabledMobile;
220
- const isApplyNowEnabled =
221
- this.hasApplyNowEnabledDesktop || this.hasApplyNowEnabledMobile;
222
- const isPricingCalculatorEnabled =
223
- this.hasPricingCalculatorEnabledDesktop ||
224
- this.hasPricingCalculatorEnabledMobile;
225
-
226
- return [
227
- isEmailEnabled,
228
- isPhoneNumberEnabled,
229
- isSSTEnabled,
230
- isTextUsEnabled,
231
- isApplyNowEnabled,
232
- isPricingCalculatorEnabled,
233
- ].filter((v) => v).length;
234
- };
235
-
236
- emailUsWindowRef: Ref<EmailUsWindow> = createRef();
237
- tourSchedulerRef: Ref<TourScheduler> = createRef();
238
- calculatorWindowRef: Ref<FeeCalculator> = createRef();
239
-
240
- updated = async (): Promise<void> => {
241
- this.attachOnClickToEmailUsWindow();
242
- this.attachOnClickToSSTWindow();
243
- this.attachOnClickToCalculatorWindow();
244
-
245
- // If we have the SST tour popup open next to the chat widget, we want to close it
246
- if (
247
- (this.isEmailWindowOpen || this.isCallUsWindowOpen) &&
248
- this.isSSTWindowOpen
249
- ) {
250
- this.onCloseSSTWindow();
251
- }
252
- };
253
-
254
- attachOnClickToEmailUsWindow = (): void => {
255
- const emailUsWindowRef = this.emailUsWindowRef.value;
256
- if (!emailUsWindowRef) {
257
- return;
258
- }
259
- emailUsWindowRef.onCloseClicked = this.onCloseEmailWindow;
260
- };
261
-
262
- attachOnClickToSSTWindow = (): void => {
263
- const sstWindowRef = this.tourSchedulerRef.value;
264
- if (!sstWindowRef) {
265
- return;
266
- }
267
- sstWindowRef.onCloseClicked = this.onCloseSSTWindow;
268
- };
269
-
270
- attachOnClickToCalculatorWindow = (): void => {
271
- const calculatorWindowRef = this.calculatorWindowRef.value;
272
- if (!calculatorWindowRef) return;
273
- calculatorWindowRef.onCloseClicked = this.onCloseCalculatorWindow;
274
- };
275
-
276
- onClickEmailOption = (e: MouseEvent): void => {
277
- e.preventDefault();
278
- e.stopPropagation();
279
- closeRengrataWidget();
280
-
281
- this.isEmailWindowOpen = true;
282
- };
283
-
284
- onCloseEmailWindow = (): void => {
285
- this.isEmailWindowOpen = false;
286
- };
287
-
288
- onClickPhoneOption = (e: MouseEvent): void => {
289
- e.preventDefault();
290
- e.stopPropagation();
291
- closeRengrataWidget();
292
- this.isCallUsWindowOpen = true;
293
- };
294
-
295
- onClickApplyNowOption = (e: MouseEvent): void => {
296
- e.preventDefault();
297
- e.stopPropagation();
298
- closeRengrataWidget();
299
- window.open(this.applicationLink, "_blank");
300
- };
301
-
302
- onClickPriceCalculatorOption = (e: MouseEvent): void => {
303
- e.preventDefault();
304
- e.stopPropagation();
305
- closeRengrataWidget();
306
- this.isCalculatorWindowOpen = true;
307
- };
308
-
309
- onClosePhoneWindow = (): void => {
310
- this.isCallUsWindowOpen = false;
311
- };
312
-
313
- onClickSSTOption = (e: MouseEvent): void => {
314
- e.preventDefault();
315
- e.stopPropagation();
316
- closeRengrataWidget();
317
- this.isSSTWindowOpen = true;
318
- };
319
-
320
- onCloseSSTWindow = (): void => {
321
- this.onSstClose();
322
- this.isSSTWindowOpen = false;
323
- if (this.showTourNextToChat) {
324
- this.dispatchEvent(
325
- new CustomEvent("closeShowTourNextToChat", {
326
- bubbles: true,
327
- })
328
- );
329
- }
330
- };
331
-
332
- onCloseCalculatorWindow = (): void => {
333
- this.isCalculatorWindowOpen = false;
334
- };
335
-
336
- onClickTextUsOption = (e: MouseEvent): void => {
337
- e.preventDefault();
338
- e.stopPropagation();
339
- this.isTextUsWindowOpen = true;
340
- };
341
-
342
- isCallToActionWindowOpen = (): boolean => {
343
- return (
344
- [
345
- this.isEmailWindowOpen,
346
- this.isCallUsWindowOpen,
347
- this.isSSTWindowOpen,
348
- this.isTextUsWindowOpen,
349
- this.isCalculatorWindowOpen,
350
- ].filter((v) => v).length === 1
351
- );
352
- };
353
-
354
- toggleMobileFeatures = (): void => {
355
- this.isMobileFeaturesExpanded = !this.isMobileFeaturesExpanded;
356
- };
357
-
358
- renderActionPills = (): TemplateResult => {
359
- if (
360
- isMobile() ||
361
- this.isMinimized ||
362
- this.designConcept === DesignConcepts.MINIMIZED
363
- ) {
364
- return html` ${this.hasHideMobileFeatures && isMobile()
365
- ? html`<collapse-expand-button
366
- .toExpand=${this.isMobileFeaturesExpanded}
367
- .primaryColor=${this.primaryColor}
368
- .onClick=${this.toggleMobileFeatures}
369
- ></collapse-expand-button>`
370
- : ""}
371
- <mobile-launcher
372
- .onClickMinimize=${this.onClickMinimize}
373
- .onClickEmailOption=${this.onClickEmailOption}
374
- .onClickPhoneOption=${this.onClickPhoneOption}
375
- .onClickSSTOption=${this.onClickSSTOption}
376
- .onChatTapped=${this.onChatTapped}
377
- .onClickApplyNowOption=${this.onClickApplyNowOption}
378
- .onClickPriceCalculatorOption=${this.onClickPriceCalculatorOption}
379
- .overrideRentgrata=${this.overrideRentgrata}
380
- .isMobileDesign=${isMobile() ||
381
- this.designConcept === DesignConcepts.MINIMIZED}
382
- .primaryColor=${this.primaryColor}
383
- .backgroundColor=${this.backgroundColor}
384
- .hasChatEnabled=${!isMobile()
385
- ? this.hasChatEnabledDesktop
386
- : this.hasChatEnabledMobile}
387
- .hasEmailEnabled=${!isMobile()
388
- ? this.hasEmailEnabledDesktop
389
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
390
- ? false
391
- : this.hasEmailEnabledMobile}
392
- .hasCallUsEnabled=${!isMobile()
393
- ? this.phoneNumber && this.hasCallUsEnabledDesktop
394
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
395
- ? false
396
- : this.hasCallUsEnabledMobile}
397
- .hasTextUsEnabled=${!isMobile()
398
- ? this.hasTextUsEnabledDesktop
399
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
400
- ? false
401
- : this.hasTextUsEnabledMobile}
402
- .hasSSTEnabled=${!isMobile()
403
- ? this.hasSSTEnabledDesktop
404
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
405
- ? false
406
- : this.hasSSTEnabledMobile}
407
- .hasApplyNowEnabled=${!isMobile()
408
- ? this.hasApplyNowEnabledDesktop
409
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
410
- ? false
411
- : this.hasApplyNowEnabledMobile}
412
- .applicationLink=${this.applicationLink}
413
- .hasPricingCalculatorEnabled=${!isMobile()
414
- ? this.hasPricingCalculatorEnabledDesktop
415
- : this.hasHideMobileFeatures && !this.isMobileFeaturesExpanded
416
- ? false
417
- : this.hasPricingCalculatorEnabledMobile}
418
- ></mobile-launcher>`;
419
- }
420
-
421
- if (this.designConcept === DesignConcepts.EMOJI) {
422
- return this.emojiPillList();
423
- }
424
- return this.verticalPillList();
425
- };
426
-
427
- private emojiPillList = (): TemplateResult => {
428
- const emojiPillListItems: {
429
- pillKey: string;
430
- pill: TemplateResult | null;
431
- }[] = [
432
- {
433
- pillKey: "Email",
434
- pill: this.hasEmailEnabledDesktop
435
- ? html` <div
436
- class="type-hey__pill"
437
- @click=${this.onClickEmailOption}
438
- style=${styleMap({
439
- background: this.backgroundColor,
440
- })}
441
- >
442
- <div class="type-hey__pill-left">
443
- <div class="type-hey__icon">${EmailOutlineIcon(
444
- this.foregroundColorOnSecondaryBackgroundColor
445
- )}</div>
446
- <div style=${styleMap({
447
- color: this.foregroundColorOnSecondaryBackgroundColor,
448
- })}><span class="title-bold">Email</span> an agent</div>
449
- </div>
450
- <div class="type-gradient__icon">${ChevronRightIcon(
451
- this.foregroundColorOnSecondaryBackgroundColor
452
- )}</div>
453
- </div>
454
- </div>`
455
- : null,
456
- },
457
- {
458
- pillKey: "SST",
459
- pill: this.hasSSTEnabledDesktop
460
- ? html`
461
- <div
462
- class="type-hey__pill"
463
- @click=${this.onClickSSTOption}
464
- style=${styleMap({
465
- background: this.backgroundColor,
466
- })}>
467
- <div class="type-hey__pill-left">
468
- <div class="type-hey__icon">${BookTourOutlineIcon(
469
- this.foregroundColorOnSecondaryBackgroundColor
470
- )}</div>
471
- <div style=${styleMap({
472
- color: this.foregroundColorOnSecondaryBackgroundColor,
473
- })}>
474
- <span class="title-bold">Book</span> a tour
475
- </div>
476
- </div>
477
- <div class="type-gradient__icon">${ChevronRightIcon(
478
- this.foregroundColorOnSecondaryBackgroundColor
479
- )}</div>
480
- </div>
481
- </div>
482
- `
483
- : null,
484
- },
485
- {
486
- pillKey: "Phone",
487
- pill:
488
- this.phoneNumber &&
489
- (this.hasCallUsEnabledDesktop || this.hasTextUsEnabledDesktop)
490
- ? html`
491
- <div
492
- class="type-hey__pill"
493
- @click=${this.onClickPhoneOption}
494
- style=${styleMap({
495
- background: this.backgroundColor,
496
- })}
497
- >
498
- <div class="type-hey__pill-left">
499
- <div class="type-hey__icon">${PhoneOutlineIcon(
500
- this.foregroundColorOnSecondaryBackgroundColor
501
- )}</div>
502
- <div style=${styleMap({
503
- color: this.foregroundColorOnSecondaryBackgroundColor,
504
- })}>
505
- ${
506
- this.hasCallUsEnabledDesktop &&
507
- this.hasTextUsEnabledDesktop
508
- ? html` <span class="title-bold">Call</span> or
509
- <span class="title-bold">text</span> us`
510
- : ""
511
- }
512
- ${
513
- this.hasCallUsEnabledDesktop &&
514
- !this.hasTextUsEnabledDesktop
515
- ? html` <span class="title-bold">Call</span> us`
516
- : ""
517
- }
518
- ${
519
- !this.hasCallUsEnabledDesktop &&
520
- this.hasTextUsEnabledDesktop
521
- ? html` <span class="title-bold">Text</span> us`
522
- : ""
523
- }
524
-
525
- </div>
526
- </div>
527
- <div class="type-gradient__icon">${ChevronRightIcon(
528
- this.foregroundColorOnSecondaryBackgroundColor
529
- )}</div>
530
- </div>
531
- </div>
532
- `
533
- : null,
534
- },
535
- ];
536
- const pills = emojiPillListItems.filter((v) => !!v.pill);
537
-
538
- return html`
539
- <div
540
- class="type-hey__list"
541
- style=${styleMap({
542
- background: this.primaryColor,
543
- })}
544
- >
545
- <div class="type-hey__chat-container">
546
- ${this.hasChatEnabledDesktop
547
- ? html`<minimize-expand-button
548
- .primaryColor=${this.primaryColor}
549
- .onClick=${this.onClickMinimize}
550
- ></minimize-expand-button>`
551
- : ""}
552
- </div>
553
-
554
- <div class="type-hey__top-section">
555
- <div class="type-hey__ai-topic">
556
- <p>AI Assistant</p>
557
- <div class="type-hey__ai-topic-notch"></div>
558
- </div>
559
- <div class="type-hey__greeting">
560
- <h1>Hey there!</h1>
561
- <div>${HeyThereEmoji()}</div>
562
- </div>
563
- ${this.hasChatEnabledDesktop
564
- ? html`
565
- <div
566
- id="type-hey__ask-prompt"
567
- class="type-hey__pill"
568
- @click=${this.onChatTapped}
569
- style=${styleMap({
570
- background: hexToAlmostWhite(this.primaryColor, 0.2),
571
- })}
572
- >
573
- <div class="type-hey__pill-left">
574
- <div class="type-hey__icon">
575
- ${ChatOutlineIcon(
576
- this.foregroundColorOnPrimaryBackgroundColor
577
- )}
578
- </div>
579
- <div
580
- style=${styleMap({
581
- color: this.foregroundColorOnPrimaryBackgroundColor,
582
- })}
583
- >
584
- <span class="title-bold">Chat</span> with us
585
- </div>
586
- </div>
587
- <div class="type-gradient__icon">
588
- ${ChevronRightIcon(
589
- this.foregroundColorOnPrimaryBackgroundColor
590
- )}
591
- </div>
592
- </div>
593
- `
594
- : ""}
595
- </div>
596
-
597
- <div class="type-hey__bottom-section">
598
- <div class="type-hey__botton-section-pills">
599
- ${pills.map((p) => p.pill)}
600
- ${this.overrideRentgrata && hasRentgrata()
601
- ? html`
602
- <div
603
- class="type-hey__pill"
604
- @click=${() => {
605
- openRengrataWidget();
606
- }}
607
- style=${styleMap({
608
- background: this.backgroundColor,
609
- })}>
610
- <div class="type-hey__pill-left">
611
- <div class="type-hey__icon">${ContactResidentIcon(
612
- "black"
613
- )}</div>
614
- <div>
615
- <span class="title-bold">Contact</span> a resident
616
- </div>
617
- </div>
618
- <div class="type-gradient__icon">${ChevronRightIcon(
619
- this.foregroundColorOnSecondaryBackgroundColor
620
- )}</div>
621
- </div>
622
- </div>`
623
- : ""}
624
- </div>
625
-
626
- <div class="type-hey__bottom-info">
627
- <div class="type-hey__bottom-info-inner">
628
- Online <span class="title-bold">24 hours</span> a day,
629
- <span class="title-bold">7</span> days a week
630
- </div>
631
- </div>
632
- </div>
633
- </div>
634
- `;
635
- };
636
-
637
- private verticalPillList = (): TemplateResult => {
638
- // Some clients are insisting on the tour pill being at the top
639
- const showTourAtTop =
640
- this.orgSlug === "Pacific Urban Residential" ||
641
- this.orgSlug === "cbc11aba-21c4-4571-bc43-ff9d86a029e3";
642
-
643
- const verticalPillListItems: {
644
- pillKey: string;
645
- pill: TemplateResult | null;
646
- }[] = [
647
- {
648
- pillKey: "Chat",
649
- pill: this.hasChatEnabledDesktop
650
- ? html`
651
- <div class="inner-pill-wrapper"
652
- style=${styleMap({
653
- background: showTourAtTop
654
- ? this.backgroundColor
655
- : this.primaryColor,
656
- })}
657
- @click=${this.onChatTapped}>
658
- <div class="vertical-pill-left">
659
- <div class="vertical-pill-icon">${ChatOutlineIcon(
660
- showTourAtTop
661
- ? this.foregroundColorOnSecondaryBackgroundColor
662
- : this.foregroundColorOnPrimaryBackgroundColor
663
- )}</div>
664
- <div class="vertical-pill-title" style=${styleMap({
665
- color: showTourAtTop
666
- ? this.foregroundColorOnSecondaryBackgroundColor
667
- : this.foregroundColorOnPrimaryBackgroundColor,
668
- })}>
669
- <span class="vertical-pill-bold">Chat</span> with us
670
- </div>
671
- </div>
672
- <div class="chevron-right">${ChevronRightIcon(
673
- showTourAtTop
674
- ? this.foregroundColorOnSecondaryBackgroundColor
675
- : this.foregroundColorOnPrimaryBackgroundColor
676
- )}</div>
677
- </div>
678
- </div>
679
- `
680
- : null,
681
- },
682
- {
683
- pillKey: "Price Calculator",
684
- pill: this.hasPricingCalculatorEnabledDesktop
685
- ? html`
686
- <div
687
- @click=${this.onClickPriceCalculatorOption}
688
- class="inner-pill-wrapper"
689
- style=${styleMap({
690
- background: this.backgroundColor,
691
- })}
692
- >
693
- <div class="vertical-pill-left">
694
- <div class="vertical-pill-icon">
695
- ${CalculatorOutlineIcon(
696
- this.foregroundColorOnSecondaryBackgroundColor
697
- )}
698
- </div>
699
- <div class="vertical-pill-title">
700
- <span class="vertical-pill-bold">Calculate</span> Cost
701
- </div>
702
- </div>
703
- <div class="chevron-right">
704
- ${ChevronRightIcon(
705
- this.foregroundColorOnSecondaryBackgroundColor
706
- )}
707
- </div>
708
- </div>
709
- `
710
- : null,
711
- },
712
- {
713
- pillKey: "SST",
714
- pill: this.hasSSTEnabledDesktop
715
- ? html`
716
- <div
717
- @click=${this.onClickSSTOption}
718
- id="overlay-inner-pill"
719
- class="inner-pill-wrapper"
720
- style=${styleMap({
721
- background: showTourAtTop
722
- ? this.primaryColor
723
- : this.backgroundColor,
724
- })}
725
- >
726
- <div class="vertical-pill-left">
727
- <div class="vertical-pill-icon">
728
- ${BookTourOutlineIcon(
729
- showTourAtTop
730
- ? this.foregroundColorOnPrimaryBackgroundColor
731
- : this.foregroundColorOnSecondaryBackgroundColor
732
- )}
733
- </div>
734
- <div
735
- class="vertical-pill-title"
736
- style=${styleMap({
737
- color: showTourAtTop
738
- ? this.foregroundColorOnPrimaryBackgroundColor
739
- : this.foregroundColorOnSecondaryBackgroundColor,
740
- })}
741
- >
742
- <span class="vertical-pill-bold">Book</span>
743
- a tour
744
- </div>
745
- </div>
746
- <div class="chevron-right">
747
- ${ChevronRightIcon(
748
- showTourAtTop
749
- ? this.foregroundColorOnPrimaryBackgroundColor
750
- : this.foregroundColorOnSecondaryBackgroundColor
751
- )}
752
- </div>
753
- </div>
754
- `
755
- : null,
756
- },
757
- {
758
- pillKey: "Email",
759
- pill: this.hasEmailEnabledDesktop
760
- ? html`
761
- <div
762
- @click=${this.onClickEmailOption}
763
- class="inner-pill-wrapper"
764
- style=${styleMap({
765
- background: this.backgroundColor,
766
- })}
767
- >
768
- <div class="vertical-pill-left">
769
- <div class="vertical-pill-icon">
770
- ${EmailOutlineIcon(
771
- this.foregroundColorOnSecondaryBackgroundColor
772
- )}
773
- </div>
774
- <div
775
- class="vertical-pill-title"
776
- style=${styleMap({
777
- color: this.foregroundColorOnSecondaryBackgroundColor,
778
- })}
779
- >
780
- <span class="vertical-pill-bold">Email</span>
781
- an agent
782
- </div>
783
- </div>
784
- <div class="chevron-right">
785
- ${ChevronRightIcon(
786
- this.foregroundColorOnSecondaryBackgroundColor
787
- )}
788
- </div>
789
- </div>
790
- `
791
- : null,
792
- },
793
- {
794
- pillKey: "Phone",
795
- pill:
796
- this.phoneNumber &&
797
- (this.hasCallUsEnabledDesktop || this.hasTextUsEnabledDesktop)
798
- ? html`
799
- <div
800
- @click=${this.onClickPhoneOption}
801
- class="inner-pill-wrapper"
802
- style=${styleMap({
803
- background: this.backgroundColor,
804
- })}
805
- >
806
- <div class="vertical-pill-left">
807
- <div class="vertical-pill-icon">
808
- ${PhoneOutlineIcon(
809
- this.foregroundColorOnSecondaryBackgroundColor
810
- )}
811
- </div>
812
- ${this.hasCallUsEnabledDesktop &&
813
- this.hasTextUsEnabledDesktop
814
- ? html`
815
- <div
816
- class="vertical-pill-title"
817
- style=${styleMap({
818
- color:
819
- this.foregroundColorOnSecondaryBackgroundColor,
820
- })}
821
- >
822
- <span class="vertical-pill-bold">Call</span> or
823
- <span class="vertical-pill-bold">text</span> us
824
- </div>
825
- `
826
- : ""}
827
- ${this.hasCallUsEnabledDesktop &&
828
- !this.hasTextUsEnabledDesktop
829
- ? html`
830
- <div
831
- class="vertical-pill-title"
832
- style=${styleMap({
833
- color:
834
- this.foregroundColorOnSecondaryBackgroundColor,
835
- })}
836
- >
837
- <span class="vertical-pill-bold">Call</span> us
838
- </div>
839
- `
840
- : ""}
841
- ${!this.hasCallUsEnabledDesktop &&
842
- this.hasTextUsEnabledDesktop
843
- ? html`
844
- <div
845
- class="vertical-pill-title"
846
- style=${styleMap({
847
- color:
848
- this.foregroundColorOnSecondaryBackgroundColor,
849
- })}
850
- >
851
- <span class="vertical-pill-bold">Text</span> us
852
- </div>
853
- `
854
- : ""}
855
- </div>
856
- <div class="chevron-right">
857
- ${ChevronRightIcon(
858
- this.foregroundColorOnSecondaryBackgroundColor
859
- )}
860
- </div>
861
- </div>
862
- `
863
- : null,
864
- },
865
- {
866
- pillKey: "Apply",
867
- pill:
868
- this.applicationLink && this.hasApplyNowEnabledDesktop
869
- ? html`
870
- <div
871
- @click=${this.onClickApplyNowOption}
872
- class="inner-pill-wrapper"
873
- style=${styleMap({
874
- background: this.backgroundColor,
875
- })}
876
- >
877
- <div class="vertical-pill-left">
878
- <div class="vertical-pill-icon">
879
- ${ApplyOutlineIcon(
880
- this.foregroundColorOnSecondaryBackgroundColor
881
- )}
882
- </div>
883
- <div
884
- class="vertical-pill-title"
885
- style=${styleMap({
886
- color: this.foregroundColorOnSecondaryBackgroundColor,
887
- })}
888
- >
889
- <span class="vertical-pill-bold">Apply</span>
890
- now
891
- </div>
892
- </div>
893
- <div class="chevron-right">
894
- ${ChevronRightIcon(
895
- this.foregroundColorOnSecondaryBackgroundColor
896
- )}
897
- </div>
898
- </div>
899
- `
900
- : null,
901
- },
902
- ];
903
- const pills = verticalPillListItems.filter((v) => !!v.pill);
904
- if (showTourAtTop) {
905
- const sstIndex = pills.findIndex((p) => p.pillKey === "SST");
906
- if (sstIndex !== -1) {
907
- const [sstPill] = pills.splice(sstIndex, 1);
908
- pills.unshift(sstPill);
909
- }
910
- }
911
- return html`
912
- <div class="vertical-pill-list">
913
- <div class="vertical-pill-list">
914
- ${this.hasChatEnabledDesktop
915
- ? html`<button
916
- @click=${this.onClickMinimize}
917
- class="minimize-button"
918
- aria-label="Minimize"
919
- >
920
- <div class="chevron-down">${ChevronRightIcon("black")}</div>
921
- </button>`
922
- : ""}
923
- ${pills.map((p) => p.pill)}
924
- ${this.overrideRentgrata && hasRentgrata()
925
- ? html`<div
926
- @click=${() => {
927
- openRengrataWidget();
928
- }}
929
- class="inner-pill-wrapper"
930
- style=${styleMap({
931
- background: this.backgroundColor,
932
- })}
933
- >
934
- <div class="vertical-pill-left">
935
- <div class="vertical-pill-icon">
936
- ${ContactResidentIcon(
937
- this.foregroundColorOnSecondaryBackgroundColor
938
- )}
939
- </div>
940
- <div class="vertical-pill-title">
941
- <span class="vertical-pill-bold">Contact</span> a resident
942
- </div>
943
- </div>
944
- <div class="chevron-right">${ChevronRightIcon("black")}</div>
945
- </div>`
946
- : ""}
947
- </div>
948
- </div>
949
- `;
950
- };
951
-
952
- render(): TemplateResult {
953
- installEmailUsWindow();
954
- installCallUsWindow();
955
- installFeeCalculator();
956
-
957
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
958
- (window as any).eliseAi.onOpenSST = (callBack?: () => void) => {
959
- this.isSSTWindowOpen = true;
960
- this.isCallUsWindowOpen = false;
961
- this.isEmailWindowOpen = false;
962
- this.onExitChat();
963
- if (callBack) {
964
- callBack();
965
- }
966
- };
967
-
968
- if (this.hasChatEnabledDesktop || this.hasChatEnabledMobile) {
969
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
970
- (window as any).eliseAi.onOpenChat = (callBack?: () => void) => {
971
- this.onChatTapped();
972
- this.isSSTWindowOpen = false;
973
- this.isCallUsWindowOpen = false;
974
- this.isEmailWindowOpen = false;
975
- if (callBack) {
976
- callBack();
977
- }
978
- };
979
- }
980
- if (this.hasCallUsEnabledDesktop || this.hasCallUsEnabledMobile) {
981
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
982
- (window as any).eliseAi.onOpenCallUsWindow = (callBack?: () => void) => {
983
- this.isCallUsWindowOpen = true;
984
- this.isSSTWindowOpen = false;
985
- this.isEmailWindowOpen = false;
986
- this.onExitChat();
987
- if (callBack) {
988
- callBack();
989
- }
990
- };
991
- }
992
- if (this.hasEmailEnabledDesktop || this.hasEmailEnabledMobile) {
993
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
994
- (window as any).eliseAi.onOpenEmailUsWindow = (callBack?: () => void) => {
995
- this.isEmailWindowOpen = true;
996
- this.isSSTWindowOpen = false;
997
- this.isCallUsWindowOpen = false;
998
- this.onExitChat();
999
- if (callBack) {
1000
- callBack();
1001
- }
1002
- };
1003
- }
1004
- if (
1005
- this.hasPricingCalculatorEnabledDesktop ||
1006
- this.hasPricingCalculatorEnabledMobile
1007
- ) {
1008
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1009
- (window as any).eliseAi.onOpenPriceCalculatorWindow = (
1010
- callBack?: () => void
1011
- ) => {
1012
- this.isCalculatorWindowOpen = true;
1013
- if (callBack) {
1014
- callBack();
1015
- }
1016
- };
1017
- }
1018
- const overrideStyleWindows = {
1019
- top:
1020
- !isMobile() && this.top !== undefined && !isNaN(this.top)
1021
- ? `${this.top}px`
1022
- : undefined,
1023
- bottom:
1024
- !isMobile() && this.bottom !== undefined && !isNaN(this.bottom)
1025
- ? `${this.bottom}px`
1026
- : undefined,
1027
- left:
1028
- !isMobile() && this.left !== undefined && !isNaN(this.left)
1029
- ? `${this.left}px`
1030
- : undefined,
1031
- right:
1032
- !isMobile() && this.right !== undefined && !isNaN(this.right)
1033
- ? `${this.right}px`
1034
- : undefined,
1035
- };
1036
-
1037
- return html`
1038
- <div
1039
- class=${classNames({
1040
- ["launcher__mobile-launcher-wrapper"]: isMobile() || this.isMinimized,
1041
- ["launcher__mini-launcher-wrapper"]: !isMobile() && !this.isMinimized,
1042
- ["launcher__mini-elevated"]:
1043
- this.orgSlug.toLowerCase() === "livcor" &&
1044
- (isMobile() || this.isMinimized),
1045
- })}
1046
- style=${styleMap({
1047
- ...this.launcherStyles,
1048
- ...this.mobileStyles,
1049
- top:
1050
- !isMobile() && this.top !== undefined && !isNaN(this.top)
1051
- ? `${this.top - 700}px`
1052
- : this.mobileStyles.top !== undefined
1053
- ? `${this.mobileStyles.top}px`
1054
- : undefined,
1055
- bottom:
1056
- !isMobile() && this.bottom !== undefined && !isNaN(this.bottom)
1057
- ? `${this.bottom}px`
1058
- : this.mobileStyles.bottom !== undefined
1059
- ? `${this.mobileStyles.bottom}px`
1060
- : "72px",
1061
- left:
1062
- !isMobile() && this.left !== undefined && !isNaN(this.left)
1063
- ? `${this.left}px`
1064
- : this.mobileStyles.left !== undefined
1065
- ? `${this.mobileStyles.left}px`
1066
- : undefined,
1067
- right:
1068
- !isMobile() && this.right !== undefined && !isNaN(this.right)
1069
- ? `${this.right}px`
1070
- : this.mobileStyles.right !== undefined
1071
- ? `${this.mobileStyles.right}px`
1072
- : "18px",
1073
- })}
1074
- >
1075
- ${this.isEmailWindowOpen
1076
- ? html`<div
1077
- class="launcher__window-wrapper"
1078
- style=${styleMap(overrideStyleWindows)}
1079
- >
1080
- <email-us-window
1081
- id="email-us-window"
1082
- chatId="${this.chatId}"
1083
- .leadSources="${this.leadSources}"
1084
- currentLeadSource="${this.currentLeadSource}"
1085
- orgSlug="${this.orgSlug}"
1086
- buildingSlug="${this.buildingSlug}"
1087
- featureFlagShowDropdown="${this.featureFlagShowDropdown}"
1088
- ${ref(this.emailUsWindowRef)}
1089
- .buildingId=${this.buildingId}
1090
- .buildingName=${this.buildingName}
1091
- .leadSourceClient=${this.leadSourceClient}
1092
- .orgLegalName=${this.orgLegalName}
1093
- >
1094
- </email-us-window>
1095
- </div>`
1096
- : ""}
1097
- ${this.isSSTWindowOpen
1098
- ? html`<div
1099
- class="launcher__window-wrapper"
1100
- style=${styleMap(overrideStyleWindows)}
1101
- >
1102
- <tour-scheduler
1103
- id="tour-scheduler-window"
1104
- chatId="${this.chatId}"
1105
- orgSlug="${this.orgSlug}"
1106
- buildingSlug="${this.buildingSlug}"
1107
- sgtUrl="${this.sgtUrl}"
1108
- selfGuidedTourEnabled="${this.selfGuidedTourEnabled}"
1109
- selfGuidedToursTypeOffered="${this.selfGuidedToursTypeOffered}"
1110
- escortedToursLink="${this.escortedToursLink}"
1111
- virtualToursLink="${this.virtualToursLink}"
1112
- currentLeadSource="${this.currentLeadSource}"
1113
- .hasDynamicSchedulingEnabled=${this.hasDynamicSchedulingEnabled}
1114
- .leadSources="${this.leadSources}"
1115
- .tourTypeOptions=${this.tourTypeOptions}
1116
- .orgLegalName=${this.orgLegalName}
1117
- buildingId=${this.buildingId}
1118
- featureFlagShowDropdown="${this.featureFlagShowDropdown}"
1119
- .buildingName=${this.buildingName}
1120
- .primaryColor=${this.primaryColor}
1121
- .foregroundColorOnPrimaryBackgroundColor=${this
1122
- .foregroundColorOnPrimaryBackgroundColor}
1123
- .foregroundColorOnSecondaryBackgroundColor=${this
1124
- .foregroundColorOnSecondaryBackgroundColor}
1125
- .compactDesign=${this.showTourNextToChat
1126
- ? this.showTourNextToChat
1127
- : ""}
1128
- .leadSourceClient=${this.leadSourceClient}
1129
- ${ref(this.tourSchedulerRef)}
1130
- ></tour-scheduler>
1131
- </div>`
1132
- : ""}
1133
- ${this.isCallUsWindowOpen
1134
- ? html`
1135
- <div
1136
- class="launcher__window-wrapper"
1137
- style=${styleMap(overrideStyleWindows)}
1138
- >
1139
- <call-us-window
1140
- id="call-us-window"
1141
- .onCloseClicked=${this.onClosePhoneWindow}
1142
- phoneNumberToCall="${this.phoneNumber}"
1143
- .buildingId=${this.buildingId}
1144
- chatCallUsHeader="${this.chatCallUsHeader}"
1145
- hasTextUsEnabled=${this.hasTextUsEnabledDesktop ||
1146
- this.hasTextUsEnabledMobile
1147
- ? true
1148
- : ""}
1149
- hasCallUsEnabled=${this.hasCallUsEnabledDesktop ||
1150
- this.hasCallUsEnabledMobile
1151
- ? true
1152
- : ""}
1153
- currentLeadSource="${this.currentLeadSource}"
1154
- buildingSlug="${this.buildingSlug}"
1155
- buildingName="${this.buildingName}"
1156
- orgSlug="${this.orgSlug}"
1157
- .leadSourceClient=${this.leadSourceClient}
1158
- .orgLegalName=${this.orgLegalName}
1159
- ></call-us-window>
1160
- </div>
1161
- `
1162
- : ""}
1163
- ${this.isCalculatorWindowOpen
1164
- ? html`
1165
- <div
1166
- class="launcher__window-wrapper"
1167
- style=${styleMap(overrideStyleWindows)}
1168
- >
1169
- <fee-calculator
1170
- id="fee-calculator-window"
1171
- ${ref(this.calculatorWindowRef)}
1172
- buildingSlug=${this.buildingSlug}
1173
- orgSlug="${this.orgSlug}"
1174
- primaryColor="${this.primaryColor}"
1175
- backgroundColor="${this.backgroundColor}"
1176
- .compactDesign=${this.showTourNextToChat}
1177
- ></fee-calculator>
1178
- </div>
1179
- `
1180
- : ""}
1181
- ${!this.isCallToActionWindowOpen() && !this.showTourNextToChat
1182
- ? this.renderActionPills()
1183
- : ""}
1184
- </div>
1185
- `;
1186
- }
1187
- }
1188
-
1189
- export const installLauncher = (): void => {
1190
- if (!window.customElements.get("meetelise-launcher")) {
1191
- window.customElements.define("meetelise-launcher", Launcher);
1192
- }
1193
- };