yt-uikit 0.8.92 → 0.9.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.
@@ -377,6 +377,10 @@ export type AnalyticsEventParams = {
377
377
  eventTypeCustom: EventTypeCustom;
378
378
  data: any;
379
379
  };
380
+ export type CursorData = Record<number, {
381
+ cursor: string;
382
+ hasNext: boolean;
383
+ }>;
380
384
  export type BundleProps = {
381
385
  bundle: BundlePayload;
382
386
  addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
@@ -406,6 +410,12 @@ export type BundleProps = {
406
410
  currentProductId?: string;
407
411
  dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
408
412
  fetchStoreDetails?: () => Promise<any>;
413
+ productsPagination?: {
414
+ initialCursorData: CursorData;
415
+ cursorData: CursorData;
416
+ fetchFn: (filters?: any, bundleTier?: number, cursor?: string | null) => Promise<ProductData[]>;
417
+ setCursorData: (cursorData: CursorData) => void;
418
+ };
409
419
  };
410
420
  export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
411
421
  export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
@@ -1,6 +1,6 @@
1
1
  import "../bundle.scss";
2
2
  import React from "react";
3
- import { AnalyticsEventParams, BundlePayload, ProductDetails } from "../Bundle";
3
+ import { AnalyticsEventParams, BundlePayload, CursorData, ProductData, ProductDetails } from "../Bundle";
4
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>>;
@@ -12,7 +12,6 @@ export declare function QuantitySelectorForBundle({ quantity, setQuantity, remai
12
12
  hideAddToBundle?: boolean;
13
13
  selectedVariantInventoryQty: number | typeof Infinity;
14
14
  }): React.JSX.Element;
15
- export declare const productMatchesAllFilters: (product: any, applied: Record<string, string[]>, allFilters: any[], getMaxAvailableQty: (product: any, variantId: string) => number) => boolean;
16
15
  type BundleBuilderProps = {
17
16
  bundle: BundlePayload;
18
17
  selectedItems: {
@@ -40,6 +39,12 @@ type BundleBuilderProps = {
40
39
  };
41
40
  dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
42
41
  fetchStoreDetails?: () => Promise<any>;
42
+ productsPagination?: {
43
+ initialCursorData: CursorData;
44
+ cursorData: CursorData;
45
+ fetchFn: (filters?: any, bundleTier?: number, cursor?: string | null) => Promise<ProductData[]>;
46
+ setCursorData: (cursorData: CursorData) => void;
47
+ };
43
48
  };
44
49
  declare const BundleBuilder: React.FC<BundleBuilderProps>;
45
50
  export default BundleBuilder;
@@ -4,7 +4,12 @@ export interface FilterValue {
4
4
  id: string;
5
5
  label: string;
6
6
  count: number;
7
- input: string;
7
+ input: string | {
8
+ price?: {
9
+ max: number;
10
+ min: number;
11
+ };
12
+ };
8
13
  }
9
14
  export interface FilterGroup {
10
15
  id: string;