@cimplify/sdk 0.19.0 → 0.20.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/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +21 -21
- package/dist/advanced.mjs +2 -2
- package/dist/{chunk-RYQ5IPWX.js → chunk-2BSYTQAY.js} +18 -28
- package/dist/{chunk-AFEE43MQ.mjs → chunk-676BJ3EU.mjs} +43 -8
- package/dist/{chunk-7ACYNCNM.mjs → chunk-7KH2XJIW.mjs} +55 -12
- package/dist/{chunk-B2RTVYJR.js → chunk-AVVLN353.js} +76 -40
- package/dist/{chunk-FTL2SXCG.mjs → chunk-HG7GG3TT.mjs} +18 -28
- package/dist/{chunk-6SRY4DPY.js → chunk-KSN3RJFL.js} +74 -30
- package/dist/{client-FNZzXO_v.d.ts → client-D4E9aJy7.d.mts} +139 -7
- package/dist/{client-B3payjUV.d.mts → client-VyO6Bqz2.d.ts} +139 -7
- package/dist/index.d.mts +38 -5
- package/dist/index.d.ts +38 -5
- package/dist/index.js +101 -97
- package/dist/index.mjs +3 -3
- package/dist/{payment-CO2tRThu.d.mts → payment-CKqMU4xT.d.mts} +1051 -943
- package/dist/{payment-CO2tRThu.d.ts → payment-CKqMU4xT.d.ts} +1051 -943
- package/dist/{price-Bp6JlVzW.d.ts → price-BqV_DjjQ.d.mts} +1 -1
- package/dist/{price-Dg7MJEsL.d.mts → price-e4beObLZ.d.ts} +1 -1
- package/dist/react.d.mts +463 -11
- package/dist/react.d.ts +463 -11
- package/dist/react.js +1630 -113
- package/dist/react.mjs +1566 -65
- package/dist/styles.css +1 -1
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +28 -28
- package/dist/utils.mjs +1 -1
- package/package.json +2 -2
- package/registry/availability-badge.json +1 -1
- package/registry/booking-page.json +1 -1
- package/registry/bundle-selector.json +1 -1
- package/registry/cart-summary.json +1 -1
- package/registry/composite-selector.json +1 -1
- package/registry/order-summary.json +1 -1
- package/registry/product-customizer.json +1 -1
- package/registry/search-input.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/variant-selector.json +1 -1
package/dist/react.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.js';
|
|
3
3
|
export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
|
|
4
|
-
import { C as CimplifyClient,
|
|
5
|
-
import {
|
|
6
|
-
import { P as ProductWithPrice } from './price-
|
|
4
|
+
import { C as CimplifyClient, a7 as ProcessCheckoutResult, a9 as CheckoutStatus, aa as CheckoutStatusContext, bJ as Location, bG as Business, b1 as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, aQ as OrderStatus, bW as Service, bZ as AvailableSlot, b_ as DayAvailability, c3 as CustomerBooking, c9 as CancelBookingResult, v as ActivityStateResponse, t as SessionMessage, w as ActivityRecommendation, z as DeliveryFeeResponse, cL as FxRateResponse, bQ as StorefrontBootstrap, X as ElementsOptions, cZ as AuthenticatedData, cV as AddressInfo, cW as PaymentMethodInfo, J as CimplifyElements, c$ as ElementsCheckoutResult, a6 as ProcessCheckoutOptions, b0 as LineItem, bX as Staff } from './client-VyO6Bqz2.js';
|
|
5
|
+
import { J as Product, d as Pagination, h as CimplifyError, L as ProductWithDetails, a5 as Category, M as Money, b0 as BundleSelectionInput, av as ComponentSelectionInput, b3 as BundleSelectionData, b6 as CompositeSelectionData, a7 as Collection, aD as ProductTaxonomy, aE as TaxonomyWithChildren, aC as ProductTimeProfile, aH as Deal, aI as ProductDealInfo, aJ as DiscountValidation, ac as BundleSummary, aw as CompositePriceResult, y as CustomAttributeDefinition, G as PropertyFacet, bI as ProductBillingPlan, N as VariantView, W as VariantAxisWithValues, a as CurrencyCode, a1 as AddOnWithOptions, ah as BundleComponentView, aa as BundlePriceType, as as CompositeGroupView, bb as DisplayCart } from './payment-CKqMU4xT.js';
|
|
6
|
+
import { P as ProductWithPrice } from './price-e4beObLZ.js';
|
|
7
7
|
import { ClassValue } from 'clsx';
|
|
8
8
|
|
|
9
9
|
interface UserIdentity {
|
|
@@ -211,6 +211,11 @@ interface UseCartItem {
|
|
|
211
211
|
scheduledStart?: string;
|
|
212
212
|
scheduledEnd?: string;
|
|
213
213
|
staffId?: string;
|
|
214
|
+
lineType?: "simple" | "service" | "bundle" | "composite" | "digital";
|
|
215
|
+
confirmationCode?: string;
|
|
216
|
+
serviceStatus?: string;
|
|
217
|
+
bundleResolved?: BundleSelectionData;
|
|
218
|
+
compositeResolved?: CompositeSelectionData;
|
|
214
219
|
}
|
|
215
220
|
interface AddToCartOptions {
|
|
216
221
|
locationId?: string;
|
|
@@ -557,6 +562,171 @@ interface UseBookingsResult {
|
|
|
557
562
|
}
|
|
558
563
|
declare function useBookings(options?: UseBookingsOptions): UseBookingsResult;
|
|
559
564
|
|
|
565
|
+
interface UseAttributeDefinitionsOptions {
|
|
566
|
+
enabled?: boolean;
|
|
567
|
+
namespace?: string;
|
|
568
|
+
client?: CimplifyClient;
|
|
569
|
+
}
|
|
570
|
+
interface UseAttributeDefinitionsResult {
|
|
571
|
+
definitions: CustomAttributeDefinition[];
|
|
572
|
+
isLoading: boolean;
|
|
573
|
+
error: CimplifyError | null;
|
|
574
|
+
refetch: () => Promise<void>;
|
|
575
|
+
}
|
|
576
|
+
declare function useAttributeDefinitions(options?: UseAttributeDefinitionsOptions): UseAttributeDefinitionsResult;
|
|
577
|
+
|
|
578
|
+
interface UsePropertyFacetsOptions {
|
|
579
|
+
enabled?: boolean;
|
|
580
|
+
client?: CimplifyClient;
|
|
581
|
+
category_id?: string;
|
|
582
|
+
product_type?: string;
|
|
583
|
+
}
|
|
584
|
+
interface UsePropertyFacetsResult {
|
|
585
|
+
facets: PropertyFacet[];
|
|
586
|
+
isLoading: boolean;
|
|
587
|
+
error: CimplifyError | null;
|
|
588
|
+
refetch: () => Promise<void>;
|
|
589
|
+
}
|
|
590
|
+
declare function usePropertyFacets(options?: UsePropertyFacetsOptions): UsePropertyFacetsResult;
|
|
591
|
+
|
|
592
|
+
interface UseBillingPlansOptions {
|
|
593
|
+
enabled?: boolean;
|
|
594
|
+
client?: CimplifyClient;
|
|
595
|
+
customerId?: string;
|
|
596
|
+
quantity?: number;
|
|
597
|
+
orderValue?: number;
|
|
598
|
+
}
|
|
599
|
+
interface UseBillingPlansResult {
|
|
600
|
+
plans: ProductBillingPlan[];
|
|
601
|
+
subscriptionPlans: ProductBillingPlan[];
|
|
602
|
+
installmentPlans: ProductBillingPlan[];
|
|
603
|
+
isLoading: boolean;
|
|
604
|
+
error: CimplifyError | null;
|
|
605
|
+
refetch: () => Promise<void>;
|
|
606
|
+
}
|
|
607
|
+
/**
|
|
608
|
+
* Fetch eligible billing plans for a product, filtered by customer/quantity/order value.
|
|
609
|
+
*
|
|
610
|
+
* For unfiltered plans, use `product.billing_plans` directly from `useProduct` instead —
|
|
611
|
+
* they are included in the product response and require no extra API call.
|
|
612
|
+
*/
|
|
613
|
+
declare function useBillingPlans(productId: string | null | undefined, options?: UseBillingPlansOptions): UseBillingPlansResult;
|
|
614
|
+
|
|
615
|
+
interface UseVariantSelectorOptions {
|
|
616
|
+
variants: VariantView[];
|
|
617
|
+
axes: VariantAxisWithValues[];
|
|
618
|
+
}
|
|
619
|
+
interface UseVariantSelectorResult {
|
|
620
|
+
selectedValues: Record<string, string>;
|
|
621
|
+
selectedVariant: VariantView | null;
|
|
622
|
+
variantImage: string | null;
|
|
623
|
+
availableValues: Record<string, Set<string>>;
|
|
624
|
+
selectValue: (axisId: string, valueId: string) => void;
|
|
625
|
+
reset: () => void;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Multi-axis variant selector. Resolves a variant from axis selections
|
|
629
|
+
* and computes which values remain available as the user narrows choices.
|
|
630
|
+
*
|
|
631
|
+
* ```tsx
|
|
632
|
+
* const { selectedValues, selectedVariant, availableValues, selectValue } =
|
|
633
|
+
* useVariantSelector({ variants: product.variants, axes: product.variant_axes });
|
|
634
|
+
*
|
|
635
|
+
* // Render axes
|
|
636
|
+
* axes.map(axis => axis.values.map(value => (
|
|
637
|
+
* <button
|
|
638
|
+
* disabled={!availableValues[axis.id]?.has(value.id)}
|
|
639
|
+
* onClick={() => selectValue(axis.id, value.id)}
|
|
640
|
+
* style={value.color_hex ? { backgroundColor: value.color_hex } : undefined}
|
|
641
|
+
* />
|
|
642
|
+
* )));
|
|
643
|
+
* ```
|
|
644
|
+
*/
|
|
645
|
+
declare function useVariantSelector(options: UseVariantSelectorOptions): UseVariantSelectorResult;
|
|
646
|
+
|
|
647
|
+
interface UseActivityStateOptions {
|
|
648
|
+
enabled?: boolean;
|
|
649
|
+
client?: CimplifyClient;
|
|
650
|
+
}
|
|
651
|
+
interface UseActivityStateResult {
|
|
652
|
+
state: ActivityStateResponse | null;
|
|
653
|
+
messages: SessionMessage[];
|
|
654
|
+
intent: string;
|
|
655
|
+
isLoading: boolean;
|
|
656
|
+
error: CimplifyError | null;
|
|
657
|
+
refetch: () => Promise<void>;
|
|
658
|
+
dismissMessage: (code: string) => Promise<void>;
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* useActivityState — fetches the current session activity state including messages and intent.
|
|
662
|
+
*
|
|
663
|
+
* Wraps `client.activity.getState()` with global caching and in-flight dedup.
|
|
664
|
+
* Provides a `dismissMessage` action to dismiss individual messages and refetch.
|
|
665
|
+
*/
|
|
666
|
+
declare function useActivityState(options?: UseActivityStateOptions): UseActivityStateResult;
|
|
667
|
+
|
|
668
|
+
interface UseRecommendationsOptions {
|
|
669
|
+
locationId?: string;
|
|
670
|
+
limit?: number;
|
|
671
|
+
enabled?: boolean;
|
|
672
|
+
client?: CimplifyClient;
|
|
673
|
+
}
|
|
674
|
+
interface UseRecommendationsResult {
|
|
675
|
+
recommendations: ActivityRecommendation[];
|
|
676
|
+
intent: string;
|
|
677
|
+
isLoading: boolean;
|
|
678
|
+
error: CimplifyError | null;
|
|
679
|
+
refetch: () => Promise<void>;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* useRecommendations — fetches personalized product recommendations based on session activity.
|
|
683
|
+
*
|
|
684
|
+
* Wraps `client.activity.getRecommendations()` with global caching and in-flight dedup.
|
|
685
|
+
* Cache key includes locationId and limit.
|
|
686
|
+
*/
|
|
687
|
+
declare function useRecommendations(options?: UseRecommendationsOptions): UseRecommendationsResult;
|
|
688
|
+
|
|
689
|
+
interface UseDeliveryFeeOptions {
|
|
690
|
+
latitude: number;
|
|
691
|
+
longitude: number;
|
|
692
|
+
country?: string;
|
|
693
|
+
enabled?: boolean;
|
|
694
|
+
client?: CimplifyClient;
|
|
695
|
+
}
|
|
696
|
+
interface UseDeliveryFeeResult {
|
|
697
|
+
fee: DeliveryFeeResponse | null;
|
|
698
|
+
isLoading: boolean;
|
|
699
|
+
error: CimplifyError | null;
|
|
700
|
+
refetch: () => Promise<void>;
|
|
701
|
+
}
|
|
702
|
+
declare function useDeliveryFee(options: UseDeliveryFeeOptions): UseDeliveryFeeResult;
|
|
703
|
+
|
|
704
|
+
interface UseFxRateOptions {
|
|
705
|
+
from: CurrencyCode;
|
|
706
|
+
to: CurrencyCode;
|
|
707
|
+
enabled?: boolean;
|
|
708
|
+
client?: CimplifyClient;
|
|
709
|
+
}
|
|
710
|
+
interface UseFxRateResult {
|
|
711
|
+
rate: FxRateResponse | null;
|
|
712
|
+
isLoading: boolean;
|
|
713
|
+
error: CimplifyError | null;
|
|
714
|
+
refetch: () => Promise<void>;
|
|
715
|
+
}
|
|
716
|
+
declare function useFxRate(options: UseFxRateOptions): UseFxRateResult;
|
|
717
|
+
|
|
718
|
+
interface UseBootstrapOptions {
|
|
719
|
+
enabled?: boolean;
|
|
720
|
+
client?: CimplifyClient;
|
|
721
|
+
}
|
|
722
|
+
interface UseBootstrapResult {
|
|
723
|
+
bootstrap: StorefrontBootstrap | null;
|
|
724
|
+
isLoading: boolean;
|
|
725
|
+
error: CimplifyError | null;
|
|
726
|
+
refetch: () => Promise<void>;
|
|
727
|
+
}
|
|
728
|
+
declare function useBootstrap(options?: UseBootstrapOptions): UseBootstrapResult;
|
|
729
|
+
|
|
560
730
|
declare function useElements(): CimplifyElements | null;
|
|
561
731
|
declare function useElementsReady(): boolean;
|
|
562
732
|
interface ElementsProviderProps {
|
|
@@ -641,11 +811,11 @@ interface VariantSelectorClassNames {
|
|
|
641
811
|
adjustment?: string;
|
|
642
812
|
}
|
|
643
813
|
interface VariantSelectorProps {
|
|
644
|
-
variants:
|
|
814
|
+
variants: VariantView[];
|
|
645
815
|
variantAxes?: VariantAxisWithValues[];
|
|
646
816
|
basePrice?: Money;
|
|
647
817
|
selectedVariantId?: string;
|
|
648
|
-
onVariantChange: (variantId: string | undefined, variant:
|
|
818
|
+
onVariantChange: (variantId: string | undefined, variant: VariantView | undefined) => void;
|
|
649
819
|
productName?: string;
|
|
650
820
|
className?: string;
|
|
651
821
|
classNames?: VariantSelectorClassNames;
|
|
@@ -683,6 +853,9 @@ interface BundleSelectorClassNames {
|
|
|
683
853
|
componentHeader?: string;
|
|
684
854
|
componentQty?: string;
|
|
685
855
|
componentName?: string;
|
|
856
|
+
typeBadge?: string;
|
|
857
|
+
serviceBadge?: string;
|
|
858
|
+
digitalBadge?: string;
|
|
686
859
|
variantPicker?: string;
|
|
687
860
|
variantOption?: string;
|
|
688
861
|
variantOptionSelected?: string;
|
|
@@ -717,6 +890,9 @@ interface CompositeSelectorClassNames {
|
|
|
717
890
|
componentSelected?: string;
|
|
718
891
|
componentInfo?: string;
|
|
719
892
|
componentName?: string;
|
|
893
|
+
typeBadge?: string;
|
|
894
|
+
serviceBadge?: string;
|
|
895
|
+
digitalBadge?: string;
|
|
720
896
|
badgePopular?: string;
|
|
721
897
|
badgePremium?: string;
|
|
722
898
|
componentDescription?: string;
|
|
@@ -748,14 +924,19 @@ interface ProductCustomizerClassNames {
|
|
|
748
924
|
submitButton?: string;
|
|
749
925
|
submitButtonAdded?: string;
|
|
750
926
|
validation?: string;
|
|
927
|
+
specialInstructions?: string;
|
|
928
|
+
depositInfo?: string;
|
|
929
|
+
allergens?: string;
|
|
930
|
+
duration?: string;
|
|
751
931
|
}
|
|
752
932
|
interface ProductCustomizerProps {
|
|
753
933
|
product: ProductWithDetails;
|
|
754
934
|
onAddToCart?: (product: ProductWithDetails, quantity: number, options: AddToCartOptions) => void | Promise<void>;
|
|
935
|
+
showSpecialInstructions?: boolean;
|
|
755
936
|
className?: string;
|
|
756
937
|
classNames?: ProductCustomizerClassNames;
|
|
757
938
|
}
|
|
758
|
-
declare function ProductCustomizer({ product, onAddToCart, className, classNames, }: ProductCustomizerProps): React.ReactElement;
|
|
939
|
+
declare function ProductCustomizer({ product, onAddToCart, showSpecialInstructions, className, classNames, }: ProductCustomizerProps): React.ReactElement;
|
|
759
940
|
|
|
760
941
|
interface ProductImageGalleryProps {
|
|
761
942
|
images: string[];
|
|
@@ -770,12 +951,36 @@ interface ProductImageGalleryProps {
|
|
|
770
951
|
*/
|
|
771
952
|
declare function ProductImageGallery({ images, productName, aspectRatio, className, }: ProductImageGalleryProps): React.ReactElement | null;
|
|
772
953
|
|
|
954
|
+
interface CartSummaryClassNames {
|
|
955
|
+
root?: string;
|
|
956
|
+
item?: string;
|
|
957
|
+
itemName?: string;
|
|
958
|
+
itemPrice?: string;
|
|
959
|
+
quantity?: string;
|
|
960
|
+
removeButton?: string;
|
|
961
|
+
totals?: string;
|
|
962
|
+
subtotal?: string;
|
|
963
|
+
tax?: string;
|
|
964
|
+
deliveryFee?: string;
|
|
965
|
+
serviceCharge?: string;
|
|
966
|
+
discount?: string;
|
|
967
|
+
total?: string;
|
|
968
|
+
checkout?: string;
|
|
969
|
+
empty?: string;
|
|
970
|
+
serviceInfo?: string;
|
|
971
|
+
digitalInfo?: string;
|
|
972
|
+
bundleBreakdown?: string;
|
|
973
|
+
compositeBreakdown?: string;
|
|
974
|
+
}
|
|
773
975
|
interface CartSummaryProps {
|
|
976
|
+
/** Optional server cart for extended pricing details (delivery fee, service charge, discounts). */
|
|
977
|
+
cart?: DisplayCart;
|
|
774
978
|
onCheckout?: () => void;
|
|
775
979
|
onItemRemove?: (itemId: string) => void;
|
|
776
980
|
onQuantityChange?: (itemId: string, quantity: number) => void;
|
|
777
981
|
emptyMessage?: string;
|
|
778
982
|
className?: string;
|
|
983
|
+
classNames?: CartSummaryClassNames;
|
|
779
984
|
}
|
|
780
985
|
/**
|
|
781
986
|
* CartSummary — renders cart line items + totals.
|
|
@@ -783,12 +988,14 @@ interface CartSummaryProps {
|
|
|
783
988
|
* NOT a drawer or modal — just the cart content. Templates wrap this in
|
|
784
989
|
* their own drawer/modal shell with animations.
|
|
785
990
|
*/
|
|
786
|
-
declare function CartSummary({ onCheckout, onItemRemove, onQuantityChange, emptyMessage, className, }: CartSummaryProps): React.ReactElement;
|
|
991
|
+
declare function CartSummary({ cart: serverCart, onCheckout, onItemRemove, onQuantityChange, emptyMessage, className, classNames, }: CartSummaryProps): React.ReactElement;
|
|
787
992
|
|
|
788
993
|
interface AvailabilityBadgeClassNames {
|
|
789
994
|
root?: string;
|
|
790
995
|
dot?: string;
|
|
791
996
|
label?: string;
|
|
997
|
+
lowStock?: string;
|
|
998
|
+
stockCount?: string;
|
|
792
999
|
}
|
|
793
1000
|
interface AvailabilityBadgeProps {
|
|
794
1001
|
/** The product to check availability for. */
|
|
@@ -797,6 +1004,12 @@ interface AvailabilityBadgeProps {
|
|
|
797
1004
|
isAvailable?: boolean;
|
|
798
1005
|
/** Override stock status (e.g. from location_availability). */
|
|
799
1006
|
isInStock?: boolean;
|
|
1007
|
+
/** Current stock quantity. When provided, enables "Only X left" display. */
|
|
1008
|
+
stockQuantity?: number;
|
|
1009
|
+
/** Threshold at which stock is considered low. Default: 5. */
|
|
1010
|
+
lowStockThreshold?: number;
|
|
1011
|
+
/** Location context for availability checks. Passed through as a data attribute. */
|
|
1012
|
+
locationId?: string;
|
|
800
1013
|
className?: string;
|
|
801
1014
|
classNames?: AvailabilityBadgeClassNames;
|
|
802
1015
|
}
|
|
@@ -806,7 +1019,7 @@ interface AvailabilityBadgeProps {
|
|
|
806
1019
|
* Returns `null` for products that don't have inventory tracking enabled,
|
|
807
1020
|
* since there's no meaningful stock state to show.
|
|
808
1021
|
*/
|
|
809
|
-
declare function AvailabilityBadge({ product, isAvailable, isInStock, className, classNames, }: AvailabilityBadgeProps): React.ReactElement | null;
|
|
1022
|
+
declare function AvailabilityBadge({ product, isAvailable, isInStock, stockQuantity, lowStockThreshold, locationId, className, classNames, }: AvailabilityBadgeProps): React.ReactElement | null;
|
|
810
1023
|
|
|
811
1024
|
interface SaleBadgeClassNames {
|
|
812
1025
|
root?: string;
|
|
@@ -965,6 +1178,10 @@ interface SearchInputClassNames {
|
|
|
965
1178
|
resultItem?: string;
|
|
966
1179
|
empty?: string;
|
|
967
1180
|
loading?: string;
|
|
1181
|
+
resultImage?: string;
|
|
1182
|
+
resultName?: string;
|
|
1183
|
+
resultPrice?: string;
|
|
1184
|
+
categoryFilter?: string;
|
|
968
1185
|
}
|
|
969
1186
|
interface SearchInputProps {
|
|
970
1187
|
/** Placeholder text for the input. */
|
|
@@ -977,6 +1194,10 @@ interface SearchInputProps {
|
|
|
977
1194
|
renderResult?: (product: Product) => React.ReactNode;
|
|
978
1195
|
/** Show inline results dropdown. Default: true. */
|
|
979
1196
|
showResults?: boolean;
|
|
1197
|
+
/** Optional category ID to scope search results. */
|
|
1198
|
+
categoryId?: string;
|
|
1199
|
+
/** Display name for the active category filter. */
|
|
1200
|
+
categoryName?: string;
|
|
980
1201
|
className?: string;
|
|
981
1202
|
classNames?: SearchInputClassNames;
|
|
982
1203
|
}
|
|
@@ -986,7 +1207,7 @@ interface SearchInputProps {
|
|
|
986
1207
|
* Wraps `useSearch` with a controlled input and optional inline results list.
|
|
987
1208
|
* Uses Base UI Field.Root + Input for accessible form semantics.
|
|
988
1209
|
*/
|
|
989
|
-
declare function SearchInput({ placeholder, searchOptions, onResultClick, renderResult, showResults, className, classNames, }: SearchInputProps): React.ReactElement;
|
|
1210
|
+
declare function SearchInput({ placeholder, searchOptions, onResultClick, renderResult, showResults, categoryId, categoryName, className, classNames, }: SearchInputProps): React.ReactElement;
|
|
990
1211
|
|
|
991
1212
|
interface CategoryFilterClassNames {
|
|
992
1213
|
root?: string;
|
|
@@ -1114,11 +1335,20 @@ interface OrderSummaryClassNames {
|
|
|
1114
1335
|
header?: string;
|
|
1115
1336
|
orderId?: string;
|
|
1116
1337
|
status?: string;
|
|
1338
|
+
paymentState?: string;
|
|
1339
|
+
fulfillmentDetails?: string;
|
|
1340
|
+
deliveryAddress?: string;
|
|
1117
1341
|
items?: string;
|
|
1118
1342
|
lineItem?: string;
|
|
1343
|
+
notes?: string;
|
|
1119
1344
|
totals?: string;
|
|
1120
1345
|
customer?: string;
|
|
1121
1346
|
loading?: string;
|
|
1347
|
+
serviceInfo?: string;
|
|
1348
|
+
digitalInfo?: string;
|
|
1349
|
+
bundleBreakdown?: string;
|
|
1350
|
+
compositeBreakdown?: string;
|
|
1351
|
+
trackingLink?: string;
|
|
1122
1352
|
}
|
|
1123
1353
|
interface OrderSummaryProps {
|
|
1124
1354
|
/** Pass an Order object directly (skips fetch). */
|
|
@@ -1813,10 +2043,15 @@ interface BookingPageClassNames {
|
|
|
1813
2043
|
confirmButton?: string;
|
|
1814
2044
|
backButton?: string;
|
|
1815
2045
|
error?: string;
|
|
2046
|
+
rescheduleInfo?: string;
|
|
2047
|
+
depositInfo?: string;
|
|
2048
|
+
cancellationPolicy?: string;
|
|
1816
2049
|
}
|
|
1817
2050
|
interface BookingPageProps {
|
|
1818
2051
|
/** The service being booked. */
|
|
1819
2052
|
service: Service;
|
|
2053
|
+
/** The underlying product (for deposit/cancellation fields). Falls back to service fields. */
|
|
2054
|
+
product?: Product;
|
|
1820
2055
|
/** Optional staff list for staff selection step. */
|
|
1821
2056
|
staff?: Staff[];
|
|
1822
2057
|
/** Number of participants. */
|
|
@@ -1827,12 +2062,16 @@ interface BookingPageProps {
|
|
|
1827
2062
|
onBooked?: (slot: AvailableSlot, staffId: string | null) => void;
|
|
1828
2063
|
/** Called when user wants to go back. */
|
|
1829
2064
|
onBack?: () => void;
|
|
2065
|
+
/** Existing booking for reschedule mode. */
|
|
2066
|
+
existingBooking?: CustomerBooking;
|
|
2067
|
+
/** Called after a successful reschedule. */
|
|
2068
|
+
onRescheduled?: (booking: CustomerBooking, newSlot: AvailableSlot) => void;
|
|
1830
2069
|
/** Show price on slots. Default: true. */
|
|
1831
2070
|
showPrice?: boolean;
|
|
1832
2071
|
className?: string;
|
|
1833
2072
|
classNames?: BookingPageClassNames;
|
|
1834
2073
|
}
|
|
1835
|
-
declare function BookingPage({ service, staff, participantCount, title, onBooked, onBack, showPrice, className, classNames, }: BookingPageProps): React.ReactElement;
|
|
2074
|
+
declare function BookingPage({ service, product, staff, participantCount, title, onBooked, onBack, existingBooking, onRescheduled, showPrice, className, classNames, }: BookingPageProps): React.ReactElement;
|
|
1836
2075
|
|
|
1837
2076
|
interface BookingsPageClassNames {
|
|
1838
2077
|
root?: string;
|
|
@@ -1864,4 +2103,217 @@ interface BookingsPageProps {
|
|
|
1864
2103
|
}
|
|
1865
2104
|
declare function BookingsPage({ title, bookings: bookingsProp, onBookingNavigate, onCancel, onReschedule, showFilters, renderBooking, className, classNames, }: BookingsPageProps): React.ReactElement;
|
|
1866
2105
|
|
|
1867
|
-
|
|
2106
|
+
interface LocationPickerClassNames {
|
|
2107
|
+
root?: string;
|
|
2108
|
+
item?: string;
|
|
2109
|
+
activeItem?: string;
|
|
2110
|
+
empty?: string;
|
|
2111
|
+
loading?: string;
|
|
2112
|
+
}
|
|
2113
|
+
interface LocationPickerProps {
|
|
2114
|
+
/** Override locations (skips useLocations fetch). For SSR, pass pre-fetched locations. */
|
|
2115
|
+
locations?: Location[];
|
|
2116
|
+
/** Override the current location. */
|
|
2117
|
+
currentLocation?: Location | null;
|
|
2118
|
+
/** Called when a location is selected. */
|
|
2119
|
+
onLocationChange?: (location: Location) => void;
|
|
2120
|
+
/** Custom location renderer. */
|
|
2121
|
+
renderLocation?: (location: Location, isActive: boolean) => React.ReactNode;
|
|
2122
|
+
/** Text shown when no locations are available. */
|
|
2123
|
+
emptyMessage?: string;
|
|
2124
|
+
className?: string;
|
|
2125
|
+
classNames?: LocationPickerClassNames;
|
|
2126
|
+
}
|
|
2127
|
+
/**
|
|
2128
|
+
* LocationPicker — renders a location selector for multi-location businesses.
|
|
2129
|
+
*
|
|
2130
|
+
* Uses `useLocations` to fetch locations unless overridden via props.
|
|
2131
|
+
* Returns `null` when there is only one location (no picker needed).
|
|
2132
|
+
*/
|
|
2133
|
+
declare function LocationPicker({ locations: locationsProp, currentLocation: currentLocationProp, onLocationChange, renderLocation, emptyMessage, className, classNames, }: LocationPickerProps): React.ReactElement | null;
|
|
2134
|
+
|
|
2135
|
+
interface RecommendationCarouselClassNames {
|
|
2136
|
+
root?: string;
|
|
2137
|
+
item?: string;
|
|
2138
|
+
reason?: string;
|
|
2139
|
+
empty?: string;
|
|
2140
|
+
loading?: string;
|
|
2141
|
+
}
|
|
2142
|
+
interface RecommendationCarouselProps {
|
|
2143
|
+
/** Override recommendations (skips fetch). For SSR, pass pre-fetched data. */
|
|
2144
|
+
recommendations?: ActivityRecommendation[];
|
|
2145
|
+
/** Location ID for location-specific recommendations. */
|
|
2146
|
+
locationId?: string;
|
|
2147
|
+
/** Maximum recommendations to fetch. */
|
|
2148
|
+
limit?: number;
|
|
2149
|
+
/** Called when a product recommendation is clicked. */
|
|
2150
|
+
onProductClick?: (recommendation: ActivityRecommendation) => void;
|
|
2151
|
+
/** Custom product card renderer. */
|
|
2152
|
+
renderProduct?: (recommendation: ActivityRecommendation) => React.ReactNode;
|
|
2153
|
+
/** Text shown when no recommendations are available. */
|
|
2154
|
+
emptyMessage?: string;
|
|
2155
|
+
className?: string;
|
|
2156
|
+
classNames?: RecommendationCarouselClassNames;
|
|
2157
|
+
}
|
|
2158
|
+
/**
|
|
2159
|
+
* RecommendationCarousel — displays personalized product recommendations.
|
|
2160
|
+
*
|
|
2161
|
+
* Renders a horizontal scrollable list of product cards with reason labels.
|
|
2162
|
+
* Returns `null` when there are no recommendations.
|
|
2163
|
+
*/
|
|
2164
|
+
declare function RecommendationCarousel({ recommendations: recommendationsProp, locationId, limit, onProductClick, renderProduct, emptyMessage, className, classNames, }: RecommendationCarouselProps): React.ReactElement | null;
|
|
2165
|
+
|
|
2166
|
+
interface SessionMessageBannerClassNames {
|
|
2167
|
+
root?: string;
|
|
2168
|
+
message?: string;
|
|
2169
|
+
text?: string;
|
|
2170
|
+
dismissButton?: string;
|
|
2171
|
+
empty?: string;
|
|
2172
|
+
}
|
|
2173
|
+
interface SessionMessageBannerProps {
|
|
2174
|
+
/** Override messages (skips fetch). For SSR, pass pre-fetched messages. */
|
|
2175
|
+
messages?: SessionMessage[];
|
|
2176
|
+
/** Called when a message is dismissed. Receives the message code. */
|
|
2177
|
+
onDismiss?: (code: string) => void;
|
|
2178
|
+
/** Custom message renderer. */
|
|
2179
|
+
renderMessage?: (message: SessionMessage) => React.ReactNode;
|
|
2180
|
+
className?: string;
|
|
2181
|
+
classNames?: SessionMessageBannerClassNames;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* SessionMessageBanner — renders activity-based session messages.
|
|
2185
|
+
*
|
|
2186
|
+
* Displays dismissible message cards with level-based styling (info, promotion, urgency, suggestion).
|
|
2187
|
+
* Returns `null` when there are no messages.
|
|
2188
|
+
*/
|
|
2189
|
+
declare function SessionMessageBanner({ messages: messagesProp, onDismiss, renderMessage, className, classNames, }: SessionMessageBannerProps): React.ReactElement | null;
|
|
2190
|
+
|
|
2191
|
+
interface ViewedProduct {
|
|
2192
|
+
product_id: string;
|
|
2193
|
+
product_name?: string;
|
|
2194
|
+
category_id?: string;
|
|
2195
|
+
}
|
|
2196
|
+
interface RecentlyViewedClassNames {
|
|
2197
|
+
root?: string;
|
|
2198
|
+
item?: string;
|
|
2199
|
+
empty?: string;
|
|
2200
|
+
loading?: string;
|
|
2201
|
+
}
|
|
2202
|
+
interface RecentlyViewedProps {
|
|
2203
|
+
/** Maximum number of viewed products to display. */
|
|
2204
|
+
limit?: number;
|
|
2205
|
+
/** Called when a viewed product is clicked. */
|
|
2206
|
+
onProductClick?: (product: ViewedProduct) => void;
|
|
2207
|
+
/** Custom product renderer. */
|
|
2208
|
+
renderProduct?: (product: ViewedProduct) => React.ReactNode;
|
|
2209
|
+
/** Text shown when no viewed products exist. */
|
|
2210
|
+
emptyMessage?: string;
|
|
2211
|
+
className?: string;
|
|
2212
|
+
classNames?: RecentlyViewedClassNames;
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* RecentlyViewed — displays products the user has recently viewed during their session.
|
|
2216
|
+
*
|
|
2217
|
+
* Extracts `state.activity.viewed_products` from the activity state.
|
|
2218
|
+
* Returns `null` when there are no viewed products.
|
|
2219
|
+
*/
|
|
2220
|
+
declare function RecentlyViewed({ limit, onProductClick, renderProduct, emptyMessage, className, classNames, }: RecentlyViewedProps): React.ReactElement | null;
|
|
2221
|
+
|
|
2222
|
+
interface BillingPlanSelectorClassNames {
|
|
2223
|
+
root?: string;
|
|
2224
|
+
plan?: string;
|
|
2225
|
+
activePlan?: string;
|
|
2226
|
+
frequency?: string;
|
|
2227
|
+
price?: string;
|
|
2228
|
+
setupFee?: string;
|
|
2229
|
+
trialBadge?: string;
|
|
2230
|
+
empty?: string;
|
|
2231
|
+
loading?: string;
|
|
2232
|
+
}
|
|
2233
|
+
interface BillingPlanSelectorProps {
|
|
2234
|
+
/** Product ID to fetch billing plans for. */
|
|
2235
|
+
productId: string;
|
|
2236
|
+
/** Override plans (skips fetch). For SSR, pass pre-fetched plans. */
|
|
2237
|
+
plans?: ProductBillingPlan[];
|
|
2238
|
+
/** Called when a plan is selected. */
|
|
2239
|
+
onPlanSelect?: (plan: ProductBillingPlan | null) => void;
|
|
2240
|
+
/** Currently selected plan ID. */
|
|
2241
|
+
selectedPlanId?: string | null;
|
|
2242
|
+
/** Show a "One-time purchase" option at the top. */
|
|
2243
|
+
showOneTimePurchase?: boolean;
|
|
2244
|
+
/** Label for the one-time purchase option. Default: "One-time purchase". */
|
|
2245
|
+
oneTimePurchaseLabel?: string;
|
|
2246
|
+
/** Custom plan card renderer. */
|
|
2247
|
+
renderPlan?: (plan: ProductBillingPlan, isActive: boolean) => React.ReactNode;
|
|
2248
|
+
className?: string;
|
|
2249
|
+
classNames?: BillingPlanSelectorClassNames;
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* BillingPlanSelector — subscription/installment plan comparison and selection.
|
|
2253
|
+
*
|
|
2254
|
+
* Renders plan cards with frequency, markup, trial, and setup fee details.
|
|
2255
|
+
* Returns `null` when no plans are available (and one-time purchase is hidden).
|
|
2256
|
+
*/
|
|
2257
|
+
declare function BillingPlanSelector({ productId, plans: plansProp, onPlanSelect, selectedPlanId, showOneTimePurchase, oneTimePurchaseLabel, renderPlan, className, classNames, }: BillingPlanSelectorProps): React.ReactElement | null;
|
|
2258
|
+
|
|
2259
|
+
interface DeliveryEstimateClassNames {
|
|
2260
|
+
root?: string;
|
|
2261
|
+
fee?: string;
|
|
2262
|
+
currency?: string;
|
|
2263
|
+
notServiceable?: string;
|
|
2264
|
+
loading?: string;
|
|
2265
|
+
error?: string;
|
|
2266
|
+
}
|
|
2267
|
+
interface DeliveryEstimateProps {
|
|
2268
|
+
/** Drop-off latitude. */
|
|
2269
|
+
latitude: number;
|
|
2270
|
+
/** Drop-off longitude. */
|
|
2271
|
+
longitude: number;
|
|
2272
|
+
/** Country code for regional fee lookup. */
|
|
2273
|
+
country?: string;
|
|
2274
|
+
/** Called when the delivery fee is successfully calculated. */
|
|
2275
|
+
onFeeCalculated?: (fee: DeliveryFeeResponse) => void;
|
|
2276
|
+
className?: string;
|
|
2277
|
+
classNames?: DeliveryEstimateClassNames;
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* DeliveryEstimate — displays a pre-checkout delivery fee estimate.
|
|
2281
|
+
*
|
|
2282
|
+
* Fetches the delivery fee from `client.delivery.getFee` when coordinates change.
|
|
2283
|
+
* Shows fee amount with currency, a "not serviceable" message, or loading state.
|
|
2284
|
+
*/
|
|
2285
|
+
declare function DeliveryEstimate({ latitude, longitude, country, onFeeCalculated, className, classNames, }: DeliveryEstimateProps): React.ReactElement | null;
|
|
2286
|
+
|
|
2287
|
+
interface CurrencySelectorClassNames {
|
|
2288
|
+
root?: string;
|
|
2289
|
+
option?: string;
|
|
2290
|
+
activeOption?: string;
|
|
2291
|
+
rate?: string;
|
|
2292
|
+
label?: string;
|
|
2293
|
+
loading?: string;
|
|
2294
|
+
}
|
|
2295
|
+
interface CurrencySelectorProps {
|
|
2296
|
+
/** Available currencies to display. */
|
|
2297
|
+
currencies: CurrencyCode[];
|
|
2298
|
+
/** Currently selected currency. */
|
|
2299
|
+
currentCurrency?: CurrencyCode;
|
|
2300
|
+
/** Called when a currency is selected. */
|
|
2301
|
+
onCurrencyChange?: (currency: CurrencyCode) => void;
|
|
2302
|
+
/** Show the exchange rate next to each currency. Requires `baseCurrency`. */
|
|
2303
|
+
showRate?: boolean;
|
|
2304
|
+
/** Base currency used for rate display. */
|
|
2305
|
+
baseCurrency?: CurrencyCode;
|
|
2306
|
+
/** Custom currency option renderer. */
|
|
2307
|
+
renderCurrency?: (currency: CurrencyCode, isActive: boolean, rate: FxRateResponse | null) => React.ReactNode;
|
|
2308
|
+
className?: string;
|
|
2309
|
+
classNames?: CurrencySelectorClassNames;
|
|
2310
|
+
}
|
|
2311
|
+
/**
|
|
2312
|
+
* CurrencySelector — currency switcher for international customers.
|
|
2313
|
+
*
|
|
2314
|
+
* Renders selectable currency options with optional exchange rate display.
|
|
2315
|
+
* Returns `null` when there is only one currency (no selector needed).
|
|
2316
|
+
*/
|
|
2317
|
+
declare function CurrencySelector({ currencies, currentCurrency, onCurrencyChange, showRate, baseCurrency, renderCurrency, className, classNames, }: CurrencySelectorProps): React.ReactElement | null;
|
|
2318
|
+
|
|
2319
|
+
export { Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, type CartAddOnOptionSelection, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, type CartVariantSelection, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, SearchInput, type SearchInputClassNames, type SearchInputProps, SearchPage, type SearchPageClassNames, type SearchPageProps, ServiceCard, type ServiceCardClassNames, type ServiceCardProps, ServiceGrid, type ServiceGridClassNames, type ServiceGridProps, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StoreNav, type StoreNavClassNames, type StoreNavProps, type UseActivityStateOptions, type UseActivityStateResult, type UseAttributeDefinitionsOptions, type UseAttributeDefinitionsResult, type UseAvailableSlotsOptions, type UseAvailableSlotsResult, type UseBillingPlansOptions, type UseBillingPlansResult, type UseBookingsOptions, type UseBookingsResult, type UseBootstrapOptions, type UseBootstrapResult, type UseBundlesOptions, type UseBundlesResult, type UseCartItem, type UseCartOptions, type UseCartResult, type UseCategoriesOptions, type UseCategoriesResult, type UseCollectionOptions, type UseCollectionResult, type UseCollectionsOptions, type UseCollectionsResult, type UseDealsOptions, type UseDealsResult, type UseDeliveryFeeOptions, type UseDeliveryFeeResult, type UseFxRateOptions, type UseFxRateResult, type UseLocationsOptions, type UseLocationsResult, type UseOrderOptions, type UseOrderResult, type UseOrdersOptions, type UseOrdersResult, type UseProductAvailabilityOptions, type UseProductAvailabilityResult, type UseProductDealsOptions, type UseProductDealsResult, type UseProductOptions, type UseProductPriceInput, type UseProductPriceResult, type UseProductResult, type UseProductSchedulesOptions, type UseProductSchedulesResult, type UseProductsOnSaleOptions, type UseProductsOnSaleResult, type UseProductsOptions, type UseProductsResult, type UsePropertyFacetsOptions, type UsePropertyFacetsResult, type UseQuoteInput, type UseQuoteOptions, type UseQuoteResult, type UseRecommendationsOptions, type UseRecommendationsResult, type UseSearchOptions, type UseSearchResult, type UseServiceAvailabilityOptions, type UseServiceAvailabilityResult, type UseServicesOptions, type UseServicesResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, cn, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useCheckout, useCimplify, useCimplifyClient, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|