@meetelise/chat 1.35.0 → 1.35.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 (282) hide show
  1. package/dist/src/MyPubnub.d.ts +116 -0
  2. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +2 -0
  3. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +28 -0
  4. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +2 -0
  5. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +18 -0
  6. package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +2 -0
  7. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +2 -0
  8. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +22 -0
  9. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +2 -0
  10. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +46 -0
  11. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +2 -0
  12. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +21 -0
  13. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +2 -0
  14. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +13 -0
  15. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +2 -0
  16. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +34 -0
  17. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +2 -0
  18. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +18 -0
  19. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +1 -0
  20. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +8 -0
  21. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +1 -0
  22. package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +5 -0
  23. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +2 -0
  24. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +13 -0
  25. package/dist/src/WebComponent/FeeCalculator/constants.d.ts +3 -0
  26. package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +1 -0
  27. package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +55 -0
  28. package/dist/src/WebComponent/FeeCalculator/index.d.ts +2 -0
  29. package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +41 -0
  30. package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +82 -0
  31. package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +5 -0
  32. package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +4 -0
  33. package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +13 -0
  34. package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +6 -0
  35. package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +4 -0
  36. package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +18 -0
  37. package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +8 -0
  38. package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +1 -0
  39. package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +13 -0
  40. package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +10 -0
  41. package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +23 -0
  42. package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +31 -0
  43. package/dist/src/WebComponent/LeadSourceClient.d.ts +46 -0
  44. package/dist/src/WebComponent/OfficeHours.d.ts +21 -0
  45. package/dist/src/WebComponent/Scheduler/date-picker.d.ts +28 -0
  46. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +16 -0
  47. package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +102 -0
  48. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +13 -0
  49. package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +1 -0
  50. package/dist/src/WebComponent/actions/InputStyles.d.ts +1 -0
  51. package/dist/src/WebComponent/actions/action-confirm-button.d.ts +13 -0
  52. package/dist/src/WebComponent/actions/call-us-window.d.ts +37 -0
  53. package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +8 -0
  54. package/dist/src/WebComponent/actions/details-window.d.ts +14 -0
  55. package/dist/src/WebComponent/actions/email-us-window.d.ts +46 -0
  56. package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +17 -0
  57. package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +8 -0
  58. package/dist/src/WebComponent/chat-additional-actions.d.ts +28 -0
  59. package/dist/src/WebComponent/health-chat.d.ts +47 -0
  60. package/dist/src/WebComponent/healthchat-styles.d.ts +1 -0
  61. package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +2 -0
  62. package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +2 -0
  63. package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +2 -0
  64. package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +2 -0
  65. package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +2 -0
  66. package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +2 -0
  67. package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +2 -0
  68. package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +7 -0
  69. package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +2 -0
  70. package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +2 -0
  71. package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +2 -0
  72. package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +3 -0
  73. package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +2 -0
  74. package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +2 -0
  75. package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +2 -0
  76. package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +2 -0
  77. package/dist/src/WebComponent/index.d.ts +2 -0
  78. package/dist/src/WebComponent/launcher/Launcher.d.ts +99 -0
  79. package/dist/src/WebComponent/launcher/launcherStyles.d.ts +1 -0
  80. package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +27 -0
  81. package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +1 -0
  82. package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +1 -0
  83. package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +1 -0
  84. package/dist/src/WebComponent/leasing-chat-styles.d.ts +1 -0
  85. package/dist/src/WebComponent/loaders/index.d.ts +4 -0
  86. package/dist/src/WebComponent/loaders/mega-loader.d.ts +7 -0
  87. package/dist/src/WebComponent/loaders/skeleton-card.d.ts +12 -0
  88. package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +3 -0
  89. package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +13 -0
  90. package/dist/src/WebComponent/me-chat.d.ts +91 -0
  91. package/dist/src/WebComponent/me-select.d.ts +24 -0
  92. package/dist/src/WebComponent/mini-loader.d.ts +5 -0
  93. package/dist/src/WebComponent/pubnub-chat-styles.d.ts +1 -0
  94. package/dist/src/WebComponent/pubnub-chat.d.ts +48 -0
  95. package/dist/src/WebComponent/pubnub-media.d.ts +14 -0
  96. package/dist/src/WebComponent/pubnub-message-styles.d.ts +1 -0
  97. package/dist/src/WebComponent/pubnub-message.d.ts +39 -0
  98. package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +1 -0
  99. package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +12 -0
  100. package/dist/src/WebComponent/utilities-chat.d.ts +47 -0
  101. package/dist/src/WebComponent/utilities-styles.d.ts +1 -0
  102. package/dist/src/WebComponent/utils.d.ts +31 -0
  103. package/dist/src/analytics.d.ts +64 -0
  104. package/dist/src/disclaimers.d.ts +16 -0
  105. package/dist/src/fetchBuildingABTestType.d.ts +8 -0
  106. package/dist/src/fetchBuildingInfo.d.ts +58 -0
  107. package/dist/src/fetchBuildingWebchatView.d.ts +124 -0
  108. package/dist/src/fetchFeatureFlag.d.ts +14 -0
  109. package/dist/src/fetchLeadSources.d.ts +4 -0
  110. package/dist/src/fetchPhoneNumberFromSource.d.ts +6 -0
  111. package/dist/src/getAvailabilities.d.ts +46 -0
  112. package/dist/src/getBuildingPhoneNumber.d.ts +1 -0
  113. package/dist/src/getShouldAllowScheduling.d.ts +1 -0
  114. package/dist/src/getShouldShowWebchat.d.ts +3 -0
  115. package/dist/src/getTimezoneString.d.ts +1 -0
  116. package/dist/src/globals.d.ts +2 -0
  117. package/dist/src/gtm.d.ts +6 -0
  118. package/dist/src/handleChatId.d.ts +11 -0
  119. package/dist/src/insertDNIIntoWebsite.d.ts +5 -0
  120. package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +4 -0
  121. package/dist/src/main/MEChat.d.ts +74 -0
  122. package/dist/src/main/utils.d.ts +2 -0
  123. package/dist/src/postLeadSources.d.ts +3 -0
  124. package/dist/src/rentgrata.d.ts +4 -0
  125. package/dist/src/replaceSelectButtonsWithNewLink.d.ts +5 -0
  126. package/dist/src/services/fees/calculateQuote.d.ts +14 -0
  127. package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +10 -0
  128. package/dist/src/services/fees/fetchBuildingUnits.d.ts +29 -0
  129. package/dist/src/services/fees/utils.d.ts +1 -0
  130. package/dist/src/svgIcons.d.ts +5 -0
  131. package/dist/src/themes.d.ts +5 -0
  132. package/dist/src/types/incentive-v2.d.ts +23 -0
  133. package/dist/src/types/rest-sdk.types.d.ts +11 -0
  134. package/dist/src/types/webchat-no-show-reason.d.ts +1 -0
  135. package/dist/src/utils/getWidgetOverrides.d.ts +39 -0
  136. package/dist/src/utils/queryParamBuilder.d.ts +8 -0
  137. package/dist/src/utils.d.ts +13 -0
  138. package/package.json +1 -1
  139. package/public/dist/index.js +250 -164
  140. package/src/MyPubnub.ts +792 -0
  141. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +39 -0
  142. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +206 -0
  143. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +6 -0
  144. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +101 -0
  145. package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +98 -0
  146. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +9 -0
  147. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +136 -0
  148. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +151 -0
  149. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +261 -0
  150. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +65 -0
  151. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +91 -0
  152. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +44 -0
  153. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +38 -0
  154. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +149 -0
  155. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +247 -0
  156. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +82 -0
  157. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +76 -0
  158. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +40 -0
  159. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +43 -0
  160. package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +1 -0
  161. package/src/WebComponent/FeeCalculator/components/index.ts +5 -0
  162. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +39 -0
  163. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +39 -0
  164. package/src/WebComponent/FeeCalculator/constants.ts +5 -0
  165. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +310 -0
  166. package/src/WebComponent/FeeCalculator/fee-calculator.ts +341 -0
  167. package/src/WebComponent/FeeCalculator/index.ts +4 -0
  168. package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +84 -0
  169. package/src/WebComponent/FeeCalculator/model/building-fee.ts +126 -0
  170. package/src/WebComponent/FeeCalculator/model/desired-addon.ts +6 -0
  171. package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +4 -0
  172. package/src/WebComponent/FeeCalculator/model/index.ts +13 -0
  173. package/src/WebComponent/FeeCalculator/model/item-combination.ts +16 -0
  174. package/src/WebComponent/FeeCalculator/model/item-quantity.ts +4 -0
  175. package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +45 -0
  176. package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +9 -0
  177. package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +1 -0
  178. package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +34 -0
  179. package/src/WebComponent/FeeCalculator/model/rentable-item.ts +21 -0
  180. package/src/WebComponent/FeeCalculator/model/transaction-category.ts +23 -0
  181. package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +54 -0
  182. package/src/WebComponent/LeadSourceClient.ts +332 -0
  183. package/src/WebComponent/MEChat.css +5 -0
  184. package/src/WebComponent/OfficeHours.ts +73 -0
  185. package/src/WebComponent/Scheduler/date-picker.ts +405 -0
  186. package/src/WebComponent/Scheduler/time-picker.ts +195 -0
  187. package/src/WebComponent/Scheduler/tour-scheduler.ts +1430 -0
  188. package/src/WebComponent/Scheduler/tour-type-option.ts +112 -0
  189. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
  190. package/src/WebComponent/actions/InputStyles.ts +57 -0
  191. package/src/WebComponent/actions/action-confirm-button.ts +125 -0
  192. package/src/WebComponent/actions/call-us-window.ts +467 -0
  193. package/src/WebComponent/actions/collapse-expand-button.ts +65 -0
  194. package/src/WebComponent/actions/details-window.ts +150 -0
  195. package/src/WebComponent/actions/email-us-window.ts +556 -0
  196. package/src/WebComponent/actions/formatPhoneNumber.ts +72 -0
  197. package/src/WebComponent/actions/minimize-expand-button.ts +93 -0
  198. package/src/WebComponent/chat-additional-actions.ts +135 -0
  199. package/src/WebComponent/health-chat.ts +270 -0
  200. package/src/WebComponent/healthchat-styles.ts +119 -0
  201. package/src/WebComponent/icons/ApplyOutlineIcon.ts +22 -0
  202. package/src/WebComponent/icons/BookTourOutlineIcon.ts +13 -0
  203. package/src/WebComponent/icons/CalculatorOutlineIcon.ts +80 -0
  204. package/src/WebComponent/icons/ChatOutlineIcon.ts +10 -0
  205. package/src/WebComponent/icons/ChevronLeftIcon.ts +7 -0
  206. package/src/WebComponent/icons/ChevronRightIcon.ts +7 -0
  207. package/src/WebComponent/icons/ContactResidentIcon.ts +9 -0
  208. package/src/WebComponent/icons/DollarOutlineIcon.ts +26 -0
  209. package/src/WebComponent/icons/EmailOutlineIcon.ts +7 -0
  210. package/src/WebComponent/icons/HeyThereEmojiIcon.ts +12 -0
  211. package/src/WebComponent/icons/PhoneOutlineIcon.ts +7 -0
  212. package/src/WebComponent/icons/SendMessageIcon.ts +17 -0
  213. package/src/WebComponent/icons/TourSelfGuidedIcon.ts +17 -0
  214. package/src/WebComponent/icons/TourVirtuallyIcon.ts +17 -0
  215. package/src/WebComponent/icons/TourWithAgentIcon.ts +17 -0
  216. package/src/WebComponent/icons/XOutlineIcon.ts +8 -0
  217. package/src/WebComponent/index.ts +2 -0
  218. package/src/WebComponent/launcher/Launcher.ts +1284 -0
  219. package/src/WebComponent/launcher/launcherStyles.ts +500 -0
  220. package/src/WebComponent/launcher/mobile-launcher.ts +162 -0
  221. package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
  222. package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
  223. package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
  224. package/src/WebComponent/leasing-chat-styles.ts +114 -0
  225. package/src/WebComponent/loaders/index.ts +7 -0
  226. package/src/WebComponent/loaders/mega-loader.ts +36 -0
  227. package/src/WebComponent/loaders/skeleton-card.ts +31 -0
  228. package/src/WebComponent/loaders/skeleton-loader-styles.ts +112 -0
  229. package/src/WebComponent/loaders/skeleton-loader.ts +34 -0
  230. package/src/WebComponent/me-chat.ts +1264 -0
  231. package/src/WebComponent/me-select.ts +322 -0
  232. package/src/WebComponent/mini-loader.ts +28 -0
  233. package/src/WebComponent/pubnub-chat-styles.ts +204 -0
  234. package/src/WebComponent/pubnub-chat.ts +771 -0
  235. package/src/WebComponent/pubnub-media.ts +208 -0
  236. package/src/WebComponent/pubnub-message-styles.ts +54 -0
  237. package/src/WebComponent/pubnub-message.ts +431 -0
  238. package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +34 -0
  239. package/src/WebComponent/simple-launcher/simple-launcher.ts +100 -0
  240. package/src/WebComponent/utilities-chat.ts +270 -0
  241. package/src/WebComponent/utilities-styles.ts +110 -0
  242. package/src/WebComponent/utils.ts +82 -0
  243. package/src/analytics.ts +217 -0
  244. package/src/assetUrls.ts +6 -0
  245. package/src/disclaimers.ts +301 -0
  246. package/src/fetchBuildingABTestType.ts +21 -0
  247. package/src/fetchBuildingInfo.ts +88 -0
  248. package/src/fetchBuildingWebchatView.ts +176 -0
  249. package/src/fetchFeatureFlag.ts +250 -0
  250. package/src/fetchLeadSources.ts +98 -0
  251. package/src/fetchPhoneNumberFromSource.ts +31 -0
  252. package/src/fetchWebchatPreferences.ts +54 -0
  253. package/src/getAvailabilities.ts +189 -0
  254. package/src/getBuildingPhoneNumber.ts +26 -0
  255. package/src/getShouldAllowScheduling.ts +16 -0
  256. package/src/getShouldShowWebchat.ts +114 -0
  257. package/src/getTimezoneString.ts +40 -0
  258. package/src/globals.ts +3 -0
  259. package/src/gtm.ts +17 -0
  260. package/src/handleChatId.ts +101 -0
  261. package/src/insertDNIIntoWebsite.ts +146 -0
  262. package/src/insertLeadSourceIntoSchedulerLinks.ts +71 -0
  263. package/src/main/MEChat.test.ts +110 -0
  264. package/src/main/MEChat.ts +404 -0
  265. package/src/main/utils.ts +70 -0
  266. package/src/postLeadSources.ts +44 -0
  267. package/src/rentgrata.ts +74 -0
  268. package/src/replaceSelectButtonsWithNewLink.ts +91 -0
  269. package/src/services/fees/calculateQuote.ts +74 -0
  270. package/src/services/fees/fetchBuildingFees.ts +50 -0
  271. package/src/services/fees/fetchBuildingFeesV2.ts +59 -0
  272. package/src/services/fees/fetchBuildingFloorplans.ts +74 -0
  273. package/src/services/fees/fetchBuildingUnits.ts +86 -0
  274. package/src/services/fees/utils.ts +4 -0
  275. package/src/svgIcons.ts +14 -0
  276. package/src/themes.ts +65 -0
  277. package/src/types/incentive-v2.ts +24 -0
  278. package/src/types/rest-sdk.types.ts +13 -0
  279. package/src/types/webchat-no-show-reason.ts +6 -0
  280. package/src/utils/getWidgetOverrides.ts +91 -0
  281. package/src/utils/queryParamBuilder.ts +28 -0
  282. package/src/utils.ts +121 -0
