survey-react 1.9.125 → 1.9.127

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.127
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();
@@ -2027,8 +2041,8 @@ var Base = /** @class */ (function () {
2027
2041
  * Returns a JSON object that corresponds to the current SurveyJS object.
2028
2042
  * @see fromJSON
2029
2043
  */
2030
- Base.prototype.toJSON = function () {
2031
- return new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toJsonObject(this);
2044
+ Base.prototype.toJSON = function (options) {
2045
+ return new _jsonobject__WEBPACK_IMPORTED_MODULE_2__["JsonObject"]().toJsonObject(this, options);
2032
2046
  };
2033
2047
  /**
2034
2048
  * Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
@@ -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",
@@ -5649,6 +5674,7 @@ var defaultV2Css = {
5649
5674
  small: "sd-row__question--small",
5650
5675
  controlDisabled: "sd-input--disabled",
5651
5676
  constrolWithCharacterCounter: "sd-text__character-counter",
5677
+ characterCounterBig: "sd-text__character-counter--big",
5652
5678
  content: "sd-text__content sd-question__content",
5653
5679
  remainingCharacterCounter: "sd-remaining-character-counter",
5654
5680
  onError: "sd-input--error"
@@ -5737,6 +5763,7 @@ var defaultV2Css = {
5737
5763
  rowError: "sd-matrix__row--error",
5738
5764
  cell: "sd-table__cell sd-matrix__cell",
5739
5765
  row: "sd-table__row",
5766
+ rowDisabled: "sd-table__row-disabled",
5740
5767
  headerCell: "sd-table__cell sd-table__cell--header",
5741
5768
  rowTextCell: "sd-table__cell sd-matrix__cell sd-table__cell--row-text",
5742
5769
  label: "sd-item sd-radio sd-matrix__label",
@@ -5975,13 +6002,18 @@ var defaultV2Css = {
5975
6002
  },
5976
6003
  window: {
5977
6004
  root: "sv_window",
6005
+ rootCollapsedMod: "sv_window--collapsed",
6006
+ rootContent: "sv_window_root-content",
5978
6007
  body: "sv_window_content",
5979
6008
  header: {
5980
- root: "sv_window_title",
5981
- title: "",
6009
+ root: "sv_window_header",
6010
+ titleCollapsed: "sv_window_header_title_collapsed",
6011
+ buttonsContainer: "sv_window_buttons_container",
5982
6012
  button: "sv_window_button",
5983
6013
  buttonExpanded: "",
5984
- buttonCollapsed: ""
6014
+ buttonCollapsed: "",
6015
+ collapseButton: "sv_window_button sv_window_button_collapse",
6016
+ closeButton: "sv_window_button sv_window_button_close"
5985
6017
  }
5986
6018
  },
5987
6019
  ranking: {
@@ -7734,17 +7766,20 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7734
7766
  var rankingChoices = questionModel.rankingChoices;
7735
7767
  var unRankingChoices = questionModel.unRankingChoices;
7736
7768
  var item = unRankingChoices[fromIndex];
7769
+ questionModel.isValueSetByUser = true;
7737
7770
  rankingChoices.splice(toIndex, 0, item);
7738
7771
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
7739
7772
  };
7740
7773
  DragDropRankingSelectToRank.prototype.unselectFromRank = function (questionModel, fromIndex, toIndex) {
7741
7774
  var rankingChoices = questionModel.rankingChoices;
7775
+ questionModel.isValueSetByUser = true;
7742
7776
  rankingChoices.splice(fromIndex, 1);
7743
7777
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
7744
7778
  };
7745
7779
  DragDropRankingSelectToRank.prototype.reorderRankedItem = function (questionModel, fromIndex, toIndex) {
7746
7780
  var rankingChoices = questionModel.rankingChoices;
7747
7781
  var item = rankingChoices[fromIndex];
7782
+ questionModel.isValueSetByUser = true;
7748
7783
  rankingChoices.splice(fromIndex, 1);
7749
7784
  rankingChoices.splice(toIndex, 0, item);
7750
7785
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
@@ -9448,8 +9483,8 @@ __webpack_require__.r(__webpack_exports__);
9448
9483
  //import "../../modern.scss";
9449
9484
  var Version;
9450
9485
  var ReleaseDate;
9451
- Version = "" + "1.9.125";
9452
- ReleaseDate = "" + "2024-01-11";
9486
+ Version = "" + "1.9.127";
9487
+ ReleaseDate = "" + "2024-01-23";
9453
9488
  function checkLibraryVersion(ver, libraryName) {
9454
9489
  if (Version != ver) {
9455
9490
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16972,21 +17007,11 @@ var Helpers = /** @class */ (function () {
16972
17007
  return x == y;
16973
17008
  if (!Helpers.isValueObject(x) || !Helpers.isValueObject(y))
16974
17009
  return false;
16975
- if (x["equals"])
17010
+ if (x["equals"] && y["equals"])
16976
17011
  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))
17012
+ if (Array.isArray(x) && Array.isArray(y)) {
16987
17013
  return Helpers.isArraysEqual(x, y, ignoreOrder, caseSensitive, trimStrings);
16988
- if (!!x.equalsTo && y.equalsTo)
16989
- return x.equalsTo(y);
17014
+ }
16990
17015
  for (var p in x) {
16991
17016
  if (!x.hasOwnProperty(p))
16992
17017
  continue;
@@ -17262,6 +17287,27 @@ var Helpers = /** @class */ (function () {
17262
17287
  }
17263
17288
  return val;
17264
17289
  };
17290
+ Helpers.compareVerions = function (ver1, ver2) {
17291
+ if (!ver1 && !ver2)
17292
+ return 0;
17293
+ var ver1Ar = ver1.split(".");
17294
+ var ver2Ar = ver2.split(".");
17295
+ var len1 = ver1Ar.length;
17296
+ var len2 = ver2Ar.length;
17297
+ for (var i = 0; i < len1 && i < len2; i++) {
17298
+ var str1 = ver1Ar[i];
17299
+ var str2 = ver2Ar[i];
17300
+ if (str1.length === str2.length) {
17301
+ if (str1 !== str2) {
17302
+ return str1 < str2 ? -1 : 1;
17303
+ }
17304
+ }
17305
+ else {
17306
+ return str1.length < str2.length ? -1 : 1;
17307
+ }
17308
+ }
17309
+ return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
17310
+ };
17265
17311
  return Helpers;
17266
17312
  }());
17267
17313
 
@@ -17318,10 +17364,12 @@ var map = {
17318
17364
  "./V2DragElement_16x16.svg": "./src/images/V2DragElement_16x16.svg",
17319
17365
  "./chevron.svg": "./src/images/chevron.svg",
17320
17366
  "./clear_16x16.svg": "./src/images/clear_16x16.svg",
17367
+ "./close_16x16.svg": "./src/images/close_16x16.svg",
17321
17368
  "./collapseDetail.svg": "./src/images/collapseDetail.svg",
17322
17369
  "./drag-n-drop.svg": "./src/images/drag-n-drop.svg",
17323
17370
  "./expandDetail.svg": "./src/images/expandDetail.svg",
17324
17371
  "./loading.svg": "./src/images/loading.svg",
17372
+ "./minimize_16x16.svg": "./src/images/minimize_16x16.svg",
17325
17373
  "./no-image.svg": "./src/images/no-image.svg",
17326
17374
  "./ranking-arrows.svg": "./src/images/ranking-arrows.svg",
17327
17375
  "./ranking-dash.svg": "./src/images/ranking-dash.svg",
@@ -17329,6 +17377,7 @@ var map = {
17329
17377
  "./rating-star-small-2.svg": "./src/images/rating-star-small-2.svg",
17330
17378
  "./rating-star-small.svg": "./src/images/rating-star-small.svg",
17331
17379
  "./rating-star.svg": "./src/images/rating-star.svg",
17380
+ "./restore_16x16.svg": "./src/images/restore_16x16.svg",
17332
17381
  "./search.svg": "./src/images/search.svg"
17333
17382
  };
17334
17383
 
@@ -17717,6 +17766,17 @@ module.exports = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\
17717
17766
 
17718
17767
  /***/ }),
17719
17768
 
17769
+ /***/ "./src/images/close_16x16.svg":
17770
+ /*!************************************!*\
17771
+ !*** ./src/images/close_16x16.svg ***!
17772
+ \************************************/
17773
+ /*! no static exports found */
17774
+ /***/ (function(module, exports) {
17775
+
17776
+ 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>"
17777
+
17778
+ /***/ }),
17779
+
17720
17780
  /***/ "./src/images/collapseDetail.svg":
17721
17781
  /*!***************************************!*\
17722
17782
  !*** ./src/images/collapseDetail.svg ***!
@@ -17761,6 +17821,17 @@ module.exports = "<svg viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3
17761
17821
 
17762
17822
  /***/ }),
17763
17823
 
17824
+ /***/ "./src/images/minimize_16x16.svg":
17825
+ /*!***************************************!*\
17826
+ !*** ./src/images/minimize_16x16.svg ***!
17827
+ \***************************************/
17828
+ /*! no static exports found */
17829
+ /***/ (function(module, exports) {
17830
+
17831
+ 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>"
17832
+
17833
+ /***/ }),
17834
+
17764
17835
  /***/ "./src/images/no-image.svg":
17765
17836
  /*!*********************************!*\
17766
17837
  !*** ./src/images/no-image.svg ***!
@@ -17838,6 +17909,17 @@ module.exports = "<svg viewBox=\"0 0 48 48\" xmlns=\"http://www.w3.org/2000/svg\
17838
17909
 
17839
17910
  /***/ }),
17840
17911
 
17912
+ /***/ "./src/images/restore_16x16.svg":
17913
+ /*!**************************************!*\
17914
+ !*** ./src/images/restore_16x16.svg ***!
17915
+ \**************************************/
17916
+ /*! no static exports found */
17917
+ /***/ (function(module, exports) {
17918
+
17919
+ 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>"
17920
+
17921
+ /***/ }),
17922
+
17841
17923
  /***/ "./src/images/search.svg":
17842
17924
  /*!*******************************!*\
17843
17925
  !*** ./src/images/search.svg ***!
@@ -19000,6 +19082,21 @@ var JsonObjectProperty = /** @class */ (function () {
19000
19082
  enumerable: false,
19001
19083
  configurable: true
19002
19084
  });
