@vonaffenfels/slate-editor 1.0.21 → 1.0.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonaffenfels/slate-editor",
3
- "version": "1.0.21",
3
+ "version": "1.0.24",
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": "f6bc2eb71e3132eeceb3b175e37360d419979c2d",
74
+ "gitHead": "578a983fe7b1e926b38ede91fa16ec56c58106a4",
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) {
@@ -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
  }
@@ -428,6 +430,7 @@ const BlockSelect = ({
428
430
  <label className="block">Element</label>
429
431
  <select
430
432
  onChange={e => onSelectChange(stories.find(s => s.id === e.target.value))}
433
+ value={active?.block}
431
434
  className="font-bold"
432
435
  >
433
436
  <option>Element wählen</option>