hr-design-system-handlebars 1.114.130 → 1.114.132
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 +26 -0
- package/dist/assets/index.css +6 -12
- package/dist/assets/js/components/social_sharing/socialSharingHandler.alpine.js +71 -21
- package/dist/views/components/social_sharing/social_sharing_horizontal.hbs +1 -1
- package/dist/views/components/social_sharing/social_sharing_mobile.hbs +1 -0
- package/dist/views/components/social_sharing/social_sharing_ticker_item.hbs +2 -1
- package/dist/views/components/teaser/ticker/teaser_ticker_timeline.hbs +19 -16
- package/dist/views_static/components/social_sharing/social_sharing_horizontal.hbs +1 -1
- package/dist/views_static/components/social_sharing/social_sharing_mobile.hbs +1 -0
- package/dist/views_static/components/social_sharing/social_sharing_ticker_item.hbs +2 -1
- package/dist/views_static/components/teaser/ticker/teaser_ticker_timeline.hbs +19 -16
- package/package.json +1 -1
- package/src/stories/views/components/social_sharing/socialSharingHandler.alpine.js +71 -21
- package/src/stories/views/components/social_sharing/social_sharing_horizontal.hbs +1 -1
- package/src/stories/views/components/social_sharing/social_sharing_mobile.hbs +1 -0
- package/src/stories/views/components/social_sharing/social_sharing_ticker_item.hbs +2 -1
- package/src/stories/views/components/teaser/ticker/teaser_ticker_timeline.hbs +19 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# v1.114.132 (Mon Mar 24 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Enhance social sharing functionality with browser detection and impro… [#1273](https://github.com/mumprod/hr-design-system-handlebars/pull/1273) ([@vascoeduardo](https://github.com/vascoeduardo) [@eduardo-hr](https://github.com/eduardo-hr))
|
|
6
|
+
|
|
7
|
+
#### Authors: 2
|
|
8
|
+
|
|
9
|
+
- [@eduardo-hr](https://github.com/eduardo-hr)
|
|
10
|
+
- Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# v1.114.131 (Thu Mar 20 2025)
|
|
15
|
+
|
|
16
|
+
#### 🐛 Bug Fix
|
|
17
|
+
|
|
18
|
+
- Refactor ticker timeline component for improved layout and user conse… [#1272](https://github.com/mumprod/hr-design-system-handlebars/pull/1272) ([@vascoeduardo](https://github.com/vascoeduardo) [@eduardo-hr](https://github.com/eduardo-hr))
|
|
19
|
+
|
|
20
|
+
#### Authors: 2
|
|
21
|
+
|
|
22
|
+
- [@eduardo-hr](https://github.com/eduardo-hr)
|
|
23
|
+
- Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
1
27
|
# v1.114.130 (Thu Mar 20 2025)
|
|
2
28
|
|
|
3
29
|
#### 🐛 Bug Fix
|
package/dist/assets/index.css
CHANGED
|
@@ -1148,9 +1148,6 @@ article #commentList {
|
|
|
1148
1148
|
bottom: 0px;
|
|
1149
1149
|
left: 0px;
|
|
1150
1150
|
}
|
|
1151
|
-
.-left-4 {
|
|
1152
|
-
left: -1rem;
|
|
1153
|
-
}
|
|
1154
1151
|
.-left-5 {
|
|
1155
1152
|
left: -1.25rem;
|
|
1156
1153
|
}
|
|
@@ -1173,6 +1170,9 @@ article #commentList {
|
|
|
1173
1170
|
.left-0 {
|
|
1174
1171
|
left: 0px;
|
|
1175
1172
|
}
|
|
1173
|
+
.left-1 {
|
|
1174
|
+
left: 0.25rem;
|
|
1175
|
+
}
|
|
1176
1176
|
.left-1\/2 {
|
|
1177
1177
|
left: 50%;
|
|
1178
1178
|
}
|
|
@@ -3336,9 +3336,6 @@ article #commentList {
|
|
|
3336
3336
|
font-size: 2.125rem;
|
|
3337
3337
|
line-height: 2.375rem;
|
|
3338
3338
|
}
|
|
3339
|
-
.text-\[15px\] {
|
|
3340
|
-
font-size: 15px;
|
|
3341
|
-
}
|
|
3342
3339
|
.text-base {
|
|
3343
3340
|
font-size: 1rem;
|
|
3344
3341
|
line-height: 1.375rem;
|
|
@@ -3415,9 +3412,6 @@ article #commentList {
|
|
|
3415
3412
|
.leading-\[1\.625rem\] {
|
|
3416
3413
|
line-height: 1.625rem;
|
|
3417
3414
|
}
|
|
3418
|
-
.leading-\[18px\] {
|
|
3419
|
-
line-height: 18px;
|
|
3420
|
-
}
|
|
3421
3415
|
.leading-\[34px\] {
|
|
3422
3416
|
line-height: 34px;
|
|
3423
3417
|
}
|
|
@@ -3863,7 +3857,7 @@ article #commentList {
|
|
|
3863
3857
|
border-bottom-color: var(--color-secondary-ds);
|
|
3864
3858
|
}
|
|
3865
3859
|
.counter-reset {
|
|
3866
|
-
counter-reset:
|
|
3860
|
+
counter-reset: cnt1742821545333;
|
|
3867
3861
|
}
|
|
3868
3862
|
.animate-delay-100 {
|
|
3869
3863
|
--tw-animate-delay: 100ms;
|
|
@@ -4308,7 +4302,7 @@ html { scroll-behavior: smooth; }
|
|
|
4308
4302
|
--tw-ring-color: rgba(255, 255, 255, 0.5);
|
|
4309
4303
|
}
|
|
4310
4304
|
.-ordered {
|
|
4311
|
-
counter-increment:
|
|
4305
|
+
counter-increment: cnt1742821545333 1;
|
|
4312
4306
|
}
|
|
4313
4307
|
.-ordered::before {
|
|
4314
4308
|
position: absolute;
|
|
@@ -4326,7 +4320,7 @@ html { scroll-behavior: smooth; }
|
|
|
4326
4320
|
--tw-text-opacity: 1;
|
|
4327
4321
|
color: rgba(0, 0, 0, 1);
|
|
4328
4322
|
color: rgba(0, 0, 0, var(--tw-text-opacity));
|
|
4329
|
-
content: counter(
|
|
4323
|
+
content: counter(cnt1742821545333);
|
|
4330
4324
|
}
|
|
4331
4325
|
/*! ****************************/
|
|
4332
4326
|
/*! DataPolicy stuff */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { uxAction } from 'base/tracking/pianoHelper.subfeature'
|
|
2
|
+
import { fireEvent, getJSONCookie } from 'hrQuery'
|
|
2
3
|
|
|
3
4
|
export default (module) => ({
|
|
4
5
|
open: false,
|
|
@@ -7,31 +8,80 @@ export default (module) => ({
|
|
|
7
8
|
sharingModuleWasNeverShown: true,
|
|
8
9
|
desktopSharingModuleWasNeverShown: true,
|
|
9
10
|
copySuccess: false,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
cookie: {},
|
|
12
|
+
isMobileApple: false,
|
|
13
|
+
isMobileOther: false,
|
|
14
|
+
isMobile: false,
|
|
15
|
+
isWebview: false,
|
|
16
|
+
initBrowserDetection(){
|
|
17
|
+
console.log('Pre initBrowserDetection', this.isMobileApple,this.isMobileOther,this.isMobile,this.isWebview);
|
|
18
|
+
this.isMobileApple = /iP/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && navigator.maxTouchPoints > 4;
|
|
19
|
+
this.isMobileOther = /(Android|webOS|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
|
|
20
|
+
this.isMobile = this.isMobileApple || this.isMobileOther;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
this.isWebview = window.parent.document.documentElement.classList.contains('webview');
|
|
24
|
+
} catch (e) {
|
|
25
|
+
this.isWebview = false;
|
|
26
|
+
console.warn("Could not access window.parent.document due to cross-origin restrictions", e);
|
|
27
|
+
}
|
|
28
|
+
console.log('initBrowserDetection', this.isMobileApple,this.isMobileOther,this.isMobile,this.isWebview);
|
|
29
|
+
},
|
|
30
|
+
readAppVersionCookie() {
|
|
31
|
+
this.cookie = getJSONCookie('appSettings') || {}
|
|
32
|
+
},
|
|
33
|
+
nativeShare(title, url, uxActionValue) {
|
|
34
|
+
console.log("Native Share", title, url, uxActionValue);
|
|
35
|
+
navigator
|
|
36
|
+
.share({
|
|
37
|
+
title,
|
|
38
|
+
url,
|
|
20
39
|
})
|
|
21
|
-
.then(()
|
|
22
|
-
console.log('Shared successfully');
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
.then(function () {
|
|
41
|
+
console.log('Native Shared successfully');
|
|
42
|
+
if (uxActionValue) {
|
|
43
|
+
uxAction(uxActionValue);
|
|
44
|
+
}
|
|
45
|
+
console.log('tracked: '+ uxActionValue);
|
|
25
46
|
})
|
|
26
47
|
.catch((error) => console.error('Sharing failed:', error));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
},
|
|
49
|
+
shareInWebview(title, url) {
|
|
50
|
+
this.readAppVersionCookie();
|
|
51
|
+
if(this.isMobileApple){
|
|
52
|
+
console.log('apple mobile browser')
|
|
53
|
+
this.nativeShare(title, url, 'socialShareClick::webview::nativeShareApple');
|
|
54
|
+
} else if (this.isMobileOther) {
|
|
55
|
+
console.log('non-apple mobile browser')
|
|
56
|
+
/*Check Build Version of App*/
|
|
57
|
+
if (this.cookie['fireCustomJsShareEvent'] === true) {
|
|
58
|
+
/*Custom Event für App unter Android*/
|
|
59
|
+
fireEvent('hr:global:shareCompactClickAndroidApp', {
|
|
60
|
+
title: title,
|
|
61
|
+
url: url,
|
|
62
|
+
})
|
|
63
|
+
uxAction('socialShareClick::webview::nativeShareAndroid::customEvent');
|
|
64
|
+
console.log('Custom-Event für Android')
|
|
65
|
+
} else {
|
|
66
|
+
this.nativeShare(title, url, 'socialShareClick::webview::nativeShareAndroid::noCustomEventCookie');
|
|
30
67
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
toggle(title, url) {
|
|
71
|
+
if (this.isWebview) {
|
|
72
|
+
this.shareInWebview(title,url)
|
|
73
|
+
} else {
|
|
74
|
+
if (navigator.share && this.isMobile) {
|
|
75
|
+
this.nativeShare(document.title, window.location.href,'socialShareClick::'+module+'::nativeShare')
|
|
76
|
+
} else {
|
|
77
|
+
if (this.$store.sharingIsOpen[module]) {
|
|
78
|
+
return this.close(true)
|
|
79
|
+
}
|
|
80
|
+
this.$refs.button.focus()
|
|
81
|
+
this.$store.sharingIsOpen[module] = true
|
|
82
|
+
uxAction('socialShareClick::'+module+'::sharingIconOpen');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
35
85
|
},
|
|
36
86
|
close(trackClick) {
|
|
37
87
|
if (!this.$store.sharingIsOpen[module]) return
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
-
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
|
+
x-init="initBrowserDetection(); $watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
5
5
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
6
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
7
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
3
|
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
|
+
x-init="initBrowserDetection();"
|
|
4
5
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
6
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
7
|
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('tickerItem{{nextRandom}}')"
|
|
4
4
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
5
|
+
x-init="initBrowserDetection();"
|
|
5
6
|
x-on:resize.window="$store.sharingIsOpen.ticker = false"
|
|
6
7
|
x-on:keydown.escape.prevent.stop="close()"
|
|
7
8
|
@click.outside="close()"
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
<button
|
|
14
15
|
class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
|
|
15
16
|
x-ref="button"
|
|
16
|
-
x-on:click="toggle()"
|
|
17
|
+
x-on:click="toggle('{{../this.escapedTitle}}','{{../this.socialSharingUrl}}')"
|
|
17
18
|
:aria-expanded="open"
|
|
18
19
|
:aria-controls="$id('dropdown-button')"
|
|
19
20
|
aria-label="{{loca "share_linktitle" }}"
|
|
@@ -6,31 +6,34 @@
|
|
|
6
6
|
{{else}}
|
|
7
7
|
<li class="relative h-auto [&:not(:last-child)]:pb-5">
|
|
8
8
|
{{/if}}
|
|
9
|
-
<div class="absolute h-full">
|
|
10
|
-
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore
|
|
9
|
+
<div class="absolute h-full -left-5 top-0.5">
|
|
10
|
+
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore "></div>
|
|
11
11
|
{{#unless @last}}
|
|
12
|
-
<div class="relative flex flex-col w-0 h-full timelineBorder
|
|
12
|
+
<div class="relative flex flex-col w-0 h-full timelineBorder left-1">
|
|
13
13
|
<div class="h-full my-2 border-l{{#if ../../_color}} border-{{../../_color}}{{else}} border-gray-boulder{{/if}}"></div>
|
|
14
14
|
<div class="h-2"></div>
|
|
15
15
|
</div>
|
|
16
16
|
{{/unless}}
|
|
17
17
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{{#if ../../../this.isOlderThanToday}}
|
|
18
|
+
|
|
19
|
+
<a class="font-headingSerif {{if (isUserConsentNeeded this.tickerItemUrl) 'js-user-consent-needed ' ''}}link-focus-white {{#if ../../_isTickerpage}}text-sm{{else}}text-base{{/if}} js-load {{#if ../../_color}} text-{{../../_color}}{{else}} text-link dark:text-link-dark{{/if}} ds-link{{#if this.hideDateTime}} align-top{{/if}}" href="{{this.tickerItemUrl}}" data-hr-click-tracking='{"settings": [{"type": "uxAction", "clickLabel": "TickerTeaser::{{../../this.sophoraId}}-TeaserPostLink geklickt"}]}'>
|
|
20
|
+
{{#unless this.hideDateTime}}
|
|
21
|
+
{{#with this.tickerItemDateTime~}}
|
|
22
|
+
<div class="font-headingSerif text-xs pb-0.5{{#if ../../../_color}} text-{{../../../_color}}{{else}} text-gray-scorpion dark:text-gray-mercury{{/if}}">
|
|
23
|
+
{{#if ../../../this.isMultiDay}}
|
|
25
24
|
{{this.broadcastDate }}
|
|
26
25
|
{{else}}
|
|
27
|
-
{{this.
|
|
26
|
+
{{#if ../../../this.isOlderThanToday}}
|
|
27
|
+
{{this.broadcastDate }}
|
|
28
|
+
{{else}}
|
|
29
|
+
{{this.time }}
|
|
30
|
+
{{/if}}
|
|
28
31
|
{{/if}}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{{
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
</div>
|
|
33
|
+
{{~/with}}
|
|
34
|
+
{{/unless}}
|
|
35
|
+
{{this.relevantTitle}}
|
|
36
|
+
</a>
|
|
34
37
|
</li>
|
|
35
38
|
{{~/each~}}
|
|
36
39
|
</ul>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
-
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
|
+
x-init="initBrowserDetection(); $watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
5
5
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
6
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
7
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
3
|
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
|
+
x-init="initBrowserDetection();"
|
|
4
5
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
6
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
7
|
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('tickerItem{{nextRandom}}')"
|
|
4
4
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
5
|
+
x-init="initBrowserDetection();"
|
|
5
6
|
x-on:resize.window="$store.sharingIsOpen.ticker = false"
|
|
6
7
|
x-on:keydown.escape.prevent.stop="close()"
|
|
7
8
|
@click.outside="close()"
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
<button
|
|
14
15
|
class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
|
|
15
16
|
x-ref="button"
|
|
16
|
-
x-on:click="toggle()"
|
|
17
|
+
x-on:click="toggle('{{../this.escapedTitle}}','{{../this.socialSharingUrl}}')"
|
|
17
18
|
:aria-expanded="open"
|
|
18
19
|
:aria-controls="$id('dropdown-button')"
|
|
19
20
|
aria-label="{{loca "share_linktitle" }}"
|
|
@@ -6,31 +6,34 @@
|
|
|
6
6
|
{{else}}
|
|
7
7
|
<li class="relative h-auto [&:not(:last-child)]:pb-5">
|
|
8
8
|
{{/if}}
|
|
9
|
-
<div class="absolute h-full">
|
|
10
|
-
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore
|
|
9
|
+
<div class="absolute h-full -left-5 top-0.5">
|
|
10
|
+
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore "></div>
|
|
11
11
|
{{#unless @last}}
|
|
12
|
-
<div class="relative flex flex-col w-0 h-full timelineBorder
|
|
12
|
+
<div class="relative flex flex-col w-0 h-full timelineBorder left-1">
|
|
13
13
|
<div class="h-full my-2 border-l{{#if ../../_color}} border-{{../../_color}}{{else}} border-gray-boulder{{/if}}"></div>
|
|
14
14
|
<div class="h-2"></div>
|
|
15
15
|
</div>
|
|
16
16
|
{{/unless}}
|
|
17
17
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{{#if ../../../this.isOlderThanToday}}
|
|
18
|
+
|
|
19
|
+
<a class="font-headingSerif {{if (isUserConsentNeeded this.tickerItemUrl) 'js-user-consent-needed ' ''}}link-focus-white {{#if ../../_isTickerpage}}text-sm{{else}}text-base{{/if}} js-load {{#if ../../_color}} text-{{../../_color}}{{else}} text-link dark:text-link-dark{{/if}} ds-link{{#if this.hideDateTime}} align-top{{/if}}" href="{{this.tickerItemUrl}}" data-hr-click-tracking='{"settings": [{"type": "uxAction", "clickLabel": "TickerTeaser::{{../../this.sophoraId}}-TeaserPostLink geklickt"}]}'>
|
|
20
|
+
{{#unless this.hideDateTime}}
|
|
21
|
+
{{#with this.tickerItemDateTime~}}
|
|
22
|
+
<div class="font-headingSerif text-xs pb-0.5{{#if ../../../_color}} text-{{../../../_color}}{{else}} text-gray-scorpion dark:text-gray-mercury{{/if}}">
|
|
23
|
+
{{#if ../../../this.isMultiDay}}
|
|
25
24
|
{{this.broadcastDate }}
|
|
26
25
|
{{else}}
|
|
27
|
-
{{this.
|
|
26
|
+
{{#if ../../../this.isOlderThanToday}}
|
|
27
|
+
{{this.broadcastDate }}
|
|
28
|
+
{{else}}
|
|
29
|
+
{{this.time }}
|
|
30
|
+
{{/if}}
|
|
28
31
|
{{/if}}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{{
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
</div>
|
|
33
|
+
{{~/with}}
|
|
34
|
+
{{/unless}}
|
|
35
|
+
{{this.relevantTitle}}
|
|
36
|
+
</a>
|
|
34
37
|
</li>
|
|
35
38
|
{{~/each~}}
|
|
36
39
|
</ul>
|
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.132",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "storybook dev -p 6006 public",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { uxAction } from 'base/tracking/pianoHelper.subfeature'
|
|
2
|
+
import { fireEvent, getJSONCookie } from 'hrQuery'
|
|
2
3
|
|
|
3
4
|
export default (module) => ({
|
|
4
5
|
open: false,
|
|
@@ -7,31 +8,80 @@ export default (module) => ({
|
|
|
7
8
|
sharingModuleWasNeverShown: true,
|
|
8
9
|
desktopSharingModuleWasNeverShown: true,
|
|
9
10
|
copySuccess: false,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
cookie: {},
|
|
12
|
+
isMobileApple: false,
|
|
13
|
+
isMobileOther: false,
|
|
14
|
+
isMobile: false,
|
|
15
|
+
isWebview: false,
|
|
16
|
+
initBrowserDetection(){
|
|
17
|
+
console.log('Pre initBrowserDetection', this.isMobileApple,this.isMobileOther,this.isMobile,this.isWebview);
|
|
18
|
+
this.isMobileApple = /iP/.test(navigator.userAgent) || /Mac/.test(navigator.userAgent) && navigator.maxTouchPoints > 4;
|
|
19
|
+
this.isMobileOther = /(Android|webOS|BlackBerry|Windows Phone)/i.test(navigator.userAgent);
|
|
20
|
+
this.isMobile = this.isMobileApple || this.isMobileOther;
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
this.isWebview = window.parent.document.documentElement.classList.contains('webview');
|
|
24
|
+
} catch (e) {
|
|
25
|
+
this.isWebview = false;
|
|
26
|
+
console.warn("Could not access window.parent.document due to cross-origin restrictions", e);
|
|
27
|
+
}
|
|
28
|
+
console.log('initBrowserDetection', this.isMobileApple,this.isMobileOther,this.isMobile,this.isWebview);
|
|
29
|
+
},
|
|
30
|
+
readAppVersionCookie() {
|
|
31
|
+
this.cookie = getJSONCookie('appSettings') || {}
|
|
32
|
+
},
|
|
33
|
+
nativeShare(title, url, uxActionValue) {
|
|
34
|
+
console.log("Native Share", title, url, uxActionValue);
|
|
35
|
+
navigator
|
|
36
|
+
.share({
|
|
37
|
+
title,
|
|
38
|
+
url,
|
|
20
39
|
})
|
|
21
|
-
.then(()
|
|
22
|
-
console.log('Shared successfully');
|
|
23
|
-
|
|
24
|
-
|
|
40
|
+
.then(function () {
|
|
41
|
+
console.log('Native Shared successfully');
|
|
42
|
+
if (uxActionValue) {
|
|
43
|
+
uxAction(uxActionValue);
|
|
44
|
+
}
|
|
45
|
+
console.log('tracked: '+ uxActionValue);
|
|
25
46
|
})
|
|
26
47
|
.catch((error) => console.error('Sharing failed:', error));
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
48
|
+
},
|
|
49
|
+
shareInWebview(title, url) {
|
|
50
|
+
this.readAppVersionCookie();
|
|
51
|
+
if(this.isMobileApple){
|
|
52
|
+
console.log('apple mobile browser')
|
|
53
|
+
this.nativeShare(title, url, 'socialShareClick::webview::nativeShareApple');
|
|
54
|
+
} else if (this.isMobileOther) {
|
|
55
|
+
console.log('non-apple mobile browser')
|
|
56
|
+
/*Check Build Version of App*/
|
|
57
|
+
if (this.cookie['fireCustomJsShareEvent'] === true) {
|
|
58
|
+
/*Custom Event für App unter Android*/
|
|
59
|
+
fireEvent('hr:global:shareCompactClickAndroidApp', {
|
|
60
|
+
title: title,
|
|
61
|
+
url: url,
|
|
62
|
+
})
|
|
63
|
+
uxAction('socialShareClick::webview::nativeShareAndroid::customEvent');
|
|
64
|
+
console.log('Custom-Event für Android')
|
|
65
|
+
} else {
|
|
66
|
+
this.nativeShare(title, url, 'socialShareClick::webview::nativeShareAndroid::noCustomEventCookie');
|
|
30
67
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
toggle(title, url) {
|
|
71
|
+
if (this.isWebview) {
|
|
72
|
+
this.shareInWebview(title,url)
|
|
73
|
+
} else {
|
|
74
|
+
if (navigator.share && this.isMobile) {
|
|
75
|
+
this.nativeShare(document.title, window.location.href,'socialShareClick::'+module+'::nativeShare')
|
|
76
|
+
} else {
|
|
77
|
+
if (this.$store.sharingIsOpen[module]) {
|
|
78
|
+
return this.close(true)
|
|
79
|
+
}
|
|
80
|
+
this.$refs.button.focus()
|
|
81
|
+
this.$store.sharingIsOpen[module] = true
|
|
82
|
+
uxAction('socialShareClick::'+module+'::sharingIconOpen');
|
|
83
|
+
}
|
|
84
|
+
}
|
|
35
85
|
},
|
|
36
86
|
close(trackClick) {
|
|
37
87
|
if (!this.$store.sharingIsOpen[module]) return
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{{~#with this.socialSharing ~}}
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('metadatabox')"
|
|
4
|
-
x-init="$watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
4
|
+
x-init="initBrowserDetection(); $watch('$store.sharingIsVisible', () => {$store.sharingIsOpen.metadatabox = false; $store.sharingIsOpen.mobilesticky = false})"
|
|
5
5
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
6
6
|
x-intersect:leave="$store.sharingIsVisible=false"
|
|
7
7
|
x-intersect:enter="$store.sharingIsVisible=true"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{{~#with this.socialSharing ~}}
|
|
3
3
|
<div x-data="socialSharingHandler('mobilesticky')"
|
|
4
|
+
x-init="initBrowserDetection();"
|
|
4
5
|
class=" relative ml-5 z-100 h-9.5 w-9.5"
|
|
5
6
|
:class="$store.footerIsVisible ? '-mt-6' : '-mt-12'"
|
|
6
7
|
x-on:resize.window="$store.sharingIsOpen.mobilesticky = false"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
x-data="socialSharingHandler('tickerItem{{nextRandom}}')"
|
|
4
4
|
class="flex self-center justify-end ml-3 print:hidden grow"
|
|
5
|
+
x-init="initBrowserDetection();"
|
|
5
6
|
x-on:resize.window="$store.sharingIsOpen.ticker = false"
|
|
6
7
|
x-on:keydown.escape.prevent.stop="close()"
|
|
7
8
|
@click.outside="close()"
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
<button
|
|
14
15
|
class="order-2 p-2 text-white border border-button bg-button ds-button font-heading hover:bg-button--dark hover:border-button--dark active:bg-button--dark group lg:hidden"
|
|
15
16
|
x-ref="button"
|
|
16
|
-
x-on:click="toggle()"
|
|
17
|
+
x-on:click="toggle('{{../this.escapedTitle}}','{{../this.socialSharingUrl}}')"
|
|
17
18
|
:aria-expanded="open"
|
|
18
19
|
:aria-controls="$id('dropdown-button')"
|
|
19
20
|
aria-label="{{loca "share_linktitle" }}"
|
|
@@ -6,31 +6,34 @@
|
|
|
6
6
|
{{else}}
|
|
7
7
|
<li class="relative h-auto [&:not(:last-child)]:pb-5">
|
|
8
8
|
{{/if}}
|
|
9
|
-
<div class="absolute h-full">
|
|
10
|
-
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore
|
|
9
|
+
<div class="absolute h-full -left-5 top-0.5">
|
|
10
|
+
<div class="relative w-[9px] h-[9px] rounded-full top-0.5 bg-tickerTeaserTimelineScore "></div>
|
|
11
11
|
{{#unless @last}}
|
|
12
|
-
<div class="relative flex flex-col w-0 h-full timelineBorder
|
|
12
|
+
<div class="relative flex flex-col w-0 h-full timelineBorder left-1">
|
|
13
13
|
<div class="h-full my-2 border-l{{#if ../../_color}} border-{{../../_color}}{{else}} border-gray-boulder{{/if}}"></div>
|
|
14
14
|
<div class="h-2"></div>
|
|
15
15
|
</div>
|
|
16
16
|
{{/unless}}
|
|
17
17
|
</div>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{{#if ../../../this.isOlderThanToday}}
|
|
18
|
+
|
|
19
|
+
<a class="font-headingSerif {{if (isUserConsentNeeded this.tickerItemUrl) 'js-user-consent-needed ' ''}}link-focus-white {{#if ../../_isTickerpage}}text-sm{{else}}text-base{{/if}} js-load {{#if ../../_color}} text-{{../../_color}}{{else}} text-link dark:text-link-dark{{/if}} ds-link{{#if this.hideDateTime}} align-top{{/if}}" href="{{this.tickerItemUrl}}" data-hr-click-tracking='{"settings": [{"type": "uxAction", "clickLabel": "TickerTeaser::{{../../this.sophoraId}}-TeaserPostLink geklickt"}]}'>
|
|
20
|
+
{{#unless this.hideDateTime}}
|
|
21
|
+
{{#with this.tickerItemDateTime~}}
|
|
22
|
+
<div class="font-headingSerif text-xs pb-0.5{{#if ../../../_color}} text-{{../../../_color}}{{else}} text-gray-scorpion dark:text-gray-mercury{{/if}}">
|
|
23
|
+
{{#if ../../../this.isMultiDay}}
|
|
25
24
|
{{this.broadcastDate }}
|
|
26
25
|
{{else}}
|
|
27
|
-
{{this.
|
|
26
|
+
{{#if ../../../this.isOlderThanToday}}
|
|
27
|
+
{{this.broadcastDate }}
|
|
28
|
+
{{else}}
|
|
29
|
+
{{this.time }}
|
|
30
|
+
{{/if}}
|
|
28
31
|
{{/if}}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{{
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
</div>
|
|
33
|
+
{{~/with}}
|
|
34
|
+
{{/unless}}
|
|
35
|
+
{{this.relevantTitle}}
|
|
36
|
+
</a>
|
|
34
37
|
</li>
|
|
35
38
|
{{~/each~}}
|
|
36
39
|
</ul>
|