survey-react 1.9.125 → 1.9.126

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.125
2
+ * surveyjs - Survey JavaScript library v1.9.126
3
3
  * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1900,6 +1900,20 @@ var Base = /** @class */ (function () {
1900
1900
  }
1901
1901
  return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isValueEmpty(value);
1902
1902
  };
1903
+ Base.prototype.equals = function (obj) {
1904
+ if (!obj)
1905
+ return false;
1906
+ if (this.isDisposed || obj.isDisposed)
1907
+ return false;
1908
+ if (this.getType() != obj.getType())
1909
+ return false;
1910
+ return this.equalsCore(obj);
1911
+ };
1912
+ Base.prototype.equalsCore = function (obj) {
1913
+ if (this.name !== obj.name)
1914
+ return false;
1915
+ return _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].isTwoValueEquals(this.toJSON(), obj.toJSON(), false, true, false);
1916
+ };
1903
1917
  Base.prototype.trimValue = function (value) {
1904
1918
  if (!!value && (typeof value === "string" || value instanceof String))
1905
1919
  return value.trim();
@@ -4875,14 +4889,19 @@ var modernCss = {
4875
4889
  },
4876
4890
  window: {
4877
4891
  root: "sv_window",
4892
+ rootCollapsedMod: "sv_window--collapsed",
4893
+ rootContent: "sv_window_root-content",
4878
4894
  body: "sv_window_content",
4879
4895
  header: {
4880
- root: "sv_window_title",
4881
- title: "",
4882
- button: "",
4896
+ root: "sv_window_header",
4897
+ titleCollapsed: "sv_window_header_title_collapsed",
4898
+ buttonsContainer: "sv_window_buttons_container",
4899
+ button: "sv_window_button",
4883
4900
  buttonExpanded: "",
4884
4901
  buttonCollapsed: "",
4885
- },
4902
+ collapseButton: "sv_window_button sv_window_button_collapse",
4903
+ closeButton: "sv_window_button sv_window_button_close"
4904
+ }
4886
4905
  },
4887
4906
  variables: {
4888
4907
  mobileWidth: "--sv-mobile-width",
@@ -5268,14 +5287,19 @@ var defaultStandardCss = {
5268
5287
  },
5269
5288
  window: {
5270
5289
  root: "sv_window",
5290
+ rootCollapsedMod: "sv_window--collapsed",
5291
+ rootContent: "sv_window_root-content",
5271
5292
  body: "sv_window_content",
5272
5293
  header: {
5273
- root: "sv_window_title",
5274
- title: "",
5275
- button: "",
5294
+ root: "sv_window_header",
5295
+ titleCollapsed: "sv_window_header_title_collapsed",
5296
+ buttonsContainer: "sv_window_buttons_container",
5297
+ button: "sv_window_button",
5276
5298
  buttonExpanded: "",
5277
5299
  buttonCollapsed: "",
5278
- },
5300
+ collapseButton: "sv_window_button sv_window_button_collapse",
5301
+ closeButton: "sv_window_button sv_window_button_close"
5302
+ }
5279
5303
  },
