@dropins/storefront-checkout 0.1.0-alpha45 → 0.1.0-alpha47

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 (220) hide show
  1. package/__generated__/types.d.ts +22 -20
  2. package/api/errors/index.d.ts +16 -0
  3. package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +16 -0
  4. package/api/estimateShippingMethods/graphql/index.d.ts +16 -0
  5. package/api/estimateShippingMethods/index.d.ts +16 -0
  6. package/api/fetch-graphql/fetch-graphql.d.ts +16 -0
  7. package/api/fetch-graphql/index.d.ts +16 -0
  8. package/api/fetchAddressFormFields/fetchAddressFormFields.d.ts +16 -0
  9. package/api/fetchAddressFormFields/graphql/fetchAddressFormFields.graphql.d.ts +16 -0
  10. package/api/fetchAddressFormFields/index.d.ts +16 -0
  11. package/api/getCart/getCart.d.ts +16 -0
  12. package/api/getCart/graphql/getCart.graphql.d.ts +16 -0
  13. package/api/getCart/graphql/index.d.ts +16 -0
  14. package/api/getCart/index.d.ts +16 -0
  15. package/api/getCheckoutData/getCheckoutData.d.ts +16 -0
  16. package/api/getCheckoutData/index.d.ts +16 -0
  17. package/api/getCountries/getCountries.d.ts +16 -0
  18. package/api/getCountries/graphql/getCountries.graphql.d.ts +16 -0
  19. package/api/getCountries/index.d.ts +16 -0
  20. package/api/getCustomer/graphql/getCustomer.graphql.d.ts +16 -0
  21. package/api/getCustomer/graphql/index.d.ts +16 -0
  22. package/api/getCustomer/index.d.ts +16 -0
  23. package/api/getRegions/graphql/getRegions.graphql.d.ts +16 -0
  24. package/api/getRegions/index.d.ts +16 -0
  25. package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +16 -0
  26. package/api/getStoreConfig/index.d.ts +16 -0
  27. package/api/index.d.ts +16 -0
  28. package/api/initialize/index.d.ts +16 -0
  29. package/api/initialize/listeners.d.ts +16 -0
  30. package/api/initializeCheckout/index.d.ts +16 -0
  31. package/api/initializeCheckout/initializeCheckout.d.ts +16 -0
  32. package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +16 -0
  33. package/api/isEmailAvailable/index.d.ts +16 -0
  34. package/api/placeOrder/graphql/index.d.ts +16 -0
  35. package/api/placeOrder/graphql/placeOrder.graphql.d.ts +17 -1
  36. package/api/placeOrder/index.d.ts +16 -0
  37. package/api/placeOrder/placeOrder.d.ts +16 -0
  38. package/api/redirect/index.d.ts +16 -0
  39. package/api/redirect/redirect.d.ts +16 -0
  40. package/api/resetCheckout/index.d.ts +16 -0
  41. package/api/resetCheckout/resetCheckout.d.ts +16 -0
  42. package/api/resetCustomer/index.d.ts +16 -0
  43. package/api/resetCustomer/resetCustomer.d.ts +16 -0
  44. package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +16 -0
  45. package/api/setBillingAddress/index.d.ts +16 -0
  46. package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +16 -0
  47. package/api/setGuestEmailOnCart/index.d.ts +16 -0
  48. package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +16 -0
  49. package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +16 -0
  50. package/api/setPaymentMethod/index.d.ts +16 -0
  51. package/api/setPaymentMethod/setPaymentMethod.d.ts +16 -0
  52. package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +16 -0
  53. package/api/setShippingAddress/index.d.ts +16 -0
  54. package/api/setShippingAddress/setShippingAddress.d.ts +17 -1
  55. package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +16 -0
  56. package/api/setShippingMethods/index.d.ts +16 -0
  57. package/api/setShippingMethods/setShippingMethods.d.ts +16 -0
  58. package/api/utils/enqueueRequest.d.ts +16 -0
  59. package/api.js +1 -1
  60. package/chunks/BillToShippingAddress.js +1 -1
  61. package/chunks/OrderError.js +1 -0
  62. package/chunks/ShippingMethods.js +1 -1
  63. package/chunks/fixtures.js +15 -0
  64. package/chunks/getCart.graphql.js +6 -20
  65. package/chunks/getCustomer.js +1 -1
  66. package/chunks/getMultilineValues.js +43 -0
  67. package/chunks/placeOrder.js +6 -2
  68. package/chunks/resetCustomer.js +1 -1
  69. package/chunks/setBillingAddress.js +3 -3
  70. package/chunks/setGuestEmailOnCart.js +17 -0
  71. package/chunks/setPaymentMethod.js +13 -0
  72. package/chunks/setShippingAddress.js +16 -0
  73. package/chunks/setShippingMethods.js +3 -85
  74. package/chunks/transform-shipping-methods.js +1 -0
  75. package/chunks/withConditionalRendering.js +1 -0
  76. package/components/AddressForm/constants.d.ts +16 -0
  77. package/components/AddressForm/index.d.ts +16 -0
  78. package/components/BillToShippingAddress/index.d.ts +16 -0
  79. package/components/EstimateShipping/index.d.ts +16 -0
  80. package/components/FieldsForm/index.d.ts +16 -0
  81. package/components/Heading/index.d.ts +16 -0
  82. package/components/LoginForm/index.d.ts +16 -0
  83. package/components/OutOfStock/index.d.ts +16 -0
  84. package/components/OverlayLoader/index.d.ts +16 -0
  85. package/components/PaymentMethods/index.d.ts +16 -0
  86. package/components/PlaceOrder/PlaceOrder.d.ts +1 -1
  87. package/components/PlaceOrder/index.d.ts +16 -0
  88. package/components/ServerError/index.d.ts +16 -0
  89. package/components/ShippingMethods/index.d.ts +16 -0
  90. package/components/ToggleButton/assets/icons/index.d.ts +16 -0
  91. package/components/ToggleButton/assets/images/index.d.ts +16 -0
  92. package/components/ToggleButton/index.d.ts +16 -0
  93. package/components/index.d.ts +16 -2
  94. package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +1 -1
  95. package/containers/BillToShippingAddress/constants.d.ts +16 -0
  96. package/containers/BillToShippingAddress/index.d.ts +16 -0
  97. package/containers/BillToShippingAddress.js +1 -1
  98. package/containers/BillingForm/BillingForm.d.ts +1 -1
  99. package/containers/BillingForm/constants.d.ts +16 -0
  100. package/containers/BillingForm/index.d.ts +16 -0
  101. package/containers/BillingForm.js +1 -1
  102. package/containers/ErrorBanner/index.d.ts +16 -0
  103. package/containers/ErrorBanner.js +1 -1
  104. package/containers/EstimateShipping/index.d.ts +16 -0
  105. package/containers/EstimateShipping.js +1 -1
  106. package/containers/LoginForm/LoginForm.d.ts +1 -1
  107. package/containers/LoginForm/constants.d.ts +16 -0
  108. package/containers/LoginForm/index.d.ts +16 -0
  109. package/containers/LoginForm.js +1 -1
  110. package/containers/MergedCartBanner/index.d.ts +16 -0
  111. package/containers/MergedCartBanner.js +1 -1
  112. package/containers/OutOfStock/index.d.ts +16 -0
  113. package/containers/OutOfStock.js +1 -1
  114. package/containers/PaymentMethods/PaymentMethods.d.ts +10 -11
  115. package/containers/PaymentMethods/defaultHandlers.d.ts +2 -9
  116. package/containers/PaymentMethods/index.d.ts +16 -0
  117. package/containers/PaymentMethods.js +1 -1
  118. package/containers/PlaceOrder/PlaceOrder.d.ts +10 -3
  119. package/containers/PlaceOrder/index.d.ts +16 -0
  120. package/containers/PlaceOrder.js +1 -1
  121. package/containers/ServerError/ServerError.d.ts +8 -0
  122. package/containers/ServerError/index.d.ts +19 -0
  123. package/containers/ServerError.d.ts +3 -0
  124. package/containers/ServerError.js +1 -0
  125. package/containers/ShippingForm/ShippingForm.d.ts +1 -1
  126. package/containers/ShippingForm/constants.d.ts +16 -0
  127. package/containers/ShippingForm/index.d.ts +17 -1
  128. package/containers/ShippingForm.js +1 -1
  129. package/containers/ShippingMethods/ShippingMethods.d.ts +7 -3
  130. package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +16 -0
  131. package/containers/ShippingMethods/index.d.ts +16 -0
  132. package/containers/ShippingMethods.js +1 -1
  133. package/containers/index.d.ts +17 -2
  134. package/data/models/acdl.d.ts +16 -0
  135. package/data/models/country.d.ts +16 -0
  136. package/data/models/custom-attribute.d.ts +16 -0
  137. package/data/models/email-availability.d.ts +16 -0
  138. package/data/models/index.d.ts +16 -0
  139. package/data/models/payment-method.d.ts +16 -0
  140. package/data/models/price.d.ts +16 -0
  141. package/data/models/region.d.ts +16 -0
  142. package/data/models/store-config.d.ts +16 -0
  143. package/data/transforms/index.d.ts +16 -0
  144. package/hocs/index.d.ts +16 -0
  145. package/hocs/withConditionalRendering.d.ts +1 -1
  146. package/hooks/index.d.ts +16 -0
  147. package/hooks/useBreakpoint/index.d.ts +16 -0
  148. package/hooks/useBreakpoint/useBreakpoint.d.ts +16 -0
  149. package/hooks/useLockScroll/index.d.ts +16 -0
  150. package/hooks/useLockScroll/useLockScroll.d.ts +16 -0
  151. package/hooks/useValidity/index.d.ts +16 -0
  152. package/hooks/useValidity/useValidity.d.ts +16 -0
  153. package/i18n/en_US.json.d.ts +0 -8
  154. package/lib/backup-data.d.ts +16 -0
  155. package/lib/fetch-error.d.ts +16 -0
  156. package/lib/index.d.ts +16 -0
  157. package/lib/network-error.d.ts +16 -0
  158. package/lib/redirect.d.ts +16 -0
  159. package/lib/state.d.ts +16 -0
  160. package/msw/browser.d.ts +16 -0
  161. package/msw/fixtures/fragments/billing-address.d.ts +16 -0
  162. package/msw/fixtures/fragments/cart.d.ts +16 -0
  163. package/msw/fixtures/fragments/index.d.ts +16 -0
  164. package/msw/fixtures/fragments/shipping-address.d.ts +16 -0
  165. package/msw/fixtures/index.d.ts +16 -0
  166. package/msw/fixtures/mutations/index.d.ts +16 -0
  167. package/msw/fixtures/queries/index.d.ts +16 -0
  168. package/msw/server.d.ts +16 -0
  169. package/package.json +1 -1
  170. package/render/index.d.ts +16 -0
  171. package/render.js +4 -3
  172. package/signals/IsBillToShippingSignal.d.ts +16 -0
  173. package/signals/ServerErrorSignal.d.ts +18 -0
  174. package/signals/index.d.ts +17 -0
  175. package/tests/constants.d.ts +16 -0
  176. package/tests/integration/utils/index.d.ts +16 -0
  177. package/tests/integration/utils/setup.d.ts +6 -4
  178. package/tests/integration/utils/user-actions.d.ts +16 -0
  179. package/tests/mocks/svg.d.ts +16 -0
  180. package/tests/utils/expectError.d.ts +16 -0
  181. package/tests/utils/index.d.ts +16 -0
  182. package/tests/utils/mockEvents.d.ts +16 -0
  183. package/utils/autocompleteFieldCodes/autocompleteFieldCodes.d.ts +16 -0
  184. package/utils/autocompleteFieldCodes/index.d.ts +16 -0
  185. package/utils/getDisplayName/index.d.ts +16 -0
  186. package/utils/getMultilineValues/getMultilineValues.d.ts +16 -0
  187. package/utils/getMultilineValues/index.d.ts +16 -0
  188. package/utils/index.d.ts +19 -0
  189. package/utils/isEmpty/index.d.ts +16 -0
  190. package/utils/isEmpty/isEmpty.d.ts +16 -0
  191. package/utils/isNullish/index.d.ts +16 -0
  192. package/utils/isNullish/isNullish.d.ts +16 -0
  193. package/utils/isUnexpectedError/index.d.ts +18 -0
  194. package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
  195. package/utils/parseRegionId/index.d.ts +16 -0
  196. package/utils/parseRegionId/parseRegionId.d.ts +16 -0
  197. package/utils/processFormFields/index.d.ts +16 -0
  198. package/utils/refetchEstimatedShippingMethods/index.d.ts +16 -0
  199. package/utils/scrollToElement/index.d.ts +18 -0
  200. package/utils/scrollToElement/scrollToElement.d.ts +18 -0
  201. package/utils/shippingMethods/index.d.ts +16 -0
  202. package/utils/validateForms/index.d.ts +18 -0
  203. package/utils/validateForms/validateForms.d.ts +18 -0
  204. package/chunks/EmptyCart.js +0 -1
  205. package/chunks/ErrorBanner.js +0 -1
  206. package/chunks/MergedCartBanner.js +0 -1
  207. package/chunks/OutOfStock.js +0 -1
  208. package/components/Checkout/Checkout.d.ts +0 -28
  209. package/components/Checkout/index.d.ts +0 -3
  210. package/components/EmptyCart/EmptyCart.d.ts +0 -9
  211. package/components/EmptyCart/index.d.ts +0 -3
  212. package/containers/Checkout/Checkout.d.ts +0 -35
  213. package/containers/Checkout/constants.d.ts +0 -2
  214. package/containers/Checkout/index.d.ts +0 -4
  215. package/containers/Checkout.d.ts +0 -3
  216. package/containers/Checkout.js +0 -1
  217. package/containers/EmptyCart/EmptyCart.d.ts +0 -8
  218. package/containers/EmptyCart/index.d.ts +0 -3
  219. package/containers/EmptyCart.d.ts +0 -3
  220. package/containers/EmptyCart.js +0 -1
