@srimandir/pitru-paksh-common 2.10.0 → 2.10.1-alpha.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/BillDetails/BillDetails.translations.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/CartView/CartView.translations.d.ts +2 -1
- package/dist/components/CartView/index.d.ts +1 -0
- package/dist/components/CheckoutBar/CheckoutBar.d.ts +6 -0
- package/dist/components/CheckoutBar/CheckoutBar.translations.d.ts +2 -1
- package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.d.ts +1 -1
- package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.translations.d.ts +2 -1
- package/dist/components/ConfirmPujaDetailsModal/ConfirmPujaDetailsModal.types.d.ts +1 -0
- package/dist/components/GotraInfoModal/GotraInfoModal.translations.d.ts +1 -1
- package/dist/components/OnlinePujaTestimonial/OnlinePujaTestimonial.d.ts +1 -0
- package/dist/components/OutcomeAncestorEditModal/OutcomeAncestorEditModal.d.ts +23 -0
- package/dist/components/OutcomeBillDetails/OutcomeBillDetails.d.ts +17 -0
- package/dist/components/OutcomeEmptyRituals/OutcomeEmptyRituals.d.ts +1 -0
- package/dist/components/OutcomeStickyCta/OutcomeStickyCta.d.ts +10 -0
- package/dist/components/PackageSelect/PackageSelect.d.ts +10 -6
- package/dist/components/PackageSelect/PackageSelect.translations.d.ts +1 -1
- package/dist/components/ProcessInvolved/ProcessInvolved.d.ts +1 -0
- package/dist/components/PujaDetails/DevoteesReviews.d.ts +24 -0
- package/dist/components/PujaDetails/PujaBenefitsSection.d.ts +10 -0
- package/dist/components/PujaDetails/PujaDetailsCarouselHeader.d.ts +9 -0
- package/dist/components/PujaDetails/TempleSignificanceSection.d.ts +7 -0
- package/dist/components/PujaDetailsForm/PujaDetailsForm.d.ts +1 -1
- package/dist/components/PujaDetailsForm/PujaDetailsForm.translations.d.ts +18 -3
- package/dist/components/PujaDetailsForm/PujaDetailsForm.types.d.ts +13 -3
- package/dist/components/SelectorCard/SelectorCard.d.ts +4 -4
- package/dist/components/WhySriMandir/WhySriMandir.d.ts +1 -0
- package/dist/constants/outcome.constants.d.ts +7 -0
- package/dist/index.d.ts +27 -1
- package/dist/outcome-i18n/index.d.ts +11 -0
- package/dist/outcome-i18n/translations.d.ts +69 -0
- package/dist/pitru-paksh-common.d.ts +124 -0
- package/dist/pitru-paksh-common.js +3161 -1773
- package/dist/pitru-paksh-common.umd.cjs +8 -8
- package/dist/style.css +1 -1
- package/dist/types/outcome.types.d.ts +65 -0
- package/dist/types/pujaL2.types.d.ts +62 -0
- package/dist/utils/mapPujaL2Response.d.ts +16 -0
- package/package.json +4 -5
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
export declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "primary" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "md" | "lg" | "xs" | "sm" | "xl" | null | undefined;
|
|
6
6
|
iconOnly?: boolean | null | undefined;
|
|
7
7
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
8
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** Fixed copy for `CartView`, keyed by locale. */
|
|
2
|
-
export type CartViewLocale = 'en' | 'hi';
|
|
2
|
+
export type CartViewLocale = 'en' | 'hi' | 'kn' | 'te';
|
|
3
3
|
export interface CartViewDefaultCopy {
|
|
4
|
+
backButtonAriaLabel: string;
|
|
4
5
|
headerTitle: string;
|
|
5
6
|
addonsTitle: string;
|
|
6
7
|
addonsDescription: string;
|
|
@@ -25,6 +25,12 @@ export interface CheckoutBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
25
|
/** Extra props forwarded to the underlying `Button` (variant, size, disabled, loading, ...). */
|
|
26
26
|
proceedButtonProps?: Omit<ButtonProps, 'children' | 'onClick'>;
|
|
27
27
|
buttonWrapperClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Shrinks the amount/subtitle block to its content width and grows the
|
|
30
|
+
* Proceed button to fill the rest of the row instead of the default
|
|
31
|
+
* (amount block flexes, button sized to its label). Defaults to `false`.
|
|
32
|
+
*/
|
|
33
|
+
growProceedButton?: boolean;
|
|
28
34
|
}
|
|
29
35
|
/**
|
|
30
36
|
* Sticky-friendly checkout bar shown at the bottom of a package-selection or
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* re-computing/re-translating it. Pass `proceedLabel` explicitly to override
|
|
6
6
|
* it for a one-off usage.
|
|
7
7
|
*/
|
|
8
|
-
export type CheckoutBarLocale = 'en' | 'hi' | 'te';
|
|
8
|
+
export type CheckoutBarLocale = 'en' | 'hi' | 'kn' | 'te';
|
|
9
9
|
export interface CheckoutBarDefaultCopy {
|
|
10
10
|
proceedLabel: string;
|
|
11
|
+
infoButtonAriaLabel?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const CHECKOUT_BAR_DEFAULT_COPY: Record<CheckoutBarLocale, CheckoutBarDefaultCopy>;
|
|
13
14
|
/** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
|
|
@@ -8,4 +8,4 @@ import { ConfirmPujaDetailsModalProps } from './ConfirmPujaDetailsModal.types';
|
|
|
8
8
|
*
|
|
9
9
|
* All labels default to locale-specific copy (`locale`, `'en'`/`'hi'`/`'te'`).
|
|
10
10
|
*/
|
|
11
|
-
export declare function ConfirmPujaDetailsModal({ isOpen, onClose, locale, ancestors, kartaNames, gotra, whatsappNumber, amount, onEditDetailsClick, onProceedPayment, className, }: ConfirmPujaDetailsModalProps): import("react").JSX.Element;
|
|
11
|
+
export declare function ConfirmPujaDetailsModal({ isOpen, onClose, locale, ancestors, kartaNames, gotra, whatsappNumber, amount, onEditDetailsClick, onProceedPayment, className, isGlobal }: ConfirmPujaDetailsModalProps): import("react").JSX.Element;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* translation) lives here once instead of every consuming page
|
|
6
6
|
* re-computing/re-translating it.
|
|
7
7
|
*/
|
|
8
|
-
export type ConfirmPujaDetailsModalLocale = 'en' | 'hi' | 'te';
|
|
8
|
+
export type ConfirmPujaDetailsModalLocale = 'en' | 'hi' | 'kn' | 'te';
|
|
9
9
|
export interface ConfirmPujaDetailsModalDefaultCopy {
|
|
10
10
|
heading: string;
|
|
11
11
|
subtext: string;
|
|
@@ -16,6 +16,7 @@ export interface ConfirmPujaDetailsModalDefaultCopy {
|
|
|
16
16
|
editDetailsLabel: string;
|
|
17
17
|
/** e.g. "Pay {amount}" — `{amount}` is replaced with the `amount` prop (already formatted, e.g. "₹1648/-"). Word order varies by locale. */
|
|
18
18
|
payButtonTemplate: string;
|
|
19
|
+
emailLabel: string;
|
|
19
20
|
}
|
|
20
21
|
export declare const CONFIRM_PUJA_DETAILS_MODAL_DEFAULT_COPY: Record<ConfirmPujaDetailsModalLocale, ConfirmPujaDetailsModalDefaultCopy>;
|
|
21
22
|
/** Resolves the default copy for `locale`, falling back to `'en'` when unsupported. */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* when a devotee doesn't know their Gotra (lineage) — opened from the
|
|
4
4
|
* Gotra field's info icon in `PujaDetailsForm`.
|
|
5
5
|
*/
|
|
6
|
-
export type GotraInfoModalLocale = 'en' | 'hi' | 'te';
|
|
6
|
+
export type GotraInfoModalLocale = 'en' | 'hi' | 'kn' | 'te';
|
|
7
7
|
export interface GotraInfoModalDefaultCopy {
|
|
8
8
|
heading: string;
|
|
9
9
|
body: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function OnlinePujaTestimonial(): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface OutcomeAncestorPujaItem {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
tithi: string;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface OutcomeAncestorEditModalProps {
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
avatarUrl?: string;
|
|
11
|
+
question: string;
|
|
12
|
+
ancestors: OutcomeAncestorPujaItem[];
|
|
13
|
+
onToggle: (index: number) => void;
|
|
14
|
+
confirmLabel: string;
|
|
15
|
+
onConfirmClick: () => void;
|
|
16
|
+
addAgainLabel: string;
|
|
17
|
+
removeLabel: string;
|
|
18
|
+
removeWarningMessagePrefix: string;
|
|
19
|
+
removeWarningMessageSuffix?: string;
|
|
20
|
+
removeWarningConfirmLabel: string;
|
|
21
|
+
removeWarningCancelLabel: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function OutcomeAncestorEditModal({ isOpen, onClose, avatarUrl, question, ancestors, onToggle, confirmLabel, onConfirmClick, addAgainLabel, removeLabel, removeWarningMessagePrefix, removeWarningMessageSuffix, removeWarningConfirmLabel, removeWarningCancelLabel, }: OutcomeAncestorEditModalProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface OutcomeBillDetailsItem {
|
|
2
|
+
name: string;
|
|
3
|
+
subtitle: string;
|
|
4
|
+
quantityLabel?: string;
|
|
5
|
+
originalLineTotal?: string;
|
|
6
|
+
lineTotal: string;
|
|
7
|
+
}
|
|
8
|
+
export interface OutcomeBillDetailsProps {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
closeButtonAriaLabel?: string;
|
|
12
|
+
heading: string;
|
|
13
|
+
items: OutcomeBillDetailsItem[];
|
|
14
|
+
totalLabel: string;
|
|
15
|
+
totalAmount: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function OutcomeBillDetails({ isOpen, onClose, closeButtonAriaLabel, heading, items, totalLabel, totalAmount, }: OutcomeBillDetailsProps): import("react").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function OutcomeEmptyRituals(): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface OutcomeStickyCtaProps {
|
|
3
|
+
totalPrice: string;
|
|
4
|
+
ritualCountLabel: ReactNode;
|
|
5
|
+
proceedLabel?: ReactNode;
|
|
6
|
+
onPriceInfoClick?: () => void;
|
|
7
|
+
onProceedClick?: () => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function OutcomeStickyCta({ totalPrice, ritualCountLabel, proceedLabel, onPriceInfoClick, onProceedClick, disabled, }: OutcomeStickyCtaProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { SelectorCardProps,
|
|
2
|
+
import { SelectorCardProps, SelectorCardPriceBadgeProps } from '../SelectorCard';
|
|
3
3
|
import { TrustBadgesBarProps } from '../TrustBadgesBar';
|
|
4
4
|
import { CheckoutBarProps } from '../CheckoutBar';
|
|
5
5
|
import { PackageSelectLocale } from './PackageSelect.translations';
|
|
6
|
-
export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children'> {
|
|
6
|
+
export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'selected' | 'onSelect' | 'badge' | 'children' | 'note'> {
|
|
7
7
|
/** Unique id for this option, passed back via `onChange`. */
|
|
8
8
|
id: string | number;
|
|
9
9
|
/** Price label, e.g. "+₹400" or "₹0". Ignored when `badge` is set directly. */
|
|
@@ -18,11 +18,15 @@ export interface PackageSelectOption extends Omit<SelectorCardProps, 'id' | 'sel
|
|
|
18
18
|
badge?: React.ReactNode;
|
|
19
19
|
/** Extra props forwarded to the price badge (`SelectorCardPriceBadge`, or the plain muted `<span>` when `free`). */
|
|
20
20
|
priceBadgeProps?: Omit<SelectorCardPriceBadgeProps, 'value'>;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Explainer note shown only while this option is selected, e.g. "Rituals
|
|
23
|
+
* will be performed on behalf of 2 family members" — rendered via
|
|
24
|
+
* `SelectorCard`'s own `note` prop, as its own surface behind the card
|
|
25
|
+
* (same treatment `DeathTithi`'s "don't know the tithi" option uses),
|
|
26
|
+
* not nested inside it. Ignored when `children` is set directly.
|
|
27
|
+
*/
|
|
22
28
|
note?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
noteProps?: Omit<SelectorCardNoteProps, 'children'>;
|
|
25
|
-
/** Full override for the card's children slot — takes precedence over `note`/`noteProps`. */
|
|
29
|
+
/** Full override for the card's children slot — takes precedence over `note`. */
|
|
26
30
|
children?: React.ReactNode;
|
|
27
31
|
}
|
|
28
32
|
export interface PackageSelectProps {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `title`/`description`/`benefits`/`trustBadges` explicitly to override any
|
|
8
8
|
* of it for a one-off usage.
|
|
9
9
|
*/
|
|
10
|
-
export type PackageSelectLocale = 'en' | 'hi' | 'te';
|
|
10
|
+
export type PackageSelectLocale = 'en' | 'hi' | 'kn' | 'te';
|
|
11
11
|
export interface PackageSelectDefaultCopy {
|
|
12
12
|
title: string;
|
|
13
13
|
description: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ProcessInvolved(): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface DevoteeReviewData {
|
|
2
|
+
avatarUrl?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
date: string;
|
|
5
|
+
stars: number;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DevoteeReviewMedia {
|
|
9
|
+
videoUrl?: string;
|
|
10
|
+
thumbnailUrl?: string;
|
|
11
|
+
imageUrl?: string;
|
|
12
|
+
avatarUrl: string;
|
|
13
|
+
name: string;
|
|
14
|
+
location: string;
|
|
15
|
+
}
|
|
16
|
+
export interface DevoteesReviewsProps {
|
|
17
|
+
heading: string;
|
|
18
|
+
subtitle: string;
|
|
19
|
+
reviews: DevoteeReviewData[];
|
|
20
|
+
reviewMedia?: DevoteeReviewMedia[];
|
|
21
|
+
seeMoreLabel?: string;
|
|
22
|
+
onSeeMoreClick?: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare function DevoteesReviews({ heading, subtitle, reviews, reviewMedia, seeMoreLabel, onSeeMoreClick, }: DevoteesReviewsProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface PujaBenefitData {
|
|
2
|
+
icon?: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PujaBenefitsSectionProps {
|
|
7
|
+
heading: string;
|
|
8
|
+
benefits: PujaBenefitData[];
|
|
9
|
+
}
|
|
10
|
+
export declare function PujaBenefitsSection({ heading, benefits, }: PujaBenefitsSectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PujaDetailsCarouselHeaderProps {
|
|
2
|
+
images: string[];
|
|
3
|
+
useCase?: string;
|
|
4
|
+
title: string;
|
|
5
|
+
specificity?: string;
|
|
6
|
+
dateLabel: string;
|
|
7
|
+
locationLabel: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function PujaDetailsCarouselHeader({ images, useCase, title, specificity, dateLabel, locationLabel, }: PujaDetailsCarouselHeaderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TempleSignificanceSectionProps {
|
|
2
|
+
question: string;
|
|
3
|
+
imageUrl: string;
|
|
4
|
+
imageAlt?: string;
|
|
5
|
+
paragraphs: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function TempleSignificanceSection({ question, imageUrl, imageAlt, paragraphs, }: TempleSignificanceSectionProps): import("react").JSX.Element;
|
|
@@ -13,7 +13,7 @@ import { AncestorNameEntry, PujaDetailsFormProps, PujaDetailsFormValues } from '
|
|
|
13
13
|
* always the fixed, translated copy (not overridable) since this form only
|
|
14
14
|
* ever collects an Indian mobile number or an email.
|
|
15
15
|
*/
|
|
16
|
-
export declare function PujaDetailsForm({ locale, values, onValuesChange, isGlobal, gotraOptions, isSarvaPitru, onBackClick, amount, ritualsCountLabel, onPriceInfoClick, showPriceInfoIcon, canProceed, proceedCtaLabel, proceedButtonProps, onProceedPayment, className, }: PujaDetailsFormProps): import("react").JSX.Element;
|
|
16
|
+
export declare function PujaDetailsForm({ locale, values, onValuesChange, isGlobal, gotraOptions, isSarvaPitru, onBackClick, amount, ritualsCountLabel, onPriceInfoClick, showPriceInfoIcon, canProceed, copy: copyOverride, proceedCtaLabel, proceedButtonProps, onProceedPayment, className, }: PujaDetailsFormProps): import("react").JSX.Element;
|
|
17
17
|
/**
|
|
18
18
|
* Convenience factory for a blank `PujaDetailsFormValues`, e.g. to seed local
|
|
19
19
|
* component state. `kartaCount` sets how many Karta name fields render —
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `PujaDetailsFormProps` explicitly to override a piece of it for a one-off
|
|
8
8
|
* usage.
|
|
9
9
|
*/
|
|
10
|
-
export type PujaDetailsFormLocale = 'en' | 'hi' | 'te';
|
|
10
|
+
export type PujaDetailsFormLocale = 'en' | 'hi' | 'te' | 'kn';
|
|
11
11
|
export interface PujaDetailsFormDefaultCopy {
|
|
12
12
|
topBarTitle: string;
|
|
13
13
|
backButtonAriaLabel: string;
|
|
@@ -42,8 +42,23 @@ export interface PujaDetailsFormDefaultCopy {
|
|
|
42
42
|
/** Displayed as the Gotra in `ConfirmPujaDetailsModal` when `isGotraUnknown` is set, per `gotraUnknownHelperText`. */
|
|
43
43
|
kashyapGotraLabel: string;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Each locale need only cover what's actually been translated so far — a
|
|
47
|
+
* locale added ahead of a full translation pass (see `kn` below) isn't
|
|
48
|
+
* required to duplicate every key just to type-check. `en` is the one
|
|
49
|
+
* locale that must stay complete: it's `getPujaDetailsFormDefaultCopy`'s
|
|
50
|
+
* fallback for whatever a partial locale is still missing.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PUJA_DETAILS_FORM_DEFAULT_COPY: Record<PujaDetailsFormLocale, Partial<PujaDetailsFormDefaultCopy>> & {
|
|
53
|
+
en: PujaDetailsFormDefaultCopy;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Resolves the default copy for `locale`, merged onto the English baseline
|
|
57
|
+
* key-by-key (a blank value counts as missing too) — so a locale that's
|
|
58
|
+
* only partially translated so far (see `kn` above) shows real copy for
|
|
59
|
+
* what it has and English for what it doesn't, rather than requiring every
|
|
60
|
+
* key up front or falling back to English wholesale for one missing key.
|
|
61
|
+
*/
|
|
47
62
|
export declare const getPujaDetailsFormDefaultCopy: (locale?: string) => PujaDetailsFormDefaultCopy;
|
|
48
63
|
/** Resolves the ordinal word/numeral for a 1-based Karta field `position`, falling back to `'en'` when `locale` is unsupported. */
|
|
49
64
|
export declare const getKartaOrdinalLabel: (position: number, locale?: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckoutBarProps } from '../CheckoutBar';
|
|
2
|
-
import { PujaDetailsFormLocale } from './PujaDetailsForm.translations';
|
|
2
|
+
import { PujaDetailsFormDefaultCopy, PujaDetailsFormLocale } from './PujaDetailsForm.translations';
|
|
3
3
|
/** A single ancestor whose name is read in the sankalp. */
|
|
4
4
|
export interface AncestorNameEntry {
|
|
5
5
|
id: string;
|
|
@@ -30,10 +30,20 @@ export interface PujaDetailsFormValues {
|
|
|
30
30
|
}
|
|
31
31
|
export interface PujaDetailsFormProps {
|
|
32
32
|
/**
|
|
33
|
-
* Locale used to resolve
|
|
34
|
-
*
|
|
33
|
+
* Locale used to resolve default labels/placeholders when `copy` doesn't
|
|
34
|
+
* cover them. Defaults to `'en'`.
|
|
35
35
|
*/
|
|
36
36
|
locale?: PujaDetailsFormLocale;
|
|
37
|
+
/**
|
|
38
|
+
* Every piece of static copy this form shows — the app's own i18n system
|
|
39
|
+
* should be the one source of truth for it, not this component. Merged
|
|
40
|
+
* key-by-key over `locale`'s built-in default (a blank value in `copy`
|
|
41
|
+
* still falls back to the default), so a caller mid-translating a new
|
|
42
|
+
* locale need only pass what it already has. Omit entirely to use the
|
|
43
|
+
* built-in default outright (e.g. Storybook, which has no i18n of its
|
|
44
|
+
* own to source `copy` from).
|
|
45
|
+
*/
|
|
46
|
+
copy?: Partial<PujaDetailsFormDefaultCopy>;
|
|
37
47
|
values: PujaDetailsFormValues;
|
|
38
48
|
onValuesChange: (values: PujaDetailsFormValues) => void;
|
|
39
49
|
/**
|
|
@@ -42,10 +42,10 @@ export interface SelectorCardProps extends Omit<React.ButtonHTMLAttributes<HTMLB
|
|
|
42
42
|
*/
|
|
43
43
|
children?: React.ReactNode;
|
|
44
44
|
/**
|
|
45
|
-
* An explainer note rendered
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
45
|
+
* An explainer note rendered flush below the card, both wrapped in a shared
|
|
46
|
+
* lavender wash surface (instead of nested inside the card's own border like
|
|
47
|
+
* `children`). Typically shown only while `selected` is true; that's left to
|
|
48
|
+
* the caller.
|
|
49
49
|
*/
|
|
50
50
|
note?: React.ReactNode;
|
|
51
51
|
/** Extra classes for the `note` surface, e.g. to change its text color. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function WhySriMandir(): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OutcomeTrustIconVariant } from '../components/OutcomeSummary';
|
|
2
|
+
import { OutcomeTranslationKey } from '../outcome-i18n';
|
|
3
|
+
export interface OutcomeTrustItemData {
|
|
4
|
+
variant: OutcomeTrustIconVariant;
|
|
5
|
+
textKey: OutcomeTranslationKey;
|
|
6
|
+
}
|
|
7
|
+
export declare const OUTCOME_TRUST_ITEMS: OutcomeTrustItemData[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
export { getOutcomeTranslation, OutcomeI18nProvider, OUTCOME_SUPPORTED_LOCALES, outcomeTranslations, useOutcomeI18n, } from './outcome-i18n';
|
|
2
|
+
export type { OutcomeLocale, OutcomeTranslationKey, OutcomeTranslations, } from './outcome-i18n';
|
|
3
|
+
export { OutcomeBillDetails, } from './components/OutcomeBillDetails/OutcomeBillDetails';
|
|
4
|
+
export type { OutcomeBillDetailsItem, OutcomeBillDetailsProps, } from './components/OutcomeBillDetails/OutcomeBillDetails';
|
|
5
|
+
export { OutcomeAncestorEditModal, } from './components/OutcomeAncestorEditModal/OutcomeAncestorEditModal';
|
|
6
|
+
export type { OutcomeAncestorEditModalProps, OutcomeAncestorPujaItem, } from './components/OutcomeAncestorEditModal/OutcomeAncestorEditModal';
|
|
7
|
+
export { OutcomeStickyCta, } from './components/OutcomeStickyCta/OutcomeStickyCta';
|
|
8
|
+
export type { OutcomeStickyCtaProps, } from './components/OutcomeStickyCta/OutcomeStickyCta';
|
|
9
|
+
export { OutcomeEmptyRituals, } from './components/OutcomeEmptyRituals/OutcomeEmptyRituals';
|
|
10
|
+
export { OnlinePujaTestimonial, } from './components/OnlinePujaTestimonial/OnlinePujaTestimonial';
|
|
11
|
+
export { WhySriMandir } from './components/WhySriMandir/WhySriMandir';
|
|
12
|
+
export { ProcessInvolved } from './components/ProcessInvolved/ProcessInvolved';
|
|
13
|
+
export { PujaDetailsCarouselHeader, } from './components/PujaDetails/PujaDetailsCarouselHeader';
|
|
14
|
+
export type { PujaDetailsCarouselHeaderProps, } from './components/PujaDetails/PujaDetailsCarouselHeader';
|
|
15
|
+
export { PujaBenefitsSection, } from './components/PujaDetails/PujaBenefitsSection';
|
|
16
|
+
export type { PujaBenefitData, PujaBenefitsSectionProps, } from './components/PujaDetails/PujaBenefitsSection';
|
|
17
|
+
export { TempleSignificanceSection, } from './components/PujaDetails/TempleSignificanceSection';
|
|
18
|
+
export type { TempleSignificanceSectionProps, } from './components/PujaDetails/TempleSignificanceSection';
|
|
19
|
+
export { DevoteesReviews } from './components/PujaDetails/DevoteesReviews';
|
|
20
|
+
export type { DevoteeReviewData, DevoteeReviewMedia, DevoteesReviewsProps, } from './components/PujaDetails/DevoteesReviews';
|
|
21
|
+
export { OUTCOME_TRUST_ITEMS } from './constants/outcome.constants';
|
|
22
|
+
export type { OutcomeTrustItemData, } from './constants/outcome.constants';
|
|
1
23
|
export { Button, buttonVariants } from './components/Button';
|
|
2
24
|
export type { ButtonProps } from './components/Button';
|
|
3
25
|
export { ConfinedBottomSheet } from './components/ConfinedBottomSheet';
|
|
@@ -46,7 +68,7 @@ export type { BookingSummaryBannerLocale, BookingSummaryBannerDefaultCopy, } fro
|
|
|
46
68
|
export { BillDetails } from './components/BillDetails';
|
|
47
69
|
export type { BillDetailsProps, BillDetailsRow, } from './components/BillDetails';
|
|
48
70
|
export { CartView } from './components/CartView';
|
|
49
|
-
export type { CartViewProps, CartViewAddon, CartViewItem, } from './components/CartView';
|
|
71
|
+
export type { CartViewProps, CartViewAddon, CartViewItem, CartViewLocale, } from './components/CartView';
|
|
50
72
|
export { TextField } from './components/TextField';
|
|
51
73
|
export type { TextFieldProps } from './components/TextField';
|
|
52
74
|
export { TithiPickerSheet } from './components/TithiPickerSheet';
|
|
@@ -92,6 +114,10 @@ export { cn } from '../../common/dist/common.js';
|
|
|
92
114
|
export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, } from './constants';
|
|
93
115
|
export { DEATH_TITHI_OPTIONS, TITHI_NAME_KEYS } from './constants';
|
|
94
116
|
export type { AncestorOptionData, DeathTithiMethod } from './types';
|
|
117
|
+
export type { OutcomeAncestorItem, OutcomeMandapArrangementData, OutcomePackageSelectOption, OutcomePackageSelectProps, OutcomeRitualData, } from './types/outcome.types';
|
|
118
|
+
export { mapPujaL2Response } from './utils/mapPujaL2Response';
|
|
119
|
+
export type { PujaL2DetailsSheetData, } from './utils/mapPujaL2Response';
|
|
120
|
+
export type { PujaL2Benefit, PujaL2BenefitsCard, PujaL2Card, PujaL2InfoMedia, PujaL2LocationDetailsCard, PujaL2Response, PujaL2ReviewUser, PujaL2StoreCard, PujaL2TempleDetails, PujaL2UserReviewsCard, } from './types/pujaL2.types';
|
|
95
121
|
export { EventHeader } from './components/EventHeader';
|
|
96
122
|
export type { EventHeaderProps } from './components/EventHeader';
|
|
97
123
|
export { RitualProceedBar } from './components/RitualProceedBar';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { I18nContextValue } from '../../../common/dist/common.js';
|
|
3
|
+
import { OutcomeLocale, OutcomeTranslationKey } from './translations';
|
|
4
|
+
export declare const OutcomeI18nProvider: FC<{
|
|
5
|
+
locale: OutcomeLocale;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function useOutcomeI18n(): I18nContextValue<OutcomeLocale> | null;
|
|
9
|
+
export declare const getOutcomeTranslation: (locale: OutcomeLocale, key: OutcomeTranslationKey) => string;
|
|
10
|
+
export { OUTCOME_SUPPORTED_LOCALES, outcomeTranslations, } from './translations';
|
|
11
|
+
export type { OutcomeLocale, OutcomeTranslationKey, OutcomeTranslations, } from './translations';
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
export declare const OUTCOME_SUPPORTED_LOCALES: readonly ["en", "hi", "kn", "te"];
|
|
2
|
+
export type OutcomeLocale = (typeof OUTCOME_SUPPORTED_LOCALES)[number];
|
|
3
|
+
declare const en: {
|
|
4
|
+
landingOnlinePujaTitle: string;
|
|
5
|
+
landingOnlinePujaBodyPrefix: string;
|
|
6
|
+
landingOnlinePujaBodyPart1: string;
|
|
7
|
+
landingOnlinePujaBodyPart2: string;
|
|
8
|
+
landingOnlinePujaBodyPart3: string;
|
|
9
|
+
landingOnlinePujaBodyPart4: string;
|
|
10
|
+
landingOnlinePujaQuote: string;
|
|
11
|
+
landingTopBarBackButtonAriaLabel: string;
|
|
12
|
+
outcomeBadge: string;
|
|
13
|
+
outcomeHeadingPrefix: string;
|
|
14
|
+
outcomeHeadingRitualSingular: string;
|
|
15
|
+
outcomeHeadingRitualPlural: string;
|
|
16
|
+
outcomeHeadingSuffix: string;
|
|
17
|
+
outcomeTrustPanditsText: string;
|
|
18
|
+
outcomeTrustGotraText: string;
|
|
19
|
+
outcomeTrustVideoText: string;
|
|
20
|
+
outcomeEditAriaLabel: string;
|
|
21
|
+
outcomeLearnMoreLabel: string;
|
|
22
|
+
outcomePriceInfoLabel: string;
|
|
23
|
+
outcomeAddLabel: string;
|
|
24
|
+
outcomeAddedLabel: string;
|
|
25
|
+
outcomeStickyCtaRitualSingular: string;
|
|
26
|
+
outcomeStickyCtaRitualPlural: string;
|
|
27
|
+
outcomeStickyCtaPriceInfoAriaLabel: string;
|
|
28
|
+
outcomeStickyCtaProceedLabel: string;
|
|
29
|
+
outcomeEmptyRitualsTitle: string;
|
|
30
|
+
outcomeEmptyRitualsSubtitle: string;
|
|
31
|
+
outcomeRemovedRitualsHeading: string;
|
|
32
|
+
whySriMandirHeading: string;
|
|
33
|
+
whySriMandirGuaranteeLabel: string;
|
|
34
|
+
whySriMandirTemplesLabel: string;
|
|
35
|
+
whySriMandirSupportLabel: string;
|
|
36
|
+
processInvolvedHeading: string;
|
|
37
|
+
processNameGotraTitle: string;
|
|
38
|
+
processNameGotraDescription: string;
|
|
39
|
+
processLiveUpdatesTitle: string;
|
|
40
|
+
processLiveUpdatesDescription: string;
|
|
41
|
+
processMantrasTitle: string;
|
|
42
|
+
processMantrasDescription: string;
|
|
43
|
+
processVideoTitle: string;
|
|
44
|
+
processVideoDescription: string;
|
|
45
|
+
pujaBenefitsHeading: string;
|
|
46
|
+
templeSignificanceReadMoreLabel: string;
|
|
47
|
+
templeSignificanceReadLessLabel: string;
|
|
48
|
+
devoteesReviewsHeading: string;
|
|
49
|
+
devoteesReviewsSubtitle: string;
|
|
50
|
+
devoteesReviewsSeeMoreLabel: string;
|
|
51
|
+
pujaDetailsGotItLabel: string;
|
|
52
|
+
ancestorEditQuestion: string;
|
|
53
|
+
ancestorEditAddAgainLabel: string;
|
|
54
|
+
ancestorEditRemoveLabel: string;
|
|
55
|
+
ancestorEditConfirmLabel: string;
|
|
56
|
+
ancestorRemoveWarningPrefix: string;
|
|
57
|
+
ancestorRemoveWarningSuffix: string;
|
|
58
|
+
ancestorRemoveWarningConfirmLabel: string;
|
|
59
|
+
ancestorRemoveWarningCancelLabel: string;
|
|
60
|
+
billDetailsHeading: string;
|
|
61
|
+
billDetailsCloseAriaLabel: string;
|
|
62
|
+
pujaDetailsDragHandleAriaLabel: string;
|
|
63
|
+
billDetailsTotalLabel: string;
|
|
64
|
+
billDetailsFeeLabel: string;
|
|
65
|
+
};
|
|
66
|
+
export type OutcomeTranslationKey = keyof typeof en;
|
|
67
|
+
export type OutcomeTranslations = Record<OutcomeTranslationKey, string>;
|
|
68
|
+
export declare const outcomeTranslations: Record<OutcomeLocale, OutcomeTranslations>;
|
|
69
|
+
export {};
|