@apexcura/ui-components 0.0.16-Beta34 → 0.0.16-Beta35
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 +10 -5
- package/dist/index.mjs +10 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -782,25 +782,30 @@ var Sidebar = (props) => {
|
|
|
782
782
|
props.onChange(item);
|
|
783
783
|
}
|
|
784
784
|
};
|
|
785
|
-
function getItem(label, key, icon, children,
|
|
785
|
+
function getItem(label, key, icon, children, item) {
|
|
786
786
|
return {
|
|
787
787
|
key,
|
|
788
788
|
icon: icon ? /* @__PURE__ */ import_react16.default.createElement("span", { className: props.iconsClassName }, icon) : null,
|
|
789
789
|
children,
|
|
790
790
|
label,
|
|
791
|
-
onClick
|
|
791
|
+
onClick: () => handleChange(item || { label, key })
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
794
|
const items = props.items?.map((eachItem, index) => {
|
|
795
|
-
const itemOnClick = () => handleChange(eachItem);
|
|
796
795
|
return getItem(
|
|
797
796
|
eachItem.label,
|
|
798
797
|
index.toString(),
|
|
799
798
|
icons[eachItem.icon],
|
|
800
799
|
eachItem.children?.map(
|
|
801
|
-
(child, childIndex) => getItem(
|
|
800
|
+
(child, childIndex) => getItem(
|
|
801
|
+
child.label,
|
|
802
|
+
`${index}-${childIndex}`,
|
|
803
|
+
icons[child.icon],
|
|
804
|
+
void 0,
|
|
805
|
+
child
|
|
806
|
+
)
|
|
802
807
|
),
|
|
803
|
-
|
|
808
|
+
eachItem
|
|
804
809
|
);
|
|
805
810
|
});
|
|
806
811
|
return /* @__PURE__ */ import_react16.default.createElement(import_antd11.Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ import_react16.default.createElement(
|
package/dist/index.mjs
CHANGED
|
@@ -711,25 +711,30 @@ var Sidebar = (props) => {
|
|
|
711
711
|
props.onChange(item);
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
|
-
function getItem(label, key, icon, children,
|
|
714
|
+
function getItem(label, key, icon, children, item) {
|
|
715
715
|
return {
|
|
716
716
|
key,
|
|
717
717
|
icon: icon ? /* @__PURE__ */ React15.createElement("span", { className: props.iconsClassName }, icon) : null,
|
|
718
718
|
children,
|
|
719
719
|
label,
|
|
720
|
-
onClick
|
|
720
|
+
onClick: () => handleChange(item || { label, key })
|
|
721
721
|
};
|
|
722
722
|
}
|
|
723
723
|
const items = props.items?.map((eachItem, index) => {
|
|
724
|
-
const itemOnClick = () => handleChange(eachItem);
|
|
725
724
|
return getItem(
|
|
726
725
|
eachItem.label,
|
|
727
726
|
index.toString(),
|
|
728
727
|
icons[eachItem.icon],
|
|
729
728
|
eachItem.children?.map(
|
|
730
|
-
(child, childIndex) => getItem(
|
|
729
|
+
(child, childIndex) => getItem(
|
|
730
|
+
child.label,
|
|
731
|
+
`${index}-${childIndex}`,
|
|
732
|
+
icons[child.icon],
|
|
733
|
+
void 0,
|
|
734
|
+
child
|
|
735
|
+
)
|
|
731
736
|
),
|
|
732
|
-
|
|
737
|
+
eachItem
|
|
733
738
|
);
|
|
734
739
|
});
|
|
735
740
|
return /* @__PURE__ */ React15.createElement(Layout, { style: { minHeight: "100vh" } }, /* @__PURE__ */ React15.createElement(
|