@weareconceptstudio/account 0.5.2 → 0.5.3

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.
Files changed (28) hide show
  1. package/dist/components/AccountCounter/index.d.ts +3 -1
  2. package/dist/components/AccountCounter/index.js +6 -4
  3. package/dist/components/TotalCheckout/FreeShippingComp/index.js +4 -2
  4. package/dist/components/TotalCheckout/PromoCodeComp/index.js +2 -2
  5. package/dist/components/TotalCheckout/index.js +28 -25
  6. package/dist/components/TotalCheckout/style.js +22 -8
  7. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.js +5 -9
  8. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.js +1 -6
  9. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js +1 -1
  10. package/dist/modules/account/AccountBalanceTemplate/index.js +3 -3
  11. package/dist/modules/auth/ForgotPasswordTemplate/index.js +1 -3
  12. package/dist/modules/cart/SimpleItems/Item/index.js +7 -4
  13. package/dist/modules/cart/SimpleItems/ItemMobile/index.js +5 -2
  14. package/dist/modules/cart/SimpleItems/index.js +1 -1
  15. package/dist/modules/cart/SimpleItems/style.js +11 -0
  16. package/dist/modules/checkout/CheckoutProvider.js +14 -1
  17. package/dist/modules/order/OrderedItems/index.js +20 -18
  18. package/dist/modules/payment/AddNewCard/style.js +1 -0
  19. package/dist/styles/theme.js +10 -10
  20. package/dist/styles/variables.js +2 -0
  21. package/dist/translations/en.d.ts +5 -8
  22. package/dist/translations/en.js +6 -9
  23. package/dist/translations/hy.d.ts +5 -8
  24. package/dist/translations/hy.js +9 -12
  25. package/dist/translations/index.d.ts +15 -24
  26. package/dist/translations/ru.d.ts +5 -8
  27. package/dist/translations/ru.js +6 -9
  28. package/package.json +1 -1
@@ -1,6 +1,8 @@
1
1
  export default AccountCounter;
