labellife-design-tool 2.2.7 → 2.2.9

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.
@@ -25,6 +25,9 @@ import CloseIcon from '@mui/icons-material/Close';
25
25
  import InputIcon from '@mui/icons-material/Input';
26
26
  import CalendarTodayIcon from '@mui/icons-material/CalendarToday';
27
27
  import NumbersIcon from '@mui/icons-material/Numbers';
28
+ import RadioButtonCheckedIcon from '@mui/icons-material/RadioButtonChecked';
29
+ import FormatListBulletedIcon from '@mui/icons-material/FormatListBulleted';
30
+ import AddIcon from '@mui/icons-material/Add';
28
31
 
29
32
  function _arrayLikeToArray(r, a) {
30
33
  (null == a || a > r.length) && (a = r.length);
@@ -4637,7 +4640,7 @@ function ImagesGrid(_ref) {
4637
4640
  });
4638
4641
  }
4639
4642
 
4640
- var _excluded = ["inputField", "promptText", "inputType", "required", "placeholder"];
4643
+ var _excluded = ["inputField", "promptText", "inputType", "required", "placeholder", "options", "minSelections", "maxSelections"];
4641
4644
  var IMAGE_PLACEHOLDER_SRC = "data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"400\" viewBox=\"0 0 400 400\">\n <rect width=\"400\" height=\"400\" fill=\"#f0f2f5\" rx=\"12\"/>\n <rect x=\"110\" y=\"90\" width=\"180\" height=\"145\" rx=\"10\" fill=\"#dde1e7\"/>\n <circle cx=\"158\" cy=\"135\" r=\"22\" fill=\"#f0f2f5\"/>\n <polygon points=\"110,235 168,163 210,205 250,163 290,235\" fill=\"#c8cdd6\"/>\n <rect x=\"140\" y=\"268\" width=\"120\" height=\"14\" rx=\"7\" fill=\"#c8cdd6\"/>\n <rect x=\"160\" y=\"292\" width=\"80\" height=\"10\" rx=\"5\" fill=\"#dde1e7\"/>\n </svg>"));
4642
4645
 
4643
4646
  // ── Date formatting helpers ──────────────────────────────────────────
@@ -4679,12 +4682,84 @@ function formatDate(date, format) {
4679
4682
  }
4680
4683
  }
4681
4684
 
4685
+ // ── Options list editor ──────────────────────────────────────────────
4686
+ var OptionsEditor = function OptionsEditor(_ref) {
4687
+ var options = _ref.options,
4688
+ _onChange = _ref.onChange;
4689
+ return /*#__PURE__*/jsxs(Box, {
4690
+ sx: {
4691
+ ml: 6.5,
4692
+ mr: 1,
4693
+ display: 'flex',
4694
+ flexDirection: 'column',
4695
+ gap: 0.75
4696
+ },
4697
+ children: [options.map(function (opt, i) {
4698
+ return /*#__PURE__*/jsxs(Box, {
4699
+ sx: {
4700
+ display: 'flex',
4701
+ gap: 0.5,
4702
+ alignItems: 'center'
4703
+ },
4704
+ children: [/*#__PURE__*/jsx(TextField, {
4705
+ size: "small",
4706
+ value: opt,
4707
+ onChange: function onChange(e) {
4708
+ var next = _toConsumableArray(options);
4709
+ next[i] = e.target.value;
4710
+ _onChange(next);
4711
+ },
4712
+ placeholder: "Option ".concat(i + 1),
4713
+ sx: {
4714
+ flex: 1,
4715
+ '& .MuiInputBase-input': {
4716
+ fontSize: 12,
4717
+ py: 0.75
4718
+ }
4719
+ }
4720
+ }), /*#__PURE__*/jsx(IconButton, {
4721
+ size: "small",
4722
+ onClick: function onClick() {
4723
+ return _onChange(options.filter(function (_, j) {
4724
+ return j !== i;
4725
+ }));
4726
+ },
4727
+ disabled: options.length <= 1,
4728
+ sx: {
4729
+ color: '#bbb',
4730
+ '&:hover': {
4731
+ color: '#e57373'
4732
+ }
4733
+ },
4734
+ children: /*#__PURE__*/jsx(DeleteIcon, {
4735
+ fontSize: "small"
4736
+ })
4737
+ })]
4738
+ }, i);
4739
+ }), /*#__PURE__*/jsx(Button, {
4740
+ size: "small",
4741
+ startIcon: /*#__PURE__*/jsx(AddIcon, {}),
4742
+ onClick: function onClick() {
4743
+ return _onChange([].concat(_toConsumableArray(options), ['']));
4744
+ },
4745
+ sx: {
4746
+ alignSelf: 'flex-start',
4747
+ fontSize: 11,
4748
+ textTransform: 'none',
4749
+ color: '#0d83cd',
4750
+ p: 0.5
4751
+ },
4752
+ children: "Add option"
4753
+ })]
4754
+ });
4755
+ };
4756
+
4682
4757
  // ── Card component ───────────────────────────────────────────────────
