@cimplify/sdk 0.80.0 → 0.81.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 +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-3BKMNVTR.mjs → chunk-7BM56JET.mjs} +1 -0
- package/dist/{chunk-FIC5S3KD.mjs → chunk-7PAQR3VC.mjs} +2 -2
- package/dist/{chunk-BNA4GW4D.mjs → chunk-BRVIXGUW.mjs} +60 -0
- package/dist/{chunk-NV445GMS.js → chunk-GFM5JW45.js} +48 -36
- package/dist/{chunk-CV5QMDQS.js → chunk-HPN5R3K2.js} +1 -0
- package/dist/{chunk-KMP4HVA2.js → chunk-IZDJEDR4.js} +4 -4
- package/dist/{chunk-NJGJCQWF.mjs → chunk-NWUEWUX2.mjs} +13 -1
- package/dist/{chunk-OSTOGR4F.js → chunk-SRJEMEVZ.js} +60 -0
- package/dist/{client-D22iSqke.d.ts → client-BmDNlUMx.d.ts} +41 -2
- package/dist/{client-6BNd11sq.d.mts → client-C51FFhDz.d.mts} +2 -2
- package/dist/{client-Czbt-mej.d.mts → client-Cx3WLhMj.d.mts} +41 -2
- package/dist/{client-CuoWlAfH.d.ts → client-Q_m-GkTl.d.ts} +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +69 -69
- package/dist/index.mjs +3 -3
- package/dist/mock/cli.mjs +60 -0
- package/dist/mock/library.js +60 -0
- package/dist/mock/library.mjs +60 -0
- package/dist/mock/msw.js +60 -0
- package/dist/mock/msw.mjs +60 -0
- package/dist/react.d.mts +20 -2
- package/dist/react.d.ts +20 -2
- package/dist/react.js +41 -16
- package/dist/react.mjs +27 -3
- package/dist/{server-Daq42vK7.d.ts → server-N4Q24CnO.d.ts} +21 -0
- package/dist/{server-CGO4zneR.d.mts → server-hP9NLtTh.d.mts} +21 -0
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +7 -7
- package/dist/server.mjs +2 -2
- package/dist/testing/msw.d.mts +1 -1
- package/dist/testing/msw.d.ts +1 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +4 -4
- package/dist/testing/suite.d.ts +4 -4
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +18 -18
- package/dist/testing.d.ts +18 -18
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/package.json +1 -1
package/dist/mock/msw.js
CHANGED
|
@@ -2474,6 +2474,17 @@ function buildV1(deps) {
|
|
|
2474
2474
|
})
|
|
2475
2475
|
)
|
|
2476
2476
|
);
|
|
2477
|
+
app.get(
|
|
2478
|
+
"/delivery/options",
|
|
2479
|
+
(c) => tryRoute(
|
|
2480
|
+
c,
|
|
2481
|
+
() => deps.delivery.getOptions({
|
|
2482
|
+
lat: getQueryNum(c, "dropoff_lat"),
|
|
2483
|
+
lng: getQueryNum(c, "dropoff_lng"),
|
|
2484
|
+
order_value: c.req.query("order_value")
|
|
2485
|
+
})
|
|
2486
|
+
)
|
|
2487
|
+
);
|
|
2477
2488
|
app.post("/places/autocomplete", async (c) => {
|
|
2478
2489
|
const body = await c.req.json().catch(() => ({}));
|
|
2479
2490
|
return tryRoute(c, () => deps.places.autocomplete({ query: body.input ?? body.query ?? "", country: body.country }));
|
|
@@ -5384,6 +5395,22 @@ function createPlacesService() {
|
|
|
5384
5395
|
}
|
|
5385
5396
|
|
|
5386
5397
|
// src/mock/domain/delivery.ts
|
|
5398
|
+
function optionDetails(rateId, rateName) {
|
|
5399
|
+
return {
|
|
5400
|
+
zone_id: "dlvz_mock",
|
|
5401
|
+
zone_name: "Mock Zone",
|
|
5402
|
+
provider: "manual",
|
|
5403
|
+
provider_resolved_from: "zone",
|
|
5404
|
+
rate_id: rateId,
|
|
5405
|
+
rate_name: rateName,
|
|
5406
|
+
distance_km: "4.20",
|
|
5407
|
+
base_fee: money(5),
|
|
5408
|
+
per_km_fee: money(2),
|
|
5409
|
+
surge_multiplier: "1",
|
|
5410
|
+
calculated_fee: money(15),
|
|
5411
|
+
currency: "GHS"
|
|
5412
|
+
};
|
|
5413
|
+
}
|
|
5387
5414
|
function createDeliveryService() {
|
|
5388
5415
|
return {
|
|
5389
5416
|
getFee(opts) {
|
|
@@ -5400,6 +5427,39 @@ function createDeliveryService() {
|
|
|
5400
5427
|
{ provider: "uber", fee: money(22), eta_minutes: 28 }
|
|
5401
5428
|
]
|
|
5402
5429
|
};
|
|
5430
|
+
},
|
|
5431
|
+
getOptions(opts) {
|
|
5432
|
+
const orderValue = parseFloat(opts.order_value ?? "0");
|
|
5433
|
+
const standardFree = orderValue >= 200;
|
|
5434
|
+
return {
|
|
5435
|
+
serviceable: true,
|
|
5436
|
+
options: [
|
|
5437
|
+
{
|
|
5438
|
+
rate_id: "dlvrt_mock_standard",
|
|
5439
|
+
name: "Standard",
|
|
5440
|
+
fee: standardFree ? money(0) : money(15),
|
|
5441
|
+
currency: "GHS",
|
|
5442
|
+
free_delivery_applied: standardFree,
|
|
5443
|
+
free_over_amount: money(200),
|
|
5444
|
+
eta_min_minutes: 45,
|
|
5445
|
+
eta_max_minutes: 90,
|
|
5446
|
+
is_default: true,
|
|
5447
|
+
details: optionDetails("dlvrt_mock_standard", "Standard")
|
|
5448
|
+
},
|
|
5449
|
+
{
|
|
5450
|
+
rate_id: "dlvrt_mock_express",
|
|
5451
|
+
name: "Express",
|
|
5452
|
+
description: "Delivered within the hour",
|
|
5453
|
+
fee: money(25),
|
|
5454
|
+
currency: "GHS",
|
|
5455
|
+
free_delivery_applied: false,
|
|
5456
|
+
eta_min_minutes: 30,
|
|
5457
|
+
eta_max_minutes: 60,
|
|
5458
|
+
is_default: false,
|
|
5459
|
+
details: optionDetails("dlvrt_mock_express", "Express")
|
|
5460
|
+
}
|
|
5461
|
+
]
|
|
5462
|
+
};
|
|
5403
5463
|
}
|
|
5404
5464
|
};
|
|
5405
5465
|
}
|
package/dist/mock/msw.mjs
CHANGED
|
@@ -2472,6 +2472,17 @@ function buildV1(deps) {
|
|
|
2472
2472
|
})
|
|
2473
2473
|
)
|
|
2474
2474
|
);
|
|
2475
|
+
app.get(
|
|
2476
|
+
"/delivery/options",
|
|
2477
|
+
(c) => tryRoute(
|
|
2478
|
+
c,
|
|
2479
|
+
() => deps.delivery.getOptions({
|
|
2480
|
+
lat: getQueryNum(c, "dropoff_lat"),
|
|
2481
|
+
lng: getQueryNum(c, "dropoff_lng"),
|
|
2482
|
+
order_value: c.req.query("order_value")
|
|
2483
|
+
})
|
|
2484
|
+
)
|
|
2485
|
+
);
|
|
2475
2486
|
app.post("/places/autocomplete", async (c) => {
|
|
2476
2487
|
const body = await c.req.json().catch(() => ({}));
|
|
2477
2488
|
return tryRoute(c, () => deps.places.autocomplete({ query: body.input ?? body.query ?? "", country: body.country }));
|
|
@@ -5382,6 +5393,22 @@ function createPlacesService() {
|
|
|
5382
5393
|
}
|
|
5383
5394
|
|
|
5384
5395
|
// src/mock/domain/delivery.ts
|
|
5396
|
+
function optionDetails(rateId, rateName) {
|
|
5397
|
+
return {
|
|
5398
|
+
zone_id: "dlvz_mock",
|
|
5399
|
+
zone_name: "Mock Zone",
|
|
5400
|
+
provider: "manual",
|
|
5401
|
+
provider_resolved_from: "zone",
|
|
5402
|
+
rate_id: rateId,
|
|
5403
|
+
rate_name: rateName,
|
|
5404
|
+
distance_km: "4.20",
|
|
5405
|
+
base_fee: money(5),
|
|
5406
|
+
per_km_fee: money(2),
|
|
5407
|
+
surge_multiplier: "1",
|
|
5408
|
+
calculated_fee: money(15),
|
|
5409
|
+
currency: "GHS"
|
|
5410
|
+
};
|
|
5411
|
+
}
|
|
5385
5412
|
function createDeliveryService() {
|
|
5386
5413
|
return {
|
|
5387
5414
|
getFee(opts) {
|
|
@@ -5398,6 +5425,39 @@ function createDeliveryService() {
|
|
|
5398
5425
|
{ provider: "uber", fee: money(22), eta_minutes: 28 }
|
|
5399
5426
|
]
|
|
5400
5427
|
};
|
|
5428
|
+
},
|
|
5429
|
+
getOptions(opts) {
|
|
5430
|
+
const orderValue = parseFloat(opts.order_value ?? "0");
|
|
5431
|
+
const standardFree = orderValue >= 200;
|
|
5432
|
+
return {
|
|
5433
|
+
serviceable: true,
|
|
5434
|
+
options: [
|
|
5435
|
+
{
|
|
5436
|
+
rate_id: "dlvrt_mock_standard",
|
|
5437
|
+
name: "Standard",
|
|
5438
|
+
fee: standardFree ? money(0) : money(15),
|
|
5439
|
+
currency: "GHS",
|
|
5440
|
+
free_delivery_applied: standardFree,
|
|
5441
|
+
free_over_amount: money(200),
|
|
5442
|
+
eta_min_minutes: 45,
|
|
5443
|
+
eta_max_minutes: 90,
|
|
5444
|
+
is_default: true,
|
|
5445
|
+
details: optionDetails("dlvrt_mock_standard", "Standard")
|
|
5446
|
+
},
|
|
5447
|
+
{
|
|
5448
|
+
rate_id: "dlvrt_mock_express",
|
|
5449
|
+
name: "Express",
|
|
5450
|
+
description: "Delivered within the hour",
|
|
5451
|
+
fee: money(25),
|
|
5452
|
+
currency: "GHS",
|
|
5453
|
+
free_delivery_applied: false,
|
|
5454
|
+
eta_min_minutes: 30,
|
|
5455
|
+
eta_max_minutes: 60,
|
|
5456
|
+
is_default: false,
|
|
5457
|
+
details: optionDetails("dlvrt_mock_express", "Express")
|
|
5458
|
+
}
|
|
5459
|
+
]
|
|
5460
|
+
};
|
|
5401
5461
|
}
|
|
5402
5462
|
};
|
|
5403
5463
|
}
|
package/dist/react.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.mjs';
|
|
3
3
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.mjs';
|
|
4
|
-
import { ad as CimplifyClient,
|
|
4
|
+
import { ad as CimplifyClient, cm as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aX as EnrichedOrderItem, aW as EnrichedOrder, w as Business, bs as Location, cD as ReorderResult, c2 as OrderStatus, bI as Order, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, ci as PriceQuote, cs as QuoteUiMessage, cY as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d5 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, az as DeliveryOptionsResponse, b8 as FxRateResponse, de as StoreCreditBalance, dg as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aV as ElementsOptions, cc as PaymentMethodInfo, aT as ElementsCheckoutResult, cl as ProcessCheckoutOptions, ag as CimplifyElements, bj as LineItem, d8 as Staff, cT as Room } from './client-Cx3WLhMj.mjs';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { ab as CurrencyCode, aX as Product, aO as Pagination, T as CimplifyError, b9 as ProductWithDetails, Q as Category, aM as Money, C as BundleSelectionInput, $ as ComponentSelectionInput, z as BundleSelectionData, a8 as CompositeSelectionData, U as Collection, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, b5 as ProductTimeProfile, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, E as BundleSummary, a6 as CompositePriceResult, bo as SubscriptionWithDetails, bn as SubscriptionStatus, bk as Subscription, ac as CustomAttributeDefinition, ba as PropertyFacet, a$ as ProductBillingPlan, bL as VariantView, bF as VariantAxisWithValues, f as AddOnWithOptions, w as BundleComponentView, x as BundlePriceType, a4 as CompositeGroupView, aq as DisplayCart, b1 as ProductInputField, bg as SchedulingMode, at as DurationUnit, aj as DepositType, ad as CustomAttributeValue, b2 as ProductProperty, bc as QuantityPricingTier } from './product-BgFOFmQw.mjs';
|
|
7
7
|
import { P as ProductWithPrice } from './price-BfOaGqjx.mjs';
|
|
@@ -1436,6 +1436,24 @@ interface UseDeliveryFeeResult {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
declare function useDeliveryFee(options: UseDeliveryFeeOptions): UseDeliveryFeeResult;
|
|
1438
1438
|
|
|
1439
|
+
interface UseDeliveryOptionsOptions extends CachedQueryBaseOptions {
|
|
1440
|
+
latitude: number;
|
|
1441
|
+
longitude: number;
|
|
1442
|
+
country?: string;
|
|
1443
|
+
/** Cart goods total — drives free-over thresholds and zone minimums. */
|
|
1444
|
+
orderValue?: Money;
|
|
1445
|
+
}
|
|
1446
|
+
interface UseDeliveryOptionsResult {
|
|
1447
|
+
options: DeliveryOptionsResponse | null;
|
|
1448
|
+
isLoading: boolean;
|
|
1449
|
+
error: CimplifyError | null;
|
|
1450
|
+
refetch: () => Promise<void>;
|
|
1451
|
+
}
|
|
1452
|
+
/** The delivery menu for an address — every merchant-named rate priced for
|
|
1453
|
+
* the dropoff. Render as a radio list when more than one option comes back;
|
|
1454
|
+
* pass the chosen option's `rate_id` as `delivery_rate_id` at checkout. */
|
|
1455
|
+
declare function useDeliveryOptions(options: UseDeliveryOptionsOptions): UseDeliveryOptionsResult;
|
|
1456
|
+
|
|
1439
1457
|
interface UseFxRateOptions extends CachedQueryBaseOptions {
|
|
1440
1458
|
from: CurrencyCode;
|
|
1441
1459
|
to: CurrencyCode;
|
|
@@ -3738,4 +3756,4 @@ interface ChatWidgetProps {
|
|
|
3738
3756
|
}
|
|
3739
3757
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
3740
3758
|
|
|
3741
|
-
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, 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, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, 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, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, 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, ProductModel3D, type ProductModel3DProps, 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, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, 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 UseCimplifySessionOptions, type UseCimplifySessionResult, 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 UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
3759
|
+
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, 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, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, 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, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, 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, ProductModel3D, type ProductModel3DProps, 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, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, 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 UseCimplifySessionOptions, type UseCimplifySessionResult, 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 UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useDeliveryOptions, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React$1, { ReactNode } from 'react';
|
|
2
2
|
import { d as AdSlot, c as AdPosition, a as AdContextValue, S as SignInOptions } from './sign-in-DQlIdqsi.js';
|
|
3
3
|
export { A as AdConfig, g as getVariantDisplayName } from './sign-in-DQlIdqsi.js';
|
|
4
|
-
import { ad as CimplifyClient,
|
|
4
|
+
import { ad as CimplifyClient, cm as ProcessCheckoutResult, aa as CheckoutStatus, ab as CheckoutStatusContext, aX as EnrichedOrderItem, aW as EnrichedOrder, w as Business, bs as Location, cD as ReorderResult, c2 as OrderStatus, bI as Order, co as QuoteBundleSelectionInput, cp as QuoteCompositeSelectionInput, ci as PriceQuote, cs as QuoteUiMessage, cY as Service, r as AvailableSlot, av as DayAvailability, an as CustomerBooking, M as CancelBookingResult, f as ActivityStateResponse, d5 as SessionMessage, c as ActivityRecommendation, ax as DeliveryFeeResponse, az as DeliveryOptionsResponse, b8 as FxRateResponse, de as StoreCreditBalance, dg as StorefrontBootstrap, Y as ChatWidgetStarter, X as ChatMessage, h as AddressInfo, n as AuthenticatedData, aV as ElementsOptions, cc as PaymentMethodInfo, aT as ElementsCheckoutResult, cl as ProcessCheckoutOptions, ag as CimplifyElements, bj as LineItem, d8 as Staff, cT as Room } from './client-BmDNlUMx.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { ab as CurrencyCode, aX as Product, aO as Pagination, T as CimplifyError, b9 as ProductWithDetails, Q as Category, aM as Money, C as BundleSelectionInput, $ as ComponentSelectionInput, z as BundleSelectionData, a8 as CompositeSelectionData, U as Collection, b4 as ProductTaxonomy, bt as TaxonomyWithChildren, b5 as ProductTimeProfile, ah as Deal, b0 as ProductDealInfo, an as DiscountValidation, E as BundleSummary, a6 as CompositePriceResult, bo as SubscriptionWithDetails, bn as SubscriptionStatus, bk as Subscription, ac as CustomAttributeDefinition, ba as PropertyFacet, a$ as ProductBillingPlan, bL as VariantView, bF as VariantAxisWithValues, f as AddOnWithOptions, w as BundleComponentView, x as BundlePriceType, a4 as CompositeGroupView, aq as DisplayCart, b1 as ProductInputField, bg as SchedulingMode, at as DurationUnit, aj as DepositType, ad as CustomAttributeValue, b2 as ProductProperty, bc as QuantityPricingTier } from './product-BgFOFmQw.js';
|
|
7
7
|
import { P as ProductWithPrice } from './price-CS1IsORZ.js';
|
|
@@ -1436,6 +1436,24 @@ interface UseDeliveryFeeResult {
|
|
|
1436
1436
|
}
|
|
1437
1437
|
declare function useDeliveryFee(options: UseDeliveryFeeOptions): UseDeliveryFeeResult;
|
|
1438
1438
|
|
|
1439
|
+
interface UseDeliveryOptionsOptions extends CachedQueryBaseOptions {
|
|
1440
|
+
latitude: number;
|
|
1441
|
+
longitude: number;
|
|
1442
|
+
country?: string;
|
|
1443
|
+
/** Cart goods total — drives free-over thresholds and zone minimums. */
|
|
1444
|
+
orderValue?: Money;
|
|
1445
|
+
}
|
|
1446
|
+
interface UseDeliveryOptionsResult {
|
|
1447
|
+
options: DeliveryOptionsResponse | null;
|
|
1448
|
+
isLoading: boolean;
|
|
1449
|
+
error: CimplifyError | null;
|
|
1450
|
+
refetch: () => Promise<void>;
|
|
1451
|
+
}
|
|
1452
|
+
/** The delivery menu for an address — every merchant-named rate priced for
|
|
1453
|
+
* the dropoff. Render as a radio list when more than one option comes back;
|
|
1454
|
+
* pass the chosen option's `rate_id` as `delivery_rate_id` at checkout. */
|
|
1455
|
+
declare function useDeliveryOptions(options: UseDeliveryOptionsOptions): UseDeliveryOptionsResult;
|
|
1456
|
+
|
|
1439
1457
|
interface UseFxRateOptions extends CachedQueryBaseOptions {
|
|
1440
1458
|
from: CurrencyCode;
|
|
1441
1459
|
to: CurrencyCode;
|
|
@@ -3738,4 +3756,4 @@ interface ChatWidgetProps {
|
|
|
3738
3756
|
}
|
|
3739
3757
|
declare function ChatWidget({ client: clientProp, businessName, greeting, subtitle, starters, placeholder, position, defaultOpen, pollInterval, className, classNames, }: ChatWidgetProps): react_jsx_runtime.JSX.Element;
|
|
3740
3758
|
|
|
3741
|
-
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, 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, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, 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, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, 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, ProductModel3D, type ProductModel3DProps, 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, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, 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 UseCimplifySessionOptions, type UseCimplifySessionResult, 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 UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
3759
|
+
export { AccommodationCard, AccountContent, type AccountContentProps, AccountDashboardPage, type AccountDashboardPageProps, AccountHero, type AccountHeroProps, AccountIdentityStrip, type AccountIdentityStripProps, AccountLineItem, type AccountLineItemData, type AccountLineItemProps, AccountLineItems, type AccountLineItemsProps, AccountNav, type AccountNavProps, AccountOrderDetailPage, type AccountOrderDetailPageProps, AccountOrderView, type AccountOrderViewProps, AccountOrdersPage, type AccountOrdersPageProps, type AccountPageBaseProps, AccountShell, type AccountShellProps, AccountSidebar, type AccountSidebarProps, AccountSignedOutPrompt, type AccountSignedOutPromptProps, AccountSubscriptionDetailPage, type AccountSubscriptionDetailPageProps, AccountSubscriptionsPage, type AccountSubscriptionsPageProps, Ad, AdPosition, type AdProps, AdProvider, AdSlot, AddOnSelector, type AddOnSelectorClassNames, type AddOnSelectorProps, type AddToCartOptions, AddressElement, AuthElement, AvailabilityBadge, type AvailabilityBadgeClassNames, type AvailabilityBadgeProps, BackLink, type BackLinkProps, BillingPlanSelector, type BillingPlanSelectorClassNames, type BillingPlanSelectorProps, BookingCard, type BookingCardClassNames, type BookingCardProps, BookingList, type BookingListClassNames, type BookingListProps, BookingPage, type BookingPageClassNames, type BookingPageProps, BookingSummary, type BookingSummaryClassNames, type BookingSummaryProps, BookingsPage, type BookingsPageClassNames, type BookingsPageProps, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, type BundleSelectorClassNames, type BundleSelectorProps, Button, type ButtonProps, 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, CheckIcon, CheckoutPage, type CheckoutPageClassNames, type CheckoutPageProps, CimplifyCheckout, type CimplifyCheckoutProps, type CimplifyClientContextValue, type CimplifyClientSession, type CimplifyContextValue, type CimplifyLinkComponent, type CimplifyLinkProps, CimplifyProvider, type CimplifyProviderProps, CimplifySignInButton, type CimplifySignInButtonProps, CimplifyUserButton, type CimplifyUserButtonProps, type CollectionLayoutProps, CollectionPage, type CollectionPageClassNames, type CollectionPageProps, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, type CompositeSelectorClassNames, type CompositeSelectorProps, ContextCard, type ContextCardProps, type ContextRow, ContinuityCard, type ContinuityCardProps, CurrencySelector, type CurrencySelectorClassNames, type CurrencySelectorProps, CustomAttributesTable, type CustomerInput, CustomerInputFields, type CustomerInputFieldsClassNames, type CustomerInputFieldsProps, type CustomerInputType, DashboardIcon, DashboardIcon20, DatePicker, type DatePickerClassNames, type DatePickerProps, 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, type DeliveryLive, type DeliveryRider, DeliveryTracker, type DeliveryTrackerProps, DeliveryTruckIcon, type DigitalFulfillment, DigitalProductCard, DigitalProductLayout, DiscountInput, type DiscountInputClassNames, type DiscountInputProps, ElementsProvider, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, FeaturedCollectionLayout, type FilterTabItem, FilterTabs, type FilterTabsProps, FoodProductCard, FoodProductLayout, HappeningCard, type HappeningCardProps, type HappeningPaneData, IdentityIcon, IdentityOfframp, type IdentityOfframpProps, type IdentitySummary, InventoryBadge, ItemsCard, type ItemsCardProps, LeaseServiceCard, LineItemDetails, type LineItemSemanticKind, type LineScheduling, type LineSelection, type LineStateTone, LocationPicker, type LocationPickerClassNames, type LocationPickerProps, MediaGallery, type MediaGalleryProps, type MediaItem, MetadataStringList, MobileAccountShell, type MobileAccountShellProps, MobileBackButton, MobileMoreButton, MobileTabBar, type MobileTabBarProps, type NavItem, NextDeliveryCard, type NextDeliveryCardProps, OrderDetailHeader, type OrderDetailHeaderProps, OrderDetailMetaPipe, OrderDetailPage, type OrderDetailPageClassNames, type OrderDetailPageProps, OrderHistory, type OrderHistoryClassNames, OrderHistoryPage, type OrderHistoryPageClassNames, type OrderHistoryPageProps, type OrderHistoryProps, type OrderItemData, OrderList, type OrderListProps, OrderRow, type OrderRowData, type OrderRowProps, type OrderRowStatus, type OrderStatusTone, OrderSummary, type OrderSummaryClassNames, type OrderSummaryProps, OrderTimeline, type OrderTimelineProps, OrderTotals, type OrderTotalsProps, type OrderViewDelivery, type OrderViewPayment, type OrderViewPaymentRow, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, type PrefetchMode, type PrefetchOptions, 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, ProductModel3D, type ProductModel3DProps, 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, RichText, type RichTextProps, SaleBadge, type SaleBadgeClassNames, type SaleBadgeProps, ScheduleServiceCard, SearchInput, type SearchInputClassNames, type SearchInputProps, type SearchLayoutProps, SearchPage, type SearchPageClassNames, type SearchPageProps, SearchTemplate, Section, SectionMore, type SectionMoreProps, type SectionProps, type ServiceCardLayoutProps, ServiceProductLayout, SessionMessageBanner, type SessionMessageBannerClassNames, type SessionMessageBannerProps, SignOutIcon, Skeleton, type SkeletonProps, SlotPicker, type SlotPickerClassNames, type SlotPickerProps, SoldOutOverlay, StaffPicker, type StaffPickerClassNames, type StaffPickerProps, StandardServiceCard, Status, type StatusProps, StoreNav, type StoreNavClassNames, type StoreNavProps, StoreVideo, type StoreVideoProps, SubscriptionCard, SubscriptionList, type SubscriptionListProps, SubscriptionRow, type SubscriptionRowData, type SubscriptionRowProps, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, type TimePickerClassNames, type TimePickerProps, type TimelineStep, type ToAccountOrderViewOptions, Toast, type ToastProps, type TotalsData, 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 UseCimplifySessionOptions, type UseCimplifySessionResult, 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 UseStoreCreditOptions, type UseStoreCreditResult, type UseTaxonomiesOptions, type UseTaxonomiesResult, type UseTaxonomyOptions, type UseTaxonomyPathOptions, type UseTaxonomyPathResult, type UseTaxonomyResult, type UseValidateDiscountOptions, type UseValidateDiscountResult, type UseVariantSelectorOptions, type UseVariantSelectorResult, type UserButtonLink, VariantSelector, type VariantSelectorClassNames, type VariantSelectorProps, VolumePricing, type VolumePricingClassNames, type VolumePricingProps, WelcomeCard, type WelcomeCardProps, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useDeliveryOptions, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
package/dist/react.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var chunkGFM5JW45_js = require('./chunk-GFM5JW45.js');
|
|
6
|
+
var chunkHPN5R3K2_js = require('./chunk-HPN5R3K2.js');
|
|
7
7
|
var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
|
|
8
8
|
var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
|
|
9
9
|
require('./chunk-OWW5GUSB.js');
|
|
@@ -1131,7 +1131,7 @@ var DEFAULT_COUNTRY = "US";
|
|
|
1131
1131
|
function createDefaultClient() {
|
|
1132
1132
|
const processRef = globalThis.process;
|
|
1133
1133
|
const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
|
|
1134
|
-
return
|
|
1134
|
+
return chunkGFM5JW45_js.createCimplifyClient({ publicKey: envPublicKey });
|
|
1135
1135
|
}
|
|
1136
1136
|
function getStoredLocationId() {
|
|
1137
1137
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
@@ -3443,7 +3443,7 @@ function CimplifySignInButton({
|
|
|
3443
3443
|
const onClick = async () => {
|
|
3444
3444
|
if (busy || disabled) return;
|
|
3445
3445
|
setBusy(true);
|
|
3446
|
-
await
|
|
3446
|
+
await chunkHPN5R3K2_js.startSignIn({
|
|
3447
3447
|
...signInOpts,
|
|
3448
3448
|
onSuccess: () => {
|
|
3449
3449
|
setBusy(false);
|
|
@@ -5805,6 +5805,30 @@ function useDeliveryFee(options) {
|
|
|
5805
5805
|
return { fee: data, isLoading, error, refetch };
|
|
5806
5806
|
}
|
|
5807
5807
|
|
|
5808
|
+
// src/react/hooks/use-delivery-options.ts
|
|
5809
|
+
var deliveryOptionsQuery = createCachedQuery({
|
|
5810
|
+
name: "useDeliveryOptions",
|
|
5811
|
+
key: (client, options) => cacheKey(
|
|
5812
|
+
client.getPublicKey(),
|
|
5813
|
+
options.latitude,
|
|
5814
|
+
options.longitude,
|
|
5815
|
+
options.country,
|
|
5816
|
+
options.orderValue
|
|
5817
|
+
),
|
|
5818
|
+
fetch: async (client, options) => {
|
|
5819
|
+
const result = await client.delivery.getOptions(options.latitude, options.longitude, {
|
|
5820
|
+
country: options.country,
|
|
5821
|
+
orderValue: options.orderValue
|
|
5822
|
+
});
|
|
5823
|
+
if (!result.ok) throw result.error;
|
|
5824
|
+
return result.value;
|
|
5825
|
+
}
|
|
5826
|
+
});
|
|
5827
|
+
function useDeliveryOptions(options) {
|
|
5828
|
+
const { data, isLoading, error, refetch } = deliveryOptionsQuery(options);
|
|
5829
|
+
return { options: data, isLoading, error, refetch };
|
|
5830
|
+
}
|
|
5831
|
+
|
|
5808
5832
|
// src/react/hooks/use-fx-rate.ts
|
|
5809
5833
|
var fxRateQuery = createCachedQuery({
|
|
5810
5834
|
name: "useFxRate",
|
|
@@ -6097,15 +6121,15 @@ function AuthElement({
|
|
|
6097
6121
|
}, [onReady, onAuthenticated, onError]);
|
|
6098
6122
|
React14.useEffect(() => {
|
|
6099
6123
|
if (!elements || !containerRef.current) return;
|
|
6100
|
-
const element = elements.create(
|
|
6124
|
+
const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
6101
6125
|
elementRef.current = element;
|
|
6102
|
-
element.on(
|
|
6126
|
+
element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6103
6127
|
element.on(
|
|
6104
|
-
|
|
6128
|
+
chunkHPN5R3K2_js.EVENT_TYPES.AUTHENTICATED,
|
|
6105
6129
|
(data) => onAuthenticatedRef.current?.(data)
|
|
6106
6130
|
);
|
|
6107
6131
|
element.on(
|
|
6108
|
-
|
|
6132
|
+
chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
|
|
6109
6133
|
(data) => onErrorRef.current?.(data)
|
|
6110
6134
|
);
|
|
6111
6135
|
element.mount(containerRef.current);
|
|
@@ -6134,15 +6158,15 @@ function AddressElement({
|
|
|
6134
6158
|
}, [onReady, onChange, onError]);
|
|
6135
6159
|
React14.useEffect(() => {
|
|
6136
6160
|
if (!elements || !containerRef.current) return;
|
|
6137
|
-
const element = elements.create(
|
|
6161
|
+
const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.ADDRESS, { mode });
|
|
6138
6162
|
elementRef.current = element;
|
|
6139
|
-
element.on(
|
|
6163
|
+
element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6140
6164
|
element.on(
|
|
6141
|
-
|
|
6165
|
+
chunkHPN5R3K2_js.EVENT_TYPES.CHANGE,
|
|
6142
6166
|
(data) => onChangeRef.current?.(data)
|
|
6143
6167
|
);
|
|
6144
6168
|
element.on(
|
|
6145
|
-
|
|
6169
|
+
chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
|
|
6146
6170
|
(data) => onErrorRef.current?.(data)
|
|
6147
6171
|
);
|
|
6148
6172
|
element.mount(containerRef.current);
|
|
@@ -6172,15 +6196,15 @@ function PaymentElement({
|
|
|
6172
6196
|
}, [onReady, onChange, onError]);
|
|
6173
6197
|
React14.useEffect(() => {
|
|
6174
6198
|
if (!elements || !containerRef.current) return;
|
|
6175
|
-
const element = elements.create(
|
|
6199
|
+
const element = elements.create(chunkHPN5R3K2_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
|
|
6176
6200
|
elementRef.current = element;
|
|
6177
|
-
element.on(
|
|
6201
|
+
element.on(chunkHPN5R3K2_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
6178
6202
|
element.on(
|
|
6179
|
-
|
|
6203
|
+
chunkHPN5R3K2_js.EVENT_TYPES.CHANGE,
|
|
6180
6204
|
(data) => onChangeRef.current?.(data)
|
|
6181
6205
|
);
|
|
6182
6206
|
element.on(
|
|
6183
|
-
|
|
6207
|
+
chunkHPN5R3K2_js.EVENT_TYPES.ERROR,
|
|
6184
6208
|
(data) => onErrorRef.current?.(data)
|
|
6185
6209
|
);
|
|
6186
6210
|
element.mount(containerRef.current);
|
|
@@ -17263,6 +17287,7 @@ exports.useCollection = useCollection;
|
|
|
17263
17287
|
exports.useCollections = useCollections;
|
|
17264
17288
|
exports.useDeals = useDeals;
|
|
17265
17289
|
exports.useDeliveryFee = useDeliveryFee;
|
|
17290
|
+
exports.useDeliveryOptions = useDeliveryOptions;
|
|
17266
17291
|
exports.useElements = useElements;
|
|
17267
17292
|
exports.useElementsReady = useElementsReady;
|
|
17268
17293
|
exports.useFxRate = useFxRate;
|
package/dist/react.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, resolveGallery, RENDER_HINT, DEFAULT_CDN_BASE_URL } from './chunk-E6T5VJMG.mjs';
|
|
3
3
|
export { getVariantDisplayName } from './chunk-E6T5VJMG.mjs';
|
|
4
|
-
import { createCimplifyClient } from './chunk-
|
|
5
|
-
import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-
|
|
4
|
+
import { createCimplifyClient } from './chunk-NWUEWUX2.mjs';
|
|
5
|
+
import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-7BM56JET.mjs';
|
|
6
6
|
import { parsePrice, formatMoney, formatPrice, getProductCurrency, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
|
|
7
7
|
import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
|
|
8
8
|
import './chunk-3G6RQLXK.mjs';
|
|
@@ -5781,6 +5781,30 @@ function useDeliveryFee(options) {
|
|
|
5781
5781
|
return { fee: data, isLoading, error, refetch };
|
|
5782
5782
|
}
|
|
5783
5783
|
|
|
5784
|
+
// src/react/hooks/use-delivery-options.ts
|
|
5785
|
+
var deliveryOptionsQuery = createCachedQuery({
|
|
5786
|
+
name: "useDeliveryOptions",
|
|
5787
|
+
key: (client, options) => cacheKey(
|
|
5788
|
+
client.getPublicKey(),
|
|
5789
|
+
options.latitude,
|
|
5790
|
+
options.longitude,
|
|
5791
|
+
options.country,
|
|
5792
|
+
options.orderValue
|
|
5793
|
+
),
|
|
5794
|
+
fetch: async (client, options) => {
|
|
5795
|
+
const result = await client.delivery.getOptions(options.latitude, options.longitude, {
|
|
5796
|
+
country: options.country,
|
|
5797
|
+
orderValue: options.orderValue
|
|
5798
|
+
});
|
|
5799
|
+
if (!result.ok) throw result.error;
|
|
5800
|
+
return result.value;
|
|
5801
|
+
}
|
|
5802
|
+
});
|
|
5803
|
+
function useDeliveryOptions(options) {
|
|
5804
|
+
const { data, isLoading, error, refetch } = deliveryOptionsQuery(options);
|
|
5805
|
+
return { options: data, isLoading, error, refetch };
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5784
5808
|
// src/react/hooks/use-fx-rate.ts
|
|
5785
5809
|
var fxRateQuery = createCachedQuery({
|
|
5786
5810
|
name: "useFxRate",
|
|
@@ -17031,4 +17055,4 @@ function SparkleIcon({ className }) {
|
|
|
17031
17055
|
);
|
|
17032
17056
|
}
|
|
17033
17057
|
|
|
17034
|
-
export { AccommodationCard, AccountContent, AccountDashboardPage, AccountHero, AccountIdentityStrip, AccountLineItem, AccountLineItems, AccountNav, AccountOrderDetailPage, AccountOrderView, AccountOrdersPage, AccountShell, AccountSidebar, AccountSignedOutPrompt, AccountSubscriptionDetailPage, AccountSubscriptionsPage, Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BackLink, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingSummary, BookingsPage, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, Button, CardImage, CardShell, CardVariant, CartDrawer, CartDrawerProvider, CartPage, CartSummary, CartTemplate, CatalogueCollectionLayout, CataloguePage, CatalogueTemplate, CategoryFilter, CategoryGrid, ChatWidget, CheckIcon, CheckoutPage, CimplifyCheckout, CimplifyProvider, CimplifySignInButton, CimplifyUserButton, CollectionPage, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, ContextCard, ContinuityCard, CurrencySelector, CustomAttributesTable, CustomerInputFields, DashboardIcon, DashboardIcon20, DatePicker, DateSlotPicker, DealBanner, DealsPage, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, DeliveryTracker, DeliveryTruckIcon, DigitalProductCard, DigitalProductLayout, DiscountInput, ElementsProvider, EmptyState, ErrorState, FeaturedCollectionLayout, FilterTabs, FoodProductCard, FoodProductLayout, HappeningCard, IdentityIcon, IdentityOfframp, InventoryBadge, ItemsCard, LeaseServiceCard, LineItemDetails, LocationPicker, MediaGallery, MetadataStringList, MobileAccountShell, MobileBackButton, MobileMoreButton, MobileTabBar, NextDeliveryCard, OrderDetailHeader, OrderDetailMetaPipe, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderList, OrderRow, OrderSummary, OrderTimeline, OrderTotals, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, Price, PriceRange, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductModel3D, ProductPage, ProductSheet, ProductTemplate, PropertiesTable, QuantitySelector, QuickAddButton, RecentlyViewed, RecommendationCarousel, RelatedProductsSection, RentalServiceCard, ResourcePicker, RetailProductCard, RichText, SaleBadge, ScheduleServiceCard, SearchInput, SearchPage, SearchTemplate, Section, SectionMore, ServiceProductLayout, SessionMessageBanner, SignOutIcon, Skeleton, SlotPicker, SoldOutOverlay, StaffPicker, StandardServiceCard, Status, StoreNav, StoreVideo, SubscriptionCard, SubscriptionList, SubscriptionRow, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, Toast, TwoColumnGrid, VariantSelector, VolumePricing, WelcomeCard, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
17058
|
+
export { AccommodationCard, AccountContent, AccountDashboardPage, AccountHero, AccountIdentityStrip, AccountLineItem, AccountLineItems, AccountNav, AccountOrderDetailPage, AccountOrderView, AccountOrdersPage, AccountShell, AccountSidebar, AccountSignedOutPrompt, AccountSubscriptionDetailPage, AccountSubscriptionsPage, Ad, AdProvider, AddOnSelector, AddressElement, AuthElement, AvailabilityBadge, BackLink, BillingPlanSelector, BookingCard, BookingList, BookingPage, BookingSummary, BookingsPage, BoxIcon24, BundleProductCard, BundleProductLayout, BundleSelector, Button, CardImage, CardShell, CardVariant, CartDrawer, CartDrawerProvider, CartPage, CartSummary, CartTemplate, CatalogueCollectionLayout, CataloguePage, CatalogueTemplate, CategoryFilter, CategoryGrid, ChatWidget, CheckIcon, CheckoutPage, CimplifyCheckout, CimplifyProvider, CimplifySignInButton, CimplifyUserButton, CollectionPage, CollectionTemplate, CompactCartLayout, CompactCatalogueLayout, CompactSearchLayout, CompactServiceCard, CompositeProductCard, CompositeProductLayout, CompositeSelector, ContextCard, ContinuityCard, CurrencySelector, CustomAttributesTable, CustomerInputFields, DashboardIcon, DashboardIcon20, DatePicker, DateSlotPicker, DealBanner, DealsPage, DefaultCartLayout, DefaultCatalogueLayout, DefaultCollectionLayout, DefaultProductLayout, DefaultSearchLayout, DeliveryEstimate, DeliveryTracker, DeliveryTruckIcon, DigitalProductCard, DigitalProductLayout, DiscountInput, ElementsProvider, EmptyState, ErrorState, FeaturedCollectionLayout, FilterTabs, FoodProductCard, FoodProductLayout, HappeningCard, IdentityIcon, IdentityOfframp, InventoryBadge, ItemsCard, LeaseServiceCard, LineItemDetails, LocationPicker, MediaGallery, MetadataStringList, MobileAccountShell, MobileBackButton, MobileMoreButton, MobileTabBar, NextDeliveryCard, OrderDetailHeader, OrderDetailMetaPipe, OrderDetailPage, OrderHistory, OrderHistoryPage, OrderList, OrderRow, OrderSummary, OrderTimeline, OrderTotals, OrdersIcon, OrdersIcon20, OvenIcon, PackageIcon, PaymentElement, Price, PriceRange, ProductCard, ProductCustomizer, ProductGrid, ProductImageGallery, ProductModel3D, ProductPage, ProductSheet, ProductTemplate, PropertiesTable, QuantitySelector, QuickAddButton, RecentlyViewed, RecommendationCarousel, RelatedProductsSection, RentalServiceCard, ResourcePicker, RetailProductCard, RichText, SaleBadge, ScheduleServiceCard, SearchInput, SearchPage, SearchTemplate, Section, SectionMore, ServiceProductLayout, SessionMessageBanner, SignOutIcon, Skeleton, SlotPicker, SoldOutOverlay, StaffPicker, StandardServiceCard, Status, StoreNav, StoreVideo, SubscriptionCard, SubscriptionList, SubscriptionRow, SubscriptionsIcon, SubscriptionsIcon20, TagPills, TimePicker, Toast, TwoColumnGrid, VariantSelector, VolumePricing, WelcomeCard, WholesaleProductCard, WholesaleProductLayout, WishlistButton, cn, prefetchProduct, prefetchProducts, roomToResource, sanitizeRichTextHtml, stripHtmlToText, toAccountLineItem, toAccountLineItems, toAccountOrderView, useActivityState, useAds, useAttributeDefinitions, useAvailableSlots, useBillingPlans, useBookings, useBootstrap, useBundles, useCart, useCartDrawer, useCategories, useChat, useCheckout, useCimplify, useCimplifyClient, useCimplifySession, useCollection, useCollections, useDeals, useDeliveryFee, useDeliveryOptions, useElements, useElementsReady, useFxRate, useLocations, useOptionalCimplify, useOrder, useOrders, useProduct, useProductAvailability, useProductDeals, useProductPrice, useProductSchedules, useProducts, useProductsOnSale, usePropertyFacets, useQuote, useRecommendations, useSearch, useServiceAvailability, useServices, useStoreCredit, useSubscription, useSubscriptions, useTaxonomies, useTaxonomy, useTaxonomyPath, useValidateDiscount, useVariantSelector };
|
|
@@ -894,6 +894,19 @@ interface PlacesService {
|
|
|
894
894
|
}): unknown;
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
+
interface MockDeliveryOption {
|
|
898
|
+
rate_id: string | null;
|
|
899
|
+
name: string;
|
|
900
|
+
description?: string;
|
|
901
|
+
fee: string;
|
|
902
|
+
currency: string;
|
|
903
|
+
free_delivery_applied: boolean;
|
|
904
|
+
free_over_amount?: string;
|
|
905
|
+
eta_min_minutes?: number;
|
|
906
|
+
eta_max_minutes?: number;
|
|
907
|
+
is_default: boolean;
|
|
908
|
+
details: Record<string, unknown>;
|
|
909
|
+
}
|
|
897
910
|
interface DeliveryService {
|
|
898
911
|
getFee(opts: {
|
|
899
912
|
lat?: number;
|
|
@@ -907,6 +920,14 @@ interface DeliveryService {
|
|
|
907
920
|
provider: string;
|
|
908
921
|
quotes: unknown[];
|
|
909
922
|
};
|
|
923
|
+
getOptions(opts: {
|
|
924
|
+
lat?: number;
|
|
925
|
+
lng?: number;
|
|
926
|
+
order_value?: string;
|
|
927
|
+
}): {
|
|
928
|
+
serviceable: boolean;
|
|
929
|
+
options: MockDeliveryOption[];
|
|
930
|
+
};
|
|
910
931
|
}
|
|
911
932
|
|
|
912
933
|
interface ActivityService {
|
|
@@ -894,6 +894,19 @@ interface PlacesService {
|
|
|
894
894
|
}): unknown;
|
|
895
895
|
}
|
|
896
896
|
|
|
897
|
+
interface MockDeliveryOption {
|
|
898
|
+
rate_id: string | null;
|
|
899
|
+
name: string;
|
|
900
|
+
description?: string;
|
|
901
|
+
fee: string;
|
|
902
|
+
currency: string;
|
|
903
|
+
free_delivery_applied: boolean;
|
|
904
|
+
free_over_amount?: string;
|
|
905
|
+
eta_min_minutes?: number;
|
|
906
|
+
eta_max_minutes?: number;
|
|
907
|
+
is_default: boolean;
|
|
908
|
+
details: Record<string, unknown>;
|
|
909
|
+
}
|
|
897
910
|
interface DeliveryService {
|
|
898
911
|
getFee(opts: {
|
|
899
912
|
lat?: number;
|
|
@@ -907,6 +920,14 @@ interface DeliveryService {
|
|
|
907
920
|
provider: string;
|
|
908
921
|
quotes: unknown[];
|
|
909
922
|
};
|
|
923
|
+
getOptions(opts: {
|
|
924
|
+
lat?: number;
|
|
925
|
+
lng?: number;
|
|
926
|
+
order_value?: string;
|
|
927
|
+
}): {
|
|
928
|
+
serviceable: boolean;
|
|
929
|
+
options: MockDeliveryOption[];
|
|
930
|
+
};
|
|
910
931
|
}
|
|
911
932
|
|
|
912
933
|
interface ActivityService {
|
package/dist/server.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ad as CimplifyClient } from './client-
|
|
2
|
-
export { K as CacheOptions,
|
|
1
|
+
import { ad as CimplifyClient } from './client-Cx3WLhMj.mjs';
|
|
2
|
+
export { K as CacheOptions, ct as ReadRequestOptions, cP as Result } from './client-Cx3WLhMj.mjs';
|
|
3
3
|
export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-BgFOFmQw.mjs';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
import './payment-B7qzWdaJ.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ad as CimplifyClient } from './client-
|
|
2
|
-
export { K as CacheOptions,
|
|
1
|
+
import { ad as CimplifyClient } from './client-BmDNlUMx.js';
|
|
2
|
+
export { K as CacheOptions, ct as ReadRequestOptions, cP as Result } from './client-BmDNlUMx.js';
|
|
3
3
|
export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-BgFOFmQw.js';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
import './payment-mVIJIJcq.js';
|