survey-react-ui 1.9.104 → 1.9.106

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.9.104",
3
+ "version": "1.9.106",
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": "survey-react-ui.d.ts",
23
23
  "dependencies": {
24
- "survey-core": "1.9.104",
24
+ "survey-core": "1.9.106",
25
25
  "react": "^16.5.0 || ^17.0.1 || ^18.1.0",
26
26
  "react-dom": "^16.5.0 || ^17.0.1 || ^18.1.0"
27
27
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.104
2
+ * surveyjs - Survey JavaScript library v1.9.106
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -690,7 +690,7 @@ __webpack_require__.r(__webpack_exports__);
690
690
 
691
691
 
692
692
 
693
- Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.104", "survey-react-ui");
693
+ Object(survey_core__WEBPACK_IMPORTED_MODULE_2__["checkLibraryVersion"])("" + "1.9.106", "survey-react-ui");
694
694
 
695
695
 
696
696
  /***/ }),
@@ -1441,11 +1441,11 @@ var ComponentsContainer = /** @class */ (function (_super) {
1441
1441
  }
1442
1442
  if (!needRenderWrapper) {
1443
1443
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, components.map(function (component) {
1444
- return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, key: component.id });
1444
+ return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
1445
1445
  }));
1446
1446
  }
1447
1447
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: "sv-components-column" }, components.map(function (component) {
1448
- return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, key: component.id });
1448
+ return _element_factory__WEBPACK_IMPORTED_MODULE_1__["ReactElementFactory"].Instance.createElement(component.component, { survey: _this.props.survey, model: component.data, container: _this.props.container, key: component.id });
1449
1449
  }));
1450
1450
  };
1451
1451
  return ComponentsContainer;
@@ -1644,6 +1644,12 @@ var List = /** @class */ (function (_super) {
1644
1644
  this.model.initListContainerHtmlElement(this.listContainerRef.current);
1645
1645
  }
1646
1646
  };
1647
+ List.prototype.componentWillUnmount = function () {
1648
+ _super.prototype.componentWillUnmount.call(this);
1649
+ if (!!this.model) {
1650
+ this.model.initListContainerHtmlElement(undefined);
1651
+ }
1652
+ };
1647
1653
  List.prototype.renderElement = function () {
1648
1654
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.root, ref: this.listContainerRef },
1649
1655
  this.searchElementContent(),
@@ -2450,6 +2456,10 @@ var Popup = /** @class */ (function (_super) {
2450
2456
  _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
2451
2457
  this.setTargetElement();
2452
2458
  };
2459
+ Popup.prototype.componentWillUnmount = function () {
2460
+ _super.prototype.componentWillUnmount.call(this);
2461
+ this.popup.resetComponentElement();
2462
+ };
2453
2463
  Popup.prototype.shouldComponentUpdate = function (nextProps, nextState) {
2454
2464
  var _a;
2455
2465
  if (!_super.prototype.shouldComponentUpdate.call(this, nextProps, nextState))
@@ -5018,6 +5028,8 @@ var Survey = /** @class */ (function (_super) {
5018
5028
  };
5019
5029
  Survey.prototype.destroySurvey = function () {
5020
5030
  if (this.survey) {
5031
+ this.survey.renderCallback = undefined;
5032
+ this.survey.onPartialSend.clear();
5021
5033
  this.survey.stopTimer();
5022
5034
  this.survey.destroyResizeObserver();
5023
5035
  }
@@ -5040,6 +5052,9 @@ var Survey = /** @class */ (function (_super) {
5040
5052
  else if (this.survey.state == "loading") {
5041
5053
  renderResult = this.renderLoading();
5042
5054
  }
5055
+ else if (this.survey.state == "empty") {
5056
+ renderResult = this.renderEmptySurvey();
5057
+ }
5043
5058
  else {
5044
5059
  renderResult = this.renderSurvey();
5045
5060
  }
@@ -5088,11 +5103,11 @@ var Survey = /** @class */ (function (_super) {
5088
5103
  };
5089
5104
  Survey.prototype.renderCompletedBefore = function () {
5090
5105
  var htmlValue = { __html: this.survey.processedCompletedBeforeHtml };
5091
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.css.body }));
5106
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.completedBeforeCss }));
5092
5107
  };
5093
5108
  Survey.prototype.renderLoading = function () {
5094
5109
  var htmlValue = { __html: this.survey.processedLoadingHtml };
5095
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.css.body }));
5110
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { dangerouslySetInnerHTML: htmlValue, className: this.survey.loadingBodyCss }));
5096
5111
  };
