@plasmicpkgs/plasmic-rich-components 1.0.107 → 1.0.109
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 = `
|
|
@@ -1070,7 +1072,7 @@ function RichLayout(_a) {
|
|
|
1070
1072
|
splitMenus: layoutProps.layout === "mix",
|
|
1071
1073
|
route: {
|
|
1072
1074
|
path: rootUrl,
|
|
1073
|
-
routes: navMenuItems ?
|
|
1075
|
+
routes: navMenuItems ? processNavItems(navMenuItems) : void 0
|
|
1074
1076
|
},
|
|
1075
1077
|
location: {
|
|
1076
1078
|
pathname
|
|
@@ -1321,7 +1323,7 @@ function useSortedFilteredData(data, columns) {
|
|
|
1321
1323
|
const finalData = React__default.default.useMemo(() => {
|
|
1322
1324
|
var _a;
|
|
1323
1325
|
const filtered = (_a = data == null ? void 0 : data.data) == null ? void 0 : _a.filter(
|
|
1324
|
-
(row) => fastStringify__default.default(Object.values(row)).toLowerCase().includes(search)
|
|
1326
|
+
(row) => fastStringify__default.default(Object.values(row)).toLowerCase().includes(search.toLowerCase())
|
|
1325
1327
|
);
|
|
1326
1328
|
const sorted = (sortState == null ? void 0 : sortState.sorter.column) ? (
|
|
1327
1329
|
// We use .sort() rather than sortBy to use localeCompare
|