@cimplify/sdk 0.8.12 → 0.8.14

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.
@@ -1,4 +1,4 @@
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-D9Nx1zXS.mjs';
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-BYpHOPXm.mjs';
2
2
  import './payment-BKjX2fAs.mjs';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
@@ -1,4 +1,4 @@
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-B10DhX-A.js';
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-9gpFQIeG.js';
2
2
  import './payment-BKjX2fAs.js';
3
3
 
4
4
  type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
package/dist/advanced.js CHANGED
@@ -2901,7 +2901,8 @@ var CimplifyElement = class {
2901
2901
  appearance: this.parent.getAppearance(),
2902
2902
  orderTypes: this.options.orderTypes,
2903
2903
  defaultOrderType: this.options.defaultOrderType,
2904
- renderSubmitButton: true
2904
+ renderSubmitButton: true,
2905
+ submitLabel: this.options.submitLabel
2905
2906
  });
2906
2907
  const token = this.parent.getAccessToken();
2907
2908
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
package/dist/advanced.mjs CHANGED
@@ -2899,7 +2899,8 @@ var CimplifyElement = class {
2899
2899
  appearance: this.parent.getAppearance(),
2900
2900
  orderTypes: this.options.orderTypes,
2901
2901
  defaultOrderType: this.options.defaultOrderType,
2902
- renderSubmitButton: true
2902
+ renderSubmitButton: true,
2903
+ submitLabel: this.options.submitLabel
2903
2904
  });
2904
2905
  const token = this.parent.getAccessToken();
2905
2906
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
@@ -1953,6 +1953,7 @@ interface ElementOptions {
1953
1953
  currency?: CurrencyCode;
1954
1954
  orderTypes?: OrderType[];
1955
1955
  defaultOrderType?: OrderType;
1956
+ submitLabel?: string;
1956
1957
  }
