@experium/findy-form 1.1.457 → 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.
@@ -94,9 +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
- 'icompleteDate': 'Full date is required',
98
- 'captchaRequired': 'Verification required'
99
- }
97
+ 'incompleteDate': 'Full date is required',
98
+ 'captchaRequired': 'Verification required',
99
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
100
+ },
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>)'
100
104
  }
101
105
  },
102
106
  ru: {
@@ -187,9 +191,13 @@ var TRANSLATIONS = {
187
191
  'fileTypeAudio': 'Неверный тип файла, выберите аудиофайл',
188
192
  'fileTypeVideo': 'Неверный тип файла, выберите видеофайл',
189
193
  'composite': 'Блок обязателен для заполнения',
190
- 'icompleteDate': 'Необходимо указать дату полностью',
191
- 'captchaRequired': 'Необходимо пройти проверку'
192
- }
194
+ 'incompleteDate': 'Необходимо указать дату полностью',
195
+ 'captchaRequired': 'Необходимо пройти проверку',
196
+ 'incorrectBirthDate': 'Дата не может быть меньше даты рождения'
197
+ },
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>)'
193
201
  }
194
202
  },
195
203
  ua: {
@@ -280,9 +288,13 @@ var TRANSLATIONS = {
280
288
  'fileTypeAudio': 'Неправильний тип файлу, виберіть аудіофайл',
281
289
  'fileTypeVideo': 'Невірний тип файлу, виберіть відеофайл',
282
290
  'composite': 'Блок обов\'язковий для заповнення',
283
- 'icompleteDate': 'Необхідно вказати дату повністю',
284
- 'captchaRequired': 'Необхідно пройти перевірку'
285
- }
291
+ 'incompleteDate': 'Необхідно вказати дату повністю',
292
+ 'captchaRequired': 'Необхідно пройти перевірку',
293
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
294
+ },
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>)'
286
298
  }
287
299
  },
288
300
  et: {
@@ -372,16 +384,116 @@ var TRANSLATIONS = {
372
384
  'fileTypeAudio': 'Vale tüüp, valige helifail',
373
385
  'fileTypeVideo': 'Vale tüüp, valige videofail',
374
386
  'composite': 'Nõutav plokk',
375
- 'icompleteDate': 'Täiskuupäev on kohustuslik',
376
- 'captchaRequired': 'Nõutav kontrollimine'
377
- }
387
+ 'incompleteDate': 'Täiskuupäev on kohustuslik',
388
+ 'captchaRequired': 'Nõutav kontrollimine',
389
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
390
+ },
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>)'
378
394
  }
379
395
  },
