@dropins/storefront-checkout 0.1.0-alpha8 → 1.0.0-beta1
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/authenticateCustomer/authenticateCustomer.d.ts +18 -0
- package/api/authenticateCustomer/index.d.ts +18 -0
- package/api/errors/errors.d.ts +30 -0
- package/api/errors/index.d.ts +18 -0
- package/api/estimateShippingMethods/estimateShippingMethods.d.ts +13 -0
- package/api/estimateShippingMethods/fixtures.d.ts +8 -0
- package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +18 -0
- package/api/estimateShippingMethods/graphql/index.d.ts +18 -0
- package/api/estimateShippingMethods/index.d.ts +18 -0
- package/api/fetch-graphql/fetch-graphql.d.ts +25 -0
- package/api/fetch-graphql/index.d.ts +18 -0
- package/api/fragments.d.ts +19 -0
- package/api/getCart/fixtures.d.ts +12 -0
- package/api/getCart/getCart.d.ts +18 -0
- package/api/getCart/graphql/getCart.graphql.d.ts +19 -0
- package/api/getCart/graphql/index.d.ts +18 -0
- package/api/getCart/index.d.ts +18 -0
- package/api/getCustomer/fixtures.d.ts +5 -0
- package/api/getCustomer/getCustomer.d.ts +4 -0
- package/api/getCustomer/graphql/getCustomer.graphql.d.ts +18 -0
- package/api/getCustomer/graphql/index.d.ts +18 -0
- package/api/getCustomer/index.d.ts +18 -0
- package/api/getStoreConfig/getStoreConfig.d.ts +6 -0
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +18 -0
- package/api/getStoreConfig/index.d.ts +18 -0
- package/api/graphql/CartAddressFragment.graphql.d.ts +19 -0
- package/api/graphql/CheckoutDataFragment.graphql.d.ts +18 -0
- package/api/graphql/CustomerFragment.graphql.d.ts +18 -0
- package/api/index.d.ts +34 -0
- package/api/initialize/index.d.ts +18 -0
- package/api/initialize/initialize.d.ts +15 -0
- package/api/initialize/listeners.d.ts +20 -0
- package/api/initializeCheckout/index.d.ts +18 -0
- package/api/initializeCheckout/initializeCheckout.d.ts +4 -0
- package/api/isEmailAvailable/graphql/isEmailAvailable.graphql.d.ts +18 -0
- package/api/isEmailAvailable/index.d.ts +18 -0
- package/api/isEmailAvailable/isEmailAvailable.d.ts +4 -0
- package/api/resetCheckout/index.d.ts +2 -0
- package/api/resetCheckout/resetCheckout.d.ts +18 -0
- package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +18 -0
- package/api/setBillingAddress/index.d.ts +18 -0
- package/api/setBillingAddress/setBillingAddress.d.ts +4 -0
- package/api/setGuestEmailOnCart/graphql/setGuestEmailOnCart.graphql.d.ts +18 -0
- package/api/setGuestEmailOnCart/index.d.ts +18 -0
- package/api/setGuestEmailOnCart/setGuestEmailOnCart.d.ts +18 -0
- package/api/setPaymentMethod/graphql/setPaymentMethod.graphql.d.ts +18 -0
- package/api/setPaymentMethod/index.d.ts +18 -0
- package/api/setPaymentMethod/setPaymentMethod.d.ts +4 -0
- package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +18 -0
- package/api/setShippingAddress/index.d.ts +18 -0
- package/api/setShippingAddress/setShippingAddress.d.ts +4 -0
- package/api/setShippingMethods/graphql/setShippingMethodsOnCart.graphql.d.ts +18 -0
- package/api/setShippingMethods/index.d.ts +18 -0
- package/api/setShippingMethods/setShippingMethods.d.ts +18 -0
- package/api/synchronizeCheckout/index.d.ts +18 -0
- package/api/synchronizeCheckout/synchronizeCheckout.d.ts +4 -0
- package/api/utils/dispatchApiCall.d.ts +40 -0
- package/api/utils/enqueueRequest.d.ts +26 -0
- package/api/utils/filterControlledErrors.d.ts +18 -0
- package/api.d.ts +1 -0
- package/api.js +39 -2
- package/chunks/OrderError.js +3 -0
- package/chunks/ServerErrorSignal.js +3 -0
- package/chunks/classes.js +3 -0
- package/chunks/fetch-graphql.js +12 -0
- package/chunks/setBillingAddress.js +13 -0
- package/chunks/setGuestEmailOnCart.js +19 -0
- package/chunks/setPaymentMethod.js +18 -0
- package/chunks/setShippingMethods.js +18 -0
- package/chunks/store-config.js +3 -0
- package/chunks/synchronizeCheckout.js +27 -0
- package/chunks/withConditionalRendering.js +3 -0
- package/components/BillToShippingAddress/BillToShippingAddress.d.ts +9 -0
- package/components/BillToShippingAddress/BillToShippingAddressSkeleton.d.ts +4 -0
- package/components/BillToShippingAddress/index.d.ts +20 -0
- package/components/EstimateShipping/EstimateShipping.d.ts +12 -0
- package/components/EstimateShipping/EstimateShippingSkeleton.d.ts +4 -0
- package/components/EstimateShipping/index.d.ts +20 -0
- package/components/LoginForm/Email.d.ts +13 -0
- package/components/LoginForm/LoginForm.d.ts +20 -0
- package/components/LoginForm/LoginFormSkeleton.d.ts +4 -0
- package/components/LoginForm/SignIn.d.ts +8 -0
- package/components/LoginForm/SignOut.d.ts +8 -0
- package/components/LoginForm/index.d.ts +22 -0
- package/components/OutOfStock/OutOfStock.d.ts +11 -0
- package/components/OutOfStock/index.d.ts +19 -0
- package/components/PaymentMethods/PaymentMethods.d.ts +14 -0
- package/components/PaymentMethods/PaymentMethodsSkeleton.d.ts +4 -0
- package/components/PaymentMethods/index.d.ts +20 -0
- package/components/PlaceOrder/PlaceOrder.d.ts +9 -0
- package/components/PlaceOrder/PlaceOrderSkeleton.d.ts +4 -0
- package/components/PlaceOrder/index.d.ts +19 -0
- package/components/ServerError/ServerError.d.ts +10 -0
- package/components/ServerError/index.d.ts +19 -0
- package/components/ShippingMethods/ShippingMethods.d.ts +12 -0
- package/components/ShippingMethods/ShippingMethodsSkeleton.d.ts +4 -0
- package/components/ShippingMethods/index.d.ts +20 -0
- package/components/index.d.ts +25 -0
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +24 -0
- package/containers/BillToShippingAddress/index.d.ts +19 -0
- package/containers/BillToShippingAddress.d.ts +3 -0
- package/containers/BillToShippingAddress.js +3 -1
- package/containers/ErrorBanner/ErrorBanner.d.ts +5 -0
- package/containers/ErrorBanner/index.d.ts +19 -0
- package/containers/ErrorBanner.d.ts +3 -0
- package/containers/ErrorBanner.js +3 -0
- package/containers/EstimateShipping/EstimateShipping.d.ts +4 -0
- package/containers/EstimateShipping/index.d.ts +19 -0
- package/containers/EstimateShipping.d.ts +3 -0
- package/containers/EstimateShipping.js +3 -0
- package/containers/LoginForm/LoginForm.d.ts +11 -0
- package/containers/LoginForm/index.d.ts +19 -0
- package/containers/LoginForm.d.ts +3 -0
- package/containers/LoginForm.js +3 -1
- package/containers/MergedCartBanner/MergedCartBanner.d.ts +7 -0
- package/containers/MergedCartBanner/index.d.ts +19 -0
- package/containers/MergedCartBanner.d.ts +3 -0
- package/containers/MergedCartBanner.js +3 -0
- package/containers/OutOfStock/OutOfStock.d.ts +13 -0
- package/containers/OutOfStock/index.d.ts +19 -0
- package/containers/OutOfStock.d.ts +3 -0
- package/containers/OutOfStock.js +3 -0
- package/containers/PaymentMethods/PaymentMethods.d.ts +27 -0
- package/containers/PaymentMethods/defaultHandlers.d.ts +4 -0
- package/containers/PaymentMethods/index.d.ts +19 -0
- package/containers/PaymentMethods.d.ts +3 -0
- package/containers/PaymentMethods.js +3 -1
- package/containers/PlaceOrder/PlaceOrder.d.ts +16 -0
- package/containers/PlaceOrder/index.d.ts +19 -0
- package/containers/PlaceOrder.d.ts +3 -0
- package/containers/PlaceOrder.js +3 -2
- package/containers/ServerError/ServerError.d.ts +8 -0
- package/containers/ServerError/index.d.ts +19 -0
- package/containers/ServerError.d.ts +3 -0
- package/containers/ServerError.js +3 -0
- package/containers/ShippingMethods/ShippingMethods.d.ts +17 -0
- package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +19 -0
- package/containers/ShippingMethods/index.d.ts +19 -0
- package/containers/ShippingMethods.d.ts +3 -0
- package/containers/ShippingMethods.js +3 -1
- package/containers/index.d.ts +27 -0
- package/data/models/address.d.ts +21 -0
- package/data/models/api.d.ts +33 -0
- package/data/models/cart.d.ts +19 -0
- package/data/models/country.d.ts +21 -0
- package/data/models/custom-attribute.d.ts +21 -0
- package/data/models/customer.d.ts +22 -0
- package/data/models/email-availability.d.ts +18 -0
- package/data/models/index.d.ts +30 -0
- package/data/models/payment-method.d.ts +21 -0
- package/data/models/price.d.ts +21 -0
- package/data/models/region.d.ts +22 -0
- package/data/models/shipping-estimate.d.ts +17 -0
- package/data/models/shipping-method.d.ts +19 -0
- package/data/models/store-config.d.ts +30 -0
- package/data/transforms/index.d.ts +24 -0
- package/data/transforms/transform-address.d.ts +95 -0
- package/data/transforms/transform-cart.d.ts +7 -0
- package/data/transforms/transform-customer.d.ts +7 -0
- package/data/transforms/transform-email-availability.d.ts +6 -0
- package/data/transforms/transform-payment-methods.d.ts +9 -0
- package/data/transforms/transform-shipping-estimate.d.ts +5 -0
- package/data/transforms/transform-shipping-methods.d.ts +14 -0
- package/data/transforms/transform-store-config.d.ts +6 -0
- package/fragments.d.ts +1 -0
- package/fragments.js +134 -0
- package/hocs/index.d.ts +18 -0
- package/hocs/withConditionalRendering.d.ts +13 -0
- package/hooks/index.d.ts +20 -0
- package/hooks/useBreakpoint/index.d.ts +18 -0
- package/hooks/useBreakpoint/useBreakpoint.d.ts +18 -0
- package/hooks/useLockScroll/index.d.ts +18 -0
- package/hooks/useLockScroll/useLockScroll.d.ts +21 -0
- package/hooks/useStableList/index.d.ts +2 -0
- package/hooks/useStableList/useStableList.d.ts +2 -0
- package/i18n/en_US.json.d.ts +79 -0
- package/lib/fetch-error.d.ts +23 -0
- package/lib/index.d.ts +21 -0
- package/lib/network-error.d.ts +22 -0
- package/lib/state.d.ts +24 -0
- package/lib/validation.d.ts +5 -0
- package/msw/browser.d.ts +18 -0
- package/msw/fixtures/fragments/available-shipping-methods.d.ts +23 -0
- package/msw/fixtures/fragments/billing-address.d.ts +60 -0
- package/msw/fixtures/fragments/cart.d.ts +149 -0
- package/msw/fixtures/fragments/index.d.ts +21 -0
- package/msw/fixtures/fragments/shipping-address.d.ts +62 -0
- package/msw/fixtures/index.d.ts +20 -0
- package/msw/fixtures/mutations/estimate-shipping-methods.d.ts +4 -0
- package/msw/fixtures/mutations/index.d.ts +23 -0
- package/msw/fixtures/mutations/set-billing-address.d.ts +5 -0
- package/msw/fixtures/mutations/set-guest-email.d.ts +4 -0
- package/msw/fixtures/mutations/set-payment-method.d.ts +4 -0
- package/msw/fixtures/mutations/set-shipping-address.d.ts +4 -0
- package/msw/fixtures/mutations/set-shipping-methods.d.ts +4 -0
- package/msw/fixtures/queries/get-cart.d.ts +4 -0
- package/msw/fixtures/queries/get-customer-cart-stock-status.d.ts +4 -0
- package/msw/fixtures/queries/get-customer.d.ts +5 -0
- package/msw/fixtures/queries/get-stock-status.d.ts +4 -0
- package/msw/fixtures/queries/get-store-config.d.ts +4 -0
- package/msw/fixtures/queries/index.d.ts +23 -0
- package/msw/fixtures/queries/is-email-available.d.ts +4 -0
- package/msw/handlers.d.ts +4 -0
- package/msw/server.d.ts +18 -0
- package/package.json +1 -1
- package/render/Provider.d.ts +8 -0
- package/render/index.d.ts +18 -0
- package/render/render.d.ts +6 -0
- package/render.d.ts +1 -0
- package/render.js +9 -1
- package/signals/CartSignal.d.ts +7 -0
- package/signals/CustomerSignal.d.ts +7 -0
- package/signals/EstimateShippingMethodsSignal.d.ts +7 -0
- package/signals/IsBillToShippingSignal.d.ts +18 -0
- package/signals/SelectedPaymentMethodSignal.d.ts +18 -0
- package/signals/SelectedShippingMethodSignal.d.ts +4 -0
- package/signals/ServerErrorSignal.d.ts +18 -0
- package/signals/StoreConfigSignal.d.ts +7 -0
- package/signals/index.d.ts +25 -0
- package/tests/constants.d.ts +19 -0
- package/tests/integration/utils/index.d.ts +19 -0
- package/tests/integration/utils/setup.d.ts +8 -0
- package/tests/integration/utils/user-actions.d.ts +18 -0
- package/tests/mocks/svg.d.ts +20 -0
- package/tests/utils/expectError.d.ts +25 -0
- package/tests/utils/index.d.ts +19 -0
- package/tests/utils/mockEvents.d.ts +21 -0
- package/utils/convertCase/convertCase.d.ts +4 -0
- package/utils/convertCase/index.d.ts +18 -0
- package/utils/getDisplayName/getDisplayName.d.ts +4 -0
- package/utils/getDisplayName/index.d.ts +18 -0
- package/utils/index.d.ts +21 -0
- package/utils/isEmpty/index.d.ts +18 -0
- package/utils/isEmpty/isEmpty.d.ts +18 -0
- package/utils/isNullish/index.d.ts +18 -0
- package/utils/isNullish/isNullish.d.ts +18 -0
- package/utils/isUnexpectedError/index.d.ts +18 -0
- package/utils/isUnexpectedError/isUnexpectedError.d.ts +18 -0
- package/utils/shippingMethods/index.d.ts +18 -0
- package/utils/shippingMethods/isEqual.d.ts +4 -0
- package/139.js +0 -1
- package/213.js +0 -2
- package/213.js.LICENSE.txt +0 -1
- package/292.js +0 -2
- package/292.js.LICENSE.txt +0 -1
- package/350.js +0 -2
- package/350.js.LICENSE.txt +0 -1
- package/357.js +0 -1
- package/393.js +0 -2
- package/393.js.LICENSE.txt +0 -1
- package/4.js +0 -1
- package/41.js +0 -2
- package/41.js.LICENSE.txt +0 -1
- package/43.js +0 -1
- package/483.js +0 -2
- package/483.js.LICENSE.txt +0 -1
- package/494.js +0 -2
- package/494.js.LICENSE.txt +0 -1
- package/516.js +0 -1
- package/549.js +0 -2
- package/549.js.LICENSE.txt +0 -1
- package/584.js +0 -1
- package/636.js +0 -2
- package/636.js.LICENSE.txt +0 -1
- package/687.js +0 -2
- package/687.js.LICENSE.txt +0 -1
- package/693.js +0 -1
- package/731.js +0 -1
- package/802.js +0 -2
- package/802.js.LICENSE.txt +0 -1
- package/805.js +0 -2
- package/805.js.LICENSE.txt +0 -1
- package/88.js +0 -2
- package/88.js.LICENSE.txt +0 -1
- package/api.js.LICENSE.txt +0 -3
- package/containers/BillingForm.js +0 -1
- package/containers/Checkout.js +0 -2
- package/containers/Checkout.js.LICENSE.txt +0 -1
- package/containers/OrderSummary.js +0 -1
- package/containers/PlaceOrder.js.LICENSE.txt +0 -1
- package/containers/ShippingForm.js +0 -1
- package/runtime.js +0 -1
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import*as e from"@dropins/elsie/event-bus.js";import*as n from"@dropins/elsie/fetch-graphql.js";import*as t from"@dropins/elsie/preact-compat.js";import*as r from"@dropins/elsie/preact-hooks.js";import*as o from"@dropins/elsie/preact-jsx-runtime.js";import*as a from"@dropins/elsie/preact.js";export const id=57;export const ids=[57];export const modules={5386:(e,n,t)=>{t.d(n,{Z:()=>l});var r,o,a=t(3354);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},i.apply(this,arguments)}const l=function(e){return a.createElement("svg",i({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),r||(r=a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.473 4.9h12.712v6.064h6.065L23 12.715v4.897h-2.927",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),o||(o=a.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M15.176 5.876h3.826l2.037 4.888M9.762 16.79a2.294 2.294 0 0 1-2.296 2.286A2.294 2.294 0 0 1 5.18 16.78a2.286 2.286 0 0 1 2.286-2.286 2.3 2.3 0 0 1 2.296 2.286v.01ZM19.873 16.79a2.29 2.29 0 0 1-2.296 2.296 2.29 2.29 0 0 1-2.296-2.296 2.29 2.29 0 0 1 2.296-2.296 2.29 2.29 0 0 1 2.296 2.296ZM8.088 7.636h-6.39M7.112 10.362H1M5.16 13.04H1.929M9.762 16.761h5.519M2.387 16.761H5.17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})))}},1988:(e,n,t)=>{t.d(n,{t:()=>_});var r=t(5587),o=t(1892),a=t.n(o),i=t(5760),l=t.n(i),s=t(8311),c=t.n(s),d=t(8192),p=t.n(d),u=t(8060),b=t.n(u),m=t(4865),f=t.n(m),v=t(6948),y={};y.styleTagTransform=f(),y.setAttributes=p(),y.insert=c().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=b(),a()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals;var h=t(7188);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var j=["amount","currency","locale","variant","className","children","sale","formatOptions"];function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){var r,o,a;r=e,o=n,a=t[n],(o=function(e){var n=function(e,n){if("object"!==g(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(n)?n:String(n)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=function(e){var n=e.amount,t=void 0===n?0:n,o=e.currency,a=e.locale,i=void 0===a?void 0:a,l=e.variant,s=void 0===l?"default":l,c=e.className,d=(e.children,e.sale),p=void 0!==d&&d,u=e.formatOptions,b=void 0===u?{}:u,m=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,j),f=new Intl.NumberFormat(i,O({style:"currency",currency:o||"USD",minimumFractionDigits:2,maximumFractionDigits:2},b));return(0,h.jsx)("span",O(O({},m),{},{className:(0,r.S)(["elsie-price",c,"elsie-price--".concat(s),["elsie-price--sale",p]]),children:f.format(t)}))}},1690:(e,n,t)=>{t.d(n,{E:()=>_});var r=t(5587),o=t(1892),a=t.n(o),i=t(5760),l=t.n(i),s=t(8311),c=t.n(s),d=t(8192),p=t.n(d),u=t(8060),b=t.n(u),m=t(4865),f=t.n(m),v=t(1848),y={};y.styleTagTransform=f(),y.setAttributes=p(),y.insert=c().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=b(),a()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals;var h=t(7188);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}var j=["name","label","value","size","checked","disabled","error","description","className","children"];function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function O(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?x(Object(t),!0).forEach((function(n){var r,o,a;r=e,o=n,a=t[n],(o=function(e){var n=function(e,n){if("object"!==g(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===g(n)?n:String(n)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):x(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var _=function(e){var n=e.name,t=e.label,o=e.value,a=e.size,i=void 0===a?"medium":a,l=e.checked,s=void 0!==l&&l,c=e.disabled,d=void 0!==c&&c,p=e.error,u=void 0!==p&&p,b=e.description,m=void 0===b?"":b,f=e.className,v=(e.children,function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,j));return(0,h.jsxs)("label",{className:(0,r.S)([f,"elsie-radio-button",["elsie-radio-button--error",u],["elsie-radio-button--disabled",d]]),children:[(0,h.jsx)("input",O({name:n,value:o,checked:s,disabled:d,type:"radio",className:(0,r.S)(["elsie-radio-button__input",["elsie-radio-button__input--error",u],["elsie-radio-button__input--disabled",d]])},v)),(0,h.jsx)("span",{className:(0,r.S)(["elsie-radio-button__label","elsie-radio-button__label--".concat(i),["elsie-radio-button__label--error",u],["elsie-radio-button__label--disabled",d]]),children:t}),(0,h.jsx)("span",{className:(0,r.S)(["elsie-radio-button__description","elsie-radio-button__description--".concat(i),["elsie-radio-button__description--disabled",d]]),children:m})]})}},424:(e,n,t)=>{t.d(n,{u:()=>S});var r=t(5587),o=t(1892),a=t.n(o),i=t(5760),l=t.n(i),s=t(8311),c=t.n(s),d=t(8192),p=t.n(d),u=t(8060),b=t.n(u),m=t(4865),f=t.n(m),v=t(123),y={};y.styleTagTransform=f(),y.setAttributes=p(),y.insert=c().bind(null,"head"),y.domAPI=l(),y.insertStyleElement=b(),a()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals;var h=t(1072),g=t(3483),j=t(7188);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}var O=["className","icon","heading","headingLevel","message"];function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function w(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){var r,o,a;r=e,o=n,a=t[n],(o=function(e){var n=function(e,n){if("object"!==x(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===x(n)?n:String(n)}(o))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var S=function(e){var n=e.className,t=e.icon,o=e.heading,a=e.headingLevel,i=void 0===a?2:a,l=e.message,s=function(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(e,O);return(0,j.jsxs)("div",w(w({},s),{},{className:(0,r.S)(["elsie-empty-state",n]),children:[t&&(0,j.jsx)(h.J,{size:"64",className:"elsie-empty-state__icon",source:t}),o&&(0,j.jsx)(g.X,{level:i,className:"elsie-empty-state__heading",children:o}),l&&(0,j.jsx)("p",{className:"elsie-empty-state__message",children:l})]}))}},3483:(e,n,t)=>{t.d(n,{X:()=>h});var r=t(1892),o=t.n(r),a=t(5760),i=t.n(a),l=t(8311),s=t.n(l),c=t(8192),d=t.n(c),p=t(8060),u=t.n(p),b=t(4865),m=t.n(b),f=t(8695),v={};v.styleTagTransform=m(),v.setAttributes=d(),v.insert=s().bind(null,"head"),v.domAPI=i(),v.insertStyleElement=u(),o()(f.Z,v),f.Z&&f.Z.locals&&f.Z.locals;var y=t(7188),h=function(e){var n=e.className,t=e.children,r=e.level,o=void 0===r?2:r,a=o>=1&&o<=6?"h".concat(o):"h2";return(0,y.jsx)(a,{className:n,children:t})}},8539:(e,n,t)=>{t.d(n,{SG:()=>r.SG,ZP:()=>r.SG,fz:()=>r.fz,lJ:()=>r.lJ});var r=t(7805)},6948:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(4933),o=t.n(r),a=t(3476),i=t.n(a)()(o());i.push([e.id,"/* https://cssguidelin.es/#bem-like-naming */\n\n.elsie-price {\n color: var(--color-neutral-800);\n font: var(--type-body-2-emphasized-font);\n}\n\n.elsie-price--strikethrough {\n text-decoration: line-through;\n}\n\n.elsie-price--sale {\n color: var(--color-alert-800);\n}\n\n/* Medium (portrait tablets and large phones, 768px and up) */\n/* @media only screen and (min-width: 768px) { } */\n\n/* Large (landscape tablets, 1024px and up) */\n/* @media only screen and (min-width: 1024px) { } */\n\n/* XLarge (laptops/desktops, 1366px and up) */\n/* @media only screen and (min-width: 1366px) { } */\n\n/* XXlarge (large laptops and desktops, 1920px and up) */\n/* @media only screen and (min-width: 1920px) { } */\n",""]);const l=i},1848:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(4933),o=t.n(r),a=t(3476),i=t.n(a)()(o());i.push([e.id,"/* https://cssguidelin.es/#bem-like-naming */\n\n.elsie-radio-button {\n display: block;\n position: relative;\n}\n.elsie-radio-button__input {\n position: fixed;\n opacity: 0;\n pointer-events: none;\n margin: 0;\n}\n\n.elsie-radio-button__label {\n color: var(--color-neutral-800);\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n cursor: pointer;\n width: fit-content\n}\n\n.elsie-radio-button__label:before {\n content: ' ';\n display: inline-block;\n position: relative;\n width: 16px;\n height: 16px;\n border-radius: var(--shape-border-radius-3);\n background-color: var(--color-neutral-50);\n border: var(--shape-border-width-1) solid var(--color-neutral-600);\n margin-right: var(--spacing-small);\n vertical-align: middle;\n}\n\n.elsie-radio-button__label:hover::before {\n border: var(--shape-border-width-1) solid var(--color-neutral-700);\n}\n\n.elsie-radio-button__input:checked + .elsie-radio-button__label:after {\n content: ' ';\n display: block;\n position: absolute;\n width: 8px;\n height: 8px;\n border-radius: var(--shape-border-radius-3);\n margin-left: calc(var(--spacing-xxsmall) + var(--shape-border-width-1));\n background: var(--color-brand-500);\n accent-color: var(--color-brand-500);\n}\n\n.elsie-radio-button__input:focus-visible + .elsie-radio-button__label:before {\n border: var(--shape-border-width-1) solid var(--color-neutral-800);\n box-shadow: 0 0 0 var(--shape-icon-stroke-4) var(--color-neutral-400);\n}\n\n.elsie-radio-button__description {\n clear: both;\n color: var(--color-neutral-700);\n margin-left: calc(var(--spacing-big) + var(--shape-border-width-3));\n margin-top: var(--spacing-xxsmall);\n}\n\n.elsie-radio-button__description:empty {\n display: none;\n}\n\n/* Sizes */\n.elsie-radio-button__label--medium {\n font: var(--type-body-2-default-font);\n letter-spacing: var(--type-body-2-default-letter-spacing);\n}\n\n.elsie-radio-button__label--large {\n font: var(--type-body-1-default-font);\n letter-spacing: var(--type-body-1-default-letter-spacing);\n}\n\n.elsie-radio-button__description--medium {\n font: var(--type-details-caption-2-font);\n letter-spacing: var(--type-details-caption-2-letter-spacing);\n}\n\n.elsie-radio-button__description--large {\n font: var(--type-body-2-default-font);\n letter-spacing: var(--type-body-2-default-letter-spacing);\n}\n\n/* Disabled */\n.elsie-radio-button__input--disabled,\n.elsie-radio-button__label--disabled,\n.elsie-radio-button__description--disabled {\n color: var(--color-neutral-500);\n cursor: default;\n}\n\n/* By adding \"div.\" ↓ before the class, we add priority to the disabled state against the error state. */\ndiv.elsie-radio-button__label--disabled:before {\n box-shadow: 0 0 0 var(--shape-border-width-1) var(--color-neutral-500);\n background-color: var(--color-neutral-300);\n}\n\n/* Error */\n.elsie-radio-button__label--error:before {\n box-shadow: 0 0 0 var(--shape-border-width-2) var(--color-alert-500);\n background: var(--color-neutral-50) 0 0% no-repeat padding-box;\n}\n\n.elsie-radio-button__input--error:checked\n + .elsie-radio-button__label--error:after {\n background: var(--color-alert-500);\n}\n\n/* Medium (portrait tablets and large phones, 768px and up) */\n/* @media only screen and (min-width: 768px) { } */\n\n/* Large (landscape tablets, 1024px and up) */\n/* @media only screen and (min-width: 1024px) { } */\n\n/* XLarge (laptops/desktops, 1366px and up) */\n/* @media only screen and (min-width: 1366px) { } */\n\n/* XXlarge (large laptops and desktops, 1920px and up) */\n/* @media only screen and (min-width: 1920px) { } */\n",""]);const l=i},123:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(4933),o=t.n(r),a=t(3476),i=t.n(a)()(o());i.push([e.id,".elsie-empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n row-gap: var(--spacing-small);\n}\n\n.elsie-empty-state__icon {\n color: var(--color-neutral-400);\n}\n\n.elsie-empty-state__heading {\n color: var(--color-neutral-800);\n font: var(--type-headline-2-strong-font);\n letter-spacing: var(--type-headline-2-strong-letter-spacing);\n margin: 0;\n}\n\n.elsie-empty-state__message {\n color: var(--color-neutral-800);\n font: var(--type-body-2-default-font);\n letter-spacing: var(--type-body-2-default-letter-spacing);\n text-align: center;\n margin: 0;\n max-width: 400px; /* ~80 characters line length*/\n}\n",""]);const l=i},8695:(e,n,t)=>{t.d(n,{Z:()=>l});var r=t(4933),o=t.n(r),a=t(3476),i=t.n(a)()(o());i.push([e.id,"/* https://cssguidelin.es/#bem-like-naming */\n\n/* .elsie-heading { } */\n\n/* Extra small devices (phones, 600px and down) */\n/* @media only screen and (max-width: 600px) { } */\n\n/* Small devices (portrait tablets and large phones, 600px and up) */\n/* @media only screen and (min-width: 600px) { } */\n\n/* Medium devices (landscape tablets, 768px and up) */\n/* @media only screen and (min-width: 768px) { } */\n\n/* Large devices (laptops/desktops, 992px and up) */\n/* @media only screen and (min-width: 992px) { } */\n\n/* Extra large devices (large laptops and desktops, 1200px and up) */\n/* @media only screen and (min-width: 1200px) { } */\n",""]);const l=i},6765:(n,t,r)=>{var o,a;n.exports=(o={events:()=>e.events},a={},r.d(a,o),a)},9699:(e,t,r)=>{var o,a;e.exports=(o={FetchGraphQL:()=>n.FetchGraphQL},a={},r.d(a,o),a)},4853:(e,n,r)=>{var o,a;e.exports=(o={forwardRef:()=>t.forwardRef,useCallback:()=>t.useCallback,useEffect:()=>t.useEffect,useImperativeHandle:()=>t.useImperativeHandle,useMemo:()=>t.useMemo,useRef:()=>t.useRef,useState:()=>t.useState},a={},r.d(a,o),a)},5437:(e,n,t)=>{var o,a;e.exports=(o={useCallback:()=>r.useCallback,useContext:()=>r.useContext,useDebugValue:()=>r.useDebugValue,useEffect:()=>r.useEffect,useId:()=>r.useId,useImperativeHandle:()=>r.useImperativeHandle,useLayoutEffect:()=>r.useLayoutEffect,useMemo:()=>r.useMemo,useReducer:()=>r.useReducer,useRef:()=>r.useRef,useState:()=>r.useState},a={},t.d(a,o),a)},4142:(e,n,t)=>{var r,a;e.exports=(r={Fragment:()=>o.Fragment,jsx:()=>o.jsx,jsxs:()=>o.jsxs},a={},t.d(a,r),a)},3474:(e,n,t)=>{var r,o;e.exports=(r={Component:()=>a.Component,Fragment:()=>a.Fragment,cloneElement:()=>a.cloneElement,createContext:()=>a.createContext,createElement:()=>a.createElement,createRef:()=>a.createRef,h:()=>a.h,hydrate:()=>a.hydrate,isValidElement:()=>a.isValidElement,options:()=>a.options,render:()=>a.render,toChildArray:()=>a.toChildArray},o={},t.d(o,r),o)}};import i from"../runtime.js";import*as l from"../4.js";i.C(l);import*as s from"../516.js";i.C(s);import*as c from"../584.js";i.C(c);import*as d from"../292.js";i.C(d);import*as p from"../483.js";i.C(p);import*as u from"../549.js";i.C(u);import*as b from"../805.js";i.C(b);import*as m from"./ShippingMethods.js";i.C(m);var f=(8539,i(i.s=8539)),v=f.SG,y=f.fz,h=f.ZP,g=f.lJ;export{v as ShippingMethods,y as buildShippingMethod,h as default,g as getShippingMethodValue};
|
|
1
|
+
/*! Copyright 2024 Adobe
|
|
2
|
+
All Rights Reserved. */
|
|
3
|
+
import{jsx as n,jsxs as v,Fragment as T}from"@dropins/tools/preact-jsx-runtime.js";import"../chunks/fetch-graphql.js";import{s as k,e as S,c as W}from"../chunks/store-config.js";import"../chunks/ServerErrorSignal.js";import{events as H}from"@dropins/tools/event-bus.js";import{classes as x,Slot as z}from"@dropins/tools/lib.js";import{s as B}from"../chunks/setShippingMethods.js";/* empty css */import{IllustratedMessage as R,Icon as V,ProgressSpinner as A,RadioButton as O,Price as P,Skeleton as D,SkeletonRow as L}from"@dropins/tools/components.js";import*as u from"@dropins/tools/preact-compat.js";import{useCallback as Z,useMemo as $,useEffect as q}from"@dropins/tools/preact-compat.js";import{useText as F}from"@dropins/tools/i18n.js";import{useState as N,useEffect as _}from"@dropins/tools/preact-hooks.js";import{w as G}from"../chunks/withConditionalRendering.js";import"@dropins/tools/fetch-graphql.js";import"@dropins/tools/signals.js";import"../chunks/synchronizeCheckout.js";import"../fragments.js";const J=e=>({countryCode:e.country_id,postCode:e.postcode||"",...e.region_id?{regionId:Number(e.region_id)}:{...e.region?{region:e.region}:{}}}),K=e=>({carrierCode:e.carrier.code||"",methodCode:e.code||"",amount:e.amount,amountExclTax:e.amountExclTax,amountInclTax:e.amountInclTax}),Q=e=>u.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.47266 4.90002H15.1851V10.9645H21.2495L23 12.715V17.6124H20.073",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M15.1758 5.87573H19.0019L21.0394 10.7636",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76151 16.7898C9.76151 18.0525 8.72845 19.076 7.46582 19.076C6.20318 19.076 5.17969 18.0429 5.17969 16.7803C5.17969 15.5176 6.20318 14.4941 7.46582 14.4941C8.72845 14.4941 9.75195 15.5176 9.76151 16.7803C9.76151 16.7803 9.76151 16.7803 9.76151 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M19.8726 16.7898C19.8726 18.062 18.8491 19.0855 17.5769 19.0855C16.3047 19.0855 15.2812 18.062 15.2812 16.7898C15.2812 15.5176 16.3047 14.4941 17.5769 14.4941C18.8491 14.4941 19.8726 15.5176 19.8726 16.7898Z",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M8.08792 7.63574H1.69824",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M7.11229 10.3619H1",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M5.16084 13.0402H1.92773",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M9.76172 16.7611H15.2809",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"}),u.createElement("path",{vectorEffect:"non-scaling-stroke",d:"M2.38672 16.7611H5.17025",stroke:"currentColor",strokeWidth:1,strokeLinecap:"round",strokeLinejoin:"round"})),U=({className:e,isLoading:t=!1,onSelectionChange:s=()=>{},options:c,selection:l,...p})=>{const i=F({Title:"Checkout.ShippingMethods.title",EmptyState:"Checkout.ShippingMethods.emptyState"});return c===void 0?n(X,{}):v("div",{...p,className:x(["checkout-shipping-methods",e]),children:[n("h3",{className:"checkout-shipping-methods__title",children:i.Title}),!t&&c.length===0&&n(R,{icon:n(V,{source:Q}),message:n("p",{children:i.EmptyState})}),v("div",{className:x(["checkout-shipping-methods__content"]),children:[t&&n(A,{className:"checkout-shipping-methods__spinner"}),n("div",{className:x(["checkout-shipping-methods__options",["checkout-shipping-methods__options--loading",t]]),children:c.map(o=>n(O,{"data-testid":"shipping-method-radiobutton","aria-busy":t,id:o.value,name:"shipping-method",className:"checkout-shipping-methods__method",label:v(T,{children:[n(P,{amount:o.amount.value,currency:o.amount.currency})," ",n("span",{children:o.carrier.title})]}),description:o.title,value:o.value,checked:(l==null?void 0:l.value)===o.value,onChange:()=>s(o)},o.value))})]})]})},X=()=>v(D,{"data-testid":"shipping-methods-skeleton",children:[n(L,{variant:"heading",size:"small"}),n(L,{variant:"empty",size:"small"}),n(L,{size:"medium",fullWidth:!0}),n(L,{size:"medium",fullWidth:!0})]});function Y(){var a;const[e,t]=N(),[s,c]=N();_(()=>{H.on("checkout/estimate-shipping-address",({address:E,isValid:M})=>{t({address:E,isValid:M})})},[]),_(()=>{c(k.value)},[k.value]),_(()=>{S.value.pending?c(void 0):c(k.value)},[S.value.pending]);const{country_id:l,region_id:p,region:i,postcode:o}=(e==null?void 0:e.address)||{},r=!!e,g=W.value.data,C=!!((a=g==null?void 0:g.shippingAddresses)!=null&&a[0]),d=e==null?void 0:e.isValid;_(()=>{C||d||!s||!r||H.emit("shipping/estimate",{address:J({country_id:l,region_id:p,region:i,postcode:o}),shippingMethod:K(s)})},[s,l,p,i,o,r,C,d])}const j=(e,t)=>e.code===t.code&&e.carrier.code===t.carrier.code;function ee({preSelectedMethod:e,onShippingMethodSelect:t}){const s=W.value.data,c=W.value.pending,l=S.value.data,p=S.value.pending,i=k.value,o=s==null?void 0:s.shippingAddresses,r=o==null?void 0:o[0],g=!!r,C=r==null?void 0:r.availableShippingMethods,d=r==null?void 0:r.selectedShippingMethod,a=C||l,E=Z(m=>{if(!g)return;const f={method_code:m.code,carrier_code:m.carrier.code};B([f]).catch(b=>{console.error("Setting shipping methods on cart failed:",b)})},[g]),M=m=>{k.value=m,t==null||t(m)},h=$(()=>{if(!(a!=null&&a.length))return;const m=a[0],f=i||d;return f?a.some(w=>j(w,f))?f:m:a.find(y=>y.carrier.code===(e==null?void 0:e.carrierCode)&&y.code===(e==null?void 0:e.methodCode))||m},[i,d,a,e]);return q(()=>{h&&((!i||!j(h,i))&&(k.value=h,t==null||t(h)),(!d||!j(h,d))&&E(h))},[h,i,d,E,t]),{isLoading:c||p,options:a,selection:h,onSelectionChange:M}}const I=({preSelectedMethod:e,shippingMethodsSlot:t,onShippingMethodSelect:s,initialData:c,...l})=>{const{isLoading:p,options:i,selection:o,onSelectionChange:r}=ee({preSelectedMethod:e,onShippingMethodSelect:s});return Y(),v(T,{children:[n(U,{...l,isLoading:p,onSelectionChange:r,options:i,selection:o}),!p&&t&&n(z,{name:"ShippingMethods",slot:t})]})};I.displayName="ShippingMethodsContainer";const ve=G(I);export{ve as ShippingMethods,ve as default};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './BillToShippingAddress';
|
|
18
|
+
export * from './ErrorBanner';
|
|
19
|
+
export * from './EstimateShipping';
|
|
20
|
+
export * from './LoginForm';
|
|
21
|
+
export * from './MergedCartBanner';
|
|
22
|
+
export * from './OutOfStock';
|
|
23
|
+
export * from './PaymentMethods';
|
|
24
|
+
export * from './PlaceOrder';
|
|
25
|
+
export * from './ServerError';
|
|
26
|
+
export * from './ShippingMethods';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Region, Country, CustomAttribute } from '.';
|
|
2
|
+
|
|
3
|
+
export interface Address {
|
|
4
|
+
id?: number;
|
|
5
|
+
city: string;
|
|
6
|
+
company?: string;
|
|
7
|
+
country: Country;
|
|
8
|
+
customAttributes: CustomAttribute[];
|
|
9
|
+
firstName: string;
|
|
10
|
+
lastName: string;
|
|
11
|
+
postCode?: string;
|
|
12
|
+
region?: Region;
|
|
13
|
+
street: string[];
|
|
14
|
+
telephone?: string;
|
|
15
|
+
vatId?: string;
|
|
16
|
+
prefix?: string;
|
|
17
|
+
suffix?: string;
|
|
18
|
+
middleName?: string;
|
|
19
|
+
fax?: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=address.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { CustomAttribute } from './custom-attribute';
|
|
2
|
+
|
|
3
|
+
export interface CartAddress {
|
|
4
|
+
city: string;
|
|
5
|
+
company?: string;
|
|
6
|
+
countryCode: string;
|
|
7
|
+
customAttributes: CustomAttribute[];
|
|
8
|
+
firstName: string;
|
|
9
|
+
lastName: string;
|
|
10
|
+
postcode?: string;
|
|
11
|
+
region?: string;
|
|
12
|
+
regionId?: number;
|
|
13
|
+
saveInAddressBook?: boolean;
|
|
14
|
+
street: string[];
|
|
15
|
+
telephone?: string;
|
|
16
|
+
vatId?: string;
|
|
17
|
+
prefix?: string;
|
|
18
|
+
suffix?: string;
|
|
19
|
+
middleName?: string;
|
|
20
|
+
fax?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ShippingAddressInput {
|
|
23
|
+
address?: CartAddress;
|
|
24
|
+
customerAddressId?: number;
|
|
25
|
+
pickupLocationCode?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface BillingAddressInput {
|
|
28
|
+
address?: CartAddress;
|
|
29
|
+
customerAddressId?: number;
|
|
30
|
+
sameAsShipping?: boolean;
|
|
31
|
+
useForShipping?: boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Address, PaymentMethod, ShippingMethod } from '.';
|
|
2
|
+
|
|
3
|
+
export interface ShippingAddress extends Address {
|
|
4
|
+
availableShippingMethods?: ShippingMethod[];
|
|
5
|
+
selectedShippingMethod?: ShippingMethod;
|
|
6
|
+
sameAsBilling?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Cart {
|
|
9
|
+
availablePaymentMethods?: PaymentMethod[];
|
|
10
|
+
billingAddress?: Address;
|
|
11
|
+
email?: string;
|
|
12
|
+
id: string;
|
|
13
|
+
isEmpty: boolean;
|
|
14
|
+
isGuest: boolean;
|
|
15
|
+
isVirtual: boolean;
|
|
16
|
+
selectedPaymentMethod?: PaymentMethod;
|
|
17
|
+
shippingAddresses?: ShippingAddress[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=cart.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type Country = {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=country.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type CustomAttribute = {
|
|
18
|
+
code: string;
|
|
19
|
+
value: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=custom-attribute.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export interface Customer {
|
|
18
|
+
firstName: string;
|
|
19
|
+
lastName: string;
|
|
20
|
+
email: string;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=customer.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type EmailAvailability = boolean;
|
|
18
|
+
//# sourceMappingURL=email-availability.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './address';
|
|
18
|
+
export * from './api';
|
|
19
|
+
export * from './cart';
|
|
20
|
+
export * from './country';
|
|
21
|
+
export * from './custom-attribute';
|
|
22
|
+
export * from './customer';
|
|
23
|
+
export * from './email-availability';
|
|
24
|
+
export * from './payment-method';
|
|
25
|
+
export * from './price';
|
|
26
|
+
export * from './region';
|
|
27
|
+
export * from './shipping-estimate';
|
|
28
|
+
export * from './shipping-method';
|
|
29
|
+
export * from './store-config';
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type PaymentMethod = {
|
|
18
|
+
code: string;
|
|
19
|
+
title: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=payment-method.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type Price = {
|
|
18
|
+
value: number;
|
|
19
|
+
currency: string;
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=price.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export type Region = {
|
|
18
|
+
code: string;
|
|
19
|
+
id?: number;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=region.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Price } from './price';
|
|
2
|
+
|
|
3
|
+
export interface ShippingEstimatePartialAddress {
|
|
4
|
+
countryCode: string;
|
|
5
|
+
postCode?: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
regionCode?: string;
|
|
8
|
+
regionId?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface ShippingEstimateShippingMethod {
|
|
11
|
+
amount: Price;
|
|
12
|
+
carrierCode: string;
|
|
13
|
+
methodCode: string;
|
|
14
|
+
amountExclTax?: Price;
|
|
15
|
+
amountInclTax?: Price;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=shipping-estimate.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Price } from './price';
|
|
2
|
+
|
|
3
|
+
type Code = string;
|
|
4
|
+
type Title = string;
|
|
5
|
+
type Carrier = {
|
|
6
|
+
code: Code;
|
|
7
|
+
title: Title;
|
|
8
|
+
};
|
|
9
|
+
export type ShippingMethod = {
|
|
10
|
+
amount: Price;
|
|
11
|
+
carrier: Carrier;
|
|
12
|
+
code: Code;
|
|
13
|
+
title: Title;
|
|
14
|
+
value: string;
|
|
15
|
+
amountExclTax?: Price;
|
|
16
|
+
amountInclTax?: Price;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=shipping-method.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export declare enum TaxDisplay {
|
|
18
|
+
EXCLUDING_TAX = "EXCLUDING_TAX",
|
|
19
|
+
INCLUDING_EXCLUDING_TAX = "INCLUDING_AND_EXCLUDING_TAX",
|
|
20
|
+
INCLUDING_TAX = "INCLUDING_TAX"
|
|
21
|
+
}
|
|
22
|
+
export interface StoreConfig {
|
|
23
|
+
defaultCountry: string;
|
|
24
|
+
isGuestCheckoutEnabled: boolean;
|
|
25
|
+
isOnePageCheckoutEnabled: boolean;
|
|
26
|
+
shoppingCartDisplaySetting: {
|
|
27
|
+
shipping: TaxDisplay;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=store-config.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* ADOBE CONFIDENTIAL
|
|
3
|
+
* __________________
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2024 Adobe
|
|
6
|
+
* All Rights Reserved.
|
|
7
|
+
*
|
|
8
|
+
* NOTICE: All information contained herein is, and remains
|
|
9
|
+
* the property of Adobe and its suppliers, if any. The intellectual
|
|
10
|
+
* and technical concepts contained herein are proprietary to Adobe
|
|
11
|
+
* and its suppliers and are protected by all applicable intellectual
|
|
12
|
+
* property laws, including trade secret and copyright laws.
|
|
13
|
+
* Dissemination of this information or reproduction of this material
|
|
14
|
+
* is strictly forbidden unless prior written permission is obtained
|
|
15
|
+
* from Adobe.
|
|
16
|
+
*******************************************************************/
|
|
17
|
+
export * from './transform-address';
|
|
18
|
+
export * from './transform-cart';
|
|
19
|
+
export * from './transform-customer';
|
|
20
|
+
export * from './transform-email-availability';
|
|
21
|
+
export * from './transform-shipping-estimate';
|
|
22
|
+
export * from './transform-shipping-methods';
|
|
23
|
+
export * from './transform-store-config';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { CartAddressInput, GetCartQuery } from '../../__generated__/types';
|
|
2
|
+
import { Address as AddressModel, CustomAttribute as CustomAttributeModel, ShippingAddress as ShippingAddressModel, CartAddress as CartAddressModel } from '../models';
|
|
3
|
+
|
|
4
|
+
type ShippingAddresses = NonNullable<GetCartQuery['cart']>['shipping_addresses'];
|
|
5
|
+
type ShippingAddress = ShippingAddresses[0];
|
|
6
|
+
type NonNullableShippingAddress = NonNullable<ShippingAddress>;
|
|
7
|
+
type BillingAddress = NonNullable<GetCartQuery['cart']>['billing_address'];
|
|
8
|
+
type NonNullableBillingAddress = NonNullable<BillingAddress>;
|
|
9
|
+
type CustomAttributes = NonNullableShippingAddress['custom_attributes'] | NonNullableBillingAddress['custom_attributes'];
|
|
10
|
+
export declare const transformCustomAttributes: (data: CustomAttributes) => CustomAttributeModel[];
|
|
11
|
+
declare const transformBillingAddress: (data: BillingAddress) => AddressModel | undefined;
|
|
12
|
+
declare const transformShippingAddresses: (data: ({
|
|
13
|
+
__typename?: "ShippingCartAddress" | undefined;
|
|
14
|
+
id?: number | null | undefined;
|
|
15
|
+
firstname: string;
|
|
16
|
+
lastname: string;
|
|
17
|
+
company?: string | null | undefined;
|
|
18
|
+
street: (string | null)[];
|
|
19
|
+
city: string;
|
|
20
|
+
postcode?: string | null | undefined;
|
|
21
|
+
vat_id?: string | null | undefined;
|
|
22
|
+
telephone?: string | null | undefined;
|
|
23
|
+
same_as_billing: boolean;
|
|
24
|
+
prefix?: string | null | undefined;
|
|
25
|
+
suffix?: string | null | undefined;
|
|
26
|
+
middlename?: string | null | undefined;
|
|
27
|
+
fax?: string | null | undefined;
|
|
28
|
+
region?: {
|
|
29
|
+
__typename?: "CartAddressRegion" | undefined;
|
|
30
|
+
region_id?: number | null | undefined;
|
|
31
|
+
code?: string | null | undefined;
|
|
32
|
+
label?: string | null | undefined;
|
|
33
|
+
} | null | undefined;
|
|
34
|
+
country: {
|
|
35
|
+
__typename?: "CartAddressCountry" | undefined;
|
|
36
|
+
code: string;
|
|
37
|
+
label: string;
|
|
38
|
+
};
|
|
39
|
+
custom_attributes: ({
|
|
40
|
+
__typename?: "AttributeSelectedOptions" | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
__typename?: "AttributeValue" | undefined;
|
|
43
|
+
code: string;
|
|
44
|
+
value: string;
|
|
45
|
+
} | null)[];
|
|
46
|
+
available_shipping_methods?: ({
|
|
47
|
+
__typename?: "AvailableShippingMethod" | undefined;
|
|
48
|
+
available: boolean;
|
|
49
|
+
carrier_code: string;
|
|
50
|
+
carrier_title: string;
|
|
51
|
+
error_message?: string | null | undefined;
|
|
52
|
+
method_code?: string | null | undefined;
|
|
53
|
+
method_title?: string | null | undefined;
|
|
54
|
+
amount: {
|
|
55
|
+
__typename?: "Money" | undefined;
|
|
56
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
57
|
+
value?: number | null | undefined;
|
|
58
|
+
};
|
|
59
|
+
price_excl_tax: {
|
|
60
|
+
__typename?: "Money" | undefined;
|
|
61
|
+
value?: number | null | undefined;
|
|
62
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
63
|
+
};
|
|
64
|
+
price_incl_tax: {
|
|
65
|
+
__typename?: "Money" | undefined;
|
|
66
|
+
value?: number | null | undefined;
|
|
67
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
68
|
+
};
|
|
69
|
+
} | null)[] | null | undefined;
|
|
70
|
+
selected_shipping_method?: {
|
|
71
|
+
__typename?: "SelectedShippingMethod" | undefined;
|
|
72
|
+
carrier_code: string;
|
|
73
|
+
carrier_title: string;
|
|
74
|
+
method_code: string;
|
|
75
|
+
method_title: string;
|
|
76
|
+
amount: {
|
|
77
|
+
__typename?: "Money" | undefined;
|
|
78
|
+
value?: number | null | undefined;
|
|
79
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
80
|
+
};
|
|
81
|
+
price_excl_tax: {
|
|
82
|
+
__typename?: "Money" | undefined;
|
|
83
|
+
value?: number | null | undefined;
|
|
84
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
85
|
+
};
|
|
86
|
+
price_incl_tax: {
|
|
87
|
+
__typename?: "Money" | undefined;
|
|
88
|
+
value?: number | null | undefined;
|
|
89
|
+
currency?: import('../../__generated__/types').CurrencyEnum | null | undefined;
|
|
90
|
+
};
|
|
91
|
+
} | null | undefined;
|
|
92
|
+
} | null)[]) => ShippingAddressModel[] | undefined;
|
|
93
|
+
declare const transformCartAddressModelToInput: (address: CartAddressModel) => CartAddressInput;
|
|
94
|
+
export { BillingAddress, ShippingAddress, transformCartAddressModelToInput, transformBillingAddress, transformShippingAddresses, };
|
|
95
|
+
//# sourceMappingURL=transform-address.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetCartQuery } from '../../__generated__/types';
|
|
2
|
+
import { Cart as CartModel } from '../models';
|
|
3
|
+
|
|
4
|
+
type Cart = NonNullable<GetCartQuery['cart']>;
|
|
5
|
+
declare const transformCart: (data: Cart) => CartModel | undefined;
|
|
6
|
+
export { Cart, transformCart };
|
|
7
|
+
//# sourceMappingURL=transform-cart.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Customer as CustomerModel } from '../models';
|
|
2
|
+
import { GetCustomerQuery } from '../../__generated__/types';
|
|
3
|
+
|
|
4
|
+
type Customer = GetCustomerQuery['customer'];
|
|
5
|
+
declare const transformCustomer: (data: Customer) => CustomerModel | undefined;
|
|
6
|
+
export { Customer, transformCustomer };
|
|
7
|
+
//# sourceMappingURL=transform-customer.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IsEmailAvailableQuery } from '../../__generated__/types';
|
|
2
|
+
import { EmailAvailability } from '../models';
|
|
3
|
+
|
|
4
|
+
declare const transformEmailAvailability: (data: IsEmailAvailableQuery['isEmailAvailable']) => EmailAvailability;
|
|
5
|
+
export { transformEmailAvailability };
|
|
6
|
+
//# sourceMappingURL=transform-email-availability.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetCartQuery } from '../../__generated__/types';
|
|
2
|
+
import { PaymentMethod } from '../models/payment-method';
|
|
3
|
+
|
|
4
|
+
type SelectedPaymentMethod = NonNullable<GetCartQuery['cart']>['selected_payment_method'];
|
|
5
|
+
type AvailablePaymentMethods = NonNullable<GetCartQuery['cart']>['available_payment_methods'];
|
|
6
|
+
declare const transformSelectedPaymentMethod: (data: SelectedPaymentMethod) => PaymentMethod | undefined;
|
|
7
|
+
declare const transformAvailablePaymentMethods: (data: AvailablePaymentMethods) => PaymentMethod[] | undefined;
|
|
8
|
+
export { transformAvailablePaymentMethods, transformSelectedPaymentMethod };
|
|
9
|
+
//# sourceMappingURL=transform-payment-methods.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ShippingEstimatePartialAddress, ShippingEstimateShippingMethod, ShippingMethod } from '../models';
|
|
2
|
+
|
|
3
|
+
export declare const transformShippingEstimatePartialAddress: (data: Record<string, string>) => ShippingEstimatePartialAddress;
|
|
4
|
+
export declare const transformShippingEstimateShippingMethod: (data: ShippingMethod) => ShippingEstimateShippingMethod;
|
|
5
|
+
//# sourceMappingURL=transform-shipping-estimate.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GetCartQuery } from '../../__generated__/types';
|
|
2
|
+
import { ShippingMethod } from '../models/shipping-method';
|
|
3
|
+
|
|
4
|
+
type Cart = NonNullable<GetCartQuery['cart']>;
|
|
5
|
+
type ShippingAddresses = Cart['shipping_addresses'];
|
|
6
|
+
type ShippingAddress = NonNullable<NonNullable<ShippingAddresses>[number]>;
|
|
7
|
+
type AvailableShippingMethods = ShippingAddress['available_shipping_methods'];
|
|
8
|
+
type AvailableShippingMethod = NonNullable<AvailableShippingMethods>[number];
|
|
9
|
+
type SelectedShippingMethod = ShippingAddress['selected_shipping_method'];
|
|
10
|
+
export declare const transformSelectedShippingMethod: (data: SelectedShippingMethod) => ShippingMethod | undefined;
|
|
11
|
+
export declare const transformAvailableShippingMethod: (data: AvailableShippingMethod) => ShippingMethod | undefined;
|
|
12
|
+
export declare const transformShippingMethods: (data: AvailableShippingMethods) => ShippingMethod[] | undefined;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=transform-shipping-methods.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GetStoreConfigQuery } from '../../__generated__/types';
|
|
2
|
+
import { StoreConfig, TaxDisplay } from '../models';
|
|
3
|
+
|
|
4
|
+
export declare function transformTaxDisplay(data: number | null | undefined): TaxDisplay;
|
|
5
|
+
export declare function transformStoreConfig(data: GetStoreConfigQuery['storeConfig']): StoreConfig;
|
|
6
|
+
//# sourceMappingURL=transform-store-config.d.ts.map
|
package/fragments.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api/fragments'
|