react-survey-builder 1.0.31 → 1.0.33
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/index.js +1 -1
- package/lib/survey-elements/index.js +37 -27
- package/package.json +2 -2
@@ -133,7 +133,9 @@ var CustomDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2,
|
|
133
133
|
// `unmaskedValue` if `unmask=true`,
|
134
134
|
// `typedValue` if `unmask='typed'`
|
135
135
|
function onAccept(value, mask) {
|
136
|
-
onChange
|
136
|
+
if (onChange !== undefined) {
|
137
|
+
onChange(value);
|
138
|
+
}
|
137
139
|
}
|
138
140
|
}));
|
139
141
|
});
|
@@ -526,9 +528,11 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
526
528
|
var _this8 = this;
|
527
529
|
var props = {};
|
528
530
|
props.name = this.props.name;
|
529
|
-
props.placeholder = this.props.item.placeholder;
|
531
|
+
props.placeholder = this.props.item.placeholder || this.props.item.formatMask || 'MM/DD/YYYY';
|
530
532
|
props.onChange = function (val) {
|
531
|
-
_this8.props.onChange
|
533
|
+
if (_this8.props.onChange !== undefined) {
|
534
|
+
_this8.props.onChange(val);
|
535
|
+
}
|
532
536
|
};
|
533
537
|
props.value = this.props.value;
|
534
538
|
props.isInvalid = this.props.isInvalid;
|
@@ -559,30 +563,36 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
559
563
|
htmlFor: props.name
|
560
564
|
})), /*#__PURE__*/_react["default"].createElement("div", null, this.props.value)));
|
561
565
|
}
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
566
|
+
console.log(this.props);
|
567
|
+
console.log(props);
|
568
|
+
if (this.props) {
|
569
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
570
|
+
style: _objectSpread({}, this.props.style),
|
571
|
+
className: baseClasses
|
572
|
+
}, /*#__PURE__*/_react["default"].createElement(_componentHeader["default"], this.props), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Group, {
|
573
|
+
className: "form-group mb-3"
|
574
|
+
}, labelLocation === "FLOATING" ? /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Floating, null, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Control, (0, _extends2["default"])({
|
575
|
+
id: props.name,
|
576
|
+
type: "text"
|
577
|
+
}, props, {
|
578
|
+
as: CustomDateInput
|
579
|
+
})), /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], (0, _extends2["default"])({}, this.props, {
|
580
|
+
htmlFor: props.name
|
581
|
+
}))) : /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], (0, _extends2["default"])({}, this.props, {
|
582
|
+
htmlFor: props.name
|
583
|
+
})), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Control, (0, _extends2["default"])({
|
584
|
+
id: props.name,
|
585
|
+
type: "text"
|
586
|
+
}, props, {
|
587
|
+
as: CustomDateInput
|
588
|
+
}))), this.props.item.help ? /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Text, {
|
589
|
+
muted: true
|
590
|
+
}, this.props.item.help) : null, /*#__PURE__*/_react["default"].createElement(_componentErrorMessage["default"], {
|
591
|
+
name: props.name
|
592
|
+
})));
|
593
|
+
} else {
|
594
|
+
return null;
|
595
|
+
}
|
586
596
|
}
|
587
597
|
}]);
|
588
598
|
return DatePicker;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-survey-builder",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.33",
|
4
4
|
"description": "A complete survey builder for react.",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "types/index.d.ts",
|
@@ -52,7 +52,7 @@
|
|
52
52
|
"react-draft-wysiwyg": "^1.15.0",
|
53
53
|
"react-hook-form": "^7.45.4",
|
54
54
|
"react-icons": "^5.0.1",
|
55
|
-
"react-imask": "^7.0
|
55
|
+
"react-imask": "^7.5.0",
|
56
56
|
"react-intl": "^5.24.3",
|
57
57
|
"react-phone-number-input": "^3.3.9",
|
58
58
|
"react-signature-canvas": "^1.0.3",
|