hr-design-system-handlebars 1.124.9 → 1.124.10

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,15 @@
1
+ # v1.124.10 (Tue Dec 16 2025)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Dpe 3046 b [#1329](https://github.com/mumprod/hr-design-system-handlebars/pull/1329) ([@vascoeduardo](https://github.com/vascoeduardo))
6
+
7
+ #### Authors: 1
8
+
9
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
10
+
11
+ ---
12
+
1
13
  # v1.124.9 (Mon Dec 15 2025)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -3906,7 +3906,7 @@ article #commentList {
3906
3906
  border-bottom-color: var(--color-secondary-ds);
3907
3907
  }
3908
3908
  .counter-reset {
3909
- counter-reset: cnt1765814559948;
3909
+ counter-reset: cnt1765889322588;
3910
3910
  }
3911
3911
  .animate-delay-100 {
3912
3912
  --tw-animate-delay: 100ms;
@@ -4367,7 +4367,7 @@ html { scroll-behavior: smooth; }
4367
4367
  --tw-ring-color: rgba(255, 255, 255, 0.5);
4368
4368
  }
4369
4369
  .-ordered {
4370
- counter-increment: cnt1765814559948 1;
4370
+ counter-increment: cnt1765889322588 1;
4371
4371
  }
4372
4372
  .-ordered::before {
4373
4373
  position: absolute;
@@ -4385,7 +4385,7 @@ html { scroll-behavior: smooth; }
4385
4385
  --tw-text-opacity: 1;
4386
4386
  color: rgba(0, 0, 0, 1);
4387
4387
  color: rgba(0, 0, 0, var(--tw-text-opacity));
4388
- content: counter(cnt1765814559948);
4388
+ content: counter(cnt1765889322588);
4389
4389
  }
4390
4390
  /*! ****************************/
4391
4391
  /*! DataPolicy stuff */
@@ -14,6 +14,7 @@ import dropdown from 'components/site_header/dropdown.alpine'
14
14
  AsyncAlpine.init(Alpine)
15
15
  .data('podcastPlayer', () => import('components/podcast/podcast_player.alpine.js'))
16
16
  .data('appBanner', () => import('components/appBanner/appBanner.alpine.js'))
17
+ .data('nativeAppBanner', () => import('components/appBanner/nativeAppBanner.alpine.js'))
17
18
  .data('slider', () =>
18
19
  import('components/horizontal_scroll_container/horizontal_scroll_container.alpine.js')
19
20
  )
@@ -4,38 +4,47 @@ export default function appBanner() {
4
4
  return {
5
5
  showBanner: false,
6
6
  deferredPrompt: null,
7
+ isAndroid: /Android/i.test(navigator.userAgent),
8
+ packageId: "de.hr.hessenschau",
7
9
  init: function () {
8
- window.addEventListener('beforeinstallprompt', (e) => {
9
- // Prevent Chrome 67 and earlier from automatically showing the prompt
10
- e.preventDefault();
11
- // Stash the event so it can be triggered later.
12
- this.deferredPrompt = e;
13
- // Update UI notify the user they can add to home screen
10
+
11
+ if(this.isAndroid){
14
12
  this.showBanner = true;
15
- });
13
+ }
14
+
16
15
  if(window.IS_STORYBOOK){ this.showBanner = true;}
17
16
  },
18
17
  installClickHandler: function(){
19
- if(this.deferredPrompt){
20
- this.deferredPrompt.prompt();
21
- // Wait for the user to respond to the prompt
22
- this.deferredPrompt.userChoice
23
- .then((choiceResult) => {
24
- if (choiceResult.outcome === 'accepted') {
25
- uxAction('installNativeApp::promt::accepted');
26
- console.log('User accepted the A2HS prompt');
27
- } else {
28
- uxAction('installNativeApp::promt::dismissed');
29
- console.log('User dismissed the A2HS prompt');
30
- }
31
- this.deferredPrompt = null;
32
- });
33
- }
18
+ this.openPlayStore()
34
19
  this.showBanner = false
35
20
  },
36
21
  closeClickHandler: function(){
37
- uxAction('installNativeApp::bannerClosed');
22
+ uxAction('appBanner::bannerClosed');
38
23
  this.showBanner = false
24
+ },
25
+ openPlayStore: function() {
26
+ let fallbackTriggered = false;
27
+
28
+ const fallback = () => {
29
+ if (fallbackTriggered) return;
30
+ fallbackTriggered = true;
31
+
32
+ window.open(`https://play.google.com/store/apps/details?id=${this.packageId}`, "googlePlayStore");
33
+
34
+ };
35
+
36
+ document.addEventListener('visibilitychange', () => {
37
+ if (document.hidden) {
38
+ // App switch happened → cancel fallback
39
+ fallbackTriggered = true;
40
+ }
41
+ }, { once: true });
42
+
43
+ window.location.href =
44
+ `intent://details?id=${this.packageId}` +
45
+ `#Intent;scheme=market;package=com.android.vending;end`;
46
+
47
+ setTimeout(fallback, 700);
39
48
  }
40
49
  }
41
50
  }