1957
1958
  interface AddressInfo {
1958
1959
  id?: string;
@@ -2051,6 +2052,7 @@ type ParentToIframeMessage = {
2051
2052
  orderTypes?: OrderType[];
2052
2053
  defaultOrderType?: OrderType;
2053
2054
  renderSubmitButton?: boolean;
2055
+ submitLabel?: string;
2054
2056
  } | {
2055
2057
  type: typeof MESSAGE_TYPES.SET_TOKEN;
2056
2058
  token: string;
@@ -1953,6 +1953,7 @@ interface ElementOptions {
1953
1953
  currency?: CurrencyCode;
1954
1954
  orderTypes?: OrderType[];
1955
1955
  defaultOrderType?: OrderType;
1956
+ submitLabel?: string;
1956
1957
  }
1957
1958
  interface AddressInfo {
1958
1959
  id?: string;
@@ -2051,6 +2052,7 @@ type ParentToIframeMessage = {
2051
2052
  orderTypes?: OrderType[];
2052
2053
  defaultOrderType?: OrderType;
2053
2054
  renderSubmitButton?: boolean;
2055
+ submitLabel?: string;
2054
2056
  } | {
2055
2057
  type: typeof MESSAGE_TYPES.SET_TOKEN;
2056
2058
  token: string;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
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-D9Nx1zXS.mjs';
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-BYpHOPXm.mjs';
2
2
  export { QueryBuilder, query } from './advanced.mjs';
3
3
  import { A as ApiError } from './payment-BKjX2fAs.mjs';
4
4
  export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z 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-BKjX2fAs.mjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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-B10DhX-A.js';
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-9gpFQIeG.js';
2
2
  export { QueryBuilder, query } from './advanced.js';
3
3
  import { A as ApiError } from './payment-BKjX2fAs.js';
4
4
  export { F as AddOn, au as AddOnDetails, aQ as AddOnGroupDetails, H as AddOnOption, aP as AddOnOptionDetails, J as AddOnOptionPrice, G as AddOnWithOptions, aV as AddToCartInput, aj as AdjustmentType, aq as AppliedDiscount, a$ as AuthorizationType, ap as BenefitType, U as Bundle, _ as BundleComponentData, $ as BundleComponentInfo, T as BundlePriceType, X as BundleProduct, az as BundleSelectionData, ax as BundleSelectionInput, ay as BundleStoredSelection, W as BundleSummary, Y as BundleWithDetails, aE as Cart, av as CartAddOn, ah as CartChannel, aF as CartItem, aS as CartItemDetails, ag as CartStatus, aX as CartSummary, aG as CartTotals, L as Category, N as CategorySummary, ao as ChosenPrice, h as CimplifyError, O as Collection, R as CollectionProduct, Q as CollectionSummary, a5 as ComponentGroup, a6 as ComponentGroupWithComponents, aa as ComponentPriceBreakdown, a8 as ComponentSelectionInput, a2 as ComponentSourceType, a3 as Composite, a7 as CompositeComponent, aB as CompositePriceBreakdown, a9 as CompositePriceResult, a0 as CompositePricingMode, aC as CompositeSelectionData, a8 as CompositeSelectionInput, aA as CompositeStoredSelection, a4 as CompositeWithDetails, b as Currency, C as CurrencyCode, q as DepositType, D as DigitalProductType, ar as DiscountBreakdown, as as DiscountDetails, aJ as DisplayAddOn, aK as DisplayAddOnOption, aH as DisplayCart, aI as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a1 as GroupPricingBehavior, b3 as InitializePaymentResult, I as InventoryType, aD as LineConfiguration, ad as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b2 as Payment, b6 as PaymentErrorDetails, b1 as PaymentMethod, a_ as PaymentMethodType, b0 as PaymentProcessingState, aZ as PaymentProvider, b4 as PaymentResponse, aY as PaymentStatus, b5 as PaymentStatusResponse, ac as Price, ak as PriceAdjustment, an as PriceDecisionPath, ab as PriceEntryType, am as PricePathTaxInfo, ai as PriceSource, r as Product, K as ProductAddOn, ae as ProductAvailability, p as ProductRenderHint, af as ProductTimeProfile, o as ProductType, t as ProductVariant, y as ProductVariantValue, s as ProductWithDetails, S as SalesChannel, at as SelectedAddOnOption, b7 as SubmitAuthorizationInput, al as TaxPathComponent, aT as UICart, aL as UICartBusiness, aN as UICartCustomer, aM as UICartLocation, aO as UICartPricing, aU as UICartResponse, aW as UpdateCartItemInput, v as VariantAxis, B as VariantAxisSelection, x as VariantAxisValue, w as VariantAxisWithValues, aw as VariantDetails, aR as VariantDetailsDTO, u as VariantDisplayAttribute, z 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-BKjX2fAs.js';
package/dist/index.js CHANGED
@@ -3494,7 +3494,8 @@ var CimplifyElement = class {
3494
3494
  appearance: this.parent.getAppearance(),
3495
3495
  orderTypes: this.options.orderTypes,
3496
3496
  defaultOrderType: this.options.defaultOrderType,
3497
- renderSubmitButton: true
3497
+ renderSubmitButton: true,
3498
+ submitLabel: this.options.submitLabel
3498
3499
  });
3499
3500
  const token = this.parent.getAccessToken();
3500
3501
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
package/dist/index.mjs CHANGED
@@ -3492,7 +3492,8 @@ var CimplifyElement = class {
3492
3492
  appearance: this.parent.getAppearance(),
3493
3493
  orderTypes: this.options.orderTypes,
3494
3494
  defaultOrderType: this.options.defaultOrderType,
3495
- renderSubmitButton: true
3495
+ renderSubmitButton: true,
3496
+ submitLabel: this.options.submitLabel
3496
3497
  });
3497
3498
  const token = this.parent.getAccessToken();
3498
3499
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
package/dist/react.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
3
3
  export { c as AdConfig } from './ads-t3FBTU8p.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-D9Nx1zXS.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-BYpHOPXm.mjs';
5
5
  import { r as Product, d as Pagination, h as CimplifyError, s as ProductWithDetails, L as Category, ax as BundleSelectionInput, a8 as ComponentSelectionInput, O as Collection, Y as BundleWithDetails, a4 as CompositeWithDetails, a9 as CompositePriceResult, C as CurrencyCode } from './payment-BKjX2fAs.mjs';
6
6
 
7
7
  interface UserIdentity {
@@ -57,6 +57,8 @@ interface CimplifyCheckoutProps {
57
57
  locationId?: string;
58
58
  linkUrl?: string;
59
59
  orderTypes?: CheckoutOrderType[];
60
+ defaultOrderType?: CheckoutOrderType;
61
+ submitLabel?: string;
60
62
  enrollInLink?: boolean;
61
63
  onComplete: (result: ProcessCheckoutResult) => void;
62
64
  onError?: (error: {
@@ -75,7 +77,7 @@ interface CimplifyCheckoutProps {
75
77
  demoMode?: boolean;
76
78
  className?: string;
77
79
  }
78
- declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
80
+ declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, defaultOrderType, submitLabel, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
79
81
 
80
82
  interface PriceProps {
81
83
  /** The amount in base (business) currency. */
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
3
3
  export { c as AdConfig } from './ads-t3FBTU8p.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-B10DhX-A.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-9gpFQIeG.js';
5
5
  import { r as Product, d as Pagination, h as CimplifyError, s as ProductWithDetails, L as Category, ax as BundleSelectionInput, a8 as ComponentSelectionInput, O as Collection, Y as BundleWithDetails, a4 as CompositeWithDetails, a9 as CompositePriceResult, C as CurrencyCode } from './payment-BKjX2fAs.js';
6
6
 
7
7
  interface UserIdentity {
@@ -57,6 +57,8 @@ interface CimplifyCheckoutProps {
57
57
  locationId?: string;
58
58
  linkUrl?: string;
59
59
  orderTypes?: CheckoutOrderType[];
60
+ defaultOrderType?: CheckoutOrderType;
61
+ submitLabel?: string;
60
62
  enrollInLink?: boolean;
61
63
  onComplete: (result: ProcessCheckoutResult) => void;
62
64
  onError?: (error: {
@@ -75,7 +77,7 @@ interface CimplifyCheckoutProps {
75
77
  demoMode?: boolean;
76
78
  className?: string;
77
79
  }
78
- declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
80
+ declare function CimplifyCheckout({ client, businessId, cartId, locationId, linkUrl, orderTypes, defaultOrderType, submitLabel, enrollInLink, onComplete, onError, onStatusChange, appearance, demoMode, className, }: CimplifyCheckoutProps): React.ReactElement;
79
81
 
80
82
  interface PriceProps {
81
83
  /** The amount in base (business) currency. */
package/dist/react.js CHANGED
@@ -3424,7 +3424,8 @@ var CimplifyElement = class {
3424
3424
  appearance: this.parent.getAppearance(),
3425
3425
  orderTypes: this.options.orderTypes,
3426
3426
  defaultOrderType: this.options.defaultOrderType,
3427
- renderSubmitButton: true
3427
+ renderSubmitButton: true,
3428
+ submitLabel: this.options.submitLabel
3428
3429
  });
3429
3430
  const token = this.parent.getAccessToken();
3430
3431
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
@@ -4415,6 +4416,8 @@ function CimplifyCheckout({
4415
4416
  locationId,
4416
4417
  linkUrl,
4417
4418
  orderTypes,
4419
+ defaultOrderType,
4420
+ submitLabel,
4418
4421
  enrollInLink = true,
4419
4422
  onComplete,
4420
4423
  onError,
@@ -4427,7 +4430,13 @@ function CimplifyCheckout({
4427
4430
  () => orderTypes && orderTypes.length > 0 ? orderTypes : ["pickup", "delivery"],
4428
4431
  [orderTypes]
4429
4432
  );
4430
- const [orderType, setOrderType] = React3.useState(resolvedOrderTypes[0] || "pickup");
4433
+ const resolvedDefaultOrderType = React3.useMemo(() => {
4434
+ if (defaultOrderType && resolvedOrderTypes.includes(defaultOrderType)) {
4435
+ return defaultOrderType;
4436
+ }
4437
+ return resolvedOrderTypes[0] || "pickup";
4438
+ }, [defaultOrderType, resolvedOrderTypes]);
4439
+ const [orderType, setOrderType] = React3.useState(resolvedDefaultOrderType);
4431
4440
  const [status, setStatus] = React3.useState(null);
4432
4441
  const [statusText, setStatusText] = React3.useState("");
4433
4442
  const [isSubmitting, setIsSubmitting] = React3.useState(false);
@@ -4474,9 +4483,9 @@ function CimplifyCheckout({
4474
4483
  );
4475
4484
  React3.useEffect(() => {
4476
4485
  if (!resolvedOrderTypes.includes(orderType)) {
4477
- setOrderType(resolvedOrderTypes[0] || "pickup");
4486
+ setOrderType(resolvedDefaultOrderType);
4478
4487
  }
4479
- }, [resolvedOrderTypes, orderType]);
4488
+ }, [resolvedOrderTypes, resolvedDefaultOrderType, orderType]);
4480
4489
  React3.useEffect(() => {
4481
4490
  if (appearance && appearance !== initialAppearanceRef.current && !hasWarnedInlineAppearanceRef.current) {
4482
4491
  hasWarnedInlineAppearanceRef.current = true;
@@ -4666,7 +4675,8 @@ function CimplifyCheckout({
4666
4675
  elementsRef.current = elements;
4667
4676
  const checkout = elements.create("checkout", {
4668
4677
  orderTypes: resolvedOrderTypes,
4669
- defaultOrderType: resolvedOrderTypes[0]
4678
+ defaultOrderType: resolvedDefaultOrderType,
4679
+ submitLabel
4670
4680
  });
4671
4681
  if (checkoutMountRef.current) {
4672
4682
  checkout.mount(checkoutMountRef.current);
@@ -4692,7 +4702,14 @@ function CimplifyCheckout({
4692
4702
  elements.destroy();
4693
4703
  elementsRef.current = null;
4694
4704
  };
4695
- }, [client, resolvedBusinessId, isDemoCheckout]);
4705
+ }, [
4706
+ client,
4707
+ resolvedBusinessId,
4708
+ isDemoCheckout,
4709
+ resolvedOrderTypes,
4710
+ resolvedDefaultOrderType,
4711
+ submitLabel
4712
+ ]);
4696
4713
  React3.useEffect(() => {
4697
4714
  if (!resolvedCart || !elementsRef.current) return;
4698
4715
  const checkoutElement = elementsRef.current.getElement("checkout");
package/dist/react.mjs CHANGED
@@ -3418,7 +3418,8 @@ var CimplifyElement = class {
3418
3418
  appearance: this.parent.getAppearance(),
3419
3419
  orderTypes: this.options.orderTypes,
3420
3420
  defaultOrderType: this.options.defaultOrderType,
3421
- renderSubmitButton: true
3421
+ renderSubmitButton: true,
3422
+ submitLabel: this.options.submitLabel
3422
3423
  });
3423
3424
  const token = this.parent.getAccessToken();
3424
3425
  if (token && this.type !== ELEMENT_TYPES.AUTH) {
@@ -4409,6 +4410,8 @@ function CimplifyCheckout({
4409
4410
  locationId,
4410
4411
  linkUrl,
4411
4412
  orderTypes,
4413
+ defaultOrderType,
4414
+ submitLabel,
4412
4415
  enrollInLink = true,
4413
4416
  onComplete,
4414
4417
  onError,
@@ -4421,7 +4424,13 @@ function CimplifyCheckout({
4421
4424
  () => orderTypes && orderTypes.length > 0 ? orderTypes : ["pickup", "delivery"],
4422
4425
  [orderTypes]
4423
4426
  );
4424
- const [orderType, setOrderType] = useState(resolvedOrderTypes[0] || "pickup");
4427
+ const resolvedDefaultOrderType = useMemo(() => {
4428
+ if (defaultOrderType && resolvedOrderTypes.includes(defaultOrderType)) {
4429
+ return defaultOrderType;
4430
+ }
4431
+ return resolvedOrderTypes[0] || "pickup";
4432
+ }, [defaultOrderType, resolvedOrderTypes]);
4433
+ const [orderType, setOrderType] = useState(resolvedDefaultOrderType);
4425
4434
  const [status, setStatus] = useState(null);
4426
4435
  const [statusText, setStatusText] = useState("");
4427
4436
  const [isSubmitting, setIsSubmitting] = useState(false);
@@ -4468,9 +4477,9 @@ function CimplifyCheckout({
4468
4477
  );
4469
4478
  useEffect(() => {
4470
4479
  if (!resolvedOrderTypes.includes(orderType)) {
4471
- setOrderType(resolvedOrderTypes[0] || "pickup");
4480
+ setOrderType(resolvedDefaultOrderType);
4472
4481
  }
4473
- }, [resolvedOrderTypes, orderType]);
4482
+ }, [resolvedOrderTypes, resolvedDefaultOrderType, orderType]);
4474
4483
  useEffect(() => {
4475
4484
  if (appearance && appearance !== initialAppearanceRef.current && !hasWarnedInlineAppearanceRef.current) {
4476
4485
  hasWarnedInlineAppearanceRef.current = true;
@@ -4660,7 +4669,8 @@ function CimplifyCheckout({
4660
4669
  elementsRef.current = elements;
4661
4670
  const checkout = elements.create("checkout", {
4662
4671
  orderTypes: resolvedOrderTypes,
4663
- defaultOrderType: resolvedOrderTypes[0]
4672
+ defaultOrderType: resolvedDefaultOrderType,
4673
+ submitLabel
4664
4674
  });
4665
4675
  if (checkoutMountRef.current) {
4666
4676
  checkout.mount(checkoutMountRef.current);
@@ -4686,7 +4696,14 @@ function CimplifyCheckout({
4686
4696
  elements.destroy();
4687
4697
  elementsRef.current = null;
4688
4698
  };
4689
- }, [client, resolvedBusinessId, isDemoCheckout]);
4699
+ }, [
4700
+ client,
4701
+ resolvedBusinessId,
4702
+ isDemoCheckout,
4703
+ resolvedOrderTypes,
4704
+ resolvedDefaultOrderType,
4705
+ submitLabel
4706
+ ]);
4690
4707
  useEffect(() => {
4691
4708
  if (!resolvedCart || !elementsRef.current) return;
4692
4709
  const checkoutElement = elementsRef.current.getElement("checkout");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cimplify/sdk",
3
- "version": "0.8.12",
3
+ "version": "0.8.14",
4
4
  "description": "Cimplify Commerce SDK for storefronts",
5
5
  "keywords": [
6
6
  "cimplify",