5097
5112
  Survey.prototype.renderSurvey = function () {
5098
5113
  var activePage = this.survey.activePage
@@ -5101,10 +5116,6 @@ var Survey = /** @class */ (function (_super) {
5101
5116
  var isStaring = this.survey.isShowStartingPage;
5102
5117
  var pageId = this.survey.activePage ? this.survey.activePage.id : "";
5103
5118
  var className = this.survey.bodyCss;
5104
- if (!activePage) {
5105
- className = this.css.bodyEmpty;
5106
- activePage = this.renderEmptySurvey();
5107
- }
5108
5119
  var style = {};
5109
5120
  if (!!this.survey.renderedWidth) {
5110
5121
  style.maxWidth = this.survey.renderedWidth;
@@ -5121,7 +5132,7 @@ var Survey = /** @class */ (function (_super) {
5121
5132
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_page__WEBPACK_IMPORTED_MODULE_2__["SurveyPage"], { survey: this.survey, page: page, css: this.css, creator: this }));
5122
5133
  };
5123
5134
  Survey.prototype.renderEmptySurvey = function () {
5124
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", null, this.survey.emptySurveyText);
5135
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.css.bodyEmpty }, this.survey.emptySurveyText);
5125
5136
  };
5126
5137
  Survey.prototype.createSurvey = function (newProps) {
5127
5138
  if (!newProps)
@@ -5379,7 +5390,7 @@ var SurveyProgress = /** @class */ (function (_super) {
5379
5390
  var progressStyle = {
5380
5391
  width: this.progress + "%",
5381
5392
  };
5382
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.getProgressCssClasses() },
5393
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.survey.getProgressCssClasses(this.props.container) },
5383
5394
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: progressStyle, className: this.css.progressBar, role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100 },
5384
5395
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextInBarCss(this.css) }, this.progressText)),
5385
5396
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: survey_core__WEBPACK_IMPORTED_MODULE_1__["SurveyProgressModel"].getProgressTextUnderBarCss(this.css) }, this.progressText)));
@@ -5590,7 +5601,7 @@ _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.re
5590
5601
  /*!*************************************!*\
5591
5602
  !*** ./src/react/reactquestion.tsx ***!
5592
5603
  \*************************************/
5593
- /*! exports provided: SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsWrapped, SurveyQuestionAndErrorsCell */
5604
+ /*! exports provided: SurveyQuestion, SurveyElementErrors, SurveyQuestionAndErrorsWrapped, SurveyQuestionAndErrorsCell, SurveyQuestionErrorCell */
5594
5605
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
5595
5606
 
5596
5607
  "use strict";
