survey-react-ui 2.5.25 → 2.5.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-react-ui",
3
- "version": "2.5.25",
3
+ "version": "2.5.27",
4
4
  "license": "MIT",
5
5
  "author": "DevSoft Baltic OU <info@devsoftbaltic.com>",
6
6
  "homepage": "https://surveyjs.io/",
@@ -51,7 +51,7 @@
51
51
  }
52
52
  },
53
53
  "peerDependencies": {
54
- "survey-core": "2.5.25",
54
+ "survey-core": "2.5.27",
55
55
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
56
56
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
57
57
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.5.25
2
+ * surveyjs - Survey JavaScript library v2.5.27
3
3
  * Copyright (c) 2015-2026 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -588,8 +588,8 @@
588
588
  this.locStr.onStringChanged.remove(this.onChangedHandler);
589
589
  };
590
590
  SurveyLocStringViewer.prototype.componentDidUpdate = function (prevProps, prevState) {
591
- if (!!prevProps.locStr) {
592
- prevProps.locStr.onStringChanged.remove(this.onChangedHandler);
591
+ if (!!prevProps.model) {
592
+ prevProps.model.onStringChanged.remove(this.onChangedHandler);
593
593
  }
594
594
  this.reactOnStrChanged();
595
595
  };
@@ -5307,11 +5307,13 @@
5307
5307
  var _this = this;
5308
5308
  var cssClasses = this.question.cssClasses;
5309
5309
  var handleOnChange = function () {
5310
- _this.question.value = value;
5310
+ if (!_this.question.isInputReadOnly) {
5311
+ _this.question.value = value;
5312
+ }
5311
5313
  };
5312
5314
  return (React__namespace.createElement("div", { role: "presentation", className: this.question.getRadioItemClass(cssClasses, value) },
5313
5315
  React__namespace.createElement("label", { className: cssClasses.radioLabel },
5314
- React__namespace.createElement("input", { type: "radio", name: this.question.name, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
5316
+ React__namespace.createElement("input", { type: "radio", name: this.question.questionName, value: value, "aria-errormessage": this.question.ariaErrormessage, checked: value === this.question.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, className: cssClasses.itemRadioControl, onChange: handleOnChange }),
5315
5317
  this.question.cssClasses.materialRadioDecorator ?
5316
5318
  (React__namespace.createElement("span", { className: cssClasses.materialRadioDecorator }, this.question.itemSvgIcon ?
5317
5319
  (React__namespace.createElement("svg", { className: cssClasses.itemRadioDecorator },
@@ -5320,7 +5322,7 @@
5320
5322
  };
5321
5323
  SurveyQuestionBooleanRadio.prototype.renderElement = function () {
5322
5324
  var cssClasses = this.question.cssClasses;
5323
- return (React__namespace.createElement("div", { className: cssClasses.rootRadio },
5325
+ return (React__namespace.createElement("div", { className: cssClasses.rootRadio, onKeyDown: this.handleOnKeyDown },
5324
5326
  React__namespace.createElement("fieldset", { role: "presentation", className: cssClasses.radioFieldset }, !this.question.swapOrder ?
5325
5327
  (React__namespace.createElement(React__namespace.Fragment, null,
5326
5328
  this.renderRadioItem(this.question.getValueFalse(), this.question.locLabelFalse),
@@ -7467,6 +7469,15 @@
7467
7469
  };
7468
7470
  return _this;
7469
7471
  }
7472
+ Object.defineProperty(SurveyQuestionPanelDynamicAddButton.prototype, "isActionEnabled", {
7473
+ get: function () {
7474
+ if (this.props.item)
7475
+ return this.props.item.enabled !== false;
7476
+ return this.question.enableAddPanel !== false;
7477
+ },
7478
+ enumerable: false,
7479
+ configurable: true
7480
+ });
7470
7481
  SurveyQuestionPanelDynamicAddButton.prototype.renderElement = function () {
7471
7482
  if (!this.question.canAddPanel)
7472
7483
  return null;
@@ -7559,7 +7570,18 @@
7559
7570
  var SurveyNavigationButton = /** @class */ (function (_super) {
7560
7571
  __extends(SurveyNavigationButton, _super);
7561
7572
  function SurveyNavigationButton() {
7562
- return _super !== null && _super.apply(this, arguments) || this;
7573
+ var _this = _super !== null && _super.apply(this, arguments) || this;
7574
+ _this.inputElement = null;
7575
+ _this.inputParent = null;
7576
+ _this.setInputRef = function (element) {
7577
+ var _a;
7578
+ if (!element && !!_this.inputElement && !!_this.inputParent && _this.inputElement.parentNode !== _this.inputParent) {
7579
+ _this.inputParent.appendChild(_this.inputElement);
7580
+ }
7581
+ _this.inputElement = element;
7582
+ _this.inputParent = (_a = element === null || element === void 0 ? void 0 : element.parentNode) !== null && _a !== void 0 ? _a : _this.inputParent;
7583
+ };
7584
+ return _this;
7563
7585
  }
7564
7586
  Object.defineProperty(SurveyNavigationButton.prototype, "item", {
7565
7587
  get: function () {
@@ -7572,7 +7594,7 @@
7572
7594
  return this.item.isVisible;
7573
7595
  };
7574
7596
  SurveyNavigationButton.prototype.renderElement = function () {
7575
- return (React__namespace.createElement("input", { className: this.item.innerCss, type: "button", disabled: this.item.disabled, onMouseDown: this.item.data && this.item.data.mouseDown, onClick: this.item.action, title: this.item.getTooltip(), value: this.item.title }));
7597
+ return (React__namespace.createElement("input", { ref: this.setInputRef, className: this.item.innerCss, type: "button", disabled: this.item.disabled, onMouseDown: this.item.data && this.item.data.mouseDown, onClick: this.item.action, title: this.item.getTooltip(), value: this.item.title }));
7576
7598
  };
7577
7599
  return SurveyNavigationButton;
7578
7600
  }(ReactSurveyElement));
@@ -7824,7 +7846,7 @@
7824
7846
  return React__namespace.createElement(SurveyLocStringEditor, props);
7825
7847
  });
7826
7848
 
7827
- surveyCore.checkLibraryVersion("".concat("2.5.25"), "survey-react-ui");
7849
+ surveyCore.checkLibraryVersion("".concat("2.5.27"), "survey-react-ui");
7828
7850
 
7829
7851
  Object.defineProperty(exports, "Model", {
7830
7852
  enumerable: true,