@bigbinary/neeto-form-frontend 1.0.29 → 1.0.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.
package/dist/index.js CHANGED
@@ -27383,7 +27383,7 @@ var Editor = function Editor(_ref) {
27383
27383
 
27384
27384
  function cov_2j8tlu2ul5() {
27385
27385
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/BuildForm/Questions/constants.js";
27386
- var hash = "66ba5b083c318d90b5ba09aa05088ee51337bf74";
27386
+ var hash = "cf06aa225404e0ebe444d6f1219d393c9ffc9417";
27387
27387
  var global = new Function("return this")();
27388
27388
  var gcv = "__coverage__";
27389
27389
  var coverageData = {
@@ -27425,27 +27425,27 @@ function cov_2j8tlu2ul5() {
27425
27425
  column: 30
27426
27426
  },
27427
27427
  end: {
27428
- line: 190,
27428
+ line: 177,
27429
27429
  column: 1
27430
27430
  }
27431
27431
  },
27432
27432
  "4": {
27433
27433
  start: {
27434
- line: 193,
27434
+ line: 180,
27435
27435
  column: 38
27436
27436
  },
27437
27437
  end: {
27438
- line: 196,
27438
+ line: 183,
27439
27439
  column: 1
27440
27440
  }
27441
27441
  },
27442
27442
  "5": {
27443
27443
  start: {
27444
- line: 198,
27444
+ line: 185,
27445
27445
  column: 29
27446
27446
  },
27447
27447
  end: {
27448
- line: 198,
27448
+ line: 185,
27449
27449
  column: 62
27450
27450
  }
27451
27451
  }
@@ -27463,7 +27463,7 @@ function cov_2j8tlu2ul5() {
27463
27463
  f: {},
27464
27464
  b: {},
27465
27465
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
27466
- hash: "66ba5b083c318d90b5ba09aa05088ee51337bf74"
27466
+ hash: "cf06aa225404e0ebe444d6f1219d393c9ffc9417"
27467
27467
  };
27468
27468
  var coverage = global[gcv] || (global[gcv] = {});
27469
27469
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -27501,8 +27501,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27501
27501
  component: Email,
27502
27502
  defaults: {
27503
27503
  label: ""
27504
- },
27505
- metadata: {}
27504
+ }
27506
27505
  }, {
27507
27506
  type: "phone",
27508
27507
  label: instance.t("fields.pif"),
@@ -27512,8 +27511,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27512
27511
  component: Phone,
27513
27512
  defaults: {
27514
27513
  label: ""
27515
- },
27516
- metadata: {}
27514
+ }
27517
27515
  }, {
27518
27516
  type: "name",
27519
27517
  label: instance.t("fields.nif"),
@@ -27523,8 +27521,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27523
27521
  component: ShortText,
27524
27522
  defaults: {
27525
27523
  label: ""
27526
- },
27527
- metadata: {}
27524
+ }
27528
27525
  }, {
27529
27526
  type: "text",
27530
27527
  label: instance.t("fields.tif"),
@@ -27534,8 +27531,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27534
27531
  component: ShortText,
27535
27532
  defaults: {
27536
27533
  label: ""
27537
- },
27538
- metadata: {}
27534
+ }
27539
27535
  }, {
27540
27536
  type: "question",
27541
27537
  label: instance.t("fields.qif"),
@@ -27544,8 +27540,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27544
27540
  component: LongText,
27545
27541
  defaults: {
27546
27542
  label: ""
27547
- },
27548
- metadata: {}
27543
+ }
27549
27544
  }, {
27550
27545
  type: "textarea",
27551
27546
  label: instance.t("fields.def"),
@@ -27554,8 +27549,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27554
27549
  component: Editor,
27555
27550
  defaults: {
27556
27551
  label: ""
27557
- },
27558
- metadata: {}
27552
+ }
27559
27553
  }, {
27560
27554
  type: "checkbox",
27561
27555
  label: instance.t("fields.mcf"),
@@ -27568,8 +27562,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27568
27562
  optionsAttributes: [{
27569
27563
  label: ""
27570
27564
  }]
27571
- },
27572
- metadata: {}
27565
+ }
27573
27566
  }, {
27574
27567
  type: "radio",
27575
27568
  label: instance.t("fields.scf"),
@@ -27582,8 +27575,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27582
27575
  optionsAttributes: new Array(SINGLE_CHOICE_FIELD_MIN_OPTIONS).fill({
27583
27576
  label: ""
27584
27577
  })
27585
- },
27586
- metadata: {}
27578
+ }
27587
27579
  }, {
27588
27580
  type: "dropdown",
27589
27581
  label: instance.t("fields.drf"),
@@ -27596,8 +27588,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27596
27588
  optionsAttributes: new Array(DROPDOWN_FIELD_MIN_OPTIONS).fill({
27597
27589
  label: ""
27598
27590
  })
27599
- },
27600
- metadata: {}
27591
+ }
27601
27592
  }, {
27602
27593
  type: "star_rating",
27603
27594
  label: instance.t("fields.rif"),
@@ -27609,8 +27600,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27609
27600
  isRequired: true,
27610
27601
  count: 5,
27611
27602
  shape: "star"
27612
- },
27613
- metadata: {}
27603
+ }
27614
27604
  }, {
27615
27605
  type: "rating",
27616
27606
  label: instance.t("fields.fbf"),
@@ -27623,8 +27613,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27623
27613
  highestRatingLabel: "",
27624
27614
  averageRatingLabel: "",
27625
27615
  lowestRatingLabel: ""
27626
- },
27627
- metadata: {}
27616
+ }
27628
27617
  }, {
27629
27618
  type: "termsandcondition",
27630
27619
  label: instance.t("fields.tcf"),
@@ -27636,8 +27625,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27636
27625
  privacyPolicyLink: "",
27637
27626
  isRequired: true,
27638
27627
  label: instance.t("common.agreeTermsAndConditions")
27639
- },
27640
- metadata: {}
27628
+ }
27641
27629
  }, {
27642
27630
  type: "date",
27643
27631
  label: instance.t("fields.date"),
@@ -27647,8 +27635,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27647
27635
  defaults: {
27648
27636
  label: "",
27649
27637
  isRequired: true
27650
- },
27651
- metadata: {}
27638
+ }
27652
27639
  }]);
