@meetelise/chat 1.34.1 → 1.34.3

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