@plone/volto 19.1.3 → 19.1.4
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
|
+
## 19.1.4 (2026-06-11)
|
|
21
|
+
|
|
22
|
+
### Bugfix
|
|
23
|
+
|
|
24
|
+
- Fixed the Babel compare language toolbar button closing immediately after user clicks by treating the trigger and popup as one outside-click boundary. @sneridagh [#8323](https://github.com/plone/volto/issues/8323)
|
|
25
|
+
|
|
20
26
|
## 19.1.3 (2026-06-09)
|
|
21
27
|
|
|
22
28
|
### Bugfix
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "19.1.
|
|
12
|
+
"version": "19.1.4",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -177,9 +177,9 @@
|
|
|
177
177
|
"url": "^0.11.3",
|
|
178
178
|
"use-deep-compare-effect": "1.8.1",
|
|
179
179
|
"uuid": "^14.0.0",
|
|
180
|
-
"@plone/volto-slate": "19.0.2",
|
|
181
180
|
"@plone/registry": "3.0.1",
|
|
182
181
|
"@plone/components": "4.2.0",
|
|
182
|
+
"@plone/volto-slate": "19.0.2",
|
|
183
183
|
"@plone/scripts": "4.0.1"
|
|
184
184
|
},
|
|
185
185
|
"devDependencies": {
|
|
@@ -290,8 +290,8 @@
|
|
|
290
290
|
"webpack-node-externals": "3.0.0",
|
|
291
291
|
"@plone/babel-preset-razzle": "^1.0.1",
|
|
292
292
|
"@plone/razzle": "1.0.0",
|
|
293
|
-
"@plone/types": "2.0.0",
|
|
294
293
|
"@plone/razzle-dev-utils": "1.0.0",
|
|
294
|
+
"@plone/types": "2.0.0",
|
|
295
295
|
"@plone/volto-coresandbox": "1.0.0"
|
|
296
296
|
},
|
|
297
297
|
"scripts": {
|
|
@@ -28,19 +28,9 @@ const CompareLanguagesMenu = ({
|
|
|
28
28
|
}) => {
|
|
29
29
|
const intl = useIntl();
|
|
30
30
|
|
|
31
|
-
const ClickOutsideListener = () => {
|
|
32
|
-
closeMenu();
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const ref = useDetectClickOutside({
|
|
36
|
-
onTriggered: ClickOutsideListener,
|
|
37
|
-
triggerKeys: ['Escape'],
|
|
38
|
-
});
|
|
39
|
-
|
|
40
31
|
return (
|
|
41
32
|
<div
|
|
42
33
|
className="toolbar-content show compare-languages"
|
|
43
|
-
ref={ref}
|
|
44
34
|
style={{
|
|
45
35
|
flex: theToolbar.current
|
|
46
36
|
? `0 0 ${theToolbar.current.getBoundingClientRect().width}px`
|
|
@@ -106,6 +96,10 @@ const CompareLanguages = React.forwardRef((props, ref) => {
|
|
|
106
96
|
const intl = useIntl();
|
|
107
97
|
const [viewMenu, setViewMenu] = useState(false);
|
|
108
98
|
const translations = content?.['@components']?.translations?.items || [];
|
|
99
|
+
const compareLanguagesRef = useDetectClickOutside({
|
|
100
|
+
onTriggered: () => setViewMenu(false),
|
|
101
|
+
triggerKeys: ['Escape'],
|
|
102
|
+
});
|
|
109
103
|
|
|
110
104
|
const translationsObject = {};
|
|
111
105
|
translations.forEach((t) => {
|
|
@@ -114,19 +108,27 @@ const CompareLanguages = React.forwardRef((props, ref) => {
|
|
|
114
108
|
|
|
115
109
|
if (translations.length > 0) {
|
|
116
110
|
return (
|
|
117
|
-
<div
|
|
111
|
+
<div
|
|
112
|
+
className="toolbar-compare-translations-wrapper"
|
|
113
|
+
ref={compareLanguagesRef}
|
|
114
|
+
>
|
|
118
115
|
<div className="toolbar-button-spacer" />
|
|
119
116
|
|
|
120
117
|
<Button
|
|
118
|
+
type="button"
|
|
121
119
|
aria-label={intl.formatMessage(messages.compare_to)}
|
|
122
120
|
title={intl.formatMessage(messages.compare_to)}
|
|
123
121
|
onClick={() => {
|
|
124
|
-
setViewMenu(!viewMenu);
|
|
122
|
+
setViewMenu((viewMenu) => !viewMenu);
|
|
125
123
|
}}
|
|
126
124
|
id="toolbar-compare-translations"
|
|
127
125
|
className="toolbar-button-compare-translations"
|
|
128
126
|
>
|
|
129
|
-
<Icon
|
|
127
|
+
<Icon
|
|
128
|
+
className="mobile hidden"
|
|
129
|
+
name={viewMenu ? clearSVG : translateSVG}
|
|
130
|
+
size="30px"
|
|
131
|
+
/>
|
|
130
132
|
{viewMenu ? (
|
|
131
133
|
<Icon className="mobile only" name={clearSVG} size="30px" />
|
|
132
134
|
) : (
|
|
@@ -714,8 +714,16 @@ body:not(.has-sidebar):not(.has-sidebar-collapsed) {
|
|
|
714
714
|
.toolbar-compare-translations-wrapper {
|
|
715
715
|
position: relative;
|
|
716
716
|
|
|
717
|
-
.toolbar-button-compare-translations
|
|
718
|
-
|
|
717
|
+
.toolbar-button-compare-translations {
|
|
718
|
+
display: flex;
|
|
719
|
+
width: 42px;
|
|
720
|
+
height: 42px;
|
|
721
|
+
align-items: center;
|
|
722
|
+
justify-content: center;
|
|
723
|
+
|
|
724
|
+
.icon {
|
|
725
|
+
padding: 4px;
|
|
726
|
+
}
|
|
719
727
|
}
|
|
720
728
|
|
|
721
729
|
.compare-languages {
|