survey-js-ui 2.5.0 → 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/index.html CHANGED
@@ -5,12 +5,12 @@
5
5
  <title>Welcome to UI</title>
6
6
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js"></script>
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1" />
8
- <link rel="stylesheet" href="../node_modules/survey-core/survey-core.css" />
8
+ <link rel="stylesheet" href="./node_modules/survey-core/survey-core.css" />
9
9
  <script src="./node_modules/survey-core/survey.core.js"></script>
10
10
  </head>
11
11
 
12
12
  <body spellcheck="false">
13
- <div id="surveyElement" style="position: fixed; left: 0; right: 0; top: 0; bottom: 0;"></div>
13
+ <div id="surveyElement"></div>
14
14
  <div id="surveyResultElement"></div>
15
15
  <script src="./index.js"></script>
16
16
  <script defer src="survey-js-ui.js"></script></body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "survey-js-ui",
3
- "version": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "license": "MIT",
5
5
  "description": "A free MIT-licensed UI component that renders dynamic, interactive JSON-based forms and surveys in apps built with HTML, CSS, and JavaScript. You can use it to collect responses from users and send them to your own database.",
6
6
  "homepage": "https://surveyjs.io/",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {},
55
55
  "peerDependencies": {
56
- "survey-core": "2.5.0",
56
+ "survey-core": "2.5.2",
57
57
  "@types/react-dom": "*",
58
58
  "@types/react": "*"
59
59
  }
package/survey-js-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v2.5.0
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
  */
@@ -23,7 +23,7 @@ return /******/ (() => { // webpackBootstrap
23
23
  /***/ (function(module) {
24
24
 
25
25
  /*!
26
- * surveyjs - Survey JavaScript library v2.5.0
26
+ * surveyjs - Survey JavaScript library v2.5.2
27
27
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
28
28
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
29
29
  */
@@ -830,7 +830,7 @@ path.keys().forEach(function (key) {
830
830
  /***/ (function(module) {
831
831
 
832
832
  /*!
833
- * surveyjs - Survey JavaScript library v2.5.0
833
+ * surveyjs - Survey JavaScript library v2.5.2
834
834
  * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
835
835
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
836
836
  */
@@ -4955,9 +4955,9 @@ var RatingItemSmiley = /** @class */ (function (_super) {
4955
4955
  }
4956
4956
  RatingItemSmiley.prototype.render = function () {
4957
4957
  var _this = this;
4958
- 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 },
4958
+ 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 },
4959
4959
  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 }),
4960
- react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item.itemValue) })));
4960
+ react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { size: "auto", iconName: this.question.getItemSmileyIconName(this.item) })));
4961
4961
  };
4962
4962
  return RatingItemSmiley;
4963
4963
  }(_rating_item__WEBPACK_IMPORTED_MODULE_3__.RatingItemBase));
@@ -5010,7 +5010,7 @@ var RatingItemStar = /** @class */ (function (_super) {
5010
5010
  }
5011
5011
  RatingItemStar.prototype.render = function () {
5012
5012
  var _this = this;
5013
- 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 },
5013
+ 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 },
5014
5014
  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 }),
5015
5015
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_2__.SvgIcon, { className: "sv-star", size: "auto", iconName: this.question.itemStarIcon }),
5016
5016
  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 })));
@@ -5102,7 +5102,7 @@ var RatingItem = /** @class */ (function (_super) {
5102
5102
  }
5103
5103
  RatingItem.prototype.render = function () {
5104
5104
  var itemText = this.renderLocString(this.item.locText);
5105
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { onMouseDown: this.handleOnMouseDown, className: this.question.getItemClassByText(this.item.itemValue, this.item.text) },
5105
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("label", { className: this.item.className, onMouseDown: this.handleOnMouseDown },
5106
5106
  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 }),
5107
5107
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: this.question.cssClasses.itemText, "data-text": this.item.text }, itemText)));
5108
5108
  };
@@ -6128,7 +6128,7 @@ var SurveyQuestionDropdownBase = /** @class */ (function (_super) {
6128
6128
  return this.questionBase.renderedValue;
6129
6129
  };
6130
6130
  SurveyQuestionDropdownBase.prototype.renderReadOnlyElement = function () {
6131
- if (this.question.locReadOnlyText) {
6131
+ if (this.question.readOnlyText) {
6132
6132
  return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.controlValue }, this.renderLocString(this.question.locReadOnlyText)));
6133
6133
  }
6134
6134
  else {
@@ -8335,11 +8335,19 @@ function attachKey2click(element, viewModel, options) {
8335
8335
  options = __assign({}, options);
8336
8336
  return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(element, {
8337
8337
  tabIndex: 0,
8338
+ onPointerUp: function (evt) {
8339
+ if (evt.pointerType === "pen") {
8340
+ evt.preventDefault();
8341
+ evt.stopPropagation();
8342
+ var element_1 = evt.target;
8343
+ if (element_1 === null || element_1 === void 0 ? void 0 : element_1.click)
8344
+ element_1.click();
8345
+ }
8346
+ },
8338
8347
  onKeyUp: function (evt) {
8339
8348
  evt.preventDefault();
8340
8349
  evt.stopPropagation();
8341
8350
  (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickUp)(evt, options);
8342
- return false;
8343
8351
  },
8344
8352
  onKeyDown: function (evt) { return (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickDown)(evt, options); },
8345
8353
  onBlur: function (evt) { return (0,survey_core__WEBPACK_IMPORTED_MODULE_1__.doKey2ClickBlur)(evt); },
@@ -10156,7 +10164,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
10156
10164
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("tr", null,
10157
10165
  rowsTH,
10158
10166
  headers)));
10159
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
10167
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getTableWrapperCss(), ref: function (root) { return (_this.setControl(root)); } },
10160
10168
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("fieldset", { role: "radiogroup" },
10161
10169
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("legend", { className: "sv-visuallyhidden" }, this.question.locTitle.renderedHtml),
10162
10170
  react__WEBPACK_IMPORTED_MODULE_0__.createElement("table", { className: this.question.getTableCss(), role: "presentation" },
@@ -10635,7 +10643,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
10635
10643
  };
10636
10644
  SurveyQuestionMatrixDropdownBase.prototype.renderTableDiv = function () {
10637
10645
  var _this = this;
10638
- return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.cssClasses.tableWrapper, ref: function (root) { return (_this.setControl(root)); } },
10646
+ return (react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: this.question.getTableWrapperCss(), ref: function (root) { return (_this.setControl(root)); } },
10639
10647
  react__WEBPACK_IMPORTED_MODULE_0__.createElement(SurveyQuestionMatrixTable, { question: this.question, creator: this.creator, wrapCell: function (cell, element, reason) { return _this.wrapCell(cell, element, reason); } })));
10640
10648
  };
10641
10649
  return SurveyQuestionMatrixDropdownBase;
@@ -13784,7 +13792,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
13784
13792
 
13785
13793
 
13786
13794
 
13787
- (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.5.0"), "survey-js-ui");
13795
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.5.2"), "survey-js-ui");
13788
13796
 
13789
13797
  })();
13790
13798