@bytebrand/fe-ui-core 4.2.237 → 4.2.239
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/package.json
CHANGED
|
@@ -21,8 +21,8 @@ interface IMarketingSwitches {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModal) => {
|
|
24
|
-
const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(
|
|
25
|
-
const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(
|
|
24
|
+
const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(false);
|
|
25
|
+
const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(false);
|
|
26
26
|
const [analyticsSwitches, setAnalyticsSwitches] = useState<IMarketingSwitches>({});
|
|
27
27
|
const [marketingSwitches, setMarketingSwitches] = useState<IMarketingSwitches>({});
|
|
28
28
|
|
|
@@ -30,12 +30,11 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
|
|
|
30
30
|
() => {
|
|
31
31
|
const newAnalyticsSwitches = Object.values(COOKIE_SCHEMA.analytics)
|
|
32
32
|
.reduce((acc, val) => acc.concat(val), [])
|
|
33
|
-
.reduce((acc, item) => ({ ...acc, [item]:
|
|
33
|
+
.reduce((acc, item) => ({ ...acc, [item]: false }), {});
|
|
34
34
|
|
|
35
35
|
const newMarketingSwitches = Object.values(COOKIE_SCHEMA.marketing)
|
|
36
36
|
.reduce((acc, val) => acc.concat(val), [])
|
|
37
|
-
.reduce((acc, item) => ({ ...acc, [item]:
|
|
38
|
-
|
|
37
|
+
.reduce((acc, item) => ({ ...acc, [item]: false }), {});
|
|
39
38
|
setAnalyticsSwitches(newAnalyticsSwitches);
|
|
40
39
|
setMarketingSwitches(newMarketingSwitches);
|
|
41
40
|
},
|
|
@@ -46,6 +45,7 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
|
|
|
46
45
|
const newAnalyticsSwitches = Object.values(COOKIE_SCHEMA.analytics)
|
|
47
46
|
.reduce((acc, val) => acc.concat(val), [])
|
|
48
47
|
.reduce((acc, item) => ({ ...acc, [item]: value }), {});
|
|
48
|
+
|
|
49
49
|
setAnalyticsSwitches(newAnalyticsSwitches);
|
|
50
50
|
setAnalyticsMasterSwitch(value);
|
|
51
51
|
};
|
|
@@ -134,14 +134,14 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
|
|
|
134
134
|
{Object.keys(COOKIE_SCHEMA.analytics).map(cookie => {
|
|
135
135
|
const getItemsFromCategory = _get(COOKIE_SCHEMA, `analytics['${cookie}']`, null);
|
|
136
136
|
const getLinkFromCategory = _get(COOKIE_SCHEMA_LINKS, [cookie], '');
|
|
137
|
-
const isChecked = getItemsFromCategory.every((item: string) => analyticsSwitches[item] ===
|
|
137
|
+
const isChecked = getItemsFromCategory.every((item: string) => analyticsSwitches[item] === false);
|
|
138
138
|
return (
|
|
139
139
|
<div className={styles.switchBlock} key={cookie} >
|
|
140
140
|
<span className={styles.switchBlockTitle}>{cookie}</span>
|
|
141
141
|
<a className={styles.switchBlockLink} href={getLinkFromCategory} target='_blank'>Datenschutzbestimmungen</a>
|
|
142
142
|
<MaterialSwitch
|
|
143
143
|
sx={{ marginLeft: 'auto' }}
|
|
144
|
-
value={
|
|
144
|
+
value={analytcisMasterSwitch}
|
|
145
145
|
onChange={() => onHandleChangeInnerSwitchAnalytics(getItemsFromCategory, isChecked)}
|
|
146
146
|
/>
|
|
147
147
|
</div>
|
|
@@ -158,14 +158,14 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
|
|
|
158
158
|
{Object.keys(COOKIE_SCHEMA.marketing).map(cookie => {
|
|
159
159
|
const getItemsFromCategory = _get(COOKIE_SCHEMA, `marketing['${cookie}']`, null);
|
|
160
160
|
const getLinkFromCategory = _get(COOKIE_SCHEMA_LINKS, [cookie], '');
|
|
161
|
-
const isChecked = getItemsFromCategory.every((item: string) => marketingSwitches[item] ===
|
|
161
|
+
const isChecked = getItemsFromCategory.every((item: string) => marketingSwitches[item] === false);
|
|
162
162
|
return (
|
|
163
163
|
<div className={styles.switchBlock} key={cookie} >
|
|
164
164
|
<span className={styles.switchBlockTitle}>{cookie}</span>
|
|
165
165
|
<a className={styles.switchBlockLink} href={getLinkFromCategory} target='_blank'>Datenschutzbestimmungen</a>
|
|
166
166
|
<MaterialSwitch
|
|
167
167
|
sx={{ marginLeft: 'auto' }}
|
|
168
|
-
value={
|
|
168
|
+
value={marketingMasterSwitch}
|
|
169
169
|
onChange={() => onHandleChangeInnerSwitchMarketing(getItemsFromCategory, isChecked)}
|
|
170
170
|
/>
|
|
171
171
|
</div>
|
|
@@ -174,7 +174,7 @@ const ManageCookieModal = ({ toggleModal, handleSentryInit } : IManageCookieModa
|
|
|
174
174
|
</MaterialAccordionGroup>
|
|
175
175
|
</div>
|
|
176
176
|
<div className={styles.buttonsContainer}>
|
|
177
|
-
<Button onClick={() => onAccept()} className={classNames(styles.modalBtn, styles.outlinedBtn)}
|
|
177
|
+
<Button onClick={() => onAccept()} className={classNames(styles.modalBtn, styles.outlinedBtn)} >Auswahl speichern</Button>
|
|
178
178
|
<Button onClick={() => onAccept({})} className={styles.modalBtn}>Alles akzeptieren</Button>
|
|
179
179
|
</div>
|
|
180
180
|
</div>
|
|
@@ -20,7 +20,7 @@ const PreviewCookieModal = ({ toggleModal, setModal, handleSentryInit } : IPrevi
|
|
|
20
20
|
|
|
21
21
|
const onDisableAll = () => {
|
|
22
22
|
localStorage.setItem('cookieConfig', JSON.stringify({
|
|
23
|
-
'marketing':['cf','cip','cnac','car','test_cookie','IDE', 'bid'],
|
|
23
|
+
'marketing':['cf','cip','cnac','car','test_cookie','IDE', 'bid','youtube'],
|
|
24
24
|
'analytics':['sentry','callback','locale','uid','PugT','demdex','cto_bundle','tuuid','tuuid_lu','c','CMID','CMPS','CMPRO','uuid2','um','umeh','KRTBCOOKIE_97','IDSYNC','dpm','_kuid_','visitor-id','data-c-ts','data-c','CMTS','mv_tokens','A3','mv_tokens_eu-v1','am_tokens','am_tokens_eu-v1','iteo','_fbp','_clck','_clsk','_uetsid','_uetvid','analytics_storage','ad_storage','functionality_storage','personalization_storage','security_storage','hotjar']
|
|
25
25
|
}));
|
|
26
26
|
updateCookieList(handleSentryInit);
|
|
@@ -551,7 +551,7 @@ export function setUtmParameters() {
|
|
|
551
551
|
}
|
|
552
552
|
|
|
553
553
|
export const updateCookieList = (handleSentryInit: () => void) => {
|
|
554
|
-
const cookieConfig = JSON.parse(localStorage.getItem('
|
|
554
|
+
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
555
555
|
let isSentryGranted = true; // Sentry
|
|
556
556
|
let disabledCookies: any[] = [];
|
|
557
557
|
const parsedUrl = new URL(window.location.href);
|