27653
27640
 
27654
27641
  // To show the question type as label in accordion
@@ -46022,7 +46009,7 @@ cov_1zuybttr1q().s[8]++;
46022
46009
  var _ref7;
46023
46010
  function cov_1y9t6ere98() {
46024
46011
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/ExternalForm/validations.js";
46025
- var hash = "d1ecc3936dc48fb7362ad34ab9e6e02e86c5ff20";
46012
+ var hash = "caddab36f5d99d8486ee83ca1f16c9afcc3b5825";
46026
46013
  var global = new Function("return this")();
46027
46014
  var gcv = "__coverage__";
46028
46015
  var coverageData = {
@@ -46374,7 +46361,7 @@ function cov_1y9t6ere98() {
46374
46361
  column: 26
46375
46362
  },
46376
46363
  end: {
46377
- line: 77,
46364
+ line: 82,
46378
46365
  column: 1
46379
46366
  }
46380
46367
  },
@@ -46385,7 +46372,7 @@ function cov_1y9t6ere98() {
46385
46372
  },
46386
46373
  end: {
46387
46374
  line: 73,
46388
- column: 71
46375
+ column: 50
46389
46376
  }
46390
46377
  },
46391
46378
  "36": {
@@ -46394,137 +46381,137 @@ function cov_1y9t6ere98() {
46394
46381
  column: 2
46395
46382
  },
46396
46383
  end: {
46397
- line: 74,
46398
- column: 73
46384
+ line: 79,
46385
+ column: 3
46399
46386
  }
46400
46387
  },
46401
46388
  "37": {
46402
46389
  start: {
46403
- line: 74,
46404
- column: 18
46390
+ line: 75,
46391
+ column: 4
46405
46392
  },
46406
46393
  end: {
46407
- line: 74,
46408
- column: 73
46394
+ line: 78,
46395
+ column: 46
46409
46396
  }
46410
46397
  },
46411
46398
  "38": {
46412
46399
  start: {
46413
- line: 76,
46400
+ line: 81,
46414
46401
  column: 2
46415
46402
  },
46416
46403
  end: {
46417
- line: 76,
46404
+ line: 81,
46418
46405
  column: 16
46419
46406
  }
46420
46407
  },
46421
46408
  "39": {
46422
46409
  start: {
46423
- line: 79,
46410
+ line: 84,
46424
46411
  column: 30
46425
46412
  },
46426
46413
  end: {
46427
- line: 92,
46414
+ line: 97,
46428
46415
  column: 1
46429
46416
  }
46430
46417
  },
