@srimandir/pitru-paksh-common 2.42.0 → 2.44.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.
- package/dist/components/AddAncestorSheet/AddAncestorSheet.d.ts +3 -1
- package/dist/components/CartView/CartView.d.ts +10 -0
- package/dist/components/DatePickerSheet/DatePickerSheet.d.ts +2 -1
- package/dist/components/L2Card/L2Card.d.ts +3 -2
- package/dist/components/PujaDetailsForm/PujaDetailsForm.d.ts +1 -1
- package/dist/components/PujaDetailsForm/PujaDetailsForm.types.d.ts +13 -0
- package/dist/components/ServiceOfferCard/ServiceOfferCard.d.ts +7 -0
- package/dist/components/TithiPickerSheet/TithiPickerSheet.d.ts +2 -1
- package/dist/pitru-paksh-common.js +1121 -1120
- package/dist/pitru-paksh-common.umd.cjs +7 -7
- package/package.json +4 -3
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
|
|
1
2
|
export interface AddAncestorSheetProps {
|
|
2
3
|
isOpen: boolean;
|
|
3
|
-
|
|
4
|
+
/** Not called on Save — only on an actual dismiss (close button, backdrop, Escape). Saving is `onSave`'s job to close, so callers can tell the two apart. */
|
|
5
|
+
onClose: (reason?: BottomSheetCloseReason) => void;
|
|
4
6
|
onSave: (names: string[]) => void;
|
|
5
7
|
title: string;
|
|
6
8
|
fieldLabel: string;
|
|
@@ -55,6 +55,14 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
55
55
|
itemsClassName?: string;
|
|
56
56
|
/** className applied to every item; per-item `className` (via the item object) wins/merges on top. */
|
|
57
57
|
itemClassName?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Reports each rendered item row's DOM node as it mounts/unmounts, keyed
|
|
60
|
+
* by the item's own `id`. No visibility tracking happens here — this
|
|
61
|
+
* component stays dumb; observing these nodes (e.g. via
|
|
62
|
+
* `IntersectionObserver`) is the caller's job, same division as
|
|
63
|
+
* `Outcome`'s own `onCardRef`.
|
|
64
|
+
*/
|
|
65
|
+
onItemRef?: (id: CartViewItem['id'], el: HTMLDivElement | null) => void;
|
|
58
66
|
/** Add-on `ServiceOfferCard`s (tarpan, cow service, public service, ...). Omit/empty to hide the section. */
|
|
59
67
|
addons?: CartViewAddon[];
|
|
60
68
|
addonsSectionClassName?: string;
|
|
@@ -66,6 +74,8 @@ export interface CartViewProps extends Omit<React.HTMLAttributes<HTMLDivElement>
|
|
|
66
74
|
addonClassName?: string;
|
|
67
75
|
/** Optional card implementation for add-ons. Defaults to `ServiceOfferCard`. */
|
|
68
76
|
addonComponent?: React.ComponentType<ServiceOfferCardProps>;
|
|
77
|
+
/** Same as `onItemRef`, for add-on cards. */
|
|
78
|
+
onAddonRef?: (id: CartViewAddon['id'], el: HTMLDivElement | null) => void;
|
|
69
79
|
/** Price breakdown. Omit to hide it. All `BillDetails` props are available. */
|
|
70
80
|
billDetails?: BillDetailsProps;
|
|
71
81
|
/** FAQ accordion. Omit to hide it. All `FAQSection` props are available. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
|
|
1
2
|
export interface PickedDate {
|
|
2
3
|
day: number;
|
|
3
4
|
/** 1-12 */
|
|
@@ -6,7 +7,7 @@ export interface PickedDate {
|
|
|
6
7
|
}
|
|
7
8
|
export interface DatePickerSheetProps {
|
|
8
9
|
isOpen: boolean;
|
|
9
|
-
onClose: () => void;
|
|
10
|
+
onClose: (reason?: BottomSheetCloseReason) => void;
|
|
10
11
|
/** Shows a small circular avatar next to `heading`, e.g. to identify which ancestor's date this is. Omit for a plain heading. */
|
|
11
12
|
avatarUrl?: string;
|
|
12
13
|
heading: string;
|
|
@@ -18,9 +18,10 @@ export interface L2CardProps {
|
|
|
18
18
|
/**
|
|
19
19
|
* Chevron icon in the header, shown only while `isAdded` is false. Clicking it toggles the card's
|
|
20
20
|
* own expanded/collapsed display so a not-yet-added ritual can still be previewed. This callback
|
|
21
|
-
* fires alongside that toggle — use it for tracking, not for controlling visibility.
|
|
21
|
+
* fires alongside that toggle — use it for tracking, not for controlling visibility. `isExpanded`
|
|
22
|
+
* is the state it just switched to.
|
|
22
23
|
*/
|
|
23
|
-
onExpandClick?: () => void;
|
|
24
|
+
onExpandClick?: (isExpanded: boolean) => void;
|
|
24
25
|
expandButtonAriaLabel?: string;
|
|
25
26
|
/** Only rendered while expanded (added, or manually expanded via the chevron) */
|
|
26
27
|
imageUrl?: string;
|
|
@@ -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, copy: copyOverride, 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, onProceedCtaClick, onConfirmModalOpen, onConfirmEditDetailsClick, onConfirmModalDismiss, 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 —
|
|
@@ -86,5 +86,18 @@ export interface PujaDetailsFormProps {
|
|
|
86
86
|
* payment flow here.
|
|
87
87
|
*/
|
|
88
88
|
onProceedPayment: () => void;
|
|
89
|
+
/**
|
|
90
|
+
* Fired when the sticky `CheckoutBar`'s own CTA is tapped — the same tap
|
|
91
|
+
* that opens `ConfirmPujaDetailsModal`, but a distinct moment from
|
|
92
|
+
* `onProceedPayment` (that one only fires later, off the modal's own Pay
|
|
93
|
+
* button).
|
|
94
|
+
*/
|
|
95
|
+
onProceedCtaClick?: () => void;
|
|
96
|
+
/** The `ConfirmPujaDetailsModal` opened — the checkout bar's CTA was tapped. */
|
|
97
|
+
onConfirmModalOpen?: () => void;
|
|
98
|
+
/** The `ConfirmPujaDetailsModal`'s "Edit Details" was clicked (returns to this form). */
|
|
99
|
+
onConfirmEditDetailsClick?: () => void;
|
|
100
|
+
/** The `ConfirmPujaDetailsModal` closed via backdrop/X/Escape — not its own Edit Details or Pay. */
|
|
101
|
+
onConfirmModalDismiss?: () => void;
|
|
89
102
|
className?: string;
|
|
90
103
|
}
|
|
@@ -75,6 +75,13 @@ export interface ServiceOfferCardProps extends Omit<React.HTMLAttributes<HTMLDiv
|
|
|
75
75
|
sheetSavedLabel?: React.ReactNode;
|
|
76
76
|
/** Accessible name for the sheet dialog. */
|
|
77
77
|
sheetAriaLabel?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Fired when the inline "Read more"/"Read less" toggle is tapped —
|
|
80
|
+
* `isExpanded` is the state it just switched to. Also fires (as `true`) when
|
|
81
|
+
* the toggle instead opens the `ServiceOfferSheet` (`sheetPrice` set), since
|
|
82
|
+
* that's this card's only "read more" affordance in that case.
|
|
83
|
+
*/
|
|
84
|
+
onReadMoreClick?: (isExpanded: boolean) => void;
|
|
78
85
|
}
|
|
79
86
|
/**
|
|
80
87
|
* Add-on card used on "review your booking" screens: an image with a
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { BottomSheetCloseReason } from '../../../../common/dist/common.js';
|
|
1
2
|
export interface TithiPickerSheetProps {
|
|
2
3
|
isOpen: boolean;
|
|
3
|
-
onClose: () => void;
|
|
4
|
+
onClose: (reason?: BottomSheetCloseReason) => void;
|
|
4
5
|
avatarUrl: string;
|
|
5
6
|
heading: string;
|
|
6
7
|
tithis: string[];
|