@cimplify/sdk 0.44.6 → 0.44.8
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/mock/cli.mjs +6 -4
- package/dist/mock/library.js +6 -4
- package/dist/mock/library.mjs +6 -4
- package/dist/mock/msw.js +6 -4
- package/dist/mock/msw.mjs +6 -4
- package/dist/react.d.mts +26 -1
- package/dist/react.d.ts +26 -1
- package/dist/react.js +211 -24
- package/dist/react.mjs +209 -25
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/registry/cart-summary.json +1 -1
- package/templates/storefront-bakery/components/product-modal.tsx +0 -1
- package/templates/storefront-bakery/lib/cart.ts +6 -21
- package/templates/storefront-fashion/app/layout.tsx +2 -0
- package/templates/storefront-fashion/app/products/[slug]/product-detail.tsx +0 -3
- package/templates/storefront-fashion/components/cart-drawer.tsx +14 -0
- package/templates/storefront-fashion/components/cart-pill.tsx +11 -7
- package/templates/storefront-fashion/components/providers.tsx +6 -2
- package/templates/storefront-fashion/lib/cart.ts +6 -21
- package/templates/storefront-grocery/components/product-modal.tsx +0 -1
- package/templates/storefront-grocery/lib/cart.ts +6 -21
- package/templates/storefront-restaurant/components/product-modal.tsx +0 -1
- package/templates/storefront-restaurant/lib/cart.ts +6 -21
- package/templates/storefront-retail/app/products/[slug]/product-detail.tsx +0 -3
- package/templates/storefront-retail/lib/cart.ts +6 -21
- package/templates/storefront-services/components/product-modal.tsx +0 -1
- package/templates/storefront-services/lib/cart.ts +6 -21
package/dist/mock/cli.mjs
CHANGED
|
@@ -4827,7 +4827,7 @@ function defaultChosenPrice(price) {
|
|
|
4827
4827
|
markup_discount_amount: ZERO
|
|
4828
4828
|
};
|
|
4829
4829
|
}
|
|
4830
|
-
function
|
|
4830
|
+
function variantDisplayName(registry, variant) {
|
|
4831
4831
|
const valueNames = [];
|
|
4832
4832
|
for (const valueId of variant.axis_value_ids) {
|
|
4833
4833
|
for (const axis of registry.variantAxes.list((a) => a.product_id === variant.product_id)) {
|
|
@@ -4835,7 +4835,7 @@ function variantDisplaySuffix(registry, variant) {
|
|
|
4835
4835
|
if (v) valueNames.push(v.name);
|
|
4836
4836
|
}
|
|
4837
4837
|
}
|
|
4838
|
-
return valueNames.
|
|
4838
|
+
return valueNames.join(" \u2022 ");
|
|
4839
4839
|
}
|
|
4840
4840
|
function toUICart(registry, cart) {
|
|
4841
4841
|
return {
|
|
@@ -4845,17 +4845,19 @@ function toUICart(registry, cart) {
|
|
|
4845
4845
|
const product = registry.products.get(i.item_id);
|
|
4846
4846
|
const variant = i.variant_id ? registry.variants.get(i.variant_id) : void 0;
|
|
4847
4847
|
const cfg = i.configuration;
|
|
4848
|
-
const variantName = variant ?
|
|
4848
|
+
const variantName = variant ? variantDisplayName(registry, variant) : "";
|
|
4849
4849
|
const baseName = product?.name ?? "Unknown product";
|
|
4850
4850
|
return {
|
|
4851
4851
|
id: i.id,
|
|
4852
4852
|
cart_id: i.cart_id,
|
|
4853
4853
|
item_id: i.item_id,
|
|
4854
4854
|
variant_id: i.variant_id,
|
|
4855
|
+
variant_name: variantName || void 0,
|
|
4856
|
+
variant_info: variant ? { id: variant.id, name: variantName, sku: variant.sku, price_adjustment: variant.price_adjustment } : void 0,
|
|
4855
4857
|
quantity: i.quantity,
|
|
4856
4858
|
line_key: i.line_key,
|
|
4857
4859
|
line_type: cfg.type,
|
|
4858
|
-
name: baseName
|
|
4860
|
+
name: baseName,
|
|
4859
4861
|
is_available: product?.is_available ?? true,
|
|
4860
4862
|
base_price: i.price,
|
|
4861
4863
|
add_ons_price: i.add_ons_price,
|
package/dist/mock/library.js
CHANGED
|
@@ -4195,7 +4195,7 @@ function defaultChosenPrice(price) {
|
|
|
4195
4195
|
markup_discount_amount: ZERO
|
|
4196
4196
|
};
|
|
4197
4197
|
}
|
|
4198
|
-
function
|
|
4198
|
+
function variantDisplayName(registry, variant) {
|
|
4199
4199
|
const valueNames = [];
|
|
4200
4200
|
for (const valueId of variant.axis_value_ids) {
|
|
4201
4201
|
for (const axis of registry.variantAxes.list((a) => a.product_id === variant.product_id)) {
|
|
@@ -4203,7 +4203,7 @@ function variantDisplaySuffix(registry, variant) {
|
|
|
4203
4203
|
if (v) valueNames.push(v.name);
|
|
4204
4204
|
}
|
|
4205
4205
|
}
|
|
4206
|
-
return valueNames.
|
|
4206
|
+
return valueNames.join(" \u2022 ");
|
|
4207
4207
|
}
|
|
4208
4208
|
function toUICart(registry, cart) {
|
|
4209
4209
|
return {
|
|
@@ -4213,17 +4213,19 @@ function toUICart(registry, cart) {
|
|
|
4213
4213
|
const product = registry.products.get(i.item_id);
|
|
4214
4214
|
const variant = i.variant_id ? registry.variants.get(i.variant_id) : void 0;
|
|
4215
4215
|
const cfg = i.configuration;
|
|
4216
|
-
const variantName = variant ?
|
|
4216
|
+
const variantName = variant ? variantDisplayName(registry, variant) : "";
|
|
4217
4217
|
const baseName = product?.name ?? "Unknown product";
|
|
4218
4218
|
return {
|
|
4219
4219
|
id: i.id,
|
|
4220
4220
|
cart_id: i.cart_id,
|
|
4221
4221
|
item_id: i.item_id,
|
|
4222
4222
|
variant_id: i.variant_id,
|
|
4223
|
+
variant_name: variantName || void 0,
|
|
4224
|
+
variant_info: variant ? { id: variant.id, name: variantName, sku: variant.sku, price_adjustment: variant.price_adjustment } : void 0,
|
|
4223
4225
|
quantity: i.quantity,
|
|
4224
4226
|
line_key: i.line_key,
|
|
4225
4227
|
line_type: cfg.type,
|
|
4226
|
-
name: baseName
|
|
4228
|
+
name: baseName,
|
|
4227
4229
|
is_available: product?.is_available ?? true,
|
|
4228
4230
|
base_price: i.price,
|
|
4229
4231
|
add_ons_price: i.add_ons_price,
|
package/dist/mock/library.mjs
CHANGED
|
@@ -4193,7 +4193,7 @@ function defaultChosenPrice(price) {
|
|
|
4193
4193
|
markup_discount_amount: ZERO
|
|
4194
4194
|
};
|
|
4195
4195
|
}
|
|
4196
|
-
function
|
|
4196
|
+
function variantDisplayName(registry, variant) {
|
|
4197
4197
|
const valueNames = [];
|
|
4198
4198
|
for (const valueId of variant.axis_value_ids) {
|
|
4199
4199
|
for (const axis of registry.variantAxes.list((a) => a.product_id === variant.product_id)) {
|
|
@@ -4201,7 +4201,7 @@ function variantDisplaySuffix(registry, variant) {
|
|
|
4201
4201
|
if (v) valueNames.push(v.name);
|
|
4202
4202
|
}
|
|
4203
4203
|
}
|
|
4204
|
-
return valueNames.
|
|
4204
|
+
return valueNames.join(" \u2022 ");
|
|
4205
4205
|
}
|
|
4206
4206
|
function toUICart(registry, cart) {
|
|
4207
4207
|
return {
|
|
@@ -4211,17 +4211,19 @@ function toUICart(registry, cart) {
|
|
|
4211
4211
|
const product = registry.products.get(i.item_id);
|
|
4212
4212
|
const variant = i.variant_id ? registry.variants.get(i.variant_id) : void 0;
|
|
4213
4213
|
const cfg = i.configuration;
|
|
4214
|
-
const variantName = variant ?
|
|
4214
|
+
const variantName = variant ? variantDisplayName(registry, variant) : "";
|
|
4215
4215
|
const baseName = product?.name ?? "Unknown product";
|
|
4216
4216
|
return {
|
|
4217
4217
|
id: i.id,
|
|
4218
4218
|
cart_id: i.cart_id,
|
|
4219
4219
|
item_id: i.item_id,
|
|
4220
4220
|
variant_id: i.variant_id,
|
|
4221
|
+
variant_name: variantName || void 0,
|
|
4222
|
+
variant_info: variant ? { id: variant.id, name: variantName, sku: variant.sku, price_adjustment: variant.price_adjustment } : void 0,
|
|
4221
4223
|
quantity: i.quantity,
|
|
4222
4224
|
line_key: i.line_key,
|
|
4223
4225
|
line_type: cfg.type,
|
|
4224
|
-
name: baseName
|
|
4226
|
+
name: baseName,
|
|
4225
4227
|
is_available: product?.is_available ?? true,
|
|
4226
4228
|
base_price: i.price,
|
|
4227
4229
|
add_ons_price: i.add_ons_price,
|
package/dist/mock/msw.js
CHANGED
|
@@ -4193,7 +4193,7 @@ function defaultChosenPrice(price) {
|
|
|
4193
4193
|
markup_discount_amount: ZERO
|
|
4194
4194
|
};
|
|
4195
4195
|
}
|
|
4196
|
-
function
|
|
4196
|
+
function variantDisplayName(registry, variant) {
|
|
4197
4197
|
const valueNames = [];
|
|
4198
4198
|
for (const valueId of variant.axis_value_ids) {
|
|
4199
4199
|
for (const axis of registry.variantAxes.list((a) => a.product_id === variant.product_id)) {
|
|
@@ -4201,7 +4201,7 @@ function variantDisplaySuffix(registry, variant) {
|
|
|
4201
4201
|
if (v) valueNames.push(v.name);
|
|
4202
4202
|
}
|
|
4203
4203
|
}
|
|
4204
|
-
return valueNames.
|
|
4204
|
+
return valueNames.join(" \u2022 ");
|
|
4205
4205
|
}
|
|
4206
4206
|
function toUICart(registry, cart) {
|
|
4207
4207
|
return {
|
|
@@ -4211,17 +4211,19 @@ function toUICart(registry, cart) {
|
|
|
4211
4211
|
const product = registry.products.get(i.item_id);
|
|
4212
4212
|
const variant = i.variant_id ? registry.variants.get(i.variant_id) : void 0;
|
|
4213
4213
|
const cfg = i.configuration;
|
|
4214
|
-
const variantName = variant ?
|
|
4214
|
+
const variantName = variant ? variantDisplayName(registry, variant) : "";
|
|
4215
4215
|
const baseName = product?.name ?? "Unknown product";
|
|
4216
4216
|
return {
|
|
4217
4217
|
id: i.id,
|
|
4218
4218
|
cart_id: i.cart_id,
|
|
4219
4219
|
item_id: i.item_id,
|
|
4220
4220
|
variant_id: i.variant_id,
|
|
4221
|
+
variant_name: variantName || void 0,
|
|
4222
|
+
variant_info: variant ? { id: variant.id, name: variantName, sku: variant.sku, price_adjustment: variant.price_adjustment } : void 0,
|
|
4221
4223
|
quantity: i.quantity,
|
|
4222
4224
|
line_key: i.line_key,
|
|
4223
4225
|
line_type: cfg.type,
|
|
4224
|
-
name: baseName
|
|
4226
|
+
name: baseName,
|
|
4225
4227
|
is_available: product?.is_available ?? true,
|
|
4226
4228
|
base_price: i.price,
|
|
4227
4229
|
add_ons_price: i.add_ons_price,
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -4191,7 +4191,7 @@ function defaultChosenPrice(price) {
|
|
|
4191
4191
|
markup_discount_amount: ZERO
|
|
4192
4192
|
};
|
|
4193
4193
|
}
|
|
4194
|
-
function
|
|
4194
|
+
function variantDisplayName(registry, variant) {
|
|
4195
4195
|
const valueNames = [];
|
|
4196
4196
|
for (const valueId of variant.axis_value_ids) {
|
|
4197
4197
|
for (const axis of registry.variantAxes.list((a) => a.product_id === variant.product_id)) {
|
|
@@ -4199,7 +4199,7 @@ function variantDisplaySuffix(registry, variant) {
|
|
|
4199
4199
|
if (v) valueNames.push(v.name);
|
|
4200
4200
|
}
|
|
4201
4201
|
}
|
|
4202
|
-
return valueNames.
|
|
4202
|
+
return valueNames.join(" \u2022 ");
|
|
4203
4203
|
}
|
|
4204
4204
|
function toUICart(registry, cart) {
|
|
4205
4205
|
return {
|
|
@@ -4209,17 +4209,19 @@ function toUICart(registry, cart) {
|
|
|
4209
4209
|
const product = registry.products.get(i.item_id);
|
|
4210
4210
|
const variant = i.variant_id ? registry.variants.get(i.variant_id) : void 0;
|
|
4211
4211
|
const cfg = i.configuration;
|
|
4212
|
-
const variantName = variant ?
|
|
4212
|
+
const variantName = variant ? variantDisplayName(registry, variant) : "";
|
|
4213
4213
|
const baseName = product?.name ?? "Unknown product";
|
|
4214
4214
|
return {
|
|
4215
4215
|
id: i.id,
|
|
4216
4216
|
cart_id: i.cart_id,
|
|
4217
4217
|
item_id: i.item_id,
|
|
4218
4218
|
variant_id: i.variant_id,
|
|
4219
|
+
variant_name: variantName || void 0,
|
|
4220
|
+
variant_info: variant ? { id: variant.id, name: variantName, sku: variant.sku, price_adjustment: variant.price_adjustment } : void 0,
|
|
4219
4221
|
quantity: i.quantity,
|
|
4220
4222
|
line_key: i.line_key,
|
|
4221
4223
|
line_type: cfg.type,
|
|
4222
|
-
name: baseName
|
|
4224
|
+
name: baseName,
|
|
4223
4225
|
is_available: product?.is_available ?? true,
|
|
4224
4226
|
base_price: i.price,
|
|
4225
4227
|
add_ons_price: i.add_ons_price,
|
package/dist/react.d.mts
CHANGED
|
@@ -2020,6 +2020,31 @@ declare function DefaultCartLayout({ cart, onCheckout, onContinueShopping, onDis
|
|
|
2020
2020
|
|
|
2021
2021
|
declare function CompactCartLayout({ cart, onCheckout, onContinueShopping, checkoutLabel, className, }: CartLayoutProps): React$1.ReactElement;
|
|
2022
2022
|
|
|
2023
|
+
interface CartDrawerCtx {
|
|
2024
|
+
isOpen: boolean;
|
|
2025
|
+
open: () => void;
|
|
2026
|
+
close: () => void;
|
|
2027
|
+
toggle: () => void;
|
|
2028
|
+
}
|
|
2029
|
+
declare function useCartDrawer(): CartDrawerCtx;
|
|
2030
|
+
interface ProviderProps {
|
|
2031
|
+
children: React$1.ReactNode;
|
|
2032
|
+
/** Auto-open the drawer whenever the cart's pendingOpCount goes from 0 → >0. Default: true. */
|
|
2033
|
+
openOnAdd?: boolean;
|
|
2034
|
+
}
|
|
2035
|
+
declare function CartDrawerProvider({ children, openOnAdd }: ProviderProps): React$1.ReactElement;
|
|
2036
|
+
interface CartDrawerProps {
|
|
2037
|
+
/** Called when "Checkout" is clicked. Drawer auto-closes first. */
|
|
2038
|
+
onCheckout?: () => void;
|
|
2039
|
+
/** Called when "Continue Shopping" is clicked. Defaults to closing the drawer. */
|
|
2040
|
+
onContinueShopping?: () => void;
|
|
2041
|
+
/** Heading shown at the top of the drawer. */
|
|
2042
|
+
title?: string;
|
|
2043
|
+
/** Custom class on the root panel. */
|
|
2044
|
+
className?: string;
|
|
2045
|
+
}
|
|
2046
|
+
declare function CartDrawer({ onCheckout, onContinueShopping, title, className, }: CartDrawerProps): React$1.ReactElement | null;
|
|
2047
|
+
|
|
2023
2048
|
interface CheckoutPageClassNames {
|
|
2024
2049
|
root?: string;
|
|
2025
2050
|
header?: string;
|
|
@@ -2632,4 +2657,4 @@ interface ChatWidgetProps {
|
|
|
2632
2657
|
}
|
|
2633
2658
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2634
2659
|
|
|
2635
|
-
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TwoColumnGrid, 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 UseChatOptions, type UseChatResult, 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, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
2660
|
+
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TwoColumnGrid, 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 UseChatOptions, type UseChatResult, 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, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.d.ts
CHANGED
|
@@ -2020,6 +2020,31 @@ declare function DefaultCartLayout({ cart, onCheckout, onContinueShopping, onDis
|
|
|
2020
2020
|
|
|
2021
2021
|
declare function CompactCartLayout({ cart, onCheckout, onContinueShopping, checkoutLabel, className, }: CartLayoutProps): React$1.ReactElement;
|
|
2022
2022
|
|
|
2023
|
+
interface CartDrawerCtx {
|
|
2024
|
+
isOpen: boolean;
|
|
2025
|
+
open: () => void;
|
|
2026
|
+
close: () => void;
|
|
2027
|
+
toggle: () => void;
|
|
2028
|
+
}
|
|
2029
|
+
declare function useCartDrawer(): CartDrawerCtx;
|
|
2030
|
+
interface ProviderProps {
|
|
2031
|
+
children: React$1.ReactNode;
|
|
2032
|
+
/** Auto-open the drawer whenever the cart's pendingOpCount goes from 0 → >0. Default: true. */
|
|
2033
|
+
openOnAdd?: boolean;
|
|
2034
|
+
}
|
|
2035
|
+
declare function CartDrawerProvider({ children, openOnAdd }: ProviderProps): React$1.ReactElement;
|
|
2036
|
+
interface CartDrawerProps {
|
|
2037
|
+
/** Called when "Checkout" is clicked. Drawer auto-closes first. */
|
|
2038
|
+
onCheckout?: () => void;
|
|
2039
|
+
/** Called when "Continue Shopping" is clicked. Defaults to closing the drawer. */
|
|
2040
|
+
onContinueShopping?: () => void;
|
|
2041
|
+
/** Heading shown at the top of the drawer. */
|
|
2042
|
+
title?: string;
|
|
2043
|
+
/** Custom class on the root panel. */
|
|
2044
|
+
className?: string;
|
|
2045
|
+
}
|
|
2046
|
+
declare function CartDrawer({ onCheckout, onContinueShopping, title, className, }: CartDrawerProps): React$1.ReactElement | null;
|
|
2047
|
+
|
|
2023
2048
|
interface CheckoutPageClassNames {
|
|
2024
2049
|
root?: string;
|
|
2025
2050
|
header?: string;
|
|
@@ -2632,4 +2657,4 @@ interface ChatWidgetProps {
|
|
|
2632
2657
|
}
|
|
2633
2658
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
2634
2659
|
|
|
2635
|
-
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TwoColumnGrid, 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 UseChatOptions, type UseChatResult, 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, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
2660
|
+
export { AccommodationCard, 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, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, CardImage, type CardLayoutProps, CardShell, CardVariant, type CartAddOnOptionSelection, CartDrawer, type CartDrawerProps, CartDrawerProvider, type CartLayoutProps, CartPage, type CartPageClassNames, type CartPageProps, CartSummary, type CartSummaryClassNames, type CartSummaryProps, CartTemplate, type CartVariantSelection, CatalogueCollectionLayout, type CatalogueLayoutProps, CataloguePage, type CataloguePageClassNames, type CataloguePageProps, CatalogueTemplate, CategoryFilter, type CategoryFilterClassNames, type CategoryFilterProps, CategoryGrid, type CategoryGridClassNames, type CategoryGridProps, ChatWidget, type ChatWidgetClassNames, type ChatWidgetProps, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyAccount, type CimplifyAccountProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyContextValue, CimplifyProvider, type CimplifyProviderProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, DateSlotPicker, type DateSlotPickerClassNames, type DateSlotPickerProps, DealBanner, type DealBannerClassNames, type DealBannerProps, DealsPage, type DealsPageClassNames, type DealsPageProps, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, type DeliveryEstimateClassNames, type DeliveryEstimateProps, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, FeaturedCollectionLayout, FoodProductCard, FoodProductLayout, InventoryBadge, LeaseServiceCard, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MetadataStringList, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, PaymentElement, Price, type PriceProps, PriceRange, type PriceRangeProps, ProductCard, type ProductCardClassNames, type ProductCardProps, ProductCustomizer, type ProductCustomizerClassNames, type ProductCustomizerProps, ProductGrid, type ProductGridClassNames, type ProductGridProps, ProductImageGallery, type ProductImageGalleryProps, type ProductLayoutProps, ProductPage, type ProductPageClassNames, type ProductPageProps, ProductSheet, type ProductSheetClassNames, type ProductSheetProps, ProductTemplate, PropertiesTable, QuantitySelector, type QuantitySelectorClassNames, type QuantitySelectorProps, QuickAddButton, RecentlyViewed, type RecentlyViewedClassNames, type RecentlyViewedProps, RecommendationCarousel, type RecommendationCarouselClassNames, type RecommendationCarouselProps, RelatedProductsSection, RentalServiceCard, type Resource, ResourcePicker, type ResourcePickerClassNames, type ResourcePickerProps, RetailProductCard, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, StoreNav, type StoreNavClassNames, type StoreNavProps, SubscriptionCard, TagPills, TwoColumnGrid, 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 UseChatOptions, type UseChatResult, 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, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, roomToResource, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, 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, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.js
CHANGED
|
@@ -6453,12 +6453,22 @@ function CartLineItemRow({
|
|
|
6453
6453
|
{
|
|
6454
6454
|
"data-cimplify-cart-item": true,
|
|
6455
6455
|
"data-optimistic": isOptimistic ? "true" : void 0,
|
|
6456
|
-
className:
|
|
6456
|
+
className: cn(
|
|
6457
|
+
"flex items-start justify-between gap-4 py-4 border-b border-border last:border-b-0",
|
|
6458
|
+
classNames?.item
|
|
6459
|
+
),
|
|
6457
6460
|
children: [
|
|
6458
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item-info": true, children: [
|
|
6459
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6460
|
-
|
|
6461
|
-
|
|
6461
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item-info": true, className: "flex-1 min-w-0 space-y-1", children: [
|
|
6462
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6463
|
+
"span",
|
|
6464
|
+
{
|
|
6465
|
+
"data-cimplify-cart-item-name": true,
|
|
6466
|
+
className: cn("block font-medium", classNames?.itemName),
|
|
6467
|
+
children: item.product.name
|
|
6468
|
+
}
|
|
6469
|
+
),
|
|
6470
|
+
item.variant && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-variant": true, className: "block text-xs text-muted-foreground", children: chunkBGCEKFLA_js.getVariantDisplayName(item.variant, item.product.name) }),
|
|
6471
|
+
item.addOnOptions && item.addOnOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-cart-item-addons": true, className: "block text-xs text-muted-foreground", children: [
|
|
6462
6472
|
"+ ",
|
|
6463
6473
|
item.addOnOptions.map((opt) => opt.name).join(", ")
|
|
6464
6474
|
] }),
|
|
@@ -6509,29 +6519,42 @@ function CartLineItemRow({
|
|
|
6509
6519
|
new Date(sel.scheduling.scheduled_start).toLocaleDateString()
|
|
6510
6520
|
] })
|
|
6511
6521
|
] }, sel.component_id)) }),
|
|
6512
|
-
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: unitPrice, className: classNames?.itemPrice })
|
|
6513
|
-
] }),
|
|
6514
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item-controls": true, className: classNames?.quantity, children: [
|
|
6515
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6516
|
-
QuantitySelector,
|
|
6517
|
-
{
|
|
6518
|
-
value: item.quantity,
|
|
6519
|
-
onChange: (qty) => onQuantityChange(item.id, qty),
|
|
6520
|
-
min: 0
|
|
6521
|
-
}
|
|
6522
|
-
),
|
|
6523
6522
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6524
|
-
|
|
6523
|
+
Price,
|
|
6525
6524
|
{
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
"data-cimplify-cart-item-remove": true,
|
|
6529
|
-
className: classNames?.removeButton,
|
|
6530
|
-
"aria-label": `Remove ${item.product.name}`,
|
|
6531
|
-
children: "Remove"
|
|
6525
|
+
amount: unitPrice,
|
|
6526
|
+
className: cn("block pt-1 text-sm font-semibold", classNames?.itemPrice)
|
|
6532
6527
|
}
|
|
6533
6528
|
)
|
|
6534
|
-
] })
|
|
6529
|
+
] }),
|
|
6530
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6531
|
+
"div",
|
|
6532
|
+
{
|
|
6533
|
+
"data-cimplify-cart-item-controls": true,
|
|
6534
|
+
className: cn("flex flex-col items-end gap-2 shrink-0", classNames?.quantity),
|
|
6535
|
+
children: [
|
|
6536
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6537
|
+
QuantitySelector,
|
|
6538
|
+
{
|
|
6539
|
+
value: item.quantity,
|
|
6540
|
+
onChange: (qty) => onQuantityChange(item.id, qty),
|
|
6541
|
+
min: 0
|
|
6542
|
+
}
|
|
6543
|
+
),
|
|
6544
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6545
|
+
"button",
|
|
6546
|
+
{
|
|
6547
|
+
type: "button",
|
|
6548
|
+
onClick: () => onRemove(item.id),
|
|
6549
|
+
"data-cimplify-cart-item-remove": true,
|
|
6550
|
+
className: cn("text-xs text-muted-foreground hover:text-foreground hover:underline transition-colors", classNames?.removeButton),
|
|
6551
|
+
"aria-label": `Remove ${item.product.name}`,
|
|
6552
|
+
children: "Remove"
|
|
6553
|
+
}
|
|
6554
|
+
)
|
|
6555
|
+
]
|
|
6556
|
+
}
|
|
6557
|
+
)
|
|
6535
6558
|
]
|
|
6536
6559
|
}
|
|
6537
6560
|
);
|
|
@@ -10817,6 +10840,167 @@ function CartPage({
|
|
|
10817
10840
|
}
|
|
10818
10841
|
) });
|
|
10819
10842
|
}
|
|
10843
|
+
var CartDrawerContext = React10.createContext(null);
|
|
10844
|
+
function useCartDrawer() {
|
|
10845
|
+
const ctx = React10.useContext(CartDrawerContext);
|
|
10846
|
+
if (!ctx) {
|
|
10847
|
+
throw new Error("useCartDrawer must be used within <CartDrawerProvider>");
|
|
10848
|
+
}
|
|
10849
|
+
return ctx;
|
|
10850
|
+
}
|
|
10851
|
+
function CartDrawerProvider({ children, openOnAdd = true }) {
|
|
10852
|
+
const [isOpen, setIsOpen] = React10.useState(false);
|
|
10853
|
+
const cart = useCart();
|
|
10854
|
+
const [lastPending, setLastPending] = React10.useState(0);
|
|
10855
|
+
const open = React10.useCallback(() => setIsOpen(true), []);
|
|
10856
|
+
const close = React10.useCallback(() => setIsOpen(false), []);
|
|
10857
|
+
const toggle = React10.useCallback(() => setIsOpen((v) => !v), []);
|
|
10858
|
+
React10.useEffect(() => {
|
|
10859
|
+
if (!openOnAdd) return;
|
|
10860
|
+
if (cart.pendingOpCount > lastPending && cart.pendingOpCount > 0) {
|
|
10861
|
+
setIsOpen(true);
|
|
10862
|
+
}
|
|
10863
|
+
setLastPending(cart.pendingOpCount);
|
|
10864
|
+
}, [cart.pendingOpCount, lastPending, openOnAdd]);
|
|
10865
|
+
const value = React10.useMemo(() => ({ isOpen, open, close, toggle }), [isOpen, open, close, toggle]);
|
|
10866
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CartDrawerContext.Provider, { value, children });
|
|
10867
|
+
}
|
|
10868
|
+
function CartDrawer({
|
|
10869
|
+
onCheckout,
|
|
10870
|
+
onContinueShopping,
|
|
10871
|
+
title = "Your cart",
|
|
10872
|
+
className
|
|
10873
|
+
}) {
|
|
10874
|
+
const { isOpen, close } = useCartDrawer();
|
|
10875
|
+
const cart = useCart();
|
|
10876
|
+
React10.useEffect(() => {
|
|
10877
|
+
if (!isOpen) return;
|
|
10878
|
+
const original = document.body.style.overflow;
|
|
10879
|
+
document.body.style.overflow = "hidden";
|
|
10880
|
+
const onKey = (e) => {
|
|
10881
|
+
if (e.key === "Escape") close();
|
|
10882
|
+
};
|
|
10883
|
+
window.addEventListener("keydown", onKey);
|
|
10884
|
+
return () => {
|
|
10885
|
+
document.body.style.overflow = original;
|
|
10886
|
+
window.removeEventListener("keydown", onKey);
|
|
10887
|
+
};
|
|
10888
|
+
}, [isOpen, close]);
|
|
10889
|
+
const handleCheckout = () => {
|
|
10890
|
+
close();
|
|
10891
|
+
onCheckout?.();
|
|
10892
|
+
};
|
|
10893
|
+
const handleContinue = () => {
|
|
10894
|
+
if (onContinueShopping) {
|
|
10895
|
+
onContinueShopping();
|
|
10896
|
+
}
|
|
10897
|
+
close();
|
|
10898
|
+
};
|
|
10899
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10900
|
+
"div",
|
|
10901
|
+
{
|
|
10902
|
+
"data-cimplify-cart-drawer": true,
|
|
10903
|
+
"data-open": isOpen ? "true" : "false",
|
|
10904
|
+
"aria-hidden": !isOpen,
|
|
10905
|
+
className: cn(
|
|
10906
|
+
"fixed inset-0 z-[200]",
|
|
10907
|
+
isOpen ? "pointer-events-auto" : "pointer-events-none"
|
|
10908
|
+
),
|
|
10909
|
+
children: [
|
|
10910
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10911
|
+
"div",
|
|
10912
|
+
{
|
|
10913
|
+
onClick: close,
|
|
10914
|
+
className: cn(
|
|
10915
|
+
"absolute inset-0 bg-foreground/40 backdrop-blur-sm transition-opacity duration-200",
|
|
10916
|
+
isOpen ? "opacity-100" : "opacity-0"
|
|
10917
|
+
)
|
|
10918
|
+
}
|
|
10919
|
+
),
|
|
10920
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10921
|
+
"aside",
|
|
10922
|
+
{
|
|
10923
|
+
role: "dialog",
|
|
10924
|
+
"aria-modal": "true",
|
|
10925
|
+
"aria-label": title,
|
|
10926
|
+
className: cn(
|
|
10927
|
+
"absolute top-0 right-0 h-full w-full sm:max-w-md bg-background shadow-2xl flex flex-col transition-transform duration-300 ease-out",
|
|
10928
|
+
isOpen ? "translate-x-0" : "translate-x-full",
|
|
10929
|
+
className
|
|
10930
|
+
),
|
|
10931
|
+
children: [
|
|
10932
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between gap-4 px-6 py-4 border-b border-border shrink-0", children: [
|
|
10933
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-base font-semibold tracking-tight m-0", children: [
|
|
10934
|
+
title,
|
|
10935
|
+
cart.itemCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ml-2 text-muted-foreground font-normal", children: [
|
|
10936
|
+
"(",
|
|
10937
|
+
cart.itemCount,
|
|
10938
|
+
" ",
|
|
10939
|
+
cart.itemCount === 1 ? "item" : "items",
|
|
10940
|
+
")"
|
|
10941
|
+
] })
|
|
10942
|
+
] }),
|
|
10943
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10944
|
+
"button",
|
|
10945
|
+
{
|
|
10946
|
+
type: "button",
|
|
10947
|
+
onClick: close,
|
|
10948
|
+
"aria-label": "Close cart",
|
|
10949
|
+
className: "grid place-items-center w-8 h-8 rounded-full hover:bg-muted text-muted-foreground hover:text-foreground transition-colors",
|
|
10950
|
+
children: "\u2715"
|
|
10951
|
+
}
|
|
10952
|
+
)
|
|
10953
|
+
] }),
|
|
10954
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-6 py-2", children: cart.isEmpty ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full grid place-items-center text-center py-20", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
10955
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10956
|
+
"svg",
|
|
10957
|
+
{
|
|
10958
|
+
className: "w-12 h-12 mx-auto text-muted-foreground/30",
|
|
10959
|
+
fill: "none",
|
|
10960
|
+
stroke: "currentColor",
|
|
10961
|
+
strokeWidth: "1",
|
|
10962
|
+
viewBox: "0 0 24 24",
|
|
10963
|
+
"aria-hidden": true,
|
|
10964
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z" })
|
|
10965
|
+
}
|
|
10966
|
+
),
|
|
10967
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium mt-3 mb-1", children: "Your cart is empty" }),
|
|
10968
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Add some items to get started" })
|
|
10969
|
+
] }) }) : /* @__PURE__ */ jsxRuntime.jsx(CartSummary, {}) }),
|
|
10970
|
+
!cart.isEmpty && /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: "border-t border-border px-6 py-4 space-y-3 shrink-0", children: [
|
|
10971
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline justify-between text-sm", children: [
|
|
10972
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Subtotal" }),
|
|
10973
|
+
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: cart.subtotal, className: "font-semibold text-base" })
|
|
10974
|
+
] }),
|
|
10975
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Tax and delivery calculated at checkout." }),
|
|
10976
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 pt-1", children: [
|
|
10977
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10978
|
+
"button",
|
|
10979
|
+
{
|
|
10980
|
+
type: "button",
|
|
10981
|
+
onClick: handleCheckout,
|
|
10982
|
+
className: "w-full h-11 rounded-md bg-foreground text-background font-medium text-sm hover:bg-foreground/90 transition-colors",
|
|
10983
|
+
children: "Checkout"
|
|
10984
|
+
}
|
|
10985
|
+
),
|
|
10986
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10987
|
+
"button",
|
|
10988
|
+
{
|
|
10989
|
+
type: "button",
|
|
10990
|
+
onClick: handleContinue,
|
|
10991
|
+
className: "w-full h-10 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",
|
|
10992
|
+
children: "Continue shopping"
|
|
10993
|
+
}
|
|
10994
|
+
)
|
|
10995
|
+
] })
|
|
10996
|
+
] })
|
|
10997
|
+
]
|
|
10998
|
+
}
|
|
10999
|
+
)
|
|
11000
|
+
]
|
|
11001
|
+
}
|
|
11002
|
+
);
|
|
11003
|
+
}
|
|
10820
11004
|
function CheckoutPage({
|
|
10821
11005
|
title = "Checkout",
|
|
10822
11006
|
onComplete,
|
|
@@ -12665,6 +12849,8 @@ exports.BundleSelector = BundleSelector;
|
|
|
12665
12849
|
exports.CardImage = CardImage;
|
|
12666
12850
|
exports.CardShell = CardShell;
|
|
12667
12851
|
exports.CardVariant = CardVariant;
|
|
12852
|
+
exports.CartDrawer = CartDrawer;
|
|
12853
|
+
exports.CartDrawerProvider = CartDrawerProvider;
|
|
12668
12854
|
exports.CartPage = CartPage;
|
|
12669
12855
|
exports.CartSummary = CartSummary;
|
|
12670
12856
|
exports.CartTemplate = CartTemplate;
|
|
@@ -12764,6 +12950,7 @@ exports.useBookings = useBookings;
|
|
|
12764
12950
|
exports.useBootstrap = useBootstrap;
|
|
12765
12951
|
exports.useBundles = useBundles;
|
|
12766
12952
|
exports.useCart = useCart;
|
|
12953
|
+
exports.useCartDrawer = useCartDrawer;
|
|
12767
12954
|
exports.useCategories = useCategories;
|
|
12768
12955
|
exports.useChat = useChat;
|
|
12769
12956
|
exports.useCheckout = useCheckout;
|