survey-react-ui 1.12.8 → 1.12.9

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": "1.12.8",
3
+ "version": "1.12.9",
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",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "typings": "./typings/src/entries/react-ui.d.ts",
23
23
  "peerDependencies": {
24
- "survey-core": "1.12.8",
24
+ "survey-core": "1.12.9",
25
25
  "react": "^16.5.0 || ^17.0.1 || ^18.2.0",
26
26
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.2.0"
27
27
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.8
2
+ * surveyjs - Survey JavaScript library v1.12.9
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -801,10 +801,13 @@ var element_SurveyRowElement = /** @class */ (function (_super) {
801
801
  el.focusIn();
802
802
  }
803
803
  };
804
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: css.questionWrapper, style: element.rootStyle, "data-key": innerElement.key, key: innerElement.key, onFocus: focusIn, ref: this.rootRef }, this.row.isNeedRender ? innerElement : ReactElementFactory.Instance.createElement(element.skeletonComponentName, { element: element, css: this.css, })));
804
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: css.questionWrapper, style: element.rootStyle, "data-key": innerElement.key, key: innerElement.key, onFocus: focusIn, ref: this.rootRef }, innerElement));
805
805
  };
806
806
  SurveyRowElement.prototype.createElement = function (element, elementIndex) {
807
807
  var index = elementIndex ? "-" + elementIndex : 0;
808
+ if (!this.row.isNeedRender) {
809
+ return ReactElementFactory.Instance.createElement(element.skeletonComponentName, { key: element.name + index, element: element, css: this.css, });
810
+ }
808
811
  var elementType = element.getType();
809
812
  if (!ReactElementFactory.Instance.isElementRegistered(elementType)) {
810
813
  elementType = "question";
@@ -1736,6 +1739,7 @@ var title_element_extends = (undefined && undefined.__extends) || (function () {
1736
1739
 
1737
1740
 
1738
1741
 
1742
+
1739
1743
  var title_element_TitleElement = /** @class */ (function (_super) {
1740
1744
  title_element_extends(TitleElement, _super);
1741
1745
  function TitleElement(props) {
@@ -1748,11 +1752,18 @@ var title_element_TitleElement = /** @class */ (function (_super) {
1748
1752
  enumerable: false,
1749
1753
  configurable: true
1750
1754
  });
1755
+ TitleElement.prototype.renderTitleExpandableSvg = function () {
1756
+ if (!this.element.getCssTitleExpandableSvg())
1757
+ return null;
1758
+ var iconName = this.element.isExpanded ? "icon-collapse-16x16" : "icon-expand-16x16";
1759
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(svg_icon_SvgIcon, { className: this.element.getCssTitleExpandableSvg(), iconName: iconName, size: 16 });
1760
+ };
1751
1761
  TitleElement.prototype.render = function () {
1752
1762
  var element = this.element;
1753
1763
  if (!element || !element.hasTitle)
1754
1764
  return null;
1755
1765
  var ariaLabel = element.titleAriaLabel || undefined;
1766
+ var titleExpandableSvg = this.renderTitleExpandableSvg();
1756
1767
  var titleContent = (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(title_actions_TitleActions, { element: element, cssClasses: element.cssClasses }));
1757
1768
  var onClick = undefined;
1758
1769
  var onKeyUp = undefined;
@@ -1762,7 +1773,9 @@ var title_element_TitleElement = /** @class */ (function (_super) {
1762
1773
  };
1763
1774
  }
1764
1775
  var CustomTag = element.titleTagName;
1765
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role: element.titleAriaRole, onClick: onClick, onKeyUp: onKeyUp }, titleContent));
1776
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(CustomTag, { className: element.cssTitle, id: element.ariaTitleId, "aria-label": ariaLabel, tabIndex: element.titleTabIndex, "aria-expanded": element.titleAriaExpanded, role: element.titleAriaRole, onClick: onClick, onKeyUp: onKeyUp },
1777
+ titleExpandableSvg,
1778
+ titleContent));
1766
1779
  };
1767
1780
  return TitleElement;
1768
1781
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Component));
@@ -4632,6 +4645,11 @@ var dropdown_base_SurveyQuestionDropdownBase = /** @class */ (function (_super)
4632
4645
  _super.prototype.componentDidMount.call(this);
4633
4646
  this.updateInputDomElement();
4634
4647
  };
4648
+ SurveyQuestionDropdownBase.prototype.componentWillUnmount = function () {
4649
+ _super.prototype.componentWillUnmount.call(this);
4650
+ if (this.question.dropdownListModel)
4651
+ this.question.dropdownListModel.focused = false;
4652
+ };
4635
4653
  SurveyQuestionDropdownBase.prototype.updateInputDomElement = function () {
4636
4654
  if (!!this.inputElement) {
4637
4655
  var control = this.inputElement;
@@ -9407,7 +9425,7 @@ ReactElementFactory.Instance.registerElement(external_root_Survey_commonjs2_surv
9407
9425
 
9408
9426
 
9409
9427
 
9410
- Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.8", "survey-react-ui");
9428
+ Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.12.9", "survey-react-ui");
9411
9429
 
9412
9430
 
9413
9431
  /***/ }),