@bigbinary/neeto-form-frontend 4.4.14 → 4.4.16

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 (46) hide show
  1. package/app/javascript/src/translations/ar.json +0 -2
  2. package/app/javascript/src/translations/bg.json +0 -2
  3. package/app/javascript/src/translations/ca.json +0 -2
  4. package/app/javascript/src/translations/cs.json +0 -2
  5. package/app/javascript/src/translations/da.json +0 -2
  6. package/app/javascript/src/translations/de.json +0 -2
  7. package/app/javascript/src/translations/en.json +0 -2
  8. package/app/javascript/src/translations/es-MX.json +0 -2
  9. package/app/javascript/src/translations/es.json +0 -2
  10. package/app/javascript/src/translations/et.json +0 -2
  11. package/app/javascript/src/translations/fi.json +0 -2
  12. package/app/javascript/src/translations/fil.json +0 -2
  13. package/app/javascript/src/translations/fr.json +0 -2
  14. package/app/javascript/src/translations/he.json +0 -2
  15. package/app/javascript/src/translations/hi.json +0 -2
  16. package/app/javascript/src/translations/hr.json +0 -2
  17. package/app/javascript/src/translations/hu.json +0 -2
  18. package/app/javascript/src/translations/id.json +0 -2
  19. package/app/javascript/src/translations/it.json +0 -2
  20. package/app/javascript/src/translations/ja.json +0 -2
  21. package/app/javascript/src/translations/ko.json +0 -2
  22. package/app/javascript/src/translations/nl.json +0 -2
  23. package/app/javascript/src/translations/pl.json +0 -2
  24. package/app/javascript/src/translations/pt-BR.json +0 -2
  25. package/app/javascript/src/translations/pt.json +0 -2
  26. package/app/javascript/src/translations/ro.json +0 -2
  27. package/app/javascript/src/translations/ru.json +0 -2
  28. package/app/javascript/src/translations/sk.json +0 -2
  29. package/app/javascript/src/translations/sl.json +0 -2
  30. package/app/javascript/src/translations/sv.json +0 -2
  31. package/app/javascript/src/translations/th.json +0 -2
  32. package/app/javascript/src/translations/tr.json +0 -2
  33. package/app/javascript/src/translations/uk.json +0 -2
  34. package/app/javascript/src/translations/vi.json +0 -2
  35. package/app/javascript/src/translations/zh-CN.json +0 -2
  36. package/app/javascript/src/translations/zh-TW.json +0 -2
  37. package/dist/.ready +1 -1
  38. package/dist/BuildForm.js +40 -35
  39. package/dist/BuildForm.js.map +1 -1
  40. package/dist/Submission.js +1 -1
  41. package/dist/Submission.js.map +1 -1
  42. package/dist/cjs/BuildForm.js +40 -35
  43. package/dist/cjs/BuildForm.js.map +1 -1
  44. package/dist/cjs/Submission.js +1 -1
  45. package/dist/cjs/Submission.js.map +1 -1
  46. package/package.json +9 -9
@@ -48,7 +48,6 @@
48
48
  "addGuestsHelper": "請輸入用逗號分隔的電子郵件。",
49
49
  "start": "開始",
50
50
  "end": "結束",
51
- "settings": "設置",
52
51
  "advancedProperties": "高級屬性",
53
52
  "clonedElementLabel": "{{label, anyCase}} 的副本",
54
53
  "option": "選項",
@@ -148,7 +147,6 @@
148
147
  "responseVisibleOnlyToHostHelpDescription": "啟用後,該問題的響應僅對主辦方可見",
149
148
  "readOnlyHelpDescription": "當啟用此選項時,客戶只能看到此問題的答案,但無法更改此問題的答案。因為您將此問題標記為「只讀」,您應該預填此問題的答案。",
150
149
  "verifyHuman": "驗證您是人類",
151
- "pictureChoiceSettings": "圖片選擇設定",
152
150
  "addPicturesToOptions": "將圖片添加至選項",
153
151
  "fitImages": "調整圖片適合",
154
152
  "imageHeight": "圖片高度",
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-04-10T18:57:04.744Z
1
+ Built at 2026-04-15T11:33:55.516Z
package/dist/BuildForm.js CHANGED
@@ -534,9 +534,11 @@ var createFieldData = function createFieldData(_ref5) {
534
534
  selectedLanguage: selectedLanguage,
535
535
  isUsingDefaultQuestionKinds: isUsingDefaultQuestionKinds
536
536
  });
