@bigbinary/neeto-form-frontend 1.1.0 → 1.1.2

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
@@ -10,7 +10,7 @@ import i18next, { t as t$1 } from 'i18next';
10
10
  import { Input as Input$2, Email as Email$2, Phone as Phone$2, Up, Down, MenuHorizontal, Delete, Plus, NeetoInvisible, MultipleChoice as MultipleChoice$2, ListDot, Dropdown as Dropdown$3, Rating as Rating$4, Smiley, Checkbox as Checkbox$1, Calendar, Check, Close } from '@bigbinary/neeto-icons';
11
11
  import axios from 'axios';
12
12
  import { Input as Input$3, Textarea as Textarea$2, Checkbox, ActionBlock } from '@bigbinary/neetoui/formik';
13
- import { useTranslation } from 'react-i18next';
13
+ import { useTranslation, Trans } from 'react-i18next';
14
14
  import { withImmutableActions } from '@bigbinary/neeto-commons-frontend/react-utils';
15
15
  import { create as create$1 } from 'zustand';
16
16
  import classnames from 'classnames';
@@ -28041,7 +28041,7 @@ var List = function List(_ref) {
28041
28041
  var _excluded$c = ["questionKinds", "showAddQuestionDivider", "onValueChange", "showActionBlock", "formId", "isDeletable", "isRequiredField", "submitButtonProps", "cancelButtonProps", "isKindAlreadyActive", "getActiveKindDetails", "kindUniqueOn", "isDisabledFieldLabel"];
28042
28042
  function cov_2e8k7gwd81() {
28043
28043
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/BuildForm/Form/index.jsx";
28044
- var hash = "0e541f4af3139e353b4bfbecbf13d6733838aa71";
28044
+ var hash = "5a619ca0b5015a3a8b98845e724473ed102fb53f";
28045
28045
  var global = new Function("return this")();
28046
28046
  var gcv = "__coverage__";
28047
28047
  var coverageData = {
@@ -28053,7 +28053,7 @@ function cov_2e8k7gwd81() {
28053
28053
  column: 13
28054
28054
  },
28055
28055
  end: {
28056
- line: 224,
28056
+ line: 229,
28057
28057
  column: 1
28058
28058
  }
28059
28059
  },
@@ -28323,97 +28323,97 @@ function cov_2e8k7gwd81() {
28323
28323
  column: 2
28324
28324
  },
28325
28325
  end: {
28326
- line: 223,
28326
+ line: 228,
28327
28327
  column: 4
28328
28328
  }
28329
28329
  },
28330
28330
  "28": {
28331
28331
  start: {
28332
- line: 147,
28332
+ line: 152,
28333
28333
  column: 23
28334
28334
  },
28335
28335
  end: {
28336
- line: 147,
28336
+ line: 152,
28337
28337
  column: 51
28338
28338
  }
28339
28339
  },
28340
28340
  "29": {
28341
28341
  start: {
28342
- line: 149,
28342
+ line: 154,
28343
28343
  column: 32
28344
28344
  },
28345
28345
  end: {
28346
- line: 152,
28346
+ line: 157,
28347
28347
  column: 11
28348
28348
  }
28349
28349
  },
28350
28350
  "30": {
28351
28351
  start: {
28352
- line: 153,
28352
+ line: 158,
28353
28353
  column: 10
28354
28354
  },
28355
28355
  end: {
28356
- line: 153,
28356
+ line: 158,
28357
28357
  column: 59
28358
28358
  }
28359
28359
  },
28360
28360
  "31": {
28361
28361
  start: {
28362
- line: 154,
28362
+ line: 159,
28363
28363
  column: 10
28364
28364
  },
28365
28365
  end: {
28366
- line: 154,
28366
+ line: 159,
28367
28367
  column: 39
28368
28368
  }
28369
28369
  },
28370
28370
  "32": {
28371
28371
  start: {
28372
- line: 161,
28372
+ line: 166,
28373
28373
  column: 14
28374
28374
  },
28375
28375
  end: {
28376
- line: 191,
28376
+ line: 196,
28377
28377
  column: 17
28378
28378
  }
28379
28379
  },
28380
28380
  "33": {
28381
28381
  start: {
28382
- line: 164,
28382
+ line: 169,
28383
28383
  column: 20
28384
28384
  },
28385
28385
  end: {
28386
- line: 169,
28386
+ line: 174,
28387
28387
  column: 22
28388
28388
  }
28389
28389
  },
28390
28390
  "34": {
28391
28391
  start: {
28392
- line: 188,
28392
+ line: 193,
28393
28393
  column: 38
28394
28394
  },
28395
28395
  end: {
28396
- line: 188,
28396
+ line: 193,
28397
28397
  column: 65
28398
28398
  }
28399
28399
  },
28400
28400
  "35": {
28401
28401
  start: {
28402
- line: 200,
28402
+ line: 205,
28403
28403
  column: 38
28404
28404
  },
28405
28405
  end: {
28406
- line: 203,
28406
+ line: 208,
28407
28407
  column: 17
28408
28408
  }
28409
28409
  },
28410
28410
  "36": {
28411
28411
  start: {
28412
- line: 204,
28412
+ line: 209,
28413
28413
  column: 16
28414
28414
  },
28415
28415
  end: {
28416
- line: 204,
28416
+ line: 209,
28417
28417
  column: 65
28418
28418
  }
28419
28419
  }
@@ -28437,7 +28437,7 @@ function cov_2e8k7gwd81() {
28437
28437
  column: 6
28438
28438
  },
28439
28439
  end: {
28440
- line: 224,
28440
+ line: 229,
28441
28441
  column: 1
28442
28442
  }
28443
28443
  },
