@bytebrand/fe-ui-core 4.1.70 → 4.1.72

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.1.70",
3
+ "version": "4.1.72",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -120,5 +120,6 @@ export default memo(EngineTransDriveWidget, (prevProps: any, nextProps: any) =>
120
120
  isEqual(prevProps.DRIVE_TYPE.values, nextProps.DRIVE_TYPE.values) &&
121
121
  isEqual(prevProps.TRANSMISSION.values, nextProps.TRANSMISSION.values) &&
122
122
  prevProps.FUEL.values.length === nextProps.FUEL.values.length &&
123
+ isEqual(prevProps.FUEL.aggregation, nextProps.FUEL.aggregation) &&
123
124
  prevProps.t === nextProps.t;
124
125
  });
@@ -11,7 +11,7 @@ import { updateCookieList } from '../../../../../framework/utils/CommonUtils';
11
11
 
12
12
  import styles from './ManageCookieModal.styl';
13
13
 
14
- const ManageCookieModal = ({ onClearModalState }) => {
14
+ const ManageCookieModal = ({ toggleModal }) => {
15
15
  const [analytcisMasterSwitch, setAnalyticsMasterSwitch] = useState(true);
16
16
  const [marketingMasterSwitch, setMarketingMasterSwitch] = useState(true);
17
17
  const [analyticsSwitches, setAnalyticsSwitches] = useState({});
@@ -62,7 +62,7 @@ const ManageCookieModal = ({ onClearModalState }) => {
62
62
  };
63
63
  localStorage.setItem('cookieConfig', JSON.stringify(cookieConfig));
64
64
  updateCookieList();
65
- onClearModalState();
65
+ toggleModal();
66
66
  };
67
67
 
68
68
  return (
@@ -528,14 +528,19 @@ export function setUtmParameters() {
528
528
  const expiresDate = new Date();
529
529
  expiresDate.setDate(expiresDate.getDate() + 1);
530
530
 
531
- document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${config.DOMAIN};path=/`;
531
+ const parsedUrl = new URL(window.location.href);
532
+ const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
533
+
534
+ document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
532
535
  };
533
536
 
534
537
  export const updateCookieList = () => {
535
538
  const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
539
+ const parsedUrl = new URL(window.location.href);
540
+ const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
536
541
  Object.keys(cookieConfig).forEach((group: string) => {
537
542
  cookieConfig[group].forEach((cookie: string) => {
538
- Cookies.remove(cookie, { path: '/', domain: config[process.env.NODE_ENV].DOMAIN });
543
+ Cookies.remove(cookie, { path: '/', domain });
539
544
  })
540
545
  });
541
546
  };