Skip to content

Commit

Permalink
Merge pull request #51 from eea/develop
Browse files Browse the repository at this point in the history
Add theme variations - refs #153783
  • Loading branch information
avoinea authored Sep 27, 2022
2 parents b84c110 + dcb963b commit e30d433
Show file tree
Hide file tree
Showing 14 changed files with 398 additions and 279 deletions.
464 changes: 208 additions & 256 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pipeline {
environment {
GIT_NAME = "volto-accordion-block"
NAMESPACE = "@eeacms"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu"
SONARQUBE_TAGS = "volto.eea.europa.eu,forest.eea.europa.eu,www.eea.europa.eu-ims,climate-energy.eea.europa.eu,sustainability.eionet.europa.eu,biodiversity.europa.eu,clms.land.copernicus.eu,industry.eea.europa.eu,water.europa.eu-freshwater,demo-www.eea.europa.eu,clmsdemo.devel6cph.eea.europa.eu,circularity.eea.europa.eu,prod-www.eea.europa.eu"
DEPENDENCIES = ""
VOLTO = "alpha"
VOLTO = "16.0.0-alpha.14"
}

stages {
Expand Down
3 changes: 2 additions & 1 deletion jest-addon.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ module.exports = {
'@package/(.*)$': '<rootDir>/src/$1',
'@plone/volto-quanta/(.*)$': '<rootDir>/src/addons/volto-quanta/src/$1',
'@eeacms/(.*?)/(.*)$': '<rootDir>/src/addons/$1/src/$2',
'volto-slate/(.*)$': '<rootDir>/src/addons/volto-slate/src/$1',
'@plone/volto-slate':
'<rootDir>/node_modules/@plone/volto/packages/volto-slate/src',
'~/(.*)$': '<rootDir>/src/$1',
'load-volto-addons':
'<rootDir>/node_modules/@plone/volto/jest-addons-loader.js',
Expand Down
44 changes: 41 additions & 3 deletions locales/de/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,91 @@ msgstr ""
"X-Is-Fallback-For: de-at de-li de-lu de-ch de-de\n"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion
msgid "Accordion"
msgstr "Akkordeon"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion Title size
msgid "Accordion Title size"
msgstr "Akkordeon Schriftgröße Titel"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion theme
msgid "Accordion theme"
msgstr "Akkordeon-Thema"

#: components/manage/Widgets/PanelsWidget
# defaultMessage: Add
msgid "Add"
msgstr ""
msgstr "Hinzufügen"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Allow multiple panels open at a time
msgid "Allow multiple panels open at a time"
msgstr "Erlaube mehrere Panele zur gleichen Zeit geöffnet zu haben"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Collapsed by default
msgid "Collapsed by default"
msgstr "Eingeklappt ist der Standard"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Friendly name
msgid "Friendly name"
msgstr "Kurzname"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Non exclusive
msgid "Non exclusive"
msgstr "Nicht ausschließend"

#: components/manage/Blocks/Accordion/Schema
msgid "Style"
msgstr "Aussehen"
# defaultMessage: Options
msgid "Options"
msgstr "Optionen"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Primary
msgid "Primary"
msgstr "Primär"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Secondary
msgid "Secondary"
msgstr "Sekundär"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Tertiary
msgid "Tertiary"
msgstr "Tertiär"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Theme
msgid "Theme"
msgstr "Thema"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title
msgid "Title"
msgstr "Titel"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title Icon on the right
msgid "Title Icon on the right"
msgstr "Titel-Icon auf der rechten Seite anzeigen"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title size
msgid "Title size"
msgstr "Schriftgröße Titel"

#: components/manage/Blocks/Accordion/EditBlockWrapper
# defaultMessage: Unknown Block {block}
msgid "Unknown Block"
msgstr "Unbekannter Block"

#: components/manage/Blocks/Accordion/EditBlockWrapper
# defaultMessage: delete
msgid "delete"
msgstr "löschen"
42 changes: 40 additions & 2 deletions locales/it/LC_MESSAGES/volto.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,53 +17,91 @@ msgstr ""
"X-Is-Fallback-For: it it-CH it-IT\n"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion
msgid "Accordion"
msgstr "Accordion"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion Title size
msgid "Accordion Title size"
msgstr "Dimensione del titolo"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion theme
msgid "Accordion theme"
msgstr "Tema della accordion"

#: components/manage/Widgets/PanelsWidget
# defaultMessage: Add
msgid "Add"
msgstr "Aggiungi"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Allow multiple panels open at a time
msgid "Allow multiple panels open at a time"
msgstr "Consente di avere più pannelli aperti contemporaneamente"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Collapsed by default
msgid "Collapsed by default"
msgstr "Collassati di default"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Friendly name
msgid "Friendly name"
msgstr "Titolo dell'elemento"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Non exclusive
msgid "Non exclusive"
msgstr "Non esclusivo"

#: components/manage/Blocks/Accordion/Schema
msgid "Style"
msgstr "Stile"
# defaultMessage: Options
msgid "Options"
msgstr "Opzioni"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Primary
msgid "Primary"
msgstr "Primario"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Secondary
msgid "Secondary"
msgstr "Secondario"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Tertiary
msgid "Tertiary"
msgstr "Terziario"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Theme
msgid "Theme"
msgstr "Tema"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title
msgid "Title"
msgstr "Titolo"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title Icon on the right
msgid "Title Icon on the right"
msgstr "Mostra l'icona sulla destra"

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Title size
msgid "Title size"
msgstr "Dimensione del titolo"

#: components/manage/Blocks/Accordion/EditBlockWrapper
# defaultMessage: Unknown Block {block}
msgid "Unknown Block"
msgstr "Blocco sconosciuto"

#: components/manage/Blocks/Accordion/EditBlockWrapper
# defaultMessage: delete
msgid "delete"
msgstr "Rimuovi"
31 changes: 28 additions & 3 deletions locales/volto.pot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Plone\n"
"POT-Creation-Date: 2021-10-06T09:57:51.150Z\n"
"POT-Creation-Date: 2022-09-27T08:42:53.695Z\n"
"Last-Translator: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
Expand All @@ -23,6 +23,11 @@ msgstr ""
msgid "Accordion Title size"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Accordion theme
msgid "Accordion theme"
msgstr ""

#: components/manage/Widgets/PanelsWidget
# defaultMessage: Add
msgid "Add"
Expand All @@ -49,8 +54,28 @@ msgid "Non exclusive"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Style
msgid "Style"
# defaultMessage: Options
msgid "Options"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Primary
msgid "Primary"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Secondary
msgid "Secondary"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Tertiary
msgid "Tertiary"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
# defaultMessage: Theme
msgid "Theme"
msgstr ""

#: components/manage/Blocks/Accordion/Schema
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eeacms/volto-accordion-block",
"version": "3.5.0",
"version": "4.0.0",
"description": "volto-accordion-block: Volto accordion block",
"main": "src/index.js",
"author": "European Environment Agency: IDM2 A-Team",
Expand Down
1 change: 1 addition & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export AccordionLayoutSchema from '@eeacms/volto-accordion-block/components/manage/Blocks/Accordion/LayoutSchema';
export { AccordionStylingSchema } from '@eeacms/volto-accordion-block/components/manage/Blocks/Accordion/Schema';
export AccordionBlockEdit from '@eeacms/volto-accordion-block/components/manage/Blocks/Accordion/Edit';
export AccordionBlockView from '@eeacms/volto-accordion-block/components/manage/Blocks/Accordion/View';
export PanelsWidget from '@eeacms/volto-accordion-block/components/manage/Widgets/PanelsWidget';
2 changes: 1 addition & 1 deletion src/components/manage/Blocks/Accordion/AccordionEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default (props) => {
}, [data.collapsed]);

return (
<Accordion fluid styled>
<Accordion fluid styled className={data.styles?.theme}>
<React.Fragment>
<Accordion.Title
as={data.title_size}
Expand Down
6 changes: 3 additions & 3 deletions src/components/manage/Blocks/Accordion/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useIntl } from 'react-intl';
import AccordionEdit from './AccordionEdit';
import EditBlockWrapper from './EditBlockWrapper';
import './editor.less';
import { accordionBlockSchema } from './Schema';
import { AccordionBlockSchema } from './Schema';
import { emptyAccordion, getPanels } from './util';
import { cloneDeep } from 'lodash';
import config from '@plone/volto/registry';
Expand Down Expand Up @@ -67,7 +67,7 @@ const Edit = (props) => {
* @returns {Object} defaultValues
*/
const setInitialData = () => {
const accordionSchema = applySchemaEnhancer(accordionBlockSchema({ intl }));
const accordionSchema = applySchemaEnhancer(AccordionBlockSchema({ intl }));
const defaultValues = Object.keys(accordionSchema.properties).reduce(
(accumulator, currentVal) => {
return accordionSchema.properties[currentVal].default
Expand Down Expand Up @@ -259,7 +259,7 @@ const Edit = (props) => {
)}
{!data?.readOnlySettings && (
<BlockDataForm
schema={accordionBlockSchema({ intl })}
schema={AccordionBlockSchema({ intl })}
title="Accordion block"
onChangeField={(id, value) => {
onChangeBlock(block, {
Expand Down
Loading

0 comments on commit e30d433

Please sign in to comment.