380
396
  lt: {
381
397
  translation: {
382
- 'send': 'Iesniegt',
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',
383
495
  'addQuestionBlock': 'Pievienot',
384
- 'remove': 'Noņemt',
496
+ 'remove': 'Nonemt',
385
497
  'optional': ' (neobligāti)',
386
498
  'cancel': 'Atcelt',
387
499
  'save': 'Saglabāt',
@@ -464,101 +576,13 @@ var TRANSLATIONS = {
464
576
  'fileTypeAudio': 'Nederīgs tips, atlasiet audio failu',
465
577
  'fileTypeVideo': 'Nederīgs tips, atlasiet video failu',
466
578
  'composite': 'Nepieciešamais bloks',
467
- 'icompleteDate': 'Nepieciešams norādīt pilnu datumu',
468
- 'captchaRequired': 'Nepieciešama verifikācija'
469
- }
470
- }
471
- },
472
- lv: {
473
- translation: {
474
- 'send': 'Pateikti',
475
- 'addQuestionBlock': 'Papildyti',
476
- 'remove': 'Pašalinti',
477
- 'optional': ' (neprivaloma)',
478
- 'cancel': 'Atšaukti',
479
- 'save': 'Sutaupyti',
480
- 'stopRecording': 'Sustabdyti įrašymą',
481
- 'startRecording': 'Pradėkite įrašyti',
482
- 'upload': 'Įkelti',
483
- 'download': 'Parsisiųsti',
484
- 'recordAudio': 'Įrašyti garsą',
485
- 'recordVideo': 'Įrašyti garsą',
486
- 'takePhoto': 'Nufotografuoti',
487
- 'opdFormAccept': 'Priimti',
488
- 'opdLabel': 'Aš sutinku',
489
- 'opdLink': 'asmens duomenų tvarkymas',
490
- 'opdOffertaLabel': 'Aš sutinku su sąlygomis',
491
- 'opdOffertaLink': 'viešas pasiūlymas',
492
- 'MONTHS': [{
493
- value: 1,
494
- label: 'Sausio mėn'
495
- }, {
496
- value: 2,
497
- label: 'Vasario mėn'
498
- }, {
499
- value: 3,
500
- label: 'Kovas'
501
- }, {
502
- value: 4,
503
- label: 'Balandis'
504
- }, {
505
- value: 5,
506
- label: 'Gegužė'
507
- }, {
508
- value: 6,
509
- label: 'Birželio mėn'
510
- }, {
511
- value: 7,
512
- label: 'Liepos mėn'
513
- }, {
514
- value: 8,
515
- label: 'Rugpjūtis'
516
- }, {
517
- value: 9,
518
- label: 'Rugsėjo mėn'
519
- }, {
520
- value: 10,
521
- label: 'Spalio mėn'
522
- }, {
523
- value: 11,
524
- label: 'Lapkričio mėn'
525
- }, {
526
- value: 12,
527
- label: 'Gruodžio mėn'
528
- }],
529
- 'loading': 'Įkeliama...',
530
- 'noOptionsMessage': 'Duomenų nėra',
531
- 'otherOption': 'Kita',
532
- 'placeholders': {
533
- 'datePicker': {
534
- 'day': 'Diena',
535
- 'month': 'Mėnuo',
536
- 'year': 'Metai'
537
- },
538
- 'salaryCurrency': 'Pasirinkite valiutą...'
579
+ 'incompleteDate': 'Nepieciešams norādīt pilnu datumu',
580
+ 'captchaRequired': 'Nepieciešama verifikācija',
581
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
539
582
  },
540
- 'errors': {
541
- 'required': 'Privalomas laukelis',
542
- 'minLength': 'Minimalus raidžių skaičius - {{count}}',
543
- 'maxLength': 'Maksimalus raidžių skaičius - {{count}}',
544
- 'moreThan': 'Skaičius turi būti didesnis nei {{more}}',
545
- 'currency': 'Reikalinga valiuta',
546
- 'phone': 'Neteisingas telefono numeris',
547
- 'email': 'Neteisingas el. pašto adresas',
548
- 'emailChars': 'Neteisingas el. Paštas (galiojantys simboliai - raidžių skaičiai _ - .)',
549
- 'emailDomain': 'Neteisingas el. Pašto domenas (galiojantys simboliai - raidžių skaičiai - .)',
550
- 'audioPermission': 'Prieiga prie mikrofono yra užblokuota. Leisti prieigą prie mikrofono naršyklės nustatymuose',
551
- 'cameraPermission': 'Prieiga prie kameros yra užblokuota. Leisti prieigą prie fotoaparato naršyklės nustatymuose',
552
- 'uploadError': 'Nepavyko įkelti failo.',
553
- 'maximumFileSize': 'Maksimalus failo dydis: {{count}} megabaitas',
554
- 'maximumFileSize_plural': 'Maksimalus failo dydis: {{count}} megabaitai',
555
- 'fileType': 'Netinkamas tipas, galimi tipai: {{types}}',
556
- 'fileTypeAudio': 'Netinkamas tipas, pasirinkite garso failą',
557
- 'fileTypeVideo': 'Netinkamas tipas, pasirinkite vaizdo failą',
558
- 'composite': 'Reikalingas blokas',
559
- 'icompleteDate': 'Būtina nurodyti visą datą',
560
- 'captchaRequired': 'Būtina patvirtinti'
561
- }
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>) '
562
586
  }
563
587
  },