@@ -0,0 +1,44 @@
1
+ import { uxAction } from 'base/tracking/pianoHelper.subfeature'
2
+
3
+ export default function nativeAppBanner() {
4
+ return {
5
+ showBanner: false,
6
+ deferredPrompt: null,
7
+ isAndroid: /Android/i.test(navigator.userAgent),
8
+ init: function () {
9
+ window.addEventListener('beforeinstallprompt', (e) => {
10
+ // Prevent Chrome 67 and earlier from automatically showing the prompt
11
+ e.preventDefault();
12
+ // Stash the event so it can be triggered later.
13
+ this.deferredPrompt = e;
14
+ // Update UI notify the user they can add to home screen
15
+ if(this.isAndroid){
16
+ this.showBanner = true;
17
+ }
18
+ });
19
+ if(window.IS_STORYBOOK){ this.showBanner = true;}
20
+ },
21
+ installClickHandler: function(){
22
+ if(this.deferredPrompt){
23
+ this.deferredPrompt.prompt();
24
+ // Wait for the user to respond to the prompt
25
+ this.deferredPrompt.userChoice
26
+ .then((choiceResult) => {
27
+ if (choiceResult.outcome === 'accepted') {
28
+ uxAction('nativeAppBanner::promt::accepted');
29
+ console.log('User accepted the A2HS prompt');
30
+ } else {
31
+ uxAction('nativeAppBanner::promt::dismissed');
32
+ console.log('User dismissed the A2HS prompt');
33
+ }
34
+ this.deferredPrompt = null;
35
+ });
36
+ }
37
+ this.showBanner = false
38
+ },
39
+ closeClickHandler: function(){
40
+ uxAction('nativeAppBanner::bannerClosed');
41
+ this.showBanner = false
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+ <div
2
+ x-data="nativeAppBanner()" x-cloak x-show="showBanner" ax-load x-ignore
3
+ id="marketing-banner" tabindex="-1" class="fixed bottom-0 z-50 flex flex-row justify-end w-full gap-4 p-4 -translate-x-1/2 flex-nowrap bg-blue-aqua lg:max-w-7xl left-1/2">
4
+ <div class="flex flex-row items-center gap-4 grow">
5
+ <div class="flex items-center justify-center rounded-lg w-11 h-11 bg-blue-congress-hex shrink-0">
6
+ <img width="24" height="24" src="{{resourceUrl "assets/base/icons/logo/brandlogo--mobile.min.svg" _brand=(defaultIfEmpty this.brand "hessenschau")}}"
7
+ class="w-7 h-7" alt="{{loca "meta_application_name"}}">
8
+ </div>
9
+ <div class="flex flex-col items-start text-sm sm:text-base font-heading">
10
+ <span class="font-bold">hessenschau App</span>
11
+ <span>Kostenlos bei Google Play</span>
12
+ </div>
13
+ </div>
14
+ <div class="flex items-center gap-4 ">
15
+ {{#> components/button/button _size="md" _alpineClick="installClickHandler"}}
16
+ {{> components/button/components/button_label _label="Laden" _css="text-sm sm:text-base"}}
17
+ {{/components/button/button}}
18
+ {{#> components/button/button _size="md" _variant="tertiary" _css="h-10" _alpineClick="closeClickHandler"}}
19
+ {{> components/button/components/button_icon _icon="close" _css="" _iconmap="icons"}}
20
+ {{> components/button/components/button_label _label="schließen" _css="sr-only"}}
21
+ {{/components/button/button}}
22
+ </div>
23
+ </div>
24
+
25
+
26
+
27
+
@@ -0,0 +1,27 @@
1
+ <div
2
+ x-data="nativeAppBanner()" x-cloak x-show="showBanner" ax-load x-ignore
3
+ id="marketing-banner" tabindex="-1" class="fixed bottom-0 z-50 flex flex-row justify-end w-full gap-4 p-4 -translate-x-1/2 flex-nowrap bg-blue-aqua lg:max-w-7xl left-1/2">
4
+ <div class="flex flex-row items-center gap-4 grow">
5
+ <div class="flex items-center justify-center rounded-lg w-11 h-11 bg-blue-congress-hex shrink-0">
6
+ <img width="24" height="24" src="{{resourceUrl "assets/base/icons/logo/brandlogo--mobile.min.svg" _brand=(defaultIfEmpty this.brand "hessenschau")}}"
7
+ class="w-7 h-7" alt="{{loca "meta_application_name"}}">
8
+ </div>
9
+ <div class="flex flex-col items-start text-sm sm:text-base font-heading">
10
+ <span class="font-bold">hessenschau App</span>
11
+ <span>Kostenlos bei Google Play</span>
12
+ </div>
13
+ </div>
14
+ <div class="flex items-center gap-4 ">
15
+ {{#> components/button/button _size="md" _alpineClick="installClickHandler"}}
16
+ {{> components/button/components/button_label _label="Laden" _css="text-sm sm:text-base"}}
17
+ {{/components/button/button}}
18
+ {{#> components/button/button _size="md" _variant="tertiary" _css="h-10" _alpineClick="closeClickHandler"}}
19
+ {{> components/button/components/button_icon _icon="close" _css="" _iconmap="icons"}}
20
+ {{> components/button/components/button_label _label="schließen" _css="sr-only"}}
21
+ {{/components/button/button}}
22
+ </div>
23
+ </div>
24
+
25
+
26
+
27
+
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.9",
9
+ "version": "1.124.10",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -14,6 +14,7 @@ import dropdown from 'components/site_header/dropdown.alpine'
14
14
  AsyncAlpine.init(Alpine)
15
15
  .data('podcastPlayer', () => import('components/podcast/podcast_player.alpine.js'))
16
16
  .data('appBanner', () => import('components/appBanner/appBanner.alpine.js'))
17
+ .data('nativeAppBanner', () => import('components/appBanner/nativeAppBanner.alpine.js'))
17
18
  .data('slider', () =>
18
19
  import('components/horizontal_scroll_container/horizontal_scroll_container.alpine.js')
19
20
  )
@@ -4,38 +4,47 @@ export default function appBanner() {
4
4
  return {
5
5
  showBanner: false,
6
6
  deferredPrompt: null,
7
+ isAndroid: /Android/i.test(navigator.userAgent),
8
+ packageId: "de.hr.hessenschau",
7
9
  init: function () {
8
- window.addEventListener('beforeinstallprompt', (e) => {
9
- // Prevent Chrome 67 and earlier from automatically showing the prompt
10
- e.preventDefault();
11
- // Stash the event so it can be triggered later.
12
- this.deferredPrompt = e;
13
- // Update UI notify the user they can add to home screen
10
+
11
+ if(this.isAndroid){
14
12
  this.showBanner = true;
15
- });
13
+ }
14
+
16
15
  if(window.IS_STORYBOOK){ this.showBanner = true;}
17
16
  },
18
17
  installClickHandler: function(){
19
- if(this.deferredPrompt){
20
- this.deferredPrompt.prompt();
21
- // Wait for the user to respond to the prompt
22
- this.deferredPrompt.userChoice
23
- .then((choiceResult) => {
24
- if (choiceResult.outcome === 'accepted') {
25
- uxAction('installNativeApp::promt::accepted');
26
- console.log('User accepted the A2HS prompt');
27
- } else {
28
- uxAction('installNativeApp::promt::dismissed');
29
- console.log('User dismissed the A2HS prompt');
30
- }
31
- this.deferredPrompt = null;
32
- });
33
- }
18
+ this.openPlayStore()
34
19
  this.showBanner = false
35
20
  },
36
21
  closeClickHandler: function(){
37
- uxAction('installNativeApp::bannerClosed');
22
+ uxAction('appBanner::bannerClosed');
38
23
  this.showBanner = false
24
+ },
25
+ openPlayStore: function() {
26
+ let fallbackTriggered = false;
27
+
28
+ const fallback = () => {
29
+ if (fallbackTriggered) return;
30
+ fallbackTriggered = true;
31
+
32
+ window.open(`https://play.google.com/store/apps/details?id=${this.packageId}`, "googlePlayStore");
33
+
34
+ };
35
+
36
+ document.addEventListener('visibilitychange', () => {
37
+ if (document.hidden) {
38
+ // App switch happened → cancel fallback
39
+ fallbackTriggered = true;
40
+ }
41
+ }, { once: true });
42
+
43
+ window.location.href =
44
+ `intent://details?id=${this.packageId}` +
45
+ `#Intent;scheme=market;package=com.android.vending;end`;
46
+
47
+ setTimeout(fallback, 700);
39
48
  }
40
49
  }
41
50
  }
@@ -1,14 +1,14 @@
1
1
  import { ArgTypes, Meta, Story, Canvas, ColorPalette, ColorItem } from '@storybook/blocks'
2
2
  import * as AppBannerStories from './appBanner.stories';
3
3
 
4
- import geoTag from './appBanner.hbs'
4
+ import appBanner from './appBanner.hbs'
5
5
 
6
6
  <Meta of={AppBannerStories} />
7
7
 
8
8
  export const Template = ({ ...args }) => {
9
9
  // You can either use a function to create DOM elements or use a plain html string!
10
- // return `<div>${geoTag}</div>`;
11
- return geoTag({ ...args })
10
+ // return `<div>${appBanner}</div>`;
11
+ return appBanner({ ...args })
12
12
  }
13
13
 
14
14
  # AppBanner
@@ -16,4 +16,3 @@ export const Template = ({ ...args }) => {
16
16
  <Canvas withToolbar>
17
17
  <Story of={AppBannerStories.AppBanner} />
18
18
  </Canvas>
19
-
@@ -1,19 +1,21 @@
1
1
  import appBanner from './appBanner.hbs'
2
+ import nativeAppBanner from './nativeAppBanner.hbs'
2
3
 
3
4
  const Template = ({ ...args }) => {
4
5
  // You can either use a function to create DOM elements or use a plain html string!
5
6
  // return `<div>${appBanner}</div>`;
6
7
  return appBanner({ ...args })
7
8
  }
8
-
9
+ const NativeTemplate = ({ ...args }) => {
10
+ // You can either use a function to create DOM elements or use a plain html string!
11
+ // return `<div>${nativeAppBanner}</div>`;
12
+ return nativeAppBanner({ ...args })
13
+ }
9
14
  export default {
10
15
  title: 'Komponenten/App Banner',
11
16
 
12
17
  argTypes: {
13
- _text: {
14
- control: 'text',
15
- description: 'Beschriftung der Ortsmarke',
16
- },
18
+
17
19
  },
18
20
 
19
21
  decorators: [
@@ -28,6 +30,15 @@ export const AppBanner = {
28
30
  name: 'AppBanner',
29
31
 
30
32
  args: {
31
- _text: 'AppBanner',
33
+
32
34
  },
33
35
  }
36
+ export const NativeAppBanner = {
37
+ render: NativeTemplate.bind({}),
38
+ name: 'NativeAppBanner',
39
+
40
+ args: {
41
+
42
+ },
43
+ }
44
+
@@ -0,0 +1,44 @@
1
+ import { uxAction } from 'base/tracking/pianoHelper.subfeature'
2
+
3
+ export default function nativeAppBanner() {
4
+ return {
5
+ showBanner: false,
6
+ deferredPrompt: null,
7
+ isAndroid: /Android/i.test(navigator.userAgent),
8
+ init: function () {
9
+ window.addEventListener('beforeinstallprompt', (e) => {
10
+ // Prevent Chrome 67 and earlier from automatically showing the prompt
11
+ e.preventDefault();
12
+ // Stash the event so it can be triggered later.
13
+ this.deferredPrompt = e;
14
+ // Update UI notify the user they can add to home screen
15
+ if(this.isAndroid){
16
+ this.showBanner = true;
17
+ }
18
+ });
19
+ if(window.IS_STORYBOOK){ this.showBanner = true;}
20
+ },
21
+ installClickHandler: function(){
22
+ if(this.deferredPrompt){
23
+ this.deferredPrompt.prompt();
24
+ // Wait for the user to respond to the prompt
25
+ this.deferredPrompt.userChoice
26
+ .then((choiceResult) => {
27
+ if (choiceResult.outcome === 'accepted') {
28
+ uxAction('nativeAppBanner::promt::accepted');
29
+ console.log('User accepted the A2HS prompt');
30
+ } else {
31
+ uxAction('nativeAppBanner::promt::dismissed');
32
+ console.log('User dismissed the A2HS prompt');
33
+ }
34
+ this.deferredPrompt = null;
35
+ });
36
+ }
37
+ this.showBanner = false
38
+ },
39
+ closeClickHandler: function(){
40
+ uxAction('nativeAppBanner::bannerClosed');
41
+ this.showBanner = false
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,27 @@
1
+ <div
2
+ x-data="nativeAppBanner()" x-cloak x-show="showBanner" ax-load x-ignore
3
+ id="marketing-banner" tabindex="-1" class="fixed bottom-0 z-50 flex flex-row justify-end w-full gap-4 p-4 -translate-x-1/2 flex-nowrap bg-blue-aqua lg:max-w-7xl left-1/2">
4
+ <div class="flex flex-row items-center gap-4 grow">
5
+ <div class="flex items-center justify-center rounded-lg w-11 h-11 bg-blue-congress-hex shrink-0">
6
+ <img width="24" height="24" src="{{resourceUrl "assets/base/icons/logo/brandlogo--mobile.min.svg" _brand=(defaultIfEmpty this.brand "hessenschau")}}"
7
+ class="w-7 h-7" alt="{{loca "meta_application_name"}}">
8
+ </div>
9
+ <div class="flex flex-col items-start text-sm sm:text-base font-heading">
10
+ <span class="font-bold">hessenschau App</span>
11
+ <span>Kostenlos bei Google Play</span>
12
+ </div>
13
+ </div>
14
+ <div class="flex items-center gap-4 ">
15
+ {{#> components/button/button _size="md" _alpineClick="installClickHandler"}}
16
+ {{> components/button/components/button_label _label="Laden" _css="text-sm sm:text-base"}}
17
+ {{/components/button/button}}
18
+ {{#> components/button/button _size="md" _variant="tertiary" _css="h-10" _alpineClick="closeClickHandler"}}
19
+ {{> components/button/components/button_icon _icon="close" _css="" _iconmap="icons"}}
20
+ {{> components/button/components/button_label _label="schließen" _css="sr-only"}}
21
+ {{/components/button/button}}
22
+ </div>
23
+ </div>
24
+
25
+
26
+
27
+