survey-react-ui 1.11.11 → 1.11.13

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.11.11",
3
+ "version": "1.11.13",
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.11.11",
24
+ "survey-core": "1.11.13",
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.11.11
2
+ * surveyjs - Survey JavaScript library v1.11.13
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
  */
@@ -2488,14 +2488,17 @@ var reactquestion_SurveyQuestionErrorCell = /** @class */ (function (_super) {
2488
2488
  SurveyQuestionErrorCell.prototype.update = function () {
2489
2489
  this.setState({ changed: this.state.changed + 1 });
2490
2490
  };
2491
+ SurveyQuestionErrorCell.prototype.getQuestionPropertiesToTrack = function () {
2492
+ return ["errors"];
2493
+ };
2491
2494
  SurveyQuestionErrorCell.prototype.registerCallback = function (question) {
2492
2495
  var _this = this;
2493
- question.registerFunctionOnPropertyValueChanged("errors", function () {
2496
+ question.registerFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(), function () {
2494
2497
  _this.update();
2495
2498
  }, "__reactSubscription");
2496
2499
  };
2497
2500
  SurveyQuestionErrorCell.prototype.unRegisterCallback = function (question) {
2498
- question.unRegisterFunctionOnPropertyValueChanged("errors", "__reactSubscription");
2501
+ question.unRegisterFunctionOnPropertiesValueChanged(this.getQuestionPropertiesToTrack(), "__reactSubscription");
2499
2502
  };
2500
2503
  SurveyQuestionErrorCell.prototype.componentDidUpdate = function (prevProps) {
2501
2504
  if (prevProps.question && prevProps.question !== this.question) {
@@ -2984,7 +2987,6 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
2984
2987
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "header", needRenderWrapper: false }),
2985
2988
  renderResult,
2986
2989
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "footer", needRenderWrapper: false }))),
2987
- this.survey.showBrandInfo ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](brand_info_BrandInfo, null) : null,
2988
2990
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](notifier_NotifierComponent, { notifier: this.survey.notifier }))));
2989
2991
  };
2990
2992
  Survey.prototype.renderElement = function () {
@@ -3034,7 +3036,8 @@ var reactSurvey_Survey = /** @class */ (function (_super) {
3034
3036
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { id: pageId, className: className, style: style },
3035
3037
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "contentTop" }),
3036
3038
  activePage,
3037
- external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "contentBottom" }))),
3039
+ external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "contentBottom" }),
3040
+ this.survey.showBrandInfo ? external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](brand_info_BrandInfo, null) : null)),
3038
3041
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](components_container_ComponentsContainer, { survey: this.survey, container: "right" })));
3039
3042
  };
3040
3043
  Survey.prototype.renderPage = function (page) {
@@ -6252,6 +6255,11 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixTable = /** @class */ (
6252
6255
  if (cell.hasQuestion) {
6253
6256
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownCell, { key: key, cssClasses: cssClasses, cell: cell, creator: this.creator, reason: reason }));
6254
6257
  }
6258
+ if (cell.isErrorsCell) {
6259
+ if (cell.isErrorsCell) {
6260
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownErrorsCell, { cell: cell, key: key, keyValue: key, question: cell.question, creator: this.creator }));
6261
+ }
6262
+ }
6255
6263
  var calcReason = reason;
6256
6264
  if (!calcReason) {
6257
6265
  calcReason = cell.hasTitle ? "row-header" : "";
@@ -6299,11 +6307,6 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixTable = /** @class */ (
6299
6307
  if (cell.hasPanel) {
6300
6308
  cellContent = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](panel_SurveyPanel, { key: cell.panel.id, element: cell.panel, survey: this.question.survey, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, creator: this.creator }));
6301
6309
  }
6302
- if (cell.isErrorsCell) {
6303
- if (cell.isErrorsCell) {
6304
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_SurveyQuestionErrorCell, { question: cell.question, creator: this.creator }));
6305
- }
6306
- }
6307
6310
  if (!cellContent)
6308
6311
  return null;
6309
6312
  var readyCell = (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](external_root_React_commonjs2_react_commonjs_react_amd_react_["Fragment"], null, cellContent));
