@bigbinary/neeto-form-frontend 4.4.11 → 4.4.13

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 (41) hide show
  1. package/app/javascript/src/translations/ar.json +9 -1
  2. package/app/javascript/src/translations/bg.json +9 -1
  3. package/app/javascript/src/translations/ca.json +9 -1
  4. package/app/javascript/src/translations/cs.json +9 -1
  5. package/app/javascript/src/translations/da.json +9 -1
  6. package/app/javascript/src/translations/de.json +9 -1
  7. package/app/javascript/src/translations/es-MX.json +9 -1
  8. package/app/javascript/src/translations/es.json +9 -1
  9. package/app/javascript/src/translations/et.json +9 -1
  10. package/app/javascript/src/translations/fi.json +9 -1
  11. package/app/javascript/src/translations/fil.json +9 -1
  12. package/app/javascript/src/translations/fr.json +9 -1
  13. package/app/javascript/src/translations/he.json +9 -1
  14. package/app/javascript/src/translations/hi.json +9 -1
  15. package/app/javascript/src/translations/hr.json +9 -1
  16. package/app/javascript/src/translations/hu.json +9 -1
  17. package/app/javascript/src/translations/id.json +9 -1
  18. package/app/javascript/src/translations/it.json +9 -1
  19. package/app/javascript/src/translations/ja.json +9 -1
  20. package/app/javascript/src/translations/ko.json +9 -1
  21. package/app/javascript/src/translations/nl.json +9 -1
  22. package/app/javascript/src/translations/pl.json +9 -1
  23. package/app/javascript/src/translations/pt-BR.json +9 -1
  24. package/app/javascript/src/translations/pt.json +9 -1
  25. package/app/javascript/src/translations/ro.json +9 -1
  26. package/app/javascript/src/translations/ru.json +9 -1
  27. package/app/javascript/src/translations/sk.json +9 -1
  28. package/app/javascript/src/translations/sl.json +9 -1
  29. package/app/javascript/src/translations/sv.json +9 -1
  30. package/app/javascript/src/translations/th.json +9 -1
  31. package/app/javascript/src/translations/tr.json +9 -1
  32. package/app/javascript/src/translations/uk.json +9 -1
  33. package/app/javascript/src/translations/vi.json +9 -1
  34. package/app/javascript/src/translations/zh-CN.json +9 -1
  35. package/app/javascript/src/translations/zh-TW.json +9 -1
  36. package/dist/.ready +1 -1
  37. package/dist/BuildForm.js +59 -53
  38. package/dist/BuildForm.js.map +1 -1
  39. package/dist/cjs/BuildForm.js +59 -53
  40. package/dist/cjs/BuildForm.js.map +1 -1
  41. package/package.json +5 -5
@@ -319,58 +319,62 @@ var Card = function Card(_ref) {
319
319
  setIsTooltipEnabled(yup.isElementOverflowing(element));
320
320
  }, [questionLabel]);
