@srimandir/pitru-paksh-ritual-recommendation 2.0.2 → 2.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.
@@ -0,0 +1,24 @@
1
+ export interface AncestorPujaItem {
2
+ /** e.g. "Great-grandfather Maternal" */
3
+ name: string;
4
+ /** e.g. "(Ekadashi)" */
5
+ tithi: string;
6
+ /** Whether this ancestor currently has a suggested puja (shows "Remove"); false shows "Add again" */
7
+ isActive: boolean;
8
+ }
9
+ export interface AncestorEditModalProps {
10
+ isOpen: boolean;
11
+ onClose: () => void;
12
+ avatarUrl?: string;
13
+ question: string;
14
+ ancestors: AncestorPujaItem[];
15
+ onToggle: (index: number) => void;
16
+ confirmLabel: string;
17
+ onConfirmClick: () => void;
18
+ addAgainLabel: string;
19
+ removeLabel: string;
20
+ removeWarningMessagePrefix: string;
21
+ removeWarningConfirmLabel: string;
22
+ removeWarningCancelLabel: string;
23
+ }
24
+ export declare function AncestorEditModal({ isOpen, onClose, avatarUrl, question, ancestors, onToggle, confirmLabel, onConfirmClick, addAgainLabel, removeLabel, removeWarningMessagePrefix, removeWarningConfirmLabel, removeWarningCancelLabel, }: AncestorEditModalProps): import("react").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ export { AncestorEditModal } from './AncestorEditModal';
2
+ export type { AncestorEditModalProps, AncestorPujaItem } from './AncestorEditModal';
3
+ export { RemoveWarningDialog } from './RemoveWarningDialog';
4
+ export type { RemoveWarningDialogProps } from './RemoveWarningDialog';
@@ -1,10 +1,14 @@
1
- import { RitualRecommendationAction, RitualRecommendationState } from '../../types';
1
+ import { RitualRecommendationAction, RitualRecommendationState, TithiPreview, TithiValidity } from '../../types';
2
2
  export interface DeathTithiProps {
3
- store: Pick<RitualRecommendationState, 'selectedAncestors' | 'deathTithiMethodByAncestor' | 'deathTithiValueByAncestor' | 'deathDateByAncestor' | 'currentDeathTithiAncestorIndex'>;
3
+ store: Pick<RitualRecommendationState, 'selectedAncestors' | 'deathTithiMethodByAncestor' | 'deathTithiValueByAncestor' | 'deathDateByAncestor' | 'tithiValidityByAncestor' | 'currentDeathTithiAncestorIndex'>;
4
4
  mutate: (action: RitualRecommendationAction) => void;
5
5
  avatarUrl: string;
6
6
  audioSrc?: string;
7
7
  onBackClick?: () => void;
8
8
  onProceed?: () => void;
9
+ /** Resolves the tithi a picked death date falls on. Persisted via SET_TITHI_PREVIEW; not rendered by this component. */
10
+ onResolveTithiForDate?: (date: string, ancestorKey: string) => Promise<TithiPreview | undefined>;
11
+ /** Checks whether a directly-picked tithi is still bookable. Never rejects — a failure resolves to undefined. */
12
+ onValidateTithi?: (tithiKey: string, ancestorKey: string) => Promise<TithiValidity | undefined>;
9
13
  }
10
- export declare function DeathTithi({ store, mutate, avatarUrl, audioSrc, onBackClick, onProceed }: DeathTithiProps): import("react").JSX.Element;
14
+ export declare function DeathTithi({ store, mutate, avatarUrl, audioSrc, onBackClick, onProceed, onResolveTithiForDate, onValidateTithi, }: DeathTithiProps): import("react").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  export interface HeroProps {
2
2
  videoUrl: string;
3
- ctaHref: string;
3
+ onCtaClick: () => void;
4
4
  }
5
- export declare function Hero({ videoUrl, ctaHref }: HeroProps): import("react").JSX.Element;
5
+ export declare function Hero({ videoUrl, onCtaClick }: HeroProps): import("react").JSX.Element;
@@ -1,8 +1,8 @@
1
1
  import { SupportedLocale } from '../../i18n';
2
2
  export interface LandingProps {
3
3
  videoUrl: string;
4
- ctaHref: string;
4
+ onCtaClick: () => void;
5
5
  locale: SupportedLocale;
6
6
  onLocaleChange: (locale: SupportedLocale) => void;
7
7
  }