46431
46418
  "40": {
46432
46419
  start: {
46433
- line: 95,
46420
+ line: 100,
46434
46421
  column: 2
46435
46422
  },
46436
46423
  end: {
46437
- line: 112,
46424
+ line: 117,
46438
46425
  column: 3
46439
46426
  }
46440
46427
  },
46441
46428
  "41": {
46442
46429
  start: {
46443
- line: 97,
46430
+ line: 102,
46444
46431
  column: 2
46445
46432
  },
46446
46433
  end: {
46447
- line: 112,
46434
+ line: 117,
46448
46435
  column: 3
46449
46436
  }
46450
46437
  },
46451
46438
  "42": {
46452
46439
  start: {
46453
- line: 98,
46440
+ line: 103,
46454
46441
  column: 4
46455
46442
  },
46456
46443
  end: {
46457
- line: 111,
46444
+ line: 116,
46458
46445
  column: 5
46459
46446
  }
46460
46447
  },
46461
46448
  "43": {
46462
46449
  start: {
46463
- line: 99,
46450
+ line: 104,
46464
46451
  column: 24
46465
46452
  },
46466
46453
  end: {
46467
- line: 99,
46454
+ line: 104,
46468
46455
  column: 51
46469
46456
  }
46470
46457
  },
46471
46458
  "44": {
46472
46459
  start: {
46473
- line: 100,
46460
+ line: 105,
46474
46461
  column: 21
46475
46462
  },
46476
46463
  end: {
46477
- line: 100,
46464
+ line: 105,
46478
46465
  column: 59
46479
46466
  }
46480
46467
  },
46481
46468
  "45": {
46482
46469
  start: {
46483
- line: 103,
46470
+ line: 108,
46484
46471
  column: 6
46485
46472
  },
46486
46473
  end: {
46487
- line: 110,
46474
+ line: 115,
46488
46475
  column: 9
46489
46476
  }
46490
46477
  },
46491
46478
  "46": {
46492
46479
  start: {
46493
- line: 104,
46480
+ line: 109,
46494
46481
  column: 8
46495
46482
  },
46496
46483
  end: {
46497
- line: 109,
46484
+ line: 114,
46498
46485
  column: 9
46499
46486
  }
46500
46487
  },
46501
46488
  "47": {
46502
46489
  start: {
46503
- line: 105,
46490
+ line: 110,
46504
46491
  column: 10
46505
46492
  },
46506
46493
  end: {
46507
- line: 105,
46494
+ line: 110,
46508
46495
  column: 39
46509
46496
  }
46510
46497
  },
46511
46498
  "48": {
46512
46499
  start: {
46513
- line: 106,
46500
+ line: 111,
46514
46501
  column: 10
46515
46502
  },
46516
46503
  end: {
46517
- line: 106,
46504
+ line: 111,
46518
46505
  column: 29
46519
46506
  }
46520
46507
  },
46521
46508
  "49": {
46522
46509
  start: {
46523
- line: 108,
46510
+ line: 113,
46524
46511
  column: 10
46525
46512
  },
46526
46513
  end: {
46527
- line: 108,
46514
+ line: 113,
46528
46515
  column: 31
46529
46516
  }
46530
46517
  }
@@ -46716,7 +46703,7 @@ function cov_1y9t6ere98() {
46716
46703
  column: 53
46717
46704
  },
46718
46705
  end: {
46719
- line: 77,
46706
+ line: 82,
46720
46707
  column: 1
46721
46708
  }
46722
46709
  },
@@ -46726,73 +46713,73 @@ function cov_1y9t6ere98() {
46726
46713
  name: "(anonymous_8)",
46727
46714
  decl: {
46728
46715
  start: {
46729
- line: 95,
46716
+ line: 100,
46730
46717
  column: 2
46731
46718
  },
46732
46719
  end: {
46733
- line: 95,
46720
+ line: 100,
46734
46721
  column: 3
46735
46722
  }
46736
46723
  },
46737
46724
  loc: {
46738
46725
  start: {
46739
- line: 97,
46726
+ line: 102,
46740
46727
  column: 2
46741
46728
  },
46742
46729
  end: {
46743
- line: 112,
46730
+ line: 117,
46744
46731
  column: 3
46745
46732
  }
46746
46733
  },
46747
- line: 97
46734
+ line: 102
46748
46735
  },
