@openeuropa/bcl-subscription 0.23.0 → 0.24.0
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.
- package/__snapshots__/subscription.test.js.snap +16 -16
- package/data/data--modal.js +1 -1
- package/data/data.js +45 -5
- package/package.json +3 -3
- package/subscription.story.js +1 -43
- package/subscription.test.js +1 -28
|
@@ -641,12 +641,12 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
641
641
|
class="card-body pt-4 pt-md-0 px-0 px-md-3 pb-0"
|
|
642
642
|
>
|
|
643
643
|
<h1
|
|
644
|
-
class="
|
|
644
|
+
class="fs-1 card-title bcl-heading"
|
|
645
645
|
>
|
|
646
646
|
This is the title of this page
|
|
647
647
|
</h1>
|
|
648
648
|
<div
|
|
649
|
-
class="
|
|
649
|
+
class="my-3"
|
|
650
650
|
>
|
|
651
651
|
<span
|
|
652
652
|
class="text-muted me-3"
|
|
@@ -720,17 +720,17 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
720
720
|
class="row"
|
|
721
721
|
>
|
|
722
722
|
<div
|
|
723
|
-
class="col-12 col-lg-3"
|
|
723
|
+
class="col-12 bcl-sidebar col-lg-3"
|
|
724
724
|
>
|
|
725
725
|
<nav
|
|
726
|
-
class="
|
|
726
|
+
class="bcl-inpage-navigation position-sticky"
|
|
727
727
|
id="bcl-inpage-navigation"
|
|
728
728
|
>
|
|
729
|
-
<
|
|
730
|
-
class="mb-
|
|
729
|
+
<h2
|
|
730
|
+
class="mb-0 bcl-heading"
|
|
731
731
|
>
|
|
732
732
|
Page content
|
|
733
|
-
</
|
|
733
|
+
</h2>
|
|
734
734
|
<ul
|
|
735
735
|
class="nav nav-pills flex-column"
|
|
736
736
|
>
|
|
@@ -840,11 +840,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
840
840
|
<div
|
|
841
841
|
class="modal-header"
|
|
842
842
|
>
|
|
843
|
-
<
|
|
844
|
-
class="modal-title"
|
|
843
|
+
<div
|
|
844
|
+
class="modal-title fs-5 fw-medium"
|
|
845
845
|
>
|
|
846
846
|
Subscribe
|
|
847
|
-
</
|
|
847
|
+
</div>
|
|
848
848
|
<button
|
|
849
849
|
aria-label="Close"
|
|
850
850
|
class="btn-close"
|
|
@@ -866,11 +866,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
866
866
|
<div
|
|
867
867
|
class="alert-content flex-grow-1"
|
|
868
868
|
>
|
|
869
|
-
<
|
|
870
|
-
class="alert-heading"
|
|
869
|
+
<div
|
|
870
|
+
class="alert-heading h4"
|
|
871
871
|
>
|
|
872
872
|
Thank you!
|
|
873
|
-
</
|
|
873
|
+
</div>
|
|
874
874
|
Your subscription has been successfully registered. You can now close this dialog.
|
|
875
875
|
</div>
|
|
876
876
|
</div>
|
|
@@ -888,11 +888,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
888
888
|
<div
|
|
889
889
|
class="alert-content flex-grow-1"
|
|
890
890
|
>
|
|
891
|
-
<
|
|
892
|
-
class="alert-heading"
|
|
891
|
+
<div
|
|
892
|
+
class="alert-heading h4"
|
|
893
893
|
>
|
|
894
894
|
Sorry!
|
|
895
|
-
</
|
|
895
|
+
</div>
|
|
896
896
|
There was an error!
|
|
897
897
|
<hr
|
|
898
898
|
class="d-none d-md-block"
|
package/data/data--modal.js
CHANGED
|
@@ -3,7 +3,7 @@ const drupalAttribute = require("drupal-attribute");
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
id: "subscribeModal",
|
|
5
5
|
header:
|
|
6
|
-
'<
|
|
6
|
+
'<div class="modal-title fs-5 fw-medium">Subscribe</div><button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>',
|
|
7
7
|
footer:
|
|
8
8
|
'<div class="text-align-end">' +
|
|
9
9
|
'<button class="btn btn-light" data-bs-dismiss="modal">Close</button>' +
|
package/data/data.js
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import layout from "@openeuropa/bcl-base-templates/data/layout";
|
|
2
|
+
import {
|
|
3
|
+
banner,
|
|
4
|
+
sidebar,
|
|
5
|
+
} from "@openeuropa/bcl-base-templates/data/content-page";
|
|
6
|
+
import isChromatic from "chromatic/isChromatic";
|
|
7
|
+
|
|
8
|
+
import content from "@openeuropa/bcl-news/data/data--content";
|
|
9
|
+
import blockData from "@openeuropa/bcl-subscription-block/data";
|
|
10
|
+
import modalData from "@openeuropa/bcl-subscription/data/data--modal";
|
|
11
|
+
|
|
12
|
+
const chromatic = process.env.STORYBOOK_ENV;
|
|
13
|
+
|
|
14
|
+
const header =
|
|
15
|
+
layout[`header_${process.env.STORYBOOK_THEME}`] || layout.headerSimple;
|
|
16
|
+
|
|
17
|
+
if (isChromatic() || chromatic) {
|
|
18
|
+
banner.image.classes = banner.image.classes
|
|
19
|
+
? `${banner.image.classes} chromatic-ignore`
|
|
20
|
+
: "chromatic-ignore";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const demoData = {
|
|
24
|
+
content_type: "subscription",
|
|
25
|
+
title: "Subscription",
|
|
26
|
+
header,
|
|
27
|
+
footer: layout.footer,
|
|
28
|
+
with_banner: true,
|
|
29
|
+
with_header: true,
|
|
30
|
+
with_footer: true,
|
|
31
|
+
sidebar,
|
|
32
|
+
subscription: blockData,
|
|
33
|
+
modal: modalData,
|
|
34
|
+
banner: {
|
|
35
|
+
...banner,
|
|
36
|
+
action_bar: `
|
|
37
|
+
<div class="d-flex justify-content-end mt-2 align-items-center">
|
|
38
|
+
<button class="me-3 btn btn-outline-primary btn-md" type="button"><svg class="me-2-5 bi icon--fluid"><use xlink:href="/icons.svg#printer-fill"></use></svg>Print</button>
|
|
39
|
+
<button data-bs-toggle="modal" data-bs-target="#subscribeModal" class="btn btn-outline-primary btn-md" type="button"><svg class="me-2-5 bi icon--fluid"><use xlink:href="/icons.svg#envelope-fill"></use></svg>Subscribe</button>
|
|
40
|
+
</div>`,
|
|
41
|
+
},
|
|
42
|
+
content,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default demoData;
|
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.
|
|
5
|
+
"version": "0.24.0",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"description": "OE - BCL subscription",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@openeuropa/bcl-subscription-block": "^0.
|
|
11
|
+
"@openeuropa/bcl-subscription-block": "^0.24.0"
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"design-system",
|
|
25
25
|
"twig"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "a46bb6bc12771da4667516dc7b0665b00504ade2"
|
|
28
28
|
}
|
package/subscription.story.js
CHANGED
|
@@ -3,49 +3,12 @@ import withCode from "@openeuropa/storybook-addon-code";
|
|
|
3
3
|
import { within, userEvent } from "@storybook/testing-library";
|
|
4
4
|
import isChromatic from "chromatic/isChromatic";
|
|
5
5
|
import { correctPaths, initScrollspy } from "@openeuropa/bcl-story-utils";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
banner,
|
|
9
|
-
sidebar,
|
|
10
|
-
} from "@openeuropa/bcl-base-templates/data/content-page";
|
|
11
|
-
|
|
12
|
-
import content from "@openeuropa/bcl-news/data/data--content";
|
|
13
|
-
import blockData from "@openeuropa/bcl-subscription-block/data";
|
|
14
|
-
import drupalAttribute from "drupal-attribute";
|
|
6
|
+
import demoData from "@openeuropa/bcl-subscription/data/data";
|
|
15
7
|
|
|
16
8
|
import subscriptionPage from "@openeuropa/bcl-subscription/subscription.html.twig";
|
|
17
|
-
import subscriptionPageData from "@openeuropa/bcl-subscription/data/data";
|
|
18
|
-
import modalData from "@openeuropa/bcl-subscription/data/data--modal";
|
|
19
9
|
|
|
20
10
|
const chromatic = process.env.STORYBOOK_ENV;
|
|
21
11
|
|
|
22
|
-
const header =
|
|
23
|
-
layout[`header_${process.env.STORYBOOK_THEME}`] || layout.headerSimple;
|
|
24
|
-
|
|
25
|
-
if (isChromatic() || chromatic) {
|
|
26
|
-
banner.image.classes = banner.image.classes
|
|
27
|
-
? `${banner.image.classes} chromatic-ignore`
|
|
28
|
-
: "chromatic-ignore";
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const demoData = {
|
|
32
|
-
content_type: "subscription",
|
|
33
|
-
title: "Subscription",
|
|
34
|
-
header: header,
|
|
35
|
-
footer: layout.footer,
|
|
36
|
-
with_banner: true,
|
|
37
|
-
with_header: true,
|
|
38
|
-
with_footer: true,
|
|
39
|
-
sidebar: sidebar,
|
|
40
|
-
subscription: blockData,
|
|
41
|
-
modal: modalData,
|
|
42
|
-
banner: {
|
|
43
|
-
...banner,
|
|
44
|
-
action_bar: subscriptionPageData,
|
|
45
|
-
},
|
|
46
|
-
content: content,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
12
|
const clientValidation = (story) => {
|
|
50
13
|
const demo = story();
|
|
51
14
|
return `<script>
|
|
@@ -130,11 +93,6 @@ export default {
|
|
|
130
93
|
layout: "fullscreen",
|
|
131
94
|
controls: { disable: true },
|
|
132
95
|
badges: ["stable"],
|
|
133
|
-
badgesConfig: {
|
|
134
|
-
stable: {
|
|
135
|
-
title: "v1",
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
96
|
design: [
|
|
139
97
|
{
|
|
140
98
|
name: "Mockup",
|
package/subscription.test.js
CHANGED
|
@@ -1,33 +1,6 @@
|
|
|
1
1
|
import { renderTwigFileAsNode } from "@openeuropa/bcl-test-utils";
|
|
2
|
-
import layout from "@openeuropa/bcl-base-templates/data/layout";
|
|
3
|
-
import {
|
|
4
|
-
banner,
|
|
5
|
-
sidebar,
|
|
6
|
-
} from "@openeuropa/bcl-base-templates/data/content-page";
|
|
7
2
|
|
|
8
|
-
import
|
|
9
|
-
import blockData from "@openeuropa/bcl-subscription-block/data";
|
|
10
|
-
|
|
11
|
-
import subscriptionPageData from "@openeuropa/bcl-subscription/data/data";
|
|
12
|
-
import modalData from "@openeuropa/bcl-subscription/data/data--modal";
|
|
13
|
-
|
|
14
|
-
const demoData = {
|
|
15
|
-
content_type: "subscription",
|
|
16
|
-
title: "Subscription",
|
|
17
|
-
header: layout.headerSimple,
|
|
18
|
-
footer: layout.footer,
|
|
19
|
-
with_banner: true,
|
|
20
|
-
with_header: true,
|
|
21
|
-
with_footer: true,
|
|
22
|
-
sidebar: sidebar,
|
|
23
|
-
subscription: blockData,
|
|
24
|
-
modal: modalData,
|
|
25
|
-
banner: {
|
|
26
|
-
...banner,
|
|
27
|
-
action_bar: subscriptionPageData,
|
|
28
|
-
},
|
|
29
|
-
content: content,
|
|
30
|
-
};
|
|
3
|
+
import demoData from "@openeuropa/bcl-subscription/data/data";
|
|
31
4
|
|
|
32
5
|
const template = "@oe-bcl/bcl-subscription/subscription.html.twig";
|
|
33
6
|
|