hr-design-system-handlebars 1.124.2 β†’ 1.124.4

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 CHANGED
@@ -1,3 +1,28 @@
1
+ # v1.124.4 (Wed Nov 26 2025)
2
+
3
+ #### πŸ› Bug Fix
4
+
5
+ - Only call trackPlayerStart() when we are not inside a webview to prev… [#1325](https://github.com/mumprod/hr-design-system-handlebars/pull/1325) ([@szuelch](https://github.com/szuelch))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@szuelch](https://github.com/szuelch)
10
+
11
+ ---
12
+
13
+ # v1.124.3 (Tue Nov 25 2025)
14
+
15
+ #### πŸ› Bug Fix
16
+
17
+ - create player only if detchPlayerStyle is resolved [#1324](https://github.com/mumprod/hr-design-system-handlebars/pull/1324) ([@vascoeduardo](https://github.com/vascoeduardo) [@eduardo-hr](https://github.com/eduardo-hr))
18
+
19
+ #### Authors: 2
20
+
21
+ - [@eduardo-hr](https://github.com/eduardo-hr)
22
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
23
+
24
+ ---
25
+
1
26
  # v1.124.2 (Mon Nov 24 2025)
2
27
 
3
28
  #### πŸ› Bug Fix
@@ -3895,7 +3895,7 @@ article #commentList {
3895
3895
  border-bottom-color: var(--color-secondary-ds);
3896
3896
  }
3897
3897
  .counter-reset {
3898
- counter-reset: cnt1763981897108;
3898
+ counter-reset: cnt1764158857635;
3899
3899
  }
3900
3900
  .animate-delay-100 {
3901
3901
  --tw-animate-delay: 100ms;
@@ -4356,7 +4356,7 @@ html { scroll-behavior: smooth; }
4356
4356
  --tw-ring-color: rgba(255, 255, 255, 0.5);
4357
4357
  }
4358
4358
  .-ordered {
4359
- counter-increment: cnt1763981897108 1;
4359
+ counter-increment: cnt1764158857635 1;
4360
4360
  }
4361
4361
  .-ordered::before {
4362
4362
  position: absolute;
@@ -4374,7 +4374,7 @@ html { scroll-behavior: smooth; }
4374
4374
  --tw-text-opacity: 1;
4375
4375
  color: rgba(0, 0, 0, 1);
4376
4376
  color: rgba(0, 0, 0, var(--tw-text-opacity));
4377
- content: counter(cnt1763981897108);
4377
+ content: counter(cnt1764158857635);
4378
4378
  }
4379
4379
  /*! ****************************/
4380
4380
  /*! DataPolicy stuff */
@@ -11,10 +11,10 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
11
11
  typeLabel = options.typeLabel,
12
12
  settingsCookie = new SettingsCookie(),
13
13
  isPlayerDebug = options.isPlayerDebug || false,
14
- playerLocation = trackingData.playerLocation || "Default",
14
+ playerLocation = trackingData.playerLocation || 'Default',
15
15
  playerSize = trackingData.playerSize || options.teaserSize,
16
16
  isDarkmodeAllowed = options.isDarkmodeAllowed,
17
- darkModePreference = window.matchMedia("(prefers-color-scheme: dark)");
17
+ darkModePreference = window.matchMedia('(prefers-color-scheme: dark)')
18
18
  let mediaCollection = options.mediaCollection,
19
19
  playerConfig = options.playerConfig,
20
20
  isPlayerStarted = false,
@@ -23,7 +23,7 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
23
23
 
24
24
  const setupPlayer = function () {
25
25
  loadArdPlayerScript()
26
- fetchPlayerStyle(skinPath).then(createPlayer())
26
+ fetchPlayerStyle(skinPath, skinPath.replace(/[^a-zA-Z0-9\s]/g, '')).then(createPlayer)
27
27
  }
28
28
 
29
29
  const loadArdPlayerScript = function () {
@@ -34,37 +34,37 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
34
34
  return new Promise(function (resolve, reject) {
35
35
  if (document.getElementById(id)) {
36
36
  resolve('Style wurde bereits geladen')
37
- console.log('style was already loaded before')
38
37
  } else {
39
38
  const link = document.createElement('link')
40
39
  link.type = 'text/css'
41
40
  link.rel = 'stylesheet'
42
41
  link.id = id
43
- link.onload = function () {
44
- resolve()
45
- }
46
42
  link.href = url
47
43
  const headScript = document.querySelector('script')
48
44
  headScript.parentNode.insertBefore(link, headScript)
49
- resolve('Style wurde neu geladen')
45
+ link.onload = () => resolve('Style wurde neu geladen')
50
46
  }
51
47
  })
52
48
  }
53
49
 
54
50
  const createPlayer = function () {
55
51
  if (undefined != playerConfig.pluginData['trackingPiano@all']) {
56
- playerConfig.pluginData['trackingPiano@all'].isEnabled = settingsCookie.isSettingsCookieExistent('ati') ? settingsCookie.isSettingsCookieAccepted('ati') : !isWebview
52
+ playerConfig.pluginData['trackingPiano@all'].isEnabled =
53
+ settingsCookie.isSettingsCookieExistent('ati')
54
+ ? settingsCookie.isSettingsCookieAccepted('ati')
55
+ : !isWebview
57
56
  }
58
57
  if (undefined != playerConfig.pluginData['trackingAgf@all']) {
59
- playerConfig.pluginData['trackingAgf@all'].isEnabled = settingsCookie.isSettingsCookieExistent('agf') ? settingsCookie.isSettingsCookieAccepted('agf') : !isWebview
58
+ playerConfig.pluginData['trackingAgf@all'].isEnabled =
59
+ settingsCookie.isSettingsCookieExistent('agf')
60
+ ? settingsCookie.isSettingsCookieAccepted('agf')
61
+ : !isWebview
60
62
  }
61
63
  whenAvailable('ardplayer', function () {
62
64
  player = new ardplayer.Player(playerId.toString(), playerConfig, mediaCollection)
63
65
 
64
-
65
66
  player.setLightMode(isDarkmodeAllowed ? !darkModePreference.matches : true)
66
67
 
67
-
68
68
  if (isPlayerDebug) {
69
69
  ardplayer.debug(true, true, true, true)
70
70
  }
@@ -82,7 +82,6 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
82
82
  }, interval)
83
83
  }
84
84
 
85
-
86
85
  const bindPlayerEvents = function () {
87
86
  listen(ardplayer.Player.EVENT_PLAY_STREAM, handlePlayStream, player)
88
87
 
@@ -111,13 +110,13 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
111
110
  }
112
111
  })
