@nyris/nyris-webapp 0.3.56 → 0.3.58
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 +2 -0
- package/build/static/css/{main.abb86fa9.css → main.67965609.css} +2 -2
- package/build/static/css/main.67965609.css.map +1 -0
- package/build/static/js/{main.2f1ab11c.js → main.8728b671.js} +3 -3
- package/build/static/js/{main.2f1ab11c.js.map → main.8728b671.js.map} +1 -1
- package/package.json +3 -3
- package/public/js/settings.example.js +2 -0
- package/src/components/DragDropFile.tsx +3 -2
- package/src/components/ProductDetailView.tsx +1 -1
- package/src/components/ProductList/index.tsx +1 -1
- package/src/components/pre-filter/index.tsx +1 -2
- package/src/components/results/ItemResult.tsx +9 -2
- package/src/page/landingPage/AppMD.tsx +28 -1
- package/src/page/landingPage/AppMobile.tsx +28 -1
- package/src/page/landingPage/common.scss +26 -8
- package/src/types.ts +2 -0
- package/build/static/css/main.abb86fa9.css.map +0 -1
- /package/build/static/js/{main.2f1ab11c.js.LICENSE.txt → main.8728b671.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.58",
|
|
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.58",
|
|
11
|
+
"@nyris/nyris-react-components": "^0.3.58",
|
|
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}
|
|
@@ -331,12 +331,11 @@ function PreFilterComponent(props: Props) {
|
|
|
331
331
|
columnCount: 4,
|
|
332
332
|
padding: '24px 24px 40px 24px',
|
|
333
333
|
height: '100%',
|
|
334
|
-
|
|
335
334
|
backgroundColor: '#FAFAFA',
|
|
336
335
|
}
|
|
337
336
|
}
|
|
338
337
|
>
|
|
339
|
-
{Object.entries(resultFilter).map(([key, value]: any, i: any) => {
|
|
338
|
+
{Object.entries(resultFilter).sort().map(([key, value]: any, i: any) => {
|
|
340
339
|
return (
|
|
341
340
|
<div className="box-group-items" key={key}>
|
|
342
341
|
<div
|
|
@@ -166,7 +166,7 @@ function ItemResult(props: Props) {
|
|
|
166
166
|
</Button>
|
|
167
167
|
</div>
|
|
168
168
|
)}
|
|
169
|
-
{!isHover && main_image_link && (
|
|
169
|
+
{!isHover && main_image_link && !settings.noSimilarSearch && (
|
|
170
170
|
<div
|
|
171
171
|
className="box-icon-modal"
|
|
172
172
|
onClick={() => {
|
|
@@ -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,7 +490,7 @@ 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;
|
|
@@ -1068,26 +1068,32 @@ button {
|
|
|
1068
1068
|
flex-wrap: wrap;
|
|
1069
1069
|
gap: 24px;
|
|
1070
1070
|
padding-left: 2px;
|
|
1071
|
+
.border {
|
|
1072
|
+
border: 1px solid #E0E0E0;
|
|
1073
|
+
border-radius: 4px;
|
|
1074
|
+
}
|
|
1071
1075
|
.wrap-main-item-result {
|
|
1072
1076
|
display: flex;
|
|
1073
1077
|
flex-direction: column;
|
|
1074
|
-
max-width:
|
|
1075
|
-
width:
|
|
1078
|
+
max-width: 190px;
|
|
1079
|
+
width: 190px;
|
|
1076
1080
|
border-radius: 4px;
|
|
1077
1081
|
overflow: hidden;
|
|
1078
1082
|
height: 100%;
|
|
1079
1083
|
.info-container {
|
|
1080
1084
|
flex-direction: column;
|
|
1081
|
-
background-color: #
|
|
1085
|
+
background-color: #F3F3F5;
|
|
1082
1086
|
flex-grow: 1;
|
|
1083
1087
|
z-index: 100;
|
|
1084
1088
|
display: flex;
|
|
1085
1089
|
padding: 8px;
|
|
1090
|
+
height: 140px;
|
|
1086
1091
|
.info-sku {
|
|
1087
1092
|
font-size: 16px;
|
|
1088
1093
|
font-weight: 700;
|
|
1089
|
-
line-height:
|
|
1090
|
-
|
|
1094
|
+
line-height: 22.78px;
|
|
1095
|
+
letter-spacing: 0.22857144474983215px;
|
|
1096
|
+
padding-left: 4px;
|
|
1091
1097
|
}
|
|
1092
1098
|
.info-marking {
|
|
1093
1099
|
max-width: max-content;
|
|
@@ -1095,9 +1101,15 @@ button {
|
|
|
1095
1101
|
font-size: 14px;
|
|
1096
1102
|
font-weight: 400;
|
|
1097
1103
|
line-height: 14px;
|
|
1098
|
-
|
|
1104
|
+
letter-spacing: 0.22857144474983215px;
|
|
1105
|
+
background: #E0E0E0;
|
|
1099
1106
|
border-radius: 2px;
|
|
1100
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;
|
|
1101
1113
|
}
|
|
1102
1114
|
.info-description {
|
|
1103
1115
|
margin-top: 8px;
|
|
@@ -1105,7 +1117,13 @@ button {
|
|
|
1105
1117
|
font-weight: 400;
|
|
1106
1118
|
line-height: 19.94px;
|
|
1107
1119
|
letter-spacing: 0.22857144474983215px;
|
|
1108
|
-
|
|
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;
|
|
1109
1127
|
}
|
|
1110
1128
|
}
|
|
1111
1129
|
}
|
package/src/types.ts
CHANGED
|
@@ -83,6 +83,8 @@ export interface AppSettings extends NyrisAPISettings {
|
|
|
83
83
|
shouldUseUserMetadata?: boolean;
|
|
84
84
|
experienceVisualSearch?: boolean;
|
|
85
85
|
experienceVisualSearchImages?: string[];
|
|
86
|
+
clarityId?: string,
|
|
87
|
+
noSimilarSearch?: boolean;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
export interface SearchSuiteSettings {
|