@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.
- package/api/estimateShippingMethods/graphql/index.d.ts +15 -15
- package/api/estimateShippingMethods/index.d.ts +15 -15
- package/api/fetch-graphql/fetch-graphql.d.ts +19 -19
- package/api/fetch-graphql/index.d.ts +15 -15
- package/api/getCart/getCart.d.ts +1 -1
- package/api/getCart/graphql/index.d.ts +15 -15
- package/api/getCart/index.d.ts +15 -15
- package/api/getCheckoutAgreements/graphql/getCheckoutAgreements.graphql.d.ts +1 -1
- package/api/getCustomer/graphql/index.d.ts +15 -15
- package/api/getCustomer/index.d.ts +15 -15
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +1 -1
- package/api/getStoreConfig/index.d.ts +15 -15
- package/api/initialize/index.d.ts +15 -15
- package/api/initializeCheckout/index.d.ts +15 -15
- package/api/initializeCheckout/initializeCheckout.d.ts +1 -1
- package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +15 -15
- package/api/isEmailAvailable/index.d.ts +15 -15
- package/api/setBillingAddress/index.d.ts +15 -15
- package/api/setBillingAddress/setBillingAddress.d.ts +1 -1
- package/api/setGuestEmailOnCart/index.d.ts +15 -15
- package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +1 -1
- package/api/setPaymentMethod/index.d.ts +15 -15
- package/api/setPaymentMethod/setPaymentMethod.d.ts +1 -1
- package/api/setShippingAddress/index.d.ts +15 -15
- package/api/setShippingAddress/setShippingAddress.d.ts +1 -1
- package/api/setShippingMethods/index.d.ts +15 -15
- package/api/setShippingMethods/setShippingMethods.d.ts +1 -1
- package/api/synchronizeCheckout/synchronizeCheckout.d.ts +1 -1
- package/api.js +9 -9
- package/chunks/ConditionalWrapper.js +3 -0
- package/chunks/ServerErrorSignal.js +3 -0
- package/chunks/TermsAndConditions.js +2 -2
- package/chunks/errors.js +11 -1
- package/chunks/setBillingAddress.js +2 -2
- package/chunks/setGuestEmailOnCart.js +6 -6
- package/chunks/setPaymentMethod.js +2 -2
- package/chunks/setShippingMethods.js +3 -3
- package/chunks/synchronizeCheckout.js +5 -5
- package/chunks/values.js +3 -0
- package/components/BillToShippingAddress/BillToShippingAddress.d.ts +2 -1
- package/components/BillToShippingAddress/index.d.ts +15 -15
- package/components/ConditionalWrapper/ConditionalWrapper.d.ts +8 -0
- package/{containers/Newsletter → components/ConditionalWrapper}/index.d.ts +2 -2
- package/components/EstimateShipping/EstimateShipping.d.ts +2 -2
- package/components/EstimateShipping/index.d.ts +15 -15
- package/components/LoginForm/LoginForm.d.ts +2 -2
- package/components/OutOfStock/index.d.ts +15 -15
- package/components/PaymentMethods/PaymentMethods.d.ts +7 -8
- package/components/PlaceOrder/PlaceOrder.d.ts +1 -1
- package/components/PlaceOrder/index.d.ts +15 -15
- package/components/ServerError/index.d.ts +15 -15
- package/components/ShippingMethods/ShippingMethods.d.ts +6 -4
- package/components/TermsAndConditions/TermsAndConditions.d.ts +2 -2
- package/components/index.d.ts +1 -1
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +5 -20
- package/containers/BillToShippingAddress.js +1 -1
- package/containers/EstimateShipping/EstimateShipping.d.ts +5 -2
- package/containers/EstimateShipping/index.d.ts +15 -15
- package/containers/EstimateShipping.js +1 -1
- package/containers/LoginForm/LoginForm.d.ts +4 -5
- package/containers/LoginForm.js +1 -1
- package/containers/MergedCartBanner/MergedCartBanner.d.ts +5 -4
- package/containers/MergedCartBanner.js +1 -1
- package/containers/OutOfStock/OutOfStock.d.ts +1 -0
- package/containers/OutOfStock/index.d.ts +15 -15
- package/containers/OutOfStock.js +1 -1
- package/containers/PaymentMethods/PaymentMethods.d.ts +6 -23
- package/containers/PaymentMethods.js +1 -1
- package/containers/PlaceOrder/PlaceOrder.d.ts +3 -6
- package/containers/PlaceOrder/index.d.ts +15 -15
- package/containers/PlaceOrder.js +1 -1
- package/containers/ServerError/ServerError.d.ts +1 -0
- package/containers/ServerError.js +1 -1
- package/containers/ShippingMethods/ShippingMethods.d.ts +8 -11
- package/containers/ShippingMethods/utils/emitShippingEstimateEvent.d.ts +1 -1
- package/containers/ShippingMethods.js +1 -1
- package/containers/TermsAndConditions/TermsAndConditions.d.ts +1 -0
- package/containers/TermsAndConditions.js +1 -1
- package/containers/index.d.ts +0 -1
- package/data/models/country.d.ts +15 -15
- package/data/models/custom-attribute.d.ts +15 -15
- package/data/models/email-availability.d.ts +15 -15
- package/data/models/index.d.ts +1 -0
- package/data/models/payment-method.d.ts +15 -15
- package/data/models/price.d.ts +15 -15
- package/data/models/shipping-estimate.d.ts +4 -0
- package/data/models/store-config.d.ts +1 -4
- package/data/models/values.d.ts +11 -0
- package/data/transforms/transform-cart.d.ts +1 -1
- package/data/transforms/transform-shipping-methods.d.ts +1 -1
- package/i18n/en_US.json.d.ts +0 -3
- package/lib/dispatchApiCall.d.ts +6 -22
- package/lib/enqueueRequest.d.ts +11 -24
- package/lib/events.d.ts +8 -0
- package/lib/index.d.ts +3 -2
- package/lib/network-error.d.ts +15 -15
- package/lib/values.d.ts +17 -0
- package/msw/browser.d.ts +15 -15
- package/msw/fixtures/fragments/cart.d.ts +15 -15
- package/msw/fixtures/index.d.ts +15 -15
- package/msw/fixtures/mutations/index.d.ts +15 -15
- package/msw/fixtures/queries/index.d.ts +15 -15
- package/msw/server.d.ts +15 -15
- package/package.json +1 -1
- package/render/index.d.ts +15 -15
- package/render.js +5 -6
- package/signals/ShippingEstimateSignal.d.ts +6 -5
- package/signals/index.d.ts +0 -5
- package/tests/constants.d.ts +15 -15
- package/{api/getCart/fixtures.d.ts → tests/fixtures/cart.d.ts} +3 -3
- package/{api/getCustomer/fixtures.d.ts → tests/fixtures/customer.d.ts} +1 -1
- package/tests/fixtures/payments.d.ts +8 -0
- package/{api/estimateShippingMethods/fixtures.d.ts → tests/fixtures/shipping.d.ts} +1 -1
- package/tests/integration/utils/index.d.ts +15 -15
- package/tests/integration/utils/setup.d.ts +1 -1
- package/tests/integration/utils/user-actions.d.ts +15 -15
- package/tests/mocks/svg.d.ts +15 -15
- package/tests/utils/expectError.d.ts +15 -15
- package/tests/utils/index.d.ts +15 -15
- package/tests/utils/mockEvents.d.ts +15 -15
- package/chunks/ShippingEstimateSignal.js +0 -14
- package/chunks/store-config.js +0 -3
- package/chunks/withConditionalRendering.js +0 -3
- package/chunks/withSkeleton.js +0 -3
- package/components/Newsletter/Newsletter.d.ts +0 -6
- package/components/Newsletter/NewsletterSkeleton.d.ts +0 -4
- package/components/Newsletter/index.d.ts +0 -20
- package/containers/Newsletter/Newsletter.d.ts +0 -9
- package/containers/Newsletter.d.ts +0 -3
- package/containers/Newsletter.js +0 -3
- package/hocs/index.d.ts +0 -19
- package/hocs/withConditionalRendering.d.ts +0 -13
- package/hocs/withSkeleton.d.ts +0 -8
- package/hooks/index.d.ts +0 -19
- package/hooks/useBreakpoint/index.d.ts +0 -18
- package/hooks/useBreakpoint/useBreakpoint.d.ts +0 -18
- package/hooks/useStableList/index.d.ts +0 -2
- package/hooks/useStableList/useStableList.d.ts +0 -2
- package/lib/debounce.d.ts +0 -30
- package/lib/fetch-error.d.ts +0 -23
- package/signals/CartSignal.d.ts +0 -7
- package/signals/IsBillToShippingSignal.d.ts +0 -18
- package/signals/IsSubscribedToNewsletterSignal.d.ts +0 -18
- package/signals/SelectedPaymentMethodSignal.d.ts +0 -18
- 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
|
package/tests/mocks/svg.d.ts
CHANGED
|
@@ -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[];
|
package/tests/utils/index.d.ts
CHANGED
|
@@ -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};
|
package/chunks/store-config.js
DELETED
|
@@ -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};
|
package/chunks/withSkeleton.js
DELETED
|
@@ -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,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
|
package/containers/Newsletter.js
DELETED
|
@@ -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
|
package/hocs/withSkeleton.d.ts
DELETED
|
@@ -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
|
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
|
package/lib/fetch-error.d.ts
DELETED
|
@@ -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
|
package/signals/CartSignal.d.ts
DELETED
|
@@ -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
|