@openeuropa/bcl-subscription 0.4068.202510062345 → 0.4185.202511191330

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
2
 
3
3
  exports[`OE - Subscription renders correctly 1`] = `
4
4
  <jest>
@@ -42,7 +42,6 @@ exports[`OE - Subscription renders correctly 1`] = `
42
42
  </button>
43
43
  </div>
44
44
  </nav>
45
- <!-- project name -->
46
45
  <!-- navbar -->
47
46
  <nav
48
47
  aria-label="Main Navigation"
@@ -166,7 +165,7 @@ exports[`OE - Subscription renders correctly 1`] = `
166
165
  <div
167
166
  aria-labelledby="custom-trigger-mm-1"
168
167
  class="bcl-mega-menu__submenu __level-2"
169
- hidden=""
168
+ hidden
170
169
  id="mm-panel-custom-trigger-mm-1"
171
170
  role="group"
172
171
  >
@@ -219,27 +218,27 @@ exports[`OE - Subscription renders correctly 1`] = `
219
218
  Base Sub Category Item
220
219
  </a>
221
220
  </li>
222
- <li
223
- class="__see_all __leaf"
221
+ </ul>
222
+ <div
223
+ class="__see_all"
224
+ >
225
+ <a
226
+ aria-label="See all items in ‘Base Category Item’"
227
+ class="see-all-button"
228
+ href="/example.html"
224
229
  >
225
- <a
226
- aria-label="See all items in ‘Base Category Item’"
227
- class="see-all-button"
228
- href="/example.html"
230
+ <span>
231
+ See all
232
+ </span>
233
+ <svg
234
+ class="ms-2-5 bi icon--xs"
229
235
  >
230
- <span>
231
- See all
232
- </span>
233
- <svg
234
- class="ms-2-5 bi icon--s"
235
- >
236
- <use
237
- xlink:href="/icons.svg#arrow-right"
238
- />
239
- </svg>
240
- </a>
241
- </li>
242
- </ul>
236
+ <use
237
+ xlink:href="/icons.svg#arrow-right"
238
+ />
239
+ </svg>
240
+ </a>
241
+ </div>
243
242
  </div>
244
243
  </li>
245
244
  <li
@@ -264,7 +263,7 @@ exports[`OE - Subscription renders correctly 1`] = `
264
263
  <div
265
264
  aria-labelledby="custom-trigger-mm-2"
266
265
  class="bcl-mega-menu__submenu __level-2"
267
- hidden=""
266
+ hidden
268
267
  id="mm-panel-custom-trigger-mm-2"
269
268
  role="group"
270
269
  >
@@ -502,61 +501,61 @@ exports[`OE - Subscription renders correctly 1`] = `
502
501
  </ul>
503
502
  </div>
504
503
  </nav>
505
- <!-- breadcrumbs -->
506
- <div
507
- class="container"
504
+ </header>
505
+ <!-- breadcrumbs -->
506
+ <div
507
+ class="container"
508
+ >
509
+ <nav
510
+ aria-label="breadcrumb"
511
+ class="mt-3"
508
512
  >
509
- <nav
510
- aria-label="breadcrumb"
511
- class="mt-3"
513
+ <ol
514
+ class="breadcrumb"
512
515
  >
513
- <ol
514
- class="breadcrumb"
516
+ <li
517
+ class="breadcrumb-item d-none d-md-block"
515
518
  >
516
- <li
517
- class="breadcrumb-item d-none d-md-block"
519
+ <a
520
+ href="/example.html"
518
521
  >
519
- <a
520
- href="/example.html"
521
- >
522
- Home
523
- </a>
524
- </li>
525
- <li
526
- class="breadcrumb-item d-none d-md-block"
522
+ Home
523
+ </a>
524
+ </li>
525
+ <li
526
+ class="breadcrumb-item d-none d-md-block"
527
+ >
528
+ <a
529
+ href="/example.html"
527
530
  >
