@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.cjs.js CHANGED
@@ -27422,7 +27422,7 @@ var Editor = function Editor(_ref) {
27422
27422
 
27423
27423
  function cov_2j8tlu2ul5() {
27424
27424
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/BuildForm/Questions/constants.js";
27425
- var hash = "66ba5b083c318d90b5ba09aa05088ee51337bf74";
27425
+ var hash = "cf06aa225404e0ebe444d6f1219d393c9ffc9417";
27426
27426
  var global = new Function("return this")();
27427
27427
  var gcv = "__coverage__";
27428
27428
  var coverageData = {
@@ -27464,27 +27464,27 @@ function cov_2j8tlu2ul5() {
27464
27464
  column: 30
27465
27465
  },
27466
27466
  end: {
27467
- line: 190,
27467
+ line: 177,
27468
27468
  column: 1
27469
27469
  }
27470
27470
  },
27471
27471
  "4": {
27472
27472
  start: {
27473
- line: 193,
27473
+ line: 180,
27474
27474
  column: 38
27475
27475
  },
27476
27476
  end: {
27477
- line: 196,
27477
+ line: 183,
27478
27478
  column: 1
27479
27479
  }
27480
27480
  },
27481
27481
  "5": {
27482
27482
  start: {
27483
- line: 198,
27483
+ line: 185,
27484
27484
  column: 29
27485
27485
  },
27486
27486
  end: {
27487
- line: 198,
27487
+ line: 185,
27488
27488
  column: 62
27489
27489
  }
27490
27490
  }
@@ -27502,7 +27502,7 @@ function cov_2j8tlu2ul5() {
27502
27502
  f: {},
27503
27503
  b: {},
27504
27504
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
27505
- hash: "66ba5b083c318d90b5ba09aa05088ee51337bf74"
27505
+ hash: "cf06aa225404e0ebe444d6f1219d393c9ffc9417"
27506
27506
  };
27507
27507
  var coverage = global[gcv] || (global[gcv] = {});
27508
27508
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -27540,8 +27540,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27540
27540
  component: Email,
27541
27541
  defaults: {
27542
27542
  label: ""
27543
- },
27544
- metadata: {}
27543
+ }
27545
27544
  }, {
27546
27545
  type: "phone",
27547
27546
  label: instance.t("fields.pif"),
@@ -27551,8 +27550,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27551
27550
  component: Phone,
27552
27551
  defaults: {
27553
27552
  label: ""
27554
- },
27555
- metadata: {}
27553
+ }
27556
27554
  }, {
27557
27555
  type: "name",
27558
27556
  label: instance.t("fields.nif"),
@@ -27562,8 +27560,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27562
27560
  component: ShortText,
27563
27561
  defaults: {
27564
27562
  label: ""
27565
- },
27566
- metadata: {}
27563
+ }
27567
27564
  }, {
27568
27565
  type: "text",
27569
27566
  label: instance.t("fields.tif"),
@@ -27573,8 +27570,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27573
27570
  component: ShortText,
27574
27571
  defaults: {
27575
27572
  label: ""
27576
- },
27577
- metadata: {}
27573
+ }
27578
27574
  }, {
27579
27575
  type: "question",
27580
27576
  label: instance.t("fields.qif"),
@@ -27583,8 +27579,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27583
27579
  component: LongText,
27584
27580
  defaults: {
27585
27581
  label: ""
27586
- },
27587
- metadata: {}
27582
+ }
27588
27583
  }, {
27589
27584
  type: "textarea",
27590
27585
  label: instance.t("fields.def"),
@@ -27593,8 +27588,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27593
27588
  component: Editor,
27594
27589
  defaults: {
27595
27590
  label: ""
27596
- },
27597
- metadata: {}
27591
+ }
27598
27592
  }, {
27599
27593
  type: "checkbox",
27600
27594
  label: instance.t("fields.mcf"),
@@ -27607,8 +27601,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27607
27601
  optionsAttributes: [{
27608
27602
  label: ""
27609
27603
  }]
27610
- },
27611
- metadata: {}
27604
+ }
27612
27605
  }, {
27613
27606
  type: "radio",
27614
27607
  label: instance.t("fields.scf"),
@@ -27621,8 +27614,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27621
27614
  optionsAttributes: new Array(SINGLE_CHOICE_FIELD_MIN_OPTIONS).fill({
27622
27615
  label: ""
27623
27616
  })
27624
- },
27625
- metadata: {}
27617
+ }
27626
27618
  }, {
27627
27619
  type: "dropdown",
27628
27620
  label: instance.t("fields.drf"),
@@ -27635,8 +27627,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27635
27627
  optionsAttributes: new Array(DROPDOWN_FIELD_MIN_OPTIONS).fill({
27636
27628
  label: ""
27637
27629
  })
27638
- },
27639
- metadata: {}
27630
+ }
27640
27631
  }, {
27641
27632
  type: "star_rating",
27642
27633
  label: instance.t("fields.rif"),
@@ -27648,8 +27639,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27648
27639
  isRequired: true,
27649
27640
  count: 5,
27650
27641
  shape: "star"
27651
- },
27652
- metadata: {}
27642
+ }
27653
27643
  }, {
27654
27644
  type: "rating",
27655
27645
  label: instance.t("fields.fbf"),
@@ -27662,8 +27652,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27662
27652
  highestRatingLabel: "",
27663
27653
  averageRatingLabel: "",
27664
27654
  lowestRatingLabel: ""
27665
- },
27666
- metadata: {}
27655
+ }
27667
27656
  }, {
27668
27657
  type: "termsandcondition",
27669
27658
  label: instance.t("fields.tcf"),
@@ -27675,8 +27664,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27675
27664
  privacyPolicyLink: "",
27676
27665
  isRequired: true,
27677
27666
  label: instance.t("common.agreeTermsAndConditions")
27678
- },
27679
- metadata: {}
27667
+ }
27680
27668
  }, {
27681
27669
  type: "date",
27682
27670
  label: instance.t("fields.date"),
@@ -27686,8 +27674,7 @@ var QUESTION_KINDS = (cov_2j8tlu2ul5().s[3]++, [{
27686
27674
  defaults: {
27687
27675
  label: "",
27688
27676
  isRequired: true
27689
- },
27690
- metadata: {}
27677
+ }
27691
27678
  }]);