@@ -1,3 +1,19 @@
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
17
  export * from './fieldFactory';
2
18
  export * from './validation';
3
19
  export * from './FieldsForm';
@@ -1,3 +1,19 @@
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
17
  export * from './Heading';
2
18
  export { Heading as default } from './Heading';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './Email';
2
18
  export * from './SignIn';
3
19
  export * from './LoginForm';
@@ -1,3 +1,19 @@
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
17
  export * from './OutOfStock';
2
18
  export { OutOfStock as default } from './OutOfStock';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,18 @@
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
17
  export * from './OverlayLoader';
2
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './PaymentMethods';
2
18
  export * from './PaymentMethodsSkeleton';
3
19
  export { PaymentMethods as default } from './PaymentMethods';
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'preact/compat';
3
3
 
4
4
  export interface PlaceOrderProps extends HTMLAttributes<HTMLButtonElement> {
5
5
  disabled?: boolean;
6
- onClick?: (e: any) => void;
6
+ onClick: (event: Event) => Promise<void>;
7
7
  }
8
8
  export declare const PlaceOrder: FunctionComponent<PlaceOrderProps>;
9
9
  //# sourceMappingURL=PlaceOrder.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './PlaceOrder';
2
18
  export * from './PlaceOrderSkeleton';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './ServerError';
