@nyris/nyris-webapp 0.3.45 → 0.3.46
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/build/asset-manifest.json +14 -12
- package/build/index.html +1 -1
- package/build/{precache-manifest.1f75904c53fde266565cfe8519296465.js → precache-manifest.003c83b03ba38cefb9af2060ababe0b4.js} +18 -10
- package/build/service-worker.js +1 -1
- package/build/static/css/main.5b89f23f.chunk.css +2 -0
- package/build/static/css/main.5b89f23f.chunk.css.map +1 -0
- package/build/static/js/2.f3840c8e.chunk.js +3 -0
- package/build/static/js/2.f3840c8e.chunk.js.map +1 -0
- package/build/static/js/main.d68884f6.chunk.js +3 -0
- package/build/static/js/main.d68884f6.chunk.js.map +1 -0
- package/build/static/media/call.c3c23966.svg +3 -0
- package/build/static/media/icon_email.71b21005.svg +3 -0
- package/package.json +3 -3
- package/src/Store/constants.ts +0 -1
- package/src/common/assets/icons/call.svg +3 -0
- package/src/common/assets/icons/icon_email.svg +2 -2
- package/src/components/CadenasWebViewer.tsx +2 -2
- package/src/components/Feedback.tsx +36 -0
- package/src/components/Header.tsx +3 -4
- package/src/components/Inquiry/InquiryBanner.tsx +98 -33
- package/src/components/Inquiry/InquiryModal.tsx +7 -10
- package/src/components/Layout.tsx +5 -0
- package/src/components/ProductDetailView.tsx +21 -11
- package/src/components/common.scss +134 -0
- package/src/components/results/ItemResult.tsx +118 -123
- package/src/components/rfq/RfqModal.tsx +7 -5
- package/src/index.css +1 -1
- package/src/page/landingPage/common.scss +3 -4
- package/src/page/result/index.tsx +60 -3
- package/src/services/Feedback.ts +4 -13
- package/src/types.ts +21 -6
- package/build/static/css/main.1b40c5ff.chunk.css +0 -2
- package/build/static/css/main.1b40c5ff.chunk.css.map +0 -1
- package/build/static/js/2.21c7c0a2.chunk.js +0 -3
- package/build/static/js/2.21c7c0a2.chunk.js.map +0 -1
- package/build/static/js/main.ed5fecc0.chunk.js +0 -3
- package/build/static/js/main.ed5fecc0.chunk.js.map +0 -1
- /package/build/static/js/{2.21c7c0a2.chunk.js.LICENSE.txt → 2.f3840c8e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.ed5fecc0.chunk.js.LICENSE.txt → main.d68884f6.chunk.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.3849 14H12.2933C1.71255 13.3915 0.210246 4.46385 0.000245939 1.73923C-0.0166751 1.52739 0.00837059 1.31429 0.0739478 1.11214C0.139525 0.909999 0.244345 0.722779 0.382401 0.561213C0.520458 0.399646 0.689038 0.266909 0.878482 0.170606C1.06793 0.0743029 1.27451 0.0163271 1.4864 5.04857e-07H4.45332C4.66901 -0.000208291 4.87979 0.0643519 5.05836 0.185318C5.23693 0.306285 5.37506 0.478084 5.45486 0.678462L6.27332 2.69231C6.35213 2.88806 6.37168 3.10266 6.32956 3.30943C6.28744 3.51621 6.1855 3.70605 6.0364 3.85539L4.88948 5.01308C5.06863 6.03117 5.55619 6.96967 6.28619 7.70159C7.01619 8.43352 7.9534 8.92355 8.97101 9.10538L10.1395 7.94769C10.2911 7.80024 10.4827 7.70067 10.6905 7.66141C10.8983 7.62215 11.113 7.64494 11.3079 7.72692L13.3379 8.54C13.5353 8.62232 13.7037 8.76153 13.8216 8.9399C13.9396 9.11827 14.0018 9.32771 14.0002 9.54154V12.3846C14.0002 12.813 13.8301 13.2239 13.5271 13.5269C13.2242 13.8298 12.8133 14 12.3849 14ZM1.61563 1.07692C1.47282 1.07692 1.33586 1.13365 1.23488 1.23464C1.1339 1.33562 1.07717 1.47258 1.07717 1.61539V1.65846C1.32486 4.84615 2.91332 12.3846 12.3526 12.9231C12.4233 12.9275 12.4942 12.9178 12.5612 12.8947C12.6282 12.8716 12.69 12.8355 12.743 12.7885C12.7961 12.7415 12.8393 12.6845 12.8702 12.6207C12.9012 12.5569 12.9192 12.4877 12.9233 12.4169V9.54154L10.8933 8.72846L9.34794 10.2631L9.08948 10.2308C4.40486 9.64385 3.76948 4.95923 3.76948 4.91077L3.73717 4.65231L5.2664 3.10692L4.45871 1.07692H1.61563Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="17" height="12" viewBox="0 0 17 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6888 0C16.0047 0 16.2931 0.192151 16.4241 0.489651C16.4738 0.593965 16.5 0.711618 16.5 0.830018V11.1561C16.5 11.2133 16.494 11.2703 16.4821 11.3256C16.4737 11.3686 16.462 11.4111 16.4474 11.4521C16.3285 11.7849 16.0308 12 15.6888 12H1.30961C0.967644 12 0.669889 11.7849 0.551024 11.4521C0.511476 11.3414 0.494785 11.2261 0.501415 11.1094V0.890625C0.494785 0.773926 0.511476 0.658628 0.551024 0.547891C0.669878 0.215062 0.967644 0 1.30961 0H15.6888ZM8.49921 6.90797L15.0048 1.10306H1.99367L8.49921 6.90797ZM5.8515 6L1.56406 9.8257V2.1743L5.8515 6ZM6.66657 6.72729L7.97182 7.89199C8.11913 8.02342 8.30643 8.0958 8.49921 8.0958C8.692 8.0958 8.87929 8.02342 9.02659 7.89199L10.3319 6.7273L15.0048 10.8969H1.99367L6.66657 6.72729ZM15.4374 9.82838L11.1469 6L15.4374 2.17162V9.82838Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyris/nyris-webapp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.46",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@algolia/autocomplete-js": "^1.7.1",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"@material-ui/data-grid": "^4.0.0-alpha.37",
|
|
14
14
|
"@material-ui/icons": "^4.4.1",
|
|
15
15
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
16
|
-
"@nyris/nyris-api": "^0.3.
|
|
17
|
-
"@nyris/nyris-react-components": "^0.3.
|
|
16
|
+
"@nyris/nyris-api": "^0.3.46",
|
|
17
|
+
"@nyris/nyris-react-components": "^0.3.46",
|
|
18
18
|
"@reduxjs/toolkit": "^1.6.1",
|
|
19
19
|
"@splidejs/react-splide": "^0.7.12",
|
|
20
20
|
"@types/blueimp-load-image": "^2.23.4",
|
package/src/Store/constants.ts
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12.3849 14H12.2933C1.71255 13.3915 0.210246 4.46385 0.000245939 1.73923C-0.0166751 1.52739 0.00837059 1.31429 0.0739478 1.11214C0.139525 0.909999 0.244345 0.722779 0.382401 0.561213C0.520458 0.399646 0.689038 0.266909 0.878482 0.170606C1.06793 0.0743029 1.27451 0.0163271 1.4864 5.04857e-07H4.45332C4.66901 -0.000208291 4.87979 0.0643519 5.05836 0.185318C5.23693 0.306285 5.37506 0.478084 5.45486 0.678462L6.27332 2.69231C6.35213 2.88806 6.37168 3.10266 6.32956 3.30943C6.28744 3.51621 6.1855 3.70605 6.0364 3.85539L4.88948 5.01308C5.06863 6.03117 5.55619 6.96967 6.28619 7.70159C7.01619 8.43352 7.9534 8.92355 8.97101 9.10538L10.1395 7.94769C10.2911 7.80024 10.4827 7.70067 10.6905 7.66141C10.8983 7.62215 11.113 7.64494 11.3079 7.72692L13.3379 8.54C13.5353 8.62232 13.7037 8.76153 13.8216 8.9399C13.9396 9.11827 14.0018 9.32771 14.0002 9.54154V12.3846C14.0002 12.813 13.8301 13.2239 13.5271 13.5269C13.2242 13.8298 12.8133 14 12.3849 14ZM1.61563 1.07692C1.47282 1.07692 1.33586 1.13365 1.23488 1.23464C1.1339 1.33562 1.07717 1.47258 1.07717 1.61539V1.65846C1.32486 4.84615 2.91332 12.3846 12.3526 12.9231C12.4233 12.9275 12.4942 12.9178 12.5612 12.8947C12.6282 12.8716 12.69 12.8355 12.743 12.7885C12.7961 12.7415 12.8393 12.6845 12.8702 12.6207C12.9012 12.5569 12.9192 12.4877 12.9233 12.4169V9.54154L10.8933 8.72846L9.34794 10.2631L9.08948 10.2308C4.40486 9.64385 3.76948 4.95923 3.76948 4.91077L3.73717 4.65231L5.2664 3.10692L4.45871 1.07692H1.61563Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="
|
|
2
|
-
<path d="
|
|
1
|
+
<svg width="17" height="12" viewBox="0 0 17 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6888 0C16.0047 0 16.2931 0.192151 16.4241 0.489651C16.4738 0.593965 16.5 0.711618 16.5 0.830018V11.1561C16.5 11.2133 16.494 11.2703 16.4821 11.3256C16.4737 11.3686 16.462 11.4111 16.4474 11.4521C16.3285 11.7849 16.0308 12 15.6888 12H1.30961C0.967644 12 0.669889 11.7849 0.551024 11.4521C0.511476 11.3414 0.494785 11.2261 0.501415 11.1094V0.890625C0.494785 0.773926 0.511476 0.658628 0.551024 0.547891C0.669878 0.215062 0.967644 0 1.30961 0H15.6888ZM8.49921 6.90797L15.0048 1.10306H1.99367L8.49921 6.90797ZM5.8515 6L1.56406 9.8257V2.1743L5.8515 6ZM6.66657 6.72729L7.97182 7.89199C8.11913 8.02342 8.30643 8.0958 8.49921 8.0958C8.692 8.0958 8.87929 8.02342 9.02659 7.89199L10.3319 6.7273L15.0048 10.8969H1.99367L6.66657 6.72729ZM15.4374 9.82838L11.1469 6L15.4374 2.17162V9.82838Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
@@ -74,14 +74,14 @@ function CadenasWebViewer({
|
|
|
74
74
|
|
|
75
75
|
// initialize 3d viewer
|
|
76
76
|
let webviewer3d = new psol.components.WebViewer3D(webViewer3DSettings);
|
|
77
|
-
psol.core.setApiKey(settings.cadenasAPIKey);
|
|
77
|
+
psol.core.setApiKey(settings.cadenas?.cadenasAPIKey);
|
|
78
78
|
setStatus3dView('loading');
|
|
79
79
|
// run search and display result in 3D viewer.
|
|
80
80
|
psol.core
|
|
81
81
|
.ajaxGetOrPost({
|
|
82
82
|
url: psol.core.getServiceBaseUrl() + '/service/reversemap',
|
|
83
83
|
data: {
|
|
84
|
-
catalog: settings.catalog,
|
|
84
|
+
catalog: settings.cadenas?.catalog,
|
|
85
85
|
part: sku,
|
|
86
86
|
exact: '0',
|
|
87
87
|
},
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ReactComponent as IconLike } from 'common/assets/icons/icon_like.svg';
|
|
3
|
+
import { ReactComponent as IconDislike } from 'common/assets/icons/icon_dislike.svg';
|
|
4
|
+
import { ReactComponent as IconClose } from 'common/assets/icons/close.svg';
|
|
5
|
+
|
|
6
|
+
function Feedback({
|
|
7
|
+
submitFeedback,
|
|
8
|
+
onFeedbackClose,
|
|
9
|
+
}: {
|
|
10
|
+
submitFeedback: any;
|
|
11
|
+
onFeedbackClose: any;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<div className="feedback-wrapper">
|
|
15
|
+
<p>Are these results useful?</p>
|
|
16
|
+
<div
|
|
17
|
+
className="feedback-icon-wrapper"
|
|
18
|
+
onClick={() => submitFeedback(false)}
|
|
19
|
+
>
|
|
20
|
+
<IconDislike />
|
|
21
|
+
</div>
|
|
22
|
+
<div
|
|
23
|
+
className="feedback-icon-wrapper"
|
|
24
|
+
onClick={() => submitFeedback(true)}
|
|
25
|
+
>
|
|
26
|
+
<IconLike />
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<div className="feedback-icon-wrapper" onClick={() => onFeedbackClose()}>
|
|
30
|
+
<IconClose />
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default Feedback;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Box, Menu, MenuProps, withStyles } from '@material-ui/core';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { NavLink } from 'react-router-dom';
|
|
4
3
|
import './common.scss';
|
|
5
4
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
6
5
|
import { reset, setPreFilter } from 'Store/search/Search';
|
|
@@ -62,8 +61,8 @@ function Header(): JSX.Element {
|
|
|
62
61
|
|
|
63
62
|
return (
|
|
64
63
|
<Box className="box-content" display={'flex'}>
|
|
65
|
-
<
|
|
66
|
-
|
|
64
|
+
<a
|
|
65
|
+
href={window.location.origin}
|
|
67
66
|
style={{ lineHeight: 0, paddingLeft: '10px' }}
|
|
68
67
|
onClick={() => {
|
|
69
68
|
dispatch(reset(''));
|
|
@@ -79,7 +78,7 @@ function Header(): JSX.Element {
|
|
|
79
78
|
height: settings.theme?.logoHeight,
|
|
80
79
|
}}
|
|
81
80
|
/>
|
|
82
|
-
</
|
|
81
|
+
</a>
|
|
83
82
|
|
|
84
83
|
{auth0.enabled && isAuthenticated && (
|
|
85
84
|
<div style={{ position: 'relative' }}>
|
|
@@ -3,6 +3,9 @@ import { getCroppedCanvas } from 'helpers/getCroppedCanvas';
|
|
|
3
3
|
import React, { useEffect, useState } from 'react';
|
|
4
4
|
import { useMediaQuery } from 'react-responsive';
|
|
5
5
|
import InquiryModal from './InquiryModal';
|
|
6
|
+
import { useAppSelector } from 'Store/Store';
|
|
7
|
+
import { ReactComponent as EmailIcon } from 'common/assets/icons/icon_email.svg';
|
|
8
|
+
import { ReactComponent as CallIcon } from 'common/assets/icons/call.svg';
|
|
6
9
|
|
|
7
10
|
function InquiryBanner({
|
|
8
11
|
requestImage,
|
|
@@ -23,6 +26,11 @@ function InquiryBanner({
|
|
|
23
26
|
setInquiryStatus('inactive');
|
|
24
27
|
}, [selectedRegion, query]);
|
|
25
28
|
|
|
29
|
+
const { description, emailInquiry, supportNumber } =
|
|
30
|
+
useAppSelector(state => state.settings.support) || {};
|
|
31
|
+
const { secondaryColor } =
|
|
32
|
+
useAppSelector(state => state.settings.theme) || {};
|
|
33
|
+
|
|
26
34
|
return (
|
|
27
35
|
<>
|
|
28
36
|
{isInquiryModalOpen && (
|
|
@@ -31,18 +39,17 @@ function InquiryBanner({
|
|
|
31
39
|
selectedRegion={selectedRegion}
|
|
32
40
|
setIsInquiryModalOpen={setIsInquiryModalOpen}
|
|
33
41
|
isInquiryModalOpen={isInquiryModalOpen}
|
|
34
|
-
setInquiryStatus={setInquiryStatus}
|
|
35
42
|
/>
|
|
36
43
|
)}
|
|
37
44
|
<Box
|
|
38
45
|
style={{
|
|
39
|
-
padding: !isMobile ? '24px 40px 24px 40px' : '16px 16px 16px 16px',
|
|
40
46
|
backgroundColor: '#F3F3F5',
|
|
41
47
|
width: '100%',
|
|
42
48
|
marginBottom: '32px',
|
|
43
49
|
alignSelf: 'end',
|
|
44
50
|
display: 'flex',
|
|
45
51
|
alignItems: 'center',
|
|
52
|
+
marginRight: '12px',
|
|
46
53
|
}}
|
|
47
54
|
className="rfq-box"
|
|
48
55
|
>
|
|
@@ -50,9 +57,8 @@ function InquiryBanner({
|
|
|
50
57
|
style={{
|
|
51
58
|
width: '100%',
|
|
52
59
|
display: 'flex',
|
|
53
|
-
columnGap: !isMobile ? '26px' : '
|
|
60
|
+
columnGap: !isMobile ? '26px' : '16px',
|
|
54
61
|
alignItems: 'center',
|
|
55
|
-
justifyContent: 'space-between',
|
|
56
62
|
}}
|
|
57
63
|
>
|
|
58
64
|
{requestImage && (
|
|
@@ -64,8 +70,7 @@ function InquiryBanner({
|
|
|
64
70
|
)?.toDataURL()}
|
|
65
71
|
alt="request_image"
|
|
66
72
|
style={{
|
|
67
|
-
mixBlendMode:
|
|
68
|
-
inquiryStatus !== 'inactive' ? 'overlay' : 'unset',
|
|
73
|
+
mixBlendMode: 'unset',
|
|
69
74
|
maxHeight: !isMobile ? '181px' : '120px',
|
|
70
75
|
maxWidth: !isMobile ? '181px' : '120px',
|
|
71
76
|
borderRadius: '2px',
|
|
@@ -74,10 +79,10 @@ function InquiryBanner({
|
|
|
74
79
|
</div>
|
|
75
80
|
)}
|
|
76
81
|
|
|
77
|
-
<Box>
|
|
82
|
+
<Box style={{ width: '100%' }}>
|
|
78
83
|
<Box
|
|
79
84
|
style={{
|
|
80
|
-
paddingBottom: '
|
|
85
|
+
paddingBottom: '8px',
|
|
81
86
|
paddingLeft: '16px',
|
|
82
87
|
}}
|
|
83
88
|
>
|
|
@@ -94,42 +99,102 @@ function InquiryBanner({
|
|
|
94
99
|
</Box>
|
|
95
100
|
<Box
|
|
96
101
|
style={{
|
|
97
|
-
fontSize: '
|
|
102
|
+
fontSize: '14px',
|
|
98
103
|
maxWidth: '320x',
|
|
99
|
-
lineHeight: '
|
|
104
|
+
lineHeight: '16px',
|
|
100
105
|
color: inquiryStatus === 'inactive' ? '#4B4B4A' : '#2B2C46',
|
|
101
106
|
fontWeight: 'normal',
|
|
102
107
|
}}
|
|
103
108
|
>
|
|
104
|
-
|
|
109
|
+
{description}
|
|
105
110
|
</Box>
|
|
106
111
|
</Box>
|
|
107
|
-
<
|
|
112
|
+
<div
|
|
108
113
|
style={{
|
|
109
|
-
width: '200px',
|
|
110
|
-
background:
|
|
111
|
-
inquiryStatus === 'inactive' ? '#2B2C46' : '#E9E9EC',
|
|
112
|
-
boxShadow:
|
|
113
|
-
inquiryStatus === 'inactive'
|
|
114
|
-
? '0px 0px 4px 0px rgba(0, 0, 0, 0.25)'
|
|
115
|
-
: '',
|
|
116
|
-
borderRadius: '2px',
|
|
117
|
-
padding: '16px 16px 16px 16px',
|
|
118
114
|
display: 'flex',
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
height: '48px',
|
|
123
|
-
cursor: inquiryStatus === 'inactive' ? 'pointer' : 'default',
|
|
124
|
-
border: 'none',
|
|
125
|
-
}}
|
|
126
|
-
disabled={inquiryStatus !== 'inactive'}
|
|
127
|
-
onClick={() => {
|
|
128
|
-
setIsInquiryModalOpen(true);
|
|
115
|
+
gap: isMobile ? '8px' : '16px',
|
|
116
|
+
width: isMobile ? '100%' : '100%',
|
|
117
|
+
maxWidth: '400px',
|
|
129
118
|
}}
|
|
119
|
+
className="support-button-wrapper"
|
|
130
120
|
>
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
{emailInquiry && (
|
|
122
|
+
<div
|
|
123
|
+
style={{
|
|
124
|
+
width: emailInquiry && supportNumber ? '50%' : '100%',
|
|
125
|
+
maxWidth: '170px',
|
|
126
|
+
minWidth: '86px',
|
|
127
|
+
background:
|
|
128
|
+
inquiryStatus === 'inactive' ? secondaryColor : '#E9E9EC',
|
|
129
|
+
boxShadow:
|
|
130
|
+
inquiryStatus === 'inactive'
|
|
131
|
+
? '0px 0px 4px 0px rgba(0, 0, 0, 0.25)'
|
|
132
|
+
: '',
|
|
133
|
+
borderRadius: '2px',
|
|
134
|
+
padding: !isMobile
|
|
135
|
+
? '8px 16px 8px 16px'
|
|
136
|
+
: '8px 8px 8px 8px',
|
|
137
|
+
display: 'flex',
|
|
138
|
+
alignItems: 'center',
|
|
139
|
+
color: inquiryStatus === 'inactive' ? '#fff' : '#CACAD1',
|
|
140
|
+
fontSize: '13px',
|
|
141
|
+
cursor:
|
|
142
|
+
inquiryStatus === 'inactive' ? 'pointer' : 'default',
|
|
143
|
+
border: 'none',
|
|
144
|
+
}}
|
|
145
|
+
onClick={() => {
|
|
146
|
+
setIsInquiryModalOpen(true);
|
|
147
|
+
}}
|
|
148
|
+
>
|
|
149
|
+
<div
|
|
150
|
+
style={{
|
|
151
|
+
width: '100%',
|
|
152
|
+
display: 'flex',
|
|
153
|
+
alignItems: 'center',
|
|
154
|
+
justifyContent: 'space-between',
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
157
|
+
<p>Inquiry</p>
|
|
158
|
+
<EmailIcon color="#fff" width={16} height={16} />
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
{supportNumber && (
|
|
163
|
+
<a
|
|
164
|
+
style={{
|
|
165
|
+
width: emailInquiry && supportNumber ? '50%' : '100%',
|
|
166
|
+
maxWidth: '170px',
|
|
167
|
+
minWidth: '86px',
|
|
168
|
+
background: secondaryColor,
|
|
169
|
+
boxShadow: '0px 0px 4px 0px rgba(0, 0, 0, 0.25)',
|
|
170
|
+
borderRadius: '2px',
|
|
171
|
+
padding: !isMobile
|
|
172
|
+
? '8px 16px 8px 16px'
|
|
173
|
+
: '8px 8px 8px 8px',
|
|
174
|
+
display: 'flex',
|
|
175
|
+
alignItems: 'center',
|
|
176
|
+
color: '#fff',
|
|
177
|
+
fontSize: '13px',
|
|
178
|
+
cursor: 'pointer',
|
|
179
|
+
border: 'none',
|
|
180
|
+
fontWeight: 500,
|
|
181
|
+
}}
|
|
182
|
+
href={`tel:${supportNumber}`}
|
|
183
|
+
>
|
|
184
|
+
<div
|
|
185
|
+
style={{
|
|
186
|
+
width: '100%',
|
|
187
|
+
display: 'flex',
|
|
188
|
+
alignItems: 'center',
|
|
189
|
+
justifyContent: 'space-between',
|
|
190
|
+
}}
|
|
191
|
+
>
|
|
192
|
+
<p> Call us</p>
|
|
193
|
+
<CallIcon color="#fff" width={16} height={16} />
|
|
194
|
+
</div>
|
|
195
|
+
</a>
|
|
196
|
+
)}
|
|
197
|
+
</div>
|
|
133
198
|
</Box>
|
|
134
199
|
</Box>
|
|
135
200
|
</Box>
|
|
@@ -17,7 +17,6 @@ interface Props {
|
|
|
17
17
|
selectedRegion: any;
|
|
18
18
|
setIsInquiryModalOpen: any;
|
|
19
19
|
isInquiryModalOpen?: any;
|
|
20
|
-
setInquiryStatus: any;
|
|
21
20
|
}
|
|
22
21
|
// eslint-disable-next-line
|
|
23
22
|
const emailRegex = /.+\@.+\..+$/;
|
|
@@ -41,7 +40,6 @@ export default function InquiryModal({
|
|
|
41
40
|
selectedRegion,
|
|
42
41
|
setIsInquiryModalOpen,
|
|
43
42
|
isInquiryModalOpen,
|
|
44
|
-
setInquiryStatus,
|
|
45
43
|
}: Props) {
|
|
46
44
|
const stateGlobal = useAppSelector(state => state);
|
|
47
45
|
const {
|
|
@@ -78,20 +76,19 @@ export default function InquiryModal({
|
|
|
78
76
|
: null;
|
|
79
77
|
const serviceId = 'service_zfsxshi';
|
|
80
78
|
setIsInquiryModalOpen(false);
|
|
81
|
-
|
|
79
|
+
const templateId = settings.support?.emailTemplateId;
|
|
80
|
+
if (templateId) {
|
|
82
81
|
try {
|
|
83
|
-
|
|
84
|
-
await emailjs.send(serviceId, settings.templateId, {
|
|
82
|
+
await emailjs.send(serviceId, templateId, {
|
|
85
83
|
email_id: email.trim(),
|
|
86
|
-
information_text: information,
|
|
84
|
+
information_text: information ? information : '<not specified>',
|
|
87
85
|
request_image: croppedImage?.toDataURL(),
|
|
88
|
-
prefilter_values: preFilterValues
|
|
86
|
+
prefilter_values: preFilterValues?.length
|
|
87
|
+
? preFilterValues.join(', ')
|
|
88
|
+
: '<not specified>',
|
|
89
89
|
});
|
|
90
|
-
setInquiryStatus('sent');
|
|
91
90
|
ToastHelper.success('Request sent successfully');
|
|
92
91
|
} catch (error) {
|
|
93
|
-
setInquiryStatus('inactive');
|
|
94
|
-
|
|
95
92
|
toast(
|
|
96
93
|
t => {
|
|
97
94
|
return (
|
|
@@ -41,6 +41,11 @@ jQuery(document).ready(function () {
|
|
|
41
41
|
email: 'info@cadenas.de',
|
|
42
42
|
});
|
|
43
43
|
psol.core.setServiceBaseUrl('https://webapi.partcommunity.com');
|
|
44
|
+
window.onpageshow = function(event: any) {
|
|
45
|
+
if (event.persisted) {
|
|
46
|
+
window.location.reload();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
44
49
|
});
|
|
45
50
|
|
|
46
51
|
i18n.use(initReactI18next).init({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { Box, Button, Collapse, Grid, Typography } from '@material-ui/core';
|
|
3
3
|
import CloseOutlinedIcon from '@material-ui/icons/CloseOutlined';
|
|
4
4
|
import IconOpenLink from 'common/assets/icons/Union.svg';
|
|
@@ -111,7 +111,15 @@ function ProductDetailView(props: Props) {
|
|
|
111
111
|
|
|
112
112
|
setDataImageCarouSel(valueKey);
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
const productDetails = useMemo(() => {
|
|
115
|
+
const details = get(dataItem, settings.field.productDetails);
|
|
116
|
+
try {
|
|
117
|
+
return details.join(', ');
|
|
118
|
+
} catch (e) {
|
|
119
|
+
return details;
|
|
120
|
+
}
|
|
121
|
+
}, [dataItem, settings.field.productDetails]);
|
|
122
|
+
const manufacturerNumber = get(dataItem, settings.field.manufacturerNumber);
|
|
115
123
|
return (
|
|
116
124
|
<Box
|
|
117
125
|
className="box-modal-default"
|
|
@@ -143,7 +151,7 @@ function ProductDetailView(props: Props) {
|
|
|
143
151
|
position: 'relative',
|
|
144
152
|
}}
|
|
145
153
|
>
|
|
146
|
-
{settings.cadenas3dWebView && (
|
|
154
|
+
{settings.cadenas?.cadenas3dWebView && (
|
|
147
155
|
<CadenasWebViewer
|
|
148
156
|
is3dView={is3dView}
|
|
149
157
|
sku={sku}
|
|
@@ -229,7 +237,7 @@ function ProductDetailView(props: Props) {
|
|
|
229
237
|
>
|
|
230
238
|
{!is3dView &&
|
|
231
239
|
status3dView !== 'not-found' &&
|
|
232
|
-
settings.cadenas3dWebView && (
|
|
240
|
+
settings.cadenas?.cadenas3dWebView && (
|
|
233
241
|
<Box
|
|
234
242
|
style={{
|
|
235
243
|
background: '#E9E9EC',
|
|
@@ -347,7 +355,7 @@ function ProductDetailView(props: Props) {
|
|
|
347
355
|
style={{ gap: 6 }}
|
|
348
356
|
width={'100%'}
|
|
349
357
|
>
|
|
350
|
-
{!settings.warehouseVariant && settings.CTAButtonText
|
|
358
|
+
{!settings.warehouseVariant && settings.CTAButtonText && (
|
|
351
359
|
<ProductAttribute
|
|
352
360
|
title={'Produktname'}
|
|
353
361
|
value={title}
|
|
@@ -374,16 +382,16 @@ function ProductDetailView(props: Props) {
|
|
|
374
382
|
title={t('Brand')}
|
|
375
383
|
value={brand || settings.brandName}
|
|
376
384
|
width={
|
|
377
|
-
|
|
385
|
+
manufacturerNumber
|
|
378
386
|
? { xs: '49%', md: 'fit-content' }
|
|
379
387
|
: { xs: '100%', md: 'fit-content' }
|
|
380
388
|
}
|
|
381
389
|
/>
|
|
382
390
|
)}
|
|
383
|
-
{
|
|
391
|
+
{manufacturerNumber && (
|
|
384
392
|
<ProductAttribute
|
|
385
393
|
title={t('Manufacturer Number')}
|
|
386
|
-
value={
|
|
394
|
+
value={manufacturerNumber}
|
|
387
395
|
width={
|
|
388
396
|
brand || settings.brandName
|
|
389
397
|
? { xs: '49%', md: 'fit-content' }
|
|
@@ -460,7 +468,9 @@ function ProductDetailView(props: Props) {
|
|
|
460
468
|
paddingRight: '4px',
|
|
461
469
|
}}
|
|
462
470
|
>
|
|
463
|
-
{settings.CTAButtonText
|
|
471
|
+
{settings.CTAButtonText
|
|
472
|
+
? settings.CTAButtonText
|
|
473
|
+
: dataItem[settings.field.productName]}
|
|
464
474
|
</Typography>
|
|
465
475
|
{ctaLink && (
|
|
466
476
|
<img
|
|
@@ -471,7 +481,7 @@ function ProductDetailView(props: Props) {
|
|
|
471
481
|
)}
|
|
472
482
|
</Box>
|
|
473
483
|
</Box>
|
|
474
|
-
{
|
|
484
|
+
{productDetails && (
|
|
475
485
|
<Box className="w-100">
|
|
476
486
|
<Button
|
|
477
487
|
className="w-100 button-hover"
|
|
@@ -509,7 +519,7 @@ function ProductDetailView(props: Props) {
|
|
|
509
519
|
color: '#2b2c46',
|
|
510
520
|
}}
|
|
511
521
|
>
|
|
512
|
-
{
|
|
522
|
+
{productDetails}
|
|
513
523
|
</Typography>
|
|
514
524
|
</Collapse>
|
|
515
525
|
</Box>
|
|
@@ -64,6 +64,10 @@
|
|
|
64
64
|
.box-body-newVersion-wrap-main {
|
|
65
65
|
height: calc(100% - 50px);
|
|
66
66
|
// overflow: auto;
|
|
67
|
+
.box-content-main {
|
|
68
|
+
height: auto;
|
|
69
|
+
margin-top: calc(50vh - 75px);
|
|
70
|
+
}
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -135,4 +139,134 @@
|
|
|
135
139
|
background-color:#F0EFFF,
|
|
136
140
|
|
|
137
141
|
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.feedback-floating {
|
|
145
|
+
margin-left: -24px;
|
|
146
|
+
height: fit-content;
|
|
147
|
+
bottom: 35px;
|
|
148
|
+
position: fixed;
|
|
149
|
+
z-index: 201;
|
|
150
|
+
display: flex;
|
|
151
|
+
justify-content: flex-end;
|
|
152
|
+
|
|
153
|
+
@media screen and (max-width: 776px) {
|
|
154
|
+
margin-left: 0px;
|
|
155
|
+
height: fit-content !important;
|
|
156
|
+
bottom: 105px;
|
|
157
|
+
justify-content: center !important;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.feedback-wrapper {
|
|
162
|
+
background-color: #e4e3fff7;
|
|
163
|
+
mix-blend-mode: multiply;
|
|
164
|
+
border-radius: 24px;
|
|
165
|
+
display: flex;
|
|
166
|
+
justify-content: center;
|
|
167
|
+
align-items: center;
|
|
168
|
+
padding-left: 30px;
|
|
169
|
+
padding-right: 30px;
|
|
170
|
+
padding-top: 8px;
|
|
171
|
+
padding-bottom: 8px;
|
|
172
|
+
width: fit-content;
|
|
173
|
+
height: fit-content;
|
|
174
|
+
|
|
175
|
+
column-gap: 22px;
|
|
176
|
+
|
|
177
|
+
flex-shrink: 0;
|
|
178
|
+
color: #2B2C46;
|
|
179
|
+
|
|
180
|
+
&:hover{
|
|
181
|
+
background-color: rgb(211, 209, 255, 0.97);
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media screen and (max-width: 776px) {
|
|
186
|
+
padding-left: 20px;
|
|
187
|
+
padding-right: 20px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
p{
|
|
191
|
+
font-size: 14px;
|
|
192
|
+
font-weight: 600;
|
|
193
|
+
@media screen and (max-width: 776px) {
|
|
194
|
+
font-size: 12px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.feedback-icon-wrapper {
|
|
199
|
+
width: 34px;
|
|
200
|
+
height: 34px;
|
|
201
|
+
border-radius: 100%;
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: center;
|
|
204
|
+
align-items: center;
|
|
205
|
+
|
|
206
|
+
&:hover {
|
|
207
|
+
background-color: #FFF;
|
|
208
|
+
box-shadow: 0px 0px 7.04px 0px rgba(0, 0, 0, 0.10);
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
svg{
|
|
214
|
+
width: 16px;
|
|
215
|
+
height: 16px;
|
|
216
|
+
|
|
217
|
+
@media screen and (max-width: 776px) {
|
|
218
|
+
width: 14px;
|
|
219
|
+
height: 14px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
@media screen and (max-width: 776px) {
|
|
225
|
+
width: 25px;
|
|
226
|
+
height: 25px;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.feedback-success {
|
|
232
|
+
font-size: 14px;
|
|
233
|
+
font-weight: 600;
|
|
234
|
+
color: #fff;
|
|
235
|
+
background-color: #2B2C46;
|
|
236
|
+
width: 282px;
|
|
237
|
+
padding-top: 16px;
|
|
238
|
+
padding-bottom: 16px;
|
|
239
|
+
text-align: center;
|
|
240
|
+
border-radius: 26px;
|
|
241
|
+
|
|
242
|
+
@media screen and (max-width: 776px) {
|
|
243
|
+
font-size: 12px;
|
|
244
|
+
padding-top: 8px;
|
|
245
|
+
padding-bottom: 8px;
|
|
246
|
+
width: 264px;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.rfq-box{
|
|
251
|
+
padding: 24px 40px 24px 40px;
|
|
252
|
+
|
|
253
|
+
@media screen and (max-width: 776px) {
|
|
254
|
+
padding: 16px 16px 16px 16px;
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@media screen and (max-width: 820px) {
|
|
259
|
+
padding: 16px 16px 16px 16px;
|
|
260
|
+
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.support-button-wrapper {
|
|
264
|
+
flex-wrap: nowrap;
|
|
265
|
+
|
|
266
|
+
@media screen and (max-width: 820px) {
|
|
267
|
+
gap: 8px;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
138
272
|
}
|