@blocklet/list 0.8.21 → 0.8.22

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/src/base.js CHANGED
@@ -2,50 +2,53 @@ import React from 'react';
2
2
  import styled from 'styled-components';
3
3
  import SortIcon from '@mui/icons-material/Sort';
4
4
  import { Box, Hidden } from '@mui/material';
5
+ import FaceIcon from '@mui/icons-material/Face';
5
6
 
6
7
  import { useFilterContext } from './contexts/filter';
7
8
  import CustomSelect from './components/custom-select';
8
- import FilterAuthor from './components/filter-author';
9
+ import { CustomChip, FilterIcon } from './components/filter';
9
10
  import { getSortOptions } from './libs/utils';
10
11
  import BlockletList from './components/list';
11
12
  import Aside from './components/aside';
12
13
  import Search from './components/search';
13
- import FilterOnMobile from './components/filter-mobile';
14
14
 
15
15
  const ListBase = () => {
16
- const { handleDeveloper, blockletList, filters, developerName, handleSort, t } = useFilterContext();
16
+ const {
17
+ handleDeveloper,
18
+ blockletList,
19
+ filters,
20
+ developerName,
21
+ handleSort,
22
+ handleCategory,
23
+ handlePrice,
24
+ t,
25
+ getCategoryLocale,
26
+ priceOptions,
27
+ } = useFilterContext();
28
+
29
+ const sortOptions = getSortOptions(t);
30
+ const sortLocale = sortOptions.find((f) => f.value === filters.sortBy)?.name || t('sort.sort');
31
+ const categoryLocale = getCategoryLocale(filters.category);
32
+ const priceLocale = priceOptions.find((price) => price.value === filters.price)?.name;
33
+
17
34
  return (
18
35
  <Box display="flex" alignItems="flex-start" height="100%">
19
36
  <Hidden mdDown>
20
37
  <Aside />
21
38
  </Hidden>
22
39
  <StyledMin>
23
- <Box className="marketplace-header" display="flex" alignItems="center">
24
- <Hidden mdDown>
25
- {!!filters.developer && (
26
- <FilterAuthor
27
- user={developerName}
28
- deleteUserTag={() => {
29
- handleDeveloper(null);
30
- }}
31
- />
32
- )}
33
- </Hidden>
34
- <Box mt={0} className="searchContainer">
35
- <Hidden mdUp>
36
- <StyledSearch className="search" placeholder={t('common.searchStore')} />
37
- </Hidden>
38
- </Box>
39
- <Box mt={0} ml="10px" className="filterContainer">
40
+ <Box className="filter-bar" display="flex" alignItems="center">
41
+ <StyledSearch className="search-container" placeholder={t('common.searchStore')} />
42
+ <Box mt={0} ml="16px" className="filter-container">
40
43
  <Hidden mdUp>
41
44
  {/* 小屏幕下类别 */}
42
- <FilterOnMobile />
45
+ <FilterIcon />
43
46
  </Hidden>
44
47
  {/* 排序选择器 */}
45
48
  <CustomSelect
46
49
  value={filters.sortBy}
47
- options={getSortOptions(t)}
48
- title={getSortOptions(t).find((f) => f.value === filters.sortBy)?.name || t('sort.sort')}
50
+ options={sortOptions}
51
+ title={sortLocale}
49
52
  icon={<SortIcon />}
50
53
  onChange={(v) => {
51
54
  handleSort(v);
@@ -53,19 +56,27 @@ const ListBase = () => {
53
56
  />
54
57
  </Box>
55
58
  </Box>
56
- <Hidden mdUp>
57
- <Box display="flex" flexWrap="wrap" alignItems="center">
58
- {!!filters.developer && (
59
- <FilterAuthor
60
- user={developerName}
61
- deleteUserTag={() => {
62
- handleDeveloper(null);
63
- }}
64
- style={{ marginBottom: '16px' }}
65
- />
66
- )}
67
- </Box>
68
- </Hidden>
59
+ <Box display="flex" flexWrap="wrap" alignItems="center" mb="16px">
60
+ <CustomChip
61
+ label={developerName}
62
+ icon={<FaceIcon />}
63
+ onDelete={() => {
64
+ handleDeveloper(null);
65
+ }}
66
+ />
67
+ <CustomChip
68
+ label={categoryLocale}
69
+ onDelete={() => {
70
+ handleCategory(null);
71
+ }}
72
+ />
73
+ <CustomChip
74
+ label={priceLocale}
75
+ onDelete={() => {
76
+ handlePrice(null);
77
+ }}
78
+ />
79
+ </Box>
69
80
  <BlockletList blocklets={blockletList} />
70
81
  </StyledMin>
71
82
  </Box>
@@ -76,45 +87,34 @@ const StyledMin = styled.main`
76
87
  flex: 1;
77
88
  width: 100%;
78
89
  min-width: 0;
79
- .marketplace-header {
90
+ .filter-bar {
80
91
  justify-content: space-between;
81
- margin-bottom: 20px;
92
+ margin-bottom: ${(props) => props.theme.spacing(2)};
82
93
  }
83
94
  .sort-button {
84
95
  white-space: nowrap;
85
96
  }
86
- .search {
97
+ .search-container {
98
+ flex: 2;
87
99
  margin-left: 0px;
88
100
  }
89
- /* 小于960px */
90
- @media (max-width: ${(props) => props.theme.breakpoints.values.md}px) {
91
- .searchContainer {
92
- flex: 1;
93
- }
94
- .search {
95
- width: 100%;
96
- }
97
- .filterContainer {
98
- flex: 1;
99
- display: flex;
100
- justify-content: flex-end;
101
- }
101
+
102
+ .filter-container {
103
+ flex: 1;
104
+ display: flex;
105
+ justify-content: flex-end;
102
106
  }
103
- @media (max-width: 750px) {
104
- .searchContainer {
107
+ @media (max-width: ${(props) => props.theme.breakpoints.values.md}px) {
108
+ .search-container {
105
109
  width: 100%;
110
+ margin-bottom: ${(props) => props.theme.spacing(2)};
106
111
  }
107
- .filterContainer {
108
- width: 100%;
112
+ .filter-container {
109
113
  margin-left: 0;
110
114
  display: flex;
111
115
  justify-content: flex-start;
112
116
  }
113
- .search {
114
- margin-bottom: 20px;
115
- width: 100%;
116
- }
117
- .marketplace-header {
117
+ .filter-bar {
118
118
  display: flex;
119
119
  flex-direction: column;
120
120
  align-items: flex-start;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+
4
+ import { useFilterContext } from '../contexts/filter';
5
+ import { FilterGroup } from './filter';
6
+
7
+ const Aside = () => {
8
+ const { selectedCategory, handleCategory, t, handlePrice, filters, categoryOptions, priceOptions } =
9
+ useFilterContext();
10
+
11
+ return (
12
+ <StyledAside>
13
+ <div>
14
+ <FilterGroup title={t('common.price')} options={priceOptions} value={filters.price} onChange={handlePrice} />
15
+ </div>
16
+ <div style={{ marginTop: '32px' }}>
17
+ <FilterGroup
18
+ title={t('common.category')}
19
+ options={categoryOptions}
20
+ value={selectedCategory}
21
+ onChange={handleCategory}
22
+ />
23
+ </div>
24
+ </StyledAside>
25
+ );
26
+ };
27
+
28
+ const StyledAside = styled.aside`
29
+ width: 220px;
30
+ margin-right: ${(props) => props.theme.spacing(2)};
31
+ height: 100%;
32
+ `;
33
+
34
+ Aside.propTypes = {};
35
+ Aside.defaultProps = {};
36
+ export default Aside;
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import styled from 'styled-components';
4
+ import { Chip } from '@mui/material';
5
+
6
+ const StyleDiv = styled.div`
7
+ .MuiChip-root {
8
+ border-radius: 4px;
9
+ height: initial;
10
+ text-transform: capitalize;
11
+ margin-right: ${(props) => props.theme.spacing(2)};
12
+ padding: 4px 0;
13
+ }
14
+ `;
15
+ const FilterChip = ({ label, icon, onDelete, ...containerProps }) => {
16
+ if (!label) return null;
17
+ return (
18
+ <StyleDiv {...containerProps}>
19
+ <Chip icon={icon} label={label} onDelete={onDelete} />
20
+ </StyleDiv>
21
+ );
22
+ };
23
+ FilterChip.propTypes = {
24
+ label: PropTypes.string,
25
+ onDelete: PropTypes.func,
26
+ icon: PropTypes.element,
27
+ };
28
+ FilterChip.defaultProps = {
29
+ onDelete: () => {},
30
+ icon: null,
31
+ label: null,
32
+ };
33
+ export default FilterChip;
@@ -2,19 +2,21 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
5
- function Content({ options, onChange, title, value }) {
5
+ function FilterGroup({ options, onChange, title, value }) {
6
6
  return (
7
7
  <StyledDiv>
8
8
  <div className="title">{title}</div>
9
9
  <div className="list">
10
10
  {options.map((item) => {
11
11
  return (
12
- <span
12
+ <div
13
+ title={item.name}
13
14
  key={item.value}
15
+ data-cy="filter"
14
16
  className={value === item.value ? 'select item' : 'item'}
15
17
  onClick={() => onChange(item.value)}>
16
18
  {item.name}
17
- </span>
19
+ </div>
18
20
  );
19
21
  })}
20
22
  </div>
@@ -26,29 +28,37 @@ const StyledDiv = styled.div`
26
28
  .title {
27
29
  font-size: 18px;
28
30
  font-weight: bold;
31
+ margin-bottom: ${(props) => props.theme.spacing(2)};
29
32
  }
30
33
  .list {
31
- display: flex;
32
- flex-direction: column;
33
- align-items: flex-start;
34
- margin-left: 8px;
35
34
  }
36
35
  .item {
37
- margin: 16px 0;
36
+ font-size: 16px;
37
+ font-weight: bold;
38
+ padding: ${(props) => props.theme.spacing(2)} ${(props) => props.theme.spacing(1)};
39
+ color: #9397a1;
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ text-transform: capitalize;
38
44
  cursor: pointer;
45
+ &:hover {
46
+ background-color: ${(props) => props.theme.palette.grey[50]};
47
+ color: initial;
48
+ }
39
49
  }
40
50
  .select {
41
51
  color: ${(props) => props.theme.palette.primary.main};
42
52
  }
43
53
  `;
44
54
 
45
- Content.propTypes = {
55
+ FilterGroup.propTypes = {
46
56
  title: PropTypes.string.isRequired,
47
57
  options: PropTypes.array.isRequired,
48
58
  onChange: PropTypes.func.isRequired,
49
59
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
50
60
  };
51
- Content.defaultProps = {
61
+ FilterGroup.defaultProps = {
52
62
  value: null,
53
63
  };
54
- export default Content;
64
+ export default FilterGroup;
@@ -1,20 +1,26 @@
1
1
  import React, { useState } from 'react';
2
- // import PropTypes from 'prop-types';
3
2
  import styled from 'styled-components';
4
3
  import FilterAltOutlinedIcon from '@mui/icons-material/FilterAltOutlined';
5
4
  import Dialog from '@arcblock/ux/lib/Dialog';
6
5
  import Button from '@mui/material/Button';
7
6
 
8
7
  import { useFilterContext } from '../../contexts/filter';
9
- import Content from './content';
10
- import { getCategoriesOption, getPrices } from '../../libs/utils';
8
+ import FilterGroup from './group';
11
9
 
12
- function MobileFilter() {
13
- const { selectedCategory, handleCategory, t, handlePrice, filters, categoryList, locale } = useFilterContext();
10
+ function FilterIcon() {
11
+ const { selectedCategory, handleCategory, t, handlePrice, filters, categoryOptions, priceOptions } =
12
+ useFilterContext();
14
13
  const [open, setOpen] = useState(false);
15
14
 
16
- const categoriesOption = getCategoriesOption(categoryList, locale);
17
- const prices = getPrices(t);
15
+ const handelChange = (type, value) => {
16
+ if (type === 'category') {
17
+ handleCategory(value);
18
+ }
19
+ if (type === 'price') {
20
+ handlePrice(value);
21
+ }
22
+ setOpen(false);
23
+ };
18
24
 
19
25
  return (
20
26
  <StyledDiv>
@@ -22,13 +28,24 @@ function MobileFilter() {
22
28
  <FilterAltOutlinedIcon className="filter-icon" fontSize="small" />
23
29
  </Button>
24
30
  <Dialog fullWidth title="" open={open} onClose={() => setOpen(false)}>
25
- <Content title={t('common.price')} options={prices} value={filters.price} onChange={handlePrice} />
26
- <Content
27
- title={t('common.category')}
28
- options={categoriesOption}
29
- value={selectedCategory}
30
- onChange={handleCategory}
31
+ <FilterGroup
32
+ title={t('common.price')}
33
+ options={priceOptions}
34
+ value={filters.price}
35
+ onChange={(v) => {
36
+ handelChange('price', v);
37
+ }}
31
38
  />
39
+ <div style={{ marginTop: '32px' }}>
40
+ <FilterGroup
41
+ title={t('common.category')}
42
+ options={categoryOptions}
43
+ value={selectedCategory}
44
+ onChange={(v) => {
45
+ handelChange('category', v);
46
+ }}
47
+ />
48
+ </div>
32
49
  </Dialog>
33
50
  </StyledDiv>
34
51
  );
@@ -47,6 +64,6 @@ const StyledDiv = styled.div`
47
64
  }
48
65
  `;
49
66
 
50
- MobileFilter.propTypes = {};
51
- MobileFilter.defaultProps = {};
52
- export default MobileFilter;
67
+ FilterIcon.propTypes = {};
68
+ FilterIcon.defaultProps = {};
69
+ export default FilterIcon;
@@ -0,0 +1,5 @@
1
+ import FilterIcon from './icon';
2
+ import CustomChip from './custom-chip';
3
+ import FilterGroup from './group';
4
+
5
+ export { FilterIcon, CustomChip, FilterGroup };
@@ -105,6 +105,11 @@ const StyledGrid = styled(Grid)`
105
105
  padding-right: ${(props) => props.theme.spacing(0.5)};
106
106
  }
107
107
  }
108
+ @media (min-width: ${(props) => props.theme.breakpoints.values.sm}px) {
109
+ &.MuiGrid-item {
110
+ margin-bottom: ${(props) => props.theme.spacing(2)};
111
+ }
112
+ }
108
113
  `;
109
114
  const CustomEmpty = styled(Empty)`
110
115
  text-align: center;
@@ -60,11 +60,10 @@ Search.defaultProps = {
60
60
  };
61
61
  const StyledSearch = styled(OutlinedInput)`
62
62
  background-color: #fff;
63
- border-radius: 12px;
64
- font-size: 16px;
65
- margin: 0 10px;
63
+ font-size: 14px;
64
+ border-radius: 6px;
66
65
  .MuiInputBase-input {
67
- padding: 12px 0px 12px 0px;
66
+ padding: 8px 0 8px 10px;
68
67
  }
69
68
  .MuiOutlinedInput-notchedOutline {
70
69
  border: none;
@@ -75,13 +74,6 @@ const StyledSearch = styled(OutlinedInput)`
75
74
  color: transparent;
76
75
  }
77
76
  }
