@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,7 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
1
2
  import { HTMLAttributes } from 'preact/compat';
2
3
 
3
4
  export interface BillToShippingAddressProps extends Omit<HTMLAttributes<HTMLInputElement>, 'loading' | 'disabled'> {
4
5
  disabled?: boolean;
5
6
  }
6
- export declare const BillToShippingAddress: (props: BillToShippingAddressProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
7
+ export declare const BillToShippingAddress: FunctionComponent<BillToShippingAddressProps & import('../ConditionalWrapper/ConditionalWrapper').ConditionalProps>;
7
8
  //# sourceMappingURL=BillToShippingAddress.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 * from './BillToShippingAddress';
18
18
  export * from './BillToShippingAddressSkeleton';
19
19
  export { BillToShippingAddress as default } from './BillToShippingAddress';
@@ -0,0 +1,8 @@
1
+ import { FunctionComponent } from 'preact';
2
+
3
+ export interface ConditionalProps {
4
+ isInitialized?: boolean;
5
+ isVisible?: boolean;
6
+ }
7
+ export declare function WithConditionals<P extends object>(Component: FunctionComponent<P>, Skeleton: FunctionComponent): FunctionComponent<P & ConditionalProps>;
8
+ //# sourceMappingURL=ConditionalWrapper.d.ts.map
@@ -14,6 +14,6 @@
14
14
  * is strictly forbidden unless prior written permission is obtained
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
- export * from './withConditionalRendering';
18
- export * from './withSkeleton';
17
+ export * from './ConditionalWrapper';
18
+ export { WithConditionals as default } from './ConditionalWrapper';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -2,11 +2,11 @@ import { FunctionComponent, VNode } from 'preact';
2
2
  import { HTMLAttributes } from 'preact/compat';
3
3
 
4
4
  export interface EstimateShippingProps {
5
- estimated?: boolean;
5
+ label: VNode<HTMLAttributes<HTMLSpanElement>>;
6
6
  price: VNode<HTMLAttributes<HTMLSpanElement>>;
7
7
  priceExclTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
8
8
  taxExcluded?: boolean;
9
9
  taxIncluded?: boolean;
10
10
  }
11
- export declare const EstimateShipping: FunctionComponent<EstimateShippingProps>;
11
+ export declare const EstimateShipping: FunctionComponent<EstimateShippingProps & import('../ConditionalWrapper').ConditionalProps>;
12
12
  //# sourceMappingURL=EstimateShipping.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 * from './EstimateShipping';
18
18
  export { EstimateShipping as default } from './EstimateShipping';
19
19
  export * from './EstimateShippingSkeleton';
@@ -1,5 +1,5 @@
1
1
  import { Customer } from '../../data/models';
2
- import { VNode } from 'preact';
2
+ import { FunctionComponent, VNode } from 'preact';
3
3
  import { HTMLAttributes } from 'preact/compat';
4
4
 
5
5
  export interface LoginFormProps extends Omit<HTMLAttributes<HTMLFormElement>, 'title'> {
@@ -13,5 +13,5 @@ export interface LoginFormProps extends Omit<HTMLAttributes<HTMLFormElement>, 't
13
13
  onEmailInvalid: (event: Event) => void;
14
14
  title?: VNode;
15
15
  }
16
- export declare const LoginForm: (props: LoginFormProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
16
+ export declare const LoginForm: FunctionComponent<LoginFormProps & import('..').ConditionalProps>;
17
17
  //# sourceMappingURL=LoginForm.d.ts.map
@@ -1,6 +1,7 @@
1
+ import { FunctionComponent } from 'preact';
1
2
  import { HTMLAttributes } from 'preact/compat';
2
3
 
3
4
  export interface NewsletterProps extends HTMLAttributes<HTMLInputElement> {
4
5
  }
5
- export declare const Newsletter: (props: NewsletterProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
6
+ export declare const Newsletter: FunctionComponent<NewsletterProps & import('../ConditionalWrapper').ConditionalProps>;
6
7
  //# sourceMappingURL=Newsletter.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 * from './OutOfStock';
18
18
  export { OutOfStock as default } from './OutOfStock';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,21 +1,20 @@
1
1
  import { PaymentMethodConfig } from '../../containers';
2
2
  import { PaymentMethod } from '../../data/models/payment-method';
3
- import { VNode } from 'preact';
4
- import { HTMLAttributes } from 'preact/compat';
5
3
  import { UIComponentType } from '../../types/ComponentTypes';
4
+ import { FunctionComponent, VNode } from 'preact';
5
+ import { HTMLAttributes } from 'preact/compat';
6
6
 
7
7
  interface ExtendedPaymentMethod extends PaymentMethodConfig, PaymentMethod {
8
8
  }
9
9
  export interface PaymentMethodsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'loading' | 'title'> {
10
- title?: VNode;
11
- initializing?: boolean;
12
- loading?: boolean;
10
+ isLoading?: boolean;
13
11
  onChange?: (value: string) => void;
14
12
  options?: ExtendedPaymentMethod[];
15
13
  paymentMethodContent?: VNode;
16
14
  selection?: string;
15
+ title?: VNode;
17
16
  UIComponentType?: UIComponentType;
18
17
  }
19
- export declare const PaymentMethods: (props: PaymentMethodsProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
18
+ export declare const PaymentMethods: FunctionComponent<PaymentMethodsProps & import('../ConditionalWrapper/ConditionalWrapper').ConditionalProps>;
20
19
  export {};
21
20
  //# sourceMappingURL=PaymentMethods.d.ts.map
@@ -5,5 +5,5 @@ export interface PlaceOrderProps extends HTMLAttributes<HTMLDivElement> {
5
5
  disabled?: boolean;
6
6
  onClick: (event: Event) => Promise<void>;
7
7
  }
8
- export declare const PlaceOrder: FunctionComponent<PlaceOrderProps>;
8
+ export declare const PlaceOrder: FunctionComponent<PlaceOrderProps & import('../ConditionalWrapper/index').ConditionalProps>;
9
9
  //# sourceMappingURL=PlaceOrder.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 * from './PlaceOrder';
18
18
  export * from './PlaceOrderSkeleton';
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 * from './ServerError';
18
18
  export { ServerError as default } from './ServerError';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,13 +1,15 @@
1
1
  import { ShippingMethod } from '../../data/models';
2
- import { VNode } from 'preact';
2
+ import { FunctionComponent, VNode } from 'preact';
3
3
  import { HTMLAttributes } from 'preact/compat';
4
+ import { UIComponentType } from '../../types/ComponentTypes';
4
5
 
5
6
  export interface ShippingMethodsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
6
- isLoading?: boolean;
7
7
  onSelectionChange?: (method: ShippingMethod) => void;
8
+ isLoading?: boolean;
8
9
  options: ShippingMethod[];
9
10
  selection?: ShippingMethod;
10
11
  title?: VNode;
12
+ UIComponentType?: UIComponentType;
11
13
  }
12
- export declare const ShippingMethods: (props: ShippingMethodsProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
14
+ export declare const ShippingMethods: FunctionComponent<ShippingMethodsProps & import('../ConditionalWrapper/ConditionalWrapper').ConditionalProps>;
13
15
  //# sourceMappingURL=ShippingMethods.d.ts.map
@@ -1,9 +1,9 @@
1
- import { VNode } from 'preact';
1
+ import { FunctionComponent, VNode } from 'preact';
2
2
  import { HTMLAttributes } from 'preact/compat';
3
3
 
4
4
  export interface TermsAndConditionsProps extends HTMLAttributes<HTMLFormElement> {
5
5
  agreements?: VNode;
6
6
  error?: string;
7
7
  }
8
- export declare const TermsAndConditions: (props: TermsAndConditionsProps & import('../../hocs/withSkeleton').WithSkeletonProps) => import("preact").JSX.Element;
8
+ export declare const TermsAndConditions: FunctionComponent<TermsAndConditionsProps & import('..').ConditionalProps>;
9
9
  //# sourceMappingURL=TermsAndConditions.d.ts.map
@@ -15,6 +15,7 @@
15
15
  * from Adobe.
16
16
  *******************************************************************/
17
17
  export * from './BillToShippingAddress';
18
+ export * from './ConditionalWrapper/index';
18
19
  export * from './EstimateShipping';
19
20
  export * from './LoginForm';
20
21
  export * from './Markup';
@@ -1,24 +1,7 @@
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
- *******************************************************************/
1
+ import { Container } from '../../../@adobe-commerce/elsie/src/lib';
2
+
17
3
  export interface BillToShippingAddressProps {
18
4
  onChange?: (checked: boolean) => void;
19
5
  }
20
- export declare const BillToShippingAddress: {
21
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact").JSX.Element;
22
- displayName: string;
23
- };
6
+ export declare const BillToShippingAddress: Container<BillToShippingAddressProps>;
24
7
  //# sourceMappingURL=BillToShippingAddress.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as t}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/store-config.js";import"@dropins/tools/lib.js";import{e as a,c as g}from"../chunks/ShippingEstimateSignal.js";import"@dropins/tools/event-bus.js";import{s as S}from"../chunks/setBillingAddress.js";/* empty css */import{Skeleton as b,SkeletonRow as f,Checkbox as A}from"@dropins/tools/components.js";import{W as B}from"../chunks/withSkeleton.js";import{c as T}from"../chunks/classes.js";import{useText as x}from"@dropins/tools/i18n.js";import{w as v}from"../chunks/withConditionalRendering.js";import{useState as _,useEffect as w}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/signals.js";import"../fragments.js";import"../chunks/synchronizeCheckout.js";import"../chunks/errors.js";const y=()=>t(b,{className:"bill-to-shipping-address__skeleton",children:t(f,{size:"small",variant:"row"})}),N=({className:i,checked:e,disabled:r,onChange:n})=>{const s=x({title:"Checkout.BillToShippingAddress.title"});return t("div",{className:"checkout-bill-to-shipping-address",children:t(A,{checked:e,className:T(["checkout-bill-to-shipping-address__checkbox",i]),"data-testid":"bill-to-shipping-checkbox",disabled:r,label:s.title,name:"checkout-bill-to-shipping-address__checkbox",onChange:n})})},C=B(N,y),k=({onChange:i})=>{var h;const[e,r]=_(!0),n=a.value,s=g.value.data,u=g.value.pending,d=!!s,p=!!(s==null?void 0:s.billingAddress),o=(h=s==null?void 0:s.shippingAddresses)==null?void 0:h[0],m=o==null?void 0:o.sameAsBilling;return w(()=>{if(!e||!d)return;r(!1);const l=m??!p;a.value=l,i==null||i(l)},[d,p,m,e,i]),t(C,{checked:n,disabled:u,initialized:!e,onChange:async l=>{const c=l.target.checked;a.value=c,i==null||i(c),!e&&o&&c&&await S({sameAsShipping:!0}).catch(console.error)}})};k.displayName="BillToShippingAddressContainer";const X=v(k);export{X as BillToShippingAddress,X as default};
3
+ import{jsx as n}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/subscription-email-statuses.js";import"@dropins/tools/lib.js";import{i as a,h as S}from"../chunks/IsBillToShippingSignal.js";import{events as u}from"@dropins/tools/event-bus.js";import{s as T}from"../chunks/setBillingAddress.js";/* empty css */import{Skeleton as x,SkeletonRow as v,Checkbox as _}from"@dropins/tools/components.js";import{W as z}from"../chunks/ConditionalWrapper.js";import{c as I}from"../chunks/classes.js";import{useText as V}from"@dropins/tools/i18n.js";import"../chunks/SelectedPaymentMethodSignal.js";import"../chunks/SelectedShippingMethodSignal.js";import"../chunks/ServerErrorSignal.js";import{useState as h,useRef as f,useCallback as g,useEffect as k}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/synchronizeCheckout.js";const N=()=>n(x,{className:"bill-to-shipping-address__skeleton","data-testid":"bill-to-shipping-skeleton",children:n(v,{size:"small",variant:"row"})}),w=({className:s,checked:e,disabled:t,onChange:c})=>{const l=V({title:"Checkout.BillToShippingAddress.title"});return n("div",{className:"checkout-bill-to-shipping-address",children:n(_,{checked:e,className:I(["checkout-bill-to-shipping-address__checkbox",s]),"data-testid":"bill-to-shipping-checkbox",disabled:t,label:l.title,name:"checkout-bill-to-shipping-address__checkbox",onChange:c})})},D=z(w,N);function E(s){var l;const e=(l=s.shippingAddresses)==null?void 0:l[0],t=!!s.billingAddress;return(e==null?void 0:e.sameAsBilling)??!t}function P(s){var t;return!!((t=s.shippingAddresses)==null?void 0:t[0])}const C=({onChange:s})=>{const[e,t]=h(!0),[c,l]=h(!1),d=f(!1),m=f(!1),b=a.value,A=S.value,B=g(i=>{const r=i.target.checked;a.value=r,s==null||s(r),m.current&&r&&T({sameAsShipping:!0}).catch(console.error)},[s]),p=g(i=>{const o=!!i&&!i.isEmpty&&!i.isVirtual;if(t(o),!o){a.value=!1,d.current=!1;return}if(m.current=P(i),!d.current){const r=E(i);a.value=r,d.current=!0,s==null||s(r)}},[s]);return k(()=>{const i=u.on("checkout/initialized",o=>{l(!0),p(o)},{eager:!0});return()=>{i==null||i.off()}},[p]),k(()=>{const i=u.on("checkout/updated",p,{eager:!1});return()=>{i==null||i.off()}},[p]),n(D,{checked:b,disabled:A,isInitialized:c,isVisible:e,onChange:B})};export{C as BillToShippingAddress,C as default};
@@ -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 './EstimateShipping';
18
18
  export { EstimateShipping as default } from './EstimateShipping';
19
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsxs as k,Fragment as y,jsx as t}from"@dropins/tools/preact-jsx-runtime.js";/* empty css */import{Skeleton as v,SkeletonRow as M,Price as x}from"@dropins/tools/components.js";import"../chunks/TermsAndConditions.js";import{VComponent as A,classes as I}from"@dropins/tools/lib.js";import{Text as l,useText as w}from"@dropins/tools/i18n.js";/* empty css *//* empty css *//* empty css *//* empty css */import{s as z,T as C}from"../chunks/store-config.js";import{events as g}from"@dropins/tools/event-bus.js";import{useState as B,useEffect as f}from"@dropins/tools/preact-hooks.js";const G=({estimated:e=!1,price:a,priceExclTax:d,taxExcluded:o=!1,taxIncluded:p=!1})=>k(y,{children:[t("span",{className:"checkout-estimate-shipping__label",children:e?t(l,{id:"Checkout.EstimateShipping.estimated"}):t(l,{id:"Checkout.EstimateShipping.label"})}),t(A,{className:"checkout-estimate-shipping__price",node:a}),p&&t("span",{className:I(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included",children:t(l,{id:"Checkout.EstimateShipping.withTaxes"})}),o&&k("span",{className:I(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included-excluded",children:[d," ",t(l,{id:"Checkout.EstimateShipping.withoutTaxes"})]})]}),L=()=>t(v,{"data-testid":"estimate-shipping-skeleton",children:t(M,{size:"xsmall"})}),Q=()=>{const[e,a]=B(),d=e!==void 0,o=(e==null?void 0:e.amount.value)===0,p=z.config,T=p==null?void 0:p.shoppingCartDisplaySetting.shipping,_=T===C.INCLUDING_EXCLUDING_TAX,E=T===C.INCLUDING_TAX,S=w({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined"});f(()=>{const i=g.on("shipping/estimate",n=>{const s=n.shippingMethod,{amount:c,amountExclTax:r,amountInclTax:m}=s;a({estimated:!0,amount:c,amountExclTax:r,amountInclTax:m})},{eager:!0});return()=>{i==null||i.off()}},[]),f(()=>{const i=g.on("checkout/initialized",n=>{var u,h;const s=(h=(u=n==null?void 0:n.shippingAddresses)==null?void 0:u[0])==null?void 0:h.selectedShippingMethod;if(!s)return;const{amount:c,amountExclTax:r,amountInclTax:m}=s;a({estimated:!1,amount:c,amountExclTax:r,amountInclTax:m})},{eager:!0});return()=>{i==null||i.off()}},[]),f(()=>{const i=g.on("checkout/updated",n=>{var u,h;const s=(h=(u=n==null?void 0:n.shippingAddresses)==null?void 0:u[0])==null?void 0:h.selectedShippingMethod;if(!s)return;const{amount:c,amountExclTax:r,amountInclTax:m}=s;a({estimated:!1,amount:c,amountExclTax:r,amountInclTax:m})},{eager:!0});return()=>{i==null||i.off()}},[]);const D=()=>o?t("span",{"data-testId":"free-shipping",children:S.freeShipping}):E&&(e!=null&&e.amountInclTax)?t(x,{amount:e.amountInclTax.value,currency:e.amountInclTax.currency,"data-testid":"shipping"}):t(x,{amount:e==null?void 0:e.amount.value,currency:e==null?void 0:e.amount.currency,"data-testid":"shipping"}),N=()=>e!=null&&e.amountExclTax?t(x,{amount:e.amountExclTax.value,currency:e.amountExclTax.currency,"data-testid":"shipping-excluding-tax"}):t("span",{children:S.taxToBeDetermined});return t("div",{className:"checkout-estimate-shipping","data-testid":"estimate-shipping",children:d?t(G,{estimated:e.estimated,price:D(),priceExclTax:N(),taxExcluded:_&&!o,taxIncluded:E&&!o}):t(L,{})})};export{Q as EstimateShipping,Q as default};
3
+ import{jsx as i,jsxs as S}from"@dropins/tools/preact-jsx-runtime.js";/* empty css */import{Skeleton as z,SkeletonRow as w,Price as h}from"@dropins/tools/components.js";import{W as B}from"../chunks/ConditionalWrapper.js";import"../chunks/TermsAndConditions.js";import{VComponent as k,classes as I}from"@dropins/tools/lib.js";import{Text as C,useText as G}from"@dropins/tools/i18n.js";/* empty css *//* empty css *//* empty css *//* empty css */import{s as P,T as D}from"../chunks/subscription-email-statuses.js";import{events as d}from"@dropins/tools/event-bus.js";import{useState as b,useCallback as X,useEffect as x}from"@dropins/tools/preact-hooks.js";const j=()=>i(z,{"data-testid":"estimate-shipping-skeleton",children:i(w,{size:"xsmall"})}),A=({label:o,price:p,priceExclTax:e,taxExcluded:n=!1,taxIncluded:l=!1})=>S("div",{className:"checkout-estimate-shipping","data-testid":"estimate-shipping",children:[i(k,{className:"checkout-estimate-shipping__label",node:o}),i(k,{className:"checkout-estimate-shipping__price",node:p}),l&&i("span",{className:I(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included",children:i(C,{id:"Checkout.EstimateShipping.withTaxes"})}),n&&S("span",{className:I(["checkout-estimate-shipping__caption"]),"data-testid":"shipping-tax-included-excluded",children:[e," ",i(C,{id:"Checkout.EstimateShipping.withoutTaxes"})]})]}),U=B(A,j),ie=()=>{var T;const[o,p]=b(!1),[e,n]=b(null),l=!o||o&&e!==null,u=(e==null?void 0:e.amount.value)===0,g=(T=P.config)==null?void 0:T.shoppingCartDisplaySetting.shipping,y=g===D.INCLUDING_EXCLUDING_TAX,f=g===D.INCLUDING_TAX,c=G({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined",label:"Checkout.EstimateShipping.label",estimated:"Checkout.EstimateShipping.estimated"}),r=X(t=>{var E;if(!t||t.isEmpty){n(null);return}const s=(E=t.shippingAddresses)==null?void 0:E[0],a=s==null?void 0:s.selectedShippingMethod;if(!a){n(null);return}const{amount:v,amountExclTax:L,amountInclTax:M}=a;n({estimated:!1,amount:v,amountExclTax:L,amountInclTax:M}),p(!0)},[]);x(()=>{const t=d.on("shipping/estimate",m=>{let s=null;if(m.shippingMethod){const a=m.shippingMethod;s={estimated:!0,amount:a.amount,amountExclTax:a.amountExclTax,amountInclTax:a.amountInclTax}}n(s),p(!0)},{eager:!0});return()=>{t==null||t.off()}},[]),x(()=>{const t=d.on("checkout/initialized",r,{eager:!0});return()=>{t==null||t.off()}},[r]),x(()=>{const t=d.on("checkout/updated",r,{eager:!1});return()=>{t==null||t.off()}},[r]);const _=()=>u?i("span",{"data-testId":"free-shipping",children:c.freeShipping}):f&&(e!=null&&e.amountInclTax)?i(h,{amount:e.amountInclTax.value,currency:e.amountInclTax.currency,"data-testid":"shipping"}):i(h,{amount:e==null?void 0:e.amount.value,currency:e==null?void 0:e.amount.currency,"data-testid":"shipping"}),N=()=>e!=null&&e.amountExclTax?i(h,{amount:e.amountExclTax.value,currency:e.amountExclTax.currency,"data-testid":"shipping-excluding-tax"}):i("span",{children:c.taxToBeDetermined});return i(U,{isInitialized:o,isVisible:l,label:(()=>{const t=e!=null&&e.estimated?c.estimated:c.label;return i("span",{"data-testid":"estimate-shipping-label",children:t})})(),price:_(),priceExclTax:N(),taxExcluded:y&&!u,taxIncluded:f&&!u})};export{ie as EstimateShipping,ie as default};
@@ -1,5 +1,5 @@
1
1
  import { TitleProps } from '../../types/TitleProps';
2
- import { SlotProps } from '@dropins/tools/types/elsie/src/lib';
2
+ import { Container, SlotProps } from '../../../@adobe-commerce/elsie/src/lib';
3
3
  import { HTMLAttributes } from 'preact/compat';
4
4
 
5
5
  export interface LoginFormProps extends HTMLAttributes<HTMLFormElement>, TitleProps {
@@ -12,8 +12,5 @@ export interface LoginFormProps extends HTMLAttributes<HTMLFormElement>, TitlePr
12
12
  }>;
13
13
  } & TitleProps['slots'];
14
14
  }
15
- export declare const LoginForm: {
16
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & LoginFormProps): import("preact/compat").JSX.Element;
17
- displayName: string;
18
- };
15
+ export declare const LoginForm: Container<LoginFormProps>;
19
16
  //# sourceMappingURL=LoginForm.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as t,jsxs as s,Fragment as X}from"@dropins/tools/preact-jsx-runtime.js";import{s as Y}from"../chunks/store-config.js";import{VComponent as I,classes as Z,Slot as H}from"@dropins/tools/lib.js";import"../chunks/ShippingEstimateSignal.js";import{events as T}from"@dropins/tools/event-bus.js";import{g as ee,i as te,s as re}from"../chunks/setGuestEmailOnCart.js";import{Field as oe,Input as ne,Skeleton as ie,SkeletonRow as x}from"@dropins/tools/components.js";import{useText as w,Text as F}from"@dropins/tools/i18n.js";/* empty css */import{W as ae}from"../chunks/withSkeleton.js";import"../chunks/TermsAndConditions.js";/* empty css *//* empty css *//* empty css *//* empty css */import{w as le}from"../chunks/withConditionalRendering.js";import{useRef as z,useState as f,useMemo as p,useCallback as M,useEffect as $}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/signals.js";import"../chunks/synchronizeCheckout.js";import"../fragments.js";import"../chunks/errors.js";function ce(o,n){let r=null,i=null;function m(...l){i=l,r!==null&&clearTimeout(r),r=setTimeout(()=>{i&&(o(...i),i=null),r=null},n)}return m.cancel=function(){r!==null&&(clearTimeout(r),r=null,i=null)},m.flush=function(){r!==null&&i&&(clearTimeout(r),o(...i),r=null,i=null)},m}const ue={EMAIL:/^[a-z0-9,!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9,!#$%&'*+/=?^_`{|}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i},C=o=>ue.EMAIL.test(o),me=({value:o,error:n,hint:r,onChange:i,onBlur:m,onInvalid:l})=>{const d=w({LoginFormLabel:"Checkout.LoginForm.ariaLabel",LoginFormFloatingLabel:"Checkout.LoginForm.floatingLabel",LoginFormPlaceholder:"Checkout.LoginForm.placeholder"});return t(oe,{error:n,hint:r,children:t(ne,{"aria-label":d.LoginFormLabel,"aria-required":!0,autocomplete:"email",floatingLabel:d.LoginFormFloatingLabel,id:"customer-email",name:"customer-email",placeholder:d.LoginFormPlaceholder,required:!0,type:"email",value:o,onBlur:m,onChange:i,onInvalid:l})})},se=({onClick:o})=>s("div",{className:"checkout-login-form__sign-in",children:[t(F,{id:"Checkout.LoginForm.account"}),t("a",{className:"checkout-login-form__link","data-testid":"sign-in-link",href:"#",rel:"noreferrer",target:"_blank",onClick:n=>{n.preventDefault(),o(n)},children:t(F,{id:"Checkout.LoginForm.signIn"})})]}),de=()=>s(ie,{"data-testid":"login-form-skeleton",children:[t(x,{fullWidth:!0,variant:"heading"}),t(x,{fullWidth:!0,size:"medium"})]}),he=({className:o,customer:n=null,email:r,error:i,headingContent:m,hint:l,name:d,onEmailBlur:E,onEmailChange:g,onEmailInvalid:k,title:h,..._})=>s("div",{className:"checkout-login-form","data-testid":"checkout-login-form",children:[s("div",{className:"checkout-login-form__heading",children:[h&&t(I,{className:"checkout-login-form__title",node:h}),m&&t(I,{className:"checkout-login-form__heading-label",node:m})]}),n?s("div",{className:"checkout-login-form__customer-details",children:[t("div",{className:"checkout-login-form__customer-name",children:`${n.firstName} ${n.lastName}`}),t("div",{className:"checkout-login-form__customer-email",children:n.email})]}):t("div",{className:"checkout-login-form__content",children:s("form",{..._,noValidate:!0,className:Z(["dropin-login-form__form",o]),name:d,children:[t("button",{disabled:!0,"aria-hidden":"true",style:"display: none",type:"submit"}),t(me,{error:i,hint:l,value:r,onBlur:E,onChange:g,onInvalid:k})]})})]}),ge=ae(he,de),fe=({onClick:o})=>s("p",{className:"checkout-login-form__sign-out",children:[t(F,{id:"Checkout.LoginForm.switch"}),t("a",{className:"checkout-login-form__link",href:"#",rel:"noreferrer",target:"_blank",onClick:n=>{n.preventDefault(),o==null||o(n)},children:t(F,{id:"Checkout.LoginForm.signOut"})})]}),Ee=1e3,B=({displayTitle:o=!0,displayHeadingContent:n=!0,onSignInClick:r,onSignOutClick:i,initialData:m,slots:l,...d})=>{const E=z(""),g=z(""),[k,h]=f(!0),[_,y]=f(""),[S,L]=f(""),[V,D]=f(!1),[b,P]=f(Y.authenticated),[W,R]=f(null),u=w({AlreadyHaveAccountHint:"Checkout.LoginForm.emailExists.alreadyHaveAccount",FasterCheckoutHint:"Checkout.LoginForm.emailExists.forFasterCheckout",InvalidEmailError:"Checkout.LoginForm.invalidEmailError",MissingEmailError:"Checkout.LoginForm.missingEmailError",SignInLabel:"Checkout.LoginForm.emailExists.signInButton",Title:"Checkout.LoginForm.title"}),j=e=>e.valid?"":e.valueMissing?u.MissingEmailError:u.InvalidEmailError,q=e=>C(e)?"":e===""?u.MissingEmailError:u.InvalidEmailError,N=p(()=>ce(async e=>{try{if(!C(e)||E.current===e)return;const[a]=await Promise.all([te(e),re(e)]);h(a),E.current=e}catch(a){console.error(a),h(!0)}},Ee),[]),G=async e=>{const c=e.target.value;y(c),h(!0),L(""),g.current=c,N(c)},U=e=>{const a=e.target,c=q(a.value);a.setCustomValidity(c),L(c),N.flush()},J=e=>{const a=e.target;L(j(a.validity))},v=M(()=>{const e=g.current;r==null||r(C(e)?e:"")},[r]),A=M(()=>{console.debug("Sign out clicked"),g.current="",i==null||i()},[i]);$(()=>{const e=T.on("authenticated",a=>{P(a),ee().then(c=>{R(c)}).catch(console.error)},{eager:!0});return()=>{e==null||e.off()}},[]),$(()=>{const e=T.on("checkout/initialized",a=>{const c=(a==null?void 0:a.email)??"";D(!0),y(c),L(""),h(!0),c!==""&&(g.current=c,E.current=c)},{eager:!0});return()=>{e==null||e.off()}},[]);const K=p(()=>{if(o)return t(H,{name:"checkout-login-form-title",slot:l==null?void 0:l.Title,children:t("h2",{children:u.Title})})},[o,l,u.Title]),O=p(()=>{if(n)return t(H,{context:{authenticated:b},name:"checkout-login-form-heading-label",slot:l==null?void 0:l.Heading,children:b?t(fe,{onClick:A}):t(se,{onClick:v})})},[n,b,l,v,A]),Q=p(()=>k?"":s(X,{children:[u.AlreadyHaveAccountHint," ",t("a",{href:"#",onClick:v,children:u.SignInLabel})," ",u.FasterCheckoutHint]}),[k,u.AlreadyHaveAccountHint,u.SignInLabel,u.FasterCheckoutHint,v]);return t(ge,{...d,customer:W,email:_,error:S,headingContent:O,hint:Q,initialized:V,title:K,onEmailBlur:U,onEmailChange:G,onEmailInvalid:J})};B.displayName="LoginFormContainer";const De=le(B);export{De as LoginForm,De as default};
3
+ import{jsx as t,jsxs as m,Fragment as te}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/subscription-email-statuses.js";import{VComponent as S,classes as re,Slot as j}from"@dropins/tools/lib.js";import"../chunks/IsBillToShippingSignal.js";import{events as z}from"@dropins/tools/event-bus.js";import{i as ie,s as oe,g as ne}from"../chunks/setGuestEmailOnCart.js";import{Field as ae,Input as le,Skeleton as ce,SkeletonRow as q}from"@dropins/tools/components.js";import{useText as w,Text as N}from"@dropins/tools/i18n.js";/* empty css */import{W as se}from"../chunks/ConditionalWrapper.js";import"../chunks/TermsAndConditions.js";/* empty css *//* empty css *//* empty css *//* empty css */import{useState as h,useRef as I,useCallback as g,useEffect as V,useMemo as D}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../fragments.js";import"../chunks/synchronizeCheckout.js";const me={EMAIL:/^[a-z0-9,!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9,!#$%&'*+/=?^_`{|}~-]+)*@([a-z0-9-]+\.)+[a-z]{2,}$/i},$=n=>me.EMAIL.test(n),ue=({value:n,error:i,hint:c,onChange:s,onBlur:f,onInvalid:l})=>{const u=w({LoginFormLabel:"Checkout.LoginForm.ariaLabel",LoginFormFloatingLabel:"Checkout.LoginForm.floatingLabel",LoginFormPlaceholder:"Checkout.LoginForm.placeholder"});return t(ae,{error:i,hint:c,children:t(le,{"aria-label":u.LoginFormLabel,"aria-required":!0,autocomplete:"email",floatingLabel:u.LoginFormFloatingLabel,id:"customer-email",name:"customer-email",placeholder:u.LoginFormPlaceholder,required:!0,type:"email",value:n,onBlur:f,onChange:s,onInvalid:l})})},de=({onClick:n})=>m("div",{className:"checkout-login-form__sign-in",children:[t(N,{id:"Checkout.LoginForm.account"}),t("a",{className:"checkout-login-form__link","data-testid":"sign-in-link",href:"#",rel:"noreferrer",target:"_blank",onClick:i=>{i.preventDefault(),n(i)},children:t(N,{id:"Checkout.LoginForm.signIn"})})]}),he=()=>m(ce,{"data-testid":"login-form-skeleton",children:[t(q,{fullWidth:!0,variant:"heading"}),t(q,{fullWidth:!0,size:"medium"})]}),ge=({className:n,customer:i,email:c,error:s,headingContent:f,hint:l,name:u,onEmailBlur:A,onEmailChange:y,onEmailInvalid:M,title:E,...H})=>m("div",{className:"checkout-login-form","data-testid":"checkout-login-form",children:[m("div",{className:"checkout-login-form__heading",children:[E&&t(S,{className:"checkout-login-form__title",node:E}),f&&t(S,{className:"checkout-login-form__heading-label",node:f})]}),i?m("div",{className:"checkout-login-form__customer-details",children:[t("div",{className:"checkout-login-form__customer-name",children:`${i.firstName} ${i.lastName}`}),t("div",{className:"checkout-login-form__customer-email",children:i.email})]}):t("div",{className:"checkout-login-form__content",children:m("form",{...H,noValidate:!0,className:re(["dropin-login-form__form",n]),name:u,children:[t("button",{disabled:!0,"aria-hidden":"true",style:"display: none",type:"submit"}),t(ue,{error:s,hint:l,value:c,onBlur:A,onChange:y,onInvalid:M})]})})]}),fe=se(ge,he),Ee=({onClick:n})=>m("p",{className:"checkout-login-form__sign-out",children:[t(N,{id:"Checkout.LoginForm.switch"}),t("a",{className:"checkout-login-form__link",href:"#",rel:"noreferrer",target:"_blank",onClick:i=>{i.preventDefault(),n==null||n(i)},children:t(N,{id:"Checkout.LoginForm.signOut"})})]}),ve=1e3,Pe=({displayTitle:n=!0,displayHeadingContent:i=!0,onSignInClick:c,onSignOutClick:s,initialData:f,slots:l,...u})=>{const[A,y]=h(null),[M,E]=h(""),[H,v]=h(""),[T,R]=h(!1),[B,k]=h(!0),[G,J]=h(!1),[K,O]=h(!0),P=I(!1),x=I(""),L=I(""),d=I(null),r=w({AlreadyHaveAccountHint:"Checkout.LoginForm.emailExists.alreadyHaveAccount",FasterCheckoutHint:"Checkout.LoginForm.emailExists.forFasterCheckout",InvalidEmailError:"Checkout.LoginForm.invalidEmailError",MissingEmailError:"Checkout.LoginForm.missingEmailError",SignInLabel:"Checkout.LoginForm.emailExists.signInButton",Title:"Checkout.LoginForm.title"}),p=g(e=>{!$(e)||e===x.current||Promise.all([ie(e),oe(e)]).then(([o])=>{k(o),x.current=e}).catch(o=>{console.error(o),k(!0)})},[]),Q=g(e=>{const a=e.target.value;E(a),k(!0),v(""),L.current=a,d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{p(a),d.current=null},ve)},[p]),U=g(e=>{const o=e.target,a=o.value.trim(),b=$(a);let C="";a===""?C=r.MissingEmailError:b||(C=r.InvalidEmailError),v(C),o.setCustomValidity(C),b&&d.current&&(clearTimeout(d.current),d.current=null,p(a))},[r.InvalidEmailError,r.MissingEmailError,p]),X=g(e=>{const b=e.target.validity.valueMissing?r.MissingEmailError:r.InvalidEmailError;v(b)},[r.MissingEmailError,r.InvalidEmailError]),F=g(()=>{const e=L.current;c==null||c($(e)?e:"")},[c]),W=g(()=>{L.current="",s==null||s()},[s]),_=g(e=>{const o=!!e&&!e.isEmpty;if(O(o),!o||P.current)return;const a=e.email??"";E(a),v(""),k(!0),P.current=!0,L.current=a,x.current=a},[]);V(()=>{const e=z.on("authenticated",o=>{R(o),ne().then(a=>{y(a)}).catch(console.error)},{eager:!0});return()=>{e==null||e.off()}},[]),V(()=>{const e=z.on("checkout/initialized",o=>{J(!0),_(o)},{eager:!0});return()=>{e==null||e.off()}},[_]),V(()=>{const e=z.on("checkout/updated",_,{eager:!1});return()=>{e==null||e.off()}},[_]);const Y=D(()=>{if(n)return t(j,{name:"checkout-login-form-title",slot:l==null?void 0:l.Title,children:t("h2",{children:r.Title})})},[n,l,r.Title]),Z=D(()=>{if(i)return t(j,{context:{authenticated:T},name:"checkout-login-form-heading-label",slot:l==null?void 0:l.Heading,children:T?t(Ee,{onClick:W}):t(de,{onClick:F})})},[i,T,l,F,W]),ee=D(()=>B?"":m(te,{children:[r.AlreadyHaveAccountHint," ",t("a",{href:"#",onClick:F,children:r.SignInLabel})," ",r.FasterCheckoutHint]}),[B,r.AlreadyHaveAccountHint,r.SignInLabel,r.FasterCheckoutHint,F]);return t(fe,{...u,customer:A,email:M,error:H,headingContent:Z,hint:ee,isInitialized:G,isVisible:K,title:Y,onEmailBlur:U,onEmailChange:Q,onEmailInvalid:X})};export{Pe as LoginForm,Pe as default};
@@ -1,7 +1,5 @@
1
- import { AlertBannerProps } from '@dropins/tools/types/elsie/src/components';
1
+ import { AlertBannerProps } from '../../../@adobe-commerce/elsie/src/components';
2
+ import { Container } from '../../../@adobe-commerce/elsie/src/lib/types';
2
3
 
3
- export declare const MergedCartBanner: {
4
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs').ConditionalProps & AlertBannerProps): import("preact").JSX.Element;
5
- displayName: string;
6
- };
4
+ export declare const MergedCartBanner: Container<AlertBannerProps>;
7
5
  //# sourceMappingURL=MergedCartBanner.d.ts.map
@@ -1,3 +1,3 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import{AlertBanner as g,Icon as u}from"@dropins/tools/components.js";import{c as h}from"../chunks/classes.js";import{events as B}from"@dropins/tools/event-bus.js";import{useState as I,useEffect as M}from"@dropins/tools/preact-hooks.js";import{w as v}from"../chunks/withConditionalRendering.js";import*as l from"@dropins/tools/preact-compat.js";import{useText as w,Text as x}from"@dropins/tools/i18n.js";import"../chunks/ShippingEstimateSignal.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/store-config.js";import"@dropins/tools/signals.js";import"@dropins/tools/lib.js";const H=t=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 5.37931 5.37931 0 12 0C18.6207 0 24 5.37931 24 12C24 18.6207 18.6207 24 12 24C5.37931 24 0 18.6207 0 12ZM11.8885 5.06101C11.1405 5.06101 10.5357 5.66579 10.5357 6.4138V6.57295C10.5835 7.27321 11.1882 7.81433 11.8885 7.76658H12.0795C12.7797 7.70292 13.289 7.09815 13.2413 6.4138C13.2413 5.66579 12.6365 5.06101 11.8885 5.06101ZM13.1935 16.8223H14.1007C14.2599 16.8223 14.4031 16.9655 14.4031 17.1247V17.7294C14.4031 17.9045 14.2599 18.0318 14.1007 18.0318H9.8832C9.70813 18.0318 9.58081 17.8886 9.58081 17.7294V17.1247C9.58081 16.9496 9.72405 16.8223 9.8832 16.8223H10.7904V10.7905H9.8832C9.70813 10.7905 9.58081 10.6472 9.58081 10.4881V9.88329C9.58081 9.70823 9.72405 9.58091 9.8832 9.58091H12.5888C12.923 9.58091 13.1935 9.85146 13.1935 10.1857V16.8223Z",fill:"currentColor"})),C=({className:t,initialData:V,...c})=>{const[r,a]=I(0),s=w({mergedCartBannerItems:e(x,{fields:{count:r},id:"Checkout.MergedCartBanner.items",plural:r})});M(()=>{const n=B.on("cart/merged",o=>{var m;const i=(m=o==null?void 0:o.oldCartItems)==null?void 0:m.reduce((f,p)=>f+p.quantity,0);i>0&&a(i)});return()=>{n==null||n.off()}},[]);const d=()=>{a(0)};return r?e(g,{...c,"aria-label":s.mergedCartBannerItems,className:h(["checkout__banner",t]),"data-testid":"merged-cart-banner",icon:e(u,{source:H}),message:e("span",{children:s.mergedCartBannerItems}),variant:"neutral",onDismiss:d}):null};C.displayName="MergedCartBannerContainer";const q=v(C);export{q as MergedCartBanner,q as default};
3
+ import{jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import{AlertBanner as u,Icon as g}from"@dropins/tools/components.js";import{c as p}from"../chunks/classes.js";import{events as I}from"@dropins/tools/event-bus.js";import{useState as h,useEffect as v}from"@dropins/tools/preact-hooks.js";import*as i from"@dropins/tools/preact-compat.js";import{useText as B,Text as w}from"@dropins/tools/i18n.js";const x=t=>i.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 12C0 5.37931 5.37931 0 12 0C18.6207 0 24 5.37931 24 12C24 18.6207 18.6207 24 12 24C5.37931 24 0 18.6207 0 12ZM11.8885 5.06101C11.1405 5.06101 10.5357 5.66579 10.5357 6.4138V6.57295C10.5835 7.27321 11.1882 7.81433 11.8885 7.76658H12.0795C12.7797 7.70292 13.289 7.09815 13.2413 6.4138C13.2413 5.66579 12.6365 5.06101 11.8885 5.06101ZM13.1935 16.8223H14.1007C14.2599 16.8223 14.4031 16.9655 14.4031 17.1247V17.7294C14.4031 17.9045 14.2599 18.0318 14.1007 18.0318H9.8832C9.70813 18.0318 9.58081 17.8886 9.58081 17.7294V17.1247C9.58081 16.9496 9.72405 16.8223 9.8832 16.8223H10.7904V10.7905H9.8832C9.70813 10.7905 9.58081 10.6472 9.58081 10.4881V9.88329C9.58081 9.70823 9.72405 9.58091 9.8832 9.58091H12.5888C12.923 9.58091 13.1935 9.85146 13.1935 10.1857V16.8223Z",fill:"currentColor"})),Z=({className:t,initialData:H,...c})=>{const[r,s]=h(0),a=B({mergedCartBannerItems:e(w,{fields:{count:r},id:"Checkout.MergedCartBanner.items",plural:r})}),C=()=>{s(0)};return v(()=>{const n=I.on("cart/merged",o=>{var m;const l=(m=o==null?void 0:o.oldCartItems)==null?void 0:m.reduce((d,f)=>d+f.quantity,0);l>0&&s(l)});return()=>{n==null||n.off()}},[]),r?e(u,{...c,"aria-label":a.mergedCartBannerItems,className:p(["checkout__banner",t]),"data-testid":"merged-cart-banner",icon:e(g,{source:x}),message:e("span",{children:a.mergedCartBannerItems}),variant:"neutral",onDismiss:C}):null};export{Z as MergedCartBanner,Z as default};
@@ -1,4 +1,4 @@
1
- import { Container } from '@dropins/tools/types/elsie/src/lib';
1
+ import { Container } from '../../../@adobe-commerce/elsie/src/lib';
2
2
 
3
3
  export interface NewsletterProps {
4
4
  defaultChecked?: boolean;
@@ -1,3 +1,3 @@
1
1
  /*! Copyright 2025 Adobe
2
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};
3
+ import{jsx as l}from"@dropins/tools/preact-jsx-runtime.js";import{W as S}from"../chunks/ConditionalWrapper.js";/* empty css */import{Skeleton as g,SkeletonRow as V,Checkbox as z}from"@dropins/tools/components.js";import{c as I}from"../chunks/classes.js";import{useText as _}from"@dropins/tools/i18n.js";import{s as C}from"../chunks/subscription-email-statuses.js";import"@dropins/tools/lib.js";import"../chunks/IsBillToShippingSignal.js";import{events as f}from"@dropins/tools/event-bus.js";import{i as r}from"../chunks/SelectedPaymentMethodSignal.js";import"../chunks/SelectedShippingMethodSignal.js";import"../chunks/ServerErrorSignal.js";import{useState as m,useCallback as E,useEffect as n}from"@dropins/tools/preact-hooks.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const T=()=>l(g,{className:"checkout-newsletter-skeleton","data-testid":"checkout-newsletter-skeleton",children:l(V,{size:"small",variant:"row"})}),y=({className:c,checked:i,onChange:o})=>{const u=_({title:"Checkout.Newsletter.title"});return l("div",{className:"checkout-newsletter","data-testid":"checkout-newsletter",children:l(z,{checked:i,className:I(["checkout-newsletter__checkbox",c]),"data-testid":"checkout-newsletter-checkbox",label:u.title,name:"checkout-newsletter__checkbox",onChange:o})})},W=S(y,T),Y=({defaultChecked:c=!1,onChange:i,showForAuthenticatedUsers:o=!1})=>{var p;const[u,b]=m(!0),[h,w]=m(!1),[N,v]=m(!1),d=r.value,s=((p=C.config)==null?void 0:p.newsletterEnabled)===!1,k=!o&&h,x=async e=>{const t=e.target.checked;r.value=t,i==null||i(t)},a=E(e=>{const t=!!e&&!e.isEmpty;if(b(t),!t){r.value=!1;return}},[]);return n(()=>{if(s)return;const e=f.on("authenticated",t=>{w(t),t&&!o&&(r.value=!1)},{eager:!0});return()=>{e==null||e.off()}},[s,o]),n(()=>{if(s)return;const e=f.on("checkout/initialized",t=>{v(!0),a(t)},{eager:!0});return()=>{e==null||e.off()}},[s,a]),n(()=>{if(s)return;const e=f.on("checkout/updated",a,{eager:!1});return()=>{e==null||e.off()}},[s,a]),n(()=>{c&&!d&&(r.value=c)},[]),(s||k)&&(r.value=!1),l(W,{checked:d,isInitialized:N,isVisible:u&&!s&&!k,onChange:x})};export{Y as Newsletter,Y as default};
@@ -1,4 +1,4 @@
1
- import { Container } from '@dropins/tools/types/elsie/src/lib';
1
+ import { Container } from '../../../@adobe-commerce/elsie/src/lib';
2
2
  import { HTMLAttributes } from 'preact/compat';
3
3
 
4
4
  export type UpdateProductsFromCart = Array<{