@valu/block-components 0.4.0 → 0.5.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/README.md +17 -3
- package/dist/components/content-picker/index.cjs +3 -8
- package/dist/components/content-picker/index.cjs.map +1 -1
- package/dist/components/content-picker/index.js +3 -8
- package/dist/components/content-picker/index.js.map +1 -1
- package/dist/components/document-picker/index.cjs +3 -5
- package/dist/components/document-picker/index.cjs.map +1 -1
- package/dist/components/document-picker/index.js +3 -5
- package/dist/components/document-picker/index.js.map +1 -1
- package/dist/index.cjs +6 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -14
package/dist/index.cjs
CHANGED
|
@@ -1761,10 +1761,7 @@ var useResolvedItems = (value) => {
|
|
|
1761
1761
|
nameKey,
|
|
1762
1762
|
item.id
|
|
1763
1763
|
]);
|
|
1764
|
-
out[`${item.kind}:${item.type}:${item.id}`] =
|
|
1765
|
-
record: record ?? null,
|
|
1766
|
-
resolved
|
|
1767
|
-
};
|
|
1764
|
+
out[`${item.kind}:${item.type}:${item.id}`] = resolved ? record ?? null : void 0;
|
|
1768
1765
|
}
|
|
1769
1766
|
return out;
|
|
1770
1767
|
},
|
|
@@ -1772,10 +1769,8 @@ var useResolvedItems = (value) => {
|
|
|
1772
1769
|
);
|
|
1773
1770
|
return react$1.useMemo(
|
|
1774
1771
|
() => value.map((item) => {
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1777
|
-
const { record, resolved } = resolvedEntry;
|
|
1778
|
-
if (!resolved) {
|
|
1772
|
+
const record = records[`${item.kind}:${item.type}:${item.id}`];
|
|
1773
|
+
if (record === void 0) {
|
|
1779
1774
|
return item;
|
|
1780
1775
|
}
|
|
1781
1776
|
if (!record) {
|
|
@@ -4127,7 +4122,7 @@ var useResolvedDocuments = (value) => {
|
|
|
4127
4122
|
"attachment",
|
|
4128
4123
|
item.id
|
|
4129
4124
|
]);
|
|
4130
|
-
out[item.id] =
|
|
4125
|
+
out[item.id] = resolved ? record ?? null : void 0;
|
|
4131
4126
|
}
|
|
4132
4127
|
return out;
|
|
4133
4128
|
},
|
|
@@ -4135,10 +4130,8 @@ var useResolvedDocuments = (value) => {
|
|
|
4135
4130
|
);
|
|
4136
4131
|
return react$1.useMemo(
|
|
4137
4132
|
() => value.map((item) => {
|
|
4138
|
-
const
|
|
4139
|
-
if (
|
|
4140
|
-
const { record, resolved } = entry;
|
|
4141
|
-
if (!resolved) return item;
|
|
4133
|
+
const record = records[item.id];
|
|
4134
|
+
if (record === void 0) return item;
|
|
4142
4135
|
if (!record) return { ...item, missing: "deleted" };
|
|
4143
4136
|
const fresh = mapMediaToDocumentItem(
|
|
4144
4137
|
record
|