@bigbinary/neeto-form-frontend 4.4.15 → 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.
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-04-13T09:29:18.380Z
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({
@@ -1081,6 +1083,7 @@ var Form$1 = function Form(_ref) {
1081
1083
  var canMarkResponsesAsReadOnly = markResponsesAsReadOnly && !includes(kind, NON_READ_ONLY_FIELDS);
1082
1084
  var isTextarea = kind === QUESTION_TYPES.TEXTAREA;
1083
1085
  var isBasicSettingsVisible = !isRequired && (!isImmutable || shouldShowHideSwitch);
1086
+ var shouldShowRequiredSwitch = isBasicSettingsVisible && !isImmutable && !includes(kind, [QUESTION_TYPES.PARAGRAPH, QUESTION_TYPES.ADDRESS, QUESTION_TYPES.SPOT]);
1084
1087
  var isSettingsBlockVisible = kind !== QUESTION_TYPES.SPOT && (isBasicSettingsVisible || canMarkResponsesAsReadOnly || isTextarea);
1085
1088
  var handleKindChange = function handleKindChange(option) {
1086
1089
  var data = buildQuestionData(option);
@@ -1134,8 +1137,10 @@ var Form$1 = function Form(_ref) {
1134
1137
  options: buildKindOptions(questionKinds),
1135
1138
  label: t("neetoForm.questions.common.questionFields.field.questionType"),
1136
1139
  onChange: handleKindChange
1137
- }), isRichTextQuestion(kind) ? /*#__PURE__*/jsx(Editor, {
1138
- isLabelDisabled: isLabelDisabled
1140
+ }), isRichTextQuestion(kind) ? /*#__PURE__*/jsxs(Fragment, {
1141
+ children: [/*#__PURE__*/jsx(Editor, {
1142
+ isLabelDisabled: isLabelDisabled
1143
+ }), shouldShowRequiredSwitch && /*#__PURE__*/jsx(RequiredSwitch, {})]
1139
1144
  }) : /*#__PURE__*/jsxs("div", {
1140
1145
  className: "space-y-4",
1141
1146
  children: [/*#__PURE__*/jsx(Properties, {
@@ -1147,7 +1152,7 @@ var Form$1 = function Form(_ref) {
1147
1152
  className: "space-y-4",
1148
1153
  "data-testid": "settings-card",
1149
1154
  children: [isBasicSettingsVisible && /*#__PURE__*/jsxs(Fragment, {
1150
- 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, {
1151
1156
  label: t("neetoForm.common.hideQuestion"),
1152
1157
  name: "isHidden",
1153
1158
  labelProps: hideSwitchLabelProps(hideQuestionHelpDocUrl)