survey-react-ui 2.5.1 → 2.5.2

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.1",
3
+ "version": "2.5.2",
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.1",
54
+ "survey-core": "2.5.2",
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.1
2
+ * surveyjs - Survey JavaScript library v2.5.2
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.5.1
31
+ * surveyjs - Survey JavaScript library v2.5.2
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.5.1
117
+ * surveyjs - Survey JavaScript library v2.5.2
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
  */
@@ -3517,9 +3517,9 @@ var RatingItemSmiley = /** @class */ (function (_super) {
3517
3517
  }
3518
3518
  RatingItemSmiley.prototype.render = function () {
3519
3519
  var _this = this;
3520
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { onMouseDown: this.handleOnMouseDown, style: this.question.getItemStyle(this.item.itemValue, this.item.highlight), className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); }, title: this.item.text },
3520
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { style: this.item.style, className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); }, title: this.item.text },
3521
3521
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-label": this.question.ariaLabel }),
3522
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue) })));
3522
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
3523
3523
  };
3524
3524
  return RatingItemSmiley;
3525
3525
  }(_rating_item__WEBPACK_IMPORTED_MODULE_3__.RatingItemBase));
@@ -3572,7 +3572,7 @@ var RatingItemStar = /** @class */ (function (_super) {
3572
3572
  }
3573
3573
  RatingItemStar.prototype.render = function () {
3574
3574
  var _this = this;
3575
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClass(this.item.itemValue), onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); }, title: this.item.text },
3575
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown, onMouseOver: function (e) { return _this.question.onItemMouseIn(_this.item); }, onMouseOut: function (e) { return _this.question.onItemMouseOut(_this.item); }, title: this.item.text },
3576
3576
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-label": this.question.ariaLabel }),
3577
3577
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
3578
3578
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: "sv-star-2", size: "auto", iconName: this.question.itemStarIconAlt })));
@@ -3664,7 +3664,7 @@ var RatingItem = /** @class */ (function (_super) {
3664
3664
  }
3665
3665
  RatingItem.prototype.render = function () {
3666
3666
  var itemText = this.renderLocString(this.item.locText);
3667
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
3667
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
3668
3668
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("input", { type: "radio", className: "sv-visuallyhidden", name: this.question.questionName, id: this.question.getInputId(this.index), value: this.item.value, disabled: this.question.isDisabledAttr, readOnly: this.question.isReadOnlyAttr, checked: this.question.value == this.item.value, onClick: this.props.handleOnClick, onChange: function () { }, "aria-label": this.question.ariaLabel }),
3669
3669
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
3670
3670
  };
@@ -4690,7 +4690,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
4690
4690
  return this.questionBase.renderedValue;
4691
4691
  };
4692
4692
  SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
4693
- if (this.question.locReadOnlyText) {
4693
+ if (this.question.readOnlyText) {
4694
4694
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
4695
4695
  }
4696
4696
  else {
@@ -6894,11 +6894,19 @@ function attachKey2click(element, viewModel, options) {
6894
6894
  options = __assign({}, options);
6895
6895
  return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(element, {
6896
6896
  tabIndex: 0,
6897
+ onPointerUp: function (evt) {
6898
+ if (evt.pointerType === "pen") {
6899
+ evt.preventDefault();
6900
+ evt.stopPropagation();
6901
+ var element_1 = evt.target;
6902
+ if (element_1 === null || element_1 === void 0 ? void 0 : element_1.click)
6903
+ element_1.click();
6904
+ }
6905
+ },
6897
6906
  onKeyUp: function (evt) {
6898
6907
  evt.preventDefault();
6899
6908
  evt.stopPropagation();
6900
6909
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickUp)(evt, options);
6901
- return false;
6902
6910
  },
6903
6911
  onKeyDown: function (evt) { return (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickDown)(evt, options); },
6904
6912
  onBlur: function (evt) { return (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickBlur)(evt); },
@@ -8714,7 +8722,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
8714
8722
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", null,
8715
8723
  rowsTH,
8716
8724
  headers)));
8717
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
8725
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getTableWrapperCss(), ref: function (root) { return (_this.setControl(root)); } },
8718
8726
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("fieldset", { role: "radiogroup" },
8719
8727
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
8720
8728
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
@@ -9193,7 +9201,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
9193
9201
  };
9194
9202
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
9195
9203
  var _this = this;
9196
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
9204
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getTableWrapperCss(), ref: function (root) { return (_this.setControl(root)); } },
9197
9205
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
9198
9206
  };
9199
9207
  return SurveyQuestionMatrixDropdownBase;
@@ -12110,7 +12118,7 @@ __webpack_require__.r(__webpack_exports__);
12110
12118
 
12111
12119
 
12112
12120
 
12113
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.5.1"), "survey-react-ui");
12121
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.5.2"), "survey-react-ui");
12114
12122
 
12115
12123
  })();
12116
12124