survey-react 1.9.77 → 1.9.78

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/survey.react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.77
2
+ * surveyjs - Survey JavaScript library v1.9.78
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
  */
@@ -5318,7 +5318,12 @@ var defaultStandardCss = {
5318
5318
  filterStringInput: "sv_q_dropdown__filter-string-input"
5319
5319
  },
5320
5320
  html: { root: "" },
5321
- image: { root: "sv_q_image", image: "sv_image_image" },
5321
+ image: {
5322
+ root: "sv_q_image",
5323
+ image: "sv_image_image",
5324
+ noImage: "sv-image__no-image",
5325
+ noImageSvgIconId: "icon-no-image",
5326
+ },
5322
5327
  matrix: {
5323
5328
  root: "sv_q_matrix",
5324
5329
  label: "sv_q_m_label",
@@ -5435,7 +5440,10 @@ var defaultStandardCss = {
5435
5440
  itemInline: "sv_q_imagepicker_inline",
5436
5441
  itemText: "sv_q_imgsel_text",
5437
5442
  clearButton: "sv_q_radiogroup_clear",
5438
- column: "sv_q_select_column"
5443
+ column: "sv_q_select_column",
5444
+ itemNoImage: "sv_q_imgsel__no-image",
5445
+ itemNoImageSvgIcon: "sv_q_imgsel__no-image-svg",
5446
+ itemNoImageSvgIconId: "icon-no-image",
5439
5447
  },
5440
5448
  rating: {
5441
5449
  root: "sv_q_rating",
@@ -5708,6 +5716,8 @@ var defaultV2Css = {
5708
5716
  root: "sd-image",
5709
5717
  image: "sd-image__image",
5710
5718
  adaptive: "sd-image__image--adaptive",
5719
+ noImage: "sd-image__no-image",
5720
+ noImageSvgIconId: "icon-no-image",
5711
5721
  withFrame: ""
5712
5722
  },
5713
5723
  html: {
@@ -5869,7 +5879,7 @@ var defaultV2Css = {
5869
5879
  other: "sd-input sd-comment",
5870
5880
  itemNoImage: "sd-imagepicker__no-image",
5871
5881
  itemNoImageSvgIcon: "sd-imagepicker__no-image-svg",
5872
- itemNoImageSvgIconId: "#icon-no-image",
5882
+ itemNoImageSvgIconId: "icon-no-image",
5873
5883
  column: "sd-selectbase__column sd-imagepicker__column",
5874
5884
  checkedItemDecorator: "sd-imagepicker__check-decorator",
5875
5885
  checkedItemSvgIcon: "sd-imagepicker__check-icon",
@@ -6426,8 +6436,10 @@ var DragDropCore = /** @class */ (function (_super) {
6426
6436
  _this.creator = creator;
6427
6437
  _this.longTap = longTap;
6428
6438
  _this.onGhostPositionChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
6429
- _this.onBeforeDrop = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
6430
- _this.onAfterDrop = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
6439
+ _this.onDragStart = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
6440
+ _this.onDragEnd = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
6441
+ _this.onBeforeDrop = _this.onDragStart;
6442
+ _this.onAfterDrop = _this.onDragEnd;
6431
6443
  _this.draggedElement = null;
6432
6444
  _this.dropTarget = null;
6433
6445
  _this.prevDropTarget = null;
@@ -6482,9 +6494,9 @@ var DragDropCore = /** @class */ (function (_super) {
6482
6494
  _this.drop = function () {
6483
6495
  if (_this.allowDropHere) {
6484
6496
  var fromElement = _this.draggedElement.parent;
6485
- _this.onBeforeDrop.fire(_this, { fromElement: fromElement, draggedElement: _this.draggedElement });
6497
+ _this.onDragStart.fire(_this, { fromElement: fromElement, draggedElement: _this.draggedElement });
6486
6498
  var newElement = _this.doDrop();
6487
- _this.onAfterDrop.fire(_this, { fromElement: fromElement, draggedElement: newElement, toElement: _this.dropTarget });
6499
+ _this.onDragEnd.fire(_this, { fromElement: fromElement, draggedElement: newElement, toElement: _this.dropTarget });
6488
6500
  }
6489
6501
  _this.clear();
6490
6502
  };
@@ -7029,6 +7041,10 @@ var DragDropRankingChoices = /** @class */ (function (_super) {
7029
7041
  var rect = draggedElementNode.getBoundingClientRect();
7030
7042
  draggedElementShortcut.shortcutXOffset = event.clientX - rect.x;
7031
7043
  draggedElementShortcut.shortcutYOffset = event.clientY - rect.y;
7044
+ if (this.parentElement && this.parentElement.useFullItemSizeForShortcut) {
7045
+ draggedElementShortcut.style.width = draggedElementNode.offsetWidth + "px";
7046
+ draggedElementShortcut.style.height = draggedElementNode.offsetHeight + "px";
7047
+ }
7032
7048
  return draggedElementShortcut;
7033
7049
  };
7034
7050
  Object.defineProperty(DragDropRankingChoices.prototype, "shortcutClass", {
@@ -7655,6 +7671,9 @@ var DropdownListModel = /** @class */ (function (_super) {
7655
7671
  });
7656
7672
  this._popupModel.cssClass = this.popupCssClasses;
7657
7673
  this._popupModel.onVisibilityChanged.add(function (_, option) {
7674
+ if (option.isVisible) {
7675
+ _this.listModel.renderElements = true;
7676
+ }
7658
7677
  if (option.isVisible && _this.question.choicesLazyLoadEnabled) {
7659
7678
  _this.listModel.actions = [];
7660
7679
  _this.updateQuestionChoices();
@@ -7701,6 +7720,7 @@ var DropdownListModel = /** @class */ (function (_super) {
7701
7720
  };
7702
7721
  }
7703
7722
  var res = new _list__WEBPACK_IMPORTED_MODULE_2__["ListModel"](visibleItems, _onSelectionChanged, false);
7723
+ res.renderElements = false;
7704
7724
  res.areSameItemsCallback = function (item1, item2) {
7705
7725
  return item1 === item2;
7706
7726
  };
@@ -8007,14 +8027,14 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8007
8027
  _super.prototype.createPopup.call(this);
8008
8028
  this.popupModel.onFooterActionsCreated.add(function (_, opt) {
8009
8029
  if (_this.shouldResetAfterCancel) {
8010
- opt.actions[0].needSpace = true;
8011
- opt.actions = [{
8012
- id: "sv-dropdown-done-button",
8013
- title: _this.doneButtonCaption,
8014
- innerCss: "sv-popup__button--done",
8015
- action: function () { _this.popupModel.isVisible = false; },
8016
- enabled: new _base__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"](function () { return !_this.isTwoValueEquals(_this.question.renderedValue, _this.previousValue); })
8017
- }].concat(opt.actions);
8030
+ opt.actions.push({
8031
+ id: "sv-dropdown-done-button",
8032
+ title: _this.doneButtonCaption,
8033
+ innerCss: "sv-popup__button--done",
8034
+ needSpace: true,
8035
+ action: function () { _this.popupModel.isVisible = false; },
8036
+ enabled: new _base__WEBPACK_IMPORTED_MODULE_0__["ComputedUpdater"](function () { return !_this.isTwoValueEquals(_this.question.renderedValue, _this.previousValue); })
8037
+ });
8018
8038
  }
8019
8039
  });
8020
8040
  this.popupModel.onVisibilityChanged.add(function (_, opt) {
@@ -8833,7 +8853,7 @@ __webpack_require__.r(__webpack_exports__);
8833
8853
  // import "../../main.scss";
8834
8854
  //import "../../modern.scss";
8835
8855
  var Version;
8836
- Version = "" + "1.9.77";
8856
+ Version = "" + "1.9.78";
8837
8857
  function checkLibraryVersion(ver, libraryName) {
8838
8858
  if (Version != ver) {
8839
8859
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -18959,6 +18979,9 @@ var ListModel = /** @class */ (function (_super) {
18959
18979
  __decorate([
18960
18980
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
18961
18981
  ], ListModel.prototype, "showSearchClearButton", void 0);
18982
+ __decorate([
18983
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
18984
+ ], ListModel.prototype, "renderElements", void 0);
18962
18985
  return ListModel;
18963
18986
  }(_actions_container__WEBPACK_IMPORTED_MODULE_1__["ActionContainer"]));
18964
18987
 
@@ -20478,7 +20501,7 @@ var englishStrings = {
20478
20501
  noEntriesText: "There are no entries yet.\nClick the button below to add a new entry.",
20479
20502
  noEntriesReadonlyText: "There are no entries.",
20480
20503
  more: "More",
20481
- tagboxDoneButtonCaption: "Done"
20504
+ tagboxDoneButtonCaption: "OK"
20482
20505
  };
20483
20506
  // Uncomment the lines below if you create a custom dictionary.
20484
20507
  // Replace "en" with a custom locale code (for example, "fr" or "de"),
@@ -25802,6 +25825,7 @@ var PageModel = /** @class */ (function (_super) {
25802
25825
  }
25803
25826
  }
25804
25827
  var options = {
25828
+ allow: true,
25805
25829
  target: this.dragDropInfo.target,
25806
25830
  source: this.dragDropInfo.source,
25807
25831
  parent: parent,
@@ -39565,6 +39589,12 @@ var __extends = (undefined && undefined.__extends) || (function () {
39565
39589
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
39566
39590
  };
39567
39591
  })();
39592
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
39593
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
39594
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
39595
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
39596
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
39597
+ };
39568
39598
 
39569
39599
 
39570
39600
 
@@ -39674,9 +39704,12 @@ var QuestionImageModel = /** @class */ (function (_super) {
39674
39704
  enumerable: false,
39675
39705
  configurable: true
39676
39706
  });
39707
+ QuestionImageModel.prototype.getRenderedSize = function (val) {
39708
+ return isNaN(Number(val)) ? val : val + "px";
39709
+ };
39677
39710
  Object.defineProperty(QuestionImageModel.prototype, "renderedHeight", {
39678
39711
  get: function () {
39679
- return this.imageHeight ? this.imageHeight + "px" : undefined;
39712
+ return this.imageHeight ? this.getRenderedSize(this.imageHeight) : undefined;
39680
39713
  },
39681
39714
  enumerable: false,
39682
39715
  configurable: true
@@ -39702,7 +39735,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
39702
39735
  });
39703
39736
  Object.defineProperty(QuestionImageModel.prototype, "renderedWidth", {
39704
39737
  get: function () {
39705
- return this.imageWidth ? this.imageWidth + "px" : undefined;
39738
+ return this.imageWidth ? this.getRenderedSize(this.imageWidth) : undefined;
39706
39739
  },
39707
39740
  enumerable: false,
39708
39741
  configurable: true
@@ -39767,6 +39800,12 @@ var QuestionImageModel = /** @class */ (function (_super) {
39767
39800
  .append(this.cssClasses.adaptive, isDefaultSize)
39768
39801
  .toString();
39769
39802
  };
39803
+ QuestionImageModel.prototype.onLoadHandler = function () {
39804
+ this.contentNotLoaded = false;
39805
+ };
39806
+ QuestionImageModel.prototype.onErrorHandler = function () {
39807
+ this.contentNotLoaded = true;
39808
+ };
39770
39809
  QuestionImageModel.prototype.setRenderedMode = function (val) {
39771
39810
  this.setPropertyValue("renderedMode", val);
39772
39811
  };
@@ -39800,6 +39839,9 @@ var QuestionImageModel = /** @class */ (function (_super) {
39800
39839
  }
39801
39840
  return false;
39802
39841
  };
39842
+ __decorate([
39843
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
39844
+ ], QuestionImageModel.prototype, "contentNotLoaded", void 0);
39803
39845
  return QuestionImageModel;
39804
39846
  }(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
39805
39847
 
@@ -39830,8 +39872,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("image", [
39830
39872
  default: "contain",
39831
39873
  choices: ["none", "contain", "cover", "fill"],
39832
39874
  },
39833
- { name: "imageHeight:number", default: 150, minValue: 0 },
39834
- { name: "imageWidth:number", default: 200, minValue: 0 },
39875
+ { name: "imageHeight", default: "150" },
39876
+ { name: "imageWidth", default: "200" },
39835
39877
  ], function () {
39836
39878
  return new QuestionImageModel("");
39837
39879
  }, "nonvalue");
@@ -39938,6 +39980,12 @@ var ImageItemValue = /** @class */ (function (_super) {
39938
39980
  ImageItemValue.prototype.getProcessedText = function (text) {
39939
39981
  return !!this.locOwner ? this.locOwner.getProcessedText(text) : text;
39940
39982
  };
39983
+ ImageItemValue.prototype.onErrorHandler = function () {
39984
+ this.contentNotLoaded = true;
39985
+ };
39986
+ __decorate([
39987
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
39988
+ ], ImageItemValue.prototype, "contentNotLoaded", void 0);
39941
39989
  return ImageItemValue;
39942
39990
  }(_itemvalue__WEBPACK_IMPORTED_MODULE_3__["ItemValue"]));
39943
39991
 
@@ -39953,6 +40001,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
39953
40001
  //responsive mode
39954
40002
  _this.isResponsiveValue = false;
39955
40003
  _this.onContentLoaded = function (item, event) {
40004
+ item.contentNotLoaded = false;
39956
40005
  var content = event.target;
39957
40006
  if (_this.contentMode == "video") {
39958
40007
  item["aspectRatio"] = content.videoWidth / content.videoHeight;
@@ -40025,8 +40074,11 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
40025
40074
  });
40026
40075
  QuestionImagePickerModel.prototype.isItemSelected = function (item) {
40027
40076
  var val = this.value;
40077
+ var imageItemValue = item;
40028
40078
  if (this.isValueEmpty(val))
40029
40079
  return false;
40080
+ if (!imageItemValue.imageLink || imageItemValue.contentNotLoaded)
40081
+ return false;
40030
40082
  if (!this.multiSelect)
40031
40083
  return this.isTwoValueEquals(val, item.value);
40032
40084
  if (!Array.isArray(val))
@@ -40037,6 +40089,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
40037
40089
  }
40038
40090
  return false;
40039
40091
  };
40092
+ QuestionImagePickerModel.prototype.getItemEnabled = function (item) {
40093
+ var imageItemValue = item;
40094
+ if (!imageItemValue.imageLink || imageItemValue.contentNotLoaded)
40095
+ return false;
40096
+ return _super.prototype.getItemEnabled.call(this, item);
40097
+ };
40040
40098
  QuestionImagePickerModel.prototype.clearIncorrectValues = function () {
40041
40099
  if (this.multiSelect) {
40042
40100
  var val = this.value;
@@ -47773,6 +47831,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
47773
47831
  _this.registerPropertyChangedHandlers(["isMobile"], function () {
47774
47832
  _this.updateFooterActions();
47775
47833
  });
47834
+ _this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
47776
47835
  return _this;
47777
47836
  }
47778
47837
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "hasSingleInput", {
@@ -48997,7 +49056,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
48997
49056
  var loc = this.getLocalizableString("noEntriesText");
48998
49057
  if (!loc)
48999
49058
  return;
49000
- loc.localizationName = this.isReadOnly ? "noEntriesReadonlyText" : "noEntriesText";
49059
+ loc.localizationName = (this.isReadOnly || !this.allowAddPanel) ? "noEntriesReadonlyText" : "noEntriesText";
49001
49060
  loc.strChanged();
49002
49061
  };
49003
49062
  QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
@@ -49018,7 +49077,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
49018
49077
  }
49019
49078
  }
49020
49079
  this.recalculateIsReadyValue();
49021
- if (this.isReadOnly) {
49080
+ if (this.isReadOnly || !this.allowAddPanel) {
49022
49081
  this.updateNoEntriesTextDefaultLoc();
49023
49082
  }
49024
49083
  _super.prototype.onSurveyLoad.call(this);
@@ -50227,6 +50286,16 @@ var QuestionRankingModel = /** @class */ (function (_super) {
50227
50286
  enumerable: false,
50228
50287
  configurable: true
50229
50288
  });
50289
+ Object.defineProperty(QuestionRankingModel.prototype, "useFullItemSizeForShortcut", {
50290
+ get: function () {
50291
+ return this.getPropertyValue("useFullItemSizeForShortcut");
50292
+ },
50293
+ set: function (val) {
50294
+ this.setPropertyValue("useFullItemSizeForShortcut", val);
50295
+ },
50296
+ enumerable: false,
50297
+ configurable: true
50298
+ });
50230
50299
  __decorate([
50231
50300
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: null })
50232
50301
  ], QuestionRankingModel.prototype, "currentDropTarget", void 0);
@@ -51573,6 +51642,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
51573
51642
  _this.updateValueOnEvent(event);
51574
51643
  _this.updateRemainingCharacterCounter(event.target.value);
51575
51644
  };
51645
+ _this.onFocus = function (event) {
51646
+ _this.updateRemainingCharacterCounter(event.target.value);
51647
+ };
51576
51648
  _this.createLocalizableString("minErrorText", _this, true, "minError");
51577
51649
  _this.createLocalizableString("maxErrorText", _this, true, "maxError");
51578
51650
  _this.locDataListValue = new _localizablestring__WEBPACK_IMPORTED_MODULE_2__["LocalizableStrings"](_this);
@@ -51882,7 +51954,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
51882
51954
  };
51883
51955
  Object.defineProperty(QuestionTextModel.prototype, "isValueLessMin", {
51884
51956
  get: function () {
51885
- return (!this.isValueEmpty(this.renderedMin) &&
51957
+ return (!this.isValueEmpty(this.renderedMin) && !this.isEmpty() &&
51886
51958
  this.getCalculatedMinMax(this.value) <
51887
51959
  this.getCalculatedMinMax(this.renderedMin));
51888
51960
  },
@@ -51891,7 +51963,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
51891
51963
  });
51892
51964
  Object.defineProperty(QuestionTextModel.prototype, "isValueGreaterMax", {
51893
51965
  get: function () {
51894
- return (!this.isValueEmpty(this.renderedMax) &&
51966
+ return (!this.isValueEmpty(this.renderedMax) && !this.isEmpty() &&
51895
51967
  this.getCalculatedMinMax(this.value) >
51896
51968
  this.getCalculatedMinMax(this.renderedMax));
51897
51969
  },
@@ -53607,14 +53679,19 @@ var List = /** @class */ (function (_super) {
53607
53679
  }
53608
53680
  };
53609
53681
  List.prototype.renderElement = function () {
53610
- var items = this.renderItems();
53611
- var ulStyle = { display: this.model.isEmpty ? "none" : null };
53612
53682
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { className: this.model.cssClasses.root, ref: this.listContainerRef },
53613
53683
  this.searchElementContent(),
53614
53684
  this.emptyContent(),
53615
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.cssClasses.itemsContainer, style: ulStyle, role: "listbox", onMouseDown: function (e) {
53616
- e.preventDefault();
53617
- }, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items)));
53685
+ this.renderList()));
53686
+ };
53687
+ List.prototype.renderList = function () {
53688
+ if (!this.model.renderElements)
53689
+ return null;
53690
+ var items = this.renderItems();
53691
+ var ulStyle = { display: this.model.isEmpty ? "none" : null };
53692
+ return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("ul", { className: this.model.cssClasses.itemsContainer, style: ulStyle, role: "listbox", onMouseDown: function (e) {
53693
+ e.preventDefault();
53694
+ }, onKeyDown: this.handleKeydown, onMouseMove: this.handleMouseMove }, items));
53618
53695
  };
53619
53696
  List.prototype.renderItems = function () {
53620
53697
  var _this = this;
@@ -55967,6 +56044,7 @@ __webpack_require__.r(__webpack_exports__);
55967
56044
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
55968
56045
  /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
55969
56046
  /* harmony import */ var _reactquestion_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_factory */ "./src/react/reactquestion_factory.tsx");
56047
+ /* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
55970
56048
  var __extends = (undefined && undefined.__extends) || (function () {
55971
56049
  var extendStatics = function (d, b) {
55972
56050
  extendStatics = Object.setPrototypeOf ||
@@ -55985,6 +56063,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
55985
56063
 
55986
56064
 
55987
56065
 
56066
+
55988
56067
  var SurveyQuestionImage = /** @class */ (function (_super) {
55989
56068
  __extends(SurveyQuestionImage, _super);
55990
56069
  function SurveyQuestionImage(props) {
@@ -56008,25 +56087,30 @@ var SurveyQuestionImage = /** @class */ (function (_super) {
56008
56087
  enumerable: false,
56009
56088
  configurable: true
56010
56089
  });
56011
- SurveyQuestionImage.prototype.canRender = function () {
56012
- return _super.prototype.canRender.call(this) && !!this.question.imageLink;
56013
- };
56014
56090
  SurveyQuestionImage.prototype.renderElement = function () {
56091
+ var _this = this;
56015
56092
  var cssClasses = this.question.getImageCss();
56016
56093
  var style = { objectFit: this.question.imageFit };
56017
56094
  var control = null;
56018
56095
  if (this.question.renderedMode === "image") {
56019
56096
  control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses, src: this.question.locImageLink.renderedHtml, alt: this.question.altText || this.question.title, width: this.question.renderedWidth, height: this.question.renderedHeight,
56020
56097
  //alt={item.text || item.value}
56021
- style: style }));
56098
+ style: style, onLoad: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
56022
56099
  }
56023
56100
  if (this.question.renderedMode === "video") {
56024
- control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
56101
+ control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style, onLoadedMetadata: function (event) { _this.question.onLoadHandler(); }, onError: function (event) { _this.question.onErrorHandler(); } }));
56025
56102
  }
56026
56103
  if (this.question.renderedMode === "youtube") {
56027
56104
  control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("iframe", { className: cssClasses, src: this.question.locImageLink.renderedHtml, width: this.question.renderedWidth, height: this.question.renderedHeight, style: style }));
56028
56105
  }
56029
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.root }, control);
56106
+ var noImage = null;
56107
+ if (!this.question.imageLink || this.question.contentNotLoaded) {
56108
+ noImage = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.noImage },
56109
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: this.question.cssClasses.noImageSvgIconId, size: 48 })));
56110
+ }
56111
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.question.cssClasses.root },
56112
+ control,
56113
+ noImage);
56030
56114
  };
