@srimandir/kundli-generator 9.6.0 → 9.6.2
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-DXIMIqu9.js +5095 -0
- package/dist/analytics-DXIMIqu9.js.map +1 -0
- package/dist/components/KundliPage/KundliContext.d.ts +15 -1
- package/dist/components/KundliPage/KundliPage.d.ts +13 -0
- package/dist/components/KundliPage/KundliPageV1.d.ts +13 -0
- package/dist/components/KundliPage/sections/KundliTableSection/KundliTableSection.constants.d.ts +5 -1
- package/dist/components/KundliPage/sections/KundliTableSection/index.d.ts +1 -1
- package/dist/components/KundliPlanBottomSheet/ConsultationSlotFields.d.ts +54 -0
- package/dist/components/KundliPlanBottomSheet/ConsultationSlotModal.d.ts +2 -24
- package/dist/components/KundliPlanBottomSheet/KundliPlanBottomSheet.d.ts +1 -0
- package/dist/components/KundliPlanBottomSheet/index.d.ts +2 -0
- package/dist/components/ThreeSkuPlanBottomSheet/constants.d.ts +2 -2
- package/dist/{criticalCss-C-F4ZKYw.js → criticalCss-CbNdtrKw.js} +813 -807
- package/dist/criticalCss-CbNdtrKw.js.map +1 -0
- package/dist/form-entry.js +1 -1
- package/dist/i18n/translations.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/kundli-generator.js +26 -25
- package/dist/page-entry.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/analytics-C7H9-2dZ.js +0 -3908
- package/dist/analytics-C7H9-2dZ.js.map +0 -1
- package/dist/criticalCss-C-F4ZKYw.js.map +0 -1
|
@@ -2,7 +2,8 @@ import { SupportedLocale } from '../../i18n/translations';
|
|
|
2
2
|
import { KundliFormValues } from '../KundliForm';
|
|
3
3
|
import { KundliAnalytics } from '../../analytics';
|
|
4
4
|
import { KundliImageComponent } from '../../types/image';
|
|
5
|
-
import { FetchConsultationSlots } from '../KundliPlanBottomSheet';
|
|
5
|
+
import { KundliPlan, FetchConsultationSlots } from '../KundliPlanBottomSheet';
|
|
6
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
6
7
|
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
7
8
|
export type KundliView = "landing" | "form";
|
|
8
9
|
export interface KundliContextConfig {
|
|
@@ -65,6 +66,19 @@ export interface KundliContextConfig {
|
|
|
65
66
|
onLocaleChange?: (locale: SupportedLocale) => void;
|
|
66
67
|
/** Optional image component (e.g. next/image adapter) for optimized images. */
|
|
67
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[];
|
|
68
82
|
/**
|
|
69
83
|
* Pre-resolved UTM banner image URL (e.g. from getServerSideProps).
|
|
70
84
|
* When set, the matching banner image is shown in place of the default PremiumReportOverview section.
|
|
@@ -2,6 +2,8 @@ import { SupportedLocale } from '../../i18n/translations';
|
|
|
2
2
|
import { KundliFormValues } from '../KundliForm';
|
|
3
3
|
import { KundliAnalytics } from '../../analytics';
|
|
4
4
|
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
5
|
+
import { KundliPlan } from '../KundliPlanBottomSheet';
|
|
6
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
5
7
|
export interface KundliPageProps {
|
|
6
8
|
/** Optional CSS class name */
|
|
7
9
|
className?: string;
|
|
@@ -75,5 +77,16 @@ export interface KundliPageProps {
|
|
|
75
77
|
* An empty string means "no banner" (show default PremiumReportOverview).
|
|
76
78
|
*/
|
|
77
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[];
|
|
78
91
|
}
|
|
79
92
|
export declare const KundliPage: React.FC<KundliPageProps>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SupportedLocale } from '../../i18n/translations';
|
|
2
|
+
import { KundliPlan } from '../KundliPlanBottomSheet';
|
|
3
|
+
import { ThreeSkuPlan } from '../ThreeSkuPlanBottomSheet';
|
|
2
4
|
import { KundliFormValues } from '../KundliForm';
|
|
3
5
|
import { KundliAnalytics } from '../../analytics';
|
|
4
6
|
import { AtlasSearchLocalities } from '../KundliForm/sections/UserInfoFormSection/useGooglePlacesAutocomplete';
|
|
@@ -81,5 +83,16 @@ export interface KundliPageProps {
|
|
|
81
83
|
* An empty string means "no banner" (show default PremiumReportOverview).
|
|
82
84
|
*/
|
|
83
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[];
|
|
84
97
|
}
|
|
85
98
|
export declare const KundliPageV1: React.FC<KundliPageProps>;
|
package/dist/components/KundliPage/sections/KundliTableSection/KundliTableSection.constants.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
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;
|
|
2
6
|
export declare const DEFAULT_ONE_QUESTION_SAMPLE_URL = "https://srm-cdn.a4b.io/yoda/1781248337750.pdf";
|
|
3
7
|
export type TableLocale = "en" | "hi";
|
|
4
8
|
export declare const TABLE_STRINGS: Record<TableLocale, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { SampleReportsSection } from './SampleReportsSection';
|
|
2
|
-
export { DEFAULT_SAMPLE_URL, DEFAULT_ONE_QUESTION_SAMPLE_URL, getTableStrings } from './KundliTableSection.constants';
|
|
2
|
+
export { DEFAULT_SAMPLE_URL, DEFAULT_ONE_QUESTION_SAMPLE_URL, SAMPLE_REPORT_PDF_URLS, getTableStrings } from './KundliTableSection.constants';
|
|
3
3
|
export type { TableLocale } from './KundliTableSection.constants';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { KundliPlanAstrologer, ConsultationSlotSelection } from './types';
|
|
2
|
+
import { KundliAnalytics } from '../../analytics';
|
|
3
|
+
export interface ConsultationSlotFieldsProps {
|
|
4
|
+
onProceed: (selection: ConsultationSlotSelection) => void;
|
|
5
|
+
astrologers: KundliPlanAstrologer[];
|
|
6
|
+
t?: (key: string, options?: any) => string | undefined;
|
|
7
|
+
analytics?: KundliAnalytics;
|
|
8
|
+
/**
|
|
9
|
+
* Report language the user selected in the kundli form (e.g. "hi", "te").
|
|
10
|
+
* Drives which consultation language is preselected (see
|
|
11
|
+
* `getDefaultConsultationLanguage`). Defaults to `KundliContext`'s live
|
|
12
|
+
* `formValues.language_code` when not passed explicitly — callers not
|
|
13
|
+
* connected to that context (e.g. a standalone post-payment screen) must
|
|
14
|
+
* pass it.
|
|
15
|
+
*/
|
|
16
|
+
reportLanguage?: string;
|
|
17
|
+
/**
|
|
18
|
+
* True for the "Book slot again" retry flow / any post-payment booking
|
|
19
|
+
* screen (payment already succeeded) — false/omitted for the original
|
|
20
|
+
* pre-payment booking flow. Tags every analytics event fired here with
|
|
21
|
+
* `status: "pre_payment" | "post_payment"`.
|
|
22
|
+
*/
|
|
23
|
+
isPostPayment?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether to show the guidance-topic picker below the slot grid. Defaults
|
|
26
|
+
* to `!isPostPayment` (the original behavior: ask once, pre-payment; the
|
|
27
|
+
* retry modal reuses the topic already captured then). Pass explicitly
|
|
28
|
+
* when a caller needs the two independent — e.g. a host that collects the
|
|
29
|
+
* topic post-payment on first booking still wants it asked even though
|
|
30
|
+
* `isPostPayment` is (correctly, for analytics) `true`.
|
|
31
|
+
*/
|
|
32
|
+
showGuidanceTopic?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* When true, this component renders no footer of its own (no trust row,
|
|
35
|
+
* no proceed button) — instead it reports proceed-readiness via
|
|
36
|
+
* `onStateChange`, and the host renders its own CTA (e.g. pinned to the
|
|
37
|
+
* bottom of its own page layout, since this component has no opinion on
|
|
38
|
+
* where it's embedded). Defaults to false (renders its own footer,
|
|
39
|
+
* unchanged from before).
|
|
40
|
+
*/
|
|
41
|
+
hideFooter?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Only meaningful when `hideFooter` is true. Called whenever proceed
|
|
44
|
+
* readiness changes (and once on mount) with the current `canProceed`
|
|
45
|
+
* flag and a `proceed()` function the host can wire to its own button —
|
|
46
|
+
* `proceed()` always acts on the latest selection, even if called long
|
|
47
|
+
* after the last `onStateChange` firing.
|
|
48
|
+
*/
|
|
49
|
+
onStateChange?: (state: {
|
|
50
|
+
canProceed: boolean;
|
|
51
|
+
proceed: () => void;
|
|
52
|
+
}) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare const ConsultationSlotFields: React.FC<ConsultationSlotFieldsProps>;
|
|
@@ -1,28 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface ConsultationSlotModalProps {
|
|
1
|
+
import { ConsultationSlotFieldsProps } from './ConsultationSlotFields';
|
|
2
|
+
export interface ConsultationSlotModalProps extends ConsultationSlotFieldsProps {
|
|
4
3
|
isOpen: boolean;
|
|
5
4
|
onClose: () => void;
|
|
6
|
-
onProceed: (selection: ConsultationSlotSelection) => void;
|
|
7
|
-
astrologers: KundliPlanAstrologer[];
|
|
8
|
-
t?: (key: string, options?: any) => string | undefined;
|
|
9
|
-
analytics?: KundliAnalytics;
|
|
10
|
-
/**
|
|
11
|
-
* Report language the user selected in the kundli form (e.g. "hi", "te").
|
|
12
|
-
* Drives which consultation language is preselected (see
|
|
13
|
-
* `getDefaultConsultationLanguage`). Defaults to `KundliContext`'s live
|
|
14
|
-
* `formValues.language_code` when not passed explicitly — callers not
|
|
15
|
-
* connected to that context (e.g. a standalone retry flow) must pass it.
|
|
16
|
-
*/
|
|
17
|
-
reportLanguage?: string;
|
|
18
|
-
/**
|
|
19
|
-
* True for the "Book slot again" retry flow on /payment_success (payment
|
|
20
|
-
* already succeeded, original slot booking failed) — false/omitted for the
|
|
21
|
-
* original pre-payment booking flow. Tags every analytics event fired by
|
|
22
|
-
* this modal with `status: "pre_payment" | "post_payment"`, and hides the
|
|
23
|
-
* guidance-topic picker in the retry case (topic was already captured
|
|
24
|
-
* during the original pre-payment flow).
|
|
25
|
-
*/
|
|
26
|
-
isPostPayment?: boolean;
|
|
27
5
|
}
|
|
28
6
|
export declare const ConsultationSlotModal: React.FC<ConsultationSlotModalProps>;
|
|
@@ -34,3 +34,4 @@ export { PlanSheetHeader } from './PlanSheetHeader';
|
|
|
34
34
|
export { PlanFeatureList } from './PlanFeatureList';
|
|
35
35
|
export { AstrologerCard } from './AstrologerCard';
|
|
36
36
|
export { ConsultationSlotModal } from './ConsultationSlotModal';
|
|
37
|
+
export { ConsultationSlotFields } from './ConsultationSlotFields';
|
|
@@ -2,4 +2,6 @@ export { KundliPlanBottomSheet, getDefaultPlans } from './KundliPlanBottomSheet'
|
|
|
2
2
|
export type { KundliPlanBottomSheetProps, KundliPlan, ConsultationSlotSelection } from './KundliPlanBottomSheet';
|
|
3
3
|
export { ConsultationSlotModal } from './ConsultationSlotModal';
|
|
4
4
|
export type { ConsultationSlotModalProps } from './ConsultationSlotModal';
|
|
5
|
+
export { ConsultationSlotFields } from './ConsultationSlotFields';
|
|
6
|
+
export type { ConsultationSlotFieldsProps } from './ConsultationSlotFields';
|
|
5
7
|
export type { KundliPlanAstrologer, ConsultationSlot, ConsultationSlotDay, ConsultationSlotPeriod, ConsultationSlotsPreselectData, ConsultationSlotsByLanguage, FetchConsultationSlots, } from './types';
|
|
@@ -7,7 +7,7 @@ export declare const THREE_SKU_STRINGS: {
|
|
|
7
7
|
readonly planSheetTitle: "Choose your Kundli Plan";
|
|
8
8
|
readonly planProceedToPayment: "Proceed to Payment";
|
|
9
9
|
readonly planSelectConsultationSlot: "Select consultation slot →";
|
|
10
|
-
readonly planAstrologerHeading: "
|
|
10
|
+
readonly planAstrologerHeading: "We will match you with astrologer who speaks your language";
|
|
11
11
|
readonly planMostPopular: "Most popular";
|
|
12
12
|
readonly planNew: "New";
|
|
13
13
|
readonly planLimitedTimeCombo: "Limited-Time Combo";
|
|
@@ -53,7 +53,7 @@ export declare const THREE_SKU_STRINGS: {
|
|
|
53
53
|
readonly planSheetTitle: "अपनी कुंडली प्लान चुनें";
|
|
54
54
|
readonly planProceedToPayment: "पेमेंट करें";
|
|
55
55
|
readonly planSelectConsultationSlot: "परामर्श स्लॉट चुनें →";
|
|
56
|
-
readonly planAstrologerHeading: "हम
|
|
56
|
+
readonly planAstrologerHeading: "हम आपकी भाषा बोलने वाले ज्योतिषी से आपकी बात करवाएंगे";
|
|
57
57
|
readonly planMostPopular: "सबसे लोकप्रिय";
|
|
58
58
|
readonly planNew: "नया";
|
|
59
59
|
readonly planLimitedTimeCombo: "सीमित समय ऑफर";
|