diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c8d246e5..1dd70383e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,30 @@ +## 17.0.0-alpha.11 (2023-06-09) + +### Bugfix + +- Added current page parameter to route in listing and search block pagination - Fix: #3868 @bipoza [#4159](https://github.com/plone/volto/issues/4159) + + +## 17.0.0-alpha.10 (2023-06-09) + +### Feature + +- Search Block: Add support for advanced facets that are only displayed on demand. + [pbauer, razvanMiu, claudiaifrim] [#4783](https://github.com/plone/volto/issues/4783) +- Display PAS validation errors. [tschorr] [#4801](https://github.com/plone/volto/issues/4801) +- Added a CSS identifier to the Slate style menu options. @razvanMiu [#4846](https://github.com/plone/volto/issues/4846) +- Use a Container from the registry in the Form component and fallback to the Semantic UI one. @sneridagh [#4849](https://github.com/plone/volto/issues/4849) +- Update Brazilian Portuguese translations @ericof [#4853](https://github.com/plone/volto/issues/4853) + +### Bugfix + +- Convert header class to function. @gomez [#4767](https://github.com/plone/volto/issues/4767) +- Do not break validation on required number field with value 0 @cekk [#4841](https://github.com/plone/volto/issues/4841) + + ## 17.0.0-alpha.9 (2023-06-01) ### Bugfix diff --git a/cypress/support/commands.js b/cypress/support/commands.js index cd2e6f23d4..70bd7683a8 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -849,3 +849,23 @@ Cypress.Commands.add('getTableSlate', (header = false) => { ); return slate; }); + +Cypress.Commands.add('configureListingWith', (contentType) => { + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + cy.get('.querystring-widget .fields').contains('Add criteria').click(); + cy.get( + '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option', + ) + .contains('Type') + .click(); + + //insert Page + cy.get('.querystring-widget .fields:first-of-type > .field').click(); + cy.get( + '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option', + ) + .contains(contentType) + .click(); +}); diff --git a/cypress/tests/core/blocks/blocks-listing.js b/cypress/tests/core/blocks/blocks-listing.js index bea65dac47..288909dc79 100644 --- a/cypress/tests/core/blocks/blocks-listing.js +++ b/cypress/tests/core/blocks/blocks-listing.js @@ -21,6 +21,42 @@ describe('Listing Block Tests', () => { cy.waitForResourceToLoad(''); }); + it('Add Listing block with no results', () => { + cy.intercept('PATCH', '/**/my-page').as('save'); + cy.intercept('GET', '/**/my-page').as('content'); + cy.intercept('GET', '/**/@types/Document').as('schema'); + + cy.createContent({ + contentType: 'Document', + contentId: 'my-page-test', + contentTitle: 'My Page Test', + path: 'my-page', + }); + + cy.navigate('/my-page'); + cy.wait('@content'); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.clearSlateTitle().type('My title'); + + //add listing block + cy.addNewBlock('listing'); + + cy.configureListingWith('News Item'); + + //save + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + + //test after save + cy.get('#page-document .block.listing.default .emptyListing').contains( + 'No results found.', + ); + }); + it('Add Listing block', () => { cy.intercept('PATCH', '/**/my-page').as('save'); cy.intercept('GET', '/**/my-page').as('content'); @@ -841,6 +877,354 @@ describe('Listing Block Tests', () => { cy.get('.listing-item h4').first().contains('My Folder 3'); }); + it('Navigates in listing block pagination and url clears on logo click', () => { + cy.intercept('PATCH', '/**/my-page').as('save'); + cy.intercept('GET', '/**/my-page').as('content'); + cy.intercept('GET', '/**/@types/Document').as('schema'); + + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder', + contentTitle: 'My Folder', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder2', + contentTitle: 'My Folder 2', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder3', + contentTitle: 'My Folder 3', + path: 'my-page', + }); + + cy.navigate('/my-page'); + cy.wait('@content'); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.clearSlateTitle().type('Listing block - navigate to second page'); + + //add listing block + cy.addNewBlock('listing'); + + //verify before save + cy.get(`.block.listing .listing-body:first-of-type`).contains('My Folder'); + + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + cy.get('.querystring-widget .fields').contains('Add criteria').click(); + cy.get( + '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option', + ) + .contains('Type') + .click(); + + //insert Page + cy.get('.querystring-widget .fields:first-of-type > .field').click(); + cy.get( + '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option', + ) + .contains('Page') + .click(); + + cy.get('#field-limit-3-querystring').click().type('2'); + + cy.get('#field-limit-3-querystring').click().clear().type('0'); + cy.get('#field-b_size-4-querystring').click().type('2'); + cy.get('.ui.pagination.menu a[value="2"]').first().click(); + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + //test second pagination click + cy.get('.ui.pagination.menu a[value="2"]').first().click({ force: true }); + cy.url().should('include', '?page=2'); + //on logo click go to home page and remove ?page=2 from path + cy.get('.logo').first().click(); + cy.url().should('not.include', '?page=2'); + }); + + // reload url when ?page=2 + it('Reload path when listing page = 2', () => { + cy.intercept('PATCH', '/**/my-page').as('save'); + cy.intercept('GET', '/**/my-page').as('content'); + cy.intercept('GET', '/**/@types/Document').as('schema'); + + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder', + contentTitle: 'My Folder', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder2', + contentTitle: 'My Folder 2', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder3', + contentTitle: 'My Folder 3', + path: 'my-page', + }); + + cy.navigate('/my-page'); + cy.wait('@content'); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.clearSlateTitle().type( + 'Listing block - navigate to second page and reload path', + ); + + //add listing block + cy.addNewBlock('listing'); + + //verify before save + cy.get(`.block.listing .listing-body:first-of-type`).contains('My Folder'); + + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + cy.get('.querystring-widget .fields').contains('Add criteria').click(); + cy.get( + '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option', + ) + .contains('Type') + .click(); + + //insert Page + cy.get('.querystring-widget .fields:first-of-type > .field').click(); + cy.get( + '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option', + ) + .contains('Page') + .click(); + + cy.get('#field-limit-3-querystring').click().type('2'); + + //save + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + + //test after save + cy.get('#page-document .listing-item:first-of-type a').should( + 'have.attr', + 'href', + '/my-page/my-folder', + ); + cy.get('.listing-item').should(($els) => { + expect($els).to.have.length(2); + }); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.get('.block-editor-listing').click(); + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + + cy.get('#field-limit-3-querystring').click().clear().type('0'); + cy.get('#field-b_size-4-querystring').click().type('2'); + cy.get('.ui.pagination.menu a[value="2"]').first().click(); + + cy.get('.listing-item h4').first().contains('My Folder 3'); + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + //test second pagination click + cy.get('.ui.pagination.menu a[value="2"]').first().click(); + + //test f5 + cy.reload(); + cy.url().should('include', '?page=2'); + }); + + // different page in two listings on the same page + it('Navigate to different pages on two different listings', () => { + cy.intercept('PATCH', '/**/my-page').as('save'); + cy.intercept('GET', '/**/my-page').as('content'); + cy.intercept('GET', '/**/@types/Document').as('schema'); + + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder', + contentTitle: 'My Folder', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder2', + contentTitle: 'My Folder 2', + path: 'my-page', + }); + cy.createContent({ + contentType: 'Document', + contentId: 'my-folder3', + contentTitle: 'My Folder 3', + path: 'my-page', + }); + + cy.navigate('/my-page'); + cy.wait('@content'); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.clearSlateTitle().type( + 'Listing block - navigate to different pages on two different listings', + ); + + //add listing block + cy.addNewBlock('listing'); + + //verify before save + cy.get(`.block.listing .listing-body:first-of-type`).contains('My Folder'); + + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + cy.get('.querystring-widget .fields').contains('Add criteria').click(); + cy.get( + '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option', + ) + .contains('Type') + .click(); + + //insert Page + cy.get('.querystring-widget .fields:first-of-type > .field').click(); + cy.get( + '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option', + ) + .contains('Page') + .click(); + + cy.get('#field-limit-3-querystring').click().type('0'); + cy.get('#field-b_size-4-querystring').click().type('2'); + + cy.addNewBlock('listing'); + + //verify before save + cy.get(`.block.listing .listing-body:first-of-type`).contains('My Folder'); + + cy.get('.sidebar-container .tabs-wrapper .menu .item') + .contains('Block') + .click(); + cy.get('.querystring-widget .fields').contains('Add criteria').click(); + cy.get( + '.querystring-widget .fields:first-of-type .field:first-of-type .react-select__menu .react-select__option', + ) + .contains('Type') + .click(); + + //insert Page + cy.get('.querystring-widget .fields:first-of-type > .field').click(); + cy.get( + '.querystring-widget .fields:first-of-type > .field .react-select__menu .react-select__option', + ) + .contains('Page') + .click(); + + cy.get('#field-limit-3-querystring').click().type('0'); + cy.get('#field-b_size-4-querystring').click().type('1'); + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + + // const listing1 = cy.get('.ui.pagination.menu').first(); + // cy.log('listing1', listing1); + //test second pagination click + cy.get('.ui.pagination.menu a[value="2"]').first().click(); + //test f5 + cy.reload(); + cy.url().should('include', '=2'); + // const listing2 = cy.get('.ui.pagination.menu').last(); + //test third pagination click on second listing + cy.get('.ui.pagination.menu a[value="3"]').first().click(); + //test f5 + cy.reload(); + cy.url().should('include', '=2'); + cy.url().should('include', '=3'); + //on logo click go to home page and remove ?page=2 from path + cy.get('.logo').first().click(); + cy.url().should('not.include', '=2'); + cy.url().should('not.include', '=3'); + //test back button + cy.navigate('/my-page'); + cy.wait('@content'); + cy.get('.ui.pagination.menu a[value="2"]').first().click({ force: true }); + cy.get('.ui.pagination.menu a[value="3"]').first().click({ force: true }); + cy.go(-1); + cy.url().should('not.include', '=3'); + cy.go(-1); + cy.url().should('not.include', '=2'); + cy.url().should('not.include', '=3'); + }); + + it('Add Listing block with no results, navigate to home, add a News Item, go to the listing', () => { + cy.intercept('PATCH', '/**/my-page').as('save'); + cy.intercept('GET', '/**/my-page').as('content'); + cy.intercept('GET', '/**/@types/Document').as('schema'); + + cy.createContent({ + contentType: 'Document', + contentId: 'my-page-test', + contentTitle: 'My Page Test', + path: 'my-page', + }); + + cy.navigate('/my-page'); + cy.wait('@content'); + + cy.navigate('/my-page/edit'); + cy.wait('@schema'); + + cy.clearSlateTitle().type('My title'); + + //add listing block + cy.addNewBlock('listing'); + + cy.configureListingWith('News Item'); + + //save + cy.get('#toolbar-save').click(); + cy.wait('@save'); + cy.wait('@content'); + + //test after save + cy.get('#page-document .block.listing.default .emptyListing').contains( + 'No results found.', + ); + + cy.get('.logo').first().click(); + + cy.createContent({ + contentType: 'News Item', + contentId: 'my-news-item-test', + contentTitle: 'My News Item', + path: 'my-page', + }); + cy.navigate('/my-page'); + + cy.get('#page-document .listing-body:first-of-type').contains( + 'My News Item', + ); + cy.get('#page-document .listing-item:first-of-type a').should( + 'have.attr', + 'href', + '/my-page/my-news-item-test', + ); + }); + // it('Listing block - Test Criteria: Location Navigation', () => { // /*not implemented because Navigation ui is not yet developed in Listing Block sidebar*/ // }); diff --git a/docs/source/user-manual/blocks.md b/docs/source/user-manual/blocks.md index 9e4c744d4d..7c8e42b3d5 100644 --- a/docs/source/user-manual/blocks.md +++ b/docs/source/user-manual/blocks.md @@ -408,6 +408,9 @@ Hide facet? : Toggle to show or hide the facet. Hidden facets will still filter the results if proper parameters are passed in URLs +Advanced facet? +: Select to set the facet as advanced. + Advanced facets are initially hidden and displayed on demand. #### Controls diff --git a/locales/ca/LC_MESSAGES/volto.po b/locales/ca/LC_MESSAGES/volto.po index a02dd0dc4c..e01b268d76 100644 --- a/locales/ca/LC_MESSAGES/volto.po +++ b/locales/ca/LC_MESSAGES/volto.po @@ -277,6 +277,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1262,9 +1272,9 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Introduïu la vostra nova contrasenya. Mínim 5 caràcters." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Introduïu la vostra nova contrasenya. Mínim 8 caràcters." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1582,6 +1592,11 @@ msgstr "Amaga les respostes" msgid "Hide facet?" msgstr "Amagar la faceta?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1878,6 +1893,11 @@ msgstr "Imatge Principal" msgid "Left" msgstr "A l'esquerra" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2087,6 +2107,11 @@ msgstr "Mensual" msgid "More" msgstr "Més" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3096,6 +3121,11 @@ msgstr "Mostrar tots" msgid "Show Replies" msgstr "Mostra les respostes" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/de/LC_MESSAGES/volto.po b/locales/de/LC_MESSAGES/volto.po index 16f7066fe3..22c83cb8a6 100644 --- a/locales/de/LC_MESSAGES/volto.po +++ b/locales/de/LC_MESSAGES/volto.po @@ -274,6 +274,16 @@ msgstr "Erweiterung erfolgreich deaktiviert" msgid "Addon upgraded succesfuly" msgstr "Erweiterung erfolgreich aktualisiert" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1259,9 +1269,9 @@ msgstr "Geben Sie Ihre E-Mail zur Verifikation ein." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Geben Sie ihr neues Passwort ein. Mindestens 5 Zeichen." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Geben Sie ihr neues Passwort ein. Mindestens 8 Zeichen." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1579,6 +1589,11 @@ msgstr "Antworten ausblenden" msgid "Hide facet?" msgstr "Facette verstecken" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1875,6 +1890,11 @@ msgstr "Lead-Bild" msgid "Left" msgstr "Links" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2084,6 +2104,11 @@ msgstr "Monatlich" msgid "More" msgstr "Mehr" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3093,6 +3118,11 @@ msgstr "Alle anzeigen" msgid "Show Replies" msgstr "Antworten anzeigen" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/en/LC_MESSAGES/volto.po b/locales/en/LC_MESSAGES/volto.po index a24059b653..c85490b44b 100644 --- a/locales/en/LC_MESSAGES/volto.po +++ b/locales/en/LC_MESSAGES/volto.po @@ -268,6 +268,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1253,8 +1263,8 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." msgstr "" #: components/theme/PasswordReset/PasswordReset @@ -1573,6 +1583,11 @@ msgstr "" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1869,6 +1884,11 @@ msgstr "" msgid "Left" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2078,6 +2098,11 @@ msgstr "" msgid "More" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3087,6 +3112,11 @@ msgstr "" msgid "Show Replies" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/es/LC_MESSAGES/volto.po b/locales/es/LC_MESSAGES/volto.po index 46d8d38ef5..696ad123e6 100644 --- a/locales/es/LC_MESSAGES/volto.po +++ b/locales/es/LC_MESSAGES/volto.po @@ -279,6 +279,16 @@ msgstr "Complemento desinstalado con éxito" msgid "Addon upgraded succesfuly" msgstr "Complemento actualizado con éxito" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1264,9 +1274,9 @@ msgstr "Introduzca su correo electrónico para verificar." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Introduzca su nueva contraseña. Mínimo 5 caracteres." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Introduzca su nueva contraseña. Mínimo 8 caracteres." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1584,6 +1594,11 @@ msgstr "Ocultar respuestas" msgid "Hide facet?" msgstr "¿Ocultar la faceta?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1880,6 +1895,11 @@ msgstr "Imagen principal" msgid "Left" msgstr "Izquierda" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2089,6 +2109,11 @@ msgstr "Mensualmente" msgid "More" msgstr "Más" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3098,6 +3123,11 @@ msgstr "Mostrar todos" msgid "Show Replies" msgstr "Mostrar respuestas" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/eu/LC_MESSAGES/volto.po b/locales/eu/LC_MESSAGES/volto.po index 931b0ccfcc..b19c9ad4de 100644 --- a/locales/eu/LC_MESSAGES/volto.po +++ b/locales/eu/LC_MESSAGES/volto.po @@ -275,6 +275,16 @@ msgstr "Produktu gehigarria ondo kendu da" msgid "Addon upgraded succesfuly" msgstr "Produktu gehigarria ondo eguneratu da" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1260,9 +1270,9 @@ msgstr "Idatzi zure eposta helbidea egiaztatu dezagun." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Idatzi zure pasahitz berria. Gutxienez 5 karaktere." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Idatzi zure pasahitz berria. Gutxienez 8 karaktere." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1580,6 +1590,11 @@ msgstr "Ezkutatu erantzunak" msgid "Hide facet?" msgstr "Fazeta ezkutatu?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1876,6 +1891,11 @@ msgstr "Irudia" msgid "Left" msgstr "Ezkerrean" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2085,6 +2105,11 @@ msgstr "Hilero" msgid "More" msgstr "Gehiago" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3094,6 +3119,11 @@ msgstr "Erakutsi guztiak" msgid "Show Replies" msgstr "Erakutsi erantzunak" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/fi/LC_MESSAGES/volto.po b/locales/fi/LC_MESSAGES/volto.po index 814af6ebdd..19345cfa05 100644 --- a/locales/fi/LC_MESSAGES/volto.po +++ b/locales/fi/LC_MESSAGES/volto.po @@ -279,6 +279,16 @@ msgstr "Laajennos poistettu onnistuneesti" msgid "Addon upgraded succesfuly" msgstr "Laajennos päivitetty onnistuneesti" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1264,9 +1274,9 @@ msgstr "Syötä sähköpostiosoitteesi vahvistusta varten." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (5) merkkiä." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Syötä uusi salasanasi, jossa on vähintään viisi (8) merkkiä." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1584,6 +1594,11 @@ msgstr "Piilota vastaukset" msgid "Hide facet?" msgstr "Piilota fasetti?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1880,6 +1895,11 @@ msgstr "Nostokuva" msgid "Left" msgstr "Vasemmalla" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2089,6 +2109,11 @@ msgstr "Kuukausittain" msgid "More" msgstr "Lisää" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3098,6 +3123,11 @@ msgstr "Näytä kaikki" msgid "Show Replies" msgstr "Näytä vastaukset" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/fr/LC_MESSAGES/volto.po b/locales/fr/LC_MESSAGES/volto.po index d437f15166..cfcd5a0af4 100644 --- a/locales/fr/LC_MESSAGES/volto.po +++ b/locales/fr/LC_MESSAGES/volto.po @@ -285,6 +285,16 @@ msgstr "Module désinstallé avec succès" msgid "Addon upgraded succesfuly" msgstr "Module mis à jour avec succès" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1270,9 +1280,9 @@ msgstr "Saisissez votre email pour vérification." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Saisissez votre nouveau mot de passe. Minimum 5 caractères." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Saisissez votre nouveau mot de passe. Minimum 8 caractères." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1590,6 +1600,11 @@ msgstr "Masquer les réponses" msgid "Hide facet?" msgstr "Masquer la facette ?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1886,6 +1901,11 @@ msgstr "Image de garde" msgid "Left" msgstr "Gauche" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2095,6 +2115,11 @@ msgstr "Mensuel" msgid "More" msgstr "Plus" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3104,6 +3129,11 @@ msgstr "Afficher tous" msgid "Show Replies" msgstr "Afficher les réponses" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/it/LC_MESSAGES/volto.po b/locales/it/LC_MESSAGES/volto.po index aafcf9dda1..64d87aadc6 100644 --- a/locales/it/LC_MESSAGES/volto.po +++ b/locales/it/LC_MESSAGES/volto.po @@ -268,6 +268,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1253,9 +1263,9 @@ msgstr "Inserisci la tua email per la verifica." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Inserisci la tua nuova password. Minimo 5 caratteri." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Inserisci la tua nuova password. Minimo 8 caratteri." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1573,6 +1583,11 @@ msgstr "Nascondi risposte" msgid "Hide facet?" msgstr "Nascondi il filtro" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1869,6 +1884,11 @@ msgstr "Immagine di testata" msgid "Left" msgstr "Sinistra" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2078,6 +2098,11 @@ msgstr "Mensile" msgid "More" msgstr "Altro" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3087,6 +3112,11 @@ msgstr "Mostra tutti" msgid "Show Replies" msgstr "Mostra risposte" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/ja/LC_MESSAGES/volto.po b/locales/ja/LC_MESSAGES/volto.po index 0ecb23ffe3..9aef53b157 100644 --- a/locales/ja/LC_MESSAGES/volto.po +++ b/locales/ja/LC_MESSAGES/volto.po @@ -276,6 +276,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1261,9 +1271,9 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "新しいパスワードを入力。(5文字以上)" +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "新しいパスワードを入力。(8文字以上)" #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1581,6 +1591,11 @@ msgstr "" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1877,6 +1892,11 @@ msgstr "リード画像" msgid "Left" msgstr "左" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2086,6 +2106,11 @@ msgstr "毎月" msgid "More" msgstr "もっと見る" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3095,6 +3120,11 @@ msgstr "すべて表示" msgid "Show Replies" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/nl/LC_MESSAGES/volto.po b/locales/nl/LC_MESSAGES/volto.po index 0c6aacd343..c563bf05bb 100644 --- a/locales/nl/LC_MESSAGES/volto.po +++ b/locales/nl/LC_MESSAGES/volto.po @@ -287,6 +287,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1272,9 +1282,9 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Geef een nieuw wachtwoord op. Minimaal 5 karakters." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Geef een nieuw wachtwoord op. Minimaal 8 karakters." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1592,6 +1602,11 @@ msgstr "" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1888,6 +1903,11 @@ msgstr "" msgid "Left" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2097,6 +2117,11 @@ msgstr "" msgid "More" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3106,6 +3131,11 @@ msgstr "" msgid "Show Replies" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/pt/LC_MESSAGES/volto.po b/locales/pt/LC_MESSAGES/volto.po index ca756af8c7..b9f0a4602b 100644 --- a/locales/pt/LC_MESSAGES/volto.po +++ b/locales/pt/LC_MESSAGES/volto.po @@ -276,6 +276,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1261,9 +1271,9 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Escreva uma senha nova. Mínimo de 5 caracteres." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Escreva uma senha nova. Mínimo de 8 caracteres." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1581,6 +1591,11 @@ msgstr "" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1877,6 +1892,11 @@ msgstr "" msgid "Left" msgstr "Esquerda" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2086,6 +2106,11 @@ msgstr "" msgid "More" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3095,6 +3120,11 @@ msgstr "" msgid "Show Replies" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/pt_BR/LC_MESSAGES/volto.po b/locales/pt_BR/LC_MESSAGES/volto.po index e2fdf9d27a..899a0fa7e4 100644 --- a/locales/pt_BR/LC_MESSAGES/volto.po +++ b/locales/pt_BR/LC_MESSAGES/volto.po @@ -278,6 +278,16 @@ msgstr "Complemento desinstalado com sucesso" msgid "Addon upgraded succesfuly" msgstr "Complemento atualizado com sucesso" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "Facetas avançadas?" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "Facetas avançadas ficam ocultas inicialmente e exibidas sob demanda" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -468,7 +478,7 @@ msgstr "Navegação estrutural" #: components/manage/Controlpanels/Relations/BrokenRelations # defaultMessage: Broken relations msgid "Broken relations" -msgstr "" +msgstr "Relacionamentos rompidos" #: components/manage/Blocks/HeroImageLeft/Edit #: components/manage/Contents/ContentsUploadModal @@ -791,7 +801,7 @@ msgstr "Declaração de copyright ou outras informações de direitos sobre este #: helpers/MessageLabels/MessageLabels # defaultMessage: Create or delete relations to target msgid "Create or delete relations to target" -msgstr "" +msgstr "Crie ou remova relacionamentos para o destino" #: components/manage/Toolbar/More # defaultMessage: Create working copy @@ -1263,9 +1273,9 @@ msgstr "Informe seu e-mail para verificação." #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Digite sua nova senha. Mínimo de 5 caracteres." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Digite sua nova senha. Mínimo de 8 caracteres." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1415,7 +1425,7 @@ msgstr "Nome do arquivo" #: helpers/MessageLabels/MessageLabels # defaultMessage: Filter msgid "Filter" -msgstr "" +msgstr "Filtrar" #: components/manage/Controlpanels/Rules/Rules # defaultMessage: Filter Rules: @@ -1445,7 +1455,7 @@ msgstr "Primeiro" #: helpers/MessageLabels/MessageLabels # defaultMessage: Fix relations msgid "Fix relations" -msgstr "" +msgstr "Consertar relacionamentos" #: components/manage/Blocks/Table/Edit # defaultMessage: Fixed width columns @@ -1583,6 +1593,11 @@ msgstr "Ocultar respostas" msgid "Hide facet?" msgstr "Ocultar faceta?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "Ocultar filtros" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1654,7 +1669,7 @@ msgstr "Galeria de imagem" #: components/manage/Blocks/Teaser/schema # defaultMessage: Image override msgid "Image override" -msgstr "" +msgstr "Substituir imagem" #: components/manage/Blocks/Image/schema # defaultMessage: Image size @@ -1717,7 +1732,7 @@ msgstr "Inserir linha antes" #: helpers/MessageLabels/MessageLabels # defaultMessage: Inspect relations msgid "Inspect relations" -msgstr "" +msgstr "Inspecionar relacionamentos" #: components/manage/Controlpanels/AddonsControlpanel # defaultMessage: Install @@ -1879,6 +1894,11 @@ msgstr "Imagem principal" msgid "Left" msgstr "Esquerda" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "Menos filtros" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2009,7 +2029,7 @@ msgstr "Adicionado manual ou automaticamente?" #: helpers/MessageLabels/MessageLabels # defaultMessage: Many relations found. Please search. msgid "Many relations found. Please search." -msgstr "" +msgstr "Muitos relacionamentos foram encontrados. Por favor realize uma busca" #: components/manage/Blocks/Maps/MapsSidebar #: components/manage/Blocks/Maps/schema @@ -2040,7 +2060,7 @@ msgstr "Médio" #: helpers/MessageLabels/MessageLabels # defaultMessage: Membership updated msgid "Membership updated" -msgstr "" +msgstr "Participação atualizada" #: components/theme/ContactForm/ContactForm # defaultMessage: Message @@ -2088,6 +2108,11 @@ msgstr "Mensalmente" msgid "More" msgstr "Mais" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "Mais filtros" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -2205,7 +2230,7 @@ msgstr "Nenhum complemento encontrado" #: components/manage/Controlpanels/Relations/RelationsMatrix # defaultMessage: No broken relations found. msgid "No broken relations found." -msgstr "" +msgstr "Nenhum relacionamento rompido foi encontrado" #: components/theme/RequestTimeout/RequestTimeout # defaultMessage: There is no connection to the server, due to a timeout o no network connection. @@ -2230,7 +2255,7 @@ msgstr "Nenhuma imagem definida no campo de imagem" #: components/manage/Blocks/Listing/GalleryNoResultsComponent # defaultMessage: No images found. msgid "No images found." -msgstr "" +msgstr "Nenhuma imagem foi encontrada" #: components/manage/Blocks/Listing/ListingBody # defaultMessage: No items found in this container. @@ -2263,7 +2288,7 @@ msgstr "Sem opções" #: helpers/MessageLabels/MessageLabels # defaultMessage: No relation found msgid "No relation found" -msgstr "" +msgstr "Nenhum relacionamento foi encontrado" #: components/manage/BlockChooser/BlockChooser #: components/theme/Search/Search @@ -2448,7 +2473,7 @@ msgstr "Pessoas responsáveis pela criação do conteúdo deste item. Por favor, #: components/manage/Blocks/Teaser/DefaultBody # defaultMessage: Please choose an existing content as source for this element msgid "Please choose an existing content as source for this element" -msgstr "" +msgstr "Por favor selecione um conteúdo existente como fonte para este elemento" #: components/manage/Controlpanels/Controlpanels # defaultMessage: Please continue with the upgrade. @@ -2488,7 +2513,7 @@ msgstr "Por favor, atualize para plone.restapi >= 8.24.0." #: components/manage/Controlpanels/Relations/Relations # defaultMessage: Please upgrade to plone.restapi >= 8.35.3. msgid "Please upgrade to plone.restapi >= 8.35.3." -msgstr "" +msgstr "Por favor atualize a plone.restapi para versão 8.35.3 ou superior." #: components/theme/Footer/Footer # defaultMessage: Plone Foundation @@ -2587,12 +2612,12 @@ msgstr "Leia Mais…" #: components/manage/Controlpanels/Relations/RelationsListing # defaultMessage: Read only for this type of relation. msgid "Read only for this type of relation." -msgstr "" +msgstr "Apenas leitura para este tipo de relacionamento." #: components/manage/Contents/Contents # defaultMessage: Rearrange items by… msgid "Rearrange items by…" -msgstr "Reorganize itens por…" +msgstr "Reorganizar itens por…" #: components/manage/Widgets/RecurrenceWidget/EndField # defaultMessage: Ends @@ -2635,24 +2660,24 @@ msgstr "Formulário de cadastro" #: helpers/MessageLabels/MessageLabels # defaultMessage: Relation msgid "Relation name" -msgstr "" +msgstr "Nome do relacionamento" #: components/manage/Controlpanels/Controlpanels #: components/manage/Controlpanels/Relations/Relations #: helpers/MessageLabels/MessageLabels # defaultMessage: Relations msgid "Relations" -msgstr "" +msgstr "Relacionamentos" #: components/manage/Controlpanels/Relations/RelationsListing # defaultMessage: Relations are editable with plone.api >= 2.0.3. msgid "Relations are editable with plone.api >= 2.0.3." -msgstr "" +msgstr "Relacionamentos são editáveis com uso da plone.api versão 2.0.3 ou superior." #: helpers/MessageLabels/MessageLabels # defaultMessage: Relations updated msgid "Relations updated" -msgstr "" +msgstr "Relacionamentos atualizados" #: components/theme/Search/Search # defaultMessage: Relevance @@ -2756,7 +2781,7 @@ msgstr "Redefinir o título do termo" #: components/manage/Blocks/Teaser/Data # defaultMessage: Reset the block msgid "Reset the block" -msgstr "" +msgstr "Redefinir o bloco" #: components/manage/Widgets/QuerystringWidget # defaultMessage: Results limit @@ -2865,7 +2890,7 @@ msgstr "Salvo" #: components/manage/Contents/ContentsItem # defaultMessage: Scheduled msgid "Scheduled" -msgstr "" +msgstr "Agendado" #: components/manage/Controlpanels/ContentTypesActions # defaultMessage: Schema @@ -2943,12 +2968,12 @@ msgstr "Resultados da pesquisa para {term}" #: helpers/MessageLabels/MessageLabels # defaultMessage: Search sources by title or path msgid "Search sources by title or path" -msgstr "" +msgstr "Pesquise fontes por título ou caminho" #: helpers/MessageLabels/MessageLabels # defaultMessage: Search targets by title or path msgid "Search targets by title or path" -msgstr "" +msgstr "Pesquise destinos por título ou caminho" #: helpers/MessageLabels/MessageLabels # defaultMessage: Search users… @@ -2991,7 +3016,7 @@ msgstr "Selecione colunas para mostrar" #: helpers/MessageLabels/MessageLabels # defaultMessage: Select relation msgid "Select relation" -msgstr "" +msgstr "Selecione um relacionamento" #: components/manage/Contents/ContentsWorkflowModal # defaultMessage: Select the transition to be used for modifying the items state. @@ -3001,7 +3026,7 @@ msgstr "Selecione a transição a ser usada para modificar o estado dos itens." #: helpers/MessageLabels/MessageLabels # defaultMessage: Selected msgid "Selected" -msgstr "" +msgstr "Selecionado" #: components/manage/Widgets/RecurrenceWidget/Occurences # defaultMessage: Selected dates @@ -3097,6 +3122,11 @@ msgstr "Mostrar tudo" msgid "Show Replies" msgstr "Mostrar respostas" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "Exibir filtros" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" @@ -3110,12 +3140,12 @@ msgstr "Mostrar item" #: components/manage/Controlpanels/Relations/RelationsMatrix # defaultMessage: Show potential sources. Not only objects that are source of some relation. msgid "Show potential sources. Not only objects that are source of some relation." -msgstr "" +msgstr "Exibir potenciais fontes. Não apenas os objetos que já são fonte de algum relacionamento." #: components/manage/Controlpanels/Relations/RelationsMatrix # defaultMessage: Show potential targets. Not only objects that are target of some relation. msgid "Show potential targets. Not only objects that are target of some relation." -msgstr "" +msgstr "Exibir potenciais destinos. Não apenas os objetos que já são destino de algum relacionamento." #: components/manage/Blocks/Search/schema # defaultMessage: Show search button? @@ -3187,7 +3217,7 @@ msgstr "Pequeno" #: components/manage/Controlpanels/Relations/Relations # defaultMessage: Some relations are broken. Please fix. msgid "Some relations are broken. Please fix." -msgstr "" +msgstr "Alguns relacionamentos estão rompidos. Por favor corrija-os." #: error # defaultMessage: Sorry, something went wrong with your request @@ -3400,7 +3430,7 @@ msgstr "O caminho da URL de destino deve começar com uma barra." #: components/manage/Blocks/Teaser/schema # defaultMessage: Teaser msgid "Teaser" -msgstr "" +msgstr "Destaque" #: components/manage/Widgets/SchemaWidget # defaultMessage: Text @@ -3596,7 +3626,7 @@ msgstr "Total de comentários" #: components/manage/Contents/Contents # defaultMessage: Total items to be deleted: msgid "Total items to be deleted:" -msgstr "" +msgstr "Total de itens a serem removidos:" #: components/manage/Controlpanels/DatabaseInformation # defaultMessage: Total number of objects in each cache @@ -4121,7 +4151,7 @@ msgstr "Você foi desconectado do site." #: components/manage/Controlpanels/Relations/Relations # defaultMessage: You have not the required permission for this control panel. msgid "You have not the required permission for this control panel." -msgstr "" +msgstr "Você não possui a permissão necessária para acessar esse painel de controle." #: components/theme/PasswordReset/RequestPasswordReset # defaultMessage: Your email is required for reset your password. @@ -4277,12 +4307,12 @@ msgstr "Onde" #: helpers/MessageLabels/MessageLabels # defaultMessage: flush intIds and rebuild relations msgid "flush intIds and rebuild relations" -msgstr "" +msgstr "descarrega os intIds e recontrua os relacionamentos" #: components/manage/Blocks/Teaser/schema # defaultMessage: Head title msgid "head_title" -msgstr "" +msgstr "Título principal" #: components/theme/PasswordReset/RequestPasswordReset # defaultMessage: Password reset confirmation sent @@ -4383,7 +4413,7 @@ msgstr "Mais usados" #: components/manage/Controlpanels/Relations/RelationsListing # defaultMessage: Found {sources} sources and {targets} targets. Narrow down to {max}! msgid "narrowDownRelations" -msgstr "" +msgstr "Encontradas {sources} fontes e {targets} destinos. Por favor, reduza ao máximo de {max}!" #: components/manage/Blocks/Search/components/DateRangeFacetFilterListEntry #: components/manage/Blocks/Search/components/ToggleFacetFilterListEntry @@ -4441,7 +4471,7 @@ msgstr "Selecionar" #: helpers/MessageLabels/MessageLabels # defaultMessage: rebuild relations msgid "rebuild relations" -msgstr "" +msgstr "reconstruir relacionamentos" #: components/theme/Search/Search # defaultMessage: results @@ -4646,7 +4676,7 @@ msgstr "ordenar" #: helpers/MessageLabels/MessageLabels # defaultMessage: sources path msgid "sources path" -msgstr "" +msgstr "caminho da fonte" #: config/Blocks # defaultMessage: Table @@ -4656,7 +4686,7 @@ msgstr "Tabela" #: helpers/MessageLabels/MessageLabels # defaultMessage: target path msgid "target path" -msgstr "" +msgstr "caminho do destino" #: config/Blocks # defaultMessage: Text diff --git a/locales/ro/LC_MESSAGES/volto.po b/locales/ro/LC_MESSAGES/volto.po index 970e3a748c..30009767d5 100644 --- a/locales/ro/LC_MESSAGES/volto.po +++ b/locales/ro/LC_MESSAGES/volto.po @@ -268,6 +268,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1253,9 +1263,9 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "Introduceți noua parolă. Minim 5 caractere." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "Introduceți noua parolă. Minim 8 caractere." #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1573,6 +1583,11 @@ msgstr "Ascunde răspunsurile" msgid "Hide facet?" msgstr "Ascundeți fațeta?" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1869,6 +1884,11 @@ msgstr "Imaginea de start" msgid "Left" msgstr "Stânga" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2078,6 +2098,11 @@ msgstr "Lunar" msgid "More" msgstr "Mai mult" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3087,6 +3112,11 @@ msgstr "Afișează tot" msgid "Show Replies" msgstr "Afișați răspunsurile" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/volto.pot b/locales/volto.pot index 08666abef4..0524dad36f 100644 --- a/locales/volto.pot +++ b/locales/volto.pot @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plone\n" -"POT-Creation-Date: 2023-05-23T08:20:31.464Z\n" +"POT-Creation-Date: 2023-06-02T14:22:59.421Z\n" "Last-Translator: Plone i18n \n" "Language-Team: Plone i18n \n" "MIME-Version: 1.0\n" @@ -270,6 +270,16 @@ msgstr "" msgid "Addon upgraded succesfuly" msgstr "" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1255,8 +1265,8 @@ msgstr "" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." msgstr "" #: components/theme/PasswordReset/PasswordReset @@ -1575,6 +1585,11 @@ msgstr "" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1871,6 +1886,11 @@ msgstr "" msgid "Left" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2080,6 +2100,11 @@ msgstr "" msgid "More" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3089,6 +3114,11 @@ msgstr "" msgid "Show Replies" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/locales/zh_CN/LC_MESSAGES/volto.po b/locales/zh_CN/LC_MESSAGES/volto.po index 7f1887725d..e8f5457cdd 100644 --- a/locales/zh_CN/LC_MESSAGES/volto.po +++ b/locales/zh_CN/LC_MESSAGES/volto.po @@ -274,6 +274,16 @@ msgstr "附件卸载成功" msgid "Addon upgraded succesfuly" msgstr "附件升级成功" +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facet? +msgid "Advanced facet?" +msgstr "" + +#: components/manage/Blocks/Search/schema +# defaultMessage: Advanced facets are initially hidden and displayed on demand +msgid "Advanced facets are initially hidden and displayed on demand" +msgstr "" + #: config/Views # defaultMessage: Album view msgid "Album view" @@ -1259,9 +1269,9 @@ msgstr "输入你的邮箱进行验证" #: components/manage/Preferences/ChangePassword #: components/theme/PasswordReset/PasswordReset -# defaultMessage: Enter your new password. Minimum 5 characters. -msgid "Enter your new password. Minimum 5 characters." -msgstr "输入你的新密码。最少5个字符" +# defaultMessage: Enter your new password. Minimum 8 characters. +msgid "Enter your new password. Minimum 8 characters." +msgstr "" #: components/theme/PasswordReset/PasswordReset # defaultMessage: Enter your username for verification. @@ -1579,6 +1589,11 @@ msgstr "隐藏回复" msgid "Hide facet?" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Hide filters +msgid "Hide filters" +msgstr "" + #: components/manage/History/History #: components/manage/Toolbar/More # defaultMessage: History @@ -1875,6 +1890,11 @@ msgstr "首图" msgid "Left" msgstr "" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Less filters +msgid "Less filters" +msgstr "" + #: components/manage/Toolbar/Toolbar # defaultMessage: Link msgid "Link" @@ -2084,6 +2104,11 @@ msgstr "每月" msgid "More" msgstr "更多" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: More filters +msgid "More filters" +msgstr "" + #: components/manage/Controlpanels/UpgradeControlPanel # defaultMessage: More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide. msgid "More information about the upgrade procedure can be found in the documentation section of plone.org in the Upgrade Guide." @@ -3093,6 +3118,11 @@ msgstr "显示全部" msgid "Show Replies" msgstr "显示回复" +#: components/manage/Blocks/Search/components/Facets +# defaultMessage: Show filters +msgid "Show filters" +msgstr "" + #: helpers/MessageLabels/MessageLabels # defaultMessage: Show groups of users below msgid "Show groups of users below" diff --git a/package.json b/package.json index 4dc9c19184..f45ae9c1c5 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "17.0.0-alpha.9", + "version": "17.0.0-alpha.11", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" diff --git a/packages/volto-slate/package.json b/packages/volto-slate/package.json index 5cffb00466..cae353cb41 100644 --- a/packages/volto-slate/package.json +++ b/packages/volto-slate/package.json @@ -1,6 +1,6 @@ { "name": "@plone/volto-slate", - "version": "17.0.0-alpha.9", + "version": "17.0.0-alpha.11", "description": "Slate.js integration with Volto", "main": "src/index.js", "author": "European Environment Agency: IDM2 A-Team", diff --git a/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx b/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx index af37a9f5f0..2771759873 100644 --- a/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx +++ b/packages/volto-slate/src/editor/plugins/StyleMenu/StyleMenu.jsx @@ -28,13 +28,13 @@ const StyleMenuButton = ({ icon, active, ...props }) => ( ); -const MenuOpts = ({ editor, toSelect, option, ...rest }) => { +const MenuOpts = ({ editor, toSelect, option, type }) => { const isActive = toSelect.includes(option); return ( { @@ -118,7 +118,12 @@ const StylingsButton = (props) => { content={intl.formatMessage(messages.inlineStyle)} /> {inlineOpts.map((option, index) => ( - + ))} )} @@ -129,7 +134,12 @@ const StylingsButton = (props) => { content={intl.formatMessage(messages.paragraphStyle)} /> {blockOpts.map((option, index) => ( - + ))} )} diff --git a/src/components/manage/Blocks/Listing/ListingBody.test.jsx b/src/components/manage/Blocks/Listing/ListingBody.test.jsx index d52c7df814..8a5c359972 100644 --- a/src/components/manage/Blocks/Listing/ListingBody.test.jsx +++ b/src/components/manage/Blocks/Listing/ListingBody.test.jsx @@ -36,6 +36,26 @@ test('renders a ListingBody component', () => { content: { data: { is_folderish: true, + blocks: { + '839ee00b-013b-4f4a-9b10-8867938fdac3': { + '@type': 'listing', + block: '839ee00b-013b-4f4a-9b10-8867938fdac3', + headlineTag: 'h2', + query: [], + querystring: { + b_size: '2', + query: [ + { + i: 'path', + o: 'plone.app.querystring.operation.string.absolutePath', + v: '/', + }, + ], + sort_order: 'ascending', + }, + variation: 'default', + }, + }, }, }, intl: { diff --git a/src/components/manage/Blocks/Listing/__snapshots__/ListingBody.test.jsx.snap b/src/components/manage/Blocks/Listing/__snapshots__/ListingBody.test.jsx.snap index e81db3c83f..5fa1511b42 100644 --- a/src/components/manage/Blocks/Listing/__snapshots__/ListingBody.test.jsx.snap +++ b/src/components/manage/Blocks/Listing/__snapshots__/ListingBody.test.jsx.snap @@ -5,7 +5,7 @@ exports[`renders a ListingBody component 1`] = ` className="emptyListing" >
state.querystringsearch.subrequests, ); @@ -50,7 +52,7 @@ export default function withQuerystringResults(WrappedComponent) { const folderItems = content?.is_folderish ? content.items : []; const hasQuery = querystring?.query?.length > 0; - const hasLoaded = hasQuery ? !querystringResults?.[id]?.loading : true; + const hasLoaded = hasQuery ? querystringResults?.[id]?.loaded : true; const listingItems = querystring?.query?.length > 0 && querystringResults?.[id] @@ -109,6 +111,8 @@ export default function withQuerystringResults(WrappedComponent) { } else { dispatch(getContent(initialPath, null, null, currentPage)); } + adaptedQueryRef.current = adaptedQuery; + currentPageRef.current = currentPage; }, [ id, isImageGallery, diff --git a/src/components/manage/Blocks/Search/components/Facets.jsx b/src/components/manage/Blocks/Search/components/Facets.jsx index 0adc1009d0..ea016334e7 100644 --- a/src/components/manage/Blocks/Search/components/Facets.jsx +++ b/src/components/manage/Blocks/Search/components/Facets.jsx @@ -1,7 +1,16 @@ -import React from 'react'; +import React, { useState, useMemo } from 'react'; +import { Button, Grid } from 'semantic-ui-react'; import { resolveExtension } from '@plone/volto/helpers/Extensions/withBlockExtensions'; import config from '@plone/volto/registry'; import { hasNonValueOperation, hasDateOperation } from '../utils'; +import { defineMessages, useIntl } from 'react-intl'; + +const messages = defineMessages({ + moreFilters: { id: 'More filters', defaultMessage: 'More filters' }, + lessFilters: { id: 'Less filters', defaultMessage: 'Less filters' }, + showFilters: { id: 'Show filters', defaultMessage: 'Show filters' }, + hideFilters: { id: 'Hide filters', defaultMessage: 'Hide filters' }, +}); const showFacet = (index) => { const { values } = index; @@ -14,6 +23,7 @@ const showFacet = (index) => { }; const Facets = (props) => { + const [hidden, setHidden] = useState(true); const { querystring, data = {}, @@ -24,11 +34,29 @@ const Facets = (props) => { } = props; const { search } = config.blocks.blocksConfig; + const advancedFilters = useMemo(() => { + let count = 0; + for (let facetSettings of data.facets || []) { + if (facetSettings.advanced) { + count++; + } + } + + if (count === data.facets?.length) { + return 2; + } + if (count) { + return 1; + } + return 0; + }, [data.facets]); + const FacetWrapper = facetWrapper; const query_to_values = Object.assign( {}, ...(data?.query?.query?.map(({ i, v }) => ({ [i]: v })) || []), ); + const intl = useIntl(); return ( <> @@ -36,6 +64,7 @@ const Facets = (props) => { ?.filter((facetSettings) => !facetSettings.hidden) .map((facetSettings) => { const field = facetSettings?.field?.value; + const isAdvanced = facetSettings?.advanced; const index = querystring.indexes[field] || {}; const { values = {} } = index; @@ -58,6 +87,7 @@ const Facets = (props) => { const isMulti = facetSettings.multiple; const selectedValue = facets[facetSettings?.field?.value]; + const visible = (isAdvanced && !hidden) || !isAdvanced; // TODO :handle changing the type of facet (multi/nonmulti) @@ -74,7 +104,11 @@ const Facets = (props) => { } = search.extensions.facetWidgets; return FacetWrapper && (isEditMode || showFacet(index)) ? ( - + { '' ); })} + {advancedFilters > 0 && ( + + + + )} ); }; diff --git a/src/components/manage/Blocks/Search/hocs/withSearch.jsx b/src/components/manage/Blocks/Search/hocs/withSearch.jsx index 332d6feb4f..b810cc282f 100644 --- a/src/components/manage/Blocks/Search/hocs/withSearch.jsx +++ b/src/components/manage/Blocks/Search/hocs/withSearch.jsx @@ -148,12 +148,16 @@ const getSearchFields = (searchData) => { }; /** - * A HOC that will mirror the search block state to a hash location + * A hook that will mirror the search block state to a hash location */ const useHashState = () => { const location = useLocation(); const history = useHistory(); + /** + * Required to maintain parameter compatibility. + With this we will maintain support for receiving hash (#) and search (?) type parameters. + */ const oldState = React.useMemo(() => { return { ...qs.parse(location.search), @@ -169,7 +173,7 @@ const useHashState = () => { const setSearchData = React.useCallback( (searchData) => { - const newParams = qs.parse(location.hash); + const newParams = qs.parse(location.search); let changed = false; @@ -186,11 +190,11 @@ const useHashState = () => { if (changed) { history.push({ - hash: qs.stringify(newParams), + search: qs.stringify(newParams), }); } }, - [history, oldState, location.hash], + [history, oldState, location.search], ); return [current, setSearchData]; diff --git a/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx b/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx index 626f721de2..950a688628 100644 --- a/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx +++ b/src/components/manage/Blocks/Search/layout/LeftColumnFacets.jsx @@ -11,6 +11,7 @@ import { Grid, Segment } from 'semantic-ui-react'; import { Button } from 'semantic-ui-react'; import { flushSync } from 'react-dom'; import { defineMessages, useIntl } from 'react-intl'; +import cx from 'classnames'; const messages = defineMessages({ searchButtonText: { @@ -19,11 +20,22 @@ const messages = defineMessages({ }, }); -const FacetWrapper = ({ children }) => ( - - {children} - -); +const FacetWrapper = ({ children, facetSettings = {}, visible }) => { + const { advanced, field = {} } = facetSettings; + + return ( + + {children} + + ); +}; const LeftColumnFacets = (props) => { const { diff --git a/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx b/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx index 091449bf1e..fc378b610f 100644 --- a/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx +++ b/src/components/manage/Blocks/Search/layout/RightColumnFacets.jsx @@ -11,6 +11,7 @@ import { Grid, Segment } from 'semantic-ui-react'; import { Button } from 'semantic-ui-react'; import { flushSync } from 'react-dom'; import { defineMessages, useIntl } from 'react-intl'; +import cx from 'classnames'; const messages = defineMessages({ searchButtonText: { @@ -19,11 +20,22 @@ const messages = defineMessages({ }, }); -const FacetWrapper = ({ children }) => ( - - {children} - -); +const FacetWrapper = ({ children, facetSettings = {}, visible }) => { + const { advanced, field = {} } = facetSettings; + + return ( + + {children} + + ); +}; const RightColumnFacets = (props) => { const { diff --git a/src/components/manage/Blocks/Search/layout/TopSideFacets.jsx b/src/components/manage/Blocks/Search/layout/TopSideFacets.jsx index 21469e625e..5518382f7f 100644 --- a/src/components/manage/Blocks/Search/layout/TopSideFacets.jsx +++ b/src/components/manage/Blocks/Search/layout/TopSideFacets.jsx @@ -11,6 +11,7 @@ import { SortOn, ViewSwitcher, } from '../components'; +import cx from 'classnames'; const messages = defineMessages({ searchButtonText: { @@ -19,11 +20,24 @@ const messages = defineMessages({ }, }); -const FacetWrapper = ({ children }) => ( - - {children} - -); +const FacetWrapper = ({ children, facetSettings = {}, visible }) => { + const { advanced, field = {} } = facetSettings; + + return ( + + {children} + + ); +}; const TopSideFacets = (props) => { const { @@ -117,6 +131,7 @@ const TopSideFacets = (props) => { )}
+ {data.facets?.length > 0 && (
{data.facetsTitle &&

{data.facetsTitle}

} @@ -136,6 +151,7 @@ const TopSideFacets = (props) => {
)} +
{ + const token = useToken(); - /** - * Render method. - * @method render - * @returns {string} Markup for the component. - */ - render() { - return ( - - -
-
-
- -
- + return ( + + +
+
+
+
-
- - {!this.props.token && ( -
- -
- )} -
- + +
+
+ + {!token && ( +
+
+ )} +
+
- - - ); - } -} +
+ + + ); +}; + +export default Header; + +Header.propTypes = { + token: PropTypes.string, + pathname: PropTypes.string.isRequired, + content: PropTypes.objectOf(PropTypes.any), +}; -export default connect((state) => ({ - token: state.userSession.token, -}))(Header); +Header.defaultProps = { + token: null, + content: null, +}; diff --git a/src/components/theme/Header/Header.md b/src/components/theme/Header/Header.md deleted file mode 100644 index b097be635d..0000000000 --- a/src/components/theme/Header/Header.md +++ /dev/null @@ -1,27 +0,0 @@ -Header example: - -```jsx static -
-``` - -Output: - -```jsx noeditor -const { Provider } = require('react-intl-redux'); -const configureStore = require('redux-mock-store').default; -const store = configureStore()({ - userSession: { - login: {}, - }, - intl: { - locale: 'en', - messages: {}, - }, -}); - -
- -
- -
; -``` diff --git a/src/components/theme/Header/Header.test.jsx b/src/components/theme/Header/Header.test.jsx index 8002a8cbba..4144f673bc 100644 --- a/src/components/theme/Header/Header.test.jsx +++ b/src/components/theme/Header/Header.test.jsx @@ -39,4 +39,22 @@ describe('Header', () => { const json = component.toJSON(); expect(json).toMatchSnapshot(); }); + + it('renders a header component - auth', () => { + const store = mockStore({ + userSession: { token: '1234567890' }, + intl: { + locale: 'en', + messages: {}, + }, + }); + + const component = renderer.create( + +
+ , + ); + const json = component.toJSON(); + expect(json).toMatchSnapshot(); + }); }); diff --git a/src/components/theme/Header/__snapshots__/Header.test.jsx.snap b/src/components/theme/Header/__snapshots__/Header.test.jsx.snap index 5cd7084418..43c47d0a58 100644 --- a/src/components/theme/Header/__snapshots__/Header.test.jsx.snap +++ b/src/components/theme/Header/__snapshots__/Header.test.jsx.snap @@ -1,5 +1,49 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Header renders a header component - auth 1`] = ` +
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+`; + exports[`Header renders a header component 1`] = `
{ }); }); + it('do not treat 0 as missing required value', () => { + let newSchema = { + ...schema, + properties: { + ...schema.properties, + age: { + title: 'age', + type: 'integer', + widget: 'number', + description: '', + }, + }, + required: ['age'], + }; + expect( + FormValidation.validateFieldsPerFieldset({ + schema: newSchema, + formData: { username: 'test username', age: null }, + formatMessage, + }), + ).toEqual({ + age: [messages.required.defaultMessage], + }); + expect( + FormValidation.validateFieldsPerFieldset({ + schema: newSchema, + formData: { username: 'test username', age: 0 }, + formatMessage, + }), + ).toEqual({}); + }); + it('validates incorrect email', () => { expect( FormValidation.validateFieldsPerFieldset({ diff --git a/src/helpers/Utils/usePagination.js b/src/helpers/Utils/usePagination.js index acb12d2ac5..083ec48682 100644 --- a/src/helpers/Utils/usePagination.js +++ b/src/helpers/Utils/usePagination.js @@ -1,25 +1,83 @@ -import React from 'react'; -import { isEqual } from 'lodash'; -import { usePrevious } from './usePrevious'; -import useDeepCompareEffect from 'use-deep-compare-effect'; +import React, { useRef, useEffect } from 'react'; +import { useHistory, useLocation } from 'react-router-dom'; +import qs from 'query-string'; +import { useSelector } from 'react-redux'; +import { slugify } from '@plone/volto/helpers/Utils/Utils'; + +/** + * @function useCreatePageQueryStringKey + * @description A hook that creates a key with an id if there are multiple blocks with pagination. + * @returns {string} Example: page || page_012345678 + */ +const useCreatePageQueryStringKey = (id) => { + const blockTypesWithPagination = ['search', 'listing']; + const blocks = useSelector((state) => state?.content?.data?.blocks) || []; + const blocksLayout = + useSelector((state) => state?.content?.data?.blocks_layout?.items) || []; + const displayedBlocks = blocksLayout?.map((item) => blocks[item]); + const hasMultiplePaginations = + displayedBlocks.filter((item) => + blockTypesWithPagination.includes(item['@type']), + ).length > 1 || false; + + return hasMultiplePaginations ? slugify(`page-${id}`) : 'page'; +}; + +const useGetBlockType = (id) => { + const blocks = useSelector((state) => state?.content?.data?.blocks) || []; + const block = blocks[id]; + return block ? block?.['@type'] : null; +}; /** * A pagination helper that tracks the query and resets pagination in case the * query changes. */ -export const usePagination = (query, defaultPage = 1) => { - const previousQuery = usePrevious(query); - const [currentPage, setCurrentPage] = React.useState(defaultPage); +export const usePagination = (id = null, defaultPage = 1) => { + const location = useLocation(); + const history = useHistory(); + const pageQueryStringKey = useCreatePageQueryStringKey(id); + const block_type = useGetBlockType(id); + const pageQueryParam = + qs.parse(location.search)[pageQueryStringKey] || defaultPage; + const [currentPage, setCurrentPageState] = React.useState( + parseInt(pageQueryParam), + ); + const setCurrentPage = (page) => { + setCurrentPageState(page); + const newParams = { + ...qs.parse(location.search), + [pageQueryStringKey]: page, + }; + history.push({ search: qs.stringify(newParams) }); + }; - useDeepCompareEffect(() => { - setCurrentPage(defaultPage); - }, [query, previousQuery, defaultPage]); + const queryRef = useRef(qs.parse(location.search)?.query); + useEffect(() => { + if ( + queryRef.current !== qs.parse(location.search)?.query && + block_type === 'search' + ) { + setCurrentPageState(defaultPage); + const newParams = { + ...qs.parse(location.search), + [pageQueryStringKey]: defaultPage, + }; + delete newParams[pageQueryStringKey]; + history.replace({ search: qs.stringify(newParams) }); + queryRef.current = qs.parse(location.search)?.query; + } else { + setCurrentPageState( + parseInt( + qs.parse(location.search)?.[pageQueryStringKey] || defaultPage, + ), + ); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [location.search, block_type]); return { - currentPage: - previousQuery && !isEqual(previousQuery, query) - ? defaultPage - : currentPage, + currentPage, setCurrentPage, }; }; diff --git a/src/helpers/Utils/usePagination.test.js b/src/helpers/Utils/usePagination.test.js new file mode 100644 index 0000000000..26924d78a0 --- /dev/null +++ b/src/helpers/Utils/usePagination.test.js @@ -0,0 +1,115 @@ +import { renderHook } from '@testing-library/react-hooks'; +import { usePagination } from './usePagination'; +import * as redux from 'react-redux'; +import routeData from 'react-router'; +import { slugify } from '@plone/volto/helpers/Utils/Utils'; + +const searchBlockId = '545b33de-92cf-4747-969d-68851837b317'; +const searchBlockId2 = '454b33de-92cf-4747-969d-68851837b713'; +const searchBlock = { + '@type': 'search', + query: { + b_size: '4', + query: [ + { + i: 'path', + o: 'plone.app.querystring.operation.string.relativePath', + v: '', + }, + ], + sort_order: 'ascending', + }, + showSearchInput: true, + showTotalResults: true, +}; +let state = { + content: { + data: { + blocks: { + [searchBlockId]: searchBlock, + }, + blocks_layout: { + items: [searchBlockId], + }, + }, + }, +}; + +let mockUseLocationValue = { + pathname: '/testroute', + search: '', +}; + +const setUp = (searchParam, numberOfSearches) => { + mockUseLocationValue.search = searchParam; + if (numberOfSearches > 1) { + state.content.data.blocks[searchBlockId2] = searchBlock; + state.content.data.blocks_layout.items.push(searchBlockId2); + } + return renderHook(({ id, defaultPage }) => usePagination(id, defaultPage), { + initialProps: { + id: searchBlockId, + defaultPage: 1, + }, + }); +}; + +describe(`Tests for usePagination, for the block ${searchBlockId}`, () => { + const useLocation = jest.spyOn(routeData, 'useLocation'); + const useHistory = jest.spyOn(routeData, 'useHistory'); + const useSelector = jest.spyOn(redux, 'useSelector'); + beforeEach(() => { + useLocation.mockReturnValue(mockUseLocationValue); + useHistory.mockReturnValue({ replace: jest.fn() }); + useSelector.mockImplementation((cb) => cb(state)); + }); + + it('1 paginated block with id and defaultPage 1 - shoud be 1', () => { + const { result } = setUp(); + expect(result.current.currentPage).toBe(1); + }); + + it('1 paginated block without params - shoud be 1', () => { + const { result } = setUp(); + expect(result.current.currentPage).toBe(1); + }); + + const param1 = '?page=2'; + it(`1 paginated block with params: ${param1} - shoud be 2`, () => { + const { result } = setUp(param1); + expect(result.current.currentPage).toBe(2); + }); + + const param2 = `?${slugify(`page-${searchBlockId}`)}=2`; + it(`2 paginated blocks with current block in the params: ${param2} - shoud be 2`, () => { + const { result } = setUp(param2, 2); + expect(result.current.currentPage).toBe(2); + }); + + const param3 = `?${slugify(`page-${searchBlockId2}`)}=2`; + it(`2 paginated blocks with the other block in the params: ${param3} - shoud be 1`, () => { + const { result } = setUp(param3, 2); + expect(result.current.currentPage).toBe(1); + }); + + const param4 = `?${slugify(`page-${searchBlockId}`)}=2&${slugify( + `page-${searchBlockId2}`, + )}=1`; + it(`2 paginated blocks with both blocks in the params, current 2: ${param4} - shoud be 2`, () => { + const { result } = setUp(param4, 2); + expect(result.current.currentPage).toBe(2); + }); + + const param5 = `?${slugify(`page-${searchBlockId}`)}=1&${slugify( + `page-${searchBlockId2}`, + )}=2`; + it(`2 paginated blocks with both blocks in the params, current 1: ${param5} - shoud be 1`, () => { + const { result } = setUp(param5, 2); + expect(result.current.currentPage).toBe(1); + }); + + it(`2 paginated blocks with wrong page param: ${param1} - shoud be 1`, () => { + const { result } = setUp(param1, 2); + expect(result.current.currentPage).toBe(1); + }); +}); diff --git a/src/hooks/userSession/useToken.js b/src/hooks/userSession/useToken.js new file mode 100644 index 0000000000..2d7d350f8d --- /dev/null +++ b/src/hooks/userSession/useToken.js @@ -0,0 +1,5 @@ +import { useSelector, shallowEqual } from 'react-redux'; + +export function useToken() { + return useSelector((state) => state.userSession.token, shallowEqual); +} diff --git a/theme/themes/pastanaga/extras/search.less b/theme/themes/pastanaga/extras/search.less index 0d803481d8..5f9f14a14e 100644 --- a/theme/themes/pastanaga/extras/search.less +++ b/theme/themes/pastanaga/extras/search.less @@ -75,3 +75,9 @@ text-align: center; } } + +.block.search { + .advanced-facet-hidden { + display: none !important; + } +} \ No newline at end of file