@nyris/nyris-webapp 0.3.45 → 0.3.47
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.694373c4d80fe3bb40d0d6526b473852.js} +18 -10
- package/build/service-worker.js +1 -1
- package/build/static/css/main.21021ebe.chunk.css +2 -0
- package/build/static/css/main.21021ebe.chunk.css.map +1 -0
- package/build/static/js/2.3e652625.chunk.js +3 -0
- package/build/static/js/2.3e652625.chunk.js.map +1 -0
- package/build/static/js/main.37e28702.chunk.js +3 -0
- package/build/static/js/main.37e28702.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 +4 -4
- 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/ImagePreviewMobile.tsx +51 -134
- package/src/components/Inquiry/InquiryBanner.tsx +103 -35
- 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/SidePanel.tsx +22 -15
- package/src/components/appMobile.scss +7 -0
- package/src/components/common.scss +134 -0
- package/src/components/drawer/cameraCustom.tsx +14 -64
- 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/translations.ts +7 -0
- 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.3e652625.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.ed5fecc0.chunk.js.LICENSE.txt → main.37e28702.chunk.js.LICENSE.txt} +0 -0
|
@@ -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>
|
|
@@ -82,28 +82,35 @@ function SidePanel({
|
|
|
82
82
|
>
|
|
83
83
|
<div
|
|
84
84
|
style={{
|
|
85
|
+
display: 'flex',
|
|
86
|
+
justifyContent: 'center',
|
|
85
87
|
backgroundColor: '#F3F3F5',
|
|
86
88
|
width: '100%',
|
|
87
89
|
paddingTop: '16px',
|
|
88
90
|
paddingBottom: '16px',
|
|
89
91
|
}}
|
|
90
92
|
>
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
debouncedOnImageSelectionChange(r);
|
|
93
|
+
<div
|
|
94
|
+
style={{
|
|
95
|
+
width: '288px',
|
|
96
|
+
height: 'fit-content',
|
|
96
97
|
}}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
>
|
|
99
|
+
<Preview
|
|
100
|
+
key={requestImage?.id}
|
|
101
|
+
onSelectionChange={(r: RectCoords) => {
|
|
102
|
+
setImageSelection(r);
|
|
103
|
+
debouncedOnImageSelectionChange(r);
|
|
104
|
+
}}
|
|
105
|
+
image={requestImage?.canvas}
|
|
106
|
+
selection={imageSelection || DEFAULT_REGION}
|
|
107
|
+
regions={filteredRegions}
|
|
108
|
+
dotColor={'#FBD914'}
|
|
109
|
+
minCropWidth={60}
|
|
110
|
+
minCropHeight={60}
|
|
111
|
+
rounded={true}
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
107
114
|
</div>
|
|
108
115
|
</Box>
|
|
109
116
|
</Box>
|
|
@@ -514,6 +514,12 @@
|
|
|
514
514
|
|
|
515
515
|
video {
|
|
516
516
|
overflow: hidden;
|
|
517
|
+
height: 100%;
|
|
518
|
+
width: 100%;
|
|
519
|
+
object-fit: cover;
|
|
520
|
+
min-width: 100%;
|
|
521
|
+
min-height: 100%;
|
|
522
|
+
|
|
517
523
|
}
|
|
518
524
|
}
|
|
519
525
|
|
|
@@ -706,6 +712,7 @@
|
|
|
706
712
|
border-radius: 100%;
|
|
707
713
|
padding: 30px;
|
|
708
714
|
.outer {
|
|
715
|
+
display: block;
|
|
709
716
|
border-radius: 100%;
|
|
710
717
|
padding: 3px;
|
|
711
718
|
background: linear-gradient(180deg, #AAABB5 0%, #FFFFFF 100%);
|
|
@@ -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
|
}
|
|
@@ -6,7 +6,6 @@ import { RectCoords } from '@nyris/nyris-api';
|
|
|
6
6
|
import ReverseCamera from 'common/assets/icons/reverse_camera.svg';
|
|
7
7
|
import { isEmpty } from 'lodash';
|
|
8
8
|
import React, { useCallback, useRef, useState } from 'react';
|
|
9
|
-
import { useDropzone } from 'react-dropzone';
|
|
10
9
|
import { useHistory } from 'react-router-dom';
|
|
11
10
|
import Webcam from 'react-webcam';
|
|
12
11
|
import { createImage, find, findRegions } from 'services/image';
|
|
@@ -43,9 +42,9 @@ function CameraCustom(props: Props) {
|
|
|
43
42
|
|
|
44
43
|
const videoConstraints = {
|
|
45
44
|
width: 1080,
|
|
46
|
-
|
|
47
|
-
aspectRatio: 1.33333333333,
|
|
45
|
+
aspectRatio: 1.11111,
|
|
48
46
|
};
|
|
47
|
+
|
|
49
48
|
const handleClick = useCallback(() => {
|
|
50
49
|
setFacingMode(prevState =>
|
|
51
50
|
prevState === FACING_MODE_USER
|
|
@@ -63,7 +62,6 @@ function CameraCustom(props: Props) {
|
|
|
63
62
|
let region: RectCoords | undefined;
|
|
64
63
|
let imageConvert = await createImage(image);
|
|
65
64
|
dispatch(setRequestImage(imageConvert));
|
|
66
|
-
dispatch(setImageSearchInput(image));
|
|
67
65
|
dispatch(onToggleModalItemDetail(false));
|
|
68
66
|
handlerCloseModal();
|
|
69
67
|
|
|
@@ -114,60 +112,6 @@ function CameraCustom(props: Props) {
|
|
|
114
112
|
onToggleModal();
|
|
115
113
|
};
|
|
116
114
|
|
|
117
|
-
const { getInputProps } = useDropzone({
|
|
118
|
-
onDrop: async (fs: File[]) => {
|
|
119
|
-
let payload: any;
|
|
120
|
-
let filters: any[] = [];
|
|
121
|
-
let region: RectCoords | undefined;
|
|
122
|
-
dispatch(updateStatusLoading(true));
|
|
123
|
-
dispatch(setImageSearchInput(URL.createObjectURL(fs[0])));
|
|
124
|
-
let image = await createImage(fs[0]);
|
|
125
|
-
dispatch(setRequestImage(image));
|
|
126
|
-
if (settings.regions) {
|
|
127
|
-
let res = await findRegions(image, settings);
|
|
128
|
-
dispatch(setRegions(res.regions));
|
|
129
|
-
region = res.selectedRegion;
|
|
130
|
-
dispatch(setSelectedRegion(region));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
const preFilterValues = [
|
|
134
|
-
{
|
|
135
|
-
key: settings.visualSearchFilterKey,
|
|
136
|
-
values: Object.keys(preFilter) as string[],
|
|
137
|
-
},
|
|
138
|
-
];
|
|
139
|
-
return find({
|
|
140
|
-
image,
|
|
141
|
-
settings,
|
|
142
|
-
filters: !isEmpty(preFilter) ? preFilterValues : undefined,
|
|
143
|
-
region,
|
|
144
|
-
})
|
|
145
|
-
.then((res: any) => {
|
|
146
|
-
res?.results.map((item: any) => {
|
|
147
|
-
filters.push({
|
|
148
|
-
sku: item.sku,
|
|
149
|
-
score: item.score,
|
|
150
|
-
});
|
|
151
|
-
});
|
|
152
|
-
payload = {
|
|
153
|
-
...res,
|
|
154
|
-
filters,
|
|
155
|
-
};
|
|
156
|
-
dispatch(setSearchResults(payload));
|
|
157
|
-
setTimeout(() => {
|
|
158
|
-
dispatch(updateStatusLoading(false));
|
|
159
|
-
handlerCloseModal();
|
|
160
|
-
history.push('/result');
|
|
161
|
-
}, 500);
|
|
162
|
-
})
|
|
163
|
-
.catch((e: any) => {
|
|
164
|
-
console.log('err camera_custom', e);
|
|
165
|
-
dispatch(updateStatusLoading(false));
|
|
166
|
-
handlerCloseModal();
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
});
|
|
170
|
-
|
|
171
115
|
return (
|
|
172
116
|
<Box className="box-camera-custom">
|
|
173
117
|
<Drawer
|
|
@@ -222,6 +166,7 @@ function CameraCustom(props: Props) {
|
|
|
222
166
|
onClick={() => {
|
|
223
167
|
const imageSrc = getScreenshot();
|
|
224
168
|
handlerFindImage(imageSrc);
|
|
169
|
+
dispatch(setImageSearchInput(imageSrc));
|
|
225
170
|
}}
|
|
226
171
|
className="btn-capture-camera"
|
|
227
172
|
>
|
|
@@ -285,12 +230,17 @@ function CameraCustom(props: Props) {
|
|
|
285
230
|
id="icon-button-file"
|
|
286
231
|
type="file"
|
|
287
232
|
style={{ display: 'none' }}
|
|
288
|
-
{
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
}
|
|
233
|
+
onChange={(fs: any) => {
|
|
234
|
+
const file = fs.target?.files[0];
|
|
235
|
+
if (!file) return;
|
|
236
|
+
dispatch(setImageSearchInput(URL.createObjectURL(file)));
|
|
237
|
+
handlerFindImage(file);
|
|
238
|
+
}}
|
|
239
|
+
accept="image/jpeg,image/png,image/webp"
|
|
240
|
+
onClick={event => {
|
|
241
|
+
// @ts-ignore
|
|
242
|
+
event.target.value = '';
|
|
243
|
+
}}
|
|
294
244
|
/>
|
|
295
245
|
<label htmlFor="icon-button-file">
|
|
296
246
|
<IconButton
|