@plone/volto 18.2.0 → 18.2.1

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.
Files changed (40) hide show
  1. package/.eslintrc.core.js +1 -0
  2. package/CHANGELOG.md +11 -0
  3. package/package.json +4 -4
  4. package/src/components/theme/EventDetails/EventDetails.jsx +2 -2
  5. package/src/config/Components.jsx +9 -6
  6. package/src/config/index.js +3 -2
  7. package/src/express-middleware/files.js +4 -1
  8. package/types/config/Components.d.ts +1 -14
  9. /package/src/components/manage/Pluggable/{Pluggable.stories.js → Pluggable.stories.jsx} +0 -0
  10. /package/src/components/manage/Pluggable/{Pluggable.test.js → Pluggable.test.jsx} +0 -0
  11. /package/src/components/manage/UniversalLink/{UniversalLink.stories.js → UniversalLink.stories.jsx} +0 -0
  12. /package/src/components/manage/Widgets/{ObjectBrowserWidget.stories.js → ObjectBrowserWidget.stories.jsx} +0 -0
  13. /package/src/components/manage/Widgets/{ObjectListWidget.stories.js → ObjectListWidget.stories.jsx} +0 -0
  14. /package/src/components/manage/Widgets/{ObjectListWidget.test.js → ObjectListWidget.test.jsx} +0 -0
  15. /package/src/components/manage/Widgets/{VocabularyTermsWidget.stories.js → VocabularyTermsWidget.stories.jsx} +0 -0
  16. /package/src/components/theme/Avatar/{Avatar.stories.js → Avatar.stories.jsx} +0 -0
  17. /package/src/components/theme/Navigation/{ContextNavigation.stories.js → ContextNavigation.stories.jsx} +0 -0
  18. /package/src/components/theme/Navigation/{withContentNavigation.js → withContentNavigation.jsx} +0 -0
  19. /package/src/components/theme/PreviewImage/{PreviewImage.test.js → PreviewImage.test.jsx} +0 -0
  20. /package/src/components/theme/Title/{Title.stories.js → Title.stories.jsx} +0 -0
  21. /package/src/components/theme/Widgets/{ArrayWidget.test.js → ArrayWidget.test.jsx} +0 -0
  22. /package/src/components/theme/Widgets/{BooleanWidget.test.js → BooleanWidget.test.jsx} +0 -0
  23. /package/src/components/theme/Widgets/{DateWidget.test.js → DateWidget.test.jsx} +0 -0
  24. /package/src/components/theme/Widgets/{DatetimeWidget.test.js → DatetimeWidget.test.jsx} +0 -0
  25. /package/src/components/theme/Widgets/{DescriptionWidget.test.js → DescriptionWidget.test.jsx} +0 -0
  26. /package/src/components/theme/Widgets/{EmailWidget.test.js → EmailWidget.test.jsx} +0 -0
  27. /package/src/components/theme/Widgets/{FileWidget.test.js → FileWidget.test.jsx} +0 -0
  28. /package/src/components/theme/Widgets/{ImageWidget.test.js → ImageWidget.test.jsx} +0 -0
  29. /package/src/components/theme/Widgets/{PasswordWidget.test.js → PasswordWidget.test.jsx} +0 -0
  30. /package/src/components/theme/Widgets/{RelationWidget.test.js → RelationWidget.test.jsx} +0 -0
  31. /package/src/components/theme/Widgets/{RelationsWidget.test.js → RelationsWidget.test.jsx} +0 -0
  32. /package/src/components/theme/Widgets/{RichTextWidget.test.js → RichTextWidget.test.jsx} +0 -0
  33. /package/src/components/theme/Widgets/{SelectWidget.test.js → SelectWidget.test.jsx} +0 -0
  34. /package/src/components/theme/Widgets/{TextWidget.test.js → TextWidget.test.jsx} +0 -0
  35. /package/src/components/theme/Widgets/{TitleWidget.test.js → TitleWidget.test.jsx} +0 -0
  36. /package/src/components/theme/Widgets/{TokenWidget.test.js → TokenWidget.test.jsx} +0 -0
  37. /package/src/components/theme/Widgets/{UrlWidget.test.js → UrlWidget.test.jsx} +0 -0
  38. /package/src/helpers/AsyncConnect/{AsyncConnect.test.js → AsyncConnect.test.jsx} +0 -0
  39. /package/src/helpers/Extensions/{withBlockExtensions.test.js → withBlockExtensions.test.jsx} +0 -0
  40. /package/src/helpers/Utils/{Utils.test.js → Utils.test.jsx} +0 -0