19085
+ JsonObjectProperty.prototype.isAvailableInVersion = function (ver) {
19086
+ if (!!this.alternativeName)
19087
+ return true;
19088
+ return this.isAvailableInVersionCore(ver);
19089
+ };
19090
+ JsonObjectProperty.prototype.getSerializedName = function (ver) {
19091
+ if (!this.alternativeName)
19092
+ return this.name;
19093
+ return this.isAvailableInVersionCore(ver) ? this.name : this.alternativeName;
19094
+ };
19095
+ JsonObjectProperty.prototype.isAvailableInVersionCore = function (ver) {
19096
+ if (!ver || !this.version)
19097
+ return true;
19098
+ return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].compareVerions(this.version, ver) <= 0;
19099
+ };
19003
19100
  Object.defineProperty(JsonObjectProperty.prototype, "isLocalizable", {
19004
19101
  get: function () {
19005
19102
  return this.isLocalizableValue != null ? this.isLocalizableValue : false;
@@ -19080,6 +19177,7 @@ var JsonObjectProperty = /** @class */ (function () {
19080
19177
  "className",
19081
19178
  "alternativeName",
19082
19179
  "layout",
19180
+ "version",
19083
19181
  "classNamePart",
19084
19182
  "baseClassName",
19085
19183
  "defaultValue",
@@ -19528,6 +19626,9 @@ var JsonMetadataClass = /** @class */ (function () {
19528
19626
  if (propInfo.layout) {
19529
19627
  prop.layout = propInfo.layout;
19530
19628
  }
19629
+ if (propInfo.version) {
19630
+ prop.version = propInfo.version;
19631
+ }
19531
19632
  if (propInfo.dependsOn) {
19532
19633
  this.addDependsOnProperties(prop, propInfo.dependsOn);
19533
19634
  }
@@ -19672,36 +19773,54 @@ var JsonMetadata = /** @class */ (function () {
19672
19773
  JsonMetadata.prototype.getPropertiesByObj = function (obj) {
19673
19774
  if (!obj || !obj.getType)
19674
19775
  return [];
19675
- var res = {};
19676
19776
  var props = this.getProperties(obj.getType());
19677
- for (var i = 0; i < props.length; i++) {
19678
- res[props[i].name] = props[i];
19679
- }
19680
- var dynamicProps = !!obj.getDynamicType
19681
- ? this.getProperties(obj.getDynamicType())
19682
- : null;
19683
- if (dynamicProps && dynamicProps.length > 0) {
19684
- for (var i = 0; i < dynamicProps.length; i++) {
19685
- var dProp = dynamicProps[i];
19686
- if (!!res[dProp.name])
19687
- continue;
19688
- res[dProp.name] = dProp;
19777
+ var dynamicProps = this.getDynamicPropertiesByObj(obj);
19778
+ return [].concat(props).concat(dynamicProps);
19779
+ };
19780
+ JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
19781
+ var _this = this;
19782
+ props.forEach(function (prop) {
19783
+ _this.addDynamicPropertyIntoObj(dest, src, prop.name, false);
19784
+ if (prop.serializationProperty) {
19785
+ _this.addDynamicPropertyIntoObj(dest, src, prop.serializationProperty, true);
19786
+ }
19787
+ if (prop.alternativeName) {
19788
+ _this.addDynamicPropertyIntoObj(dest, src, prop.alternativeName, false);
19689
19789
  }
19790
+ });
19791
+ };
19792
+ JsonMetadata.prototype.addDynamicPropertyIntoObj = function (dest, src, propName, isReadOnly) {
19793
+ var desc = {
19794
+ configurable: true,
19795
+ get: function () {
19796
+ return src[propName];
19797
+ },
19798
+ };
19799
+ if (!isReadOnly) {
19800
+ desc["set"] = function (v) {
19801
+ src[propName] = v;
19802
+ };
19690
19803
  }
19691
- return Object.keys(res).map(function (key) { return res[key]; });
19804
+ Object.defineProperty(dest, propName, desc);
19692
19805
  };
19693
19806
  JsonMetadata.prototype.getDynamicPropertiesByObj = function (obj, dynamicType) {
19694
19807
  if (dynamicType === void 0) { dynamicType = null; }
19695
- if (!obj || !obj.getType || (!obj.getDynamicType && !dynamicType))
19808
+ if (!obj || !obj.getType)
19809
+ return [];
19810
+ if (!!obj.getDynamicProperties)
19811
+ return obj.getDynamicProperties();
19812
+ if (!obj.getDynamicType && !dynamicType)
19696
19813
  return [];
19697
- var objType = obj.getType();
19698
19814
  var dType = !!dynamicType ? dynamicType : obj.getDynamicType();
19699
- if (!dType)
19815
+ return this.getDynamicPropertiesByTypes(obj.getType(), dType);
19816
+ };
19817
+ JsonMetadata.prototype.getDynamicPropertiesByTypes = function (objType, dynamicType, invalidNames) {
19818
+ if (!dynamicType)
19700
19819
  return [];
19701
- var cacheType = dType + "-" + objType;
19820
+ var cacheType = dynamicType + "-" + objType;
19702
19821
  if (this.dynamicPropsCache[cacheType])
19703
19822
  return this.dynamicPropsCache[cacheType];
19704
- var dynamicProps = this.getProperties(dType);
19823
+ var dynamicProps = this.getProperties(dynamicType);
19705
19824
  if (!dynamicProps || dynamicProps.length == 0)
19706
19825
  return [];
19707
19826
  var hash = {};
@@ -19710,9 +19829,11 @@ var JsonMetadata = /** @class */ (function () {
19710
19829
  hash[props[i].name] = props[i];
19711
19830
  }
19712
19831
  var res = [];
19713
- for (var i = 0; i < dynamicProps.length; i++) {
19714
- var dProp = dynamicProps[i];
19715
- if (!hash[dProp.name]) {
19832
+ if (!invalidNames)
19833
+ invalidNames = [];
19834
+ for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
19835
+ var dProp = dynamicProps[i_1];
19836
+ if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
19716
19837
  res.push(dProp);
19717
19838
  }
19718
19839
  }
@@ -20207,9 +20328,8 @@ var JsonObject = /** @class */ (function () {
20207
20328
  enumerable: false,
20208
20329
  configurable: true
20209
20330
  });
20210
- JsonObject.prototype.toJsonObject = function (obj, storeDefaults) {
20211
- if (storeDefaults === void 0) { storeDefaults = false; }
20212
- return this.toJsonObjectCore(obj, null, storeDefaults);
20331
+ JsonObject.prototype.toJsonObject = function (obj, options) {
20332
+ return this.toJsonObjectCore(obj, null, options);
20213
20333
  };
20214
20334
  JsonObject.prototype.toObject = function (jsonObj, obj, options) {
20215
20335
  this.toObjectCore(jsonObj, obj, options);
@@ -20258,8 +20378,7 @@ var JsonObject = /** @class */ (function () {
20258
20378
  obj.endLoadingFromJson();
20259
20379
  }
20260
20380
  };
20261
- JsonObject.prototype.toJsonObjectCore = function (obj, property, storeDefaults) {
20262
- if (storeDefaults === void 0) { storeDefaults = false; }
20381
+ JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
20263
20382
  if (!obj || !obj.getType)
20264
20383
  return obj;
20265
20384
  if (typeof obj.getData === "function")
@@ -20268,61 +20387,67 @@ var JsonObject = /** @class */ (function () {
20268
20387
  if (property != null && !property.className) {
20269
20388
  result[JsonObject.typePropertyName] = property.getObjType(obj.getType());
20270
20389
  }
20271
- this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, storeDefaults);
20272
- this.propertiesToJson(obj, this.getDynamicProperties(obj), result, storeDefaults);
20390
+ var storeDefaults = options === true;
20391
+ if (!options || options === true) {
20392
+ options = {};
20393
+ }
20394
+ if (storeDefaults) {
20395
+ options.storeDefaults = storeDefaults;
20396
+ }
20397
+ this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, options);
20398
+ this.propertiesToJson(obj, this.getDynamicProperties(obj), result, options);
20273
20399
  return result;
20274
20400
  };
20275
20401
  JsonObject.prototype.getDynamicProperties = function (obj) {
20276
20402
  return Serializer.getDynamicPropertiesByObj(obj);
20277
20403
  };
20278
- JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, properties) {
20279
- if (!obj.getDynamicPropertyName)
20280
- return properties;
20281
- var dynamicPropName = obj.getDynamicPropertyName();
20282
- if (!dynamicPropName)
20283
- return properties;
20284
- if (jsonObj[dynamicPropName]) {
20285
- obj[dynamicPropName] = jsonObj[dynamicPropName];
20286
- }
20287
- var dynamicProperties = this.getDynamicProperties(obj);
20288
- var res = [];
20289
- for (var i = 0; i < properties.length; i++) {
20290
- res.push(properties[i]);
20291
- }
20292
- for (var i = 0; i < dynamicProperties.length; i++) {
20293
- res.push(dynamicProperties[i]);
20404
+ JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, props) {
20405
+ if (!obj.getDynamicPropertyName && !obj.getDynamicProperties)
20406
+ return props;
20407
+ if (obj.getDynamicPropertyName) {
20408
+ var dynamicPropName = obj.getDynamicPropertyName();
20409
+ if (!dynamicPropName)
20410
+ return props;
20411
+ if (dynamicPropName && jsonObj[dynamicPropName]) {
20412
+ obj[dynamicPropName] = jsonObj[dynamicPropName];
20413
+ }
20294
20414
  }
20295
- return res;
20415
+ var dynamicProps = this.getDynamicProperties(obj);
20416
+ return dynamicProps.length === 0 ? props : [].concat(props).concat(dynamicProps);
20296
20417
  };
20297
- JsonObject.prototype.propertiesToJson = function (obj, properties, json, storeDefaults) {
20298
- if (storeDefaults === void 0) { storeDefaults = false; }
20418
+ JsonObject.prototype.propertiesToJson = function (obj, properties, json, options) {
20299
20419
  for (var i = 0; i < properties.length; i++) {
20300
- this.valueToJson(obj, json, properties[i], storeDefaults);
20420
+ this.valueToJson(obj, json, properties[i], options);
20301
20421
  }
20302
20422
  };
20303
- JsonObject.prototype.valueToJson = function (obj, result, property, storeDefaults) {
20304
- if (storeDefaults === void 0) { storeDefaults = false; }
20305
- if (property.isSerializable === false ||
20306
- (property.isLightSerializable === false && this.lightSerializing))
20423
+ JsonObject.prototype.valueToJson = function (obj, result, prop, options) {
20424
+ if (!options)
20425
+ options = {};
20426
+ if (prop.isSerializable === false || (prop.isLightSerializable === false && this.lightSerializing))
20427
+ return;
20428
+ if (options.version && !prop.isAvailableInVersion(options.version))
20307
20429
  return;
20308
- var value = property.getSerializableValue(obj);
20309
- if (!storeDefaults && property.isDefaultValueByObj(obj, value))
20430
+ var value = prop.getSerializableValue(obj);
20431
+ if (!options.storeDefaults && prop.isDefaultValueByObj(obj, value))
20310
20432
  return;
20311
20433
  if (this.isValueArray(value)) {
20312
20434
  var arrValue = [];
20313
20435
  for (var i = 0; i < value.length; i++) {
20314
- arrValue.push(this.toJsonObjectCore(value[i], property, storeDefaults));
20436
+ arrValue.push(this.toJsonObjectCore(value[i], prop, options));
20315
20437
  }
20316
20438
  value = arrValue.length > 0 ? arrValue : null;
20317
20439
  }
20318
20440
  else {
20319
- value = this.toJsonObjectCore(value, property, storeDefaults);
20441
+ value = this.toJsonObjectCore(value, prop, options);
20320
20442
  }
20443
+ if (value === undefined || value === null)
20444
+ return;
20445
+ var name = prop.getSerializedName(options.version);
20321
20446
  var hasValue = typeof obj["getPropertyValue"] === "function" &&
20322
- obj["getPropertyValue"](property.name, null) !== null;
20323
- if ((storeDefaults && hasValue) || !property.isDefaultValueByObj(obj, value)) {
20324
- if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, property, value, result)) {
20325
- result[property.name] = value;
20447
+ obj["getPropertyValue"](name, null) !== null;
20448
+ if ((options.storeDefaults && hasValue) || !prop.isDefaultValueByObj(obj, value)) {
20449
+ if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, prop, value, result)) {
20450
+ result[name] = this.removePosOnValueToJson(prop, value);
20326
20451
  }
20327
20452
  }
20328
20453
  };
@@ -20362,6 +20487,14 @@ var JsonObject = /** @class */ (function () {
20362
20487
  }
20363
20488
  }
20364
20489
  };
20490
+ JsonObject.prototype.removePosOnValueToJson = function (property, value) {
20491
+ if (!property.isCustom || !value)
20492
+ return value;
20493
+ if (!!value[JsonObject.positionPropertyName]) {
20494
+ delete value[JsonObject.positionPropertyName];
20495
+ }
20496
+ return value;
20497
+ };
20365
20498
  JsonObject.prototype.removePos = function (property, value) {
20366
20499
  if (!property || !property.type || property.type.indexOf("value") < 0)
20367
20500
  return;
@@ -31292,6 +31425,9 @@ var PanelModelBase = /** @class */ (function (_super) {
31292
31425
  else {
31293
31426
  this.elements.splice(index, 0, element);
31294
31427
  }
31428
+ if (this.wasRendered) {
31429
+ element.onFirstRendering();
31430
+ }
31295
31431
  return true;
31296
31432
  };
31297
31433
  PanelModelBase.prototype.insertElementAfter = function (element, after) {
@@ -33467,8 +33603,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
33467
33603
  this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
33468
33604
  var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.showHeader, this.model.positionMode);
33469
33605
  if (!!window) {
33470
- var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, window.innerHeight);
33471
- if (!!newVerticalDimensions.height) {
33606
+ var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, window.innerHeight, verticalPosition);
33607
+ if (!!newVerticalDimensions) {
33472
33608
  this.height = newVerticalDimensions.height + "px";
33473
33609
  pos.top = newVerticalDimensions.top;
33474
33610
  }
@@ -33794,7 +33930,7 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33794
33930
  else {
33795
33931
  _this.surveyValue = _this.createSurvey(jsonObj);
33796
33932
  }
33797
- _this.surveyValue.showTitle = false;
33933
+ //this.surveyValue.showTitle = false;
33798
33934
  if ("undefined" !== typeof document) {
33799
33935
  _this.windowElement = document.createElement("div");
33800
33936
  }
@@ -33878,6 +34014,13 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33878
34014
  enumerable: false,
33879
34015
  configurable: true
33880
34016
  });
34017
+ Object.defineProperty(PopupSurveyModel.prototype, "isCollapsed", {
34018
+ get: function () {
34019
+ return !this.isExpanded;
34020
+ },
34021
+ enumerable: false,
34022
+ configurable: true
34023
+ });
33881
34024
  PopupSurveyModel.prototype.onExpandedChanged = function () {
33882
34025
  if (!!this.expandedChangedCallback) {
33883
34026
  this.expandedChangedCallback();
@@ -33899,11 +34042,22 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33899
34042
  });
33900
34043
  Object.defineProperty(PopupSurveyModel.prototype, "locTitle", {
33901
34044
  get: function () {
34045
+ if (this.survey.locTitle.isEmpty)
34046
+ return null;
33902
34047
  return this.survey.locTitle;
33903
34048
  },
33904
34049
  enumerable: false,
33905
34050
  configurable: true
33906
34051
  });
34052
+ Object.defineProperty(PopupSurveyModel.prototype, "locDescription", {
34053
+ get: function () {
34054
+ if (this.survey.locTitle.isEmpty)
34055
+ return null;
34056
+ return this.survey.locDescription;
34057
+ },
34058
+ enumerable: false,
34059
+ configurable: true
34060
+ });
33907
34061
  /**
33908
34062
  * Expands the pop-up window.
33909
34063
  *
@@ -33961,7 +34115,24 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33961
34115
  });
33962
34116
  Object.defineProperty(PopupSurveyModel.prototype, "cssRoot", {
33963
34117
  get: function () {
33964
- return this.getPropertyValue("cssRoot", "");
34118
+ var result = this.getPropertyValue("cssRoot", "");
34119
+ if (this.isCollapsed)
34120
+ result += " " + this.getPropertyValue("cssRootCollapsedMod", "");
34121
+ return result;
34122
+ },
34123
+ enumerable: false,
34124
+ configurable: true
34125
+ });
34126
+ Object.defineProperty(PopupSurveyModel.prototype, "cssRootCollapsedMod", {
34127
+ get: function () {
34128
+ return this.getPropertyValue("cssRootCollapsedMod");
34129
+ },
34130
+ enumerable: false,
34131
+ configurable: true
34132
+ });
34133
+ Object.defineProperty(PopupSurveyModel.prototype, "cssRootContent", {
34134
+ get: function () {
34135
+ return this.getPropertyValue("cssRootContent");
33965
34136
  },
33966
34137
  enumerable: false,
33967
34138
  configurable: true
@@ -33980,16 +34151,30 @@ var PopupSurveyModel = /** @class */ (function (_super) {
33980
34151
  enumerable: false,
33981
34152
  configurable: true
33982
34153
  });
33983
- Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderTitle", {
34154
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderTitleCollapsed", {
34155
+ get: function () {
34156
+ return this.getPropertyValue("cssHeaderTitleCollapsed", "");
34157
+ },
34158
+ enumerable: false,
34159
+ configurable: true
34160
+ });
34161
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderButtonsContainer", {
34162
+ get: function () {
34163
+ return this.getPropertyValue("cssHeaderButtonsContainer", "");
34164
+ },
34165
+ enumerable: false,
34166
+ configurable: true
34167
+ });
34168
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderCollapseButton", {
33984
34169
  get: function () {
33985
- return this.getPropertyValue("cssHeaderTitle", "");
34170
+ return this.getPropertyValue("cssHeaderCollapseButton", "");
33986
34171
  },
33987
34172
  enumerable: false,
33988
34173
  configurable: true
33989
34174
  });
33990
- Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderButton", {
34175
+ Object.defineProperty(PopupSurveyModel.prototype, "cssHeaderCloseButton", {
33991
34176
  get: function () {
33992
- return this.getPropertyValue("cssHeaderButton", "");
34177
+ return this.getPropertyValue("cssHeaderCloseButton", "");
33993
34178
  },
33994
34179
  enumerable: false,
33995
34180
  configurable: true
@@ -34009,13 +34194,17 @@ var PopupSurveyModel = /** @class */ (function (_super) {
34009
34194
  return;
34010
34195
  var cssWindow = this.css.window;
34011
34196
  this.setPropertyValue("cssRoot", cssWindow.root);
34197
+ this.setPropertyValue("cssRootCollapsedMod", cssWindow.rootCollapsedMod);
34198
+ this.setPropertyValue("cssRootContent", cssWindow.rootContent);
34012
34199
  this.setPropertyValue("cssBody", cssWindow.body);
34013
34200
  var cssHeader = cssWindow.header;
34014
34201
  if (!cssHeader)
34015
34202
  return;
34016
34203
  this.setPropertyValue("cssHeaderRoot", cssHeader.root);
34017
- this.setPropertyValue("cssHeaderTitle", cssHeader.title);
34018
- this.setPropertyValue("cssHeaderButton", cssHeader.button);
34204
+ this.setPropertyValue("cssHeaderTitleCollapsed", cssHeader.titleCollapsed);
34205
+ this.setPropertyValue("cssHeaderButtonsContainer", cssHeader.buttonsContainer);
34206
+ this.setPropertyValue("cssHeaderCollapseButton", cssHeader.collapseButton);
34207
+ this.setPropertyValue("cssHeaderCloseButton", cssHeader.closeButton);
34019
34208
  this.updateCssButton();
34020
34209
  };
34021
34210
  PopupSurveyModel.prototype.updateCssButton = function () {
@@ -35889,6 +36078,9 @@ var Question = /** @class */ (function (_super) {
35889
36078
  .append(cssClasses.headerBottom, this.hasTitleOnBottom)
35890
36079
  .toString();
35891
36080
  };
36081
+ Question.prototype.supportContainerQueries = function () {
36082
+ return false;
36083
+ };
35892
36084
  Object.defineProperty(Question.prototype, "cssContent", {
35893
36085
  get: function () {
35894
36086
  this.ensureElementCss();
@@ -35903,6 +36095,7 @@ var Question = /** @class */ (function (_super) {
35903
36095
  Question.prototype.getCssContent = function (cssClasses) {
35904
36096
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_10__["CssClassBuilder"]()
35905
36097
  .append(cssClasses.content)
36098
+ .append(cssClasses.contentSupportContainerQueries, this.supportContainerQueries())
35906
36099
  .append(cssClasses.contentLeft, this.hasTitleOnLeft)
35907
36100
  .toString();
35908
36101
  };
@@ -39693,7 +39886,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39693
39886
  if (this.isValueEmpty(this.cachedValueForUrlRequests)) {
39694
39887
  this.cachedValueForUrlRequests = this.value;
39695
39888
  }
39696
- this.isFirstLoadChoicesFromUrl = false;
39697
39889
  var cachedValues = this.createCachedValueForUrlRequests(this.cachedValueForUrlRequests, checkCachedValuesOnExisting);
39698
39890
  if (array && (array.length > 0 || this.choicesByUrl.allowEmptyResponse)) {
39699
39891
  newChoices = new Array();
@@ -39704,6 +39896,20 @@ var QuestionSelectBase = /** @class */ (function (_super) {
39704
39896
  newChoices[i].locOwner = this;
39705
39897
  }
39706
39898
  }
39899
+ this.setChoicesFromUrl(newChoices, errors, cachedValues);
39900
+ };
39901
+ QuestionSelectBase.prototype.canAvoidSettChoicesFromUrl = function (newChoices) {
39902
+ if (this.isFirstLoadChoicesFromUrl)
39903
+ return false;
39904
+ var chocesAreEmpty = !newChoices || Array.isArray(newChoices) && newChoices.length === 0;
39905
+ if (chocesAreEmpty && !this.isEmpty())
39906
+ return false;
39907
+ return _helpers__WEBPACK_IMPORTED_MODULE_8__["Helpers"].isTwoValueEquals(this.choicesFromUrl, newChoices);
39908
+ };
39909
+ QuestionSelectBase.prototype.setChoicesFromUrl = function (newChoices, errors, cachedValues) {
39910
+ if (this.canAvoidSettChoicesFromUrl(newChoices))
39911
+ return;
39912
+ this.isFirstLoadChoicesFromUrl = false;
39707
39913
  this.choicesFromUrl = newChoices;
39708
39914
  this.filterItems();
39709
39915
  this.onVisibleChoicesChanged();
@@ -40746,6 +40952,21 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
40746
40952
  QuestionBooleanModel.prototype.createActionContainer = function (allowAdaptiveActions) {
40747
40953
  return _super.prototype.createActionContainer.call(this, this.renderAs !== "checkbox");
40748
40954
  };
40955
+ Object.defineProperty(QuestionBooleanModel.prototype, "isNewA11yStructure", {
40956
+ //a11y
40957
+ get: function () {
40958
+ return true;
40959
+ },
40960
+ enumerable: false,
40961
+ configurable: true
40962
+ });
40963
+ Object.defineProperty(QuestionBooleanModel.prototype, "a11y_input_ariaRole", {
40964
+ get: function () {
40965
+ return "switch";
40966
+ },
40967
+ enumerable: false,
40968
+ configurable: true
40969
+ });
40749
40970
  __decorate([
40750
40971
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
40751
40972
  ], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
@@ -41625,9 +41846,12 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
41625
41846
  var res = [];
41626
41847
  var visItems = this.visibleChoices;
41627
41848
  for (var i = 0; i < visItems.length; i++) {
41849
+ var item = visItems[i];
41850
+ if (item === this.selectAllItem)
41851
+ continue;
41628
41852
  var val = visItems[i].value;
41629
41853
  if (_helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isTwoValueEquals(val, this.invisibleOldValues[val])) {
41630
- if (!this.isItemSelected(visItems[i])) {
41854
+ if (!this.isItemSelected(item)) {
41631
41855
  res.push(val);
41632
41856
  }
41633
41857
  delete this.invisibleOldValues[val];
@@ -42158,6 +42382,35 @@ var ComponentQuestionJSON = /** @class */ (function () {
42158
42382
  enumerable: false,
42159
42383
  configurable: true
42160
42384
  });
42385
+ ComponentQuestionJSON.prototype.getDynamicProperties = function () {
42386
+ if (!Array.isArray(this.dynamicProperties)) {
42387
+ }
42388
+ this.dynamicProperties = this.calcDynamicProperties();
42389
+ return this.dynamicProperties;
42390
+ };
42391
+ ComponentQuestionJSON.prototype.calcDynamicProperties = function () {
42392
+ var baseProps = this.json.inheritBaseProps;
42393
+ if (!baseProps || !this.json.questionJSON)
42394
+ return [];
42395
+ var type = this.json.questionJSON.type;
42396
+ if (!type)
42397
+ return [];
42398
+ if (Array.isArray(baseProps)) {
42399
+ var props_1 = [];
42400
+ baseProps.forEach(function (name) {
42401
+ var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(type, name);
42402
+ if (prop) {
42403
+ props_1.push(prop);
42404
+ }
42405
+ });
42406
+ return props_1;
42407
+ }
42408
+ var invalidNames = [];
42409
+ for (var key in this.json.questionJSON) {
42410
+ invalidNames.push(key);
42411
+ }
42412
+ return _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getDynamicPropertiesByTypes(this.name, type, invalidNames);
42413
+ };
42161
42414
  return ComponentQuestionJSON;
42162
42415
  }());
42163
42416
 
@@ -42499,8 +42752,15 @@ var QuestionCustomModel = /** @class */ (function (_super) {
42499
42752
  QuestionCustomModel.prototype.getTemplate = function () {
42500
42753
  return "custom";
42501
42754
  };
42755
+ QuestionCustomModel.prototype.getDynamicProperties = function () {
42756
+ return this.customQuestion.getDynamicProperties() || [];
42757
+ };
42758
+ QuestionCustomModel.prototype.getDynamicType = function () {
42759
+ return this.questionWrapper ? this.questionWrapper.getType() : "question";
42760
+ };
42502
42761
  QuestionCustomModel.prototype.createWrapper = function () {
42503
42762
  this.questionWrapper = this.createQuestion();
42763
+ this.createDynamicProperties(this.questionWrapper);
42504
42764
  };
42505
42765
  QuestionCustomModel.prototype.getElement = function () {
42506
42766
  return this.contentQuestion;
@@ -42675,6 +42935,14 @@ var QuestionCustomModel = /** @class */ (function (_super) {
42675
42935
  }
42676
42936
  this.isSettingValueChanged = false;
42677
42937
  };
42938
+ QuestionCustomModel.prototype.createDynamicProperties = function (el) {
42939
+ if (!el)
42940
+ return;
42941
+ var props = this.getDynamicProperties();
42942
+ if (Array.isArray(props)) {
42943
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addDynamicPropertiesIntoObj(this, el, props);
42944
+ }
42945
+ };
42678
42946
  QuestionCustomModel.prototype.initElement = function (el) {
42679
42947
  var _this = this;
42680
42948
  _super.prototype.initElement.call(this, el);
@@ -43171,7 +43439,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
43171
43439
  }
43172
43440
  };
43173
43441
  QuestionDropdownModel.prototype.supportGoNextPageAutomatic = function () {
43174
- return true;
43442
+ return !this.isOtherSelected;
43175
43443
  };
43176
43444
  QuestionDropdownModel.prototype.getChoices = function () {
43177
43445
  var items = _super.prototype.getChoices.call(this);
@@ -44036,6 +44304,9 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("expression", [
44036
44304
  return getCurrecyCodes();
44037
44305
  },
44038
44306
  default: "USD",
44307
+ visibleIf: function (obj) {
44308
+ return obj.displayStyle === "currency";
44309
+ }
44039
44310
  },
44040
44311
  { name: "maximumFractionDigits:number", default: -1 },
44041
44312
  { name: "minimumFractionDigits:number", default: -1 },
@@ -44309,7 +44580,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
44309
44580
  };
44310
44581
  _this.doClean = function () {
44311
44582
  if (_this.needConfirmRemoveFile) {
44312
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(_this.confirmRemoveAllMessage, function () { _this.clearFilesCore(); });
44583
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(_this.confirmRemoveAllMessage, function () { _this.clearFilesCore(); }, undefined, _this.getLocale());
44313
44584
  return;
44314
44585
  }
44315
44586
  _this.clearFilesCore();
@@ -45199,7 +45470,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
45199
45470
  QuestionFileModel.prototype.doRemoveFile = function (data) {
45200
45471
  var _this = this;
45201
45472
  if (this.needConfirmRemoveFile) {
45202
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); });
45473
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale());
45203
45474
  return;
45204
45475
  }
45205
45476
  this.removeFileCore(data);
@@ -46490,8 +46761,8 @@ var MatrixRowModel = /** @class */ (function (_super) {
46490
46761
  __extends(MatrixRowModel, _super);
46491
46762
  function MatrixRowModel(item, fullName, data, value) {
46492
46763
  var _this = _super.call(this) || this;
46493
- _this.fullName = fullName;
46494
46764
  _this.item = item;
46765
+ _this.fullName = fullName;
46495
46766
  _this.data = data;
46496
46767
  _this.value = value;
46497
46768
  _this.cellClick = function (column) {
@@ -46529,8 +46800,24 @@ var MatrixRowModel = /** @class */ (function (_super) {
46529
46800
  return this.getPropertyValue("value");
46530
46801
  },
46531
46802
  set: function (val) {
46532
- val = this.data.getCorrectedRowValue(val);
46533
- this.setPropertyValue("value", val);
46803
+ if (!this.isReadOnly) {
46804
+ this.setValueDirectly(this.data.getCorrectedRowValue(val));
46805
+ }
46806
+ },
46807
+ enumerable: false,
46808
+ configurable: true
46809
+ });
46810
+ MatrixRowModel.prototype.setValueDirectly = function (val) {
46811
+ this.setPropertyValue("value", val);
46812
+ };
46813
+ Object.defineProperty(MatrixRowModel.prototype, "isReadOnly", {
46814
+ get: function () { return !this.item.enabled || this.data.isInputReadOnly; },
46815
+ enumerable: false,
46816
+ configurable: true
46817
+ });
46818
+ Object.defineProperty(MatrixRowModel.prototype, "rowTextClasses", {
46819
+ get: function () {
46820
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(this.data.cssClasses.rowTextCell).toString();
46534
46821
  },
46535
46822
  enumerable: false,
46536
46823
  configurable: true
@@ -46540,6 +46827,7 @@ var MatrixRowModel = /** @class */ (function (_super) {
46540
46827
  var cssClasses = this.data.cssClasses;
46541
46828
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_11__["CssClassBuilder"]().append(cssClasses.row)
46542
46829
  .append(cssClasses.rowError, this.data.hasErrorInRow(this))
46830
+ .append(cssClasses.rowDisabled, this.isReadOnly)
46543
46831
  .toString();
46544
46832
  },
46545
46833
  enumerable: false,
@@ -46899,6 +47187,10 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
46899
47187
  }
46900
47188
  return res;
46901
47189
  };
47190
+ QuestionMatrixModel.prototype.runItemsCondition = function (values, properties) {
47191
+ _itemvalue__WEBPACK_IMPORTED_MODULE_1__["ItemValue"].runEnabledConditionsForItems(this.rows, undefined, values, properties);
47192
+ return _super.prototype.runItemsCondition.call(this, values, properties);
47193
+ };
46902
47194
  QuestionMatrixModel.prototype.getVisibleRows = function () {
46903
47195
  var result = new Array();
46904
47196
  var val = this.value;
@@ -46940,6 +47232,11 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
46940
47232
  configurable: true
46941
47233
  });
46942
47234
  Object.defineProperty(QuestionMatrixModel.prototype, "cells", {
47235
+ /**
47236
+ * An array of matrix cells. Use this array to get or set cell values.
47237
+ *
47238
+ * [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrix-rubric/ (linkStyle))
47239
+ */
46943
47240
  get: function () {
46944
47241
  return this.cellsValue;
46945
47242
  },
@@ -47062,7 +47359,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
47062
47359
  if (!val)
47063
47360
  val = {};
47064
47361
  if (this.rows.length == 0) {
47065
- this.generatedVisibleRows[0].value = val;
47362
+ this.generatedVisibleRows[0].setValueDirectly(val);
47066
47363
  }
47067
47364
  else {
47068
47365
  for (var i = 0; i < this.generatedVisibleRows.length; i++) {
@@ -47070,7 +47367,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
47070
47367
  var rowVal = val[row.name];
47071
47368
  if (this.isValueEmpty(rowVal))
47072
47369
  rowVal = null;
47073
- this.generatedVisibleRows[i].value = rowVal;
47370
+ this.generatedVisibleRows[i].setValueDirectly(rowVal);
47074
47371
  }
47075
47372
  }
47076
47373
  this.updateIsAnswered();
@@ -51148,32 +51445,8 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
51148
51445
  }
51149
51446
  };
51150
51447
  MatrixDropdownColumn.prototype.addProperties = function (curCellType) {
51151
- var question = this.templateQuestion;
51152
- var properties = this.getProperties(curCellType);
51153
- for (var i = 0; i < properties.length; i++) {
51154
- var prop = properties[i];
51155
- this.addProperty(question, prop.name, false);
51156
- if (prop.serializationProperty) {
51157
- this.addProperty(question, prop.serializationProperty, true);
51158
- }
51159
- if (prop.alternativeName) {
51160
- this.addProperty(question, prop.alternativeName, false);
51161
- }
51162
- }
51163
- };
51164
- MatrixDropdownColumn.prototype.addProperty = function (question, propName, isReadOnly) {
51165
- var desc = {
51166
- configurable: true,
51167
- get: function () {
51168
- return question[propName];
51169
- },
51170
- };
51171
- if (!isReadOnly) {
51172
- desc["set"] = function (v) {
51173
- question[propName] = v;
51174
- };
51175
- }
51176
- Object.defineProperty(this, propName, desc);
51448
+ var props = this.getProperties(curCellType);
51449
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addDynamicPropertiesIntoObj(this, this.templateQuestion, props);
51177
51450
  };
51178
51451
  return MatrixDropdownColumn;
51179
51452
  }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
@@ -53118,7 +53391,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
53118
53391
  confirmDelete = this.isRequireConfirmOnRowDelete(index);
53119
53392
  }
53120
53393
  if (confirmDelete) {
53121
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removeRowAsync(index, row); });
53394
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removeRowAsync(index, row); }, undefined, this.getLocale());
53122
53395
  return;
53123
53396
  }
53124
53397
  this.removeRowAsync(index, row);
@@ -55009,8 +55282,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55009
55282
  configurable: true
55010
55283
  });
55011
55284
  QuestionPanelDynamicModel.prototype.getFirstQuestionToFocus = function (withError) {
55012
- for (var i = 0; i < this.visiblePanels.length; i++) {
55013
- var res = this.visiblePanels[i].getFirstQuestionToFocus(withError);
55285
+ for (var i = 0; i < this.visiblePanelsCore.length; i++) {
55286
+ var res = this.visiblePanelsCore[i].getFirstQuestionToFocus(withError);
55014
55287
  if (!!res)
55015
55288
  return res;
55016
55289
  }
@@ -55042,12 +55315,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55042
55315
  }
55043
55316
  };
55044
55317
  QuestionPanelDynamicModel.prototype.onTemplateElementPropertyChanged = function (element, options) {
55045
- if (this.isLoadingFromJson || this.useTemplatePanel || this.panels.length == 0)
55318
+ if (this.isLoadingFromJson || this.useTemplatePanel || this.panelsCore.length == 0)
55046
55319
  return;
55047
55320
  var property = _jsonobject__WEBPACK_IMPORTED_MODULE_5__["Serializer"].findProperty(element.getType(), options.name);
55048
55321
  if (!property)
55049
55322
  return;
55050
- var panels = this.panels;
55323
+ var panels = this.panelsCore;
55051
55324
  for (var i = 0; i < panels.length; i++) {
55052
55325
  var question = panels[i].getQuestionByName(element.name);
55053
55326
  if (!!question && question[options.name] !== options.newValue) {
@@ -55066,7 +55339,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55066
55339
  return "paneldynamic";
55067
55340
  };
55068
55341
  QuestionPanelDynamicModel.prototype.clearOnDeletingContainer = function () {
55069
- this.panels.forEach(function (panel) {
55342
+ this.panelsCore.forEach(function (panel) {
55070
55343
  panel.clearOnDeletingContainer();
55071
55344
  });
55072
55345
  };
@@ -55222,8 +55495,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55222
55495
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "items", {
55223
55496
  get: function () {
55224
55497
  var res = [];
55225
- for (var i = 0; i < this.panels.length; i++) {
55226
- res.push(this.panels[i].data);
55498
+ for (var i = 0; i < this.panelsCore.length; i++) {
55499
+ res.push(this.panelsCore[i].data);
55227
55500
  }
55228
55501
  return res;
55229
55502
  },
@@ -55238,7 +55511,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55238
55511
  * @see panelCount
55239
55512
  */
55240
55513
  get: function () {
55241
- return this.getPropertyValue("panels");
55514
+ this.buildPanelsFirstTime(this.canBuildPanels);
55515
+ return this.panelsCore;
55242
55516
  },
55243
55517
  enumerable: false,
55244
55518
  configurable: true
@@ -55248,6 +55522,21 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55248
55522
  * An array of currently visible panels ([`PanelModel`](https://surveyjs.io/form-library/documentation/api-reference/panel-model) objects).
55249
55523
  * @see templateVisibleIf
55250
55524
  */
55525
+ get: function () {
55526
+ this.buildPanelsFirstTime(this.canBuildPanels);
55527
+ return this.visiblePanelsCore;
55528
+ },
55529
+ enumerable: false,
55530
+ configurable: true
55531
+ });
55532
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "panelsCore", {
55533
+ get: function () {
55534
+ return this.getPropertyValue("panels");
55535
+ },
55536
+ enumerable: false,
55537
+ configurable: true
55538
+ });
55539
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "visiblePanelsCore", {
55251
55540
  get: function () {
55252
55541
  return this.getPropertyValue("visiblePanels");
55253
55542
  },
@@ -55259,14 +55548,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55259
55548
  if (!panel.visible)
55260
55549
  return;
55261
55550
  var index = 0;
55262
- var panels = this.panels;
55551
+ var panels = this.panelsCore;
55263
55552
  for (var i = 0; i < panels.length; i++) {
55264
55553
  if (panels[i] === panel)
55265
55554
  break;
55266
55555
  if (panels[i].visible)
55267
55556
  index++;
55268
55557
  }
55269
- this.visiblePanels.splice(index, 0, panel);
55558
+ this.visiblePanelsCore.splice(index, 0, panel);
55270
55559
  this.addTabFromToolbar(panel, index);
55271
55560
  if (!this.currentPanel) {
55272
55561
  this.currentPanel = panel;
@@ -55275,14 +55564,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55275
55564
  QuestionPanelDynamicModel.prototype.onPanelRemoved = function (panel) {
55276
55565
  var index = this.onPanelRemovedCore(panel);
55277
55566
  if (this.currentPanel === panel) {
55278
- var visPanels = this.visiblePanels;
55567
+ var visPanels = this.visiblePanelsCore;
55279
55568
  if (index >= visPanels.length)
55280
55569
  index = visPanels.length - 1;
55281
55570
  this.currentPanel = index >= 0 ? visPanels[index] : null;
55282
55571
  }
55283
55572
  };
55284
55573
  QuestionPanelDynamicModel.prototype.onPanelRemovedCore = function (panel) {
55285
- var visPanels = this.visiblePanels;
55574
+ var visPanels = this.visiblePanelsCore;
55286
55575
  var index = visPanels.indexOf(panel);
55287
55576
  if (index > -1) {
55288
55577
  visPanels.splice(index, 1);
@@ -55305,14 +55594,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55305
55594
  return -1;
55306
55595
  if (this.useTemplatePanel)
55307
55596
  return 0;
55308
- return this.visiblePanels.indexOf(this.currentPanel);
55597
+ return this.visiblePanelsCore.indexOf(this.currentPanel);
55309
55598
  },
55310
55599
  set: function (val) {
55311
55600
  if (val < 0 || this.visiblePanelCount < 1)
55312
55601
  return;
55313
55602
  if (val >= this.visiblePanelCount)
55314
55603
  val = this.visiblePanelCount - 1;
55315
- this.currentPanel = this.visiblePanels[val];
55604
+ this.currentPanel = this.visiblePanelsCore[val];
55316
55605
  },
55317
55606
  enumerable: false,
55318
55607
  configurable: true
@@ -55334,7 +55623,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55334
55623
  return null;
55335
55624
  var res = this.getPropertyValue("currentPanel", null);
55336
55625
  if (!res && this.visiblePanelCount > 0) {
55337
- res = this.visiblePanels[0];
55626
+ res = this.visiblePanelsCore[0];
55338
55627
  this.currentPanel = res;
55339
55628
  }
55340
55629
  return res;
@@ -55343,7 +55632,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55343
55632
  if (this.isRenderModeList || this.useTemplatePanel)
55344
55633
  return;
55345
55634
  var curPanel = this.getPropertyValue("currentPanel");
55346
- var index = !!val ? this.visiblePanels.indexOf(val) : -1;
55635
+ var index = !!val ? this.visiblePanelsCore.indexOf(val) : -1;
55347
55636
  if (!!val && index < 0 || val === curPanel)
55348
55637
  return;
55349
55638
  if (curPanel) {
@@ -55370,7 +55659,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55370
55659
  this.currentPanel.onHidingContent();
55371
55660
  }
55372
55661
  else {
55373
- this.visiblePanels.forEach(function (panel) { return panel.onHidingContent(); });
55662
+ this.visiblePanelsCore.forEach(function (panel) { return panel.onHidingContent(); });
55374
55663
  }
55375
55664
  };
55376
55665
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "confirmDelete", {
@@ -55627,13 +55916,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55627
55916
  };
55628
55917
  QuestionPanelDynamicModel.prototype.setIsMobile = function (val) {
55629
55918
  _super.prototype.setIsMobile.call(this, val);
55630
- (this.panels || []).forEach(function (panel) { return panel.getQuestions(true).forEach(function (question) {
55919
+ (this.panelsCore || []).forEach(function (panel) { return panel.getQuestions(true).forEach(function (question) {
55631
55920
  question.setIsMobile(val);
55632
55921
  }); });
55633
55922
  };
55634
55923
  QuestionPanelDynamicModel.prototype.themeChanged = function (theme) {
55635
55924
  _super.prototype.themeChanged.call(this, theme);
55636
- (this.panels || []).forEach(function (panel) {
55925
+ (this.panelsCore || []).forEach(function (panel) {
55637
55926
  return panel.getQuestions(true).forEach(function (question) {
55638
55927
  question.themeChanged(theme);
55639
55928
  });
@@ -55646,24 +55935,24 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55646
55935
  * @see maxPanelCount
55647
55936
  */
55648
55937
  get: function () {
55649
- return this.isLoadingFromJson || this.useTemplatePanel
55938
+ return !this.canBuildPanels || this.wasNotRenderedInSurvey
55650
55939
  ? this.getPropertyValue("panelCount")
55651
- : this.panels.length;
55940
+ : this.panelsCore.length;
55652
55941
  },
55653
55942
  set: function (val) {
55654
55943
  if (val < 0)
55655
55944
  return;
55656
- if (this.isLoadingFromJson || this.useTemplatePanel) {
55945
+ if (!this.canBuildPanels || this.wasNotRenderedInSurvey) {
55657
55946
  this.setPropertyValue("panelCount", val);
55658
55947
  return;
55659
55948
  }
55660
- if (val == this.panels.length || this.useTemplatePanel)
55949
+ if (val == this.panelsCore.length || this.useTemplatePanel)
55661
55950
  return;
55662
55951
  this.updateBindings("panelCount", val);
55663
55952
  this.prepareValueForPanelCreating();
55664
55953
  for (var i = this.panelCount; i < val; i++) {
55665
55954
  var panel = this.createNewPanel();
55666
- this.panels.push(panel);
55955
+ this.panelsCore.push(panel);
55667
55956
  if (this.renderMode == "list" && this.panelsState != "default") {
55668
55957
  if (this.panelsState === "expand") {
55669
55958
  panel.expand();
@@ -55675,9 +55964,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55675
55964
  }
55676
55965
  }
55677
55966
  }
55678
- var removedPanels = [];
55679
55967
  if (val < this.panelCount) {
55680
- removedPanels = this.panels.splice(val, this.panelCount - val);
55968
+ this.panelsCore.splice(val, this.panelCount - val);
55681
55969
  }
55682
55970
  this.setValueAfterPanelsCreating();
55683
55971
  this.setValueBasedOnPanelCount();
@@ -55725,8 +56013,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55725
56013
  : new QuestionPanelDynamicTemplateSurveyImpl(this));
55726
56014
  };
55727
56015
  QuestionPanelDynamicModel.prototype.setPanelsSurveyImpl = function () {
55728
- for (var i = 0; i < this.panels.length; i++) {
55729
- var panel = this.panels[i];
56016
+ for (var i = 0; i < this.panelsCore.length; i++) {
56017
+ var panel = this.panelsCore[i];
55730
56018
  if (panel == this.template)
55731
56019
  continue;
55732
56020
  panel.setSurveyImpl(panel.data);
@@ -55735,12 +56023,12 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
55735
56023
  QuestionPanelDynamicModel.prototype.setPanelsState = function () {
55736
56024
  if (this.useTemplatePanel || this.renderMode != "list" || !this.templateTitle)
55737
56025
  return;
55738
- for (var i = 0; i < this.panels.length; i++) {
56026
+ for (var i = 0; i < this.panelsCore.length; i++) {
55739
56027
  var state = this.panelsState;
55740
56028
  if (state === "firstExpanded") {
55741
56029
  state = i === 0 ? "expanded" : "collapsed";
55742
56030
  }
55743
- this.panels[i].state = state;
56031
+ this.panelsCore[i].state = state;
55744
56032
  }
55745
56033
  };
55746
56034
  QuestionPanelDynamicModel.prototype.setValueBasedOnPanelCount = function () {
@@ -56024,8 +56312,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56024
56312
  if (!this.isVisible)
56025
56313
  return 0;
56026
56314
  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");
56315
+ for (var i = 0; i < this.visiblePanelsCore.length; i++) {
56316
+ var counter = this.setPanelVisibleIndex(this.visiblePanelsCore[i], startIndex, this.showQuestionNumbers != "off");
56029
56317
  if (this.showQuestionNumbers == "onSurvey") {
56030
56318
  startIndex += counter;
56031
56319
  }
@@ -56111,7 +56399,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56111
56399
  panels.push(this.createNewPanel());
56112
56400
  }
56113
56401
  }
56114
- (_a = this.panels).splice.apply(_a, __spreadArray([0, this.panels.length], panels));
56402
+ (_a = this.panelsCore).splice.apply(_a, __spreadArray([0, this.panelsCore.length], panels));
56115
56403
  this.setValueAfterPanelsCreating();
56116
56404
  this.setPanelsState();
56117
56405
  this.reRunCondition();
@@ -56183,7 +56471,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56183
56471
  return true;
56184
56472
  };
56185
56473
  QuestionPanelDynamicModel.prototype.getProgressInfo = function () {
56186
- return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.visiblePanels, this.isRequired);
56474
+ return _survey_element__WEBPACK_IMPORTED_MODULE_1__["SurveyElement"].getProgressInfoByElements(this.visiblePanelsCore, this.isRequired);
56187
56475
  };
56188
56476
  QuestionPanelDynamicModel.prototype.isRowEmpty = function (val) {
56189
56477
  for (var prop in val) {
@@ -56233,7 +56521,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56233
56521
  }
56234
56522
  if (this.survey)
56235
56523
  this.survey.dynamicPanelAdded(this);
56236
- return this.panels[index];
56524
+ return this.panelsCore[index];
56237
56525
  };
56238
56526
  QuestionPanelDynamicModel.prototype.updateValueOnAddingPanel = function (prevIndex, index) {
56239
56527
  this.panelCount++;
@@ -56283,7 +56571,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56283
56571
  if (!this.canRemovePanel)
56284
56572
  return;
56285
56573
  if (this.isRequireConfirmOnDelete(value)) {
56286
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
56574
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); }, undefined, this.getLocale());
56287
56575
  }
56288
56576
  else {
56289
56577
  this.removePanel(value);
@@ -56295,7 +56583,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56295
56583
  var index = this.getVisualPanelIndex(val);
56296
56584
  if (index < 0 || index >= this.visiblePanelCount)
56297
56585
  return false;
56298
- var panelValue = this.visiblePanels[index].getValue();
56586
+ var panelValue = this.visiblePanelsCore[index].getValue();
56299
56587
  return !this.isValueEmpty(panelValue) &&
56300
56588
  (this.isValueEmpty(this.defaultPanelValue) || !this.isTwoValueEquals(panelValue, this.defaultPanelValue));
56301
56589
  };
@@ -56329,13 +56617,13 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56329
56617
  var visIndex = this.getVisualPanelIndex(value);
56330
56618
  if (visIndex < 0 || visIndex >= this.visiblePanelCount)
56331
56619
  return;
56332
- var panel = this.visiblePanels[visIndex];
56333
- var index = this.panels.indexOf(panel);
56620
+ var panel = this.visiblePanelsCore[visIndex];
56621
+ var index = this.panelsCore.indexOf(panel);
56334
56622
  if (index < 0)
56335
56623
  return;
56336
56624
  if (this.survey && !this.survey.dynamicPanelRemoving(this, index, panel))
56337
56625
  return;
56338
- this.panels.splice(index, 1);
56626
+ this.panelsCore.splice(index, 1);
56339
56627
  this.updateBindings("panelCount", this.panelCount);
56340
56628
  var value = this.value;
56341
56629
  if (!value || !Array.isArray(value) || index >= value.length)
@@ -56352,7 +56640,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56352
56640
  QuestionPanelDynamicModel.prototype.getVisualPanelIndex = function (val) {
56353
56641
  if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val))
56354
56642
  return val;
56355
- var visPanels = this.visiblePanels;
56643
+ var visPanels = this.visiblePanelsCore;
56356
56644
  for (var i = 0; i < visPanels.length; i++) {
56357
56645
  if (visPanels[i] === val || visPanels[i].data === val)
56358
56646
  return i;
@@ -56360,15 +56648,15 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56360
56648
  return -1;
56361
56649
  };
56362
56650
  QuestionPanelDynamicModel.prototype.getPanelIndexById = function (id) {
56363
- for (var i = 0; i < this.panels.length; i++) {
56364
- if (this.panels[i].id === id)
56651
+ for (var i = 0; i < this.panelsCore.length; i++) {
56652
+ if (this.panelsCore[i].id === id)
56365
56653
  return i;
56366
56654
  }
56367
56655
  return -1;
56368
56656
  };
56369
56657
  QuestionPanelDynamicModel.prototype.locStrsChanged = function () {
56370
56658
  _super.prototype.locStrsChanged.call(this);
56371
- var panels = this.panels;
56659
+ var panels = this.panelsCore;
56372
56660
  for (var i = 0; i < panels.length; i++) {
56373
56661
  panels[i].locStrsChanged();
56374
56662
  }
@@ -56377,23 +56665,23 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56377
56665
  }
56378
56666
  };
56379
56667
  QuestionPanelDynamicModel.prototype.clearIncorrectValues = function () {
56380
- for (var i = 0; i < this.panels.length; i++) {
56668
+ for (var i = 0; i < this.panelsCore.length; i++) {
56381
56669
  this.clearIncorrectValuesInPanel(i);
56382
56670
  }
56383
56671
  };
56384
56672
  QuestionPanelDynamicModel.prototype.clearErrors = function () {
56385
56673
  _super.prototype.clearErrors.call(this);
56386
- for (var i = 0; i < this.panels.length; i++) {
56387
- this.panels[i].clearErrors();
56674
+ for (var i = 0; i < this.panelsCore.length; i++) {
56675
+ this.panelsCore[i].clearErrors();
56388
56676
  }
56389
56677
  };
56390
56678
  QuestionPanelDynamicModel.prototype.getQuestionFromArray = function (name, index) {
56391
- if (index >= this.panelCount)
56679
+ if (index < 0 || index >= this.panelsCore.length)
56392
56680
  return null;
56393
- return this.panels[index].getQuestionByName(name);
56681
+ return this.panelsCore[index].getQuestionByName(name);
56394
56682
  };
56395
56683
  QuestionPanelDynamicModel.prototype.clearIncorrectValuesInPanel = function (index) {
56396
- var panel = this.panels[index];
56684
+ var panel = this.panelsCore[index];
56397
56685
  panel.clearIncorrectValues();
56398
56686
  var val = this.value;
56399
56687
  var values = !!val && index < val.length ? val[index] : null;
@@ -56467,7 +56755,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56467
56755
  }
56468
56756
  };
56469
56757
  QuestionPanelDynamicModel.prototype.collectNestedQuestionsCore = function (questions, visibleOnly) {
56470
- var panels = visibleOnly ? this.visiblePanels : this.panels;
56758
+ var panels = visibleOnly ? this.visiblePanelsCore : this.panelsCore;
56471
56759
  if (!Array.isArray(panels))
56472
56760
  return;
56473
56761
  panels.forEach(function (panel) {
@@ -56493,8 +56781,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56493
56781
  QuestionPanelDynamicModel.prototype.onReadOnlyChanged = function () {
56494
56782
  var readOnly = this.isReadOnly;
56495
56783
  this.template.readOnly = readOnly;
56496
- for (var i = 0; i < this.panels.length; i++) {
56497
- this.panels[i].readOnly = readOnly;
56784
+ for (var i = 0; i < this.panelsCore.length; i++) {
56785
+ this.panelsCore[i].readOnly = readOnly;
56498
56786
  }
56499
56787
  this.updateNoEntriesTextDefaultLoc();
56500
56788
  this.updateFooterActions();
@@ -56510,6 +56798,17 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56510
56798
  QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
56511
56799
  this.template.readOnly = this.isReadOnly;
56512
56800
  this.template.onSurveyLoad();
56801
+ this.buildPanelsFirstTime();
56802
+ _super.prototype.onSurveyLoad.call(this);
56803
+ };
56804
+ QuestionPanelDynamicModel.prototype.buildPanelsFirstTime = function (force) {
56805
+ if (force === void 0) { force = false; }
56806
+ if (this.hasPanelBuildFirstTime)
56807
+ return;
56808
+ if (!force && this.wasNotRenderedInSurvey)
56809
+ return;
56810
+ this.hasPanelBuildFirstTime = true;
56811
+ this.isBuildingPanelsFirstTime = true;
56513
56812
  if (this.getPropertyValue("panelCount") > 0) {
56514
56813
  this.panelCount = this.getPropertyValue("panelCount");
56515
56814
  }
@@ -56529,28 +56828,43 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56529
56828
  this.updateNoEntriesTextDefaultLoc();
56530
56829
  }
56531
56830
  this.updateFooterActions();
56532
- _super.prototype.onSurveyLoad.call(this);
56831
+ this.isBuildingPanelsFirstTime = false;
56533
56832
  };
56833
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "wasNotRenderedInSurvey", {
56834
+ get: function () {
56835
+ return !this.hasPanelBuildFirstTime && !this.wasRendered && !!this.survey;
56836
+ },
56837
+ enumerable: false,
56838
+ configurable: true
56839
+ });
56840
+ Object.defineProperty(QuestionPanelDynamicModel.prototype, "canBuildPanels", {
56841
+ get: function () {
56842
+ return !this.isLoadingFromJson && !this.useTemplatePanel;
56843
+ },
56844
+ enumerable: false,
56845
+ configurable: true
56846
+ });
56534
56847
  QuestionPanelDynamicModel.prototype.onFirstRendering = function () {
56848
+ _super.prototype.onFirstRendering.call(this);
56849
+ this.buildPanelsFirstTime();
56535
56850
  this.template.onFirstRendering();
56536
- for (var i = 0; i < this.panels.length; i++) {
56537
- this.panels[i].onFirstRendering();
56851
+ for (var i = 0; i < this.panelsCore.length; i++) {
56852
+ this.panelsCore[i].onFirstRendering();
56538
56853
  }
56539
- _super.prototype.onFirstRendering.call(this);
56540
56854
  };
56541
56855
  QuestionPanelDynamicModel.prototype.localeChanged = function () {
56542
56856
  _super.prototype.localeChanged.call(this);
56543
- for (var i = 0; i < this.panels.length; i++) {
56544
- this.panels[i].localeChanged();
56857
+ for (var i = 0; i < this.panelsCore.length; i++) {
56858
+ this.panelsCore[i].localeChanged();
56545
56859
  }
56546
56860
  };
56547
56861
  QuestionPanelDynamicModel.prototype.runCondition = function (values, properties) {
56548
56862
  _super.prototype.runCondition.call(this, values, properties);
56549
- this.runPanelsCondition(this.panels, values, properties);
56863
+ this.runPanelsCondition(this.panelsCore, values, properties);
56550
56864
  };
56551
56865
  QuestionPanelDynamicModel.prototype.runTriggers = function (name, value) {
56552
56866
  _super.prototype.runTriggers.call(this, name, value);
56553
- this.visiblePanels.forEach(function (p) {
56867
+ this.visiblePanelsCore.forEach(function (p) {
56554
56868
  p.questions.forEach(function (q) { return q.runTriggers(name, value); });
56555
56869
  });
56556
56870
  };
@@ -56584,18 +56898,18 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56584
56898
  };
56585
56899
  QuestionPanelDynamicModel.prototype.onAnyValueChanged = function (name, questionName) {
56586
56900
  _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, "");
56901
+ for (var i = 0; i < this.panelsCore.length; i++) {
56902
+ this.panelsCore[i].onAnyValueChanged(name, questionName);
56903
+ this.panelsCore[i].onAnyValueChanged(QuestionPanelDynamicItem.ItemVariableName, "");
56590
56904
  }
56591
56905
  };
56592
56906
  QuestionPanelDynamicModel.prototype.hasKeysDuplicated = function (fireCallback, rec) {
56593
56907
  if (rec === void 0) { rec = null; }
56594
56908
  var keyValues = [];
56595
56909
  var res;
56596
- for (var i = 0; i < this.panels.length; i++) {
56910
+ for (var i = 0; i < this.panelsCore.length; i++) {
56597
56911
  res =
56598
- this.isValueDuplicated(this.panels[i], keyValues, rec, fireCallback) ||
56912
+ this.isValueDuplicated(this.panelsCore[i], keyValues, rec, fireCallback) ||
56599
56913
  res;
56600
56914
  }
56601
56915
  return res;
@@ -56612,7 +56926,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56612
56926
  QuestionPanelDynamicModel.prototype.hasErrors = function (fireCallback, rec) {
56613
56927
  if (fireCallback === void 0) { fireCallback = true; }
56614
56928
  if (rec === void 0) { rec = null; }
56615
- if (this.isValueChangingInternally)
56929
+ if (this.isValueChangingInternally || this.isBuildingPanelsFirstTime)
56616
56930
  return false;
56617
56931
  var res = false;
56618
56932
  if (!!this.changingValueQuestion) {
@@ -56629,7 +56943,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56629
56943
  var res = _super.prototype.getContainsErrors.call(this);
56630
56944
  if (res)
56631
56945
  return res;
56632
- var panels = this.panels;
56946
+ var panels = this.panelsCore;
56633
56947
  for (var i = 0; i < panels.length; i++) {
56634
56948
  if (panels[i].containsErrors)
56635
56949
  return true;
@@ -56639,7 +56953,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56639
56953
  QuestionPanelDynamicModel.prototype.getIsAnswered = function () {
56640
56954
  if (!_super.prototype.getIsAnswered.call(this))
56641
56955
  return false;
56642
- var panels = this.visiblePanels;
56956
+ var panels = this.visiblePanelsCore;
56643
56957
  for (var i = 0; i < panels.length; i++) {
56644
56958
  var visibleQuestions = [];
56645
56959
  panels[i].addQuestionsToList(visibleQuestions, true);
@@ -56665,8 +56979,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56665
56979
  _super.prototype.clearValueIfInvisible.call(this, reason);
56666
56980
  };
56667
56981
  QuestionPanelDynamicModel.prototype.clearValueInPanelsIfInvisible = function (reason) {
56668
- for (var i = 0; i < this.panels.length; i++) {
56669
- var questions = this.panels[i].questions;
56982
+ for (var i = 0; i < this.panelsCore.length; i++) {
56983
+ var questions = this.panelsCore[i].questions;
56670
56984
  this.isSetPanelItemData = {};
56671
56985
  for (var j = 0; j < questions.length; j++) {
56672
56986
  var q = questions[j];
@@ -56679,8 +56993,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56679
56993
  QuestionPanelDynamicModel.prototype.getIsRunningValidators = function () {
56680
56994
  if (_super.prototype.getIsRunningValidators.call(this))
56681
56995
  return true;
56682
- for (var i = 0; i < this.panels.length; i++) {
56683
- var questions = this.panels[i].questions;
56996
+ for (var i = 0; i < this.panelsCore.length; i++) {
56997
+ var questions = this.panelsCore[i].questions;
56684
56998
  for (var j = 0; j < questions.length; j++) {
56685
56999
  if (questions[j].isRunningValidators)
56686
57000
  return true;
@@ -56690,7 +57004,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56690
57004
  };
56691
57005
  QuestionPanelDynamicModel.prototype.getAllErrors = function () {
56692
57006
  var result = _super.prototype.getAllErrors.call(this);
56693
- var panels = this.visiblePanels;
57007
+ var panels = this.visiblePanelsCore;
56694
57008
  for (var i = 0; i < panels.length; i++) {
56695
57009
  var questions = panels[i].questions;
56696
57010
  for (var j = 0; j < questions.length; j++) {
@@ -56706,7 +57020,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56706
57020
  var values = this.getUnbindValue(value);
56707
57021
  if (!values || !Array.isArray(values))
56708
57022
  return values;
56709
- for (var i = 0; i < this.panels.length && i < values.length; i++) {
57023
+ for (var i = 0; i < this.panelsCore.length && i < values.length; i++) {
56710
57024
  var val = values[i];
56711
57025
  if (!val)
56712
57026
  continue;
@@ -56717,7 +57031,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56717
57031
  QuestionPanelDynamicModel.prototype.getPanelDisplayValue = function (panelIndex, val, keysAsText) {
56718
57032
  if (!val)
56719
57033
  return val;
56720
- var panel = this.panels[panelIndex];
57034
+ var panel = this.panelsCore[panelIndex];
56721
57035
  var keys = Object.keys(val);
56722
57036
  for (var i = 0; i < keys.length; i++) {
56723
57037
  var key = keys[i];
@@ -56738,7 +57052,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56738
57052
  };
56739
57053
  QuestionPanelDynamicModel.prototype.hasErrorInPanels = function (fireCallback, rec) {
56740
57054
  var res = false;
56741
- var panels = this.visiblePanels;
57055
+ var panels = this.visiblePanelsCore;
56742
57056
  var keyValues = [];
56743
57057
  for (var i = 0; i < panels.length; i++) {
56744
57058
  this.setOnCompleteAsyncInPanel(panels[i]);
@@ -56871,8 +57185,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56871
57185
  return;
56872
57186
  _super.prototype.setQuestionValue.call(this, newValue, false);
56873
57187
  this.setPanelCountBasedOnValue();
56874
- for (var i = 0; i < this.panels.length; i++) {
56875
- this.panelUpdateValueFromSurvey(this.panels[i]);
57188
+ for (var i = 0; i < this.panelsCore.length; i++) {
57189
+ this.panelUpdateValueFromSurvey(this.panelsCore[i]);
56876
57190
  }
56877
57191
  this.updateIsAnswered();
56878
57192
  };
@@ -56880,8 +57194,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56880
57194
  if (newValue === undefined && this.isAllPanelsEmpty())
56881
57195
  return;
56882
57196
  _super.prototype.onSurveyValueChanged.call(this, newValue);
56883
- for (var i = 0; i < this.panels.length; i++) {
56884
- this.panelSurveyValueChanged(this.panels[i]);
57197
+ for (var i = 0; i < this.panelsCore.length; i++) {
57198
+ this.panelSurveyValueChanged(this.panelsCore[i]);
56885
57199
  }
56886
57200
  if (newValue === undefined) {
56887
57201
  this.setValueBasedOnPanelCount();
@@ -56889,8 +57203,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56889
57203
  this.updateIsReady();
56890
57204
  };
56891
57205
  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()))
57206
+ for (var i = 0; i < this.panelsCore.length; i++) {
57207
+ if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(this.panelsCore[i].getValue()))
56894
57208
  return false;
56895
57209
  }
56896
57210
  return true;
@@ -56929,7 +57243,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56929
57243
  return res > -1 ? res : this.items.length;
56930
57244
  };
56931
57245
  QuestionPanelDynamicModel.prototype.getVisibleItemIndex = function (item) {
56932
- var visPanels = this.visiblePanels;
57246
+ var visPanels = this.visiblePanelsCore;
56933
57247
  for (var i = 0; i < visPanels.length; i++) {
56934
57248
  if (visPanels[i].data === item)
56935
57249
  return i;
@@ -56977,8 +57291,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
56977
57291
  else {
56978
57292
  delete qValue[index][name];
56979
57293
  }
56980
- if (index >= 0 && index < this.panels.length) {
56981
- this.changingValueQuestion = this.panels[index].getQuestionByValueName(name);
57294
+ if (index >= 0 && index < this.panelsCore.length) {
57295
+ this.changingValueQuestion = this.panelsCore[index].getQuestionByValueName(name);
56982
57296
  }
56983
57297
  this.value = qValue;
56984
57298
  this.changingValueQuestion = null;
@@ -57032,8 +57346,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57032
57346
  };
57033
57347
  QuestionPanelDynamicModel.prototype.updateElementCss = function (reNew) {
57034
57348
  _super.prototype.updateElementCss.call(this, reNew);
57035
- for (var i = 0; i < this.panels.length; i++) {
57036
- var el = this.panels[i];
57349
+ for (var i = 0; i < this.panelsCore.length; i++) {
57350
+ var el = this.panelsCore[i];
57037
57351
  el.updateElementCss(reNew);
57038
57352
  }
57039
57353
  };
@@ -57257,7 +57571,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57257
57571
  return;
57258
57572
  if (this.currentIndex < 0 || this.currentIndex >= this.visiblePanelCount)
57259
57573
  return;
57260
- var panel = this.visiblePanels[this.currentIndex];
57574
+ var panel = this.visiblePanelsCore[this.currentIndex];
57261
57575
  this.additionalTitleToolbar.renderedActions.forEach(function (action) {
57262
57576
  var isActive = action.id === panel.id;
57263
57577
  action.pressed = isActive;
@@ -57273,9 +57587,9 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
57273
57587
  if (!this.isRenderModeTab)
57274
57588
  return;
57275
57589
  var items = [];
57276
- var visPanels = this.visiblePanels;
57590
+ var visPanels = this.visiblePanelsCore;
57277
57591
  var _loop_1 = function (i) {
57278
- this_1.visiblePanels.forEach(function (panel) { return items.push(_this.createTabByPanel(visPanels[i], i)); });
57592
+ this_1.visiblePanelsCore.forEach(function (panel) { return items.push(_this.createTabByPanel(visPanels[i], i)); });
57279
57593
  };
57280
57594
  var this_1 = this;
57281
57595
  for (var i = 0; i < visPanels.length; i++) {
@@ -57518,7 +57832,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
57518
57832
  configurable: true
57519
57833
  });
57520
57834
  QuestionRadiogroupModel.prototype.supportGoNextPageAutomatic = function () {
57521
- return this.isMouseDown === true;
57835
+ return this.isMouseDown === true && !this.isOtherSelected;
57522
57836
  };
57523
57837
  QuestionRadiogroupModel.prototype.setNewComment = function (newValue) {
57524
57838
  this.isMouseDown = true;
@@ -57646,8 +57960,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
57646
57960
  _this.domNode = null;
57647
57961
  _this.onVisibleChoicesChanged = function () {
57648
57962
  _super.prototype.onVisibleChoicesChanged.call(_this);
57963
+ if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled) {
57964
+ _this.value = [];
57965
+ }
57649
57966
  // ranking question with only one choice doesn't make sense
57650
- if (_this.visibleChoices.length === 1) {
57967
+ if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
57651
57968
  _this.value = [];
57652
57969
  _this.value.push(_this.visibleChoices[0].value);
57653
57970
  _this.updateRankingChoices();
@@ -57720,12 +58037,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
57720
58037
  itemsNodes[index].focus();
57721
58038
  }
57722
58039
  };
58040
+ _this.isValueSetByUser = false;
57723
58041
  _this.setValue = function () {
57724
58042
  var value = [];
57725
58043
  _this.rankingChoices.forEach(function (choice) {
57726
58044
  value.push(choice.value);
57727
58045
  });
57728
58046
  _this.value = value;
58047
+ _this.isValueSetByUser = true;
57729
58048
  };
57730
58049
  _this.createNewArray("rankingChoices");
57731
58050
  _this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
@@ -57746,6 +58065,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
57746
58065
  return undefined;
57747
58066
  return 0;
57748
58067
  };
58068
+ QuestionRankingModel.prototype.supportContainerQueries = function () {
58069
+ return this.selectToRankEnabled;
58070
+ };
57749
58071
  Object.defineProperty(QuestionRankingModel.prototype, "rootClass", {
57750
58072
  get: function () {
57751
58073
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__["CssClassBuilder"]()
@@ -58155,6 +58477,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
58155
58477
  __decorate([
58156
58478
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
58157
58479
  ], QuestionRankingModel.prototype, "dropTargetNodeMove", void 0);
58480
+ __decorate([
58481
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: true })
58482
+ ], QuestionRankingModel.prototype, "carryForwardStartUnranked", void 0);
58158
58483
  __decorate([
58159
58484
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "selectToRankEmptyRankedAreaText" } })
58160
58485
  ], QuestionRankingModel.prototype, "selectToRankEmptyRankedAreaText", void 0);
@@ -60776,8 +61101,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
60776
61101
  return !this.isReadOnly && this.inputType !== "range";
60777
61102
  };
60778
61103
  QuestionTextModel.prototype.getControlCssClassBuilder = function () {
61104
+ var maxLength = this.getMaxLength();
60779
61105
  return _super.prototype.getControlCssClassBuilder.call(this)
60780
- .append(this.cssClasses.constrolWithCharacterCounter, !!this.getMaxLength());
61106
+ .append(this.cssClasses.constrolWithCharacterCounter, !!maxLength)
61107
+ .append(this.cssClasses.characterCounterBig, maxLength > 99);
60781
61108
  };
60782
61109
  QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
60783
61110
  return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnly.textRenderMode === "div";
@@ -61722,7 +62049,7 @@ var SurveyQuestionBoolean = /** @class */ (function (_super) {
61722
62049
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("label", { className: itemClass, onClick: this.handleOnClick },
61723
62050
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("input", { ref: this.checkRef, type: "checkbox", name: this.question.name, value: this.question.booleanValue === null
61724
62051
  ? ""
61725
- : this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, "aria-required": this.question.ariaRequired, "aria-label": this.question.ariaLabel, "aria-invalid": this.question.ariaInvalid, "aria-describedby": this.question.ariaDescribedBy }),
62052
+ : this.question.booleanValue, id: this.question.inputId, className: cssClasses.control, disabled: this.isDisplayMode, checked: this.question.booleanValue || false, onChange: this.handleOnChange, role: this.question.a11y_input_ariaRole, "aria-required": this.question.a11y_input_ariaRequired, "aria-label": this.question.a11y_input_ariaLabel, "aria-labelledby": this.question.a11y_input_ariaLabelledBy, "aria-invalid": this.question.a11y_input_ariaInvalid, "aria-describedby": this.question.a11y_input_ariaDescribedBy }),
61726
62053
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.sliderGhost, onClick: function (event) { return _this.handleOnLabelClick(event, false); } },
61727
62054
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("span", { className: this.question.getLabelCss(false) }, this.renderLocString(this.question.locLabelFalse))),
61728
62055
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.switch, onClick: this.handleOnSwitchClick },
@@ -63260,8 +63587,9 @@ var SurveyQuestionPanelDynamicAddButton = /** @class */ (function (_super) {
63260
63587
  SurveyQuestionPanelDynamicAddButton.prototype.renderElement = function () {
63261
63588
  if (!this.question.canAddPanel)
63262
63589
  return null;
63590
+ var btnText = this.renderLocString(this.question.locPanelAddText);
63263
63591
  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)));
63592
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonAddText }, btnText)));
63265
63593
  };
63266
63594
  return SurveyQuestionPanelDynamicAddButton;
63267
63595
  }(SurveyQuestionPanelDynamicAction));
@@ -63479,8 +63807,9 @@ var SurveyQuestionPanelDynamicRemoveButton = /** @class */ (function (_super) {
63479
63807
  return _this;
63480
63808
  }
63481
63809
  SurveyQuestionPanelDynamicRemoveButton.prototype.renderElement = function () {
63810
+ var btnText = this.renderLocString(this.question.locPanelRemoveText);
63482
63811
  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),
63812
+ react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.buttonRemoveText }, btnText),
63484
63813
  react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span", { className: this.question.cssClasses.iconRemove })));
63485
63814
  };
63486
63815
  return SurveyQuestionPanelDynamicRemoveButton;
@@ -66116,10 +66445,9 @@ __webpack_require__.r(__webpack_exports__);
66116
66445
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyWindow", function() { return SurveyWindow; });
66117
66446
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
66118
66447
  /* 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");
66448
+ /* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! survey-core */ "./src/entries/core.ts");
66449
+ /* harmony import */ var _reactSurvey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reactSurvey */ "./src/react/reactSurvey.tsx");
66450
+ /* 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
66451
  var __extends = (undefined && undefined.__extends) || (function () {
66124
66452
  var extendStatics = function (d, b) {
66125
66453
  extendStatics = Object.setPrototypeOf ||
@@ -66139,7 +66467,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
66139
66467
 
66140
66468
 
66141
66469
 
66142
-
66143
66470
  var PopupSurvey = /** @class */ (function (_super) {
66144
66471
  __extends(PopupSurvey, _super);
66145
66472
  function PopupSurvey(props) {
@@ -66157,46 +66484,65 @@ var PopupSurvey = /** @class */ (function (_super) {
66157
66484
  return _super.prototype.canRender.call(this) && this.popup.isShowing;
66158
66485
  };
66159
66486
  PopupSurvey.prototype.renderElement = function () {
66487
+ var _this = this;
66160
66488
  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
- };
66489
+ var body = this.renderBody();
66490
+ var style = {};
66167
66491
  if (!!this.popup.renderedWidth) {
66168
66492
  style.width = this.popup.renderedWidth;
66169
66493
  style.maxWidth = this.popup.renderedWidth;
66170
66494
  }
66171
- return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style },
66172
- header,
66173
- body));
66495
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRoot, style: style, onScroll: function () { return _this.popup.onScroll(); } },
66496
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssRootContent },
66497
+ header,
66498
+ body)));
66174
66499
  };
66175
66500
  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));
66501
+ var popup = this.popup;
66502
+ var headerCss = popup.cssHeaderRoot;
66503
+ var titleCollapsed = null;
66504
+ var expandCollapseIcon;
66505
+ var closeButton = null;
66506
+ if (popup.isCollapsed) {
66507
+ headerCss += " " + popup.cssRootCollapsedMod;
66508
+ titleCollapsed = this.renderTitleCollapsed(popup);
66509
+ expandCollapseIcon = this.renderExpandIcon();
66510
+ }
66511
+ else {
66512
+ expandCollapseIcon = this.renderCollapseIcon();
66513
+ }
66514
+ if (popup.allowClose) {
66515
+ closeButton = this.renderCloseButton(this.popup);
66516
+ }
66517
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderRoot },
66518
+ titleCollapsed,
66519
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderButtonsContainer },
66520
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCollapseButton, onClick: this.handleOnExpanded }, expandCollapseIcon),
66521
+ closeButton)));
66522
+ };
66523
+ PopupSurvey.prototype.renderTitleCollapsed = function (popup) {
66524
+ if (!popup.locTitle)
66525
+ return null;
66526
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderTitleCollapsed }, popup.locTitle.renderedHtml);
66527
+ };
66528
+ PopupSurvey.prototype.renderExpandIcon = function () {
66529
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-restore_16x16", size: 16 });
66530
+ };
66531
+ PopupSurvey.prototype.renderCollapseIcon = function () {
66532
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-minimize_16x16", size: 16 });
66533
+ };
66534
+ PopupSurvey.prototype.renderCloseButton = function (popup) {
66535
+ return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: popup.cssHeaderCloseButton, onClick: function () { popup.hide(); } },
66536
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_3__["SvgIcon"], { iconName: "icon-close_16x16", size: 16 })));
66190
66537
  };
66191
66538
  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());
66539
+ return react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: this.popup.cssBody }, this.doRender());
66194
66540
  };
66195
66541
  PopupSurvey.prototype.createSurvey = function (newProps) {
66196
66542
  if (!newProps)
66197
66543
  newProps = {};
66198
66544
  _super.prototype.createSurvey.call(this, newProps);
66199
- this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_3__["PopupSurveyModel"](null, this.survey);
66545
+ this.popup = new survey_core__WEBPACK_IMPORTED_MODULE_1__["PopupSurveyModel"](null, this.survey);
66200
66546
  if (newProps.closeOnCompleteTimeout) {
66201
66547
  this.popup.closeOnCompleteTimeout = newProps.closeOnCompleteTimeout;
66202
66548
  }
@@ -66206,7 +66552,7 @@ var PopupSurvey = /** @class */ (function (_super) {
66206
66552
  this.popup.expand();
66207
66553
  };
66208
66554
  return PopupSurvey;
66209
- }(_reactSurvey__WEBPACK_IMPORTED_MODULE_1__["Survey"]));
66555
+ }(_reactSurvey__WEBPACK_IMPORTED_MODULE_2__["Survey"]));
66210
66556
 
66211
66557
  /**
66212
66558
  * Obsolete. Please use PopupSurvey
@@ -66856,12 +67202,11 @@ __webpack_require__.r(__webpack_exports__);
66856
67202
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyProgressToc", function() { return SurveyProgressToc; });
66857
67203
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
66858
67204
  /* 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");
67205
+ /* harmony import */ var _reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reactSurveyNavigationBase */ "./src/react/reactSurveyNavigationBase.tsx");
67206
+ /* harmony import */ var _element_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./element-factory */ "./src/react/element-factory.tsx");
67207
+ /* harmony import */ var _components_list_list__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/list/list */ "./src/react/components/list/list.tsx");
67208
+ /* harmony import */ var _components_popup_popup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/popup/popup */ "./src/react/components/popup/popup.tsx");
67209
+ /* 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
67210
  var __extends = (undefined && undefined.__extends) || (function () {
66866
67211
  var extendStatics = function (d, b) {
66867
67212
  extendStatics = Object.setPrototypeOf ||
@@ -66883,29 +67228,28 @@ var __extends = (undefined && undefined.__extends) || (function () {
66883
67228
 
66884
67229
 
66885
67230
 
66886
-
66887
67231
  var SurveyProgressToc = /** @class */ (function (_super) {
66888
67232
  __extends(SurveyProgressToc, _super);
66889
67233
  function SurveyProgressToc() {
66890
67234
  return _super !== null && _super.apply(this, arguments) || this;
66891
67235
  }
66892
67236
  SurveyProgressToc.prototype.render = function () {
66893
- var tocModel = new survey_core__WEBPACK_IMPORTED_MODULE_1__["TOCModel"](this.props.model);
67237
+ var tocModel = this.props.model;
66894
67238
  var content;
66895
67239
  if (tocModel.isMobile) {
66896
67240
  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 }));
67241
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_svg_icon_svg_icon__WEBPACK_IMPORTED_MODULE_5__["SvgIcon"], { iconName: tocModel.icon, size: 24 }),
67242
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_popup_popup__WEBPACK_IMPORTED_MODULE_4__["Popup"], { model: tocModel.popupModel }));
66899
67243
  }
66900
67244
  else {
66901
- content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_4__["List"], { model: tocModel.listModel });
67245
+ content = react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_components_list_list__WEBPACK_IMPORTED_MODULE_3__["List"], { model: tocModel.listModel });
66902
67246
  }
66903
67247
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: tocModel.containerCss }, content));
66904
67248
  };
