multi-content-type-relation 2.0.1 → 2.1.0
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/_chunks/{index-Cyd6H1uV.mjs → index-BHcolZ4N.mjs} +3 -6
- package/dist/_chunks/{index-CQ_pNHWj.js → index-CktBIBSM.js} +3 -6
- package/dist/_chunks/{index-5liGVtQX.js → index-CxWt3llJ.js} +2 -2
- package/dist/_chunks/{index-D3M5NaOA.mjs → index-D6nv39Fp.mjs} +3 -3
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ const SidePanel = () => {
|
|
|
118
118
|
uid,
|
|
119
119
|
isSingleType
|
|
120
120
|
});
|
|
121
|
-
setLinkedContent(response.data);
|
|
121
|
+
setLinkedContent(Array.isArray(response.data) ? response.data.filter(Boolean) : []);
|
|
122
122
|
setLoading(false);
|
|
123
123
|
};
|
|
124
124
|
fetchRevertRelations();
|
|
@@ -170,10 +170,7 @@ const SidePanel = () => {
|
|
|
170
170
|
children: /* @__PURE__ */ jsx(
|
|
171
171
|
Typography,
|
|
172
172
|
{
|
|
173
|
-
|
|
174
|
-
fontWeight: "bold",
|
|
175
|
-
textColor: "neutral800",
|
|
176
|
-
children: content.title
|
|
173
|
+
children: content.title ?? content.documentId
|
|
177
174
|
}
|
|
178
175
|
)
|
|
179
176
|
}
|
|
@@ -226,7 +223,7 @@ const index = {
|
|
|
226
223
|
components: {
|
|
227
224
|
Input: () => import(
|
|
228
225
|
/* webpackChunkName: "input-component" */
|
|
229
|
-
"./index-
|
|
226
|
+
"./index-D6nv39Fp.mjs"
|
|
230
227
|
)
|
|
231
228
|
},
|
|
232
229
|
inputSize: {
|
|
@@ -119,7 +119,7 @@ const SidePanel = () => {
|
|
|
119
119
|
uid,
|
|
120
120
|
isSingleType
|
|
121
121
|
});
|
|
122
|
-
setLinkedContent(response.data);
|
|
122
|
+
setLinkedContent(Array.isArray(response.data) ? response.data.filter(Boolean) : []);
|
|
123
123
|
setLoading(false);
|
|
124
124
|
};
|
|
125
125
|
fetchRevertRelations();
|
|
@@ -171,10 +171,7 @@ const SidePanel = () => {
|
|
|
171
171
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
172
172
|
designSystem.Typography,
|
|
173
173
|
{
|
|
174
|
-
|
|
175
|
-
fontWeight: "bold",
|
|
176
|
-
textColor: "neutral800",
|
|
177
|
-
children: content.title
|
|
174
|
+
children: content.title ?? content.documentId
|
|
178
175
|
}
|
|
179
176
|
)
|
|
180
177
|
}
|
|
@@ -227,7 +224,7 @@ const index = {
|
|
|
227
224
|
components: {
|
|
228
225
|
Input: () => Promise.resolve().then(() => require(
|
|
229
226
|
/* webpackChunkName: "input-component" */
|
|
230
|
-
"./index-
|
|
227
|
+
"./index-CxWt3llJ.js"
|
|
231
228
|
))
|
|
232
229
|
},
|
|
233
230
|
inputSize: {
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const reactIntl = require("react-intl");
|
|
6
6
|
const reactRouterDom = require("react-router-dom");
|
|
7
7
|
const designSystem = require("@strapi/design-system");
|
|
8
|
-
const index = require("./index-
|
|
8
|
+
const index = require("./index-CktBIBSM.js");
|
|
9
9
|
const reactDom = require("react-dom");
|
|
10
10
|
const sortable = require("@dnd-kit/sortable");
|
|
11
11
|
const icons = require("@strapi/icons");
|
|
@@ -3561,6 +3561,6 @@ const Index = (props) => {
|
|
|
3561
3561
|
}
|
|
3562
3562
|
};
|
|
3563
3563
|
}, [props.attribute]);
|
|
3564
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3564
|
+
return /* @__PURE__ */ jsxRuntime.jsx(MainInput, { ...props, attribute });
|
|
3565
3565
|
};
|
|
3566
3566
|
exports.default = Index;
|
|
@@ -2,8 +2,8 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import React, { useState, useEffect, useMemo, useLayoutEffect, useRef, useCallback, memo, useReducer, createContext, useContext } from "react";
|
|
3
3
|
import { useIntl } from "react-intl";
|
|
4
4
|
import { useLocation } from "react-router-dom";
|
|
5
|
-
import { Status as Status$1, Typography, Tr, Td, IconButton, Flex, Box, Table, Thead, Th, Tbody, Loader, Field, TextInput
|
|
6
|
-
import { f as fetchMatchingContent, u as useTranslate, g as getContentTypeForUid, a as formatToStrapiField, v as validateCurrentRelations } from "./index-
|
|
5
|
+
import { Status as Status$1, Typography, Tr, Td, IconButton, Flex, Box, Table, Thead, Th, Tbody, Loader, Field, TextInput } from "@strapi/design-system";
|
|
6
|
+
import { f as fetchMatchingContent, u as useTranslate, g as getContentTypeForUid, a as formatToStrapiField, v as validateCurrentRelations } from "./index-BHcolZ4N.mjs";
|
|
7
7
|
import { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
8
8
|
import { useSortable, SortableContext, verticalListSortingStrategy, arrayMove } from "@dnd-kit/sortable";
|
|
9
9
|
import { Drag, Eye, Plus, Trash } from "@strapi/icons";
|
|
@@ -3557,7 +3557,7 @@ const Index = (props) => {
|
|
|
3557
3557
|
}
|
|
3558
3558
|
};
|
|
3559
3559
|
}, [props.attribute]);
|
|
3560
|
-
return /* @__PURE__ */ jsx(
|
|
3560
|
+
return /* @__PURE__ */ jsx(MainInput, { ...props, attribute });
|
|
3561
3561
|
};
|
|
3562
3562
|
export {
|
|
3563
3563
|
Index as default
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -169,7 +169,7 @@ const hydrateMRCT = async (content, currentDepth, context) => {
|
|
|
169
169
|
(linkedEntry) => item.uid === linkedEntry.uid && item.documentId === linkedEntry.response.documentId
|
|
170
170
|
);
|
|
171
171
|
if (matchingContent) {
|
|
172
|
-
hydratedArray.push(matchingContent.response);
|
|
172
|
+
hydratedArray.push({ uid: matchingContent.uid, ...matchingContent.response });
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
flattenedProperties[key] = hydratedArray;
|
|
@@ -440,7 +440,7 @@ const controller = ({ strapi: strapi2 }) => ({
|
|
|
440
440
|
};
|
|
441
441
|
})
|
|
442
442
|
);
|
|
443
|
-
return relations;
|
|
443
|
+
return relations.filter(Boolean);
|
|
444
444
|
}
|
|
445
445
|
});
|
|
446
446
|
const controllers = {
|
package/dist/server/index.mjs
CHANGED
|
@@ -168,7 +168,7 @@ const hydrateMRCT = async (content, currentDepth, context) => {
|
|
|
168
168
|
(linkedEntry) => item.uid === linkedEntry.uid && item.documentId === linkedEntry.response.documentId
|
|
169
169
|
);
|
|
170
170
|
if (matchingContent) {
|
|
171
|
-
hydratedArray.push(matchingContent.response);
|
|
171
|
+
hydratedArray.push({ uid: matchingContent.uid, ...matchingContent.response });
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
flattenedProperties[key] = hydratedArray;
|
|
@@ -439,7 +439,7 @@ const controller = ({ strapi: strapi2 }) => ({
|
|
|
439
439
|
};
|
|
440
440
|
})
|
|
441
441
|
);
|
|
442
|
-
return relations;
|
|
442
|
+
return relations.filter(Boolean);
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
const controllers = {
|