@bigbinary/neeto-form-frontend 2.2.0-beta1 → 2.2.0-beta3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -24,7 +24,7 @@ var ActionBlock = require('@bigbinary/neetoui/formik/ActionBlock');
24
24
  var reactI18next = require('react-i18next');
25
25
  var zustand = require('zustand');
26
26
  require('@babel/runtime/helpers/typeof');
27
- var neetoEditor = require('@bigbinary/neeto-editor');
27
+ var utils$1 = require('@bigbinary/neeto-editor/utils');
28
28
  var shallow = require('zustand/shallow');
29
29
  var Alert = require('@bigbinary/neetoui/Alert');
30
30
  var DOMPurify = require('dompurify');
@@ -36,13 +36,15 @@ var Pane = require('@bigbinary/neetoui/Pane');
36
36
  var Form$2 = require('@bigbinary/neetoui/formik/Form');
37
37
  var Select = require('@bigbinary/neetoui/formik/Select');
38
38
  var Textarea = require('@bigbinary/neetoui/formik/Textarea');
39
+ var NeetoEditor = require('@bigbinary/neeto-editor/Editor');
39
40
  var Switch = require('@bigbinary/neetoui/formik/Switch');
40
- var neetoIcons = require('@bigbinary/neeto-icons');
41
41
  var Button$1 = require('@bigbinary/neetoui/Button');
42
+ var Accordion = require('@bigbinary/neetoui/Accordion');
42
43
  var Input = require('@bigbinary/neetoui/formik/Input');
43
44
  var yup = require('yup');
44
45
  var Checkbox$1 = require('@bigbinary/neetoui/formik/Checkbox');
45
46
  var Checkbox = require('@bigbinary/neetoui/Checkbox');
47
+ var neetoIcons = require('@bigbinary/neeto-icons');
46
48
  var Label = require('@bigbinary/neetoui/Label');
47
49
  var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
48
50
  var _regeneratorRuntime = require('@babel/runtime/regenerator');
@@ -51,6 +53,7 @@ var Toastr = require('@bigbinary/neetoui/Toastr');
51
53
  var Spinner$2 = require('@bigbinary/neetoui/Spinner');
52
54
  var dayjs = require('dayjs');
53
55
  var libphonenumberJs = require('libphonenumber-js');
56
+ var EditorContent = require('@bigbinary/neeto-editor/EditorContent');
54
57
  var NeetoUIMultiEmailInput = require('@bigbinary/neetoui/MultiEmailInput');
55
58
  var PhoneNumber = require('@bigbinary/neeto-molecules/PhoneNumber');
56
59
  var localeData = require('dayjs/plugin/localeData');
@@ -107,8 +110,10 @@ var Pane__default = /*#__PURE__*/_interopDefaultLegacy(Pane);
107
110
  var Form__default = /*#__PURE__*/_interopDefaultLegacy(Form$2);
108
111
  var Select__default = /*#__PURE__*/_interopDefaultLegacy(Select);
109
112
  var Textarea__default = /*#__PURE__*/_interopDefaultLegacy(Textarea);
113
+ var NeetoEditor__default = /*#__PURE__*/_interopDefaultLegacy(NeetoEditor);
110
114
  var Switch__default = /*#__PURE__*/_interopDefaultLegacy(Switch);
111
115
  var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button$1);
116
+ var Accordion__default = /*#__PURE__*/_interopDefaultLegacy(Accordion);
112
117
  var Input__default = /*#__PURE__*/_interopDefaultLegacy(Input);
113
118
  var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
114
119
  var Checkbox__default$1 = /*#__PURE__*/_interopDefaultLegacy(Checkbox$1);
@@ -120,6 +125,7 @@ var useHotkeys__default = /*#__PURE__*/_interopDefaultLegacy(useHotkeys);
120
125
  var Toastr__default = /*#__PURE__*/_interopDefaultLegacy(Toastr);
121
126
  var Spinner__default = /*#__PURE__*/_interopDefaultLegacy(Spinner$2);
122
127
  var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
128
+ var EditorContent__default = /*#__PURE__*/_interopDefaultLegacy(EditorContent);
123
129
  var NeetoUIMultiEmailInput__default = /*#__PURE__*/_interopDefaultLegacy(NeetoUIMultiEmailInput);
124
130
  var localeData__default = /*#__PURE__*/_interopDefaultLegacy(localeData);
125
131
  var utc__default = /*#__PURE__*/_interopDefaultLegacy(utc);
@@ -458,7 +464,7 @@ var RATING_VALUES = {
458
464
  }
459
465
  };
460
466
  var SCHEMA_LESS_QUESTION_KINDS = [QUESTION_KIND.PARAGRAPH.value];
