@dropins/storefront-wishlist 2.0.0-alpha1 → 2.0.0

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 (44) hide show
  1. package/api/index.d.ts +0 -1
  2. package/api/initialize/initialize.d.ts +3 -3
  3. package/api.js +4 -3
  4. package/api.js.map +1 -0
  5. package/chunks/Heart.js +1 -0
  6. package/chunks/Heart.js.map +1 -0
  7. package/chunks/HeartFilled.js +1 -0
  8. package/chunks/HeartFilled.js.map +1 -0
  9. package/chunks/Trash.js +1 -0
  10. package/chunks/Trash.js.map +1 -0
  11. package/chunks/WishlistAlert.js +1 -0
  12. package/chunks/WishlistAlert.js.map +1 -0
  13. package/chunks/WishlistItem.js +2 -1
  14. package/chunks/WishlistItem.js.map +1 -0
  15. package/chunks/mergeWishlists.js +15 -15
  16. package/chunks/mergeWishlists.js.map +1 -0
  17. package/chunks/removeProductsFromWishlist.js +3 -173
  18. package/chunks/removeProductsFromWishlist.js.map +1 -0
  19. package/components/ProductItem/ProductItem.d.ts +1 -1
  20. package/containers/Wishlist/Wishlist.d.ts +2 -2
  21. package/containers/Wishlist.js +3 -2
  22. package/containers/Wishlist.js.map +1 -0
  23. package/containers/WishlistAlert.js +1 -0
  24. package/containers/WishlistAlert.js.map +1 -0
  25. package/containers/WishlistItem/WishlistItem.d.ts +2 -2
  26. package/containers/WishlistItem.js +2 -1
  27. package/containers/WishlistItem.js.map +1 -0
  28. package/containers/WishlistToggle/WishlistToggle.d.ts +1 -1
  29. package/containers/WishlistToggle.js +1 -0
  30. package/containers/WishlistToggle.js.map +1 -0
  31. package/data/transforms/__fixtures__/productData.d.ts +1 -72
  32. package/data/transforms/index.d.ts +0 -1
  33. package/package.json +1 -1
  34. package/render/render.d.ts +1 -1
  35. package/render.js +1 -0
  36. package/render.js.map +1 -0
  37. package/api/getProductBySku/getProductBySku.d.ts +0 -6
  38. package/api/getProductBySku/graphql/getProductBySku.graphql.d.ts +0 -18
  39. package/api/getProductBySku/graphql/index.d.ts +0 -18
  40. package/api/getProductBySku/index.d.ts +0 -18
  41. package/api/graphql/PriceRangeFragment.graphql.d.ts +0 -18
  42. package/api/graphql/ProductFragment.graphql.d.ts +0 -18
  43. package/chunks/getProductBySku.js +0 -13
  44. package/data/transforms/transform-product.d.ts +0 -4
