react-survey-builder 1.0.37 → 1.0.39
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 +15 -18
- package/package.json +2 -3
@@ -536,10 +536,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
536
536
|
(0, _createClass2["default"])(DatePicker, [{
|
537
537
|
key: "render",
|
538
538
|
value: function render() {
|
539
|
-
var _this8 = this
|
540
|
-
_this$props$value,
|
541
|
-
_this$props$isInvalid,
|
542
|
-
_this$props$onBlur;
|
539
|
+
var _this8 = this;
|
543
540
|
var props = {};
|
544
541
|
props.name = this.props.name;
|
545
542
|
props.placeholder = this.props.item.placeholder || this.props.item.formatMask || 'MM/DD/YYYY';
|
@@ -548,12 +545,12 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
548
545
|
_this8.props.onChange(val);
|
549
546
|
}
|
550
547
|
};
|
551
|
-
props.value =
|
552
|
-
props.isInvalid =
|
553
|
-
props.onBlur =
|
548
|
+
props.value = this.props.value;
|
549
|
+
props.isInvalid = this.props.isInvalid;
|
550
|
+
props.onBlur = this.props.onBlur;
|
554
551
|
props.autoComplete = "new-password";
|
555
552
|
if (this.props.item.disabled) {
|
556
|
-
props.disabled =
|
553
|
+
props.disabled = true;
|
557
554
|
}
|
558
555
|
if (this.props.item.mutable) {
|
559
556
|
props.ref = this.inputField;
|
@@ -578,8 +575,8 @@ var DatePicker = /*#__PURE__*/function (_React$Component9) {
|
|
578
575
|
htmlFor: props.name
|
579
576
|
})), /*#__PURE__*/_react["default"].createElement("div", null, this.props.value)));
|
580
577
|
}
|
581
|
-
console.log(this.props);
|
582
|
-
console.log(props);
|
578
|
+
console.log('this.props', this.props);
|
579
|
+
console.log('props', props);
|
583
580
|
Object.keys(props).forEach(function (key) {
|
584
581
|
if (props[key] === undefined) {
|
585
582
|
delete props[key];
|
@@ -946,13 +943,13 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
946
943
|
value: function render() {
|
947
944
|
var _this$state$value,
|
948
945
|
_this$state$value2,
|
946
|
+
_this$props$value6,
|
949
947
|
_this$props$value7,
|
950
948
|
_this$props$value8,
|
951
949
|
_this$props$value9,
|
952
|
-
_this$props$value10,
|
953
950
|
_this16 = this,
|
954
951
|
_this$props$value$nam,
|
955
|
-
_this$props$
|
952
|
+
_this$props$value10;
|
956
953
|
var canClear = !!this.state.value;
|
957
954
|
var props = {};
|
958
955
|
props.name = this.props.name;
|
@@ -964,8 +961,8 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
964
961
|
var padProps = {};
|
965
962
|
// umd requires canvasProps={{ width: 400, height: 150 }}
|
966
963
|
if (this.props.item.mutable) {
|
967
|
-
var _this$props$
|
968
|
-
padProps.defaultValue = (_this$props$
|
964
|
+
var _this$props$value;
|
965
|
+
padProps.defaultValue = (_this$props$value = this.props.value) === null || _this$props$value === void 0 ? void 0 : _this$props$value.signature;
|
969
966
|
padProps.ref = this.canvas;
|
970
967
|
canClear = !this.props.item.readOnly;
|
971
968
|
}
|
@@ -980,7 +977,7 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
980
977
|
}
|
981
978
|
padProps.canvasProps = {};
|
982
979
|
if (this.props.item.print === true && !!sourceDataURL) {
|
983
|
-
var _this$props$
|
980
|
+
var _this$props$value2, _this$props$value3, _this$props$value4, _this$props$value5;
|
984
981
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
985
982
|
style: _objectSpread({}, this.props.style),
|
986
983
|
className: baseClasses
|
@@ -994,7 +991,7 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
994
991
|
style: {
|
995
992
|
borderStyle: 'dashed'
|
996
993
|
}
|
997
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("strong", null, "Electronic Signature"), " at ", (_this$props$
|
994
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("strong", null, "Electronic Signature"), " at ", (_this$props$value2 = this.props.value) !== null && _this$props$value2 !== void 0 && _this$props$value2.date ? (0, _momentTimezone["default"])((_this$props$value3 = this.props.value) === null || _this$props$value3 === void 0 ? void 0 : _this$props$value3.date).format('dddd MMMM D, YYYY hh:mm A') : (0, _momentTimezone["default"])().format('dddd MMMM D, YYYY hh:mm A'), " by ", (_this$props$value4 = this.props.value) === null || _this$props$value4 === void 0 ? void 0 : _this$props$value4.name, " via IP Address ", (_this$props$value5 = this.props.value) === null || _this$props$value5 === void 0 ? void 0 : _this$props$value5.ipAddress), /*#__PURE__*/_react["default"].createElement("hr", null))));
|
998
995
|
}
|
999
996
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
1000
997
|
style: _objectSpread({}, this.props.style),
|
@@ -1009,7 +1006,7 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
1009
1006
|
style: {
|
1010
1007
|
borderStyle: 'dashed'
|
1011
1008
|
}
|
1012
|
-
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("strong", null, "Electronic Signature"), " at ", (_this$props$
|
1009
|
+
}), /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("strong", null, "Electronic Signature"), " at ", (_this$props$value6 = this.props.value) !== null && _this$props$value6 !== void 0 && _this$props$value6.date ? (0, _momentTimezone["default"])((_this$props$value7 = this.props.value) === null || _this$props$value7 === void 0 ? void 0 : _this$props$value7.date).format('dddd MMMM D, YYYY hh:mm A') : (0, _momentTimezone["default"])().format('dddd MMMM D, YYYY hh:mm A'), " by ", (_this$props$value8 = this.props.value) === null || _this$props$value8 === void 0 ? void 0 : _this$props$value8.name, " via IP Address ", (_this$props$value9 = this.props.value) === null || _this$props$value9 === void 0 ? void 0 : _this$props$value9.ipAddress), /*#__PURE__*/_react["default"].createElement("hr", null)) : null : /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement("div", {
|
1013
1010
|
className: "m-signature-pad"
|
1014
1011
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
1015
1012
|
className: "m-signature-pad--body"
|
@@ -1028,7 +1025,7 @@ var Signature = /*#__PURE__*/function (_React$Component13) {
|
|
1028
1025
|
}, /*#__PURE__*/_react["default"].createElement(_fa.FaTimes, null), " clear"))), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Label, null, "Please print your full legal name and today's date."), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Container, null, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Row, null, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Col, {
|
1029
1026
|
sm: 6
|
1030
1027
|
}, /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Control, {
|
1031
|
-
value: (_this$props$value$nam = (_this$props$
|
1028
|
+
value: (_this$props$value$nam = (_this$props$value10 = this.props.value) === null || _this$props$value10 === void 0 ? void 0 : _this$props$value10.name) !== null && _this$props$value$nam !== void 0 ? _this$props$value$nam : '',
|
1032
1029
|
type: "text",
|
1033
1030
|
required: true,
|
1034
1031
|
placeholder: "Full Legal Name",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-survey-builder",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.39",
|
4
4
|
"description": "A complete survey builder for react.",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "types/index.d.ts",
|
@@ -44,7 +44,6 @@
|
|
44
44
|
"moment": "^2.30.1",
|
45
45
|
"moment-timezone": "^0.5.44",
|
46
46
|
"prop-types": "^15.7.2",
|
47
|
-
"react-bootstrap": "^2.9.2",
|
48
47
|
"react-bootstrap-range-slider": "^3.0.8",
|
49
48
|
"react-bootstrap-typeahead": "^6.3.2",
|
50
49
|
"react-dnd": "^11.1.3",
|
@@ -89,7 +88,7 @@
|
|
89
88
|
"express": "^4.17.1",
|
90
89
|
"multer": "^1.4.2",
|
91
90
|
"react": "^18.2.0",
|
92
|
-
"react-bootstrap": "^2.
|
91
|
+
"react-bootstrap": "^2.10.2",
|
93
92
|
"react-dom": "^18.2.0",
|
94
93
|
"rimraf": "^3.0.2",
|
95
94
|
"sass": "^1.69.7",
|