@srimandir/make-your-own-ritual 0.32.0 → 0.34.0

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.
@@ -1,3 +1,5 @@
1
+ import { PickedDate } from '../../../../pitru-paksh-common/dist/pitru-paksh-common.js';
2
+ import { MyorDismissType } from '../../dismissType';
1
3
  import { MakeYourOwnRitualDataState, RitualDataAction, TithiPreview, TithiValidity } from '../../types';
2
4
  /**
3
5
  * Interaction points this screen doesn't otherwise expose a callback for —
@@ -28,6 +30,7 @@ export type DeathTithiInteractionEvent = {
28
30
  type: "tithi_picker_dismiss";
29
31
  ancestorKey: string;
30
32
  ancestorPosition: number;
33
+ dismissType: MyorDismissType;
31
34
  } | {
32
35
  type: "date_picker_shown";
33
36
  ancestorKey: string;
@@ -41,6 +44,7 @@ export type DeathTithiInteractionEvent = {
41
44
  type: "date_picker_dismiss";
42
45
  ancestorKey: string;
43
46
  ancestorPosition: number;
47
+ dismissType: MyorDismissType;
44
48
  } | {
45
49
  type: "date_passed_popup_shown";
46
50
  ancestorKey: string;
@@ -49,6 +53,11 @@ export type DeathTithiInteractionEvent = {
49
53
  type: "date_passed_popup_dismiss";
50
54
  ancestorKey: string;
51
55
  ancestorPosition: number;
56
+ dismissType: MyorDismissType;
57
+ } | {
58
+ type: "date_passed_popup_proceed";
59
+ ancestorKey: string;
60
+ ancestorPosition: number;
52
61
  } | {
53
62
  type: "proceed_click";
54
63
  ancestorKey: string;
@@ -67,5 +76,7 @@ export interface DeathTithiProps {
67
76
  /** Checks whether a directly-picked tithi is still bookable. Never rejects — a failure resolves to undefined. */
68
77
  onValidateTithi?: (tithiKey: string, ancestorKey: string) => Promise<TithiValidity | undefined>;
69
78
  onInteraction?: (event: DeathTithiInteractionEvent) => void;
79
+ /** Last selectable date on the death-date picker — the backend rejects a future date of passing, so the host caps the wheel here instead of only finding out after a resolve call fails. Defaults to the picker's own "today" cap. */
80
+ maxDate?: PickedDate;
70
81
  }
71
- export declare function DeathTithi({ store, mutate, avatarUrl, audioSrc, onBackClick, onProceed, onResolveTithiForDate, onValidateTithi, onInteraction, }: DeathTithiProps): import("react").JSX.Element;
82
+ export declare function DeathTithi({ store, mutate, avatarUrl, audioSrc, onBackClick, onProceed, onResolveTithiForDate, onValidateTithi, onInteraction, maxDate, }: DeathTithiProps): import("react").JSX.Element;
@@ -1,15 +1,19 @@
1
1
  import { SupportedLocale } from '../../i18n';
2
- import { LandingPageStore, LandingPageAction, PitruPakshRenderableRitual } from '../../types';
2
+ import { LandingPageStore, LandingPageAction, LandingPagePackage, PitruPakshRenderableRitual } from '../../types';
3
3
  export interface LandingPageProps {
4
4
  store: LandingPageStore;
5
5
  mutate: (action: LandingPageAction) => void;
6
6
  onProceed: (selectedRitualIds: string[]) => void;
7
7
  onLocaleChange: (locale: SupportedLocale) => void;
8
+ /** "Who's performing the puja" packages — only `packages[0]`'s price backs the Mandap Vyavastha fee note, shown once a "ritual"-type puja is selected. */
9
+ packages?: LandingPagePackage[];
8
10
  /** Fired when a card's "About this Chadhava/Seva" link is clicked, with that ritual's id. */
9
11
  onAboutRitualClick?: (ritualId: string) => void;
10
12
  /** Fired once, the first time a card scrolls into view, with its 1-based list position. */
11
13
  onCardImpression?: (ritual: PitruPakshRenderableRitual, position: number) => void;
12
14
  /** Fired when a card's checkbox is toggled, with its 1-based list position and the new selected state. */
13
15
  onCardToggle?: (ritual: PitruPakshRenderableRitual, position: number, willBeSelected: boolean) => void;
16
+ /** Called when the top bar's back button is clicked. */
17
+ onBackClick?: () => void;
14
18
  }
