@nyris/nyris-webapp 0.3.22 → 0.3.24

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 (95) hide show
  1. package/README.md +1 -1
  2. package/build/asset-manifest.json +12 -18
  3. package/build/index.html +1 -1
  4. package/build/{precache-manifest.6f6124db008881782a26c64db1f10264.js → precache-manifest.982b135daeb2c083ccf4eeeddf132bf3.js} +11 -35
  5. package/build/service-worker.js +1 -1
  6. package/build/static/css/{main.c956b74c.chunk.css → main.1e43a778.chunk.css} +2 -2
  7. package/build/static/css/main.1e43a778.chunk.css.map +1 -0
  8. package/build/static/js/2.fe9108d5.chunk.js +3 -0
  9. package/build/static/js/{2.a2732c2b.chunk.js.LICENSE.txt → 2.fe9108d5.chunk.js.LICENSE.txt} +0 -15
  10. package/build/static/js/2.fe9108d5.chunk.js.map +1 -0
  11. package/build/static/js/main.83cb88a3.chunk.js +3 -0
  12. package/build/static/js/main.83cb88a3.chunk.js.map +1 -0
  13. package/package.json +3 -3
  14. package/src/App.tsx +6 -14
  15. package/src/Router.tsx +6 -41
  16. package/src/Store/Store.ts +14 -23
  17. package/src/components/DetailItem.tsx +33 -22
  18. package/src/components/FooterMobile.tsx +3 -51
  19. package/src/components/FooterResult.tsx +1 -1
  20. package/src/components/HeaderMobile.tsx +13 -20
  21. package/src/components/HeaderNewVersion.tsx +5 -83
  22. package/src/components/Layout.tsx +3 -19
  23. package/src/components/PanelResult/index.tsx +1 -1
  24. package/src/components/clear-refinements/clear-refinements.tsx +1 -1
  25. package/src/components/drawer/cameraCustom.tsx +6 -12
  26. package/src/components/input/inputSearch.tsx +3 -3
  27. package/src/components/pre-filter/desktop/index.tsx +2 -2
  28. package/src/components/results/ItemResult.tsx +8 -8
  29. package/src/defaults.ts +19 -35
  30. package/src/helpers/CommonHelper.ts +10 -6
  31. package/src/hooks/useVisualSearch.tsx +1 -1
  32. package/src/index.css +13 -0
  33. package/src/index.tsx +0 -20
  34. package/src/modules/LandingPage/AppMD.tsx +59 -386
  35. package/src/modules/LandingPage/AppMobile.tsx +1 -1
  36. package/src/modules/LandingPage/propsType.ts +35 -37
  37. package/src/page/result/index.tsx +2 -2
  38. package/src/services/Feedback.ts +48 -71
  39. package/src/services/filter.tsx +1 -1
  40. package/src/services/types.ts +30 -39
  41. package/src/types.ts +8 -63
  42. package/build/js/test.js +0 -84
  43. package/build/static/css/main.c956b74c.chunk.css.map +0 -1
  44. package/build/static/js/2.a2732c2b.chunk.js +0 -3
  45. package/build/static/js/2.a2732c2b.chunk.js.map +0 -1
  46. package/build/static/js/main.93b05e17.chunk.js +0 -3
  47. package/build/static/js/main.93b05e17.chunk.js.map +0 -1
  48. package/build/static/media/Rectangle.4dd8b747.png +0 -0
  49. package/build/static/media/icon_company.2b2a0a61.svg +0 -3
  50. package/build/static/media/icon_email.132d632b.svg +0 -3
  51. package/build/static/media/icon_phone.09335da9.svg +0 -3
  52. package/build/static/media/icon_textArea.f6d78b61.svg +0 -3
  53. package/build/static/media/icon_users.2013c76e.svg +0 -3
  54. package/public/js/test.js +0 -84
  55. package/src/App.css +0 -65
  56. package/src/components/AppContainer.tsx +0 -126
  57. package/src/components/CategoryFilter.tsx +0 -17
  58. package/src/components/Codes.tsx +0 -20
  59. package/src/components/CustomHits/index.tsx +0 -47
  60. package/src/components/Footer.tsx +0 -96
  61. package/src/components/FooterMD.tsx +0 -54
  62. package/src/components/HeaderMd.tsx +0 -38
  63. package/src/components/Navigation.tsx +0 -34
  64. package/src/components/PredictedCategories.tsx +0 -14
  65. package/src/components/Refine.tsx +0 -28
  66. package/src/components/RelevantSort.tsx +0 -12
  67. package/src/components/Result.tsx +0 -210
  68. package/src/components/Saved/AllItem.tsx +0 -32
  69. package/src/components/Saved/Category.tsx +0 -16
  70. package/src/components/auto-complete/basic.tsx +0 -153
  71. package/src/components/autocomplete/plugins/popular-searches/popular-searches.css +0 -3
  72. package/src/components/autocomplete/plugins/popular-searches/popular-searches.tsx +0 -75
  73. package/src/components/button/clear-fillter.tsx +0 -30
  74. package/src/components/camera/screenshot.tsx +0 -33
  75. package/src/components/count/count.tsx +0 -20
  76. package/src/components/hitItem/hits.tsx +0 -50
  77. package/src/components/hitItem/infinitiHits.tsx +0 -33
  78. package/src/components/icon/icon.tsx +0 -13
  79. package/src/components/icon_textArea.svg +0 -3
  80. package/src/components/refinement-list/index.tsx +0 -42
  81. package/src/components/results/pagination.tsx +0 -34
  82. package/src/components/search/ListSearch.tsx +0 -209
  83. package/src/modules/LandingPage/App.tsx +0 -318
  84. package/src/modules/LandingPage/index.tsx +0 -186
  85. package/src/modules/LandingPage/indexNewVersion.tsx +0 -72
  86. package/src/page/Auth/login.tsx +0 -7
  87. package/src/page/Exception/404.tsx +0 -11
  88. package/src/page/History/index.tsx +0 -76
  89. package/src/page/Profile/index.tsx +0 -140
  90. package/src/page/ResultMobile/index.tsx +0 -12
  91. package/src/page/Saved/MockData.ts +0 -223
  92. package/src/page/Saved/index.tsx +0 -166
  93. package/src/page/Support/MockData.ts +0 -45
  94. package/src/page/Support/index.tsx +0 -492
  95. /package/build/static/js/{main.93b05e17.chunk.js.LICENSE.txt → main.83cb88a3.chunk.js.LICENSE.txt} +0 -0
