@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.110 → 0.0.1-alpha.111
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/openapi-k8s-toolkit.es.js +31 -3
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +31 -3
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/ManageableSidebar/types.d.ts +1 -0
- package/dist/types/components/molecules/ManageableSidebar/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8787,15 +8787,42 @@ const ManageableBreadcrumbsWithDataProvider = ({
|
|
|
8787
8787
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ManageableBreadcrumbs, { data: result });
|
|
8788
8788
|
};
|
|
8789
8789
|
|
|
8790
|
+
const getLabel = ({
|
|
8791
|
+
preparedLink,
|
|
8792
|
+
label,
|
|
8793
|
+
key,
|
|
8794
|
+
externalKeys
|
|
8795
|
+
}) => {
|
|
8796
|
+
if (preparedLink) {
|
|
8797
|
+
if (externalKeys && externalKeys.includes(key)) {
|
|
8798
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8799
|
+
"a",
|
|
8800
|
+
{
|
|
8801
|
+
href: preparedLink,
|
|
8802
|
+
onClick: (e) => {
|
|
8803
|
+
e.preventDefault();
|
|
8804
|
+
e.stopPropagation();
|
|
8805
|
+
const url = preparedLink.startsWith("/") ? `${window.location.origin}${preparedLink}` : preparedLink;
|
|
8806
|
+
window.location.href = url;
|
|
8807
|
+
},
|
|
8808
|
+
children: label
|
|
8809
|
+
}
|
|
8810
|
+
);
|
|
8811
|
+
}
|
|
8812
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { to: preparedLink, children: label });
|
|
8813
|
+
}
|
|
8814
|
+
return label;
|
|
8815
|
+
};
|
|
8790
8816
|
const mapLinksFromRaw = ({
|
|
8791
8817
|
rawLinks,
|
|
8792
|
-
replaceValues
|
|
8818
|
+
replaceValues,
|
|
8819
|
+
externalKeys
|
|
8793
8820
|
}) => {
|
|
8794
8821
|
return rawLinks.map(({ key, label, link, children }) => {
|
|
8795
8822
|
const preparedLink = link ? prepareTemplate({ template: link, replaceValues }) : void 0;
|
|
8796
8823
|
return {
|
|
8797
8824
|
key,
|
|
8798
|
-
label:
|
|
8825
|
+
label: getLabel({ preparedLink, label, key, externalKeys }),
|
|
8799
8826
|
internalMetaLink: preparedLink,
|
|
8800
8827
|
children: children ? mapLinksFromRaw({
|
|
8801
8828
|
rawLinks: children,
|
|
@@ -8838,7 +8865,8 @@ const prepareDataForManageableSidebar = ({
|
|
|
8838
8865
|
const result = {
|
|
8839
8866
|
menuItems: mapLinksFromRaw({
|
|
8840
8867
|
rawLinks: foundData.menuItems,
|
|
8841
|
-
replaceValues
|
|
8868
|
+
replaceValues,
|
|
8869
|
+
externalKeys: foundData.externalKeys
|
|
8842
8870
|
})
|
|
8843
8871
|
};
|
|
8844
8872
|
const openedKeys = result?.menuItems ? findMatchingItems({
|