@vonaffenfels/slate-editor 1.0.23 → 1.0.25
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/BlockEditor.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/SidebarEditor/AssetList.js +2 -2
- package/src/SidebarEditor.js +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cssnano": "^5.0.1",
|
|
72
72
|
"escape-html": "^1.0.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "fa30314075d5122e489573b5431e306ed63aa9af",
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
|
@@ -66,10 +66,10 @@ export const Asset = ({
|
|
|
66
66
|
const [mediaUrl, setMediaUrl] = useState(null);
|
|
67
67
|
|
|
68
68
|
let id = asset?.sys?.id;
|
|
69
|
-
let title = asset?.fields?.title?.["en-US"] || asset?.fields?.title?.["de"];
|
|
69
|
+
let title = asset?.fields?.title?.["en-US"] || asset?.fields?.title?.["de"] || asset?.fields?.title?.toString();
|
|
70
70
|
let space = asset?.sys?.space?.sys?.id;
|
|
71
71
|
let environment = asset?.sys?.environment?.sys?.id;
|
|
72
|
-
let mediaAssetId = asset?.fields?.media?.["en-US"]?.sys?.id || asset?.fields?.media?.["de"]?.sys?.id;
|
|
72
|
+
let mediaAssetId = asset?.fields?.media?.["en-US"]?.sys?.id || asset?.fields?.media?.["de"]?.sys?.id || asset?.fields?.media?.sys?.id;
|
|
73
73
|
let href = `https://app.contentful.com/spaces/${space}/environments/${environment}/entries/${id}`;
|
|
74
74
|
|
|
75
75
|
if (cloudinary) {
|
package/src/SidebarEditor.js
CHANGED
|
@@ -38,8 +38,10 @@ const SidebarEditor = ({
|
|
|
38
38
|
} else {
|
|
39
39
|
fields.tables[argType.table.category] = {[key]: argType};
|
|
40
40
|
}
|
|
41
|
-
} else {
|
|
41
|
+
} else if (!argType.table?.disable) {
|
|
42
42
|
fields.fields[key] = argType;
|
|
43
|
+
} else {
|
|
44
|
+
return;
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
}
|
|
@@ -375,6 +377,10 @@ const BlockSelect = ({
|
|
|
375
377
|
return;
|
|
376
378
|
}
|
|
377
379
|
|
|
380
|
+
if (item.storyContext === "development" || (Array.isArray(item.storyContext) && item.storyContext.includes("development"))) {
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
|
|
378
384
|
const parts = item.title.split('/');
|
|
379
385
|
let currentLevel = result;
|
|
380
386
|
|