2
18
  export { ServerError as default } from './ServerError';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './ShippingMethods';
2
18
  export * from './ShippingMethodsSkeleton';
3
19
  export { ShippingMethods as default } from './ShippingMethods';
@@ -1,2 +1,18 @@
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
17
  export { default as Card } from './Card.svg';
2
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,18 @@
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
17
  export { default as Card } from './Card.png';
2
18
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './ToggleButton';
2
18
  export { ToggleButton as default } from './ToggleButton';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1,7 +1,21 @@
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
17
  export * from './AddressForm';
2
18
  export * from './BillToShippingAddress';
3
- export * from './Checkout';
4
- export * from './EmptyCart';
5
19
  export * from './EstimateShipping';
6
20
  export * from './FieldsForm';
7
21
  export * from './Heading';
@@ -6,7 +6,7 @@ export declare function compareAddresses(addressFormFields: AddressFormField[],
6
6
  export interface BillToShippingAddressProps extends Omit<CheckboxProps, 'name' | 'label'> {
7
7
  }
8
8
  export declare const BillToShippingAddress: {
9
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact/compat").JSX.Element | null;
9
+ ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillToShippingAddressProps): import("preact/compat").JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=BillToShippingAddress.d.ts.map
@@ -1,2 +1,18 @@
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
17
  export declare const BILL_TO_SHIPPING_KEY = "is_bill_to_shipping_address";
2
18
  //# sourceMappingURL=constants.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './constants';
2
18
  export * from './BillToShippingAddress';
3
19
  export { BillToShippingAddress as default } from './BillToShippingAddress';
@@ -1 +1 @@
1
- import{a as I,B as _,c,B as f}from"../chunks/BillToShippingAddress.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setBillingAddress.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";import"@dropins/tools/i18n.js";import"@dropins/tools/preact-compat.js";export{I as BILL_TO_SHIPPING_KEY,_ as BillToShippingAddress,c as compareAddresses,f as default};
1
+ import{a as A,B as L,c as P,B as S}from"../chunks/BillToShippingAddress.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import"../chunks/fixtures.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/setBillingAddress.js";import"../chunks/getCart.graphql.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/lib.js";import"@dropins/tools/components.js";/* empty css */import"@dropins/tools/i18n.js";import"../chunks/withConditionalRendering.js";import"@dropins/tools/preact-compat.js";export{A as BILL_TO_SHIPPING_KEY,L as BillToShippingAddress,P as compareAddresses,S as default};
@@ -3,7 +3,7 @@ import { HTMLAttributes } from 'preact/compat';
3
3
  export interface BillingFormProps extends HTMLAttributes<HTMLDivElement> {
4
4
  }
5
5
  export declare const BillingForm: {
6
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillingFormProps): import("preact/compat").JSX.Element | null;
6
+ ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillingFormProps): import("preact/compat").JSX.Element;
7
7
  displayName: string;
