@goldenpine/react-form-builder2 0.20.3-build.10 → 0.20.3-build.12

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.
@@ -552,7 +552,8 @@ var Checkboxes = /*#__PURE__*/function (_React$Component11) {
552
552
  if (c && self.props.mutable) {
553
553
  self.options["child_ref_".concat(option.key)] = c;
554
554
  }
555
- }
555
+ },
556
+ "data-required-checks": _this0.props.data.checkbox_required_checks ? _this0.props.data.checkbox_required_checks : '1'
556
557
  }, props)), /*#__PURE__*/_react["default"].createElement("label", {
557
558
  className: "custom-control-label",
558
559
  htmlFor: "fid_".concat(this_key)
@@ -837,12 +838,11 @@ var Camera = /*#__PURE__*/function (_React$Component17) {
837
838
  type: "file",
838
839
  accept: "image/*",
839
840
  capture: "camera",
840
- className: "image-upload",
841
+ className: "image-upload visually-hidden",
841
842
  onChange: this.displayImage,
842
843
  "data-clearlabel": this.props.data.label_after_photo_clear_icon,
843
844
  disabled: this.props.read_only,
844
- id: name,
845
- hidden: true
845
+ id: name
846
846
  }), /*#__PURE__*/_react["default"].createElement("div", {
847
847
  className: "image-upload-control",
848
848
  style: {
@@ -970,12 +970,11 @@ var FileUpload = /*#__PURE__*/function (_React$Component18) {
970
970
  name: name,
971
971
  type: "file",
972
972
  accept: this.props.data.fileType || '*',
973
- className: "image-upload",
973
+ className: "image-upload visually-hidden",
974
974
  onChange: this.displayFileUpload,
975
975
  "data-clearlabel": this.props.data.label_after_file_clear_icon,
976
976
  disabled: this.props.read_only,
977
- id: name,
978
- hidden: true
977
+ id: name
979
978
  }), /*#__PURE__*/_react["default"].createElement("div", {
980
979
  className: "image-upload-control",
981
980
  style: {
@@ -125,6 +125,7 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
125
125
  }, {
126
126
  key: "render",
127
127
  value: function render() {
128
+ var _this$props$element$c;
128
129
  if (this.state.dirty) {
129
130
  this.props.element.dirty = true;
130
131
  }
@@ -231,7 +232,25 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
231
232
  htmlFor: "is-required"
232
233
  }, /*#__PURE__*/_react["default"].createElement(_IntlMessages["default"], {
233
234
  id: "required"
234
- }))), this.props.element.hasOwnProperty('readOnly') && /*#__PURE__*/_react["default"].createElement("div", {
235
+ }))), this_checked && this.state.element.element === 'Checkboxes' && /*#__PURE__*/_react["default"].createElement("div", {
236
+ className: "d-flex align-items-center gap-2"
237
+ }, /*#__PURE__*/_react["default"].createElement("label", {
238
+ className: "form-label mb-0",
239
+ htmlFor: "checkbox-required-checks"
240
+ }, /*#__PURE__*/_react["default"].createElement(_IntlMessages["default"], {
241
+ id: "minimum-number-of-selections"
242
+ }), ":"), /*#__PURE__*/_react["default"].createElement("input", {
243
+ id: "checkbox-required-checks",
244
+ type: "number",
245
+ min: "1",
246
+ className: "form-control d-inline-block",
247
+ style: {
248
+ width: '8ch'
249
+ },
250
+ value: (_this$props$element$c = this.props.element.checkbox_required_checks) !== null && _this$props$element$c !== void 0 ? _this$props$element$c : '1',
251
+ onBlur: this.updateElement.bind(this),
252
+ onChange: this.editElementProp.bind(this, 'checkbox_required_checks', 'value')
253
+ })), this.props.element.hasOwnProperty('readOnly') && /*#__PURE__*/_react["default"].createElement("div", {
235
254
  className: "custom-control custom-checkbox"
236
255
  }, /*#__PURE__*/_react["default"].createElement("input", {
237
256
  id: "is-read-only",
@@ -31,6 +31,7 @@
31
31
  "description": "Description",
32
32
  "correct-answer" : "Correct Answer",
33
33
  "populate-options-from-api" : "Populate Options from API",
34
+ "minimum-number-of-selections" : "The minimum number of options a customer must select",
34
35
  "populate" : "Populate",
35
36
  "pdf" : "PDF",
36
37
  "word" : "Word",
@@ -31,6 +31,7 @@
31
31
  "description": "توضیحات",
32
32
  "correct-answer": "پاسخ صحیح",
33
33
  "populate-options-from-api": "پر کردن گزینه‌ها از API",
34
+ "minimum-number-of-selections" : "حداقل تعداد گزینه‌هایی که مشتری باید انتخاب کند",
34
35
  "populate": "پر کردن",
35
36
  "pdf": "PDF",
36
37
  "word": "Word",
@@ -31,6 +31,7 @@
31
31
  "description": "Descrizione",
32
32
  "correct-answer" : "Risposta corretta",
33
33
  "populate-options-from-api" : "Popola opzione da API",
34
+ "minimum-number-of-selections" : "Il numero minimo di opzioni che un cliente deve selezionare",
34
35
  "populate" : "Popola",
35
36
  "pdf" : "PDF",
36
37
  "word" : "Word",
@@ -29,6 +29,7 @@
29
29
  "description": "Mô tả",
30
30
  "correct-answer": "Lựa chọn đúng",
31
31
  "populate-options-from-api": "Lấy dữ liệu từ API",
32
+ "minimum-number-of-selections" : "Số lượng lựa chọn tối thiểu mà khách hàng phải chọn",
32
33
  "populate": "Thực hiện",
33
34
  "display-label-after-camera-icon" : "Hiển thị nhãn sau biểu tượng máy ảnh",
34
35
  "place-holder-display-label-after-camera-icon" : "Tải ảnh lên",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goldenpine/react-form-builder2",
3
- "version": "0.20.3-build.10",
3
+ "version": "0.20.3-build.12",
4
4
  "description": "A complete form builder for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",