yt-uikit 0.10.2-fixed-bundle-ratings.4 → 0.10.3

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.
Files changed (36) hide show
  1. package/dist/esm/assets/confetti.d.ts +2 -0
  2. package/dist/esm/components/BundleBlock/Bundle.d.ts +0 -2
  3. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +1 -1
  4. package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -0
  5. package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +13 -0
  6. package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -0
  7. package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -0
  8. package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -0
  9. package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +7 -0
  10. package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -0
  11. package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -0
  12. package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +15 -0
  13. package/dist/esm/components/Loyalty/RecentTransactions.d.ts +32 -0
  14. package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -0
  15. package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +11 -0
  16. package/dist/esm/components/Loyalty/StickyLauncher.d.ts +13 -0
  17. package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -0
  18. package/dist/esm/components/Loyalty/Toast.d.ts +7 -0
  19. package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -0
  20. package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -0
  21. package/dist/esm/components/Loyalty/WaysToEarn.d.ts +32 -0
  22. package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +78 -0
  23. package/dist/esm/components/Loyalty/index.d.ts +5 -0
  24. package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +16 -0
  25. package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -0
  26. package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -0
  27. package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -0
  28. package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +4 -0
  29. package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -0
  30. package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -0
  31. package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -0
  32. package/dist/esm/components/Loyalty/types.d.ts +369 -0
  33. package/dist/esm/components/index.d.ts +5 -0
  34. package/dist/esm/confetti-f3502561.js +1 -0
  35. package/dist/esm/index.js +480 -480
  36. package/package.json +3 -1
@@ -0,0 +1,2 @@
1
+ declare const confettiAnimation: any;
2
+ export default confettiAnimation;
@@ -251,7 +251,6 @@ type ByobStyle = {
251
251
  productFiltersDisplay: "none" | "drawer" | "sidebar";
252
252
  filtersProvider: "based-on-products-data" | "search-and-discovery-app-sync";
253
253
  selectedFilterOptions: string[];
254
- productRatingsDisplay?: string;
255
254
  };
