@nyris/nyris-webapp 0.2.6 → 0.3.1
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 +32 -18
- package/build/index.html +1 -1
- package/build/js/test.js +62 -0
- package/build/{precache-manifest.aa7c9d32340f77d86c9a3347b54ba2a5.js → precache-manifest.3e7aa489925304848e8f04e3015d8567.js} +89 -13
- package/build/service-worker.js +1 -1
- package/build/static/css/2.8285176a.chunk.css +2 -0
- package/build/static/css/2.8285176a.chunk.css.map +1 -0
- package/build/static/css/main.b731b101.chunk.css +2 -0
- package/build/static/css/main.b731b101.chunk.css.map +1 -0
- package/build/static/js/2.8297cb74.chunk.js +3 -0
- package/build/static/js/2.8297cb74.chunk.js.LICENSE.txt +133 -0
- package/build/static/js/2.8297cb74.chunk.js.map +1 -0
- package/build/static/js/main.05909665.chunk.js +2 -0
- package/build/static/js/main.05909665.chunk.js.map +1 -0
- package/build/static/js/{runtime-main.f5553a9b.js → runtime-main.b418ff16.js} +1 -1
- package/build/static/js/{runtime-main.f5553a9b.js.map → runtime-main.b418ff16.js.map} +1 -1
- package/build/static/media/Fill.37094b44.svg +3 -0
- package/build/static/media/Montserrat-Bold.5a052e98.otf +0 -0
- package/build/static/media/Montserrat-Light.21789e89.otf +0 -0
- package/build/static/media/Montserrat-Medium.a53e0373.otf +0 -0
- package/build/static/media/Montserrat-Regular.71cdc681.otf +0 -0
- package/build/static/media/Montserrat-SemiBold.f613d915.otf +0 -0
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/admin.9529c7f6.svg +3 -0
- package/build/static/media/bg-support-page.6ac55268.svg +9 -0
- package/build/static/media/book_mark.8e294c0b.svg +3 -0
- package/build/static/media/icon_dislike.94607ca6.svg +3 -0
- package/build/static/media/icon_like.a4fb1b18.svg +3 -0
- package/build/static/media/icon_modal_image.3068d0ea.svg +21 -0
- package/build/static/media/icon_search_image.c2c728c0.svg +3 -0
- package/build/static/media/nyris_logo.22d8f250.svg +3 -0
- package/build/static/media/reload_icon.4b579a74.svg +3 -0
- package/build/static/media/save_search.bebaeebf.svg +3 -0
- package/build/static/media/support.289c3a3c.svg +3 -0
- package/build/static/media/translate_icon.f0492297.svg +3 -0
- package/package.json +30 -6
- package/public/js/test.js +62 -0
- package/src/App.css +27 -11
- package/src/App.tsx +19 -235
- package/src/Router.tsx +97 -0
- package/src/Store/Auth.ts +44 -0
- package/src/Store/Nyris.ts +77 -0
- package/src/Store/Search.ts +269 -0
- package/src/Store/Store.ts +46 -0
- package/src/Store/common.d.ts +10 -0
- package/src/{epics → Store/epics}/feedback.ts +0 -0
- package/src/{epics → Store/epics}/types.ts +1 -1
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Bold.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Light.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Medium.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Regular.otf +0 -0
- package/src/common/assets/fonts/Montserrat_OTF/Montserrat-SemiBold.otf +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff2 +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff +0 -0
- package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff2 +0 -0
- package/src/common/assets/icons/Fill.png +0 -0
- package/src/common/assets/icons/Fill.svg +3 -0
- package/src/common/assets/icons/Icon_wechat.png +0 -0
- package/src/common/assets/icons/Icon_whatsapp.png +0 -0
- package/src/common/assets/icons/admin.png +0 -0
- package/src/common/assets/icons/admin.svg +3 -0
- package/src/common/assets/icons/book_mark.png +0 -0
- package/src/common/assets/icons/book_mark.svg +3 -0
- package/src/common/assets/icons/icon_barcode.png +0 -0
- package/src/common/assets/icons/icon_camera.png +0 -0
- package/src/common/assets/icons/icon_dislike.svg +3 -0
- package/src/common/assets/icons/icon_disslike.png +0 -0
- package/src/common/assets/icons/icon_email.png +0 -0
- package/src/common/assets/icons/icon_like.png +0 -0
- package/src/common/assets/icons/icon_like.svg +3 -0
- package/src/common/assets/icons/icon_modal_image.png +0 -0
- package/src/common/assets/icons/icon_modal_image.svg +21 -0
- package/src/common/assets/icons/icon_picture.png +0 -0
- package/src/common/assets/icons/icon_search_image.png +0 -0
- package/src/common/assets/icons/icon_search_image.svg +3 -0
- package/src/common/assets/icons/nyris_logo.svg +3 -0
- package/src/common/assets/icons/reload_icon.png +0 -0
- package/src/common/assets/icons/reload_icon.svg +3 -0
- package/src/common/assets/icons/save_search.png +0 -0
- package/src/common/assets/icons/save_search.svg +3 -0
- package/src/common/assets/icons/setting_search_icon.png +0 -0
- package/src/common/assets/icons/support.png +0 -0
- package/src/common/assets/icons/support.svg +3 -0
- package/src/common/assets/icons/translate_icon.png +0 -0
- package/src/common/assets/icons/translate_icon.svg +3 -0
- package/src/common/assets/icons/view_off.png +0 -0
- package/src/common/assets/images/Rectangle.png +0 -0
- package/src/common/assets/images/bg-support-page.svg +9 -0
- package/src/{images → common/assets/images}/fav/android-icon-192x192.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-114x114.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-120x120.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-144x144.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-152x152.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-180x180.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-57x57.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-60x60.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-72x72.png +0 -0
- package/src/{images → common/assets/images}/fav/apple-icon-76x76.png +0 -0
- package/src/{images → common/assets/images}/fav/browserconfig.xml +0 -0
- package/src/{images → common/assets/images}/fav/favicon-16x16.png +0 -0
- package/src/{images → common/assets/images}/fav/favicon-32x32.png +0 -0
- package/src/{images → common/assets/images}/fav/favicon-96x96.png +0 -0
- package/src/{images → common/assets/images}/fav/manifest.json +0 -0
- package/src/{images → common/assets/images}/ic_cam.png +0 -0
- package/src/{images → common/assets/images}/ic_cam.svg +0 -0
- package/src/{images → common/assets/images}/ic_cam_large.png +0 -0
- package/src/{images → common/assets/images}/ic_cam_large.svg +0 -0
- package/src/{images → common/assets/images}/ic_cam_large_noimage.png +0 -0
- package/src/{images → common/assets/images}/ic_close_feedback.png +0 -0
- package/src/{images → common/assets/images}/ic_close_feedback.svg +0 -0
- package/src/{images → common/assets/images}/ic_shopNow.png +0 -0
- package/src/{images → common/assets/images}/ic_shopNow.svg +0 -0
- package/src/{images → common/assets/images}/ic_shopNowLight.png +0 -0
- package/src/{images → common/assets/images}/ic_shopNowLight.svg +0 -0
- package/src/common/assets/images/image_test.png +0 -0
- package/src/{images → common/assets/images}/nyris_logo.png +0 -0
- package/src/{images → common/assets/images}/rewe.svg +0 -0
- package/src/{images → common/assets/images}/sectionTransBack.png +0 -0
- package/src/{images → common/assets/images}/sectionTransBack.svg +0 -0
- package/src/{images → common/assets/images}/sectionTransTop.png +0 -0
- package/src/{images → common/assets/images}/sectionTransTop.svg +0 -0
- package/src/components/DetailItem.tsx +175 -0
- package/src/components/DragDropFile.tsx +188 -0
- package/src/components/ExampleImages.tsx +32 -17
- package/src/components/Feedback.tsx +87 -48
- package/src/components/FilterComponent.tsx +47 -0
- package/src/components/Footer.tsx +29 -0
- package/src/components/FooterMD.tsx +54 -0
- package/src/components/FooterNewVersion.tsx +12 -0
- package/src/components/FooterResult.tsx +47 -0
- package/src/components/Header.tsx +35 -0
- package/src/components/HeaderMd.tsx +39 -0
- package/src/components/HeaderNewVersion.tsx +92 -0
- package/src/components/Layout.tsx +46 -0
- package/src/components/LoadingScreen/index.tsx +42 -0
- package/src/components/Navigation.tsx +34 -0
- package/src/components/Panigation/Pagination.tsx +140 -0
- package/src/components/Panigation/cx.js +3 -0
- package/src/components/Panigation/isModifierClick.js +10 -0
- package/src/components/Result.tsx +186 -113
- package/src/components/Saved/AllItem.tsx +32 -0
- package/src/components/Saved/Category.tsx +16 -0
- package/src/components/carousel/DefaultCarousel.tsx +48 -0
- package/src/components/common.d.ts +9 -0
- package/src/components/common.scss +54 -0
- package/src/components/default-select.tsx +45 -0
- package/src/components/hitItem/hits.tsx +50 -0
- package/src/components/hitItem/infinitiHits.tsx +33 -0
- package/src/components/input/inputSearch.tsx +77 -0
- package/src/components/modal/DefaultModal.tsx +28 -0
- package/src/components/preview/preview.tsx +433 -0
- package/src/components/results/ItemResult.tsx +155 -0
- package/src/components/search/ListSearch.tsx +209 -0
- package/src/defaults.ts +4 -3
- package/src/index.css +577 -306
- package/src/index.tsx +39 -187
- package/src/modules/LandingPage/common.scss +1288 -0
- package/src/modules/LandingPage/indexApp.tsx +474 -0
- package/src/modules/LandingPage/indexAppMD.tsx +494 -0
- package/src/modules/LandingPage/indexNewVersion.tsx +118 -0
- package/src/page/Auth/login.tsx +7 -0
- package/src/page/Exception/404.tsx +11 -0
- package/src/page/History/index.tsx +76 -0
- package/src/page/Profile/index.tsx +87 -0
- package/src/page/Saved/MockData.ts +223 -0
- package/src/page/Saved/index.tsx +166 -0
- package/src/page/Support/index.tsx +160 -0
- package/src/page/result/MockData.ts +36 -0
- package/src/page/result/index.tsx +482 -0
- package/src/services/Feedback.ts +65 -0
- package/src/services/findByImage.ts +24 -0
- package/src/services/findRegionsCustom.ts +212 -0
- package/src/services/image.ts +110 -0
- package/src/services/nyris.ts +123 -0
- package/src/services/session.ts +20 -0
- package/src/services/types.ts +96 -0
- package/src/types.ts +43 -3
- package/tsconfig.json +3 -8
- package/build/static/css/2.43a1c8b7.chunk.css +0 -2
- package/build/static/css/2.43a1c8b7.chunk.css.map +0 -1
- package/build/static/css/main.f6ed5f12.chunk.css +0 -2
- package/build/static/css/main.f6ed5f12.chunk.css.map +0 -1
- package/build/static/js/2.a591d52a.chunk.js +0 -3
- package/build/static/js/2.a591d52a.chunk.js.LICENSE.txt +0 -79
- package/build/static/js/2.a591d52a.chunk.js.map +0 -1
- package/build/static/js/main.5a3dcfb4.chunk.js +0 -2
- package/build/static/js/main.5a3dcfb4.chunk.js.map +0 -1
- package/src/AppMD.tsx +0 -320
- package/src/actions/nyrisAppActions.ts +0 -76
- package/src/actions/searchActions.ts +0 -143
- package/src/epics/index.ts +0 -149
- package/src/epics/search.ts +0 -114
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Box, Button, Grid } from "@material-ui/core";
|
|
2
|
+
import DefaultSelect from "components/default-select";
|
|
3
|
+
import React from "react";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
dataFieldOne: any[];
|
|
7
|
+
dataFieldTow: any[];
|
|
8
|
+
dataFieldThree: any[];
|
|
9
|
+
dataFieldFour: any[];
|
|
10
|
+
dataFieldFive: any[];
|
|
11
|
+
dataFieldSix: any[];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function FilterComponent(props: Props) {
|
|
15
|
+
const {
|
|
16
|
+
dataFieldOne,
|
|
17
|
+
dataFieldTow,
|
|
18
|
+
dataFieldThree,
|
|
19
|
+
dataFieldFour,
|
|
20
|
+
dataFieldFive,
|
|
21
|
+
dataFieldSix,
|
|
22
|
+
} = props;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box className="box-main-filter">
|
|
26
|
+
<Grid container>
|
|
27
|
+
<Grid item className="item">
|
|
28
|
+
<DefaultSelect attribute="brand" />
|
|
29
|
+
</Grid>
|
|
30
|
+
<Grid item className="item">
|
|
31
|
+
<DefaultSelect attribute="keyword_0" />
|
|
32
|
+
</Grid>
|
|
33
|
+
|
|
34
|
+
<Grid item className="item-seven text-center">
|
|
35
|
+
<Button
|
|
36
|
+
className="text-btn-small bg-pink text-red"
|
|
37
|
+
style={{ borderRadius: 12 }}
|
|
38
|
+
>
|
|
39
|
+
Clear x
|
|
40
|
+
</Button>
|
|
41
|
+
</Grid>
|
|
42
|
+
</Grid>
|
|
43
|
+
</Box>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default FilterComponent;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { useAppDispatch, useAppSelector } from "Store/Store";
|
|
3
|
+
import Feedback from "components/Feedback";
|
|
4
|
+
import { hideFeedback } from "Store/Nyris";
|
|
5
|
+
|
|
6
|
+
function FooterComponent(): JSX.Element {
|
|
7
|
+
const dispatch = useAppDispatch();
|
|
8
|
+
const searchState = useAppSelector((state) => state);
|
|
9
|
+
const { nyris } = searchState;
|
|
10
|
+
const { feedbackState } = nyris;
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<section className="footnote">
|
|
14
|
+
<div className="wrapper">
|
|
15
|
+
© 2017 - 2019 <a href="https://nyris.io">nyris GmbH</a> - All rights
|
|
16
|
+
reserved - <a href="https://nyris.io/imprint/">Imprint</a>
|
|
17
|
+
</div>
|
|
18
|
+
</section>
|
|
19
|
+
<Feedback
|
|
20
|
+
feedbackState={feedbackState}
|
|
21
|
+
onClose={() => {
|
|
22
|
+
return dispatch(hideFeedback(""));
|
|
23
|
+
}}
|
|
24
|
+
/>
|
|
25
|
+
</>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default FooterComponent;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { makeStyles, Typography, Link } from "@material-ui/core";
|
|
3
|
+
import { useAppSelector } from "Store/Store";
|
|
4
|
+
|
|
5
|
+
const useStyles = makeStyles((theme) => ({
|
|
6
|
+
footer: {
|
|
7
|
+
backgroundColor: theme.palette.background.paper,
|
|
8
|
+
padding: theme.spacing(6),
|
|
9
|
+
},
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
function Copyright() {
|
|
13
|
+
return (
|
|
14
|
+
<Typography variant="body2" color="textSecondary" align="center">
|
|
15
|
+
{"Powered by "}
|
|
16
|
+
<Link
|
|
17
|
+
color="inherit"
|
|
18
|
+
href="https://nyris.io/"
|
|
19
|
+
component="a"
|
|
20
|
+
target="_blank"
|
|
21
|
+
>
|
|
22
|
+
nyris.io
|
|
23
|
+
</Link>
|
|
24
|
+
</Typography>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function FooterMD(): JSX.Element {
|
|
29
|
+
const searchState = useAppSelector((state) => state);
|
|
30
|
+
const { search, nyris } = searchState;
|
|
31
|
+
const { showPart } = nyris;
|
|
32
|
+
const { requestId } = search;
|
|
33
|
+
const classes = useStyles();
|
|
34
|
+
return (
|
|
35
|
+
<footer className={classes.footer}>
|
|
36
|
+
<Typography variant="subtitle1" align="center" color="textSecondary">
|
|
37
|
+
{requestId && showPart === "results" && (
|
|
38
|
+
<div
|
|
39
|
+
style={{
|
|
40
|
+
textAlign: "center",
|
|
41
|
+
fontSize: "0.7em",
|
|
42
|
+
paddingTop: "0.8em",
|
|
43
|
+
}}
|
|
44
|
+
>
|
|
45
|
+
Request identifier {requestId}
|
|
46
|
+
</div>
|
|
47
|
+
)}
|
|
48
|
+
</Typography>
|
|
49
|
+
<Copyright />
|
|
50
|
+
</footer>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default FooterMD;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Box, Grid, Typography } from "@material-ui/core";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Link } from "react-router-dom";
|
|
4
|
+
import TitleOutlinedIcon from "@material-ui/icons/TitleOutlined";
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
search: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function FooterResult(props: Props) {
|
|
11
|
+
const {search} = props;
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Grid
|
|
15
|
+
container
|
|
16
|
+
justifyContent="space-between"
|
|
17
|
+
alignItems="center"
|
|
18
|
+
style={{ height: "100%" }}
|
|
19
|
+
>
|
|
20
|
+
<Grid
|
|
21
|
+
item
|
|
22
|
+
className="item-notify"
|
|
23
|
+
style={{ borderRight: "1px solid #E9E9EC", minWidth: 69 }}
|
|
24
|
+
>
|
|
25
|
+
<Typography className="text-f8 text-center">
|
|
26
|
+
{search.results.length} results
|
|
27
|
+
</Typography>
|
|
28
|
+
</Grid>
|
|
29
|
+
<Grid item className="item-notify">
|
|
30
|
+
<Typography className="text-f8 text-center">
|
|
31
|
+
Didn’t find what you were looking for? Share your search with our{" "}
|
|
32
|
+
<Link to={"#"}>product experts</Link>.
|
|
33
|
+
</Typography>
|
|
34
|
+
</Grid>
|
|
35
|
+
<Grid item className="item-notify" style={{ minWidth: 32 }}>
|
|
36
|
+
<Typography className="text-f8">
|
|
37
|
+
<Box>
|
|
38
|
+
<TitleOutlinedIcon style={{ color: "#55566B", fontSize: 8 }} />
|
|
39
|
+
<TitleOutlinedIcon style={{ color: "#55566B", fontSize: 10 }} />
|
|
40
|
+
</Box>
|
|
41
|
+
</Typography>
|
|
42
|
+
</Grid>
|
|
43
|
+
</Grid>
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default FooterResult;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
function HeaderComponent(): JSX.Element {
|
|
4
|
+
return (
|
|
5
|
+
<div className="navWrap">
|
|
6
|
+
<div className="wrapper" style={{ padding: 0 }}>
|
|
7
|
+
<section id="branding" />
|
|
8
|
+
<div id="menu" className="menuWrap" role="navigation">
|
|
9
|
+
<ul>
|
|
10
|
+
<li>
|
|
11
|
+
<a
|
|
12
|
+
href="https://nyris.io/imprint/#privacy"
|
|
13
|
+
target="_blank"
|
|
14
|
+
rel="noopener noreferrer"
|
|
15
|
+
>
|
|
16
|
+
Privacy Policy
|
|
17
|
+
</a>
|
|
18
|
+
</li>
|
|
19
|
+
<li>
|
|
20
|
+
<a
|
|
21
|
+
href="https://nyris.io/"
|
|
22
|
+
target="_blank"
|
|
23
|
+
rel="noopener noreferrer"
|
|
24
|
+
>
|
|
25
|
+
Visit our Website
|
|
26
|
+
</a>
|
|
27
|
+
</li>
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default HeaderComponent;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Container, Toolbar, Typography, AppBar } from "@material-ui/core";
|
|
3
|
+
import { defaultMdSettings } from "defaults";
|
|
4
|
+
import { useAppSelector } from "Store/Store";
|
|
5
|
+
interface Props {
|
|
6
|
+
settings: any;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function HeaderMdComponent(): JSX.Element {
|
|
10
|
+
const { settings } = useAppSelector((state: any) => state);
|
|
11
|
+
const { themePage } = settings;
|
|
12
|
+
const mdSettings: any = themePage.materialDesign.active
|
|
13
|
+
? themePage.materialDesign.materialDesign
|
|
14
|
+
: defaultMdSettings;
|
|
15
|
+
return (
|
|
16
|
+
<AppBar
|
|
17
|
+
position={"relative"}
|
|
18
|
+
style={{ backgroundColor: mdSettings.appBarCustomBackgroundColor }}
|
|
19
|
+
>
|
|
20
|
+
<Container
|
|
21
|
+
maxWidth="md"
|
|
22
|
+
style={{ flexDirection: "row", display: "flex" }}
|
|
23
|
+
>
|
|
24
|
+
<img
|
|
25
|
+
src={mdSettings.appBarLogoUrl}
|
|
26
|
+
style={{ height: "2em", minHeight: "64px", display: "flex" }}
|
|
27
|
+
alt="Logo"
|
|
28
|
+
/>
|
|
29
|
+
<Toolbar component="span">
|
|
30
|
+
<Typography style={{ color: mdSettings.appBarCustomTextColor }}>
|
|
31
|
+
{mdSettings.appBarTitle}
|
|
32
|
+
</Typography>
|
|
33
|
+
</Toolbar>
|
|
34
|
+
</Container>
|
|
35
|
+
</AppBar>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default HeaderMdComponent;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { Box, Grid } from "@material-ui/core";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { NavLink } from "react-router-dom";
|
|
4
|
+
import "./common.scss";
|
|
5
|
+
import IconReLoad from "common/assets/icons/reload_icon.svg";
|
|
6
|
+
import IconSave from "common/assets/icons/save_search.svg";
|
|
7
|
+
import IconSupport from "common/assets/icons/support.svg";
|
|
8
|
+
import IconAdmin from "common/assets/icons/admin.svg";
|
|
9
|
+
import LogoNyris from "common/assets/icons/nyris_logo.svg";
|
|
10
|
+
function HeaderNewVersion(): JSX.Element {
|
|
11
|
+
const handleCheckMatchLink = (match: any, location: any) => {
|
|
12
|
+
let active = false;
|
|
13
|
+
if (match?.url === location.pathname) {
|
|
14
|
+
active = true;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return active;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Box className="box-content" display={"flex"}>
|
|
22
|
+
<NavLink to="/" style={{ lineHeight: 0 }}>
|
|
23
|
+
{/* <section id="branding" style={{ height: 32 }} /> */}
|
|
24
|
+
<img width={74} height={19} src={`${LogoNyris}`} alt="nyris logo" />
|
|
25
|
+
</NavLink>
|
|
26
|
+
<Grid container className="nav-menu">
|
|
27
|
+
<Grid item className="item-nav">
|
|
28
|
+
<NavLink
|
|
29
|
+
activeClassName="active"
|
|
30
|
+
isActive={(match, location) =>
|
|
31
|
+
handleCheckMatchLink(match, location)
|
|
32
|
+
}
|
|
33
|
+
to={"/search-history"}
|
|
34
|
+
className="nav-link p-0 menu-children rounded-0"
|
|
35
|
+
>
|
|
36
|
+
<span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
|
|
37
|
+
Search history
|
|
38
|
+
<img width={10} height={10} src={`${IconReLoad}`} alt=""/>
|
|
39
|
+
</span>
|
|
40
|
+
</NavLink>
|
|
41
|
+
</Grid>
|
|
42
|
+
<Grid item className="item-nav">
|
|
43
|
+
<NavLink
|
|
44
|
+
activeClassName="active"
|
|
45
|
+
isActive={(match, location) =>
|
|
46
|
+
handleCheckMatchLink(match, location)
|
|
47
|
+
}
|
|
48
|
+
to={"/saved"}
|
|
49
|
+
className="nav-link p-0 menu-children rounded-0"
|
|
50
|
+
>
|
|
51
|
+
<span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
|
|
52
|
+
Saved
|
|
53
|
+
<img width={10} height={10} src={`${IconSave}`} alt=""/>
|
|
54
|
+
</span>
|
|
55
|
+
</NavLink>
|
|
56
|
+
</Grid>
|
|
57
|
+
<Grid item className="item-nav">
|
|
58
|
+
<NavLink
|
|
59
|
+
activeClassName="active"
|
|
60
|
+
isActive={(match, location) =>
|
|
61
|
+
handleCheckMatchLink(match, location)
|
|
62
|
+
}
|
|
63
|
+
to={"/support"}
|
|
64
|
+
className="nav-link p-0 menu-children rounded-0"
|
|
65
|
+
>
|
|
66
|
+
<span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
|
|
67
|
+
Support
|
|
68
|
+
<img width={10} height={10} src={`${IconSupport}`} alt="" />
|
|
69
|
+
</span>
|
|
70
|
+
</NavLink>
|
|
71
|
+
</Grid>
|
|
72
|
+
<Grid item className="item-nav">
|
|
73
|
+
<NavLink
|
|
74
|
+
activeClassName="active"
|
|
75
|
+
isActive={(match, location) =>
|
|
76
|
+
handleCheckMatchLink(match, location)
|
|
77
|
+
}
|
|
78
|
+
to={"/account"}
|
|
79
|
+
className="nav-link p-0 menu-children rounded-0"
|
|
80
|
+
>
|
|
81
|
+
<span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
|
|
82
|
+
My Account
|
|
83
|
+
<img width={10} height={10} src={`${IconAdmin}`} alt=""/>
|
|
84
|
+
</span>
|
|
85
|
+
</NavLink>
|
|
86
|
+
</Grid>
|
|
87
|
+
</Grid>
|
|
88
|
+
</Box>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export default HeaderNewVersion;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNode } from "components/common";
|
|
3
|
+
import "./common.scss";
|
|
4
|
+
import HeaderComponent from "./Header";
|
|
5
|
+
import FooterComponent from "./Footer";
|
|
6
|
+
import { useAppSelector } from "Store/Store";
|
|
7
|
+
import HeaderMdComponent from "./HeaderMd";
|
|
8
|
+
import FooterMD from "./FooterMD";
|
|
9
|
+
import HeaderNewVersion from "./HeaderNewVersion";
|
|
10
|
+
import FooterNewVersion from "./FooterNewVersion";
|
|
11
|
+
import {AppState} from "../types";
|
|
12
|
+
function Layout({ children }: ReactNode): JSX.Element {
|
|
13
|
+
const { settings } = useAppSelector<AppState>((state:any) => state);
|
|
14
|
+
const { themePage } = settings;
|
|
15
|
+
|
|
16
|
+
let HeaderApp: any;
|
|
17
|
+
let FooterApp: any;
|
|
18
|
+
let classNameBoxVersion: string = "newVersion";
|
|
19
|
+
if (themePage.default?.active) {
|
|
20
|
+
classNameBoxVersion = "default";
|
|
21
|
+
HeaderApp = HeaderComponent;
|
|
22
|
+
FooterApp = FooterComponent;
|
|
23
|
+
} else if (themePage.materialDesign?.active) {
|
|
24
|
+
classNameBoxVersion = "materialDesign";
|
|
25
|
+
HeaderApp = HeaderMdComponent;
|
|
26
|
+
FooterApp = FooterMD;
|
|
27
|
+
} else {
|
|
28
|
+
HeaderApp = HeaderNewVersion;
|
|
29
|
+
FooterApp = FooterNewVersion;
|
|
30
|
+
}
|
|
31
|
+
return (
|
|
32
|
+
<div className={`layout-main-${classNameBoxVersion}`}>
|
|
33
|
+
<div className={`box-header-${classNameBoxVersion}-main`}>
|
|
34
|
+
<HeaderApp />
|
|
35
|
+
</div>
|
|
36
|
+
<div className={`box-body-${classNameBoxVersion}-wrap-main`}>
|
|
37
|
+
{children}
|
|
38
|
+
</div>
|
|
39
|
+
<div className="footer-wrap-main">
|
|
40
|
+
<FooterApp />
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default Layout;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Box } from "@material-ui/core";
|
|
3
|
+
import { connectStateResults } from "react-instantsearch-dom";
|
|
4
|
+
|
|
5
|
+
function LoadingScreen({
|
|
6
|
+
searchState,
|
|
7
|
+
searchResults,
|
|
8
|
+
children,
|
|
9
|
+
isSearchStalled,
|
|
10
|
+
searchingForFacetValues,
|
|
11
|
+
searching,
|
|
12
|
+
}: any) {
|
|
13
|
+
const [isLoading] = useState<boolean>(false);
|
|
14
|
+
// const hasResults = searchResults && searchResults.nbHits !== 0;
|
|
15
|
+
|
|
16
|
+
// useEffect(() => {
|
|
17
|
+
// if (searching) {
|
|
18
|
+
// return;
|
|
19
|
+
// } else {
|
|
20
|
+
// setLoading(true);
|
|
21
|
+
// setTimeout(() => {
|
|
22
|
+
// setLoading(false);
|
|
23
|
+
// }, 1000);
|
|
24
|
+
// }
|
|
25
|
+
// }, [searching, searchResults]);
|
|
26
|
+
console.log("searchResults", searchResults);
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<>
|
|
30
|
+
{isLoading && (
|
|
31
|
+
<Box className="box-wrap-loading">
|
|
32
|
+
<Box className="loadingSpinCT">
|
|
33
|
+
<Box className="box-content-spin"></Box>
|
|
34
|
+
</Box>
|
|
35
|
+
</Box>
|
|
36
|
+
)}
|
|
37
|
+
{children}
|
|
38
|
+
</>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
const LoadingScreenCustom = connectStateResults(LoadingScreen);
|
|
42
|
+
export default LoadingScreenCustom;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { NavLink } from "react-router-dom";
|
|
3
|
+
// import * as H from "history";
|
|
4
|
+
|
|
5
|
+
function Navigation(): JSX.Element {
|
|
6
|
+
// const handleCheckMatchLink = (match: any, location: H.Location) => {
|
|
7
|
+
// if (match?.url === location?.pathname) {
|
|
8
|
+
// return true;
|
|
9
|
+
// }
|
|
10
|
+
// return false;
|
|
11
|
+
// };
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<ul className="d-flex align-center">
|
|
15
|
+
<li>
|
|
16
|
+
<NavLink
|
|
17
|
+
activeClassName="active"
|
|
18
|
+
// isActive={(match, location: H.Location) => {
|
|
19
|
+
// return handleCheckMatchLink(match, location);
|
|
20
|
+
// }}
|
|
21
|
+
isActive={() => false}
|
|
22
|
+
to={"/search-history"}
|
|
23
|
+
className="nav-link p-0 menu-children rounded-0"
|
|
24
|
+
>
|
|
25
|
+
<span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
|
|
26
|
+
Search history
|
|
27
|
+
</span>
|
|
28
|
+
</NavLink>
|
|
29
|
+
</li>
|
|
30
|
+
</ul>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default Navigation;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { usePagination, UsePaginationProps } from 'react-instantsearch-hooks';
|
|
3
|
+
import { cx } from './cx';
|
|
4
|
+
import { isModifierClick } from './isModifierClick';
|
|
5
|
+
|
|
6
|
+
export type PaginationProps = React.ComponentProps<'div'> & UsePaginationProps;
|
|
7
|
+
|
|
8
|
+
export function PaginationComponent(props: PaginationProps) {
|
|
9
|
+
const {
|
|
10
|
+
refine,
|
|
11
|
+
createURL,
|
|
12
|
+
pages,
|
|
13
|
+
currentRefinement,
|
|
14
|
+
isFirstPage,
|
|
15
|
+
isLastPage,
|
|
16
|
+
nbPages,
|
|
17
|
+
canRefine,
|
|
18
|
+
} = usePagination(props);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div
|
|
22
|
+
className={cx(
|
|
23
|
+
'ais-Pagination',
|
|
24
|
+
canRefine === false && 'ais-Pagination--noRefinement',
|
|
25
|
+
props.className
|
|
26
|
+
)}
|
|
27
|
+
>
|
|
28
|
+
<ul className="ais-Pagination-list">
|
|
29
|
+
<PaginationItem
|
|
30
|
+
aria-label="First"
|
|
31
|
+
value={0}
|
|
32
|
+
isDisabled={isFirstPage}
|
|
33
|
+
createURL={createURL}
|
|
34
|
+
refine={refine}
|
|
35
|
+
className={cx(
|
|
36
|
+
'ais-Pagination-item',
|
|
37
|
+
'ais-Pagination-item--firstPage'
|
|
38
|
+
)}
|
|
39
|
+
>
|
|
40
|
+
‹‹
|
|
41
|
+
</PaginationItem>
|
|
42
|
+
|
|
43
|
+
<PaginationItem
|
|
44
|
+
aria-label="Previous"
|
|
45
|
+
value={currentRefinement - 1}
|
|
46
|
+
isDisabled={isFirstPage}
|
|
47
|
+
createURL={createURL}
|
|
48
|
+
refine={refine}
|
|
49
|
+
className={cx(
|
|
50
|
+
'ais-Pagination-item',
|
|
51
|
+
'ais-Pagination-item--previousPage'
|
|
52
|
+
)}
|
|
53
|
+
>
|
|
54
|
+
‹
|
|
55
|
+
</PaginationItem>
|
|
56
|
+
|
|
57
|
+
{pages.map((page) => (
|
|
58
|
+
<PaginationItem
|
|
59
|
+
key={page}
|
|
60
|
+
aria-label={String(page)}
|
|
61
|
+
value={page}
|
|
62
|
+
isDisabled={false}
|
|
63
|
+
createURL={createURL}
|
|
64
|
+
refine={refine}
|
|
65
|
+
className={cx(
|
|
66
|
+
'ais-Pagination-item',
|
|
67
|
+
page === currentRefinement && 'ais-Pagination-item--selected'
|
|
68
|
+
)}
|
|
69
|
+
>
|
|
70
|
+
{page + 1}
|
|
71
|
+
</PaginationItem>
|
|
72
|
+
))}
|
|
73
|
+
|
|
74
|
+
<PaginationItem
|
|
75
|
+
aria-label="Next"
|
|
76
|
+
value={currentRefinement + 1}
|
|
77
|
+
isDisabled={isLastPage}
|
|
78
|
+
createURL={createURL}
|
|
79
|
+
refine={refine}
|
|
80
|
+
className={cx('ais-Pagination-item', 'ais-Pagination-item--nextPage')}
|
|
81
|
+
>
|
|
82
|
+
›
|
|
83
|
+
</PaginationItem>
|
|
84
|
+
|
|
85
|
+
<PaginationItem
|
|
86
|
+
aria-label="Last"
|
|
87
|
+
value={nbPages - 1}
|
|
88
|
+
isDisabled={isLastPage}
|
|
89
|
+
createURL={createURL}
|
|
90
|
+
refine={refine}
|
|
91
|
+
className={cx('ais-Pagination-item', 'ais-Pagination-item--lastPage')}
|
|
92
|
+
>
|
|
93
|
+
››
|
|
94
|
+
</PaginationItem>
|
|
95
|
+
</ul>
|
|
96
|
+
</div>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
type PaginationItemProps = React.ComponentProps<'a'> &
|
|
101
|
+
Pick<ReturnType<typeof usePagination>, 'refine' | 'createURL'> & {
|
|
102
|
+
isDisabled: boolean;
|
|
103
|
+
value: number;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
function PaginationItem(props: PaginationItemProps) {
|
|
107
|
+
const { isDisabled, className, href, value, createURL, refine, ...rest } =
|
|
108
|
+
props;
|
|
109
|
+
|
|
110
|
+
if (isDisabled) {
|
|
111
|
+
return (
|
|
112
|
+
<li className={cx(className, 'ais-Pagination-item--disabled')}>
|
|
113
|
+
<span className="ais-Pagination-link" {...rest} />
|
|
114
|
+
</li>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<li className={className}>
|
|
120
|
+
<a
|
|
121
|
+
className="ais-Pagination-link"
|
|
122
|
+
href={createURL(value)}
|
|
123
|
+
onClick={(event) => {
|
|
124
|
+
// We let the browser handle the native event when the click is modified
|
|
125
|
+
// (with a special mouse event or with a combination key) for accessibility
|
|
126
|
+
// purposes. For example, clicking the link while holding the Control
|
|
127
|
+
// key opens the next search state link in a new tab, but doesn't refine
|
|
128
|
+
// the search state in the current tab.
|
|
129
|
+
if (isModifierClick(event)) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
event.preventDefault();
|
|
134
|
+
refine(value);
|
|
135
|
+
}}
|
|
136
|
+
{...rest}
|
|
137
|
+
/>
|
|
138
|
+
</li>
|
|
139
|
+
);
|
|
140
|
+
}
|