@nyris/nyris-webapp 0.3.23 → 0.3.24

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 (92) hide show
  1. package/README.md +1 -1
  2. package/build/asset-manifest.json +12 -18
  3. package/build/index.html +1 -1
  4. package/build/{precache-manifest.550e76235499efc131a68c80392f6bfc.js → precache-manifest.982b135daeb2c083ccf4eeeddf132bf3.js} +11 -35
  5. package/build/service-worker.js +1 -1
  6. package/build/static/css/{main.c956b74c.chunk.css → main.1e43a778.chunk.css} +2 -2
  7. package/build/static/css/main.1e43a778.chunk.css.map +1 -0
  8. package/build/static/js/2.fe9108d5.chunk.js +3 -0
  9. package/build/static/js/{2.f0507df9.chunk.js.LICENSE.txt → 2.fe9108d5.chunk.js.LICENSE.txt} +0 -15
  10. package/build/static/js/2.fe9108d5.chunk.js.map +1 -0
  11. package/build/static/js/main.83cb88a3.chunk.js +3 -0
  12. package/build/static/js/main.83cb88a3.chunk.js.map +1 -0
  13. package/package.json +3 -3
  14. package/src/App.tsx +6 -14
  15. package/src/Router.tsx +6 -41
  16. package/src/Store/Store.ts +14 -23
  17. package/src/components/DetailItem.tsx +9 -15
  18. package/src/components/FooterMobile.tsx +3 -51
  19. package/src/components/FooterResult.tsx +1 -1
  20. package/src/components/HeaderMobile.tsx +13 -20
  21. package/src/components/HeaderNewVersion.tsx +5 -83
  22. package/src/components/Layout.tsx +3 -19
  23. package/src/components/PanelResult/index.tsx +1 -1
  24. package/src/components/clear-refinements/clear-refinements.tsx +1 -1
  25. package/src/components/drawer/cameraCustom.tsx +6 -12
  26. package/src/components/input/inputSearch.tsx +3 -3
  27. package/src/components/pre-filter/desktop/index.tsx +2 -2
  28. package/src/components/results/ItemResult.tsx +7 -7
  29. package/src/defaults.ts +19 -35
  30. package/src/index.css +13 -0
  31. package/src/index.tsx +0 -20
  32. package/src/modules/LandingPage/AppMD.tsx +59 -386
  33. package/src/modules/LandingPage/AppMobile.tsx +1 -1
  34. package/src/modules/LandingPage/propsType.ts +35 -37
  35. package/src/services/Feedback.ts +48 -71
  36. package/src/services/filter.tsx +1 -1
  37. package/src/services/types.ts +30 -39
  38. package/src/types.ts +8 -63
  39. package/build/js/test.js +0 -84
  40. package/build/static/css/main.c956b74c.chunk.css.map +0 -1
  41. package/build/static/js/2.f0507df9.chunk.js +0 -3
  42. package/build/static/js/2.f0507df9.chunk.js.map +0 -1
  43. package/build/static/js/main.247c7b7e.chunk.js +0 -3
  44. package/build/static/js/main.247c7b7e.chunk.js.map +0 -1
  45. package/build/static/media/Rectangle.4dd8b747.png +0 -0
  46. package/build/static/media/icon_company.2b2a0a61.svg +0 -3
  47. package/build/static/media/icon_email.132d632b.svg +0 -3
  48. package/build/static/media/icon_phone.09335da9.svg +0 -3
  49. package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
  50. package/build/static/media/icon_users.2013c76e.svg +0 -3
  51. package/public/js/test.js +0 -84
  52. package/src/App.css +0 -65
  53. package/src/components/AppContainer.tsx +0 -126
  54. package/src/components/CategoryFilter.tsx +0 -17
  55. package/src/components/Codes.tsx +0 -20
  56. package/src/components/CustomHits/index.tsx +0 -47
  57. package/src/components/Footer.tsx +0 -96
  58. package/src/components/FooterMD.tsx +0 -54
  59. package/src/components/HeaderMd.tsx +0 -38
  60. package/src/components/Navigation.tsx +0 -34
  61. package/src/components/PredictedCategories.tsx +0 -14
  62. package/src/components/Refine.tsx +0 -28
  63. package/src/components/RelevantSort.tsx +0 -12
  64. package/src/components/Result.tsx +0 -210
  65. package/src/components/Saved/AllItem.tsx +0 -32
  66. package/src/components/Saved/Category.tsx +0 -16
  67. package/src/components/auto-complete/basic.tsx +0 -153
  68. package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
  69. package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
  70. package/src/components/button/clear-fillter.tsx +0 -30
  71. package/src/components/camera/screenshot.tsx +0 -33
  72. package/src/components/count/count.tsx +0 -20
  73. package/src/components/hitItem/hits.tsx +0 -50
  74. package/src/components/hitItem/infinitiHits.tsx +0 -33
  75. package/src/components/icon/icon.tsx +0 -13
  76. package/src/components/icon_textArea.svg +0 -3
  77. package/src/components/refinement-list/index.tsx +0 -42
  78. package/src/components/results/pagination.tsx +0 -34
  79. package/src/components/search/ListSearch.tsx +0 -209
  80. package/src/modules/LandingPage/App.tsx +0 -318
  81. package/src/modules/LandingPage/index.tsx +0 -186
  82. package/src/modules/LandingPage/indexNewVersion.tsx +0 -72
  83. package/src/page/Auth/login.tsx +0 -7
  84. package/src/page/Exception/404.tsx +0 -11
  85. package/src/page/History/index.tsx +0 -76
  86. package/src/page/Profile/index.tsx +0 -140
  87. package/src/page/ResultMobile/index.tsx +0 -12
  88. package/src/page/Saved/MockData.ts +0 -223
  89. package/src/page/Saved/index.tsx +0 -166
  90. package/src/page/Support/MockData.ts +0 -45
  91. package/src/page/Support/index.tsx +0 -492
  92. /package/build/static/js/{main.247c7b7e.chunk.js.LICENSE.txt → main.83cb88a3.chunk.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyris/nyris-webapp",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "homepage": "./",
5
5
  "dependencies": {
6
6
  "@algolia/autocomplete-js": "^1.7.1",
@@ -12,8 +12,8 @@
12
12
  "@material-ui/data-grid": "^4.0.0-alpha.37",
13
13
  "@material-ui/icons": "^4.4.1",
14
14
  "@material-ui/lab": "^4.0.0-alpha.60",
15
- "@nyris/nyris-api": "^0.3.23",
16
- "@nyris/nyris-react-components": "^0.3.23",
15
+ "@nyris/nyris-api": "^0.3.24",
16
+ "@nyris/nyris-react-components": "^0.3.24",
17
17
  "@reduxjs/toolkit": "^1.6.1",
18
18
  "@splidejs/react-splide": "^0.7.12",
19
19
  "@types/blueimp-load-image": "^2.23.4",
package/src/App.tsx CHANGED
@@ -3,24 +3,16 @@ import 'react-app-polyfill/stable';
3
3
  import React from 'react';
4
4
  import 'typeface-roboto';
5
5
  import 'index.css';
6
- import {useAppSelector} from 'Store/Store';
7
- import LandingPageApp from 'modules/LandingPage/index';
8
- import AppNewVersion from 'modules/LandingPage/indexNewVersion';
9
- import {useMediaQuery} from 'react-responsive';
6
+
7
+ import { useMediaQuery } from 'react-responsive';
8
+ import AppMD from 'modules/LandingPage/AppMD';
10
9
  import AppMobile from 'modules/LandingPage/AppMobile';
11
- // import '@algolia/autocomplete-theme-classic';
12
10
 
13
11
  function App(): JSX.Element {
14
- const {settings} = useAppSelector(state => state);
15
- const {themePage} = settings;
16
- const isMobile = useMediaQuery({query: '(max-width: 776px)'});
17
- let SelectedApp: any = isMobile
18
- ? AppMobile
19
- : themePage.searchSuite?.active
20
- ? AppNewVersion
21
- : LandingPageApp;
12
+ const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
13
+ let SelectedApp: any = isMobile ? AppMobile : AppMD;
22
14
 
23
- return <SelectedApp/>;
15
+ return <SelectedApp />;
24
16
  }
25
17
 
26
18
  export default App;
package/src/Router.tsx CHANGED
@@ -1,15 +1,9 @@
1
- import React, { memo } from "react";
2
- import { Route, Switch, Redirect } from "react-router-dom";
3
- // import Page404 from "Page/Exception/404";
4
- import Login from "page/Auth/login";
5
- import Layout from "components/Layout";
6
- import { ReactNode } from "components/common";
7
- import App from "App";
8
- import ResultComponent from "page/result";
9
- import SearchHistory from "page/History";
10
- import Saved from "page/Saved";
11
- import Profile from "page/Profile";
12
- import SupportPage from "page/Support";
1
+ import React, { memo } from 'react';
2
+ import { Route, Switch, Redirect } from 'react-router-dom';
3
+ import Layout from 'components/Layout';
4
+ import { ReactNode } from 'components/common';
5
+ import App from 'App';
6
+ import ResultComponent from 'page/result';
13
7
 
14
8
  interface PrivateRouteProps {
15
9
  component: ReactNode;
@@ -35,7 +29,6 @@ function Router(): JSX.Element {
35
29
 
36
30
  return (
37
31
  <Switch>
38
- <Route exact strict path="/login" component={Login} />
39
32
  <Layout>
40
33
  <Switch>
41
34
  <PrivateRoute
@@ -52,34 +45,6 @@ function Router(): JSX.Element {
52
45
  path="/result"
53
46
  component={ResultComponent}
54
47
  />
55
- <PrivateRoute
56
- authed={!!accessToken}
57
- exact
58
- strict
59
- path="/search-history"
60
- component={SearchHistory}
61
- />
62
- <PrivateRoute
63
- authed={!!accessToken}
64
- exact
65
- strict
66
- path="/saved"
67
- component={Saved}
68
- />
69
- <PrivateRoute
70
- authed={!!accessToken}
71
- exact
72
- strict
73
- path="/account"
74
- component={Profile}
75
- />
76
- <PrivateRoute
77
- authed={!!accessToken}
78
- exact
79
- strict
80
- path="/support"
81
- component={SupportPage}
82
- />
83
48
  </Switch>
84
49
  </Layout>
85
50
  </Switch>
@@ -1,37 +1,28 @@
1
- import { configureStore } from "@reduxjs/toolkit";
2
- import { TypedUseSelectorHook, useDispatch, useSelector } from "react-redux";
3
- import { combineReducers } from "redux";
4
- import Auth from "Store/Auth";
5
- import {AppSettings, MDSettings} from "types";
6
- import { getUrlParam } from "utils";
7
- import Search from "Store/Search";
8
- import Nyris from "Store/Nyris";
9
- import {defaultMdSettings, defaultSettings} from "../defaults";
1
+ import { configureStore } from '@reduxjs/toolkit';
2
+ import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
3
+ import { combineReducers } from 'redux';
4
+ import Auth from 'Store/Auth';
5
+ import { AppSettings } from 'types';
6
+ import { getUrlParam } from 'utils';
7
+ import Search from 'Store/Search';
8
+ import Nyris from 'Store/Nyris';
9
+ import { defaultSettings } from '../defaults';
10
10
 
11
11
  declare var settings: AppSettings;
12
12
 
13
-
14
-
15
13
  let normalizedSettings: AppSettings = {
16
14
  ...defaultSettings,
17
15
  ...settings,
18
16
  };
19
17
 
20
- // spread default settings for material design
21
- let mdSettings : MDSettings = {
22
- ...defaultMdSettings,
23
- ...settings.themePage.materialDesign
24
- }
25
- normalizedSettings.themePage.materialDesign = mdSettings;
26
-
27
18
  normalizedSettings = {
28
19
  ...normalizedSettings,
29
- apiKey: (getUrlParam("apiKey") as string) || normalizedSettings.apiKey,
30
- xOptions: (getUrlParam("xOptions") as string) || normalizedSettings.xOptions,
20
+ apiKey: (getUrlParam('apiKey') as string) || normalizedSettings.apiKey,
21
+ xOptions: (getUrlParam('xOptions') as string) || normalizedSettings.xOptions,
31
22
  regions:
32
- (getUrlParam("use.regions") as boolean) || normalizedSettings.regions,
23
+ (getUrlParam('use.regions') as boolean) || normalizedSettings.regions,
33
24
  preview:
34
- (getUrlParam("use.preview") as boolean) || normalizedSettings.preview,
25
+ (getUrlParam('use.preview') as boolean) || normalizedSettings.preview,
35
26
  };
36
27
 
37
28
  const reducers = combineReducers({
@@ -43,7 +34,7 @@ const reducers = combineReducers({
43
34
 
44
35
  export const store = configureStore({
45
36
  reducer: reducers,
46
- devTools: process.env.NODE_ENV !== "production",
37
+ devTools: process.env.NODE_ENV !== 'production',
47
38
  });
48
39
 
49
40
  export type RootState = ReturnType<typeof store.getState>;
@@ -121,9 +121,7 @@ function DetailItem(props: Props) {
121
121
  }
122
122
  }}
123
123
  >
124
- <IconSearchImage
125
- color={settings.themePage.searchSuite?.secondaryColor}
126
- />
124
+ <IconSearchImage color={settings.theme?.secondaryColor} />
127
125
  </Button>
128
126
  )}
129
127
  </Box>
@@ -180,7 +178,7 @@ function DetailItem(props: Props) {
180
178
  <Box
181
179
  borderRadius={16}
182
180
  style={{
183
- backgroundColor: `${settings.themePage.searchSuite?.secondaryColor}26`,
181
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
184
182
  width: 'fit-content',
185
183
  padding: '3px 5px',
186
184
  marginTop: 8,
@@ -188,7 +186,7 @@ function DetailItem(props: Props) {
188
186
  >
189
187
  <Typography
190
188
  style={{
191
- color: settings.themePage.searchSuite?.secondaryColor,
189
+ color: settings.theme?.secondaryColor,
192
190
  fontSize: 12,
193
191
  fontWeight: 700,
194
192
  }}
@@ -223,7 +221,7 @@ function DetailItem(props: Props) {
223
221
  style={{
224
222
  display: 'flex',
225
223
  justifyContent: 'space-between',
226
- color: settings.themePage.searchSuite?.secondaryColor,
224
+ color: settings.theme?.secondaryColor,
227
225
  fontSize: 14,
228
226
  textTransform: 'initial',
229
227
  paddingLeft: 5,
@@ -234,15 +232,11 @@ function DetailItem(props: Props) {
234
232
  View details
235
233
  {collapDescription ? (
236
234
  <KeyboardArrowUpIcon
237
- htmlColor={
238
- settings.themePage.searchSuite?.secondaryColor
239
- }
235
+ htmlColor={settings.theme?.secondaryColor}
240
236
  />
241
237
  ) : (
242
238
  <KeyboardArrowDownIcon
243
- htmlColor={
244
- settings.themePage.searchSuite?.secondaryColor
245
- }
239
+ htmlColor={settings.theme?.secondaryColor}
246
240
  />
247
241
  )}
248
242
  </Button>
@@ -256,7 +250,7 @@ function DetailItem(props: Props) {
256
250
  {(settings.showMoreInfo || settings.warehouseVariant) && (
257
251
  <Box
258
252
  style={{
259
- background: `linear-gradient(270deg, ${settings.themePage.searchSuite?.primaryColor}bb 0%, ${settings.themePage.searchSuite?.primaryColor} 100%)`,
253
+ background: `linear-gradient(270deg, ${settings.theme?.primaryColor}bb 0%, ${settings.theme?.primaryColor} 100%)`,
260
254
  // marginBottom: 25,
261
255
  boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)',
262
256
  borderRadius: 4,
@@ -315,7 +309,7 @@ function DetailItem(props: Props) {
315
309
  >
316
310
  <Box
317
311
  style={{
318
- backgroundColor: `${settings.themePage.searchSuite?.secondaryColor}26`,
312
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
319
313
  padding: '5px 10px',
320
314
  borderRadius: 4,
321
315
  width: '100%',
@@ -330,7 +324,7 @@ function DetailItem(props: Props) {
330
324
  </Box>
331
325
  <Box
332
326
  style={{
333
- backgroundColor: `${settings.themePage.searchSuite?.secondaryColor}26`,
327
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
334
328
  padding: '5px 10px',
335
329
  borderRadius: 4,
336
330
  width: '100%',
@@ -15,15 +15,6 @@ function FooterMobile(props: Props): JSX.Element {
15
15
  const history = useHistory();
16
16
  const { settings } = useAppSelector(state => state);
17
17
 
18
- // const handleCheckMatchLink = (match: any, location: any) => {
19
- // let active = false;
20
- // if (match?.url === location.pathname) {
21
- // active = true;
22
- // }
23
-
24
- // return active;
25
- // };
26
-
27
18
  return (
28
19
  <Box
29
20
  className="box-footer-mobile"
@@ -41,7 +32,7 @@ function FooterMobile(props: Props): JSX.Element {
41
32
  alignItems: 'center',
42
33
  backgroundColor:
43
34
  history.location.pathname === '/'
44
- ? `${settings.themePage.searchSuite?.primaryColor}21`
35
+ ? `${settings.theme?.primaryColor}21`
45
36
  : '',
46
37
  }}
47
38
  activeClassName="active"
@@ -51,13 +42,13 @@ function FooterMobile(props: Props): JSX.Element {
51
42
  <Home
52
43
  color={
53
44
  history.location.pathname === '/'
54
- ? settings.themePage.searchSuite?.primaryColor
45
+ ? settings.theme?.primaryColor
55
46
  : '#000'
56
47
  }
57
48
  />
58
49
  </NavLink>
59
50
  <Box
60
- style={{ background: settings.themePage.searchSuite?.primaryColor }}
51
+ style={{ background: settings.theme?.primaryColor }}
61
52
  className="box-icon-camera-mobile"
62
53
  >
63
54
  <Button
@@ -68,45 +59,6 @@ function FooterMobile(props: Props): JSX.Element {
68
59
  <IconCameraMobile color="#FFFF" />
69
60
  </Button>
70
61
  </Box>
71
- {/* hidden_as_required {history.location.pathname !== "/" && (
72
- <>
73
- <Box style={{ padding: 23 }}>
74
- <NavLink
75
- activeClassName="active"
76
- isActive={(match, location) =>
77
- handleCheckMatchLink(match, location)
78
- }
79
- to={"/support"}
80
- className="nav-link p-0 menu-children rounded-0"
81
- >
82
- <img
83
- width={24}
84
- height={24}
85
- src={`${IconSupportMobile}`}
86
- alt="support_mobile"
87
- />
88
- </NavLink>
89
- </Box>
90
-
91
- <Box style={{ padding: 23 }}>
92
- <NavLink
93
- activeClassName="active"
94
- isActive={(match, location) =>
95
- handleCheckMatchLink(match, location)
96
- }
97
- to={"/account"}
98
- className="nav-link p-0 menu-children rounded-0"
99
- >
100
- <img
101
- width={24}
102
- height={24}
103
- src={`${IconAdminMobile}`}
104
- alt="account_page"
105
- />
106
- </NavLink>
107
- </Box>
108
- </>
109
- )}*/}
110
62
 
111
63
  <Box className="box-screenshot-camera">
112
64
  <CameraCustom
@@ -20,7 +20,7 @@ function Pagination({ children }: any) {
20
20
  <span style={{ color: '#2B2C46' }}>Share your search with our</span>
21
21
  <Link
22
22
  to={'/support'}
23
- style={{ color: settings.themePage.searchSuite?.secondaryColor }}
23
+ style={{ color: settings.theme?.secondaryColor }}
24
24
  >
25
25
  product experts
26
26
  </Link>
@@ -117,7 +117,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
117
117
  alignItems: 'center',
118
118
  height: '50px',
119
119
  borderBottom: '1px solid #e9e9ec',
120
- background: settings.themePage.searchSuite?.headerColor,
120
+ background: settings.theme?.headerColor,
121
121
  }}
122
122
  >
123
123
  <NavLink
@@ -127,16 +127,13 @@ function HeaderMobileComponent(props: Props): JSX.Element {
127
127
  dispatch(reset(''));
128
128
  }}
129
129
  >
130
- {/* <section id="branding" style={{ height: 32 }} /> */}
131
130
  <img
132
- // width={90}
133
- // height={30}
134
- src={settings.themePage.searchSuite?.appBarLogoUrl}
135
- alt={settings.themePage.searchSuite?.appBarLogoUrlAlt}
131
+ src={settings.theme?.appBarLogoUrl}
132
+ alt="logo"
136
133
  style={{
137
134
  aspectRatio: 1,
138
- width: settings.themePage.searchSuite?.logoWidth,
139
- height: settings.themePage.searchSuite?.logoHeight,
135
+ width: settings.theme?.logoWidth,
136
+ height: settings.theme?.logoHeight,
140
137
  }}
141
138
  />
142
139
  </NavLink>
@@ -150,8 +147,8 @@ function HeaderMobileComponent(props: Props): JSX.Element {
150
147
  {imageThumbSearchInput && (
151
148
  <div
152
149
  style={{
153
- border: `2px solid ${settings.themePage.searchSuite?.secondaryColor}c7`,
154
- backgroundColor: `${settings.themePage.searchSuite?.secondaryColor}26`,
150
+ border: `2px solid ${settings.theme?.secondaryColor}c7`,
151
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
155
152
  }}
156
153
  className="box-image-search-thumb-mobile"
157
154
  >
@@ -162,7 +159,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
162
159
  />
163
160
  <button
164
161
  style={{
165
- backgroundColor: `${settings.themePage.searchSuite?.secondaryColor}26`,
162
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
166
163
  }}
167
164
  onClick={() => {
168
165
  if (textSearchInputMobile) {
@@ -183,7 +180,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
183
180
  <CloseIcon
184
181
  style={{
185
182
  fontSize: 20,
186
- color: settings.themePage.searchSuite?.secondaryColor,
183
+ color: settings.theme?.secondaryColor,
187
184
  fontWeight: 700,
188
185
  }}
189
186
  />
@@ -255,9 +252,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
255
252
  <CloseIcon
256
253
  style={{
257
254
  fontSize: 20,
258
- color:
259
- settings.themePage.searchSuite
260
- ?.secondaryColor,
255
+ color: settings.theme?.secondaryColor,
261
256
  }}
262
257
  />
263
258
  </button>
@@ -278,7 +273,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
278
273
  borderRadius: '100%',
279
274
  backgroundColor:
280
275
  preFilterDropdown || keyFilter
281
- ? `${settings.themePage.searchSuite?.secondaryColor}26`
276
+ ? `${settings.theme?.secondaryColor}26`
282
277
  : '#f3f3f5',
283
278
  margin: '0 12px',
284
279
  }}
@@ -287,15 +282,13 @@ function HeaderMobileComponent(props: Props): JSX.Element {
287
282
  <CloseIcon
288
283
  style={{
289
284
  fontSize: 16,
290
- color: settings.themePage.searchSuite?.secondaryColor,
285
+ color: settings.theme?.secondaryColor,
291
286
  }}
292
287
  />
293
288
  ) : (
294
289
  <IconFilter
295
290
  color={
296
- keyFilter
297
- ? settings.themePage.searchSuite?.secondaryColor
298
- : '#000'
291
+ keyFilter ? settings.theme?.secondaryColor : '#000'
299
292
  }
300
293
  />
301
294
  )}
@@ -1,4 +1,4 @@
1
- import { Box, Grid } from '@material-ui/core';
1
+ import { Box } from '@material-ui/core';
2
2
  import React from 'react';
3
3
  import { NavLink } from 'react-router-dom';
4
4
  import './common.scss';
@@ -8,16 +8,6 @@ import { reset } from 'Store/Search';
8
8
  function HeaderNewVersion(): JSX.Element {
9
9
  const dispatch = useAppDispatch();
10
10
  const { settings } = useAppSelector(state => state);
11
-
12
- // const handleCheckMatchLink = (match: any, location: any) => {
13
- // let active = false;
14
- // if (match?.url === location.pathname) {
15
- // active = true;
16
- // }
17
-
18
- // return active;
19
- // };
20
-
21
11
  return (
22
12
  <Box className="box-content" display={'flex'}>
23
13
  <NavLink
@@ -27,84 +17,16 @@ function HeaderNewVersion(): JSX.Element {
27
17
  dispatch(reset(''));
28
18
  }}
29
19
  >
30
- {/* <section id="branding" style={{ height: 32 }} /> */}
31
20
  <img
32
- src={settings.themePage.searchSuite?.appBarLogoUrl}
33
- alt={settings.themePage.searchSuite?.appBarLogoUrlAlt}
21
+ src={settings.theme?.appBarLogoUrl}
22
+ alt="logo"
34
23
  style={{
35
24
  aspectRatio: 1,
36
- width: settings.themePage.searchSuite?.logoWidth,
37
- height: settings.themePage.searchSuite?.logoHeight,
25
+ width: settings.theme?.logoWidth,
26
+ height: settings.theme?.logoHeight,
38
27
  }}
39
28
  />
40
29
  </NavLink>
41
- <Grid container className="nav-menu">
42
- {/* <Grid item className="item-nav">
43
- <NavLink
44
- activeClassName="active"
45
- isActive={(match, location) =>
46
- handleCheckMatchLink(match, location)
47
- }
48
- to={"/search-history"}
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
- Search history
53
- <img width={10} height={10} src={`${IconReLoad}`} 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={"/saved"}
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
- Saved
68
- <img width={10} height={10} src={`${IconSave}`} alt=""/>
69
- </span>
70
- </NavLink>
71
- </Grid>
72
- */}
73
-
74
- {/*hidden_as_required
75
- <Grid item className="item-nav">
76
- <NavLink
77
- activeClassName="active"
78
- isActive={(match, location) =>
79
- handleCheckMatchLink(match, location)
80
- }
81
- to={'/support'}
82
- className="nav-link p-0 menu-children rounded-0"
83
- >
84
- <span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
85
- Support
86
- <img width={20} height={20} src={`${IconSupport}`} alt="" />
87
- </span>
88
- </NavLink>
89
- </Grid>
90
-
91
-
92
- <Grid item className="item-nav">
93
- <NavLink
94
- activeClassName="active"
95
- isActive={(match, location) =>
96
- handleCheckMatchLink(match, location)
97
- }
98
- to={'/account'}
99
- className="nav-link p-0 menu-children rounded-0"
100
- >
101
- <span className="d-none d-sm-block ms-4 px-2 py-1 border-bottom-1">
102
- My Account
103
- <img width={20} height={20} src={`${IconAdmin}`} alt="" />
104
- </span>
105
- </NavLink>
106
- </Grid>*/}
107
- </Grid>
108
30
  </Box>
109
31
  );
110
32
  }
@@ -16,12 +16,8 @@ import { useAppDispatch, useAppSelector } from 'Store/Store';
16
16
  import { AlgoliaSettings, AppState } from '../types';
17
17
  import './appMobile.scss';
18
18
  import './common.scss';
19
- import FooterComponent from './Footer';
20
- import FooterMD from './FooterMD';
21
19
  import FooterMobile from './FooterMobile';
22
20
  import FooterNewVersion from './FooterNewVersion';
23
- import HeaderComponent from './Header';
24
- import HeaderMdComponent from './HeaderMd';
25
21
  import HeaderMobile from './HeaderMobile';
26
22
  import HeaderNewVersion from './HeaderNewVersion';
27
23
  import ExpandablePanelComponent from './PanelResult';
@@ -32,7 +28,6 @@ function Layout({ children }: ReactNode): JSX.Element {
32
28
  const dispatch = useAppDispatch();
33
29
  const { settings, search } = useAppSelector<AppState>((state: any) => state);
34
30
  const { valueTextSearch, loadingSearchAlgolia, preFilterDropdown } = search;
35
- const { themePage } = settings;
36
31
  const { apiKey, appId, indexName } = settings.algolia as AlgoliaSettings;
37
32
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
38
33
  const [isOpenFilter, setOpenFilter] = useState<boolean>(false);
@@ -67,19 +62,8 @@ function Layout({ children }: ReactNode): JSX.Element {
67
62
  FooterApp = FooterMobile;
68
63
  HeaderApp = HeaderMobile;
69
64
  } else {
70
- if (themePage.default?.active) {
71
- classNameBoxVersion = 'default';
72
-
73
- HeaderApp = HeaderComponent;
74
- FooterApp = FooterComponent;
75
- } else if (themePage.materialDesign?.active) {
76
- classNameBoxVersion = 'materialDesign';
77
- HeaderApp = HeaderMdComponent;
78
- FooterApp = FooterMD;
79
- } else {
80
- HeaderApp = HeaderNewVersion;
81
- FooterApp = FooterNewVersion;
82
- }
65
+ HeaderApp = HeaderNewVersion;
66
+ FooterApp = FooterNewVersion;
83
67
  }
84
68
 
85
69
  const conditionalQuery = useMemo(() => {
@@ -141,7 +125,7 @@ function Layout({ children }: ReactNode): JSX.Element {
141
125
  }
142
126
  style={{
143
127
  ...(classNameBoxVersion === 'newVersion'
144
- ? { background: settings.themePage.searchSuite?.headerColor }
128
+ ? { background: settings.theme?.headerColor }
145
129
  : {}),
146
130
  }}
147
131
  >
@@ -222,7 +222,7 @@ export default function ExpandablePanelComponent({
222
222
  className="text-white"
223
223
  style={{
224
224
  width: '100%',
225
- backgroundColor: settings.themePage.searchSuite?.secondaryColor,
225
+ backgroundColor: settings.theme?.secondaryColor,
226
226
  fontWeight: 700,
227
227
  fontSize: 14,
228
228
  borderRadius: 0,
@@ -30,7 +30,7 @@ function ClearRefinementsComponent({
30
30
  className={className}
31
31
  onClick={handleButtonClick}
32
32
  style={{
33
- color: settings.themePage.searchSuite?.secondaryColor,
33
+ color: settings.theme.secondaryColor,
34
34
  fontWeight: 'bold',
35
35
  textTransform: 'capitalize',
36
36
  padding: 0,