@vonaffenfels/slate-editor 1.1.32 → 1.1.34
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/BlockEditor.js +3 -5
- package/src/SidebarEditor/Fields/MVP.js +2 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.34",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"cssnano": "^5.0.1",
|
|
73
73
|
"escape-html": "^1.0.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "1e3ea5ff0c721c70b372b3507f1c2ee1f4ff270c",
|
|
76
76
|
"publishConfig": {
|
|
77
77
|
"access": "public"
|
|
78
78
|
}
|
package/src/BlockEditor.js
CHANGED
|
@@ -33,7 +33,7 @@ export default function BlockEditor({
|
|
|
33
33
|
storybookStories,
|
|
34
34
|
onSaveClick,
|
|
35
35
|
isLoading,
|
|
36
|
-
|
|
36
|
+
liveLink,
|
|
37
37
|
locale,
|
|
38
38
|
setLocale,
|
|
39
39
|
}) {
|
|
@@ -353,8 +353,6 @@ export default function BlockEditor({
|
|
|
353
353
|
setSelectedStorybookElement(null);
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
-
const slug = contentfulSdk?.entry?.fields?.slug?.getValue();
|
|
357
|
-
|
|
358
356
|
if (isLoadingStories) {
|
|
359
357
|
return <div style={{
|
|
360
358
|
display: "flex",
|
|
@@ -387,8 +385,8 @@ export default function BlockEditor({
|
|
|
387
385
|
lastSelection={lastSelection}
|
|
388
386
|
buttons={<div className="flex gap-2">
|
|
389
387
|
<TranslationToolbarButton sdk={contentfulSdk} setEditorValue={onSlateChange} locale={locale} setLocale={setLocale}/>
|
|
390
|
-
{
|
|
391
|
-
<a href={
|
|
388
|
+
{liveLink && (
|
|
389
|
+
<a href={liveLink} target="_blank" rel="noreferrer">
|
|
392
390
|
<button className='button button--secondary'>Live-Seite öffnen</button>
|
|
393
391
|
</a>
|
|
394
392
|
)}
|
|
@@ -36,15 +36,14 @@ export const MVP = ({
|
|
|
36
36
|
</div>
|
|
37
37
|
{Object.keys(field.control.fields).map((key) => {
|
|
38
38
|
let mvpField = field.control.fields[key];
|
|
39
|
-
|
|
40
|
-
value = value?.[index]?.[key];
|
|
39
|
+
let mvpValue = value?.[index]?.[key];
|
|
41
40
|
|
|
42
41
|
return (
|
|
43
42
|
<div key={`mvp-field-${key}`}>
|
|
44
43
|
<SidebarEditorField
|
|
45
44
|
field={mvpField}
|
|
46
45
|
fieldKey={fieldKey}
|
|
47
|
-
value={
|
|
46
|
+
value={mvpValue}
|
|
48
47
|
storybookElement={storybookElement}
|
|
49
48
|
sdk={sdk}
|
|
50
49
|
onChange={(fK, value) => onChange(
|