@srimandir/daily-live-puja 6.0.2 → 6.0.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.
- package/dist/api/dlpApi.d.ts +9 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/streakApi.d.ts +7 -0
- package/dist/components/CountdownTimer/CountdownTimer.d.ts +7 -0
- package/dist/components/CountdownTimer/index.d.ts +1 -0
- package/dist/components/DLPTabs/DLPTabs.d.ts +23 -0
- package/dist/components/DLPTabs/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +10 -0
- package/dist/components/Header/index.d.ts +1 -0
- package/dist/components/LandingPage/Subtitle.d.ts +6 -0
- package/dist/components/LandingPage/Title.d.ts +5 -0
- package/dist/components/LandingPage/index.d.ts +25 -0
- package/dist/components/LoggedOutSections/DevoteesSaySection.d.ts +5 -0
- package/dist/components/LoggedOutSections/HighlightsStripSection.d.ts +4 -0
- package/dist/components/LoggedOutSections/LoggedOutSections.d.ts +8 -0
- package/dist/components/LoggedOutSections/StatSection.d.ts +4 -0
- package/dist/components/LoggedOutSections/StickyJoinSection.d.ts +7 -0
- package/dist/components/LoggedOutSections/WhatYouGetSection.d.ts +4 -0
- package/dist/components/LoggedOutSections/index.d.ts +1 -0
- package/dist/components/MyPlanCard/MyPlanCard.d.ts +16 -0
- package/dist/components/MyPlanCard/index.d.ts +2 -0
- package/dist/components/ShareSection/ShareSection.d.ts +8 -0
- package/dist/components/ShareSection/index.d.ts +2 -0
- package/dist/components/StoreSection/StoreSection.d.ts +55 -0
- package/dist/components/StoreSection/index.d.ts +2 -0
- package/dist/components/StoreSection/storeCards.worker.d.ts +17 -0
- package/dist/components/StreakSection/StreakSection.d.ts +12 -0
- package/dist/components/StreakSection/StreakSubscriptionHint.d.ts +6 -0
- package/dist/components/StreakSection/index.d.ts +2 -0
- package/dist/components/SubscriptionSection/SubscriptionSection.d.ts +28 -0
- package/dist/components/SubscriptionSection/index.d.ts +2 -0
- package/dist/components/SuccessPage/SuccessPage.d.ts +31 -0
- package/dist/components/SuccessPage/index.d.ts +1 -0
- package/dist/components/TrustMarkers/TrustMarkers.d.ts +2 -0
- package/dist/components/TrustMarkers/index.d.ts +1 -0
- package/dist/components/VideoPage/VideoPage.d.ts +135 -0
- package/dist/components/VideoPage/index.d.ts +1 -0
- package/dist/components/VideoPage/offerings.d.ts +25 -0
- package/dist/components/VideoPage/payment.d.ts +35 -0
- package/dist/components/WhatsappVerificationSheet/WhatsappVerificationSheet.d.ts +8 -0
- package/dist/constants/countrycode.d.ts +16 -0
- package/dist/constants/dlp.constants.d.ts +20 -0
- package/dist/constants/expectations.d.ts +9 -0
- package/dist/constants/index.d.ts +7 -0
- package/dist/constants/loggedOutSections.constants.d.ts +29 -0
- package/dist/constants/videoPage.constants.d.ts +16 -0
- package/dist/constants/whatsapp.constants.d.ts +1 -0
- package/dist/context/AppContext.d.ts +17 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/daily-live-puja.js +5038 -0
- package/dist/daily-live-puja.js.map +1 -0
- package/dist/dev/main.d.ts +0 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useDailyAttendanceStreak.d.ts +20 -0
- package/dist/hooks/useDlpData.d.ts +14 -0
- package/dist/hooks/useDlpExitAnalytics.d.ts +20 -0
- package/dist/hooks/useStreamStatusGuard.d.ts +12 -0
- package/dist/hooks/useSubscriptionSectionData.d.ts +87 -0
- package/dist/hooks/useSubscriptionStatus.d.ts +32 -0
- package/dist/hooks/useYouTubeLiveStatus.d.ts +8 -0
- package/dist/i18n/I18nContext.d.ts +13 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/translations.d.ts +4 -0
- package/dist/i18n/translations.en.d.ts +47 -0
- package/dist/i18n/translations.hi.d.ts +47 -0
- package/dist/index.d.ts +20 -0
- package/dist/style.css +1 -0
- package/dist/styles.d.ts +0 -0
- package/dist/styles.js +2 -0
- package/dist/styles.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/streak.types.d.ts +68 -0
- package/dist/types/videoPage.types.d.ts +51 -0
- package/dist/utils/exitAnalytics.d.ts +37 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/localStorage.d.ts +3 -0
- package/dist/utils/sanitizeHost.d.ts +1 -0
- package/dist/utils/streakHelpers.d.ts +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContentEnvironment, DlpApiAttributes, DlpNormalizedData } from '../types/videoPage.types';
|
|
2
|
+
type Fetcher = typeof fetch;
|
|
3
|
+
export declare const createDlpApiClient: (fetcher?: Fetcher) => {
|
|
4
|
+
getDlpContent: (environment: ContentEnvironment, signal?: AbortSignal) => Promise<{
|
|
5
|
+
attributes?: DlpApiAttributes;
|
|
6
|
+
normalized: DlpNormalizedData;
|
|
7
|
+
}>;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StreakA4BApiLike, DailyAttendanceStreakApiResponse } from '../types/streak.types';
|
|
2
|
+
export declare const createStreakApiClient: (a4bApi?: StreakA4BApiLike) => {
|
|
3
|
+
getDailyAttendanceStreak: () => Promise<{
|
|
4
|
+
payload: DailyAttendanceStreakApiResponse;
|
|
5
|
+
isMock: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CountdownTimer } from './CountdownTimer';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type DLPTab = "streaks" | "share" | "store" | "subscription";
|
|
3
|
+
export interface DLPTabsProps {
|
|
4
|
+
/** Currently active tab (highlighted by scroll position) */
|
|
5
|
+
activeTab: DLPTab;
|
|
6
|
+
/** Called when a tab is tapped — triggers scroll-to-section */
|
|
7
|
+
onTabChange: (tab: DLPTab) => void;
|
|
8
|
+
/** Called when the Chat button is tapped — toggles chat visibility */
|
|
9
|
+
onChatPress?: () => void;
|
|
10
|
+
/** Whether the chat panel is currently open */
|
|
11
|
+
chatOpen?: boolean;
|
|
12
|
+
/** User avatar URL shown in the Chat button */
|
|
13
|
+
avatarUrl?: string;
|
|
14
|
+
/** User's display initial (fallback when no avatarUrl) */
|
|
15
|
+
avatarInitial?: string;
|
|
16
|
+
/** Whether to show the Subscription tab (D6+, hidden once subscribed) */
|
|
17
|
+
showSubscription?: boolean;
|
|
18
|
+
/** Explicit visible tabs list; takes precedence over showSubscription */
|
|
19
|
+
visibleTabs?: DLPTab[];
|
|
20
|
+
/** Whether the stream is live — hides chat when not live */
|
|
21
|
+
isLive?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const DLPTabs: React.FC<DLPTabsProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface HeaderProps {
|
|
3
|
+
isLive?: boolean;
|
|
4
|
+
daysRemaining?: number;
|
|
5
|
+
isLoggedIn?: boolean;
|
|
6
|
+
isSubscribed?: boolean;
|
|
7
|
+
isTransparent?: boolean;
|
|
8
|
+
onJoinClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const Header: React.FC<HeaderProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Header } from './Header';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LiveStreamStatus } from '../../types/videoPage.types';
|
|
3
|
+
interface LandingPageProps {
|
|
4
|
+
containerRef: React.RefObject<HTMLDivElement>;
|
|
5
|
+
stableStreamStatus: Exclude<LiveStreamStatus, "LOADING"> | null;
|
|
6
|
+
daysRemaining: number;
|
|
7
|
+
isSubscribed: boolean;
|
|
8
|
+
onJoinClick?: () => void;
|
|
9
|
+
onHeaderJoinClick?: () => void;
|
|
10
|
+
statusProbeId: string;
|
|
11
|
+
loggedOutVideoSrc: string;
|
|
12
|
+
videoDlpStatus: "Live" | "Playback";
|
|
13
|
+
onVideoAction?: (params: {
|
|
14
|
+
sectionName: "Live Video/Playback" | "Sampler Video" | "Video Player";
|
|
15
|
+
action: "Autoplay" | "Play" | "Pause";
|
|
16
|
+
dlpStatus?: "Live" | "Playback";
|
|
17
|
+
}) => void;
|
|
18
|
+
onSectionImpression?: (sectionName: string) => void;
|
|
19
|
+
onCarouselSwipe?: (params: {
|
|
20
|
+
sectionName: string;
|
|
21
|
+
elementPosition?: number;
|
|
22
|
+
}) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function LandingPage({ containerRef, stableStreamStatus, daysRemaining, isSubscribed, onJoinClick, onHeaderJoinClick, onSectionImpression, onCarouselSwipe, }: LandingPageProps): React.JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface LoggedOutSectionsProps {
|
|
3
|
+
onJoinClick?: () => void;
|
|
4
|
+
onSectionImpression?: (sectionName: string) => void;
|
|
5
|
+
onReviewsSwipe?: (elementPosition?: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const LoggedOutSections: React.FC<LoggedOutSectionsProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoggedOutSections } from './LoggedOutSections';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SubscriptionRecord } from '../../hooks/useSubscriptionStatus';
|
|
3
|
+
import { SubscriptionApiBaseInstanceLike } from '../../hooks/useSubscriptionSectionData';
|
|
4
|
+
export interface MyPlanCardProps {
|
|
5
|
+
/** The active subscription record from useSubscriptionStatus */
|
|
6
|
+
subscription: SubscriptionRecord;
|
|
7
|
+
/** Store id for onboarding API */
|
|
8
|
+
storeId?: string;
|
|
9
|
+
/** Inventory id for onboarding API */
|
|
10
|
+
inventoryId?: string;
|
|
11
|
+
/** Onboarding type (default sm_dlp_premium) */
|
|
12
|
+
onboardingType?: string;
|
|
13
|
+
/** Host API base instance */
|
|
14
|
+
apiBaseInstance?: SubscriptionApiBaseInstanceLike;
|
|
15
|
+
}
|
|
16
|
+
export declare const MyPlanCard: React.FC<MyPlanCardProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ShareSectionProps {
|
|
3
|
+
/** Called when the Share on WhatsApp button is tapped */
|
|
4
|
+
onShare?: () => void;
|
|
5
|
+
/** User identifier used for share attribution query param. */
|
|
6
|
+
shareUserId?: string | number;
|
|
7
|
+
}
|
|
8
|
+
export declare const ShareSection: React.FC<ShareSectionProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StoreCard {
|
|
3
|
+
/** Unique identifier */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Canonical store id for analytics tracking. */
|
|
6
|
+
storeId?: string;
|
|
7
|
+
/** Service type for analytics (e.g. puja/chadhava). */
|
|
8
|
+
serviceType?: string;
|
|
9
|
+
/** Raw amount/price for analytics. */
|
|
10
|
+
amount?: number;
|
|
11
|
+
/** SKU name for analytics. */
|
|
12
|
+
skuName?: string;
|
|
13
|
+
/** Card image URL */
|
|
14
|
+
imageUrl: string;
|
|
15
|
+
/** Optional badge text shown over the image (e.g. "Maa Bagalamukhi Jayanti") */
|
|
16
|
+
badge?: string;
|
|
17
|
+
/** Card title */
|
|
18
|
+
title: string;
|
|
19
|
+
/** Temple / location name */
|
|
20
|
+
temple: string;
|
|
21
|
+
/** Date string (e.g. "2 April, Thursday, Chaitra Shukla Purni...") */
|
|
22
|
+
date: string;
|
|
23
|
+
/** Destination URL (with UTM params already appended by the caller) */
|
|
24
|
+
href: string;
|
|
25
|
+
}
|
|
26
|
+
export interface StoreSectionA4BApiLike {
|
|
27
|
+
apiInstance?: {
|
|
28
|
+
get?: <T = unknown>(url: string, config?: {
|
|
29
|
+
params?: Record<string, unknown>;
|
|
30
|
+
headers?: Record<string, string>;
|
|
31
|
+
}) => Promise<{
|
|
32
|
+
data: T;
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface StoreSectionProps {
|
|
37
|
+
/** Called when a card is tapped — receives the card data */
|
|
38
|
+
onCardClick?: (card: StoreCard) => void;
|
|
39
|
+
/** Host app API client (same instance pattern as web app pages). */
|
|
40
|
+
a4bApi?: StoreSectionA4BApiLike;
|
|
41
|
+
/** Feed page key(s) for store card fetch. Comma-separated pages are fetched in parallel. */
|
|
42
|
+
storeCardsPage?: string;
|
|
43
|
+
/** Optional headers used when calling feed API. */
|
|
44
|
+
storeCardsHeaders?: Record<string, string>;
|
|
45
|
+
/** Maximum cards for Explore Sri Mandir. */
|
|
46
|
+
storeCardsLimit?: number;
|
|
47
|
+
/** Called whenever fetched store cards are resolved. */
|
|
48
|
+
onCardsResolved?: (cards: StoreCard[]) => void;
|
|
49
|
+
/** Called on horizontal scroll in store carousel. */
|
|
50
|
+
onSwipe?: (params: {
|
|
51
|
+
elementPosition?: number;
|
|
52
|
+
card?: StoreCard;
|
|
53
|
+
}) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare const StoreSection: React.FC<StoreSectionProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type WorkerInput = {
|
|
2
|
+
cards: any[];
|
|
3
|
+
limit: number;
|
|
4
|
+
};
|
|
5
|
+
declare const FALLBACK_STORE_BASE_URL = "https://www.srimandir.com";
|
|
6
|
+
declare const normalizeStoreSlug: (rawSlug?: string | null) => string | undefined;
|
|
7
|
+
declare const resolveStoreSlug: (item: any) => string | undefined;
|
|
8
|
+
declare const resolveStoreHref: (item: any) => string;
|
|
9
|
+
declare const mapFeedCardsToStoreCards: (cards: any[], limit: number) => {
|
|
10
|
+
id: any;
|
|
11
|
+
imageUrl: any;
|
|
12
|
+
badge: any;
|
|
13
|
+
title: any;
|
|
14
|
+
temple: any;
|
|
15
|
+
date: any;
|
|
16
|
+
href: string;
|
|
17
|
+
}[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface StreakSectionProps {
|
|
3
|
+
/** Days the user has attended (1-indexed day numbers) */
|
|
4
|
+
attendedDays: number[];
|
|
5
|
+
/** Total days in the journey (default 7) */
|
|
6
|
+
totalDays?: number;
|
|
7
|
+
/** Current day number in the journey (1-indexed) */
|
|
8
|
+
currentDay: number;
|
|
9
|
+
/** If true, renders empty/locked state instead of streak trail. */
|
|
10
|
+
isInactive?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const StreakSection: React.FC<StreakSectionProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { OnboardingData, SubscriptionApiBaseInstanceLike, SubscriptionInfo, TrialSubscriptionData } from '../../hooks/useSubscriptionSectionData';
|
|
3
|
+
export interface SubscriptionCtaContext {
|
|
4
|
+
subscriptionInfo: SubscriptionInfo | null;
|
|
5
|
+
trialSubscriptionData: TrialSubscriptionData | null;
|
|
6
|
+
onboardingData: OnboardingData | null;
|
|
7
|
+
}
|
|
8
|
+
export type SubscriptionBannerType = "default" | "blocker";
|
|
9
|
+
export interface SubscriptionClickMeta {
|
|
10
|
+
bannerType: SubscriptionBannerType;
|
|
11
|
+
}
|
|
12
|
+
export interface SubscriptionSectionProps {
|
|
13
|
+
/** Backend store id for onboarding API */
|
|
14
|
+
storeId?: string;
|
|
15
|
+
/** Backend inventory id for onboarding API */
|
|
16
|
+
inventoryId?: string;
|
|
17
|
+
/** Onboarding type query param (default sm_dlp_premium) */
|
|
18
|
+
onboardingType?: string;
|
|
19
|
+
/** Host API base instance (axios-like) */
|
|
20
|
+
apiBaseInstance?: SubscriptionApiBaseInstanceLike;
|
|
21
|
+
/** Called when the CTA button is tapped */
|
|
22
|
+
onSubscribe?: (context: SubscriptionCtaContext, meta: SubscriptionClickMeta) => void;
|
|
23
|
+
/** Distinguishes default subscription banner vs blocker banner */
|
|
24
|
+
bannerType?: SubscriptionBannerType;
|
|
25
|
+
/** Optional extra bottom padding in px to slightly increase banner height */
|
|
26
|
+
extraBottomPaddingPx?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare const SubscriptionSection: React.FC<SubscriptionSectionProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface HanumanChalisaAnalytics {
|
|
3
|
+
trackLandingPageViewed?(): void;
|
|
4
|
+
trackNameClicked?(): void;
|
|
5
|
+
trackNameFilled?(): void;
|
|
6
|
+
trackPhoneClicked?(): void;
|
|
7
|
+
trackPhoneFilled?(): void;
|
|
8
|
+
trackSubmitClicked?(): void;
|
|
9
|
+
trackSuccessPageViewed?(params: {
|
|
10
|
+
name?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
phone?: string;
|
|
13
|
+
}): void;
|
|
14
|
+
trackWhatsappBtnClicked?(): void;
|
|
15
|
+
}
|
|
16
|
+
interface SuccessPageProps {
|
|
17
|
+
userName?: string;
|
|
18
|
+
eventName?: string;
|
|
19
|
+
eventDate?: string;
|
|
20
|
+
eventTime?: string;
|
|
21
|
+
onWhatsAppClick?: () => void;
|
|
22
|
+
redirectSeconds?: number;
|
|
23
|
+
/** Analytics callbacks for tracking events */
|
|
24
|
+
analytics?: HanumanChalisaAnalytics;
|
|
25
|
+
/** Toast function to show notifications (type: 'success' | 'error' | 'warning', message: string) */
|
|
26
|
+
showToast?: (type: 'success' | 'error' | 'warning' | 'info', message: string) => void;
|
|
27
|
+
/** Disable automatic redirect (for debugging) */
|
|
28
|
+
disableRedirect?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const SuccessPage: React.FC<SuccessPageProps>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SuccessPage } from './SuccessPage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TrustMarkers } from './TrustMarkers';
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BannerOfferingItem } from './offerings';
|
|
3
|
+
import { StoreCard, StoreSectionA4BApiLike } from '../StoreSection';
|
|
4
|
+
import { SubscriptionCtaContext } from '../SubscriptionSection';
|
|
5
|
+
import { DlpExitAnalyticsAction } from '../../utils/exitAnalytics';
|
|
6
|
+
import { ContentEnvironment, DlpOfferingCard } from '../../types/videoPage.types';
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
YT?: any;
|
|
10
|
+
Hls?: any;
|
|
11
|
+
onYouTubeIframeAPIReady?: () => void;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
interface VideoPageProps {
|
|
15
|
+
videoId: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
chatHost?: string;
|
|
18
|
+
contentEnvironment?: ContentEnvironment;
|
|
19
|
+
isGlobal?: boolean;
|
|
20
|
+
onOfferingClick?: ((item?: DlpOfferingCard | BannerOfferingItem | any) => void | Promise<void>) | undefined;
|
|
21
|
+
onPujaImpression?: (params: {
|
|
22
|
+
orientation: "vertical" | "horizontal";
|
|
23
|
+
amount?: number;
|
|
24
|
+
skuName?: string;
|
|
25
|
+
featureServiceType?: "Puja" | "Chadhava" | "Live offering";
|
|
26
|
+
countOfOfferingSku?: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
onPujaClick?: (params: {
|
|
29
|
+
orientation: "vertical" | "horizontal";
|
|
30
|
+
amount?: number;
|
|
31
|
+
skuName?: string;
|
|
32
|
+
featureServiceType?: "Puja" | "Chadhava" | "Live offering";
|
|
33
|
+
countOfOfferingSku?: number;
|
|
34
|
+
elementPosition?: number;
|
|
35
|
+
}) => void;
|
|
36
|
+
/** Days the user has attended (1-indexed). Passed to StreakSection. */
|
|
37
|
+
attendedDays?: number[];
|
|
38
|
+
/** Current day in the 7-day journey (1-indexed). */
|
|
39
|
+
currentDay?: number;
|
|
40
|
+
/** Controls logged-in vs logged-out sections below video. */
|
|
41
|
+
isLoggedIn?: boolean;
|
|
42
|
+
/** Called when a store card is tapped. */
|
|
43
|
+
onStoreCardClick?: (card: StoreCard) => void;
|
|
44
|
+
/** Called when store carousel is swiped/scrolled. */
|
|
45
|
+
onStoreSwipe?: (params: {
|
|
46
|
+
elementPosition?: number;
|
|
47
|
+
card?: StoreCard;
|
|
48
|
+
}) => void;
|
|
49
|
+
/** Called when store cards are fetched/resolved. */
|
|
50
|
+
onStoreCardsResolved?: (cards: StoreCard[]) => void;
|
|
51
|
+
/** Host app API client (same instance pattern as web app pages). */
|
|
52
|
+
a4bApi?: StoreSectionA4BApiLike;
|
|
53
|
+
/** Feed page key for store card fetch. */
|
|
54
|
+
storeCardsPage?: string;
|
|
55
|
+
/** Optional headers used when calling feed API. */
|
|
56
|
+
storeCardsHeaders?: Record<string, string>;
|
|
57
|
+
/** Maximum cards for Explore Sri Mandir. */
|
|
58
|
+
storeCardsLimit?: number;
|
|
59
|
+
/** Called when Share on WhatsApp is tapped. */
|
|
60
|
+
onShare?: () => void;
|
|
61
|
+
/** User identifier forwarded by host for share link attribution. */
|
|
62
|
+
shareUserId?: string | number;
|
|
63
|
+
/** Show Subscription tab (D6+ and not yet subscribed). */
|
|
64
|
+
showSubscription?: boolean;
|
|
65
|
+
/** Called when subscription CTA is tapped */
|
|
66
|
+
onSubscribe?: (context: SubscriptionCtaContext, meta: {
|
|
67
|
+
bannerType: "default" | "blocker";
|
|
68
|
+
}) => void;
|
|
69
|
+
/** Called when logged-out sticky join CTA is tapped. */
|
|
70
|
+
onJoinClick?: () => void;
|
|
71
|
+
/** Called when logged-out header Join Free CTA is tapped. */
|
|
72
|
+
onHeaderJoinClick?: () => void;
|
|
73
|
+
/** Called when landscape drawer toggle is clicked. */
|
|
74
|
+
onLandscapeDrawerClick?: () => void;
|
|
75
|
+
/** Called when WhatsApp verify is clicked in post-login verification sheet. */
|
|
76
|
+
onWhatsappVerifyClick?: () => void;
|
|
77
|
+
/** Called when a major section becomes visible. */
|
|
78
|
+
onSectionImpression?: (sectionName: string) => void;
|
|
79
|
+
/** Called with time spent in a major section. */
|
|
80
|
+
onSectionTimeSpent?: (params: {
|
|
81
|
+
sectionName: string;
|
|
82
|
+
timeSpent: number;
|
|
83
|
+
}) => void;
|
|
84
|
+
/** Called on carousel swipe interactions. */
|
|
85
|
+
onCarouselSwipe?: (params: {
|
|
86
|
+
sectionName: string;
|
|
87
|
+
elementPosition?: number;
|
|
88
|
+
}) => void;
|
|
89
|
+
/** Called for video actions such as autoplay. */
|
|
90
|
+
onVideoAction?: (params: {
|
|
91
|
+
sectionName: "Live Video/Playback" | "Sampler Video" | "Video Player";
|
|
92
|
+
action: "Autoplay" | "Play" | "Pause";
|
|
93
|
+
dlpStatus?: "Live" | "Playback";
|
|
94
|
+
}) => void;
|
|
95
|
+
/** Called when user interacts with the embedded chat input area. */
|
|
96
|
+
onChatInputInteraction?: (params: {
|
|
97
|
+
inputValue?: string;
|
|
98
|
+
}) => void;
|
|
99
|
+
/** Store id used for subscription onboarding API */
|
|
100
|
+
subscriptionStoreId?: string;
|
|
101
|
+
/** Inventory id used for subscription onboarding API */
|
|
102
|
+
subscriptionInventoryId?: string;
|
|
103
|
+
/** Onboarding type used for subscription onboarding API */
|
|
104
|
+
subscriptionOnboardingType?: string;
|
|
105
|
+
/** Called when streak-derived days remaining changes. Useful for host to pass trial_days to place order. */
|
|
106
|
+
onStreakUpdate?: (params: {
|
|
107
|
+
daysRemaining: number;
|
|
108
|
+
currentDay: number;
|
|
109
|
+
totalDays: number;
|
|
110
|
+
}) => void;
|
|
111
|
+
/** Emits hook-derived analytics context to host for event enrichment. */
|
|
112
|
+
onAnalyticsContextUpdate?: (params: {
|
|
113
|
+
subscription_status?: string;
|
|
114
|
+
subscription_amount?: number;
|
|
115
|
+
subscription_count?: number;
|
|
116
|
+
video_orientation?: "portrait" | "landscape";
|
|
117
|
+
store_id?: string;
|
|
118
|
+
screen_name?: string;
|
|
119
|
+
source?: string;
|
|
120
|
+
attendance_start_at?: number;
|
|
121
|
+
current_streak_count?: number;
|
|
122
|
+
last_streak_count?: number;
|
|
123
|
+
days_since_last_streak_ended?: number;
|
|
124
|
+
total_days_attended?: number;
|
|
125
|
+
service_name?: string;
|
|
126
|
+
successful_subscription_order?: number;
|
|
127
|
+
"Trial End Date"?: string;
|
|
128
|
+
count_of_offering_sku?: number;
|
|
129
|
+
dlp_status?: "Live" | "Playback";
|
|
130
|
+
}) => void;
|
|
131
|
+
/** Emits exit analytics action for host tracking. */
|
|
132
|
+
onExitAnalytics?: (action: DlpExitAnalyticsAction) => void;
|
|
133
|
+
}
|
|
134
|
+
export declare const VideoPage: React.FC<VideoPageProps>;
|
|
135
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VideoPage } from './VideoPage';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const OFFERING_RAZORPAY_LINKS: {
|
|
2
|
+
readonly sindoor: "https://rzp.io/rzp/Pb7xgDj";
|
|
3
|
+
readonly peda: "https://rzp.io/rzp/LfL86khp";
|
|
4
|
+
readonly sindoorPeda: "https://rzp.io/rzp/NM9b4lx";
|
|
5
|
+
};
|
|
6
|
+
export interface BannerOfferingItem {
|
|
7
|
+
inventory_id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
price: number;
|
|
10
|
+
razorpay_link: string;
|
|
11
|
+
image_url: string;
|
|
12
|
+
original_price?: string;
|
|
13
|
+
discount?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface BannerItemGroup {
|
|
16
|
+
afterTime: string;
|
|
17
|
+
items: BannerOfferingItem[];
|
|
18
|
+
}
|
|
19
|
+
export declare const BANNER_ITEMS: BannerItemGroup[];
|
|
20
|
+
/**
|
|
21
|
+
* Puja banner image URL.
|
|
22
|
+
* TODO: Replace with actual puja banner image URL.
|
|
23
|
+
* The same image is used on the Hanuman Chalisa page and in offerings.
|
|
24
|
+
*/
|
|
25
|
+
export declare const PUJA_BANNER_IMAGE_URL = "";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface RazorpayOptions {
|
|
2
|
+
key: string;
|
|
3
|
+
amount: number;
|
|
4
|
+
currency: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
image?: string;
|
|
8
|
+
order_id?: string;
|
|
9
|
+
handler: (response: RazorpayResponse) => void;
|
|
10
|
+
prefill?: {
|
|
11
|
+
name?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
contact?: string;
|
|
14
|
+
};
|
|
15
|
+
theme?: {
|
|
16
|
+
color?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface RazorpayResponse {
|
|
20
|
+
razorpay_payment_id: string;
|
|
21
|
+
razorpay_order_id?: string;
|
|
22
|
+
razorpay_signature?: string;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface Window {
|
|
26
|
+
Razorpay: any;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare const initiateRazorpayPayment: (options: RazorpayOptions) => void;
|
|
30
|
+
export declare const createOfferingPayment: (offering: {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
price: number;
|
|
34
|
+
image: string;
|
|
35
|
+
}, onSuccess: (response: RazorpayResponse) => void, onError?: (error: any) => void) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface WhatsappVerificationSheetProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onVerifyWhatsapp: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const WhatsappVerificationSheet: React.FC<WhatsappVerificationSheetProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const ISD_COUNTRY_OPTIONS: readonly [{
|
|
2
|
+
readonly code: "+1";
|
|
3
|
+
readonly country: "USA";
|
|
4
|
+
}, {
|
|
5
|
+
readonly code: "+44";
|
|
6
|
+
readonly country: "UK";
|
|
7
|
+
}, {
|
|
8
|
+
readonly code: "+61";
|
|
9
|
+
readonly country: "AUS";
|
|
10
|
+
}, {
|
|
11
|
+
readonly code: "+91";
|
|
12
|
+
readonly country: "IN";
|
|
13
|
+
}, {
|
|
14
|
+
readonly code: "+971";
|
|
15
|
+
readonly country: "UAE";
|
|
16
|
+
}];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const SHARE_TITLE = "Share the Blessings";
|
|
2
|
+
export declare const SHARE_SUBTITLE = "Invite family to join daily Puja. Bring change to their lives.";
|
|
3
|
+
export declare const SHARE_CTA_LABEL = "Share on WhatsApp";
|
|
4
|
+
export declare const SHARE_MESSAGE_TEMPLATE = "Hey, I started this 7-day sadhna journey recently.\n\nIt\u2019s just 15 minutes every day, and happens live from the ghats of Ganga Ghat. It\u2019s been a really calming, grounding experience so far.\n\nIf you feel like trying something like this, join here:\n{CTA_LINK}";
|
|
5
|
+
export declare const STREAK_SECTION_TITLE = "Your 7-Day Journey";
|
|
6
|
+
export declare const STREAK_ATTENDED_ICON_URL = "https://srm-cdn.a4b.io/yoda/1776256998292.svg";
|
|
7
|
+
export declare const STREAK_MISSED_ICON_URL = "https://srm-cdn.a4b.io/yoda/1776411247834.svg";
|
|
8
|
+
export declare const STREAK_FOOTER: (attended: number, total: number) => string;
|
|
9
|
+
export declare const STREAK_SUBSCRIPTION_HINT_TEXT = "After Day 7th, Continue with a weekly subscription for unlimited access.";
|
|
10
|
+
export declare const STORE_SECTION_TITLE = "Explore Sri Mandir";
|
|
11
|
+
export declare const STORE_SECTION_ARIA_LABEL = "Explore Sri Mandir";
|
|
12
|
+
export declare const SUBSCRIPTION_BADGE = "BEST VALUE";
|
|
13
|
+
export declare const SUBSCRIPTION_TITLE = "Unlimited Daily Puja";
|
|
14
|
+
export declare const SUBSCRIPTION_SUBTITLE = "Never miss a sacred morning. Subscribe for full access, every day.";
|
|
15
|
+
export declare const SUBSCRIPTION_FEATURE_1 = "Unlimited live access, every single day";
|
|
16
|
+
export declare const SUBSCRIPTION_FEATURE_2 = "Daily WhatsApp reminders before Puja start";
|
|
17
|
+
export declare const SUBSCRIPTION_OM_IMAGE_URL = "https://srm-cdn.a4b.io/yoda/1776255523256.png";
|
|
18
|
+
export declare const SUBSCRIPTION_PRICE_PERIOD = "/ Week";
|
|
19
|
+
export declare const SUBSCRIPTION_CTA_LABEL = "Start Subscription";
|
|
20
|
+
export declare const SUBSCRIPTION_FOOTER_NOTE = "No charge today. Cancel Anytime";
|