@nyris/nyris-webapp 0.3.24 → 0.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/asset-manifest.json +12 -12
- package/build/index.html +1 -1
- package/build/{precache-manifest.982b135daeb2c083ccf4eeeddf132bf3.js → precache-manifest.3eed67031bd288eaf7ff98cd02aef6d7.js} +10 -10
- package/build/service-worker.js +1 -1
- package/build/static/css/main.0d30f026.chunk.css +2 -0
- package/build/static/css/main.0d30f026.chunk.css.map +1 -0
- package/build/static/js/2.ad8c5320.chunk.js +3 -0
- package/build/static/js/2.ad8c5320.chunk.js.map +1 -0
- package/build/static/js/main.7c54ad4d.chunk.js +3 -0
- package/build/static/js/main.7c54ad4d.chunk.js.map +1 -0
- package/package.json +5 -3
- package/src/App.tsx +19 -2
- package/src/Store/Store.ts +4 -4
- package/src/Store/{Auth.ts → auth/Auth.ts} +6 -17
- package/src/Store/auth/types.ts +11 -0
- package/src/{defaults.ts → Store/constants.ts} +1 -1
- package/src/Store/nyris/Nyris.ts +67 -0
- package/src/Store/nyris/types.ts +11 -0
- package/src/Store/{Search.ts → search/Search.ts} +3 -63
- package/src/Store/search/search.initialState.ts +28 -0
- package/src/Store/search/types.ts +34 -0
- package/src/components/DetailItem.tsx +20 -10
- package/src/components/DragDropFile.tsx +8 -3
- package/src/components/Feedback.tsx +11 -14
- package/src/components/Header.tsx +29 -30
- package/src/components/HeaderMobile.tsx +1 -1
- package/src/components/Layout.tsx +10 -10
- package/src/components/{LoadingScreen → ProductList}/index.tsx +3 -3
- package/src/components/appMobile.scss +2 -21
- package/src/components/carousel/ImagePreviewCarousel.tsx +2 -1
- package/src/components/common.scss +2 -0
- package/src/components/drawer/cameraCustom.tsx +1 -2
- package/src/components/input/inputSearch.tsx +6 -5
- package/src/components/pre-filter/{desktop/index.tsx → index.tsx} +3 -3
- package/src/components/results/ItemResult.tsx +33 -27
- package/src/constants.ts +12 -0
- package/src/hooks/useVisualSearch.tsx +2 -2
- package/src/i18n.ts +10 -0
- package/src/{modules/LandingPage → page/landingPage}/AppMD.tsx +1 -3
- package/src/{modules/LandingPage → page/landingPage}/AppMobile.tsx +3 -4
- package/src/{modules/LandingPage → page/landingPage}/common.scss +2 -8
- package/src/page/result/index.tsx +8 -10
- package/src/translations.ts +22 -0
- package/src/types.ts +5 -3
- package/build/static/css/main.1e43a778.chunk.css +0 -2
- package/build/static/css/main.1e43a778.chunk.css.map +0 -1
- package/build/static/js/2.fe9108d5.chunk.js +0 -3
- package/build/static/js/2.fe9108d5.chunk.js.map +0 -1
- package/build/static/js/main.83cb88a3.chunk.js +0 -3
- package/build/static/js/main.83cb88a3.chunk.js.map +0 -1
- package/src/Store/Nyris.ts +0 -77
- package/src/components/FooterNewVersion.tsx +0 -12
- package/src/components/HeaderNewVersion.tsx +0 -34
- package/src/modules/LandingPage/propsType.ts +0 -41
- package/src/page/result/MockData.ts +0 -50
- /package/build/static/js/{2.fe9108d5.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.83cb88a3.chunk.js.LICENSE.txt → main.7c54ad4d.chunk.js.LICENSE.txt} +0 -0
- /package/src/services/{filter.tsx → filter.ts} +0 -0
package/src/Store/Nyris.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { createSlice } from "@reduxjs/toolkit";
|
|
2
|
-
|
|
3
|
-
export type NyrisAppPart = "start" | "camera" | "results";
|
|
4
|
-
export type NyrisFeedbackState =
|
|
5
|
-
| "hidden"
|
|
6
|
-
| "question"
|
|
7
|
-
| "positive"
|
|
8
|
-
| "negative";
|
|
9
|
-
export interface NyrisAppState {
|
|
10
|
-
showPart: NyrisAppPart;
|
|
11
|
-
feedbackState: NyrisFeedbackState;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const initialState: NyrisAppState | NyrisFeedbackState = {
|
|
15
|
-
showPart: "start",
|
|
16
|
-
feedbackState: "hidden",
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const nyrisSlice = createSlice({
|
|
20
|
-
name: "nyris",
|
|
21
|
-
initialState,
|
|
22
|
-
reducers: {
|
|
23
|
-
showStart: (state) => {
|
|
24
|
-
return {
|
|
25
|
-
...state,
|
|
26
|
-
showPart: "start",
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
showCamera: (state) => {
|
|
30
|
-
return {
|
|
31
|
-
...state,
|
|
32
|
-
showPart: "camera",
|
|
33
|
-
};
|
|
34
|
-
},
|
|
35
|
-
showResults: (state) => {
|
|
36
|
-
return {
|
|
37
|
-
...state,
|
|
38
|
-
showPart: "results",
|
|
39
|
-
};
|
|
40
|
-
},
|
|
41
|
-
showFeedback: (state) => {
|
|
42
|
-
return {
|
|
43
|
-
...state,
|
|
44
|
-
feedbackState: "question",
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
hideFeedback: (state) => {
|
|
48
|
-
return {
|
|
49
|
-
...state,
|
|
50
|
-
feedbackState: "hidden",
|
|
51
|
-
};
|
|
52
|
-
},
|
|
53
|
-
feedbackSubmitPositive: (state) => {
|
|
54
|
-
return {
|
|
55
|
-
...state,
|
|
56
|
-
feedbackState: "positive",
|
|
57
|
-
};
|
|
58
|
-
},
|
|
59
|
-
feedbackNegative: (state) => {
|
|
60
|
-
return {
|
|
61
|
-
...state,
|
|
62
|
-
feedbackState: "negative",
|
|
63
|
-
};
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export const {
|
|
69
|
-
showStart,
|
|
70
|
-
showCamera,
|
|
71
|
-
showResults,
|
|
72
|
-
showFeedback,
|
|
73
|
-
hideFeedback,
|
|
74
|
-
feedbackSubmitPositive,
|
|
75
|
-
feedbackNegative,
|
|
76
|
-
} = nyrisSlice.actions;
|
|
77
|
-
export default nyrisSlice.reducer;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Box } from '@material-ui/core';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { NavLink } from 'react-router-dom';
|
|
4
|
-
import './common.scss';
|
|
5
|
-
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
6
|
-
import { reset } from 'Store/Search';
|
|
7
|
-
|
|
8
|
-
function HeaderNewVersion(): JSX.Element {
|
|
9
|
-
const dispatch = useAppDispatch();
|
|
10
|
-
const { settings } = useAppSelector(state => state);
|
|
11
|
-
return (
|
|
12
|
-
<Box className="box-content" display={'flex'}>
|
|
13
|
-
<NavLink
|
|
14
|
-
to="/"
|
|
15
|
-
style={{ lineHeight: 0, paddingLeft: '10px' }}
|
|
16
|
-
onClick={() => {
|
|
17
|
-
dispatch(reset(''));
|
|
18
|
-
}}
|
|
19
|
-
>
|
|
20
|
-
<img
|
|
21
|
-
src={settings.theme?.appBarLogoUrl}
|
|
22
|
-
alt="logo"
|
|
23
|
-
style={{
|
|
24
|
-
aspectRatio: 1,
|
|
25
|
-
width: settings.theme?.logoWidth,
|
|
26
|
-
height: settings.theme?.logoHeight,
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
</NavLink>
|
|
30
|
-
</Box>
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export default HeaderNewVersion;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { CategoryPrediction, Code, RectCoords, Region } from '@nyris/nyris-api';
|
|
2
|
-
import { AppSettings, CanvasWithId } from '../../types';
|
|
3
|
-
import { NyrisAppPart, NyrisFeedbackState } from '../../Store/Nyris';
|
|
4
|
-
|
|
5
|
-
export interface AppHandlers {
|
|
6
|
-
onExampleImageClick: (url: string) => void;
|
|
7
|
-
onImageClick: (position: number, url: string) => void;
|
|
8
|
-
onLinkClick: (position: number, url: string) => void;
|
|
9
|
-
onFileDropped: (file: File) => void;
|
|
10
|
-
onCaptureComplete: (image: HTMLCanvasElement) => void;
|
|
11
|
-
onCaptureCanceled: () => void;
|
|
12
|
-
onSelectFile: (f: File) => void;
|
|
13
|
-
onCameraClick: () => void;
|
|
14
|
-
onShowStart: () => void;
|
|
15
|
-
onSelectionChange: (r: RectCoords) => void;
|
|
16
|
-
onPositiveFeedback: () => void;
|
|
17
|
-
onNegativeFeedback: () => void;
|
|
18
|
-
onCloseFeedback: () => void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface AppProps {
|
|
22
|
-
search: {
|
|
23
|
-
results: any[];
|
|
24
|
-
requestId?: string;
|
|
25
|
-
duration?: number;
|
|
26
|
-
categoryPredictions: CategoryPrediction[];
|
|
27
|
-
codes: Code[];
|
|
28
|
-
filterOptions: string[];
|
|
29
|
-
errorMessage?: string;
|
|
30
|
-
regions: Region[];
|
|
31
|
-
previewSelection: RectCoords;
|
|
32
|
-
toastErrorMessage?: string;
|
|
33
|
-
};
|
|
34
|
-
acceptTypes: string;
|
|
35
|
-
previewImage?: CanvasWithId;
|
|
36
|
-
settings: AppSettings;
|
|
37
|
-
loading: boolean;
|
|
38
|
-
showPart: NyrisAppPart;
|
|
39
|
-
feedbackState: NyrisFeedbackState;
|
|
40
|
-
handlers: AppHandlers;
|
|
41
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export const dataFieldOne = [
|
|
2
|
-
{
|
|
3
|
-
value: "dataFieldOne",
|
|
4
|
-
title: "Filter one with a longer title",
|
|
5
|
-
},
|
|
6
|
-
];
|
|
7
|
-
export const dataFieldTow = [
|
|
8
|
-
{
|
|
9
|
-
value: "dataFieldTow",
|
|
10
|
-
title: "Filter two",
|
|
11
|
-
},
|
|
12
|
-
];
|
|
13
|
-
export const dataFieldThree = [
|
|
14
|
-
{
|
|
15
|
-
value: "dataFieldThree",
|
|
16
|
-
title: "Filter three with a smaller title",
|
|
17
|
-
},
|
|
18
|
-
];
|
|
19
|
-
export const dataFieldFour = [
|
|
20
|
-
{
|
|
21
|
-
value: "dataFieldFour",
|
|
22
|
-
title: "Filter four",
|
|
23
|
-
},
|
|
24
|
-
];
|
|
25
|
-
export const dataFieldFive = [
|
|
26
|
-
{
|
|
27
|
-
value: "dataFieldFive",
|
|
28
|
-
title: "Filter five",
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
export const dataFieldSix = [
|
|
32
|
-
{
|
|
33
|
-
value: "dataFieldSix",
|
|
34
|
-
title: "Filter six",
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
|
|
38
|
-
export const showHits = [
|
|
39
|
-
{ value: 10, label: "10" },
|
|
40
|
-
{ value: 20, label: "20" },
|
|
41
|
-
{ value: 30, label: "30" },
|
|
42
|
-
{ value: 40, label: "40" },
|
|
43
|
-
{ value: 50, label: "50" },
|
|
44
|
-
{ value: 60, label: "60" },
|
|
45
|
-
{ value: 70, label: "70" },
|
|
46
|
-
{ value: 80, label: "80" },
|
|
47
|
-
{ value: 90, label: "90" },
|
|
48
|
-
{ value: 100, label: "100" },
|
|
49
|
-
];
|
|
50
|
-
|
/package/build/static/js/{2.fe9108d5.chunk.js.LICENSE.txt → 2.ad8c5320.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|
/package/build/static/js/{main.83cb88a3.chunk.js.LICENSE.txt → main.7c54ad4d.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|
|
File without changes
|