@plone/volto 16.10.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 +8 -8
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +32 -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 +9 -1
- package/packages/volto-slate/package.json +1 -1
- package/packages/volto-slate/src/editor/plugins/Link/render.jsx +11 -2
- package/razzle.config.js +1 -0
- 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/Toolbar/Toolbar.jsx +1 -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/src/components/theme/Navigation/NavItem.jsx +1 -0
- package/src/components/theme/View/LinkView.jsx +8 -1
- package/src/config/index.js +1 -0
package/.changelog.draft
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
## 16.
|
|
1
|
+
## 16.12.0 (2023-02-21)
|
|
2
2
|
|
|
3
3
|
### Feature
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- Add option to add an action button to the top of the toolbar and to add a menu button to the bottom of the toolbar. @ksuess [#4333](https://github.com/plone/volto/issues/4333)
|
|
7
|
-
- Update to latest versions in the backend for testing and the convenience api folder @sneridagh [#4361](https://github.com/plone/volto/issues/4361)
|
|
8
|
-
- Content Rules: Support server-provided schema for condition and action @ericof [#4368](https://github.com/plone/volto/issues/4368)
|
|
5
|
+
- Provide disabled props to all widgets, and pass disabled props in to babel views. @iFlameing [#4396](https://github.com/plone/volto/issues/4396)
|
|
9
6
|
|
|
10
7
|
### Bugfix
|
|
11
8
|
|
|
12
|
-
-
|
|
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)
|
|
13
14
|
|
|
14
15
|
### Documentation
|
|
15
16
|
|
|
16
|
-
-
|
|
17
|
-
- Fixed Grammar error @SaiRev0 [#4272](https://github.com/plone/volto/issues/4272)
|
|
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)
|
|
18
18
|
|
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,38 @@
|
|
|
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
|
+
|
|
30
|
+
## 16.11.0 (2023-02-13)
|
|
31
|
+
|
|
32
|
+
### Feature
|
|
33
|
+
|
|
34
|
+
- Add open external link in a new tab config option. @robgietema [#4379](https://github.com/plone/volto/issues/4379)
|
|
35
|
+
- Add scss support in core @sneridagh [#4383](https://github.com/plone/volto/issues/4383)
|
|
36
|
+
- Use open in new tab setting for link types. @robgietema [#4384](https://github.com/plone/volto/issues/4384)
|
|
37
|
+
|
|
38
|
+
### Bugfix
|
|
39
|
+
|
|
40
|
+
- Fix Cannot read properties of undefined (reading 'translations') @avoinea [#4377](https://github.com/plone/volto/issues/4377)
|
|
41
|
+
|
|
42
|
+
|
|
11
43
|
## 16.10.0 (2023-02-06)
|
|
12
44
|
|
|
13
45
|
### 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
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "16.
|
|
12
|
+
"version": "16.12.0",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -137,6 +137,12 @@
|
|
|
137
137
|
"stylelint-prettier"
|
|
138
138
|
],
|
|
139
139
|
"overrides": [
|
|
140
|
+
{
|
|
141
|
+
"files": [
|
|
142
|
+
"**/*.scss"
|
|
143
|
+
],
|
|
144
|
+
"customSyntax": "postcss-scss"
|
|
145
|
+
},
|
|
140
146
|
{
|
|
141
147
|
"files": [
|
|
142
148
|
"**/*.less"
|
|
@@ -316,6 +322,7 @@
|
|
|
316
322
|
"postcss-load-config": "3.1.4",
|
|
317
323
|
"postcss-loader": "4.3.0",
|
|
318
324
|
"postcss-overrides": "3.1.4",
|
|
325
|
+
"postcss-scss": "4.0.6",
|
|
319
326
|
"prepend-http": "2",
|
|
320
327
|
"prettier": "2.0.5",
|
|
321
328
|
"pretty-bytes": "5.3.0",
|
|
@@ -326,6 +333,7 @@
|
|
|
326
333
|
"razzle": "4.2.17",
|
|
327
334
|
"razzle-dev-utils": "4.2.17",
|
|
328
335
|
"razzle-plugin-bundle-analyzer": "4.2.17",
|
|
336
|
+
"razzle-plugin-scss": "4.2.18",
|
|
329
337
|
"rc-time-picker": "3.7.3",
|
|
330
338
|
"react": "17.0.2",
|
|
331
339
|
"react-anchor-link-smooth-scroll": "1.0.12",
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UniversalLink } from '@plone/volto/components';
|
|
3
|
+
import config from '@plone/volto/registry';
|
|
4
|
+
import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
3
5
|
|
|
4
6
|
const ViewLink = ({ url, target, download, children }) => {
|
|
7
|
+
const { openExternalLinkInNewTab } = config.settings;
|
|
5
8
|
return (
|
|
6
9
|
<UniversalLink
|
|
7
10
|
href={url}
|
|
8
|
-
openLinkInNewTab={
|
|
11
|
+
openLinkInNewTab={
|
|
12
|
+
(openExternalLinkInNewTab && !isInternalURL(url)) || target === '_blank'
|
|
13
|
+
}
|
|
9
14
|
download={download}
|
|
10
15
|
>
|
|
11
16
|
{children}
|
|
@@ -22,7 +27,11 @@ export const LinkElement = (props) => {
|
|
|
22
27
|
<a
|
|
23
28
|
{...attributes}
|
|
24
29
|
className="slate-editor-link"
|
|
25
|
-
href={
|
|
30
|
+
href={
|
|
31
|
+
isInternalURL(element.data?.url)
|
|
32
|
+
? flattenToAppURL(element.data?.url)
|
|
33
|
+
: element.data?.url
|
|
34
|
+
}
|
|
26
35
|
onClick={(e) => e.preventDefault()}
|
|
27
36
|
>
|
|
28
37
|
{Array.isArray(children)
|
package/razzle.config.js
CHANGED
|
@@ -330,6 +330,7 @@ const defaultPlugins = [
|
|
|
330
330
|
{ object: require('./webpack-plugins/webpack-svg-plugin') },
|
|
331
331
|
{ object: require('./webpack-plugins/webpack-bundle-analyze-plugin') },
|
|
332
332
|
{ object: require('./jest-extender-plugin') },
|
|
333
|
+
'scss',
|
|
333
334
|
];
|
|
334
335
|
|
|
335
336
|
const plugins = addonExtenders.reduce(
|
|
@@ -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}
|
|
@@ -510,7 +510,7 @@ class Toolbar extends Component {
|
|
|
510
510
|
((this.props.content.is_folderish &&
|
|
511
511
|
this.props.types.length > 0) ||
|
|
512
512
|
(config.settings.isMultilingual &&
|
|
513
|
-
this.props.content['@components']
|
|
513
|
+
this.props.content['@components']?.translations)) && (
|
|
514
514
|
<button
|
|
515
515
|
className="add"
|
|
516
516
|
aria-label={this.props.intl.formatMessage(
|
|
@@ -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)
|
|
@@ -9,6 +9,7 @@ import { isInternalURL, flattenToAppURL } from '@plone/volto/helpers';
|
|
|
9
9
|
import { Container } from 'semantic-ui-react';
|
|
10
10
|
import { UniversalLink } from '@plone/volto/components';
|
|
11
11
|
import { FormattedMessage } from 'react-intl';
|
|
12
|
+
import config from '@plone/volto/registry';
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* View container class.
|
|
@@ -58,6 +59,7 @@ class LinkView extends Component {
|
|
|
58
59
|
*/
|
|
59
60
|
render() {
|
|
60
61
|
const { remoteUrl } = this.props.content;
|
|
62
|
+
const { openExternalLinkInNewTab } = config.settings;
|
|
61
63
|
return (
|
|
62
64
|
<Container id="page-document">
|
|
63
65
|
<h1 className="documentFirstHeading">{this.props.content.title}</h1>
|
|
@@ -72,7 +74,12 @@ class LinkView extends Component {
|
|
|
72
74
|
id="The link address is:"
|
|
73
75
|
defaultMessage="The link address is:"
|
|
74
76
|
/>{' '}
|
|
75
|
-
<UniversalLink
|
|
77
|
+
<UniversalLink
|
|
78
|
+
href={remoteUrl}
|
|
79
|
+
openLinkInNewTab={
|
|
80
|
+
openExternalLinkInNewTab && !isInternalURL(remoteUrl)
|
|
81
|
+
}
|
|
82
|
+
>
|
|
76
83
|
{flattenToAppURL(remoteUrl)}
|
|
77
84
|
</UniversalLink>
|
|
78
85
|
</p>
|
package/src/config/index.js
CHANGED
|
@@ -111,6 +111,7 @@ let config = {
|
|
|
111
111
|
downloadableObjects: ['File'], //list of content-types for which the direct download of the file will be carried out if the user is not authenticated
|
|
112
112
|
viewableInBrowserObjects: [], //ex: ['File']. List of content-types for which the file will be displayed in browser if the user is not authenticated
|
|
113
113
|
listingPreviewImageField: 'image', // deprecated from Volto 14 onwards
|
|
114
|
+
openExternalLinkInNewTab: false,
|
|
114
115
|
notSupportedBrowsers: ['ie'],
|
|
115
116
|
defaultPageSize: 25,
|
|
116
117
|
isMultilingual: false,
|