@nyris/nyris-webapp 0.3.50 → 0.3.52

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 (158) hide show
  1. package/README.md +18 -92
  2. package/build/asset-manifest.json +90 -69
  3. package/build/index.html +1 -1
  4. package/build/js/settings.example.js +7 -0
  5. package/build/static/css/main.aa443e67.css +2 -0
  6. package/build/static/css/main.aa443e67.css.map +1 -0
  7. package/build/static/js/main.e023bcc5.js +3 -0
  8. package/build/static/js/main.e023bcc5.js.LICENSE.txt +268 -0
  9. package/build/static/js/main.e023bcc5.js.map +1 -0
  10. package/build/static/media/{Union.2545c072.svg → Union.dce5234bc686d28b45df0a5aea6ef6d1.svg} +1 -1
  11. package/package.json +47 -74
  12. package/public/js/settings.example.js +7 -0
  13. package/src/Store/Store.ts +6 -0
  14. package/src/common/assets/icons/Union.svg +1 -1
  15. package/src/components/AppMobile.tsx +16 -11
  16. package/src/components/CadenasWebViewer.tsx +2 -3
  17. package/src/components/DragDropFile.tsx +35 -32
  18. package/src/components/FilterComponent.tsx +4 -6
  19. package/src/components/FooterMobile.tsx +16 -13
  20. package/src/components/Header.tsx +3 -3
  21. package/src/components/HeaderMobile.tsx +42 -43
  22. package/src/components/ImageCaptureHelpModal.tsx +13 -10
  23. package/src/components/ImagePreviewMobile.tsx +24 -23
  24. package/src/components/Inquiry/InquiryBanner.tsx +13 -14
  25. package/src/components/Inquiry/InquiryModal.tsx +1 -1
  26. package/src/components/Layout.tsx +11 -6
  27. package/src/components/Loading.tsx +2 -3
  28. package/src/components/PanelResult/PostFilter.tsx +9 -9
  29. package/src/components/PanelResult/PostFilterAlgolia.tsx +9 -9
  30. package/src/components/PanelResult/expandable-panel.tsx +3 -3
  31. package/src/components/ProductAttribute.tsx +26 -19
  32. package/src/components/ProductDetailView.tsx +80 -80
  33. package/src/components/ProductList/index.tsx +6 -7
  34. package/src/components/SelectedPostFilter.tsx +2 -3
  35. package/src/components/ShareModal.tsx +20 -21
  36. package/src/components/SidePanel.tsx +18 -18
  37. package/src/components/carousel/ImagePreviewCarousel.tsx +7 -3
  38. package/src/components/default-select.tsx +5 -7
  39. package/src/components/drawer/cameraCustom.tsx +45 -41
  40. package/src/components/input/inputSearch.tsx +48 -42
  41. package/src/components/pre-filter/index.tsx +56 -52
  42. package/src/components/results/ItemResult.tsx +123 -96
  43. package/src/components/rfq/RfqBanner.tsx +13 -14
  44. package/src/components/rfq/RfqModal.tsx +1 -1
  45. package/src/index.tsx +20 -21
  46. package/src/page/landingPage/AppMD.tsx +8 -9
  47. package/src/page/landingPage/AppMobile.tsx +2 -3
  48. package/src/page/landingPage/common.scss +2 -4
  49. package/src/page/result/index.tsx +92 -75
  50. package/src/translations.ts +2 -0
  51. package/src/types.ts +8 -0
  52. package/tsconfig.json +11 -5
  53. package/api-mocks/feedback/v1/OPTIONS.mock +0 -6
  54. package/api-mocks/feedback/v1/POST.mock +0 -4
  55. package/api-mocks/find/v1/OPTIONS.mock +0 -6
  56. package/api-mocks/find/v1/POST.mock +0 -7
  57. package/api-mocks/find/v1/regions/OPTIONS.mock +0 -6
  58. package/api-mocks/find/v1/regions/POST.mock +0 -6
  59. package/build/precache-manifest.94e48d131d31de9b354f61c68a3ed830.js +0 -366
  60. package/build/service-worker.js +0 -39
  61. package/build/static/css/2.27ad1145.chunk.css +0 -2
  62. package/build/static/css/2.27ad1145.chunk.css.map +0 -1
  63. package/build/static/css/main.24b5a712.chunk.css +0 -2
  64. package/build/static/css/main.24b5a712.chunk.css.map +0 -1
  65. package/build/static/js/2.3399db0d.chunk.js +0 -3
  66. package/build/static/js/2.3399db0d.chunk.js.LICENSE.txt +0 -275
  67. package/build/static/js/2.3399db0d.chunk.js.map +0 -1
  68. package/build/static/js/main.b75d8ff6.chunk.js +0 -3
  69. package/build/static/js/main.b75d8ff6.chunk.js.LICENSE.txt +0 -1
  70. package/build/static/js/main.b75d8ff6.chunk.js.map +0 -1
  71. package/build/static/js/runtime-main.1ff80965.js +0 -2
  72. package/build/static/js/runtime-main.1ff80965.js.map +0 -1
  73. package/src/components/Panigation/Pagination.tsx +0 -135
  74. package/src/components/results/ItemResult.test.tsx +0 -0
  75. package/src/helpers/CommonHelper.test.ts +0 -0
  76. package/src/serviceWorker.ts +0 -143
  77. /package/build/static/media/{3d.24adb2c2.svg → 3d.a7aa94395eaef439de4bb07d24f56e21.svg} +0 -0
  78. /package/build/static/media/{Fill.619a9d98.svg → Fill.004d04ac1ba9c868101ab485bcfd0b0e.svg} +0 -0
  79. /package/build/static/media/{IconUploadDownward.6b47ab39.svg → IconUploadDownward.ed1260bef14fbf9352364ad0f08a416e.svg} +0 -0
  80. /package/build/static/media/{SourceSans3-Bold.a923b66a.ttf → SourceSans3-Bold.17e068739e42bdb30d1c.ttf} +0 -0
  81. /package/build/static/media/{SourceSans3-Light.d1772158.ttf → SourceSans3-Light.37264fa35ee0d5f209ea.ttf} +0 -0
  82. /package/build/static/media/{SourceSans3-Medium.fda30e61.ttf → SourceSans3-Medium.c82b4c53fc5d38ef5784.ttf} +0 -0
  83. /package/build/static/media/{SourceSans3-Regular.04f1a4f0.ttf → SourceSans3-Regular.c69f9658f16351f79f33.ttf} +0 -0
  84. /package/build/static/media/{SourceSans3-SemiBold.cf5be839.ttf → SourceSans3-SemiBold.5ad6683a8a06e3ccea94.ttf} +0 -0
  85. /package/build/static/media/{add.ba46a4bf.svg → add.2b72cedb98c4c89c954266d2356c166c.svg} +0 -0
  86. /package/build/static/media/{arrow_down.c1b611db.svg → arrow_down.f417689ce292978a8292a7f00407fdd5.svg} +0 -0
  87. /package/build/static/media/{arrow_left.fd9d4390.svg → arrow_left.73d03a534eaf9b99ab196e0fb67da602.svg} +0 -0
  88. /package/build/static/media/{arrow_right.c6fdab0b.svg → arrow_right.59a4594a3a1657037537dbae1eee0251.svg} +0 -0
  89. /package/build/static/media/{arrow_up.fcd6b144.svg → arrow_up.85dbe70bc51ec32c8894a06499330f14.svg} +0 -0
  90. /package/build/static/media/{avatar.4c5346ed.svg → avatar.43b4f53e7174b4cfd59c51b7acf6236b.svg} +0 -0
  91. /package/build/static/media/{bgDragmobile.e4913a92.svg → bgDragmobile.487091d95d6abb2a2711.svg} +0 -0
  92. /package/build/static/media/{call.c3c23966.svg → call.91e7bfc7a94979c6981988194b45850c.svg} +0 -0
  93. /package/build/static/media/{camera.ae3f4f51.svg → camera.7fc9fe03d10f926524c9b436720371c6.svg} +0 -0
  94. /package/build/static/media/{close.07dcb75c.svg → close.feb72bdc7227b9333f9528e260dd1217.svg} +0 -0
  95. /package/build/static/media/{download.d6432d26.svg → download.8007f7c72e2080a9ffa96fa63d480dcf.svg} +0 -0
  96. /package/build/static/media/{email_share.92bbfb8b.svg → email_share.0b8aeb4edc7c53e944b9c403ec77df2e.svg} +0 -0
  97. /package/build/static/media/{error.48b946a9.svg → error.560997da69fcc36e10dafe36df4af593.svg} +0 -0
  98. /package/build/static/media/{filter.bc412f08.svg → filter.9fdd64df67735e0fbf0dd7d1df32921c.svg} +0 -0
  99. /package/build/static/media/{filter_settings.fa0682a5.svg → filter_settings.f93788883c7fbbcd3ae194e45294d0de.svg} +0 -0
  100. /package/build/static/media/{home.defd14bf.svg → home.9ffb65a9c0be8fc5a502ba05cf5f719c.svg} +0 -0
  101. /package/build/static/media/{ic_cam.5318e2d0.svg → ic_cam.659852ba686874f710cc.svg} +0 -0
  102. /package/build/static/media/{ic_close_feedback.f0834c16.svg → ic_close_feedback.f0ab3c1557a131281039.svg} +0 -0
  103. /package/build/static/media/{ic_shopNow.0348013a.svg → ic_shopNow.71d2c270d716e3774615.svg} +0 -0
  104. /package/build/static/media/{ic_shopNowLight.d8eadc1e.svg → ic_shopNowLight.628bb04870f5af9a524f.svg} +0 -0
  105. /package/build/static/media/{icon_camera_mobile.4d7a272f.svg → icon_camera_mobile.6772053c4dfef487255649d2a05cc9d4.svg} +0 -0
  106. /package/build/static/media/{icon_dislike.0533c64a.svg → icon_dislike.cab8f1f21bc5222aba2d3ca689e4f392.svg} +0 -0
  107. /package/build/static/media/{icon_email.71b21005.svg → icon_email.f22810a3dd1b4e6853c68c134ee043b3.svg} +0 -0
  108. /package/build/static/media/{icon_like.80c66e3a.svg → icon_like.049f5c42107aa03b8ebae58cc8c088ca.svg} +0 -0
  109. /package/build/static/media/{icon_search.373c3cc4.svg → icon_search.cc17077df07fb2b82c0d58f9bddc7974.svg} +0 -0
  110. /package/build/static/media/{icon_search_image2.4c4af888.svg → icon_search_image2.4f4458c1e16dc5092f2367003d3aa1e4.svg} +0 -0
  111. /package/build/static/media/{img-1-1.6144e5f9.png → img-1-1.130fb8d0203452fee547.png} +0 -0
  112. /package/build/static/media/{img-1-2.ad943f0f.png → img-1-2.c512de6393df34bd1e61.png} +0 -0
  113. /package/build/static/media/{img2-1.a87c79c7.png → img2-1.2adc75df85eab5c127f9.png} +0 -0
  114. /package/build/static/media/{img2-2.39c5b73f.png → img2-2.c68532d4f95dbc63c69a.png} +0 -0
  115. /package/build/static/media/{img3-1.443b0c3a.png → img3-1.6eb26a22e6ea83629d27.png} +0 -0
  116. /package/build/static/media/{img3-2.37db7999.png → img3-2.39ae54b4032d52c79a3a.png} +0 -0
  117. /package/build/static/media/{img4-1.9c34c158.png → img4-1.a7594bfa47b01d2a0890.png} +0 -0
  118. /package/build/static/media/{img4-2.9d280a04.png → img4-2.24c0cbafe1a7ad7c24b5.png} +0 -0
  119. /package/build/static/media/{img5-1.b61dbd4d.png → img5-1.e6865b52df58608fd968.png} +0 -0
  120. /package/build/static/media/{img5-2.1c77c093.png → img5-2.ae59543efec34daf3554.png} +0 -0
  121. /package/build/static/media/{img6-1.8b03dd21.png → img6-1.c8bb209cdce72c2d8033.png} +0 -0
  122. /package/build/static/media/{img6-2.1e3e7fed.png → img6-2.b442f90b3e503ac33510.png} +0 -0
  123. /package/build/static/media/{info-tooltip.b98e8a9c.svg → info-tooltip.38185b73956d2d230d38d8254bb7fd91.svg} +0 -0
  124. /package/build/static/media/{logout.07b9ef7f.svg → logout.b544fcd2969edf431a1e998333119834.svg} +0 -0
  125. /package/build/static/media/{minus.3fce6c0a.svg → minus.dee9c571642279cf2af9ed09108cadd8.svg} +0 -0
  126. /package/build/static/media/{no-image.04b676b3.svg → no-image.0792bd463c7917d0b67f4a55a9bc55d9.svg} +0 -0
  127. /package/build/static/media/{powered_by_nyris.e6766baf.svg → powered_by_nyris.218facc4a2986cc09b183eeeb205b0c2.svg} +0 -0
  128. /package/build/static/media/{powered_by_nyris_colored.08d00bae.svg → powered_by_nyris_colored.7177945f25f07f85f8f57e02e15c0878.svg} +0 -0
  129. /package/build/static/media/{reverse_camera.28c80509.svg → reverse_camera.cee0200b151941cc83c182167a85d667.svg} +0 -0
  130. /package/build/static/media/{roboto-latin-100.5cb7edfc.woff → roboto-latin-100.a45108d3b34af91f9113.woff} +0 -0
  131. /package/build/static/media/{roboto-latin-100.7370c367.woff2 → roboto-latin-100.c2aa4ab115bf9c6057cb.woff2} +0 -0
  132. /package/build/static/media/{roboto-latin-100italic.f9e8e590.woff → roboto-latin-100italic.451d4e559d6f57cdf6a1.woff} +0 -0
  133. /package/build/static/media/{roboto-latin-100italic.f8b1df51.woff2 → roboto-latin-100italic.7f839a8652da29745ce4.woff2} +0 -0
  134. /package/build/static/media/{roboto-latin-300.ef7c6637.woff2 → roboto-latin-300.37a7069dc30fc663c878.woff2} +0 -0
  135. /package/build/static/media/{roboto-latin-300.b00849e0.woff → roboto-latin-300.865f928cbabcc9f8f2b5.woff} +0 -0
  136. /package/build/static/media/{roboto-latin-300italic.4df32891.woff → roboto-latin-300italic.bd5b7a13f2c52b531a2a.woff} +0 -0
  137. /package/build/static/media/{roboto-latin-300italic.14286f3b.woff2 → roboto-latin-300italic.c64e7e354c88e613c77c.woff2} +0 -0
  138. /package/build/static/media/{roboto-latin-400.479970ff.woff2 → roboto-latin-400.176f8f5bd5f02b3abfcf.woff2} +0 -0
  139. /package/build/static/media/{roboto-latin-400.60fa3c06.woff → roboto-latin-400.49ae34d4cc6b98c00c69.woff} +0 -0
  140. /package/build/static/media/{roboto-latin-400italic.fe65b833.woff → roboto-latin-400italic.b1d9d9904bfca8802a63.woff} +0 -0
  141. /package/build/static/media/{roboto-latin-400italic.51521a2a.woff2 → roboto-latin-400italic.d022bc70dc1bf7b3425d.woff2} +0 -0
  142. /package/build/static/media/{roboto-latin-500.87284894.woff → roboto-latin-500.cea99d3e3e13a3a599a0.woff} +0 -0
  143. /package/build/static/media/{roboto-latin-500.020c97dc.woff2 → roboto-latin-500.f5b74d7ffcdf85b9dd60.woff2} +0 -0
  144. /package/build/static/media/{roboto-latin-500italic.db4a2a23.woff2 → roboto-latin-500italic.0d8bb5b3ee5f5dac9e44.woff2} +0 -0
  145. /package/build/static/media/{roboto-latin-500italic.288ad9c6.woff → roboto-latin-500italic.18d00f739ff1e1c52db1.woff} +0 -0
  146. /package/build/static/media/{roboto-latin-700.adcde98f.woff → roboto-latin-700.2267169ee7270a22a963.woff} +0 -0
  147. /package/build/static/media/{roboto-latin-700.2735a3a6.woff2 → roboto-latin-700.c18ee39fb002ad58b6dc.woff2} +0 -0
  148. /package/build/static/media/{roboto-latin-700italic.da0e7178.woff2 → roboto-latin-700italic.7d8125ff7f707231fd89.woff2} +0 -0
  149. /package/build/static/media/{roboto-latin-700italic.81f57861.woff → roboto-latin-700italic.9360531f9bb817f917f0.woff} +0 -0
  150. /package/build/static/media/{roboto-latin-900.9b3766ef.woff2 → roboto-latin-900.870c8c1486f76054301a.woff2} +0 -0
  151. /package/build/static/media/{roboto-latin-900.bb1e4dc6.woff → roboto-latin-900.bac8362e7a6ea60b6983.woff} +0 -0
  152. /package/build/static/media/{roboto-latin-900italic.28f91510.woff → roboto-latin-900italic.c20d916c1a1b094c1cec.woff} +0 -0
  153. /package/build/static/media/{roboto-latin-900italic.ebf6d164.woff2 → roboto-latin-900italic.cb5ad999740e9d8a8bd1.woff2} +0 -0
  154. /package/build/static/media/{sectionTransBack.6cee2e36.svg → sectionTransBack.20491b21c659cd29499a.svg} +0 -0
  155. /package/build/static/media/{sectionTransTop.3dcf290f.svg → sectionTransTop.3a1dd8204a4137b92722.svg} +0 -0
  156. /package/build/static/media/{settings.e3c8138b.svg → settings.4b954549320dc34e0d000afd236cff2e.svg} +0 -0
  157. /package/build/static/media/{take_photo.76423216.svg → take_photo.42347c97c863fc8ec1afa36a56eb9ccb.svg} +0 -0
  158. /package/build/static/media/{trash.1624780d.svg → trash.ea9fa760f600fc578097ef0c01d5845f.svg} +0 -0
