@bigbinary/neeto-form-frontend 4.4.16 → 4.4.18

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-15T11:33:55.516Z
1
+ Built at 2026-04-23T05:51:14.385Z
package/dist/BuildForm.js CHANGED
@@ -21,9 +21,9 @@ import MoreDropdown from '@bigbinary/neeto-molecules/MoreDropdown';
21
21
  import Dropdown from '@bigbinary/neetoui/Dropdown';
22
22
  import Tooltip from '@bigbinary/neetoui/Tooltip';
23
23
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
24
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
24
25
  import { i as isFunction, f as fieldWithFallback, c as isNameQuestion } from './index-DhtQJpD_.js';
25
26
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
26
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
27
27
  import { t } from 'i18next';
28
28
  import { v4 } from 'uuid';
29
29
  import NoData from '@bigbinary/neetoui/NoData';
@@ -278,7 +278,9 @@ var Card = function Card(_ref) {
278
278
  onEdit = _ref.onEdit,
279
279
  onClone = _ref.onClone,
280
280
  onDelete = _ref.onDelete,
281
- canManageQuestions = _ref.canManageQuestions;
281
+ canManageQuestions = _ref.canManageQuestions,
282
+ _ref$extraMenuItems = _ref.extraMenuItems,
283
+ extraMenuItems = _ref$extraMenuItems === void 0 ? [] : _ref$extraMenuItems;
282
284
  var _useState = useState(false),
283
285
  _useState2 = _slicedToArray(_useState, 2),
284
286
  isTooltipEnabled = _useState2[0],
@@ -344,7 +346,7 @@ var Card = function Card(_ref) {
344
346
  label: t("neetoForm.common.clone"),
345
347
  isVisible: !isSingular && isFunction(onClone),
346
348
  onClick: onClone
347
- }, {
349
+ }].concat(_toConsumableArray(extraMenuItems), [{
348
350
  "data-testid": "delete-question",
349
351
  key: "delete",
350
352
  label: t("neetoForm.common.delete"),
@@ -352,7 +354,7 @@ var Card = function Card(_ref) {
352
354
  onClick: function onClick() {
353
355
  return onDelete(question);
354
356
  }
355
- }]
357
+ }])
356
358
  })]
357
359
  })]
358
360
  });
@@ -365,6 +367,7 @@ var Questions = function Questions(_ref) {
365
367
  isDeletable = _ref.isDeletable,
366
368
  allQuestionKinds = _ref.allQuestionKinds,
367
369
  getActiveKindDetails = _ref.getActiveKindDetails,
370
+ getQuestionMenuExtras = _ref.getQuestionMenuExtras,
368
371
  selectedQuestion = _ref.selectedQuestion,
369
372
  onEdit = _ref.onEdit,
370
373
  onClone = _ref.onClone,
@@ -389,6 +392,7 @@ var Questions = function Questions(_ref) {
389
392
  isDragDisabled: !canManageQuestions,
390
393
  key: "question-".concat((_question$id2 = question.id) !== null && _question$id2 !== void 0 ? _question$id2 : question.nodeId)
391
394
  }, function (_ref3) {
395
+ var _getQuestionMenuExtra;
392
396
  var draggableProps = _ref3.draggableProps,
393
397
  dragHandleProps = _ref3.dragHandleProps,
394
398
  innerRef = _ref3.innerRef;
@@ -402,6 +406,7 @@ var Questions = function Questions(_ref) {
402
406
  onEdit: onEdit,
403
407
  onSelect: onSelect,
404
408
  question: question,
409
+ extraMenuItems: (_getQuestionMenuExtra = getQuestionMenuExtras === null || getQuestionMenuExtras === void 0 ? void 0 : getQuestionMenuExtras(question)) !== null && _getQuestionMenuExtra !== void 0 ? _getQuestionMenuExtra : [],
405
410
  isActive: equals(selectedQuestion, question),
406
411
  onDelete: isDeletable(question) && onDelete
407
412
  })
@@ -2790,7 +2795,8 @@ var Form = function Form(_ref) {
2790
2795
  questionsFromCache = _ref.questionsFromCache,
2791
2796
  onMutateSuccess = _ref.onMutateSuccess,
2792
2797
  advancedFeatures = _ref.advancedFeatures,
2793
- isPictureChoiceEnabled = _ref.isPictureChoiceEnabled;
2798
+ isPictureChoiceEnabled = _ref.isPictureChoiceEnabled,
2799
+ getQuestionMenuExtras = _ref.getQuestionMenuExtras;
2794
2800
  var containerRef = useRef();
2795
2801
  var _useStateWithDependen = useStateWithDependency(questionsFromCache),
2796
2802
  _useStateWithDependen2 = _slicedToArray(_useStateWithDependen, 2),
@@ -2979,6 +2985,7 @@ var Form = function Form(_ref) {
2979
2985
  children: /*#__PURE__*/jsx(Questions, {
2980
2986
  canManageQuestions: canManageQuestions,
2981
2987
  getActiveKindDetails: getActiveKindDetails,
2988
+ getQuestionMenuExtras: getQuestionMenuExtras,
2982
2989
  isDeletable: isDeletable,
2983
2990
  questions: questions,
2984
2991
  selectedQuestion: selectedQuestion,
@@ -3064,7 +3071,8 @@ var BuildForm = function BuildForm(_ref) {
3064
3071
  _ref$canManageQuestio = _ref.canManageQuestions,
3065
3072
  canManageQuestions = _ref$canManageQuestio === void 0 ? false : _ref$canManageQuestio,
3066
3073
  _ref$isPictureChoiceE = _ref.isPictureChoiceEnabled,
3067
- isPictureChoiceEnabled = _ref$isPictureChoiceE === void 0 ? false : _ref$isPictureChoiceE;
3074
+ isPictureChoiceEnabled = _ref$isPictureChoiceE === void 0 ? false : _ref$isPictureChoiceE,
3075
+ getQuestionMenuExtras = _ref.getQuestionMenuExtras;
3068
3076
  var queryClient = useQueryClient();
3069
3077
  var _useForm = useForm({
3070
3078
  formId: id,
@@ -3111,6 +3119,7 @@ var BuildForm = function BuildForm(_ref) {
3111
3119
  formDescription: formDescription,
3112
3120
  formTitle: formTitle,
3113
3121
  getActiveKindDetails: getActiveKindDetails,
3122
+ getQuestionMenuExtras: getQuestionMenuExtras,
3114
3123
  helpDocUrls: helpDocUrls,
3115
3124
  hostSpecificData: hostSpecificData,
3116
3125
  isDisabledFieldLabel: isDisabledFieldLabel,