yt-uikit 0.10.105 → 0.10.106
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.
|
@@ -8,6 +8,7 @@ import { GSTSectionCustomizationProps } from "./GSTSection";
|
|
|
8
8
|
import { BundlePayload } from "../BundleBlock/Bundle";
|
|
9
9
|
import { type FloatingCartDataProps } from "./FloatingCart";
|
|
10
10
|
import { trustedBadgeInterface } from "./CheckoutSection";
|
|
11
|
+
import type { ItemSwapData, ItemSwapProduct, ItemSwapRequest } from "./ItemSwap";
|
|
11
12
|
export interface Checkpoint {
|
|
12
13
|
couponTemplateId: number;
|
|
13
14
|
couponType: string;
|
|
@@ -269,6 +270,9 @@ export interface CartProps {
|
|
|
269
270
|
drawerLayoutData?: DrawerLayout;
|
|
270
271
|
cartConfigData?: cartConfigInterface;
|
|
271
272
|
uploadImageAddonData?: uploadImageAddonInterface;
|
|
273
|
+
itemSwapData?: ItemSwapData;
|
|
274
|
+
itemSwapProducts?: Record<string, ItemSwapProduct>;
|
|
275
|
+
swapCartItem?: (request: ItemSwapRequest) => Promise<void>;
|
|
272
276
|
}
|
|
273
277
|
declare const _default: React.NamedExoticComponent<CartProps>;
|
|
274
278
|
export default _default;
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { Checkpoint } from "./Cart";
|
|
3
3
|
import type { cartConfigInterface } from "./CartDrawer";
|
|
4
4
|
import { freebieMilestoneProps } from "./NextFreebieRow";
|
|
5
|
+
import { type ItemSwapData, type ItemSwapProduct, type ItemSwapRequest } from "./ItemSwap";
|
|
5
6
|
type CartProductsListProps = {
|
|
6
7
|
addCartItem?: (product: any, quantity?: number, triggeredFrom?: string) => Promise<any>;
|
|
7
8
|
removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
|
|
@@ -47,6 +48,9 @@ type CartProductsListProps = {
|
|
|
47
48
|
customCartProgressBarCriteria?: string;
|
|
48
49
|
effectiveQuantityForProgressBar?: number;
|
|
49
50
|
isLargeScreen?: boolean;
|
|
51
|
+
itemSwapData?: ItemSwapData;
|
|
52
|
+
itemSwapProducts?: Record<string, ItemSwapProduct>;
|
|
53
|
+
swapCartItem?: (request: ItemSwapRequest) => Promise<void>;
|
|
50
54
|
};
|
|
51
55
|
declare const CartProductsList: React.FC<CartProductsListProps>;
|
|
52
56
|
export default CartProductsList;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ItemSwapRule {
|
|
3
|
+
targetProductId: string;
|
|
4
|
+
swapVariantId: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ItemSwapData {
|
|
7
|
+
enableItemSwap: boolean;
|
|
8
|
+
itemSwaps: ItemSwapRule[];
|
|
9
|
+
}
|
|
10
|
+
export interface ItemSwapProduct {
|
|
11
|
+
productTitle: string;
|
|
12
|
+
variantTitle?: string;
|
|
13
|
+
imageUrl?: string;
|
|
14
|
+
price: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ItemSwapRequest {
|
|
17
|
+
lineItemKey: string;
|
|
18
|
+
swapVariantId: string;
|
|
19
|
+
}
|
|
20
|
+
type ItemSwapProps = {
|
|
21
|
+
product: any;
|
|
22
|
+
swapVariantId: string;
|
|
23
|
+
swapProduct: ItemSwapProduct;
|
|
24
|
+
onSwap: (request: ItemSwapRequest) => Promise<void>;
|
|
25
|
+
currency: string;
|
|
26
|
+
currencySymbol: string;
|
|
27
|
+
primaryTextColor?: string;
|
|
28
|
+
secondaryTextColor?: string;
|
|
29
|
+
themeColor?: string;
|
|
30
|
+
themeTextColor?: string;
|
|
31
|
+
backgroundSubdued?: string;
|
|
32
|
+
tertiaryTextColor?: string;
|
|
33
|
+
cartComponentsCornerType?: "rounded" | "sharp";
|
|
34
|
+
cartComponentsCornerRadius?: number;
|
|
35
|
+
};
|
|
36
|
+
declare const ItemSwap: React.FC<ItemSwapProps>;
|
|
37
|
+
export default ItemSwap;
|