8
8
  };
9
9
  //# sourceMappingURL=BillingForm.d.ts.map
@@ -1,2 +1,18 @@
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
17
  export declare const BILLING_FORM_NAME = "billing_address";
2
18
  //# sourceMappingURL=constants.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './BillingForm';
2
18
  export * from './constants';
3
19
  export { BillingForm as default } from './BillingForm';
@@ -1 +1 @@
1
- import{e as _,B as d,B as g}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-jsx-runtime.js";import"../chunks/setShippingMethods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";import"../chunks/BillToShippingAddress.js";import"../chunks/setBillingAddress.js";import"@dropins/tools/preact-compat.js";import"../chunks/ErrorBanner.js";import"../chunks/MergedCartBanner.js";export{_ as BILLING_FORM_NAME,d as BillingForm,g as default};
1
+ import{jsx as g}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{o as F,p as B,q as b,m as h}from"../chunks/fixtures.js";import{A as v}from"../chunks/getMultilineValues.js";import{s as y}from"../chunks/setBillingAddress.js";import{p as C}from"../chunks/setShippingAddress.js";import{A as S}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import{c as I}from"../chunks/BillToShippingAddress.js";import{w as _}from"../chunks/withConditionalRendering.js";import{useRef as k,useMemo as L,useCallback as N,useEffect as R}from"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";/* empty css *//* empty css */const f=u=>{var p;const l=k(null),e=F.value.data,o=B.value.data,d=o==null?void 0:o.defaultBillingAddress,s=b.value.data,t=s==null?void 0:s.billingAddress,a=(p=s==null?void 0:s.shippingAddresses)==null?void 0:p[0],{checked:r,setByUser:m}=h.value,n=!r,c=L(()=>!e||!n?!1:t?!I(e,t,a):!!d,[n,e,t,a,d]),A=N(i=>y({signal:i.signal,input:{address:r?void 0:C(i.address),same_as_shipping:r}}),[r]);return R(()=>{if(!m)return;const i=new AbortController;return r||l.current.triggerSaveAddress(i.signal),()=>{i.abort()}},[r,m]),g("div",{children:g(S,{...u,addressType:v.BILLING,autoFill:c,"data-testid":"billing-form",headingId:"Checkout.BillingAddress.title",name:w,ref:l,saveAddressHandler:A,style:{display:n?"block":"none"}})})};f.displayName="BillingFormContainer";const Z=_(f),w="billing_address";export{w as BILLING_FORM_NAME,Z as BillingForm,Z as default};
@@ -1,3 +1,19 @@
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
17
  export * from './ErrorBanner';
2
18
  export { ErrorBanner as default } from './ErrorBanner';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{E as e,E}from"../chunks/ErrorBanner.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/components.js";import"@dropins/tools/i18n.js";export{e as ErrorBanner,E as default};