27692
27679
 
27693
27680
  // To show the question type as label in accordion
@@ -46061,7 +46048,7 @@ cov_1zuybttr1q().s[8]++;
46061
46048
  var _ref7;
46062
46049
  function cov_1y9t6ere98() {
46063
46050
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/ExternalForm/validations.js";
46064
- var hash = "d1ecc3936dc48fb7362ad34ab9e6e02e86c5ff20";
46051
+ var hash = "caddab36f5d99d8486ee83ca1f16c9afcc3b5825";
46065
46052
  var global = new Function("return this")();
46066
46053
  var gcv = "__coverage__";
46067
46054
  var coverageData = {
@@ -46413,7 +46400,7 @@ function cov_1y9t6ere98() {
46413
46400
  column: 26
46414
46401
  },
46415
46402
  end: {
46416
- line: 77,
46403
+ line: 82,
46417
46404
  column: 1
46418
46405
  }
46419
46406
  },
@@ -46424,7 +46411,7 @@ function cov_1y9t6ere98() {
46424
46411
  },
46425
46412
  end: {
46426
46413
  line: 73,
46427
- column: 71
46414
+ column: 50
46428
46415
  }
46429
46416
  },
46430
46417
  "36": {
@@ -46433,137 +46420,137 @@ function cov_1y9t6ere98() {
46433
46420
  column: 2
46434
46421
  },
46435
46422
  end: {
46436
- line: 74,
46437
- column: 73
46423
+ line: 79,
46424
+ column: 3
46438
46425
  }
46439
46426
  },
46440
46427
  "37": {
46441
46428
  start: {
46442
- line: 74,
46443
- column: 18
46429
+ line: 75,
46430
+ column: 4
46444
46431
  },
46445
46432
  end: {
46446
- line: 74,
46447
- column: 73
46433
+ line: 78,
46434
+ column: 46
46448
46435
  }
46449
46436
  },
46450
46437
  "38": {
46451
46438
  start: {
46452
- line: 76,
46439
+ line: 81,
46453
46440
  column: 2
46454
46441
  },
46455
46442
  end: {
46456
- line: 76,
46443
+ line: 81,
46457
46444
  column: 16
46458
46445
  }
46459
46446
  },
46460
46447
  "39": {
46461
46448
  start: {
46462
- line: 79,
46449
+ line: 84,
46463
46450
  column: 30
46464
46451
  },
46465
46452
  end: {
46466
- line: 92,
46453
+ line: 97,
46467
46454
  column: 1
46468
46455
  }
46469
46456
  },
