hr-design-system-handlebars 1.94.0 → 1.95.1

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.
Files changed (69) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/assets/icons/icons/svgmap/print-ds.svg +5 -0
  3. package/dist/assets/icons/icons/svgmap.min.svg +1 -1
  4. package/dist/assets/index.css +3 -3
  5. package/dist/assets/js/components/mediaplayer/ardPlayerLoader.subfeature.js +35 -62
  6. package/dist/assets/js/components/mediaplayer/mediaplayerLoader.feature.js +2 -9
  7. package/dist/views/components/social_sharing/social_sharing_icons.hbs +14 -0
  8. package/dist/views_static/components/social_sharing/social_sharing_icons.hbs +14 -0
  9. package/package.json +1 -1
  10. package/src/assets/fixtures/audio/audios.inc.json +4 -0
  11. package/src/assets/fixtures/page/story/story_with_label.json +12 -0
  12. package/src/assets/fixtures/video/videos.inc.json +3 -0
  13. package/src/assets/icons/icons/svgmap/print-ds.svg +5 -0
  14. package/src/assets/icons/icons/svgmap.min.svg +1 -1
  15. package/src/stories/views/components/content/copytext/fixtures/copytext_audio.json +1 -1
  16. package/src/stories/views/components/content/copytext/fixtures/copytext_audio_livestream.json +1 -1
  17. package/src/stories/views/components/content/copytext/fixtures/copytext_image.json +1 -1
  18. package/src/stories/views/components/content/copytext/fixtures/copytext_livestream.json +1 -1
  19. package/src/stories/views/components/content/copytext/fixtures/copytext_media_components.json +1 -1
  20. package/src/stories/views/components/content/copytext/fixtures/copytext_non_media_components.json +1 -1
  21. package/src/stories/views/components/content/copytext/fixtures/copytext_podcastepisode.json +1 -1
  22. package/src/stories/views/components/content/copytext/fixtures/copytext_video.json +1 -1
  23. package/src/stories/views/components/mediaplayer/ardPlayerLoader.subfeature.js +35 -62
  24. package/src/stories/views/components/mediaplayer/fixtures/mediaplayer.json +1 -1
  25. package/src/stories/views/components/mediaplayer/mediaplayerLoader.feature.js +2 -9
  26. package/src/stories/views/components/page/fixtures/page.json +1 -1
  27. package/src/stories/views/components/page/podcast/fixtures/podcast_player_playlist.json +1 -1
  28. package/src/stories/views/components/page/story/fixtures/story.json +1 -1
  29. package/src/stories/views/components/page/story/fixtures/story_with_audio.json +1 -1
  30. package/src/stories/views/components/page/story/fixtures/story_with_label.json +1 -1
  31. package/src/stories/views/components/page/story/fixtures/story_with_livestream.json +1 -1
  32. package/src/stories/views/components/page/story/fixtures/story_with_square_image.json +1 -1
  33. package/src/stories/views/components/page/story/fixtures/story_with_video.json +1 -1
  34. package/src/stories/views/components/page/story/story_main.stories.js +1 -1
  35. package/src/stories/views/components/pagination/fixtures/page_pagination.json +1 -1
  36. package/src/stories/views/components/social_sharing/social_sharing_icons.hbs +14 -0
  37. package/src/stories/views/components/teaser/fixtures/cluster_teaser_Podcast_Channel.json +1 -1
  38. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif_audio.json +1 -1
  39. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif_live.json +1 -1
  40. package/src/stories/views/components/teaser/fixtures/teaser_alternative_100_serif_video.json +1 -1
  41. package/src/stories/views/components/teaser/fixtures/teaser_alternative_50_serif_audio.json +1 -1
  42. package/src/stories/views/components/teaser/fixtures/teaser_alternative_50_serif_live.json +1 -1
  43. package/src/stories/views/components/teaser/fixtures/teaser_alternative_50_serif_video.json +1 -1
  44. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_audio.json +1 -1
  45. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_live.json +1 -1
  46. package/src/stories/views/components/teaser/fixtures/teaser_alternative_hero_serif_video.json +1 -1
  47. package/src/stories/views/components/teaser/fixtures/teaser_group_100.json +1 -1
  48. package/src/stories/views/components/teaser/fixtures/teaser_group_100_highlight.json +1 -1
  49. package/src/stories/views/components/teaser/fixtures/teaser_group_100_highlight_2.json +1 -1
  50. package/src/stories/views/components/teaser/fixtures/teaser_group_related_content_100.json +1 -1
  51. package/src/stories/views/components/teaser/fixtures/teaser_index.json +1 -1
  52. package/src/stories/views/components/teaser/fixtures/teaser_podcast.json +1 -1
  53. package/src/stories/views/components/teaser/fixtures/teaser_podcast_50.json +1 -1
  54. package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist.json +1 -1
  55. package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist_50.json +1 -1
  56. package/src/stories/views/components/teaser/fixtures/teaser_podcast_playlist_filter.json +1 -1
  57. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_audio.json +1 -1
  58. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_audio_livestream.json +1 -1
  59. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_live.json +1 -1
  60. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_podcast.json +1 -1
  61. package/src/stories/views/components/teaser/fixtures/teaser_standard_25_serif_video.json +1 -1
  62. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_audio.json +1 -1
  63. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_audio_livestream.json +1 -1
  64. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_live.json +1 -1
  65. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_podcast.json +1 -1
  66. package/src/stories/views/components/teaser/fixtures/teaser_standard_50_serif_video.json +1 -1
  67. package/src/stories/views/components/teaser/fixtures/teaser_tabbox.json +1 -1
  68. package/src/stories/views/components/teaser/fixtures/ticker_teaser_alternativ_hero_audio.json +1 -1
  69. package/src/stories/views/components/teaser/fixtures/ticker_teaser_standard_hero_audio.json +1 -1