66905
67249
  return SurveyProgressToc;
66906
- }(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_2__["SurveyNavigationBase"]));
67250
+ }(_reactSurveyNavigationBase__WEBPACK_IMPORTED_MODULE_1__["SurveyNavigationBase"]));
66907
67251
 
66908
- _element_factory__WEBPACK_IMPORTED_MODULE_3__["ReactElementFactory"].Instance.registerElement("sv-progress-toc", function (props) {
67252
+ _element_factory__WEBPACK_IMPORTED_MODULE_2__["ReactElementFactory"].Instance.registerElement("sv-navigation-toc", function (props) {
66909
67253
  return react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyProgressToc, props);
66910
67254
  });
66911
67255
 
@@ -68816,7 +69160,7 @@ var SurveyQuestionMatrix = /** @class */ (function (_super) {
68816
69160
  for (var i = 0; i < visibleRows.length; i++) {
68817
69161
  var row = visibleRows[i];
68818
69162
  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 }));
69163
+ rows.push(react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SurveyQuestionMatrixRow, { key: key, question: this.question, cssClasses: cssClasses, row: row, isFirst: i == 0 }));
68820
69164
  }
68821
69165
  var header = !this.question.showHeader ? null : (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("thead", null,
68822
69166
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", null,
@@ -68837,6 +69181,11 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68837
69181
  function SurveyQuestionMatrixRow(props) {
68838
69182
  return _super.call(this, props) || this;
68839
69183
  }
69184
+ SurveyQuestionMatrixRow.prototype.getStateElement = function () {
69185
+ if (!!this.row)
69186
+ return this.row.item;
69187
+ return _super.prototype.getStateElement.call(this);
69188
+ };
68840
69189
  Object.defineProperty(SurveyQuestionMatrixRow.prototype, "question", {
68841
69190
  get: function () {
68842
69191
  return this.props.question;
@@ -68874,7 +69223,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68874
69223
  style.minWidth = this.question.rowTitleWidth;
68875
69224
  style.width = this.question.rowTitleWidth;
68876
69225
  }
68877
- rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.question.cssClasses.rowTextCell }, this.wrapCell({ row: this.row }, rowText, "row-header"));
69226
+ rowsTD = react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("td", { style: style, className: this.row.rowTextClasses }, this.wrapCell({ row: this.row }, rowText, "row-header"));
68878
69227
  }
68879
69228
  var tds = this.generateTds();
68880
69229
  return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("tr", { className: this.row.rowClasses || undefined },
@@ -68892,9 +69241,7 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68892
69241
  var key = "value" + i;
68893
69242
  var itemClass = this_1.question.getItemClass(row, column);
68894
69243
  if (this_1.question.hasCellText) {
68895
- var getHandler = !this_1.question.isInputReadOnly
68896
- ? function (column) { return function () { return _this.cellClick(row, column); }; }
68897
- : null;
69244
+ var getHandler = function (column) { return function () { return _this.cellClick(row, column); }; };
68898
69245
  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
69246
  }
68900
69247
  else {
@@ -68904,7 +69251,6 @@ var SurveyQuestionMatrixRow = /** @class */ (function (_super) {
68904
69251
  column: column,
68905
69252
  columnIndex: i,
68906
69253
  cssClasses: this_1.cssClasses,
68907
- isDisplayMode: this_1.isDisplayMode,
68908
69254
  cellChanged: function () { _this.cellClick(_this.row, column); }
68909
69255
  });
68910
69256
  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 +69333,7 @@ var SurveyQuestionMatrixCell = /** @class */ (function (_super) {
68987
69333
  mobileSpan));
68988
69334
  };
68989
69335
  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 }));
