@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonaffenfels/slate-editor",
3
- "version": "1.1.31",
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": "29092565a5ae7277e00d388bf0daabb0b51cda3d",
75
+ "gitHead": "65ee8d817acc8ea8c80ef308316b2c25def0ace0",
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  }
@@ -33,7 +33,7 @@ export default function BlockEditor({
33
33
  storybookStories,
34
34
  onSaveClick,
35
35
  isLoading,
36
- activeConfig,
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
- {activeConfig?.domain && slug && (
391
- <a href={`${activeConfig.domain}/${slug}`} target="_blank" rel="noreferrer">
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("/") : null;
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
- dropdownProps={{isFullWidth: true}}
120
- maxHeight={300}
119
+ listMaxHeight={500}
121
120
  onSelectItem={handleOnChange}
122
121
  width="medium"
123
122
  itemToString={(item) => ""}