15
- export declare function LandingPage({ store, mutate, onProceed, onLocaleChange, onAboutRitualClick, onCardImpression, onCardToggle, }: LandingPageProps): import("react").JSX.Element;
19
+ export declare function LandingPage({ store, mutate, onProceed, onLocaleChange, onAboutRitualClick, onCardImpression, onCardToggle, packages, onBackClick, }: LandingPageProps): import("react").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { PujaId, MakeYourOwnRitualDataState, RitualDataAction } from '../../types';
3
3
  import { RitualDayOption } from '../SelectRitualDaySheet';
4
+ import { MyorDismissType } from '../../dismissType';
4
5
  /**
5
6
  * Interaction points this screen doesn't otherwise expose a callback for —
6
7
  * added for analytics, kept as one prop rather than one per interaction so
@@ -24,6 +25,7 @@ export type SelectAncestorsInteractionEvent = {
24
25
  names: string[];
25
26
  } | {
26
27
  type: "add_ancestor_dismiss";
28
+ dismissType: MyorDismissType;
27
29
  } | {
28
30
  type: "proceed_click";
29
31
  isLastRitual: boolean;
@@ -31,6 +33,7 @@ export type SelectAncestorsInteractionEvent = {
31
33
  type: "ritual_day_prompt_shown";
32
34
  } | {
33
35
  type: "ritual_day_prompt_dismissed";
36
+ dismissType: MyorDismissType;
34
37
  };
35
38
  export interface SelectAncestorsProps {
36
39
  store: MakeYourOwnRitualDataState;
@@ -1,8 +1,9 @@
1
1
  import { default as React } from 'react';
2
+ import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
2
3
  export type RitualDayOption = 'amavasya' | 'death-anniversary';
3
4
  export interface SelectRitualDaySheetProps {
4
5
  isOpen: boolean;
5
- onClose: () => void;
6
+ onClose: (reason?: BottomSheetCloseReason) => void;
6
7
  /** Fires with the option active when the CTA is pressed — 'amavasya' needs no death-tithi step; only 'death-anniversary' does. */
7
8
  onCtaClick: (option: RitualDayOption) => void;
8
9
  /** True when every ancestor's tithi is unknown (all pujas selected "All Ancestors") — Amavasya is then the only sensible day, so skip the choice. Otherwise both options are offered. */
