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

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 (145) hide show
  1. package/api/estimateShippingMethods/graphql/index.d.ts +15 -15
  2. package/api/estimateShippingMethods/index.d.ts +15 -15
  3. package/api/fetch-graphql/fetch-graphql.d.ts +19 -19
  4. package/api/fetch-graphql/index.d.ts +15 -15
  5. package/api/getCart/getCart.d.ts +1 -1
  6. package/api/getCart/graphql/index.d.ts +15 -15
  7. package/api/getCart/index.d.ts +15 -15
  8. package/api/getCheckoutAgreements/graphql/getCheckoutAgreements.graphql.d.ts +1 -1
  9. package/api/getCustomer/graphql/index.d.ts +15 -15
  10. package/api/getCustomer/index.d.ts +15 -15
  11. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +1 -1
  12. package/api/getStoreConfig/index.d.ts +15 -15
  13. package/api/initialize/index.d.ts +15 -15
  14. package/api/initializeCheckout/index.d.ts +15 -15
  15. package/api/initializeCheckout/initializeCheckout.d.ts +1 -1
  16. package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +15 -15
  17. package/api/isEmailAvailable/index.d.ts +15 -15
  18. package/api/setBillingAddress/index.d.ts +15 -15
  19. package/api/setBillingAddress/setBillingAddress.d.ts +1 -1
  20. package/api/setGuestEmailOnCart/index.d.ts +15 -15
  21. package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +1 -1
  22. package/api/setPaymentMethod/index.d.ts +15 -15
  23. package/api/setPaymentMethod/setPaymentMethod.d.ts +1 -1
  24. package/api/setShippingAddress/index.d.ts +15 -15
  25. package/api/setShippingAddress/setShippingAddress.d.ts +1 -1
  26. package/api/setShippingMethods/index.d.ts +15 -15
  27. package/api/setShippingMethods/setShippingMethods.d.ts +1 -1
  28. package/api/synchronizeCheckout/synchronizeCheckout.d.ts +1 -1
  29. package/api.js +9 -9
  30. package/chunks/ConditionalWrapper.js +3 -0
  31. package/chunks/ServerErrorSignal.js +3 -0
  32. package/chunks/TermsAndConditions.js +2 -2
  33. package/chunks/errors.js +11 -1
  34. package/chunks/setBillingAddress.js +2 -2
  35. package/chunks/setGuestEmailOnCart.js +6 -6
  36. package/chunks/setPaymentMethod.js +2 -2
  37. package/chunks/setShippingMethods.js +3 -3
  38. package/chunks/synchronizeCheckout.js +5 -5
  39. package/chunks/values.js +3 -0
  40. package/components/BillToShippingAddress/BillToShippingAddress.d.ts +2 -1
  41. package/components/BillToShippingAddress/index.d.ts +15 -15
  42. package/components/ConditionalWrapper/ConditionalWrapper.d.ts +8 -0
  43. package/{containers/Newsletter → components/ConditionalWrapper}/index.d.ts +2 -2
  44. package/components/EstimateShipping/EstimateShipping.d.ts +2 -2
  45. package/components/EstimateShipping/index.d.ts +15 -15
  46. package/components/LoginForm/LoginForm.d.ts +2 -2
  47. package/components/OutOfStock/index.d.ts +15 -15
  48. package/components/PaymentMethods/PaymentMethods.d.ts +7 -8
  49. package/components/PlaceOrder/PlaceOrder.d.ts +1 -1
  50. package/components/PlaceOrder/index.d.ts +15 -15
  51. package/components/ServerError/index.d.ts +15 -15
  52. package/components/ShippingMethods/ShippingMethods.d.ts +6 -4
  53. package/components/TermsAndConditions/TermsAndConditions.d.ts +2 -2
  54. package/components/index.d.ts +1 -1
  55. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +5 -20
  56. package/containers/BillToShippingAddress.js +1 -1
  57. package/containers/EstimateShipping/EstimateShipping.d.ts +5 -2
  58. package/containers/EstimateShipping/index.d.ts +15 -15
  59. package/containers/EstimateShipping.js +1 -1
  60. package/containers/LoginForm/LoginForm.d.ts +4 -5
  61. package/containers/LoginForm.js +1 -1
  62. package/containers/MergedCartBanner/MergedCartBanner.d.ts +5 -4
  63. package/containers/MergedCartBanner.js +1 -1
  64. package/containers/OutOfStock/OutOfStock.d.ts +1 -0
  65. package/containers/OutOfStock/index.d.ts +15 -15
  66. package/containers/OutOfStock.js +1 -1
  67. package/containers/PaymentMethods/PaymentMethods.d.ts +6 -23
  68. package/containers/PaymentMethods.js +1 -1
  69. package/containers/PlaceOrder/PlaceOrder.d.ts +3 -6
  70. package/containers/PlaceOrder/index.d.ts +15 -15
  71. package/containers/PlaceOrder.js +1 -1
  72. package/containers/ServerError/ServerError.d.ts +1 -0
  73. package/containers/ServerError.js +1 -1
  74. package/containers/ShippingMethods/ShippingMethods.d.ts +8 -11
  75. package/containers/ShippingMethods/utils/emitShippingEstimateEvent.d.ts +1 -1
  76. package/containers/ShippingMethods.js +1 -1
  77. package/containers/TermsAndConditions/TermsAndConditions.d.ts +1 -0
  78. package/containers/TermsAndConditions.js +1 -1
  79. package/containers/index.d.ts +0 -1
  80. package/data/models/country.d.ts +15 -15
  81. package/data/models/custom-attribute.d.ts +15 -15
  82. package/data/models/email-availability.d.ts +15 -15
  83. package/data/models/index.d.ts +1 -0
  84. package/data/models/payment-method.d.ts +15 -15
  85. package/data/models/price.d.ts +15 -15
  86. package/data/models/shipping-estimate.d.ts +4 -0
  87. package/data/models/store-config.d.ts +1 -4
  88. package/data/models/values.d.ts +11 -0
  89. package/data/transforms/transform-cart.d.ts +1 -1
  90. package/data/transforms/transform-shipping-methods.d.ts +1 -1
  91. package/i18n/en_US.json.d.ts +0 -3
  92. package/lib/dispatchApiCall.d.ts +6 -22
  93. package/lib/enqueueRequest.d.ts +11 -24
  94. package/lib/events.d.ts +8 -0
  95. package/lib/index.d.ts +3 -2
  96. package/lib/network-error.d.ts +15 -15
  97. package/lib/values.d.ts +17 -0
  98. package/msw/browser.d.ts +15 -15
  99. package/msw/fixtures/fragments/cart.d.ts +15 -15
  100. package/msw/fixtures/index.d.ts +15 -15
  101. package/msw/fixtures/mutations/index.d.ts +15 -15
  102. package/msw/fixtures/queries/index.d.ts +15 -15
  103. package/msw/server.d.ts +15 -15
  104. package/package.json +1 -1
  105. package/render/index.d.ts +15 -15
  106. package/render.js +5 -6
  107. package/signals/ShippingEstimateSignal.d.ts +6 -5
  108. package/signals/index.d.ts +0 -5
  109. package/tests/constants.d.ts +15 -15
  110. package/{api/getCart/fixtures.d.ts → tests/fixtures/cart.d.ts} +3 -3
  111. package/{api/getCustomer/fixtures.d.ts → tests/fixtures/customer.d.ts} +1 -1
  112. package/tests/fixtures/payments.d.ts +8 -0
  113. package/{api/estimateShippingMethods/fixtures.d.ts → tests/fixtures/shipping.d.ts} +1 -1
  114. package/tests/integration/utils/index.d.ts +15 -15
  115. package/tests/integration/utils/setup.d.ts +1 -1
  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/chunks/ShippingEstimateSignal.js +0 -14
  122. package/chunks/store-config.js +0 -3
  123. package/chunks/withConditionalRendering.js +0 -3
  124. package/chunks/withSkeleton.js +0 -3
  125. package/components/Newsletter/Newsletter.d.ts +0 -6
  126. package/components/Newsletter/NewsletterSkeleton.d.ts +0 -4
  127. package/components/Newsletter/index.d.ts +0 -20
  128. package/containers/Newsletter/Newsletter.d.ts +0 -9
  129. package/containers/Newsletter.d.ts +0 -3
  130. package/containers/Newsletter.js +0 -3
  131. package/hocs/index.d.ts +0 -19
  132. package/hocs/withConditionalRendering.d.ts +0 -13
  133. package/hocs/withSkeleton.d.ts +0 -8
  134. package/hooks/index.d.ts +0 -19
  135. package/hooks/useBreakpoint/index.d.ts +0 -18
  136. package/hooks/useBreakpoint/useBreakpoint.d.ts +0 -18
  137. package/hooks/useStableList/index.d.ts +0 -2
  138. package/hooks/useStableList/useStableList.d.ts +0 -2
  139. package/lib/debounce.d.ts +0 -30
  140. package/lib/fetch-error.d.ts +0 -23
  141. package/signals/CartSignal.d.ts +0 -7
  142. package/signals/IsBillToShippingSignal.d.ts +0 -18
  143. package/signals/IsSubscribedToNewsletterSignal.d.ts +0 -18
  144. package/signals/SelectedPaymentMethodSignal.d.ts +0 -18
  145. package/signals/SelectedShippingMethodSignal.d.ts +0 -4