1
+ import{jsx as o}from"@dropins/tools/preact-jsx-runtime.js";import*as l from"@dropins/tools/preact-compat.js";import{useState as m,useEffect as f}from"@dropins/tools/preact-compat.js";import{events as a}from"@dropins/tools/event-bus.js";import{AlertBanner as u,Icon as g}from"@dropins/tools/components.js";import{useText as p}from"@dropins/tools/i18n.js";const h=r=>l.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},l.createElement("path",{vectorEffect:"non-scaling-stroke",fillRule:"evenodd",clipRule:"evenodd",d:"M1 20.8953L12.1922 1.5L23.395 20.8953H1ZM13.0278 13.9638L13.25 10.0377V9H11.25V10.0377L11.4722 13.9638H13.0278ZM11.2994 16V17.7509H13.2253V16H11.2994Z",fill:"currentColor"})),x=r=>{const[c,s]=m(!1),t=p({message:"Checkout.ErrorBanner.genericMessage"});f(()=>{const n=a.on("error",e=>{(e==null?void 0:e.source)==="checkout"&&(e==null?void 0:e.type)==="network"&&s(!0)});return()=>{n==null||n.off()}},[]);const i=()=>{s(!1)};return c?o(u,{...r,className:"checkout__banner","data-testid":"error-banner",icon:o(g,{source:h}),message:o("span",{children:t.message}),"aria-label":t.message,onDismiss:i,variant:"warning"}):null};export{x as ErrorBanner,x as default};
@@ -1,3 +1,19 @@
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
17
  export * from './EstimateShipping';
2
18
  export { EstimateShipping as default } from './EstimateShipping';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{jsx as e,jsxs as E,Fragment as L}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import{events as S}from"@dropins/tools/event-bus.js";import{useState as M,useEffect as k}from"@dropins/tools/preact-hooks.js";import{m as w,T as I}from"../chunks/getCart.graphql.js";import{VComponent as A,classes as C}from"@dropins/tools/lib.js";import{Skeleton as B,SkeletonRow as G,Price as l}from"@dropins/tools/components.js";import"../chunks/BillToShippingAddress.js";import{useText as P,Text as c}from"@dropins/tools/i18n.js";import"../chunks/setShippingMethods.js";import"../chunks/setBillingAddress.js";import"@dropins/tools/preact-compat.js";import"../chunks/ErrorBanner.js";import"../chunks/MergedCartBanner.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const U=()=>e(B,{"data-testid":"estimate-shipping-skeleton",children:e(G,{size:"xsmall"})}),tt=()=>{const[t,p]=M(),r=t!==void 0,s=(t==null?void 0:t.amount.value)===0,{data:n,pending:_}=w.value,y=_||n===void 0,d=n==null?void 0:n.shoppingCartDisplaySetting.shipping,D=d===I.INCLUDING_EXCLUDING_TAX,g=d===I.INCLUDING_TAX,x=P({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined"});k(()=>{const i=S.on("shipping/estimate",a=>{const o=a.shippingMethod,{amount:m,amountExclTax:u,amountInclTax:h}=o;p({estimated:!0,amount:m,amountExclTax:u,amountInclTax:h})});return()=>{i==null||i.off()}},[]),k(()=>{const i=S.on("checkout/data",a=>{var f,T;const o=(T=(f=a==null?void 0:a.shippingAddresses)==null?void 0:f[0])==null?void 0:T.selectedShippingMethod;if(!o)return;const{amount:m,amountExclTax:u,amountInclTax:h}=o;p({estimated:!1,amount:m,amountExclTax:u,amountInclTax:h})});return()=>{i==null||i.off()}},[]);const N=()=>s?e("span",{"data-testId":"free-shipping",children:x.freeShipping}):g&&(t!=null&&t.amountInclTax)?e(l,{"data-testid":"shipping",amount:t.amountInclTax.value,currency:t.amountInclTax.currency}):e(l,{"data-testid":"shipping",amount:t==null?void 0:t.amount.value,currency:t==null?void 0:t.amount.currency}),v=()=>t!=null&&t.amountExclTax?e(l,{"data-testid":"shipping-excluding-tax",amount:t.amountExclTax.value,currency:t.amountExclTax.currency}):e("span",{children:x.taxToBeDetermined});return e("div",{"data-testid":"estimate-shipping",className:"checkout-estimate-shipping",children:!r||y?e(U,{}):e(X,{estimated:t.estimated,price:N(),taxExcluded:D&&!s,taxIncluded:g&&!s,priceExclTax:v()})})},X=({estimated:t=!1,price:p,priceExclTax:r,taxExcluded:s=!1,taxIncluded:n=!1})=>E(L,{children:[e("span",{className:"checkout-estimate-shipping__label",children:t?e(c,{id:"Checkout.EstimateShipping.estimated"}):e(c,{id:"Checkout.EstimateShipping.label"})}),e(A,{node:p,className:"checkout-estimate-shipping__price"}),n&&e("span",{"data-testid":"shipping-tax-included",className:C(["checkout-estimate-shipping__caption"]),children:e(c,{id:"Checkout.EstimateShipping.withTaxes"})}),s&&E("span",{"data-testid":"shipping-tax-included-excluded",className:C(["checkout-estimate-shipping__caption"]),children:[r," ",e(c,{id:"Checkout.EstimateShipping.withoutTaxes"})]})]});export{tt as EstimateShipping,tt as default};