46470
46457
  "40": {
46471
46458
  start: {
46472
- line: 95,
46459
+ line: 100,
46473
46460
  column: 2
46474
46461
  },
46475
46462
  end: {
46476
- line: 112,
46463
+ line: 117,
46477
46464
  column: 3
46478
46465
  }
46479
46466
  },
46480
46467
  "41": {
46481
46468
  start: {
46482
- line: 97,
46469
+ line: 102,
46483
46470
  column: 2
46484
46471
  },
46485
46472
  end: {
46486
- line: 112,
46473
+ line: 117,
46487
46474
  column: 3
46488
46475
  }
46489
46476
  },
46490
46477
  "42": {
46491
46478
  start: {
46492
- line: 98,
46479
+ line: 103,
46493
46480
  column: 4
46494
46481
  },
46495
46482
  end: {
46496
- line: 111,
46483
+ line: 116,
46497
46484
  column: 5
46498
46485
  }
46499
46486
  },
46500
46487
  "43": {
46501
46488
  start: {
46502
- line: 99,
46489
+ line: 104,
46503
46490
  column: 24
46504
46491
  },
46505
46492
  end: {
46506
- line: 99,
46493
+ line: 104,
46507
46494
  column: 51
46508
46495
  }
46509
46496
  },
46510
46497
  "44": {
46511
46498
  start: {
46512
- line: 100,
46499
+ line: 105,
46513
46500
  column: 21
46514
46501
  },
46515
46502
  end: {
46516
- line: 100,
46503
+ line: 105,
46517
46504
  column: 59
46518
46505
  }
46519
46506
  },
46520
46507
  "45": {
46521
46508
  start: {
46522
- line: 103,
46509
+ line: 108,
46523
46510
  column: 6
46524
46511
  },
46525
46512
  end: {
46526
- line: 110,
46513
+ line: 115,
46527
46514
  column: 9
46528
46515
  }
46529
46516
  },
46530
46517
  "46": {
46531
46518
  start: {
46532
- line: 104,
46519
+ line: 109,
46533
46520
  column: 8
46534
46521
  },
46535
46522
  end: {
46536
- line: 109,
46523
+ line: 114,
46537
46524
  column: 9
46538
46525
  }
46539
46526
  },
46540
46527
  "47": {
46541
46528
  start: {
46542
- line: 105,
46529
+ line: 110,
46543
46530
  column: 10
46544
46531
  },
46545
46532
  end: {
46546
- line: 105,
46533
+ line: 110,
46547
46534
  column: 39
46548
46535
  }
46549
46536
  },
46550
46537
  "48": {
46551
46538
  start: {
46552
- line: 106,
46539
+ line: 111,
46553
46540
  column: 10
46554
46541
  },
46555
46542
  end: {
46556
- line: 106,
46543
+ line: 111,
46557
46544
  column: 29
46558
46545
  }
46559
46546
  },
46560
46547
  "49": {
46561
46548
  start: {
46562
- line: 108,
46549
+ line: 113,
46563
46550
  column: 10
46564
46551
  },
46565
46552
  end: {
46566
- line: 108,
46553
+ line: 113,
46567
46554
  column: 31
46568
46555
  }
46569
46556
  }
@@ -46755,7 +46742,7 @@ function cov_1y9t6ere98() {
46755
46742
  column: 53
46756
46743
  },
46757
46744
  end: {
46758
- line: 77,
46745
+ line: 82,
46759
46746
  column: 1
46760
46747
  }
46761
46748
  },
@@ -46765,73 +46752,73 @@ function cov_1y9t6ere98() {
46765
46752
  name: "(anonymous_8)",
46766
46753
  decl: {
46767
46754
  start: {
46768
- line: 95,
46755
+ line: 100,
46769
46756
  column: 2
46770
46757
  },
46771
46758
  end: {
46772
- line: 95,
46759
+ line: 100,
46773
46760
  column: 3
46774
46761
  }
46775
46762
  },
46776
46763
  loc: {
46777
46764
  start: {
46778
- line: 97,
46765
+ line: 102,
46779
46766
  column: 2
46780
46767
  },
46781
46768
  end: {
46782
- line: 112,
46769
+ line: 117,
46783
46770
  column: 3
46784
46771
  }
46785
46772
  },
46786
- line: 97
46773
+ line: 102
46787
46774
  },
