@weareconceptstudio/account 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/AccountProvider.d.ts +2 -1
  2. package/dist/AccountProvider.js +2 -2
  3. package/dist/components/AddressForm/index.js +1 -2
  4. package/dist/components/AddressItem/index.js +1 -1
  5. package/dist/components/AddressWrap/index.js +1 -1
  6. package/dist/components/EmptyOrders/index.js +1 -1
  7. package/dist/components/OrderedItems/index.js +1 -1
  8. package/dist/components/OrdersList/OrderItem/index.js +1 -1
  9. package/dist/components/OrdersList/index.js +2 -2
  10. package/dist/components/SelectShippingBilling/index.js +1 -1
  11. package/dist/components/TotalCheckout/index.js +1 -1
  12. package/dist/components/cart/Items/Simple/Item/index.js +21 -33
  13. package/dist/components/cart/Items/Simple/ItemMobile/index.js +11 -11
  14. package/dist/components/cart/Items/Simple/index.js +6 -6
  15. package/dist/components/cart/Items/Simple/style.js +2 -2
  16. package/dist/components/ui/WarningMessageForPopup/index.js +1 -1
  17. package/dist/templates/AccountSettingsTemplate/AccountInfo/index.js +1 -1
  18. package/dist/templates/AccountSettingsTemplate/AccountInfo/utils.js +6 -6
  19. package/dist/templates/CartTemplate/index.d.ts +4 -2
  20. package/dist/templates/CartTemplate/index.js +4 -4
  21. package/dist/templates/ForgotPasswordTemplate/index.js +1 -1
  22. package/dist/translations/en.d.ts +1 -29
  23. package/dist/translations/en.js +1 -29
  24. package/dist/translations/hy.d.ts +158 -0
  25. package/dist/translations/hy.js +157 -0
  26. package/dist/translations/index.d.ts +345 -29
  27. package/dist/translations/index.js +3 -1
  28. package/dist/translations/ru.d.ts +188 -0
  29. package/dist/translations/ru.js +187 -0
  30. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  export function useAccountContext(): any;
