@meetelise/chat 1.30.0 → 1.30.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/addon-item/addon-item-styles.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/components/addon-item/addon-item.d.ts +22 -0
- package/dist/src/WebComponent/FeeCalculator/components/addon-item/index.d.ts +1 -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 +34 -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 +33 -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/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 +2 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator-styles.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +59 -0
- package/dist/src/WebComponent/FeeCalculator/index.d.ts +2 -0
- package/dist/src/WebComponent/FeeCalculator/model/building-fee.d.ts +80 -0
- package/dist/src/WebComponent/FeeCalculator/model/transaction-category.d.ts +23 -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 +14 -0
- package/dist/src/WebComponent/Scheduler/tour-scheduler.d.ts +100 -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 +3 -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 +98 -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/me-chat.d.ts +91 -0
- package/dist/src/WebComponent/me-select.d.ts +24 -0
- package/dist/src/WebComponent/mega-loader.d.ts +7 -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 +49 -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 +8 -0
- package/dist/src/fetchBuildingABTestType.d.ts +8 -0
- package/dist/src/fetchBuildingInfo.d.ts +57 -0
- package/dist/src/fetchBuildingWebchatView.d.ts +123 -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 +45 -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 +1 -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 +53 -0
- package/dist/src/services/fees/fetchBuildingFees.d.ts +24 -0
- package/dist/src/services/fees/fetchBuildingFloorplans.d.ts +21 -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/rest-sdk.types.d.ts +11 -0
- package/dist/src/types/webchat-no-show-reason.d.ts +1 -0
- package/dist/src/utils.d.ts +13 -0
- package/package.json +1 -1
- package/public/dist/index.js +2 -3
- package/src/MyPubnub.ts +792 -0
- package/src/WebComponent/FeeCalculator/components/addon-item/addon-item-styles.ts +79 -0
- package/src/WebComponent/FeeCalculator/components/addon-item/addon-item.ts +121 -0
- package/src/WebComponent/FeeCalculator/components/addon-item/index.ts +1 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout-styles.ts +126 -0
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +205 -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 +144 -0
- package/src/WebComponent/FeeCalculator/components/floor-plan-selector/floor-plan-selector.ts +241 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card-styles.ts +74 -0
- package/src/WebComponent/FeeCalculator/components/floorplan-image-card/floorplan-image-card.ts +72 -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 +3 -0
- package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +334 -0
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +369 -0
- package/src/WebComponent/FeeCalculator/index.ts +4 -0
- package/src/WebComponent/FeeCalculator/model/building-fee.ts +124 -0
- package/src/WebComponent/FeeCalculator/model/transaction-category.ts +23 -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 +190 -0
- package/src/WebComponent/Scheduler/tour-scheduler.ts +1373 -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 +445 -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 +555 -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 +22 -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 +18 -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 +1282 -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/me-chat.ts +1262 -0
- package/src/WebComponent/me-select.ts +322 -0
- package/src/WebComponent/mega-loader.ts +36 -0
- package/src/WebComponent/mini-loader.ts +28 -0
- package/src/WebComponent/pubnub-chat-styles.ts +204 -0
- package/src/WebComponent/pubnub-chat.ts +928 -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 +58 -0
- package/src/fetchBuildingABTestType.ts +21 -0
- package/src/fetchBuildingInfo.ts +87 -0
- package/src/fetchBuildingWebchatView.ts +156 -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 +179 -0
- package/src/getBuildingPhoneNumber.ts +26 -0
- package/src/getShouldAllowScheduling.ts +16 -0
- package/src/getShouldShowWebchat.ts +114 -0
- package/src/getTimezoneString.ts +39 -0
- package/src/globals.ts +1 -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 +69 -0
- package/src/services/fees/calculateQuote.ts +136 -0
- package/src/services/fees/fetchBuildingFees.ts +63 -0
- package/src/services/fees/fetchBuildingFloorplans.ts +74 -0
- package/src/services/fees/utils.ts +4 -0
- package/src/svgIcons.ts +14 -0
- package/src/themes.ts +65 -0
- package/src/types/rest-sdk.types.ts +13 -0
- package/src/types/webchat-no-show-reason.ts +6 -0
- package/src/utils.ts +121 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { StyleInfo } from "lit/directives/style-map";
|
|
2
|
+
import "../WebComponent/me-chat";
|
|
3
|
+
import { MEChat as MEChatLitElement } from "../WebComponent/me-chat";
|
|
4
|
+
import "../WebComponent/health-chat";
|
|
5
|
+
import { HealthChat as HealthChatLitElement } from "../WebComponent/health-chat";
|
|
6
|
+
import "../WebComponent/utilities-chat";
|
|
7
|
+
import { UtilitiesChat as UtilitiesChatElement } from "../WebComponent/utilities-chat";
|
|
8
|
+
/**
|
|
9
|
+
* The interface to MeetElise chat.
|
|
10
|
+
*
|
|
11
|
+
* To add meetelise chat to the screen, call its static method
|
|
12
|
+
* `start()` with your building and organization slug.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* MEChat.start({
|
|
16
|
+
* organization: 'the-jacobson-group',
|
|
17
|
+
* building: 'twin-rivers-pointe'
|
|
18
|
+
* });
|
|
19
|
+
*/
|
|
20
|
+
interface PositioningOptions {
|
|
21
|
+
right?: number;
|
|
22
|
+
bottom?: number;
|
|
23
|
+
top?: number;
|
|
24
|
+
left?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface HealthcareOptions extends PositioningOptions {
|
|
27
|
+
id: string;
|
|
28
|
+
}
|
|
29
|
+
export default class MEChat {
|
|
30
|
+
static meChat: MEChatLitElement | null;
|
|
31
|
+
static healthChat: HealthChatLitElement | null;
|
|
32
|
+
static utilitiesChat: UtilitiesChatElement | null;
|
|
33
|
+
static orgSlug: string;
|
|
34
|
+
static mutationObserver: MutationObserver | null;
|
|
35
|
+
static previousUrl: string;
|
|
36
|
+
static hasBuildingSlug: boolean | null;
|
|
37
|
+
static brandColor: string;
|
|
38
|
+
static backgroundColor: string;
|
|
39
|
+
static healthcareId: string;
|
|
40
|
+
static overridePlacement: {
|
|
41
|
+
right?: number;
|
|
42
|
+
bottom?: number;
|
|
43
|
+
top?: number;
|
|
44
|
+
left?: number;
|
|
45
|
+
};
|
|
46
|
+
static healthcareStart(opts: HealthcareOptions, isInitialStart?: boolean): void;
|
|
47
|
+
static start(opts: Options, isInitialStart?: boolean): void;
|
|
48
|
+
static restartConversation(): Promise<void>;
|
|
49
|
+
static remove(): Promise<void>;
|
|
50
|
+
static handleBuildingslug(meChat: MEChatLitElement, orgSlug?: string, buildingSlug?: string): Promise<void>;
|
|
51
|
+
static handleSingleFamilyUrl(): Promise<void>;
|
|
52
|
+
static calculateBuildingSlugForLogging(givenBuildingSlug: string): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export interface Options {
|
|
55
|
+
building: string;
|
|
56
|
+
organization: string;
|
|
57
|
+
avatarSrc?: string;
|
|
58
|
+
mini?: boolean;
|
|
59
|
+
launcherStyles?: StyleInfo;
|
|
60
|
+
brandColor?: string;
|
|
61
|
+
backgroundColor?: string;
|
|
62
|
+
mobileStyles?: StyleInfo;
|
|
63
|
+
position?: PositioningOptions;
|
|
64
|
+
onWidgetLoaded?: () => void;
|
|
65
|
+
overrideRentgrata?: boolean;
|
|
66
|
+
widgetType?: string;
|
|
67
|
+
onSstClose?: () => void;
|
|
68
|
+
}
|
|
69
|
+
export declare enum WidgetType {
|
|
70
|
+
Default = "default",
|
|
71
|
+
Healthcare = "healthcare",
|
|
72
|
+
Utilities = "utilities"
|
|
73
|
+
}
|
|
74
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RentableItemSummary } from "./fetchBuildingFees";
|
|
2
|
+
declare type CalculateQuoteRequest = {
|
|
3
|
+
buildingSlug: string;
|
|
4
|
+
unitId: number;
|
|
5
|
+
addons: DesiredAddon[];
|
|
6
|
+
rentableItems: DesiredRentableItem[];
|
|
7
|
+
leaseTerm: number;
|
|
8
|
+
moveInDate: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type DesiredAddon = {
|
|
11
|
+
id: number;
|
|
12
|
+
quantity: number;
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type DesiredRentableItem = {
|
|
16
|
+
id: number;
|
|
17
|
+
quantity: number;
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
export declare type CalculateQuoteResponse = {
|
|
21
|
+
units: UnitFeeBundle[];
|
|
22
|
+
};
|
|
23
|
+
declare type UnitFeeBundle = {
|
|
24
|
+
unitId: number;
|
|
25
|
+
unitNumber: string;
|
|
26
|
+
unitLayout: number;
|
|
27
|
+
rent: number;
|
|
28
|
+
fees: FeeEstimate[];
|
|
29
|
+
feeTotal: number;
|
|
30
|
+
rentableItems: RentableItemSummary[];
|
|
31
|
+
rentableItemTotal: number;
|
|
32
|
+
};
|
|
33
|
+
export declare class FeeEstimate {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string | null;
|
|
36
|
+
amount: number;
|
|
37
|
+
frequency: string;
|
|
38
|
+
addOnType?: string;
|
|
39
|
+
applicable?: boolean;
|
|
40
|
+
required?: boolean;
|
|
41
|
+
adjustments?: FeeAdjustment[];
|
|
42
|
+
comment?: string;
|
|
43
|
+
constructor(data: FeeEstimate);
|
|
44
|
+
get displayAmount(): string;
|
|
45
|
+
get displayName(): string;
|
|
46
|
+
get isAddOn(): boolean;
|
|
47
|
+
}
|
|
48
|
+
declare type FeeAdjustment = {
|
|
49
|
+
reason: string;
|
|
50
|
+
amount: number;
|
|
51
|
+
};
|
|
52
|
+
export declare const calculateQuote: ({ buildingSlug, unitId, addons, rentableItems, leaseTerm, moveInDate, }: CalculateQuoteRequest) => Promise<CalculateQuoteResponse>;
|
|
53
|
+
export default calculateQuote;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BuildingFee } from "../../WebComponent/FeeCalculator/model/building-fee";
|
|
2
|
+
declare type BuildingFeeResponse = {
|
|
3
|
+
fees: BuildingFee[];
|
|
4
|
+
rentableItems: RentableItemSummary[];
|
|
5
|
+
};
|
|
6
|
+
export declare type RentFrequency = "monthly" | "annually";
|
|
7
|
+
declare type RentableItem = {
|
|
8
|
+
id: string;
|
|
9
|
+
description: string;
|
|
10
|
+
rent: number;
|
|
11
|
+
rentFrequency: RentFrequency;
|
|
12
|
+
available: boolean;
|
|
13
|
+
reservedUntil?: Date;
|
|
14
|
+
};
|
|
15
|
+
export declare type RentableItemSummary = {
|
|
16
|
+
description: string;
|
|
17
|
+
type: string;
|
|
18
|
+
minAvailableItem?: RentableItem;
|
|
19
|
+
maxAvailableItem?: RentableItem;
|
|
20
|
+
allItems: RentableItem[];
|
|
21
|
+
rent?: number;
|
|
22
|
+
};
|
|
23
|
+
declare const fetchBuildingFees: (buildingSlug: string) => Promise<BuildingFeeResponse>;
|
|
24
|
+
export default fetchBuildingFees;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare type Floorplan = {
|
|
2
|
+
unitId: number;
|
|
3
|
+
name: string;
|
|
4
|
+
bedrooms: number;
|
|
5
|
+
bathrooms: number;
|
|
6
|
+
numAvailable: number;
|
|
7
|
+
startingPrice: number;
|
|
8
|
+
maxPrice: number;
|
|
9
|
+
earliestAvailable: string;
|
|
10
|
+
latestAvailable: string;
|
|
11
|
+
squareFeet: number;
|
|
12
|
+
url: string | null;
|
|
13
|
+
};
|
|
14
|
+
declare type FetchFloorplansParams = {
|
|
15
|
+
buildingSlug: string;
|
|
16
|
+
numBedrooms?: number;
|
|
17
|
+
moveInDateEarliest?: Date;
|
|
18
|
+
moveInDateLatest?: Date;
|
|
19
|
+
};
|
|
20
|
+
declare const fetchBuildingFloorplans: ({ buildingSlug, numBedrooms, moveInDateEarliest, moveInDateLatest, }: FetchFloorplansParams) => Promise<Floorplan[]>;
|
|
21
|
+
export default fetchBuildingFloorplans;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const layoutToBedrooms: (layout: number) => number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const defaultPrimaryColor = "#646987";
|
|
2
|
+
export declare const defaultBackgroundColor = "#ffffff";
|
|
3
|
+
export declare const tintColor: (originalColor: string, tintOpacity: number) => string;
|
|
4
|
+
export declare const hexToAlmostWhite: (hexColor: string, ratio: number) => string;
|
|
5
|
+
export declare const shouldUsePrimaryColorForChatFooter: (orgId: number, buildingId: number) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Redeclare enum from rest-sdk to avoid pulling in entire module.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum TourAvailabilityResponseRankOrderedSupportedTourTypesEnum {
|
|
5
|
+
Unknown = "UNKNOWN",
|
|
6
|
+
SelfGuided = "SELF_GUIDED",
|
|
7
|
+
VirtualShowing = "VIRTUAL_SHOWING",
|
|
8
|
+
WithAgent = "WITH_AGENT",
|
|
9
|
+
MediaTour = "MEDIA_TOUR"
|
|
10
|
+
}
|
|
11
|
+
export type { TourAvailabilityResponse } from "@meetelise/rest-sdk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type WebchatNoShowReason = "building_does_not_exist" | "building_not_launched" | "building_not_active" | "building_in_maintenance_mode" | "building_not_webchat_scope_configured";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const camelize: <T>(snakeCasedObject: Record<string, unknown>, keysToExclude?: (string | number | symbol)[]) => T;
|
|
2
|
+
export declare const snakify: <T>(snakeCasedObject: Record<string, unknown>, keysToExclude?: (string | number | symbol)[]) => T;
|
|
3
|
+
export declare const isMobile: () => boolean;
|
|
4
|
+
export declare const isTimestampExpired: (timestamp: Date, ttlHours: number) => boolean;
|
|
5
|
+
export declare const getCookieValue: (name: string) => string | null;
|
|
6
|
+
export declare const isValidPhoneNumber: (phoneNumber: string) => boolean;
|
|
7
|
+
export declare const isContainingEmail: (message: string) => boolean;
|
|
8
|
+
/**
|
|
9
|
+
* FooBarBizzBazz -> Foo Bar Bizz Bazz
|
|
10
|
+
*/
|
|
11
|
+
export declare const sentenceTitleCase: (str: string) => string;
|
|
12
|
+
export declare const formatCurrency: (amount: number, maximumFractionDigits?: number) => string;
|
|
13
|
+
export declare const isTestEnv: () => boolean;
|
package/package.json
CHANGED
package/public/dist/index.js
CHANGED
|
@@ -3071,7 +3071,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3071
3071
|
justify-content: center;
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
|
-
`;class io{constructor(e={}){var t,i,n,o,r,a,s,l,u,c,d,h,p,f;this.id=null!==(t=e.id)&&void 0!==t?t:0,this.buildingId=null!==(i=e.buildingId)&&void 0!==i?i:0,this.blueprint=null!==(n=e.blueprint)&&void 0!==n?n:{},this.unitIds=null!==(o=e.unitIds)&&void 0!==o?o:null,this.layoutIds=null!==(r=e.layoutIds)&&void 0!==r?r:null,this.startDate=null!==(a=e.startDate)&&void 0!==a?a:null,this.endDate=null!==(s=e.endDate)&&void 0!==s?s:null,this.source=null!==(l=e.source)&&void 0!==l?l:null,this.timeCreated=null!==(u=e.timeCreated)&&void 0!==u?u:new Date,this.externalKey=null!==(c=e.externalKey)&&void 0!==c?c:null,this.syncActive=null!==(d=e.syncActive)&&void 0!==d&&d,this.hiddenReason=null!==(h=e.hiddenReason)&&void 0!==h?h:null,this.refundable=null!==(p=e.refundable)&&void 0!==p?p:null,this.required=null!==(f=e.required)&&void 0!==f&&f}get isAddOn(){return null!==this.blueprint.addOnInfo}displayName(e="Fee"){
|
|
3074
|
+
`;class io{constructor(e={}){var t,i,n,o,r,a,s,l,u,c,d,h,p,f;this.id=null!==(t=e.id)&&void 0!==t?t:0,this.buildingId=null!==(i=e.buildingId)&&void 0!==i?i:0,this.blueprint=null!==(n=e.blueprint)&&void 0!==n?n:{},this.unitIds=null!==(o=e.unitIds)&&void 0!==o?o:null,this.layoutIds=null!==(r=e.layoutIds)&&void 0!==r?r:null,this.startDate=null!==(a=e.startDate)&&void 0!==a?a:null,this.endDate=null!==(s=e.endDate)&&void 0!==s?s:null,this.source=null!==(l=e.source)&&void 0!==l?l:null,this.timeCreated=null!==(u=e.timeCreated)&&void 0!==u?u:new Date,this.externalKey=null!==(c=e.externalKey)&&void 0!==c?c:null,this.syncActive=null!==(d=e.syncActive)&&void 0!==d&&d,this.hiddenReason=null!==(h=e.hiddenReason)&&void 0!==h?h:null,this.refundable=null!==(p=e.refundable)&&void 0!==p?p:null,this.required=null!==(f=e.required)&&void 0!==f&&f}get isAddOn(){return null!==this.blueprint.addOnInfo}displayName(e="Fee"){var t;return this.isAddOn&&(null===(t=this.blueprint.addOnInfo)||void 0===t?void 0:t.addOnType)?yi(this.blueprint.addOnInfo.addOnType):this.blueprint.category?yi(this.blueprint.category):e}get description(){return this.blueprint.transactionDescription||""}get displayAmount(){const e=this.blueprint.transactionAmount;return wi(null!=e?e:0)}}var no,oo,ro;!function(e){e.OneTime="OneTime",e.Daily="Daily",e.Weekly="Weekly",e.BiWeekly="BiWeekly",e.Monthly="Monthly",e.Yearly="Yearly",e.Unknown="Unknown"}(no||(no={})),function(e){e.Debit="Debit",e.Credit="Credit"}(oo||(oo={})),function(e){e.Fixed="Fixed",e.UsageBased="UsageBased",e.Varies="Varies"}(ro||(ro={}));const ao=e=>new io(e),so=async e=>{try{const i=await t().get(`${hi}/platformApi/webchat/${e}/fees`);if(i.data){const e=pi(i.data);return{fees:e.fees.map(ao),rentableItems:e.rentableItems}}}catch(t){vn({logType:bn.error,buildingSlug:e,logTitle:"[ERROR_GETTING_FEES]",logData:{error:t}})}return{fees:[],rentableItems:[]}},lo=-1;class uo{constructor(e){this.name=e.name,this.description=e.description,this.amount=e.amount,this.frequency=e.frequency,this.addOnType=e.addOnType,this.applicable=e.applicable,this.required=e.required,this.adjustments=e.adjustments,this.comment=e.comment}get displayAmount(){return wi(this.amount)}get displayName(){return yi(this.name)}get isAddOn(){return!!this.addOnType}}const co=e=>new uo(e);var ho=i(3279),po=i.n(ho);const fo=(e="black")=>R`<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 15 15" fill="none">
|
|
3075
3075
|
<line x1="1.70782" y1="13.2254" x2="13.2376" y2="1.69554" stroke="${e}" stroke-width="2.13401"/>
|
|
3076
3076
|
<path d="M2.00929 1.99996L13.3328 13.3421" stroke="${e}" stroke-width="2.13401"/>
|
|
3077
3077
|
</svg>`,go=l`
|
|
@@ -3701,7 +3701,6 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3701
3701
|
flex: 0 0 300px;
|
|
3702
3702
|
display: flex;
|
|
3703
3703
|
margin-left: 20px;
|
|
3704
|
-
background-color: white;
|
|
3705
3704
|
flex-direction: column;
|
|
3706
3705
|
max-width: 50%;
|
|
3707
3706
|
gap: 20px;
|
|
@@ -3807,7 +3806,7 @@ xmlns="http://www.w3.org/2000/svg"
|
|
|
3807
3806
|
min-height: 100px;
|
|
3808
3807
|
}
|
|
3809
3808
|
}
|
|
3810
|
-
`;var Lo=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let Ro=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.isLoading=!1,this.selectedUnitId=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[lo],this.groupedFees={[no.OneTime]:[],[no.Daily]:[],[no.Weekly]:[],[no.BiWeekly]:[],[no.Monthly]:[],[no.Yearly]:[],[no.Unknown]:[]},this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.onAddonSelect=null}get standardFees(){const e={};return Object.entries(this.groupedFees).forEach((([t,i])=>{e[t]=i.filter((e=>!e.isAddOn))})),e}get addOns(){return Object.values(this.groupedFees).flat().filter((e=>e.isAddOn))}renderRecurrenceFeeSection(e,t){return(null==t?void 0:t.length)?L` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t,i;const n=[],o=[{freq:no.Yearly,title:"Yearly Charges"},{freq:no.Monthly,title:"Monthly Charges"},{freq:no.BiWeekly,title:"Bi-Weekly Charges"},{freq:no.Weekly,title:"Weekly Charges"},{freq:no.Daily,title:"Daily Charges"},{freq:no.Unknown,title:"Other Charges"},{freq:no.OneTime,title:"Prior to Move-In"}],r=null!==(i=null===(t=null===(e=this.quote)||void 0===e?void 0:e.units.find((e=>e.unitId===this.selectedUnitId)))||void 0===t?void 0:t.fees)&&void 0!==i?i:[];for(const{freq:e,title:t}of o){if(!r.length)continue;const i=r.filter((t=>t.frequency===e)),o=this.renderRecurrenceFeeSection(t,i);o&&n.push(o)}return n}renderFeesContent(){return this.selectedUnitId?L`
|
|
3809
|
+
`;var Lo=function(e,t,i,n){var o,r=arguments.length,a=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};let Ro=class extends oe{constructor(){super(...arguments),this.buildingSlug="",this.isLoading=!1,this.selectedUnitId=null,this.quote=null,this.layoutOptions=[],this.selectedLayoutIds=[lo],this.groupedFees={[no.OneTime]:[],[no.Daily]:[],[no.Weekly]:[],[no.BiWeekly]:[],[no.Monthly]:[],[no.Yearly]:[],[no.Unknown]:[]},this.onSelectLayout=null,this.onUnitSelect=null,this.onMoveInDateChange=null,this.onLeaseTermChange=null,this.onAddonSelect=null}get standardFees(){const e={};return Object.entries(this.groupedFees).forEach((([t,i])=>{e[t]=i.filter((e=>!e.isAddOn))})),e}get addOns(){return Object.values(this.groupedFees).flat().filter((e=>{var t,i;if(!e.isAddOn)return!1;if(!this.quote)return!0;const n=null===(i=null===(t=this.quote)||void 0===t?void 0:t.units.find((e=>e.unitId===this.selectedUnitId)))||void 0===i?void 0:i.unitLayout;return!e.layoutIds||null==n||e.layoutIds.includes(n)}))}renderRecurrenceFeeSection(e,t){return(null==t?void 0:t.length)?L` <fee-card .fees=${t} title=${e}></fee-card> `:null}renderFeeSections(){var e,t,i;const n=[],o=[{freq:no.Yearly,title:"Yearly Charges"},{freq:no.Monthly,title:"Monthly Charges"},{freq:no.BiWeekly,title:"Bi-Weekly Charges"},{freq:no.Weekly,title:"Weekly Charges"},{freq:no.Daily,title:"Daily Charges"},{freq:no.Unknown,title:"Other Charges"},{freq:no.OneTime,title:"Prior to Move-In"}],r=(null!==(i=null===(t=null===(e=this.quote)||void 0===e?void 0:e.units.find((e=>e.unitId===this.selectedUnitId)))||void 0===t?void 0:t.fees)&&void 0!==i?i:[]).filter((e=>e.applicable));for(const{freq:e,title:t}of o){if(!r.length)continue;const i=r.filter((t=>t.frequency===e)),o=this.renderRecurrenceFeeSection(t,i);o&&n.push(o)}return n}renderFeesContent(){return this.selectedUnitId?L`
|
|
3811
3810
|
<div class="fees-container">
|
|
3812
3811
|
${this.isLoading?L`
|
|
3813
3812
|
<div class="loading-container">
|