survey-react-ui 2.2.6 → 2.3.1

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.2.6",
3
+ "version": "2.3.1",
4
4
  "description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
5
5
  "keywords": [
6
6
  "Survey",
@@ -29,7 +29,7 @@
29
29
  }
30
30
  },
31
31
  "peerDependencies": {
32
- "survey-core": "2.2.6",
32
+ "survey-core": "2.3.1",
33
33
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0",
34
34
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0 || ^19.0.0"
35
35
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.2.6
2
+ * surveyjs - Survey JavaScript library v2.3.1
3
3
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -28,7 +28,7 @@ __webpack_require__.r(__webpack_exports__);
28
28
  /* harmony export */ icons: () => (/* binding */ iconsV1)
29
29
  /* harmony export */ });
30
30
  /*!
31
- * surveyjs - Survey JavaScript library v2.2.6
31
+ * surveyjs - Survey JavaScript library v2.3.1
32
32
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
33
33
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
34
34
  */
@@ -114,7 +114,7 @@ __webpack_require__.r(__webpack_exports__);
114
114
  /* harmony export */ icons: () => (/* binding */ iconsV2)
115
115
  /* harmony export */ });
116
116
  /*!
117
- * surveyjs - Survey JavaScript library v2.2.6
117
+ * surveyjs - Survey JavaScript library v2.3.1
118
118
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
119
119
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
120
120
  */
@@ -4721,7 +4721,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
4721
4721
  if (!item || !item.isCommentShowing)
4722
4722
  return null;
4723
4723
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { key: item.normalizedId, className: this.question.getCommentAreaCss(true) },
4724
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentValueItem, { question: this.question, item: item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) })));
4724
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentValueItem, { question: this.question, item: item, cssClasses: this.question.cssClasses })));
4725
4725
  };
4726
4726
  SurveyQuestionDropdownBase.prototype.renderEditorButtons = function () {
4727
4727
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_components_action_bar_action_bar__WEBPACK_IMPORTED_MODULE_6__.SurveyActionBar, { model: this.dropdownListModel.editorButtons });
@@ -7136,7 +7136,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
7136
7136
  var commentText = _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__.SurveyElementBase.renderLocString(this.question.locCommentText);
7137
7137
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss() },
7138
7138
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", null, commentText),
7139
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: this.question.isInputReadOnly })));
7139
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__.SurveyQuestionCommentItem, { question: this.question, cssClasses: cssClasses, isDisplayMode: this.question.isInputReadOnly })));
7140
7140
  };
7141
7141
  SurveyQuestion.prototype.renderHeader = function (question) {
7142
7142
  if (question.singleInputHideHeader)
@@ -7195,7 +7195,7 @@ var SurveyElementErrors = /** @class */ (function (_super) {
7195
7195
  var key = "error" + i;
7196
7196
  errors.push(this.creator.renderError(key, this.element.errors[i], this.cssClasses, this.element));
7197
7197
  }
7198
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { role: "alert", "aria-live": "polite", className: this.element.cssError, id: this.id }, errors));
7198
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.element.cssError, id: this.id }, errors));
7199
7199
  };
7200
7200
  return SurveyElementErrors;
