@nyris/nyris-webapp 0.3.32 → 0.3.34
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 +28 -15
- package/build/index.html +1 -1
- package/build/js/settings.example.js +13 -25
- package/build/{precache-manifest.a2c0b5a7cde6667444733c63d9fcb7d5.js → precache-manifest.b85c7807a93875355f9f0f6490e6dc8c.js} +68 -16
- package/build/service-worker.js +1 -1
- package/build/static/css/main.f2aa67fc.chunk.css +2 -0
- package/build/static/css/main.f2aa67fc.chunk.css.map +1 -0
- package/build/static/js/2.d1f7e826.chunk.js +3 -0
- package/build/static/js/2.d1f7e826.chunk.js.map +1 -0
- package/build/static/js/main.e9aec8a9.chunk.js +3 -0
- package/build/static/js/main.e9aec8a9.chunk.js.map +1 -0
- package/build/static/media/filter.bc412f08.svg +3 -0
- package/build/static/media/icon_search_image2.fab34be4.svg +3 -0
- package/build/static/media/img-1-1.6144e5f9.png +0 -0
- package/build/static/media/img-1-2.ad943f0f.png +0 -0
- package/build/static/media/img2-1.a87c79c7.png +0 -0
- package/build/static/media/img2-2.39c5b73f.png +0 -0
- package/build/static/media/img3-1.443b0c3a.png +0 -0
- package/build/static/media/img3-2.37db7999.png +0 -0
- package/build/static/media/img4-1.9c34c158.png +0 -0
- package/build/static/media/img4-2.9d280a04.png +0 -0
- package/build/static/media/img5-1.b61dbd4d.png +0 -0
- package/build/static/media/img5-2.1c77c093.png +0 -0
- package/build/static/media/img6-1.8b03dd21.png +0 -0
- package/build/static/media/img6-2.1e3e7fed.png +0 -0
- package/build/static/media/{info-tooltip.5feeef22.svg → info-tooltip.b98e8a9c.svg} +2 -2
- package/build/static/media/take_photo.76423216.svg +5 -0
- package/package.json +3 -4
- package/public/js/settings.example.js +13 -25
- package/src/Store/constants.ts +0 -1
- package/src/Store/search/Search.ts +32 -17
- package/src/Store/search/search.initialState.ts +17 -16
- package/src/Store/search/types.ts +15 -14
- package/src/common/assets/icons/expand.svg +3 -27
- package/src/common/assets/icons/filter.svg +3 -0
- package/src/common/assets/icons/icon_search_image2.svg +2 -25
- package/src/common/assets/icons/info-tooltip.svg +2 -2
- package/src/common/assets/icons/take_photo.svg +5 -0
- package/src/common/assets/images/imageCaptureHelp/img-1-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img-1-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img2-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img2-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img3-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img3-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img4-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img4-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img5-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img5-2.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img6-1.png +0 -0
- package/src/common/assets/images/imageCaptureHelp/img6-2.png +0 -0
- package/src/components/DetailItem.tsx +91 -104
- package/src/components/DragDropFile.tsx +46 -66
- package/src/components/FooterMobile.tsx +80 -41
- package/src/components/HeaderMobile.tsx +225 -227
- package/src/components/ImageCaptureHelpModal.tsx +90 -0
- package/src/components/Layout.tsx +39 -9
- package/src/components/MobilePostFilter.tsx +20 -0
- package/src/components/PanelResult/expandable-panel.tsx +21 -21
- package/src/components/PanelResult/index.tsx +52 -19
- package/src/components/ProductList/index.tsx +14 -7
- package/src/components/appMobile.scss +64 -32
- package/src/components/carousel/ImagePreviewCarousel.tsx +1 -1
- package/src/components/drawer/cameraCustom.tsx +8 -33
- package/src/components/input/inputSearch.tsx +116 -147
- package/src/components/pre-filter/index.tsx +31 -22
- package/src/components/results/ItemResult.tsx +127 -144
- package/src/constants.ts +56 -0
- package/src/page/landingPage/AppMobile.tsx +34 -104
- package/src/page/landingPage/common.scss +164 -36
- package/src/page/result/index.tsx +70 -56
- package/src/services/Feedback.ts +20 -2
- package/src/services/types.ts +0 -1
- package/src/translations.ts +4 -0
- package/src/types.ts +3 -2
- package/build/static/css/main.d0b21fa5.chunk.css +0 -2
- package/build/static/css/main.d0b21fa5.chunk.css.map +0 -1
- package/build/static/js/2.985a6e2d.chunk.js +0 -3
- package/build/static/js/2.985a6e2d.chunk.js.map +0 -1
- package/build/static/js/main.1e8d5e32.chunk.js +0 -3
- package/build/static/js/main.1e8d5e32.chunk.js.map +0 -1
- package/build/static/media/expand.06cebf40.svg +0 -27
- package/build/static/media/icon_search_image2.e46fdfc5.svg +0 -26
- /package/build/static/js/{2.985a6e2d.chunk.js.LICENSE.txt → 2.d1f7e826.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.1e8d5e32.chunk.js.LICENSE.txt → main.e9aec8a9.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
import { Box, Button
|
|
1
|
+
import { Box, Button } from '@material-ui/core';
|
|
2
2
|
import CloseIcon from '@material-ui/icons/Close';
|
|
3
3
|
import { ReactComponent as IconFilter } from 'common/assets/icons/filter_settings.svg';
|
|
4
4
|
|
|
5
|
-
import React, {
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import React, {
|
|
6
|
+
memo,
|
|
7
|
+
useCallback,
|
|
8
|
+
useEffect,
|
|
9
|
+
useMemo,
|
|
10
|
+
useRef,
|
|
11
|
+
useState,
|
|
12
|
+
} from 'react';
|
|
13
|
+
import { connectSearchBox, connectStateResults } from 'react-instantsearch-dom';
|
|
8
14
|
import { NavLink, useHistory } from 'react-router-dom';
|
|
9
15
|
import {
|
|
10
|
-
onResetRequestImage,
|
|
11
16
|
reset,
|
|
12
|
-
setImageSearchInput,
|
|
13
17
|
updateValueTextSearchMobile,
|
|
14
|
-
setUpdateKeyFilterDesktop,
|
|
15
18
|
setPreFilterDropdown,
|
|
16
19
|
} from 'Store/search/Search';
|
|
17
20
|
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
18
21
|
import { AppState } from 'types';
|
|
19
|
-
import CustomSearchBox from './input/inputSearch';
|
|
20
22
|
import { ReactComponent as IconSearch } from 'common/assets/icons/icon_search.svg';
|
|
23
|
+
import { ReactComponent as FilterIcon } from 'common/assets/icons/filter.svg';
|
|
24
|
+
|
|
21
25
|
import { debounce, isEmpty } from 'lodash';
|
|
22
26
|
import { useQuery } from 'hooks/useQuery';
|
|
23
27
|
|
|
24
28
|
interface Props {
|
|
25
29
|
onToggleFilterMobile?: any;
|
|
26
30
|
refine?: any;
|
|
31
|
+
allSearchResults?: any;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
function HeaderMobileComponent(props: Props): JSX.Element {
|
|
@@ -36,22 +41,24 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
36
41
|
textSearchInputMobile,
|
|
37
42
|
keyFilter,
|
|
38
43
|
preFilterDropdown,
|
|
44
|
+
valueTextSearch,
|
|
39
45
|
} = search;
|
|
40
46
|
const query = useQuery();
|
|
41
|
-
const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
|
|
42
47
|
const containerRefInputMobile = useRef<HTMLDivElement>(null);
|
|
43
|
-
const [isShowInputSearch, setShowInputSearch] = useState<boolean>(false);
|
|
44
48
|
const [isShowFilter, setShowFilter] = useState<boolean>(false);
|
|
45
49
|
const history = useHistory();
|
|
46
50
|
const { settings } = useAppSelector<AppState>((state: any) => state);
|
|
47
51
|
|
|
48
52
|
useEffect(() => {
|
|
49
|
-
if (
|
|
53
|
+
if (
|
|
54
|
+
history.location?.pathname === '/result' &&
|
|
55
|
+
(imageThumbSearchInput || textSearchInputMobile)
|
|
56
|
+
) {
|
|
50
57
|
setShowFilter(true);
|
|
51
58
|
} else {
|
|
52
59
|
setShowFilter(false);
|
|
53
60
|
}
|
|
54
|
-
}, [history.location]);
|
|
61
|
+
}, [imageThumbSearchInput, history.location, textSearchInputMobile]);
|
|
55
62
|
|
|
56
63
|
useEffect(() => {
|
|
57
64
|
if (imageThumbSearchInput !== '') {
|
|
@@ -61,17 +68,6 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
61
68
|
}
|
|
62
69
|
}, [imageThumbSearchInput, dispatch, refine, history]);
|
|
63
70
|
|
|
64
|
-
useEffect(() => {
|
|
65
|
-
if (
|
|
66
|
-
history.location?.pathname === '/result' ||
|
|
67
|
-
history.location?.pathname === '/'
|
|
68
|
-
) {
|
|
69
|
-
setShowInputSearch(true);
|
|
70
|
-
} else {
|
|
71
|
-
setShowInputSearch(false);
|
|
72
|
-
}
|
|
73
|
-
}, [history.location]);
|
|
74
|
-
|
|
75
71
|
useEffect(() => {
|
|
76
72
|
const searchQuery = query.get('query') || '';
|
|
77
73
|
if (!isEmpty(searchQuery)) {
|
|
@@ -97,6 +93,18 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
97
93
|
}, 500),
|
|
98
94
|
[],
|
|
99
95
|
);
|
|
96
|
+
const isPostFilterApplied = useMemo(() => {
|
|
97
|
+
let isApplied = false;
|
|
98
|
+
if (!valueTextSearch?.refinementList) return false;
|
|
99
|
+
Object.keys(valueTextSearch?.refinementList).forEach(key => {
|
|
100
|
+
if (typeof valueTextSearch.refinementList[key] === 'object') {
|
|
101
|
+
isApplied = true;
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return isApplied;
|
|
106
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
107
|
+
}, [valueTextSearch?.refinementList]);
|
|
100
108
|
|
|
101
109
|
const onChangeText = (event: any) => {
|
|
102
110
|
// debounceSearch(event.currentTarget.value);
|
|
@@ -108,244 +116,232 @@ function HeaderMobileComponent(props: Props): JSX.Element {
|
|
|
108
116
|
dispatch(updateValueTextSearchMobile(event.currentTarget.value));
|
|
109
117
|
}
|
|
110
118
|
};
|
|
119
|
+
const disablePostFilter = useMemo(() => {
|
|
120
|
+
return settings.postFilterOption && props.allSearchResults?.hits.length > 0
|
|
121
|
+
? false
|
|
122
|
+
: true;
|
|
123
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
124
|
+
}, [settings.postFilterOption, props.allSearchResults?.hits]);
|
|
125
|
+
|
|
111
126
|
return (
|
|
112
|
-
<
|
|
113
|
-
|
|
114
|
-
|
|
127
|
+
<div style={{ width: '100%', background: '#fafafa' }}>
|
|
128
|
+
{history.location?.pathname !== '/result' && (
|
|
129
|
+
<Box
|
|
130
|
+
className="box-content"
|
|
131
|
+
style={{
|
|
132
|
+
display: 'flex',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
height: '48px',
|
|
135
|
+
borderBottom: '1px solid #e9e9ec',
|
|
136
|
+
background: settings.theme?.headerColor,
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<NavLink
|
|
140
|
+
to="/"
|
|
141
|
+
style={{ lineHeight: 0, paddingLeft: '10px' }}
|
|
142
|
+
onClick={() => {
|
|
143
|
+
dispatch(reset(''));
|
|
144
|
+
}}
|
|
145
|
+
>
|
|
146
|
+
<img
|
|
147
|
+
src={settings.theme?.appBarLogoUrl}
|
|
148
|
+
alt="logo"
|
|
149
|
+
style={{
|
|
150
|
+
aspectRatio: 1,
|
|
151
|
+
width: settings.theme?.logoWidth,
|
|
152
|
+
height: settings.theme?.logoHeight,
|
|
153
|
+
}}
|
|
154
|
+
/>
|
|
155
|
+
</NavLink>
|
|
156
|
+
</Box>
|
|
157
|
+
)}
|
|
158
|
+
<div
|
|
115
159
|
style={{
|
|
160
|
+
margin: '16px 8px 0px 8px',
|
|
116
161
|
display: 'flex',
|
|
162
|
+
columnGap: '8px',
|
|
117
163
|
alignItems: 'center',
|
|
118
|
-
height: '50px',
|
|
119
|
-
borderBottom: '1px solid #e9e9ec',
|
|
120
|
-
background: settings.theme?.headerColor,
|
|
121
164
|
}}
|
|
122
165
|
>
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
style={{ lineHeight: 0, paddingLeft: '10px' }}
|
|
126
|
-
onClick={() => {
|
|
127
|
-
dispatch(reset(''));
|
|
128
|
-
}}
|
|
129
|
-
>
|
|
130
|
-
<img
|
|
131
|
-
src={settings.theme?.appBarLogoUrl}
|
|
132
|
-
alt="logo"
|
|
166
|
+
<div className="wrap-header-mobile" style={{ height: '56px' }}>
|
|
167
|
+
<div
|
|
133
168
|
style={{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
height:
|
|
169
|
+
display: 'flex',
|
|
170
|
+
alignItems: 'center',
|
|
171
|
+
height: '100%',
|
|
137
172
|
}}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
>
|
|
174
|
+
<div
|
|
175
|
+
ref={containerRefInputMobile}
|
|
176
|
+
id="box-input-search"
|
|
177
|
+
className="d-flex w-100"
|
|
178
|
+
style={{
|
|
179
|
+
alignItems: 'center',
|
|
180
|
+
height: '100%',
|
|
181
|
+
}}
|
|
182
|
+
>
|
|
183
|
+
<Box
|
|
184
|
+
className="pre-filter-icon"
|
|
185
|
+
onClick={() => {
|
|
186
|
+
if (settings.preFilterOption) {
|
|
187
|
+
onToggleFilterMobile(false);
|
|
188
|
+
dispatch(setPreFilterDropdown(!preFilterDropdown));
|
|
189
|
+
}
|
|
190
|
+
}}
|
|
191
|
+
style={{ cursor: settings.preFilterOption ? 'pointer' : '' }}
|
|
192
|
+
>
|
|
193
|
+
{settings.preFilterOption && (
|
|
194
|
+
<div
|
|
195
|
+
className="icon-hover"
|
|
161
196
|
style={{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
// refine(textSearchInputMobile);
|
|
170
|
-
// }, 300);
|
|
171
|
-
// setTimeout(() => {
|
|
172
|
-
// setResetImage(false);
|
|
173
|
-
// }, 1000);
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
dispatch(reset(''));
|
|
177
|
-
history.push('/');
|
|
197
|
+
...(keyFilter
|
|
198
|
+
? {
|
|
199
|
+
backgroundColor: `${settings.theme?.primaryColor}`,
|
|
200
|
+
}
|
|
201
|
+
: {
|
|
202
|
+
backgroundColor: `${settings.theme?.secondaryColor}`,
|
|
203
|
+
}),
|
|
178
204
|
}}
|
|
179
205
|
>
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</button>
|
|
188
|
-
</div>
|
|
189
|
-
)}
|
|
190
|
-
{isShowInputSearch && (
|
|
191
|
-
<>
|
|
206
|
+
<IconFilter color="white" />
|
|
207
|
+
</div>
|
|
208
|
+
)}
|
|
209
|
+
{!settings.preFilterOption && (
|
|
210
|
+
<IconSearch width={16} height={16} />
|
|
211
|
+
)}
|
|
212
|
+
{keyFilter && (
|
|
192
213
|
<div
|
|
193
|
-
ref={containerRefInputMobile}
|
|
194
|
-
id="box-input-search"
|
|
195
|
-
className="d-flex w-100"
|
|
196
214
|
style={{
|
|
215
|
+
position: 'absolute',
|
|
216
|
+
top: '10px',
|
|
217
|
+
left: '31px',
|
|
218
|
+
display: 'flex',
|
|
219
|
+
justifyContent: 'center',
|
|
197
220
|
alignItems: 'center',
|
|
221
|
+
background: 'white',
|
|
222
|
+
width: '10px',
|
|
223
|
+
height: '10px',
|
|
224
|
+
borderRadius: '100%',
|
|
198
225
|
}}
|
|
199
226
|
>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
<IconSearch width={20} height={20} />
|
|
209
|
-
</Box>
|
|
210
|
-
)}
|
|
211
|
-
<Input
|
|
212
|
-
value={textSearchInputMobile}
|
|
213
|
-
onChange={onChangeText}
|
|
214
|
-
/>
|
|
215
|
-
|
|
216
|
-
{isShowFilter && settings.postFilterOption && (
|
|
217
|
-
<Box className="box-button-input-mobile">
|
|
218
|
-
<Button
|
|
219
|
-
className="btn-mobile-filter"
|
|
220
|
-
onClick={onToggleFilterMobile}
|
|
221
|
-
>
|
|
222
|
-
{/* <img src={IconFilter} alt="" width={18} height={18} /> */}
|
|
223
|
-
<IconFilter />
|
|
224
|
-
</Button>
|
|
225
|
-
</Box>
|
|
226
|
-
)}
|
|
227
|
-
{history.location?.pathname !== '/' &&
|
|
228
|
-
textSearchInputMobile && (
|
|
229
|
-
<Box
|
|
230
|
-
className="btn-close-header"
|
|
231
|
-
style={{ backgroundColor: '#fff' }}
|
|
232
|
-
>
|
|
233
|
-
<button
|
|
234
|
-
onClick={() => {
|
|
235
|
-
if (imageThumbSearchInput) {
|
|
236
|
-
history.push('/result');
|
|
237
|
-
dispatch(updateValueTextSearchMobile(''));
|
|
238
|
-
refine('');
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
dispatch(updateValueTextSearchMobile(''));
|
|
242
|
-
dispatch(reset(''));
|
|
243
|
-
refine('');
|
|
244
|
-
history.push('/');
|
|
245
|
-
}}
|
|
246
|
-
style={{
|
|
247
|
-
backgroundColor: '#fff',
|
|
248
|
-
border: 0,
|
|
249
|
-
display: 'flex',
|
|
250
|
-
}}
|
|
251
|
-
>
|
|
252
|
-
<CloseIcon
|
|
253
|
-
style={{
|
|
254
|
-
fontSize: 20,
|
|
255
|
-
color: settings.theme?.secondaryColor,
|
|
256
|
-
}}
|
|
257
|
-
/>
|
|
258
|
-
</button>
|
|
259
|
-
</Box>
|
|
260
|
-
)}
|
|
227
|
+
<div
|
|
228
|
+
style={{
|
|
229
|
+
width: '8px',
|
|
230
|
+
height: '8px',
|
|
231
|
+
background: settings.theme?.primaryColor,
|
|
232
|
+
borderRadius: '100%',
|
|
233
|
+
}}
|
|
234
|
+
></div>
|
|
261
235
|
</div>
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
236
|
+
)}
|
|
237
|
+
</Box>
|
|
238
|
+
|
|
239
|
+
<Input value={textSearchInputMobile} onChange={onChangeText} />
|
|
240
|
+
|
|
241
|
+
{history.location?.pathname !== '/' && textSearchInputMobile && (
|
|
265
242
|
<Button
|
|
266
243
|
onClick={() => {
|
|
267
|
-
|
|
244
|
+
if (imageThumbSearchInput) {
|
|
245
|
+
history.push('/result');
|
|
246
|
+
dispatch(updateValueTextSearchMobile(''));
|
|
247
|
+
refine('');
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
dispatch(updateValueTextSearchMobile(''));
|
|
251
|
+
dispatch(reset(''));
|
|
252
|
+
refine('');
|
|
253
|
+
history.push('/');
|
|
268
254
|
}}
|
|
269
255
|
style={{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
preFilterDropdown || keyFilter
|
|
276
|
-
? `${settings.theme?.secondaryColor}26`
|
|
277
|
-
: '#f3f3f5',
|
|
278
|
-
margin: '0 12px',
|
|
256
|
+
// background: '#fff',
|
|
257
|
+
marginRight: '8px',
|
|
258
|
+
border: 0,
|
|
259
|
+
width: '40px',
|
|
260
|
+
height: '40px',
|
|
279
261
|
}}
|
|
280
262
|
>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
/>
|
|
288
|
-
) : (
|
|
289
|
-
<IconFilter
|
|
290
|
-
color={
|
|
291
|
-
keyFilter ? settings.theme?.secondaryColor : '#000'
|
|
292
|
-
}
|
|
293
|
-
/>
|
|
294
|
-
)}
|
|
263
|
+
<CloseIcon
|
|
264
|
+
style={{
|
|
265
|
+
fontSize: 16,
|
|
266
|
+
color: settings.theme?.secondaryColor,
|
|
267
|
+
}}
|
|
268
|
+
/>
|
|
295
269
|
</Button>
|
|
296
270
|
)}
|
|
297
271
|
</div>
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<Box
|
|
303
|
-
className="ml-auto mr-auto"
|
|
304
|
-
style={{
|
|
305
|
-
display: 'flex',
|
|
306
|
-
columnGap: '16px',
|
|
307
|
-
alignItems: 'center',
|
|
308
|
-
// justifyContent: 'space-between',
|
|
309
|
-
// margin: '12px 12px 5px 12px',
|
|
310
|
-
marginTop: '12px',
|
|
311
|
-
marginBottom: '5px',
|
|
312
|
-
paddingLeft: '16px',
|
|
313
|
-
paddingRight: '16px',
|
|
314
|
-
}}
|
|
315
|
-
>
|
|
316
|
-
<Typography color="textPrimary">Pre-filter:</Typography>
|
|
317
|
-
<Box
|
|
318
|
-
className="box-key-filter"
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
{isShowFilter && settings.postFilterOption && (
|
|
275
|
+
<div
|
|
319
276
|
style={{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
padding: '
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
277
|
+
position: 'relative',
|
|
278
|
+
width: '56px',
|
|
279
|
+
height: '56px',
|
|
280
|
+
padding: ' 8px',
|
|
281
|
+
flexShrink: 0,
|
|
282
|
+
borderRadius: '32px',
|
|
283
|
+
background: '#FAFAFA',
|
|
284
|
+
boxShadow: ' 0px 0px 8px 0px rgba(0, 0, 0, 0.15)',
|
|
285
|
+
}}
|
|
286
|
+
onClick={() => {
|
|
287
|
+
if (disablePostFilter) return;
|
|
288
|
+
onToggleFilterMobile();
|
|
289
|
+
dispatch(setPreFilterDropdown(false));
|
|
327
290
|
}}
|
|
328
291
|
>
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
292
|
+
<div
|
|
293
|
+
style={{
|
|
294
|
+
display: 'flex',
|
|
295
|
+
background: `${
|
|
296
|
+
disablePostFilter ? '#F3F3F5' : settings.theme?.primaryColor
|
|
297
|
+
}`,
|
|
298
|
+
borderRadius: '40px',
|
|
299
|
+
width: '40px',
|
|
300
|
+
height: '40px',
|
|
301
|
+
justifyContent: 'center',
|
|
302
|
+
alignItems: 'center',
|
|
303
|
+
}}
|
|
333
304
|
>
|
|
334
|
-
<
|
|
305
|
+
<FilterIcon
|
|
306
|
+
color={`${disablePostFilter ? '#E0E0E0' : 'white'}`}
|
|
307
|
+
/>
|
|
308
|
+
</div>
|
|
309
|
+
|
|
310
|
+
{isPostFilterApplied && !disablePostFilter && (
|
|
311
|
+
<div
|
|
335
312
|
style={{
|
|
336
|
-
|
|
337
|
-
|
|
313
|
+
position: 'absolute',
|
|
314
|
+
top: '8px',
|
|
315
|
+
left: '37px',
|
|
316
|
+
display: 'flex',
|
|
317
|
+
justifyContent: 'center',
|
|
318
|
+
alignItems: 'center',
|
|
319
|
+
background: 'white',
|
|
320
|
+
width: '10px',
|
|
321
|
+
height: '10px',
|
|
322
|
+
borderRadius: '100%',
|
|
338
323
|
}}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
324
|
+
>
|
|
325
|
+
<div
|
|
326
|
+
style={{
|
|
327
|
+
width: '8px',
|
|
328
|
+
height: '8px',
|
|
329
|
+
background: settings.theme?.primaryColor,
|
|
330
|
+
borderRadius: '100%',
|
|
331
|
+
}}
|
|
332
|
+
></div>
|
|
333
|
+
</div>
|
|
334
|
+
)}
|
|
335
|
+
</div>
|
|
336
|
+
)}
|
|
337
|
+
</div>
|
|
338
|
+
</div>
|
|
345
339
|
);
|
|
346
340
|
}
|
|
347
341
|
|
|
348
|
-
const HeaderMobile = connectSearchBox<any>(
|
|
342
|
+
const HeaderMobile = connectSearchBox<any>(
|
|
343
|
+
memo(connectStateResults<Props>(HeaderMobileComponent)),
|
|
344
|
+
);
|
|
349
345
|
export default HeaderMobile;
|
|
350
346
|
|
|
351
347
|
const INPUT_ID = 'mobile-input-search';
|
|
@@ -371,12 +367,14 @@ const Input = ({ value, onChange }: any) => {
|
|
|
371
367
|
style={{
|
|
372
368
|
border: '0px',
|
|
373
369
|
width: '100%',
|
|
370
|
+
display: 'flex',
|
|
371
|
+
flexGrow: 1,
|
|
374
372
|
fontSize: 14,
|
|
375
373
|
paddingLeft: '12px',
|
|
376
374
|
paddingRight: '4px',
|
|
377
375
|
color: '#2B2C46',
|
|
378
|
-
fontStyle: 'italic',
|
|
379
376
|
outline: 'none',
|
|
377
|
+
borderRadius: '32px',
|
|
380
378
|
}}
|
|
381
379
|
className="input-search"
|
|
382
380
|
placeholder="Search"
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Box, Button } from '@material-ui/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import CloseIcon from '@material-ui/icons/Close';
|
|
4
|
+
import { visualSearchHelp } from '../constants';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
handleClose: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function ImageCaptureHelpModal({ handleClose }: Props) {
|
|
11
|
+
return (
|
|
12
|
+
<Box style={{ paddingLeft: '24px', paddingRight: '24px' }}>
|
|
13
|
+
<Box
|
|
14
|
+
display={'flex'}
|
|
15
|
+
justifyContent={'end'}
|
|
16
|
+
position={'sticky'}
|
|
17
|
+
top={0}
|
|
18
|
+
style={{ background: 'white', width: '100%' }}
|
|
19
|
+
>
|
|
20
|
+
<Button onClick={handleClose}>
|
|
21
|
+
<CloseIcon />
|
|
22
|
+
</Button>
|
|
23
|
+
</Box>
|
|
24
|
+
<p
|
|
25
|
+
style={{
|
|
26
|
+
fontSize: '40px',
|
|
27
|
+
lineHeight: '40px',
|
|
28
|
+
fontWeight: 700,
|
|
29
|
+
color: '#2B2C46',
|
|
30
|
+
}}
|
|
31
|
+
>
|
|
32
|
+
Six ways to optimize visual search
|
|
33
|
+
</p>
|
|
34
|
+
<div
|
|
35
|
+
style={{
|
|
36
|
+
display: 'flex',
|
|
37
|
+
flexDirection: 'column',
|
|
38
|
+
rowGap: '16px',
|
|
39
|
+
marginTop: '16px',
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
{visualSearchHelp.map((data, index) => {
|
|
43
|
+
return (
|
|
44
|
+
<div
|
|
45
|
+
key={index}
|
|
46
|
+
style={{
|
|
47
|
+
display: 'flex',
|
|
48
|
+
flexDirection: 'column',
|
|
49
|
+
rowGap: '8px',
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
<p
|
|
53
|
+
style={{
|
|
54
|
+
fontSize: '16px',
|
|
55
|
+
lineHeight: '24px',
|
|
56
|
+
fontWeight: 700,
|
|
57
|
+
color: '#2B2C46',
|
|
58
|
+
marginBottom: '0px',
|
|
59
|
+
}}
|
|
60
|
+
>
|
|
61
|
+
{`${index + 1}- ${data.title}`}
|
|
62
|
+
</p>
|
|
63
|
+
<p
|
|
64
|
+
style={{
|
|
65
|
+
fontSize: '14px',
|
|
66
|
+
lineHeight: '20px',
|
|
67
|
+
fontWeight: 400,
|
|
68
|
+
color: '#2B2C46',
|
|
69
|
+
marginBottom: '0px',
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
{data.description}
|
|
73
|
+
</p>
|
|
74
|
+
<div style={{ display: 'flex', columnGap: '16px' }}>
|
|
75
|
+
<div>
|
|
76
|
+
<img src={data.imageLeft} alt="" />
|
|
77
|
+
</div>
|
|
78
|
+
<div>
|
|
79
|
+
<img src={data.imageRight} alt="" />
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
})}
|
|
85
|
+
</div>
|
|
86
|
+
</Box>
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export default ImageCaptureHelpModal;
|