@plone/volto 16.11.0 → 16.12.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 +11 -5
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +19 -0
- package/locales/ca/LC_MESSAGES/volto.po +1 -0
- package/locales/de/LC_MESSAGES/volto.po +1 -0
- package/locales/en/LC_MESSAGES/volto.po +1 -0
- package/locales/es/LC_MESSAGES/volto.po +1 -0
- package/locales/eu/LC_MESSAGES/volto.po +1 -0
- package/locales/fi/LC_MESSAGES/volto.po +1 -0
- package/locales/fr/LC_MESSAGES/volto.po +1 -0
- package/locales/it/LC_MESSAGES/volto.po +1 -0
- package/locales/ja/LC_MESSAGES/volto.po +1 -0
- package/locales/nl/LC_MESSAGES/volto.po +1 -0
- package/locales/pt/LC_MESSAGES/volto.po +1 -0
- package/locales/pt_BR/LC_MESSAGES/volto.po +1 -0
- package/locales/ro/LC_MESSAGES/volto.po +1 -0
- package/locales/volto.pot +2 -1
- package/locales/zh_CN/LC_MESSAGES/volto.po +1 -0
- package/package.json +1 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/editor/plugins/Link/render.jsx +6 -2
- package/src/components/manage/Blocks/Image/Edit.jsx +9 -1
- package/src/components/manage/Contents/Contents.jsx +1 -1
- package/src/components/manage/Form/Form.jsx +2 -1
- package/src/components/manage/Multilingual/TranslationObject.jsx +2 -1
- package/src/components/manage/Widgets/CheckboxWidget.jsx +2 -2
- package/src/components/manage/Widgets/FileWidget.jsx +3 -1
- package/src/components/manage/Widgets/ImageSizeWidget.jsx +4 -4
- package/src/components/manage/Widgets/PasswordWidget.jsx +2 -1
- package/src/components/manage/Widgets/TextWidget.jsx +2 -1
- package/src/components/manage/Widgets/TextareaWidget.jsx +2 -2
package/.changelog.draft
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
## 16.
|
|
1
|
+
## 16.12.0 (2023-02-21)
|
|
2
2
|
|
|
3
3
|
### Feature
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- Add scss support in core @sneridagh [#4383](https://github.com/plone/volto/issues/4383)
|
|
7
|
-
- Use open in new tab setting for link types. @robgietema [#4384](https://github.com/plone/volto/issues/4384)
|
|
5
|
+
- Provide disabled props to all widgets, and pass disabled props in to babel views. @iFlameing [#4396](https://github.com/plone/volto/issues/4396)
|
|
8
6
|
|
|
9
7
|
### Bugfix
|
|
10
8
|
|
|
11
|
-
-
|
|
9
|
+
- fix : Restrictive propTypes for widgets . @suman9893 [#4150](https://github.com/plone/volto/issues/4150)
|
|
10
|
+
- Add the intl string 'Uploading image' to the image block @bipoza [#4180](https://github.com/plone/volto/issues/4180)
|
|
11
|
+
- Fix link integrity overlay is too narrowed @iFlameing [#4399](https://github.com/plone/volto/issues/4399)
|
|
12
|
+
- Fix External link Icon shows up in Grid-text block @iRohitSingh [#4400](https://github.com/plone/volto/issues/4400)
|
|
13
|
+
- Fix broken links: babeljs.io/… @ksuess [#4414](https://github.com/plone/volto/issues/4414)
|
|
14
|
+
|
|
15
|
+
### Documentation
|
|
16
|
+
|
|
17
|
+
- Remove inclusion of CHANGELOG.md for volto repo only. Fixes https://github.com/plone/documentation/issues/1431. @stevepiercy [#4404](https://github.com/plone/volto/issues/4404)
|
|
12
18
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- towncrier release notes start -->
|
|
10
10
|
|
|
11
|
+
## 16.12.0 (2023-02-21)
|
|
12
|
+
|
|
13
|
+
### Feature
|
|
14
|
+
|
|
15
|
+
- Provide disabled props to all widgets, and pass disabled props in to babel views. @iFlameing [#4396](https://github.com/plone/volto/issues/4396)
|
|
16
|
+
|
|
17
|
+
### Bugfix
|
|
18
|
+
|
|
19
|
+
- fix : Restrictive propTypes for widgets . @suman9893 [#4150](https://github.com/plone/volto/issues/4150)
|
|
20
|
+
- Add the intl string 'Uploading image' to the image block @bipoza [#4180](https://github.com/plone/volto/issues/4180)
|
|
21
|
+
- Fix link integrity overlay is too narrowed @iFlameing [#4399](https://github.com/plone/volto/issues/4399)
|
|
22
|
+
- Fix External link Icon shows up in Grid-text block @iRohitSingh [#4400](https://github.com/plone/volto/issues/4400)
|
|
23
|
+
- Fix broken links: babeljs.io/… @ksuess [#4414](https://github.com/plone/volto/issues/4414)
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
- Remove inclusion of CHANGELOG.md for volto repo only. Fixes https://github.com/plone/documentation/issues/1431. @stevepiercy [#4404](https://github.com/plone/volto/issues/4404)
|
|
28
|
+
|
|
29
|
+
|
|
11
30
|
## 16.11.0 (2023-02-13)
|
|
12
31
|
|
|
13
32
|
### Feature
|
|
@@ -3684,6 +3684,7 @@ msgid "Uploading files"
|
|
|
3684
3684
|
msgstr "Carregant fitxers"
|
|
3685
3685
|
|
|
3686
3686
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3687
|
+
#: components/manage/Blocks/Image/Edit
|
|
3687
3688
|
# defaultMessage: Uploading image
|
|
3688
3689
|
msgid "Uploading image"
|
|
3689
3690
|
msgstr "S'està carregant la imatge"
|
|
@@ -3681,6 +3681,7 @@ msgid "Uploading files"
|
|
|
3681
3681
|
msgstr "Dateien hochladen"
|
|
3682
3682
|
|
|
3683
3683
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3684
|
+
#: components/manage/Blocks/Image/Edit
|
|
3684
3685
|
# defaultMessage: Uploading image
|
|
3685
3686
|
msgid "Uploading image"
|
|
3686
3687
|
msgstr "Bild hochladen"
|
|
@@ -3686,6 +3686,7 @@ msgid "Uploading files"
|
|
|
3686
3686
|
msgstr "Cargando archivos"
|
|
3687
3687
|
|
|
3688
3688
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3689
|
+
#: components/manage/Blocks/Image/Edit
|
|
3689
3690
|
# defaultMessage: Uploading image
|
|
3690
3691
|
msgid "Uploading image"
|
|
3691
3692
|
msgstr "Cargando imagen"
|
|
@@ -3682,6 +3682,7 @@ msgid "Uploading files"
|
|
|
3682
3682
|
msgstr "Fitxategiak kargatzen"
|
|
3683
3683
|
|
|
3684
3684
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3685
|
+
#: components/manage/Blocks/Image/Edit
|
|
3685
3686
|
# defaultMessage: Uploading image
|
|
3686
3687
|
msgid "Uploading image"
|
|
3687
3688
|
msgstr "Irudia kargatzen"
|
|
@@ -3686,6 +3686,7 @@ msgid "Uploading files"
|
|
|
3686
3686
|
msgstr "Lähetetään tiedostoja"
|
|
3687
3687
|
|
|
3688
3688
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3689
|
+
#: components/manage/Blocks/Image/Edit
|
|
3689
3690
|
# defaultMessage: Uploading image
|
|
3690
3691
|
msgid "Uploading image"
|
|
3691
3692
|
msgstr "Kuvaa ladataan"
|
|
@@ -3692,6 +3692,7 @@ msgid "Uploading files"
|
|
|
3692
3692
|
msgstr "Téléchargement de fichiers"
|
|
3693
3693
|
|
|
3694
3694
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3695
|
+
#: components/manage/Blocks/Image/Edit
|
|
3695
3696
|
# defaultMessage: Uploading image
|
|
3696
3697
|
msgid "Uploading image"
|
|
3697
3698
|
msgstr "Chargement de l'image"
|
|
@@ -3675,6 +3675,7 @@ msgid "Uploading files"
|
|
|
3675
3675
|
msgstr "Caricamento dei files"
|
|
3676
3676
|
|
|
3677
3677
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3678
|
+
#: components/manage/Blocks/Image/Edit
|
|
3678
3679
|
# defaultMessage: Uploading image
|
|
3679
3680
|
msgid "Uploading image"
|
|
3680
3681
|
msgstr "Caricamento dell'immagine"
|
|
@@ -3682,6 +3682,7 @@ msgid "Uploading files"
|
|
|
3682
3682
|
msgstr "Bestanden aan het uploaden"
|
|
3683
3683
|
|
|
3684
3684
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3685
|
+
#: components/manage/Blocks/Image/Edit
|
|
3685
3686
|
# defaultMessage: Uploading image
|
|
3686
3687
|
msgid "Uploading image"
|
|
3687
3688
|
msgstr "Afbeelding aan het uploaden"
|
|
@@ -3685,6 +3685,7 @@ msgid "Uploading files"
|
|
|
3685
3685
|
msgstr "Enviando arquivos"
|
|
3686
3686
|
|
|
3687
3687
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3688
|
+
#: components/manage/Blocks/Image/Edit
|
|
3688
3689
|
# defaultMessage: Uploading image
|
|
3689
3690
|
msgid "Uploading image"
|
|
3690
3691
|
msgstr "Enviando imagem"
|
|
@@ -3675,6 +3675,7 @@ msgid "Uploading files"
|
|
|
3675
3675
|
msgstr "Încărcarea fișierelor"
|
|
3676
3676
|
|
|
3677
3677
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3678
|
+
#: components/manage/Blocks/Image/Edit
|
|
3678
3679
|
# defaultMessage: Uploading image
|
|
3679
3680
|
msgid "Uploading image"
|
|
3680
3681
|
msgstr "Se încarcă imaginea"
|
package/locales/volto.pot
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
msgid ""
|
|
2
2
|
msgstr ""
|
|
3
3
|
"Project-Id-Version: Plone\n"
|
|
4
|
-
"POT-Creation-Date:
|
|
4
|
+
"POT-Creation-Date: 2023-02-21T12:55:20.886Z\n"
|
|
5
5
|
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
6
6
|
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
|
|
7
7
|
"MIME-Version: 1.0\n"
|
|
@@ -3677,6 +3677,7 @@ msgid "Uploading files"
|
|
|
3677
3677
|
msgstr ""
|
|
3678
3678
|
|
|
3679
3679
|
#: components/manage/Blocks/HeroImageLeft/Edit
|
|
3680
|
+
#: components/manage/Blocks/Image/Edit
|
|
3680
3681
|
# defaultMessage: Uploading image
|
|
3681
3682
|
msgid "Uploading image"
|
|
3682
3683
|
msgstr ""
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UniversalLink } from '@plone/volto/components';
|
|
3
3
|
import config from '@plone/volto/registry';
|
|
4
|
-
import { isInternalURL } from '@plone/volto/helpers';
|
|
4
|
+
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
5
5
|
|
|
6
6
|
const ViewLink = ({ url, target, download, children }) => {
|
|
7
7
|
const { openExternalLinkInNewTab } = config.settings;
|
|
@@ -27,7 +27,11 @@ export const LinkElement = (props) => {
|
|
|
27
27
|
<a
|
|
28
28
|
{...attributes}
|
|
29
29
|
className="slate-editor-link"
|
|
30
|
-
href={
|
|
30
|
+
href={
|
|
31
|
+
isInternalURL(element.data?.url)
|
|
32
|
+
? flattenToAppURL(element.data?.url)
|
|
33
|
+
: element.data?.url
|
|
34
|
+
}
|
|
31
35
|
onClick={(e) => e.preventDefault()}
|
|
32
36
|
>
|
|
33
37
|
{Array.isArray(children)
|
|
@@ -36,6 +36,10 @@ const messages = defineMessages({
|
|
|
36
36
|
id: 'Browse the site, drop an image, or type an URL',
|
|
37
37
|
defaultMessage: 'Browse the site, drop an image, or type an URL',
|
|
38
38
|
},
|
|
39
|
+
uploadingImage: {
|
|
40
|
+
id: 'Uploading image',
|
|
41
|
+
defaultMessage: 'Uploading image',
|
|
42
|
+
},
|
|
39
43
|
});
|
|
40
44
|
|
|
41
45
|
/**
|
|
@@ -288,7 +292,11 @@ class Edit extends Component {
|
|
|
288
292
|
{this.state.dragging && <Dimmer active></Dimmer>}
|
|
289
293
|
{this.state.uploading && (
|
|
290
294
|
<Dimmer active>
|
|
291
|
-
<Loader indeterminate>
|
|
295
|
+
<Loader indeterminate>
|
|
296
|
+
{this.props.intl.formatMessage(
|
|
297
|
+
messages.uploadingImage,
|
|
298
|
+
)}
|
|
299
|
+
</Loader>
|
|
292
300
|
</Dimmer>
|
|
293
301
|
)}
|
|
294
302
|
<div className="no-image-wrapper">
|
|
@@ -645,7 +645,7 @@ class Form extends Component {
|
|
|
645
645
|
error={keys(this.state.errors).length > 0}
|
|
646
646
|
className={settings.verticalFormTabs ? 'vertical-form' : ''}
|
|
647
647
|
>
|
|
648
|
-
<fieldset className="invisible"
|
|
648
|
+
<fieldset className="invisible">
|
|
649
649
|
<Segment.Group raised>
|
|
650
650
|
{schema && schema.fieldsets.length > 1 && (
|
|
651
651
|
<>
|
|
@@ -682,6 +682,7 @@ class Form extends Component {
|
|
|
682
682
|
...map(item.fields, (field, index) => (
|
|
683
683
|
<Field
|
|
684
684
|
{...schema.properties[field]}
|
|
685
|
+
isDisabled={!this.props.editable}
|
|
685
686
|
id={field}
|
|
686
687
|
formData={this.state.formData}
|
|
687
688
|
fieldSet={item.title.toLowerCase()}
|
|
@@ -123,7 +123,7 @@ const TranslationObject = ({
|
|
|
123
123
|
)}
|
|
124
124
|
{activeMenu === 'properties' && (
|
|
125
125
|
<UiForm method="post" onSubmit={() => {}}>
|
|
126
|
-
<fieldset className="invisible"
|
|
126
|
+
<fieldset className="invisible">
|
|
127
127
|
{schema &&
|
|
128
128
|
map(schema.fieldsets, (item) => [
|
|
129
129
|
<Segment secondary attached key={item.title}>
|
|
@@ -133,6 +133,7 @@ const TranslationObject = ({
|
|
|
133
133
|
{map(item.fields, (field, index) => (
|
|
134
134
|
<Field
|
|
135
135
|
{...schema.properties[field]}
|
|
136
|
+
isDisabled={true}
|
|
136
137
|
id={field}
|
|
137
138
|
formData={translationObject}
|
|
138
139
|
focus={false}
|
|
@@ -51,8 +51,8 @@ const CheckboxWidget = (props) => {
|
|
|
51
51
|
*/
|
|
52
52
|
CheckboxWidget.propTypes = {
|
|
53
53
|
id: PropTypes.string.isRequired,
|
|
54
|
-
title: PropTypes.string.isRequired,
|
|
55
|
-
description: PropTypes.string,
|
|
54
|
+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
|
|
55
|
+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
|
|
56
56
|
required: PropTypes.bool,
|
|
57
57
|
error: PropTypes.arrayOf(PropTypes.string),
|
|
58
58
|
value: PropTypes.bool,
|
|
@@ -71,7 +71,7 @@ const messages = defineMessages({
|
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
73
|
const FileWidget = (props) => {
|
|
74
|
-
const { id, value, onChange } = props;
|
|
74
|
+
const { id, value, onChange, isDisabled } = props;
|
|
75
75
|
const [fileType, setFileType] = React.useState(false);
|
|
76
76
|
const intl = useIntl();
|
|
77
77
|
|
|
@@ -163,6 +163,7 @@ const FileWidget = (props) => {
|
|
|
163
163
|
id={`field-${id}`}
|
|
164
164
|
name={id}
|
|
165
165
|
type="file"
|
|
166
|
+
disabled={isDisabled}
|
|
166
167
|
/>
|
|
167
168
|
</div>
|
|
168
169
|
)}
|
|
@@ -175,6 +176,7 @@ const FileWidget = (props) => {
|
|
|
175
176
|
basic
|
|
176
177
|
className="delete-button"
|
|
177
178
|
aria-label="delete file"
|
|
179
|
+
disabled={isDisabled}
|
|
178
180
|
onClick={() => {
|
|
179
181
|
onChange(id, null);
|
|
180
182
|
setFileType(false);
|
|
@@ -20,7 +20,7 @@ const messages = defineMessages({
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const ImageSizeWidget = (props) => {
|
|
23
|
-
const { onChange, id, disabled, intl, value } = props;
|
|
23
|
+
const { onChange, id, disabled, intl, value, isDisabled } = props;
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
26
|
<FormFieldWrapper {...props}>
|
|
@@ -34,7 +34,7 @@ const ImageSizeWidget = (props) => {
|
|
|
34
34
|
aria-label={intl.formatMessage(messages.small)}
|
|
35
35
|
onClick={() => onChange(id, 's')}
|
|
36
36
|
active={value === 's'}
|
|
37
|
-
disabled={disabled}
|
|
37
|
+
disabled={disabled || isDisabled}
|
|
38
38
|
>
|
|
39
39
|
<div className="image-sizes-text">S</div>
|
|
40
40
|
</Button>
|
|
@@ -46,7 +46,7 @@ const ImageSizeWidget = (props) => {
|
|
|
46
46
|
aria-label={intl.formatMessage(messages.medium)}
|
|
47
47
|
onClick={() => onChange(id, 'm')}
|
|
48
48
|
active={value === 'm'}
|
|
49
|
-
disabled={disabled}
|
|
49
|
+
disabled={disabled || isDisabled}
|
|
50
50
|
>
|
|
51
51
|
<div className="image-sizes-text">M</div>
|
|
52
52
|
</Button>
|
|
@@ -58,7 +58,7 @@ const ImageSizeWidget = (props) => {
|
|
|
58
58
|
aria-label={intl.formatMessage(messages.large)}
|
|
59
59
|
onClick={() => onChange(id, 'l')}
|
|
60
60
|
active={value === 'l' || value === undefined}
|
|
61
|
-
disabled={disabled}
|
|
61
|
+
disabled={disabled || isDisabled}
|
|
62
62
|
>
|
|
63
63
|
<div className="image-sizes-text">L</div>
|
|
64
64
|
</Button>
|
|
@@ -31,6 +31,7 @@ const PasswordWidget = (props) => {
|
|
|
31
31
|
minLength,
|
|
32
32
|
maxLength,
|
|
33
33
|
placeholder,
|
|
34
|
+
isDisabled,
|
|
34
35
|
} = props;
|
|
35
36
|
|
|
36
37
|
return (
|
|
@@ -39,7 +40,7 @@ const PasswordWidget = (props) => {
|
|
|
39
40
|
id={`field-${id}`}
|
|
40
41
|
name={id}
|
|
41
42
|
type="password"
|
|
42
|
-
disabled={
|
|
43
|
+
disabled={isDisabled}
|
|
43
44
|
value={value || ''}
|
|
44
45
|
placeholder={placeholder}
|
|
45
46
|
onChange={({ target }) =>
|
|
@@ -97,6 +97,7 @@ class TextWidget extends Component {
|
|
|
97
97
|
minLength,
|
|
98
98
|
maxLength,
|
|
99
99
|
placeholder,
|
|
100
|
+
isDisabled,
|
|
100
101
|
} = this.props;
|
|
101
102
|
|
|
102
103
|
return (
|
|
@@ -105,7 +106,7 @@ class TextWidget extends Component {
|
|
|
105
106
|
id={`field-${id}`}
|
|
106
107
|
name={id}
|
|
107
108
|
value={value || ''}
|
|
108
|
-
disabled={
|
|
109
|
+
disabled={isDisabled}
|
|
109
110
|
icon={icon || null}
|
|
110
111
|
placeholder={placeholder}
|
|
111
112
|
onChange={({ target }) =>
|
|
@@ -23,7 +23,7 @@ import { FormFieldWrapper } from '@plone/volto/components';
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
const TextareaWidget = (props) => {
|
|
26
|
-
const { id, maxLength, value, onChange, placeholder } = props;
|
|
26
|
+
const { id, maxLength, value, onChange, placeholder, isDisabled } = props;
|
|
27
27
|
const [lengthError, setlengthError] = useState('');
|
|
28
28
|
|
|
29
29
|
const onhandleChange = (id, value) => {
|
|
@@ -44,7 +44,7 @@ const TextareaWidget = (props) => {
|
|
|
44
44
|
id={`field-${id}`}
|
|
45
45
|
name={id}
|
|
46
46
|
value={value || ''}
|
|
47
|
-
disabled={
|
|
47
|
+
disabled={isDisabled}
|
|
48
48
|
placeholder={placeholder}
|
|
49
49
|
onChange={({ target }) =>
|
|
50
50
|
onhandleChange(id, target.value === '' ? undefined : target.value)
|