@dropins/storefront-cart 1.4.1-alpha006 → 1.5.0-alpha1

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.
@@ -24,6 +24,7 @@ export interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {
24
24
  enableItemRemoval?: boolean;
25
25
  enableQuantityUpdate?: boolean;
26
26
  hideHeading?: boolean;
27
+ undo?: boolean;
27
28
  }
28
29
  export declare const MiniCart: Container<MiniCartProps, CartModel | null>;
29
30
  //# sourceMappingURL=MiniCart.d.ts.map
@@ -1,4 +1,4 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{jsx as i,jsxs as m,Fragment as R}from"@dropins/tools/preact-jsx-runtime.js";import{useState as j,useEffect as w,useCallback as O}from"@dropins/tools/preact-compat.js";import{classes as h,VComponent as u,Slot as y}from"@dropins/tools/lib.js";import{g as B}from"../chunks/persisted-data.js";import{events as V}from"@dropins/tools/event-bus.js";import{Button as L,Price as N}from"@dropins/tools/components.js";/* empty css */import{useText as D}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-hooks.js";import{s as b}from"../chunks/resetCart.js";import{a as $}from"../chunks/acdl.js";import{u as q}from"../chunks/updateProductsFromCart.js";import"../chunks/CartSummaryGrid.js";import{C as z}from"../chunks/CartSummaryList.js";import"../chunks/OrderSummary.js";import"../chunks/CartSummaryTable2.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/refreshCart.js";import"../fragments.js";import"../chunks/EmptyCart2.js";import"../chunks/createGuestCart.js";import"../chunks/WarningWithCircle.js";import"../chunks/ChevronDown.js";import"../chunks/getEstimatedTotals.js";import"../chunks/OrderSummaryLine.js";import"../chunks/ChevronUp.js";import"../chunks/Coupon.js";import"../chunks/GiftCard.js";import"../chunks/EmptyCart.js";import"../chunks/Close.js";const J=({className:_,products:s,productListFooter:l,subtotal:e,subtotalExcludingTaxes:d,preCheckoutSection:o,ctas:n,...x})=>{const p=D({subtotal:"Cart.MiniCart.subtotal",subtotalExcludingTaxes:"Cart.MiniCart.subtotalExcludingTaxes"});return i("div",{...x,className:h(["cart-mini-cart",_]),children:s&&m(R,{children:[i("div",{className:"cart-mini-cart__products","data-testid":"mini-cart-products-wrapper",children:s}),l&&i("div",{className:h(["cart-mini-cart__productListFooter"]),"data-testid":"mini-cart-product-list-footer",children:i(u,{node:l})}),m("div",{className:"cart-mini-cart__footer","data-testid":"mini-cart-subtotals",children:[e&&m("div",{className:"cart-mini-cart__footer__estimated-total","data-testid":"mini-cart-subtotal",children:[p.subtotal,i(u,{node:e})]}),d&&m("div",{className:"cart-mini-cart__footer__estimated-total-excluding-taxes","data-testid":"mini-cart-subtotal-excluding-taxes",children:[p.subtotalExcludingTaxes,i(u,{node:d,className:h(["dropin-price-summary__price","dropin-price-summary__price--muted"])})]}),o&&i("div",{className:h(["cart-mini-cart__preCheckoutSection"]),"data-testid":"mini-cart-pre-checkout-section",children:i(u,{node:o})}),n&&i(u,{node:n,className:"cart-mini-cart__footer__ctas"})]})]})})},K=({children:_,initialData:s=null,hideFooter:l=!0,slots:e,routeProduct:d,routeCart:o,routeCheckout:n,routeEmptyCartCTA:x,showDiscount:p,showSavings:P,enableItemRemoval:S=!0,enableQuantityUpdate:T=!1,hideHeading:M=!1,...Q})=>{var v,k,I;const[t,U]=j(s),a=(v=b.config)==null?void 0:v.shoppingCartDisplaySetting;w(()=>{const r=V.on("cart/data",f=>{U(f)},{eager:!0});return()=>{r==null||r.off()}},[]);const g=D({cartLink:"Cart.MiniCart.cartLink",checkoutLink:"Cart.MiniCart.checkoutLink"}),C=(r,f)=>q([{uid:r,quantity:f}]),E=r=>C(r,0),c=t==null?void 0:t.hasOutOfStockItems,F=O(()=>{t&&!c&&$(t,b.locale)},[t,c]),G=i(y,{name:"ProductList",slot:e==null?void 0:e.ProductList,context:{itemQuantityUpdateHandler:C,itemRemoveHandler:E,totalQuantity:t==null?void 0:t.totalQuantity},children:i(z,{"data-testid":"default-cart-summary-list",routeProduct:d,routeEmptyCartCTA:x,initialData:t,maxItems:(k=b.config)==null?void 0:k.miniCartMaxItemsDisplay,showMaxItems:!!((I=b.config)!=null&&I.miniCartMaxItemsDisplay),hideHeading:M||!(t!=null&&t.totalQuantity),hideFooter:l,enableRemoveItem:S,enableUpdateItemQuantity:T,showDiscount:p,showSavings:P,slots:{Thumbnail:e==null?void 0:e.Thumbnail}})}),X=r=>i(y,{name:"ProductListFooter",slot:e==null?void 0:e.ProductListFooter,context:{data:r}}),A=r=>i(y,{name:"PreCheckoutSection",slot:e==null?void 0:e.PreCheckoutSection,context:{data:r}}),H=()=>(a==null?void 0:a.subtotal)==="INCLUDING_TAX"||(a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?{amount:t==null?void 0:t.subtotal.includingTax.value,currency:t==null?void 0:t.subtotal.includingTax.currency,"data-testid":"subtotal-including-tax",style:{font:"inherit"}}:{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-excluding-tax",style:{font:"inherit"}};return i(J,{...Q,productListFooter:X(t),subtotal:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&i(N,{...H()}):void 0,subtotalExcludingTaxes:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&((a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?i(N,{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-including-excluding-tax",style:{font:"inherit"}}):void 0):void 0,preCheckoutSection:A(t),ctas:t!=null&&t.totalQuantity?m("div",{children:[n&&i(L,{"data-testid":"route-checkout-button",variant:"primary",href:c?void 0:n(),disabled:c,"aria-disabled":c,onClick:F,children:g.checkoutLink}),o&&i(L,{"data-testid":"route-cart-button",variant:"tertiary",href:o(),children:g.cartLink})]}):void 0,products:G})};K.getInitialData=async function(){return B()};export{K as MiniCart,K as default};
3
+ import{jsx as i,jsxs as m,Fragment as j}from"@dropins/tools/preact-jsx-runtime.js";import{useState as w,useEffect as O,useCallback as B}from"@dropins/tools/preact-compat.js";import{classes as h,VComponent as u,Slot as y}from"@dropins/tools/lib.js";import{g as V}from"../chunks/persisted-data.js";import{events as $}from"@dropins/tools/event-bus.js";import{Button as L,Price as N}from"@dropins/tools/components.js";/* empty css */import{useText as D}from"@dropins/tools/i18n.js";import"@dropins/tools/preact-hooks.js";import{s as b}from"../chunks/resetCart.js";import{a as q}from"../chunks/acdl.js";import{u as z}from"../chunks/updateProductsFromCart.js";import"../chunks/CartSummaryGrid.js";import{C as J}from"../chunks/CartSummaryList.js";import"../chunks/OrderSummary.js";import"../chunks/CartSummaryTable2.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/refreshCart.js";import"../fragments.js";import"../chunks/EmptyCart2.js";import"../chunks/createGuestCart.js";import"../chunks/WarningWithCircle.js";import"../chunks/ChevronDown.js";import"../chunks/getEstimatedTotals.js";import"../chunks/OrderSummaryLine.js";import"../chunks/ChevronUp.js";import"../chunks/Coupon.js";import"../chunks/GiftCard.js";import"../chunks/EmptyCart.js";import"../chunks/Close.js";const K=({className:_,products:s,productListFooter:l,subtotal:e,subtotalExcludingTaxes:d,preCheckoutSection:o,ctas:n,...f})=>{const p=D({subtotal:"Cart.MiniCart.subtotal",subtotalExcludingTaxes:"Cart.MiniCart.subtotalExcludingTaxes"});return i("div",{...f,className:h(["cart-mini-cart",_]),children:s&&m(j,{children:[i("div",{className:"cart-mini-cart__products","data-testid":"mini-cart-products-wrapper",children:s}),l&&i("div",{className:h(["cart-mini-cart__productListFooter"]),"data-testid":"mini-cart-product-list-footer",children:i(u,{node:l})}),m("div",{className:"cart-mini-cart__footer","data-testid":"mini-cart-subtotals",children:[e&&m("div",{className:"cart-mini-cart__footer__estimated-total","data-testid":"mini-cart-subtotal",children:[p.subtotal,i(u,{node:e})]}),d&&m("div",{className:"cart-mini-cart__footer__estimated-total-excluding-taxes","data-testid":"mini-cart-subtotal-excluding-taxes",children:[p.subtotalExcludingTaxes,i(u,{node:d,className:h(["dropin-price-summary__price","dropin-price-summary__price--muted"])})]}),o&&i("div",{className:h(["cart-mini-cart__preCheckoutSection"]),"data-testid":"mini-cart-pre-checkout-section",children:i(u,{node:o})}),n&&i(u,{node:n,className:"cart-mini-cart__footer__ctas"})]})]})})},W=({children:_,initialData:s=null,hideFooter:l=!0,slots:e,routeProduct:d,routeCart:o,routeCheckout:n,routeEmptyCartCTA:f,showDiscount:p,showSavings:P,enableItemRemoval:S=!0,enableQuantityUpdate:T=!1,hideHeading:M=!1,undo:Q=!1,...U})=>{var v,k,I;const[t,E]=w(s),a=(v=b.config)==null?void 0:v.shoppingCartDisplaySetting;O(()=>{const r=$.on("cart/data",x=>{E(x)},{eager:!0});return()=>{r==null||r.off()}},[]);const g=D({cartLink:"Cart.MiniCart.cartLink",checkoutLink:"Cart.MiniCart.checkoutLink"}),C=(r,x)=>z([{uid:r,quantity:x}]),F=r=>C(r,0),c=t==null?void 0:t.hasOutOfStockItems,G=B(()=>{t&&!c&&q(t,b.locale)},[t,c]),X=i(y,{name:"ProductList",slot:e==null?void 0:e.ProductList,context:{itemQuantityUpdateHandler:C,itemRemoveHandler:F,totalQuantity:t==null?void 0:t.totalQuantity},children:i(J,{"data-testid":"default-cart-summary-list",routeProduct:d,routeEmptyCartCTA:f,initialData:t,maxItems:(k=b.config)==null?void 0:k.miniCartMaxItemsDisplay,showMaxItems:!!((I=b.config)!=null&&I.miniCartMaxItemsDisplay),hideHeading:M||!(t!=null&&t.totalQuantity),hideFooter:l,enableRemoveItem:S,enableUpdateItemQuantity:T,showDiscount:p,showSavings:P,undo:Q,slots:{Thumbnail:e==null?void 0:e.Thumbnail}})}),A=r=>i(y,{name:"ProductListFooter",slot:e==null?void 0:e.ProductListFooter,context:{data:r}}),H=r=>i(y,{name:"PreCheckoutSection",slot:e==null?void 0:e.PreCheckoutSection,context:{data:r}}),R=()=>(a==null?void 0:a.subtotal)==="INCLUDING_TAX"||(a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?{amount:t==null?void 0:t.subtotal.includingTax.value,currency:t==null?void 0:t.subtotal.includingTax.currency,"data-testid":"subtotal-including-tax",style:{font:"inherit"}}:{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-excluding-tax",style:{font:"inherit"}};return i(K,{...U,productListFooter:A(t),subtotal:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&i(N,{...R()}):void 0,subtotalExcludingTaxes:t!=null&&t.totalQuantity?(t==null?void 0:t.subtotal)&&((a==null?void 0:a.subtotal)==="INCLUDING_EXCLUDING_TAX"?i(N,{amount:t==null?void 0:t.subtotal.excludingTax.value,currency:t==null?void 0:t.subtotal.excludingTax.currency,"data-testid":"subtotal-including-excluding-tax",style:{font:"inherit"}}):void 0):void 0,preCheckoutSection:H(t),ctas:t!=null&&t.totalQuantity?m("div",{children:[n&&i(L,{"data-testid":"route-checkout-button",variant:"primary",href:c?void 0:n(),disabled:c,"aria-disabled":c,onClick:G,children:g.checkoutLink}),o&&i(L,{"data-testid":"route-cart-button",variant:"tertiary",href:o(),children:g.cartLink})]}):void 0,products:X})};W.getInitialData=async function(){return V()};export{W as MiniCart,W as default};
4
4
  //# sourceMappingURL=MiniCart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MiniCart.js","sources":["/@dropins/storefront-cart/src/components/MiniCart/MiniCart.tsx","/@dropins/storefront-cart/src/containers/MiniCart/MiniCart.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/cart/components/MiniCart/MiniCart.css';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n products?: VNode;\n productListFooter?: VNode;\n subtotal?: VNode;\n subtotalExcludingTaxes?: VNode;\n preCheckoutSection?: VNode;\n ctas?: VNode;\n}\n\nexport const MiniCart: FunctionComponent<MiniCartProps> = ({\n className,\n products,\n productListFooter,\n subtotal,\n subtotalExcludingTaxes,\n preCheckoutSection,\n ctas,\n ...props\n}) => {\n const dictionary = useText({\n subtotal: 'Cart.MiniCart.subtotal',\n subtotalExcludingTaxes: 'Cart.MiniCart.subtotalExcludingTaxes',\n });\n\n return (\n <div {...props} className={classes(['cart-mini-cart', className])}>\n {/* Content */}\n {products && (\n <>\n <div\n className=\"cart-mini-cart__products\"\n data-testid=\"mini-cart-products-wrapper\"\n >\n {products}\n </div>\n\n {/* Product List Footer */}\n {productListFooter && (\n <div\n className={classes(['cart-mini-cart__productListFooter'])}\n data-testid=\"mini-cart-product-list-footer\"\n >\n <VComponent node={productListFooter} />\n </div>\n )}\n\n <div\n className=\"cart-mini-cart__footer\"\n data-testid=\"mini-cart-subtotals\"\n >\n {/* Subtotal */}\n {subtotal && (\n <div\n className=\"cart-mini-cart__footer__estimated-total\"\n data-testid=\"mini-cart-subtotal\"\n >\n {dictionary.subtotal}\n <VComponent node={subtotal} />\n </div>\n )}\n {/* Subtotal Excluding Taxes */}\n {subtotalExcludingTaxes && (\n <div\n className=\"cart-mini-cart__footer__estimated-total-excluding-taxes\"\n data-testid=\"mini-cart-subtotal-excluding-taxes\"\n >\n {dictionary.subtotalExcludingTaxes}\n <VComponent\n node={subtotalExcludingTaxes}\n className={classes([\n 'dropin-price-summary__price',\n 'dropin-price-summary__price--muted',\n ])}\n />\n </div>\n )}\n\n {/* Pre-checkout section */}\n {preCheckoutSection && (\n <div\n className={classes(['cart-mini-cart__preCheckoutSection'])}\n data-testid=\"mini-cart-pre-checkout-section\"\n >\n <VComponent node={preCheckoutSection} />\n </div>\n )}\n\n {ctas && (\n <VComponent\n node={ctas}\n className=\"cart-mini-cart__footer__ctas\"\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n HTMLAttributes,\n useCallback,\n useEffect,\n useState,\n} from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport { CartModel } from '@/cart/data/models';\nimport { getPersistedCartData } from '@/cart/lib/persisted-data';\nimport { events } from '@adobe-commerce/event-bus';\nimport { MiniCart as MiniCartComponent } from '@/cart/components';\nimport { CartSummaryList } from '@/cart/containers';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, ImageProps, Price } from '@adobe-commerce/elsie/components';\nimport { updateProductsFromCart } from '@/cart/api';\nimport { publishInitiateCheckoutEvent } from '@/cart/lib/acdl';\nimport { state } from '@/cart/lib/state';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n routeProduct?: (item: CartModel['items'][0]) => string;\n routeCart?: () => string;\n routeCheckout?: () => string;\n routeEmptyCartCTA?: () => string;\n slots?: {\n ProductList?: SlotProps;\n ProductListFooter?: SlotProps;\n PreCheckoutSection?: SlotProps;\n Thumbnail?: SlotProps<{ \n item: CartModel['items'][number], \n defaultImageProps: ImageProps \n }>;\n };\n hideFooter?: boolean;\n displayAllItems?: boolean;\n showDiscount?: boolean;\n showSavings?: boolean;\n enableItemRemoval?: boolean;\n enableQuantityUpdate?: boolean;\n hideHeading?: boolean;\n}\n\nexport const MiniCart: Container<MiniCartProps, CartModel | null> = ({\n children,\n initialData = null,\n hideFooter = true, // Default to true for MiniCart\n slots,\n routeProduct,\n routeCart,\n routeCheckout,\n routeEmptyCartCTA,\n showDiscount,\n showSavings,\n enableItemRemoval = true, // Default to true for MiniCart\n enableQuantityUpdate = false, // Default to false for MiniCart\n hideHeading = false, // Default to false for MiniCart\n ...props\n}) => {\n const [data, setData] = useState<CartModel | null>(initialData);\n const cartTaxesConfig = state.config?.shoppingCartDisplaySetting;\n\n useEffect(() => {\n const event = events.on(\n 'cart/data',\n (payload) => {\n setData(payload as CartModel);\n },\n { eager: true }\n );\n\n return () => {\n event?.off();\n };\n }, []);\n\n const dictionary = useText({\n cartLink: 'Cart.MiniCart.cartLink',\n checkoutLink: 'Cart.MiniCart.checkoutLink',\n });\n\n const handleItemQuantityUpdate = (uid: string, quantity: number) => {\n return updateProductsFromCart([{ uid, quantity }]);\n };\n\n const handleItemRemove = (uid: string) => handleItemQuantityUpdate(uid, 0);\n\n const checkoutLinkDisabled = data?.hasOutOfStockItems;\n\n const handleInitiateCheckout = useCallback(() => {\n if (data && !checkoutLinkDisabled) {\n publishInitiateCheckoutEvent(data, state.locale);\n }\n }, [data, checkoutLinkDisabled]);\n\n const productList = (\n <Slot\n name=\"ProductList\"\n slot={slots?.ProductList}\n context={{\n itemQuantityUpdateHandler: handleItemQuantityUpdate,\n itemRemoveHandler: handleItemRemove,\n totalQuantity: data?.totalQuantity,\n }}\n >\n <CartSummaryList\n data-testid=\"default-cart-summary-list\"\n routeProduct={routeProduct}\n routeEmptyCartCTA={routeEmptyCartCTA}\n initialData={data}\n maxItems={state.config?.miniCartMaxItemsDisplay}\n showMaxItems={!!state.config?.miniCartMaxItemsDisplay}\n hideHeading={hideHeading || !data?.totalQuantity}\n hideFooter={hideFooter}\n enableRemoveItem={enableItemRemoval}\n enableUpdateItemQuantity={enableQuantityUpdate}\n showDiscount={showDiscount}\n showSavings={showSavings}\n slots={{\n Thumbnail: slots?.Thumbnail,\n }}\n />\n </Slot>\n );\n\n const getProductListFooter = (data: CartModel | null) => {\n return (\n <Slot\n name=\"ProductListFooter\"\n slot={slots?.ProductListFooter}\n context={{\n data,\n }}\n />\n );\n };\n\n const getPreCheckoutSection = (data: CartModel | null) => {\n return (\n <Slot\n name=\"PreCheckoutSection\"\n slot={slots?.PreCheckoutSection}\n context={{\n data,\n }}\n />\n );\n };\n\n const getSubtotalPriceProps = () =>\n cartTaxesConfig?.subtotal === 'INCLUDING_TAX' ||\n cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX'\n ? {\n amount: data?.subtotal.includingTax.value,\n currency: data?.subtotal.includingTax.currency,\n 'data-testid': 'subtotal-including-tax',\n style: { font: 'inherit' },\n }\n : {\n amount: data?.subtotal.excludingTax.value,\n currency: data?.subtotal.excludingTax.currency,\n 'data-testid': 'subtotal-excluding-tax',\n style: { font: 'inherit' },\n };\n\n return (\n <MiniCartComponent\n {...props}\n productListFooter={getProductListFooter(data)}\n subtotal={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal && <Price {...getSubtotalPriceProps()} />\n }\n subtotalExcludingTaxes={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal &&\n (cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX' ? (\n <Price\n amount={data?.subtotal.excludingTax.value}\n currency={data?.subtotal.excludingTax.currency}\n data-testid=\"subtotal-including-excluding-tax\"\n style={{ font: 'inherit' }}\n />\n ) : undefined)\n }\n preCheckoutSection={getPreCheckoutSection(data)}\n ctas={\n !data?.totalQuantity ? undefined : (\n <div>\n {routeCheckout && (\n <Button\n data-testid=\"route-checkout-button\"\n variant=\"primary\"\n href={checkoutLinkDisabled ? undefined : routeCheckout()}\n disabled={checkoutLinkDisabled}\n aria-disabled={checkoutLinkDisabled}\n onClick={handleInitiateCheckout}\n >\n {dictionary.checkoutLink}\n </Button>\n )}\n {routeCart && (\n <Button\n data-testid=\"route-cart-button\"\n variant=\"tertiary\"\n href={routeCart()}\n >\n {dictionary.cartLink}\n </Button>\n )}\n </div>\n )\n }\n products={productList}\n />\n );\n};\n\nMiniCart.getInitialData = async function () {\n return getPersistedCartData();\n};\n"],"names":["MiniCart","className","products","productListFooter","subtotal","subtotalExcludingTaxes","preCheckoutSection","ctas","props","dictionary","useText","jsx","classes","jsxs","Fragment","VComponent","children","initialData","hideFooter","slots","routeProduct","routeCart","routeCheckout","routeEmptyCartCTA","showDiscount","showSavings","enableItemRemoval","enableQuantityUpdate","hideHeading","data","setData","useState","cartTaxesConfig","_a","state","useEffect","event","events","payload","handleItemQuantityUpdate","uid","quantity","updateProductsFromCart","handleItemRemove","checkoutLinkDisabled","handleInitiateCheckout","useCallback","publishInitiateCheckoutEvent","productList","Slot","CartSummaryList","_b","_c","getProductListFooter","getPreCheckoutSection","getSubtotalPriceProps","MiniCartComponent","Price","Button","getPersistedCartData"],"mappings":"mxCAiCO,MAAMA,EAA6C,CAAC,CACzD,UAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,uBAAAC,EACA,mBAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,SAAU,yBACV,uBAAwB,sCAAA,CACzB,EAED,OACGC,EAAA,MAAA,CAAK,GAAGH,EAAO,UAAWI,EAAQ,CAAC,iBAAkBX,CAAS,CAAC,EAE7D,SAAAC,GAEGW,EAAAC,EAAA,CAAA,SAAA,CAAAH,EAAC,MAAA,CACC,UAAU,2BACV,cAAY,6BAEX,SAAAT,CAAA,CACH,EAGCC,GACCQ,EAAC,MAAA,CACC,UAAWC,EAAQ,CAAC,mCAAmC,CAAC,EACxD,cAAY,gCAEZ,SAAAD,EAACI,EAAW,CAAA,KAAMZ,CAAmB,CAAA,CAAA,CACvC,EAGF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@dropins/storefront-cart/src/containers/MiniCart/MiniCart.tsx"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport { FunctionComponent, VNode } from 'preact';\nimport { HTMLAttributes } from 'preact/compat';\nimport { VComponent, classes } from '@adobe-commerce/elsie/lib';\nimport { useText } from '@adobe-commerce/elsie/i18n';\n\nimport '@/cart/components/MiniCart/MiniCart.css';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n products?: VNode;\n productListFooter?: VNode;\n subtotal?: VNode;\n subtotalExcludingTaxes?: VNode;\n preCheckoutSection?: VNode;\n ctas?: VNode;\n}\n\nexport const MiniCart: FunctionComponent<MiniCartProps> = ({\n className,\n products,\n productListFooter,\n subtotal,\n subtotalExcludingTaxes,\n preCheckoutSection,\n ctas,\n ...props\n}) => {\n const dictionary = useText({\n subtotal: 'Cart.MiniCart.subtotal',\n subtotalExcludingTaxes: 'Cart.MiniCart.subtotalExcludingTaxes',\n });\n\n return (\n <div {...props} className={classes(['cart-mini-cart', className])}>\n {/* Content */}\n {products && (\n <>\n <div\n className=\"cart-mini-cart__products\"\n data-testid=\"mini-cart-products-wrapper\"\n >\n {products}\n </div>\n\n {/* Product List Footer */}\n {productListFooter && (\n <div\n className={classes(['cart-mini-cart__productListFooter'])}\n data-testid=\"mini-cart-product-list-footer\"\n >\n <VComponent node={productListFooter} />\n </div>\n )}\n\n <div\n className=\"cart-mini-cart__footer\"\n data-testid=\"mini-cart-subtotals\"\n >\n {/* Subtotal */}\n {subtotal && (\n <div\n className=\"cart-mini-cart__footer__estimated-total\"\n data-testid=\"mini-cart-subtotal\"\n >\n {dictionary.subtotal}\n <VComponent node={subtotal} />\n </div>\n )}\n {/* Subtotal Excluding Taxes */}\n {subtotalExcludingTaxes && (\n <div\n className=\"cart-mini-cart__footer__estimated-total-excluding-taxes\"\n data-testid=\"mini-cart-subtotal-excluding-taxes\"\n >\n {dictionary.subtotalExcludingTaxes}\n <VComponent\n node={subtotalExcludingTaxes}\n className={classes([\n 'dropin-price-summary__price',\n 'dropin-price-summary__price--muted',\n ])}\n />\n </div>\n )}\n\n {/* Pre-checkout section */}\n {preCheckoutSection && (\n <div\n className={classes(['cart-mini-cart__preCheckoutSection'])}\n data-testid=\"mini-cart-pre-checkout-section\"\n >\n <VComponent node={preCheckoutSection} />\n </div>\n )}\n\n {ctas && (\n <VComponent\n node={ctas}\n className=\"cart-mini-cart__footer__ctas\"\n />\n )}\n </div>\n </>\n )}\n </div>\n );\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: All information contained herein is, and remains\n * the property of Adobe and its suppliers, if any. The intellectual\n * and technical concepts contained herein are proprietary to Adobe\n * and its suppliers and are protected by all applicable intellectual\n * property laws, including trade secret and copyright laws.\n * Dissemination of this information or reproduction of this material\n * is strictly forbidden unless prior written permission is obtained\n * from Adobe.\n *******************************************************************/\n\nimport {\n HTMLAttributes,\n useCallback,\n useEffect,\n useState,\n} from 'preact/compat';\nimport { Container, Slot, SlotProps } from '@adobe-commerce/elsie/lib';\nimport { CartModel } from '@/cart/data/models';\nimport { getPersistedCartData } from '@/cart/lib/persisted-data';\nimport { events } from '@adobe-commerce/event-bus';\nimport { MiniCart as MiniCartComponent } from '@/cart/components';\nimport { CartSummaryList } from '@/cart/containers';\nimport { useText } from '@adobe-commerce/elsie/i18n';\nimport { Button, ImageProps, Price } from '@adobe-commerce/elsie/components';\nimport { updateProductsFromCart } from '@/cart/api';\nimport { publishInitiateCheckoutEvent } from '@/cart/lib/acdl';\nimport { state } from '@/cart/lib/state';\n\nexport interface MiniCartProps extends HTMLAttributes<HTMLDivElement> {\n routeProduct?: (item: CartModel['items'][0]) => string;\n routeCart?: () => string;\n routeCheckout?: () => string;\n routeEmptyCartCTA?: () => string;\n slots?: {\n ProductList?: SlotProps;\n ProductListFooter?: SlotProps;\n PreCheckoutSection?: SlotProps;\n Thumbnail?: SlotProps<{ \n item: CartModel['items'][number], \n defaultImageProps: ImageProps \n }>;\n };\n hideFooter?: boolean;\n displayAllItems?: boolean;\n showDiscount?: boolean;\n showSavings?: boolean;\n enableItemRemoval?: boolean;\n enableQuantityUpdate?: boolean;\n hideHeading?: boolean;\n undo?: boolean;\n}\n\nexport const MiniCart: Container<MiniCartProps, CartModel | null> = ({\n children,\n initialData = null,\n hideFooter = true, // Default to true for MiniCart\n slots,\n routeProduct,\n routeCart,\n routeCheckout,\n routeEmptyCartCTA,\n showDiscount,\n showSavings,\n enableItemRemoval = true, // Default to true for MiniCart\n enableQuantityUpdate = false, // Default to false for MiniCart\n hideHeading = false, // Default to false for MiniCart\n undo = false,\n ...props\n}) => {\n const [data, setData] = useState<CartModel | null>(initialData);\n const cartTaxesConfig = state.config?.shoppingCartDisplaySetting;\n\n useEffect(() => {\n const event = events.on(\n 'cart/data',\n (payload) => {\n setData(payload as CartModel);\n },\n { eager: true }\n );\n\n return () => {\n event?.off();\n };\n }, []);\n\n const dictionary = useText({\n cartLink: 'Cart.MiniCart.cartLink',\n checkoutLink: 'Cart.MiniCart.checkoutLink',\n });\n\n const handleItemQuantityUpdate = (uid: string, quantity: number) => {\n return updateProductsFromCart([{ uid, quantity }]);\n };\n\n const handleItemRemove = (uid: string) => handleItemQuantityUpdate(uid, 0);\n\n const checkoutLinkDisabled = data?.hasOutOfStockItems;\n\n const handleInitiateCheckout = useCallback(() => {\n if (data && !checkoutLinkDisabled) {\n publishInitiateCheckoutEvent(data, state.locale);\n }\n }, [data, checkoutLinkDisabled]);\n\n const productList = (\n <Slot\n name=\"ProductList\"\n slot={slots?.ProductList}\n context={{\n itemQuantityUpdateHandler: handleItemQuantityUpdate,\n itemRemoveHandler: handleItemRemove,\n totalQuantity: data?.totalQuantity,\n }}\n >\n <CartSummaryList\n data-testid=\"default-cart-summary-list\"\n routeProduct={routeProduct}\n routeEmptyCartCTA={routeEmptyCartCTA}\n initialData={data}\n maxItems={state.config?.miniCartMaxItemsDisplay}\n showMaxItems={!!state.config?.miniCartMaxItemsDisplay}\n hideHeading={hideHeading || !data?.totalQuantity}\n hideFooter={hideFooter}\n enableRemoveItem={enableItemRemoval}\n enableUpdateItemQuantity={enableQuantityUpdate}\n showDiscount={showDiscount}\n showSavings={showSavings}\n undo={undo}\n slots={{\n Thumbnail: slots?.Thumbnail,\n }}\n />\n </Slot>\n );\n\n const getProductListFooter = (data: CartModel | null) => {\n return (\n <Slot\n name=\"ProductListFooter\"\n slot={slots?.ProductListFooter}\n context={{\n data,\n }}\n />\n );\n };\n\n const getPreCheckoutSection = (data: CartModel | null) => {\n return (\n <Slot\n name=\"PreCheckoutSection\"\n slot={slots?.PreCheckoutSection}\n context={{\n data,\n }}\n />\n );\n };\n\n const getSubtotalPriceProps = () =>\n cartTaxesConfig?.subtotal === 'INCLUDING_TAX' ||\n cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX'\n ? {\n amount: data?.subtotal.includingTax.value,\n currency: data?.subtotal.includingTax.currency,\n 'data-testid': 'subtotal-including-tax',\n style: { font: 'inherit' },\n }\n : {\n amount: data?.subtotal.excludingTax.value,\n currency: data?.subtotal.excludingTax.currency,\n 'data-testid': 'subtotal-excluding-tax',\n style: { font: 'inherit' },\n };\n\n return (\n <MiniCartComponent\n {...props}\n productListFooter={getProductListFooter(data)}\n subtotal={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal && <Price {...getSubtotalPriceProps()} />\n }\n subtotalExcludingTaxes={\n !data?.totalQuantity\n ? undefined\n : data?.subtotal &&\n (cartTaxesConfig?.subtotal === 'INCLUDING_EXCLUDING_TAX' ? (\n <Price\n amount={data?.subtotal.excludingTax.value}\n currency={data?.subtotal.excludingTax.currency}\n data-testid=\"subtotal-including-excluding-tax\"\n style={{ font: 'inherit' }}\n />\n ) : undefined)\n }\n preCheckoutSection={getPreCheckoutSection(data)}\n ctas={\n !data?.totalQuantity ? undefined : (\n <div>\n {routeCheckout && (\n <Button\n data-testid=\"route-checkout-button\"\n variant=\"primary\"\n href={checkoutLinkDisabled ? undefined : routeCheckout()}\n disabled={checkoutLinkDisabled}\n aria-disabled={checkoutLinkDisabled}\n onClick={handleInitiateCheckout}\n >\n {dictionary.checkoutLink}\n </Button>\n )}\n {routeCart && (\n <Button\n data-testid=\"route-cart-button\"\n variant=\"tertiary\"\n href={routeCart()}\n >\n {dictionary.cartLink}\n </Button>\n )}\n </div>\n )\n }\n products={productList}\n />\n );\n};\n\nMiniCart.getInitialData = async function () {\n return getPersistedCartData();\n};\n"],"names":["MiniCart","className","products","productListFooter","subtotal","subtotalExcludingTaxes","preCheckoutSection","ctas","props","dictionary","useText","jsx","classes","jsxs","Fragment","VComponent","children","initialData","hideFooter","slots","routeProduct","routeCart","routeCheckout","routeEmptyCartCTA","showDiscount","showSavings","enableItemRemoval","enableQuantityUpdate","hideHeading","undo","data","setData","useState","cartTaxesConfig","_a","state","useEffect","event","events","payload","handleItemQuantityUpdate","uid","quantity","updateProductsFromCart","handleItemRemove","checkoutLinkDisabled","handleInitiateCheckout","useCallback","publishInitiateCheckoutEvent","productList","Slot","CartSummaryList","_b","_c","getProductListFooter","getPreCheckoutSection","getSubtotalPriceProps","MiniCartComponent","Price","Button","getPersistedCartData"],"mappings":"mxCAiCO,MAAMA,EAA6C,CAAC,CACzD,UAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,SAAAC,EACA,uBAAAC,EACA,mBAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAAM,CACJ,MAAMC,EAAaC,EAAQ,CACzB,SAAU,yBACV,uBAAwB,sCAAA,CACzB,EAED,OACGC,E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c,EACvD,SAAUuB,EACV,gBAAeA,EACf,QAASC,EAER,SAAWrC,EAAA,YAAA,CACd,EAEDY,GACCV,EAACgD,EAAA,CACC,cAAY,oBACZ,QAAQ,WACR,KAAMtC,EAAU,EAEf,SAAWZ,EAAA,QAAA,CAAA,CACd,EAEJ,EAvBqB,OA0BzB,SAAUwC,CAAA,CACZ,CAEJ,EAEAjD,EAAS,eAAiB,gBAAkB,CAC1C,OAAO4D,EAAqB,CAC9B"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-cart", "version": "1.4.1-alpha006", "@dropins/tools": "1.4.0-beta1", "license": "SEE LICENSE IN LICENSE.md"}
1
+ {"name": "@dropins/storefront-cart", "version": "1.5.0-alpha1", "@dropins/tools": "1.4.0-beta1", "license": "SEE LICENSE IN LICENSE.md"}