yt-uikit 0.9.26-debugging-recs.0 → 0.9.26-multi-tier.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.
@@ -8,6 +8,10 @@ export declare const variantSelectionModalState: import("jotai").PrimitiveAtom<{
8
8
  lineItemKey?: string | undefined;
9
9
  productId?: string | undefined;
10
10
  allowedVariantIds?: string[] | undefined;
11
+ rewardContext?: {
12
+ couponTemplateId?: string | undefined;
13
+ rewardKey?: string | undefined;
14
+ } | undefined;
11
15
  productRec?: boolean | undefined;
12
16
  }> & {
13
17
  init: {
@@ -20,6 +24,10 @@ export declare const variantSelectionModalState: import("jotai").PrimitiveAtom<{
20
24
  lineItemKey?: string | undefined;
21
25
  productId?: string | undefined;
22
26
  allowedVariantIds?: string[] | undefined;
27
+ rewardContext?: {
28
+ couponTemplateId?: string | undefined;
29
+ rewardKey?: string | undefined;
30
+ } | undefined;
23
31
  productRec?: boolean | undefined;
24
32
  };
25
33
  };
@@ -1,5 +1,6 @@
1
1
  import React from "react";
2
2
  import { type DrawerLayout } from "./CartDrawer";
3
+ import { FreebieRewardContext } from "../../utils/freebieUtils";
3
4
  import { stickyCartCustomizationDataProps } from "./StickyCart";
4
5
  import { CartOffersCarousalProps } from "./CartOffersCarousel";
5
6
  import { freebieMilestoneProps } from "./NextFreebieRow";
@@ -172,7 +173,7 @@ export interface CartProps {
172
173
  freebieProductsInCart?: any;
173
174
  currentTier?: number;
174
175
  showFreebieClaim?: boolean;
175
- addFreebieToCart?: (variantId: string) => Promise<void>;
176
+ addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
176
177
  freebiesInCart?: string[];
177
178
  effectiveQuantityForProgressBar?: number;
178
179
  productPercentageOffMapping: {
@@ -1,11 +1,12 @@
1
1
  import React from "react";
2
2
  import { freebieClaimInterface, Checkpoint } from "./Cart";
3
+ import { FreebieRewardContext } from "../../utils/freebieUtils";
3
4
  interface FreebieClaimManagerProps {
4
5
  freebieProductsInCart: any[];
5
6
  themeColor?: string;
6
7
  themeTextColor?: string;
7
8
  primaryTextColor?: string;
8
- addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
9
+ addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
9
10
  freebiesInCart: string[];
10
11
  freebieClaimData?: freebieClaimInterface;
11
12
  cartCheckpoints?: Checkpoint[];
@@ -1,11 +1,12 @@
1
1
  import React from "react";
2
+ import { FreebieRewardContext } from "../../utils/freebieUtils";
2
3
  import { Checkpoint } from "./Cart";
3
4
  interface FreebieClaimSectionProps {
4
5
  freebieProductsInCart: any[];
5
6
  themeColor?: string;
6
7
  themeTextColor?: string;
7
8
  primaryTextColor?: string;
8
- addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
9
+ addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
9
10
  freebiesInCart: string[];
10
11
  imageAspectSelector?: "square" | "portrait";
11
12
  freebieCouponTemplates?: Checkpoint[];
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
+ import { FreebieRewardContext } from "../../utils/freebieUtils";
2
3
  interface FreebieClaimSectionCardProps {
3
4
  product: any;
4
5
  themeColor?: string;
5
6
  themeTextColor?: string;
6
- addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
7
+ addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
7
8
  productClaimCtaButtonText?: string;
8
9
  imageAspectSelector?: "square" | "portrait";
9
10
  freebieCouponTemplates?: any;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { FreebieRewardContext } from "../../../utils/freebieUtils";
2
3
  type DesktopVariantPopupProps = {
3
4
  isDev?: boolean;
4
5
  removeCartItem: (variantId: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
@@ -9,7 +10,7 @@ type DesktopVariantPopupProps = {
9
10
  cartComponentsCornerRadius?: number;
10
11
  backgroundColor?: string;
11
12
  removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
12
- freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
13
+ freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
13
14
  stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
14
15
  productClaimCtaButtonText?: string;
15
16
  backgroundSubdued?: string;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { FreebieRewardContext } from "../../../utils/freebieUtils";
2
3
  type MobileVariantPopupProps = {
3
4
  isDev?: boolean;
4
5
  removeCartItem: (variantId: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
@@ -9,7 +10,7 @@ type MobileVariantPopupProps = {
9
10
  cartComponentsCornerRadius?: number;
10
11
  backgroundColor: string;
11
12
  removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
12
- freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
13
+ freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
13
14
  stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
14
15
  productClaimCtaButtonText?: string;
15
16
  backgroundSubdued?: string;