@@ -28687,145 +28687,145 @@ function cov_2e8k7gwd81() {
28687
28687
  name: "(anonymous_11)",
28688
28688
  decl: {
28689
28689
  start: {
28690
- line: 147,
28690
+ line: 152,
28691
28691
  column: 17
28692
28692
  },
28693
28693
  end: {
28694
- line: 147,
28694
+ line: 152,
28695
28695
  column: 18
28696
28696
  }
28697
28697
  },
28698
28698
  loc: {
28699
28699
  start: {
28700
- line: 147,
28700
+ line: 152,
28701
28701
  column: 23
28702
28702
  },
28703
28703
  end: {
28704
- line: 147,
28704
+ line: 152,
28705
28705
  column: 51
28706
28706
  }
28707
28707
  },
28708
- line: 147
28708
+ line: 152
28709
28709
  },
28710
28710
  "12": {
28711
28711
  name: "(anonymous_12)",
28712
28712
  decl: {
28713
28713
  start: {
28714
- line: 148,
28714
+ line: 153,
28715
28715
  column: 18
28716
28716
  },
28717
28717
  end: {
28718
- line: 148,
28718
+ line: 153,
28719
28719
  column: 19
28720
28720
  }
28721
28721
  },
28722
28722
  loc: {
28723
28723
  start: {
28724
- line: 148,
28724
+ line: 153,
28725
28725
  column: 24
28726
28726
  },
28727
28727
  end: {
28728
- line: 155,
28728
+ line: 160,
28729
28729
  column: 9
28730
28730
  }
28731
28731
  },
28732
- line: 148
28732
+ line: 153
28733
28733
  },
28734
28734
  "13": {
28735
28735
  name: "(anonymous_13)",
28736
28736
  decl: {
28737
28737
  start: {
28738
- line: 160,
28738
+ line: 165,
28739
28739
  column: 13
28740
28740
  },
28741
28741
  end: {
28742
- line: 160,
28742
+ line: 165,
28743
28743
  column: 14
28744
28744
  }
28745
28745
  },
28746
28746
  loc: {
28747
28747
  start: {
28748
- line: 161,
28748
+ line: 166,
28749
28749
  column: 14
28750
28750
  },
28751
28751
  end: {
28752
- line: 191,
28752
+ line: 196,
28753
28753
  column: 17
28754
28754
  }
28755
28755
  },
28756
- line: 161
28756
+ line: 166
28757
28757
  },