8
- export declare function Landing({ videoUrl, ctaHref, locale, onLocaleChange, }: LandingProps): import("react").JSX.Element;
8
+ export declare function Landing({ videoUrl, onCtaClick, locale, onLocaleChange, }: LandingProps): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ export interface MandapArrangementCardProps {
2
+ imageUrl: string;
3
+ imageAlt: string;
4
+ title: string;
5
+ description: string;
6
+ /** Strikethrough original price, e.g. "₹851" */
7
+ originalPrice?: string;
8
+ /** e.g. "₹651" */
9
+ price: string;
10
+ isAdded: boolean;
11
+ onCtaClick?: () => void;
12
+ }
13
+ export declare function MandapArrangementCard({ imageUrl, imageAlt, title, description, originalPrice, price, isAdded, onCtaClick, }: MandapArrangementCardProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { MandapArrangementCard } from './MandapArrangementCard';
2
+ export type { MandapArrangementCardProps } from './MandapArrangementCard';
@@ -0,0 +1,19 @@
1
+ import { ReviewData } from '../ReviewsAndRatings';
2
+ import { DevoteeReviewData } from '../PujaDetailsSheet';
3
+ import { RitualRecommendationData, MandapArrangementData } from '../../types';
4
+ export interface OutcomeProps {
5
+ ritualCount: number;
6
+ rituals: RitualRecommendationData[];
7
+ mandapArrangement?: MandapArrangementData;
8
+ rating: string;
9
+ ratingCountLabel: string;
10
+ reviews: ReviewData[];
11
+ onReadAllReviewsClick?: () => void;
12
+ /** Devotee text reviews shown in every ritual's "Learn more" detail sheet */
13
+ devoteesReviews?: DevoteeReviewData[];
14
+ onDevoteesReviewsSeeMoreClick?: () => void;
15
+ totalPrice: string;
16
+ onPriceInfoClick?: () => void;
17
+ onProceedClick?: () => void;
18
+ }
19
+ export declare function Outcome({ ritualCount, rituals, mandapArrangement, rating, ratingCountLabel, reviews, onReadAllReviewsClick, devoteesReviews, onDevoteesReviewsSeeMoreClick, totalPrice, onPriceInfoClick, onProceedClick, }: OutcomeProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Outcome } from './Outcome';
2
+ export type { OutcomeProps } from './Outcome';
@@ -0,0 +1,3 @@
1
+ import { RitualRecommendationData } from '../../types';
2
+ export type RitualRecommendationCardProps = RitualRecommendationData;
3
+ export declare function RitualRecommendationCard({ index, ancestorsLabel, onEditClick, onExpandClick, imageUrl, imageAlt, ratingLabel, bookedLabel, title, description, onLearnMoreClick, learnMoreHref, dateLabel, locationLabel, price, isAdded, onCtaClick, onPriceInfoClick, }: RitualRecommendationCardProps): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { RitualRecommendationCard } from './RitualRecommendationCard';
2
+ export type { RitualRecommendationCardProps } from './RitualRecommendationCard';
@@ -1,6 +1,48 @@
1
- import { AncestorOptionData } from '../types';
2
1
  export declare const ALL_ANCESTORS_ID = "all";
3
- export declare const ANCESTOR_OPTIONS: AncestorOptionData[];
2
+ export declare const ANCESTOR_OPTIONS: [{
3
+ readonly id: "all";
4
+ readonly labelKey: "selectAncestorsOptionAll";
5
+ }, {
6
+ readonly id: "mother";
7
+ readonly labelKey: "selectAncestorsOptionMother";
8
+ readonly gender: "female";
9
+ }, {
10
+ readonly id: "father";
11
+ readonly labelKey: "selectAncestorsOptionFather";
12
+ readonly gender: "male";
13
+ }, {
14
+ readonly id: "grandfatherPaternal";
15
+ readonly labelKey: "selectAncestorsOptionGrandfatherPaternal";
16
+ readonly gender: "male";
17
+ }, {
18
+ readonly id: "grandmotherPaternal";
19
+ readonly labelKey: "selectAncestorsOptionGrandmotherPaternal";
20
+ readonly gender: "female";
21
+ }, {
22
+ readonly id: "grandfatherMaternal";
23
+ readonly labelKey: "selectAncestorsOptionGrandfatherMaternal";
24
+ readonly gender: "male";
25
+ }, {
26
+ readonly id: "grandmotherMaternal";
27
+ readonly labelKey: "selectAncestorsOptionGrandmotherMaternal";
28
+ readonly gender: "female";
29
+ }, {
30
+ readonly id: "greatGrandfatherPaternal";
31
+ readonly labelKey: "selectAncestorsOptionGreatGrandfatherPaternal";
32
+ readonly gender: "male";
33
+ }, {
34
+ readonly id: "greatGrandmotherPaternal";
35
+ readonly labelKey: "selectAncestorsOptionGreatGrandmotherPaternal";
36
+ readonly gender: "female";
37
+ }, {
38
+ readonly id: "greatGrandfatherMaternal";
39
+ readonly labelKey: "selectAncestorsOptionGreatGrandfatherMaternal";
40
+ readonly gender: "male";
41
+ }, {
42
+ readonly id: "greatGrandmotherMaternal";
43
+ readonly labelKey: "selectAncestorsOptionGreatGrandmotherMaternal";
44
+ readonly gender: "female";
45
+ }];
4
46
  export declare const MALE_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1788334548628.webp";
5
47
  export declare const FEMALE_ANCESTOR_AVATAR_URL = "https://srm-cdn.a4b.io/yoda/1788334564281.webp";
6
48
  /** Custom (free-text) ancestor names carry no gender, so they default to the male avatar. */
@@ -1,5 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
- import { I18nContextValue } from '@srimandir/common';
2
+ import { I18nContextValue } from '../../../common/dist/common.js';
3
3
  import { SupportedLocale } from './translations';
4
4
  export declare const I18nProvider: FC<{
5
5
  locale: SupportedLocale;
@@ -143,6 +143,9 @@ export declare const hi: {
143
143
  deathTithiCtaLabel: string;
144
144
  deathTithiFinalCtaLabel: string;
145
145
  deathTithiPickerHeadingSuffix: string;
146
+ deathTithiPickerConfirmCta: string;
147
+ deathDatePickerConfirmCta: string;
148
+ deathDatePickerTimezoneLabel: string;
146
149
  tithiNamePratipada: string;
147
150
  tithiNameDvitiya: string;
148
151
  tithiNameTritiya: string;
package/dist/index.d.ts CHANGED
@@ -2,6 +2,8 @@ export { I18nProvider, useI18n } from './i18n';
2
2
  export type { SupportedLocale } from './i18n';
3
3
  export { Landing } from './components/Landing';
4
4
  export type { LandingProps } from './components/Landing';
5
+ export { Outcome } from './components/Outcome';
6
+ export type { OutcomeProps } from './components/Outcome';
5
7
  export { BillDetails } from './components/BillDetails';
6
8
  export type { BillDetailsProps, BillDetailsItem } from './components/BillDetails';
7
9
  export { SelectAncestors } from './components/SelectAncestors';
@@ -10,9 +12,12 @@ export { CauseOfDeath } from './components/CauseOfDeath';
10
12
  export type { CauseOfDeathProps } from './components/CauseOfDeath';
11
13
  export { DeathTithi } from './components/DeathTithi';
12
14
  export type { DeathTithiProps } from './components/DeathTithi';
13
- export type { RitualRecommendationData, MandapArrangementData, OutcomeTrustIconVariant, OutcomeTrustItemData, CauseOfDeathValue, DeathTithiMethod, RitualRecommendationAction, RitualRecommendationState, } from './types';
15
+ export type { RitualRecommendationData, MandapArrangementData, OutcomeTrustIconVariant, OutcomeTrustItemData, CauseOfDeathValue, DeathTithiMethod, PhoneNumberData, TithiPreview, TithiValidity, RitualRecommendationAction, RitualRecommendationState, AncestorOptionData, } from './types';
14
16
  export type { ReviewData } from './components/ReviewsAndRatings';
15
17
  export type { DevoteeReviewData } from './components/PujaDetailsSheet';
18
+ export { ALL_ANCESTORS_ID, ANCESTOR_OPTIONS, MALE_ANCESTOR_AVATAR_URL, FEMALE_ANCESTOR_AVATAR_URL, getAncestorAvatarUrl, TITHI_NAME_KEYS, } from './constants';
19
+ export { mapTempleToRitualCardData } from './utils/mapTemplesResponse';
20
+ export type { TempleRitualCardData } from './utils/mapTemplesResponse';
16
21
  export { mapPujaL2Response } from './utils/mapPujaL2Response';
17
22
  export type { PujaL2DetailsSheetData } from './utils/mapPujaL2Response';
18
23
  export type { PujaL2Response } from './types/pujaL2.types';