461
- var RATING_OPTIONS = [{
467
+ var RATING_OPTIONS$1 = [{
462
468
  icon: SvgHappyFace,
463
469
  modifier: "happy",
464
470
  value: RATING_VALUES.GOOD.value
@@ -623,10 +629,10 @@ var handleQuestionMutationSuccess = function handleQuestionMutationSuccess(_ref)
623
629
  var _args = _slicedToArray__default["default"](args, 1),
624
630
  data = _args[0];
625
631
  queryClient.invalidateQueries({
626
- queryKey: [QUERY_KEYS.QUESTIONS, formId, language]
632
+ queryKey: [QUERY_KEYS.QUESTIONS, formId]
627
633
  });
628
634
  queryClient.invalidateQueries({
629
- queryKey: [QUERY_KEYS.QUESTIONS, "preview/".concat(formId), language]
635
+ queryKey: [QUERY_KEYS.QUESTIONS, "preview/".concat(formId)]
630
636
  });
631
637
  queryClient.setQueryData([QUERY_KEYS.QUESTIONS, formId, language], ramda.assoc("questions", data.questions));
632
638
  queryClient.setQueryData([QUERY_KEYS.QUESTIONS, "preview/".concat(formId), language], ramda.assoc("questions", data.questions));
@@ -950,8 +956,17 @@ var DEFAULT_AVAILABLE_LANGUAGES = [{
950
956
  var QUESTIONS_WITHOUT_FIELD_CODE = [PARAGRAPH$1, TERMS_AND_CONDITION$1, CONDITION$1, FILE_UPLOAD$3];
951
957
  var QUESTIONS_INITIAL_VALUE = {
952
958
  enabled: false,
953
- questions: [],
954
- title: ""
959
+ questions: [{
960
+ label: "",
961
+ kind: "text",
962
+ nodeId: "1"
963
+ }, {
964
+ label: "",
965
+ kind: "email",
966
+ nodeId: "2"
967
+ }],
968
+ title: "",
969
+ isQuestionsLoading: true
955
970
  };
956
971
  var RESERVED_FIELD_CODES = ["month", "date", "time"];
957
972
  var SELECTABLE_KINDS = [RADIO$2, CHECKBOX$2, DROPDOWN$2];
@@ -987,7 +1002,7 @@ var fieldWithFallback = function fieldWithFallback(question, fieldName) {
987
1002
  var hasRichContent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
988
1003
  var fallback = question["".concat(fieldName, "Fallback")];
989
1004
  var field = question[fieldName];
990
- var isFieldEmpty = hasRichContent ? neetoEditor.isEditorEmpty(field) : ramda.isEmpty(field);
1005
+ var isFieldEmpty = hasRichContent ? utils$1.isEditorEmpty(field) : ramda.isEmpty(field);
991
1006
  return isFieldEmpty && ramda.isNotNil(fallback) ? fallback : field;
992
1007
  };
993
1008
  var getComponentDisplayName = function getComponentDisplayName(Component) {
@@ -1020,6 +1035,121 @@ var useBuildFormState = function useBuildFormState() {
1020
1035
  return useBuildFormStore(ramda.prop("formState"));
1021
1036
  };
1022
1037
 
1038
+ var _excluded$c = ["size", "color"],
1039
+ _excluded2 = ["size", "color"],
1040
+ _excluded3 = ["size", "color"],
1041
+ _excluded4 = ["size", "color"];
1042
+ 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; }
1043
+ 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; }
1044
+ var BadSmiley = function BadSmiley(props) {
1045
+ var size = props.size,
1046
+ color = props.color,
1047
+ other = _objectWithoutProperties__default["default"](props, _excluded$c);
1048
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1049
+ fill: "none",
1050
+ height: size,
1051
+ viewBox: "0 0 48 48",
1052
+ width: size
1053
+ }, other), {}, {
1054
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1055
+ 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",
1056
+ fill: color
1057
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
1058
+ 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",
1059
+ fill: color
1060
+ })]
1061
+ }));
1062
+ };
1063
+ BadSmiley.defaultProps = {
1064
+ color: "currentColor",
1065
+ size: 24,
1066
+ strokeWidth: "1.5"
1067
+ };
1068
+ var OkaySmiley = function OkaySmiley(props) {
1069
+ var size = props.size,
1070
+ color = props.color,
1071
+ other = _objectWithoutProperties__default["default"](props, _excluded2);
1072
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1073
+ fill: "none",
1074
+ height: size,
1075
+ viewBox: "0 0 48 48",
1076
+ width: size
1077
+ }, other), {}, {
1078
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1079
+ 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",
1080
+ fill: color
1081
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
1082
+ 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",
1083
+ fill: color
1084
+ })]
1085
+ }));
1086
+ };
1087
+ OkaySmiley.defaultProps = {
1088
+ color: "currentColor",
1089
+ size: 24,
1090
+ strokeWidth: "1.5"
1091
+ };
1092
+ var GoodSmiley = function GoodSmiley(props) {
1093
+ var size = props.size,
1094
+ color = props.color,
1095
+ other = _objectWithoutProperties__default["default"](props, _excluded3);
1096
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1097
+ fill: "none",
1098
+ height: size,
1099
+ viewBox: "0 0 48 48",
1100
+ width: size
1101
+ }, other), {}, {
1102
+ children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1103
+ 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",
1104
+ fill: color
1105
+ }), /*#__PURE__*/jsxRuntime.jsx("path", {
1106
+ 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",
1107
+ fill: color
1108
+ })]
1109
+ }));
1110
+ };
1111
+ GoodSmiley.defaultProps = {
1112
+ color: "currentColor",
1113
+ size: 24,
1114
+ strokeWidth: "1.5"
1115
+ };
1116
+ var Drag = function Drag(props) {
1117
+ var size = props.size,
1118
+ color = props.color,
1119
+ other = _objectWithoutProperties__default["default"](props, _excluded4);
1120
+ return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1121
+ fill: "none",
1122
+ height: size,
1123
+ viewBox: "0 0 24 24",
1124
+ width: size
1125
+ }, other), {}, {
1126
+ children: [/*#__PURE__*/jsxRuntime.jsx("g", {
1127
+ clipPath: "url(#clip0_6290_43)",
1128
+ fill: color,
1129
+ stroke: color,
1130
+ strokeLinecap: "round",
1131
+ strokeLinejoin: "round",
1132
+ strokeWidth: "1.5",
1133
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
1134
+ 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"
1135
+ })
1136
+ }), /*#__PURE__*/jsxRuntime.jsx("defs", {
1137
+ children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
1138
+ id: "clip0_6290_43",
1139
+ children: /*#__PURE__*/jsxRuntime.jsx("path", {
1140
+ d: "M0 0H24V24H0z",
1141
+ fill: color
1142
+ })
1143
+ })
1144
+ })]
1145
+ }));
1146
+ };
1147
+ Drag.defaultProps = {
1148
+ color: "currentColor",
1149
+ size: 24,
1150
+ strokeWidth: "1.5"
1151
+ };
1152
+
1023
1153
  var getActiveQuestionKindDetails = function getActiveQuestionKindDetails(_ref) {
1024
1154
  var allQuestionKinds = _ref.allQuestionKinds,
1025
1155
  item = _ref.item;
@@ -1076,6 +1206,19 @@ var FILE_GROUPS = [{
1076
1206
  label: i18next.t("neetoForm.fileTypes.audioVideo"),
1077
1207
  name: FILE_TYPES.AUDIO_VIDEO
1078
1208
  }];
1209
+ var RATING_OPTIONS = [{
1210
+ icon: GoodSmiley,
1211
+ name: "highestRatingLabel",
1212
+ color: "#00ba88"
1213
+ }, {
1214
+ icon: OkaySmiley,
1215
+ name: "averageRatingLabel",
1216
+ color: "#f3cd82"
1217
+ }, {
1218
+ icon: BadSmiley,
1219
+ name: "lowestRatingLabel",
1220
+ color: "#f56a58"
1221
+ }];
1079
1222
 
1080
1223
  var NAME$1 = QUESTION_TYPES.NAME,
1081
1224
  PHONE$1 = QUESTION_TYPES.PHONE,
@@ -1434,121 +1577,6 @@ var Overview = function Overview(_ref) {
1434
1577
  });
