@plone/volto 18.16.0 → 18.17.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.md
CHANGED
|
@@ -17,6 +17,12 @@ myst:
|
|
|
17
17
|
|
|
18
18
|
<!-- towncrier release notes start -->
|
|
19
19
|
|
|
20
|
+
## 18.17.0 (2025-05-06)
|
|
21
|
+
|
|
22
|
+
### Feature
|
|
23
|
+
|
|
24
|
+
- Added `contained` class if `isContainer` prop is passed (from containers). @sneridagh [#7043](https://github.com/plone/volto/issues/7043)
|
|
25
|
+
|
|
20
26
|
## 18.16.0 (2025-05-01)
|
|
21
27
|
|
|
22
28
|
### Feature
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "18.
|
|
12
|
+
"version": "18.17.0",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -237,8 +237,8 @@
|
|
|
237
237
|
"use-deep-compare-effect": "1.8.1",
|
|
238
238
|
"uuid": "^8.3.2",
|
|
239
239
|
"@plone/registry": "2.5.3",
|
|
240
|
-
"@plone/
|
|
241
|
-
"@plone/
|
|
240
|
+
"@plone/volto-slate": "18.3.0",
|
|
241
|
+
"@plone/scripts": "3.9.0"
|
|
242
242
|
},
|
|
243
243
|
"devDependencies": {
|
|
244
244
|
"@babel/core": "^7.0.0",
|
|
@@ -122,7 +122,7 @@ export class Edit extends Component {
|
|
|
122
122
|
*/
|
|
123
123
|
render() {
|
|
124
124
|
const { blocksConfig = config.blocks.blocksConfig } = this.props;
|
|
125
|
-
const { editable, type } = this.props;
|
|
125
|
+
const { editable, type, isContainer: parentIsContainer } = this.props;
|
|
126
126
|
|
|
127
127
|
const disableNewBlocks = this.props.data?.disableNewBlocks;
|
|
128
128
|
|
|
@@ -198,6 +198,7 @@ export class Edit extends Component {
|
|
|
198
198
|
{...this.props}
|
|
199
199
|
blockNode={this.blockNode}
|
|
200
200
|
data={this.props.data}
|
|
201
|
+
className={cx({ contained: parentIsContainer })}
|
|
201
202
|
/>
|
|
202
203
|
{this.props.manage && (
|
|
203
204
|
<SidebarPortal
|
|
@@ -9,7 +9,13 @@ import {
|
|
|
9
9
|
const StyleWrapper = (props) => {
|
|
10
10
|
let classNames,
|
|
11
11
|
style = [];
|
|
12
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
block,
|
|
14
|
+
children,
|
|
15
|
+
content,
|
|
16
|
+
data = {},
|
|
17
|
+
isContainer: parentIsContainer,
|
|
18
|
+
} = props;
|
|
13
19
|
classNames = buildStyleClassNamesFromData(data.styles);
|
|
14
20
|
|
|
15
21
|
classNames = buildStyleClassNamesExtenders({
|
|
@@ -24,14 +30,16 @@ const StyleWrapper = (props) => {
|
|
|
24
30
|
'',
|
|
25
31
|
// If we are rendering blocks inside a container, then pass also the data from the container
|
|
26
32
|
// This is needed in order to calculate properly the styles for the blocks inside the container
|
|
27
|
-
|
|
33
|
+
parentIsContainer && content.blocks ? content : {},
|
|
28
34
|
);
|
|
29
35
|
|
|
30
36
|
const rewrittenChildren = React.Children.map(children, (child) => {
|
|
31
37
|
if (React.isValidElement(child)) {
|
|
32
38
|
const childProps = {
|
|
33
39
|
...props,
|
|
34
|
-
className: cx([child.props.className, ...classNames]
|
|
40
|
+
className: cx([child.props.className, ...classNames], {
|
|
41
|
+
contained: parentIsContainer,
|
|
42
|
+
}),
|
|
35
43
|
style: { ...child.props.style, ...style },
|
|
36
44
|
};
|
|
37
45
|
return React.cloneElement(child, childProps);
|