@openeuropa/bcl-subscription 0.22.0 → 0.25.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 +87 -63
- package/data/data--modal.js +1 -1
- package/data/data.js +43 -28
- package/package.json +3 -3
- package/subscription.story.js +25 -46
- package/subscription.test.js +1 -35
|
@@ -15,7 +15,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
15
15
|
>
|
|
16
16
|
<a
|
|
17
17
|
class="navbar-brand"
|
|
18
|
-
href=""
|
|
18
|
+
href="/example.html"
|
|
19
19
|
>
|
|
20
20
|
<img
|
|
21
21
|
alt="desktop european union logo"
|
|
@@ -38,7 +38,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
38
38
|
class="text-center nav-link"
|
|
39
39
|
data-bs-target="#languageModal"
|
|
40
40
|
data-bs-toggle="modal"
|
|
41
|
-
href="
|
|
41
|
+
href="/example.html"
|
|
42
42
|
>
|
|
43
43
|
<svg
|
|
44
44
|
class="me-lg-2-5 bi icon--xs"
|
|
@@ -61,7 +61,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
61
61
|
class="text-center nav-link"
|
|
62
62
|
data-bs-target="#loginModal"
|
|
63
63
|
data-bs-toggle="modal"
|
|
64
|
-
href="
|
|
64
|
+
href="/example.html"
|
|
65
65
|
>
|
|
66
66
|
<svg
|
|
67
67
|
class="me-lg-2-5 bi icon--xs"
|
|
@@ -116,7 +116,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
116
116
|
aria-current="page"
|
|
117
117
|
aria-label="homepage"
|
|
118
118
|
class="nav-link active"
|
|
119
|
-
href="/example"
|
|
119
|
+
href="/example.html"
|
|
120
120
|
>
|
|
121
121
|
Home
|
|
122
122
|
</a>
|
|
@@ -126,7 +126,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
126
126
|
>
|
|
127
127
|
<a
|
|
128
128
|
class="nav-link"
|
|
129
|
-
href="/example"
|
|
129
|
+
href="/example.html"
|
|
130
130
|
>
|
|
131
131
|
Item 01
|
|
132
132
|
</a>
|
|
@@ -136,7 +136,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
136
136
|
>
|
|
137
137
|
<a
|
|
138
138
|
class="nav-link"
|
|
139
|
-
href="/example"
|
|
139
|
+
href="/example.html"
|
|
140
140
|
>
|
|
141
141
|
Item 02
|
|
142
142
|
</a>
|
|
@@ -148,7 +148,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
148
148
|
aria-expanded="false"
|
|
149
149
|
class="nav-link dropdown-toggle"
|
|
150
150
|
data-bs-toggle="dropdown"
|
|
151
|
-
href="
|
|
151
|
+
href="/example.html"
|
|
152
152
|
id="navbarDropdownMenuLink"
|
|
153
153
|
role="button"
|
|
154
154
|
>
|
|
@@ -238,7 +238,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
238
238
|
>
|
|
239
239
|
<a
|
|
240
240
|
aria-label="homepage"
|
|
241
|
-
href="/example"
|
|
241
|
+
href="/example.html"
|
|
242
242
|
>
|
|
243
243
|
Home
|
|
244
244
|
</a>
|
|
@@ -247,7 +247,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
247
247
|
class="breadcrumb-item d-none d-md-block"
|
|
248
248
|
>
|
|
249
249
|
<a
|
|
250
|
-
href="/example"
|
|
250
|
+
href="/example.html"
|
|
251
251
|
>
|
|
252
252
|
European Union
|
|
253
253
|
</a>
|
|
@@ -256,7 +256,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
256
256
|
class="breadcrumb-item"
|
|
257
257
|
>
|
|
258
258
|
<a
|
|
259
|
-
href="/example"
|
|
259
|
+
href="/example.html"
|
|
260
260
|
>
|
|
261
261
|
<svg
|
|
262
262
|
class="d-md-none ms-0 me-2 me-2-5 bi icon--s"
|
|
@@ -314,13 +314,19 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
314
314
|
Disclaimer 1
|
|
315
315
|
</h5>
|
|
316
316
|
<p>
|
|
317
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
317
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
318
|
+
<br />
|
|
319
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
320
|
+
<br />
|
|
318
321
|
</p>
|
|
319
322
|
<h5>
|
|
320
323
|
Disclaimer 2
|
|
321
324
|
</h5>
|
|
322
325
|
<p>
|
|
323
|
-
|
|
326
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
327
|
+
<br />
|
|
328
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
329
|
+
<br />
|
|
324
330
|
</p>
|
|
325
331
|
</div>
|
|
326
332
|
<div
|
|
@@ -614,19 +620,19 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
614
620
|
</div>
|
|
615
621
|
<main>
|
|
616
622
|
<div
|
|
617
|
-
class="bcl-content-banner
|
|
623
|
+
class="bcl-content-banner pb-md-4-75 pb-4 pt-4 pt-md-4-75 bg-lighter"
|
|
618
624
|
>
|
|
619
625
|
<div
|
|
620
626
|
class="container"
|
|
621
627
|
>
|
|
622
|
-
<
|
|
628
|
+
<article
|
|
623
629
|
class="bg-transparent border-0 card"
|
|
624
630
|
>
|
|
625
631
|
<div
|
|
626
632
|
class="row"
|
|
627
633
|
>
|
|
628
634
|
<div
|
|
629
|
-
class="
|
|
635
|
+
class="bcl-card-start-col bcl-size-large"
|
|
630
636
|
>
|
|
631
637
|
<img
|
|
632
638
|
alt="alt img"
|
|
@@ -635,32 +641,34 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
635
641
|
/>
|
|
636
642
|
</div>
|
|
637
643
|
<div
|
|
638
|
-
class="col-md-
|
|
644
|
+
class="col-12 col-md-7 col-lg-8 col-xl-9 col-xxl-8"
|
|
639
645
|
>
|
|
640
646
|
<div
|
|
641
647
|
class="card-body pt-4 pt-md-0 px-0 px-md-3 pb-0"
|
|
642
648
|
>
|
|
643
|
-
<
|
|
644
|
-
class="
|
|
649
|
+
<h1
|
|
650
|
+
class="fs-1 card-title bcl-heading"
|
|
645
651
|
>
|
|
646
652
|
This is the title of this page
|
|
647
|
-
</
|
|
653
|
+
</h1>
|
|
648
654
|
<div
|
|
649
|
-
class="
|
|
655
|
+
class="my-3"
|
|
650
656
|
>
|
|
651
657
|
<span
|
|
652
658
|
class="text-muted me-3"
|
|
653
659
|
>
|
|
654
|
-
|
|
660
|
+
17 October 2019
|
|
655
661
|
</span>
|
|
656
662
|
</div>
|
|
657
663
|
<p>
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
665
|
+
<br />
|
|
666
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
667
|
+
<br />
|
|
668
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
669
|
+
<br />
|
|
670
|
+
<br />
|
|
671
|
+
Duis fermentum facilisis ex, ac porta massa.
|
|
664
672
|
</p>
|
|
665
673
|
<div
|
|
666
674
|
class="mt-2-5"
|
|
@@ -679,7 +687,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
679
687
|
</div>
|
|
680
688
|
</div>
|
|
681
689
|
</div>
|
|
682
|
-
</
|
|
690
|
+
</article>
|
|
683
691
|
<div
|
|
684
692
|
class="d-flex justify-content-end mt-2 align-items-center"
|
|
685
693
|
>
|
|
@@ -721,15 +729,17 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
721
729
|
class="row"
|
|
722
730
|
>
|
|
723
731
|
<div
|
|
724
|
-
class="col-12 col-lg-3"
|
|
732
|
+
class="col-12 bcl-sidebar col-lg-3"
|
|
725
733
|
>
|
|
726
734
|
<nav
|
|
727
|
-
class="
|
|
735
|
+
class="bcl-inpage-navigation position-sticky"
|
|
728
736
|
id="bcl-inpage-navigation"
|
|
729
737
|
>
|
|
730
|
-
<
|
|
738
|
+
<h2
|
|
739
|
+
class="mb-0 bcl-heading"
|
|
740
|
+
>
|
|
731
741
|
Page content
|
|
732
|
-
</
|
|
742
|
+
</h2>
|
|
733
743
|
<ul
|
|
734
744
|
class="nav nav-pills flex-column"
|
|
735
745
|
>
|
|
@@ -769,29 +779,41 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
769
779
|
</p>
|
|
770
780
|
<ul>
|
|
771
781
|
<li>
|
|
772
|
-
|
|
782
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
773
783
|
</li>
|
|
774
784
|
<li>
|
|
775
|
-
Lorem ipsum dolor sit amet
|
|
785
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
776
786
|
</li>
|
|
777
787
|
<li>
|
|
778
|
-
|
|
788
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
779
789
|
</li>
|
|
780
790
|
</ul>
|
|
781
|
-
<
|
|
782
|
-
class="
|
|
791
|
+
<h2
|
|
792
|
+
class="my-4"
|
|
783
793
|
id="subheading"
|
|
784
794
|
>
|
|
785
795
|
Sub heading
|
|
786
|
-
</
|
|
796
|
+
</h2>
|
|
787
797
|
<p>
|
|
788
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
798
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
799
|
+
<br />
|
|
800
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
801
|
+
<br />
|
|
802
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
789
803
|
</p>
|
|
790
804
|
<p>
|
|
791
|
-
|
|
805
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
806
|
+
<br />
|
|
807
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
808
|
+
<br />
|
|
809
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
810
|
+
<br />
|
|
811
|
+
<br />
|
|
812
|
+
Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa.
|
|
813
|
+
<br />
|
|
792
814
|
</p>
|
|
793
815
|
<div
|
|
794
|
-
class="bg-light px-4-5 pt-4 pb-4-5"
|
|
816
|
+
class="bcl-subscription-block bg-light px-4-5 pt-4 pb-4-5"
|
|
795
817
|
>
|
|
796
818
|
<div
|
|
797
819
|
class="fs-2 fw-normal"
|
|
@@ -839,11 +861,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
839
861
|
<div
|
|
840
862
|
class="modal-header"
|
|
841
863
|
>
|
|
842
|
-
<
|
|
843
|
-
class="modal-title"
|
|
864
|
+
<div
|
|
865
|
+
class="modal-title fs-5 fw-medium"
|
|
844
866
|
>
|
|
845
867
|
Subscribe
|
|
846
|
-
</
|
|
868
|
+
</div>
|
|
847
869
|
<button
|
|
848
870
|
aria-label="Close"
|
|
849
871
|
class="btn-close"
|
|
@@ -865,11 +887,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
865
887
|
<div
|
|
866
888
|
class="alert-content flex-grow-1"
|
|
867
889
|
>
|
|
868
|
-
<
|
|
869
|
-
class="alert-heading"
|
|
890
|
+
<div
|
|
891
|
+
class="alert-heading h4"
|
|
870
892
|
>
|
|
871
893
|
Thank you!
|
|
872
|
-
</
|
|
894
|
+
</div>
|
|
873
895
|
Your subscription has been successfully registered. You can now close this dialog.
|
|
874
896
|
</div>
|
|
875
897
|
</div>
|
|
@@ -887,11 +909,11 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
887
909
|
<div
|
|
888
910
|
class="alert-content flex-grow-1"
|
|
889
911
|
>
|
|
890
|
-
<
|
|
891
|
-
class="alert-heading"
|
|
912
|
+
<div
|
|
913
|
+
class="alert-heading h4"
|
|
892
914
|
>
|
|
893
915
|
Sorry!
|
|
894
|
-
</
|
|
916
|
+
</div>
|
|
895
917
|
There was an error!
|
|
896
918
|
<hr
|
|
897
919
|
class="d-none d-md-block"
|
|
@@ -1048,7 +1070,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1048
1070
|
</div>
|
|
1049
1071
|
</main>
|
|
1050
1072
|
<footer
|
|
1051
|
-
class="mt-4 bcl-footer bcl-footer--neutral"
|
|
1073
|
+
class="mt-md-4-75 mt-4 bcl-footer bcl-footer--neutral"
|
|
1052
1074
|
>
|
|
1053
1075
|
<div
|
|
1054
1076
|
class="container"
|
|
@@ -1065,7 +1087,9 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1065
1087
|
[Project name]
|
|
1066
1088
|
</p>
|
|
1067
1089
|
<p>
|
|
1068
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
1090
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum facilisis ex, ac porta massa. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
1091
|
+
<br />
|
|
1092
|
+
Duis fermentum facilisis ex, ac porta massa.
|
|
1069
1093
|
</p>
|
|
1070
1094
|
</div>
|
|
1071
1095
|
<div
|
|
@@ -1089,7 +1113,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1089
1113
|
>
|
|
1090
1114
|
<a
|
|
1091
1115
|
class="standalone"
|
|
1092
|
-
href="
|
|
1116
|
+
href="/example.html"
|
|
1093
1117
|
>
|
|
1094
1118
|
<svg
|
|
1095
1119
|
class="me-2-5 bi icon--xs"
|
|
@@ -1106,7 +1130,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1106
1130
|
>
|
|
1107
1131
|
<a
|
|
1108
1132
|
class="standalone"
|
|
1109
|
-
href="
|
|
1133
|
+
href="/example.html"
|
|
1110
1134
|
>
|
|
1111
1135
|
<svg
|
|
1112
1136
|
class="me-2-5 bi icon--xs"
|
|
@@ -1123,7 +1147,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1123
1147
|
>
|
|
1124
1148
|
<a
|
|
1125
1149
|
class="standalone"
|
|
1126
|
-
href="
|
|
1150
|
+
href="/example.html"
|
|
1127
1151
|
>
|
|
1128
1152
|
<svg
|
|
1129
1153
|
class="me-2-5 bi icon--xs"
|
|
@@ -1157,7 +1181,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1157
1181
|
>
|
|
1158
1182
|
<a
|
|
1159
1183
|
class="standalone"
|
|
1160
|
-
href="
|
|
1184
|
+
href="/example.html"
|
|
1161
1185
|
>
|
|
1162
1186
|
Link
|
|
1163
1187
|
</a>
|
|
@@ -1167,7 +1191,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1167
1191
|
>
|
|
1168
1192
|
<a
|
|
1169
1193
|
class="standalone"
|
|
1170
|
-
href="
|
|
1194
|
+
href="/example.html"
|
|
1171
1195
|
>
|
|
1172
1196
|
Link
|
|
1173
1197
|
</a>
|
|
@@ -1177,7 +1201,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1177
1201
|
>
|
|
1178
1202
|
<a
|
|
1179
1203
|
class="standalone"
|
|
1180
|
-
href="
|
|
1204
|
+
href="/example.html"
|
|
1181
1205
|
>
|
|
1182
1206
|
Link
|
|
1183
1207
|
</a>
|
|
@@ -1187,7 +1211,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1187
1211
|
>
|
|
1188
1212
|
<a
|
|
1189
1213
|
class="standalone"
|
|
1190
|
-
href="
|
|
1214
|
+
href="/example.html"
|
|
1191
1215
|
>
|
|
1192
1216
|
Link
|
|
1193
1217
|
</a>
|
|
@@ -1210,7 +1234,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1210
1234
|
>
|
|
1211
1235
|
<a
|
|
1212
1236
|
class="standalone"
|
|
1213
|
-
href="
|
|
1237
|
+
href="/example.html"
|
|
1214
1238
|
>
|
|
1215
1239
|
Link
|
|
1216
1240
|
</a>
|
|
@@ -1220,7 +1244,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1220
1244
|
>
|
|
1221
1245
|
<a
|
|
1222
1246
|
class="standalone"
|
|
1223
|
-
href="
|
|
1247
|
+
href="/example.html"
|
|
1224
1248
|
>
|
|
1225
1249
|
Link
|
|
1226
1250
|
</a>
|
|
@@ -1230,7 +1254,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1230
1254
|
>
|
|
1231
1255
|
<a
|
|
1232
1256
|
class="standalone"
|
|
1233
|
-
href="
|
|
1257
|
+
href="/example.html"
|
|
1234
1258
|
>
|
|
1235
1259
|
Link
|
|
1236
1260
|
</a>
|
|
@@ -1240,7 +1264,7 @@ exports[`OE - Subscription renders correctly 1`] = `
|
|
|
1240
1264
|
>
|
|
1241
1265
|
<a
|
|
1242
1266
|
class="standalone"
|
|
1243
|
-
href="
|
|
1267
|
+
href="/example.html"
|
|
1244
1268
|
>
|
|
1245
1269
|
Link
|
|
1246
1270
|
</a>
|
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,30 +1,45 @@
|
|
|
1
|
-
|
|
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";
|
|
2
7
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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,
|
|
30
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.25.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.25.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": "f50c7dfeab8695bbb5c18d5f7d5304509512268a"
|
|
28
28
|
}
|
package/subscription.story.js
CHANGED
|
@@ -3,50 +3,11 @@ 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
|
-
headerSimple,
|
|
8
|
-
footer,
|
|
9
|
-
} from "@openeuropa/bcl-base-templates/data/layout";
|
|
10
|
-
import {
|
|
11
|
-
banner,
|
|
12
|
-
sidebar,
|
|
13
|
-
} from "@openeuropa/bcl-base-templates/data/content-page";
|
|
14
|
-
|
|
15
|
-
import content from "@openeuropa/bcl-news/data/data--content";
|
|
16
|
-
import blockData from "@openeuropa/bcl-subscription-block/data";
|
|
17
|
-
import drupalAttribute from "drupal-attribute";
|
|
6
|
+
import demoData from "@openeuropa/bcl-subscription/data/data";
|
|
18
7
|
|
|
19
8
|
import subscriptionPage from "@openeuropa/bcl-subscription/subscription.html.twig";
|
|
20
|
-
import subscriptionPageData from "@openeuropa/bcl-subscription/data/data";
|
|
21
|
-
import modalData from "@openeuropa/bcl-subscription/data/data--modal";
|
|
22
|
-
const chromatic = process.env.STORYBOOK_ENV;
|
|
23
9
|
|
|
24
|
-
|
|
25
|
-
banner.image.classes = banner.image.classes
|
|
26
|
-
? `${banner.image.classes} chromatic-ignore`
|
|
27
|
-
: "chromatic-ignore";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const demoData = {
|
|
31
|
-
content_type: "subscription",
|
|
32
|
-
page_title: "Subscription",
|
|
33
|
-
header: headerSimple,
|
|
34
|
-
footer: {
|
|
35
|
-
...footer,
|
|
36
|
-
attributes: new drupalAttribute().addClass("mt-4"),
|
|
37
|
-
},
|
|
38
|
-
with_banner: true,
|
|
39
|
-
with_header: true,
|
|
40
|
-
with_footer: true,
|
|
41
|
-
sidebar: sidebar,
|
|
42
|
-
subscription: blockData,
|
|
43
|
-
modal: modalData,
|
|
44
|
-
banner: {
|
|
45
|
-
...banner,
|
|
46
|
-
...subscriptionPageData,
|
|
47
|
-
},
|
|
48
|
-
content: content,
|
|
49
|
-
};
|
|
10
|
+
const chromatic = process.env.STORYBOOK_ENV;
|
|
50
11
|
|
|
51
12
|
const clientValidation = (story) => {
|
|
52
13
|
const demo = story();
|
|
@@ -136,7 +97,7 @@ export default {
|
|
|
136
97
|
{
|
|
137
98
|
name: "Mockup",
|
|
138
99
|
type: "figma",
|
|
139
|
-
url: "https://www.figma.com/file/NQlGvTiTXZYN8TwY2Ur5EI/BCL-Features?node-id=
|
|
100
|
+
url: "https://www.figma.com/file/NQlGvTiTXZYN8TwY2Ur5EI/BCL-Features?node-id=10449%3A244556",
|
|
140
101
|
},
|
|
141
102
|
],
|
|
142
103
|
},
|
|
@@ -155,8 +116,26 @@ if (isChromatic() || chromatic) {
|
|
|
155
116
|
};
|
|
156
117
|
}
|
|
157
118
|
|
|
158
|
-
export const
|
|
159
|
-
|
|
119
|
+
export const SuccessState = () => subscriptionPage(correctPaths(demoData));
|
|
120
|
+
SuccessState.decorators = [openModal, successState];
|
|
121
|
+
SuccessState.parameters = {
|
|
122
|
+
design: [
|
|
123
|
+
{
|
|
124
|
+
name: "Mockup",
|
|
125
|
+
type: "figma",
|
|
126
|
+
url: "https://www.figma.com/file/NQlGvTiTXZYN8TwY2Ur5EI/BCL-Features?node-id=10449%3A244564",
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
};
|
|
160
130
|
|
|
161
|
-
export const
|
|
162
|
-
|
|
131
|
+
export const ErrorState = () => subscriptionPage(correctPaths(demoData));
|
|
132
|
+
ErrorState.decorators = [openModal, errorState];
|
|
133
|
+
ErrorState.parameters = {
|
|
134
|
+
design: [
|
|
135
|
+
{
|
|
136
|
+
name: "Mockup",
|
|
137
|
+
type: "figma",
|
|
138
|
+
url: "https://www.figma.com/file/NQlGvTiTXZYN8TwY2Ur5EI/BCL-Features?node-id=10449%3A244562",
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
};
|
package/subscription.test.js
CHANGED
|
@@ -1,40 +1,6 @@
|
|
|
1
1
|
import { renderTwigFileAsNode } from "@openeuropa/bcl-test-utils";
|
|
2
|
-
import {
|
|
3
|
-
headerSimple,
|
|
4
|
-
footer,
|
|
5
|
-
} from "@openeuropa/bcl-base-templates/data/layout";
|
|
6
|
-
import {
|
|
7
|
-
banner,
|
|
8
|
-
sidebar,
|
|
9
|
-
} from "@openeuropa/bcl-base-templates/data/content-page";
|
|
10
2
|
|
|
11
|
-
import
|
|
12
|
-
import blockData from "@openeuropa/bcl-subscription-block/data";
|
|
13
|
-
import drupalAttribute from "drupal-attribute";
|
|
14
|
-
|
|
15
|
-
import subscriptionPageData from "@openeuropa/bcl-subscription/data/data";
|
|
16
|
-
import modalData from "@openeuropa/bcl-subscription/data/data--modal";
|
|
17
|
-
|
|
18
|
-
const demoData = {
|
|
19
|
-
content_type: "subscription",
|
|
20
|
-
page_title: "Subscription",
|
|
21
|
-
header: headerSimple,
|
|
22
|
-
footer: {
|
|
23
|
-
...footer,
|
|
24
|
-
attributes: new drupalAttribute().addClass("mt-4"),
|
|
25
|
-
},
|
|
26
|
-
with_banner: true,
|
|
27
|
-
with_header: true,
|
|
28
|
-
with_footer: true,
|
|
29
|
-
sidebar: sidebar,
|
|
30
|
-
subscription: blockData,
|
|
31
|
-
modal: modalData,
|
|
32
|
-
banner: {
|
|
33
|
-
...banner,
|
|
34
|
-
...subscriptionPageData,
|
|
35
|
-
},
|
|
36
|
-
content: content,
|
|
37
|
-
};
|
|
3
|
+
import demoData from "@openeuropa/bcl-subscription/data/data";
|
|
38
4
|
|
|
39
5
|
const template = "@oe-bcl/bcl-subscription/subscription.html.twig";
|
|
40
6
|
|