package/.eslintrc.core.js CHANGED
@@ -11,6 +11,7 @@ if (process.env.VOLTOCONFIG) {
11
11
  rules = null;
12
12
  } else {
13
13
  rules = {
14
+ 'react/jsx-filename-extension': ['warn', { extensions: ['.tsx', '.jsx'] }],
14
15
  'no-restricted-imports': [
15
16
  'warn',
16
17
  {
package/CHANGELOG.md CHANGED
@@ -17,6 +17,17 @@ myst:
17
17
 
18
18
  <!-- towncrier release notes start -->
19
19
 
20
+ ## 18.2.1 (2024-12-09)
21
+
22
+ ### Bugfix
23
+
24
+ - Fixes ICS download in non-public event content. @sneridagh [#6515](https://github.com/plone/volto/issues/6515)
25
+ - Fixed circular import error in dev with HMR in `App` component when imported in the main default config. @sneridagh [#6524](https://github.com/plone/volto/issues/6524)
26
+
27
+ ### Internal
28
+
29
+ - Fix extension in files containing JSX. @sneridagh [#6520](https://github.com/plone/volto/issues/6520)
30
+
20
31
  ## 18.2.0 (2024-12-08)
21
32
 
22
33
  ### Internal
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
  ],
11
11
  "license": "MIT",
12
- "version": "18.2.0",
12
+ "version": "18.2.1",
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git@github.com:plone/volto.git"
@@ -236,9 +236,9 @@
236
236
  "url": "^0.11.3",
237
237
  "use-deep-compare-effect": "1.8.1",
238
238
  "uuid": "^8.3.2",
239
- "@plone/registry": "2.1.2",
240
- "@plone/volto-slate": "18.0.2",
241
- "@plone/scripts": "3.8.1"
239
+ "@plone/scripts": "3.8.1",
240
+ "@plone/volto-slate": "18.0.3",
241
+ "@plone/registry": "2.1.2"
242
242
  },
243
243
  "devDependencies": {
244
244
  "@babel/core": "^7.0.0",
@@ -6,7 +6,7 @@ import {
6
6
  Recurrence,
7
7
  } from '@plone/volto/components/theme/View/EventDatesInfo';
8
8
  import Icon from '@plone/volto/components/theme/Icon/Icon';
9
- import { expandToBackendURL } from '@plone/volto/helpers/Url/Url';
9
+ import { flattenToAppURL } from '@plone/volto/helpers/Url/Url';
10
10
 
11
11
  import calendarSVG from '@plone/volto/icons/calendar.svg';
12
12
 
@@ -147,7 +147,7 @@ const EventDetails = ({ content, display_as = 'aside' }) => {
147
147
  className="ics-download"
148
148
  target="_blank"
149
149
  rel="noreferrer"
150
- href={`${expandToBackendURL(content['@id'])}/ics_view`}
150
+ href={`${flattenToAppURL(content['@id'])}/ics_view`}
151
151
  >
152
152
  {intl.formatMessage(messages.downloadEvent)}
153
153
  </a>
@@ -2,9 +2,12 @@ import App from '@plone/volto/components/theme/App/App';
2
2
  import PreviewImage from '@plone/volto/components/theme/PreviewImage/PreviewImage';
3
3
  import Image from '@plone/volto/components/theme/Image/Image';
4
4
 
5
- // Register components.
6
- export const components = {
7
- PreviewImage: { component: PreviewImage },
8
- App: { component: App },
9
- Image: { component: Image },
10
- };
5
+ export function installDefaultComponents(config) {
6
+ config.components = {
7
+ PreviewImage: { component: PreviewImage },
8
+ App: { component: App },
9
+ Image: { component: Image },
10
+ };
11
+
12
+ return config;
13
+ }
@@ -16,7 +16,6 @@ import {
16
16
  initialBlocks,
17
17
  initialBlocksFocus,
18
18
  } from './Blocks';
19
- import { components } from './Components';
20
19
  import { loadables } from './Loadables';
21
20
  import { workflowMapping } from './Workflows';
22
21
  import slots from './slots';
@@ -33,6 +32,7 @@ import {
33
32
  import applyAddonConfiguration, { addonsInfo } from 'load-volto-addons';
34
33
 
35
34
  import ConfigRegistry from '@plone/volto/registry';
35
+ import { installDefaultComponents } from './Components';
36
36
 
37
37
  import { getSiteAsyncPropExtender } from '@plone/volto/helpers/Site';
38
38
  import { registerValidators } from './validation';
@@ -216,7 +216,7 @@ let config = {
216
216
  },
217
217
  addonRoutes: [],
218
218
  addonReducers: {},
219
- components,
219
+ components: {},
220
220
  slots: {},
221
221
  utilities: {},
222
222
  };
@@ -261,5 +261,6 @@ Object.entries(slots).forEach(([slotName, components]) => {
261
261
  });
262
262
 
263
263
  registerValidators(ConfigRegistry);
264
+ installDefaultComponents(ConfigRegistry);
264
265
 
265
266
  applyAddonConfiguration(ConfigRegistry);
@@ -30,7 +30,10 @@ function filesMiddlewareFn(req, res, next) {
30
30
  export default function filesMiddleware() {
31
31
  const middleware = express.Router();
32
32
 
33
- middleware.all(['**/@@download/*', '**/@@display-file/*'], filesMiddlewareFn);
33
+ middleware.all(
34
+ ['**/@@download/*', '**/@@display-file/*', '**/ics_view'],
35
+ filesMiddlewareFn,
36
+ );
34
37
  middleware.id = 'filesResourcesProcessor';
35
38
  return middleware;
36
39
  }
@@ -1,14 +1 @@
1
- export namespace components {
2
- namespace PreviewImage {
3
- export { PreviewImage as component };
4
- }
5
- namespace App {
6
- export { App as component };
7
- }
8
- namespace Image {
9
- export { Image as component };
10
- }
11
- }
12
- import PreviewImage_1 from '@plone/volto/components/theme/PreviewImage/PreviewImage';
13
- import App_1 from '@plone/volto/components/theme/App/App';
14
- import Image_1 from '@plone/volto/components/theme/Image/Image';
1
+ export function installDefaultComponents(config: any): any;