@weareconceptstudio/account 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccountProvider.d.ts +2 -1
- package/dist/AccountProvider.js +2 -2
- package/dist/components/AddressForm/index.js +1 -2
- package/dist/components/AddressItem/index.js +1 -1
- package/dist/components/AddressWrap/index.js +1 -1
- package/dist/components/EmptyOrders/index.js +1 -1
- package/dist/components/OrderedItems/index.js +1 -1
- package/dist/components/OrdersList/OrderItem/index.js +1 -1
- package/dist/components/OrdersList/index.js +2 -2
- package/dist/components/SelectShippingBilling/index.js +1 -1
- package/dist/components/TotalCheckout/index.js +1 -1
- package/dist/components/cart/Items/Simple/Item/index.js +21 -33
- package/dist/components/cart/Items/Simple/ItemMobile/index.js +11 -11
- package/dist/components/cart/Items/Simple/index.js +6 -6
- package/dist/components/cart/Items/Simple/style.js +2 -2
- package/dist/components/ui/WarningMessageForPopup/index.js +1 -1
- package/dist/templates/CartTemplate/index.d.ts +2 -2
- package/dist/templates/CartTemplate/index.js +2 -2
- 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';
|
package/dist/AccountProvider.js
CHANGED
|
@@ -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
|
|
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 <=
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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?.
|
|
58
|
-
React.createElement(Text, { className: `p p3 account-font-bold account-secondary-color2
|
|
59
|
-
React.createElement(Text, { className: `p p3 account-font-regular account-primary-color2
|
|
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: () =>
|
|
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
|
|
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
|
|
46
|
-
React.createElement(Text, { className: `p p3
|
|
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
|
|
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
|
|
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
|
|
53
|
-
React.createElement(Text, { className: `p p3
|
|
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
|
|
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
|
|
58
|
-
React.createElement(Text, { className: `p p3
|
|
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
|
|
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,
|
|
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,
|
|
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 '
|
|
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();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default CartTemplate;
|
|
2
|
-
declare function CartTemplate({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total,
|
|
2
|
+
declare function CartTemplate({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, actions }: {
|
|
3
3
|
items: any;
|
|
4
4
|
itemsCount: any;
|
|
5
5
|
shippingCost: any;
|
|
@@ -8,6 +8,6 @@ declare function CartTemplate({ items, itemsCount, shippingCost, loading, childr
|
|
|
8
8
|
shoppingUrl: any;
|
|
9
9
|
subtotal: any;
|
|
10
10
|
total: any;
|
|
11
|
-
|
|
11
|
+
actions: any;
|
|
12
12
|
}): React.JSX.Element;
|
|
13
13
|
import React from 'react';
|
|
@@ -2,7 +2,7 @@ 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,
|
|
5
|
+
const CartTemplate = ({ items, itemsCount, shippingCost, loading, children, shoppingUrl, subtotal, total, actions }) => {
|
|
6
6
|
return (React.createElement(Page, { className: 'cart use-account' },
|
|
7
7
|
React.createElement(Container, null,
|
|
8
8
|
React.createElement(CartTemplateStyle, null,
|
|
@@ -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
|
-
},
|
|
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
|
};
|