@@ -0,0 +1,217 @@
1
+ import axios from "axios";
2
+ import { getCookieValue } from "./utils";
3
+
4
+ declare global {
5
+ interface Window {
6
+ RCTPCampaign?: { CampaignDetails: { Source: string } };
7
+ }
8
+ }
9
+
10
+ export interface CampaignSources {
11
+ entrataCampaignSource: string | null;
12
+ yardiCampaignSource: string | null;
13
+ realpageCampaignSource: string | null;
14
+ utmCampaignSource: string | null;
15
+ bozzutoAdSource: string | null;
16
+ }
17
+
18
+ /**
19
+ * A connection to the MeetElise API to send analytics events
20
+ */
21
+ export default class Analytics {
22
+ private org: string;
23
+ private building: string;
24
+ private featureFlags?: Record<string, boolean>;
25
+ public chatId: string;
26
+ private incomingProcessedLeadSource: string | null;
27
+
28
+ constructor(
29
+ org: string,
30
+ building: string,
31
+ chatId: string,
32
+ incomingProcessedLeadSource: string | null
33
+ ) {
34
+ this.org = org;
35
+ this.building = building;
36
+ this.chatId = chatId;
37
+ this.incomingProcessedLeadSource = incomingProcessedLeadSource;
38
+ this.featureFlags = {};
39
+ }
40
+
41
+ /**
42
+ * Store feature flag value(s) on the Analytics object to be sent with future pings. If `featureFlags` object is already present, the argument is merged into it.
43
+ */
44
+ setFeatureFlags(featureFlags: Record<string, boolean>): void {
45
+ this.featureFlags = {
46
+ ...this.featureFlags,
47
+ ...featureFlags,
48
+ };
49
+ }
50
+
51
+ /**
52
+ * Send an event. Takes one argument, the event type name.
53
+ */
54
+ ping(eventType: string): void {
55
+ fetch(
56
+ "https://app.meetelise.com/platformApi/connectors/talk_js/analytics",
57
+ {
58
+ method: "POST",
59
+ credentials: "omit", // Necessary for successful CORS
60
+ keepalive: true, // Analytics should not abort after browser close
61
+ headers: { "content-type": "application/json; charset=UTF-8" },
62
+ body: JSON.stringify({
63
+ eventType,
64
+ chatId: this.chatId,
65
+ url: location.href,
66
+ org: this.org,
67
+ building: this.building,
68
+ referrer: document.referrer,
69
+ featureFlags: this.featureFlags,
70
+ campaignSources: getCampaignSources(),
71
+ incomingProcessedLeadSource: this.incomingProcessedLeadSource, // if we already know the lead source, send it along
72
+ webchatVersion: process.env.npm_package_version ?? "1.20.155",
73
+ }),
74
+ }
75
+ );
76
+ }
77
+ }
78
+
79
+ export const getCampaignSources = (): CampaignSources => {
80
+ try {
81
+ const queryParams = new URL(window.location.href).searchParams;
82
+ const yardiCampaignSource =
83
+ window.RCTPCampaign?.CampaignDetails?.Source ?? null;
84
+ const entrataCampaignSource = queryParams.get("switch_cls[id]");
85
+ const realpageCampaignSource = queryParams.get("ilm");
86
+ const utmCampaignSource = queryParams.get("utm_source");
87
+ const bozzutoAdSource = getCookieValue("bozzuto_ad_source");
88
+
89
+ return {
90
+ entrataCampaignSource,
91
+ realpageCampaignSource,
92
+ utmCampaignSource,
93
+ yardiCampaignSource,
94
+ bozzutoAdSource,
95
+ };
96
+ } catch (e) {
97
+ /**
98
+ * Some clients have pages that overwrite the `URL` class and turn it into a string. This is a workaround for that.
99
+ * Example site: https://ther3.com
100
+ */
101
+ // eslint-disable-next-line no-console
102
+ console.warn(`Couldnt get campaign sources from url, error: ${e}`);
103
+ const iframe = document.createElement("iframe");
104
+ iframe.style.display = "none";
105
+ document.body.appendChild(iframe);
106
+ if (!iframe.contentWindow) {
107
+ return {
108
+ entrataCampaignSource: null,
109
+ realpageCampaignSource: null,
110
+ utmCampaignSource: null,
111
+ yardiCampaignSource: null,
112
+ bozzutoAdSource: null,
113
+ };
114
+ }
115
+
116
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
117
+ const OriginalURL = (iframe.contentWindow as any).URL;
118
+ if (!OriginalURL) {
119
+ return {
120
+ entrataCampaignSource: null,
121
+ realpageCampaignSource: null,
122
+ utmCampaignSource: null,
123
+ yardiCampaignSource: null,
124
+ bozzutoAdSource: null,
125
+ };
126
+ }
127
+ const queryParams = new OriginalURL(window.location.href).searchParams;
128
+ const yardiCampaignSource =
129
+ window.RCTPCampaign?.CampaignDetails?.Source ?? null;
130
+ const entrataCampaignSource = queryParams.get("switch_cls[id]");
131
+ const realpageCampaignSource = queryParams.get("ilm");
132
+ const utmCampaignSource = queryParams.get("utm_source");
133
+ const bozzutoAdSource = getCookieValue("bozzuto_ad_source");
134
+
135
+ return {
136
+ entrataCampaignSource,
137
+ realpageCampaignSource,
138
+ utmCampaignSource,
139
+ yardiCampaignSource,
140
+ bozzutoAdSource,
141
+ };
142
+ }
143
+ };
144
+
145
+ export enum LogType {
146
+ error = "error",
147
+ info = "info",
148
+ warn = "warn",
149
+ }
150
+
151
+ export const sendLoggingEvent = async ({
152
+ logType,
153
+ buildingSlug,
154
+ orgSlug,
155
+ logTitle,
156
+ logData,
157
+ }: {
158
+ logType?: LogType;
159
+ buildingSlug?: string;
160
+ orgSlug?: string;
161
+ logTitle: string;
162
+ logData: Record<string, unknown> | null;
163
+ }): Promise<void> => {
164
+ const host = "https://app.meetelise.com";
165
+ await axios.post(
166
+ `${host}/platformApi/webchat/logging`,
167
+ {
168
+ ...logData,
169
+ },
170
+ {
171
+ headers: {
172
+ "Content-Type": "application/json",
173
+ "building-slug": buildingSlug ?? "",
174
+ "org-slug": orgSlug ?? "",
175
+ "log-type": logType ?? LogType.error,
176
+ "log-title": logTitle.toUpperCase().replace(/\s/g, "_"),
177
+ },
178
+ }
179
+ );
180
+ };
181
+
182
+ interface SignalLoggerProps {
183
+ org_slug: string;
184
+ building_slug: string;
185
+ chat_id?: string | null;
186
+ is_pixel_on_site?: boolean | null;
187
+ is_any_webchat_showing?: boolean | null;
188
+ is_form_override_success?: boolean | null;
189
+ is_dni_insert_override_success?: boolean | null;
190
+ is_application_link_replacement_success?: boolean | null;
191
+ extra_data?: Record<string, unknown> | null;
192
+ }
193
+
194
+ export const logSignal = async ({
195
+ params,
196
+ sampleRate,
197
+ }: {
198
+ params: SignalLoggerProps;
199
+ sampleRate: number; // 0.05 is 5%
200
+ }): Promise<void> => {
201
+ try {
202
+ if (Math.random() >= sampleRate) {
203
+ return;
204
+ }
205
+ await axios.post(
206
+ `https://app.meetelise.com/platformApi/webchat/log/signal`,
207
+ {
208
+ ...params,
209
+ website_origin: window.location.origin,
210
+ website_search: window.location.search,
211
+ }
212
+ );
213
+ } catch (error) {
214
+ // eslint-disable-next-line no-console
215
+ console.warn(error);
216
+ }
217
+ };
@@ -0,0 +1,6 @@
1
+ export const glowBarMp4 =
2
+ "https://eliseusercontent.meetelise.com/webchat/HorizontalBar-Shadow.mp4";
3
+ export const glowBarWebm =
4
+ "https://eliseusercontent.meetelise.com/webchat/HorizontalBar-Shadow.webm";
5
+ export const glowBackgroundMp4 =
6
+ "https://eliseusercontent.meetelise.com/webchat/01-EliseAI-Hero_1.mp4";
@@ -0,0 +1,301 @@
1
+ import { html, TemplateResult } from "lit";
2
+ import { styleMap } from "lit/directives/style-map.js";
3
+ import { CheckboxEmpty } from "./svgIcons";
4
+ import { HeyThereEmoji } from "./WebComponent/icons/HeyThereEmojiIcon";
5
+
6
+ const disclaimerStyles = {
7
+ container: {
8
+ fontSize: "10px",
9
+ paddingTop: "4px",
10
+ },
11
+ link: {
12
+ color: "#4287f5",
13
+ },
14
+ };
15
+
16
+ export const CURRENT_CONSENT_ID = "currentConsentId";
17
+
18
+ const formDisclaimer = ({
19
+ phoneNumberInput,
20
+ emailInput,
21
+ orgLegalName,
22
+ orgSlug,
23
+ }: {
24
+ buildingName: string;
25
+ phoneNumberInput?: string;
26
+ emailInput?: string;
27
+ orgLegalName: string;
28
+ orgSlug: string;
29
+ }): TemplateResult => {
30
+ if (phoneNumberInput && orgSlug === "greystar") {
31
+ return html`<div style=${styleMap(disclaimerStyles.container)}>
32
+ By providing your phone number and clicking send, you consent to receive
33
+ recurring marketing calls and voice and text messages from Greystar or on
34
+ its behalf at this number using artificial voice and/or an autodialer.
35
+ Messages may be AI or human-generated. Your phone number and
36
+ communications are shared with and recorded and used by EliseAI. You are
37
+ not required to provide your phone number or consent to these terms to
38
+ lease at this property. Msg & Data rates may apply. You consent to
39
+ <a
40
+ style=${styleMap(disclaimerStyles.link)}
41
+ href="https://www.greystar.com/privacy"
42
+ target="_blank"
43
+ rel="noopener noreferrer"
44
+ >Greystar’s Global Privacy Policy</a
45
+ >
46
+ and
47
+ <a
48
+ style=${styleMap(disclaimerStyles.link)}
49
+ href="http://bit.ly/me_privacy_policy"
50
+ target="_blank"
51
+ rel="noopener noreferrer"
52
+ >EliseAI’s Privacy Policy</a
53
+ >.
54
+ </div>`;
55
+ }
56
+ if (phoneNumberInput) {
57
+ return html` <div style=${styleMap(disclaimerStyles.container)}>
58
+ By providing your number and clicking send, you consent to receive
59
+ recurring marketing calls and voice and text messages from or on behalf of
60
+ ${orgLegalName} at this number using artificial voice or an autodialer
61
+ system. Messages may be AI or human generated. This consent is not
62
+ required to lease at this property. Msg & Data rates may apply. You
63
+ consent to this
64
+ <a
65
+ style=${styleMap(disclaimerStyles.link)}
66
+ href="http://bit.ly/me_privacy_policy"
67
+ target="_blank"
68
+ rel="noopener noreferrer"
69
+ >privacy policy</a
70
+ >, including having your number and communications recorded and used by a
71
+ third party.
72
+ </div>`;
73
+ }
74
+ if (emailInput) {
75
+ return html` <div style=${styleMap(disclaimerStyles.container)}>
76
+ By entering your email and clicking submit, you consent to this
77
+ <a
78
+ style=${styleMap(disclaimerStyles.link)}
79
+ href="http://bit.ly/me_privacy_policy"
80
+ target="_blank"
81
+ rel="noopener noreferrer"
82
+ >privacy policy</a
83
+ >, including having your email address and communications collected and
84
+ recorded and used by a third party.
85
+ </div>`;
86
+ }
87
+ return html``;
88
+ };
89
+
90
+ export const getConsentPreChatDisclaimer = (
91
+ orgSlug: string | null,
92
+ privacyPolicyUrl: string,
93
+ consentKey: string,
94
+ changeConsent: (hasConsent: boolean) => void
95
+ ): TemplateResult => {
96
+ if (orgSlug === "avb" && !localStorage.getItem(consentKey ?? "")) {
97
+ return html`
98
+ <div class="legal-confirmation-inner-container">
99
+ <div>${HeyThereEmoji()}</div>
100
+ <div>
101
+ <span style="font-weight: 600">Confirm to continue</span>
102
+ <p>
103
+ By using this feature you accept our
104
+ <a
105
+ href="https://www.avaloncommunities.com/terms-of-use"
106
+ target="_blank"
107
+ rel="noopener noreferrer"
108
+ class="privacy-policy-link"
109
+ >Terms</a
110
+ >,
111
+ <a
112
+ href="https://www.avaloncommunities.com/privacy-policy"
113
+ target="_blank"
114
+ rel="noopener noreferrer"
115
+ class="privacy-policy-link"
116
+ >Privacy Policy</a
117
+ >,
118
+ <a
119
+ href="https://www.avaloncommunities.com/us-state-privacy-notice"
120
+ target="_blank"
121
+ rel="noopener noreferrer"
122
+ class="privacy-policy-link"
123
+ >U.S. State Privacy Notice</a
124
+ >, and that chats may use automated or AI responses from a bot and
125
+ may be recorded and used by us and our vendors.
126
+ </p>
127
+ </div>
128
+
129
+ <button
130
+ class="agreeButton"
131
+ @click=${() => {
132
+ changeConsent(true);
133
+ const consentData = {
134
+ consentGiven: true,
135
+ timestamp: new Date().getTime(),
136
+ consentId: CURRENT_CONSENT_ID,
137
+ };
138
+ localStorage.setItem(consentKey ?? "", JSON.stringify(consentData));
139
+ }}
140
+ >
141
+ I agree
142
+ </button>
143
+ </div>
144
+ `;
145
+ }
146
+ if (orgSlug === "mill-creek") {
147
+ return html`<div class="legal-confirmation-inner-container">
148
+ <div>${HeyThereEmoji()}</div>
149
+ <div>
150
+ <span style="font-weight: 600">Confirm to continue</span>
151
+ <p>
152
+ Hello! I'm your virtual assistant, Milly, and I am here to help you
153
+ today. Before I can answer any questions, it is important that you
154
+ know I am a third-party bot, and I will be collecting our
155
+ communications and other information you provide, consistent with our
156
+ privacy policy.
157
+ </p>
158
+ <div class="confirmation-with-checkbox">
159
+ <div
160
+ class="checkbox"
161
+ @click=${() => {
162
+ changeConsent(true);
163
+ }}
164
+ >
165
+ ${CheckboxEmpty}
166
+ </div>
167
+ <p>
168
+ I agree to the
169
+ <a
170
+ href=${privacyPolicyUrl}
171
+ target="_blank"
172
+ rel="noopener noreferrer"
173
+ class="privacy-policy-link"
174
+ >
175
+ privacy policy</a
176
+ >
177
+ and terms and conditions, Let's go!
178
+ </p>
179
+ </div>
180
+ </div>
181
+ </div>`;
182
+ }
183
+ return html` <div class="legal-confirmation-inner-container">
184
+ <div>${HeyThereEmoji()}</div>
185
+ <div>
186
+ <span style="font-weight: 600">Confirm to continue</span>
187
+ <p>
188
+ Hello, before I can answer questions for you, it's important that I let
189
+ you know that I am a third-party AI Assistant that will collect our
190
+ conversation and other information you provide, consistent with our
191
+ <a
192
+ href=${privacyPolicyUrl}
193
+ target="_blank"
194
+ rel="noopener noreferrer"
195
+ class="privacy-policy-link"
196
+ >
197
+ privacy policy</a
198
+ >.
199
+ </p>
200
+ </div>
201
+
202
+ <button
203
+ class="agreeButton"
204
+ @click=${() => {
205
+ changeConsent(true);
206
+ }}
207
+ >
208
+ I agree
209
+ </button>
210
+ </div>`;
211
+ };
212
+
213
+ export const inChatThreadDisclaimer = ({
214
+ orgSlug,
215
+ buildingState,
216
+ type,
217
+ }: {
218
+ orgSlug: string;
219
+ buildingState: string | null;
220
+ type: "healthcare" | "utilities" | "leasing";
221
+ }): TemplateResult => {
222
+ if (type === "utilities") {
223
+ return html` <p class="utilities-disclaimer-inner">
224
+ By interacting with this system, you consent to
225
+ <a
226
+ href="http://bit.ly/me_privacy_policy"
227
+ target="_blank"
228
+ rel="noopener noreferrer"
229
+ >
230
+ this privacy policy</a
231
+ >
232
+ , including being contacted by AI or a human & having your conversation
233
+ recorded and used by a third party.
234
+ </p>`;
235
+ }
236
+ if (type === "healthcare") {
237
+ return html`
238
+ <p class="healthcare-disclaimer-inner">
239
+ By interacting with this system, you consent to
240
+ <a
241
+ href="http://bit.ly/me_privacy_policy"
242
+ target="_blank"
243
+ rel="noopener noreferrer"
244
+ >
245
+ this privacy policy
246
+ </a>
247
+ , including being contacted by AI or a human & having your conversation
248
+ recorded and used by a third party.
249
+ </p>
250
+ `;
251
+ }
252
+ if (type === "leasing") {
253
+ if (orgSlug === "avb") {
254
+ return html`
255
+ <li class="message-container disclaimer-message">
256
+ <p class="disclaimer-inner">
257
+ Chats may be recorded by us and our vendors.
258
+ </p>
259
+ </li>
260
+ `;
261
+ }
262
+ if (buildingState && buildingState.toUpperCase() === "UT") {
263
+ return html`
264
+ <li class="message-container disclaimer-message">
265
+ <p class="disclaimer-inner">
266
+ By interacting with this system, you consent to
267
+ <a
268
+ href="http://bit.ly/me_privacy_policy"
269
+ target="_blank"
270
+ rel="noopener noreferrer"
271
+ >
272
+ this privacy policy
273
+ </a>
274
+ and to interacting with generative AI or a human & having your
275
+ conversation recorded and used by a third party.
276
+ </p>
277
+ </li>
278
+ `;
279
+ }
280
+
281
+ return html`
282
+ <li class="message-container disclaimer-message">
283
+ <p class="disclaimer-inner">
284
+ By interacting with this system, you consent to
285
+ <a
286
+ href="http://bit.ly/me_privacy_policy"
287
+ target="_blank"
288
+ rel="noopener noreferrer"
289
+ >
290
+ this privacy policy
291
+ </a>
292
+ , including being contacted by AI or a human & having your
293
+ conversation recorded and used by a third party.
294
+ </p>
295
+ </li>
296
+ `;
297
+ }
298
+ return html``;
299
+ };
300
+
301
+ export default formDisclaimer;
@@ -0,0 +1,21 @@
1
+ import axios from "axios";
2
+ interface BuildingABType {
3
+ abTestType: string;
4
+ }
5
+ export enum abTestTypes {
6
+ "ConceptEmoji" = "Concept 2 (Blue/White)",
7
+ }
8
+ export default async function fetchBuildingABTestType(
9
+ buildingSlug: string
10
+ ): Promise<BuildingABType | null> {
11
+ const host = "https://app.meetelise.com";
12
+ try {
13
+ const abTestTypeResponse = await axios.get(
14
+ `${host}/platformApi/webchat/${buildingSlug}/ab-test-type`
15
+ );
16
+ //return { abTestType: "Concept 2 (Blue/White)" };
17
+ return abTestTypeResponse.data;
18
+ } catch (_) {
19
+ return null;
20
+ }
21
+ }
@@ -0,0 +1,88 @@
1
+ import axios from "axios";
2
+
3
+ export interface LabeledOption {
4
+ label: string;
5
+ value: string | number;
6
+ }
7
+
8
+ /**
9
+ * @deprecated Use BuildingWebchatView instead.
10
+ * The response from the API.
11
+ */
12
+ export interface Building {
13
+ id: number;
14
+ themeId: string;
15
+ avatarSrc: string | null;
16
+ avatarType: "image" | "initials" | null;
17
+ chatSubtitle: string | null;
18
+ chatTitle: string | null;
19
+ name: string;
20
+ userFirstName: string;
21
+ userId: number;
22
+ welcomeMessage: string | null;
23
+ systemWelcomeMessage: string | null;
24
+ launchedDateTime: string | null;
25
+ orgId: number;
26
+ phoneNumber: string;
27
+ tourTypeOptions: LabeledOption[];
28
+ chatWidgets?: string[] | null;
29
+ chatCallUsHeader?: string;
30
+ autoOpenChatWidget: boolean;
31
+ sgtUrl: string;
32
+ escortedToursLink: string;
33
+ virtualToursLink: string;
34
+ active: number;
35
+ usesDynamicScheduling: boolean;
36
+ textWithUsPhoneNumber: string | null;
37
+ orgLegalName: string;
38
+ webchatScopeConfigured: boolean;
39
+ virtualTourEnabled: boolean;
40
+ escortedTourEnabled: boolean;
41
+ selfGuidedTourEnabled: boolean;
42
+ escortedToursTypeOffered: string;
43
+ virtualToursTypeOffered: string;
44
+ selfGuidedToursTypeOffered: string;
45
+ state: string | null;
46
+ }
47
+
48
+ export type UnitV2 = {
49
+ name: string;
50
+ layout: string;
51
+ availabilityStage: number;
52
+ active: number;
53
+ occupied: boolean;
54
+ };
55
+
56
+ /**
57
+ * Load the publicly-available info for a building.
58
+ * @deprecated Use fetchBuildingAndConfig instead.
59
+ * @param orgSlug - The org slug, e.g. "big-prop-co"
60
+ * @param buildingSlug - The buidling slug, e.g. "gravity-falls"
61
+ * @returns The building's ID, name, theme, and agent.
62
+ */
63
+ export default async function fetchBuildingInfo(
64
+ orgSlug: string,
65
+ buildingSlug: string
66
+ ): Promise<Building> {
67
+ const host = "https://app.meetelise.com";
68
+ const buildingUrl = `${host}/api/pub/v1/organization/${orgSlug}/building/${buildingSlug}`;
69
+
70
+ const buildingResponse = await axios.get(buildingUrl);
71
+
72
+ const building: Building = buildingResponse.data;
73
+ try {
74
+ building.welcomeMessage = replaceName(
75
+ building.welcomeMessage ?? "",
76
+ building.userFirstName
77
+ );
78
+ } catch (e) {
79
+ // eslint-disable-next-line no-console
80
+ console.error(e);
81
+ }
82
+ return building;
83
+ }
84
+
85
+ const replaceName = (originalText: string, newName: string) => {
86
+ const regex = /elise/gi;
87
+ return originalText.replace(regex, newName);
88
+ };