@@ -1,18 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2025 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export * from './getProductBySku';
18
- //# sourceMappingURL=index.d.ts.map
@@ -1,18 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2025 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const PRICE_RANGE_FRAGMENT = "\n fragment PRICE_RANGE_FRAGMENT on PriceRange {\n minimum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n fixed_product_taxes {\n amount {\n currency\n value\n }\n label\n } \n }\n maximum_price {\n regular_price {\n value\n currency\n }\n final_price {\n value\n currency\n }\n discount {\n percent_off\n amount_off\n }\n fixed_product_taxes {\n amount {\n currency\n value\n }\n label\n } \n }\n }\n";
18
- //# sourceMappingURL=PriceRangeFragment.graphql.d.ts.map
@@ -1,18 +0,0 @@
1
- /********************************************************************
2
- * ADOBE CONFIDENTIAL
3
- * __________________
4
- *
5
- * Copyright 2025 Adobe
6
- * All Rights Reserved.
7
- *
8
- * NOTICE: All information contained herein is, and remains
9
- * the property of Adobe and its suppliers, if any. The intellectual
10
- * and technical concepts contained herein are proprietary to Adobe
11
- * and its suppliers and are protected by all applicable intellectual
12
- * property laws, including trade secret and copyright laws.
13
- * Dissemination of this information or reproduction of this material
14
- * is strictly forbidden unless prior written permission is obtained
15
- * from Adobe.
16
- *******************************************************************/
17
- export declare const PRODUCT_FRAGMENT: string;
18
- //# sourceMappingURL=ProductFragment.graphql.d.ts.map
@@ -1,13 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- import{P as p,f,h as g}from"./removeProductsFromWishlist.js";function d(e,t=[]){var r,i;return e?{name:e.name,sku:e.sku,isBundle:!1,addToCartAllowed:!0,inStock:e.stock_status==="IN_STOCK",shortDescription:(r=e.short_description)==null?void 0:r.html,metaDescription:e.meta_description,metaKeyword:e.meta_keyword,metaTitle:e.meta_title,description:(i=e.description)==null?void 0:i.html,images:P(e,t),prices:h(e),attributes:v(e),options:y(e),optionUIDs:void 0,url:e.canonical_url,urlKey:e.url_key,externalId:void 0,externalParentId:void 0,variantSku:void 0,productType:b(e.__typename)}:null}function b(e){switch(e){case"SimpleProduct":case"VirtualProduct":case"DownloadableProduct":return"simple";default:return"complex"}}function y(e){var t;return e.__typename==="ConfigurableProduct"?e.configurable_options?(t=e.configurable_options)==null?void 0:t.map(r=>{var i;return{id:r.attribute_code,type:"text",label:r.uid,required:!0,multiple:!1,items:(i=r.values)==null?void 0:i.map(n=>({id:n.uid,label:n.label,inStock:!0,value:n.uid,selected:!1}))}}):[]:[]}function P(e,t=[]){var i;let r=e.thumbnail;if(e.__typename==="ConfigurableProduct"&&e.variants&&(t==null?void 0:t.length)>0){const n=t.map(o=>o.uid);let u=e.variants.find(o=>{var s;const l=((s=o.attributes)==null?void 0:s.map(c=>c.uid))||[];return n.every(c=>l.includes(c))});u||(u=e.variants.find(o=>{var l;return(l=o.attributes)==null?void 0:l.some(s=>t.some(c=>c.uid===s.uid))})),(i=u==null?void 0:u.product)!=null&&i.image&&(r=u.product.image)}return[{url:r==null?void 0:r.url,label:r==null?void 0:r.label}]}function h(e){var t,r,i,n,u,o,l,s,c,m,a,_;return{regular:{currency:((i=(r=(t=e.price_range)==null?void 0:t.minimum_price)==null?void 0:r.regular_price)==null?void 0:i.currency)??"USD",amount:((o=(u=(n=e.price_range)==null?void 0:n.minimum_price)==null?void 0:u.regular_price)==null?void 0:o.value)??0},final:{currency:((c=(s=(l=e.price_range)==null?void 0:l.minimum_price)==null?void 0:s.final_price)==null?void 0:c.currency)??"USD",amount:((_=(a=(m=e.price_range)==null?void 0:m.minimum_price)==null?void 0:a.final_price)==null?void 0:_.value)??0},visible:!0}}function v(e){var t,r;return(r=(t=e.custom_attributesV2)==null?void 0:t.items)==null?void 0:r.map(i=>{const n=i.code.split("_").map(u=>u.charAt(0).toUpperCase()+u.slice(1)).join(" ");return{...i,code:n}})}const T=`
4
- query GET_PRODUCT_BY_SKU($sku: String!) {
5
- products(filter: { sku: { eq: $sku } }) {
6
- items {
7
- ...PRODUCT_FRAGMENT
8
- }
9
- }
10
- }
11
-
12
- ${p}
13
- `,S=async(e,t)=>{if(!e)throw Error("Product SKU is not set");return f(T,{variables:{sku:e}}).then(({errors:r,data:i})=>{var n;return r?g(r):(n=i==null?void 0:i.products)!=null&&n.items?d(i.products.items[0],t??[]):null})};export{S as g};
@@ -1,4 +0,0 @@
1
- import { Product, Option } from '../models';
2
-
3
- export declare function transformProduct(data: any, selectedOptions?: Option[]): Product | null;
4
- //# sourceMappingURL=transform-product.d.ts.map