yt-uikit 0.7.4123 → 0.8.1-collection-bundle-updates.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/esm/components/BundleBlock/Bundle.d.ts +6 -1
- package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +2 -3
- package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +0 -1
- package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +0 -1
- package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +8 -3
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +1 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -0
- package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +32 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/index.js +439 -439
- package/dist/esm/types/components/BundleBlock/Bundle.d.ts +6 -1
- package/dist/esm/types/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +2 -3
- package/dist/esm/types/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +0 -1
- package/dist/esm/types/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +0 -1
- package/dist/esm/types/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +8 -3
- package/dist/esm/types/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +1 -0
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -0
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersList.d.ts +12 -0
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -0
- package/dist/esm/types/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -0
- package/dist/esm/types/components/ProductOffersBlock/ProductsOffers.d.ts +32 -0
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/index.d.ts +32 -1
- package/package.json +1 -1
|
@@ -50,6 +50,10 @@ export type VariantNode = {
|
|
|
50
50
|
image: ProductImage;
|
|
51
51
|
availableForSale: boolean;
|
|
52
52
|
inventoryQuantity: number;
|
|
53
|
+
inventoryItem?: {
|
|
54
|
+
tracked?: boolean;
|
|
55
|
+
};
|
|
56
|
+
inventoryPolicy?: "deny" | "continue";
|
|
53
57
|
};
|
|
54
58
|
};
|
|
55
59
|
type SelectedVariantDetails = {
|
|
@@ -83,6 +87,7 @@ export type ProductDetails = {
|
|
|
83
87
|
status: "active" | "archived" | "draft" | "";
|
|
84
88
|
options: ProductOption[];
|
|
85
89
|
onlineStoreUrl: string;
|
|
90
|
+
tracksInventory?: boolean;
|
|
86
91
|
collections: {
|
|
87
92
|
edges: CollectionNode[];
|
|
88
93
|
};
|
|
@@ -374,7 +379,7 @@ export type BundleProps = {
|
|
|
374
379
|
};
|
|
375
380
|
export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
|
|
376
381
|
export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
|
|
377
|
-
export declare const optimiseImage: (url: string) => string;
|
|
382
|
+
export declare const optimiseImage: (url: string, width?: number) => string;
|
|
378
383
|
export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
|
|
379
384
|
variantId: string;
|
|
380
385
|
product: ProductDetails;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../bundle.scss";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { BundlePayload, ProductDetails } from "../Bundle";
|
|
4
|
-
export declare function QuantitySelectorForBundle({ quantity, setQuantity, remainingQuantity, handleAddToBundle, variantId, product, handleRemoveItem, hideAddToBundle,
|
|
4
|
+
export declare function QuantitySelectorForBundle({ quantity, setQuantity, remainingQuantity, handleAddToBundle, variantId, product, handleRemoveItem, hideAddToBundle, selectedVariantInventoryQty, }: {
|
|
5
5
|
quantity: number;
|
|
6
6
|
setQuantity: React.Dispatch<React.SetStateAction<number>>;
|
|
7
7
|
remainingQuantity: number;
|
|
@@ -10,8 +10,7 @@ export declare function QuantitySelectorForBundle({ quantity, setQuantity, remai
|
|
|
10
10
|
product?: ProductDetails;
|
|
11
11
|
handleRemoveItem?: (variantId: string, quantity: number) => void;
|
|
12
12
|
hideAddToBundle?: boolean;
|
|
13
|
-
|
|
14
|
-
selectedVariantInventoryQty: number;
|
|
13
|
+
selectedVariantInventoryQty: number | typeof Infinity;
|
|
15
14
|
}): React.JSX.Element;
|
|
16
15
|
type BundleBuilderProps = {
|
|
17
16
|
bundle: BundlePayload;
|
|
@@ -10,7 +10,6 @@ interface SingleProductVariantOptionsModalProps {
|
|
|
10
10
|
backgroundColor: string;
|
|
11
11
|
};
|
|
12
12
|
onConfirm: (variantId: string) => void;
|
|
13
|
-
disableInventoryTracking?: boolean;
|
|
14
13
|
}
|
|
15
14
|
declare const SingleProductVariantOptionsModal: React.FC<SingleProductVariantOptionsModalProps>;
|
|
16
15
|
export default SingleProductVariantOptionsModal;
|
|
@@ -65,9 +65,9 @@ export type BundleConfig = {
|
|
|
65
65
|
products: Product[];
|
|
66
66
|
}[];
|
|
67
67
|
};
|
|
68
|
-
form
|
|
69
|
-
title
|
|
70
|
-
sections
|
|
68
|
+
form?: {
|
|
69
|
+
title?: string;
|
|
70
|
+
sections?: {
|
|
71
71
|
title: string;
|
|
72
72
|
type: "text" | "image";
|
|
73
73
|
fields: {
|
|
@@ -92,6 +92,11 @@ export type BundleConfig = {
|
|
|
92
92
|
hideSelectedProducts: boolean;
|
|
93
93
|
allowMultipleQty: boolean;
|
|
94
94
|
hideOutOfStockProducts: boolean;
|
|
95
|
+
bundleRedirection: "cart-drawer" | "checkout";
|
|
96
|
+
checkoutPartner: "shopify" | "razorpay" | "shiprocket" | "gokwik" | "breeze" | "zecpay" | "shopflo";
|
|
97
|
+
showTierSteps: boolean;
|
|
98
|
+
headerImage: string;
|
|
99
|
+
stickyBarWidth: "compact" | "full-width";
|
|
95
100
|
};
|
|
96
101
|
};
|
|
97
102
|
interface CollectionBundleProps {
|
|
@@ -3,3 +3,4 @@ import { Checkpoint } from "../Cart";
|
|
|
3
3
|
import { MultiStepProgressBarProps } from "./types";
|
|
4
4
|
export declare const criteriaCheckpointFieldMap: (customCartProgressBarCriteria: string) => "minimumOrderValue" | "quantityThreshold";
|
|
5
5
|
export declare function processCheckpoint(checkpoint: Checkpoint, index: number, sortedCheckpoints: Checkpoint[], itemCount: number, props: MultiStepProgressBarProps): CheckpointWithProgress;
|
|
6
|
+
export declare function hasAnyProgress(checkpoints: Checkpoint[] | undefined, currentCartAmount: number, effectiveQuantityForProgressBar: number | undefined, customCartProgressBarCriteria: string, itemCount: number): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
+
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
+
interface ProductOffersCouponProps {
|
|
5
|
+
offersToShow: CartCheckpoint[];
|
|
6
|
+
offersConfig?: ProductsOffersConfigType | null;
|
|
7
|
+
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
+
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
+
setShowPopup: (show: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ProductOffersCoupon: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersCouponProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CartCheckpoint } from "./ProductsOffers";
|
|
3
|
+
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
+
interface ProductOffersListProps {
|
|
5
|
+
offersToShow: CartCheckpoint[];
|
|
6
|
+
offersConfig: ProductsOffersConfigType;
|
|
7
|
+
getOfferCardMessage: (offer: CartCheckpoint) => string;
|
|
8
|
+
setSelectedOffer: (offer: CartCheckpoint | null) => void;
|
|
9
|
+
setShowPopup: (show: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const ProductOffersList: ({ offersToShow, offersConfig, getOfferCardMessage, setSelectedOffer, setShowPopup, }: ProductOffersListProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
+
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
+
export declare const ProductOffersTermsMobilePopover: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
+
showPopup: boolean;
|
|
6
|
+
selectedOffer: CartCheckpoint | null;
|
|
7
|
+
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
+
}) => React.ReactPortal | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CartCheckpoint, OfferTermsAndConditions } from "./ProductsOffers";
|
|
3
|
+
import { ProductsOffersConfigType } from "./ProductsOffers";
|
|
4
|
+
export declare const ProductOffersTermsPopup: ({ showPopup, selectedOffer, selectedOfferTerms, onClose, offersConfig, }: {
|
|
5
|
+
showPopup: boolean;
|
|
6
|
+
selectedOffer: CartCheckpoint | null;
|
|
7
|
+
selectedOfferTerms: OfferTermsAndConditions | null;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
10
|
+
}) => React.ReactPortal | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Checkpoint } from "../Cart/Cart";
|
|
3
|
+
export interface ProductsOffersConfigType {
|
|
4
|
+
sectionType?: "coupon" | "list";
|
|
5
|
+
sectionTitle?: string;
|
|
6
|
+
sectionBackgroundColor?: string;
|
|
7
|
+
sectionBgContrastColor?: string;
|
|
8
|
+
cardBackgroundColor?: string;
|
|
9
|
+
cardBackgroundTransparent?: boolean;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
accentColor?: string;
|
|
12
|
+
roundness?: number;
|
|
13
|
+
cardPadding?: number;
|
|
14
|
+
viewDetailsTitle?: string;
|
|
15
|
+
alignment?: "left" | "middle" | "right";
|
|
16
|
+
iconVisibility?: boolean;
|
|
17
|
+
popupIsolationStrategy?: "revert" | "revert-layer" | "unset" | "initial" | "inherit" | "none";
|
|
18
|
+
}
|
|
19
|
+
export interface CartCheckpoint extends Checkpoint {
|
|
20
|
+
customCartProgressBarCriteria?: string | null;
|
|
21
|
+
discountPercentage?: number | null;
|
|
22
|
+
discountId?: number | null;
|
|
23
|
+
}
|
|
24
|
+
export interface OfferTermsAndConditions {
|
|
25
|
+
offerMessage: string;
|
|
26
|
+
terms: string[];
|
|
27
|
+
}
|
|
28
|
+
declare const ProductsOffers: ({ offersConfig, offers, }: {
|
|
29
|
+
offersConfig?: ProductsOffersConfigType | null | undefined;
|
|
30
|
+
offers: CartCheckpoint[];
|
|
31
|
+
}) => React.JSX.Element;
|
|
32
|
+
export default ProductsOffers;
|
|
@@ -4,3 +4,4 @@ export { default as Cart } from "./Cart";
|
|
|
4
4
|
export { default as CouponFrame } from "./CouponFrame";
|
|
5
5
|
export { default as Bundle } from "./BundleBlock";
|
|
6
6
|
export { default as BundleLoader } from "./BundleBlock/Loader";
|
|
7
|
+
export { default as ProductOffers, ProductsOffersConfigType, CartCheckpoint, } from "./ProductOffersBlock/ProductsOffers";
|