@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,12 +1,11 @@
1
- import { Box, Button, Grid, Tooltip, Typography } from '@material-ui/core';
1
+ import { Button, Grid, Tooltip, Typography } from '@material-ui/core';
2
2
  import ChevronRightOutlinedIcon from '@material-ui/icons/ChevronRightOutlined';
3
- import IconOpenLink from 'common/assets/icons/Union.svg';
3
+ import { ReactComponent as IconOpenLink } from 'common/assets/icons/Union.svg';
4
4
  import { ReactComponent as IconShare } from 'common/assets/icons/Fill.svg';
5
5
  import { ReactComponent as IconDisLike } from 'common/assets/icons/icon_dislike.svg';
6
6
  import { ReactComponent as IconLike } from 'common/assets/icons/icon_like.svg';
7
7
  import { ReactComponent as IconSearchImage } from 'common/assets/icons/icon_search_image2.svg';
8
8
  import { ReactComponent as Box3dIcon } from 'common/assets/icons/3d.svg';
9
- import { ReactComponent as IconSettings } from 'common/assets/icons/settings.svg';
10
9
 
11
10
  import React, { memo, useEffect, useState } from 'react';
12
11
  import NoImage from 'common/assets/images/no-image.svg';
@@ -24,6 +23,7 @@ import { feedbackClickEpic, feedbackConversionEpic } from 'services/Feedback';
24
23
  import ProductDetailView from 'components/ProductDetailView';
25
24
  import ProductAttribute from '../ProductAttribute';
26
25
  import { get, isUndefined } from 'lodash';
26
+ import { ReactComponent as IconSettings } from 'common/assets/icons/settings.svg';
27
27
 
