@meetelise/chat 1.42.4 → 1.43.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.
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/addon-table.d.ts +6 -1
- package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/components/addons/index.d.ts +0 -1
- package/dist/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.d.ts +2 -1
- package/dist/src/WebComponent/FeeCalculator/components/fee-card/fee-card.d.ts +3 -2
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/fee-item.d.ts +1 -1
- package/dist/src/WebComponent/FeeCalculator/components/fee-item/grouped-rentable-item.d.ts +23 -0
- package/dist/src/WebComponent/FeeCalculator/fee-calculator.d.ts +2 -1
- package/dist/src/WebComponent/FeeCalculator/model/rentable-item.d.ts +1 -0
- package/dist/src/WebComponent/FeeCalculator/utils/rentable-item-utils.d.ts +19 -0
- package/package.json +1 -1
- package/public/dist/index.js +244 -236
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/addon-table.ts +132 -36
- package/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.ts +18 -17
- package/src/WebComponent/FeeCalculator/components/addons/index.ts +0 -1
- package/src/WebComponent/FeeCalculator/components/fee-calculator-layout/fee-calculator-layout.ts +8 -3
- package/src/WebComponent/FeeCalculator/components/fee-card/fee-card.ts +32 -18
- package/src/WebComponent/FeeCalculator/components/fee-item/fee-item.ts +14 -8
- package/src/WebComponent/FeeCalculator/components/fee-item/grouped-rentable-item.ts +105 -0
- package/src/WebComponent/FeeCalculator/fee-calculator.ts +10 -7
- package/src/WebComponent/FeeCalculator/model/rentable-item-summary.ts +1 -2
- package/src/WebComponent/FeeCalculator/model/rentable-item.ts +2 -0
- package/src/WebComponent/FeeCalculator/utils/rentable-item-utils.ts +61 -0
- 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 -25
- 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 -156
|
@@ -10,8 +10,13 @@ export declare class AddonTable extends LitElement {
|
|
|
10
10
|
private _addons;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
onAddonSelect: ((addon: DesiredAddon) => void) | null;
|
|
13
|
-
|
|
13
|
+
onRentableItemAdd: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
14
|
+
onRentableItemRemove: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
14
15
|
private quantities;
|
|
16
|
+
private selectedRentableItemIds;
|
|
17
|
+
private preserveExistingQuantity;
|
|
18
|
+
private initializeRentableItemQuantity;
|
|
19
|
+
private initializeBuildingFeeQuantity;
|
|
15
20
|
private initializeQuantities;
|
|
16
21
|
private handleAddonQuantityChange;
|
|
17
22
|
private handleRentableItemQuantityChange;
|
package/dist/src/WebComponent/FeeCalculator/components/addons/addon-table/table-qty-selectors.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare class TableRentableItemQtySelector extends LitElement {
|
|
|
26
26
|
quantity: number;
|
|
27
27
|
selectedItemIds: Set<string>;
|
|
28
28
|
get totalAvailableItems(): number;
|
|
29
|
+
get maxSelectableItems(): number;
|
|
29
30
|
get atMaxUnits(): boolean;
|
|
30
31
|
get atMinUnits(): boolean;
|
|
31
32
|
updated(changedProps: Map<string, unknown>): void;
|
|
@@ -27,7 +27,8 @@ export declare class FeeCalculatorLayout extends LitElement {
|
|
|
27
27
|
onMoveInDateChange: ((dateString: string) => void) | null;
|
|
28
28
|
onLeaseTermChange: ((leaseTerm: number) => void) | null;
|
|
29
29
|
onAddonSelect: ((addon: DesiredAddon) => void) | null;
|
|
30
|
-
|
|
30
|
+
onRentableItemAdd: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
31
|
+
onRentableItemRemove: ((rentableItem: DesiredRentableItem) => void) | null;
|
|
31
32
|
/**
|
|
32
33
|
* A "rentable item" is simply a fee which has inventory attached to it.
|
|
33
34
|
*/
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { LitElement, TemplateResult } from "lit";
|
|
2
2
|
import { FeeQuote } from "../../model/fee-quote";
|
|
3
3
|
import "../fee-item/fee-item";
|
|
4
|
+
import "../fee-item/grouped-rentable-item";
|
|
4
5
|
export declare class FeeCard extends LitElement {
|
|
5
6
|
static styles: import("lit").CSSResult;
|
|
6
7
|
title: string;
|
|
7
8
|
fees: FeeQuote[];
|
|
8
9
|
private buildingFeesToQuantity;
|
|
9
10
|
get totalAmount(): string;
|
|
10
|
-
get
|
|
11
|
-
get
|
|
11
|
+
get groupedRentableItems(): Record<string, FeeQuote[]>;
|
|
12
|
+
get nonRentableItems(): FeeQuote[];
|
|
12
13
|
handleQuantityChange: (feeId: number, quantity: number) => void;
|
|
13
14
|
render(): TemplateResult;
|
|
14
15
|
}
|
|
@@ -4,8 +4,8 @@ export declare class FeeItemComponent extends LitElement {
|
|
|
4
4
|
static styles: import("lit").CSSResult;
|
|
5
5
|
feeQuote: FeeQuote | null;
|
|
6
6
|
get name(): string;
|
|
7
|
-
get isRequired(): boolean;
|
|
8
7
|
get description(): string;
|
|
8
|
+
get isRequired(): boolean;
|
|
9
9
|
get amount(): string | null;
|
|
10
10
|
render(): TemplateResult;
|
|
11
11
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement, TemplateResult } from "lit";
|
|
2
|
+
import { FeeQuote } from "../../model/fee-quote";
|
|
3
|
+
interface PriceGroup {
|
|
4
|
+
price: number;
|
|
5
|
+
count: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class GroupedRentableItemComponent extends LitElement {
|
|
8
|
+
static styles: import("lit").CSSResult;
|
|
9
|
+
feeQuotes: FeeQuote[];
|
|
10
|
+
get itemType(): string;
|
|
11
|
+
get priceGroups(): PriceGroup[];
|
|
12
|
+
get totalAmount(): string;
|
|
13
|
+
get isRequired(): boolean;
|
|
14
|
+
get priceBreakdown(): string;
|
|
15
|
+
private getUnitName;
|
|
16
|
+
render(): TemplateResult;
|
|
17
|
+
}
|
|
18
|
+
declare global {
|
|
19
|
+
interface HTMLElementTagNameMap {
|
|
20
|
+
"grouped-rentable-item": GroupedRentableItemComponent;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -60,7 +60,8 @@ export declare class FeeCalculator extends LitElement {
|
|
|
60
60
|
handleMoveInDateChange: (dateString: string) => Promise<void>;
|
|
61
61
|
handleLeaseTermChange: (leaseTerm: number) => Promise<void>;
|
|
62
62
|
handleAddonSelect: (addon: DesiredAddon) => void;
|
|
63
|
-
|
|
63
|
+
handleRentableItemAdd: (rentableItem: DesiredRentableItem) => void;
|
|
64
|
+
handleRentableItemRemove: (rentableItem: DesiredRentableItem) => void;
|
|
64
65
|
groupFees: (fees: BuildingFeeView[]) => Record<BuildingFeeFrequency, BuildingFeeView[]>;
|
|
65
66
|
handleClickEmailOption: (e: MouseEvent) => void;
|
|
66
67
|
handleClickPhoneOption: (e: MouseEvent) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RentableItem } from "../model/rentable-item";
|
|
2
|
+
/**
|
|
3
|
+
* Sorts rentable items by price (cheapest first), then by ID for consistency.
|
|
4
|
+
* This ensures deterministic selection of items when prices are equal.
|
|
5
|
+
*/
|
|
6
|
+
export declare function sortRentableItemsByPrice(items: RentableItem[]): RentableItem[];
|
|
7
|
+
/**
|
|
8
|
+
* Sorts rentable items by price (most expensive first), then by ID for consistency.
|
|
9
|
+
* Used when removing items to keep the cheapest ones.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sortRentableItemsByPriceDesc(items: RentableItem[]): RentableItem[];
|
|
12
|
+
/**
|
|
13
|
+
* Gets the appropriate unit name for display based on the item description.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getUnitNameFromDescription(description: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Simple pluralization helper for unit names.
|
|
18
|
+
*/
|
|
19
|
+
export declare function pluralize(word: string, count: number): string;
|