diff --git a/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts b/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts deleted file mode 100644 index 2d36c9f39..000000000 --- a/scripts/__dropins__/storefront-order/api/graphql/GurestOrderFragment.graphql.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/******************************************************************** - * ADOBE CONFIDENTIAL - * - * Copyright 2024 Adobe - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains - * the property of Adobe and its suppliers, if any. The intellectual - * and technical concepts contained herein are proprietary to Adobe - * and its suppliers and are protected by all applicable intellectual - * property laws, including trade secret and copyright laws. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Adobe. - *******************************************************************/ -export declare const GUEST_ORDER_FRAGMENT: string; -//# sourceMappingURL=GurestOrderFragment.graphql.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js b/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js index d3dd6df9a..850775508 100644 --- a/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js +++ b/scripts/__dropins__/storefront-order/chunks/CartSummaryItem.js @@ -1,3 +1,3 @@ /*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as l,jsxs as y,Fragment as E}from"@dropins/tools/preact-jsx-runtime.js";import{Price as z,Image as A,CartItem as B,Icon as F,Incrementer as K}from"@dropins/tools/components.js";import{useCallback as V}from"@dropins/tools/preact-hooks.js";import{classes as H}from"@dropins/tools/lib.js";import{O as Q}from"./OrderLoaders.js";import*as O from"@dropins/tools/preact-compat.js";const R=o=>O.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},O.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),O.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),C=({placeholderImage:o="",loading:M,product:e,itemType:Z,taxConfig:j,translations:g,disabledIncrementer:q,onQuantity:b,showConfigurableOptions:k,routeProductDetails:v})=>{var S,_,D,f,L;const{taxExcluded:w,taxIncluded:I}=j,a=V((i,t,s)=>l(z,{amount:i,currency:t,weight:"normal",...s}),[]),T=V(i=>{var s,x;const t=(s=i==null?void 0:i.product)!=null&&s.thumbnail.url.length?(x=i==null?void 0:i.product)==null?void 0:x.thumbnail.url:o;return l(A,{src:t,alt:i==null?void 0:i.productName,loading:"lazy",width:"90",height:"120"})},[o]);if(!e)return l(Q,{});let P={};const N=Z==="cancelled",W=(_=(S=e==null?void 0:e.product)==null?void 0:S.stockStatus)==null?void 0:_.includes("IN_STOCK"),n=e==null?void 0:e.giftCard,$=e.totalQuantity>1?{quantity:e.totalQuantity}:{},u=e.discounted,{includeAndExcludeTax:c,includeTax:h,excludeTax:r}=e.taxCalculations,m=e==null?void 0:e.totalQuantity,d={...(e==null?void 0:e.configurableOptions)||{},...(e==null?void 0:e.bundleOptions)||{},...n!=null&&n.senderName?{[g.sender]:n==null?void 0:n.senderName}:{},...n!=null&&n.senderEmail?{[g.sender]:n==null?void 0:n.senderEmail}:{},...n!=null&&n.senderName?{[g.sender]:n==null?void 0:n.senderName}:{},...n!=null&&n.recipientEmail?{[g.recipient]:n==null?void 0:n.recipientEmail}:{},...n!=null&&n.message?{[g.message]:n==null?void 0:n.message}:{},...e!=null&&e.downloadableLinks?{[`${(D=e==null?void 0:e.downloadableLinks)==null?void 0:D.count} ${g.downloadableCount}`]:(f=e==null?void 0:e.downloadableLinks)==null?void 0:f.result}:{}};if(I&&w){const i=a(c.originalPrice.value,c.originalPrice.currency),t=a(c.baseOriginalPrice.value*m,c.baseOriginalPrice.currency,{variant:e.discounted?"strikethrough":"default",weight:"bold"}),s=a(c.baseDiscountedPrice.value*m,c.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=a(c.baseExcludingTax.value*m,c.baseExcludingTax.currency,{weight:"bold"});P={taxExcluded:!0,taxIncluded:void 0,price:i,total:y(E,{children:[t,e.discounted?s:null]}),totalExcludingTax:x}}else if(!I&&w){const i=a(r.originalPrice.value,r.originalPrice.currency),t=a(r.baseOriginalPrice.value*m,r.baseOriginalPrice.currency,{variant:u?"strikethrough":"default",weight:"bold"}),s=a(r.baseDiscountedPrice.value*m,r.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=a(r.baseExcludingTax.value*m,r.baseExcludingTax.currency,{weight:"bold"});P={taxExcluded:void 0,taxIncluded:void 0,price:i,total:y(E,{children:[t,u?s:null]}),totalExcludingTax:x}}else if(I&&!w){const i=a(h.singleItemPrice.value,h.singleItemPrice.currency),t=a(h.baseOriginalPrice.value*m,h.baseOriginalPrice.currency,{variant:u?"strikethrough":"default",weight:"bold"}),s=a(h.baseDiscountedPrice.value*m,h.baseDiscountedPrice.currency,{sale:!0,weight:"bold"});P={taxExcluded:void 0,taxIncluded:!0,price:i,total:y(E,{children:[t,u?s:null]})}}return l(B,{loading:M,alert:N&&W?y("span",{children:[l(F,{source:R}),g.outOfStock]}):l(E,{}),configurations:(k==null?void 0:k(d))??d,title:v?l("a",{"data-testid":"product-name",className:H(["cart-summary-item__title",["cart-summary-item__title--strikethrough",N]]),href:v(e),children:e==null?void 0:e.productName}):l("div",{"data-testid":"product-name",className:H(["cart-summary-item__title",["cart-summary-item__title--strikethrough",N]]),children:e==null?void 0:e.productName}),sku:l("div",{children:(L=e==null?void 0:e.product)==null?void 0:L.sku}),...$,image:v?l("a",{href:v(e),children:T(e)}):T(e),...P,footer:b&&!q?l(K,{value:1,min:1,max:e==null?void 0:e.totalQuantity,onValue:i=>b==null?void 0:b(Number(i)),name:"quantity","data-testid":"returnIncrementer",readonly:!0}):void 0})};export{C,R as S}; +import{jsx as a,jsxs as b,Fragment as v}from"@dropins/tools/preact-jsx-runtime.js";import{Price as z,Image as A,CartItem as B,Icon as F,Incrementer as K}from"@dropins/tools/components.js";import{useCallback as H}from"@dropins/tools/preact-hooks.js";import{classes as G,Slot as Q}from"@dropins/tools/lib.js";import{O as R}from"./OrderLoaders.js";import*as d from"@dropins/tools/preact-compat.js";const U=o=>d.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o},d.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M0.75 12C0.75 5.78421 5.78421 0.75 12 0.75C18.2158 0.75 23.25 5.78421 23.25 12C23.25 18.2158 18.2158 23.25 12 23.25C5.78421 23.25 0.75 18.2158 0.75 12Z",stroke:"currentColor"}),d.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M11.75 5.88423V4.75H12.25V5.88423L12.0485 13.0713H11.9515L11.75 5.88423ZM11.7994 18.25V16.9868H12.2253V18.25H11.7994Z",stroke:"currentColor"})),ee=({slots:o,placeholderImage:N="",loading:M,product:e,itemType:Z,taxConfig:j,translations:h,disabledIncrementer:q,onQuantity:P,showConfigurableOptions:k,routeProductDetails:u})=>{var _,f,D,L,V;const{taxExcluded:w,taxIncluded:I}=j,l=H((n,t,s)=>a(z,{amount:n,currency:t,weight:"normal",...s}),[]),S=H(n=>{var s,x;const t=(s=n==null?void 0:n.product)!=null&&s.thumbnail.url.length?(x=n==null?void 0:n.product)==null?void 0:x.thumbnail.url:N;return a(A,{src:t,alt:n==null?void 0:n.productName,loading:"lazy",width:"90",height:"120"})},[N]);if(!e)return a(R,{});let y={};const O=Z==="cancelled",W=(f=(_=e==null?void 0:e.product)==null?void 0:_.stockStatus)==null?void 0:f.includes("IN_STOCK"),i=e==null?void 0:e.giftCard,$=e.totalQuantity>1?{quantity:e.totalQuantity}:{},E=e.discounted,{includeAndExcludeTax:c,includeTax:g,excludeTax:r}=e.taxCalculations,m=e==null?void 0:e.totalQuantity,T={...(e==null?void 0:e.configurableOptions)||{},...(e==null?void 0:e.bundleOptions)||{},...i!=null&&i.senderName?{[h.sender]:i==null?void 0:i.senderName}:{},...i!=null&&i.senderEmail?{[h.sender]:i==null?void 0:i.senderEmail}:{},...i!=null&&i.senderName?{[h.sender]:i==null?void 0:i.senderName}:{},...i!=null&&i.recipientEmail?{[h.recipient]:i==null?void 0:i.recipientEmail}:{},...i!=null&&i.message?{[h.message]:i==null?void 0:i.message}:{},...e!=null&&e.downloadableLinks?{[`${(D=e==null?void 0:e.downloadableLinks)==null?void 0:D.count} ${h.downloadableCount}`]:(L=e==null?void 0:e.downloadableLinks)==null?void 0:L.result}:{}};if(I&&w){const n=l(c.originalPrice.value,c.originalPrice.currency),t=l(c.baseOriginalPrice.value*m,c.baseOriginalPrice.currency,{variant:e.discounted?"strikethrough":"default",weight:"bold"}),s=l(c.baseDiscountedPrice.value*m,c.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=l(c.baseExcludingTax.value*m,c.baseExcludingTax.currency,{weight:"bold"});y={taxExcluded:!0,taxIncluded:void 0,price:n,total:b(v,{children:[t,e.discounted?s:null]}),totalExcludingTax:x}}else if(!I&&w){const n=l(r.originalPrice.value,r.originalPrice.currency),t=l(r.baseOriginalPrice.value*m,r.baseOriginalPrice.currency,{variant:E?"strikethrough":"default",weight:"bold"}),s=l(r.baseDiscountedPrice.value*m,r.baseDiscountedPrice.currency,{sale:!0,weight:"bold"}),x=l(r.baseExcludingTax.value*m,r.baseExcludingTax.currency,{weight:"bold"});y={taxExcluded:void 0,taxIncluded:void 0,price:n,total:b(v,{children:[t,E?s:null]}),totalExcludingTax:x}}else if(I&&!w){const n=l(g.singleItemPrice.value,g.singleItemPrice.currency),t=l(g.baseOriginalPrice.value*m,g.baseOriginalPrice.currency,{variant:E?"strikethrough":"default",weight:"bold"}),s=l(g.baseDiscountedPrice.value*m,g.baseDiscountedPrice.currency,{sale:!0,weight:"bold"});y={taxExcluded:void 0,taxIncluded:!0,price:n,total:b(v,{children:[t,E?s:null]})}}return a(B,{loading:M,alert:O&&W?b("span",{children:[a(F,{source:U}),h.outOfStock]}):a(v,{}),configurations:(k==null?void 0:k(T))??T,title:u?a("a",{"data-testid":"product-name",className:G(["cart-summary-item__title",["cart-summary-item__title--strikethrough",O]]),href:u(e),children:e==null?void 0:e.productName}):a("div",{"data-testid":"product-name",className:G(["cart-summary-item__title",["cart-summary-item__title--strikethrough",O]]),children:e==null?void 0:e.productName}),sku:a("div",{children:(V=e==null?void 0:e.product)==null?void 0:V.sku}),...$,image:u?a("a",{href:u(e),children:S(e)}):S(e),...y,footer:b(v,{children:[P&&!q?a(K,{value:1,min:1,max:e==null?void 0:e.totalQuantity,onValue:n=>P==null?void 0:P(Number(n)),name:"quantity","data-testid":"returnIncrementer",readonly:!0}):void 0,a(Q,{"data-testid":"GiftOptions",name:"GiftOptions",slot:o==null?void 0:o.GiftOptions,context:e})]})})};export{ee as C,U as S}; diff --git a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/121.d.ts b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/121.d.ts deleted file mode 100644 index 08ee920bb..000000000 --- a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/121.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=121.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks.d.ts b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks.d.ts deleted file mode 100644 index 67cbe8c1c..000000000 --- a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export {}; -//# sourceMappingURL=Blocks.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/AccordionTax.d.ts b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/AccordionTax.d.ts deleted file mode 100644 index 7c9e1f781..000000000 --- a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/AccordionTax.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { OrderDataModel } from '../../../data/models'; - -type translationsTypes = Record; -export declare const AccordionTax: ({ translations, renderTaxAccordion, totalAccordionTaxValue, order, }: { - translations: translationsTypes; - order: OrderDataModel; - renderTaxAccordion: boolean; - totalAccordionTaxValue: number; -}) => import("preact").JSX.Element; -export {}; -//# sourceMappingURL=AccordionTax.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/Coupons.d.ts b/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/Coupons.d.ts deleted file mode 100644 index 37a9d627a..000000000 --- a/scripts/__dropins__/storefront-order/components/OrderCostSummaryContent/Blocks/Coupons.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { OrderDataModel } from '../../../data/models'; - -export declare const Coupons: ({ order }: { - order: OrderDataModel; -}) => import("preact").JSX.Element; -//# sourceMappingURL=Coupons.d.ts.map \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/containers/OrderProductList.js b/scripts/__dropins__/storefront-order/containers/OrderProductList.js index 15e12060f..0dbf5ad72 100644 --- a/scripts/__dropins__/storefront-order/containers/OrderProductList.js +++ b/scripts/__dropins__/storefront-order/containers/OrderProductList.js @@ -1,3 +1,3 @@ /*! Copyright 2025 Adobe All Rights Reserved. */ -import{jsx as d,jsxs as g}from"@dropins/tools/preact-jsx-runtime.js";import{classes as h}from"@dropins/tools/lib.js";import{Card as q,Header as R}from"@dropins/tools/components.js";import{useState as P,useEffect as S,useMemo as T}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as b}from"../chunks/useGetStoreConfig.js";import{Fragment as x}from"@dropins/tools/preact.js";import{events as N}from"@dropins/tools/event-bus.js";import{s as Q}from"../chunks/setTaxStatus.js";import{a as k}from"../chunks/OrderLoaders.js";import{C as G}from"../chunks/CartSummaryItem.js";import{useText as M}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const v=({orderData:s})=>{const[i,o]=P(!0),[e,r]=P(s);return S(()=>{const t=N.on("order/data",l=>{r(l),o(!1)},{eager:!0});return()=>{t==null||t.off()}},[]),{loading:i,order:e}},Y=({className:s,orderData:i,withHeader:o,showConfigurableOptions:e,routeProductDetails:r})=>{const t=b(),{loading:l,order:a}=v({orderData:i});return d("div",{className:h(["order-order-product-list",s]),children:d(I,{loading:l,placeholderImage:(t==null?void 0:t.baseMediaUrl)??"",taxConfig:Q((t==null?void 0:t.shoppingOrderDisplayPrice)??0),order:a,withHeader:o,showConfigurableOptions:e,routeProductDetails:r})})},w=s=>{const i=(s==null?void 0:s.items)??[],o=i.filter(t=>(t==null?void 0:t.eligibleForReturn)&&(t==null?void 0:t.quantityReturnRequested)).map(t=>({...t,totalQuantity:t.quantityReturnRequested})),e=new Map(o.map(t=>[t.id,t])),r=i.map(t=>{const l=e.get(t==null?void 0:t.id);if(l){const a=t.totalQuantity-l.quantityReturnRequested;return a===0?null:{...t,totalQuantity:a}}return t}).filter(t=>t!==null);return{returnedList:o,canceledItems:r==null?void 0:r.filter(t=>t.quantityCanceled),nonCanceledItems:r==null?void 0:r.filter(t=>!t.quantityCanceled)}},I=({placeholderImage:s,loading:i,taxConfig:o,order:e=null,withHeader:r=!0,showConfigurableOptions:t,routeProductDetails:l})=>{const a=!!(e!=null&&e.returnNumber),m=M({cancelled:"Order.OrderProductListContent.cancelledTitle",allOrders:"Order.OrderProductListContent.allOrdersTitle",returned:"Order.OrderProductListContent.returnedTitle",refunded:"Order.OrderProductListContent.refundedTitle",sender:"Order.OrderProductListContent.GiftCard.sender",recipient:"Order.OrderProductListContent.GiftCard.recipient",message:"Order.OrderProductListContent.GiftCard.message",outOfStock:"Order.OrderProductListContent.stockStatus.outOfStock",downloadableCount:"Order.OrderProductListContent.downloadableCount"}),L=T(()=>{var p,f;if(!e)return[];if(!a){const{returnedList:u,canceledItems:n,nonCanceledItems:O}=w(e);return[{type:"returned",list:u,title:m.returned},{type:"cancelled",list:n,title:m.cancelled},{type:"allItems",list:O,title:m.allOrders}].filter(C=>{var y;return((y=C==null?void 0:C.list)==null?void 0:y.length)>0})}return[{type:"returned",list:((f=(p=e.returns.find(u=>u.returnNumber===(e==null?void 0:e.returnNumber)))==null?void 0:p.items)==null?void 0:f.map(u=>({...u,totalQuantity:u.requestQuantity})))??[],title:m.returned}]},[e,a,m]);return e?L.every(c=>c.list.length===0)?null:d(q,{variant:"secondary",className:"order-order-product-list-content",children:L.map((c,p)=>{var u;const f=c.list.filter(n=>n!==null).reduce((n,{totalQuantity:O})=>O+n,0);return g(x,{children:[r?d(R,{title:`${c.title} (${f})`}):null,d("ul",{className:"order-order-product-list-content__items",children:(u=c.list)==null?void 0:u.filter(n=>n!==null).map(n=>d("li",{"data-testid":"order-product-list-content-item",children:d(G,{placeholderImage:s,loading:i,product:n,itemType:c.type,taxConfig:o,translations:m,showConfigurableOptions:t,routeProductDetails:l})},n.id))})]},p)})}):d(k,{})};export{Y as OrderProductList,Y as default}; +import{jsx as l,jsxs as h}from"@dropins/tools/preact-jsx-runtime.js";import{classes as q}from"@dropins/tools/lib.js";import{Card as R,Header as S}from"@dropins/tools/components.js";import{useState as g,useEffect as T,useMemo as b}from"@dropins/tools/preact-hooks.js";import"../chunks/ShippingStatusCard.js";import"@dropins/tools/preact-compat.js";import{u as x}from"../chunks/useGetStoreConfig.js";import{Fragment as N}from"@dropins/tools/preact.js";import{events as Q}from"@dropins/tools/event-bus.js";import{s as k}from"../chunks/setTaxStatus.js";import{a as G}from"../chunks/OrderLoaders.js";import{C as M}from"../chunks/CartSummaryItem.js";import{useText as v}from"@dropins/tools/i18n.js";import"../chunks/getStoreConfig.js";import"../chunks/fetch-graphql.js";import"@dropins/tools/fetch-graphql.js";const w=({orderData:s})=>{const[i,o]=g(!0),[d,e]=g(s);return T(()=>{const t=Q.on("order/data",r=>{e(r),o(!1)},{eager:!0});return()=>{t==null||t.off()}},[]),{loading:i,order:d}},Z=({slots:s,className:i,orderData:o,withHeader:d,showConfigurableOptions:e,routeProductDetails:t})=>{const r=x(),{loading:c,order:p}=w({orderData:o});return l("div",{className:q(["order-order-product-list",i]),children:l(j,{slots:s,loading:c,placeholderImage:(r==null?void 0:r.baseMediaUrl)??"",taxConfig:k((r==null?void 0:r.shoppingOrderDisplayPrice)??0),order:p,withHeader:d,showConfigurableOptions:e,routeProductDetails:t})})},I=s=>{const i=(s==null?void 0:s.items)??[],o=i.filter(t=>(t==null?void 0:t.eligibleForReturn)&&(t==null?void 0:t.quantityReturnRequested)).map(t=>({...t,totalQuantity:t.quantityReturnRequested})),d=new Map(o.map(t=>[t.id,t])),e=i.map(t=>{const r=d.get(t==null?void 0:t.id);if(r){const c=t.totalQuantity-r.quantityReturnRequested;return c===0?null:{...t,totalQuantity:c}}return t}).filter(t=>t!==null);return{returnedList:o,canceledItems:e==null?void 0:e.filter(t=>t.quantityCanceled),nonCanceledItems:e==null?void 0:e.filter(t=>!t.quantityCanceled)}},j=({slots:s,placeholderImage:i,loading:o,taxConfig:d,order:e=null,withHeader:t=!0,showConfigurableOptions:r,routeProductDetails:c})=>{const p=!!(e!=null&&e.returnNumber),m=v({cancelled:"Order.OrderProductListContent.cancelledTitle",allOrders:"Order.OrderProductListContent.allOrdersTitle",returned:"Order.OrderProductListContent.returnedTitle",refunded:"Order.OrderProductListContent.refundedTitle",sender:"Order.OrderProductListContent.GiftCard.sender",recipient:"Order.OrderProductListContent.GiftCard.recipient",message:"Order.OrderProductListContent.GiftCard.message",outOfStock:"Order.OrderProductListContent.stockStatus.outOfStock",downloadableCount:"Order.OrderProductListContent.downloadableCount"}),y=b(()=>{var f,O;if(!e)return[];if(!p){const{returnedList:u,canceledItems:n,nonCanceledItems:C}=I(e);return[{type:"returned",list:u,title:m.returned},{type:"cancelled",list:n,title:m.cancelled},{type:"allItems",list:C,title:m.allOrders}].filter(L=>{var P;return((P=L==null?void 0:L.list)==null?void 0:P.length)>0})}return[{type:"returned",list:((O=(f=e.returns.find(u=>u.returnNumber===(e==null?void 0:e.returnNumber)))==null?void 0:f.items)==null?void 0:O.map(u=>({...u,totalQuantity:u.requestQuantity})))??[],title:m.returned}]},[e,p,m]);return e?y.every(a=>a.list.length===0)?null:l(R,{variant:"secondary",className:"order-order-product-list-content",children:y.map((a,f)=>{var u;const O=a.list.filter(n=>n!==null).reduce((n,{totalQuantity:C})=>C+n,0);return h(N,{children:[t?l(S,{title:`${a.title} (${O})`}):null,l("ul",{className:"order-order-product-list-content__items",children:(u=a.list)==null?void 0:u.filter(n=>n!==null).map(n=>l("li",{"data-testid":"order-product-list-content-item",children:l(M,{slots:s,placeholderImage:i,loading:o,product:n,itemType:a.type,taxConfig:d,translations:m,showConfigurableOptions:r,routeProductDetails:c})},n.id))})]},f)})}):l(G,{})};export{Z as OrderProductList,Z as default}; diff --git a/scripts/__dropins__/storefront-order/reload b/scripts/__dropins__/storefront-order/reload deleted file mode 100644 index 0e198eba5..000000000 --- a/scripts/__dropins__/storefront-order/reload +++ /dev/null @@ -1 +0,0 @@ -{"at":1739881576190} \ No newline at end of file diff --git a/scripts/__dropins__/storefront-order/types/orderProductList.types.d.ts b/scripts/__dropins__/storefront-order/types/orderProductList.types.d.ts index 027355ea0..995142e8e 100644 --- a/scripts/__dropins__/storefront-order/types/orderProductList.types.d.ts +++ b/scripts/__dropins__/storefront-order/types/orderProductList.types.d.ts @@ -1,3 +1,4 @@ +import { SlotProps } from '@dropins/tools/types/elsie/src/lib'; import { OrderDataModel, OrderItemModel } from '../data/models'; type options = Record; @@ -6,6 +7,9 @@ export type TaxTypes = { taxExcluded: boolean; }; export interface OrderProductListProps { + slots?: { + GiftOptions: SlotProps; + }; orderData?: OrderDataModel; className?: string; withHeader?: boolean; @@ -19,6 +23,9 @@ export interface OrderProductListContentProps extends Omit options; routeProductDetails?: (product: any) => string; } -export interface UseOrderProductListProps extends Omit { +export interface UseOrderProductListProps extends Omit { } export {}; //# sourceMappingURL=orderProductList.types.d.ts.map \ No newline at end of file