@@ -7,9 +7,8 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
7
7
 
8
8
  const skinPath = options.cssUrl,
9
9
  ardplayerUrl = options.jsUrl,
10
- smarttagUrl = options.atiSmarttagUrl,
11
- playerId = options.playerId,
12
- type = options.type,
10
+ playerId = isNaN(parseInt(options.playerId)) ? 0 : parseInt(options.playerId),
11
+ typeLabel = options.typeLabel,
13
12
  settingsCookie = new SettingsCookie(),
14
13
  isPlayerDebug = options.isPlayerDebug || false,
15
14
  playerLocation = trackingData.playerLocation || "Default",
@@ -52,20 +51,18 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
52
51
  }
53
52
 
54
53
  const createPlayer = function () {
55
- if (!settingsCookie.isSettingsCookieAccepted('ati')) {
56
- if (undefined != playerConfig.pluginData['trackingPiano@all'])
57
- playerConfig.pluginData['trackingPiano@all'].isEnabled = false
54
+ if (undefined != playerConfig.pluginData['trackingPiano@all']) {
55
+ playerConfig.pluginData['trackingPiano@all'].isEnabled = settingsCookie.isSettingsCookieAccepted('ati')
58
56
  }
59
- if (
60
- !settingsCookie.isSettingsCookieAccepted('agf') &&
61
- undefined != playerConfig.pluginData['trackingAgf@all']
62
- ) {
63
- playerConfig.pluginData['trackingAgf@all'].isEnabled = false
57
+ if (undefined != playerConfig.pluginData['trackingAgf@all']) {
58
+ playerConfig.pluginData['trackingAgf@all'].isEnabled = settingsCookie.isSettingsCookieAccepted('agf')
64
59
  }
65
60
  whenAvailable('ardplayer', function () {
66
- player = new ardplayer.Player(playerId, playerConfig, mediaCollection)
61
+ player = new ardplayer.Player(playerId.toString(), playerConfig, mediaCollection)
67
62
 
68
- player.setLightMode(isDarkmodeAllowed ? !darkModePreference.matches : true)
63
+ if (isDarkmodeAllowed) {
64
+ player.setLightMode(!darkModePreference.matches)
65
+ }
69
66
 
70
67
  if (isPlayerDebug) {
71
68
  ardplayer.debug(true, true, true, true)
@@ -84,27 +81,6 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
84
81
  }, interval)
85
82
  }
86
83
 
87
- const handleThemeSwitch = function (event) {
88
- player.setLightMode(!event.matches)
89
- }
90
-
91
- const handlePlayStream = function (event) {
92
- const geotag = hr$('.js-geotag', rootElement)[0]
93
- if (!isPlayerStarted) {
94
- trackPlayerStart()
95
- isPlayerStarted = true
96
- }
97
- if (typeof geotag != 'undefined') {
98
- geotag.classList.add('hide')
99
- }
100
- fireEvent('hr:global:stopOtherAVs', 'ardplayer', true)
101
- }
102
-
103
- const handlePlayerErrors = function (event) {
104
- if (undefined !== videoKey) {
105
- fireEvent('hr:global:ardPlayerError', { key: videoKey }, true)
106
- }
107
- }
108
84
 
109
85
  const bindPlayerEvents = function () {
110
86
  listen(ardplayer.Player.EVENT_PLAY_STREAM, handlePlayStream, player)
@@ -118,20 +94,14 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
118
94
  })
119
95
 
120
96
  listen('player_closed', function (event) {
121
- let playerIdFromConfig = parseInt(playerId)
122
- playerIdFromConfig = isNaN(playerIdFromConfig) ? 0 : playerIdFromConfig
123
- if (playerIdFromConfig === event.detail.playerId) {
97
+ if (playerId === event.detail.playerId) {
124
98
  player.stop()
125
99
  }
126
100
  })
127
101
 
128
-
129
-
130
102
  listen('player_start', function (event) {
131
103
  if (player) {
132
- let playerIdFromConfig = parseInt(playerId)
133
- playerIdFromConfig = isNaN(playerIdFromConfig) ? 0 : playerIdFromConfig
134
- if (playerIdFromConfig === event.detail.playerId) {
104
+ if (playerId === event.detail.playerId) {
135
105
  if (undefined != mediaCollection.live) {
136
106
  player.seekToLive()
137
107
  }
@@ -143,30 +113,33 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
143
113
  listen("change", handleThemeSwitch, darkModePreference)
144
114
  }
145
115
 
146
- const trackPlayerStart = function () {
147
- switch (type) {
148
- case "audioOndemand":
149
- console.debug(`Playbutton geklickt::Audio \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
150
- uxAction(`Playbutton geklickt::Audio \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
151
- break;
152
- case "audioLivestream":
153
- console.debug(`Playbutton geklickt::Audio-Event-Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
154
- uxAction(`Playbutton geklickt::Audio-Event-Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
155
- break;
156
- case "videoOndemand":
157
- console.debug(`Playbutton geklickt::Video \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
158
- uxAction(`Playbutton geklickt::Video \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
159
- break;
160
- case "videoLivestream":
161
- console.debug(`Playbutton geklickt::Video - Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
162
- uxAction(`Playbutton geklickt::Video - Livestream \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
163
- break;
116
+ const handlePlayStream = function (event) {
117
+ const geotag = hr$('.js-geotag', rootElement)[0]
118
+ if (!isPlayerStarted) {
119
+ trackPlayerStart()
120
+ isPlayerStarted = true
121
+ }
122
+ if (typeof geotag != 'undefined') {
123
+ geotag.classList.add('hide')
164
124
  }
125
+ fireEvent('hr:global:stopOtherAVs', 'ardplayer', true)
165
126
  }
166
127
 
167
- setupPlayer()
168
- }
128
+ const handlePlayerErrors = function (event) {
129
+ if (undefined !== videoKey) {
130
+ fireEvent('hr:global:ardPlayerError', { key: videoKey }, true)
131
+ }
132
+ }
133
+
134
+ const handleThemeSwitch = function (event) {
135
+ player.setLightMode(!event.matches)
136
+ }
169
137
 
138
+ const trackPlayerStart = function () {
139
+ uxAction(`Playbutton geklickt::${typeLabel} \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
140
+ }
170
141
 
142
+ setupPlayer()
143
+ }
171
144
 
172
145
  export default ArdPlayerLoader
@@ -1,5 +1,4 @@
1
- import { hr$, listenOnce, listen } from 'hrQuery'
2
- import { uxAction } from 'base/tracking/pianoHelper.subfeature'
1
+ import { hr$, listenOnce } from 'hrQuery'
3
2
  import ArdPlayerLoader from 'components/mediaplayer/ardPlayerLoader.subfeature'
4
3
 
5
4
  const MediaplayerLoader = function (context) {
@@ -8,7 +7,6 @@ const MediaplayerLoader = function (context) {
8
7
  const { options } = context,
9
8
  { element: rootElement } = context,
10
9
  isAutoplay = options.isAutoplay,
11
- teaserSize = options.teaserSize,
12
10
  mediaplayerButton = hr$('.js-mediaplayer__button', rootElement.parentNode)[0],
13
11
  trackingData = rootElement.dataset.mediaplayerTracking ? JSON.parse(rootElement.dataset.mediaplayerTracking) : {}
14
12
 
@@ -22,11 +20,6 @@ const MediaplayerLoader = function (context) {
22
20
  removeVideoHover()
23
21
  }
24
22
 
25
- if (isAutoplay) {
26
- console.log('isAutoplay')
27
- listenOnce('click', loadArdPlayerLoader, mediaplayerButton)
28
- } else {
29
- loadArdPlayerLoader()
30
- }
23
+ isAutoplay ? listenOnce('click', loadArdPlayerLoader, mediaplayerButton) : loadArdPlayerLoader()
31
24
  }
32
25
  export default MediaplayerLoader
@@ -100,4 +100,18 @@
100
100
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
101
101
  </a>
102
102
  </li>
103
+ {{/with}}
104
+ {{~#with this.printLink}}
105
+ <li class="">
106
+ <button class="{{#with ../_trackingData}} js-load{{/with}} flex order-2 ds-button font-heading active:scale-95 w-8 h-8"
107
+ title="{{loca "share_copy_linktitle" }}"
108
+ onclick="window.print()"
109
+ {{#with ../_trackingData}}
110
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::print"}]}'
111
+ {{/with}}
112
+ >
113
+ <span x-cloak class="flex items-center justify-center w-full h-full">{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="print-ds" _iconmap="icons" ~}}</span>
114
+
115
+ </button>
116
+ </li>
103
117
  {{/with}}
@@ -100,4 +100,18 @@
100
100
  {{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="kontakt-ds" _iconmap="icons" ~}}
101
101
  </a>
102
102
  </li>
103
+ {{/with}}
104
+ {{~#with this.printLink}}
105
+ <li class="">
106
+ <button class="{{#with ../_trackingData}} js-load{{/with}} flex order-2 ds-button font-heading active:scale-95 w-8 h-8"
107
+ title="{{loca "share_copy_linktitle" }}"
108
+ onclick="window.print()"
109
+ {{#with ../_trackingData}}
110
+ data-hr-click-tracking='{"settings": [{"type":"uxAction","secondLevelId": "{{this.secondLevelId}}","clickLabel": "socialShareClick::{{if ../../_socialSharingType ../../_socialSharingType "default" }}::print"}]}'
111
+ {{/with}}
112
+ >
113
+ <span x-cloak class="flex items-center justify-center w-full h-full">{{~> components/base/image/icon _addClass="w-full h-full fill-link hover:scale-105" _icon="print-ds" _iconmap="icons" ~}}</span>
114
+
115
+ </button>
116
+ </li>
103
117
  {{/with}}
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.94.0",
9
+ "version": "1.95.1",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -56,6 +56,7 @@
56
56
  },
57
57
  "playerId": "2565",
58
58
  "type": "audioOndemand",
59
+ "typeLabel": "Audio-Ondemand",
59
60
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
60
61
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
61
62
  "isAutoplay": true,
@@ -115,6 +116,7 @@
115
116
  },
116
117
  "playerId": "2565",
117
118
  "type": "audioOndemand",
119
+ "typeLabel": "Audio-On-Demand",
118
120
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
119
121
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
120
122
  "isAutoplay": true,
@@ -199,6 +201,7 @@
199
201
  },
200
202
  "playerId": "4076",
201
203
  "type": "audioOndemand",
204
+ "typeLabel": "Audio-On-Demand",
202
205
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
203
206
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
204
207
  "isAutoplay": true,
@@ -263,6 +266,7 @@
263
266
  },
264
267
  "playerId": "1694",
265
268
  "type": "audioLivestream",
269
+ "typeLabel": "Audio-Event-Livestream",
266
270
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
267
271
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
268
272
  "isAutoplay": true,
@@ -2,6 +2,18 @@
2
2
 
3
3
  "@->jsoninclude": "page/story/story.inc.json",
4
4
  "@->overrides": [
5
+ {
6
+ "@->contentpath": "socialSharing",
7
+ "@->value": {
8
+ "twitterLink": "/twitterLink-url",
9
+ "facebookLink": "/facebookLink-url",
10
+ "whatsappLink": "/whatsappLink-url",
11
+ "mailtoLink": "/mailtoLink-url",
12
+ "copyToClipboardLink": "/copyToClipboard-url",
13
+ "printLink": true
14
+
15
+ }
16
+ },
5
17
  {
6
18
  "@->contentpath": "label",
7
19
  "@->value":
@@ -69,6 +69,7 @@
69
69
  },
70
70
  "playerId": "8423",
71
71
  "type": "videoOndemand",
72
+ "typeLabel": "Video-On-Demand",
72
73
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
73
74
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
74
75
  "isAutoplay": true,
@@ -147,6 +148,7 @@
147
148
  },
148
149
  "playerId": "8424",
149
150
  "type": "videoOndemand",
151
+ "typeLabel": "Video-On-Demand",
150
152
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
151
153
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
152
154
  "isAutoplay": true,
@@ -216,6 +218,7 @@
216
218
  },
217
219
  "playerId": "6819",
218
220
  "type": "videoLivestream",
221
+ "typeLabel": "Video-Livestream",
219
222
  "cssUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.3be63dd6.css",
220
223
  "jsUrl": "./vendor/ardplayer/ardplayer-hr-6.9.2.930e5d37.js",
221
224
  "teaserSize": "100",
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 320 320">
2
+ <path d="M268.8,86.1h-19.9c0-.6,0-1.2,0-1.9v-39.5c0-11.4-9.3-20.7-20.7-20.7H90.8c-11.4,0-20.7,9.3-20.7,20.7v39.5c0,.6,0,1.3,0,1.9h-18.9c-15.6,0-28.2,12.7-28.2,28.2v96c0,15.6,12.7,28.2,28.2,28.2h18.8v36.7c0,11.4,9.3,20.7,20.7,20.7h137.5c11.4,0,20.7-9.3,20.7-20.7v-36.7h19.8c15.6,0,28.2-12.7,28.2-28.2v-96c0-15.6-12.7-28.2-28.2-28.2ZM88.9,44.7c0-1,.8-1.9,1.9-1.9h137.5c1,0,1.9.8,1.9,1.9v39.5c0,1-.8,1.9-1.9,1.9H90.8c-1,0-1.9-.8-1.9-1.9v-39.5ZM230.1,275.3c0,1-.8,1.9-1.9,1.9H90.8c-1,0-1.9-.8-1.9-1.9v-92.3c0-1,.8-1.9,1.9-1.9h137.5c1,0,1.9.8,1.9,1.9v92.3ZM278.2,210.4c0,5.2-4.2,9.4-9.4,9.4h-19.8v-36.7c0-11.4-9.3-20.7-20.7-20.7H90.8c-11.4,0-20.7,9.3-20.7,20.7v36.7h-18.8c-5.2,0-9.4-4.2-9.4-9.4v-96c0-5.2,4.2-9.4,9.4-9.4h217.5c5.2,0,9.4,4.2,9.4,9.4v96Z"/>
3
+ <path d="M207,194.8h-94.2c-5.2,0-9.4,4.2-9.4,9.4s4.2,9.4,9.4,9.4h94.2c5.2,0,9.4-4.2,9.4-9.4s-4.2-9.4-9.4-9.4Z"/>
4
+ <path d="M207,231.6h-94.2c-5.2,0-9.4,4.2-9.4,9.4s4.2,9.4,9.4,9.4h94.2c5.2,0,9.4-4.2,9.4-9.4s-4.2-9.4-9.4-9.4Z"/>
5
+ </svg>