69336
+ 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
69337
  };
68992
69338
  return SurveyQuestionMatrixCell;
68993
69339
  }(_reactquestion_element__WEBPACK_IMPORTED_MODULE_1__["ReactSurveyElement"]));
@@ -71016,7 +71362,7 @@ var SurveyQuestionSignaturePad = /** @class */ (function (_super) {
71016
71362
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { className: cssClasses.placeholder, style: { display: this.question.needShowPlaceholder() ? "" : "none" } }, this.renderLocString(this.question.locPlaceholder)),
71017
71363
  react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
71018
71364
  this.renderBackgroundImage(),
71019
- react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: 0, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
71365
+ react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("canvas", { tabIndex: -1, className: this.question.cssClasses.canvas, onBlur: this.question.onBlur })),
71020
71366
  clearButton,
71021
71367
  loadingIndicator));
71022
71368
  };
@@ -71961,8 +72307,8 @@ var settings = {
71961
72307
  * @param message A message to be displayed in the confirm dialog window.
71962
72308
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
71963
72309
  */
71964
- confirmActionAsync: function (message, callback, applyTitle) {
71965
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle);
72310
+ confirmActionAsync: function (message, callback, applyTitle, locale) {
72311
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle, locale);
71966
72312
  },
71967
72313
  /**
71968
72314
  * A minimum width value for all survey elements.
@@ -73420,7 +73766,13 @@ var SurveyElement = /** @class */ (function (_super) {
73420
73766
  });
