hr-design-system-handlebars 1.34.6 → 1.35.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/CHANGELOG.md +25 -0
- package/dist/assets/brand/_default/conf/locatags.json +15 -1
- package/dist/assets/icons/icons/svgmap/suche-ds.svg +4 -0
- package/dist/assets/icons/icons/svgmap/twitter-ds.svg +1 -1
- package/dist/assets/icons/icons/svgmap.min.svg +1 -1
- package/dist/assets/index.css +119 -8
- package/dist/assets/js/components/dataPolicySettings/dataPolicySettingsDs.feature.js +285 -0
- package/dist/assets/js/components/externalService/datapolicyCookie.subfeature.js +41 -0
- package/dist/views/components/dataPolicySettings/data_policy_settings.hbs +99 -0
- package/dist/views/components/footer/page_footer_content.hbs +1 -6
- package/dist/views/components/footer/page_footer_social_media.hbs +2 -2
- package/dist/views/components/forms/toggle_button.hbs +2 -0
- package/dist/views/components/site_header/navigation_search/quick_search_form.hbs +2 -8
- package/dist/views/components/teaser/ticker/teaser_ticker_timeline.hbs +1 -1
- package/dist/views_static/components/dataPolicySettings/data_policy_settings.hbs +99 -0
- package/dist/views_static/components/footer/page_footer_content.hbs +1 -6
- package/dist/views_static/components/footer/page_footer_social_media.hbs +2 -2
- package/dist/views_static/components/forms/toggle_button.hbs +2 -0
- package/dist/views_static/components/site_header/navigation_search/quick_search_form.hbs +2 -8
- package/dist/views_static/components/teaser/ticker/teaser_ticker_timeline.hbs +1 -1
- package/package.json +1 -1
- package/src/assets/brand/_default/conf/locatags.json +15 -1
- package/src/assets/brand/hessenschau/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-bigband/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-fernsehen/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-inforadio/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-rundfunkrat/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-sinfonieorchester/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr-werbung/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr1/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr2/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr3/conf/locatags.merged.json +13 -0
- package/src/assets/brand/hr4/conf/locatags.merged.json +13 -0
- package/src/assets/brand/you-fm/conf/locatags.merged.json +13 -0
- package/src/assets/css/custom-utilities.css +16 -0
- package/src/assets/fixtures/footer/footer_hessenschau.json +42 -1
- package/src/assets/icons/icons/svgmap/suche-ds.svg +4 -0
- package/src/assets/icons/icons/svgmap/twitter-ds.svg +1 -1
- package/src/assets/icons/icons/svgmap.min.svg +1 -1
- package/src/assets/tailwind.css +2 -0
- package/src/stories/views/components/dataPolicySettings/dataPolicySettingsDs.feature.js +285 -0
- package/src/stories/views/components/dataPolicySettings/data_policy_settings.hbs +99 -0
- package/src/stories/views/components/externalService/datapolicyCookie.subfeature.js +41 -0
- package/src/stories/views/components/footer/fixtures/footer_hessenschau.json +1 -1
- package/src/stories/views/components/footer/page_footer_content.hbs +1 -6
- package/src/stories/views/components/footer/page_footer_social_media.hbs +2 -2
- package/src/stories/views/components/forms/toggle_button.hbs +2 -0
- package/src/stories/views/components/site_header/navigation_search/quick_search_form.hbs +2 -8
- package/src/stories/views/components/teaser/ticker/teaser_ticker_timeline.hbs +1 -1
- package/tailwind.config.js +5 -2
package/dist/assets/index.css
CHANGED
|
@@ -423,7 +423,7 @@ video {
|
|
|
423
423
|
font-stretch: condensed;
|
|
424
424
|
}
|
|
425
425
|
|
|
426
|
-
.-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .-rotate-45, .rotate-180, .rotate-45, .scale-50, .scale-y-100, .scale-y-90, .transform, .is-loading::after, .active\:scale-95 {
|
|
426
|
+
.-translate-x-1\/2, .-translate-x-2\/4, .-translate-y-1\/2, .-rotate-45, .rotate-180, .rotate-45, .scale-50, .scale-y-100, .scale-y-90, .transform, .is-loading::after, .hover\:scale-105, .active\:scale-95 {
|
|
427
427
|
--tw-translate-x: 0;
|
|
428
428
|
--tw-translate-y: 0;
|
|
429
429
|
--tw-rotate: 0;
|
|
@@ -1057,6 +1057,9 @@ video {
|
|
|
1057
1057
|
.left-2\/4 {
|
|
1058
1058
|
left: 50%;
|
|
1059
1059
|
}
|
|
1060
|
+
.left-\[4px\] {
|
|
1061
|
+
left: 4px;
|
|
1062
|
+
}
|
|
1060
1063
|
.right-0 {
|
|
1061
1064
|
right: 0px;
|
|
1062
1065
|
}
|
|
@@ -1090,6 +1093,9 @@ video {
|
|
|
1090
1093
|
.top-8 {
|
|
1091
1094
|
top: 2rem;
|
|
1092
1095
|
}
|
|
1096
|
+
.top-\[3px\] {
|
|
1097
|
+
top: 3px;
|
|
1098
|
+
}
|
|
1093
1099
|
.top-\[41px\] {
|
|
1094
1100
|
top: 41px;
|
|
1095
1101
|
}
|
|
@@ -1117,6 +1123,9 @@ video {
|
|
|
1117
1123
|
.z-30 {
|
|
1118
1124
|
z-index: 30;
|
|
1119
1125
|
}
|
|
1126
|
+
.z-300 {
|
|
1127
|
+
z-index: 300;
|
|
1128
|
+
}
|
|
1120
1129
|
.order-1 {
|
|
1121
1130
|
order: 1;
|
|
1122
1131
|
}
|
|
@@ -1153,6 +1162,9 @@ video {
|
|
|
1153
1162
|
.m-4 {
|
|
1154
1163
|
margin: 1rem;
|
|
1155
1164
|
}
|
|
1165
|
+
.m-auto {
|
|
1166
|
+
margin: auto;
|
|
1167
|
+
}
|
|
1156
1168
|
.mx-0 {
|
|
1157
1169
|
margin-left: 0px;
|
|
1158
1170
|
margin-right: 0px;
|
|
@@ -1204,6 +1216,9 @@ video {
|
|
|
1204
1216
|
.\!mt-4 {
|
|
1205
1217
|
margin-top: 1rem !important;
|
|
1206
1218
|
}
|
|
1219
|
+
.-mb-1 {
|
|
1220
|
+
margin-bottom: -0.25rem;
|
|
1221
|
+
}
|
|
1207
1222
|
.-mb-2 {
|
|
1208
1223
|
margin-bottom: -0.5rem;
|
|
1209
1224
|
}
|
|
@@ -1357,6 +1372,9 @@ video {
|
|
|
1357
1372
|
.inline {
|
|
1358
1373
|
display: inline;
|
|
1359
1374
|
}
|
|
1375
|
+
.\!flex {
|
|
1376
|
+
display: flex !important;
|
|
1377
|
+
}
|
|
1360
1378
|
.flex {
|
|
1361
1379
|
display: flex;
|
|
1362
1380
|
}
|
|
@@ -1420,6 +1438,12 @@ video {
|
|
|
1420
1438
|
.h-8 {
|
|
1421
1439
|
height: 2rem;
|
|
1422
1440
|
}
|
|
1441
|
+
.h-\[19px\] {
|
|
1442
|
+
height: 19px;
|
|
1443
|
+
}
|
|
1444
|
+
.h-\[25px\] {
|
|
1445
|
+
height: 25px;
|
|
1446
|
+
}
|
|
1423
1447
|
.h-\[9px\] {
|
|
1424
1448
|
height: 9px;
|
|
1425
1449
|
}
|
|
@@ -1520,6 +1544,12 @@ video {
|
|
|
1520
1544
|
.w-\[1600px\] {
|
|
1521
1545
|
width: 1600px;
|
|
1522
1546
|
}
|
|
1547
|
+
.w-\[19px\] {
|
|
1548
|
+
width: 19px;
|
|
1549
|
+
}
|
|
1550
|
+
.w-\[50px\] {
|
|
1551
|
+
width: 50px;
|
|
1552
|
+
}
|
|
1523
1553
|
.w-\[9px\] {
|
|
1524
1554
|
width: 9px;
|
|
1525
1555
|
}
|
|
@@ -1564,6 +1594,9 @@ video {
|
|
|
1564
1594
|
.max-w-3\/4 {
|
|
1565
1595
|
max-width: 75%;
|
|
1566
1596
|
}
|
|
1597
|
+
.max-w-\[480px\] {
|
|
1598
|
+
max-width: 480px;
|
|
1599
|
+
}
|
|
1567
1600
|
.max-w-full {
|
|
1568
1601
|
max-width: 100%;
|
|
1569
1602
|
}
|
|
@@ -1808,6 +1841,9 @@ video {
|
|
|
1808
1841
|
.overflow-visible {
|
|
1809
1842
|
overflow: visible;
|
|
1810
1843
|
}
|
|
1844
|
+
.overflow-scroll {
|
|
1845
|
+
overflow: scroll;
|
|
1846
|
+
}
|
|
1811
1847
|
.overflow-x-auto {
|
|
1812
1848
|
overflow-x: auto;
|
|
1813
1849
|
}
|
|
@@ -1847,6 +1883,9 @@ video {
|
|
|
1847
1883
|
.rounded-2xl {
|
|
1848
1884
|
border-radius: 1rem;
|
|
1849
1885
|
}
|
|
1886
|
+
.rounded-3xl {
|
|
1887
|
+
border-radius: 1.5rem;
|
|
1888
|
+
}
|
|
1850
1889
|
.rounded-full {
|
|
1851
1890
|
border-radius: 9999px;
|
|
1852
1891
|
}
|
|
@@ -1922,6 +1961,10 @@ video {
|
|
|
1922
1961
|
.border-none {
|
|
1923
1962
|
border-style: none;
|
|
1924
1963
|
}
|
|
1964
|
+
.border-\[\#e3e3e3\] {
|
|
1965
|
+
--tw-border-opacity: 1;
|
|
1966
|
+
border-color: rgba(227, 227, 227, var(--tw-border-opacity));
|
|
1967
|
+
}
|
|
1925
1968
|
.border-brandnavigation-border-color {
|
|
1926
1969
|
border-color: #005293;
|
|
1927
1970
|
border-color: var(--color-brandnavigation-border-color);
|
|
@@ -1999,6 +2042,17 @@ video {
|
|
|
1999
2042
|
--tw-bg-opacity: 1 !important;
|
|
2000
2043
|
background-color: rgba(255, 255, 255, var(--tw-bg-opacity)) !important;
|
|
2001
2044
|
}
|
|
2045
|
+
.bg-\[\#d8e9f6\] {
|
|
2046
|
+
--tw-bg-opacity: 1;
|
|
2047
|
+
background-color: rgba(216, 233, 246, var(--tw-bg-opacity));
|
|
2048
|
+
}
|
|
2049
|
+
.bg-\[\#e3e3e3\] {
|
|
2050
|
+
--tw-bg-opacity: 1;
|
|
2051
|
+
background-color: rgba(227, 227, 227, var(--tw-bg-opacity));
|
|
2052
|
+
}
|
|
2053
|
+
.bg-black\/\[0\.5\] {
|
|
2054
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
2055
|
+
}
|
|
2002
2056
|
.bg-blue-200 {
|
|
2003
2057
|
--tw-bg-opacity: 1;
|
|
2004
2058
|
background-color: rgba(191, 219, 254, var(--tw-bg-opacity));
|
|
@@ -2151,6 +2205,10 @@ video {
|
|
|
2151
2205
|
background-color: #d34600;
|
|
2152
2206
|
background-color: var(--color-ticker-teaser-timeline-score);
|
|
2153
2207
|
}
|
|
2208
|
+
.bg-toggle-default {
|
|
2209
|
+
background-color: #797979;
|
|
2210
|
+
background-color: var(--color-toggle-default);
|
|
2211
|
+
}
|
|
2154
2212
|
.bg-top-topic-background {
|
|
2155
2213
|
background-color: #d3e2f4;
|
|
2156
2214
|
background-color: var(--color-top-topic-background);
|
|
@@ -2246,6 +2304,9 @@ video {
|
|
|
2246
2304
|
.p-5 {
|
|
2247
2305
|
padding: 1.25rem;
|
|
2248
2306
|
}
|
|
2307
|
+
.p-6 {
|
|
2308
|
+
padding: 1.5rem;
|
|
2309
|
+
}
|
|
2249
2310
|
.p-8 {
|
|
2250
2311
|
padding: 2rem;
|
|
2251
2312
|
}
|
|
@@ -2289,6 +2350,10 @@ video {
|
|
|
2289
2350
|
padding-left: 1.25rem;
|
|
2290
2351
|
padding-right: 1.25rem;
|
|
2291
2352
|
}
|
|
2353
|
+
.px-6 {
|
|
2354
|
+
padding-left: 1.5rem;
|
|
2355
|
+
padding-right: 1.5rem;
|
|
2356
|
+
}
|
|
2292
2357
|
.px-8 {
|
|
2293
2358
|
padding-left: 2rem;
|
|
2294
2359
|
padding-right: 2rem;
|
|
@@ -2945,7 +3010,7 @@ video {
|
|
|
2945
3010
|
border-bottom-color: var(--color-secondary-ds);
|
|
2946
3011
|
}
|
|
2947
3012
|
.counter-reset {
|
|
2948
|
-
counter-reset:
|
|
3013
|
+
counter-reset: cnt1690899159191;
|
|
2949
3014
|
}
|
|
2950
3015
|
.hyphens-auto {
|
|
2951
3016
|
-webkit-hyphens: auto;
|
|
@@ -3180,7 +3245,7 @@ video {
|
|
|
3180
3245
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
3181
3246
|
}
|
|
3182
3247
|
.-ordered {
|
|
3183
|
-
counter-increment:
|
|
3248
|
+
counter-increment: cnt1690899159191 1;
|
|
3184
3249
|
}
|
|
3185
3250
|
.-ordered::before {
|
|
3186
3251
|
position: absolute;
|
|
@@ -3196,7 +3261,32 @@ video {
|
|
|
3196
3261
|
letter-spacing: .0125em;
|
|
3197
3262
|
--tw-text-opacity: 1;
|
|
3198
3263
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
3199
|
-
content: counter(
|
|
3264
|
+
content: counter(cnt1690899159191);
|
|
3265
|
+
}
|
|
3266
|
+
/*! ****************************/
|
|
3267
|
+
/*! DataPolicy stuff */
|
|
3268
|
+
/*! ****************************/
|
|
3269
|
+
.toggleSwitch-checkbox:checked+.toggleSwitch-label::after {
|
|
3270
|
+
left: 27px;
|
|
3271
|
+
}
|
|
3272
|
+
.toggleSwitch-checkbox:checked+.toggleSwitch-label {
|
|
3273
|
+
background-color: #2c7e13;
|
|
3274
|
+
background-color: var(--color-toggle-confirmation);
|
|
3275
|
+
}
|
|
3276
|
+
.toggleSwitch-label::after {
|
|
3277
|
+
position: absolute;
|
|
3278
|
+
top: 2px;
|
|
3279
|
+
left: 2px;
|
|
3280
|
+
height: 21px;
|
|
3281
|
+
width: 21px;
|
|
3282
|
+
border-radius: 1rem;
|
|
3283
|
+
--tw-bg-opacity: 1;
|
|
3284
|
+
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
|
|
3285
|
+
transition-property: all;
|
|
3286
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
3287
|
+
transition-duration: 300ms;
|
|
3288
|
+
--tw-content: '';
|
|
3289
|
+
content: var(--tw-content);
|
|
3200
3290
|
}
|
|
3201
3291
|
/*! ****************************/
|
|
3202
3292
|
/*! text-shadow */
|
|
@@ -3391,6 +3481,8 @@ video {
|
|
|
3391
3481
|
--search-border-color-desktop: transparent;
|
|
3392
3482
|
--search-border-color-mobile: var(--color-primary-ds);
|
|
3393
3483
|
--color-ticker-teaser-headline-underline : #ffffff;
|
|
3484
|
+
--color-toggle-confirmation: #2c7e13;
|
|
3485
|
+
--color-toggle-default: #797979;
|
|
3394
3486
|
}
|
|
3395
3487
|
[data-theme='hessenschau'] {
|
|
3396
3488
|
--color-primary-ds: #005293;
|
|
@@ -4534,6 +4626,11 @@ video {
|
|
|
4534
4626
|
.empty\:hidden:empty {
|
|
4535
4627
|
display: none;
|
|
4536
4628
|
}
|
|
4629
|
+
.hover\:scale-105:hover {
|
|
4630
|
+
--tw-scale-x: 1.05;
|
|
4631
|
+
--tw-scale-y: 1.05;
|
|
4632
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
4633
|
+
}
|
|
4537
4634
|
.hover\:border-button:hover {
|
|
4538
4635
|
border-color: var(--color-button);
|
|
4539
4636
|
}
|
|
@@ -4572,6 +4669,10 @@ video {
|
|
|
4572
4669
|
.hover\:text-button--dark:hover {
|
|
4573
4670
|
color: var(--color-button--dark);
|
|
4574
4671
|
}
|
|
4672
|
+
.hover\:text-secondary:hover {
|
|
4673
|
+
color: #606060;
|
|
4674
|
+
color: var(--color-secondary-ds);
|
|
4675
|
+
}
|
|
4575
4676
|
.hover\:text-toplineColor:hover {
|
|
4576
4677
|
color: #006dc1;
|
|
4577
4678
|
color: var(--color-topline);
|
|
@@ -5379,12 +5480,21 @@ video {
|
|
|
5379
5480
|
background-color: transparent;
|
|
5380
5481
|
}
|
|
5381
5482
|
|
|
5483
|
+
.md\:bg-white {
|
|
5484
|
+
--tw-bg-opacity: 1;
|
|
5485
|
+
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5382
5488
|
.md\:from-white {
|
|
5383
5489
|
--tw-gradient-from: #ffffff var(--tw-gradient-from-position);
|
|
5384
5490
|
--tw-gradient-to: rgba(255, 255, 255, 0) var(--tw-gradient-to-position);
|
|
5385
5491
|
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
5386
5492
|
}
|
|
5387
5493
|
|
|
5494
|
+
.md\:fill-current {
|
|
5495
|
+
fill: currentColor;
|
|
5496
|
+
}
|
|
5497
|
+
|
|
5388
5498
|
.md\:p-10 {
|
|
5389
5499
|
padding: 2.5rem;
|
|
5390
5500
|
}
|
|
@@ -5499,6 +5609,11 @@ video {
|
|
|
5499
5609
|
line-height: 1rem;
|
|
5500
5610
|
}
|
|
5501
5611
|
|
|
5612
|
+
.md\:text-secondary {
|
|
5613
|
+
color: #606060;
|
|
5614
|
+
color: var(--color-secondary-ds);
|
|
5615
|
+
}
|
|
5616
|
+
|
|
5502
5617
|
.md\:decoration-2 {
|
|
5503
5618
|
text-decoration-thickness: 2px;
|
|
5504
5619
|
}
|
|
@@ -5937,10 +6052,6 @@ video {
|
|
|
5937
6052
|
background-color: rgba(255, 255, 255, var(--tw-bg-opacity));
|
|
5938
6053
|
}
|
|
5939
6054
|
|
|
5940
|
-
.lg\:fill-current {
|
|
5941
|
-
fill: currentColor;
|
|
5942
|
-
}
|
|
5943
|
-
|
|
5944
6055
|
.lg\:p-0 {
|
|
5945
6056
|
padding: 0px;
|
|
5946
6057
|
}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import DatapolicyCookie from 'components/externalService/datapolicyCookie.subfeature'
|
|
2
|
+
import TrackingCookie from 'components/externalService/trackingCookie.subfeature'
|
|
3
|
+
import { fireEvent, getJSONCookie, hr$, setJSONCookie, listen } from 'hrQuery'
|
|
4
|
+
import { uxAction } from 'base/tracking/atiHelper.subfeature'
|
|
5
|
+
|
|
6
|
+
const DataPolicySettings = function (context) {
|
|
7
|
+
const { options } = context,
|
|
8
|
+
{ element: rootElement } = context,
|
|
9
|
+
settingsButtons = hr$('.js-data-policy-settings-button', document),
|
|
10
|
+
overlay = hr$('.js-data-policy-settings-overlay', rootElement)[0],
|
|
11
|
+
closeButton = hr$('.js-data-policy-settings-close-button', rootElement)[0],
|
|
12
|
+
bodyElement = document.getElementsByTagName('html')[0],
|
|
13
|
+
datapolicyCookie = new DatapolicyCookie(),
|
|
14
|
+
trackingCookie = new TrackingCookie(),
|
|
15
|
+
toggleSwitches = hr$('.js-toggleSwitch-checkbox', rootElement),
|
|
16
|
+
toggleSwitchesExternal = hr$('.js-toggleSwitch-external', rootElement),
|
|
17
|
+
toggleSwitchesTracking = hr$('.js-toggleSwitch-tracking', rootElement),
|
|
18
|
+
toggleAllSwitch = hr$('.js-toggleSwitch-checkbox-all', rootElement)[0],
|
|
19
|
+
providerTitle = hr$('.js-providerTitle', rootElement)[0],
|
|
20
|
+
trackingCookieLifetime = 1000 * 60 * 60 * 24 * 365 * 10
|
|
21
|
+
let atiSecondLevelId = window.xtn2,
|
|
22
|
+
isWebview = window.parent.document.documentElement.classList.contains('webview'),
|
|
23
|
+
//isWebview = window.location.href.match(/(app)(\.[a-zA-Z]*)(\.de)/i), //App URL ...app.hr.de
|
|
24
|
+
//isWebview = window.location.href.match(/(app)/i), //App URL ...app.hr.de
|
|
25
|
+
cookie = {}
|
|
26
|
+
|
|
27
|
+
console.log("gelaaaadeeeeeeeen")
|
|
28
|
+
///////////////////
|
|
29
|
+
// OVERLAY START //
|
|
30
|
+
///////////////////
|
|
31
|
+
const showSettingsButton = function () {
|
|
32
|
+
let settingsButton = document.getElementById('globalSettingsButton')
|
|
33
|
+
if (isWebview) {
|
|
34
|
+
console.log('Button Anzeige steuern')
|
|
35
|
+
readAppSettingsButtonCookie()
|
|
36
|
+
console.log(cookie['hidePrivacySettingsButton'])
|
|
37
|
+
if (cookie['hidePrivacySettingsButton'] === true) {
|
|
38
|
+
settingsButton.style.display = 'none'
|
|
39
|
+
} else {
|
|
40
|
+
settingsButton.style.display = 'inline-flex'
|
|
41
|
+
}
|
|
42
|
+
} else {
|
|
43
|
+
settingsButton.style.display = 'inline-flex'
|
|
44
|
+
console.log('Button immer anzeigen, weil nicht App')
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const readAppSettingsButtonCookie = function () {
|
|
48
|
+
cookie = getJSONCookie('appSettings') || {}
|
|
49
|
+
}
|
|
50
|
+
const writeAppSettingsButtonCookie = function () {
|
|
51
|
+
cookie = 'true'
|
|
52
|
+
setJSONCookie('hsAppSettingsButton', cookie, trackingCookieLifetime)
|
|
53
|
+
}
|
|
54
|
+
const initializeSettingsButtons = function () {
|
|
55
|
+
for (let i = 0; i < settingsButtons.length; ++i) {
|
|
56
|
+
if (settingsButtons.length - i == 1) {
|
|
57
|
+
listen(
|
|
58
|
+
'click',
|
|
59
|
+
function () {
|
|
60
|
+
openDialog('Footer')
|
|
61
|
+
atiSecondLevelId = 1
|
|
62
|
+
},
|
|
63
|
+
settingsButtons[i]
|
|
64
|
+
)
|
|
65
|
+
} else {
|
|
66
|
+
if (!settingsButtons[i].getAttribute('listener')) {
|
|
67
|
+
listen(
|
|
68
|
+
'click',
|
|
69
|
+
function () {
|
|
70
|
+
openDialog('DSGVO-Overlay')
|
|
71
|
+
},
|
|
72
|
+
settingsButtons[i]
|
|
73
|
+
)
|
|
74
|
+
settingsButtons[i].setAttribute('listener', 'true')
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const openDialog = function (settingsButtonLocation) {
|
|
80
|
+
overlay.classList.add('!flex')
|
|
81
|
+
bodyElement.classList.add('optionOpen')
|
|
82
|
+
uxAction('Einstellungsdialog geöffnet - ' + settingsButtonLocation, atiSecondLevelId)
|
|
83
|
+
}
|
|
84
|
+
const closeDialogeOnOverlay = function (e) {
|
|
85
|
+
if (e.target !== this) return
|
|
86
|
+
closeDialog()
|
|
87
|
+
}
|
|
88
|
+
const closeDialog = function () {
|
|
89
|
+
overlay.classList.remove('!flex')
|
|
90
|
+
bodyElement.classList.remove('optionOpen')
|
|
91
|
+
}
|
|
92
|
+
const shouldDialogBeOpendOnLoad = function () {
|
|
93
|
+
const urlParam = getUrlVars()['openDialog']
|
|
94
|
+
if (typeof urlParam !== 'undefined' && urlParam === 'true') {
|
|
95
|
+
openDialog('Datenschutzerklärung')
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
const getUrlVars = function () {
|
|
99
|
+
let vars = {}
|
|
100
|
+
const parts = window.location.href.replace(
|
|
101
|
+
/[?&]+([^=&]+)=([^&]*)/gi,
|
|
102
|
+
function (m, key, value) {
|
|
103
|
+
vars[key] = value
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
return vars
|
|
107
|
+
}
|
|
108
|
+
///////////////////
|
|
109
|
+
// OVERLAY END ////
|
|
110
|
+
///////////////////
|
|
111
|
+
|
|
112
|
+
/////////////////////
|
|
113
|
+
// TOGGLES START ////
|
|
114
|
+
/////////////////////
|
|
115
|
+
|
|
116
|
+
const initializeToggleStateExternal = function () {
|
|
117
|
+
for (let i = 0; i < toggleSwitchesExternal.length; ++i) {
|
|
118
|
+
initializeEventListenerForService(i)
|
|
119
|
+
|
|
120
|
+
setListenerForService(toggleSwitchesExternal[i])
|
|
121
|
+
|
|
122
|
+
if (isCookieSetForService(toggleSwitchesExternal[i].id)) {
|
|
123
|
+
toggleSwitchesExternal[i].checked = true
|
|
124
|
+
} else if (
|
|
125
|
+
!isCookieExistForService(toggleSwitchesExternal[i].id) &&
|
|
126
|
+
toggleSwitchesExternal[i].getAttribute('initial') == 'checked'
|
|
127
|
+
) {
|
|
128
|
+
toggleSwitchesExternal[i].checked = true
|
|
129
|
+
setCookieForService(toggleSwitchesExternal[i])
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
toggleAllSwitch.checked = allTogglesChecked()
|
|
134
|
+
changeProviderTitle()
|
|
135
|
+
}
|
|
136
|
+
const initializeToggleStateTracking = function () {
|
|
137
|
+
for (let i = 0; i < toggleSwitchesTracking.length; ++i) {
|
|
138
|
+
initializeEventListenerForTracking(i)
|
|
139
|
+
|
|
140
|
+
setListenerForTracking(toggleSwitchesTracking[i])
|
|
141
|
+
|
|
142
|
+
if (isCookieSetForTracking(toggleSwitchesTracking[i].id)) {
|
|
143
|
+
toggleSwitchesTracking[i].checked = true
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (
|
|
147
|
+
!isCookieExistForTracking(toggleSwitchesTracking[i].id) &&
|
|
148
|
+
toggleSwitchesTracking[i].getAttribute('initial') == 'checked'
|
|
149
|
+
) {
|
|
150
|
+
toggleSwitchesTracking[i].checked = true
|
|
151
|
+
setCookieForTracking(toggleSwitchesTracking[i])
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
const initializeEventListenerForService = function (serviceId) {
|
|
156
|
+
listen(
|
|
157
|
+
'hr:externalService-activate-' + toggleSwitchesExternal[serviceId].id,
|
|
158
|
+
function () {
|
|
159
|
+
toggleSwitchesExternal[serviceId].checked = true
|
|
160
|
+
},
|
|
161
|
+
document
|
|
162
|
+
)
|
|
163
|
+
}
|
|
164
|
+
const initializeEventListenerForTracking = function (serviceId) {
|
|
165
|
+
listen(
|
|
166
|
+
'hr:trackingService-activate-' + toggleSwitchesTracking[serviceId].id,
|
|
167
|
+
function () {
|
|
168
|
+
toggleSwitchesTracking[serviceId].checked = true
|
|
169
|
+
},
|
|
170
|
+
document
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
const setListenerForService = function (element) {
|
|
174
|
+
listen(
|
|
175
|
+
'change',
|
|
176
|
+
function () {
|
|
177
|
+
setCookieForService(element)
|
|
178
|
+
toggleAllSwitch.checked = allTogglesChecked()
|
|
179
|
+
changeProviderTitle()
|
|
180
|
+
},
|
|
181
|
+
element
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
const setListenerForTracking = function (element) {
|
|
185
|
+
listen(
|
|
186
|
+
'change',
|
|
187
|
+
function () {
|
|
188
|
+
setCookieForTracking(element)
|
|
189
|
+
},
|
|
190
|
+
element
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
const setCookieForService = function (element) {
|
|
194
|
+
datapolicyCookie.setCookieForExternalService(element.id, element.checked)
|
|
195
|
+
if (element.checked) {
|
|
196
|
+
fireEvent('hr:externalService-activate-' + element.id)
|
|
197
|
+
} else {
|
|
198
|
+
console.log('fireEvent: hr:externalService-deactivate-' + element.id)
|
|
199
|
+
fireEvent('hr:externalService-deactivate-' + element.id)
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
const setCookieForTracking = function (element) {
|
|
203
|
+
trackingCookie.setCookieForTracking(element.id, element.checked)
|
|
204
|
+
if (element.checked) {
|
|
205
|
+
fireEvent('hr:trackingService-activate-' + element.id)
|
|
206
|
+
} else {
|
|
207
|
+
fireEvent('hr:trackingService-deactivate-' + element.id)
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const toggleAll = function () {
|
|
211
|
+
console.log('Toggle All' + toggleAllSwitch.checked)
|
|
212
|
+
|
|
213
|
+
for (let i = 0; i < toggleSwitchesExternal.length; ++i) {
|
|
214
|
+
if (toggleSwitchesExternal[i].checked != toggleAllSwitch.checked) {
|
|
215
|
+
toggleSwitchesExternal[i].checked = toggleAllSwitch.checked
|
|
216
|
+
setCookieForService(toggleSwitchesExternal[i])
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
changeProviderTitle()
|
|
221
|
+
}
|
|
222
|
+
const allTogglesChecked = function () {
|
|
223
|
+
let allChecked
|
|
224
|
+
|
|
225
|
+
for (let i = 0; i < toggleSwitchesExternal.length; ++i) {
|
|
226
|
+
if (toggleSwitchesExternal[i].checked) {
|
|
227
|
+
allChecked = true
|
|
228
|
+
} else {
|
|
229
|
+
allChecked = false
|
|
230
|
+
|
|
231
|
+
break
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return allChecked
|
|
235
|
+
}
|
|
236
|
+
const changeProviderTitle = function () {
|
|
237
|
+
if (toggleAllSwitch.checked == true) {
|
|
238
|
+
providerTitle.textContent = 'Alle Anbieter deaktivieren'
|
|
239
|
+
} else {
|
|
240
|
+
providerTitle.textContent = 'Alle Anbieter aktivieren'
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
const isCookieSetForService = function (externalService) {
|
|
244
|
+
return datapolicyCookie.isDatapolicyAccepted(externalService)
|
|
245
|
+
}
|
|
246
|
+
const isCookieSetForTracking = function (trackingService) {
|
|
247
|
+
return trackingCookie.isTrackingAccepted(trackingService)
|
|
248
|
+
}
|
|
249
|
+
const isCookieExistForService = function (externalService) {
|
|
250
|
+
return datapolicyCookie.isDatapolicyExistent(externalService)
|
|
251
|
+
}
|
|
252
|
+
const isCookieExistForTracking = function (trackingService) {
|
|
253
|
+
return trackingCookie.isTrackingCookieExistent(trackingService)
|
|
254
|
+
}
|
|
255
|
+
const initializeEventListeners = function () {
|
|
256
|
+
listen('hr:settingsButtonInsideDataPolicyBoxClicked', function () {
|
|
257
|
+
openDialog('DSGVO-Overlay')
|
|
258
|
+
})
|
|
259
|
+
listen('change', toggleAll, toggleAllSwitch)
|
|
260
|
+
listen('click', closeDialog, closeButton)
|
|
261
|
+
listen('click', closeDialogeOnOverlay, overlay)
|
|
262
|
+
}
|
|
263
|
+
// steuert die Darstellung des Buttons für die hs-App ///
|
|
264
|
+
showSettingsButton()
|
|
265
|
+
//// 1. Alle Settings Buttons initialisieren ////
|
|
266
|
+
initializeSettingsButtons()
|
|
267
|
+
|
|
268
|
+
//// 2. Toggle States aller Switches setzen ////
|
|
269
|
+
//// Cookies setzen usw. ////
|
|
270
|
+
initializeToggleStateExternal()
|
|
271
|
+
|
|
272
|
+
initializeToggleStateTracking()
|
|
273
|
+
|
|
274
|
+
//// 3. Event Listener initialisieren ////
|
|
275
|
+
initializeEventListeners()
|
|
276
|
+
|
|
277
|
+
shouldDialogBeOpendOnLoad()
|
|
278
|
+
|
|
279
|
+
//// 4. Funktion extern aufrufbar machen ////
|
|
280
|
+
return {
|
|
281
|
+
initializeSettingsButtons: initializeSettingsButtons,
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export default DataPolicySettings
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getJSONCookie, setJSONCookie } from 'hrQuery'
|
|
2
|
+
|
|
3
|
+
const DataPolicyCookie = function () {
|
|
4
|
+
const datapolicyCookieLifetime = 1000 * 60 * 60 * 24 * 365 * 10 /* 10 years */
|
|
5
|
+
let cookie = {}
|
|
6
|
+
|
|
7
|
+
const setCookieForExternalService = function (externalService, state) {
|
|
8
|
+
if (state == null) {
|
|
9
|
+
state = true
|
|
10
|
+
}
|
|
11
|
+
console.log('Schreibe Cookie: ' + externalService + ': ' + state)
|
|
12
|
+
readDatapolicyCookie()
|
|
13
|
+
cookie[externalService] = state
|
|
14
|
+
writeCookie()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const isDatapolicyAccepted = function (externalService) {
|
|
18
|
+
readDatapolicyCookie()
|
|
19
|
+
return cookie[externalService] === true
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const writeCookie = function () {
|
|
23
|
+
setJSONCookie('datapolicy', cookie, datapolicyCookieLifetime)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const readDatapolicyCookie = function () {
|
|
27
|
+
cookie = getJSONCookie('datapolicy') || {}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const isDatapolicyExistent = function (externalService) {
|
|
31
|
+
readDatapolicyCookie()
|
|
32
|
+
return cookie.hasOwnProperty(externalService)
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
setCookieForExternalService: setCookieForExternalService,
|
|
36
|
+
isDatapolicyAccepted: isDatapolicyAccepted,
|
|
37
|
+
isDatapolicyExistent: isDatapolicyExistent,
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default DataPolicyCookie
|