@meetelise/chat 1.38.1 → 1.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector.d.ts +0 -1
  2. package/dist/src/WebComponent/FeeCalculator/components/addons/index.d.ts +0 -2
  3. package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +6 -8
  4. package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +4 -6
  5. package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +2 -3
  6. package/dist/src/WebComponent/FeeCalculator/components/index.d.ts +0 -1
  7. package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +2 -2
  8. package/dist/src/WebComponent/FeeCalculator/model/amount-range.d.ts +5 -0
  9. package/dist/src/WebComponent/FeeCalculator/model/fee-quote.d.ts +8 -0
  10. package/dist/src/WebComponent/FeeCalculator/model/pricing-matrix.d.ts +0 -1
  11. package/dist/src/WebComponent/FeeCalculator/model/pricing-metadata.d.ts +11 -0
  12. package/dist/src/WebComponent/FeeCalculator/model/pricing-rule.d.ts +2 -0
  13. package/dist/src/WebComponent/FeeCalculator/model/pricing-type.d.ts +10 -0
  14. package/dist/src/WebComponent/FeeCalculator/model/quote.d.ts +17 -0
  15. package/dist/src/WebComponent/FeeCalculator/model/source-fee.d.ts +38 -0
  16. package/dist/src/services/fees/calculateQuote.d.ts +3 -2
  17. package/package.json +1 -1
  18. package/public/dist/index.js +474 -735
  19. package/src/WebComponent/FeeCalculator/components/addons/addon-table/addon-table.ts +26 -29
  20. package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-matrix-qty-selector.ts +1 -4
  21. package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.ts +1 -1
  22. package/src/WebComponent/FeeCalculator/components/addons/index.ts +0 -2
  23. package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +48 -35
  24. package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +12 -17
  25. package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +13 -9
  26. package/src/WebComponent/FeeCalculator/components/index.ts +0 -1
  27. package/src/WebComponent/FeeCalculator/fee-calculator-styles.ts +1 -1
  28. package/src/WebComponent/FeeCalculator/fee-calculator.ts +25 -11
  29. package/src/WebComponent/FeeCalculator/model/amount-range.ts +5 -0
  30. package/src/WebComponent/FeeCalculator/model/building-fee-view.ts +21 -2
  31. package/src/WebComponent/FeeCalculator/model/fee-quote.ts +9 -0
  32. package/src/WebComponent/FeeCalculator/model/pricing-matrix.ts +1 -4
  33. package/src/WebComponent/FeeCalculator/model/pricing-metadata.ts +12 -0
  34. package/src/WebComponent/FeeCalculator/model/pricing-rule.ts +2 -0
  35. package/src/WebComponent/FeeCalculator/model/pricing-type.ts +11 -0
  36. package/src/WebComponent/FeeCalculator/model/quote.ts +18 -0
  37. package/src/WebComponent/FeeCalculator/model/source-fee.ts +40 -0
  38. package/src/services/fees/calculateQuote.ts +5 -14
  39. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.d.ts +0 -2
  40. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.d.ts +0 -30
  41. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.d.ts +0 -2
  42. package/dist/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.d.ts +0 -20
  43. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector-styles.ts +0 -39
  44. package/src/WebComponent/FeeCalculator/components/addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector.ts +0 -224
  45. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector-styles.ts +0 -6
  46. package/src/WebComponent/FeeCalculator/components/addons/addon-item-qty-selector/addon-item-qty-selector.ts +0 -120
@@ -2,7 +2,6 @@ import { LitElement, TemplateResult } from "lit";
2
2
  import { BuildingFeeView, DesiredAddon } from "../../../model";