528
- <a
529
- href="/example.html"
530
- >
531
- European Union
532
- </a>
533
- </li>
534
- <li
535
- class="breadcrumb-item"
531
+ European Union
532
+ </a>
533
+ </li>
534
+ <li
535
+ class="breadcrumb-item"
536
+ >
537
+ <a
538
+ href="/example.html"
536
539
  >
537
- <a
538
- href="/example.html"
540
+ <svg
541
+ class="d-md-none ms-0 me-2 me-2-5 bi icon--s"
539
542
  >
540
- <svg
541
- class="d-md-none ms-0 me-2 me-2-5 bi icon--s"
542
- >
543
- <use
544
- xlink:href="/icons.svg#arrow-left"
545
- />
546
- </svg>
547
- About the European Union
548
- </a>
549
- </li>
550
- <li
551
- aria-current="page"
552
- class="breadcrumb-item d-none d-md-block active"
553
- >
554
- News
555
- </li>
556
- </ol>
557
- </nav>
558
- </div>
559
- </header>
543
+ <use
544
+ xlink:href="/icons.svg#arrow-left"
545
+ />
546
+ </svg>
547
+ About the European Union
548
+ </a>
549
+ </li>
550
+ <li
551
+ aria-current="page"
552
+ class="breadcrumb-item d-none d-md-block active"
553
+ >
554
+ News
555
+ </li>
556
+ </ol>
557
+ </nav>
558
+ </div>
560
559
  <div
561
560
  aria-hidden="true"
562
561
  aria-label="loginModalLabel"
@@ -1316,7 +1315,7 @@ exports[`OE - Subscription renders correctly 1`] = `
1316
1315
  >
1317
1316
  <form
1318
1317
  class="needs-validation"
1319
- novalidate="true"
1318
+ novalidate
1320
1319
  onsubmit="return false;"
1321
1320
  >
1322
1321
  <fieldset>
@@ -1339,7 +1338,7 @@ exports[`OE - Subscription renders correctly 1`] = `
1339
1338
  <input
1340
1339
  class="form-control"
1341
1340
  placeholder="Type in your e-mail address"
1342
- required="true"
1341
+ required
1343
1342
  type="email"
1344
1343
  />
1345
1344
  <div
@@ -1360,12 +1359,12 @@ exports[`OE - Subscription renders correctly 1`] = `
1360
1359
  <select
1361
1360
  class="form-select"
1362
1361
  id="language-select"
1363
- required="true"
1362
+ required
1364
1363
  >
1365
1364
  <option
1366
- disabled=""
1367
- hidden=""
1368
- selected=""
1365
+ disabled
1366
+ hidden
1367
+ selected
1369
1368
  value=""
1370
1369
  >
1371
1370
  Please select a language
@@ -1406,7 +1405,7 @@ exports[`OE - Subscription renders correctly 1`] = `
1406
1405
  <input
1407
1406
  class="form-check-input"
1408
1407
  id="exampleInputCheck1"
1409
- required="true"
1408
+ required
1410
1409
  type="checkbox"
1411
1410
  />
1412
1411
  <label
@@ -1,4 +1,4 @@
1
- const drupalAttribute = require("drupal-attribute");
1
+ const { DrupalAttribute } = require("drupal-attribute");
2
2
 