@@ -5599,16 +5610,15 @@ __webpack_require__.r(__webpack_exports__);
5599
5610
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyElementErrors", function() { return SurveyElementErrors; });
5600
5611
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionAndErrorsWrapped", function() { return SurveyQuestionAndErrorsWrapped; });
5601
5612
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionAndErrorsCell", function() { return SurveyQuestionAndErrorsCell; });
5613
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionErrorCell", function() { return SurveyQuestionErrorCell; });
5602
5614
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
5603
5615
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
5604
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "survey-core");
5605
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_1__);
5606
- /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
5607
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
5608
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
5609
- /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/react/reactquestion_comment.tsx");
5610
- /* harmony import */ var _custom_widget__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./custom-widget */ "./src/react/custom-widget.tsx");
5611
- /* harmony import */ var _element_header__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./element-header */ "./src/react/element-header.tsx");
5616
+ /* harmony import */ var _reactsurveymodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactsurveymodel */ "./src/react/reactsurveymodel.tsx");
5617
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
5618
+ /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
5619
+ /* harmony import */ var _reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reactquestion_comment */ "./src/react/reactquestion_comment.tsx");
5620
+ /* harmony import */ var _custom_widget__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./custom-widget */ "./src/react/custom-widget.tsx");
5621
+ /* harmony import */ var _element_header__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./element-header */ "./src/react/element-header.tsx");
5612
5622
  var __extends = (undefined && undefined.__extends) || (function () {
5613
5623
  var extendStatics = function (d, b) {
5614
5624
  extendStatics = Object.setPrototypeOf ||
@@ -5631,7 +5641,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
5631
5641
 
5632
5642
 
5633
5643
 
5634
-
5635
5644
  var SurveyQuestion = /** @class */ (function (_super) {
5636
5645
  __extends(SurveyQuestion, _super);
5637
5646
  function SurveyQuestion(props) {
@@ -5647,7 +5656,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
5647
5656
  if (!customWidget) {
5648
5657
  return creator.createQuestionElement(question);
5649
5658
  }
5650
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_custom_widget__WEBPACK_IMPORTED_MODULE_6__["SurveyCustomWidget"], { creator: creator, question: question });
5659
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_custom_widget__WEBPACK_IMPORTED_MODULE_5__["SurveyCustomWidget"], { creator: creator, question: question });
5651
5660
  };
5652
5661
  SurveyQuestion.prototype.getStateElement = function () {
5653
5662
  return this.question;
@@ -5725,9 +5734,6 @@ var SurveyQuestion = /** @class */ (function (_super) {
5725
5734
  ? this.renderErrors(cssClasses, "bottom")
5726
5735
  : null;
5727
5736
  var comment = question && question.hasComment ? this.renderComment(cssClasses) : null;
5728
- var errorsTooltip = this.question.isErrorsModeTooltip
5729
- ? this.renderErrors(cssClasses, "tooltip")
5730
- : null;
5731
5737
  var descriptionUnderInput = question.hasDescriptionUnderInput
5732
5738
  ? this.renderDescription()
5733
5739
  : null;
@@ -5736,7 +5742,6 @@ var SurveyQuestion = /** @class */ (function (_super) {
5736
5742
  questionRender,
5737
5743
  comment,
5738
5744
  errorsBottom,
5739
- errorsTooltip,
5740
5745
  descriptionUnderInput));
5741
5746
  };
5742
5747
  SurveyQuestion.prototype.renderElement = function () {
@@ -5765,7 +5770,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
5765
5770
  var survey = this.question.survey;
5766
5771
  var wrapper = null;
5767
5772
  if (survey) {
5768
- wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapElement(survey, element, this.question);
5773
+ wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElementsWrapper"].wrapElement(survey, element, this.question);
5769
5774
  }
5770
5775
  return wrapper !== null && wrapper !== void 0 ? wrapper : element;
5771
5776
  };
@@ -5773,7 +5778,7 @@ var SurveyQuestion = /** @class */ (function (_super) {
5773
5778
  var survey = this.question.survey;
5774
5779
  var wrapper = null;
5775
5780
  if (survey) {
5776
- wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapQuestionContent(survey, element, this.question);
5781
+ wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElementsWrapper"].wrapQuestionContent(survey, element, this.question);
5777
5782
  }
5778
5783
  return wrapper !== null && wrapper !== void 0 ? wrapper : element;
5779
5784
  };
@@ -5781,24 +5786,24 @@ var SurveyQuestion = /** @class */ (function (_super) {
5781
5786
  return SurveyQuestion.renderQuestionBody(this.creator, this.question);
5782
5787
  };
5783
5788
  SurveyQuestion.prototype.renderDescription = function () {
5784
- return _reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["SurveyElementBase"].renderQuestionDescription(this.question);
5789
+ return _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"].renderQuestionDescription(this.question);
5785
5790
  };
5786
5791
  SurveyQuestion.prototype.renderComment = function (cssClasses) {
5787
- var commentText = _reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["SurveyElementBase"].renderLocString(this.question.locCommentText);
5792
+ var commentText = _reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"].renderLocString(this.question.locCommentText);
5788
5793
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getCommentAreaCss() },
5789
5794
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null, commentText),
5790
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion_comment__WEBPACK_IMPORTED_MODULE_5__["SurveyQuestionCommentItem"], { question: this.question, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: this.question.isInputReadOnly })));
5795
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion_comment__WEBPACK_IMPORTED_MODULE_4__["SurveyQuestionCommentItem"], { question: this.question, cssClasses: cssClasses, otherCss: cssClasses.other, isDisplayMode: this.question.isInputReadOnly })));
5791
5796
  };