28
28
  interface Props {
29
29
  dataItem: any;
@@ -116,6 +116,8 @@ function ItemResult(props: Props) {
116
116
  dataItem,
117
117
  settings.field?.ctaLinkField ? settings.field?.ctaLinkField : 'links.main',
118
118
  );
119
+ const manufacturerNumber = get(dataItem, settings.field.manufacturerNumber);
120
+
119
121
  const secondaryCTALink = get(
120
122
  dataItem,
121
123
  settings.field?.secondaryCTALinkField
@@ -123,9 +125,8 @@ function ItemResult(props: Props) {
123
125
  : '',
124
126
  );
125
127
 
126
- const manufacturerNumber = get(dataItem, settings.field.manufacturerNumber);
127
128
  return (
128
- <Box className="wrap-main-item-result">
129
+ <div className="wrap-main-item-result">
129
130
  <DefaultModal
130
131
  openModal={openDetailedView === '3d' || openDetailedView === 'image'}
131
132
  handleClose={(e: any) => {
@@ -152,25 +153,25 @@ function ItemResult(props: Props) {
152
153
  dataItem={dataItem}
153
154
  isOpen={isOpenModalShare}
154
155
  />
155
- <Box className="box-top">
156
+ <div className="box-top">
156
157
  {isGroupItem && collap && (
157
- <Box className="btn-show-result">
158
+ <div className="btn-show-result">
158
159
  <Button onClick={handlerShowGroup}>
159
160
  {t('Show group')}
160
161
  <ChevronRightOutlinedIcon style={{ fontSize: '10px' }} />
161
162
  </Button>
162
- </Box>
163
+ </div>
163
164
  )}
164
165
  {isGroupItem && !collap && (
165
- <Box className="btn-show-result">
166
+ <div className="btn-show-result">
166
167
  <Button onClick={handlerHideGroup}>
167
168
  {t('Close group')}
168
169
  <ChevronRightOutlinedIcon style={{ fontSize: '10px' }} />
169
170
  </Button>
170
- </Box>
171
+ </div>
171
172
  )}
172
173
  {!isHover && main_image_link && (
173
- <Box
174
+ <div
174
175
  className="box-icon-modal"
175
176
  onClick={() => {
176
177
  if (urlImage.length > 1) {
@@ -179,21 +180,21 @@ function ItemResult(props: Props) {
179
180
  }}
180
181
  >
181
182
  <IconSearchImage width={16} height={16} color={'#AAABB5'} />
182
- </Box>
183
+ </div>
183
184
  )}
184
185
  {settings.cadenas?.cadenas3dWebView && (
185
- <Box
186
+ <div
186
187
  className="box-icon-modal-3d"
187
188
  onClick={() => {
188
189
  setOpenDetailedView('3d');
189
190
  }}
190
191
  >
191
192
  <Box3dIcon width={16} height={16} color={'#AAABB5'} />
192
- </Box>
193
+ </div>
193
194
  )}
194
195
 
195
- <Box className="box-image">
196
- <Box
196
+ <div className="box-image">
197
+ <div
197
198
  style={{
198
199
  width: '100%',
199
200
  height: '100%',
@@ -222,48 +223,50 @@ function ItemResult(props: Props) {
222
223
  style={{ width: '70%', height: '50%' }}
223
224
  />
224
225
  )}
225
- </Box>
226
- </Box>
227
- </Box>
226
+ </div>
227
+ </div>
228
+ </div>
228
229
 
229
- <Box
230
+ <div
230
231
  className="box-content"
231
- display={'flex'}
232
232
  style={{
233
233
  flexDirection: 'column',
234
234
  backgroundColor: '#F3F3F5',
235
235
  flexGrow: 1,
236
236
  zIndex: 100,
237
+ display: 'flex',
237
238
  }}
238
239
  >
239
- <Box className="box-top" style={{ color: '#FFFFFF' }}>
240
- <Box
241
- display="flex"
242
- justifyContent={'space-between'}
243
- flexDirection={'column'}
244
- style={{ color: '#2B2C46' }}
245
- gridGap={6}
240
+ <div className="box-top" style={{ color: '#FFFFFF' }}>
241
+ <div
242
+ style={{
243
+ display: 'flex',
244
+ justifyContent: 'space-between',
245
+ flexDirection: 'column',
246
+ gridGap: 8,
247
+ color: settings.theme.mainTextColor || '#2B2C46',
248
+ }}
246
249
  >
247
250
  {settings.CTAButtonText && (
248
251
  <Typography
249
252
  className="text-f12 max-line-1 fw-700"
250
253
  style={{
251
- color: '#2B2C46',
254
+ color: settings.theme.mainTextColor || '#2B2C46',
252
255
  marginTop: 8,
253
256
  }}
254
257
  >
255
258
  {truncateString(dataItem[settings.field.productName], 45)}
256
259
  </Typography>
257
260
  )}
258
- <Box
259
- display="flex"
260
- justifyContent={'space-between'}
261
- flexDirection={'row'}
261
+ <div
262
262
  style={{
263
- color: '#2B2C46',
264
- marginTop: !settings.CTAButtonText ? 8 : -6,
263
+ display: 'flex',
264
+ justifyContent: 'space-between',
265
+ flexDirection: 'row',
266
+ gridGap: 8,
267
+ color: settings.theme.mainTextColor || '#2B2C46',
268
+ marginTop: settings.CTAButtonText ? 0 : 8,
265
269
  }}
266
- gridGap={8}
267
270
  >
268
271
  <Tooltip
269
272
  title={sku}
@@ -274,7 +277,7 @@ function ItemResult(props: Props) {
274
277
  <Typography
275
278
  className="text-f12 max-line-1 fw-400"
276
279
  style={{
277
- color: '#2B2C46',
280
+ color: settings.theme.mainTextColor || '#2B2C46',
278
281
  }}
279
282
  >
280
283
  {truncateString(
@@ -291,7 +294,7 @@ function ItemResult(props: Props) {
291
294
  <Typography
292
295
  className="text-f12 max-line-1 fw-400"
293
296
  style={{
294
- color: '#2B2C46',
297
+ color: settings.theme?.mainTextColor || '#2B2C46',
295
298
  }}
296
299
  >
297
300
  <span
@@ -306,20 +309,24 @@ function ItemResult(props: Props) {
306
309
  </span>
307
310
  </Typography>
308
311
  )}
309
- </Box>
310
- <Box
311
- display="flex"
312
- justifyContent={'space-between'}
313
- flexDirection={'row'}
314
- style={{ color: '#2B2C46' }}
315
- gridGap={8}
312
+ </div>
313
+ <div
314
+ style={{
315
+ display: 'flex',
316
+ justifyContent: 'space-between',
317
+ flexDirection: 'row',
318
+ gridGap: 8,
319
+ color: settings.theme.mainTextColor || '#2B2C46',
320
+ }}
316
321
  >
317
322
  {(brand || settings.brandName) && (
318
323
  <ProductAttribute
319
324
  title={t('Brand')}
320
325
  value={brand || settings.brandName}
321
- padding="4px 8px"
326
+ padding={settings.theme.brandFieldPadding || '4px 8px'}
322
327
  width={{ xs: '49%' }}
328
+ backgroundColor={settings.theme.brandFieldBackground}
329
+ isTitleVisible={settings.isBrandNameTitleVisible}
323
330
  />
324
331
  )}
325
332
 
@@ -331,15 +338,18 @@ function ItemResult(props: Props) {
331
338
  width={{ xs: '49%' }}
332
339
  />
333
340
  )}
334
- </Box>
335
- </Box>
336
- </Box>
341
+ </div>
342
+ </div>
343
+ </div>
337
344
  {settings.warehouseVariant && (
338
- <Box
339
- display="flex"
340
- justifyContent={'space-between'}
341
- style={{ color: '#2B2C46', marginTop: '8px' }}
342
- gridGap={10}
345
+ <div
346
+ style={{
347
+ display: 'flex',
348
+ justifyContent: 'space-between',
349
+ gridGap: 10,
350
+ color: settings.theme.mainTextColor || '#2B2C46',
351
+ marginTop: 8,
352
+ }}
343
353
  >
344
354
  {settings.field.warehouseNumber && (
345
355
  <ProductAttribute
@@ -369,26 +379,26 @@ function ItemResult(props: Props) {
369
379
  width={{ xs: '49%' }}
370
380
  />
371
381
  )}
372
- </Box>
382
+ </div>
373
383
  )}
374
384
  <div>
375
385
  {settings.secondaryCTAButtonText && (
376
- <Box
386
+ <div
377
387
  style={{
378
388
  boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
379
389
  // marginBottom: 22,
380
390
  height: 40,
381
- background: '#2B2C46',
391
+ background: settings.theme.secondaryCTAButtonColor || '#2B2C46',
382
392
  borderRadius: 4,
383
393
  padding: '0px 8px',
384
394
  marginTop: '8px',
395
+ display: 'flex',
396
+ justifyItems: 'center',
397
+ alignItems: 'center',
398
+ justifyContent: 'space-between',
385
399
  }}
386
- display={'flex'}
387
- justifyItems={'center'}
388
- alignItems={'center'}
389
- justifyContent={'space-between'}
390
400
  >
391
- <Box
401
+ <div
392
402
  style={{
393
403
  display: 'flex',
394
404
  justifyContent: 'space-between',
@@ -422,8 +432,8 @@ function ItemResult(props: Props) {
422
432
  {!isMobile && secondaryCTALink && (
423
433
  <IconSettings color="white" />
424
434
  )}
425
- </Box>
426
- </Box>
435
+ </div>
436
+ </div>
427
437
  )}
428
438
  {!settings.CTAButtonText ? (
429
439
  <Tooltip
@@ -434,22 +444,22 @@ function ItemResult(props: Props) {
434
444
  dataItem[settings.field.productName]?.length < 45
435
445
  }
436
446
  >
437
- <Box
447
+ <div
438
448
  style={{
439
449
  boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
440
450
  // marginBottom: 22,
441
451
  height: 40,
442
- background: settings.theme?.primaryColor,
452
+ background: settings.theme?.CTAButtonColor || settings.theme?.primaryColor,
443
453
  borderRadius: 4,
444
454
  padding: '0px 8px',
445
455
  marginTop: '8px',
456
+ display: 'flex',
457
+ justifyItems: 'center',
458
+ alignItems: 'center',
459
+ justifyContent: 'space-between',
446
460
  }}
447
- display={'flex'}
448
- justifyItems={'center'}
449
- alignItems={'center'}
450
- justifyContent={'space-between'}
451
461
  >
452
- <Box
462
+ <div
453
463
  style={{
454
464
  display: 'flex',
455
465
  justifyContent: 'space-between',
@@ -465,11 +475,12 @@ function ItemResult(props: Props) {
465
475
  }}
466
476
  >
467
477
  <Typography
468
- className="text-white max-line-2"
478
+ className="max-line-2"
469
479
  style={{
470
480
  overflow: 'hidden',
471
481
  textOverflow: 'ellipsis',
472
482
  fontWeight: 500,
483
+ color: settings.theme?.CTAButtonTextColor || '#FFFFFF',
473
484
  fontSize: '12px',
474
485
  letterSpacing: '0.27px',
475
486
  wordBreak: 'break-all',
@@ -481,28 +492,28 @@ function ItemResult(props: Props) {
481
492
  {truncateString(dataItem[settings.field.productName], 45)}
482
493
  </Typography>
483
494
  {!isMobile && ctaLink && (
484
- <img src={IconOpenLink} alt="more-info" width={16} />
495
+ <IconOpenLink fill={settings.theme?.CTAButtonTextColor || '#FFFFFF'} width={16} />
485
496
  )}
486
- </Box>
487
- </Box>
497
+ </div>
498
+ </div>
488
499
  </Tooltip>
489
500
  ) : (
490
- <Box
501
+ <div
491
502
  style={{
492
503
  boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
493
504
  // marginBottom: 22,
494
505
  height: 40,
495
- background: settings.theme?.primaryColor,
506
+ background: settings.theme?.CTAButtonColor || settings.theme?.primaryColor,
496
507
  borderRadius: 4,
497
508
  padding: '0px 8px',
498
509
  marginTop: '8px',
510
+ display: 'flex',
511
+ justifyItems: 'center',
512
+ alignItems: 'center',
513
+ justifyContent: 'space-between',
499
514
  }}
500
- display={'flex'}
501
- justifyItems={'center'}
502
- alignItems={'center'}
503
- justifyContent={'space-between'}
504
515
  >
505
- <Box
516
+ <div
506
517
  style={{
507
518
  display: 'flex',
508
519
  justifyContent: 'space-between',
@@ -518,11 +529,12 @@ function ItemResult(props: Props) {
518
529
  }}
519
530
  >
520
531
  <Typography
521
- className="text-white max-line-2"
532
+ className="max-line-2"
522
533
  style={{
523
534
  overflow: 'hidden',
524
535
  textOverflow: 'ellipsis',
525
536
  fontWeight: 500,
537
+ color: settings.theme?.CTAButtonTextColor || '#FFFFFF',
526
538
  fontSize: '12px',
527
539
  letterSpacing: '0.27px',
528
540
  wordBreak: 'break-all',
@@ -534,14 +546,14 @@ function ItemResult(props: Props) {
534
546
  {settings.CTAButtonText}
535
547
  </Typography>
536
548
  {!isMobile && ctaLink && (
537
- <img src={IconOpenLink} alt="more-info" width={16} />
549
+ <IconOpenLink fill={settings.theme?.CTAButtonTextColor || '#FFFFFF'} width={16} />
538
550
  )}
539
- </Box>
540
- </Box>
551
+ </div>
552
+ </div>
541
553
  )}
542
554
 
543
555
  {settings.showFeedbackAndShare && (
544
- <Box
556
+ <div
545
557
  className="box-bottom"
546
558
  style={{ marginBottom: 6, marginTop: 12 }}
547
559
  >
@@ -553,7 +565,12 @@ function ItemResult(props: Props) {
553
565
  alignItems="center"
554
566
  >
555
567
  <Grid item>
556
- <Box display={'flex'} alignItems={'center'}>
568
+ <div
569
+ style={{
570
+ display: 'flex',
571
+ alignItems: 'center',
572
+ }}
573
+ >
557
574
  <Button
558
575
  className="btn-item"
559
576
  onClick={() => {
@@ -567,10 +584,15 @@ function ItemResult(props: Props) {
567
584
  color={feedback === 'like' ? '#3E36DC' : '#000000'}
568
585
  />
569
586
  </Button>
570
- </Box>
587
+ </div>
571
588
  </Grid>
572
589
  <Grid item>
573
- <Box display={'flex'} alignItems={'center'}>
590
+ <div
591
+ style={{
592
+ display: 'flex',
593
+ alignItems: 'center',
594
+ }}
595
+ >
574
596
  <Button
575
597
  className="btn-item"
576
598
  onClick={() => {
@@ -584,26 +606,31 @@ function ItemResult(props: Props) {
584
606
  color={feedback === 'dislike' ? '#CC1854' : '#000000'}
585
607
  />
586
608
  </Button>
587
- </Box>
609
+ </div>
588
610
  </Grid>
589
611
  {settings.shareOption && (
590
612
  <Grid item>
591
- <Box display={'flex'} alignItems={'center'}>
613
+ <div
614
+ style={{
615
+ display: 'flex',
616
+ alignItems: 'center',
617
+ }}
618
+ >
592
619
  <Button
593
620
  className="btn-item"
594
621
  onClick={() => setOpenModalShare(true)}
595
622
  >
596
623
  <IconShare width={16} height={16} color="#000000" />
597
624
  </Button>
598
- </Box>
625
+ </div>
599
626
  </Grid>
600
627
  )}
601
628
  </Grid>
602
- </Box>
629
+ </div>
603
630
  )}
604
631
  </div>
605
- </Box>
606
- </Box>
632
+ </div>
633
+ </div>
607
634
  );
608
635
  }
609
636
 
@@ -1,6 +1,5 @@
1
- import { Box } from '@material-ui/core';
2
- import { getCroppedCanvas } from 'helpers/getCroppedCanvas';
3
1
  import React from 'react';
2
+ import { getCroppedCanvas } from 'helpers/getCroppedCanvas';
4
3
  import { useMediaQuery } from 'react-responsive';
5
4
 
6
5
  function RfqBanner({
@@ -19,7 +18,7 @@ function RfqBanner({
19
18
  const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
20
19
 
21
20
  return (
22
- <Box
21
+ <div
23
22
  style={{
24
23
  padding: '0px 16px 0px 16px',
25
24
  backgroundColor: '#F6F3F1',
@@ -32,7 +31,7 @@ function RfqBanner({
32
31
  }}
33
32
  className="rfq-box"
34
33
  >
35
- <Box
34
+ <div
36
35
  style={{
37
36
  width: '100%',
38
37
  display: 'flex',
@@ -56,13 +55,13 @@ function RfqBanner({
56
55
  }}
57
56
  />
58
57
  </div>
59
- <Box>
60
- <Box
58
+ <div>
59
+ <div
61
60
  style={{
62
61
  paddingBottom: '12px',
63
62
  }}
64
63
  >
65
- <Box
64
+ <div
66
65
  style={{
67
66
  fontSize: '14px',
68
67
  color: rfqStatus === 'inactive' ? '#4B4B4A' : '#CACAD1',
@@ -72,8 +71,8 @@ function RfqBanner({
72
71
  {isMobile
73
72
  ? 'No matches found?'
74
73
  : 'No matches found for your request?'}
75
- </Box>
76
- <Box
74
+ </div>
75
+ <div
77
76
  style={{
78
77
  fontSize: '12px',
79
78
  maxWidth: '320x',
@@ -83,8 +82,8 @@ function RfqBanner({
83
82
  }}
84
83
  >
85
84
  Get personalised help from our team of product experts.
86
- </Box>
87
- </Box>
85
+ </div>
86
+ </div>
88
87
  <button
89
88
  style={{
90
89
  maxWidth: '200px',
@@ -110,9 +109,9 @@ function RfqBanner({
110
109
  >
111
110
  Request a Quote
112
111
  </button>
113
- </Box>
114
- </Box>
115
- </Box>
112
+ </div>
113
+ </div>
114
+ </div>
116
115
  );
117
116
  }
118
117
 
@@ -48,7 +48,7 @@ export default function RfqModal({
48
48
 
49
49
  const [information, setInformation] = useState('');
50
50
  const setFormattedContent = React.useCallback(
51
- text => {
51
+ (text: string) => {
52
52
  setInformation(text.slice(0, 150));
53
53
  },
54
54
  [setInformation],
package/src/index.tsx CHANGED
@@ -1,9 +1,9 @@
1
1
  // Some people are still using internet explorer
2
2
  import 'react-app-polyfill/ie11';
3
3
  import 'react-app-polyfill/stable';
4
+ import ReactDOM from 'react-dom/client';
4
5
  import React, { Fragment } from 'react';
5
- import ReactDOM from 'react-dom';
6
- import * as serviceWorker from './serviceWorker';
6
+ import './index.css';
7
7
  import { Provider } from 'react-redux';
8
8
  import { MuiThemeProvider } from '@material-ui/core';
9
9
  import 'typeface-roboto';
@@ -30,23 +30,22 @@ let theme = createTheme({
30
30
  },
31
31
  });
32
32
 
33
- ReactDOM.render(
34
- <Fragment>
35
- <Toaster />
36
- <Provider store={store}>
37
- <AuthProvider>
38
- <MuiThemeProvider theme={theme}>
39
- <BrowserRouter>
40
- <Router />
41
- </BrowserRouter>
42
- </MuiThemeProvider>
43
- </AuthProvider>
44
- </Provider>
45
- </Fragment>,
46
- document.getElementById('root'),
33
+ const root = ReactDOM.createRoot(
34
+ document.getElementById('root') as HTMLElement,
35
+ );
36
+ root.render(
37
+ <React.StrictMode>
38
+ <Fragment>
39
+ <Toaster />
40
+ <Provider store={store}>
41
+ <AuthProvider>
42
+ <MuiThemeProvider theme={theme}>
43
+ <BrowserRouter>
44
+ <Router />
45
+ </BrowserRouter>
46
+ </MuiThemeProvider>
47
+ </AuthProvider>
48
+ </Provider>
49
+ </Fragment>
50
+ </React.StrictMode>,
47
51
  );
48
-
49
- // If you want your app to work offline and load faster, you can change
50
- // unregister() to register() below. Note this comes with some pitfalls.
51
- // Learn more about service workers: https://bit.ly/CRA-PWA
52
- serviceWorker.unregister();
@@ -1,4 +1,3 @@
1
- import { Box } from '@material-ui/core';
2
1
  import React, { useState } from 'react';
3
2
  import './common.scss';
4
3
  import algoliasearch from 'algoliasearch/lite';
@@ -27,15 +26,15 @@ function AppMD() {
27
26
  const CustomInfiniteHits = connectInfiniteHits(InfiniteHits);
28
27
 
29
28
  return (
30
- <Box className={`box-content-main ${isLoading ? 'loading' : ''}`}>
31
- <Box className="box-content_top" style={{ position: 'relative' }}>
29
+ <div className={`box-content-main ${isLoading ? 'loading' : ''}`}>
30
+ <div className="box-content_top" style={{ position: 'relative' }}>
32
31
  {settings.headerText && (
33
- <Box
32
+ <div
34
33
  className="fw-700 text-f32 text-dark2"
35
34
  style={{ position: 'absolute', bottom: '49px' }}
36
35
  >
37
36
  <h1>{settings.headerText}</h1>
38
- </Box>
37
+ </div>
39
38
  )}
40
39
  <div className="wrap-input-search">
41
40
  <div style={{ display: 'none' }}>
@@ -43,15 +42,15 @@ function AppMD() {
43
42
  </div>
44
43
  <CustomSearchBox />
45
44
  </div>
46
- </Box>
47
- <Box className="box-content_bottom">
45
+ </div>
46
+ <div className="box-content_bottom">
48
47
  <DragDropFile
49
48
  acceptTypes={acceptTypes}
50
49
  isLoading={isLoading}
51
50
  onChangeLoading={onChangeLoading}
52
51
  />
53
- </Box>
54
- </Box>
52
+ </div>
53
+ </div>
55
54
  );
56
55
  }
57
56