@plone/volto 18.0.0-alpha.29 → 18.0.0-alpha.30
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/.release-it.json +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +6 -6
- package/src/components/manage/Sidebar/SidebarPopup.jsx +24 -18
- package/src/components/manage/Widgets/FileWidget.jsx +1 -0
- package/src/components/theme/View/DefaultView.jsx +1 -2
- package/src/helpers/AsyncConnect/index.js +10 -0
- package/types/components/theme/View/DefaultView.d.ts +13 -5
- package/types/config/Views.d.ts +2 -3
- package/types/helpers/AsyncConnect/index.d.ts +11 -1
package/.release-it.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"../scripts/prepublish.js": {}
|
|
4
4
|
},
|
|
5
5
|
"hooks": {
|
|
6
|
-
"before:bump": ["pnpm i18n", "pnpm build:types"],
|
|
6
|
+
"before:bump": ["pnpm i18n", "pnpm build:types", "git add types"],
|
|
7
7
|
"after:bump": [
|
|
8
8
|
"pipx run towncrier build --draft --yes --version ${version} > .changelog.draft && pipx run towncrier build --yes --version ${version}",
|
|
9
9
|
"make copyreleasenotestodocs"
|
package/CHANGELOG.md
CHANGED
|
@@ -17,6 +17,20 @@ myst:
|
|
|
17
17
|
|
|
18
18
|
<!-- towncrier release notes start -->
|
|
19
19
|
|
|
20
|
+
## 18.0.0-alpha.30 (2024-05-02)
|
|
21
|
+
|
|
22
|
+
### Bugfix
|
|
23
|
+
|
|
24
|
+
- Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing [#5973](https://github.com/plone/volto/issues/5973)
|
|
25
|
+
- Defines the last 4 parameters of the `asyncConnect` function with optional. @wesleybl [#5985](https://github.com/plone/volto/issues/5985)
|
|
26
|
+
- Fix server side sidebar rendering @sneridagh [#5993](https://github.com/plone/volto/issues/5993)
|
|
27
|
+
|
|
28
|
+
### Internal
|
|
29
|
+
|
|
30
|
+
- Update to use Plone 6.0.11 @sneridagh [#5989](https://github.com/plone/volto/issues/5989)
|
|
31
|
+
- Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh [#5991](https://github.com/plone/volto/issues/5991)
|
|
32
|
+
- Cleaned up useless injectIntl in DefaultView @pnicolli [#5994](https://github.com/plone/volto/issues/5994)
|
|
33
|
+
|
|
20
34
|
## 18.0.0-alpha.29 (2024-04-26)
|
|
21
35
|
|
|
22
36
|
### Feature
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "18.0.0-alpha.
|
|
12
|
+
"version": "18.0.0-alpha.30",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git@github.com:plone/volto.git"
|
|
@@ -294,16 +294,16 @@
|
|
|
294
294
|
"cypress-file-upload": "5.0.8",
|
|
295
295
|
"deep-freeze": "0.0.1",
|
|
296
296
|
"eslint": "^8.57.0",
|
|
297
|
-
"eslint-config-prettier": "9.1.0",
|
|
298
|
-
"eslint-config-react-app": "7.0.1",
|
|
299
|
-
"eslint-import-resolver-alias": "1.1.2",
|
|
300
|
-
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
|
|
297
|
+
"eslint-config-prettier": "^9.1.0",
|
|
298
|
+
"eslint-config-react-app": "^7.0.1",
|
|
299
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
300
|
+
"eslint-import-resolver-babel-plugin-root-import": "^1.1.1",
|
|
301
301
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
302
302
|
"eslint-plugin-import": "^2.29.1",
|
|
303
303
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
304
304
|
"eslint-plugin-prettier": "^5.1.3",
|
|
305
305
|
"eslint-plugin-react": "^7.34.1",
|
|
306
|
-
"eslint-plugin-react-hooks": "4.6.0",
|
|
306
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
307
307
|
"full-icu": "1.4.0",
|
|
308
308
|
"html-webpack-plugin": "5.5.0",
|
|
309
309
|
"identity-obj-proxy": "3.0.0",
|
|
@@ -16,6 +16,11 @@ const SidebarPopup = (props) => {
|
|
|
16
16
|
onClose();
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
const [isClient, setIsClient] = React.useState(false);
|
|
20
|
+
React.useEffect(() => {
|
|
21
|
+
setIsClient(true);
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
19
24
|
React.useEffect(() => {
|
|
20
25
|
document.addEventListener('mousedown', handleClickOutside, false);
|
|
21
26
|
return () => {
|
|
@@ -48,24 +53,25 @@ const SidebarPopup = (props) => {
|
|
|
48
53
|
unmountOnExit
|
|
49
54
|
>
|
|
50
55
|
<>
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
e
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
e
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
{isClient &&
|
|
57
|
+
createPortal(
|
|
58
|
+
<aside
|
|
59
|
+
role="presentation"
|
|
60
|
+
onClick={(e) => {
|
|
61
|
+
e.stopPropagation();
|
|
62
|
+
}}
|
|
63
|
+
onKeyDown={(e) => {
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
}}
|
|
66
|
+
ref={asideElement}
|
|
67
|
+
key="sidebarpopup"
|
|
68
|
+
className="sidebar-container"
|
|
69
|
+
style={{ overflowY: 'auto' }}
|
|
70
|
+
>
|
|
71
|
+
{children}
|
|
72
|
+
</aside>,
|
|
73
|
+
document.body,
|
|
74
|
+
)}
|
|
69
75
|
</>
|
|
70
76
|
</CSSTransition>
|
|
71
77
|
</>
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { injectIntl } from 'react-intl';
|
|
9
8
|
|
|
10
9
|
import {
|
|
11
10
|
Container as SemanticContainer,
|
|
@@ -137,4 +136,4 @@ DefaultView.propTypes = {
|
|
|
137
136
|
}).isRequired,
|
|
138
137
|
};
|
|
139
138
|
|
|
140
|
-
export default
|
|
139
|
+
export default DefaultView;
|
|
@@ -90,6 +90,16 @@ const applyExtenders = (asyncItems, pathname) => {
|
|
|
90
90
|
* with the "object promises" and that's our "object promises" (which it calls
|
|
91
91
|
* internally "asyncItems").
|
|
92
92
|
*/
|
|
93
|
+
/**
|
|
94
|
+
* Higher-order function that enhances a React component with asynchronous data fetching and Redux integration.
|
|
95
|
+
*
|
|
96
|
+
* @param {Array} asyncItems - An array of async items to fetch.
|
|
97
|
+
* @param {Function} [mapStateToProps] - A function that maps the Redux state to component props.
|
|
98
|
+
* @param {Function} [mapDispatchToProps] - A function that maps Redux dispatch to component props.
|
|
99
|
+
* @param {Function} [mergeProps] - A function that merges the props from mapStateToProps, mapDispatchToProps, and the component's own props.
|
|
100
|
+
* @param {Object} [options] - Additional options for configuring the async connect behavior.
|
|
101
|
+
* @returns {Function} - A function that takes a React component and returns an enhanced component with async connect functionality.
|
|
102
|
+
*/
|
|
93
103
|
export function asyncConnect(
|
|
94
104
|
asyncItems,
|
|
95
105
|
mapStateToProps,
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export default DefaultView;
|
|
2
|
+
/**
|
|
3
|
+
* Component to display the default view.
|
|
4
|
+
* @function DefaultView
|
|
5
|
+
* @param {Object} content Content object.
|
|
6
|
+
* @returns {string} Markup of the component.
|
|
7
|
+
*/
|
|
8
|
+
declare function DefaultView(props: any): string;
|
|
9
|
+
declare namespace DefaultView {
|
|
10
|
+
namespace propTypes {
|
|
11
|
+
let content: any;
|
|
12
|
+
}
|
|
13
|
+
}
|
package/types/config/Views.d.ts
CHANGED
|
@@ -33,9 +33,8 @@ export const contentTypesViews: {
|
|
|
33
33
|
};
|
|
34
34
|
Event: import("@loadable/component").LoadableComponent<any>;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
};
|
|
36
|
+
export function defaultView(props: any): string;
|
|
37
|
+
export namespace defaultView { }
|
|
39
38
|
export const errorViews: {
|
|
40
39
|
404: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
41
40
|
401: (props: any) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -14,6 +14,16 @@
|
|
|
14
14
|
* with the "object promises" and that's our "object promises" (which it calls
|
|
15
15
|
* internally "asyncItems").
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Higher-order function that enhances a React component with asynchronous data fetching and Redux integration.
|
|
19
|
+
*
|
|
20
|
+
* @param {Array} asyncItems - An array of async items to fetch.
|
|
21
|
+
* @param {Function} [mapStateToProps] - A function that maps the Redux state to component props.
|
|
22
|
+
* @param {Function} [mapDispatchToProps] - A function that maps Redux dispatch to component props.
|
|
23
|
+
* @param {Function} [mergeProps] - A function that merges the props from mapStateToProps, mapDispatchToProps, and the component's own props.
|
|
24
|
+
* @param {Object} [options] - Additional options for configuring the async connect behavior.
|
|
25
|
+
* @returns {Function} - A function that takes a React component and returns an enhanced component with async connect functionality.
|
|
26
|
+
*/
|
|
27
|
+
export function asyncConnect(asyncItems: any[], mapStateToProps?: Function, mapDispatchToProps?: Function, mergeProps?: Function, options?: any): Function;
|
|
18
28
|
export const ReduxAsyncConnect: any;
|
|
19
29
|
export { loadOnServer, loadAsyncConnect } from "./ssr";
|