@@ -1,4 +1,4 @@
1
- import { Box, Button } from '@material-ui/core';
1
+ import { Button } from '@material-ui/core';
2
2
  import CloseIcon from '@material-ui/icons/Close';
3
3
  import { ReactComponent as IconFilter } from 'common/assets/icons/filter_settings.svg';
4
4
 
@@ -48,7 +48,6 @@ function HeaderMobileComponent(props: Props): JSX.Element {
48
48
  const { search } = stateGlobal;
49
49
  const {
50
50
  imageThumbSearchInput,
51
- textSearchInputMobile,
52
51
  preFilter,
53
52
  preFilterDropdown,
54
53
  valueTextSearch,
@@ -70,23 +69,23 @@ function HeaderMobileComponent(props: Props): JSX.Element {
70
69
  useEffect(() => {
71
70
  if (
72
71
  history.location?.pathname === '/result' &&
73
- (imageThumbSearchInput || textSearchInputMobile)
72
+ (imageThumbSearchInput || valueInput)
74
73
  ) {
75
74
  setShowFilter(true);
76
75
  } else {
77
76
  setShowFilter(false);
78
77
  }
79
- }, [imageThumbSearchInput, history.location, textSearchInputMobile]);
78
+ }, [imageThumbSearchInput, history.location, valueInput]);
80
79
 
81
80
  useEffect(() => {
82
81
  if (imageThumbSearchInput !== '') {
83
82
  history.push('/result');
84
83
  dispatch(updateValueTextSearchMobile(''));
84
+ setValueInput('');
85
85
  if (settings.algolia?.enabled) {
86
86
  refine('');
87
87
  } else {
88
88
  dispatch(updateQueryText(''));
89
- setValueInput('');
90
89
  }
91
90
  } else {
92
91
  if (settings.algolia?.enabled) {
@@ -101,6 +100,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
101
100
 
102
101
  useEffect(() => {
103
102
  if (!isEmpty(searchQuery)) {
103
+ setValueInput(searchQuery);
104
104
  dispatch(updateValueTextSearchMobile(searchQuery));
105
105
  if (settings.algolia?.enabled) {
106
106
  refine(searchQuery);
@@ -114,6 +114,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
114
114
  }
115
115
  }, [query, refine, dispatch, searchQuery, settings.algolia]);
116
116
 
117
+ // eslint-disable-next-line react-hooks/exhaustive-deps
117
118
  const searchOrRedirect = useCallback(
118
119
  debounce((value: any) => {
119
120
  if (!settings.algolia?.enabled) {
@@ -126,7 +127,6 @@ function HeaderMobileComponent(props: Props): JSX.Element {
126
127
  values: Object.keys(preFilter) as string[],
127
128
  },
128
129
  ];
129
-
130
130
  if (value || requestImage) {
131
131
  dispatch(updateStatusLoading(true));
132
132
  find({
@@ -137,7 +137,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
137
137
  text: value,
138
138
  })
139
139
  .then((res: any) => {
140
- res?.results.map((item: any) => {
140
+ res?.results.forEach((item: any) => {
141
141
  filters.push({
142
142
  sku: item.sku,
143
143
  score: item.score,
@@ -198,6 +198,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
198
198
  }, [valueTextSearch?.refinementList, settings, postFilter]);
199
199
 
200
200
  const onChangeText = (event: any) => {
201
+ setValueInput(event.currentTarget.value);
201
202
  // debounceSearch(event.currentTarget.value);
202
203
  searchOrRedirect(event.currentTarget.value);
203
204
  if (event.currentTarget.value === '') {
@@ -207,6 +208,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
207
208
  dispatch(updateValueTextSearchMobile(event.currentTarget.value));
208
209
  }
209
210
  };
211
+
210
212
  const disablePostFilter = useMemo(() => {
211
213
  if (settings.algolia.enabled) {
212
214
  return settings.postFilterOption &&
@@ -222,7 +224,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
222
224
  return (
223
225
  <div style={{ width: '100%', background: '#fff' }}>
224
226
  {history.location?.pathname !== '/result' && (
225
- <Box
227
+ <div
226
228
  className="box-content"
227
229
  style={{
228
230
  display: 'flex',
@@ -249,7 +251,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
249
251
  }}
250
252
  />
251
253
  </NavLink>
252
- </Box>
254
+ </div>
253
255
  )}
254
256
 
255
257
  {((auth0.enabled && user?.email_verified) || !auth0.enabled) && (
@@ -278,7 +280,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
278
280
  height: '100%',
279
281
  }}
280
282
  >
281
- <Box
283
+ <div
282
284
  className="pre-filter-icon"
283
285
  onClick={() => {
284
286
  if (settings.preFilterOption) {
@@ -307,7 +309,7 @@ function HeaderMobileComponent(props: Props): JSX.Element {
307
309
  {!settings.preFilterOption && (
308
310
  <IconSearch width={16} height={16} />
309
311
  )}
310
- {!isEmpty(preFilter) && (
312
+ {settings.preFilterOption && !isEmpty(preFilter) && (
311
313
  <div
312
314
  style={{
313
315
  position: 'absolute',
@@ -332,44 +334,41 @@ function HeaderMobileComponent(props: Props): JSX.Element {
332
334
  ></div>
333
335
  </div>
334
336
  )}
335
- </Box>
337
+ </div>
336
338
 
337
- <Input
338
- value={textSearchInputMobile || searchQuery || valueInput}
339
- onChange={onChangeText}
340
- />
339
+ <Input value={valueInput} onChange={onChangeText} />
341
340
 
342
- {history.location?.pathname !== '/' &&
343
- textSearchInputMobile && (
344
- <Button
345
- onClick={() => {
346
- if (imageThumbSearchInput) {
347
- history.push('/result');
348
- dispatch(updateValueTextSearchMobile(''));
349
- refine('');
350
- return;
351
- }
341
+ {history.location?.pathname !== '/' && valueInput && (
342
+ <Button
343
+ onClick={() => {
344
+ setValueInput('');
345
+ if (imageThumbSearchInput) {
346
+ history.push('/result');
352
347
  dispatch(updateValueTextSearchMobile(''));
353
- dispatch(reset(''));
354
348
  refine('');
355
- history.push('/');
356
- }}
349
+ return;
350
+ }
351
+ dispatch(updateValueTextSearchMobile(''));
352
+ dispatch(reset(''));
353
+ refine('');
354
+ history.push('/');
355
+ }}
356
+ style={{
357
+ // background: '#fff',
358
+ marginRight: '8px',
359
+ border: 0,
360
+ width: '40px',
361
+ height: '40px',
362
+ }}
363
+ >
364
+ <CloseIcon
357
365
  style={{
358
- // background: '#fff',
359
- marginRight: '8px',
360
- border: 0,
361
- width: '40px',
362
- height: '40px',
366
+ fontSize: 16,
367
+ color: settings.theme?.secondaryColor,
363
368
  }}
364
- >
365
- <CloseIcon
366
- style={{
367
- fontSize: 16,
368
- color: settings.theme?.secondaryColor,
369
- }}
370
- />
371
- </Button>
372
- )}
369
+ />
370
+ </Button>
371
+ )}
373
372
  </div>
374
373
  </div>
375
374
  </div>
@@ -1,4 +1,4 @@
1
- import { Box, Button } from '@material-ui/core';
1
+ import { Button } from '@material-ui/core';
2
2
  import React from 'react';
3
3
  import CloseIcon from '@material-ui/icons/Close';
4
4
  import { visualSearchHelp } from '../constants';
@@ -9,17 +9,20 @@ interface Props {
9
9
 
10
10
  function ImageCaptureHelpModal({ handleClose }: Props) {
11
11
  return (
12
- <Box
12
+ <div
13
13
  style={{
14
14
  paddingBottom: '24px',
15
15
  }}
16
16
  >
17
- <Box
18
- display={'flex'}
19
- justifyContent={'end'}
20
- position={'sticky'}
21
- top={0}
22
- style={{ background: 'white', width: '100%' }}
17
+ <div
18
+ style={{
19
+ display: 'flex',
20
+ justifyContent: 'end',
21
+ position: 'sticky',
22
+ top: 0,
23
+ background: 'white',
24
+ width: '100%',
25
+ }}
23
26
  >
24
27
  <Button
25
28
  onClick={handleClose}
@@ -27,7 +30,7 @@ function ImageCaptureHelpModal({ handleClose }: Props) {
27
30
  >
28
31
  <CloseIcon fontSize={'small'} />
29
32
  </Button>
30
- </Box>
33
+ </div>
31
34
  <p
32
35
  style={{
33
36
  fontSize: '40px',
@@ -94,7 +97,7 @@ function ImageCaptureHelpModal({ handleClose }: Props) {
94
97
  );
95
98
  })}
96
99
  </div>
97
- </Box>
100
+ </div>
98
101
  );
99
102
  }
100
103
 
@@ -1,5 +1,6 @@
1
+ // @ts-nocheck
1
2
  import React, { memo, useState } from 'react';
2
- import { Box, Typography, Hidden } from '@material-ui/core';
3
+ import { Typography, Hidden } from '@material-ui/core';
3
4
  import { RectCoords } from '@nyris/nyris-api';
4
5
  import { Preview } from '@nyris/nyris-react-components';
5
6
  import { DEFAULT_REGION } from '../constants';
@@ -75,7 +76,7 @@ function ImagePreviewMobileComponent({
75
76
  text: searchQuery,
76
77
  })
77
78
  .then((res: any) => {
78
- res?.results.map((item: any) => {
79
+ res?.results.forEach((item: any) => {
79
80
  filters.push({
80
81
  sku: item.sku,
81
82
  score: item.score,
@@ -100,7 +101,7 @@ function ImagePreviewMobileComponent({
100
101
  };
101
102
 
102
103
  return (
103
- <Box
104
+ <div
104
105
  className="col-left"
105
106
  style={{
106
107
  backgroundColor: '#5D5D63',
@@ -108,8 +109,8 @@ function ImagePreviewMobileComponent({
108
109
  }}
109
110
  >
110
111
  <div>
111
- <Box className="box-preview">
112
- <Box>
112
+ <div className="box-preview">
113
+ <div>
113
114
  <div
114
115
  className="preview-item"
115
116
  style={{
@@ -141,9 +142,9 @@ function ImagePreviewMobileComponent({
141
142
  draggable={editActive ? true : false}
142
143
  />
143
144
  </div>
144
- </Box>
145
+ </div>
145
146
  {(showAdjustInfoBasedOnConfidence || showAdjustInfo) && (
146
- <Box
147
+ <div
147
148
  className="box-title_col-left"
148
149
  alignItems="center"
149
150
  style={{
@@ -166,13 +167,13 @@ function ImagePreviewMobileComponent({
166
167
  ? t('Crop the image for better results')
167
168
  : 'Crop the image for better results'}
168
169
  </Typography>
169
- </Box>
170
+ </div>
170
171
  )}
171
- </Box>
172
+ </div>
172
173
  <>
173
174
  <Hidden>
174
- <Box
175
- sx={{
175
+ <div
176
+ style={{
176
177
  position: 'absolute',
177
178
  left: '15px',
178
179
  top: '25px',
@@ -180,8 +181,8 @@ function ImagePreviewMobileComponent({
180
181
  }}
181
182
  onClick={onImageRemove}
182
183
  >
183
- <Box
184
- sx={{
184
+ <div
185
+ style={{
185
186
  width: '24px',
186
187
  height: '24px',
187
188
  justifyContent: 'center',
@@ -191,39 +192,39 @@ function ImagePreviewMobileComponent({
191
192
  }}
192
193
  >
193
194
  <Trash color="white" fill="white" />
194
- </Box>
195
- </Box>
195
+ </div>
196
+ </div>
196
197
  </Hidden>
197
198
 
198
199
  <Hidden mdUp>
199
- <Box
200
+ <div
200
201
  className="slideDown"
201
- sx={{
202
+ style={{
202
203
  position: 'absolute',
203
204
  bottom: '25px',
204
205
  right: '20px',
205
206
  }}
206
207
  onClick={handleArrowClick}
207
208
  >
208
- <Box
209
- bgcolor={'white'}
210
- sx={{
209
+ <div
210
+ style={{
211
211
  width: '24px',
212
212
  height: '24px',
213
213
  justifyContent: 'center',
214
214
  alignItems: 'center',
215
215
  display: 'flex',
216
216
  borderRadius: '100%',
217
+ backgroundColor: 'white',
217
218
  }}
218
219
  >
219
220
  {editActive && <ArrowUp color="black" />}
220
221
  {!editActive && <ArrowDown color="black" fill="black" />}
221
- </Box>
222
- </Box>
222
+ </div>
223
+ </div>
223
224
  </Hidden>
224
225
  </>
225
226
  </div>
226
- </Box>
227
+ </div>
227
228
  );
228
229
  }
229
230
  const ImagePreviewMobile = memo(ImagePreviewMobileComponent);
@@ -1,4 +1,3 @@
1
- import { Box } from '@material-ui/core';
2
1
  import { getCroppedCanvas } from 'helpers/getCroppedCanvas';
3
2
  import React, { useEffect, useState } from 'react';
4
3
  import { useMediaQuery } from 'react-responsive';
@@ -44,11 +43,11 @@ function InquiryBanner({
44
43
  isInquiryModalOpen={isInquiryModalOpen}
45
44
  />
46
45
  )}
47
- <Box
46
+ <div
48
47
  style={{
49
48
  backgroundColor: '#F3F3F5',
50
49
  width: '100%',
51
- marginBottom: '32px',
50
+ marginBottom: '24px',
52
51
  alignSelf: 'end',
53
52
  display: 'flex',
54
53
  alignItems: 'center',
@@ -56,7 +55,7 @@ function InquiryBanner({
56
55
  }}
57
56
  className="rfq-box"
58
57
  >
59
- <Box
58
+ <div
60
59
  style={{
61
60
  width: '100%',
62
61
  display: 'flex',
@@ -82,14 +81,14 @@ function InquiryBanner({
82
81
  </div>
83
82
  )}
84
83
 
85
- <Box style={{ width: '100%' }}>
86
- <Box
84
+ <div style={{ width: '100%' }}>
85
+ <div
87
86
  style={{
88
87
  paddingBottom: '8px',
89
88
  paddingLeft: '16px',
90
89
  }}
91
90
  >
92
- <Box
91
+ <div
93
92
  style={{
94
93
  fontSize: '14px',
95
94
  color: inquiryStatus === 'inactive' ? '#4B4B4A' : '#2B2C46',
@@ -99,8 +98,8 @@ function InquiryBanner({
99
98
  {isMobile
100
99
  ? `${t('No matches found')}?`
101
100
  : `${t('No matches found for your request')}?`}
102
- </Box>
103
- <Box
101
+ </div>
102
+ <div
104
103
  style={{
105
104
  fontSize: '14px',
106
105
  maxWidth: '320x',
@@ -110,8 +109,8 @@ function InquiryBanner({
110
109
  }}
111
110
  >
112
111
  {description}
113
- </Box>
114
- </Box>
112
+ </div>
113
+ </div>
115
114
  <div
116
115
  style={{
117
116
  display: 'flex',
@@ -198,9 +197,9 @@ function InquiryBanner({
198
197
  </a>
199
198
  )}
200
199
  </div>
201
- </Box>
202
- </Box>
203
- </Box>
200
+ </div>
201
+ </div>
202
+ </div>
204
203
  </>
205
204
  );
206
205
  }
@@ -56,7 +56,7 @@ export default function InquiryModal({
56
56
  const [information, setInformation] = useState('');
57
57
 
58
58
  const setFormattedContent = React.useCallback(
59
- text => {
59
+ (text: string) => {
60
60
  setInformation(text.slice(0, 150));
61
61
  },
62
62
  [setInformation],
@@ -1,11 +1,10 @@
1
- import { Box } from '@material-ui/core';
2
1
  import { ReactNode } from 'components/common';
3
2
  import React, { memo, useEffect, useState } from 'react';
4
3
  import { useMediaQuery } from 'react-responsive';
5
4
  import { useHistory } from 'react-router-dom';
6
5
  import {
7
6
  clearPostFilter,
8
- onResetRequestImage,
7
+ onResetRequestImage, setPreFilter,
9
8
  setUpdateSession,
10
9
  } from 'Store/search/Search';
11
10
  import { useAppDispatch, useAppSelector } from 'Store/Store';
@@ -46,7 +45,7 @@ jQuery(document).ready(function () {
46
45
  email: 'info@cadenas.de',
47
46
  });
48
47
  psol.core.setServiceBaseUrl('https://webapi.partcommunity.com');
49
- window.onpageshow = function(event: any) {
48
+ window.onpageshow = function (event: any) {
50
49
  if (event.persisted) {
51
50
  window.location.reload();
52
51
  }
@@ -76,7 +75,7 @@ function Layout({ children }: ReactNode): JSX.Element {
76
75
  (isMobile && history.location?.pathname === '/result') ||
77
76
  history.location?.pathname === '/';
78
77
  const language = useAppSelector(state => state.settings.language);
79
- const { isAuthenticated } = useAuth0();
78
+ const { user, isAuthenticated } = useAuth0();
80
79
  const { auth0, showPoweredByNyris } = settings;
81
80
  const showApp = !auth0.enabled || (auth0.enabled && isAuthenticated);
82
81
  i18n.changeLanguage(language);
@@ -99,6 +98,12 @@ function Layout({ children }: ReactNode): JSX.Element {
99
98
  // eslint-disable-next-line react-hooks/exhaustive-deps
100
99
  }, [history.location]);
101
100
 
101
+ useEffect(() => {
102
+ if (settings.shouldUseUserMetadata && user) {
103
+ dispatch(setPreFilter({[user['/user_metadata'].value]: true}));
104
+ }
105
+ }, [user, dispatch, settings.shouldUseUserMetadata]);
106
+
102
107
  let HeaderApp: any;
103
108
  let FooterApp: any;
104
109
  let classNameBoxVersion: string = 'newVersion';
@@ -141,9 +146,9 @@ function Layout({ children }: ReactNode): JSX.Element {
141
146
  return (
142
147
  <div style={{ position: 'relative' }}>
143
148
  {loadingSearchAlgolia && (
144
- <Box className="box-wrap-loading" style={{ zIndex: 99999999 }}>
149
+ <div className="box-wrap-loading" style={{ zIndex: 99999999 }}>
145
150
  <Loading />
146
- </Box>
151
+ </div>
147
152
  )}
148
153
  <InstantSearchProvider>
149
154
  {isMobile && showApp && <AppMobile>{children}</AppMobile>}
@@ -1,4 +1,3 @@
1
- import { Box } from '@material-ui/core';
2
1
  import React from 'react';
3
2
  import { useTranslation } from 'react-i18next';
4
3
 
@@ -38,7 +37,7 @@ const LoadingSvg = () => {
38
37
  const Loading = () => {
39
38
  const { t } = useTranslation();
40
39
  return (
41
- <Box
40
+ <div
42
41
  className="loadingSpinCT"
43
42
  style={{
44
43
  top: 0,
@@ -62,7 +61,7 @@ const Loading = () => {
62
61
  {t('loading')}
63
62
  </p>
64
63
  <LoadingSvg />
65
- </Box>
64
+ </div>
66
65
  );
67
66
  };
68
67
 
@@ -1,4 +1,4 @@
1
- import { Box, Button, Checkbox } from '@material-ui/core';
1
+ import { Button, Checkbox } from '@material-ui/core';
2
2
  import { DynamicWidgetsCT } from 'components/dynamic-widgets/dynamic-widgets';
3
3
  import IconLabel from 'components/icon-label/icon-label';
4
4
  import { atom, useAtom } from 'jotai';
@@ -202,7 +202,7 @@ export default function PostFilterPanel({
202
202
  <>
203
203
  {!isMobile && (
204
204
  <div className="wrap-main-header-panel">
205
- <Box
205
+ <div
206
206
  style={{
207
207
  cursor: 'pointer',
208
208
  paddingBottom: '8px',
@@ -221,10 +221,10 @@ export default function PostFilterPanel({
221
221
  } `}
222
222
  />
223
223
  </div>
224
- </Box>
224
+ </div>
225
225
  </div>
226
226
  )}
227
- <Box>
227
+ <div>
228
228
  {isMobile && (
229
229
  <div
230
230
  style={{
@@ -248,7 +248,7 @@ export default function PostFilterPanel({
248
248
  </Button>
249
249
  </div>
250
250
  )}
251
- <Box
251
+ <div
252
252
  className="box-center-filter"
253
253
  style={{
254
254
  ...(isMobile
@@ -264,10 +264,10 @@ export default function PostFilterPanel({
264
264
  <DynamicWidgetsCT enabled={dynamicWidgets}>
265
265
  {widgetsPanels}
266
266
  </DynamicWidgetsCT>
267
- </Box>
268
- </Box>
267
+ </div>
268
+ </div>
269
269
  {isMobile && (
270
- <Box
270
+ <div
271
271
  style={{
272
272
  position: 'sticky',
273
273
  bottom: 0,
@@ -307,7 +307,7 @@ export default function PostFilterPanel({
307
307
  >
308
308
  Apply filters
309
309
  </div>
310
- </Box>
310
+ </div>
311
311
  )}
312
312
  </>
313
313
  );
@@ -1,4 +1,4 @@
1
- import { Box, Button } from '@material-ui/core';
1
+ import { Button } from '@material-ui/core';
2
2
  import { DynamicWidgetsCT } from 'components/dynamic-widgets/dynamic-widgets';
3
3
  import IconLabel from 'components/icon-label/icon-label';
4
4
  import { atom, useAtom } from 'jotai';
@@ -192,7 +192,7 @@ export default function PostFilterPanelAlgolia({
192
192
  <>
193
193
  {!isMobile && (
194
194
  <div className="wrap-main-header-panel">
195
- <Box
195
+ <div
196
196
  style={{
197
197
  cursor: 'pointer',
198
198
  paddingBottom: '8px',
@@ -211,10 +211,10 @@ export default function PostFilterPanelAlgolia({
211
211
  } `}
212
212
  />
213
213
  </div>
214
- </Box>
214
+ </div>
215
215
  </div>
216
216
  )}
217
- <Box>
217
+ <div>
218
218
  {isMobile && (
219
219
  <div
220
220
  style={{
@@ -238,7 +238,7 @@ export default function PostFilterPanelAlgolia({
238
238
  </Button>
239
239
  </div>
240
240
  )}
241
- <Box
241
+ <div
242
242
  className="box-center-filter"
243
243
  style={{
244
244
  ...(isMobile
@@ -254,10 +254,10 @@ export default function PostFilterPanelAlgolia({
254
254
  <DynamicWidgetsCT enabled={dynamicWidgets}>
255
255
  {widgetsPanels}
256
256
  </DynamicWidgetsCT>
257
- </Box>
258
- </Box>
257
+ </div>
258
+ </div>
259
259
  {isMobile && (
260
- <Box
260
+ <div
261
261
  style={{
262
262
  position: 'sticky',
263
263
  bottom: 0,
@@ -297,7 +297,7 @@ export default function PostFilterPanelAlgolia({
297
297
  >
298
298
  Apply filters
299
299
  </div>
300
- </Box>
300
+ </div>
301
301
  )}
302
302
  </>
303
303
  );
@@ -1,4 +1,4 @@
1
- import { Box, Button } from '@material-ui/core';
1
+ import { Button } from '@material-ui/core';
2
2
  import { ReactComponent as RemoveIcon } from 'common/assets/icons/minus.svg';
3
3
  import { ReactComponent as AddIcon } from 'common/assets/icons/add.svg';
4
4
  import classNames from 'classnames';
@@ -39,7 +39,7 @@ function ExpandablePanelComponent({
39
39
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
40
40
 
41
41
  return (
42
- <Box>
42
+ <div>
43
43
  <div
44
44
  className={classNames(
45
45
  {
@@ -88,7 +88,7 @@ function ExpandablePanelComponent({
88
88
  <div className="mt-4">{children}</div>
89
89
  </Collapse>
90
90
  </div>
91
- </Box>
91
+ </div>
92
92
  );
93
93
  }
94
94