2
- declare function AccountCounter({ productId, qty }: {
2
+ declare function AccountCounter({ productId, qty, isGift, maxQty }: {
3
3
  productId: any;
4
4
  qty?: number;
5
+ isGift: any;
6
+ maxQty: any;
5
7
  }): React.JSX.Element;
6
8
  import React from 'react';
@@ -1,15 +1,17 @@
1
1
  import React, { useState, useCallback, useEffect } from 'react';
2
2
  import { Text, debounce } from '@weareconceptstudio/core';
3
3
  import { useAccountContext } from '../../AccountProvider';
4
+ import { useCheckoutContext } from '../../modules';
4
5
  //* Style
5
6
  import AccountCounterStyle from './style';
6
- const AccountCounter = ({ productId, qty = 1 }) => {
7
+ const AccountCounter = ({ productId, qty = 1, isGift, maxQty }) => {
7
8
  const { useCart } = useAccountContext();
8
9
  const { toggleCartItem, items } = useCart();
10
+ const { setCheckGift } = useCheckoutContext();
9
11
  //! State
10
12
  const [count, setCount] = useState(qty);
11
13
  useEffect(() => {
12
- setCount(items.find((item) => item.product.id == productId)?.qty || qty);
14
+ setCount(items.find((item) => item.product.id == productId && !item.is_gift)?.qty || qty);
13
15
  }, [items]);
14
16
  const updateCartServer = useCallback((quantity) => {
15
17
  toggleCartItem({
@@ -22,7 +24,7 @@ const AccountCounter = ({ productId, qty = 1 }) => {
22
24
  e.stopPropagation();
23
25
  const newCount = type == 'inc' ? count + 1 : count - 1;
24
26
  setCount(newCount);
25
- debouncedUpdateCartServer(newCount);
27
+ isGift ? (newCount == 0 ? setCheckGift() : null) : debouncedUpdateCartServer(newCount);
26
28
  };
27
29
  return (React.createElement(AccountCounterStyle, { onClick: (e) => e.stopPropagation(), className: `counter-block ${count == 0 ? 'opacity-zero pointer-none' : ''}` },
28
30
  React.createElement("div", { className: 'counter' },
@@ -30,7 +32,7 @@ const AccountCounter = ({ productId, qty = 1 }) => {
30
32
  React.createElement("svg", { fill: 'none', viewBox: '0 0 13 3', className: `minus`, xmlns: 'http://www.w3.org/2000/svg' },
31
33
  React.createElement("path", { d: 'M0 1.5H12', strokeWidth: '2' }))),
32
34
  React.createElement(Text, { className: `p p5 font-montserrat-arm-medium count` }, `${count}`),
33
- React.createElement("div", { onClick: (e) => handleAddToCart(e, 'inc'), className: `c-icon-block ${count == 99 ? 'disable' : ''}` },
35
+ React.createElement("div", { onClick: (e) => handleAddToCart(e, 'inc'), className: `c-icon-block ${count >= maxQty || count == 99 ? 'disable' : ''}` },
34
36
  React.createElement("svg", { fill: 'none', className: `plus`, viewBox: '0 0 12 12', xmlns: 'http://www.w3.org/2000/svg' },
35
37
  React.createElement("path", { d: 'M0 6H12', strokeWidth: '2' }),
36
38
  React.createElement("path", { d: 'M6 12L6 0', strokeWidth: '2' }))))));
@@ -1,18 +1,20 @@
1
1
  import React from 'react';
2
2
  import { handlePriceCheckFunc, useTranslation } from '@weareconceptstudio/core';
3
3
  import { useAccountContext } from '../../../AccountProvider';
4
+ import { useCheckoutContext } from '../../../modules';
4
5
  //* Style
5
6
  import FreeShippingCompStyle from './style';
6
7
  const FreeShippingComp = () => {
7
8
  const { translate } = useTranslation();
8
9
  const { useCart } = useAccountContext();
10
+ const { isCheckoutPage } = useCheckoutContext();
9
11
  const { shippingCostValue, freeShippingRange, shippingCost, currency } = useCart();
10
- return freeShippingRange ? (React.createElement(FreeShippingCompStyle, null,
12
+ return !isCheckoutPage ? (freeShippingRange ? (React.createElement(FreeShippingCompStyle, null,
11
13
  React.createElement("svg", { fill: 'none', viewBox: '0 0 24 24', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
12
14
  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' })),
13
15
  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
16
  React.createElement("svg", { fill: 'none', viewBox: '0 0 16 16', xmlns: 'http://www.w3.org/2000/svg', className: 'free-shipping-comp-icon' },
15
17
  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' }, translate('account.notifications_messages.freeShippingSuccessText', { price: React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(shippingCostValue, currency)) })))) : null;
18
+ React.createElement("span", { className: 'free-shipping-comp-attr' }, translate('account.notifications_messages.freeShippingSuccessText', { price: React.createElement("span", { className: 'range-value' }, handlePriceCheckFunc(shippingCostValue, currency)) })))) : null) : null;
17
19
  };
18
20
  export default FreeShippingComp;
@@ -21,7 +21,7 @@ const PromoCodeComp = ({ isPromoCode = true }) => {
21
21
  handlePromotion(values.promo_code);
22
22
  };
23
23
  const promotions = useMemo(() => {
24
- return appliedPromotions?.map((promotion) => React.createElement(AppliedPromotion, { ...promotion }));
24
+ return appliedPromotions?.map((promotion, index) => (React.createElement(AppliedPromotion, { key: index, ...promotion })));
25
25
  }, [appliedPromotions]);
26
26
  return isPromoCode ? (React.createElement(PromoCodeCompStyle, { className: `collapse-distance ${itemsCount ? '' : 'disable'}` },
27
27
  React.createElement(CollapseItem, { status: appliedPromotions?.length ? 'open' : 'close', disable: disable, title: React.createElement(React.Fragment, null,
@@ -37,6 +37,6 @@ const PromoCodeComp = ({ isPromoCode = true }) => {
37
37
  } })) : (React.createElement(FormBuilder, { onSubmit: onFinish, fields: promoCodeFields, className: `promo-code-block`, formOptions: {
38
38
  className: 'promo-code-container',
39
39
  } },
40
- React.createElement(AccountButton, { text: `account.general_actions.add`, type: 'submit', btnType: `promo-code-version` })))) }))) : null;
40
+ React.createElement(AccountButton, { type: 'submit', btnType: `promo-code-version`, text: `account.general_actions.add` })))) }))) : null;
41
41
  };
42
42
  export default PromoCodeComp;
@@ -52,30 +52,33 @@ const TotalCheckout = memo(({ isShipping, children, confirmation, buttonProps })
52
52
  React.createElement("div", { className: `cart-main-wrap` },
53
53
  React.createElement("div", { className: `left-panel-wrap panel` }, children),
54
54
  React.createElement("div", { className: `right-panel-wrap panel ${confirmation ? 'display-none-wrap' : ''}` }, !confirmation && !addressLoading && !loading ? (React.createElement("div", { className: `max-width-wrapper sticky-wrap` },
55
- React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-title`, text: `account.cart_checkout.orderSummary` }),
56
- React.createElement("div", { className: `od-line` }),
57
- React.createElement("div", { className: `od-item-wrap` },
58
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-subtotal`, text: `account.cart_checkout.subtotal` }),
59
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-currency`, text: itemsCount ? handlePriceCheckFunc(subtotal, currency) : `0 ${currency}` })),
60
- user && useBalance ? (React.createElement("div", { className: `od-item-wrap` },
61
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `account.balance_promotions.muramoney` }),
62
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 balance-text-block`, text: `-${handlePriceCheckFunc(useBalance, currency)}` }))) : null,
63
- user && discount ? (React.createElement("div", { className: `od-item-wrap` },
64
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `account.order_balance.discount` }),
65
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 balance-text-block`, text: `-${handlePriceCheckFunc(discount, currency)}` }))) : null,
66
- React.createElement("div", { className: `od-item-wrap` },
67
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping`, text: `account.address_management.shipping` }),
68
- React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping-cost`, text: `${String(shippingCost).toLowerCase() === 'free' || shippingCost === '-' ? shippingCost : `${numToLocalString(shippingCost)} ${currency}`}` })),
69
- React.createElement("div", { className: `od-item-wrap` },
70
- React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-total`, text: `account.order_balance.total` }),
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}` })),
72
- React.createElement(GiftComp, null),
73
- !isCheckoutPage ? React.createElement(FreeShippingComp, null) : null,
74
- React.createElement(CollapseContainer, { className: 'collapse-container-wrapper' },
75
- React.createElement("div", { ref: innerCollapseRef },
76
- React.createElement(BalanceComp, null),
77
- React.createElement(PromoCodeComp, null))),
78
- isCheckoutPage && typeof isShipping === 'boolean' && !isShipping ? React.createElement(CommentComp, null) : null,
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))))));
55
+ React.createElement("div", { className: 'panel-block' },
56
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-title`, text: `account.cart_checkout.orderSummary` }),
57
+ React.createElement("div", { className: `od-line` }),
58
+ React.createElement("div", { className: 'scroll-block' },
59
+ React.createElement("div", { className: 'scroll-content' },
60
+ React.createElement("div", { className: `od-item-wrap` },
61
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-subtotal`, text: `account.cart_checkout.subtotal` }),
62
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-currency`, text: itemsCount ? handlePriceCheckFunc(subtotal, currency) : `0 ${currency}` })),
63
+ user && useBalance ? (React.createElement("div", { className: `od-item-wrap` },
64
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `account.balance_promotions.muramoney` }),
65
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 balance-text-block`, text: `-${handlePriceCheckFunc(useBalance, currency)}` }))) : null,
66
+ user && discount ? (React.createElement("div", { className: `od-item-wrap` },
67
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1`, text: `account.order_balance.discount` }),
68
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 balance-text-block`, text: `-${handlePriceCheckFunc(discount, currency)}` }))) : null,
69
+ React.createElement("div", { className: `od-item-wrap` },
70
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping`, text: `account.address_management.shipping` }),
71
+ React.createElement(Text, { className: `account-p account-p2 account-font-regular account-primary-color1 sticky-wrap-shipping-cost`, text: `${String(shippingCost).toLowerCase() === 'free' ? `account.general_actions.${shippingCost}` : shippingCost === '-' ? shippingCost : `${numToLocalString(shippingCost)} ${currency}`}` })),
72
+ React.createElement("div", { className: `od-item-wrap` },
73
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-total`, text: `account.order_balance.total` }),
74
+ React.createElement(Text, { className: `account-p account-p2 account-font-bold account-primary-color1 sticky-wrap-currency2`, text: itemsCount ? handlePriceCheckFunc(total, currency) : `0 ${currency}` })),
75
+ React.createElement(GiftComp, null),
76
+ React.createElement(FreeShippingComp, null),
77
+ React.createElement(CollapseContainer, { className: 'collapse-container-wrapper' },
78
+ React.createElement("div", { ref: innerCollapseRef },
79
+ React.createElement(BalanceComp, null),
80
+ React.createElement(PromoCodeComp, null))),
81
+ isCheckoutPage && typeof isShipping === 'boolean' && !isShipping ? React.createElement(CommentComp, null) : null,
82
+ 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))))));
80
83
  });
81
84
  export default TotalCheckout;
@@ -6,7 +6,7 @@ const TotalCheckoutStyle = styled.section `
6
6
  --account_cartMainWrapPadTop: var(--sp8x);
7
7
  --account_leftPanelWrapWidth: calc(100% - var(--account_rightPanelWrapWidth));
8
8
 
9
- /* //! size text var */
9
+ /* //! Size text var */
10
10
  --account_textSize: var(--account_p4);
11
11
  --account_lineHeightSize: var(--account_lineHeight);
12
12
 
@@ -191,13 +191,27 @@ const TotalCheckoutStyle = styled.section `
191
191
  margin-top: var(--account_commentMarginTop);
192
192
  }
193
193
 
194
+ /* //! Scroll logic */
195
+ .scroll-block {
196
+ overflow-x: hidden;
197
+ overflow-y: auto;
198
+ max-height: calc(100vh - var(--sp27x));
199
+
200
+ scrollbar-width: none;
201
+ -ms-overflow-style: none;
202
+
203
+ &::-webkit-scrollbar {
204
+ display: none;
205
+ }
206
+ }
207
+
194
208
  @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
195
209
  --account_distance: var(--sp8x);
196
210
  /* --account_rightPanelWrapWidth: var(--sp66x); */
197
211
  --account_rightPanelWrapWidth: 29.21%;
198
212
  --account_cartMainWrapPadTop: var(--sp5x);
199
213
 
200
- //! Right Layout Sizes
214
+ /* //! Right Layout Sizes */
201
215
  --account_odLineMTop: var(--sp2x);
202
216
  --account_odLineMBot: var(--sp4x);
203
217
  --account_itemMTop: var(--sp2x);
@@ -216,7 +230,7 @@ const TotalCheckoutStyle = styled.section `
216
230
  --account_rightPanelWrapWidth: 27.67%;
217
231
  --account_cartMainWrapPadTop: var(--sp5x);
218
232
 
219
- //! Right Layout Sizes
233
+ /* //! Right Layout Sizes */
220
234
  --account_odLineMTop: var(--sp2x);
221
235
  --account_odLineMBot: var(--sp4x);
222
236
  --account_itemMTop: var(--sp2x);
@@ -235,7 +249,7 @@ const TotalCheckoutStyle = styled.section `
235
249
  --account_rightPanelWrapWidth: 29.07%;
236
250
  --account_cartMainWrapPadTop: var(--sp4x);
237
251
 
238
- //! Right Layout Sizes
252
+ /* //! Right Layout Sizes */
239
253
  --account_odLineMTop: var(--sp2x);
240
254
  --account_odLineMBot: var(--sp3x);
241
255
  --account_itemMTop: var(--sp2x);
@@ -254,7 +268,7 @@ const TotalCheckoutStyle = styled.section `
254
268
  --account_rightPanelWrapWidth: 29.68%;
255
269
  --account_cartMainWrapPadTop: var(--sp4x);
256
270
 
257
- //! Right Layout Sizes
271
+ /* //! Right Layout Sizes */
258
272
  --account_odLineMTop: var(--sp2x);
259
273
  --account_odLineMBot: var(--sp3x);
260
274
  --account_itemMTop: var(--sp2x);
@@ -273,7 +287,7 @@ const TotalCheckoutStyle = styled.section `
273
287
  --account_rightPanelWrapWidth: 30.9%;
274
288
  --account_cartMainWrapPadTop: var(--sp4x);
275
289
 
276
- //! Right Layout Sizes
290
+ /* //! Right Layout Sizes */
277
291
  --account_odLineMTop: var(--sp2x);
278
292
  --account_odLineMBot: var(--sp3x);
279
293
  --account_itemMTop: var(--sp1x);
@@ -292,7 +306,7 @@ const TotalCheckoutStyle = styled.section `
292
306
  --account_leftPanelWrapWidth: 100%;
293
307
  --account_cartMainWrapPadTop: var(--sp4x);
294
308
 
295
- //! Right Layout Sizes
309
+ /* //! Right Layout Sizes */
296
310
  --account_odLineMTop: var(--sp2x);
297
311
  --account_odLineMBot: var(--sp3x);
298
312
  --account_itemMTop: var(--sp1x);
@@ -317,7 +331,7 @@ const TotalCheckoutStyle = styled.section `
317
331
  --account_leftPanelWrapWidth: 100%;
318
332
  --account_cartMainWrapPadTop: var(--sp4x);
319
333
 
320
- //! Right Layout Sizes
334
+ /* //! Right Layout Sizes */
321
335
  --account_odLineMTop: var(--sp2x);
322
336
  --account_odLineMBot: var(--sp3x);
323
337
  --account_itemMTop: var(--sp1x);
@@ -13,15 +13,11 @@ const ProgressBalance = ({ progress, balance, nextStatusValue, nextStatusTitle,
13
13
  React.createElement(Text, { className: 'account-primary-color1 account-p account-p4 first-letter balance-title', text: 'account.balance_promotions.balance' }),
14
14
  React.createElement(Text, { className: 'account-primary-color1 account-h5 first-letter balance-value' }, typeof balance == 'number' ? handlePriceCheckFunc(balance, currency) : balance))) : null),
15
15
  nextStatusValue ? (React.createElement("div", { className: 'wrapper-next-status' },
16
- React.createElement(Text, { className: 'account-primary-color1 account-p account-p4 text-center next-status-text' },
17
- translate('account.balance_promotions.balanceNextStatusDescription1'),
18
- "\u00A0",
19
- React.createElement(Text, { className: 'account-font-medium next-status-value', tag: 'span' },
16
+ React.createElement(Text, { className: 'account-primary-color1 account-p account-p4 text-center next-status-text' }, translate('account.balance_promotions.balanceNextStatusDescription', {
17
+ nextStatusValue: (React.createElement("span", { className: 'account-font-medium next-status-value' },
20
18
  typeof nextStatusValue == 'number' ? handlePriceCheckFunc(nextStatusValue, '').trim() : nextStatusValue,
21
- iconValue || null),
22
- "\u00A0",
23
- translate('account.balance_promotions.balanceNextStatusDescription2'),
24
- "\u00A0",
25
- React.createElement(Text, { tag: 'span', className: 'account-secondary-color9 account-font-medium next-status-title', text: `account.user_status.${nextStatusTitle}` })))) : null));
19
+ iconValue || null)),
20
+ nextStatusTitle: React.createElement("span", { className: 'account-secondary-color9 account-font-medium next-status-title' }, translate(`account.user_status.${nextStatusTitle}`)),
21
+ })))) : null));
26
22
  };
27
23
  export default ProgressBalance;
@@ -14,12 +14,7 @@ const HeroBalance = ({ iconValue, balance, cashback, progress, totalSpent, nextS
14
14
  React.createElement("div", { className: 'inner-wrapper-left-bar' },
15
15
  React.createElement(Text, { className: 'account-primary-color1 account-font-medium account-p account-p3 first-letter status-title', text: 'account.balance_promotions.balanceStatus' }),
16
16
  React.createElement(Text, { className: 'account-primary-color1 account-font-medium account-h5 first-letter text-title', text: `account.user_status.${title}` }),
17
- description && (React.createElement(Text, { className: 'account-primary-color1 account-p account-p2 first-letter description-status' },
18
- translate(description.description1),
19
- " ",
20
- cashback + '%',
21
- " ",
22
- translate(description.description2))),
17
+ description && React.createElement(Text, { className: 'account-primary-color1 account-p account-p2 first-letter description-status' }, translate(description.description, { cashback: cashback })),
23
18
  React.createElement("div", { className: 'wrapper-information-payment' }, dataInformation.map((item, i, arr) => {
24
19
  return ((item || item == 0) && (React.createElement(Text, { key: i, className: 'account-primary-color1 account-p account-p3 first-letter account-font-medium info-text' },
25
20
  translate(dataInformationTitle[i]),
@@ -25,7 +25,7 @@ const HistoryBalance = ({ linkEarnPage }) => {
25
25
  useEffect(() => {
26
26
  getHistory(currentPage);
27
27
  }, [currentPage]);
28
- return data && data.length ? (React.createElement(HistoryBalanceStyle, null,
28
+ return data?.length > 0 ? (React.createElement(HistoryBalanceStyle, null,
29
29
  React.createElement("div", { className: 'wrapper-title-section-history' },
30
30
  React.createElement("div", { className: 'wrapper-history-link' },
31
31
  React.createElement(Text, { className: 'account-primary-color1 account-font-medium account-p account-p1 first-letter title-section-history', text: 'account.balance_promotions.balanceRecentActivity' }),
@@ -18,10 +18,10 @@ const AccountBalanceTemplate = ({ iconValue, dataItem, linkEarnPage, className }
18
18
  });
19
19
  }, []);
20
20
  return dataBalance ? (React.createElement(AccountBalanceTemplateStyle, { className: className || '' },
21
- React.createElement(HeroBalance, { currency: currency, iconValue: iconValue, nextStatusTitle: 'resident', balance: dataBalance.balance, title: dataBalance.info.status.toLowerCase(), cashback: dataBalance.cashback, progress: dataBalance.info.timeline, totalSpent: dataBalance.info.spent.current, nextStatusValue: dataBalance.info.spent.next, description: (() => {
21
+ React.createElement(HeroBalance, { currency: currency, iconValue: iconValue, nextStatusTitle: 'resident', balance: dataBalance.balance, cashback: dataBalance.cashback, progress: dataBalance.info.timeline, totalSpent: dataBalance.info.spent.current, title: dataBalance.info.status.toLowerCase(), nextStatusValue: dataBalance.info.spent.next, description: (() => {
22
22
  if (dataItem) {
23
- const { description1, description2 } = dataItem.find((item) => item.name?.toLowerCase() === dataBalance.info.status?.toLowerCase()) || {};
24
- return { description1, description2 };
23
+ const { description } = dataItem.find((item) => item.name?.toLowerCase() === dataBalance.info.status?.toLowerCase()) || {};
24
+ return { description };
25
25
  }
26
26
  else {
27
27
  return false;
@@ -60,9 +60,7 @@ const ForgotPasswordTemplate = ({ signInUrl = '/sign-in' }) => {
60
60
  translate('account.notifications_messages.thankYou'),
61
61
  "!"),
62
62
  React.createElement("div", { className: 'recovery-wrap' },
63
- React.createElement(Text, { className: 'account-p account-p2 account-font-medium account-primary-color1 recovery-text', text: 'account.email_verification.recoveryText' }),
64
- "\u00A0",
65
- React.createElement(Text, { className: 'account-p account-p2 account-font-bold account-primary-color1 recovery-email', text: forgotState.email })),
63
+ React.createElement(Text, { className: 'account-p account-p2 account-font-regular account-primary-color1 recovery-text text-center' }, translate('account.email_verification.recoveryText', { recoveryEmail: React.createElement("span", { className: 'account-p account-p2 account-font-medium account-primary-color1 recovery-email' }, forgotState.email) }))),
66
64
  React.createElement("div", { className: 'try-again-wrap' },
67
65
  React.createElement(Text, { onClick: handleTryAgain, text: `account.email_verification.resendNewLink`, className: `account-p account-p3 account-font-bold account-primary-color1 underline try-again-text ${forgotState.isBtnDisabled ? 'disabled' : ''}` }))),
68
66
  React.createElement("div", { className: 'col-3 col-t-1 col-m-0' })))))));
@@ -1,10 +1,12 @@
1
- import React, { memo } from 'react';
1
+ import React, { memo, useEffect } 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 { useCheckoutContext } from '../../../checkout';
5
6
  import { defaultIconGift } from '../util';
6
7
  const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, giftIcon }) => {
7
8
  const { handleProductClick } = useAccountContext();
9
+ const { checkoutData, setCheckGift } = useCheckoutContext();
8
10
  return (React.createElement("div", { className: `${isGift ? 'item-gift-wrap' : 'item-wrap'}` },
9
11
  React.createElement("div", { className: 'line' }),
10
12
  React.createElement("div", { className: `${isGift ? 'item-gift-inner-wrapper' : 'item-inner-wrapper'}` },
@@ -18,14 +20,15 @@ const Item = memo(({ data, remove, select, isLast, actions, currency, isGift, gi
18
20
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: data.product.short_info_1 })),
19
21
  React.createElement("div", { className: `right-second-item-wrap` },
20
22
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: data.product.short_info_2 })))),
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.general_actions.restore', className: `button-gift` }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
23
+ 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' }, checkoutData.checkGift ? (React.createElement(AccountCounter, { isGift: isGift, productId: -1, maxQty: 1 })) : (React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `button-gift`, onClick: () => {
24
+ setCheckGift();
25
+ } })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
23
26
  React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data.product?.sale_price ? (React.createElement("div", null,
24
27
  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
28
  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) }))),
26
29
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap` },
27
30
  React.createElement("div", { className: `col-item-inner-wrap` },
28
- React.createElement("div", { className: `flex-end-wrap` }, data.product?.sale_price && !isGift ? (React.createElement("div", null,
31
+ React.createElement("div", { className: `flex-end-wrap` }, data.product?.sale_total && !isGift ? (React.createElement("div", null,
29
32
  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
33
  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
34
  React.createElement("div", { className: `favorite-and-remove-wrap` }, remove && !isGift && (React.createElement("div", { className: `remove-btn-wrap` },
@@ -2,10 +2,12 @@ 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 { useCheckoutContext } from '../../../checkout';
5
6
  import { defaultIconGift } from '../util';
6
7
  const ItemMobile = memo(({ data, select, currency, isGift, giftIcon }) => {
7
8
  const { handleProductClick } = useAccountContext();
8
9
  const { translate } = useTranslation();
10
+ const { checkoutData, setCheckGift } = useCheckoutContext();
9
11
  return (React.createElement(React.Fragment, null,
10
12
  React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-wrap' : 'mobile-order-item-wrap'} user-select-none` },
11
13
  React.createElement("div", { className: `${isGift ? 'mobile-order-item-gift-inner-wrap' : 'mobile-order-item-inner-wrap'}` },
@@ -31,8 +33,9 @@ const ItemMobile = memo(({ data, select, currency, isGift, giftIcon }) => {
31
33
  ":"),
32
34
  "\u00A0",
33
35
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-quantity2`, text: data.qty }))),
34
- isGift ? (React.createElement("div", { className: 'wrapper-gift-button' },
35
- React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `capitalize button-gift` }))) : null)))),
36
+ isGift ? (React.createElement("div", { className: 'wrapper-gift-button' }, checkoutData.checkGift ? (React.createElement(AccountCounter, { isGift: isGift, productId: -1, maxQty: 1 })) : (React.createElement(AccountButton, { text: 'account.general_actions.restore', className: `capitalize button-gift`, onClick: () => {
37
+ setCheckGift();
38
+ } })))) : null)))),
36
39
  React.createElement("div", { className: 'line' })));
37
40
  });
38
41
  export default ItemMobile;
@@ -1,4 +1,4 @@
1
- import React, { memo, useMemo } from 'react';
1
+ import React, { memo, useLayoutEffect, useMemo } from 'react';
2
2
  import { Text, useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
4
  import Item from './Item';
@@ -298,9 +298,20 @@ const CartItemsStyle = styled.section `
298
298
  }
299
299
  }
300
300
 
301
+ @keyframes opacityShow {
302
+ 0% {
303
+ opacity: 0;
304
+ }
305
+ 100% {
306
+ opacity: 1;
307
+ }
308
+ }
309
+
301
310
  .button-gift {
302
311
  --account_btnPadTB: var(--account_giftButtonTB);
303
312
  --account_btnPadLR: var(--account_giftButtonLR);
313
+ opacity: 0;
314
+ animation: opacityShow 0.1s 0.1s forwards;
304
315
 
305
316
  button {
306
317
  font-size: var(--account_p4);
@@ -9,7 +9,7 @@ export const useCheckoutContext = () => {
9
9
  export const CheckoutProvider = ({ children }) => {
10
10
  const { selectedLang } = useTranslation();
11
11
  const { useCart, useUser } = useAccountContext();
12
- const { getCart, setCart, itemsCount, mergeCart } = useCart();
12
+ const { getCart, setCart, itemsCount, mergeCart, items } = useCart();
13
13
  const { user, isLoggedIn } = useUser();
14
14
  const form = useRef();
15
15
  const [checkoutData, setCheckoutData] = useState({
@@ -17,8 +17,17 @@ export const CheckoutProvider = ({ children }) => {
17
17
  useBalance: null,
18
18
  note: '',
19
19
  paymentType: user?.payment_method || 'cash_on_delivery',
20
+ checkGift: true,
20
21
  });
21
22
  const [idramForm, setIdramForm] = useState();
23
+ //! Has gift from data
24
+ const hasGift = useMemo(() => {
25
+ return items.some((item) => item.is_gift);
26
+ }, [items]);
27
+ //! Set gift Select
28
+ const setCheckGift = useCallback((props) => {
29
+ setCheckoutData((prev) => ({ ...prev, checkGift: props || !prev.checkGift }));
30
+ }, []);
22
31
  const isCheckoutPage = useMemo(() => {
23
32
  return window.location.href.includes('checkout');
24
33
  }, [window.location.href]);
@@ -51,6 +60,9 @@ export const CheckoutProvider = ({ children }) => {
51
60
  }, [checkoutData]);
52
61
  const handleCheckout = async () => {
53
62
  let data = { ...checkoutData };
63
+ if (!(checkoutData.checkGift && hasGift)) {
64
+ delete data.checkGift;
65
+ }
54
66
  if (isNumeric(checkoutData.paymentType)) {
55
67
  data.paymentType = 'credit_card';
56
68
  data.card_id = Number(checkoutData.paymentType);
@@ -92,6 +104,7 @@ export const CheckoutProvider = ({ children }) => {
92
104
  fillCheckoutData,
93
105
  handleCheckout,
94
106
  fillCart,
107
+ setCheckGift,
95
108
  checkoutBtnDisabled,
96
109
  isCheckoutPage,
97
110
  } },
@@ -15,42 +15,44 @@ const OrderedItems = ({ data: items, status, dataId }) => {
15
15
  React.createElement("div", { className: `item-inner-wrapper` },
16
16
  React.createElement("div", { className: `col-item tl-col-1 col-item-1 first-col` },
17
17
  React.createElement("div", { className: `image-wrapper` },
18
- React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
18
+ React.createElement(Image, { src: item.product?.image?.src, alt: item.product?.image?.alt })),
19
19
  React.createElement("div", { className: `col-1-right-wrap` },
20
- React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-title`, onClick: () => handleProductClick(item.product) }),
20
+ React.createElement(AccountButton, { text: item.product?.name || item.product_name, btnType: `green-large-text`, className: `ordered-item-title`, onClick: () => item.product && handleProductClick(item.product) }),
21
21
  item.color ? (React.createElement("div", { className: `right-first-item-wrap` },
22
22
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `account.general_actions.color` }),
23
23
  "\u00A0",
24
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : (React.createElement("div", { className: `right-first-item-wrap` },
25
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))),
24
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : item.product ? (React.createElement("div", { className: `right-first-item-wrap` },
25
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))) : null,
26
26
  item.size ? (React.createElement("div", { className: `right-second-item-wrap` },
27
27
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `account.general_actions.size` }),
28
28
  "\u00A0",
29
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : (React.createElement("div", { className: `right-second-item-wrap` },
30
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))))),
29
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : item.product ? (React.createElement("div", { className: `right-second-item-wrap` },
30
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))) : null)),
31
31
  React.createElement("div", { className: `col-item tl-col-2` },
32
32
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.qty })),
33
- React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` },
34
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.price, currency) })),
33
+ React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, item?.sale_price ? (React.createElement("div", null,
34
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right`, text: handlePriceCheckFunc(item.sale_price, currency) }),
35
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(item.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.is_gift ? 0 : item.price, currency) }))),
35
36
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap price-block` },
36
37
  React.createElement("div", { className: `col-item-inner-wrap` },
37
- React.createElement("div", { className: `flex-end-wrap` },
38
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: handlePriceCheckFunc(item.total, currency) }))))))) : (React.createElement("div", { key: index, className: `mobile-order-item-wrap` },
38
+ React.createElement("div", { className: `flex-end-wrap` }, item?.sale_total && !item.is_gift ? (React.createElement("div", null,
39
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right`, text: handlePriceCheckFunc(item.sale_total, currency) }),
40
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(item.total, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right `, text: `${handlePriceCheckFunc(item.is_gift ? 0 : item.sale_total, currency)}` })))))))) : (React.createElement("div", { key: index, className: `mobile-order-item-wrap` },
39
41
  React.createElement("div", { className: `mobile-order-item-inner-wrap` },
40
42
  React.createElement("div", { className: `mobile-image-wrap` },
41
- React.createElement(Image, { src: item.product.image.src, alt: item.product.image.alt })),
43
+ React.createElement(Image, { src: item.product?.image?.src, alt: item.product?.image?.alt })),
42
44
  React.createElement("div", { className: `mobile-info-wrap` },
43
- React.createElement(AccountButton, { text: item.product.name, btnType: `green-large-text`, className: `ordered-item-mobile-title`, onClick: () => handleProductClick(item.product) }),
45
+ React.createElement(AccountButton, { text: item.product?.name || item.product_name, btnType: `green-large-text`, className: `ordered-item-mobile-title`, onClick: () => item.product && handleProductClick(item.product) }),
44
46
  item.color ? (React.createElement("div", { className: `mobile-info-item` },
45
47
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `account.general_actions.color` }),
46
48
  "\u00A0",
47
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : (React.createElement("div", { className: `mobile-info-item` },
48
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))),
49
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 capitalize`, text: item.color }))) : item.product ? (React.createElement("div", { className: `mobile-info-item` },
50
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_1 }))) : null,
49
51
  item.size ? (React.createElement("div", { className: `mobile-info-item` },
50
52
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `account.general_actions.size` }),
51
53
  "\u00A0",
52
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : (React.createElement("div", { className: `mobile-info-item` },
53
- React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))),
54
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.size }))) : item.product ? (React.createElement("div", { className: `mobile-info-item` },
55
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.product.short_info_2 }))) : null,
54
56
  React.createElement("div", { className: `mobile-info-item` },
55
57
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1` },
56
58
  translate('account.order_balance.quantity'),
@@ -59,10 +61,10 @@ const OrderedItems = ({ data: items, status, dataId }) => {
59
61
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: item.qty })),
60
62
  React.createElement("div", { className: `mobile-price-wrap nowrap` },
61
63
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `account.order_balance.price` }),
62
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.price, currency) })),
64
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.is_gift ? 0 : item.price, currency) })),
63
65
  React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
