@dropins/storefront-checkout 1.4.0-beta1 → 1.4.0-beta2

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.
Files changed (134) hide show
  1. package/__generated__/types.d.ts +12644 -0
  2. package/api/estimateShippingMethods/graphql/index.d.ts +15 -15
  3. package/api/estimateShippingMethods/index.d.ts +15 -15
  4. package/api/fetch-graphql/fetch-graphql.d.ts +19 -19
  5. package/api/fetch-graphql/index.d.ts +15 -15
  6. package/api/getCart/fixtures.d.ts +2 -2
  7. package/api/getCart/getCart.d.ts +1 -1
  8. package/api/getCart/graphql/index.d.ts +15 -15
  9. package/api/getCart/index.d.ts +15 -15
  10. package/api/getCheckoutAgreements/graphql/getCheckoutAgreements.graphql.d.ts +1 -1
  11. package/api/getCustomer/graphql/index.d.ts +15 -15
  12. package/api/getCustomer/index.d.ts +15 -15
  13. package/api/getStoreConfig/index.d.ts +15 -15
  14. package/api/index.d.ts +1 -0
  15. package/api/initialize/index.d.ts +15 -15
  16. package/api/initialize/initialize.d.ts +3 -3
  17. package/api/initializeCheckout/index.d.ts +15 -15
  18. package/api/initializeCheckout/initializeCheckout.d.ts +1 -1
  19. package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +15 -15
  20. package/api/isEmailAvailable/index.d.ts +15 -15
  21. package/api/setBillingAddress/index.d.ts +15 -15
  22. package/api/setBillingAddress/setBillingAddress.d.ts +1 -1
  23. package/api/setGuestEmailOnCart/index.d.ts +15 -15
  24. package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +1 -1
  25. package/api/setPaymentMethod/index.d.ts +15 -15
  26. package/api/setPaymentMethod/setPaymentMethod.d.ts +1 -1
  27. package/api/setShippingAddress/index.d.ts +15 -15
  28. package/api/setShippingAddress/setShippingAddress.d.ts +1 -1
  29. package/api/setShippingMethods/index.d.ts +15 -15
  30. package/api/setShippingMethods/setShippingMethods.d.ts +1 -1
  31. package/{lib/debounce.d.ts → api/subscribeEmailToNewsletter/graphql/subscribeEmailToNewsletter.graphql.d.ts} +3 -15
  32. package/{hooks → api/subscribeEmailToNewsletter}/index.d.ts +1 -2
  33. package/api/subscribeEmailToNewsletter/subscribeEmailToNewsletter.d.ts +4 -0
  34. package/api/synchronizeCheckout/synchronizeCheckout.d.ts +1 -1
  35. package/api.js +12 -6
  36. package/chunks/ConditionalWrapper.js +3 -0
  37. package/chunks/IsBillToShippingSignal.js +14 -0
  38. package/chunks/SelectedPaymentMethodSignal.js +3 -0
  39. package/chunks/SelectedShippingMethodSignal.js +3 -0
  40. package/chunks/ServerErrorSignal.js +3 -0
  41. package/chunks/TermsAndConditions.js +2 -2
  42. package/chunks/setBillingAddress.js +2 -2
  43. package/chunks/setGuestEmailOnCart.js +6 -6
  44. package/chunks/setPaymentMethod.js +2 -2
  45. package/chunks/setShippingMethods.js +3 -3
  46. package/chunks/subscription-email-statuses.js +3 -0
  47. package/chunks/synchronizeCheckout.js +5 -5
  48. package/components/BillToShippingAddress/BillToShippingAddress.d.ts +2 -1
  49. package/components/BillToShippingAddress/index.d.ts +15 -15
  50. package/components/ConditionalWrapper/ConditionalWrapper.d.ts +8 -0
  51. package/{hocs → components/ConditionalWrapper}/index.d.ts +2 -2
  52. package/components/EstimateShipping/EstimateShipping.d.ts +2 -2
  53. package/components/EstimateShipping/index.d.ts +15 -15
  54. package/components/LoginForm/LoginForm.d.ts +2 -2
  55. package/components/Newsletter/Newsletter.d.ts +2 -1
  56. package/components/OutOfStock/index.d.ts +15 -15
  57. package/components/PaymentMethods/PaymentMethods.d.ts +5 -6
  58. package/components/PlaceOrder/PlaceOrder.d.ts +1 -1
  59. package/components/PlaceOrder/index.d.ts +15 -15
  60. package/components/ServerError/index.d.ts +15 -15
  61. package/components/ShippingMethods/ShippingMethods.d.ts +5 -3
  62. package/components/TermsAndConditions/TermsAndConditions.d.ts +2 -2
  63. package/components/index.d.ts +1 -0
  64. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +3 -20
  65. package/containers/BillToShippingAddress.js +1 -1
  66. package/containers/EstimateShipping/index.d.ts +15 -15
  67. package/containers/EstimateShipping.js +1 -1
  68. package/containers/LoginForm/LoginForm.d.ts +2 -5
  69. package/containers/LoginForm.js +1 -1
  70. package/containers/MergedCartBanner/MergedCartBanner.d.ts +3 -5
  71. package/containers/MergedCartBanner.js +1 -1
  72. package/containers/Newsletter/Newsletter.d.ts +1 -1
  73. package/containers/Newsletter.js +1 -1
  74. package/containers/OutOfStock/OutOfStock.d.ts +1 -1
  75. package/containers/OutOfStock/index.d.ts +15 -15
  76. package/containers/OutOfStock.js +1 -1
  77. package/containers/PaymentMethods/PaymentMethods.d.ts +3 -6
  78. package/containers/PaymentMethods.js +1 -1
  79. package/containers/PlaceOrder/PlaceOrder.d.ts +4 -6
  80. package/containers/PlaceOrder/index.d.ts +15 -15
  81. package/containers/PlaceOrder.js +1 -1
  82. package/containers/ServerError/ServerError.d.ts +1 -1
  83. package/containers/ServerError.js +1 -1
  84. package/containers/ShippingMethods/ShippingMethods.d.ts +4 -6
  85. package/containers/ShippingMethods/utils/emitShippingEstimateEvent.d.ts +1 -1
  86. package/containers/ShippingMethods.js +1 -1
  87. package/containers/TermsAndConditions/TermsAndConditions.d.ts +1 -1
  88. package/containers/TermsAndConditions.js +1 -1
  89. package/data/models/country.d.ts +15 -15
  90. package/data/models/custom-attribute.d.ts +15 -15
  91. package/data/models/email-availability.d.ts +15 -15
  92. package/data/models/index.d.ts +1 -0
  93. package/data/models/payment-method.d.ts +15 -15
  94. package/data/models/price.d.ts +15 -15
  95. package/data/models/store-config.d.ts +1 -3
  96. package/data/models/subscription-email-statuses.d.ts +24 -0
  97. package/lib/dispatchApiCall.d.ts +6 -22
  98. package/lib/enqueueRequest.d.ts +11 -24
  99. package/lib/index.d.ts +0 -2
  100. package/lib/network-error.d.ts +15 -15
  101. package/lib/preact.d.ts +1 -1
  102. package/msw/browser.d.ts +15 -15
  103. package/msw/fixtures/fragments/cart.d.ts +15 -15
  104. package/msw/fixtures/index.d.ts +15 -15
  105. package/msw/fixtures/mutations/index.d.ts +15 -15
  106. package/msw/fixtures/queries/index.d.ts +15 -15
  107. package/msw/server.d.ts +15 -15
  108. package/package.json +1 -1
  109. package/render/index.d.ts +15 -15
  110. package/render/render.d.ts +1 -1
  111. package/render.js +4 -4
  112. package/signals/ShippingEstimateSignal.d.ts +6 -5
  113. package/signals/index.d.ts +0 -1
  114. package/tests/constants.d.ts +15 -15
  115. package/tests/integration/utils/index.d.ts +15 -15
  116. package/tests/integration/utils/user-actions.d.ts +15 -15
  117. package/tests/mocks/svg.d.ts +15 -15
  118. package/tests/utils/expectError.d.ts +15 -15
  119. package/tests/utils/index.d.ts +15 -15
  120. package/tests/utils/mockEvents.d.ts +15 -15
  121. package/types/TitleProps.d.ts +1 -1
  122. package/chunks/ShippingEstimateSignal.js +0 -14
  123. package/chunks/errors.js +0 -3
  124. package/chunks/store-config.js +0 -3
  125. package/chunks/withConditionalRendering.js +0 -3
  126. package/chunks/withSkeleton.js +0 -3
  127. package/hocs/withConditionalRendering.d.ts +0 -13
  128. package/hocs/withSkeleton.d.ts +0 -8
  129. package/hooks/useBreakpoint/index.d.ts +0 -18
  130. package/hooks/useBreakpoint/useBreakpoint.d.ts +0 -18
  131. package/hooks/useStableList/index.d.ts +0 -2
  132. package/hooks/useStableList/useStableList.d.ts +0 -2
  133. package/lib/fetch-error.d.ts +0 -23
  134. package/signals/CartSignal.d.ts +0 -7
