@bigbinary/neeto-form-frontend 4.4.37 → 4.4.38

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.
Files changed (87) hide show
  1. package/app/javascript/src/translations/en.json +5 -1
  2. package/dist/.ready +1 -1
  3. package/dist/BuildForm.js +57 -7
  4. package/dist/BuildForm.js.map +1 -1
  5. package/dist/ExternalForm.js +5 -4
  6. package/dist/ExternalForm.js.map +1 -1
  7. package/dist/Submission.js +1 -1
  8. package/dist/UrlBuilder.js +5 -4
  9. package/dist/UrlBuilder.js.map +1 -1
  10. package/dist/{buildForm-Ds5d1DR8.js → buildForm-C5642_SF.js} +2 -2
  11. package/dist/{buildForm-Ds5d1DR8.js.map → buildForm-C5642_SF.js.map} +1 -1
  12. package/dist/cjs/BuildForm.js +57 -7
  13. package/dist/cjs/BuildForm.js.map +1 -1
  14. package/dist/cjs/ExternalForm.js +5 -4
  15. package/dist/cjs/ExternalForm.js.map +1 -1
  16. package/dist/cjs/Submission.js +1 -1
  17. package/dist/cjs/UrlBuilder.js +5 -4
  18. package/dist/cjs/UrlBuilder.js.map +1 -1
  19. package/dist/cjs/{buildForm-CtHZCSpo.js → buildForm-BO5Vcxv_.js} +2 -2
  20. package/dist/cjs/{buildForm-CtHZCSpo.js.map → buildForm-BO5Vcxv_.js.map} +1 -1
  21. package/dist/cjs/{constants-CUBwzMb-.js → constants-D3en9KhN.js} +2 -1
  22. package/dist/cjs/constants-D3en9KhN.js.map +1 -0
  23. package/dist/cjs/hooks.js +4 -4
  24. package/dist/cjs/{index-Bj56Ua86.js → index-B9L6Cdpy.js} +2 -2
  25. package/dist/cjs/{index-Bj56Ua86.js.map → index-B9L6Cdpy.js.map} +1 -1
  26. package/dist/cjs/index.js +10 -9
  27. package/dist/cjs/index.js.map +1 -1
  28. package/dist/cjs/{useFormSubmission-DGRHK3u9.js → useFormSubmission-CdbaJ9RK.js} +2 -2
  29. package/dist/cjs/{useFormSubmission-DGRHK3u9.js.map → useFormSubmission-CdbaJ9RK.js.map} +1 -1
  30. package/dist/cjs/{utils-Xnit8PUn.js → utils-ojUD_GO6.js} +188 -96
  31. package/dist/cjs/utils-ojUD_GO6.js.map +1 -0
  32. package/dist/cjs/v2/BuildForm.js +54 -5
  33. package/dist/cjs/v2/BuildForm.js.map +1 -1
  34. package/dist/cjs/v2/ExternalForm.js +3 -3
  35. package/dist/cjs/v2/Submission.js +1 -1
  36. package/dist/cjs/v2/UrlBuilder.js +3 -3
  37. package/dist/cjs/v2/{constants-DIy-d-Pb.js → constants-DyPOVMyi.js} +2 -1
  38. package/dist/cjs/v2/constants-DyPOVMyi.js.map +1 -0
  39. package/dist/cjs/v2/index.js +4 -4
  40. package/dist/cjs/v2/{utils-DHGS4O20.js → utils-ChwdTdnN.js} +190 -98
  41. package/dist/cjs/v2/utils-ChwdTdnN.js.map +1 -0
  42. package/dist/cjs/v2/{yup-B-A1W_Vi.js → yup-CKeWnmJ3.js} +337 -37
  43. package/dist/cjs/v2/yup-CKeWnmJ3.js.map +1 -0
  44. package/dist/cjs/{yup-DZgfXVgs.js → yup-DvB9BGdG.js} +340 -39
  45. package/dist/cjs/yup-DvB9BGdG.js.map +1 -0
  46. package/dist/{constants-fjoeNdhb.js → constants-ClqQe4qZ.js} +2 -1
  47. package/dist/constants-ClqQe4qZ.js.map +1 -0
  48. package/dist/hooks.js +4 -4
  49. package/dist/{index-Cx0yvXwJ.js → index-CAR9-spo.js} +2 -2
  50. package/dist/{index-Cx0yvXwJ.js.map → index-CAR9-spo.js.map} +1 -1
  51. package/dist/index.js +10 -9
  52. package/dist/index.js.map +1 -1
  53. package/dist/main.css +1 -1
  54. package/dist/main.css.map +1 -1
  55. package/dist/{useFormSubmission-DMpf1msR.js → useFormSubmission-DMRpRRj4.js} +2 -2
  56. package/dist/{useFormSubmission-DMpf1msR.js.map → useFormSubmission-DMRpRRj4.js.map} +1 -1
  57. package/dist/{utils-Chj7ZOKi.js → utils-6l6j_LN6.js} +188 -96
  58. package/dist/utils-6l6j_LN6.js.map +1 -0
  59. package/dist/v2/BuildForm.js +54 -5
  60. package/dist/v2/BuildForm.js.map +1 -1
  61. package/dist/v2/ExternalForm.js +3 -3
  62. package/dist/v2/Submission.js +1 -1
  63. package/dist/v2/UrlBuilder.js +3 -3
  64. package/dist/v2/{constants-CZ7swzMG.js → constants-BlY0KFT4.js} +2 -1
  65. package/dist/v2/constants-BlY0KFT4.js.map +1 -0
  66. package/dist/v2/index.js +4 -4
  67. package/dist/v2/main.css +1 -1
  68. package/dist/v2/main.css.map +1 -1
  69. package/dist/v2/{utils-CemGJeLy.js → utils-B8sTYkWG.js} +190 -98
  70. package/dist/v2/utils-B8sTYkWG.js.map +1 -0
  71. package/dist/v2/{yup-eUr74YY2.js → yup-Cf-x7SqN.js} +336 -39
  72. package/dist/v2/yup-Cf-x7SqN.js.map +1 -0
  73. package/dist/{yup-CwN-8JrO.js → yup-7qmI_2fI.js} +338 -40
  74. package/dist/yup-7qmI_2fI.js.map +1 -0
  75. package/package.json +16 -16
  76. package/dist/cjs/constants-CUBwzMb-.js.map +0 -1
  77. package/dist/cjs/utils-Xnit8PUn.js.map +0 -1
  78. package/dist/cjs/v2/constants-DIy-d-Pb.js.map +0 -1
  79. package/dist/cjs/v2/utils-DHGS4O20.js.map +0 -1
  80. package/dist/cjs/v2/yup-B-A1W_Vi.js.map +0 -1
  81. package/dist/cjs/yup-DZgfXVgs.js.map +0 -1
  82. package/dist/constants-fjoeNdhb.js.map +0 -1
  83. package/dist/utils-Chj7ZOKi.js.map +0 -1
  84. package/dist/v2/constants-CZ7swzMG.js.map +0 -1
  85. package/dist/v2/utils-CemGJeLy.js.map +0 -1
  86. package/dist/v2/yup-eUr74YY2.js.map +0 -1
  87. package/dist/yup-CwN-8JrO.js.map +0 -1
