@apexcura/ui-components 0.0.16-Beta41 → 0.0.16-Beta43
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/index.js +12 -11
- package/dist/index.mjs +12 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -779,6 +779,7 @@ var { Sider } = import_antd11.Layout;
|
|
|
779
779
|
var Sidebar = (props) => {
|
|
780
780
|
const [collapsed, setCollapsed] = (0, import_react16.useState)(false);
|
|
781
781
|
const handleChange = (item) => {
|
|
782
|
+
console.log(item);
|
|
782
783
|
if (props.onChange) {
|
|
783
784
|
props.onChange(item);
|
|
784
785
|
}
|
|
@@ -793,21 +794,21 @@ var Sidebar = (props) => {
|
|
|
793
794
|
};
|
|
794
795
|
}
|
|
795
796
|
const items = props.items?.map((eachItem, index) => {
|
|
797
|
+
const childItems = eachItem.items?.map(
|
|
798
|
+
(child, childIndex) => getItem(
|
|
799
|
+
child.label,
|
|
800
|
+
`${index}-${childIndex}`,
|
|
801
|
+
child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
802
|
+
void 0,
|
|
803
|
+
child
|
|
804
|
+
)
|
|
805
|
+
);
|
|
796
806
|
return getItem(
|
|
797
807
|
eachItem.label,
|
|
798
808
|
index.toString(),
|
|
799
|
-
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: eachItem.icon, alt: ""
|
|
800
|
-
|
|
801
|
-
(child, childIndex) => getItem(
|
|
802
|
-
child.label,
|
|
803
|
-
`${index}-${childIndex}`,
|
|
804
|
-
child.icon ? icons[child.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: child.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
|
|
805
|
-
void 0,
|
|
806
|
-
child
|
|
807
|
-
)
|
|
808
|
-
),
|
|
809
|
+
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ import_react16.default.createElement("img", { src: eachItem.icon, alt: "" }) : null,
|
|
810
|
+
childItems,
|
|
809
811
|
eachItem
|
|
810
|
-
// Pass the parent item directly to getItem
|
|
811
812
|
);
|
|
812
813
|
});
|
|
813
814
|
return /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ import_react16.default.createElement(
|
package/dist/index.mjs
CHANGED
|
@@ -708,6 +708,7 @@ var { Sider } = Layout;
|
|
|
708
708
|
var Sidebar = (props) => {
|
|
709
709
|
const [collapsed, setCollapsed] = useState5(false);
|
|
710
710
|
const handleChange = (item) => {
|
|
711
|
+
console.log(item);
|
|
711
712
|
if (props.onChange) {
|
|
712
713
|
props.onChange(item);
|
|
713
714
|
}
|
|
@@ -722,21 +723,21 @@ var Sidebar = (props) => {
|
|
|
722
723
|
};
|
|
723
724
|
}
|
|
724
725
|
const items = props.items?.map((eachItem, index) => {
|
|
726
|
+
const childItems = eachItem.items?.map(
|
|
727
|
+
(child, childIndex) => getItem(
|
|
728
|
+
child.label,
|
|
729
|
+
`${index}-${childIndex}`,
|
|
730
|
+
child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon, alt: "" }) : null,
|
|
731
|
+
void 0,
|
|
732
|
+
child
|
|
733
|
+
)
|
|
734
|
+
);
|
|
725
735
|
return getItem(
|
|
726
736
|
eachItem.label,
|
|
727
737
|
index.toString(),
|
|
728
|
-
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ React15.createElement("img", { src: eachItem.icon, alt: ""
|
|
729
|
-
|
|
730
|
-
(child, childIndex) => getItem(
|
|
731
|
-
child.label,
|
|
732
|
-
`${index}-${childIndex}`,
|
|
733
|
-
child.icon ? icons[child.icon] || /* @__PURE__ */ React15.createElement("img", { src: child.icon, alt: "", style: { filter: "brightness(0) invert(1)" } }) : null,
|
|
734
|
-
void 0,
|
|
735
|
-
child
|
|
736
|
-
)
|
|
737
|
-
),
|
|
738
|
+
eachItem.icon ? icons[eachItem.icon] || /* @__PURE__ */ React15.createElement("img", { src: eachItem.icon, alt: "" }) : null,
|
|
739
|
+
childItems,
|
|
738
740
|
eachItem
|
|
739
|
-
// Pass the parent item directly to getItem
|
|
740
741
|
);
|
|
741
742
|
});
|
|
742
743
|
return /* @__PURE__ */ React15.createElement(Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ React15.createElement(
|