diff --git a/package-lock.json b/package-lock.json index c68017287..2f2407385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,23 +1,23 @@ { - "name": "@adobe/aem-boilerplate", - "version": "1.3.0", + "name": "@adobe/aem-boilerplate-commerce", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@adobe/aem-boilerplate", - "version": "1.3.0", + "name": "@adobe/aem-boilerplate-commerce", + "version": "1.0.0", "hasInstallScript": true, "license": "Apache License 2.0", "dependencies": { "@adobe/magento-storefront-event-collector": "^1.8.0", "@adobe/magento-storefront-events-sdk": "^1.8.0", - "@dropins/storefront-account": "1.0.0-beta5", - "@dropins/storefront-auth": "1.0.0-beta4", - "@dropins/storefront-cart": "1.0.0-beta2", - "@dropins/storefront-checkout": "1.0.0-beta4", - "@dropins/storefront-order": "1.0.0-beta8", - "@dropins/storefront-pdp": "1.0.0-beta3", + "@dropins/storefront-account": "~1.0.0", + "@dropins/storefront-auth": "~1.0.0", + "@dropins/storefront-cart": "~1.0.0", + "@dropins/storefront-checkout": "~1.0.0", + "@dropins/storefront-order": "~1.0.0", + "@dropins/storefront-pdp": "~1.0.0", "@dropins/tools": "^0.38.0" }, "devDependencies": { @@ -766,36 +766,39 @@ } }, "node_modules/@dropins/storefront-account": { - "version": "1.0.0-beta5", - "resolved": "https://registry.npmjs.org/@dropins/storefront-account/-/storefront-account-1.0.0-beta5.tgz", - "integrity": "sha512-Kh0WnAVKcnvDziSy8hi49xWZlqU2IBSLvuZGyAOV4Cg2GblS7hhb0+cpB+M8oy4xMsP7tm2kV1nCVAzS3qWpPQ==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-account/-/storefront-account-1.0.0.tgz", + "integrity": "sha512-QQ1DZm4HTUUZ/qydThTCcsVdbM7LpVGqAfhifgSgnAgm9uSd2OKiT8EmHb4Ab729a1/bme/SsbJ5u20s4W3EGA==", + "license": "SEE LICENSE IN LICENSE.md" }, "node_modules/@dropins/storefront-auth": { - "version": "1.0.0-beta4", - "resolved": "https://registry.npmjs.org/@dropins/storefront-auth/-/storefront-auth-1.0.0-beta4.tgz", - "integrity": "sha512-/lMM4DNH5OkyOdEgpQN+FOJMyntb+bzA5t0IjUjGsHNx0osMcX5GB/jfPxzY9ZaSl01X6LRZ4S07eJ2s/Cl5Ow==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-auth/-/storefront-auth-1.0.0.tgz", + "integrity": "sha512-dhLXNLUXi8G6FINtjL8DZNrFR8BXKzabzrK0NgKwmCu2YAv2uAOL1JQOJHgD5iCIZ2l1uDwtZcxNqwdN0MUvog==", + "license": "SEE LICENSE IN LICENSE.md" }, "node_modules/@dropins/storefront-cart": { - "version": "1.0.0-beta2", - "resolved": "https://registry.npmjs.org/@dropins/storefront-cart/-/storefront-cart-1.0.0-beta2.tgz", - "integrity": "sha512-zB/CXZNQ9gazZJjTEgWbLPwxFvP+AzaM0Khk28gxWi67syJhwqHQTS+aTB84zFvZ2ARkPXg+nKrMPQl3rP3UyA==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-cart/-/storefront-cart-1.0.0.tgz", + "integrity": "sha512-ng0RPy9Uv5HI8CWMF+boNg7qneyrTQGqnkZyprINtb7LldJ0l4wj74yuGfOvyrIm1tYBBbSxMyRkkPNDQfee4w==" }, "node_modules/@dropins/storefront-checkout": { - "version": "1.0.0-beta4", - "resolved": "https://registry.npmjs.org/@dropins/storefront-checkout/-/storefront-checkout-1.0.0-beta4.tgz", - "integrity": "sha512-bCqQUcuG+aWiqUn/hnqEKYL+54psQVmmn6I9JniqZR4tLCYuBpdAUiXEIemXJZN3dvNderOGGnlWn0yKZbWa8Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-checkout/-/storefront-checkout-1.0.0.tgz", + "integrity": "sha512-tNCmgVEWEW2OzyNll69jTUTsT3wNG8yJ4HRZ/MrBJF+5/B/o3O+dfYTs4RUpIohXC8sGPkAjXCn5k6BQyo7QUA==", "license": "SEE LICENSE IN LICENSE.md" }, "node_modules/@dropins/storefront-order": { - "version": "1.0.0-beta8", - "resolved": "https://registry.npmjs.org/@dropins/storefront-order/-/storefront-order-1.0.0-beta8.tgz", - "integrity": "sha512-Hk9miY6esW6GfBRBWwo3RS6djtxxxGiv3iHGfB1xaIxK7QTJxVu5LHcPUv0dKlQ3Bd2ert2ppc4hdt3fOCOF6Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-order/-/storefront-order-1.0.0.tgz", + "integrity": "sha512-3bhRUqiFkOLvJ5ovZpVplPBs5DcbSfSnlEX7pkl1fyJ3upFDM1CPBFjQEv3+iQF2OarzlOaYCeFdzke3LNxVcg==", "license": "SEE LICENSE IN LICENSE.md" }, "node_modules/@dropins/storefront-pdp": { - "version": "1.0.0-beta3", - "resolved": "https://registry.npmjs.org/@dropins/storefront-pdp/-/storefront-pdp-1.0.0-beta3.tgz", - "integrity": "sha512-+FrqwWudn1zoOUeEsPNA7OApiUt5tcMSpLP7aJega8UNF1YzLyVyDNFG/PbZ0EmZunB/oJESG5ZxThnqitNurA==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@dropins/storefront-pdp/-/storefront-pdp-1.0.0.tgz", + "integrity": "sha512-OKfvTYdNYrU5QEKr8FWrEOv607rIVshzD0hJYFZuD6KjJ/+mQKoA7QNn6RSqn05fvYK+rG/yc0+M6smUP+mCrw==", + "license": "SEE LICENSE IN LICENSE.md" }, "node_modules/@dropins/tools": { "version": "0.38.0", diff --git a/package.json b/package.json index 67d0cd89c..92fb0cf90 100644 --- a/package.json +++ b/package.json @@ -35,12 +35,12 @@ "dependencies": { "@adobe/magento-storefront-event-collector": "^1.8.0", "@adobe/magento-storefront-events-sdk": "^1.8.0", - "@dropins/storefront-account": "1.0.0-beta5", - "@dropins/storefront-auth": "1.0.0-beta4", - "@dropins/storefront-cart": "1.0.0-beta2", - "@dropins/storefront-checkout": "1.0.0-beta4", - "@dropins/storefront-order": "1.0.0-beta8", - "@dropins/storefront-pdp": "1.0.0-beta3", + "@dropins/storefront-account": "~1.0.0", + "@dropins/storefront-auth": "~1.0.0", + "@dropins/storefront-cart": "~1.0.0", + "@dropins/storefront-checkout": "~1.0.0", + "@dropins/storefront-order": "~1.0.0", + "@dropins/storefront-pdp": "~1.0.0", "@dropins/tools": "^0.38.0" } } diff --git a/scripts/__dropins__/storefront-cart/chunks/OrderSummary.js b/scripts/__dropins__/storefront-cart/chunks/OrderSummary.js index 3a4bda91b..ffdef31c0 100644 --- a/scripts/__dropins__/storefront-cart/chunks/OrderSummary.js +++ b/scripts/__dropins__/storefront-cart/chunks/OrderSummary.js @@ -1,3 +1,3 @@ /*! Copyright 2024 Adobe All Rights Reserved. */ -import{jsxs as E,jsx as r,Fragment as We}from"@dropins/tools/preact-jsx-runtime.js";import*as Ie from"@dropins/tools/preact-compat.js";import{useState as ee,useEffect as ie,useCallback as Fe}from"@dropins/tools/preact-compat.js";import{VComponent as D,classes as ke,Slot as we}from"@dropins/tools/lib.js";import{events as Ee}from"@dropins/tools/event-bus.js";import{g as Ge}from"./persisted-data.js";import{s as Oe}from"./resetCart.js";import{g as ze}from"./getEstimatedTotals.js";import{p as Ve}from"./acdl.js";import{Accordion as Ne,AccordionSection as Be,ProgressSpinner as Ze,Divider as je,Price as l,Icon as Ue,Button as Qe}from"@dropins/tools/components.js";/* empty css */import{O as v}from"./OrderSummaryLine.js";import{S as Le}from"./ChevronDown.js";import{useText as Ae}from"@dropins/tools/i18n.js";import{S as Xe}from"./Coupon.js";const De=O=>Ie.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...O},Ie.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"#2B2B2B",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),$e=({className:O,children:A,variant:P="primary",heading:s,loading:N=!0,subTotal:g,shipping:m,discounts:_,taxTotal:x,taxesApplied:e,total:p,primaryAction:B,coupons:o,totalSaved:y,updateLineItems:I=S=>S,...t})=>{const[S,L]=ee(!1),i=Ae({checkout:"Cart.PriceSummary.checkout",discountedPrice:"Cart.CartItem.discountedPrice",download:"Cart.CartItem.download",heading:"Cart.Cart.heading",message:"Cart.CartItem.message",regularPrice:"Cart.CartItem.regularPrice",recipient:"Cart.CartItem.recipient",sender:"Cart.CartItem.sender",file:"Cart.CartItem.file",files:"Cart.CartItem.files",orderSummary:"Cart.PriceSummary.orderSummary",taxesBreakdownTitle:"Cart.PriceSummary.taxes.breakdown",taxTotal:"Cart.PriceSummary.taxes.total",taxEstimated:"Cart.PriceSummary.taxes.estimated",taxTotalOnly:"Cart.PriceSummary.taxes.totalOnly",showTaxBreakdown:"Cart.PriceSummary.taxes.showBreakdown",hideTaxBreakdown:"Cart.PriceSummary.taxes.hideBreakdown",taxToBeDetermined:"Cart.PriceSummary.taxToBeDetermined",subtotalLabel:"Cart.PriceSummary.subTotal.label",subtotalWithTaxes:"Cart.PriceSummary.subTotal.withTaxes",subtotalWithoutTaxes:"Cart.PriceSummary.subTotal.withoutTaxes",totalEstimated:"Cart.PriceSummary.total.estimated",totalLabel:"Cart.PriceSummary.total.label",totalWithoutTax:"Cart.PriceSummary.total.withoutTax",totalSaved:"Cart.PriceSummary.total.saved",shippingLabel:"Cart.PriceSummary.shipping.label",zipPlaceholder:"Cart.PriceSummary.shipping.zipPlaceholder",editZipAction:"Cart.PriceSummary.shipping.editZipAction",shippingWithTaxes:"Cart.PriceSummary.shipping.withTaxes",shippingWithoutTaxes:"Cart.PriceSummary.shipping.withoutTaxes",shippingEstimated:"Cart.PriceSummary.shipping.estimated",shippingEstimatedByState:"Cart.PriceSummary.shipping.alternateField.state",shippingEstimatedByZip:"Cart.PriceSummary.shipping.alternateField.zip",destinationLinkAriaLabel:"Cart.PriceSummary.shipping.destinationLinkAriaLabel",applyButton:"Cart.PriceSummary.estimatedShippingForm.apply.label",countryField:"Cart.PriceSummary.estimatedShippingForm.country.placeholder",freeShipping:"Cart.PriceSummary.freeShipping",stateField:"Cart.PriceSummary.estimatedShippingForm.state.placeholder",zipField:"Cart.PriceSummary.estimatedShippingForm.zip.placeholder"}),k=g&&E(v,{label:i.subtotalLabel,price:g.price,classSuffixes:["subTotal"],children:[g.taxIncluded&&r("div",{"data-testid":"sub-total-tax-caption",className:"cart-order-summary__caption",children:r("span",{children:i.subtotalWithTaxes})}),g.taxExcluded?r("div",{"data-testid":"sub-total-tax-caption-excluded",className:"cart-order-summary__caption",children:E("span",{children:[g.priceExcludingTax," ",i.subtotalWithoutTaxes]})}):void 0]}),w=_&&_.length>0&&r(We,{children:_.map(n=>E(v,{label:n.label,price:n.price,classSuffixes:["discount"],children:[n.coupon&&r(D,{node:n.coupon,className:"cart-order-summary__coupon__code"}),n.caption&&r(D,{node:n.caption,className:"cart-order-summary__caption"})]}))}),T=e&&e.length>0?r(Ne,{"data-testid":"tax-breakdown",className:"cart-order-summary__taxes",iconOpen:Le,iconClose:De,children:E(Be,{title:i.taxesBreakdownTitle,secondaryText:!S&&x?r(D,{node:x.price,className:"cart-order-summary__price"}):void 0,renderContentWhenClosed:!1,onStateChange:L,children:[r("div",{className:"cart-order-summary__appliedTaxes",children:e.map(n=>r(v,{label:n.label,price:n.price,classSuffixes:["taxEntry"],labelClassSuffix:"muted"}))}),x&&r(v,{label:i.taxTotal,price:x.price,classSuffixes:["taxTotal"],labelClassSuffix:"muted"})]})}):x&&r(v,{label:x.estimated?i.taxEstimated:i.taxTotalOnly,price:x.price,classSuffixes:["taxTotal"],testId:"tax-total-only"}),d=[{key:"subTotalContent",sortOrder:100,content:k},...m?[{key:"shippingContent",sortOrder:200,content:r(D,{node:m,className:"cart-order-summary__shipping"})}]:[],{key:"discountsContent",sortOrder:300,content:w},{key:"taxContent",sortOrder:400,content:T},...p?[{key:"taxContent",sortOrder:500,content:r(v,{label:p.estimated?i.totalEstimated:i.totalLabel,price:p.price,classSuffixes:["total","total--padded"],testId:"total-content",labelClassSuffix:"bold"})}]:[],...p&&p.priceWithoutTax?[{key:"totalWithoutTaxContent",sortOrder:600,content:r(v,{label:i.totalWithoutTax,price:p.priceWithoutTax,classSuffixes:["totalWithoutTax"],testId:"total-without-tax",labelClassSuffix:"muted"})}]:[],...y?[{key:"totalSavedContent",sortOrder:700,content:r(v,{label:i.totalSaved,price:y,classSuffixes:["saved"],testId:"total-saved",labelClassSuffix:"muted"})}]:[],...B?[{key:"primaryActionContent",sortOrder:800,content:r("div",{className:ke(["cart-order-summary__entry","cart-order-summary__primaryAction"]),children:B})}]:[],...o?[{key:"couponsContent",sortOrder:900,content:r(D,{node:o,className:"cart-order-summary__coupons"})}]:[]],h=I(d).sort((n,C)=>n.sortOrder-C.sortOrder);return E("div",{...t,className:ke(["cart-order-summary",["cart-order-summary--loading",N],[`cart-order-summary__${P}`,P],O]),children:[N&&r(Ze,{className:"cart-order-summary__spinner"}),E("div",{className:"cart-order-summary__heading",children:[s&&r(D,{node:s,className:"cart-order-summary__heading-text"}),r(je,{variant:"primary",className:"cart-order-summary__divider-primary"})]}),r("div",{className:"cart-order-summary__content",children:h.map(n=>Array.isArray(n.content)?r(Ne,{className:n.className,actionIconPosition:"right",iconOpen:Le,iconClose:De,children:r(Be,{defaultOpen:!1,title:n.title,renderContentWhenClosed:!1,children:n.content.map(C=>C.content)})}):n.content)})]})},qe=()=>{const[O,A]=ee(!1),[P,s]=ee();return{handleEstimateTotals:(g,m)=>{A(!0);const{shippingCountry:_,shippingState:x="",shippingStateId:e,shippingZip:p=""}=g,B={countryCode:_,postcode:p,region:{region:x,id:e},shipping_method:{carrier_code:(m==null?void 0:m.carrier_code)||"",method_code:(m==null?void 0:m.method_code)||""}};ze(B).then(o=>{var y,I,t,S,L,i,k,w,T,d,h,n,C,te,W,F,G,z,V,Z;o&&s({estimatedTaxTotal:{amount:(y=o.totalTax)==null?void 0:y.value,currency:(I=o.totalTax)==null?void 0:I.currency},estimatedSubTotal:{excludingTax:{amount:(S=(t=o.subtotal)==null?void 0:t.excludingTax)==null?void 0:S.value,currency:(i=(L=o.subtotal)==null?void 0:L.excludingTax)==null?void 0:i.currency},includingTax:{amount:(w=(k=o.subtotal)==null?void 0:k.includingTax)==null?void 0:w.value,currency:(d=(T=o.subtotal)==null?void 0:T.includingTax)==null?void 0:d.currency},includingDiscountOnly:{amount:(n=(h=o.subtotal)==null?void 0:h.includingDiscountOnly)==null?void 0:n.value,currency:(te=(C=o.subtotal)==null?void 0:C.includingDiscountOnly)==null?void 0:te.currency}},estimatedGrandTotalPrice:{includingTax:{amount:(W=o.total)==null?void 0:W.includingTax.value,currency:(F=o.total)==null?void 0:F.includingTax.currency},excludingTax:{amount:(G=o.total)==null?void 0:G.excludingTax.value,currency:(z=o.total)==null?void 0:z.excludingTax.currency}},estimatedAppliedTaxes:{taxes:(V=o.appliedTaxes)==null?void 0:V.map(u=>{var b,f;return{label:u.label,amount:{value:(b=u.amount)==null?void 0:b.value,currency:(f=u.amount)==null?void 0:f.currency}}})},estimatedItems:{items:(Z=o.items)==null?void 0:Z.map(u=>{var b,f,j,U,Q,X,$,q,H,R;return{uid:u.uid,price:{amount:(b=u.price)==null?void 0:b.value,currency:(f=u.price)==null?void 0:f.currency},taxedPrice:{amount:(j=u.taxedPrice)==null?void 0:j.value,currency:(U=u.taxedPrice)==null?void 0:U.currency},rowTotal:{amount:(Q=u.rowTotal)==null?void 0:Q.value,currency:(X=u.rowTotal)==null?void 0:X.currency},rowTotalIncludingTax:{amount:($=u.rowTotalIncludingTax)==null?void 0:$.value,currency:(q=u.rowTotalIncludingTax)==null?void 0:q.currency},regularPrice:{amount:(H=u.regularPrice)==null?void 0:H.value,currency:(R=u.regularPrice)==null?void 0:R.currency}}})}})}).finally(()=>{A(!1)})},estimatedTotals:P,setEstimatedTotals:s,loading:O}},He=({children:O,initialData:A=null,routeCheckout:P,slots:s,errors:N,showTotalSaved:g,enableCoupons:m,updateLineItems:_=e=>e,...x})=>{var W,F,G,z,V,Z,u,b,f,j,U,Q,X,$,q,H,R,ne,ce,oe,ue,se,le,me,de,xe,pe,he,ge,ye,Se,Te,Ce,be,fe,ve;const[e,p]=ee(A),[B,o]=ee(!1),y=e==null?void 0:e.isVirtual;m=m??!0;const{handleEstimateTotals:I,estimatedTotals:t,setEstimatedTotals:S,loading:L}=qe(),i=(W=Oe.config)==null?void 0:W.shoppingCartDisplaySetting,k=(i==null?void 0:i.subtotal)==="INCLUDING_TAX",w=(i==null?void 0:i.subtotal)==="INCLUDING_EXCLUDING_TAX",T=i==null?void 0:i.zeroTax;ie(()=>{const c=Ee.on("cart/data",a=>{var J,K,Y,M;p(a);const re=(J=a==null?void 0:a.addresses)==null?void 0:J.shipping,ae=a==null?void 0:a.isVirtual;(re||ae)&&S(null),((K=a==null?void 0:a.totalTax)==null?void 0:K.value)>0&&t===void 0&&S({estimatedTaxTotal:{amount:(Y=a==null?void 0:a.totalTax)==null?void 0:Y.value,currency:(M=a==null?void 0:a.totalTax)==null?void 0:M.currency}})},{eager:!0});return()=>{c==null||c.off()}},[]),ie(()=>{o(N)},[N]),ie(()=>{const c=Ee.on("shipping/estimate",a=>{var J,K,Y,M,Pe,_e;const re={shippingCountry:(J=a==null?void 0:a.address)==null?void 0:J.countryCode,shippingState:(K=a==null?void 0:a.address)==null?void 0:K.region,shippingStateId:(Y=a==null?void 0:a.address)==null?void 0:Y.regionId,shippingZip:(M=a==null?void 0:a.address)==null?void 0:M.postCode},ae={carrier_code:((Pe=a==null?void 0:a.shippingMethod)==null?void 0:Pe.carrierCode)||"",method_code:((_e=a==null?void 0:a.shippingMethod)==null?void 0:_e.methodCode)||""};I(re,ae)});return()=>{c==null||c.off()}},[I]);const d=Ae({checkout:"Cart.PriceSummary.checkout",free:"Cart.PriceSummary.total.free",orderSummary:"Cart.PriceSummary.orderSummary",taxToBeDetermined:"Cart.PriceSummary.taxToBeDetermined"}),h=(e==null?void 0:e.hasOutOfStockItems)||B,n=Fe(()=>{!h&&e&&Ve(e,Oe.locale)},[h,e]),C=!y&&(s!=null&&s.EstimateShipping)?r(we,{name:"EstimateShipping",slot:s.EstimateShipping},"estimateShippingId"):void 0;if(!Object.keys(e??{}).length||(e==null?void 0:e.totalQuantity)===0)return null;const te=m&&(s!=null&&s.Coupons)?r(we,{name:"Coupons",slot:s.Coupons},"couponsId"):void 0;return r($e,{...x,"data-testid":"cart-order-summary",heading:r("div",{children:d.orderSummary}),shipping:C,coupons:te,loading:L,updateLineItems:_,subTotal:{taxIncluded:k&&!T,taxExcluded:w,zeroTaxSubtotal:T,priceExcludingTax:(F=t==null?void 0:t.estimatedSubTotal)!=null&&F.excludingTax?r(l,{"data-testid":"subtotal",...(G=t==null?void 0:t.estimatedSubTotal)==null?void 0:G.excludingTax}):r(l,{"data-testid":"subtotal",amount:(V=(z=e==null?void 0:e.subtotal)==null?void 0:z.excludingTax)==null?void 0:V.value,currency:(u=(Z=e==null?void 0:e.subtotal)==null?void 0:Z.excludingTax)==null?void 0:u.currency}),price:!T&&k||!T&&w?(b=t==null?void 0:t.estimatedSubTotal)!=null&&b.includingTax?r(l,{"data-testid":"subtotal",...(f=t==null?void 0:t.estimatedSubTotal)==null?void 0:f.includingTax}):r(l,{"data-testid":"subtotal",amount:(j=e==null?void 0:e.subtotal.includingTax)==null?void 0:j.value,currency:(U=e==null?void 0:e.subtotal.includingTax)==null?void 0:U.currency}):r(l,{"data-testid":"subtotal",amount:(X=(Q=e==null?void 0:e.subtotal)==null?void 0:Q.excludingTax)==null?void 0:X.value,currency:(q=($=e==null?void 0:e.subtotal)==null?void 0:$.excludingTax)==null?void 0:q.currency})},discounts:(H=e==null?void 0:e.appliedDiscounts)==null?void 0:H.map(c=>{var a;return{label:c.label,price:r(l,{"data-testid":"summary-discount-total",amount:-c.amount.value,currency:c.amount.currency,sale:!0}),coupon:c!=null&&c.coupon?E("span",{children:[r(Ue,{source:Xe,size:"16"}),(a=c==null?void 0:c.coupon)==null?void 0:a.code]}):void 0}}),taxTotal:y||(t==null?void 0:t.estimatedTaxTotal)===void 0?{price:r("span",{"data-testid":"tax-total",children:d.taxToBeDetermined})}:{price:t!=null&&t.estimatedTaxTotal?r(l,{"data-testid":"tax-total",...t==null?void 0:t.estimatedTaxTotal}):r(l,{"data-testid":"tax-total",amount:(R=e==null?void 0:e.totalTax)==null?void 0:R.value,currency:(ne=e==null?void 0:e.totalTax)==null?void 0:ne.currency}),estimated:(!t||!!(t!=null&&t.estimatedTaxTotal))&&!((ce=e==null?void 0:e.addresses)!=null&&ce.shipping)},taxesApplied:y?void 0:i!=null&&i.fullSummary?(ue=((oe=t==null?void 0:t.estimatedAppliedTaxes)==null?void 0:oe.taxes)||(e==null?void 0:e.appliedTaxes))==null?void 0:ue.map(c=>({label:c.label,price:r(l,{"data-testid":"applied-taxes",amount:c.amount.value,currency:c.amount.currency})})):void 0,total:{price:t!=null&&t.estimatedGrandTotalPrice?((le=(se=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:se.includingTax)==null?void 0:le.amount)===0?r("span",{"data-testid":"total-including-tax",children:d.free}):r(l,{"data-testid":"total-including-tax",...(me=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:me.includingTax}):((de=e==null?void 0:e.total)==null?void 0:de.includingTax.value)===0?r("span",{"data-testid":"total-including-tax",children:d.free}):r(l,{"data-testid":"total-including-tax",amount:(xe=e==null?void 0:e.total)==null?void 0:xe.includingTax.value,currency:(pe=e==null?void 0:e.total)==null?void 0:pe.includingTax.currency}),estimated:(!t||!!(t!=null&&t.estimatedTaxTotal))&&!((he=e==null?void 0:e.addresses)!=null&&he.shipping),priceWithoutTax:i!=null&&i.grandTotal?t!=null&&t.estimatedAppliedTaxes?((ye=(ge=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:ge.excludingTax)==null?void 0:ye.amount)===0?r("span",{"data-testid":"total-excluding-tax",children:d.free}):r(l,{"data-testid":"total-excluding-tax",...(Se=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:Se.excludingTax}):((Te=e==null?void 0:e.total)==null?void 0:Te.excludingTax.value)===0?r("span",{"data-testid":"total-excluding-tax",children:d.free}):r(l,{"data-testid":"total-excluding-tax",amount:(Ce=e==null?void 0:e.total)==null?void 0:Ce.excludingTax.value,currency:(be=e==null?void 0:e.total)==null?void 0:be.excludingTax.currency}):void 0},primaryAction:P&&r(Qe,{"data-testid":"checkout-button",variant:"primary",disabled:h,"aria-disabled":h,href:h?void 0:P({cartId:e.id}),onClick:n,children:d.checkout}),totalSaved:g?r(l,{amount:(fe=e==null?void 0:e.discount)==null?void 0:fe.value,currency:(ve=e==null?void 0:e.total)==null?void 0:ve.includingTax.currency}):void 0})};He.getInitialData=async function(){return Ge()};export{He as O}; +import{jsxs as E,jsx as r,Fragment as We}from"@dropins/tools/preact-jsx-runtime.js";import*as Ie from"@dropins/tools/preact-compat.js";import{useState as M,useEffect as ae,useCallback as Fe}from"@dropins/tools/preact-compat.js";import{VComponent as D,classes as ke,Slot as we}from"@dropins/tools/lib.js";import{events as Ee}from"@dropins/tools/event-bus.js";import{g as Ge}from"./persisted-data.js";import{s as Oe}from"./resetCart.js";import{g as ze}from"./getEstimatedTotals.js";import{p as Ve}from"./acdl.js";import{Accordion as Ne,AccordionSection as Be,ProgressSpinner as Ze,Divider as je,Price as l,Icon as Ue,Button as Qe}from"@dropins/tools/components.js";/* empty css */import{O as v}from"./OrderSummaryLine.js";import{S as Le}from"./ChevronDown.js";import{useText as Ae}from"@dropins/tools/i18n.js";import{S as Xe}from"./Coupon.js";const De=O=>Ie.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...O},Ie.createElement("path",{d:"M7.74512 14.132L12.0001 9.87701L16.2551 14.132",stroke:"#2B2B2B",strokeWidth:1.5,strokeLinecap:"square",strokeLinejoin:"round"})),$e=({className:O,children:A,variant:P="primary",heading:s,loading:N=!0,subTotal:g,shipping:m,discounts:_,taxTotal:x,taxesApplied:e,total:p,primaryAction:B,coupons:o,totalSaved:y,updateLineItems:I=T=>T,...t})=>{const[T,L]=M(!1),i=Ae({checkout:"Cart.PriceSummary.checkout",discountedPrice:"Cart.CartItem.discountedPrice",download:"Cart.CartItem.download",heading:"Cart.Cart.heading",message:"Cart.CartItem.message",regularPrice:"Cart.CartItem.regularPrice",recipient:"Cart.CartItem.recipient",sender:"Cart.CartItem.sender",file:"Cart.CartItem.file",files:"Cart.CartItem.files",orderSummary:"Cart.PriceSummary.orderSummary",taxesBreakdownTitle:"Cart.PriceSummary.taxes.breakdown",taxTotal:"Cart.PriceSummary.taxes.total",taxEstimated:"Cart.PriceSummary.taxes.estimated",taxTotalOnly:"Cart.PriceSummary.taxes.totalOnly",showTaxBreakdown:"Cart.PriceSummary.taxes.showBreakdown",hideTaxBreakdown:"Cart.PriceSummary.taxes.hideBreakdown",taxToBeDetermined:"Cart.PriceSummary.taxToBeDetermined",subtotalLabel:"Cart.PriceSummary.subTotal.label",subtotalWithTaxes:"Cart.PriceSummary.subTotal.withTaxes",subtotalWithoutTaxes:"Cart.PriceSummary.subTotal.withoutTaxes",totalEstimated:"Cart.PriceSummary.total.estimated",totalLabel:"Cart.PriceSummary.total.label",totalWithoutTax:"Cart.PriceSummary.total.withoutTax",totalSaved:"Cart.PriceSummary.total.saved",shippingLabel:"Cart.PriceSummary.shipping.label",zipPlaceholder:"Cart.PriceSummary.shipping.zipPlaceholder",editZipAction:"Cart.PriceSummary.shipping.editZipAction",shippingWithTaxes:"Cart.PriceSummary.shipping.withTaxes",shippingWithoutTaxes:"Cart.PriceSummary.shipping.withoutTaxes",shippingEstimated:"Cart.PriceSummary.shipping.estimated",shippingEstimatedByState:"Cart.PriceSummary.shipping.alternateField.state",shippingEstimatedByZip:"Cart.PriceSummary.shipping.alternateField.zip",destinationLinkAriaLabel:"Cart.PriceSummary.shipping.destinationLinkAriaLabel",applyButton:"Cart.PriceSummary.estimatedShippingForm.apply.label",countryField:"Cart.PriceSummary.estimatedShippingForm.country.placeholder",freeShipping:"Cart.PriceSummary.freeShipping",stateField:"Cart.PriceSummary.estimatedShippingForm.state.placeholder",zipField:"Cart.PriceSummary.estimatedShippingForm.zip.placeholder"}),k=g&&E(v,{label:i.subtotalLabel,price:g.price,classSuffixes:["subTotal"],children:[g.taxIncluded&&r("div",{"data-testid":"sub-total-tax-caption",className:"cart-order-summary__caption",children:r("span",{children:i.subtotalWithTaxes})}),g.taxExcluded?r("div",{"data-testid":"sub-total-tax-caption-excluded",className:"cart-order-summary__caption",children:E("span",{children:[g.priceExcludingTax," ",i.subtotalWithoutTaxes]})}):void 0]}),w=_&&_.length>0&&r(We,{children:_.map(n=>E(v,{label:n.label,price:n.price,classSuffixes:["discount"],children:[n.coupon&&r(D,{node:n.coupon,className:"cart-order-summary__coupon__code"}),n.caption&&r(D,{node:n.caption,className:"cart-order-summary__caption"})]}))}),S=e&&e.length>0?r(Ne,{"data-testid":"tax-breakdown",className:"cart-order-summary__taxes",iconOpen:Le,iconClose:De,children:E(Be,{title:i.taxesBreakdownTitle,secondaryText:!T&&x?r(D,{node:x.price,className:"cart-order-summary__price"}):void 0,renderContentWhenClosed:!1,onStateChange:L,children:[r("div",{className:"cart-order-summary__appliedTaxes",children:e.map(n=>r(v,{label:n.label,price:n.price,classSuffixes:["taxEntry"],labelClassSuffix:"muted"}))}),x&&r(v,{label:i.taxTotal,price:x.price,classSuffixes:["taxTotal"],labelClassSuffix:"muted"})]})}):x&&r(v,{label:x.estimated?i.taxEstimated:i.taxTotalOnly,price:x.price,classSuffixes:["taxTotal"],testId:"tax-total-only"}),d=[{key:"subTotalContent",sortOrder:100,content:k},...m?[{key:"shippingContent",sortOrder:200,content:r(D,{node:m,className:"cart-order-summary__shipping"})}]:[],{key:"discountsContent",sortOrder:300,content:w},{key:"taxContent",sortOrder:400,content:S},...p?[{key:"taxContent",sortOrder:500,content:r(v,{label:p.estimated?i.totalEstimated:i.totalLabel,price:p.price,classSuffixes:["total","total--padded"],testId:"total-content",labelClassSuffix:"bold"})}]:[],...p&&p.priceWithoutTax?[{key:"totalWithoutTaxContent",sortOrder:600,content:r(v,{label:i.totalWithoutTax,price:p.priceWithoutTax,classSuffixes:["totalWithoutTax"],testId:"total-without-tax",labelClassSuffix:"muted"})}]:[],...y?[{key:"totalSavedContent",sortOrder:700,content:r(v,{label:i.totalSaved,price:y,classSuffixes:["saved"],testId:"total-saved",labelClassSuffix:"muted"})}]:[],...B?[{key:"primaryActionContent",sortOrder:800,content:r("div",{className:ke(["cart-order-summary__entry","cart-order-summary__primaryAction"]),children:B})}]:[],...o?[{key:"couponsContent",sortOrder:900,content:r(D,{node:o,className:"cart-order-summary__coupons"})}]:[]],h=I(d).sort((n,C)=>n.sortOrder-C.sortOrder);return E("div",{...t,className:ke(["cart-order-summary",["cart-order-summary--loading",N],[`cart-order-summary__${P}`,P],O]),children:[N&&r(Ze,{className:"cart-order-summary__spinner"}),E("div",{className:"cart-order-summary__heading",children:[s&&r(D,{node:s,className:"cart-order-summary__heading-text"}),r(je,{variant:"primary",className:"cart-order-summary__divider-primary"})]}),r("div",{className:"cart-order-summary__content",children:h.map(n=>Array.isArray(n.content)?r(Ne,{className:n.className,actionIconPosition:"right",iconOpen:Le,iconClose:De,children:r(Be,{defaultOpen:!1,title:n.title,renderContentWhenClosed:!1,children:n.content.map(C=>C.content)})}):n.content)})]})},qe=()=>{const[O,A]=M(!1),[P,s]=M();return{handleEstimateTotals:(g,m)=>{A(!0);const{shippingCountry:_,shippingState:x="",shippingStateId:e,shippingZip:p=""}=g,B={countryCode:_,postcode:p,region:{region:x,id:e},shipping_method:{carrier_code:(m==null?void 0:m.carrier_code)||"",method_code:(m==null?void 0:m.method_code)||""}};ze(B).then(o=>{var y,I,t,T,L,i,k,w,S,d,h,n,C,ee,W,F,G,z,V,Z;o&&s({estimatedTaxTotal:{amount:(y=o.totalTax)==null?void 0:y.value,currency:(I=o.totalTax)==null?void 0:I.currency},estimatedSubTotal:{excludingTax:{amount:(T=(t=o.subtotal)==null?void 0:t.excludingTax)==null?void 0:T.value,currency:(i=(L=o.subtotal)==null?void 0:L.excludingTax)==null?void 0:i.currency},includingTax:{amount:(w=(k=o.subtotal)==null?void 0:k.includingTax)==null?void 0:w.value,currency:(d=(S=o.subtotal)==null?void 0:S.includingTax)==null?void 0:d.currency},includingDiscountOnly:{amount:(n=(h=o.subtotal)==null?void 0:h.includingDiscountOnly)==null?void 0:n.value,currency:(ee=(C=o.subtotal)==null?void 0:C.includingDiscountOnly)==null?void 0:ee.currency}},estimatedGrandTotalPrice:{includingTax:{amount:(W=o.total)==null?void 0:W.includingTax.value,currency:(F=o.total)==null?void 0:F.includingTax.currency},excludingTax:{amount:(G=o.total)==null?void 0:G.excludingTax.value,currency:(z=o.total)==null?void 0:z.excludingTax.currency}},estimatedAppliedTaxes:{taxes:(V=o.appliedTaxes)==null?void 0:V.map(u=>{var b,f;return{label:u.label,amount:{value:(b=u.amount)==null?void 0:b.value,currency:(f=u.amount)==null?void 0:f.currency}}})},estimatedItems:{items:(Z=o.items)==null?void 0:Z.map(u=>{var b,f,j,U,Q,X,$,q,H,R;return{uid:u.uid,price:{amount:(b=u.price)==null?void 0:b.value,currency:(f=u.price)==null?void 0:f.currency},taxedPrice:{amount:(j=u.taxedPrice)==null?void 0:j.value,currency:(U=u.taxedPrice)==null?void 0:U.currency},rowTotal:{amount:(Q=u.rowTotal)==null?void 0:Q.value,currency:(X=u.rowTotal)==null?void 0:X.currency},rowTotalIncludingTax:{amount:($=u.rowTotalIncludingTax)==null?void 0:$.value,currency:(q=u.rowTotalIncludingTax)==null?void 0:q.currency},regularPrice:{amount:(H=u.regularPrice)==null?void 0:H.value,currency:(R=u.regularPrice)==null?void 0:R.currency}}})}})}).finally(()=>{A(!1)})},estimatedTotals:P,setEstimatedTotals:s,loading:O}},He=({children:O,initialData:A=null,routeCheckout:P,slots:s,errors:N,showTotalSaved:g,enableCoupons:m,updateLineItems:_=e=>e,...x})=>{var W,F,G,z,V,Z,u,b,f,j,U,Q,X,$,q,H,R,ie,ne,ce,oe,ue,se,le,me,de,xe,pe,he,ge,ye,Te,Se,Ce,be,fe;const[e,p]=M(A),[B,o]=M(!1),y=e==null?void 0:e.isVirtual;m=m??!0;const{handleEstimateTotals:I,estimatedTotals:t,setEstimatedTotals:T,loading:L}=qe(),i=(W=Oe.config)==null?void 0:W.shoppingCartDisplaySetting,k=(i==null?void 0:i.subtotal)==="INCLUDING_TAX",w=(i==null?void 0:i.subtotal)==="INCLUDING_EXCLUDING_TAX",S=i==null?void 0:i.zeroTax;ae(()=>{const c=Ee.on("cart/data",a=>{var J,K,Y;p(a);const te=(J=a==null?void 0:a.addresses)==null?void 0:J.shipping,re=a==null?void 0:a.isVirtual;(te||re)&&T(null),t==null&&T({estimatedTaxTotal:{amount:(K=a==null?void 0:a.totalTax)==null?void 0:K.value,currency:(Y=a==null?void 0:a.totalTax)==null?void 0:Y.currency}})},{eager:!0});return()=>{c==null||c.off()}},[]),ae(()=>{o(N)},[N]),ae(()=>{const c=Ee.on("shipping/estimate",a=>{var J,K,Y,ve,Pe,_e;const te={shippingCountry:(J=a==null?void 0:a.address)==null?void 0:J.countryCode,shippingState:(K=a==null?void 0:a.address)==null?void 0:K.region,shippingStateId:(Y=a==null?void 0:a.address)==null?void 0:Y.regionId,shippingZip:(ve=a==null?void 0:a.address)==null?void 0:ve.postCode},re={carrier_code:((Pe=a==null?void 0:a.shippingMethod)==null?void 0:Pe.carrierCode)||"",method_code:((_e=a==null?void 0:a.shippingMethod)==null?void 0:_e.methodCode)||""};I(te,re)});return()=>{c==null||c.off()}},[I]);const d=Ae({checkout:"Cart.PriceSummary.checkout",free:"Cart.PriceSummary.total.free",orderSummary:"Cart.PriceSummary.orderSummary",taxToBeDetermined:"Cart.PriceSummary.taxToBeDetermined"}),h=(e==null?void 0:e.hasOutOfStockItems)||B,n=Fe(()=>{!h&&e&&Ve(e,Oe.locale)},[h,e]),C=!y&&(s!=null&&s.EstimateShipping)?r(we,{name:"EstimateShipping",slot:s.EstimateShipping},"estimateShippingId"):void 0;if(!Object.keys(e??{}).length||(e==null?void 0:e.totalQuantity)===0)return null;const ee=m&&(s!=null&&s.Coupons)?r(we,{name:"Coupons",slot:s.Coupons},"couponsId"):void 0;return r($e,{...x,"data-testid":"cart-order-summary",heading:r("div",{children:d.orderSummary}),shipping:C,coupons:ee,loading:L,updateLineItems:_,subTotal:{taxIncluded:k&&!S,taxExcluded:w,zeroTaxSubtotal:S,priceExcludingTax:(F=t==null?void 0:t.estimatedSubTotal)!=null&&F.excludingTax?r(l,{"data-testid":"subtotal",...(G=t==null?void 0:t.estimatedSubTotal)==null?void 0:G.excludingTax}):r(l,{"data-testid":"subtotal",amount:(V=(z=e==null?void 0:e.subtotal)==null?void 0:z.excludingTax)==null?void 0:V.value,currency:(u=(Z=e==null?void 0:e.subtotal)==null?void 0:Z.excludingTax)==null?void 0:u.currency}),price:!S&&k||!S&&w?(b=t==null?void 0:t.estimatedSubTotal)!=null&&b.includingTax?r(l,{"data-testid":"subtotal",...(f=t==null?void 0:t.estimatedSubTotal)==null?void 0:f.includingTax}):r(l,{"data-testid":"subtotal",amount:(j=e==null?void 0:e.subtotal.includingTax)==null?void 0:j.value,currency:(U=e==null?void 0:e.subtotal.includingTax)==null?void 0:U.currency}):r(l,{"data-testid":"subtotal",amount:(X=(Q=e==null?void 0:e.subtotal)==null?void 0:Q.excludingTax)==null?void 0:X.value,currency:(q=($=e==null?void 0:e.subtotal)==null?void 0:$.excludingTax)==null?void 0:q.currency})},discounts:(H=e==null?void 0:e.appliedDiscounts)==null?void 0:H.map(c=>{var a;return{label:c.label,price:r(l,{"data-testid":"summary-discount-total",amount:-c.amount.value,currency:c.amount.currency,sale:!0}),coupon:c!=null&&c.coupon?E("span",{children:[r(Ue,{source:Xe,size:"16"}),(a=c==null?void 0:c.coupon)==null?void 0:a.code]}):void 0}}),taxTotal:y||t&&t.estimatedTaxTotal==null?{price:r("span",{"data-testid":"tax-total-tbd",children:d.taxToBeDetermined})}:{price:t!=null&&t.estimatedTaxTotal?r(l,{"data-testid":"tax-total-estimated",...t==null?void 0:t.estimatedTaxTotal}):r(l,{"data-testid":"tax-total-actual",amount:(R=e==null?void 0:e.totalTax)==null?void 0:R.value,currency:(ie=e==null?void 0:e.totalTax)==null?void 0:ie.currency}),estimated:(!t||!t.estimatedTaxTotal)&&!((ne=e==null?void 0:e.addresses)!=null&&ne.shipping)},taxesApplied:y?void 0:i!=null&&i.fullSummary?(oe=((ce=t==null?void 0:t.estimatedAppliedTaxes)==null?void 0:ce.taxes)||(e==null?void 0:e.appliedTaxes))==null?void 0:oe.map(c=>({label:c.label,price:r(l,{"data-testid":"applied-taxes",amount:c.amount.value,currency:c.amount.currency})})):void 0,total:{price:t!=null&&t.estimatedGrandTotalPrice?((se=(ue=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:ue.includingTax)==null?void 0:se.amount)===0?r("span",{"data-testid":"total-including-tax",children:d.free}):r(l,{"data-testid":"total-including-tax-estimated",...(le=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:le.includingTax}):((me=e==null?void 0:e.total)==null?void 0:me.includingTax.value)===0?r("span",{"data-testid":"total-including-tax",children:d.free}):r(l,{"data-testid":"total-including-tax-actual",amount:(de=e==null?void 0:e.total)==null?void 0:de.includingTax.value,currency:(xe=e==null?void 0:e.total)==null?void 0:xe.includingTax.currency}),estimated:(!t||!!(t!=null&&t.estimatedTaxTotal))&&!((pe=e==null?void 0:e.addresses)!=null&&pe.shipping),priceWithoutTax:i!=null&&i.grandTotal?t!=null&&t.estimatedAppliedTaxes?((ge=(he=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:he.excludingTax)==null?void 0:ge.amount)===0?r("span",{"data-testid":"total-excluding-tax",children:d.free}):r(l,{"data-testid":"total-excluding-tax",...(ye=t==null?void 0:t.estimatedGrandTotalPrice)==null?void 0:ye.excludingTax}):((Te=e==null?void 0:e.total)==null?void 0:Te.excludingTax.value)===0?r("span",{"data-testid":"total-excluding-tax",children:d.free}):r(l,{"data-testid":"total-excluding-tax",amount:(Se=e==null?void 0:e.total)==null?void 0:Se.excludingTax.value,currency:(Ce=e==null?void 0:e.total)==null?void 0:Ce.excludingTax.currency}):void 0},primaryAction:P&&r(Qe,{"data-testid":"checkout-button",variant:"primary",disabled:h,"aria-disabled":h,href:h?void 0:P({cartId:e.id}),onClick:n,children:d.checkout}),totalSaved:g?r(l,{amount:(be=e==null?void 0:e.discount)==null?void 0:be.value,currency:(fe=e==null?void 0:e.total)==null?void 0:fe.includingTax.currency}):void 0})};He.getInitialData=async function(){return Ge()};export{He as O}; diff --git a/scripts/__dropins__/storefront-pdp/LICENSE.md b/scripts/__dropins__/storefront-pdp/LICENSE.md new file mode 100644 index 000000000..f1ee7eb99 --- /dev/null +++ b/scripts/__dropins__/storefront-pdp/LICENSE.md @@ -0,0 +1,127 @@ +Last Updated: 28 October 2024 + +ADOBE COMMERCE DROP-IN LICENSE AGREEMENT + +applicable to Adobe Commerce Customers + +**Effective Date:** first date you download or use the Drop-in + +NOTICE TO USER: The Adobe Commerce Drop-in (“Drop-in”) is licensed to you subject to the terms and conditions below which form a binding agreement between you and Adobe. **By downloading, installing, or making use of any portion of the Drop-in, you are agreeing to the following terms and conditions. If you do not agree to the terms and conditions below, do not use the Drop-in**. If you agree to be bound by this agreement on behalf of your employer or other entity, you must have the legal authority to do so. If you are not authorized to so bind your employer or such entity, do not download and do not use the Drop-in. + +Your access to and use of the Drop-in is governed by the Adobe Enterprise Licensing Terms previously agreed to by you and Adobe or an authorized Adobe Reseller in a separate agreement. If you have not previously agreed to licensing terms then your installation and use of the Drop-in is subject to the current applicable Adobe Enterprise Licensing Terms available at . You agree that this agreement will have the same effect as any written negotiated agreement signed by you. + +By downloading, installing or making use of any portion of the Drop-in, you accept and agree to be bound by all the terms and conditions of this agreement including all terms incorporated herein by reference. + +This agreement is enforceable against any person or entity that installs and uses the Drop-in and any person or entity (e.g., system integrator, consultant or contractor) that installs or uses the drop-in on another person's or entity's behalf (e.g., Adobe Customer). + +Notice to U.S. Government End Users: Products and services are “Commercial Product(s),” and “Commercial Service(s)” as those terms are defined at 48 C.F.R. section 2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as the terms are used in 48 C.F.R. section 12.212 or 48 C.F.R. section 227.7202, as applicable. Customer agrees, consistent with 48 C.F.R. section 12.212 or 48 C.F.R. sections 227.7202-1 through 227.72024, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (A) only as Commercial Products and Services; and (B) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished rights are reserved under the copyright laws of the United States. + +**ADOBE COMMERCE DROP-IN LICENSE AGREEMENT** + +applicable to Developers + +**Effective Date:** first date you download or use the Drop-in + +The Adobe Commerce Drop-in (“Drop-in”) is licensed to you subject to the terms and conditions below which form a binding agreement between you and Adobe. **By downloading, installing, or making use of any portion of the Drop-in, you are agreeing to the following terms and conditions. If you do not agree to the terms and conditions below, do not use the Drop-in**. If you agree to be bound by this agreement on behalf of your employer or other entity, you must have the legal authority to do so. If you are not authorized to so bind your employer or such entity, do not download and do not use the Drop-in. + +**AGREED TERMS AND CONDITIONS** + +1. **DEFINITIONS**. + + 1.1 “**Adobe**” means collectively, Adobe Inc., a company incorporated in Delaware, U.S.A., having a place of business at 345 Park Avenue, San Jose, California USA 95110-2704, U.S.A. (“**Adobe US**”) and Adobe Systems Software Ireland, company incorporated in Ireland, having a place of business 4-6 Riverwalk, City West Business Campus, Saggart, Dublin 24, Ireland (“**Adobe Ireland**”).__ + + 1.2 “**Adobe Product(s)**” means software applications, programs and other technologies not included in or with the Drop-in which are or may be made available by Adobe for licensing to the general public. This agreement does not govern use of Adobe Products. See the end user license agreement accompanying an Adobe Product for terms governing its use. + + 1.3 “**Developer Product(s)**” means any software application(s), program(s) and other teconolog(y/ies) you develop with use of the Drop-in to function or interoperate with Adobe Products. + + 1.4 “**Intellectual Property Rights**” means copyright, moral rights, trademark, trade dress, patent, trade secret, unfair competition, and any other intellectual and proprietary rights. + + 1.5 “**Adobe Commerce Drop-in**” or “Drop-in” means all items comprising the application and all associated materials licensed to you by Adobe as part of the Drop-in, including all Drop-in system files, tools, programs and utilities, as well as any plug-ins or other application programming interfaces, header or JAR files (“**API**”), sample images, sounds, or similar assets (“**Content** **Files**”), software code samples, runtimes and libraries, including any portion(s) that is modified by you, or merged or incorporated with your Developer Products (“**Sample Code**”), and any related documentation, technical specifications, notes and explanatory materials, as well any modifications, updates, upgrades, or copies of, any of the foregoing items, that may be made available by Adobe, whether online or recorded on media, or manually downloaded by you. + +2. **LICENSES GRANTED TO YOU**. + + 2.1 **Drop-in**. Subject to your compliance with terms of this agreement, Adobe grants to you a non-exclusive, non-sublicensable, non-transferable license to install and use the Drop-in solely for your internal design, development and testing of your Developer Products, subject further to the requirements and limitations below. + + 2.2 **API.** Subject to your compliance with terms of this agreement, Adobe grants to you a non-exclusive, non-sublicensable, non-transferable license to use the API only as provided in or by the applicable specification and to distribute the API solely in, with, and on the same media as, your Developer Products. For clarification, you may not modify the API. + + 2.3 **Content Files**. You may not use, modify, reproduce or distribute any of the Content Files. For the avoidance of doubt, the Content Files are included as examples only. You acquire no rights to the Content Files. + + 2.4 **Sample Code.** Subject to your compliance with terms of this agreement, Adobe grants to you a non-exclusive, non-sublicensable, non-transferable license to use, modify, merge, and redistribute (in object code form only) all or any portions of the Sample Code solely as part of, and as necessary to properly implement, the Drop-in in your Developer Products. All and any portion of the Sample Code that is modified or merged by you in your Developer Products is subject to the terms of this agreement. + +3. **SCOPE OF LICENSE; LIMITATIONS AND RESTRICTIONS** + + 3.1 You may not distribute the Drop-ins or any of its component parts to interoperate with or to run on a platform other than the Adobe-approved platform. + + 3.2 Third-Party Software. The Drop-ins may contain third-party software, subject to additional terms and conditions, available at ; and + + 3.3 You may not modify, port, adapt, creative derivate works, redistribute, or translate any portion of this Drop-in; or add or delete any Drop-in program files that would in any way result in modifying the functionality or appearance of any element of the Adobe Products. + + 3.4 You may not reverse engineer, decompile, disassemble, or otherwise attempt to discover the source code of, any portion of the Drop-in, except and only to the extent that applicable laws of the jurisdiction where you are located grant you the right to decompile the Drop-in in order to obtain information necessary to render the Drop-in interoperable with other software; in which case you must first request the information from Adobe in writing and Adobe may, in its discretion, either provide such information to you or impose reasonable conditions, including reasonable fees, on your use of the Drop-in to ensure that Adobe’s and its licensors’ Intellectual Proprietary Rights in the Drop-in are protected. + + 3.5 You may not unbundle, repackage, distribute, rent, lease, offer, sell, resale, sublicense, assign or transfer all, or any component parts of the Drop-in, or any of your rights in the Drop-in, nor authorize any portion of the Drop-in to be copied onto another’s device, computer or platform, including on a service bureau basis to other providers (i.e., volume printing, banking, payroll service providers, etc) who provide you free or fee-based business services. + +4. **VIRAL OPEN SOURCE SOFTWARE AND SERVICES** + + You are not license to (and you agree that you will not) merge, integrate or use the Drop-in with any Viral Open Source Software or Viral Service, or otherwise take any action that could require disclosure, distribution, or licensing of all or any part of the Drop-in in source code form for any purpose whatsoever. For purposes of this Section, “**Viral Open Source Software**” means software licensed under the GNU General Public License, the GNU Affero General Public License (AGPL), the GNU Lesser General Public License (LGPL), or any other license terms that would require, or condition your use, modification, or distribution of such licensed software on the disclosure, distribution, or licensing of any other software in source code form, for the purpose of making derivative works, or at no charge, and “**Viral Service**” means any service that contains any viruses, Trojan horses, worms, time bombs, cancelbots or other computer programming routines that are intended to damage, detrimentally interfere with, surreptitiously intercept, expropriate or deprive owners’ possession of any system, data or personal information, or that in any way violates any law, statute, ordinance, regulation or rights (including any law, regulations or rights respecting intellectual property, computer spyware, privacy, export control, unfair competition, antidiscrimination or false advertising), or otherwise interferes with the operability of Adobe Products or third-party programs or software. + +5. **NON-BLOCKING OF ADOBE DEVELOPMENT** + + You acknowledge that Adobe is currently developing or may develop technologies and Adobe Products in the future that have, or may have, design or functionality similar to Developer Products that you may develop based on the license granted to you in this agreement. Nothing in this agreement will impair, limit or curtail Adobe’s right to continue with its development, maintenance or distribution of Adobe Products. You agree that you will not assert in any way any patent owned by you arising out of or in connection with your use of the Drop-in, or any Drop-in modifications made by you, against Adobe, its customers, subsidiaries or affiliates, or any of their customers, direct or indirect, agents and contractors for the manufacture, use, import, license, offer for sale, or sale of any Adobe Products. + +6. **OWNERSHIP; INTELLECTUAL PROPERTY RIGHTS** + + 6.1 The items contained in the Drop-in are the Intellectual Property of Adobe and its licensors and are protected by United States copyright and patent law, international treaty provisions and applicable laws of the country in which it is being used. Adobe and its licensors reserve all rights not expressly granted to you under this agreement, and retain all right, title, and interest in the Drop-in, including all Intellectual Property Rights. + + 6.2 The Drop-in, or any of its component parts, may be supplied to you with certain accompanying proprietary notices, including patent, copyright and trademark notices. You agree to protect all copyright and other ownership interests of Adobe and its licensors in the Drop-in supplied to you under this agreement; to preserve exactly (and not remove or alter) all proprietary notices displayed in or on the Drop-in; to reproduce the same proprietary notices in all copies you make of any portion of the Drop-in. + + 6.3 You agree to include in your Developer Products Adobe’s copyright notices, wherever such notices are customarily posted, in substantially the following form: _Portions of software used to develop this product copyrighted by Adobe and its licensors. All Rights Reserved_. + + 6.4 Nothing in this agreement gives you a right to use the name, logo or trademarks of Adobe or its licensors to market your Developer Products. + +7. **CONFIDENTIAL INFORMATION** + + With respect to the API, and any portion, included in the Drop-in (for purposes of this Section, “**Adobe Confidential Information**”), you will treat the Adobe Confidential Information, and exercise the same degree of care to protect it, as you afford to your own confidential information. Your obligations under this Section will terminate when you can document that (a) the Adobe Confidential Information was in the public domain at or subsequent to the time Adobe communicated or provided it to you with no fault of your own; (b) your employees or agents developed independently without reference to any Adobe Confidential Information Adobe communicated or provided to you; or (c) your communication of Adobe Confidential Information was in response to a valid order by a court or other governmental body, was otherwise required by law, or was necessary to establish the rights of a party under this agreement. + +8. **TERM; TERMINATION** + + This agreement will commence on the Effective Date and will continue unless terminated. Adobe may terminate this agreement immediately upon notice to you, and without judicial intervention, if you fail to comply with any term of its terms. You may terminate this agreement at any time by discontinuing all your use(s) of the Drop-in and you agree to destroying or removing all full and partial copies of the Drop-in from your computer. If requested by Adobe, you must demonstrate proof of your compliance with the terms of this Section. In the event of termination, the terms of this agreement that, by their nature, are meant to survive termination, including all terms relating to viral open source software and services, ownership, confidential information, indemnity obligations and procedures, disclaimers of warranty, limitations on and exclusions of remedies and damages, dispute resolution, and waiver, will survive termination of this agreement. + +9. **DISCLAIMER OF WARRANTY; LIMITATION OF LIABILITY** + + You expressly understand and agree that, to the maximum extent permitted by applicable law: + + 9.1 **Use OF THE DROP-IN is entirely at your own risk. The Drop-in is provided by Adobe “AS-IS” and with all faults. Adobe and its licensors are not liable to you or anyone else for any special, incidental, indirect, consequential, or punitive damages whatsoever (even if Adobe has been advised of the possibility of such damages), including (a) damages resulting from loss of use, data, or profits, whether or not foreseeable, (b) damages based on any theory of liability, including breach of contract or warranty, negligence or other tortious action, or (c) damages arising from any other claim arising out of or in connection with your use of the Drop-in.** + + 9.2 **Adobe’s total liability in any matter arising out of or related to these terms is limited to US $100. This limitation will apply even if Adobe has been advised of the possibility of such damages and regardless of any failure of the essential purpose of any limited remedy.** + +10. **INDEMNIFICATION** + + To the maximum extent permitted by law, you agree to indemnify Adobe, its subsidiaries, affiliates, officers, agents, employees, partners, licensors, or suppliers from any claim or demand, including reasonable attorneys’ fees, that arise from the use and distribution of your Developer Products that contain or are based upon any portion of the Drop-in, or from your violation of the terms of this agreement. + +11. **DISPUTE RESOLUTION** + + 11.1 **Choice of Law.** If you are a resident of North America (or if your organization is headquartered in North America), your relationship is with Adobe Systems Incorporated, a United States company, and the Drop-in is governed by the law of California, U.S.A. If you reside outside of North America, your relationship is with Adobe Systems Software Ireland Limited, and the Drop-in is governed by the law of Ireland. + + 11.2 **Venue.** You agree that any claim or dispute you may have against Adobe must be resolved by a court located in Santa Clara County, California, United States of America. You agree to submit to the personal jurisdiction of the courts located in Santa Clara County, California, United States of America when the laws of California apply, and the courts of Dublin, Ireland, when the laws of Ireland applies, for the purpose of litigating such claims or disputes. The parties specifically disclaim the U.N. Convention on Contracts for the International Sale of Goods. + + 11.3 **Injunctive Relief.** Notwithstanding the foregoing, in the event of your or others’ unauthorized access to or use of the Drop-in in violation of this Agreement, you agree that Adobe is entitled to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction. + +12. **EXPORT RULES** + + The Drop-in and your use of the Drop-in are subject to U.S. and international laws, restrictions, and regulations that may govern the import, export, and use of the Drop-in. You agree to comply with all such laws, restrictions, and regulations. + +13. **NOTICE TO U.S. GOVERNMENT END USERS** + + Products and services are “Commercial Product(s),” and “Commercial Service(s)” as those terms are defined at 48 C.F.R. section 2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as the terms are used in 48 C.F.R. section 12.212 or 48 C.F.R. section 227.7202, as applicable. Customer agrees, consistent with 48 C.F.R. section 12.212 or 48 C.F.R. sections 227.7202-1 through 227.72024, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. Government end users (A) only as Commercial Products and Services; and (B) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished rights are reserved under the copyright laws of the United States. + +14. **GENERAL PROVISIONS** + + 14.1 **Severability.** If it turns out that a particular term is not enforceable, the unenforceability of that term will not affect any other terms. + + 14.2 **Modification; Waiver.** No provision of this agreement will be deemed to have been modified or waived by any act or acquiescence on the part of Adobe, its agents, or employees, but only by any instrument in writing, signed by an authorized officer of Adobe. + + 14.3 **English Version.** The English language version of this agreement will be the version used when interpreting or construing its terms. + + 14.4 **Entire Agreement.** This Agreement is the entire agreement, superseding any prior written or oral agreements, between you and Adobe relating to the Drop-in. + +Adobe Commerce Drop-in License Agreement_en_US-20241028_v1