@dropins/storefront-checkout 0.1.0-alpha49 → 0.1.0-alpha50
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/errors/errors.d.ts +3 -0
- package/api/estimateShippingMethods/estimateShippingMethods.d.ts +1 -1
- package/api/estimateShippingMethods/graphql/estimateShippingMethods.graphql.d.ts +16 -16
- package/api/getCart/graphql/getCart.graphql.d.ts +16 -16
- package/api/getStoreConfig/graphql/getStoreConfig.graphql.d.ts +16 -16
- package/api/index.d.ts +0 -3
- package/api/initialize/initialize.d.ts +6 -1
- package/api/initializeCheckout/initializeCheckout.d.ts +3 -17
- package/api/setBillingAddress/graphql/setBillingAddress.graphql.d.ts +15 -15
- package/api/setBillingAddress/setBillingAddress.d.ts +2 -11
- package/api/setShippingAddress/graphql/setShippingAddress.graphql.d.ts +15 -15
- package/api/setShippingAddress/setShippingAddress.d.ts +3 -45
- package/api/utils/dispatchApiCall.d.ts +0 -16
- package/api.js +37 -1
- package/chunks/Heading.js +1 -0
- package/chunks/classes.js +1 -0
- package/chunks/fetch-graphql.js +10 -0
- package/chunks/getCart.graphql.js +7 -4
- package/chunks/getCustomer.js +2 -2
- package/chunks/placeOrder2.js +131 -0
- package/chunks/resetCustomer.js +1 -36
- package/chunks/setBillingAddress.js +5 -7
- package/chunks/setGuestEmailOnCart.js +3 -3
- package/chunks/setPaymentMethod.js +2 -2
- package/chunks/setShippingMethods.js +2 -2
- package/chunks/store-config.js +1 -0
- package/chunks/withConditionalRendering.js +1 -1
- package/components/BillToShippingAddress/BillToShippingAddress.d.ts +3 -3
- package/components/LoginForm/Email.d.ts +8 -8
- package/components/LoginForm/LoginForm.d.ts +14 -10
- package/components/LoginForm/SignIn.d.ts +3 -4
- package/components/LoginForm/SignOut.d.ts +3 -3
- package/components/PaymentMethods/PaymentMethods.d.ts +4 -3
- package/components/index.d.ts +0 -2
- package/containers/BillToShippingAddress/BillToShippingAddress.d.ts +18 -6
- package/containers/BillToShippingAddress/index.d.ts +15 -16
- package/containers/BillToShippingAddress.js +1 -1
- package/containers/ErrorBanner/ErrorBanner.d.ts +2 -2
- package/containers/ErrorBanner.js +1 -1
- package/containers/EstimateShipping.js +1 -1
- package/containers/LoginForm/LoginForm.d.ts +2 -3
- package/containers/LoginForm/index.d.ts +15 -16
- package/containers/LoginForm.js +1 -1
- package/containers/MergedCartBanner/MergedCartBanner.d.ts +2 -2
- package/containers/MergedCartBanner.js +1 -1
- package/containers/OutOfStock.js +1 -1
- package/containers/PaymentMethods.js +1 -1
- package/containers/PlaceOrder/PlaceOrder.d.ts +1 -5
- package/containers/PlaceOrder.js +1 -1
- package/containers/ServerError.js +1 -1
- package/containers/ShippingMethods/hooks/useShippingEstimateEventEmitter.d.ts +15 -15
- package/containers/ShippingMethods.js +1 -1
- package/containers/index.d.ts +0 -2
- package/data/models/address.d.ts +11 -15
- package/data/models/api.d.ts +29 -0
- package/data/models/cart.d.ts +9 -5
- package/data/models/customer.d.ts +3 -14
- package/data/models/index.d.ts +19 -17
- package/data/models/region.d.ts +15 -15
- package/data/models/store-config.d.ts +0 -3
- package/data/transforms/index.d.ts +16 -18
- package/data/transforms/transform-address.d.ts +7 -5
- package/hocs/index.d.ts +16 -15
- package/hooks/index.d.ts +16 -16
- package/hooks/useStableList/index.d.ts +2 -0
- package/hooks/useStableList/useStableList.d.ts +2 -0
- package/i18n/en_US.json.d.ts +0 -18
- package/lib/index.d.ts +16 -15
- package/lib/validation.d.ts +5 -0
- package/msw/fixtures/fragments/cart.d.ts +3 -0
- package/msw/fixtures/fragments/index.d.ts +15 -18
- package/msw/fixtures/queries/index.d.ts +0 -3
- package/package.json +1 -1
- package/render.js +4 -4
- package/signals/IsBillToShippingSignal.d.ts +16 -20
- package/signals/index.d.ts +0 -3
- package/utils/index.d.ts +0 -6
- package/utils/refetchEstimatedShippingMethods/refetchEstimatedShippingMethods.d.ts +1 -0
- package/__generated__/types.d.ts +0 -15365
- package/api/fetchAddressFormFields/fetchAddressFormFields.d.ts +0 -18
- package/api/fetchAddressFormFields/fixtures.d.ts +0 -5
- package/api/fetchAddressFormFields/graphql/fetchAddressFormFields.graphql.d.ts +0 -18
- package/api/fetchAddressFormFields/index.d.ts +0 -19
- package/api/getCountries/fixtures.d.ts +0 -6
- package/api/getCountries/getCountries.d.ts +0 -18
- package/api/getCountries/graphql/getCountries.graphql.d.ts +0 -18
- package/api/getCountries/index.d.ts +0 -18
- package/api/getRegions/fixtures.d.ts +0 -5
- package/api/getRegions/getRegions.d.ts +0 -5
- package/api/getRegions/graphql/getRegions.graphql.d.ts +0 -18
- package/api/getRegions/index.d.ts +0 -18
- package/chunks/BillToShippingAddress.js +0 -1
- package/chunks/ShippingMethods.js +0 -1
- package/chunks/fixtures.js +0 -15
- package/chunks/getMultilineValues.js +0 -43
- package/chunks/placeOrder.js +0 -131
- package/chunks/setShippingAddress.js +0 -16
- package/chunks/transform-shipping-methods.js +0 -1
- package/components/AddressForm/AddressForm.d.ts +0 -22
- package/components/AddressForm/constants.d.ts +0 -20
- package/components/AddressForm/index.d.ts +0 -23
- package/components/AddressForm/useAddressBackup.d.ts +0 -8
- package/components/AddressForm/useAddressForm.d.ts +0 -39
- package/components/AddressForm/useCheckoutAddressEventEmitter.d.ts +0 -10
- package/components/AddressForm/usePreselectedFields.d.ts +0 -9
- package/components/AddressForm/utils.d.ts +0 -13
- package/components/FieldsForm/FieldsForm.d.ts +0 -13
- package/components/FieldsForm/FieldsFormSkeleton.d.ts +0 -4
- package/components/FieldsForm/fieldFactory.d.ts +0 -9
- package/components/FieldsForm/fixtures.d.ts +0 -5
- package/components/FieldsForm/index.d.ts +0 -22
- package/components/FieldsForm/validation.d.ts +0 -18
- package/containers/BillToShippingAddress/constants.d.ts +0 -18
- package/containers/BillingForm/BillingForm.d.ts +0 -9
- package/containers/BillingForm/constants.d.ts +0 -18
- package/containers/BillingForm/index.d.ts +0 -20
- package/containers/BillingForm.d.ts +0 -3
- package/containers/BillingForm.js +0 -1
- package/containers/LoginForm/constants.d.ts +0 -18
- package/containers/ShippingForm/ShippingForm.d.ts +0 -12
- package/containers/ShippingForm/constants.d.ts +0 -18
- package/containers/ShippingForm/index.d.ts +0 -20
- package/containers/ShippingForm.d.ts +0 -3
- package/containers/ShippingForm.js +0 -1
- package/data/models/address-form-fields.d.ts +0 -52
- package/data/transforms/transform-address-form-fields.d.ts +0 -66
- package/data/transforms/transform-countries.d.ts +0 -5
- package/data/transforms/transform-regions.d.ts +0 -8
- package/hooks/useValidity/index.d.ts +0 -18
- package/hooks/useValidity/useValidity.d.ts +0 -35
- package/msw/fixtures/fragments/american-regions.d.ts +0 -4
- package/msw/fixtures/fragments/countries.d.ts +0 -4
- package/msw/fixtures/fragments/form-fields.d.ts +0 -4
- package/msw/fixtures/queries/fetch-address-form-fields.d.ts +0 -4
- package/msw/fixtures/queries/get-countries.d.ts +0 -4
- package/msw/fixtures/queries/get-regions.d.ts +0 -4
- package/signals/AddressFormFieldsSignal.d.ts +0 -7
- package/signals/CountryListSignal.d.ts +0 -7
- package/signals/RegionsSignal.d.ts +0 -12
- package/utils/autocompleteFieldCodes/autocompleteFieldCodes.d.ts +0 -34
- package/utils/autocompleteFieldCodes/index.d.ts +0 -18
- package/utils/getMultilineValues/getMultilineValues.d.ts +0 -19
- package/utils/getMultilineValues/index.d.ts +0 -18
- package/utils/parseRegionId/index.d.ts +0 -18
- package/utils/parseRegionId/parseRegionId.d.ts +0 -18
- package/utils/processFormFields/index.d.ts +0 -18
- package/utils/processFormFields/processFormFields.d.ts +0 -21
- package/utils/scrollToElement/index.d.ts +0 -18
- package/utils/scrollToElement/scrollToElement.d.ts +0 -18
- package/utils/validateForms/index.d.ts +0 -18
- package/utils/validateForms/validateForms.d.ts +0 -18
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { AddressFormElement, AddressFormType } from '../../data/models/address-form-fields';
|
|
2
|
-
import { FunctionComponent, Ref } from 'preact';
|
|
3
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
4
|
-
|
|
5
|
-
export interface FieldsFormProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
addressType: AddressFormType;
|
|
7
|
-
fields: AddressFormElement[];
|
|
8
|
-
formRef: Ref<HTMLFormElement>;
|
|
9
|
-
headingId: string;
|
|
10
|
-
name: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const FieldsForm: FunctionComponent<FieldsFormProps>;
|
|
13
|
-
//# sourceMappingURL=FieldsForm.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AddressFormElement, AddressFormType } from '../../data/models';
|
|
2
|
-
|
|
3
|
-
type FieldFactoryProps = {
|
|
4
|
-
addressType: AddressFormType;
|
|
5
|
-
element: AddressFormElement;
|
|
6
|
-
};
|
|
7
|
-
export declare const createField: ({ addressType, element }: FieldFactoryProps) => import("preact").JSX.Element | null;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=fieldFactory.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
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 './fieldFactory';
|
|
18
|
-
export * from './validation';
|
|
19
|
-
export * from './FieldsForm';
|
|
20
|
-
export * from './FieldsFormSkeleton';
|
|
21
|
-
export { FieldsForm as default } from './FieldsForm';
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AddressFormField } from '../../data/models/address-form-fields';
|
|
2
|
-
|
|
3
|
-
export type ValidityProps = {
|
|
4
|
-
accept?: string;
|
|
5
|
-
max?: string | number;
|
|
6
|
-
maxLength?: number;
|
|
7
|
-
min?: string | number;
|
|
8
|
-
minLength?: number;
|
|
9
|
-
pattern?: string;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type InputValidation = 'alphanumeric' | 'alphanumeric-w-space' | 'alphanum-with-spaces' | 'alpha' | 'url' | 'numeric' | 'email';
|
|
13
|
-
export declare const validityProps: (rules: AddressFormField['validateRules']) => ValidityProps;
|
|
14
|
-
export type Patterns = {
|
|
15
|
-
[key in InputValidation]: RegExp;
|
|
16
|
-
};
|
|
17
|
-
export declare const patterns: Patterns;
|
|
18
|
-
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 const BILL_TO_SHIPPING_KEY = "is_bill_to_shipping_address";
|
|
18
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
2
|
-
|
|
3
|
-
export interface BillingFormProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
}
|
|
5
|
-
export declare const BillingForm: {
|
|
6
|
-
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & BillingFormProps): import("preact/compat").JSX.Element;
|
|
7
|
-
displayName: string;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=BillingForm.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 const BILLING_FORM_NAME = "billing_address";
|
|
18
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
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 './BillingForm';
|
|
18
|
-
export * from './constants';
|
|
19
|
-
export { BillingForm as default } from './BillingForm';
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as g}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{o as F,p as B,q as b,m as h}from"../chunks/fixtures.js";import{A as v}from"../chunks/getMultilineValues.js";import{s as y}from"../chunks/setBillingAddress.js";import{p as C}from"../chunks/setShippingAddress.js";import{A as S}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import{c as I}from"../chunks/BillToShippingAddress.js";import{w as _}from"../chunks/withConditionalRendering.js";import{useRef as k,useMemo as L,useCallback as N,useEffect as R}from"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";/* empty css *//* empty css */const f=u=>{var p;const l=k(null),e=F.value.data,o=B.value.data,d=o==null?void 0:o.defaultBillingAddress,s=b.value.data,t=s==null?void 0:s.billingAddress,a=(p=s==null?void 0:s.shippingAddresses)==null?void 0:p[0],{checked:r,setByUser:m}=h.value,n=!r,c=L(()=>!e||!n?!1:t?!I(e,t,a):!!d,[n,e,t,a,d]),A=N(i=>y({signal:i.signal,input:{address:r?void 0:C(i.address),same_as_shipping:r}}),[r]);return R(()=>{if(!m)return;const i=new AbortController;return r||l.current.triggerSaveAddress(i.signal),()=>{i.abort()}},[r,m]),g("div",{children:g(S,{...u,addressType:v.BILLING,autoFill:c,"data-testid":"billing-form",headingId:"Checkout.BillingAddress.title",name:w,ref:l,saveAddressHandler:A,style:{display:n?"block":"none"}})})};f.displayName="BillingFormContainer";const Z=_(f),w="billing_address";export{w as BILLING_FORM_NAME,Z as BillingForm,Z as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
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 const LOGIN_FORM_NAME = "login-form";
|
|
18
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PreselectedAddressFields } from '..';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
|
|
4
|
-
export interface ShippingFormProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
onCheckoutDataUpdate?: () => Promise<void>;
|
|
6
|
-
preselectedFields?: PreselectedAddressFields;
|
|
7
|
-
}
|
|
8
|
-
export declare const ShippingForm: {
|
|
9
|
-
({ hideOnEmptyCart, hideOnVirtualCart, ...props }: import('../../hocs/withConditionalRendering').ConditionalProps & ShippingFormProps): import("preact/compat").JSX.Element;
|
|
10
|
-
displayName: string;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=ShippingForm.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 const SHIPPING_FORM_NAME = "shipping_address";
|
|
18
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
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 './constants';
|
|
18
|
-
export * from './ShippingForm';
|
|
19
|
-
export { ShippingForm as default } from './ShippingForm';
|
|
20
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import"@dropins/tools/event-bus.js";import{m as n}from"../chunks/fixtures.js";import{A as d}from"../chunks/getMultilineValues.js";import{s as a}from"../chunks/setBillingAddress.js";import{s as l,p as g}from"../chunks/setShippingAddress.js";import{A as h}from"../chunks/ShippingMethods.js";import"@dropins/tools/preact-hooks.js";import"@dropins/tools/lib.js";import{w as f}from"../chunks/withConditionalRendering.js";import{useCallback as A}from"@dropins/tools/preact-compat.js";import"@dropins/tools/signals.js";import"@dropins/tools/fetch-graphql.js";import"../chunks/transform-shipping-methods.js";import"../chunks/getCart.graphql.js";import"@dropins/tools/i18n.js";import"@dropins/tools/components.js";/* empty css *//* empty css */const S="shipping_address",p=({onCheckoutDataUpdate:o,preselectedFields:e,...t})=>{const i=n.value.checked,m=A(r=>l({signal:r.signal,address:g(r.address)}).then(()=>{if(i)return a({input:{same_as_shipping:!0}})}),[i]);return s("div",{children:s(h,{...t,addressType:d.SHIPPING,headingId:"Checkout.ShippingAddress.title",name:S,onCheckoutDataUpdate:o,preselectedFields:e,saveAddressHandler:m})})};p.displayName="ShippingFormContainer";const b=f(p);export{S as SHIPPING_FORM_NAME,b as ShippingForm,b as default};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { AttributeFrontendInputEnum, ValidationRuleEnum } from '../../__generated__/types';
|
|
2
|
-
import { PickerOption } from '@dropins/tools/types/elsie/src/components';
|
|
3
|
-
|
|
4
|
-
type AddressFormFieldRule = {
|
|
5
|
-
name: ValidationRuleEnum;
|
|
6
|
-
value: string;
|
|
7
|
-
};
|
|
8
|
-
type AddressFormField = {
|
|
9
|
-
code: string;
|
|
10
|
-
defaultValue?: string;
|
|
11
|
-
frontendInput?: AttributeFrontendInputEnum;
|
|
12
|
-
isDisabled: boolean;
|
|
13
|
-
isRequired: boolean;
|
|
14
|
-
label?: string;
|
|
15
|
-
multilineCount?: number;
|
|
16
|
-
options: PickerOption[];
|
|
17
|
-
sortOrder?: number;
|
|
18
|
-
validateRules?: AddressFormFieldRule[];
|
|
19
|
-
};
|
|
20
|
-
type FieldEvents = {
|
|
21
|
-
handleSelect?: (event: Event) => void;
|
|
22
|
-
onBlur: (event: Event) => void;
|
|
23
|
-
onChange: (event: Event) => void;
|
|
24
|
-
onInvalid: (event: Event) => void;
|
|
25
|
-
};
|
|
26
|
-
type FieldValues = {
|
|
27
|
-
error: string | string[];
|
|
28
|
-
value: string | string[];
|
|
29
|
-
};
|
|
30
|
-
type AddressFormElement = AddressFormField & FieldEvents & FieldValues;
|
|
31
|
-
declare enum AddressFormType {
|
|
32
|
-
SHIPPING = "shipping_addresses",
|
|
33
|
-
BILLING = "billing_address"
|
|
34
|
-
}
|
|
35
|
-
declare enum AddressFormFieldCode {
|
|
36
|
-
City = "city",
|
|
37
|
-
Company = "company",
|
|
38
|
-
Country = "country_id",
|
|
39
|
-
FirstName = "firstname",
|
|
40
|
-
LastName = "lastname",
|
|
41
|
-
PostCode = "postcode",
|
|
42
|
-
Region = "region",
|
|
43
|
-
RegionId = "region_id",
|
|
44
|
-
SaveInAddressBook = "save_in_address_book",
|
|
45
|
-
Street = "street",
|
|
46
|
-
Telephone = "telephone",
|
|
47
|
-
Vat = "vat_id"
|
|
48
|
-
}
|
|
49
|
-
type AddressFormValues = Record<string, string>;
|
|
50
|
-
type AddressFormErrors = Record<string, string>;
|
|
51
|
-
export { AddressFormElement, AddressFormErrors, AddressFormField, AddressFormFieldCode, AddressFormType, AddressFormValues, };
|
|
52
|
-
//# sourceMappingURL=address-form-fields.d.ts.map
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { FetchAddressFormFieldsQuery, ValidationRuleEnum } from '../../__generated__/types';
|
|
2
|
-
import { AddressFormField } from '../models';
|
|
3
|
-
|
|
4
|
-
type AttributesForm = FetchAddressFormFieldsQuery['attributesForm'];
|
|
5
|
-
declare const transformAddressFormFields: (data: ({
|
|
6
|
-
__typename?: "AttributeMetadata" | undefined;
|
|
7
|
-
frontend_input?: import('../../__generated__/types').AttributeFrontendInputEnum | null | undefined;
|
|
8
|
-
code: string;
|
|
9
|
-
label?: string | null | undefined;
|
|
10
|
-
default_value?: string | null | undefined;
|
|
11
|
-
is_required: boolean;
|
|
12
|
-
options: ({
|
|
13
|
-
__typename?: "AttributeOptionMetadata" | undefined;
|
|
14
|
-
label: string;
|
|
15
|
-
value: string;
|
|
16
|
-
is_default: boolean;
|
|
17
|
-
} | null)[];
|
|
18
|
-
} | {
|
|
19
|
-
__typename?: "CatalogAttributeMetadata" | undefined;
|
|
20
|
-
frontend_input?: import('../../__generated__/types').AttributeFrontendInputEnum | null | undefined;
|
|
21
|
-
code: string;
|
|
22
|
-
label?: string | null | undefined;
|
|
23
|
-
default_value?: string | null | undefined;
|
|
24
|
-
is_required: boolean;
|
|
25
|
-
options: ({
|
|
26
|
-
__typename?: "AttributeOptionMetadata" | undefined;
|
|
27
|
-
label: string;
|
|
28
|
-
value: string;
|
|
29
|
-
is_default: boolean;
|
|
30
|
-
} | null)[];
|
|
31
|
-
} | {
|
|
32
|
-
__typename?: "CustomerAttributeMetadata" | undefined;
|
|
33
|
-
multiline_count?: number | null | undefined;
|
|
34
|
-
sort_order?: number | null | undefined;
|
|
35
|
-
frontend_input?: import('../../__generated__/types').AttributeFrontendInputEnum | null | undefined;
|
|
36
|
-
code: string;
|
|
37
|
-
label?: string | null | undefined;
|
|
38
|
-
default_value?: string | null | undefined;
|
|
39
|
-
is_required: boolean;
|
|
40
|
-
validate_rules?: ({
|
|
41
|
-
__typename?: "ValidationRule" | undefined;
|
|
42
|
-
name?: ValidationRuleEnum | null | undefined;
|
|
43
|
-
value?: string | null | undefined;
|
|
44
|
-
} | null)[] | null | undefined;
|
|
45
|
-
options: ({
|
|
46
|
-
__typename?: "AttributeOptionMetadata" | undefined;
|
|
47
|
-
label: string;
|
|
48
|
-
value: string;
|
|
49
|
-
is_default: boolean;
|
|
50
|
-
} | null)[];
|
|
51
|
-
} | {
|
|
52
|
-
__typename?: "ReturnItemAttributeMetadata" | undefined;
|
|
53
|
-
frontend_input?: import('../../__generated__/types').AttributeFrontendInputEnum | null | undefined;
|
|
54
|
-
code: string;
|
|
55
|
-
label?: string | null | undefined;
|
|
56
|
-
default_value?: string | null | undefined;
|
|
57
|
-
is_required: boolean;
|
|
58
|
-
options: ({
|
|
59
|
-
__typename?: "AttributeOptionMetadata" | undefined;
|
|
60
|
-
label: string;
|
|
61
|
-
value: string;
|
|
62
|
-
is_default: boolean;
|
|
63
|
-
} | null)[];
|
|
64
|
-
} | null)[]) => AddressFormField[];
|
|
65
|
-
export { AttributesForm, transformAddressFormFields };
|
|
66
|
-
//# sourceMappingURL=transform-address-form-fields.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Country as CountryModel } from '../models/country';
|
|
2
|
-
import { GetCountriesQuery } from '../../__generated__/types';
|
|
3
|
-
|
|
4
|
-
export declare const transformCountries: (data: GetCountriesQuery['countries']) => CountryModel[] | undefined;
|
|
5
|
-
//# sourceMappingURL=transform-countries.d.ts.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Region as RegionModel } from '../models/region';
|
|
2
|
-
import { GetRegionsQuery } from '../../__generated__/types';
|
|
3
|
-
|
|
4
|
-
type RegionsCountry = NonNullable<GetRegionsQuery['country']>;
|
|
5
|
-
type AvailableRegions = RegionsCountry['available_regions'];
|
|
6
|
-
declare const transformRegions: (data: RegionsCountry['available_regions']) => RegionModel[] | undefined;
|
|
7
|
-
export { AvailableRegions, transformRegions };
|
|
8
|
-
//# sourceMappingURL=transform-regions.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 './useValidity';
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
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 Translations = {
|
|
18
|
-
badInput: string;
|
|
19
|
-
patternMismatch: string;
|
|
20
|
-
rangeOverflow: string;
|
|
21
|
-
rangeUnderflow: string;
|
|
22
|
-
tooLong: string;
|
|
23
|
-
tooShort: string;
|
|
24
|
-
typeMismatch: string;
|
|
25
|
-
valueMissing: string;
|
|
26
|
-
};
|
|
27
|
-
type FormElement = HTMLInputElement | HTMLSelectElement;
|
|
28
|
-
export declare const useValidity: (translations: Translations) => {
|
|
29
|
-
errors: Record<string, string>;
|
|
30
|
-
dismissError: (code: string) => void;
|
|
31
|
-
validateFormElement: (formElement: FormElement) => void;
|
|
32
|
-
resetErrors: () => void;
|
|
33
|
-
};
|
|
34
|
-
export {};
|
|
35
|
-
//# sourceMappingURL=useValidity.d.ts.map
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AddressFormType } from '../data/models';
|
|
2
|
-
import { Region as RegionModel } from '../data/models/region';
|
|
3
|
-
|
|
4
|
-
export declare const regionsSignal: import('@preact/signals-core').Signal<{
|
|
5
|
-
addressType?: AddressFormType | undefined;
|
|
6
|
-
country?: string | undefined;
|
|
7
|
-
selectedRegion?: string | undefined;
|
|
8
|
-
selectedRegionId?: string | undefined;
|
|
9
|
-
pending: boolean;
|
|
10
|
-
data?: RegionModel[] | undefined;
|
|
11
|
-
}>;
|
|
12
|
-
//# sourceMappingURL=RegionsSignal.d.ts.map
|
|
@@ -1,34 +0,0 @@
|
|
|
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 fieldCodes {
|
|
18
|
-
firstname: string;
|
|
19
|
-
lastname: string;
|
|
20
|
-
company: string;
|
|
21
|
-
country: string;
|
|
22
|
-
region: string;
|
|
23
|
-
city: string;
|
|
24
|
-
postcode: string;
|
|
25
|
-
telephone: string;
|
|
26
|
-
street: string;
|
|
27
|
-
email: string;
|
|
28
|
-
middlename: string;
|
|
29
|
-
prefix: string;
|
|
30
|
-
suffix: string;
|
|
31
|
-
}
|
|
32
|
-
declare const autocompleteFieldCodes: fieldCodes;
|
|
33
|
-
export default autocompleteFieldCodes;
|
|
34
|
-
//# sourceMappingURL=autocompleteFieldCodes.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 './autocompleteFieldCodes';
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
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
|
-
declare const getMultilineValues: (code: string, records: Record<string, string>) => string[];
|
|
18
|
-
export { getMultilineValues };
|
|
19
|
-
//# sourceMappingURL=getMultilineValues.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 './getMultilineValues';
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 './parseRegionId';
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
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 const parseRegionId: (regionId: string) => number | undefined;
|
|
18
|
-
//# sourceMappingURL=parseRegionId.d.ts.map
|