@riosst100/pwa-marketplace 1.9.2 → 1.9.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riosst100/pwa-marketplace",
3
3
  "author": "riosst100@gmail.com",
4
- "version": "1.9.2",
4
+ "version": "1.9.3",
5
5
  "main": "src/index.js",
6
6
  "pwa-studio": {
7
7
  "targets": {
@@ -13,7 +13,9 @@
13
13
  "iconsax-react": "^0.0.8",
14
14
  "react-countdown": "^2.3.5",
15
15
  "react-phone-number-input": "^3.3.9",
16
- "react-slick": "^0.30.2"
16
+ "react-slick": "^0.30.2",
17
+ "react-datepicker": "4.10.0",
18
+ "react-dropzone": "^14.2.3"
17
19
  },
18
20
  "license": "MIT",
19
21
  "private": false
@@ -63,4 +63,5 @@ module.exports = componentOverrideMapping = {
63
63
  [`@magento/venia-ui/lib/components/CheckoutPage/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/CheckoutPage/index.js',
64
64
  [`@magento/venia-ui/lib/components/Dialog/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/Dialog/index.js',
65
65
  [`@magento/venia-ui/lib/components/OrderHistoryPage/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/OrderHistoryPage/index.js',
66
+ [`@magento/venia-ui/lib/components/TextArea/index.js`]: '@riosst100/pwa-marketplace/src/overwrites/venia-ui/lib/components/TextArea/index.js',
66
67
  };
@@ -1,3 +1,13 @@
1
1
  .menu {
2
- flex-basis: 260px;
2
+ flex-basis: 23%;
3
+ }
4
+
5
+ .blockContent {
6
+ width: 100%;
7
+ }
8
+
9
+ @media only screen and (min-width: 1024px) {
10
+ .blockContent {
11
+ width: calc(100% - 260px);
12
+ }
3
13
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { useState } from 'react';
2
2
  import { Link } from 'react-router-dom';
3
3
  import { FormattedMessage } from 'react-intl';
4
4
  import defaultClasses from './accountlayout.module.css';
@@ -6,6 +6,7 @@ import { useStyle } from '@magento/venia-ui/lib/classify';
6
6
  import { ArrowDown2 } from 'iconsax-react';
7
7
  import { useWindowSize } from '@magento/peregrine';
8
8
  import cn from 'classnames';
9
+ import { useLocation } from 'react-router-dom';
9
10
 
10
11
  const AccountLayout = (props) => {
11
12
  const { children } = props;
@@ -15,6 +16,16 @@ const AccountLayout = (props) => {
15
16
  const isTablet = windowSize.innerWidth <= 1023;
16
17
 
17
18
  const classes = useStyle(defaultClasses, props.classes);
19
+
20
+ const location = useLocation();
21
+ const { pathname } = location
22
+
23
+ const [activeMenu, setActiveMenu] = useState(pathname);
24
+
25
+ const handleActiveMenu = () => {
26
+ setActiveMenu(pathname)
27
+ }
28
+
18
29
  return (
19
30
  <>
20
31
  <div className='flex flex-col lg_flex-row lg_justify-between gap-[30px] mt-8 relative'>
@@ -40,19 +51,22 @@ const AccountLayout = (props) => {
40
51
  <div
41
52
  className={cn(
42
53
  classes.menu,
43
- 'hidden lg_block',
54
+ 'hidden lg_block z-[1]',
44
55
  isTablet && isOpen ? 'absolute !block bg-white w-full top-14' : '',
45
56
  )}
46
57
  >
47
58
  <div
48
59
  className={cn(
49
- 'flex flex-col border border-gray-100 rounded-lg px-2.5 py-5'
60
+ 'flex flex-col border border-gray-100 rounded-lg px-2.5 py-5 gap-y-2'
50
61
  )}
51
62
  >
52
63
  <li className="list-none">
53
64
  <Link
54
65
  to="/order-history"
55
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
66
+ className={cn(
67
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
68
+ activeMenu === '/order-history' ? 'bg-gray-150' : ''
69
+ )}
56
70
  >
57
71
  <FormattedMessage
58
72
  id={'myaccount.orderHistory'}
@@ -61,10 +75,28 @@ const AccountLayout = (props) => {
61
75
 
62
76
  </Link>
63
77
  </li>
78
+ <li className="list-none">
79
+ <Link
80
+ to="/quotes"
81
+ className={cn(
82
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
83
+ activeMenu === '/quotes' ? 'bg-gray-150' : ''
84
+ )}
85
+ >
86
+ <FormattedMessage
87
+ id={'myaccount.Quotes'}
88
+ defaultMessage={'Quotes'}
89
+ />
90
+
91
+ </Link>
92
+ </li>
64
93
  <li className="list-none">
65
94
  <Link
66
95
  to="/wishlist"
67
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
96
+ className={cn(
97
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
98
+ activeMenu === '/wishlist' ? 'bg-gray-150' : ''
99
+ )}
68
100
  >
69
101
  <FormattedMessage
70
102
  id={'myaccount.wishlist'}
@@ -75,8 +107,11 @@ const AccountLayout = (props) => {
75
107
  </li>
76
108
  <li className="list-none">
77
109
  <Link
78
- to="#"
79
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
110
+ to="/favorite-seller"
111
+ className={cn(
112
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
113
+ activeMenu === '/favorite-seller' ? 'bg-gray-150' : ''
114
+ )}
80
115
  >
81
116
  <FormattedMessage
82
117
  id={'myaccount.favoriteSeller'}
@@ -88,7 +123,10 @@ const AccountLayout = (props) => {
88
123
  <li className="list-none">
89
124
  <Link
90
125
  to="/address-book"
91
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
126
+ className={cn(
127
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
128
+ activeMenu === '/address-book' ? 'bg-gray-150' : ''
129
+ )}
92
130
  >
93
131
  <FormattedMessage
94
132
  id={'myaccount.addressBook'}
@@ -100,7 +138,10 @@ const AccountLayout = (props) => {
100
138
  <li className="list-none">
101
139
  <Link
102
140
  to="/saved-payments"
103
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
141
+ className={cn(
142
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
143
+ activeMenu === '/saved-payments' ? 'bg-gray-150' : ''
144
+ )}
104
145
  >
105
146
  <FormattedMessage
106
147
  id={'myaccount.payments'}
@@ -111,8 +152,11 @@ const AccountLayout = (props) => {
111
152
  </li>
112
153
  <li className="list-none">
113
154
  <Link
114
- to="/communications#"
115
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
155
+ to="/communications"
156
+ className={cn(
157
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
158
+ activeMenu === '/communications' ? 'bg-gray-150' : ''
159
+ )}
116
160
  >
117
161
  <FormattedMessage
118
162
  id={'myaccount.newsletter'}
@@ -124,7 +168,10 @@ const AccountLayout = (props) => {
124
168
  <li className="list-none">
125
169
  <Link
126
170
  to="/account-information"
127
- className="text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md"
171
+ className={cn(
172
+ "text-[14px] font-medium p-2.5 block w-full hover_bg-gray-150 rounded-md",
173
+ activeMenu === '/account-information' ? 'bg-gray-150' : ''
174
+ )}
128
175
  >
129
176
  <FormattedMessage
130
177
  id={'myaccount.accountInformation'}
@@ -136,7 +183,7 @@ const AccountLayout = (props) => {
136
183
 
137
184
  </div>
138
185
  </div>
139
- <div className='block w-full'>
186
+ <div className={cn(classes.blockContent, 'block')}>
140
187
  {children}
141
188
  </div>
142
189
  </div >
@@ -1,12 +1,9 @@
1
1
  import React from 'react'
2
2
 
3
- const starIcon = () => {
3
+ const starIcon = ({ width = 14, height = 14 }) => {
4
4
  return (
5
5
  <>
6
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
7
- <path d="M8.00985 2.04754L9.03651 4.10087C9.17651 4.38671 9.54985 4.66087 9.86485 4.71337L11.7257 5.02254C12.9157 5.22087 13.1957 6.08421 12.3382 6.93587L10.8915 8.38254C10.6465 8.62754 10.5123 9.10004 10.5882 9.43837L11.0023 11.2292C11.329 12.6467 10.5765 13.195 9.32235 12.4542L7.57818 11.4217C7.26318 11.235 6.74401 11.235 6.42318 11.4217L4.67901 12.4542C3.43068 13.195 2.67235 12.6409 2.99901 11.2292L3.41318 9.43837C3.48901 9.10004 3.35485 8.62754 3.10985 8.38254L1.66318 6.93587C0.811513 6.08421 1.08568 5.22087 2.27568 5.02254L4.13651 4.71337C4.44568 4.66087 4.81901 4.38671 4.95901 4.10087L5.98568 2.04754C6.54568 0.933372 7.45568 0.933372 8.00985 2.04754Z" fill="#F7C317" stroke="#F7C317" stroke-linecap="round" stroke-linejoin="round" />
8
- </svg>
9
-
6
+ <svg xmlns="http://www.w3.org/2000/svg" width={width} height={height} viewBox="0 0 24 24" fill="#F7C317"><path d="m13.73 3.51 1.76 3.52c.24.49.88.96 1.42 1.05l3.19.53c2.04.34 2.52 1.82 1.05 3.28l-2.48 2.48c-.42.42-.65 1.23-.52 1.81l.71 3.07c.56 2.43-.73 3.37-2.88 2.1l-2.99-1.77c-.54-.32-1.43-.32-1.98 0l-2.99 1.77c-2.14 1.27-3.44.32-2.88-2.1l.71-3.07c.13-.58-.1-1.39-.52-1.81l-2.48-2.48c-1.46-1.46-.99-2.94 1.05-3.28l3.19-.53c.53-.09 1.17-.56 1.41-1.05l1.76-3.52c.96-1.91 2.52-1.91 3.47 0Z" stroke="#F7C317" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg>
10
7
  </>
11
8
  )
12
9
  }
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import { StoreTitle } from '@magento/venia-ui/lib/components/Head';
3
+ import { useIntl } from 'react-intl';
4
+ import Item from './item';
5
+
6
+ const favoriteSeller = () => {
7
+
8
+ const { formatMessage } = useIntl();
9
+ const PAGE_TITLE = formatMessage({
10
+ id: 'favoriteSellerPage.pageTitleText',
11
+ defaultMessage: 'Favorite Seller'
12
+ });
13
+
14
+ return (
15
+ <div className='relative'>
16
+ <StoreTitle>{PAGE_TITLE}</StoreTitle>
17
+ <div aria-live="polite" className="text-xl font-medium text-left mb-[30px]">
18
+ {PAGE_TITLE}
19
+ </div>
20
+
21
+ <div className='flex flex-col gap-5'>
22
+ {
23
+ [...Array(5)].map(() => (
24
+ <Item />
25
+ ))
26
+ }
27
+ </div>
28
+ </div>
29
+ )
30
+ }
31
+
32
+ export default favoriteSeller
@@ -0,0 +1,14 @@
1
+ import FavoriteSeller from './favoriteSeller'
2
+ import AccountLayout from '@riosst100/pwa-marketplace/src/components/AccountLayout';
3
+
4
+ import React from 'react'
5
+
6
+ const index = () => {
7
+ return (
8
+ <AccountLayout>
9
+ <FavoriteSeller />
10
+ </AccountLayout>
11
+ )
12
+ }
13
+
14
+ export default index
@@ -0,0 +1,140 @@
1
+ import React from 'react';
2
+ import { Form } from 'informed';
3
+ import Button from '@magento/venia-ui/lib/components/Button';
4
+ import Image from '@magento/venia-ui/lib/components/Image';
5
+ import Verify from '@riosst100/pwa-marketplace/src/components/CrossSeller/verifyIcon';
6
+ import Star from '@riosst100/pwa-marketplace/src/components/CrossSeller/starIcon';
7
+ import logoImage from '@riosst100/pwa-marketplace/src/components/CrossSeller/logo_seller.png';
8
+ import { Share, Trash } from 'iconsax-react';
9
+ import SocialShare from '@riosst100/pwa-marketplace/src/components/SocialMediaShare';
10
+ import { X } from 'react-feather';
11
+ import Modal from '@riosst100/pwa-marketplace/src/components/Modal';
12
+ import cn from 'classnames';
13
+ import { primary900 } from '@riosst100/pwa-marketplace/src/theme/vars';
14
+ import { FormattedMessage } from 'react-intl';
15
+
16
+ const item = () => {
17
+ const [open, setOpen] = React.useState(false);
18
+
19
+ const handleRemoveFromFavorite = () => {
20
+ alert('remove fav seller')
21
+ }
22
+
23
+ const handleGoToSellerPage = () => {
24
+ alert('to seller page')
25
+ }
26
+
27
+ return (
28
+ <>
29
+ <Modal
30
+ open={open}
31
+ setOpen={setOpen}
32
+ className={cn(
33
+ 'max-w-max !min-h-auto px-[30px] pt-[30px] pb-10',
34
+ )}
35
+ >
36
+ <div className='social_share-container flex flex-col gap-y-7'>
37
+ <div className='flex justify-between'>
38
+ <div className='text-lg font-semibold'>
39
+ Share to your friends
40
+ </div>
41
+ <button onClick={() => { setOpen(!open) }} >
42
+ <X size={24} color={primary900} />
43
+ </button>
44
+ </div>
45
+ <div className='flex flex-row border border-gray-100 rounded-md px-5 py-2.5 gap-x-2.5 items-center'>
46
+ <div className='flex flex-col'>
47
+ <div className='text-[14px] font-normal'>
48
+ Zen Market.TCG
49
+ </div>
50
+ <div className='text-[12px] font-normal text-gray-200'>
51
+ zenmarket-tcg.link
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <SocialShare rootClassName="justify-center" />
56
+ </div>
57
+ </Modal>
58
+ <div className='border border-gray-100 rounded-md p-5 flex flex-col md_flex-row justify-between gap-y-4'>
59
+ <div className='seller_info-container flex flex-row gap-x-[15px]'>
60
+ <div className='logo_wrapper w-[100px] h-[100px]'>
61
+ <Image
62
+ alt='seller name'
63
+ className="relative mt-[-5px]"
64
+ src={logoImage}
65
+ />
66
+ </div>
67
+ <div className='flex flex-col gap-y-[15px]'>
68
+ <div className='flex flex-col gap-[6px]'>
69
+ <div className='seller_summary-wrapper flex flex-row gap-x-2.5 items-center'>
70
+ <div className='seller_name text-lg font-semibold leading-6'>
71
+ Zen Market
72
+ </div>
73
+ <div className='seller_badge flex flex-row gap-x-[5px] items-center leading-6'>
74
+ <Verify />
75
+ <span className='text-xs font-medium text-gray-600-transparent capitalize'>
76
+ Verified
77
+ </span>
78
+ </div>
79
+ </div>
80
+ <div className='flex flex-row gap-x-[5px] items-center'>
81
+ <span className='font-normal text-[12px] text-gray-200 '>
82
+ Jurong West
83
+ </span>
84
+ </div>
85
+ </div>
86
+ <div className='flex gap-4'>
87
+ <Button
88
+ classes={{
89
+ content: 'gap-1.5 grid-flow-col inline-grid items-center justify-center justify-items-center capitalize font-medium text-[14px]',
90
+ rootClass: 'py-[0px] h-9 hover_border-blue-700'
91
+ }}
92
+ onClick={handleGoToSellerPage}
93
+ >
94
+ <FormattedMessage
95
+ id={'favoriteSeller.visitStore'}
96
+ defaultMessage={'Visit Store'}
97
+ />
98
+ </Button>
99
+ <div
100
+ className='flex items-center justify-center gap-[5px] p-[9px] relative rounded-[30px] overflow-hidden border border-solid border-blue-600 hover_border-blue-700 cursor-pointer w-9 h-9'
101
+ onClick={() => { setOpen(!open) }}
102
+ >
103
+ <Share
104
+ size="15"
105
+ className='text-blue-600 group-hover_text-blue-800 left-[-1px]'
106
+ />
107
+ </div>
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <div className='flex flex-row justify-between md_justify-center items-center gap-5'>
112
+ <div className='flex flex-col gap-y-2'>
113
+ <div className='rating_sales flex flex-row gap-x-[5px] items-center'>
114
+ <Star width={18} height={18} />
115
+ <p className='font-semibold text-[18px] text-gray-600'>
116
+ 4.7
117
+ </p>
118
+ </div>
119
+ <span className='text-gray-800 text-xs'>
120
+ <FormattedMessage
121
+ id={'favoriteSeller.RatingAndReviews'}
122
+ defaultMessage={'Rating & Reviews'}
123
+ />
124
+ </span>
125
+
126
+ </div>
127
+ <Button
128
+ data-cy="Product-Section-removeFavorite"
129
+ onClick={handleRemoveFromFavorite}
130
+ className="min-w-min border border-gray-200 rounded-full border-solid w-7 h-7 flex items-center justify-center hover_border-gray-600"
131
+ >
132
+ <Trash size="16" color="#999999" />
133
+ </Button>
134
+ </div>
135
+ </div>
136
+ </>
137
+ )
138
+ }
139
+
140
+ export default item
@@ -6,19 +6,19 @@ const chatContent = (props) => {
6
6
 
7
7
  return (
8
8
  <>
9
- <div className='flex flex-col gap-2'>
9
+ <div className='flex flex-col gap-2 w-full'>
10
10
  {chatData.map((chat) => {
11
11
  return (
12
12
  <div
13
13
  className={cn(
14
- 'w-full max-w-[70%] flex flex-col gap-1',
15
- chat.type === 'seller' ? 'self-start ' : 'self-end ',
14
+ 'w-fit max-w-[70%] flex flex-col gap-1',
15
+ chat.type === 'seller' ? 'self-start ' : 'self-end items-end',
16
16
 
17
17
  )}
18
18
  >
19
19
  <div
20
20
  className={cn(
21
- 'w-full py-2 px-3 rounded-md flex flex-col',
21
+ 'w-fit py-2 px-3 rounded-md flex flex-col',
22
22
  chat.type === 'seller' ? 'bg-gray-150 rounded-tl-none' : ' bg-[#D9D9D9] rounded-tr-none',
23
23
 
24
24
  )}
@@ -0,0 +1,39 @@
1
+ import React, { useState } from 'react';
2
+ import Button from '@magento/venia-ui/lib/components/Button';
3
+ import { useIntl } from 'react-intl';
4
+ import ModalRFQ from './modalRfq';
5
+
6
+ const AuctionDetail = (props) => {
7
+
8
+ const [open, setOpen] = useState(false);
9
+ const { formatMessage } = useIntl();
10
+
11
+ return (
12
+ <>
13
+ <ModalRFQ
14
+ open={open}
15
+ setOpen={setOpen}
16
+ />
17
+
18
+ <Button
19
+ data-cy="ProductFullDetail-RFQ"
20
+ classes={{
21
+ content: 'normal-case font-semibold text-[16px]'
22
+ }}
23
+ priority="low"
24
+ type="submit"
25
+ onClick={() => { setOpen(true) }}
26
+ >
27
+ {
28
+ formatMessage({
29
+ id: 'productFullDetail.RequestQuote',
30
+ defaultMessage:
31
+ 'Request a Quote'
32
+ })
33
+ }
34
+ </Button>
35
+ </>
36
+ )
37
+ }
38
+
39
+ export default AuctionDetail;