@weareconceptstudio/account 2.1.5 → 2.1.6
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/dist/AccountProvider.d.ts.map +1 -1
- package/dist/AccountProvider.js +18 -8
- package/dist/AccountProvider.js.map +1 -1
- package/dist/components/Sequence/index.d.ts +2 -1
- package/dist/components/Sequence/index.d.ts.map +1 -1
- package/dist/components/Sequence/index.js +42 -5
- package/dist/components/Sequence/index.js.map +1 -1
- package/dist/components/TotalCheckout/BalanceComp/index.js +1 -1
- package/dist/components/TotalCheckout/BalanceComp/index.js.map +1 -1
- package/dist/components/TotalCheckout/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/index.js +6 -5
- package/dist/components/TotalCheckout/index.js.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js +1 -1
- package/dist/modules/account/AccountBalanceTemplate/index.d.ts.map +1 -1
- package/dist/modules/account/AccountBalanceTemplate/index.js +3 -3
- package/dist/modules/account/AccountBalanceTemplate/index.js.map +1 -1
- package/dist/modules/address/AddressForm/index.d.ts.map +1 -1
- package/dist/modules/address/AddressForm/index.js +8 -2
- package/dist/modules/address/AddressForm/index.js.map +1 -1
- package/dist/modules/address/AddressProvider.d.ts +4 -1
- package/dist/modules/address/AddressProvider.d.ts.map +1 -1
- package/dist/modules/address/AddressProvider.js +48 -29
- package/dist/modules/address/AddressProvider.js.map +1 -1
- package/dist/modules/address/AddressesTemplate/index.d.ts.map +1 -1
- package/dist/modules/address/AddressesTemplate/index.js +3 -2
- package/dist/modules/address/AddressesTemplate/index.js.map +1 -1
- package/dist/modules/address/SelectAddress/index.d.ts.map +1 -1
- package/dist/modules/address/SelectAddress/index.js +4 -1
- package/dist/modules/address/SelectAddress/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.js +13 -3
- package/dist/modules/address/ShippingBillingForm/index.js.map +1 -1
- package/dist/modules/auth/SignUpTemplate/index.d.ts +2 -1
- package/dist/modules/auth/SignUpTemplate/index.d.ts.map +1 -1
- package/dist/modules/auth/SignUpTemplate/index.js +3 -2
- package/dist/modules/auth/SignUpTemplate/index.js.map +1 -1
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js +7 -3
- package/dist/modules/cart/components/CartItems/Item/QuantitySelector.js.map +1 -1
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js +7 -4
- package/dist/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js.map +1 -1
- package/dist/modules/cart/components/CartItems/style.js +1 -1
- package/dist/modules/cart/components/CartItems/style.js.map +1 -1
- package/dist/modules/cart/components/CartItems/util.d.ts.map +1 -1
- package/dist/modules/cart/components/CartItems/util.js +4 -1
- package/dist/modules/cart/components/CartItems/util.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.d.ts +4 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js +14 -4
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/index.d.ts +2 -2
- package/dist/modules/checkout/CheckoutTemplate/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/index.js +33 -14
- package/dist/modules/checkout/CheckoutTemplate/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/style.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/style.js +13 -1
- package/dist/modules/checkout/CheckoutTemplate/style.js.map +1 -1
- package/dist/modules/checkout/formsRegistry.d.ts +6 -0
- package/dist/modules/checkout/formsRegistry.d.ts.map +1 -0
- package/dist/modules/checkout/formsRegistry.js +22 -0
- package/dist/modules/checkout/formsRegistry.js.map +1 -0
- package/dist/modules/checkout/index.d.ts +1 -0
- package/dist/modules/checkout/index.d.ts.map +1 -1
- package/dist/modules/checkout/index.js +1 -0
- package/dist/modules/checkout/index.js.map +1 -1
- package/dist/modules/delivery/DeliveryOptionItem/index.d.ts +8 -0
- package/dist/modules/delivery/DeliveryOptionItem/index.d.ts.map +1 -0
- package/dist/modules/delivery/DeliveryOptionItem/index.js +17 -0
- package/dist/modules/delivery/DeliveryOptionItem/index.js.map +1 -0
- package/dist/modules/delivery/DeliveryOptionItem/style.d.ts +3 -0
- package/dist/modules/delivery/DeliveryOptionItem/style.d.ts.map +1 -0
- package/dist/modules/delivery/DeliveryOptionItem/style.js +132 -0
- package/dist/modules/delivery/DeliveryOptionItem/style.js.map +1 -0
- package/dist/modules/delivery/DeliveryOptions/index.d.ts +4 -0
- package/dist/modules/delivery/DeliveryOptions/index.d.ts.map +1 -0
- package/dist/modules/delivery/DeliveryOptions/index.js +54 -0
- package/dist/modules/delivery/DeliveryOptions/index.js.map +1 -0
- package/dist/modules/delivery/DeliveryOptions/style.d.ts +3 -0
- package/dist/modules/delivery/DeliveryOptions/style.d.ts.map +1 -0
- package/dist/modules/delivery/DeliveryOptions/style.js +47 -0
- package/dist/modules/delivery/DeliveryOptions/style.js.map +1 -0
- package/dist/modules/delivery/index.d.ts +6 -0
- package/dist/modules/delivery/index.d.ts.map +1 -0
- package/dist/modules/delivery/index.js +16 -0
- package/dist/modules/delivery/index.js.map +1 -0
- package/dist/modules/delivery/style.d.ts +3 -0
- package/dist/modules/delivery/style.d.ts.map +1 -0
- package/dist/modules/delivery/style.js +13 -0
- package/dist/modules/delivery/style.js.map +1 -0
- package/dist/modules/guest/GuestAddressForm/index.d.ts +4 -0
- package/dist/modules/guest/GuestAddressForm/index.d.ts.map +1 -0
- package/dist/modules/guest/GuestAddressForm/index.js +97 -0
- package/dist/modules/guest/GuestAddressForm/index.js.map +1 -0
- package/dist/modules/guest/GuestAddressForm/style.d.ts +3 -0
- package/dist/modules/guest/GuestAddressForm/style.d.ts.map +1 -0
- package/dist/modules/guest/GuestAddressForm/style.js +100 -0
- package/dist/modules/guest/GuestAddressForm/style.js.map +1 -0
- package/dist/modules/guest/GuestContactInformation/index.d.ts +4 -0
- package/dist/modules/guest/GuestContactInformation/index.d.ts.map +1 -0
- package/dist/modules/guest/GuestContactInformation/index.js +60 -0
- package/dist/modules/guest/GuestContactInformation/index.js.map +1 -0
- package/dist/modules/guest/GuestContactInformation/style.d.ts +3 -0
- package/dist/modules/guest/GuestContactInformation/style.d.ts.map +1 -0
- package/dist/modules/guest/GuestContactInformation/style.js +48 -0
- package/dist/modules/guest/GuestContactInformation/style.js.map +1 -0
- package/dist/modules/order/OrderDetails/index.d.ts.map +1 -1
- package/dist/modules/order/OrderDetails/index.js +6 -6
- package/dist/modules/order/OrderDetails/index.js.map +1 -1
- package/dist/modules/order/OrderedItems/style.js +1 -1
- package/dist/modules/order/OrderedItems/style.js.map +1 -1
- package/dist/modules/payment/CardForm/index.d.ts +4 -0
- package/dist/modules/payment/CardForm/index.d.ts.map +1 -0
- package/dist/modules/payment/CardForm/index.js +113 -0
- package/dist/modules/payment/CardForm/index.js.map +1 -0
- package/dist/modules/payment/CardForm/style.d.ts +3 -0
- package/dist/modules/payment/CardForm/style.d.ts.map +1 -0
- package/dist/modules/payment/CardForm/style.js +29 -0
- package/dist/modules/payment/CardForm/style.js.map +1 -0
- package/dist/modules/payment/CardForm/utils.d.ts +4 -0
- package/dist/modules/payment/CardForm/utils.d.ts.map +1 -0
- package/dist/modules/payment/CardForm/utils.js +34 -0
- package/dist/modules/payment/CardForm/utils.js.map +1 -0
- package/dist/modules/payment/Payment/index.d.ts +14 -1
- package/dist/modules/payment/Payment/index.d.ts.map +1 -1
- package/dist/modules/payment/Payment/index.js +48 -8
- package/dist/modules/payment/Payment/index.js.map +1 -1
- package/dist/modules/payment/Payment/style.js.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/index.d.ts +2 -1
- package/dist/modules/payment/PaymentMethodItem/index.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/index.js +9 -4
- package/dist/modules/payment/PaymentMethodItem/index.js.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethodItem/style.js +22 -1
- package/dist/modules/payment/PaymentMethodItem/style.js.map +1 -1
- package/dist/modules/payment/PaymentMethods/index.d.ts +2 -1
- package/dist/modules/payment/PaymentMethods/index.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethods/index.js +7 -4
- package/dist/modules/payment/PaymentMethods/index.js.map +1 -1
- package/dist/modules/payment/PaymentMethods/style.d.ts.map +1 -1
- package/dist/modules/payment/PaymentMethods/style.js +7 -0
- package/dist/modules/payment/PaymentMethods/style.js.map +1 -1
- package/dist/modules/payment/icons.d.ts +1 -0
- package/dist/modules/payment/icons.d.ts.map +1 -1
- package/dist/modules/payment/icons.js +3 -0
- package/dist/modules/payment/icons.js.map +1 -1
- package/dist/modules/payment/index.d.ts +1 -0
- package/dist/modules/payment/index.d.ts.map +1 -1
- package/dist/modules/payment/index.js +1 -0
- package/dist/modules/payment/index.js.map +1 -1
- package/dist/translations/en.d.ts +33 -2
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/en.js +37 -6
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/hy.d.ts +33 -2
- package/dist/translations/hy.d.ts.map +1 -1
- package/dist/translations/hy.js +37 -6
- package/dist/translations/hy.js.map +1 -1
- package/dist/translations/index.d.ts +132 -8
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/it.d.ts +33 -2
- package/dist/translations/it.d.ts.map +1 -1
- package/dist/translations/it.js +37 -6
- package/dist/translations/it.js.map +1 -1
- package/dist/translations/ru.d.ts +33 -2
- package/dist/translations/ru.d.ts.map +1 -1
- package/dist/translations/ru.js +37 -6
- package/dist/translations/ru.js.map +1 -1
- package/dist/utils/config.d.ts +41 -8
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +49 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/SelectAddress/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/SelectAddress/index.js"],"names":[],"mappings":";AASA,oDAgEC;kBAzEkC,OAAO"}
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useUi } from '@weareconceptstudio/core';
|
|
3
|
+
import { useAccountContext } from '../../../AccountProvider';
|
|
3
4
|
import { useAddressContext } from '../AddressProvider';
|
|
5
|
+
//* Components
|
|
4
6
|
import SelectAddressPopup from '../SelectAddressPopup';
|
|
5
7
|
import AddressItem from '../AddressItem';
|
|
6
8
|
const SelectAddress = () => {
|
|
7
9
|
const { openPopup } = useUi();
|
|
10
|
+
const { isDeliveryEnabled } = useAccountContext();
|
|
8
11
|
const { selectedAddresses, hasAddressType } = useAddressContext();
|
|
9
12
|
const handleSelectPopup = useCallback(({ title, type }) => {
|
|
10
13
|
openPopup(React.createElement(SelectAddressPopup, { title: title, type: type }));
|
|
11
14
|
}, []);
|
|
12
|
-
return (React.createElement("div", { className: `shipping-billing-change-wrapper` }, hasAddressType ? (React.createElement(React.Fragment, null,
|
|
15
|
+
return (React.createElement("div", { className: `shipping-billing-change-wrapper ${isDeliveryEnabled ? 'delivery-enabled' : ''}` }, hasAddressType ? (React.createElement(React.Fragment, null,
|
|
13
16
|
React.createElement(AddressItem, { checkout_review: true, type: 'shipping', select_address: false, title: 'account.address_management.shippingAddress', data: selectedAddresses.shipping, onClick: () => handleSelectPopup({
|
|
14
17
|
title: 'account.order_balance.selectShippingAddress',
|
|
15
18
|
type: 'shipping',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/address/SelectAddress/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/address/SelectAddress/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,cAAc;AACd,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,aAAa,GAAG,GAAG,EAAE;IAC1B,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9B,MAAM,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAClD,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAElE,MAAM,iBAAiB,GAAG,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;QACzD,SAAS,CACR,oBAAC,kBAAkB,IAClB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,GACT,CACF,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACN,6BAAK,SAAS,EAAE,mCAAmC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,EAAE,IAC9F,cAAc,CAAC,CAAC,CAAC,CACjB;QACC,oBAAC,WAAW,IACX,eAAe,QACf,IAAI,EAAE,UAAU,EAChB,cAAc,EAAE,KAAK,EACrB,KAAK,EAAE,4CAA4C,EACnD,IAAI,EAAE,iBAAiB,CAAC,QAAQ,EAChC,OAAO,EAAE,GAAG,EAAE,CACb,iBAAiB,CAAC;gBACjB,KAAK,EAAE,6CAA6C;gBACpD,IAAI,EAAE,UAAU;aAChB,CAAC,GAEF;QACF,oBAAC,WAAW,IACX,eAAe,QACf,IAAI,EAAE,SAAS,EACf,cAAc,EAAE,KAAK,EACrB,KAAK,EAAE,2CAA2C,EAClD,IAAI,EAAE,iBAAiB,CAAC,OAAO,EAC/B,OAAO,EAAE,GAAG,EAAE,CACb,iBAAiB,CAAC;gBACjB,KAAK,EAAE,4CAA4C;gBACnD,IAAI,EAAE,SAAS;aACf,CAAC,GAEF,CACA,CACH,CAAC,CAAC,CAAC,CACH,oBAAC,WAAW,IACX,MAAM,QACN,eAAe,QACf,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,oCAAoC,EAC3C,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,KAAK,EACrB,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,GAAG,EAAE,CACb,iBAAiB,CAAC;YACjB,KAAK,EAAE,oCAAoC;YAC3C,IAAI,EAAE,IAAI;SACV,CAAC,GAEF,CACF,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingForm/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingForm/index.js"],"names":[],"mappings":";AAQA,sEAwCG;kBAhD8C,OAAO"}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import React, { memo as Memo } from 'react';
|
|
1
|
+
import React, { memo as Memo, useCallback } from 'react';
|
|
2
2
|
import { useAddressContext } from '../AddressProvider';
|
|
3
3
|
import { Text } from '@weareconceptstudio/core';
|
|
4
4
|
import { FormBuilder } from '@weareconceptstudio/form';
|
|
5
5
|
//* Style
|
|
6
6
|
import ShippingBillingFormStyle from './style';
|
|
7
7
|
const ShippingBillingForm = Memo(({ firstStepFormRef, title, className, type, duplicateTo = [] }) => {
|
|
8
|
-
const { createAddress, formFields } = useAddressContext();
|
|
8
|
+
const { createAddress, formFields, getFormFieldsByType } = useAddressContext();
|
|
9
9
|
const onFormSubmit = (values) => {
|
|
10
10
|
return createAddress({ data: values, type, duplicateTo });
|
|
11
11
|
};
|
|
12
|
+
const fields = getFormFieldsByType && type ? getFormFieldsByType(type) : formFields;
|
|
13
|
+
const setFields = useCallback((fields) => {
|
|
14
|
+
const form = firstStepFormRef?.current;
|
|
15
|
+
if (form?.setValue) {
|
|
16
|
+
fields.forEach(({ name, value }) => form.setValue(name, value));
|
|
17
|
+
}
|
|
18
|
+
}, []);
|
|
12
19
|
return (React.createElement(ShippingBillingFormStyle, { className: className || '' },
|
|
13
20
|
React.createElement(Text, { text: title, className: `account-p account-p2 account-font-bold account-primary-color1 title` }),
|
|
14
21
|
React.createElement(FormBuilder, { formOptions: {
|
|
15
22
|
ref: firstStepFormRef,
|
|
16
23
|
mode: 'onSubmit',
|
|
17
|
-
}, onSubmit: onFormSubmit, fields:
|
|
24
|
+
}, onSubmit: onFormSubmit, fields: fields, customFieldInjectProps: {
|
|
25
|
+
formRef: firstStepFormRef,
|
|
26
|
+
setFields,
|
|
27
|
+
}, className: 'form-wrapper' })));
|
|
18
28
|
});
|
|
19
29
|
export default ShippingBillingForm;
|
|
20
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingForm/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,OAAO,CAAC;
|
|
1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N,oBAAC,wBAAwB,IAAC,SAAS,EAAE,SAAS,IAAI,EAAE;QACnD,oBAAC,IAAI,IACJ,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,qEAAqE,GAC/E;QACF,oBAAC,WAAW,IACX,WAAW,EAAE;gBACZ,GAAG,EAAE,gBAAgB;gBACrB,IAAI,EAAE,UAAU;aAChB,EACD,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,MAAM,EACd,sBAAsB,EAAE;gBACvB,OAAO,EAAE,gBAAgB;gBACzB,SAAS;aACT,EACD,SAAS,EAAC,cAAc,GACvB,CACwB,CAC3B,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,mBAAmB,CAAC"}
|
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
interface SignUpProps {
|
|
3
3
|
formFields?: [];
|
|
4
4
|
signInUrl?: string;
|
|
5
|
+
privatePolicyUrl?: string;
|
|
5
6
|
}
|
|
6
|
-
declare const SignUpTemplate: ({ formFields, signInUrl }: SignUpProps) => React.JSX.Element;
|
|
7
|
+
declare const SignUpTemplate: ({ formFields, signInUrl, privatePolicyUrl, }: SignUpProps) => React.JSX.Element;
|
|
7
8
|
export default SignUpTemplate;
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/SignUpTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,UAAU,WAAW;IACpB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/auth/SignUpTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAQxC,UAAU,WAAW;IACpB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,cAAc,iDAKjB,WAAW,sBAkGb,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -5,8 +5,9 @@ import { AccountButton, CustomCheckbox } from '../../../components';
|
|
|
5
5
|
import SignUpTemplateStyle from './style';
|
|
6
6
|
import { defaultFormFields } from './utils';
|
|
7
7
|
import { useAccountContext } from '../../../AccountProvider';
|
|
8
|
+
const SignUpTemplate = ({
|
|
8
9
|
// @ts-ignore
|
|
9
|
-
|
|
10
|
+
formFields = defaultFormFields, signInUrl = '/sign-in', privatePolicyUrl = '/privacy-policy', }) => {
|
|
10
11
|
//! Context
|
|
11
12
|
const { translate } = useTranslation();
|
|
12
13
|
const { useUser, auth } = useAccountContext();
|
|
@@ -33,7 +34,7 @@ const SignUpTemplate = ({ formFields = defaultFormFields, signInUrl = '/sign-in'
|
|
|
33
34
|
React.createElement("span", { className: `privacy-wrap` },
|
|
34
35
|
translate('account.legal_policies.checkedText1'),
|
|
35
36
|
"\u00A0",
|
|
36
|
-
React.createElement(Link, { href:
|
|
37
|
+
React.createElement(Link, { href: privatePolicyUrl, className: `capitalize underline account-font-bold` }, translate('account.legal_policies.privacyPolicy')),
|
|
37
38
|
"\u00A0",
|
|
38
39
|
translate('account.legal_policies.checkedText2'))),
|
|
39
40
|
React.createElement(AccountButton, { type: `submit`, btnType: `full-width`, disabled: !isChecked || btnDisabled, text: `account.auth_account_management.signUp` }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/auth/SignUpTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,E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uBAAuB;4BACtC,oBAAC,IAAI,IACJ,IAAI,EAAE,8CAA8C,EACpD,SAAS,EAAE,gFAAgF,GAC1F,CACG;wBAEN,oBAAC,aAAa,IACb,YAAY,QACZ,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,GACpC,CACA,CACH,CAAC,CAAC,CAAC,IAAI;oBAER,6BAAK,SAAS,EAAE,cAAc;wBAC7B,oBAAC,IAAI,IACJ,SAAS,EAAE,iEAAiE,EAC5E,IAAI,EAAE,sDAAsD,GAC3D;wBAEF,6BAAK,SAAS,EAAE,YAAY;4BAC3B,oBAAC,IAAI,IAAC,IAAI,EAAE,SAAS;gCACpB,oBAAC,IAAI,IACJ,SAAS,EAAE,qFAAqF,EAChG,IAAI,EAAE,uCAAuC,GAC5C,CACI,CACF,CACD,CACO,CACT,CACe,CAChB,CACP,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantitySelector.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/Item/QuantitySelector.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"QuantitySelector.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/Item/QuantitySelector.js"],"names":[],"mappings":";AAMA;;;;;;;;;sBAsGC;kBA5GiB,OAAO"}
|
|
@@ -2,7 +2,10 @@ import React from 'react';
|
|
|
2
2
|
import { Text } from '@weareconceptstudio/core';
|
|
3
3
|
import { Select } from '@weareconceptstudio/form';
|
|
4
4
|
import { AccountButton, AccountCounter } from '../../../../../components';
|
|
5
|
+
import { accountConfig } from '../../../../../utils/config';
|
|
5
6
|
const QuantitySelector = ({ select, data, selectionList, actions, hasVariants, setGifts, isCheckoutPage, itemGiftQty, }) => {
|
|
7
|
+
const globalMaxQtyNumeric = Number(accountConfig?.maxQty);
|
|
8
|
+
const globalMaxQty = Number.isFinite(globalMaxQtyNumeric) && globalMaxQtyNumeric > 0 ? globalMaxQtyNumeric : 99;
|
|
6
9
|
const rawMaxQty = data?.maxQty ??
|
|
7
10
|
data?.availableQty ??
|
|
8
11
|
data?.selectedOption?.availableQty ??
|
|
@@ -14,13 +17,14 @@ const QuantitySelector = ({ select, data, selectionList, actions, hasVariants, s
|
|
|
14
17
|
data?.product?.stock;
|
|
15
18
|
const numericMaxQty = Number(rawMaxQty);
|
|
16
19
|
const normalizedMaxQty = Number.isFinite(numericMaxQty) ? numericMaxQty : 0;
|
|
20
|
+
const effectiveMaxQty = normalizedMaxQty > 0 ? normalizedMaxQty : globalMaxQty;
|
|
17
21
|
const currentQtyNumeric = Number(data?.qty);
|
|
18
22
|
const hasCurrentQty = Number.isFinite(currentQtyNumeric) && currentQtyNumeric > 0;
|
|
19
23
|
const hasSelectableQty = Array.isArray(selectionList) && selectionList.length > 0;
|
|
20
|
-
const hasAvailableQty =
|
|
24
|
+
const hasAvailableQty = effectiveMaxQty > 0 || hasCurrentQty;
|
|
21
25
|
const canUseSelection = hasVariants ? hasSelectableQty : hasAvailableQty;
|
|
22
26
|
const isItemOutOfStock = data?.product?.out_of_stock || data?.isInStock === false || !canUseSelection;
|
|
23
|
-
|
|
27
|
+
const counterMaxQty = Math.max(effectiveMaxQty, Math.max(hasCurrentQty ? currentQtyNumeric : 1, 1));
|
|
24
28
|
// For variants and non-variants items with selection
|
|
25
29
|
if (select && !data?.is_gift && !isItemOutOfStock) {
|
|
26
30
|
return (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, hasVariants ? (React.createElement(Select, { options: selectionList || [], value: data?.qty, placeholder: data?.qty, onChange: (val) => actions.add({
|
|
@@ -29,7 +33,7 @@ const QuantitySelector = ({ select, data, selectionList, actions, hasVariants, s
|
|
|
29
33
|
variantId: data?.selectedVariant?.id ?? data?.variantId,
|
|
30
34
|
optionId: data?.selectedOption?.id ?? data?.optionId,
|
|
31
35
|
qty: val,
|
|
32
|
-
}) })) : (React.createElement(AccountCounter, { productId: data?.product?.id }))));
|
|
36
|
+
}) })) : (React.createElement(AccountCounter, { productId: data?.product?.id, maxQty: counterMaxQty }))));
|
|
33
37
|
}
|
|
34
38
|
// For gift items (not on checkout page)
|
|
35
39
|
if (data?.is_gift && !isCheckoutPage) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantitySelector.js","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/Item/QuantitySelector.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"QuantitySelector.js","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/Item/QuantitySelector.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,MAAM,gBAAgB,GAAG,CAAC,EACzB,MAAM,EACN,IAAI,EACJ,aAAa,EACb,OAAO,EACP,WAAW,EACX,QAAQ,EACR,cAAc,EACd,WAAW,GACX,EAAE,EAAE;IACJ,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC1D,MAAM,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,mBAAmB,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC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E,OAAO,EACrB,GAAG,EAAE,WAAW,GACf,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,aAAa,IACb,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,iCAAiC,EACvC,OAAO,EAAE,GAAG,EAAE;gBACb,QAAQ,CAAC;oBACR,WAAW,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;oBACvC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;oBAC3B,GAAG,EAAE,IAAI,EAAE,GAAG;iBACd,CAAC,CAAC;YACJ,CAAC,GACA,CACF,CACI,CACN,CAAC;IACH,CAAC;IAED,sCAAsC;IACtC,OAAO,CACN,oBAAC,IAAI,IACJ,SAAS,EAAE,iEAAiE,EAC5E,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,GAC5C,CACF,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileItemQuantity.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"MobileItemQuantity.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js"],"names":[],"mappings":";AAMA;;;;;;;;;;sBAsJC;kBA5JiB,OAAO"}
|
|
@@ -2,8 +2,11 @@ import React from 'react';
|
|
|
2
2
|
import { Text, useTranslation } from '@weareconceptstudio/core';
|
|
3
3
|
import { Select } from '@weareconceptstudio/form';
|
|
4
4
|
import { AccountButton, AccountCounter } from '../../../../../components';
|
|
5
|
+
import { accountConfig } from '../../../../../utils/config';
|
|
5
6
|
const MobileItemQuantity = ({ hasVariants, select, data, selectionList, actions, checkoutData, setGifts, isCheckoutPage, itemGiftQty, }) => {
|
|
6
7
|
const { translate } = useTranslation();
|
|
8
|
+
const globalMaxQtyNumeric = Number(accountConfig?.maxQty);
|
|
9
|
+
const globalMaxQty = Number.isFinite(globalMaxQtyNumeric) && globalMaxQtyNumeric > 0 ? globalMaxQtyNumeric : 99;
|
|
7
10
|
const rawMaxQty = data?.maxQty ??
|
|
8
11
|
data?.availableQty ??
|
|
9
12
|
data?.selectedOption?.availableQty ??
|
|
@@ -15,13 +18,14 @@ const MobileItemQuantity = ({ hasVariants, select, data, selectionList, actions,
|
|
|
15
18
|
data?.product?.stock;
|
|
16
19
|
const numericMaxQty = Number(rawMaxQty);
|
|
17
20
|
const normalizedMaxQty = Number.isFinite(numericMaxQty) ? numericMaxQty : 0;
|
|
21
|
+
const effectiveMaxQty = normalizedMaxQty > 0 ? normalizedMaxQty : globalMaxQty;
|
|
18
22
|
const currentQtyNumeric = Number(data?.qty);
|
|
19
23
|
const hasCurrentQty = Number.isFinite(currentQtyNumeric) && currentQtyNumeric > 0;
|
|
20
24
|
const hasSelectableQty = Array.isArray(selectionList) && selectionList.length > 0;
|
|
21
|
-
const hasAvailableQty =
|
|
25
|
+
const hasAvailableQty = effectiveMaxQty > 0 || hasCurrentQty;
|
|
22
26
|
const canUseSelection = hasVariants ? hasSelectableQty : hasAvailableQty;
|
|
23
27
|
const isItemOutOfStock = data?.product?.out_of_stock || data?.isInStock === false || !canUseSelection;
|
|
24
|
-
const counterMaxQty =
|
|
28
|
+
const counterMaxQty = Math.max(effectiveMaxQty, Math.max(hasCurrentQty ? currentQtyNumeric : 1, 1));
|
|
25
29
|
// For variants with quantity selector
|
|
26
30
|
if (hasVariants) {
|
|
27
31
|
if (select && !data?.is_gift) {
|
|
@@ -49,8 +53,7 @@ const MobileItemQuantity = ({ hasVariants, select, data, selectionList, actions,
|
|
|
49
53
|
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: 'account.general_actions.outOfStock' })))));
|
|
50
54
|
}
|
|
51
55
|
if (data?.is_gift && !isCheckoutPage) {
|
|
52
|
-
return (React.createElement("div", { className: 'wrapper-gift-button' }, itemGiftQty !== 0 ? (React.createElement(AccountCounter, { maxQty: data?.qty, productId: data?.product.id, promotionId: data?.appliedPromotion?.id, isGift: data?.is_gift, qty:
|
|
53
|
-
item.productId === data?.product.id)?.qty })) : (React.createElement(AccountButton, { className: `capitalize button-gift`, text: 'account.general_actions.restore', onClick: () => setGifts({
|
|
56
|
+
return (React.createElement("div", { className: 'wrapper-gift-button' }, itemGiftQty !== 0 ? (React.createElement(AccountCounter, { maxQty: data?.qty, productId: data?.product.id, promotionId: data?.appliedPromotion?.id, isGift: data?.is_gift, qty: itemGiftQty })) : (React.createElement(AccountButton, { className: `capitalize button-gift`, text: 'account.general_actions.restore', onClick: () => setGifts({
|
|
54
57
|
promotionId: data?.appliedPromotion?.id,
|
|
55
58
|
productId: data?.product.id,
|
|
56
59
|
qty: data?.qty,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileItemQuantity.js","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"MobileItemQuantity.js","sourceRoot":"","sources":["../../../../../../src/modules/cart/components/CartItems/ItemMobile/MobileItemQuantity.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO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E,OAAO,EACrB,GAAG,EAAE,WAAW,GACf,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,aAAa,IACb,SAAS,EAAE,wBAAwB,EACnC,IAAI,EAAE,iCAAiC,EACvC,OAAO,EAAE,GAAG,EAAE,CACb,QAAQ,CAAC;gBACR,WAAW,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;gBACvC,SAAS,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE;gBAC3B,GAAG,EAAE,IAAI,EAAE,GAAG;aACd,CAAC,GAEF,CACF,CACI,CACN,CAAC;IACH,CAAC;IAED,OAAO,CACN,6BAAK,SAAS,EAAE,UAAU;QACzB,oBAAC,IAAI,IACJ,SAAS,EAAE,8FAA8F;YACxG,SAAS,CAAC,gCAAgC,CAAC;uBACtC;QAEP,oBAAC,IAAI,IACJ,SAAS,EAAE,kFAAkF,EAC7F,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,GAC5C,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -295,7 +295,7 @@ const CartItemsStyle = styled.section `
|
|
|
295
295
|
padding: var(--account_giftIconDistanceIconPTB) var(--account_giftIconDistanceIconPLR);
|
|
296
296
|
margin: var(--account_giftIconDistanceIconMTB) var(--account_giftIconDistanceIconMLR);
|
|
297
297
|
position: absolute;
|
|
298
|
-
z-index:
|
|
298
|
+
z-index: 99;
|
|
299
299
|
width: fit-content;
|
|
300
300
|
height: fit-content;
|
|
301
301
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../../src/modules/cart/components/CartItems/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAK,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAqDf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmKrG,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/modules/cart/components/CartItems/util.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/modules/cart/components/CartItems/util.js"],"names":[],"mappings":"AAGA,gDASE;AAEK,uDAwBN;AAEM,kDAeN;AAEM;;;IAYN;kBArEiB,OAAO"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { accountConfig } from '../../../../utils/config';
|
|
2
3
|
export const defaultIconGift = (React.createElement("svg", { width: '14', height: '14', fill: 'none', viewBox: '0 0 14 14', xmlns: 'http://www.w3.org/2000/svg' },
|
|
3
4
|
React.createElement("path", { d: 'M7.78672 13.4663H11.846C12.1064 13.2066 12.252 13.061 12.5117 12.8006V7.95381H7.78672V13.4663ZM1.48672 7.95381V12.8006C1.74642 13.061 1.89202 13.2066 2.15242 13.4663H6.21172V7.95381H1.48672ZM9.55842 1.71471C10.418 1.71471 11.0186 2.81441 10.033 3.68381H7.75452L8.61202 2.22571C8.79752 1.90931 9.13772 1.71471 9.50452 1.71471H9.55842ZM2.33932 2.16341C2.20492 2.71431 2.28612 3.24281 2.51012 3.68381H1.36492C1.10452 3.94351 0.958919 4.08911 0.699219 4.34881V6.16811C0.958919 6.42781 1.10452 6.57341 1.36492 6.83381H12.6335C12.8939 6.57341 13.0395 6.42781 13.2992 6.16811V4.34881C13.0395 4.08911 12.8939 3.94351 12.6335 3.68381H11.4883C11.7123 3.24281 11.7935 2.71431 11.6591 2.16341C11.4211 1.19041 10.5076 0.53381 9.50662 0.53381H9.50452C8.71912 0.53381 7.99112 0.94961 7.59212 1.62651L6.99922 2.63731L6.40632 1.62861C6.00732 0.950311 5.27932 0.53381 4.49182 0.53381C3.49082 0.53381 2.57732 1.19041 2.33932 2.16341ZM5.38712 2.22641L6.24392 3.68381H3.96542C2.97982 2.81441 3.58042 1.71471 4.44002 1.71471H4.49392C4.86072 1.71471 5.20302 1.90931 5.38712 2.22641Z' })));
|
|
4
5
|
export const resolveAvailableQty = (item) => {
|
|
@@ -20,7 +21,9 @@ export const resolveAvailableQty = (item) => {
|
|
|
20
21
|
return numericValue;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
const globalMaxQtyNumeric = Number(accountConfig?.maxQty);
|
|
25
|
+
const globalMaxQty = Number.isFinite(globalMaxQtyNumeric) && globalMaxQtyNumeric > 0 ? globalMaxQtyNumeric : null;
|
|
26
|
+
return globalMaxQty;
|
|
24
27
|
};
|
|
25
28
|
export const isItemInStock = (item) => {
|
|
26
29
|
if (item?.isInStock === false)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/modules/cart/components/CartItems/util.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/modules/cart/components/CartItems/util.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,eAAe,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C5C,IAAI,IAAI,EAAE,OAAO,EAAE,YAAY;QAAE,OAAO,KAAK,CAAC;IAE9C,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,YAAY,IAAI,GAAG,IAAI,YAAY,GAAG,CAAC,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAI,EAAE,EAAE;IACjD,MAAM,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,YAAY,KAAK,IAAI,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvF,IAAI,CAAC,KAAK,EAAE,CAAC;QACZ,OAAO,EAAE,CAAC;IACX,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QACjD,MAAM,KAAK,GAAG,KAAK,GAAG,CAAC,CAAC;QACxB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export default StepReview;
|
|
2
|
-
declare function StepReview(
|
|
2
|
+
declare function StepReview({ hidePayment, paymentProps }: {
|
|
3
|
+
hidePayment?: boolean;
|
|
4
|
+
paymentProps: any;
|
|
5
|
+
}): React.JSX.Element;
|
|
3
6
|
import React from 'react';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepReview/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepReview/index.js"],"names":[],"mappings":";AAcA;;;sBAwCC;kBAtDkC,OAAO"}
|
|
@@ -6,15 +6,25 @@ import { CartItems } from '../../../cart';
|
|
|
6
6
|
import Payment from '../../../payment/Payment';
|
|
7
7
|
import SelectPaymentMethodPopup from '../../../payment/SelectPaymentMethodPopup';
|
|
8
8
|
import { useAccountContext } from '../../../../AccountProvider';
|
|
9
|
-
|
|
9
|
+
import { useAddressContext } from '../../../address';
|
|
10
|
+
import GuestContactInformation from '../../../guest/GuestContactInformation';
|
|
11
|
+
import GuestAddressForm from '../../../guest/GuestAddressForm';
|
|
12
|
+
import Delivery from '../../../delivery';
|
|
13
|
+
const StepReview = ({ hidePayment = false, paymentProps }) => {
|
|
10
14
|
const { openPopup } = useUi();
|
|
11
|
-
const { checkout } = useAccountContext();
|
|
15
|
+
const { checkout, globalSettings, useUser } = useAccountContext();
|
|
16
|
+
const { hasAddresses } = useAddressContext();
|
|
17
|
+
const { user } = useUser();
|
|
12
18
|
const handleSelectPopup = useCallback(() => {
|
|
13
19
|
openPopup(React.createElement(SelectPaymentMethodPopup, null), { className: 'popup-payment-block' });
|
|
14
20
|
}, []);
|
|
15
21
|
return (React.createElement("div", { className: 'step-review' },
|
|
16
|
-
React.createElement(
|
|
17
|
-
React.createElement(
|
|
22
|
+
React.createElement(Delivery, null),
|
|
23
|
+
globalSettings?.allowGuestCheckout && !user && (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement(GuestContactInformation, null),
|
|
25
|
+
hasAddresses ? React.createElement(GuestAddressForm, null) : null)),
|
|
26
|
+
user && hasAddresses ? React.createElement(SelectAddress, null) : null,
|
|
27
|
+
!hidePayment && (React.createElement(Payment, { title: 'account.payment_management.payment', onClick: handleSelectPopup, ...(paymentProps || {}) })),
|
|
18
28
|
React.createElement(CartItems, { className: `checkout-mt`, title: 'account.order_management.orderItems', additionalParameters: {
|
|
19
29
|
...checkout.item,
|
|
20
30
|
} })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepReview/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,cAAc;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,wBAAwB,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepReview/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,cAAc;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAC/C,OAAO,wBAAwB,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CA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AAI;aAChB,GACA,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default CheckoutTemplate;
|
|
2
|
-
declare function CheckoutTemplate({
|
|
3
|
-
|
|
2
|
+
declare function CheckoutTemplate({ paymentProps }?: {
|
|
3
|
+
paymentProps: any;
|
|
4
4
|
}): React.JSX.Element;
|
|
5
5
|
import React from 'react';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/CheckoutTemplate/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/CheckoutTemplate/index.js"],"names":[],"mappings":";AAoBA;;sBAwJC;kBA5K+D,OAAO"}
|
|
@@ -7,23 +7,28 @@ import { useCart } from '@weareconceptstudio/cart';
|
|
|
7
7
|
import StepReview from './StepReview';
|
|
8
8
|
import StepShipping from './StepShipping';
|
|
9
9
|
import AccountContainer from '../../../components/AccountContainer';
|
|
10
|
+
import Payment from '../../payment/Payment';
|
|
11
|
+
import { checkoutFormsRegistry } from '../formsRegistry';
|
|
10
12
|
//* Styles
|
|
11
13
|
import CheckoutTemplateStyle from './style';
|
|
12
14
|
//* Skeleton
|
|
13
15
|
import SkeletonCartTemplate from '../../cart/CartTemplate/Skeleton';
|
|
14
16
|
import SequenceSkeleton from '../../../components/Sequence/Skeleton';
|
|
15
17
|
import SkeletonAddressSelect from '../../address/SelectAddress/Skeleton';
|
|
16
|
-
const CheckoutTemplate = ({
|
|
18
|
+
const CheckoutTemplate = ({ paymentProps } = {}) => {
|
|
17
19
|
const firstStepFormRef = useRef(null);
|
|
18
20
|
const shippingFormRef = useRef(null);
|
|
19
21
|
const billingFormRef = useRef(null);
|
|
20
22
|
const [useSameAddress, setUseSameAddress] = useState(false);
|
|
21
23
|
const [initialLoadComplete, setInitialLoadComplete] = useState(false);
|
|
22
24
|
const [loadingProcessToPayment, setLoadingProcessToPayment] = useState(false);
|
|
23
|
-
const { useUser } = useAccountContext();
|
|
24
|
-
const { hasCheckoutAddress, addressLoading, hasAddressType } = useAddressContext();
|
|
25
|
+
const { useUser, globalSettings, checkout: checkoutConfig } = useAccountContext();
|
|
26
|
+
const { hasCheckoutAddress, addressLoading, hasAddressType, hasAddresses } = useAddressContext();
|
|
25
27
|
const { itemsCount, loading, handleCheckout, getCart, mergeCart, isLoggedIn } = useCart();
|
|
26
28
|
const { user } = useUser();
|
|
29
|
+
// Guest checkout: show when logged in, or when guest checkout is allowed and cart has items
|
|
30
|
+
const allowGuestCheckout = globalSettings?.allowGuestCheckout !== false && globalSettings?.supportsGuestCart !== false;
|
|
31
|
+
const canAccessCheckout = user || (allowGuestCheckout && itemsCount > 0);
|
|
27
32
|
useEffect(() => {
|
|
28
33
|
getCart();
|
|
29
34
|
if (isLoggedIn) {
|
|
@@ -36,9 +41,16 @@ const CheckoutTemplate = ({ moreMenu }) => {
|
|
|
36
41
|
setInitialLoadComplete(true);
|
|
37
42
|
}
|
|
38
43
|
}, [loading, initialLoadComplete]);
|
|
44
|
+
const isGuestFlow = !user;
|
|
45
|
+
const hideInternalPayment = checkoutConfig?.hideInternalPayment === true;
|
|
46
|
+
const paymentPlacement = checkoutConfig?.paymentPlacement || 'review';
|
|
47
|
+
const shouldRenderPaymentInSummary = paymentPlacement === 'summary' && !hideInternalPayment;
|
|
48
|
+
// Guest: skip internal shipping step and go directly to review.
|
|
49
|
+
// Logged-in user: shipping step only when addresses are enabled and none selected yet.
|
|
50
|
+
const isShippingStep = isGuestFlow ? false : hasAddresses && !hasCheckoutAddress;
|
|
39
51
|
const checkStep = {
|
|
40
|
-
isShipping:
|
|
41
|
-
isReview:
|
|
52
|
+
isShipping: isShippingStep,
|
|
53
|
+
isReview: !isShippingStep,
|
|
42
54
|
};
|
|
43
55
|
const handleCheckoutFirstStep = () => {
|
|
44
56
|
if (!hasAddressType) {
|
|
@@ -56,20 +68,29 @@ const CheckoutTemplate = ({ moreMenu }) => {
|
|
|
56
68
|
const handleCheckoutBtn = useCallback(() => {
|
|
57
69
|
if (checkStep.isShipping) {
|
|
58
70
|
handleCheckoutFirstStep();
|
|
71
|
+
return;
|
|
59
72
|
}
|
|
60
|
-
|
|
73
|
+
const runCheckout = () => {
|
|
61
74
|
setLoadingProcessToPayment(true);
|
|
62
75
|
handleCheckout().finally(() => {
|
|
63
76
|
setTimeout(() => {
|
|
64
77
|
setLoadingProcessToPayment(false);
|
|
65
78
|
}, 1000);
|
|
66
79
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
80
|
+
};
|
|
81
|
+
// On review step validate all registered checkout forms (guest contact, guest address, etc.)
|
|
82
|
+
checkoutFormsRegistry
|
|
83
|
+
.validateAll()
|
|
84
|
+
.then(runCheckout)
|
|
85
|
+
.catch(() => {
|
|
86
|
+
// validation errors are handled by individual forms; do not proceed
|
|
87
|
+
// alert('validation errors');
|
|
88
|
+
});
|
|
89
|
+
}, [checkStep.isShipping, handleCheckoutFirstStep, handleCheckout]);
|
|
69
90
|
return (React.createElement(Page, { className: 'checkout use-account' },
|
|
70
91
|
React.createElement(AccountContainer, { className: `second-version` },
|
|
71
|
-
React.createElement(CheckoutTemplateStyle, null,
|
|
72
|
-
React.createElement(TotalCheckout, { isShipping: checkStep.isShipping, buttonProps: {
|
|
92
|
+
React.createElement(CheckoutTemplateStyle, null, canAccessCheckout ? (React.createElement(React.Fragment, null,
|
|
93
|
+
React.createElement(TotalCheckout, { isShipping: checkStep.isShipping, beforeCheckoutButton: checkStep.isReview && shouldRenderPaymentInSummary ? (React.createElement(Payment, { title: 'account.payment_management.payment', showTitle: false, showChangeButton: false, variant: 'inline' })) : null, buttonProps: {
|
|
73
94
|
url: false,
|
|
74
95
|
handleClick: handleCheckoutBtn,
|
|
75
96
|
type: checkStep.isShipping ? 'submit' : 'button',
|
|
@@ -78,10 +99,8 @@ const CheckoutTemplate = ({ moreMenu }) => {
|
|
|
78
99
|
: 'account.cart_checkout.proceedToPayment',
|
|
79
100
|
loadingButton: loadingProcessToPayment,
|
|
80
101
|
} }, !addressLoading && itemsCount ? (React.createElement(React.Fragment, null,
|
|
81
|
-
React.createElement(Sequence, { step: checkStep.isShipping ? 'shipping' : 'review' }),
|
|
82
|
-
checkStep.isShipping ? (React.createElement(StepShipping, { firstStepFormRef: firstStepFormRef, shippingFormRef: shippingFormRef, billingFormRef: billingFormRef, useSameAddress: useSameAddress, setUseSameAddress: setUseSameAddress })) : (React.createElement(React.Fragment, null,
|
|
83
|
-
React.createElement(StepReview, null),
|
|
84
|
-
moreMenu || null)))) : (React.createElement(React.Fragment, null,
|
|
102
|
+
React.createElement(Sequence, { step: checkStep.isShipping ? 'shipping' : 'review', hasShipping: !isGuestFlow && hasAddresses }),
|
|
103
|
+
checkStep.isShipping ? (React.createElement(StepShipping, { firstStepFormRef: firstStepFormRef, shippingFormRef: shippingFormRef, billingFormRef: billingFormRef, useSameAddress: useSameAddress, setUseSameAddress: setUseSameAddress })) : (React.createElement(StepReview, { hidePayment: hideInternalPayment || shouldRenderPaymentInSummary, paymentProps: paymentProps })))) : (React.createElement(React.Fragment, null,
|
|
85
104
|
React.createElement(SequenceSkeleton, { className: 'sequence-checkout-template' }),
|
|
86
105
|
React.createElement(SkeletonAddressSelect, { className: 'address-checkout-template' }),
|
|
87
106
|
React.createElement(SkeletonCartTemplate, null)))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/checkout/CheckoutTemplate/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,q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AC,CAAC,yCAAyC;4BAC3C,CAAC,CAAC,wCAAwC;wBAC3C,aAAa,EAAE,uBAAuB;qBACtC,IACA,CAAC,cAAc,IAAI,UAAU,CAAC,CAAC,CAAC,CAChC;oBACC,oBAAC,QAAQ,IACR,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAClD,WAAW,EAAE,CAAC,WAAW,IAAI,YAAY,GACxC;oBAED,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CACvB,oBAAC,YAAY,IACZ,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,EAChC,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,GACnC,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,UAAU,IACV,WAAW,EAAE,mBAAmB,IAAI,4BAA4B,EAChE,YAAY,EAAE,YAAY,GACzB,CACF,CACC,CACH,CAAC,CAAC,CAAC,CACH;oBACC,oBAAC,gBAAgB,IAAC,SAAS,EAAE,4BAA4B,GAAI;oBAC7D,oBAAC,qBAAqB,IAAC,SAAS,EAAE,2BAA2B,GAAI;oBACjE,oBAAC,oBAAoB,OAAG,CACtB,CACH,CACc;gBAEhB,6BAAK,SAAS,EAAC,YAAY,GAAG,CAC5B,CACH,CAAC,CAAC,CAAC,IAAI,CACe,CACN,CACb,CACP,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/CheckoutTemplate/style.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/checkout/CheckoutTemplate/style.js"],"names":[],"mappings":";AAEA,8OAwHE"}
|
|
@@ -2,7 +2,8 @@ import styled from 'styled-components';
|
|
|
2
2
|
const CheckoutTemplateStyle = styled.section `
|
|
3
3
|
--account_billingWrapperMTop: var(--sp5x);
|
|
4
4
|
--account_itemDistance: var(--sp5x);
|
|
5
|
-
|
|
5
|
+
--account_deliveryWrapperMTop: var(--sp16x);
|
|
6
|
+
|
|
6
7
|
.billing-wrapper {
|
|
7
8
|
margin-top: var(--account_billingWrapperMTop);
|
|
8
9
|
}
|
|
@@ -13,6 +14,10 @@ const CheckoutTemplateStyle = styled.section `
|
|
|
13
14
|
margin-left: calc(-1 * calc(var(--account_itemDistance) / 2));
|
|
14
15
|
margin-right: calc(-1 * calc(var(--account_itemDistance) / 2));
|
|
15
16
|
|
|
17
|
+
&.delivery-enabled {
|
|
18
|
+
margin-top: var(--account_deliveryWrapperMTop);
|
|
19
|
+
}
|
|
20
|
+
|
|
16
21
|
.item-internal-wrap {
|
|
17
22
|
height: fit-content !important;
|
|
18
23
|
}
|
|
@@ -55,36 +60,43 @@ const CheckoutTemplateStyle = styled.section `
|
|
|
55
60
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
56
61
|
--account_billingWrapperMTop: var(--sp11x);
|
|
57
62
|
--account_itemDistance: var(--sp4x);
|
|
63
|
+
--account_deliveryWrapperMTop: var(--sp11x);
|
|
58
64
|
}
|
|
59
65
|
|
|
60
66
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
61
67
|
--account_billingWrapperMTop: var(--sp8x);
|
|
62
68
|
--account_itemDistance: var(--sp4x);
|
|
69
|
+
--account_deliveryWrapperMTop: var(--sp8x);
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
66
73
|
--account_billingWrapperMTop: var(--sp8x);
|
|
67
74
|
--account_itemDistance: var(--sp4x);
|
|
75
|
+
--account_deliveryWrapperMTop: var(--sp8x);
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
71
79
|
--account_billingWrapperMTop: var(--sp8x);
|
|
72
80
|
--account_itemDistance: var(--sp3x);
|
|
81
|
+
--account_deliveryWrapperMTop: var(--sp8x);
|
|
73
82
|
}
|
|
74
83
|
|
|
75
84
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
76
85
|
--account_billingWrapperMTop: var(--sp7x);
|
|
77
86
|
--account_itemDistance: var(--sp3x);
|
|
87
|
+
--account_deliveryWrapperMTop: var(--sp8x);
|
|
78
88
|
}
|
|
79
89
|
|
|
80
90
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
81
91
|
--account_billingWrapperMTop: var(--sp7x);
|
|
82
92
|
--account_itemDistance: var(--sp3x);
|
|
93
|
+
--account_deliveryWrapperMTop: var(--sp8x);
|
|
83
94
|
}
|
|
84
95
|
|
|
85
96
|
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
86
97
|
--account_billingWrapperMTop: var(--sp8x);
|
|
87
98
|
--account_itemDistance: var(--sp6x);
|
|
99
|
+
--account_deliveryWrapperMTop: var(--sp10x);
|
|
88
100
|
|
|
89
101
|
.shipping-billing-change-wrapper {
|
|
90
102
|
margin-left: 0;
|