@@ -1,33 +1,33 @@
1
1
  import { t } from 'i18next';
2
2
  import * as React from 'react';
3
3
  import { memo } from 'react';
4
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
4
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
6
5
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
7
- import { Plus, Mail, Users, Phone, User, MapPinHouse, Text, AlignLeft, Hash, Heading, EyeOff, SquareCheck, CircleDot, ChevronDown, Star as Star$1, Gauge, MessageSquare, ScrollText, Calendar, Upload, ShieldCheck, MessageSquareText, MapPin } from 'lucide-react';
8
- import { Q as QUESTION_TYPES, C as CAPTCHA_TYPES } from './constants-CZ7swzMG.js';
9
- import { compose, isEmpty, trim, useWith, path, split, isNotNil, either, isNil, values, equals, includes, __, curry, assoc, prop, dissoc, mergeAll, reduce, range, reject, filter, pipe, toLower, map } from 'ramda';
10
6
  import { jsx, jsxs } from 'react/jsx-runtime';
7
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
8
+ import { Plus, Mail, Users, Phone, User, MapPinHouse, Text, AlignLeft, Hash, Heading, EyeOff, SquareCheck, CircleDot, ChevronDown, Star as Star$1, Gauge, Binary, MessageSquare, ScrollText, Calendar, Upload, ShieldCheck, MessageSquareText, MapPin } from 'lucide-react';
9
+ import { Q as QUESTION_TYPES, C as CAPTCHA_TYPES } from './constants-BlY0KFT4.js';
10
+ import { compose, isEmpty, trim, useWith, path, split, isNotNil, either, isNil, values, equals, includes, __, curry, assoc, prop, dissoc, mergeAll, reduce, range, reject, filter, pipe, toLower, map } from 'ramda';
11
11
  import { dynamicArray, findBy, toLabelAndValue } from '@bigbinary/neeto-cist';
12
12
  import DOMPurify from 'dompurify';
13
13
  import '@babel/runtime/helpers/typeof';
14
14
  import { isEditorEmpty } from '@bigbinary/neeto-editor/v2/utils';
15
15
  import * as yup from 'yup';
16
16
 
