@experium/findy-form 1.1.460 → 1.2.1
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.
- package/{.travis.yml → .travis.old.yml} +1 -1
- package/Jenkinsfile +44 -0
- package/dist/404.html +22 -0
- package/dist/app.js +343 -0
- package/dist/index.html +30 -0
- package/lib/components/Fields.js +2 -2
- package/lib/components/Form.js +12 -2
- package/lib/components/formComponents/File.js +20 -16
- package/lib/components/formComponents/HtmlOpdForm.js +92 -15
- package/lib/components/formComponents/PersonalDataAgreement.js +40 -26
- package/lib/constants/allowFileExtensions.js +2 -2
- package/lib/constants/translations.js +146 -119
- package/lib/styles/index.css +19 -0
- package/lib/utils/errors.js +14 -0
- package/lib/utils/validation.js +42 -8
- package/package.json +8 -9
- package/src/components/Fields.js +6 -2
- package/src/components/Form.js +6 -2
- package/src/components/formComponents/File.js +22 -22
- package/src/components/formComponents/HtmlOpdForm.js +128 -16
- package/src/components/formComponents/PersonalDataAgreement.js +70 -49
- package/src/constants/allowFileExtensions.js +2 -2
- package/src/constants/translations.js +123 -96
- package/src/styles/index.css +19 -0
- package/src/utils/errors.js +7 -0
- package/src/utils/validation.js +37 -9
- package/FETCH_HEAD +0 -0
|
@@ -94,10 +94,13 @@ var TRANSLATIONS = {
|
|
|
94
94
|
'fileTypeAudio': 'Invalid type, select audio file',
|
|
95
95
|
'fileTypeVideo': 'Invalid type, select video file',
|
|
96
96
|
'composite': 'Required block',
|
|
97
|
-
'
|
|
98
|
-
'captchaRequired': 'Verification required'
|
|
97
|
+
'incompleteDate': 'Full date is required',
|
|
98
|
+
'captchaRequired': 'Verification required',
|
|
99
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
99
100
|
},
|
|
100
|
-
'invalidCaptcha': 'Invalid captcha'
|
|
101
|
+
'invalidCaptcha': 'Invalid captcha',
|
|
102
|
+
'licenseError': 'The maximum number of responses has been reached for test access. Contact the Sales Department of Geliosoft LLC and the contacts of the sales department (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 Moscow time), <a href=\"tel:+79150216424\"> +7 (915) 021-64-24 </a>) ',
|
|
103
|
+
'licenseExpired': 'The test access period "30 days" has expired. Contact the Sales Department of "Heliosoft" LLC and the contacts of the sales department (<a href="mailto:help@findy.ru"> help@findy.ru </a>, <a href="tel:+74957836603"> +7 (495) 783-66-03 </a> (9:00-18:00 Moscow time), <a href="tel: +79150216424"> + 7 (915) 021-64-24 </a>)'
|
|
101
104
|
}
|
|
102
105
|
},
|
|
103
106
|
ru: {
|
|
@@ -188,10 +191,13 @@ var TRANSLATIONS = {
|
|
|
188
191
|
'fileTypeAudio': 'Неверный тип файла, выберите аудиофайл',
|
|
189
192
|
'fileTypeVideo': 'Неверный тип файла, выберите видеофайл',
|
|
190
193
|
'composite': 'Блок обязателен для заполнения',
|
|
191
|
-
'
|
|
192
|
-
'captchaRequired': 'Необходимо пройти проверку'
|
|
194
|
+
'incompleteDate': 'Необходимо указать дату полностью',
|
|
195
|
+
'captchaRequired': 'Необходимо пройти проверку',
|
|
196
|
+
'incorrectBirthDate': 'Дата не может быть меньше даты рождения'
|
|
193
197
|
},
|
|
194
|
-
'invalidCaptcha': 'Неверно введена капча'
|
|
198
|
+
'invalidCaptcha': 'Неверно введена капча',
|
|
199
|
+
'licenseError': 'В рамках тестового доступа достигнуто максимальное количество откликов. Обратитесь в Отдел продаж ООО "Гелиософт" и контакты отдела продаж (<a href=\"mailto:help@findy.ru\">help@findy.ru</a>, <a href=\"tel:+74957836603\">+7 (495) 783-66-03</a> (9:00-18:00 МСК), <a href=\"tel:+79150216424\">+7 (915) 021-64-24</a>)',
|
|
200
|
+
'licenseExpired': 'Срок тестового доступа "30 дней" завершен. Обратитесь в Отдел продаж ООО "Гелиософт" и контакты отдела продаж (<a href="mailto:help@findy.ru">help@findy.ru</a>, <a href="tel:+74957836603">+7 (495) 783-66-03</a> (9:00-18:00 МСК), <a href="tel:+79150216424">+7 (915) 021-64-24</a>)'
|
|
195
201
|
}
|
|
196
202
|
},
|
|
197
203
|
ua: {
|
|
@@ -282,10 +288,13 @@ var TRANSLATIONS = {
|
|
|
282
288
|
'fileTypeAudio': 'Неправильний тип файлу, виберіть аудіофайл',
|
|
283
289
|
'fileTypeVideo': 'Невірний тип файлу, виберіть відеофайл',
|
|
284
290
|
'composite': 'Блок обов\'язковий для заповнення',
|
|
285
|
-
'
|
|
286
|
-
'captchaRequired': 'Необхідно пройти перевірку'
|
|
291
|
+
'incompleteDate': 'Необхідно вказати дату повністю',
|
|
292
|
+
'captchaRequired': 'Необхідно пройти перевірку',
|
|
293
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
287
294
|
},
|
|
288
|
-
'invalidCaptcha': 'Невірно введена капча'
|
|
295
|
+
'invalidCaptcha': 'Невірно введена капча',
|
|
296
|
+
'licenseError': 'В рамках тестового доступу досягнуто максимальну кількість відгуків. Зверніться до Відділу продажу ТОВ "Геліософт" і контакти відділу продажів (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 за київським часом), <a href=\"tel:+79150216424\"> +7 (915) 021-64-24 </a>) ',
|
|
297
|
+
'licenseExpired': 'Термін тестового доступу "30 днів" завершено. Зверніться до Відділу продаж ТОВ "Геліософт" (<a href="mailto:help@findy.ru">help@findy.ru</a>, <a href="tel:+74957836603">+7 (495) 783-66-03</a> (9:00-18:00 МСК), <a href="tel:+79150216424">+7 (915) 021-64-24</a>)'
|
|
289
298
|
}
|
|
290
299
|
},
|
|
291
300
|
et: {
|
|
@@ -375,17 +384,116 @@ var TRANSLATIONS = {
|
|
|
375
384
|
'fileTypeAudio': 'Vale tüüp, valige helifail',
|
|
376
385
|
'fileTypeVideo': 'Vale tüüp, valige videofail',
|
|
377
386
|
'composite': 'Nõutav plokk',
|
|
378
|
-
'
|
|
379
|
-
'captchaRequired': 'Nõutav kontrollimine'
|
|
387
|
+
'incompleteDate': 'Täiskuupäev on kohustuslik',
|
|
388
|
+
'captchaRequired': 'Nõutav kontrollimine',
|
|
389
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
380
390
|
},
|
|
381
|
-
'invalidCaptcha': 'Sisestati sobimatu captcha'
|
|
391
|
+
'invalidCaptcha': 'Sisestati sobimatu captcha',
|
|
392
|
+
'licenseError': 'Testjuurdepääsuks on saavutatud maksimaalne vastuste arv. Võtke ühendust Heliosoft LLC müügiosakonnaga ja müügiosakonna kontaktidega (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 MSK), <a href=\"tel:+79150216424\"> +7 (915) 021-64–24</a>)',
|
|
393
|
+
'licenseExpired': 'Testjuurdepääsu periood "30 päeva" on möödas. Võtke ühendust "Heliosoft" LLC müügiosakonnaga ja müügiosakonna kontaktidega (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 MSK), <a href=\"tel:+79150216424\"> +7 (915) 021-64–24</a>)'
|
|
382
394
|
}
|
|
383
395
|
},
|
|
384
396
|
lt: {
|
|
385
397
|
translation: {
|
|
386
|
-
'send': '
|
|
398
|
+
'send': 'Pateikti',
|
|
399
|
+
'addQuestionBlock': 'Papildyti',
|
|
400
|
+
'remove': 'Pašalinti',
|
|
401
|
+
'optional': ' (neprivaloma)',
|
|
402
|
+
'cancel': 'Atšaukti',
|
|
403
|
+
'save': 'Išsaugoti',
|
|
404
|
+
'stopRecording': 'Sustabdyti įrašymą',
|
|
405
|
+
'startRecording': 'Pradėti įrašymą',
|
|
406
|
+
'upload': 'Įkelti',
|
|
407
|
+
'download': 'Parsisiųsti',
|
|
408
|
+
'recordAudio': 'Įrašyti garsą',
|
|
409
|
+
'recordVideo': 'Įrašyti vaizdo įrašą',
|
|
410
|
+
'takePhoto': 'Nufotografuoti',
|
|
411
|
+
'opdFormAccept': 'Priimti',
|
|
412
|
+
'opdLabel': 'Aš sutinku su',
|
|
413
|
+
'opdLink': 'asmens duomenų tvarkymas',
|
|
414
|
+
'opdOffertaLabel': 'Sutinku su sąlygomis',
|
|
415
|
+
'opdOffertaLink': 'viešas pasiūlymas',
|
|
416
|
+
'MONTHS': [{
|
|
417
|
+
value: 1,
|
|
418
|
+
label: 'Sausis'
|
|
419
|
+
}, {
|
|
420
|
+
value: 2,
|
|
421
|
+
label: 'Vasaris'
|
|
422
|
+
}, {
|
|
423
|
+
value: 3,
|
|
424
|
+
label: 'Kovas'
|
|
425
|
+
}, {
|
|
426
|
+
value: 4,
|
|
427
|
+
label: 'Balandis'
|
|
428
|
+
}, {
|
|
429
|
+
value: 5,
|
|
430
|
+
label: 'Gegužė'
|
|
431
|
+
}, {
|
|
432
|
+
value: 6,
|
|
433
|
+
label: 'Birželis'
|
|
434
|
+
}, {
|
|
435
|
+
value: 7,
|
|
436
|
+
label: 'Liepa'
|
|
437
|
+
}, {
|
|
438
|
+
value: 8,
|
|
439
|
+
label: 'Rugpjūtis'
|
|
440
|
+
}, {
|
|
441
|
+
value: 9,
|
|
442
|
+
label: 'Rugsėjis'
|
|
443
|
+
}, {
|
|
444
|
+
value: 10,
|
|
445
|
+
label: 'Spalis'
|
|
446
|
+
}, {
|
|
447
|
+
value: 11,
|
|
448
|
+
label: 'Lapkritis'
|
|
449
|
+
}, {
|
|
450
|
+
value: 12,
|
|
451
|
+
label: 'Gruodis'
|
|
452
|
+
}],
|
|
453
|
+
'loading': 'Įkeliama...',
|
|
454
|
+
'noOptionsMessage': 'Duomenų nėra',
|
|
455
|
+
'otherOption': 'Kita',
|
|
456
|
+
'placeholders': {
|
|
457
|
+
'datePicker': {
|
|
458
|
+
'day': 'Diena',
|
|
459
|
+
'month': 'Mėnuo',
|
|
460
|
+
'year': 'Metai'
|
|
461
|
+
},
|
|
462
|
+
'salaryCurrency': 'Pasirinkite valiutą...'
|
|
463
|
+
},
|
|
464
|
+
'errors': {
|
|
465
|
+
'required': 'Privalomas laukelis',
|
|
466
|
+
'minLength': 'Minimalus raidžių skaičius - {{count}}',
|
|
467
|
+
'maxLength': 'Maksimalus raidžių skaičius - {{count}}',
|
|
468
|
+
'moreThan': 'Skaičius turi būti didesnis nei {{more}}',
|
|
469
|
+
'currency': 'Reikalinga valiuta',
|
|
470
|
+
'phone': 'Neteisingas telefono numeris',
|
|
471
|
+
'email': 'Neteisingas el. pašto adresas',
|
|
472
|
+
'emailChars': 'Neteisingas el. Paštas (galiojantys simboliai - raidžių skaičiai _ - .)',
|
|
473
|
+
'emailDomain': 'Neteisingas el. Pašto domenas (galiojantys simboliai - raidžių skaičiai - .)',
|
|
474
|
+
'audioPermission': 'Prieiga prie mikrofono yra užblokuota. Leisti prieigą prie mikrofono naršyklės nustatymuose',
|
|
475
|
+
'cameraPermission': 'Prieiga prie kameros užblokuota. Leiskite prieigą prie kameros naršyklės nustatymuose',
|
|
476
|
+
'uploadError': 'Nepavyko įkelti failo.',
|
|
477
|
+
'maximumFileSize': 'Maksimalus failo dydis: {{count}} megabaitai',
|
|
478
|
+
'maximumFileSize_plural': 'Didžiausias failo dydis: {{count}} megabaitų',
|
|
479
|
+
'fileType': 'Netinkamas tipas, galimi tipai: {{types}}',
|
|
480
|
+
'fileTypeAudio': 'Netinkamas tipas, pasirinkite garso failą',
|
|
481
|
+
'fileTypeVideo': 'Netinkamas tipas, pasirinkite vaizdo failą',
|
|
482
|
+
'composite': 'Reikalingas blokas',
|
|
483
|
+
'incompleteDate': 'Būtina nurodyti pilną datą',
|
|
484
|
+
'captchaRequired': 'Būtina patvirtinimas',
|
|
485
|
+
'incorrectBirthDate': 'Data negali būti ankstesnė už gimimo datą'
|
|
486
|
+
},
|
|
487
|
+
'invalidCaptcha': 'Neteisingas CAPTCHA kodas',
|
|
488
|
+
'licenseError': 'Pasiektas maksimalus bandymų prieigos atsakymų skaičius. Susisiekite su „Heliosoft LLC“ pardavimo skyriumi ir pardavimo skyriaus kontaktais (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 Maskvos laiku), <a href=\"tel:+79150216424\"> +7 (915) 021-64–24 </a>)',
|
|
489
|
+
'licenseExpired': 'Bandymo prieigos laikotarpis „30 dienų“ baigėsi. Susisiekite su „Heliosoft“ LLC pardavimų skyriumi ir pardavimo skyriaus kontaktais (<a href="mailto:help@findy.ru"> help@findy.ru </a>, <a href = "tel: +74957836603 "> +7 (495) 783-66-03 </a> (9:00-18:00 Maskvos laiku), <a href="tel: +79150216424"> + 7 (915) 021-64-24 < /a>)'
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
lv: {
|
|
493
|
+
translation: {
|
|
494
|
+
'send': 'Pateikti',
|
|
387
495
|
'addQuestionBlock': 'Pievienot',
|
|
388
|
-
'remove': '
|
|
496
|
+
'remove': 'Nonemt',
|
|
389
497
|
'optional': ' (neobligāti)',
|
|
390
498
|
'cancel': 'Atcelt',
|
|
391
499
|
'save': 'Saglabāt',
|
|
@@ -468,103 +576,13 @@ var TRANSLATIONS = {
|
|
|
468
576
|
'fileTypeAudio': 'Nederīgs tips, atlasiet audio failu',
|
|
469
577
|
'fileTypeVideo': 'Nederīgs tips, atlasiet video failu',
|
|
470
578
|
'composite': 'Nepieciešamais bloks',
|
|
471
|
-
'
|
|
472
|
-
'captchaRequired': 'Nepieciešama verifikācija'
|
|
473
|
-
|
|
474
|
-
'invalidCaptcha': 'Ievadīta nederīga captcha'
|
|
475
|
-
}
|
|
476
|
-
},
|
|
477
|
-
lv: {
|
|
478
|
-
translation: {
|
|
479
|
-
'send': 'Pateikti',
|
|
480
|
-
'addQuestionBlock': 'Papildyti',
|
|
481
|
-
'remove': 'Pašalinti',
|
|
482
|
-
'optional': ' (neprivaloma)',
|
|
483
|
-
'cancel': 'Atšaukti',
|
|
484
|
-
'save': 'Sutaupyti',
|
|
485
|
-
'stopRecording': 'Sustabdyti įrašymą',
|
|
486
|
-
'startRecording': 'Pradėkite įrašyti',
|
|
487
|
-
'upload': 'Įkelti',
|
|
488
|
-
'download': 'Parsisiųsti',
|
|
489
|
-
'recordAudio': 'Įrašyti garsą',
|
|
490
|
-
'recordVideo': 'Įrašyti garsą',
|
|
491
|
-
'takePhoto': 'Nufotografuoti',
|
|
492
|
-
'opdFormAccept': 'Priimti',
|
|
493
|
-
'opdLabel': 'Aš sutinku',
|
|
494
|
-
'opdLink': 'asmens duomenų tvarkymas',
|
|
495
|
-
'opdOffertaLabel': 'Aš sutinku su sąlygomis',
|
|
496
|
-
'opdOffertaLink': 'viešas pasiūlymas',
|
|
497
|
-
'MONTHS': [{
|
|
498
|
-
value: 1,
|
|
499
|
-
label: 'Sausio mėn'
|
|
500
|
-
}, {
|
|
501
|
-
value: 2,
|
|
502
|
-
label: 'Vasario mėn'
|
|
503
|
-
}, {
|
|
504
|
-
value: 3,
|
|
505
|
-
label: 'Kovas'
|
|
506
|
-
}, {
|
|
507
|
-
value: 4,
|
|
508
|
-
label: 'Balandis'
|
|
509
|
-
}, {
|
|
510
|
-
value: 5,
|
|
511
|
-
label: 'Gegužė'
|
|
512
|
-
}, {
|
|
513
|
-
value: 6,
|
|
514
|
-
label: 'Birželio mėn'
|
|
515
|
-
}, {
|
|
516
|
-
value: 7,
|
|
517
|
-
label: 'Liepos mėn'
|
|
518
|
-
}, {
|
|
519
|
-
value: 8,
|
|
520
|
-
label: 'Rugpjūtis'
|
|
521
|
-
}, {
|
|
522
|
-
value: 9,
|
|
523
|
-
label: 'Rugsėjo mėn'
|
|
524
|
-
}, {
|
|
525
|
-
value: 10,
|
|
526
|
-
label: 'Spalio mėn'
|
|
527
|
-
}, {
|
|
528
|
-
value: 11,
|
|
529
|
-
label: 'Lapkričio mėn'
|
|
530
|
-
}, {
|
|
531
|
-
value: 12,
|
|
532
|
-
label: 'Gruodžio mėn'
|
|
533
|
-
}],
|
|
534
|
-
'loading': 'Įkeliama...',
|
|
535
|
-
'noOptionsMessage': 'Duomenų nėra',
|
|
536
|
-
'otherOption': 'Kita',
|
|
537
|
-
'placeholders': {
|
|
538
|
-
'datePicker': {
|
|
539
|
-
'day': 'Diena',
|
|
540
|
-
'month': 'Mėnuo',
|
|
541
|
-
'year': 'Metai'
|
|
542
|
-
},
|
|
543
|
-
'salaryCurrency': 'Pasirinkite valiutą...'
|
|
544
|
-
},
|
|
545
|
-
'errors': {
|
|
546
|
-
'required': 'Privalomas laukelis',
|
|
547
|
-
'minLength': 'Minimalus raidžių skaičius - {{count}}',
|
|
548
|
-
'maxLength': 'Maksimalus raidžių skaičius - {{count}}',
|
|
549
|
-
'moreThan': 'Skaičius turi būti didesnis nei {{more}}',
|
|
550
|
-
'currency': 'Reikalinga valiuta',
|
|
551
|
-
'phone': 'Neteisingas telefono numeris',
|
|
552
|
-
'email': 'Neteisingas el. pašto adresas',
|
|
553
|
-
'emailChars': 'Neteisingas el. Paštas (galiojantys simboliai - raidžių skaičiai _ - .)',
|
|
554
|
-
'emailDomain': 'Neteisingas el. Pašto domenas (galiojantys simboliai - raidžių skaičiai - .)',
|
|
555
|
-
'audioPermission': 'Prieiga prie mikrofono yra užblokuota. Leisti prieigą prie mikrofono naršyklės nustatymuose',
|
|
556
|
-
'cameraPermission': 'Prieiga prie kameros yra užblokuota. Leisti prieigą prie fotoaparato naršyklės nustatymuose',
|
|
557
|
-
'uploadError': 'Nepavyko įkelti failo.',
|
|
558
|
-
'maximumFileSize': 'Maksimalus failo dydis: {{count}} megabaitas',
|
|
559
|
-
'maximumFileSize_plural': 'Maksimalus failo dydis: {{count}} megabaitai',
|
|
560
|
-
'fileType': 'Netinkamas tipas, galimi tipai: {{types}}',
|
|
561
|
-
'fileTypeAudio': 'Netinkamas tipas, pasirinkite garso failą',
|
|
562
|
-
'fileTypeVideo': 'Netinkamas tipas, pasirinkite vaizdo failą',
|
|
563
|
-
'composite': 'Reikalingas blokas',
|
|
564
|
-
'icompleteDate': 'Būtina nurodyti visą datą',
|
|
565
|
-
'captchaRequired': 'Būtina patvirtinti'
|
|
579
|
+
'incompleteDate': 'Nepieciešams norādīt pilnu datumu',
|
|
580
|
+
'captchaRequired': 'Nepieciešama verifikācija',
|
|
581
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
566
582
|
},
|
|
567
|
-
'invalidCaptcha': '
|
|
583
|
+
'invalidCaptcha': 'Ievadīta nederīga captcha',
|
|
584
|
+
'licenseError': 'Testa piekļūšanai ir sasniegts maksimālais atbilžu skaits. Sazinieties ar Heliosoft LLC pārdošanas nodaļu un pārdošanas nodaļas kontaktpersonām (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 pēc Maskavas laika), <a href=\"tel:+79150216424\"> +7 (915) 021-64–24 </a>)',
|
|
585
|
+
'licenseExpired': 'Pārbaudes piekļuves periods "30 dienas" ir beidzies. Sazinieties ar "Heliosoft" LLC Pārdošanas Nodaļu un pārdošanas nodaļas kontaktiem (<a href="mailto:help@findy.ru"> help@findy.ru </a>, <a href="tel:+74957836603"> +7 (495) 783-66-03 </a> (9:00-18:00 Maskavas laiks), <a href="tel: +79150216424"> + 7 (915) 021-64-24 </a>) '
|
|
568
586
|
}
|
|
569
587
|
},
|
|
570
588
|
kz: {
|
|
@@ -655,10 +673,13 @@ var TRANSLATIONS = {
|
|
|
655
673
|
'fileTypeAudio': 'Файл түрі жарамсыз, аудио файлды таңдаңыз',
|
|
656
674
|
'fileTypeVideo': 'Файл түрі жарамсыз, бейне файлды таңдаңыз',
|
|
657
675
|
'composite': 'Блок қажет',
|
|
658
|
-
'
|
|
659
|
-
'captchaRequired': 'Тексеру қажет'
|
|
676
|
+
'incompleteDate': 'Сіз толық күнді көрсетуіңіз керек',
|
|
677
|
+
'captchaRequired': 'Тексеру қажет',
|
|
678
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
660
679
|
},
|
|
661
|
-
'invalidCaptcha': 'Жарамсыз captcha енгізілді'
|
|
680
|
+
'invalidCaptcha': 'Жарамсыз captcha енгізілді',
|
|
681
|
+
'licenseError': 'Тестке кіру үшін жауаптардың максималды санына жетті. Heliosoft LLC сату бөліміне және сату бөлімінің байланыстарына хабарласыңыз (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href =\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (Мәскеу уақытымен 9:00-18:00), <a href=\"tel:+79150216424\"> +7 (915) 021-64-24 </a>) ',
|
|
682
|
+
'licenseExpired': ''
|
|
662
683
|
}
|
|
663
684
|
},
|
|
664
685
|
th: {
|
|
@@ -749,10 +770,13 @@ var TRANSLATIONS = {
|
|
|
749
770
|
'fileTypeAudio': 'ประเภทไฟล์ไม่ถูกต้อง เลือกไฟล์เสียง',
|
|
750
771
|
'fileTypeVideo': 'ประเภทไฟล์ไม่ถูกต้อง เลือกไฟล์วิดีโอ',
|
|
751
772
|
'composite': 'จำเป็นต้องบล็อก',
|
|
752
|
-
'
|
|
753
|
-
'captchaRequired': 'ต้องยืนยัน'
|
|
773
|
+
'incompleteDate': 'คุณต้องระบุวันที่แบบเต็ม',
|
|
774
|
+
'captchaRequired': 'ต้องยืนยัน',
|
|
775
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
754
776
|
},
|
|
755
|
-
'validCaptcha': 'ป้อน captcha ไม่ถูกต้อง'
|
|
777
|
+
'validCaptcha': 'ป้อน captcha ไม่ถูกต้อง',
|
|
778
|
+
'licenseError': 'มีการตอบกลับถึงจำนวนสูงสุดสำหรับการเข้าถึงการทดสอบแล้ว ติดต่อฝ่ายขายของ Heliosoft LLC และผู้ติดต่อของฝ่ายขาย (<a href=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href=\"tel:+74957836603\"> +7 (495) 783-66-03 </a> (9:00-18:00 น. เวลามอสโก), <a href=\"tel:+79150216424\"> +7 (915) 021-64-24 </a>) ',
|
|
779
|
+
'licenseExpired': ''
|
|
756
780
|
}
|
|
757
781
|
},
|
|
758
782
|
uz: {
|
|
@@ -843,10 +867,13 @@ var TRANSLATIONS = {
|
|
|
843
867
|
'fileTypeAudio': 'Fayl turi noto\'g\'ri, audio faylni tanlang',
|
|
844
868
|
'fileTypeVideo': 'Fayl turi noto\'g\'ri, video faylni tanlang',
|
|
845
869
|
'composite': 'Bloklash shart',
|
|
846
|
-
'
|
|
847
|
-
'captchaRequired': 'Tasdiqlash kerak'
|
|
870
|
+
'incompleteDate': 'To\'liq sanani ko\'rsatish kerak',
|
|
871
|
+
'captchaRequired': 'Tasdiqlash kerak',
|
|
872
|
+
'incorrectBirthDate': 'Date cant be earlier then birth date'
|
|
848
873
|
},
|
|
849
|
-
'invalidCaptcha': "Noto'g'ri captcha kiritildi"
|
|
874
|
+
'invalidCaptcha': "Noto'g'ri captcha kiritildi",
|
|
875
|
+
'licenseError': 'Testlarga kirish uchun maksimal javoblar soniga erishildi. "Heliosoft" MChJ savdo bo\'limi va savdo bo\'limi bilan bog\'laning (< ahref=\"mailto:help@findy.ru\"> help@findy.ru </a>, <a href =\"tel:+ 74957836603\"> +7 (495) 783-66-03 </a> (Moskva vaqti bilan 9:00-18:00), <a href=\"tel:+79150216424\"> +7 (915) 021-64-24 </a>)',
|
|
876
|
+
'licenseExpired': ''
|
|
850
877
|
}
|
|
851
878
|
}
|
|
852
879
|
};
|
package/lib/styles/index.css
CHANGED
|
@@ -411,6 +411,22 @@
|
|
|
411
411
|
border: 0;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
+
body .rc-checkbox:hover .rc-checkbox-inner, body .rc-checkbox-input:focus + .rc-checkbox-inner {
|
|
415
|
+
border-color: #3a70ba;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.pda-modal .checkbox-wrapper .rc-checkbox.rc-checkbox-checked .rc-checkbox-inner:after {
|
|
419
|
+
left: 4px;
|
|
420
|
+
top: 1px;
|
|
421
|
+
width: 4px;
|
|
422
|
+
height: 7px;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.checkbox-wrapper .rc-checkbox-checked .rc-checkbox-inner {
|
|
426
|
+
border-color: #3a70ba;
|
|
427
|
+
background-color: #3a70ba;
|
|
428
|
+
}
|
|
429
|
+
|
|
414
430
|
.radio-wrapper .radio-label {
|
|
415
431
|
display: inline-block;
|
|
416
432
|
padding-left: 10px;
|
|
@@ -453,6 +469,9 @@
|
|
|
453
469
|
word-break: break-word;
|
|
454
470
|
}
|
|
455
471
|
@media screen and (max-width: 991px) {
|
|
472
|
+
.pda-modal {
|
|
473
|
+
width: 100%;
|
|
474
|
+
}
|
|
456
475
|
.pda-modal input.text {
|
|
457
476
|
width: 90%;
|
|
458
477
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isError = void 0;
|
|
7
|
+
|
|
8
|
+
var _ramda = require("ramda");
|
|
9
|
+
|
|
10
|
+
var isError = function isError(error, serverErrors) {
|
|
11
|
+
return !!(0, _ramda.pathEq)(['graphQLErrors', 0, 'message'], error, serverErrors) || !!(0, _ramda.pathEq)(['data', 'message'], error, serverErrors) || !!(0, _ramda.pathEq)(['message'], error, serverErrors);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
exports.isError = isError;
|
package/lib/utils/validation.js
CHANGED
|
@@ -13,6 +13,8 @@ var _ramda = require("ramda");
|
|
|
13
13
|
|
|
14
14
|
var yup = _interopRequireWildcard(require("yup"));
|
|
15
15
|
|
|
16
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
17
|
+
|
|
16
18
|
var _classValidator = require("class-validator");
|
|
17
19
|
|
|
18
20
|
var _libphonenumberJs = require("libphonenumber-js");
|
|
@@ -23,8 +25,12 @@ var _regexps = require("../constants/regexps");
|
|
|
23
25
|
|
|
24
26
|
var _allowFileExtensions = require("../constants/allowFileExtensions");
|
|
25
27
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
+
var checkDate = function checkDate(value) {
|
|
29
|
+
return !value || value === 'incomplete';
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var checkFileType = function checkFileType(fileType, mimeType, extenstion) {
|
|
33
|
+
var allowFileExtensions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
28
34
|
|
|
29
35
|
switch (fileType) {
|
|
30
36
|
case 'audio':
|
|
@@ -33,9 +39,12 @@ var checkFileType = function checkFileType(fileType, mimeType) {
|
|
|
33
39
|
case 'video':
|
|
34
40
|
return (0, _ramda.startsWith)('video', mimeType);
|
|
35
41
|
|
|
36
|
-
|
|
42
|
+
case 'image':
|
|
37
43
|
var allowFileTypes = (0, _ramda.join)(',', (0, _ramda.values)(allowFileExtensions && !(0, _ramda.isEmpty)(allowFileExtensions[fileType]) ? allowFileExtensions[fileType] : _allowFileExtensions.defaultAllowFileExtensions[fileType]));
|
|
38
44
|
return allowFileTypes ? (0, _ramda.contains)(mimeType, (0, _ramda.split)(',', (0, _ramda.replace)(/\s/g, '', allowFileTypes))) : true;
|
|
45
|
+
|
|
46
|
+
default:
|
|
47
|
+
return !fileType || (allowFileTypes ? allowFileExtensions[fileType][extenstion] : _allowFileExtensions.defaultAllowFileExtensions[fileType][extenstion]);
|
|
39
48
|
}
|
|
40
49
|
};
|
|
41
50
|
|
|
@@ -238,12 +247,12 @@ var rules = {
|
|
|
238
247
|
var result = true;
|
|
239
248
|
value.forEach(function (value) {
|
|
240
249
|
if (result) {
|
|
241
|
-
result = checkFileType(value.type, value.contentType, allowFileExtensions);
|
|
250
|
+
result = checkFileType(value.type, value.contentType, value.extenstion, allowFileExtensions);
|
|
242
251
|
}
|
|
243
252
|
});
|
|
244
253
|
return result;
|
|
245
254
|
} else {
|
|
246
|
-
return checkFileType(value.type, value.contentType, allowFileExtensions);
|
|
255
|
+
return checkFileType(value.type, value.contentType, value.extenstion, allowFileExtensions);
|
|
247
256
|
}
|
|
248
257
|
}
|
|
249
258
|
});
|
|
@@ -273,7 +282,7 @@ var rules = {
|
|
|
273
282
|
date: function date() {
|
|
274
283
|
return yup.string().nullable().test({
|
|
275
284
|
name: 'completeDate',
|
|
276
|
-
message: _i18n["default"].t('errors.
|
|
285
|
+
message: _i18n["default"].t('errors.incompleteDate'),
|
|
277
286
|
test: function test(value) {
|
|
278
287
|
return value !== 'incomplete';
|
|
279
288
|
}
|
|
@@ -281,8 +290,33 @@ var rules = {
|
|
|
281
290
|
}
|
|
282
291
|
};
|
|
283
292
|
|
|
293
|
+
var validateBirthDate = function validateBirthDate(format) {
|
|
294
|
+
return function (rule, form) {
|
|
295
|
+
return rule.test({
|
|
296
|
+
name: 'incorrectBirthDate',
|
|
297
|
+
message: _i18n["default"].t('errors.incorrectBirthDate'),
|
|
298
|
+
test: function test(value) {
|
|
299
|
+
if (checkDate(value) || checkDate(form.birthDate)) {
|
|
300
|
+
return true;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
var birthDate = (0, _moment["default"])(form.birthDate, 'DD.MM.YYYY');
|
|
304
|
+
var date = (0, _moment["default"])(value, format);
|
|
305
|
+
return date.isAfter(birthDate);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
var additionalRules = {
|
|
312
|
+
yearEnd: validateBirthDate('YYYY'),
|
|
313
|
+
courseYearEnd: validateBirthDate('YYYY'),
|
|
314
|
+
experienceStart: validateBirthDate('DD.YYYY'),
|
|
315
|
+
experienceEnd: validateBirthDate('DD.YYYY')
|
|
316
|
+
};
|
|
317
|
+
|
|
284
318
|
var validate = function validate(value, form, field, fieldsWithoutValidation, props) {
|
|
285
|
-
var customValidation = (0, _ramda.path)(['customValidation', field.field], props);
|
|
319
|
+
var customValidation = (0, _ramda.path)(['customValidation', field.field], props) || (0, _ramda.path)([field.field], additionalRules);
|
|
286
320
|
|
|
287
321
|
try {
|
|
288
322
|
var rule = rules[field.type] ? rules[field.type](field, props) : yup.string();
|
|
@@ -291,7 +325,7 @@ var validate = function validate(value, form, field, fieldsWithoutValidation, pr
|
|
|
291
325
|
}) : (field.required || validateLink(field, form)) && !fieldsWithoutValidation[field.field] ? rule.nullable().required(function () {
|
|
292
326
|
return _i18n["default"].t('errors.required');
|
|
293
327
|
}) : rule.nullable();
|
|
294
|
-
rule = customValidation ? customValidation(rule) : rule;
|
|
328
|
+
rule = customValidation ? customValidation(rule, form) : rule;
|
|
295
329
|
rule.validateSync(value);
|
|
296
330
|
return undefined;
|
|
297
331
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@experium/findy-form",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"url": "https://github.com/experium/findy-form.git"
|
|
8
|
-
},
|
|
5
|
+
"homepage": "https://experium.github.io/findy-form",
|
|
6
|
+
"repository": "https://github.com/experium/findy-form",
|
|
9
7
|
"publishConfig": {
|
|
10
8
|
"access": "public",
|
|
11
9
|
"cache": "~/.npm"
|
|
12
10
|
},
|
|
13
11
|
"dependencies": {
|
|
14
12
|
"@ant-design/icons": "^4.2.2",
|
|
13
|
+
"axios": "^0.26.0",
|
|
15
14
|
"class-validator": "^0.12.2",
|
|
16
15
|
"classnames": "^2.2.6",
|
|
17
|
-
"final-form": "^4.20.
|
|
16
|
+
"final-form": "^4.20.2",
|
|
18
17
|
"final-form-arrays": "^3.0.2",
|
|
19
18
|
"getusermedia": "^2.0.1",
|
|
20
19
|
"i18next": "^19.8.4",
|
|
21
20
|
"ismobilejs": "^1.1.1",
|
|
22
21
|
"libphonenumber-js": "^1.8.1",
|
|
23
|
-
"moment": "^2.
|
|
22
|
+
"moment": "^2.29.1",
|
|
24
23
|
"qs": "^6.9.4",
|
|
25
24
|
"ramda": "^0.27.1",
|
|
26
25
|
"rc-checkbox": "^2.3.2",
|
|
27
26
|
"rc-select": "^12.1.6",
|
|
28
27
|
"rc-tree-select": "^4.1.2",
|
|
29
|
-
"react": "^17.0.
|
|
30
|
-
"react-dom": "^17.0.
|
|
28
|
+
"react": "^17.0.2",
|
|
29
|
+
"react-dom": "^17.0.2",
|
|
31
30
|
"react-final-form": "^6.5.2",
|
|
32
31
|
"react-final-form-arrays": "^3.1.3",
|
|
33
32
|
"react-google-recaptcha": "^2.1.0",
|
package/src/components/Fields.js
CHANGED
|
@@ -47,7 +47,9 @@ const getFieldComponent = (field, components) => {
|
|
|
47
47
|
) : Select,
|
|
48
48
|
phone: PhoneInput,
|
|
49
49
|
boolean: Boolean,
|
|
50
|
-
choice:
|
|
50
|
+
choice: prop('checkboxes', settings) ? (
|
|
51
|
+
prop('multiple', settings) ? Checkbox : Radio
|
|
52
|
+
) : Select,
|
|
51
53
|
country: LocationSelect,
|
|
52
54
|
region: LocationSelect,
|
|
53
55
|
city: LocationSelect,
|
|
@@ -354,7 +356,9 @@ class Fields extends Component {
|
|
|
354
356
|
<div key={field.field}>
|
|
355
357
|
{ field.type === 'composite' ?
|
|
356
358
|
<Fragment>
|
|
357
|
-
|
|
359
|
+
{ includes(path(['settings', 'showLabel'], field), [true, undefined]) ? (
|
|
360
|
+
<h2>{ language ? pathOr(field.label, ['translations', 'label', language], field) : field.label }</h2>
|
|
361
|
+
) : null}
|
|
358
362
|
{ path(['settings', 'multiple'], field) ?
|
|
359
363
|
<FieldArray
|
|
360
364
|
name={field.field}
|
package/src/components/Form.js
CHANGED
|
@@ -5,7 +5,7 @@ import i18n from '../utils/i18n';
|
|
|
5
5
|
|
|
6
6
|
import React, { Component } from 'react';
|
|
7
7
|
import { Form as FinalFormForm, Field, FormSpy } from 'react-final-form';
|
|
8
|
-
import { pathOr, prop, equals, isEmpty, forEach, path, includes, assocPath
|
|
8
|
+
import { pathOr, prop, equals, isEmpty, forEach, path, includes, assocPath } from 'ramda';
|
|
9
9
|
import arrayMutators from 'final-form-arrays';
|
|
10
10
|
import { withTranslation } from 'react-i18next';
|
|
11
11
|
import cx from 'classnames';
|
|
@@ -16,6 +16,7 @@ import styles from '../styles/index.module.css';
|
|
|
16
16
|
import { RU } from '../constants/translations';
|
|
17
17
|
import { isLinkedQuestion, findChildGeoQuestionsNames } from '../utils/questions';
|
|
18
18
|
import { getAttrs } from '../utils/attrs';
|
|
19
|
+
import { isError } from '../utils/errors';
|
|
19
20
|
import { CompanyDictionaryContext } from '../context/CompanyDictionary';
|
|
20
21
|
import { FormContext } from '../context/FormContext';
|
|
21
22
|
import Fields from './Fields';
|
|
@@ -280,7 +281,7 @@ class Form extends Component {
|
|
|
280
281
|
validate={value => value ? undefined : i18n.t('errors.captchaRequired')}
|
|
281
282
|
language={language}
|
|
282
283
|
options={captchaOptions}
|
|
283
|
-
invalidCaptcha={
|
|
284
|
+
invalidCaptcha={isError('Invalid captcha', serverErrors)} />
|
|
284
285
|
}
|
|
285
286
|
<Field name='personalDataAgreement' subscription={{ value: true }}>
|
|
286
287
|
{({ input: { value } }) => (
|
|
@@ -299,6 +300,9 @@ class Form extends Component {
|
|
|
299
300
|
</Field>
|
|
300
301
|
</div>
|
|
301
302
|
</FormContext.Provider>
|
|
303
|
+
{ isError('Access to applicant create restricted for current company license', serverErrors) &&
|
|
304
|
+
<div style={{ marginTop: 15 }} className={styles.error} dangerouslySetInnerHTML={{ __html: t('licenseError') }} />
|
|
305
|
+
}
|
|
302
306
|
</form>;
|
|
303
307
|
}}
|
|
304
308
|
</FinalFormForm>
|