hr-design-system-handlebars 1.114.93 → 1.114.95
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/CHANGELOG.md +25 -0
- package/dist/assets/index.css +3 -3
- package/dist/assets/js/components/external-service/externalServiceDs.feature.js +36 -0
- package/dist/views/components/newsletter/components/newsletter_form.hbs +40 -16
- package/dist/views/components/newsletter/newsletter.hbs +2 -2
- package/dist/views_static/components/newsletter/components/newsletter_form.hbs +40 -16
- package/dist/views_static/components/newsletter/newsletter.hbs +2 -2
- package/package.json +1 -1
- package/src/stories/views/components/external-service/externalServiceDs.feature.js +36 -0
- package/src/stories/views/components/newsletter/components/newsletter_form.hbs +40 -16
- package/src/stories/views/components/newsletter/newsletter.hbs +2 -2
- package/src/stories/views/components/newsletter/newsletter.stories.js +7 -8
- package/dist/views/components/newsletter/components/new_newsletter_form.hbs +0 -55
- package/dist/views_static/components/newsletter/components/new_newsletter_form.hbs +0 -55
- package/src/stories/views/components/newsletter/components/new_newsletter_form.hbs +0 -55
- /package/src/stories/views/components/newsletter/fixtures/{new_newsletter.json → newsletter.json} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
# v1.114.95 (Mon Feb 17 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Dpe 3556 [#1243](https://github.com/mumprod/hr-design-system-handlebars/pull/1243) (saad.elbaciri@hr.de [@selbaciri](https://github.com/selbaciri))
|
|
6
|
+
|
|
7
|
+
#### Authors: 2
|
|
8
|
+
|
|
9
|
+
- Saad El Baciri ([@selbaciri](https://github.com/selbaciri))
|
|
10
|
+
- selbaciri (saad.elbaciri@hr.de)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# v1.114.94 (Mon Feb 17 2025)
|
|
15
|
+
|
|
16
|
+
#### 🐛 Bug Fix
|
|
17
|
+
|
|
18
|
+
- Fixing clearance float bug + Refactor [#1242](https://github.com/mumprod/hr-design-system-handlebars/pull/1242) ([@Paul-Atreidis](https://github.com/Paul-Atreidis))
|
|
19
|
+
|
|
20
|
+
#### Authors: 1
|
|
21
|
+
|
|
22
|
+
- [@Paul-Atreidis](https://github.com/Paul-Atreidis)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
1
26
|
# v1.114.93 (Fri Feb 14 2025)
|
|
2
27
|
|
|
3
28
|
#### ⚠️ Pushed to `main`
|
package/dist/assets/index.css
CHANGED
|
@@ -3846,7 +3846,7 @@ article #commentList {
|
|
|
3846
3846
|
border-bottom-color: var(--color-secondary-ds);
|
|
3847
3847
|
}
|
|
3848
3848
|
.counter-reset {
|
|
3849
|
-
counter-reset:
|
|
3849
|
+
counter-reset: cnt1739790727302;
|
|
3850
3850
|
}
|
|
3851
3851
|
.animate-delay-100 {
|
|
3852
3852
|
--tw-animate-delay: 100ms;
|
|
@@ -4291,7 +4291,7 @@ html { scroll-behavior: smooth; }
|
|
|
4291
4291
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
4292
4292
|
}
|
|
4293
4293
|
.-ordered {
|
|
4294
|
-
counter-increment:
|
|
4294
|
+
counter-increment: cnt1739790727302 1;
|
|
4295
4295
|
}
|
|
4296
4296
|
.-ordered::before {
|
|
4297
4297
|
position: absolute;
|
|
@@ -4309,7 +4309,7 @@ html { scroll-behavior: smooth; }
|
|
|
4309
4309
|
--tw-text-opacity: 1;
|
|
4310
4310
|
color: rgba(0, 0, 0, 1);
|
|
4311
4311
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
4312
|
-
content: counter(
|
|
4312
|
+
content: counter(cnt1739790727302);
|
|
4313
4313
|
}
|
|
4314
4314
|
/*! ****************************/
|
|
4315
4315
|
/*! DataPolicy stuff */
|
|
@@ -111,6 +111,9 @@ const ExternalService = function (context) {
|
|
|
111
111
|
case 'wahl-gemeinde-ergebnis':
|
|
112
112
|
createWahlGemeindeErgebnisEmbed()
|
|
113
113
|
break
|
|
114
|
+
case 'wer-waehlte-wen':
|
|
115
|
+
werWaehlteWenEmbed()
|
|
116
|
+
break
|
|
114
117
|
default:
|
|
115
118
|
console.error('No JS Config for external service ' + id)
|
|
116
119
|
break
|
|
@@ -168,6 +171,39 @@ const ExternalService = function (context) {
|
|
|
168
171
|
script.type = 'text/javascript'
|
|
169
172
|
rootElement.appendChild(script)
|
|
170
173
|
}
|
|
174
|
+
|
|
175
|
+
const werWaehlteWenEmbed = function () {
|
|
176
|
+
let iframe = document.createElement('iframe');
|
|
177
|
+
let cleanUrl;
|
|
178
|
+
const parts = embedCode.split('*');
|
|
179
|
+
if (parts.length === 2) {
|
|
180
|
+
const params = parts[1].split(' ');
|
|
181
|
+
cleanUrl = parts[0].trim();
|
|
182
|
+
for (const param of params) {
|
|
183
|
+
const [key, value] = param.split('=');
|
|
184
|
+
if (key === 'id') {
|
|
185
|
+
iframe.id = value;
|
|
186
|
+
} else {
|
|
187
|
+
iframe.setAttribute(key, value);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
iframe.src = cleanUrl;
|
|
193
|
+
iframe.style.width = "100%";
|
|
194
|
+
iframe.style.border = "0";
|
|
195
|
+
rootElement.appendChild(iframe);
|
|
196
|
+
|
|
197
|
+
window.addEventListener("message", function (e) {
|
|
198
|
+
if (e.data.contentUrl && e.data.contentUrl.includes("/wahl/embed/2025-02-23-BT-DE/wer-waehlte-wen/")) {
|
|
199
|
+
let h = parseInt(e.data.height, 10) + 2;
|
|
200
|
+
if (iframe.id === "ts-embed-wer-waehlte-wen-2025-02-23-BT-DE") {
|
|
201
|
+
iframe.style.height = h + "px";
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
171
207
|
const createUniqueID = function () {
|
|
172
208
|
console.log("Erzeuge einzigartige ID")
|
|
173
209
|
uniqueId = Math.random().toString(36).replace(/[^a-z]+/g, '').substring(2, 10)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
id="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
x-
|
|
8
|
-
|
|
9
|
-
x-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
+
{{this.title}}
|
|
3
|
+
</h3>
|
|
4
|
+
<div id="formWrapper">
|
|
5
|
+
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
+
id="form{{nextRandom}}"
|
|
7
|
+
x-ref="form{{getRandom}}"
|
|
8
|
+
ax-load
|
|
9
|
+
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
+
x-init="formInit()"
|
|
11
|
+
x-ignore
|
|
12
|
+
@submit.prevent
|
|
13
|
+
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
+
method="post"
|
|
15
|
+
accept-charset="utf-8"
|
|
15
16
|
>
|
|
16
|
-
|
|
17
17
|
<div x-show="!wasPosted"
|
|
18
18
|
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
19
|
x-transition:enter-start="opacity-0 transform scale-90"
|
|
@@ -22,10 +22,34 @@ accept-charset="utf-8"
|
|
|
22
22
|
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
23
|
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
24
|
>
|
|
25
|
-
{{> components/newsletter/components/
|
|
25
|
+
{{> components/newsletter/components/newsletter_fields }}
|
|
26
26
|
|
|
27
27
|
{{> components/newsletter/components/newsletter_controls }}
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
+
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
+
x-cloak
|
|
35
|
+
>
|
|
36
|
+
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
+
</div>
|
|
38
|
+
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
+
x-cloak
|
|
43
|
+
>
|
|
44
|
+
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
+
x-cloak
|
|
51
|
+
>
|
|
52
|
+
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
+
</div>
|
|
30
54
|
</form>
|
|
31
55
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div id="{{this.uuid}}" class="relative bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
1
|
+
<div id="{{this.uuid}}" class="relative clear-both bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
2
2
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_intro_sr" ~}}
|
|
3
|
-
{{> components/newsletter/components/
|
|
3
|
+
{{> components/newsletter/components/newsletter_form}}
|
|
4
4
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_outro_sr" ~}}
|
|
5
5
|
</div>
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
id="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
x-
|
|
8
|
-
|
|
9
|
-
x-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
+
{{this.title}}
|
|
3
|
+
</h3>
|
|
4
|
+
<div id="formWrapper">
|
|
5
|
+
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
+
id="form{{nextRandom}}"
|
|
7
|
+
x-ref="form{{getRandom}}"
|
|
8
|
+
ax-load
|
|
9
|
+
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
+
x-init="formInit()"
|
|
11
|
+
x-ignore
|
|
12
|
+
@submit.prevent
|
|
13
|
+
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
+
method="post"
|
|
15
|
+
accept-charset="utf-8"
|
|
15
16
|
>
|
|
16
|
-
|
|
17
17
|
<div x-show="!wasPosted"
|
|
18
18
|
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
19
|
x-transition:enter-start="opacity-0 transform scale-90"
|
|
@@ -22,10 +22,34 @@ accept-charset="utf-8"
|
|
|
22
22
|
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
23
|
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
24
|
>
|
|
25
|
-
{{> components/newsletter/components/
|
|
25
|
+
{{> components/newsletter/components/newsletter_fields }}
|
|
26
26
|
|
|
27
27
|
{{> components/newsletter/components/newsletter_controls }}
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
+
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
+
x-cloak
|
|
35
|
+
>
|
|
36
|
+
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
+
</div>
|
|
38
|
+
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
+
x-cloak
|
|
43
|
+
>
|
|
44
|
+
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
+
x-cloak
|
|
51
|
+
>
|
|
52
|
+
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
+
</div>
|
|
30
54
|
</form>
|
|
31
55
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div id="{{this.uuid}}" class="relative bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
1
|
+
<div id="{{this.uuid}}" class="relative clear-both bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
2
2
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_intro_sr" ~}}
|
|
3
|
-
{{> components/newsletter/components/
|
|
3
|
+
{{> components/newsletter/components/newsletter_form}}
|
|
4
4
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_outro_sr" ~}}
|
|
5
5
|
</div>
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"repository": "https://github.com/szuelch/hr-design-system-handlebars",
|
|
9
|
-
"version": "1.114.
|
|
9
|
+
"version": "1.114.95",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "storybook dev -p 6006 public",
|
|
@@ -111,6 +111,9 @@ const ExternalService = function (context) {
|
|
|
111
111
|
case 'wahl-gemeinde-ergebnis':
|
|
112
112
|
createWahlGemeindeErgebnisEmbed()
|
|
113
113
|
break
|
|
114
|
+
case 'wer-waehlte-wen':
|
|
115
|
+
werWaehlteWenEmbed()
|
|
116
|
+
break
|
|
114
117
|
default:
|
|
115
118
|
console.error('No JS Config for external service ' + id)
|
|
116
119
|
break
|
|
@@ -168,6 +171,39 @@ const ExternalService = function (context) {
|
|
|
168
171
|
script.type = 'text/javascript'
|
|
169
172
|
rootElement.appendChild(script)
|
|
170
173
|
}
|
|
174
|
+
|
|
175
|
+
const werWaehlteWenEmbed = function () {
|
|
176
|
+
let iframe = document.createElement('iframe');
|
|
177
|
+
let cleanUrl;
|
|
178
|
+
const parts = embedCode.split('*');
|
|
179
|
+
if (parts.length === 2) {
|
|
180
|
+
const params = parts[1].split(' ');
|
|
181
|
+
cleanUrl = parts[0].trim();
|
|
182
|
+
for (const param of params) {
|
|
183
|
+
const [key, value] = param.split('=');
|
|
184
|
+
if (key === 'id') {
|
|
185
|
+
iframe.id = value;
|
|
186
|
+
} else {
|
|
187
|
+
iframe.setAttribute(key, value);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
iframe.src = cleanUrl;
|
|
193
|
+
iframe.style.width = "100%";
|
|
194
|
+
iframe.style.border = "0";
|
|
195
|
+
rootElement.appendChild(iframe);
|
|
196
|
+
|
|
197
|
+
window.addEventListener("message", function (e) {
|
|
198
|
+
if (e.data.contentUrl && e.data.contentUrl.includes("/wahl/embed/2025-02-23-BT-DE/wer-waehlte-wen/")) {
|
|
199
|
+
let h = parseInt(e.data.height, 10) + 2;
|
|
200
|
+
if (iframe.id === "ts-embed-wer-waehlte-wen-2025-02-23-BT-DE") {
|
|
201
|
+
iframe.style.height = h + "px";
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
171
207
|
const createUniqueID = function () {
|
|
172
208
|
console.log("Erzeuge einzigartige ID")
|
|
173
209
|
uniqueId = Math.random().toString(36).replace(/[^a-z]+/g, '').substring(2, 10)
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
<
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
id="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
x-
|
|
8
|
-
|
|
9
|
-
x-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
+
{{this.title}}
|
|
3
|
+
</h3>
|
|
4
|
+
<div id="formWrapper">
|
|
5
|
+
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
+
id="form{{nextRandom}}"
|
|
7
|
+
x-ref="form{{getRandom}}"
|
|
8
|
+
ax-load
|
|
9
|
+
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
+
x-init="formInit()"
|
|
11
|
+
x-ignore
|
|
12
|
+
@submit.prevent
|
|
13
|
+
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
+
method="post"
|
|
15
|
+
accept-charset="utf-8"
|
|
15
16
|
>
|
|
16
|
-
|
|
17
17
|
<div x-show="!wasPosted"
|
|
18
18
|
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
19
|
x-transition:enter-start="opacity-0 transform scale-90"
|
|
@@ -22,10 +22,34 @@ accept-charset="utf-8"
|
|
|
22
22
|
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
23
|
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
24
|
>
|
|
25
|
-
{{> components/newsletter/components/
|
|
25
|
+
{{> components/newsletter/components/newsletter_fields }}
|
|
26
26
|
|
|
27
27
|
{{> components/newsletter/components/newsletter_controls }}
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
+
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
+
x-cloak
|
|
35
|
+
>
|
|
36
|
+
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
+
</div>
|
|
38
|
+
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
+
x-cloak
|
|
43
|
+
>
|
|
44
|
+
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
+
</div>
|
|
46
|
+
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
+
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
+
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
+
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
+
x-cloak
|
|
51
|
+
>
|
|
52
|
+
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
+
</div>
|
|
30
54
|
</form>
|
|
31
55
|
</div>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div id="{{this.uuid}}" class="relative bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
1
|
+
<div id="{{this.uuid}}" class="relative clear-both bg-highlight-1 dark:bg-highlight-1-dark sm:rounded-tl-hr sm:rounded-br-hr px-5 sm:px-13 pb-8 pt-6 sm:pt-12 mt-7 sm:mt-12 mb-5 article-full-width sm:article-narrow {{_addClass}}">
|
|
2
2
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_intro_sr" ~}}
|
|
3
|
-
{{> components/newsletter/components/
|
|
3
|
+
{{> components/newsletter/components/newsletter_form}}
|
|
4
4
|
{{~> components/base/a11y/hiddenText _locaTag="story_newsletter_outro_sr" ~}}
|
|
5
5
|
</div>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import OldNewsletterJson from './fixtures/newsletter.json'
|
|
1
|
+
import newsletterJson from './fixtures/newsletter.json'
|
|
3
2
|
|
|
4
3
|
const handlebars = require('hrHandlebars')
|
|
5
4
|
|
|
@@ -32,7 +31,7 @@ export default {
|
|
|
32
31
|
chromatic: { disableSnapshot: true }
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
|
-
const
|
|
34
|
+
const TemplateNewsletter = (args) => {
|
|
36
35
|
let hbsTemplate = handlebars.compile(`
|
|
37
36
|
{{> components/newsletter/newsletter }}
|
|
38
37
|
`)
|
|
@@ -40,17 +39,17 @@ const TemplateNewsletterNew = (args) => {
|
|
|
40
39
|
}
|
|
41
40
|
|
|
42
41
|
export const Default = {
|
|
43
|
-
render:
|
|
44
|
-
name: '
|
|
45
|
-
args:
|
|
42
|
+
render: TemplateNewsletter.bind({}),
|
|
43
|
+
name: 'Newsletter',
|
|
44
|
+
args: newsletterJson,
|
|
46
45
|
parameters: {
|
|
47
46
|
fetchMock: {
|
|
48
47
|
mocks: [
|
|
49
48
|
{
|
|
50
|
-
matcher: '
|
|
49
|
+
matcher: 'https://ugc-hessenschau.dev-ext.hrcms.gcp.cloud.hr.de',
|
|
51
50
|
response: {
|
|
52
51
|
status: 200,
|
|
53
|
-
message: '
|
|
52
|
+
message: 'success',
|
|
54
53
|
body: {
|
|
55
54
|
status: ''
|
|
56
55
|
},
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
-
{{this.title}}
|
|
3
|
-
</h3>
|
|
4
|
-
<div id="formWrapper">
|
|
5
|
-
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
-
id="form{{nextRandom}}"
|
|
7
|
-
x-ref="form{{getRandom}}"
|
|
8
|
-
ax-load
|
|
9
|
-
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
-
x-init="formInit()"
|
|
11
|
-
x-ignore
|
|
12
|
-
@submit.prevent
|
|
13
|
-
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
-
method="post"
|
|
15
|
-
accept-charset="utf-8"
|
|
16
|
-
>
|
|
17
|
-
<div x-show="!wasPosted"
|
|
18
|
-
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
20
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
21
|
-
x-transition:leave="transition ease-in duration-75 delay-0"
|
|
22
|
-
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
|
-
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
|
-
>
|
|
25
|
-
{{> components/newsletter/components/newsletter_fields }}
|
|
26
|
-
|
|
27
|
-
{{> components/newsletter/components/newsletter_controls }}
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
-
x-cloak
|
|
35
|
-
>
|
|
36
|
-
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
-
</div>
|
|
38
|
-
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
-
x-cloak
|
|
43
|
-
>
|
|
44
|
-
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
-
</div>
|
|
46
|
-
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
-
x-cloak
|
|
51
|
-
>
|
|
52
|
-
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
-
</div>
|
|
54
|
-
</form>
|
|
55
|
-
</div>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
-
{{this.title}}
|
|
3
|
-
</h3>
|
|
4
|
-
<div id="formWrapper">
|
|
5
|
-
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
-
id="form{{nextRandom}}"
|
|
7
|
-
x-ref="form{{getRandom}}"
|
|
8
|
-
ax-load
|
|
9
|
-
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
-
x-init="formInit()"
|
|
11
|
-
x-ignore
|
|
12
|
-
@submit.prevent
|
|
13
|
-
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
-
method="post"
|
|
15
|
-
accept-charset="utf-8"
|
|
16
|
-
>
|
|
17
|
-
<div x-show="!wasPosted"
|
|
18
|
-
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
20
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
21
|
-
x-transition:leave="transition ease-in duration-75 delay-0"
|
|
22
|
-
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
|
-
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
|
-
>
|
|
25
|
-
{{> components/newsletter/components/newsletter_fields }}
|
|
26
|
-
|
|
27
|
-
{{> components/newsletter/components/newsletter_controls }}
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
-
x-cloak
|
|
35
|
-
>
|
|
36
|
-
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
-
</div>
|
|
38
|
-
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
-
x-cloak
|
|
43
|
-
>
|
|
44
|
-
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
-
</div>
|
|
46
|
-
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
-
x-cloak
|
|
51
|
-
>
|
|
52
|
-
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
-
</div>
|
|
54
|
-
</form>
|
|
55
|
-
</div>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<h3 class="mb-6 text-2xl md:text-3xl font-headingSerif sm:mb-12 text-text dark:text-text-dark">
|
|
2
|
-
{{this.title}}
|
|
3
|
-
</h3>
|
|
4
|
-
<div id="formWrapper">
|
|
5
|
-
<form class="relative flex flex-col justify-center overflow-hidden group"
|
|
6
|
-
id="form{{nextRandom}}"
|
|
7
|
-
x-ref="form{{getRandom}}"
|
|
8
|
-
ax-load
|
|
9
|
-
x-data="newsletterForm('form{{getRandom}}','{{this.trackingInformations}}')"
|
|
10
|
-
x-init="formInit()"
|
|
11
|
-
x-ignore
|
|
12
|
-
@submit.prevent
|
|
13
|
-
action="{{~#if (isStorybook)~}}{{this.jsonURL}}{{else}}{{configProperty "newsletter.subscription.endpoint"}}{{/if}}"
|
|
14
|
-
method="post"
|
|
15
|
-
accept-charset="utf-8"
|
|
16
|
-
>
|
|
17
|
-
<div x-show="!wasPosted"
|
|
18
|
-
x-transition:enter="transition ease-out duration-300 delay-300"
|
|
19
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
20
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
21
|
-
x-transition:leave="transition ease-in duration-75 delay-0"
|
|
22
|
-
x-transition:leave-start="opacity-100 transform scale-100"
|
|
23
|
-
x-transition:leave-end="opacity-0 transform scale-90"
|
|
24
|
-
>
|
|
25
|
-
{{> components/newsletter/components/newsletter_fields }}
|
|
26
|
-
|
|
27
|
-
{{> components/newsletter/components/newsletter_controls }}
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="flex flex-col gap-6 js-successMessage md:gap-10" id="successMessage" x-show="wasPostedWithSuccess"
|
|
31
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
32
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
33
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
34
|
-
x-cloak
|
|
35
|
-
>
|
|
36
|
-
{{{include "components/newsletter/components/newsletter_success" _success="true" _locaKeyText="newsletter_text_success"}}}
|
|
37
|
-
</div>
|
|
38
|
-
<div class="flex flex-col gap-6 js-errorMessage md:gap-10" id="errorMessage" x-show="wasPostedWithError"
|
|
39
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
40
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
41
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
42
|
-
x-cloak
|
|
43
|
-
>
|
|
44
|
-
{{{include "components/newsletter/components/newsletter_error" _locaKeyText="newsletter_text_error"}}}
|
|
45
|
-
</div>
|
|
46
|
-
<div class="flex flex-col gap-6 js-alreadyRegisteredMessage md:gap-10" id="alreadyRegisteredMessage" x-show="wasPostedAlreadyRegistered"
|
|
47
|
-
x-transition:enter="transition ease-out duration-300 delay-75"
|
|
48
|
-
x-transition:enter-start="opacity-0 transform scale-90"
|
|
49
|
-
x-transition:enter-end="opacity-100 transform scale-100"
|
|
50
|
-
x-cloak
|
|
51
|
-
>
|
|
52
|
-
{{{include "components/newsletter/components/newsletter_already_registered" _alreadyRegistered="true" _locaKeyText="newsletter_text_already_registered" }}}
|
|
53
|
-
</div>
|
|
54
|
-
</form>
|
|
55
|
-
</div>
|
/package/src/stories/views/components/newsletter/fixtures/{new_newsletter.json → newsletter.json}
RENAMED
|
File without changes
|