@cimplify/sdk 0.8.3 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +24 -17
- package/dist/advanced.mjs +24 -17
- package/dist/{client-hKTJv1I1.d.ts → client-8SahVQEy.d.ts} +1 -0
- package/dist/{client-DnAfLDhV.d.mts → client-iRG2DBq0.d.mts} +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +24 -17
- package/dist/index.mjs +24 -17
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +24 -17
- package/dist/react.mjs +24 -17
- package/package.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -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-
|
|
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-iRG2DBq0.mjs';
|
|
2
2
|
import './payment-CLIWNMaP.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -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-
|
|
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-8SahVQEy.js';
|
|
2
2
|
import './payment-CLIWNMaP.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
package/dist/advanced.js
CHANGED
|
@@ -2628,6 +2628,7 @@ var CimplifyElement = class {
|
|
|
2628
2628
|
this.iframe = null;
|
|
2629
2629
|
this.container = null;
|
|
2630
2630
|
this.mounted = false;
|
|
2631
|
+
this.pendingInit = null;
|
|
2631
2632
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
2632
2633
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
2633
2634
|
this.listening = false;
|
|
@@ -2741,6 +2742,7 @@ var CimplifyElement = class {
|
|
|
2741
2742
|
iframe.src = url.toString();
|
|
2742
2743
|
iframe.style.border = "none";
|
|
2743
2744
|
iframe.style.width = "100%";
|
|
2745
|
+
iframe.style.minHeight = "200px";
|
|
2744
2746
|
iframe.style.display = "block";
|
|
2745
2747
|
iframe.style.overflow = "hidden";
|
|
2746
2748
|
iframe.style.background = "transparent";
|
|
@@ -2752,23 +2754,9 @@ var CimplifyElement = class {
|
|
|
2752
2754
|
);
|
|
2753
2755
|
this.iframe = iframe;
|
|
2754
2756
|
this.container.appendChild(iframe);
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
this.
|
|
2758
|
-
type: MESSAGE_TYPES.INIT,
|
|
2759
|
-
businessId: resolvedBusinessId,
|
|
2760
|
-
publicKey,
|
|
2761
|
-
demoMode: publicKey.length === 0,
|
|
2762
|
-
prefillEmail: this.options.prefillEmail,
|
|
2763
|
-
appearance: this.parent.getAppearance(),
|
|
2764
|
-
orderTypes: this.options.orderTypes,
|
|
2765
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
2766
|
-
renderSubmitButton: true
|
|
2767
|
-
});
|
|
2768
|
-
const token = this.parent.getAccessToken();
|
|
2769
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
2770
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
2771
|
-
}
|
|
2757
|
+
this.pendingInit = {
|
|
2758
|
+
businessId: resolvedBusinessId,
|
|
2759
|
+
publicKey: this.parent.getPublicKey()
|
|
2772
2760
|
};
|
|
2773
2761
|
}
|
|
2774
2762
|
handleMessage(event) {
|
|
@@ -2789,6 +2777,25 @@ var CimplifyElement = class {
|
|
|
2789
2777
|
switch (message.type) {
|
|
2790
2778
|
case MESSAGE_TYPES.READY:
|
|
2791
2779
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
2780
|
+
if (this.pendingInit) {
|
|
2781
|
+
const { publicKey } = this.pendingInit;
|
|
2782
|
+
this.sendMessage({
|
|
2783
|
+
type: MESSAGE_TYPES.INIT,
|
|
2784
|
+
businessId: this.pendingInit.businessId,
|
|
2785
|
+
publicKey,
|
|
2786
|
+
demoMode: publicKey.length === 0,
|
|
2787
|
+
prefillEmail: this.options.prefillEmail,
|
|
2788
|
+
appearance: this.parent.getAppearance(),
|
|
2789
|
+
orderTypes: this.options.orderTypes,
|
|
2790
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2791
|
+
renderSubmitButton: true
|
|
2792
|
+
});
|
|
2793
|
+
const token = this.parent.getAccessToken();
|
|
2794
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
2795
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
2796
|
+
}
|
|
2797
|
+
this.pendingInit = null;
|
|
2798
|
+
}
|
|
2792
2799
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
2793
2800
|
break;
|
|
2794
2801
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|
package/dist/advanced.mjs
CHANGED
|
@@ -2626,6 +2626,7 @@ var CimplifyElement = class {
|
|
|
2626
2626
|
this.iframe = null;
|
|
2627
2627
|
this.container = null;
|
|
2628
2628
|
this.mounted = false;
|
|
2629
|
+
this.pendingInit = null;
|
|
2629
2630
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
2630
2631
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
2631
2632
|
this.listening = false;
|
|
@@ -2739,6 +2740,7 @@ var CimplifyElement = class {
|
|
|
2739
2740
|
iframe.src = url.toString();
|
|
2740
2741
|
iframe.style.border = "none";
|
|
2741
2742
|
iframe.style.width = "100%";
|
|
2743
|
+
iframe.style.minHeight = "200px";
|
|
2742
2744
|
iframe.style.display = "block";
|
|
2743
2745
|
iframe.style.overflow = "hidden";
|
|
2744
2746
|
iframe.style.background = "transparent";
|
|
@@ -2750,23 +2752,9 @@ var CimplifyElement = class {
|
|
|
2750
2752
|
);
|
|
2751
2753
|
this.iframe = iframe;
|
|
2752
2754
|
this.container.appendChild(iframe);
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
this.
|
|
2756
|
-
type: MESSAGE_TYPES.INIT,
|
|
2757
|
-
businessId: resolvedBusinessId,
|
|
2758
|
-
publicKey,
|
|
2759
|
-
demoMode: publicKey.length === 0,
|
|
2760
|
-
prefillEmail: this.options.prefillEmail,
|
|
2761
|
-
appearance: this.parent.getAppearance(),
|
|
2762
|
-
orderTypes: this.options.orderTypes,
|
|
2763
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
2764
|
-
renderSubmitButton: true
|
|
2765
|
-
});
|
|
2766
|
-
const token = this.parent.getAccessToken();
|
|
2767
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
2768
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
2769
|
-
}
|
|
2755
|
+
this.pendingInit = {
|
|
2756
|
+
businessId: resolvedBusinessId,
|
|
2757
|
+
publicKey: this.parent.getPublicKey()
|
|
2770
2758
|
};
|
|
2771
2759
|
}
|
|
2772
2760
|
handleMessage(event) {
|
|
@@ -2787,6 +2775,25 @@ var CimplifyElement = class {
|
|
|
2787
2775
|
switch (message.type) {
|
|
2788
2776
|
case MESSAGE_TYPES.READY:
|
|
2789
2777
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
2778
|
+
if (this.pendingInit) {
|
|
2779
|
+
const { publicKey } = this.pendingInit;
|
|
2780
|
+
this.sendMessage({
|
|
2781
|
+
type: MESSAGE_TYPES.INIT,
|
|
2782
|
+
businessId: this.pendingInit.businessId,
|
|
2783
|
+
publicKey,
|
|
2784
|
+
demoMode: publicKey.length === 0,
|
|
2785
|
+
prefillEmail: this.options.prefillEmail,
|
|
2786
|
+
appearance: this.parent.getAppearance(),
|
|
2787
|
+
orderTypes: this.options.orderTypes,
|
|
2788
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
2789
|
+
renderSubmitButton: true
|
|
2790
|
+
});
|
|
2791
|
+
const token = this.parent.getAccessToken();
|
|
2792
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
2793
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
2794
|
+
}
|
|
2795
|
+
this.pendingInit = null;
|
|
2796
|
+
}
|
|
2790
2797
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
2791
2798
|
break;
|
|
2792
2799
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-
|
|
1
|
+
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-iRG2DBq0.mjs';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.mjs';
|
|
3
3
|
import { A as ApiError } from './payment-CLIWNMaP.mjs';
|
|
4
4
|
export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-CLIWNMaP.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-
|
|
1
|
+
export { aa as AUTHORIZATION_TYPE, af as AUTH_MUTATION, $ as AbortablePromise, cc as AddressData, cF as AddressInfo, aP as AmountToPay, cn as AuthResponse, A as AuthService, m as AuthStatus, cH as AuthenticatedCustomer, cJ as AuthenticatedData, c0 as AvailabilityCheck, c1 as AvailabilityResult, bF as AvailableSlot, bI as Booking, bH as BookingStatus, bJ as BookingWithDetails, b7 as BufferTimes, bm as Business, bA as BusinessHours, bl as BusinessPreferences, B as BusinessService, bz as BusinessSettings, bk as BusinessType, bx as BusinessWithLocations, a3 as CHECKOUT_MODE, ag as CHECKOUT_MUTATION, a6 as CHECKOUT_STEP, ac as CONTACT_TYPE, bQ as CancelBookingInput, bR as CancelBookingResult, b1 as CancelOrderInput, b9 as CancellationPolicy, i as CartOperations, b as CatalogueQueries, aC as CatalogueResult, aD as CatalogueSnapshot, bB as CategoryInfo, bN as CheckSlotAvailabilityInput, bO as CheckSlotAvailabilityResult, cq as CheckoutAddressInfo, cN as CheckoutCartData, cM as CheckoutCartItem, cs as CheckoutCustomerInfo, N as CheckoutFormData, a$ as CheckoutInput, D as CheckoutMode, j as CheckoutOperations, H as CheckoutOrderType, J as CheckoutPaymentMethod, V as CheckoutResult, j as CheckoutService, Z as CheckoutStatus, _ as CheckoutStatusContext, K as CheckoutStep, C as CimplifyClient, a as CimplifyConfig, t as CimplifyElement, s as CimplifyElements, a2 as ContactType, c8 as CreateAddressInput, ca as CreateMobileMoneyInput, c3 as Customer, c4 as CustomerAddress, bL as CustomerBooking, bK as CustomerBookingServiceItem, c6 as CustomerLinkPreferences, c5 as CustomerMobileMoney, b6 as CustomerServicePreferences, ak as DEFAULT_COUNTRY, aj as DEFAULT_CURRENCY, ab as DEVICE_TYPE, bG as DayAvailability, bg as DepositResult, a1 as DeviceType, v as ELEMENT_TYPES, E as EVENT_TYPES, cE as ElementAppearance, cQ as ElementEventHandler, z as ElementEventType, x as ElementOptions, y as ElementType, cK as ElementsCheckoutData, cL as ElementsCheckoutResult, cI as ElementsCustomerInfo, w as ElementsOptions, ce as EnrollAndLinkOrderInput, ch as EnrollAndLinkOrderResult, cb as EnrollmentData, an as Err, aO as FeeBearerType, F as FetchQuoteInput, aM as FulfillmentLink, aL as FulfillmentStatus, aK as FulfillmentType, cu as FxQuote, ct as FxQuoteRequest, cv as FxRateResponse, q as FxService, bM as GetAvailableSlotsInput, l as GetOrdersOptions, G as GetProductsOptions, cP as IframeToParentMessage, I as InventoryService, c2 as InventorySummary, ae as LINK_MUTATION, ad as LINK_QUERY, aQ as LineItem, aH as LineType, c7 as LinkData, cg as LinkEnrollResult, L as LinkService, ci as LinkSession, cf as LinkStatusResult, r as LiteBootstrap, p as LiteService, bp as Location, bj as LocationAppointment, b$ as LocationStock, bn as LocationTaxBehavior, bo as LocationTaxOverrides, bs as LocationTimeProfile, by as LocationWithDetails, M as MESSAGE_TYPES, a9 as MOBILE_MONEY_PROVIDER, cd as MobileMoneyData, cr as MobileMoneyDetails, a0 as MobileMoneyProvider, ai as ORDER_MUTATION, a4 as ORDER_TYPE, cC as ObservabilityHooks, am as Ok, aR as Order, aG as OrderChannel, a_ as OrderFilter, aN as OrderFulfillmentSummary, aU as OrderGroup, aY as OrderGroupDetails, aV as OrderGroupPayment, aT as OrderGroupPaymentState, aX as OrderGroupPaymentSummary, aS as OrderHistory, aI as OrderLineState, aJ as OrderLineStatus, aZ as OrderPaymentEvent, O as OrderQueries, aW as OrderSplitDetail, aE as OrderStatus, cD as OrderType, n as OtpResult, a5 as PAYMENT_METHOD, ah as PAYMENT_MUTATION, a7 as PAYMENT_STATE, a8 as PICKUP_TIME_TYPE, cO as ParentToIframeMessage, cG as PaymentMethodInfo, aF as PaymentState, cp as PickupTime, co as PickupTimeType, P as PriceQuote, bb as PricingOverrides, Y as ProcessAndResolveOptions, W as ProcessCheckoutOptions, X as ProcessCheckoutResult, bZ as ProductStock, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, b2 as RefundOrderInput, b5 as ReminderMethod, b8 as ReminderSettings, cw as RequestContext, cz as RequestErrorEvent, cl as RequestOtpInput, cx as RequestStartEvent, cy as RequestSuccessEvent, bP as RescheduleBookingInput, bS as RescheduleBookingResult, be as ResourceAssignment, al as Result, cA as RetryEvent, ck as RevokeAllSessionsResult, cj as RevokeSessionResult, bu as Room, bc as SchedulingMetadata, bf as SchedulingResult, o as SchedulingService, S as SearchOptions, bC as Service, bT as ServiceAvailabilityParams, bU as ServiceAvailabilityResult, bv as ServiceCharge, ba as ServiceNotes, bh as ServiceScheduleRequest, b3 as ServiceStatus, cB as SessionChangeEvent, bD as Staff, bd as StaffAssignment, b4 as StaffRole, bi as StaffScheduleItem, bX as Stock, bY as StockLevel, bV as StockOwnershipType, bW as StockStatus, bw as StorefrontBootstrap, bt as Table, T as TableInfo, bq as TimeRange, br as TimeRanges, bE as TimeSlot, c9 as UpdateAddressInput, b0 as UpdateOrderStatusInput, U as UpdateProfileInput, b_ as VariantStock, cm as VerifyOtpInput, aA as combine, aB as combineObject, c as createCimplifyClient, u as createElements, ap as err, au as flatMap, ay as fromPromise, k as generateIdempotencyKey, av as getOrElse, ar as isErr, aq as isOk, at as mapError, as as mapResult, ao as ok, ax as toNullable, az as tryCatch, aw as unwrap } from './client-8SahVQEy.js';
|
|
2
2
|
export { QueryBuilder, query } from './advanced.js';
|
|
3
3
|
import { A as ApiError } from './payment-CLIWNMaP.js';
|
|
4
4
|
export { B as AddOn, at as AddOnDetails, aP as AddOnGroupDetails, G as AddOnOption, aO as AddOnOptionDetails, H as AddOnOptionPrice, F as AddOnWithOptions, aU as AddToCartInput, ai as AdjustmentType, ap as AppliedDiscount, a_ as AuthorizationType, ao as BenefitType, T as Bundle, Y as BundleComponentData, _ as BundleComponentInfo, R as BundlePriceType, W as BundleProduct, ay as BundleSelectionData, aw as BundleSelectionInput, ax as BundleStoredSelection, U as BundleSummary, X as BundleWithDetails, aD as Cart, au as CartAddOn, ag as CartChannel, aE as CartItem, aR as CartItemDetails, af as CartStatus, aW as CartSummary, aF as CartTotals, K as Category, L as CategorySummary, an as ChosenPrice, h as CimplifyError, N as Collection, Q as CollectionProduct, O as CollectionSummary, a4 as ComponentGroup, a5 as ComponentGroupWithComponents, a9 as ComponentPriceBreakdown, a7 as ComponentSelectionInput, a1 as ComponentSourceType, a2 as Composite, a6 as CompositeComponent, aA as CompositePriceBreakdown, a8 as CompositePriceResult, $ as CompositePricingMode, aB as CompositeSelectionData, a7 as CompositeSelectionInput, az as CompositeStoredSelection, a3 as CompositeWithDetails, b as Currency, C as CurrencyCode, p as DepositType, D as DigitalProductType, aq as DiscountBreakdown, ar as DiscountDetails, aI as DisplayAddOn, aJ as DisplayAddOnOption, aG as DisplayCart, aH as DisplayCartItem, g as ERROR_HINTS, E as ErrorCode, e as ErrorCodeType, f as ErrorHint, a0 as GroupPricingBehavior, b2 as InitializePaymentResult, I as InventoryType, aC as LineConfiguration, ac as LocationProductPrice, M as Money, d as Pagination, P as PaginationParams, b1 as Payment, b5 as PaymentErrorDetails, b0 as PaymentMethod, aZ as PaymentMethodType, a$ as PaymentProcessingState, aY as PaymentProvider, b3 as PaymentResponse, aX as PaymentStatus, b4 as PaymentStatusResponse, ab as Price, aj as PriceAdjustment, am as PriceDecisionPath, aa as PriceEntryType, al as PricePathTaxInfo, ah as PriceSource, q as Product, J as ProductAddOn, ad as ProductAvailability, o as ProductRenderHint, ae as ProductTimeProfile, n as ProductType, s as ProductVariant, x as ProductVariantValue, r as ProductWithDetails, S as SalesChannel, as as SelectedAddOnOption, b6 as SubmitAuthorizationInput, ak as TaxPathComponent, aS as UICart, aK as UICartBusiness, aM as UICartCustomer, aL as UICartLocation, aN as UICartPricing, aT as UICartResponse, aV as UpdateCartItemInput, u as VariantAxis, z as VariantAxisSelection, w as VariantAxisValue, v as VariantAxisWithValues, av as VariantDetails, aQ as VariantDetailsDTO, t as VariantDisplayAttribute, y as VariantLocationAvailability, V as VariantStrategy, Z as ZERO, c as currencyCode, k as enrichError, j as getErrorHint, i as isCimplifyError, l as isRetryableError, m as money, a as moneyFromNumber } from './payment-CLIWNMaP.js';
|
package/dist/index.js
CHANGED
|
@@ -3168,6 +3168,7 @@ var CimplifyElement = class {
|
|
|
3168
3168
|
this.iframe = null;
|
|
3169
3169
|
this.container = null;
|
|
3170
3170
|
this.mounted = false;
|
|
3171
|
+
this.pendingInit = null;
|
|
3171
3172
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
3172
3173
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
3173
3174
|
this.listening = false;
|
|
@@ -3281,6 +3282,7 @@ var CimplifyElement = class {
|
|
|
3281
3282
|
iframe.src = url.toString();
|
|
3282
3283
|
iframe.style.border = "none";
|
|
3283
3284
|
iframe.style.width = "100%";
|
|
3285
|
+
iframe.style.minHeight = "200px";
|
|
3284
3286
|
iframe.style.display = "block";
|
|
3285
3287
|
iframe.style.overflow = "hidden";
|
|
3286
3288
|
iframe.style.background = "transparent";
|
|
@@ -3292,23 +3294,9 @@ var CimplifyElement = class {
|
|
|
3292
3294
|
);
|
|
3293
3295
|
this.iframe = iframe;
|
|
3294
3296
|
this.container.appendChild(iframe);
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
this.
|
|
3298
|
-
type: MESSAGE_TYPES.INIT,
|
|
3299
|
-
businessId: resolvedBusinessId,
|
|
3300
|
-
publicKey,
|
|
3301
|
-
demoMode: publicKey.length === 0,
|
|
3302
|
-
prefillEmail: this.options.prefillEmail,
|
|
3303
|
-
appearance: this.parent.getAppearance(),
|
|
3304
|
-
orderTypes: this.options.orderTypes,
|
|
3305
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
3306
|
-
renderSubmitButton: true
|
|
3307
|
-
});
|
|
3308
|
-
const token = this.parent.getAccessToken();
|
|
3309
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3310
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3311
|
-
}
|
|
3297
|
+
this.pendingInit = {
|
|
3298
|
+
businessId: resolvedBusinessId,
|
|
3299
|
+
publicKey: this.parent.getPublicKey()
|
|
3312
3300
|
};
|
|
3313
3301
|
}
|
|
3314
3302
|
handleMessage(event) {
|
|
@@ -3329,6 +3317,25 @@ var CimplifyElement = class {
|
|
|
3329
3317
|
switch (message.type) {
|
|
3330
3318
|
case MESSAGE_TYPES.READY:
|
|
3331
3319
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
3320
|
+
if (this.pendingInit) {
|
|
3321
|
+
const { publicKey } = this.pendingInit;
|
|
3322
|
+
this.sendMessage({
|
|
3323
|
+
type: MESSAGE_TYPES.INIT,
|
|
3324
|
+
businessId: this.pendingInit.businessId,
|
|
3325
|
+
publicKey,
|
|
3326
|
+
demoMode: publicKey.length === 0,
|
|
3327
|
+
prefillEmail: this.options.prefillEmail,
|
|
3328
|
+
appearance: this.parent.getAppearance(),
|
|
3329
|
+
orderTypes: this.options.orderTypes,
|
|
3330
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3331
|
+
renderSubmitButton: true
|
|
3332
|
+
});
|
|
3333
|
+
const token = this.parent.getAccessToken();
|
|
3334
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3335
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3336
|
+
}
|
|
3337
|
+
this.pendingInit = null;
|
|
3338
|
+
}
|
|
3332
3339
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
3333
3340
|
break;
|
|
3334
3341
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|
package/dist/index.mjs
CHANGED
|
@@ -3166,6 +3166,7 @@ var CimplifyElement = class {
|
|
|
3166
3166
|
this.iframe = null;
|
|
3167
3167
|
this.container = null;
|
|
3168
3168
|
this.mounted = false;
|
|
3169
|
+
this.pendingInit = null;
|
|
3169
3170
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
3170
3171
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
3171
3172
|
this.listening = false;
|
|
@@ -3279,6 +3280,7 @@ var CimplifyElement = class {
|
|
|
3279
3280
|
iframe.src = url.toString();
|
|
3280
3281
|
iframe.style.border = "none";
|
|
3281
3282
|
iframe.style.width = "100%";
|
|
3283
|
+
iframe.style.minHeight = "200px";
|
|
3282
3284
|
iframe.style.display = "block";
|
|
3283
3285
|
iframe.style.overflow = "hidden";
|
|
3284
3286
|
iframe.style.background = "transparent";
|
|
@@ -3290,23 +3292,9 @@ var CimplifyElement = class {
|
|
|
3290
3292
|
);
|
|
3291
3293
|
this.iframe = iframe;
|
|
3292
3294
|
this.container.appendChild(iframe);
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
this.
|
|
3296
|
-
type: MESSAGE_TYPES.INIT,
|
|
3297
|
-
businessId: resolvedBusinessId,
|
|
3298
|
-
publicKey,
|
|
3299
|
-
demoMode: publicKey.length === 0,
|
|
3300
|
-
prefillEmail: this.options.prefillEmail,
|
|
3301
|
-
appearance: this.parent.getAppearance(),
|
|
3302
|
-
orderTypes: this.options.orderTypes,
|
|
3303
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
3304
|
-
renderSubmitButton: true
|
|
3305
|
-
});
|
|
3306
|
-
const token = this.parent.getAccessToken();
|
|
3307
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3308
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3309
|
-
}
|
|
3295
|
+
this.pendingInit = {
|
|
3296
|
+
businessId: resolvedBusinessId,
|
|
3297
|
+
publicKey: this.parent.getPublicKey()
|
|
3310
3298
|
};
|
|
3311
3299
|
}
|
|
3312
3300
|
handleMessage(event) {
|
|
@@ -3327,6 +3315,25 @@ var CimplifyElement = class {
|
|
|
3327
3315
|
switch (message.type) {
|
|
3328
3316
|
case MESSAGE_TYPES.READY:
|
|
3329
3317
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
3318
|
+
if (this.pendingInit) {
|
|
3319
|
+
const { publicKey } = this.pendingInit;
|
|
3320
|
+
this.sendMessage({
|
|
3321
|
+
type: MESSAGE_TYPES.INIT,
|
|
3322
|
+
businessId: this.pendingInit.businessId,
|
|
3323
|
+
publicKey,
|
|
3324
|
+
demoMode: publicKey.length === 0,
|
|
3325
|
+
prefillEmail: this.options.prefillEmail,
|
|
3326
|
+
appearance: this.parent.getAppearance(),
|
|
3327
|
+
orderTypes: this.options.orderTypes,
|
|
3328
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3329
|
+
renderSubmitButton: true
|
|
3330
|
+
});
|
|
3331
|
+
const token = this.parent.getAccessToken();
|
|
3332
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3333
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3334
|
+
}
|
|
3335
|
+
this.pendingInit = null;
|
|
3336
|
+
}
|
|
3330
3337
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
3331
3338
|
break;
|
|
3332
3339
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|
package/dist/react.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-iRG2DBq0.mjs';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.mjs';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.mjs';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-
|
|
1
|
+
import { C as CimplifyClient, X as ProcessCheckoutResult, Z as CheckoutStatus, _ as CheckoutStatusContext, bp as Location, bm as Business, aR as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, s as CimplifyElements, w as ElementsOptions, cJ as AuthenticatedData, cF as AddressInfo, cG as PaymentMethodInfo, cL as ElementsCheckoutResult, W as ProcessCheckoutOptions } from './client-8SahVQEy.js';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
import { q as Product, d as Pagination, h as CimplifyError, r as ProductWithDetails, K as Category, aw as BundleSelectionInput, a7 as ComponentSelectionInput, N as Collection, X as BundleWithDetails, a3 as CompositeWithDetails, a8 as CompositePriceResult, C as CurrencyCode } from './payment-CLIWNMaP.js';
|
|
4
4
|
import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-t3FBTU8p.js';
|
package/dist/react.js
CHANGED
|
@@ -3346,6 +3346,7 @@ var CimplifyElement = class {
|
|
|
3346
3346
|
this.iframe = null;
|
|
3347
3347
|
this.container = null;
|
|
3348
3348
|
this.mounted = false;
|
|
3349
|
+
this.pendingInit = null;
|
|
3349
3350
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
3350
3351
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
3351
3352
|
this.listening = false;
|
|
@@ -3459,6 +3460,7 @@ var CimplifyElement = class {
|
|
|
3459
3460
|
iframe.src = url.toString();
|
|
3460
3461
|
iframe.style.border = "none";
|
|
3461
3462
|
iframe.style.width = "100%";
|
|
3463
|
+
iframe.style.minHeight = "200px";
|
|
3462
3464
|
iframe.style.display = "block";
|
|
3463
3465
|
iframe.style.overflow = "hidden";
|
|
3464
3466
|
iframe.style.background = "transparent";
|
|
@@ -3470,23 +3472,9 @@ var CimplifyElement = class {
|
|
|
3470
3472
|
);
|
|
3471
3473
|
this.iframe = iframe;
|
|
3472
3474
|
this.container.appendChild(iframe);
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
this.
|
|
3476
|
-
type: MESSAGE_TYPES.INIT,
|
|
3477
|
-
businessId: resolvedBusinessId,
|
|
3478
|
-
publicKey,
|
|
3479
|
-
demoMode: publicKey.length === 0,
|
|
3480
|
-
prefillEmail: this.options.prefillEmail,
|
|
3481
|
-
appearance: this.parent.getAppearance(),
|
|
3482
|
-
orderTypes: this.options.orderTypes,
|
|
3483
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
3484
|
-
renderSubmitButton: true
|
|
3485
|
-
});
|
|
3486
|
-
const token = this.parent.getAccessToken();
|
|
3487
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3488
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3489
|
-
}
|
|
3475
|
+
this.pendingInit = {
|
|
3476
|
+
businessId: resolvedBusinessId,
|
|
3477
|
+
publicKey: this.parent.getPublicKey()
|
|
3490
3478
|
};
|
|
3491
3479
|
}
|
|
3492
3480
|
handleMessage(event) {
|
|
@@ -3507,6 +3495,25 @@ var CimplifyElement = class {
|
|
|
3507
3495
|
switch (message.type) {
|
|
3508
3496
|
case MESSAGE_TYPES.READY:
|
|
3509
3497
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
3498
|
+
if (this.pendingInit) {
|
|
3499
|
+
const { publicKey } = this.pendingInit;
|
|
3500
|
+
this.sendMessage({
|
|
3501
|
+
type: MESSAGE_TYPES.INIT,
|
|
3502
|
+
businessId: this.pendingInit.businessId,
|
|
3503
|
+
publicKey,
|
|
3504
|
+
demoMode: publicKey.length === 0,
|
|
3505
|
+
prefillEmail: this.options.prefillEmail,
|
|
3506
|
+
appearance: this.parent.getAppearance(),
|
|
3507
|
+
orderTypes: this.options.orderTypes,
|
|
3508
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3509
|
+
renderSubmitButton: true
|
|
3510
|
+
});
|
|
3511
|
+
const token = this.parent.getAccessToken();
|
|
3512
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3513
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3514
|
+
}
|
|
3515
|
+
this.pendingInit = null;
|
|
3516
|
+
}
|
|
3510
3517
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
3511
3518
|
break;
|
|
3512
3519
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|
package/dist/react.mjs
CHANGED
|
@@ -3340,6 +3340,7 @@ var CimplifyElement = class {
|
|
|
3340
3340
|
this.iframe = null;
|
|
3341
3341
|
this.container = null;
|
|
3342
3342
|
this.mounted = false;
|
|
3343
|
+
this.pendingInit = null;
|
|
3343
3344
|
this.eventHandlers = /* @__PURE__ */ new Map();
|
|
3344
3345
|
this.resolvers = /* @__PURE__ */ new Map();
|
|
3345
3346
|
this.listening = false;
|
|
@@ -3453,6 +3454,7 @@ var CimplifyElement = class {
|
|
|
3453
3454
|
iframe.src = url.toString();
|
|
3454
3455
|
iframe.style.border = "none";
|
|
3455
3456
|
iframe.style.width = "100%";
|
|
3457
|
+
iframe.style.minHeight = "200px";
|
|
3456
3458
|
iframe.style.display = "block";
|
|
3457
3459
|
iframe.style.overflow = "hidden";
|
|
3458
3460
|
iframe.style.background = "transparent";
|
|
@@ -3464,23 +3466,9 @@ var CimplifyElement = class {
|
|
|
3464
3466
|
);
|
|
3465
3467
|
this.iframe = iframe;
|
|
3466
3468
|
this.container.appendChild(iframe);
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
this.
|
|
3470
|
-
type: MESSAGE_TYPES.INIT,
|
|
3471
|
-
businessId: resolvedBusinessId,
|
|
3472
|
-
publicKey,
|
|
3473
|
-
demoMode: publicKey.length === 0,
|
|
3474
|
-
prefillEmail: this.options.prefillEmail,
|
|
3475
|
-
appearance: this.parent.getAppearance(),
|
|
3476
|
-
orderTypes: this.options.orderTypes,
|
|
3477
|
-
defaultOrderType: this.options.defaultOrderType,
|
|
3478
|
-
renderSubmitButton: true
|
|
3479
|
-
});
|
|
3480
|
-
const token = this.parent.getAccessToken();
|
|
3481
|
-
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3482
|
-
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3483
|
-
}
|
|
3469
|
+
this.pendingInit = {
|
|
3470
|
+
businessId: resolvedBusinessId,
|
|
3471
|
+
publicKey: this.parent.getPublicKey()
|
|
3484
3472
|
};
|
|
3485
3473
|
}
|
|
3486
3474
|
handleMessage(event) {
|
|
@@ -3501,6 +3489,25 @@ var CimplifyElement = class {
|
|
|
3501
3489
|
switch (message.type) {
|
|
3502
3490
|
case MESSAGE_TYPES.READY:
|
|
3503
3491
|
if (this.iframe && message.height) this.iframe.style.height = `${message.height}px`;
|
|
3492
|
+
if (this.pendingInit) {
|
|
3493
|
+
const { publicKey } = this.pendingInit;
|
|
3494
|
+
this.sendMessage({
|
|
3495
|
+
type: MESSAGE_TYPES.INIT,
|
|
3496
|
+
businessId: this.pendingInit.businessId,
|
|
3497
|
+
publicKey,
|
|
3498
|
+
demoMode: publicKey.length === 0,
|
|
3499
|
+
prefillEmail: this.options.prefillEmail,
|
|
3500
|
+
appearance: this.parent.getAppearance(),
|
|
3501
|
+
orderTypes: this.options.orderTypes,
|
|
3502
|
+
defaultOrderType: this.options.defaultOrderType,
|
|
3503
|
+
renderSubmitButton: true
|
|
3504
|
+
});
|
|
3505
|
+
const token = this.parent.getAccessToken();
|
|
3506
|
+
if (token && this.type !== ELEMENT_TYPES.AUTH) {
|
|
3507
|
+
this.sendMessage({ type: MESSAGE_TYPES.SET_TOKEN, token });
|
|
3508
|
+
}
|
|
3509
|
+
this.pendingInit = null;
|
|
3510
|
+
}
|
|
3504
3511
|
this.emit(EVENT_TYPES.READY, { height: message.height });
|
|
3505
3512
|
break;
|
|
3506
3513
|
case MESSAGE_TYPES.HEIGHT_CHANGE:
|