@nyris/nyris-webapp 0.3.23 → 0.3.25
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/README.md +1 -1
- package/build/asset-manifest.json +12 -18
- package/build/index.html +1 -1
- package/build/{precache-manifest.550e76235499efc131a68c80392f6bfc.js → precache-manifest.3eed67031bd288eaf7ff98cd02aef6d7.js} +11 -35
- 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.f0507df9.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt} +0 -15
- package/build/static/js/2.ad8c5320.chunk.js.map +1 -0
- package/build/static/js/main.7c54ad4d.chunk.js +3 -0
- package/build/static/js/main.7c54ad4d.chunk.js.map +1 -0
- package/package.json +5 -3
- package/src/App.tsx +24 -15
- package/src/Router.tsx +6 -41
- package/src/Store/Store.ts +14 -23
- package/src/Store/{Auth.ts → auth/Auth.ts} +6 -17
- package/src/Store/auth/types.ts +11 -0
- package/src/Store/constants.ts +21 -0
- package/src/Store/nyris/Nyris.ts +67 -0
- package/src/Store/nyris/types.ts +11 -0
- package/src/Store/{Search.ts → search/Search.ts} +3 -63
- package/src/Store/search/search.initialState.ts +28 -0
- package/src/Store/search/types.ts +34 -0
- package/src/components/DetailItem.tsx +29 -25
- package/src/components/DragDropFile.tsx +8 -3
- package/src/components/Feedback.tsx +11 -14
- package/src/components/FooterMobile.tsx +3 -51
- package/src/components/FooterResult.tsx +1 -1
- package/src/components/Header.tsx +29 -30
- package/src/components/HeaderMobile.tsx +14 -21
- package/src/components/Layout.tsx +11 -27
- package/src/components/PanelResult/index.tsx +1 -1
- 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/clear-refinements/clear-refinements.tsx +1 -1
- package/src/components/common.scss +2 -0
- package/src/components/drawer/cameraCustom.tsx +7 -14
- package/src/components/input/inputSearch.tsx +9 -8
- package/src/components/pre-filter/{desktop/index.tsx → index.tsx} +5 -5
- package/src/components/results/ItemResult.tsx +40 -34
- package/src/constants.ts +12 -0
- package/src/hooks/useVisualSearch.tsx +2 -2
- package/src/i18n.ts +10 -0
- package/src/index.css +13 -0
- package/src/index.tsx +0 -20
- package/src/{modules/LandingPage/indexNewVersion.tsx → page/landingPage/AppMD.tsx} +2 -4
- package/src/{modules/LandingPage → page/landingPage}/AppMobile.tsx +4 -5
- package/src/{modules/LandingPage → page/landingPage}/common.scss +2 -8
- package/src/page/result/index.tsx +8 -10
- package/src/services/Feedback.ts +48 -71
- package/src/services/{filter.tsx → filter.ts} +1 -1
- package/src/services/types.ts +30 -39
- package/src/translations.ts +22 -0
- package/src/types.ts +13 -66
- package/build/js/test.js +0 -84
- package/build/static/css/main.c956b74c.chunk.css +0 -2
- package/build/static/css/main.c956b74c.chunk.css.map +0 -1
- package/build/static/js/2.f0507df9.chunk.js +0 -3
- package/build/static/js/2.f0507df9.chunk.js.map +0 -1
- package/build/static/js/main.247c7b7e.chunk.js +0 -3
- package/build/static/js/main.247c7b7e.chunk.js.map +0 -1
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/icon_company.2b2a0a61.svg +0 -3
- package/build/static/media/icon_email.132d632b.svg +0 -3
- package/build/static/media/icon_phone.09335da9.svg +0 -3
- package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
- package/build/static/media/icon_users.2013c76e.svg +0 -3
- package/public/js/test.js +0 -84
- package/src/App.css +0 -65
- package/src/Store/Nyris.ts +0 -77
- package/src/components/AppContainer.tsx +0 -126
- package/src/components/CategoryFilter.tsx +0 -17
- package/src/components/Codes.tsx +0 -20
- package/src/components/CustomHits/index.tsx +0 -47
- package/src/components/Footer.tsx +0 -96
- package/src/components/FooterMD.tsx +0 -54
- package/src/components/FooterNewVersion.tsx +0 -12
- package/src/components/HeaderMd.tsx +0 -38
- package/src/components/HeaderNewVersion.tsx +0 -112
- package/src/components/Navigation.tsx +0 -34
- package/src/components/PredictedCategories.tsx +0 -14
- package/src/components/Refine.tsx +0 -28
- package/src/components/RelevantSort.tsx +0 -12
- package/src/components/Result.tsx +0 -210
- package/src/components/Saved/AllItem.tsx +0 -32
- package/src/components/Saved/Category.tsx +0 -16
- package/src/components/auto-complete/basic.tsx +0 -153
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
- package/src/components/button/clear-fillter.tsx +0 -30
- package/src/components/camera/screenshot.tsx +0 -33
- package/src/components/count/count.tsx +0 -20
- package/src/components/hitItem/hits.tsx +0 -50
- package/src/components/hitItem/infinitiHits.tsx +0 -33
- package/src/components/icon/icon.tsx +0 -13
- package/src/components/icon_textArea.svg +0 -3
- package/src/components/refinement-list/index.tsx +0 -42
- package/src/components/results/pagination.tsx +0 -34
- package/src/components/search/ListSearch.tsx +0 -209
- package/src/defaults.ts +0 -37
- package/src/modules/LandingPage/App.tsx +0 -318
- package/src/modules/LandingPage/AppMD.tsx +0 -399
- package/src/modules/LandingPage/index.tsx +0 -186
- package/src/modules/LandingPage/propsType.ts +0 -43
- package/src/page/Auth/login.tsx +0 -7
- package/src/page/Exception/404.tsx +0 -11
- package/src/page/History/index.tsx +0 -76
- package/src/page/Profile/index.tsx +0 -140
- package/src/page/ResultMobile/index.tsx +0 -12
- package/src/page/Saved/MockData.ts +0 -223
- package/src/page/Saved/index.tsx +0 -166
- package/src/page/Support/MockData.ts +0 -45
- package/src/page/Support/index.tsx +0 -492
- package/src/page/result/MockData.ts +0 -50
- /package/build/static/js/{main.247c7b7e.chunk.js.LICENSE.txt → main.7c54ad4d.chunk.js.LICENSE.txt} +0 -0
|
@@ -12,12 +12,13 @@ import {
|
|
|
12
12
|
loadingActionResults,
|
|
13
13
|
setRegions,
|
|
14
14
|
setSelectedRegion,
|
|
15
|
-
} from 'Store/Search';
|
|
16
|
-
import { showFeedback } from 'Store/Nyris';
|
|
15
|
+
} from 'Store/search/Search';
|
|
16
|
+
import { showFeedback } from 'Store/nyris/Nyris';
|
|
17
17
|
import { useHistory } from 'react-router-dom';
|
|
18
18
|
import { useState } from 'react';
|
|
19
19
|
import IconUpload from 'common/assets/images/Icon_Upload.svg';
|
|
20
20
|
import { RectCoords } from '@nyris/nyris-api';
|
|
21
|
+
import { useTranslation } from 'react-i18next';
|
|
21
22
|
|
|
22
23
|
interface Props {
|
|
23
24
|
acceptTypes: any;
|
|
@@ -35,6 +36,7 @@ function DragDropFile(props: Props) {
|
|
|
35
36
|
search: { keyFilter },
|
|
36
37
|
} = searchState;
|
|
37
38
|
const [isLoadingLoadFile, setLoadingLoadFile] = useState<any>(false);
|
|
39
|
+
const { t } = useTranslation();
|
|
38
40
|
const { getRootProps, getInputProps, isDragActive } = useDropzone({
|
|
39
41
|
onDrop: async (fs: File[]) => {
|
|
40
42
|
history.push('/result');
|
|
@@ -147,7 +149,10 @@ function DragDropFile(props: Props) {
|
|
|
147
149
|
className=""
|
|
148
150
|
style={{ color: '#2B2C46', fontSize: 14 }}
|
|
149
151
|
>
|
|
150
|
-
<span className="fw-700"
|
|
152
|
+
<span className="fw-700" style={{ paddingRight: '4px' }}>
|
|
153
|
+
{t('Choose an image')}
|
|
154
|
+
</span>
|
|
155
|
+
{t('or drag it here')}
|
|
151
156
|
</label>
|
|
152
157
|
<input
|
|
153
158
|
{...getInputProps()}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { useAppDispatch, useAppSelector } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from
|
|
7
|
-
import React from "react";
|
|
8
|
-
import { Animate } from "react-move";
|
|
9
|
-
import { feedbackSuccessEpic } from "services/Feedback";
|
|
1
|
+
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
2
|
+
import { feedbackNegative, feedbackSubmitPositive } from 'Store/nyris/Nyris';
|
|
3
|
+
import { NyrisFeedbackState } from 'Store/nyris/types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Animate } from 'react-move';
|
|
6
|
+
import { feedbackSuccessEpic } from 'services/Feedback';
|
|
10
7
|
interface FeedbackProps {
|
|
11
8
|
feedbackState: NyrisFeedbackState;
|
|
12
9
|
onClose?: () => void;
|
|
@@ -14,7 +11,7 @@ interface FeedbackProps {
|
|
|
14
11
|
|
|
15
12
|
const Feedback: React.FC<FeedbackProps> = ({ feedbackState, onClose }) => {
|
|
16
13
|
let inner: any = null;
|
|
17
|
-
const state = useAppSelector(
|
|
14
|
+
const state = useAppSelector(state => state);
|
|
18
15
|
const dispatch = useAppDispatch();
|
|
19
16
|
const onPositiveFeedback = (data: boolean) => {
|
|
20
17
|
feedbackSuccessEpic(state, data);
|
|
@@ -26,7 +23,7 @@ const Feedback: React.FC<FeedbackProps> = ({ feedbackState, onClose }) => {
|
|
|
26
23
|
};
|
|
27
24
|
|
|
28
25
|
switch (feedbackState) {
|
|
29
|
-
case
|
|
26
|
+
case 'question':
|
|
30
27
|
inner = (
|
|
31
28
|
<div className="feedbackForm">
|
|
32
29
|
<p>Did you find what you were looking for?</p>
|
|
@@ -45,14 +42,14 @@ const Feedback: React.FC<FeedbackProps> = ({ feedbackState, onClose }) => {
|
|
|
45
42
|
</div>
|
|
46
43
|
);
|
|
47
44
|
break;
|
|
48
|
-
case
|
|
45
|
+
case 'positive':
|
|
49
46
|
inner = (
|
|
50
47
|
<div className="feedbackMessage positive">
|
|
51
48
|
Great, thank you for your feedback!
|
|
52
49
|
</div>
|
|
53
50
|
);
|
|
54
51
|
break;
|
|
55
|
-
case
|
|
52
|
+
case 'negative':
|
|
56
53
|
inner = (
|
|
57
54
|
<div className="feedbackMessage negative">
|
|
58
55
|
We saved your request so we can track down the issue and improve the
|
|
@@ -71,7 +68,7 @@ const Feedback: React.FC<FeedbackProps> = ({ feedbackState, onClose }) => {
|
|
|
71
68
|
}
|
|
72
69
|
return (
|
|
73
70
|
<Animate
|
|
74
|
-
show={feedbackState !==
|
|
71
|
+
show={feedbackState !== 'hidden'}
|
|
75
72
|
start={{ y: 100, opacity: 0 }}
|
|
76
73
|
enter={{ y: [0], opacity: [1] }}
|
|
77
74
|
leave={{ y: [100], opacity: [0] }}
|
|
@@ -15,15 +15,6 @@ function FooterMobile(props: Props): JSX.Element {
|
|
|
15
15
|
const history = useHistory();
|
|
16
16
|
const { settings } = useAppSelector(state => state);
|
|
17
17
|
|
|
18
|
-
// const handleCheckMatchLink = (match: any, location: any) => {
|
|
19
|
-
// let active = false;
|
|
20
|
-
// if (match?.url === location.pathname) {
|
|
21
|
-
// active = true;
|
|
22
|
-
// }
|
|
23
|
-
|
|
24
|
-
// return active;
|
|
25
|
-
// };
|
|
26
|
-
|
|
27
18
|
return (
|
|
28
19
|
<Box
|
|
29
20
|
className="box-footer-mobile"
|
|
@@ -41,7 +32,7 @@ function FooterMobile(props: Props): JSX.Element {
|
|
|
41
32
|
alignItems: 'center',
|
|
42
33
|
backgroundColor:
|
|
43
34
|
history.location.pathname === '/'
|
|
44
|
-
? `${settings.
|
|
35
|
+
? `${settings.theme?.primaryColor}21`
|
|
45
36
|
: '',
|
|
46
37
|
}}
|
|
47
38
|
activeClassName="active"
|
|
@@ -51,13 +42,13 @@ function FooterMobile(props: Props): JSX.Element {
|
|
|
51
42
|
<Home
|
|
52
43
|
color={
|
|
53
44
|
history.location.pathname === '/'
|
|
54
|
-
? settings.
|
|
45
|
+
? settings.theme?.primaryColor
|
|
55
46
|
: '#000'
|
|
56
47
|
}
|
|
57
48
|
/>
|
|
58
49
|
</NavLink>
|
|
59
50
|
<Box
|
|
60
|
-
style={{ background: settings.
|
|
51
|
+
style={{ background: settings.theme?.primaryColor }}
|
|
61
52
|
className="box-icon-camera-mobile"
|
|
62
53
|
>
|
|
63
54
|
<Button
|
|
@@ -68,45 +59,6 @@ function FooterMobile(props: Props): JSX.Element {
|
|
|
68
59
|
<IconCameraMobile color="#FFFF" />
|
|
69
60
|
</Button>
|
|
70
61
|
</Box>
|
|
71
|
-
{/* hidden_as_required {history.location.pathname !== "/" && (
|
|
72
|
-
<>
|
|
73
|
-
<Box style={{ padding: 23 }}>
|
|
74
|
-
<NavLink
|
|
75
|
-
activeClassName="active"
|
|
76
|
-
isActive={(match, location) =>
|
|
77
|
-
handleCheckMatchLink(match, location)
|
|
78
|
-
}
|
|
79
|
-
to={"/support"}
|
|
80
|
-
className="nav-link p-0 menu-children rounded-0"
|
|
81
|
-
>
|
|
82
|
-
<img
|
|
83
|
-
width={24}
|
|
84
|
-
height={24}
|
|
85
|
-
src={`${IconSupportMobile}`}
|
|
86
|
-
alt="support_mobile"
|
|
87
|
-
/>
|
|
88
|
-
</NavLink>
|
|
89
|
-
</Box>
|
|
90
|
-
|
|
91
|
-
<Box style={{ padding: 23 }}>
|
|
92
|
-
<NavLink
|
|
93
|
-
activeClassName="active"
|
|
94
|
-
isActive={(match, location) =>
|
|
95
|
-
handleCheckMatchLink(match, location)
|
|
96
|
-
}
|
|
97
|
-
to={"/account"}
|
|
98
|
-
className="nav-link p-0 menu-children rounded-0"
|
|
99
|
-
>
|
|
100
|
-
<img
|
|
101
|
-
width={24}
|
|
102
|
-
height={24}
|
|
103
|
-
src={`${IconAdminMobile}`}
|
|
104
|
-
alt="account_page"
|
|
105
|
-
/>
|
|
106
|
-
</NavLink>
|
|
107
|
-
</Box>
|
|
108
|
-
</>
|
|
109
|
-
)}*/}
|
|
110
62
|
|
|
111
63
|
<Box className="box-screenshot-camera">
|
|
112
64
|
<CameraCustom
|
|
@@ -20,7 +20,7 @@ function Pagination({ children }: any) {
|
|
|
20
20
|
<span style={{ color: '#2B2C46' }}>Share your search with our</span>
|
|
21
21
|
<Link
|
|
22
22
|
to={'/support'}
|
|
23
|
-
style={{ color: settings.
|
|
23
|
+
style={{ color: settings.theme?.secondaryColor }}
|
|
24
24
|
>
|
|
25
25
|
product experts
|
|
26
26
|
</Link>
|
|
@@ -1,35 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Box } from '@material-ui/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { NavLink } from 'react-router-dom';
|
|
4
|
+
import './common.scss';
|
|
5
|
+
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
6
|
+
import { reset } from 'Store/search/Search';
|
|
2
7
|
|
|
3
|
-
function
|
|
8
|
+
function Header(): JSX.Element {
|
|
9
|
+
const dispatch = useAppDispatch();
|
|
10
|
+
const { settings } = useAppSelector(state => state);
|
|
4
11
|
return (
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
>
|
|
25
|
-
Visit our Website
|
|
26
|
-
</a>
|
|
27
|
-
</li>
|
|
28
|
-
</ul>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
12
|
+
<Box className="box-content" display={'flex'}>
|
|
13
|
+
<NavLink
|
|
14
|
+
to="/"
|
|
15
|
+
style={{ lineHeight: 0, paddingLeft: '10px' }}
|
|
16
|
+
onClick={() => {
|
|
17
|
+
dispatch(reset(''));
|
|
18
|
+
}}
|
|
19
|
+
>
|
|
20
|
+
<img
|
|
21
|
+
src={settings.theme?.appBarLogoUrl}
|
|
22
|
+
alt="logo"
|
|
23
|
+
style={{
|
|
24
|
+
aspectRatio: 1,
|
|
25
|
+
width: settings.theme?.logoWidth,
|
|
26
|
+
height: settings.theme?.logoHeight,
|
|
27
|
+
}}
|
|
28
|
+
/>
|
|
29
|
+
</NavLink>
|
|
30
|
+
</Box>
|
|
32
31
|
);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
export default
|
|
34
|
+
export default Header;
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
updateValueTextSearchMobile,
|
|
14
14
|
setUpdateKeyFilterDesktop,
|
|
15
15
|
setPreFilterDropdown,
|
|
16
|
-
} from 'Store/Search';
|
|
16
|
+
} from 'Store/search/Search';
|
|
17
17
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
18
18
|
import { AppState } from 'types';
|
|
19
19
|
import CustomSearchBox from './input/inputSearch';
|
|
@@ -117,7 +117,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
117
117
|
alignItems: 'center',
|
|
118
118
|
height: '50px',
|
|
119
119
|
borderBottom: '1px solid #e9e9ec',
|
|
120
|
-
background: settings.
|
|
120
|
+
background: settings.theme?.headerColor,
|
|
121
121
|
}}
|
|
122
122
|
>
|
|
123
123
|
<NavLink
|
|
@@ -127,16 +127,13 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
127
127
|
dispatch(reset(''));
|
|
128
128
|
}}
|
|
129
129
|
>
|
|
130
|
-
{/* <section id="branding" style={{ height: 32 }} /> */}
|
|
131
130
|
<img
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
src={settings.themePage.searchSuite?.appBarLogoUrl}
|
|
135
|
-
alt={settings.themePage.searchSuite?.appBarLogoUrlAlt}
|
|
131
|
+
src={settings.theme?.appBarLogoUrl}
|
|
132
|
+
alt="logo"
|
|
136
133
|
style={{
|
|
137
134
|
aspectRatio: 1,
|
|
138
|
-
width: settings.
|
|
139
|
-
height: settings.
|
|
135
|
+
width: settings.theme?.logoWidth,
|
|
136
|
+
height: settings.theme?.logoHeight,
|
|
140
137
|
}}
|
|
141
138
|
/>
|
|
142
139
|
</NavLink>
|
|
@@ -150,8 +147,8 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
150
147
|
{imageThumbSearchInput && (
|
|
151
148
|
<div
|
|
152
149
|
style={{
|
|
153
|
-
border: `2px solid ${settings.
|
|
154
|
-
backgroundColor: `${settings.
|
|
150
|
+
border: `2px solid ${settings.theme?.secondaryColor}c7`,
|
|
151
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
155
152
|
}}
|
|
156
153
|
className="box-image-search-thumb-mobile"
|
|
157
154
|
>
|
|
@@ -162,7 +159,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
162
159
|
/>
|
|
163
160
|
<button
|
|
164
161
|
style={{
|
|
165
|
-
backgroundColor: `${settings.
|
|
162
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
166
163
|
}}
|
|
167
164
|
onClick={() => {
|
|
168
165
|
if (textSearchInputMobile) {
|
|
@@ -183,7 +180,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
183
180
|
<CloseIcon
|
|
184
181
|
style={{
|
|
185
182
|
fontSize: 20,
|
|
186
|
-
color: settings.
|
|
183
|
+
color: settings.theme?.secondaryColor,
|
|
187
184
|
fontWeight: 700,
|
|
188
185
|
}}
|
|
189
186
|
/>
|
|
@@ -255,9 +252,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
255
252
|
<CloseIcon
|
|
256
253
|
style={{
|
|
257
254
|
fontSize: 20,
|
|
258
|
-
color:
|
|
259
|
-
settings.themePage.searchSuite
|
|
260
|
-
?.secondaryColor,
|
|
255
|
+
color: settings.theme?.secondaryColor,
|
|
261
256
|
}}
|
|
262
257
|
/>
|
|
263
258
|
</button>
|
|
@@ -278,7 +273,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
278
273
|
borderRadius: '100%',
|
|
279
274
|
backgroundColor:
|
|
280
275
|
preFilterDropdown || keyFilter
|
|
281
|
-
? `${settings.
|
|
276
|
+
? `${settings.theme?.secondaryColor}26`
|
|
282
277
|
: '#f3f3f5',
|
|
283
278
|
margin: '0 12px',
|
|
284
279
|
}}
|
|
@@ -287,15 +282,13 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
287
282
|
<CloseIcon
|
|
288
283
|
style={{
|
|
289
284
|
fontSize: 16,
|
|
290
|
-
color: settings.
|
|
285
|
+
color: settings.theme?.secondaryColor,
|
|
291
286
|
}}
|
|
292
287
|
/>
|
|
293
288
|
) : (
|
|
294
289
|
<IconFilter
|
|
295
290
|
color={
|
|
296
|
-
keyFilter
|
|
297
|
-
? settings.themePage.searchSuite?.secondaryColor
|
|
298
|
-
: '#000'
|
|
291
|
+
keyFilter ? settings.theme?.secondaryColor : '#000'
|
|
299
292
|
}
|
|
300
293
|
/>
|
|
301
294
|
)}
|
|
@@ -11,28 +11,22 @@ import {
|
|
|
11
11
|
onResetRequestImage,
|
|
12
12
|
setPreFilterDropdown,
|
|
13
13
|
setUpdateSession,
|
|
14
|
-
} from 'Store/Search';
|
|
14
|
+
} from 'Store/search/Search';
|
|
15
15
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
16
16
|
import { AlgoliaSettings, AppState } from '../types';
|
|
17
17
|
import './appMobile.scss';
|
|
18
18
|
import './common.scss';
|
|
19
|
-
import FooterComponent from './Footer';
|
|
20
|
-
import FooterMD from './FooterMD';
|
|
21
19
|
import FooterMobile from './FooterMobile';
|
|
22
|
-
import FooterNewVersion from './FooterNewVersion';
|
|
23
|
-
import HeaderComponent from './Header';
|
|
24
|
-
import HeaderMdComponent from './HeaderMd';
|
|
25
20
|
import HeaderMobile from './HeaderMobile';
|
|
26
|
-
import
|
|
21
|
+
import Header from './Header';
|
|
27
22
|
import ExpandablePanelComponent from './PanelResult';
|
|
28
|
-
import
|
|
23
|
+
import PreFilterComponent from 'components/pre-filter';
|
|
29
24
|
import { createSessionByApi } from 'services/session';
|
|
30
25
|
|
|
31
26
|
function Layout({ children }: ReactNode): JSX.Element {
|
|
32
27
|
const dispatch = useAppDispatch();
|
|
33
28
|
const { settings, search } = useAppSelector<AppState>((state: any) => state);
|
|
34
29
|
const { valueTextSearch, loadingSearchAlgolia, preFilterDropdown } = search;
|
|
35
|
-
const { themePage } = settings;
|
|
36
30
|
const { apiKey, appId, indexName } = settings.algolia as AlgoliaSettings;
|
|
37
31
|
const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
|
|
38
32
|
const [isOpenFilter, setOpenFilter] = useState<boolean>(false);
|
|
@@ -67,19 +61,7 @@ function Layout({ children }: ReactNode): JSX.Element {
|
|
|
67
61
|
FooterApp = FooterMobile;
|
|
68
62
|
HeaderApp = HeaderMobile;
|
|
69
63
|
} else {
|
|
70
|
-
|
|
71
|
-
classNameBoxVersion = 'default';
|
|
72
|
-
|
|
73
|
-
HeaderApp = HeaderComponent;
|
|
74
|
-
FooterApp = FooterComponent;
|
|
75
|
-
} else if (themePage.materialDesign?.active) {
|
|
76
|
-
classNameBoxVersion = 'materialDesign';
|
|
77
|
-
HeaderApp = HeaderMdComponent;
|
|
78
|
-
FooterApp = FooterMD;
|
|
79
|
-
} else {
|
|
80
|
-
HeaderApp = HeaderNewVersion;
|
|
81
|
-
FooterApp = FooterNewVersion;
|
|
82
|
-
}
|
|
64
|
+
HeaderApp = Header;
|
|
83
65
|
}
|
|
84
66
|
|
|
85
67
|
const conditionalQuery = useMemo(() => {
|
|
@@ -141,7 +123,7 @@ function Layout({ children }: ReactNode): JSX.Element {
|
|
|
141
123
|
}
|
|
142
124
|
style={{
|
|
143
125
|
...(classNameBoxVersion === 'newVersion'
|
|
144
|
-
? { background: settings.
|
|
126
|
+
? { background: settings.theme?.headerColor }
|
|
145
127
|
: {}),
|
|
146
128
|
}}
|
|
147
129
|
>
|
|
@@ -155,9 +137,11 @@ function Layout({ children }: ReactNode): JSX.Element {
|
|
|
155
137
|
<div className={`box-body-${classNameBoxVersion}-wrap-main`}>
|
|
156
138
|
{children}
|
|
157
139
|
</div>
|
|
158
|
-
|
|
159
|
-
<
|
|
160
|
-
|
|
140
|
+
{isMobile && (
|
|
141
|
+
<div className="footer-wrap-main">
|
|
142
|
+
<FooterApp />
|
|
143
|
+
</div>
|
|
144
|
+
)}
|
|
161
145
|
</div>
|
|
162
146
|
{isMobile && (
|
|
163
147
|
<Box
|
|
@@ -182,7 +166,7 @@ function Layout({ children }: ReactNode): JSX.Element {
|
|
|
182
166
|
className={'wrap-filter-destop'}
|
|
183
167
|
>
|
|
184
168
|
<div className={'bg-white box-filter-destop isMobile'}>
|
|
185
|
-
<
|
|
169
|
+
<PreFilterComponent
|
|
186
170
|
handleClose={() =>
|
|
187
171
|
dispatch(setPreFilterDropdown(!preFilterDropdown))
|
|
188
172
|
}
|
|
@@ -222,7 +222,7 @@ export default function ExpandablePanelComponent({
|
|
|
222
222
|
className="text-white"
|
|
223
223
|
style={{
|
|
224
224
|
width: '100%',
|
|
225
|
-
backgroundColor: settings.
|
|
225
|
+
backgroundColor: settings.theme?.secondaryColor,
|
|
226
226
|
fontWeight: 700,
|
|
227
227
|
fontSize: 14,
|
|
228
228
|
borderRadius: 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 {
|
|
@@ -30,7 +30,7 @@ function ClearRefinementsComponent({
|
|
|
30
30
|
className={className}
|
|
31
31
|
onClick={handleButtonClick}
|
|
32
32
|
style={{
|
|
33
|
-
color: settings.
|
|
33
|
+
color: settings.theme.secondaryColor,
|
|
34
34
|
fontWeight: 'bold',
|
|
35
35
|
textTransform: 'capitalize',
|
|
36
36
|
padding: 0,
|
|
@@ -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 {
|
|
@@ -68,12 +67,6 @@ function CameraCustom(props: Props) {
|
|
|
68
67
|
region = res.selectedRegion;
|
|
69
68
|
dispatch(setSelectedRegion(region));
|
|
70
69
|
}
|
|
71
|
-
// findByImage({ image: imageConvert, settings, region: region }).then(
|
|
72
|
-
// (res: any) => {
|
|
73
|
-
// dispatch(setSearchResults(res));
|
|
74
|
-
// return dispatch(showFeedback());
|
|
75
|
-
// },
|
|
76
|
-
// );
|
|
77
70
|
setTimeout(() => {
|
|
78
71
|
dispatch(updateStatusLoading(false));
|
|
79
72
|
handlerCloseModal();
|
|
@@ -141,7 +134,7 @@ function CameraCustom(props: Props) {
|
|
|
141
134
|
<button
|
|
142
135
|
className="btn-close-modal right"
|
|
143
136
|
style={{
|
|
144
|
-
backgroundColor: settings.
|
|
137
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
145
138
|
}}
|
|
146
139
|
onClick={handlerCloseModal}
|
|
147
140
|
>
|
|
@@ -150,7 +143,7 @@ function CameraCustom(props: Props) {
|
|
|
150
143
|
<button
|
|
151
144
|
className="btn-close-modal left"
|
|
152
145
|
style={{
|
|
153
|
-
backgroundColor: settings.
|
|
146
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
154
147
|
}}
|
|
155
148
|
onClick={handlerCloseModal}
|
|
156
149
|
>
|
|
@@ -226,7 +219,7 @@ function CameraCustom(props: Props) {
|
|
|
226
219
|
<div
|
|
227
220
|
className="box-scale-camera"
|
|
228
221
|
style={{
|
|
229
|
-
backgroundColor: settings.
|
|
222
|
+
backgroundColor: settings.theme?.secondaryColor,
|
|
230
223
|
}}
|
|
231
224
|
>
|
|
232
225
|
<button
|
|
@@ -234,7 +227,7 @@ function CameraCustom(props: Props) {
|
|
|
234
227
|
style={{
|
|
235
228
|
backgroundColor:
|
|
236
229
|
scaleCamera === 1 && 'active'
|
|
237
|
-
? settings.
|
|
230
|
+
? settings.theme?.primaryColor
|
|
238
231
|
: '',
|
|
239
232
|
}}
|
|
240
233
|
onClick={() => setScaleCamera(1)}
|
|
@@ -246,7 +239,7 @@ function CameraCustom(props: Props) {
|
|
|
246
239
|
style={{
|
|
247
240
|
backgroundColor:
|
|
248
241
|
scaleCamera === 1.5 && 'active'
|
|
249
|
-
? settings.
|
|
242
|
+
? settings.theme?.primaryColor
|
|
250
243
|
: '',
|
|
251
244
|
}}
|
|
252
245
|
onClick={() => setScaleCamera(1.5)}
|
|
@@ -258,7 +251,7 @@ function CameraCustom(props: Props) {
|
|
|
258
251
|
style={{
|
|
259
252
|
backgroundColor:
|
|
260
253
|
scaleCamera === 2 && 'active'
|
|
261
|
-
? settings.
|
|
254
|
+
? settings.theme?.primaryColor
|
|
262
255
|
: '',
|
|
263
256
|
}}
|
|
264
257
|
onClick={() => setScaleCamera(2)}
|