537
- return _objectSpread$h(_objectSpread$h({}, modifiedDefaultValues), {}, {
538
- metadata: metadata,
539
- isRequired: isRequired,
537
+ return _objectSpread$h(_objectSpread$h(_objectSpread$h({}, modifiedDefaultValues), {}, {
538
+ metadata: metadata
539
+ }, typeof isRequired === "boolean" && {
540
+ isRequired: isRequired
541
+ }), {}, {
540
542
  kind: type,
541
543
  nodeId: v4(),
542
544
  fieldCode: generateUniqueFieldCode({
@@ -835,29 +837,6 @@ var Properties = function Properties(_ref) {
835
837
  });
836
838
  };
837
839
 
838
- var Block = function Block(_ref) {
839
- var title = _ref.title,
840
- children = _ref.children,
841
- dataTestid = _ref.dataTestid;
842
- return /*#__PURE__*/jsxs("div", {
843
- className: "mt-4 space-y-3",
844
- "data-testid": dataTestid,
845
- children: [/*#__PURE__*/jsx("div", {
846
- className: "flex items-center justify-between",
847
- "data-testid": "properties-header",
848
- children: /*#__PURE__*/jsx(Typography, {
849
- lineHeight: "normal",
850
- style: "body1",
851
- weight: "semibold",
852
- children: title
853
- })
854
- }), /*#__PURE__*/jsx("div", {
855
- className: "space-y-4",
856
- children: children
857
- })]
858
- });
859
- };
860
-
861
840
  var useUpdateEditorContent = function useUpdateEditorContent(_ref) {
862
841
  var editorRef = _ref.editorRef,
863
842
  fieldName = _ref.fieldName,
@@ -1104,6 +1083,7 @@ var Form$1 = function Form(_ref) {
1104
1083
  var canMarkResponsesAsReadOnly = markResponsesAsReadOnly && !includes(kind, NON_READ_ONLY_FIELDS);
1105
1084
  var isTextarea = kind === QUESTION_TYPES.TEXTAREA;
1106
1085
  var isBasicSettingsVisible = !isRequired && (!isImmutable || shouldShowHideSwitch);
1086
+ var shouldShowRequiredSwitch = isBasicSettingsVisible && !isImmutable && !includes(kind, [QUESTION_TYPES.PARAGRAPH, QUESTION_TYPES.ADDRESS, QUESTION_TYPES.SPOT]);
1107
1087
  var isSettingsBlockVisible = kind !== QUESTION_TYPES.SPOT && (isBasicSettingsVisible || canMarkResponsesAsReadOnly || isTextarea);
1108
1088
  var handleKindChange = function handleKindChange(option) {
1109
1089
  var data = buildQuestionData(option);
@@ -1157,20 +1137,22 @@ var Form$1 = function Form(_ref) {
1157
1137
  options: buildKindOptions(questionKinds),
1158
1138
  label: t("neetoForm.questions.common.questionFields.field.questionType"),
1159
1139
  onChange: handleKindChange
1160
- }), isRichTextQuestion(kind) ? /*#__PURE__*/jsx(Editor, {
1161
- isLabelDisabled: isLabelDisabled
1140
+ }), isRichTextQuestion(kind) ? /*#__PURE__*/jsxs(Fragment, {
1141
+ children: [/*#__PURE__*/jsx(Editor, {
1142
+ isLabelDisabled: isLabelDisabled
1143
+ }), shouldShowRequiredSwitch && /*#__PURE__*/jsx(RequiredSwitch, {})]
1162
1144
  }) : /*#__PURE__*/jsxs("div", {
1163
- className: "space-y-6",
1145
+ className: "space-y-4",
1164
1146
  children: [/*#__PURE__*/jsx(Properties, {
1165
1147
  handleLabelChange: handleLabelChange,
1166
1148
  isLabelDisabled: isLabelDisabled,
1167
1149
  kind: kind,
1168
1150
  questionProps: questionProps
1169
- }), isSettingsBlockVisible && /*#__PURE__*/jsxs(Block, {
1170
- dataTestid: "settings-card",
1171
- title: t("neetoForm.common.settings"),
1151
+ }), isSettingsBlockVisible && /*#__PURE__*/jsxs("div", {
1152
+ className: "space-y-4",
1153
+ "data-testid": "settings-card",
1172
1154
  children: [isBasicSettingsVisible && /*#__PURE__*/jsxs(Fragment, {
1173
- children: [!isImmutable && kind !== QUESTION_TYPES.ADDRESS && kind !== QUESTION_TYPES.SPOT && /*#__PURE__*/jsx(RequiredSwitch, {}), shouldShowHideSwitch && /*#__PURE__*/jsx(Switch, {
1155
+ children: [shouldShowRequiredSwitch && /*#__PURE__*/jsx(RequiredSwitch, {}), shouldShowHideSwitch && /*#__PURE__*/jsx(Switch, {
1174
1156
  label: t("neetoForm.common.hideQuestion"),
1175
1157
  name: "isHidden",
1176
1158
  labelProps: hideSwitchLabelProps(hideQuestionHelpDocUrl)
@@ -1450,6 +1432,29 @@ var Edit = function Edit(_ref) {
1450
1432
  });
1451
1433
  };
1452
1434
 
1435
+ var Block = function Block(_ref) {
1436
+ var title = _ref.title,
1437
+ children = _ref.children,
1438
+ dataTestid = _ref.dataTestid;
1439
+ return /*#__PURE__*/jsxs("div", {
1440
+ className: "mt-4 space-y-3",
1441
+ "data-testid": dataTestid,
1442
+ children: [/*#__PURE__*/jsx("div", {
1443
+ className: "flex items-center justify-between",
1444
+ "data-testid": "properties-header",
1445
+ children: /*#__PURE__*/jsx(Typography, {
1446
+ lineHeight: "normal",
1447
+ style: "body1",
1448
+ weight: "semibold",
1449
+ children: title
1450
+ })
1451
+ }), /*#__PURE__*/jsx("div", {
1452
+ className: "space-y-4",
1453
+ children: children
1454
+ })]
1455
+ });
1456
+ };
1457
+
1453
1458
  var VARIANTS = {
1454
1459
  hidden: {
1455
1460
  opacity: 0,
@@ -2445,8 +2450,8 @@ var Options = function Options(_ref) {
2445
2450
  onChange: setOptionsAttributes
2446
2451
  })
2447
2452
  })]
2448
- }), !isDropdown && isPictureChoiceEnabled && /*#__PURE__*/jsxs(Block, {
2449
- title: t("neetoForm.questions.common.questionFields.field.pictureChoiceSettings"),
2453
+ }), !isDropdown && isPictureChoiceEnabled && /*#__PURE__*/jsxs("div", {
2454
+ className: "space-y-4",
2450
2455
  children: [/*#__PURE__*/jsx(Switch, {
2451
2456
  name: "isPictureChoice",
2452
2457
  label: t("neetoForm.questions.common.questionFields.field.addPicturesToOptions")