@srimandir/kundli-generator 3.0.10
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.d.ts +77 -0
- package/dist/components/FooterShell/FooterCTAButton.d.ts +14 -0
- package/dist/components/FooterShell/FooterShell.d.ts +8 -0
- package/dist/components/FooterShell/index.d.ts +5 -0
- package/dist/components/KundliForm/KundliForm.d.ts +35 -0
- package/dist/components/KundliForm/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/FormHeader/FormHeader.d.ts +6 -0
- package/dist/components/KundliForm/sections/FormHeader/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/ProceedFooter/ProceedFooter.d.ts +14 -0
- package/dist/components/KundliForm/sections/ProceedFooter/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/UserInfoFormSection.d.ts +12 -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/useGooglePlacesAutocomplete.d.ts +29 -0
- package/dist/components/KundliForm/sections/index.d.ts +3 -0
- package/dist/components/KundliPage/KundliContext.d.ts +49 -0
- package/dist/components/KundliPage/KundliPage.d.ts +44 -0
- package/dist/components/KundliPage/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/CTAFooter/CTAFooter.d.ts +11 -0
- package/dist/components/KundliPage/sections/CTAFooter/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ContactUsSection/ContactUsSection.d.ts +13 -0
- package/dist/components/KundliPage/sections/ContactUsSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FAQSection/FAQSection.d.ts +5 -0
- package/dist/components/KundliPage/sections/FAQSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FeedbackSection/FeedbackSection.d.ts +14 -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 +11 -0
- package/dist/components/KundliPage/sections/KundliHeader/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/PremiumReportOverview/PremiumReportOverview.d.ts +10 -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/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 +12 -0
- package/dist/dev/main.d.ts +1 -0
- package/dist/i18n/I18nContext.d.ts +12 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/translations.d.ts +4 -0
- package/dist/index.d.ts +9 -0
- package/dist/kundli-generator.js +3102 -0
- package/dist/kundli-generator.js.map +1 -0
- package/dist/kundli-generator.umd.cjs +16 -0
- package/dist/kundli-generator.umd.cjs.map +1 -0
- package/dist/style.css +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/localeStorage.d.ts +10 -0
- package/dist/utils/storage.d.ts +7 -0
- package/package.json +65 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event names matching Kundli Generator Events taxonomy (Mixpanel).
|
|
3
|
+
* Host app (e.g. hanuman) should use these when calling logEvent.
|
|
4
|
+
*/
|
|
5
|
+
export declare const KUNDLI_ANALYTICS_EVENT_NAMES: {
|
|
6
|
+
readonly banner_clicked_fe: "banner_clicked_fe";
|
|
7
|
+
readonly primary_cta_clicked_fe: "primary_cta_clicked_fe";
|
|
8
|
+
readonly language_changed_fe: "language_changed_fe";
|
|
9
|
+
readonly language_clicked_fe: "language_clicked_fe";
|
|
10
|
+
readonly retry_payment: "retry_payment";
|
|
11
|
+
readonly detailed_kundli_report_impression_fe: "detailed_kundli_report_impression_fe";
|
|
12
|
+
readonly payment_partner_page_opened: "payment_partner_page_opened";
|
|
13
|
+
readonly view_sample_report_clicked: "view_sample_report_clicked";
|
|
14
|
+
readonly view_sample_report_closed: "view_sample_report_closed";
|
|
15
|
+
readonly info_icon_clicked: "info_icon_clicked";
|
|
16
|
+
readonly name_section_clicked: "name_section_clicked";
|
|
17
|
+
readonly name_section_filled: "name_section_filled";
|
|
18
|
+
readonly phone_section_clicked: "phone_section_clicked";
|
|
19
|
+
readonly phone_section_filled: "phone_section_filled";
|
|
20
|
+
readonly email_section_clicked: "email_section_clicked";
|
|
21
|
+
readonly email_section_filled: "email_section_filled";
|
|
22
|
+
readonly dob_clicked: "dob_clicked";
|
|
23
|
+
readonly dob_filled: "dob_filled";
|
|
24
|
+
readonly time_clicked: "time_clicked";
|
|
25
|
+
readonly time_filled: "time_filled";
|
|
26
|
+
readonly time_checkbox_clicked: "time_checkbox_clicked";
|
|
27
|
+
readonly place_of_birth_clicked: "place_of_birth_clicked";
|
|
28
|
+
readonly place_of_birth_chosen: "place_of_birth_chosen";
|
|
29
|
+
readonly language_of_report_clicked: "language_of_report_clicked";
|
|
30
|
+
readonly primary_cta_clicked_l1: "primary_cta_clicked_l1";
|
|
31
|
+
/** Legacy / alias: when landing page is viewed */
|
|
32
|
+
readonly kundli_page_view: "kundli_page_view";
|
|
33
|
+
/** Legacy / alias: when L1 form page is viewed (same as l1_page_opened) */
|
|
34
|
+
readonly kundli_form_view: "kundli_form_view";
|
|
35
|
+
};
|
|
36
|
+
export type KundliAnalyticsEventName = (typeof KUNDLI_ANALYTICS_EVENT_NAMES)[keyof typeof KUNDLI_ANALYTICS_EVENT_NAMES];
|
|
37
|
+
/** Optional analytics implementation. Pass from host to KundliPage/KundliForm to track events. */
|
|
38
|
+
export interface KundliAnalytics {
|
|
39
|
+
trackBannerClicked?(): void;
|
|
40
|
+
trackPrimaryCtaClickedFe?(params: {
|
|
41
|
+
ctaText?: string;
|
|
42
|
+
}): void;
|
|
43
|
+
trackLanguageChangedFe?(params: {
|
|
44
|
+
newLanguage: string;
|
|
45
|
+
}): void;
|
|
46
|
+
trackLanguageClickedFe?(params: {
|
|
47
|
+
language: string;
|
|
48
|
+
}): void;
|
|
49
|
+
trackDetailedKundliReportImpressionFe?(params: {
|
|
50
|
+
section: string;
|
|
51
|
+
timestamp?: string;
|
|
52
|
+
}): void;
|
|
53
|
+
trackViewSampleReportClicked?(): void;
|
|
54
|
+
trackViewSampleReportClosed?(): void;
|
|
55
|
+
trackInfoIconClicked?(params: {
|
|
56
|
+
fieldName: string;
|
|
57
|
+
}): void;
|
|
58
|
+
trackNameSectionClicked?(): void;
|
|
59
|
+
trackNameSectionFilled?(): void;
|
|
60
|
+
trackPhoneSectionClicked?(): void;
|
|
61
|
+
trackPhoneSectionFilled?(): void;
|
|
62
|
+
trackEmailSectionClicked?(): void;
|
|
63
|
+
trackEmailSectionFilled?(): void;
|
|
64
|
+
trackDobClicked?(): void;
|
|
65
|
+
trackDobFilled?(): void;
|
|
66
|
+
trackTimeClicked?(): void;
|
|
67
|
+
trackTimeFilled?(): void;
|
|
68
|
+
trackTimeCheckboxClicked?(): void;
|
|
69
|
+
trackPlaceOfBirthClicked?(): void;
|
|
70
|
+
trackPlaceOfBirthChosen?(): void;
|
|
71
|
+
trackLanguageOfReportClicked?(): void;
|
|
72
|
+
trackPrimaryCtaClickedL1?(params: {
|
|
73
|
+
avenue?: string;
|
|
74
|
+
}): void;
|
|
75
|
+
trackKundliPageView?(): void;
|
|
76
|
+
trackKundliFormView?(): void;
|
|
77
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface FooterCTAButtonProps {
|
|
2
|
+
/** Button content */
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** When set, renders an anchor instead of a button (e.g. target="_blank" rel="noopener noreferrer") */
|
|
5
|
+
href?: string;
|
|
6
|
+
/** Disabled state; for anchor uses aria-disabled and preventDefault on click */
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Click handler (used when href is not set); receives click event */
|
|
9
|
+
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Optional aria-label for accessibility */
|
|
12
|
+
"aria-label"?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const FooterCTAButton: React.FC<FooterCTAButtonProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface FooterShellProps {
|
|
2
|
+
/** Optional circular marquee content (e.g. badges). When provided, marquee is shown. */
|
|
3
|
+
marquee?: React.ReactNode;
|
|
4
|
+
/** Main footer content (e.g. CTA button or form proceed block) */
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FooterShell: React.FC<FooterShellProps>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FooterShell } from './FooterShell';
|
|
2
|
+
export type { FooterShellProps } from './FooterShell';
|
|
3
|
+
export { FooterCTAButton } from './FooterCTAButton';
|
|
4
|
+
export type { FooterCTAButtonProps } from './FooterCTAButton';
|
|
5
|
+
export { default as footerShellStyles } from './FooterShell.module.scss';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliAnalytics } from '../../analytics';
|
|
3
|
+
export interface KundliFormValues {
|
|
4
|
+
fullName: string;
|
|
5
|
+
phone?: string;
|
|
6
|
+
email: string;
|
|
7
|
+
dateOfBirth: string;
|
|
8
|
+
birthTime: string;
|
|
9
|
+
birthTimeUnknown: boolean;
|
|
10
|
+
birthPlace: string;
|
|
11
|
+
}
|
|
12
|
+
export interface KundliFormProps {
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Language (en, hi). Overrides I18nProvider if set. Initial value when using dropdown. */
|
|
15
|
+
locale?: SupportedLocale;
|
|
16
|
+
/** Show language dropdown. Default true. */
|
|
17
|
+
showLanguageSelector?: boolean;
|
|
18
|
+
/** Back button handler in header */
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
/** Initial field values */
|
|
21
|
+
initialValues?: Partial<KundliFormValues>;
|
|
22
|
+
/** Called when user clicks Proceed to payment */
|
|
23
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
24
|
+
/** If provided, proceed CTA becomes a link */
|
|
25
|
+
proceedHref?: string;
|
|
26
|
+
/** Footer pricing */
|
|
27
|
+
originalPriceLabel?: string;
|
|
28
|
+
discountedPriceLabel?: string;
|
|
29
|
+
discountPillLabel?: string;
|
|
30
|
+
/** Google Maps API key used for Birth Place autocomplete */
|
|
31
|
+
googleMapsApiKey?: string;
|
|
32
|
+
/** Optional analytics (Mixpanel etc.). Also set on KundliProvider; passing here ensures events fire when form is used inside provider (e.g. avoids context loss from multiple React instances). */
|
|
33
|
+
analytics?: KundliAnalytics;
|
|
34
|
+
}
|
|
35
|
+
export declare const KundliForm: React.FC<KundliFormProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { KundliFormValues } from '../../KundliForm';
|
|
2
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
3
|
+
export interface ProceedFooterProps {
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
values: KundliFormValues;
|
|
6
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
7
|
+
href?: string;
|
|
8
|
+
analytics?: KundliAnalytics;
|
|
9
|
+
className?: string;
|
|
10
|
+
originalPriceLabel?: string;
|
|
11
|
+
discountedPriceLabel?: string;
|
|
12
|
+
discountPillLabel?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ProceedFooter: React.FC<ProceedFooterProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { KundliFormValues } from '../../KundliForm';
|
|
2
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
3
|
+
export interface UserInfoFormSectionProps {
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
values: KundliFormValues;
|
|
6
|
+
onChange: (values: KundliFormValues) => void;
|
|
7
|
+
analytics?: KundliAnalytics;
|
|
8
|
+
/** Google Maps API key used for Birth Place autocomplete */
|
|
9
|
+
googleMapsApiKey?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const UserInfoFormSection: React.FC<UserInfoFormSectionProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type GooglePlacePrediction = {
|
|
2
|
+
description: string;
|
|
3
|
+
place_id: string;
|
|
4
|
+
structured_formatting?: {
|
|
5
|
+
main_text?: string;
|
|
6
|
+
secondary_text?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
declare global {
|
|
10
|
+
interface Window {
|
|
11
|
+
google?: any;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export declare const loadGoogleMapsPlaces: (apiKey: string, language?: string) => Promise<void>;
|
|
15
|
+
export declare const getCityPredictions: (params: {
|
|
16
|
+
apiKey: string;
|
|
17
|
+
input: string;
|
|
18
|
+
language?: string;
|
|
19
|
+
restrictCountry?: string;
|
|
20
|
+
}) => Promise<GooglePlacePrediction[]>;
|
|
21
|
+
export {};
|
package/dist/components/KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
export declare const useGooglePlacesAutocomplete: (params: {
|
|
18
|
+
apiKey?: string;
|
|
19
|
+
language?: string;
|
|
20
|
+
restrictCountry?: string;
|
|
21
|
+
}) => {
|
|
22
|
+
isLoaded: any;
|
|
23
|
+
predictions: any;
|
|
24
|
+
isSearching: any;
|
|
25
|
+
loadError: any;
|
|
26
|
+
searchPlaces: any;
|
|
27
|
+
getPlaceDetails: any;
|
|
28
|
+
clearPredictions: any;
|
|
29
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
|
+
import { KundliAnalytics } from '../../analytics';
|
|
4
|
+
export type KundliView = "landing" | "form";
|
|
5
|
+
export interface KundliContextConfig {
|
|
6
|
+
locale?: SupportedLocale;
|
|
7
|
+
showLanguageSelector?: boolean;
|
|
8
|
+
userId?: number;
|
|
9
|
+
/** Whether the user is global (international) or domestic */
|
|
10
|
+
isGlobal?: boolean;
|
|
11
|
+
logoUrl?: string;
|
|
12
|
+
reportImageUrl?: string;
|
|
13
|
+
universityLogoUrls?: [string?, string?];
|
|
14
|
+
sampleReportHref?: string;
|
|
15
|
+
onViewSampleReport?: () => void;
|
|
16
|
+
ctaHref?: string;
|
|
17
|
+
onCtaClick?: () => void;
|
|
18
|
+
/** Called when form back is clicked (e.g. when form is shown standalone) */
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
readMoreReviewsHref?: string;
|
|
21
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
22
|
+
proceedHref?: string;
|
|
23
|
+
originalPriceLabel?: string;
|
|
24
|
+
discountedPriceLabel?: string;
|
|
25
|
+
discountPillLabel?: string;
|
|
26
|
+
analytics?: KundliAnalytics;
|
|
27
|
+
/** Notify parent when user changes language (e.g. to keep form view in sync when switching from landing) */
|
|
28
|
+
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
29
|
+
}
|
|
30
|
+
export interface KundliContextValue {
|
|
31
|
+
view: KundliView;
|
|
32
|
+
locale: SupportedLocale;
|
|
33
|
+
setLocale: (locale: SupportedLocale) => void;
|
|
34
|
+
config: KundliContextConfig;
|
|
35
|
+
formValues: KundliFormValues;
|
|
36
|
+
setFormValues: React.Dispatch<React.SetStateAction<KundliFormValues>>;
|
|
37
|
+
goToForm: () => void;
|
|
38
|
+
goToPage: () => void;
|
|
39
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
40
|
+
}
|
|
41
|
+
declare const KundliContext: any;
|
|
42
|
+
export interface KundliProviderProps extends KundliContextConfig {
|
|
43
|
+
className?: string;
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
}
|
|
46
|
+
export declare const KundliProvider: React.FC<KundliProviderProps>;
|
|
47
|
+
export declare function useKundliContext(): KundliContextValue | null;
|
|
48
|
+
export declare function useKundliContextOrThrow(): KundliContextValue;
|
|
49
|
+
export { KundliContext };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
|
+
import { KundliAnalytics } from '../../analytics';
|
|
4
|
+
export interface KundliPageProps {
|
|
5
|
+
/** Optional CSS class name */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Language (en, hi). Overrides I18nProvider if set. Initial value when using dropdown. */
|
|
8
|
+
locale?: SupportedLocale;
|
|
9
|
+
/** Show language dropdown. Default true. */
|
|
10
|
+
showLanguageSelector?: boolean;
|
|
11
|
+
/** User ID from auth, for API calls etc. */
|
|
12
|
+
userId?: number;
|
|
13
|
+
/** Whether the user is global (international) or domestic */
|
|
14
|
+
isGlobal?: boolean;
|
|
15
|
+
/** Header logo URL */
|
|
16
|
+
logoUrl?: string;
|
|
17
|
+
/** Premium report cover image URL */
|
|
18
|
+
reportImageUrl?: string;
|
|
19
|
+
/** University logo URLs [BHU, VSU] */
|
|
20
|
+
universityLogoUrls?: [string?, string?];
|
|
21
|
+
/** Sample report link (opens in new tab) */
|
|
22
|
+
sampleReportHref?: string;
|
|
23
|
+
/** Called when "View Sample Report" is clicked (if sampleReportHref not set) */
|
|
24
|
+
onViewSampleReport?: () => void;
|
|
25
|
+
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA shows the Kundli form. */
|
|
26
|
+
ctaHref?: string;
|
|
27
|
+
/** Called when CTA button is clicked (if ctaHref not set). Also called after navigating to form when integrated. */
|
|
28
|
+
onCtaClick?: () => void;
|
|
29
|
+
/** Read more reviews link */
|
|
30
|
+
readMoreReviewsHref?: string;
|
|
31
|
+
/** Called when user proceeds from the form (e.g. to payment) */
|
|
32
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
33
|
+
/** Form: proceed CTA as link */
|
|
34
|
+
proceedHref?: string;
|
|
35
|
+
/** Form: pricing labels */
|
|
36
|
+
originalPriceLabel?: string;
|
|
37
|
+
discountedPriceLabel?: string;
|
|
38
|
+
discountPillLabel?: string;
|
|
39
|
+
/** Optional analytics implementation for Mixpanel/tracking events */
|
|
40
|
+
analytics?: KundliAnalytics;
|
|
41
|
+
/** Notify when user changes language (e.g. to keep form view in sync when switching from landing) */
|
|
42
|
+
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
43
|
+
}
|
|
44
|
+
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export declare const CTAFooter: React.FC<CTAFooterProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ContactUsSectionProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
/** Override WhatsApp number (Global) */
|
|
4
|
+
whatsAppGlobal?: string;
|
|
5
|
+
/** Override WhatsApp number (Domestic) */
|
|
6
|
+
whatsAppDomestic?: string;
|
|
7
|
+
/** Override email */
|
|
8
|
+
email?: string;
|
|
9
|
+
/** Override brand name */
|
|
10
|
+
brandName?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ContactUsSection: React.FC<ContactUsSectionProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface Testimonial {
|
|
2
|
+
quote: string;
|
|
3
|
+
authorName: string;
|
|
4
|
+
authorAvatarUrl?: string;
|
|
5
|
+
rating?: number;
|
|
6
|
+
}
|
|
7
|
+
export interface FeedbackSectionProps {
|
|
8
|
+
t: (key: string) => string;
|
|
9
|
+
testimonials?: Testimonial[];
|
|
10
|
+
readMoreHref?: string;
|
|
11
|
+
onReadMore?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const FeedbackSection: React.FC<FeedbackSectionProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface KundliHeaderProps {
|
|
2
|
+
/** Translation function */
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Language selector slot */
|
|
5
|
+
languageSelector?: React.ReactNode;
|
|
6
|
+
/** Logo URL (optional; shows placeholder if not provided) */
|
|
7
|
+
logoUrl?: string;
|
|
8
|
+
/** Optional class name */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const KundliHeader: React.FC<KundliHeaderProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { KundliAnalytics } from '../../../../analytics';
|
|
2
|
+
export interface PremiumReportOverviewProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Optional report cover image URL */
|
|
5
|
+
reportImageUrl?: string;
|
|
6
|
+
/** Optional analytics for tracking banner clicked */
|
|
7
|
+
analytics?: KundliAnalytics;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
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>;
|
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>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface WhatYoullFindSectionProps {
|
|
2
|
+
t: (key: string) => string;
|
|
3
|
+
/** Optional image URLs per item (same order as ITEMS) */
|
|
4
|
+
imageUrls?: (string | undefined)[];
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const WhatYoullFindSection: React.FC<WhatYoullFindSectionProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { KundliHeader } from './KundliHeader';
|
|
2
|
+
export { HeroSection } from './HeroSection';
|
|
3
|
+
export { PremiumReportOverview } from './PremiumReportOverview';
|
|
4
|
+
export { UniversityCertification } from './UniversityCertification';
|
|
5
|
+
export { ThreeStepsProcess } from './ThreeStepsProcess';
|
|
6
|
+
export { ViewSampleReportButton } from './ViewSampleReportButton';
|
|
7
|
+
export { WhatYoullFindSection } from './WhatYoullFindSection';
|
|
8
|
+
export { WhyUsSection } from './WhyUsSection';
|
|
9
|
+
export { FeedbackSection } from './FeedbackSection';
|
|
10
|
+
export { FAQSection } from './FAQSection';
|
|
11
|
+
export { ContactUsSection } from './ContactUsSection';
|
|
12
|
+
export { CTAFooter } from './CTAFooter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SupportedLocale } from './translations';
|
|
2
|
+
interface I18nContextValue {
|
|
3
|
+
locale: SupportedLocale;
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
}
|
|
6
|
+
interface I18nProviderProps {
|
|
7
|
+
locale: SupportedLocale;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const I18nProvider: React.FC<I18nProviderProps>;
|
|
11
|
+
export declare function useI18n(): I18nContextValue | null;
|
|
12
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { KundliPage } from './components/KundliPage';
|
|
2
|
+
export { KundliProvider, useKundliContext, useKundliContextOrThrow, KundliContext, } from './components/KundliPage/KundliContext';
|
|
3
|
+
export type { KundliView, KundliContextConfig, KundliContextValue, KundliProviderProps, } from './components/KundliPage/KundliContext';
|
|
4
|
+
export { KUNDLI_ANALYTICS_EVENT_NAMES, type KundliAnalytics, type KundliAnalyticsEventName, } from './analytics';
|
|
5
|
+
export { KundliForm } from './components/KundliForm';
|
|
6
|
+
export type { KundliFormValues } from './components/KundliForm';
|
|
7
|
+
export { I18nProvider, useI18n, SUPPORTED_LOCALES, type SupportedLocale, } from './i18n';
|
|
8
|
+
export { KUNDLI_LANGUAGE_STORAGE_KEY, getStoredKundliLocale, setStoredKundliLocale, } from './utils/localeStorage';
|
|
9
|
+
export { getItem, setItem, removeItem, isLocalStorageAvailable } from './utils/storage';
|