564
588
  kz: {
@@ -649,9 +673,13 @@ var TRANSLATIONS = {
649
673
  'fileTypeAudio': 'Файл түрі жарамсыз, аудио файлды таңдаңыз',
650
674
  'fileTypeVideo': 'Файл түрі жарамсыз, бейне файлды таңдаңыз',
651
675
  'composite': 'Блок қажет',
652
- 'icompleteDate': 'Сіз толық күнді көрсетуіңіз керек',
653
- 'captchaRequired': 'Тексеру қажет'
654
- }
676
+ 'incompleteDate': 'Сіз толық күнді көрсетуіңіз керек',
677
+ 'captchaRequired': 'Тексеру қажет',
678
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
679
+ },
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': ''
655
683
  }
656
684
  },
657
685
  th: {
@@ -742,9 +770,13 @@ var TRANSLATIONS = {
742
770
  'fileTypeAudio': 'ประเภทไฟล์ไม่ถูกต้อง เลือกไฟล์เสียง',
743
771
  'fileTypeVideo': 'ประเภทไฟล์ไม่ถูกต้อง เลือกไฟล์วิดีโอ',
744
772
  'composite': 'จำเป็นต้องบล็อก',
745
- 'icompleteDate': 'คุณต้องระบุวันที่แบบเต็ม',
746
- 'captchaRequired': 'ต้องยืนยัน'
747
- }
773
+ 'incompleteDate': 'คุณต้องระบุวันที่แบบเต็ม',
774
+ 'captchaRequired': 'ต้องยืนยัน',
775
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
776
+ },
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': ''
748
780
  }
749
781
  },
750
782
  uz: {
@@ -835,9 +867,13 @@ var TRANSLATIONS = {
835
867
  'fileTypeAudio': 'Fayl turi noto\'g\'ri, audio faylni tanlang',
836
868
  'fileTypeVideo': 'Fayl turi noto\'g\'ri, video faylni tanlang',
837
869
  'composite': 'Bloklash shart',
838
- 'icompleteDate': 'To\'liq sanani ko\'rsatish kerak',
839
- 'captchaRequired': 'Tasdiqlash kerak'
840
- }
870
+ 'incompleteDate': 'To\'liq sanani ko\'rsatish kerak',
871
+ 'captchaRequired': 'Tasdiqlash kerak',
872
+ 'incorrectBirthDate': 'Date cant be earlier then birth date'
873
+ },
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': ''
841
877
  }
842
878
  }
843
879
  };
@@ -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;
@@ -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 checkFileType = function checkFileType(fileType, mimeType) {
27
- var allowFileExtensions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
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
- default:
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
 
@@ -209,7 +218,13 @@ var rules = {
209
218
  return htmlOpd || (0, _ramda.path)(['useConstructor'], opdSettings) ? yup.string() : yup["boolean"]();
210
219
  },
211
220
  "boolean": function boolean(field) {
212
- return yup["boolean"]();
221
+ return !field.required ? yup["boolean"]() : yup.mixed().test({
222
+ name: 'requiredBoolean',
223
+ message: _i18n["default"].t('errors.required'),
224
+ test: function test(value) {
225
+ return !!value;
226
+ }
227
+ });
213
228
  },
214
229
  choice: function choice(field) {
215
230
  return (0, _ramda.path)(['settings', 'multiple'], field) ? yup.array() : yup.string();
@@ -232,12 +247,12 @@ var rules = {
232
247
  var result = true;
233
248
  value.forEach(function (value) {
234
249
  if (result) {
235
- result = checkFileType(value.type, value.contentType, allowFileExtensions);
250
+ result = checkFileType(value.type, value.contentType, value.extenstion, allowFileExtensions);
236
251
  }
237
252
  });
238
253
  return result;
239
254
  } else {
240
- return checkFileType(value.type, value.contentType, allowFileExtensions);
255
+ return checkFileType(value.type, value.contentType, value.extenstion, allowFileExtensions);
241
256
  }
242
257
  }
243
258
  });
