@vonaffenfels/slate-editor 1.1.31 → 1.1.33
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/ElementAutocomplete.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.33",
|
|
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": "65ee8d817acc8ea8c80ef308316b2c25def0ace0",
|
|
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
|
)}
|
|
@@ -21,7 +21,7 @@ export const ElementAutocomplete = ({
|
|
|
21
21
|
})) || []), ...customStories]).map(story => {
|
|
22
22
|
let storyTitleSplit = String(story.title || "").split("/");
|
|
23
23
|
let storyName = story.label || storyTitleSplit.at(-1);
|
|
24
|
-
let storyGroup = storyTitleSplit.length > 1 ? storyTitleSplit.slice(0, -1).join("/") :
|
|
24
|
+
let storyGroup = storyTitleSplit.length > 1 ? storyTitleSplit.slice(0, -1).join("/") : "Weitere Elemente";
|
|
25
25
|
|
|
26
26
|
if (story.type === "storybook") {
|
|
27
27
|
if (!story.id) {
|
|
@@ -116,8 +116,7 @@ export const ElementAutocomplete = ({
|
|
|
116
116
|
placeholder={'Element hinzufügen'}
|
|
117
117
|
emptyListMessage={'Keine Elemente gefunden'}
|
|
118
118
|
noMatchesMessage={'Keine Elemente gefunden'}
|
|
119
|
-
|
|
120
|
-
maxHeight={300}
|
|
119
|
+
listMaxHeight={500}
|
|
121
120
|
onSelectItem={handleOnChange}
|
|
122
121
|
width="medium"
|
|
123
122
|
itemToString={(item) => ""}
|