@riosst100/pwa-marketplace 1.9.1 → 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.
Files changed (33) hide show
  1. package/package.json +4 -2
  2. package/src/componentOverrideMapping.js +1 -0
  3. package/src/components/AccountLayout/accountlayout.module.css +11 -1
  4. package/src/components/AccountLayout/index.js +60 -13
  5. package/src/components/CrossSeller/starIcon.js +2 -5
  6. package/src/components/FavoriteSeller/favoriteSeller.js +32 -0
  7. package/src/components/FavoriteSeller/index.js +14 -0
  8. package/src/components/FavoriteSeller/item.js +140 -0
  9. package/src/components/FilterTop/CurrentTopFilters/currentTopFilter.js +1 -1
  10. package/src/components/FilterTop/FilterBlockList/filterTopItem.js +3 -1
  11. package/src/components/FilterTop/FilterBlockList/filterTopItemGroup.js +1 -1
  12. package/src/components/FilterTop/filterTop.js +2 -2
  13. package/src/components/LiveChat/chatContent.js +4 -4
  14. package/src/components/RFQ/index.js +39 -0
  15. package/src/components/RFQ/modalRfq.js +249 -0
  16. package/src/components/RFQPage/index.js +14 -0
  17. package/src/components/RFQPage/orderRow.js +318 -0
  18. package/src/components/RFQPage/quoteDetail.js +342 -0
  19. package/src/components/RFQPage/quoteDetailPage.js +14 -0
  20. package/src/components/RFQPage/quoteList.js +227 -0
  21. package/src/components/ShopBy/shopBy.js +41 -0
  22. package/src/intercept.js +28 -0
  23. package/src/overwrites/venia-ui/lib/RootComponents/Category/category.js +2 -1
  24. package/src/overwrites/venia-ui/lib/RootComponents/Category/categoryContent.js +8 -3
  25. package/src/overwrites/venia-ui/lib/components/MegaMenu/shopByColumn.js +3 -3
  26. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/components/auctionDetail.js +0 -1
  27. package/src/overwrites/venia-ui/lib/components/ProductFullDetail/productFullDetail.js +5 -0
  28. package/src/overwrites/venia-ui/lib/components/TextArea/index.js +1 -0
  29. package/src/overwrites/venia-ui/lib/components/TextArea/textArea.js +44 -0
  30. package/src/overwrites/venia-ui/lib/components/TextArea/textArea.module.css +27 -0
  31. package/src/talons/FilterTop/filterTop.gql.js +2 -2
  32. package/src/talons/FilterTop/useFilterTop.js +3 -2
  33. package/src/talons/ShopBy/useShopBy.js +2 -2
