hr-design-system-handlebars 1.101.1 → 1.101.2

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.101.2 (Mon Sep 23 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - Dpe 3178 b [#1073](https://github.com/mumprod/hr-design-system-handlebars/pull/1073) ([@Paul-Atreidis](https://github.com/Paul-Atreidis))
6
+
7
+ #### Authors: 1
8
+
9
+ - [@Paul-Atreidis](https://github.com/Paul-Atreidis)
10
+
11
+ ---
12
+
1
13
  # v1.101.1 (Mon Sep 23 2024)
2
14
 
3
15
  #### 🐛 Bug Fix
@@ -3454,7 +3454,7 @@ article.indexTextDS .indexTextHighlighted .link {
3454
3454
  border-bottom-color: var(--color-secondary-ds);
3455
3455
  }
3456
3456
  .counter-reset {
3457
- counter-reset: cnt1727097845054;
3457
+ counter-reset: cnt1727102904220;
3458
3458
  }
3459
3459
  .hyphens-auto {
3460
3460
  -webkit-hyphens: auto;
@@ -3862,7 +3862,7 @@ article.indexTextDS .indexTextHighlighted .link {
3862
3862
  --tw-ring-color: rgba(255, 255, 255, 0.5);
3863
3863
  }
3864
3864
  .-ordered {
3865
- counter-increment: cnt1727097845054 1;
3865
+ counter-increment: cnt1727102904220 1;
3866
3866
  }
3867
3867
  .-ordered::before {
3868
3868
  position: absolute;
@@ -3878,7 +3878,7 @@ article.indexTextDS .indexTextHighlighted .link {
3878
3878
  letter-spacing: .0125em;
3879
3879
  --tw-text-opacity: 1;
3880
3880
  color: rgba(0, 0, 0, var(--tw-text-opacity));
3881
- content: counter(cnt1727097845054);
3881
+ content: counter(cnt1727102904220);
3882
3882
  }
3883
3883
  /*! ****************************/
3884
3884
  /*! DataPolicy stuff */
@@ -75,17 +75,22 @@ const DataPolicySettings = function (context) {
75
75
 
76
76
  if (isCookieSetForSettings(toggleSwitches[i].id)) {
77
77
  toggleSwitches[i].checked = true
78
- } else if (
79
- !isCookieExistForSettings(toggleSwitches[i].id) &&
80
- toggleSwitches[i].getAttribute('initial') == 'checked'
81
- ) {
78
+ }
79
+ }
80
+ checkWhiteListAttribute()
81
+ toggleAllSwitch.checked = allTogglesExternalServiceChecked()
82
+ }
83
+ const checkWhiteListAttribute = function() {
84
+ for (let i = 0; i < toggleSwitches.length; ++i) {
85
+ if (toggleSwitches[i].getAttribute('data-whitelist') == 'true') {
82
86
  toggleSwitches[i].checked = true
83
87
  setCookieForSettings(toggleSwitches[i].id, toggleSwitches[i].checked)
88
+ } else {
89
+ toggleSwitches[i].checked = false;
90
+ setCookieForSettings(toggleSwitches[i].id, toggleSwitches[i].checked);
84
91
  }
85
92
  }
86
- toggleAllSwitch.checked = allTogglesExternalServiceChecked()
87
93
  }
88
-
89
94
  const isCookieSetForSettings = function (externalService) {
90
95
  return settingsCookie.isSettingsCookieAccepted(externalService)
91
96
  }
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.101.1",
9
+ "version": "1.101.2",
10
10
  "scripts": {
11
11
  "test": "echo \"Error: no test specified\" && exit 1",
12
12
  "storybook": "storybook dev -p 6006 public",
@@ -75,17 +75,22 @@ const DataPolicySettings = function (context) {
75
75
 
76
76
  if (isCookieSetForSettings(toggleSwitches[i].id)) {
77
77
  toggleSwitches[i].checked = true
78
- } else if (
79
- !isCookieExistForSettings(toggleSwitches[i].id) &&
80
- toggleSwitches[i].getAttribute('initial') == 'checked'
81
- ) {
78
+ }
79
+ }
80
+ checkWhiteListAttribute()
81
+ toggleAllSwitch.checked = allTogglesExternalServiceChecked()
82
+ }
83
+ const checkWhiteListAttribute = function() {
84
+ for (let i = 0; i < toggleSwitches.length; ++i) {
85
+ if (toggleSwitches[i].getAttribute('data-whitelist') == 'true') {
82
86
  toggleSwitches[i].checked = true
83
87
  setCookieForSettings(toggleSwitches[i].id, toggleSwitches[i].checked)
88
+ } else {
89
+ toggleSwitches[i].checked = false;
90
+ setCookieForSettings(toggleSwitches[i].id, toggleSwitches[i].checked);
84
91
  }
85
92
  }
86
- toggleAllSwitch.checked = allTogglesExternalServiceChecked()
87
93
  }
88
-
89
94
  const isCookieSetForSettings = function (externalService) {
90
95
  return settingsCookie.isSettingsCookieAccepted(externalService)
91
96
  }