1435
1578
  };
1436
1579
 
1437
- var _excluded$c = ["size", "color"],
1438
- _excluded2 = ["size", "color"],
1439
- _excluded3 = ["size", "color"],
1440
- _excluded4 = ["size", "color"];
1441
- 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; }
1442
- 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; }
1443
- var BadSmiley = function BadSmiley(props) {
1444
- var size = props.size,
1445
- color = props.color,
1446
- other = _objectWithoutProperties__default["default"](props, _excluded$c);
1447
- return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1448
- fill: "none",
1449
- height: size,
1450
- viewBox: "0 0 48 48",
1451
- width: size
1452
- }, other), {}, {
1453
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1454
- 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",
1455
- fill: color
1456
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
1457
- 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",
1458
- fill: color
1459
- })]
1460
- }));
1461
- };
1462
- BadSmiley.defaultProps = {
1463
- color: "currentColor",
1464
- size: 24,
1465
- strokeWidth: "1.5"
1466
- };
1467
- var OkaySmiley = function OkaySmiley(props) {
1468
- var size = props.size,
1469
- color = props.color,
1470
- other = _objectWithoutProperties__default["default"](props, _excluded2);
1471
- return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1472
- fill: "none",
1473
- height: size,
1474
- viewBox: "0 0 48 48",
1475
- width: size
1476
- }, other), {}, {
1477
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1478
- 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",
1479
- fill: color
1480
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
1481
- 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",
1482
- fill: color
1483
- })]
1484
- }));
1485
- };
1486
- OkaySmiley.defaultProps = {
1487
- color: "currentColor",
1488
- size: 24,
1489
- strokeWidth: "1.5"
1490
- };
1491
- var GoodSmiley = function GoodSmiley(props) {
1492
- var size = props.size,
1493
- color = props.color,
1494
- other = _objectWithoutProperties__default["default"](props, _excluded3);
1495
- return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1496
- fill: "none",
1497
- height: size,
1498
- viewBox: "0 0 48 48",
1499
- width: size
1500
- }, other), {}, {
1501
- children: [/*#__PURE__*/jsxRuntime.jsx("path", {
1502
- 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",
1503
- fill: color
1504
- }), /*#__PURE__*/jsxRuntime.jsx("path", {
1505
- 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",
1506
- fill: color
1507
- })]
1508
- }));
1509
- };
1510
- GoodSmiley.defaultProps = {
1511
- color: "currentColor",
1512
- size: 24,
1513
- strokeWidth: "1.5"
1514
- };
1515
- var Drag = function Drag(props) {
1516
- var size = props.size,
1517
- color = props.color,
1518
- other = _objectWithoutProperties__default["default"](props, _excluded4);
1519
- return /*#__PURE__*/jsxRuntime.jsxs("svg", _objectSpread$y(_objectSpread$y({
1520
- fill: "none",
1521
- height: size,
1522
- viewBox: "0 0 24 24",
1523
- width: size
1524
- }, other), {}, {
1525
- children: [/*#__PURE__*/jsxRuntime.jsx("g", {
1526
- clipPath: "url(#clip0_6290_43)",
1527
- fill: color,
1528
- stroke: color,
1529
- strokeLinecap: "round",
1530
- strokeLinejoin: "round",
1531
- strokeWidth: "1.5",
1532
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
1533
- 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"
1534
- })
1535
- }), /*#__PURE__*/jsxRuntime.jsx("defs", {
1536
- children: /*#__PURE__*/jsxRuntime.jsx("clipPath", {
1537
- id: "clip0_6290_43",
1538
- children: /*#__PURE__*/jsxRuntime.jsx("path", {
1539
- d: "M0 0H24V24H0z",
1540
- fill: color
1541
- })
1542
- })
1543
- })]
1544
- }));
1545
- };
1546
- Drag.defaultProps = {
1547
- color: "currentColor",
1548
- size: 24,
1549
- strokeWidth: "1.5"
1550
- };
1551
-
1552
1580
  var validateEditorContent = function validateEditorContent(editorRef) {
1553
1581
  return function () {
1554
1582
  var _editorRef$current;
@@ -2080,7 +2108,7 @@ var Editor = function Editor() {
2080
2108
  });
2081
2109
  return /*#__PURE__*/jsxRuntime.jsx("div", {
2082
2110
  className: "w-full cursor-auto",
2083
- children: /*#__PURE__*/jsxRuntime.jsx(neetoEditor.Editor, {
2111
+ children: /*#__PURE__*/jsxRuntime.jsx(NeetoEditor__default["default"], {
2084
2112
  required: true,
2085
2113
  error: touched ? error : "",
2086
2114
  id: "editor",
@@ -2129,31 +2157,27 @@ var InputWithMaxLength = function InputWithMaxLength(_ref) {
2129
2157
 
2130
2158
  var FieldCode = reactUtils.withT(function (_ref) {
2131
2159
  var t = _ref.t;
2132
- return /*#__PURE__*/jsxRuntime.jsx("div", {
2133
- children: /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2134
- required: true,
2135
- label: t("neetoForm.questions.common.questionFields.field.fieldCode"),
2136
- name: "fieldCode",
2137
- helpText: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
2138
- i18nKey: "neetoForm.questions.common.questionFields.field.fieldCodeHelpDescription",
2139
- components: {
2140
- Link: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
2141
- className: "text-xs",
2142
- href: FIELD_CODE_DOC,
2143
- style: "link",
2144
- target: "_blank"
2145
- })
2146
- }
2147
- }),
2148
- labelProps: {
2149
- helpIconProps: {
2150
- icon: neetoIcons.Info,
2151
- className: "cursor-pointer",
2152
- onClick: function onClick() {
2153
- return window.open(FIELD_CODE_DOC, "_blank");
2160
+ return /*#__PURE__*/jsxRuntime.jsx(Accordion__default["default"], {
2161
+ className: "neeto-form-nano-advanced-properties-accordion",
2162
+ "data-cy": "advanced-properties-card",
2163
+ children: /*#__PURE__*/jsxRuntime.jsx(Accordion__default["default"].Item, {
2164
+ title: t("neetoForm.common.advancedProperties"),
2165
+ children: /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2166
+ required: true,
2167
+ label: t("neetoForm.questions.common.questionFields.field.fieldCode"),
2168
+ name: "fieldCode",
2169
+ helpText: /*#__PURE__*/jsxRuntime.jsx(reactI18next.Trans, {
2170
+ i18nKey: "neetoForm.questions.common.questionFields.field.fieldCodeHelpDescription",
2171
+ components: {
2172
+ Link: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
2173
+ className: "text-xs",
2174
+ href: FIELD_CODE_DOC,
2175
+ style: "link",
2176
+ target: "_blank"
2177
+ })
2154
2178
  }
2155
- }
2156
- }
2179
+ })
2180
+ })
2157
2181
  })
2158
2182
  });
2159
2183
  });
@@ -2196,19 +2220,28 @@ var Form$1 = function Form(_ref) {
2196
2220
  var shouldShowPlaceholder = ramda.includes(kind, QUESTIONS_WITH_PLACEHOLDERS);
2197
2221
  var hasAdditionalData = ramda.includes(kind, QUESTIONS_WITH_ADDITIONAL_DATA);
2198
2222
  var shouldShowFieldCode = enableFieldCode && !ramda.includes(kind, QUESTIONS_WITHOUT_FIELD_CODE);
2199
- var handleKindChange = function handleKindChange(_ref3) {
2200
- var label = _ref3.label,
2201
- value = _ref3.value;
2223
+ var handleKindChange = function handleKindChange(option) {
2224
+ var data = buildQuestionData(option);
2225
+ updateFormState(data);
2226
+ };
2227
+ var buildQuestionData = function buildQuestionData(option) {
2228
+ if (ramda.isNil(option)) {
2229
+ return INITIAL_VALUES;
2230
+ }
2231
+ var label = option.label,
2232
+ value = option.value;
2202
2233
  var kind = extractKindFromOption(value);
2203
2234
  var questionKind = getQuestionKind(availableQuestionKinds, {
2204
2235
  type: kind,
2205
2236
  label: label
2206
2237
  });
2207
- var data = createFieldData({
2238
+ return createFieldData({
2208
2239
  kind: questionKind,
2209
2240
  isRequired: isRequired,
2210
2241
  questions: questions
2211
2242
  });
2243
+ };
2244
+ var updateFormState = function updateFormState(data) {
2212
2245
  setValues(data);
2213
2246
  setErrors({});
2214
2247
  setTouched({});
@@ -2249,11 +2282,7 @@ var Form$1 = function Form(_ref) {
2249
2282
  dataCy: "settings-card",
2250
2283
  title: t("neetoForm.common.settings"),
2251
2284
  children: /*#__PURE__*/jsxRuntime.jsx(RequiredSwitch, {})
2252
- }), shouldShowFieldCode && /*#__PURE__*/jsxRuntime.jsx(Block, {
2253
- dataCy: "advanced-properties-card",
2254
- title: t("neetoForm.common.advancedProperties"),
2255
- children: /*#__PURE__*/jsxRuntime.jsx(FieldCode, {})
2256
- })]
2285
+ }), shouldShowFieldCode && /*#__PURE__*/jsxRuntime.jsx(FieldCode, {})]
2257
2286
  })]