78
- @media (max-width: ${(props) => props.theme.breakpoints.values.md}px) {
79
- font-size: 14px;
80
- border-radius: 6px;
81
- .MuiInputBase-input {
82
- padding: 8px 0 8px 10px;
83
- }
84
- }
85
77
  `;
86
78
 
87
79
  const StyledSearchIcon = styled(SearchIcon)`
@@ -5,24 +5,14 @@ import orderBy from 'lodash/orderBy';
5
5
  import axios from 'axios';
6
6
  // import joinUrl from 'url-join';
7
7
 
8
- import { getCategories, filterBlockletByPrice, replaceTranslate } from '../libs/utils';
8
+ import { getCategories, filterBlockletByPrice, replaceTranslate, getPrices, getCategoryOptions } from '../libs/utils';
9
9
  import translations from '../assets/locale';
10
10
  import { propTypes, defaultProps } from '../libs/prop-types';
11
11
 
12
12
  const Filter = createContext({});
13
13
  const { Provider, Consumer } = Filter;
14
14
 
15
- function FilterProvider({
16
- onSelectBlocklet,
17
- selectedBlocklets,
18
- filters,
19
- children,
20
- baseUrl,
21
- endpoint,
22
- locale,
23
- blockletRender,
24
- onFilterChange,
25
- }) {
15
+ function FilterProvider({ filters, children, baseUrl, endpoint, locale, blockletRender, onFilterChange }) {
26
16
  const storeApi = axios.create({
27
17
  baseURL: endpoint,
28
18
  });
@@ -105,6 +95,10 @@ function FilterProvider({
105
95
 
106
96
  return replaceTranslate(translations[locale][key], data);
107
97
  };
98
+
99
+ const categoryOptions = useMemo(() => getCategoryOptions(categoryList, locale), [categoryList, locale]);
100
+ const priceOptions = getPrices(translate);
101
+
108
102
  const filterStore = {
109
103
  errors: { fetchBlockletsError, fetchCategoriesError },
110
104
  loadings: { fetchBlockletsLoading, fetchCategoriesLoading },
@@ -117,8 +111,8 @@ function FilterProvider({
117
111
  baseUrl,
118
112
  blockletRender,
119
113
  locale,
120
- selectedBlocklets,
121
- onSelectBlocklet,
114
+ categoryOptions,
115
+ priceOptions,
122
116
  handleSort: (sort) => {
123
117
  const changeData = {
124
118
  ...filters,
package/src/libs/utils.js CHANGED
@@ -35,7 +35,7 @@ const getPrices = (t) => {
35
35
  { name: t('blocklet.payment'), value: 'payment' },
36
36
  ];
37
37
  };
38
- const getCategoriesOption = (list = [], locale = 'en') => {
38
+ const getCategoryOptions = (list = [], locale = 'en') => {
39
39
  return list.map((item) => ({ name: item.locales[locale], value: item.name }));
40
40
  };
41
41
  /**
@@ -117,5 +117,5 @@ export {
117
117
  formatError,
118
118
  removeUndefined,
119
119
  urlStringify,
120
- getCategoriesOption,
120
+ getCategoryOptions,
121
121
  };
@@ -1,64 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _material = require("@mui/material");
11
-
12
- var _styledComponents = _interopRequireDefault(require("styled-components"));
13
-
14
- var _filter = require("../../contexts/filter");
15
-
16
- var _utils = require("../../libs/utils");
17
-
18
- var _search = _interopRequireDefault(require("../search"));
19
-
20
- var _categoryLinkList = _interopRequireDefault(require("./category-link-list"));
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
-
24
- const Aside = () => {
25
- const {
26
- filters,
27
- handlePrice,
28
- t
29
- } = (0, _filter.useFilterContext)();
30
- return /*#__PURE__*/_react.default.createElement(StyledAside, null, /*#__PURE__*/_react.default.createElement(_search.default, {
31
- placeholder: t('common.searchStore')
32
- }), /*#__PURE__*/_react.default.createElement(_material.Box, {
33
- marginTop: "24px"
34
- }, (0, _utils.getPrices)(t).map(item => /*#__PURE__*/_react.default.createElement(_material.FormControlLabel, {
35
- className: "payments",
36
- key: item.value,
37
- control: /*#__PURE__*/_react.default.createElement(_material.Checkbox, {
38
- onClick: () => {
39
- handlePrice(item.value);
40
- },
41
- size: "small",
42
- checked: item.value === filters.price
43
- }),
44
- label: item.name
45
- }))), /*#__PURE__*/_react.default.createElement(_material.List, {
46
- component: "nav",
47
- color: "primary"
48
- }, /*#__PURE__*/_react.default.createElement("div", {
49
- style: {
50
- border: '1px solid #dadce0',
51
- margin: '16px 16px'
52
- }
53
- }), /*#__PURE__*/_react.default.createElement(_categoryLinkList.default, null)));
54
- };
55
-
56
- const StyledAside = _styledComponents.default.aside.withConfig({
57
- displayName: "aside__StyledAside",
58
- componentId: "sc-1vh5fc3-0"
59
- })(["width:220px;margin-right:20px;background-color:", ";height:100%;padding:15px 0px;border-radius:8px;.MuiListItemText-root{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.payments{display:flex;padding:0 16px;.MuiFormControlLabel-label{color:#5f6368;font-size:1rem;}}.MuiListItem-root{text-transform:capitalize;.category > span{font-weight:", ";}>:not(.category){.MuiListItemText-primary{color:#5f6368;}}&.Mui-selected{background-color:", "!important;border-radius:4px;.MuiListItemText-primary{color:#fff !important;}}}@media (max-width:", "px){.MuiListItemText-primary{font-size:16px;}}"], props => props.theme.palette.grey[50], props => props.theme.typography.fontWeightBold, props => props.theme.palette.primary.main, props => props.theme.breakpoints.values.md);
60
-
61
- Aside.propTypes = {};
62
- Aside.defaultProps = {};
63
- var _default = Aside;
64
- exports.default = _default;
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _material = require("@mui/material");
11
-
12
- var _urlJoin = _interopRequireDefault(require("url-join"));
13
-
14
- var _filter = require("../../contexts/filter");
15
-
16
- var _utils = require("../../libs/utils");
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
-
20
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
21
-
22
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
23
-
24
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
25
-
26
- /**
27
- * 宽屏幕下的分类列表
28
- * @returns
29
- */
30
- const CategoryLinkList = () => {
31
- const {
32
- categoryList,
33
- selectedCategory,
34
- filters,
35
- baseUrl,
36
- handleCategory,
37
- t,
38
- locale
39
- } = (0, _filter.useFilterContext)();
40
-
41
- const handleClick = (e, name) => {
42
- handleCategory(name);
43
- e.preventDefault();
44
- return false;
45
- };
46
-
47
- const content = /*#__PURE__*/_react.default.createElement("div", {
48
- style: {
49
- marginRight: '16px'
50
- }
51
- }, /*#__PURE__*/_react.default.createElement(_material.ListItem, {
52
- selected: !selectedCategory,
53
- button: true,
54
- onClick: e => handleClick(e, 'all')
55
- }, /*#__PURE__*/_react.default.createElement(_material.ListItemText, {
56
- primary: t('category.all')
57
- })), categoryList.map(item => /*#__PURE__*/_react.default.createElement(_material.ListItem, {
58
- key: item._id,
59
- title: item.locales[locale],
60
- component: _material.Link,
61
- to: "".concat((0, _urlJoin.default)(baseUrl, '/search'), "?").concat((0, _utils.urlStringify)(_objectSpread(_objectSpread({}, filters), {}, {
62
- category: item.name
63
- }))),
64
- onClick: e => handleClick(e, item.name),
65
- button: true,
66
- selected: item.name === selectedCategory
67
- }, /*#__PURE__*/_react.default.createElement(_material.ListItemText, {
68
- primary: item.locales[locale]
69
- }))));
70
-
71
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.ListItem, null, /*#__PURE__*/_react.default.createElement(_material.ListItemText, {
72
- className: "category",
73
- primary: t('common.category')
74
- })), content);
75
- };
76
-
77
- var _default = CategoryLinkList;
78
- exports.default = _default;
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _aside = _interopRequireDefault(require("./aside"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- var _default = _aside.default;
13
- exports.default = _default;