Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
chore(release): 2.11.0 ecl-twig (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
planctus committed Sep 30, 2019
1 parent a9e0a57 commit ae5dd98
Show file tree
Hide file tree
Showing 167 changed files with 9,576 additions and 4,103 deletions.
38 changes: 19 additions & 19 deletions package.json
Expand Up @@ -19,44 +19,44 @@
"test": "npm run jest"
},
"devDependencies": {
"@babel/core": "7.4.5",
"@babel/preset-env": "7.4.5",
"@babel/core": "7.6.0",
"@babel/preset-env": "7.6.0",
"@babel/preset-react": "7.0.0",
"@ecl-twig/storybook-addon-code": "file:utils/storybook-addon-code",
"@ecl-twig/storybook-addon-notes": "file:utils/storybook-addon-notes",
"@ecl-twig/test-utils": "file:utils/test-utils",
"@storybook/addon-knobs": "5.1.9",
"@storybook/addon-options": "5.1.9",
"@storybook/addon-viewport": "5.1.9",
"@storybook/html": "5.1.9",
"babel-jest": "24.8.0",
"@storybook/addon-knobs": "5.2.1",
"@storybook/addon-options": "5.2.1",
"@storybook/addon-viewport": "5.2.1",
"@storybook/html": "5.2.1",
"babel-jest": "24.9.0",
"babel-loader": "8.0.6",
"clipboard": "2.0.4",
"deepmerge": "3.2.1",
"eslint": "5.16.0",
"eslint-config-airbnb": "17.1.0",
"eslint-config-prettier": "5.0.0",
"eslint-plugin-import": "2.17.3",
"eslint-plugin-jest": "22.7.0",
"eslint-plugin-jsx-a11y": "6.2.1",
"eslint-plugin-prettier": "3.1.0",
"eslint-plugin-react": "7.13.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jest": "22.17.0",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.1",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-unicorn": "9.1.0",
"husky": "2.4.1",
"jest": "24.8.0",
"js-beautify": "1.10.0",
"lerna": "3.15.0",
"jest": "24.9.0",
"js-beautify": "1.10.2",
"lerna": "3.16.4",
"lint-staged": "8.2.1",
"marked": "0.6.2",
"ncp": "2.0.0",
"prettier": "1.18.2",
"prismjs": "1.16.0",
"react": "16.8.6",
"react-dom": "16.8.6",
"prismjs": "1.17.1",
"react": "16.9.0",
"react-dom": "16.9.0",
"rimraf": "2.6.3",
"twig": "1.13.3",
"twig-loader": "0.5.1",
"webpack": "4.35.0"
"webpack": "4.40.2"
},
"husky": {
"hooks": {
Expand Down
4 changes: 3 additions & 1 deletion src/ec/.storybook/config.js
@@ -1,9 +1,11 @@
import { configure, addDecorator, addParameters } from '@storybook/html';
import { withOptions } from '@storybook/addon-options';
import { create } from '@storybook/theming';

import Twig from 'twig';
import { version } from '../../../lerna.json';

Twig.cache();

addParameters({
options: {
theme: create({
Expand Down
35 changes: 27 additions & 8 deletions src/ec/.storybook/preview-head.html
@@ -1,25 +1,44 @@
<link
rel="stylesheet"
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.9.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website.css"
integrity="sha256-1crNKXPu4FcaFAbYlT0w9vk2qPokq/25xnIsE9BpjOM= sha384-3yPKaL5TA7/O0mJZoo7AAftDQPRJEhlqvaGkjdVClDYw0Z84pHvurPwdnyTAXoss sha512-YjLAPmsTqF+BfQxQ2FduRpWc+7KGj32qrVnepm/wS1YirDWpfhZriu+6si8VMM7PILYxImsgB4rUUmyRsVteNw=="
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.11.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website.css"
integrity="sha256-XWNHHPhhLjilsuAEukHakuhwqK/BxrIpH6z5FuNWJ2A= sha384-bbPd6syHQvmXu7vi8GLwhto+gTfeIEKWGfH8fiymfzsVwfXNNbWQh6OYk/cxnO9O sha512-Uqk1z3MmsHWk87ftLFXUl6DA3bYAQ0H+7Xt/2AWJg+t8BmdOZFddjpxbEwolQMOjSttuDqL11H9wRsbVatZoLQ=="
crossorigin="anonymous"
media="screen"
/>
<link
rel="stylesheet"
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.9.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website-print.css"
integrity="sha256-lkGfTL9MJhNsSxXUyntwHLHEflW1hodEUr9nstVaZMw= sha384-oUJ4qLsrLT7mAGFAGEdyZYMbgB94krygKD3ThitnDUYNy1BZ9azBChDhUmr0Rnp/ sha512-RcpHJ9Zf0R1X96U9rSd6Q2sE5am3O7YNi2Jg7a+r9bj/8B8DGrPlMmyE28jKtfCsaAW6/luPAsUG2OkfXIQTzQ=="
href="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.11.0/ec-preset-legacy-website/styles/ecl-ec-preset-legacy-website-print.css"
integrity="sha256-KaHMR825SzKge3139+dxIc/jHd3cDwJXY8/DvVHuMuk= sha384-0gzBY6o/qllJU0S4kcPlOfBuyGon7CFznPgOxUquU/VhTJMhFK8V2cH93uY2ITMv sha512-Gwv0oXfgADlRs+edZwoUGIEaLK/HQBT5C6UqAlU4D66fnWad0SQ+Oq3m9V7qL4nTrw/95Ln6D/ybFIp+6By2GQ=="
crossorigin="anonymous"
media="print"
/>
<script
type="text/javascript"
src="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.9.0/ec-preset-legacy-website/scripts/ecl-ec-preset-legacy-website.js"
integrity="sha256-NJiueP4dVG6/YGI3m4pOvIMLOxhvHE3AcPN3OtxGoj0= sha384-PhkD+jdW3ZoBh7um+IVANSMsl5p/JjLXxov/lycrMxDW+cMdg3PKqWR5VIlACJXm sha512-yEmnqK34vqLLq3fswC19fI8wn3wrbVpG5zwapxT4MSVbM8X9TgQuD1qQ23hq0uBcYuoc1O/A8EnvSfWBfCSAOQ=="
src="https://cdn1.fpfis.tech.ec.europa.eu/ecl/v2.11.0/ec-preset-legacy-website/scripts/ecl-ec-preset-legacy-website.js"
integrity="sha256-tsBVaRxJlo9sIsLj4UCFyWrqnxRPPGNwVv2p8DNJul4= sha384-JR4MXSyly5+x7L6myTQCn83vw3zGJGSD4omNxQeHZlZ72oPjFS5v3/AGzGGxeVCr sha512-SGF+x0GqxaUDh/XdX/yooFnhtE9hwgXPX5A+9pJcppQ4XyqKeppj9NjpUz1iEhaVWAbxY5iO8LCcGiw8OFcLyQ=="
crossorigin="anonymous"
defer
></script>
<script src="https://unpkg.com/svg4everybody@2.1.9/dist/svg4everybody.min.js"></script>
<script>
// https://github.com/storybookjs/storybook/issues/6113#issuecomment-473965255
function runOnPageChange() {
ECL.autoInit();
}
document.addEventListener(
'DOMContentLoaded',
function() {
const callback = function(mutationsList) {
for (let i = 0, len = mutationsList.length; i < len; i++) {
if (mutationsList[i].type == 'childList') {
runOnPageChange();
break;
}
}
};
const observer = new MutationObserver(callback);
const config = { childList: true, subtree: false };
observer.observe(document.getElementById('root'), config);
},
false
);
svg4everybody();
</script>
Expand Up @@ -4,6 +4,7 @@ exports[`EC - Accordion renders correctly 1`] = `
<div
class="ecl-accordion"
data-ecl-accordion="true"
data-ecl-auto-init="Accordion"
>
<h3
class="ecl-accordion__title"
Expand All @@ -28,7 +29,7 @@ exports[`EC - Accordion renders correctly 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand Down Expand Up @@ -66,7 +67,7 @@ exports[`EC - Accordion renders correctly 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Spring 2019 Economic Forecast: Growth continues at a more moderate pace
</span>
Expand Down Expand Up @@ -104,7 +105,7 @@ exports[`EC - Accordion renders correctly 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand All @@ -126,6 +127,7 @@ exports[`EC - Accordion renders correctly with extra attributes 1`] = `
<div
class="ecl-accordion"
data-ecl-accordion="true"
data-ecl-auto-init="Accordion"
data-test="data-test-value"
data-test-1="data-test-value-1"
>
Expand All @@ -152,7 +154,7 @@ exports[`EC - Accordion renders correctly with extra attributes 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand Down Expand Up @@ -190,7 +192,7 @@ exports[`EC - Accordion renders correctly with extra attributes 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Spring 2019 Economic Forecast: Growth continues at a more moderate pace
</span>
Expand Down Expand Up @@ -228,7 +230,7 @@ exports[`EC - Accordion renders correctly with extra attributes 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand All @@ -250,6 +252,7 @@ exports[`EC - Accordion renders correctly with extra class names 1`] = `
<div
class="ecl-accordion custom-class custom-class--test"
data-ecl-accordion="true"
data-ecl-auto-init="Accordion"
>
<h3
class="ecl-accordion__title"
Expand All @@ -274,7 +277,7 @@ exports[`EC - Accordion renders correctly with extra class names 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand Down Expand Up @@ -312,7 +315,7 @@ exports[`EC - Accordion renders correctly with extra class names 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Spring 2019 Economic Forecast: Growth continues at a more moderate pace
</span>
Expand Down Expand Up @@ -350,7 +353,7 @@ exports[`EC - Accordion renders correctly with extra class names 1`] = `
</svg>
<span
class="ecl-button__label"
data-ecl-label=""
data-ecl-label="true"
>
Delivery of last pending proposals, a common Destiny of unity, the hour of European Democracy
</span>
Expand Down
10 changes: 5 additions & 5 deletions src/ec/packages/ec-component-accordion/accordion.html.twig
Expand Up @@ -5,10 +5,10 @@
- "items" (array) (default: []): format: [
{
"id": (string),
level: (string),
toggle: (predefined structure): see Button component, format: {
label: (string),
icon: (predefined structure): see Icon component,
"level": (string),
"toggle": (predefined structure): see Button component, format: {
"label": (string),
"icon": (predefined structure): see Icon component,
},
content: (block),
},
Expand All @@ -27,7 +27,7 @@
{# Internal properties #}

{% set _css_class = 'ecl-accordion' %}
{% set _extra_attributes = '' %}
{% set _extra_attributes = 'data-ecl-auto-init="Accordion"' %}
{% set _items = items|default([]) %}

{# Internal logic - Process properties #}
Expand Down
21 changes: 1 addition & 20 deletions src/ec/packages/ec-component-accordion/accordion.story.js
Expand Up @@ -29,26 +29,7 @@ storiesOf('Components/Accordion', module)
item.toggle.icon.path = defaultSprite;
});

const html = accordion(demoData);

const demo = document.createDocumentFragment();

const htmlElement = document.createElement('div');
htmlElement.innerHTML = html.trim();
demo.appendChild(htmlElement.firstChild);

const scriptElement = document.createElement('script');
scriptElement.innerHTML = `
var elements = document.querySelectorAll('[data-ecl-accordion]');
for (var i = 0; i < elements.length; i += 1) {
var accordion = new ECL.Accordion(elements[i]);
accordion.init();
}
`;
demo.appendChild(scriptElement);

return demo;
return accordion(demoData);
},

{
Expand Down
6 changes: 3 additions & 3 deletions src/ec/packages/ec-component-accordion/package.json
Expand Up @@ -8,9 +8,9 @@
"@ecl-twig/ec-component-button": "2.9.1"
},
"devDependencies": {
"@ecl/ec-component-accordion": "~2.9.0",
"@ecl/ec-resources-icons": "~2.9.0",
"@ecl/ec-specs-accordion": "~2.9.0"
"@ecl/ec-component-accordion": "2.11.0",
"@ecl/ec-resources-icons": "2.11.0",
"@ecl/ec-specs-accordion": "2.11.0"
},
"publishConfig": {
"access": "public"
Expand Down
Expand Up @@ -4,6 +4,7 @@ exports[`EC - Accordion2 renders correctly 1`] = `
<div
class="ecl-accordion2"
data-ecl-accordion2=""
data-ecl-auto-init="Accordion2"
>
<div
class="ecl-accordion2__item"
Expand Down Expand Up @@ -138,6 +139,7 @@ exports[`EC - Accordion2 renders correctly with extra attributes 1`] = `
<div
class="ecl-accordion2"
data-ecl-accordion2=""
data-ecl-auto-init="Accordion2"
data-test="data-test-value"
data-test-1="data-test-value-1"
>
Expand Down Expand Up @@ -274,6 +276,7 @@ exports[`EC - Accordion2 renders correctly with extra class names 1`] = `
<div
class="ecl-accordion2 custom-class custom-class--test"
data-ecl-accordion2=""
data-ecl-auto-init="Accordion2"
>
<div
class="ecl-accordion2__item"
Expand Down
Expand Up @@ -27,7 +27,7 @@
{# Internal properties #}

{% set _css_class = 'ecl-accordion2' %}
{% set _extra_attributes = '' %}
{% set _extra_attributes = 'data-ecl-auto-init="Accordion2"' %}
{% set _items = items|default([]) %}

{# Internal logic - Process properties #}
Expand Down
22 changes: 1 addition & 21 deletions src/ec/packages/ec-component-accordion2/accordion2.story.js
Expand Up @@ -29,28 +29,8 @@ storiesOf('Components/Accordion2', module)
item.toggle.icon.path = defaultSprite;
});

const html = accordion2(demoData);

const demo = document.createDocumentFragment();

const htmlElement = document.createElement('div');
htmlElement.innerHTML = html.trim();
demo.appendChild(htmlElement.firstChild);

const scriptElement = document.createElement('script');
scriptElement.innerHTML = `
var elements = document.querySelectorAll('[data-ecl-accordion2]');
for (var i = 0; i < elements.length; i += 1) {
var accordion2 = new ECL.Accordion2(elements[i]);
accordion2.init();
}
`;
demo.appendChild(scriptElement);

return demo;
return accordion2(demoData);
},

{
notes: { markdown: notes },
}
Expand Down
6 changes: 3 additions & 3 deletions src/ec/packages/ec-component-accordion2/package.json
Expand Up @@ -8,9 +8,9 @@
"@ecl-twig/ec-component-icon": "2.9.1"
},
"devDependencies": {
"@ecl/ec-component-accordion": "~2.9.0",
"@ecl/ec-resources-icons": "~2.9.0",
"@ecl/ec-specs-accordion": "~2.9.0"
"@ecl/ec-component-accordion": "2.11.0",
"@ecl/ec-resources-icons": "2.11.0",
"@ecl/ec-specs-accordion": "2.11.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion src/ec/packages/ec-component-blockquote/package.json
Expand Up @@ -5,7 +5,7 @@
"version": "2.9.1",
"description": "ECL Twig - EC Blockquote",
"devDependencies": {
"@ecl/ec-specs-blockquote": "~2.9.0"
"@ecl/ec-specs-blockquote": "2.11.0"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit ae5dd98

Please sign in to comment.