@selfcommunity/react-ui 0.10.5-payments.244 → 0.10.5-payments.245
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.
|
@@ -29,7 +29,7 @@ function DefaultDrawerContent(inProps) {
|
|
|
29
29
|
props: inProps,
|
|
30
30
|
name: PREFIX
|
|
31
31
|
});
|
|
32
|
-
const { className, CategoryItemProps = { showTooltip: true }, tagImage = '' } = props, rest = tslib_1.__rest(props, ["className", "CategoryItemProps", "tagImage"]);
|
|
32
|
+
const { className, CategoryItemProps = { showTooltip: true }, tagImage = '/' } = props, rest = tslib_1.__rest(props, ["className", "CategoryItemProps", "tagImage"]);
|
|
33
33
|
// HOOKS
|
|
34
34
|
const { categories } = (0, react_core_1.useSCFetchCategories)();
|
|
35
35
|
const [categoriesOrdered, setCategoriesOrdered] = (0, react_1.useState)([]);
|
|
@@ -113,10 +113,7 @@ function DefaultDrawerContent(inProps) {
|
|
|
113
113
|
var _a;
|
|
114
114
|
if (!categories.length || !((_a = categories[0].tags) === null || _a === void 0 ? void 0 : _a.length))
|
|
115
115
|
return null;
|
|
116
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === tagName, onChange: handleChange(tagName), elevation: 0, onFocus: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" }) }, { children: (0, jsx_runtime_1.jsx)(BaseItem_1.default, { elevation: 0, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: tagName, src: tagImage, variant: "square" }), primary: tagName, disableTypography: false, ButtonBaseProps: {
|
|
117
|
-
onClick: (e) => e.stopPropagation(),
|
|
118
|
-
onFocus: (e) => e.stopPropagation()
|
|
119
|
-
} }) })), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: categories.map((c) => ((0, jsx_runtime_1.jsx)(material_1.Zoom, Object.assign({ in: true }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Category_1.default, Object.assign({ ButtonBaseProps: {
|
|
116
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ expanded: expanded === tagName, onChange: handleChange(tagName), elevation: 0, onFocus: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, Object.assign({ expandIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_more" }) }, { children: (0, jsx_runtime_1.jsx)(BaseItem_1.default, { elevation: 0, image: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: tagName, src: tagImage, variant: "square" }), primary: tagName, disableTypography: false }) })), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsx)(material_1.List, { children: categories.map((c) => ((0, jsx_runtime_1.jsx)(material_1.Zoom, Object.assign({ in: true }, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Category_1.default, Object.assign({ ButtonBaseProps: {
|
|
120
117
|
component: react_core_1.Link,
|
|
121
118
|
to: scRoutingContext.url(react_core_1.SCRoutes.CATEGORY_ROUTE_NAME, c)
|
|
122
119
|
}, elevation: 0, category: c, actions: null }, CategoryItemProps, getMouseEvents(() => handleMouseEnter(c.id), () => handleMouseLeave(c.id)))) }) }), c.id))) }) })] }), tagName));
|
|
@@ -27,7 +27,7 @@ export default function DefaultDrawerContent(inProps) {
|
|
|
27
27
|
props: inProps,
|
|
28
28
|
name: PREFIX
|
|
29
29
|
});
|
|
30
|
-
const { className, CategoryItemProps = { showTooltip: true }, tagImage = '' } = props, rest = __rest(props, ["className", "CategoryItemProps", "tagImage"]);
|
|
30
|
+
const { className, CategoryItemProps = { showTooltip: true }, tagImage = '/' } = props, rest = __rest(props, ["className", "CategoryItemProps", "tagImage"]);
|
|
31
31
|
// HOOKS
|
|
32
32
|
const { categories } = useSCFetchCategories();
|
|
33
33
|
const [categoriesOrdered, setCategoriesOrdered] = useState([]);
|
|
@@ -111,10 +111,7 @@ export default function DefaultDrawerContent(inProps) {
|
|
|
111
111
|
var _a;
|
|
112
112
|
if (!categories.length || !((_a = categories[0].tags) === null || _a === void 0 ? void 0 : _a.length))
|
|
113
113
|
return null;
|
|
114
|
-
return (_jsxs(Accordion, Object.assign({ expanded: expanded === tagName, onChange: handleChange(tagName), elevation: 0, onFocus: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: [_jsx(AccordionSummary, Object.assign({ expandIcon: _jsx(Icon, { children: "expand_more" }) }, { children: _jsx(BaseItem, { elevation: 0, image: _jsx(Avatar, { alt: tagName, src: tagImage, variant: "square" }), primary: tagName, disableTypography: false, ButtonBaseProps: {
|
|
115
|
-
onClick: (e) => e.stopPropagation(),
|
|
116
|
-
onFocus: (e) => e.stopPropagation()
|
|
117
|
-
} }) })), _jsx(AccordionDetails, { children: _jsx(List, { children: categories.map((c) => (_jsx(Zoom, Object.assign({ in: true }, { children: _jsx(ListItem, { children: _jsx(Category, Object.assign({ ButtonBaseProps: {
|
|
114
|
+
return (_jsxs(Accordion, Object.assign({ expanded: expanded === tagName, onChange: handleChange(tagName), elevation: 0, onFocus: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation() }, { children: [_jsx(AccordionSummary, Object.assign({ expandIcon: _jsx(Icon, { children: "expand_more" }) }, { children: _jsx(BaseItem, { elevation: 0, image: _jsx(Avatar, { alt: tagName, src: tagImage, variant: "square" }), primary: tagName, disableTypography: false }) })), _jsx(AccordionDetails, { children: _jsx(List, { children: categories.map((c) => (_jsx(Zoom, Object.assign({ in: true }, { children: _jsx(ListItem, { children: _jsx(Category, Object.assign({ ButtonBaseProps: {
|
|
118
115
|
component: Link,
|
|
119
116
|
to: scRoutingContext.url(SCRoutes.CATEGORY_ROUTE_NAME, c)
|
|
120
117
|
}, elevation: 0, category: c, actions: null }, CategoryItemProps, getMouseEvents(() => handleMouseEnter(c.id), () => handleMouseLeave(c.id)))) }) }), c.id))) }) })] }), tagName));
|