7201
7201
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__.ReactSurveyElement));
@@ -7735,7 +7735,7 @@ var SurveyQuestionCheckboxItem = /** @class */ (function (_super) {
7735
7735
  if (!this.item.isCommentShowing)
7736
7736
  return null;
7737
7737
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
7738
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
7738
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
7739
7739
  };
7740
7740
  SurveyQuestionCheckboxItem.prototype.renderCheckbox = function (isChecked, otherItem) {
7741
7741
  var id = this.question.getItemId(this.item);
@@ -7869,8 +7869,8 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
7869
7869
 
7870
7870
  var SurveyQuestionCommentValueItem = /** @class */ (function (_super) {
7871
7871
  __extends(SurveyQuestionCommentValueItem, _super);
7872
- function SurveyQuestionCommentValueItem() {
7873
- return _super !== null && _super.apply(this, arguments) || this;
7872
+ function SurveyQuestionCommentValueItem(props) {
7873
+ return _super.call(this, props) || this;
7874
7874
  }
7875
7875
  SurveyQuestionCommentValueItem.prototype.getTextAreaModel = function () {
7876
7876
  return this.props.question.getCommentTextAreaModel(this.props.item);
@@ -8962,8 +8962,8 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
8962
8962
  return tds;
8963
8963
  };
8964
8964
  SurveyQuestionMatrixRow.prototype.cellClick = function (row, column) {
8965
- row.value = column.value;
8966
- this.setState({ value: this.row.value });
8965
+ row.cellClick(column);
8966
+ this.setState({ value: row.value });
8967
8967
  };
8968
8968
  return SurveyQuestionMatrixRow;
8969
8969
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
@@ -8980,6 +8980,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
8980
8980
  if (!!this.props.cellChanged) {
8981
8981
  this.props.cellChanged();
8982
8982
  }
8983
+ this.setState({ value: this.row.isChecked(this.column) });
8983
8984
  };
8984
8985
  SurveyQuestionMatrixCell.prototype.handleOnMouseDown = function (event) {
8985
8986
  this.question.onMouseDown();
@@ -9016,22 +9017,22 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
9016
9017
  return !!this.question && !!this.row;
9017
9018
  };
9018
9019
  SurveyQuestionMatrixCell.prototype.renderElement = function () {
9019
- var isChecked = this.row.value == this.column.value;
9020
+ var isChecked = this.row.isChecked(this.column);
9020
9021
  var inputId = this.question.inputId + "_" + this.row.name + "_" + this.columnIndex;
9021
9022
  var itemClass = this.question.getItemClass(this.row, this.column);
9023
+ var itemSvgIcon = this.question.getItemSvgIcon(this.row, this.column);
9022
9024
  var mobileSpan = this.question.isMobile ?
9023
9025
  (react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.question.cssClasses.cellResponsiveTitle }, this.renderLocString(this.column.locText)))
9024
9026
  : undefined;
9025
9027
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { onMouseDown: this.handleOnMouseDown, className: itemClass },
9026
9028
  this.renderInput(inputId, isChecked),
9027
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.question.cssClasses.materialDecorator }, this.question.itemSvgIcon ?
9028
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", { className: this.cssClasses.itemDecorator },
9029
- react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: this.question.itemSvgIcon })) :
9030
- null),
9029
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.question.cssMaterialDecorator }, itemSvgIcon ?
9030
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("svg", { className: this.question.cssItemDecorator },
9031
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement("use", { xlinkHref: itemSvgIcon })) : null),
9031
9032
  mobileSpan));
9032
9033
  };
9033
9034
  SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
9034
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row, this.column), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
9035
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { id: inputId, type: this.question.checkType, className: this.question.cssItemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isDisabledAttr, readOnly: this.row.isReadOnlyAttr, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row, this.column), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-errormessage": this.question.a11y_input_ariaErrormessage }));
9035
9036
  };
9036
9037
  return SurveyQuestionMatrixCell;
9037
9038
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__.ReactSurveyElement));
@@ -9520,7 +9521,7 @@ var SurveyQuestionMatrixDropdownCell = /** @class */ (function (_super) {
9520
9521
  SurveyQuestionMatrixDropdownCell.prototype.renderOtherComment = function () {
9521
9522
  var question = this.cell.question;
9522
9523
  var cssClasses = question.cssClasses || {};
9523
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_9__.SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: question.isInputReadOnly });
9524
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_9__.SurveyQuestionCommentValueItem, { question: question, item: question.otherItem, cssClasses: cssClasses });
9524
9525
  };
9525
9526
  SurveyQuestionMatrixDropdownCell.prototype.renderCellCheckboxButton = function () {
9526
9527
  var key = this.cell.question.id + "item" + this.cell.choiceIndex;
@@ -10275,7 +10276,7 @@ var SurveyQuestionRadioItem = /** @class */ (function (_super) {
10275
10276
  if (!this.item.isCommentShowing)
10276
10277
  return null;
10277
10278
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getCommentAreaCss(true) },
10278
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, isDisplayMode: this.isDisplayMode, cssClasses: this.question.cssClasses, otherCss: this.question.getCommentAreaCss(false) }));
10279
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_reactquestion_comment__WEBPACK_IMPORTED_MODULE_2__.SurveyQuestionCommentValueItem, { question: this.question, item: this.item, cssClasses: this.question.cssClasses }));
10279
10280
  };
10280
10281
  SurveyQuestionRadioItem.prototype.renderRadioButton = function () {
10281
10282
  var itemClass = this.question.getItemClass(this.item);
@@ -12127,7 +12128,7 @@ __webpack_require__.r(__webpack_exports__);
12127
12128
 
12128
12129
 
12129
12130
 
12130
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.2.6"), "survey-react-ui");
12131
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.3.1"), "survey-react-ui");
12131
12132
 
12132
12133
  })();
12133
12134