@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.
Files changed (60) hide show
  1. package/build/asset-manifest.json +13 -13
  2. package/build/index.html +1 -1
  3. package/build/{precache-manifest.b85c7807a93875355f9f0f6490e6dc8c.js → precache-manifest.a2657ad49c132fb9c82629d37be15547.js} +14 -14
  4. package/build/service-worker.js +1 -1
  5. package/build/static/css/main.41fb4769.chunk.css +2 -0
  6. package/build/static/css/main.41fb4769.chunk.css.map +1 -0
  7. package/build/static/js/2.ff44260e.chunk.js +3 -0
  8. package/build/static/js/2.ff44260e.chunk.js.map +1 -0
  9. package/build/static/js/main.0b3b11fc.chunk.js +3 -0
  10. package/build/static/js/main.0b3b11fc.chunk.js.map +1 -0
  11. package/build/static/media/error.48b946a9.svg +3 -0
  12. package/package.json +3 -3
  13. package/public/index.html +13 -0
  14. package/src/Store/search/Search.ts +4 -4
  15. package/src/Store/search/search.initialState.ts +1 -1
  16. package/src/Store/search/types.ts +1 -1
  17. package/src/common/assets/icons/arrow_left.svg +3 -0
  18. package/src/common/assets/icons/arrow_right.svg +3 -0
  19. package/src/common/assets/icons/error.svg +3 -0
  20. package/src/components/AppMobile.tsx +111 -0
  21. package/src/components/DetailItem.tsx +21 -18
  22. package/src/components/DragDropFile.tsx +5 -4
  23. package/src/components/FooterMobile.tsx +9 -3
  24. package/src/components/Header.tsx +2 -1
  25. package/src/components/HeaderMobile.tsx +5 -3
  26. package/src/components/ImageCaptureHelpModal.tsx +7 -1
  27. package/src/components/ImagePreviewMobile.tsx +87 -0
  28. package/src/components/Layout.tsx +32 -92
  29. package/src/components/ProductList/index.tsx +4 -1
  30. package/src/components/RfqBanner.tsx +120 -0
  31. package/src/components/SidePanel.tsx +147 -0
  32. package/src/components/appMobile.scss +147 -142
  33. package/src/components/carousel/ImagePreviewCarousel.tsx +1 -7
  34. package/src/components/drawer/cameraCustom.tsx +5 -4
  35. package/src/components/input/inputSearch.tsx +12 -7
  36. package/src/components/modal/DefaultModal.tsx +1 -1
  37. package/src/components/pre-filter/index.tsx +144 -83
  38. package/src/components/results/ItemResult.tsx +9 -20
  39. package/src/components/rfq/RfqModal.tsx +262 -0
  40. package/src/helpers/ToastHelper.ts +10 -0
  41. package/src/helpers/getCroppedCanvas.ts +26 -0
  42. package/src/hooks/useFilteredRegions.ts +37 -0
  43. package/src/index.css +0 -4
  44. package/src/page/landingPage/AppMD.tsx +0 -11
  45. package/src/page/landingPage/AppMobile.tsx +1 -0
  46. package/src/page/landingPage/common.scss +44 -60
  47. package/src/page/result/index.tsx +256 -309
  48. package/src/translations.ts +2 -2
  49. package/src/types.ts +1 -0
  50. package/src/utils.ts +0 -1
  51. package/build/static/css/main.f2aa67fc.chunk.css +0 -2
  52. package/build/static/css/main.f2aa67fc.chunk.css.map +0 -1
  53. package/build/static/js/2.d1f7e826.chunk.js +0 -3
  54. package/build/static/js/2.d1f7e826.chunk.js.map +0 -1
  55. package/build/static/js/main.e9aec8a9.chunk.js +0 -3
  56. package/build/static/js/main.e9aec8a9.chunk.js.map +0 -1
  57. package/build/static/media/support3.4a17f96e.svg +0 -3
  58. package/src/hooks/useVisualSearch.tsx +0 -77
  59. /package/build/static/js/{2.d1f7e826.chunk.js.LICENSE.txt → 2.ff44260e.chunk.js.LICENSE.txt} +0 -0
  60. /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
- };