@nyris/nyris-webapp 0.3.57 → 0.3.59
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 +15 -16
- package/build/index.html +1 -1
- package/build/js/settings.example.js +1 -0
- package/build/static/css/main.cb6e2cfd.css +4 -0
- package/build/static/css/main.cb6e2cfd.css.map +1 -0
- package/build/static/js/main.a1e24447.js +3 -0
- package/build/static/js/{main.5143aa56.js.LICENSE.txt → main.a1e24447.js.LICENSE.txt} +55 -0
- package/build/static/js/main.a1e24447.js.map +1 -0
- package/build/static/media/camera_simple.bff4194954bbb5f4bc33bd99014a93e8.svg +3 -0
- package/build/static/media/collpase.50dae91fff891c46b10dfc281344d0ef.svg +6 -0
- package/build/static/media/crop.0676ebbbdc1375ed67e32bba890ce941.svg +3 -0
- package/build/static/media/{download.8007f7c72e2080a9ffa96fa63d480dcf.svg → download.a8452bc23334e9f8e53fe1225742d216.svg} +1 -1
- package/build/static/media/gallery.15d1f3308921480a8c9d96d9a77c9966.svg +3 -0
- package/build/static/media/{logout.b544fcd2969edf431a1e998333119834.svg → logout.bab56bd407f25eb34d6eff401a436ce1.svg} +1 -1
- package/build/static/media/next-arrow.b13263d05d107ceb5e99bc4fabb41279.svg +3 -0
- package/build/static/media/plus.329672cb2feb55345490589e91481b88.svg +3 -0
- package/package.json +8 -5
- package/public/index.html +0 -3
- package/public/js/settings.example.js +1 -0
- package/src/Router.tsx +2 -2
- package/src/Store/Store.ts +2 -0
- package/src/Store/requestStore.ts +70 -0
- package/src/Store/resultStore.ts +25 -0
- package/src/Store/search/Search.ts +2 -33
- package/src/Store/search/search.initialState.ts +1 -4
- package/src/Store/search/types.ts +0 -5
- package/src/common/assets/icons/arrow_enter.svg +3 -0
- package/src/common/assets/icons/camera_simple.svg +3 -0
- package/src/common/assets/icons/collpase.svg +6 -0
- package/src/common/assets/icons/crop.svg +3 -0
- package/src/common/assets/icons/download.svg +1 -1
- package/src/common/assets/icons/gallery.svg +3 -0
- package/src/common/assets/icons/logout.svg +1 -1
- package/src/common/assets/icons/next-arrow.svg +3 -0
- package/src/common/assets/icons/plus.svg +3 -0
- package/src/components/CadenasWebViewer.tsx +1 -1
- package/src/components/DragDropFile.tsx +17 -77
- package/src/components/Experience-visual-search/ExperienceVisualSearch.tsx +47 -71
- package/src/components/Feedback.tsx +23 -9
- package/src/components/GoBackButton.tsx +15 -18
- package/src/components/HeaderMobile.tsx +342 -246
- package/src/components/ImageCaptureHelpModal.tsx +63 -65
- package/src/components/ImagePreview.tsx +564 -0
- package/src/components/Inquiry/InquiryBanner.tsx +1 -1
- package/src/components/Inquiry/InquiryModal.tsx +4 -7
- package/src/components/Layout.tsx +9 -18
- package/src/components/MobileLayout.tsx +51 -0
- package/src/components/MobilePostFilter.tsx +9 -3
- package/src/components/PanelResult/PostFilterAlgolia.tsx +4 -32
- package/src/components/PanelResult/expandable-panel.tsx +3 -16
- package/src/components/PanelResult/virtual-state-results.ts +17 -22
- package/src/components/ProductDetailView.tsx +1 -1
- package/src/components/SidePanel.tsx +7 -97
- package/src/components/UploadDisclaimer.tsx +85 -0
- package/src/components/appMobile.scss +2 -2
- package/src/components/common.scss +57 -27
- package/src/components/drawer/cameraCustom.tsx +389 -231
- package/src/components/icon-label/icon-label.tsx +1 -1
- package/src/components/input/inputSearch.tsx +197 -338
- package/src/components/pre-filter/index.tsx +70 -72
- package/src/components/results/ItemResult.tsx +34 -17
- package/src/components/rfq/RfqBanner.tsx +1 -4
- package/src/components/rfq/RfqModal.tsx +10 -10
- package/src/hooks/useFilteredRegions.ts +1 -1
- package/src/hooks/useImageSearch.ts +189 -0
- package/src/hooks/useSearchOrRedirect.ts +84 -0
- package/src/index.css +4 -0
- package/src/page/landingPage/Home.tsx +49 -0
- package/src/page/landingPage/{AppMD.tsx → HomeDesktop.tsx} +7 -34
- package/src/page/landingPage/{AppMobile.tsx → HomeMobile.tsx} +8 -37
- package/src/page/landingPage/common.scss +9 -1
- package/src/page/result/index.tsx +118 -232
- package/src/services/Feedback.ts +4 -5
- package/src/services/image.ts +19 -0
- package/src/types.ts +9 -7
- package/src/utils.ts +44 -0
- package/tailwind.config.js +54 -0
- package/build/static/css/main.67965609.css +0 -2
- package/build/static/css/main.67965609.css.map +0 -1
- package/build/static/js/main.5143aa56.js +0 -3
- package/build/static/js/main.5143aa56.js.map +0 -1
- package/build/static/media/arrow_down.f417689ce292978a8292a7f00407fdd5.svg +0 -3
- package/build/static/media/arrow_left.73d03a534eaf9b99ab196e0fb67da602.svg +0 -3
- package/build/static/media/arrow_right.59a4594a3a1657037537dbae1eee0251.svg +0 -3
- package/build/static/media/arrow_up.85dbe70bc51ec32c8894a06499330f14.svg +0 -3
- package/build/static/media/home.9ffb65a9c0be8fc5a502ba05cf5f719c.svg +0 -3
- package/build/static/media/icon_camera_mobile.6772053c4dfef487255649d2a05cc9d4.svg +0 -3
- package/build/static/media/reverse_camera.cee0200b151941cc83c182167a85d667.svg +0 -5
- package/src/App.tsx +0 -18
- package/src/components/AppMobile.tsx +0 -117
- package/src/components/FooterMobile.tsx +0 -230
- package/src/components/ImagePreviewMobile.tsx +0 -237
- /package/build/static/media/{add.2b72cedb98c4c89c954266d2356c166c.svg → add-rounded.2b72cedb98c4c89c954266d2356c166c.svg} +0 -0
- /package/src/common/assets/icons/{add.svg → add-rounded.svg} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import 'react-app-polyfill/ie11';
|
|
2
|
+
import 'react-app-polyfill/stable';
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
|
+
import 'typeface-roboto';
|
|
5
|
+
import 'index.css';
|
|
6
|
+
|
|
7
|
+
import AppMD from 'page/landingPage/HomeDesktop';
|
|
8
|
+
import AppMobile from 'page/landingPage/HomeMobile';
|
|
9
|
+
import { useAppSelector } from 'Store/Store';
|
|
10
|
+
|
|
11
|
+
function Home(): JSX.Element {
|
|
12
|
+
const clarityId = useAppSelector(state => state.settings.clarityId);
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (clarityId) {
|
|
16
|
+
clarify(window, document, 'clarity', 'script', clarityId);
|
|
17
|
+
}
|
|
18
|
+
}, [clarityId]);
|
|
19
|
+
|
|
20
|
+
const clarify = function (
|
|
21
|
+
c: any,
|
|
22
|
+
l: Document,
|
|
23
|
+
a: string,
|
|
24
|
+
r: string,
|
|
25
|
+
i: string,
|
|
26
|
+
) {
|
|
27
|
+
c[a] =
|
|
28
|
+
c[a] ||
|
|
29
|
+
function () {
|
|
30
|
+
(c[a].q = c[a].q || []).push(arguments);
|
|
31
|
+
};
|
|
32
|
+
const t: any = l.createElement(r);
|
|
33
|
+
t.async = true;
|
|
34
|
+
t.src = `https://www.clarity.ms/tag/${i}`;
|
|
35
|
+
const y = l.getElementsByTagName(r)[0];
|
|
36
|
+
if (y.parentNode) {
|
|
37
|
+
y.parentNode.insertBefore(t, y);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<>
|
|
43
|
+
<AppMobile />
|
|
44
|
+
<AppMD />
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default Home;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import './common.scss';
|
|
3
3
|
import algoliasearch from 'algoliasearch/lite';
|
|
4
4
|
import DragDropFile from 'components/DragDropFile';
|
|
@@ -15,38 +15,11 @@ function AppMD() {
|
|
|
15
15
|
const searchClient = algoliasearch(appId, apiKey);
|
|
16
16
|
searchClient.initIndex(indexName);
|
|
17
17
|
|
|
18
|
-
useEffect(() => {
|
|
19
|
-
if (settings.clarityId) {
|
|
20
|
-
clarify(window, document, 'clarity', 'script', settings.clarityId);
|
|
21
|
-
}
|
|
22
|
-
}, [settings.clarityId]);
|
|
23
|
-
|
|
24
18
|
const acceptTypes = ['image/*'];
|
|
25
19
|
const InfiniteHits = ({ hits }: any) => {
|
|
26
20
|
return <div></div>;
|
|
27
21
|
};
|
|
28
22
|
|
|
29
|
-
const clarify = function (
|
|
30
|
-
c: any,
|
|
31
|
-
l: Document,
|
|
32
|
-
a: string,
|
|
33
|
-
r: string,
|
|
34
|
-
i: string
|
|
35
|
-
) {
|
|
36
|
-
c[a] =
|
|
37
|
-
c[a] ||
|
|
38
|
-
function () {
|
|
39
|
-
(c[a].q = c[a].q || []).push(arguments);
|
|
40
|
-
};
|
|
41
|
-
const t: any = l.createElement(r);
|
|
42
|
-
t.async = true;
|
|
43
|
-
t.src = `https://www.clarity.ms/tag/${i}`;
|
|
44
|
-
const y = l.getElementsByTagName(r)[0];
|
|
45
|
-
if (y.parentNode) {
|
|
46
|
-
y.parentNode.insertBefore(t, y);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
23
|
const onChangeLoading = (value: boolean) => {
|
|
51
24
|
setLoading(value);
|
|
52
25
|
};
|
|
@@ -54,7 +27,11 @@ function AppMD() {
|
|
|
54
27
|
const CustomInfiniteHits = connectInfiniteHits(InfiniteHits);
|
|
55
28
|
|
|
56
29
|
return (
|
|
57
|
-
<div
|
|
30
|
+
<div
|
|
31
|
+
className={`box-content-main ${
|
|
32
|
+
isLoading ? 'loading' : ''
|
|
33
|
+
} hidden desktop:flex`}
|
|
34
|
+
>
|
|
58
35
|
<div className="box-content_top" style={{ position: 'relative' }}>
|
|
59
36
|
{settings.headerText && (
|
|
60
37
|
<div
|
|
@@ -77,11 +54,7 @@ function AppMD() {
|
|
|
77
54
|
isLoading={isLoading}
|
|
78
55
|
onChangeLoading={onChangeLoading}
|
|
79
56
|
/>
|
|
80
|
-
{settings.experienceVisualSearch ?
|
|
81
|
-
<ExperienceVisualSearch />
|
|
82
|
-
) : (
|
|
83
|
-
''
|
|
84
|
-
)}
|
|
57
|
+
{settings.experienceVisualSearch ? <ExperienceVisualSearch /> : ''}
|
|
85
58
|
</div>
|
|
86
59
|
</div>
|
|
87
60
|
);
|
|
@@ -1,50 +1,25 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
1
3
|
import CameraCustom from 'components/drawer/cameraCustom';
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import { useAppSelector } from 'Store/Store';
|
|
4
4
|
import { ReactComponent as CameraIcon } from 'common/assets/icons/take_photo.svg';
|
|
5
|
+
|
|
6
|
+
import { useAppSelector } from 'Store/Store';
|
|
5
7
|
import ExperienceVisualSearch from '../../components/Experience-visual-search/ExperienceVisualSearch';
|
|
6
8
|
|
|
7
9
|
function AppMobile(): JSX.Element {
|
|
8
10
|
const { settings } = useAppSelector(state => state);
|
|
9
11
|
const [isOpenModalCamera, setOpenModalCamera] = useState<boolean>(false);
|
|
10
12
|
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
if (settings.clarityId) {
|
|
13
|
-
clarify(window, document, 'clarity', 'script', settings.clarityId);
|
|
14
|
-
}
|
|
15
|
-
}, [settings.clarityId]);
|
|
16
|
-
|
|
17
|
-
const clarify = function (
|
|
18
|
-
c: any,
|
|
19
|
-
l: Document,
|
|
20
|
-
a: string,
|
|
21
|
-
r: string,
|
|
22
|
-
i: string
|
|
23
|
-
) {
|
|
24
|
-
c[a] =
|
|
25
|
-
c[a] ||
|
|
26
|
-
function () {
|
|
27
|
-
(c[a].q = c[a].q || []).push(arguments);
|
|
28
|
-
};
|
|
29
|
-
const t: any = l.createElement(r);
|
|
30
|
-
t.async = true;
|
|
31
|
-
t.src = `https://www.clarity.ms/tag/${i}`;
|
|
32
|
-
const y = l.getElementsByTagName(r)[0];
|
|
33
|
-
if (y.parentNode) {
|
|
34
|
-
y.parentNode.insertBefore(t, y);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
|
|
38
13
|
return (
|
|
39
14
|
<div
|
|
40
15
|
style={{
|
|
41
|
-
display: 'flex',
|
|
42
16
|
flexDirection: 'column',
|
|
43
17
|
justifyContent: 'center',
|
|
44
18
|
alignItems: 'center',
|
|
45
19
|
width: '100%',
|
|
46
20
|
height: '100%',
|
|
47
21
|
}}
|
|
22
|
+
className="flex desktop:hidden"
|
|
48
23
|
>
|
|
49
24
|
<div className="take-photo">
|
|
50
25
|
<div
|
|
@@ -67,17 +42,13 @@ function AppMobile(): JSX.Element {
|
|
|
67
42
|
</div>
|
|
68
43
|
<div className="box-screenshot-camera">
|
|
69
44
|
<CameraCustom
|
|
70
|
-
|
|
71
|
-
|
|
45
|
+
show={isOpenModalCamera}
|
|
46
|
+
onClose={() => {
|
|
72
47
|
setOpenModalCamera(!isOpenModalCamera);
|
|
73
48
|
}}
|
|
74
49
|
/>
|
|
75
50
|
</div>
|
|
76
|
-
{settings.experienceVisualSearch ?
|
|
77
|
-
<ExperienceVisualSearch />
|
|
78
|
-
) : (
|
|
79
|
-
''
|
|
80
|
-
)}
|
|
51
|
+
{settings.experienceVisualSearch ? <ExperienceVisualSearch /> : ''}
|
|
81
52
|
</div>
|
|
82
53
|
);
|
|
83
54
|
}
|
|
@@ -740,7 +740,6 @@ button {
|
|
|
740
740
|
line-height: 21px;
|
|
741
741
|
color: #ffffff;
|
|
742
742
|
}
|
|
743
|
-
display: flex;
|
|
744
743
|
flex-direction: column;
|
|
745
744
|
justify-content: center;
|
|
746
745
|
align-items: center;
|
|
@@ -2327,3 +2326,12 @@ button {
|
|
|
2327
2326
|
max-width: 1300px;
|
|
2328
2327
|
}
|
|
2329
2328
|
}
|
|
2329
|
+
|
|
2330
|
+
|
|
2331
|
+
.MuiPaper-root {
|
|
2332
|
+
background-color: inherit !important;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
.MuiDrawer-paperAnchorBottom {
|
|
2336
|
+
height: 100% !important;
|
|
2337
|
+
}
|