46788
46775
  "9": {
46789
46776
  name: "(anonymous_9)",
46790
46777
  decl: {
46791
46778
  start: {
46792
- line: 97,
46779
+ line: 102,
46793
46780
  column: 2
46794
46781
  },
46795
46782
  end: {
46796
- line: 97,
46783
+ line: 102,
46797
46784
  column: 3
46798
46785
  }
46799
46786
  },
46800
46787
  loc: {
46801
46788
  start: {
46802
- line: 97,
46789
+ line: 102,
46803
46790
  column: 11
46804
46791
  },
46805
46792
  end: {
46806
- line: 112,
46793
+ line: 117,
46807
46794
  column: 3
46808
46795
  }
46809
46796
  },
46810
- line: 97
46797
+ line: 102
46811
46798
  },
46812
46799
  "10": {
46813
46800
  name: "(anonymous_10)",
46814
46801
  decl: {
46815
46802
  start: {
46816
- line: 103,
46803
+ line: 108,
46817
46804
  column: 25
46818
46805
  },
46819
46806
  end: {
46820
- line: 103,
46807
+ line: 108,
46821
46808
  column: 26
46822
46809
  }
46823
46810
  },
46824
46811
  loc: {
46825
46812
  start: {
46826
- line: 103,
46813
+ line: 108,
46827
46814
  column: 42
46828
46815
  },
46829
46816
  end: {
46830
- line: 110,
46817
+ line: 115,
46831
46818
  column: 7
46832
46819
  }
46833
46820
  },
46834
- line: 103
46821
+ line: 108
46835
46822
  }
46836
46823
  },
46837
46824
  branchMap: {
@@ -47106,8 +47093,8 @@ function cov_1y9t6ere98() {
47106
47093
  column: 2
47107
47094
  },
47108
47095
  end: {
47109
- line: 74,
47110
- column: 73
47096
+ line: 79,
47097
+ column: 3
47111
47098
  }
47112
47099
  },
47113
47100
  type: "if",
@@ -47117,8 +47104,8 @@ function cov_1y9t6ere98() {
47117
47104
  column: 2
47118
47105
  },
47119
47106
  end: {
47120
- line: 74,
47121
- column: 73
47107
+ line: 79,
47108
+ column: 3
47122
47109
  }