@@ -0,0 +1,10 @@
1
+ import { BottomSheetCloseReason } from '../../common/dist/common.js';
2
+ /**
3
+ * The MYOR instrumentation sheet's `dismiss_type` vocabulary. `'app_exit'`
4
+ * isn't reachable from a `BottomSheet` close (backdrop tap / Escape / close
5
+ * button) — it needs an app-lifecycle signal (visibility/unload) no sheet
6
+ * component here has, so `dismissTypeFor` below never produces it.
7
+ */
8
+ export type MyorDismissType = "back" | "app_exit" | "dismiss_icon";
9
+ /** Maps a `BottomSheet`'s close reason onto the sheet's `dismiss_type` vocabulary. */
10
+ export declare const dismissTypeFor: (reason?: BottomSheetCloseReason) => MyorDismissType;
@@ -25,7 +25,11 @@ export declare const en: {
25
25
  ritualSelectAriaLabel: string;
26
26
  ritualCountSingular: string;
27
27
  ritualCountPlural: string;
28
+ mandapFeeLabel: string;
29
+ mandapFeeItemLabel: string;
28
30
  ctaProceed: string;
31
+ formPhone: string;
32
+ formEmail: string;
29
33
  makeYourOwnRitualCtaLabel: string;
30
34
  makeYourOwnRitualHeroTitle: string;
31
35
  makeYourOwnRitualHeroSubtitle: string;
@@ -46,7 +50,7 @@ export declare const en: {
46
50
  selectAncestorsBackAriaLabel: string;
47
51
  selectAncestorsProgressLabel: string;
48
52
  selectAncestorsQuestion: string;
49
- selectAncestorsCardHeadingPrefix: string;
53
+ selectAncestorsCardHeading: string;
50
54
  selectAncestorsAllAncestorsCaption: string;
51
55
  selectAncestorsCtaNextRitual: string;
52
56
  selectAncestorsCtaProceed: string;
@@ -114,10 +118,14 @@ export declare const en: {
114
118
  selectRitualDaySheetHeading: string;
115
119
  selectRitualDaySheetCardTitle: string;
116
120
  selectRitualDaySheetCardDescription: string;
121
+ selectRitualDaySheetAllAncestorsCardTitle: string;
122
+ selectRitualDaySheetAllAncestorsCardDescription: string;
117
123
  selectRitualDaySheetTag: string;
118
124
  selectRitualDaySheetDeathAnniversaryTitle: string;
119
125
  selectRitualDaySheetDeathAnniversaryDescription: string;
120
126
  selectRitualDaySheetCta: string;
127
+ selectRitualDaySheetAmavasyaCta: string;
128
+ selectRitualDaySheetDeathTithiCta: string;
121
129
  outcomeSummaryBadge: string;
122
130
  outcomeSummaryHeading: string;
123
131
  outcomeSummaryTrust1: string;
@@ -25,7 +25,11 @@ export declare const hi: {
25
25
  ritualSelectAriaLabel: string;
26
26
  ritualCountSingular: string;
27
27
  ritualCountPlural: string;
28
+ mandapFeeLabel: string;
29
+ mandapFeeItemLabel: string;
28
30
  ctaProceed: string;
31
+ formPhone: string;
32
+ formEmail: string;
29
33
  makeYourOwnRitualCtaLabel: string;
30
34
  makeYourOwnRitualHeroTitle: string;
31
35
  makeYourOwnRitualHeroSubtitle: string;
@@ -46,7 +50,7 @@ export declare const hi: {
46
50
  selectAncestorsBackAriaLabel: string;
47
51
  selectAncestorsProgressLabel: string;
48
52
  selectAncestorsQuestion: string;
49
- selectAncestorsCardHeadingPrefix: string;
53
+ selectAncestorsCardHeading: string;
50
54
  selectAncestorsAllAncestorsCaption: string;
51
55
  selectAncestorsCtaNextRitual: string;
52
56
  selectAncestorsCtaProceed: string;
@@ -114,10 +118,14 @@ export declare const hi: {
114
118
  selectRitualDaySheetHeading: string;
115
119
  selectRitualDaySheetCardTitle: string;
116
120
  selectRitualDaySheetCardDescription: string;
121
+ selectRitualDaySheetAllAncestorsCardTitle: string;
122
+ selectRitualDaySheetAllAncestorsCardDescription: string;
117
123
  selectRitualDaySheetTag: string;
118
124
  selectRitualDaySheetDeathAnniversaryTitle: string;
119
125
  selectRitualDaySheetDeathAnniversaryDescription: string;
120
126
  selectRitualDaySheetCta: string;
127
+ selectRitualDaySheetAmavasyaCta: string;
128
+ selectRitualDaySheetDeathTithiCta: string;
121
129
  outcomeSummaryBadge: string;
122
130
  outcomeSummaryHeading: string;
123
131
  outcomeSummaryTrust1: string;
@@ -25,7 +25,11 @@ export declare const kn: {
25
25
  ritualSelectAriaLabel: string;
26
26
  ritualCountSingular: string;
27
27
  ritualCountPlural: string;
28
+ mandapFeeLabel: string;
29
+ mandapFeeItemLabel: string;
28
30
  ctaProceed: string;
31
+ formPhone: string;
32
+ formEmail: string;
29
33
  makeYourOwnRitualCtaLabel: string;
30
34
  makeYourOwnRitualHeroTitle: string;
31
35
  makeYourOwnRitualHeroSubtitle: string;
@@ -46,7 +50,7 @@ export declare const kn: {
46
50
  selectAncestorsBackAriaLabel: string;
47
51
  selectAncestorsProgressLabel: string;
48
52
  selectAncestorsQuestion: string;
49
- selectAncestorsCardHeadingPrefix: string;
53
+ selectAncestorsCardHeading: string;
50
54
  selectAncestorsAllAncestorsCaption: string;
51
55
  selectAncestorsCtaNextRitual: string;
52
56
  selectAncestorsCtaProceed: string;
@@ -114,10 +118,14 @@ export declare const kn: {
114
118
  selectRitualDaySheetHeading: string;
115
119
  selectRitualDaySheetCardTitle: string;
116
120
  selectRitualDaySheetCardDescription: string;
121
+ selectRitualDaySheetAllAncestorsCardTitle: string;
122
+ selectRitualDaySheetAllAncestorsCardDescription: string;
117
123
  selectRitualDaySheetTag: string;
118
124
  selectRitualDaySheetDeathAnniversaryTitle: string;
119
125
  selectRitualDaySheetDeathAnniversaryDescription: string;
120
126
  selectRitualDaySheetCta: string;
127
+ selectRitualDaySheetAmavasyaCta: string;
128
+ selectRitualDaySheetDeathTithiCta: string;
121
129
  outcomeSummaryBadge: string;
122
130
  outcomeSummaryHeading: string;
123
131
  outcomeSummaryTrust1: string;
@@ -25,7 +25,11 @@ export declare const te: {
25
25
  ritualSelectAriaLabel: string;
26
26
  ritualCountSingular: string;
27
27
  ritualCountPlural: string;
28
+ mandapFeeLabel: string;
29
+ mandapFeeItemLabel: string;
28
30
  ctaProceed: string;
31
+ formPhone: string;
32
+ formEmail: string;
29
33
  makeYourOwnRitualCtaLabel: string;
30
34
  makeYourOwnRitualHeroTitle: string;
31
35
  makeYourOwnRitualHeroSubtitle: string;
@@ -46,7 +50,7 @@ export declare const te: {
46
50
  selectAncestorsBackAriaLabel: string;
47
51
  selectAncestorsProgressLabel: string;
48
52
  selectAncestorsQuestion: string;
49
- selectAncestorsCardHeadingPrefix: string;
53
+ selectAncestorsCardHeading: string;
50
54
  selectAncestorsAllAncestorsCaption: string;
51
55
  selectAncestorsCtaNextRitual: string;
52
56
  selectAncestorsCtaProceed: string;
@@ -114,10 +118,14 @@ export declare const te: {
114
118
  selectRitualDaySheetHeading: string;
115
119
  selectRitualDaySheetCardTitle: string;
116
120
  selectRitualDaySheetCardDescription: string;
121
+ selectRitualDaySheetAllAncestorsCardTitle: string;
122
+ selectRitualDaySheetAllAncestorsCardDescription: string;
117
123
  selectRitualDaySheetTag: string;
118
124
  selectRitualDaySheetDeathAnniversaryTitle: string;
119
125
  selectRitualDaySheetDeathAnniversaryDescription: string;
120
126
  selectRitualDaySheetCta: string;
127
+ selectRitualDaySheetAmavasyaCta: string;
128
+ selectRitualDaySheetDeathTithiCta: string;
121
129
  outcomeSummaryBadge: string;
122
130
  outcomeSummaryHeading: string;
123
131
  outcomeSummaryTrust1: string;