@goldenpine/react-form-builder2 0.20.3-build.21 → 0.20.3-build.22

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.
@@ -890,11 +890,11 @@ var Camera = /*#__PURE__*/function (_React$Component17) {
890
890
  name: name,
891
891
  type: "file",
892
892
  accept: "image/*",
893
- capture: "camera",
894
893
  className: "visually-hidden",
895
894
  onChange: this.displayImage,
896
- id: name,
897
- disabled: this.props.read_only
895
+ "data-clearlabel": this.props.data.label_after_photo_clear_icon,
896
+ disabled: this.props.read_only,
897
+ id: name
898
898
  }), /*#__PURE__*/_react["default"].createElement("label", {
899
899
  htmlFor: name,
900
900
  className: "upload-card-content"
@@ -134,6 +134,18 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
134
134
  });
135
135
  }
136
136
  }
137
+ }, {
138
+ key: "validateImageSize",
139
+ value: function validateImageSize(e) {
140
+ var regex = /^$|^\d+(px|%)$/;
141
+ if (regex.test(e.target.value)) {
142
+ e.target.classList.remove("is-invalid");
143
+ e.target.classList.add("is-valid");
144
+ } else {
145
+ e.target.classList.remove("is-valid");
146
+ e.target.classList.add("is-invalid");
147
+ }
148
+ }
137
149
  }, {
138
150
  key: "render",
139
151
  value: function render() {
@@ -473,6 +485,8 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
473
485
  id: "elementWidth",
474
486
  type: "text",
475
487
  className: "form-control",
488
+ pattern: "^$|^\\d+(px|%)$",
489
+ onInput: this.validateImageSize,
476
490
  defaultValue: this.props.element.width,
477
491
  onBlur: this.updateElement.bind(this),
478
492
  onChange: this.editElementProp.bind(this, 'width', 'value')
@@ -487,6 +501,8 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
487
501
  id: "elementHeight",
488
502
  type: "text",
489
503
  className: "form-control",
504
+ pattern: "^$|^\\d+(px|%)$",
505
+ onInput: this.validateImageSize,
490
506
  defaultValue: this.props.element.height,
491
507
  onBlur: this.updateElement.bind(this),
492
508
  onChange: this.editElementProp.bind(this, 'height', 'value')
@@ -39,7 +39,7 @@
39
39
  "ppt" : "PPT",
40
40
  "upload-layout" : "Upload Area Layout",
41
41
  "upload-layout-standard" : "Standard",
42
- "upload-layout-dropzone" : "Dropzone",
42
+ "upload-layout-dropzone" : "Large upload area",
43
43
  "image-layout" : "Image Layout",
44
44
  "display-label-after-camera-icon" : "Display label on button",
45
45
  "place-holder-display-label-after-camera-icon" : "Upload Photo",
@@ -39,7 +39,7 @@
39
39
  "ppt": "PPT",
40
40
  "upload-layout" : "چیدمان بخش بارگذاری",
41
41
  "upload-layout-standard" : "استاندارد",
42
- "upload-layout-dropzone" : "رها کردن فایل",
42
+ "upload-layout-dropzone" : "بخش بارگذاری بزرگ",
43
43
  "image-layout" : "چیدمان تصویر",
44
44
  "display-label-after-camera-icon" : "نمایش برچسب پس از آیکون دوربین",
45
45
  "place-holder-display-label-after-camera-icon" : "آپلود عکس",
@@ -39,7 +39,7 @@
39
39
  "ppt" : "PPT",
40
40
  "upload-layout" : "Layout dell'area di caricamento",
41
41
  "upload-layout-standard" : "Standard",
42
- "upload-layout-dropzone" : "Area di rilascio",
42
+ "upload-layout-dropzone" : "Area di caricamento grande",
43
43
  "image-layout" : "Layout dell'immagine",
44
44
  "display-label-after-camera-icon" : "Mostra etichetta dopo l'icona della fotocamera",
45
45
  "place-holder-display-label-after-camera-icon" : "Carica foto",
@@ -39,7 +39,7 @@
39
39
  "ppt" : "PPT",
40
40
  "upload-layout" : "Bố cục khu vực tải lên",
41
41
  "upload-layout-standard" : "Tiêu chuẩn",
42
- "upload-layout-dropzone" : "Vùng thả tệp",
42
+ "upload-layout-dropzone" : "Khu vực tải lên lớn",
43
43
  "image-layout" : "Bố cục hình ảnh",
44
44
  "display-label-after-camera-icon" : "Hiển thị nhãn sau biểu tượng máy ảnh",
45
45
  "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.21",
3
+ "version": "0.20.3-build.22",
4
4
  "description": "A complete form builder for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",