Skip to content

Commit

Permalink
Install 1.0.1 versions of auth, account and order
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferri0 committed Jan 9, 2025
1 parent 1337e92 commit 1a7d510
Show file tree
Hide file tree
Showing 107 changed files with 2,174 additions and 661 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
"dependencies": {
"@adobe/magento-storefront-event-collector": "^1.8.0",
"@adobe/magento-storefront-events-sdk": "^1.8.0",
"@dropins/storefront-account": "~1.0.1-beta1",
"@dropins/storefront-auth": "~1.0.1-beta1",
"@dropins/storefront-account": "~1.0.1",
"@dropins/storefront-auth": "~1.0.1",
"@dropins/storefront-cart": "~1.0.1",
"@dropins/storefront-checkout": "~1.0.0",
"@dropins/storefront-order": "~1.0.1-beta1",
"@dropins/storefront-order": "~1.0.1",
"@dropins/storefront-pdp": "~1.0.0",
"@dropins/tools": "^0.38.0"
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/__dropins__/storefront-account/api.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
*******************************************************************/
export declare const ORDER_SUMMARY_FRAGMENT = "\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n __typename\n grand_total {\n value\n currency\n }\n subtotal {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n";
export declare const ORDER_SUMMARY_FRAGMENT = "\n fragment ORDER_SUMMARY_FRAGMENT on OrderTotal {\n grand_total {\n value\n currency\n }\n total_giftcard {\n currency\n value\n }\n subtotal_excl_tax {\n currency\n value\n }\n subtotal_incl_tax {\n currency\n value\n }\n taxes {\n amount {\n currency\n value\n }\n rate\n title\n }\n total_tax {\n currency\n value\n }\n total_shipping {\n currency\n value\n }\n discounts {\n amount {\n currency\n value\n }\n label\n }\n }\n";
//# sourceMappingURL=OrderSummaryFragment.graphql.d.ts.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Copyright 2024 Adobe
/*! Copyright 2025 Adobe
All Rights Reserved. */
import{t as h,k as d,f as A,l as C}from"./removeCustomerAddress.js";import{c as I}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as M}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as N,ORDER_SUMMARY_FRAGMENT as $}from"../fragments.js";const b=(t,e="en-US",a={})=>{const r={...{day:"2-digit",month:"2-digit",year:"numeric"},...a},n=new Date(t);return isNaN(n.getTime())?"Invalid Date":new Intl.DateTimeFormat(e,r).format(n)},G=t=>{var c,_,l,u,f,g,p,R,S,E,s,O;if(!((_=(c=t.data)==null?void 0:c.customer)!=null&&_.orders))return null;const{page_info:e,total_count:a,date_of_first_order:i}=t.data.customer.orders,r=((u=(l=t==null?void 0:t.data)==null?void 0:l.customer)==null?void 0:u.returns)??[],m={items:(((p=(g=(f=t==null?void 0:t.data)==null?void 0:f.customer)==null?void 0:g.orders)==null?void 0:p.items)??[]).map(o=>{var T;const D={...o,returns:(T=r==null?void 0:r.items)==null?void 0:T.filter(y=>y.order.id===o.id),order_date:b(o.order_date),shipping_address:h(o.shipping_address),billing_address:h(o.billing_address)};return d(D,"camelCase",{})}),pageInfo:d(e,"camelCase",{}),totalCount:d(a,"camelCase",{}),dateOfFirstOrder:d(i,"camelCase",{})};return M(m,(O=(s=(E=(S=(R=I)==null?void 0:R.getConfig())==null?void 0:S.models)==null?void 0:E.OrderHistoryModel)==null?void 0:s.transformer)==null?void 0:O.call(s,t.data))},F=`
import{t as H,f as Y,k as j}from"./removeCustomerAddress.js";import{c as J}from"./getStoreConfig.js";import"@dropins/tools/event-bus.js";import{merge as K}from"@dropins/tools/lib.js";import{ADDRESS_FRAGMENT as Q,ORDER_SUMMARY_FRAGMENT as B}from"../fragments.js";const V=(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)},_={value:0,currency:"USD"},W=a=>{var o,s,c,d,u,g,f,n,l;return{subtotal:((o=a==null?void 0:a.total)==null?void 0:o.subtotal)??_,grandTotal:((s=a==null?void 0:a.total)==null?void 0:s.grand_total)??_,totalGiftcard:((c=a==null?void 0:a.total)==null?void 0:c.total_giftcard)??_,subtotalExclTax:((d=a==null?void 0:a.total)==null?void 0:d.subtotal_excl_tax)??_,subtotalInclTax:((u=a==null?void 0:a.total)==null?void 0:u.subtotal_incl_tax)??_,taxes:((g=a==null?void 0:a.total)==null?void 0:g.taxes)??[],totalTax:((f=a==null?void 0:a.total)==null?void 0:f.total_tax)??_,totalShipping:((n=a==null?void 0:a.total)==null?void 0:n.total_shipping)??_,discounts:((l=a==null?void 0:a.total)==null?void 0:l.discounts)??[]}},X=a=>{var d,u,g,f,n,l,p,h,S,y,T,E,R,O,D,b,A,I,M,k,x,N,q,G,$,C,F,v,i,z;if(!((u=(d=a.data)==null?void 0:d.customer)!=null&&u.orders))return null;const o=((f=(g=a==null?void 0:a.data)==null?void 0:g.customer)==null?void 0:f.returns)??[],c={items:(((p=(l=(n=a==null?void 0:a.data)==null?void 0:n.customer)==null?void 0:l.orders)==null?void 0:p.items)??[]).map(r=>{var P;return{items:r==null?void 0:r.items.map(t=>{var U,w,L;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,product:{sku:((U=t==null?void 0:t.product)==null?void 0:U.sku)??"",urlKey:(t==null?void 0:t.product.url_key)??"",smallImage:{url:((L=(w=t==null?void 0:t.product)==null?void 0:w.small_image)==null?void 0:L.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:V(r.order_date),shippingAddress:H(r.shipping_address),billingAddress:H(r.billing_address),total:W(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=(I=(A=(b=a==null?void 0:a.data)==null?void 0:b.customer)==null?void 0:A.orders)==null?void 0:I.page_info)==null?void 0:M.current_page)??1},totalCount:((N=(x=(k=a==null?void 0:a.data)==null?void 0:k.customer)==null?void 0:x.orders)==null?void 0:N.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 K(c,(z=(i=(v=(F=(C=J)==null?void 0:C.getConfig())==null?void 0:F.models)==null?void 0:v.OrderHistoryModel)==null?void 0:i.transformer)==null?void 0:z.call(i,a.data))},Z=`
query GET_CUSTOMER_ORDERS_LIST(
$currentPage: Int
$pageSize: Int
Expand Down Expand Up @@ -80,6 +80,6 @@ import{t as h,k as d,f as A,l as C}from"./removeCustomerAddress.js";import{c as
}
}
}
${N}
${$}
`,k={sort_direction:"DESC",sort_field:"CREATED_AT"},z=async(t,e,a)=>{const i=e.includes("viewAll")?{}:{order_date:JSON.parse(e)};return await A(F,{method:"GET",cache:"no-cache",variables:{pageSize:t,currentPage:a,filter:i,sort:k}}).then(r=>G(r)).catch(C)};export{z as g};
${Q}
${B}
`,m={sort_direction:"DESC",sort_field:"CREATED_AT"},ua=async(a,o,s)=>{const c=o.includes("viewAll")?{}:{order_date:JSON.parse(o)};return await Y(Z,{method:"GET",cache:"no-cache",variables:{pageSize:a,currentPage:s,filter:c,sort:m}}).then(d=>X(d)).catch(j)};export{ua as g};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Copyright 2024 Adobe
/*! Copyright 2025 Adobe
All Rights Reserved. */
import{Initializer as f}from"@dropins/tools/lib.js";import{f as h,m as _,l as m}from"./removeCustomerAddress.js";const c=new f({init:async t=>{const r={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};c.config.setConfig({...r,...t})},listeners:()=>[]}),C=c.config,g=t=>{var r,a,i,e,o,n;return{baseMediaUrl:(a=(r=t==null?void 0:t.data)==null?void 0:r.storeConfig)==null?void 0:a.base_media_url,minLength:+((e=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:e.minimum_password_length)||3,requiredCharacterClasses:+((n=(o=t==null?void 0:t.data)==null?void 0:o.storeConfig)==null?void 0:n.required_character_classes_number)||0}},l=`
import{Initializer as f}from"@dropins/tools/lib.js";import{f as h,l as _,k as g}from"./removeCustomerAddress.js";const c=new f({init:async t=>{const r={authHeaderConfig:{header:"Authorization",tokenPrefix:"Bearer"}};c.config.setConfig({...r,...t})},listeners:()=>[]}),C=c.config,l=t=>{var r,a,i,e,o,n;return{baseMediaUrl:(a=(r=t==null?void 0:t.data)==null?void 0:r.storeConfig)==null?void 0:a.base_media_url,minLength:+((e=(i=t==null?void 0:t.data)==null?void 0:i.storeConfig)==null?void 0:e.minimum_password_length)||3,requiredCharacterClasses:+((n=(o=t==null?void 0:t.data)==null?void 0:o.storeConfig)==null?void 0:n.required_character_classes_number)||0}},m=`
query GET_STORE_CONFIG {
storeConfig {
base_media_url
Expand All @@ -9,4 +9,4 @@ import{Initializer as f}from"@dropins/tools/lib.js";import{f as h,m as _,l as m}
required_character_classes_number
}
}
`,s=async()=>await h(l,{method:"GET",cache:"force-cache"}).then(t=>{var r;return(r=t.errors)!=null&&r.length?_(t.errors):g(t)}).catch(m);export{C as c,s as g,c as i};
`,s=async()=>await h(m,{method:"GET",cache:"force-cache"}).then(t=>{var r;return(r=t.errors)!=null&&r.length?_(t.errors):l(t)}).catch(g);export{C as c,s as g,c as i};
Loading

0 comments on commit 1a7d510

Please sign in to comment.