@nyris/nyris-webapp 0.3.34 → 0.3.36
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 +13 -13
- package/build/index.html +1 -1
- package/build/{precache-manifest.b85c7807a93875355f9f0f6490e6dc8c.js → precache-manifest.a2657ad49c132fb9c82629d37be15547.js} +14 -14
- package/build/service-worker.js +1 -1
- package/build/static/css/main.41fb4769.chunk.css +2 -0
- package/build/static/css/main.41fb4769.chunk.css.map +1 -0
- package/build/static/js/2.ff44260e.chunk.js +3 -0
- package/build/static/js/2.ff44260e.chunk.js.map +1 -0
- package/build/static/js/main.0b3b11fc.chunk.js +3 -0
- package/build/static/js/main.0b3b11fc.chunk.js.map +1 -0
- package/build/static/media/error.48b946a9.svg +3 -0
- package/package.json +3 -3
- package/public/index.html +13 -0
- package/src/Store/search/Search.ts +4 -4
- package/src/Store/search/search.initialState.ts +1 -1
- package/src/Store/search/types.ts +1 -1
- package/src/common/assets/icons/arrow_left.svg +3 -0
- package/src/common/assets/icons/arrow_right.svg +3 -0
- package/src/common/assets/icons/error.svg +3 -0
- package/src/components/AppMobile.tsx +111 -0
- package/src/components/DetailItem.tsx +21 -18
- package/src/components/DragDropFile.tsx +5 -4
- package/src/components/FooterMobile.tsx +9 -3
- package/src/components/Header.tsx +2 -1
- package/src/components/HeaderMobile.tsx +5 -3
- package/src/components/ImageCaptureHelpModal.tsx +7 -1
- package/src/components/ImagePreviewMobile.tsx +87 -0
- package/src/components/Layout.tsx +32 -92
- package/src/components/ProductList/index.tsx +4 -1
- package/src/components/RfqBanner.tsx +120 -0
- package/src/components/SidePanel.tsx +147 -0
- package/src/components/appMobile.scss +147 -142
- package/src/components/carousel/ImagePreviewCarousel.tsx +1 -7
- package/src/components/drawer/cameraCustom.tsx +5 -4
- package/src/components/input/inputSearch.tsx +12 -7
- package/src/components/modal/DefaultModal.tsx +1 -1
- package/src/components/pre-filter/index.tsx +144 -83
- package/src/components/results/ItemResult.tsx +9 -20
- package/src/components/rfq/RfqModal.tsx +262 -0
- package/src/helpers/ToastHelper.ts +10 -0
- package/src/helpers/getCroppedCanvas.ts +26 -0
- package/src/hooks/useFilteredRegions.ts +37 -0
- package/src/index.css +0 -4
- package/src/page/landingPage/AppMD.tsx +0 -11
- package/src/page/landingPage/AppMobile.tsx +1 -0
- package/src/page/landingPage/common.scss +44 -60
- package/src/page/result/index.tsx +256 -309
- package/src/translations.ts +2 -2
- package/src/types.ts +1 -0
- package/src/utils.ts +0 -1
- package/build/static/css/main.f2aa67fc.chunk.css +0 -2
- package/build/static/css/main.f2aa67fc.chunk.css.map +0 -1
- package/build/static/js/2.d1f7e826.chunk.js +0 -3
- package/build/static/js/2.d1f7e826.chunk.js.map +0 -1
- package/build/static/js/main.e9aec8a9.chunk.js +0 -3
- package/build/static/js/main.e9aec8a9.chunk.js.map +0 -1
- package/build/static/media/support3.4a17f96e.svg +0 -3
- package/src/hooks/useVisualSearch.tsx +0 -77
- /package/build/static/js/{2.d1f7e826.chunk.js.LICENSE.txt → 2.ff44260e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.e9aec8a9.chunk.js.LICENSE.txt → main.0b3b11fc.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.666504 10.1905H1.85698V2.4524C1.85698 2.09526 2.09508 1.85716 2.45222 1.85716H10.1903V0.666687H2.45222C1.44031 0.666687 0.666504 1.4405 0.666504 2.4524V10.1905ZM4.23786 3.04763H16.1426C16.8569 3.04763 17.3331 3.52382 17.3331 4.23811V12.5714C17.3331 13.2857 16.8569 13.7619 16.1426 13.7619H12.4521L9.95215 17.3333L8.99977 16.6191L11.8569 12.5714H16.1426V4.23811H4.23786V12.5714H8.99977V13.7619H4.23786C3.52357 13.7619 3.04738 13.2857 3.04738 12.5714V4.23811C3.04738 3.52382 3.52357 3.04763 4.23786 3.04763Z" fill="white"/>
|
|
3
|
-
</svg>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { RectCoords } from '@nyris/nyris-api';
|
|
2
|
-
import { useCallback } from 'react';
|
|
3
|
-
import { useMediaQuery } from 'react-responsive';
|
|
4
|
-
import { feedbackClickEpic } from 'services/Feedback';
|
|
5
|
-
import { createImage, findByImage, findRegions } from 'services/image';
|
|
6
|
-
import { showFeedback, showResults } from 'Store/nyris/Nyris';
|
|
7
|
-
import {
|
|
8
|
-
loadingActionResults,
|
|
9
|
-
onToggleModalItemDetail,
|
|
10
|
-
setImageSearchInput,
|
|
11
|
-
setRegions,
|
|
12
|
-
setRequestImage,
|
|
13
|
-
setSearchResults,
|
|
14
|
-
setSelectedRegion,
|
|
15
|
-
updateStatusLoading,
|
|
16
|
-
} from 'Store/search/Search';
|
|
17
|
-
import { useAppDispatch, useAppSelector } from 'Store/Store';
|
|
18
|
-
|
|
19
|
-
export const useVisualSearch = () => {
|
|
20
|
-
const dispatch = useAppDispatch();
|
|
21
|
-
const stateGlobal = useAppSelector((state: any) => state);
|
|
22
|
-
const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
|
|
23
|
-
|
|
24
|
-
const getUrlToCanvasFile = useCallback(
|
|
25
|
-
async (url: string, position?: number) => {
|
|
26
|
-
const {
|
|
27
|
-
search: { keyFilter },
|
|
28
|
-
settings,
|
|
29
|
-
} = stateGlobal;
|
|
30
|
-
|
|
31
|
-
dispatch(updateStatusLoading(true));
|
|
32
|
-
if (isMobile) {
|
|
33
|
-
// executeScroll();
|
|
34
|
-
// setOpenModalImage(false);
|
|
35
|
-
dispatch(onToggleModalItemDetail(false));
|
|
36
|
-
}
|
|
37
|
-
dispatch(showResults());
|
|
38
|
-
dispatch(loadingActionResults());
|
|
39
|
-
dispatch(setImageSearchInput(url));
|
|
40
|
-
let image = await createImage(url);
|
|
41
|
-
dispatch(setRequestImage(image));
|
|
42
|
-
|
|
43
|
-
if (position) {
|
|
44
|
-
feedbackClickEpic(stateGlobal, position);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
let searchRegion: RectCoords | undefined = undefined;
|
|
48
|
-
|
|
49
|
-
if (settings.regions) {
|
|
50
|
-
let res = await findRegions(image, settings);
|
|
51
|
-
searchRegion = res.selectedRegion;
|
|
52
|
-
dispatch(setRegions(res.regions));
|
|
53
|
-
dispatch(setSelectedRegion(searchRegion));
|
|
54
|
-
}
|
|
55
|
-
const preFilter = [
|
|
56
|
-
{
|
|
57
|
-
key: settings.visualSearchFilterKey,
|
|
58
|
-
values: [`${keyFilter}`],
|
|
59
|
-
},
|
|
60
|
-
];
|
|
61
|
-
findByImage({
|
|
62
|
-
image,
|
|
63
|
-
settings,
|
|
64
|
-
region: searchRegion,
|
|
65
|
-
filters: keyFilter ? preFilter : undefined,
|
|
66
|
-
}).then(res => {
|
|
67
|
-
dispatch(setSearchResults(res));
|
|
68
|
-
dispatch(showFeedback());
|
|
69
|
-
dispatch(updateStatusLoading(false));
|
|
70
|
-
return;
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
[dispatch, stateGlobal, isMobile],
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
return { getUrlToCanvasFile };
|
|
77
|
-
};
|
/package/build/static/js/{2.d1f7e826.chunk.js.LICENSE.txt → 2.ff44260e.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|
/package/build/static/js/{main.e9aec8a9.chunk.js.LICENSE.txt → main.0b3b11fc.chunk.js.LICENSE.txt}
RENAMED
|
File without changes
|