1
+ import{jsxs as E,Fragment as L,jsx as t}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import{events as S}from"@dropins/tools/event-bus.js";import{useState as M,useEffect as k}from"@dropins/tools/preact-hooks.js";import{t as w,T as I}from"../chunks/fixtures.js";import{VComponent as A,classes as C}from"@dropins/tools/lib.js";import{Skeleton as B,SkeletonRow as G,Price as l}from"@dropins/tools/components.js";/* empty css */import{Text as c,useText as P}from"@dropins/tools/i18n.js";/* empty css */import"../chunks/getMultilineValues.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const U=({estimated:e=!1,price:o,priceExclTax:r,taxExcluded:s=!1,taxIncluded:n=!1})=>E(L,{children:[t("span",{className:"checkout-estimate-shipping__label",children:e?t(c,{id:"Checkout.EstimateShipping.estimated"}):t(c,{id:"Checkout.EstimateShipping.label"})}),t(A,{node:o,className:"checkout-estimate-shipping__price"}),n&&t("span",{"data-testid":"shipping-tax-included",className:C(["checkout-estimate-shipping__caption"]),children:t(c,{id:"Checkout.EstimateShipping.withTaxes"})}),s&&E("span",{"data-testid":"shipping-tax-included-excluded",className:C(["checkout-estimate-shipping__caption"]),children:[r," ",t(c,{id:"Checkout.EstimateShipping.withoutTaxes"})]})]}),X=()=>t(B,{"data-testid":"estimate-shipping-skeleton",children:t(G,{size:"xsmall"})}),Z=()=>{const[e,o]=M(),r=e!==void 0,s=(e==null?void 0:e.amount.value)===0,{data:n,pending:_}=w.value,y=_||n===void 0,d=n==null?void 0:n.shoppingCartDisplaySetting.shipping,D=d===I.INCLUDING_EXCLUDING_TAX,g=d===I.INCLUDING_TAX,x=P({freeShipping:"Checkout.EstimateShipping.freeShipping",taxToBeDetermined:"Checkout.EstimateShipping.taxToBeDetermined"});k(()=>{const i=S.on("shipping/estimate",a=>{const p=a.shippingMethod,{amount:m,amountExclTax:u,amountInclTax:h}=p;o({estimated:!0,amount:m,amountExclTax:u,amountInclTax:h})},{eager:!0});return()=>{i==null||i.off()}},[]),k(()=>{const i=S.on("checkout/data",a=>{var f,T;const p=(T=(f=a==null?void 0:a.shippingAddresses)==null?void 0:f[0])==null?void 0:T.selectedShippingMethod;if(!p)return;const{amount:m,amountExclTax:u,amountInclTax:h}=p;o({estimated:!1,amount:m,amountExclTax:u,amountInclTax:h})},{eager:!0});return()=>{i==null||i.off()}},[]);const N=()=>s?t("span",{"data-testId":"free-shipping",children:x.freeShipping}):g&&(e!=null&&e.amountInclTax)?t(l,{"data-testid":"shipping",amount:e.amountInclTax.value,currency:e.amountInclTax.currency}):t(l,{"data-testid":"shipping",amount:e==null?void 0:e.amount.value,currency:e==null?void 0:e.amount.currency}),v=()=>e!=null&&e.amountExclTax?t(l,{"data-testid":"shipping-excluding-tax",amount:e.amountExclTax.value,currency:e.amountExclTax.currency}):t("span",{children:x.taxToBeDetermined});return t("div",{"data-testid":"estimate-shipping",className:"checkout-estimate-shipping",children:!r||y?t(X,{}):t(U,{estimated:e.estimated,price:N(),taxExcluded:D&&!s,taxIncluded:g&&!s,priceExclTax:v()})})};export{Z as EstimateShipping,Z as default};
@@ -6,7 +6,7 @@ export interface LoginFormProps extends HTMLAttributes<HTMLDivElement> {
6
6
  onSignOutClick?: () => void;
7
7
  }
8
8
  export declare const LoginForm: {
9
- ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & LoginFormProps): import("preact/compat").JSX.Element | null;
9
+ ({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & LoginFormProps): import("preact/compat").JSX.Element;
10
10
  displayName: string;
11
11
  };
12
12
  //# sourceMappingURL=LoginForm.d.ts.map
@@ -1,2 +1,18 @@
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
17
  export declare const LOGIN_FORM_NAME = "login-form";
2
18
  //# sourceMappingURL=constants.d.ts.map
@@ -1,3 +1,19 @@
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
17
  export * from './constants';
2
18
  export * from './LoginForm';
3
19
  export { LoginForm as default } from './LoginForm';