@@ -1,18 +1,18 @@
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 function fillShippingAddress(): Promise<void>;
18
18
  //# sourceMappingURL=user-actions.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
  declare const _default: "SvgrURL";
18
18
  export default _default;
19
19
  export declare const ReactComponent = "div";
@@ -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
  type expectErrorProps = {
18
18
  candidate: (...args: any[]) => Promise<any>;
19
19
  args: any[];
@@ -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,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};
@@ -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,6 +0,0 @@
1
- import { HTMLAttributes } from 'preact/compat';
2
-
3
- export interface NewsletterProps extends HTMLAttributes<HTMLInputElement> {
4
- }
5
- export declare const Newsletter: (props: NewsletterProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
6
- //# sourceMappingURL=Newsletter.d.ts.map
@@ -1,4 +0,0 @@
1
- import { FunctionComponent } from 'preact';
2
-
3
- export declare const NewsletterSkeleton: FunctionComponent;
4
- //# sourceMappingURL=NewsletterSkeleton.d.ts.map
@@ -1,20 +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 './Newsletter';
18
- export * from './NewsletterSkeleton';
19
- export { Newsletter as default } from './Newsletter';
20
- //# sourceMappingURL=index.d.ts.map
@@ -1,9 +0,0 @@
1
- import { Container } from '@dropins/tools/types/elsie/src/lib';
2
-
3
- export interface NewsletterProps {
4
- defaultChecked?: boolean;
5
- onChange?: (checked: boolean) => void;
6
- showForAuthenticatedUsers?: boolean;
7
- }
8
- export declare const Newsletter: Container<NewsletterProps>;
9
- //# sourceMappingURL=Newsletter.d.ts.map
@@ -1,3 +0,0 @@
1
- export * from './Newsletter/index'
2
- import _default from './Newsletter/index'
3
- export default _default
@@ -1,3 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- import{jsx as r}from"@dropins/tools/preact-jsx-runtime.js";import{useState as n,useEffect as u}from"@dropins/tools/preact-hooks.js";import{events as m}from"@dropins/tools/event-bus.js";/* empty css */import{Skeleton as S,SkeletonRow as v,Checkbox as x}from"@dropins/tools/components.js";import{W as E}from"../chunks/withSkeleton.js";import{c as _}from"../chunks/classes.js";import{useText as z}from"@dropins/tools/i18n.js";import{i as c}from"../chunks/ShippingEstimateSignal.js";import{s as T}from"../chunks/store-config.js";import"@dropins/tools/lib.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/signals.js";const I=()=>r(S,{className:"checkout-newsletter-skeleton","data-testid":"checkout-newsletter-skeleton",children:r(v,{size:"small",variant:"row"})}),R=({className:o,checked:s,onChange:l})=>{const i=z({title:"Checkout.Newsletter.title"});return r("div",{className:"checkout-newsletter","data-testid":"checkout-newsletter",children:r(x,{checked:s,className:_(["checkout-newsletter__checkbox",o]),"data-testid":"checkout-newsletter-checkbox",label:i.title,name:"checkout-newsletter__checkbox",onChange:l})})},W=E(R,I),M=({defaultChecked:o=!1,onChange:s,showForAuthenticatedUsers:l=!1})=>{const[i,f]=n(!0),[d,k]=n(!1),[w,h]=n(!1),a=c.value;u(()=>{o&&!a&&(c.value=o)},[]);const p=(e,t,N)=>e&&(!t||N),b=async e=>{const t=e.target.checked;c.value=t,s==null||s(t)};return u(()=>{const e=m.on("checkout/initialized",()=>{var t;k(!0),f(((t=T.config)==null?void 0:t.newsletterEnabled)??!0)},{eager:!0});return()=>{e==null||e.off()}},[]),u(()=>{const e=m.on("authenticated",t=>{h(t)},{eager:!0});return()=>{e==null||e.off()}},[]),p(i,w,l)?r(W,{checked:a,initialized:d,onChange:b}):(a&&(c.value=!1,s==null||s(!1)),null)};export{M as Newsletter,M as default};
package/hocs/index.d.ts DELETED
@@ -1,19 +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 './withConditionalRendering';
18
- export * from './withSkeleton';
19
- //# sourceMappingURL=index.d.ts.map
@@ -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
package/hooks/index.d.ts DELETED
@@ -1,19 +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
- export * from './useStableList';
19
- //# 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 * 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
package/lib/debounce.d.ts DELETED
@@ -1,30 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2025 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
- /**
18
- * A debounce function that delays invoking the provided function until after
19
- * a specified wait time has elapsed since the last time it was invoked.
20
- *
21
- * @param fn The function to debounce
22
- * @param delay The delay in milliseconds
23
- * @returns A debounced function with cancel and flush methods
24
- */
25
- export declare function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): {
26
- (...args: Parameters<T>): void;
27
- cancel: () => void;
28
- flush: () => void;
29
- };
30
- //# sourceMappingURL=debounce.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
@@ -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 isBillToShippingSignal: import('@preact/signals-core').Signal<boolean>;
18
- //# sourceMappingURL=IsBillToShippingSignal.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 isSubscribedToNewsletterSignal: import('@preact/signals-core').Signal<boolean>;
18
- //# sourceMappingURL=IsSubscribedToNewsletterSignal.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 selectedPaymentMethodSignal: import('@preact/signals-core').Signal<string | undefined>;
18
- //# sourceMappingURL=SelectedPaymentMethodSignal.d.ts.map
@@ -1,4 +0,0 @@
1
- import { ShippingMethod } from '../data/models';
2
-
3
- export declare const selectedShippingMethodSignal: import('@preact/signals-core').Signal<ShippingMethod | undefined>;
4
- //# sourceMappingURL=SelectedShippingMethodSignal.d.ts.map