@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.
- package/app/javascript/src/translations/ar.json +9 -1
- package/app/javascript/src/translations/bg.json +9 -1
- package/app/javascript/src/translations/ca.json +9 -1
- package/app/javascript/src/translations/cs.json +9 -1
- package/app/javascript/src/translations/da.json +9 -1
- package/app/javascript/src/translations/de.json +9 -1
- package/app/javascript/src/translations/es-MX.json +9 -1
- package/app/javascript/src/translations/es.json +9 -1
- package/app/javascript/src/translations/et.json +9 -1
- package/app/javascript/src/translations/fi.json +9 -1
- package/app/javascript/src/translations/fil.json +9 -1
- package/app/javascript/src/translations/fr.json +9 -1
- package/app/javascript/src/translations/he.json +9 -1
- package/app/javascript/src/translations/hi.json +9 -1
- package/app/javascript/src/translations/hr.json +9 -1
- package/app/javascript/src/translations/hu.json +9 -1
- package/app/javascript/src/translations/id.json +9 -1
- package/app/javascript/src/translations/it.json +9 -1
- package/app/javascript/src/translations/ja.json +9 -1
- package/app/javascript/src/translations/ko.json +9 -1
- package/app/javascript/src/translations/nl.json +9 -1
- package/app/javascript/src/translations/pl.json +9 -1
- package/app/javascript/src/translations/pt-BR.json +9 -1
- package/app/javascript/src/translations/pt.json +9 -1
- package/app/javascript/src/translations/ro.json +9 -1
- package/app/javascript/src/translations/ru.json +9 -1
- package/app/javascript/src/translations/sk.json +9 -1
- package/app/javascript/src/translations/sl.json +9 -1
- package/app/javascript/src/translations/sv.json +9 -1
- package/app/javascript/src/translations/th.json +9 -1
- package/app/javascript/src/translations/tr.json +9 -1
- package/app/javascript/src/translations/uk.json +9 -1
- package/app/javascript/src/translations/vi.json +9 -1
- package/app/javascript/src/translations/zh-CN.json +9 -1
- package/app/javascript/src/translations/zh-TW.json +9 -1
- package/dist/.ready +1 -1
- package/dist/BuildForm.js +59 -53
- package/dist/BuildForm.js.map +1 -1
- package/dist/cjs/BuildForm.js +59 -53
- package/dist/cjs/BuildForm.js.map +1 -1
- package/package.json +5 -5
package/dist/cjs/BuildForm.js
CHANGED
|
@@ -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
|
-
|
|
323
|
-
|
|
324
|
-
"neeto-ui-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
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
|
|
2728
|
-
minWords: minWords !== null && minWords !== void 0 ? minWords : ""
|
|
2729
|
-
});
|
|
2735
|
+
return rest;
|
|
2730
2736
|
}
|
|
2731
2737
|
};
|
|
2732
2738
|
|