46749
46736
  "9": {
46750
46737
  name: "(anonymous_9)",
46751
46738
  decl: {
46752
46739
  start: {
46753
- line: 97,
46740
+ line: 102,
46754
46741
  column: 2
46755
46742
  },
46756
46743
  end: {
46757
- line: 97,
46744
+ line: 102,
46758
46745
  column: 3
46759
46746
  }
46760
46747
  },
46761
46748
  loc: {
46762
46749
  start: {
46763
- line: 97,
46750
+ line: 102,
46764
46751
  column: 11
46765
46752
  },
46766
46753
  end: {
46767
- line: 112,
46754
+ line: 117,
46768
46755
  column: 3
46769
46756
  }
46770
46757
  },
46771
- line: 97
46758
+ line: 102
46772
46759
  },
46773
46760
  "10": {
46774
46761
  name: "(anonymous_10)",
46775
46762
  decl: {
46776
46763
  start: {
46777
- line: 103,
46764
+ line: 108,
46778
46765
  column: 25
46779
46766
  },
46780
46767
  end: {
46781
- line: 103,
46768
+ line: 108,
46782
46769
  column: 26
46783
46770
  }
46784
46771
  },
46785
46772
  loc: {
46786
46773
  start: {
46787
- line: 103,
46774
+ line: 108,
46788
46775
  column: 42
46789
46776
  },
46790
46777
  end: {
46791
- line: 110,
46778
+ line: 115,
46792
46779
  column: 7
46793
46780
  }
46794
46781
  },
46795
- line: 103
46782
+ line: 108
46796
46783
  }
46797
46784
  },
46798
46785
  branchMap: {
@@ -47067,8 +47054,8 @@ function cov_1y9t6ere98() {
47067
47054
  column: 2
47068
47055
  },
47069
47056
  end: {
47070
- line: 74,
47071
- column: 73
47057
+ line: 79,
47058
+ column: 3
47072
47059
  }
47073
47060
  },
47074
47061
  type: "if",
@@ -47078,8 +47065,8 @@ function cov_1y9t6ere98() {
47078
47065
  column: 2
47079
47066
  },
47080
47067
  end: {
47081
- line: 74,
47082
- column: 73
47068
+ line: 79,
47069
+ column: 3
47083
47070
  }
