@plone/volto 17.8.0 → 17.9.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,20 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 17.9.0 (2024-01-04)
21
+
22
+ ### Feature
23
+
24
+ - Allow to opt out of the nested prefixed name build in the custom CSS properties style name generator if an object is found in the style wrapper object. @sneridagh [#5586](https://github.com/plone/volto/issues/5586)
25
+
26
+ ### Bugfix
27
+
28
+ - Refactoring the code for extraction of videoDetails from the video URL, adding code for extracting videoDetails from youtube video URLs with '/live/' in its URL which previously used to throw an error and adding jest tests for same. @IshaanDasgupta [#5416](https://github.com/plone/volto/issues/5416)
29
+
30
+ ### Internal
31
+
32
+ - Pin mrs-developer to latest version, not to star @sneridagh [#5593](https://github.com/plone/volto/issues/5593)
33
+
20
34
  ## 17.8.0 (2024-01-02)
21
35
 
22
36
  ### Feature
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "17.8.0",
12
+ "version": "17.9.0",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plone/volto-slate",
3
- "version": "17.8.0",
3
+ "version": "17.9.0",
4
4
  "description": "Slate.js integration with Volto",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -642,13 +642,21 @@ export const buildStyleObjectFromData = (obj = {}, prefix = '') => {
642
642
  // ...(() => {
643
643
  // if (isObject(v)) {
644
644
  // return Object.entries(
645
- // buildStyleObjectFromData(v, `${prefix}${k}--`),
645
+ // buildStyleObjectFromData(
646
+ // v,
647
+ // `${k.endsWith(':noprefix') ? '' : `${prefix}${k}--`}`,
648
+ // ),
646
649
  // );
647
650
  // }
648
651
  // return [styleDataToStyleObject(k, v, prefix)];
649
652
  // })(),
650
653
  ...(isObject(v)
651
- ? Object.entries(buildStyleObjectFromData(v, `${prefix}${k}--`))
654
+ ? Object.entries(
655
+ buildStyleObjectFromData(
656
+ v,
657
+ `${k.endsWith(':noprefix') ? '' : `${prefix}${k}--`}`, // We don't add a prefix if the key ends with the marker suffix
658
+ ),
659
+ )
652
660
  : [styleDataToStyleObject(k, v, prefix)]),
653
661
  ],
654
662
  [],
@@ -1123,6 +1123,26 @@ describe('Blocks', () => {
1123
1123
  '--nested--level2--foo': '#fff',
1124
1124
  });
1125
1125
  });
1126
+
1127
+ it('Supports multiple nested levels and optional inclusion of the name of the level', () => {
1128
+ const styles = {
1129
+ '--color': 'red',
1130
+ backgroundColor: '#AABBCC',
1131
+ 'nested:noprefix': {
1132
+ l1: 'white',
1133
+ '--foo': 'white',
1134
+ level2: {
1135
+ '--foo': '#fff',
1136
+ bar: '#000',
1137
+ },
1138
+ },
1139
+ };
1140
+ expect(buildStyleObjectFromData(styles)).toEqual({
1141
+ '--color': 'red',
1142
+ '--foo': 'white',
1143
+ '--level2--foo': '#fff',
1144
+ });
1145
+ });
1126
1146
  });
1127
1147
 
1128
1148
  describe('getPreviousNextBlock', () => {