4683
- var InputFieldCard = function InputFieldCard(_ref) {
4684
- var icon = _ref.icon,
4685
- label = _ref.label,
4686
- description = _ref.description,
4687
- onClick = _ref.onClick;
4758
+ var InputFieldCard = function InputFieldCard(_ref2) {
4759
+ var icon = _ref2.icon,
4760
+ label = _ref2.label,
4761
+ description = _ref2.description,
4762
+ onClick = _ref2.onClick;
4688
4763
  return /*#__PURE__*/jsxs(Box, {
4689
4764
  onClick: onClick,
4690
4765
  sx: {
@@ -4740,8 +4815,8 @@ var InputFieldCard = function InputFieldCard(_ref) {
4740
4815
  };
4741
4816
 
4742
4817
  // ── Panel content ────────────────────────────────────────────────────
4743
- var InputFieldsPanelContent = observer(function (_ref2) {
4744
- var store = _ref2.store;
4818
+ var InputFieldsPanelContent = observer(function (_ref3) {
4819
+ var store = _ref3.store;
4745
4820
  var _useState = useState('MM-DD-YYYY'),
4746
4821
  _useState2 = _slicedToArray(_useState, 2),
4747
4822
  dateFormat = _useState2[0],
@@ -4778,6 +4853,34 @@ var InputFieldsPanelContent = observer(function (_ref2) {
4778
4853
  _useState16 = _slicedToArray(_useState15, 2),
4779
4854
  imageRequired = _useState16[0],
4780
4855
  setImageRequired = _useState16[1];
4856
+ var _useState17 = useState(''),
4857
+ _useState18 = _slicedToArray(_useState17, 2),
4858
+ radioPrompt = _useState18[0],
4859
+ setRadioPrompt = _useState18[1];
4860
+ var _useState19 = useState(false),
4861
+ _useState20 = _slicedToArray(_useState19, 2),
4862
+ radioRequired = _useState20[0],
4863
+ setRadioRequired = _useState20[1];
4864
+ var _useState21 = useState(['Option 1', 'Option 2']),
4865
+ _useState22 = _slicedToArray(_useState21, 2),
4866
+ radioOptions = _useState22[0],
4867
+ setRadioOptions = _useState22[1];
4868
+ var _useState23 = useState(''),
4869
+ _useState24 = _slicedToArray(_useState23, 2),
4870
+ listPrompt = _useState24[0],
4871
+ setListPrompt = _useState24[1];
4872
+ var _useState25 = useState(0),
4873
+ _useState26 = _slicedToArray(_useState25, 2),
4874
+ listMinSelections = _useState26[0],
4875
+ setListMinSelections = _useState26[1];
4876
+ var _useState27 = useState(2),
4877
+ _useState28 = _slicedToArray(_useState27, 2),
4878
+ listMaxSelections = _useState28[0],
4879
+ setListMaxSelections = _useState28[1];
4880
+ var _useState29 = useState(['Option 1', 'Option 2']),
4881
+ _useState30 = _slicedToArray(_useState29, 2),
4882
+ listOptions = _useState30[0],
4883
+ setListOptions = _useState30[1];
4781
4884
  var addInputElement = function addInputElement(inputType) {
4782
4885
  var extra = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4783
4886
  var page = store.activePage;
@@ -4820,6 +4923,16 @@ var InputFieldsPanelContent = observer(function (_ref2) {
4820
4923
  placeholder = t('sidePanel.inputFields.integerPlaceholder', 'Enter number');
4821
4924
  defaultPrompt = t('sidePanel.inputFields.defaultIntegerPrompt', 'Please enter a number');
4822
4925
  break;
4926
+ case 'radio':
4927
+ dummyText = (extra.options || []).filter(Boolean)[0] || 'Option 1';
4928
+ placeholder = t('sidePanel.inputFields.radioPlaceholder', 'Select an option');
4929
+ defaultPrompt = t('sidePanel.inputFields.defaultRadioPrompt', 'Please select an option');
4930
+ break;
4931
+ case 'list':
4932
+ dummyText = (extra.options || []).filter(Boolean).slice(0, 2).join(', ') || 'Option 1, Option 2';
4933
+ placeholder = t('sidePanel.inputFields.listPlaceholder', 'Select options');
4934
+ defaultPrompt = t('sidePanel.inputFields.defaultListPrompt', 'Please select options');
4935
+ break;
4823
4936
  default:
4824
4937
  dummyText = 'Input';
4825
4938
  placeholder = 'Input';
@@ -4838,7 +4951,7 @@ var InputFieldsPanelContent = observer(function (_ref2) {
4838
4951
  fontFamily: 'Roboto',
4839
4952
  align: 'center',
4840
4953
  fill: '#333333',
4841
- custom: _objectSpread2({
4954
+ custom: _objectSpread2(_objectSpread2(_objectSpread2({
4842
4955
  inputField: true,
4843
4956
  inputType: inputType,
4844
4957
  placeholder: placeholder,
@@ -4846,6 +4959,11 @@ var InputFieldsPanelContent = observer(function (_ref2) {
4846
4959
  required: extra.required || false
4847
4960
  }, inputType === 'date' ? {
4848
4961
  dateFormat: extra.dateFormat || 'MM-DD-YYYY'
4962
+ } : {}), ['radio', 'list'].includes(inputType) ? {
4963
+ options: (extra.options || []).filter(Boolean)
4964
+ } : {}), inputType === 'list' ? {
4965
+ minSelections: extra.minSelections || 0,
4966
+ maxSelections: extra.maxSelections || 0
4849
4967
  } : {})
4850
4968
  });
4851
4969
  }
@@ -5087,6 +5205,138 @@ var InputFieldsPanelContent = observer(function (_ref2) {
5087
5205
  sx: {
5088
5206
  ml: 5.5
5089
5207
  }
5208
+ }), /*#__PURE__*/jsx(InputFieldCard, {
5209
+ icon: /*#__PURE__*/jsx(RadioButtonCheckedIcon, {
5210
+ fontSize: "small"
5211
+ }),
5212
+ label: t('sidePanel.inputFields.radioInput', 'Radio Input'),
5213
+ description: t('sidePanel.inputFields.radioInputDesc', 'Single option selection'),
5214
+ onClick: function onClick() {
5215
+ return addInputElement('radio', {
5216
+ promptText: radioPrompt,
5217
+ required: radioRequired,
5218
+ options: radioOptions
5219
+ });
5220
+ }
5221
+ }), /*#__PURE__*/jsx(TextField, {
5222
+ size: "small",
5223
+ placeholder: t('sidePanel.inputFields.promptTextHint', 'Prompt text shown to user...'),
5224
+ value: radioPrompt,
5225
+ onChange: function onChange(e) {
5226
+ return setRadioPrompt(e.target.value);
5227
+ },
5228
+ sx: {
5229
+ ml: 6.5,
5230
+ mr: 1,
5231
+ '& .MuiInputBase-input': {
5232
+ fontSize: 12,
5233
+ py: 0.75
5234
+ }
5235
+ }
5236
+ }), /*#__PURE__*/jsx(FormControlLabel, {
5237
+ control: /*#__PURE__*/jsx(Checkbox, {
5238
+ size: "small",
5239
+ checked: radioRequired,
5240
+ onChange: function onChange(e) {
5241
+ return setRadioRequired(e.target.checked);
5242
+ }
5243
+ }),
5244
+ label: /*#__PURE__*/jsx(Typography, {
5245
+ sx: {
5246
+ fontSize: 12
5247
+ },
5248
+ children: t('sidePanel.inputFields.required', 'Required')
5249
+ }),
5250
+ sx: {
5251
+ ml: 5.5
5252
+ }
5253
+ }), /*#__PURE__*/jsx(OptionsEditor, {
5254
+ options: radioOptions,
5255
+ onChange: setRadioOptions
5256
+ }), /*#__PURE__*/jsx(InputFieldCard, {
5257
+ icon: /*#__PURE__*/jsx(FormatListBulletedIcon, {
5258
+ fontSize: "small"
5259
+ }),
5260
+ label: t('sidePanel.inputFields.listInput', 'List Input'),
5261
+ description: t('sidePanel.inputFields.listInputDesc', 'Multiple option selection'),
5262
+ onClick: function onClick() {
5263
+ return addInputElement('list', {
5264
+ promptText: listPrompt,
5265
+ minSelections: listMinSelections,
5266
+ maxSelections: listMaxSelections,
5267
+ options: listOptions
5268
+ });
5269
+ }
5270
+ }), /*#__PURE__*/jsx(TextField, {
5271
+ size: "small",
5272
+ placeholder: t('sidePanel.inputFields.promptTextHint', 'Prompt text shown to user...'),
5273
+ value: listPrompt,
5274
+ onChange: function onChange(e) {
5275
+ return setListPrompt(e.target.value);
5276
+ },
5277
+ sx: {
5278
+ ml: 6.5,
5279
+ mr: 1,
5280
+ '& .MuiInputBase-input': {
5281
+ fontSize: 12,
5282
+ py: 0.75
5283
+ }
5284
+ }
5285
+ }), /*#__PURE__*/jsx(OptionsEditor, {
5286
+ options: listOptions,
5287
+ onChange: setListOptions
5288
+ }), /*#__PURE__*/jsxs(Box, {
5289
+ sx: {
5290
+ display: 'flex',
5291
+ gap: 1,
5292
+ ml: 6.5,
5293
+ mr: 1
5294
+ },
5295
+ children: [/*#__PURE__*/jsx(TextField, {
5296
+ size: "small",
5297
+ type: "number",
5298
+ label: t('sidePanel.inputFields.minSelections', 'Min select'),
5299
+ value: listMinSelections,
5300
+ onChange: function onChange(e) {
5301
+ return setListMinSelections(Math.max(0, parseInt(e.target.value) || 0));
5302
+ },
5303
+ inputProps: {
5304
+ min: 0
5305
+ },
5306
+ sx: {
5307
+ flex: 1,
5308
+ '& .MuiInputBase-input': {
5309
+ fontSize: 12,
5310
+ py: 0.75
5311
+ }
5312
+ }
5313
+ }), /*#__PURE__*/jsx(TextField, {
5314
+ size: "small",
5315
+ type: "number",
5316
+ label: t('sidePanel.inputFields.maxSelections', 'Max select'),
5317
+ value: listMaxSelections,
5318
+ onChange: function onChange(e) {
5319
+ return setListMaxSelections(Math.max(0, parseInt(e.target.value) || 0));
5320
+ },
5321
+ inputProps: {
5322
+ min: 0
5323
+ },
5324
+ sx: {
5325
+ flex: 1,
5326
+ '& .MuiInputBase-input': {
5327
+ fontSize: 12,
5328
+ py: 0.75
5329
+ }
5330
+ }
5331
+ })]
5332
+ }), /*#__PURE__*/jsx(Typography, {
5333
+ variant: "caption",
5334
+ sx: {
5335
+ ml: 6.5,
5336
+ color: '#999',
5337
+ fontSize: 10
5338
+ },
5339
+ children: listMinSelections > 0 ? "Required \xB7 min ".concat(listMinSelections).concat(listMaxSelections > 0 ? ", max ".concat(listMaxSelections) : ', no max') : "Optional \xB7 max ".concat(listMaxSelections > 0 ? listMaxSelections : '∞')
5090
5340
  })]
5091
5341
  }), /*#__PURE__*/jsx(Divider, {
5092
5342
  sx: {
@@ -5116,21 +5366,33 @@ var InputFieldsPanelContent = observer(function (_ref2) {
5116
5366
  });
5117
5367
 
5118
5368
  // ── Mark-as-variable sub-form ─────────────────────────────────────────
5119
- var MarkAsVariableForm = observer(function (_ref3) {
5369
+ var MarkAsVariableForm = observer(function (_ref4) {
5120
5370
  var _selectedElement$cust;
5121
- var store = _ref3.store;
5122
- var _useState17 = useState(''),
5123
- _useState18 = _slicedToArray(_useState17, 2),
5124
- markLabel = _useState18[0],
5125
- setMarkLabel = _useState18[1];
5126
- var _useState19 = useState(false),
5127
- _useState20 = _slicedToArray(_useState19, 2),
5128
- markRequired = _useState20[0],
5129
- setMarkRequired = _useState20[1];
5130
- var _useState21 = useState('text'),
5131
- _useState22 = _slicedToArray(_useState21, 2),
5132
- markInputType = _useState22[0],
5133
- setMarkInputType = _useState22[1];
5371
+ var store = _ref4.store;
5372
+ var _useState31 = useState(''),
5373
+ _useState32 = _slicedToArray(_useState31, 2),
5374
+ markLabel = _useState32[0],
5375
+ setMarkLabel = _useState32[1];
5376
+ var _useState33 = useState(false),
5377
+ _useState34 = _slicedToArray(_useState33, 2),
5378
+ markRequired = _useState34[0],
5379
+ setMarkRequired = _useState34[1];
5380
+ var _useState35 = useState('text'),
5381
+ _useState36 = _slicedToArray(_useState35, 2),
5382
+ markInputType = _useState36[0],
5383
+ setMarkInputType = _useState36[1];
5384
+ var _useState37 = useState(['Option 1', 'Option 2']),
5385
+ _useState38 = _slicedToArray(_useState37, 2),
5386
+ markOptions = _useState38[0],
5387
+ setMarkOptions = _useState38[1];
5388
+ var _useState39 = useState(0),
5389
+ _useState40 = _slicedToArray(_useState39, 2),
5390
+ markMinSelections = _useState40[0],
5391
+ setMarkMinSelections = _useState40[1];
5392
+ var _useState41 = useState(2),
5393
+ _useState42 = _slicedToArray(_useState41, 2),
5394
+ markMaxSelections = _useState42[0],
5395
+ setMarkMaxSelections = _useState42[1];
5134
5396
  var selectedIds = store.selectedElementsIds || [];
5135
5397
  var selectedElement = selectedIds.length === 1 ? store.getElementById(selectedIds[0]) : null;
5136
5398
  var isImageElement = (selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.type) === 'image';
@@ -5139,37 +5401,52 @@ var MarkAsVariableForm = observer(function (_ref3) {
5139
5401
  var isAlreadyVariable = !!(selectedElement !== null && selectedElement !== void 0 && (_selectedElement$cust = selectedElement.custom) !== null && _selectedElement$cust !== void 0 && _selectedElement$cust.inputField);
5140
5402
  useEffect(function () {
5141
5403
  if (selectedElement && isSupportedElement) {
5142
- var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4;
5404
+ var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4, _selectedElement$cust5, _selectedElement$cust6, _selectedElement$cust7;
5143
5405
  setMarkLabel(((_selectedElement$cust2 = selectedElement.custom) === null || _selectedElement$cust2 === void 0 ? void 0 : _selectedElement$cust2.promptText) || '');
5144
5406
  setMarkRequired(!!((_selectedElement$cust3 = selectedElement.custom) !== null && _selectedElement$cust3 !== void 0 && _selectedElement$cust3.required));
5145
5407
  setMarkInputType(isImageElement ? 'image' : ((_selectedElement$cust4 = selectedElement.custom) === null || _selectedElement$cust4 === void 0 ? void 0 : _selectedElement$cust4.inputType) || 'text');
5408
+ setMarkOptions(((_selectedElement$cust5 = selectedElement.custom) === null || _selectedElement$cust5 === void 0 ? void 0 : _selectedElement$cust5.options) || ['Option 1', 'Option 2']);
5409
+ setMarkMinSelections(((_selectedElement$cust6 = selectedElement.custom) === null || _selectedElement$cust6 === void 0 ? void 0 : _selectedElement$cust6.minSelections) || 0);
5410
+ setMarkMaxSelections(((_selectedElement$cust7 = selectedElement.custom) === null || _selectedElement$cust7 === void 0 ? void 0 : _selectedElement$cust7.maxSelections) || 2);
5146
5411
  } else {
5147
5412
  setMarkLabel('');
5148
5413
  setMarkRequired(false);
5149
5414
  setMarkInputType('text');
5415
+ setMarkOptions(['Option 1', 'Option 2']);
5416
+ setMarkMinSelections(0);
5417
+ setMarkMaxSelections(2);
5150
5418
  }
5151
5419
  }, [selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.id]);
5152
5420
  var handleMark = function handleMark() {
5153
5421
  if (!selectedElement || !markLabel.trim()) return;
5422
+ var effectiveType = isImageElement ? 'image' : markInputType;
5154
5423
  selectedElement.set({
5155
- custom: _objectSpread2(_objectSpread2({}, selectedElement.custom), {}, {
5424
+ custom: _objectSpread2(_objectSpread2(_objectSpread2({}, selectedElement.custom), {}, {
5156
5425
  inputField: true,
5157
5426
  promptText: markLabel.trim(),
5158
- inputType: isImageElement ? 'image' : markInputType,
5427
+ inputType: effectiveType,
5159
5428
  required: markRequired
5160
- })
5429
+ }, ['radio', 'list'].includes(effectiveType) ? {
5430
+ options: markOptions.filter(Boolean)
5431
+ } : {}), effectiveType === 'list' ? {
5432
+ minSelections: markMinSelections,
5433
+ maxSelections: markMaxSelections
5434
+ } : {})
5161
5435
  });
5162
5436
  store.history.addUndoState();
5163
5437
  };
5164
5438
  var handleUnmark = function handleUnmark() {
5165
5439
  if (!selectedElement) return;
5166
- var _ref4 = selectedElement.custom || {};
5167
- _ref4.inputField;
5168
- _ref4.promptText;
5169
- _ref4.inputType;
5170
- _ref4.required;
5171
- _ref4.placeholder;
5172
- var rest = _objectWithoutProperties(_ref4, _excluded);
5440
+ var _ref5 = selectedElement.custom || {};
5441
+ _ref5.inputField;
5442
+ _ref5.promptText;
5443
+ _ref5.inputType;
5444
+ _ref5.required;
5445
+ _ref5.placeholder;
5446
+ _ref5.options;
5447
+ _ref5.minSelections;
5448
+ _ref5.maxSelections;
5449
+ var rest = _objectWithoutProperties(_ref5, _excluded);
5173
5450
  selectedElement.set({
5174
5451
  custom: rest
5175
5452
  });
@@ -5294,9 +5571,84 @@ var MarkAsVariableForm = observer(function (_ref3) {
5294
5571
  fontSize: 12
5295
5572
  },
5296
5573
  children: t('sidePanel.inputFields.dateInput', 'Date Input')
5574
+ }), /*#__PURE__*/jsx(MenuItem, {
5575
+ value: "radio",
5576
+ sx: {
5577
+ fontSize: 12
5578
+ },
5579
+ children: t('sidePanel.inputFields.radioInput', 'Radio Input')
5580
+ }), /*#__PURE__*/jsx(MenuItem, {
5581
+ value: "list",
5582
+ sx: {
5583
+ fontSize: 12
5584
+ },
5585
+ children: t('sidePanel.inputFields.listInput', 'List Input')
5297
5586
  })]
5298
5587
  })]
5299
- }), /*#__PURE__*/jsx(FormControlLabel, {
5588
+ }), isTextElement && (markInputType === 'radio' || markInputType === 'list') && /*#__PURE__*/jsxs(Fragment, {
5589
+ children: [/*#__PURE__*/jsx(Typography, {
5590
+ variant: "caption",
5591
+ sx: {
5592
+ color: '#888',
5593
+ fontSize: 11
5594
+ },
5595
+ children: "Options"
5596
+ }), /*#__PURE__*/jsx(OptionsEditor, {
5597
+ options: markOptions,
5598
+ onChange: setMarkOptions
5599
+ })]
5600
+ }), isTextElement && markInputType === 'list' && /*#__PURE__*/jsxs(Fragment, {
5601
+ children: [/*#__PURE__*/jsxs(Box, {
5602
+ sx: {
5603
+ display: 'flex',
5604
+ gap: 1
5605
+ },
5606
+ children: [/*#__PURE__*/jsx(TextField, {
5607
+ size: "small",
5608
+ type: "number",
5609
+ label: t('sidePanel.inputFields.minSelections', 'Min select'),
5610
+ value: markMinSelections,
5611
+ onChange: function onChange(e) {
5612
+ return setMarkMinSelections(Math.max(0, parseInt(e.target.value) || 0));
5613
+ },
5614
+ inputProps: {
5615
+ min: 0
5616
+ },
5617
+ sx: {
5618
+ flex: 1,
5619
+ '& .MuiInputBase-input': {
5620
+ fontSize: 12,
5621
+ py: 0.75
5622
+ }
5623
+ }
5624
+ }), /*#__PURE__*/jsx(TextField, {
5625
+ size: "small",
5626
+ type: "number",
5627
+ label: t('sidePanel.inputFields.maxSelections', 'Max select'),
5628
+ value: markMaxSelections,
5629
+ onChange: function onChange(e) {
5630
+ return setMarkMaxSelections(Math.max(0, parseInt(e.target.value) || 0));
5631
+ },
5632
+ inputProps: {
5633
+ min: 0
5634
+ },
5635
+ sx: {
5636
+ flex: 1,
5637
+ '& .MuiInputBase-input': {
5638
+ fontSize: 12,
5639
+ py: 0.75
5640
+ }
5641
+ }
5642
+ })]
5643
+ }), /*#__PURE__*/jsx(Typography, {
5644
+ variant: "caption",
5645
+ sx: {
5646
+ color: '#999',
5647
+ fontSize: 10
5648
+ },
5649
+ children: markMinSelections > 0 ? "Required \xB7 min ".concat(markMinSelections).concat(markMaxSelections > 0 ? ", max ".concat(markMaxSelections) : ', no max') : "Optional \xB7 max ".concat(markMaxSelections > 0 ? markMaxSelections : '∞')
5650
+ })]
5651
+ }), (!isTextElement || markInputType !== 'list') && /*#__PURE__*/jsx(FormControlLabel, {
5300
5652
  control: /*#__PURE__*/jsx(Checkbox, {
5301
5653
  size: "small",
5302
5654
  checked: markRequired,