@vonaffenfels/contentful-slate-editor 1.0.55 → 1.0.56

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/contentful-slate-editor",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "scripts": {
5
5
  "prepublish": "yarn run build",
6
6
  "dev": "yarn run start",
@@ -91,10 +91,10 @@
91
91
  "webpack-watch-files-plugin": "^1.2.1"
92
92
  },
93
93
  "dependencies": {
94
- "@vonaffenfels/slate-editor": "^1.0.55",
94
+ "@vonaffenfels/slate-editor": "^1.0.56",
95
95
  "webpack": "5.88.2"
96
96
  },
97
- "gitHead": "b5aaf96b81e9d38533cc632505e6c78553e55e22",
97
+ "gitHead": "46c4cdded137ff7fdd53011ee6b999972131dd9c",
98
98
  "publishConfig": {
99
99
  "access": "public"
100
100
  }
@@ -11,6 +11,7 @@ import storybookStories from "storybookStories";
11
11
  const Dialog = ({
12
12
  sdk,
13
13
  elementPropsMap,
14
+ activeConfig,
14
15
  }) => {
15
16
  const defaultValue = [
16
17
  {
@@ -28,7 +29,7 @@ const Dialog = ({
28
29
 
29
30
  switch (sdk.parameters.invocation.type) {
30
31
  case "cloudinary":
31
- return <DialogCloudinary sdk={sdk} config={sdk.parameters.invocation}/>;
32
+ return <DialogCloudinary sdk={sdk} config={activeConfig} />;
32
33
  default:
33
34
  return <div className="relative flex h-full max-h-full justify-between">
34
35
  <BlockEditor
@@ -9,8 +9,8 @@ const DialogCloudinary = ({
9
9
  sdk,
10
10
  config,
11
11
  }) => {
12
- const cloudinaryApiKey = sdk?.parameters?.installation?.cloudinaryApiKey;
13
- const cloudinaryCloudName = sdk?.parameters?.installation?.cloudinaryCloudName;
12
+ const cloudinaryApiKey = config?.env?.CLOUDINARY_CLOUD_NAME;
13
+ const cloudinaryCloudName = config?.env?.CLOUDINARY_API_KEY;
14
14
 
15
15
  const cloudinaryRef = useRef(null);
16
16
 
package/src/index.js CHANGED
@@ -26,6 +26,7 @@ export const BaseContentfulApp = (props) => {
26
26
  contentType: sdk.parameters?.invocation?.contentType || sdk?.entry?.getSys()?.contentType?.sys?.id,
27
27
  };
28
28
  const elementPropsMap = props?.getElementPropsMap?.(wrapperProps.contentType) || props?.elementPropsMap;
29
+ const activeConfig = props?.getActiveConfig?.() || props?.activeConfig;
29
30
 
30
31
  const ComponentLocationSettings = [
31
32
  {
@@ -49,7 +50,7 @@ export const BaseContentfulApp = (props) => {
49
50
  },
50
51
  {
51
52
  location: locations.LOCATION_DIALOG,
52
- component: <RendererWrapperComponent {...wrapperProps} ><Dialog sdk={sdk} elementPropsMap={elementPropsMap}/></RendererWrapperComponent>,
53
+ component: <RendererWrapperComponent {...wrapperProps} ><Dialog sdk={sdk} elementPropsMap={elementPropsMap} activeConfig={activeConfig} /></RendererWrapperComponent>,
53
54
  },
54
55
  ];
55
56