@srimandir/kundli-generator 10.0.2 → 10.0.4
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/analytics-C7q6coqa.js +5099 -0
- package/dist/analytics-C7q6coqa.js.map +1 -0
- package/dist/analytics.d.ts +308 -0
- package/dist/components/KundliForm/KundliForm.d.ts +50 -0
- package/dist/components/KundliForm/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/FormHeader/FormHeader.d.ts +7 -0
- package/dist/components/KundliForm/sections/FormHeader/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/ProceedFooter/ProceedFooter.d.ts +28 -0
- package/dist/components/KundliForm/sections/ProceedFooter/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/UserInfoFormSection.d.ts +20 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/constants.d.ts +215 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/googlePlacesAutocomplete.d.ts +21 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/useAtlasPlacesAutocomplete.d.ts +22 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete.d.ts +51 -0
- package/dist/components/KundliForm/sections/index.d.ts +3 -0
- package/dist/components/KundliPage/KundliContext.d.ts +108 -0
- package/dist/components/KundliPage/KundliPage.d.ts +92 -0
- package/dist/components/KundliPage/KundliPageV1.d.ts +98 -0
- package/dist/components/KundliPage/KundliPageVariant.d.ts +10 -0
- package/dist/components/KundliPage/index.d.ts +4 -0
- package/dist/components/KundliPage/sections/CTAFooter/CTAFooter.d.ts +15 -0
- package/dist/components/KundliPage/sections/CTAFooter/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ContactUsSection/ContactUsSection.d.ts +9 -0
- package/dist/components/KundliPage/sections/ContactUsSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FAQSection/FAQSection.d.ts +8 -0
- package/dist/components/KundliPage/sections/FAQSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FeedbackSection/FeedbackSection.d.ts +13 -0
- package/dist/components/KundliPage/sections/FeedbackSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/HeroSection/HeroSection.d.ts +5 -0
- package/dist/components/KundliPage/sections/HeroSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/KundliHeader/KundliHeader.d.ts +7 -0
- package/dist/components/KundliPage/sections/KundliHeader/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/KundliTableSection/KundliTableSection.constants.d.ts +36 -0
- package/dist/components/KundliPage/sections/KundliTableSection/SampleReportsSection.d.ts +10 -0
- package/dist/components/KundliPage/sections/KundliTableSection/index.d.ts +3 -0
- package/dist/components/KundliPage/sections/PremiumReportOverview/PremiumReportOverview.d.ts +26 -0
- package/dist/components/KundliPage/sections/PremiumReportOverview/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ThreeStepsProcess/ThreeStepsProcess.d.ts +8 -0
- package/dist/components/KundliPage/sections/ThreeStepsProcess/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/UniversityCertification/UniversityCertification.d.ts +7 -0
- package/dist/components/KundliPage/sections/UniversityCertification/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/UtmBannerSection/UtmBannerSection.d.ts +8 -0
- package/dist/components/KundliPage/sections/UtmBannerSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ViewSampleReportButton/SampleReportModal.d.ts +8 -0
- package/dist/components/KundliPage/sections/ViewSampleReportButton/ViewSampleReportButton.d.ts +14 -0
- package/dist/components/KundliPage/sections/ViewSampleReportButton/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/WhatYoullFindSection/WhatYoullFindSection.d.ts +7 -0
- package/dist/components/KundliPage/sections/WhatYoullFindSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/WhyUsSection/WhyUsSection.d.ts +5 -0
- package/dist/components/KundliPage/sections/WhyUsSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/index.d.ts +13 -0
- package/dist/components/KundliPlanBottomSheet/AstrologerCard.d.ts +10 -0
- package/dist/components/KundliPlanBottomSheet/AstrologerDetails.d.ts +19 -0
- package/dist/components/KundliPlanBottomSheet/ConsultationSlotFields.d.ts +54 -0
- package/dist/components/KundliPlanBottomSheet/ConsultationSlotModal.d.ts +6 -0
- package/dist/components/KundliPlanBottomSheet/KundliPlanBottomSheet.d.ts +37 -0
- package/dist/components/KundliPlanBottomSheet/MostPopularBadge.d.ts +4 -0
- package/dist/components/KundliPlanBottomSheet/PlanCard.d.ts +19 -0
- package/dist/components/KundliPlanBottomSheet/PlanFeatureList.d.ts +10 -0
- package/dist/components/KundliPlanBottomSheet/PlanIcons.d.ts +18 -0
- package/dist/components/KundliPlanBottomSheet/PlanSheetHeader.d.ts +9 -0
- package/dist/components/KundliPlanBottomSheet/consultationSlotDefaults.d.ts +44 -0
- package/dist/components/KundliPlanBottomSheet/index.d.ts +7 -0
- package/dist/components/KundliPlanBottomSheet/planDefaults.d.ts +2 -0
- package/dist/components/KundliPlanBottomSheet/types.d.ts +67 -0
- package/dist/components/ThreeSkuPlanBottomSheet/AstrologerSection.d.ts +8 -0
- package/dist/components/ThreeSkuPlanBottomSheet/PlanFeatureList.d.ts +7 -0
- package/dist/components/ThreeSkuPlanBottomSheet/PlanSelectorStrip.d.ts +11 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ProceedButton.d.ts +9 -0
- package/dist/components/ThreeSkuPlanBottomSheet/QuestionChips.d.ts +7 -0
- package/dist/components/ThreeSkuPlanBottomSheet/QuestionInput.d.ts +15 -0
- package/dist/components/ThreeSkuPlanBottomSheet/SheetHeader.d.ts +6 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ThreeSkuAstrologerCard.d.ts +6 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ThreeSkuAstrologerProfiles.d.ts +15 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ThreeSkuPlanBottomSheet.d.ts +3 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ThreeSkuPlanBottomSheet.icons.d.ts +3 -0
- package/dist/components/ThreeSkuPlanBottomSheet/ThreeSkuPlanBottomSheet.types.d.ts +61 -0
- package/dist/components/ThreeSkuPlanBottomSheet/constants.d.ts +113 -0
- package/dist/components/ThreeSkuPlanBottomSheet/index.d.ts +4 -0
- package/dist/constants/criticalCss.d.ts +12 -0
- package/dist/criticalCss-Dwemq76K.js +2063 -0
- package/dist/criticalCss-Dwemq76K.js.map +1 -0
- package/dist/dev/main.d.ts +0 -0
- package/dist/form-entry.d.ts +15 -0
- package/dist/form-entry.js +21 -0
- package/dist/form-entry.js.map +1 -0
- package/dist/i18n/I18nContext.d.ts +18 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/translations.d.ts +4 -0
- package/dist/i18n/translations.en.d.ts +163 -0
- package/dist/i18n/translations.hi.d.ts +163 -0
- package/dist/index.d.ts +17 -0
- package/dist/kundli-generator.js +66 -0
- package/dist/kundli-generator.js.map +1 -0
- package/dist/page-entry.d.ts +16 -0
- package/dist/page-entry.js +24 -0
- package/dist/page-entry.js.map +1 -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/image.d.ts +17 -0
- package/dist/utils/Stringconstant.d.ts +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/keyframeStyles.d.ts +10 -0
- package/dist/utils/localeStorage.d.ts +10 -0
- package/dist/utils/phone.d.ts +26 -0
- package/dist/utils/storage.d.ts +7 -0
- package/dist/utils/utmBanner.d.ts +23 -0
- package/package.json +2 -2
package/dist/components/KundliForm/sections/UserInfoFormSection/useAtlasPlacesAutocomplete.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AtlasSearchLocalities } from './useGooglePlacesAutocomplete';
|
|
2
|
+
export interface AtlasPrediction {
|
|
3
|
+
id: string;
|
|
4
|
+
description: string;
|
|
5
|
+
secondary_text?: string;
|
|
6
|
+
lat: number;
|
|
7
|
+
lng: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Atlas-backed birth place autocomplete. Used when `googleMapsAutocompleteEnabled`
|
|
11
|
+
* is false, as an alternative to `useGooglePlacesAutocomplete`.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useAtlasPlacesAutocomplete: (params: {
|
|
14
|
+
searchLocalities?: AtlasSearchLocalities;
|
|
15
|
+
restrictCountry?: string;
|
|
16
|
+
}) => {
|
|
17
|
+
predictions: AtlasPrediction[];
|
|
18
|
+
isSearching: boolean;
|
|
19
|
+
loadError: string | null;
|
|
20
|
+
searchPlaces: (query: string) => Promise<void>;
|
|
21
|
+
clearPredictions: () => void;
|
|
22
|
+
};
|
package/dist/components/KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface PlacePrediction {
|
|
2
|
+
place_id: string;
|
|
3
|
+
description: string;
|
|
4
|
+
structured_formatting: {
|
|
5
|
+
main_text: string;
|
|
6
|
+
secondary_text: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface PlaceDetails {
|
|
10
|
+
display_name: string;
|
|
11
|
+
lat: number;
|
|
12
|
+
lng: number;
|
|
13
|
+
city?: string;
|
|
14
|
+
state?: string;
|
|
15
|
+
country?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Atlas locality search types are kept for API compatibility with consumers
|
|
19
|
+
* that still pass an `atlasSearchLocalities` callback. Birth place
|
|
20
|
+
* autocomplete itself is powered by Google Places (see
|
|
21
|
+
* `useGooglePlacesAutocomplete` below); Atlas is accepted but not consumed.
|
|
22
|
+
*/
|
|
23
|
+
export interface AtlasSearchOptions {
|
|
24
|
+
limit?: number;
|
|
25
|
+
offset?: number;
|
|
26
|
+
restrictCountry?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AtlasPlaceOption {
|
|
29
|
+
id: string;
|
|
30
|
+
description: string;
|
|
31
|
+
secondaryText?: string;
|
|
32
|
+
lat: number;
|
|
33
|
+
lng: number;
|
|
34
|
+
}
|
|
35
|
+
export type AtlasSearchLocalities = (query: string, options?: AtlasSearchOptions) => Promise<AtlasPlaceOption[]>;
|
|
36
|
+
export declare const useGooglePlacesAutocomplete: (params: {
|
|
37
|
+
apiKey?: string;
|
|
38
|
+
language?: string;
|
|
39
|
+
restrictCountry?: string;
|
|
40
|
+
/** If true, defer loading until explicitly triggered (default: false) */
|
|
41
|
+
deferLoad?: boolean;
|
|
42
|
+
}) => {
|
|
43
|
+
isLoaded: boolean;
|
|
44
|
+
predictions: PlacePrediction[];
|
|
45
|
+
isSearching: boolean;
|
|
46
|
+
loadError: string | null;
|
|
47
|
+
searchPlaces: (query: string) => Promise<void>;
|
|
48
|
+
getPlaceDetails: (placeId: string) => Promise<PlaceDetails | null>;
|
|
49
|
+
clearPredictions: () => void;
|
|
50
|
+
triggerLoad: () => void;
|
|
51
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
|
+
import { KundliAnalytics } from '../../analytics';
|
|
4
|
+
import { KundliImageComponent } from '../../types/image';
|
|
5
|
+
import { KundliPlan, FetchConsultationSlots } from '../KundliPlanBottomSheet';
|
|
6
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
7
|
+
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
8
|
+
export type KundliView = "landing" | "form";
|
|
9
|
+
export interface KundliContextConfig {
|
|
10
|
+
locale?: SupportedLocale;
|
|
11
|
+
showLanguageSelector?: boolean;
|
|
12
|
+
/** Whether to show the bottom sheet for plan selection (for v1) */
|
|
13
|
+
showSheet?: boolean;
|
|
14
|
+
userId?: number;
|
|
15
|
+
/** Whether the user is global (international) or domestic */
|
|
16
|
+
isGlobal?: boolean;
|
|
17
|
+
/** Variant identifier for analytics tracking */
|
|
18
|
+
variant?: string;
|
|
19
|
+
/** Pre-fills form values on mount (e.g. from URL query params on a deep-linked SEO flow). */
|
|
20
|
+
initialFormValues?: Partial<KundliFormValues>;
|
|
21
|
+
/** When true, automatically opens the plan selection bottom sheet once (requires variant "v1"). Used for deep-linked flows where the form is already fully pre-filled. */
|
|
22
|
+
autoOpenPlanSheet?: boolean;
|
|
23
|
+
/** Google Maps API key for birth place autocomplete */
|
|
24
|
+
googleMapsApiKey?: string;
|
|
25
|
+
/** Atlas localities search callback, used for Birth Place autocomplete when `googleMapsAutocompleteEnabled` is false. */
|
|
26
|
+
atlasSearchLocalities?: AtlasSearchLocalities;
|
|
27
|
+
/** When true (default), birth place autocomplete uses Google Places. When false, uses Atlas via `atlasSearchLocalities`. */
|
|
28
|
+
googleMapsAutocompleteEnabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Feature flag (experiment-controlled). When true, the Kundli plan selection sheet
|
|
31
|
+
* (`KundliPlanBottomSheet`) renders full-screen with the left-aligned header style,
|
|
32
|
+
* and selecting the astrologer-consultation plan opens the full-screen
|
|
33
|
+
* `ConsultationSlotModal` (date/time/topic picker) before proceeding to payment.
|
|
34
|
+
* When false (default), behavior is unchanged: bottom sheet, centered header,
|
|
35
|
+
* astrologer-consultation plan proceeds straight to payment.
|
|
36
|
+
*/
|
|
37
|
+
enableConsultationScheduling?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Fetches real consultation slot availability from the host app (no API/endpoint
|
|
40
|
+
* knowledge lives in this package). Called by `ConsultationSlotModal` when it opens.
|
|
41
|
+
*/
|
|
42
|
+
fetchConsultationSlots?: FetchConsultationSlots;
|
|
43
|
+
logoUrl?: string;
|
|
44
|
+
reportImageUrl?: string;
|
|
45
|
+
/** When true, LCP report image can be loaded with priority (e.g. next/image priority). */
|
|
46
|
+
reportImagePriority?: boolean;
|
|
47
|
+
/** When true, section background image (PremiumReportOverview) is loaded with priority for LCP. */
|
|
48
|
+
backgroundImagePriority?: boolean;
|
|
49
|
+
universityLogoUrls?: [string?, string?];
|
|
50
|
+
sampleReportHref?: string;
|
|
51
|
+
onViewSampleReport?: () => void;
|
|
52
|
+
ctaHref?: string;
|
|
53
|
+
onCtaClick?: () => void;
|
|
54
|
+
/** Called when form back is clicked (e.g. when form is shown standalone) */
|
|
55
|
+
onBack?: () => void;
|
|
56
|
+
readMoreReviewsHref?: string;
|
|
57
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
58
|
+
proceedHref?: string;
|
|
59
|
+
originalPriceLabel?: string;
|
|
60
|
+
discountedPriceLabel?: string;
|
|
61
|
+
discountPillLabel?: string;
|
|
62
|
+
analytics?: KundliAnalytics;
|
|
63
|
+
/** Callback for Guidance plan (749 price) specifically */
|
|
64
|
+
onProceedGuidance?: (values: KundliFormValues) => void;
|
|
65
|
+
/** Notify parent when user changes language (e.g. to keep form view in sync when switching from landing) */
|
|
66
|
+
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
67
|
+
/** Optional image component (e.g. next/image adapter) for optimized images. */
|
|
68
|
+
imageComponent?: KundliImageComponent;
|
|
69
|
+
/**
|
|
70
|
+
* Plans override for the plain plan sheet (`KundliPlanBottomSheet`). Lets the
|
|
71
|
+
* host app supply live pricing (e.g. from a catalog API) instead of the
|
|
72
|
+
* package's built-in hardcoded defaults. Falls back to `getDefaultPlans`
|
|
73
|
+
* when not set.
|
|
74
|
+
*/
|
|
75
|
+
plans?: KundliPlan[];
|
|
76
|
+
/**
|
|
77
|
+
* Plans override for the 3-SKU experiment sheet (`ThreeSkuPlanBottomSheet`),
|
|
78
|
+
* used when `enableThreeSkuFlow` is true. Falls back to
|
|
79
|
+
* `getThreeSkuDefaultPlans` when not set.
|
|
80
|
+
*/
|
|
81
|
+
threeSkuPlans?: ThreeSkuPlan[];
|
|
82
|
+
/**
|
|
83
|
+
* Pre-resolved UTM banner image URL (e.g. from getServerSideProps).
|
|
84
|
+
* When set, the matching banner image is shown in place of the default PremiumReportOverview section.
|
|
85
|
+
*/
|
|
86
|
+
resolvedUtmBannerImageUrl?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface KundliContextValue {
|
|
89
|
+
view: KundliView;
|
|
90
|
+
locale: SupportedLocale;
|
|
91
|
+
setLocale: (locale: SupportedLocale) => void;
|
|
92
|
+
config: KundliContextConfig;
|
|
93
|
+
formValues: KundliFormValues;
|
|
94
|
+
setFormValues: React.Dispatch<React.SetStateAction<KundliFormValues>>;
|
|
95
|
+
goToForm: () => void;
|
|
96
|
+
goToPage: () => void;
|
|
97
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
98
|
+
onProceedGuidance?: (values: KundliFormValues) => void;
|
|
99
|
+
}
|
|
100
|
+
declare const KundliContext: any;
|
|
101
|
+
export interface KundliProviderProps extends KundliContextConfig {
|
|
102
|
+
className?: string;
|
|
103
|
+
children?: React.ReactNode;
|
|
104
|
+
}
|
|
105
|
+
export declare const KundliProvider: React.FC<KundliProviderProps>;
|
|
106
|
+
export declare function useKundliContext(): KundliContextValue | null;
|
|
107
|
+
export declare function useKundliContextOrThrow(): KundliContextValue;
|
|
108
|
+
export { KundliContext };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
|
+
import { KundliAnalytics } from '../../analytics';
|
|
4
|
+
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
5
|
+
import { KundliPlan } from '../KundliPlanBottomSheet';
|
|
6
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
7
|
+
export interface KundliPageProps {
|
|
8
|
+
/** Optional CSS class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Language (en, hi). Overrides I18nProvider if set. Initial value when using dropdown. */
|
|
11
|
+
locale?: SupportedLocale;
|
|
12
|
+
/** Show language dropdown. Default true. */
|
|
13
|
+
showLanguageSelector?: boolean;
|
|
14
|
+
/** Show bottom sheet for plans in v1 variant */
|
|
15
|
+
showSheet?: boolean;
|
|
16
|
+
/** User ID from auth, for API calls etc. */
|
|
17
|
+
userId?: number;
|
|
18
|
+
/** Whether the user is global (international) or domestic */
|
|
19
|
+
isGlobal?: boolean;
|
|
20
|
+
/** Header logo URL */
|
|
21
|
+
logoUrl?: string;
|
|
22
|
+
/** Premium report cover image URL */
|
|
23
|
+
reportImageUrl?: string;
|
|
24
|
+
/** University logo URLs [BHU, VSU] */
|
|
25
|
+
universityLogoUrls?: [string?, string?];
|
|
26
|
+
/** Sample report link (opens in new tab) */
|
|
27
|
+
sampleReportHref?: string;
|
|
28
|
+
/** Called when "View Sample Report" is clicked (if sampleReportHref not set) */
|
|
29
|
+
onViewSampleReport?: () => void;
|
|
30
|
+
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA shows the Kundli form. */
|
|
31
|
+
ctaHref?: string;
|
|
32
|
+
/** Called when CTA button is clicked (if ctaHref not set). Also called after navigating to form when integrated. */
|
|
33
|
+
onCtaClick?: () => void;
|
|
34
|
+
/** Read more reviews link */
|
|
35
|
+
readMoreReviewsHref?: string;
|
|
36
|
+
/** Called when user proceeds from the form (e.g. to payment) */
|
|
37
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
38
|
+
/** Callback for Guidance plan (999 price) specifically */
|
|
39
|
+
onProceedGuidance?: (values: KundliFormValues) => void;
|
|
40
|
+
/** Form: proceed CTA as link */
|
|
41
|
+
proceedHref?: string;
|
|
42
|
+
/** Form: pricing labels */
|
|
43
|
+
originalPriceLabel?: string;
|
|
44
|
+
discountedPriceLabel?: string;
|
|
45
|
+
discountPillLabel?: string;
|
|
46
|
+
/** Optional analytics implementation for Mixpanel/tracking events */
|
|
47
|
+
analytics?: KundliAnalytics;
|
|
48
|
+
/** Notify when user changes language (e.g. to keep form view in sync when switching from landing) */
|
|
49
|
+
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
50
|
+
/** Google Maps API key for birth place autocomplete */
|
|
51
|
+
googleMapsApiKey?: string;
|
|
52
|
+
/** Atlas localities search callback, used for Birth Place autocomplete when `googleMapsAutocompleteEnabled` is false. */
|
|
53
|
+
atlasSearchLocalities?: AtlasSearchLocalities;
|
|
54
|
+
/** When true (default), birth place autocomplete uses Google Places. When false, uses Atlas via `atlasSearchLocalities`. */
|
|
55
|
+
googleMapsAutocompleteEnabled?: boolean;
|
|
56
|
+
/** Enables 3-SKU experiment flow when used with v1 variant. */
|
|
57
|
+
enableThreeSkuFlow?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Experiment-controlled feature flag (v1 variant only). When true, the Kundli plan
|
|
60
|
+
* sheet renders full-screen and the astrologer-consultation plan opens a full-screen
|
|
61
|
+
* scheduling modal before payment. When false (default), behavior is unchanged.
|
|
62
|
+
*/
|
|
63
|
+
enableConsultationScheduling?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Fetches real consultation slot availability from the host app (no API/endpoint
|
|
66
|
+
* knowledge lives in this package). Passed through to `KundliContext` and used by
|
|
67
|
+
* `ConsultationSlotModal` when it opens.
|
|
68
|
+
*/
|
|
69
|
+
fetchConsultationSlots?: import('../KundliPlanBottomSheet').FetchConsultationSlots;
|
|
70
|
+
/** URL for the "200+ page Kundli Report" sample link in 3-SKU table. */
|
|
71
|
+
kundliReportSampleHref?: string;
|
|
72
|
+
/** URL for the "1 Question" sample link in 3-SKU table. */
|
|
73
|
+
oneQuestionSampleHref?: string;
|
|
74
|
+
/**
|
|
75
|
+
/**
|
|
76
|
+
* Pre-resolved UTM banner image URL from the server (e.g. getServerSideProps).
|
|
77
|
+
* An empty string means "no banner" (show default PremiumReportOverview).
|
|
78
|
+
*/
|
|
79
|
+
resolvedUtmBannerImageUrl?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Plans override for the plain plan sheet (`KundliPlanBottomSheet`), shown
|
|
82
|
+
* when the CTA navigates to the form (`v1` variant, see `KundliForm`). Lets
|
|
83
|
+
* the host app supply live pricing (e.g. from a catalog API) instead of the
|
|
84
|
+
* package's built-in hardcoded defaults.
|
|
85
|
+
*/
|
|
86
|
+
plans?: KundliPlan[];
|
|
87
|
+
/**
|
|
88
|
+
* Plans override for the 3-SKU experiment sheet (`ThreeSkuPlanBottomSheet`).
|
|
89
|
+
*/
|
|
90
|
+
threeSkuPlans?: ThreeSkuPlan[];
|
|
91
|
+
}
|
|
92
|
+
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliPlan } from '../KundliPlanBottomSheet';
|
|
3
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
4
|
+
import { KundliFormValues } from '../KundliForm';
|
|
5
|
+
import { KundliAnalytics } from '../../analytics';
|
|
6
|
+
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
7
|
+
export interface KundliPageProps {
|
|
8
|
+
/** Optional CSS class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Language (en, hi). Overrides I18nProvider if set. Initial value when using dropdown. */
|
|
11
|
+
locale?: SupportedLocale;
|
|
12
|
+
/** Show language dropdown. Default true. */
|
|
13
|
+
showLanguageSelector?: boolean;
|
|
14
|
+
/** Show bottom sheet for plans in v1 variant */
|
|
15
|
+
showSheet?: boolean;
|
|
16
|
+
/** User ID from auth, for API calls etc. */
|
|
17
|
+
userId?: number;
|
|
18
|
+
/** Whether the user is global (international) or domestic */
|
|
19
|
+
isGlobal?: boolean;
|
|
20
|
+
/** Pre-fills form values on mount (e.g. from URL query params on a deep-linked SEO flow). */
|
|
21
|
+
initialFormValues?: Partial<KundliFormValues>;
|
|
22
|
+
/** When true, automatically opens the plan selection bottom sheet once on mount. Used for deep-linked flows where the form is already fully pre-filled. */
|
|
23
|
+
autoOpenPlanSheet?: boolean;
|
|
24
|
+
/** Header logo URL */
|
|
25
|
+
logoUrl?: string;
|
|
26
|
+
/** Premium report cover image URL */
|
|
27
|
+
reportImageUrl?: string;
|
|
28
|
+
/** University logo URLs [BHU, VSU] */
|
|
29
|
+
universityLogoUrls?: [string?, string?];
|
|
30
|
+
/** Sample report link (opens in new tab) */
|
|
31
|
+
sampleReportHref?: string;
|
|
32
|
+
/** Called when "View Sample Report" is clicked (if sampleReportHref not set) */
|
|
33
|
+
onViewSampleReport?: () => void;
|
|
34
|
+
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA shows the Kundli form. */
|
|
35
|
+
ctaHref?: string;
|
|
36
|
+
/** Called when CTA button is clicked (if ctaHref not set). Also called after navigating to form when integrated. */
|
|
37
|
+
onCtaClick?: () => void;
|
|
38
|
+
/** Read more reviews link */
|
|
39
|
+
readMoreReviewsHref?: string;
|
|
40
|
+
/** Called when user proceeds from the form (e.g. to payment) */
|
|
41
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
42
|
+
/** Callback for Guidance plan (999 price) specifically */
|
|
43
|
+
onProceedGuidance?: (values: KundliFormValues) => void;
|
|
44
|
+
/** Form: proceed CTA as link */
|
|
45
|
+
proceedHref?: string;
|
|
46
|
+
/** Form: pricing labels */
|
|
47
|
+
originalPriceLabel?: string;
|
|
48
|
+
discountedPriceLabel?: string;
|
|
49
|
+
discountPillLabel?: string;
|
|
50
|
+
/** Optional analytics implementation for Mixpanel/tracking events */
|
|
51
|
+
analytics?: KundliAnalytics;
|
|
52
|
+
/** Notify when user changes language (e.g. to keep form view in sync when switching from landing) */
|
|
53
|
+
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
54
|
+
/** Google Maps API key for birth place autocomplete */
|
|
55
|
+
googleMapsApiKey?: string;
|
|
56
|
+
/** Atlas localities search callback, used for Birth Place autocomplete when `googleMapsAutocompleteEnabled` is false. */
|
|
57
|
+
atlasSearchLocalities?: AtlasSearchLocalities;
|
|
58
|
+
/** When true (default), birth place autocomplete uses Google Places. When false, uses Atlas via `atlasSearchLocalities`. */
|
|
59
|
+
googleMapsAutocompleteEnabled?: boolean;
|
|
60
|
+
/** Enables 3-SKU experiment flow inside existing v1 page. */
|
|
61
|
+
enableThreeSkuFlow?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Experiment-controlled feature flag. When true, the Kundli plan sheet renders
|
|
64
|
+
* full-screen (matching header style) and the astrologer-consultation plan opens
|
|
65
|
+
* a full-screen date/time/topic scheduling modal before payment. When false
|
|
66
|
+
* (default), existing behavior is unchanged (bottom sheet, direct to payment).
|
|
67
|
+
*/
|
|
68
|
+
enableConsultationScheduling?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Fetches real consultation slot availability from the host app. Passed through
|
|
71
|
+
* to `KundliContext` and used by `ConsultationSlotModal` when it opens. No
|
|
72
|
+
* endpoint/URL knowledge lives in this package — the host app owns the API call.
|
|
73
|
+
*/
|
|
74
|
+
fetchConsultationSlots?: import('../KundliPlanBottomSheet').FetchConsultationSlots;
|
|
75
|
+
/** URL for the "200+ page Kundli Report" sample link in the 3-SKU table. */
|
|
76
|
+
kundliReportSampleHref?: string;
|
|
77
|
+
/** URL for the "1 Question" sample link in the 3-SKU table. */
|
|
78
|
+
oneQuestionSampleHref?: string;
|
|
79
|
+
/**
|
|
80
|
+
* CDN image URL map for UTM-based personalised banners.
|
|
81
|
+
/**
|
|
82
|
+
* Pre-resolved UTM banner image URL from the server (e.g. getServerSideProps).
|
|
83
|
+
* An empty string means "no banner" (show default PremiumReportOverview).
|
|
84
|
+
*/
|
|
85
|
+
resolvedUtmBannerImageUrl?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Plans override for the plain plan sheet (`KundliPlanBottomSheet`). Lets the
|
|
88
|
+
* host app supply live pricing (e.g. from a catalog API) instead of the
|
|
89
|
+
* package's built-in hardcoded defaults.
|
|
90
|
+
*/
|
|
91
|
+
plans?: KundliPlan[];
|
|
92
|
+
/**
|
|
93
|
+
* Plans override for the 3-SKU experiment sheet (`ThreeSkuPlanBottomSheet`),
|
|
94
|
+
* used when `enableThreeSkuFlow` is true.
|
|
95
|
+
*/
|
|
96
|
+
threeSkuPlans?: ThreeSkuPlan[];
|
|
97
|
+
}
|
|
98
|
+
export declare const KundliPageV1: React.FC<KundliPageProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KundliPageProps as BaseKundliPageProps } from './KundliPage';
|
|
2
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
|
+
export type KundliPageProps = BaseKundliPageProps & {
|
|
4
|
+
variant?: "v1";
|
|
5
|
+
/** Pre-fills form values on mount (e.g. from URL query params on a deep-linked SEO flow). Only applies when `variant="v1"`. */
|
|
6
|
+
initialFormValues?: Partial<KundliFormValues>;
|
|
7
|
+
/** When true, automatically opens the plan selection bottom sheet once on mount. Only applies when `variant="v1"`. */
|
|
8
|
+
autoOpenPlanSheet?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CTAFooterProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
/** CTA button click handler (receives click event for e.g. CTA text extraction) */
|
|
4
|
+
onCtaClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
5
|
+
/** Or use href for link instead of button */
|
|
6
|
+
ctaHref?: string;
|
|
7
|
+
/** Optional override for CTA label text */
|
|
8
|
+
ctaLabel?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Single row of trust badges for marquee (used in footer and under header). */
|
|
12
|
+
export declare const TrustBadgesRow: React.FC<{
|
|
13
|
+
t: (key: string) => string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const CTAFooter: React.FC<CTAFooterProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ContactUsSectionProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
whatsAppGlobal?: string;
|
|
4
|
+
whatsAppDomestic?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
brandName?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ContactUsSection: React.FC<ContactUsSectionProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface FAQSectionProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Optional class for the section heading (e.g. for font weight). Kundli uses bold by default. */
|
|
6
|
+
headingClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FAQSection: FC<FAQSectionProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { Testimonial } from '../../../../../../astrology-common/dist/index.js';
|
|
3
|
+
export type { Testimonial };
|
|
4
|
+
export interface FeedbackSectionProps {
|
|
5
|
+
t: (key: string) => string;
|
|
6
|
+
testimonials?: Testimonial[];
|
|
7
|
+
readMoreHref?: string;
|
|
8
|
+
onReadMore?: () => void;
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Optional class for the section heading (e.g. for font weight). Kundli uses bold by default. */
|
|
11
|
+
headingClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const FeedbackSection: FC<FeedbackSectionProps>;
|
package/dist/components/KundliPage/sections/KundliTableSection/KundliTableSection.constants.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../../../i18n/translations';
|
|
2
|
+
/** Per-locale "View Sample Report" PDF for the main Kundli report flow. */
|
|
3
|
+
export declare const SAMPLE_REPORT_PDF_URLS: Record<SupportedLocale, string>;
|
|
4
|
+
/** @deprecated Use SAMPLE_REPORT_PDF_URLS[locale] instead. Kept as the English fallback. */
|
|
5
|
+
export declare const DEFAULT_SAMPLE_URL: string;
|
|
6
|
+
export declare const DEFAULT_ONE_QUESTION_SAMPLE_URL = "https://srm-cdn.a4b.io/yoda/1781248337750.pdf";
|
|
7
|
+
export type TableLocale = "en" | "hi";
|
|
8
|
+
export declare const TABLE_STRINGS: Record<TableLocale, {
|
|
9
|
+
sectionTitle: string;
|
|
10
|
+
sampleReportsTitle: string;
|
|
11
|
+
onlyFor: string;
|
|
12
|
+
uniqueFeatures: string;
|
|
13
|
+
popularBadge: string;
|
|
14
|
+
columnKundliReport: string;
|
|
15
|
+
columnReportPlusQuestion: string;
|
|
16
|
+
columnReportPlusQuestionSubtext: string;
|
|
17
|
+
columnReportPlusConsultation: string;
|
|
18
|
+
sampleLabelKundliReport: string;
|
|
19
|
+
sampleLabelOneQuestion: string;
|
|
20
|
+
rowLabels: [string, string, string, string, string];
|
|
21
|
+
}>;
|
|
22
|
+
export declare const getTableStrings: (locale: TableLocale) => {
|
|
23
|
+
sectionTitle: string;
|
|
24
|
+
sampleReportsTitle: string;
|
|
25
|
+
onlyFor: string;
|
|
26
|
+
uniqueFeatures: string;
|
|
27
|
+
popularBadge: string;
|
|
28
|
+
columnKundliReport: string;
|
|
29
|
+
columnReportPlusQuestion: string;
|
|
30
|
+
columnReportPlusQuestionSubtext: string;
|
|
31
|
+
columnReportPlusConsultation: string;
|
|
32
|
+
sampleLabelKundliReport: string;
|
|
33
|
+
sampleLabelOneQuestion: string;
|
|
34
|
+
rowLabels: [string, string, string, string, string];
|
|
35
|
+
};
|
|
36
|
+
export declare const SampleReportArrowIcon: () => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
2
|
+
import { TABLE_STRINGS } from './KundliTableSection.constants';
|
|
3
|
+
type TableStrings = typeof TABLE_STRINGS["en"];
|
|
4
|
+
interface SampleReportsSectionProps {
|
|
5
|
+
kundliReportSampleHref: string;
|
|
6
|
+
analytics?: KundliAnalytics;
|
|
7
|
+
s: TableStrings;
|
|
8
|
+
}
|
|
9
|
+
export declare const SampleReportsSection: React.FC<SampleReportsSectionProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SampleReportsSection } from './SampleReportsSection';
|
|
2
|
+
export { DEFAULT_SAMPLE_URL, DEFAULT_ONE_QUESTION_SAMPLE_URL, SAMPLE_REPORT_PDF_URLS, getTableStrings } from './KundliTableSection.constants';
|
|
3
|
+
export type { TableLocale } from './KundliTableSection.constants';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
2
|
+
/**
|
|
3
|
+
* Background image for the section (replaced from CSS so next/image can optimize when host provides imageComponent).
|
|
4
|
+
* Exported so host apps can preload this resource in document head for better performance:
|
|
5
|
+
* <link rel="preload" as="image" href={PREMIUM_REPORT_BACKGROUND_IMAGE_URL} />
|
|
6
|
+
*/
|
|
7
|
+
export declare const PREMIUM_REPORT_BACKGROUND_IMAGE_URL = "https://srm-cdn.a4b.io/yoda/1772696426944.webp";
|
|
8
|
+
export interface PremiumReportOverviewProps {
|
|
9
|
+
t: (key: string) => string;
|
|
10
|
+
/** Optional report cover image URL */
|
|
11
|
+
reportImageUrl?: string;
|
|
12
|
+
/** When true, report image can be loaded with priority (e.g. LCP) */
|
|
13
|
+
reportImagePriority?: boolean;
|
|
14
|
+
/** When true, section background image loads with priority (e.g. LCP). Default false so background uses loading="lazy" per Lighthouse. Set true when this section is above the fold (hero). */
|
|
15
|
+
backgroundImagePriority?: boolean;
|
|
16
|
+
/** Optional analytics for tracking banner clicked */
|
|
17
|
+
analytics?: KundliAnalytics;
|
|
18
|
+
/**
|
|
19
|
+
* When provided, replaces the entire section with a personalised full-width UTM banner image.
|
|
20
|
+
*/
|
|
21
|
+
utmBannerImageUrl?: string;
|
|
22
|
+
/** Alt text for the UTM banner image */
|
|
23
|
+
utmBannerAltText?: string;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const PremiumReportOverview: React.FC<PremiumReportOverviewProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ThreeStepsProcessProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
locale?: string;
|
|
4
|
+
/** If true, show global (email) delivery text; if false, show domestic (WhatsApp) text. Default true. */
|
|
5
|
+
isGlobal?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ThreeStepsProcess: React.FC<ThreeStepsProcessProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { KundliImageComponent } from '../../../../types/image';
|
|
2
|
+
export interface UtmBannerSectionProps {
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
altText: string;
|
|
5
|
+
imageComponent?: KundliImageComponent;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const UtmBannerSection: React.FC<UtmBannerSectionProps>;
|
package/dist/components/KundliPage/sections/ViewSampleReportButton/ViewSampleReportButton.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
2
|
+
export interface ViewSampleReportButtonProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** PDF URL to display in modal. Defaults to a sample PDF. */
|
|
5
|
+
pdfUrl?: string;
|
|
6
|
+
/** @deprecated Use pdfUrl instead. Opens in new tab when modal not used. */
|
|
7
|
+
href?: string;
|
|
8
|
+
/** Called when button is clicked (e.g. for analytics). Modal opens regardless. */
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
/** Optional analytics for tracking view sample clicked/closed */
|
|
11
|
+
analytics?: KundliAnalytics;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ViewSampleReportButton: React.FC<ViewSampleReportButtonProps>;
|