diff --git a/.eslintrc.js b/.eslintrc.js index 09458bba..c1a0b70a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,16 +1,58 @@ +const fs = require('fs'); +const projectRootPath = __dirname; +const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry'); + +let coreLocation; +if (fs.existsSync(`${projectRootPath}/core`)) + coreLocation = `${projectRootPath}/core`; +else if (fs.existsSync(`${projectRootPath}/../../core`)) + coreLocation = `${projectRootPath}/../../core`; + +const registry = new AddonConfigurationRegistry( + `${coreLocation}/packages/volto`, +); + +// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons +const addonAliases = Object.keys(registry.packages).map((o) => [ + o, + registry.packages[o].modulePath, +]); + module.exports = { - extends: './core/packages/volto/.eslintrc', + extends: `${coreLocation}/packages/volto/.eslintrc`, rules: { 'import/no-unresolved': 1, + 'import/named': 'error', + 'react/jsx-filename-extension': 'error', + 'no-restricted-imports': [ + 'error', + { + name: '@plone/volto/components', + message: + 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.', + }, + { + name: '@plone/volto/helpers', + message: + 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.', + }, + { + name: '@plone/volto/actions', + message: + 'Importing from barrel files is not allowed. Please use direct imports of the modules instead.', + }, + ], + 'react/jsx-key': [2, { checkFragmentShorthand: true }], }, settings: { 'import/resolver': { alias: { map: [ - ['@plone/volto', './core/packages/volto/src'], - ['@plone/volto-slate', './core/packages/volto-slate/src'], - ['@plone/registry', './core/packages/registry/src'], + ['@plone/volto', `${coreLocation}/packages/volto/src`], + ['@plone/volto-slate', `${coreLocation}/packages/volto-slate/src`], + ['@plone/registry', `${coreLocation}/packages/registry/src`], ['@kitconcept/volto-light-theme', './packages/volto-light-theme/src'], + ...addonAliases, ], extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], }, diff --git a/CHANGELOG.md b/CHANGELOG.md index b2f91255..b99e2189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,34 @@ +## 5.0.1 (2024-10-09) + +### Bugfix + +- Fixed missing key in header @sneridagh [#417](https://github.com/kitconcept/volto-light-theme/pull/417) + +### Internal + +- Update versions to latest volto-highlight-block, volto-button-block @sneridagh [#408](https://github.com/kitconcept/volto-light-theme/pull/408) +- Bump `volto-button-block` version @sneridagh + Bump to Volto 18.0.0-alpha.45 [#417](https://github.com/kitconcept/volto-light-theme/pull/417) + +## 5.0.0 (2024-07-02) + +### Breaking + +- Upgrade to a39, enable new image widget @sneridagh + + Breaking: + The new Image widget component is used in the VLT shadowed image component. + The minimum Volto version requirements have changed for this reason. + The new image widget is present in core from these versions on: + - Volto 17.18.0 + - Volto 18.0.0-alpha.36 + + For more information, please take a look at the upgrade guide: + https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md [#405](https://github.com/kitconcept/volto-light-theme/pull/405) + ## 4.0.1 (2024-06-28) ### Bugfix diff --git a/Dockerfile b/Dockerfile index 66d269e3..7c792fec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,6 @@ # syntax=docker/dockerfile:1 ARG VOLTO_VERSION -# TODO: Replace with -# FROM plone/frontend-builder:${VOLTO_VERSION} -# when the main image is ready -FROM ghcr.io/kitconcept/frontend-builder:${VOLTO_VERSION} as builder +FROM plone/frontend-builder:${VOLTO_VERSION} as builder COPY --chown=node packages/volto-light-theme /app/packages/volto-light-theme COPY --chown=node volto.config.js /app/ @@ -17,10 +14,7 @@ RUN --mount=type=cache,id=pnpm,target=/app/.pnpm-store,uid=1000 < +## 5.0.1 (2024-10-09) + +### Bugfix + +- Fixed missing key in header @sneridagh [#417](https://github.com/kitconcept/volto-light-theme/pull/417) + +### Internal + +- Update versions to latest volto-highlight-block, volto-button-block @sneridagh [#408](https://github.com/kitconcept/volto-light-theme/pull/408) +- Bump `volto-button-block` version @sneridagh + Bump to Volto 18.0.0-alpha.45 [#417](https://github.com/kitconcept/volto-light-theme/pull/417) + +## 5.0.0 (2024-07-02) + +### Breaking + +- Upgrade to a39, enable new image widget @sneridagh + + Breaking: + The new Image widget component is used in the VLT shadowed image component. + The minimum Volto version requirements have changed for this reason. + The new image widget is present in core from these versions on: + - Volto 17.18.0 + - Volto 18.0.0-alpha.36 + + For more information, please take a look at the upgrade guide: + https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md [#405](https://github.com/kitconcept/volto-light-theme/pull/405) + ## 4.0.1 (2024-06-28) ### Bugfix diff --git a/packages/volto-light-theme/README.md b/packages/volto-light-theme/README.md index 4358494b..37091597 100644 --- a/packages/volto-light-theme/README.md +++ b/packages/volto-light-theme/README.md @@ -232,17 +232,24 @@ They will be noted properly in the changelog. See a detailed upgrade guide in: https://github.com/kitconcept/volto-light-theme/blob/main/UPGRADE-GUIDE.md -## Development +## Compatibility + +| VLT version | Volto version | +|-------------|---------------| +| 3.x.x | >= Volto 17.0.0-alpha.16 | +| 4.x.x | < Volto 17.18.0 | +| 5.x.x | >= Volto 17.18.0 or >=Volto 18.0.0-alpha.36 | -This theme works under Volto 17 alpha 16 onwards. -Compatibility with Volto 16 might be achieved, but it has to be at customization level in the -specific project add-on. +Compatibility with Volto 16 might be achieved, but it has to be at customization level in the specific project add-on. This is mainly due to the `RenderBlocks` customization that is based in the one in 17 because of the Grid block in core and the autogrouping feature. See more information about the other dependencies in `peerDependencies` in `package.json`. + +## Development + The development of this add-on is done in isolation using a new approach using pnpm workspaces and latest `mrs-developer` and other Volto core improvements. For this reason, it only works with pnpm and Volto 18 (currently in alpha) but it does not mean that the add-on will only work in 18. -### Requisites +### Development requisites - Volto 18 (2024-03-21: currently in alpha) - pnpm as package manager @@ -252,19 +259,32 @@ For this reason, it only works with pnpm and Volto 18 (currently in alpha) but i Run `make help` to list the available commands. ```text -help Show this help -install Installs the dev environment using mrs-developer -i18n Sync i18n -format Format codebase -lint Lint Codebase -test Run unit tests -test-ci Run unit tests in CI -start-backend-docker Starts a Docker-based backend for developing -start-test-acceptance-frontend-dev Start acceptance frontend in dev mode -start-test-acceptance-frontend Start acceptance frontend in prod mode -start-test-acceptance-server Start acceptance server -test-acceptance Start Cypress in interactive mode -test-acceptance-headless Run cypress tests in headless mode for CI +help Show this help +install Installs the add-on in a development environment +start Starts Volto, allowing reloading of the add-on during development +build Build a production bundle for distribution of the project with the add-on +build-deps Build dependencies +i18n Sync i18n +ci-i18n Check if i18n is not synced +format Format codebase +lint Lint, or catch and remove problems, in code base +release Release the add-on on npmjs.org +release-dry-run Dry-run the release of the add-on on npmjs.org +test Run unit tests +ci-test Run unit tests in CI +backend-docker-start Starts a Docker-based backend for development +storybook-start Start Storybook server on port 6006 +storybook-build Build Storybook +acceptance-frontend-dev-start Start acceptance frontend in development mode +acceptance-frontend-prod-start Start acceptance frontend in production mode +acceptance-backend-start Start backend acceptance server +ci-acceptance-backend-start Start backend acceptance server in headless mode for CI +acceptance-test Start Cypress in interactive mode +ci-acceptance-test Run cypress tests in headless mode for CI +acceptance-a11y-frontend-prod-start Start a11y acceptance frontend in prod mode +ci-acceptance-a11y-backend-start Start acceptance a11y server in CI mode (no terminal attached) +acceptance-a11y-test Start a11y Cypress in interactive mode +ci-acceptance-a11y-test Run a11y cypress tests in headless mode for CI ``` ### Development Environment Setup diff --git a/packages/volto-light-theme/news/405.breaking b/packages/volto-light-theme/news/405.breaking deleted file mode 100644 index 6bd52a28..00000000 --- a/packages/volto-light-theme/news/405.breaking +++ /dev/null @@ -1 +0,0 @@ -Upgrade to a39, enable new image widget @sneridagh diff --git a/packages/volto-light-theme/news/418.internal b/packages/volto-light-theme/news/418.internal new file mode 100644 index 00000000..4614bfd3 --- /dev/null +++ b/packages/volto-light-theme/news/418.internal @@ -0,0 +1,2 @@ +Get rid of all imports from Volto barrel files. +Added a rule to enforce not to import from `@plone/volto/components`, `@plone/volto/helpers` or `@plone/volto/actions`. @sneridagh diff --git a/packages/volto-light-theme/news/419.internal b/packages/volto-light-theme/news/419.internal new file mode 100644 index 00000000..819c7638 --- /dev/null +++ b/packages/volto-light-theme/news/419.internal @@ -0,0 +1 @@ +Update to Volto 18a46 @sneridagh diff --git a/packages/volto-light-theme/package.json b/packages/volto-light-theme/package.json index d8458d17..0d521f83 100644 --- a/packages/volto-light-theme/package.json +++ b/packages/volto-light-theme/package.json @@ -1,8 +1,8 @@ { "name": "@kitconcept/volto-light-theme", - "version": "4.0.1", + "version": "5.0.1", "description": "Volto Light Theme by kitconcept", - "main": "src/index.js", + "main": "src/index.jsx", "types": "src/types/index.d.ts", "repository": { "type": "git", @@ -34,20 +34,28 @@ "release-rc": "release-it --preRelease=rc" }, "devDependencies": { - "@plone/scripts": "^3.6.1", - "release-it": "^17.1.1" + "@plone/scripts": "^3.6.2", + "react-redux": "8.1.2", + "react-router-dom": "5.2.0", + "release-it": "^17.7.0" }, "dependencies": { "@plone/components": "workspace:*" }, "peerDependencies": { "@eeacms/volto-accordion-block": "^10.4.6", - "@kitconcept/volto-button-block": "^2.3.1", + "@kitconcept/volto-button-block": "^3.0.2", "@kitconcept/volto-dsgvo-banner": "^2.3.2", "@kitconcept/volto-heading-block": "^2.4.0", - "@kitconcept/volto-highlight-block": "^3.0.1", + "@kitconcept/volto-highlight-block": "^4.0.0", "@kitconcept/volto-introduction-block": "^1.0.0", - "@kitconcept/volto-separator-block": "^4.1.1", - "@kitconcept/volto-slider-block": "^6.3.1" + "@kitconcept/volto-separator-block": "^4.1.2", + "@kitconcept/volto-slider-block": "^6.3.1", + "classnames": "^2.2.6", + "lodash": "4.17.21", + "react": "18.2.0", + "react-intl": "^3.12.1", + "react-redux": "8.1.2", + "react-router-dom": "5.2.0" } } diff --git a/packages/volto-light-theme/src/components/Anontools/Anontools.jsx b/packages/volto-light-theme/src/components/Anontools/Anontools.jsx index bfdb97e3..8d71abe5 100644 --- a/packages/volto-light-theme/src/components/Anontools/Anontools.jsx +++ b/packages/volto-light-theme/src/components/Anontools/Anontools.jsx @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; import config from '@plone/volto/registry'; import { useSelector, shallowEqual } from 'react-redux'; diff --git a/packages/volto-light-theme/src/components/Blocks/EventMetadata/View.jsx b/packages/volto-light-theme/src/components/Blocks/EventMetadata/View.jsx index 78e81eee..915b9128 100644 --- a/packages/volto-light-theme/src/components/Blocks/EventMetadata/View.jsx +++ b/packages/volto-light-theme/src/components/Blocks/EventMetadata/View.jsx @@ -1,8 +1,8 @@ import React from 'react'; import { FormattedMessage, injectIntl } from 'react-intl'; -import { FormattedDate } from '@plone/volto/components'; -import { UniversalLink } from '@plone/volto/components'; -import { expandToBackendURL } from '@plone/volto/helpers'; +import FormattedDate from '@plone/volto/components/theme/FormattedDate/FormattedDate'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; +import { expandToBackendURL } from '@plone/volto/helpers/Url/Url'; import { Container } from '@plone/components'; const EventMetadataView = (props) => { diff --git a/packages/volto-light-theme/src/components/Blocks/Image/Edit.jsx b/packages/volto-light-theme/src/components/Blocks/Image/Edit.jsx index ea3d75dc..b0912abf 100644 --- a/packages/volto-light-theme/src/components/Blocks/Image/Edit.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Image/Edit.jsx @@ -1,12 +1,10 @@ import React from 'react'; import cx from 'classnames'; -import { ImageSidebar, SidebarPortal } from '@plone/volto/components'; +import ImageSidebar from '@plone/volto/components/manage/Blocks/Image/ImageSidebar'; +import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal'; -import { - flattenToAppURL, - isInternalURL, - withBlockExtensions, -} from '@plone/volto/helpers'; +import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers/Url/Url'; +import { withBlockExtensions } from '@plone/volto/helpers/Extensions'; import config from '@plone/volto/registry'; import { ImageInput } from '@plone/volto/components/manage/Widgets/ImageWidget'; diff --git a/packages/volto-light-theme/src/components/Blocks/Image/ImageSidebar.jsx b/packages/volto-light-theme/src/components/Blocks/Image/ImageSidebar.jsx index ac715f90..7be13960 100644 --- a/packages/volto-light-theme/src/components/Blocks/Image/ImageSidebar.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Image/ImageSidebar.jsx @@ -2,8 +2,10 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Segment, Button } from 'semantic-ui-react'; import { useIntl, FormattedMessage, defineMessages } from 'react-intl'; -import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers'; -import { BlockDataForm, Icon, Image } from '@plone/volto/components'; +import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers/Url/Url'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; +import { BlockDataForm } from '@plone/volto/components/manage/Form'; +import Image from '@plone/volto/components/theme/Image/Image'; import { ImageSchema } from '@plone/volto/components/manage/Blocks/Image/schema'; import imageSVG from '@plone/volto/icons/image.svg'; import trashSVG from '@plone/volto/icons/delete.svg'; diff --git a/packages/volto-light-theme/src/components/Blocks/Image/View.jsx b/packages/volto-light-theme/src/components/Blocks/Image/View.jsx index fe68d073..2200001d 100644 --- a/packages/volto-light-theme/src/components/Blocks/Image/View.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Image/View.jsx @@ -5,14 +5,11 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { UniversalLink } from '@plone/volto/components'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; import cx from 'classnames'; import Caption from '../../Caption/Caption'; -import { - flattenToAppURL, - isInternalURL, - withBlockExtensions, -} from '@plone/volto/helpers'; +import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers/Url/Url'; +import { withBlockExtensions } from '@plone/volto/helpers/Extensions'; import config from '@plone/volto/registry'; /** diff --git a/packages/volto-light-theme/src/components/Blocks/Listing/DefaultTemplate.jsx b/packages/volto-light-theme/src/components/Blocks/Listing/DefaultTemplate.jsx index 77a1c2af..c896dd2c 100644 --- a/packages/volto-light-theme/src/components/Blocks/Listing/DefaultTemplate.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Listing/DefaultTemplate.jsx @@ -1,8 +1,9 @@ // See Customization for more info import React from 'react'; import PropTypes from 'prop-types'; -import { ConditionalLink, UniversalLink } from '@plone/volto/components'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import ConditionalLink from '@plone/volto/components/manage/ConditionalLink/ConditionalLink'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; import { isInternalURL } from '@plone/volto/helpers/Url/Url'; diff --git a/packages/volto-light-theme/src/components/Blocks/Listing/GridTemplate.jsx b/packages/volto-light-theme/src/components/Blocks/Listing/GridTemplate.jsx index a70a09f1..d42d79b4 100644 --- a/packages/volto-light-theme/src/components/Blocks/Listing/GridTemplate.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Listing/GridTemplate.jsx @@ -1,7 +1,9 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { ConditionalLink, Component } from '@plone/volto/components'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import ConditionalLink from '@plone/volto/components/manage/ConditionalLink/ConditionalLink'; +import Component from '@plone/volto/components/theme/Component/Component'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; + import config from '@plone/volto/registry'; import { isInternalURL } from '@plone/volto/helpers/Url/Url'; diff --git a/packages/volto-light-theme/src/components/Blocks/Listing/ImageGallery.jsx b/packages/volto-light-theme/src/components/Blocks/Listing/ImageGallery.jsx index 67922fc8..fdf1af91 100644 --- a/packages/volto-light-theme/src/components/Blocks/Listing/ImageGallery.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Listing/ImageGallery.jsx @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import loadable from '@loadable/component'; import 'react-image-gallery/styles/css/image-gallery.css'; import { Button } from 'semantic-ui-react'; -import { Icon } from '@plone/volto/components'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; import config from '@plone/volto/registry'; import galleryLeftSVG from '../../../icons/left-key.svg'; diff --git a/packages/volto-light-theme/src/components/Blocks/Listing/SummaryTemplate.jsx b/packages/volto-light-theme/src/components/Blocks/Listing/SummaryTemplate.jsx index e20eeef8..36248d69 100644 --- a/packages/volto-light-theme/src/components/Blocks/Listing/SummaryTemplate.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Listing/SummaryTemplate.jsx @@ -1,7 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { ConditionalLink, Component } from '@plone/volto/components'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import ConditionalLink from '@plone/volto/components/manage/ConditionalLink/ConditionalLink'; +import Component from '@plone/volto/components/theme/Component/Component'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; import config from '@plone/volto/registry'; import { isInternalURL } from '@plone/volto/helpers/Url/Url'; diff --git a/packages/volto-light-theme/src/components/Blocks/Search/components/SearchInput.jsx b/packages/volto-light-theme/src/components/Blocks/Search/components/SearchInput.jsx index 3b823114..79a884de 100644 --- a/packages/volto-light-theme/src/components/Blocks/Search/components/SearchInput.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Search/components/SearchInput.jsx @@ -5,7 +5,7 @@ import React from 'react'; import { Button, Input } from 'semantic-ui-react'; import { defineMessages, useIntl } from 'react-intl'; -import { Icon } from '@plone/volto/components'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; import loupeSVG from '@plone/volto/icons/zoom.svg'; const messages = defineMessages({ diff --git a/packages/volto-light-theme/src/components/Blocks/Slate/ExtraAlignWrapper.js b/packages/volto-light-theme/src/components/Blocks/Slate/ExtraAlignWrapper.jsx similarity index 100% rename from packages/volto-light-theme/src/components/Blocks/Slate/ExtraAlignWrapper.js rename to packages/volto-light-theme/src/components/Blocks/Slate/ExtraAlignWrapper.jsx diff --git a/packages/volto-light-theme/src/components/Blocks/Slider/DefaultBody.jsx b/packages/volto-light-theme/src/components/Blocks/Slider/DefaultBody.jsx index 2dcff34d..5f7df344 100644 --- a/packages/volto-light-theme/src/components/Blocks/Slider/DefaultBody.jsx +++ b/packages/volto-light-theme/src/components/Blocks/Slider/DefaultBody.jsx @@ -1,8 +1,10 @@ import React from 'react'; import { useIntl, defineMessages } from 'react-intl'; -import { Icon, MaybeWrap, UniversalLink } from '@plone/volto/components'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; +import MaybeWrap from '@plone/volto/components/manage/MaybeWrap/MaybeWrap'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; import { Input, Button, Message } from 'semantic-ui-react'; -import { isInternalURL } from '@plone/volto/helpers'; +import { isInternalURL } from '@plone/volto/helpers/Url/Url'; import cx from 'classnames'; import navTreeSVG from '@plone/volto/icons/nav.svg'; import imageBlockSVG from '@plone/volto/components/manage/Blocks/Image/block-image.svg'; diff --git a/packages/volto-light-theme/src/components/Breadcrumbs/Breadcrumbs.jsx b/packages/volto-light-theme/src/components/Breadcrumbs/Breadcrumbs.jsx index 49db0ead..293b2730 100644 --- a/packages/volto-light-theme/src/components/Breadcrumbs/Breadcrumbs.jsx +++ b/packages/volto-light-theme/src/components/Breadcrumbs/Breadcrumbs.jsx @@ -7,9 +7,10 @@ import { Link } from 'react-router-dom'; import { defineMessages, injectIntl } from 'react-intl'; import { Container } from '@plone/components'; -import { Icon } from '@plone/volto/components'; -import { getBreadcrumbs } from '@plone/volto/actions'; -import { getBaseUrl, hasApiExpander } from '@plone/volto/helpers'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; +import { getBreadcrumbs } from '@plone/volto/actions/breadcrumbs/breadcrumbs'; +import { getBaseUrl } from '@plone/volto/helpers/Url/Url'; +import { hasApiExpander } from '@plone/volto/helpers/Utils/Utils'; import homeSVG from '@plone/volto/icons/home.svg'; diff --git a/packages/volto-light-theme/src/components/Footer/Footer.jsx b/packages/volto-light-theme/src/components/Footer/Footer.jsx index ddb33504..0576f05f 100644 --- a/packages/volto-light-theme/src/components/Footer/Footer.jsx +++ b/packages/volto-light-theme/src/components/Footer/Footer.jsx @@ -3,9 +3,10 @@ import React from 'react'; import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; import { useSelector, shallowEqual } from 'react-redux'; -import { UniversalLink, Logo } from '@plone/volto/components'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; +import Logo from '@plone/volto/components/theme/Logo/Logo'; import { Container } from '@plone/components'; -import { flattenToAppURL, addAppURL } from '@plone/volto/helpers'; +import { flattenToAppURL, addAppURL } from '@plone/volto/helpers/Url/Url'; import config from '@plone/volto/registry'; const messages = defineMessages({ diff --git a/packages/volto-light-theme/src/components/Header/Header.jsx b/packages/volto-light-theme/src/components/Header/Header.jsx index 83b96e0e..aae90d1e 100644 --- a/packages/volto-light-theme/src/components/Header/Header.jsx +++ b/packages/volto-light-theme/src/components/Header/Header.jsx @@ -8,14 +8,12 @@ import config from '@plone/volto/registry'; import cx from 'classnames'; import IntranetSearchWidget from '../SearchWidget/IntranetSearchWidget'; -import { - Anontools, - LanguageSelector, - Logo, - Navigation, - SearchWidget, - UniversalLink, -} from '@plone/volto/components'; +import Anontools from '@plone/volto/components/theme/Anontools/Anontools'; +import LanguageSelector from '@plone/volto/components/theme/LanguageSelector/LanguageSelector'; +import Logo from '@plone/volto/components/theme/Logo/Logo'; +import Navigation from '@plone/volto/components/theme/Navigation/Navigation'; +import SearchWidget from '@plone/volto/components/theme/SearchWidget/SearchWidget'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; const messages = defineMessages({ siteLabel: { @@ -74,7 +72,9 @@ const IntranetHeader = ({ pathname, siteLabel, token, siteAction }) => { {!token && } {siteAction && siteAction.map((item) => ( - {item.title} + + {item.title} + ))} {siteLabel && ( diff --git a/packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.js b/packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.jsx similarity index 87% rename from packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.js rename to packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.jsx index af545002..c2a399c2 100644 --- a/packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.js +++ b/packages/volto-light-theme/src/components/LanguageSelector/LanguageSelector.jsx @@ -5,12 +5,10 @@ import { useSelector } from 'react-redux'; import cx from 'classnames'; import { find, map } from 'lodash'; -import { - Helmet, - langmap, - flattenToAppURL, - toReactIntlLang, -} from '@plone/volto/helpers'; +import Helmet from '@plone/volto/helpers/Helmet/Helmet'; +import langmap from '@plone/volto/helpers/LanguageMap/LanguageMap'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; +import { toReactIntlLang } from '@plone/volto/helpers/Utils/Utils'; import config from '@plone/volto/registry'; diff --git a/packages/volto-light-theme/src/components/Logo/Logo.jsx b/packages/volto-light-theme/src/components/Logo/Logo.jsx index eb21078a..4c087481 100644 --- a/packages/volto-light-theme/src/components/Logo/Logo.jsx +++ b/packages/volto-light-theme/src/components/Logo/Logo.jsx @@ -2,10 +2,10 @@ import { defineMessages, useIntl } from 'react-intl'; import { useSelector } from 'react-redux'; import config from '@plone/volto/registry'; -import { UniversalLink } from '@plone/volto/components'; -import { toBackendLang } from '@plone/volto/helpers'; +import UniversalLink from '@plone/volto/components/manage/UniversalLink/UniversalLink'; +import { toBackendLang } from '@plone/volto/helpers/Utils/Utils'; import LogoImage from '@plone/volto/components/theme/Logo/Logo.svg'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import { flattenToAppURL } from '@plone/volto/helpers/Url/Url'; const messages = defineMessages({ site: { diff --git a/packages/volto-light-theme/src/components/MobileNavigation/MobileNavigation.jsx b/packages/volto-light-theme/src/components/MobileNavigation/MobileNavigation.jsx index ea32829f..20f706d2 100644 --- a/packages/volto-light-theme/src/components/MobileNavigation/MobileNavigation.jsx +++ b/packages/volto-light-theme/src/components/MobileNavigation/MobileNavigation.jsx @@ -7,8 +7,9 @@ import { CSSTransition } from 'react-transition-group'; import { doesNodeContainClick } from 'semantic-ui-react/dist/commonjs/lib'; import config from '@plone/volto/registry'; -import { Icon, SearchWidget } from '@plone/volto/components'; -import { toBackendLang } from '@plone/volto/helpers'; +import Icon from '@plone/volto/components/theme/Icon/Icon'; +import SearchWidget from '@plone/volto/components/theme/SearchWidget/SearchWidget'; +import { toBackendLang } from '@plone/volto/helpers/Utils/Utils'; import arrowRightSVG from '@plone/volto/icons/right-key.svg'; import arrowLeftSVG from '@plone/volto/icons/left-key.svg'; import { MobileNavigationToggler } from './MobileNavigationToggler'; diff --git a/packages/volto-light-theme/src/components/MobileNavigation/MobileToolsFooter.jsx b/packages/volto-light-theme/src/components/MobileNavigation/MobileToolsFooter.jsx index 13929ac0..3ad11b4e 100644 --- a/packages/volto-light-theme/src/components/MobileNavigation/MobileToolsFooter.jsx +++ b/packages/volto-light-theme/src/components/MobileNavigation/MobileToolsFooter.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { LanguageSelector } from '@plone/volto/components'; +import LanguageSelector from '@plone/volto/components/theme/LanguageSelector/LanguageSelector'; export const MobileToolsFooter = () => (