@meetelise/chat 1.34.2 → 1.34.4

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 (280) hide show
  1. package/package.json +1 -1
  2. package/public/dist/index.js +1 -1
  3. package/dist/src/MyPubnub.d.ts +0 -116
  4. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +0 -2
  5. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +0 -28
  6. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +0 -2
  7. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +0 -18
  8. package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +0 -2
  9. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +0 -2
  10. package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +0 -22
  11. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +0 -2
  12. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +0 -46
  13. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +0 -2
  14. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +0 -21
  15. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +0 -2
  16. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +0 -13
  17. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +0 -2
  18. package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +0 -34
  19. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +0 -2
  20. package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +0 -18
  21. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +0 -1
  22. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +0 -8
  23. package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +0 -1
  24. package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +0 -5
  25. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +0 -2
  26. package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +0 -13
  27. package/dist/src/WebComponent/FeeCalculator/constants.d.ts +0 -3
  28. package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +0 -1
  29. package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +0 -55
  30. package/dist/src/WebComponent/FeeCalculator/index.d.ts +0 -2
  31. package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +0 -41
  32. package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +0 -82
  33. package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +0 -5
  34. package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +0 -4
  35. package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +0 -13
  36. package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +0 -6
  37. package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +0 -4
  38. package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +0 -18
  39. package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +0 -8
  40. package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +0 -1
  41. package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +0 -9
  42. package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +0 -9
  43. package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +0 -23
  44. package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +0 -31
  45. package/dist/src/WebComponent/LeadSourceClient.d.ts +0 -46
  46. package/dist/src/WebComponent/OfficeHours.d.ts +0 -21
  47. package/dist/src/WebComponent/Scheduler/date-picker.d.ts +0 -28
  48. package/dist/src/WebComponent/Scheduler/time-picker.d.ts +0 -14
  49. package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +0 -101
  50. package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +0 -13
  51. package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +0 -1
  52. package/dist/src/WebComponent/actions/InputStyles.d.ts +0 -1
  53. package/dist/src/WebComponent/actions/action-confirm-button.d.ts +0 -13
  54. package/dist/src/WebComponent/actions/call-us-window.d.ts +0 -37
  55. package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +0 -8
  56. package/dist/src/WebComponent/actions/details-window.d.ts +0 -14
  57. package/dist/src/WebComponent/actions/email-us-window.d.ts +0 -46
  58. package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +0 -17
  59. package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +0 -8
  60. package/dist/src/WebComponent/chat-additional-actions.d.ts +0 -28
  61. package/dist/src/WebComponent/health-chat.d.ts +0 -47
  62. package/dist/src/WebComponent/healthchat-styles.d.ts +0 -1
  63. package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +0 -2
  64. package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +0 -2
  65. package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +0 -2
  66. package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +0 -2
  67. package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +0 -2
  68. package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +0 -2
  69. package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +0 -2
  70. package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +0 -7
  71. package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +0 -2
  72. package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +0 -2
  73. package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +0 -2
  74. package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +0 -3
  75. package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +0 -2
  76. package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +0 -2
  77. package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +0 -2
  78. package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +0 -2
  79. package/dist/src/WebComponent/index.d.ts +0 -2
  80. package/dist/src/WebComponent/launcher/Launcher.d.ts +0 -99
  81. package/dist/src/WebComponent/launcher/launcherStyles.d.ts +0 -1
  82. package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +0 -27
  83. package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +0 -1
  84. package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +0 -1
  85. package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +0 -1
  86. package/dist/src/WebComponent/leasing-chat-styles.d.ts +0 -1
  87. package/dist/src/WebComponent/loaders/index.d.ts +0 -4
  88. package/dist/src/WebComponent/loaders/mega-loader.d.ts +0 -7
  89. package/dist/src/WebComponent/loaders/skeleton-card.d.ts +0 -12
  90. package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +0 -3
  91. package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +0 -13
  92. package/dist/src/WebComponent/me-chat.d.ts +0 -91
  93. package/dist/src/WebComponent/me-select.d.ts +0 -24
  94. package/dist/src/WebComponent/mini-loader.d.ts +0 -5
  95. package/dist/src/WebComponent/pubnub-chat-styles.d.ts +0 -1
  96. package/dist/src/WebComponent/pubnub-chat.d.ts +0 -49
  97. package/dist/src/WebComponent/pubnub-media.d.ts +0 -14
  98. package/dist/src/WebComponent/pubnub-message-styles.d.ts +0 -1
  99. package/dist/src/WebComponent/pubnub-message.d.ts +0 -39
  100. package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +0 -1
  101. package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +0 -12
  102. package/dist/src/WebComponent/utilities-chat.d.ts +0 -47
  103. package/dist/src/WebComponent/utilities-styles.d.ts +0 -1
  104. package/dist/src/WebComponent/utils.d.ts +0 -31
  105. package/dist/src/analytics.d.ts +0 -64
  106. package/dist/src/disclaimers.d.ts +0 -9
  107. package/dist/src/fetchBuildingABTestType.d.ts +0 -8
  108. package/dist/src/fetchBuildingInfo.d.ts +0 -57
  109. package/dist/src/fetchBuildingWebchatView.d.ts +0 -124
  110. package/dist/src/fetchFeatureFlag.d.ts +0 -14
  111. package/dist/src/fetchLeadSources.d.ts +0 -4
  112. package/dist/src/fetchPhoneNumberFromSource.d.ts +0 -6
  113. package/dist/src/getAvailabilities.d.ts +0 -45
  114. package/dist/src/getBuildingPhoneNumber.d.ts +0 -1
  115. package/dist/src/getShouldAllowScheduling.d.ts +0 -1
  116. package/dist/src/getShouldShowWebchat.d.ts +0 -3
  117. package/dist/src/getTimezoneString.d.ts +0 -1
  118. package/dist/src/globals.d.ts +0 -2
  119. package/dist/src/gtm.d.ts +0 -6
  120. package/dist/src/handleChatId.d.ts +0 -11
  121. package/dist/src/insertDNIIntoWebsite.d.ts +0 -5
  122. package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +0 -4
  123. package/dist/src/main/MEChat.d.ts +0 -74
  124. package/dist/src/main/utils.d.ts +0 -2
  125. package/dist/src/postLeadSources.d.ts +0 -3
  126. package/dist/src/rentgrata.d.ts +0 -4
  127. package/dist/src/replaceSelectButtonsWithNewLink.d.ts +0 -5
  128. package/dist/src/services/fees/calculateQuote.d.ts +0 -14
  129. package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +0 -10
  130. package/dist/src/services/fees/fetchBuildingUnits.d.ts +0 -29
  131. package/dist/src/services/fees/utils.d.ts +0 -1
  132. package/dist/src/svgIcons.d.ts +0 -5
  133. package/dist/src/themes.d.ts +0 -5
  134. package/dist/src/types/incentive-v2.d.ts +0 -23
  135. package/dist/src/types/rest-sdk.types.d.ts +0 -11
  136. package/dist/src/types/webchat-no-show-reason.d.ts +0 -1
  137. package/dist/src/utils/queryParamBuilder.d.ts +0 -8
  138. package/dist/src/utils.d.ts +0 -13
  139. package/src/MyPubnub.ts +0 -792
  140. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +0 -35
  141. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +0 -206
  142. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +0 -6
  143. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +0 -101
  144. package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +0 -82
  145. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +0 -9
  146. package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +0 -124
  147. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +0 -142
  148. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +0 -243
  149. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +0 -65
  150. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +0 -91
  151. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +0 -44
  152. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +0 -38
  153. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +0 -151
  154. package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +0 -248
  155. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +0 -82
  156. package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +0 -76
  157. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +0 -40
  158. package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +0 -43
  159. package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +0 -1
  160. package/src/WebComponent/FeeCalculator/components/index.ts +0 -5
  161. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +0 -39
  162. package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +0 -39
  163. package/src/WebComponent/FeeCalculator/constants.ts +0 -5
  164. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -310
  165. package/src/WebComponent/FeeCalculator/fee-calculator.ts +0 -341
  166. package/src/WebComponent/FeeCalculator/index.ts +0 -4
  167. package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +0 -84
  168. package/src/WebComponent/FeeCalculator/model/building-fee.ts +0 -126
  169. package/src/WebComponent/FeeCalculator/model/desired-addon.ts +0 -6
  170. package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +0 -4
  171. package/src/WebComponent/FeeCalculator/model/index.ts +0 -13
  172. package/src/WebComponent/FeeCalculator/model/item-combination.ts +0 -16
  173. package/src/WebComponent/FeeCalculator/model/item-quantity.ts +0 -4
  174. package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +0 -45
  175. package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +0 -9
  176. package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +0 -1
  177. package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +0 -10
  178. package/src/WebComponent/FeeCalculator/model/rentable-item.ts +0 -10
  179. package/src/WebComponent/FeeCalculator/model/transaction-category.ts +0 -23
  180. package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +0 -54
  181. package/src/WebComponent/LeadSourceClient.ts +0 -332
  182. package/src/WebComponent/MEChat.css +0 -5
  183. package/src/WebComponent/OfficeHours.ts +0 -73
  184. package/src/WebComponent/Scheduler/date-picker.ts +0 -405
  185. package/src/WebComponent/Scheduler/time-picker.ts +0 -190
  186. package/src/WebComponent/Scheduler/tour-scheduler.ts +0 -1416
  187. package/src/WebComponent/Scheduler/tour-type-option.ts +0 -112
  188. package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +0 -418
  189. package/src/WebComponent/actions/InputStyles.ts +0 -57
  190. package/src/WebComponent/actions/action-confirm-button.ts +0 -125
  191. package/src/WebComponent/actions/call-us-window.ts +0 -467
  192. package/src/WebComponent/actions/collapse-expand-button.ts +0 -65
  193. package/src/WebComponent/actions/details-window.ts +0 -150
  194. package/src/WebComponent/actions/email-us-window.ts +0 -556
  195. package/src/WebComponent/actions/formatPhoneNumber.ts +0 -72
  196. package/src/WebComponent/actions/minimize-expand-button.ts +0 -93
  197. package/src/WebComponent/chat-additional-actions.ts +0 -135
  198. package/src/WebComponent/health-chat.ts +0 -270
  199. package/src/WebComponent/healthchat-styles.ts +0 -119
  200. package/src/WebComponent/icons/ApplyOutlineIcon.ts +0 -22
  201. package/src/WebComponent/icons/BookTourOutlineIcon.ts +0 -13
  202. package/src/WebComponent/icons/CalculatorOutlineIcon.ts +0 -22
  203. package/src/WebComponent/icons/ChatOutlineIcon.ts +0 -10
  204. package/src/WebComponent/icons/ChevronLeftIcon.ts +0 -7
  205. package/src/WebComponent/icons/ChevronRightIcon.ts +0 -7
  206. package/src/WebComponent/icons/ContactResidentIcon.ts +0 -9
  207. package/src/WebComponent/icons/DollarOutlineIcon.ts +0 -26
  208. package/src/WebComponent/icons/EmailOutlineIcon.ts +0 -7
  209. package/src/WebComponent/icons/HeyThereEmojiIcon.ts +0 -12
  210. package/src/WebComponent/icons/PhoneOutlineIcon.ts +0 -7
  211. package/src/WebComponent/icons/SendMessageIcon.ts +0 -17
  212. package/src/WebComponent/icons/TourSelfGuidedIcon.ts +0 -17
  213. package/src/WebComponent/icons/TourVirtuallyIcon.ts +0 -17
  214. package/src/WebComponent/icons/TourWithAgentIcon.ts +0 -17
  215. package/src/WebComponent/icons/XOutlineIcon.ts +0 -8
  216. package/src/WebComponent/index.ts +0 -2
  217. package/src/WebComponent/launcher/Launcher.ts +0 -1284
  218. package/src/WebComponent/launcher/launcherStyles.ts +0 -500
  219. package/src/WebComponent/launcher/mobile-launcher.ts +0 -162
  220. package/src/WebComponent/launcher/typeEmojiStyles.ts +0 -161
  221. package/src/WebComponent/launcher/typeMiniStyles.ts +0 -60
  222. package/src/WebComponent/launcher/typeMobileStyles.ts +0 -50
  223. package/src/WebComponent/leasing-chat-styles.ts +0 -114
  224. package/src/WebComponent/loaders/index.ts +0 -7
  225. package/src/WebComponent/loaders/mega-loader.ts +0 -36
  226. package/src/WebComponent/loaders/skeleton-card.ts +0 -31
  227. package/src/WebComponent/loaders/skeleton-loader-styles.ts +0 -112
  228. package/src/WebComponent/loaders/skeleton-loader.ts +0 -34
  229. package/src/WebComponent/me-chat.ts +0 -1261
  230. package/src/WebComponent/me-select.ts +0 -322
  231. package/src/WebComponent/mini-loader.ts +0 -28
  232. package/src/WebComponent/pubnub-chat-styles.ts +0 -204
  233. package/src/WebComponent/pubnub-chat.ts +0 -928
  234. package/src/WebComponent/pubnub-media.ts +0 -208
  235. package/src/WebComponent/pubnub-message-styles.ts +0 -54
  236. package/src/WebComponent/pubnub-message.ts +0 -431
  237. package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +0 -34
  238. package/src/WebComponent/simple-launcher/simple-launcher.ts +0 -100
  239. package/src/WebComponent/utilities-chat.ts +0 -270
  240. package/src/WebComponent/utilities-styles.ts +0 -110
  241. package/src/WebComponent/utils.ts +0 -82
  242. package/src/analytics.ts +0 -217
  243. package/src/assetUrls.ts +0 -6
  244. package/src/disclaimers.ts +0 -86
  245. package/src/fetchBuildingABTestType.ts +0 -21
  246. package/src/fetchBuildingInfo.ts +0 -87
  247. package/src/fetchBuildingWebchatView.ts +0 -176
  248. package/src/fetchFeatureFlag.ts +0 -250
  249. package/src/fetchLeadSources.ts +0 -98
  250. package/src/fetchPhoneNumberFromSource.ts +0 -31
  251. package/src/fetchWebchatPreferences.ts +0 -54
  252. package/src/getAvailabilities.ts +0 -179
  253. package/src/getBuildingPhoneNumber.ts +0 -26
  254. package/src/getShouldAllowScheduling.ts +0 -16
  255. package/src/getShouldShowWebchat.ts +0 -114
  256. package/src/getTimezoneString.ts +0 -39
  257. package/src/globals.ts +0 -3
  258. package/src/gtm.ts +0 -17
  259. package/src/handleChatId.ts +0 -101
  260. package/src/insertDNIIntoWebsite.ts +0 -146
  261. package/src/insertLeadSourceIntoSchedulerLinks.ts +0 -71
  262. package/src/main/MEChat.test.ts +0 -110
  263. package/src/main/MEChat.ts +0 -404
  264. package/src/main/utils.ts +0 -70
  265. package/src/postLeadSources.ts +0 -44
  266. package/src/rentgrata.ts +0 -74
  267. package/src/replaceSelectButtonsWithNewLink.ts +0 -90
  268. package/src/services/fees/calculateQuote.ts +0 -74
  269. package/src/services/fees/fetchBuildingFees.ts +0 -50
  270. package/src/services/fees/fetchBuildingFeesV2.ts +0 -56
  271. package/src/services/fees/fetchBuildingFloorplans.ts +0 -74
  272. package/src/services/fees/fetchBuildingUnits.ts +0 -86
  273. package/src/services/fees/utils.ts +0 -4
  274. package/src/svgIcons.ts +0 -14
  275. package/src/themes.ts +0 -65
  276. package/src/types/incentive-v2.ts +0 -24
  277. package/src/types/rest-sdk.types.ts +0 -13
  278. package/src/types/webchat-no-show-reason.ts +0 -6
  279. package/src/utils/queryParamBuilder.ts +0 -28
  280. package/src/utils.ts +0 -121
