@nyris/nyris-webapp 0.2.6 → 0.3.3

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.
Files changed (200) hide show
  1. package/build/asset-manifest.json +32 -18
  2. package/build/index.html +1 -1
  3. package/build/js/test.js +56 -0
  4. package/build/{precache-manifest.aa7c9d32340f77d86c9a3347b54ba2a5.js → precache-manifest.01ce682577e62add75aa397b2a944b75.js} +89 -13
  5. package/build/service-worker.js +1 -1
  6. package/build/static/css/2.8285176a.chunk.css +2 -0
  7. package/build/static/css/2.8285176a.chunk.css.map +1 -0
  8. package/build/static/css/main.6676fe1f.chunk.css +2 -0
  9. package/build/static/css/main.6676fe1f.chunk.css.map +1 -0
  10. package/build/static/js/2.d1562c08.chunk.js +3 -0
  11. package/build/static/js/2.d1562c08.chunk.js.LICENSE.txt +133 -0
  12. package/build/static/js/2.d1562c08.chunk.js.map +1 -0
  13. package/build/static/js/main.5c08aba4.chunk.js +2 -0
  14. package/build/static/js/main.5c08aba4.chunk.js.map +1 -0
  15. package/build/static/js/{runtime-main.f5553a9b.js → runtime-main.b418ff16.js} +1 -1
  16. package/build/static/js/{runtime-main.f5553a9b.js.map → runtime-main.b418ff16.js.map} +1 -1
  17. package/build/static/media/Fill.37094b44.svg +3 -0
  18. package/build/static/media/Montserrat-Bold.5a052e98.otf +0 -0
  19. package/build/static/media/Montserrat-Light.21789e89.otf +0 -0
  20. package/build/static/media/Montserrat-Medium.a53e0373.otf +0 -0
  21. package/build/static/media/Montserrat-Regular.71cdc681.otf +0 -0
  22. package/build/static/media/Montserrat-SemiBold.f613d915.otf +0 -0
  23. package/build/static/media/Rectangle.4dd8b747.png +0 -0
  24. package/build/static/media/admin.9529c7f6.svg +3 -0
  25. package/build/static/media/bg-support-page.6ac55268.svg +9 -0
  26. package/build/static/media/book_mark.8e294c0b.svg +3 -0
  27. package/build/static/media/icon_dislike.94607ca6.svg +3 -0
  28. package/build/static/media/icon_like.a4fb1b18.svg +3 -0
  29. package/build/static/media/icon_modal_image.3068d0ea.svg +21 -0
  30. package/build/static/media/icon_search_image.c2c728c0.svg +3 -0
  31. package/build/static/media/nyris_logo.22d8f250.svg +3 -0
  32. package/build/static/media/reload_icon.4b579a74.svg +3 -0
  33. package/build/static/media/save_search.bebaeebf.svg +3 -0
  34. package/build/static/media/support.289c3a3c.svg +3 -0
  35. package/build/static/media/translate_icon.f0492297.svg +3 -0
  36. package/package.json +30 -6
  37. package/public/js/test.js +56 -0
  38. package/src/App.css +27 -11
  39. package/src/App.tsx +19 -235
  40. package/src/Router.tsx +97 -0
  41. package/src/Store/Auth.ts +44 -0
  42. package/src/Store/Nyris.ts +77 -0
  43. package/src/Store/Search.ts +269 -0
  44. package/src/Store/Store.ts +46 -0
  45. package/src/Store/common.d.ts +10 -0
  46. package/src/{epics → Store/epics}/feedback.ts +0 -0
  47. package/src/{epics → Store/epics}/types.ts +1 -1
  48. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Bold.otf +0 -0
  49. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Light.otf +0 -0
  50. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Medium.otf +0 -0
  51. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-Regular.otf +0 -0
  52. package/src/common/assets/fonts/Montserrat_OTF/Montserrat-SemiBold.otf +0 -0
  53. package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff +0 -0
  54. package/src/{fonts → common/assets/fonts}/roboto-bold-webfont.woff2 +0 -0
  55. package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff +0 -0
  56. package/src/{fonts → common/assets/fonts}/roboto-italic-webfont.woff2 +0 -0
  57. package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff +0 -0
  58. package/src/{fonts → common/assets/fonts}/roboto-regular-webfont.woff2 +0 -0
  59. package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff +0 -0
  60. package/src/{fonts → common/assets/fonts}/robotocondensed-bold-webfont.woff2 +0 -0
  61. package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff +0 -0
  62. package/src/{fonts → common/assets/fonts}/robotocondensed-bolditalic-webfont.woff2 +0 -0
  63. package/src/common/assets/icons/Fill.png +0 -0
  64. package/src/common/assets/icons/Fill.svg +3 -0
  65. package/src/common/assets/icons/Icon_wechat.png +0 -0
  66. package/src/common/assets/icons/Icon_whatsapp.png +0 -0
  67. package/src/common/assets/icons/admin.png +0 -0
  68. package/src/common/assets/icons/admin.svg +3 -0
  69. package/src/common/assets/icons/book_mark.png +0 -0
  70. package/src/common/assets/icons/book_mark.svg +3 -0
  71. package/src/common/assets/icons/icon_barcode.png +0 -0
  72. package/src/common/assets/icons/icon_camera.png +0 -0
  73. package/src/common/assets/icons/icon_dislike.svg +3 -0
  74. package/src/common/assets/icons/icon_disslike.png +0 -0
  75. package/src/common/assets/icons/icon_email.png +0 -0
  76. package/src/common/assets/icons/icon_like.png +0 -0
  77. package/src/common/assets/icons/icon_like.svg +3 -0
  78. package/src/common/assets/icons/icon_modal_image.png +0 -0
  79. package/src/common/assets/icons/icon_modal_image.svg +21 -0
  80. package/src/common/assets/icons/icon_picture.png +0 -0
  81. package/src/common/assets/icons/icon_search_image.png +0 -0
  82. package/src/common/assets/icons/icon_search_image.svg +3 -0
  83. package/src/common/assets/icons/nyris_logo.svg +3 -0
  84. package/src/common/assets/icons/reload_icon.png +0 -0
  85. package/src/common/assets/icons/reload_icon.svg +3 -0
  86. package/src/common/assets/icons/save_search.png +0 -0
  87. package/src/common/assets/icons/save_search.svg +3 -0
  88. package/src/common/assets/icons/setting_search_icon.png +0 -0
  89. package/src/common/assets/icons/support.png +0 -0
  90. package/src/common/assets/icons/support.svg +3 -0
  91. package/src/common/assets/icons/translate_icon.png +0 -0
  92. package/src/common/assets/icons/translate_icon.svg +3 -0
  93. package/src/common/assets/icons/view_off.png +0 -0
  94. package/src/common/assets/images/Rectangle.png +0 -0
  95. package/src/common/assets/images/bg-support-page.svg +9 -0
  96. package/src/{images → common/assets/images}/fav/android-icon-192x192.png +0 -0
  97. package/src/{images → common/assets/images}/fav/apple-icon-114x114.png +0 -0
  98. package/src/{images → common/assets/images}/fav/apple-icon-120x120.png +0 -0
  99. package/src/{images → common/assets/images}/fav/apple-icon-144x144.png +0 -0
  100. package/src/{images → common/assets/images}/fav/apple-icon-152x152.png +0 -0
  101. package/src/{images → common/assets/images}/fav/apple-icon-180x180.png +0 -0
  102. package/src/{images → common/assets/images}/fav/apple-icon-57x57.png +0 -0
  103. package/src/{images → common/assets/images}/fav/apple-icon-60x60.png +0 -0
  104. package/src/{images → common/assets/images}/fav/apple-icon-72x72.png +0 -0
  105. package/src/{images → common/assets/images}/fav/apple-icon-76x76.png +0 -0
  106. package/src/{images → common/assets/images}/fav/browserconfig.xml +0 -0
  107. package/src/{images → common/assets/images}/fav/favicon-16x16.png +0 -0
  108. package/src/{images → common/assets/images}/fav/favicon-32x32.png +0 -0
  109. package/src/{images → common/assets/images}/fav/favicon-96x96.png +0 -0
  110. package/src/{images → common/assets/images}/fav/manifest.json +0 -0
  111. package/src/{images → common/assets/images}/ic_cam.png +0 -0
  112. package/src/{images → common/assets/images}/ic_cam.svg +0 -0
  113. package/src/{images → common/assets/images}/ic_cam_large.png +0 -0
  114. package/src/{images → common/assets/images}/ic_cam_large.svg +0 -0
  115. package/src/{images → common/assets/images}/ic_cam_large_noimage.png +0 -0
  116. package/src/{images → common/assets/images}/ic_close_feedback.png +0 -0
  117. package/src/{images → common/assets/images}/ic_close_feedback.svg +0 -0
  118. package/src/{images → common/assets/images}/ic_shopNow.png +0 -0
  119. package/src/{images → common/assets/images}/ic_shopNow.svg +0 -0
  120. package/src/{images → common/assets/images}/ic_shopNowLight.png +0 -0
  121. package/src/{images → common/assets/images}/ic_shopNowLight.svg +0 -0
  122. package/src/common/assets/images/image_test.png +0 -0
  123. package/src/{images → common/assets/images}/nyris_logo.png +0 -0
  124. package/src/{images → common/assets/images}/rewe.svg +0 -0
  125. package/src/{images → common/assets/images}/sectionTransBack.png +0 -0
  126. package/src/{images → common/assets/images}/sectionTransBack.svg +0 -0
  127. package/src/{images → common/assets/images}/sectionTransTop.png +0 -0
  128. package/src/{images → common/assets/images}/sectionTransTop.svg +0 -0
  129. package/src/components/CustomHits/index.tsx +57 -0
  130. package/src/components/DetailItem.tsx +175 -0
  131. package/src/components/DragDropFile.tsx +188 -0
  132. package/src/components/ExampleImages.tsx +32 -17
  133. package/src/components/Feedback.tsx +87 -48
  134. package/src/components/FilterComponent.tsx +33 -0
  135. package/src/components/Footer.tsx +29 -0
  136. package/src/components/FooterMD.tsx +54 -0
  137. package/src/components/FooterNewVersion.tsx +12 -0
  138. package/src/components/FooterResult.tsx +47 -0
  139. package/src/components/Header.tsx +35 -0
  140. package/src/components/HeaderMd.tsx +39 -0
  141. package/src/components/HeaderNewVersion.tsx +92 -0
  142. package/src/components/Layout.tsx +46 -0
  143. package/src/components/LoadingScreen/index.tsx +29 -0
  144. package/src/components/Navigation.tsx +34 -0
  145. package/src/components/Panigation/Pagination.tsx +140 -0
  146. package/src/components/Panigation/cx.js +3 -0
  147. package/src/components/Panigation/isModifierClick.js +10 -0
  148. package/src/components/Result.tsx +186 -113
  149. package/src/components/Saved/AllItem.tsx +32 -0
  150. package/src/components/Saved/Category.tsx +16 -0
  151. package/src/components/carousel/DefaultCarousel.tsx +48 -0
  152. package/src/components/common.d.ts +9 -0
  153. package/src/components/common.scss +54 -0
  154. package/src/components/default-select.tsx +44 -0
  155. package/src/components/hitItem/hits.tsx +50 -0
  156. package/src/components/hitItem/infinitiHits.tsx +33 -0
  157. package/src/components/input/inputSearch.tsx +77 -0
  158. package/src/components/modal/DefaultModal.tsx +28 -0
  159. package/src/components/preview/preview.tsx +433 -0
  160. package/src/components/results/ItemResult.tsx +155 -0
  161. package/src/components/search/ListSearch.tsx +209 -0
  162. package/src/defaults.ts +4 -3
  163. package/src/index.css +577 -306
  164. package/src/index.tsx +39 -187
  165. package/src/modules/LandingPage/common.scss +1304 -0
  166. package/src/modules/LandingPage/indexApp.tsx +492 -0
  167. package/src/modules/LandingPage/indexAppMD.tsx +501 -0
  168. package/src/modules/LandingPage/indexNewVersion.tsx +117 -0
  169. package/src/page/Auth/login.tsx +7 -0
  170. package/src/page/Exception/404.tsx +11 -0
  171. package/src/page/History/index.tsx +76 -0
  172. package/src/page/Profile/index.tsx +87 -0
  173. package/src/page/Saved/MockData.ts +223 -0
  174. package/src/page/Saved/index.tsx +166 -0
  175. package/src/page/Support/index.tsx +160 -0
  176. package/src/page/result/MockData.ts +36 -0
  177. package/src/page/result/index.tsx +473 -0
  178. package/src/services/Feedback.ts +65 -0
  179. package/src/services/findByImage.ts +24 -0
  180. package/src/services/findRegionsCustom.ts +212 -0
  181. package/src/services/image.ts +110 -0
  182. package/src/services/nyris.ts +123 -0
  183. package/src/services/session.ts +20 -0
  184. package/src/services/types.ts +96 -0
  185. package/src/types.ts +43 -3
  186. package/tsconfig.json +3 -8
  187. package/build/static/css/2.43a1c8b7.chunk.css +0 -2
  188. package/build/static/css/2.43a1c8b7.chunk.css.map +0 -1
  189. package/build/static/css/main.f6ed5f12.chunk.css +0 -2
  190. package/build/static/css/main.f6ed5f12.chunk.css.map +0 -1
  191. package/build/static/js/2.a591d52a.chunk.js +0 -3
  192. package/build/static/js/2.a591d52a.chunk.js.LICENSE.txt +0 -79
  193. package/build/static/js/2.a591d52a.chunk.js.map +0 -1
  194. package/build/static/js/main.5a3dcfb4.chunk.js +0 -2
  195. package/build/static/js/main.5a3dcfb4.chunk.js.map +0 -1
  196. package/src/AppMD.tsx +0 -320
  197. package/src/actions/nyrisAppActions.ts +0 -76
  198. package/src/actions/searchActions.ts +0 -143
  199. package/src/epics/index.ts +0 -149
  200. package/src/epics/search.ts +0 -114