2258
2287
  })
2259
2288
  });
@@ -2277,7 +2306,7 @@ var formValidationSchema = yup__namespace.object().shape({
2277
2306
  })),
2278
2307
  label: yup__namespace.string().when("kind", function (kind, schema) {
2279
2308
  return ramda.includes(kind, RICH_TEXT_QUESTIONS) ? schema.test("required", richTextFieldMissingErrorMessage(kind), function (value) {
2280
- return !neetoEditor.isEditorEmpty(value);
2309
+ return !utils$1.isEditorEmpty(value);
2281
2310
  }) : requiredLabelValidation(schema, i18next.t("neetoForm.questions.common.questionFields.field.question"));
2282
2311
  }),
2283
2312
  fieldCode: yup__namespace.string().trim().notOneOf(RESERVED_FIELD_CODES, i18next.t("neetoForm.error.invalidFieldCode")).when("kind", function (kind, schema) {
@@ -2456,6 +2485,7 @@ var FileGroup = function FileGroup(_ref) {
2456
2485
  checked: checked,
2457
2486
  label: label,
2458
2487
  name: name,
2488
+ "data-cy": "neeto-form-engine-file-type-".concat(name),
2459
2489
  id: name,
2460
2490
  onChange: handleAllowedFileTypesChange
2461
2491
  });
@@ -2634,6 +2664,7 @@ var Options = function Options(_ref) {
2634
2664
  var _option$id;
2635
2665
  return !option._destroy && /*#__PURE__*/jsxRuntime.jsxs("div", {
2636
2666
  className: "flex items-start gap-1",
2667
+ "data-cy": "neeto-form-engine-option-".concat(index),
2637
2668
  children: [/*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2638
2669
  required: true,
2639
2670
  disabled: freezeOptions,
@@ -2662,6 +2693,7 @@ var Options = function Options(_ref) {
2662
2693
  }), !freezeOptions && /*#__PURE__*/jsxRuntime.jsx("div", {
2663
2694
  className: "mt-3 w-full",
2664
2695
  children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
2696
+ "data-cy": "neeto-form-engine-add-option-button",
2665
2697
  icon: neetoIcons.Plus,
2666
2698
  iconPosition: "left",
2667
2699
  size: "small",
@@ -2690,30 +2722,22 @@ var Rating$2 = function Rating() {
2690
2722
  className: "flex flex-col",
2691
2723
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
2692
2724
  className: "w-full",
2693
- children: /*#__PURE__*/jsxRuntime.jsxs("div", {
2725
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
2694
2726
  className: "flex gap-6",
2695
- children: [/*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
2696
- children: [/*#__PURE__*/jsxRuntime.jsx(GoodSmiley, {
2697
- color: "#00ba88",
2698
- size: 48
2699
- }), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2700
- name: "highestRatingLabel"
2701
- })]
2702
- }), /*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
2703
- children: [/*#__PURE__*/jsxRuntime.jsx(OkaySmiley, {
2704
- color: "#f3cd82",
2705
- size: 48
2706
- }), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2707
- name: "averageRatingLabel"
2708
- })]
2709
- }), /*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
2710
- children: [/*#__PURE__*/jsxRuntime.jsx(BadSmiley, {
2711
- color: "#f56a58",
2712
- size: 48
2713
- }), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2714
- name: "lowestRatingLabel"
2715
- })]
2716
- })]
2727
+ children: RATING_OPTIONS.map(function (_ref2) {
2728
+ var Icon = _ref2.icon,
2729
+ name = _ref2.name,
2730
+ color = _ref2.color;
2731
+ return /*#__PURE__*/jsxRuntime.jsxs(RatingItem, {
2732
+ children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {
2733
+ color: color,
2734
+ size: 48
2735
+ }), /*#__PURE__*/jsxRuntime.jsx(InputWithMaxLength, {
2736
+ name: name,
2737
+ "data-cy": "neeto-form-engine-".concat(neetoCist.hyphenate(name))
2738
+ })]
2739
+ }, name);
2740
+ })
2717
2741
  })
