@plone/volto 17.4.0 → 17.6.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 +29 -0
- package/README.md +0 -1
- package/locales/ca/LC_MESSAGES/volto.po +15 -10
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +15 -10
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +15 -10
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +15 -10
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +15 -10
- package/locales/eu.json +1 -1
- package/locales/fi/LC_MESSAGES/volto.po +15 -10
- package/locales/fi.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +15 -10
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +15 -10
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +15 -10
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +15 -10
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +15 -10
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +15 -10
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +15 -10
- package/locales/ro.json +1 -1
- package/locales/volto.pot +16 -11
- package/locales/zh_CN/LC_MESSAGES/volto.po +15 -10
- package/locales/zh_CN.json +1 -1
- package/package.json +4 -4
- package/packages/volto-slate/package.json +5 -5
- package/packages/volto-slate/src/blocks/Text/keyboard/joinBlocks.js +6 -3
- package/packages/volto-slate/src/editor/SlateEditor.jsx +3 -1
- package/packages/volto-slate/src/editor/plugins/Link/extensions.js +25 -20
- package/packages/volto-slate/src/slate-react.js +26 -0
- package/packages/volto-slate/src/utils/selection.js +7 -4
- package/razzle.config.js +3 -0
- package/src/components/manage/BlockChooser/BlockChooserSearch.jsx +5 -2
- package/src/components/manage/Blocks/Description/Edit.jsx +1 -1
- package/src/components/manage/Blocks/Title/Edit.jsx +1 -1
- package/src/components/manage/Contents/Contents.jsx +240 -164
- package/src/components/manage/TextLineEdit/TextLineEdit.jsx +1 -1
- package/src/components/theme/ContentMetadataTags/ContentMetadataTags.jsx +39 -46
- package/src/components/theme/Sitemap/Sitemap.jsx +40 -50
- package/src/helpers/Api/APIResourceWithAuth.js +1 -1
- package/theme/themes/pastanaga/elements/input.overrides +13 -2
- package/theme/themes/pastanaga/elements/input.variables +0 -3
- package/theme/themes/pastanaga/extras/blocks.less +17 -8
- package/theme/themes/pastanaga/extras/contents.less +1 -1
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
* Login container.
|
|
3
|
-
* @module components/theme/Sitemap/Sitemap
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import React, { Component } from 'react';
|
|
1
|
+
import { useEffect } from 'react';
|
|
7
2
|
import PropTypes from 'prop-types';
|
|
8
3
|
import { compose } from 'redux';
|
|
9
4
|
import { connect } from 'react-redux';
|
|
10
5
|
import { asyncConnect } from '@plone/volto/helpers';
|
|
11
6
|
import { defineMessages, injectIntl } from 'react-intl';
|
|
12
|
-
import { Container } from 'semantic-ui-react';
|
|
7
|
+
import { Container as SemanticContainer } from 'semantic-ui-react';
|
|
13
8
|
import { Helmet, toBackendLang } from '@plone/volto/helpers';
|
|
14
9
|
import { Link } from 'react-router-dom';
|
|
15
10
|
import config from '@plone/volto/registry';
|
|
@@ -30,38 +25,26 @@ export function getSitemapPath(pathname = '', lang) {
|
|
|
30
25
|
}
|
|
31
26
|
|
|
32
27
|
/**
|
|
33
|
-
* Sitemap
|
|
34
|
-
* @
|
|
35
|
-
* @
|
|
28
|
+
* Sitemap function component.
|
|
29
|
+
* @function Sitemap
|
|
30
|
+
* @param {Object} props - Component properties.
|
|
31
|
+
* @returns {JSX.Element} - Rendered component.
|
|
36
32
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
static propTypes = {
|
|
44
|
-
getNavigation: PropTypes.func.isRequired,
|
|
45
|
-
};
|
|
33
|
+
function Sitemap(props) {
|
|
34
|
+
const {
|
|
35
|
+
location: { pathname },
|
|
36
|
+
language,
|
|
37
|
+
getNavigation,
|
|
38
|
+
} = props;
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
useEffect(() => {
|
|
48
41
|
const { settings } = config;
|
|
42
|
+
const lang = settings.isMultilingual ? `${toBackendLang(language)}` : null;
|
|
43
|
+
const path = getSitemapPath(pathname, lang);
|
|
44
|
+
getNavigation(path, 4);
|
|
45
|
+
}, [pathname, language, getNavigation]);
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
? `${toBackendLang(this.props.lang)}`
|
|
52
|
-
: null;
|
|
53
|
-
|
|
54
|
-
const path = getSitemapPath(this.props.location.pathname, lang);
|
|
55
|
-
this.props.getNavigation(path, 4);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Render method.
|
|
60
|
-
* @method render
|
|
61
|
-
* @returns {string} Markup for the component.
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
renderItems = (items) => {
|
|
47
|
+
const renderItems = (items) => {
|
|
65
48
|
return (
|
|
66
49
|
<ul>
|
|
67
50
|
{items.map((item) => (
|
|
@@ -70,26 +53,35 @@ class Sitemap extends Component {
|
|
|
70
53
|
className={item.items?.length > 0 ? 'with-children' : ''}
|
|
71
54
|
>
|
|
72
55
|
<Link to={item.url}>{item.title}</Link>
|
|
73
|
-
{item.items &&
|
|
56
|
+
{item.items && renderItems(item.items)}
|
|
74
57
|
</li>
|
|
75
58
|
))}
|
|
76
59
|
</ul>
|
|
77
60
|
);
|
|
78
61
|
};
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
</
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
62
|
+
|
|
63
|
+
const Container =
|
|
64
|
+
config.getComponent({ name: 'Container' }).component || SemanticContainer;
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<div id="page-sitemap">
|
|
68
|
+
<Helmet title={props.intl.formatMessage(messages.Sitemap)} />
|
|
69
|
+
<Container className="view-wrapper">
|
|
70
|
+
<h1>{props.intl.formatMessage(messages.Sitemap)} </h1>
|
|
71
|
+
{props.items && renderItems(props.items)}
|
|
72
|
+
</Container>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
91
75
|
}
|
|
92
76
|
|
|
77
|
+
Sitemap.propTypes = {
|
|
78
|
+
getNavigation: PropTypes.func.isRequired,
|
|
79
|
+
location: PropTypes.object.isRequired,
|
|
80
|
+
intl: PropTypes.object.isRequired,
|
|
81
|
+
lang: PropTypes.string.isRequired,
|
|
82
|
+
items: PropTypes.array.isRequired,
|
|
83
|
+
};
|
|
84
|
+
|
|
93
85
|
export const __test__ = compose(
|
|
94
86
|
injectIntl,
|
|
95
87
|
connect(
|
|
@@ -116,14 +108,12 @@ export default compose(
|
|
|
116
108
|
promise: ({ location, store: { dispatch, getState } }) => {
|
|
117
109
|
if (!__SERVER__) return;
|
|
118
110
|
const { settings } = config;
|
|
119
|
-
|
|
120
111
|
const path = getSitemapPath(
|
|
121
112
|
location.pathname,
|
|
122
113
|
settings.isMultilingual
|
|
123
114
|
? toBackendLang(getState().intl.locale)
|
|
124
115
|
: null,
|
|
125
116
|
);
|
|
126
|
-
|
|
127
117
|
return dispatch(getNavigation(path, 4));
|
|
128
118
|
},
|
|
129
119
|
},
|
|
@@ -27,7 +27,7 @@ export const getAPIResourceWithAuth = (req) =>
|
|
|
27
27
|
apiPath = settings.apiPath;
|
|
28
28
|
}
|
|
29
29
|
const request = superagent
|
|
30
|
-
.get(`${apiPath}${APISUFIX}${req.path}`)
|
|
30
|
+
.get(`${apiPath}${__DEVELOPMENT__ ? '' : APISUFIX}${req.path}`)
|
|
31
31
|
.maxResponseSize(settings.maxResponseSize)
|
|
32
32
|
.responseType('blob');
|
|
33
33
|
const authToken = req.universalCookies.get('auth_token');
|
|
@@ -95,8 +95,19 @@ of an error is present, it overrides a default from SemanticUI grid definitions.
|
|
|
95
95
|
cursor: pointer;
|
|
96
96
|
text-align: initial;
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
&.clear-search-button {
|
|
99
|
+
//needed for focus
|
|
100
|
+
margin-left: 0.1em;
|
|
101
|
+
svg.icon {
|
|
102
|
+
margin: auto;
|
|
103
|
+
}
|
|
104
|
+
&:focus,
|
|
105
|
+
&:hover {
|
|
106
|
+
-webkit-box-shadow: none;
|
|
107
|
+
box-shadow: none;
|
|
108
|
+
color: @pink !important;
|
|
109
|
+
outline: 1px solid @pink;
|
|
110
|
+
}
|
|
100
111
|
}
|
|
101
112
|
}
|
|
102
113
|
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
// Pastanaga variable
|
|
10
10
|
@inputFontWeight: 300;
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
/*-------------------
|
|
14
13
|
Types
|
|
15
14
|
--------------------*/
|
|
@@ -20,7 +19,6 @@
|
|
|
20
19
|
|
|
21
20
|
/* Labeled Input */
|
|
22
21
|
|
|
23
|
-
|
|
24
22
|
/*-------------------
|
|
25
23
|
States
|
|
26
24
|
--------------------*/
|
|
@@ -35,7 +33,6 @@
|
|
|
35
33
|
|
|
36
34
|
/* Loader */
|
|
37
35
|
|
|
38
|
-
|
|
39
36
|
/*-------------------
|
|
40
37
|
Variations
|
|
41
38
|
--------------------*/
|
|
@@ -42,6 +42,15 @@
|
|
|
42
42
|
border-color: rgba(120, 192, 215, 0.75);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.block-editor-title,
|
|
46
|
+
.block-editor-slate,
|
|
47
|
+
.block-editor-slateTable,
|
|
48
|
+
.slate-editor.selected {
|
|
49
|
+
:focus-visible {
|
|
50
|
+
outline: none;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
.block .block:hover::before {
|
|
46
55
|
border-color: rgba(120, 192, 215, 0.375);
|
|
47
56
|
}
|
|
@@ -522,14 +531,6 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
|
|
|
522
531
|
}
|
|
523
532
|
}
|
|
524
533
|
|
|
525
|
-
.block .clear-search-button {
|
|
526
|
-
&:hover,
|
|
527
|
-
&:focus {
|
|
528
|
-
-webkit-box-shadow: none;
|
|
529
|
-
box-shadow: none;
|
|
530
|
-
color: #e40166 !important;
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
534
|
// .ui.basic.button.block-delete-button {
|
|
534
535
|
// top: 22px;
|
|
535
536
|
// right: 0;
|
|
@@ -783,6 +784,14 @@ body.has-toolbar.has-sidebar-collapsed .ui.wrapper > .ui.inner.block.full {
|
|
|
783
784
|
// reseting the default Accordion behavior
|
|
784
785
|
display: initial;
|
|
785
786
|
}
|
|
787
|
+
.ui.form .ui.input input {
|
|
788
|
+
//reset for semantic-ui outline:none
|
|
789
|
+
border-width: @1px;
|
|
790
|
+
border-color: transparent;
|
|
791
|
+
&:focus {
|
|
792
|
+
border-color: @focusedFormBorderColor;
|
|
793
|
+
}
|
|
794
|
+
}
|
|
786
795
|
}
|
|
787
796
|
|
|
788
797
|
.accordion-tools {
|