survey-react-ui 2.4.1 → 2.5.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.4.1",
3
+ "version": "2.5.1",
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.4.1",
54
+ "survey-core": "2.5.1",
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.4.1
2
+ * surveyjs - Survey JavaScript library v2.5.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.4.1
31
+ * surveyjs - Survey JavaScript library v2.5.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.4.1
117
+ * surveyjs - Survey JavaScript library v2.5.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
  */
@@ -902,6 +902,7 @@ __webpack_require__.r(__webpack_exports__);
902
902
  /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../reactSurvey */ "./src/reactSurvey.tsx");
903
903
  /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "./src/components/svg-icon/svg-icon.tsx");
904
904
  /* harmony import */ var _action_bar_separator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./action-bar-separator */ "./src/components/action-bar/action-bar-separator.tsx");
905
+ /* harmony import */ var _string_viewer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../string-viewer */ "./src/string-viewer.tsx");
905
906
  var __extends = (undefined && undefined.__extends) || (function () {
906
907
  var extendStatics = function (d, b) {
907
908
  extendStatics = Object.setPrototypeOf ||
@@ -924,6 +925,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
924
925
 
925
926
 
926
927
 
928
+
927
929
  var SurveyAction = /** @class */ (function (_super) {
928
930
  __extends(SurveyAction, _super);
929
931
  function SurveyAction(props) {
@@ -1001,8 +1003,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
1001
1003
  SurveyActionBarItem.prototype.renderText = function () {
1002
1004
  if (!this.item.hasTitle)
1003
1005
  return null;
1004
- var titleClass = this.item.getActionBarItemTitleCss();
1005
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: titleClass }, this.item.title);
1006
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_string_viewer__WEBPACK_IMPORTED_MODULE_7__.SurveyLocStringViewer, { locStr: this.item.locTitle, textClass: this.item.getActionBarItemTitleCss() });
1006
1007
  };
1007
1008
  SurveyActionBarItem.prototype.renderButtonContent = function () {
1008
1009
  var text = this.renderText();
@@ -7966,7 +7967,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
7966
7967
  return _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement(locStr.renderAs, {
7967
7968
  locStr: locStr.renderAsData,
7968
7969
  style: style,
7969
- key: key,
7970
+ key: key
7970
7971
  });
7971
7972
  };
7972
7973
  SurveyElementBase.renderQuestionDescription = function (question) {
@@ -11309,8 +11310,10 @@ var SurveyRow = /** @class */ (function (_super) {
11309
11310
  SurveyRow.prototype.componentWillUnmount = function () {
11310
11311
  _super.prototype.componentWillUnmount.call(this);
11311
11312
  if (!!this.row) {
11312
- this.row.setRootElement(undefined);
11313
- this.stopLazyRendering();
11313
+ if (!this.row.hasActiveUISubscribers) {
11314
+ this.row.setRootElement(undefined);
11315
+ this.stopLazyRendering();
11316
+ }
11314
11317
  }
11315
11318
  };
11316
11319
  SurveyRow.prototype.createElement = function (element, elementIndex) {
@@ -11579,6 +11582,13 @@ var SurveyLocStringViewer = /** @class */ (function (_super) {
11579
11582
  enumerable: false,
11580
11583
  configurable: true
11581
11584
  });
11585
+ Object.defineProperty(SurveyLocStringViewer.prototype, "textClass", {
11586
+ get: function () {
11587
+ return this.props.textClass;
11588
+ },
11589
+ enumerable: false,
11590
+ configurable: true
11591
+ });
11582
11592
  SurveyLocStringViewer.prototype.componentDidMount = function () {
11583
11593
  this.reactOnStrChanged();
11584
11594
  };
@@ -11607,7 +11617,7 @@ var SurveyLocStringViewer = /** @class */ (function (_super) {
11607
11617
  return strEl;
11608
11618
  };
11609
11619
  SurveyLocStringViewer.prototype.renderString = function () {
11610
- var className = this.locStr.allowLineBreaks ? "sv-string-viewer sv-string-viewer--multiline" : "sv-string-viewer";
11620
+ var className = this.locStr.getStringViewerClassName(this.textClass);
11611
11621
  if (this.locStr.hasHtml) {
11612
11622
  var htmlValue = { __html: this.locStr.renderedHtml };
11613
11623
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { ref: this.rootRef, className: className, style: this.style, dangerouslySetInnerHTML: htmlValue });
@@ -12100,7 +12110,7 @@ __webpack_require__.r(__webpack_exports__);
12100
12110
 
12101
12111
 
12102
12112
 
12103
- (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.4.1"), "survey-react-ui");
12113
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_0__.checkLibraryVersion)("".concat("2.5.1"), "survey-react-ui");
12104
12114
 
12105
12115
  })();
12106
12116