64
66
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mb-mt`, text: `account.order_balance.total` }),
65
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.total, currency) })))))))
67
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: handlePriceCheckFunc(item.is_gift ? 0 : item.total, currency) })))))))
66
68
  : null;
67
69
  }, [items, currency, winWidth, status, handleProductClick]);
68
70
  const handleReorder = () => {
@@ -24,6 +24,7 @@ const AddNewCardStyle = styled.div `
24
24
 
25
25
  .account-add-card-text {
26
26
  text-decoration: underline;
27
+ text-align: center;
27
28
  margin-top: var(--account_addCardTextMTop);
28
29
  }
29
30
 
@@ -46,20 +46,20 @@ export default (props) => ({
46
46
  account_successColor: '#4CAF50',
47
47
  account_successColorBg: 'rgba(76, 175, 80, 0.1)',
48
48
  //! Status Colors
49
- account_statusAcceptedColor: '#00F27E',
50
- account_statusAcceptedBgColor: '#F0FFF8',
49
+ account_statusAcceptedColor: '#8C3DE0',
50
+ account_statusAcceptedBgColor: '#F4ECFB',
51
51
  account_statusPendingColor: '#F7BD00',
52
52
  account_statusPendingBgColor: '#FFF7E0',
53
- account_statusProcessingColor: '#2A2AD1',
54
- account_statusProcessingBgColor: '#F3F4FC',
55
- account_statusPaymentFailedColor: '#F29D00',
56
- account_statusPaymentFailedBgColor: '#FFFAF0',
53
+ account_statusProcessingColor: '#00A6FF',
54
+ account_statusProcessingBgColor: '#D8ECFA',
55
+ account_statusPaymentFailedColor: '#B91B1B',
56
+ account_statusPaymentFailedBgColor: '#B91B1B1A',
57
57
  account_statusDeliveredColor: '#BB25ED',
58
58
  account_statusDeliveredBgColor: '#FBF1FE',
59
- account_statusCanceledColor: '#F20057',
60
- account_statusCanceledBgColor: '#FFF5F8',
61
- account_statusCompletedColor: '#FFFFFF',
62
- account_statusCompletedBgColor: '#00F27E',
59
+ account_statusCanceledColor: '#D0771F',
60
+ account_statusCanceledBgColor: '#D0771F1A',
61
+ account_statusCompletedColor: '#509558',
62
+ account_statusCompletedBgColor: '#EDFAE9',
63
63
  ...props.account?.colors,
64
64
  },
65
65
  mediaQuery: {
@@ -80,6 +80,8 @@ const AccountVariables = createGlobalStyle `${css `
80
80
 
81
81
  --account_statusAcceptedColor: ${(props) => props.theme.account.colors.account_statusAcceptedColor};
82
82
  --account_statusAcceptedBgColor: ${(props) => props.theme.account.colors.account_statusAcceptedBgColor};
83
+
84
+ --account_h2: var(--account_h3) !important;
83
85
  }
84
86
 
85
87
  /* //! 2560 */
@@ -146,17 +146,15 @@ declare const _default: {
146
146
  color: string;
147
147
  size: string;
148
148
  restore: string;
149
+ free: string;
149
150
  };
150
151
  user_status: {
151
152
  tourist: string;
152
- touristDesc1: string;
153
- touristDesc2: string;
153
+ touristDesc: string;
154
154
  resident: string;
155
- residentDesc1: string;
156
- residentDesc2: string;
155
+ residentDesc: string;
157
156
  citizen: string;
158
- citizenDesc1: string;
159
- citizenDesc2: string;
157
+ citizenDesc: string;
160
158
  };
161
159
  legal_policies: {
162
160
  privacyPolicy: string;
@@ -221,8 +219,7 @@ declare const _default: {
221
219
  balancePlaceholder: string;
222
220
  balanceCashback: string;
223
221
  balanceTotalSpent: string;
224
- balanceNextStatusDescription1: string;
225
- balanceNextStatusDescription2: string;
222
+ balanceNextStatusDescription: string;
226
223
  balanceHowToEarn: string;
227
224
  gotPromotionCode: string;
228
225
  promoCodePlaceholder: string;
@@ -40,7 +40,7 @@ export default {
40
40
  resendNewCode: 'Resend a new code.',
41
41
  codeResendSuccessTitle: 'Your code was successfully resent.',
42
42
  codeResendSuccessSubtitle: 'A new code has been sent to your email address.',
43
- recoveryText: 'We sent a recovery link to you at',
43
+ recoveryText: 'We sent a recovery link to you at {recoveryEmail}',
44
44
  resendNewLink: 'Resend a new link',
45
45
  },
46
46
  account_info: {
@@ -146,17 +146,15 @@ export default {
146
146
  color: 'Color',
147
147
  size: 'Size',
148
148
  restore: 'Restore',
149
+ free: 'Free',
149
150
  },
150
151
  user_status: {
151
152
  tourist: 'tourist',
152
- touristDesc1: 'Tourist can earn up to',
153
- touristDesc2: 'cashback in Muramoney on every purchase.',
153
+ touristDesc: 'Tourist can earn up to {cashback}% cashback in Muramoney on every purchase.',
154
154
  resident: 'resident',
155
- residentDesc1: 'Resident can earn up to',
156
- residentDesc2: 'cashback in Muramoney on every purchase.',
155
+ residentDesc: 'Resident can earn up to {cashback}% cashback in Muramoney on every purchase.',
157
156
  citizen: 'citizen',
158
- citizenDesc1: 'Citizen can earn up to',
159
- citizenDesc2: 'cashback in Muramoney on every purchase.',
157
+ citizenDesc: 'Citizen can earn up to {cashback}% cashback in Muramoney on every purchase.',
160
158
  },
161
159
  legal_policies: {
162
160
  privacyPolicy: 'Privacy policy',
@@ -221,8 +219,7 @@ export default {
221
219
  balancePlaceholder: 'Type amount',
222
220
  balanceCashback: 'cashback',
223
221
  balanceTotalSpent: 'totally spent',
224
- balanceNextStatusDescription1: 'Keep it up! You are',
225
- balanceNextStatusDescription2: 'short of becoming',
222
+ balanceNextStatusDescription: 'Keep it up! You are {nextStatusValue} short of becoming a {nextStatusTitle}.',
226
223
  balanceHowToEarn: 'How to earn?',
227
224
  gotPromotionCode: 'Got a promotion code?',
228
225
  promoCodePlaceholder: 'Type your code',
@@ -146,17 +146,15 @@ declare const _default: {
146
146
  color: string;
147
147
  size: string;
148
148
  restore: string;
149
+ free: string;
149
150
  };
150
151
  user_status: {
151
152
  tourist: string;
152
- touristDesc1: string;
153
- touristDesc2: string;
153
+ touristDesc: string;
154
154
  resident: string;
155
- residentDesc1: string;
156
- residentDesc2: string;
155
+ residentDesc: string;
157
156
  citizen: string;
158
- citizenDesc1: string;
159
- citizenDesc2: string;
157
+ citizenDesc: string;
160
158
  };
161
159
  legal_policies: {
162
160
  privacyPolicy: string;
@@ -221,8 +219,7 @@ declare const _default: {
221
219
  balancePlaceholder: string;
222
220
  balanceCashback: string;
223
221
  balanceTotalSpent: string;
224
- balanceNextStatusDescription1: string;
225
- balanceNextStatusDescription2: string;
222
+ balanceNextStatusDescription: string;
226
223
  balanceHowToEarn: string;
227
224
  gotPromotionCode: string;
228
225
  promoCodePlaceholder: string;
@@ -11,7 +11,7 @@ export default {
11
11
  deleteYourAccount: 'Ջնջե՞լ ձեր հաշիվը:',
12
12
  deleteYourAccountDesc: 'Երբ դուք ջնջում եք ձեր հաշիվը, ձեր տվյալները կջնջվեն մշտապես։',
13
13
  welcomeBack: 'Բարի վերադարձ',
14
- continueWidth: 'կամ շարունակել հետ',
14
+ continueWidth: 'կամ շարունակել',
15
15
  },
16
16
  password_management: {
17
17
  password: 'Գաղտնաբառ',
@@ -40,7 +40,7 @@ export default {
40
40
  resendNewCode: 'Ուղարկել նոր կոդ։',
41
41
  codeResendSuccessTitle: 'Ձեր կոդը հաջողությամբ ուղարկվեց կրկին։',
42
42
  codeResendSuccessSubtitle: 'Նոր կոդը ուղարկվել է ձեր էլ. փոստի հասցեին։',
43
- recoveryText: 'Մենք վերականգնման հղում ենք ուղարկել ձեզ',
43
+ recoveryText: 'Մենք վերականգնման հղում ենք ուղարկել ձեր {recoveryEmail}-ին',
44
44
  resendNewLink: 'Ուղարկել նոր հղում',
45
45
  },
46
46
  account_info: {
@@ -146,17 +146,15 @@ export default {
146
146
  color: 'Գույն',
147
147
  size: 'Չափ',
148
148
  restore: 'Վերականգնել',
149
+ free: 'Անվճար',
149
150
  },
150
151
  user_status: {
151
152
  tourist: 'տուրիստ',
152
- touristDesc1: 'Տուրիստը կարող է վաստակել մինչև',
153
- touristDesc2: 'cashback Muramoney-ում յուրաքանչյուր գնումից։',
153
+ touristDesc: 'Տուրիստը կարող է վաստակել մինչև {cashback}% cashback Muramoney-ում յուրաքանչյուր գնումից։',
154
154
  resident: 'բնակիչ',
155
- residentDesc1: 'Բնակիչը կարող է վաստակել մինչև',
156
- residentDesc2: 'cashback Muramoney-ում յուրաքանչյուր գնումից։',
155
+ residentDesc: 'Բնակիչը կարող է վաստակել մինչև {cashback}% cashback Muramoney-ում յուրաքանչյուր գնումից։',
157
156
  citizen: 'քաղաքացի',
158
- citizenDesc1: 'Քաղաքացին կարող է վաստակել մինչև',
159
- citizenDesc2: 'cashback Muramoney-ում յուրաքանչյուր գնումից։',
157
+ citizenDesc: 'Քաղաքացին կարող է վաստակել մինչև {cashback}% cashback Muramoney-ում յուրաքանչյուր գնումից։',
160
158
  },
161
159
  legal_policies: {
162
160
  privacyPolicy: 'Գաղտնիության քաղաքականություն',
@@ -182,8 +180,8 @@ export default {
182
180
  cityPlaceholder: 'Քաղաք',
183
181
  entrance: 'Մուտք',
184
182
  entrancePlaceholder: 'Մուտք',
185
- floor: 'Բաժակ',
186
- floorPlaceholder: 'Բաժակ',
183
+ floor: 'Հարկ',
184
+ floorPlaceholder: 'Հարկ',
187
185
  apartment: 'Բնակարան',
188
186
  apartmentPlaceholder: 'Բնակարան',
189
187
  doorBell: 'Դոմոֆոն',
@@ -221,8 +219,7 @@ export default {
221
219
  balancePlaceholder: 'Մուտքագրեք գումարը',
222
220
  balanceCashback: 'cashback',
223
221
  balanceTotalSpent: 'ընդհանուր ծախսված',
224
- balanceNextStatusDescription1: 'Շարունակեք նույն կերպ! Դուք',
225
- balanceNextStatusDescription2: 'մոտ եք դառնում',
222
+ balanceNextStatusDescription: 'Շարունակե՛ք այդպես: Ձեզ {nextStatusTitle} դառնալու համար պակասում է {nextStatusValue}։',
226
223
  balanceHowToEarn: 'Ինչպե՞ս վաստակել',
227
224
  gotPromotionCode: 'Ունե՞ք պրոմո կոդ',
228
225
  promoCodePlaceholder: 'Մուտքագրեք ձեր կոդը',
@@ -147,17 +147,15 @@ declare const _default: {
147
147
  color: string;
148
148
  size: string;
149
149
  restore: string;
150
+ free: string;
150
151
  };
151
152
  user_status: {
152
153
  tourist: string;
153
- touristDesc1: string;
154
- touristDesc2: string;
154
+ touristDesc: string;
155
155
  resident: string;
156
- residentDesc1: string;
157
- residentDesc2: string;
156
+ residentDesc: string;
158
157
  citizen: string;
159
- citizenDesc1: string;
160
- citizenDesc2: string;
158
+ citizenDesc: string;
161
159
  };
162
160
  legal_policies: {
163
161
  privacyPolicy: string;
@@ -222,8 +220,7 @@ declare const _default: {
222
220
  balancePlaceholder: string;
223
221
  balanceCashback: string;
224
222
  balanceTotalSpent: string;
225
- balanceNextStatusDescription1: string;
226
- balanceNextStatusDescription2: string;
223
+ balanceNextStatusDescription: string;
227
224
  balanceHowToEarn: string;
228
225
  gotPromotionCode: string;
229
226
  promoCodePlaceholder: string;
@@ -388,17 +385,15 @@ declare const _default: {
388
385
  color: string;
389
386
  size: string;
390
387
  restore: string;
388
+ free: string;
391
389
  };
392
390
  user_status: {
393
391
  tourist: string;
394
- touristDesc1: string;
395
- touristDesc2: string;
392
+ touristDesc: string;
396
393
  resident: string;
397
- residentDesc1: string;
398
- residentDesc2: string;
394
+ residentDesc: string;
399
395
  citizen: string;
400
- citizenDesc1: string;
401
- citizenDesc2: string;
396
+ citizenDesc: string;
402
397
  };
403
398
  legal_policies: {
404
399
  privacyPolicy: string;
@@ -463,8 +458,7 @@ declare const _default: {
463
458
  balancePlaceholder: string;
464
459
  balanceCashback: string;
465
460
  balanceTotalSpent: string;
466
- balanceNextStatusDescription1: string;
467
- balanceNextStatusDescription2: string;
461
+ balanceNextStatusDescription: string;
468
462
  balanceHowToEarn: string;
469
463
  gotPromotionCode: string;
470
464
  promoCodePlaceholder: string;
@@ -630,17 +624,15 @@ declare const _default: {
630
624
  color: string;
631
625
  size: string;
632
626
  restore: string;
627
+ free: string;
633
628
  };
634
629
  user_status: {
635
630
  tourist: string;
636
- touristDesc1: string;
637
- touristDesc2: string;
631
+ touristDesc: string;
638
632
  resident: string;
639
- residentDesc1: string;
640
- residentDesc2: string;
633
+ residentDesc: string;
641
634
  citizen: string;
642
- citizenDesc1: string;
643
- citizenDesc2: string;
635
+ citizenDesc: string;
644
636
  };
645
637
  legal_policies: {
646
638
  privacyPolicy: string;
@@ -705,8 +697,7 @@ declare const _default: {
705
697
  balancePlaceholder: string;
706
698
  balanceCashback: string;
707
699
  balanceTotalSpent: string;
708
- balanceNextStatusDescription1: string;
709
- balanceNextStatusDescription2: string;
700
+ balanceNextStatusDescription: string;
710
701
  balanceHowToEarn: string;
711
702
  gotPromotionCode: string;
712
703
  promoCodePlaceholder: string;
@@ -147,17 +147,15 @@ declare const _default: {
147
147
  color: string;
148
148
  size: string;
149
149
  restore: string;
150
+ free: string;
150
151
  };
151
152
  user_status: {
152
153
  tourist: string;
153
- touristDesc1: string;
154
- touristDesc2: string;
154
+ touristDesc: string;
155
155
  resident: string;
156
- residentDesc1: string;
157
- residentDesc2: string;
156
+ residentDesc: string;
158
157
  citizen: string;
159
- citizenDesc1: string;
160
- citizenDesc2: string;
158
+ citizenDesc: string;
161
159
  };
162
160
  legal_policies: {
163
161
  privacyPolicy: string;
@@ -222,8 +220,7 @@ declare const _default: {
222
220
  balancePlaceholder: string;
223
221
  balanceCashback: string;
224
222
  balanceTotalSpent: string;
225
- balanceNextStatusDescription1: string;
226
- balanceNextStatusDescription2: string;
223
+ balanceNextStatusDescription: string;
227
224
  balanceHowToEarn: string;
228
225
  gotPromotionCode: string;
229
226
  promoCodePlaceholder: string;
@@ -41,7 +41,7 @@ export default {
41
41
  resendNewCode: 'Отправить новый код.',
42
42
  codeResendSuccessTitle: 'Ваш код был успешно отправлен повторно.',
43
43
  codeResendSuccessSubtitle: 'Новый код был отправлен на ваш адрес электронной почты.',
44
- recoveryText: 'Мы отправили ссылку для восстановления на',
44
+ recoveryText: 'Мы отправили ссылку для восстановления на {recoveryEmail}',
45
45
  resendNewLink: 'Отправить новую ссылку',
46
46
  },
47
47
  account_info: {
@@ -147,17 +147,15 @@ export default {
147
147
  color: 'Цвет',
148
148
  size: 'Размер',
149
149
  restore: 'Восстановить',
150
+ free: 'Бесплатно',
150
151
  },
151
152
  user_status: {
152
153
  tourist: 'Турист',
153
- touristDesc1: 'Турист может заработать до',
154
- touristDesc2: 'кэшбэка в Muramoney на каждую покупку.',
154
+ touristDesc: 'Турист может заработать до {cashbak}% кэшбэка в Muramoney на каждую покупку.',
155
155
  resident: 'Резидент',
156
- residentDesc1: 'Резидент может заработать до',
157
- residentDesc2: 'кэшбэка в Muramoney на каждую покупку.',
156
+ residentDesc: 'Резидент может заработать до {cashbak}% кэшбэка в Muramoney на каждую покупку.',
158
157
  citizen: 'Гражданин',
159
- citizenDesc1: 'Гражданин может заработать до',
160
- citizenDesc2: 'кэшбэка в Muramoney на каждую покупку.',
158
+ citizenDesc: 'Гражданин может заработать до {cashbak}% кэшбэка в Muramoney на каждую покупку.',
161
159
  },
162
160
  legal_policies: {
163
161
  privacyPolicy: 'Политика конфиденциальности',
@@ -222,8 +220,7 @@ export default {
222
220
  balancePlaceholder: 'Введите сумму',
223
221
  balanceCashback: 'кэшбэк',
224
222
  balanceTotalSpent: 'общая трата',
225
- balanceNextStatusDescription1: 'Продолжайте в том же духе! Вы',
226
- balanceNextStatusDescription2: 'не хватает, чтобы стать',
223
+ balanceNextStatusDescription: 'Так держать! Вам не хватает {nextStatusValue}, чтобы стать {nextStatusTitle}ом.',
227
224
  balanceHowToEarn: 'Как заработать?',
228
225
  gotPromotionCode: 'Есть промокод?',
229
226
  promoCodePlaceholder: 'Введите ваш код',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weareconceptstudio/account",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Concept Studio Account",
5
5
  "author": "Concept Studio",
6
6
  "license": "ISC",