@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.
- package/README.md +1 -1
- package/build/asset-manifest.json +12 -18
- package/build/index.html +1 -1
- package/build/{precache-manifest.550e76235499efc131a68c80392f6bfc.js → precache-manifest.982b135daeb2c083ccf4eeeddf132bf3.js} +11 -35
- package/build/service-worker.js +1 -1
- package/build/static/css/{main.c956b74c.chunk.css → main.1e43a778.chunk.css} +2 -2
- package/build/static/css/main.1e43a778.chunk.css.map +1 -0
- package/build/static/js/2.fe9108d5.chunk.js +3 -0
- package/build/static/js/{2.f0507df9.chunk.js.LICENSE.txt → 2.fe9108d5.chunk.js.LICENSE.txt} +0 -15
- package/build/static/js/2.fe9108d5.chunk.js.map +1 -0
- package/build/static/js/main.83cb88a3.chunk.js +3 -0
- package/build/static/js/main.83cb88a3.chunk.js.map +1 -0
- package/package.json +3 -3
- package/src/App.tsx +6 -14
- package/src/Router.tsx +6 -41
- package/src/Store/Store.ts +14 -23
- package/src/components/DetailItem.tsx +9 -15
- package/src/components/FooterMobile.tsx +3 -51
- package/src/components/FooterResult.tsx +1 -1
- package/src/components/HeaderMobile.tsx +13 -20
- package/src/components/HeaderNewVersion.tsx +5 -83
- package/src/components/Layout.tsx +3 -19
- package/src/components/PanelResult/index.tsx +1 -1
- package/src/components/clear-refinements/clear-refinements.tsx +1 -1
- package/src/components/drawer/cameraCustom.tsx +6 -12
- package/src/components/input/inputSearch.tsx +3 -3
- package/src/components/pre-filter/desktop/index.tsx +2 -2
- package/src/components/results/ItemResult.tsx +7 -7
- package/src/defaults.ts +19 -35
- package/src/index.css +13 -0
- package/src/index.tsx +0 -20
- package/src/modules/LandingPage/AppMD.tsx +59 -386
- package/src/modules/LandingPage/AppMobile.tsx +1 -1
- package/src/modules/LandingPage/propsType.ts +35 -37
- package/src/services/Feedback.ts +48 -71
- package/src/services/filter.tsx +1 -1
- package/src/services/types.ts +30 -39
- package/src/types.ts +8 -63
- package/build/js/test.js +0 -84
- package/build/static/css/main.c956b74c.chunk.css.map +0 -1
- package/build/static/js/2.f0507df9.chunk.js +0 -3
- package/build/static/js/2.f0507df9.chunk.js.map +0 -1
- package/build/static/js/main.247c7b7e.chunk.js +0 -3
- package/build/static/js/main.247c7b7e.chunk.js.map +0 -1
- package/build/static/media/Rectangle.4dd8b747.png +0 -0
- package/build/static/media/icon_company.2b2a0a61.svg +0 -3
- package/build/static/media/icon_email.132d632b.svg +0 -3
- package/build/static/media/icon_phone.09335da9.svg +0 -3
- package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
- package/build/static/media/icon_users.2013c76e.svg +0 -3
- package/public/js/test.js +0 -84
- package/src/App.css +0 -65
- package/src/components/AppContainer.tsx +0 -126
- package/src/components/CategoryFilter.tsx +0 -17
- package/src/components/Codes.tsx +0 -20
- package/src/components/CustomHits/index.tsx +0 -47
- package/src/components/Footer.tsx +0 -96
- package/src/components/FooterMD.tsx +0 -54
- package/src/components/HeaderMd.tsx +0 -38
- package/src/components/Navigation.tsx +0 -34
- package/src/components/PredictedCategories.tsx +0 -14
- package/src/components/Refine.tsx +0 -28
- package/src/components/RelevantSort.tsx +0 -12
- package/src/components/Result.tsx +0 -210
- package/src/components/Saved/AllItem.tsx +0 -32
- package/src/components/Saved/Category.tsx +0 -16
- package/src/components/auto-complete/basic.tsx +0 -153
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
- package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
- package/src/components/button/clear-fillter.tsx +0 -30
- package/src/components/camera/screenshot.tsx +0 -33
- package/src/components/count/count.tsx +0 -20
- package/src/components/hitItem/hits.tsx +0 -50
- package/src/components/hitItem/infinitiHits.tsx +0 -33
- package/src/components/icon/icon.tsx +0 -13
- package/src/components/icon_textArea.svg +0 -3
- package/src/components/refinement-list/index.tsx +0 -42
- package/src/components/results/pagination.tsx +0 -34
- package/src/components/search/ListSearch.tsx +0 -209
- package/src/modules/LandingPage/App.tsx +0 -318
- package/src/modules/LandingPage/index.tsx +0 -186
- package/src/modules/LandingPage/indexNewVersion.tsx +0 -72
- package/src/page/Auth/login.tsx +0 -7
- package/src/page/Exception/404.tsx +0 -11
- package/src/page/History/index.tsx +0 -76
- package/src/page/Profile/index.tsx +0 -140
- package/src/page/ResultMobile/index.tsx +0 -12
- package/src/page/Saved/MockData.ts +0 -223
- package/src/page/Saved/index.tsx +0 -166
- package/src/page/Support/MockData.ts +0 -45
- package/src/page/Support/index.tsx +0 -492
- /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.
|
|
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.
|
|
16
|
-
"@nyris/nyris-react-components": "^0.3.
|
|
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
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
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
|
|
2
|
-
import { Route, Switch, Redirect } from
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
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>
|
package/src/Store/Store.ts
CHANGED
|
@@ -1,37 +1,28 @@
|
|
|
1
|
-
import { configureStore } from
|
|
2
|
-
import { TypedUseSelectorHook, useDispatch, useSelector } from
|
|
3
|
-
import { combineReducers } from
|
|
4
|
-
import Auth from
|
|
5
|
-
import {AppSettings
|
|
6
|
-
import { getUrlParam } from
|
|
7
|
-
import Search from
|
|
8
|
-
import Nyris from
|
|
9
|
-
import {
|
|
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(
|
|
30
|
-
xOptions: (getUrlParam(
|
|
20
|
+
apiKey: (getUrlParam('apiKey') as string) || normalizedSettings.apiKey,
|
|
21
|
+
xOptions: (getUrlParam('xOptions') as string) || normalizedSettings.xOptions,
|
|
31
22
|
regions:
|
|
32
|
-
(getUrlParam(
|
|
23
|
+
(getUrlParam('use.regions') as boolean) || normalizedSettings.regions,
|
|
33
24
|
preview:
|
|
34
|
-
(getUrlParam(
|
|
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 !==
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
45
|
+
? settings.theme?.primaryColor
|
|
55
46
|
: '#000'
|
|
56
47
|
}
|
|
57
48
|
/>
|
|
58
49
|
</NavLink>
|
|
59
50
|
<Box
|
|
60
|
-
style={{ background: settings.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
133
|
-
|
|
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.
|
|
139
|
-
height: settings.
|
|
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.
|
|
154
|
-
backgroundColor: `${settings.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
33
|
-
alt=
|
|
21
|
+
src={settings.theme?.appBarLogoUrl}
|
|
22
|
+
alt="logo"
|
|
34
23
|
style={{
|
|
35
24
|
aspectRatio: 1,
|
|
36
|
-
width: settings.
|
|
37
|
-
height: settings.
|
|
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
|
-
|
|
71
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
33
|
+
color: settings.theme.secondaryColor,
|
|
34
34
|
fontWeight: 'bold',
|
|
35
35
|
textTransform: 'capitalize',
|
|
36
36
|
padding: 0,
|