@cimplify/sdk 0.9.1 → 0.9.3
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/{ads-DeL3PGzf.d.mts → ads-MkGm5l1T.d.mts} +5 -2
- package/dist/{ads-DeL3PGzf.d.ts → ads-MkGm5l1T.d.ts} +5 -2
- package/dist/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/{client-vi6GsbUP.d.ts → client-BFqLTbxI.d.ts} +1 -1
- package/dist/{client-CmnVngkm.d.mts → client-D_3KMWI_.d.mts} +1 -1
- package/dist/{index-DWl8VbnB.d.mts → index-4Ke_FJa6.d.mts} +1 -1
- package/dist/{index-UNwoWldH.d.ts → index-ynsh8lBa.d.ts} +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +17 -3
- package/dist/index.mjs +17 -3
- package/dist/{payment-BNlyzm_Q.d.mts → payment-DsGQPORm.d.mts} +3 -1
- package/dist/{payment-BNlyzm_Q.d.ts → payment-DsGQPORm.d.ts} +3 -1
- package/dist/react.d.mts +6 -5
- package/dist/react.d.ts +6 -5
- package/dist/react.js +21 -6
- package/dist/react.mjs +21 -6
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Derive a human-readable display name for a variant.
|
|
3
3
|
*
|
|
4
|
-
* Priority:
|
|
4
|
+
* Priority: display_attributes → name (stripped of product prefix) → fallback.
|
|
5
|
+
*
|
|
6
|
+
* Pass `productName` to strip redundant product-name prefixes from variant names
|
|
7
|
+
* (e.g. "Fried rice-Small" → "Small" when productName is "Fried rice").
|
|
5
8
|
*/
|
|
6
9
|
declare function getVariantDisplayName(variant: {
|
|
7
10
|
name?: string;
|
|
@@ -9,7 +12,7 @@ declare function getVariantDisplayName(variant: {
|
|
|
9
12
|
value_name: string;
|
|
10
13
|
}>;
|
|
11
14
|
is_default?: boolean;
|
|
12
|
-
}): string;
|
|
15
|
+
}, productName?: string): string;
|
|
13
16
|
|
|
14
17
|
type AdSlot = "banner" | "sidebar" | "in-content" | "native" | "footer";
|
|
15
18
|
type AdPosition = "static" | "sticky" | "fixed";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Derive a human-readable display name for a variant.
|
|
3
3
|
*
|
|
4
|
-
* Priority:
|
|
4
|
+
* Priority: display_attributes → name (stripped of product prefix) → fallback.
|
|
5
|
+
*
|
|
6
|
+
* Pass `productName` to strip redundant product-name prefixes from variant names
|
|
7
|
+
* (e.g. "Fried rice-Small" → "Small" when productName is "Fried rice").
|
|
5
8
|
*/
|
|
6
9
|
declare function getVariantDisplayName(variant: {
|
|
7
10
|
name?: string;
|
|
@@ -9,7 +12,7 @@ declare function getVariantDisplayName(variant: {
|
|
|
9
12
|
value_name: string;
|
|
10
13
|
}>;
|
|
11
14
|
is_default?: boolean;
|
|
12
|
-
}): string;
|
|
15
|
+
}, productName?: string): string;
|
|
13
16
|
|
|
14
17
|
type AdSlot = "banner" | "sidebar" | "in-content" | "native" | "footer";
|
|
15
18
|
type AdPosition = "static" | "sticky" | "fixed";
|
package/dist/advanced.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-D_3KMWI_.mjs';
|
|
2
|
+
import './payment-DsGQPORm.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, t as CimplifyElement, s as CimplifyElements, v as ELEMENT_TYPES, E as EVENT_TYPES, z as ElementEventType, x as ElementOptions, y as ElementType, w as ElementsOptions, F as FetchQuoteInput, q as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, p as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, o as SchedulingService, S as SearchOptions, u as createElements, k as generateIdempotencyKey } from './client-BFqLTbxI.js';
|
|
2
|
+
import './payment-DsGQPORm.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Category, s as Product, H as AddOnWithOptions, d as Pagination, h as CimplifyError, t as ProductWithDetails, u as ProductVariant, w as VariantAxis, F as VariantAxisSelection, G as AddOn, Q as Collection, W as Bundle, _ as BundleWithDetails, a4 as Composite, a5 as CompositeWithDetails, a9 as ComponentSelectionInput, aa as CompositePriceResult, ap as ChosenPrice, aU as UICart, aF as Cart, aG as CartItem, aY as CartSummary, aW as AddToCartInput, aX as UpdateCartItemInput, at as DiscountDetails, M as Money, C as CurrencyCode, aE as LineConfiguration, b0 as AuthorizationType, b2 as PaymentMethod, b4 as InitializePaymentResult, b8 as SubmitAuthorizationInput, b6 as PaymentStatusResponse } from './payment-DsGQPORm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as Category, s as Product, H as AddOnWithOptions, d as Pagination, h as CimplifyError, t as ProductWithDetails, u as ProductVariant, w as VariantAxis, F as VariantAxisSelection, G as AddOn, Q as Collection, W as Bundle, _ as BundleWithDetails, a4 as Composite, a5 as CompositeWithDetails, a9 as ComponentSelectionInput, aa as CompositePriceResult, ap as ChosenPrice, aU as UICart, aF as Cart, aG as CartItem, aY as CartSummary, aW as AddToCartInput, aX as UpdateCartItemInput, at as DiscountDetails, M as Money, C as CurrencyCode, aE as LineConfiguration, b0 as AuthorizationType, b2 as PaymentMethod, b4 as InitializePaymentResult, b8 as SubmitAuthorizationInput, b6 as PaymentStatusResponse } from './payment-DsGQPORm.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Observability hooks for monitoring SDK behavior.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ap as ChosenPrice, C as CurrencyCode, am as TaxPathComponent, an as PricePathTaxInfo, M as Money, b7 as PaymentErrorDetails, b5 as PaymentResponse, b6 as PaymentStatusResponse } from './payment-DsGQPORm.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ap as ChosenPrice, C as CurrencyCode, am as TaxPathComponent, an as PricePathTaxInfo, M as Money, b7 as PaymentErrorDetails, b5 as PaymentResponse, b6 as PaymentStatusResponse } from './payment-DsGQPORm.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Price Types
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-
|
|
1
|
+
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-D_3KMWI_.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export {
|
|
5
|
-
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
6
|
-
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-
|
|
3
|
+
import { A as ApiError } from './payment-DsGQPORm.mjs';
|
|
4
|
+
export { G as AddOn, av as AddOnDetails, aR as AddOnGroupDetails, J as AddOnOption, aQ as AddOnOptionDetails, K as AddOnOptionPrice, H as AddOnWithOptions, aW as AddToCartInput, ak as AdjustmentType, ar as AppliedDiscount, b0 as AuthorizationType, aq as BenefitType, W as Bundle, $ as BundleComponentData, a0 as BundleComponentInfo, U as BundlePriceType, Y as BundleProduct, aA as BundleSelectionData, ay as BundleSelectionInput, az as BundleStoredSelection, X as BundleSummary, _ as BundleWithDetails, aF as Cart, aw as CartAddOn, ai as CartChannel, aG as CartItem, aT as CartItemDetails, ah as CartStatus, aY as CartSummary, aH as CartTotals, N as Category, O as CategorySummary, ap as ChosenPrice, h as CimplifyError, Q as Collection, T as CollectionProduct, R as CollectionSummary, a6 as ComponentGroup, a7 as ComponentGroupWithComponents, ab as ComponentPriceBreakdown, a9 as ComponentSelectionInput, a3 as ComponentSourceType, a4 as Composite, a8 as CompositeComponent, aC as CompositePriceBreakdown, aa as CompositePriceResult, a1 as CompositePricingMode, aD as CompositeSelectionData, a9 as CompositeSelectionInput, aB as CompositeStoredSelection, a5 as CompositeWithDetails, b as Currency, C as CurrencyCode, r as DepositType, q as DigitalProductType, as as DiscountBreakdown, at as DiscountDetails, aK as DisplayAddOn, aL as DisplayAddOnOption, aI as DisplayCart, aJ as DisplayCartItem, D as DisplayMode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a2 as GroupPricingBehavior, b4 as InitializePaymentResult, I as InventoryType, aE as LineConfiguration, ae as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b3 as Payment, b7 as PaymentErrorDetails, b2 as PaymentMethod, a$ as PaymentMethodType, b1 as PaymentProcessingState, a_ as PaymentProvider, b5 as PaymentResponse, aZ as PaymentStatus, b6 as PaymentStatusResponse, ad as Price, al as PriceAdjustment, ao as PriceDecisionPath, ac as PriceEntryType, an as PricePathTaxInfo, aj as PriceSource, s as Product, L as ProductAddOn, af as ProductAvailability, p as ProductRenderHint, ag as ProductTimeProfile, o as ProductType, u as ProductVariant, z as ProductVariantValue, t as ProductWithDetails, S as SalesChannel, au as SelectedAddOnOption, b8 as SubmitAuthorizationInput, am as TaxPathComponent, aU as UICart, aM as UICartBusiness, aO as UICartCustomer, aN as UICartLocation, aP as UICartPricing, aV as UICartResponse, aX as UpdateCartItemInput, w as VariantAxis, F as VariantAxisSelection, y as VariantAxisValue, x as VariantAxisWithValues, ax as VariantDetails, aS as VariantDetailsDTO, v as VariantDisplayAttribute, B as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-DsGQPORm.mjs';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-4Ke_FJa6.mjs';
|
|
6
|
+
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-MkGm5l1T.mjs';
|
|
7
7
|
|
|
8
8
|
/** Context sent with every request to scope operations to a specific location/branch */
|
|
9
9
|
interface FrontendContext {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-
|
|
1
|
+
export { ab as AUTHORIZATION_TYPE, ag as AUTH_MUTATION, a0 as AbortablePromise, cd as AddressData, cG as AddressInfo, aQ as AmountToPay, co as AuthResponse, A as AuthService, m as AuthStatus, cI as AuthenticatedCustomer, cK as AuthenticatedData, c1 as AvailabilityCheck, c2 as AvailabilityResult, bG as AvailableSlot, bJ as Booking, bI as BookingStatus, bK as BookingWithDetails, b8 as BufferTimes, bn as Business, bB as BusinessHours, bm as BusinessPreferences, B as BusinessService, bA as BusinessSettings, bl as BusinessType, by as BusinessWithLocations, a4 as CHECKOUT_MODE, ah as CHECKOUT_MUTATION, a7 as CHECKOUT_STEP, ad as CONTACT_TYPE, bR as CancelBookingInput, bS as CancelBookingResult, b2 as CancelOrderInput, ba as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aD as CatalogueResult, aE as CatalogueSnapshot, bC as CategoryInfo, bO as CheckSlotAvailabilityInput, bP as CheckSlotAvailabilityResult, cr as CheckoutAddressInfo, cO as CheckoutCartData, cN as CheckoutCartItem, ct as CheckoutCustomerInfo, N as CheckoutFormData, b0 as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, _ as CheckoutStatus, $ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a3 as ContactType, c9 as CreateAddressInput, cb as CreateMobileMoneyInput, c4 as Customer, c5 as CustomerAddress, bM as CustomerBooking, bL as CustomerBookingServiceItem, c7 as CustomerLinkPreferences, c6 as CustomerMobileMoney, b7 as CustomerServicePreferences, al as DEFAULT_COUNTRY, ak as DEFAULT_CURRENCY, ac as DEVICE_TYPE, bH as DayAvailability, bh as DepositResult, a2 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cF as ElementAppearance, cR as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cL as ElementsCheckoutData, cM as ElementsCheckoutResult, cJ as ElementsCustomerInfo, w as ElementsOptions, cf as EnrollAndLinkOrderInput, ci as EnrollAndLinkOrderResult, cc as EnrollmentData, ao as Err, aP as FeeBearerType, F as FetchQuoteInput, aN as FulfillmentLink, aM as FulfillmentStatus, aL as FulfillmentType, cv as FxQuote, cu as FxQuoteRequest, cw as FxRateResponse, q as FxService, bN as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cQ as IframeToParentMessage, I as InventoryService, c3 as InventorySummary, af as LINK_MUTATION, ae as LINK_QUERY, aR as LineItem, aI as LineType, c8 as LinkData, ch as LinkEnrollResult, L as LinkService, cj as LinkSession, cg as LinkStatusResult, r as LiteBootstrap, p as LiteService, bq as Location, bk as LocationAppointment, c0 as LocationStock, bo as LocationTaxBehavior, bp as LocationTaxOverrides, bt as LocationTimeProfile, bz as LocationWithDetails, M as MESSAGE_TYPES, aa as MOBILE_MONEY_PROVIDER, ce as MobileMoneyData, cs as MobileMoneyDetails, a1 as MobileMoneyProvider, W as NextAction, aj as ORDER_MUTATION, a5 as ORDER_TYPE, cD as ObservabilityHooks, an as Ok, aS as Order, aH as OrderChannel, a$ as OrderFilter, aO as OrderFulfillmentSummary, aV as OrderGroup, aZ as OrderGroupDetails, aW as OrderGroupPayment, aU as OrderGroupPaymentState, aY as OrderGroupPaymentSummary, aT as OrderHistory, aJ as OrderLineState, aK as OrderLineStatus, a_ as OrderPaymentEvent, O as OrderQueries, aX as OrderSplitDetail, aF as OrderStatus, cE as OrderType, n as OtpResult, a6 as PAYMENT_METHOD, ai as PAYMENT_MUTATION, a8 as PAYMENT_STATE, a9 as PICKUP_TIME_TYPE, cP as ParentToIframeMessage, cH as PaymentMethodInfo, aG as PaymentState, cq as PickupTime, cp as PickupTimeType, P as PriceQuote, bc as PricingOverrides, Z as ProcessAndResolveOptions, X as ProcessCheckoutOptions, Y as ProcessCheckoutResult, b_ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b3 as RefundOrderInput, b6 as ReminderMethod, b9 as ReminderSettings, cx as RequestContext, cA as RequestErrorEvent, cm as RequestOtpInput, cy as RequestStartEvent, cz as RequestSuccessEvent, bQ as RescheduleBookingInput, bT as RescheduleBookingResult, bf as ResourceAssignment, am as Result, cB as RetryEvent, cl as RevokeAllSessionsResult, ck as RevokeSessionResult, bv as Room, bd as SchedulingMetadata, bg as SchedulingResult, o as SchedulingService, S as SearchOptions, bD as Service, bU as ServiceAvailabilityParams, bV as ServiceAvailabilityResult, bw as ServiceCharge, bb as ServiceNotes, bi as ServiceScheduleRequest, b4 as ServiceStatus, cC as SessionChangeEvent, bE as Staff, be as StaffAssignment, b5 as StaffRole, bj as StaffScheduleItem, bY as Stock, bZ as StockLevel, bW as StockOwnershipType, bX as StockStatus, bx as StorefrontBootstrap, bu as Table, T as TableInfo, br as TimeRange, bs as TimeRanges, bF as TimeSlot, ca as UpdateAddressInput, b1 as UpdateOrderStatusInput, U as UpdateProfileInput, b$ as VariantStock, cn as VerifyOtpInput, aB as combine, aC as combineObject, c as createCimplifyClient, u as createElements, aq as err, av as flatMap, az as fromPromise, k as generateIdempotencyKey, aw as getOrElse, as as isErr, ar as isOk, au as mapError, at as mapResult, ap as ok, ay as toNullable, aA as tryCatch, ax as unwrap } from './client-BFqLTbxI.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
|
-
import { A as ApiError } from './payment-
|
|
4
|
-
export {
|
|
5
|
-
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
6
|
-
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-
|
|
3
|
+
import { A as ApiError } from './payment-DsGQPORm.js';
|
|
4
|
+
export { G as AddOn, av as AddOnDetails, aR as AddOnGroupDetails, J as AddOnOption, aQ as AddOnOptionDetails, K as AddOnOptionPrice, H as AddOnWithOptions, aW as AddToCartInput, ak as AdjustmentType, ar as AppliedDiscount, b0 as AuthorizationType, aq as BenefitType, W as Bundle, $ as BundleComponentData, a0 as BundleComponentInfo, U as BundlePriceType, Y as BundleProduct, aA as BundleSelectionData, ay as BundleSelectionInput, az as BundleStoredSelection, X as BundleSummary, _ as BundleWithDetails, aF as Cart, aw as CartAddOn, ai as CartChannel, aG as CartItem, aT as CartItemDetails, ah as CartStatus, aY as CartSummary, aH as CartTotals, N as Category, O as CategorySummary, ap as ChosenPrice, h as CimplifyError, Q as Collection, T as CollectionProduct, R as CollectionSummary, a6 as ComponentGroup, a7 as ComponentGroupWithComponents, ab as ComponentPriceBreakdown, a9 as ComponentSelectionInput, a3 as ComponentSourceType, a4 as Composite, a8 as CompositeComponent, aC as CompositePriceBreakdown, aa as CompositePriceResult, a1 as CompositePricingMode, aD as CompositeSelectionData, a9 as CompositeSelectionInput, aB as CompositeStoredSelection, a5 as CompositeWithDetails, b as Currency, C as CurrencyCode, r as DepositType, q as DigitalProductType, as as DiscountBreakdown, at as DiscountDetails, aK as DisplayAddOn, aL as DisplayAddOnOption, aI as DisplayCart, aJ as DisplayCartItem, D as DisplayMode, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a2 as GroupPricingBehavior, b4 as InitializePaymentResult, I as InventoryType, aE as LineConfiguration, ae as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b3 as Payment, b7 as PaymentErrorDetails, b2 as PaymentMethod, a$ as PaymentMethodType, b1 as PaymentProcessingState, a_ as PaymentProvider, b5 as PaymentResponse, aZ as PaymentStatus, b6 as PaymentStatusResponse, ad as Price, al as PriceAdjustment, ao as PriceDecisionPath, ac as PriceEntryType, an as PricePathTaxInfo, aj as PriceSource, s as Product, L as ProductAddOn, af as ProductAvailability, p as ProductRenderHint, ag as ProductTimeProfile, o as ProductType, u as ProductVariant, z as ProductVariantValue, t as ProductWithDetails, S as SalesChannel, au as SelectedAddOnOption, b8 as SubmitAuthorizationInput, am as TaxPathComponent, aU as UICart, aM as UICartBusiness, aO as UICartCustomer, aN as UICartLocation, aP as UICartPricing, aV as UICartResponse, aX as UpdateCartItemInput, w as VariantAxis, F as VariantAxisSelection, y as VariantAxisValue, x as VariantAxisWithValues, ax as VariantDetails, aS as VariantDetailsDTO, v as VariantDisplayAttribute, B as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, l as enrichError, k as getErrorHint, j as isCimplifyError, n as isRetryableError, i as isSupportedCurrency, m as money, a as moneyFromNumber } from './payment-DsGQPORm.js';
|
|
5
|
+
export { C as CURRENCY_SYMBOLS, B as FormatCompactOptions, F as FormatPriceOptions, M as MOBILE_MONEY_PROVIDERS, P as PriceInfo, A as ProductWithPrice, T as TaxComponent, z as TaxInfo, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-ynsh8lBa.js';
|
|
6
|
+
export { c as AdConfig, e as AdContextValue, d as AdCreative, a as AdPosition, A as AdSlot, b as AdTheme, g as getVariantDisplayName } from './ads-MkGm5l1T.js';
|
|
7
7
|
|
|
8
8
|
/** Context sent with every request to scope operations to a specific location/branch */
|
|
9
9
|
interface FrontendContext {
|
package/dist/index.js
CHANGED
|
@@ -4252,12 +4252,26 @@ function query(entity) {
|
|
|
4252
4252
|
}
|
|
4253
4253
|
|
|
4254
4254
|
// src/utils/variant.ts
|
|
4255
|
-
function
|
|
4256
|
-
if (
|
|
4255
|
+
function stripProductPrefix(variantName, productName) {
|
|
4256
|
+
if (!variantName || !productName) return variantName || productName;
|
|
4257
|
+
const lower = variantName.toLowerCase().trim();
|
|
4258
|
+
if (lower === "default" || lower === "standard") return productName;
|
|
4259
|
+
if (lower.endsWith("-default") || lower.endsWith("-standard")) return productName;
|
|
4260
|
+
if (variantName.startsWith(productName)) {
|
|
4261
|
+
const rest = variantName.slice(productName.length);
|
|
4262
|
+
const match = rest.match(/^\s*[-–—]\s*(.*)/);
|
|
4263
|
+
if (match && match[1].length > 0) return match[1];
|
|
4264
|
+
}
|
|
4265
|
+
return variantName;
|
|
4266
|
+
}
|
|
4267
|
+
function getVariantDisplayName(variant, productName) {
|
|
4257
4268
|
if (variant.display_attributes?.length) {
|
|
4258
4269
|
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
4259
4270
|
}
|
|
4260
|
-
|
|
4271
|
+
if (variant.name) {
|
|
4272
|
+
return productName ? stripProductPrefix(variant.name, productName) : variant.name;
|
|
4273
|
+
}
|
|
4274
|
+
return productName || (variant.is_default ? "Default" : "Option");
|
|
4261
4275
|
}
|
|
4262
4276
|
|
|
4263
4277
|
exports.AUTHORIZATION_TYPE = AUTHORIZATION_TYPE;
|
package/dist/index.mjs
CHANGED
|
@@ -4250,12 +4250,26 @@ function query(entity) {
|
|
|
4250
4250
|
}
|
|
4251
4251
|
|
|
4252
4252
|
// src/utils/variant.ts
|
|
4253
|
-
function
|
|
4254
|
-
if (
|
|
4253
|
+
function stripProductPrefix(variantName, productName) {
|
|
4254
|
+
if (!variantName || !productName) return variantName || productName;
|
|
4255
|
+
const lower = variantName.toLowerCase().trim();
|
|
4256
|
+
if (lower === "default" || lower === "standard") return productName;
|
|
4257
|
+
if (lower.endsWith("-default") || lower.endsWith("-standard")) return productName;
|
|
4258
|
+
if (variantName.startsWith(productName)) {
|
|
4259
|
+
const rest = variantName.slice(productName.length);
|
|
4260
|
+
const match = rest.match(/^\s*[-–—]\s*(.*)/);
|
|
4261
|
+
if (match && match[1].length > 0) return match[1];
|
|
4262
|
+
}
|
|
4263
|
+
return variantName;
|
|
4264
|
+
}
|
|
4265
|
+
function getVariantDisplayName(variant, productName) {
|
|
4255
4266
|
if (variant.display_attributes?.length) {
|
|
4256
4267
|
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
4257
4268
|
}
|
|
4258
|
-
|
|
4269
|
+
if (variant.name) {
|
|
4270
|
+
return productName ? stripProductPrefix(variant.name, productName) : variant.name;
|
|
4271
|
+
}
|
|
4272
|
+
return productName || (variant.is_default ? "Default" : "Option");
|
|
4259
4273
|
}
|
|
4260
4274
|
|
|
4261
4275
|
export { AUTHORIZATION_TYPE, AUTH_MUTATION, AuthService, BusinessService, CHECKOUT_MODE, CHECKOUT_MUTATION, CHECKOUT_STEP, CONTACT_TYPE, CURRENCY_SYMBOLS, CartOperations, CatalogueQueries, CheckoutService as CheckoutOperations, CheckoutService, CimplifyClient, CimplifyElement, CimplifyElements, CimplifyError, DEFAULT_COUNTRY, DEFAULT_CURRENCY, DEVICE_TYPE, ELEMENT_TYPES, ERROR_HINTS, EVENT_TYPES, ErrorCode, FxService, InventoryService, LINK_MUTATION, LINK_QUERY, LinkService, LiteService, MESSAGE_TYPES, MOBILE_MONEY_PROVIDER, MOBILE_MONEY_PROVIDERS, ORDER_MUTATION, ORDER_TYPE, OrderQueries, PAYMENT_METHOD, PAYMENT_MUTATION, PAYMENT_STATE, PICKUP_TIME_TYPE, QueryBuilder, SchedulingService, ZERO, categorizePaymentError, combine, combineObject, createCimplifyClient, createElements, currencyCode, detectMobileMoneyProvider, enrichError, err, flatMap, formatMoney, formatNumberCompact, formatPrice, formatPriceAdjustment, formatPriceCompact, formatPriceWithTax, formatProductPrice, fromPromise, generateIdempotencyKey, getBasePrice, getCurrencySymbol, getDiscountPercentage, getDisplayPrice, getErrorHint, getMarkupPercentage, getOrElse, getProductCurrency, getTaxAmount, getVariantDisplayName, hasTaxInfo, isCimplifyError, isErr, isOk, isOnSale, isPaymentStatusFailure, isPaymentStatusRequiresAction, isPaymentStatusSuccess, isRetryableError, isSupportedCurrency, isTaxInclusive, mapError, mapResult, money, moneyFromNumber, normalizePaymentResponse, normalizeStatusResponse, ok, parsePrice, query, toNullable, tryCatch, unwrap };
|
|
@@ -126,6 +126,7 @@ declare function isRetryableError(error: unknown): boolean;
|
|
|
126
126
|
|
|
127
127
|
type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
|
|
128
128
|
type ProductRenderHint = "food" | "physical" | "general";
|
|
129
|
+
type DisplayMode = "card" | "page";
|
|
129
130
|
type InventoryType = "one_to_one" | "composition" | "none";
|
|
130
131
|
type VariantStrategy = "fetch_all" | "use_axes";
|
|
131
132
|
type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code";
|
|
@@ -145,6 +146,7 @@ interface Product {
|
|
|
145
146
|
product_type: ProductType;
|
|
146
147
|
/** Server-derived UI hint for conditional rendering. */
|
|
147
148
|
render_hint?: ProductRenderHint;
|
|
149
|
+
display_mode?: DisplayMode;
|
|
148
150
|
inventory_type: InventoryType;
|
|
149
151
|
variant_strategy: VariantStrategy;
|
|
150
152
|
is_active: boolean;
|
|
@@ -1131,4 +1133,4 @@ interface SubmitAuthorizationInput {
|
|
|
1131
1133
|
value: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
|
|
1134
|
-
export { type
|
|
1136
|
+
export { type BundleComponentData as $, type ApiError as A, type VariantLocationAvailability as B, type CurrencyCode as C, type DisplayMode as D, ErrorCode as E, type VariantAxisSelection as F, type AddOn as G, type AddOnWithOptions as H, type InventoryType as I, type AddOnOption as J, type AddOnOptionPrice as K, type ProductAddOn as L, type Money as M, type Category as N, type CategorySummary as O, type PaginationParams as P, type Collection as Q, type CollectionSummary as R, type SalesChannel as S, type CollectionProduct as T, type BundlePriceType as U, type VariantStrategy as V, type Bundle as W, type BundleSummary as X, type BundleProduct as Y, ZERO as Z, type BundleWithDetails as _, moneyFromNumber as a, type PaymentMethodType as a$, type BundleComponentInfo as a0, type CompositePricingMode as a1, type GroupPricingBehavior as a2, type ComponentSourceType as a3, type Composite as a4, type CompositeWithDetails as a5, type ComponentGroup as a6, type ComponentGroupWithComponents as a7, type CompositeComponent as a8, type ComponentSelectionInput as a9, type BundleSelectionData as aA, type CompositeStoredSelection as aB, type CompositePriceBreakdown as aC, type CompositeSelectionData as aD, type LineConfiguration as aE, type Cart as aF, type CartItem as aG, type CartTotals as aH, type DisplayCart as aI, type DisplayCartItem as aJ, type DisplayAddOn as aK, type DisplayAddOnOption as aL, type UICartBusiness as aM, type UICartLocation as aN, type UICartCustomer as aO, type UICartPricing as aP, type AddOnOptionDetails as aQ, type AddOnGroupDetails as aR, type VariantDetailsDTO as aS, type CartItemDetails as aT, type UICart as aU, type UICartResponse as aV, type AddToCartInput as aW, type UpdateCartItemInput as aX, type CartSummary as aY, type PaymentStatus as aZ, type PaymentProvider as a_, type CompositePriceResult as aa, type ComponentPriceBreakdown as ab, type PriceEntryType as ac, type Price as ad, type LocationProductPrice as ae, type ProductAvailability as af, type ProductTimeProfile as ag, type CartStatus as ah, type CartChannel as ai, type PriceSource as aj, type AdjustmentType as ak, type PriceAdjustment as al, type TaxPathComponent as am, type PricePathTaxInfo as an, type PriceDecisionPath as ao, type ChosenPrice as ap, type BenefitType as aq, type AppliedDiscount as ar, type DiscountBreakdown as as, type DiscountDetails as at, type SelectedAddOnOption as au, type AddOnDetails as av, type CartAddOn as aw, type VariantDetails as ax, type BundleSelectionInput as ay, type BundleStoredSelection as az, type Currency as b, type AuthorizationType as b0, type PaymentProcessingState as b1, type PaymentMethod as b2, type Payment as b3, type InitializePaymentResult as b4, type PaymentResponse as b5, type PaymentStatusResponse as b6, type PaymentErrorDetails as b7, type SubmitAuthorizationInput as b8, currencyCode as c, type Pagination as d, type ErrorCodeType as e, type ErrorHint as f, ERROR_HINTS as g, CimplifyError as h, isSupportedCurrency as i, isCimplifyError as j, getErrorHint as k, enrichError as l, money as m, isRetryableError as n, type ProductType as o, type ProductRenderHint as p, type DigitalProductType as q, type DepositType as r, type Product as s, type ProductWithDetails as t, type ProductVariant as u, type VariantDisplayAttribute as v, type VariantAxis as w, type VariantAxisWithValues as x, type VariantAxisValue as y, type ProductVariantValue as z };
|
|
@@ -126,6 +126,7 @@ declare function isRetryableError(error: unknown): boolean;
|
|
|
126
126
|
|
|
127
127
|
type ProductType = "product" | "service" | "digital" | "bundle" | "composite";
|
|
128
128
|
type ProductRenderHint = "food" | "physical" | "general";
|
|
129
|
+
type DisplayMode = "card" | "page";
|
|
129
130
|
type InventoryType = "one_to_one" | "composition" | "none";
|
|
130
131
|
type VariantStrategy = "fetch_all" | "use_axes";
|
|
131
132
|
type DigitalProductType = "download" | "license_key" | "ticket" | "access_grant" | "redemption_code";
|
|
@@ -145,6 +146,7 @@ interface Product {
|
|
|
145
146
|
product_type: ProductType;
|
|
146
147
|
/** Server-derived UI hint for conditional rendering. */
|
|
147
148
|
render_hint?: ProductRenderHint;
|
|
149
|
+
display_mode?: DisplayMode;
|
|
148
150
|
inventory_type: InventoryType;
|
|
149
151
|
variant_strategy: VariantStrategy;
|
|
150
152
|
is_active: boolean;
|
|
@@ -1131,4 +1133,4 @@ interface SubmitAuthorizationInput {
|
|
|
1131
1133
|
value: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
|
|
1134
|
-
export { type
|
|
1136
|
+
export { type BundleComponentData as $, type ApiError as A, type VariantLocationAvailability as B, type CurrencyCode as C, type DisplayMode as D, ErrorCode as E, type VariantAxisSelection as F, type AddOn as G, type AddOnWithOptions as H, type InventoryType as I, type AddOnOption as J, type AddOnOptionPrice as K, type ProductAddOn as L, type Money as M, type Category as N, type CategorySummary as O, type PaginationParams as P, type Collection as Q, type CollectionSummary as R, type SalesChannel as S, type CollectionProduct as T, type BundlePriceType as U, type VariantStrategy as V, type Bundle as W, type BundleSummary as X, type BundleProduct as Y, ZERO as Z, type BundleWithDetails as _, moneyFromNumber as a, type PaymentMethodType as a$, type BundleComponentInfo as a0, type CompositePricingMode as a1, type GroupPricingBehavior as a2, type ComponentSourceType as a3, type Composite as a4, type CompositeWithDetails as a5, type ComponentGroup as a6, type ComponentGroupWithComponents as a7, type CompositeComponent as a8, type ComponentSelectionInput as a9, type BundleSelectionData as aA, type CompositeStoredSelection as aB, type CompositePriceBreakdown as aC, type CompositeSelectionData as aD, type LineConfiguration as aE, type Cart as aF, type CartItem as aG, type CartTotals as aH, type DisplayCart as aI, type DisplayCartItem as aJ, type DisplayAddOn as aK, type DisplayAddOnOption as aL, type UICartBusiness as aM, type UICartLocation as aN, type UICartCustomer as aO, type UICartPricing as aP, type AddOnOptionDetails as aQ, type AddOnGroupDetails as aR, type VariantDetailsDTO as aS, type CartItemDetails as aT, type UICart as aU, type UICartResponse as aV, type AddToCartInput as aW, type UpdateCartItemInput as aX, type CartSummary as aY, type PaymentStatus as aZ, type PaymentProvider as a_, type CompositePriceResult as aa, type ComponentPriceBreakdown as ab, type PriceEntryType as ac, type Price as ad, type LocationProductPrice as ae, type ProductAvailability as af, type ProductTimeProfile as ag, type CartStatus as ah, type CartChannel as ai, type PriceSource as aj, type AdjustmentType as ak, type PriceAdjustment as al, type TaxPathComponent as am, type PricePathTaxInfo as an, type PriceDecisionPath as ao, type ChosenPrice as ap, type BenefitType as aq, type AppliedDiscount as ar, type DiscountBreakdown as as, type DiscountDetails as at, type SelectedAddOnOption as au, type AddOnDetails as av, type CartAddOn as aw, type VariantDetails as ax, type BundleSelectionInput as ay, type BundleStoredSelection as az, type Currency as b, type AuthorizationType as b0, type PaymentProcessingState as b1, type PaymentMethod as b2, type Payment as b3, type InitializePaymentResult as b4, type PaymentResponse as b5, type PaymentStatusResponse as b6, type PaymentErrorDetails as b7, type SubmitAuthorizationInput as b8, currencyCode as c, type Pagination as d, type ErrorCodeType as e, type ErrorHint as f, ERROR_HINTS as g, CimplifyError as h, isSupportedCurrency as i, isCimplifyError as j, getErrorHint as k, enrichError as l, money as m, isRetryableError as n, type ProductType as o, type ProductRenderHint as p, type DigitalProductType as q, type DepositType as r, type Product as s, type ProductWithDetails as t, type ProductVariant as u, type VariantDisplayAttribute as v, type VariantAxis as w, type VariantAxisWithValues as x, type VariantAxisValue as y, type ProductVariantValue as z };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-
|
|
3
|
-
export { c as AdConfig, g as getVariantDisplayName } from './ads-
|
|
4
|
-
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-
|
|
5
|
-
import {
|
|
2
|
+
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-MkGm5l1T.mjs';
|
|
3
|
+
export { c as AdConfig, g as getVariantDisplayName } from './ads-MkGm5l1T.mjs';
|
|
4
|
+
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-D_3KMWI_.mjs';
|
|
5
|
+
import { s as Product, d as Pagination, h as CimplifyError, t as ProductWithDetails, N as Category, ay as BundleSelectionInput, a9 as ComponentSelectionInput, Q as Collection, _ as BundleWithDetails, a5 as CompositeWithDetails, aa as CompositePriceResult, C as CurrencyCode, u as ProductVariant, x as VariantAxisWithValues, M as Money, H as AddOnWithOptions } from './payment-DsGQPORm.mjs';
|
|
6
6
|
|
|
7
7
|
interface UserIdentity {
|
|
8
8
|
uid: string;
|
|
@@ -424,6 +424,7 @@ interface VariantSelectorProps {
|
|
|
424
424
|
basePrice?: Money;
|
|
425
425
|
selectedVariantId?: string;
|
|
426
426
|
onVariantChange: (variantId: string | undefined, variant: ProductVariant | undefined) => void;
|
|
427
|
+
productName?: string;
|
|
427
428
|
className?: string;
|
|
428
429
|
}
|
|
429
430
|
/**
|
|
@@ -432,7 +433,7 @@ interface VariantSelectorProps {
|
|
|
432
433
|
* Axis mode: one row of chips per axis (e.g. Size, Temperature).
|
|
433
434
|
* Direct mode: a vertical list showing variant name + full effective price.
|
|
434
435
|
*/
|
|
435
|
-
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, className, }: VariantSelectorProps): React.ReactElement | null;
|
|
436
|
+
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, productName, className, }: VariantSelectorProps): React.ReactElement | null;
|
|
436
437
|
|
|
437
438
|
interface AddOnSelectorProps {
|
|
438
439
|
addOns: AddOnWithOptions[];
|
package/dist/react.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-
|
|
3
|
-
export { c as AdConfig, g as getVariantDisplayName } from './ads-
|
|
4
|
-
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-
|
|
5
|
-
import {
|
|
2
|
+
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-MkGm5l1T.js';
|
|
3
|
+
export { c as AdConfig, g as getVariantDisplayName } from './ads-MkGm5l1T.js';
|
|
4
|
+
import { C as CimplifyClient, Y as ProcessCheckoutResult, _ as CheckoutStatus, $ as CheckoutStatusContext, bq as Location, bn as Business, aS as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, w as ElementsOptions, cK as AuthenticatedData, cG as AddressInfo, cH as PaymentMethodInfo, s as CimplifyElements, cM as ElementsCheckoutResult, X as ProcessCheckoutOptions } from './client-BFqLTbxI.js';
|
|
5
|
+
import { s as Product, d as Pagination, h as CimplifyError, t as ProductWithDetails, N as Category, ay as BundleSelectionInput, a9 as ComponentSelectionInput, Q as Collection, _ as BundleWithDetails, a5 as CompositeWithDetails, aa as CompositePriceResult, C as CurrencyCode, u as ProductVariant, x as VariantAxisWithValues, M as Money, H as AddOnWithOptions } from './payment-DsGQPORm.js';
|
|
6
6
|
|
|
7
7
|
interface UserIdentity {
|
|
8
8
|
uid: string;
|
|
@@ -424,6 +424,7 @@ interface VariantSelectorProps {
|
|
|
424
424
|
basePrice?: Money;
|
|
425
425
|
selectedVariantId?: string;
|
|
426
426
|
onVariantChange: (variantId: string | undefined, variant: ProductVariant | undefined) => void;
|
|
427
|
+
productName?: string;
|
|
427
428
|
className?: string;
|
|
428
429
|
}
|
|
429
430
|
/**
|
|
@@ -432,7 +433,7 @@ interface VariantSelectorProps {
|
|
|
432
433
|
* Axis mode: one row of chips per axis (e.g. Size, Temperature).
|
|
433
434
|
* Direct mode: a vertical list showing variant name + full effective price.
|
|
434
435
|
*/
|
|
435
|
-
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, className, }: VariantSelectorProps): React.ReactElement | null;
|
|
436
|
+
declare function VariantSelector({ variants, variantAxes, basePrice, selectedVariantId, onVariantChange, productName, className, }: VariantSelectorProps): React.ReactElement | null;
|
|
436
437
|
|
|
437
438
|
interface AddOnSelectorProps {
|
|
438
439
|
addOns: AddOnWithOptions[];
|
package/dist/react.js
CHANGED
|
@@ -6799,12 +6799,26 @@ function QuantitySelector({
|
|
|
6799
6799
|
}
|
|
6800
6800
|
|
|
6801
6801
|
// src/utils/variant.ts
|
|
6802
|
-
function
|
|
6803
|
-
if (
|
|
6802
|
+
function stripProductPrefix(variantName, productName) {
|
|
6803
|
+
if (!variantName || !productName) return variantName || productName;
|
|
6804
|
+
const lower = variantName.toLowerCase().trim();
|
|
6805
|
+
if (lower === "default" || lower === "standard") return productName;
|
|
6806
|
+
if (lower.endsWith("-default") || lower.endsWith("-standard")) return productName;
|
|
6807
|
+
if (variantName.startsWith(productName)) {
|
|
6808
|
+
const rest = variantName.slice(productName.length);
|
|
6809
|
+
const match = rest.match(/^\s*[-–—]\s*(.*)/);
|
|
6810
|
+
if (match && match[1].length > 0) return match[1];
|
|
6811
|
+
}
|
|
6812
|
+
return variantName;
|
|
6813
|
+
}
|
|
6814
|
+
function getVariantDisplayName(variant, productName) {
|
|
6804
6815
|
if (variant.display_attributes?.length) {
|
|
6805
6816
|
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
6806
6817
|
}
|
|
6807
|
-
|
|
6818
|
+
if (variant.name) {
|
|
6819
|
+
return productName ? stripProductPrefix(variant.name, productName) : variant.name;
|
|
6820
|
+
}
|
|
6821
|
+
return productName || (variant.is_default ? "Default" : "Option");
|
|
6808
6822
|
}
|
|
6809
6823
|
function VariantSelector({
|
|
6810
6824
|
variants,
|
|
@@ -6812,6 +6826,7 @@ function VariantSelector({
|
|
|
6812
6826
|
basePrice,
|
|
6813
6827
|
selectedVariantId,
|
|
6814
6828
|
onVariantChange,
|
|
6829
|
+
productName,
|
|
6815
6830
|
className
|
|
6816
6831
|
}) {
|
|
6817
6832
|
const [axisSelections, setAxisSelections] = React3.useState({});
|
|
@@ -6891,7 +6906,7 @@ function VariantSelector({
|
|
|
6891
6906
|
"data-cimplify-variant-option": true,
|
|
6892
6907
|
"data-selected": isSelected || void 0,
|
|
6893
6908
|
children: [
|
|
6894
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-variant-name": true, children: getVariantDisplayName(variant) }),
|
|
6909
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-variant-name": true, children: getVariantDisplayName(variant, productName) }),
|
|
6895
6910
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-pricing": true, children: [
|
|
6896
6911
|
adjustment !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-adjustment": true, children: [
|
|
6897
6912
|
adjustment > 0 ? "+" : "",
|
|
@@ -7284,7 +7299,7 @@ function BundleComponentCard({
|
|
|
7284
7299
|
"data-cimplify-bundle-variant-option": true,
|
|
7285
7300
|
"data-selected": isSelected || void 0,
|
|
7286
7301
|
children: [
|
|
7287
|
-
getVariantDisplayName(variant),
|
|
7302
|
+
getVariantDisplayName(variant, product.name),
|
|
7288
7303
|
adjustment !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-bundle-variant-adjustment": true, children: [
|
|
7289
7304
|
adjustment > 0 ? "+" : "",
|
|
7290
7305
|
/* @__PURE__ */ jsxRuntime.jsx(Price, { amount: variant.price_adjustment })
|
|
@@ -7618,7 +7633,7 @@ function CartSummary({
|
|
|
7618
7633
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item": true, children: [
|
|
7619
7634
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-item-info": true, children: [
|
|
7620
7635
|
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-name": true, children: item.product.name }),
|
|
7621
|
-
item.variant && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-variant": true, children: getVariantDisplayName(item.variant) }),
|
|
7636
|
+
item.variant && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-cart-item-variant": true, children: getVariantDisplayName(item.variant, item.product.name) }),
|
|
7622
7637
|
item.addOnOptions && item.addOnOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-cart-item-addons": true, children: [
|
|
7623
7638
|
"+ ",
|
|
7624
7639
|
item.addOnOptions.map((opt) => opt.name).join(", ")
|
package/dist/react.mjs
CHANGED
|
@@ -6793,12 +6793,26 @@ function QuantitySelector({
|
|
|
6793
6793
|
}
|
|
6794
6794
|
|
|
6795
6795
|
// src/utils/variant.ts
|
|
6796
|
-
function
|
|
6797
|
-
if (
|
|
6796
|
+
function stripProductPrefix(variantName, productName) {
|
|
6797
|
+
if (!variantName || !productName) return variantName || productName;
|
|
6798
|
+
const lower = variantName.toLowerCase().trim();
|
|
6799
|
+
if (lower === "default" || lower === "standard") return productName;
|
|
6800
|
+
if (lower.endsWith("-default") || lower.endsWith("-standard")) return productName;
|
|
6801
|
+
if (variantName.startsWith(productName)) {
|
|
6802
|
+
const rest = variantName.slice(productName.length);
|
|
6803
|
+
const match = rest.match(/^\s*[-–—]\s*(.*)/);
|
|
6804
|
+
if (match && match[1].length > 0) return match[1];
|
|
6805
|
+
}
|
|
6806
|
+
return variantName;
|
|
6807
|
+
}
|
|
6808
|
+
function getVariantDisplayName(variant, productName) {
|
|
6798
6809
|
if (variant.display_attributes?.length) {
|
|
6799
6810
|
return variant.display_attributes.map((a) => a.value_name).join(" / ");
|
|
6800
6811
|
}
|
|
6801
|
-
|
|
6812
|
+
if (variant.name) {
|
|
6813
|
+
return productName ? stripProductPrefix(variant.name, productName) : variant.name;
|
|
6814
|
+
}
|
|
6815
|
+
return productName || (variant.is_default ? "Default" : "Option");
|
|
6802
6816
|
}
|
|
6803
6817
|
function VariantSelector({
|
|
6804
6818
|
variants,
|
|
@@ -6806,6 +6820,7 @@ function VariantSelector({
|
|
|
6806
6820
|
basePrice,
|
|
6807
6821
|
selectedVariantId,
|
|
6808
6822
|
onVariantChange,
|
|
6823
|
+
productName,
|
|
6809
6824
|
className
|
|
6810
6825
|
}) {
|
|
6811
6826
|
const [axisSelections, setAxisSelections] = useState({});
|
|
@@ -6885,7 +6900,7 @@ function VariantSelector({
|
|
|
6885
6900
|
"data-cimplify-variant-option": true,
|
|
6886
6901
|
"data-selected": isSelected || void 0,
|
|
6887
6902
|
children: [
|
|
6888
|
-
/* @__PURE__ */ jsx("span", { "data-cimplify-variant-name": true, children: getVariantDisplayName(variant) }),
|
|
6903
|
+
/* @__PURE__ */ jsx("span", { "data-cimplify-variant-name": true, children: getVariantDisplayName(variant, productName) }),
|
|
6889
6904
|
/* @__PURE__ */ jsxs("span", { "data-cimplify-variant-pricing": true, children: [
|
|
6890
6905
|
adjustment !== 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-variant-adjustment": true, children: [
|
|
6891
6906
|
adjustment > 0 ? "+" : "",
|
|
@@ -7278,7 +7293,7 @@ function BundleComponentCard({
|
|
|
7278
7293
|
"data-cimplify-bundle-variant-option": true,
|
|
7279
7294
|
"data-selected": isSelected || void 0,
|
|
7280
7295
|
children: [
|
|
7281
|
-
getVariantDisplayName(variant),
|
|
7296
|
+
getVariantDisplayName(variant, product.name),
|
|
7282
7297
|
adjustment !== 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-bundle-variant-adjustment": true, children: [
|
|
7283
7298
|
adjustment > 0 ? "+" : "",
|
|
7284
7299
|
/* @__PURE__ */ jsx(Price, { amount: variant.price_adjustment })
|
|
@@ -7612,7 +7627,7 @@ function CartSummary({
|
|
|
7612
7627
|
return /* @__PURE__ */ jsxs("div", { "data-cimplify-cart-item": true, children: [
|
|
7613
7628
|
/* @__PURE__ */ jsxs("div", { "data-cimplify-cart-item-info": true, children: [
|
|
7614
7629
|
/* @__PURE__ */ jsx("span", { "data-cimplify-cart-item-name": true, children: item.product.name }),
|
|
7615
|
-
item.variant && /* @__PURE__ */ jsx("span", { "data-cimplify-cart-item-variant": true, children: getVariantDisplayName(item.variant) }),
|
|
7630
|
+
item.variant && /* @__PURE__ */ jsx("span", { "data-cimplify-cart-item-variant": true, children: getVariantDisplayName(item.variant, item.product.name) }),
|
|
7616
7631
|
item.addOnOptions && item.addOnOptions.length > 0 && /* @__PURE__ */ jsxs("span", { "data-cimplify-cart-item-addons": true, children: [
|
|
7617
7632
|
"+ ",
|
|
7618
7633
|
item.addOnOptions.map((opt) => opt.name).join(", ")
|
package/dist/utils.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-4Ke_FJa6.mjs';
|
|
2
|
+
import './payment-DsGQPORm.mjs';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { C as CURRENCY_SYMBOLS, M as MOBILE_MONEY_PROVIDERS, s as categorizePaymentError, y as detectMobileMoneyProvider, c as formatMoney, d as formatNumberCompact, f as formatPrice, a as formatPriceAdjustment, b as formatPriceCompact, j as formatPriceWithTax, e as formatProductPrice, m as getBasePrice, k as getCurrencySymbol, o as getDiscountPercentage, l as getDisplayPrice, q as getMarkupPercentage, r as getProductCurrency, g as getTaxAmount, h as hasTaxInfo, n as isOnSale, v as isPaymentStatusFailure, w as isPaymentStatusRequiresAction, x as isPaymentStatusSuccess, i as isTaxInclusive, t as normalizePaymentResponse, u as normalizeStatusResponse, p as parsePrice } from './index-ynsh8lBa.js';
|
|
2
|
+
import './payment-DsGQPORm.js';
|