2
- export function AccountProvider({ fontFamily, children, currency }: {
2
+ export function AccountProvider({ fontFamily, children, maxQty, currency }: {
3
3
  fontFamily?: string;
4
4
  children: any;
5
+ maxQty?: number;
5
6
  currency: any;
6
7
  }): React.JSX.Element;
7
8
  import React from 'react';
@@ -13,12 +13,12 @@ export const useAccountContext = () => {
13
13
  const context = useContext(AccountContext);
14
14
  return context;
15
15
  };
16
- export const AccountProvider = ({ fontFamily = 'core_Font', children, currency }) => {
16
+ export const AccountProvider = ({ fontFamily = 'core_Font', children, maxQty = 99, currency }) => {
17
17
  const { addTranslation } = useTranslation();
18
18
  useEffect(() => {
19
19
  addTranslation(translations, 'prepend');
20
20
  }, []);
21
- return (React.createElement(AccountContext.Provider, { value: { currency } },
21
+ return (React.createElement(AccountContext.Provider, { value: { currency, maxQty } },
22
22
  React.createElement(ThemeProvider, { theme: theme },
23
23
  React.createElement(AccountVariables, { fontFamily: fontFamily }),
24
24
  React.createElement(AccountHelperClass, null),
@@ -1,14 +1,13 @@
1
1
  import React, { memo as Memo, useState, useCallback, useRef } from 'react';
2
2
  import { useUi, Text } from '@weareconceptstudio/core';
3
3
  import { Form, Input, PhoneNumber, Select } from '@weareconceptstudio/form';
4
+ import AccountButton from '../ui/AccountButton';
4
5
  import { useTheme } from 'styled-components';
5
6
  import theme from '../../styles/theme';
6
7
  //* Icons
7
8
  import { CheckboxIcon, CheckboxCheckedIcon } from '../../utils/icons';
8
9
  //* Style
9
10
  import AddressFormStyle from './style';
10
- //* Components
11
- import AccountButton from '../AccountButton';
12
11
  //TODO: Form -> ref, onChange, Select, Form Item -> options,Global Data
13
12
  const globalData = {
14
13
  countries: [],
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
2
2
  import { Text, useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
4
  import AddressForm from '../AddressForm';
5
- import AccountButton from '../AccountButton';
5
+ import AccountButton from '../ui/AccountButton';
6
6
  import WarningMessageForPopup from '../ui/WarningMessageForPopup';
7
7
  //* Style
8
8
  import AddressItemStyle from './style';
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { Text, useUi } from '@weareconceptstudio/core';
4
- import AccountButton from '../AccountButton';
4
+ import AccountButton from '../ui/AccountButton';
5
5
  import EmptyAddress from '../EmptyAddress';
6
6
  import AddressItem from '../AddressItem';
7
7
  import AddressForm from '../AddressForm';
@@ -3,7 +3,7 @@ import { Text } from '@weareconceptstudio/core';
3
3
  //* Style
4
4
  import EmptyOrdersStyle from './style';
5
5
  //* Components
6
- import AccountButton from '../AccountButton';
6
+ import AccountButton from '../ui/AccountButton';
7
7
  const EmptyOrders = Memo(() => {
8
8
  return (React.createElement(EmptyOrdersStyle, null,
9
9
  React.createElement(Text, { tag: `h6`, className: `account-h6 account-font-bold account-primary-color1`, text: `emptyTitle` }),
@@ -9,7 +9,7 @@ import { handlePriceCheckFunc } from '../../utils/_functions';
9
9
  // import OldEditor from '../OldEditor';
10
10
  // import ReviewPopup from './ReviewPopup';
11
11
  // import ImagesPopup from '../ImagesPopup';
12
- import AccountButton from '../AccountButton';
12
+ import AccountButton from '../ui/AccountButton';
13
13
  //* Styles
14
14
  // import 'swiper/swiper-bundle.css';
15
15
  import OrderedItemsStyle from './style';
@@ -3,7 +3,7 @@ import { Text } from '@weareconceptstudio/core';
3
3
  //* Utils
4
4
  import { handlePriceCheckFunc } from '../../../utils/_functions';
5
5
  //* Components
6
- import AccountButton from '../../AccountButton';
6
+ import AccountButton from '../../ui/AccountButton';
7
7
  const OrderItem = Memo(({ data }) => {
8
8
  return (React.createElement("div", { className: `order-table-item-wrap` },
9
9
  React.createElement("div", { className: `col-item od-col-1 nowrap` },
@@ -4,8 +4,8 @@ import { createQueryString, Text, useTranslation, useUi } from '@weareconceptstu
4
4
  import { handlePriceCheckFunc } from '../../utils/_functions';
5
5
  //* Components
6
6
  import OrderItem from './OrderItem';
7
- import Pagination from '../Pagination';
8
- import AccountButton from '../AccountButton';
7
+ import Pagination from '../ui/Pagination';
8
+ import AccountButton from '../ui/AccountButton';
9
9
  //* Style
10
10
  import OrdersListStyle from './style';
11
11
  const OrdersList = ({ data, total, pageSize, router, pathname, searchParams }) => {
@@ -2,7 +2,7 @@ import React, { memo as Memo, useState, useCallback } from 'react';
2
2
  import { Text, useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
4
  import AddressItem from '../AddressItem';
5
- import AccountButton from '../AccountButton';
5
+ import AccountButton from '../ui/AccountButton';
6
6
  //* Style
7
7
  import SelectShippingBillingStyle from './style';
8
8
  //TODO: getCart
@@ -1,7 +1,7 @@
1
1
  import React, { memo, useState, useEffect } from 'react';
2
2
  import { Text, useUi } from '@weareconceptstudio/core';
3
3
  import { useAccountContext } from '../../AccountProvider';
4
- import AccountButton from '../AccountButton';
4
+ import AccountButton from '../ui/AccountButton';
5
5
  //* Utils
6
6
  import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
7
7
  //* Style
@@ -5,23 +5,19 @@ import { useAccountContext } from '../../../../../AccountProvider';
5
5
  import { handlePriceCheckFunc } from '../../../../../utils/_functions';
6
6
  import Button from '../../../../ui/AccountButton';
7
7
  import FavoriteButton from '../../../../FavoriteButton';
8
- // import ProductIndividual from '@/components/common/ProductIndividual';
9
- //TODO: Fake
10
8
  const pathname = '/cart/';
11
- const addToCart = () => { };
12
- const removeCart = () => { };
13
- const Item = memo(({ data, edit, favorite, remove, select, isLast, favorites, deleteCartItem }) => {
9
+ const Item = memo(({ data, edit, favorite, remove, select, isLast, favorites, actions }) => {
14
10
  const { openPopup } = useUi();
15
- const { currency } = useAccountContext();
11
+ const { currency, maxQty } = useAccountContext();
16
12
  const selectionList = useMemo(() => {
17
13
  if (select) {
18
14
  const selectList = [];
19
- for (let index = 1; index <= data?.qty; index++) {
15
+ for (let index = 1; index <= maxQty; index++) {
20
16
  selectList.push({ value: index, label: index });
21
17
  }
22
18
  return selectList;
23
19
  }
24
- }, [data, select]);
20
+ }, [data, select, maxQty]);
25
21
  return (React.createElement("div", { className: `item-wrap` },
26
22
  React.createElement("div", { className: 'line' }),
27
23
  React.createElement("div", { className: `item-inner-wrapper` },
@@ -30,38 +26,30 @@ const Item = memo(({ data, edit, favorite, remove, select, isLast, favorites, de
30
26
  React.createElement(Image, { src: data?.product?.image?.src, alt: data?.product?.image?.alt })),
31
27
  React.createElement("div", { className: `col-1-right-wrap` },
32
28
  React.createElement(Button, { url: data.product?.url, className: `capitalize`, text: data.product?.name, btnType: `green-large-text`, target: pathname === '/cart/' || pathname === '/checkout' ? '_blank' : '_self' }),
29
+ React.createElement("div", { className: `right-first-item-wrap` },
30
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 capitalize`, text: data.product.short_info_1 })),
31
+ React.createElement("div", { className: `right-second-item-wrap` },
32
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: data.product.short_info_2 })),
33
33
  edit && !data.product?.out_of_stock ? (React.createElement("div", { className: `edit-btn-wrap empty` },
34
- React.createElement(Button, { text: 'edit', btnType: `green-small-text`, onClick: () => openPopup(
35
- // <ProductIndividual
36
- // isPopup
37
- // qty={data.qty}
38
- // itemId={data.id}
39
- // selectedOption={data.selectedOption}
40
- // selectedVariant={data.selectedVariant}
41
- // {...data.product}
42
- // />
43
- React.createElement("div", null, "Product Individual")) }))) : pathname === '/cart/' ? (React.createElement(Text, { className: `p p3 apercuPro_Bold account-primary-color3 underline opacityZero empty`, text: 'empty' })) : (''))),
44
- React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (
45
- // <FormSelect
46
- // list={selectionList}
47
- // getPopupContainer={false}
48
- // selectedValue={data.qty}
49
- // onChange={(val) => addToCart({ productId: data.product?.id, variantId: data.selectedVariant?.id, optionId: data.selectedOption?.id, qty: val, update: true })}
50
- // />
51
- React.createElement(Select, { allowSearch: false, options: selectionList, value: 1, onChange: (val) => console.log(`Select ${val}`) })) : (React.createElement(Text, { className: `p p3 account-font-medium account-primary-color1`, text: data.qty })))) : (React.createElement(Text, { className: `p p3 account-font-medium account-primary-color1`, text: data.qty }))),
52
- React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data?.discountedPrice ? (React.createElement("div", null,
53
- React.createElement(Text, { className: `p p3 apercuPro_Bold account-secondary-color2 alignRight`, text: handlePriceCheckFunc(data?.discountedPrice, currency) }),
54
- React.createElement(Text, { className: `p p3 account-font-regular account-primary-color2 lineThrough value alignRight`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 alignRight`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
34
+ React.createElement(Button, { text: 'edit', btnType: `green-small-text`, onClick: () => openPopup(React.createElement("div", null, "Product Individual")) }))) : pathname === '/cart/' ? (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color3 underline opacityZero empty`, text: 'empty' })) : (''))),
35
+ React.createElement("div", { className: `col-item tl-col-2` }, select ? (React.createElement("div", { className: `select-and-out-of-stock-wrap` }, !data.product?.out_of_stock ? (React.createElement(Select, { allowSearch: false, options: selectionList, value: data.qty, onChange: (val) => actions.add({
36
+ productId: data.product.id,
37
+ qty: val,
38
+ }) })) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: data.qty }))),
39
+ React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data?.product?.sale_price ? (React.createElement("div", null,
40
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 alignRight`, text: handlePriceCheckFunc(data?.product?.sale_price, currency) }),
41
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 alignRight`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
42
+ console.log(data.total),
55
43
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap` },
56
44
  React.createElement("div", { className: `col-item-inner-wrap` },
57
- React.createElement("div", { className: `flex-end-wrap` }, data?.discountedPrice ? (React.createElement("div", null,
58
- React.createElement(Text, { className: `p p3 account-font-bold account-secondary-color2 alignRight`, text: handlePriceCheckFunc(data?.discountedPrice * data.qty, currency) }),
59
- React.createElement(Text, { className: `p p3 account-font-regular account-primary-color2 lineThrough value alignRight`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 alignRight`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))),
45
+ React.createElement("div", { className: `flex-end-wrap` }, data?.product.sale_price ? (React.createElement("div", null,
46
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right`, text: `${data.sale_total} ${currency}` }),
47
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right`, text: `${data.total} ${currency}` }))),
60
48
  React.createElement("div", { className: `favorite-and-remove-wrap` },
61
49
  favorite && !data.product?.out_of_stock && (React.createElement("div", { className: `favorite-btn-wrap` },
62
50
  React.createElement(FavoriteButton, { qty: data.qty, type: `withText`, favorites: favorites, productId: data.product?.id, optionId: data.selectedOption?.id, variantId: data.selectedVariant?.id }))),
63
51
  remove && (React.createElement("div", { className: `remove-btn-wrap` },
64
- React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => deleteCartItem({ productId: data.product?.id }) }))))))),
52
+ React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
65
53
  isLast ? React.createElement("div", { className: 'line' }) : null));
66
54
  });
67
55
  export default Item;
@@ -40,22 +40,22 @@ const ItemMobile = memo(({ data, additionalParameters, isLast, favorites }) => {
40
40
  // onChange={(val) => addToCart({ productId: data.product.id, variantId: data.selectedVariant.id, optionId: data.selectedOption.id, qty: val, update: true })}
41
41
  // />
42
42
  React.createElement(Select, { allowSearch: false, options: selectionList, value: 1, onChange: (val) => console.log(val) })) : (React.createElement("div", { className: `mobile-info-item` },
43
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1`, text: `quantityWithSymbol` }),
43
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: `quantityWithSymbol` }),
44
44
  "\u00A0",
45
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1`, text: data.qty }))))) : (React.createElement("div", { className: `mobile-info-item` },
46
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1`, text: `quantityWithSymbol` }),
45
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: data.qty }))))) : (React.createElement("div", { className: `mobile-info-item` },
46
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: `quantityWithSymbol` }),
47
47
  "\u00A0",
48
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1`, text: data.qty || data.quantity }))),
48
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1`, text: data.qty || data.quantity }))),
49
49
  React.createElement("div", { className: `mobile-price-wrap nowrap` },
50
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1 mb-mt`, text: `price` }),
50
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1 mb-mt`, text: `price` }),
51
51
  data?.discountedPrice ? (React.createElement("div", null,
52
- React.createElement(Text, { className: `p p3 apercuPro_Bold secondaryColor2`, text: handlePriceCheckFunc(data?.product.discountedPrice, currency) }),
53
- React.createElement(Text, { className: `p p3 apercuPro_Regular primaryColor2 lineThrough value`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `p p3 apercuPro_Bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
52
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold secondaryColor2`, text: handlePriceCheckFunc(data?.product.discountedPrice, currency) }),
53
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular primaryColor2 lineThrough value`, text: handlePriceCheckFunc(data.product?.price, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price, currency) }))),
54
54
  React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
55
- React.createElement(Text, { className: `p p3 apercuPro_Medium primaryColor1 mb-mt`, text: `total` }),
55
+ React.createElement(Text, { className: `account-p account-p3 account-font-medium primaryColor1 mb-mt`, text: `total` }),
56
56
  data.selectedOption?.discountedPrice ? (React.createElement("div", null,
57
- React.createElement(Text, { className: `p p3 apercuPro_Bold secondaryColor2`, text: handlePriceCheckFunc(data.product?.discountedPrice * data.qty, currency) }),
58
- React.createElement(Text, { className: `p p3 apercuPro_Regular primaryColor2 lineThrough`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `p p3 apercuPro_Bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price * data.qty || data.total, currency || currency) }))))),
57
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold secondaryColor2`, text: handlePriceCheckFunc(data.product?.discountedPrice * data.qty, currency) }),
58
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular primaryColor2 lineThrough`, text: handlePriceCheckFunc(data.product?.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold primaryColor1`, text: handlePriceCheckFunc(data.product?.price * data.qty || data.total, currency || currency) }))))),
59
59
  pathname === '/cart/' && (React.createElement("div", { className: `edit-remove-favorite-mobile-wrap` },
60
60
  additionalParameters.edit.item && !data.product?.out_of_stock ? (React.createElement(Button, { text: 'edit', btnType: `green-small-text`, onClick: () => openPopup(
61
61
  // <ProductIndividual
@@ -66,7 +66,7 @@ const ItemMobile = memo(({ data, additionalParameters, isLast, favorites }) => {
66
66
  // selectedVariant={data.selectedVariant}
67
67
  // {...data.product}
68
68
  // />
69
- React.createElement("div", null, "Product Individual")) })) : (React.createElement(Text, { className: `p p3 apercuPro_Bold primaryColor3 underline opacityZero empty`, text: 'empty' })),
69
+ React.createElement("div", null, "Product Individual")) })) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold primaryColor3 underline opacityZero empty`, text: 'empty' })),
70
70
  React.createElement("div", { className: `favorite-remove-mobile-wrap` }, additionalParameters.remove && (React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => removeCart({ productId: data.product.id, variantId: data.selectedVariant.id, optionId: data.selectedOption.id }) })))))),
71
71
  React.createElement("div", { className: 'line' })));
72
72
  });
