From 4c494c6415bc33e559cd2a85cbce164aaf88c4a9 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Thu, 24 Oct 2024 16:39:27 +0200 Subject: [PATCH] Revert "Revert "Misc Fixes"" This reverts commit 3cff95e573b74166403d63d92811159936094b3e. --- packages/volto-light-theme/package.json | 6 +- .../Widgets/BlockAlignmentWidget.tsx | 4 +- .../components/Widgets/BlockWidthWidget.tsx | 4 +- pnpm-lock.yaml | 154 ++++++++++++++++-- 4 files changed, 152 insertions(+), 16 deletions(-) diff --git a/packages/volto-light-theme/package.json b/packages/volto-light-theme/package.json index 0eacc7a0..3fcef2c8 100644 --- a/packages/volto-light-theme/package.json +++ b/packages/volto-light-theme/package.json @@ -37,12 +37,16 @@ "devDependencies": { "@plone/scripts": "^3.6.2", "@plone/types": "workspace:*", + "@types/jest": "^29.5.8", + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1", "react-redux": "8.1.2", "react-router-dom": "5.2.0", "release-it": "^17.7.0" }, "dependencies": { - "@plone/components": "workspace:*" + "@plone/components": "workspace:*", + "uuid": "^10.0.0" }, "peerDependencies": { "@eeacms/volto-accordion-block": "^10.4.6", diff --git a/packages/volto-light-theme/src/components/Widgets/BlockAlignmentWidget.tsx b/packages/volto-light-theme/src/components/Widgets/BlockAlignmentWidget.tsx index dbc57941..f14cdd2d 100644 --- a/packages/volto-light-theme/src/components/Widgets/BlockAlignmentWidget.tsx +++ b/packages/volto-light-theme/src/components/Widgets/BlockAlignmentWidget.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import ButtonsWidget, { ButtonsWidgetProps } from './ButtonsWidget'; +import ButtonsWidget, { type ButtonsWidgetProps } from './ButtonsWidget'; import imageFitSVG from '@plone/volto/icons/image-fit.svg'; import imageLeftSVG from '@plone/volto/icons/image-left.svg'; import imageRightSVG from '@plone/volto/icons/image-right.svg'; @@ -51,7 +51,7 @@ const DEFAULT_ACTIONS = [ }, ]; -const BlockAlignmentWidget: React.FC = (props) => { +const BlockAlignmentWidget = (props: ButtonsWidgetProps) => { const intl = useIntl(); const { actions = DEFAULT_ACTIONS, actionsInfoMap, filterActions } = props; diff --git a/packages/volto-light-theme/src/components/Widgets/BlockWidthWidget.tsx b/packages/volto-light-theme/src/components/Widgets/BlockWidthWidget.tsx index e8e4ced4..363e6477 100644 --- a/packages/volto-light-theme/src/components/Widgets/BlockWidthWidget.tsx +++ b/packages/volto-light-theme/src/components/Widgets/BlockWidthWidget.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import ButtonsWidget, { ButtonsWidgetProps } from './ButtonsWidget'; +import ButtonsWidget, { type ButtonsWidgetProps } from './ButtonsWidget'; import imageFitSVG from '@plone/volto/icons/image-fit.svg'; import imageNarrowSVG from '@plone/volto/icons/image-narrow.svg'; import imageWideSVG from '@plone/volto/icons/image-wide.svg'; @@ -64,7 +64,7 @@ const DEFAULT_ACTIONS = [ }, ]; -const BlockWidthWidget: React.FC = (props) => { +const BlockWidthWidget = (props: ButtonsWidgetProps) => { const intl = useIntl(); const { actions = DEFAULT_ACTIONS, actionsInfoMap, filterActions } = props; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bdbf33d8..6a3a30b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -616,7 +616,7 @@ importers: version: 1.0.10 wait-on: specifier: ^7.2.0 - version: 7.2.0(debug@4.3.2) + version: 7.2.0 devDependencies: release-it: specifier: ^16.1.3 @@ -1341,7 +1341,7 @@ importers: dependencies: '@plone/scripts': specifier: '*' - version: 3.6.2(debug@4.3.2) + version: 3.6.2 core/packages/volto-slate: dependencies: @@ -1380,7 +1380,7 @@ importers: version: 3.12.1(react@18.2.0) react-redux: specifier: 8.1.2 - version: 8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) + version: 8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) react-router-dom: specifier: 5.2.0 version: 5.2.0(react@18.2.0) @@ -1487,23 +1487,35 @@ importers: version: 4.17.21 react: specifier: 18.2.0 - version: 18.2.0 + version: 18.3.1 react-intl: specifier: ^3.12.1 version: 3.12.1(react@18.2.0) + uuid: + specifier: ^10.0.0 + version: 10.0.0 devDependencies: '@plone/scripts': specifier: ^3.6.2 - version: 3.6.2(debug@4.3.2) + version: 3.6.2 '@plone/types': specifier: workspace:* version: link:../../core/packages/types + '@types/jest': + specifier: ^29.5.8 + version: 29.5.12 + '@types/react': + specifier: ^18.3.12 + version: 18.3.12 + '@types/react-dom': + specifier: ^18.3.1 + version: 18.3.1 react-redux: specifier: 8.1.2 - version: 8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.11)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) + version: 8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.2.0(react@18.3.1))(react@18.3.1)(redux@4.2.1) react-router-dom: specifier: 5.2.0 - version: 5.2.0(react@18.2.0) + version: 5.2.0(react@18.3.1) release-it: specifier: ^17.7.0 version: 17.7.0(typescript@5.6.3) @@ -5447,6 +5459,9 @@ packages: '@types/react@18.3.11': resolution: {integrity: sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==} + '@types/react@18.3.12': + resolution: {integrity: sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==} + '@types/resolve@1.20.6': resolution: {integrity: sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==} @@ -14524,6 +14539,10 @@ packages: resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} engines: {node: '>= 0.4.0'} + uuid@10.0.0: + resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} + hasBin: true + uuid@3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -18182,6 +18201,27 @@ snapshots: transitivePeerDependencies: - supports-color + '@plone/scripts@3.6.2': + dependencies: + '@babel/core': 7.24.3 + babel-plugin-react-intl: 5.1.17 + babel-preset-razzle: 4.2.17 + chalk: 4.1.2 + commander: 8.2.0 + comment-json: 4.2.3 + execa: 0.6.3 + find-parent-dir: 0.3.1 + fs-extra: 10.1.0 + git-url-parse: 13.1.1 + glob: 7.1.6 + lodash: 4.17.21 + mrs-developer: 2.2.0 + pofile: 1.0.10 + wait-on: 7.2.0 + transitivePeerDependencies: + - debug + - supports-color + '@plone/scripts@3.6.2(debug@4.3.2)': dependencies: '@babel/core': 7.24.3 @@ -20704,7 +20744,7 @@ snapshots: '@types/hoist-non-react-statics@3.3.5': dependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 hoist-non-react-statics: 3.3.2 '@types/html-minifier-terser@6.1.0': {} @@ -20816,7 +20856,7 @@ snapshots: '@types/react-dom@18.3.1': dependencies: - '@types/react': 18.3.11 + '@types/react': 18.3.12 '@types/react-redux@7.1.33': dependencies: @@ -20834,7 +20874,7 @@ snapshots: '@types/react-router@5.1.20': dependencies: '@types/history': 4.7.11 - '@types/react': 18.3.11 + '@types/react': 18.2.27 '@types/react-test-renderer@18.0.7': dependencies: @@ -20856,6 +20896,12 @@ snapshots: dependencies: '@types/prop-types': 15.7.11 csstype: 3.1.3 + optional: true + + '@types/react@18.3.12': + dependencies: + '@types/prop-types': 15.7.11 + csstype: 3.1.3 '@types/resolve@1.20.6': {} @@ -20910,7 +20956,7 @@ snapshots: '@types/testing-library__react@9.1.3': dependencies: - '@types/react-dom': 18.3.1 + '@types/react-dom': 18.2.12 '@types/testing-library__dom': 7.5.0 pretty-format: 25.5.0 @@ -21800,6 +21846,14 @@ snapshots: transitivePeerDependencies: - debug + axios@1.6.8: + dependencies: + follow-redirects: 1.15.6(debug@4.3.2) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axios@1.6.8(debug@4.3.2): dependencies: follow-redirects: 1.15.6(debug@4.3.2) @@ -27900,6 +27954,13 @@ snapshots: react: 18.2.0 tiny-warning: 1.0.3 + mini-create-react-context@0.4.1(prop-types@15.7.2)(react@18.3.1): + dependencies: + '@babel/runtime': 7.20.6 + prop-types: 15.7.2 + react: 18.3.1 + tiny-warning: 1.0.3 + mini-css-extract-plugin@2.7.2(webpack@5.90.1): dependencies: schema-utils: 4.2.0 @@ -30183,6 +30244,36 @@ snapshots: react-dom: 18.2.0(react@18.2.0) redux: 4.2.1 + react-redux@8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1): + dependencies: + '@babel/runtime': 7.20.6 + '@types/hoist-non-react-statics': 3.3.5 + '@types/use-sync-external-store': 0.0.3 + hoist-non-react-statics: 3.3.2 + react: 18.2.0 + react-is: 18.2.0 + use-sync-external-store: 1.2.0(react@18.2.0) + optionalDependencies: + '@types/react': 18.3.12 + '@types/react-dom': 18.3.1 + react-dom: 18.2.0(react@18.2.0) + redux: 4.2.1 + + react-redux@8.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.2.0(react@18.3.1))(react@18.3.1)(redux@4.2.1): + dependencies: + '@babel/runtime': 7.20.6 + '@types/hoist-non-react-statics': 3.3.5 + '@types/use-sync-external-store': 0.0.3 + hoist-non-react-statics: 3.3.2 + react: 18.3.1 + react-is: 18.2.0 + use-sync-external-store: 1.2.0(react@18.3.1) + optionalDependencies: + '@types/react': 18.3.12 + '@types/react-dom': 18.3.1 + react-dom: 18.2.0(react@18.3.1) + redux: 4.2.1 + react-refresh@0.14.0: {} react-refresh@0.9.0: {} @@ -30204,6 +30295,17 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 + react-router-dom@5.2.0(react@18.3.1): + dependencies: + '@babel/runtime': 7.20.6 + history: 4.10.1 + loose-envify: 1.4.0 + prop-types: 15.7.2 + react: 18.3.1 + react-router: 5.2.0(react@18.3.1) + tiny-invariant: 1.3.3 + tiny-warning: 1.0.3 + react-router-hash-link@2.4.3(react-router-dom@5.2.0(react@18.2.0))(react@18.2.0): dependencies: prop-types: 15.7.2 @@ -30224,6 +30326,20 @@ snapshots: tiny-invariant: 1.3.3 tiny-warning: 1.0.3 + react-router@5.2.0(react@18.3.1): + dependencies: + '@babel/runtime': 7.20.6 + history: 4.10.1 + hoist-non-react-statics: 3.3.2 + loose-envify: 1.4.0 + mini-create-react-context: 0.4.1(prop-types@15.7.2)(react@18.3.1) + path-to-regexp: 1.8.0 + prop-types: 15.7.2 + react: 18.3.1 + react-is: 16.13.1 + tiny-invariant: 1.3.3 + tiny-warning: 1.0.3 + react-select-async-paginate@0.5.3(react-dom@18.2.0(react@18.2.0))(react-select@4.3.1(@types/react@18.2.27)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react@18.2.0): dependencies: '@babel/runtime': 7.20.6 @@ -32638,6 +32754,10 @@ snapshots: dependencies: react: 18.2.0 + use-sync-external-store@1.2.0(react@18.3.1): + dependencies: + react: 18.3.1 + use-trace-update@1.3.2: {} use@3.1.1: {} @@ -32665,6 +32785,8 @@ snapshots: utils-merge@1.0.1: {} + uuid@10.0.0: {} + uuid@3.4.0: {} uuid@8.3.2: {} @@ -32935,6 +33057,16 @@ snapshots: transitivePeerDependencies: - debug + wait-on@7.2.0: + dependencies: + axios: 1.6.8 + joi: 17.12.2 + lodash: 4.17.21 + minimist: 1.2.8 + rxjs: 7.8.1 + transitivePeerDependencies: + - debug + wait-on@7.2.0(debug@4.3.2): dependencies: axios: 1.6.8(debug@4.3.2)