@vonaffenfels/contentful-teasermanager 1.0.4 → 1.0.6
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 +3 -2
- package/src/components/Contentful/ConfigScreen.js +7 -1
- package/src/dev.js +2 -0
- package/src/index.js +5 -5
- package/webpack.config.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/contentful-teasermanager",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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": "
|
|
102
|
+
"gitHead": "6b627160bbe091e7e7989bc32bdf808e8d3af4e0",
|
|
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>
|
|
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
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
|
|
package/webpack.config.js
CHANGED
|
@@ -6,6 +6,7 @@ const {readFileSync} = require("fs");
|
|
|
6
6
|
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
7
7
|
|
|
8
8
|
module.exports = ({
|
|
9
|
+
outPath = path.resolve(__dirname, 'dist'),
|
|
9
10
|
babelConfig = JSON.parse(readFileSync("../../.babelrc").toString()),
|
|
10
11
|
componentImportRoot = "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
11
12
|
relativePathToComponents = path.resolve(__dirname + "../../../@base/slate-editor/src/dev/testComponents"),
|
|
@@ -140,7 +141,7 @@ module.exports = ({
|
|
|
140
141
|
libraryTarget: "umd",
|
|
141
142
|
publicPath: "/",
|
|
142
143
|
globalObject: "this",
|
|
143
|
-
path:
|
|
144
|
+
path: outPath,
|
|
144
145
|
},
|
|
145
146
|
};
|
|
146
147
|
};
|