17
- var _path$2, _path2$2;
18
- function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
19
- const SvgConfusedFace = props => /*#__PURE__*/React.createElement("svg", _extends$2({
17
+ var _path$8, _path2$3;
18
+ function _extends$8() { return _extends$8 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$8.apply(null, arguments); }
19
+ const SvgConfusedFace = props => /*#__PURE__*/React.createElement("svg", _extends$8({
20
20
  xmlns: "http://www.w3.org/2000/svg",
21
21
  width: 32,
22
22
  height: 32,
23
23
  fill: "none"
24
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
24
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React.createElement("path", {
25
25
  stroke: "#68737D",
26
26
  strokeLinecap: "round",
27
27
  strokeLinejoin: "round",
28
28
  strokeWidth: 2,
29
29
  d: "M16 4C9.383 4 4 9.383 4 16s5.383 12 12 12 12-5.384 12-12S22.616 4 16 4Z"
30
- })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
30
+ })), _path2$3 || (_path2$3 = /*#__PURE__*/React.createElement("path", {
31
31
  stroke: "#68737D",
32
32
  strokeLinecap: "round",
33
33
  strokeLinejoin: "round",
@@ -35,20 +35,20 @@ const SvgConfusedFace = props => /*#__PURE__*/React.createElement("svg", _extend
35
35
  d: "M20.668 20.918S18.916 22.667 16 22.667c-2.918 0-4.667-1.75-4.667-1.75m9.104-8.25a.333.333 0 1 0 .003.666.333.333 0 0 0-.003-.666Zm-8.918 0a.333.333 0 1 0 .003.666.333.333 0 0 0-.004-.666Z"
36
36
  })));
37
37
 
38
- var _path$1, _path2$1, _path3;
39
- function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
40
- const SvgHappyFace = props => /*#__PURE__*/React.createElement("svg", _extends$1({
38
+ var _path$7, _path2$2, _path3;
39
+ function _extends$7() { return _extends$7 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$7.apply(null, arguments); }
40
+ const SvgHappyFace = props => /*#__PURE__*/React.createElement("svg", _extends$7({
41
41
  xmlns: "http://www.w3.org/2000/svg",
42
42
  width: 32,
43
43
  height: 32,
44
44
  fill: "none"
45
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
45
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React.createElement("path", {
46
46
  stroke: "#68737D",
47
47
  strokeLinecap: "round",
48
48
  strokeLinejoin: "round",
49
49
  strokeWidth: 2,
50
50
  d: "M9.332 13.334c.527-.647 1.247-1.014 2-1.014.753 0 1.453.367 2 1.014m5.333 0c.527-.647 1.247-1.014 2-1.014.754 0 1.454.367 2 1.014"
51
- })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
51
+ })), _path2$2 || (_path2$2 = /*#__PURE__*/React.createElement("path", {
52
52
  stroke: "#68737D",
53
53
  strokeLinecap: "round",
54
54
  strokeLinejoin: "round",
@@ -62,20 +62,20 @@ const SvgHappyFace = props => /*#__PURE__*/React.createElement("svg", _extends$1
62
62
  d: "M20.665 19.584s-1.75 1.75-4.666 1.75c-2.918 0-4.667-1.75-4.667-1.75"
63
63
  })));
64
64
 
65
- var _path, _path2;
66
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
67
- const SvgSadFace = props => /*#__PURE__*/React.createElement("svg", _extends({
65
+ var _path$6, _path2$1;
66
+ function _extends$6() { return _extends$6 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$6.apply(null, arguments); }
67
+ const SvgSadFace = props => /*#__PURE__*/React.createElement("svg", _extends$6({
68
68
  xmlns: "http://www.w3.org/2000/svg",
69
69
  width: 32,
70
70
  height: 32,
71
71
  fill: "none"
72
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
72
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React.createElement("path", {
73
73
  stroke: "#68737D",
74
74
  strokeLinecap: "round",
75
75
  strokeLinejoin: "round",
76
76
  strokeWidth: 2,
77
77
  d: "M20.667 12v1.333m3.818-5.818c4.687 4.686 4.687 12.284 0 16.97-4.686 4.687-12.284 4.687-16.97 0-4.687-4.686-4.687-12.284 0-16.97 4.686-4.687 12.284-4.687 16.97 0v0ZM11.333 12v1.333V12Z"
78
- })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
78
+ })), _path2$1 || (_path2$1 = /*#__PURE__*/React.createElement("path", {
79
79
  stroke: "#68737D",
80
80
  strokeLinecap: "round",
81
81
  strokeLinejoin: "round",
@@ -83,18 +83,18 @@ const SvgSadFace = props => /*#__PURE__*/React.createElement("svg", _extends({
83
83
  d: "M11.332 21.333s1.75-1.749 4.667-1.749 4.666 1.75 4.666 1.75"
84
84
  })));
85
85
 
86
- var _excluded$2 = ["size"],
87
- _excluded2$1 = ["size"],
88
- _excluded3$1 = ["size"],
89
- _excluded4 = ["size"],
90
- _excluded5 = ["size"];
91
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
92
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
86
+ var _excluded$3 = ["size"],
87
+ _excluded2$2 = ["size"],
88
+ _excluded3$2 = ["size"],
89
+ _excluded4$1 = ["size"],
90
+ _excluded5$1 = ["size"];
91
+ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
92
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
93
93
  var Star = function Star(props) {
94
94
  var _props$size = props.size,
95
95
  size = _props$size === void 0 ? 20 : _props$size,
96
- other = _objectWithoutProperties(props, _excluded$2);
97
- return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
96
+ other = _objectWithoutProperties(props, _excluded$3);
97
+ return /*#__PURE__*/jsx("svg", _objectSpread$4(_objectSpread$4({
98
98
  fill: "none",
99
99
  height: size,
100
100
  stroke: "currentColor",
@@ -113,8 +113,8 @@ var Star = function Star(props) {
113
113
  var Heart = function Heart(props) {
114
114
  var _props$size2 = props.size,
115
115
  size = _props$size2 === void 0 ? 20 : _props$size2,
116
- other = _objectWithoutProperties(props, _excluded2$1);
117
- return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
116
+ other = _objectWithoutProperties(props, _excluded2$2);
117
+ return /*#__PURE__*/jsx("svg", _objectSpread$4(_objectSpread$4({
118
118
  fill: "none",
119
119
  height: size,
120
120
  stroke: "currentColor",
@@ -133,8 +133,8 @@ var Heart = function Heart(props) {
133
133
  var Zap = function Zap(props) {
134
134
  var _props$size3 = props.size,
135
135
  size = _props$size3 === void 0 ? 20 : _props$size3,
136
- other = _objectWithoutProperties(props, _excluded3$1);
137
- return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
136
+ other = _objectWithoutProperties(props, _excluded3$2);
137
+ return /*#__PURE__*/jsx("svg", _objectSpread$4(_objectSpread$4({
138
138
  fill: "none",
139
139
  height: size,
140
140
  stroke: "currentColor",
@@ -153,8 +153,8 @@ var Zap = function Zap(props) {
153
153
  var Crown = function Crown(_ref) {
154
154
  var _ref$size = _ref.size,
155
155
  size = _ref$size === void 0 ? 20 : _ref$size,
156
- otherProps = _objectWithoutProperties(_ref, _excluded4);
157
- return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
156
+ otherProps = _objectWithoutProperties(_ref, _excluded4$1);
157
+ return /*#__PURE__*/jsx("svg", _objectSpread$4(_objectSpread$4({
158
158
  fill: "none",
159
159
  height: size,
160
160
  stroke: "currentColor",
@@ -177,8 +177,8 @@ var Crown = function Crown(_ref) {
177
177
  var Trophy = function Trophy(_ref2) {
178
178
  var _ref2$size = _ref2.size,
179
179
  size = _ref2$size === void 0 ? 20 : _ref2$size,
180
- otherProps = _objectWithoutProperties(_ref2, _excluded5);
181
- return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
180
+ otherProps = _objectWithoutProperties(_ref2, _excluded5$1);
181
+ return /*#__PURE__*/jsxs("svg", _objectSpread$4(_objectSpread$4({
182
182
  fill: "none",
183
183
  height: size,
184
184
  stroke: "currentColor",
@@ -228,6 +228,159 @@ var MemoizedZap = /*#__PURE__*/memo(Zap);
228
228
  var MemoizedCrown = /*#__PURE__*/memo(Crown);
229
229
  var MemoizedTrophy = /*#__PURE__*/memo(Trophy);
230
230
 
231
+ var _excluded$2 = ["size"],
232
+ _excluded2$1 = ["size"],
233
+ _excluded3$1 = ["size"],
234
+ _excluded4 = ["size"],
235
+ _excluded5 = ["size"],
236
+ _excluded6 = ["size"];
237
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
238
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
239
+ var ThumbsUp = function ThumbsUp(props) {
240
+ var _props$size = props.size,
241
+ size = _props$size === void 0 ? 20 : _props$size,
242
+ other = _objectWithoutProperties(props, _excluded$2);
243
+ return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
244
+ fill: "none",
245
+ height: size,
246
+ stroke: "currentColor",
247
+ strokeLinecap: "round",
248
+ strokeLinejoin: "round",
249
+ strokeWidth: "2",
250
+ viewBox: "0 0 24 24",
251
+ width: size,
252
+ xmlns: "http://www.w3.org/2000/svg"
253
+ }, other), {}, {
254
+ children: /*#__PURE__*/jsx("path", {
255
+ d: "M14 9V5a3 3 0 00-3-3l-4 9v11h11.28a2 2 0 002-1.7l1.38-9a2 2 0 00-2-2.3zM7 22H4a2 2 0 01-2-2v-7a2 2 0 012-2h3"
256
+ })
257
+ }));
258
+ };
259
+ var ThumbsDown = function ThumbsDown(props) {
260
+ var _props$size2 = props.size,
261
+ size = _props$size2 === void 0 ? 20 : _props$size2,
262
+ other = _objectWithoutProperties(props, _excluded2$1);
263
+ return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
264
+ fill: "none",
265
+ height: size,
266
+ stroke: "currentColor",
267
+ strokeLinecap: "round",
268
+ strokeLinejoin: "round",
269
+ strokeWidth: "2",
270
+ viewBox: "0 0 24 24",
271
+ width: size,
272
+ xmlns: "http://www.w3.org/2000/svg"
273
+ }, other), {}, {
274
+ children: /*#__PURE__*/jsx("path", {
275
+ d: "M10 15v4a3 3 0 003 3l4-9V2H5.72a2 2 0 00-2 1.7l-1.38 9a2 2 0 002 2.3zm7-13h2.67A2.31 2.31 0 0122 4v7a2.31 2.31 0 01-2.33 2H17"
276
+ })
277
+ }));
278
+ };
279
+ var Check = function Check(props) {
280
+ var _props$size3 = props.size,
281
+ size = _props$size3 === void 0 ? 20 : _props$size3,
282
+ other = _objectWithoutProperties(props, _excluded3$1);
283
+ return /*#__PURE__*/jsx("svg", _objectSpread$3(_objectSpread$3({
284
+ fill: "none",
285
+ height: size,
286
+ stroke: "currentColor",
287
+ strokeLinecap: "round",
288
+ strokeLinejoin: "round",
289
+ strokeWidth: "2",
290
+ viewBox: "0 0 24 24",
291
+ width: size,
292
+ xmlns: "http://www.w3.org/2000/svg"
293
+ }, other), {}, {
294
+ children: /*#__PURE__*/jsx("path", {
295
+ d: "M20 6L9 17 4 12"
296
+ })
297
+ }));
298
+ };
299
+ var Close = function Close(props) {
300
+ var _props$size4 = props.size,
301
+ size = _props$size4 === void 0 ? 20 : _props$size4,
302
+ other = _objectWithoutProperties(props, _excluded4);
303
+ return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
304
+ fill: "none",
305
+ height: size,
306
+ stroke: "currentColor",
307
+ strokeLinecap: "round",
308
+ strokeLinejoin: "round",
309
+ strokeWidth: "2",
310
+ viewBox: "0 0 24 24",
311
+ width: size,
312
+ xmlns: "http://www.w3.org/2000/svg"
313
+ }, other), {}, {
314
+ children: [/*#__PURE__*/jsx("path", {
315
+ d: "M18 6L6 18"
316
+ }), /*#__PURE__*/jsx("path", {
317
+ d: "M6 6L18 18"
318
+ })]
319
+ }));
320
+ };
321
+ var HappySmiley = function HappySmiley(props) {
322
+ var _props$size5 = props.size,
323
+ size = _props$size5 === void 0 ? 20 : _props$size5,
324
+ other = _objectWithoutProperties(props, _excluded5);
325
+ return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
326
+ fill: "none",
327
+ height: size,
328
+ stroke: "currentColor",
329
+ strokeLinecap: "round",
330
+ strokeLinejoin: "round",
331
+ strokeWidth: "2",
332
+ viewBox: "0 0 24 24",
333
+ width: size,
334
+ xmlns: "http://www.w3.org/2000/svg"
335
+ }, other), {}, {
336
+ children: [/*#__PURE__*/jsx("circle", {
337
+ cx: "12",
338
+ cy: "12",
339
+ r: "10"
340
+ }), /*#__PURE__*/jsx("path", {
341
+ d: "M8 14s1.5 2 4 2 4-2 4-2"
342
+ }), /*#__PURE__*/jsx("path", {
343
+ d: "M9 9L9.01 9"
344
+ }), /*#__PURE__*/jsx("path", {
345
+ d: "M15 9L15.01 9"
346
+ })]
347
+ }));
348
+ };
349
+ var SadSmiley = function SadSmiley(props) {
350
+ var _props$size6 = props.size,
351
+ size = _props$size6 === void 0 ? 20 : _props$size6,
352
+ other = _objectWithoutProperties(props, _excluded6);
353
+ return /*#__PURE__*/jsxs("svg", _objectSpread$3(_objectSpread$3({
354
+ fill: "none",
355
+ height: size,
356
+ stroke: "currentColor",
357
+ strokeLinecap: "round",
358
+ strokeLinejoin: "round",
359
+ strokeWidth: "2",
360
+ viewBox: "0 0 24 24",
361
+ width: size,
362
+ xmlns: "http://www.w3.org/2000/svg"
363
+ }, other), {}, {
364
+ children: [/*#__PURE__*/jsx("circle", {
365
+ cx: "12",
366
+ cy: "12",
367
+ r: "10"
368
+ }), /*#__PURE__*/jsx("path", {
369
+ d: "M16 16s-1.5-2-4-2-4 2-4 2"
370
+ }), /*#__PURE__*/jsx("path", {
371
+ d: "M9 9L9.01 9"
372
+ }), /*#__PURE__*/jsx("path", {
373
+ d: "M15 9L15.01 9"
374
+ })]
375
+ }));
376
+ };
377
+ var MemoizedThumbsUp = /*#__PURE__*/memo(ThumbsUp);
378
+ var MemoizedThumbsDown = /*#__PURE__*/memo(ThumbsDown);
379
+ var MemoizedCheck = /*#__PURE__*/memo(Check);
380
+ var MemoizedClose = /*#__PURE__*/memo(Close);
381
+ var MemoizedHappySmiley = /*#__PURE__*/memo(HappySmiley);
382
+ var MemoizedSadSmiley = /*#__PURE__*/memo(SadSmiley);
383
+
231
384
  var QUESTION_KIND = {
232
385
  TEXT: {
233
386
  value: "text"
@@ -269,6 +422,9 @@ var QUESTION_KIND = {
269
422
  OPINION_SCALE: {
270
423
  value: "opinion_scale"
271
424
  },
425
+ YES_NO: {
426
+ value: "yes_no"
427
+ },
272
428
  TERMS: {
273
429
  value: "termsandcondition",
274
430
  type: "checkbox"
@@ -352,6 +508,33 @@ var ICONS_MAP = {
352
508
  trophy: MemoizedTrophy,
353
509
  zap: MemoizedZap
354
510
  };
511
+ var YES_NO_VALUES = {
512
+ YES: {
513
+ label: t("neetoForm.common.yes"),
514
+ value: "Yes"
515
+ },
516
+ NO: {
517
+ label: t("neetoForm.common.no"),
518
+ value: "No"
519
+ }
520
+ };
521
+
522
+ // Keys mirror YES_NO_ICONS in BuildForm/Questions/Fields/constants. Importing it
523
+ // here would close a cycle: BuildForm/index -> ExternalForm/constants -> BuildForm.
524
+ var YES_NO_DISPLAY_ICONS_MAP = {
525
+ thumbs: {
526
+ Yes: MemoizedThumbsUp,
527
+ No: MemoizedThumbsDown
528
+ },
529
+ check: {
530
+ Yes: MemoizedCheck,
531
+ No: MemoizedClose
532
+ },
533
+ emoji: {
534
+ Yes: MemoizedHappySmiley,
535
+ No: MemoizedSadSmiley
536
+ }
537
+ };
355
538
  var EMAIL_REGEX = new RegExp("^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,}$", "i");
356
539
  var SIX_DIGIT_NUMBER_REGEX = /^\d{6}$/;
357
540
  var PARENTHESES_REGEX = /[()]/g;
@@ -421,6 +604,90 @@ var DEFAULT_ADVANCED_FEATURES = {
421
604
  };
422
605
  var MINIMUM_ADDRESS_FIELDS = 2;
423
606
 
607
+ var _path$5;
608
+ function _extends$5() { return _extends$5 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$5.apply(null, arguments); }
609
+ const SvgCheck = props => /*#__PURE__*/React.createElement("svg", _extends$5({
610
+ xmlns: "http://www.w3.org/2000/svg",
611
+ width: 16,
612
+ height: 16,
613
+ fill: "none"
614
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React.createElement("path", {
615
+ fill: "currentColor",
616
+ d: "M5.876 10.568 3.11 7.804l-.942.942 3.707 3.698 7.955-7.956-.942-.933-7.013 7.013Z"
617
+ })));
618
+
619
+ var _path$4;
620
+ function _extends$4() { return _extends$4 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$4.apply(null, arguments); }
621
+ const SvgClose = props => /*#__PURE__*/React.createElement("svg", _extends$4({
622
+ xmlns: "http://www.w3.org/2000/svg",
623
+ width: 16,
624
+ height: 16,
625
+ fill: "none"
626
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React.createElement("path", {
627
+ fill: "currentColor",
628
+ d: "m12.915 4.026-.942-.942L8 7.057 4.026 3.084l-.942.942L7.057 8l-3.973 3.973.942.942L8 8.942l3.973 3.973.942-.942L8.942 8l3.973-3.974Z"
629
+ })));
630
+
631
+ var _path$3;
632
+ function _extends$3() { return _extends$3 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$3.apply(null, arguments); }
633
+ const SvgNeutral = props => /*#__PURE__*/React.createElement("svg", _extends$3({
634
+ xmlns: "http://www.w3.org/2000/svg",
635
+ width: 16,
636
+ height: 16,
637
+ fill: "none"
638
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React.createElement("path", {
639
+ stroke: "currentColor",
640
+ strokeLinecap: "round",
641
+ strokeLinejoin: "round",
642
+ strokeWidth: 1.5,
643
+ d: "M8 14.667A6.667 6.667 0 1 0 8 1.334a6.667 6.667 0 0 0 0 13.333ZM5.333 10h5.333M6 6h.007M10 6h.007"
644
+ })));
645
+
646
+ var _path$2, _path2;
647
+ function _extends$2() { return _extends$2 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$2.apply(null, arguments); }
648
+ const SvgSmile = props => /*#__PURE__*/React.createElement("svg", _extends$2({
649
+ xmlns: "http://www.w3.org/2000/svg",
650
+ width: 16,
651
+ height: 16,
652
+ fill: "none"
653
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React.createElement("path", {
654
+ stroke: "currentColor",
655
+ strokeLinecap: "round",
656
+ strokeLinejoin: "round",
657
+ strokeWidth: 1.5,
658
+ d: "M8 14.667A6.667 6.667 0 1 0 8 1.334a6.667 6.667 0 0 0 0 13.333Z"
659
+ })), _path2 || (_path2 = /*#__PURE__*/React.createElement("path", {
660
+ stroke: "currentColor",
661
+ strokeLinecap: "round",
662
+ strokeLinejoin: "round",
663
+ strokeWidth: 1.5,
664
+ d: "M5.333 9.334s1 1.333 2.667 1.333c1.666 0 2.666-1.333 2.666-1.333M6 6h.007M10 6h.007"
665
+ })));
666
+
667
+ var _path$1;
668
+ function _extends$1() { return _extends$1 = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends$1.apply(null, arguments); }
669
+ const SvgThumbDown = props => /*#__PURE__*/React.createElement("svg", _extends$1({
670
+ xmlns: "http://www.w3.org/2000/svg",
671
+ width: 16,
672
+ height: 16,
673
+ fill: "none"
674
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React.createElement("path", {
675
+ fill: "currentColor",
676
+ d: "M10 2H4c-.553 0-1.026.333-1.226.813L.76 7.513C.7 7.667.667 7.827.667 8v1.273l.007.007-.007.053c0 .734.6 1.334 1.333 1.334h4.207l-.633 3.046-.02.214c0 .273.113.526.293.706l.707.7 4.393-4.393c.24-.24.387-.573.387-.94V3.333C11.334 2.6 10.734 2 10 2Zm2.667 0v8h2.667V2h-2.667Z"
677
+ })));
678
+
679
+ var _path;
680
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
681
+ const SvgThumbUp = props => /*#__PURE__*/React.createElement("svg", _extends({
682
+ xmlns: "http://www.w3.org/2000/svg",
683
+ width: 16,
684
+ height: 16,
685
+ fill: "none"
686
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
687
+ fill: "currentColor",
688
+ d: "M.667 14h2.667V6H.667v8Zm14.667-7.334c0-.733-.6-1.333-1.334-1.333H9.794l.633-3.047.02-.213c0-.274-.113-.527-.293-.707l-.707-.7L5.06 5.059c-.246.24-.393.574-.393.94v6.667c0 .733.6 1.333 1.333 1.333h6c.554 0 1.027-.333 1.227-.813l2.013-4.7c.06-.153.094-.313.094-.487V6.726l-.007-.007.007-.053Z"
689
+ })));
690
+
424
691
  var _excluded$1 = ["size", "color"],
425
692
  _excluded2 = ["size", "color"],
426
693
  _excluded3 = ["size", "color"];
@@ -759,6 +1026,24 @@ var DEFAULT_ADDRESS_FIELDS = [{
759
1026
  }, {
760
1027
  label: t("neetoForm.questions.address.defaultFields.postalZipCode")
761
1028
  }];
1029
+ var YES_NO_ICONS = {
1030
+ THUMBS: "thumbs",
1031
+ CHECK: "check",
1032
+ EMOJI: "emoji"
1033
+ };
1034
+
1035
+ // Small filled glyphs for the builder swatches; the rendered form uses the
1036
+ // stroked YES_NO_DISPLAY_ICONS_MAP in ExternalForm/constants.
1037
+ var YES_NO_ICONS_MAP = _defineProperty(_defineProperty(_defineProperty({}, YES_NO_ICONS.THUMBS, {
1038
+ Yes: SvgThumbUp,
1039
+ No: SvgThumbDown
1040
+ }), YES_NO_ICONS.CHECK, {
1041
+ Yes: SvgCheck,
1042
+ No: SvgClose
1043
+ }), YES_NO_ICONS.EMOJI, {
1044
+ Yes: SvgSmile,
1045
+ No: SvgNeutral
1046
+ });
762
1047
  var MIN_WORDS_SWITCH_LABEL_PROPS = {
763
1048
  helpIconProps: {
764
1049
  "data-testid": "min-words-help-popover-button",
@@ -793,7 +1078,8 @@ var NAME = QUESTION_TYPES.NAME,
793
1078
  CAPTCHA = QUESTION_TYPES.CAPTCHA,
794
1079
  SMS_REMINDER = QUESTION_TYPES.SMS_REMINDER,
795
1080
  SPOT = QUESTION_TYPES.SPOT,
796
- ADDRESS = QUESTION_TYPES.ADDRESS;
1081
+ ADDRESS = QUESTION_TYPES.ADDRESS,
1082
+ YES_NO = QUESTION_TYPES.YES_NO;
797
1083
  var PARAGRAPH_SEARCH_ALIASES = t("neetoForm.questionAliases.def").split(",").map(function (alias) {
798
1084
  return alias.trim().toLowerCase();
799
1085
  });
@@ -944,6 +1230,17 @@ var QUESTION_KINDS = [{
944
1230
  label: "",
945
1231
  isRequired: true
946
1232
  }, OPINION_SCALE_DEFAULT_VALUES)
1233
+ }, {
1234
+ type: YES_NO,
1235
+ label: t("neetoForm.fields.yesNo"),
1236
+ icon: Binary,
1237
+ isSingular: false,
1238
+ defaults: {
1239
+ label: "",
1240
+ isRequired: true,
1241
+ isIconEnabled: false,
1242
+ iconType: YES_NO_ICONS.EMOJI
1243
+ }
947
1244
  }, {
948
1245
  type: RATING,
949
1246
  label: t("neetoForm.fields.fbf"),
@@ -1050,5 +1347,5 @@ yup.addMethod(yup.array, "unique", function () {
1050
1347
  });
1051
1348
  });
1052
1349
 
1053
- export { FILE_GROUPS as $, ADDRESS_FIELD_TYPES as A, buildAddQuestionButtonProps as B, CALLOUT_POSITIONS as C, DEFAULT_CHOICE_QUESTION_ATTRIBUTES as D, EMAIL_REGEX as E, validateEditorContent as F, FIELD_CODES_REJECT_CHARS_REGEX as G, MIN_WORDS as H, ICONS_MAP as I, isImmutableField as J, NON_HIDEABLE_FIELDS as K, LAST_ELEMENTS_THRESHOLD as L, MIN_WORDS_SWITCH_LABEL_PROPS as M, NON_BASIC_LATIN_CHARACTERS_REGEX as N, NON_READ_ONLY_FIELDS as O, PARENTHESES_REGEX as P, QUESTION_KIND as Q, RATING_VALUES as R, SPOT_QUESTION_DEFAULT_VALUE as S, OPINION_LABEL_MAX_LENGTH as T, RICH_TEXT_QUESTIONS as U, generateDefaultOptions as V, MINIMUM_ADDRESS_FIELDS as W, getDeletedRecords as X, randomId as Y, getActiveRecords as Z, FILE_TYPES_MAP as _, QUESTIONS_WITHOUT_FIELD_CODE as a, OPINION_SCALE_MIN_VALUE_OPTIONS as a0, OPINION_SCALE_MAX_VALUE_OPTIONS as a1, MINIMUM_OPTIONS as a2, IMAGE_HEIGHT_SLIDER_DEFAULTS as a3, RATING_OPTIONS as a4, STAR_RATING_MIN_VALUE_OPTIONS as a5, STAR_RATING_MAX_VALUE_OPTIONS as a6, STAR_RATING_ICONS_MAP as a7, buildDisabledAddButtonHelpPopoverProps as a8, buildReorderPayload as a9, QUESTIONS_INITIAL_VALUE as aa, isMandatoryField as ab, QUESTION_KINDS as ac, getActiveQuestionKindDetails as ad, DEFAULT_AVAILABLE_LANGUAGES as ae, DEFAULT_ADVANCED_FEATURES as af, CALLOUT_STYLES as b, isFunction as c, isEmptyValues as d, SCHEMA_LESS_QUESTION_KINDS as e, SIX_DIGIT_NUMBER_REGEX as f, fieldWithFallback as g, ADDRESS_FIELD_WIDTHS as h, isBlank as i, LABEL_FIELDS as j, generateArray as k, RADIO_DESELECT_KEYS as l, RATING_OPTIONS$1 as m, QUESTION_ACTIONS as n, INDEPENDENT_LABELS_MAP as o, parseServerError as p, buildDisplayLabel as q, isElementOverflowing as r, SELECTABLE_KINDS as s, isAutoGeneratedQuestion as t, isRichTextQuestion as u, SPOT_QUESTION_FIELD_CODE as v, isNameQuestion as w, RESERVED_FIELD_CODES as x, renameKey as y, isDefaultLanguage as z };
1054
- //# sourceMappingURL=yup-eUr74YY2.js.map
1350
+ export { getActiveRecords as $, ADDRESS_FIELD_TYPES as A, isDefaultLanguage as B, CALLOUT_POSITIONS as C, DEFAULT_CHOICE_QUESTION_ATTRIBUTES as D, EMAIL_REGEX as E, buildAddQuestionButtonProps as F, validateEditorContent as G, FIELD_CODES_REJECT_CHARS_REGEX as H, ICONS_MAP as I, MIN_WORDS as J, isImmutableField as K, LAST_ELEMENTS_THRESHOLD as L, MIN_WORDS_SWITCH_LABEL_PROPS as M, NON_BASIC_LATIN_CHARACTERS_REGEX as N, NON_HIDEABLE_FIELDS as O, PARENTHESES_REGEX as P, QUESTION_KIND as Q, RATING_VALUES as R, SPOT_QUESTION_DEFAULT_VALUE as S, NON_READ_ONLY_FIELDS as T, OPINION_LABEL_MAX_LENGTH as U, RICH_TEXT_QUESTIONS as V, generateDefaultOptions as W, MINIMUM_ADDRESS_FIELDS as X, YES_NO_VALUES as Y, getDeletedRecords as Z, randomId as _, QUESTIONS_WITHOUT_FIELD_CODE as a, FILE_TYPES_MAP as a0, FILE_GROUPS as a1, OPINION_SCALE_MIN_VALUE_OPTIONS as a2, OPINION_SCALE_MAX_VALUE_OPTIONS as a3, MINIMUM_OPTIONS as a4, IMAGE_HEIGHT_SLIDER_DEFAULTS as a5, RATING_OPTIONS as a6, STAR_RATING_MIN_VALUE_OPTIONS as a7, STAR_RATING_MAX_VALUE_OPTIONS as a8, STAR_RATING_ICONS_MAP as a9, YES_NO_ICONS_MAP as aa, buildDisabledAddButtonHelpPopoverProps as ab, buildReorderPayload as ac, QUESTIONS_INITIAL_VALUE as ad, isMandatoryField as ae, QUESTION_KINDS as af, getActiveQuestionKindDetails as ag, DEFAULT_AVAILABLE_LANGUAGES as ah, DEFAULT_ADVANCED_FEATURES as ai, CALLOUT_STYLES as b, isFunction as c, isEmptyValues as d, SCHEMA_LESS_QUESTION_KINDS as e, SIX_DIGIT_NUMBER_REGEX as f, fieldWithFallback as g, ADDRESS_FIELD_WIDTHS as h, isBlank as i, LABEL_FIELDS as j, generateArray as k, RADIO_DESELECT_KEYS as l, RATING_OPTIONS$1 as m, YES_NO_DISPLAY_ICONS_MAP as n, QUESTION_ACTIONS as o, parseServerError as p, INDEPENDENT_LABELS_MAP as q, buildDisplayLabel as r, isElementOverflowing as s, SELECTABLE_KINDS as t, isAutoGeneratedQuestion as u, isRichTextQuestion as v, SPOT_QUESTION_FIELD_CODE as w, isNameQuestion as x, RESERVED_FIELD_CODES as y, renameKey as z };
1351
+ //# sourceMappingURL=yup-Cf-x7SqN.js.map