@@ -1 +1 @@
1
- import{d as g,L as l,L as n}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-jsx-runtime.js";import"../chunks/setShippingMethods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";import"../chunks/BillToShippingAddress.js";import"../chunks/setBillingAddress.js";import"@dropins/tools/preact-compat.js";import"../chunks/ErrorBanner.js";import"../chunks/MergedCartBanner.js";export{g as LOGIN_FORM_NAME,l as LoginForm,n as default};
1
+ import{jsx as o,jsxs as c,Fragment as B}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{q,p as w,k as z}from"../chunks/fixtures.js";import{i as V,s as $}from"../chunks/setGuestEmailOnCart.js";import{H as j,p as G}from"../chunks/ShippingMethods.js";import{useState as F,useEffect as O}from"@dropins/tools/preact-hooks.js";import{classes as C}from"@dropins/tools/lib.js";import{Field as P,Input as R}from"@dropins/tools/components.js";/* empty css */import{useText as N,Text as L}from"@dropins/tools/i18n.js";/* empty css */import{w as U}from"../chunks/withConditionalRendering.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/getCart.graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getMultilineValues.js";import"@dropins/tools/preact-compat.js";const D=({value:e,error:l,hint:t,onChange:u,onBlur:d,onInvalid:s})=>{const i=N({LoginFormLabel:"Checkout.LoginForm.ariaLabel",LoginFormFloatingLabel:"Checkout.LoginForm.floatingLabel",LoginFormPlaceholder:"Checkout.LoginForm.placeholder"});return o(P,{size:"medium",error:l,hint:t,children:o(R,{id:"customer-email",name:"customer-email",type:"email",value:e,autocomplete:"email",placeholder:i.LoginFormPlaceholder,floatingLabel:i.LoginFormFloatingLabel,onChange:u,onBlur:d,onInvalid:s,required:!0,"aria-label":i.LoginFormLabel,"aria-required":!0})})},J=({onSignInClick:e,email:l})=>c("div",{className:"checkout-login-form__sign-in",children:[o(L,{id:"Checkout.LoginForm.account"}),o("a",{"data-testid":"sign-in-link",className:"checkout-login-form__link",href:"#",target:"_blank",rel:"noreferrer",onClick:t=>{t.preventDefault(),e==null||e(l)},children:o(L,{id:"Checkout.LoginForm.signIn"})})]}),K=({name:e,className:l,currentEmail:t,hint:u,error:d=null,onEmailChange:s,onEmailBlur:i,onEmailInvalid:p,onSignInClick:v,onSignOutClick:g,customer:a,..._})=>{const n=N({Title:"Checkout.LoginForm.title"}),h=!!a;return c("div",{..._,className:C(["checkout-login-form",l]),"data-testid":"checkout-login-form",children:[c("div",{className:"checkout-login-form__heading",children:[o(j,{level:2,className:"checkout-login-form__title",children:n.Title}),h?o(Q,{onSignOutClick:g}):o(J,{onSignInClick:v,email:t})]}),a?c("div",{className:"checkout-login-form__customer-details",children:[o("div",{className:"checkout-login-form__customer-name",children:`${a==null?void 0:a.firstName} ${a==null?void 0:a.lastName}`}),o("div",{className:"checkout-login-form__customer-email",children:a==null?void 0:a.email})]}):o("div",{className:"checkout-login-form__content",children:c("form",{className:C(["dropin-login-form__form",l]),name:e,noValidate:!0,children:[o("button",{type:"submit",disabled:!0,style:"display: none","aria-hidden":"true"}),o(D,{value:t||void 0,error:d||"",hint:u,onChange:s,onBlur:i,onInvalid:p})]})})]})},Q=({onSignOutClick:e})=>c("p",{className:"checkout-login-form__sign-out",children:[o(L,{id:"Checkout.LoginForm.switch"}),o("a",{className:"checkout-login-form__link",href:"#",target:"_blank",rel:"noreferrer",onClick:l=>{l.preventDefault(),e==null||e()},children:o(L,{id:"Checkout.LoginForm.signOut"})})]}),W="login-form",X=e=>G.email.test(e),Y=1e3,x=({className:e,email:l=null,onSignInClick:t,onSignOutClick:u,...d})=>{const s=N({LoginFormInvalidEmailError:"Checkout.LoginForm.invalidEmailError",LoginFormMissingEmailError:"Checkout.LoginForm.missingEmailError",LoginFormEmailExistsAlreadyHaveAccount:"Checkout.LoginForm.emailExists.alreadyHaveAccount",LoginFormEmailExistsSignInButton:"Checkout.LoginForm.emailExists.signInButton",LoginFormEmailExistsForFasterCheckout:"Checkout.LoginForm.emailExists.forFasterCheckout"}),{data:i}=q.value,p=(i==null?void 0:i.id)||"",v=!!i,g=(i==null?void 0:i.email)||"",[a,_]=F(!1),[n,h]=F(l),[f,E]=F(null),[y,k]=F(!0),b=r=>r.valid?null:r.valueMissing?s.LoginFormMissingEmailError:s.LoginFormInvalidEmailError,A=w.value.data,I=r=>{const{value:m}=r.target;h(m),E(null),k(!0)},H=r=>{const{validity:m}=r.target;E(b(m))},M=r=>{const{validity:m}=r.target;E(b(m))};!a&&v&&(_(!0),h((i==null?void 0:i.email)||l)),O(()=>{if(f!==null&&f!==""||n===null||n===""||z.authenticated)return;const r=setTimeout(()=>{V(n).then(m=>{k(m),g!==n&&$(n).catch(console.error)}).catch(m=>{console.log(m),E(s.LoginFormInvalidEmailError),k(!0)})},Y);return()=>{r&&clearTimeout(r)}},[g,p,n,f,s.LoginFormInvalidEmailError]);const T=y?"":c(B,{children:[s.LoginFormEmailExistsAlreadyHaveAccount," ",o("a",{href:"#",onClick:r=>{r.preventDefault(),t==null||t(n)},children:s.LoginFormEmailExistsSignInButton})," ",s.LoginFormEmailExistsForFasterCheckout]});return o(K,{className:e,currentEmail:n,error:f,hint:T,name:W,onEmailBlur:H,onEmailChange:I,onEmailInvalid:M,onSignInClick:r=>{const m=n?X(n):!1;t==null||t(m?r:null)},onSignOutClick:u,customer:A,...d})};x.displayName="LoginFormContainer";const Lo=U(x);export{W as LOGIN_FORM_NAME,Lo as LoginForm,Lo as default};
@@ -1,3 +1,19 @@
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
17
  export * from './MergedCartBanner';
