decap-cms-core 3.8.0 → 3.8.1
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/dist/decap-cms-core.js +2 -2
- package/dist/decap-cms-core.js.map +1 -1
- package/dist/esm/bootstrap.js +2 -2
- package/dist/esm/components/Collection/Entries/EntriesSearch.js +13 -5
- package/dist/esm/components/UI/ErrorBoundary.js +2 -2
- package/package.json +2 -2
- package/src/components/Collection/Entries/EntriesSearch.js +11 -3
package/dist/esm/bootstrap.js
CHANGED
|
@@ -4,7 +4,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
4
4
|
import { connect } from 'react-redux';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import { Cursor } from 'decap-cms-lib-util';
|
|
7
|
-
import { selectSearchedEntries } from '../../../reducers';
|
|
7
|
+
import { selectSearchedEntries, selectUnpublishedEntry } from '../../../reducers';
|
|
8
8
|
import { searchEntries as actionSearchEntries, clearSearch as actionClearSearch } from '../../../actions/search';
|
|
9
9
|
import Entries from './Entries';
|
|
10
10
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -17,7 +17,8 @@ class EntriesSearch extends React.Component {
|
|
|
17
17
|
collections: ImmutablePropTypes.seq,
|
|
18
18
|
collectionNames: PropTypes.array,
|
|
19
19
|
entries: ImmutablePropTypes.list,
|
|
20
|
-
page: PropTypes.number
|
|
20
|
+
page: PropTypes.number,
|
|
21
|
+
getWorkflowStatus: PropTypes.func
|
|
21
22
|
};
|
|
22
23
|
componentDidMount() {
|
|
23
24
|
// Manually validate PropTypes - React 19 breaking change
|
|
@@ -69,14 +70,16 @@ class EntriesSearch extends React.Component {
|
|
|
69
70
|
const {
|
|
70
71
|
collections,
|
|
71
72
|
entries,
|
|
72
|
-
isFetching
|
|
73
|
+
isFetching,
|
|
74
|
+
getWorkflowStatus
|
|
73
75
|
} = this.props;
|
|
74
76
|
return ___EmotionJSX(Entries, {
|
|
75
77
|
cursor: this.getCursor(),
|
|
76
78
|
handleCursorActions: this.handleCursorActions,
|
|
77
79
|
collections: collections,
|
|
78
80
|
entries: entries,
|
|
79
|
-
isFetching: isFetching
|
|
81
|
+
isFetching: isFetching,
|
|
82
|
+
getWorkflowStatus: getWorkflowStatus
|
|
80
83
|
});
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -89,13 +92,18 @@ function mapStateToProps(state, ownProps) {
|
|
|
89
92
|
const isFetching = state.search.isFetching;
|
|
90
93
|
const page = state.search.page;
|
|
91
94
|
const entries = selectSearchedEntries(state, collectionNames);
|
|
95
|
+
function getWorkflowStatus(collectionName, slug) {
|
|
96
|
+
const unpublishedEntry = selectUnpublishedEntry(state, collectionName, slug);
|
|
97
|
+
return unpublishedEntry ? unpublishedEntry.get('status') : null;
|
|
98
|
+
}
|
|
92
99
|
return {
|
|
93
100
|
isFetching,
|
|
94
101
|
page,
|
|
95
102
|
collections,
|
|
96
103
|
collectionNames,
|
|
97
104
|
entries,
|
|
98
|
-
searchTerm
|
|
105
|
+
searchTerm,
|
|
106
|
+
getWorkflowStatus
|
|
99
107
|
};
|
|
100
108
|
}
|
|
101
109
|
const mapDispatchToProps = {
|
|
@@ -44,8 +44,8 @@ function buildIssueTemplate({
|
|
|
44
44
|
let version = '';
|
|
45
45
|
if (typeof DECAP_CMS_VERSION === 'string') {
|
|
46
46
|
version = `decap-cms@${DECAP_CMS_VERSION}`;
|
|
47
|
-
} else if (typeof "3.8.
|
|
48
|
-
version = `decap-cms-app@${"3.8.
|
|
47
|
+
} else if (typeof "3.8.3" === 'string') {
|
|
48
|
+
version = `decap-cms-app@${"3.8.3"}`;
|
|
49
49
|
}
|
|
50
50
|
const template = getIssueTemplate({
|
|
51
51
|
version,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "decap-cms-core",
|
|
3
3
|
"description": "Decap CMS core application, see decap-cms package for the main distribution.",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.1",
|
|
5
5
|
"repository": "https://github.com/decaporg/decap-cms/tree/main/packages/decap-cms-core",
|
|
6
6
|
"bugs": "https://github.com/decaporg/decap-cms/issues",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"browser": {
|
|
101
101
|
"path": "path-browserify"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "899dba82d1f396260e0f84c6977c1d2aee809b59"
|
|
104
104
|
}
|
|
@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
6
|
import { Cursor } from 'decap-cms-lib-util';
|
|
7
7
|
|
|
8
|
-
import { selectSearchedEntries } from '../../../reducers';
|
|
8
|
+
import { selectSearchedEntries, selectUnpublishedEntry } from '../../../reducers';
|
|
9
9
|
import {
|
|
10
10
|
searchEntries as actionSearchEntries,
|
|
11
11
|
clearSearch as actionClearSearch,
|
|
@@ -22,6 +22,7 @@ class EntriesSearch extends React.Component {
|
|
|
22
22
|
collectionNames: PropTypes.array,
|
|
23
23
|
entries: ImmutablePropTypes.list,
|
|
24
24
|
page: PropTypes.number,
|
|
25
|
+
getWorkflowStatus: PropTypes.func,
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
componentDidMount() {
|
|
@@ -63,7 +64,7 @@ class EntriesSearch extends React.Component {
|
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
render() {
|
|
66
|
-
const { collections, entries, isFetching } = this.props;
|
|
67
|
+
const { collections, entries, isFetching, getWorkflowStatus } = this.props;
|
|
67
68
|
return (
|
|
68
69
|
<Entries
|
|
69
70
|
cursor={this.getCursor()}
|
|
@@ -71,6 +72,7 @@ class EntriesSearch extends React.Component {
|
|
|
71
72
|
collections={collections}
|
|
72
73
|
entries={entries}
|
|
73
74
|
isFetching={isFetching}
|
|
75
|
+
getWorkflowStatus={getWorkflowStatus}
|
|
74
76
|
/>
|
|
75
77
|
);
|
|
76
78
|
}
|
|
@@ -83,7 +85,13 @@ function mapStateToProps(state, ownProps) {
|
|
|
83
85
|
const isFetching = state.search.isFetching;
|
|
84
86
|
const page = state.search.page;
|
|
85
87
|
const entries = selectSearchedEntries(state, collectionNames);
|
|
86
|
-
|
|
88
|
+
|
|
89
|
+
function getWorkflowStatus(collectionName, slug) {
|
|
90
|
+
const unpublishedEntry = selectUnpublishedEntry(state, collectionName, slug);
|
|
91
|
+
return unpublishedEntry ? unpublishedEntry.get('status') : null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return { isFetching, page, collections, collectionNames, entries, searchTerm, getWorkflowStatus };
|
|
87
95
|
}
|
|
88
96
|
|
|
89
97
|
const mapDispatchToProps = {
|