From 7c853ee3bb44c7698ba5eaf39e8803bb70404a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Sun, 8 Dec 2024 11:12:06 +0100 Subject: [PATCH 1/3] Fixes ICS download in non-public event content (#6515) --- packages/volto/news/6515.bugfix | 1 + .../src/components/theme/EventDetails/EventDetails.jsx | 4 ++-- .../EventDetails/__snapshots__/EventDetails.test.jsx.snap | 6 +++--- .../theme/View/__snapshots__/EventView.test.jsx.snap | 6 +++--- packages/volto/src/express-middleware/files.js | 5 ++++- 5 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 packages/volto/news/6515.bugfix diff --git a/packages/volto/news/6515.bugfix b/packages/volto/news/6515.bugfix new file mode 100644 index 0000000000..c55ab658d9 --- /dev/null +++ b/packages/volto/news/6515.bugfix @@ -0,0 +1 @@ +Fixes ICS download in non-public event content. @sneridagh diff --git a/packages/volto/src/components/theme/EventDetails/EventDetails.jsx b/packages/volto/src/components/theme/EventDetails/EventDetails.jsx index e1ba3dfb89..bbc7964c77 100644 --- a/packages/volto/src/components/theme/EventDetails/EventDetails.jsx +++ b/packages/volto/src/components/theme/EventDetails/EventDetails.jsx @@ -6,7 +6,7 @@ import { Recurrence, } from '@plone/volto/components/theme/View/EventDatesInfo'; import Icon from '@plone/volto/components/theme/Icon/Icon'; -import { expandToBackendURL } from '@plone/volto/helpers/Url/Url'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; import calendarSVG from '@plone/volto/icons/calendar.svg'; @@ -147,7 +147,7 @@ const EventDetails = ({ content, display_as = 'aside' }) => { className="ics-download" target="_blank" rel="noreferrer" - href={`${expandToBackendURL(content['@id'])}/ics_view`} + href={`${flattenToAppURL(content['@id'])}/ics_view`} > {intl.formatMessage(messages.downloadEvent)} diff --git a/packages/volto/src/components/theme/EventDetails/__snapshots__/EventDetails.test.jsx.snap b/packages/volto/src/components/theme/EventDetails/__snapshots__/EventDetails.test.jsx.snap index 1d605e546b..a7fad6aa2f 100644 --- a/packages/volto/src/components/theme/EventDetails/__snapshots__/EventDetails.test.jsx.snap +++ b/packages/volto/src/components/theme/EventDetails/__snapshots__/EventDetails.test.jsx.snap @@ -127,7 +127,7 @@ exports[`renders event details component with all props 1`] = ` /> @@ -169,7 +169,7 @@ exports[`renders event details component with only required props 1`] = ` /> @@ -211,7 +211,7 @@ exports[`renders event details component without links to api in the text 1`] = /> diff --git a/packages/volto/src/components/theme/View/__snapshots__/EventView.test.jsx.snap b/packages/volto/src/components/theme/View/__snapshots__/EventView.test.jsx.snap index acf53acafc..269d255c4b 100644 --- a/packages/volto/src/components/theme/View/__snapshots__/EventView.test.jsx.snap +++ b/packages/volto/src/components/theme/View/__snapshots__/EventView.test.jsx.snap @@ -251,7 +251,7 @@ exports[`renders an event view component with all props 1`] = ` /> @@ -357,7 +357,7 @@ exports[`renders an event view component with only required props 1`] = ` /> @@ -458,7 +458,7 @@ exports[`renders an event view component without links to api in the text 1`] = /> diff --git a/packages/volto/src/express-middleware/files.js b/packages/volto/src/express-middleware/files.js index 40f3f5d71a..547165f201 100644 --- a/packages/volto/src/express-middleware/files.js +++ b/packages/volto/src/express-middleware/files.js @@ -30,7 +30,10 @@ function filesMiddlewareFn(req, res, next) { export default function filesMiddleware() { const middleware = express.Router(); - middleware.all(['**/@@download/*', '**/@@display-file/*'], filesMiddlewareFn); + middleware.all( + ['**/@@download/*', '**/@@display-file/*', '**/ics_view'], + filesMiddlewareFn, + ); middleware.id = 'filesResourcesProcessor'; return middleware; } From 48fbd0189b4d338704da9edef5841e9d385a4474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Sun, 8 Dec 2024 12:52:20 +0100 Subject: [PATCH 2/3] Fix extension in JSX files (#6520) --- packages/volto-slate/news/6520.internal | 1 + .../volto-slate/src/blocks/Table/{Cell.test.js => Cell.test.jsx} | 0 .../Table/{TableBlockEdit.test.js => TableBlockEdit.test.jsx} | 0 .../Table/{TableBlockView.test.js => TableBlockView.test.jsx} | 0 .../Text/{TextBlockEdit.test.js => TextBlockEdit.test.jsx} | 0 .../editor/ui/{ToolbarButton.test.js => ToolbarButton.test.jsx} | 0 .../{makeInlineElementPlugin.js => makeInlineElementPlugin.jsx} | 0 packages/volto/.eslintrc.core.js | 1 + packages/volto/news/6520.internal | 1 + .../Pluggable/{Pluggable.stories.js => Pluggable.stories.jsx} | 0 .../manage/Pluggable/{Pluggable.test.js => Pluggable.test.jsx} | 0 .../{Pluggable.test.js.snap => Pluggable.test.jsx.snap} | 0 .../{UniversalLink.stories.js => UniversalLink.stories.jsx} | 0 ...tBrowserWidget.stories.js => ObjectBrowserWidget.stories.jsx} | 0 ...{ObjectListWidget.stories.js => ObjectListWidget.stories.jsx} | 0 .../{ObjectListWidget.test.js => ObjectListWidget.test.jsx} | 0 ...yTermsWidget.stories.js => VocabularyTermsWidget.stories.jsx} | 0 ...ectListWidget.test.js.snap => ObjectListWidget.test.jsx.snap} | 0 .../theme/Avatar/{Avatar.stories.js => Avatar.stories.jsx} | 0 ...ontextNavigation.stories.js => ContextNavigation.stories.jsx} | 0 .../{withContentNavigation.js => withContentNavigation.jsx} | 0 .../PreviewImage/{PreviewImage.test.js => PreviewImage.test.jsx} | 0 .../{PreviewImage.test.js.snap => PreviewImage.test.jsx.snap} | 0 .../theme/Title/{Title.stories.js => Title.stories.jsx} | 0 .../theme/Widgets/{ArrayWidget.test.js => ArrayWidget.test.jsx} | 0 .../Widgets/{BooleanWidget.test.js => BooleanWidget.test.jsx} | 0 .../theme/Widgets/{DateWidget.test.js => DateWidget.test.jsx} | 0 .../Widgets/{DatetimeWidget.test.js => DatetimeWidget.test.jsx} | 0 .../{DescriptionWidget.test.js => DescriptionWidget.test.jsx} | 0 .../theme/Widgets/{EmailWidget.test.js => EmailWidget.test.jsx} | 0 .../theme/Widgets/{FileWidget.test.js => FileWidget.test.jsx} | 0 .../theme/Widgets/{ImageWidget.test.js => ImageWidget.test.jsx} | 0 .../Widgets/{PasswordWidget.test.js => PasswordWidget.test.jsx} | 0 .../Widgets/{RelationWidget.test.js => RelationWidget.test.jsx} | 0 .../{RelationsWidget.test.js => RelationsWidget.test.jsx} | 0 .../Widgets/{RichTextWidget.test.js => RichTextWidget.test.jsx} | 0 .../Widgets/{SelectWidget.test.js => SelectWidget.test.jsx} | 0 .../theme/Widgets/{TextWidget.test.js => TextWidget.test.jsx} | 0 .../theme/Widgets/{TitleWidget.test.js => TitleWidget.test.jsx} | 0 .../theme/Widgets/{TokenWidget.test.js => TokenWidget.test.jsx} | 0 .../theme/Widgets/{UrlWidget.test.js => UrlWidget.test.jsx} | 0 .../{ArrayWidget.test.js.snap => ArrayWidget.test.jsx.snap} | 0 .../{BooleanWidget.test.js.snap => BooleanWidget.test.jsx.snap} | 0 .../{DateWidget.test.js.snap => DateWidget.test.jsx.snap} | 0 ...{DatetimeWidget.test.js.snap => DatetimeWidget.test.jsx.snap} | 0 ...iptionWidget.test.js.snap => DescriptionWidget.test.jsx.snap} | 0 .../{EmailWidget.test.js.snap => EmailWidget.test.jsx.snap} | 0 .../{FileWidget.test.js.snap => FileWidget.test.jsx.snap} | 0 .../{ImageWidget.test.js.snap => ImageWidget.test.jsx.snap} | 0 ...{PasswordWidget.test.js.snap => PasswordWidget.test.jsx.snap} | 0 ...{RelationWidget.test.js.snap => RelationWidget.test.jsx.snap} | 0 ...elationsWidget.test.js.snap => RelationsWidget.test.jsx.snap} | 0 ...{RichTextWidget.test.js.snap => RichTextWidget.test.jsx.snap} | 0 .../{SelectWidget.test.js.snap => SelectWidget.test.jsx.snap} | 0 .../{TextWidget.test.js.snap => TextWidget.test.jsx.snap} | 0 .../{TitleWidget.test.js.snap => TitleWidget.test.jsx.snap} | 0 .../{TokenWidget.test.js.snap => TokenWidget.test.jsx.snap} | 0 .../{UrlWidget.test.js.snap => UrlWidget.test.jsx.snap} | 0 .../AsyncConnect/{AsyncConnect.test.js => AsyncConnect.test.jsx} | 0 ...Extensions.test.js.snap => withBlockExtensions.test.jsx.snap} | 0 ...{withBlockExtensions.test.js => withBlockExtensions.test.jsx} | 0 .../volto/src/helpers/Utils/{Utils.test.js => Utils.test.jsx} | 0 62 files changed, 3 insertions(+) create mode 100644 packages/volto-slate/news/6520.internal rename packages/volto-slate/src/blocks/Table/{Cell.test.js => Cell.test.jsx} (100%) rename packages/volto-slate/src/blocks/Table/{TableBlockEdit.test.js => TableBlockEdit.test.jsx} (100%) rename packages/volto-slate/src/blocks/Table/{TableBlockView.test.js => TableBlockView.test.jsx} (100%) rename packages/volto-slate/src/blocks/Text/{TextBlockEdit.test.js => TextBlockEdit.test.jsx} (100%) rename packages/volto-slate/src/editor/ui/{ToolbarButton.test.js => ToolbarButton.test.jsx} (100%) rename packages/volto-slate/src/elementEditor/{makeInlineElementPlugin.js => makeInlineElementPlugin.jsx} (100%) create mode 100644 packages/volto/news/6520.internal rename packages/volto/src/components/manage/Pluggable/{Pluggable.stories.js => Pluggable.stories.jsx} (100%) rename packages/volto/src/components/manage/Pluggable/{Pluggable.test.js => Pluggable.test.jsx} (100%) rename packages/volto/src/components/manage/Pluggable/__snapshots__/{Pluggable.test.js.snap => Pluggable.test.jsx.snap} (100%) rename packages/volto/src/components/manage/UniversalLink/{UniversalLink.stories.js => UniversalLink.stories.jsx} (100%) rename packages/volto/src/components/manage/Widgets/{ObjectBrowserWidget.stories.js => ObjectBrowserWidget.stories.jsx} (100%) rename packages/volto/src/components/manage/Widgets/{ObjectListWidget.stories.js => ObjectListWidget.stories.jsx} (100%) rename packages/volto/src/components/manage/Widgets/{ObjectListWidget.test.js => ObjectListWidget.test.jsx} (100%) rename packages/volto/src/components/manage/Widgets/{VocabularyTermsWidget.stories.js => VocabularyTermsWidget.stories.jsx} (100%) rename packages/volto/src/components/manage/Widgets/__snapshots__/{ObjectListWidget.test.js.snap => ObjectListWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Avatar/{Avatar.stories.js => Avatar.stories.jsx} (100%) rename packages/volto/src/components/theme/Navigation/{ContextNavigation.stories.js => ContextNavigation.stories.jsx} (100%) rename packages/volto/src/components/theme/Navigation/{withContentNavigation.js => withContentNavigation.jsx} (100%) rename packages/volto/src/components/theme/PreviewImage/{PreviewImage.test.js => PreviewImage.test.jsx} (100%) rename packages/volto/src/components/theme/PreviewImage/__snapshots__/{PreviewImage.test.js.snap => PreviewImage.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Title/{Title.stories.js => Title.stories.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{ArrayWidget.test.js => ArrayWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{BooleanWidget.test.js => BooleanWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{DateWidget.test.js => DateWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{DatetimeWidget.test.js => DatetimeWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{DescriptionWidget.test.js => DescriptionWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{EmailWidget.test.js => EmailWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{FileWidget.test.js => FileWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{ImageWidget.test.js => ImageWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{PasswordWidget.test.js => PasswordWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{RelationWidget.test.js => RelationWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{RelationsWidget.test.js => RelationsWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{RichTextWidget.test.js => RichTextWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{SelectWidget.test.js => SelectWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{TextWidget.test.js => TextWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{TitleWidget.test.js => TitleWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{TokenWidget.test.js => TokenWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/{UrlWidget.test.js => UrlWidget.test.jsx} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{ArrayWidget.test.js.snap => ArrayWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{BooleanWidget.test.js.snap => BooleanWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{DateWidget.test.js.snap => DateWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{DatetimeWidget.test.js.snap => DatetimeWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{DescriptionWidget.test.js.snap => DescriptionWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{EmailWidget.test.js.snap => EmailWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{FileWidget.test.js.snap => FileWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{ImageWidget.test.js.snap => ImageWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{PasswordWidget.test.js.snap => PasswordWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{RelationWidget.test.js.snap => RelationWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{RelationsWidget.test.js.snap => RelationsWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{RichTextWidget.test.js.snap => RichTextWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{SelectWidget.test.js.snap => SelectWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{TextWidget.test.js.snap => TextWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{TitleWidget.test.js.snap => TitleWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{TokenWidget.test.js.snap => TokenWidget.test.jsx.snap} (100%) rename packages/volto/src/components/theme/Widgets/__snapshots__/{UrlWidget.test.js.snap => UrlWidget.test.jsx.snap} (100%) rename packages/volto/src/helpers/AsyncConnect/{AsyncConnect.test.js => AsyncConnect.test.jsx} (100%) rename packages/volto/src/helpers/Extensions/__snapshots__/{withBlockExtensions.test.js.snap => withBlockExtensions.test.jsx.snap} (100%) rename packages/volto/src/helpers/Extensions/{withBlockExtensions.test.js => withBlockExtensions.test.jsx} (100%) rename packages/volto/src/helpers/Utils/{Utils.test.js => Utils.test.jsx} (100%) diff --git a/packages/volto-slate/news/6520.internal b/packages/volto-slate/news/6520.internal new file mode 100644 index 0000000000..611bdb0abd --- /dev/null +++ b/packages/volto-slate/news/6520.internal @@ -0,0 +1 @@ +Fix extension in files containing JSX. @sneridagh diff --git a/packages/volto-slate/src/blocks/Table/Cell.test.js b/packages/volto-slate/src/blocks/Table/Cell.test.jsx similarity index 100% rename from packages/volto-slate/src/blocks/Table/Cell.test.js rename to packages/volto-slate/src/blocks/Table/Cell.test.jsx diff --git a/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js b/packages/volto-slate/src/blocks/Table/TableBlockEdit.test.jsx similarity index 100% rename from packages/volto-slate/src/blocks/Table/TableBlockEdit.test.js rename to packages/volto-slate/src/blocks/Table/TableBlockEdit.test.jsx diff --git a/packages/volto-slate/src/blocks/Table/TableBlockView.test.js b/packages/volto-slate/src/blocks/Table/TableBlockView.test.jsx similarity index 100% rename from packages/volto-slate/src/blocks/Table/TableBlockView.test.js rename to packages/volto-slate/src/blocks/Table/TableBlockView.test.jsx diff --git a/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js b/packages/volto-slate/src/blocks/Text/TextBlockEdit.test.jsx similarity index 100% rename from packages/volto-slate/src/blocks/Text/TextBlockEdit.test.js rename to packages/volto-slate/src/blocks/Text/TextBlockEdit.test.jsx diff --git a/packages/volto-slate/src/editor/ui/ToolbarButton.test.js b/packages/volto-slate/src/editor/ui/ToolbarButton.test.jsx similarity index 100% rename from packages/volto-slate/src/editor/ui/ToolbarButton.test.js rename to packages/volto-slate/src/editor/ui/ToolbarButton.test.jsx diff --git a/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js b/packages/volto-slate/src/elementEditor/makeInlineElementPlugin.jsx similarity index 100% rename from packages/volto-slate/src/elementEditor/makeInlineElementPlugin.js rename to packages/volto-slate/src/elementEditor/makeInlineElementPlugin.jsx diff --git a/packages/volto/.eslintrc.core.js b/packages/volto/.eslintrc.core.js index 41cf953afe..a6b04e24c1 100644 --- a/packages/volto/.eslintrc.core.js +++ b/packages/volto/.eslintrc.core.js @@ -11,6 +11,7 @@ if (process.env.VOLTOCONFIG) { rules = null; } else { rules = { + 'react/jsx-filename-extension': ['warn', { extensions: ['.tsx', '.jsx'] }], 'no-restricted-imports': [ 'warn', { diff --git a/packages/volto/news/6520.internal b/packages/volto/news/6520.internal new file mode 100644 index 0000000000..611bdb0abd --- /dev/null +++ b/packages/volto/news/6520.internal @@ -0,0 +1 @@ +Fix extension in files containing JSX. @sneridagh diff --git a/packages/volto/src/components/manage/Pluggable/Pluggable.stories.js b/packages/volto/src/components/manage/Pluggable/Pluggable.stories.jsx similarity index 100% rename from packages/volto/src/components/manage/Pluggable/Pluggable.stories.js rename to packages/volto/src/components/manage/Pluggable/Pluggable.stories.jsx diff --git a/packages/volto/src/components/manage/Pluggable/Pluggable.test.js b/packages/volto/src/components/manage/Pluggable/Pluggable.test.jsx similarity index 100% rename from packages/volto/src/components/manage/Pluggable/Pluggable.test.js rename to packages/volto/src/components/manage/Pluggable/Pluggable.test.jsx diff --git a/packages/volto/src/components/manage/Pluggable/__snapshots__/Pluggable.test.js.snap b/packages/volto/src/components/manage/Pluggable/__snapshots__/Pluggable.test.jsx.snap similarity index 100% rename from packages/volto/src/components/manage/Pluggable/__snapshots__/Pluggable.test.js.snap rename to packages/volto/src/components/manage/Pluggable/__snapshots__/Pluggable.test.jsx.snap diff --git a/packages/volto/src/components/manage/UniversalLink/UniversalLink.stories.js b/packages/volto/src/components/manage/UniversalLink/UniversalLink.stories.jsx similarity index 100% rename from packages/volto/src/components/manage/UniversalLink/UniversalLink.stories.js rename to packages/volto/src/components/manage/UniversalLink/UniversalLink.stories.jsx diff --git a/packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.stories.js b/packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.stories.jsx similarity index 100% rename from packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.stories.js rename to packages/volto/src/components/manage/Widgets/ObjectBrowserWidget.stories.jsx diff --git a/packages/volto/src/components/manage/Widgets/ObjectListWidget.stories.js b/packages/volto/src/components/manage/Widgets/ObjectListWidget.stories.jsx similarity index 100% rename from packages/volto/src/components/manage/Widgets/ObjectListWidget.stories.js rename to packages/volto/src/components/manage/Widgets/ObjectListWidget.stories.jsx diff --git a/packages/volto/src/components/manage/Widgets/ObjectListWidget.test.js b/packages/volto/src/components/manage/Widgets/ObjectListWidget.test.jsx similarity index 100% rename from packages/volto/src/components/manage/Widgets/ObjectListWidget.test.js rename to packages/volto/src/components/manage/Widgets/ObjectListWidget.test.jsx diff --git a/packages/volto/src/components/manage/Widgets/VocabularyTermsWidget.stories.js b/packages/volto/src/components/manage/Widgets/VocabularyTermsWidget.stories.jsx similarity index 100% rename from packages/volto/src/components/manage/Widgets/VocabularyTermsWidget.stories.js rename to packages/volto/src/components/manage/Widgets/VocabularyTermsWidget.stories.jsx diff --git a/packages/volto/src/components/manage/Widgets/__snapshots__/ObjectListWidget.test.js.snap b/packages/volto/src/components/manage/Widgets/__snapshots__/ObjectListWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/manage/Widgets/__snapshots__/ObjectListWidget.test.js.snap rename to packages/volto/src/components/manage/Widgets/__snapshots__/ObjectListWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Avatar/Avatar.stories.js b/packages/volto/src/components/theme/Avatar/Avatar.stories.jsx similarity index 100% rename from packages/volto/src/components/theme/Avatar/Avatar.stories.js rename to packages/volto/src/components/theme/Avatar/Avatar.stories.jsx diff --git a/packages/volto/src/components/theme/Navigation/ContextNavigation.stories.js b/packages/volto/src/components/theme/Navigation/ContextNavigation.stories.jsx similarity index 100% rename from packages/volto/src/components/theme/Navigation/ContextNavigation.stories.js rename to packages/volto/src/components/theme/Navigation/ContextNavigation.stories.jsx diff --git a/packages/volto/src/components/theme/Navigation/withContentNavigation.js b/packages/volto/src/components/theme/Navigation/withContentNavigation.jsx similarity index 100% rename from packages/volto/src/components/theme/Navigation/withContentNavigation.js rename to packages/volto/src/components/theme/Navigation/withContentNavigation.jsx diff --git a/packages/volto/src/components/theme/PreviewImage/PreviewImage.test.js b/packages/volto/src/components/theme/PreviewImage/PreviewImage.test.jsx similarity index 100% rename from packages/volto/src/components/theme/PreviewImage/PreviewImage.test.js rename to packages/volto/src/components/theme/PreviewImage/PreviewImage.test.jsx diff --git a/packages/volto/src/components/theme/PreviewImage/__snapshots__/PreviewImage.test.js.snap b/packages/volto/src/components/theme/PreviewImage/__snapshots__/PreviewImage.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/PreviewImage/__snapshots__/PreviewImage.test.js.snap rename to packages/volto/src/components/theme/PreviewImage/__snapshots__/PreviewImage.test.jsx.snap diff --git a/packages/volto/src/components/theme/Title/Title.stories.js b/packages/volto/src/components/theme/Title/Title.stories.jsx similarity index 100% rename from packages/volto/src/components/theme/Title/Title.stories.js rename to packages/volto/src/components/theme/Title/Title.stories.jsx diff --git a/packages/volto/src/components/theme/Widgets/ArrayWidget.test.js b/packages/volto/src/components/theme/Widgets/ArrayWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/ArrayWidget.test.js rename to packages/volto/src/components/theme/Widgets/ArrayWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/BooleanWidget.test.js b/packages/volto/src/components/theme/Widgets/BooleanWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/BooleanWidget.test.js rename to packages/volto/src/components/theme/Widgets/BooleanWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/DateWidget.test.js b/packages/volto/src/components/theme/Widgets/DateWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/DateWidget.test.js rename to packages/volto/src/components/theme/Widgets/DateWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/DatetimeWidget.test.js b/packages/volto/src/components/theme/Widgets/DatetimeWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/DatetimeWidget.test.js rename to packages/volto/src/components/theme/Widgets/DatetimeWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/DescriptionWidget.test.js b/packages/volto/src/components/theme/Widgets/DescriptionWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/DescriptionWidget.test.js rename to packages/volto/src/components/theme/Widgets/DescriptionWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/EmailWidget.test.js b/packages/volto/src/components/theme/Widgets/EmailWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/EmailWidget.test.js rename to packages/volto/src/components/theme/Widgets/EmailWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/FileWidget.test.js b/packages/volto/src/components/theme/Widgets/FileWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/FileWidget.test.js rename to packages/volto/src/components/theme/Widgets/FileWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/ImageWidget.test.js b/packages/volto/src/components/theme/Widgets/ImageWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/ImageWidget.test.js rename to packages/volto/src/components/theme/Widgets/ImageWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/PasswordWidget.test.js b/packages/volto/src/components/theme/Widgets/PasswordWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/PasswordWidget.test.js rename to packages/volto/src/components/theme/Widgets/PasswordWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/RelationWidget.test.js b/packages/volto/src/components/theme/Widgets/RelationWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/RelationWidget.test.js rename to packages/volto/src/components/theme/Widgets/RelationWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/RelationsWidget.test.js b/packages/volto/src/components/theme/Widgets/RelationsWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/RelationsWidget.test.js rename to packages/volto/src/components/theme/Widgets/RelationsWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/RichTextWidget.test.js b/packages/volto/src/components/theme/Widgets/RichTextWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/RichTextWidget.test.js rename to packages/volto/src/components/theme/Widgets/RichTextWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/SelectWidget.test.js b/packages/volto/src/components/theme/Widgets/SelectWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/SelectWidget.test.js rename to packages/volto/src/components/theme/Widgets/SelectWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/TextWidget.test.js b/packages/volto/src/components/theme/Widgets/TextWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/TextWidget.test.js rename to packages/volto/src/components/theme/Widgets/TextWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/TitleWidget.test.js b/packages/volto/src/components/theme/Widgets/TitleWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/TitleWidget.test.js rename to packages/volto/src/components/theme/Widgets/TitleWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/TokenWidget.test.js b/packages/volto/src/components/theme/Widgets/TokenWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/TokenWidget.test.js rename to packages/volto/src/components/theme/Widgets/TokenWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/UrlWidget.test.js b/packages/volto/src/components/theme/Widgets/UrlWidget.test.jsx similarity index 100% rename from packages/volto/src/components/theme/Widgets/UrlWidget.test.js rename to packages/volto/src/components/theme/Widgets/UrlWidget.test.jsx diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/ArrayWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/ArrayWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/ArrayWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/ArrayWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/BooleanWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/BooleanWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/BooleanWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/BooleanWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/DateWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/DateWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/DateWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/DateWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/DatetimeWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/DatetimeWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/DatetimeWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/DatetimeWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/DescriptionWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/DescriptionWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/DescriptionWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/DescriptionWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/EmailWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/EmailWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/EmailWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/EmailWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/FileWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/FileWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/FileWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/FileWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/ImageWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/ImageWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/ImageWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/ImageWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/PasswordWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/PasswordWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/PasswordWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/PasswordWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/RelationWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/RelationWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/RelationWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/RelationWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/RelationsWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/RelationsWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/RelationsWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/RelationsWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/RichTextWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/RichTextWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/RichTextWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/RichTextWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/SelectWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/SelectWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/SelectWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/SelectWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/TextWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/TextWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/TextWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/TextWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/TitleWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/TitleWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/TitleWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/TitleWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/TokenWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/TokenWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/TokenWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/TokenWidget.test.jsx.snap diff --git a/packages/volto/src/components/theme/Widgets/__snapshots__/UrlWidget.test.js.snap b/packages/volto/src/components/theme/Widgets/__snapshots__/UrlWidget.test.jsx.snap similarity index 100% rename from packages/volto/src/components/theme/Widgets/__snapshots__/UrlWidget.test.js.snap rename to packages/volto/src/components/theme/Widgets/__snapshots__/UrlWidget.test.jsx.snap diff --git a/packages/volto/src/helpers/AsyncConnect/AsyncConnect.test.js b/packages/volto/src/helpers/AsyncConnect/AsyncConnect.test.jsx similarity index 100% rename from packages/volto/src/helpers/AsyncConnect/AsyncConnect.test.js rename to packages/volto/src/helpers/AsyncConnect/AsyncConnect.test.jsx diff --git a/packages/volto/src/helpers/Extensions/__snapshots__/withBlockExtensions.test.js.snap b/packages/volto/src/helpers/Extensions/__snapshots__/withBlockExtensions.test.jsx.snap similarity index 100% rename from packages/volto/src/helpers/Extensions/__snapshots__/withBlockExtensions.test.js.snap rename to packages/volto/src/helpers/Extensions/__snapshots__/withBlockExtensions.test.jsx.snap diff --git a/packages/volto/src/helpers/Extensions/withBlockExtensions.test.js b/packages/volto/src/helpers/Extensions/withBlockExtensions.test.jsx similarity index 100% rename from packages/volto/src/helpers/Extensions/withBlockExtensions.test.js rename to packages/volto/src/helpers/Extensions/withBlockExtensions.test.jsx diff --git a/packages/volto/src/helpers/Utils/Utils.test.js b/packages/volto/src/helpers/Utils/Utils.test.jsx similarity index 100% rename from packages/volto/src/helpers/Utils/Utils.test.js rename to packages/volto/src/helpers/Utils/Utils.test.jsx From cfea4d988d25e41779b0742606bf43fa43d2bbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Sun, 8 Dec 2024 16:35:31 +0100 Subject: [PATCH 3/3] Update @plone/* packages info (#6521) Co-authored-by: Steve Piercy --- PACKAGES.md | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/PACKAGES.md b/PACKAGES.md index 5e12ae1955..5f72ef477c 100644 --- a/PACKAGES.md +++ b/PACKAGES.md @@ -2,17 +2,37 @@ This document describes the packages that come with Volto, the default frontend for Plone 6. +These packages are part of Plone's API-first story. +Most of them are experimental and are marked in their respective `README` files. +Plone 6.1.x (Volto 18) depends on: +- `@plone/registry` +- `@plone/scripts` +- `@plone/volto-slate` + +and as a development dependency: +- `@plone/types` + +Plone 6.0.x (Volto 17 and below) does not use any of them. + +These packages are expected to be used and become part of Plone 7. +Some of them might become part of Plone 6.1.x minor versions. + +The packages are divided into three categories or types: + +- core +- utilities +- add-ons + ## `@plone/types` Plone types is a special development package. It contains the Plone typings for TypeScript. -It's considered a core package, and it's the only package that the other core packages can rely on as -a `devDependency` in your project configuration. +It's considered a core package, and it's the only package that the other core packages can rely on as a `devDependency` in your project configuration. This package contains `.d.ts` typing definitions, curated by hand. -Due to the nature of this package, it does not need bundling. -It's published "as is", so you can import the type definitions from anywhere in your code. +Due to the nature of this package, it does not need to be built nor bundled. +It is published "as is", so you can import the type definitions from anywhere in your code. ## Core packages @@ -29,12 +49,10 @@ They must be published and bundled in a traditional (transpiled) way. The bundle of these packages must work on both CommonJS and ECMAScript Module (ESM) environments. -## Utility packages +## Utilities packages -- `@plone/drivers` -- `@plone/helpers` - `@plone/providers` -- `@plone/rsc` +- `@plone/helpers` ### Rules @@ -44,19 +62,22 @@ They must be published in the traditional way, as a bundle. This bundle must work on both CommonJS and ESM environments. -## Feature packages +## Add-on packages - `@plone/blocks` -- `@plone/contents` - `@plone/slots` +- `@plone/theming` +- `@plone/contents` ### Rules -Feature packages, or add-on packages, can depend on any other package. +Add-on or feature packages, can depend on any other package. You must distribute them as source code, and not transpile them. They must provide a default configuration registry loader as the default main entry point export. -They must be loadable as any other add-on. +Unlike Volto add-ons, do *NOT* place the code in the `src` folder. +If you do not transpile the package, the direct resolution must work out of the box, where both the bundler and TypeScript resolution are direct. +They must be loadable as any other add-on, and contain an add-on registry compatible `install`-able default export. ## Development utility packages