Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #7266

Merged
merged 12 commits into from
Aug 14, 2024
16 changes: 8 additions & 8 deletions dev-test/backends/azure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/bitbucket/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/git-gateway/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/gitea/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="/dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/github/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/gitlab/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
16 changes: 8 additions & 8 deletions dev-test/backends/proxy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<body>
<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -18,11 +18,11 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

var PagePreview = createClass({
render: function() {
class PagePreview extends React.Component {
render() {
var entry = this.props.entry;
return h(
'div',
Expand All @@ -31,8 +31,8 @@
h('p', {}, h('small', {}, 'Written ' + entry.getIn(['data', 'date']))),
h('div', { className: 'text' }, this.props.widgetFor('body')),
);
},
});
}
}

CMS.registerPreviewTemplate('posts', PostPreview);
CMS.registerPreviewTemplate('pages', PagePreview);
Expand Down
24 changes: 12 additions & 12 deletions dev-test/backends/test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@

<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h('div', {},
h('div', {className: "cover"},
Expand All @@ -128,10 +128,10 @@
h('div', {"className": "text"}, this.props.widgetFor('body'))
);
}
});
}

var GeneralPreview = createClass({
render: function() {
class GeneralPreview extends React.Component {
render() {
var entry = this.props.entry;
var title = entry.getIn(['data', 'site_title']);
var posts = entry.getIn(['data', 'posts']);
Expand All @@ -151,10 +151,10 @@
)
);
}
});
}

var AuthorsPreview = createClass({
render: function() {
class AuthorsPreview extends React.Component {
render() {
return h('div', {},
h('h1', {}, 'Authors'),
this.props.widgetsFor('authors').map(function(author, index) {
Expand All @@ -166,10 +166,10 @@
})
);
}
});
}

const RelationKitchenSinkPostPreview = createClass({
render: function() {
class RelationKitchenSinkPostPreview extends React.Component {
render() {
// When a post is selected from the relation field, all of it's data
// will be available in the field's metadata nested under the collection
// name, and then further nested under the value specified in `value_field`.
Expand All @@ -186,7 +186,7 @@
h('p', {}, post.get('body', '').slice(0, 100) + '...'),
) : null;
}
});
}

const previewStyles = `
html,
Expand Down
24 changes: 12 additions & 12 deletions dev-test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@

<script src="dist/decap-cms.js"></script>
<script>
var PostPreview = createClass({
render: function() {
class PostPreview extends React.Component {
render() {
var entry = this.props.entry;
return h('div', {},
h('div', {className: "cover"},
Expand All @@ -128,10 +128,10 @@
h('div', {"className": "text"}, this.props.widgetFor('body'))
);
}
});
}

var GeneralPreview = createClass({
render: function() {
class GeneralPreview extends React.Component {
render() {
var entry = this.props.entry;
var title = entry.getIn(['data', 'site_title']);
var posts = entry.getIn(['data', 'posts']);
Expand All @@ -151,10 +151,10 @@
)
);
}
});
}

var AuthorsPreview = createClass({
render: function() {
class AuthorsPreview extends React.Component {
render() {
return h('div', {},
h('h1', {}, 'Authors'),
this.props.widgetsFor('authors').map(function(author, index) {
Expand All @@ -166,10 +166,10 @@
})
);
}
});
}

const RelationKitchenSinkPostPreview = createClass({
render: function() {
class RelationKitchenSinkPostPreview extends React.Component {
render() {
// When a post is selected from the relation field, all of it's data
// will be available in the field's metadata nested under the collection
// name, and then further nested under the value specified in `value_field`.
Expand All @@ -186,7 +186,7 @@
h('p', {}, post.get('body', '').slice(0, 100) + '...'),
) : null;
}
});
}

const previewStyles = `
html,
Expand Down
Loading
Loading