5792
5797
  SurveyQuestion.prototype.renderHeader = function (question) {
5793
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_element_header__WEBPACK_IMPORTED_MODULE_7__["SurveyElementHeader"], { element: question });
5798
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_element_header__WEBPACK_IMPORTED_MODULE_6__["SurveyElementHeader"], { element: question });
5794
5799
  };
5795
5800
  SurveyQuestion.prototype.renderErrors = function (cssClasses, location) {
5796
5801
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyElementErrors, { element: this.question, cssClasses: cssClasses, creator: this.creator, location: location, id: this.question.id + "_errors" }));
5797
5802
  };
5798
5803
  return SurveyQuestion;
5799
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["SurveyElementBase"]));
5804
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["SurveyElementBase"]));
5800
5805
 
5801
- _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("question", function (props) {
5806
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("question", function (props) {
5802
5807
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestion, props);
5803
5808
  });
5804
5809
  var SurveyElementErrors = /** @class */ (function (_super) {
@@ -5806,7 +5811,6 @@ var SurveyElementErrors = /** @class */ (function (_super) {
5806
5811
  function SurveyElementErrors(props) {
5807
5812
  var _this = _super.call(this, props) || this;
5808
5813
  _this.state = _this.getState();
5809
- _this.tooltipRef = react__WEBPACK_IMPORTED_MODULE_0__["createRef"]();
5810
5814
  return _this;
5811
5815
  }
5812
5816
  Object.defineProperty(SurveyElementErrors.prototype, "id", {
@@ -5844,26 +5848,7 @@ var SurveyElementErrors = /** @class */ (function (_super) {
5844
5848
  SurveyElementErrors.prototype.canRender = function () {
5845
5849
  return !!this.element && this.element.hasVisibleErrors;
5846
5850
  };
5847
- SurveyElementErrors.prototype.componentDidUpdate = function (prevProps, prevState) {
5848
- _super.prototype.componentDidUpdate.call(this, prevProps, prevState);
5849
- if (this.props.location == "tooltip") {
5850
- if (this.tooltipRef.current && !this.tooltipManager) {
5851
- this.tooltipManager = new survey_core__WEBPACK_IMPORTED_MODULE_1__["TooltipManager"](this.tooltipRef.current);
5852
- }
5853
- if (!!this.tooltipManager && !this.tooltipRef.current) {
5854
- this.disposeTooltipManager();
5855
- }
5856
- }
5857
- };
5858
5851
  SurveyElementErrors.prototype.componentWillUnmount = function () {
5859
- if (!!this.tooltipManager) {
5860
- this.disposeTooltipManager();
5861
- }
5862
- };
5863
- SurveyElementErrors.prototype.disposeTooltipManager = function () {
5864
- var _a;
5865
- (_a = this.tooltipManager) === null || _a === void 0 ? void 0 : _a.dispose();
5866
- this.tooltipManager = undefined;
5867
5852
  };
5868
5853
  SurveyElementErrors.prototype.renderElement = function () {
5869
5854
  var errors = [];
@@ -5871,10 +5856,10 @@ var SurveyElementErrors = /** @class */ (function (_super) {
5871
5856
  var key = "error" + i;
5872
5857
  errors.push(this.creator.renderError(key, this.element.errors[i], this.cssClasses));
5873
5858
  }
5874
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { role: "alert", "aria-live": "polite", className: this.element.cssError, id: this.id, ref: this.tooltipRef }, errors));
5859
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { role: "alert", "aria-live": "polite", className: this.element.cssError, id: this.id }, errors));
5875
5860
  };
5876
5861
  return SurveyElementErrors;
5877
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["ReactSurveyElement"]));
5862
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["ReactSurveyElement"]));
5878
5863
 
5879
5864
  var SurveyQuestionAndErrorsWrapped = /** @class */ (function (_super) {
5880
5865
  __extends(SurveyQuestionAndErrorsWrapped, _super);
@@ -5920,23 +5905,9 @@ var SurveyQuestionAndErrorsWrapped = /** @class */ (function (_super) {
5920
5905
  SurveyQuestionAndErrorsWrapped.prototype.canRender = function () {
5921
5906
  return !!this.question;
5922
5907
  };
5923
- SurveyQuestionAndErrorsWrapped.prototype.renderErrors = function (errorsLocation) {
5924
- return this.getShowErrors() ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyElementErrors, { element: this.question, cssClasses: this.cssClasses, creator: this.creator, location: errorsLocation })) : null;
5925
- };
5926
5908
  SurveyQuestionAndErrorsWrapped.prototype.renderContent = function () {
5927
- var errorsLocation = this.creator.questionErrorLocation();
5928
- var errors = this.renderErrors(errorsLocation);
5929
- var errorsTop = this.question.showErrorOnTop
5930
- ? errors
5931
- : null;
5932
- var errorsBottom = this.question.showErrorOnBottom
5933
- ? errors
5934
- : null;
5935
5909
  var renderedQuestion = this.renderQuestion();
5936
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
5937
- errorsTop,
5938
- renderedQuestion,
5939
- errorsBottom));
5910
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, renderedQuestion));
5940
5911
  };
