@nyris/nyris-webapp 0.3.22 → 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.6f6124db008881782a26c64db1f10264.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.a2732c2b.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 +33 -22
- 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 +8 -8
- package/src/defaults.ts +19 -35
- package/src/helpers/CommonHelper.ts +10 -6
- package/src/hooks/useVisualSearch.tsx +1 -1
- 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/page/result/index.tsx +2 -2
- 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.a2732c2b.chunk.js +0 -3
- package/build/static/js/2.a2732c2b.chunk.js.map +0 -1
- package/build/static/js/main.93b05e17.chunk.js +0 -3
- package/build/static/js/main.93b05e17.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.93b05e17.chunk.js.LICENSE.txt → main.83cb88a3.chunk.js.LICENSE.txt} +0 -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,
|
|
@@ -68,12 +68,6 @@ function CameraCustom(props: Props) {
|
|
|
68
68
|
region = res.selectedRegion;
|
|
69
69
|
dispatch(setSelectedRegion(region));
|
|
70
70
|
}
|
|
71
|
-
// findByImage({ image: imageConvert, settings, region: region }).then(
|
|
72
|
-
// (res: any) => {
|
|
73
|
-
// dispatch(setSearchResults(res));
|
|
74
|
-
// return dispatch(showFeedback());
|
|
75
|
-
// },
|
|
76
|
-
// );
|
|
77
71
|
setTimeout(() => {
|
|
78
72
|
dispatch(updateStatusLoading(false));
|
|
79
73
|
handlerCloseModal();
|
|
@@ -141,7 +135,7 @@ function CameraCustom(props: Props) {
|
|
|
141
135
|
<button
|
|
142
136
|
className="btn-close-modal right"
|
|
143
137
|
style={{
|
|
144
|
-
backgroundColor: settings.
|
|
138
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
145
139
|
}}
|
|
146
140
|
onClick={handlerCloseModal}
|
|
147
141
|
>
|
|
@@ -150,7 +144,7 @@ function CameraCustom(props: Props) {
|
|
|
150
144
|
<button
|
|
151
145
|
className="btn-close-modal left"
|
|
152
146
|
style={{
|
|
153
|
-
backgroundColor: settings.
|
|
147
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
154
148
|
}}
|
|
155
149
|
onClick={handlerCloseModal}
|
|
156
150
|
>
|
|
@@ -226,7 +220,7 @@ function CameraCustom(props: Props) {
|
|
|
226
220
|
<div
|
|
227
221
|
className="box-scale-camera"
|
|
228
222
|
style={{
|
|
229
|
-
backgroundColor: settings.
|
|
223
|
+
backgroundColor: settings.theme?.secondaryColor,
|
|
230
224
|
}}
|
|
231
225
|
>
|
|
232
226
|
<button
|
|
@@ -234,7 +228,7 @@ function CameraCustom(props: Props) {
|
|
|
234
228
|
style={{
|
|
235
229
|
backgroundColor:
|
|
236
230
|
scaleCamera === 1 && 'active'
|
|
237
|
-
? settings.
|
|
231
|
+
? settings.theme?.primaryColor
|
|
238
232
|
: '',
|
|
239
233
|
}}
|
|
240
234
|
onClick={() => setScaleCamera(1)}
|
|
@@ -246,7 +240,7 @@ function CameraCustom(props: Props) {
|
|
|
246
240
|
style={{
|
|
247
241
|
backgroundColor:
|
|
248
242
|
scaleCamera === 1.5 && 'active'
|
|
249
|
-
? settings.
|
|
243
|
+
? settings.theme?.primaryColor
|
|
250
244
|
: '',
|
|
251
245
|
}}
|
|
252
246
|
onClick={() => setScaleCamera(1.5)}
|
|
@@ -258,7 +252,7 @@ function CameraCustom(props: Props) {
|
|
|
258
252
|
style={{
|
|
259
253
|
backgroundColor:
|
|
260
254
|
scaleCamera === 2 && 'active'
|
|
261
|
-
? settings.
|
|
255
|
+
? settings.theme?.primaryColor
|
|
262
256
|
: '',
|
|
263
257
|
}}
|
|
264
258
|
onClick={() => setScaleCamera(2)}
|
|
@@ -166,8 +166,8 @@ const SearchBox = (props: any) => {
|
|
|
166
166
|
{imageThumbSearchInput && (
|
|
167
167
|
<Box
|
|
168
168
|
style={{
|
|
169
|
-
border: `2px solid ${settings.
|
|
170
|
-
backgroundColor: `${settings.
|
|
169
|
+
border: `2px solid ${settings.theme?.secondaryColor}c7`,
|
|
170
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
171
171
|
marginRight: '5px',
|
|
172
172
|
}}
|
|
173
173
|
className="box-image-search-thumb"
|
|
@@ -196,7 +196,7 @@ const SearchBox = (props: any) => {
|
|
|
196
196
|
<CloseIcon
|
|
197
197
|
style={{
|
|
198
198
|
fontSize: 20,
|
|
199
|
-
color: settings.
|
|
199
|
+
color: settings.theme?.secondaryColor,
|
|
200
200
|
}}
|
|
201
201
|
/>
|
|
202
202
|
</button>
|
|
@@ -297,7 +297,7 @@ function FilterComponent(props: Props) {
|
|
|
297
297
|
className="button-right"
|
|
298
298
|
style={{
|
|
299
299
|
width: '50%',
|
|
300
|
-
backgroundColor: settings.
|
|
300
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
301
301
|
color: '#fff',
|
|
302
302
|
borderRadius: 0,
|
|
303
303
|
justifyContent: 'flex-start',
|
|
@@ -338,7 +338,7 @@ function FilterComponent(props: Props) {
|
|
|
338
338
|
className="button-right"
|
|
339
339
|
style={{
|
|
340
340
|
width: '50%',
|
|
341
|
-
backgroundColor: settings.
|
|
341
|
+
backgroundColor: settings.theme?.primaryColor,
|
|
342
342
|
color: '#fff',
|
|
343
343
|
borderRadius: 0,
|
|
344
344
|
justifyContent: 'flex-start',
|
|
@@ -145,13 +145,13 @@ function ItemResult(props: Props) {
|
|
|
145
145
|
</Button>
|
|
146
146
|
</Box>
|
|
147
147
|
)}
|
|
148
|
-
{!isHover &&
|
|
148
|
+
{!isHover && (
|
|
149
149
|
<Box className="box-icon-modal">
|
|
150
150
|
<Button
|
|
151
151
|
style={{ width: '100%', height: '100%', padding: 0, zIndex: 9 }}
|
|
152
152
|
onClick={() => handlerToggleModal(dataItem)}
|
|
153
153
|
>
|
|
154
|
-
<Expand color={settings.
|
|
154
|
+
<Expand color={settings.theme?.secondaryColor} />
|
|
155
155
|
</Button>
|
|
156
156
|
</Box>
|
|
157
157
|
)}
|
|
@@ -178,7 +178,7 @@ function ItemResult(props: Props) {
|
|
|
178
178
|
src={NoImage}
|
|
179
179
|
alt="image_item"
|
|
180
180
|
className="img-style"
|
|
181
|
-
style={{ width: '100%', height: '100%' }}
|
|
181
|
+
style={{ width: '100%', height: '100%', objectFit: 'cover' }}
|
|
182
182
|
/>
|
|
183
183
|
)}
|
|
184
184
|
</Button>
|
|
@@ -260,7 +260,7 @@ function ItemResult(props: Props) {
|
|
|
260
260
|
<Box
|
|
261
261
|
mt={1}
|
|
262
262
|
style={{
|
|
263
|
-
background: `${settings.
|
|
263
|
+
background: `${settings.theme?.secondaryColor}26`,
|
|
264
264
|
borderRadius: '6px',
|
|
265
265
|
display: 'flex',
|
|
266
266
|
width: 'fit-content',
|
|
@@ -270,7 +270,7 @@ function ItemResult(props: Props) {
|
|
|
270
270
|
<Typography
|
|
271
271
|
className="fw-700"
|
|
272
272
|
style={{
|
|
273
|
-
color: settings.
|
|
273
|
+
color: settings.theme?.secondaryColor,
|
|
274
274
|
fontSize: 10,
|
|
275
275
|
letterSpacing: '1px',
|
|
276
276
|
maxWidth: '160px',
|
|
@@ -307,7 +307,7 @@ function ItemResult(props: Props) {
|
|
|
307
307
|
boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
|
|
308
308
|
// marginBottom: 22,
|
|
309
309
|
height: 40,
|
|
310
|
-
background: `linear-gradient(270deg, ${settings.
|
|
310
|
+
background: `linear-gradient(270deg, ${settings.theme?.primaryColor}bb 0%, ${settings.theme?.primaryColor} 100%)`,
|
|
311
311
|
borderRadius: 4,
|
|
312
312
|
padding: '0px 8px',
|
|
313
313
|
}}
|
|
@@ -371,7 +371,7 @@ function ItemResult(props: Props) {
|
|
|
371
371
|
>
|
|
372
372
|
<Box
|
|
373
373
|
style={{
|
|
374
|
-
backgroundColor: `${settings.
|
|
374
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
375
375
|
padding: '5px 10px',
|
|
376
376
|
borderRadius: 4,
|
|
377
377
|
width: '100%',
|
|
@@ -395,7 +395,7 @@ function ItemResult(props: Props) {
|
|
|
395
395
|
|
|
396
396
|
<Box
|
|
397
397
|
style={{
|
|
398
|
-
backgroundColor: `${settings.
|
|
398
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
399
399
|
padding: '5px 10px',
|
|
400
400
|
borderRadius: 4,
|
|
401
401
|
width: '100%',
|
package/src/defaults.ts
CHANGED
|
@@ -1,37 +1,21 @@
|
|
|
1
|
-
import {AppSettings} from
|
|
1
|
+
import { AppSettings } from './types';
|
|
2
2
|
|
|
3
|
-
export const defaultSettings
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
themePage: {
|
|
22
|
-
default: { active: true }
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const defaultMdSettings = {
|
|
27
|
-
appBarLogoUrl: 'images/nyris-logo.svg',
|
|
28
|
-
appBarCustomBackgroundColor: '#f4f4f4',
|
|
29
|
-
appBarCustomTextColor: '#ccc',
|
|
30
|
-
appBarTitle: '',
|
|
31
|
-
primaryColor: '#e2001a',
|
|
32
|
-
secondaryColor: '#777777',
|
|
33
|
-
resultFirstRowProperty: 'title',
|
|
34
|
-
resultSecondRowProperty: 'sku',
|
|
35
|
-
resultLinkText: 'Info',
|
|
36
|
-
customFontFamily: 'Helvetica',
|
|
3
|
+
export const defaultSettings: AppSettings = {
|
|
4
|
+
xOptions: false,
|
|
5
|
+
apiKey: 'UNSET',
|
|
6
|
+
exampleImages: [],
|
|
7
|
+
preview: true,
|
|
8
|
+
regions: false,
|
|
9
|
+
maxWidth: 500,
|
|
10
|
+
maxHeight: 500,
|
|
11
|
+
jpegQuality: 0.92,
|
|
12
|
+
baseUrl: 'https://api.nyris.io',
|
|
13
|
+
instantRedirectPatterns: [
|
|
14
|
+
'^https?://(www.)?youtube.com/',
|
|
15
|
+
'^https?://(www.)?youtu.be/',
|
|
16
|
+
'^https?://(www.)?vimeo.com/',
|
|
17
|
+
'^https?://(www.)?dailymotion.com/',
|
|
18
|
+
'^https?://(www.)?dai.ly/',
|
|
19
|
+
],
|
|
20
|
+
theme: {},
|
|
37
21
|
};
|
|
@@ -14,15 +14,19 @@ export const prepareImageList = (dataItem: any) => {
|
|
|
14
14
|
key?.includes('additional_image_link')
|
|
15
15
|
) {
|
|
16
16
|
if (!isEmpty(newObject[key])) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
if (newObject[key]) {
|
|
18
|
+
valueKey.push({
|
|
19
|
+
url: newObject[key],
|
|
20
|
+
});
|
|
21
|
+
}
|
|
20
22
|
}
|
|
21
23
|
} else {
|
|
22
24
|
if (key === 'image(main_similarity)' || key === 'main_image_link') {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
if (newObject[key]) {
|
|
26
|
+
valueKey.push({
|
|
27
|
+
url: newObject[key],
|
|
28
|
+
});
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
}
|
package/src/index.css
CHANGED
|
@@ -1700,3 +1700,16 @@ a img.aligncenter {
|
|
|
1700
1700
|
|
|
1701
1701
|
}
|
|
1702
1702
|
|
|
1703
|
+
/* Css Common all page */
|
|
1704
|
+
.d-flex {
|
|
1705
|
+
display: flex !important;
|
|
1706
|
+
}
|
|
1707
|
+
.justify-center {
|
|
1708
|
+
justify-content: center;
|
|
1709
|
+
}
|
|
1710
|
+
.flex-end {
|
|
1711
|
+
align-items: flex-end;
|
|
1712
|
+
}
|
|
1713
|
+
.flex-center {
|
|
1714
|
+
align-items: center;
|
|
1715
|
+
}
|
package/src/index.tsx
CHANGED
|
@@ -5,10 +5,8 @@ import React, { Fragment } from 'react';
|
|
|
5
5
|
import ReactDOM from 'react-dom';
|
|
6
6
|
import * as serviceWorker from './serviceWorker';
|
|
7
7
|
import { Provider } from 'react-redux';
|
|
8
|
-
import { AppSettings, MDSettings } from './types';
|
|
9
8
|
import { MuiThemeProvider } from '@material-ui/core';
|
|
10
9
|
import 'typeface-roboto';
|
|
11
|
-
import { defaultMdSettings } from './defaults';
|
|
12
10
|
import { HashRouter } from 'react-router-dom';
|
|
13
11
|
import Router from 'Router';
|
|
14
12
|
import { store } from 'Store/Store';
|
|
@@ -16,15 +14,8 @@ import 'react-responsive-carousel/lib/styles/carousel.min.css';
|
|
|
16
14
|
import { createTheme } from '@material-ui/core/styles';
|
|
17
15
|
import { Toaster } from 'components/Toaster';
|
|
18
16
|
|
|
19
|
-
declare var settings: AppSettings;
|
|
20
|
-
|
|
21
17
|
document.title = window.location.host;
|
|
22
18
|
|
|
23
|
-
let md: MDSettings = {
|
|
24
|
-
...defaultMdSettings,
|
|
25
|
-
...settings.themePage.materialDesign,
|
|
26
|
-
};
|
|
27
|
-
|
|
28
19
|
let theme = createTheme({
|
|
29
20
|
overrides: {
|
|
30
21
|
MuiTooltip: {
|
|
@@ -36,17 +27,6 @@ let theme = createTheme({
|
|
|
36
27
|
},
|
|
37
28
|
},
|
|
38
29
|
},
|
|
39
|
-
typography: {
|
|
40
|
-
fontFamily: md.customFontFamily,
|
|
41
|
-
},
|
|
42
|
-
palette: {
|
|
43
|
-
primary: {
|
|
44
|
-
main: md.primaryColor,
|
|
45
|
-
},
|
|
46
|
-
secondary: {
|
|
47
|
-
main: md.secondaryColor,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
30
|
});
|
|
51
31
|
|
|
52
32
|
ReactDOM.render(
|