react-survey-builder 1.0.34 → 1.0.36
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 +14 -2
- package/package.json +1 -1
@@ -35,7 +35,6 @@ var _ipUtils = require("../utils/ipUtils");
|
|
35
35
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
36
36
|
var _ri = require("react-icons/ri");
|
37
37
|
var _UUID = _interopRequireDefault(require("../UUID"));
|
38
|
-
var _md = require("react-icons/md");
|
39
38
|
var _io = require("react-icons/io5");
|
40
39
|
var _excluded = ["onChange"],
|
41
40
|
_excluded2 = ["onChange", "formatMask"]; // eslint-disable-next-line max-classes-per-file
|
@@ -48,6 +47,11 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
48
47
|
var CustomPhoneInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
49
48
|
var onChange = _ref.onChange,
|
50
49
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
50
|
+
Object.keys(otherProps).forEach(function (key) {
|
51
|
+
if (otherProps[key] === undefined) {
|
52
|
+
delete otherProps[key];
|
53
|
+
}
|
54
|
+
});
|
51
55
|
return /*#__PURE__*/_react["default"].createElement(_reactImask.IMaskInput, (0, _extends2["default"])({}, otherProps, {
|
52
56
|
mask: '{+1} (#00) 000-0000',
|
53
57
|
lazy: false,
|
@@ -77,11 +81,18 @@ var CustomDateInput = /*#__PURE__*/_react["default"].forwardRef(function (_ref2,
|
|
77
81
|
_ref2$formatMask = _ref2.formatMask,
|
78
82
|
formatMask = _ref2$formatMask === void 0 ? 'MM/DD/YYYY' : _ref2$formatMask,
|
79
83
|
otherProps = (0, _objectWithoutProperties2["default"])(_ref2, _excluded2);
|
84
|
+
console.log('otherProps', otherProps);
|
85
|
+
Object.keys(otherProps).forEach(function (key) {
|
86
|
+
if (otherProps[key] === undefined) {
|
87
|
+
delete otherProps[key];
|
88
|
+
}
|
89
|
+
});
|
90
|
+
console.log('otherProps', otherProps);
|
80
91
|
return /*#__PURE__*/_react["default"].createElement(_reactImask.IMaskInput, (0, _extends2["default"])({}, otherProps, {
|
81
92
|
mask: Date,
|
82
93
|
lazy: false,
|
83
94
|
overwrite: true,
|
84
|
-
pattern: formatMask,
|
95
|
+
pattern: formatMask !== null && formatMask !== void 0 ? formatMask : 'MM/DD/YYYY',
|
85
96
|
format: function format(date) {
|
86
97
|
var day = date.getDate();
|
87
98
|
var month = date.getMonth() + 1;
|
@@ -551,6 +562,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
551
562
|
var labelLocation = 'ABOVE';
|
552
563
|
if (this.props.item.labelLocation) {
|
553
564
|
labelLocation = this.props.item.labelLocation;
|
565
|
+
props.label = props.placeholder;
|
554
566
|
}
|
555
567
|
var baseClasses = 'SortableItem rfb-item';
|
556
568
|
if (this.props.item.pageBreakBefore) {
|