@@ -1,492 +0,0 @@
1
- import {
2
- Box,
3
- Button,
4
- Checkbox,
5
- FormControlLabel,
6
- Grid,
7
- InputAdornment,
8
- TextareaAutosize,
9
- TextField,
10
- Typography,
11
- } from '@material-ui/core';
12
- import CloseOutlinedIcon from '@material-ui/icons/CloseOutlined';
13
- import { makeFileHandler } from '@nyris/nyris-react-components';
14
- import IconCompany from 'common/assets/icons/icon_company.svg';
15
- import IconEmail from 'common/assets/icons/icon_email.svg';
16
- import IconPhone from 'common/assets/icons/icon_phone.svg';
17
- import IconTextArea from 'common/assets/icons/icon_textArea.svg';
18
- import IconUsers from 'common/assets/icons/icon_users.svg';
19
- import React, { useLayoutEffect, useState } from 'react';
20
- import { useDropzone } from 'react-dropzone';
21
- import { useMediaQuery } from 'react-responsive';
22
- import { useHistory } from 'react-router-dom';
23
- interface Props {}
24
-
25
- function SupportPage(props: Props) {
26
- const [imageUpload, setImageUpload] = useState<any>();
27
- const isMobile = useMediaQuery({ query: '(max-width: 776px)' });
28
- const inputFileRef: any = React.useRef(null);
29
- const inputFileSnapRef: any = React.useRef(null);
30
- const history = useHistory();
31
-
32
- const { getRootProps, getInputProps, isDragActive } = useDropzone({
33
- onDrop: (fs: File[]) => {
34
- console.log('fs', fs);
35
- setImageUpload(URL.createObjectURL(fs[0]));
36
- },
37
- });
38
-
39
- const getImageMobile = (e: any) => {
40
- setImageUpload(URL.createObjectURL(e.target.files[0]));
41
- };
42
-
43
- useLayoutEffect(() => {
44
- history.push({
45
- pathname: '/',
46
- });
47
- // eslint-disable-next-line react-hooks/exhaustive-deps
48
- }, []);
49
-
50
- return (
51
- <Box className="wrap-main-support-page" display={'flex'}>
52
- <Box className="col-left">
53
- <Box
54
- className="col-left__top"
55
- display={'flex'}
56
- alignItems={'center'}
57
- justifyContent={'center'}
58
- >
59
- <Box
60
- style={
61
- !isMobile
62
- ? { width: 640 }
63
- : {
64
- width: '100%',
65
- display: 'flex',
66
- flexDirection: 'column-reverse',
67
- }
68
- }
69
- marginLeft={'auto'}
70
- display={'flex'}
71
- justifyContent={'flex-start'}
72
- flexDirection={'column'}
73
- >
74
- <Typography
75
- className="text-f12 text-white fw-700 text-title-support"
76
- style={
77
- !isMobile
78
- ? { width: 380 }
79
- : { width: '100%', color: '#1E1F31 !important' }
80
- }
81
- >
82
- Didn’t find what you were looking for? Share your search with our
83
- product expert:
84
- </Typography>
85
- <Box mt={2} mb={3}>
86
- <Typography
87
- className="text-f40 text-white fw-700 text-title-support"
88
- style={
89
- !isMobile
90
- ? { width: 380 }
91
- : { width: '100%', color: '#1E1F31 !important' }
92
- }
93
- >
94
- New ticket
95
- </Typography>
96
- </Box>
97
- </Box>
98
- </Box>
99
- <Box className="col-left__bottom">
100
- <Box
101
- className="col-left__bottom__content"
102
- style={{ width: 640 }}
103
- marginLeft={'auto'}
104
- >
105
- <Box className="box-form">
106
- <form>
107
- {!isMobile && !imageUpload && (
108
- <Box
109
- className={
110
- !isDragActive
111
- ? `box-content-main`
112
- : `box-content-main-drop`
113
- }
114
- >
115
- <div
116
- className={`box-border`}
117
- style={{ position: 'relative' }}
118
- {...getRootProps({
119
- onClick: e => {
120
- e.stopPropagation();
121
- },
122
- })}
123
- >
124
- {isDragActive ? (
125
- <Box>
126
- <Typography className="text-drop-file fw-600">
127
- DRAG <span className="tractor">&</span> DROP
128
- </Typography>
129
- <input
130
- {...getInputProps({
131
- onClick: e => {
132
- e.stopPropagation();
133
- },
134
- })}
135
- type="file"
136
- name="file"
137
- id="select_file"
138
- placeholder="Choose photo"
139
- onChange={makeFileHandler(e => {})}
140
- />
141
- </Box>
142
- ) : (
143
- <>
144
- <Box
145
- className="box-content-drop"
146
- {...getRootProps({
147
- onClick: e => {
148
- e.stopPropagation();
149
- },
150
- })}
151
- >
152
- <label
153
- htmlFor="select_file"
154
- className="text-f20 text-bold"
155
- >
156
- <span className="box-blue">Choose photo</span> or
157
- drag & drop it here
158
- </label>
159
- <input
160
- {...getInputProps()}
161
- type="file"
162
- name="file"
163
- id="select_file"
164
- className="inputFile"
165
- placeholder="Choose photo"
166
- style={{ display: 'block' }}
167
- />
168
- </Box>
169
- </>
170
- )}
171
- </div>
172
- </Box>
173
- )}
174
- {imageUpload && (
175
- <Box
176
- className="box-preview-image"
177
- display={'flex'}
178
- flexWrap={'wrap'}
179
- style={{
180
- width: 250,
181
- minHeight: 250,
182
- position: 'relative',
183
- border: '1px solid',
184
- }}
185
- >
186
- <Button
187
- style={{ position: 'absolute', right: 0, top: 0 }}
188
- onClick={() => setImageUpload(null)}
189
- >
190
- <CloseOutlinedIcon />
191
- </Button>
192
- <img
193
- className="support-img-preview"
194
- style={{ height: '100%', width: '100%' }}
195
- src={imageUpload}
196
- alt={`321`}
197
- />
198
- </Box>
199
- )}
200
-
201
- {/* TODO: Box form */}
202
- <Box mb={2} mt={4} className="box-form-control">
203
- <Grid container>
204
- <Grid
205
- item
206
- lg={6}
207
- sm={12}
208
- style={
209
- !isMobile
210
- ? { paddingRight: 10 }
211
- : { padding: 0, width: '100%' }
212
- }
213
- >
214
- <Box>
215
- <TextField
216
- required
217
- id="standard-required"
218
- label="Name"
219
- className="item-field"
220
- InputProps={{
221
- className: 'box-input-control',
222
- startAdornment: (
223
- <InputAdornment position="start">
224
- <img
225
- src={IconUsers}
226
- alt="icon_user"
227
- width={17}
228
- height={17}
229
- />
230
- </InputAdornment>
231
- ),
232
- }}
233
- />
234
- </Box>
235
- <Box>
236
- <TextField
237
- required
238
- id="standard-required"
239
- label="Email"
240
- className="item-field"
241
- InputProps={{
242
- className: 'box-input-control',
243
- startAdornment: (
244
- <InputAdornment position="start">
245
- <img
246
- src={IconEmail}
247
- alt="icon_phone"
248
- width={17}
249
- height={17}
250
- />
251
- </InputAdornment>
252
- ),
253
- }}
254
- />
255
- </Box>
256
- </Grid>
257
- <Grid
258
- item
259
- lg={6}
260
- sm={12}
261
- style={
262
- !isMobile
263
- ? { paddingRight: 10 }
264
- : { padding: 0, width: '100%' }
265
- }
266
- >
267
- <Box>
268
- <TextField
269
- id="standard-required"
270
- label="Phone number"
271
- className="item-field"
272
- InputProps={{
273
- className: 'box-input-control',
274
- startAdornment: (
275
- <InputAdornment position="start">
276
- <img
277
- src={IconPhone}
278
- alt="icon_phone"
279
- width={17}
280
- height={17}
281
- />
282
- </InputAdornment>
283
- ),
284
- }}
285
- />
286
- </Box>
287
- <Box>
288
- <TextField
289
- // required
290
- id="standard-required"
291
- label="Company"
292
- className="item-field"
293
- InputProps={{
294
- className: 'box-input-control',
295
- startAdornment: (
296
- <InputAdornment position="start">
297
- <img
298
- src={IconCompany}
299
- alt="icon_phone"
300
- width={17}
301
- height={17}
302
- />
303
- </InputAdornment>
304
- ),
305
- }}
306
- />
307
- </Box>
308
- </Grid>
309
- <Grid item xs={12}>
310
- <Box mt={2}>
311
- <Typography className="text-white text-f12 fw-500 text-title-support">
312
- Message
313
- </Typography>
314
- <Box mt={1} className="box-textArea">
315
- <Box className="box-icon">
316
- <img
317
- src={IconTextArea}
318
- alt="icon_user"
319
- width={17}
320
- height={17}
321
- />
322
- </Box>
323
- <TextareaAutosize
324
- aria-label="minimum height"
325
- minRows={!isMobile ? 3 : 1}
326
- placeholder="Minimum 3 rows"
327
- className="w-100"
328
- />
329
- </Box>
330
- </Box>
331
- </Grid>
332
- </Grid>
333
- </Box>
334
- {isMobile && (
335
- <Box
336
- className="box-choose-file-mobile w-100"
337
- display={'flex'}
338
- >
339
- <Box className="col-left">
340
- <Button
341
- onClick={() => {
342
- inputFileRef.current.click();
343
- }}
344
- >
345
- <Typography
346
- className="text-f14 fw-700"
347
- style={{ fontSize: 14, textTransform: 'none' }}
348
- >
349
- Choose file
350
- </Typography>
351
- <svg
352
- width="15"
353
- height="15"
354
- viewBox="0 0 15 15"
355
- fill="none"
356
- xmlns="http://www.w3.org/2000/svg"
357
- >
358
- <path
359
- d="M13.075 8.48134L5.575 0.981342C4.325 -0.318658 2.275 -0.318658 0.975 0.931342C-0.325 2.18134 -0.325 4.28134 0.975 5.53134L1.025 5.58134L2.425 7.03134L3.125 6.33134L1.675 4.88134C0.825 4.03134 0.825 2.58134 1.675 1.73134C2.525 0.881342 3.975 0.831342 4.825 1.68134C4.825 1.68134 4.825 1.68134 4.875 1.73134L12.325 9.18134C13.225 10.0313 13.225 11.4813 12.375 12.3313C11.525 13.2313 10.075 13.2313 9.225 12.3813C9.225 12.3813 9.225 12.3813 9.175 12.3313L5.475 8.63134C4.975 8.13134 5.025 7.33134 5.475 6.88134C5.975 6.43134 6.725 6.43134 7.225 6.88134L9.275 8.93134L9.975 8.23134L7.875 6.13134C6.975 5.28134 5.575 5.33134 4.725 6.23134C3.925 7.08134 3.925 8.43134 4.725 9.33134L8.475 13.0813C9.725 14.3813 11.775 14.3813 13.075 13.1313C14.375 11.8813 14.375 9.78134 13.075 8.48134C13.075 8.53134 13.075 8.48134 13.075 8.48134Z"
360
- fill="#1E1F31"
361
- />
362
- </svg>
363
- </Button>
364
- <input
365
- hidden
366
- type="file"
367
- ref={inputFileRef}
368
- onChange={getImageMobile}
369
- />
370
- </Box>
371
-
372
- <Box className="col-right">
373
- <Button
374
- onClick={() => {
375
- inputFileSnapRef.current.click();
376
- }}
377
- >
378
- <Typography
379
- className="text-f14 fw-700"
380
- style={{ fontSize: 14, textTransform: 'none' }}
381
- >
382
- Snap a picture
383
- </Typography>
384
- <svg
385
- width="16"
386
- height="13"
387
- viewBox="0 0 16 13"
388
- fill="none"
389
- xmlns="http://www.w3.org/2000/svg"
390
- >
391
- <path
392
- fill-rule="evenodd"
393
- clip-rule="evenodd"
394
- d="M16 12C16 12.3156 15.7442 12.5714 15.4286 12.5714H0.571429C0.255837 12.5714 0 12.3156 0 12V2.28571C0 1.97012 0.255837 1.71429 0.571429 1.71429H4.26286L5.24 0.257143C5.34513 0.0974942 5.52313 0.000988941 5.71429 0H10.2857C10.4769 0.000988941 10.6549 0.0974942 10.76 0.257143L11.7371 1.71429H15.4286C15.7442 1.71429 16 1.97012 16 2.28571V12ZM1.14286 11.4286H14.8571V2.85714H11.4286C11.2374 2.85615 11.0594 2.75964 10.9543 2.6L9.97714 1.14285H6.02286L5.04571 2.6C4.94058 2.75964 4.76258 2.85615 4.57143 2.85714H1.14286V11.4286ZM8 10.2857C6.10645 10.2857 4.57143 8.75068 4.57143 6.85713C4.57143 4.96358 6.10645 3.42856 8 3.42856C9.89355 3.42856 11.4286 4.96358 11.4286 6.85713C11.4286 8.75068 9.89355 10.2857 8 10.2857ZM8 4.57143C6.73764 4.57143 5.71429 5.59478 5.71429 6.85714C5.71429 8.11951 6.73764 9.14286 8 9.14286C9.26237 9.14286 10.2857 8.11951 10.2857 6.85714C10.2857 5.59478 9.26237 4.57143 8 4.57143Z"
395
- fill="#1E1F31"
396
- />
397
- </svg>
398
- </Button>
399
- <input
400
- hidden
401
- type="file"
402
- ref={inputFileSnapRef}
403
- onChange={getImageMobile}
404
- />
405
- </Box>
406
- </Box>
407
- )}
408
-
409
- {isMobile && imageUpload && (
410
- <Box
411
- className="box-preview-image-mobile"
412
- display={'flex'}
413
- flexWrap={'wrap'}
414
- style={{
415
- width: 100,
416
- minHeight: 100,
417
- position: 'relative',
418
- border: '1px solid',
419
- marginTop: '10px',
420
- }}
421
- >
422
- <Button
423
- style={{
424
- position: 'absolute',
425
- right: 0,
426
- top: 0,
427
- padding: 0,
428
- }}
429
- onClick={() => setImageUpload(null)}
430
- >
431
- <CloseOutlinedIcon />
432
- </Button>
433
- <img
434
- className="support-img-preview"
435
- style={{ height: '100%', width: '100%' }}
436
- src={imageUpload}
437
- alt={`321`}
438
- />
439
- </Box>
440
- )}
441
- <Box display={'flex'} flexDirection={'column'}>
442
- <FormControlLabel
443
- control={<Checkbox className="text-white" />}
444
- label="I consent to being contacted"
445
- className="w-100 text-white"
446
- />
447
- {!isMobile ? (
448
- <Button
449
- className="text-white fw-700 color border-rd-0"
450
- style={{
451
- padding: '5px 10px',
452
- backgroundColor: '#AAABB5',
453
- width: 'fit-content',
454
- borderRadius: 5,
455
- }}
456
- >
457
- Send
458
- </Button>
459
- ) : (
460
- <Button
461
- className="text-white fw-700 color border-rd-0 btn-submit-support"
462
- style={{
463
- padding: '8px 12px',
464
- backgroundColor: '#3E36DC',
465
- width: '100%',
466
- borderRadius: 5,
467
- marginBottom: '40px',
468
- }}
469
- >
470
- SEND MESSAGE
471
- </Button>
472
- )}
473
- </Box>
474
- {!isMobile && (
475
- <Box mt={3} style={{ width: '320px' }}>
476
- <Typography className="text-f8 text-white fw-600">
477
- All personal data will be securely stored in accordance
478
- with European GDPR regulations. We do not sell data.
479
- </Typography>
480
- </Box>
481
- )}
482
- </form>
483
- </Box>
484
- </Box>
485
- </Box>
486
- </Box>
487
- <Box className="col-right"></Box>
488
- </Box>
489
- );
490
- }
491
-
492
- export default SupportPage;