@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.
- package/package.json +1 -1
- package/public/dist/index.js +1 -1
- package/dist/src/MyPubnub.d.ts +0 -116
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +0 -28
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +0 -18
- package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +0 -22
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +0 -46
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +0 -21
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +0 -13
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +0 -34
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +0 -18
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +0 -8
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +0 -5
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +0 -13
- package/dist/src/WebComponent/FeeCalculator/constants.d.ts +0 -3
- package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +0 -55
- package/dist/src/WebComponent/FeeCalculator/index.d.ts +0 -2
- package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +0 -41
- package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +0 -82
- package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +0 -5
- package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +0 -4
- package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +0 -13
- package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +0 -6
- package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +0 -4
- package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +0 -18
- package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +0 -8
- package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +0 -9
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +0 -9
- package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +0 -23
- package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +0 -31
- package/dist/src/WebComponent/LeadSourceClient.d.ts +0 -46
- package/dist/src/WebComponent/OfficeHours.d.ts +0 -21
- package/dist/src/WebComponent/Scheduler/date-picker.d.ts +0 -28
- package/dist/src/WebComponent/Scheduler/time-picker.d.ts +0 -14
- package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +0 -101
- package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +0 -13
- package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +0 -1
- package/dist/src/WebComponent/actions/InputStyles.d.ts +0 -1
- package/dist/src/WebComponent/actions/action-confirm-button.d.ts +0 -13
- package/dist/src/WebComponent/actions/call-us-window.d.ts +0 -37
- package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +0 -8
- package/dist/src/WebComponent/actions/details-window.d.ts +0 -14
- package/dist/src/WebComponent/actions/email-us-window.d.ts +0 -46
- package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +0 -17
- package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +0 -8
- package/dist/src/WebComponent/chat-additional-actions.d.ts +0 -28
- package/dist/src/WebComponent/health-chat.d.ts +0 -47
- package/dist/src/WebComponent/healthchat-styles.d.ts +0 -1
- package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +0 -7
- package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +0 -3
- package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +0 -2
- package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +0 -2
- package/dist/src/WebComponent/index.d.ts +0 -2
- package/dist/src/WebComponent/launcher/Launcher.d.ts +0 -99
- package/dist/src/WebComponent/launcher/launcherStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +0 -27
- package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +0 -1
- package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +0 -1
- package/dist/src/WebComponent/leasing-chat-styles.d.ts +0 -1
- package/dist/src/WebComponent/loaders/index.d.ts +0 -4
- package/dist/src/WebComponent/loaders/mega-loader.d.ts +0 -7
- package/dist/src/WebComponent/loaders/skeleton-card.d.ts +0 -12
- package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +0 -3
- package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +0 -13
- package/dist/src/WebComponent/me-chat.d.ts +0 -91
- package/dist/src/WebComponent/me-select.d.ts +0 -24
- package/dist/src/WebComponent/mini-loader.d.ts +0 -5
- package/dist/src/WebComponent/pubnub-chat-styles.d.ts +0 -1
- package/dist/src/WebComponent/pubnub-chat.d.ts +0 -49
- package/dist/src/WebComponent/pubnub-media.d.ts +0 -14
- package/dist/src/WebComponent/pubnub-message-styles.d.ts +0 -1
- package/dist/src/WebComponent/pubnub-message.d.ts +0 -39
- package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +0 -1
- package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +0 -12
- package/dist/src/WebComponent/utilities-chat.d.ts +0 -47
- package/dist/src/WebComponent/utilities-styles.d.ts +0 -1
- package/dist/src/WebComponent/utils.d.ts +0 -31
- package/dist/src/analytics.d.ts +0 -64
- package/dist/src/disclaimers.d.ts +0 -9
- package/dist/src/fetchBuildingABTestType.d.ts +0 -8
- package/dist/src/fetchBuildingInfo.d.ts +0 -57
- package/dist/src/fetchBuildingWebchatView.d.ts +0 -124
- package/dist/src/fetchFeatureFlag.d.ts +0 -14
- package/dist/src/fetchLeadSources.d.ts +0 -4
- package/dist/src/fetchPhoneNumberFromSource.d.ts +0 -6
- package/dist/src/getAvailabilities.d.ts +0 -45
- package/dist/src/getBuildingPhoneNumber.d.ts +0 -1
- package/dist/src/getShouldAllowScheduling.d.ts +0 -1
- package/dist/src/getShouldShowWebchat.d.ts +0 -3
- package/dist/src/getTimezoneString.d.ts +0 -1
- package/dist/src/globals.d.ts +0 -2
- package/dist/src/gtm.d.ts +0 -6
- package/dist/src/handleChatId.d.ts +0 -11
- package/dist/src/insertDNIIntoWebsite.d.ts +0 -5
- package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +0 -4
- package/dist/src/main/MEChat.d.ts +0 -74
- package/dist/src/main/utils.d.ts +0 -2
- package/dist/src/postLeadSources.d.ts +0 -3
- package/dist/src/rentgrata.d.ts +0 -4
- package/dist/src/replaceSelectButtonsWithNewLink.d.ts +0 -5
- package/dist/src/services/fees/calculateQuote.d.ts +0 -14
- package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +0 -10
- package/dist/src/services/fees/fetchBuildingUnits.d.ts +0 -29
- package/dist/src/services/fees/utils.d.ts +0 -1
- package/dist/src/svgIcons.d.ts +0 -5
- package/dist/src/themes.d.ts +0 -5
- package/dist/src/types/incentive-v2.d.ts +0 -23
- package/dist/src/types/rest-sdk.types.d.ts +0 -11
- package/dist/src/types/webchat-no-show-reason.d.ts +0 -1
- package/dist/src/utils/queryParamBuilder.d.ts +0 -8
- package/dist/src/utils.d.ts +0 -13
- package/src/MyPubnub.ts +0 -792
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +0 -35
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +0 -206
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +0 -6
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +0 -101
- package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +0 -82
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +0 -9
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +0 -124
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +0 -142
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +0 -243
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +0 -65
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +0 -91
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +0 -44
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +0 -38
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +0 -151
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +0 -248
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +0 -82
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +0 -76
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +0 -40
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +0 -43
- package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +0 -1
- package/src/WebComponent/FeeCalculator/components/index.ts +0 -5
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +0 -39
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +0 -39
- package/src/WebComponent/FeeCalculator/constants.ts +0 -5
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +0 -310
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +0 -341
- package/src/WebComponent/FeeCalculator/index.ts +0 -4
- package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +0 -84
- package/src/WebComponent/FeeCalculator/model/building-fee.ts +0 -126
- package/src/WebComponent/FeeCalculator/model/desired-addon.ts +0 -6
- package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +0 -4
- package/src/WebComponent/FeeCalculator/model/index.ts +0 -13
- package/src/WebComponent/FeeCalculator/model/item-combination.ts +0 -16
- package/src/WebComponent/FeeCalculator/model/item-quantity.ts +0 -4
- package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +0 -45
- package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +0 -9
- package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +0 -1
- package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +0 -10
- package/src/WebComponent/FeeCalculator/model/rentable-item.ts +0 -10
- package/src/WebComponent/FeeCalculator/model/transaction-category.ts +0 -23
- package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +0 -54
- package/src/WebComponent/LeadSourceClient.ts +0 -332
- package/src/WebComponent/MEChat.css +0 -5
- package/src/WebComponent/OfficeHours.ts +0 -73
- package/src/WebComponent/Scheduler/date-picker.ts +0 -405
- package/src/WebComponent/Scheduler/time-picker.ts +0 -190
- package/src/WebComponent/Scheduler/tour-scheduler.ts +0 -1416
- package/src/WebComponent/Scheduler/tour-type-option.ts +0 -112
- package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +0 -418
- package/src/WebComponent/actions/InputStyles.ts +0 -57
- package/src/WebComponent/actions/action-confirm-button.ts +0 -125
- package/src/WebComponent/actions/call-us-window.ts +0 -467
- package/src/WebComponent/actions/collapse-expand-button.ts +0 -65
- package/src/WebComponent/actions/details-window.ts +0 -150
- package/src/WebComponent/actions/email-us-window.ts +0 -556
- package/src/WebComponent/actions/formatPhoneNumber.ts +0 -72
- package/src/WebComponent/actions/minimize-expand-button.ts +0 -93
- package/src/WebComponent/chat-additional-actions.ts +0 -135
- package/src/WebComponent/health-chat.ts +0 -270
- package/src/WebComponent/healthchat-styles.ts +0 -119
- package/src/WebComponent/icons/ApplyOutlineIcon.ts +0 -22
- package/src/WebComponent/icons/BookTourOutlineIcon.ts +0 -13
- package/src/WebComponent/icons/CalculatorOutlineIcon.ts +0 -22
- package/src/WebComponent/icons/ChatOutlineIcon.ts +0 -10
- package/src/WebComponent/icons/ChevronLeftIcon.ts +0 -7
- package/src/WebComponent/icons/ChevronRightIcon.ts +0 -7
- package/src/WebComponent/icons/ContactResidentIcon.ts +0 -9
- package/src/WebComponent/icons/DollarOutlineIcon.ts +0 -26
- package/src/WebComponent/icons/EmailOutlineIcon.ts +0 -7
- package/src/WebComponent/icons/HeyThereEmojiIcon.ts +0 -12
- package/src/WebComponent/icons/PhoneOutlineIcon.ts +0 -7
- package/src/WebComponent/icons/SendMessageIcon.ts +0 -17
- package/src/WebComponent/icons/TourSelfGuidedIcon.ts +0 -17
- package/src/WebComponent/icons/TourVirtuallyIcon.ts +0 -17
- package/src/WebComponent/icons/TourWithAgentIcon.ts +0 -17
- package/src/WebComponent/icons/XOutlineIcon.ts +0 -8
- package/src/WebComponent/index.ts +0 -2
- package/src/WebComponent/launcher/Launcher.ts +0 -1284
- package/src/WebComponent/launcher/launcherStyles.ts +0 -500
- package/src/WebComponent/launcher/mobile-launcher.ts +0 -162
- package/src/WebComponent/launcher/typeEmojiStyles.ts +0 -161
- package/src/WebComponent/launcher/typeMiniStyles.ts +0 -60
- package/src/WebComponent/launcher/typeMobileStyles.ts +0 -50
- package/src/WebComponent/leasing-chat-styles.ts +0 -114
- package/src/WebComponent/loaders/index.ts +0 -7
- package/src/WebComponent/loaders/mega-loader.ts +0 -36
- package/src/WebComponent/loaders/skeleton-card.ts +0 -31
- package/src/WebComponent/loaders/skeleton-loader-styles.ts +0 -112
- package/src/WebComponent/loaders/skeleton-loader.ts +0 -34
- package/src/WebComponent/me-chat.ts +0 -1261
- package/src/WebComponent/me-select.ts +0 -322
- package/src/WebComponent/mini-loader.ts +0 -28
- package/src/WebComponent/pubnub-chat-styles.ts +0 -204
- package/src/WebComponent/pubnub-chat.ts +0 -928
- package/src/WebComponent/pubnub-media.ts +0 -208
- package/src/WebComponent/pubnub-message-styles.ts +0 -54
- package/src/WebComponent/pubnub-message.ts +0 -431
- package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +0 -34
- package/src/WebComponent/simple-launcher/simple-launcher.ts +0 -100
- package/src/WebComponent/utilities-chat.ts +0 -270
- package/src/WebComponent/utilities-styles.ts +0 -110
- package/src/WebComponent/utils.ts +0 -82
- package/src/analytics.ts +0 -217
- package/src/assetUrls.ts +0 -6
- package/src/disclaimers.ts +0 -86
- package/src/fetchBuildingABTestType.ts +0 -21
- package/src/fetchBuildingInfo.ts +0 -87
- package/src/fetchBuildingWebchatView.ts +0 -176
- package/src/fetchFeatureFlag.ts +0 -250
- package/src/fetchLeadSources.ts +0 -98
- package/src/fetchPhoneNumberFromSource.ts +0 -31
- package/src/fetchWebchatPreferences.ts +0 -54
- package/src/getAvailabilities.ts +0 -179
- package/src/getBuildingPhoneNumber.ts +0 -26
- package/src/getShouldAllowScheduling.ts +0 -16
- package/src/getShouldShowWebchat.ts +0 -114
- package/src/getTimezoneString.ts +0 -39
- package/src/globals.ts +0 -3
- package/src/gtm.ts +0 -17
- package/src/handleChatId.ts +0 -101
- package/src/insertDNIIntoWebsite.ts +0 -146
- package/src/insertLeadSourceIntoSchedulerLinks.ts +0 -71
- package/src/main/MEChat.test.ts +0 -110
- package/src/main/MEChat.ts +0 -404
- package/src/main/utils.ts +0 -70
- package/src/postLeadSources.ts +0 -44
- package/src/rentgrata.ts +0 -74
- package/src/replaceSelectButtonsWithNewLink.ts +0 -90
- package/src/services/fees/calculateQuote.ts +0 -74
- package/src/services/fees/fetchBuildingFees.ts +0 -50
- package/src/services/fees/fetchBuildingFeesV2.ts +0 -56
- package/src/services/fees/fetchBuildingFloorplans.ts +0 -74
- package/src/services/fees/fetchBuildingUnits.ts +0 -86
- package/src/services/fees/utils.ts +0 -4
- package/src/svgIcons.ts +0 -14
- package/src/themes.ts +0 -65
- package/src/types/incentive-v2.ts +0 -24
- package/src/types/rest-sdk.types.ts +0 -13
- package/src/types/webchat-no-show-reason.ts +0 -6
- package/src/utils/queryParamBuilder.ts +0 -28
- package/src/utils.ts +0 -121
|
@@ -1,310 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
|
|
3
|
-
export const feeCalculatorStyles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: block;
|
|
6
|
-
position: relative;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.fee-calculator-container {
|
|
10
|
-
background-color: white;
|
|
11
|
-
border-radius: 8px;
|
|
12
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
13
|
-
padding: 20px;
|
|
14
|
-
height: 80vh;
|
|
15
|
-
width: 80vw;
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
transition: width 0.15s ease, height 0.15s ease, padding 0.15s ease,
|
|
20
|
-
margin 0.15s ease;
|
|
21
|
-
position: fixed;
|
|
22
|
-
top: 50%;
|
|
23
|
-
left: 50%;
|
|
24
|
-
transform: translate(-50%, -50%);
|
|
25
|
-
z-index: 1000;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.fee-calculator-container.compact {
|
|
29
|
-
padding: 12px;
|
|
30
|
-
max-width: 800px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.calculator-header {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
align-items: center;
|
|
37
|
-
margin-bottom: 12px;
|
|
38
|
-
transition: margin-bottom 0.15s ease, padding-top 0.15s ease;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.calculator-header h1 {
|
|
42
|
-
font-size: 1.2rem;
|
|
43
|
-
color: #333;
|
|
44
|
-
transition: font-size 0.15s ease;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.calculator-header-right {
|
|
48
|
-
display: flex;
|
|
49
|
-
gap: 10px;
|
|
50
|
-
align-items: center;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.calculator-header-divider {
|
|
54
|
-
height: 1px;
|
|
55
|
-
background-color: #e0e0e0;
|
|
56
|
-
transition: margin 0.15s ease;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.calculator-content {
|
|
60
|
-
flex: 1;
|
|
61
|
-
overflow-y: auto;
|
|
62
|
-
background-color: #f8f9fa;
|
|
63
|
-
min-height: 0;
|
|
64
|
-
transition: padding-top 0.15s ease, width 0.15s ease;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.incentives-container {
|
|
68
|
-
width: 100%;
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
gap: 1px;
|
|
72
|
-
margin-bottom: 12px;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.incentive-banner {
|
|
76
|
-
width: 100%;
|
|
77
|
-
background-color: #e8f2ff;
|
|
78
|
-
padding: 12px 16px;
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
gap: 12px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.incentive-icon {
|
|
85
|
-
display: flex;
|
|
86
|
-
align-items: center;
|
|
87
|
-
justify-content: center;
|
|
88
|
-
height: 3rem;
|
|
89
|
-
width: 3rem;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.incentive-content {
|
|
93
|
-
flex: 1;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.incentive-title {
|
|
97
|
-
margin: 0;
|
|
98
|
-
font-size: 1.1rem;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.incentive-subtitle {
|
|
102
|
-
margin: 4px 0 0 0;
|
|
103
|
-
color: #868e96;
|
|
104
|
-
font-size: 0.9rem;
|
|
105
|
-
opacity: 0.9;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.close-button {
|
|
109
|
-
background: none;
|
|
110
|
-
border: none;
|
|
111
|
-
font-size: 24px;
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
padding: 0;
|
|
114
|
-
margin: 0;
|
|
115
|
-
line-height: 1;
|
|
116
|
-
width: 30px;
|
|
117
|
-
height: 30px;
|
|
118
|
-
border-radius: 50%;
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
justify-content: center;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.close-button:hover {
|
|
125
|
-
background-color: #f0f0f0;
|
|
126
|
-
color: #000;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
h1,
|
|
130
|
-
h2 {
|
|
131
|
-
margin-top: 0;
|
|
132
|
-
color: #333;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
h1 {
|
|
136
|
-
font-size: 1.5rem;
|
|
137
|
-
margin: 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
h2 {
|
|
141
|
-
font-size: 1.2rem;
|
|
142
|
-
margin-bottom: 8px;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.input-group {
|
|
146
|
-
margin-bottom: 16px;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
label {
|
|
150
|
-
display: block;
|
|
151
|
-
margin-bottom: 6px;
|
|
152
|
-
font-weight: 500;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
input {
|
|
156
|
-
width: 100%;
|
|
157
|
-
padding: 10px;
|
|
158
|
-
border: 1px solid #ddd;
|
|
159
|
-
border-radius: 4px;
|
|
160
|
-
font-size: 16px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
button {
|
|
164
|
-
background-color: #007bff;
|
|
165
|
-
color: white;
|
|
166
|
-
border: none;
|
|
167
|
-
border-radius: 4px;
|
|
168
|
-
padding: 10px 16px;
|
|
169
|
-
font-size: 16px;
|
|
170
|
-
cursor: pointer;
|
|
171
|
-
display: flex;
|
|
172
|
-
align-items: center;
|
|
173
|
-
justify-content: center;
|
|
174
|
-
gap: 8px;
|
|
175
|
-
transition: background-color 0.15s;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
button:hover {
|
|
179
|
-
background-color: #0069d9;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
button:disabled {
|
|
183
|
-
opacity: 0.7;
|
|
184
|
-
cursor: not-allowed;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.calculation-results {
|
|
188
|
-
margin-top: 24px;
|
|
189
|
-
padding-top: 16px;
|
|
190
|
-
border-top: 1px solid #eee;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.result-item {
|
|
194
|
-
display: flex;
|
|
195
|
-
justify-content: space-between;
|
|
196
|
-
margin-bottom: 8px;
|
|
197
|
-
padding-bottom: 8px;
|
|
198
|
-
border-bottom: 1px solid #eee;
|
|
199
|
-
color: #333;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.result-item:last-child {
|
|
203
|
-
border-bottom: none;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.result-item.total {
|
|
207
|
-
font-weight: bold;
|
|
208
|
-
font-size: 1.1em;
|
|
209
|
-
margin-top: 8px;
|
|
210
|
-
padding-top: 8px;
|
|
211
|
-
border-top: 1px solid #eee;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.error-message {
|
|
215
|
-
color: #dc3545;
|
|
216
|
-
text-align: center;
|
|
217
|
-
padding: 16px;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.calculator-promos {
|
|
221
|
-
margin-bottom: 20px;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.calculator-charges {
|
|
225
|
-
margin-bottom: 20px;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.fee-disclaimer {
|
|
229
|
-
color: #666;
|
|
230
|
-
font-size: 0.8rem;
|
|
231
|
-
text-align: center;
|
|
232
|
-
margin-top: 1rem;
|
|
233
|
-
border-top: 1px solid #e0e0e0;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.action-button {
|
|
237
|
-
flex: 1;
|
|
238
|
-
background-color: #f8f9fa;
|
|
239
|
-
color: #333;
|
|
240
|
-
border: 1px solid #ddd;
|
|
241
|
-
border-radius: 4px;
|
|
242
|
-
padding: 12px;
|
|
243
|
-
font-size: 14px;
|
|
244
|
-
cursor: pointer;
|
|
245
|
-
transition: all 0.15s;
|
|
246
|
-
display: flex;
|
|
247
|
-
flex-direction: column;
|
|
248
|
-
align-items: center;
|
|
249
|
-
justify-content: center;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.action-button:hover {
|
|
253
|
-
background-color: #e9ecef;
|
|
254
|
-
border-color: #ced4da;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
.share-button {
|
|
258
|
-
color: var(--primary-color, #646987);
|
|
259
|
-
background-color: var(--background-color, #ffffff);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.share-button:hover {
|
|
263
|
-
background-color: var(--background-color, #ffffff);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.apply-button {
|
|
267
|
-
color: var(--background-color, #646987);
|
|
268
|
-
background-color: var(--primary-color, #ffffff);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
@media (max-width: 768px) {
|
|
272
|
-
.fee-calculator-container {
|
|
273
|
-
width: 100vw;
|
|
274
|
-
height: 100vh;
|
|
275
|
-
padding: 8px;
|
|
276
|
-
padding-top: 2px;
|
|
277
|
-
border-radius: 0;
|
|
278
|
-
margin: 0;
|
|
279
|
-
max-width: none;
|
|
280
|
-
box-shadow: none;
|
|
281
|
-
box-sizing: border-box;
|
|
282
|
-
position: fixed;
|
|
283
|
-
top: 0;
|
|
284
|
-
left: 0;
|
|
285
|
-
right: 0;
|
|
286
|
-
bottom: 0;
|
|
287
|
-
transform: none;
|
|
288
|
-
z-index: 9999;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.calculator-header {
|
|
292
|
-
margin-bottom: 4px;
|
|
293
|
-
padding-top: 2px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.calculator-header h1 {
|
|
297
|
-
font-size: 1.1rem;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.calculator-content {
|
|
301
|
-
padding-top: 2px;
|
|
302
|
-
width: 100%;
|
|
303
|
-
box-sizing: border-box;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.calculator-header-divider {
|
|
307
|
-
margin: 2px 0;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
`;
|
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, TemplateResult } from "lit";
|
|
2
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
3
|
-
import { feeCalculatorStyles } from "./fee-calculator-styles";
|
|
4
|
-
import fetchBuildingWebchatView, {
|
|
5
|
-
BuildingWebchatView,
|
|
6
|
-
LayoutOption,
|
|
7
|
-
} from "../../fetchBuildingWebchatView";
|
|
8
|
-
import fetchBuildingFeesV2 from "../../services/fees/fetchBuildingFeesV2";
|
|
9
|
-
import {
|
|
10
|
-
ALL_LAYOUTS_OPTION,
|
|
11
|
-
CALCULATE_DEBOUNCE_MS,
|
|
12
|
-
DEFAULT_LEASE_TERM,
|
|
13
|
-
} from "./constants";
|
|
14
|
-
import {
|
|
15
|
-
calculateQuote,
|
|
16
|
-
CalculateQuoteResponse,
|
|
17
|
-
} from "../../services/fees/calculateQuote";
|
|
18
|
-
import { defaultBackgroundColor, defaultPrimaryColor } from "../../themes";
|
|
19
|
-
import debounce from "lodash/debounce";
|
|
20
|
-
import { XOutlineIcon } from "../icons/XOutlineIcon";
|
|
21
|
-
import { IncentiveV2 } from "../../types/incentive-v2";
|
|
22
|
-
import { Unit } from "../../services/fees/fetchBuildingUnits";
|
|
23
|
-
import { RentableItemSummary } from "./model/rentable-item-summary";
|
|
24
|
-
import { TODAY } from "../../globals";
|
|
25
|
-
import {
|
|
26
|
-
BuildingFeeFrequency,
|
|
27
|
-
BuildingFeeView,
|
|
28
|
-
} from "./model/building-fee-view";
|
|
29
|
-
import { DesiredAddon } from "./model/desired-addon";
|
|
30
|
-
import { DesiredRentableItem } from "./model/desired-rentable-item";
|
|
31
|
-
import { ItemQuantity } from "./model/item-quantity";
|
|
32
|
-
|
|
33
|
-
import "./components";
|
|
34
|
-
import "./components/fee-calculator-layout/fee-calculator-layout";
|
|
35
|
-
import "../chat-additional-actions";
|
|
36
|
-
import "./components/incentive-banner";
|
|
37
|
-
|
|
38
|
-
@customElement("fee-calculator")
|
|
39
|
-
export class FeeCalculator extends LitElement {
|
|
40
|
-
static styles = feeCalculatorStyles;
|
|
41
|
-
|
|
42
|
-
@property({ attribute: true })
|
|
43
|
-
buildingSlug = "";
|
|
44
|
-
|
|
45
|
-
@property({ attribute: true })
|
|
46
|
-
orgSlug = "";
|
|
47
|
-
|
|
48
|
-
@property({ type: String })
|
|
49
|
-
private primaryColor = defaultPrimaryColor;
|
|
50
|
-
|
|
51
|
-
@property({ type: String })
|
|
52
|
-
private backgroundColor: string = defaultBackgroundColor;
|
|
53
|
-
|
|
54
|
-
@property()
|
|
55
|
-
onCloseClicked: (() => void) | null = null;
|
|
56
|
-
|
|
57
|
-
@property()
|
|
58
|
-
onClickEmailOption: ((e: MouseEvent) => void) | null = null;
|
|
59
|
-
|
|
60
|
-
@property()
|
|
61
|
-
onClickPhoneOption: ((e: MouseEvent) => void) | null = null;
|
|
62
|
-
|
|
63
|
-
@property()
|
|
64
|
-
onClickSSTOption: ((e: MouseEvent) => void) | null = null;
|
|
65
|
-
|
|
66
|
-
@property()
|
|
67
|
-
onClickTextUsOption: ((e: MouseEvent) => void) | null = null;
|
|
68
|
-
|
|
69
|
-
@state()
|
|
70
|
-
private isLoading = false;
|
|
71
|
-
|
|
72
|
-
@state()
|
|
73
|
-
private selectedLayoutIds: number[] = [ALL_LAYOUTS_OPTION];
|
|
74
|
-
|
|
75
|
-
@state()
|
|
76
|
-
private selectedUnit: Unit | null = null;
|
|
77
|
-
|
|
78
|
-
@state()
|
|
79
|
-
private desiredAddons: DesiredAddon[] = [];
|
|
80
|
-
|
|
81
|
-
@state()
|
|
82
|
-
private desiredRentableItems: DesiredRentableItem[] = [];
|
|
83
|
-
|
|
84
|
-
@state()
|
|
85
|
-
private leaseTerm = DEFAULT_LEASE_TERM;
|
|
86
|
-
|
|
87
|
-
@state()
|
|
88
|
-
private moveInDate: Date | null = TODAY;
|
|
89
|
-
|
|
90
|
-
@state()
|
|
91
|
-
private buildingWebchatView: BuildingWebchatView | null = null;
|
|
92
|
-
|
|
93
|
-
@state()
|
|
94
|
-
private incentives: IncentiveV2[] = [];
|
|
95
|
-
|
|
96
|
-
@state()
|
|
97
|
-
quote: CalculateQuoteResponse | null = null;
|
|
98
|
-
|
|
99
|
-
@state()
|
|
100
|
-
private groupedFees: Record<BuildingFeeFrequency, BuildingFeeView[]> = {
|
|
101
|
-
[BuildingFeeFrequency.OneTime]: [],
|
|
102
|
-
[BuildingFeeFrequency.Monthly]: [],
|
|
103
|
-
[BuildingFeeFrequency.Quarterly]: [],
|
|
104
|
-
[BuildingFeeFrequency.Annually]: [],
|
|
105
|
-
[BuildingFeeFrequency.PerOccurrence]: [],
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
@state()
|
|
109
|
-
private rentableItems: RentableItemSummary[] = [];
|
|
110
|
-
|
|
111
|
-
private debouncedCalculateQuote = debounce(async (): Promise<void> => {
|
|
112
|
-
if (!this.selectedUnit || !this.moveInDate) return;
|
|
113
|
-
|
|
114
|
-
// If lead's desired move in date is before the their selected unit's earliest available date
|
|
115
|
-
// use the unit's earliest available date (otherwise pricing will be incorrect)
|
|
116
|
-
const moveInDate =
|
|
117
|
-
this.moveInDate < new Date(this.selectedUnit.earliestAvailable)
|
|
118
|
-
? this.selectedUnit.earliestAvailable
|
|
119
|
-
: this.moveInDate?.toISOString().split("T")[0];
|
|
120
|
-
|
|
121
|
-
try {
|
|
122
|
-
this.quote = await calculateQuote({
|
|
123
|
-
buildingSlug: this.buildingSlug,
|
|
124
|
-
unitId: this.selectedUnit.id,
|
|
125
|
-
addons: this.desiredAddons,
|
|
126
|
-
rentableItems: this.desiredRentableItems,
|
|
127
|
-
leaseTerm: this.leaseTerm,
|
|
128
|
-
moveInDate,
|
|
129
|
-
});
|
|
130
|
-
} finally {
|
|
131
|
-
this.isLoading = false;
|
|
132
|
-
}
|
|
133
|
-
}, CALCULATE_DEBOUNCE_MS);
|
|
134
|
-
|
|
135
|
-
// TODO(Leo): use layouts from units response instead?
|
|
136
|
-
get layouts(): LayoutOption[] {
|
|
137
|
-
return this.buildingWebchatView?.layoutOptions ?? [];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
firstUpdated = async (): Promise<void> => {
|
|
141
|
-
this.style.setProperty("--primary-color", this.primaryColor);
|
|
142
|
-
this.style.setProperty("--background-color", this.backgroundColor);
|
|
143
|
-
|
|
144
|
-
await this.setupCalculator();
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
setupCalculator = async (): Promise<void> => {
|
|
148
|
-
if (!this.buildingSlug || !this.orgSlug) return;
|
|
149
|
-
|
|
150
|
-
this.isLoading = true;
|
|
151
|
-
const [buildingWebchatView, buildingFeeResponse] = await Promise.all([
|
|
152
|
-
fetchBuildingWebchatView(this.orgSlug, this.buildingSlug),
|
|
153
|
-
fetchBuildingFeesV2(this.buildingSlug),
|
|
154
|
-
]);
|
|
155
|
-
|
|
156
|
-
if (!buildingWebchatView || !buildingFeeResponse) return;
|
|
157
|
-
|
|
158
|
-
this.buildingWebchatView = buildingWebchatView;
|
|
159
|
-
this.groupedFees = this.groupFees(buildingFeeResponse.fees);
|
|
160
|
-
this.rentableItems = buildingFeeResponse.rentableItems;
|
|
161
|
-
// TODO(Leo): Re-enable
|
|
162
|
-
// this.incentives = buildingFeeResponse.buildingIncentives;
|
|
163
|
-
this.isLoading = false;
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
updated(changedProperties: Map<string, unknown>): void {
|
|
167
|
-
if (
|
|
168
|
-
changedProperties.has("primaryColor") ||
|
|
169
|
-
changedProperties.has("backgroundColor")
|
|
170
|
-
) {
|
|
171
|
-
this.style.setProperty("--primary-color", this.primaryColor);
|
|
172
|
-
this.style.setProperty("--background-color", this.backgroundColor);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
disconnectedCallback(): void {
|
|
177
|
-
super.disconnectedCallback();
|
|
178
|
-
this.debouncedCalculateQuote.cancel();
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
calculateQuote = async (): Promise<void> => {
|
|
182
|
-
if (!this.selectedUnit || !this.moveInDate) return;
|
|
183
|
-
|
|
184
|
-
this.isLoading = true;
|
|
185
|
-
this.debouncedCalculateQuote();
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
handleUnitSelect = (unit: Unit): void => {
|
|
189
|
-
this.selectedUnit = unit;
|
|
190
|
-
this.calculateQuote();
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
handleMoveInDateChange = (date: Date): void => {
|
|
194
|
-
this.moveInDate = date;
|
|
195
|
-
this.calculateQuote();
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
handleLeaseTermChange = (leaseTerm: number): void => {
|
|
199
|
-
this.leaseTerm = leaseTerm;
|
|
200
|
-
this.calculateQuote();
|
|
201
|
-
};
|
|
202
|
-
|
|
203
|
-
handleAddonSelect = (addon: DesiredAddon): void => {
|
|
204
|
-
const isExistingAddon = this.desiredAddons.some((a) => a.id === addon.id);
|
|
205
|
-
const isRemoving =
|
|
206
|
-
isExistingAddon &&
|
|
207
|
-
addon.quantities.every((q: ItemQuantity) => q.quantity === 0);
|
|
208
|
-
|
|
209
|
-
if (isRemoving) {
|
|
210
|
-
this.desiredAddons = this.desiredAddons.filter((a) => a.id !== addon.id);
|
|
211
|
-
} else if (isExistingAddon) {
|
|
212
|
-
this.desiredAddons = this.desiredAddons.map((a) =>
|
|
213
|
-
a.id === addon.id ? { ...a, quantities: addon.quantities } : a
|
|
214
|
-
);
|
|
215
|
-
} else {
|
|
216
|
-
this.desiredAddons.push(addon);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
this.calculateQuote();
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
handleRentableItemSelect = (rentableItem: DesiredRentableItem): void => {
|
|
223
|
-
const isExistingRentableItem = this.desiredRentableItems.some(
|
|
224
|
-
(item) => item.id === rentableItem.id
|
|
225
|
-
);
|
|
226
|
-
|
|
227
|
-
if (isExistingRentableItem) {
|
|
228
|
-
this.desiredRentableItems = this.desiredRentableItems.filter(
|
|
229
|
-
(item) => item.id !== rentableItem.id
|
|
230
|
-
);
|
|
231
|
-
} else {
|
|
232
|
-
this.desiredRentableItems.push(rentableItem);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
this.calculateQuote();
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
groupFees = (
|
|
239
|
-
fees: BuildingFeeView[]
|
|
240
|
-
): Record<BuildingFeeFrequency, BuildingFeeView[]> => {
|
|
241
|
-
return fees.reduce((acc, fee) => {
|
|
242
|
-
const frequency = fee.frequency || BuildingFeeFrequency.OneTime;
|
|
243
|
-
acc[frequency] = [...(acc[frequency] || []), fee];
|
|
244
|
-
return acc;
|
|
245
|
-
}, {} as Record<BuildingFeeFrequency, BuildingFeeView[]>);
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
handleClickEmailOption = (e: MouseEvent): void => {
|
|
249
|
-
this.handleClose();
|
|
250
|
-
if (this.onClickEmailOption) this.onClickEmailOption(e);
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
handleClickPhoneOption = (e: MouseEvent): void => {
|
|
254
|
-
this.handleClose();
|
|
255
|
-
if (this.onClickPhoneOption) this.onClickPhoneOption(e);
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
handleClickSSTOption = (e: MouseEvent): void => {
|
|
259
|
-
this.handleClose();
|
|
260
|
-
if (this.onClickSSTOption) this.onClickSSTOption(e);
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
handleClickTextUsOption = (e: MouseEvent): void => {
|
|
264
|
-
this.handleClose();
|
|
265
|
-
if (this.onClickTextUsOption) this.onClickTextUsOption(e);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
handleClose = (): void => {
|
|
269
|
-
this.onCloseClicked?.();
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
handleSelectLayout = (layoutIds: number[]): void => {
|
|
273
|
-
this.selectedLayoutIds = layoutIds;
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
render(): TemplateResult {
|
|
277
|
-
return html`
|
|
278
|
-
<div
|
|
279
|
-
class="fee-calculator-container"
|
|
280
|
-
@keydown=${(e: KeyboardEvent) => e.stopPropagation()}
|
|
281
|
-
@keyup=${(e: KeyboardEvent) => e.stopPropagation()}
|
|
282
|
-
>
|
|
283
|
-
<div class="calculator-header">
|
|
284
|
-
<h1>Estimated Cost Calculator</h1>
|
|
285
|
-
|
|
286
|
-
<div class="calculator-header-right">
|
|
287
|
-
<!-- TODO(Leo): Return once reqs are clear; also need apps link -->
|
|
288
|
-
<!-- <button class="share-button">Share</button> -->
|
|
289
|
-
<!-- <button class="apply-button">Apply</button> -->
|
|
290
|
-
<button
|
|
291
|
-
aria-label="Close fee calculator"
|
|
292
|
-
class="close-button"
|
|
293
|
-
@click=${this.handleClose}
|
|
294
|
-
>
|
|
295
|
-
${XOutlineIcon("gray")}
|
|
296
|
-
</button>
|
|
297
|
-
</div>
|
|
298
|
-
</div>
|
|
299
|
-
|
|
300
|
-
<div class="calculator-header-divider"></div>
|
|
301
|
-
|
|
302
|
-
<div class="calculator-content">
|
|
303
|
-
${this.incentives.length
|
|
304
|
-
? html`
|
|
305
|
-
<div class="incentives-container">
|
|
306
|
-
${this.incentives.map(
|
|
307
|
-
(incentive) => html`
|
|
308
|
-
<incentive-banner
|
|
309
|
-
.incentive=${incentive}
|
|
310
|
-
></incentive-banner>
|
|
311
|
-
`
|
|
312
|
-
)}
|
|
313
|
-
</div>
|
|
314
|
-
`
|
|
315
|
-
: ""}
|
|
316
|
-
|
|
317
|
-
<fee-calculator-layout
|
|
318
|
-
.buildingSlug=${this.buildingSlug}
|
|
319
|
-
.isLoading=${this.isLoading}
|
|
320
|
-
.selectedUnit=${this.selectedUnit}
|
|
321
|
-
.groupedFees=${this.groupedFees}
|
|
322
|
-
.rentableItems=${this.rentableItems}
|
|
323
|
-
.quote=${this.quote}
|
|
324
|
-
.layoutOptions=${this.layouts}
|
|
325
|
-
.selectedLayoutIds=${this.selectedLayoutIds}
|
|
326
|
-
.onSelectLayout=${this.handleSelectLayout}
|
|
327
|
-
.onUnitSelect=${this.handleUnitSelect}
|
|
328
|
-
.onMoveInDateChange=${this.handleMoveInDateChange}
|
|
329
|
-
.onLeaseTermChange=${this.handleLeaseTermChange}
|
|
330
|
-
.onAddonSelect=${this.handleAddonSelect}
|
|
331
|
-
.onRentableItemSelect=${this.handleRentableItemSelect}
|
|
332
|
-
></fee-calculator-layout>
|
|
333
|
-
</div>
|
|
334
|
-
|
|
335
|
-
<div class="fee-disclaimer">
|
|
336
|
-
<p>Prices subject to change. Additional fees may apply.</p>
|
|
337
|
-
</div>
|
|
338
|
-
</div>
|
|
339
|
-
`;
|
|
340
|
-
}
|
|
341
|
-
}
|