@vonaffenfels/contentful-teasermanager 1.0.4 → 1.0.5

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-teasermanager",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "scripts": {
5
5
  "prepublish": "yarn run build",
6
6
  "dev": "yarn run start",
@@ -96,9 +96,10 @@
96
96
  "webpack-dev-server": "^4.0.0-beta.2"
97
97
  },
98
98
  "dependencies": {
99
+ "@vonaffenfels/slate-editor": "^1.0.5",
99
100
  "webpack": "5.73.0"
100
101
  },
101
- "gitHead": "ba6d3fea2cca04a822de7e3d7dff5949e62a9d46",
102
+ "gitHead": "718a65757ab690aa3e2df05274a9c401ce466b6e",
102
103
  "publishConfig": {
103
104
  "access": "public"
104
105
  }
@@ -62,7 +62,13 @@ export default class Config extends Component {
62
62
  backgroundColor: "#FFF",
63
63
  })}>
64
64
  <Form>
65
- <Heading>No Configuration necessary</Heading>
65
+ <Heading>Configuration</Heading>
66
+ <TextField
67
+ value={this.state.parameters.contentField}
68
+ onChange={e => this.onFieldChanged(e.target.value, "contentField")}
69
+ labelText="Content Field Name"
70
+ required
71
+ />
66
72
  </Form>
67
73
  </Workbench>
68
74
  );
package/src/dev.js CHANGED
@@ -1,3 +1,5 @@
1
+ import '@vonaffenfels/slate-editor/dist/index.css';
2
+ import './scss/index.scss';
1
3
  import './scss/dev.scss';
2
4
  import {BaseContentfulApp} from "./index"
3
5
 
package/src/index.js CHANGED
@@ -8,8 +8,6 @@ import {
8
8
  import '@contentful/forma-36-react-components/dist/styles.css';
9
9
  import '@contentful/forma-36-fcss/dist/styles.css';
10
10
  import '@contentful/forma-36-tokens/dist/css/index.css';
11
- import '@vonaffenfels/slate-editor/dist/index.css';
12
- import './scss/index.scss';
13
11
 
14
12
  import EntryEditor from './components/Contentful/EntryEditor';
15
13
  import Config from './components/Contentful/ConfigScreen';
@@ -17,12 +15,14 @@ import Dialog from "./components/Contentful/Dialog";
17
15
  import Page from "./components/Contentful/Page";
18
16
  import {initContentfulClient} from "./lib/contentfulClient";
19
17
 
20
- export const BaseContentfulApp = () => {
18
+ export const BaseContentfulApp = (props) => {
21
19
  init((sdk) => {
22
20
  const rootContainer = document.getElementById('root');
23
21
 
24
22
  initContentfulClient(sdk);
25
23
 
24
+ const RendererWrapperComponent = props.RendererWrapperComponent || (({children}) => <div>{children}</div>);
25
+
26
26
  const ComponentLocationSettings = [
27
27
  {
28
28
  location: locations.LOCATION_APP_CONFIG,
@@ -30,7 +30,7 @@ export const BaseContentfulApp = () => {
30
30
  },
31
31
  {
32
32
  location: locations.LOCATION_ENTRY_EDITOR,
33
- component: <EntryEditor sdk={sdk}/>,
33
+ component: <RendererWrapperComponent sdk={sdk}><EntryEditor sdk={sdk}/></RendererWrapperComponent>,
34
34
  },
35
35
  {
36
36
  location: locations.LOCATION_DIALOG,
@@ -38,7 +38,7 @@ export const BaseContentfulApp = () => {
38
38
  },
39
39
  {
40
40
  location: locations.LOCATION_PAGE,
41
- component: <Page sdk={sdk}/>,
41
+ component: <RendererWrapperComponent sdk={sdk}><Page sdk={sdk}/></RendererWrapperComponent>,
42
42
  },
43
43
  ];
44
44