@plasmicpkgs/plasmic-rich-components 1.0.108 → 1.0.110
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
CHANGED
|
@@ -940,9 +940,11 @@ function omitUndefined(x) {
|
|
|
940
940
|
Object.entries(x).filter(([k, v]) => v !== void 0)
|
|
941
941
|
);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function processNavItems(navMenuItems) {
|
|
944
944
|
return navMenuItems.filter((item) => item.condition === void 0 || item.condition).map((item) => __spreadProps$3(__spreadValues$5({}, item), {
|
|
945
|
-
|
|
945
|
+
// We fill a default path because otherwise the item doesn't appear at all.
|
|
946
|
+
path: item.path || "/",
|
|
947
|
+
routes: item.routes ? processNavItems(item.routes) : void 0
|
|
946
948
|
}));
|
|
947
949
|
}
|
|
948
950
|
const baseStyles = `
|
|
@@ -1041,6 +1043,7 @@ function RichLayout(_a) {
|
|
|
1041
1043
|
return /* @__PURE__ */ React__default.default.createElement("div", { className, style: { display: "flex" } }, /* @__PURE__ */ React__default.default.createElement("style", null, baseStyles), /* @__PURE__ */ React__default.default.createElement(
|
|
1042
1044
|
proComponents.ProLayout,
|
|
1043
1045
|
__spreadProps$3(__spreadValues$5({}, layoutProps), {
|
|
1046
|
+
pageTitleRender: () => "",
|
|
1044
1047
|
logo: logo != null ? logo : logoElement,
|
|
1045
1048
|
headerRender: (_props, defaultDom) => /* @__PURE__ */ React__default.default.createElement(
|
|
1046
1049
|
antd.ConfigProvider,
|
|
@@ -1070,7 +1073,7 @@ function RichLayout(_a) {
|
|
|
1070
1073
|
splitMenus: layoutProps.layout === "mix",
|
|
1071
1074
|
route: {
|
|
1072
1075
|
path: rootUrl,
|
|
1073
|
-
routes: navMenuItems ?
|
|
1076
|
+
routes: navMenuItems ? processNavItems(navMenuItems) : void 0
|
|
1074
1077
|
},
|
|
1075
1078
|
location: {
|
|
1076
1079
|
pathname
|