hr-design-system-handlebars 1.100.5 → 1.100.7

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,27 @@
1
+ # v1.100.7 (Tue Sep 17 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - DPE-3358 Falsche Vorschau beim Sharing von Dokumenten [#1069](https://github.com/mumprod/hr-design-system-handlebars/pull/1069) ([@Sunny1112358](https://github.com/Sunny1112358))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@Sunny1112358](https://github.com/Sunny1112358)
10
+
11
+ ---
12
+
13
+ # v1.100.6 (Tue Sep 17 2024)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - Dpe 3292 [#1067](https://github.com/mumprod/hr-design-system-handlebars/pull/1067) ([@vascoeduardo](https://github.com/vascoeduardo))
18
+
19
+ #### Authors: 1
20
+
21
+ - Vasco ([@vascoeduardo](https://github.com/vascoeduardo))
22
+
23
+ ---
24
+
1
25
  # v1.100.5 (Mon Sep 16 2024)
2
26
 
3
27
  #### 🐛 Bug Fix
@@ -3141,6 +3141,10 @@ article.indexTextDS .indexTextHighlighted .link {
3141
3141
  --tw-text-opacity: 1;
3142
3142
  color: rgba(22, 163, 74, var(--tw-text-opacity));
3143
3143
  }
3144
+ .text-green-800 {
3145
+ --tw-text-opacity: 1;
3146
+ color: rgba(22, 101, 52, var(--tw-text-opacity));
3147
+ }
3144
3148
  .text-inherit {
3145
3149
  color: inherit;
3146
3150
  }
@@ -3431,7 +3435,7 @@ article.indexTextDS .indexTextHighlighted .link {
3431
3435
  border-bottom-color: var(--color-secondary-ds);
3432
3436
  }
3433
3437
  .counter-reset {
3434
- counter-reset: cnt1726485581947;
3438
+ counter-reset: cnt1726580940248;
3435
3439
  }
3436
3440
  .hyphens-auto {
3437
3441
  -webkit-hyphens: auto;
@@ -3839,7 +3843,7 @@ article.indexTextDS .indexTextHighlighted .link {
3839
3843
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3840
3844
  }
3841
3845
  .-ordered {
3842
- counter-increment: cnt1726485581947 1;
3846
+ counter-increment: cnt1726580940248 1;
3843
3847
  }
3844
3848
  .-ordered::before {
3845
3849
  position: absolute;
@@ -3855,7 +3859,7 @@ article.indexTextDS .indexTextHighlighted .link {
3855
3859
  letter-spacing: .0125em;
3856
3860
  --tw-text-opacity: 1;
3857
3861
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3858
- content: counter(cnt1726485581947);
3862
+ content: counter(cnt1726580940248);
3859
3863
  }
3860
3864
  /*! ****************************/
3861
3865
  /*! DataPolicy stuff */
@@ -15,7 +15,6 @@ export default (module) => ({
15
15
  if (navigator.share && isMobile) {
16
16
  navigator.share({
17
17
  title: document.title,
18
- text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
19
18
  url: window.location.href,
20
19
  })
21
20
  .then(() => {
@@ -76,16 +76,16 @@
76
76
  </div>
77
77
  <div class="hidden">
78
78
  <b>DEBUGG</b>
79
- <div>isFocused:<span x-text="isFocused"></span></div>
80
- <div>wasFocused:<span x-text="wasFocused"></span></div>
81
- <div>valid:<span x-text="valid"></span></div>
82
- <div>validEmail:<span x-text="validEmail"></span></div>
83
- <div>hideDescription:<span x-text="hideDescription"></span></div>
84
- <div>hideError:<span x-text="hideError"></span></div>
85
- <div>input.length:<span x-text="input{{getRandom}}.length "></span></div>
86
- <div>input:<span x-text="input{{getRandom}} "></span></div>
87
- <div>errorMessage:<span x-text="errorMessage"></span></div>
88
- </div>
79
+ <div>isFocused:<span x-text="isFocused" class="font-bold" :class="isFocused ? 'text-green-800' : 'text-red-700'"></span></div>
80
+ <div>wasFocused:<span x-text="wasFocused" class="font-bold" :class="wasFocused ? 'text-green-800' : 'text-red-700'"></span></div>
81
+ <div>valid:<span x-text="valid" class="font-bold" :class="valid ? 'text-green-800' : 'text-red-700'"></span></div>
82
+ <div>validEmail:<span x-text="validEmail" class="font-bold" :class="validEmail ? 'text-green-800' : 'text-red-700'"></span></div>
83
+ <div>hideDescription:<span x-text="hideDescription()" class="font-bold" :class="hideDescription() ? 'text-green-800' : 'text-red-700'"></span></div>
84
+ <div>hideError:<span x-text="hideError()" class="font-bold" :class="hideError() ? 'text-green-800' : 'text-red-700'"></span></div>
85
+ <div>input.length:<span x-text="input{{getRandom}}.length " class="font-bold" ></span></div>
86
+ <div>input:<span x-text="input{{getRandom}} " class="font-bold" ></span></div>
87
+ <div>errorMessage:<span x-text="errorMessage" class="font-bold" ></span></div>
88
+ </div>
89
89
  <script>
90
90
  function inputHandler() {
91
91
  return {
@@ -95,19 +95,18 @@
95
95
  isFocused: false,
96
96
  {{#if _isEmail}}
97
97
  validEmail: false,
98
- errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
- hideDescription() {return (!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused)},
100
- hideError() {return !this.hideDescription()},
101
-
102
- validateEmail() {
103
- var email = this.input{{getRandom}}
104
- var emailRegex = /^[a-zA-Z0–9._-]+@[a-zA-Z0–9.-]+\.[a-zA-Z]{2,4}$/;
105
- this.validEmail = emailRegex.test(email);
106
- //this.validEmail = email.includes('@');
98
+ errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
+ hideDescription() { return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused))},
100
+ hideError() { return Boolean(!this.hideDescription())},
101
+ validateEmail(){
102
+ var email = this.input{{getRandom}}.trim();
103
+ // https://github.com/colinaut/alpinejs-plugin-simple-validate/blob/main/src/index.js slashes are double because webpack removes them
104
+ var emailRegexEscaped = /^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;
105
+ //https://emailregex.com/index.html slashes are double because webpack removes them
106
+ var emailRegexV2Escaped = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/;
107
+ this.validEmail = emailRegexV2Escaped.test(email);
107
108
  }
108
-
109
109
  {{else}}
110
-
111
110
  hideError() {return (this.valid || !this.wasFocused || this.isFocused)},
112
111
  hideDescription() {return !this.valid && this.wasFocused && !this.isFocused},
113
112
  errorMessage: "{{_errorMandatory}}"
@@ -76,16 +76,16 @@
76
76
  </div>
77
77
  <div class="hidden">
78
78
  <b>DEBUGG</b>
79
- <div>isFocused:<span x-text="isFocused"></span></div>
80
- <div>wasFocused:<span x-text="wasFocused"></span></div>
81
- <div>valid:<span x-text="valid"></span></div>
82
- <div>validEmail:<span x-text="validEmail"></span></div>
83
- <div>hideDescription:<span x-text="hideDescription"></span></div>
84
- <div>hideError:<span x-text="hideError"></span></div>
85
- <div>input.length:<span x-text="input{{getRandom}}.length "></span></div>
86
- <div>input:<span x-text="input{{getRandom}} "></span></div>
87
- <div>errorMessage:<span x-text="errorMessage"></span></div>
88
- </div>
79
+ <div>isFocused:<span x-text="isFocused" class="font-bold" :class="isFocused ? 'text-green-800' : 'text-red-700'"></span></div>
80
+ <div>wasFocused:<span x-text="wasFocused" class="font-bold" :class="wasFocused ? 'text-green-800' : 'text-red-700'"></span></div>
81
+ <div>valid:<span x-text="valid" class="font-bold" :class="valid ? 'text-green-800' : 'text-red-700'"></span></div>
82
+ <div>validEmail:<span x-text="validEmail" class="font-bold" :class="validEmail ? 'text-green-800' : 'text-red-700'"></span></div>
83
+ <div>hideDescription:<span x-text="hideDescription()" class="font-bold" :class="hideDescription() ? 'text-green-800' : 'text-red-700'"></span></div>
84
+ <div>hideError:<span x-text="hideError()" class="font-bold" :class="hideError() ? 'text-green-800' : 'text-red-700'"></span></div>
85
+ <div>input.length:<span x-text="input{{getRandom}}.length " class="font-bold" ></span></div>
86
+ <div>input:<span x-text="input{{getRandom}} " class="font-bold" ></span></div>
87
+ <div>errorMessage:<span x-text="errorMessage" class="font-bold" ></span></div>
88
+ </div>
89
89
  <script>
90
90
  function inputHandler() {
91
91
  return {
@@ -95,19 +95,18 @@
95
95
  isFocused: false,
96
96
  {{#if _isEmail}}
97
97
  validEmail: false,
98
- errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
- hideDescription() {return (!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused)},
100
- hideError() {return !this.hideDescription()},
101
-
102
- validateEmail() {
103
- var email = this.input{{getRandom}}
104
- var emailRegex = /^[a-zA-Z0–9._-]+@[a-zA-Z0–9.-]+\.[a-zA-Z]{2,4}$/;
105
- this.validEmail = emailRegex.test(email);
106
- //this.validEmail = email.includes('@');
98
+ errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
+ hideDescription() { return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused))},
100
+ hideError() { return Boolean(!this.hideDescription())},
101
+ validateEmail(){
102
+ var email = this.input{{getRandom}}.trim();
103
+ // https://github.com/colinaut/alpinejs-plugin-simple-validate/blob/main/src/index.js slashes are double because webpack removes them
104
+ var emailRegexEscaped = /^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;
105
+ //https://emailregex.com/index.html slashes are double because webpack removes them
106
+ var emailRegexV2Escaped = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/;
107
+ this.validEmail = emailRegexV2Escaped.test(email);
107
108
  }
108
-
109
109
  {{else}}
110
-
111
110
  hideError() {return (this.valid || !this.wasFocused || this.isFocused)},
112
111
  hideDescription() {return !this.valid && this.wasFocused && !this.isFocused},
113
112
  errorMessage: "{{_errorMandatory}}"
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.100.5",
9
+ "version": "1.100.7",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -20,17 +20,7 @@ export default {
20
20
  },
21
21
  ],
22
22
  }
23
- const TemplateInput = (args) => {
24
- let hbsTemplate = handlebars.compile(`
25
- {{#>components/forms/backgroundBox }}
26
- <form class="relative flex flex-col justify-center overflow-hidden group" id="form--{{nextRandom}}" action="{{this.url}}" method="post" enctype="{{if this.isMultipart 'multipart/form-data' 'application/x-www-form-urlencoded'}}" accept-charset="utf-8" >
27
- {{> components/forms/fields }}
28
- </form>
29
- {{/components/forms/backgroundBox }}
30
- `)
31
- return hbsTemplate({ ...args })
32
- }
33
- const TemplateTextarea = (args) => {
23
+ const Template = (args) => {
34
24
  let hbsTemplate = handlebars.compile(`
35
25
  {{#>components/forms/backgroundBox }}
36
26
  <form class="relative flex flex-col justify-center overflow-hidden group" id="form--{{nextRandom}}" action="{{this.url}}" method="post" enctype="{{if this.isMultipart 'multipart/form-data' 'application/x-www-form-urlencoded'}}" accept-charset="utf-8" >
@@ -40,23 +30,24 @@ const TemplateTextarea = (args) => {
40
30
  `)
41
31
  return hbsTemplate({ ...args })
42
32
  }
33
+
43
34
  export const Input = {
44
- render: TemplateInput.bind({}),
35
+ render: Template.bind({}),
45
36
  name: 'Input',
46
37
  args: inputJson,
47
38
  }
48
39
  export const InputMandatory = {
49
- render: TemplateInput.bind({}),
40
+ render: Template.bind({}),
50
41
  name: 'Input:mandatory',
51
42
  args: inputMandatoryJson,
52
43
  }
53
44
  export const InputPrefilled = {
54
- render: TemplateInput.bind({}),
45
+ render: Template.bind({}),
55
46
  name: 'Input:prefilled',
56
47
  args: inputPrefilledJson,
57
48
  }
58
49
  export const InputFocused = {
59
- render: TemplateInput.bind({}),
50
+ render: Template.bind({}),
60
51
  name: 'Input:focus',
61
52
  args: inputJson,
62
53
  parameters: {
@@ -67,12 +58,12 @@ export const InputFocused = {
67
58
  }
68
59
  }
69
60
  export const email = {
70
- render: TemplateInput.bind({}),
61
+ render: Template.bind({}),
71
62
  name: 'Email',
72
63
  args: emailJson,
73
64
  }
74
65
  export const Textarea = {
75
- render: TemplateTextarea.bind({}),
66
+ render: Template.bind({}),
76
67
  name: 'Textarea',
77
68
  args: textareaJson,
78
69
  }
@@ -76,16 +76,16 @@
76
76
  </div>
77
77
  <div class="hidden">
78
78
  <b>DEBUGG</b>
79
- <div>isFocused:<span x-text="isFocused"></span></div>
80
- <div>wasFocused:<span x-text="wasFocused"></span></div>
81
- <div>valid:<span x-text="valid"></span></div>
82
- <div>validEmail:<span x-text="validEmail"></span></div>
83
- <div>hideDescription:<span x-text="hideDescription"></span></div>
84
- <div>hideError:<span x-text="hideError"></span></div>
85
- <div>input.length:<span x-text="input{{getRandom}}.length "></span></div>
86
- <div>input:<span x-text="input{{getRandom}} "></span></div>
87
- <div>errorMessage:<span x-text="errorMessage"></span></div>
88
- </div>
79
+ <div>isFocused:<span x-text="isFocused" class="font-bold" :class="isFocused ? 'text-green-800' : 'text-red-700'"></span></div>
80
+ <div>wasFocused:<span x-text="wasFocused" class="font-bold" :class="wasFocused ? 'text-green-800' : 'text-red-700'"></span></div>
81
+ <div>valid:<span x-text="valid" class="font-bold" :class="valid ? 'text-green-800' : 'text-red-700'"></span></div>
82
+ <div>validEmail:<span x-text="validEmail" class="font-bold" :class="validEmail ? 'text-green-800' : 'text-red-700'"></span></div>
83
+ <div>hideDescription:<span x-text="hideDescription()" class="font-bold" :class="hideDescription() ? 'text-green-800' : 'text-red-700'"></span></div>
84
+ <div>hideError:<span x-text="hideError()" class="font-bold" :class="hideError() ? 'text-green-800' : 'text-red-700'"></span></div>
85
+ <div>input.length:<span x-text="input{{getRandom}}.length " class="font-bold" ></span></div>
86
+ <div>input:<span x-text="input{{getRandom}} " class="font-bold" ></span></div>
87
+ <div>errorMessage:<span x-text="errorMessage" class="font-bold" ></span></div>
88
+ </div>
89
89
  <script>
90
90
  function inputHandler() {
91
91
  return {
@@ -95,19 +95,18 @@
95
95
  isFocused: false,
96
96
  {{#if _isEmail}}
97
97
  validEmail: false,
98
- errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
- hideDescription() {return (!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused)},
100
- hideError() {return !this.hideDescription()},
101
-
102
- validateEmail() {
103
- var email = this.input{{getRandom}}
104
- var emailRegex = /^[a-zA-Z0–9._-]+@[a-zA-Z0–9.-]+\.[a-zA-Z]{2,4}$/;
105
- this.validEmail = emailRegex.test(email);
106
- //this.validEmail = email.includes('@');
98
+ errorMessage(){ return !this.valid ? '{{_errorMandatory}}' : '{{_errorEmail}}'},
99
+ hideDescription() { return Boolean((!this.valid && this.wasFocused && !this.isFocused) || (!this.validEmail && this.wasFocused && !this.isFocused))},
100
+ hideError() { return Boolean(!this.hideDescription())},
101
+ validateEmail(){
102
+ var email = this.input{{getRandom}}.trim();
103
+ // https://github.com/colinaut/alpinejs-plugin-simple-validate/blob/main/src/index.js slashes are double because webpack removes them
104
+ var emailRegexEscaped = /^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;
105
+ //https://emailregex.com/index.html slashes are double because webpack removes them
106
+ var emailRegexV2Escaped = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/;
107
+ this.validEmail = emailRegexV2Escaped.test(email);
107
108
  }
108
-
109
109
  {{else}}
110
-
111
110
  hideError() {return (this.valid || !this.wasFocused || this.isFocused)},
112
111
  hideDescription() {return !this.valid && this.wasFocused && !this.isFocused},
113
112
  errorMessage: "{{_errorMandatory}}"
@@ -15,7 +15,6 @@ export default (module) => ({
15
15
  if (navigator.share && isMobile) {
16
16
  navigator.share({
17
17
  title: document.title,
18
- text: 'Schau mal was ich auf hessenschau.de gefunden habe!',
19
18
  url: window.location.href,
20
19
  })
21
20
  .then(() => {