28758
28758
  "14": {
28759
28759
  name: "(anonymous_14)",
28760
28760
  decl: {
28761
28761
  start: {
28762
- line: 163,
28762
+ line: 168,
28763
28763
  column: 29
28764
28764
  },
28765
28765
  end: {
28766
- line: 163,
28766
+ line: 168,
28767
28767
  column: 30
28768
28768
  }
28769
28769
  },
28770
28770
  loc: {
28771
28771
  start: {
28772
- line: 164,
28772
+ line: 169,
28773
28773
  column: 20
28774
28774
  },
28775
28775
  end: {
28776
- line: 169,
28776
+ line: 174,
28777
28777
  column: 22
28778
28778
  }
28779
28779
  },
28780
- line: 164
28780
+ line: 169
28781
28781
  },
28782
28782
  "15": {
28783
28783
  name: "(anonymous_15)",
28784
28784
  decl: {
28785
28785
  start: {
28786
- line: 188,
28786
+ line: 193,
28787
28787
  column: 30
28788
28788
  },
28789
28789
  end: {
28790
- line: 188,
28790
+ line: 193,
28791
28791
  column: 31
28792
28792
  }
28793
28793
  },
28794
28794
  loc: {
28795
28795
  start: {
28796
- line: 188,
28796
+ line: 193,
28797
28797
  column: 38
28798
28798
  },
28799
28799
  end: {
28800
- line: 188,
28800
+ line: 193,
28801
28801
  column: 65
28802
28802
  }
28803
28803
  },
28804
- line: 188
28804
+ line: 193
28805
28805
  },
28806
28806
  "16": {
28807
28807
  name: "(anonymous_16)",
28808
28808
  decl: {
28809
28809
  start: {
28810
- line: 199,
28810
+ line: 204,
28811
28811
  column: 24
28812
28812
  },
28813
28813
  end: {
28814
- line: 199,
28814
+ line: 204,
28815
28815
  column: 25
28816
28816
  }
28817
28817
  },
28818
28818
  loc: {
28819
28819
  start: {
28820
- line: 199,
28820
+ line: 204,
28821
28821
  column: 32
28822
28822
  },
28823
28823
  end: {
28824
- line: 205,
28824
+ line: 210,
28825
28825
  column: 15
28826
28826
  }
28827
28827
  },
28828
- line: 199
28828
+ line: 204
28829
28829
  }
28830
28830
  },