56031
56115
  return SurveyQuestionImage;
56032
56116
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["SurveyQuestionElementBase"]));
@@ -56209,20 +56293,19 @@ var SurveyQuestionImagePickerItem = /** @class */ (function (_super) {
56209
56293
  var style = { objectFit: this.question.imageFit };
56210
56294
  var control = null;
56211
56295
  if (item.locImageLink.renderedHtml && this.question.contentMode === "image") {
56212
- control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
56296
+ control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("img", { className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, alt: item.locText.renderedHtml, style: style, onLoad: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
56213
56297
  }
56214
56298
  if (item.locImageLink.renderedHtml && this.question.contentMode === "video") {
56215
- control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); } }));
56299
+ control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("video", { controls: true, className: cssClasses.image, src: item.locImageLink.renderedHtml, width: this.question.renderedImageWidth, height: this.question.renderedImageHeight, style: style, onLoadedMetadata: function (event) { _this.question["onContentLoaded"](item, event.nativeEvent); }, onError: function (event) { item.onErrorHandler(item, event.nativeEvent); } }));
56216
56300
  }
56217
- if (!item.locImageLink.renderedHtml) {
56301
+ if (!item.locImageLink.renderedHtml || item.contentNotLoaded) {
56218
56302
  var style_1 = {
56219
56303
  width: this.question.renderedImageWidth,
56220
56304
  height: this.question.renderedImageHeight,
56221
56305
  objectFit: this.question.imageFit
56222
56306
  };
56223
56307
  control = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.itemNoImage, style: style_1 }, cssClasses.itemNoImageSvgIcon ?
56224
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("svg", { className: cssClasses.itemNoImageSvgIcon },
56225
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("use", { xlinkHref: cssClasses.itemNoImageSvgIconId })) :
56308
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { className: cssClasses.itemNoImageSvgIcon, iconName: this.question.cssClasses.itemNoImageSvgIconId, size: 48 }) :
56226
56309
  null));