@@ -6387,6 +6390,35 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixActionsCell = /** @clas
6387
6390
  };
6388
6391
  return SurveyQuestionMatrixActionsCell;
6389
6392
  }(ReactSurveyElement));
6393
+ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownErrorsCell = /** @class */ (function (_super) {
6394
+ reactquestion_matrixdropdownbase_extends(SurveyQuestionMatrixDropdownErrorsCell, _super);
6395
+ function SurveyQuestionMatrixDropdownErrorsCell(props) {
6396
+ return _super.call(this, props) || this;
6397
+ }
6398
+ Object.defineProperty(SurveyQuestionMatrixDropdownErrorsCell.prototype, "key", {
6399
+ get: function () {
6400
+ return this.props.keyValue;
6401
+ },
6402
+ enumerable: false,
6403
+ configurable: true
6404
+ });
6405
+ Object.defineProperty(SurveyQuestionMatrixDropdownErrorsCell.prototype, "cell", {
6406
+ get: function () {
6407
+ return this.props.cell;
6408
+ },
6409
+ enumerable: false,
6410
+ configurable: true
6411
+ });
6412
+ SurveyQuestionMatrixDropdownErrorsCell.prototype.render = function () {
6413
+ if (!this.cell.isVisible)
6414
+ return null;
6415
+ return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("td", { className: this.cell.className, key: this.key, colSpan: this.cell.colSpans, title: this.cell.getTitle() }, _super.prototype.render.call(this));
6416
+ };
6417
+ SurveyQuestionMatrixDropdownErrorsCell.prototype.getQuestionPropertiesToTrack = function () {
6418
+ return _super.prototype.getQuestionPropertiesToTrack.call(this).concat(["visible"]);
6419
+ };
6420
+ return SurveyQuestionMatrixDropdownErrorsCell;
6421
+ }(reactquestion_SurveyQuestionErrorCell));
6390
6422
  ReactElementFactory.Instance.registerElement("sv-matrixdynamic-actions-cell", function (props) {
6391
6423
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](reactquestion_matrixdropdownbase_SurveyQuestionMatrixActionsCell, props);
6392
6424
  });
@@ -6484,6 +6516,12 @@ var reactquestion_matrixdropdownbase_SurveyQuestionMatrixDropdownCell = /** @cla
6484
6516
  SurveyQuestionMatrixDropdownCell.prototype.getHeaderText = function () {
6485
6517
  return this.cell.headers;
6486
6518
  };
6519
+ SurveyQuestionMatrixDropdownCell.prototype.renderElement = function () {
6520
+ if (!this.cell.isVisible) {
6521
+ return null;
6522
+ }
6523
+ return _super.prototype.renderElement.call(this);
6524
+ };
6487
6525
  SurveyQuestionMatrixDropdownCell.prototype.renderCellContent = function () {
6488
6526
  var content = _super.prototype.renderCellContent.call(this);
6489
6527
  var responsiveTitle = this.cell.showResponsiveTitle ? (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("span", { className: this.cell.responsiveTitleCss }, this.renderLocString(this.cell.responsiveLocTitle))) : null;
@@ -7740,7 +7778,13 @@ var react_popup_survey_PopupSurvey = /** @class */ (function (_super) {
7740
7778
  return external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](svg_icon_SvgIcon, { iconName: "icon-minimize_16x16", size: 16 });
7741
7779
  };
7742
7780
  PopupSurvey.prototype.renderCloseButton = function (popup) {
7743
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () { popup.hide(); } },
7781
+ var _this = this;
7782
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () {
7783
+ popup.hide();
7784
+ if (typeof _this.props.onClose == "function") {
7785
+ _this.props.onClose();
7786
+ }
7787
+ } },
7744
7788
  external_root_React_commonjs2_react_commonjs_react_amd_react_["createElement"](svg_icon_SvgIcon, { iconName: "icon-close_16x16", size: 16 })));
7745
7789
  };
7746
7790
  PopupSurvey.prototype.renderAllowFullScreenButon = function (popup) {
@@ -9124,7 +9168,7 @@ ReactElementFactory.Instance.registerElement(external_root_Survey_commonjs2_surv
9124
9168
 
9125
9169
 
9126
9170
 
9127
- Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.11.11", "survey-react-ui");
9171
+ Object(external_root_Survey_commonjs2_survey_core_commonjs_survey_core_amd_survey_core_["checkLibraryVersion"])("" + "1.11.13", "survey-react-ui");
9128
9172
 
9129
9173
 
9130
9174
  /***/ }),