@nyris/nyris-webapp 0.3.24 → 0.3.26
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 +12 -12
- package/build/index.html +1 -1
- package/build/{precache-manifest.982b135daeb2c083ccf4eeeddf132bf3.js → precache-manifest.657024161cae7b5c0d6719247ad2572a.js} +10 -10
- package/build/service-worker.js +1 -1
- package/build/static/css/main.0d30f026.chunk.css +2 -0
- package/build/static/css/main.0d30f026.chunk.css.map +1 -0
- package/build/static/js/2.ad8c5320.chunk.js +3 -0
- package/build/static/js/2.ad8c5320.chunk.js.map +1 -0
- package/build/static/js/main.3403bbf6.chunk.js +3 -0
- package/build/static/js/main.3403bbf6.chunk.js.map +1 -0
- package/package.json +5 -3
- package/src/App.tsx +19 -2
- package/src/Store/Store.ts +4 -4
- package/src/Store/{Auth.ts → auth/Auth.ts} +6 -17
- package/src/Store/auth/types.ts +11 -0
- package/src/{defaults.ts → Store/constants.ts} +1 -1
- package/src/Store/nyris/Nyris.ts +67 -0
- package/src/Store/nyris/types.ts +11 -0
- package/src/Store/{Search.ts → search/Search.ts} +4 -63
- package/src/Store/search/search.initialState.ts +28 -0
- package/src/Store/search/types.ts +34 -0
- package/src/components/DetailItem.tsx +20 -10
- package/src/components/DragDropFile.tsx +8 -3
- package/src/components/Feedback.tsx +11 -14
- package/src/components/Header.tsx +29 -30
- package/src/components/HeaderMobile.tsx +1 -1
- package/src/components/Layout.tsx +10 -10
- package/src/components/{LoadingScreen → ProductList}/index.tsx +3 -3
- package/src/components/appMobile.scss +2 -21
- package/src/components/carousel/ImagePreviewCarousel.tsx +2 -1
- package/src/components/common.scss +2 -0
- package/src/components/drawer/cameraCustom.tsx +1 -2
- package/src/components/input/inputSearch.tsx +6 -5
- package/src/components/pre-filter/{desktop/index.tsx → index.tsx} +3 -3
- package/src/components/results/ItemResult.tsx +33 -27
- package/src/constants.ts +12 -0
- package/src/hooks/useVisualSearch.tsx +2 -2
- package/src/i18n.ts +10 -0
- package/src/{modules/LandingPage → page/landingPage}/AppMD.tsx +1 -3
- package/src/{modules/LandingPage → page/landingPage}/AppMobile.tsx +3 -4
- package/src/{modules/LandingPage → page/landingPage}/common.scss +2 -8
- package/src/page/result/index.tsx +8 -10
- package/src/translations.ts +22 -0
- package/src/types.ts +5 -3
- package/build/static/css/main.1e43a778.chunk.css +0 -2
- package/build/static/css/main.1e43a778.chunk.css.map +0 -1
- package/build/static/js/2.fe9108d5.chunk.js +0 -3
- package/build/static/js/2.fe9108d5.chunk.js.map +0 -1
- package/build/static/js/main.83cb88a3.chunk.js +0 -3
- package/build/static/js/main.83cb88a3.chunk.js.map +0 -1
- package/src/Store/Nyris.ts +0 -77
- package/src/components/FooterNewVersion.tsx +0 -12
- package/src/components/HeaderNewVersion.tsx +0 -34
- package/src/modules/LandingPage/propsType.ts +0 -41
- package/src/page/result/MockData.ts +0 -50
- /package/build/static/js/{2.fe9108d5.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.83cb88a3.chunk.js.LICENSE.txt → main.3403bbf6.chunk.js.LICENSE.txt} +0 -0
- /package/src/services/{filter.tsx → filter.ts} +0 -0
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
searchQuery?: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function
|
|
19
|
+
function ProductListComponent({
|
|
20
20
|
allSearchResults,
|
|
21
21
|
getUrlToCanvasFile,
|
|
22
22
|
sendFeedBackAction,
|
|
@@ -167,5 +167,5 @@ function LoadingScreen({
|
|
|
167
167
|
return <>{renderItem}</>;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
const
|
|
171
|
-
export default
|
|
170
|
+
const ProductList = connectStateResults<Props>(memo(ProductListComponent));
|
|
171
|
+
export default ProductList;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
@media screen and (max-width: 776px) {
|
|
2
|
-
|
|
3
|
-
// html {
|
|
4
|
-
// background-color: #fff;
|
|
5
|
-
// }
|
|
6
|
-
// }
|
|
2
|
+
|
|
7
3
|
html {
|
|
8
4
|
background-color: #fff;
|
|
9
5
|
}
|
|
@@ -675,11 +671,7 @@
|
|
|
675
671
|
min-height: initial;
|
|
676
672
|
min-height: initial !important;
|
|
677
673
|
|
|
678
|
-
|
|
679
|
-
.thumbs-wrapper {
|
|
680
|
-
// display: none;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
674
|
+
|
|
683
675
|
}
|
|
684
676
|
|
|
685
677
|
&.box-modal-share {
|
|
@@ -692,17 +684,6 @@
|
|
|
692
684
|
background-color: #fff;
|
|
693
685
|
}
|
|
694
686
|
|
|
695
|
-
.box-slider-image-result {
|
|
696
|
-
button {
|
|
697
|
-
// width: 100% !important;
|
|
698
|
-
// height: 100% !important;
|
|
699
|
-
span {
|
|
700
|
-
// width: 100% !important;
|
|
701
|
-
// height: 100% !important;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
|
|
706
687
|
.box-modal-default {
|
|
707
688
|
max-width: 340px;
|
|
708
689
|
.box-carosel .thumbs-wrapper {
|
|
@@ -9,7 +9,6 @@ import { useDropzone } from 'react-dropzone';
|
|
|
9
9
|
import { useHistory } from 'react-router-dom';
|
|
10
10
|
import Webcam from 'react-webcam';
|
|
11
11
|
import { createImage, findByImage, findRegions } from 'services/image';
|
|
12
|
-
// import { showFeedback } from 'Store/Nyris';
|
|
13
12
|
import {
|
|
14
13
|
onToggleModalItemDetail,
|
|
15
14
|
setImageSearchInput,
|
|
@@ -19,7 +18,7 @@ import {
|
|
|
19
18
|
loadingActionResults,
|
|
20
19
|
setRegions,
|
|
21
20
|
setSelectedRegion,
|
|
22
|
-
} from 'Store/Search';
|
|
21
|
+
} from 'Store/search/Search';
|
|
23
22
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
24
23
|
|
|
25
24
|
interface Props {
|
|
@@ -24,12 +24,13 @@ import {
|
|
|
24
24
|
loadingActionResults,
|
|
25
25
|
setRegions,
|
|
26
26
|
setSelectedRegion,
|
|
27
|
-
} from 'Store/Search';
|
|
27
|
+
} from 'Store/search/Search';
|
|
28
28
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
29
29
|
import DefaultModal from 'components/modal/DefaultModal';
|
|
30
|
-
import
|
|
30
|
+
import PreFilterComponent from 'components/pre-filter';
|
|
31
31
|
import { RectCoords } from '@nyris/nyris-api';
|
|
32
32
|
import { truncateString } from 'helpers/truncateString';
|
|
33
|
+
import { useTranslation } from 'react-i18next';
|
|
33
34
|
|
|
34
35
|
const SearchBox = (props: any) => {
|
|
35
36
|
const { refine, onToggleFilterMobile }: any = props;
|
|
@@ -45,7 +46,7 @@ const SearchBox = (props: any) => {
|
|
|
45
46
|
const query = useQuery();
|
|
46
47
|
const [isOpenModalFilterDesktop, setToggleModalFilterDesktop] =
|
|
47
48
|
useState<boolean>(false);
|
|
48
|
-
|
|
49
|
+
const { t } = useTranslation();
|
|
49
50
|
useEffect(() => {
|
|
50
51
|
if (focusInp?.current) {
|
|
51
52
|
focusInp?.current.focus();
|
|
@@ -257,7 +258,7 @@ const SearchBox = (props: any) => {
|
|
|
257
258
|
fontStyle: 'italic',
|
|
258
259
|
}}
|
|
259
260
|
className="input-search"
|
|
260
|
-
placeholder=
|
|
261
|
+
placeholder={t('Search')}
|
|
261
262
|
value={valueInput}
|
|
262
263
|
onChange={onChangeText}
|
|
263
264
|
ref={focusInp}
|
|
@@ -362,7 +363,7 @@ const SearchBox = (props: any) => {
|
|
|
362
363
|
classNameModal="wrap-filter-destop"
|
|
363
364
|
classNameComponentChild="bg-white box-filter-destop"
|
|
364
365
|
>
|
|
365
|
-
<
|
|
366
|
+
<PreFilterComponent
|
|
366
367
|
handleClose={() => setToggleModalFilterDesktop(false)}
|
|
367
368
|
/>
|
|
368
369
|
</DefaultModal>
|
|
@@ -4,7 +4,7 @@ import CloseIcon from '@material-ui/icons/Close';
|
|
|
4
4
|
import IconSearch from 'common/assets/icons/icon_search.svg';
|
|
5
5
|
import { getFilters, searchFilters } from 'services/filter';
|
|
6
6
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
7
|
-
import { setUpdateKeyFilterDesktop } from 'Store/Search';
|
|
7
|
+
import { setUpdateKeyFilterDesktop } from 'Store/search/Search';
|
|
8
8
|
import { ToggleButton, ToggleButtonGroup } from '@material-ui/lab';
|
|
9
9
|
import { useMediaQuery } from 'react-responsive';
|
|
10
10
|
import { isEmpty } from 'lodash';
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
// onChangeKeyFilter?: any;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
function
|
|
19
|
+
function PreFilterComponent(props: Props) {
|
|
20
20
|
const { handleClose } = props;
|
|
21
21
|
const dispatch = useAppDispatch();
|
|
22
22
|
const stateGlobal = useAppSelector(state => state);
|
|
@@ -353,4 +353,4 @@ function FilterComponent(props: Props) {
|
|
|
353
353
|
);
|
|
354
354
|
}
|
|
355
355
|
|
|
356
|
-
export default
|
|
356
|
+
export default PreFilterComponent;
|
|
@@ -11,9 +11,13 @@ import { AppState } from 'types';
|
|
|
11
11
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
12
12
|
import DefaultModal from 'components/modal/DefaultModal';
|
|
13
13
|
import DetailItem from 'components/DetailItem';
|
|
14
|
-
import {
|
|
14
|
+
import {
|
|
15
|
+
onToggleModalItemDetail,
|
|
16
|
+
updateStatusLoading,
|
|
17
|
+
} from 'Store/search/Search';
|
|
15
18
|
import { ShareModal } from '../ShareModal';
|
|
16
19
|
import { truncateString } from 'helpers/truncateString';
|
|
20
|
+
import { useTranslation } from 'react-i18next';
|
|
17
21
|
|
|
18
22
|
interface Props {
|
|
19
23
|
dataItem: any;
|
|
@@ -48,7 +52,7 @@ function ItemResult(props: Props) {
|
|
|
48
52
|
const [isOpenModalImage, setOpenModalImage] = useState<boolean>(false);
|
|
49
53
|
const [isOpenModalShare, setOpenModalShare] = useState<boolean>(false);
|
|
50
54
|
const [feedback, setFeedback] = useState('none');
|
|
51
|
-
|
|
55
|
+
const { t } = useTranslation();
|
|
52
56
|
const { sku, title, brand, main_offer_link, collap } = dataItem;
|
|
53
57
|
useEffect(() => {
|
|
54
58
|
if (main_image_link) {
|
|
@@ -94,14 +98,7 @@ function ItemResult(props: Props) {
|
|
|
94
98
|
}, 400);
|
|
95
99
|
};
|
|
96
100
|
return (
|
|
97
|
-
<Box
|
|
98
|
-
className="wrap-main-item-result"
|
|
99
|
-
// style={{
|
|
100
|
-
// height: 'calc(100% - 25px)',
|
|
101
|
-
// backgroundColor: 'rgb(243, 243, 245)',
|
|
102
|
-
// }}
|
|
103
|
-
>
|
|
104
|
-
{/* TODO: Component modal image */}
|
|
101
|
+
<Box className="wrap-main-item-result">
|
|
105
102
|
<DefaultModal
|
|
106
103
|
openModal={isOpenModalImage}
|
|
107
104
|
handleClose={(e: any) => {
|
|
@@ -122,7 +119,6 @@ function ItemResult(props: Props) {
|
|
|
122
119
|
/>
|
|
123
120
|
</DefaultModal>
|
|
124
121
|
|
|
125
|
-
{/* TODO: Component modal share */}
|
|
126
122
|
<ShareModal
|
|
127
123
|
setModalState={setOpenModalShare}
|
|
128
124
|
dataItem={dataItem}
|
|
@@ -132,7 +128,7 @@ function ItemResult(props: Props) {
|
|
|
132
128
|
{isGroupItem && collap && (
|
|
133
129
|
<Box className="btn-show-result">
|
|
134
130
|
<Button onClick={handlerShowGroup}>
|
|
135
|
-
Show group
|
|
131
|
+
{t('Show group')}
|
|
136
132
|
<ChevronRightOutlinedIcon style={{ fontSize: '10px' }} />
|
|
137
133
|
</Button>
|
|
138
134
|
</Box>
|
|
@@ -140,7 +136,7 @@ function ItemResult(props: Props) {
|
|
|
140
136
|
{isGroupItem && !collap && (
|
|
141
137
|
<Box className="btn-show-result">
|
|
142
138
|
<Button onClick={handlerHideGroup}>
|
|
143
|
-
Close group
|
|
139
|
+
{t('Close group')}
|
|
144
140
|
<ChevronRightOutlinedIcon style={{ fontSize: '10px' }} />
|
|
145
141
|
</Button>
|
|
146
142
|
</Box>
|
|
@@ -218,7 +214,9 @@ function ItemResult(props: Props) {
|
|
|
218
214
|
display: 'inline-block',
|
|
219
215
|
}}
|
|
220
216
|
>
|
|
221
|
-
<span style={{ marginRight: 3 }}>
|
|
217
|
+
<span style={{ marginRight: 3 }}>
|
|
218
|
+
{settings.itemIdLabel || 'SKU'}:
|
|
219
|
+
</span>
|
|
222
220
|
{truncateString(sku, 19)}
|
|
223
221
|
</Typography>
|
|
224
222
|
</Tooltip>
|
|
@@ -419,12 +417,18 @@ function ItemResult(props: Props) {
|
|
|
419
417
|
</Box>
|
|
420
418
|
)}
|
|
421
419
|
|
|
422
|
-
{settings.showFeedbackAndShare &&
|
|
420
|
+
{settings.showFeedbackAndShare && (
|
|
423
421
|
<Box
|
|
424
422
|
className="box-bottom"
|
|
425
423
|
style={{ marginBottom: 6, marginTop: 10 }}
|
|
426
424
|
>
|
|
427
|
-
<Grid
|
|
425
|
+
<Grid
|
|
426
|
+
container
|
|
427
|
+
justifyContent={
|
|
428
|
+
settings.shareOption ? 'space-between' : 'space-around'
|
|
429
|
+
}
|
|
430
|
+
alignItems="center"
|
|
431
|
+
>
|
|
428
432
|
<Grid item>
|
|
429
433
|
<Box display={'flex'} alignItems={'center'}>
|
|
430
434
|
<Button
|
|
@@ -461,17 +465,19 @@ function ItemResult(props: Props) {
|
|
|
461
465
|
</Button>
|
|
462
466
|
</Box>
|
|
463
467
|
</Grid>
|
|
464
|
-
|
|
465
|
-
<
|
|
466
|
-
<
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
468
|
+
{settings.shareOption && (
|
|
469
|
+
<Grid item>
|
|
470
|
+
<Box display={'flex'} alignItems={'center'}>
|
|
471
|
+
<Button
|
|
472
|
+
style={{ padding: '6px' }}
|
|
473
|
+
className="btn-item"
|
|
474
|
+
onClick={() => false}
|
|
475
|
+
>
|
|
476
|
+
<IconShare width={16} height={16} color="#808080" />
|
|
477
|
+
</Button>
|
|
478
|
+
</Box>
|
|
479
|
+
</Grid>
|
|
480
|
+
)}
|
|
475
481
|
{/* <Grid item>
|
|
476
482
|
<Box display={'flex'} alignItems={'center'}>
|
|
477
483
|
<Button className="btn-item">
|
package/src/constants.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
1
|
export const DEFAULT_REGION = { x1: 0, x2: 1, y1: 0, y2: 1 };
|
|
2
|
+
export const showHits = [
|
|
3
|
+
{ value: 10, label: '10' },
|
|
4
|
+
{ value: 20, label: '20' },
|
|
5
|
+
{ value: 30, label: '30' },
|
|
6
|
+
{ value: 40, label: '40' },
|
|
7
|
+
{ value: 50, label: '50' },
|
|
8
|
+
{ value: 60, label: '60' },
|
|
9
|
+
{ value: 70, label: '70' },
|
|
10
|
+
{ value: 80, label: '80' },
|
|
11
|
+
{ value: 90, label: '90' },
|
|
12
|
+
{ value: 100, label: '100' },
|
|
13
|
+
];
|
|
@@ -3,7 +3,7 @@ import { useCallback } from 'react';
|
|
|
3
3
|
import { useMediaQuery } from 'react-responsive';
|
|
4
4
|
import { feedbackClickEpic } from 'services/Feedback';
|
|
5
5
|
import { createImage, findByImage, findRegions } from 'services/image';
|
|
6
|
-
import { showFeedback, showResults } from 'Store/Nyris';
|
|
6
|
+
import { showFeedback, showResults } from 'Store/nyris/Nyris';
|
|
7
7
|
import {
|
|
8
8
|
loadingActionResults,
|
|
9
9
|
onToggleModalItemDetail,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
setSearchResults,
|
|
14
14
|
setSelectedRegion,
|
|
15
15
|
updateStatusLoading,
|
|
16
|
-
} from 'Store/Search';
|
|
16
|
+
} from 'Store/search/Search';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
18
18
|
|
|
19
19
|
export const useVisualSearch = () => {
|
package/src/i18n.ts
ADDED
|
@@ -12,9 +12,7 @@ import { Link } from 'react-router-dom';
|
|
|
12
12
|
import { useAppSelector } from 'Store/Store';
|
|
13
13
|
import { AlgoliaSettings } from '../../types';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function AppMD(props: Props) {
|
|
15
|
+
function AppMD() {
|
|
18
16
|
const { settings } = useAppSelector(state => state);
|
|
19
17
|
const [isLoading, setLoading] = useState<boolean>(false);
|
|
20
18
|
const { apiKey, appId, indexName } = settings.algolia as AlgoliaSettings;
|
|
@@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
6
6
|
import { useHistory } from 'react-router-dom';
|
|
7
7
|
import { feedbackClickEpic } from 'services/Feedback';
|
|
8
8
|
import { createImage, findByImage, findRegions } from 'services/image';
|
|
9
|
-
import { showFeedback, showResults } from 'Store/Nyris';
|
|
9
|
+
import { showFeedback, showResults } from 'Store/nyris/Nyris';
|
|
10
10
|
import {
|
|
11
11
|
loadingActionResults,
|
|
12
12
|
reset,
|
|
@@ -16,11 +16,10 @@ import {
|
|
|
16
16
|
setSearchResults,
|
|
17
17
|
setSelectedRegion,
|
|
18
18
|
updateStatusLoading,
|
|
19
|
-
} from 'Store/Search';
|
|
19
|
+
} from 'Store/search/Search';
|
|
20
20
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
21
|
-
interface Props {}
|
|
22
21
|
|
|
23
|
-
function AppMobile(
|
|
22
|
+
function AppMobile(): JSX.Element {
|
|
24
23
|
const history = useHistory();
|
|
25
24
|
const dispatch = useAppDispatch();
|
|
26
25
|
const searchState = useAppSelector(state => state);
|
|
@@ -573,14 +573,8 @@ button {
|
|
|
573
573
|
|
|
574
574
|
border-radius: 12px;
|
|
575
575
|
&:hover {
|
|
576
|
-
background:
|
|
576
|
+
background: #ececec;
|
|
577
577
|
box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.25);
|
|
578
|
-
span {
|
|
579
|
-
color: #fff;
|
|
580
|
-
}
|
|
581
|
-
svg {
|
|
582
|
-
color: #fff;
|
|
583
|
-
}
|
|
584
578
|
}
|
|
585
579
|
button {
|
|
586
580
|
padding: 5px !important;
|
|
@@ -960,7 +954,7 @@ button {
|
|
|
960
954
|
}
|
|
961
955
|
}
|
|
962
956
|
.box-result {
|
|
963
|
-
height: calc(100svh -
|
|
957
|
+
height: calc(100svh - 190px);
|
|
964
958
|
display: flex;
|
|
965
959
|
justify-content: space-between;
|
|
966
960
|
// overflow: auto;
|
|
@@ -10,7 +10,7 @@ import IconSupport from 'common/assets/icons/support3.svg';
|
|
|
10
10
|
import { CurrentRefinements } from 'components/current-refinements/current-refinements';
|
|
11
11
|
import FooterResult from 'components/FooterResult';
|
|
12
12
|
import CustomSearchBox from 'components/input/inputSearch';
|
|
13
|
-
import
|
|
13
|
+
import ProductList from 'components/ProductList';
|
|
14
14
|
import ExpandablePanelComponent from 'components/PanelResult';
|
|
15
15
|
import { debounce, isEmpty } from 'lodash';
|
|
16
16
|
import {
|
|
@@ -23,7 +23,7 @@ import { useMediaQuery } from 'react-responsive';
|
|
|
23
23
|
import { Link } from 'react-router-dom';
|
|
24
24
|
import { feedbackClickEpic, feedbackSuccessEpic } from 'services/Feedback';
|
|
25
25
|
import { createImage, findByImage, findRegions } from 'services/image';
|
|
26
|
-
import { showFeedback, showResults } from 'Store/Nyris';
|
|
26
|
+
import { showFeedback, showResults } from 'Store/nyris/Nyris';
|
|
27
27
|
import {
|
|
28
28
|
loadingActionResults,
|
|
29
29
|
onToggleModalItemDetail,
|
|
@@ -35,9 +35,9 @@ import {
|
|
|
35
35
|
setSelectedRegion,
|
|
36
36
|
updateResultChangePosition,
|
|
37
37
|
updateStatusLoading,
|
|
38
|
-
} from 'Store/Search';
|
|
38
|
+
} from 'Store/search/Search';
|
|
39
39
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
40
|
-
import { showHits } from '
|
|
40
|
+
import { showHits } from '../../constants';
|
|
41
41
|
import { DEFAULT_REGION } from '../../constants';
|
|
42
42
|
|
|
43
43
|
interface Props {
|
|
@@ -287,8 +287,7 @@ function ResultComponent(props: Props) {
|
|
|
287
287
|
<Box
|
|
288
288
|
className="col-left"
|
|
289
289
|
style={{
|
|
290
|
-
backgroundColor:
|
|
291
|
-
settings?.themePage?.searchSuite?.primaryColor,
|
|
290
|
+
backgroundColor: settings?.theme?.primaryColor,
|
|
292
291
|
}}
|
|
293
292
|
>
|
|
294
293
|
<Box className="box-preview">
|
|
@@ -335,7 +334,7 @@ function ResultComponent(props: Props) {
|
|
|
335
334
|
} ${isMobile && 'col-right-result-mobile'}`}
|
|
336
335
|
style={{
|
|
337
336
|
marginTop:
|
|
338
|
-
keyFilter && isMobile ? '
|
|
337
|
+
keyFilter && isMobile ? '105px' : isMobile ? '60px' : '0px',
|
|
339
338
|
}}
|
|
340
339
|
>
|
|
341
340
|
<Box className="wrap-box-refinements">
|
|
@@ -345,8 +344,7 @@ function ResultComponent(props: Props) {
|
|
|
345
344
|
<Box
|
|
346
345
|
className="col-left"
|
|
347
346
|
style={{
|
|
348
|
-
backgroundColor:
|
|
349
|
-
settings?.themePage?.searchSuite?.primaryColor,
|
|
347
|
+
backgroundColor: settings?.theme?.primaryColor,
|
|
350
348
|
marginBottom: '15px',
|
|
351
349
|
}}
|
|
352
350
|
>
|
|
@@ -376,7 +374,7 @@ function ResultComponent(props: Props) {
|
|
|
376
374
|
)}
|
|
377
375
|
|
|
378
376
|
<Box className={'box-item-result ml-auto mr-auto'}>
|
|
379
|
-
<
|
|
377
|
+
<ProductList
|
|
380
378
|
getUrlToCanvasFile={getUrlToCanvasFile}
|
|
381
379
|
setLoading={false}
|
|
382
380
|
sendFeedBackAction={sendFeedBackAction}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const translations = {
|
|
2
|
+
en: {
|
|
3
|
+
translation: {
|
|
4
|
+
Search: 'Search',
|
|
5
|
+
'Choose an image': 'Choose an image',
|
|
6
|
+
'or drag it here': 'or drag it here',
|
|
7
|
+
'Manufacturer Number': 'Manufacturer Number',
|
|
8
|
+
'Close group': 'Close group',
|
|
9
|
+
'Show group': 'Show group',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
de: {
|
|
13
|
+
translation: {
|
|
14
|
+
Search: 'Suche',
|
|
15
|
+
'Choose an image': 'Bild wählen',
|
|
16
|
+
'or drag it here': 'oder hierhin ziehen',
|
|
17
|
+
'Manufacturer Number': 'Herst. Teile-Nr.',
|
|
18
|
+
'Close group': 'Schließe Gruppe',
|
|
19
|
+
'Show group': 'Zeige Gruppe',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
package/src/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NyrisAPISettings } from '@nyris/nyris-api';
|
|
2
|
-
import { NyrisAppState } from 'Store/
|
|
3
|
-
import { SearchState } from 'Store/
|
|
2
|
+
import { NyrisAppState } from 'Store/nyris/types';
|
|
3
|
+
import { SearchState } from 'Store/search/types';
|
|
4
4
|
|
|
5
5
|
export interface AlgoliaSettings {
|
|
6
6
|
apiKey: string;
|
|
@@ -30,10 +30,12 @@ export interface AppSettings extends NyrisAPISettings {
|
|
|
30
30
|
alogoliaFilterField?: string;
|
|
31
31
|
headerText?: string;
|
|
32
32
|
brandName?: string;
|
|
33
|
+
shareOption?: boolean;
|
|
34
|
+
language?: string;
|
|
35
|
+
itemIdLabel?: string;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
export interface SearchSuiteSettings {
|
|
36
|
-
active?: boolean;
|
|
37
39
|
appBarLogoUrl?: string;
|
|
38
40
|
headerColor?: string;
|
|
39
41
|
logoWidth?: string;
|