@weareconceptstudio/account 0.5.1 → 0.5.2
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/TotalCheckout/BalanceComp/index.d.ts +1 -6
- package/dist/components/TotalCheckout/BalanceComp/index.js +15 -7
- package/dist/components/TotalCheckout/CommentComp/index.d.ts +1 -3
- package/dist/components/TotalCheckout/CommentComp/index.js +3 -1
- package/dist/components/TotalCheckout/FreeShippingComp/index.d.ts +1 -6
- package/dist/components/TotalCheckout/FreeShippingComp/index.js +6 -10
- package/dist/components/TotalCheckout/FreeShippingComp/style.js +0 -1
- package/dist/components/TotalCheckout/GiftComp/index.d.ts +3 -0
- package/dist/components/TotalCheckout/GiftComp/index.js +18 -0
- package/dist/components/TotalCheckout/GiftComp/style.d.ts +2 -0
- package/dist/components/TotalCheckout/GiftComp/style.js +100 -0
- package/dist/components/TotalCheckout/PromoCodeComp/index.d.ts +1 -5
- package/dist/components/TotalCheckout/PromoCodeComp/index.js +13 -7
- package/dist/components/TotalCheckout/index.js +9 -13
- package/dist/modules/cart/SimpleItems/Item/index.js +4 -4
- package/dist/modules/cart/SimpleItems/ItemMobile/index.js +4 -13
- package/dist/modules/cart/SimpleItems/index.js +2 -2
- package/dist/modules/cart/SimpleItems/{Item/util.js → util.js} +2 -2
- package/dist/translations/en.d.ts +5 -4
- package/dist/translations/en.js +5 -4
- package/dist/translations/hy.d.ts +5 -4
- package/dist/translations/hy.js +5 -4
- package/dist/translations/index.d.ts +15 -11
- package/dist/translations/ru.d.ts +5 -3
- package/dist/translations/ru.js +5 -3
- package/package.json +1 -1
- /package/dist/modules/cart/SimpleItems/{Item/util.d.ts → util.d.ts} +0 -0
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export default BalanceComp;
|
|
2
|
-
declare function BalanceComp({ isBalance
|
|
2
|
+
declare function BalanceComp({ isBalance }: {
|
|
3
3
|
isBalance?: boolean;
|
|
4
|
-
currency: any;
|
|
5
|
-
balance: any;
|
|
6
|
-
useBalance: any;
|
|
7
|
-
balanceHandler: any;
|
|
8
|
-
getItemCount: any;
|
|
9
4
|
}): React.JSX.Element;
|
|
10
5
|
import React from 'react';
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { Text, CollapseItem,
|
|
2
|
+
import { Text, CollapseItem, handlePriceCheckFunc, useTranslation } from '@weareconceptstudio/core';
|
|
3
3
|
import { FormBuilder } from '@weareconceptstudio/form';
|
|
4
|
+
import { useAccountContext } from '../../../AccountProvider';
|
|
5
|
+
import { useCheckoutContext } from '../../../modules';
|
|
4
6
|
import AccountButton from '../../AccountButton';
|
|
5
7
|
import { balanceFields } from './utils';
|
|
6
8
|
//* Style
|
|
7
9
|
import BalanceCompStyle from './style';
|
|
8
|
-
const BalanceComp = ({ isBalance = true
|
|
10
|
+
const BalanceComp = ({ isBalance = true }) => {
|
|
9
11
|
const { translate } = useTranslation();
|
|
10
|
-
|
|
12
|
+
const { useCart, useUser } = useAccountContext();
|
|
13
|
+
const { currency, itemsCount, useBalance } = useCart();
|
|
14
|
+
const { fillCart } = useCheckoutContext();
|
|
15
|
+
const { user } = useUser();
|
|
16
|
+
const balance = user?.balance || 0;
|
|
11
17
|
const [disable, setDisable] = useState(false);
|
|
12
|
-
|
|
18
|
+
const handleBalance = (amount) => {
|
|
19
|
+
fillCart('useBalance', amount);
|
|
20
|
+
};
|
|
13
21
|
const onFinish = (values) => {
|
|
14
22
|
setDisable(true);
|
|
15
|
-
|
|
23
|
+
handleBalance(values.balance);
|
|
16
24
|
};
|
|
17
|
-
return isBalance ? (React.createElement(BalanceCompStyle, { className: `collapse-distance ${
|
|
25
|
+
return isBalance ? (React.createElement(BalanceCompStyle, { className: `collapse-distance ${itemsCount && balance ? ' ' : 'disable'}` },
|
|
18
26
|
React.createElement(CollapseItem, { disable: useBalance || disable, title: React.createElement(React.Fragment, null,
|
|
19
27
|
React.createElement("div", { className: 'inner-wrapper-icon' },
|
|
20
28
|
React.createElement("svg", { width: '12', height: '12', fill: 'none', viewBox: '0 0 12 12', xmlns: 'http://www.w3.org/2000/svg' },
|
|
@@ -23,7 +31,7 @@ const BalanceComp = ({ isBalance = true, currency, balance, useBalance, balanceH
|
|
|
23
31
|
React.createElement(Text, { className: 'account-p account-p4 account-primary-color1 account-font-medium balance-text' }, `${translate('account.balance_promotions.useYourMoney')} (${handlePriceCheckFunc(balance, currency)} ${translate('account.balance_promotions.balance')})`)), description: React.createElement(React.Fragment, null, useBalance ? (React.createElement("div", { className: `balance-success-block` },
|
|
24
32
|
React.createElement(Text, { className: 'account-p account-p4 account-primary-color2 account-font-medium balance-success-text' }, handlePriceCheckFunc(useBalance, currency)),
|
|
25
33
|
React.createElement(Text, { text: 'account.general_actions.remove', className: 'account-p account-p4 account-primary-color2 account-font-medium balance-remove-text', onClick: () => {
|
|
26
|
-
|
|
34
|
+
handleBalance(null);
|
|
27
35
|
setDisable(false);
|
|
28
36
|
} }))) : (React.createElement(FormBuilder, { onSubmit: onFinish, fields: balanceFields, className: `balance-block`, formOptions: {
|
|
29
37
|
className: 'balance-container',
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CollapseContainer, CollapseItem, Text } from '@weareconceptstudio/core';
|
|
3
3
|
import { Input } from '@weareconceptstudio/form';
|
|
4
|
+
import { useCheckoutContext } from '../../../modules';
|
|
4
5
|
import CommentCompStyle from './style';
|
|
5
|
-
const CommentComp = (
|
|
6
|
+
const CommentComp = () => {
|
|
7
|
+
const { fillCheckoutData } = useCheckoutContext();
|
|
6
8
|
return (React.createElement(CommentCompStyle, { className: 'collapse-distance' },
|
|
7
9
|
React.createElement(CollapseContainer, null,
|
|
8
10
|
React.createElement(CollapseItem, { status: 'open', title: React.createElement(React.Fragment, null,
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
export default FreeShippingComp;
|
|
2
|
-
declare function FreeShippingComp(
|
|
3
|
-
shippingCostValue: any;
|
|
4
|
-
freeShippingRange: any;
|
|
5
|
-
shippingCost: any;
|
|
6
|
-
currency: any;
|
|
7
|
-
}): React.JSX.Element;
|
|
2
|
+
declare function FreeShippingComp(): React.JSX.Element;
|
|
8
3
|
import React from 'react';
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { handlePriceCheckFunc, useTranslation } from '@weareconceptstudio/core';
|
|
3
|
+
import { useAccountContext } from '../../../AccountProvider';
|
|
3
4
|
//* Style
|
|
4
5
|
import FreeShippingCompStyle from './style';
|
|
5
|
-
const FreeShippingComp = (
|
|
6
|
+
const FreeShippingComp = () => {
|
|
6
7
|
const { translate } = useTranslation();
|
|
8
|
+
const { useCart } = useAccountContext();
|
|
9
|
+
const { shippingCostValue, freeShippingRange, shippingCost, currency } = useCart();
|
|
7
10
|
return freeShippingRange ? (React.createElement(FreeShippingCompStyle, null,
|
|
8
11
|
React.createElement("svg", { fill: 'none', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
|
|
9
12
|
React.createElement("path", { d: 'M21.675 14.475V9.9L17.925 6.15H15.375V4.125H2.85C2.325 4.725 2.025 5.025 1.5 5.55V16.65H3.3C3.3 18.375 4.725 19.8 6.45 19.8C8.175 19.8 9.6 18.375 9.6 16.65H13.35C13.35 18.375 14.775 19.8 16.5 19.8C18.225 19.8 19.65 18.375 19.65 16.65H22.35V14.475H21.675ZM6.45 18.6C5.475 18.6 4.65 17.775 4.65 16.8C4.65 15.825 5.475 15 6.45 15C7.425 15 8.25 15.825 8.25 16.8C8.25 17.775 7.5 18.6 6.45 18.6ZM16.575 18.6C15.6 18.6 14.775 17.775 14.775 16.8C14.775 15.825 15.6 15 16.575 15C17.55 15 18.375 15.825 18.375 16.8C18.375 17.775 17.625 18.6 16.575 18.6ZM19.575 11.1H15.375V7.95H17.025L19.575 10.5V11.1Z' })),
|
|
10
|
-
React.createElement("span", { className: 'free-shipping-comp-attr' },
|
|
11
|
-
React.createElement("span", null, translate('account.notifications_messages.freeShippingText1')),
|
|
12
|
-
React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(freeShippingRange, currency)),
|
|
13
|
-
React.createElement("span", null, translate('account.notifications_messages.freeShippingText2'))))) : typeof shippingCost != 'number' ? (React.createElement(FreeShippingCompStyle, null,
|
|
13
|
+
React.createElement("span", { className: 'free-shipping-comp-attr' }, translate('account.notifications_messages.freeShippingNote', { price: React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(freeShippingRange, currency)) })))) : typeof shippingCost != 'number' ? (React.createElement(FreeShippingCompStyle, null,
|
|
14
14
|
React.createElement("svg", { fill: 'none', viewBox: '0 0 16 16', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
|
|
15
15
|
React.createElement("path", { d: 'M13.901 5.06321C13.835 5.1324 13.754 5.167 13.658 5.167C13.562 5.167 13.481 5.1324 13.415 5.06321L13.388 5.03491C13.2081 4.84621 12.9981 4.74871 12.7611 4.74242C12.5241 4.73613 12.3111 4.83363 12.1191 5.03491L8.90036 8.40947C8.83437 8.47866 8.75337 8.51326 8.65738 8.51326C8.56139 8.51326 8.48039 8.47866 8.4144 8.40947C8.3484 8.34028 8.3154 8.25537 8.3154 8.15473C8.3154 8.05409 8.3484 7.96917 8.4144 7.89998L11.5912 4.56945C11.8941 4.25181 12.2811 4.08827 12.7461 4.08512C13.2111 4.07883 13.595 4.23608 13.901 4.55687C13.967 4.62606 14 4.71097 14 4.81161C14 4.91225 13.967 4.99717 13.901 5.06636V5.06321ZM6.17655 3.19509C6.24255 3.1259 6.32354 3.09131 6.41954 3.09131C6.51553 3.09131 6.59652 3.1259 6.66252 3.19509L6.79151 3.33033C7.12449 3.67942 7.28648 4.11343 7.28348 4.63864C7.27748 5.16071 7.10949 5.59786 6.77651 5.94695L6.63552 6.09477C6.56953 6.16396 6.48853 6.19855 6.39254 6.19855C6.29655 6.19855 6.21555 6.16396 6.14956 6.09477C6.08356 6.02558 6.05056 5.94066 6.05056 5.84002C6.05056 5.73938 6.08356 5.65447 6.14956 5.58528L6.33554 5.39029C6.55453 5.16071 6.65652 4.89967 6.64152 4.60719C6.62652 4.31471 6.52453 4.06625 6.33554 3.86812L6.17955 3.70458C6.11356 3.63539 6.08056 3.55048 6.08056 3.44984C6.08056 3.3492 6.11356 3.26428 6.17955 3.19509H6.17655ZM8.58538 2.10378C8.65138 2.03459 8.73237 2 8.82837 2C8.92436 2 9.00535 2.03459 9.07135 2.10378L9.7253 2.78939C10.0193 3.10703 10.1723 3.50959 10.1813 3.99077C10.1903 4.4751 10.0433 4.87451 9.7403 5.19216L7.78744 7.23954C7.72145 7.30873 7.64045 7.34332 7.54446 7.34332C7.44846 7.34332 7.36747 7.30873 7.30147 7.23954C7.23548 7.17035 7.20248 7.08543 7.20248 6.9848C7.20248 6.88416 7.23548 6.79924 7.30147 6.73005L9.22434 4.71412C9.40433 4.52542 9.49132 4.28326 9.48832 3.99077C9.48232 3.69829 9.39233 3.45613 9.20934 3.26743L8.58238 2.61013C8.51639 2.54094 8.48339 2.45602 8.48339 2.35538C8.48339 2.25474 8.51639 2.16983 8.58238 2.10064L8.58538 2.10378ZM12.8601 9.64859C12.7941 9.71778 12.7131 9.75238 12.6171 9.75238C12.5211 9.75238 12.4401 9.71778 12.3741 9.64859L11.8761 9.12653C11.6572 8.89694 11.4292 8.78372 11.1922 8.78372C10.9552 8.78372 10.7272 8.89694 10.5082 9.12653L10.0373 9.62029C9.97129 9.68948 9.89029 9.72407 9.7943 9.72407C9.6983 9.72407 9.61731 9.68948 9.55131 9.62029C9.48532 9.5511 9.45232 9.46619 9.45232 9.36555C9.45232 9.26491 9.48532 9.17999 9.55131 9.1108L9.97728 8.66422C10.3103 8.31512 10.7092 8.13586 11.1742 8.12642C11.6392 8.11699 12.0381 8.28682 12.3711 8.63277L12.8541 9.13911C12.9201 9.2083 12.9531 9.29321 12.9531 9.39385C12.9531 9.49449 12.9201 9.5794 12.8541 9.64859H12.8601ZM2.36082 13.9855L9.01435 11.501C9.20034 11.4318 9.25434 11.1802 9.11335 11.0355L4.81765 6.6074C4.67666 6.46273 4.44268 6.51934 4.37668 6.71433L2.01585 13.6239C1.94085 13.8471 2.14484 14.0641 2.35783 13.9824L2.36082 13.9855Z' })),
|
|
16
|
-
React.createElement("span", { className: 'free-shipping-comp-attr' },
|
|
17
|
-
React.createElement("span", null, translate('account.notifications_messages.youHaveReachedFreeShipping')),
|
|
18
|
-
React.createElement("span", { className: 'range-value' },
|
|
19
|
-
handlePriceCheckFunc(shippingCostValue, currency),
|
|
20
|
-
"!")))) : null;
|
|
16
|
+
React.createElement("span", { className: 'free-shipping-comp-attr' }, translate('account.notifications_messages.freeShippingSuccessText', { price: React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(shippingCostValue, currency)) })))) : null;
|
|
21
17
|
};
|
|
22
18
|
export default FreeShippingComp;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { handlePriceCheckFunc, useTranslation } from '@weareconceptstudio/core';
|
|
3
|
+
import { useAccountContext } from '../../../AccountProvider';
|
|
4
|
+
//* Style
|
|
5
|
+
import GiftCompStyle from './style';
|
|
6
|
+
const GiftComp = () => {
|
|
7
|
+
const { translate } = useTranslation();
|
|
8
|
+
const { useCart } = useAccountContext();
|
|
9
|
+
const { hasFreeGift, giftThresholdRemaining, currency } = useCart();
|
|
10
|
+
return giftThresholdRemaining && !hasFreeGift ? (React.createElement(GiftCompStyle, null,
|
|
11
|
+
React.createElement("svg", { fill: 'none', viewBox: '0 0 24 23', className: 'gift-comp-icon', xmlns: 'http://www.w3.org/2000/svg' },
|
|
12
|
+
React.createElement("path", { d: 'M20.25 5.75003H16.9613C16.9978 5.71909 17.0353 5.68909 17.0709 5.65628C17.3557 5.40332 17.5851 5.09433 17.745 4.74864C17.9049 4.40295 17.9917 4.02799 18 3.64721C18.0123 3.23066 17.9394 2.81598 17.7856 2.42864C17.6319 2.0413 17.4006 1.68947 17.106 1.39474C16.8113 1.10002 16.4596 0.86863 16.0723 0.714771C15.685 0.560913 15.2703 0.487836 14.8538 0.500027C14.4728 0.508232 14.0977 0.594982 13.7518 0.754846C13.406 0.91471 13.0968 1.14425 12.8438 1.42909C12.4936 1.83493 12.2089 2.29294 12 2.78659C11.7911 2.29294 11.5064 1.83493 11.1562 1.42909C10.9032 1.14425 10.594 0.91471 10.2482 0.754846C9.90232 0.594982 9.52718 0.508232 9.14625 0.500027C8.72969 0.487836 8.31503 0.560913 7.92774 0.714771C7.54044 0.86863 7.18868 1.10002 6.89405 1.39474C6.59941 1.68947 6.36812 2.0413 6.21438 2.42864C6.06064 2.81598 5.98768 3.23066 6 3.64721C6.00833 4.02799 6.09514 4.40295 6.255 4.74864C6.41486 5.09433 6.64434 5.40332 6.92906 5.65628C6.96469 5.68721 7.00219 5.71721 7.03875 5.75003H3.75C3.35218 5.75003 2.97064 5.90806 2.68934 6.18937C2.40804 6.47067 2.25 6.8522 2.25 7.25003V10.25C2.25 10.6479 2.40804 11.0294 2.68934 11.3107C2.97064 11.592 3.35218 11.75 3.75 11.75V17.75C3.75 18.1479 3.90804 18.5294 4.18934 18.8107C4.47064 19.092 4.85218 19.25 5.25 19.25H10.875C10.9745 19.25 11.0698 19.2105 11.1402 19.1402C11.2105 19.0699 11.25 18.9745 11.25 18.875V10.25H3.75V7.25003H11.25V10.25H12.75V7.25003H20.25V10.25H12.75V18.875C12.75 18.9745 12.7895 19.0699 12.8598 19.1402C12.9302 19.2105 13.0255 19.25 13.125 19.25H18.75C19.1478 19.25 19.5294 19.092 19.8107 18.8107C20.092 18.5294 20.25 18.1479 20.25 17.75V11.75C20.6478 11.75 21.0294 11.592 21.3107 11.3107C21.592 11.0294 21.75 10.6479 21.75 10.25V7.25003C21.75 6.8522 21.592 6.47067 21.3107 6.18937C21.0294 5.90806 20.6478 5.75003 20.25 5.75003ZM7.92281 4.53128C7.79168 4.41253 7.68651 4.26795 7.61391 4.10661C7.54131 3.94528 7.50285 3.77068 7.50094 3.59378C7.4962 3.3865 7.53287 3.18036 7.60881 2.98743C7.68476 2.79451 7.79844 2.61868 7.9432 2.47025C8.08796 2.32182 8.26089 2.20378 8.45186 2.12304C8.64282 2.04229 8.84798 2.00047 9.05531 2.00003H9.10125C9.27815 2.00194 9.45275 2.0404 9.61409 2.113C9.77542 2.1856 9.92 2.29077 10.0388 2.4219C10.8253 3.31065 11.1028 4.7844 11.2003 5.69565C10.2853 5.59909 8.8125 5.32159 7.92281 4.53128ZM16.0791 4.53128C15.1894 5.31878 13.7128 5.59628 12.7978 5.69378C12.9094 4.70846 13.2188 3.26565 13.9688 2.42284C14.0875 2.2917 14.2321 2.18653 14.3934 2.11393C14.5547 2.04133 14.7293 2.00287 14.9062 2.00096H14.9522C15.1595 2.00226 15.3645 2.04493 15.5552 2.12647C15.7458 2.20801 15.9183 2.32678 16.0624 2.47582C16.2066 2.62487 16.3195 2.80118 16.3947 2.99444C16.4698 3.18769 16.5056 3.394 16.5 3.60128C16.4969 3.77698 16.4578 3.95019 16.3851 4.11016C16.3124 4.27013 16.2076 4.41347 16.0772 4.53128H16.0791Z' })),
|
|
13
|
+
React.createElement("span", { className: 'gift-comp-attr' }, translate('account.notifications_messages.giftNote', { price: React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(giftThresholdRemaining, currency)) })))) : hasFreeGift ? (React.createElement(GiftCompStyle, null,
|
|
14
|
+
React.createElement("svg", { fill: 'none', viewBox: '0 0 16 16', className: 'gift-comp-icon', xmlns: 'http://www.w3.org/2000/svg' },
|
|
15
|
+
React.createElement("path", { d: 'M13.901 5.06321C13.835 5.1324 13.754 5.167 13.658 5.167C13.562 5.167 13.481 5.1324 13.415 5.06321L13.388 5.03491C13.2081 4.84621 12.9981 4.74871 12.7611 4.74242C12.5241 4.73613 12.3111 4.83363 12.1191 5.03491L8.90036 8.40947C8.83437 8.47866 8.75337 8.51326 8.65738 8.51326C8.56139 8.51326 8.48039 8.47866 8.4144 8.40947C8.3484 8.34028 8.3154 8.25537 8.3154 8.15473C8.3154 8.05409 8.3484 7.96917 8.4144 7.89998L11.5912 4.56945C11.8941 4.25181 12.2811 4.08827 12.7461 4.08512C13.2111 4.07883 13.595 4.23608 13.901 4.55687C13.967 4.62606 14 4.71097 14 4.81161C14 4.91225 13.967 4.99717 13.901 5.06636V5.06321ZM6.17655 3.19509C6.24255 3.1259 6.32354 3.09131 6.41954 3.09131C6.51553 3.09131 6.59652 3.1259 6.66252 3.19509L6.79151 3.33033C7.12449 3.67942 7.28648 4.11343 7.28348 4.63864C7.27748 5.16071 7.10949 5.59786 6.77651 5.94695L6.63552 6.09477C6.56953 6.16396 6.48853 6.19855 6.39254 6.19855C6.29655 6.19855 6.21555 6.16396 6.14956 6.09477C6.08356 6.02558 6.05056 5.94066 6.05056 5.84002C6.05056 5.73938 6.08356 5.65447 6.14956 5.58528L6.33554 5.39029C6.55453 5.16071 6.65652 4.89967 6.64152 4.60719C6.62652 4.31471 6.52453 4.06625 6.33554 3.86812L6.17955 3.70458C6.11356 3.63539 6.08056 3.55048 6.08056 3.44984C6.08056 3.3492 6.11356 3.26428 6.17955 3.19509H6.17655ZM8.58538 2.10378C8.65138 2.03459 8.73237 2 8.82837 2C8.92436 2 9.00535 2.03459 9.07135 2.10378L9.7253 2.78939C10.0193 3.10703 10.1723 3.50959 10.1813 3.99077C10.1903 4.4751 10.0433 4.87451 9.7403 5.19216L7.78744 7.23954C7.72145 7.30873 7.64045 7.34332 7.54446 7.34332C7.44846 7.34332 7.36747 7.30873 7.30147 7.23954C7.23548 7.17035 7.20248 7.08543 7.20248 6.9848C7.20248 6.88416 7.23548 6.79924 7.30147 6.73005L9.22434 4.71412C9.40433 4.52542 9.49132 4.28326 9.48832 3.99077C9.48232 3.69829 9.39233 3.45613 9.20934 3.26743L8.58238 2.61013C8.51639 2.54094 8.48339 2.45602 8.48339 2.35538C8.48339 2.25474 8.51639 2.16983 8.58238 2.10064L8.58538 2.10378ZM12.8601 9.64859C12.7941 9.71778 12.7131 9.75238 12.6171 9.75238C12.5211 9.75238 12.4401 9.71778 12.3741 9.64859L11.8761 9.12653C11.6572 8.89694 11.4292 8.78372 11.1922 8.78372C10.9552 8.78372 10.7272 8.89694 10.5082 9.12653L10.0373 9.62029C9.97129 9.68948 9.89029 9.72407 9.7943 9.72407C9.6983 9.72407 9.61731 9.68948 9.55131 9.62029C9.48532 9.5511 9.45232 9.46619 9.45232 9.36555C9.45232 9.26491 9.48532 9.17999 9.55131 9.1108L9.97728 8.66422C10.3103 8.31512 10.7092 8.13586 11.1742 8.12642C11.6392 8.11699 12.0381 8.28682 12.3711 8.63277L12.8541 9.13911C12.9201 9.2083 12.9531 9.29321 12.9531 9.39385C12.9531 9.49449 12.9201 9.5794 12.8541 9.64859H12.8601ZM2.36082 13.9855L9.01435 11.501C9.20034 11.4318 9.25434 11.1802 9.11335 11.0355L4.81765 6.6074C4.67666 6.46273 4.44268 6.51934 4.37668 6.71433L2.01585 13.6239C1.94085 13.8471 2.14484 14.0641 2.35783 13.9824L2.36082 13.9855Z' })),
|
|
16
|
+
React.createElement("span", { className: 'gift-comp-attr' }, translate('account.notifications_messages.giftSuccessText')))) : null;
|
|
17
|
+
};
|
|
18
|
+
export default GiftComp;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default GiftCompStyle;
|
|
2
|
+
declare const GiftCompStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const GiftCompStyle = styled.div `
|
|
3
|
+
--account_giftBlockDistance: var(--sp5x);
|
|
4
|
+
--account_giftBlockPadTB: var(--sp2-5x);
|
|
5
|
+
--account_giftBlockPadLR: var(--sp2-5x);
|
|
6
|
+
--account_giftIconSize: var(--sp3x);
|
|
7
|
+
--account_giftAttrGap: var(--sp1-5x);
|
|
8
|
+
|
|
9
|
+
display: flex;
|
|
10
|
+
gap: var(--account_giftAttrGap);
|
|
11
|
+
|
|
12
|
+
margin: var(--account_giftBlockDistance) 0;
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
background-color: var(--account_surfaceColor);
|
|
15
|
+
padding: var(--account_giftBlockPadTB) var(--account_giftBlockPadLR);
|
|
16
|
+
border-radius: var(--sp1x);
|
|
17
|
+
|
|
18
|
+
.gift-comp-icon {
|
|
19
|
+
max-width: var(--account_giftIconSize);
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: var(--account_giftIconSize);
|
|
22
|
+
fill: var(--account_primaryColor3);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.gift-comp-attr {
|
|
26
|
+
color: var(--account_primaryColor2);
|
|
27
|
+
font-family: var(--account_Font);
|
|
28
|
+
font-size: var(--account_p4);
|
|
29
|
+
line-height: var(--account_lineHeight);
|
|
30
|
+
font-weight: 400;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.range-value {
|
|
34
|
+
font-weight: 700;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* //! 1920 */
|
|
38
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
39
|
+
--account_giftBlockDistance: var(--sp3-5x);
|
|
40
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
41
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
42
|
+
--account_giftIconSize: var(--sp3x);
|
|
43
|
+
--account_giftAttrGap: var(--sp1x);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* //! 1510 */
|
|
47
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
48
|
+
--account_giftBlockDistance: var(--sp4x);
|
|
49
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
50
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
51
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
52
|
+
--account_giftAttrGap: var(--sp1x);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* //! 1440 */
|
|
56
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
57
|
+
--account_giftBlockDistance: var(--sp3x);
|
|
58
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
59
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
60
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
61
|
+
--account_giftAttrGap: var(--sp1x);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* //! 1280 */
|
|
65
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
66
|
+
--account_giftBlockDistance: var(--sp3x);
|
|
67
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
68
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
69
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
70
|
+
--account_giftAttrGap: var(--sp1x);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* //! 1024 */
|
|
74
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
75
|
+
--account_giftBlockDistance: var(--sp3x);
|
|
76
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
77
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
78
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
79
|
+
--account_giftAttrGap: var(--sp1x);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* //! 768 */
|
|
83
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
84
|
+
--account_giftBlockDistance: var(--sp3x);
|
|
85
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
86
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
87
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
88
|
+
--account_giftAttrGap: var(--sp1x);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* //! Mobile */
|
|
92
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
93
|
+
--account_giftBlockDistance: var(--sp3x);
|
|
94
|
+
--account_giftBlockPadTB: var(--sp2x);
|
|
95
|
+
--account_giftBlockPadLR: var(--sp2x);
|
|
96
|
+
--account_giftIconSize: var(--sp2-5x);
|
|
97
|
+
--account_giftAttrGap: var(--sp1x);
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
100
|
+
export default GiftCompStyle;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export default PromoCodeComp;
|
|
2
|
-
declare function PromoCodeComp({ isPromoCode
|
|
2
|
+
declare function PromoCodeComp({ isPromoCode }: {
|
|
3
3
|
isPromoCode?: boolean;
|
|
4
|
-
promotionHandler: any;
|
|
5
|
-
usePromotion: any;
|
|
6
|
-
getItemCount: any;
|
|
7
|
-
appliedPromotions: any;
|
|
8
4
|
}): React.JSX.Element;
|
|
9
5
|
import React from 'react';
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
2
|
import { Text, CollapseItem } from '@weareconceptstudio/core';
|
|
3
3
|
import { FormBuilder } from '@weareconceptstudio/form';
|
|
4
|
+
import { useAccountContext } from '../../../AccountProvider';
|
|
5
|
+
import { useCheckoutContext } from '../../../modules';
|
|
4
6
|
import AccountButton from '../../AccountButton';
|
|
5
7
|
import AppliedPromotion from './AppliedPromotion';
|
|
6
8
|
import { promoCodeFields } from './utils';
|
|
7
9
|
//* Style
|
|
8
10
|
import PromoCodeCompStyle from './style';
|
|
9
|
-
const PromoCodeComp = ({ isPromoCode = true
|
|
10
|
-
|
|
11
|
+
const PromoCodeComp = ({ isPromoCode = true }) => {
|
|
12
|
+
const { useCart } = useAccountContext();
|
|
13
|
+
const { itemsCount, usePromotion, appliedPromotions } = useCart();
|
|
14
|
+
const { fillCart } = useCheckoutContext();
|
|
11
15
|
const [disable, setDisable] = useState(false);
|
|
12
|
-
|
|
16
|
+
const handlePromotion = (promotion) => {
|
|
17
|
+
fillCart('usePromotion', promotion);
|
|
18
|
+
};
|
|
13
19
|
const onFinish = (values) => {
|
|
14
20
|
setDisable(true);
|
|
15
|
-
|
|
21
|
+
handlePromotion(values.promo_code);
|
|
16
22
|
};
|
|
17
23
|
const promotions = useMemo(() => {
|
|
18
24
|
return appliedPromotions?.map((promotion) => React.createElement(AppliedPromotion, { ...promotion }));
|
|
19
25
|
}, [appliedPromotions]);
|
|
20
|
-
return isPromoCode ? (React.createElement(PromoCodeCompStyle, { className: `collapse-distance ${
|
|
21
|
-
React.createElement(CollapseItem, { status: appliedPromotions?.length ? 'open' : '
|
|
26
|
+
return isPromoCode ? (React.createElement(PromoCodeCompStyle, { className: `collapse-distance ${itemsCount ? '' : 'disable'}` },
|
|
27
|
+
React.createElement(CollapseItem, { status: appliedPromotions?.length ? 'open' : 'close', disable: disable, title: React.createElement(React.Fragment, null,
|
|
22
28
|
React.createElement("div", { className: 'inner-wrapper-icon' },
|
|
23
29
|
React.createElement("svg", { xmlns: 'http://www.w3.org/2000/svg', width: '12', height: '12', viewBox: '0 0 12 12', fill: 'none' },
|
|
24
30
|
React.createElement("path", { d: 'M0 6H12', stroke: 'black', strokeWidth: '2' }),
|
|
@@ -26,7 +32,7 @@ const PromoCodeComp = ({ isPromoCode = true, promotionHandler, usePromotion, get
|
|
|
26
32
|
React.createElement(Text, { className: 'account-p account-p4 account-primary-color1 account-font-medium promo-code-text', text: 'account.balance_promotions.gotPromotionCode' })), description: React.createElement(React.Fragment, null,
|
|
27
33
|
promotions,
|
|
28
34
|
usePromotion ? (React.createElement(AppliedPromotion, { name: usePromotion, onClick: () => {
|
|
29
|
-
|
|
35
|
+
handlePromotion(null);
|
|
30
36
|
setDisable(false);
|
|
31
37
|
} })) : (React.createElement(FormBuilder, { onSubmit: onFinish, fields: promoCodeFields, className: `promo-code-block`, formOptions: {
|
|
32
38
|
className: 'promo-code-container',
|
|
@@ -7,22 +7,17 @@ import FreeShippingComp from './FreeShippingComp';
|
|
|
7
7
|
import PromoCodeComp from './PromoCodeComp';
|
|
8
8
|
import BalanceComp from './BalanceComp';
|
|
9
9
|
import CommentComp from './CommentComp';
|
|
10
|
+
import GiftComp from './GiftComp';
|
|
10
11
|
//* Style
|
|
11
12
|
import TotalCheckoutStyle from './style';
|
|
12
13
|
//* Skeleton
|
|
13
14
|
import SkeletonTotalCheckout from './Skeleton';
|
|
14
15
|
const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps }) => {
|
|
15
|
-
const {
|
|
16
|
-
const {
|
|
16
|
+
const { useCart, useUser } = useAccountContext();
|
|
17
|
+
const { checkoutBtnDisabled, isCheckoutPage } = useCheckoutContext();
|
|
17
18
|
const { addressLoading } = useAddressContext();
|
|
18
19
|
const { user } = useUser();
|
|
19
|
-
const { itemsCount, shippingCost,
|
|
20
|
-
const handleBalance = (amount) => {
|
|
21
|
-
fillCart('useBalance', amount);
|
|
22
|
-
};
|
|
23
|
-
const handlePromotion = (promotion) => {
|
|
24
|
-
fillCart('usePromotion', promotion);
|
|
25
|
-
};
|
|
20
|
+
const { itemsCount, shippingCost, total, subtotal, useBalance, loading, discount, currency } = useCart();
|
|
26
21
|
const innerCollapseRef = useRef(null);
|
|
27
22
|
//! disable keypress on input
|
|
28
23
|
useEffect(() => {
|
|
@@ -74,12 +69,13 @@ const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps })
|
|
|
74
69
|
React.createElement("div", { className: `od-item-wrap` },
|
|
75
70
|
React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-total`, text: `account.order_balance.total` }),
|
|
76
71
|
React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-currency2`, text: itemsCount ? handlePriceCheckFunc(total, currency) : `0 ${currency}` })),
|
|
77
|
-
|
|
72
|
+
React.createElement(GiftComp, null),
|
|
73
|
+
!isCheckoutPage ? React.createElement(FreeShippingComp, null) : null,
|
|
78
74
|
React.createElement(CollapseContainer, { className: 'collapse-container-wrapper' },
|
|
79
75
|
React.createElement("div", { ref: innerCollapseRef },
|
|
80
|
-
React.createElement(BalanceComp,
|
|
81
|
-
React.createElement(PromoCodeComp,
|
|
82
|
-
isCheckoutPage && typeof isShipping === 'boolean' && !isShipping ? React.createElement(CommentComp,
|
|
76
|
+
React.createElement(BalanceComp, null),
|
|
77
|
+
React.createElement(PromoCodeComp, null))),
|
|
78
|
+
isCheckoutPage && typeof isShipping === 'boolean' && !isShipping ? React.createElement(CommentComp, null) : null,
|
|
83
79
|
React.createElement(AccountButton, { url: buttonProps.url, btnType: `full-width`, text: buttonProps.text, type: buttonProps.type, disabled: checkoutBtnDisabled, loading: buttonProps.loadingButton, className: `sticky-wrap-btn text-center`, onClick: () => buttonProps.handleClick && buttonProps.handleClick() }))) : (React.createElement(SkeletonTotalCheckout, null))))));
|
|
84
80
|
});
|
|
85
81
|
export default TotalCheckout;
|
|
@@ -2,7 +2,7 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import { handlePriceCheckFunc, Image, Text } from '@weareconceptstudio/core';
|
|
3
3
|
import { AccountButton, AccountCounter } from '../../../../components';
|
|
4
4
|
import { useAccountContext } from '../../../../AccountProvider';
|
|
5
|
-
import { defaultIconGift } from '
|
|
5
|
+
import { defaultIconGift } from '../util';
|
|
6
6
|
const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, giftIcon }) => {
|
|
7
7
|
const { handleProductClick } = useAccountContext();
|
|
8
8
|
return (React.createElement("div", { className: `${isGift ? 'item-gift-wrap' : 'item-wrap'}` },
|
|
@@ -10,7 +10,7 @@ const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, gi
|
|
|
10
10
|
React.createElement("div", { className: `${isGift ? 'item-gift-inner-wrapper' : 'item-inner-wrapper'}` },
|
|
11
11
|
React.createElement("div", { className: `col-item tl-col-1 col-item-1` },
|
|
12
12
|
React.createElement("div", { className: `image-wrapper` },
|
|
13
|
-
isGift ? giftIcon
|
|
13
|
+
isGift ? giftIcon || React.createElement("div", { className: 'wrapper-gift-icon' }, defaultIconGift) : null,
|
|
14
14
|
React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
|
|
15
15
|
React.createElement("div", { className: `col-1-right-wrap` },
|
|
16
16
|
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, className: `capitalize title-btn`, onClick: () => handleProductClick(data.product) }),
|
|
@@ -19,7 +19,7 @@ const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, gi
|
|
|
19
19
|
React.createElement("div", { className: `right-second-item-wrap` },
|
|
20
20
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: data.product.short_info_2 })))),
|
|
21
21
|
React.createElement("div", { className: `col-item tl-col-2` }, select && !isGift ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(AccountCounter, { productId: data?.product.id })) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty })))) : isGift ? (React.createElement("div", { className: 'wrapper-gift-button' },
|
|
22
|
-
React.createElement(AccountButton, { text: 'account.
|
|
22
|
+
React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `button-gift` }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
|
|
23
23
|
React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data.product?.sale_price ? (React.createElement("div", null,
|
|
24
24
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-price`, text: handlePriceCheckFunc(data.product.sale_price, currency) }),
|
|
25
25
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-price1`, text: handlePriceCheckFunc(data.product.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-price2`, text: handlePriceCheckFunc(isGift ? 0 : data.product.price, currency) }))),
|
|
@@ -29,7 +29,7 @@ const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, gi
|
|
|
29
29
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-total`, text: `${data.sale_total} ${currency}` }),
|
|
30
30
|
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-total1`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-total2`, text: `${isGift ? 0 : data.total} ${currency}` }))),
|
|
31
31
|
React.createElement("div", { className: `favorite-and-remove-wrap` }, remove && !isGift && (React.createElement("div", { className: `remove-btn-wrap` },
|
|
32
|
-
React.createElement(AccountButton, {
|
|
32
|
+
React.createElement(AccountButton, { btnType: `green-small-text`, className: 'cart-remove-btn', text: 'account.general_actions.remove', onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
|
|
33
33
|
isLast ? React.createElement("div", { className: 'line' }) : null));
|
|
34
34
|
});
|
|
35
35
|
export default Item;
|
|
@@ -2,24 +2,15 @@ import React, { memo } from 'react';
|
|
|
2
2
|
import { handlePriceCheckFunc, Image, Text, useTranslation } from '@weareconceptstudio/core';
|
|
3
3
|
import { AccountButton, AccountCounter } from '../../../../components';
|
|
4
4
|
import { useAccountContext } from '../../../../AccountProvider';
|
|
5
|
-
import { defaultIconGift } from '../
|
|
6
|
-
const ItemMobile = memo(({ data,
|
|
5
|
+
import { defaultIconGift } from '../util';
|
|
6
|
+
const ItemMobile = memo(({ data, select, currency, isGift, giftIcon }) => {
|
|
7
7
|
const { handleProductClick } = useAccountContext();
|
|
8
8
|
const { translate } = useTranslation();
|
|
9
|
-
// const selectionList = useMemo(() => {
|
|
10
|
-
// if (select) {
|
|
11
|
-
// const selectList = [];
|
|
12
|
-
// for (let index = 1; index <= maxQty; index++) {
|
|
13
|
-
// selectList.push({ id: index, name: index });
|
|
14
|
-
// }
|
|
15
|
-
// return selectList;
|
|
16
|
-
// }
|
|
17
|
-
// }, [data, select, maxQty]);
|
|
18
9
|
return (React.createElement(React.Fragment, null,
|
|
19
10
|
React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-wrap' : 'mobile-order-item-wrap'} user-select-none` },
|
|
20
11
|
React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-inner-wrap' : 'mobile-order-item-inner-wrap'}` },
|
|
21
12
|
React.createElement("div", { className: `mobile-image-wrap` },
|
|
22
|
-
isGift ? giftIcon
|
|
13
|
+
isGift ? giftIcon || React.createElement("div", { className: 'wrapper-gift-icon' }, defaultIconGift) : null,
|
|
23
14
|
React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
|
|
24
15
|
React.createElement("div", { className: `mobile-info-wrap` },
|
|
25
16
|
React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, className: `capitalize mobile-info-wrap-title`, onClick: () => handleProductClick(data.product) }),
|
|
@@ -41,7 +32,7 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency, isGi
|
|
|
41
32
|
"\u00A0",
|
|
42
33
|
React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity2`, text: data.qty }))),
|
|
43
34
|
isGift ? (React.createElement("div", { className: 'wrapper-gift-button' },
|
|
44
|
-
React.createElement(AccountButton, { text: 'account.
|
|
35
|
+
React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `capitalize button-gift` }))) : null)))),
|
|
45
36
|
React.createElement("div", { className: 'line' })));
|
|
46
37
|
});
|
|
47
38
|
export default ItemMobile;
|
|
@@ -24,11 +24,11 @@ const CartItems = memo(({ data, className, title, smallFontSize, additionalParam
|
|
|
24
24
|
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 nowrap align-right`, text: `account.order_balance.total` }))),
|
|
25
25
|
React.createElement("div", { className: `items-wrap` }, data?.length > 0
|
|
26
26
|
? data.map((item, index) => {
|
|
27
|
-
return (React.createElement(Item, {
|
|
27
|
+
return (React.createElement(Item, { key: index, data: item, maxQty: maxQty, actions: actions, currency: currency, isGift: item.is_gift, isLast: data.length - 1 == index, select: additionalParameters.select, remove: additionalParameters.remove, edit: additionalParameters.edit.item }));
|
|
28
28
|
})
|
|
29
29
|
: null))) : (React.createElement("div", { className: `mobile-order-items-table-wrap` }, data?.length > 0
|
|
30
30
|
? data.map((item, index) => {
|
|
31
|
-
return (React.createElement(ItemMobile, {
|
|
31
|
+
return (React.createElement(ItemMobile, { key: index, data: item, maxQty: maxQty, actions: actions, currency: currency, isGift: item.is_gift, select: additionalParameters.select, remove: additionalParameters.remove, edit: additionalParameters.edit.item }));
|
|
32
32
|
})
|
|
33
33
|
: null));
|
|
34
34
|
}, [winWidth, data, additionalParameters, currency, actions, maxQty]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export const defaultIconGift = (React.createElement("svg", {
|
|
3
|
-
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'
|
|
2
|
+
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
|
+
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' })));
|
|
@@ -60,7 +60,6 @@ declare const _default: {
|
|
|
60
60
|
phonePlaceholder: string;
|
|
61
61
|
};
|
|
62
62
|
cart_checkout: {
|
|
63
|
-
restore: string;
|
|
64
63
|
editCart: string;
|
|
65
64
|
cartEmpty: string;
|
|
66
65
|
cartEmptyDesc: string;
|
|
@@ -146,6 +145,7 @@ declare const _default: {
|
|
|
146
145
|
continueShopping: string;
|
|
147
146
|
color: string;
|
|
148
147
|
size: string;
|
|
148
|
+
restore: string;
|
|
149
149
|
};
|
|
150
150
|
user_status: {
|
|
151
151
|
tourist: string;
|
|
@@ -167,9 +167,10 @@ declare const _default: {
|
|
|
167
167
|
thankYou: string;
|
|
168
168
|
titleExpired: string;
|
|
169
169
|
descriptionExpired: string;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
freeShippingNote: string;
|
|
171
|
+
freeShippingSuccessText: string;
|
|
172
|
+
giftNote: string;
|
|
173
|
+
giftSuccessText: string;
|
|
173
174
|
};
|
|
174
175
|
account_deletion: {
|
|
175
176
|
deleteAccountTextPart1: string;
|
package/dist/translations/en.js
CHANGED
|
@@ -60,7 +60,6 @@ export default {
|
|
|
60
60
|
phonePlaceholder: 'Phone',
|
|
61
61
|
},
|
|
62
62
|
cart_checkout: {
|
|
63
|
-
restore: 'restore',
|
|
64
63
|
editCart: 'Edit cart',
|
|
65
64
|
cartEmpty: 'Your cart is empty',
|
|
66
65
|
cartEmptyDesc: 'Once you add something to your cart, it will appear here. Ready to get started?',
|
|
@@ -146,6 +145,7 @@ export default {
|
|
|
146
145
|
continueShopping: 'Continue shopping',
|
|
147
146
|
color: 'Color',
|
|
148
147
|
size: 'Size',
|
|
148
|
+
restore: 'Restore',
|
|
149
149
|
},
|
|
150
150
|
user_status: {
|
|
151
151
|
tourist: 'tourist',
|
|
@@ -167,9 +167,10 @@ export default {
|
|
|
167
167
|
thankYou: 'Thank you',
|
|
168
168
|
titleExpired: 'Link expired',
|
|
169
169
|
descriptionExpired: 'To reset your password, return to the login page and select “forgot your password” to send a new email.',
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
freeShippingNote: "You're just {price} away from free shipping in Yerevan!",
|
|
171
|
+
freeShippingSuccessText: 'Hooray, You’re saving {price}!',
|
|
172
|
+
giftNote: 'Add just {price} more to receive a gift!',
|
|
173
|
+
giftSuccessText: 'Your gift is ready.',
|
|
173
174
|
},
|
|
174
175
|
account_deletion: {
|
|
175
176
|
deleteAccountTextPart1: 'If your email address is incorrect,',
|
|
@@ -60,7 +60,6 @@ declare const _default: {
|
|
|
60
60
|
phonePlaceholder: string;
|
|
61
61
|
};
|
|
62
62
|
cart_checkout: {
|
|
63
|
-
restore: string;
|
|
64
63
|
editCart: string;
|
|
65
64
|
cartEmpty: string;
|
|
66
65
|
cartEmptyDesc: string;
|
|
@@ -146,6 +145,7 @@ declare const _default: {
|
|
|
146
145
|
continueShopping: string;
|
|
147
146
|
color: string;
|
|
148
147
|
size: string;
|
|
148
|
+
restore: string;
|
|
149
149
|
};
|
|
150
150
|
user_status: {
|
|
151
151
|
tourist: string;
|
|
@@ -167,9 +167,10 @@ declare const _default: {
|
|
|
167
167
|
thankYou: string;
|
|
168
168
|
titleExpired: string;
|
|
169
169
|
descriptionExpired: string;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
freeShippingNote: string;
|
|
171
|
+
freeShippingSuccessText: string;
|
|
172
|
+
giftNote: string;
|
|
173
|
+
giftSuccessText: string;
|
|
173
174
|
};
|
|
174
175
|
account_deletion: {
|
|
175
176
|
deleteAccountTextPart1: string;
|
package/dist/translations/hy.js
CHANGED
|
@@ -60,7 +60,6 @@ export default {
|
|
|
60
60
|
phonePlaceholder: 'Հեռախոս',
|
|
61
61
|
},
|
|
62
62
|
cart_checkout: {
|
|
63
|
-
restore: 'Վերականգնել',
|
|
64
63
|
editCart: 'Խմբագրել զամբյուղը',
|
|
65
64
|
cartEmpty: 'Ձեր զամբյուղը դատարկ է',
|
|
66
65
|
cartEmptyDesc: 'Երբ դուք ինչ-որ բան ավելացնեք ձեր զամբյուղին, այն կհայտնվի այստեղ։ Պատրա՞ստ եք սկսել։',
|
|
@@ -146,6 +145,7 @@ export default {
|
|
|
146
145
|
continueShopping: 'Շարունակել գնումները',
|
|
147
146
|
color: 'Գույն',
|
|
148
147
|
size: 'Չափ',
|
|
148
|
+
restore: 'Վերականգնել',
|
|
149
149
|
},
|
|
150
150
|
user_status: {
|
|
151
151
|
tourist: 'տուրիստ',
|
|
@@ -167,9 +167,10 @@ export default {
|
|
|
167
167
|
thankYou: 'Շնորհակալություն',
|
|
168
168
|
titleExpired: 'Հղումը ժամկետանց է',
|
|
169
169
|
descriptionExpired: 'Գաղտնաբառը վերականգնելու համար վերադարձեք մուտքի էջ և ընտրեք «Մոռացել եք գաղտնաբառը»՝ նոր էլ. փոստ ուղարկելու համար։',
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
freeShippingNote: 'Ձեզ ընդամենը {price} է հարկավոր Երևանում անվճար առաքման համար:',
|
|
171
|
+
freeShippingSuccessText: 'Շնորհավոր, դուք խնայեցիք {price}!',
|
|
172
|
+
giftNote: 'Նվեր ստանալու համար ավելացրեք ընդամենը {price}:',
|
|
173
|
+
giftSuccessText: 'Ձեր նվերը պատրաստ է։',
|
|
173
174
|
},
|
|
174
175
|
account_deletion: {
|
|
175
176
|
deleteAccountTextPart1: 'Եթե ձեր էլ. փոստի հասցեն սխալ է,',
|
|
@@ -61,7 +61,6 @@ declare const _default: {
|
|
|
61
61
|
phonePlaceholder: string;
|
|
62
62
|
};
|
|
63
63
|
cart_checkout: {
|
|
64
|
-
restore: string;
|
|
65
64
|
editCart: string;
|
|
66
65
|
cartEmpty: string;
|
|
67
66
|
cartEmptyDesc: string;
|
|
@@ -147,6 +146,7 @@ declare const _default: {
|
|
|
147
146
|
continueShopping: string;
|
|
148
147
|
color: string;
|
|
149
148
|
size: string;
|
|
149
|
+
restore: string;
|
|
150
150
|
};
|
|
151
151
|
user_status: {
|
|
152
152
|
tourist: string;
|
|
@@ -168,9 +168,10 @@ declare const _default: {
|
|
|
168
168
|
thankYou: string;
|
|
169
169
|
titleExpired: string;
|
|
170
170
|
descriptionExpired: string;
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
freeShippingNote: string;
|
|
172
|
+
freeShippingSuccessText: string;
|
|
173
|
+
giftNote: string;
|
|
174
|
+
giftSuccessText: string;
|
|
174
175
|
};
|
|
175
176
|
account_deletion: {
|
|
176
177
|
deleteAccountTextPart1: string;
|
|
@@ -301,7 +302,6 @@ declare const _default: {
|
|
|
301
302
|
phonePlaceholder: string;
|
|
302
303
|
};
|
|
303
304
|
cart_checkout: {
|
|
304
|
-
restore: string;
|
|
305
305
|
editCart: string;
|
|
306
306
|
cartEmpty: string;
|
|
307
307
|
cartEmptyDesc: string;
|
|
@@ -387,6 +387,7 @@ declare const _default: {
|
|
|
387
387
|
continueShopping: string;
|
|
388
388
|
color: string;
|
|
389
389
|
size: string;
|
|
390
|
+
restore: string;
|
|
390
391
|
};
|
|
391
392
|
user_status: {
|
|
392
393
|
tourist: string;
|
|
@@ -408,9 +409,10 @@ declare const _default: {
|
|
|
408
409
|
thankYou: string;
|
|
409
410
|
titleExpired: string;
|
|
410
411
|
descriptionExpired: string;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
412
|
+
freeShippingNote: string;
|
|
413
|
+
freeShippingSuccessText: string;
|
|
414
|
+
giftNote: string;
|
|
415
|
+
giftSuccessText: string;
|
|
414
416
|
};
|
|
415
417
|
account_deletion: {
|
|
416
418
|
deleteAccountTextPart1: string;
|
|
@@ -627,6 +629,7 @@ declare const _default: {
|
|
|
627
629
|
continueShopping: string;
|
|
628
630
|
color: string;
|
|
629
631
|
size: string;
|
|
632
|
+
restore: string;
|
|
630
633
|
};
|
|
631
634
|
user_status: {
|
|
632
635
|
tourist: string;
|
|
@@ -648,9 +651,10 @@ declare const _default: {
|
|
|
648
651
|
thankYou: string;
|
|
649
652
|
titleExpired: string;
|
|
650
653
|
descriptionExpired: string;
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
+
freeShippingNote: string;
|
|
655
|
+
freeShippingSuccessText: string;
|
|
656
|
+
giftNote: string;
|
|
657
|
+
giftSuccessText: string;
|
|
654
658
|
};
|
|
655
659
|
account_deletion: {
|
|
656
660
|
deleteAccountTextPart1: string;
|
|
@@ -146,6 +146,7 @@ declare const _default: {
|
|
|
146
146
|
continueShopping: string;
|
|
147
147
|
color: string;
|
|
148
148
|
size: string;
|
|
149
|
+
restore: string;
|
|
149
150
|
};
|
|
150
151
|
user_status: {
|
|
151
152
|
tourist: string;
|
|
@@ -167,9 +168,10 @@ declare const _default: {
|
|
|
167
168
|
thankYou: string;
|
|
168
169
|
titleExpired: string;
|
|
169
170
|
descriptionExpired: string;
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
freeShippingNote: string;
|
|
172
|
+
freeShippingSuccessText: string;
|
|
173
|
+
giftNote: string;
|
|
174
|
+
giftSuccessText: string;
|
|
173
175
|
};
|
|
174
176
|
account_deletion: {
|
|
175
177
|
deleteAccountTextPart1: string;
|
package/dist/translations/ru.js
CHANGED
|
@@ -146,6 +146,7 @@ export default {
|
|
|
146
146
|
continueShopping: 'Продолжить покупки',
|
|
147
147
|
color: 'Цвет',
|
|
148
148
|
size: 'Размер',
|
|
149
|
+
restore: 'Восстановить',
|
|
149
150
|
},
|
|
150
151
|
user_status: {
|
|
151
152
|
tourist: 'Турист',
|
|
@@ -167,9 +168,10 @@ export default {
|
|
|
167
168
|
thankYou: 'Спасибо',
|
|
168
169
|
titleExpired: 'Ссылка устарела',
|
|
169
170
|
descriptionExpired: 'Чтобы сбросить пароль, вернитесь на страницу входа и выберите "Забыли пароль?", чтобы отправить новое письмо.',
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
freeShippingNote: 'Всего {price} отделяют вас от бесплатной доставки в Ереване!',
|
|
172
|
+
freeShippingSuccessText: 'Ура, вы экономите {price}!',
|
|
173
|
+
giftNote: 'Добавьте всего {price} и получите подарок!',
|
|
174
|
+
giftSuccessText: 'Ваш подарок готов.',
|
|
173
175
|
},
|
|
174
176
|
account_deletion: {
|
|
175
177
|
deleteAccountTextPart1: 'Если ваш адрес электронной почты неверен,',
|
package/package.json
CHANGED
|
File without changes
|