@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
|
@@ -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();
|
|
@@ -166,8 +167,8 @@ const SearchBox = (props: any) => {
|
|
|
166
167
|
{imageThumbSearchInput && (
|
|
167
168
|
<Box
|
|
168
169
|
style={{
|
|
169
|
-
border: `2px solid ${settings.
|
|
170
|
-
backgroundColor: `${settings.
|
|
170
|
+
border: `2px solid ${settings.theme?.secondaryColor}c7`,
|
|
171
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
171
172
|
marginRight: '5px',
|
|
172
173
|
}}
|
|
173
174
|
className="box-image-search-thumb"
|
|
@@ -196,7 +197,7 @@ const SearchBox = (props: any) => {
|
|
|
196
197
|
<CloseIcon
|
|
197
198
|
style={{
|
|
198
199
|
fontSize: 20,
|
|
199
|
-
color: settings.
|
|
200
|
+
color: settings.theme?.secondaryColor,
|
|
200
201
|
}}
|
|
201
202
|
/>
|
|
202
203
|
</button>
|
|
@@ -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);
|
|
@@ -297,7 +297,7 @@ function FilterComponent(props: Props) {
|
|
|
297
297
|
className="button-right"
|
|
298
298
|
style={{
|
|
299
299
|
width: '50%',
|
|
300
|
-
backgroundColor: settings.
|
|
300
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
301
301
|
color: '#fff',
|
|
302
302
|
borderRadius: 0,
|
|
303
303
|
justifyContent: 'flex-start',
|
|
@@ -338,7 +338,7 @@ function FilterComponent(props: Props) {
|
|
|
338
338
|
className="button-right"
|
|
339
339
|
style={{
|
|
340
340
|
width: '50%',
|
|
341
|
-
backgroundColor: settings.
|
|
341
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
342
342
|
color: '#fff',
|
|
343
343
|
borderRadius: 0,
|
|
344
344
|
justifyContent: 'flex-start',
|
|
@@ -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>
|
|
@@ -151,7 +147,7 @@ function ItemResult(props: Props) {
|
|
|
151
147
|
style={{ width: '100%', height: '100%', padding: 0, zIndex: 9 }}
|
|
152
148
|
onClick={() => handlerToggleModal(dataItem)}
|
|
153
149
|
>
|
|
154
|
-
<Expand color={settings.
|
|
150
|
+
<Expand color={settings.theme?.secondaryColor} />
|
|
155
151
|
</Button>
|
|
156
152
|
</Box>
|
|
157
153
|
)}
|
|
@@ -178,7 +174,7 @@ function ItemResult(props: Props) {
|
|
|
178
174
|
src={NoImage}
|
|
179
175
|
alt="image_item"
|
|
180
176
|
className="img-style"
|
|
181
|
-
style={{ width: '100%', height: '100%', objectFit:
|
|
177
|
+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
|
182
178
|
/>
|
|
183
179
|
)}
|
|
184
180
|
</Button>
|
|
@@ -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>
|
|
@@ -260,7 +258,7 @@ function ItemResult(props: Props) {
|
|
|
260
258
|
<Box
|
|
261
259
|
mt={1}
|
|
262
260
|
style={{
|
|
263
|
-
background: `${settings.
|
|
261
|
+
background: `${settings.theme?.secondaryColor}26`,
|
|
264
262
|
borderRadius: '6px',
|
|
265
263
|
display: 'flex',
|
|
266
264
|
width: 'fit-content',
|
|
@@ -270,7 +268,7 @@ function ItemResult(props: Props) {
|
|
|
270
268
|
<Typography
|
|
271
269
|
className="fw-700"
|
|
272
270
|
style={{
|
|
273
|
-
color: settings.
|
|
271
|
+
color: settings.theme?.secondaryColor,
|
|
274
272
|
fontSize: 10,
|
|
275
273
|
letterSpacing: '1px',
|
|
276
274
|
maxWidth: '160px',
|
|
@@ -307,7 +305,7 @@ function ItemResult(props: Props) {
|
|
|
307
305
|
boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
|
|
308
306
|
// marginBottom: 22,
|
|
309
307
|
height: 40,
|
|
310
|
-
background: `linear-gradient(270deg, ${settings.
|
|
308
|
+
background: `linear-gradient(270deg, ${settings.theme?.primaryColor}bb 0%, ${settings.theme?.primaryColor} 100%)`,
|
|
311
309
|
borderRadius: 4,
|
|
312
310
|
padding: '0px 8px',
|
|
313
311
|
}}
|
|
@@ -371,7 +369,7 @@ function ItemResult(props: Props) {
|
|
|
371
369
|
>
|
|
372
370
|
<Box
|
|
373
371
|
style={{
|
|
374
|
-
backgroundColor: `${settings.
|
|
372
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
375
373
|
padding: '5px 10px',
|
|
376
374
|
borderRadius: 4,
|
|
377
375
|
width: '100%',
|
|
@@ -395,7 +393,7 @@ function ItemResult(props: Props) {
|
|
|
395
393
|
|
|
396
394
|
<Box
|
|
397
395
|
style={{
|
|
398
|
-
backgroundColor: `${settings.
|
|
396
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
399
397
|
padding: '5px 10px',
|
|
400
398
|
borderRadius: 4,
|
|
401
399
|
width: '100%',
|
|
@@ -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
package/src/index.css
CHANGED
|
@@ -1700,3 +1700,16 @@ a img.aligncenter {
|
|
|
1700
1700
|
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
+
/* Css Common all page */
|
|
1704
|
+
.d-flex {
|
|
1705
|
+
display: flex !important;
|
|
1706
|
+
}
|
|
1707
|
+
.justify-center {
|
|
1708
|
+
justify-content: center;
|
|
1709
|
+
}
|
|
1710
|
+
.flex-end {
|
|
1711
|
+
align-items: flex-end;
|
|
1712
|
+
}
|
|
1713
|
+
.flex-center {
|
|
1714
|
+
align-items: center;
|
|
1715
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -5,10 +5,8 @@ import React, { Fragment } from 'react';
|
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import * as serviceWorker from './serviceWorker';
|
|
7
7
|
import { Provider } from 'react-redux';
|
|
8
|
-
import { AppSettings, MDSettings } from './types';
|
|
9
8
|
import { MuiThemeProvider } from '@material-ui/core';
|
|
10
9
|
import 'typeface-roboto';
|
|
11
|
-
import { defaultMdSettings } from './defaults';
|
|
12
10
|
import { HashRouter } from 'react-router-dom';
|
|
13
11
|
import Router from 'Router';
|
|
14
12
|
import { store } from 'Store/Store';
|
|
@@ -16,15 +14,8 @@ import 'react-responsive-carousel/lib/styles/carousel.min.css';
|
|
|
16
14
|
import { createTheme } from '@material-ui/core/styles';
|
|
17
15
|
import { Toaster } from 'components/Toaster';
|
|
18
16
|
|
|
19
|
-
declare var settings: AppSettings;
|
|
20
|
-
|
|
21
17
|
document.title = window.location.host;
|
|
22
18
|
|
|
23
|
-
let md: MDSettings = {
|
|
24
|
-
...defaultMdSettings,
|
|
25
|
-
...settings.themePage.materialDesign,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
19
|
let theme = createTheme({
|
|
29
20
|
overrides: {
|
|
30
21
|
MuiTooltip: {
|
|
@@ -36,17 +27,6 @@ let theme = createTheme({
|
|
|
36
27
|
},
|
|
37
28
|
},
|
|
38
29
|
},
|
|
39
|
-
typography: {
|
|
40
|
-
fontFamily: md.customFontFamily,
|
|
41
|
-
},
|
|
42
|
-
palette: {
|
|
43
|
-
primary: {
|
|
44
|
-
main: md.primaryColor,
|
|
45
|
-
},
|
|
46
|
-
secondary: {
|
|
47
|
-
main: md.secondaryColor,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
30
|
});
|
|
51
31
|
|
|
52
32
|
ReactDOM.render(
|
|
@@ -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 AppNewVersion(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;
|
|
@@ -69,4 +67,4 @@ function AppNewVersion(props: Props) {
|
|
|
69
67
|
);
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
export default
|
|
70
|
+
export default AppMD;
|
|
@@ -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);
|
|
@@ -87,7 +86,7 @@ function AppMobile(props: Props): JSX.Element {
|
|
|
87
86
|
height: '100%',
|
|
88
87
|
width: '100%',
|
|
89
88
|
zIndex: 1,
|
|
90
|
-
background: `${settings.
|
|
89
|
+
background: `${settings.theme?.mobileFooterImageColor}`,
|
|
91
90
|
}}
|
|
92
91
|
></div>
|
|
93
92
|
<Box style={{ position: 'inherit', zIndex: 100 }} className="title-top">
|
|
@@ -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}
|