@@ -267,7 +282,7 @@ var rules = {
267
282
  date: function date() {
268
283
  return yup.string().nullable().test({
269
284
  name: 'completeDate',
270
- message: _i18n["default"].t('errors.icompleteDate'),
285
+ message: _i18n["default"].t('errors.incompleteDate'),
271
286
  test: function test(value) {
272
287
  return value !== 'incomplete';
273
288
  }
@@ -275,8 +290,33 @@ var rules = {
275
290
  }
276
291
  };
277
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
+
278
318
  var validate = function validate(value, form, field, fieldsWithoutValidation, props) {
279
- 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);
280
320
 
281
321
  try {
282
322
  var rule = rules[field.type] ? rules[field.type](field, props) : yup.string();
@@ -285,7 +325,7 @@ var validate = function validate(value, form, field, fieldsWithoutValidation, pr
285
325
  }) : (field.required || validateLink(field, form)) && !fieldsWithoutValidation[field.field] ? rule.nullable().required(function () {
286
326
  return _i18n["default"].t('errors.required');
287
327
  }) : rule.nullable();
288
- rule = customValidation ? customValidation(rule) : rule;
328
+ rule = customValidation ? customValidation(rule, form) : rule;
289
329
  rule.validateSync(value);
290
330
  return undefined;
291
331
  } catch (e) {
package/package.json CHANGED
@@ -1,33 +1,32 @@
1
1
  {
2
2
  "name": "@experium/findy-form",
3
- "version": "1.1.457",
3
+ "version": "1.2.1",
4
4
  "main": "./lib/index.js",
5
- "repository": {
6
- "type": "git",
7
- "url": "https://github.com/experium/babel.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.1",
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.24.0",
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.1",
30
- "react-dom": "^17.0.1",
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",
@@ -47,7 +47,9 @@ const getFieldComponent = (field, components) => {
47
47
  ) : Select,
48
48
  phone: PhoneInput,
49
49
  boolean: Boolean,
50
- choice: Select,
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
- <h2>{ language ? pathOr(field.label, ['translations', 'label', language], field) : field.label }</h2>
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}
@@ -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} from 'ramda';
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';
@@ -279,7 +280,8 @@ class Form extends Component {
279
280
  component={Captcha}
280
281
  validate={value => value ? undefined : i18n.t('errors.captchaRequired')}
281
282
  language={language}
282
- options={captchaOptions} />
283
+ options={captchaOptions}
284
+ invalidCaptcha={isError('Invalid captcha', serverErrors)} />
283
285
  }
284
286
  <Field name='personalDataAgreement' subscription={{ value: true }}>
285
287
  {({ input: { value } }) => (
@@ -298,6 +300,9 @@ class Form extends Component {
298
300
  </Field>
299
301
  </div>
300
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
+ }
301
306
  </form>;
302
307
  }}
303
308
  </FinalFormForm>
@@ -1,6 +1,7 @@
1
1
  import { includes } from 'ramda';
2
2
  import React, { Component, Fragment } from 'react';
3
3
  import ReCAPTCHA from 'react-google-recaptcha';
4
+ import { withTranslation } from 'react-i18next';
4
5
 
5
6
  import styles from '../../styles/index.module.css';
6
7
  import withFieldWrapper from '../hocs/withFieldWrapper';
@@ -9,7 +10,7 @@ class ReCaptcha extends Component {
9
10
  onChange = e => this.props.input.onChange(e.target.value);
10
11
 
11
12
  render() {
12
- const { input: { onChange, name, value }, language } = this.props;
13
+ const { input: { onChange, name, value }, language, invalidCaptcha } = this.props;
13
14
  const options = this.props.options || {};
14
15
  const sitekey = options.captchaToken || process.env.RECAPTCHA || process.env.REACT_APP_RECAPTCHA;
15
16
 
@@ -29,9 +30,10 @@ class ReCaptcha extends Component {
29
30
  onChange={this.onChange}
30
31
  style={{ marginTop: 15, maxWidth: 150, display: 'block' }}
31
32
  />
33
+ { invalidCaptcha && <div className={styles.error}>{ this.props.t('invalidCaptcha') }</div> }
32
34
  </Fragment>
33
35
  : 'CAPTCH TYPE OPTIONS ERROR';
34
36
  }
35
37
  }
36
38
 
37
- export default withFieldWrapper(ReCaptcha);
39
+ export default withFieldWrapper(withTranslation()(ReCaptcha));