3
3
  export declare class TableMatrixQtySelector extends LitElement {
4
4
  static styles: import("lit").CSSResult;
5
- private _previousFeeItemId;
6
5
  set feeItem(value: BuildingFeeView | null);
7
6
  get feeItem(): BuildingFeeView | null;
8
7
  private _feeItem;
@@ -1,4 +1,2 @@
1
- export * from "./addon-item-qty-selector/addon-item-qty-selector";
2
- export * from "./addon-item-matrix-qty-selector/addon-item-matrix-qty-selector";
3
1
  export * from "./rentable-item-qty-selector/rentable-item-qty-selector";
4
2
  export * from "./addon-table/addon-table";
@@ -1,14 +1,12 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
2
  import { LayoutOption } from "../../../../fetchBuildingWebchatView";
3
- import { DesiredAddon, DesiredRentableItem, FeeEstimate } from "../../model";
4
- import { CalculateQuoteResponse } from "../../../../services/fees/calculateQuote";
3
+ import { DesiredAddon, DesiredRentableItem } from "../../model";
5
4
  import { Unit } from "../../../../services/fees/fetchBuildingUnits";
6
5
  import { BuildingFeeView, BuildingFeeFrequency, RentableItemSummary } from "../../model";
6
+ import { Quote } from "../../model/quote";
7
+ import { FeeQuote } from "../../model/fee-quote";
7
8
  import "../floor-plan-selector/floor-plan-selector";
8
9
  import "../fee-card/fee-card";
9
- import "../addons/addon-item-qty-selector/addon-item-qty-selector";
10
- import "../addons/rentable-item-qty-selector/rentable-item-qty-selector";
11
- import "../addons/addon-item-matrix-qty-selector/addon-item-matrix-qty-selector";
12
10
  import "../addons/addon-table/addon-table";
13
11
  import "../../../loaders/skeleton-loader";
14
12
  import "../../../loaders/mega-loader";
@@ -17,7 +15,7 @@ export declare class FeeCalculatorLayout extends LitElement {
17
15
  buildingSlug: string;
18
16
  showSkeletonLoader: boolean;
19
17
  selectedUnit: Unit | null;
20
- quote: CalculateQuoteResponse | null;
18
+ quote: Quote | null;
21
19
  layoutOptions: LayoutOption[];
22
20
  selectedLayoutIds: number[];
23
21
  groupedFees: Record<BuildingFeeFrequency, BuildingFeeView[]>;
@@ -28,12 +26,12 @@ export declare class FeeCalculatorLayout extends LitElement {
28
26
  onLeaseTermChange: ((leaseTerm: number) => void) | null;
29
27
  onAddonSelect: ((addon: DesiredAddon) => void) | null;
30
28
  onRentableItemSelect: ((rentableItem: DesiredRentableItem) => void) | null;
31
- get standardFees(): Record<BuildingFeeFrequency, BuildingFeeView[]>;
32
29
  /**
33
30
  * A "rentable item" is simply a fee which has inventory attached to it.
34
31
  */
35
32
  get addOns(): (BuildingFeeView | RentableItemSummary)[];
36
- renderRecurrenceFeeSection(title: string, fees: FeeEstimate[]): TemplateResult | null;
33
+ get rentAsFeeQuote(): FeeQuote | null;
34
+ renderRecurringFeeSection(title: string, fees: FeeQuote[]): TemplateResult | null;
37
35
  renderFeeSections(): TemplateResult[];
38
36
  renderFeesContent(): TemplateResult;
39
37
  renderAddOns(): TemplateResult | null;
@@ -1,16 +1,14 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
- import { FeeEstimate } from "../../model";
2
+ import { FeeQuote } from "../../model/fee-quote";
3
3
  import "../fee-item/fee-item";
4
4
  export declare class FeeCard extends LitElement {
5
5
  static styles: import("lit").CSSResult;
6
6
  title: string;
7
- fees: FeeEstimate[];
8
- rent: number;
9
- quoteTotal: number;
7
+ fees: FeeQuote[];
10
8
  private buildingFeesToQuantity;
11
9
  get totalAmount(): string;
12
- get standardFees(): FeeEstimate[];
13
- get addons(): FeeEstimate[];
10
+ get standardFees(): FeeQuote[];
11
+ get addons(): FeeQuote[];
14
12
  handleQuantityChange: (feeId: number, quantity: number) => void;
15
13
  render(): TemplateResult;
16
14
  }
@@ -1,9 +1,8 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
- import { FeeEstimate } from "../../model";
3
- import "../addons/addon-item-qty-selector/addon-item-qty-selector";
2
+ import { FeeQuote } from "../../model/fee-quote";
4
3
  export declare class FeeItemComponent extends LitElement {
5
4
  static styles: import("lit").CSSResult;
6
- feeItem: FeeEstimate | null;
5
+ feeQuote: FeeQuote | null;
7
6
  render(): TemplateResult;
8
7
  }
9
8
  declare global {
@@ -1,6 +1,5 @@
1
1
  export * from "./promo-card/promo-card";
2
2
  export * from "./floor-plan-selector/floor-plan-selector";
3
3
  export * from "./fee-card/fee-card";
4
- export * from "./addons/addon-item-qty-selector/addon-item-qty-selector";
5
4
  export * from "./fee-calculator-layout/fee-calculator-layout";
6
5
  export * from "./addons/addon-table/addon-table";
@@ -1,6 +1,6 @@
1
1
  import { LitElement, TemplateResult } from "lit";
2
2
  import { LayoutOption } from "../../fetchBuildingWebchatView";
3
- import { CalculateQuoteResponse } from "../../services/fees/calculateQuote";
3
+ import { Quote } from "./model/quote";
4
4
  import { Unit } from "../../services/fees/fetchBuildingUnits";
5
5
  import { BuildingFeeFrequency, BuildingFeeView } from "./model/building-fee-view";
6
6
  import { DesiredAddon } from "./model/desired-addon";
@@ -32,7 +32,7 @@ export declare class FeeCalculator extends LitElement {
32
32
  private moveInDate;
33
33
  private buildingWebchatView;
34
34
  private incentives;
35
- quote: CalculateQuoteResponse | null;
35
+ quote: Quote | null;
36
36
  private groupedFees;
37
37
  private rentableItems;
38
38
  private quoteAbortController;
@@ -0,0 +1,5 @@
1
+ export interface AmountRange {
2
+ fixedValue: number | null;
3
+ minValue: number | null;
4
+ maxValue: number | null;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { SourceFee } from "./source-fee";
2
+ import { AmountRange } from "./amount-range";
3
+ import { ItemCombination } from "./item-combination";
4
+ export interface FeeQuote {
5
+ sourceFee: SourceFee;
6
+ amountRange: AmountRange;
7
+ itemCombination: ItemCombination;
8
+ }
@@ -2,7 +2,6 @@ import { ItemCombination } from "./item-combination";
2
2
  import { PricingRule } from "./pricing-rule";
3
3
  export declare class PricingMatrix {
4
4
  private rules;
5
- pricingRules: PricingRule[];
6
5
  constructor(data?: {
7
6
  pricingRules?: PricingRule[];
8
7
  });
@@ -0,0 +1,11 @@
1
+ import PricingType from "./pricing-type";
2
+ export interface PricingMetadata {
3
+ pricingCategory: "MANDATORY" | "SITUATIONAL";
4
+ pricingType: PricingType;
5
+ unitLabel: string | null;
6
+ minimumAmount: number | null;
7
+ maximumAmount: number | null;
8
+ percentRent: number | null;
9
+ percentRentMax: number | null;
10
+ percentRentMin: number | null;
11
+ }
@@ -3,6 +3,8 @@ export interface PricingRule {
3
3
  combination: ItemCombination;
4
4
  price?: number;
5
5
  percentRent?: number;
6
+ percentRentMin?: number;
7
+ percentRentMax?: number;
6
8
  minimumPrice?: number;
7
9
  maximumPrice?: number;
8
10
  }
@@ -0,0 +1,10 @@
1
+ declare enum PricingType {
2
+ FIXED = "FIXED",
3
+ USAGE_BASED = "USAGE_BASED",
4
+ PERCENT_RENT = "PERCENT_RENT",
5
+ PER_ITEM = "PER_ITEM",
6
+ CUSTOM = "CUSTOM",
7
+ FIXED_MAX_PERCENT_RENT = "FIXED_MAX_PERCENT_RENT",
8
+ FIXED_MIN_PERCENT_RENT = "FIXED_MIN_PERCENT_RENT"
9
+ }
10
+ export default PricingType;
@@ -0,0 +1,17 @@
1
+ import { FeeQuote } from "./fee-quote";
2
+ import { AmountRange } from "./amount-range";
3
+ import { IncentiveV2 } from "../../../types/incentive-v2";
4
+ export interface Quote {
5
+ unitId: number;
6
+ unitNumber: string;
7
+ unitLayout: number;
8
+ unitFloorplanName: string;
9
+ feeQuotes: FeeQuote[];
10
+ totalCost: AmountRange;
11
+ rentCost: number;
12
+ feeCost: AmountRange;
13
+ applicationLink: string;
14
+ specials: IncentiveV2[];
15
+ addendum: string | null;
16
+ floorplanLink: string | null;
17
+ }
@@ -0,0 +1,38 @@
1
+ import { PricingMatrix } from "./pricing-matrix";
2
+ import { PricingMetadata } from "./pricing-metadata";
3
+ export interface SourceFee {
4
+ id: number;
5
+ buildingId: number;
6
+ name: string;
7
+ description: string | null;
8
+ category: string;
9
+ frequency: FeeFrequency;
10
+ unitIds: number[] | null;
11
+ layoutIds: number[] | null;
12
+ startDate: string | null;
13
+ endDate: string | null;
14
+ source: string;
15
+ timeCreated: string | null;
16
+ externalKey: string | null;
17
+ syncActive: boolean;
18
+ hiddenReason: string | null;
19
+ refundable: boolean;
20
+ bundleKey: string | null;
21
+ pricingMatrix: PricingMatrix;
22
+ pricingMetadata: PricingMetadata;
23
+ publicFacing: boolean;
24
+ chargeCode: string | null;
25
+ prorated: boolean | null;
26
+ nlpPricing: unknown | null;
27
+ additionalInfo: string | null;
28
+ nlpSource: unknown | null;
29
+ }
30
+ export declare enum FeeFrequency {
31
+ NEVER = "NEVER",
32
+ ONE_TIME = "ONE_TIME",
33
+ MONTHLY = "MONTHLY",
34
+ WEEKLY = "WEEKLY",
35
+ BI_WEEKLY = "BI_WEEKLY",
36
+ ANNUALLY = "ANNUALLY",
37
+ DAILY = "DAILY"
38
+ }
@@ -1,4 +1,5 @@
1
- import { DesiredAddon, DesiredRentableItem, UnitFeeBundle } from "../../WebComponent/FeeCalculator/model";
1
+ import { DesiredAddon, DesiredRentableItem } from "../../WebComponent/FeeCalculator/model";
2
+ import { Quote } from "../../WebComponent/FeeCalculator/model/quote";
2
3
  declare type CalculateQuoteRequest = {
3
4
  buildingSlug: string;
4
5
  unitId: number;
@@ -8,7 +9,7 @@ declare type CalculateQuoteRequest = {
8
9
  moveInDate: string;
9
10
  };
10
11
  export declare type CalculateQuoteResponse = {
11
- units: UnitFeeBundle[];
12
+ quote: Quote;
12
13
  };
13
14
  export declare const calculateQuote: ({ buildingSlug, unitId, addons, rentableItems, leaseTerm, moveInDate, }: CalculateQuoteRequest, signal?: AbortSignal) => Promise<CalculateQuoteResponse>;
14
15
  export default calculateQuote;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.38.1",
3
+ "version": "1.39.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",