3
3
  module.exports = {
4
4
  id: "subscribeModal",
@@ -10,7 +10,7 @@ module.exports = {
10
10
  '<button class="btn btn-primary form-submit ms-4">Subscribe now</button>' +
11
11
  "</div>",
12
12
  form: {
13
- attributes: new drupalAttribute()
13
+ attributes: new DrupalAttribute()
14
14
  .addClass("needs-validation")
15
15
  .setAttribute("novalidate", true)
16
16
  .setAttribute("onsubmit", "return false;"),
@@ -75,7 +75,7 @@ module.exports = {
75
75
  heading: "Thank you!",
76
76
  icon_path: "/icons.svg",
77
77
  variant: "success",
78
- attributes: new drupalAttribute().addClass([
78
+ attributes: new DrupalAttribute().addClass([
79
79
  "success-alert",
80
80
  "d-none",
81
81
  "mb-0",
@@ -89,7 +89,7 @@ module.exports = {
89
89
  icon_path: "/icons.svg",
90
90
  variant: "danger",
91
91
  dismissible: false,
92
- attributes: new drupalAttribute().addClass([
92
+ attributes: new DrupalAttribute().addClass([
93
93
  "error-alert",
94
94
  "d-none",
95
95
  "mb-0",
package/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@openeuropa/bcl-subscription",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.4068.202510062345",
5
+ "version": "0.4185.202511191330",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL subscription",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-subscription-block": "^0.4068.202510062345"
11
+ "@openeuropa/bcl-subscription-block": "^0.4185.202511191330"
12
12
  },
13
13
  "repository": {
14
14
  "type": "git",
@@ -24,5 +24,5 @@
24
24
  "design-system",
25
25
  "twig"
26
26
  ],
27
- "gitHead": "8b92d29e1c3a712df94a9378369e34ef1bbe63c1"
27
+ "gitHead": "de7fc20600e88ea3b38e74c2ec1c6ffbb0b2a1b0"
28
28
  }
@@ -1,10 +1,10 @@
1
- {% extends '@oe-bcl/bcl-base-templates/content-type.html.twig' %}
1
+ {% extends '@oe-bcl/bcl-base-templates/content-type.html.twig' -%}
2
2
 
3
- {% block sidebar %}
3
+ {%- block sidebar %}
4
4
  {% include '@oe-bcl/bcl-inpage-navigation/inpage-navigation.html.twig' with sidebar only %}
5
- {% endblock %}
5
+ {%- endblock -%}
6
6
 
7
- {% block content_bottom %}
7
+ {%- block content_bottom %}
8
8
  {% include '@oe-bcl/bcl-subscription-block/subscription-block.html.twig' with subscription only %}
9
9
  {% include '@oe-bcl/bcl-subscription/subscription-modal.html.twig' with modal only %}
10
- {% endblock %}
10
+ {%- endblock -%}
@@ -3,8 +3,8 @@ import { correctPaths, initScrollspy } from "@openeuropa/bcl-story-utils";
3
3
  import demoData from "@openeuropa/bcl-subscription/data/data";
4
4
  import subscriptionPage from "@openeuropa/bcl-subscription/subscription.html.twig";
5
5
 
6
- const clientValidation = (story) => {
7
- const demo = story();
6
+ const clientValidation = async (story) => {
7
+ const demo = await story();
8
8
  return `<script>
9
9
  var backdrop = document.getElementsByClassName("modal-backdrop")[0];
10
10
  if (typeof backdrop != "undefined" && backdrop != null) {
@@ -35,8 +35,8 @@ const clientValidation = (story) => {
35
35
  </script>${demo}`;
36
36
  };
37
37
 
38
- const openModal = (story) => {
39
- const demo = story();
38
+ const openModal = async (story) => {
39
+ const demo = await story();
40
40
  return `
41
41
  ${demo}
42
42
  <script>
@@ -52,8 +52,8 @@ const openModal = (story) => {
52
52
  `;
53
53
  };
54
54
 
55
- const successState = (story) => {
56
- const demo = story();
55
+ const successState = async (story) => {
56
+ const demo = await story();
57
57
  return `
58
58
  ${demo}
59
59
  <script>
@@ -68,8 +68,8 @@ const successState = (story) => {
68
68
  `;
69
69
  };
70
70
 
71
- const errorState = (story) => {
72
- const demo = story();
71
+ const errorState = async (story) => {
72
+ const demo = await story();
73
73
  return `
74
74
  ${demo}
75
75
  <script>
@@ -21,7 +21,7 @@ describe("OE - Subscription", () => {
21
21
 
22
22
  test(`passes the accessibility tests`, async () => {
23
23
  expect(
24
- await axe(renderTwigFileAsHtml(template, demoData)),
24
+ await axe(await renderTwigFileAsHtml(template, demoData)),
25
25
  ).toHaveNoViolations();
26
26
  });
27
27
  });