321
321
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
322
- "data-testid": "neeto-form-engine-".concat(neetoCist.slugify(questionLabel)),
323
- className: classnames("neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-white neeto-form-nano-form__card flex h-10 w-full items-center justify-between gap-1 border p-2", {
324
- "neeto-ui-border-primary-500 neeto-form-nano-form__card--active": isActive
325
- }),
326
- onClick: function onClick() {
327
- return onSelect(question);
328
- },
329
- children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
330
- className: "flex min-w-0 grow items-center gap-1",
331
- children: [canManageQuestions && /*#__PURE__*/jsxRuntime.jsx(yup.Drag, {
332
- className: "neeto-ui-text-gray-600 shrink-0"
333
- }), /*#__PURE__*/jsxRuntime.jsx(Tooltip, {
334
- content: questionLabel,
335
- disabled: !isTooltipEnabled,
336
- position: "top",
337
- children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
338
- className: "line-clamp-2 min-w-0 grow truncate break-words",
339
- "data-testid": "".concat(neetoCist.slugify(questionLabel), "-question-card-label"),
340
- lineHeight: "snug",
341
- ref: questionLabelRef,
342
- style: "body2",
343
- weight: "medium",
344
- children: questionLabel
322
+ className: "flex items-center gap-0.5",
323
+ children: [canManageQuestions && /*#__PURE__*/jsxRuntime.jsx(yup.Drag, {
324
+ className: "neeto-ui-text-gray-400 hover:neeto-ui-text-gray-500 transition-all ease-in-out duration-300 shrink-0 cursor-grab -ml-1",
325
+ size: 16
326
+ }), /*#__PURE__*/jsxRuntime.jsxs("div", {
327
+ "data-testid": "neeto-form-engine-".concat(neetoCist.slugify(questionLabel)),
328
+ className: classnames("neeto-ui-rounded neeto-ui-border-gray-300 neeto-ui-bg-white neeto-form-nano-form__card flex h-10 grow items-center justify-between gap-1 border p-2", {
329
+ "neeto-ui-border-primary-500 neeto-form-nano-form__card--active": isActive
330
+ }),
331
+ onClick: function onClick() {
332
+ return onSelect(question);
333
+ },
334
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
335
+ className: "flex min-w-0 grow items-center gap-1",
336
+ children: /*#__PURE__*/jsxRuntime.jsx(Tooltip, {
337
+ content: questionLabel,
338
+ disabled: !isTooltipEnabled,
339
+ position: "top",
340
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
341
+ className: "line-clamp-2 min-w-0 grow truncate break-words",
342
+ "data-testid": "".concat(neetoCist.slugify(questionLabel), "-question-card-label"),
343
+ lineHeight: "snug",
344
+ ref: questionLabelRef,
345
+ style: "body2",
346
+ weight: "medium",
347
+ children: questionLabel
348
+ })
345
349
  })
350
+ }), canManageQuestions && /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
351
+ dropdownButtonProps: {
352
+ className: "shrink-0"
353
+ },
354
+ dropdownProps: {
355
+ strategy: "fixed"
356
+ },
357
+ menuItems: [{
358
+ "data-testid": "edit-question",
359
+ key: "edit",
360
+ label: t("neetoForm.common.edit"),
361
+ onClick: onEdit
362
+ }, {
363
+ "data-testid": "clone-question",
364
+ key: "clone",
365
+ label: t("neetoForm.common.clone"),
366
+ isVisible: !isSingular && index.isFunction(onClone),
367
+ onClick: onClone
368
+ }, {
369
+ "data-testid": "delete-question",
370
+ key: "delete",
371
+ label: t("neetoForm.common.delete"),
372
+ isVisible: index.isFunction(onDelete),
373
+ onClick: function onClick() {
374
+ return onDelete(question);
375
+ }
376
+ }]
346
377
  })]
347
- }), canManageQuestions && /*#__PURE__*/jsxRuntime.jsx(MoreDropdown, {
348
- dropdownButtonProps: {
349
- className: "shrink-0"
350
- },
351
- dropdownProps: {
352
- strategy: "fixed"
353
- },
354
- menuItems: [{
355
- "data-testid": "edit-question",
356
- key: "edit",
357
- label: t("neetoForm.common.edit"),
358
- onClick: onEdit
359
- }, {
360
- "data-testid": "clone-question",
361
- key: "clone",
362
- label: t("neetoForm.common.clone"),
363
- isVisible: !isSingular && index.isFunction(onClone),
364
- onClick: onClone
365
- }, {
366
- "data-testid": "delete-question",
367
- key: "delete",
368
- label: t("neetoForm.common.delete"),
369
- isVisible: index.isFunction(onDelete),
370
- onClick: function onClick() {
371
- return onDelete(question);
372
- }
373
- }]
374
378
  })]
375
379
  });
376
380
  };
@@ -2714,6 +2718,10 @@ var transformValues = function transformValues(_ref4) {
2714
2718
  values = _objectWithoutProperties(_ref4, _excluded$1);
2715
2719
  var rest = ramda.omit(["isMinWordsEnabled"], values);
2716
2720
  switch (rest.kind) {
2721
+ case constants.QUESTION_TYPES.TEXTAREA:
2722
+ return _objectSpread$2(_objectSpread$2({}, rest), {}, {
2723
+ minWords: minWords !== null && minWords !== void 0 ? minWords : ""
2724
+ });
2717
2725
  case constants.QUESTION_TYPES.ADDRESS:
2718
2726
  {
2719
2727
  var _rest$fields = rest.fields,
@@ -2724,9 +2732,7 @@ var transformValues = function transformValues(_ref4) {
2724
2732
  });
2725
2733
  }
2726
2734
  default:
2727
- return _objectSpread$2(_objectSpread$2({}, rest), {}, {
2728
- minWords: minWords !== null && minWords !== void 0 ? minWords : ""
2729
- });
2735
+ return rest;
2730
2736
  }
2731
2737
  };
2732
2738