47123
47110
  }, {
47124
47111
  start: {
@@ -47135,22 +47122,22 @@ function cov_1y9t6ere98() {
47135
47122
  "9": {
47136
47123
  loc: {
47137
47124
  start: {
47138
- line: 98,
47125
+ line: 103,
47139
47126
  column: 4
47140
47127
  },
47141
47128
  end: {
47142
- line: 111,
47129
+ line: 116,
47143
47130
  column: 5
47144
47131
  }
47145
47132
  },
47146
47133
  type: "if",
47147
47134
  locations: [{
47148
47135
  start: {
47149
- line: 98,
47136
+ line: 103,
47150
47137
  column: 4
47151
47138
  },
47152
47139
  end: {
47153
- line: 111,
47140
+ line: 116,
47154
47141
  column: 5
47155
47142
  }
47156
47143
  }, {
@@ -47163,7 +47150,7 @@ function cov_1y9t6ere98() {
47163
47150
  column: undefined
47164
47151
  }
47165
47152
  }],
47166
- line: 98
47153
+ line: 103
47167
47154
  }
47168
47155
  },
47169
47156
  s: {
@@ -47244,7 +47231,7 @@ function cov_1y9t6ere98() {
47244
47231
  "9": [0, 0]
47245
47232
  },
47246
47233
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
47247
- hash: "d1ecc3936dc48fb7362ad34ab9e6e02e86c5ff20"
47234
+ hash: "caddab36f5d99d8486ee83ca1f16c9afcc3b5825"
47248
47235
  };
47249
47236
  var coverage = global[gcv] || (global[gcv] = {});
47250
47237
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -47380,12 +47367,12 @@ var validateDateField = function validateDateField(_ref6) {
47380
47367
  var label = _ref6.label,
47381
47368
  isRequired = _ref6.isRequired;
47382
47369
  cov_1y9t6ere98().f[7]++;
47383
- var schema = (cov_1y9t6ere98().s[35]++, yup__namespace.date().typeError(getInvalidTypeError(label, "date")));
47370
+ var schema = (cov_1y9t6ere98().s[35]++, yup__namespace.date().typeError("").nullable());
47384
47371
  cov_1y9t6ere98().s[36]++;
47385
47372
  if (isRequired) {
47386
47373
  cov_1y9t6ere98().b[8][0]++;
47387
47374
  cov_1y9t6ere98().s[37]++;
47388
- schema = schema.required(getRequiredFieldError(label));
47375
+ schema = yup__namespace.date().typeError(getInvalidTypeError(label, "date")).required(getRequiredFieldError(label));
47389
47376
  } else {
47390
47377
  cov_1y9t6ere98().b[8][1]++;
47391
47378
  }
@@ -65290,7 +65277,7 @@ var linkifyDecorator = function linkifyDecorator(decoratedHref, decoratedText, k
65290
65277
 
65291
65278
  function cov_29xlle89ll() {
65292
65279
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/Submissions/Submission.jsx";
65293
- var hash = "f309c9df1c79dbf4de7b84c18c2f39eed53b297f";
65280
+ var hash = "4cf87e1b1fcaee8e7e2e1f269b349130d14d288a";
65294
65281
  var global = new Function("return this")();
65295
65282
  var gcv = "__coverage__";
65296
65283
  var coverageData = {
@@ -65636,7 +65623,7 @@ function cov_29xlle89ll() {
65636
65623
  },
65637
65624
  end: {
65638
65625
  line: 49,
65639
- column: 63
65626
+ column: 72
65640
65627
  }
65641
65628
  },
65642
65629
  type: "cond-expr",
@@ -65647,16 +65634,49 @@ function cov_29xlle89ll() {
65647
65634
  },
65648
65635
  end: {
65649
65636
  line: 49,
65650
- column: 55
65637
+ column: 64
65651
65638
  }
65652
65639
  }, {
65653
65640
  start: {
65654
65641
  line: 49,
65655
- column: 58
65642
+ column: 67
65656
65643
  },
65657
65644
  end: {
65658
65645
  line: 49,
65659
- column: 63
65646
+ column: 72
65647
+ }
65648
+ }],
65649
+ line: 49
65650
+ },
65651
+ "9": {
65652
+ loc: {
65653
+ start: {
65654
+ line: 49,
65655
+ column: 33
65656
+ },
65657
+ end: {
65658
+ line: 49,
65659
+ column: 64
65660
+ }
65661
+ },
65662
+ type: "binary-expr",
65663
+ locations: [{
65664
+ start: {
65665
+ line: 49,
65666
+ column: 33
65667
+ },
65668
+ end: {
65669
+ line: 49,
65670
+ column: 38
65671
+ }
65672
+ }, {
65673
+ start: {
65674
+ line: 49,
65675
+ column: 42
65676
+ },
65677
+ end: {
65678
+ line: 49,
65679
+ column: 64
65660
65680
  }
65661
65681
  }],
65662
65682
  line: 49
@@ -65684,10 +65704,11 @@ function cov_29xlle89ll() {
65684
65704
  "5": [0],
65685
65705
  "6": [0, 0],
65686
65706
  "7": [0, 0],
65687
- "8": [0, 0]
65707
+ "8": [0, 0],
65708
+ "9": [0, 0]
65688
65709
  },
65689
65710
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
65690
- hash: "f309c9df1c79dbf4de7b84c18c2f39eed53b297f"
65711
+ hash: "4cf87e1b1fcaee8e7e2e1f269b349130d14d288a"
65691
65712
  };
65692
65713
  var coverage = global[gcv] || (global[gcv] = {});
65693
65714
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -65757,7 +65778,7 @@ var Submission = function Submission(_ref) {
65757
65778
  weight: "semibold"
65758
65779
  }, answerProps), /*#__PURE__*/React__default["default"].createElement(_default, {
65759
65780
  componentDecorator: linkifyDecorator
65760
- }, kind === "date" ? (cov_29xlle89ll().b[8][0]++, utils.dateFormat.date(value)) : (cov_29xlle89ll().b[8][1]++, value))));
65781
+ }, kind === "date" ? (cov_29xlle89ll().b[8][0]++, (cov_29xlle89ll().b[9][0]++, value) && (cov_29xlle89ll().b[9][1]++, utils.dateFormat.date(value))) : (cov_29xlle89ll().b[8][1]++, value))));
65761
65782
  }));
65762
65783
  };
65763
65784