@@ -46,6 +46,7 @@ const CategoryContent = props => {
46
46
  const {
47
47
  categoryId,
48
48
  data,
49
+ shopby,
49
50
  isLoading,
50
51
  pageControl,
51
52
  sortProps,
@@ -288,9 +289,13 @@ const CategoryContent = props => {
288
289
  : currentFilter
289
290
  ) : categoryName;
290
291
 
292
+ if (shopby == "gauge") {
293
+ title = "Trains By Gauge";
294
+ }
295
+
291
296
  return (
292
297
  <Fragment>
293
- <Breadcrumbs categoryId={categoryId} currentFilter={activeFilters} />
298
+ <Breadcrumbs categoryId={categoryId} customPage={shopby == "gauge" ? title : ''} currentFilter={activeFilters} />
294
299
  <StoreTitle>{title}</StoreTitle>
295
300
  <article className={classes.root} data-cy="CategoryContent-root">
296
301
  <div className={classes.categoryHeader}>
@@ -307,13 +312,13 @@ const CategoryContent = props => {
307
312
  {/* {activeFilters.size <= 0 && category && category.custom_landing_page ? ( */}
308
313
  <>
309
314
  {currentFilter && <AlphaFilter isSingles={isSingles} items={items} handleActiveLetter={handleActiveLetter} activeLetter={activeLetter} />}
310
- <SubCategory parent={parent} children={children} />
315
+ {shopby != "gauge" ? <SubCategory parent={parent} children={children} /> : ''}
311
316
  {!currentFilter && <CustomSubCategory categoryName={category ? category.name : null} customSubCategory={category ? category.custom_subcategory : null} />}
312
317
  </>
313
318
  {/* ) : ( */}
314
319
  <>
315
320
  {/* <SubCategory filters={filters} children={children} /> */}
316
- <FilterTop filters={filters} category={category} children={children} allowedFilters={category ? category.allowed_filters : []} />
321
+ <FilterTop shopby={shopby} filters={filters} category={category} children={children} allowedFilters={category ? category.allowed_filters : []} />
317
322
  {/* <AttributesBlock category={category} attributesBlock={attributesBlock} /> */}
318
323
  {/* <section className='category_brand-slider my-5'>
319
324
  <BrandSlider />
@@ -46,9 +46,9 @@ const ShopByColumn = props => {
46
46
  ? props.keyboardProps
47
47
  : {};
48
48
 
49
- const categoryUrl = resourceUrl(
50
- `/${url_path}${categoryUrlSuffix || ''}?shopby=${shopByItem.option_id}`
51
- );
49
+ const categoryUrl =
50
+ `/${shopByItem.url_path}`
51
+ ;
52
52
 
53
53
  return (
54
54
  <li key={index} className={cn(classes.submenuChildItem, 'mt-4')}>
@@ -101,7 +101,6 @@ const AuctionDetail = (props) => {
101
101
  </div>
102
102
 
103
103
  <BidList expanded />
104
-
105
104
  <Form
106
105
  data-cy="form_bid"
107
106
  className="flex flex-col gap-y-5"
@@ -35,6 +35,7 @@ import AuctionDetail from './components/auctionDetail';
35
35
  import CrossSeller from '@riosst100/pwa-marketplace/src/components/CrossSeller';
36
36
  import RelatedProduct from '@riosst100/pwa-marketplace/src/components/RelatedProduct';
37
37
  import ProductLabel from '@riosst100/pwa-marketplace/src/components/ProductLabel';
38
+ import RFQ from '@riosst100/pwa-marketplace/src/components/RFQ';
38
39
 
39
40
  // Correlate a GQL error message to a field. GQL could return a longer error
40
41
  // string but it may contain contextual info such as product id. We can use
@@ -576,6 +577,10 @@ const ProductFullDetail = props => {
576
577
  </div>
577
578
  </section>
578
579
  <Divider />
580
+ <section className={cn(classes.quantity, 'py-[30px] !border-none')}>
581
+ <RFQ />
582
+ </section>
583
+ <Divider />
579
584
  <section className='product_from-other-platform py-[30px]'>
580
585
  <div className='text-sm flex mb-5'>
581
586
  Also available in
@@ -0,0 +1 @@
1
+ export { default } from './textArea';
@@ -0,0 +1,44 @@
1
+ import React, { Fragment } from 'react';
2
+ import { number, node, oneOf, oneOfType, shape, string } from 'prop-types';
3
+ import { TextArea as InformedTextArea } from 'informed';
4
+ import useFieldState from '@magento/peregrine/lib/hooks/hook-wrappers/useInformedFieldStateWrapper';
5
+
6
+ import { useStyle } from '@magento/venia-ui/lib/classify';
7
+ import { Message } from '@magento/venia-ui/lib/components/Field';
8
+ import defaultClasses from './textArea.module.css';
9
+
10
+ const TextArea = props => {
11
+ const { classes: propClasses, field, message, ...rest } = props;
12
+ const fieldState = useFieldState(field);
13
+ const classes = useStyle(defaultClasses, propClasses);
14
+
15
+ return (
16
+ <Fragment>
17
+ <InformedTextArea
18
+ {...rest}
19
+ className={classes.input}
20
+ field={field}
21
+ />
22
+ <Message fieldState={fieldState}>{message}</Message>
23
+ </Fragment>
24
+ );
25
+ };
26
+
27
+ export default TextArea;
28
+
29
+ TextArea.defaultProps = {
30
+ cols: 40,
31
+ rows: 4,
32
+ wrap: 'hard'
33
+ };
34
+
35
+ TextArea.propTypes = {
36
+ classes: shape({
37
+ input: string
38
+ }),
39
+ cols: oneOfType([number, string]),
40
+ field: string.isRequired,
41
+ message: node,
42
+ rows: oneOfType([number, string]),
43
+ wrap: oneOf(['hard', 'soft'])
44
+ };
@@ -0,0 +1,27 @@
1
+ .input {
2
+ /* composes: input from '@magento/venia-ui/lib/components/Field/field.module.css'; */
3
+
4
+ composes: h-auto from global;
5
+ composes: max-w-full from global;
6
+ composes: min-w-full from global;
7
+ composes: px-xs from global;
8
+ composes: py-3 from global;
9
+ composes: border from global;
10
+ composes: border-gray-100 from global;
11
+ composes: rounded-md from global;
12
+ composes: rounded-md from global;
13
+ composes: focus-visible_outline-none from global;
14
+ }
15
+
16
+ .input_shimmer {
17
+ composes: h-auto from global;
18
+ composes: m-0 from global;
19
+ composes: max-w-full from global;
20
+ composes: min-h-[6.75rem] from global;
21
+ composes: min-w-full from global;
22
+ composes: px-[15px] from global;
23
+ composes: py-[12px] from global;
24
+ composes: rounded-md from global;
25
+ composes: w-full from global;
26
+ font-size: 1rem;
27
+ }
@@ -1,8 +1,8 @@
1
1
  import { gql } from '@apollo/client';
2
2
 
3
3
  export const GET_CUSTOM_FILTERS = gql`
4
- query GetCustomFilters($category: String!, $filters: ProductAttributeFilterInput!) {
5
- customSubFilters(category: $category, filters: $filters) {
4
+ query GetCustomFilters($shopby: String, $category: String!, $filters: ProductAttributeFilterInput!) {
5
+ customSubFilters(shopby: $shopby, category: $category, filters: $filters) {
6
6
  label
7
7
  count
8
8
  attribute_code
@@ -21,7 +21,7 @@ import DEFAULT_OPERATIONS from './filterTop.gql';
21
21
  const DRAWER_NAME = 'filter';
22
22
 
23
23
  export const useFilterTop = props => {
24
- const { filters, category } = props;
24
+ const { filters, category, shopby } = props;
25
25
 
26
26
  const operations = mergeOperations(DEFAULT_OPERATIONS, props.operations);
27
27
  const { getFilterInputsQuery, getCustomFilters } = operations;
@@ -77,7 +77,8 @@ export const useFilterTop = props => {
77
77
  runQuery({
78
78
  variables: {
79
79
  filters: newFilters,
80
- category: category?.url_path
80
+ category: category?.url_path,
81
+ shopby: shopby
81
82
  }
82
83
  });
83
84
  }, [
@@ -100,8 +100,8 @@ export const useShopBy = props => {
100
100
  runQuery,
101
101
  activeFilter,
102
102
  shopby,
103
- categoryUrlKey,
104
- filters
103
+ // categoryUrlKey,
104
+ // filters
105
105
  // filterTypeMap,
106
106
  // search
107
107
  ]);