5941
5912
  SurveyQuestionAndErrorsWrapped.prototype.getShowErrors = function () {
5942
5913
  return this.question.isVisible;
@@ -5945,7 +5916,7 @@ var SurveyQuestionAndErrorsWrapped = /** @class */ (function (_super) {
5945
5916
  return SurveyQuestion.renderQuestionBody(this.creator, this.question);
5946
5917
  };
5947
5918
  return SurveyQuestionAndErrorsWrapped;
5948
- }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_4__["ReactSurveyElement"]));
5919
+ }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_3__["ReactSurveyElement"]));
5949
5920
 
5950
5921
  var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
5951
5922
  __extends(SurveyQuestionAndErrorsCell, _super);
@@ -5965,7 +5936,9 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
5965
5936
  };
5966
5937
  SurveyQuestionAndErrorsCell.prototype.renderElement = function () {
5967
5938
  var style = this.getCellStyle();
5968
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: this.props.cell.colSpans, "data-responsive-title": this.getHeaderText(), title: this.props.cell.getTitle(), style: style }, this.wrapCell(this.props.cell, (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.cellQuestionWrapper }, this.renderQuestion())))));
5939
+ var cell = this.props.cell;
5940
+ var focusIn = function () { cell.focusIn(); };
5941
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { ref: this.cellRef, className: this.itemCss, colSpan: cell.colSpans, "data-responsive-title": this.getHeaderText(), title: cell.getTitle(), style: style, onFocus: focusIn }, this.wrapCell(this.props.cell, (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.cssClasses.cellQuestionWrapper }, this.renderQuestion())))));
5969
5942
  };
5970
5943
  SurveyQuestionAndErrorsCell.prototype.getCellStyle = function () {
5971
5944
  return null;
@@ -5980,13 +5953,63 @@ var SurveyQuestionAndErrorsCell = /** @class */ (function (_super) {
5980
5953
  var survey = this.question.survey;
5981
5954
  var wrapper = null;
5982
5955
  if (survey) {
5983
- wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_2__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell, this.props.reason);
5956
+ wrapper = _reactsurveymodel__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElementsWrapper"].wrapMatrixCell(survey, element, cell, this.props.reason);
5984
5957
  }
5985
5958
  return wrapper !== null && wrapper !== void 0 ? wrapper : element;
5986
5959
  };
5987
5960
  return SurveyQuestionAndErrorsCell;
5988
5961
  }(SurveyQuestionAndErrorsWrapped));
5989
5962
 
