@nyris/nyris-webapp 0.3.50 → 0.3.52
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 +18 -92
- package/build/asset-manifest.json +90 -69
- package/build/index.html +1 -1
- package/build/js/settings.example.js +7 -0
- package/build/static/css/main.aa443e67.css +2 -0
- package/build/static/css/main.aa443e67.css.map +1 -0
- package/build/static/js/main.e023bcc5.js +3 -0
- package/build/static/js/main.e023bcc5.js.LICENSE.txt +268 -0
- package/build/static/js/main.e023bcc5.js.map +1 -0
- package/build/static/media/{Union.2545c072.svg → Union.dce5234bc686d28b45df0a5aea6ef6d1.svg} +1 -1
- package/package.json +47 -74
- package/public/js/settings.example.js +7 -0
- package/src/Store/Store.ts +6 -0
- package/src/common/assets/icons/Union.svg +1 -1
- package/src/components/AppMobile.tsx +16 -11
- package/src/components/CadenasWebViewer.tsx +2 -3
- package/src/components/DragDropFile.tsx +35 -32
- package/src/components/FilterComponent.tsx +4 -6
- package/src/components/FooterMobile.tsx +16 -13
- package/src/components/Header.tsx +3 -3
- package/src/components/HeaderMobile.tsx +42 -43
- package/src/components/ImageCaptureHelpModal.tsx +13 -10
- package/src/components/ImagePreviewMobile.tsx +24 -23
- package/src/components/Inquiry/InquiryBanner.tsx +13 -14
- package/src/components/Inquiry/InquiryModal.tsx +1 -1
- package/src/components/Layout.tsx +11 -6
- package/src/components/Loading.tsx +2 -3
- package/src/components/PanelResult/PostFilter.tsx +9 -9
- package/src/components/PanelResult/PostFilterAlgolia.tsx +9 -9
- package/src/components/PanelResult/expandable-panel.tsx +3 -3
- package/src/components/ProductAttribute.tsx +26 -19
- package/src/components/ProductDetailView.tsx +80 -80
- package/src/components/ProductList/index.tsx +6 -7
- package/src/components/SelectedPostFilter.tsx +2 -3
- package/src/components/ShareModal.tsx +20 -21
- package/src/components/SidePanel.tsx +18 -18
- package/src/components/carousel/ImagePreviewCarousel.tsx +7 -3
- package/src/components/default-select.tsx +5 -7
- package/src/components/drawer/cameraCustom.tsx +45 -41
- package/src/components/input/inputSearch.tsx +48 -42
- package/src/components/pre-filter/index.tsx +56 -52
- package/src/components/results/ItemResult.tsx +123 -96
- package/src/components/rfq/RfqBanner.tsx +13 -14
- package/src/components/rfq/RfqModal.tsx +1 -1
- package/src/index.tsx +20 -21
- package/src/page/landingPage/AppMD.tsx +8 -9
- package/src/page/landingPage/AppMobile.tsx +2 -3
- package/src/page/landingPage/common.scss +2 -4
- package/src/page/result/index.tsx +92 -75
- package/src/translations.ts +2 -0
- package/src/types.ts +8 -0
- package/tsconfig.json +11 -5
- package/api-mocks/feedback/v1/OPTIONS.mock +0 -6
- package/api-mocks/feedback/v1/POST.mock +0 -4
- package/api-mocks/find/v1/OPTIONS.mock +0 -6
- package/api-mocks/find/v1/POST.mock +0 -7
- package/api-mocks/find/v1/regions/OPTIONS.mock +0 -6
- package/api-mocks/find/v1/regions/POST.mock +0 -6
- package/build/precache-manifest.94e48d131d31de9b354f61c68a3ed830.js +0 -366
- package/build/service-worker.js +0 -39
- package/build/static/css/2.27ad1145.chunk.css +0 -2
- package/build/static/css/2.27ad1145.chunk.css.map +0 -1
- package/build/static/css/main.24b5a712.chunk.css +0 -2
- package/build/static/css/main.24b5a712.chunk.css.map +0 -1
- package/build/static/js/2.3399db0d.chunk.js +0 -3
- package/build/static/js/2.3399db0d.chunk.js.LICENSE.txt +0 -275
- package/build/static/js/2.3399db0d.chunk.js.map +0 -1
- package/build/static/js/main.b75d8ff6.chunk.js +0 -3
- package/build/static/js/main.b75d8ff6.chunk.js.LICENSE.txt +0 -1
- package/build/static/js/main.b75d8ff6.chunk.js.map +0 -1
- package/build/static/js/runtime-main.1ff80965.js +0 -2
- package/build/static/js/runtime-main.1ff80965.js.map +0 -1
- package/src/components/Panigation/Pagination.tsx +0 -135
- package/src/components/results/ItemResult.test.tsx +0 -0
- package/src/helpers/CommonHelper.test.ts +0 -0
- package/src/serviceWorker.ts +0 -143
- /package/build/static/media/{3d.24adb2c2.svg → 3d.a7aa94395eaef439de4bb07d24f56e21.svg} +0 -0
- /package/build/static/media/{Fill.619a9d98.svg → Fill.004d04ac1ba9c868101ab485bcfd0b0e.svg} +0 -0
- /package/build/static/media/{IconUploadDownward.6b47ab39.svg → IconUploadDownward.ed1260bef14fbf9352364ad0f08a416e.svg} +0 -0
- /package/build/static/media/{SourceSans3-Bold.a923b66a.ttf → SourceSans3-Bold.17e068739e42bdb30d1c.ttf} +0 -0
- /package/build/static/media/{SourceSans3-Light.d1772158.ttf → SourceSans3-Light.37264fa35ee0d5f209ea.ttf} +0 -0
- /package/build/static/media/{SourceSans3-Medium.fda30e61.ttf → SourceSans3-Medium.c82b4c53fc5d38ef5784.ttf} +0 -0
- /package/build/static/media/{SourceSans3-Regular.04f1a4f0.ttf → SourceSans3-Regular.c69f9658f16351f79f33.ttf} +0 -0
- /package/build/static/media/{SourceSans3-SemiBold.cf5be839.ttf → SourceSans3-SemiBold.5ad6683a8a06e3ccea94.ttf} +0 -0
- /package/build/static/media/{add.ba46a4bf.svg → add.2b72cedb98c4c89c954266d2356c166c.svg} +0 -0
- /package/build/static/media/{arrow_down.c1b611db.svg → arrow_down.f417689ce292978a8292a7f00407fdd5.svg} +0 -0
- /package/build/static/media/{arrow_left.fd9d4390.svg → arrow_left.73d03a534eaf9b99ab196e0fb67da602.svg} +0 -0
- /package/build/static/media/{arrow_right.c6fdab0b.svg → arrow_right.59a4594a3a1657037537dbae1eee0251.svg} +0 -0
- /package/build/static/media/{arrow_up.fcd6b144.svg → arrow_up.85dbe70bc51ec32c8894a06499330f14.svg} +0 -0
- /package/build/static/media/{avatar.4c5346ed.svg → avatar.43b4f53e7174b4cfd59c51b7acf6236b.svg} +0 -0
- /package/build/static/media/{bgDragmobile.e4913a92.svg → bgDragmobile.487091d95d6abb2a2711.svg} +0 -0
- /package/build/static/media/{call.c3c23966.svg → call.91e7bfc7a94979c6981988194b45850c.svg} +0 -0
- /package/build/static/media/{camera.ae3f4f51.svg → camera.7fc9fe03d10f926524c9b436720371c6.svg} +0 -0
- /package/build/static/media/{close.07dcb75c.svg → close.feb72bdc7227b9333f9528e260dd1217.svg} +0 -0
- /package/build/static/media/{download.d6432d26.svg → download.8007f7c72e2080a9ffa96fa63d480dcf.svg} +0 -0
- /package/build/static/media/{email_share.92bbfb8b.svg → email_share.0b8aeb4edc7c53e944b9c403ec77df2e.svg} +0 -0
- /package/build/static/media/{error.48b946a9.svg → error.560997da69fcc36e10dafe36df4af593.svg} +0 -0
- /package/build/static/media/{filter.bc412f08.svg → filter.9fdd64df67735e0fbf0dd7d1df32921c.svg} +0 -0
- /package/build/static/media/{filter_settings.fa0682a5.svg → filter_settings.f93788883c7fbbcd3ae194e45294d0de.svg} +0 -0
- /package/build/static/media/{home.defd14bf.svg → home.9ffb65a9c0be8fc5a502ba05cf5f719c.svg} +0 -0
- /package/build/static/media/{ic_cam.5318e2d0.svg → ic_cam.659852ba686874f710cc.svg} +0 -0
- /package/build/static/media/{ic_close_feedback.f0834c16.svg → ic_close_feedback.f0ab3c1557a131281039.svg} +0 -0
- /package/build/static/media/{ic_shopNow.0348013a.svg → ic_shopNow.71d2c270d716e3774615.svg} +0 -0
- /package/build/static/media/{ic_shopNowLight.d8eadc1e.svg → ic_shopNowLight.628bb04870f5af9a524f.svg} +0 -0
- /package/build/static/media/{icon_camera_mobile.4d7a272f.svg → icon_camera_mobile.6772053c4dfef487255649d2a05cc9d4.svg} +0 -0
- /package/build/static/media/{icon_dislike.0533c64a.svg → icon_dislike.cab8f1f21bc5222aba2d3ca689e4f392.svg} +0 -0
- /package/build/static/media/{icon_email.71b21005.svg → icon_email.f22810a3dd1b4e6853c68c134ee043b3.svg} +0 -0
- /package/build/static/media/{icon_like.80c66e3a.svg → icon_like.049f5c42107aa03b8ebae58cc8c088ca.svg} +0 -0
- /package/build/static/media/{icon_search.373c3cc4.svg → icon_search.cc17077df07fb2b82c0d58f9bddc7974.svg} +0 -0
- /package/build/static/media/{icon_search_image2.4c4af888.svg → icon_search_image2.4f4458c1e16dc5092f2367003d3aa1e4.svg} +0 -0
- /package/build/static/media/{img-1-1.6144e5f9.png → img-1-1.130fb8d0203452fee547.png} +0 -0
- /package/build/static/media/{img-1-2.ad943f0f.png → img-1-2.c512de6393df34bd1e61.png} +0 -0
- /package/build/static/media/{img2-1.a87c79c7.png → img2-1.2adc75df85eab5c127f9.png} +0 -0
- /package/build/static/media/{img2-2.39c5b73f.png → img2-2.c68532d4f95dbc63c69a.png} +0 -0
- /package/build/static/media/{img3-1.443b0c3a.png → img3-1.6eb26a22e6ea83629d27.png} +0 -0
- /package/build/static/media/{img3-2.37db7999.png → img3-2.39ae54b4032d52c79a3a.png} +0 -0
- /package/build/static/media/{img4-1.9c34c158.png → img4-1.a7594bfa47b01d2a0890.png} +0 -0
- /package/build/static/media/{img4-2.9d280a04.png → img4-2.24c0cbafe1a7ad7c24b5.png} +0 -0
- /package/build/static/media/{img5-1.b61dbd4d.png → img5-1.e6865b52df58608fd968.png} +0 -0
- /package/build/static/media/{img5-2.1c77c093.png → img5-2.ae59543efec34daf3554.png} +0 -0
- /package/build/static/media/{img6-1.8b03dd21.png → img6-1.c8bb209cdce72c2d8033.png} +0 -0
- /package/build/static/media/{img6-2.1e3e7fed.png → img6-2.b442f90b3e503ac33510.png} +0 -0
- /package/build/static/media/{info-tooltip.b98e8a9c.svg → info-tooltip.38185b73956d2d230d38d8254bb7fd91.svg} +0 -0
- /package/build/static/media/{logout.07b9ef7f.svg → logout.b544fcd2969edf431a1e998333119834.svg} +0 -0
- /package/build/static/media/{minus.3fce6c0a.svg → minus.dee9c571642279cf2af9ed09108cadd8.svg} +0 -0
- /package/build/static/media/{no-image.04b676b3.svg → no-image.0792bd463c7917d0b67f4a55a9bc55d9.svg} +0 -0
- /package/build/static/media/{powered_by_nyris.e6766baf.svg → powered_by_nyris.218facc4a2986cc09b183eeeb205b0c2.svg} +0 -0
- /package/build/static/media/{powered_by_nyris_colored.08d00bae.svg → powered_by_nyris_colored.7177945f25f07f85f8f57e02e15c0878.svg} +0 -0
- /package/build/static/media/{reverse_camera.28c80509.svg → reverse_camera.cee0200b151941cc83c182167a85d667.svg} +0 -0
- /package/build/static/media/{roboto-latin-100.5cb7edfc.woff → roboto-latin-100.a45108d3b34af91f9113.woff} +0 -0
- /package/build/static/media/{roboto-latin-100.7370c367.woff2 → roboto-latin-100.c2aa4ab115bf9c6057cb.woff2} +0 -0
- /package/build/static/media/{roboto-latin-100italic.f9e8e590.woff → roboto-latin-100italic.451d4e559d6f57cdf6a1.woff} +0 -0
- /package/build/static/media/{roboto-latin-100italic.f8b1df51.woff2 → roboto-latin-100italic.7f839a8652da29745ce4.woff2} +0 -0
- /package/build/static/media/{roboto-latin-300.ef7c6637.woff2 → roboto-latin-300.37a7069dc30fc663c878.woff2} +0 -0
- /package/build/static/media/{roboto-latin-300.b00849e0.woff → roboto-latin-300.865f928cbabcc9f8f2b5.woff} +0 -0
- /package/build/static/media/{roboto-latin-300italic.4df32891.woff → roboto-latin-300italic.bd5b7a13f2c52b531a2a.woff} +0 -0
- /package/build/static/media/{roboto-latin-300italic.14286f3b.woff2 → roboto-latin-300italic.c64e7e354c88e613c77c.woff2} +0 -0
- /package/build/static/media/{roboto-latin-400.479970ff.woff2 → roboto-latin-400.176f8f5bd5f02b3abfcf.woff2} +0 -0
- /package/build/static/media/{roboto-latin-400.60fa3c06.woff → roboto-latin-400.49ae34d4cc6b98c00c69.woff} +0 -0
- /package/build/static/media/{roboto-latin-400italic.fe65b833.woff → roboto-latin-400italic.b1d9d9904bfca8802a63.woff} +0 -0
- /package/build/static/media/{roboto-latin-400italic.51521a2a.woff2 → roboto-latin-400italic.d022bc70dc1bf7b3425d.woff2} +0 -0
- /package/build/static/media/{roboto-latin-500.87284894.woff → roboto-latin-500.cea99d3e3e13a3a599a0.woff} +0 -0
- /package/build/static/media/{roboto-latin-500.020c97dc.woff2 → roboto-latin-500.f5b74d7ffcdf85b9dd60.woff2} +0 -0
- /package/build/static/media/{roboto-latin-500italic.db4a2a23.woff2 → roboto-latin-500italic.0d8bb5b3ee5f5dac9e44.woff2} +0 -0
- /package/build/static/media/{roboto-latin-500italic.288ad9c6.woff → roboto-latin-500italic.18d00f739ff1e1c52db1.woff} +0 -0
- /package/build/static/media/{roboto-latin-700.adcde98f.woff → roboto-latin-700.2267169ee7270a22a963.woff} +0 -0
- /package/build/static/media/{roboto-latin-700.2735a3a6.woff2 → roboto-latin-700.c18ee39fb002ad58b6dc.woff2} +0 -0
- /package/build/static/media/{roboto-latin-700italic.da0e7178.woff2 → roboto-latin-700italic.7d8125ff7f707231fd89.woff2} +0 -0
- /package/build/static/media/{roboto-latin-700italic.81f57861.woff → roboto-latin-700italic.9360531f9bb817f917f0.woff} +0 -0
- /package/build/static/media/{roboto-latin-900.9b3766ef.woff2 → roboto-latin-900.870c8c1486f76054301a.woff2} +0 -0
- /package/build/static/media/{roboto-latin-900.bb1e4dc6.woff → roboto-latin-900.bac8362e7a6ea60b6983.woff} +0 -0
- /package/build/static/media/{roboto-latin-900italic.28f91510.woff → roboto-latin-900italic.c20d916c1a1b094c1cec.woff} +0 -0
- /package/build/static/media/{roboto-latin-900italic.ebf6d164.woff2 → roboto-latin-900italic.cb5ad999740e9d8a8bd1.woff2} +0 -0
- /package/build/static/media/{sectionTransBack.6cee2e36.svg → sectionTransBack.20491b21c659cd29499a.svg} +0 -0
- /package/build/static/media/{sectionTransTop.3dcf290f.svg → sectionTransTop.3a1dd8204a4137b92722.svg} +0 -0
- /package/build/static/media/{settings.e3c8138b.svg → settings.4b954549320dc34e0d000afd236cff2e.svg} +0 -0
- /package/build/static/media/{take_photo.76423216.svg → take_photo.42347c97c863fc8ec1afa36a56eb9ccb.svg} +0 -0
- /package/build/static/media/{trash.1624780d.svg → trash.ea9fa760f600fc578097ef0c01d5845f.svg} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, IconButton, Paper, Typography } from '@material-ui/core';
|
|
2
2
|
import CloseOutlinedIcon from '@material-ui/icons/CloseOutlined';
|
|
3
3
|
import FileCopyOutlinedIcon from '@material-ui/icons/FileCopyOutlined';
|
|
4
4
|
import IconEmail from '../common/assets/icons/email_share.svg';
|
|
@@ -17,19 +17,19 @@ export const ShareModal = (props: PropsType) => {
|
|
|
17
17
|
dataItem['image(main_similarity)'] || dataItem['main_image_link'];
|
|
18
18
|
return (
|
|
19
19
|
<DefaultModal openModal={isOpen} handleClose={() => setModalState(false)}>
|
|
20
|
-
<
|
|
20
|
+
<div
|
|
21
21
|
className="box-modal-default box-modal-share"
|
|
22
22
|
style={{ padding: '4px' }}
|
|
23
23
|
>
|
|
24
|
-
<
|
|
24
|
+
<div
|
|
25
25
|
className="ml-auto"
|
|
26
26
|
style={{ width: 'fit-content', marginRight: 5 }}
|
|
27
27
|
>
|
|
28
28
|
<Button style={{ padding: 0 }} onClick={() => setModalState(false)}>
|
|
29
29
|
<CloseOutlinedIcon style={{ fontSize: 16, color: '#55566B' }} />
|
|
30
30
|
</Button>
|
|
31
|
-
</
|
|
32
|
-
<
|
|
31
|
+
</div>
|
|
32
|
+
<div className="box-content-box-share">
|
|
33
33
|
<Typography
|
|
34
34
|
className="text-f12 text-gray text-bold"
|
|
35
35
|
style={{ marginBottom: '5px' }}
|
|
@@ -38,7 +38,7 @@ export const ShareModal = (props: PropsType) => {
|
|
|
38
38
|
</Typography>
|
|
39
39
|
{main_image_link && (
|
|
40
40
|
<Paper component="form" className="box-input">
|
|
41
|
-
<
|
|
41
|
+
<div
|
|
42
42
|
className="text-f9 text-gray"
|
|
43
43
|
style={{
|
|
44
44
|
width: '100%',
|
|
@@ -49,7 +49,7 @@ export const ShareModal = (props: PropsType) => {
|
|
|
49
49
|
}}
|
|
50
50
|
>
|
|
51
51
|
{main_image_link}
|
|
52
|
-
</
|
|
52
|
+
</div>
|
|
53
53
|
<IconButton
|
|
54
54
|
color="secondary"
|
|
55
55
|
aria-label="directions"
|
|
@@ -68,7 +68,7 @@ export const ShareModal = (props: PropsType) => {
|
|
|
68
68
|
className="box-input"
|
|
69
69
|
style={{ marginTop: '12px', marginBottom: '8px' }}
|
|
70
70
|
>
|
|
71
|
-
<
|
|
71
|
+
<div
|
|
72
72
|
className="text-f9 text-gray"
|
|
73
73
|
style={{
|
|
74
74
|
width: '100%',
|
|
@@ -84,7 +84,7 @@ export const ShareModal = (props: PropsType) => {
|
|
|
84
84
|
SKU:
|
|
85
85
|
</span>{' '}
|
|
86
86
|
{dataItem.sku}
|
|
87
|
-
</
|
|
87
|
+
</div>
|
|
88
88
|
<IconButton
|
|
89
89
|
color="secondary"
|
|
90
90
|
aria-label="directions"
|
|
@@ -96,10 +96,9 @@ export const ShareModal = (props: PropsType) => {
|
|
|
96
96
|
<FileCopyOutlinedIcon style={{ fontSize: 14 }} />
|
|
97
97
|
</IconButton>
|
|
98
98
|
</Paper>
|
|
99
|
-
<
|
|
99
|
+
<div
|
|
100
100
|
className="box-media-share"
|
|
101
|
-
|
|
102
|
-
style={{ marginTop: '18px' }}
|
|
101
|
+
style={{ marginTop: '18px', display: 'flex' }}
|
|
103
102
|
>
|
|
104
103
|
<a
|
|
105
104
|
style={{ padding: 0 }}
|
|
@@ -110,33 +109,33 @@ export const ShareModal = (props: PropsType) => {
|
|
|
110
109
|
(main_image_link ? `Image Link: ${main_image_link}` : ''),
|
|
111
110
|
)} `}
|
|
112
111
|
>
|
|
113
|
-
<
|
|
112
|
+
<div style={{ display: 'flex', alignItems: 'center' }}>
|
|
114
113
|
<img width={40} height={40} src={IconEmail} alt="icon_email" />
|
|
115
|
-
</
|
|
114
|
+
</div>
|
|
116
115
|
</a>
|
|
117
116
|
{/* <Button style={{ padding: 0, margin: '0 20px' }}>
|
|
118
|
-
<
|
|
117
|
+
<div display={'flex'} alignItems={'center'}>
|
|
119
118
|
<img
|
|
120
119
|
src={IconWeChat}
|
|
121
120
|
width={40}
|
|
122
121
|
height={40}
|
|
123
122
|
alt="icon_email"
|
|
124
123
|
/>
|
|
125
|
-
</
|
|
124
|
+
</div>
|
|
126
125
|
</Button>
|
|
127
126
|
<Button style={{ padding: 0 }}>
|
|
128
|
-
<
|
|
127
|
+
<div display={'flex'} alignItems={'center'}>
|
|
129
128
|
<img
|
|
130
129
|
src={IconWhatsApp}
|
|
131
130
|
width={40}
|
|
132
131
|
height={40}
|
|
133
132
|
alt="icon_email"
|
|
134
133
|
/>
|
|
135
|
-
</
|
|
134
|
+
</div>
|
|
136
135
|
</Button> */}
|
|
137
|
-
</
|
|
138
|
-
</
|
|
139
|
-
</
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
140
139
|
</DefaultModal>
|
|
141
140
|
);
|
|
142
141
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, Typography } from '@material-ui/core';
|
|
2
2
|
import { RectCoords } from '@nyris/nyris-api';
|
|
3
3
|
import { Preview } from '@nyris/nyris-react-components';
|
|
4
4
|
import React, { useState } from 'react';
|
|
@@ -41,7 +41,7 @@ function SidePanel({
|
|
|
41
41
|
const { requestImage } = search;
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
|
-
<
|
|
44
|
+
<div
|
|
45
45
|
className={`wrap-main-col-left ${toggleColLeft ? 'toggle' : ''}`}
|
|
46
46
|
style={{
|
|
47
47
|
display: 'flex',
|
|
@@ -49,7 +49,7 @@ function SidePanel({
|
|
|
49
49
|
justifyContent: 'space-between',
|
|
50
50
|
}}
|
|
51
51
|
>
|
|
52
|
-
<
|
|
52
|
+
<div
|
|
53
53
|
className="box-toggle-coloumn"
|
|
54
54
|
style={{
|
|
55
55
|
right: '0px',
|
|
@@ -70,12 +70,12 @@ function SidePanel({
|
|
|
70
70
|
<KeyboardArrowLeftOutlinedIcon />
|
|
71
71
|
)}
|
|
72
72
|
</Button>
|
|
73
|
-
</
|
|
74
|
-
<
|
|
73
|
+
</div>
|
|
74
|
+
<div>
|
|
75
75
|
{settings.preview && requestImage && (
|
|
76
|
-
<
|
|
77
|
-
<
|
|
78
|
-
<
|
|
76
|
+
<div className="col-left">
|
|
77
|
+
<div className="box-preview">
|
|
78
|
+
<div
|
|
79
79
|
className="preview-item"
|
|
80
80
|
style={{
|
|
81
81
|
backgroundColor: 'white',
|
|
@@ -114,13 +114,13 @@ function SidePanel({
|
|
|
114
114
|
/>
|
|
115
115
|
</div>
|
|
116
116
|
</div>
|
|
117
|
-
</
|
|
118
|
-
</
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
119
|
{(showAdjustInfoBasedOnConfidence || showAdjustInfo) && (
|
|
120
|
-
<
|
|
120
|
+
<div
|
|
121
121
|
className="box-title_col-left"
|
|
122
|
-
alignItems="center"
|
|
123
122
|
style={{
|
|
123
|
+
alignItems: 'center',
|
|
124
124
|
backgroundColor: '#3E36DC',
|
|
125
125
|
display: 'flex',
|
|
126
126
|
columnGap: '6px',
|
|
@@ -138,13 +138,13 @@ function SidePanel({
|
|
|
138
138
|
? t('Crop the image for better results')
|
|
139
139
|
: 'Crop the image for better results'}
|
|
140
140
|
</Typography>
|
|
141
|
-
</
|
|
141
|
+
</div>
|
|
142
142
|
)}
|
|
143
|
-
</
|
|
143
|
+
</div>
|
|
144
144
|
)}
|
|
145
145
|
|
|
146
146
|
{showPostFilter && (
|
|
147
|
-
<
|
|
147
|
+
<div
|
|
148
148
|
className="col-left__bottom"
|
|
149
149
|
style={{
|
|
150
150
|
marginTop: requestImage ? '16px' : '48px',
|
|
@@ -154,10 +154,10 @@ function SidePanel({
|
|
|
154
154
|
<PostFilterPanelAlgolia disjunctiveFacets={disjunctiveFacets} />
|
|
155
155
|
)}
|
|
156
156
|
{!settings.algolia.enabled && <PostFilterPanel />}
|
|
157
|
-
</
|
|
157
|
+
</div>
|
|
158
158
|
)}
|
|
159
|
-
</
|
|
160
|
-
</
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Options, Splide, SplideSlide } from '@splidejs/react-splide';
|
|
2
2
|
import React, { useMemo, useRef } from 'react';
|
|
3
|
-
|
|
4
|
-
import '@splidejs/react-splide/
|
|
3
|
+
|
|
4
|
+
import '@splidejs/react-splide/css';
|
|
5
|
+
import '@splidejs/react-splide/css/core';
|
|
6
|
+
|
|
5
7
|
import './ImagePreviewCarousel.scss';
|
|
6
8
|
import { useMediaQuery } from 'react-responsive';
|
|
7
9
|
|
|
@@ -76,7 +78,9 @@ export const ImagePreviewCarousel = (props: Props) => {
|
|
|
76
78
|
<>
|
|
77
79
|
<Splide
|
|
78
80
|
onActive={(e: any) => {
|
|
79
|
-
setSelectedImage(
|
|
81
|
+
setSelectedImage(
|
|
82
|
+
e?.root?.querySelector('li.is-active')?.querySelector('img')?.src,
|
|
83
|
+
);
|
|
80
84
|
}}
|
|
81
85
|
options={mainOptions}
|
|
82
86
|
ref={mainRef}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { connectMenu } from "react-instantsearch-dom";
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { connectMenu } from 'react-instantsearch-dom';
|
|
4
3
|
|
|
5
4
|
function DefaultSelectCustom({ items, currentRefinement, refine }: any) {
|
|
6
|
-
|
|
7
5
|
return (
|
|
8
|
-
<
|
|
6
|
+
<div className="w-100">
|
|
9
7
|
<select
|
|
10
8
|
className="w-100 btn-ct"
|
|
11
|
-
value={currentRefinement ||
|
|
9
|
+
value={currentRefinement || ''}
|
|
12
10
|
onChange={(event: any) => {
|
|
13
11
|
refine(event?.currentTarget.value);
|
|
14
12
|
}}
|
|
@@ -23,7 +21,7 @@ function DefaultSelectCustom({ items, currentRefinement, refine }: any) {
|
|
|
23
21
|
</option>
|
|
24
22
|
))}
|
|
25
23
|
</select>
|
|
26
|
-
</
|
|
24
|
+
</div>
|
|
27
25
|
);
|
|
28
26
|
}
|
|
29
27
|
const DefaultSelect = connectMenu(DefaultSelectCustom);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { Drawer } from '@material-ui/core';
|
|
2
3
|
import IconButton from '@material-ui/core/IconButton';
|
|
3
4
|
import CloseIcon from '@material-ui/icons/Close';
|
|
4
5
|
import PhotoLibraryIcon from '@material-ui/icons/PhotoLibrary';
|
|
@@ -65,45 +66,48 @@ function CameraCustom(props: Props) {
|
|
|
65
66
|
dispatch(onToggleModalItemDetail(false));
|
|
66
67
|
handlerCloseModal();
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
try {
|
|
70
|
+
if (settings.regions) {
|
|
71
|
+
let res = await findRegions(imageConvert, settings);
|
|
72
|
+
dispatch(setRegions(res.regions));
|
|
73
|
+
region = res.selectedRegion;
|
|
74
|
+
dispatch(setSelectedRegion(region));
|
|
75
|
+
}
|
|
76
|
+
} catch (error) {
|
|
77
|
+
} finally {
|
|
78
|
+
const preFilterValues = [
|
|
79
|
+
{
|
|
80
|
+
key: settings.visualSearchFilterKey,
|
|
81
|
+
values: Object.keys(preFilter) as string[],
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
let filters: any[] = [];
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
find({
|
|
87
|
+
image: imageConvert,
|
|
88
|
+
settings,
|
|
89
|
+
filters: !isEmpty(preFilter) ? preFilterValues : undefined,
|
|
90
|
+
region,
|
|
91
|
+
})
|
|
92
|
+
.then((res: any) => {
|
|
93
|
+
res?.results.forEach((item: any) => {
|
|
94
|
+
filters.push({
|
|
95
|
+
sku: item.sku,
|
|
96
|
+
score: item.score,
|
|
97
|
+
});
|
|
94
98
|
});
|
|
99
|
+
const payload = {
|
|
100
|
+
...res,
|
|
101
|
+
filters,
|
|
102
|
+
};
|
|
103
|
+
dispatch(setSearchResults(payload));
|
|
104
|
+
dispatch(updateStatusLoading(false));
|
|
105
|
+
})
|
|
106
|
+
.catch((e: any) => {
|
|
107
|
+
console.log('error input search', e);
|
|
108
|
+
dispatch(updateStatusLoading(false));
|
|
95
109
|
});
|
|
96
|
-
|
|
97
|
-
...res,
|
|
98
|
-
filters,
|
|
99
|
-
};
|
|
100
|
-
dispatch(setSearchResults(payload));
|
|
101
|
-
dispatch(updateStatusLoading(false));
|
|
102
|
-
})
|
|
103
|
-
.catch((e: any) => {
|
|
104
|
-
console.log('error input search', e);
|
|
105
|
-
dispatch(updateStatusLoading(false));
|
|
106
|
-
});
|
|
110
|
+
}
|
|
107
111
|
};
|
|
108
112
|
|
|
109
113
|
const handlerCloseModal = () => {
|
|
@@ -113,14 +117,14 @@ function CameraCustom(props: Props) {
|
|
|
113
117
|
};
|
|
114
118
|
|
|
115
119
|
return (
|
|
116
|
-
<
|
|
120
|
+
<div className="box-camera-custom">
|
|
117
121
|
<Drawer
|
|
118
122
|
anchor={'bottom'}
|
|
119
123
|
open={isToggle}
|
|
120
124
|
onClose={handlerCloseModal}
|
|
121
125
|
className="modal-togggle-cam"
|
|
122
126
|
>
|
|
123
|
-
<
|
|
127
|
+
<div className="wrap-camera">
|
|
124
128
|
<button
|
|
125
129
|
className="btn-close-modal right"
|
|
126
130
|
style={{
|
|
@@ -259,9 +263,9 @@ function CameraCustom(props: Props) {
|
|
|
259
263
|
</IconButton>
|
|
260
264
|
</label>
|
|
261
265
|
</div>
|
|
262
|
-
</
|
|
266
|
+
</div>
|
|
263
267
|
</Drawer>
|
|
264
|
-
</
|
|
268
|
+
</div>
|
|
265
269
|
);
|
|
266
270
|
}
|
|
267
271
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button, Tooltip } from '@material-ui/core';
|
|
2
2
|
import IconButton from '@material-ui/core/IconButton';
|
|
3
3
|
import ClearOutlinedIcon from '@material-ui/icons/ClearOutlined';
|
|
4
4
|
import CloseIcon from '@material-ui/icons/Close';
|
|
@@ -82,6 +82,7 @@ const SearchBox = (props: any) => {
|
|
|
82
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
83
83
|
}, [imageThumbSearchInput, isAlgoliaEnabled]);
|
|
84
84
|
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
86
|
const searchOrRedirect = useCallback(
|
|
86
87
|
debounce((value: any, withImage = true) => {
|
|
87
88
|
if (!isAlgoliaEnabled) {
|
|
@@ -106,7 +107,7 @@ const SearchBox = (props: any) => {
|
|
|
106
107
|
text: value,
|
|
107
108
|
})
|
|
108
109
|
.then((res: any) => {
|
|
109
|
-
res?.results.
|
|
110
|
+
res?.results.forEach((item: any) => {
|
|
110
111
|
filters.push({
|
|
111
112
|
sku: item.sku,
|
|
112
113
|
score: item.score,
|
|
@@ -162,38 +163,42 @@ const SearchBox = (props: any) => {
|
|
|
162
163
|
values: Object.keys(preFilter) as string[],
|
|
163
164
|
},
|
|
164
165
|
];
|
|
166
|
+
try {
|
|
167
|
+
if (settings.regions) {
|
|
168
|
+
let res = await findRegions(image, settings);
|
|
169
|
+
console.log(res);
|
|
165
170
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
171
|
+
dispatch(setRegions(res.regions));
|
|
172
|
+
region = res.selectedRegion;
|
|
173
|
+
dispatch(setSelectedRegion(region));
|
|
174
|
+
}
|
|
175
|
+
} catch (error) {
|
|
176
|
+
} finally {
|
|
177
|
+
return find({
|
|
178
|
+
image,
|
|
179
|
+
settings,
|
|
180
|
+
filters: !isEmpty(preFilter) ? preFilterValues : undefined,
|
|
181
|
+
region,
|
|
182
|
+
})
|
|
183
|
+
.then((res: any) => {
|
|
184
|
+
res?.results.forEach((item: any) => {
|
|
185
|
+
filters.push({
|
|
186
|
+
sku: item.sku,
|
|
187
|
+
score: item.score,
|
|
188
|
+
});
|
|
184
189
|
});
|
|
190
|
+
payload = {
|
|
191
|
+
...res,
|
|
192
|
+
filters,
|
|
193
|
+
};
|
|
194
|
+
dispatch(setSearchResults(payload));
|
|
195
|
+
dispatch(updateStatusLoading(false));
|
|
196
|
+
})
|
|
197
|
+
.catch((e: any) => {
|
|
198
|
+
console.log('error input search', e);
|
|
199
|
+
dispatch(updateStatusLoading(false));
|
|
185
200
|
});
|
|
186
|
-
|
|
187
|
-
...res,
|
|
188
|
-
filters,
|
|
189
|
-
};
|
|
190
|
-
dispatch(setSearchResults(payload));
|
|
191
|
-
dispatch(updateStatusLoading(false));
|
|
192
|
-
})
|
|
193
|
-
.catch((e: any) => {
|
|
194
|
-
console.log('error input search', e);
|
|
195
|
-
dispatch(updateStatusLoading(false));
|
|
196
|
-
});
|
|
201
|
+
}
|
|
197
202
|
},
|
|
198
203
|
});
|
|
199
204
|
|
|
@@ -213,7 +218,7 @@ const SearchBox = (props: any) => {
|
|
|
213
218
|
<div className="wrap-input-search-field">
|
|
214
219
|
<div className="box-input-search d-flex">
|
|
215
220
|
<div className="input-wrapper">
|
|
216
|
-
<
|
|
221
|
+
<div className="box-inp">
|
|
217
222
|
<Tooltip
|
|
218
223
|
title={
|
|
219
224
|
!isEmpty(preFilter)
|
|
@@ -224,7 +229,7 @@ const SearchBox = (props: any) => {
|
|
|
224
229
|
arrow={true}
|
|
225
230
|
disableHoverListener={!settings.preFilterOption}
|
|
226
231
|
>
|
|
227
|
-
<
|
|
232
|
+
<div
|
|
228
233
|
className="pre-filter-icon"
|
|
229
234
|
style={{
|
|
230
235
|
cursor: settings.preFilterOption ? 'pointer' : 'default',
|
|
@@ -280,23 +285,23 @@ const SearchBox = (props: any) => {
|
|
|
280
285
|
></div>
|
|
281
286
|
</div>
|
|
282
287
|
)}
|
|
283
|
-
</
|
|
288
|
+
</div>
|
|
284
289
|
</Tooltip>
|
|
285
|
-
<
|
|
290
|
+
<div
|
|
286
291
|
style={{
|
|
287
292
|
height: '75%',
|
|
288
293
|
order: 1,
|
|
289
294
|
}}
|
|
290
295
|
>
|
|
291
296
|
{imageThumbSearchInput && (
|
|
292
|
-
<
|
|
297
|
+
<div
|
|
293
298
|
style={{
|
|
294
299
|
border: `2px solid ${settings.theme?.primaryColor}`,
|
|
295
300
|
backgroundColor: `${settings.theme?.primaryColor}26`,
|
|
296
301
|
marginRight: '5px',
|
|
302
|
+
display: 'flex',
|
|
297
303
|
}}
|
|
298
304
|
className="box-image-search-thumb"
|
|
299
|
-
display={'flex'}
|
|
300
305
|
>
|
|
301
306
|
<img
|
|
302
307
|
src={imageThumbSearchInput}
|
|
@@ -331,9 +336,9 @@ const SearchBox = (props: any) => {
|
|
|
331
336
|
/>
|
|
332
337
|
</button>
|
|
333
338
|
</Tooltip>
|
|
334
|
-
</
|
|
339
|
+
</div>
|
|
335
340
|
)}
|
|
336
|
-
</
|
|
341
|
+
</div>
|
|
337
342
|
|
|
338
343
|
<input
|
|
339
344
|
style={{
|
|
@@ -348,13 +353,14 @@ const SearchBox = (props: any) => {
|
|
|
348
353
|
onChange={onChangeText}
|
|
349
354
|
ref={focusInp}
|
|
350
355
|
/>
|
|
351
|
-
</
|
|
356
|
+
</div>
|
|
352
357
|
|
|
353
358
|
{history.location.pathname === '/result' && valueInput && (
|
|
354
359
|
<Button
|
|
355
360
|
className="btn-clear-text"
|
|
356
361
|
onClick={() => {
|
|
357
362
|
if (imageThumbSearchInput) {
|
|
363
|
+
history.push('/result');
|
|
358
364
|
if (!isAlgoliaEnabled) {
|
|
359
365
|
searchOrRedirect('');
|
|
360
366
|
}
|
|
@@ -417,14 +423,14 @@ const SearchBox = (props: any) => {
|
|
|
417
423
|
</Tooltip>
|
|
418
424
|
</div>
|
|
419
425
|
) : (
|
|
420
|
-
<
|
|
426
|
+
<div>
|
|
421
427
|
<Button
|
|
422
428
|
className="btn-mobile-filter"
|
|
423
429
|
onClick={onToggleFilterMobile}
|
|
424
430
|
>
|
|
425
431
|
<IconFilter width={18} height={18} />
|
|
426
432
|
</Button>
|
|
427
|
-
</
|
|
433
|
+
</div>
|
|
428
434
|
)}
|
|
429
435
|
</div>
|
|
430
436
|
</div>
|