@bytebrand/fe-ui-core 4.1.60 → 4.1.61
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
|
@@ -9,7 +9,7 @@ import classNames from 'classnames';
|
|
|
9
9
|
import MaterialSwitch from '../../../MaterialSwitch/MaterialSwitch';
|
|
10
10
|
import { COOKIE_SCHEMA } from '../../../../../framework/constants/common';
|
|
11
11
|
|
|
12
|
-
const ManageCookieModal = () => {
|
|
12
|
+
const ManageCookieModal = ({ onClearModalState }) => {
|
|
13
13
|
const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(true);
|
|
14
14
|
const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(true);
|
|
15
15
|
const [analyticsSwitches, setAnalyticsSwitches] = useState({});
|
|
@@ -17,8 +17,8 @@ const ManageCookieModal = () => {
|
|
|
17
17
|
|
|
18
18
|
useEffect(
|
|
19
19
|
() => {
|
|
20
|
-
const newAnalyticsSwitches = COOKIE_SCHEMA.analytics.reduce((acc, item) => ({ ...acc, [item]: true }), {});
|
|
21
|
-
const newMarketingSwitches = COOKIE_SCHEMA.marketing.reduce((acc, item) => ({ ...acc, [item]: true }), {});
|
|
20
|
+
const newAnalyticsSwitches = Object.keys(COOKIE_SCHEMA.analytics).reduce((acc, item) => ({ ...acc, [item]: true }), {});
|
|
21
|
+
const newMarketingSwitches = Object.keys(COOKIE_SCHEMA.marketing).reduce((acc, item) => ({ ...acc, [item]: true }), {});
|
|
22
22
|
setAnalyticsSwitches(newAnalyticsSwitches);
|
|
23
23
|
setMarketingSwitches(newMarketingSwitches);
|
|
24
24
|
},
|
|
@@ -47,10 +47,16 @@ const ManageCookieModal = () => {
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const necessarySwitchProps = {
|
|
50
|
+
disabled: true,
|
|
50
51
|
value: true,
|
|
51
52
|
onChange: () => {}
|
|
52
53
|
};
|
|
53
54
|
|
|
55
|
+
const onAccept = (value: object) => {
|
|
56
|
+
localStorage.setItem('cookieConfig', JSON.stringify( value || ));
|
|
57
|
+
onClearModalState();
|
|
58
|
+
};
|
|
59
|
+
|
|
54
60
|
return (
|
|
55
61
|
<div className={styles.modalWrapper}>
|
|
56
62
|
<IconSVG name='autodeLogo' customDimensions />
|
|
@@ -70,10 +76,10 @@ const ManageCookieModal = () => {
|
|
|
70
76
|
For example, we store your website data collection preferences so we can honor them if you return to our site.
|
|
71
77
|
You can disable these cookies in your browser settings but if you do the site may not work as intended.
|
|
72
78
|
</span>
|
|
73
|
-
{COOKIE_SCHEMA.necessary.map(cookie =>
|
|
79
|
+
{Object.keys(COOKIE_SCHEMA.necessary).map(cookie =>
|
|
74
80
|
<div className={styles.switchBlock}>
|
|
75
|
-
<span>{cookie}</span>
|
|
76
|
-
<MaterialSwitch value={true} onChange={(
|
|
81
|
+
<span>{`${COOKIE_SCHEMA.necessary[cookie].name} (${cookie})`}</span>
|
|
82
|
+
<MaterialSwitch disabled={true} value={true} onChange={() => {}} />
|
|
77
83
|
</div>
|
|
78
84
|
)}
|
|
79
85
|
</MaterialAccordionGroup>
|
|
@@ -88,9 +94,9 @@ const ManageCookieModal = () => {
|
|
|
88
94
|
damit wir Ihnen relevantere Informationen präsentieren können.
|
|
89
95
|
For example, we collect information about which pages you visit to help us present more relevant information.
|
|
90
96
|
</span>
|
|
91
|
-
{COOKIE_SCHEMA.analytics.map(cookie =>
|
|
97
|
+
{Object.keys(COOKIE_SCHEMA.analytics).map(cookie =>
|
|
92
98
|
<div className={styles.switchBlock}>
|
|
93
|
-
<span>{cookie}</span>
|
|
99
|
+
<span>{`${COOKIE_SCHEMA.analytics[cookie].name} (${cookie})`}</span>
|
|
94
100
|
<MaterialSwitch
|
|
95
101
|
value={analyticsSwitches[cookie]}
|
|
96
102
|
onChange={() => { setAnalyticsSwitches(s => ({ ...s, [cookie]: !s[cookie] })); }}
|
|
@@ -109,9 +115,9 @@ const ManageCookieModal = () => {
|
|
|
109
115
|
Website besuchen, anzeigen.
|
|
110
116
|
For example, we may serve you a personalized ad based on the pages you visit on our site.
|
|
111
117
|
</span>
|
|
112
|
-
{COOKIE_SCHEMA.marketing.map(cookie =>
|
|
118
|
+
{Object.keys(COOKIE_SCHEMA.marketing).map(cookie =>
|
|
113
119
|
<div className={styles.switchBlock}>
|
|
114
|
-
<span>
|
|
120
|
+
<span>{`${COOKIE_SCHEMA.marketing[cookie].name} (${cookie})`}</span>
|
|
115
121
|
<MaterialSwitch
|
|
116
122
|
value={marketingSwitches[cookie]}
|
|
117
123
|
onChange={() => setMarketingSwitches(s => ({ ...s, [cookie]: !s[cookie] }))}
|
|
@@ -121,8 +127,8 @@ const ManageCookieModal = () => {
|
|
|
121
127
|
</MaterialAccordionGroup>
|
|
122
128
|
</div>
|
|
123
129
|
<div className={styles.buttonsContainer}>
|
|
124
|
-
<Button className={classNames(styles.modalBtn, styles.outlinedBtn)} variant='outlined'>Cookie-Einstellungen</Button>
|
|
125
|
-
<Button className={styles.modalBtn}>zustimmen</Button>
|
|
130
|
+
<Button onClick={onAccept}className={classNames(styles.modalBtn, styles.outlinedBtn)} variant='outlined'>Cookie-Einstellungen</Button>
|
|
131
|
+
<Button onClick={() => onAccept({})} className={styles.modalBtn}>zustimmen</Button>
|
|
126
132
|
</div>
|
|
127
133
|
</div>
|
|
128
134
|
);
|
|
@@ -8,9 +8,12 @@ export const QUOTES_SLIDES_TO_SHOW_DEFAULT = 3;
|
|
|
8
8
|
|
|
9
9
|
export const HUNDRED = 100;
|
|
10
10
|
|
|
11
|
+
/* tslint:disable */
|
|
11
12
|
export const COOKIE_SCHEMA = {
|
|
12
|
-
necessary:
|
|
13
|
-
analytics:
|
|
14
|
-
marketing:
|
|
15
|
-
'
|
|
13
|
+
necessary: { gdpr: { name: 'DSGVO' }, __cfruid: { name: 'Cloudflare ' }, cf_chl_2: { name: 'Cloudflare für Webverkehr zu identifizieren' }, cf_chl_rc_ni: { name: 'Cloudflare für den internen Gebrauch' }, ['next-i18next']: { name: 'Spracheinstellungen' }, _cfuvid: { name: 'Cloudflare WAF' }, cf_chl_prog: { name: 'Cloudflare für JS' }, __cf_bm: { name: 'Cloudflare bot' } },
|
|
14
|
+
analytics: { PugT: { name: 'PubMatic' }, locale: { name: 'Facebook' }, _gcl_au: { name: 'Google Tag Manager' }, _ga: { name: 'Google Analytics' }, _gid: { name: 'Google Analytics' }, ['_gat_UA-31842-13']: { name: 'Google Analytics' }, uid: { name: 'criteo' }, callback: { name: 'callback' }, demdex: { name: 'demdex' }, _hjFirstSeen: { name: 'Hotjar' }, _hjIncludedInSessionSample: { name: 'Hotjar' }, _hjIncludedInPageviewSample: { name: 'Hotjar' }, _hjAbsoluteSessionInProgress: { name: 'Hotjar' }, vuid: { name: 'Vimeo' } },
|
|
15
|
+
marketing: { _fbp: { name: 'PubMatic' }, test_cookie: { name: 'PubMatic' }, tuuid: { name: 'PubMatic' }, tuuid_lu: { name: 'PubMatic' }, c: { name: 'PubMatic' }, CMID: { name: 'PubMatic' }, CMPS: { name: 'PubMatic' }, CMPRO: { name: 'PubMatic' }, uuid2: { name: 'PubMatic' }, IDE: { name: 'PubMatic' }, um: { name: 'PubMatic' }, umeh: { name: 'PubMatic' }, cf: { name: 'PubMatic' }, cip: { name: 'PubMatic' }, cnac: { name: 'PubMatic' }, car: { name: 'PubMatic' },
|
|
16
|
+
KRTBCOOKIE_97: { name: 'PubMatic' }, IDSYNC: { name: 'PubMatic' }, dpm: { name: 'PubMatic' }, _kuid_: { name: 'PubMatic' }, fr: { name: 'PubMatic' }, cto_bundle: { name: 'PubMatic' }, ['visitor-id']: { name: 'PubMatic' }, ['data-c-ts']: { name: 'PubMatic' }, ['data-c']: { name: 'PubMatic' }, CMTS: { name: 'PubMatic' }, ['mv_tokens']: { name: 'PubMatic' }, A3: { name: 'PubMatic' }, ['mv_tokens_eu-v1']: { name: 'PubMatic' }, am_tokens: { name: 'PubMatic' },
|
|
17
|
+
['am_tokens_eu-v1']: { name: 'PubMatic' }, _hjSessionUser_2590373: { name: 'PubMatic' }, iteo: { name: 'PubMatic' }, _hjSession_2590373: { name: 'PubMatic' }, MyVerivoxAuth: { name: 'PubMatic' }, VxCheckAuth: { name: 'PubMatic' }}
|
|
16
18
|
};
|
|
19
|
+
/* tslint:enable */
|