hr-design-system-handlebars 0.45.0 → 0.45.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v0.45.1 (Fri May 13 2022)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - some refactoring [#232](https://github.com/mumprod/hr-design-system-handlebars/pull/232) ([@hanswurstsalat](https://github.com/hanswurstsalat))
6
+
7
+ #### Authors: 1
8
+
9
+ - Geraldo ([@hanswurstsalat](https://github.com/hanswurstsalat))
10
+
11
+ ---
12
+
1
13
  # v0.45.0 (Thu May 12 2022)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -1590,12 +1590,6 @@ Ensure the default browser behavior of the `hidden` attribute.
1590
1590
  .mt-2\.5 {
1591
1591
  margin-top: 0.625rem;
1592
1592
  }
1593
- .mr-2\.5 {
1594
- margin-right: 0.625rem;
1595
- }
1596
- .mr-2 {
1597
- margin-right: 0.5rem;
1598
- }
1599
1593
  .mr-0\.5 {
1600
1594
  margin-right: 0.125rem;
1601
1595
  }
@@ -2542,6 +2536,9 @@ Ensure the default browser behavior of the `hidden` attribute.
2542
2536
  .first-of-type\:border-none:first-of-type {
2543
2537
  border-style: none;
2544
2538
  }
2539
+ .last-of-type\:hidden:last-of-type {
2540
+ display: none;
2541
+ }
2545
2542
  .hover\:bg-blue-congress:hover {
2546
2543
  --tw-bg-opacity: 1;
2547
2544
  background-color: rgba(0, 82, 147, var(--tw-bg-opacity));
@@ -1,74 +1,39 @@
1
1
  <p class="mt-2.5 text-xs text-grey-scorpion font-headingSerif">
2
-
3
- {{!--Teaser-Info--}}
4
- {{#with this.teaserInfo}}
5
- {{#if this.showTeaserInfo~}}
6
- {{~#if this.showTeaserInfoDate}}
7
- {{~#with ../teaserDate}}
8
- <time datetime="{{this.htmlDateTime}}">{{this.date}}</time>
9
- {{/with~}}
10
- {{#if this.showTeaserInfoSection}}
11
- <span class="mx-px">|</span>
12
- {{else}}
13
- {{#if ../profiles}}
14
- <span class="mx-px">|</span>
15
- {{/if}}
16
- {{/if}}
17
- {{else}}
18
- {{~#if this.showTeaserInfoDateTime}}
2
+
3
+ {{!--Teaser-Info--}}
4
+ {{#with this.teaserInfo}}
5
+ {{#if this.showTeaserInfo~}}
6
+ {{~#if this.showTeaserInfoDate}}
19
7
  {{~#with ../teaserDate}}
20
- <time datetime="{{this.htmlDateTime}}">{{loca "date_simple_at" this.dateSeparatorTime}}</time>
21
- {{/with~}}
22
- {{#if this.showTeaserInfoSection}}
23
- <span class="mx-px">|</span>
24
- {{else}}
25
- {{#if ../profiles}}
26
- <span class="mx-px">|</span>
27
- {{/if}}
28
- {{/if}}
29
- {{/if~}}
30
- {{/if~}}
8
+ <time datetime="{{this.htmlDateTime}}">{{this.date}}</time>
9
+ {{/with~}}
10
+ <span class="mx-px last-of-type:hidden">|</span>
11
+ {{else}}
12
+ {{~#if this.showTeaserInfoDateTime}}
13
+ {{~#with ../teaserDate}}
14
+ <time datetime="{{this.htmlDateTime}}">{{loca "date_simple_at" this.dateSeparatorTime}}</time>
15
+ {{/with~}}
16
+ <span class="mx-px last-of-type:hidden">|</span>
17
+ {{/if~}}
18
+ {{/if~}}
31
19
 
32
- {{~#if this.showTeaserInfoSection}}
33
- <span class="uppercase">
34
- {{../documentSection~}}
35
- </span>
36
- {{#if ../profiles}}
37
- <span class="mx-px">|</span>
20
+ {{~#if this.showTeaserInfoSection}}
21
+ <span class="uppercase">
22
+ {{../documentSection~}}
23
+ </span>
24
+ <span class="mx-px last-of-type:hidden">|</span>
38
25
  {{/if}}
39
- {{/if}}
40
-
41
- {{/if}}
42
- {{/with}}
43
26
 
44
- {{!--Profiles--}}
45
- {{#if profiles}}
46
- <span>{{profiles}}</span>
47
- {{/if}}
27
+ {{/if}}
28
+ {{/with}}
48
29
 
49
- {{!--
50
- Gap here only if comments exists and at least one of those elements above
51
- is shown. Really ugly because we don't have any or-helper yet...
52
- --}}
53
- {{#if commentLink}}
30
+ {{!--Profiles--}}
54
31
  {{#if profiles}}
55
- <span class="mr-2.5"></span>
56
- {{else}}
57
- {{#if teaserInfo.showTeaserInfoSection}}
58
- <span class="mr-2.5"></span>
59
- {{else}}
60
- {{#if teaserInfo.showTeaserInfoDate}}
61
- <span class="mr-2.5"></span>
62
- {{else}}
63
- {{#if teaserInfo.showTeaserInfoDateTime}}
64
- <span class="mr-2.5"></span>
65
- {{/if}}
66
- {{/if}}
67
- {{/if}}
68
- {{/if}}
69
- {{/if}}
32
+ <span>{{profiles}}</span>
33
+ <span class="mx-px last-of-type:hidden">|</span>
34
+ {{/if}}
70
35
 
71
36
  {{!--Comments--}}
72
37
  {{> components/teaser/components/teaser_comments}}
73
38
 
74
- </p>
39
+ </p>
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": "0.45.0",
9
+ "version": "0.45.1",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "start-storybook -p 6006 public",
@@ -0,0 +1,14 @@
1
+ {
2
+ "@->jsoninclude": "teaser/teasers.inc.json",
3
+ "@->contentpath": "teaserWithComments",
4
+ "@->overrides": [
5
+ {
6
+ "@->contentpath": "logicItem.includeModel.teaserInfo.showTeaserInfo",
7
+ "@->value": false
8
+ },
9
+ {
10
+ "@->contentpath": "logicItem.includeModel.profiles",
11
+ "@->value": ""
12
+ }
13
+ ]
14
+ }
@@ -1,74 +1,39 @@
1
1
  <p class="mt-2.5 text-xs text-grey-scorpion font-headingSerif">
2
-
3
- {{!--Teaser-Info--}}
4
- {{#with this.teaserInfo}}
5
- {{#if this.showTeaserInfo~}}
6
- {{~#if this.showTeaserInfoDate}}
7
- {{~#with ../teaserDate}}
8
- <time datetime="{{this.htmlDateTime}}">{{this.date}}</time>
9
- {{/with~}}
10
- {{#if this.showTeaserInfoSection}}
11
- <span class="mx-px">|</span>
12
- {{else}}
13
- {{#if ../profiles}}
14
- <span class="mx-px">|</span>
15
- {{/if}}
16
- {{/if}}
17
- {{else}}
18
- {{~#if this.showTeaserInfoDateTime}}
2
+
3
+ {{!--Teaser-Info--}}
4
+ {{#with this.teaserInfo}}
5
+ {{#if this.showTeaserInfo~}}
6
+ {{~#if this.showTeaserInfoDate}}
19
7
  {{~#with ../teaserDate}}
20
- <time datetime="{{this.htmlDateTime}}">{{loca "date_simple_at" this.dateSeparatorTime}}</time>
21
- {{/with~}}
22
- {{#if this.showTeaserInfoSection}}
23
- <span class="mx-px">|</span>
24
- {{else}}
25
- {{#if ../profiles}}
26
- <span class="mx-px">|</span>
27
- {{/if}}
28
- {{/if}}
29
- {{/if~}}
30
- {{/if~}}
8
+ <time datetime="{{this.htmlDateTime}}">{{this.date}}</time>
9
+ {{/with~}}
10
+ <span class="mx-px last-of-type:hidden">|</span>
11
+ {{else}}
12
+ {{~#if this.showTeaserInfoDateTime}}
13
+ {{~#with ../teaserDate}}
14
+ <time datetime="{{this.htmlDateTime}}">{{loca "date_simple_at" this.dateSeparatorTime}}</time>
15
+ {{/with~}}
16
+ <span class="mx-px last-of-type:hidden">|</span>
17
+ {{/if~}}
18
+ {{/if~}}
31
19
 
32
- {{~#if this.showTeaserInfoSection}}
33
- <span class="uppercase">
34
- {{../documentSection~}}
35
- </span>
36
- {{#if ../profiles}}
37
- <span class="mx-px">|</span>
20
+ {{~#if this.showTeaserInfoSection}}
21
+ <span class="uppercase">
22
+ {{../documentSection~}}
23
+ </span>
24
+ <span class="mx-px last-of-type:hidden">|</span>
38
25
  {{/if}}
39
- {{/if}}
40
-
41
- {{/if}}
42
- {{/with}}
43
26
 
44
- {{!--Profiles--}}
45
- {{#if profiles}}
46
- <span>{{profiles}}</span>
47
- {{/if}}
27
+ {{/if}}
28
+ {{/with}}
48
29
 
49
- {{!--
50
- Gap here only if comments exists and at least one of those elements above
51
- is shown. Really ugly because we don't have any or-helper yet...
52
- --}}
53
- {{#if commentLink}}
30
+ {{!--Profiles--}}
54
31
  {{#if profiles}}
55
- <span class="mr-2.5"></span>
56
- {{else}}
57
- {{#if teaserInfo.showTeaserInfoSection}}
58
- <span class="mr-2.5"></span>
59
- {{else}}
60
- {{#if teaserInfo.showTeaserInfoDate}}
61
- <span class="mr-2.5"></span>
62
- {{else}}
63
- {{#if teaserInfo.showTeaserInfoDateTime}}
64
- <span class="mr-2.5"></span>
65
- {{/if}}
66
- {{/if}}
67
- {{/if}}
68
- {{/if}}
69
- {{/if}}
32
+ <span>{{profiles}}</span>
33
+ <span class="mx-px last-of-type:hidden">|</span>
34
+ {{/if}}
70
35
 
71
36
  {{!--Comments--}}
72
37
  {{> components/teaser/components/teaser_comments}}
73
38
 
74
- </p>
39
+ </p>
@@ -1,11 +1,8 @@
1
1
  import { ArgsTable, Meta, Story, Preview } from "@storybook/addon-docs";
2
- import 'core-js/actual/structured-clone';
3
- import { addCommentLink } from '../jsonHelper';
4
2
  import byline from "./teaser_byline.hbs";
5
- import comments from '../data/teaser_commentLink.json';
6
- import teaser from '../data/teaser_article.json';
7
- let byline_with_comments = structuredClone(teaser);
8
- addCommentLink(byline_with_comments, comments.commentLink);
3
+ import teaserWithoutComments from '../fixtures/teaser_standard_xxl_serif.json';
4
+ import teaserWithComments from '../fixtures/teaser_standard_xxl_serif_comments.json';
5
+ import teaserWithoutTeaserinfo from '../fixtures/teaser_comments_without_teaserinfo.json';
9
6
 
10
7
  <Meta title="Komponenten/Teaser/Komponenten/Byline"/>
11
8
 
@@ -16,13 +13,13 @@ export const Template = ({ ...args }) => {
16
13
  # Byline
17
14
 
18
15
  <Preview withToolbar>
19
- <Story name="default" args={teaser}>
16
+ <Story name="default" args={teaserWithoutComments.logicItem.includeModel}>
20
17
  {Template.bind({})}
21
18
  </Story>
22
- <Story name="with comments" args={byline_with_comments}>
19
+ <Story name="with comments" args={teaserWithComments.logicItem.includeModel}>
23
20
  {Template.bind({})}
24
21
  </Story>
25
- <Story name="comments only" args={comments}>
22
+ <Story name="comments only" args={teaserWithoutTeaserinfo.logicItem.includeModel}>
26
23
  {Template.bind({})}
27
24
  </Story>
28
25
  </Preview>
@@ -0,0 +1 @@
1
+ {"isSsi":true,"logicItem":{"includePath":"components/teaser/teaser_standard","includeModel":{"byline":"Byline","title":"Abgeschobene Geschwister aus Syrien zurück in Wolfhagen","topline":"Überglücklich, aber ohne Mama","isSerifHeading":true,"extendedTitle":"","teasertype":"standard","teasersize":"xxl","teaserDate":{"htmlDate":"20.02.1983","date":"20.02.1983","dateSeparatorTime":"20.02.1983"},"teaserInfo":{"showTeaserInfo":false,"showTeaserInfoSection":true,"showTeaserInfoChannel":true,"showTeaserInfoAll":true,"showTeaserInfoDate":true,"showTeaserInfoDateTime":true,"showTeaserInfoProgramRef":true},"teaserImage":{"copyrightWithLinks":"","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"https://picsum.photos/id/188/480/270","sources":[{"sizes":"(min-width: 1010px) 960px, 100vw","srcset":"https://picsum.photos/id/188/320/180 320w, https://picsum.photos/id/188/480/270 480w, https://picsum.photos/id/188/640/360 640w, https://picsum.photos/id/188/960/540 960w, https://picsum.photos/id/188/1920/1080 1920w"}]}},"commentLink":{"link":{"url":"/teaser1-comments","webviewUrl":"/teaser1-comments#webview","isTargetBlank":false,"readMoreText":{"readMoreScreenreader":"Zu den Kommentaren des Artikels"},"content":{"commentNumber":"666","hasOneComment":false}}},"documentSection":"Gesellschaft","hasMediaButtons":false,"dontLazyload":true,"realTeasersize":"100","isStandardTeaser":true,"isHeroTeaser":true,"isMediaTeaser":false,"isGuide":false,"isProgram":false,"isEvent":false,"isTicker":false,"isAudio":false,"isVideo":false,"isPodcastEpisode":false,"isExtOrBrandLink":false,"isAuthor":false,"copyright":"Copyright Text","audioAuthor":"Audio Author","hasStatus":false,"hasTeaserItem":true,"allowAVConsumption":false,"displayEpgInfos":false,"aspectRatio":"ar--teaserTop","hideGeotag":false,"hideEditableByline":true,"doTracking":true,"trackingForArdMediatheksLink":false,"showMediatheksLink":false,"showAirdate":false,"showProfileInfoAsByline":false,"obsolet_brandOfTeaser":"hessenschau","headingSize":"h1","icon":"ortsmarke","imageVariant":"topteaser","shorttext":"Vor einem Jahr wurde die syrische Familie Kheder aus Wolfhagen abgeschoben. Die Gemeinde setzte alle Hebel in Bewegung, um Mutter, Tochter und Sohn zurückzuholen. Im Fall der Kinder hat das nun zu einem Happy End geführt. Doch ihre Mutter fehlt.","sophoraId":"rueckkehr-nach-abschiebung-wolfhagen--100","profiles":"","teaserLead":{"avDocument":"","image":""},"geotag":[{"title":"Wolfhagen"}],"link":{"url":"/teaser1","webviewUrl":"/teaser1#webview","isTargetBlank":false,"hasIcon":false,"iconName":"iconName","readMoreText":{"readMoreScreenreader":"Zum Artikel","readMore":"mehr","readMoreLong":"read More Long"},"content":{"teasertype":"standard","imageVariant":"topteaser","isFileDownload":false,"topline":"Überglücklich, aber ohne Mama","trackingData":{"secondLevelId":"2","pageName":"hessenschau"},"teaserImage":{"copyrightWithLinks":"","responsiveImage":{"asPicture":false,"asImage":true,"fallback":"https://picsum.photos/id/188/480/270","sources":[{"sizes":"(min-width: 1010px) 960px, 100vw","srcset":"https://picsum.photos/id/188/320/180 320w, https://picsum.photos/id/188/480/270 480w, https://picsum.photos/id/188/640/360 640w, https://picsum.photos/id/188/960/540 960w, https://picsum.photos/id/188/1920/1080 1920w"}]}}}}}}}