yt-uikit 0.10.16 → 0.10.17
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/Loyalty/LoyaltyWidget.d.ts +1 -1
- package/dist/esm/components/Loyalty/RecentTransactions.d.ts +5 -29
- package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +2 -0
- package/dist/esm/components/Loyalty/types.d.ts +32 -0
- package/dist/esm/index.js +85 -85
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./profile.css";
|
|
3
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 & {
|
|
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, recentTransactionsData, onBirthdayUpdate, onSocialClick, countryCode, isMobilePreview, viewportMode }: LoyaltyProfileProps & RewardsModalProps & {
|
|
5
5
|
signedIn?: boolean;
|
|
6
6
|
}): React.JSX.Element;
|
|
@@ -1,32 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./RecentTransactions.css";
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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[];
|
|
3
|
+
import type { RecentTransactionsData } from "./types";
|
|
4
|
+
export default function TransactionHistory({ data, tokenName, currencySymbol, }: {
|
|
5
|
+
data?: RecentTransactionsData;
|
|
6
|
+
tokenName?: string;
|
|
7
|
+
currencySymbol?: string;
|
|
31
8
|
}): React.JSX.Element;
|
|
32
|
-
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
declare const styles: Record<string, CSSProperties>;
|
|
3
|
+
export declare const rowStyle: (kind: "earned" | "expired" | "availed") => CSSProperties;
|
|
3
4
|
export declare const rowBodyStyle: (kind: "earned" | "expired" | "availed") => CSSProperties;
|
|
5
|
+
export declare const caretStyle: (kind: "earned" | "expired" | "availed") => CSSProperties;
|
|
4
6
|
export default styles;
|
|
@@ -54,6 +54,7 @@ export interface LoyaltyProfileProps {
|
|
|
54
54
|
userData?: UserData;
|
|
55
55
|
activityRewards?: BrandActivityRewardSettings;
|
|
56
56
|
brandRewardProgram: BrandRewardProgram;
|
|
57
|
+
recentTransactionsData?: RecentTransactionsData;
|
|
57
58
|
onBirthdayUpdate: (date: string) => Promise<boolean>;
|
|
58
59
|
onSocialClick: (url: string, type: string) => Promise<boolean>;
|
|
59
60
|
isLoading: boolean;
|
|
@@ -342,6 +343,37 @@ export interface ReferralRewardDetails {
|
|
|
342
343
|
freebieType?: string;
|
|
343
344
|
} | null;
|
|
344
345
|
}
|
|
346
|
+
export type RecentTransactionType = "earned" | "expired" | "availed";
|
|
347
|
+
export type RecentTransactionActivityType = "order" | "first_order" | "second_order" | "signup" | "bulk_insert_signup" | "birthday" | "referral_signup" | "referral_first_order" | "referee_signup" | "referee_first_order" | "referee_order" | "social_instagram" | "social_facebook" | "social_facebook_like" | "social_facebook_share" | "social_twitter" | "social_youtube" | "social_custom_link" | "review_comment" | "segment_reward" | "admin_balance_update" | "consumer_balance_increase" | "consumer_balance_decrease" | "membership_tier_acquisition" | "catalog_offer_redemption" | "discount_creation" | "consumer_discount_creation" | "points_expiration";
|
|
348
|
+
export type RecentTransactionCriteria = "payment" | "shipment" | "delivery" | "payment+shipment" | "payment+delivery";
|
|
349
|
+
export type RecentTransactionOrderStatus = "awaiting_payment" | "confirmed" | "in_transit" | "delivered" | "processing";
|
|
350
|
+
export interface RecentTransactionApiItem {
|
|
351
|
+
id: string;
|
|
352
|
+
type: RecentTransactionType;
|
|
353
|
+
activityType: RecentTransactionActivityType;
|
|
354
|
+
points: number;
|
|
355
|
+
createdAt: string;
|
|
356
|
+
}
|
|
357
|
+
export interface RecentTransactionPendingItem {
|
|
358
|
+
id: string;
|
|
359
|
+
points: number;
|
|
360
|
+
activityType: RecentTransactionActivityType;
|
|
361
|
+
orderId?: string;
|
|
362
|
+
criteria?: RecentTransactionCriteria;
|
|
363
|
+
orderStatus?: RecentTransactionOrderStatus;
|
|
364
|
+
createdAt: string;
|
|
365
|
+
}
|
|
366
|
+
export interface RecentTransactionSummary {
|
|
367
|
+
totalSaved: number;
|
|
368
|
+
totalEarned: number;
|
|
369
|
+
totalAvailed: number;
|
|
370
|
+
totalExpired: number;
|
|
371
|
+
}
|
|
372
|
+
export interface RecentTransactionsData {
|
|
373
|
+
summary: RecentTransactionSummary;
|
|
374
|
+
pending?: RecentTransactionPendingItem[];
|
|
375
|
+
transactions: RecentTransactionApiItem[];
|
|
376
|
+
}
|
|
345
377
|
export interface CouponAvailResponse {
|
|
346
378
|
discountCode: string;
|
|
347
379
|
discountValueInInr: number;
|