@nyris/nyris-webapp 0.3.29 → 0.3.30

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 (27) hide show
  1. package/build/asset-manifest.json +10 -9
  2. package/build/index.html +1 -1
  3. package/build/{precache-manifest.d72c397d9b869dc1470447b80ddb6f57.js → precache-manifest.1bafefb0503a5f6e261392890797084b.js} +12 -8
  4. package/build/service-worker.js +1 -1
  5. package/build/static/css/{main.0d30f026.chunk.css → main.30e70922.chunk.css} +2 -2
  6. package/build/static/css/main.30e70922.chunk.css.map +1 -0
  7. package/build/static/js/main.2e801006.chunk.js +3 -0
  8. package/build/static/js/main.2e801006.chunk.js.map +1 -0
  9. package/build/static/media/icon_search.373c3cc4.svg +3 -0
  10. package/build/static/media/info-tooltip.19eb6e6a.svg +3 -0
  11. package/package.json +3 -3
  12. package/src/Store/constants.ts +13 -0
  13. package/src/common/assets/icons/icon_search.svg +2 -2
  14. package/src/common/assets/icons/info-tooltip.svg +3 -0
  15. package/src/components/DetailItem.tsx +25 -23
  16. package/src/components/drawer/cameraCustom.tsx +1 -1
  17. package/src/components/input/inputSearch.tsx +11 -8
  18. package/src/components/results/ItemResult.tsx +181 -183
  19. package/src/page/landingPage/common.scss +43 -25
  20. package/src/page/result/index.tsx +122 -52
  21. package/src/translations.ts +3 -3
  22. package/src/types.ts +15 -0
  23. package/build/static/css/main.0d30f026.chunk.css.map +0 -1
  24. package/build/static/js/main.972dc9a3.chunk.js +0 -3
  25. package/build/static/js/main.972dc9a3.chunk.js.map +0 -1
  26. package/build/static/media/icon_search.418decdc.svg +0 -3
  27. /package/build/static/js/{main.972dc9a3.chunk.js.LICENSE.txt → main.2e801006.chunk.js.LICENSE.txt} +0 -0