56227
56310
  }
56228
56311
  var renderedItem = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: itemClass },
@@ -60978,7 +61061,7 @@ var SurveyQuestionText = /** @class */ (function (_super) {
60978
61061
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"](react__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null,
60979
61062
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: this.question.inputId, disabled: this.isDisplayMode, className: inputClass, type: this.question.inputType,
60980
61063
  //ref={this.controlRef}
60981
- ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
61064
+ ref: function (input) { return (_this.setControl(input)); }, style: this.question.inputStyle, maxLength: this.question.getMaxLength(), min: this.question.renderedMin, max: this.question.renderedMax, step: this.question.renderedStep, size: this.question.inputSize, placeholder: placeholder, list: this.question.dataListId, autoComplete: this.question.autocomplete, onBlur: this.question.onBlur, onFocus: this.question.onFocus, onChange: this.question.onChange, onKeyUp: this.question.onKeyUp, onKeyDown: this.question.onKeyDown, onCompositionUpdate: function (event) { return _this.question.onCompositionUpdate(event.nativeEvent); }, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
60982
61065
  counter));
60983
61066
  };
60984
61067
  SurveyQuestionText.prototype.renderElement = function () {
@@ -64002,8 +64085,7 @@ var SurveyModel = /** @class */ (function (_super) {
64002
64085
  /**
64003
64086
  * An event that is raised after a trigger is executed.
64004
64087
  *
64005
- * - `sender`: `SurveyModel`- A survey instance that raised the event.
64006
- * - `options.trigger`: [`Trigger`](https://surveyjs.io/form-library/documentation/api-reference/trigger) - A trigger that has been executed.
64088
+ * For information on event handler parameters, refer to descriptions within the interface.
64007
64089
  *
64008
64090
  * For more information about triggers, refer to the following help topic: [Conditional Survey Logic (Triggers)](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-survey-logic-triggers).
64009
64091
  * @see triggers
@@ -64012,15 +64094,6 @@ var SurveyModel = /** @class */ (function (_super) {
64012
64094
  _this.onTriggerExecuted = _this.addEvent();
64013
64095
  /**
64014
64096
  * An event that is raised before the survey is completed. Use this event to prevent survey completion.
64015
- *
64016
- * Parameters:
64017
- *
64018
- * - `sender`: `SurveyModel`\
64019
- * A survey instance that raised the event.
64020
- * - `options.allow`: `Boolean`\
64021
- * Set this property to `false` if you want to prevent survey completion.
64022
- * - `options.isCompleteOnTrigger`: `Boolean`\
64023
- * Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
64024
64097
  * @see onComplete
64025
64098
  * @see doComplete
64026
64099
  * @see allowCompleteSurveyAutomatic
@@ -64029,20 +64102,7 @@ var SurveyModel = /** @class */ (function (_super) {
64029
64102
  /**
64030
64103
  * An event that is raised after the survey is completed. Use this event to send survey results to the server.
64031
64104
  *
64032
- * Parameters:
64033
- *
64034
- * - `sender`: `SurveyModel`\
64035
- * A survey instance that raised the event. Use `sender.data` to access survey results.
64036
- * - `options.isCompleteOnTrigger`: `Boolean`\
64037
- * Returns `true` if survey completion is caused by the ["complete" trigger](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#complete).
64038
- * - `options.showSaveInProgress(text?: string)`\
64039
- * Call this method to indicate that the save operation is in progress. You can use the `text` parameter to display a custom message.
64040
- * - `options.showSaveError(text?: string)`\
64041
- * Call this method to indicate that an error occurred during the save operation. You can use the `text` parameter to display a custom error message.
64042
- * - `options.showSaveSuccess(text?: string)`\
64043
- * Call this method to indicate that survey results are successfully saved. You can use the `text` parameter to display a custom message.
64044
- * - `options.clearSaveMessages()`\
64045
- * Call this method to hide the save operation messages.
64105
+ * For information on event handler parameters, refer to descriptions within the interface.
64046
64106
  *
64047
64107
  * For an example of how to use the methods described above, refer to the following help topic: [Store Survey Results in Your Own Database](https://surveyjs.io/form-library/documentation/handle-survey-results-store#store-survey-results-in-your-own-database).
64048
64108
  *
@@ -64055,47 +64115,24 @@ var SurveyModel = /** @class */ (function (_super) {
64055
64115
  /**
64056
64116
  * An event that is raised before the survey displays a [preview](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#preview-page). Use this event to cancel the preview.
64057
64117
  *
64058
- * Parameters:
64059
- *
64060
- * - `sender`: `SurveyModel`\
64061
- * A survey instance that raised the event.
64062
- * - `options.allow`: `Boolean`\
64063
- * Set this property to `false` if you want to cancel the preview.
64064
64118
  * @see showPreviewBeforeComplete
64065
64119
  */
64066
64120
  _this.onShowingPreview = _this.addEvent();
64067
64121
  /**
64068
64122
  * An event that is raised before the survey navigates to a specified URL. Use this event to change the URL or cancel the navigation.
64069
- *
64070
- * Parameters:
64071
- *
64072
- * - `sender`: `SurveyModel`\
64073
- * A survey instance that raised the event.
64074
- * - `options.url`: `String`\
64075
- * A URL to which respondents should be navigated. You can modify this parameter's value.
64076
- * - `options.allow`: `Boolean`\
64077
- * Set this property to `false` if you want to cancel the navigation and show the [complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page).
64078
64123
  * @see navigateToUrl
64079
64124
  * @see navigateToUrlOnCondition
64080
64125
  */
64081
64126
  _this.onNavigateToUrl = _this.addEvent();
64082
64127
  /**
64083
64128
  * An event that is raised when the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) changes from `"starting"` to `"running"`. This occurs only if your survey includes a [start page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#start-page).
64084
- *
64085
- * Parameters:
64086
- *
64087
- * - `sender`: `SurveyModel`\
64088
- * A survey instance that raised the event.
64089
64129
  * @see firstPageIsStarted
64090
64130
  */
64091
64131
  _this.onStarted = _this.addEvent();
64092
64132
  /**
64093
64133
  * Use this event to save incomplete survey results. Enable the [`sendResultOnPageNext`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#sendResultOnPageNext) property for this event to occur.
64094
64134
  *
64095
- * Parameters:
64096
- *
64097
- * - `sender`: `SurveyModel`\
64098
- * A survey instance that raised the event.
64135
+ * For information on event handler parameters, refer to descriptions within the interface.
64099
64136
  *
64100
64137
  * Refer to the following help topic for more information on the use case: [Continue an Incomplete Survey](https://surveyjs.io/form-library/documentation/handle-survey-results-continue-incomplete).
64101
64138
  */
@@ -64103,20 +64140,6 @@ var SurveyModel = /** @class */ (function (_super) {
64103
64140
  /**
64104
64141
  * An event that is raised before the current page is switched.
64105
64142
  *
64106
- * Parameters:
64107
- *
64108
- * - `sender`: `SurveyModel`\
64109
- * A survey instance that raised the event.
64110
- * - `options.oldCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64111
- * The current page.
64112
- * - `options.newCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64113
- * A page that will be current.
64114
- * - `options.allow`: `Boolean`\
64115
- * Set this property to `false` if you do not want to switch the current page.
64116
- * - `options.isNextPage`: `Boolean`\
64117
- * Returns `true` if the respondent is going forward along the survey.
64118
- * - `options.isPrevPage`: `Boolean`\
64119
- * Returns `true` if the respondent is going backwards, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
64120
64143
  * @see currentPageNo
64121
64144
  * @see nextPage
64122
64145
  * @see prevPage
@@ -64125,18 +64148,6 @@ var SurveyModel = /** @class */ (function (_super) {
64125
64148
  /**
64126
64149
  * An event that is raised after the current page is switched.
64127
64150
  *
64128
- * Parameters:
64129
- *
64130
- * - `sender`: `SurveyModel`\
64131
- * A survey instance that raised the event.
64132
- * - `options.oldCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64133
- * A page that used to be current.
64134
- * - `options.newCurrentPage`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64135
- * The current page.
64136
- * - `options.isNextPage`: `Boolean`\
64137
- * Returns `true` if the respondent is going forward along the survey.
64138
- * - `options.isPrevPage`: `Boolean`\
64139
- * Returns `true` if the respondent is going backwards, that is, `newCurrentPage` is earlier in the survey than `oldCurrentPage`.
64140
64151
  * @see currentPageNo
64141
64152
  * @see nextPage
64142
64153
  * @see prevPage
@@ -64144,35 +64155,13 @@ var SurveyModel = /** @class */ (function (_super) {
64144
64155
  _this.onCurrentPageChanged = _this.addEvent();
64145
64156
  /**
64146
64157
  * An event that is raised before a question value is changed.
64147
- *
64148
- * Parameters:
64149
- *
64150
- * - `sender`: `SurveyModel`\
64151
- * A survey instance that raised the event.
64152
- * - `options.name`: `String`\
64153
- * The `name` of the question whose value is being changed. If you use the [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#valueName) property, this parameter contains its value.
64154
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64155
- * The question whose value is being changed. If you use `valueName` and it is the same for several questions, this parameter contains the first question.
64156
- * - `options.oldValue`: `any`\
64157
- * A previous value.
64158
- * - `options.value`: `any`\
64159
- * A new value. You can change it if required.
64160
64158
  * @see setValue
64161
64159
  */
64162
64160
  _this.onValueChanging = _this.addEvent();
64163
64161
  /**
64164
- * An event that is raised after a question value is changed.
64165
- *
64166
- * Parameters:
64162
+ * An event that is raised after a question value is changed
64167
64163
  *
64168
- * - `sender`: `SurveyModel`\
64169
- * A survey instance that raised the event.
64170
- * - `options.name`: `String`\
64171
- * The `name` of the question whose value has been changed. If you use the [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#valueName) property, this parameter contains its value.
64172
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64173
- * The question whose value has been changed. If you use `valueName`, and it is the same for several questions, this parameter contains the first question.
64174
- * - `options.value`: `any`\
64175
- * A new value.
64164
+ * For information on event handler parameters, refer to descriptions within the interface.
64176
64165
  *
64177
64166
  * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelItemValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelItemValueChanged) event.
64178
64167
  * @see setValue
@@ -64181,14 +64170,6 @@ var SurveyModel = /** @class */ (function (_super) {
64181
64170
  /**
64182
64171
  * An event that is raised after a [variable](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#variables) or [calculated value](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#calculated-values) is changed.
64183
64172
  *
64184
- * Parameters:
64185
- *
64186
- * - `sender`: `SurveyModel`\
64187
- * A survey instance that raised the event.
64188
- * - `options.name`: `String`\
64189
- * The name of the variable or calculated value that has been changed.
64190
- * - `options.value`: `any`\
64191
- * A new value for the variable or calculated value.
64192
64173
  * @see setVariable
64193
64174
  * @see calculatedValues
64194
64175
  */
@@ -64196,16 +64177,7 @@ var SurveyModel = /** @class */ (function (_super) {
64196
64177
  /**
64197
64178
  * An event that is raised after question visibility is changed.
64198
64179
  *
64199
- * Parameters:
64200
- *
64201
- * - `sender`: `SurveyModel`\
64202
- * A survey instance that raised the event.
64203
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64204
- * A question whose visibility has been changed.
64205
- * - `options.name`: `String`\
64206
- * The question's name.
64207
- * - `options.visible`: `Boolean`\
64208
- * Indicates whether the question is visible now.
64180
+ * For information on event handler parameters, refer to descriptions within the interface.
64209
64181
  *
64210
64182
  * Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
64211
64183
  */
@@ -64218,14 +64190,7 @@ var SurveyModel = /** @class */ (function (_super) {
64218
64190
  /**
64219
64191
  * An event that is raised after page visibility is changed.
64220
64192
  *
64221
- * Parameters:
64222
- *
64223
- * - `sender`: `SurveyModel`\
64224
- * A survey instance that raised the event.
64225
- * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64226
- * A page whose visibility has been changed.
64227
- * - `options.visible`: `Boolean`\
64228
- * Indicates whether the page is visible now.
64193
+ * For information on event handler parameters, refer to descriptions within the interface.
64229
64194
  *
64230
64195
  * Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
64231
64196
  */
@@ -64233,14 +64198,7 @@ var SurveyModel = /** @class */ (function (_super) {
64233
64198
  /**
64234
64199
  * An event that is raised after page visibility is changed.
64235
64200
  *
64236
- * Parameters:
64237
- *
64238
- * - `sender`: `SurveyModel`\
64239
- * A survey instance that raised the event.
64240
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64241
- * A panel whose visibility has been changed.
64242
- * - `options.visible`: `Boolean`\
64243
- * Indicates whether the panel is visible now.
64201
+ * For information on event handler parameters, refer to descriptions within the interface.
64244
64202
  *
64245
64203
  * Refer to the following help topic for information on how to implement conditional visibility: [Conditional Visibility](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#conditional-visibility).
64246
64204
  */
@@ -64250,12 +64208,7 @@ var SurveyModel = /** @class */ (function (_super) {
64250
64208
  *
64251
64209
  * In a survey, complex elements ([Dynamic Matrix](https://surveyjs.io/form-library/examples/questiontype-matrixdynamic/), [Multiple Text](https://surveyjs.io/form-library/examples/questiontype-multipletext/), and [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)) are composed of questions. Use this event to customize any question regardless of which survey element it belongs to.
64252
64210
  *
64253
- * Parameters:
64254
- *
64255
- * - `sender`: `SurveyModel`\
64256
- * A survey instance that raised the event.
64257
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64258
- * A created question.
64211
+ * For information on event handler parameters, refer to descriptions within the interface.
64259
64212
  *
64260
64213
  * To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
64261
64214
  *
@@ -64280,20 +64233,7 @@ var SurveyModel = /** @class */ (function (_super) {
64280
64233
  /**
64281
64234
  * An event that is raised when a new question is added to a panel or page.
64282
64235
  *
64283
- * * Parameters:
64284
- *
64285
- * - `sender`: `SurveyModel`\
64286
- * A survey instance that raised the event.
64287
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64288
- * A new question.
64289
- * - `options.name`: `String`\
64290
- * The question's name.
64291
- * - `options.index`: `Number`\
64292
- * The question's index within the parent container (panel or page).
64293
- * - `options.parent`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
64294
- * The parent container (panel or page).
64295
- * - `options.page`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
64296
- * A page that nests the added question.
64236
+ * For information on event handler parameters, refer to descriptions within the interface.
64297
64237
  *
64298
64238
  * To use this event for questions loaded from JSON, create an empty survey model, add an event handler, and only then populate the model from the JSON object:
64299
64239
  *
@@ -64317,76 +64257,25 @@ var SurveyModel = /** @class */ (function (_super) {
64317
64257
  _this.onQuestionAdded = _this.addEvent();
64318
64258
  /**
64319
64259
  * An event that is raised after a question is deleted from the survey.
64320
- *
64321
- * Parameters:
64322
- *
64323
- * - `sender`: `SurveyModel`\
64324
- * A survey instance that raised the event.
64325
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64326
- * A deleted question.
64327
- * - `options.name`: `String`\
64328
- * The question's name.
64329
64260
  */
64330
64261
  _this.onQuestionRemoved = _this.addEvent();
64331
64262
  /**
64332
- * An event that is raised when a new panel is added to a page.
64333
- *
64334
- * * Parameters:
64335
- *
64336
- * - `sender`: `SurveyModel`\
64337
- * A survey instance that raised the event.
64338
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64339
- * A new panel.
64340
- * - `options.name`: `String`\
64341
- * The panel's name.
64342
- * - `options.index`: `Number`\
64343
- * The panel's index within the parent container (panel or page).
64344
- * - `options.parent`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
64345
- * The parent container (panel or page).
64346
- * - `options.page`: [`PanelModelBase`](https://surveyjs.io/form-library/documentation/api-reference/panelmodelbase)\
64347
- * A page that nests the added panel.
64263
+ * An event that is raised when a new panel is added to a page.
64348
64264
  */
64349
64265
  _this.onPanelAdded = _this.addEvent();
64350
64266
  /**
64351
64267
  * An event that is raised after a panel is deleted from the survey.
64352
- *
64353
- * Parameters:
64354
- *
64355
- * - `sender`: `SurveyModel`\
64356
- * A survey instance that raised the event.
64357
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64358
- * A deleted panel.
64359
- * - `options.name`: `String`\
64360
- * The panel's name.
64361
64268
  */
64362
64269
  _this.onPanelRemoved = _this.addEvent();
64363
64270
  /**
64364
- * An event that is raised when a new page is added to the survey.
64365
- *
64366
- * * Parameters:
64367
- *
64368
- * - `sender`: `SurveyModel`\
64369
- * A survey instance that raised the event.
64370
- * - `options.page`: [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model)\
64371
- * A new page.
64271
+ * An event that is raised when a new page is added to the survey.
64372
64272
  * @see PanelModel
64373
64273
  */
64374
64274
  _this.onPageAdded = _this.addEvent();
64375
64275
  /**
64376
64276
  * An event that is raised when a question value is being validated. Use this event to specify a custom error message.
64377
64277
  *
64378
- * Parameters:
64379
- *
64380
- * - `sender`: `SurveyModel`\
64381
- * A survey instance that raised the event.
64382
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64383
- * A question being validated.
64384
- * - `options.name`: `String`\
64385
- * The question's name.
64386
- * - `options.value`: `any`\
64387
- * A question value being validated.
64388
- * - `options.error`: `String`\
64389
- * An error message that you should specify if validation fails.
64278
+ * For information on event handler parameters, refer to descriptions within the interface.
64390
64279
  *
64391
64280
  * [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
64392
64281
  * @see onServerValidateQuestions
@@ -64397,25 +64286,13 @@ var SurveyModel = /** @class */ (function (_super) {
64397
64286
  _this.onValidateQuestion = _this.addEvent();
64398
64287
  /**
64399
64288
  * An event that is raised before errors are assigned to a question. You may add/remove/modify errors for a question.
64400
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64401
- * - `options.question` - a validated question.
64402
- * - `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors.
64403
64289
  * @see onValidateQuestion
64404
64290
  */
64405
64291
  _this.onSettingQuestionErrors = _this.addEvent();
64406
64292
  /**
64407
64293
  * Use this event to validate data on your server.
64408
64294
  *
64409
- * Parameters:
64410
- *
64411
- * - `sender`: `SurveyModel`\
64412
- * A survey instance that raised the event.
64413
- * - `options.data`: `Object`\
64414
- * Question values. You can get an individual question value as follows: `options.data["questionName"]`.
64415
- * - `options.errors`: `Object`\
64416
- * An object for your error messages. Set error messages as follows: `options.errors["questionName"] = "My error message"`
64417
- * - `options.complete()`: Method\
64418
- * A method that you should call when a request to the server has completed.
64295
+ * For information on event handler parameters, refer to descriptions within the interface.
64419
64296
  *
64420
64297
  * [View Demo](https://surveyjs.io/form-library/examples/javascript-server-side-form-validation/ (linkStyle))
64421
64298
  * @see onValidateQuestion
@@ -64425,16 +64302,7 @@ var SurveyModel = /** @class */ (function (_super) {
64425
64302
  /**
64426
64303
  * An event that is raised when a panel is being validated. Use this event to specify a custom error message.
64427
64304
  *
64428
- * Parameters:
64429
- *
64430
- * - `sender`: `SurveyModel`\
64431
- * A survey instance that raised the event.
64432
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64433
- * A panel being validated.
64434
- * - `options.name`: `String`\
64435
- * The panel's name.
64436
- * - `options.error`: `String`\
64437
- * An error message that you should specify if validation fails.
64305
+ * For information on event handler parameters, refer to descriptions within the interface.
64438
64306
  *
64439
64307
  * [View Demo](https://surveyjs.io/form-library/examples/add-custom-input-validation/ (linkStyle))
64440
64308
  * @see onValidateQuestion
@@ -64443,26 +64311,14 @@ var SurveyModel = /** @class */ (function (_super) {
64443
64311
  _this.onValidatePanel = _this.addEvent();
64444
64312
  /**
64445
64313
  * Use the event to change the default error text.
64446
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64447
- * - `options.text` - an error text.
64448
- * - `options.error` - an instance of the `SurveyError` object.
64449
- * - `options.obj` - an instance of Question, Panel or Survey object to where error is located.
64450
- * - `options.name` - the error name. The following error names are available:
64451
- * required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty,
64452
- * uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom
64453
64314
  */
64454
64315
  _this.onErrorCustomText = _this.addEvent();
64455
64316
  /**
64456
64317
  * Use the this event to be notified when the survey finished validate questions on the current page. It commonly happens when a user try to go to the next page or complete the survey
64457
- * options.questions - the list of questions that have errors
64458
- * options.errors - the list of errors
64459
- * options.page - the page where question(s) are located
64460
64318
  */
64461
64319
  _this.onValidatedErrorsOnCurrentPage = _this.addEvent();
64462
64320
  /**
64463
64321
  * Use this event to modify the HTML content before rendering, for example `completeHtml` or `loadingHtml`.
64464
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64465
- * - `options.html` - an HTML that you may change before text processing and then rendering. specifies the modified HTML content.
64466
64322
  * @see completedHtml
64467
64323
  * @see loadingHtml
64468
64324
  * @see QuestionHtmlModel.html
@@ -64470,98 +64326,56 @@ var SurveyModel = /** @class */ (function (_super) {
64470
64326
  _this.onProcessHtml = _this.addEvent();
64471
64327
  /**
64472
64328
  * Use this event to change a question's display text.
64473
- *
64474
- * Parameters:
64475
- *
64476
- * - `sender`: `SurveyModel`\
64477
- * A survey instance that raised the event.
64478
- * - `options.question`: [`Question`](https://surveyjs.io/form-library/documentation/api-reference/question)\
64479
- * A Question instance for which the event is raised.
64480
- * - `options.displayValue`: `String`\
64481
- * A question's display text. You can assign a custom value to this parameter.
64482
64329
  */
64483
64330
  _this.onGetQuestionDisplayValue = _this.addEvent();
64484
64331
  /**
64485
64332
  * Use this event to change the question title in code. If you want to remove question numbering then set showQuestionNumbers to "off".
64486
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64487
- * - `options.title` - a calculated question title, based on question `title`, `name`.
64488
- * - `options.question` - a question object.
64489
64333
  * @see showQuestionNumbers
64490
64334
  * @see requiredText
64491
64335
  */
64492
64336
  _this.onGetQuestionTitle = _this.addEvent();
64493
64337
  /**
64494
64338
  * Use this event to change the element title tag name that renders by default.
64495
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64496
- * - `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render.
64497
- * - `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value.
64498
64339
  * @see showQuestionNumbers
64499
64340
  * @see requiredText
64500
64341
  */
64501
64342
  _this.onGetTitleTagName = _this.addEvent();
64502
64343
  /**
64503
64344
  * Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
64504
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64505
- * - `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
64506
- * - `options.question` - a question object.
64507
64345
  * @see showQuestionNumbers
64508
64346
  * @see questionStartIndex
64509
64347
  */
64510
64348
  _this.onGetQuestionNo = _this.addEvent();
64511
64349
  /**
64512
64350
  * Use this event to change the progress text in code.
64513
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64514
- * - `options.text` - a progress text, that SurveyJS will render in progress bar.
64515
- * - `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions
64516
- * - `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered.
64517
- * - `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions
64518
- * - `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered.
64519
64351
  * @see progressBarType
64520
64352
  */
64521
64353
  _this.onProgressText = _this.addEvent();
64522
64354
  /**
64523
64355
  * Use this event to process the markdown text.
64524
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64525
- * - `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
64526
- * - `options.name` - a property name is going to be rendered.
64527
- * - `options.text` - a text that is going to be rendered.
64528
- * - `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`.
64356
+ *
64357
+ * For information on event handler parameters, refer to descriptions within the interface.
64529
64358
  *
64530
64359
  * [View Demo](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/ (linkStyle))
64531
64360
  */
64532
64361
  _this.onTextMarkdown = _this.addEvent();
64533
64362
  /**
64534
64363
  * Use this event to specity render component name used for text rendering.
64535
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64536
- * - `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered.
64537
- * - `options.name` - a property name is going to be rendered.
64538
- * - `options.renderAs` - a component name used for text rendering.
64539
64364
  */
64540
64365
  _this.onTextRenderAs = _this.addEvent();
64541
64366
  /**
64542
64367
  * The event fires when it gets response from the [api.surveyjs.io](https://api.surveyjs.io) service on saving survey results. Use it to find out if the results have been saved successfully.
64543
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64544
- * - `options.success` - it is `true` if the results has been sent to the service successfully.
64545
- * - `options.response` - a response from the service.
64546
64368
  */
64547
64369
  _this.onSendResult = _this.addEvent();
64548
64370
  /**
64549
64371
  * Use it to get results after calling the `getResult` method. It returns a simple analytics from [api.surveyjs.io](https://api.surveyjs.io) service.
64550
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64551
- * - `options.success` - it is `true` if the results were got from the service successfully.
64552
- * - `options.data` - the object `{AnswersCount, QuestionResult : {} }`. `AnswersCount` is the number of posted survey results. `QuestionResult` is an object with all possible unique answers to the question and number of these answers.
64553
- * - `options.dataList` - an array of objects `{name, value}`, where `name` is a unique value/answer to the question and `value` is a number/count of such answers.
64554
- * - `options.response` - the server response.
64555
64372
  * @see getResult
64556
64373
  */
64557
64374
  _this.onGetResult = _this.addEvent();
64558
64375
  /**
64559
64376
  * An event that is raised on uploading the file in QuestionFile when `storeDataAsText` is set to `false`. Use this event to change the uploaded file name or to prevent a particular file from being uploaded.
64560
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64561
- * - `options.question` - the file question instance.
64562
- * - `options.name` - the question name.
64563
- * - `options.files` - the Javascript File objects array to upload.
64564
- * - `options.callback` - a callback function to get the file upload status and the updloaded file content.
64377
+ *
64378
+ * For information on event handler parameters, refer to descriptions within the interface.
64565
64379
  *
64566
64380
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-file/ (linkStyle))
64567
64381
  * @see uploadFiles
@@ -64572,12 +64386,8 @@ var SurveyModel = /** @class */ (function (_super) {
64572
64386
  _this.onUploadFiles = _this.addEvent();
64573
64387
  /**
64574
64388
  * An event that is raised on downloading a file in QuestionFile. Use this event to pass the file to a preview.
64575
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64576
- * - `question` - the question instance.
64577
- * - `options.name` - the question name.
64578
- * - `options.content` - the file content.
64579
- * - `options.fileValue` - single file question value.
64580
- * - `options.callback` - a callback function to get the file downloading status and the downloaded file content.
64389
+ *
64390
+ * For information on event handler parameters, refer to descriptions within the interface.
64581
64391
  *
64582
64392
  * [View Demo](https://surveyjs.io/form-library/examples/questiontype-file/ (linkStyle))
64583
64393
  * @see downloadFile
@@ -64587,12 +64397,8 @@ var SurveyModel = /** @class */ (function (_super) {
64587
64397
  _this.onDownloadFile = _this.addEvent();
64588
64398
  /**
64589
64399
  * This event is fired on clearing the value in a QuestionFile. Use this event to remove files stored on your server.
64590
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64591
- * - `question` - the question instance.
64592
- * - `options.name` - the question name.
64593
- * - `options.value` - the question value.
64594
- * - `options.fileName` - a removed file's name, set it to `null` to clear all files.
64595
- * - `options.callback` - a callback function to get the operation status.
64400
+ *
64401
+ * For information on event handler parameters, refer to descriptions within the interface.
64596
64402
  *
64597
64403
  * [View Demo](https://surveyjs.io/form-library/examples/file-delayed-upload/ (linkStyle))
64598
64404
  * @see clearFiles
@@ -64603,16 +64409,11 @@ var SurveyModel = /** @class */ (function (_super) {
64603
64409
  /**
64604
64410
  * An event that is raised after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question.
64605
64411
  * You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results.
64606
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64607
- * - `question` - the question where loaded choices are going to be assigned.
64608
- * - `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question.
64609
- * - `serverResult` - a result that comes from the server as it is.
64610
64412
  */
64611
64413
  _this.onLoadChoicesFromServer = _this.addEvent();
64612
64414
  /**
64613
64415
  * An event that is raised after survey is loaded from api.surveyjs.io service.
64614
64416
  * You can use this event to perform manipulation with the survey model after it was loaded from the web service.
64615
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64616
64417
  * @see surveyId
64617
64418
  * @see loadSurveyFromService
64618
64419
  */
@@ -64621,69 +64422,48 @@ var SurveyModel = /** @class */ (function (_super) {
64621
64422
  * An event that is raised on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables.
64622
64423
  * For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}",
64623
64424
  * you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user.
64624
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64625
- * - `options.name` - the name of the processing value, for example, "state" in our example.
64626
- * - `options.value` - the value of the processing text.
64627
- * - `options.isExists` - a boolean value. Set it to `true` if you want to use the value and set it to `false` if you don't.
64628
64425
  */
64629
64426
  _this.onProcessTextValue = _this.addEvent();
64630
64427
  /**
64631
64428
  * An event that is raised before rendering a question. Use it to override the default question CSS classes.
64632
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64633
- * - `options.question` - a question for which you can change the CSS classes.
64634
- * - `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes.
64429
+ *
64430
+ * For information on event handler parameters, refer to descriptions within the interface.
64635
64431
  *
64636
64432
  * [View Demo](https://surveyjs.io/form-library/examples/survey-cssclasses/ (linkStyle))
64637
64433
  */
64638
64434
  _this.onUpdateQuestionCssClasses = _this.addEvent();
64639
64435
  /**
64640
64436
  * An event that is raised before rendering a panel. Use it to override the default panel CSS classes.
64641
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64642
- * - `options.panel` - a panel for which you can change the CSS classes.
64643
- * - `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
64644
64437
  */
64645
64438
  _this.onUpdatePanelCssClasses = _this.addEvent();
64646
64439
  /**
64647
64440
  * An event that is raised before rendering a page. Use it to override the default page CSS classes.
64648
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64649
- * - `options.page` - a page for which you can change the CSS classes.
64650
- * - `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes.
64651
64441
  */
64652
64442
  _this.onUpdatePageCssClasses = _this.addEvent();
64653
64443
  /**
64654
64444
  * An event that is raised before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
64655
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64656
- * - `options.question` - a question where choice item is rendered.
64657
- * - `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text
64658
- * - `options.css` - a string with css classes divided by space. You can change it.
64659
64445
  */
64660
64446
  _this.onUpdateChoiceItemCss = _this.addEvent();
64661
64447
  /**
64662
64448
  * An event that is raised right after survey is rendered in DOM.
64663
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64664
- * - `options.htmlElement` - a root HTML element bound to the survey object.
64665
64449
  */
64666
64450
  _this.onAfterRenderSurvey = _this.addEvent();
64667
64451
  /**
64668
64452
  * An event that is raised right after a page is rendered in DOM. Use it to modify HTML elements.
64669
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64670
- * - `options.htmlElement` - an HTML element bound to the survey header object.
64671
64453
  */
64672
64454
  _this.onAfterRenderHeader = _this.addEvent();
64673
64455
  /**
64674
64456
  * An event that is raised right after a page is rendered in DOM. Use it to modify HTML elements.
64675
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64676
- * - `options.page` - a page object for which the event is fired. Typically the current/active page.
64677
- * - `options.htmlElement` - an HTML element bound to the page object.
64457
+ *
64458
+ * For information on event handler parameters, refer to descriptions within the interface.
64678
64459
  *
64679
64460
  * [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
64680
64461
  */
64681
64462
  _this.onAfterRenderPage = _this.addEvent();
64682
64463
  /**
64683
64464
  * An event that is raised right after a question is rendered in DOM. Use it to modify HTML elements.
64684
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64685
- * - `options.question` - a question object for which the event is fired.
64686
- * - `options.htmlElement` - an HTML element bound to the question object.
64465
+ *
64466
+ * For information on event handler parameters, refer to descriptions within the interface.
64687
64467
  *
64688
64468
  * [View Demo](https://surveyjs.io/form-library/examples/survey-afterrender/ (linkStyle))
64689
64469
  */
@@ -64691,45 +64471,24 @@ var SurveyModel = /** @class */ (function (_super) {
64691
64471
  /**
64692
64472
  * An event that is raised right after a non-composite question (text, comment, dropdown, radiogroup, checkbox) is rendered in DOM. Use it to modify HTML elements.
64693
64473
  * This event is not fired for matrices, panels, multiple text and image picker.
64694
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64695
- * - `options.question` - a question object for which the event is fired.
64696
- * - `options.htmlElement` - an HTML element bound to the question object.
64697
64474
  */
64698
64475
  _this.onAfterRenderQuestionInput = _this.addEvent();
64699
64476
  /**
64700
64477
  * An event that is raised right after a panel is rendered in DOM. Use it to modify HTML elements.
64701
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64702
- * - `options.panel` - a panel object for which the event is fired
64703
- * - `options.htmlElement` - an HTML element bound to the panel object
64704
64478
  */
64705
64479
  _this.onAfterRenderPanel = _this.addEvent();
64706
64480
  /**
64707
64481
  * The event occurs when an element within a question gets focus.
64708
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64709
- * - `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus.
64710
64482
  * @see onFocusInPanel
64711
64483
  */
64712
64484
  _this.onFocusInQuestion = _this.addEvent();
64713
64485
  /**
64714
64486
  * The event occurs when an element within a panel gets focus.
64715
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64716
- * - `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus.
64717
64487
  * @see onFocusInQuestion
64718
64488
  */
64719
64489
  _this.onFocusInPanel = _this.addEvent();
64720
64490
  /**
64721
64491
  * Use this event to change the visibility of an individual choice item in [Checkbox](https://surveyjs.io/Documentation/Library?id=questioncheckboxmodel), [Dropdown](https://surveyjs.io/Documentation/Library?id=questiondropdownmodel), [Radiogroup](https://surveyjs.io/Documentation/Library?id=questionradiogroupmodel), and other similar question types.
64722
- *
64723
- * Parameters:
64724
- *
64725
- * - `sender`: `SurveyModel`\
64726
- * A survey instance that raised the event.
64727
- * - `options.question`\
64728
- * A Question instance to which the choice item belongs.
64729
- * - `options.item`\
64730
- * The choice item as specified in the [choices](https://surveyjs.io/Documentation/Library?id=QuestionSelectBase#choices) array.
64731
- * - `options.visible`\
64732
- * A Boolean value that specifies item visibility. Set it to `false` to hide the item.
64733
64492
  */
64734
64493
  _this.onShowingChoiceItem = _this.addEvent();
64735
64494
  /**
@@ -64737,20 +64496,7 @@ var SurveyModel = /** @class */ (function (_super) {
64737
64496
  *
64738
64497
  * This event is raised only for those questions that have the [`choicesLazyLoadEnabled`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadEnabled) property set to `true`.
64739
64498
  *
64740
- * Parameters:
64741
- *
64742
- * - `sender`: `SurveyModel`\
64743
- * A survey instance that raised the event.
64744
- * - `options.question`\
64745
- * A Question instance for which the event is raised.
64746
- * - `options.skip`: `Number`\
64747
- * The number of choice items to skip.
64748
- * - `options.take`: `Number`\
64749
- * The number of choice items to load. You can use the question's [`choicesLazyLoadPageSize`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesLazyLoadPageSize) property to change this number.
64750
- * - `options.filter`\
64751
- * A search string used to filter choices.
64752
- * - `options.setItems(items: Array<any>, totalCount: Number)`\
64753
- * A method that you should call to assign loaded items to the question. Item objects should be structured as specified in the [`choices`](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model#choices) property description. If their structure is different, [map their properties](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to bring them to the required structure.
64499
+ * For information on event handler parameters, refer to descriptions within the interface.
64754
64500
  *
64755
64501
  * [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
64756
64502
  */
@@ -64760,45 +64506,25 @@ var SurveyModel = /** @class */ (function (_super) {
64760
64506
  *
64761
64507
  * If you load choices from a server (use [`choicesByUrl`](https://surveyjs.io/form-library/documentation/questiondropdownmodel#choicesByUrl) or [`onChoicesLazyLoad`](https://surveyjs.io/form-library/documentation/surveymodel#onChoicesLazyLoad)), display texts become available only when data is loaded, which does not happen until a user opens the drop-down menu. However, a display text for a default choice item is required before that. In this case, you can load data individually for the default item within the `onGetChoiceDisplayValue` event handler.
64762
64508
  *
64763
- * Parameters:
64764
- *
64765
- * - `sender`: `SurveyModel`\
64766
- * A survey instance that raised the event.
64767
- * - `options.question`\
64768
- * A Question instance for which the event is raised.
64769
- * - `options.values`\
64770
- * An array of one (in Dropdown) or more (in Tag Box) default values.
64771
- * - `options.setItems(displayValues: Array<string>)`\
64772
- * A method that you should call to assign display texts to the question.
64509
+ * For information on event handler parameters, refer to descriptions within the interface.
64773
64510
  *
64774
64511
  * [View Demo](https://surveyjs.io/form-library/examples/lazy-loading-dropdown/ (linkStyle))
64775
64512
  */
64776
64513
  _this.onGetChoiceDisplayValue = _this.addEvent();
64777
64514
  /**
64778
64515
  * An event that is raised on adding a new row in Matrix Dynamic question.
64779
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64780
- * - `options.question` - a matrix question.
64781
- * - `options.row` - a new added row.
64782
64516
  * @see QuestionMatrixDynamicModel
64783
64517
  * @see QuestionMatrixDynamicModel.visibleRows
64784
64518
  */
64785
64519
  _this.onMatrixRowAdded = _this.addEvent();
64786
64520
  /**
64787
64521
  * An event that is raised before adding a new row in Matrix Dynamic question.
64788
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64789
- * - `options.question` - a matrix question.
64790
- * - `options.canAddRow` - specifies whether a new row can be added
64791
64522
  * @see QuestionMatrixDynamicModel
64792
64523
  * @see QuestionMatrixDynamicModel.visibleRows
64793
64524
  */
64794
64525
  _this.onMatrixBeforeRowAdded = _this.addEvent();
64795
64526
  /**
64796
64527
  * An event that is raised before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead.
64797
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64798
- * - `options.question` - a matrix question.
64799
- * - `options.rowIndex` - a row index.
64800
- * - `options.row` - a row object.
64801
- * - `options.allow` - a boolean property. Set it to `false` to disable the row removing.
64802
64528
  * @see QuestionMatrixDynamicModel
64803
64529
  * @see onMatrixRowRemoved
64804
64530
  * @see onMatrixAllowRemoveRow
@@ -64806,10 +64532,6 @@ var SurveyModel = /** @class */ (function (_super) {
64806
64532
  _this.onMatrixRowRemoving = _this.addEvent();
64807
64533
  /**
64808
64534
  * An event that is raised on removing a row from Matrix Dynamic question.
64809
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64810
- * - `options.question` - a matrix question
64811
- * - `options.rowIndex` - a removed row index
64812
- * - `options.row` - a removed row object
64813
64535
  * @see QuestionMatrixDynamicModel
64814
64536
  * @see QuestionMatrixDynamicModel.visibleRows
64815
64537
  * @see onMatrixRowRemoving
@@ -64818,11 +64540,6 @@ var SurveyModel = /** @class */ (function (_super) {
64818
64540
  _this.onMatrixRowRemoved = _this.addEvent();
64819
64541
  /**
64820
64542
  * An event that is raised before rendering "Remove" button for removing a row from Matrix Dynamic question.
64821
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64822
- * - `options.question` - a matrix question.
64823
- * - `options.rowIndex` - a row index.
64824
- * - `options.row` - a row object.
64825
- * - `options.allow` - a boolean property. Set it to `false` to disable the row removing.
64826
64543
  * @see QuestionMatrixDynamicModel
64827
64544
  * @see onMatrixRowRemoving
64828
64545
  * @see onMatrixRowRemoved
@@ -64830,13 +64547,6 @@ var SurveyModel = /** @class */ (function (_super) {
64830
64547
  _this.onMatrixAllowRemoveRow = _this.addEvent();
64831
64548
  /**
64832
64549
  * An event that is raised before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
64833
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64834
- * - `options.question` - the matrix question.
64835
- * - `options.cellType` - the cell question type. You can change it.
64836
- * - `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
64837
- * - `options.column` - the matrix column object.
64838
- * - `options.columnName` - the matrix column name.
64839
- * - `options.row` - the matrix row object.
64840
64550
  * @see onMatrixBeforeRowAdded
64841
64551
  * @see onMatrixCellCreated
64842
64552
  * @see QuestionMatrixDynamicModel
@@ -64845,14 +64555,6 @@ var SurveyModel = /** @class */ (function (_super) {
64845
64555
  _this.onMatrixCellCreating = _this.addEvent();
64846
64556
  /**
64847
64557
  * An event that is raised for every cell created in Matrix Dynamic and Matrix Dropdown questions.
64848
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64849
- * - `options.question` - the matrix question.
64850
- * - `options.cell` - the matrix cell.
64851
- * - `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible.
64852
- * - `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
64853
- * - `options.column` - the matrix column object.
64854
- * - `options.columnName` - the matrix column name.
64855
- * - `options.row` - the matrix row object.
64856
64558
  * @see onMatrixBeforeRowAdded
64857
64559
  * @see onMatrixCellCreating
64858
64560
  * @see onMatrixRowAdded
@@ -64862,13 +64564,6 @@ var SurveyModel = /** @class */ (function (_super) {
64862
64564
  _this.onMatrixCellCreated = _this.addEvent();
64863
64565
  /**
64864
64566
  * An event that is raised for every cell after is has been rendered in DOM.
64865
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64866
- * - `options.question` - the matrix question.
64867
- * - `options.cell` - the matrix cell.
64868
- * - `options.cellQuestion` - the question/editor in the cell.
64869
- * - `options.htmlElement` - an HTML element bound to the `cellQuestion` object.
64870
- * - `options.column` - the matrix column object.
64871
- * - `options.row` - the matrix row object.
64872
64567
  * @see onMatrixCellCreated
64873
64568
  * @see QuestionMatrixDynamicModel
64874
64569
  * @see QuestionMatrixDropdownModel
@@ -64876,12 +64571,6 @@ var SurveyModel = /** @class */ (function (_super) {
64876
64571
  _this.onMatrixAfterCellRender = _this.addEvent();
64877
64572
  /**
64878
64573
  * An event that is raised when cell value is changed in Matrix Dynamic and Matrix Dropdown questions.
64879
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64880
- * - `options.question` - the matrix question.
64881
- * - `options.columnName` - the matrix column name.
64882
- * - `options.value` - a new value.
64883
- * - `options.row` - the matrix row object.
64884
- * - `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
64885
64574
  * @see onMatrixCellValueChanging
64886
64575
  * @see onMatrixBeforeRowAdded
64887
64576
  * @see onMatrixRowAdded
@@ -64891,13 +64580,6 @@ var SurveyModel = /** @class */ (function (_super) {
64891
64580
  _this.onMatrixCellValueChanged = _this.addEvent();
64892
64581
  /**
64893
64582
  * An event that is raised on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value.
64894
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64895
- * - `options.question` - the matrix question.
64896
- * - `options.columnName` - the matrix column name.
64897
- * - `options.value` - a new value.
64898
- * - `options.oldValue` - the old value.
64899
- * - `options.row` - the matrix row object.
64900
- * - `options.getCellQuestion(columnName)` - the function that returns a cell question by column name.
64901
64583
  * @see onMatrixCellValueChanged
64902
64584
  * @see onMatrixBeforeRowAdded
64903
64585
  * @see onMatrixRowAdded
@@ -64907,13 +64589,6 @@ var SurveyModel = /** @class */ (function (_super) {
64907
64589
  _this.onMatrixCellValueChanging = _this.addEvent();
64908
64590
  /**
64909
64591
  * An event that is raised when Matrix Dynamic and Matrix Dropdown questions validate the cell value.
64910
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64911
- * - `options.error` - an error string. It is empty by default.
64912
- * - `options.question` - the matrix question.
64913
- * - `options.columnName` - the matrix column name.
64914
- * - `options.value` - a cell value.
64915
- * - `options.row` - the matrix row object.
64916
- * - `options.getCellQuestion(columnName)` - the function that returns the cell question by column name.
64917
64592
  * @see onMatrixBeforeRowAdded
64918
64593
  * @see onMatrixRowAdded
64919
64594
  * @see QuestionMatrixDynamicModel
@@ -64922,63 +64597,22 @@ var SurveyModel = /** @class */ (function (_super) {
64922
64597
  _this.onMatrixCellValidate = _this.addEvent();
64923
64598
  /**
64924
64599
  * An event that is raised on adding a new column in Matrix Dynamic or Matrix Dropdown question.
64925
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64926
- * - `options.question` - a matrix question.
64927
- * - `options.column` - a new added column.
64928
64600
  */
64929
64601
  _this.onMatrixColumnAdded = _this.addEvent();
64930
64602
  /**
64931
64603
  * An event that is raised on adding a new item in Multiple Text question.
64932
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64933
- * - `options.question` - a multiple text question.
64934
- * - `options.item` - a new added item.
64935
64604
  */
64936
64605
  _this.onMultipleTextItemAdded = _this.addEvent();
64937
64606
  /**
64938
64607
  * An event that is raised after a new panel is added to a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
64939
- *
64940
- * Parameters:
64941
- *
64942
- * - `sender`: `SurveyModel`\
64943
- * A survey instance that raised the event.
64944
- * - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
64945
- * A Dynamic Panel question.
64946
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64947
- * An added panel.
64948
- * - `options.panelIndex`: `Number`\
64949
- * The panel's index within Dynamic Panel.
64950
64608
  */
64951
64609
  _this.onDynamicPanelAdded = _this.addEvent();
64952
64610
  /**
64953
64611
  * An event that is raised after a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
64954
- *
64955
- * Parameters:
64956
- *
64957
- * - `sender`: `SurveyModel`\
64958
- * A survey instance that raised the event.
64959
- * - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
64960
- * A Dynamic Panel question.
64961
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64962
- * A deleted panel.
64963
- * - `options.panelIndex`: `Number`\
64964
- * The panel's index within Dynamic Panel.
64965
64612
  */
64966
64613
  _this.onDynamicPanelRemoved = _this.addEvent();
64967
64614
  /**
64968
64615
  * An event that is raised before a panel is deleted from a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question. Use this event to cancel the deletion.
64969
- *
64970
- * Parameters:
64971
- *
64972
- * - `sender`: `SurveyModel`\
64973
- * A survey instance that raised the event.
64974
- * - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
64975
- * A Dynamic Panel question.
64976
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
64977
- * A panel to be deleted.
64978
- * - `options.panelIndex`: `Number`\
64979
- * The panel's index within Dynamic Panel.
64980
- * - `options.allow`: `Boolean`\
64981
- * Set this property to `false` if you want to cancel the panel deletion.
64982
64616
  */
64983
64617
  _this.onDynamicPanelRemoving = _this.addEvent();
64984
64618
  /**
@@ -64990,126 +64624,68 @@ var SurveyModel = /** @class */ (function (_super) {
64990
64624
  _this.onTimer = _this.addEvent();
64991
64625
  /**
64992
64626
  * An event that is raised before displaying a new information in the Timer Panel. Use it to change the default text.
64993
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
64994
- * - `options.text` - the timer panel info text.
64995
64627
  */
64996
64628
  _this.onTimerPanelInfoText = _this.addEvent();
64997
64629
  /**
64998
64630
  * An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
64999
- *
65000
- * Parameters:
65001
- *
65002
- * - `sender`: `SurveyModel`\
65003
- * A survey instance that raised the event.
65004
- * - `options.question`: [`QuestionPanelDynamicModel`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model)\
65005
- * A Dynamic Panel question.
65006
- * - `options.panel`: [`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model)\
65007
- * A panel that nests the item with a changed value.
65008
- * - `options.name`: `String`\
65009
- * The item's name.
65010
- * - `options.value`: `any`\
65011
- * The item's new value.
65012
- * - `options.panelIndex`: `Number`\
65013
- * The panel's index within Dynamic Panel.
65014
- * - `options.panelData`: `Object`\
65015
- * The panel's data object that includes all item values.
65016
64631
  */
65017
64632
  _this.onDynamicPanelItemValueChanged = _this.addEvent();
65018
64633
  /**
65019
64634
  * Use this event to define, whether an answer to a question is correct or not.
65020
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65021
- * - `options.question` - a question on which you have to decide if the answer is correct or not.
65022
- * - `options.result` - returns `true`, if an answer is correct, or `false`, if the answer is not correct. Use questions' `value` and `correctAnswer` properties to return the correct value.
65023
- * - `options.correctAnswers` - you may change the default number of correct or incorrect answers in the question, for example for matrix, where each row is a quiz question.
65024
64635
  * @see Question.value
65025
64636
  * @see Question.correctAnswer
65026
64637
  */
65027
64638
  _this.onIsAnswerCorrect = _this.addEvent();
65028
64639
  /**
65029
64640
  * Use this event to control drag&drop operations during design mode.
65030
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65031
- * - `options.allow` - set it to `false` to disable dragging.
65032
- * - `options.target` - a target element that is dragged.
65033
- * - `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox.
65034
- * - `options.parent` - a page or panel where target element is dragging.
65035
- * - `options.insertBefore` - an element before the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging an element after the last element in a container.
65036
- * - `options.insertAfter` - an element after the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging element to the first position within the parent container.
65037
64641
  * @see setDesignMode
65038
64642
  * @see isDesignMode
65039
64643
  */
65040
64644
  _this.onDragDropAllow = _this.addEvent();
65041
64645
  /**
65042
64646
  * Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true.
65043
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65044
- * - `options.element` - an element that is going to be scrolled on top.
65045
- * - `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null.
65046
- * - `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null.
65047
- * - `options.elementId` - the unique element DOM Id.
65048
- * - `options.cancel` - set this property to true to cancel the default scrolling.
65049
64647
  */
65050
64648
  _this.onScrollingElementToTop = _this.addEvent();
65051
64649
  _this.onLocaleChangedEvent = _this.addEvent();
65052
64650
  /**
65053
64651
  * Use this event to create/customize actions to be displayed in a question's title.
65054
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65055
- * - `options.question` - A [Question](https://surveyjs.io/Documentation/Library?id=Question) object for which the event is fired.
65056
- * - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question.
65057
- * @see IAction
65058
- * @see Question
64652
+ *
64653
+ * For information on event handler parameters, refer to descriptions within the interface.
65059
64654
  *
65060
64655
  * [View Demo](https://surveyjs.io/form-library/examples/survey-titleactions/ (linkStyle))
65061
- */
64656
+ * @see IAction
64657
+ * @see Question
64658
+ */
65062
64659
  _this.onGetQuestionTitleActions = _this.addEvent();
65063
64660
  /**
65064
64661
  * Use this event to create/customize actions to be displayed in a panel's title.
65065
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65066
- * - `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired.
65067
- * - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel.
65068
64662
  * @see IAction
65069
64663
  * @see PanelModel
65070
64664
  */
65071
64665
  _this.onGetPanelTitleActions = _this.addEvent();
65072
64666
  /**
65073
64667
  * Use this event to create/customize actions to be displayed in a page's title.
65074
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65075
- * - `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired.
65076
- * - `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page.
65077
64668
  * @see IAction
65078
64669
  * @see PageModel
65079
64670
  */
65080
64671
  _this.onGetPageTitleActions = _this.addEvent();
65081
64672
  /**
65082
64673
  * An event that allows you to add, delete, or modify actions in the footer of a [Panel](https://surveyjs.io/form-library/documentation/panelmodel).
65083
- *
65084
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65085
- * - `options.panel` - A Panel whose actions are being modified.
65086
- * - `options.actions` - An array of panel [actions](https://surveyjs.io/form-library/documentation/iaction). You can modify the entire array or individual actions within it.
65087
- * - `options.question` - A [Dynamic Panel](https://surveyjs.io/form-library/documentation/questionpaneldynamicmodel) to which the Panel belongs. This field is `undefined` if the Panel does not belong to any Dynamic Panel.
65088
64674
  */
65089
64675
  _this.onGetPanelFooterActions = _this.addEvent();
65090
64676
  /**
65091
64677
  * Use this event to create/customize actions to be displayed in a matrix question's row.
65092
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65093
- * - `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired.
65094
- * - `options.row` - A matrix row for which the event is fired.
65095
- * - `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row.
65096
64678
  * @see IAction
65097
64679
  * @see QuestionMatrixDropdownModelBase
65098
64680
  */
65099
64681
  _this.onGetMatrixRowActions = _this.addEvent();
65100
64682
  /**
65101
64683
  * An event that is raised after the survey element content was collapsed or expanded.
65102
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65103
- * - `options.element` - Specifies which survey element content was collapsed or expanded.
65104
64684
  * @see onElementContentVisibilityChanged
65105
64685
  */
65106
64686
  _this.onElementContentVisibilityChanged = _this.addEvent();
65107
64687
  /**
65108
64688
  * An event that is raised before expression question convert it's value into display value for rendering.
65109
- * - `sender`: `SurveyModel` - A survey instance that raised the event.
65110
- * - `options.question` - The expression question.
65111
- * - `options.value` - The question value.
65112
- * - `options.displayValue` - the display value that you can change before rendering.
65113
64689
  */
65114
64690
  _this.onGetExpressionDisplayValue = _this.addEvent();
65115
64691
  /**
@@ -68933,6 +68509,7 @@ var SurveyModel = /** @class */ (function (_super) {
68933
68509
  this.isCompleted = false;
68934
68510
  return false;
68935
68511
  }
68512
+ this.checkOnPageTriggers(true);
68936
68513
  var previousCookie = this.hasCookie;
68937
68514
  this.stopTimer();
68938
68515
  this.isCompleted = true;
@@ -69108,7 +68685,7 @@ var SurveyModel = /** @class */ (function (_super) {
69108
68685
  };
69109
68686
  SurveyModel.prototype.doNextPage = function () {
69110
68687
  var curPage = this.currentPage;
69111
- this.checkOnPageTriggers();
68688
+ this.checkOnPageTriggers(false);
69112
68689
  if (!this.isCompleted) {
69113
68690
  if (this.sendResultOnPageNext) {
69114
68691
  this.sendResult(this.surveyPostId, this.clientId, true);
@@ -69523,7 +69100,6 @@ var SurveyModel = /** @class */ (function (_super) {
69523
69100
  this.onDynamicPanelItemValueChanged.fire(this, options);
69524
69101
  };
69525
69102
  SurveyModel.prototype.dragAndDropAllow = function (options) {
69526
- options.allow = true;
69527
69103
  this.onDragDropAllow.fire(this, options);
69528
69104
  return options.allow;
69529
69105
  };
@@ -70082,7 +69658,7 @@ var SurveyModel = /** @class */ (function (_super) {
70082
69658
  questions[i].onSurveyValueChanged(this.getValue(questions[i].getValueName()));
70083
69659
  }
70084
69660
  };
70085
- SurveyModel.prototype.checkOnPageTriggers = function () {
69661
+ SurveyModel.prototype.checkOnPageTriggers = function (isOnComplete) {
70086
69662
  var questions = this.getCurrentPageQuestions(true);
70087
69663
  var values = {};
70088
69664
  for (var i = 0; i < questions.length; i++) {
@@ -70107,7 +69683,8 @@ var SurveyModel = /** @class */ (function (_super) {
70107
69683
  }
70108
69684
  return result;
70109
69685
  };
70110
- SurveyModel.prototype.checkTriggers = function (key, isOnNextPage) {
69686
+ SurveyModel.prototype.checkTriggers = function (key, isOnNextPage, isOnComplete) {
69687
+ if (isOnComplete === void 0) { isOnComplete = false; }
70111
69688
  if (this.isCompleted || this.triggers.length == 0 || this.isDisplayMode)
70112
69689
  return;
70113
69690
  if (this.isTriggerIsRunning) {
@@ -70124,7 +69701,7 @@ var SurveyModel = /** @class */ (function (_super) {
70124
69701
  var prevCanBeCompleted = this.canBeCompletedByTrigger;
70125
69702
  this.canBeCompletedByTrigger = false;
70126
69703
  for (var i = 0; i < this.triggers.length; i++) {
70127
- this.triggers[i].checkExpression(isOnNextPage, this.triggerKeys, this.triggerValues, properties);
69704
+ this.triggers[i].checkExpression(isOnNextPage, isOnComplete, this.triggerKeys, this.triggerValues, properties);
70128
69705
  }
70129
69706
  if (prevCanBeCompleted !== this.canBeCompletedByTrigger) {
70130
69707
  this.updateButtonsVisibility();
@@ -72131,34 +71708,37 @@ var surveyLocalization = {
72131
71708
  getLocaleStrings: function (loc) {
72132
71709
  return this.locales[loc];
72133
71710
  },
72134
- getCurrentStrings: function (locale) {
72135
- var loc = locale && this.locales[locale];
72136
- if (!loc)
72137
- loc = this.currentLocale ? this.locales[this.currentLocale] : this.locales[this.defaultLocale];
72138
- if (!loc)
72139
- loc = this.locales[this.defaultLocale];
72140
- if (!loc)
72141
- loc = this.locales["en"];
72142
- return loc;
72143
- },
72144
71711
  getString: function (strName, locale) {
71712
+ var _this = this;
72145
71713
  if (locale === void 0) { locale = null; }
72146
- var originalLocale = locale;
72147
- locale = locale || this.currentLocale || this.defaultLocale;
72148
- var loc = this.getCurrentStrings(locale);
72149
- if (!!loc[strName])
72150
- return loc[strName];
72151
- var index = !!locale ? locale.indexOf("-") : -1;
72152
- if (index > -1)
72153
- return this.getString(strName, locale.substring(0, index));
72154
- loc = this.locales[this.defaultLocale];
72155
- var result = loc[strName];
72156
- if (result === undefined) {
72157
- result = this.locales["en"][strName];
72158
- }
72159
- if (result === undefined)
72160
- return this.onGetExternalString(strName, originalLocale);
72161
- return result;
71714
+ var locs = new Array();
71715
+ var addLocaleCore = function (locName) {
71716
+ var strs = _this.locales[locName];
71717
+ if (!!strs)
71718
+ locs.push(strs);
71719
+ };
71720
+ var addLocale = function (locName) {
71721
+ if (!locName)
71722
+ return;
71723
+ addLocaleCore(locName);
71724
+ var index = locName.indexOf("-");
71725
+ if (index < 1)
71726
+ return;
71727
+ locName = locName.substring(0, index);
71728
+ addLocaleCore(locName);
71729
+ };
71730
+ addLocale(locale);
71731
+ addLocale(this.currentLocale);
71732
+ addLocale(this.defaultLocale);
71733
+ if (this.defaultLocale !== "en") {
71734
+ addLocaleCore("en");
71735
+ }
71736
+ for (var i = 0; i < locs.length; i++) {
71737
+ var res = locs[i][strName];
71738
+ if (res !== undefined)
71739
+ return res;
71740
+ }
71741
+ return this.onGetExternalString(strName, locale);
72162
71742
  },
72163
71743
  getLocales: function (removeDefaultLoc) {
72164
71744
  if (removeDefaultLoc === void 0) { removeDefaultLoc = false; }
@@ -72440,13 +72020,14 @@ function createTOCListModel(survey) {
72440
72020
  });
72441
72021
  var listModel = new _list__WEBPACK_IMPORTED_MODULE_1__["ListModel"](items, function (item) {
72442
72022
  if (!!item.action()) {
72443
- listModel.allowSelection = true;
72444
72023
  listModel.selectedItem = item;
72445
- listModel.allowSelection = false;
72446
72024
  }
72447
72025
  }, true, items.filter(function (i) { return i.id === survey.currentPage.name; })[0]);
72448
72026
  listModel.allowSelection = false;
72449
72027
  listModel.locOwner = survey;
72028
+ survey.onCurrentPageChanged.add(function (s, o) {
72029
+ listModel.selectedItem = items.filter(function (i) { return i.id === survey.currentPage.name; })[0];
72030
+ });
72450
72031
  return listModel;
72451
72032
  }
72452
72033
 
@@ -73032,11 +72613,16 @@ var Trigger = /** @class */ (function (_super) {
73032
72613
  Trigger.prototype.canBeExecuted = function (isOnNextPage) {
73033
72614
  return true;
73034
72615
  };
73035
- Trigger.prototype.checkExpression = function (isOnNextPage, keys, values, properties) {
72616
+ Trigger.prototype.canBeExecutedOnComplete = function () {
72617
+ return false;
72618
+ };
72619
+ Trigger.prototype.checkExpression = function (isOnNextPage, isOnComplete, keys, values, properties) {
73036
72620
  if (properties === void 0) { properties = null; }
73037
72621
  this.isExecutingOnNextPage = isOnNextPage;
73038
72622
  if (!this.canBeExecuted(isOnNextPage))
73039
72623
  return;
72624
+ if (isOnComplete && !this.canBeExecutedOnComplete())
72625
+ return;
73040
72626
  if (!this.isCheckRequired(keys))
73041
72627
  return;
73042
72628
  if (!!this.conditionRunner) {