@bigbinary/neeto-form-frontend 1.1.1 → 1.1.3

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]++;
@@ -37589,7 +37592,7 @@ var MultipleEmailInput = function MultipleEmailInput(_ref) {
37589
37592
  var _excluded$a = ["name", "label", "error", "value"];
37590
37593
  function cov_1gez8dqmnr() {
37591
37594
  var path = "/home/runner/work/neeto-form-frontend/neeto-form-frontend/src/components/ExternalForm/Condition.jsx";
37592
- var hash = "328a2f02a8ce55ca9c1107c4db4abe7d241df713";
37595
+ var hash = "ba5a7487627e2b452c5f901e5e3e7ead4fafc579";
37593
37596
  var global = new Function("return this")();
37594
37597
  var gcv = "__coverage__";
37595
37598
  var coverageData = {
@@ -37601,7 +37604,7 @@ function cov_1gez8dqmnr() {
37601
37604
  column: 18
37602
37605
  },
37603
37606
  end: {
37604
- line: 24,
37607
+ line: 27,
37605
37608
  column: 1
37606
37609
  }
37607
37610
  },
@@ -37611,7 +37614,7 @@ function cov_1gez8dqmnr() {
37611
37614
  column: 2
37612
37615
  },
37613
37616
  end: {
37614
- line: 23,
37617
+ line: 26,
37615
37618
  column: 8
37616
37619
  }
37617
37620
  }
@@ -37635,7 +37638,7 @@ function cov_1gez8dqmnr() {
37635
37638
  column: 2
37636
37639
  },
37637
37640
  end: {
37638
- line: 23,
37641
+ line: 26,
37639
37642
  column: 8
37640
37643
  }
37641
37644
  },
@@ -37646,44 +37649,44 @@ function cov_1gez8dqmnr() {
37646
37649
  "0": {
37647
37650
  loc: {
37648
37651
  start: {
37649
- line: 20,
37652
+ line: 23,
37650
37653
  column: 5
37651
37654
  },
37652
37655
  end: {
37653
- line: 22,
37656
+ line: 25,
37654
37657
  column: 5
37655
37658
  }
37656
37659
  },
37657
37660
  type: "binary-expr",
37658
37661
  locations: [{
37659
37662
  start: {
37660
- line: 20,
37663
+ line: 23,
37661
37664
  column: 5
37662
37665
  },
37663
37666
  end: {
37664
- line: 20,
37667
+ line: 23,
37665
37668
  column: 12
37666
37669
  }
37667
37670
  }, {
37668
37671
  start: {
37669
- line: 20,
37672
+ line: 23,
37670
37673
  column: 16
37671
37674
  },
37672
37675
  end: {
37673
- line: 20,
37676
+ line: 23,
37674
37677
  column: 41
37675
37678
  }
37676
37679
  }, {
37677
37680
  start: {
37678
- line: 21,
37681
+ line: 24,
37679
37682
  column: 6
37680
37683
  },
37681
37684
  end: {
37682
- line: 21,
37685
+ line: 24,
37683
37686
  column: 63
37684
37687
  }
37685
37688
  }],
37686
- line: 20
37689
+ line: 23
37687
37690
  }
37688
37691
  },
37689
37692
  s: {
@@ -37697,7 +37700,7 @@ function cov_1gez8dqmnr() {
37697
37700
  "0": [0, 0, 0]
37698
37701
  },
37699
37702
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
37700
- hash: "328a2f02a8ce55ca9c1107c4db4abe7d241df713"
37703
+ hash: "ba5a7487627e2b452c5f901e5e3e7ead4fafc579"
37701
37704
  };
37702
37705
  var coverage = global[gcv] || (global[gcv] = {});
37703
37706
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -37735,7 +37738,7 @@ var Condition = function Condition(_ref, ref) {
37735
37738
  type: "checkbox",
37736
37739
  value: value
37737
37740
  }, otherProps)), /*#__PURE__*/React__default.createElement("label", {
37738
- className: "neeto-form-engine-label",
37741
+ className: "neeto-form-engine-label font-normal",
37739
37742
  htmlFor: "condition-".concat(name)
37740
37743
  }, label)), (cov_1gez8dqmnr().b[0][0]++, !!error) && (cov_1gez8dqmnr().b[0][1]++, typeof error === "string") && (cov_1gez8dqmnr().b[0][2]++, /*#__PURE__*/React__default.createElement("p", {
37741
37744
  className: "neeto-form-engine-input__error"