256
255
  type FixedStyle = {
257
256
  titleFontSize: string;
@@ -273,7 +272,6 @@ type FixedStyle = {
273
272
  compareAtPriceVisibility: boolean;
274
273
  discountBadgeVisibility?: boolean;
275
274
  discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
276
- productRatingsDisplay?: string;
277
275
  };
278
276
  export type Customizations = {
279
277
  shop?: string;
@@ -19,7 +19,7 @@ type BundleProductDetailsModalProps = {
19
19
  primaryTextColorCta: string;
20
20
  primaryBackgroundColorCta: string;
21
21
  styles: Customizations;
22
- reviewRatingType?: string;
22
+ reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
23
23
  rating?: {
24
24
  averageRating: number;
25
25
  ratingCount: number;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import "./ActiveSession.css";
3
+ type Props = {
4
+ onClose?: () => void;
5
+ handleSessionDetected: () => void;
6
+ };
7
+ export default function ActiveSessionOverlay({ onClose, handleSessionDetected }: Props): React.JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export default function BubbleLauncher({ textColor, backgroundColor, position, yOffsetValue, launcherTitle, borderColor, iconType, addVisibilityDelay, addAttentionWaves, onClick }: {
3
+ textColor?: string | undefined;
4
+ backgroundColor?: string | undefined;
5
+ position?: string | undefined;
6
+ yOffsetValue?: string | undefined;
7
+ launcherTitle?: string | undefined;
8
+ borderColor?: string | undefined;
9
+ iconType?: string | undefined;
10
+ addVisibilityDelay?: boolean | undefined;
11
+ addAttentionWaves?: boolean | undefined;
12
+ onClick?: (() => void) | undefined;
13
+ }): React.JSX.Element;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { RewardsModalProps } from "./types";
3
+ export default function GuestDesktop({ config, }: {
4
+ config: RewardsModalProps;
5
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "./modal.css";
3
+ import { RewardsModalProps } from "./types";
4
+ import "react-international-phone/style.css";
5
+ export default function GuestDesktopWithoutImage({ config, }: {
6
+ config: RewardsModalProps;
7
+ }): React.JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import "./modal.css";
3
+ import { RewardsModalProps } from "./types";
4
+ export default function GuestMobile({ config }: {
5
+ config: RewardsModalProps;
6
+ }): React.JSX.Element | null;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { LoyaltyProfileProps } from "./types";
3
+ import "./profile.css";
4
+ import "./fonts.css";
5
+ export default function LoyaltyProfile({ config, }: {
6
+ config: LoyaltyProfileProps;
7
+ }): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import "./profile.css";
3
+ import { LoyaltyProfileProps, RewardsModalProps } from "./types";
4
+ export default function LoyaltyWidget({ signedIn, previewMode, bannerBackground, bannerBackgroundType, bannerImage, bannerTextColor, themePrimaryColor, themeContrastColor, themeSecondaryColor, themeSecondaryContrastColor, themeBackgroundColor, themeTextColor, themeAccentColor, widgetOpen, widgetPosition, guestWidgetImage, widgetRoundedCorners, ctaMainColor, ctaMainContrastColor, ctaPrimaryColor, ctaPrimaryContrastColor, ctaBorderColor, ctaSecondaryColor, ctaSecondaryContrastColor, ctaShowIcon, ctaBorderRadius, showWaysToEarn, showWCoinValue, showReferral, showTransactions, showVipSection, brandName, brandLogoUrl, headingEyebrow, balanceCoins, maxRedeemableCoins, coinValInr, currencyCode, tokenName, rateTitle, rateSub, couponHeading, couponCode, couponList, onCouponAvail, couponImage, referralLink, userRewardTier, brandRewardTiers, watermarkColor, bannerTextAlignment, showWatermark, showLogo, logourl, guestGreeting, userGreeting, existingUserGreeting, phone, email, emailRequired, onPhoneChange, onEmailChange, validatePhone, setEmailRequired, onClose, onRegister, onLogout, handleChangeNumber, handleResendOtp, handleSessionDetected, onSendOTP, isSessionDetected, authType, formFilled, redirectUrl, ctaTitle, registerLink, brandTitle, heading, subcopy, termsHref, privacyHref, isLoading, userData, activityRewards, brandRewardProgram, onBirthdayUpdate, onSocialClick, countryCode, isMobilePreview, viewportMode }: LoyaltyProfileProps & RewardsModalProps & {
5
+ signedIn?: boolean;
6
+ }): React.JSX.Element;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import "./modal.css";
3
+ export default function OtpStep({ phoneLabel, authType, email, length, onConfirm, onResend, onChangeNumber, setToast, loading, tone, themeBackgroundColor, themeAccentColor, themeTextColor, ctaPrimaryColor, ctaPrimaryContrastColor, countryCode, }: {
4
+ phoneLabel?: string | undefined;
5
+ authType: any;
6
+ email: any;
7
+ length?: number | undefined;
8
+ onConfirm: any;
9
+ onResend: any;
10
+ onChangeNumber: any;
11
+ setToast: any;
12
+ loading?: boolean | undefined;
13
+ tone?: string | undefined;
14
+ themeBackgroundColor: any;
15
+ themeAccentColor: any;
16
+ themeTextColor: any;
17
+ ctaPrimaryColor: any;
18
+ ctaPrimaryContrastColor: any;
19
+ countryCode: any;
20
+ }): React.JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ export type PointEarnBadgeAlignment = "left" | "center" | "right";
3
+ export interface PointEarnBadgeProps {
4
+ prefix?: string;
5
+ iconUrl?: string;
6
+ suffix?: string;
7
+ coinsEarned?: number | string;
8
+ widgetBackground?: string;
9
+ alignment?: PointEarnBadgeAlignment;
10
+ textColor?: string;
11
+ borderColor?: string;
12
+ badgeRoundness?: string | number;
13
+ fontSize?: string | number;
14
+ }
15
+ export default function PointEarnBadge({ prefix, iconUrl, suffix, coinsEarned, widgetBackground, alignment, textColor, borderColor, badgeRoundness, fontSize, }: PointEarnBadgeProps): React.JSX.Element;
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import "./RecentTransactions.css";
3
+ type TxKind = "earned" | "expired" | "availed";
4
+ type TxItem = {
5
+ id: string;
6
+ dateLabel: string;
7
+ title: string;
8
+ amount: string | number;
9
+ kind: TxKind;
10
+ meta?: string;
11
+ };
12
+ type MonthGroup = {
13
+ monthTitle: string;
14
+ items: TxItem[];
15
+ };
16
+ type PendingBanner = {
17
+ deltaLabel: string;
18
+ orderId?: string;
19
+ status?: string;
20
+ note?: string;
21
+ };
22
+ export default function TransactionHistory({ totals, pending, months, }: {
23
+ totals?: {
24
+ saved: string;
25
+ earned: string;
26
+ available: string;
27
+ expired: string;
28
+ };
29
+ pending?: PendingBanner;
30
+ months?: MonthGroup[];
31
+ }): React.JSX.Element;
32
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import "./modal.css";
3
+ import { RewardsModalProps } from "./types";
4
+ export declare const isEmailValid: (email: string) => boolean;
5
+ export declare const COUNTRY_PHONE_CODE_MAP: Record<string, string>;
6
+ export declare const COUNTRY_OPTIONS: {
7
+ cc: string;
8
+ value: string;
9
+ label: string;
10
+ }[];
11
+ export default function RewardsModal({ config }: {
12
+ config: RewardsModalProps;
13
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export default function RibbonLauncher({ textColor, backgroundColor, launcherTitle, offerTitle, borderColor, iconType, addVisibilityDelay, onClick, }: {
3
+ textColor?: string | undefined;
4
+ backgroundColor?: string | undefined;
5
+ launcherTitle?: string | undefined;
6
+ offerTitle?: string | undefined;
7
+ borderColor?: string | undefined;
8
+ iconType?: string | undefined;
9
+ addVisibilityDelay?: boolean | undefined;
10
+ onClick?: (() => void) | undefined;
11
+ }): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export default function StickyLauncher({ textColor, backgroundColor, position, yOffsetValue, launcherTitle, borderColor, iconType, addVisibilityDelay, addAttentionWaves, onClick, }: {
3
+ textColor?: string | undefined;
4
+ backgroundColor?: string | undefined;
5
+ position?: string | undefined;
6
+ yOffsetValue?: string | undefined;
7
+ launcherTitle?: string | undefined;
8
+ borderColor?: string | undefined;
9
+ iconType?: string | undefined;
10
+ addVisibilityDelay?: boolean | undefined;
11
+ addAttentionWaves?: boolean | undefined;
12
+ onClick?: (() => void) | undefined;
13
+ }): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export default function StickyTextLauncher(): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import "./Toast.css";
3
+ export default function Toast({ background, textColor, displayText }: {
4
+ background?: string | undefined;
5
+ textColor?: string | undefined;
6
+ displayText?: string | undefined;
7
+ }): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { RewardTier, UserRewardTier } from "./types";
3
+ type VIPTiersScreenProps = {
4
+ onBack: () => void;
5
+ brandRewardTiers?: RewardTier[];
6
+ balanceCoins?: number | string;
7
+ userRewardTier?: UserRewardTier;
8
+ currencyCode?: string;
9
+ };
10
+ export default function VIPTiersScreen({ brandRewardTiers, balanceCoins, userRewardTier, currencyCode, }: VIPTiersScreenProps): React.JSX.Element;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ export default function WTRCoupon({ couponHeading, couponCode, copyFunction, themePrimaryColor, themeContrastColor, themeSecondaryContrastColor, themeSecondaryColor, setScreenType, showCTA, borderRadius, }: {
3
+ couponHeading?: string | undefined;
4
+ couponCode?: string | undefined;
5
+ copyFunction?: ((code: string) => void) | undefined;
6
+ themePrimaryColor?: string | undefined;
7
+ themeContrastColor?: string | undefined;
8
+ themeSecondaryContrastColor?: string | undefined;
9
+ themeSecondaryColor?: string | undefined;
10
+ setScreenType?: ((type: string) => void) | undefined;
11
+ showCTA?: boolean | undefined;
12
+ borderRadius?: string | undefined;
13
+ }): React.JSX.Element;
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import "./DobPopup.css";
3
+ import "./styles/shared.css";
4
+ import { BrandActivityRewardSettings, BrandRewardProgram, ReferralRewardDetails, UserData } from "./types";
5
+ type WaysToEarnProps = {
6
+ ctaPrimaryColor: string;
7
+ ctaContrastColor: string;
8
+ currencyCode?: string;
9
+ userData?: UserData;
10
+ activityRewards?: BrandActivityRewardSettings;
11
+ onBirthdayUpdate: (date: string) => Promise<boolean>;
12
+ onSocialClick: (url: string, type: string) => Promise<boolean>;
13
+ isLoading: boolean;
14
+ brandRewardProgram: BrandRewardProgram;
15
+ };
16
+ export default function WaysToEarn({ userData, ctaContrastColor, ctaPrimaryColor, currencyCode, activityRewards, onBirthdayUpdate, onSocialClick, isLoading, brandRewardProgram, }: WaysToEarnProps): JSX.Element;
17
+ export declare function formatReferralRewardValue(reward?: ReferralRewardDetails, coinName?: string, currencyCode?: string): string | null;
18
+ export declare function ReferralRewardTitle({ title, referrerReward, refereeReward, }: {
19
+ title?: string;
20
+ referrerReward?: string | null;
21
+ refereeReward?: string | null;
22
+ }): React.JSX.Element;
23
+ interface DOBPopupProps {
24
+ open: boolean;
25
+ value: string | null;
26
+ onSave: (dob: string) => void;
27
+ onClose: () => void;
28
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
29
+ isLoading: boolean;
30
+ }
31
+ export declare function DOBPopup({ open, value, onSave, onClose, onChange, isLoading, }: DOBPopupProps): React.JSX.Element | null;
32
+ export {};
@@ -0,0 +1,78 @@
1
+ /// <reference types="react" />
2
+ import { CouponAvailResponse } from "./types";
3
+ import "./WaysToRedeem.css";
4
+ import "./styles/shared.css";
5
+ export interface IdsActive {
6
+ ids: number[];
7
+ active: boolean;
8
+ }
9
+ export interface IdsOnly {
10
+ ids: number[];
11
+ }
12
+ export interface ProductIds {
13
+ ids: number[];
14
+ active: boolean;
15
+ products: any[];
16
+ }
17
+ export interface AllowedProducts {
18
+ products: any[];
19
+ }
20
+ export interface CouponTemplate {
21
+ couponTemplateId: number;
22
+ name: string;
23
+ couponType: string;
24
+ discountPercentage: number;
25
+ discountValue: number;
26
+ minimumOrderValue: number;
27
+ pointsRequired: number;
28
+ createdAt: string;
29
+ updatedAt: string;
30
+ brandId: number;
31
+ expiresInMinutes: number;
32
+ couponTemplateConsumer: string;
33
+ quantityThreshold: number;
34
+ isActive: boolean;
35
+ combinesWithOrderDiscount: boolean;
36
+ combinesWithProductDiscount: boolean;
37
+ combinesWithShippingDiscount: boolean;
38
+ isDummyCouponTemplate: boolean;
39
+ customerBuysCollectionIds: IdsActive;
40
+ customerBuysProductIds: IdsActive;
41
+ customerGetsCollectionIds: IdsActive;
42
+ customerGetsProductIds: ProductIds;
43
+ automaticBXGYDiscount: boolean;
44
+ automaticBXGYDiscountId: number | null;
45
+ allowedCollections: IdsOnly;
46
+ excludedCollections: IdsOnly;
47
+ allowedProducts: AllowedProducts;
48
+ combinesWithOtherFreebies: boolean;
49
+ autoAddEnabled: boolean;
50
+ percentageOffOnCustomerGetsProducts: number | null;
51
+ customCartProgressBarCriteria: string;
52
+ discountId: number | null;
53
+ limitFreebieQuantity: number;
54
+ hideFromSEO: boolean;
55
+ freebieType: string | null;
56
+ startDate: string | null;
57
+ endDate: string | null;
58
+ scheduleIds: number[] | null;
59
+ scheduleType: string;
60
+ maxFreebiesInTier: number;
61
+ __entity: string;
62
+ }
63
+ export interface WaysToRedeemProps {
64
+ couponList?: CouponTemplate[];
65
+ couponHeading?: string;
66
+ couponCode?: string;
67
+ currencyCode?: string;
68
+ onCouponAvail: (couponTemplateId: number) => Promise<CouponAvailResponse>;
69
+ copyFunction?: (code: string) => void;
70
+ themeSecondaryContrastColor?: string;
71
+ themeSecondaryColor?: string;
72
+ themeBackgroundColor?: string;
73
+ setScreenType?: (type: string) => void;
74
+ showCTA?: boolean;
75
+ balanceCoins: number;
76
+ ctaBorderRadius?: string;
77
+ }
78
+ export default function WaysToRedeem({ couponList, couponHeading, couponCode, currencyCode, onCouponAvail, copyFunction, themeSecondaryContrastColor, themeSecondaryColor, themeBackgroundColor, setScreenType, showCTA, balanceCoins, ctaBorderRadius, }: WaysToRedeemProps): JSX.Element;
@@ -1,2 +1,7 @@
1
+ export { default as LoyaltyProfile } from "./LoyaltyProfile";
2
+ export { default as LoyaltyLauncher } from "./loyaltyLauncher";
3
+ export { default as RewardsModal } from "./RewardsModal";
4
+ export { default as LoyaltyWidget } from "./LoyaltyWidget";
1
5
  export { default as LoyaltyProductCatalog } from "./LoyaltyProductCatalog";
6
+ export { default as PointEarnBadge } from "./PointEarnBadge";
2
7
  export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./LoyaltyProductCatalog";
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import "./launcher.css";
3
+ export default function LoyaltyLauncher({ launcherType, textColor, backgroundColor, position, yOffsetValue, launcherTitle, offerTitle, borderColor, iconType, addVisibilityDelay, addAttentionWaves, onClick }: {
4
+ launcherType?: string;
5
+ textColor?: string;
6
+ backgroundColor?: string;
7
+ position?: string;
8
+ yOffsetValue?: string | number;
9
+ launcherTitle?: string;
10
+ offerTitle?: string;
11
+ borderColor?: string;
12
+ iconType?: string;
13
+ addVisibilityDelay?: boolean;
14
+ addAttentionWaves?: boolean;
15
+ onClick?: () => void;
16
+ }): React.JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const styles: Record<string, CSSProperties>;
3
+ export default styles;
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const styles: Record<string, CSSProperties>;
3
+ export default styles;
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const styles: Record<string, CSSProperties>;
3
+ export default styles;
@@ -0,0 +1,4 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const styles: Record<string, CSSProperties>;
3
+ export declare const rowBodyStyle: (kind: "earned" | "expired" | "availed") => CSSProperties;
4
+ export default styles;
@@ -0,0 +1,4 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const styles: Record<string, CSSProperties>;
3
+ export declare const tierStyle: (index: number) => CSSProperties;
4
+ export default styles;
@@ -0,0 +1,5 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const s: {
3
+ [x: string]: CSSProperties;
4
+ };
5
+ export default s;
@@ -0,0 +1,3 @@
1
+ import type { CSSProperties } from "react";
2
+ declare const shared: Record<string, CSSProperties>;
3
+ export default shared;