kundli-generator 1.0.0 → 1.0.1
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/components/KundliForm/KundliForm.d.ts +31 -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 +13 -0
- package/dist/components/KundliForm/sections/ProceedFooter/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/UserInfoFormSection.d.ts +9 -0
- package/dist/components/KundliForm/sections/UserInfoFormSection/index.d.ts +2 -0
- package/dist/components/KundliForm/sections/index.d.ts +3 -0
- package/dist/components/KundliPage/KundliContext.d.ts +58 -0
- package/dist/components/KundliPage/KundliPage.d.ts +29 -0
- package/dist/components/KundliPage/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/CTAFooter/CTAFooter.d.ts +12 -0
- package/dist/components/KundliPage/sections/CTAFooter/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ContactUsSection/ContactUsSection.d.ts +12 -0
- package/dist/components/KundliPage/sections/ContactUsSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FAQSection/FAQSection.d.ts +6 -0
- package/dist/components/KundliPage/sections/FAQSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/FeedbackSection/FeedbackSection.d.ts +15 -0
- package/dist/components/KundliPage/sections/FeedbackSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/HeroSection/HeroSection.d.ts +6 -0
- package/dist/components/KundliPage/sections/HeroSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/KundliHeader/KundliHeader.d.ts +12 -0
- package/dist/components/KundliPage/sections/KundliHeader/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/PremiumReportOverview/PremiumReportOverview.d.ts +8 -0
- package/dist/components/KundliPage/sections/PremiumReportOverview/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/ThreeStepsProcess/ThreeStepsProcess.d.ts +7 -0
- package/dist/components/KundliPage/sections/ThreeStepsProcess/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/UniversityCertification/UniversityCertification.d.ts +8 -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 +12 -0
- package/dist/components/KundliPage/sections/ViewSampleReportButton/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/WhatYoullFindSection/WhatYoullFindSection.d.ts +8 -0
- package/dist/components/KundliPage/sections/WhatYoullFindSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/WhyUsSection/WhyUsSection.d.ts +6 -0
- package/dist/components/KundliPage/sections/WhyUsSection/index.d.ts +2 -0
- package/dist/components/KundliPage/sections/index.d.ts +12 -0
- package/dist/i18n/translations.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/kundli-generator.js +2122 -440
- package/dist/kundli-generator.js.map +1 -1
- package/dist/kundli-generator.umd.cjs +11 -11
- package/dist/kundli-generator.umd.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
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, ta, te). 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
|
+
}
|
|
31
|
+
export declare const KundliForm: React.FC<KundliFormProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { KundliFormValues } from '../../KundliForm';
|
|
3
|
+
export interface ProceedFooterProps {
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
values: KundliFormValues;
|
|
6
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
7
|
+
href?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
originalPriceLabel?: string;
|
|
10
|
+
discountedPriceLabel?: string;
|
|
11
|
+
discountPillLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ProceedFooter: React.FC<ProceedFooterProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { KundliFormValues } from '../../KundliForm';
|
|
3
|
+
export interface UserInfoFormSectionProps {
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
values: KundliFormValues;
|
|
6
|
+
onChange: (values: KundliFormValues) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const UserInfoFormSection: React.FC<UserInfoFormSectionProps>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SupportedLocale } from '../../i18n/translations';
|
|
3
|
+
import { KundliFormValues } from '../KundliForm';
|
|
4
|
+
export type KundliView = "page" | "form";
|
|
5
|
+
export interface KundliContextConfig {
|
|
6
|
+
/** Person's name (optional, for display) */
|
|
7
|
+
name?: string;
|
|
8
|
+
/** Birth date (optional) */
|
|
9
|
+
birthDate?: string;
|
|
10
|
+
locale?: SupportedLocale;
|
|
11
|
+
showLanguageSelector?: boolean;
|
|
12
|
+
userId?: number;
|
|
13
|
+
logoUrl?: string;
|
|
14
|
+
reportImageUrl?: string;
|
|
15
|
+
universityLogoUrls?: [string?, string?];
|
|
16
|
+
sampleReportHref?: string;
|
|
17
|
+
onViewSampleReport?: () => void;
|
|
18
|
+
ctaHref?: string;
|
|
19
|
+
onCtaClick?: () => void;
|
|
20
|
+
readMoreReviewsHref?: string;
|
|
21
|
+
/** Form: proceed CTA as link */
|
|
22
|
+
proceedHref?: string;
|
|
23
|
+
/** Form: pricing labels */
|
|
24
|
+
originalPriceLabel?: string;
|
|
25
|
+
discountedPriceLabel?: string;
|
|
26
|
+
discountPillLabel?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface KundliContextValue {
|
|
29
|
+
/** Current view: landing page or form */
|
|
30
|
+
view: KundliView;
|
|
31
|
+
setView: (view: KundliView) => void;
|
|
32
|
+
/** Shared form values (persisted when switching page ↔ form) */
|
|
33
|
+
formValues: KundliFormValues;
|
|
34
|
+
setFormValues: React.Dispatch<React.SetStateAction<KundliFormValues>>;
|
|
35
|
+
/** Current locale (shared across page and form) */
|
|
36
|
+
locale: SupportedLocale;
|
|
37
|
+
setLocale: (locale: SupportedLocale) => void;
|
|
38
|
+
/** Shared config from KundliPage props */
|
|
39
|
+
config: KundliContextConfig;
|
|
40
|
+
/** Called when user clicks CTA on landing – switch to form */
|
|
41
|
+
goToForm: () => void;
|
|
42
|
+
/** Called when user clicks Back on form – switch to page */
|
|
43
|
+
goToPage: () => void;
|
|
44
|
+
/** Called when user proceeds from form (e.g. to payment) */
|
|
45
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
46
|
+
}
|
|
47
|
+
declare const KundliContext: React.Context<KundliContextValue | null>;
|
|
48
|
+
export declare function useKundliContext(): KundliContextValue | null;
|
|
49
|
+
export declare function useKundliContextOrThrow(): KundliContextValue;
|
|
50
|
+
export interface KundliProviderProps extends KundliContextConfig {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
/** Initial form values (optional) */
|
|
53
|
+
initialFormValues?: Partial<KundliFormValues>;
|
|
54
|
+
/** Called when user proceeds from form */
|
|
55
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare function KundliProvider({ children, initialFormValues, onProceed, ...config }: KundliProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export { KundliContext };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SupportedLocale } from '../../i18n/translations';
|
|
3
|
+
import { KundliFormValues } from '../KundliForm';
|
|
3
4
|
export interface KundliPageProps {
|
|
4
5
|
/** Person's name */
|
|
5
6
|
name?: string;
|
|
@@ -11,5 +12,33 @@ export interface KundliPageProps {
|
|
|
11
12
|
locale?: SupportedLocale;
|
|
12
13
|
/** Show language dropdown. Default true. */
|
|
13
14
|
showLanguageSelector?: boolean;
|
|
15
|
+
/** User ID from auth (e.g. from app context). Optional, for personalization or saving kundli. */
|
|
16
|
+
userId?: number;
|
|
17
|
+
/** Header logo URL */
|
|
18
|
+
logoUrl?: string;
|
|
19
|
+
/** Premium report cover image URL */
|
|
20
|
+
reportImageUrl?: string;
|
|
21
|
+
/** University logo URLs [BHU, VSU] */
|
|
22
|
+
universityLogoUrls?: [string?, string?];
|
|
23
|
+
/** Sample report link (opens in new tab) */
|
|
24
|
+
sampleReportHref?: string;
|
|
25
|
+
/** Called when "View Sample Report" is clicked (if sampleReportHref not set) */
|
|
26
|
+
onViewSampleReport?: () => void;
|
|
27
|
+
/** CTA button link (e.g. checkout URL). If set, CTA is a link; otherwise CTA shows the Kundli form. */
|
|
28
|
+
ctaHref?: string;
|
|
29
|
+
/** Called when CTA button is clicked (if ctaHref not set). Also called after navigating to form when integrated. */
|
|
30
|
+
onCtaClick?: () => void;
|
|
31
|
+
/** Read more reviews link */
|
|
32
|
+
readMoreReviewsHref?: string;
|
|
33
|
+
/** Initial values for the Kundli form (when CTA leads to form) */
|
|
34
|
+
initialFormValues?: Partial<KundliFormValues>;
|
|
35
|
+
/** Called when user proceeds from the form (e.g. to payment) */
|
|
36
|
+
onProceed?: (values: KundliFormValues) => void;
|
|
37
|
+
/** Form: proceed CTA as link */
|
|
38
|
+
proceedHref?: string;
|
|
39
|
+
/** Form: pricing labels */
|
|
40
|
+
originalPriceLabel?: string;
|
|
41
|
+
discountedPriceLabel?: string;
|
|
42
|
+
discountPillLabel?: string;
|
|
14
43
|
}
|
|
15
44
|
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export { KundliPage } from './KundliPage';
|
|
2
2
|
export type { KundliPageProps } from './KundliPage';
|
|
3
|
+
export { KundliProvider, useKundliContext, useKundliContextOrThrow, KundliContext, } from './KundliContext';
|
|
4
|
+
export type { KundliView, KundliContextConfig, KundliContextValue, KundliProviderProps, } from './KundliContext';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CTAFooterProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** CTA button click handler */
|
|
5
|
+
onCtaClick?: () => void;
|
|
6
|
+
/** Or use href for link instead of button */
|
|
7
|
+
ctaHref?: string;
|
|
8
|
+
/** Optional override for CTA label text */
|
|
9
|
+
ctaLabel?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const CTAFooter: React.FC<CTAFooterProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ContactUsSectionProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Override WhatsApp number */
|
|
5
|
+
whatsAppNumber?: string;
|
|
6
|
+
/** Override email */
|
|
7
|
+
email?: string;
|
|
8
|
+
/** Override brand name */
|
|
9
|
+
brandName?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ContactUsSection: React.FC<ContactUsSectionProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Testimonial {
|
|
3
|
+
quote: string;
|
|
4
|
+
authorName: string;
|
|
5
|
+
authorAvatarUrl?: string;
|
|
6
|
+
rating?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface FeedbackSectionProps {
|
|
9
|
+
t: (key: string) => string;
|
|
10
|
+
testimonials?: Testimonial[];
|
|
11
|
+
readMoreHref?: string;
|
|
12
|
+
onReadMore?: () => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const FeedbackSection: React.FC<FeedbackSectionProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface KundliHeaderProps {
|
|
3
|
+
/** Translation function */
|
|
4
|
+
t: (key: string) => string;
|
|
5
|
+
/** Language selector slot */
|
|
6
|
+
languageSelector?: React.ReactNode;
|
|
7
|
+
/** Logo URL (optional; shows placeholder if not provided) */
|
|
8
|
+
logoUrl?: string;
|
|
9
|
+
/** Optional class name */
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const KundliHeader: React.FC<KundliHeaderProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PremiumReportOverviewProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Optional report cover image URL */
|
|
5
|
+
reportImageUrl?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PremiumReportOverview: React.FC<PremiumReportOverviewProps>;
|
package/dist/components/KundliPage/sections/UniversityCertification/UniversityCertification.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface UniversityCertificationProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Optional logo URLs: [BHU, VSU or similar] */
|
|
5
|
+
logoUrl?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const UniversityCertification: React.FC<UniversityCertificationProps>;
|
package/dist/components/KundliPage/sections/ViewSampleReportButton/ViewSampleReportButton.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
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
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ViewSampleReportButton: React.FC<ViewSampleReportButtonProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface WhatYoullFindSectionProps {
|
|
3
|
+
t: (key: string) => string;
|
|
4
|
+
/** Optional image URLs per item (same order as ITEMS) */
|
|
5
|
+
imageUrls?: (string | undefined)[];
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
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';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type SupportedLocale =
|
|
1
|
+
export type SupportedLocale = "en" | "hi" | "ta" | "te";
|
|
2
2
|
export declare const SUPPORTED_LOCALES: SupportedLocale[];
|
|
3
3
|
export declare const LOCALE_LABELS: Record<SupportedLocale, string>;
|
|
4
4
|
export declare const translations: Record<SupportedLocale, Record<string, string>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export { KundliPage } from './components/KundliPage';
|
|
2
|
+
export { KundliProvider, useKundliContext, useKundliContextOrThrow, KundliContext, } from './components/KundliPage';
|
|
3
|
+
export type { KundliView, KundliContextConfig, KundliContextValue, KundliProviderProps, } from './components/KundliPage';
|
|
4
|
+
export { KundliForm } from './components/KundliForm';
|
|
5
|
+
export type { KundliFormValues } from './components/KundliForm';
|
|
2
6
|
export { I18nProvider, useI18n, SUPPORTED_LOCALES, type SupportedLocale, } from './i18n';
|