@weareconceptstudio/account 2.1.10 → 2.1.12
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/components/CartPageDetector.d.ts.map +1 -1
- package/dist/components/CartPageDetector.js +28 -16
- package/dist/components/CartPageDetector.js.map +1 -1
- package/dist/components/TotalCheckout/index.d.ts.map +1 -1
- package/dist/components/TotalCheckout/index.js +2 -1
- package/dist/components/TotalCheckout/index.js.map +1 -1
- package/dist/components/TotalCheckout/style.d.ts.map +1 -1
- package/dist/components/TotalCheckout/style.js +8 -0
- package/dist/components/TotalCheckout/style.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.d.ts +5 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js +31 -14
- package/dist/modules/account/AccountSettingsTemplate/Subscription/index.js.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.d.ts +9 -1
- package/dist/modules/account/AccountSettingsTemplate/index.d.ts.map +1 -1
- package/dist/modules/account/AccountSettingsTemplate/index.js +5 -2
- package/dist/modules/account/AccountSettingsTemplate/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingForm/index.js +5 -1
- package/dist/modules/address/ShippingBillingForm/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/index.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/index.js +33 -4
- package/dist/modules/address/ShippingBillingInfo/index.js.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/style.d.ts.map +1 -1
- package/dist/modules/address/ShippingBillingInfo/style.js +14 -0
- package/dist/modules/address/ShippingBillingInfo/style.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js +5 -2
- package/dist/modules/checkout/CheckoutTemplate/StepReview/index.js.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts +9 -0
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.d.ts.map +1 -1
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js +12 -11
- package/dist/modules/checkout/CheckoutTemplate/StepShipping/index.js.map +1 -1
- package/dist/modules/delivery/DeliveryOptions/index.d.ts.map +1 -1
- package/dist/modules/delivery/DeliveryOptions/index.js +212 -11
- package/dist/modules/delivery/DeliveryOptions/index.js.map +1 -1
- package/dist/modules/delivery/DeliveryOptions/style.d.ts.map +1 -1
- package/dist/modules/delivery/DeliveryOptions/style.js +191 -42
- package/dist/modules/delivery/DeliveryOptions/style.js.map +1 -1
- package/dist/modules/guest/GuestAddressForm/index.d.ts.map +1 -1
- package/dist/modules/guest/GuestAddressForm/index.js +56 -27
- package/dist/modules/guest/GuestAddressForm/index.js.map +1 -1
- package/dist/modules/index.d.ts +1 -0
- package/dist/modules/index.js +1 -0
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/order/OrderIndividualTemplate/index.d.ts.map +1 -1
- package/dist/modules/order/OrderIndividualTemplate/index.js +10 -2
- package/dist/modules/order/OrderIndividualTemplate/index.js.map +1 -1
- package/dist/modules/payment/CardForm/index.d.ts.map +1 -1
- package/dist/modules/payment/CardForm/index.js +4 -0
- package/dist/modules/payment/CardForm/index.js.map +1 -1
- package/dist/modules/unsubscribe/UnsubscribeMessage.d.ts +8 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.js +16 -0
- package/dist/modules/unsubscribe/UnsubscribeMessage.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.d.ts +3 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.js +40 -0
- package/dist/modules/unsubscribe/UnsubscribeMessageStyle.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.d.ts +14 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.js +86 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplate.js.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.d.ts +3 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.d.ts.map +1 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.js +86 -0
- package/dist/modules/unsubscribe/UnsubscribeTemplateStyle.js.map +1 -0
- package/dist/modules/unsubscribe/icons.d.ts +9 -0
- package/dist/modules/unsubscribe/icons.d.ts.map +1 -0
- package/dist/modules/unsubscribe/icons.js +34 -0
- package/dist/modules/unsubscribe/icons.js.map +1 -0
- package/dist/modules/unsubscribe/illustrationTheme.d.ts +2 -0
- package/dist/modules/unsubscribe/illustrationTheme.d.ts.map +1 -0
- package/dist/modules/unsubscribe/illustrationTheme.js +8 -0
- package/dist/modules/unsubscribe/illustrationTheme.js.map +1 -0
- package/dist/modules/unsubscribe/index.d.ts +3 -0
- package/dist/modules/unsubscribe/index.d.ts.map +1 -0
- package/dist/modules/unsubscribe/index.js +3 -0
- package/dist/modules/unsubscribe/index.js.map +1 -0
- package/dist/translations/en.d.ts +15 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/dist/translations/en.js +15 -0
- package/dist/translations/en.js.map +1 -1
- package/dist/translations/hy.d.ts +15 -0
- package/dist/translations/hy.d.ts.map +1 -1
- package/dist/translations/hy.js +15 -0
- package/dist/translations/hy.js.map +1 -1
- package/dist/translations/index.d.ts +60 -0
- package/dist/translations/index.d.ts.map +1 -1
- package/dist/translations/it.d.ts +15 -0
- package/dist/translations/it.d.ts.map +1 -1
- package/dist/translations/it.js +15 -0
- package/dist/translations/it.js.map +1 -1
- package/dist/translations/ru.d.ts +15 -0
- package/dist/translations/ru.d.ts.map +1 -1
- package/dist/translations/ru.js +15 -0
- package/dist/translations/ru.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +4 -0
- package/dist/utils/config.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartPageDetector.d.ts","sourceRoot":"","sources":["../../src/components/CartPageDetector.js"],"names":[],"mappings":"AAQO,
|
|
1
|
+
{"version":3,"file":"CartPageDetector.d.ts","sourceRoot":"","sources":["../../src/components/CartPageDetector.js"],"names":[],"mappings":"AAQO,wCA4CN"}
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { useEffect,
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
3
|
/**
|
|
4
|
-
* Internal component that detects cart/checkout pages and updates the cart store
|
|
5
|
-
*
|
|
4
|
+
* Internal component that detects cart/checkout pages and updates the cart store.
|
|
5
|
+
* Hooks into history APIs so SPA navigations (e.g. Next.js App Router) still run updatePageType.
|
|
6
6
|
*/
|
|
7
7
|
export const CartPageDetector = () => {
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const [pathname, setPathname] = useState(() => (typeof window !== 'undefined' ? window.location.pathname : ''));
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
const syncPathnameFromWindow = () => {
|
|
11
|
+
setPathname(typeof window !== 'undefined' ? window.location.pathname : '');
|
|
12
|
+
};
|
|
13
|
+
syncPathnameFromWindow();
|
|
14
|
+
window.addEventListener('popstate', syncPathnameFromWindow);
|
|
15
|
+
const origPush = history.pushState.bind(history);
|
|
16
|
+
const origReplace = history.replaceState.bind(history);
|
|
17
|
+
history.pushState = (...args) => {
|
|
18
|
+
origPush(...args);
|
|
19
|
+
queueMicrotask(syncPathnameFromWindow);
|
|
20
|
+
};
|
|
21
|
+
history.replaceState = (...args) => {
|
|
22
|
+
origReplace(...args);
|
|
23
|
+
queueMicrotask(syncPathnameFromWindow);
|
|
24
|
+
};
|
|
25
|
+
return () => {
|
|
26
|
+
window.removeEventListener('popstate', syncPathnameFromWindow);
|
|
27
|
+
history.pushState = origPush;
|
|
28
|
+
history.replaceState = origReplace;
|
|
29
|
+
};
|
|
30
|
+
}, []);
|
|
19
31
|
useEffect(() => {
|
|
20
32
|
import('@weareconceptstudio/cart').then(({ useCartStore }) => {
|
|
21
33
|
const store = useCartStore.getState();
|
|
@@ -23,7 +35,7 @@ export const CartPageDetector = () => {
|
|
|
23
35
|
store.updatePageType();
|
|
24
36
|
}
|
|
25
37
|
});
|
|
26
|
-
}, [
|
|
27
|
-
return null;
|
|
38
|
+
}, [pathname]);
|
|
39
|
+
return null;
|
|
28
40
|
};
|
|
29
41
|
//# sourceMappingURL=CartPageDetector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartPageDetector.js","sourceRoot":"","sources":["../../src/components/CartPageDetector.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"CartPageDetector.js","sourceRoot":"","sources":["../../src/components/CartPageDetector.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACpC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CACvC,GAAG,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CACrE,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,sBAAsB,GAAG,GAA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,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,IAAI,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TotalCheckout/index.js"],"names":[],"mappings":";AAiBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TotalCheckout/index.js"],"names":[],"mappings":";AAiBA,gEAiME;kBAlN0B,OAAO"}
|
|
@@ -14,7 +14,7 @@ import SkeletonTotalCheckout from './Skeleton';
|
|
|
14
14
|
import TotalCheckoutStyle from './style';
|
|
15
15
|
const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps, beforeCheckoutButton, moreMenuPlacement = 'left', moreMenu, }) => {
|
|
16
16
|
const { globalSettings } = useAccountContext();
|
|
17
|
-
const { formatted_shippingCost, formatted_total, useBalance, formatted_useBalance, formatted_subtotal, discount, formatted_discount, cashback, formatted_cashback, loading, checkoutBtnDisabled, isCheckoutPage, itemsCount, } = useCart();
|
|
17
|
+
const { formatted_shippingCost, formatted_total, useBalance, formatted_useBalance, formatted_subtotal, discount, formatted_discount, cashback, formatted_cashback, loading, checkoutBtnDisabled, isCheckoutPage, itemsCount, checkoutData, } = useCart();
|
|
18
18
|
return (React.createElement(TotalCheckoutStyle, { "$hasCollapse": globalSettings.hasPromoCodeSystem ||
|
|
19
19
|
globalSettings.hasBalanceSystem ||
|
|
20
20
|
(globalSettings.hasCommentSystem &&
|
|
@@ -58,6 +58,7 @@ const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps, b
|
|
|
58
58
|
globalSettings.hasBalanceSystem ? React.createElement(BalanceComp, null) : null,
|
|
59
59
|
globalSettings.hasCommentSystem ? (React.createElement(CommentComp, { isShipping: isShipping })) : null)) : null)),
|
|
60
60
|
beforeCheckoutButton ? (React.createElement("div", { className: 'btn-wrap' }, beforeCheckoutButton)) : null,
|
|
61
|
+
isCheckoutPage && checkoutData?.checkout_error ? (React.createElement("div", { className: 'checkout-error-message' }, checkoutData.checkout_error)) : null,
|
|
61
62
|
React.createElement(AccountButton, { url: buttonProps.url, btnType: `full-width`, text: buttonProps.text, type: buttonProps.type, disabled: checkoutBtnDisabled, loading: buttonProps.loadingButton, className: `sticky-wrap-btn align-center`, onClick: () => buttonProps.handleClick && buttonProps.handleClick() })))) : (React.createElement(SkeletonTotalCheckout, null))),
|
|
62
63
|
React.createElement("div", { className: 'items-third-panel-wrap' }, moreMenuPlacement === 'right' && itemsCount ? moreMenu : null))));
|
|
63
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TotalCheckout/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,YAAY;AACZ,OAAO,qBAAqB,MAAM,YAAY,CAAC;AAE/C,SAAS;AACT,OAAO,kBAAkB,MAAM,SAAS,CAAC;AAEzC,MAAM,aAAa,GAAG,IAAI,CACzB,CAAC,EACA,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,iBAAiB,GAAG,MAAM,EAC1B,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAE/C,MAAM,EACL,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TotalCheckout/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,YAAY;AACZ,OAAO,qBAAqB,MAAM,YAAY,CAAC;AAE/C,SAAS;AACT,OAAO,kBAAkB,MAAM,SAAS,CAAC;AAEzC,MAAM,aAAa,GAAG,IAAI,CACzB,CAAC,EACA,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,iBAAiB,GAAG,MAAM,EAC1B,QAAQ,GACR,EAAE,EAAE;IACJ,MAAM,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAE/C,MAAM,EACL,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,QAAQ,EACR,kBAAkB,EAClB,OAAO,EACP,mBAAmB,EACn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GAAG,EAAE,CAAC,WAAW,CAAC,WAAW,IAAI,WAAW,CAAC,WAAW,EAAE,GAClE,CACG,CACD,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,qBAAqB,OAAG,CACzB,CACI;YACN,6BAAK,SAAS,EAAC,wBAAwB,IACrC,iBAAiB,KAAK,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CACzD,CACD,CACc,CACrB,CAAC;AACH,CAAC,CACD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/TotalCheckout/style.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/components/TotalCheckout/style.js"],"names":[],"mappings":";AAEA,2OA8bE"}
|
|
@@ -76,6 +76,14 @@ const TotalCheckoutStyle = styled.section `
|
|
|
76
76
|
width: 100%;
|
|
77
77
|
margin-top: ${(props) => (props.$hasCollapse ? 'var(--account_btnMTop)' : '0')};
|
|
78
78
|
}
|
|
79
|
+
|
|
80
|
+
.checkout-error-message {
|
|
81
|
+
width: 100%;
|
|
82
|
+
margin-top: var(--account_collapseSmallDistance);
|
|
83
|
+
color: var(--account_secondaryColor13);
|
|
84
|
+
font-size: var(--account_p4);
|
|
85
|
+
line-height: var(--account_lineHeight);
|
|
86
|
+
}
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/components/TotalCheckout/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2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BAAqB,CAAC,KAAK,EAAE,EAAE,CACrF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB;;;;;;;;;;;;;;;;;;;;;;sCAsBhB,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,qBAAqB,CAAC,KAAK,EAAE,EAAE,CACrF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB;;;;;;;;;;;;;;;;;;;;;;sCAsBjB,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,qBAAqB,CAAC,KAAK,EAAE,EAAE,CACtF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,kBAAkB;;;;;;;;;;;;;;;;;;;;;;sCAsBd,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,qBAAqB,qBAAqB,CAAC,KAAK,EAAE,EAAE,CACnF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAyCf,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCrG,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export default Subscription;
|
|
2
|
-
declare function Subscription({ user, toggleSubscribe }: {
|
|
2
|
+
declare function Subscription({ user, toggleSubscribe, channels }: {
|
|
3
3
|
user: any;
|
|
4
4
|
toggleSubscribe: any;
|
|
5
|
+
channels?: {
|
|
6
|
+
email: boolean;
|
|
7
|
+
sms: boolean;
|
|
8
|
+
};
|
|
5
9
|
}): React.JSX.Element;
|
|
6
10
|
import React from 'react';
|
|
7
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/account/AccountSettingsTemplate/Subscription/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/account/AccountSettingsTemplate/Subscription/index.js"],"names":[],"mappings":";AAOA;;;;;;;sBA+HC;kBAtIuD,OAAO"}
|
|
@@ -1,44 +1,61 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useCallback } from 'react';
|
|
2
2
|
import SubscriptionStyle from './style';
|
|
3
|
-
import { Text, useTranslation } from '@weareconceptstudio/core';
|
|
4
|
-
import { AccountButton, CustomCheckbox } from '../../../../components';
|
|
5
|
-
const
|
|
3
|
+
import { Text, useTranslation, useUi } from '@weareconceptstudio/core';
|
|
4
|
+
import { AccountButton, CustomCheckbox, WarningMessageForPopup } from '../../../../components';
|
|
5
|
+
const defaultChannels = { email: true, sms: true };
|
|
6
|
+
const Subscription = ({ user, toggleSubscribe, channels = defaultChannels }) => {
|
|
6
7
|
const { translate } = useTranslation();
|
|
8
|
+
const { openPopup } = useUi();
|
|
9
|
+
const showEmail = channels.email !== false;
|
|
10
|
+
const showSms = channels.sms !== false;
|
|
7
11
|
//! States
|
|
8
12
|
const [edit, setEdit] = useState(false);
|
|
9
13
|
const [isEmailChecked, setIsEmailChecked] = useState(user.receive_email);
|
|
10
14
|
const [isSMSChecked, setIsSMSChecked] = useState(user.receive_phone_sms);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (!user || edit)
|
|
17
|
+
return;
|
|
18
|
+
setIsEmailChecked(!!user.receive_email);
|
|
19
|
+
setIsSMSChecked(!!user.receive_phone_sms);
|
|
20
|
+
}, [user, edit]);
|
|
21
|
+
//! Handle Popup
|
|
22
|
+
const handleSuccessPopup = useCallback(() => {
|
|
23
|
+
openPopup(React.createElement(WarningMessageForPopup, { title: 'account.account_info.yourSettingsHaveBeenSavedTitle', description: 'account.account_info.yourSettingsHaveBeenSavedDescription' }), {
|
|
24
|
+
className: 'messagePopup',
|
|
25
|
+
});
|
|
26
|
+
}, [openPopup]);
|
|
27
|
+
const handleToggle = async () => {
|
|
28
|
+
return await toggleSubscribe({
|
|
29
|
+
receive_email: showEmail ? isEmailChecked : user.receive_email,
|
|
30
|
+
receive_phone_sms: showSms ? isSMSChecked : user.receive_phone_sms,
|
|
15
31
|
}).then(() => {
|
|
16
32
|
setEdit(false);
|
|
33
|
+
handleSuccessPopup();
|
|
17
34
|
});
|
|
18
35
|
};
|
|
19
36
|
return user ? (React.createElement(SubscriptionStyle, { className: 'account-subscription' },
|
|
20
37
|
React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: `account.subscription.subscription` }),
|
|
21
38
|
!edit ? (React.createElement(React.Fragment, null,
|
|
22
|
-
React.createElement("div", { className: `info-item-wrap` },
|
|
39
|
+
showEmail ? (React.createElement("div", { className: `info-item-wrap` },
|
|
23
40
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
24
41
|
`${translate('account.subscription.email')}`,
|
|
25
42
|
":"),
|
|
26
43
|
"\u00A0",
|
|
27
44
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: user.receive_email
|
|
28
45
|
? 'account.subscription.subscribed'
|
|
29
|
-
: 'account.subscription.unsubscribed' })),
|
|
30
|
-
React.createElement("div", { className: `info-item-wrap` },
|
|
46
|
+
: 'account.subscription.unsubscribed' }))) : null,
|
|
47
|
+
showSms ? (React.createElement("div", { className: `info-item-wrap` },
|
|
31
48
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
32
49
|
`${translate('account.subscription.phone')}`,
|
|
33
50
|
":"),
|
|
34
51
|
"\u00A0",
|
|
35
52
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: user.receive_phone_sms
|
|
36
53
|
? 'account.subscription.subscribed'
|
|
37
|
-
: 'account.subscription.unsubscribed' })),
|
|
54
|
+
: 'account.subscription.unsubscribed' }))) : null,
|
|
38
55
|
React.createElement(AccountButton, { text: `account.general_actions.edit`, btnType: `green-large-text`, onClick: () => setEdit(true) }))) : (React.createElement("div", { className: 'subscription-checkbox-wrapper' },
|
|
39
56
|
React.createElement("div", { className: 'subscription-checkbox-inner-wrapper' },
|
|
40
|
-
React.createElement(CustomCheckbox, { isText: 'account.subscription.email', hide: isEmailChecked, setHide: setIsEmailChecked }),
|
|
41
|
-
React.createElement(CustomCheckbox, { isText: 'account.subscription.sms', hide: isSMSChecked, setHide: setIsSMSChecked })),
|
|
57
|
+
showEmail ? (React.createElement(CustomCheckbox, { isText: 'account.subscription.email', hide: isEmailChecked, setHide: setIsEmailChecked })) : null,
|
|
58
|
+
showSms ? (React.createElement(CustomCheckbox, { isText: 'account.subscription.sms', hide: isSMSChecked, setHide: setIsSMSChecked })) : null),
|
|
42
59
|
React.createElement("div", { className: `cancel-and-save-and-apply-wrap` },
|
|
43
60
|
React.createElement(AccountButton, { btnType: `green-large-text`, onClick: () => setEdit(false), text: `account.general_actions.cancel` }),
|
|
44
61
|
React.createElement(AccountButton, { btnType: `full-width`, text: `account.general_actions.saveChanges`, onClick: handleToggle })))))) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/account/AccountSettingsTemplate/Subscription/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/account/AccountSettingsTemplate/Subscription/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,E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@ -6,7 +6,15 @@ interface AccountSettingsProps {
|
|
|
6
6
|
passwordFormFields?: [];
|
|
7
7
|
onAccountUpdate: () => Promise<any>;
|
|
8
8
|
onPasswordUpdate: () => Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Optional override for subscription channel UI (defaults from AccountProvider globalSettings:
|
|
11
|
+
* hasSubscriptionEmail, hasSubscriptionSms).
|
|
12
|
+
*/
|
|
13
|
+
subscriptionPreferences?: {
|
|
14
|
+
email?: boolean;
|
|
15
|
+
sms?: boolean;
|
|
16
|
+
};
|
|
9
17
|
}
|
|
10
|
-
declare const AccountSettingsTemplate: ({ displayFields, accountFormFields, passwordFormFields }: AccountSettingsProps) => React.JSX.Element;
|
|
18
|
+
declare const AccountSettingsTemplate: ({ displayFields, accountFormFields, passwordFormFields, subscriptionPreferences, }: AccountSettingsProps) => React.JSX.Element;
|
|
11
19
|
export default AccountSettingsTemplate;
|
|
12
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/AccountSettingsTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,oBAAoB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/account/AccountSettingsTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,oBAAoB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,EAAE,CAAC;IACnB,iBAAiB,CAAC,EAAE,EAAE,CAAC;IACvB,kBAAkB,CAAC,EAAE,EAAE,CAAC;IACxB,eAAe,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC;;;OAGG;IACH,uBAAuB,CAAC,EAAE;QACzB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,GAAG,CAAC,EAAE,OAAO,CAAC;KACd,CAAC;CACF;AAED,QAAA,MAAM,uBAAuB,uFAK1B,oBAAoB,sBAkCtB,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -5,14 +5,17 @@ import AccountPassword from './AccountPassword';
|
|
|
5
5
|
import AccountSettingsTemplateStyle from './style';
|
|
6
6
|
import { useAccountContext } from '../../../AccountProvider';
|
|
7
7
|
import Subscription from './Subscription';
|
|
8
|
-
const AccountSettingsTemplate = ({ displayFields, accountFormFields, passwordFormFields }) => {
|
|
8
|
+
const AccountSettingsTemplate = ({ displayFields, accountFormFields, passwordFormFields, subscriptionPreferences, }) => {
|
|
9
9
|
const { useUser, globalSettings } = useAccountContext();
|
|
10
10
|
const { user, updateAccount, updatePassword, toggleSubscribe } = useUser();
|
|
11
|
+
const showSubscriptionEmail = subscriptionPreferences?.email ?? globalSettings.hasSubscriptionEmail !== false;
|
|
12
|
+
const showSubscriptionSms = subscriptionPreferences?.sms ?? globalSettings.hasSubscriptionSms !== false;
|
|
13
|
+
const hasAnySubscriptionChannel = showSubscriptionEmail || showSubscriptionSms;
|
|
11
14
|
return (React.createElement(AccountPageWrapper, { title: 'account.sidebar.accountSettings' },
|
|
12
15
|
React.createElement(AccountSettingsTemplateStyle, null,
|
|
13
16
|
React.createElement(AccountInfo, { user: user, onAccountUpdate: updateAccount, displayFields: displayFields, formFields: accountFormFields }),
|
|
14
17
|
React.createElement(AccountPassword, { onPasswordUpdate: updatePassword, formFields: passwordFormFields }),
|
|
15
|
-
globalSettings.hasSubscriptionSystem && (React.createElement(Subscription, { user: user, toggleSubscribe: toggleSubscribe })))));
|
|
18
|
+
globalSettings.hasSubscriptionSystem && hasAnySubscriptionChannel && (React.createElement(Subscription, { user: user, toggleSubscribe: toggleSubscribe, channels: { email: showSubscriptionEmail, sms: showSubscriptionSms } })))));
|
|
16
19
|
};
|
|
17
20
|
export default AccountSettingsTemplate;
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/account/AccountSettingsTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,MAAM,wCAAwC,CAAC;AACxE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,4BAA4B,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/account/AccountSettingsTemplate/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,MAAM,wCAAwC,CAAC;AACxE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,4BAA4B,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAmB1C,MAAM,uBAAuB,GAAG,CAAC,EAChC,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACD,EAAE,EAAE;IAC1B,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB,EAAE,CAAC;IACxD,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CAAC;IAE3E,MAAM,qBAAqB,GAC1B,uBAAuB,EAAE,KAAK,IAAI,cAAc,CAAC,oBAAoB,KAAK,KAAK,CAAC;IACjF,MAAM,mBAAmB,GAAG,uBAAuB,EAAE,GAAG,IAAI,cAAc,CAAC,kBAAkB,KAAK,KAAK,CAAC;IACxG,MAAM,yBAAyB,GAAG,qBAAqB,IAAI,mBAAmB,CAAC;IAE/E,OAAO,CACN,oBAAC,kBAAkB,IAAC,KAAK,EAAE,iCAAiC;QAC3D,oBAAC,4BAA4B;YAC5B,oBAAC,WAAW,IACX,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,aAAa,EAC9B,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,iBAAiB,GAC5B;YAEF,oBAAC,eAAe,IACf,gBAAgB,EAAE,cAAc,EAChC,UAAU,EAAE,kBAAkB,GAC7B;YAED,cAAc,CAAC,qBAAqB,IAAI,yBAAyB,IAAI,CACrE,oBAAC,YAAY,IACZ,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,mBAAmB,EAAE,GACnE,CACF,CAC6B,CACX,CACrB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,uBAAuB,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,sEA8CG;kBAtD8C,OAAO"}
|
|
@@ -13,7 +13,11 @@ const ShippingBillingForm = Memo(({ firstStepFormRef, title, className, type, du
|
|
|
13
13
|
const setFields = useCallback((fields) => {
|
|
14
14
|
const form = firstStepFormRef?.current;
|
|
15
15
|
if (form?.setValue) {
|
|
16
|
-
fields.forEach(({ name, value }) => form.setValue(name, value
|
|
16
|
+
fields.forEach(({ name, value }) => form.setValue(name, value, {
|
|
17
|
+
shouldValidate: false,
|
|
18
|
+
shouldDirty: true,
|
|
19
|
+
shouldTouch: true,
|
|
20
|
+
}));
|
|
17
21
|
}
|
|
18
22
|
}, []);
|
|
19
23
|
return (React.createElement(ShippingBillingFormStyle, { className: className || '' },
|
|
@@ -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,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,SAAS;AACT,OAAO,wBAAwB,MAAM,SAAS,CAAC;AAE/C,MAAM,mBAAmB,GAAG,IAAI,CAAC,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,GAAG,EAAE,EAAE,EAAE,EAAE;IACnG,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAE/E,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,EAAE;QAC/B,OAAO,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,mBAAmB,IAAI,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,CAA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,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;gBAC1B,cAAc,EAAE,KAAK;gBACrB,WAAW,EAAE,IAAI;gBACjB,WAAW,EAAE,IAAI;aACjB,CAAC,CACF,CAAC;QACH,CAAC;IACF,CAAC,EACD,EAAE,CACF,CAAC;IAEF,OAAO,CACN,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/index.js"],"names":[],"mappings":";AAaA,sEAmGE;kBAhH0B,OAAO"}
|
|
@@ -3,19 +3,48 @@ import { Text, useTranslation } from '@weareconceptstudio/core';
|
|
|
3
3
|
import { useAddressContext } from '../AddressProvider';
|
|
4
4
|
//* Style
|
|
5
5
|
import ShippingBillingInfoStyle from './style';
|
|
6
|
-
const
|
|
6
|
+
const normalizeText = (value) => {
|
|
7
|
+
if (!value || typeof value !== 'object')
|
|
8
|
+
return value;
|
|
9
|
+
return value.name || value.en || value.hy || value.ru || Object.values(value).find(Boolean) || '';
|
|
10
|
+
};
|
|
11
|
+
const ShippingBillingInfo = memo(({ className, shipping_address, billing_address, fulfillment_type, pickup_branch, scheduled_at }) => {
|
|
7
12
|
const { hasAddressType } = useAddressContext();
|
|
8
13
|
const { translate } = useTranslation();
|
|
14
|
+
const isPickup = fulfillment_type === 'pickup';
|
|
15
|
+
const isScheduledDelivery = fulfillment_type === 'scheduled_delivery';
|
|
16
|
+
const hasFulfillmentInfo = Boolean(fulfillment_type || pickup_branch || scheduled_at);
|
|
17
|
+
const showShippingAddress = !isPickup && Array.isArray(shipping_address) && shipping_address.length > 0;
|
|
9
18
|
return (React.createElement(ShippingBillingInfoStyle, { className: `${className || ''}` },
|
|
10
19
|
React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: hasAddressType
|
|
11
20
|
? 'account.order_balance.shippingAndBillingInfo'
|
|
12
21
|
: 'account.order_balance.shippingInfo' }),
|
|
13
22
|
React.createElement("div", { className: `info-space-line` }),
|
|
14
|
-
|
|
23
|
+
hasFulfillmentInfo ? (React.createElement("div", { className: `info-wrap fulfillment` },
|
|
24
|
+
fulfillment_type ? (React.createElement("div", { className: 'fulfillment-row' },
|
|
25
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
26
|
+
translate('account.order_balance.fulfillmentMethod'),
|
|
27
|
+
":"),
|
|
28
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1` }, translate(isPickup
|
|
29
|
+
? 'account.order_balance.takeaway'
|
|
30
|
+
: isScheduledDelivery
|
|
31
|
+
? 'account.order_balance.delivery'
|
|
32
|
+
: 'account.order_balance.asapDelivery')))) : null,
|
|
33
|
+
pickup_branch ? (React.createElement("div", { className: 'fulfillment-row' },
|
|
34
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
35
|
+
translate('account.order_balance.pickupBranch'),
|
|
36
|
+
":"),
|
|
37
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1` }, normalizeText(pickup_branch)))) : null,
|
|
38
|
+
scheduled_at ? (React.createElement("div", { className: 'fulfillment-row' },
|
|
39
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
40
|
+
translate('account.order_balance.scheduledTime'),
|
|
41
|
+
":"),
|
|
42
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1` }, scheduled_at))) : null)) : null,
|
|
43
|
+
showShippingAddress ? (React.createElement("div", { className: `info-wrap shipped` },
|
|
15
44
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 m-bot` },
|
|
16
|
-
translate('account.order_balance.
|
|
45
|
+
translate('account.order_balance.deliveryAddress'),
|
|
17
46
|
":"),
|
|
18
|
-
shipping_address.map((item, index) => (React.createElement(Text, { key: `shipping-${index}`, className: `account-p account-p3 account-font-regular account-primary-color1 nowrap ${index === shipping_address.length - 1 ? 'm-top' : ''}`, text: item }))))),
|
|
47
|
+
shipping_address.map((item, index) => (React.createElement(Text, { key: `shipping-${index}`, className: `account-p account-p3 account-font-regular account-primary-color1 nowrap ${index === shipping_address.length - 1 ? 'm-top' : ''}`, text: item }))))) : null,
|
|
19
48
|
hasAddressType && (billing_address !== null || billing_address?.length > 0) ? (React.createElement("div", { className: `info-wrap billed` },
|
|
20
49
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 m-bot` },
|
|
21
50
|
translate('account.order_balance.billedTo'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,iBAAiB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 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/style.js"],"names":[],"mappings":";AAEA,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/style.js"],"names":[],"mappings":";AAEA,iPAyHE"}
|
|
@@ -22,6 +22,20 @@ const ShippingBillingInfoStyle = styled.section `
|
|
|
22
22
|
margin-top: var(--account_billedMTop);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
.fulfillment {
|
|
26
|
+
margin-bottom: var(--account_billedMTop);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.fulfillment-row {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
gap: var(--sp0-5x, 2px);
|
|
33
|
+
|
|
34
|
+
&:not(:first-child) {
|
|
35
|
+
margin-top: var(--account_mBot);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
.m-bot {
|
|
26
40
|
margin-bottom: var(--account_mBot);
|
|
27
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,CAAA
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/address/ShippingBillingInfo/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCA6CT,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,qBAAqB,CAA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"}
|
|
@@ -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":";AAiBA;;;sBA2CC;kBA5DkC,OAAO"}
|
|
@@ -10,12 +10,15 @@ import { useAddressContext } from '../../../address';
|
|
|
10
10
|
import GuestContactInformation from '../../../guest/GuestContactInformation';
|
|
11
11
|
import GuestAddressForm from '../../../guest/GuestAddressForm';
|
|
12
12
|
import Delivery from '../../../delivery';
|
|
13
|
+
import { useCart } from '@weareconceptstudio/cart';
|
|
13
14
|
// TODO: NEW VERSIONS
|
|
14
15
|
const StepReview = ({ hidePayment = false, paymentProps }) => {
|
|
15
16
|
const { openPopup } = useUi();
|
|
16
17
|
const { checkout, globalSettings, useUser } = useAccountContext();
|
|
17
18
|
const { hasAddresses } = useAddressContext();
|
|
19
|
+
const { checkoutData } = useCart();
|
|
18
20
|
const { user } = useUser();
|
|
21
|
+
const isPickup = checkoutData?.fulfillmentType === 'pickup';
|
|
19
22
|
const handleSelectPopup = useCallback(() => {
|
|
20
23
|
openPopup(React.createElement(SelectPaymentMethodPopup, null), { className: 'popup-payment-block' });
|
|
21
24
|
}, []);
|
|
@@ -23,8 +26,8 @@ const StepReview = ({ hidePayment = false, paymentProps }) => {
|
|
|
23
26
|
React.createElement(Delivery, null),
|
|
24
27
|
globalSettings?.allowGuestCheckout && !user && (React.createElement(React.Fragment, null,
|
|
25
28
|
React.createElement(GuestContactInformation, null),
|
|
26
|
-
hasAddresses ? React.createElement(GuestAddressForm, null) : null)),
|
|
27
|
-
user && hasAddresses ? React.createElement(SelectAddress, null) : null,
|
|
29
|
+
hasAddresses && !isPickup ? React.createElement(GuestAddressForm, null) : null)),
|
|
30
|
+
user && hasAddresses && !isPickup ? React.createElement(SelectAddress, null) : null,
|
|
28
31
|
!hidePayment && (React.createElement(Payment, { title: 'account.payment_management.payment', onClick: handleSelectPopup, ...(paymentProps || {}) })),
|
|
29
32
|
React.createElement(CartItems, { className: `checkout-mt`, title: 'account.order_management.orderItems', additionalParameters: {
|
|
30
33
|
...checkout.item,
|
|
@@ -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;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,uBAAuB,MAAM,wCAAwC,CAAC;AAC7E,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,QAAQ,MAAM,mBAAmB,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,MAA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AAI,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAC,aAAa,OAAG,CAAC,CAAC,CAAC,IAAI;QAE5D,CAAC,WAAW,IAAI,CAChB,oBAAC,OAAO,IACP,KAAK,EAAE,oCAAoC,EAC3C,OAAO,EAAE,iBAAiB,KACtB,CAAC,YAAY,IAAI,EAAE,CAAC,GACvB,CACF;QAED,oBAAC,SAAS,IACT,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,qCAAqC,EAC5C,oBAAoB,EAAE;gBACrB,GAAG,QAAQ,CAAC,IAAI;gBAChB,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,IAAI,QAAQ,CAAC,OAAO,IAAI,EAAE;aACzD,GACA,CACG,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
export default StepShipping;
|
|
2
|
+
/**
|
|
3
|
+
* useSameAddress (CheckoutTemplate state): when true, the billing block is hidden and only the
|
|
4
|
+
* shipping form submits; ShippingBillingForm gets duplicateTo={['billing']} so createAddress also
|
|
5
|
+
* creates a billing address with the same payload. CheckoutTemplate.handleCheckoutFirstStep only
|
|
6
|
+
* calls shippingFormRef.submit() in that case.
|
|
7
|
+
*
|
|
8
|
+
* CustomCheckbox: hide={true} renders the checked icon (see CustomCheckbox); clicking calls
|
|
9
|
+
* setHide(!hide) — the next boolean is forwarded to setUseSameAddress.
|
|
10
|
+
*/
|
|
2
11
|
declare function StepShipping({ firstStepFormRef, shippingFormRef, billingFormRef, useSameAddress, setUseSameAddress, }: {
|
|
3
12
|
firstStepFormRef: any;
|
|
4
13
|
shippingFormRef: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepShipping/index.js"],"names":[],"mappings":";AAIA;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepShipping/index.js"],"names":[],"mappings":";AAIA;;;;;;;;GAQG;AACH;;;;;;sBAwEC;kBArFiB,OAAO"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AddressItem, ShippingBillingForm, useAddressContext } from '../../../address';
|
|
3
3
|
import { CustomCheckbox } from '../../../../components';
|
|
4
|
+
/**
|
|
5
|
+
* useSameAddress (CheckoutTemplate state): when true, the billing block is hidden and only the
|
|
6
|
+
* shipping form submits; ShippingBillingForm gets duplicateTo={['billing']} so createAddress also
|
|
7
|
+
* creates a billing address with the same payload. CheckoutTemplate.handleCheckoutFirstStep only
|
|
8
|
+
* calls shippingFormRef.submit() in that case.
|
|
9
|
+
*
|
|
10
|
+
* CustomCheckbox: hide={true} renders the checked icon (see CustomCheckbox); clicking calls
|
|
11
|
+
* setHide(!hide) — the next boolean is forwarded to setUseSameAddress.
|
|
12
|
+
*/
|
|
4
13
|
const StepShipping = ({ firstStepFormRef, shippingFormRef, billingFormRef, useSameAddress = false, setUseSameAddress, }) => {
|
|
5
|
-
const [hide, setHide] = useState(useSameAddress);
|
|
6
14
|
const { hasAddressType, addresses, selectedAddresses } = useAddressContext();
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
setHide(useSameAddress);
|
|
9
|
-
}, [useSameAddress]);
|
|
10
|
-
const handleToggleUseSameAddress = (value) => {
|
|
11
|
-
setHide(value);
|
|
12
|
-
setUseSameAddress?.(value);
|
|
13
|
-
};
|
|
14
15
|
return (React.createElement("div", { className: `billing-shipping-form-wrap` }, hasAddressType ? (React.createElement(React.Fragment, null,
|
|
15
16
|
addresses.shipping.length > 0 && selectedAddresses.shipping ? (React.createElement("div", { className: `shipping-address-wrapper` },
|
|
16
17
|
React.createElement(AddressItem, { title: 'account.address_management.shippingAddress', checkout_review: false, select_address: false, type: 'shipping', data: selectedAddresses.shipping }))) : (React.createElement(ShippingBillingForm, { type: 'shipping', title: 'account.address_management.shippingAddress', className: 'shipping-wrapper', firstStepFormRef: shippingFormRef, duplicateTo: useSameAddress ? ['billing'] : [] })),
|
|
17
|
-
!(addresses.billing.length > 0 || addresses.shipping.length > 0) && (React.createElement(CustomCheckbox, { hide:
|
|
18
|
-
!
|
|
18
|
+
!(addresses.billing.length > 0 || addresses.shipping.length > 0) && (React.createElement(CustomCheckbox, { hide: useSameAddress, setHide: (next) => setUseSameAddress?.(next), isText: 'account.order_balance.useAlsoBillingAddress' })),
|
|
19
|
+
!useSameAddress &&
|
|
19
20
|
(addresses.billing.length > 0 && selectedAddresses.billing ? (React.createElement("div", { className: `billing-address-wrapper` },
|
|
20
21
|
React.createElement(AddressItem, { type: 'billing', select_address: false, checkout_review: false, title: 'account.address_management.billingAddress', data: selectedAddresses.billing }))) : (React.createElement(ShippingBillingForm, { type: 'billing', title: 'account.address_management.billingAddress', className: 'billing-wrapper', firstStepFormRef: billingFormRef }))))) : (React.createElement(ShippingBillingForm, { firstStepFormRef: firstStepFormRef, title: 'account.address_management.address' }))));
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepShipping/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/checkout/CheckoutTemplate/StepShipping/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAM,YAAY,GAAG,CAAC,EACrB,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,cAAc,GAAG,KAAK,EACtB,iBAAiB,GACjB,EAAE,EAAE;IACJ,MAAM,EAA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E,2CAA2C,EAClD,IAAI,EAAE,iBAAiB,CAAC,OAAO,GAC9B,CACG,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,mBAAmB,IACnB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,2CAA2C,EAClD,SAAS,EAAE,iBAAiB,EAC5B,gBAAgB,EAAE,cAAc,GAC/B,CACF,CAAC,CACD,CACH,CAAC,CAAC,CAAC,CACH,oBAAC,mBAAmB,IACnB,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAC,oCAAoC,GACzC,CACF,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/DeliveryOptions/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/delivery/DeliveryOptions/index.js"],"names":[],"mappings":";AAqCA,sDAyUC;kBA9WmD,OAAO"}
|