@nyris/nyris-webapp 0.3.55 → 0.3.57
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 +6 -6
- package/build/index.html +1 -1
- package/build/js/settings.example.js +1 -0
- package/build/static/css/{main.d7425370.css → main.67965609.css} +2 -2
- package/build/static/css/main.67965609.css.map +1 -0
- package/build/static/js/{main.7b9e6c68.js → main.5143aa56.js} +3 -3
- package/build/static/js/{main.7b9e6c68.js.map → main.5143aa56.js.map} +1 -1
- package/package.json +3 -3
- package/public/js/settings.example.js +1 -0
- package/src/components/DragDropFile.tsx +3 -2
- package/src/components/ProductList/index.tsx +1 -1
- package/src/components/current-refinements/current-refinements.tsx +1 -5
- package/src/components/results/ItemResult.tsx +8 -1
- package/src/page/landingPage/AppMD.tsx +28 -1
- package/src/page/landingPage/AppMobile.tsx +28 -1
- package/src/page/landingPage/common.scss +40 -16
- package/src/page/result/index.tsx +1 -2
- package/src/types.ts +1 -0
- package/build/static/css/main.d7425370.css.map +0 -1
- /package/build/static/js/{main.7b9e6c68.js.LICENSE.txt → main.5143aa56.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyris/nyris-webapp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.57",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@auth0/auth0-react": "^2.2.4",
|
|
6
6
|
"@emailjs/browser": "^4.3.3",
|
|
7
7
|
"@material-ui/core": "^4.12.4",
|
|
8
8
|
"@material-ui/icons": "^4.11.3",
|
|
9
9
|
"@material-ui/lab": "^4.0.0-alpha.61",
|
|
10
|
-
"@nyris/nyris-api": "^0.3.
|
|
11
|
-
"@nyris/nyris-react-components": "^0.3.
|
|
10
|
+
"@nyris/nyris-api": "^0.3.57",
|
|
11
|
+
"@nyris/nyris-react-components": "^0.3.57",
|
|
12
12
|
"@reduxjs/toolkit": "^2.2.1",
|
|
13
13
|
"@splidejs/react-splide": "^0.7.12",
|
|
14
14
|
"@testing-library/jest-dom": "^5.17.0",
|
|
@@ -41,7 +41,8 @@ function DragDropFile(props: Props) {
|
|
|
41
41
|
} = searchState;
|
|
42
42
|
const { t } = useTranslation();
|
|
43
43
|
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
|
44
|
-
onDrop: async (fs: File[]) => {
|
|
44
|
+
onDrop: async (fs: File[], _, e) => {
|
|
45
|
+
e.stopPropagation();
|
|
45
46
|
history.push('/result');
|
|
46
47
|
dispatch(updateStatusLoading(true));
|
|
47
48
|
dispatch(loadingActionResults());
|
|
@@ -126,7 +127,7 @@ function DragDropFile(props: Props) {
|
|
|
126
127
|
<div style={{ marginBottom: 16 }}>
|
|
127
128
|
<IconDownload width={48} height={48} />
|
|
128
129
|
</div>
|
|
129
|
-
<label
|
|
130
|
+
<label className="" style={{ fontSize: 14 }}>
|
|
130
131
|
<span className="fw-700 text-f14" style={{ paddingRight: '4px' }}>
|
|
131
132
|
{t('Drag and drop')}
|
|
132
133
|
</span>
|
|
@@ -58,7 +58,7 @@ function ProductListComponent({
|
|
|
58
58
|
}
|
|
59
59
|
return productList.map((hit: any, i: number) => {
|
|
60
60
|
return (
|
|
61
|
-
<div key={i} style={{ height: 'fit-content' }}>
|
|
61
|
+
<div key={i} style={{ height: 'fit-content' }} className={settings.simpleCardView ? 'border' : ''}>
|
|
62
62
|
<ItemResult
|
|
63
63
|
dataItem={hit}
|
|
64
64
|
indexItem={i}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { atom } from 'jotai';
|
|
4
3
|
import { useMemo } from 'react';
|
|
5
4
|
import type {
|
|
6
5
|
CurrentRefinementsProvided,
|
|
@@ -25,8 +24,6 @@ export type CurrentRefinement = {
|
|
|
25
24
|
value: RefinementValue;
|
|
26
25
|
};
|
|
27
26
|
|
|
28
|
-
export const refinementCountAtom = atom(0);
|
|
29
|
-
|
|
30
27
|
function CurrentRefinementsComponent({
|
|
31
28
|
items,
|
|
32
29
|
refine,
|
|
@@ -62,8 +59,7 @@ function CurrentRefinementsComponent({
|
|
|
62
59
|
<div
|
|
63
60
|
className={className}
|
|
64
61
|
style={{
|
|
65
|
-
marginBottom:
|
|
66
|
-
marginTop: refinements.length > 0 ? '16px' : '0px',
|
|
62
|
+
marginBottom: '16px',
|
|
67
63
|
}}
|
|
68
64
|
>
|
|
69
65
|
<ul className="flex flex-wrap gap-3">
|
|
@@ -226,7 +226,14 @@ function ItemResult(props: Props) {
|
|
|
226
226
|
<div className="info-container">
|
|
227
227
|
<div className="info-sku">{dataItem.sku}</div>
|
|
228
228
|
<span className="info-marking">{dataItem.Bezeichnung}</span>
|
|
229
|
-
<
|
|
229
|
+
<Tooltip
|
|
230
|
+
title={settings.language === 'en' ? dataItem.VK_Text_Englisch: dataItem.VK_Text_Deutsch}
|
|
231
|
+
placement="top"
|
|
232
|
+
arrow={true}
|
|
233
|
+
disableHoverListener={settings.language === 'en' ? dataItem.VK_Text_Englisch?.length < 76 : dataItem.VK_Text_Deutsch?.length < 76}
|
|
234
|
+
>
|
|
235
|
+
<div className="info-description">{settings.language === 'en' ? dataItem.VK_Text_Englisch : dataItem.VK_Text_Deutsch}</div>
|
|
236
|
+
</Tooltip>
|
|
230
237
|
</div>
|
|
231
238
|
) : (
|
|
232
239
|
<div
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
2
|
import './common.scss';
|
|
3
3
|
import algoliasearch from 'algoliasearch/lite';
|
|
4
4
|
import DragDropFile from 'components/DragDropFile';
|
|
@@ -15,11 +15,38 @@ function AppMD() {
|
|
|
15
15
|
const searchClient = algoliasearch(appId, apiKey);
|
|
16
16
|
searchClient.initIndex(indexName);
|
|
17
17
|
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (settings.clarityId) {
|
|
20
|
+
clarify(window, document, 'clarity', 'script', settings.clarityId);
|
|
21
|
+
}
|
|
22
|
+
}, [settings.clarityId]);
|
|
23
|
+
|
|
18
24
|
const acceptTypes = ['image/*'];
|
|
19
25
|
const InfiniteHits = ({ hits }: any) => {
|
|
20
26
|
return <div></div>;
|
|
21
27
|
};
|
|
22
28
|
|
|
29
|
+
const clarify = function (
|
|
30
|
+
c: any,
|
|
31
|
+
l: Document,
|
|
32
|
+
a: string,
|
|
33
|
+
r: string,
|
|
34
|
+
i: string
|
|
35
|
+
) {
|
|
36
|
+
c[a] =
|
|
37
|
+
c[a] ||
|
|
38
|
+
function () {
|
|
39
|
+
(c[a].q = c[a].q || []).push(arguments);
|
|
40
|
+
};
|
|
41
|
+
const t: any = l.createElement(r);
|
|
42
|
+
t.async = true;
|
|
43
|
+
t.src = `https://www.clarity.ms/tag/${i}`;
|
|
44
|
+
const y = l.getElementsByTagName(r)[0];
|
|
45
|
+
if (y.parentNode) {
|
|
46
|
+
y.parentNode.insertBefore(t, y);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
23
50
|
const onChangeLoading = (value: boolean) => {
|
|
24
51
|
setLoading(value);
|
|
25
52
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import CameraCustom from 'components/drawer/cameraCustom';
|
|
2
|
-
import React, { useState } from 'react';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
3
|
import { useAppSelector } from 'Store/Store';
|
|
4
4
|
import { ReactComponent as CameraIcon } from 'common/assets/icons/take_photo.svg';
|
|
5
5
|
import ExperienceVisualSearch from '../../components/Experience-visual-search/ExperienceVisualSearch';
|
|
@@ -8,6 +8,33 @@ function AppMobile(): JSX.Element {
|
|
|
8
8
|
const { settings } = useAppSelector(state => state);
|
|
9
9
|
const [isOpenModalCamera, setOpenModalCamera] = useState<boolean>(false);
|
|
10
10
|
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (settings.clarityId) {
|
|
13
|
+
clarify(window, document, 'clarity', 'script', settings.clarityId);
|
|
14
|
+
}
|
|
15
|
+
}, [settings.clarityId]);
|
|
16
|
+
|
|
17
|
+
const clarify = function (
|
|
18
|
+
c: any,
|
|
19
|
+
l: Document,
|
|
20
|
+
a: string,
|
|
21
|
+
r: string,
|
|
22
|
+
i: string
|
|
23
|
+
) {
|
|
24
|
+
c[a] =
|
|
25
|
+
c[a] ||
|
|
26
|
+
function () {
|
|
27
|
+
(c[a].q = c[a].q || []).push(arguments);
|
|
28
|
+
};
|
|
29
|
+
const t: any = l.createElement(r);
|
|
30
|
+
t.async = true;
|
|
31
|
+
t.src = `https://www.clarity.ms/tag/${i}`;
|
|
32
|
+
const y = l.getElementsByTagName(r)[0];
|
|
33
|
+
if (y.parentNode) {
|
|
34
|
+
y.parentNode.insertBefore(t, y);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
11
38
|
return (
|
|
12
39
|
<div
|
|
13
40
|
style={{
|
|
@@ -490,16 +490,21 @@ button {
|
|
|
490
490
|
}
|
|
491
491
|
.info-marking {
|
|
492
492
|
width: max-content;
|
|
493
|
-
background: #
|
|
493
|
+
background: #E0E0E0;
|
|
494
494
|
border-radius: 2px;
|
|
495
495
|
padding: 4px;
|
|
496
496
|
word-break: break-all;
|
|
497
|
-
|
|
497
|
+
font-size: 16px;
|
|
498
|
+
font-weight: 400;
|
|
499
|
+
line-height: 12px;
|
|
500
|
+
letter-spacing: 0.22857144474983215px;
|
|
501
|
+
text-align: left;
|
|
498
502
|
}
|
|
499
503
|
.info-description {
|
|
500
|
-
font-size:
|
|
504
|
+
font-size: 16px;
|
|
501
505
|
font-weight: 400;
|
|
502
|
-
line-height:
|
|
506
|
+
line-height: 22.78px;
|
|
507
|
+
letter-spacing: 0.22857144474983215px;
|
|
503
508
|
padding: 8px 0 0 4px;
|
|
504
509
|
}
|
|
505
510
|
}
|
|
@@ -956,7 +961,7 @@ button {
|
|
|
956
961
|
|
|
957
962
|
.go-back-button {
|
|
958
963
|
margin-left: 24px;
|
|
959
|
-
margin-
|
|
964
|
+
margin-bottom: 24px;
|
|
960
965
|
padding: 8px;
|
|
961
966
|
border-radius: 20px;
|
|
962
967
|
width: max-content;
|
|
@@ -1063,43 +1068,62 @@ button {
|
|
|
1063
1068
|
flex-wrap: wrap;
|
|
1064
1069
|
gap: 24px;
|
|
1065
1070
|
padding-left: 2px;
|
|
1071
|
+
.border {
|
|
1072
|
+
border: 1px solid #E0E0E0;
|
|
1073
|
+
border-radius: 4px;
|
|
1074
|
+
}
|
|
1066
1075
|
.wrap-main-item-result {
|
|
1067
1076
|
display: flex;
|
|
1068
1077
|
flex-direction: column;
|
|
1069
|
-
max-width:
|
|
1070
|
-
width:
|
|
1078
|
+
max-width: 190px;
|
|
1079
|
+
width: 190px;
|
|
1071
1080
|
border-radius: 4px;
|
|
1072
1081
|
overflow: hidden;
|
|
1073
1082
|
height: 100%;
|
|
1074
1083
|
.info-container {
|
|
1075
1084
|
flex-direction: column;
|
|
1076
|
-
background-color: #
|
|
1085
|
+
background-color: #F3F3F5;
|
|
1077
1086
|
flex-grow: 1;
|
|
1078
1087
|
z-index: 100;
|
|
1079
1088
|
display: flex;
|
|
1080
1089
|
padding: 8px;
|
|
1090
|
+
height: 140px;
|
|
1081
1091
|
.info-sku {
|
|
1082
|
-
font-size:
|
|
1092
|
+
font-size: 16px;
|
|
1083
1093
|
font-weight: 700;
|
|
1084
|
-
line-height:
|
|
1085
|
-
|
|
1094
|
+
line-height: 22.78px;
|
|
1095
|
+
letter-spacing: 0.22857144474983215px;
|
|
1096
|
+
padding-left: 4px;
|
|
1086
1097
|
}
|
|
1087
1098
|
.info-marking {
|
|
1088
1099
|
max-width: max-content;
|
|
1089
1100
|
padding: 2px 4px;
|
|
1090
|
-
font-size:
|
|
1101
|
+
font-size: 14px;
|
|
1091
1102
|
font-weight: 400;
|
|
1092
1103
|
line-height: 14px;
|
|
1093
|
-
|
|
1104
|
+
letter-spacing: 0.22857144474983215px;
|
|
1105
|
+
background: #E0E0E0;
|
|
1094
1106
|
border-radius: 2px;
|
|
1095
1107
|
word-break: break-all;
|
|
1108
|
+
overflow: hidden;
|
|
1109
|
+
display: -webkit-box;
|
|
1110
|
+
-webkit-line-clamp: 2;
|
|
1111
|
+
line-clamp: 2;
|
|
1112
|
+
-webkit-box-orient: vertical;
|
|
1096
1113
|
}
|
|
1097
1114
|
.info-description {
|
|
1098
1115
|
margin-top: 8px;
|
|
1099
|
-
font-size:
|
|
1116
|
+
font-size: 14px;
|
|
1100
1117
|
font-weight: 400;
|
|
1101
|
-
line-height:
|
|
1102
|
-
|
|
1118
|
+
line-height: 19.94px;
|
|
1119
|
+
letter-spacing: 0.22857144474983215px;
|
|
1120
|
+
word-break: break-all;
|
|
1121
|
+
padding-left: 4px;
|
|
1122
|
+
overflow: hidden;
|
|
1123
|
+
display: -webkit-box;
|
|
1124
|
+
-webkit-line-clamp: 3;
|
|
1125
|
+
line-clamp: 2;
|
|
1126
|
+
-webkit-box-orient: vertical;
|
|
1103
1127
|
}
|
|
1104
1128
|
}
|
|
1105
1129
|
}
|
|
@@ -456,7 +456,7 @@ function ResultComponent(props: Props) {
|
|
|
456
456
|
settings.preview && 'ml-auto mr-auto'
|
|
457
457
|
} ${isMobile && 'col-right-result-mobile'}`}
|
|
458
458
|
style={{
|
|
459
|
-
paddingTop: isMobile ? '8px' : '',
|
|
459
|
+
paddingTop: isMobile ? '8px' : '40px',
|
|
460
460
|
overflow: !isMobile ? 'auto' : '',
|
|
461
461
|
display: 'flex',
|
|
462
462
|
flexDirection: 'column',
|
|
@@ -509,7 +509,6 @@ function ResultComponent(props: Props) {
|
|
|
509
509
|
className={'box-item-result ml-auto mr-auto'}
|
|
510
510
|
style={{
|
|
511
511
|
paddingLeft: isMobile ? 0 : 16,
|
|
512
|
-
paddingTop: isMobile ? 0 : 16,
|
|
513
512
|
height: '100%',
|
|
514
513
|
position: 'relative',
|
|
515
514
|
}}
|
package/src/types.ts
CHANGED