@bigbinary/neeto-form-frontend 2.1.0 → 2.1.1
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 +165 -144
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +166 -145
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -458,7 +458,7 @@ var RATING_VALUES = {
|
|
|
458
458
|
}
|
|
459
459
|
};
|
|
460
460
|
var SCHEMA_LESS_QUESTION_KINDS = [QUESTION_KIND.PARAGRAPH.value];
|
|
461
|
-
var RATING_OPTIONS = [{
|
|
461
|
+
var RATING_OPTIONS$1 = [{
|
|
462
462
|
icon: SvgHappyFace,
|
|
463
463
|
modifier: "happy",
|
|
464
464
|
value: RATING_VALUES.GOOD.value
|
|
@@ -975,6 +975,121 @@ var useBuildFormState = function useBuildFormState() {
|
|
|
975
975
|
return useBuildFormStore(ramda.prop("formState"));
|
|
976
976
|
};
|
|
977
977
|
|
|
978
|
+
var _excluded$c = ["size", "color"],
|
|
979
|
+
_excluded2 = ["size", "color"],
|
|
980
|
+
_excluded3 = ["size", "color"],
|
|
981
|
+
_excluded4 = ["size", "color"];
|
|
982
|
+
function ownKeys$y(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; }
|
|
983
|
+
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
984
|
+
var BadSmiley = function BadSmiley(props) {
|
|
985
|
+
var size = props.size,
|
|
986
|
+
color = props.color,
|
|
987
|
+
other = _objectWithoutProperties__default["default"](props, _excluded$c);
|
|
988
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
989
|
+
fill: "none",
|
|
990
|
+
height: size,
|
|
991
|
+
viewBox: "0 0 48 48",
|
|
992
|
+
width: size
|
|
993
|
+
}, other), {}, {
|
|
994
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
995
|
+
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24c13.234 0 24-10.767 24-24S37.234 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.082 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
996
|
+
fill: color
|
|
997
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
998
|
+
d: "M18.783 19.826a3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.131 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13zm-4.174 0c0-.575.468-1.044 1.043-1.044s1.044.469 1.044 1.044c0 .575-.469 1.043-1.044 1.043a1.045 1.045 0 01-1.043-1.043zm17.739-3.13a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.173a1.045 1.045 0 010-2.087 1.045 1.045 0 010 2.087zM24 29.218a13.677 13.677 0 00-10.168 4.52 1.043 1.043 0 101.553 1.394A11.587 11.587 0 0124 31.305c3.3 0 6.44 1.394 8.614 3.826a1.045 1.045 0 001.473.082 1.044 1.044 0 00.082-1.473c-2.57-2.874-6.277-4.523-10.169-4.523z",
|
|
999
|
+
fill: color
|
|
1000
|
+
})]
|
|
1001
|
+
}));
|
|
1002
|
+
};
|
|
1003
|
+
BadSmiley.defaultProps = {
|
|
1004
|
+
color: "currentColor",
|
|
1005
|
+
size: 24,
|
|
1006
|
+
strokeWidth: "1.5"
|
|
1007
|
+
};
|
|
1008
|
+
var OkaySmiley = function OkaySmiley(props) {
|
|
1009
|
+
var size = props.size,
|
|
1010
|
+
color = props.color,
|
|
1011
|
+
other = _objectWithoutProperties__default["default"](props, _excluded2);
|
|
1012
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1013
|
+
fill: "none",
|
|
1014
|
+
height: size,
|
|
1015
|
+
viewBox: "0 0 48 48",
|
|
1016
|
+
width: size
|
|
1017
|
+
}, other), {}, {
|
|
1018
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1019
|
+
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24 24-10.767 24-24S37.233 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.084 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
1020
|
+
fill: color
|
|
1021
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1022
|
+
d: "M15.652 22.956a3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13zm0-4.174c.575 0 1.044.469 1.044 1.044 0 .575-.469 1.043-1.044 1.043a1.045 1.045 0 01-1.043-1.043c0-.575.468-1.044 1.043-1.044zm16.696-2.086a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.173a1.045 1.045 0 01-1.044-1.043c0-.575.469-1.044 1.044-1.044a1.044 1.044 0 010 2.087zm2.087 8.349h-20.87a1.044 1.044 0 000 2.086h20.87a1.044 1.044 0 000-2.086z",
|
|
1023
|
+
fill: color
|
|
1024
|
+
})]
|
|
1025
|
+
}));
|
|
1026
|
+
};
|
|
1027
|
+
OkaySmiley.defaultProps = {
|
|
1028
|
+
color: "currentColor",
|
|
1029
|
+
size: 24,
|
|
1030
|
+
strokeWidth: "1.5"
|
|
1031
|
+
};
|
|
1032
|
+
var GoodSmiley = function GoodSmiley(props) {
|
|
1033
|
+
var size = props.size,
|
|
1034
|
+
color = props.color,
|
|
1035
|
+
other = _objectWithoutProperties__default["default"](props, _excluded3);
|
|
1036
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1037
|
+
fill: "none",
|
|
1038
|
+
height: size,
|
|
1039
|
+
viewBox: "0 0 48 48",
|
|
1040
|
+
width: size
|
|
1041
|
+
}, other), {}, {
|
|
1042
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1043
|
+
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24 24-10.767 24-24S37.233 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.084 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
1044
|
+
fill: color
|
|
1045
|
+
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1046
|
+
d: "M18.783 19.826a3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.131 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13zm-4.174 0a1.044 1.044 0 012.087 0c0 .575-.469 1.044-1.044 1.044a1.045 1.045 0 01-1.043-1.044zm17.739-3.13a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.174a1.045 1.045 0 01-1.044-1.044 1.044 1.044 0 111.044 1.044zm.265 8.695c-2.175 2.432-5.314 3.826-8.613 3.826a11.59 11.59 0 01-8.615-3.827 1.043 1.043 0 10-1.553 1.394A13.677 13.677 0 0024 35.478c3.892 0 7.599-1.648 10.17-4.521a1.043 1.043 0 10-1.557-1.392z",
|
|
1047
|
+
fill: color
|
|
1048
|
+
})]
|
|
1049
|
+
}));
|
|
1050
|
+
};
|
|
1051
|
+
GoodSmiley.defaultProps = {
|
|
1052
|
+
color: "currentColor",
|
|
1053
|
+
size: 24,
|
|
1054
|
+
strokeWidth: "1.5"
|
|
1055
|
+
};
|
|
1056
|
+
var Drag = function Drag(props) {
|
|
1057
|
+
var size = props.size,
|
|
1058
|
+
color = props.color,
|
|
1059
|
+
other = _objectWithoutProperties__default["default"](props, _excluded4);
|
|
1060
|
+
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1061
|
+
fill: "none",
|
|
1062
|
+
height: size,
|
|
1063
|
+
viewBox: "0 0 24 24",
|
|
1064
|
+
width: size
|
|
1065
|
+
}, other), {}, {
|
|
1066
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1067
|
+
clipPath: "url(#clip0_6290_43)",
|
|
1068
|
+
fill: color,
|
|
1069
|
+
stroke: color,
|
|
1070
|
+
strokeLinecap: "round",
|
|
1071
|
+
strokeLinejoin: "round",
|
|
1072
|
+
strokeWidth: "1.5",
|
|
1073
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1074
|
+
d: "M8 12a1 1 0 102 0 1 1 0 00-2 0zM8 18a1 1 0 102 0 1 1 0 00-2 0zM8 6a1 1 0 102 0 1 1 0 00-2 0zM14 12a1 1 0 102 0 1 1 0 00-2 0zM14 18a1 1 0 102 0 1 1 0 00-2 0zM14 6a1 1 0 102 0 1 1 0 00-2 0z"
|
|
1075
|
+
})
|
|
1076
|
+
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
1077
|
+
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
1078
|
+
id: "clip0_6290_43",
|
|
1079
|
+
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1080
|
+
d: "M0 0H24V24H0z",
|
|
1081
|
+
fill: color
|
|
1082
|
+
})
|
|
1083
|
+
})
|
|
1084
|
+
})]
|
|
1085
|
+
}));
|
|
1086
|
+
};
|
|
1087
|
+
Drag.defaultProps = {
|
|
1088
|
+
color: "currentColor",
|
|
1089
|
+
size: 24,
|
|
1090
|
+
strokeWidth: "1.5"
|
|
1091
|
+
};
|
|
1092
|
+
|
|
978
1093
|
var getActiveQuestionKindDetails = function getActiveQuestionKindDetails(_ref) {
|
|
979
1094
|
var allQuestionKinds = _ref.allQuestionKinds,
|
|
980
1095
|
item = _ref.item;
|
|
@@ -1031,6 +1146,19 @@ var FILE_GROUPS = [{
|
|
|
1031
1146
|
label: i18next.t("neetoForm.fileTypes.audioVideo"),
|
|
1032
1147
|
name: FILE_TYPES.AUDIO_VIDEO
|
|
1033
1148
|
}];
|
|
1149
|
+
var RATING_OPTIONS = [{
|
|
1150
|
+
icon: GoodSmiley,
|
|
1151
|
+
name: "highestRatingLabel",
|
|
1152
|
+
color: "#00ba88"
|
|
1153
|
+
}, {
|
|
1154
|
+
icon: OkaySmiley,
|
|
1155
|
+
name: "averageRatingLabel",
|
|
1156
|
+
color: "#f3cd82"
|
|
1157
|
+
}, {
|
|
1158
|
+
icon: BadSmiley,
|
|
1159
|
+
name: "lowestRatingLabel",
|
|
1160
|
+
color: "#f56a58"
|
|
1161
|
+
}];
|
|
1034
1162
|
|
|
1035
1163
|
var NAME$1 = QUESTION_TYPES.NAME,
|
|
1036
1164
|
PHONE$1 = QUESTION_TYPES.PHONE,
|
|
@@ -1389,121 +1517,6 @@ var Overview = function Overview(_ref) {
|
|
|
1389
1517
|
});
|
|
1390
1518
|
};
|
|
1391
1519
|
|
|
1392
|
-
var _excluded$c = ["size", "color"],
|
|
1393
|
-
_excluded2 = ["size", "color"],
|
|
1394
|
-
_excluded3 = ["size", "color"],
|
|
1395
|
-
_excluded4 = ["size", "color"];
|
|
1396
|
-
function ownKeys$y(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; }
|
|
1397
|
-
function _objectSpread$y(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$y(Object(t), !0).forEach(function (r) { _defineProperty__default["default"](e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$y(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1398
|
-
var BadSmiley = function BadSmiley(props) {
|
|
1399
|
-
var size = props.size,
|
|
1400
|
-
color = props.color,
|
|
1401
|
-
other = _objectWithoutProperties__default["default"](props, _excluded$c);
|
|
1402
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1403
|
-
fill: "none",
|
|
1404
|
-
height: size,
|
|
1405
|
-
viewBox: "0 0 48 48",
|
|
1406
|
-
width: size
|
|
1407
|
-
}, other), {}, {
|
|
1408
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1409
|
-
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24c13.234 0 24-10.767 24-24S37.234 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.082 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
1410
|
-
fill: color
|
|
1411
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1412
|
-
d: "M18.783 19.826a3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.131 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13zm-4.174 0c0-.575.468-1.044 1.043-1.044s1.044.469 1.044 1.044c0 .575-.469 1.043-1.044 1.043a1.045 1.045 0 01-1.043-1.043zm17.739-3.13a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.173a1.045 1.045 0 010-2.087 1.045 1.045 0 010 2.087zM24 29.218a13.677 13.677 0 00-10.168 4.52 1.043 1.043 0 101.553 1.394A11.587 11.587 0 0124 31.305c3.3 0 6.44 1.394 8.614 3.826a1.045 1.045 0 001.473.082 1.044 1.044 0 00.082-1.473c-2.57-2.874-6.277-4.523-10.169-4.523z",
|
|
1413
|
-
fill: color
|
|
1414
|
-
})]
|
|
1415
|
-
}));
|
|
1416
|
-
};
|
|
1417
|
-
BadSmiley.defaultProps = {
|
|
1418
|
-
color: "currentColor",
|
|
1419
|
-
size: 24,
|
|
1420
|
-
strokeWidth: "1.5"
|
|
1421
|
-
};
|
|
1422
|
-
var OkaySmiley = function OkaySmiley(props) {
|
|
1423
|
-
var size = props.size,
|
|
1424
|
-
color = props.color,
|
|
1425
|
-
other = _objectWithoutProperties__default["default"](props, _excluded2);
|
|
1426
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1427
|
-
fill: "none",
|
|
1428
|
-
height: size,
|
|
1429
|
-
viewBox: "0 0 48 48",
|
|
1430
|
-
width: size
|
|
1431
|
-
}, other), {}, {
|
|
1432
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1433
|
-
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24 24-10.767 24-24S37.233 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.084 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
1434
|
-
fill: color
|
|
1435
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1436
|
-
d: "M15.652 22.956a3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13zm0-4.174c.575 0 1.044.469 1.044 1.044 0 .575-.469 1.043-1.044 1.043a1.045 1.045 0 01-1.043-1.043c0-.575.468-1.044 1.043-1.044zm16.696-2.086a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.173a1.045 1.045 0 01-1.044-1.043c0-.575.469-1.044 1.044-1.044a1.044 1.044 0 010 2.087zm2.087 8.349h-20.87a1.044 1.044 0 000 2.086h20.87a1.044 1.044 0 000-2.086z",
|
|
1437
|
-
fill: color
|
|
1438
|
-
})]
|
|
1439
|
-
}));
|
|
1440
|
-
};
|
|
1441
|
-
OkaySmiley.defaultProps = {
|
|
1442
|
-
color: "currentColor",
|
|
1443
|
-
size: 24,
|
|
1444
|
-
strokeWidth: "1.5"
|
|
1445
|
-
};
|
|
1446
|
-
var GoodSmiley = function GoodSmiley(props) {
|
|
1447
|
-
var size = props.size,
|
|
1448
|
-
color = props.color,
|
|
1449
|
-
other = _objectWithoutProperties__default["default"](props, _excluded3);
|
|
1450
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1451
|
-
fill: "none",
|
|
1452
|
-
height: size,
|
|
1453
|
-
viewBox: "0 0 48 48",
|
|
1454
|
-
width: size
|
|
1455
|
-
}, other), {}, {
|
|
1456
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1457
|
-
d: "M24 0C10.767 0 0 10.767 0 24s10.767 24 24 24 24-10.767 24-24S37.233 0 24 0zm0 45.913c-12.084 0-21.913-9.83-21.913-21.913 0-12.084 9.83-21.913 21.913-21.913 12.084 0 21.913 9.83 21.913 21.913 0 12.084-9.83 21.913-21.913 21.913z",
|
|
1458
|
-
fill: color
|
|
1459
|
-
}), /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1460
|
-
d: "M18.783 19.826a3.134 3.134 0 00-3.13-3.13 3.134 3.134 0 00-3.131 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13zm-4.174 0a1.044 1.044 0 012.087 0c0 .575-.469 1.044-1.044 1.044a1.045 1.045 0 01-1.043-1.044zm17.739-3.13a3.134 3.134 0 00-3.13 3.13 3.134 3.134 0 003.13 3.13 3.134 3.134 0 003.13-3.13 3.134 3.134 0 00-3.13-3.13zm0 4.174a1.045 1.045 0 01-1.044-1.044 1.044 1.044 0 111.044 1.044zm.265 8.695c-2.175 2.432-5.314 3.826-8.613 3.826a11.59 11.59 0 01-8.615-3.827 1.043 1.043 0 10-1.553 1.394A13.677 13.677 0 0024 35.478c3.892 0 7.599-1.648 10.17-4.521a1.043 1.043 0 10-1.557-1.392z",
|
|
1461
|
-
fill: color
|
|
1462
|
-
})]
|
|
1463
|
-
}));
|
|
1464
|
-
};
|
|
1465
|
-
GoodSmiley.defaultProps = {
|
|
1466
|
-
color: "currentColor",
|
|
1467
|
-
size: 24,
|
|
1468
|
-
strokeWidth: "1.5"
|
|
1469
|
-
};
|
|
1470
|
-
var Drag = function Drag(props) {
|
|
1471
|
-
var size = props.size,
|
|
1472
|
-
color = props.color,
|
|
1473
|
-
other = _objectWithoutProperties__default["default"](props, _excluded4);
|
|
1474
|
-
return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
|
|
1475
|
-
fill: "none",
|
|
1476
|
-
height: size,
|
|
1477
|
-
viewBox: "0 0 24 24",
|
|
1478
|
-
width: size
|
|
1479
|
-
}, other), {}, {
|
|
1480
|
-
children: [/*#__PURE__*/jsxRuntime.jsx("g", {
|
|
1481
|
-
clipPath: "url(#clip0_6290_43)",
|
|
1482
|
-
fill: color,
|
|
1483
|
-
stroke: color,
|
|
1484
|
-
strokeLinecap: "round",
|
|
1485
|
-
strokeLinejoin: "round",
|
|
1486
|
-
strokeWidth: "1.5",
|
|
1487
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1488
|
-
d: "M8 12a1 1 0 102 0 1 1 0 00-2 0zM8 18a1 1 0 102 0 1 1 0 00-2 0zM8 6a1 1 0 102 0 1 1 0 00-2 0zM14 12a1 1 0 102 0 1 1 0 00-2 0zM14 18a1 1 0 102 0 1 1 0 00-2 0zM14 6a1 1 0 102 0 1 1 0 00-2 0z"
|
|
1489
|
-
})
|
|
1490
|
-
}), /*#__PURE__*/jsxRuntime.jsx("defs", {
|
|
1491
|
-
children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
|
|
1492
|
-
id: "clip0_6290_43",
|
|
1493
|
-
children: /*#__PURE__*/jsxRuntime.jsx("path", {
|
|
1494
|
-
d: "M0 0H24V24H0z",
|
|
1495
|
-
fill: color
|
|
1496
|
-
})
|
|
1497
|
-
})
|
|
1498
|
-
})]
|
|
1499
|
-
}));
|
|
1500
|
-
};
|
|
1501
|
-
Drag.defaultProps = {
|
|
1502
|
-
color: "currentColor",
|
|
1503
|
-
size: 24,
|
|
1504
|
-
strokeWidth: "1.5"
|
|
1505
|
-
};
|
|
1506
|
-
|
|
1507
1520
|
var validateEditorContent = function validateEditorContent(editorRef) {
|
|
1508
1521
|
return function () {
|
|
1509
1522
|
var _editorRef$current;
|
|
@@ -2149,19 +2162,28 @@ var Form$1 = function Form(_ref) {
|
|
|
2149
2162
|
var shouldShowPlaceholder = ramda.includes(kind, QUESTIONS_WITH_PLACEHOLDERS);
|
|
2150
2163
|
var hasAdditionalData = ramda.includes(kind, QUESTIONS_WITH_ADDITIONAL_DATA);
|
|
2151
2164
|
var shouldShowFieldCode = enableFieldCode && !ramda.includes(kind, QUESTIONS_WITHOUT_FIELD_CODE);
|
|
2152
|
-
var handleKindChange = function handleKindChange(
|
|
2153
|
-
var
|
|
2154
|
-
|
|
2165
|
+
var handleKindChange = function handleKindChange(option) {
|
|
2166
|
+
var data = buildQuestionData(option);
|
|
2167
|
+
updateFormState(data);
|
|
2168
|
+
};
|
|
2169
|
+
var buildQuestionData = function buildQuestionData(option) {
|
|
2170
|
+
if (ramda.isNil(option)) {
|
|
2171
|
+
return INITIAL_VALUES;
|
|
2172
|
+
}
|
|
2173
|
+
var label = option.label,
|
|
2174
|
+
value = option.value;
|
|
2155
2175
|
var kind = extractKindFromOption(value);
|
|
2156
2176
|
var questionKind = getQuestionKind(availableQuestionKinds, {
|
|
2157
2177
|
type: kind,
|
|
2158
2178
|
label: label
|
|
2159
2179
|
});
|
|
2160
|
-
|
|
2180
|
+
return createFieldData({
|
|
2161
2181
|
kind: questionKind,
|
|
2162
2182
|
isRequired: isRequired,
|
|
2163
2183
|
questions: questions
|
|
2164
2184
|
});
|
|
2185
|
+
};
|
|
2186
|
+
var updateFormState = function updateFormState(data) {
|
|
2165
2187
|
setValues(data);
|
|
2166
2188
|
setErrors({});
|
|
2167
2189
|
setTouched({});
|
|
@@ -2409,6 +2431,7 @@ var FileGroup = function FileGroup(_ref) {
|
|
|
2409
2431
|
checked: checked,
|
|
2410
2432
|
label: label,
|
|
2411
2433
|
name: name,
|
|
2434
|
+
"data-cy": "neeto-form-engine-file-type-".concat(name),
|
|
2412
2435
|
id: name,
|
|
2413
2436
|
onChange: handleAllowedFileTypesChange
|
|
2414
2437
|
});
|
|
@@ -2587,6 +2610,7 @@ var Options = function Options(_ref) {
|
|
|
2587
2610
|
var _option$id;
|
|
2588
2611
|
return !option._destroy && /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2589
2612
|
className: "flex items-start gap-1",
|
|
2613
|
+
"data-cy": "neeto-form-engine-option-".concat(index),
|
|
2590
2614
|
children: [/*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
|
|
2591
2615
|
required: true,
|
|
2592
2616
|
disabled: freezeOptions,
|
|
@@ -2615,6 +2639,7 @@ var Options = function Options(_ref) {
|
|
|
2615
2639
|
}), !freezeOptions && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2616
2640
|
className: "mt-3 w-full",
|
|
2617
2641
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
2642
|
+
"data-cy": "neeto-form-engine-add-option-button",
|
|
2618
2643
|
icon: neetoIcons.Plus,
|
|
2619
2644
|
iconPosition: "left",
|
|
2620
2645
|
size: "small",
|
|
@@ -2643,30 +2668,22 @@ var Rating$2 = function Rating() {
|
|
|
2643
2668
|
className: "flex flex-col",
|
|
2644
2669
|
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2645
2670
|
className: "w-full",
|
|
2646
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
2671
|
+
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2647
2672
|
className: "flex gap-6",
|
|
2648
|
-
children:
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
}), /*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
|
|
2663
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(BadSmiley, {
|
|
2664
|
-
color: "#f56a58",
|
|
2665
|
-
size: 48
|
|
2666
|
-
}), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
|
|
2667
|
-
name: "lowestRatingLabel"
|
|
2668
|
-
})]
|
|
2669
|
-
})]
|
|
2673
|
+
children: RATING_OPTIONS.map(function (_ref2) {
|
|
2674
|
+
var Icon = _ref2.icon,
|
|
2675
|
+
name = _ref2.name,
|
|
2676
|
+
color = _ref2.color;
|
|
2677
|
+
return /*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
|
|
2678
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
2679
|
+
color: color,
|
|
2680
|
+
size: 48
|
|
2681
|
+
}), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
|
|
2682
|
+
name: name,
|
|
2683
|
+
"data-cy": "neeto-form-engine-".concat(neetoCist.hyphenate(name))
|
|
2684
|
+
})]
|
|
2685
|
+
}, name);
|
|
2686
|
+
})
|
|
2670
2687
|
})
|
|
2671
2688
|
})
|
|
2672
2689
|
});
|
|
@@ -2687,6 +2704,7 @@ var StarRating$2 = function StarRating() {
|
|
|
2687
2704
|
className: "flex space-x-4",
|
|
2688
2705
|
children: [/*#__PURE__*/jsxRuntime.jsx(Select__default["default"], {
|
|
2689
2706
|
className: "w-1/2",
|
|
2707
|
+
"data-cy": "neeto-form-engine-star-rating-min-value",
|
|
2690
2708
|
label: t("neetoForm.common.start"),
|
|
2691
2709
|
name: "minValue",
|
|
2692
2710
|
options: STAR_RATING_MIN_VALUE_OPTIONS,
|
|
@@ -2695,6 +2713,7 @@ var StarRating$2 = function StarRating() {
|
|
|
2695
2713
|
}
|
|
2696
2714
|
}), /*#__PURE__*/jsxRuntime.jsx(Select__default["default"], {
|
|
2697
2715
|
className: "w-1/2",
|
|
2716
|
+
"data-cy": "neeto-form-engine-star-rating-max-value",
|
|
2698
2717
|
label: t("neetoForm.common.end"),
|
|
2699
2718
|
name: "maxValue",
|
|
2700
2719
|
options: STAR_RATING_MAX_VALUE_OPTIONS,
|
|
@@ -2712,6 +2731,7 @@ var StarRating$2 = function StarRating() {
|
|
|
2712
2731
|
IconType = _ref2[1];
|
|
2713
2732
|
var isActive = name === iconType;
|
|
2714
2733
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2734
|
+
"data-cy": "neeto-form-engine-rating-icon-".concat(name),
|
|
2715
2735
|
className: classnames__default["default"]("flex h-10 w-10 items-center justify-center gap-2", "neeto-ui-border-gray-800 neeto-ui-rounded-full cursor-pointer border", "transition-all duration-300 ease-in-out", {
|
|
2716
2736
|
"neeto-ui-text-gray-800 neeto-ui-bg-gray-200": !isActive,
|
|
2717
2737
|
"neeto-ui-text-white neeto-ui-bg-gray-800": isActive
|
|
@@ -2821,6 +2841,7 @@ var AddQuestion = reactUtils.withT(function (_ref) {
|
|
|
2821
2841
|
content: (disabledAddButtonTooltipProps === null || disabledAddButtonTooltipProps === void 0 ? void 0 : disabledAddButtonTooltipProps.content) || t("neetoForm.questions.common.primaryPanel.noQuestionLeft"),
|
|
2822
2842
|
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
2823
2843
|
children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
|
|
2844
|
+
"data-cy": "neeto-form-engine-add-question",
|
|
2824
2845
|
disabled: isDisabled,
|
|
2825
2846
|
icon: neetoIcons.Plus,
|
|
2826
2847
|
iconPosition: "left",
|
|
@@ -13650,7 +13671,7 @@ var Rating = function Rating(_ref) {
|
|
|
13650
13671
|
};
|
|
13651
13672
|
var render = function render() {
|
|
13652
13673
|
var labels = [highestRatingLabel, averageRatingLabel, lowestRatingLabel];
|
|
13653
|
-
return RATING_OPTIONS.map(function (_ref2, index) {
|
|
13674
|
+
return RATING_OPTIONS$1.map(function (_ref2, index) {
|
|
13654
13675
|
var Icon = _ref2.icon,
|
|
13655
13676
|
modifier = _ref2.modifier,
|
|
13656
13677
|
rating = _ref2.value;
|