@cimplify/sdk 0.71.0 → 0.72.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/react.d.mts +55 -17
- package/dist/react.d.ts +55 -17
- package/dist/react.js +148 -84
- package/dist/react.mjs +149 -85
- package/dist/testing.d.mts +15 -15
- package/dist/testing.d.ts +15 -15
- package/package.json +1 -1
- package/registry/accommodation-card.json +1 -1
- package/registry/add-on-selector.json +1 -1
- package/registry/billing-plan-selector.json +1 -1
- package/registry/booking-page.json +1 -1
- package/registry/bundle-selector.json +1 -1
- package/registry/compact-service-card.json +1 -1
- package/registry/composite-selector.json +1 -1
- package/registry/customer-input-fields.json +1 -1
- package/registry/date-slot-picker.json +1 -1
- package/registry/default-product-layout.json +1 -1
- package/registry/digital-product-card.json +1 -1
- package/registry/digital-product-layout.json +1 -1
- package/registry/food-product-card.json +1 -1
- package/registry/food-product-layout.json +1 -1
- package/registry/lease-service-card.json +1 -1
- package/registry/price-range.json +1 -1
- package/registry/price.json +1 -1
- package/registry/product-card.json +1 -1
- package/registry/product-customizer.json +1 -1
- package/registry/product-sheet.json +1 -1
- package/registry/rental-service-card.json +1 -1
- package/registry/retail-product-card.json +1 -1
- package/registry/sale-badge.json +1 -1
- package/registry/schedule-service-card.json +1 -1
- package/registry/service-product-layout.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/standard-service-card.json +1 -1
- package/registry/subscription-card.json +1 -1
- package/registry/variant-selector.json +1 -1
- package/registry/volume-pricing.json +1 -1
- package/registry/wholesale-product-card.json +1 -1
- package/registry/wholesale-product-layout.json +1 -1
package/dist/react.d.mts
CHANGED
|
@@ -760,25 +760,41 @@ interface CimplifyUserButtonProps {
|
|
|
760
760
|
declare function CimplifyUserButton({ session: controlledSession, sessionUri, links, identityUrl, signOutHref, onSignOut, clientId, redirectUri, signInLabel, onSignIn, hideName, align, className, }: CimplifyUserButtonProps): React$1.ReactElement | null;
|
|
761
761
|
|
|
762
762
|
interface PriceProps {
|
|
763
|
-
/** The amount in
|
|
763
|
+
/** The amount, denominated in `currency` (or the business base currency). */
|
|
764
764
|
amount: number | string;
|
|
765
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* Currency the `amount` is denominated in. Pass the product/order currency
|
|
767
|
+
* so the value renders correctly during SSR — before the provider has
|
|
768
|
+
* loaded the business client-side. Falls back to the provider's base
|
|
769
|
+
* currency, then USD.
|
|
770
|
+
*/
|
|
766
771
|
currency?: CurrencyCode;
|
|
767
772
|
/** Optional CSS class name for the wrapping span. */
|
|
768
773
|
className?: string;
|
|
769
774
|
/** Optional prefix rendered before the formatted price (e.g. "+"). */
|
|
770
775
|
prefix?: string;
|
|
776
|
+
/**
|
|
777
|
+
* Apply the provider's FX display-currency override when one is active.
|
|
778
|
+
* Default true. The conversion is a post-hydration enhancement: it only
|
|
779
|
+
* engages once an FX rate has loaded client-side, so SSR and first-paint
|
|
780
|
+
* output always match and no currency flash occurs.
|
|
781
|
+
*/
|
|
782
|
+
convert?: boolean;
|
|
771
783
|
}
|
|
772
784
|
/**
|
|
773
785
|
* Price — renders a formatted price value.
|
|
774
786
|
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
787
|
+
* Currency is resolved from the `currency` prop (the amount's source currency),
|
|
788
|
+
* falling back to the provider's base currency, then USD. Because the source
|
|
789
|
+
* currency comes from data rather than the client-only provider bootstrap, an
|
|
790
|
+
* explicit `currency` renders correctly during SSR.
|
|
777
791
|
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
792
|
+
* FX display-currency conversion (when a user picks a non-base display
|
|
793
|
+
* currency) is layered on top after hydration, and only when the source is the
|
|
794
|
+
* base currency the FX rate is computed from. It never affects the server or
|
|
795
|
+
* first-paint render, so there is no hydration mismatch.
|
|
780
796
|
*/
|
|
781
|
-
declare function Price({ amount, currency, className, prefix }: PriceProps): React$1.ReactElement;
|
|
797
|
+
declare function Price({ amount, currency, className, prefix, convert, }: PriceProps): React$1.ReactElement;
|
|
782
798
|
|
|
783
799
|
interface CimplifyClientContextValue {
|
|
784
800
|
client: CimplifyClient;
|
|
@@ -815,13 +831,23 @@ interface CimplifyProviderProps {
|
|
|
815
831
|
client?: CimplifyClient;
|
|
816
832
|
children: ReactNode;
|
|
817
833
|
onLocationChange?: (location: Location) => void;
|
|
834
|
+
/**
|
|
835
|
+
* Server-fetched business to seed the provider. When provided, `business`
|
|
836
|
+
* and `baseCurrency` are correct on the first (server) render, so prices
|
|
837
|
+
* render in the right currency during SSR with no loading flash. Pass from
|
|
838
|
+
* a Server Component via `getServerClient().business.getInfo()`. Passing
|
|
839
|
+
* `null` marks "no business" as resolved (still skips the loading state).
|
|
840
|
+
*/
|
|
841
|
+
initialBusiness?: Business | null;
|
|
842
|
+
/** Server-fetched locations to seed the provider alongside `initialBusiness`. */
|
|
843
|
+
initialLocations?: Location[];
|
|
818
844
|
/**
|
|
819
845
|
* Toggle hidden optimistic UI for collection-backed hooks. Default true.
|
|
820
846
|
* Set to false to disable optimistic updates app-wide (e.g. e2e tests).
|
|
821
847
|
*/
|
|
822
848
|
optimistic?: boolean;
|
|
823
849
|
}
|
|
824
|
-
declare function CimplifyProvider({ client, children, onLocationChange, optimistic, }: CimplifyProviderProps): React$1.ReactElement;
|
|
850
|
+
declare function CimplifyProvider({ client, children, onLocationChange, initialBusiness, initialLocations, optimistic, }: CimplifyProviderProps): React$1.ReactElement;
|
|
825
851
|
declare function useCimplify(): CimplifyContextValue;
|
|
826
852
|
declare function useOptionalCimplify(): CimplifyContextValue | null;
|
|
827
853
|
declare function useCimplifyClient(): CimplifyClientContextValue;
|
|
@@ -1508,13 +1534,14 @@ interface VariantSelectorProps {
|
|
|
1508
1534
|
variants: VariantView[];
|
|
1509
1535
|
variantAxes?: VariantAxisWithValues[];
|
|
1510
1536
|
basePrice?: Money;
|
|
1537
|
+
currency?: CurrencyCode;
|
|
1511
1538
|
selectedVariantId?: string;
|
|
1512
1539
|
onVariantChange: (variantId: string | undefined, variant: VariantView | undefined) => void;
|
|
1513
1540
|
productName?: string;
|
|
1514
1541
|
className?: string;
|
|
1515
1542
|
classNames?: VariantSelectorClassNames;
|
|
1516
1543
|
}
|
|
1517
|
-
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, productName, className, classNames, }: VariantSelectorProps): React$1.ReactElement | null;
|
|
1544
|
+
declare function VariantSelector({ variants, variantAxes, basePrice, currency, selectedVariantId, onVariantChange, productName, className, classNames, }: VariantSelectorProps): React$1.ReactElement | null;
|
|
1518
1545
|
|
|
1519
1546
|
interface AddOnSelectorClassNames {
|
|
1520
1547
|
root?: string;
|
|
@@ -1534,10 +1561,11 @@ interface AddOnSelectorProps {
|
|
|
1534
1561
|
addOns: AddOnWithOptions[];
|
|
1535
1562
|
selectedOptions: string[];
|
|
1536
1563
|
onOptionsChange: (optionIds: string[]) => void;
|
|
1564
|
+
currency?: CurrencyCode;
|
|
1537
1565
|
className?: string;
|
|
1538
1566
|
classNames?: AddOnSelectorClassNames;
|
|
1539
1567
|
}
|
|
1540
|
-
declare function AddOnSelector({ addOns, selectedOptions, onOptionsChange, className, classNames, }: AddOnSelectorProps): React$1.ReactElement | null;
|
|
1568
|
+
declare function AddOnSelector({ addOns, selectedOptions, onOptionsChange, currency, className, classNames, }: AddOnSelectorProps): React$1.ReactElement | null;
|
|
1541
1569
|
|
|
1542
1570
|
interface BundleSelectorClassNames {
|
|
1543
1571
|
root?: string;
|
|
@@ -1562,13 +1590,14 @@ interface BundleSelectorProps {
|
|
|
1562
1590
|
bundlePrice?: Money;
|
|
1563
1591
|
discountValue?: Money;
|
|
1564
1592
|
pricingType?: BundlePriceType;
|
|
1593
|
+
currency?: CurrencyCode;
|
|
1565
1594
|
onSelectionsChange: (selections: BundleSelectionInput[]) => void;
|
|
1566
1595
|
onPriceChange?: (price: number) => void;
|
|
1567
1596
|
onReady?: (ready: boolean) => void;
|
|
1568
1597
|
className?: string;
|
|
1569
1598
|
classNames?: BundleSelectorClassNames;
|
|
1570
1599
|
}
|
|
1571
|
-
declare function BundleSelector({ components, bundlePrice, discountValue, pricingType, onSelectionsChange, onPriceChange, onReady, className, classNames, }: BundleSelectorProps): React$1.ReactElement | null;
|
|
1600
|
+
declare function BundleSelector({ components, bundlePrice, discountValue, pricingType, currency, onSelectionsChange, onPriceChange, onReady, className, classNames, }: BundleSelectorProps): React$1.ReactElement | null;
|
|
1572
1601
|
|
|
1573
1602
|
interface CompositeSelectorClassNames {
|
|
1574
1603
|
root?: string;
|
|
@@ -1603,6 +1632,7 @@ interface CompositeSelectorClassNames {
|
|
|
1603
1632
|
interface CompositeSelectorProps {
|
|
1604
1633
|
compositeId: string;
|
|
1605
1634
|
groups: CompositeGroupView[];
|
|
1635
|
+
currency?: CurrencyCode;
|
|
1606
1636
|
onSelectionsChange: (selections: ComponentSelectionInput[]) => void;
|
|
1607
1637
|
onPriceChange?: (price: CompositePriceResult | null) => void;
|
|
1608
1638
|
onReady?: (ready: boolean) => void;
|
|
@@ -1610,7 +1640,7 @@ interface CompositeSelectorProps {
|
|
|
1610
1640
|
className?: string;
|
|
1611
1641
|
classNames?: CompositeSelectorClassNames;
|
|
1612
1642
|
}
|
|
1613
|
-
declare function CompositeSelector({ compositeId, groups, onSelectionsChange, onPriceChange, onReady, skipPriceFetch, className, classNames, }: CompositeSelectorProps): React$1.ReactElement | null;
|
|
1643
|
+
declare function CompositeSelector({ compositeId, groups, currency, onSelectionsChange, onPriceChange, onReady, skipPriceFetch, className, classNames, }: CompositeSelectorProps): React$1.ReactElement | null;
|
|
1614
1644
|
|
|
1615
1645
|
interface ProductCustomizerClassNames {
|
|
1616
1646
|
root?: string;
|
|
@@ -1828,10 +1858,11 @@ interface CustomerInputFieldsProps {
|
|
|
1828
1858
|
values: Record<string, unknown>;
|
|
1829
1859
|
onChange: (values: Record<string, unknown>) => void;
|
|
1830
1860
|
onFileUpload?: (file: File, field: ProductInputField) => Promise<string>;
|
|
1861
|
+
currency?: CurrencyCode;
|
|
1831
1862
|
className?: string;
|
|
1832
1863
|
classNames?: CustomerInputFieldsClassNames;
|
|
1833
1864
|
}
|
|
1834
|
-
declare function CustomerInputFields({ fields, values, onChange, onFileUpload, className, classNames, }: CustomerInputFieldsProps): React$1.ReactElement | null;
|
|
1865
|
+
declare function CustomerInputFields({ fields, values, onChange, onFileUpload, currency, className, classNames, }: CustomerInputFieldsProps): React$1.ReactElement | null;
|
|
1835
1866
|
|
|
1836
1867
|
interface SaleBadgeClassNames {
|
|
1837
1868
|
root?: string;
|
|
@@ -2409,6 +2440,8 @@ interface SlotPickerProps {
|
|
|
2409
2440
|
groupByTimeOfDay?: boolean;
|
|
2410
2441
|
/** Show price on each slot. Default: true. */
|
|
2411
2442
|
showPrice?: boolean;
|
|
2443
|
+
/** Currency the slot prices are denominated in. */
|
|
2444
|
+
currency?: CurrencyCode;
|
|
2412
2445
|
/**
|
|
2413
2446
|
* Hide slots whose `start_time` is already in the past. Default: true.
|
|
2414
2447
|
* Set to false to show elapsed slots greyed-out (still un-selectable).
|
|
@@ -2435,7 +2468,7 @@ interface SlotPickerProps {
|
|
|
2435
2468
|
className?: string;
|
|
2436
2469
|
classNames?: SlotPickerClassNames;
|
|
2437
2470
|
}
|
|
2438
|
-
declare function SlotPicker({ slots: slotsProp, serviceId, date, participantCount, selectedSlot, onSlotSelect, groupByTimeOfDay, showPrice, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, emptyMessage, className, classNames, }: SlotPickerProps): React$1.ReactElement;
|
|
2471
|
+
declare function SlotPicker({ slots: slotsProp, serviceId, date, participantCount, selectedSlot, onSlotSelect, groupByTimeOfDay, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, emptyMessage, className, classNames, }: SlotPickerProps): React$1.ReactElement;
|
|
2439
2472
|
|
|
2440
2473
|
interface DateSlotPickerClassNames {
|
|
2441
2474
|
root?: string;
|
|
@@ -2461,6 +2494,8 @@ interface DateSlotPickerProps {
|
|
|
2461
2494
|
availability?: DayAvailability[];
|
|
2462
2495
|
/** Show price on slots. Default: true. */
|
|
2463
2496
|
showPrice?: boolean;
|
|
2497
|
+
/** Currency the slot prices are denominated in. */
|
|
2498
|
+
currency?: CurrencyCode;
|
|
2464
2499
|
/** Forwarded to `<SlotPicker>` to render multi-day stay labels. */
|
|
2465
2500
|
schedulingMode?: SchedulingMode;
|
|
2466
2501
|
/** Forwarded to `<SlotPicker>` — unit for the stay summary in multi-day mode. */
|
|
@@ -2474,7 +2509,7 @@ interface DateSlotPickerProps {
|
|
|
2474
2509
|
className?: string;
|
|
2475
2510
|
classNames?: DateSlotPickerClassNames;
|
|
2476
2511
|
}
|
|
2477
|
-
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2512
|
+
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2478
2513
|
|
|
2479
2514
|
interface DatePickerClassNames {
|
|
2480
2515
|
/** Outer wrapper around the trigger. */
|
|
@@ -3480,6 +3515,8 @@ interface BillingPlanSelectorProps {
|
|
|
3480
3515
|
onPlanSelect?: (plan: ProductBillingPlan | null) => void;
|
|
3481
3516
|
/** Currently selected plan ID. */
|
|
3482
3517
|
selectedPlanId?: string | null;
|
|
3518
|
+
/** Currency the plan amounts are denominated in. */
|
|
3519
|
+
currency?: CurrencyCode;
|
|
3483
3520
|
/** Show a "One-time purchase" option at the top. */
|
|
3484
3521
|
showOneTimePurchase?: boolean;
|
|
3485
3522
|
/** Label for the one-time purchase option. Default: "One-time purchase". */
|
|
@@ -3495,7 +3532,7 @@ interface BillingPlanSelectorProps {
|
|
|
3495
3532
|
* Renders plan cards with frequency, markup, trial, and setup fee details.
|
|
3496
3533
|
* Returns `null` when no plans are available (and one-time purchase is hidden).
|
|
3497
3534
|
*/
|
|
3498
|
-
declare function BillingPlanSelector({ productId, plans: plansProp, onPlanSelect, selectedPlanId, showOneTimePurchase, oneTimePurchaseLabel, renderPlan, className, classNames, }: BillingPlanSelectorProps): React$1.ReactElement | null;
|
|
3535
|
+
declare function BillingPlanSelector({ productId, plans: plansProp, currency, onPlanSelect, selectedPlanId, showOneTimePurchase, oneTimePurchaseLabel, renderPlan, className, classNames, }: BillingPlanSelectorProps): React$1.ReactElement | null;
|
|
3499
3536
|
|
|
3500
3537
|
interface VolumePricingClassNames {
|
|
3501
3538
|
root?: string;
|
|
@@ -3511,10 +3548,11 @@ interface VolumePricingProps {
|
|
|
3511
3548
|
tiers: QuantityPricingTier[];
|
|
3512
3549
|
currentQuantity?: number;
|
|
3513
3550
|
defaultOpen?: boolean;
|
|
3551
|
+
currency?: CurrencyCode;
|
|
3514
3552
|
className?: string;
|
|
3515
3553
|
classNames?: VolumePricingClassNames;
|
|
3516
3554
|
}
|
|
3517
|
-
declare function VolumePricing({ tiers, currentQuantity, defaultOpen, className, classNames, }: VolumePricingProps): React$1.ReactElement | null;
|
|
3555
|
+
declare function VolumePricing({ tiers, currentQuantity, defaultOpen, currency, className, classNames, }: VolumePricingProps): React$1.ReactElement | null;
|
|
3518
3556
|
|
|
3519
3557
|
interface PriceRangeProps {
|
|
3520
3558
|
product: Product | ProductWithDetails;
|
package/dist/react.d.ts
CHANGED
|
@@ -760,25 +760,41 @@ interface CimplifyUserButtonProps {
|
|
|
760
760
|
declare function CimplifyUserButton({ session: controlledSession, sessionUri, links, identityUrl, signOutHref, onSignOut, clientId, redirectUri, signInLabel, onSignIn, hideName, align, className, }: CimplifyUserButtonProps): React$1.ReactElement | null;
|
|
761
761
|
|
|
762
762
|
interface PriceProps {
|
|
763
|
-
/** The amount in
|
|
763
|
+
/** The amount, denominated in `currency` (or the business base currency). */
|
|
764
764
|
amount: number | string;
|
|
765
|
-
/**
|
|
765
|
+
/**
|
|
766
|
+
* Currency the `amount` is denominated in. Pass the product/order currency
|
|
767
|
+
* so the value renders correctly during SSR — before the provider has
|
|
768
|
+
* loaded the business client-side. Falls back to the provider's base
|
|
769
|
+
* currency, then USD.
|
|
770
|
+
*/
|
|
766
771
|
currency?: CurrencyCode;
|
|
767
772
|
/** Optional CSS class name for the wrapping span. */
|
|
768
773
|
className?: string;
|
|
769
774
|
/** Optional prefix rendered before the formatted price (e.g. "+"). */
|
|
770
775
|
prefix?: string;
|
|
776
|
+
/**
|
|
777
|
+
* Apply the provider's FX display-currency override when one is active.
|
|
778
|
+
* Default true. The conversion is a post-hydration enhancement: it only
|
|
779
|
+
* engages once an FX rate has loaded client-side, so SSR and first-paint
|
|
780
|
+
* output always match and no currency flash occurs.
|
|
781
|
+
*/
|
|
782
|
+
convert?: boolean;
|
|
771
783
|
}
|
|
772
784
|
/**
|
|
773
785
|
* Price — renders a formatted price value.
|
|
774
786
|
*
|
|
775
|
-
*
|
|
776
|
-
*
|
|
787
|
+
* Currency is resolved from the `currency` prop (the amount's source currency),
|
|
788
|
+
* falling back to the provider's base currency, then USD. Because the source
|
|
789
|
+
* currency comes from data rather than the client-only provider bootstrap, an
|
|
790
|
+
* explicit `currency` renders correctly during SSR.
|
|
777
791
|
*
|
|
778
|
-
*
|
|
779
|
-
*
|
|
792
|
+
* FX display-currency conversion (when a user picks a non-base display
|
|
793
|
+
* currency) is layered on top after hydration, and only when the source is the
|
|
794
|
+
* base currency the FX rate is computed from. It never affects the server or
|
|
795
|
+
* first-paint render, so there is no hydration mismatch.
|
|
780
796
|
*/
|
|
781
|
-
declare function Price({ amount, currency, className, prefix }: PriceProps): React$1.ReactElement;
|
|
797
|
+
declare function Price({ amount, currency, className, prefix, convert, }: PriceProps): React$1.ReactElement;
|
|
782
798
|
|
|
783
799
|
interface CimplifyClientContextValue {
|
|
784
800
|
client: CimplifyClient;
|
|
@@ -815,13 +831,23 @@ interface CimplifyProviderProps {
|
|
|
815
831
|
client?: CimplifyClient;
|
|
816
832
|
children: ReactNode;
|
|
817
833
|
onLocationChange?: (location: Location) => void;
|
|
834
|
+
/**
|
|
835
|
+
* Server-fetched business to seed the provider. When provided, `business`
|
|
836
|
+
* and `baseCurrency` are correct on the first (server) render, so prices
|
|
837
|
+
* render in the right currency during SSR with no loading flash. Pass from
|
|
838
|
+
* a Server Component via `getServerClient().business.getInfo()`. Passing
|
|
839
|
+
* `null` marks "no business" as resolved (still skips the loading state).
|
|
840
|
+
*/
|
|
841
|
+
initialBusiness?: Business | null;
|
|
842
|
+
/** Server-fetched locations to seed the provider alongside `initialBusiness`. */
|
|
843
|
+
initialLocations?: Location[];
|
|
818
844
|
/**
|
|
819
845
|
* Toggle hidden optimistic UI for collection-backed hooks. Default true.
|
|
820
846
|
* Set to false to disable optimistic updates app-wide (e.g. e2e tests).
|
|
821
847
|
*/
|
|
822
848
|
optimistic?: boolean;
|
|
823
849
|
}
|
|
824
|
-
declare function CimplifyProvider({ client, children, onLocationChange, optimistic, }: CimplifyProviderProps): React$1.ReactElement;
|
|
850
|
+
declare function CimplifyProvider({ client, children, onLocationChange, initialBusiness, initialLocations, optimistic, }: CimplifyProviderProps): React$1.ReactElement;
|
|
825
851
|
declare function useCimplify(): CimplifyContextValue;
|
|
826
852
|
declare function useOptionalCimplify(): CimplifyContextValue | null;
|
|
827
853
|
declare function useCimplifyClient(): CimplifyClientContextValue;
|
|
@@ -1508,13 +1534,14 @@ interface VariantSelectorProps {
|
|
|
1508
1534
|
variants: VariantView[];
|
|
1509
1535
|
variantAxes?: VariantAxisWithValues[];
|
|
1510
1536
|
basePrice?: Money;
|
|
1537
|
+
currency?: CurrencyCode;
|
|
1511
1538
|
selectedVariantId?: string;
|
|
1512
1539
|
onVariantChange: (variantId: string | undefined, variant: VariantView | undefined) => void;
|
|
1513
1540
|
productName?: string;
|
|
1514
1541
|
className?: string;
|
|
1515
1542
|
classNames?: VariantSelectorClassNames;
|
|
1516
1543
|
}
|
|
1517
|
-
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, productName, className, classNames, }: VariantSelectorProps): React$1.ReactElement | null;
|
|
1544
|
+
declare function VariantSelector({ variants, variantAxes, basePrice, currency, selectedVariantId, onVariantChange, productName, className, classNames, }: VariantSelectorProps): React$1.ReactElement | null;
|
|
1518
1545
|
|
|
1519
1546
|
interface AddOnSelectorClassNames {
|
|
1520
1547
|
root?: string;
|
|
@@ -1534,10 +1561,11 @@ interface AddOnSelectorProps {
|
|
|
1534
1561
|
addOns: AddOnWithOptions[];
|
|
1535
1562
|
selectedOptions: string[];
|
|
1536
1563
|
onOptionsChange: (optionIds: string[]) => void;
|
|
1564
|
+
currency?: CurrencyCode;
|
|
1537
1565
|
className?: string;
|
|
1538
1566
|
classNames?: AddOnSelectorClassNames;
|
|
1539
1567
|
}
|
|
1540
|
-
declare function AddOnSelector({ addOns, selectedOptions, onOptionsChange, className, classNames, }: AddOnSelectorProps): React$1.ReactElement | null;
|
|
1568
|
+
declare function AddOnSelector({ addOns, selectedOptions, onOptionsChange, currency, className, classNames, }: AddOnSelectorProps): React$1.ReactElement | null;
|
|
1541
1569
|
|
|
1542
1570
|
interface BundleSelectorClassNames {
|
|
1543
1571
|
root?: string;
|
|
@@ -1562,13 +1590,14 @@ interface BundleSelectorProps {
|
|
|
1562
1590
|
bundlePrice?: Money;
|
|
1563
1591
|
discountValue?: Money;
|
|
1564
1592
|
pricingType?: BundlePriceType;
|
|
1593
|
+
currency?: CurrencyCode;
|
|
1565
1594
|
onSelectionsChange: (selections: BundleSelectionInput[]) => void;
|
|
1566
1595
|
onPriceChange?: (price: number) => void;
|
|
1567
1596
|
onReady?: (ready: boolean) => void;
|
|
1568
1597
|
className?: string;
|
|
1569
1598
|
classNames?: BundleSelectorClassNames;
|
|
1570
1599
|
}
|
|
1571
|
-
declare function BundleSelector({ components, bundlePrice, discountValue, pricingType, onSelectionsChange, onPriceChange, onReady, className, classNames, }: BundleSelectorProps): React$1.ReactElement | null;
|
|
1600
|
+
declare function BundleSelector({ components, bundlePrice, discountValue, pricingType, currency, onSelectionsChange, onPriceChange, onReady, className, classNames, }: BundleSelectorProps): React$1.ReactElement | null;
|
|
1572
1601
|
|
|
1573
1602
|
interface CompositeSelectorClassNames {
|
|
1574
1603
|
root?: string;
|
|
@@ -1603,6 +1632,7 @@ interface CompositeSelectorClassNames {
|
|
|
1603
1632
|
interface CompositeSelectorProps {
|
|
1604
1633
|
compositeId: string;
|
|
1605
1634
|
groups: CompositeGroupView[];
|
|
1635
|
+
currency?: CurrencyCode;
|
|
1606
1636
|
onSelectionsChange: (selections: ComponentSelectionInput[]) => void;
|
|
1607
1637
|
onPriceChange?: (price: CompositePriceResult | null) => void;
|
|
1608
1638
|
onReady?: (ready: boolean) => void;
|
|
@@ -1610,7 +1640,7 @@ interface CompositeSelectorProps {
|
|
|
1610
1640
|
className?: string;
|
|
1611
1641
|
classNames?: CompositeSelectorClassNames;
|
|
1612
1642
|
}
|
|
1613
|
-
declare function CompositeSelector({ compositeId, groups, onSelectionsChange, onPriceChange, onReady, skipPriceFetch, className, classNames, }: CompositeSelectorProps): React$1.ReactElement | null;
|
|
1643
|
+
declare function CompositeSelector({ compositeId, groups, currency, onSelectionsChange, onPriceChange, onReady, skipPriceFetch, className, classNames, }: CompositeSelectorProps): React$1.ReactElement | null;
|
|
1614
1644
|
|
|
1615
1645
|
interface ProductCustomizerClassNames {
|
|
1616
1646
|
root?: string;
|
|
@@ -1828,10 +1858,11 @@ interface CustomerInputFieldsProps {
|
|
|
1828
1858
|
values: Record<string, unknown>;
|
|
1829
1859
|
onChange: (values: Record<string, unknown>) => void;
|
|
1830
1860
|
onFileUpload?: (file: File, field: ProductInputField) => Promise<string>;
|
|
1861
|
+
currency?: CurrencyCode;
|
|
1831
1862
|
className?: string;
|
|
1832
1863
|
classNames?: CustomerInputFieldsClassNames;
|
|
1833
1864
|
}
|
|
1834
|
-
declare function CustomerInputFields({ fields, values, onChange, onFileUpload, className, classNames, }: CustomerInputFieldsProps): React$1.ReactElement | null;
|
|
1865
|
+
declare function CustomerInputFields({ fields, values, onChange, onFileUpload, currency, className, classNames, }: CustomerInputFieldsProps): React$1.ReactElement | null;
|
|
1835
1866
|
|
|
1836
1867
|
interface SaleBadgeClassNames {
|
|
1837
1868
|
root?: string;
|
|
@@ -2409,6 +2440,8 @@ interface SlotPickerProps {
|
|
|
2409
2440
|
groupByTimeOfDay?: boolean;
|
|
2410
2441
|
/** Show price on each slot. Default: true. */
|
|
2411
2442
|
showPrice?: boolean;
|
|
2443
|
+
/** Currency the slot prices are denominated in. */
|
|
2444
|
+
currency?: CurrencyCode;
|
|
2412
2445
|
/**
|
|
2413
2446
|
* Hide slots whose `start_time` is already in the past. Default: true.
|
|
2414
2447
|
* Set to false to show elapsed slots greyed-out (still un-selectable).
|
|
@@ -2435,7 +2468,7 @@ interface SlotPickerProps {
|
|
|
2435
2468
|
className?: string;
|
|
2436
2469
|
classNames?: SlotPickerClassNames;
|
|
2437
2470
|
}
|
|
2438
|
-
declare function SlotPicker({ slots: slotsProp, serviceId, date, participantCount, selectedSlot, onSlotSelect, groupByTimeOfDay, showPrice, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, emptyMessage, className, classNames, }: SlotPickerProps): React$1.ReactElement;
|
|
2471
|
+
declare function SlotPicker({ slots: slotsProp, serviceId, date, participantCount, selectedSlot, onSlotSelect, groupByTimeOfDay, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, emptyMessage, className, classNames, }: SlotPickerProps): React$1.ReactElement;
|
|
2439
2472
|
|
|
2440
2473
|
interface DateSlotPickerClassNames {
|
|
2441
2474
|
root?: string;
|
|
@@ -2461,6 +2494,8 @@ interface DateSlotPickerProps {
|
|
|
2461
2494
|
availability?: DayAvailability[];
|
|
2462
2495
|
/** Show price on slots. Default: true. */
|
|
2463
2496
|
showPrice?: boolean;
|
|
2497
|
+
/** Currency the slot prices are denominated in. */
|
|
2498
|
+
currency?: CurrencyCode;
|
|
2464
2499
|
/** Forwarded to `<SlotPicker>` to render multi-day stay labels. */
|
|
2465
2500
|
schedulingMode?: SchedulingMode;
|
|
2466
2501
|
/** Forwarded to `<SlotPicker>` — unit for the stay summary in multi-day mode. */
|
|
@@ -2474,7 +2509,7 @@ interface DateSlotPickerProps {
|
|
|
2474
2509
|
className?: string;
|
|
2475
2510
|
classNames?: DateSlotPickerClassNames;
|
|
2476
2511
|
}
|
|
2477
|
-
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2512
|
+
declare function DateSlotPicker({ serviceId, daysToShow, participantCount, selectedSlot, onSlotSelect, availability: availabilityProp, showPrice, currency, schedulingMode, durationUnit, durationValue, hideElapsedSlots, minLeadMinutes, className, classNames, }: DateSlotPickerProps): React$1.ReactElement;
|
|
2478
2513
|
|
|
2479
2514
|
interface DatePickerClassNames {
|
|
2480
2515
|
/** Outer wrapper around the trigger. */
|
|
@@ -3480,6 +3515,8 @@ interface BillingPlanSelectorProps {
|
|
|
3480
3515
|
onPlanSelect?: (plan: ProductBillingPlan | null) => void;
|
|
3481
3516
|
/** Currently selected plan ID. */
|
|
3482
3517
|
selectedPlanId?: string | null;
|
|
3518
|
+
/** Currency the plan amounts are denominated in. */
|
|
3519
|
+
currency?: CurrencyCode;
|
|
3483
3520
|
/** Show a "One-time purchase" option at the top. */
|
|
3484
3521
|
showOneTimePurchase?: boolean;
|
|
3485
3522
|
/** Label for the one-time purchase option. Default: "One-time purchase". */
|
|
@@ -3495,7 +3532,7 @@ interface BillingPlanSelectorProps {
|
|
|
3495
3532
|
* Renders plan cards with frequency, markup, trial, and setup fee details.
|
|
3496
3533
|
* Returns `null` when no plans are available (and one-time purchase is hidden).
|
|
3497
3534
|
*/
|
|
3498
|
-
declare function BillingPlanSelector({ productId, plans: plansProp, onPlanSelect, selectedPlanId, showOneTimePurchase, oneTimePurchaseLabel, renderPlan, className, classNames, }: BillingPlanSelectorProps): React$1.ReactElement | null;
|
|
3535
|
+
declare function BillingPlanSelector({ productId, plans: plansProp, currency, onPlanSelect, selectedPlanId, showOneTimePurchase, oneTimePurchaseLabel, renderPlan, className, classNames, }: BillingPlanSelectorProps): React$1.ReactElement | null;
|
|
3499
3536
|
|
|
3500
3537
|
interface VolumePricingClassNames {
|
|
3501
3538
|
root?: string;
|
|
@@ -3511,10 +3548,11 @@ interface VolumePricingProps {
|
|
|
3511
3548
|
tiers: QuantityPricingTier[];
|
|
3512
3549
|
currentQuantity?: number;
|
|
3513
3550
|
defaultOpen?: boolean;
|
|
3551
|
+
currency?: CurrencyCode;
|
|
3514
3552
|
className?: string;
|
|
3515
3553
|
classNames?: VolumePricingClassNames;
|
|
3516
3554
|
}
|
|
3517
|
-
declare function VolumePricing({ tiers, currentQuantity, defaultOpen, className, classNames, }: VolumePricingProps): React$1.ReactElement | null;
|
|
3555
|
+
declare function VolumePricing({ tiers, currentQuantity, defaultOpen, currency, className, classNames, }: VolumePricingProps): React$1.ReactElement | null;
|
|
3518
3556
|
|
|
3519
3557
|
interface PriceRangeProps {
|
|
3520
3558
|
product: Product | ProductWithDetails;
|