@@ -1,35 +0,0 @@
1
- import { css } from "lit";
2
- import commonAddonStyles from "../common-addon-styles";
3
-
4
- export default [
5
- commonAddonStyles,
6
- css`
7
- .quantity-controls-container {
8
- display: flex;
9
- gap: 12px;
10
- }
11
-
12
- .quantity-control {
13
- flex: 1;
14
- display: flex;
15
- align-items: center;
16
- border: 1px solid #dee2e6;
17
- border-radius: 4px;
18
- }
19
-
20
- .quantity-buttons {
21
- display: flex;
22
- align-items: center;
23
- gap: 8px;
24
- width: 100%;
25
- justify-content: space-between;
26
- }
27
-
28
- .quantity-value {
29
- min-width: 80px;
30
- text-align: center;
31
- font-size: 0.875rem;
32
- color: #374151;
33
- }
34
- `,
35
- ];
@@ -1,206 +0,0 @@
1
- import { LitElement, html, TemplateResult } from "lit";
2
- import { customElement, property, state } from "lit/decorators.js";
3
- import { BuildingFeeView, DesiredAddon, PricingRule } from "../../../model";
4
-
5
- import styles from "./addon-item-matrix-qty-selector-styles";
6
-
7
- @customElement("addon-item-matrix-qty-selector")
8
- export class AddonItemMatrixQtySelector extends LitElement {
9
- static styles = styles;
10
-
11
- @property({ type: Object })
12
- set feeItem(value: BuildingFeeView | null) {
13
- const oldValue = this._feeItem;
14
- this._feeItem = value;
15
- // Reset quantities when fee item changes
16
- if (value !== oldValue) {
17
- this.quantities = {};
18
- this._availableTypes = this.getAvailableTypes();
19
- }
20
- this.requestUpdate("feeItem", oldValue);
21
- }
22
- get feeItem(): BuildingFeeView | null {
23
- return this._feeItem;
24
- }
25
- private _feeItem: BuildingFeeView | null = null;
26
-
27
- @property()
28
- onQuantityChange: ((addon: DesiredAddon) => void) | null = null;
29
-
30
- @state()
31
- private quantities: Record<string, number> = {};
32
-
33
- // Cache available types to prevent recalculation on each render
34
- private _availableTypes: string[] = [];
35
-
36
- private get matrixRules(): PricingRule[] {
37
- return this.feeItem?.customMatrixData?.pricingRules ?? [];
38
- }
39
-
40
- private getAvailableTypes(): string[] {
41
- const availableTypes = new Set<string>();
42
- this.matrixRules.forEach((rule) => {
43
- rule.combination.quantities.forEach((q) =>
44
- availableTypes.add(q.itemType)
45
- );
46
- });
47
- // Convert to sorted array for consistent ordering
48
- return Array.from(availableTypes).sort();
49
- }
50
-
51
- private get itemTypes(): string[] {
52
- return this._availableTypes;
53
- }
54
-
55
- private getMaxQuantityForType(itemType: string): number {
56
- let max = 0;
57
- this.matrixRules.forEach((rule) => {
58
- const itemQty = rule.combination.quantities.find(
59
- (q) => q.itemType === itemType
60
- );
61
- if (itemQty) {
62
- max = Math.max(max, itemQty.quantity);
63
- }
64
- });
65
- return max;
66
- }
67
-
68
- private isValidCombination(type: string, newQuantity: number): boolean {
69
- const proposedQuantities = { ...this.quantities, [type]: newQuantity };
70
-
71
- const relevantRules = this.matrixRules.filter((rule) =>
72
- rule.combination.quantities.some((q) => q.itemType === type)
73
- );
74
-
75
- return relevantRules.some((rule) => {
76
- const ruleQuantities = new Map(
77
- rule.combination.quantities.map((q) => [q.itemType, q.quantity])
78
- );
79
-
80
- return Array.from(ruleQuantities.entries()).every(
81
- ([itemType, quantity]) => {
82
- const proposedQty = proposedQuantities[itemType] ?? 0;
83
- return proposedQty === quantity;
84
- }
85
- );
86
- });
87
- }
88
-
89
- private handleIncrement(type: string): void {
90
- const currentQty = this.quantities[type] ?? 0;
91
- const newQty = currentQty + 1;
92
-
93
- if (newQty > this.getMaxQuantityForType(type)) return;
94
- if (!this.isValidCombination(type, newQty)) return;
95
-
96
- const newQuantities = { ...this.quantities };
97
- newQuantities[type] = newQty;
98
- this.quantities = newQuantities;
99
-
100
- this.notifyQuantityChange();
101
- }
102
-
103
- private handleDecrement(type: string): void {
104
- const currentQty = this.quantities[type] ?? 0;
105
- if (currentQty <= 0) return;
106
-
107
- const newQty = currentQty - 1;
108
- if (!this.isValidCombination(type, newQty)) return;
109
-
110
- const newQuantities = { ...this.quantities };
111
- newQuantities[type] = newQty;
112
- this.quantities = newQuantities;
113
-
114
- this.notifyQuantityChange();
115
- }
116
-
117
- private notifyQuantityChange(): void {
118
- if (!this.onQuantityChange || !this.feeItem) return;
119
-
120
- // Include all available types, using 0 as default quantity if not set
121
- // e.g. { "dog": 1, "cat": 2 }
122
- const quantities = this.itemTypes.map((type) => ({
123
- itemType: type,
124
- quantity: this.quantities[type] ?? 0,
125
- }));
126
-
127
- this.onQuantityChange({
128
- id: this.feeItem.id ?? 0,
129
- quantities,
130
- });
131
- }
132
-
133
- private formatItemType(type: string): string {
134
- return type
135
- .split(/[_-]/)
136
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
137
- .join(" ");
138
- }
139
-
140
- private pluralize(type: string, quantity: number): string {
141
- const formattedType = this.formatItemType(type);
142
- return `${quantity} ${formattedType}${quantity !== 1 ? "s" : ""}`;
143
- }
144
-
145
- private renderQuantitySelector(type: string): TemplateResult {
146
- const quantity = this.quantities[type] ?? 0;
147
- const maxQty = this.getMaxQuantityForType(type);
148
- const canIncrement =
149
- this.isValidCombination(type, quantity + 1) && quantity < maxQty;
150
-
151
- return html`
152
- <div class="quantity-control">
153
- <div class="quantity-buttons">
154
- <button
155
- class="quantity-button"
156
- @click=${() => this.handleDecrement(type)}
157
- ?disabled=${quantity <= 0}
158
- aria-label="Decrease ${type} quantity"
159
- >
160
- <span class="operator-sign">&minus;</span>
161
- </button>
162
- <span class="quantity-value">${this.pluralize(type, quantity)}</span>
163
- <button
164
- class="quantity-button"
165
- @click=${() => this.handleIncrement(type)}
166
- ?disabled=${!canIncrement}
167
- aria-label="Increase ${type} quantity"
168
- >
169
- <span class="operator-sign">+</span>
170
- </button>
171
- </div>
172
- </div>
173
- `;
174
- }
175
-
176
- render(): TemplateResult {
177
- if (!this.feeItem || !this.matrixRules.length) return html``;
178
-
179
- const types = this.itemTypes;
180
- if (!types.length) return html``;
181
-
182
- return html`
183
- <div class="addon-container">
184
- <div class="addon-inner-container">
185
- <div class="addon-header">
186
- <div class="addon-header-left">
187
- <p class="addon-title">${this.feeItem.feeName}</p>
188
- </div>
189
- </div>
190
-
191
- <div class="addon-body">
192
- <div class="quantity-controls-container">
193
- ${types.map((type) => this.renderQuantitySelector(type))}
194
- </div>
195
- </div>
196
- </div>
197
- </div>
198
- `;
199
- }
200
- }
201
-
202
- declare global {
203
- interface HTMLElementTagNameMap {
204
- "addon-item-matrix-qty-selector": AddonItemMatrixQtySelector;
205
- }
206
- }
@@ -1,6 +0,0 @@
1
- import { css } from "lit";
2
- import commonAddonStyles from "../common-addon-styles";
3
-
4
- export default css`
5
- ${commonAddonStyles}
6
- `;
@@ -1,101 +0,0 @@
1
- import { LitElement, html, TemplateResult } from "lit";
2
- import { customElement, property, state } from "lit/decorators.js";
3
- import { BuildingFeeView, DesiredAddon } from "../../../model";
4
-
5
- import styles from "./addon-item-qty-selector-styles";
6
-
7
- const DEFAULT_MAX_QUANTITY = 10;
8
-
9
- @customElement("addon-item-qty-selector")
10
- export class AddonItemQtySelector extends LitElement {
11
- static styles = styles;
12
-
13
- @property({ type: Object })
14
- feeItem: BuildingFeeView | null = null;
15
-
16
- @property()
17
- onQuantityChange: ((addon: DesiredAddon) => void) | null = null;
18
-
19
- @state()
20
- private quantity = 0;
21
-
22
- private get maxQuantity(): number {
23
- return this.feeItem?.maxAmount ?? DEFAULT_MAX_QUANTITY;
24
- }
25
-
26
- private handleIncrement(): void {
27
- if (this.quantity >= this.maxQuantity) return;
28
- this.quantity += 1;
29
- this.notifyQuantityChange();
30
- }
31
-
32
- private handleDecrement(): void {
33
- if (this.quantity <= 0) return;
34
- this.quantity = Math.max(0, this.quantity - 1);
35
- this.notifyQuantityChange();
36
- }
37
-
38
- private notifyQuantityChange(): void {
39
- if (!this.onQuantityChange || !this.feeItem) return;
40
-
41
- this.onQuantityChange({
42
- id: this.feeItem.id ?? 0,
43
- quantities: [
44
- {
45
- itemType: this.feeItem.category ?? "",
46
- quantity: this.quantity,
47
- },
48
- ],
49
- });
50
- }
51
-
52
- render(): TemplateResult {
53
- if (!this.feeItem) return html``;
54
-
55
- return html`
56
- <div class="addon-container">
57
- <div class="addon-inner-container">
58
- <div class="addon-header">
59
- <div class="addon-header-left">
60
- <p class="addon-title">${this.feeItem.feeName}</p>
61
- </div>
62
-
63
- ${this.maxQuantity > 0 && this.maxQuantity !== DEFAULT_MAX_QUANTITY
64
- ? html` <div class="addon-header-right">
65
- <p>${this.maxQuantity} Max</p>
66
- </div>`
67
- : ""}
68
- </div>
69
-
70
- <div class="addon-body">
71
- <div class="quantity-control">
72
- <button
73
- class="quantity-button"
74
- @click=${this.handleDecrement}
75
- ?disabled=${this.quantity <= 0}
76
- aria-label="Decrease quantity"
77
- >
78
- <span class="operator-sign">&minus;</span>
79
- </button>
80
- <span class="quantity-value">${this.quantity}</span>
81
- <button
82
- class="quantity-button"
83
- @click=${this.handleIncrement}
84
- ?disabled=${this.quantity >= this.maxQuantity}
85
- aria-label="Increase quantity"
86
- >
87
- <span class="operator-sign">+</span>
88
- </button>
89
- </div>
90
- </div>
91
- </div>
92
- </div>
93
- `;
94
- }
95
- }
96
-
97
- declare global {
98
- interface HTMLElementTagNameMap {
99
- "addon-item-qty-selector": AddonItemQtySelector;
100
- }
101
- }
@@ -1,82 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export default css`
4
- :host {
5
- display: block;
6
- }
7
-
8
- p {
9
- margin: 0;
10
- }
11
-
12
- .addon-container {
13
- border: 1px solid #e5e7eb;
14
- border-radius: 0.375rem;
15
- align-items: center;
16
- }
17
-
18
- .addon-inner-container {
19
- display: flex;
20
- flex-direction: column;
21
- gap: 8px;
22
- margin: 12px;
23
- }
24
-
25
- .addon-header {
26
- display: flex;
27
- justify-content: space-between;
28
- }
29
-
30
- .addon-header-right {
31
- color: #838385;
32
- }
33
-
34
- .addon-title {
35
- font-size: 0.875rem;
36
- color: #374151;
37
- }
38
-
39
- .addon-body {
40
- width: 100%;
41
- }
42
-
43
- .quantity-control {
44
- display: flex;
45
- justify-content: space-between;
46
- align-items: center;
47
- border: 1px solid #dee2e6;
48
- border-radius: 0.2;
49
- }
50
-
51
- .operator-sign {
52
- display: inline-block;
53
- line-height: 1;
54
- position: relative;
55
- transform: translateY(2px);
56
- width: 1rem;
57
- text-align: center;
58
- }
59
-
60
- .quantity-button {
61
- font-size: 1.2rem;
62
- padding: 0.5rem;
63
- background: none;
64
- border: none;
65
- color: #347ff7;
66
- cursor: pointer;
67
- }
68
-
69
- .quantity-button:hover {
70
- background-color: #f3f4f6;
71
- }
72
-
73
- .quantity-button:disabled {
74
- opacity: 0.5;
75
- cursor: not-allowed;
76
- }
77
-
78
- .quantity-value {
79
- padding: 0.25rem;
80
- font-size: 0.875rem;
81
- }
82
- `;
@@ -1,9 +0,0 @@
1
- import { css } from "lit";
2
-
3
- const rentableItemQuantitySelectorStyles = css`
4
- :host {
5
- display: block;
6
- }
7
- `;
8
-
9
- export default rentableItemQuantitySelectorStyles;
@@ -1,124 +0,0 @@
1
- import { html, LitElement, TemplateResult } from "lit";
2
- import { customElement, property, state } from "lit/decorators.js";
3
- import { DesiredRentableItem, RentableItemSummary } from "../../../model";
4
-
5
- import commonAddonStyles from "../common-addon-styles";
6
-
7
- @customElement("rentable-item-qty-selector")
8
- export class RentableItemQtySelector extends LitElement {
9
- static styles = commonAddonStyles;
10
-
11
- @property({ type: Object })
12
- rentableItem: RentableItemSummary | null = null;
13
-
14
- @property({ type: Function })
15
- onSelect: ((rentableItem: DesiredRentableItem) => void) | null = null;
16
-
17
- @state()
18
- private quantity = 0;
19
-
20
- @state()
21
- selectedItemIds: Set<string> = new Set();
22
-
23
- get totalAvailableItems(): number {
24
- return (
25
- this.rentableItem?.allItems?.filter((item) => item.available).length ?? 0
26
- );
27
- }
28
-
29
- get quantityLeft(): number {
30
- return this.totalAvailableItems - this.quantity;
31
- }
32
-
33
- get atMaxUnits(): boolean {
34
- return this.quantity >= this.totalAvailableItems;
35
- }
36
-
37
- get atMinUnits(): boolean {
38
- return this.quantity <= 0;
39
- }
40
-
41
- private handleIncrement(): void {
42
- if (this.atMaxUnits) return;
43
- this.quantity += 1;
44
- this.emitChange();
45
- }
46
-
47
- private handleDecrement(): void {
48
- if (this.atMinUnits) return;
49
- this.quantity = Math.max(0, this.quantity - 1);
50
- this.emitChange();
51
- }
52
-
53
- private emitChange(): void {
54
- if (!this.rentableItem) return;
55
-
56
- // Find first item that is available
57
- const firstAvailableItem = this.rentableItem.allItems.find(
58
- (item) => item.available && !this.selectedItemIds.has(item.id)
59
- );
60
-
61
- if (!firstAvailableItem) return;
62
-
63
- this.selectedItemIds.add(firstAvailableItem.id);
64
-
65
- this.onSelect?.({
66
- id: parseInt(firstAvailableItem.id),
67
- type: this.rentableItem.type,
68
- });
69
- }
70
-
71
- render(): TemplateResult {
72
- if (!this.rentableItem) return html``;
73
-
74
- const hasAvailableItems = this.totalAvailableItems > 0;
75
-
76
- return html`
77
- <div class="addon-container">
78
- <div class="addon-inner-container">
79
- <div class="addon-header">
80
- <div class="addon-header-left">
81
- <p class="addon-title">${this.rentableItem.type}</p>
82
- </div>
83
-
84
- ${this.quantityLeft > 0
85
- ? html`
86
- <div class="addon-header-right">
87
- <p>${this.quantityLeft} Max</p>
88
- </div>
89
- `
90
- : ""}
91
- </div>
92
-
93
- <div class="addon-body">
94
- <div class="quantity-control">
95
- <button
96
- class="quantity-button"
97
- @click=${this.handleDecrement}
98
- ?disabled=${this.quantity <= 0}
99
- aria-label="Decrease quantity"
100
- >
101
- <span class="operator-sign">&minus;</span>
102
- </button>
103
- <span class="quantity-value">${this.quantity}</span>
104
- <button
105
- class="quantity-button"
106
- @click=${this.handleIncrement}
107
- ?disabled=${!hasAvailableItems || this.atMaxUnits}
108
- aria-label="Increase quantity"
109
- >
110
- <span class="operator-sign">+</span>
111
- </button>
112
- </div>
113
- </div>
114
- </div>
115
- </div>
116
- `;
117
- }
118
- }
119
-
120
- declare global {
121
- interface HTMLElementTagNameMap {
122
- "rentable-item-qty-selector": RentableItemQtySelector;
123
- }
124
- }
@@ -1,142 +0,0 @@
1
- import { css } from "lit";
2
-
3
- export default css`
4
- :host {
5
- --transition-timing: 0.2s ease;
6
- }
7
-
8
- .fee-calculator-layout {
9
- display: flex;
10
- margin-top: 20px;
11
- gap: 20px;
12
- transition: margin-top var(--transition-timing),
13
- padding var(--transition-timing), gap var(--transition-timing),
14
- width var(--transition-timing), height var(--transition-timing);
15
- }
16
-
17
- .sidepanel {
18
- flex: 0 0 300px;
19
- display: flex;
20
- margin-left: 20px;
21
- flex-direction: column;
22
- max-width: 50%;
23
- gap: 20px;
24
- transition: width var(--transition-timing),
25
- max-width var(--transition-timing), margin var(--transition-timing);
26
- }
27
-
28
- .sidepanel-section {
29
- padding: 16px;
30
- border-radius: 4px;
31
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
32
- background-color: white;
33
- transition: border-radius var(--transition-timing),
34
- width var(--transition-timing), margin var(--transition-timing);
35
- }
36
-
37
- .sidepanel-section-title {
38
- margin-top: 0;
39
- margin-bottom: 12px;
40
- font-size: 16px;
41
- font-weight: 500;
42
- color: #333;
43
- }
44
-
45
- .sidepanel-addons-container {
46
- display: flex;
47
- flex-direction: column;
48
- gap: 12px;
49
- }
50
-
51
- .fees-container {
52
- flex: 1;
53
- display: flex;
54
- flex-direction: column;
55
- background-color: #f8f9fa;
56
- gap: 16px;
57
- transition: width var(--transition-timing), margin var(--transition-timing),
58
- padding var(--transition-timing);
59
- min-height: 300px;
60
- }
61
-
62
- .sidepanel-loading-container {
63
- display: flex;
64
- justify-content: center;
65
- align-items: center;
66
- width: 100%;
67
- height: 100%;
68
- min-height: 5rem;
69
- }
70
-
71
- .loading-container {
72
- display: flex;
73
- justify-content: flex-start;
74
- align-items: flex-start;
75
- width: 100%;
76
- height: 100%;
77
- min-height: 300px;
78
- flex: 1;
79
- padding-top: 16px;
80
- }
81
-
82
- .empty-state {
83
- display: flex;
84
- justify-content: center;
85
- align-items: center;
86
- font-size: 16px;
87
- height: 100%;
88
- min-height: 300px;
89
- }
90
-
91
- @media (max-width: 768px) {
92
- .fee-calculator-layout {
93
- flex-direction: column;
94
- gap: 10px;
95
- width: 100%;
96
- margin: 0;
97
- padding: 0;
98
- box-sizing: border-box;
99
- }
100
-
101
- .sidepanel {
102
- max-width: 100%;
103
- order: 1;
104
- flex: none;
105
- width: 100%;
106
- margin: 0;
107
- box-sizing: border-box;
108
- }
109
-
110
- .fees-container {
111
- order: 2;
112
- min-height: auto;
113
- width: 100%;
114
- margin: 0;
115
- box-sizing: border-box;
116
- }
117
-
118
- .sidepanel-section {
119
- border-radius: 0;
120
- margin: 0 0 8px 0;
121
- padding: 16px;
122
- width: 100%;
123
- box-sizing: border-box;
124
- }
125
-
126
- .loading-container {
127
- height: auto;
128
- min-height: 100px;
129
- padding-top: 20px;
130
- align-items: flex-start;
131
- width: 100%;
132
- box-sizing: border-box;
133
- }
134
-
135
- .empty-state {
136
- height: auto;
137
- min-height: 100px;
138
- width: 100%;
139
- box-sizing: border-box;
140
- }
141
- }
142
- `;