73421
73767
  SurveyElement.prototype.updateCustomWidgets = function () { };
73422
73768
  SurveyElement.prototype.onSurveyLoad = function () { };
73769
+ Object.defineProperty(SurveyElement.prototype, "wasRendered", {
73770
+ get: function () { return !!this.wasRenderedValue; },
73771
+ enumerable: false,
73772
+ configurable: true
73773
+ });
73423
73774
  SurveyElement.prototype.onFirstRendering = function () {
73775
+ this.wasRenderedValue = true;
73424
73776
  this.ensureCssClassesValue();
73425
73777
  };
73426
73778
  SurveyElement.prototype.endLoadingFromJson = function () {
@@ -73900,7 +74252,7 @@ var SurveyError = /** @class */ (function () {
73900
74252
  this.visible = true;
73901
74253
  this.onUpdateErrorTextCallback = undefined;
73902
74254
  }
73903
- SurveyError.prototype.equalsTo = function (error) {
74255
+ SurveyError.prototype.equals = function (error) {
73904
74256
  if (!error || !error.getErrorType)
73905
74257
  return false;
73906
74258
  if (this.getErrorType() !== error.getErrorType())
@@ -74000,6 +74352,7 @@ __webpack_require__.r(__webpack_exports__);
74000
74352
  /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./header */ "./src/header.ts");
74001
74353
  /* harmony import */ var _surveytimer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./surveytimer */ "./src/surveytimer.ts");
74002
74354
  /* harmony import */ var _surveyTaskManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./surveyTaskManager */ "./src/surveyTaskManager.ts");
74355
+ /* harmony import */ var _surveyToc__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./surveyToc */ "./src/surveyToc.ts");
74003
74356
  var __extends = (undefined && undefined.__extends) || (function () {
74004
74357
  var extendStatics = function (d, b) {
74005
74358
  extendStatics = Object.setPrototypeOf ||
@@ -74042,6 +74395,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
74042
74395
 
74043
74396
 
74044
74397
 
74398
+
74045
74399
 
74046
74400
 
74047
74401
  /**
@@ -74915,8 +75269,8 @@ var SurveyModel = /** @class */ (function (_super) {
74915
75269
  });
74916
75270
  _this.addLayoutElement({
74917
75271
  id: "toc-navigation",
74918
- component: "sv-progress-toc",
74919
- data: _this
75272
+ component: "sv-navigation-toc",
75273
+ data: new _surveyToc__WEBPACK_IMPORTED_MODULE_23__["TOCModel"](_this)
74920
75274
  });
74921
75275
  _this.layoutElements.push({
74922
75276
  id: "navigationbuttons",
@@ -75961,6 +76315,8 @@ var SurveyModel = /** @class */ (function (_super) {
75961
76315
  return this.locale;
75962
76316
  };
75963
76317
  SurveyModel.prototype.locStrsChanged = function () {
76318
+ if (this.isClearingUnsedValues)
76319
+ return;
75964
76320
  _super.prototype.locStrsChanged.call(this);
75965
76321
  if (!this.currentPage)
75966
76322
  return;
@@ -77515,11 +77871,11 @@ var SurveyModel = /** @class */ (function (_super) {
77515
77871
  if (this.isDesignMode)
77516
77872
  return false;
77517
77873
  var index = this.visiblePages.indexOf(page);
77518
- if (index < 0)
77874
+ if (index < 0 || index >= this.visiblePageCount)
77519
77875
  return false;
77520
77876
  if (index === this.currentPageNo)
77521
77877
  return false;
77522
- if (index < this.currentPageNo) {
77878
+ if (index < this.currentPageNo || this.isValidateOnComplete) {
77523
77879
  this.currentPageNo = index;
77524
77880
  return true;
77525
77881
  }
@@ -79636,7 +79992,7 @@ var SurveyModel = /** @class */ (function (_super) {
79636
79992
  }
79637
79993
  };
79638
79994
  /**
79639
- * Uploads a file to server.
79995
+ * Uploads files to a server.
79640
79996
  *
79641
79997
  * The following code shows how to call this method:
79642
79998
  *
@@ -80733,11 +81089,13 @@ var SurveyModel = /** @class */ (function (_super) {
80733
81089
  return name.substring(0, pos);
80734
81090
  };
80735
81091
  SurveyModel.prototype.clearUnusedValues = function () {
81092
+ this.isClearingUnsedValues = true;
80736
81093
  var questions = this.getAllQuestions();
80737
81094
  for (var i = 0; i < questions.length; i++) {
80738
81095
  questions[i].clearUnusedValues();
80739
81096
  }
80740
81097
  this.clearInvisibleQuestionValues();
81098
+ this.isClearingUnsedValues = false;
80741
81099
  };
80742
81100
  SurveyModel.prototype.hasVisibleQuestionByValueName = function (valueName) {
80743
81101
  var questions = this.getQuestionsByValueName(valueName);
@@ -81924,8 +82282,12 @@ var SurveyModel = /** @class */ (function (_super) {
81924
82282
  this.layoutElements.push(layoutElement);
81925
82283
  return existingLayoutElement;
81926
82284
  };
81927
- SurveyModel.prototype.removeLayoutElement = function (layoutElementId) {
82285
+ SurveyModel.prototype.findLayoutElement = function (layoutElementId) {
81928
82286
  var layoutElement = this.layoutElements.filter(function (a) { return a.id === layoutElementId; })[0];
82287
+ return layoutElement;
82288
+ };
82289
+ SurveyModel.prototype.removeLayoutElement = function (layoutElementId) {
82290
+ var layoutElement = this.findLayoutElement(layoutElementId);
81929
82291
  if (!!layoutElement) {
81930
82292
  var layoutElementIndex = this.layoutElements.indexOf(layoutElement);
81931
82293
  this.layoutElements.splice(layoutElementIndex, 1);
@@ -81949,7 +82311,7 @@ var SurveyModel = /** @class */ (function (_super) {
81949
82311
  }
81950
82312
  }
81951
82313
  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];
82314
+ var headerLayoutElement = this.findLayoutElement("advanced-header");
81953
82315
  var advHeader = headerLayoutElement && headerLayoutElement.data;
81954
82316
  var isBelowHeader = !advHeader || advHeader.hasBackground;
81955
82317
  if (container === "header" && !isBelowHeader) {
@@ -82051,6 +82413,14 @@ var SurveyModel = /** @class */ (function (_super) {
82051
82413
  this.removeScrollEventListener();
82052
82414
  this.destroyResizeObserver();
82053
82415
  this.rootElement = undefined;
82416
+ if (this.layoutElements) {
82417
+ for (var i = 0; i < this.layoutElements.length; i++) {
82418
+ if (!!this.layoutElements[i].data && this.layoutElements[i].data !== this && this.layoutElements[i].data.dispose) {
82419
+ this.layoutElements[i].data.dispose();
82420
+ }
82421
+ }
82422
+ this.layoutElements.splice(0, this.layoutElements.length);
82423
+ }
82054
82424
  _super.prototype.dispose.call(this);
82055
82425
  this.editingObj = null;
82056
82426
  if (!this.pages)
@@ -82116,7 +82486,7 @@ var SurveyModel = /** @class */ (function (_super) {
82116
82486
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
82117
82487
  onSet: function (newValue, target) {
82118
82488
  if (newValue === "advanced") {
82119
- var layoutElement = target.layoutElements.filter(function (a) { return a.id === "advanced-header"; })[0];
82489
+ var layoutElement = target.findLayoutElement("advanced-header");
82120
82490
  if (!layoutElement) {
82121
82491
  var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
82122
82492
  advHeader.logoPositionX = target.logoPosition === "right" ? "right" : "left";
@@ -82352,7 +82722,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
82352
82722
  {
82353
82723
  name: "checkErrorsMode",
82354
82724
  default: "onNextPage",
82355
- choices: ["onNextPage", "onValueChanged", "onValueChanging", "onComplete"],
82725
+ choices: ["onNextPage", "onValueChanged", "onComplete"],
82356
82726
  },
82357
82727
  {
82358
82728
  name: "textUpdateMode",
@@ -82972,12 +83342,12 @@ function createTOCListModel(survey, onAction) {
82972
83342
  if (!!item.action()) {
82973
83343
  listModel.selectedItem = item;
82974
83344
  }
82975
- }, true, items.filter(function (i) { return i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0]);
83345
+ }, 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
83346
  listModel.allowSelection = false;
82977
83347
  listModel.locOwner = survey;
82978
83348
  listModel.searchEnabled = false;
82979
83349
  survey.onCurrentPageChanged.add(function (s, o) {
82980
- listModel.selectedItem = items.filter(function (i) { return i.id === survey.currentPage.name; })[0];
83350
+ listModel.selectedItem = items.filter(function (i) { return !!survey.currentPage && i.id === survey.currentPage.name; })[0];
82981
83351
  });
82982
83352
  return listModel;
82983
83353
  }
@@ -83582,6 +83952,13 @@ var Trigger = /** @class */ (function (_super) {
83582
83952
  }
83583
83953
  return res;
83584
83954
  };
83955
+ Object.defineProperty(Trigger.prototype, "isInternal", {
83956
+ get: function () {
83957
+ return this.isGhost === true;
83958
+ },
83959
+ enumerable: false,
83960
+ configurable: true
83961
+ });
83585
83962
  Object.defineProperty(Trigger.prototype, "operator", {
83586
83963
  get: function () {
83587
83964
  return this.getPropertyValue("operator", "equal");
@@ -84518,8 +84895,11 @@ var PopupUtils = /** @class */ (function () {
84518
84895
  }
84519
84896
  return { left: Math.round(currentLeft), top: Math.round(currentTop) };
84520
84897
  };
84521
- PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight) {
84522
- var result = { height: height, top: top };
84898
+ PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition) {
84899
+ var result;
84900
+ if (verticalPosition === "top") {
84901
+ result = { height: height, top: top };
84902
+ }
84523
84903
  if (top < 0) {
84524
84904
  result = { height: height + top, top: 0 };
84525
84905
  }
@@ -84897,7 +85277,7 @@ function confirmAction(message) {
84897
85277
  return _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc(message);
84898
85278
  return confirm(message);
84899
85279
  }
84900
- function confirmActionAsync(message, funcOnYes, funcOnNo) {
85280
+ function confirmActionAsync(message, funcOnYes, funcOnNo, locale) {
84901
85281
  var callbackFunc = function (res) {
84902
85282
  if (res)
84903
85283
  funcOnYes();
@@ -84905,7 +85285,7 @@ function confirmActionAsync(message, funcOnYes, funcOnNo) {
84905
85285
  funcOnNo();
84906
85286
  };
84907
85287
  if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync) {
84908
- if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc))
85288
+ if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc, undefined, locale))
84909
85289
  return;
84910
85290
  }
84911
85291
  callbackFunc(confirmAction(message));
@@ -85012,7 +85392,7 @@ function scrollElementByChildId(id) {
85012
85392
  return;
85013
85393
  var scrollableEl = findScrollableParent(el);
85014
85394
  if (!!scrollableEl) {
85015
- scrollableEl.dispatchEvent(new CustomEvent("scroll"));
85395
+ setTimeout(function () { return scrollableEl.dispatchEvent(new CustomEvent("scroll")); }, 10);
85016
85396
  }
85017
85397
  }
85018
85398
  function navigateToUrl(url) {
@@ -85254,7 +85634,7 @@ var Logger = /** @class */ (function () {
85254
85634
  return Logger;
85255
85635
  }());
85256
85636
 
85257
- function showConfirmDialog(message, callback, applyTitle) {
85637
+ function showConfirmDialog(message, callback, applyTitle, locale) {
85258
85638
  var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](undefined);
85259
85639
  var popupViewModel = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].showDialog({
85260
85640
  componentName: "sv-string-viewer",
@@ -85275,9 +85655,9 @@ function showConfirmDialog(message, callback, applyTitle) {
85275
85655
  var toolbar = popupViewModel.footerToolbar;
85276
85656
  var applyBtn = toolbar.getActionById("apply");
85277
85657
  var cancelBtn = toolbar.getActionById("cancel");
85278
- cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel");
85658
+ cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel", locale);
85279
85659
  cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
85280
- applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok");
85660
+ applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
85281
85661
  applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
85282
85662
  popupViewModel.width = "452px";
85283
85663
  return true;