survey-js-ui 2.4.1 → 2.5.0

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-js-ui",
3
- "version": "2.4.1",
3
+ "version": "2.5.0",
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.4.1",
56
+ "survey-core": "2.5.0",
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.4.1
2
+ * surveyjs - Survey JavaScript library v2.5.0
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.4.1
26
+ * surveyjs - Survey JavaScript library v2.5.0
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.4.1
833
+ * surveyjs - Survey JavaScript library v2.5.0
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
  */
@@ -2342,6 +2342,7 @@ __webpack_require__.r(__webpack_exports__);
2342
2342
  /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../reactSurvey */ "../survey-react-ui/src/reactSurvey.tsx");
2343
2343
  /* harmony import */ var _svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../svg-icon/svg-icon */ "../survey-react-ui/src/components/svg-icon/svg-icon.tsx");
2344
2344
  /* harmony import */ var _action_bar_separator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./action-bar-separator */ "../survey-react-ui/src/components/action-bar/action-bar-separator.tsx");
2345
+ /* harmony import */ var _string_viewer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../string-viewer */ "../survey-react-ui/src/string-viewer.tsx");
2345
2346
  var __extends = (undefined && undefined.__extends) || (function () {
2346
2347
  var extendStatics = function (d, b) {
2347
2348
  extendStatics = Object.setPrototypeOf ||
@@ -2364,6 +2365,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
2364
2365
 
2365
2366
 
2366
2367
 
2368
+
2367
2369
  var SurveyAction = /** @class */ (function (_super) {
2368
2370
  __extends(SurveyAction, _super);
2369
2371
  function SurveyAction(props) {
@@ -2441,8 +2443,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
2441
2443
  SurveyActionBarItem.prototype.renderText = function () {
2442
2444
  if (!this.item.hasTitle)
2443
2445
  return null;
2444
- var titleClass = this.item.getActionBarItemTitleCss();
2445
- return react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: titleClass }, this.item.title);
2446
+ return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_string_viewer__WEBPACK_IMPORTED_MODULE_6__.SurveyLocStringViewer, { locStr: this.item.locTitle, textClass: this.item.getActionBarItemTitleCss() });
2446
2447
  };
2447
2448
  SurveyActionBarItem.prototype.renderButtonContent = function () {
2448
2449
  var text = this.renderText();
@@ -9407,7 +9408,7 @@ var SurveyElementBase = /** @class */ (function (_super) {
9407
9408
  return _element_factory__WEBPACK_IMPORTED_MODULE_2__.ReactElementFactory.Instance.createElement(locStr.renderAs, {
9408
9409
  locStr: locStr.renderAsData,
9409
9410
  style: style,
9410
- key: key,
9411
+ key: key
9411
9412
  });
9412
9413
  };
9413
9414
  SurveyElementBase.renderQuestionDescription = function (question) {
@@ -12752,8 +12753,10 @@ var SurveyRow = /** @class */ (function (_super) {
12752
12753
  SurveyRow.prototype.componentWillUnmount = function () {
12753
12754
  _super.prototype.componentWillUnmount.call(this);
12754
12755
  if (!!this.row) {
12755
- this.row.setRootElement(undefined);
12756
- this.stopLazyRendering();
12756
+ if (!this.row.hasActiveUISubscribers) {
12757
+ this.row.setRootElement(undefined);
12758
+ this.stopLazyRendering();
12759
+ }
12757
12760
  }
12758
12761
  };
12759
12762
  SurveyRow.prototype.createElement = function (element, elementIndex) {
@@ -13022,6 +13025,13 @@ var SurveyLocStringViewer = /** @class */ (function (_super) {
13022
13025
  enumerable: false,
13023
13026
  configurable: true
13024
13027
  });
13028
+ Object.defineProperty(SurveyLocStringViewer.prototype, "textClass", {
13029
+ get: function () {
13030
+ return this.props.textClass;
13031
+ },
13032
+ enumerable: false,
13033
+ configurable: true
13034
+ });
13025
13035
  SurveyLocStringViewer.prototype.componentDidMount = function () {
13026
13036
  this.reactOnStrChanged();
13027
13037
  };
@@ -13050,7 +13060,7 @@ var SurveyLocStringViewer = /** @class */ (function (_super) {
13050
13060
  return strEl;
13051
13061
  };
13052
13062
  SurveyLocStringViewer.prototype.renderString = function () {
13053
- var className = this.locStr.allowLineBreaks ? "sv-string-viewer sv-string-viewer--multiline" : "sv-string-viewer";
13063
+ var className = this.locStr.getStringViewerClassName(this.textClass);
13054
13064
  if (this.locStr.hasHtml) {
13055
13065
  var htmlValue = { __html: this.locStr.renderedHtml };
13056
13066
  return react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { ref: this.rootRef, className: className, style: this.style, dangerouslySetInnerHTML: htmlValue });
@@ -13774,7 +13784,7 @@ var preact = react__WEBPACK_IMPORTED_MODULE_0__;
13774
13784
 
13775
13785
 
13776
13786
 
13777
- (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.4.1"), "survey-js-ui");
13787
+ (0,survey_core__WEBPACK_IMPORTED_MODULE_2__.checkLibraryVersion)("".concat("2.5.0"), "survey-js-ui");
13778
13788
 
13779
13789
  })();
13780
13790