28831
28831
  branchMap: {
@@ -29039,134 +29039,134 @@ function cov_2e8k7gwd81() {
29039
29039
  "6": {
29040
29040
  loc: {
29041
29041
  start: {
29042
- line: 144,
29043
- column: 12
29042
+ line: 147,
29043
+ column: 16
29044
29044
  },
29045
29045
  end: {
29046
- line: 145,
29047
- column: 61
29046
+ line: 148,
29047
+ column: 65
29048
29048
  }
29049
29049
  },
29050
29050
  type: "binary-expr",
29051
29051
  locations: [{
29052
29052
  start: {
29053
- line: 144,
29054
- column: 12
29053
+ line: 147,
29054
+ column: 16
29055
29055
  },
29056
29056
  end: {
29057
- line: 144,
29058
- column: 72
29057
+ line: 147,
29058
+ column: 76
29059
29059
  }
29060
29060
  }, {
29061
29061
  start: {
29062
- line: 145,
29063
- column: 12
29062
+ line: 148,
29063
+ column: 16
29064
29064
  },
29065
29065
  end: {
29066
- line: 145,
29067
- column: 61
29066
+ line: 148,
29067
+ column: 65
29068
29068
  }
29069
29069
  }],
29070
- line: 144
29070
+ line: 147
29071
29071
  },
29072
29072
  "7": {
29073
29073
  loc: {
29074
29074
  start: {
29075
- line: 158,
29075
+ line: 163,
29076
29076
  column: 9
29077
29077
  },
29078
29078
  end: {
29079
- line: 208,
29079
+ line: 213,
29080
29080
  column: 9
29081
29081
  }
29082
29082
  },
29083
29083
  type: "cond-expr",
29084
29084
  locations: [{
29085
29085
  start: {
29086
- line: 159,
29086
+ line: 164,
29087
29087
  column: 10
29088
29088
  },
29089
29089
  end: {
29090
- line: 193,
29090
+ line: 198,
29091
29091
  column: 23
29092
29092
  }
29093
29093
  }, {
29094
29094
  start: {
29095
- line: 195,
29095
+ line: 200,
29096
29096
  column: 10
29097
29097
  },
29098
29098
  end: {
29099
- line: 207,
29099
+ line: 212,
29100
29100
  column: 29
29101
29101
  }
29102
29102
  }],
29103
- line: 158
29103
+ line: 163
29104
29104
  },
29105
29105
  "8": {
29106
29106
  loc: {
29107
29107
  start: {
29108
- line: 209,
29108
+ line: 214,
29109
29109
  column: 9
29110
29110
  },
29111
29111
  end: {
29112
- line: 220,
29112
+ line: 225,
29113
29113
  column: 9
29114
29114
  }
29115
29115
  },
29116
29116
  type: "binary-expr",
29117
29117
  locations: [{
29118
29118
  start: {
29119
- line: 209,
29119
+ line: 214,
29120
29120
  column: 9
29121
29121
  },
29122
29122
  end: {
29123
- line: 209,
29123
+ line: 214,
29124
29124
  column: 24
29125
29125
  }
29126
29126
  }, {
29127
29127
  start: {
29128
- line: 210,
29128
+ line: 215,
29129
29129
  column: 10
29130
29130
  },
29131
29131
  end: {
29132
- line: 219,
29132
+ line: 224,
29133
29133
  column: 12
29134
29134
  }
29135
29135
  }],
29136
- line: 209
29136
+ line: 214
29137
29137
  },
29138
29138
  "9": {
29139
29139
  loc: {
29140
29140
  start: {
29141
- line: 216,
29141
+ line: 221,
29142
29142
  column: 24
29143
29143
  },
29144
29144
  end: {
29145
- line: 216,
29145
+ line: 221,
29146
29146
  column: 46
29147
29147
  }
29148
29148
  },
29149
29149
  type: "binary-expr",
29150
29150
  locations: [{
29151
29151
  start: {
29152
- line: 216,
29152
+ line: 221,
29153
29153
  column: 24
29154
29154
  },
29155
29155
  end: {
29156
- line: 216,
29156
+ line: 221,
29157
29157
  column: 36
29158
29158
  }
29159
29159
  }, {
29160
29160
  start: {
29161
- line: 216,
29161
+ line: 221,
29162
29162
  column: 40
29163
29163
  },
29164
29164
  end: {
29165
- line: 216,
29165
+ line: 221,
29166
29166
  column: 46
29167
29167
  }
29168
29168
  }],
29169
- line: 216
29169
+ line: 221
29170
29170
  }
29171
29171
  },
29172
29172
  s: {
@@ -29240,7 +29240,7 @@ function cov_2e8k7gwd81() {
29240
29240
  "9": [0, 0]
29241
29241
  },
29242
29242
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
29243
- hash: "0e541f4af3139e353b4bfbecbf13d6733838aa71"
29243
+ hash: "5a619ca0b5015a3a8b98845e724473ed102fb53f"
29244
29244
  };
29245
29245
  var coverage = global[gcv] || (global[gcv] = {});
29246
29246
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -29383,10 +29383,13 @@ var Form = function Form(_ref) {
29383
29383
  cov_2e8k7gwd81().s[27]++;
29384
29384
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Alert, {
29385
29385
  isOpen: deleteQuestionIndex !== null,
29386
- message: t("neetoForm.questions.deleteAlert.message"),
29387
- submitButtonLabel: t("neetoForm.common.yes"),
29388
- title: t("neetoForm.questions.deleteAlert.title", {
29389
- label: (_ref13 = (cov_2e8k7gwd81().b[6][0]++, INDEPENDENT_LABELS_MAP[(_questions$deleteQues = questions[deleteQuestionIndex]) === null || _questions$deleteQues === void 0 ? void 0 : _questions$deleteQues.kind])) !== null && _ref13 !== void 0 ? _ref13 : (cov_2e8k7gwd81().b[6][1]++, sliceLabel((_questions$deleteQues2 = questions[deleteQuestionIndex]) === null || _questions$deleteQues2 === void 0 ? void 0 : _questions$deleteQues2.label))
29386
+ submitButtonLabel: t("neetoForm.common.delete"),
29387
+ title: t("neetoForm.questions.deleteAlert.title"),
29388
+ message: /*#__PURE__*/React__default.createElement(Trans, {
29389
+ i18nKey: "neetoForm.questions.deleteAlert.message",
29390
+ values: {
29391
+ label: (_ref13 = (cov_2e8k7gwd81().b[6][0]++, INDEPENDENT_LABELS_MAP[(_questions$deleteQues = questions[deleteQuestionIndex]) === null || _questions$deleteQues === void 0 ? void 0 : _questions$deleteQues.kind])) !== null && _ref13 !== void 0 ? _ref13 : (cov_2e8k7gwd81().b[6][1]++, sliceLabel((_questions$deleteQues2 = questions[deleteQuestionIndex]) === null || _questions$deleteQues2 === void 0 ? void 0 : _questions$deleteQues2.label))
29392
+ }
29390
29393
  }),
29391
29394
  onClose: function onClose() {
29392
29395
  cov_2e8k7gwd81().f[11]++;
@@ -34080,7 +34083,7 @@ cov_ulkgj7n39().s[23]++;
34080
34083
 
34081
34084
  function cov_291vtop84c() {
34082
34085
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/Common/FormikWrap.js";
34083
- var hash = "2fa2c31db7e39b3e2b38f7ef5f4c947b5004b05f";
34086
+ var hash = "a26a6efe7c7b1236ea07677952837913631acb6c";
34084
34087
  var global = new Function("return this")();
34085
34088
  var gcv = "__coverage__";
34086
34089
  var coverageData = {
@@ -34092,18 +34095,18 @@ function cov_291vtop84c() {
34092
34095
  column: 19
34093
34096
  },
34094
34097
  end: {
34095
- line: 34,
34098
+ line: 43,
34096
34099
  column: 1
34097
34100
  }
34098
34101
  },
34099
34102
  "1": {
34100
34103
  start: {
34101
34104
  line: 15,
34102
- column: 52
34105
+ column: 61
34103
34106
  },
34104
34107
  end: {
34105
34108
  line: 15,
34106
- column: 70
34109
+ column: 79
34107
34110
  }
34108
34111
  },
34109
34112
  "2": {
@@ -34162,7 +34165,7 @@ function cov_291vtop84c() {
34162
34165
  column: 2
34163
34166
  },
34164
34167
  end: {
34165
- line: 31,
34168
+ line: 40,
34166
34169
  column: 30
34167
34170
  }
34168
34171
  },
@@ -34172,37 +34175,77 @@ function cov_291vtop84c() {
34172
34175
  column: 4
34173
34176
  },
34174
34177
  end: {
34175
- line: 30,
34178
+ line: 39,
34176
34179
  column: 5
34177
34180
  }
34178
34181
  },
34179
34182
  "9": {
34180
34183
  start: {
34181
- line: 29,
34182
- column: 6
34184
+ line: 30,
34185
+ column: 28
34183
34186
  },
34184
34187
  end: {
34185
- line: 29,
34186
- column: 57
34188
+ line: 36,
34189
+ column: 14
34187
34190
  }
34188
34191
  },
34189
34192
  "10": {
34190
34193
  start: {
34191
- line: 29,
34192
- column: 41
34194
+ line: 31,
34195
+ column: 23
34193
34196
  },
34194
34197
  end: {
34195
- line: 29,
34196
- column: 57
34198
+ line: 31,
34199
+ column: 35
34197
34200
  }
34198
34201
  },
34199
34202
  "11": {
34200
34203
  start: {
34201
34204
  line: 33,
34202
- column: 2
34205
+ column: 10
34203
34206
  },
34204
34207
  end: {
34205
34208
  line: 33,
34209
+ column: 33
34210
+ }
34211
+ },
34212
+ "12": {
34213
+ start: {
34214
+ line: 35,
34215
+ column: 10
34216
+ },
34217
+ end: {
34218
+ line: 35,
34219
+ column: 21
34220
+ }
34221
+ },
34222
+ "13": {
34223
+ start: {
34224
+ line: 38,
34225
+ column: 6
34226
+ },
34227
+ end: {
34228
+ line: 38,
34229
+ column: 64
34230
+ }
34231
+ },
34232
+ "14": {
34233
+ start: {
34234
+ line: 38,
34235
+ column: 41
34236
+ },
34237
+ end: {
34238
+ line: 38,
34239
+ column: 64
34240
+ }
34241
+ },
34242
+ "15": {
34243
+ start: {
34244
+ line: 42,
34245
+ column: 2
34246
+ },
34247
+ end: {
34248
+ line: 42,
34206
34249
  column: 18
34207
34250
  }
34208
34251
  }
@@ -34226,7 +34269,7 @@ function cov_291vtop84c() {
34226
34269
  column: 6
34227
34270
  },
34228
34271
  end: {
34229
- line: 34,
34272
+ line: 43,
34230
34273
  column: 1
34231
34274
  }
34232
34275
  },
@@ -34298,11 +34341,59 @@ function cov_291vtop84c() {
34298
34341
  column: 18
34299
34342
  },
34300
34343
  end: {
34301
- line: 31,
34344
+ line: 40,
34302
34345
  column: 3
34303
34346
  }
34304
34347
  },
34305
34348
  line: 27
34349
+ },
34350
+ "4": {
34351
+ name: "(anonymous_4)",
34352
+ decl: {
34353
+ start: {
34354
+ line: 31,
34355
+ column: 16
34356
+ },
34357
+ end: {
34358
+ line: 31,
34359
+ column: 17
34360
+ }
34361
+ },
34362
+ loc: {
34363
+ start: {
34364
+ line: 31,
34365
+ column: 23
34366
+ },
34367
+ end: {
34368
+ line: 31,
34369
+ column: 35
34370
+ }
34371
+ },
34372
+ line: 31
34373
+ },
34374
+ "5": {
34375
+ name: "(anonymous_5)",
34376
+ decl: {
34377
+ start: {
34378
+ line: 32,
34379
+ column: 16
34380
+ },
34381
+ end: {
34382
+ line: 32,
34383
+ column: 17
34384
+ }
34385
+ },
34386
+ loc: {
34387
+ start: {
34388
+ line: 32,
34389
+ column: 30
34390
+ },
34391
+ end: {
34392
+ line: 36,
34393
+ column: 9
34394
+ }
34395
+ },
34396
+ line: 32
34306
34397
  }
34307
34398
  },
34308
34399
  branchMap: {
@@ -34388,7 +34479,7 @@ function cov_291vtop84c() {
34388
34479
  column: 4
34389
34480
  },
34390
34481
  end: {
34391
- line: 30,
34482
+ line: 39,
34392
34483
  column: 5
34393
34484
  }
34394
34485
  },
@@ -34399,7 +34490,7 @@ function cov_291vtop84c() {
34399
34490
  column: 4
34400
34491
  },
34401
34492
  end: {
34402
- line: 30,
34493
+ line: 39,
34403
34494
  column: 5
34404
34495
  }
34405
34496
  }, {
@@ -34450,23 +34541,23 @@ function cov_291vtop84c() {
34450
34541
  "4": {
34451
34542
  loc: {
34452
34543
  start: {
34453
- line: 29,
34544
+ line: 38,
34454
34545
  column: 6
34455
34546
  },
34456
34547
  end: {
34457
- line: 29,
34458
- column: 57
34548
+ line: 38,
34549
+ column: 64
34459
34550
  }
34460
34551
  },
34461
34552
  type: "if",
34462
34553
  locations: [{
34463
34554
  start: {
34464
- line: 29,
34555
+ line: 38,
34465
34556
  column: 6
34466
34557
  },
34467
34558
  end: {
34468
- line: 29,
34469
- column: 57
34559
+ line: 38,
34560
+ column: 64
34470
34561
  }
34471
34562
  }, {
34472
34563
  start: {
@@ -34478,7 +34569,7 @@ function cov_291vtop84c() {
34478
34569
  column: undefined
34479
34570
  }
34480
34571
  }],
34481
- line: 29
34572
+ line: 38
34482
34573
  }
34483
34574
  },
34484
34575
  s: {
@@ -34493,13 +34584,19 @@ function cov_291vtop84c() {
34493
34584
  "8": 0,
34494
34585
  "9": 0,
34495
34586
  "10": 0,
34496
- "11": 0
34587
+ "11": 0,
34588
+ "12": 0,
34589
+ "13": 0,
34590
+ "14": 0,
34591
+ "15": 0
34497
34592
  },
34498
34593
  f: {
34499
34594
  "0": 0,
34500
34595
  "1": 0,
34501
34596
  "2": 0,
34502
- "3": 0
34597
+ "3": 0,
34598
+ "4": 0,
34599
+ "5": 0
34503
34600
  },
34504
34601
  b: {
34505
34602
  "0": [0, 0, 0],
@@ -34509,7 +34606,7 @@ function cov_291vtop84c() {
34509
34606
  "4": [0, 0]
34510
34607
  },
34511
34608
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
34512
- hash: "2fa2c31db7e39b3e2b38f7ef5f4c947b5004b05f"
34609
+ hash: "a26a6efe7c7b1236ea07677952837913631acb6c"
34513
34610
  };
34514
34611
  var coverage = global[gcv] || (global[gcv] = {});
34515
34612
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -34535,6 +34632,7 @@ var FormikWrap = function FormikWrap(_ref) {
34535
34632
  cov_291vtop84c().f[0]++;
34536
34633
  var _ref2 = (cov_291vtop84c().s[1]++, useFormikContext()),
34537
34634
  errors = _ref2.errors,
34635
+ touched = _ref2.touched,
34538
34636
  isValid = _ref2.isValid,
34539
34637
  isSubmitting = _ref2.isSubmitting,
34540
34638
  values = _ref2.values;
@@ -34558,11 +34656,23 @@ var FormikWrap = function FormikWrap(_ref) {
34558
34656
  cov_291vtop84c().s[8]++;
34559
34657
  if ((cov_291vtop84c().b[3][0]++, !isSubmitting) && (cov_291vtop84c().b[3][1]++, !isValid)) {
34560
34658
  cov_291vtop84c().b[2][0]++;
34561
- cov_291vtop84c().s[9]++;
34659
+ // include only touched fields
34660
+ var touchedErrors = (cov_291vtop84c().s[9]++, Object.keys(errors).filter(function (key) {
34661
+ cov_291vtop84c().f[4]++;
34662
+ cov_291vtop84c().s[10]++;
34663
+ return touched[key];
34664
+ }).reduce(function (obj, key) {
34665
+ cov_291vtop84c().f[5]++;
34666
+ cov_291vtop84c().s[11]++;
34667
+ obj[key] = errors[key];
34668
+ cov_291vtop84c().s[12]++;
34669
+ return obj;
34670
+ }, {}));
34671
+ cov_291vtop84c().s[13]++;
34562
34672
  if (typeof onError === "function") {
34563
34673
  cov_291vtop84c().b[4][0]++;
34564
- cov_291vtop84c().s[10]++;
34565
- onError(errors);
34674
+ cov_291vtop84c().s[14]++;
34675
+ onError(touchedErrors);
34566
34676
  } else {
34567
34677
  cov_291vtop84c().b[4][1]++;
34568
34678
  }
@@ -34570,7 +34680,7 @@ var FormikWrap = function FormikWrap(_ref) {
34570
34680
  cov_291vtop84c().b[2][1]++;
34571
34681
  }
34572
34682
  }, [isValid, isSubmitting]);
34573
- cov_291vtop84c().s[11]++;
34683
+ cov_291vtop84c().s[15]++;
34574
34684
  return children;
34575
34685
  };
34576
34686
 
@@ -59541,7 +59651,7 @@ var Success$1 = /*#__PURE__*/React__default.memo(Success);
59541
59651
 
59542
59652
  function cov_2jkcclu7mz() {
59543
59653
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/ExternalForm/index.jsx";
59544
- var hash = "c678672da6b7c438e8ebadee3ce8869460a8c3c6";
59654
+ var hash = "05c846696d6996a5fc58c9d61ade7f66c49c7270";
59545
59655
  var global = new Function("return this")();
59546
59656
  var gcv = "__coverage__";
59547
59657
  var coverageData = {
@@ -60234,7 +60344,7 @@ function cov_2jkcclu7mz() {
60234
60344
  },
60235
60345
  end: {
60236
60346
  line: 262,
60237
- column: 51
60347
+ column: 55
60238
60348
  }
60239
60349
  },
60240
60350
  "69": {
@@ -62218,7 +62328,7 @@ function cov_2jkcclu7mz() {
62218
62328
  "43": [0, 0]
62219
62329
  },
62220
62330
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
62221
- hash: "c678672da6b7c438e8ebadee3ce8869460a8c3c6"
62331
+ hash: "05c846696d6996a5fc58c9d61ade7f66c49c7270"
62222
62332
  };
62223
62333
  var coverage = global[gcv] || (global[gcv] = {});
62224
62334
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -62535,7 +62645,7 @@ var ExternalForm = function ExternalForm(_ref) {
62535
62645
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
62536
62646
  var formElement = _step.value;
62537
62647
  cov_2jkcclu7mz().s[54]++;
62538
- if (formElement.name === errorKeys[0]) {
62648
+ if (errorKeys.includes(formElement.name)) {
62539
62649
  cov_2jkcclu7mz().b[23][0]++;
62540
62650
  cov_2jkcclu7mz().s[55]++;
62541
62651
  formElement.scrollIntoView({
@@ -62630,7 +62740,7 @@ var ExternalForm = function ExternalForm(_ref) {
62630
62740
  if (!isEmpty(errors)) {
62631
62741
  cov_2jkcclu7mz().b[33][0]++;
62632
62742
  cov_2jkcclu7mz().s[68]++;
62633
- setFieldError(event.target.name);
62743
+ setFieldError(event.target.name, "");
62634
62744
  } else {
62635
62745
  cov_2jkcclu7mz().b[33][1]++;
62636
62746
  }