@dropins/storefront-checkout 2.2.0-alpha1 → 2.2.0-alpha2
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.
- package/api/graphql/NegotiableQuoteAddressFragment.graphql.d.ts +1 -1
- package/chunks/synchronizeCheckout.js +5 -5
- package/chunks/synchronizeCheckout.js.map +1 -1
- package/data/models/address.d.ts +1 -0
- package/data/transforms/transform-cart-address.d.ts +0 -2
- package/data/transforms/transform-quote-address.d.ts +1 -2
- package/fragments.js +12 -10
- package/fragments.js.map +1 -1
- package/package.json +1 -1
- package/tests/fixtures/fragments/cart.d.ts +1 -4
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
* is strictly forbidden unless prior written permission is obtained
|
|
15
15
|
* from Adobe.
|
|
16
16
|
*******************************************************************/
|
|
17
|
-
export declare const NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT = "\n fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n";
|
|
17
|
+
export declare const NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT = "\n fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n customer_address_uid\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n";
|
|
18
18
|
export declare const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT: string;
|
|
19
19
|
//# sourceMappingURL=NegotiableQuoteAddressFragment.graphql.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{s as r,n as Q,d as y,U as N,t as D,e as S}from"./fetch-graphql.js";import{merge as k,Initializer as z,deepmerge as G}from"@dropins/tools/lib.js";import{events as d}from"@dropins/tools/event-bus.js";import{CHECKOUT_DATA_FRAGMENT as
|
|
3
|
+
import{s as r,n as Q,d as y,U as N,t as D,e as S}from"./fetch-graphql.js";import{merge as k,Initializer as z,deepmerge as G}from"@dropins/tools/lib.js";import{events as d}from"@dropins/tools/event-bus.js";import{CHECKOUT_DATA_FRAGMENT as _,NEGOTIABLE_QUOTE_FRAGMENT as O}from"../fragments.js";import{b as R,c as U,d as P,a as L,e as x,f as B,g as $}from"./transform-shipping-methods.js";import{E as g}from"./classifiers.js";const F=async(e=!1)=>{r.authenticated=e},C=e=>{if(!e)return;const{code:t,title:i,...s}=e;return{code:t,title:i,additionalData:s}},b=e=>{if(e)return e.filter(t=>!!t).map(t=>{const{code:i,title:s,...c}=t;return{code:i,title:s,additionalData:c}})},H=e=>{var i,s,c;if(!e)return;const t={availablePaymentMethods:b(e.available_payment_methods),billingAddress:U(e.billing_address),email:e.email??void 0,id:e.id,isEmpty:e.total_quantity===0,isVirtual:e.is_virtual,selectedPaymentMethod:C(e.selected_payment_method),shippingAddresses:R(e.shipping_addresses),isGuest:!r.authenticated};return k(t,(c=(s=(i=te.getConfig().models)==null?void 0:i.CartModel)==null?void 0:s.transformer)==null?void 0:c.call(s,e))},q=e=>{const t=e.street.filter(Boolean);return{city:e.city,company:e.company||void 0,country:$(e.country),customAttributes:B(e.custom_attributes),customerAddressUid:e.customer_address_uid||void 0,fax:e.fax||void 0,firstName:e.firstname,lastName:e.lastname,middleName:e.middlename||void 0,postCode:e.postcode||void 0,prefix:e.prefix||void 0,region:x(e.region),street:t,suffix:e.suffix||void 0,telephone:e.telephone||void 0,uid:e.uid,vatId:e.vat_id||void 0}},K=e=>{if(e)return q(e)},V=e=>e.filter(t=>!!t).map(t=>{const{available_shipping_methods:i,selected_shipping_method:s,...c}=t;return{...q(c),availableShippingMethods:L(i),selectedShippingMethod:P(s)}}),W=e=>e?{availablePaymentMethods:b(e.available_payment_methods),billingAddress:K(e.billing_address),email:e.email??"",isEmpty:e.total_quantity===0,isVirtual:e.is_virtual,name:e.name,selectedPaymentMethod:C(e.selected_payment_method),shippingAddresses:V(e.shipping_addresses),status:e.status,uid:e.uid}:null,Y=`
|
|
4
4
|
query getCart($cartId: String!) {
|
|
5
5
|
cart(cart_id: $cartId) {
|
|
6
6
|
...CHECKOUT_DATA_FRAGMENT
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
${
|
|
10
|
+
${_}
|
|
11
11
|
`,j=`
|
|
12
12
|
query getCustomerCart {
|
|
13
13
|
cart: customerCart {
|
|
@@ -15,8 +15,8 @@ import{s as r,n as Q,d as y,U as N,t as D,e as S}from"./fetch-graphql.js";import
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
${
|
|
19
|
-
`,
|
|
18
|
+
${_}
|
|
19
|
+
`,A=async()=>{const e=r.cartId,t=r.authenticated===!1,i=t?Y:j,s=t?{cartId:e}:{};if(t&&!e)throw new Q;return await y({type:"query",query:i,options:{method:"POST",cache:"no-cache",variables:s},path:"cart",transformer:H})},J=`
|
|
20
20
|
query getNegotiableQuote($quoteId: ID!) {
|
|
21
21
|
negotiableQuote(uid: $quoteId) {
|
|
22
22
|
...NEGOTIABLE_QUOTE_FRAGMENT
|
|
@@ -24,5 +24,5 @@ import{s as r,n as Q,d as y,U as N,t as D,e as S}from"./fetch-graphql.js";import
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
${O}
|
|
27
|
-
`,
|
|
27
|
+
`,I=async(e={})=>{const t=e.uid??r.quoteId;if(r.authenticated===!1)throw new N;if(!t)throw new D;return await y({type:"query",query:J,options:{method:"GET",cache:"no-cache",variables:{quoteId:t}},path:"negotiableQuote",transformer:W})},m={eager:!0},X=e=>{var f,p;const t=((p=(f=e==null?void 0:e.features)==null?void 0:f.b2b)==null?void 0:p.quotes)??!1;return[["authenticated",(u=!1)=>{var o,a,l;if(F(u),!t||u)return;const n=(l=(a=(o=e==null?void 0:e.features)==null?void 0:o.b2b)==null?void 0:a.routeLogin)==null?void 0:l.call(a);n&&window.location.assign(n)},m],...t?[["quote-management/quote-data/initialized",u=>{var n,o,a,l;if(!u.quote.canCheckout){const M=((l=(a=(o=(n=e==null?void 0:e.langDefinitions)==null?void 0:n.default)==null?void 0:o.Checkout)==null?void 0:a.Quote)==null?void 0:l.permissionDenied)||"You do not have permission to checkout with this quote.";d.emit("checkout/error",{message:M,code:g.QUOTE_PERMISSION_DENIED});return}h(u.quote)},m],["quote-management/quote-data/error",()=>{var n,o,a,l;const u=((l=(a=(o=(n=e==null?void 0:e.langDefinitions)==null?void 0:n.default)==null?void 0:o.Checkout)==null?void 0:a.Quote)==null?void 0:l.dataError)||"We were unable to retrieve the quote data. Please try again later.";d.emit("checkout/error",{message:u,code:g.QUOTE_DATA_ERROR})}]]:[["cart/initialized",h,m],["cart/reset",w],["cart/updated",T]]].map(([u,n,o])=>d.on(u,n,o))},Z=new URL(window.location.href),ee=Z.searchParams.get("quoteId");r.quoteId=ee;const v=new z({init:async(e={})=>{v.config.setConfig(G({defaults:{isBillToShipping:!0,selectedShippingMethod:t=>t.length>0?t[0]:null},features:{b2b:{quotes:!1}}},e))},listeners:X}),te=v.config,E=e=>"id"in e,re=async e=>{try{return E(e)?(r.cartId=e.id,r.quoteId=null,await A()??null):(r.cartId=null,r.quoteId=e.uid,await I()??null)}catch(t){return console.error("Checkout initialization failed:",t),null}},h=async e=>{if(r.initialized){await T(e);return}r.config||(r.config=await S());const t=e?await re(e):null;r.initialized=!0,d.emit("checkout/initialized",t)},w=()=>{r.initialized&&(r.cartId=null,r.quoteId=null,d.emit("checkout/updated",null))},se=async e=>{try{return E(e)?(r.cartId=e.id,r.quoteId=null,await A()??null):(r.cartId=null,r.quoteId=e.uid,await I()??null)}catch(t){return console.error("Checkout synchronization failed:",t),null}},T=async e=>{if(!r.initialized)return h(e);if(e===null){w();return}const t=await se(e);d.emit("checkout/updated",t)};export{F as a,I as b,te as c,h as d,W as e,A as g,v as i,w as r,T as s,H as t};
|
|
28
28
|
//# sourceMappingURL=synchronizeCheckout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"synchronizeCheckout.js","sources":["/@dropins/storefront-checkout/src/api/authenticateCustomer/authenticateCustomer.ts","/@dropins/storefront-checkout/src/data/transforms/transform-payment-methods.ts","/@dropins/storefront-checkout/src/data/transforms/transform-cart.ts","/@dropins/storefront-checkout/src/data/transforms/transform-quote-address.ts","/@dropins/storefront-checkout/src/data/transforms/transform-negotiable-quote.ts","/@dropins/storefront-checkout/src/api/getCart/graphql/getCart.graphql.ts","/@dropins/storefront-checkout/src/api/getCart/getCart.ts","/@dropins/storefront-checkout/src/api/getNegotiableQuote/graphql/getNegotiableQuote.graphql.ts","/@dropins/storefront-checkout/src/api/getNegotiableQuote/getNegotiableQuote.ts","/@dropins/storefront-checkout/src/api/initialize/listeners.ts","/@dropins/storefront-checkout/src/api/initialize/initialize.ts","/@dropins/storefront-checkout/src/types/guards.ts","/@dropins/storefront-checkout/src/api/initializeCheckout/initializeCheckout.ts","/@dropins/storefront-checkout/src/api/resetCheckout/resetCheckout.ts","/@dropins/storefront-checkout/src/api/synchronizeCheckout/synchronizeCheckout.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\nimport { state } from '@/checkout/lib/state';\n\nexport const authenticateCustomer = async (authenticated = false) => {\n state.authenticated = authenticated;\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 { PaymentMethod } from '@/checkout/data/models/payment-method';\nimport { GetCartQuery } from '@/checkout/__generated__/types';\n\ntype SelectedPaymentMethod = NonNullable<\n GetCartQuery['cart']\n>['selected_payment_method'];\n\ntype AvailablePaymentMethods = NonNullable<\n GetCartQuery['cart']\n>['available_payment_methods'];\n\ntype AvailablePaymentMethod = NonNullable<AvailablePaymentMethods>[number];\n\ntype NonNullabePaymentMethod = NonNullable<AvailablePaymentMethod>;\n\nconst transformSelectedPaymentMethod = (\n data: SelectedPaymentMethod\n): PaymentMethod | undefined => {\n if (!data) return;\n const { code, title, ...additionalData } = data;\n return { code, title, additionalData };\n};\n\nconst transformAvailablePaymentMethods = (\n data: AvailablePaymentMethods\n): PaymentMethod[] | undefined => {\n if (!data) return;\n\n return data\n .filter((method) => !!method)\n .map((method) => {\n const { code, title, ...additionalData } =\n method as NonNullabePaymentMethod;\n return { code, title, additionalData };\n });\n};\n\nexport { transformAvailablePaymentMethods, transformSelectedPaymentMethod };\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 { config } from '@/checkout/api';\nimport { Cart as CartModel } from '@/checkout/data/models';\nimport {\n transformAvailablePaymentMethods,\n transformSelectedPaymentMethod,\n} from '@/checkout/data/transforms/transform-payment-methods';\nimport { GetCartQuery } from '@/checkout/__generated__/types';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nimport {\n transformCartBillingAddress,\n transformCartShippingAddress,\n} from '@/checkout/data/transforms/transform-cart-address';\nimport { state } from '@/checkout/lib/state';\n\ntype Cart = GetCartQuery['cart'];\n\nconst transformCart = (data: Cart): CartModel | undefined => {\n if (!data) return;\n\n const model = {\n availablePaymentMethods: transformAvailablePaymentMethods(\n data.available_payment_methods\n ),\n billingAddress: transformCartBillingAddress(data.billing_address),\n email: data.email ?? undefined,\n id: data.id,\n isEmpty: data.total_quantity === 0,\n isVirtual: data.is_virtual,\n selectedPaymentMethod: transformSelectedPaymentMethod(\n data.selected_payment_method\n ),\n shippingAddresses: transformCartShippingAddress(data.shipping_addresses),\n isGuest: !state.authenticated,\n };\n\n // Extend the model merging custom transformer, if provided\n return merge(\n model, // default transformer\n config.getConfig().models?.CartModel?.transformer?.(data) // custom transformer\n );\n};\n\nexport { Cart, transformCart };\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 as AddressModel,\n ShippingAddress as ShippingAddressModel,\n} from '@/checkout/data/models';\n\nimport {\n transformAddressCountry,\n transformAddressRegion,\n transformCustomAttributes,\n transformSelectedShippingMethod,\n transformShippingMethods,\n} from '@/checkout/data/transforms';\nimport { GetNegotiableQuoteQuery } from '@/checkout/__generated__/types';\n\ntype QuoteShippingAddresses = NonNullable<\n GetNegotiableQuoteQuery['negotiableQuote']\n>['shipping_addresses'];\ntype QuoteShippingAddress = QuoteShippingAddresses[0];\ntype NonNullableShippingAddress = NonNullable<QuoteShippingAddress>;\n\ntype QuoteBillingAddress = NonNullable<\n GetNegotiableQuoteQuery['negotiableQuote']\n>['billing_address'];\ntype NonNullableBillingAddress = NonNullable<QuoteBillingAddress>;\n\nconst transformAddress = (\n data: NonNullableShippingAddress | NonNullableBillingAddress\n): AddressModel => {\n const street = data.street.filter(Boolean) as string[];\n\n return {\n city: data.city,\n company: data.company || undefined,\n country: transformAddressCountry(data.country),\n customAttributes: transformCustomAttributes(data.custom_attributes),\n fax: data.fax || undefined,\n firstName: data.firstname,\n lastName: data.lastname,\n middleName: data.middlename || undefined,\n postCode: data.postcode || undefined,\n prefix: data.prefix || undefined,\n region: transformAddressRegion(data.region),\n street,\n suffix: data.suffix || undefined,\n telephone: data.telephone || undefined,\n uid: data.uid,\n vatId: data.vat_id || undefined,\n };\n};\n\nconst transformQuoteBillingAddress = (\n data: QuoteBillingAddress\n): AddressModel | undefined => {\n if (!data) return;\n return transformAddress(data);\n};\n\nconst transformQuoteShippingAddress = (\n data: QuoteShippingAddresses\n): ShippingAddressModel[] => {\n return data\n .filter((address) => !!address)\n .map((address) => {\n const {\n available_shipping_methods,\n selected_shipping_method,\n ...baseData\n } = address as NonNullableShippingAddress;\n\n return {\n ...transformAddress(baseData as NonNullableShippingAddress),\n availableShippingMethods: transformShippingMethods(\n available_shipping_methods\n ),\n selectedShippingMethod: transformSelectedShippingMethod(\n selected_shipping_method\n ),\n };\n });\n};\n\nexport {\n QuoteBillingAddress,\n QuoteShippingAddress,\n transformQuoteBillingAddress,\n transformQuoteShippingAddress,\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { NegotiableQuote as NegotiableQuoteModel } from '@/checkout/data/models/';\nimport { GetNegotiableQuoteQuery } from '@/checkout/__generated__/types';\n\nimport {\n transformAvailablePaymentMethods,\n transformQuoteBillingAddress,\n transformQuoteShippingAddress,\n transformSelectedPaymentMethod,\n} from '@/checkout/data/transforms';\n\ntype NegotiableQuote = GetNegotiableQuoteQuery['negotiableQuote'];\n\nexport const transformNegotiableQuote = (\n data: NegotiableQuote | undefined\n): NegotiableQuoteModel | null => {\n if (!data) return null;\n\n return {\n availablePaymentMethods: transformAvailablePaymentMethods(\n data.available_payment_methods\n ),\n billingAddress: transformQuoteBillingAddress(data.billing_address),\n email: data.email ?? '',\n isEmpty: data.total_quantity === 0,\n isVirtual: data.is_virtual,\n name: data.name,\n selectedPaymentMethod: transformSelectedPaymentMethod(\n data.selected_payment_method\n ),\n shippingAddresses: transformQuoteShippingAddress(data.shipping_addresses),\n status: data.status,\n uid: data.uid,\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 { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const getCartQuery = /* GraphQL */ `\n query getCart($cartId: String!) {\n cart(cart_id: $cartId) {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n\nexport const getCustomerCartQuery = /* GraphQL */ `\n query getCustomerCart {\n cart: customerCart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n\n ${CHECKOUT_DATA_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 {\n getCartQuery,\n getCustomerCartQuery,\n} from '@/checkout/api/getCart/graphql';\nimport { transformCart } from '@/checkout/data/transforms';\nimport { dispatchApiCall } from '@/checkout/lib/dispatchApiCall';\nimport { state } from '@/checkout/lib';\nimport { MissingCart } from '@/checkout/lib/errors';\n\nexport const getCart = async () => {\n const cartId = state.cartId;\n const isGuest = state.authenticated === false;\n const query = isGuest ? getCartQuery : getCustomerCartQuery;\n const variables = isGuest ? { cartId } : {};\n\n if (isGuest && !cartId) throw new MissingCart();\n\n return await dispatchApiCall({\n type: 'query',\n query,\n options: { method: 'POST', cache: 'no-cache', variables },\n path: 'cart',\n transformer: transformCart,\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const getNegotiableQuoteQuery = /* GraphQL */ `\n query getNegotiableQuote($quoteId: ID!) {\n negotiableQuote(uid: $quoteId) {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { getNegotiableQuoteQuery } from '@/checkout/api/getNegotiableQuote/graphql';\nimport { transformNegotiableQuote as transformer } from '@/checkout/data/transforms';\nimport { state } from '@/checkout/lib';\nimport { dispatchApiCall } from '@/checkout/lib/dispatchApiCall';\nimport {\n MissingNegotiableQuoteId,\n Unauthenticated,\n} from '@/checkout/lib/errors';\n\ntype GetNegotiableQuoteInput = {\n uid?: string;\n};\n\nexport const getNegotiableQuote = async (\n input: GetNegotiableQuoteInput = {}\n) => {\n const quoteId = input.uid ?? state.quoteId;\n const isGuest = state.authenticated === false;\n\n if (isGuest) throw new Unauthenticated();\n if (!quoteId) throw new MissingNegotiableQuoteId();\n\n const variables = { quoteId };\n\n return await dispatchApiCall({\n type: 'query',\n query: getNegotiableQuoteQuery,\n options: { method: 'GET', cache: 'no-cache', variables },\n path: 'negotiableQuote',\n 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 authenticateCustomer,\n ConfigProps,\n initializeCheckout,\n resetCheckout,\n synchronizeCheckout,\n} from '@/checkout/api';\nimport { ErrorCodes } from '@/checkout/lib/errors';\nimport { events, Events } from '@adobe-commerce/event-bus';\n\ntype Listener = [keyof Events, (...args: any[]) => void, { eager: boolean }?];\n\nconst asEager = { eager: true };\n\nexport const addCheckoutEventListeners = (config: ConfigProps | undefined) => {\n const useB2bQuotes = config?.features?.b2b?.quotes ?? false;\n\n const handleAuthenticated = (isAuthenticated = false) => {\n authenticateCustomer(isAuthenticated);\n\n if (!useB2bQuotes) return;\n if (isAuthenticated) return;\n\n const destination = config?.features?.b2b?.routeLogin?.();\n if (destination) {\n window.location.assign(destination);\n }\n };\n\n const cartListeners: Listener[] = [\n ['cart/initialized', initializeCheckout, asEager],\n ['cart/reset', resetCheckout],\n ['cart/updated', synchronizeCheckout],\n ];\n\n const quoteListeners: Listener[] = [\n [\n 'quote-management/quote-data/initialized',\n (data) => {\n if (!data.quote.canCheckout) {\n const message =\n config?.langDefinitions?.default?.Checkout?.Quote\n ?.permissionDenied ||\n 'You do not have permission to checkout with this quote.';\n events.emit('checkout/error', {\n message,\n code: ErrorCodes.QUOTE_PERMISSION_DENIED,\n });\n return;\n }\n\n initializeCheckout(data.quote);\n },\n asEager,\n ],\n [\n 'quote-management/quote-data/error',\n () => {\n const message =\n config?.langDefinitions?.default?.Checkout?.Quote?.dataError ||\n 'We were unable to retrieve the quote data. Please try again later.';\n events.emit('checkout/error', {\n message,\n code: ErrorCodes.QUOTE_DATA_ERROR,\n });\n },\n ],\n ];\n\n const listeners: Listener[] = [\n ['authenticated', handleAuthenticated, asEager],\n ...(useB2bQuotes ? quoteListeners : cartListeners),\n ];\n\n return listeners.map(([eventName, handler, options]) => {\n return events.on(eventName, handler, options);\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 { addCheckoutEventListeners } from '@/checkout/api/initialize/listeners';\nimport {\n Cart as CartModel,\n Customer as CustomerModel,\n ShippingMethod,\n} from '@/checkout/data/models';\nimport { state } from '@/checkout/lib';\nimport { Filter, Selector } from '@/checkout/types/utils';\nimport { definition } from '@adobe-commerce/elsie/i18n';\nimport { deepmerge, Initializer, Model } from '@adobe-commerce/elsie/lib';\n\nconst url = new URL(window.location.href);\nconst quoteId = url.searchParams.get('quoteId');\nstate.quoteId = quoteId;\n\nexport type ConfigProps = {\n defaults?: {\n isBillToShipping?: boolean;\n selectedShippingMethod?: Selector<ShippingMethod>;\n };\n shipping?: {\n filterOptions?: Filter<ShippingMethod>;\n };\n features?: {\n b2b?: {\n quotes?: boolean;\n routeLogin?: () => string | void;\n };\n };\n langDefinitions?: typeof definition & { default: { Checkout: any } };\n models?: {\n CartModel?: Model<CartModel>;\n CustomerModel?: Model<CustomerModel>;\n };\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (_config = {}) => {\n initialize.config.setConfig(\n deepmerge(\n {\n defaults: {\n isBillToShipping: true,\n selectedShippingMethod: (options) => {\n return options.length > 0 ? options[0] : null;\n },\n },\n features: {\n b2b: { quotes: false },\n },\n },\n _config\n )\n );\n },\n listeners: addCheckoutEventListeners,\n});\n\nexport const config = initialize.config;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 CartModel,\n InitializeInput,\n NegotiableQuoteModel,\n SynchronizeInput,\n} from '@/checkout/types';\n\nexport const isCartInput = (\n input: NonNullable<InitializeInput | SynchronizeInput>\n): input is CartModel => {\n return 'id' in input;\n};\n\nexport const isNegotiableQuoteInput = (\n input: NonNullable<InitializeInput | SynchronizeInput>\n): input is NegotiableQuoteModel => {\n return 'uid' in input;\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 getCart,\n getNegotiableQuote,\n getStoreConfig,\n synchronizeCheckout,\n} from '@/checkout/api';\nimport { state } from '@/checkout/lib';\nimport { InitializeInput, isCartInput } from '@/checkout/types';\nimport { events } from '@adobe-commerce/event-bus';\n\nconst getInitialData = async (input: NonNullable<InitializeInput>) => {\n try {\n if (isCartInput(input)) {\n state.cartId = input.id;\n state.quoteId = null;\n return (await getCart()) ?? null;\n }\n state.cartId = null;\n state.quoteId = input.uid;\n return (await getNegotiableQuote()) ?? null;\n } catch (error) {\n console.error('Checkout initialization failed:', error);\n return null;\n }\n};\n\nexport const initializeCheckout = async (input: InitializeInput) => {\n if (state.initialized) {\n await synchronizeCheckout(input);\n return;\n }\n\n if (!state.config) {\n state.config = await getStoreConfig();\n }\n\n const initialData = input ? await getInitialData(input) : null;\n\n state.initialized = true;\n events.emit('checkout/initialized', initialData);\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 { state } from '@/checkout/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const resetCheckout = () => {\n if (!state.initialized) return;\n state.cartId = null;\n state.quoteId = null;\n events.emit('checkout/updated', null);\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 getCart,\n getNegotiableQuote,\n initializeCheckout,\n resetCheckout,\n} from '@/checkout/api';\nimport { state } from '@/checkout/lib/state';\nimport { isCartInput, SynchronizeInput } from '@/checkout/types';\nimport { events } from '@adobe-commerce/event-bus';\n\nconst getSynchronizedData = async (input: NonNullable<SynchronizeInput>) => {\n try {\n if (isCartInput(input)) {\n state.cartId = input.id;\n state.quoteId = null;\n return (await getCart()) ?? null;\n }\n state.cartId = null;\n state.quoteId = input.uid;\n return (await getNegotiableQuote()) ?? null;\n } catch (error) {\n console.error('Checkout synchronization failed:', error);\n return null;\n }\n};\n\nexport const synchronizeCheckout = async (data: SynchronizeInput) => {\n if (!state.initialized) return initializeCheckout(data);\n\n if (data === null) {\n resetCheckout();\n return;\n }\n\n const update = await getSynchronizedData(data);\n\n events.emit('checkout/updated', update);\n};\n"],"names":["authenticateCustomer","authenticated","state","transformSelectedPaymentMethod","data","code","title","additionalData","transformAvailablePaymentMethods","method","transformCart","model","transformCartBillingAddress","transformCartShippingAddress","merge","_c","_b","_a","config","transformAddress","street","transformAddressCountry","transformCustomAttributes","transformAddressRegion","transformQuoteBillingAddress","transformQuoteShippingAddress","address","available_shipping_methods","selected_shipping_method","baseData","transformShippingMethods","transformSelectedShippingMethod","transformNegotiableQuote","getCartQuery","CHECKOUT_DATA_FRAGMENT","getCustomerCartQuery","getCart","cartId","isGuest","query","variables","MissingCart","dispatchApiCall","getNegotiableQuoteQuery","NEGOTIABLE_QUOTE_FRAGMENT","getNegotiableQuote","input","quoteId","Unauthenticated","MissingNegotiableQuoteId","transformer","asEager","addCheckoutEventListeners","useB2bQuotes","isAuthenticated","destination","message","_d","events","ErrorCodes","initializeCheckout","resetCheckout","synchronizeCheckout","eventName","handler","options","url","initialize","Initializer","_config","deepmerge","isCartInput","getInitialData","error","getStoreConfig","initialData","getSynchronizedData","update"],"mappings":"waAmBa,MAAAA,EAAuB,MAAOC,EAAgB,KAAU,CACnEC,EAAM,cAAgBD,CACxB,ECWME,EACJC,GAC8B,CAC9B,GAAI,CAACA,EAAM,OACX,KAAM,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,CAAmB,EAAAH,EACpC,MAAA,CAAE,KAAAC,EAAM,MAAAC,EAAO,eAAAC,CAAe,CACvC,EAEMC,EACJJ,GACgC,CAChC,GAAKA,EAEE,OAAAA,EACJ,OAAQK,GAAW,CAAC,CAACA,CAAM,EAC3B,IAAKA,GAAW,CACf,KAAM,CAAE,KAAAJ,EAAM,MAAAC,EAAO,GAAGC,CACtB,EAAAE,EACK,MAAA,CAAE,KAAAJ,EAAM,MAAAC,EAAO,eAAAC,CAAe,CAAA,CACtC,CACL,EClBMG,EAAiBN,GAAsC,WAC3D,GAAI,CAACA,EAAM,OAEX,MAAMO,EAAQ,CACZ,wBAAyBH,EACvBJ,EAAK,yBACP,EACA,eAAgBQ,EAA4BR,EAAK,eAAe,EAChE,MAAOA,EAAK,OAAS,OACrB,GAAIA,EAAK,GACT,QAASA,EAAK,iBAAmB,EACjC,UA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M,OAAS,KACfA,EAAM,QAAU4C,EAAM,IACd,MAAMD,KAAyB,YAChC4B,EAAO,CACN,eAAA,MAAM,mCAAoCA,CAAK,EAChD,IAAA,CAEX,EAEaX,EAAsB,MAAO1D,GAA2B,CACnE,GAAI,CAACF,EAAM,YAAa,OAAO0D,EAAmBxD,CAAI,EAEtD,GAAIA,IAAS,KAAM,CACHyD,EAAA,EACd,MAAA,CAGI,MAAAgB,EAAS,MAAMD,GAAoBxE,CAAI,EAEtCsD,EAAA,KAAK,mBAAoBmB,CAAM,CACxC"}
|
|
1
|
+
{"version":3,"file":"synchronizeCheckout.js","sources":["/@dropins/storefront-checkout/src/api/authenticateCustomer/authenticateCustomer.ts","/@dropins/storefront-checkout/src/data/transforms/transform-payment-methods.ts","/@dropins/storefront-checkout/src/data/transforms/transform-cart.ts","/@dropins/storefront-checkout/src/data/transforms/transform-quote-address.ts","/@dropins/storefront-checkout/src/data/transforms/transform-negotiable-quote.ts","/@dropins/storefront-checkout/src/api/getCart/graphql/getCart.graphql.ts","/@dropins/storefront-checkout/src/api/getCart/getCart.ts","/@dropins/storefront-checkout/src/api/getNegotiableQuote/graphql/getNegotiableQuote.graphql.ts","/@dropins/storefront-checkout/src/api/getNegotiableQuote/getNegotiableQuote.ts","/@dropins/storefront-checkout/src/api/initialize/listeners.ts","/@dropins/storefront-checkout/src/api/initialize/initialize.ts","/@dropins/storefront-checkout/src/types/guards.ts","/@dropins/storefront-checkout/src/api/initializeCheckout/initializeCheckout.ts","/@dropins/storefront-checkout/src/api/resetCheckout/resetCheckout.ts","/@dropins/storefront-checkout/src/api/synchronizeCheckout/synchronizeCheckout.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\nimport { state } from '@/checkout/lib/state';\n\nexport const authenticateCustomer = async (authenticated = false) => {\n state.authenticated = authenticated;\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 { PaymentMethod } from '@/checkout/data/models/payment-method';\nimport { GetCartQuery } from '@/checkout/__generated__/types';\n\ntype SelectedPaymentMethod = NonNullable<\n GetCartQuery['cart']\n>['selected_payment_method'];\n\ntype AvailablePaymentMethods = NonNullable<\n GetCartQuery['cart']\n>['available_payment_methods'];\n\ntype AvailablePaymentMethod = NonNullable<AvailablePaymentMethods>[number];\n\ntype NonNullabePaymentMethod = NonNullable<AvailablePaymentMethod>;\n\nconst transformSelectedPaymentMethod = (\n data: SelectedPaymentMethod\n): PaymentMethod | undefined => {\n if (!data) return;\n const { code, title, ...additionalData } = data;\n return { code, title, additionalData };\n};\n\nconst transformAvailablePaymentMethods = (\n data: AvailablePaymentMethods\n): PaymentMethod[] | undefined => {\n if (!data) return;\n\n return data\n .filter((method) => !!method)\n .map((method) => {\n const { code, title, ...additionalData } =\n method as NonNullabePaymentMethod;\n return { code, title, additionalData };\n });\n};\n\nexport { transformAvailablePaymentMethods, transformSelectedPaymentMethod };\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 { config } from '@/checkout/api';\nimport { Cart as CartModel } from '@/checkout/data/models';\nimport {\n transformAvailablePaymentMethods,\n transformSelectedPaymentMethod,\n} from '@/checkout/data/transforms/transform-payment-methods';\nimport { GetCartQuery } from '@/checkout/__generated__/types';\nimport { merge } from '@adobe-commerce/elsie/lib';\n\nimport {\n transformCartBillingAddress,\n transformCartShippingAddress,\n} from '@/checkout/data/transforms/transform-cart-address';\nimport { state } from '@/checkout/lib/state';\n\ntype Cart = GetCartQuery['cart'];\n\nconst transformCart = (data: Cart): CartModel | undefined => {\n if (!data) return;\n\n const model = {\n availablePaymentMethods: transformAvailablePaymentMethods(\n data.available_payment_methods\n ),\n billingAddress: transformCartBillingAddress(data.billing_address),\n email: data.email ?? undefined,\n id: data.id,\n isEmpty: data.total_quantity === 0,\n isVirtual: data.is_virtual,\n selectedPaymentMethod: transformSelectedPaymentMethod(\n data.selected_payment_method\n ),\n shippingAddresses: transformCartShippingAddress(data.shipping_addresses),\n isGuest: !state.authenticated,\n };\n\n // Extend the model merging custom transformer, if provided\n return merge(\n model, // default transformer\n config.getConfig().models?.CartModel?.transformer?.(data) // custom transformer\n );\n};\n\nexport { Cart, transformCart };\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 as AddressModel,\n ShippingAddress as ShippingAddressModel,\n} from '@/checkout/data/models';\n\nimport {\n transformAddressCountry,\n transformAddressRegion,\n transformCustomAttributes,\n transformSelectedShippingMethod,\n transformShippingMethods,\n} from '@/checkout/data/transforms';\nimport { GetNegotiableQuoteQuery } from '@/checkout/__generated__/types';\n\ntype QuoteShippingAddresses = NonNullable<\n GetNegotiableQuoteQuery['negotiableQuote']\n>['shipping_addresses'];\ntype QuoteShippingAddress = QuoteShippingAddresses[0];\ntype NonNullableShippingAddress = NonNullable<QuoteShippingAddress>;\n\ntype QuoteBillingAddress = NonNullable<\n GetNegotiableQuoteQuery['negotiableQuote']\n>['billing_address'];\ntype NonNullableBillingAddress = NonNullable<QuoteBillingAddress>;\n\nconst transformAddress = (\n data: NonNullableShippingAddress | NonNullableBillingAddress\n): AddressModel => {\n const street = data.street.filter(Boolean) as string[];\n\n return {\n city: data.city,\n company: data.company || undefined,\n country: transformAddressCountry(data.country),\n customAttributes: transformCustomAttributes(data.custom_attributes),\n customerAddressUid: data.customer_address_uid || undefined,\n fax: data.fax || undefined,\n firstName: data.firstname,\n lastName: data.lastname,\n middleName: data.middlename || undefined,\n postCode: data.postcode || undefined,\n prefix: data.prefix || undefined,\n region: transformAddressRegion(data.region),\n street,\n suffix: data.suffix || undefined,\n telephone: data.telephone || undefined,\n uid: data.uid,\n vatId: data.vat_id || undefined,\n };\n};\n\nconst transformQuoteBillingAddress = (\n data: QuoteBillingAddress\n): AddressModel | undefined => {\n if (!data) return;\n return transformAddress(data);\n};\n\nconst transformQuoteShippingAddress = (\n data: QuoteShippingAddresses\n): ShippingAddressModel[] => {\n return data\n .filter((address) => !!address)\n .map((address) => {\n const {\n available_shipping_methods,\n selected_shipping_method,\n ...baseData\n } = address as NonNullableShippingAddress;\n\n return {\n ...transformAddress(baseData as NonNullableShippingAddress),\n availableShippingMethods: transformShippingMethods(\n available_shipping_methods\n ),\n selectedShippingMethod: transformSelectedShippingMethod(\n selected_shipping_method\n ),\n };\n });\n};\n\nexport {\n QuoteBillingAddress,\n QuoteShippingAddress,\n transformQuoteBillingAddress,\n transformQuoteShippingAddress,\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { NegotiableQuote as NegotiableQuoteModel } from '@/checkout/data/models/';\nimport { GetNegotiableQuoteQuery } from '@/checkout/__generated__/types';\n\nimport {\n transformAvailablePaymentMethods,\n transformQuoteBillingAddress,\n transformQuoteShippingAddress,\n transformSelectedPaymentMethod,\n} from '@/checkout/data/transforms';\n\ntype NegotiableQuote = GetNegotiableQuoteQuery['negotiableQuote'];\n\nexport const transformNegotiableQuote = (\n data: NegotiableQuote | undefined\n): NegotiableQuoteModel | null => {\n if (!data) return null;\n\n return {\n availablePaymentMethods: transformAvailablePaymentMethods(\n data.available_payment_methods\n ),\n billingAddress: transformQuoteBillingAddress(data.billing_address),\n email: data.email ?? '',\n isEmpty: data.total_quantity === 0,\n isVirtual: data.is_virtual,\n name: data.name,\n selectedPaymentMethod: transformSelectedPaymentMethod(\n data.selected_payment_method\n ),\n shippingAddresses: transformQuoteShippingAddress(data.shipping_addresses),\n status: data.status,\n uid: data.uid,\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 { CHECKOUT_DATA_FRAGMENT } from '@/checkout/api/graphql/CheckoutDataFragment.graphql';\n\nexport const getCartQuery = /* GraphQL */ `\n query getCart($cartId: String!) {\n cart(cart_id: $cartId) {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n\n ${CHECKOUT_DATA_FRAGMENT}\n`;\n\nexport const getCustomerCartQuery = /* GraphQL */ `\n query getCustomerCart {\n cart: customerCart {\n ...CHECKOUT_DATA_FRAGMENT\n }\n }\n\n ${CHECKOUT_DATA_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 {\n getCartQuery,\n getCustomerCartQuery,\n} from '@/checkout/api/getCart/graphql';\nimport { transformCart } from '@/checkout/data/transforms';\nimport { dispatchApiCall } from '@/checkout/lib/dispatchApiCall';\nimport { state } from '@/checkout/lib';\nimport { MissingCart } from '@/checkout/lib/errors';\n\nexport const getCart = async () => {\n const cartId = state.cartId;\n const isGuest = state.authenticated === false;\n const query = isGuest ? getCartQuery : getCustomerCartQuery;\n const variables = isGuest ? { cartId } : {};\n\n if (isGuest && !cartId) throw new MissingCart();\n\n return await dispatchApiCall({\n type: 'query',\n query,\n options: { method: 'POST', cache: 'no-cache', variables },\n path: 'cart',\n transformer: transformCart,\n });\n};\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { NEGOTIABLE_QUOTE_FRAGMENT } from '@/checkout/api/graphql/NegotiableQuoteFragment.graphql';\n\nexport const getNegotiableQuoteQuery = /* GraphQL */ `\n query getNegotiableQuote($quoteId: ID!) {\n negotiableQuote(uid: $quoteId) {\n ...NEGOTIABLE_QUOTE_FRAGMENT\n }\n }\n\n ${NEGOTIABLE_QUOTE_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 { getNegotiableQuoteQuery } from '@/checkout/api/getNegotiableQuote/graphql';\nimport { transformNegotiableQuote as transformer } from '@/checkout/data/transforms';\nimport { state } from '@/checkout/lib';\nimport { dispatchApiCall } from '@/checkout/lib/dispatchApiCall';\nimport {\n MissingNegotiableQuoteId,\n Unauthenticated,\n} from '@/checkout/lib/errors';\n\ntype GetNegotiableQuoteInput = {\n uid?: string;\n};\n\nexport const getNegotiableQuote = async (\n input: GetNegotiableQuoteInput = {}\n) => {\n const quoteId = input.uid ?? state.quoteId;\n const isGuest = state.authenticated === false;\n\n if (isGuest) throw new Unauthenticated();\n if (!quoteId) throw new MissingNegotiableQuoteId();\n\n const variables = { quoteId };\n\n return await dispatchApiCall({\n type: 'query',\n query: getNegotiableQuoteQuery,\n options: { method: 'GET', cache: 'no-cache', variables },\n path: 'negotiableQuote',\n 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 authenticateCustomer,\n ConfigProps,\n initializeCheckout,\n resetCheckout,\n synchronizeCheckout,\n} from '@/checkout/api';\nimport { ErrorCodes } from '@/checkout/lib/errors';\nimport { events, Events } from '@adobe-commerce/event-bus';\n\ntype Listener = [keyof Events, (...args: any[]) => void, { eager: boolean }?];\n\nconst asEager = { eager: true };\n\nexport const addCheckoutEventListeners = (config: ConfigProps | undefined) => {\n const useB2bQuotes = config?.features?.b2b?.quotes ?? false;\n\n const handleAuthenticated = (isAuthenticated = false) => {\n authenticateCustomer(isAuthenticated);\n\n if (!useB2bQuotes) return;\n if (isAuthenticated) return;\n\n const destination = config?.features?.b2b?.routeLogin?.();\n if (destination) {\n window.location.assign(destination);\n }\n };\n\n const cartListeners: Listener[] = [\n ['cart/initialized', initializeCheckout, asEager],\n ['cart/reset', resetCheckout],\n ['cart/updated', synchronizeCheckout],\n ];\n\n const quoteListeners: Listener[] = [\n [\n 'quote-management/quote-data/initialized',\n (data) => {\n if (!data.quote.canCheckout) {\n const message =\n config?.langDefinitions?.default?.Checkout?.Quote\n ?.permissionDenied ||\n 'You do not have permission to checkout with this quote.';\n events.emit('checkout/error', {\n message,\n code: ErrorCodes.QUOTE_PERMISSION_DENIED,\n });\n return;\n }\n\n initializeCheckout(data.quote);\n },\n asEager,\n ],\n [\n 'quote-management/quote-data/error',\n () => {\n const message =\n config?.langDefinitions?.default?.Checkout?.Quote?.dataError ||\n 'We were unable to retrieve the quote data. Please try again later.';\n events.emit('checkout/error', {\n message,\n code: ErrorCodes.QUOTE_DATA_ERROR,\n });\n },\n ],\n ];\n\n const listeners: Listener[] = [\n ['authenticated', handleAuthenticated, asEager],\n ...(useB2bQuotes ? quoteListeners : cartListeners),\n ];\n\n return listeners.map(([eventName, handler, options]) => {\n return events.on(eventName, handler, options);\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 { addCheckoutEventListeners } from '@/checkout/api/initialize/listeners';\nimport {\n Cart as CartModel,\n Customer as CustomerModel,\n ShippingMethod,\n} from '@/checkout/data/models';\nimport { state } from '@/checkout/lib';\nimport { Filter, Selector } from '@/checkout/types/utils';\nimport { definition } from '@adobe-commerce/elsie/i18n';\nimport { deepmerge, Initializer, Model } from '@adobe-commerce/elsie/lib';\n\nconst url = new URL(window.location.href);\nconst quoteId = url.searchParams.get('quoteId');\nstate.quoteId = quoteId;\n\nexport type ConfigProps = {\n defaults?: {\n isBillToShipping?: boolean;\n selectedShippingMethod?: Selector<ShippingMethod>;\n };\n shipping?: {\n filterOptions?: Filter<ShippingMethod>;\n };\n features?: {\n b2b?: {\n quotes?: boolean;\n routeLogin?: () => string | void;\n };\n };\n langDefinitions?: typeof definition & { default: { Checkout: any } };\n models?: {\n CartModel?: Model<CartModel>;\n CustomerModel?: Model<CustomerModel>;\n };\n};\n\nexport const initialize = new Initializer<ConfigProps>({\n init: async (_config = {}) => {\n initialize.config.setConfig(\n deepmerge(\n {\n defaults: {\n isBillToShipping: true,\n selectedShippingMethod: (options) => {\n return options.length > 0 ? options[0] : null;\n },\n },\n features: {\n b2b: { quotes: false },\n },\n },\n _config\n )\n );\n },\n listeners: addCheckoutEventListeners,\n});\n\nexport const config = initialize.config;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 CartModel,\n InitializeInput,\n NegotiableQuoteModel,\n SynchronizeInput,\n} from '@/checkout/types';\n\nexport const isCartInput = (\n input: NonNullable<InitializeInput | SynchronizeInput>\n): input is CartModel => {\n return 'id' in input;\n};\n\nexport const isNegotiableQuoteInput = (\n input: NonNullable<InitializeInput | SynchronizeInput>\n): input is NegotiableQuoteModel => {\n return 'uid' in input;\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 getCart,\n getNegotiableQuote,\n getStoreConfig,\n synchronizeCheckout,\n} from '@/checkout/api';\nimport { state } from '@/checkout/lib';\nimport { InitializeInput, isCartInput } from '@/checkout/types';\nimport { events } from '@adobe-commerce/event-bus';\n\nconst getInitialData = async (input: NonNullable<InitializeInput>) => {\n try {\n if (isCartInput(input)) {\n state.cartId = input.id;\n state.quoteId = null;\n return (await getCart()) ?? null;\n }\n state.cartId = null;\n state.quoteId = input.uid;\n return (await getNegotiableQuote()) ?? null;\n } catch (error) {\n console.error('Checkout initialization failed:', error);\n return null;\n }\n};\n\nexport const initializeCheckout = async (input: InitializeInput) => {\n if (state.initialized) {\n await synchronizeCheckout(input);\n return;\n }\n\n if (!state.config) {\n state.config = await getStoreConfig();\n }\n\n const initialData = input ? await getInitialData(input) : null;\n\n state.initialized = true;\n events.emit('checkout/initialized', initialData);\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 { state } from '@/checkout/lib/state';\nimport { events } from '@adobe-commerce/event-bus';\n\nexport const resetCheckout = () => {\n if (!state.initialized) return;\n state.cartId = null;\n state.quoteId = null;\n events.emit('checkout/updated', null);\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 getCart,\n getNegotiableQuote,\n initializeCheckout,\n resetCheckout,\n} from '@/checkout/api';\nimport { state } from '@/checkout/lib/state';\nimport { isCartInput, SynchronizeInput } from '@/checkout/types';\nimport { events } from '@adobe-commerce/event-bus';\n\nconst getSynchronizedData = async (input: NonNullable<SynchronizeInput>) => {\n try {\n if (isCartInput(input)) {\n state.cartId = input.id;\n state.quoteId = null;\n return (await getCart()) ?? null;\n }\n state.cartId = null;\n state.quoteId = input.uid;\n return (await getNegotiableQuote()) ?? null;\n } catch (error) {\n console.error('Checkout synchronization failed:', error);\n return null;\n }\n};\n\nexport const synchronizeCheckout = async (data: SynchronizeInput) => {\n if (!state.initialized) return initializeCheckout(data);\n\n if (data === null) {\n resetCheckout();\n return;\n }\n\n const update = await getSynchronizedData(data);\n\n events.emit('checkout/updated', update);\n};\n"],"names":["authenticateCustomer","authenticated","state","transformSelectedPaymentMethod","data","code","title","additionalData","transformAvailablePaymentMethods","method","transformCart","model","transformCartBillingAddress","transformCartShippingAddress","merge","_c","_b","_a","config","transformAddress","street","transformAddressCountry","transformCustomAttributes","transformAddressRegion","transformQuoteBillingAddress","transformQuoteShippingAddress","address","available_shipping_methods","selected_shipping_method","baseData","transformShippingMethods","transformSelectedShippingMethod","transformNegotiableQuote","getCartQuery","CHECKOUT_DATA_FRAGMENT","getCustomerCartQuery","getCart","cartId","isGuest","query","variables","MissingCart","dispatchApiCall","getNegotiableQuoteQuery","NEGOTIABLE_QUOTE_FRAGMENT","getNegotiableQuote","input","quoteId","Unauthenticated","MissingNegotiableQuoteId","transformer","asEager","addCheckoutEventListeners","useB2bQuotes","isAuthenticated","destination","message","_d","events","ErrorCodes","initializeCheckout","resetCheckout","synchronizeCheckout","eventName","handler","options","url","initialize","Initializer","_config","deepmerge","isCartInput","getInitialData","error","getStoreConfig","initialData","getSynchronizedData","update"],"mappings":"waAmBa,MAAAA,EAAuB,MAAOC,EAAgB,KAAU,CACnEC,EAAM,cAAgBD,CACxB,ECWME,EACJC,GAC8B,CAC9B,GAAI,CAACA,EAAM,OACX,KAAM,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,CAAmB,EAAAH,EACpC,MAAA,CAAE,KAAAC,EAAM,MAAAC,EAAO,eAAAC,CAAe,CACvC,EAEMC,EACJJ,GACgC,CAChC,GAAKA,EAEE,OAAAA,EACJ,OAAQK,GAAW,CAAC,CAACA,CAAM,EAC3B,IAAKA,GAAW,CACf,KAAM,CAAE,KAAAJ,EAAM,MAAAC,EAAO,GAAGC,CACtB,EAAAE,EACK,MAAA,CAAE,KAAAJ,EAAM,MAAAC,EAAO,eAAAC,CAAe,CAAA,CACtC,CACL,EClBMG,EAAiBN,GAAsC,WAC3D,GAAI,CAACA,EAAM,OAEX,MAAMO,EAAQ,CACZ,wBAAyBH,EACvBJ,EAAK,yBAC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B,GAAsB,MAAO9B,GAAyC,CACtE,GAAA,CACE,OAAAyB,EAAYzB,CAAK,GACnB5C,EAAM,OAAS4C,EAAM,GACrB5C,EAAM,QAAU,KACR,MAAMkC,KAAc,OAE9BlC,EAAM,OAAS,KACfA,EAAM,QAAU4C,EAAM,IACd,MAAMD,KAAyB,YAChC4B,EAAO,CACN,eAAA,MAAM,mCAAoCA,CAAK,EAChD,IAAA,CAEX,EAEaX,EAAsB,MAAO1D,GAA2B,CACnE,GAAI,CAACF,EAAM,YAAa,OAAO0D,EAAmBxD,CAAI,EAEtD,GAAIA,IAAS,KAAM,CACHyD,EAAA,EACd,MAAA,CAGI,MAAAgB,EAAS,MAAMD,GAAoBxE,CAAI,EAEtCsD,EAAA,KAAK,mBAAoBmB,CAAM,CACxC"}
|
package/data/models/address.d.ts
CHANGED
|
@@ -51,8 +51,6 @@ declare const transformCartShippingAddress: (data: ({
|
|
|
51
51
|
label: string;
|
|
52
52
|
};
|
|
53
53
|
custom_attributes: ({
|
|
54
|
-
__typename?: "AttributeFile" | undefined;
|
|
55
|
-
} | {
|
|
56
54
|
__typename?: "AttributeSelectedOptions" | undefined;
|
|
57
55
|
} | {
|
|
58
56
|
__typename?: "AttributeValue" | undefined;
|
|
@@ -9,6 +9,7 @@ declare const transformQuoteShippingAddress: (data: ({
|
|
|
9
9
|
__typename?: "NegotiableQuoteShippingAddress" | undefined;
|
|
10
10
|
city: string;
|
|
11
11
|
company?: string | null | undefined;
|
|
12
|
+
customer_address_uid?: string | null | undefined;
|
|
12
13
|
fax?: string | null | undefined;
|
|
13
14
|
firstname: string;
|
|
14
15
|
lastname: string;
|
|
@@ -49,8 +50,6 @@ declare const transformQuoteShippingAddress: (data: ({
|
|
|
49
50
|
label: string;
|
|
50
51
|
};
|
|
51
52
|
custom_attributes?: ({
|
|
52
|
-
__typename?: "AttributeFile" | undefined;
|
|
53
|
-
} | {
|
|
54
53
|
__typename?: "AttributeSelectedOptions" | undefined;
|
|
55
54
|
} | {
|
|
56
55
|
__typename?: "AttributeValue" | undefined;
|
package/fragments.js
CHANGED
|
@@ -20,7 +20,7 @@ const e=`
|
|
|
20
20
|
currency
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
23
|
+
`,_=`
|
|
24
24
|
fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {
|
|
25
25
|
amount {
|
|
26
26
|
currency
|
|
@@ -112,8 +112,8 @@ const e=`
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
${e}
|
|
115
|
-
${
|
|
116
|
-
`,
|
|
115
|
+
${_}
|
|
116
|
+
`,t=`
|
|
117
117
|
fragment AVAILABLE_PAYMENT_METHOD_FRAGMENT on AvailablePaymentMethod {
|
|
118
118
|
code
|
|
119
119
|
title
|
|
@@ -146,7 +146,7 @@ const e=`
|
|
|
146
146
|
|
|
147
147
|
${a}
|
|
148
148
|
${i}
|
|
149
|
-
${
|
|
149
|
+
${t}
|
|
150
150
|
${E}
|
|
151
151
|
`,r=`
|
|
152
152
|
fragment CUSTOMER_FRAGMENT on Customer {
|
|
@@ -154,7 +154,7 @@ const e=`
|
|
|
154
154
|
lastname
|
|
155
155
|
email
|
|
156
156
|
}
|
|
157
|
-
`,
|
|
157
|
+
`,o=`
|
|
158
158
|
fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {
|
|
159
159
|
city
|
|
160
160
|
company
|
|
@@ -168,6 +168,7 @@ const e=`
|
|
|
168
168
|
value
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
+
customer_address_uid
|
|
171
172
|
fax
|
|
172
173
|
firstname
|
|
173
174
|
lastname
|
|
@@ -185,7 +186,7 @@ const e=`
|
|
|
185
186
|
uid
|
|
186
187
|
vat_id
|
|
187
188
|
}
|
|
188
|
-
`,
|
|
189
|
+
`,n=`
|
|
189
190
|
fragment NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT on NegotiableQuoteShippingAddress {
|
|
190
191
|
available_shipping_methods {
|
|
191
192
|
...AVAILABLE_SHIPPING_METHOD_FRAGMENT
|
|
@@ -202,6 +203,7 @@ const e=`
|
|
|
202
203
|
value
|
|
203
204
|
}
|
|
204
205
|
}
|
|
206
|
+
customer_address_uid
|
|
205
207
|
fax
|
|
206
208
|
firstname
|
|
207
209
|
lastname
|
|
@@ -224,7 +226,7 @@ const e=`
|
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
${e}
|
|
227
|
-
${
|
|
229
|
+
${_}
|
|
228
230
|
`,T=`
|
|
229
231
|
fragment NEGOTIABLE_QUOTE_FRAGMENT on NegotiableQuote {
|
|
230
232
|
available_payment_methods {
|
|
@@ -247,9 +249,9 @@ const e=`
|
|
|
247
249
|
uid
|
|
248
250
|
}
|
|
249
251
|
|
|
250
|
-
${n}
|
|
251
252
|
${o}
|
|
252
|
-
${
|
|
253
|
+
${n}
|
|
254
|
+
${t}
|
|
253
255
|
${E}
|
|
254
|
-
`;export{
|
|
256
|
+
`;export{t as AVAILABLE_PAYMENT_METHOD_FRAGMENT,e as AVAILABLE_SHIPPING_METHOD_FRAGMENT,a as BILLING_CART_ADDRESS_FRAGMENT,A as CHECKOUT_DATA_FRAGMENT,r as CUSTOMER_FRAGMENT,o as NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT,T as NEGOTIABLE_QUOTE_FRAGMENT,n as NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT,E as SELECTED_PAYMENT_METHOD_FRAGMENT,_ as SELECTED_SHIPPING_METHOD_FRAGMENT,i as SHIPPING_CART_ADDRESS_FRAGMENT};
|
|
255
257
|
//# sourceMappingURL=fragments.js.map
|
package/fragments.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragments.js","sources":["/@dropins/storefront-checkout/src/api/graphql/ShippingMethodFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CartAddressFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/PaymentMethodFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CheckoutDataFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CustomerFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/NegotiableQuoteAddressFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/NegotiableQuoteFragment.graphql.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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\nexport const AVAILABLE_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment AVAILABLE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n`;\n\nexport const SELECTED_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\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 AVAILABLE_SHIPPING_METHOD_FRAGMENT,\n SELECTED_SHIPPING_METHOD_FRAGMENT,\n} from './ShippingMethodFragment.graphql';\n\nexport const BILLING_CART_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment BILLING_CART_ADDRESS_FRAGMENT on BillingCartAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n id\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n`;\n\nexport const SHIPPING_CART_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment SHIPPING_CART_ADDRESS_FRAGMENT on ShippingCartAddress {\n available_shipping_methods {\n ...AVAILABLE_SHIPPING_METHOD_FRAGMENT\n }\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n id\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n same_as_billing\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n\n ${AVAILABLE_SHIPPING_METHOD_FRAGMENT}\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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\nexport const AVAILABLE_PAYMENT_METHOD_FRAGMENT = /* GraphQL */ `\n fragment AVAILABLE_PAYMENT_METHOD_FRAGMENT on AvailablePaymentMethod {\n code\n title\n }\n`;\n\nexport const SELECTED_PAYMENT_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_PAYMENT_METHOD_FRAGMENT on SelectedPaymentMethod {\n code\n title\n purchase_order_number\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 BILLING_CART_ADDRESS_FRAGMENT,\n SHIPPING_CART_ADDRESS_FRAGMENT,\n} from './CartAddressFragment.graphql';\nimport {\n AVAILABLE_PAYMENT_METHOD_FRAGMENT,\n SELECTED_PAYMENT_METHOD_FRAGMENT,\n} from './PaymentMethodFragment.graphql';\n\nexport const CHECKOUT_DATA_FRAGMENT = /* GraphQL */ `\n fragment CHECKOUT_DATA_FRAGMENT on Cart {\n id\n is_virtual\n email\n total_quantity\n billing_address {\n ...BILLING_CART_ADDRESS_FRAGMENT\n }\n shipping_addresses {\n ...SHIPPING_CART_ADDRESS_FRAGMENT\n }\n available_payment_methods {\n ...AVAILABLE_PAYMENT_METHOD_FRAGMENT\n }\n selected_payment_method {\n ...SELECTED_PAYMENT_METHOD_FRAGMENT\n }\n }\n\n ${BILLING_CART_ADDRESS_FRAGMENT}\n ${SHIPPING_CART_ADDRESS_FRAGMENT}\n ${AVAILABLE_PAYMENT_METHOD_FRAGMENT}\n ${SELECTED_PAYMENT_METHOD_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\nexport const CUSTOMER_FRAGMENT = /* GraphQL */ `\n fragment CUSTOMER_FRAGMENT on Customer {\n firstname\n lastname\n email\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 AVAILABLE_SHIPPING_METHOD_FRAGMENT,\n SELECTED_SHIPPING_METHOD_FRAGMENT,\n} from './ShippingMethodFragment.graphql';\n\nexport const NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n`;\n\nexport const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT on NegotiableQuoteShippingAddress {\n available_shipping_methods {\n ...AVAILABLE_SHIPPING_METHOD_FRAGMENT\n }\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n\n ${AVAILABLE_SHIPPING_METHOD_FRAGMENT}\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT,\n NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT,\n} from './NegotiableQuoteAddressFragment.graphql';\n\nimport {\n AVAILABLE_PAYMENT_METHOD_FRAGMENT,\n SELECTED_PAYMENT_METHOD_FRAGMENT,\n} from './PaymentMethodFragment.graphql';\n\nexport const NEGOTIABLE_QUOTE_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_FRAGMENT on NegotiableQuote {\n available_payment_methods {\n ...AVAILABLE_PAYMENT_METHOD_FRAGMENT\n }\n billing_address {\n ...NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT\n }\n email\n is_virtual\n name\n selected_payment_method {\n ...SELECTED_PAYMENT_METHOD_FRAGMENT\n }\n shipping_addresses {\n ...NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT\n }\n status\n total_quantity\n uid\n }\n\n ${NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT}\n ${NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT}\n ${AVAILABLE_PAYMENT_METHOD_FRAGMENT}\n ${SELECTED_PAYMENT_METHOD_FRAGMENT}\n`;\n"],"names":["AVAILABLE_SHIPPING_METHOD_FRAGMENT","SELECTED_SHIPPING_METHOD_F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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAoBhDJ,CAA6B;AAAA,IAC7BC,CAA8B;AAAA,IAC9BC,CAAiC;AAAA,IACjCC,CAAgC;AAAA,EChCvBE,EAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECKlCC,EAA0D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiC1DC,EAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsCpET,CAAkC;AAAA,IAClCC,CAAiC;AAAA,ECnExBS,EAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsBnDF,CAAyC;AAAA,IACzCC,CAA0C;AAAA,IAC1CL,CAAiC;AAAA,IACjCC,CAAgC;"}
|
|
1
|
+
{"version":3,"file":"fragments.js","sources":["/@dropins/storefront-checkout/src/api/graphql/ShippingMethodFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CartAddressFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/PaymentMethodFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CheckoutDataFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/CustomerFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/NegotiableQuoteAddressFragment.graphql.ts","/@dropins/storefront-checkout/src/api/graphql/NegotiableQuoteFragment.graphql.ts"],"sourcesContent":["/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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\nexport const AVAILABLE_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment AVAILABLE_SHIPPING_METHOD_FRAGMENT on AvailableShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n error_message\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\n }\n`;\n\nexport const SELECTED_SHIPPING_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_SHIPPING_METHOD_FRAGMENT on SelectedShippingMethod {\n amount {\n currency\n value\n }\n carrier_code\n carrier_title\n method_code\n method_title\n price_excl_tax {\n value\n currency\n }\n price_incl_tax {\n value\n currency\n }\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 AVAILABLE_SHIPPING_METHOD_FRAGMENT,\n SELECTED_SHIPPING_METHOD_FRAGMENT,\n} from './ShippingMethodFragment.graphql';\n\nexport const BILLING_CART_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment BILLING_CART_ADDRESS_FRAGMENT on BillingCartAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n id\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n`;\n\nexport const SHIPPING_CART_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment SHIPPING_CART_ADDRESS_FRAGMENT on ShippingCartAddress {\n available_shipping_methods {\n ...AVAILABLE_SHIPPING_METHOD_FRAGMENT\n }\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n fax\n firstname\n id\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n same_as_billing\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n\n ${AVAILABLE_SHIPPING_METHOD_FRAGMENT}\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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\nexport const AVAILABLE_PAYMENT_METHOD_FRAGMENT = /* GraphQL */ `\n fragment AVAILABLE_PAYMENT_METHOD_FRAGMENT on AvailablePaymentMethod {\n code\n title\n }\n`;\n\nexport const SELECTED_PAYMENT_METHOD_FRAGMENT = /* GraphQL */ `\n fragment SELECTED_PAYMENT_METHOD_FRAGMENT on SelectedPaymentMethod {\n code\n title\n purchase_order_number\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 BILLING_CART_ADDRESS_FRAGMENT,\n SHIPPING_CART_ADDRESS_FRAGMENT,\n} from './CartAddressFragment.graphql';\nimport {\n AVAILABLE_PAYMENT_METHOD_FRAGMENT,\n SELECTED_PAYMENT_METHOD_FRAGMENT,\n} from './PaymentMethodFragment.graphql';\n\nexport const CHECKOUT_DATA_FRAGMENT = /* GraphQL */ `\n fragment CHECKOUT_DATA_FRAGMENT on Cart {\n id\n is_virtual\n email\n total_quantity\n billing_address {\n ...BILLING_CART_ADDRESS_FRAGMENT\n }\n shipping_addresses {\n ...SHIPPING_CART_ADDRESS_FRAGMENT\n }\n available_payment_methods {\n ...AVAILABLE_PAYMENT_METHOD_FRAGMENT\n }\n selected_payment_method {\n ...SELECTED_PAYMENT_METHOD_FRAGMENT\n }\n }\n\n ${BILLING_CART_ADDRESS_FRAGMENT}\n ${SHIPPING_CART_ADDRESS_FRAGMENT}\n ${AVAILABLE_PAYMENT_METHOD_FRAGMENT}\n ${SELECTED_PAYMENT_METHOD_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\nexport const CUSTOMER_FRAGMENT = /* GraphQL */ `\n fragment CUSTOMER_FRAGMENT on Customer {\n firstname\n lastname\n email\n }\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 AVAILABLE_SHIPPING_METHOD_FRAGMENT,\n SELECTED_SHIPPING_METHOD_FRAGMENT,\n} from './ShippingMethodFragment.graphql';\n\nexport const NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT on NegotiableQuoteBillingAddress {\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n customer_address_uid\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n`;\n\nexport const NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT on NegotiableQuoteShippingAddress {\n available_shipping_methods {\n ...AVAILABLE_SHIPPING_METHOD_FRAGMENT\n }\n city\n company\n country {\n code\n label\n }\n custom_attributes {\n ... on AttributeValue {\n code\n value\n }\n }\n customer_address_uid\n fax\n firstname\n lastname\n middlename\n postcode\n prefix\n region {\n region_id\n code\n label\n }\n selected_shipping_method {\n ...SELECTED_SHIPPING_METHOD_FRAGMENT\n }\n street\n suffix\n telephone\n uid\n vat_id\n }\n\n ${AVAILABLE_SHIPPING_METHOD_FRAGMENT}\n ${SELECTED_SHIPPING_METHOD_FRAGMENT}\n`;\n","/********************************************************************\n * ADOBE CONFIDENTIAL\n * __________________\n *\n * Copyright 2025 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 NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT,\n NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT,\n} from './NegotiableQuoteAddressFragment.graphql';\n\nimport {\n AVAILABLE_PAYMENT_METHOD_FRAGMENT,\n SELECTED_PAYMENT_METHOD_FRAGMENT,\n} from './PaymentMethodFragment.graphql';\n\nexport const NEGOTIABLE_QUOTE_FRAGMENT = /* GraphQL */ `\n fragment NEGOTIABLE_QUOTE_FRAGMENT on NegotiableQuote {\n available_payment_methods {\n ...AVAILABLE_PAYMENT_METHOD_FRAGMENT\n }\n billing_address {\n ...NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT\n }\n email\n is_virtual\n name\n selected_payment_method {\n ...SELECTED_PAYMENT_METHOD_FRAGMENT\n }\n shipping_addresses {\n ...NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT\n }\n status\n total_quantity\n uid\n }\n\n ${NEGOTIABLE_QUOTE_BILLING_ADDRESS_FRAGMENT}\n ${NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_FRAGMENT}\n ${AVAILABLE_PAYMENT_METHOD_FRAGMENT}\n ${SELECTED_PAYMENT_METHOD_FRAGMENT}\n`;\n"],"names":["AVAILABLE_SHIPPING_METHOD_FRAGMENT","SELECTED_SHIPPING_METHOD_FRAGMENT","BILLING_CART_ADDRESS_FRAGMENT","SHIPPING_CART_ADDRESS_FRAGMENT","AVAILABLE_PAYMENT_METHOD_FRAGMENT","SELECTED_PAYMENT_METHOD_FRAGMENT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,IAC9BC,CAAiC;AAAA,IACjCC,CAAgC;AAAA,EChCvBE,EAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,ECKlCC,EAA0D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkC1DC,EAA2D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAuCpET,CAAkC;AAAA,IAClCC,CAAiC;AAAA,ECrExBS,EAA0C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsBnDF,CAAyC;AAAA,IACzCC,CAA0C;AAAA,IAC1CL,CAAiC;AAAA,IACjCC,CAAgC;"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "@dropins/storefront-checkout", "version": "2.2.0-
|
|
1
|
+
{"name": "@dropins/storefront-checkout", "version": "2.2.0-alpha2", "@dropins/tools": "^1.5.0-beta2", "license": "SEE LICENSE IN LICENSE.md"}
|
|
@@ -42,8 +42,6 @@ export declare const cartFixture: {
|
|
|
42
42
|
label: string;
|
|
43
43
|
};
|
|
44
44
|
custom_attributes: ({
|
|
45
|
-
__typename?: "AttributeFile" | undefined;
|
|
46
|
-
} | {
|
|
47
45
|
__typename?: "AttributeSelectedOptions" | undefined;
|
|
48
46
|
} | {
|
|
49
47
|
__typename?: "AttributeValue" | undefined;
|
|
@@ -103,8 +101,6 @@ export declare const cartFixture: {
|
|
|
103
101
|
label: string;
|
|
104
102
|
};
|
|
105
103
|
custom_attributes: ({
|
|
106
|
-
__typename?: "AttributeFile" | undefined;
|
|
107
|
-
} | {
|
|
108
104
|
__typename?: "AttributeSelectedOptions" | undefined;
|
|
109
105
|
} | {
|
|
110
106
|
__typename?: "AttributeValue" | undefined;
|
|
@@ -149,6 +145,7 @@ export declare const cartFixture: {
|
|
|
149
145
|
__typename?: "SelectedPaymentMethod" | undefined;
|
|
150
146
|
code: string;
|
|
151
147
|
title: string;
|
|
148
|
+
purchase_order_number?: string | null | undefined;
|
|
152
149
|
} | null | undefined;
|
|
153
150
|
} | null | undefined;
|
|
154
151
|
//# sourceMappingURL=cart.d.ts.map
|