@vonaffenfels/slate-editor 1.0.19 → 1.0.20

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.19",
3
+ "version": "1.0.20",
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": "c07e5c97a79341c38e8439ac3e160a02b802db2f",
74
+ "gitHead": "a846930c8b8e27a6ecf7bab999e1b6a77b22c6a2",
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  }
@@ -62,6 +62,17 @@ export const SidebarEditorField = ({
62
62
  ))}
63
63
  </select>
64
64
  );
65
+ case "data-stream":
66
+ return (
67
+ <select
68
+ value={value || ""}
69
+ onChange={e => onChange(fieldKey, e.target.value)}>
70
+ <option value="">Auswählen</option>
71
+ {field.control.streams.map(stream => (
72
+ <option key={`select-option-${stream.value}`} value={stream.value}>{stream.label}</option>
73
+ ))}
74
+ </select>
75
+ );
65
76
  case "number":
66
77
  return (
67
78
  <input
@@ -371,6 +371,10 @@ const BlockSelect = ({
371
371
  const result = {};
372
372
 
373
373
  array.forEach(item => {
374
+ if (!item.id) {
375
+ return;
376
+ }
377
+
374
378
  const parts = item.title.split('/');
375
379
  let currentLevel = result;
376
380
 
@@ -14,6 +14,18 @@ export default {
14
14
  name: "Text",
15
15
  control: {type: "text"},
16
16
  },
17
+ stream: {
18
+ name: "Logik",
19
+ control: {
20
+ type: 'data-stream',
21
+ streams: [
22
+ {
23
+ value: "contentById",
24
+ label: "Ausgewählten Inhalt laden",
25
+ },
26
+ ],
27
+ },
28
+ },
17
29
  boolean: {
18
30
  name: "Boolean",
19
31
  control: {type: "boolean"},
@@ -1,8 +1,8 @@
1
1
  import TestStory3 from "./TestStory3";
2
2
 
3
3
  export default {
4
- title: "Elemente/Test 2/Test Story 3",
5
- id: "TestStory3",
4
+ title: "Design-System/Atoms/Ad Tags/Test Story 3",
5
+ // id: "TestStory3",
6
6
  component: TestStory3,
7
7
  storyContext: ["layout"],
8
8
  argTypes: {