2
18
  export { MergedCartBanner as default } from './MergedCartBanner';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{M as i,M}from"../chunks/MergedCartBanner.js";import"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/components.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/preact-compat.js";import"@dropins/tools/i18n.js";export{i as MergedCartBanner,M as default};
1
+ import{jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import{AlertBanner as f,Icon as u}from"@dropins/tools/components.js";import{events as g}from"@dropins/tools/event-bus.js";import*as i from"@dropins/tools/preact-compat.js";import{useState as p,useEffect as I}from"@dropins/tools/preact-compat.js";import{useText as h,Text as v}from"@dropins/tools/i18n.js";const B=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"})),E=t=>{const[r,s]=p(0),a=h({mergedCartBannerItems:e(v,{id:"Checkout.MergedCartBanner.items",fields:{count:r},plural:r})});I(()=>{const n=g.on("cart/merged",o=>{var m;const l=(m=o==null?void 0:o.oldCartItems)==null?void 0:m.reduce((C,d)=>C+d.quantity,0);l>0&&s(l)});return()=>{n==null||n.off()}},[]);const c=()=>{s(0)};return r?e(f,{...t,className:"checkout__banner","data-testid":"merged-cart-banner",icon:e(u,{source:B}),message:e("span",{children:a.mergedCartBannerItems}),"aria-label":a.mergedCartBannerItems,onDismiss:c,variant:"neutral"}):null};export{E as MergedCartBanner,E as default};
@@ -1,3 +1,19 @@
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
17
  export * from './OutOfStock';
2
18
  export { OutOfStock as default } from './OutOfStock';
3
19
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{O as b,O as g}from"../chunks/OutOfStock.js";import"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import"../chunks/setShippingMethods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/event-bus.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";import"../chunks/BillToShippingAddress.js";import"../chunks/setBillingAddress.js";import"@dropins/tools/preact-compat.js";import"../chunks/ErrorBanner.js";import"../chunks/MergedCartBanner.js";export{b as OutOfStock,g as default};
1
+ import{jsxs as n,jsx as e}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/ShippingMethods.js";import{events as k}from"@dropins/tools/event-bus.js";import"@dropins/tools/preact-hooks.js";import"../chunks/fixtures.js";import{classes as l}from"@dropins/tools/lib.js";import{Card as h,Icon as O,Image as d}from"@dropins/tools/components.js";/* empty css */import{S as p}from"../chunks/OrderError.js";import{useText as S}from"@dropins/tools/i18n.js";/* empty css */import{useState as v,useCallback as _,useEffect as g}from"@dropins/tools/preact-compat.js";import"../chunks/getMultilineValues.js";import"../chunks/transform-shipping-methods.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";const N=({className:i,items:r,onRemoveOutOfStock:o,routeCart:m,...a})=>{const s=S({title:"Checkout.OutOfStock.title",message:"Checkout.OutOfStock.message",reviewCart:"Checkout.OutOfStock.actions.reviewCart",removeOutOfStock:"Checkout.OutOfStock.actions.removeOutOfStock"});return n(h,{className:l(["checkout-out-of-stock",i]),"data-testid":"checkout-out-of-stock",variant:"secondary",...a,children:[n("h4",{className:"checkout-out-of-stock__title",children:[e(O,{source:p,size:"16",stroke:"1"}),s.title]}),e("p",{className:"checkout-out-of-stock__message",children:s.message}),e("ol",{className:"checkout-out-of-stock__items",children:r.map(u=>e("li",{"data-testid":"out-of-stock-item",className:"checkout-out-of-stock__item",children:e(d,{loading:"eager",src:u.image.src,alt:u.image.alt,width:"100",height:"100",params:{width:100}})},u.sku))}),n("div",{className:"checkout-out-of-stock__actions",children:[m&&e("a",{"data-testid":"review-cart",className:"checkout-out-of-stock__action",href:m,children:s.reviewCart}),o&&e("button",{className:"checkout-out-of-stock__action","data-testid":"remove-out-of-stock",type:"button",onClick:o,children:s.removeOutOfStock})]})]})},F=({onCartProductsUpdate:i,routeCart:r})=>{const[o,m]=v([]),a=t=>t.outOfStock||t.insufficientQuantity,s=_(()=>{if(!i)return;const t=o.filter(c=>c.outOfStock).map(c=>({uid:c.uid,quantity:0}));i(t)},[o,i]);if(g(()=>{const t=k.on("cart/data",c=>{const f=(c==null?void 0:c.items)||[];m(f.filter(a))},{eager:!0});return()=>{t==null||t.off()}},[]),o.length===0)return null;const u=!o.some(t=>t.insufficientQuantity);return e(N,{items:o,onRemoveOutOfStock:u?s:void 0,routeCart:r==null?void 0:r()})};export{F as OutOfStock,F as default};