react-survey-builder 1.0.29 → 1.0.30
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.
@@ -29,6 +29,7 @@ var getError = exports.getError = function getError(errors, name) {
|
|
29
29
|
var ComponentErrorMessage = function ComponentErrorMessage(_ref) {
|
30
30
|
var name = _ref.name;
|
31
31
|
var methods = (0, _reactHookForm.useFormContext)();
|
32
|
+
console.log(methods);
|
32
33
|
if (!methods) return null;
|
33
34
|
if (getError(methods.formState.errors, name) !== undefined) {
|
34
35
|
return /*#__PURE__*/_react["default"].createElement(_errorMessage.ErrorMessage, {
|
@@ -1166,12 +1166,12 @@ var Checkboxes = /*#__PURE__*/function (_React$Component15) {
|
|
1166
1166
|
}, /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], (0, _extends2["default"])({}, this.props, {
|
1167
1167
|
htmlFor: this.props.name
|
1168
1168
|
})), this.props.item.options.map(function (option) {
|
1169
|
-
var
|
1169
|
+
var _this20$props$checkbo;
|
1170
1170
|
var props = {};
|
1171
1171
|
props.name = "option_".concat(option.key);
|
1172
1172
|
props.value = option.value;
|
1173
1173
|
props.checked = self.props.value ? self.props.value.indexOf(option.value) > -1 : false;
|
1174
|
-
props.inline =
|
1174
|
+
//props.inline = self.props.item.inline ?? false;
|
1175
1175
|
if (self.props.item.disabled) {
|
1176
1176
|
props.disabled = 'disabled';
|
1177
1177
|
}
|
@@ -1230,7 +1230,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component16) {
|
|
1230
1230
|
}
|
1231
1231
|
var props = {};
|
1232
1232
|
// eslint-disable-next-line no-undef
|
1233
|
-
props.name = this.props.name
|
1233
|
+
props.name = this.props.name;
|
1234
1234
|
props.onChange = function (event) {
|
1235
1235
|
if (_this22.props.onChange) {
|
1236
1236
|
_this22.props.onChange(event.target.checked);
|
@@ -1274,7 +1274,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component16) {
|
|
1274
1274
|
variant: (_this$props$checkboxB = this.props.checkboxButtonClassName) !== null && _this$props$checkboxB !== void 0 ? _this$props$checkboxB : "outline-light",
|
1275
1275
|
className: "btn-survey-builder-checkbox",
|
1276
1276
|
value: props.name,
|
1277
|
-
id: props.name
|
1277
|
+
id: props.name + '-' + _UUID["default"].uuid()
|
1278
1278
|
}, props), /*#__PURE__*/_react["default"].createElement("div", {
|
1279
1279
|
className: "d-flex align-items-center justify-content-between text-black text-survey-builder-checkbox"
|
1280
1280
|
}, props.checked !== true && /*#__PURE__*/_react["default"].createElement(_ri.RiCheckboxBlankLine, {
|
@@ -1337,7 +1337,7 @@ var RadioButtons = /*#__PURE__*/function (_React$Component17) {
|
|
1337
1337
|
}, /*#__PURE__*/_react["default"].createElement(_componentHeader["default"], this.props), /*#__PURE__*/_react["default"].createElement(_reactBootstrap.Form.Group, {
|
1338
1338
|
className: "form-group mb-3"
|
1339
1339
|
}, /*#__PURE__*/_react["default"].createElement(_componentLabel["default"], this.props), this.props.item.options.map(function (option) {
|
1340
|
-
var
|
1340
|
+
var _this24$props$checkbo;
|
1341
1341
|
var props = {};
|
1342
1342
|
props.name = self.props.name;
|
1343
1343
|
props.value = option.value;
|
@@ -1348,7 +1348,8 @@ var RadioButtons = /*#__PURE__*/function (_React$Component17) {
|
|
1348
1348
|
if (self.props.item.disabled) {
|
1349
1349
|
props.disabled = 'disabled';
|
1350
1350
|
}
|
1351
|
-
props.inline =
|
1351
|
+
//props.inline = self.props.item.inline ?? false;
|
1352
|
+
|
1352
1353
|
return /*#__PURE__*/_react["default"].createElement(_reactBootstrap.ToggleButton, (0, _extends2["default"])({
|
1353
1354
|
label: option.text,
|
1354
1355
|
type: "radio",
|