5963
+ var SurveyQuestionErrorCell = /** @class */ (function (_super) {
5964
+ __extends(SurveyQuestionErrorCell, _super);
5965
+ function SurveyQuestionErrorCell(props) {
5966
+ var _this = _super.call(this, props) || this;
5967
+ _this.state = {
5968
+ changed: 0
5969
+ };
5970
+ if (_this.question) {
5971
+ _this.registerCallback(_this.question);
5972
+ }
5973
+ return _this;
5974
+ }
5975
+ Object.defineProperty(SurveyQuestionErrorCell.prototype, "question", {
5976
+ get: function () {
5977
+ return this.props.question;
5978
+ },
5979
+ enumerable: false,
5980
+ configurable: true
5981
+ });
5982
+ SurveyQuestionErrorCell.prototype.update = function () {
5983
+ this.setState({ changed: this.state.changed + 1 });
5984
+ };
5985
+ SurveyQuestionErrorCell.prototype.registerCallback = function (question) {
5986
+ var _this = this;
5987
+ question.registerFunctionOnPropertyValueChanged("errors", function () {
5988
+ _this.update();
5989
+ }, "__reactSubscription");
5990
+ };
5991
+ SurveyQuestionErrorCell.prototype.unRegisterCallback = function (question) {
5992
+ question.unRegisterFunctionOnPropertyValueChanged("errors", "__reactSubscription");
5993
+ };
5994
+ SurveyQuestionErrorCell.prototype.componentDidUpdate = function (prevProps) {
5995
+ if (prevProps.question && prevProps.question !== this.question) {
5996
+ this.unRegisterCallback(prevProps.cell);
5997
+ }
5998
+ if (this.question) {
5999
+ this.registerCallback(this.question);
6000
+ }
6001
+ };
6002
+ SurveyQuestionErrorCell.prototype.componentWillUnmount = function () {
6003
+ if (this.question) {
6004
+ this.unRegisterCallback(this.question);
6005
+ }
6006
+ };
6007
+ SurveyQuestionErrorCell.prototype.render = function () {
6008
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyElementErrors, { element: this.question, creator: this.props.creator, cssClasses: this.question.cssClasses });
6009
+ };
6010
+ return SurveyQuestionErrorCell;
6011
+ }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
6012
+
5990
6013
 
5991
6014
 
5992
6015
  /***/ }),
@@ -6469,7 +6492,7 @@ var SurveyQuestionCommentItem = /** @class */ (function (_super) {
6469
6492
  return this.props.question.commentId;
6470
6493
  };
6471
6494
  SurveyQuestionCommentItem.prototype.getPlaceholder = function () {
6472
- return this.props.question.commentPlaceholder;
6495
+ return this.props.question.renderedCommentPlaceholder;
6473
6496
  };
6474
6497
  SurveyQuestionCommentItem.prototype.renderElement = function () {
6475
6498
  var _this = this;
@@ -7269,7 +7292,7 @@ var SurveyQuestionFile = /** @class */ (function (_super) {
7269
7292
  noFileChosen = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.noFileChosen }, this.question.noFileChosenCaption));
7270
7293
  }
7271
7294
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.getFileDecoratorCss() },
7272
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.question.dragAreaPlaceholder),
7295
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.cssClasses.dragAreaPlaceholder }, this.question.renderedPlaceholder),
7273
7296
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.wrapper },
7274
7297
  chooseFile,
7275
7298
  noFileChosen)));
@@ -7649,14 +7672,13 @@ _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__["ReactQuestionFactory"].Inst
7649
7672
  /*!********************************************************!*\
7650
7673
  !*** ./src/react/reactquestion_matrixdropdownbase.tsx ***!
7651
7674
  \********************************************************/
7652
- /*! exports provided: SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell, SurveyQuestionMatrixDropdownErrorCell */
7675
+ /*! exports provided: SurveyQuestionMatrixDropdownBase, SurveyQuestionMatrixDropdownCell */
7653
7676
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7654
7677
 
7655
7678
  "use strict";
7656
7679
  __webpack_require__.r(__webpack_exports__);