2718
2742
  })
2719
2743
  });
@@ -2734,6 +2758,7 @@ var StarRating$2 = function StarRating() {
2734
2758
  className: "flex space-x-4",
2735
2759
  children: [/*#__PURE__*/jsxRuntime.jsx(Select__default["default"], {
2736
2760
  className: "w-1/2",
2761
+ "data-cy": "neeto-form-engine-star-rating-min-value",
2737
2762
  label: t("neetoForm.common.start"),
2738
2763
  name: "minValue",
2739
2764
  options: STAR_RATING_MIN_VALUE_OPTIONS,
@@ -2742,6 +2767,7 @@ var StarRating$2 = function StarRating() {
2742
2767
  }
2743
2768
  }), /*#__PURE__*/jsxRuntime.jsx(Select__default["default"], {
2744
2769
  className: "w-1/2",
2770
+ "data-cy": "neeto-form-engine-star-rating-max-value",
2745
2771
  label: t("neetoForm.common.end"),
2746
2772
  name: "maxValue",
2747
2773
  options: STAR_RATING_MAX_VALUE_OPTIONS,
@@ -2759,6 +2785,7 @@ var StarRating$2 = function StarRating() {
2759
2785
  IconType = _ref2[1];
2760
2786
  var isActive = name === iconType;
2761
2787
  return /*#__PURE__*/jsxRuntime.jsx("div", {
2788
+ "data-cy": "neeto-form-engine-rating-icon-".concat(name),
2762
2789
  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", {
2763
2790
  "neeto-ui-text-gray-800 neeto-ui-bg-gray-200": !isActive,
2764
2791
  "neeto-ui-text-white neeto-ui-bg-gray-800": isActive
@@ -2868,6 +2895,7 @@ var AddQuestion = reactUtils.withT(function (_ref) {
2868
2895
  content: (disabledAddButtonTooltipProps === null || disabledAddButtonTooltipProps === void 0 ? void 0 : disabledAddButtonTooltipProps.content) || t("neetoForm.questions.common.primaryPanel.noQuestionLeft"),
2869
2896
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
2870
2897
  children: /*#__PURE__*/jsxRuntime.jsx(Button__default["default"], {
2898
+ "data-cy": "neeto-form-engine-add-question",
2871
2899
  disabled: isDisabled,
2872
2900
  icon: neetoIcons.Plus,
2873
2901
  iconPosition: "left",
@@ -3171,31 +3199,22 @@ var BuildForm = function BuildForm(_ref) {
3171
3199
  isReordering = _useReorderQuestions.isPending;
3172
3200
  var _useFetchQuestions = useFetchQuestions({
3173
3201
  formId: id,
3174
- language: selectedLanguage,
3175
- placeholderData: {
3176
- isQuestionsLoading: true,
3177
- questions: [{
3178
- label: "",
3179
- kind: "text",
3180
- nodeId: "1"
3181
- }, {
3182
- label: "",
3183
- kind: "email",
3184
- nodeId: "2"
3185
- }]
3186
- }
3202
+ language: selectedLanguage
3187
3203
  }),
3188
3204
  data = _useFetchQuestions.data,
3189
- isLoading = _useFetchQuestions.isLoading;
3205
+ isLoading = _useFetchQuestions.isLoading,
3206
+ isQuestionsPending = _useFetchQuestions.isPending;
3190
3207
  var _ref2 = data || QUESTIONS_INITIAL_VALUE,
3191
3208
  isFormEnabled = _ref2.enabled,
3192
3209
  savedTitle = _ref2.title,
3193
3210
  questions = _ref2.questions,
3194
3211
  isQuestionsLoading = _ref2.isQuestionsLoading;
3195
3212
  React$2.useEffect(function () {
3196
- onUpdate === null || onUpdate === void 0 || onUpdate(data);
3213
+ if (data) {
3214
+ onUpdate === null || onUpdate === void 0 || onUpdate(data);
3215
+ }
3197
3216
  }, [data]);
3198
- if (isLoading || showLoader && isQuestionsLoading) {
3217
+ if (isLoading || showLoader && isQuestionsLoading && !isQuestionsPending) {
3199
3218
  return /*#__PURE__*/jsxRuntime.jsx("div", {
3200
3219
  className: "flex h-full w-full items-center justify-center py-6",
3201
3220
  children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
@@ -3279,7 +3298,7 @@ var BuildForm = function BuildForm(_ref) {
3279
3298
  }
3280
3299
  }));
3281
3300
  }
3282
- }), isQuestionsLoading && /*#__PURE__*/jsxRuntime.jsx("div", {
3301
+ }), isQuestionsLoading && !isQuestionsPending && /*#__PURE__*/jsxRuntime.jsx("div", {
3283
3302
  className: "neeto-ui-bg-white absolute inset-0 flex items-center justify-center",
3284
3303
  children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
3285
3304
  })]
@@ -3660,7 +3679,7 @@ var validateMultiEmailField = function validateMultiEmailField(_ref11) {
3660
3679
  return schema;
3661
3680
  };
3662
3681
  var editorHasValue = function editorHasValue(content) {
3663
- return !neetoEditor.isEditorEmpty(content);
3682
+ return !utils$1.isEditorEmpty(content);
3664
3683
  };
3665
3684
  var validateRichTextField = function validateRichTextField(_ref12) {
3666
3685
  var isRequired = _ref12.isRequired;
@@ -13542,6 +13561,7 @@ var Choices = function Choices(_ref) {
13542
13561
  var Component = isCheckBox ? Checkbox__default["default"] : Radio__default["default"].Item;
13543
13562
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
13544
13563
  className: "neeto-form-engine-choices__wrapper",
13564
+ "data-cy": "".concat(neetoCist.hyphenate(label), "-select-container-wrapper"),
13545
13565
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
13546
13566
  className: "neeto-form-engine-label",
13547
13567
  children: label
@@ -13697,7 +13717,7 @@ var Rating = function Rating(_ref) {
13697
13717
  };
13698
13718
  var render = function render() {
13699
13719
  var labels = [highestRatingLabel, averageRatingLabel, lowestRatingLabel];
13700
- return RATING_OPTIONS.map(function (_ref2, index) {
13720
+ return RATING_OPTIONS$1.map(function (_ref2, index) {
13701
13721
  var Icon = _ref2.icon,
13702
13722
  modifier = _ref2.modifier,
13703
13723
  rating = _ref2.value;
@@ -13810,7 +13830,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
13810
13830
  var field = _ref2.field,
13811
13831
  form = _ref2.form,
13812
13832
  meta = _ref2.meta;
13813
- return /*#__PURE__*/jsxRuntime.jsx(neetoEditor.Editor, _objectSpread$8({
13833
+ return /*#__PURE__*/jsxRuntime.jsx(NeetoEditor__default["default"], _objectSpread$8({
13814
13834
  className: "neeto-form-engine-rich-text-input",
13815
13835
  error: meta.touched ? meta.error : "",
13816
13836
  initialValue: field.value,
@@ -13967,7 +13987,7 @@ var TermsField = function TermsField(_ref) {
13967
13987
  })), {}, {
13968
13988
  checked: field.value,
13969
13989
  error: meta.touched ? meta.error : "",
13970
- children: /*#__PURE__*/jsxRuntime.jsx(neetoEditor.EditorContent, {
13990
+ children: /*#__PURE__*/jsxRuntime.jsx(EditorContent__default["default"], {
13971
13991
  content: label
13972
13992
  })
13973
13993
  }))
@@ -14033,7 +14053,7 @@ var TextField = function TextField(_ref) {
14033
14053
  var _QUESTION_TO_COMPONEN;
14034
14054
  var QUESTION_TO_COMPONENT_MAP = (_QUESTION_TO_COMPONEN = {}, _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.TEXT.value, TextField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.NAME.value, NameField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.EMAIL.value, EmailField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.INTEGER.value, TextField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.DECIMAL.value, TextField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.PHONE.value, PhoneNumberField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.QUESTION.value, TextField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.TEXTAREA.value, TextField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.CHECKBOX.value, OptionsField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.RADIO.value, OptionsField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.DROPDOWN.value, OptionsField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.RATING.value, RatingField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.PARAGRAPH.value, function (_ref) {
14035
14055
  var question = _ref.question;
14036
- return /*#__PURE__*/jsxRuntime.jsx(neetoEditor.EditorContent, {
14056
+ return /*#__PURE__*/jsxRuntime.jsx(EditorContent__default["default"], {
14037
14057
  content: fieldWithFallback(question, "label", true)
14038
14058
  });
14039
14059
  }), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.TERMS.value, TermsField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.DATE.value, DateField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.STAR_RATING.value, StarRatingField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.ADDITIONAL_GUESTS.value, MultipleEmailInput), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.RICH_TEXT.value, RichTextEditor), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.CONDITION.value, ConditionField), _defineProperty__default["default"](_QUESTION_TO_COMPONEN, QUESTION_KIND.FILE_UPLOAD.value, FileUploadField), _QUESTION_TO_COMPONEN);
@@ -14369,15 +14389,13 @@ var ExternalForm = function ExternalForm(_ref) {
14369
14389
  var _useForm = useForm({
14370
14390
  formId: formId,
14371
14391
  language: language,
14372
- enabled: !preview,
14373
- placeholderData: {
14374
- isQuestionsLoading: true
14375
- }
14392
+ enabled: !preview
14376
14393
  }),
14377
14394
  _useForm$data = _useForm.data,
14378
14395
  form = _useForm$data === void 0 ? {
14379
14396
  title: "",
14380
- questions: []
14397
+ questions: [],
14398
+ isQuestionsLoading: true
14381
14399
  } : _useForm$data,
14382
14400
  isLoading = _useForm.isLoading;
14383
14401
  var _queryClient$getQuery = queryClient.getQueryState([QUERY_KEYS.QUESTIONS, formId, language]),
@@ -17114,7 +17132,7 @@ var Submission = function Submission(_ref2) {
17114
17132
  var renderSubmittedValue = function renderSubmittedValue(kind, value) {
17115
17133
  switch (kind) {
17116
17134
  case QUESTION_KIND.RICH_TEXT.value:
17117
- return /*#__PURE__*/jsxRuntime.jsx(neetoEditor.EditorContent, {
17135
+ return /*#__PURE__*/jsxRuntime.jsx(EditorContent__default["default"], {
17118
17136
  content: getEditorContent(getValue({
17119
17137
  value: value,
17120
17138
  kind: kind