113
112
 
114
- listen("change", handleThemeSwitch, darkModePreference)
113
+ listen('change', handleThemeSwitch, darkModePreference)
115
114
  }
116
115
 
117
116
  const handlePlayStream = function (event) {
118
117
  const geotag = hr$('.js-geotag', rootElement)[0]
119
118
  if (!isPlayerStarted) {
120
- trackPlayerStart()
119
+ !isWebview && trackPlayerStart()
121
120
  isPlayerStarted = true
122
121
  }
123
122
  if (typeof geotag != 'undefined') {
@@ -133,12 +132,13 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
133
132
  }
134
133
 
135
134
  const handleThemeSwitch = function (event) {
136
-
137
135
  player.setLightMode(isDarkmodeAllowed ? !event.matches : true)
138
136
  }
139
137
 
140
138
  const trackPlayerStart = function () {
141
- uxAction(`Playbutton geklickt::${typeLabel} \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
139
+ uxAction(
140
+ `Playbutton geklickt::${typeLabel} \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`
141
+ )
142
142
  }
143
143
 
144
144
  setupPlayer()
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.124.2",
9
+ "version": "1.124.4",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -11,10 +11,10 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
11
11
  typeLabel = options.typeLabel,
12
12
  settingsCookie = new SettingsCookie(),
13
13
  isPlayerDebug = options.isPlayerDebug || false,
14
- playerLocation = trackingData.playerLocation || "Default",
14
+ playerLocation = trackingData.playerLocation || 'Default',
15
15
  playerSize = trackingData.playerSize || options.teaserSize,
16
16
  isDarkmodeAllowed = options.isDarkmodeAllowed,
17
- darkModePreference = window.matchMedia("(prefers-color-scheme: dark)");
17
+ darkModePreference = window.matchMedia('(prefers-color-scheme: dark)')
18
18
  let mediaCollection = options.mediaCollection,
19
19
  playerConfig = options.playerConfig,
20
20
  isPlayerStarted = false,
@@ -23,7 +23,7 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
23
23
 
24
24
  const setupPlayer = function () {
25
25
  loadArdPlayerScript()
26
- fetchPlayerStyle(skinPath).then(createPlayer())
26
+ fetchPlayerStyle(skinPath, skinPath.replace(/[^a-zA-Z0-9\s]/g, '')).then(createPlayer)
27
27
  }
28
28
 
29
29
  const loadArdPlayerScript = function () {
@@ -34,37 +34,37 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
34
34
  return new Promise(function (resolve, reject) {
35
35
  if (document.getElementById(id)) {
36
36
  resolve('Style wurde bereits geladen')
37
- console.log('style was already loaded before')
38
37
  } else {
39
38
  const link = document.createElement('link')
40
39
  link.type = 'text/css'
41
40
  link.rel = 'stylesheet'
42
41
  link.id = id
43
- link.onload = function () {
44
- resolve()
45
- }
46
42
  link.href = url
47
43
  const headScript = document.querySelector('script')
48
44
  headScript.parentNode.insertBefore(link, headScript)
49
- resolve('Style wurde neu geladen')
45
+ link.onload = () => resolve('Style wurde neu geladen')
50
46
  }
51
47
  })
52
48
  }
53
49
 
54
50
  const createPlayer = function () {
55
51
  if (undefined != playerConfig.pluginData['trackingPiano@all']) {
56
- playerConfig.pluginData['trackingPiano@all'].isEnabled = settingsCookie.isSettingsCookieExistent('ati') ? settingsCookie.isSettingsCookieAccepted('ati') : !isWebview
52
+ playerConfig.pluginData['trackingPiano@all'].isEnabled =
53
+ settingsCookie.isSettingsCookieExistent('ati')
54
+ ? settingsCookie.isSettingsCookieAccepted('ati')
55
+ : !isWebview
57
56
  }
58
57
  if (undefined != playerConfig.pluginData['trackingAgf@all']) {
59
- playerConfig.pluginData['trackingAgf@all'].isEnabled = settingsCookie.isSettingsCookieExistent('agf') ? settingsCookie.isSettingsCookieAccepted('agf') : !isWebview
58
+ playerConfig.pluginData['trackingAgf@all'].isEnabled =
59
+ settingsCookie.isSettingsCookieExistent('agf')
60
+ ? settingsCookie.isSettingsCookieAccepted('agf')
61
+ : !isWebview
60
62
  }
61
63
  whenAvailable('ardplayer', function () {
62
64
  player = new ardplayer.Player(playerId.toString(), playerConfig, mediaCollection)
63
65
 
64
-
65
66
  player.setLightMode(isDarkmodeAllowed ? !darkModePreference.matches : true)
66
67
 
67
-
68
68
  if (isPlayerDebug) {
69
69
  ardplayer.debug(true, true, true, true)
70
70
  }
@@ -82,7 +82,6 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
82
82
  }, interval)
83
83
  }
84
84
 
85
-
86
85
  const bindPlayerEvents = function () {
87
86
  listen(ardplayer.Player.EVENT_PLAY_STREAM, handlePlayStream, player)
88
87
 
@@ -111,13 +110,13 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
111
110
  }
112
111
  })
113
112
 
114
- listen("change", handleThemeSwitch, darkModePreference)
113
+ listen('change', handleThemeSwitch, darkModePreference)
115
114
  }
116
115
 
117
116
  const handlePlayStream = function (event) {
118
117
  const geotag = hr$('.js-geotag', rootElement)[0]
119
118
  if (!isPlayerStarted) {
120
- trackPlayerStart()
119
+ !isWebview && trackPlayerStart()
121
120
  isPlayerStarted = true
122
121
  }
123
122
  if (typeof geotag != 'undefined') {
@@ -133,12 +132,13 @@ const ArdPlayerLoader = function (options, trackingData, rootElement) {
133
132
  }
134
133
 
135
134
  const handleThemeSwitch = function (event) {
136
-
137
135
  player.setLightMode(isDarkmodeAllowed ? !event.matches : true)
138
136
  }
139
137
 
140
138
  const trackPlayerStart = function () {
141
- uxAction(`Playbutton geklickt::${typeLabel} \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`)
139
+ uxAction(
140
+ `Playbutton geklickt::${typeLabel} \"${mediaCollection.meta.title}\"::${playerLocation}::Breite ${playerSize}`
141
+ )
142
142
  }
143
143
 
144
144
  setupPlayer()