@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.
- package/dist/src/MyPubnub.d.ts +116 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +28 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.d.ts +22 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +46 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +21 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.d.ts +34 -0
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.d.ts +8 -0
- package/dist/src/WebComponent/FeeCalculator/components/incentive-banner/index.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +5 -0
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/promo-card/promo-card.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/constants.d.ts +3 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +55 -0
- package/dist/src/WebComponent/FeeCalculator/index.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/model/building-fee-view.d.ts +41 -0
- package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +82 -0
- package/dist/src/WebComponent/FeeCalculator/model/desired-addon.d.ts +5 -0
- package/dist/src/WebComponent/FeeCalculator/model/desired-rentable-item.d.ts +4 -0
- package/dist/src/WebComponent/FeeCalculator/model/index.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/model/item-combination.d.ts +6 -0
- package/dist/src/WebComponent/FeeCalculator/model/item-quantity.d.ts +4 -0
- package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +18 -0
- package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +8 -0
- package/dist/src/WebComponent/FeeCalculator/model/rent-frequency.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item-summary.d.ts +13 -0
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +10 -0
- package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +23 -0
- package/dist/src/WebComponent/FeeCalculator/model/unit-fee-bundle.d.ts +31 -0
- package/dist/src/WebComponent/LeadSourceClient.d.ts +46 -0
- package/dist/src/WebComponent/OfficeHours.d.ts +21 -0
- package/dist/src/WebComponent/Scheduler/date-picker.d.ts +28 -0
- package/dist/src/WebComponent/Scheduler/time-picker.d.ts +16 -0
- package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +102 -0
- package/dist/src/WebComponent/Scheduler/tour-type-option.d.ts +13 -0
- package/dist/src/WebComponent/Scheduler/tourSchedulerStyles.d.ts +1 -0
- package/dist/src/WebComponent/actions/InputStyles.d.ts +1 -0
- package/dist/src/WebComponent/actions/action-confirm-button.d.ts +13 -0
- package/dist/src/WebComponent/actions/call-us-window.d.ts +37 -0
- package/dist/src/WebComponent/actions/collapse-expand-button.d.ts +8 -0
- package/dist/src/WebComponent/actions/details-window.d.ts +14 -0
- package/dist/src/WebComponent/actions/email-us-window.d.ts +46 -0
- package/dist/src/WebComponent/actions/formatPhoneNumber.d.ts +17 -0
- package/dist/src/WebComponent/actions/minimize-expand-button.d.ts +8 -0
- package/dist/src/WebComponent/chat-additional-actions.d.ts +28 -0
- package/dist/src/WebComponent/health-chat.d.ts +47 -0
- package/dist/src/WebComponent/healthchat-styles.d.ts +1 -0
- package/dist/src/WebComponent/icons/ApplyOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/BookTourOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/CalculatorOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChatOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChevronLeftIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ChevronRightIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/ContactResidentIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/DollarOutlineIcon.d.ts +7 -0
- package/dist/src/WebComponent/icons/EmailOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/HeyThereEmojiIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/PhoneOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/SendMessageIcon.d.ts +3 -0
- package/dist/src/WebComponent/icons/TourSelfGuidedIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/TourVirtuallyIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/TourWithAgentIcon.d.ts +2 -0
- package/dist/src/WebComponent/icons/XOutlineIcon.d.ts +2 -0
- package/dist/src/WebComponent/index.d.ts +2 -0
- package/dist/src/WebComponent/launcher/Launcher.d.ts +99 -0
- package/dist/src/WebComponent/launcher/launcherStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/mobile-launcher.d.ts +27 -0
- package/dist/src/WebComponent/launcher/typeEmojiStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/typeMiniStyles.d.ts +1 -0
- package/dist/src/WebComponent/launcher/typeMobileStyles.d.ts +1 -0
- package/dist/src/WebComponent/leasing-chat-styles.d.ts +1 -0
- package/dist/src/WebComponent/loaders/index.d.ts +4 -0
- package/dist/src/WebComponent/loaders/mega-loader.d.ts +7 -0
- package/dist/src/WebComponent/loaders/skeleton-card.d.ts +12 -0
- package/dist/src/WebComponent/loaders/skeleton-loader-styles.d.ts +3 -0
- package/dist/src/WebComponent/loaders/skeleton-loader.d.ts +13 -0
- package/dist/src/WebComponent/me-chat.d.ts +91 -0
- package/dist/src/WebComponent/me-select.d.ts +24 -0
- package/dist/src/WebComponent/mini-loader.d.ts +5 -0
- package/dist/src/WebComponent/pubnub-chat-styles.d.ts +1 -0
- package/dist/src/WebComponent/pubnub-chat.d.ts +48 -0
- package/dist/src/WebComponent/pubnub-media.d.ts +14 -0
- package/dist/src/WebComponent/pubnub-message-styles.d.ts +1 -0
- package/dist/src/WebComponent/pubnub-message.d.ts +39 -0
- package/dist/src/WebComponent/simple-launcher/simple-launcher-styles.d.ts +1 -0
- package/dist/src/WebComponent/simple-launcher/simple-launcher.d.ts +12 -0
- package/dist/src/WebComponent/utilities-chat.d.ts +47 -0
- package/dist/src/WebComponent/utilities-styles.d.ts +1 -0
- package/dist/src/WebComponent/utils.d.ts +31 -0
- package/dist/src/analytics.d.ts +64 -0
- package/dist/src/disclaimers.d.ts +16 -0
- package/dist/src/fetchBuildingABTestType.d.ts +8 -0
- package/dist/src/fetchBuildingInfo.d.ts +58 -0
- package/dist/src/fetchBuildingWebchatView.d.ts +124 -0
- package/dist/src/fetchFeatureFlag.d.ts +14 -0
- package/dist/src/fetchLeadSources.d.ts +4 -0
- package/dist/src/fetchPhoneNumberFromSource.d.ts +6 -0
- package/dist/src/getAvailabilities.d.ts +46 -0
- package/dist/src/getBuildingPhoneNumber.d.ts +1 -0
- package/dist/src/getShouldAllowScheduling.d.ts +1 -0
- package/dist/src/getShouldShowWebchat.d.ts +3 -0
- package/dist/src/getTimezoneString.d.ts +1 -0
- package/dist/src/globals.d.ts +2 -0
- package/dist/src/gtm.d.ts +6 -0
- package/dist/src/handleChatId.d.ts +11 -0
- package/dist/src/insertDNIIntoWebsite.d.ts +5 -0
- package/dist/src/insertLeadSourceIntoSchedulerLinks.d.ts +4 -0
- package/dist/src/main/MEChat.d.ts +74 -0
- package/dist/src/main/utils.d.ts +2 -0
- package/dist/src/postLeadSources.d.ts +3 -0
- package/dist/src/rentgrata.d.ts +4 -0
- package/dist/src/replaceSelectButtonsWithNewLink.d.ts +5 -0
- package/dist/src/services/fees/calculateQuote.d.ts +14 -0
- package/dist/src/services/fees/fetchBuildingFeesV2.d.ts +10 -0
- package/dist/src/services/fees/fetchBuildingUnits.d.ts +29 -0
- package/dist/src/services/fees/utils.d.ts +1 -0
- package/dist/src/svgIcons.d.ts +5 -0
- package/dist/src/themes.d.ts +5 -0
- package/dist/src/types/incentive-v2.d.ts +23 -0
- package/dist/src/types/rest-sdk.types.d.ts +11 -0
- package/dist/src/types/webchat-no-show-reason.d.ts +1 -0
- package/dist/src/utils/getWidgetOverrides.d.ts +39 -0
- package/dist/src/utils/queryParamBuilder.d.ts +8 -0
- package/dist/src/utils.d.ts +13 -0
- package/package.json +1 -1
- package/public/dist/index.js +250 -164
- package/src/MyPubnub.ts +792 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +39 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +206 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +6 -0
- package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +101 -0
- package/src/WebComponent/FeeCalculator/components/addons/common-addon-styles.ts +98 -0
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector-styles.ts +9 -0
- package/src/WebComponent/FeeCalculator/components/addons/rentable-item-qty-selector/rentable-item-qty-selector.ts +136 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +151 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +261 -0
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card-styles.ts +65 -0
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +91 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item-styles.ts +44 -0
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +38 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts +149 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +247 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +82 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +76 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner-styles.ts +40 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/incentive-banner.ts +43 -0
- package/src/WebComponent/FeeCalculator/components/incentive-banner/index.ts +1 -0
- package/src/WebComponent/FeeCalculator/components/index.ts +5 -0
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card-styles.ts +39 -0
- package/src/WebComponent/FeeCalculator/components/promo-card/promo-card.ts +39 -0
- package/src/WebComponent/FeeCalculator/constants.ts +5 -0
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +310 -0
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +341 -0
- package/src/WebComponent/FeeCalculator/index.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +84 -0
- package/src/WebComponent/FeeCalculator/model/building-fee.ts +126 -0
- package/src/WebComponent/FeeCalculator/model/desired-addon.ts +6 -0
- package/src/WebComponent/FeeCalculator/model/desired-rentable-item.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/index.ts +13 -0
- package/src/WebComponent/FeeCalculator/model/item-combination.ts +16 -0
- package/src/WebComponent/FeeCalculator/model/item-quantity.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +45 -0
- package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +9 -0
- package/src/WebComponent/FeeCalculator/model/rent-frequency.ts +1 -0
- package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +34 -0
- package/src/WebComponent/FeeCalculator/model/rentable-item.ts +21 -0
- package/src/WebComponent/FeeCalculator/model/transaction-category.ts +23 -0
- package/src/WebComponent/FeeCalculator/model/unit-fee-bundle.ts +54 -0
- package/src/WebComponent/LeadSourceClient.ts +332 -0
- package/src/WebComponent/MEChat.css +5 -0
- package/src/WebComponent/OfficeHours.ts +73 -0
- package/src/WebComponent/Scheduler/date-picker.ts +405 -0
- package/src/WebComponent/Scheduler/time-picker.ts +195 -0
- package/src/WebComponent/Scheduler/tour-scheduler.ts +1430 -0
- package/src/WebComponent/Scheduler/tour-type-option.ts +112 -0
- package/src/WebComponent/Scheduler/tourSchedulerStyles.ts +418 -0
- package/src/WebComponent/actions/InputStyles.ts +57 -0
- package/src/WebComponent/actions/action-confirm-button.ts +125 -0
- package/src/WebComponent/actions/call-us-window.ts +467 -0
- package/src/WebComponent/actions/collapse-expand-button.ts +65 -0
- package/src/WebComponent/actions/details-window.ts +150 -0
- package/src/WebComponent/actions/email-us-window.ts +556 -0
- package/src/WebComponent/actions/formatPhoneNumber.ts +72 -0
- package/src/WebComponent/actions/minimize-expand-button.ts +93 -0
- package/src/WebComponent/chat-additional-actions.ts +135 -0
- package/src/WebComponent/health-chat.ts +270 -0
- package/src/WebComponent/healthchat-styles.ts +119 -0
- package/src/WebComponent/icons/ApplyOutlineIcon.ts +22 -0
- package/src/WebComponent/icons/BookTourOutlineIcon.ts +13 -0
- package/src/WebComponent/icons/CalculatorOutlineIcon.ts +80 -0
- package/src/WebComponent/icons/ChatOutlineIcon.ts +10 -0
- package/src/WebComponent/icons/ChevronLeftIcon.ts +7 -0
- package/src/WebComponent/icons/ChevronRightIcon.ts +7 -0
- package/src/WebComponent/icons/ContactResidentIcon.ts +9 -0
- package/src/WebComponent/icons/DollarOutlineIcon.ts +26 -0
- package/src/WebComponent/icons/EmailOutlineIcon.ts +7 -0
- package/src/WebComponent/icons/HeyThereEmojiIcon.ts +12 -0
- package/src/WebComponent/icons/PhoneOutlineIcon.ts +7 -0
- package/src/WebComponent/icons/SendMessageIcon.ts +17 -0
- package/src/WebComponent/icons/TourSelfGuidedIcon.ts +17 -0
- package/src/WebComponent/icons/TourVirtuallyIcon.ts +17 -0
- package/src/WebComponent/icons/TourWithAgentIcon.ts +17 -0
- package/src/WebComponent/icons/XOutlineIcon.ts +8 -0
- package/src/WebComponent/index.ts +2 -0
- package/src/WebComponent/launcher/Launcher.ts +1284 -0
- package/src/WebComponent/launcher/launcherStyles.ts +500 -0
- package/src/WebComponent/launcher/mobile-launcher.ts +162 -0
- package/src/WebComponent/launcher/typeEmojiStyles.ts +161 -0
- package/src/WebComponent/launcher/typeMiniStyles.ts +60 -0
- package/src/WebComponent/launcher/typeMobileStyles.ts +50 -0
- package/src/WebComponent/leasing-chat-styles.ts +114 -0
- package/src/WebComponent/loaders/index.ts +7 -0
- package/src/WebComponent/loaders/mega-loader.ts +36 -0
- package/src/WebComponent/loaders/skeleton-card.ts +31 -0
- package/src/WebComponent/loaders/skeleton-loader-styles.ts +112 -0
- package/src/WebComponent/loaders/skeleton-loader.ts +34 -0
- package/src/WebComponent/me-chat.ts +1264 -0
- package/src/WebComponent/me-select.ts +322 -0
- package/src/WebComponent/mini-loader.ts +28 -0
- package/src/WebComponent/pubnub-chat-styles.ts +204 -0
- package/src/WebComponent/pubnub-chat.ts +771 -0
- package/src/WebComponent/pubnub-media.ts +208 -0
- package/src/WebComponent/pubnub-message-styles.ts +54 -0
- package/src/WebComponent/pubnub-message.ts +431 -0
- package/src/WebComponent/simple-launcher/simple-launcher-styles.ts +34 -0
- package/src/WebComponent/simple-launcher/simple-launcher.ts +100 -0
- package/src/WebComponent/utilities-chat.ts +270 -0
- package/src/WebComponent/utilities-styles.ts +110 -0
- package/src/WebComponent/utils.ts +82 -0
- package/src/analytics.ts +217 -0
- package/src/assetUrls.ts +6 -0
- package/src/disclaimers.ts +301 -0
- package/src/fetchBuildingABTestType.ts +21 -0
- package/src/fetchBuildingInfo.ts +88 -0
- package/src/fetchBuildingWebchatView.ts +176 -0
- package/src/fetchFeatureFlag.ts +250 -0
- package/src/fetchLeadSources.ts +98 -0
- package/src/fetchPhoneNumberFromSource.ts +31 -0
- package/src/fetchWebchatPreferences.ts +54 -0
- package/src/getAvailabilities.ts +189 -0
- package/src/getBuildingPhoneNumber.ts +26 -0
- package/src/getShouldAllowScheduling.ts +16 -0
- package/src/getShouldShowWebchat.ts +114 -0
- package/src/getTimezoneString.ts +40 -0
- package/src/globals.ts +3 -0
- package/src/gtm.ts +17 -0
- package/src/handleChatId.ts +101 -0
- package/src/insertDNIIntoWebsite.ts +146 -0
- package/src/insertLeadSourceIntoSchedulerLinks.ts +71 -0
- package/src/main/MEChat.test.ts +110 -0
- package/src/main/MEChat.ts +404 -0
- package/src/main/utils.ts +70 -0
- package/src/postLeadSources.ts +44 -0
- package/src/rentgrata.ts +74 -0
- package/src/replaceSelectButtonsWithNewLink.ts +91 -0
- package/src/services/fees/calculateQuote.ts +74 -0
- package/src/services/fees/fetchBuildingFees.ts +50 -0
- package/src/services/fees/fetchBuildingFeesV2.ts +59 -0
- package/src/services/fees/fetchBuildingFloorplans.ts +74 -0
- package/src/services/fees/fetchBuildingUnits.ts +86 -0
- package/src/services/fees/utils.ts +4 -0
- package/src/svgIcons.ts +14 -0
- package/src/themes.ts +65 -0
- package/src/types/incentive-v2.ts +24 -0
- package/src/types/rest-sdk.types.ts +13 -0
- package/src/types/webchat-no-show-reason.ts +6 -0
- package/src/utils/getWidgetOverrides.ts +91 -0
- package/src/utils/queryParamBuilder.ts +28 -0
- package/src/utils.ts +121 -0
package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector-styles.ts
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
const floorPlanSelectorStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.floor-plan-selector {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.floor-plan-selector-label {
|
|
15
|
+
font-size: 1rem;
|
|
16
|
+
font-weight: normal;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.floor-plan-selector-badges {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
overflow-x: scroll;
|
|
23
|
+
max-width: 400px;
|
|
24
|
+
gap: 8px;
|
|
25
|
+
margin-bottom: 12px;
|
|
26
|
+
scrollbar-width: thin;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.floor-plan-badge {
|
|
30
|
+
padding: 6px 12px;
|
|
31
|
+
border-radius: 16px;
|
|
32
|
+
min-width: 40px;
|
|
33
|
+
text-align: center;
|
|
34
|
+
font-size: 0.9rem;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
background-color: #f0f0f0;
|
|
37
|
+
border: 1px solid #ddd;
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.floor-plan-badge:hover {
|
|
44
|
+
background-color: #e6e6e6;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.floor-plan-badge.selected {
|
|
48
|
+
background-color: var(--primary-color, #646987);
|
|
49
|
+
border-color: var(--primary-color, #646987);
|
|
50
|
+
color: white;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.advanced-section {
|
|
54
|
+
max-height: 0;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.advanced-section.open {
|
|
59
|
+
max-height: 800px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.date-fields {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
gap: 16px;
|
|
66
|
+
margin-bottom: 16px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.date-field {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: 4px;
|
|
73
|
+
flex: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.date-field label {
|
|
77
|
+
font-size: 0.9rem;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.date-field input {
|
|
81
|
+
padding: 8px;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
border: 1px solid #ddd;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.date-field-label {
|
|
87
|
+
font-size: #3a3a3b;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.image-carousel {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
max-height: 50%;
|
|
94
|
+
gap: 16px;
|
|
95
|
+
padding: 12px 0;
|
|
96
|
+
scroll-behavior: smooth;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.unit-selection {
|
|
100
|
+
max-height: 16rem;
|
|
101
|
+
overflow-y: auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.unit-label {
|
|
105
|
+
font-size: 1rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.loading-container,
|
|
109
|
+
.no-floorplans-container {
|
|
110
|
+
display: flex;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
align-items: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media (max-width: 840px) {
|
|
116
|
+
.date-fields {
|
|
117
|
+
flex-direction: column;
|
|
118
|
+
gap: 12px;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (max-width: 768px) {
|
|
123
|
+
.date-fields {
|
|
124
|
+
gap: 10px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.image-carousel {
|
|
128
|
+
flex-direction: row;
|
|
129
|
+
max-height: none;
|
|
130
|
+
overflow-x: auto;
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: 12px 0;
|
|
133
|
+
-webkit-overflow-scrolling: touch;
|
|
134
|
+
scrollbar-width: none; /* Firefox */
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.image-carousel::-webkit-scrollbar {
|
|
138
|
+
display: none; /* Chrome, Safari, Opera */
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.unit-selection {
|
|
142
|
+
max-height: none;
|
|
143
|
+
overflow-y: visible;
|
|
144
|
+
overflow-x: auto;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
`;
|
|
148
|
+
|
|
149
|
+
export default floorPlanSelectorStyles;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { LitElement, html, TemplateResult } from "lit";
|
|
2
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
3
|
+
import { LayoutOption } from "../../../../fetchBuildingWebchatView";
|
|
4
|
+
import { ALL_LAYOUTS_OPTION, DEFAULT_LEASE_TERM } from "../../constants";
|
|
5
|
+
|
|
6
|
+
import fetchBuildingUnits, {
|
|
7
|
+
Unit,
|
|
8
|
+
} from "../../../../services/fees/fetchBuildingUnits";
|
|
9
|
+
import { layoutToBedrooms } from "../../../../services/fees/utils";
|
|
10
|
+
import floorPlanSelectorStyles from "./floor-plan-selector-styles";
|
|
11
|
+
import { TODAY } from "../../../../globals";
|
|
12
|
+
|
|
13
|
+
import "../floorplan-image-card/floorplan-image-card";
|
|
14
|
+
import "../../../loaders/mega-loader";
|
|
15
|
+
|
|
16
|
+
@customElement("floor-plan-selector")
|
|
17
|
+
export class FloorPlanSelector extends LitElement {
|
|
18
|
+
static styles = floorPlanSelectorStyles;
|
|
19
|
+
|
|
20
|
+
@property({ type: String })
|
|
21
|
+
buildingSlug = "";
|
|
22
|
+
|
|
23
|
+
@property({ type: Array })
|
|
24
|
+
layoutOptions: LayoutOption[] = [];
|
|
25
|
+
|
|
26
|
+
@property({ type: Array })
|
|
27
|
+
selectedLayoutIds: number[] = [ALL_LAYOUTS_OPTION];
|
|
28
|
+
|
|
29
|
+
@property()
|
|
30
|
+
onSelectLayout: ((layoutIds: number[]) => void) | null = null;
|
|
31
|
+
|
|
32
|
+
@property()
|
|
33
|
+
onUnitSelect: ((unit: Unit) => void) | null = null;
|
|
34
|
+
|
|
35
|
+
@property()
|
|
36
|
+
onMoveInDateChange: ((moveInDate: Date) => void) | null = null;
|
|
37
|
+
|
|
38
|
+
@property()
|
|
39
|
+
onLeaseTermChange: ((leaseTerm: number) => void) | null = null;
|
|
40
|
+
|
|
41
|
+
@state()
|
|
42
|
+
moveInDate: Date | null = TODAY;
|
|
43
|
+
|
|
44
|
+
@state()
|
|
45
|
+
leaseTerm = DEFAULT_LEASE_TERM;
|
|
46
|
+
|
|
47
|
+
@state()
|
|
48
|
+
units: Unit[] = [];
|
|
49
|
+
|
|
50
|
+
@state()
|
|
51
|
+
selectedUnit: Unit | null = null;
|
|
52
|
+
|
|
53
|
+
@state()
|
|
54
|
+
isLoading = false;
|
|
55
|
+
|
|
56
|
+
private get displayOptions(): LayoutOption[] {
|
|
57
|
+
const allOption: LayoutOption = {
|
|
58
|
+
value: ALL_LAYOUTS_OPTION,
|
|
59
|
+
label: "All",
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const convertNumberWordsToNumeric = (text: string): string => {
|
|
63
|
+
const numberMap: Record<string, string> = {
|
|
64
|
+
zero: "0",
|
|
65
|
+
one: "1",
|
|
66
|
+
two: "2",
|
|
67
|
+
three: "3",
|
|
68
|
+
four: "4",
|
|
69
|
+
five: "5",
|
|
70
|
+
six: "6",
|
|
71
|
+
seven: "7",
|
|
72
|
+
eight: "8",
|
|
73
|
+
nine: "9",
|
|
74
|
+
ten: "10",
|
|
75
|
+
eleven: "11",
|
|
76
|
+
twelve: "12",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
let result = text;
|
|
80
|
+
Object.entries(numberMap).forEach(([word, number]) => {
|
|
81
|
+
const regex = new RegExp(`\\b${word}\\b`, "gi");
|
|
82
|
+
result = result.replace(regex, number);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return result;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return [allOption, ...this.layoutOptions]
|
|
89
|
+
.map((opt: LayoutOption) => ({
|
|
90
|
+
...opt,
|
|
91
|
+
label: convertNumberWordsToNumeric(
|
|
92
|
+
opt.label.replace(/bedroom/gi, "bd")
|
|
93
|
+
),
|
|
94
|
+
}))
|
|
95
|
+
.sort((a, b) => a.value - b.value);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private fetchUnits = async (): Promise<Unit[]> => {
|
|
99
|
+
this.isLoading = true;
|
|
100
|
+
|
|
101
|
+
const numBedrooms =
|
|
102
|
+
this.selectedLayoutIds.length === 1
|
|
103
|
+
? layoutToBedrooms(this.selectedLayoutIds[0])
|
|
104
|
+
: undefined;
|
|
105
|
+
|
|
106
|
+
try {
|
|
107
|
+
const units = await fetchBuildingUnits({
|
|
108
|
+
buildingSlug: this.buildingSlug,
|
|
109
|
+
moveInDateEarliest: this.moveInDate ? this.moveInDate : undefined,
|
|
110
|
+
...(this.selectedLayoutIds.includes(ALL_LAYOUTS_OPTION)
|
|
111
|
+
? {}
|
|
112
|
+
: { numBedrooms }),
|
|
113
|
+
leaseTermMin: this.leaseTerm,
|
|
114
|
+
});
|
|
115
|
+
return units.filter((unit) => !!unit.floorplanUrl);
|
|
116
|
+
} finally {
|
|
117
|
+
this.isLoading = false;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
firstUpdated = async (): Promise<void> => {
|
|
122
|
+
this.units = await this.fetchUnits();
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
handleUnitSelect = (unit: Unit): void => {
|
|
126
|
+
this.selectedUnit = unit;
|
|
127
|
+
this.onUnitSelect?.(unit);
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
handleLayoutChange = async (ids: number[]): Promise<void> => {
|
|
131
|
+
this.selectedLayoutIds = ids;
|
|
132
|
+
this.onSelectLayout?.(this.selectedLayoutIds);
|
|
133
|
+
this.units = await this.fetchUnits();
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
handleMoveInDateChange = async (e: Event): Promise<void> => {
|
|
137
|
+
const inputValue = (e.target as HTMLInputElement).value;
|
|
138
|
+
let newMoveIn;
|
|
139
|
+
|
|
140
|
+
if (!inputValue) {
|
|
141
|
+
newMoveIn = TODAY;
|
|
142
|
+
} else {
|
|
143
|
+
newMoveIn = new Date(inputValue);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
this.moveInDate = newMoveIn;
|
|
147
|
+
this.onMoveInDateChange?.(newMoveIn);
|
|
148
|
+
this.units = await this.fetchUnits();
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
handleLeaseTermChange = async (e: Event): Promise<void> => {
|
|
152
|
+
this.leaseTerm = parseInt((e.target as HTMLInputElement).value);
|
|
153
|
+
this.onLeaseTermChange?.(this.leaseTerm);
|
|
154
|
+
this.units = await this.fetchUnits();
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
renderUnitSelection = (): TemplateResult => {
|
|
158
|
+
if (this.isLoading) {
|
|
159
|
+
return html`
|
|
160
|
+
<div class="unit-selection">
|
|
161
|
+
<div class="loading-container">
|
|
162
|
+
<mega-loader size="32"></mega-loader>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
`;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return html`
|
|
169
|
+
<div class="unit-selection">
|
|
170
|
+
<div class="image-carousel">
|
|
171
|
+
${this.units?.length === 0
|
|
172
|
+
? html`
|
|
173
|
+
<div class="no-floorplans-container">
|
|
174
|
+
<p>No floorplans found</p>
|
|
175
|
+
</div>
|
|
176
|
+
`
|
|
177
|
+
: ""}
|
|
178
|
+
${this.units?.map(
|
|
179
|
+
(unit) => html`
|
|
180
|
+
<floorplan-image-card
|
|
181
|
+
.unit=${unit}
|
|
182
|
+
.onUnitSelect=${this.handleUnitSelect}
|
|
183
|
+
.selected=${this.selectedUnit?.id === unit.id}
|
|
184
|
+
></floorplan-image-card>
|
|
185
|
+
`
|
|
186
|
+
)}
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
`;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
render(): TemplateResult {
|
|
193
|
+
return html`
|
|
194
|
+
<div class="floor-plan-selector">
|
|
195
|
+
<div class="floor-plan-selector-label">Select Floor Plan</div>
|
|
196
|
+
<div class="floor-plan-selector-badges">
|
|
197
|
+
${this.displayOptions.map(
|
|
198
|
+
(opt) => html`
|
|
199
|
+
<div
|
|
200
|
+
class="floor-plan-badge ${this.selectedLayoutIds.includes(
|
|
201
|
+
opt.value
|
|
202
|
+
)
|
|
203
|
+
? "selected"
|
|
204
|
+
: ""}"
|
|
205
|
+
@click=${() => this.handleLayoutChange([opt.value])}
|
|
206
|
+
>
|
|
207
|
+
${opt.label}
|
|
208
|
+
</div>
|
|
209
|
+
`
|
|
210
|
+
)}
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div>
|
|
214
|
+
<div class="date-fields">
|
|
215
|
+
<div class="date-field">
|
|
216
|
+
<label class="date-field-label">Move in date</label>
|
|
217
|
+
<input
|
|
218
|
+
type="date"
|
|
219
|
+
placeholder="Select move in date"
|
|
220
|
+
.value=${this.moveInDate?.toISOString().split("T")[0] ?? ""}
|
|
221
|
+
@input=${this.handleMoveInDateChange}
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="date-field">
|
|
225
|
+
<label class="date-field-label">Lease Term</label>
|
|
226
|
+
<input
|
|
227
|
+
type="number"
|
|
228
|
+
placeholder="Lease term (months)"
|
|
229
|
+
.value=${this.leaseTerm.toString()}
|
|
230
|
+
@input=${this.handleLeaseTermChange}
|
|
231
|
+
/>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
<div class="unit-label">Select Unit</div>
|
|
236
|
+
${this.renderUnitSelection()}
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
`;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
declare global {
|
|
244
|
+
interface HTMLElementTagNameMap {
|
|
245
|
+
"floor-plan-selector": FloorPlanSelector;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
const floorplanImageCardStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
p {
|
|
9
|
+
margin: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.floorplan-image-card {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
background-color: #f8f9fa;
|
|
16
|
+
min-width: 18rem;
|
|
17
|
+
width: 100%;
|
|
18
|
+
padding: 12px;
|
|
19
|
+
gap: 8px;
|
|
20
|
+
border-radius: 4px;
|
|
21
|
+
border: 2px solid transparent;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.section-left {
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
position: relative;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.floorplan-image-card.selected {
|
|
31
|
+
border-color: var(--primary-color, #646987);
|
|
32
|
+
box-shadow: 0 0 8px
|
|
33
|
+
color-mix(in srgb, var(--primary-color, #646987) 50%, transparent);
|
|
34
|
+
transition: box-shadow 0.1s ease-in-out, background-color 0.1s ease-in-out,
|
|
35
|
+
border-color 0.1s ease-in-out;
|
|
36
|
+
background-color: #f0f7ff;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.section-right {
|
|
40
|
+
flex: 1 1 auto;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
gap: 4px;
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.image-card-title {
|
|
48
|
+
font-size: 1rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.image-card-subtitle {
|
|
52
|
+
font-size: 0.8rem;
|
|
53
|
+
color: #868e96;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
img {
|
|
57
|
+
border-radius: 8px;
|
|
58
|
+
flex: 0 0 auto;
|
|
59
|
+
height: 4rem;
|
|
60
|
+
width: 4rem;
|
|
61
|
+
object-fit: cover;
|
|
62
|
+
border: 1px solid #ddd;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
position: relative;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
img:hover {
|
|
68
|
+
border-color: var(--primary-color, #646987);
|
|
69
|
+
box-shadow: 0 0 10px 3px rgba(100, 105, 135, 0.4);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (max-width: 768px) {
|
|
73
|
+
.floorplan-image-card {
|
|
74
|
+
width: 100%;
|
|
75
|
+
min-width: 18rem;
|
|
76
|
+
flex-shrink: 0;
|
|
77
|
+
margin-right: 8px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
export default floorplanImageCardStyles;
|
package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
import { customElement, property } from "lit/decorators.js";
|
|
4
|
+
import { Unit } from "../../../../services/fees/fetchBuildingUnits";
|
|
5
|
+
|
|
6
|
+
import floorplanImageCardStyles from "./floorplan-image-card-styles";
|
|
7
|
+
|
|
8
|
+
@customElement("floorplan-image-card")
|
|
9
|
+
export class FloorplanImageCard extends LitElement {
|
|
10
|
+
static styles = floorplanImageCardStyles;
|
|
11
|
+
|
|
12
|
+
@property({ type: Object })
|
|
13
|
+
unit: Unit = {} as Unit;
|
|
14
|
+
|
|
15
|
+
@property()
|
|
16
|
+
onUnitSelect: ((unit: Unit) => void) | null = null;
|
|
17
|
+
|
|
18
|
+
@property({ type: Boolean })
|
|
19
|
+
selected = false;
|
|
20
|
+
|
|
21
|
+
get bedAndBathText(): string {
|
|
22
|
+
const bedRooms =
|
|
23
|
+
this.unit.numberOfBedrooms === 0
|
|
24
|
+
? "studio"
|
|
25
|
+
: `${this.unit.numberOfBedrooms}bd`;
|
|
26
|
+
return `${bedRooms} | ${this.unit.numberOfBathrooms}ba`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
get priceRange(): string {
|
|
30
|
+
if (this.unit.startingPrice === this.unit.maxPrice) {
|
|
31
|
+
return `$${this.unit.startingPrice}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return `$${this.unit.startingPrice} - $${this.unit.maxPrice}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
handleOnUnitSelect(): void {
|
|
38
|
+
if (this.selected) return;
|
|
39
|
+
this.selected = !this.selected;
|
|
40
|
+
this.onUnitSelect?.(this.unit);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
handleOnImgClick(event: Event): void {
|
|
44
|
+
const img = event.target as HTMLImageElement;
|
|
45
|
+
window.open(img.src, "_blank");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
render(): TemplateResult {
|
|
49
|
+
return html`
|
|
50
|
+
<div class="floorplan-image-card ${this.selected ? "selected" : ""}">
|
|
51
|
+
<div class="section-left">
|
|
52
|
+
<img
|
|
53
|
+
@click=${this.handleOnImgClick}
|
|
54
|
+
src="${this.unit.floorplanUrl ?? ""}"
|
|
55
|
+
alt="${this.unit.floorplanName}"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="section-right" @click=${this.handleOnUnitSelect}>
|
|
59
|
+
<p class="image-card-title">
|
|
60
|
+
Unit ${this.unit.unitNumber} | ${this.priceRange}
|
|
61
|
+
</p>
|
|
62
|
+
<p class="image-card-subtitle">
|
|
63
|
+
${this.bedAndBathText} | ${this.unit.squareFootage} ft |
|
|
64
|
+
${this.unit.earliestAvailable}
|
|
65
|
+
</p>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
"floorplan-image-card": FloorplanImageCard;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const incentiveBannerStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.incentive-banner {
|
|
9
|
+
width: 100%;
|
|
10
|
+
background-color: #e8f2ff;
|
|
11
|
+
padding: 8px 12px;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.incentive-icon {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 3rem;
|
|
22
|
+
height: 3rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.incentive-content {
|
|
26
|
+
flex: 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.incentive-title {
|
|
30
|
+
margin: 0;
|
|
31
|
+
font-size: 1.1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.incentive-subtitle {
|
|
35
|
+
margin: 4px 0 0 0;
|
|
36
|
+
color: #868e96;
|
|
37
|
+
font-size: 0.9rem;
|
|
38
|
+
opacity: 0.9;
|
|
39
|
+
}
|
|
40
|
+
`;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LitElement, html, TemplateResult } from "lit";
|
|
2
|
+
import { customElement, property } from "lit/decorators.js";
|
|
3
|
+
import { IncentiveV2 } from "../../../../types/incentive-v2";
|
|
4
|
+
import { incentiveBannerStyles } from "./incentive-banner-styles";
|
|
5
|
+
import DollarOutlineIcon from "../../../icons/DollarOutlineIcon";
|
|
6
|
+
|
|
7
|
+
@customElement("incentive-banner")
|
|
8
|
+
export class IncentiveBanner extends LitElement {
|
|
9
|
+
static styles = incentiveBannerStyles;
|
|
10
|
+
|
|
11
|
+
@property({ type: Object })
|
|
12
|
+
incentive!: IncentiveV2;
|
|
13
|
+
|
|
14
|
+
getFormattedEndDate(incentive: IncentiveV2): string {
|
|
15
|
+
const endDate = new Date(incentive.endDate);
|
|
16
|
+
return endDate.toLocaleDateString("en-US", {
|
|
17
|
+
month: "long",
|
|
18
|
+
day: "numeric",
|
|
19
|
+
year: "numeric",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
render(): TemplateResult {
|
|
24
|
+
if (!this.incentive) {
|
|
25
|
+
return html``;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return html`
|
|
29
|
+
<div class="incentive-banner">
|
|
30
|
+
<div class="incentive-icon">${DollarOutlineIcon({ size: 32 })}</div>
|
|
31
|
+
<div class="incentive-content">
|
|
32
|
+
<h2 class="incentive-title">
|
|
33
|
+
${this.incentive.originalIncentiveString}
|
|
34
|
+
</h2>
|
|
35
|
+
<p class="incentive-subtitle">
|
|
36
|
+
Valid through ${this.getFormattedEndDate(this.incentive)} for
|
|
37
|
+
${this.incentive.qualifier}
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./incentive-banner";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./promo-card/promo-card";
|
|
2
|
+
export * from "./floor-plan-selector/floor-plan-selector";
|
|
3
|
+
export * from "./fee-card/fee-card";
|
|
4
|
+
export * from "./addons/addon-item-qty-selector/addon-item-qty-selector";
|
|
5
|
+
export * from "./fee-calculator-layout/fee-calculator-layout";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
const promoCardStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
margin-bottom: 20px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.promo-card {
|
|
10
|
+
background-color: #e6f2ff;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
padding: 16px;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.icon-container {
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
margin-right: 16px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.content-container {
|
|
24
|
+
flex: 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.promo-heading {
|
|
28
|
+
font-size: 1.2rem;
|
|
29
|
+
font-weight: normal;
|
|
30
|
+
margin: 0 0 4px 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.promo-subtitle {
|
|
34
|
+
color: #868e96;
|
|
35
|
+
font-size: 0.8rem;
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
export default promoCardStyles;
|