@@ -1,19 +1,19 @@
1
1
  /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
17
  export * from './expectError';
18
18
  export * from './mockEvents';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,19 +1,19 @@
1
1
  /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
2
+ * ADOBE CONFIDENTIAL
3
+ * __________________
4
+ *
5
+ * Copyright 2024 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+ *******************************************************************/
17
17
  export declare const mockEvents: (eventsMapping: Record<string, {
18
18
  waitForEmit?: boolean;
19
19
  payload?: any;
@@ -1,4 +1,4 @@
1
- import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
1
+ import { SlotProps } from '../../@adobe-commerce/elsie/src/lib';
2
2
 
3
3
  export interface TitleProps {
4
4
  displayTitle?: boolean;
@@ -1,14 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- import{FetchGraphQL as u}from"@dropins/tools/fetch-graphql.js";import{T as n}from"./store-config.js";import"@dropins/tools/event-bus.js";import{signal as t,effect as g}from"@dropins/tools/signals.js";import"@dropins/tools/lib.js";const{setEndpoint:y,setFetchGraphQlHeader:T,removeFetchGraphQlHeader:D,setFetchGraphQlHeaders:N,fetchGraphQl:d,getConfig:U}=new u().getMethods(),h=`
4
- query getStoreConfig {
5
- storeConfig {
6
- default_country
7
- is_checkout_agreements_enabled
8
- is_guest_checkout_enabled
9
- is_one_page_checkout_enabled
10
- newsletter_enabled
11
- shopping_cart_display_shipping
12
- }
13
- }
14
- `,p="US",s={defaultCountry:p,isCheckoutAgreementsEnabled:!0,isGuestCheckoutEnabled:!1,isOnePageCheckoutEnabled:!1,newsletterEnabled:!0,shoppingCartDisplaySetting:{shipping:n.EXCLUDING_TAX}},A=async()=>d(h,{method:"GET",cache:"no-cache"}).then(({errors:e,data:a})=>e?s:f(a.storeConfig));function _(e){switch(e){case 1:return n.EXCLUDING_TAX;case 2:return n.INCLUDING_TAX;case 3:return n.INCLUDING_EXCLUDING_TAX;default:return n.EXCLUDING_TAX}}function f(e){if(!e)return s;const{default_country:a,is_checkout_agreements_enabled:i,is_guest_checkout_enabled:r,is_one_page_checkout_enabled:o,newsletter_enabled:l,shopping_cart_display_shipping:c}=e;return{defaultCountry:a||s.defaultCountry,isCheckoutAgreementsEnabled:i,isGuestCheckoutEnabled:r||s.isGuestCheckoutEnabled,isOnePageCheckoutEnabled:o||s.isOnePageCheckoutEnabled,newsletterEnabled:l,shoppingCartDisplaySetting:{shipping:_(c)}}}const C=t(!0),b=t({pending:!1,data:void 0});g(()=>{var e;(e=b.value.data)!=null&&e.isVirtual&&(C.value=!1)});const I=t(!1),L=t(),X=t(void 0),v=t(),w=t({pending:!1,data:void 0});export{p as D,s as S,X as a,v as b,b as c,L as d,C as e,d as f,y as g,T as h,I as i,N as j,U as k,A as l,D as r,w as s};
package/chunks/errors.js DELETED
@@ -1,3 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- class n extends Error{constructor(e){super(e.map(t=>t.message).join(" ")),this.name="FetchError"}}class r extends Error{constructor(e){super(e),this.name="InvalidArgument"}}class i extends Error{constructor(e){super(e),this.name="UnexpectedError"}}class a extends r{constructor(){super("Cart ID is required")}}class c extends r{constructor(){super("Email is required")}}class o extends r{constructor(){super("Payment method code is required")}}class d extends r{constructor(){super("Shipping address is required")}}class u extends r{constructor(){super("Billing address is required")}}class l extends r{constructor(){super("Country Code is required")}}export{n as F,r as I,a as M,i as U,l as a,d as b,c,o as d,u as e};
@@ -1,3 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- const I={authenticated:!1,cartId:null,initialized:!1,config:null},N=new Proxy(I,{set(t,e,n){return t[e]=n,!0},get(t,e){return t[e]}}),s=()=>N.config;var r=(t=>(t.EXCLUDING_TAX="EXCLUDING_TAX",t.INCLUDING_EXCLUDING_TAX="INCLUDING_AND_EXCLUDING_TAX",t.INCLUDING_TAX="INCLUDING_TAX",t))(r||{});export{r as T,s as g,N as s};
@@ -1,3 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import{c as p}from"./ShippingEstimateSignal.js";import"./store-config.js";import"@dropins/tools/lib.js";import"@dropins/tools/event-bus.js";function u(i){return i.displayName??i.name??"Component"}const g=i=>{const o=u(i),a=({hideOnEmptyCart:s=!0,hideOnVirtualCart:r=!1,...e})=>{const t=p.value.data,l=t!==void 0&&(t===null||t.isEmpty),m=!!(t!=null&&t.isVirtual),c=s&&l||r&&m,d=`conditional-${o.toLowerCase()}`;return n("div",{className:d,children:!c&&n(i,{...e})})};return a.displayName=`Conditional(${o})`,a};export{g as w};
@@ -1,3 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- import{jsx as e}from"@dropins/tools/preact-jsx-runtime.js";function l(t,n){return function(o){const{initialized:r=!0,...i}=o;return e("div",{className:"skeleton-wrapper",children:r?e(t,{...i}):e(n,{})})}}export{l as W};
@@ -1,13 +0,0 @@
1
- import { Container } from '@dropins/tools/types/elsie/src/lib';
2
-
3
- export interface ConditionalProps {
4
- hideOnEmptyCart?: boolean;
5
- hideOnVirtualCart?: boolean;
6
- }
7
- export declare const withConditionalRendering: <P extends object>(WrappedContainer: Container<P, {
8
- [key: string]: any;
9
- }>) => {
10
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: ConditionalProps & P): import("preact").JSX.Element;
11
- displayName: string;
12
- };
13
- //# sourceMappingURL=withConditionalRendering.d.ts.map
@@ -1,8 +0,0 @@
1
- import { ComponentType } from 'preact';
2
- import { JSX } from 'preact/jsx-runtime';
3
-
4
- export interface WithSkeletonProps {
5
- initialized?: boolean;
6
- }
7
- export declare function WithSkeleton<P extends object>(Component: ComponentType<P>, Skeleton: ComponentType): (props: P & WithSkeletonProps) => JSX.Element;
8
- //# sourceMappingURL=withSkeleton.d.ts.map
@@ -1,18 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export * from './useBreakpoint';
18
- //# sourceMappingURL=index.d.ts.map
@@ -1,18 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const useBreakpoint: () => "small" | "medium" | "large" | "xlarge" | "xxlarge";
18
- //# sourceMappingURL=useBreakpoint.d.ts.map
@@ -1,2 +0,0 @@
1
- export * from './useStableList';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare const useStableList: <T>(list: T[], isEqual: (a: T[], b: T[]) => boolean) => T[];
2
- //# sourceMappingURL=useStableList.d.ts.map
@@ -1,23 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2024 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const handleFetchErrors: (errors?: Array<{
18
- message: string;
19
- extensions: {
20
- category: string;
21
- };
22
- }>) => void;
23
- //# sourceMappingURL=fetch-error.d.ts.map
@@ -1,7 +0,0 @@
1
- import { Cart } from '../data/models';
2
-
3
- export declare const cartSignal: import('@preact/signals-core').Signal<{
4
- pending: boolean;
5
- data?: Cart | null | undefined;
6
- }>;
7
- //# sourceMappingURL=CartSignal.d.ts.map