@bytebrand/fe-ui-core 4.1.71 → 4.1.73
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 +1 -1
- package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.tsx +1 -0
- package/source/components/_common/IconSVG/IconSVGConfig.tsx +3 -1
- package/source/components/_common/IconSVG/SVG/common/MenuGrey.tsx +22 -0
- package/source/components/_common/Modal/CookieModal.tsx +10 -7
- package/source/components/_common/Modal/modals/ManageCookieModal/ManageCookieModal.tsx +2 -2
- package/source/framework/utils/CommonUtils.ts +3 -3
package/package.json
CHANGED
package/source/components/SearchWidgetsMobile/EngineTransDriveWidget/EngineTransDriveWidget.tsx
CHANGED
|
@@ -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
|
});
|
|
@@ -289,6 +289,7 @@ import LogoutIcon from './SVG/common/LogoutIcon';
|
|
|
289
289
|
import SearchGrey from './SVG/common/SearchGrey';
|
|
290
290
|
import PhoneGrey from './SVG/common/PhoneGrey';
|
|
291
291
|
import UserGrey from './SVG/common/UserGrey';
|
|
292
|
+
import MenuGrey from './SVG/common/MenuGrey';
|
|
292
293
|
interface IComponentsProp {
|
|
293
294
|
[key: string]: (props: any) => React.ReactNode;
|
|
294
295
|
}
|
|
@@ -669,7 +670,8 @@ const components: IComponentsProp = {
|
|
|
669
670
|
// header mobile
|
|
670
671
|
searchGrey: SearchGrey,
|
|
671
672
|
phoneGrey: PhoneGrey,
|
|
672
|
-
userGrey: UserGrey
|
|
673
|
+
userGrey: UserGrey,
|
|
674
|
+
menuGrey: MenuGrey
|
|
673
675
|
};
|
|
674
676
|
|
|
675
677
|
export default components;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const MenuGrey = (
|
|
5
|
+
props: any
|
|
6
|
+
) => {
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width="18"
|
|
10
|
+
height="13"
|
|
11
|
+
viewBox="0 0 18 13"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
{...props}
|
|
15
|
+
>
|
|
16
|
+
<path d="M1 12.0969C0.716667 12.0969 0.479333 12.0009 0.288 11.8089C0.0960001 11.6176 0 11.3803 0 11.0969C0 10.8136 0.0960001 10.5763 0.288 10.3849C0.479333 10.1929 0.716667 10.0969 1 10.0969H17C17.2833 10.0969 17.5207 10.1929 17.712 10.3849C17.904 10.5763 18 10.8136 18 11.0969C18 11.3803 17.904 11.6176 17.712 11.8089C17.5207 12.0009 17.2833 12.0969 17 12.0969H1ZM1 7.09692C0.716667 7.09692 0.479333 7.00092 0.288 6.80892C0.0960001 6.61759 0 6.38026 0 6.09692C0 5.81359 0.0960001 5.57592 0.288 5.38392C0.479333 5.19259 0.716667 5.09692 1 5.09692H17C17.2833 5.09692 17.5207 5.19259 17.712 5.38392C17.904 5.57592 18 5.81359 18 6.09692C18 6.38026 17.904 6.61759 17.712 6.80892C17.5207 7.00092 17.2833 7.09692 17 7.09692H1ZM1 2.09692C0.716667 2.09692 0.479333 2.00126 0.288 1.80992C0.0960001 1.61792 0 1.38026 0 1.09692C0 0.813591 0.0960001 0.575924 0.288 0.383924C0.479333 0.192591 0.716667 0.0969238 1 0.0969238H17C17.2833 0.0969238 17.5207 0.192591 17.712 0.383924C17.904 0.575924 18 0.813591 18 1.09692C18 1.38026 17.904 1.61792 17.712 1.80992C17.5207 2.00126 17.2833 2.09692 17 2.09692H1Z" fill="#4C4E64" fillOpacity="0.87"/>
|
|
17
|
+
</svg>
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default MenuGrey;
|
|
22
|
+
/* tslint:enable */
|
|
@@ -7,13 +7,16 @@ const CookieModal = () => {
|
|
|
7
7
|
const { isVisible, toggleModal } = useModal();
|
|
8
8
|
const [modal, setModal] = useState('');
|
|
9
9
|
|
|
10
|
-
useEffect(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
useEffect(
|
|
11
|
+
() => {
|
|
12
|
+
const cookieConfig = localStorage.getItem('cookieConfig');
|
|
13
|
+
if (!cookieConfig) {
|
|
14
|
+
setModal('PREVIEW_COOKIE_MODAL');
|
|
15
|
+
toggleModal();
|
|
16
|
+
} else setTimeout(() => { updateCookieList(); }, 3000);
|
|
17
|
+
},
|
|
18
|
+
[]
|
|
19
|
+
);
|
|
17
20
|
|
|
18
21
|
const onClearModalState = () => {
|
|
19
22
|
setModal('');
|
|
@@ -43,7 +43,7 @@ const ManageCookieModal = ({ toggleModal }) => {
|
|
|
43
43
|
value: marketingMasterSwitch,
|
|
44
44
|
onChange: onHandleMarketingSwitchValue
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
const analyticsSwitchProps = {
|
|
48
48
|
value: analytcisMasterSwitch,
|
|
49
49
|
onChange: onHandleAnalyticsSwitchValue
|
|
@@ -55,7 +55,7 @@ const ManageCookieModal = ({ toggleModal }) => {
|
|
|
55
55
|
onChange: () => {}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const onAccept = (value?: object) => {
|
|
58
|
+
const onAccept = (value?: object) => {
|
|
59
59
|
const cookieConfig = value || {
|
|
60
60
|
marketing: Object.keys(marketingSwitches).filter(i => !marketingSwitches[i]) || [],
|
|
61
61
|
analytics: Object.keys(analyticsSwitches).filter(i => !analyticsSwitches[i]) || []
|
|
@@ -532,7 +532,7 @@ export function setUtmParameters() {
|
|
|
532
532
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
533
533
|
|
|
534
534
|
document.cookie = `marketing=${JSON.stringify(marketing)};expires=${expiresDate};domain=.${domain};path=/`;
|
|
535
|
-
}
|
|
535
|
+
}
|
|
536
536
|
|
|
537
537
|
export const updateCookieList = () => {
|
|
538
538
|
const cookieConfig = JSON.parse(localStorage.getItem('cookieConfig')) || {};
|
|
@@ -540,7 +540,7 @@ export const updateCookieList = () => {
|
|
|
540
540
|
const domain = parsedUrl.hostname.split('.').slice(-2).join('.');
|
|
541
541
|
Object.keys(cookieConfig).forEach((group: string) => {
|
|
542
542
|
cookieConfig[group].forEach((cookie: string) => {
|
|
543
|
-
Cookies.remove(cookie, { path: '/'
|
|
544
|
-
})
|
|
543
|
+
Cookies.remove(cookie, { domain, path: '/' });
|
|
544
|
+
});
|
|
545
545
|
});
|
|
546
546
|
};
|