47084
47071
  }, {
47085
47072
  start: {
@@ -47096,22 +47083,22 @@ function cov_1y9t6ere98() {
47096
47083
  "9": {
47097
47084
  loc: {
47098
47085
  start: {
47099
- line: 98,
47086
+ line: 103,
47100
47087
  column: 4
47101
47088
  },
47102
47089
  end: {
47103
- line: 111,
47090
+ line: 116,
47104
47091
  column: 5
47105
47092
  }
47106
47093
  },
47107
47094
  type: "if",
47108
47095
  locations: [{
47109
47096
  start: {
47110
- line: 98,
47097
+ line: 103,
47111
47098
  column: 4
47112
47099
  },
47113
47100
  end: {
47114
- line: 111,
47101
+ line: 116,
47115
47102
  column: 5
47116
47103
  }
47117
47104
  }, {
@@ -47124,7 +47111,7 @@ function cov_1y9t6ere98() {
47124
47111
  column: undefined
47125
47112
  }
47126
47113
  }],
47127
- line: 98
47114
+ line: 103
47128
47115
  }
47129
47116
  },
47130
47117
  s: {
@@ -47205,7 +47192,7 @@ function cov_1y9t6ere98() {
47205
47192
  "9": [0, 0]
47206
47193
  },
47207
47194
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
47208
- hash: "d1ecc3936dc48fb7362ad34ab9e6e02e86c5ff20"
47195
+ hash: "caddab36f5d99d8486ee83ca1f16c9afcc3b5825"
47209
47196
  };
47210
47197
  var coverage = global[gcv] || (global[gcv] = {});
47211
47198
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -47341,12 +47328,12 @@ var validateDateField = function validateDateField(_ref6) {
47341
47328
  var label = _ref6.label,
47342
47329
  isRequired = _ref6.isRequired;
47343
47330
  cov_1y9t6ere98().f[7]++;
47344
- var schema = (cov_1y9t6ere98().s[35]++, yup.date().typeError(getInvalidTypeError(label, "date")));
47331
+ var schema = (cov_1y9t6ere98().s[35]++, yup.date().typeError("").nullable());
47345
47332
  cov_1y9t6ere98().s[36]++;
47346
47333
  if (isRequired) {
47347
47334
  cov_1y9t6ere98().b[8][0]++;
47348
47335
  cov_1y9t6ere98().s[37]++;
47349
- schema = schema.required(getRequiredFieldError(label));
47336
+ schema = yup.date().typeError(getInvalidTypeError(label, "date")).required(getRequiredFieldError(label));
47350
47337
  } else {
47351
47338
  cov_1y9t6ere98().b[8][1]++;
47352
47339
  }
@@ -65251,7 +65238,7 @@ var linkifyDecorator = function linkifyDecorator(decoratedHref, decoratedText, k
65251
65238
 
65252
65239
  function cov_29xlle89ll() {
65253
65240
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/Submissions/Submission.jsx";
65254
- var hash = "f309c9df1c79dbf4de7b84c18c2f39eed53b297f";
65241
+ var hash = "4cf87e1b1fcaee8e7e2e1f269b349130d14d288a";
65255
65242
  var global = new Function("return this")();
65256
65243
  var gcv = "__coverage__";
65257
65244
  var coverageData = {
@@ -65597,7 +65584,7 @@ function cov_29xlle89ll() {
65597
65584
  },
65598
65585
  end: {
65599
65586
  line: 49,
65600
- column: 63
65587
+ column: 72
65601
65588
  }
65602
65589
  },
65603
65590
  type: "cond-expr",
@@ -65608,16 +65595,49 @@ function cov_29xlle89ll() {
65608
65595
  },
65609
65596
  end: {
65610
65597
  line: 49,
65611
- column: 55
65598
+ column: 64
65612
65599
  }
65613
65600
  }, {
65614
65601
  start: {
65615
65602
  line: 49,
65616
- column: 58
65603
+ column: 67
65617
65604
  },
65618
65605
  end: {
65619
65606
  line: 49,
65620
- column: 63
65607
+ column: 72
65608
+ }
65609
+ }],
65610
+ line: 49
65611
+ },
65612
+ "9": {
65613
+ loc: {
65614
+ start: {
65615
+ line: 49,
65616
+ column: 33
65617
+ },
65618
+ end: {
65619
+ line: 49,
65620
+ column: 64
65621
+ }
65622
+ },
65623
+ type: "binary-expr",
65624
+ locations: [{
65625
+ start: {
65626
+ line: 49,
65627
+ column: 33
65628
+ },
65629
+ end: {
65630
+ line: 49,
65631
+ column: 38
65632
+ }
65633
+ }, {
65634
+ start: {
65635
+ line: 49,
65636
+ column: 42
65637
+ },
65638
+ end: {
65639
+ line: 49,
65640
+ column: 64
65621
65641
  }
65622
65642
  }],
65623
65643
  line: 49
@@ -65645,10 +65665,11 @@ function cov_29xlle89ll() {
65645
65665
  "5": [0],
65646
65666
  "6": [0, 0],
65647
65667
  "7": [0, 0],
65648
- "8": [0, 0]
65668
+ "8": [0, 0],
65669
+ "9": [0, 0]
65649
65670
  },
65650
65671
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
65651
- hash: "f309c9df1c79dbf4de7b84c18c2f39eed53b297f"
65672
+ hash: "4cf87e1b1fcaee8e7e2e1f269b349130d14d288a"
65652
65673
  };
65653
65674
  var coverage = global[gcv] || (global[gcv] = {});
65654
65675
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -65718,7 +65739,7 @@ var Submission = function Submission(_ref) {
65718
65739
  weight: "semibold"
65719
65740
  }, answerProps), /*#__PURE__*/React__default.createElement(_default, {
65720
65741
  componentDecorator: linkifyDecorator
65721
- }, kind === "date" ? (cov_29xlle89ll().b[8][0]++, dateFormat.date(value)) : (cov_29xlle89ll().b[8][1]++, value))));
65742
+ }, kind === "date" ? (cov_29xlle89ll().b[8][0]++, (cov_29xlle89ll().b[9][0]++, value) && (cov_29xlle89ll().b[9][1]++, dateFormat.date(value))) : (cov_29xlle89ll().b[8][1]++, value))));
65722
65743
  }));
65723
65744
  };
65724
65745