@@ -53,7 +53,9 @@ function ItemResult(props: Props) {
53
53
  const [isOpenModalShare, setOpenModalShare] = useState<boolean>(false);
54
54
  const [feedback, setFeedback] = useState('none');
55
55
  const { t } = useTranslation();
56
- const { sku, title, brand, main_offer_link, product_link, collap } = dataItem;
56
+ const { sku, collap } = dataItem;
57
+ const brand = dataItem[settings.field.productTag];
58
+
57
59
  useEffect(() => {
58
60
  if (main_image_link) {
59
61
  handlerCheckUrlImage(main_image_link);
@@ -192,12 +194,10 @@ function ItemResult(props: Props) {
192
194
  style={{
193
195
  flexDirection: 'column',
194
196
  backgroundColor: '#F3F3F5',
197
+ flexGrow: 1,
195
198
  }}
196
199
  >
197
- <Box
198
- className="box-top"
199
- style={{ minHeight: settings.showMoreInfo ? '150px' : '90px' }}
200
- >
200
+ <Box className="box-top" style={{ minHeight: '90px' }}>
201
201
  <Grid container justifyContent="space-between">
202
202
  <Grid item xs={12}>
203
203
  <Tooltip
@@ -210,14 +210,14 @@ function ItemResult(props: Props) {
210
210
  className="text-f12 max-line-1 fw-400"
211
211
  style={{
212
212
  color: '#2B2C46',
213
- marginTop: 10,
213
+ marginTop: 12,
214
214
  display: 'inline-block',
215
215
  }}
216
216
  >
217
217
  <span style={{ marginRight: 3 }}>
218
218
  {settings.itemIdLabel || 'SKU'}:
219
219
  </span>
220
- {truncateString(sku, 19)}
220
+ {truncateString(sku, 16)}
221
221
  </Typography>
222
222
  </Tooltip>
223
223
 
@@ -227,22 +227,21 @@ function ItemResult(props: Props) {
227
227
  className="text-f12 max-line-1 fw-400"
228
228
  style={{
229
229
  color: '#2B2C46',
230
- marginTop: 10,
231
230
  display: 'inline-block',
232
231
  }}
233
232
  >
234
233
  <span style={{ marginRight: 3 }}>
235
- {dataItem.custom_id_key_3}:
234
+ {dataItem[settings.field.warehouseStock]}:
236
235
  </span>
237
236
  <span
238
237
  style={{
239
- color: dataItem.custom_id_value_3
238
+ color: dataItem[settings.field.warehouseStockValue]
240
239
  ? '#00C070'
241
240
  : '#c54545',
242
241
  fontWeight: 600,
243
242
  }}
244
243
  >
245
- {dataItem.custom_id_value_3 || 0}
244
+ {dataItem[settings.field.warehouseStockValue] || 0}
246
245
  </span>
247
246
  </Typography>
248
247
  </Box>
@@ -256,13 +255,13 @@ function ItemResult(props: Props) {
256
255
  disableHoverListener={brand?.length < 22 || !brand}
257
256
  >
258
257
  <Box
259
- mt={1}
260
258
  style={{
261
259
  background: `${settings.theme?.secondaryColor}26`,
262
260
  borderRadius: '6px',
263
261
  display: 'flex',
264
262
  width: 'fit-content',
265
263
  padding: '2px 5px',
264
+ marginTop: 3,
266
265
  }}
267
266
  >
268
267
  <Typography
@@ -285,203 +284,201 @@ function ItemResult(props: Props) {
285
284
  {!settings.warehouseVariant && (
286
285
  <Typography
287
286
  className="text-f13 fw-600 max-line-3"
288
- style={{ color: '#1E1F31', marginTop: 15 }}
287
+ style={{ color: '#1E1F31', marginTop: 12 }}
289
288
  >
290
- {title}
289
+ {dataItem[settings.field.productName]}
291
290
  </Typography>
292
291
  )}
293
-
294
- {(settings.showMoreInfo || settings.warehouseVariant) && (
295
- <Tooltip
296
- title={title}
297
- placement="top"
298
- arrow={true}
299
- disableHoverListener={
300
- title.length < 35 || !settings.warehouseVariant
292
+ </Grid>
293
+ </Grid>
294
+ </Box>
295
+ <div>
296
+ {(settings.showMoreInfo || settings.warehouseVariant) && (
297
+ <Tooltip
298
+ title={dataItem[settings.field.productName]}
299
+ placement="top"
300
+ arrow={true}
301
+ disableHoverListener={
302
+ dataItem[settings.field.productName].length < 35 ||
303
+ !settings.warehouseVariant
304
+ }
305
+ >
306
+ <Box
307
+ style={{
308
+ boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
309
+ // marginBottom: 22,
310
+ height: 40,
311
+ background: `linear-gradient(270deg, ${settings.theme?.primaryColor}bb 0%, ${settings.theme?.primaryColor} 100%)`,
312
+ borderRadius: 4,
313
+ padding: '0px 8px',
314
+ marginTop: '12px',
315
+ }}
316
+ display={'flex'}
317
+ justifyItems={'center'}
318
+ alignItems={'center'}
319
+ justifyContent={'space-between'}
320
+ >
321
+ <Button
322
+ style={{
323
+ display: 'flex',
324
+ justifyContent: 'space-between',
325
+ width: '100%',
326
+ padding: 0,
327
+ }}
328
+ onClick={() =>
329
+ window.open(
330
+ `${dataItem[settings.field.ctaLinkField]}`,
331
+ '_blank',
332
+ )
301
333
  }
302
334
  >
303
- <Box
335
+ <Typography
336
+ className="text-white max-line-2"
304
337
  style={{
305
- boxShadow: '-2px 2px 4px rgba(170, 171, 181, 0.5)',
306
- // marginBottom: 22,
307
- height: 40,
308
- background: `linear-gradient(270deg, ${settings.theme?.primaryColor}bb 0%, ${settings.theme?.primaryColor} 100%)`,
309
- borderRadius: 4,
310
- padding: '0px 8px',
338
+ textTransform: !settings.warehouseVariant
339
+ ? 'uppercase'
340
+ : 'none',
341
+ overflow: 'hidden',
342
+ textOverflow: 'ellipsis',
343
+ fontWeight: !settings.warehouseVariant ? 700 : 500,
344
+ fontSize: !settings.warehouseVariant ? '12px' : '11px',
345
+ letterSpacing: '0.27px',
346
+ wordBreak: !settings.warehouseVariant
347
+ ? 'normal'
348
+ : 'break-all',
349
+ maxWidth: '136px',
350
+ paddingRight: '8px',
311
351
  }}
312
- display={'flex'}
313
- justifyItems={'center'}
314
- alignItems={'center'}
315
- justifyContent={'space-between'}
316
- mt={2}
352
+ align="left"
317
353
  >
318
- <Button
319
- style={{
320
- display: 'flex',
321
- justifyContent: 'space-between',
322
- width: '100%',
323
- padding: 0,
324
- }}
325
- onClick={() =>
326
- window.open(
327
- `${product_link || main_offer_link}`,
328
- '_blank',
329
- )
330
- }
331
- >
332
- <Typography
333
- className="text-white max-line-2"
334
- style={{
335
- textTransform: !settings.warehouseVariant
336
- ? 'uppercase'
337
- : 'none',
338
- overflow: 'hidden',
339
- textOverflow: 'ellipsis',
340
- fontWeight: !settings.warehouseVariant ? 700 : 500,
341
- fontSize: !settings.warehouseVariant
342
- ? '12px'
343
- : '11px',
344
- letterSpacing: '0.27px',
345
- wordBreak: !settings.warehouseVariant
346
- ? 'normal'
347
- : 'break-all',
348
- maxWidth: '136px',
349
- paddingRight: '8px',
350
- }}
351
- align="left"
352
- >
353
- {settings.warehouseVariant
354
- ? truncateString(title, 35)
355
- : settings.productCtaText || 'MORE INFO'}
356
- </Typography>
357
- <img src={IconOpenLink} alt="more-info" width={20} />
358
- </Button>
359
- </Box>
360
- </Tooltip>
361
- )}
362
- </Grid>
363
- </Grid>
364
- </Box>
365
-
366
- {settings.warehouseVariant && (
367
- <Box
368
- display="flex"
369
- justifyContent={'space-between'}
370
- style={{ color: '#2B2C46', marginTop: '12px' }}
371
- gridGap={10}
372
- >
354
+ {settings.warehouseVariant
355
+ ? truncateString(dataItem[settings.field.productName], 35)
356
+ : settings.productCtaText || 'MORE INFO'}
357
+ </Typography>
358
+ <img src={IconOpenLink} alt="more-info" width={20} />
359
+ </Button>
360
+ </Box>
361
+ </Tooltip>
362
+ )}
363
+ {settings.warehouseVariant && (
373
364
  <Box
374
- style={{
375
- backgroundColor: `${settings.theme?.secondaryColor}26`,
376
- padding: '5px 10px',
377
- borderRadius: 4,
378
- width: '100%',
379
- }}
365
+ display="flex"
366
+ justifyContent={'space-between'}
367
+ style={{ color: '#2B2C46', marginTop: '12px' }}
368
+ gridGap={10}
380
369
  >
381
- <div style={{ fontSize: 10, fontWeight: 500 }}>
382
- {dataItem.custom_id_key_2}
383
- </div>
384
- <div
370
+ <Box
385
371
  style={{
386
- fontSize: 13,
387
- fontWeight: 700,
388
- whiteSpace: 'nowrap',
389
- overflow: 'hidden',
390
- textOverflow: 'ellipsis',
372
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
373
+ padding: '5px 10px',
374
+ borderRadius: 4,
375
+ width: '100%',
391
376
  }}
392
377
  >
393
- {dataItem.custom_id_value_2 || 'N/A'}
394
- </div>
395
- </Box>
378
+ <div style={{ fontSize: 10, fontWeight: 500 }}>
379
+ {dataItem.custom_id_key_2}
380
+ </div>
381
+ <div
382
+ style={{
383
+ fontSize: 13,
384
+ fontWeight: 700,
385
+ whiteSpace: 'nowrap',
386
+ overflow: 'hidden',
387
+ textOverflow: 'ellipsis',
388
+ }}
389
+ >
390
+ {dataItem.custom_id_value_2 || 'N/A'}
391
+ </div>
392
+ </Box>
396
393
 
397
- <Box
398
- style={{
399
- backgroundColor: `${settings.theme?.secondaryColor}26`,
400
- padding: '5px 10px',
401
- borderRadius: 4,
402
- width: '100%',
403
- }}
404
- >
405
- <div style={{ fontSize: 10, fontWeight: 500 }}>
406
- {dataItem.custom_id_key_1}
407
- </div>
408
- <div
394
+ <Box
409
395
  style={{
410
- fontSize: 13,
411
- fontWeight: 700,
412
- whiteSpace: 'nowrap',
413
- overflow: 'hidden',
414
- textOverflow: 'ellipsis',
396
+ backgroundColor: `${settings.theme?.secondaryColor}26`,
397
+ padding: '5px 10px',
398
+ borderRadius: 4,
399
+ width: '100%',
415
400
  }}
416
401
  >
417
- {dataItem.custom_id_value_1 || 'N/A'}
418
- </div>
402
+ <div style={{ fontSize: 10, fontWeight: 500 }}>
403
+ {dataItem.custom_id_key_1}
404
+ </div>
405
+ <div
406
+ style={{
407
+ fontSize: 13,
408
+ fontWeight: 700,
409
+ whiteSpace: 'nowrap',
410
+ overflow: 'hidden',
411
+ textOverflow: 'ellipsis',
412
+ }}
413
+ >
414
+ {dataItem.custom_id_value_1 || 'N/A'}
415
+ </div>
416
+ </Box>
419
417
  </Box>
420
- </Box>
421
- )}
418
+ )}
422
419
 
423
- {settings.showFeedbackAndShare && (
424
- <Box
425
- className="box-bottom"
426
- style={{ marginBottom: 6, marginTop: 10 }}
427
- >
428
- <Grid
429
- container
430
- justifyContent={
431
- settings.shareOption ? 'space-between' : 'space-around'
432
- }
433
- alignItems="center"
420
+ {settings.showFeedbackAndShare && (
421
+ <Box
422
+ className="box-bottom"
423
+ style={{ marginBottom: 6, marginTop: 12 }}
434
424
  >
435
- <Grid item>
436
- <Box display={'flex'} alignItems={'center'}>
437
- <Button
438
- className="btn-item"
439
- style={{ padding: '6px' }}
440
- onClick={() => {
441
- handlerFeedback('like');
442
- setFeedback('like');
443
- }}
444
- >
445
- <IconLike
446
- width={16}
447
- height={16}
448
- color={feedback === 'like' ? '#3E36DC' : '#000000'}
449
- />
450
- </Button>
451
- </Box>
452
- </Grid>
453
- <Grid item>
454
- <Box display={'flex'} alignItems={'center'}>
455
- <Button
456
- style={{ padding: '6px' }}
457
- className="btn-item"
458
- onClick={() => {
459
- handlerFeedback('dislike');
460
- setFeedback('dislike');
461
- }}
462
- >
463
- <IconDisLike
464
- width={16}
465
- height={16}
466
- color={feedback === 'dislike' ? '#CC1854' : '#000000'}
467
- />
468
- </Button>
469
- </Box>
470
- </Grid>
471
- {settings.shareOption && (
425
+ <Grid
426
+ container
427
+ justifyContent={
428
+ settings.shareOption ? 'space-between' : 'space-around'
429
+ }
430
+ alignItems="center"
431
+ >
432
+ <Grid item>
433
+ <Box display={'flex'} alignItems={'center'}>
434
+ <Button
435
+ className="btn-item"
436
+ style={{ padding: '6px' }}
437
+ onClick={() => {
438
+ handlerFeedback('like');
439
+ setFeedback('like');
440
+ }}
441
+ >
442
+ <IconLike
443
+ width={16}
444
+ height={16}
445
+ color={feedback === 'like' ? '#3E36DC' : '#000000'}
446
+ />
447
+ </Button>
448
+ </Box>
449
+ </Grid>
472
450
  <Grid item>
473
451
  <Box display={'flex'} alignItems={'center'}>
474
452
  <Button
475
453
  style={{ padding: '6px' }}
476
454
  className="btn-item"
477
- onClick={() => false}
455
+ onClick={() => {
456
+ handlerFeedback('dislike');
457
+ setFeedback('dislike');
458
+ }}
478
459
  >
479
- <IconShare width={16} height={16} color="#808080" />
460
+ <IconDisLike
461
+ width={16}
462
+ height={16}
463
+ color={feedback === 'dislike' ? '#CC1854' : '#000000'}
464
+ />
480
465
  </Button>
481
466
  </Box>
482
467
  </Grid>
483
- )}
484
- {/* <Grid item>
468
+ {settings.shareOption && (
469
+ <Grid item>
470
+ <Box display={'flex'} alignItems={'center'}>
471
+ <Button
472
+ style={{ padding: '6px' }}
473
+ className="btn-item"
474
+ onClick={() => false}
475
+ >
476
+ <IconShare width={16} height={16} color="#808080" />
477
+ </Button>
478
+ </Box>
479
+ </Grid>
480
+ )}
481
+ {/* <Grid item>
485
482
  <Box display={'flex'} alignItems={'center'}>
486
483
  <Button className="btn-item">
487
484
  <Box
@@ -500,9 +497,10 @@ function ItemResult(props: Props) {
500
497
  </Button>
501
498
  </Box>
502
499
  </Grid> */}
503
- </Grid>
504
- </Box>
505
- )}
500
+ </Grid>
501
+ </Box>
502
+ )}
503
+ </div>
506
504
  </Box>
507
505
  </Box>
508
506
  );
@@ -160,8 +160,8 @@ button {
160
160
  // max-height: 33px; /* fallback */
161
161
  -webkit-line-clamp: 3; /* number of lines to show */
162
162
  -webkit-box-orient: vertical;
163
- min-height: 42px;
164
- height: 50px;
163
+ // min-height: 42px;
164
+ // height: 50px;
165
165
  }
166
166
 
167
167
  .max-line-2 {
@@ -563,6 +563,7 @@ button {
563
563
  box-shadow: 0px 0px 6px #aaabb5b3;
564
564
  .box-top {
565
565
  position: relative;
566
+ height: fit-content;
566
567
  .btn-show-result {
567
568
  position: absolute;
568
569
  top: 10px;
@@ -653,7 +654,9 @@ button {
653
654
 
654
655
  .box-content {
655
656
  background-color: #e9e9ec;
656
- padding: 8px 8px;
657
+ padding-left: 8px;
658
+ padding-right: 8px;
659
+ padding-bottom: 8px;
657
660
  min-height: 82px;
658
661
  justify-content: space-between;
659
662
  .box-top {
@@ -868,7 +871,8 @@ button {
868
871
  }
869
872
  .box-content-main {
870
873
  background: #f3f3f5;
871
- padding: 8px;
874
+ padding: 16px;
875
+ border-radius: 16px;
872
876
  height: 100%;
873
877
  @media screen and (min-width: 2047px) {
874
878
  position: inherit;
@@ -876,6 +880,8 @@ button {
876
880
  }
877
881
  .box-border {
878
882
  border: 2px dashed #aaabb5;
883
+ border-radius: 16px;
884
+ border-radius: 16px;
879
885
  height: 100%;
880
886
  display: flex;
881
887
  justify-content: center;
@@ -932,19 +938,19 @@ button {
932
938
  .box-wrap-result-component {
933
939
  min-height: 100%;
934
940
  display: flex;
935
- justify-content: space-between;
936
941
  flex-direction: column;
937
942
  // height: calc(100vh - 32px);
938
943
  background-color: #fafafa;
939
944
  .box-search {
940
945
  margin: 0px auto;
941
- padding: 22px 0px 32px 0px;
946
+ padding: 24px 0px 24px 0px;
942
947
  display: flex;
943
948
  justify-content: center;
944
949
  align-items: center;
945
- background-color: #fff;
950
+ background-color: #FAFAFA;
946
951
  flex-direction: column;
947
952
  width: 100%;
953
+ border-bottom: 1px solid #E0E0E0;
948
954
  .box-filter {
949
955
  margin-top: 26px;
950
956
  background: #f3f3f5;
@@ -994,11 +1000,14 @@ button {
994
1000
  }
995
1001
  .box-title_col-left {
996
1002
  position: absolute;
997
- bottom: 10px;
1003
+ bottom: 5px;
998
1004
  left: 0;
999
1005
  right: 0;
1000
1006
  margin: auto;
1001
1007
  width: fit-content;
1008
+ background-color: #3E36DC;
1009
+ padding: 4px;
1010
+ border-radius: 16px;
1002
1011
  }
1003
1012
  &.toggle {
1004
1013
  width: 32px;
@@ -1064,14 +1073,13 @@ button {
1064
1073
  flex-wrap: wrap;
1065
1074
  gap: 24px;
1066
1075
  .wrap-main-item-result {
1076
+ display: flex;
1077
+ flex-direction: column;
1067
1078
  max-width: 192px;
1068
1079
  width: 192px;
1069
- margin: 20px 0px;
1070
1080
  border-radius: 4px;
1071
1081
  overflow: hidden;
1072
- &:first-child {
1073
- margin-top: 5px !important;
1074
- }
1082
+ height: 100%;
1075
1083
  } &:first-child {
1076
1084
  margin-top: 0px !important;
1077
1085
  }
@@ -1361,14 +1369,13 @@ button {
1361
1369
  width: 512px;
1362
1370
  .box-input-search {
1363
1371
  justify-content: space-between;
1364
- background: #ffffff;
1365
- // box-shadow: 0px 0px 6.66667px rgba(0, 0, 0, 0.2);
1366
- background-color: #f3f3f5;
1367
- border-radius: 21px;
1372
+ box-shadow: 0px 2px 12px rgba(43, 44, 70, 0.13);;
1373
+ background-color: #fff;
1374
+ border-radius: 24px;
1368
1375
  padding: 0px !important;
1369
1376
  height: 42px;
1370
1377
  overflow: hidden;
1371
- padding-right: 5px !important;
1378
+ padding-right: 12px !important;
1372
1379
  form {
1373
1380
  width: 100%;
1374
1381
  display: flex;
@@ -1376,7 +1383,7 @@ button {
1376
1383
  align-items: center;
1377
1384
  .box-inp {
1378
1385
  input {
1379
- background-color: #f3f3f5;
1386
+ background-color: #fff;
1380
1387
  }
1381
1388
 
1382
1389
  .box-key-filter {
@@ -1386,8 +1393,8 @@ button {
1386
1393
  min-width: fit-content;
1387
1394
  display: flex;
1388
1395
  align-items: center;
1389
- border: 2px solid #2B2C46;
1390
- height: 100%;
1396
+ height: 75%;
1397
+ margin-left: 5px;
1391
1398
  p {
1392
1399
  font-size: 14px;
1393
1400
  font-size: 700;
@@ -1421,7 +1428,7 @@ button {
1421
1428
  border: 0px !important;
1422
1429
  &::placeholder {
1423
1430
  font-size: 14px !important;
1424
- color: #2b2c46 !important;
1431
+ color: #AAABB5 !important;
1425
1432
  font-weight: 500 !important;
1426
1433
  }
1427
1434
  &::-webkit-search-cancel-button {
@@ -1446,9 +1453,20 @@ button {
1446
1453
  width: 32px;
1447
1454
  height: 32px;
1448
1455
  border-radius: 100%;
1449
- background-color: #f3f3f5;
1450
1456
  z-index: 10;
1451
1457
  cursor: pointer !important;
1458
+ margin-right: 8px;
1459
+
1460
+ &:after {
1461
+ content: "";
1462
+ font-size: 39px;
1463
+ position: absolute;
1464
+ right: -3px;
1465
+ font-weight: 100;
1466
+ background-color: #E0E0E0;
1467
+ width: 1px;
1468
+ height: 35px;
1469
+ }
1452
1470
  }
1453
1471
  }
1454
1472
  }
@@ -1797,10 +1815,10 @@ button {
1797
1815
  border-radius: 21px;
1798
1816
  justify-content: space-between;
1799
1817
  align-items: center;
1800
- min-width: 70px;
1818
+ min-width: 60px;
1801
1819
  img {
1802
- width: 32px;
1803
- height: 32px;
1820
+ width: 25px;
1821
+ height: 22px;
1804
1822
  border-radius: 100%;
1805
1823
  }
1806
1824
  button {