5280
5304
  variables: {
5281
5305
  mobileWidth: "--sv-mobile-width",
@@ -5496,6 +5520,7 @@ var defaultV2Css = {
5496
5520
  headerTop: "sd-question__header--location-top sd-element__header--location-top",
5497
5521
  headerBottom: "sd-question__header--location--bottom",
5498
5522
  content: "sd-question__content",
5523
+ contentSupportContainerQueries: "sd-question__content--support-container-queries",
5499
5524
  contentLeft: "sd-question__content--left",
5500
5525
  titleNumInline: "sd-element__title--num-inline",
5501
5526
  titleLeftRoot: "sd-question--left",
@@ -5737,6 +5762,7 @@ var defaultV2Css = {
5737
5762
  rowError: "sd-matrix__row--error",
5738
5763
  cell: "sd-table__cell sd-matrix__cell",
5739
5764
  row: "sd-table__row",
5765
+ rowDisabled: "sd-table__row-disabled",
5740
5766
  headerCell: "sd-table__cell sd-table__cell--header",
5741
5767
  rowTextCell: "sd-table__cell sd-matrix__cell sd-table__cell--row-text",
5742
5768
  label: "sd-item sd-radio sd-matrix__label",
@@ -5975,13 +6001,18 @@ var defaultV2Css = {
5975
6001
  },
5976
6002
  window: {
5977
6003
  root: "sv_window",
6004
+ rootCollapsedMod: "sv_window--collapsed",
6005
+ rootContent: "sv_window_root-content",
5978
6006
  body: "sv_window_content",
5979
6007
  header: {
5980
- root: "sv_window_title",
5981
- title: "",
6008
+ root: "sv_window_header",
6009
+ titleCollapsed: "sv_window_header_title_collapsed",
6010
+ buttonsContainer: "sv_window_buttons_container",
5982
6011
  button: "sv_window_button",
5983
6012
  buttonExpanded: "",
5984
- buttonCollapsed: ""
6013
+ buttonCollapsed: "",
6014
+ collapseButton: "sv_window_button sv_window_button_collapse",
6015
+ closeButton: "sv_window_button sv_window_button_close"
5985
6016
  }
5986
6017
  },
5987
6018
  ranking: {
@@ -9448,8 +9479,8 @@ __webpack_require__.r(__webpack_exports__);
9448
9479
  //import "../../modern.scss";
9449
9480
  var Version;
9450
9481
  var ReleaseDate;
9451
- Version = "" + "1.9.125";
9452
- ReleaseDate = "" + "2024-01-11";
9482
+ Version = "" + "1.9.126";
9483
+ ReleaseDate = "" + "2024-01-16";
9453
9484
  function checkLibraryVersion(ver, libraryName) {
9454
9485
  if (Version != ver) {
9455
9486
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16972,21 +17003,11 @@ var Helpers = /** @class */ (function () {
16972
17003
  return x == y;
16973
17004
  if (!Helpers.isValueObject(x) || !Helpers.isValueObject(y))
16974
17005
  return false;
16975
- if (x["equals"])
17006
+ if (x["equals"] && y["equals"])
16976
17007
  return x.equals(y);
16977
- if (!!x.toJSON && !!y.toJSON && !!x.getType && !!y.getType) {
16978
- if (x.isDisposed || y.isDisposed)
16979
- return false;
16980
- if (x.getType() !== y.getType())
16981
- return false;
16982
- if (!!x.name && x.name !== y.name)
16983
- return false;
16984
- return this.isTwoValueEquals(x.toJSON(), y.toJSON(), ignoreOrder, caseSensitive, trimStrings);
16985
- }
16986
- if (Array.isArray(x) && Array.isArray(y))
17008
+ if (Array.isArray(x) && Array.isArray(y)) {
16987
17009
  return Helpers.isArraysEqual(x, y, ignoreOrder, caseSensitive, trimStrings);
16988
- if (!!x.equalsTo && y.equalsTo)
16989
- return x.equalsTo(y);
17010
+ }
16990
17011
  for (var p in x) {
16991
17012
  if (!x.hasOwnProperty(p))
16992
17013
  continue;
@@ -17318,10 +17339,12 @@ var map = {
17318
17339
  "./V2DragElement_16x16.svg": "./src/images/V2DragElement_16x16.svg",
17319
17340
  "./chevron.svg": "./src/images/chevron.svg",
17320
17341
  "./clear_16x16.svg": "./src/images/clear_16x16.svg",
17342
+ "./close_16x16.svg": "./src/images/close_16x16.svg",
17321
17343
  "./collapseDetail.svg": "./src/images/collapseDetail.svg",
17322
17344
  "./drag-n-drop.svg": "./src/images/drag-n-drop.svg",
17323
17345
  "./expandDetail.svg": "./src/images/expandDetail.svg",
17324
17346
  "./loading.svg": "./src/images/loading.svg",
17347
+ "./minimize_16x16.svg": "./src/images/minimize_16x16.svg",
17325
17348
  "./no-image.svg": "./src/images/no-image.svg",
17326
17349
  "./ranking-arrows.svg": "./src/images/ranking-arrows.svg",
17327
17350
  "./ranking-dash.svg": "./src/images/ranking-dash.svg",
@@ -17329,6 +17352,7 @@ var map = {
17329
17352
  "./rating-star-small-2.svg": "./src/images/rating-star-small-2.svg",
17330
17353
  "./rating-star-small.svg": "./src/images/rating-star-small.svg",
17331
17354
  "./rating-star.svg": "./src/images/rating-star.svg",
17355
+ "./restore_16x16.svg": "./src/images/restore_16x16.svg",
17332
17356
  "./search.svg": "./src/images/search.svg"
17333
17357
  };
17334
17358
 
@@ -17717,6 +17741,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
17717
17741
 
17718
17742
  /***/ }),
17719
17743
 
17744
+ /***/ "./src/images/close_16x16.svg":
17745
+ /*!************************************!*\
17746
+ !*** ./src/images/close_16x16.svg ***!
17747
+ \************************************/
17748
+ /*! no static exports found */
17749
+ /***/ (function(module, exports) {
17750
+
17751
+ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.43 8.0025L13.7 3.7225C14.09 3.3325 14.09 2.6925 13.7 2.2925C13.31 1.9025 12.67 1.9025 12.27 2.2925L7.99 6.5725L3.72 2.3025C3.33 1.9025 2.69 1.9025 2.3 2.3025C1.9 2.6925 1.9 3.3325 2.3 3.7225L6.58 8.0025L2.3 12.2825C1.91 12.6725 1.91 13.3125 2.3 13.7125C2.69 14.1025 3.33 14.1025 3.73 13.7125L8.01 9.4325L12.29 13.7125C12.68 14.1025 13.32 14.1025 13.72 13.7125C14.11 13.3225 14.11 12.6825 13.72 12.2825L9.44 8.0025H9.43Z\"></path></svg>"
17752
+
17753
+ /***/ }),
17754
+
17720
17755
  /***/ "./src/images/collapseDetail.svg":
17721
17756
  /*!***************************************!*\
17722
17757
  !*** ./src/images/collapseDetail.svg ***!
@@ -17761,6 +17796,17 @@ module.exports = "<svg viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3
17761
17796
 
17762
17797
  /***/ }),
17763
17798
 
17799
+ /***/ "./src/images/minimize_16x16.svg":
17800
+ /*!***************************************!*\
17801
+ !*** ./src/images/minimize_16x16.svg ***!
17802
+ \***************************************/
17803
+ /*! no static exports found */
17804
+ /***/ (function(module, exports) {
17805
+
17806
+ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M13 9H3C2.45 9 2 8.55 2 8C2 7.45 2.45 7 3 7H13C13.55 7 14 7.45 14 8C14 8.55 13.55 9 13 9Z\"></path></svg>"
17807
+
17808
+ /***/ }),
17809
+
17764
17810
  /***/ "./src/images/no-image.svg":
17765
17811
  /*!*********************************!*\
17766
17812
  !*** ./src/images/no-image.svg ***!
@@ -17838,6 +17884,17 @@ module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\
17838
17884
 
17839
17885
  /***/ }),
17840
17886
 
17887
+ /***/ "./src/images/restore_16x16.svg":
17888
+ /*!**************************************!*\
17889
+ !*** ./src/images/restore_16x16.svg ***!
17890
+ \**************************************/
17891
+ /*! no static exports found */
17892
+ /***/ (function(module, exports) {
17893
+
17894
+ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M12 13H4C2.9 13 2 12.1 2 11V5C2 3.9 2.9 3 4 3H12C13.1 3 14 3.9 14 5V11C14 12.1 13.1 13 12 13ZM4 5V11H12V5H4Z\"></path></svg>"
17895
+
17896
+ /***/ }),
17897
+
17841
17898
  /***/ "./src/images/search.svg":
17842
17899
  /*!*******************************!*\
17843
17900
  !*** ./src/images/search.svg ***!
@@ -31292,6 +31349,9 @@ var PanelModelBase = /** @class */ (function (_super) {
31292
31349
  else {
31293
31350
  this.elements.splice(index, 0, element);
31294
31351
  }
31352
+ if (this.wasRendered) {
31353
+ element.onFirstRendering();
31354
+ }
31295
31355
  return true;
31296
31356
  };
31297
31357
  PanelModelBase.prototype.insertElementAfter = function (element, after) {
@@ -33794,7 +33854,7 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33794
33854
  else {
33795
33855
  _this.surveyValue = _this.createSurvey(jsonObj);
33796
33856
  }
33797
- _this.surveyValue.showTitle = false;
33857
+ //this.surveyValue.showTitle = false;
33798
33858
  if ("undefined" !== typeof document) {
33799
33859
  _this.windowElement = document.createElement("div");
33800
33860
  }
@@ -33878,6 +33938,13 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33878
33938
  enumerable: false,
33879
33939
  configurable: true
33880
33940
  });
33941
+ Object.defineProperty(PopupSurveyModel.prototype, "isCollapsed", {
33942
+ get: function () {
33943
+ return !this.isExpanded;
33944
+ },
33945
+ enumerable: false,
33946
+ configurable: true
33947
+ });
33881
33948
  PopupSurveyModel.prototype.onExpandedChanged = function () {
33882
33949
  if (!!this.expandedChangedCallback) {
33883
33950
  this.expandedChangedCallback();
@@ -33899,11 +33966,22 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33899
33966
  });
33900
33967
  Object.defineProperty(PopupSurveyModel.prototype, "locTitle", {
33901
33968
  get: function () {
33969
+ if (this.survey.locTitle.isEmpty)
33970
+ return null;
33902
33971
  return this.survey.locTitle;
33903
33972
  },
33904
33973
  enumerable: false,
33905
33974
  configurable: true
33906
33975
  });
33976
+ Object.defineProperty(PopupSurveyModel.prototype, "locDescription", {
33977
+ get: function () {
33978
+ if (this.survey.locTitle.isEmpty)
33979
+ return null;
33980
+ return this.survey.locDescription;
33981
+ },
33982
+ enumerable: false,
33983
+ configurable: true
33984
+ });
33907
33985
  /**
33908
33986
  * Expands the pop-up window.
33909
33987
  *
@@ -33961,7 +34039,24 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33961
34039
  });
33962
34040
  Object.defineProperty(PopupSurveyModel.prototype, "cssRoot", {
33963
34041
  get: function () {
33964
- return this.getPropertyValue("cssRoot", "");
34042
+ var result = this.getPropertyValue("cssRoot", "");
34043
+ if (this.isCollapsed)
34044
+ result += " " + this.getPropertyValue("cssRootCollapsedMod", "");
34045
+ return result;
34046
+ },
34047
+ enumerable: false,
34048
+ configurable: true
34049
+ });
34050
+ Object.defineProperty(PopupSurveyModel.prototype, "cssRootCollapsedMod", {
34051
+ get: function () {
34052
+ return this.getPropertyValue("cssRootCollapsedMod");
34053
+ },
34054
+ enumerable: false,
34055
+ configurable: true
34056
+ });
34057
+ Object.defineProperty(PopupSurveyModel.prototype, "cssRootContent", {
34058
+ get: function () {
34059
+ return this.getPropertyValue("cssRootContent");
33965
34060
  },
33966
34061
  enumerable: false,
33967
34062
  configurable: true
@@ -33980,16 +34075,30 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33980
34075
  enumerable: false,
33981
34076
  configurable: true
33982
34077
  });
33983
- Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderTitle", {
34078
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderTitleCollapsed", {
34079
+ get: function () {
34080
+ return this.getPropertyValue("cssHeaderTitleCollapsed", "");
34081
+ },
34082
+ enumerable: false,
34083
+ configurable: true
34084
+ });
34085
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderButtonsContainer", {
34086
+ get: function () {
34087
+ return this.getPropertyValue("cssHeaderButtonsContainer", "");
34088
+ },
34089
+ enumerable: false,
34090
+ configurable: true
34091
+ });
34092
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderCollapseButton", {
33984
34093
  get: function () {
33985
- return this.getPropertyValue("cssHeaderTitle", "");
34094
+ return this.getPropertyValue("cssHeaderCollapseButton", "");
33986
34095
  },
33987
34096
  enumerable: false,
33988
34097
  configurable: true
33989
34098
  });
33990
- Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderButton", {
34099
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderCloseButton", {
33991
34100
  get: function () {
33992
- return this.getPropertyValue("cssHeaderButton", "");
34101
+ return this.getPropertyValue("cssHeaderCloseButton", "");
33993
34102
  },
33994
34103
  enumerable: false,
33995
34104
  configurable: true
@@ -34009,13 +34118,17 @@ var PopupSurveyModel = /** @class */ (function (_super) {
34009
34118
  return;
34010
34119
  var cssWindow = this.css.window;
34011
34120
  this.setPropertyValue("cssRoot", cssWindow.root);
34121
+ this.setPropertyValue("cssRootCollapsedMod", cssWindow.rootCollapsedMod);
34122
+ this.setPropertyValue("cssRootContent", cssWindow.rootContent);
34012
34123
  this.setPropertyValue("cssBody", cssWindow.body);
34013
34124
  var cssHeader = cssWindow.header;
34014
34125
  if (!cssHeader)
34015
34126
  return;
34016
34127
  this.setPropertyValue("cssHeaderRoot", cssHeader.root);
34017
- this.setPropertyValue("cssHeaderTitle", cssHeader.title);
34018
- this.setPropertyValue("cssHeaderButton", cssHeader.button);
34128
+ this.setPropertyValue("cssHeaderTitleCollapsed", cssHeader.titleCollapsed);
34129
+ this.setPropertyValue("cssHeaderButtonsContainer", cssHeader.buttonsContainer);
34130
+ this.setPropertyValue("cssHeaderCollapseButton", cssHeader.collapseButton);
34131
+ this.setPropertyValue("cssHeaderCloseButton", cssHeader.closeButton);
34019
34132
  this.updateCssButton();
34020
34133
  };
34021
34134
  PopupSurveyModel.prototype.updateCssButton = function () {
@@ -35889,6 +36002,9 @@ var Question = /** @class */ (function (_super) {
35889
36002
  .append(cssClasses.headerBottom, this.hasTitleOnBottom)
35890
36003
  .toString();
35891
36004
  };
36005
+ Question.prototype.supportContainerQueries = function () {
36006
+ return false;
36007
+ };
35892
36008
  Object.defineProperty(Question.prototype, "cssContent", {
35893
36009
  get: function () {
35894
36010
  this.ensureElementCss();
@@ -35903,6 +36019,7 @@ var Question = /** @class */ (function (_super) {
35903
36019
  Question.prototype.getCssContent = function (cssClasses) {
35904
36020
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
35905
36021
  .append(cssClasses.content)
36022
+ .append(cssClasses.contentSupportContainerQueries, this.supportContainerQueries())
35906
36023
  .append(cssClasses.contentLeft, this.hasTitleOnLeft)
35907
36024
  .toString();
35908
36025
  };
@@ -39693,7 +39810,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39693
39810
  if (this.isValueEmpty(this.cachedValueForUrlRequests)) {
39694
39811
  this.cachedValueForUrlRequests = this.value;
39695
39812
  }
39696
- this.isFirstLoadChoicesFromUrl = false;
39697
39813
  var cachedValues = this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests, checkCachedValuesOnExisting);
39698
39814
  if (array && (array.length > 0 || this.choicesByUrl.allowEmptyResponse)) {
39699
39815
  newChoices = new Array();
@@ -39704,6 +39820,20 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39704
39820
  newChoices[i].locOwner = this;
39705
39821
  }
39706
39822
  }
39823
+ this.setChoicesFromUrl(newChoices, errors, cachedValues);
39824
+ };
39825
+ QuestionSelectBase.prototype.canAvoidSettChoicesFromUrl = function (newChoices) {
39826
+ if (this.isFirstLoadChoicesFromUrl)
39827
+ return false;
39828
+ var chocesAreEmpty = !newChoices || Array.isArray(newChoices) && newChoices.length === 0;
39829
+ if (chocesAreEmpty && !this.isEmpty())
39830
+ return false;
39831
+ return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isTwoValueEquals(this.choicesFromUrl, newChoices);
39832
+ };
39833
+ QuestionSelectBase.prototype.setChoicesFromUrl = function (newChoices, errors, cachedValues) {
39834
+ if (this.canAvoidSettChoicesFromUrl(newChoices))
39835
+ return;
39836
+ this.isFirstLoadChoicesFromUrl = false;
39707
39837
  this.choicesFromUrl = newChoices;
39708
39838
  this.filterItems();
39709
39839
  this.onVisibleChoicesChanged();
@@ -41625,9 +41755,12 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
41625
41755
  var res = [];
41626
41756
  var visItems = this.visibleChoices;
41627
41757
  for (var i = 0; i < visItems.length; i++) {
41758
+ var item = visItems[i];
41759
+ if (item === this.selectAllItem)
41760
+ continue;
41628
41761
  var val = visItems[i].value;
41629
41762
  if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isTwoValueEquals(val, this.invisibleOldValues[val])) {
41630
- if (!this.isItemSelected(visItems[i])) {
41763
+ if (!this.isItemSelected(item)) {
41631
41764
  res.push(val);
41632
41765
  }
41633
41766
  delete this.invisibleOldValues[val];
@@ -46490,8 +46623,8 @@ var MatrixRowModel = /** @class */ (function (_super) {
46490
46623
  __extends(MatrixRowModel, _super);
46491
46624
  function MatrixRowModel(item, fullName, data, value) {
46492
46625
  var _this = _super.call(this) || this;
46493
- _this.fullName = fullName;
46494
46626
  _this.item = item;
46627
+ _this.fullName = fullName;
46495
46628
  _this.data = data;
46496
46629
  _this.value = value;
46497
46630
  _this.cellClick = function (column) {
@@ -46529,8 +46662,24 @@ var MatrixRowModel = /** @class */ (function (_super) {
46529
46662
  return this.getPropertyValue("value");
46530
46663
  },
46531
46664
  set: function (val) {
46532
- val = this.data.getCorrectedRowValue(val);
46533
- this.setPropertyValue("value", val);
46665
+ if (!this.isReadOnly) {
46666
+ this.setValueDirectly(this.data.getCorrectedRowValue(val));
46667
+ }
46668
+ },
46669
+ enumerable: false,
46670
+ configurable: true
46671
+ });
46672
+ MatrixRowModel.prototype.setValueDirectly = function (val) {
46673
+ this.setPropertyValue("value", val);
46674
+ };
46675
+ Object.defineProperty(MatrixRowModel.prototype, "isReadOnly", {
46676
+ get: function () { return !this.item.enabled || this.data.isInputReadOnly; },
46677
+ enumerable: false,
46678
+ configurable: true
46679
+ });
46680
+ Object.defineProperty(MatrixRowModel.prototype, "rowTextClasses", {
46681
+ get: function () {
46682
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.data.cssClasses.rowTextCell).toString();
46534
46683
  },
46535
46684
  enumerable: false,
46536
46685
  configurable: true
@@ -46540,6 +46689,7 @@ var MatrixRowModel = /** @class */ (function (_super) {
46540
46689
  var cssClasses = this.data.cssClasses;
46541
46690
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(cssClasses.row)
46542
46691
  .append(cssClasses.rowError, this.data.hasErrorInRow(this))
46692
+ .append(cssClasses.rowDisabled, this.isReadOnly)
46543
46693
  .toString();
46544
46694
  },
46545
46695
  enumerable: false,
@@ -46899,6 +47049,10 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
46899
47049
  }
46900
47050
  return res;
46901
47051
  };
47052
+ QuestionMatrixModel.prototype.runItemsCondition = function (values, properties) {
47053
+ _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
47054
+ return _super.prototype.runItemsCondition.call(this, values, properties);
47055
+ };
46902
47056
  QuestionMatrixModel.prototype.getVisibleRows = function () {
46903
47057
  var result = new Array();
46904
47058
  var val = this.value;
@@ -47062,7 +47216,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
47062
47216
  if (!val)
47063
47217
  val = {};
47064
47218
  if (this.rows.length == 0) {
47065
- this.generatedVisibleRows[0].value = val;
47219
+ this.generatedVisibleRows[0].setValueDirectly(val);
47066
47220
  }
47067
47221
  else {
47068
47222
  for (var i = 0; i < this.generatedVisibleRows.length; i++) {
@@ -47070,7 +47224,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
47070
47224
  var rowVal = val[row.name];
47071
47225
  if (this.isValueEmpty(rowVal))
47072
47226
  rowVal = null;
47073
- this.generatedVisibleRows[i].value = rowVal;
47227
+ this.generatedVisibleRows[i].setValueDirectly(rowVal);
47074
47228
  }
47075
47229
  }
47076
47230
  this.updateIsAnswered();
@@ -55009,8 +55163,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55009
55163
  configurable: true
55010
55164
  });
55011
55165
  QuestionPanelDynamicModel.prototype.getFirstQuestionToFocus = function (withError) {
55012
- for (var i = 0; i < this.visiblePanels.length; i++) {
55013
- var res = this.visiblePanels[i].getFirstQuestionToFocus(withError);
55166
+ for (var i = 0; i < this.visiblePanelsCore.length; i++) {
55167
+ var res = this.visiblePanelsCore[i].getFirstQuestionToFocus(withError);
55014
55168
  if (!!res)
55015
55169
  return res;
55016
55170
  }
@@ -55042,12 +55196,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55042
55196
  }
55043
55197
  };
55044
55198
  QuestionPanelDynamicModel.prototype.onTemplateElementPropertyChanged = function (element, options) {
55045
- if (this.isLoadingFromJson || this.useTemplatePanel || this.panels.length == 0)
55199
+ if (this.isLoadingFromJson || this.useTemplatePanel || this.panelsCore.length == 0)
55046
55200
  return;
55047
55201
  var property = _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].findProperty(element.getType(), options.name);
55048
55202
  if (!property)
55049
55203
  return;
55050
- var panels = this.panels;
55204
+ var panels = this.panelsCore;
55051
55205
  for (var i = 0; i < panels.length; i++) {
55052
55206
  var question = panels[i].getQuestionByName(element.name);
55053
55207
  if (!!question && question[options.name] !== options.newValue) {
@@ -55066,7 +55220,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55066
55220
  return "paneldynamic";
55067
55221
  };
55068
55222
  QuestionPanelDynamicModel.prototype.clearOnDeletingContainer = function () {
55069
- this.panels.forEach(function (panel) {
55223
+ this.panelsCore.forEach(function (panel) {
55070
55224
  panel.clearOnDeletingContainer();
55071
55225
  });
55072
55226
  };
@@ -55222,8 +55376,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55222
55376
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "items", {
55223
55377
  get: function () {
55224
55378
  var res = [];
55225
- for (var i = 0; i < this.panels.length; i++) {
55226
- res.push(this.panels[i].data);
55379
+ for (var i = 0; i < this.panelsCore.length; i++) {
55380
+ res.push(this.panelsCore[i].data);
55227
55381
  }
55228
55382
  return res;
55229
55383
  },
@@ -55238,7 +55392,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55238
55392
  * @see panelCount
55239
55393
  */
55240
55394
  get: function () {
55241
- return this.getPropertyValue("panels");
55395
+ this.buildPanelsFirstTime(this.canBuildPanels);
55396
+ return this.panelsCore;
55242
55397
  },
55243
55398
  enumerable: false,
55244
55399
  configurable: true
@@ -55248,6 +55403,21 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55248
55403
  * An array of currently visible panels ([`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model) objects).
55249
55404
  * @see templateVisibleIf
55250
55405
  */
55406
+ get: function () {
55407
+ this.buildPanelsFirstTime(this.canBuildPanels);
55408
+ return this.visiblePanelsCore;
55409
+ },
55410
+ enumerable: false,
55411
+ configurable: true
55412
+ });
55413
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsCore", {
55414
+ get: function () {
55415
+ return this.getPropertyValue("panels");
55416
+ },
55417
+ enumerable: false,
55418
+ configurable: true
55419
+ });
55420
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "visiblePanelsCore", {
55251
55421
  get: function () {
55252
55422
  return this.getPropertyValue("visiblePanels");
55253
55423
  },
@@ -55259,14 +55429,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55259
55429
  if (!panel.visible)
55260
55430
  return;
55261
55431
  var index = 0;
55262
- var panels = this.panels;
55432
+ var panels = this.panelsCore;
55263
55433
  for (var i = 0; i < panels.length; i++) {
55264
55434
  if (panels[i] === panel)
55265
55435
  break;
55266
55436
  if (panels[i].visible)
55267
55437
  index++;
55268
55438
  }
55269
- this.visiblePanels.splice(index, 0, panel);
55439
+ this.visiblePanelsCore.splice(index, 0, panel);
55270
55440
  this.addTabFromToolbar(panel, index);
55271
55441
  if (!this.currentPanel) {
55272
55442
  this.currentPanel = panel;
@@ -55275,14 +55445,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55275
55445
  QuestionPanelDynamicModel.prototype.onPanelRemoved = function (panel) {
55276
55446
  var index = this.onPanelRemovedCore(panel);
55277
55447
  if (this.currentPanel === panel) {
55278
- var visPanels = this.visiblePanels;
55448
+ var visPanels = this.visiblePanelsCore;
55279
55449
  if (index >= visPanels.length)
55280
55450
  index = visPanels.length - 1;
55281
55451
  this.currentPanel = index >= 0 ? visPanels[index] : null;
55282
55452
  }
55283
55453
  };
55284
55454
  QuestionPanelDynamicModel.prototype.onPanelRemovedCore = function (panel) {
55285
- var visPanels = this.visiblePanels;
55455
+ var visPanels = this.visiblePanelsCore;
55286
55456
  var index = visPanels.indexOf(panel);
55287
55457
  if (index > -1) {
55288
55458
  visPanels.splice(index, 1);
@@ -55305,14 +55475,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55305
55475
  return -1;
55306
55476
  if (this.useTemplatePanel)
55307
55477
  return 0;
55308
- return this.visiblePanels.indexOf(this.currentPanel);
55478
+ return this.visiblePanelsCore.indexOf(this.currentPanel);
55309
55479
  },
55310
55480
  set: function (val) {
55311
55481
  if (val < 0 || this.visiblePanelCount < 1)
55312
55482
  return;
55313
55483
  if (val >= this.visiblePanelCount)
55314
55484
  val = this.visiblePanelCount - 1;
55315
- this.currentPanel = this.visiblePanels[val];
55485
+ this.currentPanel = this.visiblePanelsCore[val];
55316
55486
  },
55317
55487
  enumerable: false,
55318
55488
  configurable: true
@@ -55334,7 +55504,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55334
55504
  return null;
55335
55505
  var res = this.getPropertyValue("currentPanel", null);
55336
55506
  if (!res && this.visiblePanelCount > 0) {
55337
- res = this.visiblePanels[0];
55507
+ res = this.visiblePanelsCore[0];
55338
55508
  this.currentPanel = res;
55339
55509
  }
55340
55510
  return res;
@@ -55343,7 +55513,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55343
55513
  if (this.isRenderModeList || this.useTemplatePanel)
55344
55514
  return;
55345
55515
  var curPanel = this.getPropertyValue("currentPanel");
55346
- var index = !!val ? this.visiblePanels.indexOf(val) : -1;
55516
+ var index = !!val ? this.visiblePanelsCore.indexOf(val) : -1;
55347
55517
  if (!!val && index < 0 || val === curPanel)
55348
55518
  return;
55349
55519
  if (curPanel) {
@@ -55370,7 +55540,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55370
55540
  this.currentPanel.onHidingContent();
55371
55541
  }
55372
55542
  else {
55373
- this.visiblePanels.forEach(function (panel) { return panel.onHidingContent(); });
55543
+ this.visiblePanelsCore.forEach(function (panel) { return panel.onHidingContent(); });
55374
55544
  }
55375
55545
  };
55376
55546
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "confirmDelete", {
@@ -55627,13 +55797,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55627
55797
  };
55628
55798
  QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
55629
55799
  _super.prototype.setIsMobile.call(this, val);
55630
- (this.panels || []).forEach(function (panel) { return panel.getQuestions(true).forEach(function (question) {
55800
+ (this.panelsCore || []).forEach(function (panel) { return panel.getQuestions(true).forEach(function (question) {
55631
55801
  question.setIsMobile(val);
55632
55802
  }); });
55633
55803
  };
55634
55804
  QuestionPanelDynamicModel.prototype.themeChanged = function (theme) {
55635
55805
  _super.prototype.themeChanged.call(this, theme);
55636
- (this.panels || []).forEach(function (panel) {
55806
+ (this.panelsCore || []).forEach(function (panel) {
55637
55807
  return panel.getQuestions(true).forEach(function (question) {
55638
55808
  question.themeChanged(theme);
55639
55809
  });
@@ -55646,24 +55816,24 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55646
55816
  * @see maxPanelCount
55647
55817
  */
55648
55818
  get: function () {
55649
- return this.isLoadingFromJson || this.useTemplatePanel
55819
+ return !this.canBuildPanels || this.wasNotRenderedInSurvey
55650
55820
  ? this.getPropertyValue("panelCount")
55651
- : this.panels.length;
55821
+ : this.panelsCore.length;
55652
55822
  },
55653
55823
  set: function (val) {
55654
55824
  if (val < 0)
55655
55825
  return;
55656
- if (this.isLoadingFromJson || this.useTemplatePanel) {
55826
+ if (!this.canBuildPanels || this.wasNotRenderedInSurvey) {
55657
55827
  this.setPropertyValue("panelCount", val);
55658
55828
  return;
55659
55829
  }
55660
- if (val == this.panels.length || this.useTemplatePanel)
55830
+ if (val == this.panelsCore.length || this.useTemplatePanel)
55661
55831
  return;
55662
55832
  this.updateBindings("panelCount", val);
55663
55833
  this.prepareValueForPanelCreating();
55664
55834
  for (var i = this.panelCount; i < val; i++) {
55665
55835
  var panel = this.createNewPanel();
55666
- this.panels.push(panel);
55836
+ this.panelsCore.push(panel);
55667
55837
  if (this.renderMode == "list" && this.panelsState != "default") {
55668
55838
  if (this.panelsState === "expand") {
55669
55839
  panel.expand();
@@ -55677,7 +55847,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55677
55847
  }
55678
55848
  var removedPanels = [];
55679
55849
  if (val < this.panelCount) {
55680
- removedPanels = this.panels.splice(val, this.panelCount - val);
55850
+ removedPanels = this.panelsCore.splice(val, this.panelCount - val);
55681
55851
  }
55682
55852
  this.setValueAfterPanelsCreating();
55683
55853
  this.setValueBasedOnPanelCount();
@@ -55725,8 +55895,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55725
55895
  : new QuestionPanelDynamicTemplateSurveyImpl(this));
55726
55896
  };
55727
55897
  QuestionPanelDynamicModel.prototype.setPanelsSurveyImpl = function () {
55728
- for (var i = 0; i < this.panels.length; i++) {
55729
- var panel = this.panels[i];
55898
+ for (var i = 0; i < this.panelsCore.length; i++) {
55899
+ var panel = this.panelsCore[i];
55730
55900
  if (panel == this.template)
55731
55901
  continue;
55732
55902
  panel.setSurveyImpl(panel.data);
@@ -55735,12 +55905,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55735
55905
  QuestionPanelDynamicModel.prototype.setPanelsState = function () {
55736
55906
  if (this.useTemplatePanel || this.renderMode != "list" || !this.templateTitle)
55737
55907
  return;
55738
- for (var i = 0; i < this.panels.length; i++) {
55908
+ for (var i = 0; i < this.panelsCore.length; i++) {
55739
55909
  var state = this.panelsState;
55740
55910
  if (state === "firstExpanded") {
55741
55911
  state = i === 0 ? "expanded" : "collapsed";
55742
55912
  }
55743
- this.panels[i].state = state;
55913
+ this.panelsCore[i].state = state;
55744
55914
  }
55745
55915
  };
55746
55916
  QuestionPanelDynamicModel.prototype.setValueBasedOnPanelCount = function () {
@@ -56024,8 +56194,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56024
56194
  if (!this.isVisible)
56025
56195
  return 0;
56026
56196
  var startIndex = this.showQuestionNumbers == "onSurvey" ? value : 0;
56027
- for (var i = 0; i < this.visiblePanels.length; i++) {
56028
- var counter = this.setPanelVisibleIndex(this.visiblePanels[i], startIndex, this.showQuestionNumbers != "off");
56197
+ for (var i = 0; i < this.visiblePanelsCore.length; i++) {
56198
+ var counter = this.setPanelVisibleIndex(this.visiblePanelsCore[i], startIndex, this.showQuestionNumbers != "off");
56029
56199
  if (this.showQuestionNumbers == "onSurvey") {
56030
56200
  startIndex += counter;
56031
56201
  }
@@ -56111,7 +56281,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56111
56281
  panels.push(this.createNewPanel());
56112
56282
  }
56113
56283
  }
56114
- (_a = this.panels).splice.apply(_a, __spreadArray([0, this.panels.length], panels));
56284
+ (_a = this.panelsCore).splice.apply(_a, __spreadArray([0, this.panelsCore.length], panels));
56115
56285
  this.setValueAfterPanelsCreating();
56116
56286
  this.setPanelsState();
56117
56287
  this.reRunCondition();
@@ -56183,7 +56353,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56183
56353
  return true;
56184
56354
  };
56185
56355
  QuestionPanelDynamicModel.prototype.getProgressInfo = function () {
56186
- return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.visiblePanels, this.isRequired);
56356
+ return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.visiblePanelsCore, this.isRequired);
56187
56357
  };
56188
56358
  QuestionPanelDynamicModel.prototype.isRowEmpty = function (val) {
56189
56359
  for (var prop in val) {
@@ -56233,7 +56403,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56233
56403
  }
56234
56404
  if (this.survey)
56235
56405
  this.survey.dynamicPanelAdded(this);
56236
- return this.panels[index];
56406
+ return this.panelsCore[index];
56237
56407
  };
56238
56408
  QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
56239
56409
  this.panelCount++;
@@ -56295,7 +56465,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56295
56465
  var index = this.getVisualPanelIndex(val);
56296
56466
  if (index < 0 || index >= this.visiblePanelCount)
56297
56467
  return false;
56298
- var panelValue = this.visiblePanels[index].getValue();
56468
+ var panelValue = this.visiblePanelsCore[index].getValue();
56299
56469
  return !this.isValueEmpty(panelValue) &&
56300
56470
  (this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
56301
56471
  };
@@ -56329,13 +56499,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56329
56499
  var visIndex = this.getVisualPanelIndex(value);
56330
56500
  if (visIndex < 0 || visIndex >= this.visiblePanelCount)
56331
56501
  return;
56332
- var panel = this.visiblePanels[visIndex];
56333
- var index = this.panels.indexOf(panel);
56502
+ var panel = this.visiblePanelsCore[visIndex];
56503
+ var index = this.panelsCore.indexOf(panel);
56334
56504
  if (index < 0)
56335
56505
  return;
56336
56506
  if (this.survey && !this.survey.dynamicPanelRemoving(this, index, panel))
56337
56507
  return;
56338
- this.panels.splice(index, 1);
56508
+ this.panelsCore.splice(index, 1);
56339
56509
  this.updateBindings("panelCount", this.panelCount);
56340
56510
  var value = this.value;
56341
56511
  if (!value || !Array.isArray(value) || index >= value.length)
@@ -56352,7 +56522,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56352
56522
  QuestionPanelDynamicModel.prototype.getVisualPanelIndex = function (val) {
56353
56523
  if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val))
56354
56524
  return val;
56355
- var visPanels = this.visiblePanels;
56525
+ var visPanels = this.visiblePanelsCore;
56356
56526
  for (var i = 0; i < visPanels.length; i++) {
56357
56527
  if (visPanels[i] === val || visPanels[i].data === val)
56358
56528
  return i;
@@ -56360,15 +56530,15 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56360
56530
  return -1;
56361
56531
  };
56362
56532
  QuestionPanelDynamicModel.prototype.getPanelIndexById = function (id) {
56363
- for (var i = 0; i < this.panels.length; i++) {
56364
- if (this.panels[i].id === id)
56533
+ for (var i = 0; i < this.panelsCore.length; i++) {
56534
+ if (this.panelsCore[i].id === id)
56365
56535
  return i;
56366
56536
  }
56367
56537
  return -1;
56368
56538
  };
56369
56539
  QuestionPanelDynamicModel.prototype.locStrsChanged = function () {
56370
56540
  _super.prototype.locStrsChanged.call(this);
56371
- var panels = this.panels;
56541
+ var panels = this.panelsCore;
56372
56542
  for (var i = 0; i < panels.length; i++) {
56373
56543
  panels[i].locStrsChanged();
56374
56544
  }
@@ -56377,23 +56547,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56377
56547
  }
56378
56548
  };
56379
56549
  QuestionPanelDynamicModel.prototype.clearIncorrectValues = function () {
56380
- for (var i = 0; i < this.panels.length; i++) {
56550
+ for (var i = 0; i < this.panelsCore.length; i++) {
56381
56551
  this.clearIncorrectValuesInPanel(i);
56382
56552
  }
56383
56553
  };
56384
56554
  QuestionPanelDynamicModel.prototype.clearErrors = function () {
56385
56555
  _super.prototype.clearErrors.call(this);
56386
- for (var i = 0; i < this.panels.length; i++) {
56387
- this.panels[i].clearErrors();
56556
+ for (var i = 0; i < this.panelsCore.length; i++) {
56557
+ this.panelsCore[i].clearErrors();
56388
56558
  }
56389
56559
  };
56390
56560
  QuestionPanelDynamicModel.prototype.getQuestionFromArray = function (name, index) {
56391
56561
  if (index >= this.panelCount)
56392
56562
  return null;
56393
- return this.panels[index].getQuestionByName(name);
56563
+ return this.panelsCore[index].getQuestionByName(name);
56394
56564
  };
56395
56565
  QuestionPanelDynamicModel.prototype.clearIncorrectValuesInPanel = function (index) {
56396
- var panel = this.panels[index];
56566
+ var panel = this.panelsCore[index];
56397
56567
  panel.clearIncorrectValues();
56398
56568
  var val = this.value;
56399
56569
  var values = !!val && index < val.length ? val[index] : null;
@@ -56467,7 +56637,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56467
56637
  }
56468
56638
  };
56469
56639
  QuestionPanelDynamicModel.prototype.collectNestedQuestionsCore = function (questions, visibleOnly) {
56470
- var panels = visibleOnly ? this.visiblePanels : this.panels;
56640
+ var panels = visibleOnly ? this.visiblePanelsCore : this.panelsCore;
56471
56641
  if (!Array.isArray(panels))
56472
56642
  return;
56473
56643
  panels.forEach(function (panel) {
@@ -56493,8 +56663,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56493
56663
  QuestionPanelDynamicModel.prototype.onReadOnlyChanged = function () {
56494
56664
  var readOnly = this.isReadOnly;
56495
56665
  this.template.readOnly = readOnly;
56496
- for (var i = 0; i < this.panels.length; i++) {
56497
- this.panels[i].readOnly = readOnly;
56666
+ for (var i = 0; i < this.panelsCore.length; i++) {
56667
+ this.panelsCore[i].readOnly = readOnly;
56498
56668
  }
56499
56669
  this.updateNoEntriesTextDefaultLoc();
56500
56670
  this.updateFooterActions();
@@ -56510,6 +56680,17 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56510
56680
  QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
56511
56681
  this.template.readOnly = this.isReadOnly;
56512
56682
  this.template.onSurveyLoad();
56683
+ this.buildPanelsFirstTime();
56684
+ _super.prototype.onSurveyLoad.call(this);
56685
+ };
56686
+ QuestionPanelDynamicModel.prototype.buildPanelsFirstTime = function (force) {
56687
+ if (force === void 0) { force = false; }
56688
+ if (this.hasPanelBuildFirstTime)
56689
+ return;
56690
+ if (!force && this.wasNotRenderedInSurvey)
56691
+ return;
56692
+ this.hasPanelBuildFirstTime = true;
56693
+ this.isBuildingPanelsFirstTime = true;
56513
56694
  if (this.getPropertyValue("panelCount") > 0) {
56514
56695
  this.panelCount = this.getPropertyValue("panelCount");
56515
56696
  }
@@ -56529,28 +56710,43 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56529
56710
  this.updateNoEntriesTextDefaultLoc();
56530
56711
  }
56531
56712
  this.updateFooterActions();
56532
- _super.prototype.onSurveyLoad.call(this);
56713
+ this.isBuildingPanelsFirstTime = false;
56533
56714
  };
56715
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "wasNotRenderedInSurvey", {
56716
+ get: function () {
56717
+ return !this.hasPanelBuildFirstTime && !this.wasRendered && !!this.survey;
56718
+ },
56719
+ enumerable: false,
56720
+ configurable: true
56721
+ });
56722
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "canBuildPanels", {
56723
+ get: function () {
56724
+ return !this.isLoadingFromJson && !this.useTemplatePanel;
56725
+ },
56726
+ enumerable: false,
56727
+ configurable: true
56728
+ });
56534
56729
  QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
56730
+ _super.prototype.onFirstRendering.call(this);
56731
+ this.buildPanelsFirstTime();
56535
56732
  this.template.onFirstRendering();
56536
- for (var i = 0; i < this.panels.length; i++) {
56537
- this.panels[i].onFirstRendering();
56733
+ for (var i = 0; i < this.panelsCore.length; i++) {
56734
+ this.panelsCore[i].onFirstRendering();
56538
56735
  }
56539
- _super.prototype.onFirstRendering.call(this);
56540
56736
  };
56541
56737
  QuestionPanelDynamicModel.prototype.localeChanged = function () {
56542
56738
  _super.prototype.localeChanged.call(this);
56543
- for (var i = 0; i < this.panels.length; i++) {
56544
- this.panels[i].localeChanged();
56739
+ for (var i = 0; i < this.panelsCore.length; i++) {
56740
+ this.panelsCore[i].localeChanged();
56545
56741
  }
56546
56742
  };
56547
56743
  QuestionPanelDynamicModel.prototype.runCondition = function (values, properties) {
56548
56744
  _super.prototype.runCondition.call(this, values, properties);
56549
- this.runPanelsCondition(this.panels, values, properties);
56745
+ this.runPanelsCondition(this.panelsCore, values, properties);
56550
56746
  };
56551
56747
  QuestionPanelDynamicModel.prototype.runTriggers = function (name, value) {
56552
56748
  _super.prototype.runTriggers.call(this, name, value);
56553
- this.visiblePanels.forEach(function (p) {
56749
+ this.visiblePanelsCore.forEach(function (p) {
56554
56750
  p.questions.forEach(function (q) { return q.runTriggers(name, value); });
56555
56751
  });
56556
56752
  };
@@ -56584,18 +56780,18 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56584
56780
  };
56585
56781
  QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name, questionName) {
56586
56782
  _super.prototype.onAnyValueChanged.call(this, name, questionName);
56587
- for (var i = 0; i < this.panels.length; i++) {
56588
- this.panels[i].onAnyValueChanged(name, questionName);
56589
- this.panels[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName, "");
56783
+ for (var i = 0; i < this.panelsCore.length; i++) {
56784
+ this.panelsCore[i].onAnyValueChanged(name, questionName);
56785
+ this.panelsCore[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName, "");
56590
56786
  }
56591
56787
  };
56592
56788
  QuestionPanelDynamicModel.prototype.hasKeysDuplicated = function (fireCallback, rec) {
56593
56789
  if (rec === void 0) { rec = null; }
56594
56790
  var keyValues = [];
56595
56791
  var res;
56596
- for (var i = 0; i < this.panels.length; i++) {
56792
+ for (var i = 0; i < this.panelsCore.length; i++) {
56597
56793
  res =
56598
- this.isValueDuplicated(this.panels[i], keyValues, rec, fireCallback) ||
56794
+ this.isValueDuplicated(this.panelsCore[i], keyValues, rec, fireCallback) ||
56599
56795
  res;
56600
56796
  }
56601
56797
  return res;
@@ -56612,7 +56808,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56612
56808
  QuestionPanelDynamicModel.prototype.hasErrors = function (fireCallback, rec) {
56613
56809
  if (fireCallback === void 0) { fireCallback = true; }
56614
56810
  if (rec === void 0) { rec = null; }
56615
- if (this.isValueChangingInternally)
56811
+ if (this.isValueChangingInternally || this.isBuildingPanelsFirstTime)
56616
56812
  return false;
56617
56813
  var res = false;
56618
56814
  if (!!this.changingValueQuestion) {
@@ -56629,7 +56825,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56629
56825
  var res = _super.prototype.getContainsErrors.call(this);
56630
56826
  if (res)
56631
56827
  return res;
56632
- var panels = this.panels;
56828
+ var panels = this.panelsCore;
56633
56829
  for (var i = 0; i < panels.length; i++) {
56634
56830
  if (panels[i].containsErrors)
56635
56831
  return true;
@@ -56639,7 +56835,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56639
56835
  QuestionPanelDynamicModel.prototype.getIsAnswered = function () {
56640
56836
  if (!_super.prototype.getIsAnswered.call(this))
56641
56837
  return false;
56642
- var panels = this.visiblePanels;
56838
+ var panels = this.visiblePanelsCore;
56643
56839
  for (var i = 0; i < panels.length; i++) {
56644
56840
  var visibleQuestions = [];
56645
56841
  panels[i].addQuestionsToList(visibleQuestions, true);
@@ -56665,8 +56861,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56665
56861
  _super.prototype.clearValueIfInvisible.call(this, reason);
56666
56862
  };
56667
56863
  QuestionPanelDynamicModel.prototype.clearValueInPanelsIfInvisible = function (reason) {
56668
- for (var i = 0; i < this.panels.length; i++) {
56669
- var questions = this.panels[i].questions;
56864
+ for (var i = 0; i < this.panelsCore.length; i++) {
56865
+ var questions = this.panelsCore[i].questions;
56670
56866
  this.isSetPanelItemData = {};
56671
56867
  for (var j = 0; j < questions.length; j++) {
56672
56868
  var q = questions[j];
@@ -56679,8 +56875,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56679
56875
  QuestionPanelDynamicModel.prototype.getIsRunningValidators = function () {
56680
56876
  if (_super.prototype.getIsRunningValidators.call(this))
56681
56877
  return true;
56682
- for (var i = 0; i < this.panels.length; i++) {
56683
- var questions = this.panels[i].questions;
56878
+ for (var i = 0; i < this.panelsCore.length; i++) {
56879
+ var questions = this.panelsCore[i].questions;
56684
56880
  for (var j = 0; j < questions.length; j++) {
56685
56881
  if (questions[j].isRunningValidators)
56686
56882
  return true;
@@ -56690,7 +56886,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56690
56886
  };
56691
56887
  QuestionPanelDynamicModel.prototype.getAllErrors = function () {
56692
56888
  var result = _super.prototype.getAllErrors.call(this);
56693
- var panels = this.visiblePanels;
56889
+ var panels = this.visiblePanelsCore;
56694
56890
  for (var i = 0; i < panels.length; i++) {
56695
56891
  var questions = panels[i].questions;
56696
56892
  for (var j = 0; j < questions.length; j++) {
@@ -56706,7 +56902,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56706
56902
  var values = this.getUnbindValue(value);
56707
56903
  if (!values || !Array.isArray(values))
56708
56904
  return values;
56709
- for (var i = 0; i < this.panels.length && i < values.length; i++) {
56905
+ for (var i = 0; i < this.panelsCore.length && i < values.length; i++) {
56710
56906
  var val = values[i];
56711
56907
  if (!val)
56712
56908
  continue;
@@ -56717,7 +56913,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56717
56913
  QuestionPanelDynamicModel.prototype.getPanelDisplayValue = function (panelIndex, val, keysAsText) {
56718
56914
  if (!val)
56719
56915
  return val;
56720
- var panel = this.panels[panelIndex];
56916
+ var panel = this.panelsCore[panelIndex];
56721
56917
  var keys = Object.keys(val);
56722
56918
  for (var i = 0; i < keys.length; i++) {
56723
56919
  var key = keys[i];
@@ -56738,7 +56934,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56738
56934
  };
56739
56935
  QuestionPanelDynamicModel.prototype.hasErrorInPanels = function (fireCallback, rec) {
56740
56936
  var res = false;
56741
- var panels = this.visiblePanels;
56937
+ var panels = this.visiblePanelsCore;
56742
56938
  var keyValues = [];
56743
56939
  for (var i = 0; i < panels.length; i++) {
56744
56940
  this.setOnCompleteAsyncInPanel(panels[i]);
@@ -56871,8 +57067,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56871
57067
  return;
56872
57068
  _super.prototype.setQuestionValue.call(this, newValue, false);
56873
57069
  this.setPanelCountBasedOnValue();
56874
- for (var i = 0; i < this.panels.length; i++) {
56875
- this.panelUpdateValueFromSurvey(this.panels[i]);
57070
+ for (var i = 0; i < this.panelsCore.length; i++) {
57071
+ this.panelUpdateValueFromSurvey(this.panelsCore[i]);
56876
57072
  }
56877
57073
  this.updateIsAnswered();
56878
57074
  };
@@ -56880,8 +57076,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56880
57076
  if (newValue === undefined && this.isAllPanelsEmpty())
56881
57077
  return;
56882
57078
  _super.prototype.onSurveyValueChanged.call(this, newValue);
56883
- for (var i = 0; i < this.panels.length; i++) {
56884
- this.panelSurveyValueChanged(this.panels[i]);
57079
+ for (var i = 0; i < this.panelsCore.length; i++) {
57080
+ this.panelSurveyValueChanged(this.panelsCore[i]);
56885
57081
  }
56886
57082
  if (newValue === undefined) {
56887
57083
  this.setValueBasedOnPanelCount();
@@ -56889,8 +57085,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56889
57085
  this.updateIsReady();
56890
57086
  };
56891
57087
  QuestionPanelDynamicModel.prototype.isAllPanelsEmpty = function () {
56892
- for (var i = 0; i < this.panels.length; i++) {
56893
- if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(this.panels[i].getValue()))
57088
+ for (var i = 0; i < this.panelsCore.length; i++) {
57089
+ if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(this.panelsCore[i].getValue()))
56894
57090
  return false;
56895
57091
  }
56896
57092
  return true;
@@ -56929,7 +57125,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56929
57125
  return res > -1 ? res : this.items.length;
56930
57126
  };
56931
57127
  QuestionPanelDynamicModel.prototype.getVisibleItemIndex = function (item) {
56932
- var visPanels = this.visiblePanels;
57128
+ var visPanels = this.visiblePanelsCore;
56933
57129
  for (var i = 0; i < visPanels.length; i++) {
56934
57130
  if (visPanels[i].data === item)
56935
57131
  return i;
@@ -56977,8 +57173,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56977
57173
  else {
56978
57174
  delete qValue[index][name];
56979
57175
  }
56980
- if (index >= 0 && index < this.panels.length) {
56981
- this.changingValueQuestion = this.panels[index].getQuestionByValueName(name);
57176
+ if (index >= 0 && index < this.panelsCore.length) {
57177
+ this.changingValueQuestion = this.panelsCore[index].getQuestionByValueName(name);
56982
57178
  }
56983
57179
  this.value = qValue;
56984
57180
  this.changingValueQuestion = null;
@@ -57032,8 +57228,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57032
57228
  };
57033
57229
  QuestionPanelDynamicModel.prototype.updateElementCss = function (reNew) {
57034
57230
  _super.prototype.updateElementCss.call(this, reNew);
57035
- for (var i = 0; i < this.panels.length; i++) {
57036
- var el = this.panels[i];
57231
+ for (var i = 0; i < this.panelsCore.length; i++) {
57232
+ var el = this.panelsCore[i];
57037
57233
  el.updateElementCss(reNew);
57038
57234
  }
57039
57235
  };
@@ -57257,7 +57453,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57257
57453
  return;
57258
57454
  if (this.currentIndex < 0 || this.currentIndex >= this.visiblePanelCount)
57259
57455
  return;
57260
- var panel = this.visiblePanels[this.currentIndex];
57456
+ var panel = this.visiblePanelsCore[this.currentIndex];
57261
57457
  this.additionalTitleToolbar.renderedActions.forEach(function (action) {
57262
57458
  var isActive = action.id === panel.id;
57263
57459
  action.pressed = isActive;
@@ -57273,9 +57469,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57273
57469
  if (!this.isRenderModeTab)
57274
57470
  return;
57275
57471
  var items = [];
57276
- var visPanels = this.visiblePanels;
57472
+ var visPanels = this.visiblePanelsCore;
57277
57473
  var _loop_1 = function (i) {
57278
- this_1.visiblePanels.forEach(function (panel) { return items.push(_this.createTabByPanel(visPanels[i], i)); });
57474
+ this_1.visiblePanelsCore.forEach(function (panel) { return items.push(_this.createTabByPanel(visPanels[i], i)); });
57279
57475
  };
57280
57476
  var this_1 = this;
57281
57477
  for (var i = 0; i < visPanels.length; i++) {
@@ -57746,6 +57942,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
57746
57942
  return undefined;
57747
57943
  return 0;
57748
57944
  };
57945
+ QuestionRankingModel.prototype.supportContainerQueries = function () {
57946
+ return this.selectToRankEnabled;
57947
+ };
57749
57948
  Object.defineProperty(QuestionRankingModel.prototype, "rootClass", {
57750
57949
  get: function () {
57751
57950
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
@@ -63260,8 +63459,9 @@ var SurveyQuestionPanelDynamicAddButton = /** @class */ (function (_super) {
63260
63459
  SurveyQuestionPanelDynamicAddButton.prototype.renderElement = function () {
63261
63460
  if (!this.question.canAddPanel)
63262
63461
  return null;
63462
+ var btnText = this.renderLocString(this.question.locPanelAddText);
63263
63463
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { type: "button", className: this.question.getAddButtonCss(), onClick: this.handleClick },
63264
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, this.question.panelAddText)));
63464
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
63265
63465
  };
63266
63466
  return SurveyQuestionPanelDynamicAddButton;
63267
63467
  }(SurveyQuestionPanelDynamicAction));
@@ -63479,8 +63679,9 @@ var SurveyQuestionPanelDynamicRemoveButton = /** @class */ (function (_super) {
63479
63679
  return _this;
63480
63680
  }
63481
63681
  SurveyQuestionPanelDynamicRemoveButton.prototype.renderElement = function () {
63682
+ var btnText = this.renderLocString(this.question.locPanelRemoveText);
63482
63683
  return (react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: this.question.getPanelRemoveButtonCss(), onClick: this.handleClick, type: "button" },
63483
- react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonRemoveText }, this.question.panelRemoveText),
63684
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonRemoveText }, btnText),
63484
63685
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.iconRemove })));
63485
63686
  };
63486
63687
  return SurveyQuestionPanelDynamicRemoveButton;
@@ -66116,10 +66317,9 @@ __webpack_require__.r(__webpack_exports__);
66116
66317
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
66117
66318
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
66118
66319
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
66119
- /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
66120
- /* harmony import */ var _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactquestion_element */ "./src/react/reactquestion_element.tsx");
66121
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
66122
- /* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
66320
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
66321
+ /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
66322
+ /* 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");
66123
66323
  var __extends = (undefined && undefined.__extends) || (function () {
66124
66324
  var extendStatics = function (d, b) {
66125
66325
  extendStatics = Object.setPrototypeOf ||
@@ -66139,7 +66339,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
66139
66339
 
66140
66340
 
66141
66341
 
66142
-
66143
66342
  var PopupSurvey = /** @class */ (function (_super) {
66144
66343
  __extends(PopupSurvey, _super);
66145
66344
  function PopupSurvey(props) {
@@ -66157,46 +66356,65 @@ var PopupSurvey = /** @class */ (function (_super) {
66157
66356
  return _super.prototype.canRender.call(this) && this.popup.isShowing;
66158
66357
  };
66159
66358
  PopupSurvey.prototype.renderElement = function () {
66359
+ var _this = this;
66160
66360
  var header = this.renderWindowHeader();
66161
- var body = this.popup.isExpanded ? this.renderBody() : null;
66162
- var style = {
66163
- position: "fixed",
66164
- bottom: 3,
66165
- right: 10
66166
- };
66361
+ var body = this.renderBody();
66362
+ var style = {};
66167
66363
  if (!!this.popup.renderedWidth) {
66168
66364
  style.width = this.popup.renderedWidth;
66169
66365
  style.maxWidth = this.popup.renderedWidth;
66170
66366
  }
66171
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style },
66172
- header,
66173
- body));
66367
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style, onScroll: function () { return _this.popup.onScroll(); } },
66368
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRootContent },
66369
+ header,
66370
+ body)));
66174
66371
  };
66175
66372
  PopupSurvey.prototype.renderWindowHeader = function () {
66176
- var _this = this;
66177
- var styleA = { width: "100%", cursor: "pointer" };
66178
- var styleTitle = { paddingRight: "10px" };
66179
- var glyphClassName = this.popup.cssButton;
66180
- glyphClassName = "glyphicon pull-right " + glyphClassName;
66181
- var title = _reactquestion_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElementBase"].renderLocString(this.survey.locTitle);
66182
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssHeaderRoot },
66183
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { onClick: this.handleOnExpanded, style: styleA },
66184
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.popup.cssHeaderTitle, style: styleTitle }, title),
66185
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: glyphClassName, "aria-hidden": "true" })),
66186
- this.popup.allowClose ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.popup.cssHeaderButton, onClick: function () { _this.popup.hide(); }, style: { transform: "rotate(45deg)", float: "right", cursor: "pointer", width: "24px", height: "24px" } },
66187
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-expanddetail", size: 16 }))) : null,
66188
- this.popup.isExpanded ? (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.popup.cssHeaderButton, onClick: this.handleOnExpanded, style: { float: "right", cursor: "pointer", width: "24px", height: "24px" } },
66189
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_4__["SvgIcon"], { iconName: "icon-collapsedetail", size: 16 }))) : null));
66373
+ var popup = this.popup;
66374
+ var headerCss = popup.cssHeaderRoot;
66375
+ var titleCollapsed = null;
66376
+ var expandCollapseIcon;
66377
+ var closeButton = null;
66378
+ if (popup.isCollapsed) {
66379
+ headerCss += " " + popup.cssRootCollapsedMod;
66380
+ titleCollapsed = this.renderTitleCollapsed(popup);
66381
+ expandCollapseIcon = this.renderExpandIcon();
66382
+ }
66383
+ else {
66384
+ expandCollapseIcon = this.renderCollapseIcon();
66385
+ }
66386
+ if (popup.allowClose) {
66387
+ closeButton = this.renderCloseButton(this.popup);
66388
+ }
66389
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderRoot },
66390
+ titleCollapsed,
66391
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderButtonsContainer },
66392
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCollapseButton, onClick: this.handleOnExpanded }, expandCollapseIcon),
66393
+ closeButton)));
66394
+ };
66395
+ PopupSurvey.prototype.renderTitleCollapsed = function (popup) {
66396
+ if (!popup.locTitle)
66397
+ return null;
66398
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderTitleCollapsed }, popup.locTitle.renderedHtml);
66399
+ };
66400
+ PopupSurvey.prototype.renderExpandIcon = function () {
66401
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-restore_16x16", size: 16 });
66402
+ };
66403
+ PopupSurvey.prototype.renderCollapseIcon = function () {
66404
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-minimize_16x16", size: 16 });
66405
+ };
66406
+ PopupSurvey.prototype.renderCloseButton = function (popup) {
66407
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () { popup.hide(); } },
66408
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-close_16x16", size: 16 })));
66190
66409
  };
66191
66410
  PopupSurvey.prototype.renderBody = function () {
66192
- var _this = this;
66193
- return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody, onScroll: function () { return _this.popup.onScroll(); } }, this.doRender());
66411
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody }, this.doRender());
66194
66412
  };
66195
66413
  PopupSurvey.prototype.createSurvey = function (newProps) {
66196
66414
  if (!newProps)
66197
66415
  newProps = {};
66198
66416
  _super.prototype.createSurvey.call(this, newProps);
66199
- this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_3__["PopupSurveyModel"](null, this.survey);
66417
+ this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"](null, this.survey);
66200
66418
  if (newProps.closeOnCompleteTimeout) {
66201
66419
  this.popup.closeOnCompleteTimeout = newProps.closeOnCompleteTimeout;
66202
66420
  }
@@ -66206,7 +66424,7 @@ var PopupSurvey = /** @class */ (function (_super) {
66206
66424
  this.popup.expand();
66207
66425
  };
66208
66426
  return PopupSurvey;
66209
- }(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["Survey"]));
66427
+ }(_reactSurvey__WEBPACK_IMPORTED_MODULE_2__["Survey"]));
66210
66428
 
66211
66429
  /**
66212
66430
  * Obsolete. Please use PopupSurvey
@@ -66856,12 +67074,11 @@ __webpack_require__.r(__webpack_exports__);
66856
67074
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return SurveyProgressToc; });
66857
67075
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
66858
67076
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
66859
- /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
66860
- /* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
66861
- /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
66862
- /* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
66863
- /* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
66864
- /* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
67077
+ /* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
67078
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
67079
+ /* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
67080
+ /* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
67081
+ /* harmony import */ var _components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/svg-icon/svg-icon */ "./src/react/components/svg-icon/svg-icon.tsx");
66865
67082
  var __extends = (undefined && undefined.__extends) || (function () {
66866
67083
  var extendStatics = function (d, b) {
66867
67084
  extendStatics = Object.setPrototypeOf ||
@@ -66883,29 +67100,28 @@ var __extends = (undefined && undefined.__extends) || (function () {
66883
67100
 
66884
67101
 
66885
67102
 
66886
-
66887
67103
  var SurveyProgressToc = /** @class */ (function (_super) {
66888
67104
  __extends(SurveyProgressToc, _super);
66889
67105
  function SurveyProgressToc() {
66890
67106
  return _super !== null && _super.apply(this, arguments) || this;
66891
67107
  }
66892
67108
  SurveyProgressToc.prototype.render = function () {
66893
- var tocModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["TOCModel"](this.props.model);
67109
+ var tocModel = this.props.model;
66894
67110
  var content;
66895
67111
  if (tocModel.isMobile) {
66896
67112
  content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { onClick: tocModel.togglePopup },
66897
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_6__["SvgIcon"], { iconName: tocModel.icon, size: 24 }),
66898
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_5__["Popup"], { model: tocModel.popupModel }));
67113
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__["SvgIcon"], { iconName: tocModel.icon, size: 24 }),
67114
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_4__["Popup"], { model: tocModel.popupModel }));
66899
67115
  }
66900
67116
  else {
66901
- content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_4__["List"], { model: tocModel.listModel });
67117
+ content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_3__["List"], { model: tocModel.listModel });
66902
67118
  }
66903
67119
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: tocModel.containerCss }, content));
66904
67120
  };
66905
67121
  return SurveyProgressToc;
66906
- }(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__["SurveyNavigationBase"]));
67122
+ }(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__["SurveyNavigationBase"]));
66907
67123
 
66908
- _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-toc", function (props) {
67124
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-navigation-toc", function (props) {
66909
67125
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressToc, props);
66910
67126
  });
66911
67127
 
@@ -68816,7 +69032,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
68816
69032
  for (var i = 0; i < visibleRows.length; i++) {
68817
69033
  var row = visibleRows[i];
68818
69034
  var key = "row-" + row.name + "-" + i;
68819
- rows.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, isDisplayMode: this.isDisplayMode, row: row, isFirst: i == 0 }));
69035
+ rows.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
68820
69036
  }
68821
69037
  var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("thead", null,
68822
69038
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null,
@@ -68837,6 +69053,11 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68837
69053
  function SurveyQuestionMatrixRow(props) {
68838
69054
  return _super.call(this, props) || this;
68839
69055
  }
69056
+ SurveyQuestionMatrixRow.prototype.getStateElement = function () {
69057
+ if (!!this.row)
69058
+ return this.row.item;
69059
+ return _super.prototype.getStateElement.call(this);
69060
+ };
68840
69061
  Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
68841
69062
  get: function () {
68842
69063
  return this.props.question;
@@ -68874,7 +69095,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68874
69095
  style.minWidth = this.question.rowTitleWidth;
68875
69096
  style.width = this.question.rowTitleWidth;
68876
69097
  }
68877
- rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.question.cssClasses.rowTextCell }, this.wrapCell({ row: this.row }, rowText, "row-header"));
69098
+ rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.row.rowTextClasses }, this.wrapCell({ row: this.row }, rowText, "row-header"));
68878
69099
  }
68879
69100
  var tds = this.generateTds();
68880
69101
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", { className: this.row.rowClasses || undefined },
@@ -68892,9 +69113,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68892
69113
  var key = "value" + i;
68893
69114
  var itemClass = this_1.question.getItemClass(row, column);
68894
69115
  if (this_1.question.hasCellText) {
68895
- var getHandler = !this_1.question.isInputReadOnly
68896
- ? function (column) { return function () { return _this.cellClick(row, column); }; }
68897
- : null;
69116
+ var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
68898
69117
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, className: itemClass, onClick: getHandler ? getHandler(column) : function () { } }, this_1.renderLocString(this_1.question.getCellDisplayLocText(row.name, column))));
68899
69118
  }
68900
69119
  else {
@@ -68904,7 +69123,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68904
69123
  column: column,
68905
69124
  columnIndex: i,
68906
69125
  cssClasses: this_1.cssClasses,
68907
- isDisplayMode: this_1.isDisplayMode,
68908
69126
  cellChanged: function () { _this.cellClick(_this.row, column); }
68909
69127
  });
68910
69128
  td = (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { key: key, "data-responsive-title": column.locText.renderedHtml, className: this_1.question.cssClasses.cell }, renderedCell));
@@ -68987,7 +69205,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
68987
69205
  mobileSpan));
68988
69206
  };
68989
69207
  SurveyQuestionMatrixCell.prototype.renderInput = function (inputId, isChecked) {
68990
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.isDisplayMode, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
69208
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { id: inputId, type: "radio", className: this.cssClasses.itemValue, name: this.row.fullName, value: this.column.value, disabled: this.row.isReadOnly, checked: isChecked, onChange: this.handleOnChange, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.getCellAriaLabel(this.row.locText.renderedHtml, this.column.locText.renderedHtml), "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }));
68991
69209
  };
68992
69210
  return SurveyQuestionMatrixCell;
68993
69211
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -73420,7 +73638,13 @@ var SurveyElement = /** @class */ (function (_super) {
73420
73638
  });
73421
73639
  SurveyElement.prototype.updateCustomWidgets = function () { };
73422
73640
  SurveyElement.prototype.onSurveyLoad = function () { };
73641
+ Object.defineProperty(SurveyElement.prototype, "wasRendered", {
73642
+ get: function () { return !!this.wasRenderedValue; },
73643
+ enumerable: false,
73644
+ configurable: true
73645
+ });
73423
73646
  SurveyElement.prototype.onFirstRendering = function () {
73647
+ this.wasRenderedValue = true;
73424
73648
  this.ensureCssClassesValue();
73425
73649
  };
73426
73650
  SurveyElement.prototype.endLoadingFromJson = function () {
@@ -73900,7 +74124,7 @@ var SurveyError = /** @class */ (function () {
73900
74124
  this.visible = true;
73901
74125
  this.onUpdateErrorTextCallback = undefined;
73902
74126
  }
73903
- SurveyError.prototype.equalsTo = function (error) {
74127
+ SurveyError.prototype.equals = function (error) {
73904
74128
  if (!error || !error.getErrorType)
73905
74129
  return false;
73906
74130
  if (this.getErrorType() !== error.getErrorType())
@@ -74000,6 +74224,7 @@ __webpack_require__.r(__webpack_exports__);
74000
74224
  /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./header */ "./src/header.ts");
74001
74225
  /* harmony import */ var _surveytimer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./surveytimer */ "./src/surveytimer.ts");
74002
74226
  /* harmony import */ var _surveyTaskManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./surveyTaskManager */ "./src/surveyTaskManager.ts");
74227
+ /* harmony import */ var _surveyToc__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./surveyToc */ "./src/surveyToc.ts");
74003
74228
  var __extends = (undefined && undefined.__extends) || (function () {
74004
74229
  var extendStatics = function (d, b) {
74005
74230
  extendStatics = Object.setPrototypeOf ||
@@ -74042,6 +74267,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
74042
74267
 
74043
74268
 
74044
74269
 
74270
+
74045
74271
 
74046
74272
 
74047
74273
  /**
@@ -74915,8 +75141,8 @@ var SurveyModel = /** @class */ (function (_super) {
74915
75141
  });
74916
75142
  _this.addLayoutElement({
74917
75143
  id: "toc-navigation",
74918
- component: "sv-progress-toc",
74919
- data: _this
75144
+ component: "sv-navigation-toc",
75145
+ data: new _surveyToc__WEBPACK_IMPORTED_MODULE_23__["TOCModel"](_this)
74920
75146
  });
74921
75147
  _this.layoutElements.push({
74922
75148
  id: "navigationbuttons",
@@ -75961,6 +76187,8 @@ var SurveyModel = /** @class */ (function (_super) {
75961
76187
  return this.locale;
75962
76188
  };
75963
76189
  SurveyModel.prototype.locStrsChanged = function () {
76190
+ if (this.isClearingUnsedValues)
76191
+ return;
75964
76192
  _super.prototype.locStrsChanged.call(this);
75965
76193
  if (!this.currentPage)
75966
76194
  return;
@@ -77515,11 +77743,11 @@ var SurveyModel = /** @class */ (function (_super) {
77515
77743
  if (this.isDesignMode)
77516
77744
  return false;
77517
77745
  var index = this.visiblePages.indexOf(page);
77518
- if (index < 0)
77746
+ if (index < 0 || index >= this.visiblePageCount)
77519
77747
  return false;
77520
77748
  if (index === this.currentPageNo)
77521
77749
  return false;
77522
- if (index < this.currentPageNo) {
77750
+ if (index < this.currentPageNo || this.isValidateOnComplete) {
77523
77751
  this.currentPageNo = index;
77524
77752
  return true;
77525
77753
  }
@@ -80733,11 +80961,13 @@ var SurveyModel = /** @class */ (function (_super) {
80733
80961
  return name.substring(0, pos);
80734
80962
  };
80735
80963
  SurveyModel.prototype.clearUnusedValues = function () {
80964
+ this.isClearingUnsedValues = true;
80736
80965
  var questions = this.getAllQuestions();
80737
80966
  for (var i = 0; i < questions.length; i++) {
80738
80967
  questions[i].clearUnusedValues();
80739
80968
  }
80740
80969
  this.clearInvisibleQuestionValues();
80970
+ this.isClearingUnsedValues = false;
80741
80971
  };
80742
80972
  SurveyModel.prototype.hasVisibleQuestionByValueName = function (valueName) {
80743
80973
  var questions = this.getQuestionsByValueName(valueName);
@@ -81924,8 +82154,12 @@ var SurveyModel = /** @class */ (function (_super) {
81924
82154
  this.layoutElements.push(layoutElement);
81925
82155
  return existingLayoutElement;
81926
82156
  };
81927
- SurveyModel.prototype.removeLayoutElement = function (layoutElementId) {
82157
+ SurveyModel.prototype.findLayoutElement = function (layoutElementId) {
81928
82158
  var layoutElement = this.layoutElements.filter(function (a) { return a.id === layoutElementId; })[0];
82159
+ return layoutElement;
82160
+ };
82161
+ SurveyModel.prototype.removeLayoutElement = function (layoutElementId) {
82162
+ var layoutElement = this.findLayoutElement(layoutElementId);
81929
82163
  if (!!layoutElement) {
81930
82164
  var layoutElementIndex = this.layoutElements.indexOf(layoutElement);
81931
82165
  this.layoutElements.splice(layoutElementIndex, 1);
@@ -81949,7 +82183,7 @@ var SurveyModel = /** @class */ (function (_super) {
81949
82183
  }
81950
82184
  }
81951
82185
  else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
81952
- var headerLayoutElement = this.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
82186
+ var headerLayoutElement = this.findLayoutElement("advanced-header");
81953
82187
  var advHeader = headerLayoutElement && headerLayoutElement.data;
81954
82188
  var isBelowHeader = !advHeader || advHeader.hasBackground;
81955
82189
  if (container === "header" && !isBelowHeader) {
@@ -82051,6 +82285,14 @@ var SurveyModel = /** @class */ (function (_super) {
82051
82285
  this.removeScrollEventListener();
82052
82286
  this.destroyResizeObserver();
82053
82287
  this.rootElement = undefined;
82288
+ if (this.layoutElements) {
82289
+ for (var i = 0; i < this.layoutElements.length; i++) {
82290
+ if (!!this.layoutElements[i].data && this.layoutElements[i].data !== this && this.layoutElements[i].data.dispose) {
82291
+ this.layoutElements[i].data.dispose();
82292
+ }
82293
+ }
82294
+ this.layoutElements.splice(0, this.layoutElements.length);
82295
+ }
82054
82296
  _super.prototype.dispose.call(this);
82055
82297
  this.editingObj = null;
82056
82298
  if (!this.pages)
@@ -82116,7 +82358,7 @@ var SurveyModel = /** @class */ (function (_super) {
82116
82358
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
82117
82359
  onSet: function (newValue, target) {
82118
82360
  if (newValue === "advanced") {
82119
- var layoutElement = target.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
82361
+ var layoutElement = target.findLayoutElement("advanced-header");
82120
82362
  if (!layoutElement) {
82121
82363
  var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
82122
82364
  advHeader.logoPositionX = target.logoPosition === "right" ? "right" : "left";
@@ -82352,7 +82594,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
82352
82594
  {
82353
82595
  name: "checkErrorsMode",
82354
82596
  default: "onNextPage",
82355
- choices: ["onNextPage", "onValueChanged", "onValueChanging", "onComplete"],
82597
+ choices: ["onNextPage", "onValueChanged", "onComplete"],
82356
82598
  },
82357
82599
  {
82358
82600
  name: "textUpdateMode",
@@ -82972,12 +83214,12 @@ function createTOCListModel(survey, onAction) {
82972
83214
  if (!!item.action()) {
82973
83215
  listModel.selectedItem = item;
82974
83216
  }
82975
- }, true, items.filter(function (i) { return i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0]);
83217
+ }, true, items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0]);
82976
83218
  listModel.allowSelection = false;
82977
83219
  listModel.locOwner = survey;
82978
83220
  listModel.searchEnabled = false;
82979
83221
  survey.onCurrentPageChanged.add(function (s, o) {
82980
- listModel.selectedItem = items.filter(function (i) { return i.id === survey.currentPage.name; })[0];
83222
+ listModel.selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
82981
83223
  });
82982
83224
  return listModel;
82983
83225
  }
@@ -85012,7 +85254,7 @@ function scrollElementByChildId(id) {
85012
85254
  return;
85013
85255
  var scrollableEl = findScrollableParent(el);
85014
85256
  if (!!scrollableEl) {
85015
- scrollableEl.dispatchEvent(new CustomEvent("scroll"));
85257
+ setTimeout(function () { return scrollableEl.dispatchEvent(new CustomEvent("scroll")); }, 10);
85016
85258
  }
85017
85259
  }
85018
85260
  function navigateToUrl(url) {