@dropins/storefront-account 3.0.0-beta3 → 3.0.0-beta4

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.
@@ -1,6 +1,6 @@
1
1
  /*! Copyright 2025 Adobe
2
2
  All Rights Reserved. */
3
- import{t as L,f as H,a as Y}from"./removeCustomerAddress.js";import{c as j}from"./initialize.js";import"@dropins/tools/event-bus.js";import{merge as J}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as K,ORDER_SUMMARY_FRAGMENT as Q}from"../fragments.js";const B=(a,o="en-US",c={})=>{const d={...{day:"2-digit",month:"2-digit",year:"numeric"},...c},u=new Date(a);return isNaN(u.getTime())?"Invalid Date":new Intl.DateTimeFormat(o,d).format(u)},s={value:0,currency:"USD"},V=a=>{var o,c,_,d,u,g,l,f,n,i;return{subtotal:((o=a==null?void 0:a.total)==null?void 0:o.subtotal)??s,grandTotal:((c=a==null?void 0:a.total)==null?void 0:c.grand_total)??s,grandTotalExclTax:((_=a==null?void 0:a.total)==null?void 0:_.grand_total_excl_tax)??s,totalGiftcard:((d=a==null?void 0:a.total)==null?void 0:d.total_giftcard)??s,subtotalExclTax:((u=a==null?void 0:a.total)==null?void 0:u.subtotal_excl_tax)??s,subtotalInclTax:((g=a==null?void 0:a.total)==null?void 0:g.subtotal_incl_tax)??s,taxes:((l=a==null?void 0:a.total)==null?void 0:l.taxes)??[],totalTax:((f=a==null?void 0:a.total)==null?void 0:f.total_tax)??s,totalShipping:((n=a==null?void 0:a.total)==null?void 0:n.total_shipping)??s,discounts:((i=a==null?void 0:a.total)==null?void 0:i.discounts)??[]}},W=a=>{var d,u,g,l,f,n,i,h,S,y,T,E,R,O,D,b,A,x,M,I,N,k,q,G,$,C,F,v,p,z;if(!((u=(d=a.data)==null?void 0:d.customer)!=null&&u.orders))return null;const o=((l=(g=a==null?void 0:a.data)==null?void 0:g.customer)==null?void 0:l.returns)??[],_={items:(((i=(n=(f=a==null?void 0:a.data)==null?void 0:f.customer)==null?void 0:n.orders)==null?void 0:i.items)??[]).map(r=>{var P;return{items:r==null?void 0:r.items.map(t=>{var U,w;return{status:(t==null?void 0:t.status)??"",productName:(t==null?void 0:t.product_name)??"",id:t==null?void 0:t.id,quantityOrdered:(t==null?void 0:t.quantity_ordered)??0,quantityShipped:(t==null?void 0:t.quantity_shipped)??0,quantityInvoiced:(t==null?void 0:t.quantity_invoiced)??0,sku:(t==null?void 0:t.sku)??"",urlKey:(t==null?void 0:t.url_key)??"",product:{smallImage:{url:((w=(U=t==null?void 0:t.product)==null?void 0:U.small_image)==null?void 0:w.url)??""}}}}),token:r==null?void 0:r.token,email:r==null?void 0:r.email,shippingMethod:r==null?void 0:r.shipping_method,paymentMethods:(r==null?void 0:r.payment_methods)??[],shipments:(r==null?void 0:r.shipments)??[],id:r==null?void 0:r.id,carrier:r==null?void 0:r.carrier,status:r==null?void 0:r.status,number:r==null?void 0:r.number,returns:(P=o==null?void 0:o.items)==null?void 0:P.filter(t=>t.order.id===r.id),orderDate:B(r.order_date),shippingAddress:L(r.shipping_address),billingAddress:L(r.billing_address),total:V(r)}}),pageInfo:{pageSize:((T=(y=(S=(h=a==null?void 0:a.data)==null?void 0:h.customer)==null?void 0:S.orders)==null?void 0:y.page_info)==null?void 0:T.page_size)??10,totalPages:((D=(O=(R=(E=a==null?void 0:a.data)==null?void 0:E.customer)==null?void 0:R.orders)==null?void 0:O.page_info)==null?void 0:D.total_pages)??1,currentPage:((M=(x=(A=(b=a==null?void 0:a.data)==null?void 0:b.customer)==null?void 0:A.orders)==null?void 0:x.page_info)==null?void 0:M.current_page)??1},totalCount:((k=(N=(I=a==null?void 0:a.data)==null?void 0:I.customer)==null?void 0:N.orders)==null?void 0:k.total_count)??0,dateOfFirstOrder:(($=(G=(q=a==null?void 0:a.data)==null?void 0:q.customer)==null?void 0:G.orders)==null?void 0:$.date_of_first_order)??""};return J(_,(z=(p=(v=(F=(C=j)==null?void 0:C.getConfig())==null?void 0:F.models)==null?void 0:v.OrderHistoryModel)==null?void 0:p.transformer)==null?void 0:z.call(p,a.data))},X=`
3
+ import{t as L,f as H,a as Y}from"./removeCustomerAddress.js";import{c as j}from"./initialize.js";import"@dropins/tools/event-bus.js";import{merge as J}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as K,ORDER_SUMMARY_FRAGMENT as Q}from"../fragments.js";const B=(a,o="en-US",s={})=>{const d={...{day:"2-digit",month:"2-digit",year:"numeric"},...s},u=new Date(a);return isNaN(u.getTime())?"Invalid Date":new Intl.DateTimeFormat(o,d).format(u)},c={value:0,currency:"USD"},V=a=>{var o,s,_,d,u,g,l,f,n,i;return{subtotal:((o=a==null?void 0:a.total)==null?void 0:o.subtotal)??c,grandTotal:((s=a==null?void 0:a.total)==null?void 0:s.grand_total)??c,grandTotalExclTax:((_=a==null?void 0:a.total)==null?void 0:_.grand_total_excl_tax)??c,totalGiftcard:((d=a==null?void 0:a.total)==null?void 0:d.total_giftcard)??c,subtotalExclTax:((u=a==null?void 0:a.total)==null?void 0:u.subtotal_excl_tax)??c,subtotalInclTax:((g=a==null?void 0:a.total)==null?void 0:g.subtotal_incl_tax)??c,taxes:((l=a==null?void 0:a.total)==null?void 0:l.taxes)??[],totalTax:((f=a==null?void 0:a.total)==null?void 0:f.total_tax)??c,totalShipping:((n=a==null?void 0:a.total)==null?void 0:n.total_shipping)??c,discounts:((i=a==null?void 0:a.total)==null?void 0:i.discounts)??[]}},W=a=>{var d,u,g,l,f,n,i,h,S,y,T,E,R,O,D,b,A,x,M,I,N,k,q,G,$,C,F,v,p,z;if(!((u=(d=a.data)==null?void 0:d.customer)!=null&&u.orders))return null;const o=((l=(g=a==null?void 0:a.data)==null?void 0:g.customer)==null?void 0:l.returns)??[],_={items:(((i=(n=(f=a==null?void 0:a.data)==null?void 0:f.customer)==null?void 0:n.orders)==null?void 0:i.items)??[]).map(r=>{var P;return{items:r==null?void 0:r.items.map(t=>{var U,w;return{status:(t==null?void 0:t.status)??"",productName:(t==null?void 0:t.product_name)??"",id:t==null?void 0:t.id,quantityOrdered:(t==null?void 0:t.quantity_ordered)??0,quantityShipped:(t==null?void 0:t.quantity_shipped)??0,quantityInvoiced:(t==null?void 0:t.quantity_invoiced)??0,sku:(t==null?void 0:t.product_sku)??"",urlKey:(t==null?void 0:t.product_url_key)??"",product:{smallImage:{url:((w=(U=t==null?void 0:t.product)==null?void 0:U.small_image)==null?void 0:w.url)??""}}}}),token:r==null?void 0:r.token,email:r==null?void 0:r.email,shippingMethod:r==null?void 0:r.shipping_method,paymentMethods:(r==null?void 0:r.payment_methods)??[],shipments:(r==null?void 0:r.shipments)??[],id:r==null?void 0:r.id,carrier:r==null?void 0:r.carrier,status:r==null?void 0:r.status,number:r==null?void 0:r.number,returns:(P=o==null?void 0:o.items)==null?void 0:P.filter(t=>t.order.id===r.id),orderDate:B(r.order_date),shippingAddress:L(r.shipping_address),billingAddress:L(r.billing_address),total:V(r)}}),pageInfo:{pageSize:((T=(y=(S=(h=a==null?void 0:a.data)==null?void 0:h.customer)==null?void 0:S.orders)==null?void 0:y.page_info)==null?void 0:T.page_size)??10,totalPages:((D=(O=(R=(E=a==null?void 0:a.data)==null?void 0:E.customer)==null?void 0:R.orders)==null?void 0:O.page_info)==null?void 0:D.total_pages)??1,currentPage:((M=(x=(A=(b=a==null?void 0:a.data)==null?void 0:b.customer)==null?void 0:A.orders)==null?void 0:x.page_info)==null?void 0:M.current_page)??1},totalCount:((k=(N=(I=a==null?void 0:a.data)==null?void 0:I.customer)==null?void 0:N.orders)==null?void 0:k.total_count)??0,dateOfFirstOrder:(($=(G=(q=a==null?void 0:a.data)==null?void 0:q.customer)==null?void 0:G.orders)==null?void 0:$.date_of_first_order)??""};return J(_,(z=(p=(v=(F=(C=j)==null?void 0:C.getConfig())==null?void 0:F.models)==null?void 0:v.OrderHistoryModel)==null?void 0:p.transformer)==null?void 0:z.call(p,a.data))},X=`
4
4
  query GET_CUSTOMER_ORDERS_LIST(
5
5
  $currentPage: Int
6
6
  $pageSize: Int
@@ -65,9 +65,9 @@ import{t as L,f as H,a as Y}from"./removeCustomerAddress.js";import{c as j}from"
65
65
  quantity_ordered
66
66
  quantity_shipped
67
67
  quantity_invoiced
68
+ product_sku
69
+ product_url_key
68
70
  product {
69
- sku
70
- url_key
71
71
  small_image {
72
72
  url
73
73
  }
@@ -82,5 +82,5 @@ import{t as L,f as H,a as Y}from"./removeCustomerAddress.js";import{c as j}from"
82
82
  }
83
83
  ${K}
84
84
  ${Q}
85
- `,Z={sort_direction:"DESC",sort_field:"CREATED_AT"},oa=async(a,o,c)=>{const _=o.includes("viewAll")?{}:{order_date:JSON.parse(o)};return await H(X,{method:"GET",cache:"no-cache",variables:{pageSize:a,currentPage:c,filter:_,sort:Z}}).then(d=>W(d)).catch(Y)};export{oa as g};
85
+ `,Z={sort_direction:"DESC",sort_field:"CREATED_AT"},oa=async(a,o,s)=>{const _=o.includes("viewAll")?{}:{order_date:JSON.parse(o)};return await H(X,{method:"GET",cache:"no-cache",variables:{pageSize:a,currentPage:s,filter:_,sort:Z}}).then(d=>W(d)).catch(Y)};export{oa as g};
86
86
  //# sourceMappingURL=getOrderHistoryList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getOrderHistoryList.js","sources":["/@dropins/storefront-account/src/lib/formatDateToLocale.ts","/@dropins/storefront-account/src/data/transforms/transform-order-history-list.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/getOrderHistoryList.ts"],"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\n/**\n * Formats a date string according to a specified locale and options.\n * Returns \"Invalid Date\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted date string, or \"Invalid Date\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale, MM/DD/YYYY)\n * console.log(formatDateToLocale('2023-08-29'));\n * // Output: \"08/29/2023\"\n *\n * @example\n * // Formatting with a specified locale (e.g., en-GB for DD/MM/YYYY)\n * console.log(formatDateToLocale('2023-08-29', 'en-GB'));\n * // Output: \"29/08/2023\"\n *\n * @example\n * // Formatting with a specified locale and custom options (e.g., de-DE with long month format)\n * console.log(formatDateToLocale('2023-08-29', 'de-DE', { month: 'long', year: 'numeric' }));\n * // Output: \"29. August 2023\"\n *\n * @example\n * // Handling an invalid date string\n * console.log(formatDateToLocale('invalid-date'));\n * // Output: \"Invalid Date\"\n */\nexport const formatDateToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n };\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const dateObj = new Date(date);\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Date';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\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 OrderHistoryListResponse, OrderItemProps,\n OrderProps,\n ReturnProps,\n} from '@/account/types';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { transformSingleAddress } from '@/account/data/transforms/transform-customer-address';\nimport { formatDateToLocale } from '@/account/lib/formatDateToLocale';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nconst initialMoneyProps = {\n value: 0,\n currency: 'USD',\n};\n\nconst transformOrderHistoryTotal = (item: any) => {\n return {\n subtotal: item?.total?.subtotal ?? initialMoneyProps,\n grandTotal: item?.total?.grand_total ?? initialMoneyProps,\n grandTotalExclTax: item?.total?.grand_total_excl_tax ?? initialMoneyProps,\n totalGiftcard: item?.total?.total_giftcard ?? initialMoneyProps,\n subtotalExclTax: item?.total?.subtotal_excl_tax ?? initialMoneyProps,\n subtotalInclTax: item?.total?.subtotal_incl_tax ?? initialMoneyProps,\n taxes: item?.total?.taxes ?? [],\n totalTax: item?.total?.total_tax ?? initialMoneyProps,\n totalShipping: item?.total?.total_shipping ?? initialMoneyProps,\n discounts: item?.total?.discounts ?? [],\n };\n};\n\nexport const transformOrderHistoryList = (\n response: OrderHistoryListResponse\n): OrderHistoryModel | null => {\n if (!response.data?.customer?.orders) return null;\n\n const returns = response?.data?.customer?.returns ?? [];\n const items = response?.data?.customer?.orders?.items ?? [];\n\n const model = {\n items: items.map((item: OrderProps) => {\n return {\n items: item?.items.map((element: OrderItemProps) => ({\n status: element?.status ?? '',\n productName: element?.product_name ?? '',\n id: element?.id,\n quantityOrdered: element?.quantity_ordered ?? 0,\n quantityShipped: element?.quantity_shipped ?? 0,\n quantityInvoiced: element?.quantity_invoiced ?? 0,\n sku: element?.sku ?? '',\n urlKey: element?.url_key ?? '',\n product: {\n smallImage: {\n url: element?.product?.small_image?.url ?? '',\n },\n },\n })),\n token: item?.token,\n email: item?.email,\n shippingMethod: item?.shipping_method,\n paymentMethods: item?.payment_methods ?? [],\n shipments: item?.shipments ?? [],\n id: item?.id,\n carrier: item?.carrier,\n status: item?.status,\n number: item?.number,\n returns: returns?.items?.filter(\n (returnItem: ReturnProps) => returnItem.order.id === item.id\n ),\n orderDate: formatDateToLocale(item.order_date),\n shippingAddress: transformSingleAddress(item.shipping_address),\n billingAddress: transformSingleAddress(item.billing_address),\n total: transformOrderHistoryTotal(item),\n };\n }),\n pageInfo: {\n pageSize: response?.data?.customer?.orders?.page_info?.page_size ?? 10,\n totalPages: response?.data?.customer?.orders?.page_info?.total_pages ?? 1,\n currentPage:\n response?.data?.customer?.orders?.page_info?.current_page ?? 1,\n },\n totalCount: response?.data?.customer?.orders?.total_count ?? 0,\n dateOfFirstOrder:\n response?.data?.customer?.orders?.date_of_first_order ?? '',\n };\n\n return merge(\n model, // default transformer\n config?.getConfig()?.models?.OrderHistoryModel?.transformer?.(response.data) // custom transformer\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 ADDRESS_FRAGMENT,\n ORDER_SUMMARY_FRAGMENT,\n} from '@/account/api/fragments';\n\nexport const GET_CUSTOMER_ORDERS_LIST = /* GraphQL */ `\n query GET_CUSTOMER_ORDERS_LIST(\n $currentPage: Int\n $pageSize: Int\n $filter: CustomerOrdersFilterInput\n $sort: CustomerOrderSortInput\n ) {\n customer {\n returns {\n items {\n uid\n number\n order {\n id\n }\n }\n }\n orders(\n currentPage: $currentPage\n pageSize: $pageSize\n filter: $filter\n sort: $sort\n ) {\n page_info {\n page_size\n total_pages\n current_page\n }\n date_of_first_order\n total_count\n items {\n token\n email\n shipping_method\n payment_methods {\n name\n type\n }\n shipping_address {\n ...ADDRESS_FRAGMENT\n }\n billing_address {\n ...ADDRESS_FRAGMENT\n }\n shipments {\n id\n number\n tracking {\n title\n number\n carrier\n }\n }\n number\n id\n order_date\n carrier\n status\n items {\n status\n product_name\n id\n quantity_ordered\n quantity_shipped\n quantity_invoiced\n product {\n sku\n url_key\n small_image {\n url\n }\n }\n }\n total {\n ...ORDER_SUMMARY_FRAGMENT\n }\n }\n }\n }\n }\n ${ADDRESS_FRAGMENT}\n ${ORDER_SUMMARY_FRAGMENT}\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 { fetchGraphQl } from '@/account/api';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { GET_CUSTOMER_ORDERS_LIST } from './graphql/getOrderHistoryList.graphql';\nimport { OrderHistoryListResponse } from '@/account/types';\nimport { transformOrderHistoryList } from '@/account/data/transforms';\nimport { OrderHistoryModel } from '@/account/data/models';\n\nconst SORT_DIRECTION = { sort_direction: 'DESC', sort_field: 'CREATED_AT' };\n\nexport const getOrderHistoryList = async (\n pageSize: number,\n selectOrdersDate: string,\n currentPage: number\n): Promise<OrderHistoryModel | null> => {\n const filterOrderDate = !selectOrdersDate.includes('viewAll')\n ? {\n order_date: JSON.parse(selectOrdersDate),\n }\n : {};\n\n return await fetchGraphQl(GET_CUSTOMER_ORDERS_LIST, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n filter: filterOrderDate,\n sort: SORT_DIRECTION,\n },\n })\n .then((response: OrderHistoryListResponse) => {\n return transformOrderHistoryList(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["formatDateToLocale","date","locale","options","formatOptions","dateObj","initialMoneyProps","transformOrderHistoryTotal","item","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","transformOrderHistoryList","response","returns","model","element","returnItem","transformSingleAddress","_k","_o","_n","_m","_l","_s","_r","_q","_p","_v","_u","_t","_y","_x","_w","merge","_D","_C","_B","_A","_z","config","GET_CUSTOMER_ORDERS_LIST","ADDRESS_FRAGMENT","ORDER_SUMMARY_FRAGMENT","SORT_DIRECTION","getOrderHistoryList","pageSize","selectOrdersDate","currentPage","filterOrderDate","fetchGraphQl","handleNetworkError"],"mappings":"kQA8CO,MAAMA,EAAqB,CAChCC,EACAC,EAAiB,QACjBC,EAAsC,CAAA,IAC3B,CAMX,MAAMC,EAA4C,CAChD,GANiD,CACjD,IAAK,UACL,MAAO,UACP,KAAM,SAAA,EAIN,GAAGD,CAAA,EAGCE,EAAU,IAAI,KAAKJ,CAAI,EAE7B,OAAI,MAAMI,EAAQ,QAAA,CAAS,EAClB,eAGS,IAAI,KAAK,eAAeH,EAAQE,CAAa,EAC9C,OAAOC,CAAO,CACjC,ECzCMC,EAAoB,CACxB,MAAO,EACP,SAAU,KACZ,EAEMC,EAA8BC,GAAc,yBAChD,MAAO,CACL,WAAUC,EAAAD,GAAA,YAAAA,EAAM,QAAN,YAAAC,EAAa,WAAYH,EACnC,aAAYI,EAAAF,GAAA,YAAAA,EAAM,QAAN,YAAAE,EAAa,cAAeJ,EACxC,oBAAmBK,EAAAH,GAAA,YAAAA,EAAM,QAAN,YAAAG,EAAa,uBAAwBL,EACxD,gBAAeM,EAAAJ,GAAA,YAAAA,EAAM,QAAN,YAAAI,EAAa,iBAAkBN,EAC9C,kBAAiBO,EAAAL,GAAA,YAAAA,EAAM,QAAN,YAAAK,EAAa,oBAAqBP,EACnD,kBAAiBQ,EAAAN,GAAA,YAAAA,EAAM,QAAN,YAAAM,EAAa,oBAAqBR,EACnD,QAAOS,EAAAP,GAAA,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/src/lib/formatDateToLocale.ts","/@dropins/storefront-account/src/data/transforms/transform-order-history-list.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/graphql/getOrderHistoryList.graphql.ts","/@dropins/storefront-account/src/api/getOrderHistoryList/getOrderHistoryList.ts"],"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\n/**\n * Formats a date string according to a specified locale and options.\n * Returns \"Invalid Date\" if the input date string is invalid.\n *\n * @param {string} date - The date string to be formatted.\n * @param {string} [locale='en-US'] - The locale to use for formatting. Defaults to 'en-US'.\n * @param {Intl.DateTimeFormatOptions} [options={}] - Optional formatting options to customize the output.\n * @returns {string} The formatted date string, or \"Invalid Date\" if the input is invalid.\n *\n * @example\n * // Default formatting (en-US locale, MM/DD/YYYY)\n * console.log(formatDateToLocale('2023-08-29'));\n * // Output: \"08/29/2023\"\n *\n * @example\n * // Formatting with a specified locale (e.g., en-GB for DD/MM/YYYY)\n * console.log(formatDateToLocale('2023-08-29', 'en-GB'));\n * // Output: \"29/08/2023\"\n *\n * @example\n * // Formatting with a specified locale and custom options (e.g., de-DE with long month format)\n * console.log(formatDateToLocale('2023-08-29', 'de-DE', { month: 'long', year: 'numeric' }));\n * // Output: \"29. August 2023\"\n *\n * @example\n * // Handling an invalid date string\n * console.log(formatDateToLocale('invalid-date'));\n * // Output: \"Invalid Date\"\n */\nexport const formatDateToLocale = (\n date: string,\n locale: string = 'en-US',\n options: Intl.DateTimeFormatOptions = {}\n): string => {\n const defaultOptions: Intl.DateTimeFormatOptions = {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n };\n const formatOptions: Intl.DateTimeFormatOptions = {\n ...defaultOptions,\n ...options,\n };\n\n const dateObj = new Date(date);\n\n if (isNaN(dateObj.getTime())) {\n return 'Invalid Date';\n }\n\n const formatter = new Intl.DateTimeFormat(locale, formatOptions);\n return formatter.format(dateObj);\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 OrderHistoryListResponse, OrderItemProps,\n OrderProps,\n ReturnProps,\n} from '@/account/types';\nimport { OrderHistoryModel } from '@/account/data/models';\nimport { transformSingleAddress } from '@/account/data/transforms/transform-customer-address';\nimport { formatDateToLocale } from '@/account/lib/formatDateToLocale';\nimport { config } from '@/account/api';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nconst initialMoneyProps = {\n value: 0,\n currency: 'USD',\n};\n\nconst transformOrderHistoryTotal = (item: any) => {\n return {\n subtotal: item?.total?.subtotal ?? initialMoneyProps,\n grandTotal: item?.total?.grand_total ?? initialMoneyProps,\n grandTotalExclTax: item?.total?.grand_total_excl_tax ?? initialMoneyProps,\n totalGiftcard: item?.total?.total_giftcard ?? initialMoneyProps,\n subtotalExclTax: item?.total?.subtotal_excl_tax ?? initialMoneyProps,\n subtotalInclTax: item?.total?.subtotal_incl_tax ?? initialMoneyProps,\n taxes: item?.total?.taxes ?? [],\n totalTax: item?.total?.total_tax ?? initialMoneyProps,\n totalShipping: item?.total?.total_shipping ?? initialMoneyProps,\n discounts: item?.total?.discounts ?? [],\n };\n};\n\nexport const transformOrderHistoryList = (\n response: OrderHistoryListResponse\n): OrderHistoryModel | null => {\n if (!response.data?.customer?.orders) return null;\n\n const returns = response?.data?.customer?.returns ?? [];\n const items = response?.data?.customer?.orders?.items ?? [];\n\n const model = {\n items: items.map((item: OrderProps) => {\n return {\n items: item?.items.map((element: OrderItemProps) => ({\n status: element?.status ?? '',\n productName: element?.product_name ?? '',\n id: element?.id,\n quantityOrdered: element?.quantity_ordered ?? 0,\n quantityShipped: element?.quantity_shipped ?? 0,\n quantityInvoiced: element?.quantity_invoiced ?? 0,\n sku: element?.product_sku ?? '',\n urlKey: element?.product_url_key ?? '',\n product: {\n smallImage: {\n url: element?.product?.small_image?.url ?? '',\n },\n },\n })),\n token: item?.token,\n email: item?.email,\n shippingMethod: item?.shipping_method,\n paymentMethods: item?.payment_methods ?? [],\n shipments: item?.shipments ?? [],\n id: item?.id,\n carrier: item?.carrier,\n status: item?.status,\n number: item?.number,\n returns: returns?.items?.filter(\n (returnItem: ReturnProps) => returnItem.order.id === item.id\n ),\n orderDate: formatDateToLocale(item.order_date),\n shippingAddress: transformSingleAddress(item.shipping_address),\n billingAddress: transformSingleAddress(item.billing_address),\n total: transformOrderHistoryTotal(item),\n };\n }),\n pageInfo: {\n pageSize: response?.data?.customer?.orders?.page_info?.page_size ?? 10,\n totalPages: response?.data?.customer?.orders?.page_info?.total_pages ?? 1,\n currentPage:\n response?.data?.customer?.orders?.page_info?.current_page ?? 1,\n },\n totalCount: response?.data?.customer?.orders?.total_count ?? 0,\n dateOfFirstOrder:\n response?.data?.customer?.orders?.date_of_first_order ?? '',\n };\n\n return merge(\n model, // default transformer\n config?.getConfig()?.models?.OrderHistoryModel?.transformer?.(response.data) // custom transformer\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 ADDRESS_FRAGMENT,\n ORDER_SUMMARY_FRAGMENT,\n} from '@/account/api/fragments';\n\nexport const GET_CUSTOMER_ORDERS_LIST = /* GraphQL */ `\n query GET_CUSTOMER_ORDERS_LIST(\n $currentPage: Int\n $pageSize: Int\n $filter: CustomerOrdersFilterInput\n $sort: CustomerOrderSortInput\n ) {\n customer {\n returns {\n items {\n uid\n number\n order {\n id\n }\n }\n }\n orders(\n currentPage: $currentPage\n pageSize: $pageSize\n filter: $filter\n sort: $sort\n ) {\n page_info {\n page_size\n total_pages\n current_page\n }\n date_of_first_order\n total_count\n items {\n token\n email\n shipping_method\n payment_methods {\n name\n type\n }\n shipping_address {\n ...ADDRESS_FRAGMENT\n }\n billing_address {\n ...ADDRESS_FRAGMENT\n }\n shipments {\n id\n number\n tracking {\n title\n number\n carrier\n }\n }\n number\n id\n order_date\n carrier\n status\n items {\n status\n product_name\n id\n quantity_ordered\n quantity_shipped\n quantity_invoiced\n product_sku\n product_url_key\n product {\n small_image {\n url\n }\n }\n }\n total {\n ...ORDER_SUMMARY_FRAGMENT\n }\n }\n }\n }\n }\n ${ADDRESS_FRAGMENT}\n ${ORDER_SUMMARY_FRAGMENT}\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 { fetchGraphQl } from '@/account/api';\nimport { handleNetworkError } from '@/account/lib/network-error';\nimport { GET_CUSTOMER_ORDERS_LIST } from './graphql/getOrderHistoryList.graphql';\nimport { OrderHistoryListResponse } from '@/account/types';\nimport { transformOrderHistoryList } from '@/account/data/transforms';\nimport { OrderHistoryModel } from '@/account/data/models';\n\nconst SORT_DIRECTION = { sort_direction: 'DESC', sort_field: 'CREATED_AT' };\n\nexport const getOrderHistoryList = async (\n pageSize: number,\n selectOrdersDate: string,\n currentPage: number\n): Promise<OrderHistoryModel | null> => {\n const filterOrderDate = !selectOrdersDate.includes('viewAll')\n ? {\n order_date: JSON.parse(selectOrdersDate),\n }\n : {};\n\n return await fetchGraphQl(GET_CUSTOMER_ORDERS_LIST, {\n method: 'GET',\n cache: 'no-cache',\n variables: {\n pageSize,\n currentPage,\n filter: filterOrderDate,\n sort: SORT_DIRECTION,\n },\n })\n .then((response: OrderHistoryListResponse) => {\n return transformOrderHistoryList(response);\n })\n .catch(handleNetworkError);\n};\n"],"names":["formatDateToLocale","date","locale","options","formatOptions","dateObj","initialMoneyProps","transformOrderHistoryTotal","item","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","transformOrderHistoryList","response","returns","model","element","returnItem","transformSingleAddress","_k","_o","_n","_m","_l","_s","_r","_q","_p","_v","_u","_t","_y","_x","_w","merge","_D","_C","_B","_A","_z","config","GET_CUSTOMER_ORDERS_LIST","ADDRESS_FRAGMENT","ORDER_SUMMARY_FRAGMENT","SORT_DIRECTION","getOrderHistoryList","pageSize","selectOrdersDate","currentPage","filterOrderDate","fetchGraphQl","handleNetworkError"],"mappings":"kQA8CO,MAAMA,EAAqB,CAChCC,EACAC,EAAiB,QACjBC,EAAsC,CAAA,IAC3B,CAMX,MAAMC,EAA4C,CAChD,GANiD,CACjD,IAAK,UACL,MAAO,UACP,KAAM,SAAA,EAIN,GAAGD,CAAA,EAGCE,EAAU,IAAI,KAAKJ,CAAI,EAE7B,OAAI,MAAMI,EAAQ,QAAA,CAAS,EAClB,eAGS,IAAI,KAAK,eAAeH,EAAQE,CAAa,EAC9C,OAAOC,CAAO,CACjC,ECzCMC,EAAoB,CACxB,MAAO,EACP,SAAU,KACZ,EAEMC,EAA8BC,GAAc,yBACh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C,CAAsB;AAAA,EC/EpBC,EAAiB,CAAE,eAAgB,OAAQ,WAAY,YAAA,EAEhDC,GAAsB,MACjCC,EACAC,EACAC,IACsC,CACtC,MAAMC,EAAmBF,EAAiB,SAAS,SAAS,EAIxD,CAAA,EAHA,CACE,WAAY,KAAK,MAAMA,CAAgB,CAAA,EAI7C,OAAO,MAAMG,EAAaT,EAA0B,CAClD,OAAQ,MACR,MAAO,WACP,UAAW,CACT,SAAAK,EACA,YAAAE,EACA,OAAQC,EACR,KAAML,CAAA,CACR,CACD,EACE,KAAM/B,GACED,EAA0BC,CAAQ,CAC1C,EACA,MAAMsC,CAAkB,CAC7B"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-account", "version": "3.0.0-beta3", "@dropins/tools": "~1.6.0-beta3", "license": "SEE LICENSE IN LICENSE.md"}
1
+ {"name": "@dropins/storefront-account", "version": "3.0.0-beta4", "@dropins/tools": "~1.6.0-beta3", "license": "SEE LICENSE IN LICENSE.md"}
@@ -14,8 +14,8 @@ export interface OrderItemProps {
14
14
  quantity_ordered?: number;
15
15
  quantity_shipped?: number;
16
16
  quantity_invoiced?: number;
17
- url_key: string;
18
- sku: string;
17
+ product_url_key: string;
18
+ product_sku: string;
19
19
  status: string;
20
20
  product_name: string;
21
21
  id: string;