@@ -5,22 +5,22 @@ import Item from './Item';
5
5
  import ItemMobile from './ItemMobile';
6
6
  //* Style
7
7
  import CartItemsStyle from './style';
8
- const CartItems = memo(({ data, className, title, smallFontSize, additionalParameters, currency, isLast, favorites, deleteCartItem }) => {
8
+ const CartItems = memo(({ data, className, title, smallFontSize, additionalParameters, currency, isLast, favorites, actions }) => {
9
9
  const { winWidth } = useUi();
10
10
  //! Store
11
11
  const orderStore = useMemo(() => {
12
12
  return winWidth >= 768 ? (React.createElement("div", { className: `order-items-table-wrap` },
13
13
  React.createElement("div", { className: `titles-wrap` },
14
14
  React.createElement("div", { className: `title-wrap tl-col-1` },
15
- React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 nowrap`, text: `item` })),
15
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 nowrap`, text: `item` })),
16
16
  React.createElement("div", { className: `title-wrap tl-col-2` },
17
- React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 nowrap`, text: `quantity` })),
17
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 nowrap`, text: `quantity` })),
18
18
  React.createElement("div", { className: `title-wrap tl-col-3 title-item` },
19
- React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 nowrap alignRight`, text: `price` })),
19
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 nowrap alignRight`, text: `price` })),
20
20
  React.createElement("div", { className: `title-wrap tl-col-4 title-item` },
21
- React.createElement(Text, { className: `p p3 account-font-bold account-primary-color1 nowrap alignRight`, text: `total` }))),
21
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 nowrap alignRight`, text: `total` }))),
22
22
  React.createElement("div", { className: `items-wrap` }, data?.map((item, index) => {
23
- return (React.createElement(Item, { key: index, data: item, currency: currency, favorites: favorites, isLast: data.length - 1 == index, select: additionalParameters.select, remove: additionalParameters.remove, edit: additionalParameters.edit.item, favorite: additionalParameters.favorite, deleteCartItem: deleteCartItem }));
23
+ return (React.createElement(Item, { key: index, data: item, currency: currency, favorites: favorites, isLast: data.length - 1 == index, select: additionalParameters.select, remove: additionalParameters.remove, edit: additionalParameters.edit.item, favorite: additionalParameters.favorite, actions: actions }));
24
24
  })))) : (React.createElement("div", { className: `mobile-order-items-table-wrap` }, data?.map((item, index) => {
25
25
  return (React.createElement(ItemMobile, { key: index, data: item, isLast: isLast, currency: currency, favorites: favorites, additionalParameters: additionalParameters }));
26
26
  })));
@@ -109,8 +109,8 @@ const CartItemsStyle = styled.section `
109
109
 
110
110
  .tl-col-2 {
111
111
  width: var(--col2Width);
112
- padding-left: calc(var(--col2Distance) / 2);
113
- padding-right: calc(var(--col2Distance) / 2);
112
+ /* padding-left: calc(var(--col2Distance) / 2); */
113
+ /* padding-right: calc(var(--col2Distance) / 2); */
114
114
  }
115
115
 
116
116
  .tl-col-3 {
@@ -5,7 +5,7 @@ import theme from '../../../styles/theme';
5
5
  //* Style
6
6
  import WarningMessageForPopupStyle from './style';
7
7
  //* Components
8
- import AccountButton from '../../AccountButton';
8
+ import AccountButton from '../AccountButton';
9
9
  const WarningMessageForPopup = React.memo(({ isDelete = false, isThankYou = false, onRemove, title, description, globalData }) => {
10
10
  const { closePopup } = useUi();
11
11
  const globalTheme = useTheme();
@@ -23,7 +23,7 @@ const AccountInfo = ({ user, onAccountUpdate, displayFields = defaultDisplayFiel
23
23
  React.createElement(Text, { text: `accountInformation`, className: `account-p account-p1 account-font-bold account-primary-color1` }),
24
24
  !edit ? (React.createElement(React.Fragment, null,
25
25
  React.createElement("div", { className: `info-wrap` }, displayFields.map((displayField, index) => (React.createElement("div", { key: index, className: `info-item-wrap` },
26
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: `${displayField.label}:` }),
26
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1`, text: `${displayField.label}` }),
27
27
  "\u00A0",
28
28
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: user[displayField.value] || '-' }))))),
29
29
  React.createElement(AccountButton, { text: `edit`, btnType: `green-large-text`, onClick: () => setEdit(true) }))) : (React.createElement(React.Fragment, null,
@@ -1,8 +1,8 @@
1
1
  export const defaultDisplayFields = [
2
- { label: 'First Name', value: 'first_name' },
3
- { label: 'Last Name', value: 'last_name' },
4
- { label: 'Phone', value: 'phone' },
5
- { label: 'Email', value: 'email' },
2
+ { label: 'first_name', value: 'first_name' },
3
+ { label: 'last_name', value: 'last_name' },
4
+ { label: 'phone_', value: 'phone' },
5
+ { label: 'email_', value: 'email' },
6
6
  ];
7
7
  export const defaultFormFields = [
8
8
  {
@@ -28,14 +28,14 @@ export const defaultFormFields = [
28
28
  {
29
29
  fieldType: 'phone',
30
30
  labelProps: {
31
- label: 'Phone',
31
+ label: 'phone_input',
32
32
  name: 'phone',
33
33
  },
34
34
  },
35
35
  {
36
36
  fieldType: 'input',
37
37
  labelProps: {
38
- label: 'Email',
38
+ label: 'email',
39
39
  name: 'email',
40
40
  },
41
41
  fieldProps: {
@@ -1,5 +1,5 @@
1
1
  export default CartTemplate;
2
- declare function CartTemplate({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, deleteCartItem }: {
2
+ declare function CartTemplate({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, actions, btnDisabled, checkoutUrl }: {
3
3
  items: any;
4
4
  itemsCount: any;
5
5
  shippingCost: any;
@@ -8,6 +8,8 @@ declare function CartTemplate({ items, itemsCount, shippingCost, loading, childr
8
8
  shoppingUrl: any;
9
9
  subtotal: any;
10
10
  total: any;
11
- deleteCartItem: any;
11
+ actions: any;
12
+ btnDisabled: any;
13
+ checkoutUrl?: string;
12
14
  }): React.JSX.Element;
13
15
  import React from 'react';
@@ -2,14 +2,14 @@ import React from 'react';
2
2
  import { Container, Page } from '@weareconceptstudio/core';
3
3
  import { EmptyCart, TotalCheckout, AccountButton, SimpleCartItems } from '../../components';
4
4
  import CartTemplateStyle from './style';
5
- const CartTemplate = ({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, deleteCartItem }) => {
5
+ const CartTemplate = ({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, actions, btnDisabled, checkoutUrl = '/checkout/' }) => {
6
6
  return (React.createElement(Page, { className: 'cart use-account' },
7
7
  React.createElement(Container, null,
8
8
  React.createElement(CartTemplateStyle, null,
9
9
  React.createElement(TotalCheckout, { total: total, subtotal: subtotal, itemsCount: itemsCount, shippingCost: shippingCost, buttonProps: {
10
- url: '/checkout/',
10
+ url: checkoutUrl,
11
11
  text: 'proceedToCheckout',
12
- disabled: true,
12
+ disabled: btnDisabled,
13
13
  } }, itemsCount > 0 ? (React.createElement(React.Fragment, null,
14
14
  React.createElement(SimpleCartItems, { data: items, smallFontSize: true, title: 'myCart', favorites: [], className: `cart-st-wrap`, additionalParameters: {
15
15
  edit: { item: true, list: false },
@@ -17,7 +17,7 @@ const CartTemplate = ({ items, itemsCount, shippingCost, loading, children, shop
17
17
  remove: true,
18
18
  horizontalLine: true,
19
19
  select: true,
20
- }, deleteCartItem: deleteCartItem }),
20
+ }, actions: actions }),
21
21
  shoppingUrl ? (React.createElement(AccountButton, { btnType: `purple-text`, text: `continueShopping`, className: `continue-shop-text`, url: shoppingUrl })) : null)) : (!loading && (React.createElement(EmptyCart, { data: items, shoppingUrl: shoppingUrl })))),
22
22
  children))));
23
23
  };
@@ -60,7 +60,7 @@ const ForgotPasswordTemplate = ({ onFormSubmit }) => {
60
60
  React.createElement(Text, { tag: 'h1', className: 'account-h2 account-font-bold account-primary-color1 title', text: 'forgotPassword' }),
61
61
  React.createElement(Text, { className: 'account-p account-p2 account-font-regular account-primary-color1 description', text: 'forgotPasswordDescription' }),
62
62
  React.createElement(Form, { onSubmit: handleFormFinish },
63
- React.createElement(Form.Item, { name: 'email', label: 'email' },
63
+ React.createElement(Form.Item, { name: 'email', label: 'email', rules: [{ type: 'email' }] },
64
64
  React.createElement(Input, { placeholder: 'emailPlaceholder' })),
65
65
  React.createElement("div", { className: 'loginExternalBlock' },
66
66
  React.createElement(Link, { href: '/sign-in' },
@@ -1,31 +1,18 @@
1
1
  declare const _default: {
2
- login: string;
3
2
  saveAndApply: string;
4
3
  addNewAdd: string;
5
4
  editCart: string;
6
5
  shopNow: string;
7
6
  firstName: string;
8
- first_nameIsRequired: string;
9
7
  lastName: string;
10
- last_nameIsRequired: string;
11
8
  email: string;
12
- emailIsRequired: string;
13
- invalidEmailAddress: string;
14
9
  phone: string;
15
- phoneIsRequired: string;
16
- invalidPhoneNumber: string;
17
10
  password: string;
18
- passwordIsRequired: string;
19
- invalidPassword: string;
20
- invalidConfirmPassword: string;
21
- password_confirmationIsRequired: string;
22
- region: string;
23
- regionPlaceholder: string;
24
- regionIsRequired: string;
25
11
  noData: string;
26
12
  contactUs: string;
27
13
  privacyPolicy: string;
28
14
  welcomeBack: string;
15
+ login: string;
29
16
  forgotPasswordLink: string;
30
17
  accountText: string;
31
18
  joinNow: string;
@@ -71,11 +58,8 @@ declare const _default: {
71
58
  password_title: string;
72
59
  cancel: string;
73
60
  phone_input: string;
74
- current_passwordIsRequired: string;
75
- new_passwordIsRequired: string;
76
61
  enterCurrentPassword: string;
77
62
  enterNewPassword: string;
78
- products: string;
79
63
  firstNamePlaceholder: string;
80
64
  lastNamePlaceholder: string;
81
65
  emailPlaceholder: string;
@@ -190,8 +174,6 @@ declare const _default: {
190
174
  partnership: string;
191
175
  quantityWithSymbol: string;
192
176
  saveChanges: string;
193
- phone_numberIsRequired: string;
194
- region_idIsRequired: string;
195
177
  yourSettingsHaveBeenSaved: string;
196
178
  yourPasswordHaveBeenChanged: string;
197
179
  oopsNoResults: string;
@@ -233,20 +215,10 @@ declare const _default: {
233
215
  yourReview: string;
234
216
  upload: string;
235
217
  submitReview: string;
236
- ratingIsRequired: string;
237
- titleIsRequired: string;
238
- contentIsRequired: string;
239
218
  is_recommendedIsRequired: string;
240
- username: string;
241
- usernamePlaceholder: string;
242
- usernameIsRequired: string;
243
- userName: string;
244
- emptyFilterTitle: string;
245
- emptyFilterDesc: string;
246
219
  productReviewGuidelines: string;
247
220
  archiveRegistry: string;
248
221
  noteMessage: string;
249
- addItemsToRegistry: string;
250
222
  iRecommendThisProduct: string;
251
223
  removeRegistryPopupTitle: string;
252
224
  removeRegistryPopupDesc: string;
@@ -1,31 +1,18 @@
1
1
  export default {
2
- login: 'Login',
3
2
  saveAndApply: 'Save and Apply',
4
3
  addNewAdd: '+ Add a new address',
5
4
  editCart: 'Edit cart',
6
5
  shopNow: 'Shop now',
7
6
  firstName: 'First name',
8
- first_nameIsRequired: 'Please enter your first name.',
9
7
  lastName: 'Last name',
10
- last_nameIsRequired: 'Please enter your last name.',
11
8
  email: 'Email',
12
- emailIsRequired: 'Please enter your email.',
13
- invalidEmailAddress: 'Please enter a valid email address.',
14
9
  phone: 'Phone',
15
- phoneIsRequired: 'Please enter your phone.',
16
- invalidPhoneNumber: 'Please enter a valid phone number.',
17
10
  password: 'Password',
18
- passwordIsRequired: 'Please enter your password.',
19
- invalidPassword: 'Password must contain lowercase, uppercase, number and has been min 8 characters.',
20
- invalidConfirmPassword: 'Password confirmation is not correct.',
21
- password_confirmationIsRequired: 'Please enter your confirmed password.',
22
- region: 'Region',
23
- regionPlaceholder: 'Select region',
24
- regionIsRequired: 'Please enter your region.',
25
11
  noData: 'No data',
26
12
  contactUs: 'Contact us',
27
13
  privacyPolicy: 'Privacy policy',
28
14
  welcomeBack: 'Welcome back!',
15
+ login: 'Login',
29
16
  forgotPasswordLink: 'Forgot Password?',
30
17
  accountText: 'Don’t have an account?',
31
18
  joinNow: 'Join now',
@@ -71,11 +58,8 @@ export default {
71
58
  password_title: 'Password',
72
59
  cancel: 'Cancel',
73
60
  phone_input: 'Phone',
74
- current_passwordIsRequired: 'Please enter your current password.',
75
- new_passwordIsRequired: 'Please enter your new password.',
76
61
  enterCurrentPassword: 'Enter current password',
77
62
  enterNewPassword: 'Enter new password',
78
- products: 'products',
79
63
  firstNamePlaceholder: 'First name',
80
64
  lastNamePlaceholder: 'Last name',
81
65
  emailPlaceholder: 'Email',
@@ -190,8 +174,6 @@ export default {
190
174
  partnership: 'Partnership',
191
175
  quantityWithSymbol: 'Quantity:',
192
176
  saveChanges: 'Save changes',
193
- phone_numberIsRequired: 'Please enter your phone.',
194
- region_idIsRequired: 'Please enter your region.',
195
177
  yourSettingsHaveBeenSaved: 'Your settings have been saved.',
196
178
  yourPasswordHaveBeenChanged: 'Your password has been changed.',
197
179
  oopsNoResults: 'Oops, no results.',
@@ -233,20 +215,10 @@ export default {
233
215
  yourReview: 'Your review',
234
216
  upload: 'Upload',
235
217
  submitReview: 'Submit review',
236
- ratingIsRequired: 'Please rate the item.',
237
- titleIsRequired: 'Please add a title to your review.',
238
- contentIsRequired: 'Your review must be at least 25 characters in length. Please try again.',
239
218
  is_recommendedIsRequired: 'Please select.',
240
- username: 'Username',
241
- usernamePlaceholder: 'Username',
242
- usernameIsRequired: 'Please enter your username.',
243
- userName: 'Username:',
244
- emptyFilterTitle: 'No results matching your filters',
245
- emptyFilterDesc: 'Please adjust your criteria or explore other categories to discover the perfect shop.',
246
219
  productReviewGuidelines: 'Product review guidelines',
247
220
  archiveRegistry: 'Archive registry',
248
221
  noteMessage: 'Note message',
249
- addItemsToRegistry: 'Add items to registry',
250
222
  iRecommendThisProduct: 'I recommend this product',
251
223
  removeRegistryPopupTitle: "Are you sure you'd like to remove your registry?",
252
224
  removeRegistryPopupDesc: 'It will no longer be accessible in stores or online.',