7657
7680
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownBase", function() { return SurveyQuestionMatrixDropdownBase; });
7658
7681
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownCell", function() { return SurveyQuestionMatrixDropdownCell; });
7659
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyQuestionMatrixDropdownErrorCell", function() { return SurveyQuestionMatrixDropdownErrorCell; });
7660
7682
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
7661
7683
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
7662
7684
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
@@ -7867,7 +7889,7 @@ var SurveyQuestionMatrixDropdownBase = /** @class */ (function (_super) {
7867
7889
  }
7868
7890
  if (cell.isErrorsCell) {
7869
7891
  if (cell.isErrorsCell) {
7870
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixDropdownErrorCell, { cell: cell, creator: this.creator }));
7892
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionErrorCell"], { question: cell.question, creator: this.creator }));
7871
7893
  }
7872
7894
  }
7873
7895
  if (!cellContent)
@@ -8016,56 +8038,6 @@ var SurveyQuestionMatrixDropdownCell = /** @class */ (function (_super) {
8016
8038
  return SurveyQuestionMatrixDropdownCell;
8017
8039
  }(_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionAndErrorsCell"]));
8018
8040
 
8019
- var SurveyQuestionMatrixDropdownErrorCell = /** @class */ (function (_super) {
8020
- __extends(SurveyQuestionMatrixDropdownErrorCell, _super);
8021
- function SurveyQuestionMatrixDropdownErrorCell(props) {
8022
- var _this = _super.call(this, props) || this;
8023
- _this.state = {
8024
- changed: 0
8025
- };
8026
- if (_this.cell) {
8027
- _this.registerCallback(_this.cell);
8028
- }
8029
- return _this;
8030
- }
8031
- Object.defineProperty(SurveyQuestionMatrixDropdownErrorCell.prototype, "cell", {
8032
- get: function () {
8033
- return this.props.cell;
8034
- },
8035
- enumerable: false,
8036
- configurable: true
8037
- });
8038
- SurveyQuestionMatrixDropdownErrorCell.prototype.update = function () {
8039
- this.setState({ changed: this.state.changed + 1 });
8040
- };
8041
- SurveyQuestionMatrixDropdownErrorCell.prototype.registerCallback = function (cell) {
8042
- var _this = this;
8043
- cell.question.registerFunctionOnPropertyValueChanged("errors", function () {
8044
- _this.update();
8045
- }, "__reactSubscription");
8046
- };
8047
- SurveyQuestionMatrixDropdownErrorCell.prototype.unRegisterCallback = function (cell) {
8048
- cell.question.unRegisterFunctionOnPropertyValueChanged("errors", "__reactSubscription");
8049
- };
8050
- SurveyQuestionMatrixDropdownErrorCell.prototype.componentDidUpdate = function (prevProps) {
8051
- if (prevProps.cell && prevProps.cell !== this.cell) {
8052
- this.unRegisterCallback(prevProps.cell);
8053
- }
8054
- if (this.cell) {
8055
- this.registerCallback(this.cell);
8056
- }
8057
- };
8058
- SurveyQuestionMatrixDropdownErrorCell.prototype.componentWillUnmount = function () {
8059
- if (this.cell) {
8060
- this.unRegisterCallback(this.cell);
8061
- }
8062
- };
8063
- SurveyQuestionMatrixDropdownErrorCell.prototype.render = function () {
8064
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyElementErrors"], { element: this.cell.question, creator: this.props.creator, cssClasses: this.cell.question.cssClasses });
8065
- };
8066
- return SurveyQuestionMatrixDropdownErrorCell;
8067
- }(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));
8068
-
8069
8041
 
8070
8042
 
8071
8043
  /***/ }),
