@plone/volto 16.14.0 → 16.15.0
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/.changelog.draft +20 -2
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +25 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/blocks/Table/TableBlockView.jsx +4 -4
- package/src/components/manage/History/History.jsx +35 -18
- package/src/components/theme/View/EventView.jsx +1 -1
- package/src/components/theme/View/NewsItemView.jsx +1 -1
- package/src/config/index.js +1 -0
- package/src/express-middleware/devproxy.js +4 -2
- package/src/server.jsx +1 -0
- package/src/start-server.js +4 -2
package/.changelog.draft
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
## 16.
|
|
1
|
+
## 16.15.0 (2023-03-08)
|
|
2
2
|
|
|
3
3
|
### Feature
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Improvements to the dev API proxy:
|
|
6
|
+
- Prefer RAZZLE_INTERNAL_API_PATH over RAZZLE_API_PATH as the target of the proxy.
|
|
7
|
+
The target of the API proxy is now always logged on startup, even in production mode.
|
|
8
|
+
- Support proxying to a backend served over https. For this configuration it
|
|
9
|
+
might be necessary to set RAZZLE_DEV_PROXY_INSECURE=1 if the backend
|
|
10
|
+
certificate can't be verified.
|
|
11
|
+
|
|
12
|
+
[davisagli] [#4434](https://github.com/plone/volto/issues/4434)
|
|
13
|
+
|
|
14
|
+
### Bugfix
|
|
15
|
+
|
|
16
|
+
- fix: newsitem and event views wrapper classNames @nzambello [#4443](https://github.com/plone/volto/issues/4443)
|
|
17
|
+
- Fix weird GHA failure on config option not supported @sneridagh [#4466](https://github.com/plone/volto/issues/4466)
|
|
18
|
+
- Fix history view dropdown for first entry, showing 'Revert to this version option' always @sneridagh [#4471](https://github.com/plone/volto/issues/4471)
|
|
19
|
+
- Fix order of row of long table in edit and view mode @iFlameing [#4473](https://github.com/plone/volto/issues/4473)
|
|
20
|
+
|
|
21
|
+
### Documentation
|
|
22
|
+
|
|
23
|
+
- Complete teaser docs, add new section in `Blocks`: `Core Blocks developers notes` @sneridagh [#4461](https://github.com/plone/volto/issues/4461)
|
|
6
24
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,31 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.15.0 (2023-03-08)
|
|
12
|
+
|
|
13
|
+
### Feature
|
|
14
|
+
|
|
15
|
+
- Improvements to the dev API proxy:
|
|
16
|
+
- Prefer RAZZLE_INTERNAL_API_PATH over RAZZLE_API_PATH as the target of the proxy.
|
|
17
|
+
The target of the API proxy is now always logged on startup, even in production mode.
|
|
18
|
+
- Support proxying to a backend served over https. For this configuration it
|
|
19
|
+
might be necessary to set RAZZLE_DEV_PROXY_INSECURE=1 if the backend
|
|
20
|
+
certificate can't be verified.
|
|
21
|
+
|
|
22
|
+
[davisagli] [#4434](https://github.com/plone/volto/issues/4434)
|
|
23
|
+
|
|
24
|
+
### Bugfix
|
|
25
|
+
|
|
26
|
+
- fix: newsitem and event views wrapper classNames @nzambello [#4443](https://github.com/plone/volto/issues/4443)
|
|
27
|
+
- Fix weird GHA failure on config option not supported @sneridagh [#4466](https://github.com/plone/volto/issues/4466)
|
|
28
|
+
- Fix history view dropdown for first entry, showing 'Revert to this version option' always @sneridagh [#4471](https://github.com/plone/volto/issues/4471)
|
|
29
|
+
- Fix order of row of long table in edit and view mode @iFlameing [#4473](https://github.com/plone/volto/issues/4473)
|
|
30
|
+
|
|
31
|
+
### Documentation
|
|
32
|
+
|
|
33
|
+
- Complete teaser docs, add new section in `Blocks`: `Core Blocks developers notes` @sneridagh [#4461](https://github.com/plone/volto/issues/4461)
|
|
34
|
+
|
|
35
|
+
|
|
11
36
|
## 16.14.0 (2023-03-03)
|
|
12
37
|
|
|
13
38
|
### Feature
|
package/package.json
CHANGED
|
@@ -33,13 +33,13 @@ const View = ({ data }) => {
|
|
|
33
33
|
}, [data.table.rows]);
|
|
34
34
|
|
|
35
35
|
const rows = useMemo(() => {
|
|
36
|
-
const items =
|
|
37
|
-
if (!data.table.rows) return
|
|
36
|
+
const items = [];
|
|
37
|
+
if (!data.table.rows) return [];
|
|
38
38
|
data.table.rows.forEach((row, index) => {
|
|
39
39
|
if (index > 0) {
|
|
40
|
-
items[
|
|
40
|
+
items[index] = [];
|
|
41
41
|
row.cells.forEach((cell, cellIndex) => {
|
|
42
|
-
items[
|
|
42
|
+
items[index][cellIndex] = {
|
|
43
43
|
...cell,
|
|
44
44
|
value:
|
|
45
45
|
cell.value && Node.string({ children: cell.value }).length > 0
|
|
@@ -116,22 +116,37 @@ class History extends Component {
|
|
|
116
116
|
this.props.revertHistory(getBaseUrl(this.props.pathname), value);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
* @returns {string} Markup for the component.
|
|
123
|
-
*/
|
|
124
|
-
render() {
|
|
119
|
+
processHistoryEntries = () => {
|
|
120
|
+
// Getting the history entries from the props
|
|
121
|
+
// No clue why the reverse(concat()) is necessary
|
|
125
122
|
const entries = reverse(concat(this.props.entries));
|
|
126
123
|
let title = entries.length > 0 ? entries[0].state_title : '';
|
|
127
124
|
for (let x = 1; x < entries.length; x += 1) {
|
|
128
125
|
entries[x].prev_state_title = title;
|
|
129
126
|
title = entries[x].state_title || title;
|
|
130
127
|
}
|
|
128
|
+
// We reverse them again
|
|
131
129
|
reverse(entries);
|
|
130
|
+
|
|
131
|
+
// We identify the latest 'versioning' entry and mark it
|
|
132
|
+
const current_version = find(entries, (item) => item.type === 'versioning');
|
|
133
|
+
if (current_version) {
|
|
134
|
+
current_version.is_current = true;
|
|
135
|
+
}
|
|
136
|
+
return entries;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Render method.
|
|
141
|
+
* @method render
|
|
142
|
+
* @returns {string} Markup for the component.
|
|
143
|
+
*/
|
|
144
|
+
render() {
|
|
132
145
|
const historyAction = find(this.props.objectActions, {
|
|
133
146
|
id: 'history',
|
|
134
147
|
});
|
|
148
|
+
const entries = this.processHistoryEntries();
|
|
149
|
+
|
|
135
150
|
return !historyAction ? (
|
|
136
151
|
<>
|
|
137
152
|
{this.props.token ? (
|
|
@@ -266,18 +281,20 @@ class History extends Component {
|
|
|
266
281
|
/>
|
|
267
282
|
</Link>
|
|
268
283
|
)}
|
|
269
|
-
{'version' in entry &&
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
284
|
+
{'version' in entry &&
|
|
285
|
+
entry.may_revert &&
|
|
286
|
+
!entry.is_current && (
|
|
287
|
+
<Dropdown.Item
|
|
288
|
+
value={entry.version}
|
|
289
|
+
onClick={this.onRevert}
|
|
290
|
+
>
|
|
291
|
+
<Icon name="undo" />{' '}
|
|
292
|
+
<FormattedMessage
|
|
293
|
+
id="Revert to this revision"
|
|
294
|
+
defaultMessage="Revert to this revision"
|
|
295
|
+
/>
|
|
296
|
+
</Dropdown.Item>
|
|
297
|
+
)}
|
|
281
298
|
</Dropdown.Menu>
|
|
282
299
|
</Dropdown>
|
|
283
300
|
)}
|
|
@@ -43,7 +43,7 @@ const EventView = (props) => {
|
|
|
43
43
|
const { content } = props;
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<div id="page-document" className="ui container
|
|
46
|
+
<div id="page-document" className="ui container view-wrapper event-view">
|
|
47
47
|
<Grid>
|
|
48
48
|
<Grid.Column width={7} className="mobile hidden">
|
|
49
49
|
{hasBlocksData(content) ? (
|
|
@@ -21,7 +21,7 @@ import RenderBlocks from '@plone/volto/components/theme/View/RenderBlocks';
|
|
|
21
21
|
*/
|
|
22
22
|
const NewsItemView = ({ content }) =>
|
|
23
23
|
hasBlocksData(content) ? (
|
|
24
|
-
<div id="page-document" className="ui container
|
|
24
|
+
<div id="page-document" className="ui container view-wrapper newsitem-view">
|
|
25
25
|
<RenderBlocks content={content} />
|
|
26
26
|
</div>
|
|
27
27
|
) : (
|
package/src/config/index.js
CHANGED
|
@@ -89,6 +89,7 @@ let config = {
|
|
|
89
89
|
// https://6.docs.plone.org/volto/deploying/seamless-mode.html
|
|
90
90
|
devProxyToApiPath:
|
|
91
91
|
process.env.RAZZLE_DEV_PROXY_API_PATH ||
|
|
92
|
+
process.env.RAZZLE_INTERNAL_API_PATH ||
|
|
92
93
|
process.env.RAZZLE_API_PATH ||
|
|
93
94
|
'http://localhost:8080/Plone', // Set it to '' for disabling the proxy
|
|
94
95
|
// proxyRewriteTarget Set it for set a custom target for the proxy or overide the internal VHM rewrite
|
|
@@ -75,12 +75,14 @@ export default function () {
|
|
|
75
75
|
const { apiPathURL, instancePath } = getEnv();
|
|
76
76
|
const target =
|
|
77
77
|
config.settings.proxyRewriteTarget ||
|
|
78
|
-
`/VirtualHostBase
|
|
78
|
+
`/VirtualHostBase/${apiPathURL.protocol.slice(0, -1)}/${
|
|
79
|
+
apiPathURL.hostname
|
|
80
|
+
}:${apiPathURL.port}${instancePath}/++api++/VirtualHostRoot`;
|
|
79
81
|
|
|
80
82
|
return `${target}${path.replace('/++api++', '')}`;
|
|
81
83
|
},
|
|
82
84
|
logLevel: process.env.DEBUG_HPM ? 'debug' : 'silent',
|
|
83
|
-
...(
|
|
85
|
+
...(process.env.RAZZLE_DEV_PROXY_INSECURE && {
|
|
84
86
|
changeOrigin: true,
|
|
85
87
|
secure: false,
|
|
86
88
|
}),
|
package/src/server.jsx
CHANGED
|
@@ -329,6 +329,7 @@ export const defaultReadCriticalCss = () => {
|
|
|
329
329
|
// Exposed for the console bootstrap info messages
|
|
330
330
|
server.apiPath = config.settings.apiPath;
|
|
331
331
|
server.devProxyToApiPath = config.settings.devProxyToApiPath;
|
|
332
|
+
server.proxyRewriteTarget = config.settings.proxyRewriteTarget;
|
|
332
333
|
server.publicURL = config.settings.publicURL;
|
|
333
334
|
|
|
334
335
|
export default server;
|
package/src/start-server.js
CHANGED
|
@@ -19,9 +19,11 @@ export default () => {
|
|
|
19
19
|
} else {
|
|
20
20
|
console.log(`API server (API_PATH) is set to: ${app.apiPath}`);
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (app.devProxyToApiPath)
|
|
23
23
|
console.log(
|
|
24
|
-
`
|
|
24
|
+
`Proxying API requests from ${app.publicURL}/++api++ to ${
|
|
25
|
+
app.devProxyToApiPath
|
|
26
|
+
}${app.proxyRewriteTarget || ''}`,
|
|
25
27
|
);
|
|
26
28
|
console.log(`🎭 Volto started at ${bind_address}:${port} 🚀`);
|
|
27
29
|
|