@bytebrand/fe-ui-core 4.2.124 → 4.2.126

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.124",
3
+ "version": "4.2.126",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -19,7 +19,7 @@ const PreviewCookieModal = ({ toggleModal, setModal, handleSentryInit } : IPrevi
19
19
  };
20
20
 
21
21
  const onDisableAll = () => {
22
- localStorage.setItem('cookieConfig', JSON.stringify({ analytics: {}, marketing: {} }));
22
+ localStorage.setItem('cookieConfig', JSON.stringify({'marketing':['test_cookie','tuuid','tuuid_lu','c','CMID','CMPS','CMPRO','uuid2','IDE','um','umeh','cf','cip','cnac','car','KRTBCOOKIE_97','IDSYNC','dpm','_kuid_','cto_bundle','visitor-id','data-c-ts','data-c','CMTS','mv_tokens','A3','mv_tokens_eu-v1','am_tokens','am_tokens_eu-v1','iteo'],'analytics':['PugT','locale','uid','callback','demdex','_fbp','hotjar','_clck','_clsk','_uetsid','_uetvid','sentry','analytics_storage','ad_storage','functionality_storage','personalization_storage','security_storage']}));
23
23
  toggleModal();
24
24
  };
25
25
 
@@ -17,28 +17,47 @@ interface IListItem {
17
17
  Link?: any;
18
18
  handleClose?: () => void;
19
19
  isActive?: boolean;
20
+ isExternalLink?: boolean;
20
21
  }
21
22
 
22
- const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose, isActive }: IListItem) => {
23
+ const ListItem = ({ icon, label, amount, divider, onClick, href, isComponent, Link, handleClose, isActive, isExternalLink }: IListItem) => {
23
24
 
24
25
  const onMenuItemClick = (e: React.MouseEvent<HTMLLIElement>) => {
25
26
  onClick(e);
26
27
  handleClose();
27
28
  };
28
29
 
29
- return !!href ? (
30
- <Link color='#4C4E64DE' variant='caption' to={href} underline='none' onClick={onClick}>
31
- <MenuItem
32
- divider={divider}
33
- >
34
- {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
35
- <ListItemText>
36
- {label}
37
- </ListItemText>
38
- {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
39
- </MenuItem>
40
- </Link>
41
- ) : (
30
+ const renderLink = () => {
31
+ return (
32
+ <>
33
+ {isExternalLink ? (
34
+ <a href={href}>
35
+ <MenuItem
36
+ divider={divider}
37
+ >
38
+ {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
39
+ <ListItemText>
40
+ {label}
41
+ </ListItemText>
42
+ {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
43
+ </MenuItem>
44
+ </a>
45
+ ) : (
46
+ <Link color='#4C4E64DE' variant='caption' to={href} underline='none' onClick={onClick}>
47
+ <MenuItem divider={divider}>
48
+ {icon && <ListItemIcon><IconSVG customDimensions name={icon} /></ListItemIcon>}
49
+ <ListItemText>
50
+ {label}
51
+ </ListItemText>
52
+ {(amount || amount === 0) && <AmountBlock>{amount}</AmountBlock>}
53
+ </MenuItem>
54
+ </Link>
55
+ )}
56
+ </>
57
+ )
58
+ }
59
+
60
+ return !!href ? renderLink() : (
42
61
  <MenuItem
43
62
  onClick={onMenuItemClick}
44
63
  divider={divider}