@@ -8256,18 +8228,30 @@ var SurveyQuestionMultipleText = /** @class */ (function (_super) {
8256
8228
  var tableRows = this.question.getRows();
8257
8229
  var rows = [];
8258
8230
  for (var i = 0; i < tableRows.length; i++) {
8259
- rows.push(this.renderRow(i, tableRows[i], cssClasses));
8231
+ if (tableRows[i].isVisible) {
8232
+ rows.push(this.renderRow(i, tableRows[i].cells, cssClasses));
8233
+ }
8260
8234
  }
8261
8235
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("table", { className: cssClasses.root },
8262
8236
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tbody", null, rows)));
8263
8237
  };
8264
- SurveyQuestionMultipleText.prototype.renderRow = function (rowIndex, items, cssClasses) {
8238
+ SurveyQuestionMultipleText.prototype.renderCell = function (cell, cssClasses, index) {
8239
+ var cellContent;
8240
+ var focusIn = function () { cell.item.focusIn(); };
8241
+ if (cell.isErrorsCell) {
8242
+ cellContent = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyQuestionErrorCell"], { question: cell.item.editor, creator: this.creator });
8243
+ }
8244
+ else {
8245
+ cellContent = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyMultipleTextItem, { question: this.question, item: cell.item, creator: this.creator, cssClasses: cssClasses });
8246
+ }
8247
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: "item" + index, className: cell.className, onFocus: focusIn }, cellContent));
8248
+ };
8249
+ SurveyQuestionMultipleText.prototype.renderRow = function (rowIndex, cells, cssClasses) {
8265
8250
  var key = "item" + rowIndex;
8266
8251
  var tds = [];
8267
- for (var i = 0; i < items.length; i++) {
8268
- var item = items[i];
8269
- tds.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: "item" + i, className: this.question.cssClasses.cell },
8270
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyMultipleTextItem, { question: this.question, item: item, creator: this.creator, cssClasses: cssClasses })));
8252
+ for (var i = 0; i < cells.length; i++) {
8253
+ var cell = cells[i];
8254
+ tds.push(this.renderCell(cell, cssClasses, i));
8271
8255
  }
8272
8256
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", { key: key, className: cssClasses.row }, tds));
8273
8257
  };
@@ -8309,11 +8293,7 @@ var SurveyMultipleTextItem = /** @class */ (function (_super) {
8309
8293
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: this.question.getItemLabelCss(item) },
8310
8294
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: cssClasses.itemTitle },
8311
8295
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_title_title_content__WEBPACK_IMPORTED_MODULE_4__["TitleContent"], { element: item.editor, cssClasses: item.editor.cssClasses })),
8312
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyMultipleTextItemEditor, { cssClasses: cssClasses, itemCss: this.question.getItemCss(), question: item.editor, creator: this.creator }),
8313
- this.renderItemTooltipError(item, cssClasses)));
8314
- };
8315
- SurveyMultipleTextItem.prototype.renderItemTooltipError = function (item, cssClasses) {
8316
- return this.item.editor.isErrorsModeTooltip ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_reactquestion__WEBPACK_IMPORTED_MODULE_2__["SurveyElementErrors"], { element: item.editor, cssClasses: cssClasses, creator: this.creator, location: "tooltip" })) : null;
8296
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyMultipleTextItemEditor, { cssClasses: cssClasses, itemCss: this.question.getItemCss(), question: item.editor, creator: this.creator })));
8317
8297
  };
8318
8298
  return SurveyMultipleTextItem;
8319
8299
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -9518,7 +9498,7 @@ var SurveyRow = /** @class */ (function (_super) {
9518
9498
  var css = element.cssClassesValue;
9519
9499
  var focusIn = function () {
9520
9500
  var el = element;
9521
- if (el && !el.isDisposed && el.isQuestion) {
9501
+ if (el && el.isQuestion) {
9522
9502
  el.focusIn();
9523
9503
  }
9524
9504
  };
@@ -9637,9 +9617,15 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
9637
9617
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.root, ref: function (root) { return (_this.setControl(root)); }, style: { height: this.question.signatureHeight, width: this.question.signatureWidth } },
9638
9618
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.question.placeHolderText),
9639
9619
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
9640
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: 0 })),
9620
+ this.renderBackgroundImage(),
9621
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: 0, className: this.question.cssClasses.canvas })),
9641
9622
  clearButton));
9642
9623
  };
9624
+ SurveyQuestionSignaturePad.prototype.renderBackgroundImage = function () {
9625
+ if (!this.question.backgroundImage)
9626
+ return null;
9627
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: this.question.cssClasses.backgroundImage, src: this.question.backgroundImage, width: this.question.signatureWidth, height: this.question.signatureHeight });
9628
+ };
9643
9629
  SurveyQuestionSignaturePad.prototype.renderCleanButton = function () {
9644
9630
  var _this = this;
9645
9631
  if (!this.question.canShowClearButton)