From 47b27bf16827d5af4a743adc53478c9654721ae7 Mon Sep 17 00:00:00 2001 From: ichim-david Date: Wed, 26 Jun 2024 17:02:33 +0300 Subject: [PATCH 01/16] Fritz hoing Github actions improvements (#6120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fritz Hoeing Co-authored-by: Víctor Fernández de Alba Co-authored-by: Steve Piercy --- .github/actions/node_env_setup/action.yml | 50 +++ .github/workflows/acceptance.yml | 420 ++-------------------- packages/volto/news/6108.internal | 1 + 3 files changed, 75 insertions(+), 396 deletions(-) create mode 100644 .github/actions/node_env_setup/action.yml create mode 100644 packages/volto/news/6108.internal diff --git a/.github/actions/node_env_setup/action.yml b/.github/actions/node_env_setup/action.yml new file mode 100644 index 0000000000..b058a41457 --- /dev/null +++ b/.github/actions/node_env_setup/action.yml @@ -0,0 +1,50 @@ +name: Set up Node.js environment + +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js ${{ inputs.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + + - name: Enable corepack + shell: bash + run: corepack enable + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v4 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Cache Cypress Binary + id: cache-cypress-binary + uses: actions/cache@v4 + with: + path: ~/.cache/Cypress + key: binary-${{ inputs.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} + + - name: Install Volto dependencies + shell: bash + run: pnpm i + + - name: Install Cypress if not in cache + if: steps.cache-cypress-binary.outputs.cache-hit != 'true' + shell: bash + working-directory: packages/volto + run: make cypress-install + +inputs: + node-version: + description: 'Node.js version' + required: true diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 62a71b8242..af5967f394 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -13,42 +13,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -92,42 +61,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -171,42 +109,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -250,42 +157,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -329,42 +205,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -408,42 +253,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -486,42 +300,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -565,42 +348,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress Coresandbox Acceptance tests uses: cypress-io/github-action@v6 env: @@ -644,42 +396,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -724,42 +445,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -945,42 +635,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -1026,42 +685,11 @@ jobs: steps: - uses: actions/checkout@v4 - # node setup - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - name: Set up Node.js environment + uses: ./.github/actions/node_env_setup with: node-version: ${{ matrix.node-version }} - - name: Enable corepack - run: corepack enable - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v4 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Cache Cypress Binary - id: cache-cypress-binary - uses: actions/cache@v4 - with: - path: ~/.cache/Cypress - key: binary-${{ matrix.node-version }}-${{ hashFiles('pnpm-lock.yaml') }} - - - run: pnpm i - - - name: Install Cypress if not in cache - if: steps.cache-cypress-binary.outputs.cache-hit != 'true' - working-directory: packages/volto - run: make cypress-install - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: diff --git a/packages/volto/news/6108.internal b/packages/volto/news/6108.internal new file mode 100644 index 0000000000..d196847f84 --- /dev/null +++ b/packages/volto/news/6108.internal @@ -0,0 +1 @@ +Improved the existing GitHub workflows by encapsulating a common operation into a reusable action for easier maintenance. @FritzHoing, @ichim-david From 3f3d0c42520823e2ece167c9524b41aabe2e39fc Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Wed, 26 Jun 2024 10:15:24 -0400 Subject: [PATCH 02/16] Added three missing German translations. (#6124) --- packages/volto/locales/de/LC_MESSAGES/volto.po | 6 +++--- packages/volto/news/6124.bugfix | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 packages/volto/news/6124.bugfix diff --git a/packages/volto/locales/de/LC_MESSAGES/volto.po b/packages/volto/locales/de/LC_MESSAGES/volto.po index 7392459f92..268eef0b02 100644 --- a/packages/volto/locales/de/LC_MESSAGES/volto.po +++ b/packages/volto/locales/de/LC_MESSAGES/volto.po @@ -2472,7 +2472,7 @@ msgstr "OK" #. Default: "Only 7-bit bytes characters are allowed. Cannot contain uppercase letters, special characters: <, >, &, #, /, ?, or others that are illegal in URLs. Cannot start with: _, aq_, @@, ++. Cannot end with __. Cannot be: request,contributors, ., .., "". Cannot contain new lines." #: components/manage/Widgets/IdWidget msgid "Only 7-bit bytes characters are allowed. Cannot contain uppercase letters, special characters: <, >, &, #, /, ?, or others that are illegal in URLs. Cannot start with: _, aq_, @@, ++. Cannot end with __. Cannot be: request,contributors, ., .., "". Cannot contain new lines." -msgstr "" +msgstr "Nur 7-Bit Zeichen sind erlaubt. Darf keine Großbuchstaben und Sonderzeichen enthalten: <, >, &, #, /, ? oder andere, die in URLs nicht zulässig sind. Darf nicht beginnen mit: _, aq_, @@, ++. Darf nicht mit __ enden. Kann nicht sein: request,contributors, ., .., "". Darf keine neuen Zeilen enthalten." #. Default: "Open in a new tab" #: components/manage/Blocks/Image/schema @@ -2495,12 +2495,12 @@ msgstr "Objekt-Browser öffnen" #. Default: "Order" #: components/manage/Sidebar/Sidebar msgid "Order" -msgstr "" +msgstr "Reihung" #. Default: "Ordered" #: components/manage/Blocks/ToC/Schema msgid "Ordered" -msgstr "" +msgstr "Nummeriert" #. Default: "Origin" #: components/manage/Blocks/LeadImage/LeadImageSidebar diff --git a/packages/volto/news/6124.bugfix b/packages/volto/news/6124.bugfix new file mode 100644 index 0000000000..15f738a817 --- /dev/null +++ b/packages/volto/news/6124.bugfix @@ -0,0 +1 @@ +Added three missing German translations. [@jensens] From b0ea7326a944cd52d1c9c786da5cd94af6f6d4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Thu, 27 Jun 2024 10:35:13 +0200 Subject: [PATCH 03/16] Upgrade `react-intl` to maximum 3.x series. (#6128) --- apps/plone/package.json | 4 +- packages/coresandbox/package.json | 2 +- packages/types/news/6128.internal | 2 + packages/types/package.json | 4 +- packages/volto/news/6128.internal | 2 + packages/volto/package.json | 2 +- .../{useLinkEditor.js => useLinkEditor.jsx} | 0 pnpm-lock.yaml | 75 +++++++------------ 8 files changed, 38 insertions(+), 53 deletions(-) create mode 100644 packages/types/news/6128.internal create mode 100644 packages/volto/news/6128.internal rename packages/volto/src/components/manage/AnchorPlugin/{useLinkEditor.js => useLinkEditor.jsx} (100%) diff --git a/apps/plone/package.json b/apps/plone/package.json index 3f362f211c..b5e2e0ccb9 100644 --- a/apps/plone/package.json +++ b/apps/plone/package.json @@ -192,7 +192,7 @@ "react-fast-compare": "2.0.4", "react-image-gallery": "1.2.7", "react-intersection-observer": "9.1.0", - "react-intl": "3.8.0", + "react-intl": "3.12.1", "react-intl-redux": "2.3.0", "react-medium-image-zoom": "3.0.15", "react-popper": "^2.3.0", @@ -358,4 +358,4 @@ "why": "0.6.2" }, "theme": "volto-volto-project" -} \ No newline at end of file +} diff --git a/packages/coresandbox/package.json b/packages/coresandbox/package.json index 81bd453993..c9bb7c5219 100644 --- a/packages/coresandbox/package.json +++ b/packages/coresandbox/package.json @@ -28,7 +28,7 @@ "peerDependencies": { "react": "18.2.0", "react-dom": "18.2.0", - "react-intl": "3.8.0", + "react-intl": "3.12.1", "react-redux": "8.1.2", "semantic-ui-react": "2.1.5" }, diff --git a/packages/types/news/6128.internal b/packages/types/news/6128.internal new file mode 100644 index 0000000000..b3cdfd1e74 --- /dev/null +++ b/packages/types/news/6128.internal @@ -0,0 +1,2 @@ +Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. +Rename missing js file that must be jsx. @sneridagh diff --git a/packages/types/package.json b/packages/types/package.json index d40f32daa1..87906c76e7 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -40,7 +40,7 @@ "history": "^5.3.0", "react": "^16.8.0 || ^17.0.0 || ^18.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0", - "react-intl": "3.8.0" + "react-intl": "3.12.1" }, "peerDependenciesMeta": { "react-dom": { @@ -53,7 +53,7 @@ "history": "^5.3.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-intl": "3.8.0", + "react-intl": "3.12.1", "release-it": "^17.1.1", "tsconfig": "workspace:*", "typescript": "5.4.2" diff --git a/packages/volto/news/6128.internal b/packages/volto/news/6128.internal new file mode 100644 index 0000000000..b3cdfd1e74 --- /dev/null +++ b/packages/volto/news/6128.internal @@ -0,0 +1,2 @@ +Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. +Rename missing js file that must be jsx. @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 2166233dab..088c0e24d1 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -229,7 +229,7 @@ "react-fast-compare": "2.0.4", "react-image-gallery": "1.2.7", "react-intersection-observer": "9.1.0", - "react-intl": "3.8.0", + "react-intl": "3.12.1", "react-intl-redux": "2.3.0", "react-medium-image-zoom": "3.0.15", "react-popper": "^2.3.0", diff --git a/packages/volto/src/components/manage/AnchorPlugin/useLinkEditor.js b/packages/volto/src/components/manage/AnchorPlugin/useLinkEditor.jsx similarity index 100% rename from packages/volto/src/components/manage/AnchorPlugin/useLinkEditor.js rename to packages/volto/src/components/manage/AnchorPlugin/useLinkEditor.jsx diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e884ea032c..633e3f7179 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -257,11 +257,11 @@ importers: specifier: 9.1.0 version: 9.1.0(react@18.2.0) react-intl: - specifier: 3.8.0 - version: 3.8.0(react@18.2.0) + specifier: 3.12.1 + version: 3.12.1(react@18.2.0) react-intl-redux: specifier: 2.3.0 - version: 2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.8.0(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0) + version: 2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.12.1(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0) react-medium-image-zoom: specifier: 3.0.15 version: 3.0.15(prop-types@15.7.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -421,7 +421,7 @@ importers: version: 5.15.2(webpack@5.90.1(esbuild@0.20.2)) '@plone/types': specifier: 1.0.0-alpha.11 - version: 1.0.0-alpha.11(history@4.10.1)(react-dom@18.2.0(react@18.2.0))(react-intl@3.8.0(react@18.2.0))(react@18.2.0) + version: 1.0.0-alpha.11(history@4.10.1)(react-dom@18.2.0(react@18.2.0))(react-intl@3.12.1(react@18.2.0))(react@18.2.0) '@plone/volto-coresandbox': specifier: workspace:* version: link:../../packages/coresandbox @@ -1305,8 +1305,8 @@ importers: specifier: 18.2.0 version: 18.2.0(react@18.2.0) react-intl: - specifier: 3.8.0 - version: 3.8.0(react@18.2.0) + specifier: 3.12.1 + version: 3.12.1(react@18.2.0) react-redux: specifier: 8.1.2 version: 8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) @@ -1665,8 +1665,8 @@ importers: specifier: ^18.2.0 version: 18.2.0(react@18.2.0) react-intl: - specifier: 3.8.0 - version: 3.8.0(react@18.2.0) + specifier: 3.12.1 + version: 3.12.1(react@18.2.0) release-it: specifier: ^17.1.1 version: 17.1.1(typescript@5.4.2) @@ -1839,11 +1839,11 @@ importers: specifier: 9.1.0 version: 9.1.0(react@18.2.0) react-intl: - specifier: 3.8.0 - version: 3.8.0(react@18.2.0) + specifier: 3.12.1 + version: 3.12.1(react@18.2.0) react-intl-redux: specifier: 2.3.0 - version: 2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.8.0(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0) + version: 2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.12.1(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0) react-medium-image-zoom: specifier: 3.0.15 version: 3.0.15(prop-types@15.7.2)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -3933,6 +3933,9 @@ packages: '@formatjs/icu-skeleton-parser@1.8.0': resolution: {integrity: sha512-QWLAYvM0n8hv7Nq5BEs4LKIjevpVpbGLAJgOaYzg9wABEoX1j0JO1q2/jVkO6CVlq0dbsxZCngS5aXbysYueqA==} + '@formatjs/intl-displaynames@1.2.10': + resolution: {integrity: sha512-GROA2RP6+7Ouu0WnHFF78O5XIU7pBfI19WM1qm93l6MFWibUk67nCfVCK3VAYJkLy8L8ZxjkYT11VIAfvSz8wg==} + '@formatjs/intl-listformat@1.4.8': resolution: {integrity: sha512-WNMQlEg0e50VZrGIkgD5n7+DAMGt3boKi1GJALfhFMymslJb5i+5WzWxyj/3a929Z6MAFsmzRIJjKuv+BxKAOQ==} @@ -3942,25 +3945,14 @@ packages: '@formatjs/intl-relativetimeformat@4.5.16': resolution: {integrity: sha512-IQ0haY97oHAH5OYUdykNiepdyEWj3SAT+Fp9ZpR85ov2JNiFx+12WWlxlVS8ehdyncC2ZMt/SwFIy2huK2+6/A==} - '@formatjs/intl-unified-numberformat@2.2.0': - resolution: {integrity: sha512-A9ov4uO04pSHG5Iqcrc457hvsq3lz/oWQ3B0I03zbL1rnBC8ttrZEobw3X3k/tWYPXeNJbRtsSbXqzJo55NeBw==} - deprecated: We have renamed the package to @formatjs/intl-numberformat - '@formatjs/intl-unified-numberformat@3.3.7': resolution: {integrity: sha512-KnWgLRHzCAgT9eyt3OS34RHoyD7dPDYhRcuKn+/6Kv2knDF8Im43J6vlSW6Hm1w63fNq3ZIT1cFk7RuVO3Psag==} deprecated: We have renamed the package to @formatjs/intl-numberformat - '@formatjs/intl-utils@1.6.0': - resolution: {integrity: sha512-5D0C4tQgNFJNaJ17BYum0GfAcKNK3oa1VWzgkv/AN7i52fg4r69ZLcpEGpf6tZiX9Qld8CDwTQOeFt6fuOqgVw==} - deprecated: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package - '@formatjs/intl-utils@2.3.0': resolution: {integrity: sha512-KWk80UPIzPmUg+P0rKh6TqspRw0G6eux1PuJr+zz47ftMaZ9QDwbGzHZbtzWkl5hgayM/qrKRutllRC7D/vVXQ==} deprecated: the package is rather renamed to @formatjs/ecma-abstract with some changes in functionality (primarily selectUnit is removed and we don't plan to make any further changes to this package - '@formatjs/macro@0.2.8': - resolution: {integrity: sha512-5IBdn5+D8VGdi6Px0M/PidtqzHVrOj3dVJdV+YmWNRaWHdSvBd1wUd0gMcZnQXAxN+RzlGS/ddfOxFkjSlyQuA==} - '@gar/promisify@1.1.3': resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} @@ -12425,10 +12417,6 @@ packages: intl-format-cache@4.3.1: resolution: {integrity: sha512-OEUYNA7D06agqPOYhbTkl0T8HA3QKSuwWh1HiClEnpd9vw7N+3XsQt5iZ0GUEchp5CW1fQk/tary+NsbF3yQ1Q==} - intl-locales-supported@1.8.12: - resolution: {integrity: sha512-FJPl7p1LYO/C+LpwlDcvVpq7AeFTdFgwnq1JjdNYKjb51xkIxssXRR8LaA0fJFogjwRRztqw1ahgSJMSZsSFdw==} - deprecated: bad publish - intl-messageformat-parser@3.6.4: resolution: {integrity: sha512-RgPGwue0mJtoX2Ax8EmMzJzttxjnva7gx0Q7mKJ4oALrTZvtmCeAw5Msz2PcjW4dtCh/h7vN/8GJCxZO1uv+OA==} deprecated: We've written a new parser that's 6x faster and is backwards compatible. Please use @formatjs/icu-messageformat-parser @@ -16269,8 +16257,8 @@ packages: react-intl: "^2.2.2 ||\_^3.0.0 || ^4.0.0 || ^5.0.0" react-redux: ^5.0.1 || ^6.0.0 || ^7.0.0 - react-intl@3.8.0: - resolution: {integrity: sha512-jWSbc7PUJOpmy0gC9LzTyERpt/auYmMyY0jtCmczgmRns5MIKG9Bav+NpCyZ6XG2jJQgJNWpLkMFy8u7MgjuqA==} + react-intl@3.12.1: + resolution: {integrity: sha512-cgumW29mwROIqyp8NXStYsoIm27+8FqnxykiLSawWjOxGIBeLuN/+p2srei5SRIumcJefOkOIHP+NDck05RgHg==} peerDependencies: react: ^16.3.0 @@ -20990,6 +20978,10 @@ snapshots: '@formatjs/ecma402-abstract': 1.18.2 tslib: 2.6.2 + '@formatjs/intl-displaynames@1.2.10': + dependencies: + '@formatjs/intl-utils': 2.3.0 + '@formatjs/intl-listformat@1.4.8': dependencies: '@formatjs/intl-utils': 2.3.0 @@ -21002,20 +20994,12 @@ snapshots: dependencies: '@formatjs/intl-utils': 2.3.0 - '@formatjs/intl-unified-numberformat@2.2.0': - dependencies: - '@formatjs/intl-utils': 1.6.0 - '@formatjs/intl-unified-numberformat@3.3.7': dependencies: '@formatjs/intl-utils': 2.3.0 - '@formatjs/intl-utils@1.6.0': {} - '@formatjs/intl-utils@2.3.0': {} - '@formatjs/macro@0.2.8': {} - '@gar/promisify@1.1.3': {} '@hapi/hoek@9.3.0': {} @@ -22966,11 +22950,11 @@ snapshots: '@pkgr/core@0.1.1': {} - '@plone/types@1.0.0-alpha.11(history@4.10.1)(react-dom@18.2.0(react@18.2.0))(react-intl@3.8.0(react@18.2.0))(react@18.2.0)': + '@plone/types@1.0.0-alpha.11(history@4.10.1)(react-dom@18.2.0(react@18.2.0))(react-intl@3.12.1(react@18.2.0))(react@18.2.0)': dependencies: history: 4.10.1 react: 18.2.0 - react-intl: 3.8.0(react@18.2.0) + react-intl: 3.12.1(react@18.2.0) optionalDependencies: react-dom: 18.2.0(react@18.2.0) @@ -34412,8 +34396,6 @@ snapshots: intl-format-cache@4.3.1: {} - intl-locales-supported@1.8.12: {} - intl-messageformat-parser@3.6.4: dependencies: '@formatjs/intl-unified-numberformat': 3.3.7 @@ -40017,28 +39999,27 @@ snapshots: dependencies: react: 18.2.0 - react-intl-redux@2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.8.0(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0): + react-intl-redux@2.3.0(@babel/runtime@7.20.6)(prop-types@15.7.2)(react-intl@3.12.1(react@18.2.0))(react-redux@8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1))(react@18.2.0): dependencies: '@babel/runtime': 7.20.6 prop-types: 15.7.2 react: 18.2.0 - react-intl: 3.8.0(react@18.2.0) + react-intl: 3.12.1(react@18.2.0) react-redux: 8.1.2(@types/react-dom@18.2.25)(@types/react@18.2.79)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(redux@4.2.1) - react-intl@3.8.0(react@18.2.0): + react-intl@3.12.1(react@18.2.0): dependencies: + '@formatjs/intl-displaynames': 1.2.10 '@formatjs/intl-listformat': 1.4.8 '@formatjs/intl-relativetimeformat': 4.5.16 - '@formatjs/intl-unified-numberformat': 2.2.0 - '@formatjs/macro': 0.2.8 + '@formatjs/intl-unified-numberformat': 3.3.7 + '@formatjs/intl-utils': 2.3.0 '@types/hoist-non-react-statics': 3.3.5 '@types/invariant': 2.2.37 hoist-non-react-statics: 3.3.2 intl-format-cache: 4.3.1 - intl-locales-supported: 1.8.12 intl-messageformat: 7.8.4 intl-messageformat-parser: 3.6.4 - invariant: 2.2.4 react: 18.2.0 shallow-equal: 1.2.1 From da7f4e290a5bbe134f00dc457b21e9d19a710698 Mon Sep 17 00:00:00 2001 From: dobri1408 <50819975+dobri1408@users.noreply.github.com> Date: Thu, 27 Jun 2024 11:41:03 +0300 Subject: [PATCH 04/16] (feat): Add loading visual and succes message in controlpanel when deleting users and groups (#6127) --- .../volto/locales/ca/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/de/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/en/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/es/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/eu/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/fi/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/fr/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/hi/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/it/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/ja/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/nl/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/pt/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/pt_BR/LC_MESSAGES/volto.po | 12 ++++++ .../volto/locales/ro/LC_MESSAGES/volto.po | 12 ++++++ packages/volto/locales/volto.pot | 14 ++++++- .../volto/locales/zh_CN/LC_MESSAGES/volto.po | 12 ++++++ packages/volto/news/6127.feature | 1 + .../Groups/GroupsControlpanel.jsx | 38 +++++++++++++++++-- .../Controlpanels/Users/UsersControlpanel.jsx | 34 +++++++++++++++-- .../helpers/MessageLabels/MessageLabels.js | 8 ++++ 20 files changed, 266 insertions(+), 9 deletions(-) create mode 100644 packages/volto/news/6127.feature diff --git a/packages/volto/locales/ca/LC_MESSAGES/volto.po b/packages/volto/locales/ca/LC_MESSAGES/volto.po index 5c42ef9742..09175d2f54 100644 --- a/packages/volto/locales/ca/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ca/LC_MESSAGES/volto.po @@ -1597,6 +1597,11 @@ msgstr "Grup" msgid "Group created" msgstr "Grup creat" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2043,6 +2048,8 @@ msgid "Load more" msgstr "Carrega més..." #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Carregant." @@ -4071,6 +4078,11 @@ msgstr "" msgid "User created" msgstr "Usuari creat" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/de/LC_MESSAGES/volto.po b/packages/volto/locales/de/LC_MESSAGES/volto.po index 268eef0b02..f97bac5149 100644 --- a/packages/volto/locales/de/LC_MESSAGES/volto.po +++ b/packages/volto/locales/de/LC_MESSAGES/volto.po @@ -1596,6 +1596,11 @@ msgstr "Gruppe" msgid "Group created" msgstr "Gruppe erstellt" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2042,6 +2047,8 @@ msgid "Load more" msgstr "Mehr laden" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "lädt" @@ -4070,6 +4077,11 @@ msgstr "Benutzer- und Gruppeneinstellungen" msgid "User created" msgstr "Benutzer erstellt" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/en/LC_MESSAGES/volto.po b/packages/volto/locales/en/LC_MESSAGES/volto.po index 94dfc2faeb..71534b0597 100644 --- a/packages/volto/locales/en/LC_MESSAGES/volto.po +++ b/packages/volto/locales/en/LC_MESSAGES/volto.po @@ -1591,6 +1591,11 @@ msgstr "" msgid "Group created" msgstr "" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2037,6 +2042,8 @@ msgid "Load more" msgstr "" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "" @@ -4065,6 +4072,11 @@ msgstr "" msgid "User created" msgstr "" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/es/LC_MESSAGES/volto.po b/packages/volto/locales/es/LC_MESSAGES/volto.po index 7ced43cc15..221399a28b 100644 --- a/packages/volto/locales/es/LC_MESSAGES/volto.po +++ b/packages/volto/locales/es/LC_MESSAGES/volto.po @@ -1598,6 +1598,11 @@ msgstr "Grupo" msgid "Group created" msgstr "Grupo creado" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2044,6 +2049,8 @@ msgid "Load more" msgstr "Cargar más" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Cargando" @@ -4072,6 +4079,11 @@ msgstr "Configuración de usuarios y grupos" msgid "User created" msgstr "Usuario creado" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/eu/LC_MESSAGES/volto.po b/packages/volto/locales/eu/LC_MESSAGES/volto.po index c5da31d564..4e1ada5d92 100644 --- a/packages/volto/locales/eu/LC_MESSAGES/volto.po +++ b/packages/volto/locales/eu/LC_MESSAGES/volto.po @@ -1598,6 +1598,11 @@ msgstr "Taldea" msgid "Group created" msgstr "Taldea ondo sortu da" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2044,6 +2049,8 @@ msgid "Load more" msgstr "Kargatu gehiago" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Kargatzen" @@ -4072,6 +4079,11 @@ msgstr "Erabiltzaile eta Taldeen ezarpenak" msgid "User created" msgstr "Erabiltzailea ondo sortu da" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/fi/LC_MESSAGES/volto.po b/packages/volto/locales/fi/LC_MESSAGES/volto.po index 09fedf3a86..7f2a9c04a7 100644 --- a/packages/volto/locales/fi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fi/LC_MESSAGES/volto.po @@ -1596,6 +1596,11 @@ msgstr "Ryhmä" msgid "Group created" msgstr "Ryhmä luotu" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2042,6 +2047,8 @@ msgid "Load more" msgstr "Lataa lisää" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Ladataan" @@ -4070,6 +4077,11 @@ msgstr "Käyttäjän ryhmän asetukset" msgid "User created" msgstr "Käyttäjä luotu" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/fr/LC_MESSAGES/volto.po b/packages/volto/locales/fr/LC_MESSAGES/volto.po index b33643eaac..7e85f9b365 100644 --- a/packages/volto/locales/fr/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fr/LC_MESSAGES/volto.po @@ -1598,6 +1598,11 @@ msgstr "Groupe" msgid "Group created" msgstr "Groupe créé" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2044,6 +2049,8 @@ msgid "Load more" msgstr "Charger plus..." #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Chargement." @@ -4072,6 +4079,11 @@ msgstr "Configuration des utilisateurs et des groupes" msgid "User created" msgstr "Utilisateur créé" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/hi/LC_MESSAGES/volto.po b/packages/volto/locales/hi/LC_MESSAGES/volto.po index 03f14a3336..cca95e9529 100644 --- a/packages/volto/locales/hi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/hi/LC_MESSAGES/volto.po @@ -1591,6 +1591,11 @@ msgstr "समूह" msgid "Group created" msgstr "समूह बनाया गया" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2037,6 +2042,8 @@ msgid "Load more" msgstr "अधिक लोड करें" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "लोड हो रहा है" @@ -4065,6 +4072,11 @@ msgstr "उपयोगकर्ता समूह सेटिंग्स" msgid "User created" msgstr "उपयोगकर्ता बनाया गया" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/it/LC_MESSAGES/volto.po b/packages/volto/locales/it/LC_MESSAGES/volto.po index 615202eca3..46a7ba3291 100644 --- a/packages/volto/locales/it/LC_MESSAGES/volto.po +++ b/packages/volto/locales/it/LC_MESSAGES/volto.po @@ -1591,6 +1591,11 @@ msgstr "Gruppo" msgid "Group created" msgstr "Gruppo creato" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2037,6 +2042,8 @@ msgid "Load more" msgstr "Carica altro" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Caricamento" @@ -4065,6 +4072,11 @@ msgstr "Impostazioni Gruppi Utenti" msgid "User created" msgstr "Utente creato" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/ja/LC_MESSAGES/volto.po b/packages/volto/locales/ja/LC_MESSAGES/volto.po index 60f7d7aa68..337aa04921 100644 --- a/packages/volto/locales/ja/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ja/LC_MESSAGES/volto.po @@ -1596,6 +1596,11 @@ msgstr "グループ" msgid "Group created" msgstr "グループが作成されました" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2042,6 +2047,8 @@ msgid "Load more" msgstr "" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "読み込み中" @@ -4070,6 +4077,11 @@ msgstr "" msgid "User created" msgstr "ユーザを作成しました" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/nl/LC_MESSAGES/volto.po b/packages/volto/locales/nl/LC_MESSAGES/volto.po index a6dc5cb13e..a851cea783 100644 --- a/packages/volto/locales/nl/LC_MESSAGES/volto.po +++ b/packages/volto/locales/nl/LC_MESSAGES/volto.po @@ -1595,6 +1595,11 @@ msgstr "" msgid "Group created" msgstr "" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2041,6 +2046,8 @@ msgid "Load more" msgstr "" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "" @@ -4069,6 +4076,11 @@ msgstr "" msgid "User created" msgstr "" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/pt/LC_MESSAGES/volto.po b/packages/volto/locales/pt/LC_MESSAGES/volto.po index b3fccd2c3b..ae8d5cba90 100644 --- a/packages/volto/locales/pt/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt/LC_MESSAGES/volto.po @@ -1596,6 +1596,11 @@ msgstr "Grupo" msgid "Group created" msgstr "Grupo criado" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2042,6 +2047,8 @@ msgid "Load more" msgstr "" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "" @@ -4070,6 +4077,11 @@ msgstr "" msgid "User created" msgstr "Utilizador criado" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po index 59c5fd30ae..8badc57061 100644 --- a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po @@ -1597,6 +1597,11 @@ msgstr "Grupo" msgid "Group created" msgstr "Grupo criado" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2043,6 +2048,8 @@ msgid "Load more" msgstr "Carregar mais" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Carregando" @@ -4071,6 +4078,11 @@ msgstr "Configurações de usuários e grupos" msgid "User created" msgstr "Usuário criado" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/ro/LC_MESSAGES/volto.po b/packages/volto/locales/ro/LC_MESSAGES/volto.po index 7f4a71a32b..1c9fb771ed 100644 --- a/packages/volto/locales/ro/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ro/LC_MESSAGES/volto.po @@ -1591,6 +1591,11 @@ msgstr "Grup" msgid "Group created" msgstr "Grup creat" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2037,6 +2042,8 @@ msgid "Load more" msgstr "Incarcă mai mult" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "Se încarcă" @@ -4065,6 +4072,11 @@ msgstr "" msgid "User created" msgstr "Utilizator creat" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/volto.pot b/packages/volto/locales/volto.pot index 874b9a11bf..6a8c647d94 100644 --- a/packages/volto/locales/volto.pot +++ b/packages/volto/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2024-06-19T03:18:12.945Z\n" +"POT-Creation-Date: 2024-06-26T15:35:05.079Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "Content-Type: text/plain; charset=utf-8\n" @@ -1593,6 +1593,11 @@ msgstr "" msgid "Group created" msgstr "" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2039,6 +2044,8 @@ msgid "Load more" msgstr "" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "" @@ -4067,6 +4074,11 @@ msgstr "" msgid "User created" msgstr "" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po index 5b1a13f221..5ed5bb4318 100644 --- a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po +++ b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po @@ -1597,6 +1597,11 @@ msgstr "组" msgid "Group created" msgstr "组已创建" +#. Default: "Group deleted" +#: helpers/MessageLabels/MessageLabels +msgid "Group deleted" +msgstr "" + #. Default: "Group roles updated" #: helpers/MessageLabels/MessageLabels msgid "Group roles updated" @@ -2043,6 +2048,8 @@ msgid "Load more" msgstr "加载更多" #. Default: "Loading." +#: components/manage/Controlpanels/Groups/GroupsControlpanel +#: components/manage/Controlpanels/Users/UsersControlpanel #: components/manage/Form/ModalForm msgid "Loading" msgstr "加载中" @@ -4071,6 +4078,11 @@ msgstr "用户组设置" msgid "User created" msgstr "用户已创建" +#. Default: "User deleted" +#: helpers/MessageLabels/MessageLabels +msgid "User deleted" +msgstr "" + #. Default: "User name" #: components/manage/Controlpanels/Users/UsersControlpanel msgid "User name" diff --git a/packages/volto/news/6127.feature b/packages/volto/news/6127.feature new file mode 100644 index 0000000000..2030c7a78b --- /dev/null +++ b/packages/volto/news/6127.feature @@ -0,0 +1 @@ +(feat): Add loading visual and succes message in controlpanel when deleting users and groups @dobri1408 diff --git a/packages/volto/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx b/packages/volto/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx index 61ba77f182..831d0fb529 100644 --- a/packages/volto/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx +++ b/packages/volto/src/components/manage/Controlpanels/Groups/GroupsControlpanel.jsx @@ -48,8 +48,10 @@ import { Button, Form, Input, + Loader, Segment, Table, + Dimmer, } from 'semantic-ui-react'; /** @@ -161,6 +163,12 @@ class GroupsControlpanel extends Component { ) { this.props.listGroups(this.state.search); } + if ( + this.props.deleteGroupRequest.loading && + nextProps.deleteGroupRequest.loaded + ) { + this.onDeleteGroupSuccess(); + } if ( this.props.createGroupRequest.loading && nextProps.createGroupRequest.loaded @@ -246,10 +254,6 @@ class GroupsControlpanel extends Component { onDeleteOk() { if (this.state.groupToDelete) { this.props.deleteGroup(this.state.groupToDelete.id); - this.setState({ - showDelete: false, - groupToDelete: undefined, - }); } } @@ -262,6 +266,7 @@ class GroupsControlpanel extends Component { this.setState({ showDelete: false, itemsToDelete: [], + groupToDelete: undefined, }); } @@ -367,6 +372,25 @@ class GroupsControlpanel extends Component { ); } + /** + * Handle Success after deleteGroup() + * + * @returns {undefined} + */ + onDeleteGroupSuccess() { + this.setState({ + groupToDelete: undefined, + showDelete: false, + }); + toast.success( + , + ); + } + /** * On change page * @method onChangePage @@ -409,6 +433,12 @@ class GroupsControlpanel extends Component { )} content={
+ + + + + +
    , + ); + } /** * * @@ -533,6 +553,12 @@ class UsersControlpanel extends Component { )} content={
    + + + + + +
      Date: Thu, 27 Jun 2024 14:14:14 +0530 Subject: [PATCH 05/16] fix(teaser): reset button undefined when no target (#6121) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ichim-david Co-authored-by: Víctor Fernández de Alba --- .../volto/locales/ca/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/de/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/en/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/es/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/eu/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/fi/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/fr/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/hi/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/it/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/ja/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/nl/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/pt/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/pt_BR/LC_MESSAGES/volto.po | 5 +++ .../volto/locales/ro/LC_MESSAGES/volto.po | 5 +++ packages/volto/locales/volto.pot | 5 +++ .../volto/locales/zh_CN/LC_MESSAGES/volto.po | 5 +++ packages/volto/news/6121.bugfix | 1 + .../components/manage/Blocks/Teaser/Data.jsx | 45 ++++++++++++++----- 18 files changed, 116 insertions(+), 10 deletions(-) create mode 100644 packages/volto/news/6121.bugfix diff --git a/packages/volto/locales/ca/LC_MESSAGES/volto.po b/packages/volto/locales/ca/LC_MESSAGES/volto.po index 09175d2f54..cf899c144a 100644 --- a/packages/volto/locales/ca/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ca/LC_MESSAGES/volto.po @@ -1855,6 +1855,11 @@ msgstr "Any(s)" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/de/LC_MESSAGES/volto.po b/packages/volto/locales/de/LC_MESSAGES/volto.po index f97bac5149..eff4d6d91e 100644 --- a/packages/volto/locales/de/LC_MESSAGES/volto.po +++ b/packages/volto/locales/de/LC_MESSAGES/volto.po @@ -1854,6 +1854,11 @@ msgstr "Jährliches Intervall" msgid "Invalid Block" msgstr "Ungültiger Block - Wird beim Speichern entfernt" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/en/LC_MESSAGES/volto.po b/packages/volto/locales/en/LC_MESSAGES/volto.po index 71534b0597..7f6792236c 100644 --- a/packages/volto/locales/en/LC_MESSAGES/volto.po +++ b/packages/volto/locales/en/LC_MESSAGES/volto.po @@ -1849,6 +1849,11 @@ msgstr "" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/es/LC_MESSAGES/volto.po b/packages/volto/locales/es/LC_MESSAGES/volto.po index 221399a28b..6c6dea6ccc 100644 --- a/packages/volto/locales/es/LC_MESSAGES/volto.po +++ b/packages/volto/locales/es/LC_MESSAGES/volto.po @@ -1856,6 +1856,11 @@ msgstr "Intervalo anual" msgid "Invalid Block" msgstr "Bloque no válido: se eliminará al guardar" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/eu/LC_MESSAGES/volto.po b/packages/volto/locales/eu/LC_MESSAGES/volto.po index 4e1ada5d92..085ff0a59d 100644 --- a/packages/volto/locales/eu/LC_MESSAGES/volto.po +++ b/packages/volto/locales/eu/LC_MESSAGES/volto.po @@ -1856,6 +1856,11 @@ msgstr "urtean behin" msgid "Invalid Block" msgstr "Bloke okerra" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/fi/LC_MESSAGES/volto.po b/packages/volto/locales/fi/LC_MESSAGES/volto.po index 7f2a9c04a7..434e3d1d42 100644 --- a/packages/volto/locales/fi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fi/LC_MESSAGES/volto.po @@ -1854,6 +1854,11 @@ msgstr "Toista vuosittain" msgid "Invalid Block" msgstr "Virheellinen palikka" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/fr/LC_MESSAGES/volto.po b/packages/volto/locales/fr/LC_MESSAGES/volto.po index 7e85f9b365..42e89bfab5 100644 --- a/packages/volto/locales/fr/LC_MESSAGES/volto.po +++ b/packages/volto/locales/fr/LC_MESSAGES/volto.po @@ -1856,6 +1856,11 @@ msgstr "Intervalle annuel" msgid "Invalid Block" msgstr "Bloc invalide - Sera supprimé lors de l'enregistrement" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/hi/LC_MESSAGES/volto.po b/packages/volto/locales/hi/LC_MESSAGES/volto.po index cca95e9529..32ca347fb1 100644 --- a/packages/volto/locales/hi/LC_MESSAGES/volto.po +++ b/packages/volto/locales/hi/LC_MESSAGES/volto.po @@ -1849,6 +1849,11 @@ msgstr "अंतराल वार्षिक" msgid "Invalid Block" msgstr "अमान्य ब्लॉक - सहेजते समय हटा दिया जाएगा" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/it/LC_MESSAGES/volto.po b/packages/volto/locales/it/LC_MESSAGES/volto.po index 46a7ba3291..8686610b16 100644 --- a/packages/volto/locales/it/LC_MESSAGES/volto.po +++ b/packages/volto/locales/it/LC_MESSAGES/volto.po @@ -1849,6 +1849,11 @@ msgstr "anni" msgid "Invalid Block" msgstr "Blocco non valido - Salvando, verrà rimosso" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/ja/LC_MESSAGES/volto.po b/packages/volto/locales/ja/LC_MESSAGES/volto.po index 337aa04921..4b0fe9a727 100644 --- a/packages/volto/locales/ja/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ja/LC_MESSAGES/volto.po @@ -1854,6 +1854,11 @@ msgstr "年" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/nl/LC_MESSAGES/volto.po b/packages/volto/locales/nl/LC_MESSAGES/volto.po index a851cea783..ec02dafa0b 100644 --- a/packages/volto/locales/nl/LC_MESSAGES/volto.po +++ b/packages/volto/locales/nl/LC_MESSAGES/volto.po @@ -1853,6 +1853,11 @@ msgstr "" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/pt/LC_MESSAGES/volto.po b/packages/volto/locales/pt/LC_MESSAGES/volto.po index ae8d5cba90..6de1500db3 100644 --- a/packages/volto/locales/pt/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt/LC_MESSAGES/volto.po @@ -1854,6 +1854,11 @@ msgstr "" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po index 8badc57061..9cd4df8c34 100644 --- a/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po +++ b/packages/volto/locales/pt_BR/LC_MESSAGES/volto.po @@ -1855,6 +1855,11 @@ msgstr "Intervalo Anual" msgid "Invalid Block" msgstr "Bloco inválido" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/ro/LC_MESSAGES/volto.po b/packages/volto/locales/ro/LC_MESSAGES/volto.po index 1c9fb771ed..fb5aee4ce8 100644 --- a/packages/volto/locales/ro/LC_MESSAGES/volto.po +++ b/packages/volto/locales/ro/LC_MESSAGES/volto.po @@ -1849,6 +1849,11 @@ msgstr "Interval Anual" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/volto.pot b/packages/volto/locales/volto.pot index 6a8c647d94..59f0a25bcc 100644 --- a/packages/volto/locales/volto.pot +++ b/packages/volto/locales/volto.pot @@ -1851,6 +1851,11 @@ msgstr "" msgid "Invalid Block" msgstr "" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po index 5ed5bb4318..d163d094c3 100644 --- a/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po +++ b/packages/volto/locales/zh_CN/LC_MESSAGES/volto.po @@ -1855,6 +1855,11 @@ msgstr "" msgid "Invalid Block" msgstr "无效的块" +#. Default: "Invalid teaser source" +#: components/manage/Blocks/Teaser/Data +msgid "Invalid teaser source" +msgstr "" + #. Default: "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." #: helpers/MessageLabels/MessageLabels msgid "It is not allowed to define both the password and to request sending the password reset message by e-mail. You need to select one of them." diff --git a/packages/volto/news/6121.bugfix b/packages/volto/news/6121.bugfix new file mode 100644 index 0000000000..13c7fb3243 --- /dev/null +++ b/packages/volto/news/6121.bugfix @@ -0,0 +1 @@ +fix reset teaser source button giving undefined error when no target is selected @nileshgulia1 \ No newline at end of file diff --git a/packages/volto/src/components/manage/Blocks/Teaser/Data.jsx b/packages/volto/src/components/manage/Blocks/Teaser/Data.jsx index 52feacbb0c..f57bf762a5 100644 --- a/packages/volto/src/components/manage/Blocks/Teaser/Data.jsx +++ b/packages/volto/src/components/manage/Blocks/Teaser/Data.jsx @@ -2,9 +2,13 @@ import React from 'react'; import { useDispatch } from 'react-redux'; import { defineMessages, useIntl } from 'react-intl'; import { Button } from 'semantic-ui-react'; -import { Icon } from '@plone/volto/components'; +import { toast } from 'react-toastify'; +import { Icon, Toast } from '@plone/volto/components'; import { BlockDataForm } from '@plone/volto/components/manage/Form'; -import { flattenToAppURL } from '@plone/volto/helpers'; +import { + flattenToAppURL, + messages as defaultMessages, +} from '@plone/volto/helpers'; import { getContent } from '@plone/volto/actions'; import { isEmpty } from 'lodash'; @@ -20,6 +24,10 @@ const messages = defineMessages({ id: 'Refresh source content', defaultMessage: 'Refresh source content', }, + invalidTeaser: { + id: 'Invalid teaser source', + defaultMessage: 'Invalid teaser source', + }, }); const TeaserData = (props) => { @@ -70,14 +78,30 @@ const TeaserData = (props) => { }; const refresh = () => { - dispatch( - getContent(flattenToAppURL(data.href[0]['@id']), null, `${block}-teaser`), - ).then((resp) => { - if (resp) { - let blockData = dataTransformer(resp, data); - onChangeBlock(block, blockData); - } - }); + if (data.href?.[0]?.['@id']) { + dispatch( + getContent( + flattenToAppURL(data.href[0]['@id']), + null, + `${block}-teaser`, + ), + ) + .then((resp) => { + if (resp) { + let blockData = dataTransformer(resp, data); + onChangeBlock(block, blockData); + } + }) + .catch((e) => { + toast.error( + , + ); + }); + } }; const isReseteable = @@ -102,6 +126,7 @@ const TeaserData = (props) => { aria-label={intl.formatMessage(messages.refreshTeaser)} basic onClick={() => refresh()} + disabled={isEmpty(data.href)} > {intl.formatMessage(messages.refreshTeaser)} From cf6330befb54c93e8187fd7ab82073ad0f73d905 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Thu, 27 Jun 2024 10:55:32 +0200 Subject: [PATCH 06/16] Release @plone/types 1.0.0-alpha.17 --- packages/types/CHANGELOG.md | 7 +++++++ packages/types/news/6128.internal | 2 -- packages/types/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 packages/types/news/6128.internal diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index f3dc2a8b8f..4fc19146ba 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -8,6 +8,13 @@ +## 1.0.0-alpha.17 (2024-06-27) + +### Internal + +- Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. + Rename missing js file that must be jsx. @sneridagh [#6128](https://github.com/plone/volto/issues/6128) + ## 1.0.0-alpha.16 (2024-06-13) ### Breaking diff --git a/packages/types/news/6128.internal b/packages/types/news/6128.internal deleted file mode 100644 index b3cdfd1e74..0000000000 --- a/packages/types/news/6128.internal +++ /dev/null @@ -1,2 +0,0 @@ -Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. -Rename missing js file that must be jsx. @sneridagh diff --git a/packages/types/package.json b/packages/types/package.json index 87906c76e7..82ffe7bf4f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,7 +9,7 @@ ], "funding": "https://github.com/sponsors/plone", "license": "MIT", - "version": "1.0.0-alpha.16", + "version": "1.0.0-alpha.17", "repository": { "type": "git", "url": "https://github.com/plone/volto.git" From 5144d2dcdf3bba68fc790b4fc88a848f8ba1be06 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Thu, 27 Jun 2024 10:56:32 +0200 Subject: [PATCH 07/16] Release 18.0.0-alpha.37 --- docs/source/release-notes/index.md | 17 + packages/volto/CHANGELOG.md | 17 + packages/volto/news/6108.internal | 1 - packages/volto/news/6121.bugfix | 1 - packages/volto/news/6124.bugfix | 1 - packages/volto/news/6127.feature | 1 - packages/volto/news/6128.internal | 2 - packages/volto/package.json | 2 +- .../helpers/MessageLabels/MessageLabels.d.ts | 553 +++++++++++++++++- 9 files changed, 587 insertions(+), 8 deletions(-) delete mode 100644 packages/volto/news/6108.internal delete mode 100644 packages/volto/news/6121.bugfix delete mode 100644 packages/volto/news/6124.bugfix delete mode 100644 packages/volto/news/6127.feature delete mode 100644 packages/volto/news/6128.internal diff --git a/docs/source/release-notes/index.md b/docs/source/release-notes/index.md index 8b6f7307e3..eaca971657 100644 --- a/docs/source/release-notes/index.md +++ b/docs/source/release-notes/index.md @@ -17,6 +17,23 @@ myst: +## 18.0.0-alpha.37 (2024-06-27) + +### Feature + +- (feat): Add loading visual and succes message in controlpanel when deleting users and groups @dobri1408 [#6127](https://github.com/plone/volto/issues/6127) + +### Bugfix + +- fix reset teaser source button giving undefined error when no target is selected @nileshgulia1 [#6121](https://github.com/plone/volto/issues/6121) +- Added three missing German translations. [@jensens] [#6124](https://github.com/plone/volto/issues/6124) + +### Internal + +- Improved the existing GitHub workflows by encapsulating a common operation into a reusable action for easier maintenance. @FritzHoing, @ichim-david [#6108](https://github.com/plone/volto/issues/6108) +- Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. + Rename missing js file that must be jsx. @sneridagh [#6128](https://github.com/plone/volto/issues/6128) + ## 18.0.0-alpha.36 (2024-06-26) ### Breaking diff --git a/packages/volto/CHANGELOG.md b/packages/volto/CHANGELOG.md index 8b6f7307e3..eaca971657 100644 --- a/packages/volto/CHANGELOG.md +++ b/packages/volto/CHANGELOG.md @@ -17,6 +17,23 @@ myst: +## 18.0.0-alpha.37 (2024-06-27) + +### Feature + +- (feat): Add loading visual and succes message in controlpanel when deleting users and groups @dobri1408 [#6127](https://github.com/plone/volto/issues/6127) + +### Bugfix + +- fix reset teaser source button giving undefined error when no target is selected @nileshgulia1 [#6121](https://github.com/plone/volto/issues/6121) +- Added three missing German translations. [@jensens] [#6124](https://github.com/plone/volto/issues/6124) + +### Internal + +- Improved the existing GitHub workflows by encapsulating a common operation into a reusable action for easier maintenance. @FritzHoing, @ichim-david [#6108](https://github.com/plone/volto/issues/6108) +- Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. + Rename missing js file that must be jsx. @sneridagh [#6128](https://github.com/plone/volto/issues/6128) + ## 18.0.0-alpha.36 (2024-06-26) ### Breaking diff --git a/packages/volto/news/6108.internal b/packages/volto/news/6108.internal deleted file mode 100644 index d196847f84..0000000000 --- a/packages/volto/news/6108.internal +++ /dev/null @@ -1 +0,0 @@ -Improved the existing GitHub workflows by encapsulating a common operation into a reusable action for easier maintenance. @FritzHoing, @ichim-david diff --git a/packages/volto/news/6121.bugfix b/packages/volto/news/6121.bugfix deleted file mode 100644 index 13c7fb3243..0000000000 --- a/packages/volto/news/6121.bugfix +++ /dev/null @@ -1 +0,0 @@ -fix reset teaser source button giving undefined error when no target is selected @nileshgulia1 \ No newline at end of file diff --git a/packages/volto/news/6124.bugfix b/packages/volto/news/6124.bugfix deleted file mode 100644 index 15f738a817..0000000000 --- a/packages/volto/news/6124.bugfix +++ /dev/null @@ -1 +0,0 @@ -Added three missing German translations. [@jensens] diff --git a/packages/volto/news/6127.feature b/packages/volto/news/6127.feature deleted file mode 100644 index 2030c7a78b..0000000000 --- a/packages/volto/news/6127.feature +++ /dev/null @@ -1 +0,0 @@ -(feat): Add loading visual and succes message in controlpanel when deleting users and groups @dobri1408 diff --git a/packages/volto/news/6128.internal b/packages/volto/news/6128.internal deleted file mode 100644 index b3cdfd1e74..0000000000 --- a/packages/volto/news/6128.internal +++ /dev/null @@ -1,2 +0,0 @@ -Upgrade `react-intl` to maximum 3.x series to fix a bundling issue. -Rename missing js file that must be jsx. @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 088c0e24d1..223de4cfa1 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "18.0.0-alpha.36", + "version": "18.0.0-alpha.37", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" diff --git a/packages/volto/types/helpers/MessageLabels/MessageLabels.d.ts b/packages/volto/types/helpers/MessageLabels/MessageLabels.d.ts index 8c05f8c2bc..cd59ec6eca 100644 --- a/packages/volto/types/helpers/MessageLabels/MessageLabels.d.ts +++ b/packages/volto/types/helpers/MessageLabels/MessageLabels.d.ts @@ -1 +1,552 @@ -export const messages: any; +export namespace messages { + namespace addBlock { + let id: string; + let defaultMessage: string; + } + namespace required { + let id_1: string; + export { id_1 as id }; + let defaultMessage_1: string; + export { defaultMessage_1 as defaultMessage }; + } + namespace minLength { + let id_2: string; + export { id_2 as id }; + let defaultMessage_2: string; + export { defaultMessage_2 as defaultMessage }; + } + namespace maxLength { + let id_3: string; + export { id_3 as id }; + let defaultMessage_3: string; + export { defaultMessage_3 as defaultMessage }; + } + namespace minimum { + let id_4: string; + export { id_4 as id }; + let defaultMessage_4: string; + export { defaultMessage_4 as defaultMessage }; + } + namespace maximum { + let id_5: string; + export { id_5 as id }; + let defaultMessage_5: string; + export { defaultMessage_5 as defaultMessage }; + } + namespace uniqueItems { + let id_6: string; + export { id_6 as id }; + let defaultMessage_6: string; + export { defaultMessage_6 as defaultMessage }; + } + namespace save { + let id_7: string; + export { id_7 as id }; + let defaultMessage_7: string; + export { defaultMessage_7 as defaultMessage }; + } + namespace saved { + let id_8: string; + export { id_8 as id }; + let defaultMessage_8: string; + export { defaultMessage_8 as defaultMessage }; + } + namespace isNumber { + let id_9: string; + export { id_9 as id }; + let defaultMessage_9: string; + export { defaultMessage_9 as defaultMessage }; + } + namespace isInteger { + let id_10: string; + export { id_10 as id }; + let defaultMessage_10: string; + export { defaultMessage_10 as defaultMessage }; + } + namespace isValidEmail { + let id_11: string; + export { id_11 as id }; + let defaultMessage_11: string; + export { defaultMessage_11 as defaultMessage }; + } + namespace isValidURL { + let id_12: string; + export { id_12 as id }; + let defaultMessage_12: string; + export { defaultMessage_12 as defaultMessage }; + } + namespace cancel { + let id_13: string; + export { id_13 as id }; + let defaultMessage_13: string; + export { defaultMessage_13 as defaultMessage }; + } + namespace error { + let id_14: string; + export { id_14 as id }; + let defaultMessage_14: string; + export { defaultMessage_14 as defaultMessage }; + } + namespace thereWereSomeErrors { + let id_15: string; + export { id_15 as id }; + let defaultMessage_15: string; + export { defaultMessage_15 as defaultMessage }; + } + namespace searchUsers { + let id_16: string; + export { id_16 as id }; + let defaultMessage_16: string; + export { defaultMessage_16 as defaultMessage }; + } + namespace searchGroups { + let id_17: string; + export { id_17 as id }; + let defaultMessage_17: string; + export { defaultMessage_17 as defaultMessage }; + } + namespace filterByGroups { + let id_18: string; + export { id_18 as id }; + let defaultMessage_18: string; + export { defaultMessage_18 as defaultMessage }; + } + namespace back { + let id_19: string; + export { id_19 as id }; + let defaultMessage_19: string; + export { defaultMessage_19 as defaultMessage }; + } + namespace deleteUserConfirmTitle { + let id_20: string; + export { id_20 as id }; + let defaultMessage_20: string; + export { defaultMessage_20 as defaultMessage }; + } + namespace deleteGroupConfirmTitle { + let id_21: string; + export { id_21 as id }; + let defaultMessage_21: string; + export { defaultMessage_21 as defaultMessage }; + } + namespace add { + let id_22: string; + export { id_22 as id }; + let defaultMessage_22: string; + export { defaultMessage_22 as defaultMessage }; + } + namespace addUserButtonTitle { + let id_23: string; + export { id_23 as id }; + let defaultMessage_23: string; + export { defaultMessage_23 as defaultMessage }; + } + namespace addGroupsButtonTitle { + let id_24: string; + export { id_24 as id }; + let defaultMessage_24: string; + export { defaultMessage_24 as defaultMessage }; + } + namespace addUserFormTitle { + let id_25: string; + export { id_25 as id }; + let defaultMessage_25: string; + export { defaultMessage_25 as defaultMessage }; + } + namespace addGroupsFormTitle { + let id_26: string; + export { id_26 as id }; + let defaultMessage_26: string; + export { defaultMessage_26 as defaultMessage }; + } + namespace groupDeleted { + let id_27: string; + export { id_27 as id }; + let defaultMessage_27: string; + export { defaultMessage_27 as defaultMessage }; + } + namespace addUserFormUsernameTitle { + let id_28: string; + export { id_28 as id }; + let defaultMessage_28: string; + export { defaultMessage_28 as defaultMessage }; + } + namespace addUserFormUsernameDescription { + let id_29: string; + export { id_29 as id }; + let defaultMessage_29: string; + export { defaultMessage_29 as defaultMessage }; + } + namespace addUserFormFullnameDescription { + let id_30: string; + export { id_30 as id }; + let defaultMessage_30: string; + export { defaultMessage_30 as defaultMessage }; + } + namespace addUserFormEmailDescription { + let id_31: string; + export { id_31 as id }; + let defaultMessage_31: string; + export { defaultMessage_31 as defaultMessage }; + } + namespace addUserFormPasswordDescription { + let id_32: string; + export { id_32 as id }; + let defaultMessage_32: string; + export { defaultMessage_32 as defaultMessage }; + } + namespace addGroupsFormTitleTitle { + let id_33: string; + export { id_33 as id }; + let defaultMessage_33: string; + export { defaultMessage_33 as defaultMessage }; + } + namespace addUserFormFullnameTitle { + let id_34: string; + export { id_34 as id }; + let defaultMessage_34: string; + export { defaultMessage_34 as defaultMessage }; + } + namespace addUserGroupNameTitle { + let id_35: string; + export { id_35 as id }; + let defaultMessage_35: string; + export { defaultMessage_35 as defaultMessage }; + } + namespace addGroupsFormGroupNameTitle { + let id_36: string; + export { id_36 as id }; + let defaultMessage_36: string; + export { defaultMessage_36 as defaultMessage }; + } + namespace addGroupsFormDescriptionTitle { + let id_37: string; + export { id_37 as id }; + let defaultMessage_37: string; + export { defaultMessage_37 as defaultMessage }; + } + namespace addUserFormEmailTitle { + let id_38: string; + export { id_38 as id }; + let defaultMessage_38: string; + export { defaultMessage_38 as defaultMessage }; + } + namespace addGroupsFormEmailTitle { + let id_39: string; + export { id_39 as id }; + let defaultMessage_39: string; + export { defaultMessage_39 as defaultMessage }; + } + namespace addUserFormPasswordTitle { + let id_40: string; + export { id_40 as id }; + let defaultMessage_40: string; + export { defaultMessage_40 as defaultMessage }; + } + namespace addUserFormSendPasswordResetTitle { + let id_41: string; + export { id_41 as id }; + let defaultMessage_41: string; + export { defaultMessage_41 as defaultMessage }; + } + namespace addUserFormRolesTitle { + let id_42: string; + export { id_42 as id }; + let defaultMessage_42: string; + export { defaultMessage_42 as defaultMessage }; + } + namespace addUserFormPasswordAndSendPasswordTogetherNotAllowed { + let id_43: string; + export { id_43 as id }; + let defaultMessage_43: string; + export { defaultMessage_43 as defaultMessage }; + } + namespace userSearchNoResults { + let id_44: string; + export { id_44 as id }; + let defaultMessage_44: string; + export { defaultMessage_44 as defaultMessage }; + } + namespace groupSearchNoResults { + let id_45: string; + export { id_45 as id }; + let defaultMessage_45: string; + export { defaultMessage_45 as defaultMessage }; + } + namespace updateUserFormTitle { + let id_46: string; + export { id_46 as id }; + let defaultMessage_46: string; + export { defaultMessage_46 as defaultMessage }; + } + namespace updateUserSuccess { + let id_47: string; + export { id_47 as id }; + let defaultMessage_47: string; + export { defaultMessage_47 as defaultMessage }; + } + namespace updateRoles { + let id_48: string; + export { id_48 as id }; + let defaultMessage_48: string; + export { defaultMessage_48 as defaultMessage }; + } + namespace updateGroups { + let id_49: string; + export { id_49 as id }; + let defaultMessage_49: string; + export { defaultMessage_49 as defaultMessage }; + } + namespace addGroupsFormRolesTitle { + let id_50: string; + export { id_50 as id }; + let defaultMessage_50: string; + export { defaultMessage_50 as defaultMessage }; + } + namespace success { + let id_51: string; + export { id_51 as id }; + let defaultMessage_51: string; + export { defaultMessage_51 as defaultMessage }; + } + namespace userCreated { + let id_52: string; + export { id_52 as id }; + let defaultMessage_52: string; + export { defaultMessage_52 as defaultMessage }; + } + namespace userDeleted { + let id_53: string; + export { id_53 as id }; + let defaultMessage_53: string; + export { defaultMessage_53 as defaultMessage }; + } + namespace groupCreated { + let id_54: string; + export { id_54 as id }; + let defaultMessage_54: string; + export { defaultMessage_54 as defaultMessage }; + } + namespace users { + let id_55: string; + export { id_55 as id }; + let defaultMessage_55: string; + export { defaultMessage_55 as defaultMessage }; + } + namespace usergroup { + let id_56: string; + export { id_56 as id }; + let defaultMessage_56: string; + export { defaultMessage_56 as defaultMessage }; + } + namespace usergroupmemberbership { + let id_57: string; + export { id_57 as id }; + let defaultMessage_57: string; + export { defaultMessage_57 as defaultMessage }; + } + namespace membershipUpdated { + let id_58: string; + export { id_58 as id }; + let defaultMessage_58: string; + export { defaultMessage_58 as defaultMessage }; + } + namespace noUserFound { + let id_59: string; + export { id_59 as id }; + let defaultMessage_59: string; + export { defaultMessage_59 as defaultMessage }; + } + namespace pleaseSearchOrFilterUsers { + let id_60: string; + export { id_60 as id }; + let defaultMessage_60: string; + export { defaultMessage_60 as defaultMessage }; + } + namespace addUsersToGroup { + let id_61: string; + export { id_61 as id }; + let defaultMessage_61: string; + export { defaultMessage_61 as defaultMessage }; + } + namespace removeUsersFromGroup { + let id_62: string; + export { id_62 as id }; + let defaultMessage_62: string; + export { defaultMessage_62 as defaultMessage }; + } + namespace groups { + let id_63: string; + export { id_63 as id }; + let defaultMessage_63: string; + export { defaultMessage_63 as defaultMessage }; + } + namespace copyBlocks { + let id_64: string; + export { id_64 as id }; + let defaultMessage_64: string; + export { defaultMessage_64 as defaultMessage }; + } + namespace cutBlocks { + let id_65: string; + export { id_65 as id }; + let defaultMessage_65: string; + export { defaultMessage_65 as defaultMessage }; + } + namespace pasteBlocks { + let id_66: string; + export { id_66 as id }; + let defaultMessage_66: string; + export { defaultMessage_66 as defaultMessage }; + } + namespace deleteBlocks { + let id_67: string; + export { id_67 as id }; + let defaultMessage_67: string; + export { defaultMessage_67 as defaultMessage }; + } + namespace showAllUserButton { + let id_68: string; + export { id_68 as id }; + let defaultMessage_68: string; + export { defaultMessage_68 as defaultMessage }; + } + namespace showAllUserText { + let id_69: string; + export { id_69 as id }; + let defaultMessage_69: string; + export { defaultMessage_69 as defaultMessage }; + } + namespace addJoinedGroups { + let id_70: string; + export { id_70 as id }; + let defaultMessage_70: string; + export { defaultMessage_70 as defaultMessage }; + } + namespace urlClipboardCopy { + let id_71: string; + export { id_71 as id }; + let defaultMessage_71: string; + export { defaultMessage_71 as defaultMessage }; + } + namespace inspectRelations { + let id_72: string; + export { id_72 as id }; + let defaultMessage_72: string; + export { defaultMessage_72 as defaultMessage }; + } + namespace relations { + let id_73: string; + export { id_73 as id }; + let defaultMessage_73: string; + export { defaultMessage_73 as defaultMessage }; + } + namespace fixRelations { + let id_74: string; + export { id_74 as id }; + let defaultMessage_74: string; + export { defaultMessage_74 as defaultMessage }; + } + namespace searchRelationSource { + let id_75: string; + export { id_75 as id }; + let defaultMessage_75: string; + export { defaultMessage_75 as defaultMessage }; + } + namespace searchRelationTarget { + let id_76: string; + export { id_76 as id }; + let defaultMessage_76: string; + export { defaultMessage_76 as defaultMessage }; + } + namespace createOrDeleteRelationsToTarget { + let id_77: string; + export { id_77 as id }; + let defaultMessage_77: string; + export { defaultMessage_77 as defaultMessage }; + } + namespace relationName { + let id_78: string; + export { id_78 as id }; + let defaultMessage_78: string; + export { defaultMessage_78 as defaultMessage }; + } + namespace selectRelation { + let id_79: string; + export { id_79 as id }; + let defaultMessage_79: string; + export { defaultMessage_79 as defaultMessage }; + } + namespace norelationfound { + let id_80: string; + export { id_80 as id }; + let defaultMessage_80: string; + export { defaultMessage_80 as defaultMessage }; + } + namespace toomanyrelationsfound { + let id_81: string; + export { id_81 as id }; + let defaultMessage_81: string; + export { defaultMessage_81 as defaultMessage }; + } + namespace rebuildRelations { + let id_82: string; + export { id_82 as id }; + let defaultMessage_82: string; + export { defaultMessage_82 as defaultMessage }; + } + namespace flushAndRebuildRelations { + let id_83: string; + export { id_83 as id }; + let defaultMessage_83: string; + export { defaultMessage_83 as defaultMessage }; + } + namespace flushAndRebuildRelationsHints { + let id_84: string; + export { id_84 as id }; + let defaultMessage_84: string; + export { defaultMessage_84 as defaultMessage }; + } + namespace addPotentialTargetsPath { + let id_85: string; + export { id_85 as id }; + let defaultMessage_85: string; + export { defaultMessage_85 as defaultMessage }; + } + namespace addPotentialSourcesPath { + let id_86: string; + export { id_86 as id }; + let defaultMessage_86: string; + export { defaultMessage_86 as defaultMessage }; + } + namespace relationsUpdated { + let id_87: string; + export { id_87 as id }; + let defaultMessage_87: string; + export { defaultMessage_87 as defaultMessage }; + } + namespace select { + let id_88: string; + export { id_88 as id }; + let defaultMessage_88: string; + export { defaultMessage_88 as defaultMessage }; + } + namespace selected { + let id_89: string; + export { id_89 as id }; + let defaultMessage_89: string; + export { defaultMessage_89 as defaultMessage }; + } + namespace filter { + let id_90: string; + export { id_90 as id }; + let defaultMessage_90: string; + export { defaultMessage_90 as defaultMessage }; + } + namespace fileTooLarge { + let id_91: string; + export { id_91 as id }; + let defaultMessage_91: string; + export { defaultMessage_91 as defaultMessage }; + } +} From 502c0f766f1d6c3b0128ae228e6aaafa8da1e087 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Fri, 28 Jun 2024 10:13:15 +0200 Subject: [PATCH 08/16] Rename `constants/Language` module to the right suffix, and other actions to make ESM bundlers happy. (#6130) Co-authored-by: Steve Piercy --- docs/source/upgrade-guide/index.md | 17 +++++++++++++++++ packages/volto-slate/news/6130.internal | 1 + packages/volto-slate/package.json | 8 +++++++- packages/volto/news/6130.internal | 1 + packages/volto/package.json | 2 +- packages/volto/razzle.config.js | 2 +- .../manage/Preferences/PersonalPreferences.jsx | 2 +- .../constants/{Languages.js => Languages.cjs} | 2 ++ .../volto/src/helpers/AuthToken/AuthToken.js | 2 +- packages/volto/src/server.jsx | 2 +- ...t-setup-config.js => test-setup-config.jsx} | 0 pnpm-lock.yaml | 18 ++++++++++++++++++ styles/Vocab/Plone/accept.txt | 1 + 13 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 packages/volto-slate/news/6130.internal create mode 100644 packages/volto/news/6130.internal rename packages/volto/src/constants/{Languages.js => Languages.cjs} (92%) rename packages/volto/{test-setup-config.js => test-setup-config.jsx} (100%) diff --git a/docs/source/upgrade-guide/index.md b/docs/source/upgrade-guide/index.md index 11604426ed..a6314b5403 100644 --- a/docs/source/upgrade-guide/index.md +++ b/docs/source/upgrade-guide/index.md @@ -354,6 +354,23 @@ The input field's placeholder text was moved above the buttons. Together these changes improve usability both on small screens and in small containers, such as when the widget is in grid block elements. +### Renamed the `constants/Languages` module + +`src/constants/Languages.js` has been renamed to `src/constants/Languages.cjs` since, in fact, it's a CommonJS module. +This change is needed for consistency with module suffixes in Volto core, in preparation for replacing Razzle with a modern builder. + +The only Volto component that makes use of it is `PersonalPreferences`. +If you shadow it, then you should update this component. +For the rest, it is unlikely that your code refers to this module, since it's used internally by Volto itself. + +### Renamed `test-setup-config` module + +`test-setup-config.js` has been renamed to `test-setup-config.jsx` since, in fact, it contains JSX. +This change is needed for consistency with module suffixes in Volto core, in preparation for replacing Razzle with a modern builder. + +It is unlikely that your code uses it, unless you heavily customized the Jest testing pipeline. + + (volto-upgrade-guide-17.x.x)= ## Upgrading to Volto 17.x.x diff --git a/packages/volto-slate/news/6130.internal b/packages/volto-slate/news/6130.internal new file mode 100644 index 0000000000..8ad0b37f5d --- /dev/null +++ b/packages/volto-slate/news/6130.internal @@ -0,0 +1 @@ +Add proper dependencies to `volto-slate`. @sneridagh diff --git a/packages/volto-slate/package.json b/packages/volto-slate/package.json index e94563a6af..34b21870a6 100644 --- a/packages/volto-slate/package.json +++ b/packages/volto-slate/package.json @@ -18,16 +18,22 @@ "access": "public" }, "dependencies": { + "classnames": "2.2.6", + "github-slugger": "1.4.0", "image-extensions": "1.1.0", + "is-hotkey": "0.2.0", "is-url": "1.2.4", "jsdom": "^16.6.0", + "lodash": "4.17.21", "react": "18.2.0", - "react-intersection-observer": "9.1.0", "react-dom": "18.2.0", + "react-intersection-observer": "9.1.0", + "redux-mock-store": "1.5.4", "slate": "0.100.0", "slate-history": "0.100.0", "slate-hyperscript": "0.100.0", "slate-react": "0.98.4", + "uuid": "^9.0.1", "weak-key": "^1.0.2" }, "devDependencies": { diff --git a/packages/volto/news/6130.internal b/packages/volto/news/6130.internal new file mode 100644 index 0000000000..d7d07c711b --- /dev/null +++ b/packages/volto/news/6130.internal @@ -0,0 +1 @@ +Renamed `constants/Languages.js` to `constants/Languages.cjs` @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 223de4cfa1..2d6a21b4f8 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -108,7 +108,7 @@ }, "setupFiles": [ "./test-setup-globals.js", - "./test-setup-config.js" + "./test-setup-config.jsx" ], "globalSetup": "./global-test-setup.js", "setupFilesAfterEnv": [ diff --git a/packages/volto/razzle.config.js b/packages/volto/razzle.config.js index 204b6607c7..a0df94932e 100644 --- a/packages/volto/razzle.config.js +++ b/packages/volto/razzle.config.js @@ -20,7 +20,7 @@ const AfterBuildPlugin = require('@fiverr/afterbuild-webpack-plugin'); const fileLoaderFinder = makeLoaderFinder('file-loader'); const projectRootPath = path.resolve('.'); -const languages = require('./src/constants/Languages'); +const languages = require('./src/constants/Languages.cjs'); const packageJson = require(path.join(projectRootPath, 'package.json')); diff --git a/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx b/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx index 605da71837..22681be9e3 100644 --- a/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx +++ b/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx @@ -14,7 +14,7 @@ import { toast } from 'react-toastify'; import { Toast } from '@plone/volto/components'; import { Form } from '@plone/volto/components/manage/Form'; -import languages from '@plone/volto/constants/Languages'; +import languages from '@plone/volto/constants/Languages.cjs'; import { changeLanguage } from '@plone/volto/actions'; import { toGettextLang } from '@plone/volto/helpers'; import config from '@plone/volto/registry'; diff --git a/packages/volto/src/constants/Languages.js b/packages/volto/src/constants/Languages.cjs similarity index 92% rename from packages/volto/src/constants/Languages.js rename to packages/volto/src/constants/Languages.cjs index fad2f37ffe..ffeb097b52 100644 --- a/packages/volto/src/constants/Languages.js +++ b/packages/volto/src/constants/Languages.cjs @@ -20,3 +20,5 @@ module.exports = { pt_BR: 'Português (Brasil)', zh_CN: '中文', }; + +// export default languages; diff --git a/packages/volto/src/helpers/AuthToken/AuthToken.js b/packages/volto/src/helpers/AuthToken/AuthToken.js index 3d146e6d18..9a1a1038ee 100644 --- a/packages/volto/src/helpers/AuthToken/AuthToken.js +++ b/packages/volto/src/helpers/AuthToken/AuthToken.js @@ -102,7 +102,7 @@ export function persistAuthToken(store, req) { handleChange(true); } -if (module.hot) { +if (module?.hot) { module.hot.dispose((data) => { data.reloaded = true; }); diff --git a/packages/volto/src/server.jsx b/packages/volto/src/server.jsx index 106573eb9c..38948f2c86 100644 --- a/packages/volto/src/server.jsx +++ b/packages/volto/src/server.jsx @@ -36,7 +36,7 @@ import userSession from '@plone/volto/reducers/userSession/userSession'; import ErrorPage from '@plone/volto/error'; -import languages from '@plone/volto/constants/Languages'; +import languages from '@plone/volto/constants/Languages.cjs'; import configureStore from '@plone/volto/store'; import { ReduxAsyncConnect, loadOnServer } from './helpers/AsyncConnect'; diff --git a/packages/volto/test-setup-config.js b/packages/volto/test-setup-config.jsx similarity index 100% rename from packages/volto/test-setup-config.js rename to packages/volto/test-setup-config.jsx diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 633e3f7179..cb68e5cbf1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2319,15 +2319,27 @@ importers: packages/volto-slate: dependencies: + classnames: + specifier: 2.2.6 + version: 2.2.6 + github-slugger: + specifier: 1.4.0 + version: 1.4.0 image-extensions: specifier: 1.1.0 version: 1.1.0 + is-hotkey: + specifier: 0.2.0 + version: 0.2.0 is-url: specifier: 1.2.4 version: 1.2.4 jsdom: specifier: ^16.6.0 version: 16.7.0 + lodash: + specifier: 4.17.21 + version: 4.17.21 react: specifier: 18.2.0 version: 18.2.0 @@ -2337,6 +2349,9 @@ importers: react-intersection-observer: specifier: 9.1.0 version: 9.1.0(react@18.2.0) + redux-mock-store: + specifier: 1.5.4 + version: 1.5.4 slate: specifier: 0.100.0 version: 0.100.0 @@ -2349,6 +2364,9 @@ importers: slate-react: specifier: 0.98.4 version: 0.98.4(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(slate@0.100.0) + uuid: + specifier: ^9.0.1 + version: 9.0.1 weak-key: specifier: ^1.0.2 version: 1.0.3 diff --git a/styles/Vocab/Plone/accept.txt b/styles/Vocab/Plone/accept.txt index 4161b50188..0099e24b74 100644 --- a/styles/Vocab/Plone/accept.txt +++ b/styles/Vocab/Plone/accept.txt @@ -4,6 +4,7 @@ `plone.volto` [Aa]sync [Bb]ackend +CommonJS JavaScript npm nvm From 577a2400c5de6ce095065354c22eb5a1dad9ac8a Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 28 Jun 2024 10:14:21 +0200 Subject: [PATCH 09/16] Release @plone/slate 18.0.0-alpha.15 --- packages/volto-slate/CHANGELOG.md | 6 ++++++ packages/volto-slate/news/6130.internal | 1 - packages/volto-slate/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 packages/volto-slate/news/6130.internal diff --git a/packages/volto-slate/CHANGELOG.md b/packages/volto-slate/CHANGELOG.md index 917702624b..9babaf7141 100644 --- a/packages/volto-slate/CHANGELOG.md +++ b/packages/volto-slate/CHANGELOG.md @@ -8,6 +8,12 @@ +## 18.0.0-alpha.15 (2024-06-28) + +### Internal + +- Add proper dependencies to `volto-slate`. @sneridagh [#6130](https://github.com/plone/volto/issues/6130) + ## 18.0.0-alpha.14 (2024-06-26) ### Feature diff --git a/packages/volto-slate/news/6130.internal b/packages/volto-slate/news/6130.internal deleted file mode 100644 index 8ad0b37f5d..0000000000 --- a/packages/volto-slate/news/6130.internal +++ /dev/null @@ -1 +0,0 @@ -Add proper dependencies to `volto-slate`. @sneridagh diff --git a/packages/volto-slate/package.json b/packages/volto-slate/package.json index 34b21870a6..93925ff1b7 100644 --- a/packages/volto-slate/package.json +++ b/packages/volto-slate/package.json @@ -1,6 +1,6 @@ { "name": "@plone/volto-slate", - "version": "18.0.0-alpha.14", + "version": "18.0.0-alpha.15", "description": "Slate.js integration with Volto", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", From c50c1b3f4b10187d8819a2f95a184448086189cb Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 28 Jun 2024 10:15:09 +0200 Subject: [PATCH 10/16] Release 18.0.0-alpha.38 --- docs/source/release-notes/index.md | 6 ++++++ packages/volto/CHANGELOG.md | 6 ++++++ packages/volto/news/6130.internal | 1 - packages/volto/package.json | 2 +- packages/volto/types/constants/Languages.d.cts | 15 +++++++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) delete mode 100644 packages/volto/news/6130.internal create mode 100644 packages/volto/types/constants/Languages.d.cts diff --git a/docs/source/release-notes/index.md b/docs/source/release-notes/index.md index eaca971657..c71ae22480 100644 --- a/docs/source/release-notes/index.md +++ b/docs/source/release-notes/index.md @@ -17,6 +17,12 @@ myst: +## 18.0.0-alpha.38 (2024-06-28) + +### Internal + +- Renamed `constants/Languages.js` to `constants/Languages.cjs` @sneridagh [#6130](https://github.com/plone/volto/issues/6130) + ## 18.0.0-alpha.37 (2024-06-27) ### Feature diff --git a/packages/volto/CHANGELOG.md b/packages/volto/CHANGELOG.md index eaca971657..c71ae22480 100644 --- a/packages/volto/CHANGELOG.md +++ b/packages/volto/CHANGELOG.md @@ -17,6 +17,12 @@ myst: +## 18.0.0-alpha.38 (2024-06-28) + +### Internal + +- Renamed `constants/Languages.js` to `constants/Languages.cjs` @sneridagh [#6130](https://github.com/plone/volto/issues/6130) + ## 18.0.0-alpha.37 (2024-06-27) ### Feature diff --git a/packages/volto/news/6130.internal b/packages/volto/news/6130.internal deleted file mode 100644 index d7d07c711b..0000000000 --- a/packages/volto/news/6130.internal +++ /dev/null @@ -1 +0,0 @@ -Renamed `constants/Languages.js` to `constants/Languages.cjs` @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 2d6a21b4f8..9e3e7166ff 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "18.0.0-alpha.37", + "version": "18.0.0-alpha.38", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" diff --git a/packages/volto/types/constants/Languages.d.cts b/packages/volto/types/constants/Languages.d.cts new file mode 100644 index 0000000000..02f6428cec --- /dev/null +++ b/packages/volto/types/constants/Languages.d.cts @@ -0,0 +1,15 @@ +export let ca: string; +export let de: string; +export let en: string; +export let es: string; +export let eu: string; +export let fi: string; +export let fr: string; +export let hi: string; +export let it: string; +export let nl: string; +export let ro: string; +export let ja: string; +export let pt: string; +export let pt_BR: string; +export let zh_CN: string; From e4b1b2238b254ed35ca56d83d2817bdda3639b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Fri, 28 Jun 2024 12:06:34 +0200 Subject: [PATCH 11/16] Cleanup Image widget and pass down `onSelectItem` prop if any (#6132) --- packages/volto/news/6132.bugfix | 1 + .../components/manage/Blocks/Image/Edit.jsx | 29 +------------------ .../components/manage/Widgets/ImageWidget.jsx | 20 ++++++------- 3 files changed, 12 insertions(+), 38 deletions(-) create mode 100644 packages/volto/news/6132.bugfix diff --git a/packages/volto/news/6132.bugfix b/packages/volto/news/6132.bugfix new file mode 100644 index 0000000000..73db65cf37 --- /dev/null +++ b/packages/volto/news/6132.bugfix @@ -0,0 +1 @@ +Cleanup Image widget and pass down onSelectItem prop if any @sneridagh diff --git a/packages/volto/src/components/manage/Blocks/Image/Edit.jsx b/packages/volto/src/components/manage/Blocks/Image/Edit.jsx index c0e2f418fc..6483a8846d 100644 --- a/packages/volto/src/components/manage/Blocks/Image/Edit.jsx +++ b/packages/volto/src/components/manage/Blocks/Image/Edit.jsx @@ -4,13 +4,8 @@ */ import React from 'react'; -import { connect } from 'react-redux'; -import { compose } from 'redux'; - -import { injectIntl } from 'react-intl'; import cx from 'classnames'; import { ImageSidebar, SidebarPortal } from '@plone/volto/components'; -import { createContent } from '@plone/volto/actions'; import { flattenToAppURL, @@ -21,18 +16,6 @@ import config from '@plone/volto/registry'; import { ImageInput } from '@plone/volto/components/manage/Widgets/ImageWidget'; -/** - * Edit image block function. - * @function Edit - */ - -// const messages = defineMessages({ -// notImage: { -// id: 'The provided link does not lead to an image.', -// defaultMessage: 'The provided link does not lead to an image.', -// }, -// }); - function Edit(props) { const { data } = props; const Image = config.getComponent({ name: 'Image' }).component; @@ -120,14 +103,4 @@ function Edit(props) { ); } -export default compose( - injectIntl, - withBlockExtensions, - connect( - (state, ownProps) => ({ - request: state.content.subrequests[ownProps.block] || {}, - content: state.content.subrequests[ownProps.block]?.data, - }), - { createContent }, - ), -)(Edit); +export default withBlockExtensions(Edit); diff --git a/packages/volto/src/components/manage/Widgets/ImageWidget.jsx b/packages/volto/src/components/manage/Widgets/ImageWidget.jsx index f7a436c862..105c60bb45 100644 --- a/packages/volto/src/components/manage/Widgets/ImageWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/ImageWidget.jsx @@ -75,6 +75,7 @@ const UnconnectedImageInput = (props) => { objectBrowserPickerType = 'image', description, placeholderLinkInput = '', + onSelectItem, } = props; const intl = useIntl(); @@ -204,16 +205,15 @@ const UnconnectedImageInput = (props) => { e.preventDefault(); openObjectBrowser({ mode: objectBrowserPickerType, - onSelectItem: ( - url, - { title, image_field, image_scales }, - ) => { - onChange(props.id, flattenToAppURL(url), { - title, - image_field, - image_scales, - }); - }, + onSelectItem: onSelectItem + ? onSelectItem + : (url, { title, image_field, image_scales }) => { + onChange(props.id, flattenToAppURL(url), { + title, + image_field, + image_scales, + }); + }, currentPath: contextUrl, }); }} From 3c56a14947cf99fdf55dcc91cd8bd94dacc2b403 Mon Sep 17 00:00:00 2001 From: Tom Schall Date: Fri, 28 Jun 2024 12:15:23 +0200 Subject: [PATCH 12/16] rename test-setup-config.js to test-setup-config.jsx (#6133) --- apps/plone/package.json | 2 +- .../generators/app/templates/package.json.tpl | 2 +- packages/generator-volto/news/6133.bugfix | 1 + packages/volto/news/6133.bugfix | 1 + packages/volto/src/components/manage/Add/Add.jsx | 4 +++- .../manage/Multilingual/CreateTranslation.jsx | 4 +++- .../manage/Multilingual/TranslationObject.jsx | 4 +++- .../manage/Preferences/PersonalPreferences.jsx | 4 +++- .../MultilingualRedirector/MultilingualRedirector.jsx | 4 +++- packages/volto/src/middleware/api.js | 10 +++++----- packages/volto/src/server.jsx | 4 +++- 11 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 packages/generator-volto/news/6133.bugfix create mode 100644 packages/volto/news/6133.bugfix diff --git a/apps/plone/package.json b/apps/plone/package.json index b5e2e0ccb9..b7bcd8c73d 100644 --- a/apps/plone/package.json +++ b/apps/plone/package.json @@ -66,7 +66,7 @@ }, "setupFiles": [ "@plone/volto/test-setup-globals.js", - "@plone/volto/test-setup-config.js" + "@plone/volto/test-setup-config.jsx" ], "globals": { "__DEV__": true diff --git a/packages/generator-volto/generators/app/templates/package.json.tpl b/packages/generator-volto/generators/app/templates/package.json.tpl index 653b39a1e0..ca5c3edcec 100644 --- a/packages/generator-volto/generators/app/templates/package.json.tpl +++ b/packages/generator-volto/generators/app/templates/package.json.tpl @@ -66,7 +66,7 @@ }, "setupFiles": [ "@plone/volto/test-setup-globals.js", - "@plone/volto/test-setup-config.js" + "@plone/volto/test-setup-config.jsx" ], "globals": { "__DEV__": true diff --git a/packages/generator-volto/news/6133.bugfix b/packages/generator-volto/news/6133.bugfix new file mode 100644 index 0000000000..76af974497 --- /dev/null +++ b/packages/generator-volto/news/6133.bugfix @@ -0,0 +1 @@ +Rename test-setup-config.js to test-setup-config.jsx, otherwise jest tests will eventually fail @tomschall \ No newline at end of file diff --git a/packages/volto/news/6133.bugfix b/packages/volto/news/6133.bugfix new file mode 100644 index 0000000000..1732eebd9f --- /dev/null +++ b/packages/volto/news/6133.bugfix @@ -0,0 +1 @@ +Whitelist some dynamic imports to suppress vite warnings in storybook @tomschall \ No newline at end of file diff --git a/packages/volto/src/components/manage/Add/Add.jsx b/packages/volto/src/components/manage/Add/Add.jsx index 0510b43f5a..1c4fb668e6 100644 --- a/packages/volto/src/components/manage/Add/Add.jsx +++ b/packages/volto/src/components/manage/Add/Add.jsx @@ -239,7 +239,9 @@ class Add extends Component { if (this.props.location?.state?.translationOf) { const language = this.props.location.state.languageFrom; const langFileName = toGettextLang(language); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { this.props.changeLanguage(language, locale.default); }); this.props.history.push(this.props.location?.state?.translationOf); diff --git a/packages/volto/src/components/manage/Multilingual/CreateTranslation.jsx b/packages/volto/src/components/manage/Multilingual/CreateTranslation.jsx index adc364f507..24371546c7 100644 --- a/packages/volto/src/components/manage/Multilingual/CreateTranslation.jsx +++ b/packages/volto/src/components/manage/Multilingual/CreateTranslation.jsx @@ -34,7 +34,9 @@ const CreateTranslation = (props) => { // We change the interface language if (config.settings.supportedLanguages.includes(language)) { const langFileName = toGettextLang(language); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { dispatch(changeLanguage(language, locale.default)); }); } diff --git a/packages/volto/src/components/manage/Multilingual/TranslationObject.jsx b/packages/volto/src/components/manage/Multilingual/TranslationObject.jsx index 706507b878..6b00724adf 100644 --- a/packages/volto/src/components/manage/Multilingual/TranslationObject.jsx +++ b/packages/volto/src/components/manage/Multilingual/TranslationObject.jsx @@ -48,7 +48,9 @@ const TranslationObject = ({ let lang = config.settings.supportedLanguages[Object.keys(locales).length]; const langFileName = toGettextLang(lang); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { setLocales({ ...locales, [toReactIntlLang(lang)]: locale.default }); setLoadingLocale(false); }); diff --git a/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx b/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx index 22681be9e3..ed494c2792 100644 --- a/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx +++ b/packages/volto/src/components/manage/Preferences/PersonalPreferences.jsx @@ -88,7 +88,9 @@ class PersonalPreferences extends Component { let language = data.language || 'en'; if (config.settings.supportedLanguages.includes(language)) { const langFileName = toGettextLang(language); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { this.props.changeLanguage(language, locale.default); }); } diff --git a/packages/volto/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx b/packages/volto/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx index dfd5fc99b2..6e71beb381 100644 --- a/packages/volto/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx +++ b/packages/volto/src/components/theme/MultilingualRedirector/MultilingualRedirector.jsx @@ -24,7 +24,9 @@ const MultilingualRedirector = (props) => { let mounted = true; if (settings.isMultilingual && pathname === '/') { const langFileName = toGettextLang(redirectToLanguage); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { if (mounted) { dispatch(changeLanguage(redirectToLanguage, locale.default)); } diff --git a/packages/volto/src/middleware/api.js b/packages/volto/src/middleware/api.js index f46dc30470..fa23d37dbb 100644 --- a/packages/volto/src/middleware/api.js +++ b/packages/volto/src/middleware/api.js @@ -237,11 +237,11 @@ const apiMiddlewareFactory = config.settings.supportedLanguages.includes(lang) ) { const langFileName = toGettextLang(lang); - import('@root/../locales/' + langFileName + '.json').then( - (locale) => { - dispatch(changeLanguage(lang, locale.default)); - }, - ); + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { + dispatch(changeLanguage(lang, locale.default)); + }); } } if (type === LOGIN && settings.websockets) { diff --git a/packages/volto/src/server.jsx b/packages/volto/src/server.jsx index 38948f2c86..e8555349fc 100644 --- a/packages/volto/src/server.jsx +++ b/packages/volto/src/server.jsx @@ -46,7 +46,9 @@ let locales = {}; if (config.settings) { config.settings.supportedLanguages.forEach((lang) => { const langFileName = toGettextLang(lang); - import('@root/../locales/' + langFileName + '.json').then((locale) => { + import( + /* @vite-ignore */ '@root/../locales/' + langFileName + '.json' + ).then((locale) => { locales = { ...locales, [toReactIntlLang(lang)]: locale.default }; }); }); From 07bb1dc3a410bbd6d29fcb25fa113ec8c050cc42 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 28 Jun 2024 12:16:27 +0200 Subject: [PATCH 13/16] Release generate-volto 9.0.0-alpha.17 --- packages/generator-volto/CHANGELOG.md | 6 ++++++ packages/generator-volto/news/6133.bugfix | 1 - packages/generator-volto/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 packages/generator-volto/news/6133.bugfix diff --git a/packages/generator-volto/CHANGELOG.md b/packages/generator-volto/CHANGELOG.md index 0bc520bfd1..fb6cf2607a 100644 --- a/packages/generator-volto/CHANGELOG.md +++ b/packages/generator-volto/CHANGELOG.md @@ -8,6 +8,12 @@ +## 9.0.0-alpha.17 (2024-06-28) + +### Bugfix + +- Rename test-setup-config.js to test-setup-config.jsx, otherwise jest tests will eventually fail @tomschall [#6133](https://github.com/plone/volto/issues/6133) + ## 9.0.0-alpha.16 (2024-05-15) ### Bugfix diff --git a/packages/generator-volto/news/6133.bugfix b/packages/generator-volto/news/6133.bugfix deleted file mode 100644 index 76af974497..0000000000 --- a/packages/generator-volto/news/6133.bugfix +++ /dev/null @@ -1 +0,0 @@ -Rename test-setup-config.js to test-setup-config.jsx, otherwise jest tests will eventually fail @tomschall \ No newline at end of file diff --git a/packages/generator-volto/package.json b/packages/generator-volto/package.json index d14ac702fa..f61a14b344 100644 --- a/packages/generator-volto/package.json +++ b/packages/generator-volto/package.json @@ -10,7 +10,7 @@ } ], "license": "MIT", - "version": "9.0.0-alpha.16", + "version": "9.0.0-alpha.17", "repository": { "type": "git", "url": "git+https://github.com/plone/generator-volto.git" From ca3c293b2379dad38b52b0d8fa33e7ed87105f9c Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 28 Jun 2024 12:17:13 +0200 Subject: [PATCH 14/16] Release 18.0.0-alpha.39 --- docs/source/release-notes/index.md | 7 +++++++ packages/volto/CHANGELOG.md | 7 +++++++ packages/volto/news/6132.bugfix | 1 - packages/volto/news/6133.bugfix | 1 - packages/volto/package.json | 2 +- .../volto/types/components/manage/Blocks/Image/Edit.d.ts | 2 +- 6 files changed, 16 insertions(+), 4 deletions(-) delete mode 100644 packages/volto/news/6132.bugfix delete mode 100644 packages/volto/news/6133.bugfix diff --git a/docs/source/release-notes/index.md b/docs/source/release-notes/index.md index c71ae22480..4728bf767b 100644 --- a/docs/source/release-notes/index.md +++ b/docs/source/release-notes/index.md @@ -17,6 +17,13 @@ myst: +## 18.0.0-alpha.39 (2024-06-28) + +### Bugfix + +- Cleanup Image widget and pass down onSelectItem prop if any @sneridagh [#6132](https://github.com/plone/volto/issues/6132) +- Whitelist some dynamic imports to suppress vite warnings in storybook @tomschall [#6133](https://github.com/plone/volto/issues/6133) + ## 18.0.0-alpha.38 (2024-06-28) ### Internal diff --git a/packages/volto/CHANGELOG.md b/packages/volto/CHANGELOG.md index c71ae22480..4728bf767b 100644 --- a/packages/volto/CHANGELOG.md +++ b/packages/volto/CHANGELOG.md @@ -17,6 +17,13 @@ myst: +## 18.0.0-alpha.39 (2024-06-28) + +### Bugfix + +- Cleanup Image widget and pass down onSelectItem prop if any @sneridagh [#6132](https://github.com/plone/volto/issues/6132) +- Whitelist some dynamic imports to suppress vite warnings in storybook @tomschall [#6133](https://github.com/plone/volto/issues/6133) + ## 18.0.0-alpha.38 (2024-06-28) ### Internal diff --git a/packages/volto/news/6132.bugfix b/packages/volto/news/6132.bugfix deleted file mode 100644 index 73db65cf37..0000000000 --- a/packages/volto/news/6132.bugfix +++ /dev/null @@ -1 +0,0 @@ -Cleanup Image widget and pass down onSelectItem prop if any @sneridagh diff --git a/packages/volto/news/6133.bugfix b/packages/volto/news/6133.bugfix deleted file mode 100644 index 1732eebd9f..0000000000 --- a/packages/volto/news/6133.bugfix +++ /dev/null @@ -1 +0,0 @@ -Whitelist some dynamic imports to suppress vite warnings in storybook @tomschall \ No newline at end of file diff --git a/packages/volto/package.json b/packages/volto/package.json index 9e3e7166ff..c6dbf64c40 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "18.0.0-alpha.38", + "version": "18.0.0-alpha.39", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" diff --git a/packages/volto/types/components/manage/Blocks/Image/Edit.d.ts b/packages/volto/types/components/manage/Blocks/Image/Edit.d.ts index 5298df7f0f..c17a3f4a2e 100644 --- a/packages/volto/types/components/manage/Blocks/Image/Edit.d.ts +++ b/packages/volto/types/components/manage/Blocks/Image/Edit.d.ts @@ -1,2 +1,2 @@ -declare const _default: any; +declare const _default: (props: any) => import("react/jsx-runtime").JSX.Element; export default _default; From 3d782c9868c7d2cc88a706e30d5073b503c5ad3d Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 28 Jun 2024 07:14:54 -0700 Subject: [PATCH 15/16] Fix link to renamed `src/constants/Languages.cjs` (#6135) --- docs/source/development/i18n.md | 2 +- packages/volto/news/6135.documentation | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 packages/volto/news/6135.documentation diff --git a/docs/source/development/i18n.md b/docs/source/development/i18n.md index 15c6bddc49..9359ef4e6f 100644 --- a/docs/source/development/i18n.md +++ b/docs/source/development/i18n.md @@ -25,7 +25,7 @@ The workflow for creating *new* translatable text strings is as follows: 1. Extract all i18n strings from your code with a script and create artifacts, like `.po` and `.pot` files. 1. Use your favorite editor to translate all i18n strings by editing the `.po` files. 1. Re-run the script, which then moves the translations from the `.po` files into `.json` files for Volto to use. -1. Edit [`packages/volto/src/constants/Languages.js`](https://github.com/plone/volto/blob/main/packages/volto/src/constants/Languages.js), adding your new language's locale code, as defined in {ref}`i18n-l10n-locale-and-language-tag-conventions-label`. +1. Edit [`packages/volto/src/constants/Languages.cjs`](https://github.com/plone/volto/blob/main/packages/volto/src/constants/Languages.cjs), adding your new language's locale code, as defined in {ref}`i18n-l10n-locale-and-language-tag-conventions-label`. 1. Run the unit tests as described in {ref}`run-jest-tests-on-volto-core-label`, following the prompt to update the snapshot when the test fails. This way of organizing translations relies on [gettext](https://en.wikipedia.org/wiki/Gettext), a proven and established system with great tool support. diff --git a/packages/volto/news/6135.documentation b/packages/volto/news/6135.documentation new file mode 100644 index 0000000000..f689548589 --- /dev/null +++ b/packages/volto/news/6135.documentation @@ -0,0 +1 @@ +Fix link to renamed `src/constants/Languages.cjs`. @stevepiercy From 51bdfa0bd4d1b3b726855da0a0e6ad2880271b29 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 28 Jun 2024 07:15:15 -0700 Subject: [PATCH 16/16] Automatically add the PLIP to the PLIP project board (#6134) --- .github/ISSUE_TEMPLATE/PLIP.md | 1 + packages/volto/news/6134.internal | 1 + 2 files changed, 2 insertions(+) create mode 100644 packages/volto/news/6134.internal diff --git a/.github/ISSUE_TEMPLATE/PLIP.md b/.github/ISSUE_TEMPLATE/PLIP.md index 9eb2c48076..12ce5f1331 100644 --- a/.github/ISSUE_TEMPLATE/PLIP.md +++ b/.github/ISSUE_TEMPLATE/PLIP.md @@ -4,6 +4,7 @@ about: Plone Improvement Proposal title: '' labels: '03 type: feature (plip)' assignees: '' +projects: 'plone/47' --- diff --git a/packages/volto/news/6134.internal b/packages/volto/news/6134.internal new file mode 100644 index 0000000000..97a602f581 --- /dev/null +++ b/packages/volto/news/6134.internal @@ -0,0 +1 @@ +Automatically add a PLIP issue to the PLIP project board. @stevepiercy