@kitconcept/volto-light-theme 3.3.0 → 3.3.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/.changelog.draft +2 -7
- package/.release-it.json +2 -1
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/components/Blocks/Image/Edit.jsx +19 -12
package/.changelog.draft
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
## 3.3.
|
|
2
|
-
|
|
3
|
-
### Feature
|
|
4
|
-
|
|
5
|
-
- Make font-weights, font-sizes and font-heights overrideable adding the `!default` thingy @erral [#371](https://github.com/kitconcept/volto-light-theme/pull/371)
|
|
1
|
+
## 3.3.1 (2024-05-30)
|
|
6
2
|
|
|
7
3
|
### Bugfix
|
|
8
4
|
|
|
9
|
-
- Fix
|
|
10
|
-
- Fix Image block in grid is not working @iRohitSingh [#376](https://github.com/kitconcept/volto-light-theme/pull/376)
|
|
5
|
+
- Fix image grid clossure issues in inlined JSX method when selecting an image after uploading another image in another grid element @sneridagh [#389](https://github.com/kitconcept/volto-light-theme/pull/389)
|
|
11
6
|
|
|
12
7
|
|
package/.release-it.json
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
"after:bump": [
|
|
4
4
|
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft",
|
|
5
5
|
"pipx run towncrier build --yes --version ${version}",
|
|
6
|
-
"cp ../../README.md ./ && cp CHANGELOG.md ../../CHANGELOG.md"
|
|
6
|
+
"cp ../../README.md ./ && cp CHANGELOG.md ../../CHANGELOG.md",
|
|
7
|
+
"git add ../../CHANGELOG.md"
|
|
7
8
|
],
|
|
8
9
|
"after:release": "rm .changelog.draft"
|
|
9
10
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 3.3.1 (2024-05-30)
|
|
12
|
+
|
|
13
|
+
### Bugfix
|
|
14
|
+
|
|
15
|
+
- Fix image grid clossure issues in inlined JSX method when selecting an image after uploading another image in another grid element @sneridagh [#389](https://github.com/kitconcept/volto-light-theme/pull/389)
|
|
16
|
+
|
|
11
17
|
## 3.3.0 (2024-04-26)
|
|
12
18
|
|
|
13
19
|
### Feature
|
package/package.json
CHANGED
|
@@ -240,6 +240,23 @@ class Edit extends Component {
|
|
|
240
240
|
|
|
241
241
|
node = React.createRef();
|
|
242
242
|
|
|
243
|
+
// START CUSTOMIZATION - Add custom dataAdapter
|
|
244
|
+
// It has to be a class method because if used directly we have closure issues while
|
|
245
|
+
// passing arguments to the dataAdapter function
|
|
246
|
+
onSelectItem = (url, item) => {
|
|
247
|
+
const dataAdapter =
|
|
248
|
+
this.props.blocksConfig[this.props.data['@type']].dataAdapter;
|
|
249
|
+
dataAdapter({
|
|
250
|
+
block: this.props.block,
|
|
251
|
+
data: this.props.data,
|
|
252
|
+
onChangeBlock: this.props.onChangeBlock,
|
|
253
|
+
id: 'url',
|
|
254
|
+
value: url,
|
|
255
|
+
item,
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
// END CUSTOMIZATION - Add custom dataAdapter
|
|
259
|
+
|
|
243
260
|
/**
|
|
244
261
|
* Render method.
|
|
245
262
|
* @method render
|
|
@@ -247,11 +264,10 @@ class Edit extends Component {
|
|
|
247
264
|
*/
|
|
248
265
|
render() {
|
|
249
266
|
const Image = config.getComponent({ name: 'Image' }).component;
|
|
250
|
-
const {
|
|
267
|
+
const { data } = this.props;
|
|
251
268
|
const placeholder =
|
|
252
269
|
this.props.data.placeholder ||
|
|
253
270
|
this.props.intl.formatMessage(messages.ImageBlockInputPlaceholder);
|
|
254
|
-
const dataAdapter = this.props.blocksConfig[data['@type']].dataAdapter;
|
|
255
271
|
|
|
256
272
|
return (
|
|
257
273
|
<div
|
|
@@ -365,16 +381,7 @@ class Edit extends Component {
|
|
|
365
381
|
e.stopPropagation();
|
|
366
382
|
e.preventDefault();
|
|
367
383
|
this.props.openObjectBrowser({
|
|
368
|
-
onSelectItem:
|
|
369
|
-
dataAdapter({
|
|
370
|
-
block,
|
|
371
|
-
data,
|
|
372
|
-
onChangeBlock,
|
|
373
|
-
id: 'url',
|
|
374
|
-
value: url,
|
|
375
|
-
item,
|
|
376
|
-
});
|
|
377
|
-
},
|
|
384
|
+
onSelectItem: this.onSelectItem,
|
|
378
385
|
});
|
|
379
386
|
}}
|
|
380
387
|
>
|