@@ -1,55 +1,94 @@
1
- import React from 'react';
2
- import {NyrisFeedbackState} from "../actions/nyrisAppActions";
3
- import {Animate} from "react-move";
4
-
1
+ import { useAppDispatch, useAppSelector } from "Store/Store";
2
+ import {
3
+ feedbackNegative,
4
+ feedbackSubmitPositive,
5
+ NyrisFeedbackState,
6
+ } from "Store/Nyris";
7
+ import React from "react";
8
+ import { Animate } from "react-move";
9
+ import { feedbackSuccessEpic } from "services/Feedback";
5
10
  interface FeedbackProps {
6
- feedbackState: NyrisFeedbackState,
7
- onPositiveFeedback?: () => void,
8
- onNegativeFeedback?: () => void,
9
- onClose?: () => void
11
+ feedbackState: NyrisFeedbackState;
12
+ onClose?: () => void;
10
13
  }
11
14
 
12
- const Feedback: React.FC<FeedbackProps> = ({feedbackState, onPositiveFeedback, onNegativeFeedback, onClose}) => {
13
- let inner : any = null;
14
- switch (feedbackState) {
15
- case 'question':
16
- inner =
17
- <div className="feedbackForm">
18
- <p>Did you find what you were looking for?</p>
19
- <div className="btn primary positiveFeedback" onClick={onPositiveFeedback}>Yes</div>
20
- <div className="btn secondary negativeFeedback" onClick={onNegativeFeedback}>No</div>
21
- </div>;
22
- break;
23
- case 'positive':
24
- inner = <div className="feedbackMessage positive">Great, thank you for your feedback!</div>
25
- break;
26
- case 'negative':
27
- inner =
28
- <div className="feedbackMessage negative">We saved your request so we can track down the
29
- issue and improve the search experience. Your Feedback helps us to make our service
30
- better for everyone,
31
- thank you!<br/>
32
- <div className="btn dismiss" onClick={onClose}>Dismiss</div>
33
- </div>;
34
- break;
35
- default:
36
- inner = null;
37
- break;
15
+ const Feedback: React.FC<FeedbackProps> = ({ feedbackState, onClose }) => {
16
+ let inner: any = null;
17
+ const state = useAppSelector((state) => state);
18
+ const dispatch = useAppDispatch();
19
+ const onPositiveFeedback = (data: boolean) => {
20
+ feedbackSuccessEpic(state, data);
21
+ if (data) {
22
+ dispatch(feedbackSubmitPositive(""));
23
+ } else {
24
+ dispatch(feedbackNegative(""));
38
25
  }
39
- return (
40
- <Animate show={feedbackState !== 'hidden'} start={{y: 100, opacity: 0}} enter={{y: [0], opacity: [1]}} leave={{y: [100], opacity: [0] }}>
41
- {({y, opacity}) =>
42
- <section className="feedback" style={{transform: `translateY(${y}%)`, opacity }}>
43
- <div className="wrapper">
44
- {inner}
45
- </div>
46
- <div className="closeFeedbackContainer">
47
- <div className="closeFeedback" onClick={onClose}/>
48
- </div>
49
- </section>
50
- }
51
- </Animate>
52
- );
26
+ };
27
+
28
+ switch (feedbackState) {
29
+ case "question":
30
+ inner = (
31
+ <div className="feedbackForm">
32
+ <p>Did you find what you were looking for?</p>
33
+ <div
34
+ className="btn primary positiveFeedback"
35
+ onClick={() => onPositiveFeedback(true)}
36
+ >
37
+ Yes
38
+ </div>
39
+ <div
40
+ className="btn secondary negativeFeedback"
41
+ onClick={() => onPositiveFeedback(false)}
42
+ >
43
+ No
44
+ </div>
45
+ </div>
46
+ );
47
+ break;
48
+ case "positive":
49
+ inner = (
50
+ <div className="feedbackMessage positive">
51
+ Great, thank you for your feedback!
52
+ </div>
53
+ );
54
+ break;
55
+ case "negative":
56
+ inner = (
57
+ <div className="feedbackMessage negative">
58
+ We saved your request so we can track down the issue and improve the
59
+ search experience. Your Feedback helps us to make our service better
60
+ for everyone, thank you!
61
+ <br />
62
+ <div className="btn dismiss" onClick={onClose}>
63
+ Dismiss
64
+ </div>
65
+ </div>
66
+ );
67
+ break;
68
+ default:
69
+ inner = null;
70
+ break;
71
+ }
72
+ return (
73
+ <Animate
74
+ show={feedbackState !== "hidden"}
75
+ start={{ y: 100, opacity: 0 }}
76
+ enter={{ y: [0], opacity: [1] }}
77
+ leave={{ y: [100], opacity: [0] }}
78
+ >
79
+ {({ y, opacity }) => (
80
+ <section
81
+ className="feedback"
82
+ style={{ transform: `translateY(${y}%)`, opacity }}
83
+ >
84
+ <div className="wrapper">{inner}</div>
85
+ <div className="closeFeedbackContainer">
86
+ <div className="closeFeedback" onClick={onClose} />
87
+ </div>
88
+ </section>
89
+ )}
90
+ </Animate>
91
+ );
53
92
  };
54
93
 
55
94
  export default Feedback;
@@ -0,0 +1,33 @@
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
+
7
+ function FilterComponent(props: Props) {
8
+ const {} = props;
9
+
10
+ return (
11
+ <Box className="box-main-filter">
12
+ <Grid container>
13
+ <Grid item className="item">
14
+ <DefaultSelect attribute="brand" />
15
+ </Grid>
16
+ <Grid item className="item">
17
+ <DefaultSelect attribute="keyword_0" />
18
+ </Grid>
19
+
20
+ <Grid item className="item-seven text-center">
21
+ <Button
22
+ className="text-btn-small bg-pink text-red"
23
+ style={{ borderRadius: 12 }}
24
+ >
25
+ Clear x
26
+ </Button>
27
+ </Grid>
28
+ </Grid>
29
+ </Box>
30
+ );
31
+ }
32
+
33
+ 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,12 @@
1
+ import { Box } from '@material-ui/core'
2
+ import React from 'react'
3
+
4
+ interface Props {}
5
+
6
+ function FooterNewVersion(props: Props): JSX.Element {
7
+ return (
8
+ <Box></Box>
9
+ )
10
+ }
11
+
12
+ export default FooterNewVersion
@@ -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,29 @@
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
+
15
+ return (
16
+ <>
17
+ {isLoading && (
18
+ <Box className="box-wrap-loading">
19
+ <Box className="loadingSpinCT">
20
+ <Box className="box-content-spin"></Box>
21
+ </Box>
22
+ </Box>
23
+ )}
24
+ {children}
25
+ </>
26
+ );
27
+ }
28
+ const LoadingScreenCustom = connectStateResults(LoadingScreen);
29
+ 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;