survey-core 1.9.126 → 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.
Files changed (238) hide show
  1. package/defaultV2.css +10 -5
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +10 -5
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/polish.js +1 -1
  72. package/i18n/polish.min.js +1 -1
  73. package/i18n/portuguese-br.js +1 -1
  74. package/i18n/portuguese-br.min.js +1 -1
  75. package/i18n/portuguese.js +1 -1
  76. package/i18n/portuguese.min.js +1 -1
  77. package/i18n/romanian.js +1 -1
  78. package/i18n/romanian.min.js +1 -1
  79. package/i18n/russian.js +1 -1
  80. package/i18n/russian.min.js +1 -1
  81. package/i18n/serbian.js +1 -1
  82. package/i18n/serbian.min.js +1 -1
  83. package/i18n/simplified-chinese.js +1 -1
  84. package/i18n/simplified-chinese.min.js +1 -1
  85. package/i18n/slovak.js +1 -1
  86. package/i18n/slovak.min.js +1 -1
  87. package/i18n/spanish.js +1 -1
  88. package/i18n/spanish.min.js +1 -1
  89. package/i18n/swahili.js +1 -1
  90. package/i18n/swahili.min.js +1 -1
  91. package/i18n/swedish.js +1 -1
  92. package/i18n/swedish.min.js +1 -1
  93. package/i18n/tajik.js +1 -1
  94. package/i18n/tajik.min.js +1 -1
  95. package/i18n/telugu.js +1 -1
  96. package/i18n/telugu.min.js +1 -1
  97. package/i18n/thai.js +1 -1
  98. package/i18n/thai.min.js +1 -1
  99. package/i18n/traditional-chinese.js +1 -1
  100. package/i18n/traditional-chinese.min.js +1 -1
  101. package/i18n/turkish.js +1 -1
  102. package/i18n/turkish.min.js +1 -1
  103. package/i18n/ukrainian.js +1 -1
  104. package/i18n/ukrainian.min.js +1 -1
  105. package/i18n/urdu.js +1 -1
  106. package/i18n/urdu.min.js +1 -1
  107. package/i18n/vietnamese.js +1 -1
  108. package/i18n/vietnamese.min.js +1 -1
  109. package/i18n/welsh.js +1 -1
  110. package/i18n/welsh.min.js +1 -1
  111. package/modern.css +1 -1
  112. package/modern.fontless.css +1 -1
  113. package/modern.fontless.min.css +1 -1
  114. package/modern.min.css +1 -1
  115. package/package.json +1 -1
  116. package/plugins/bootstrap-integration.js +1 -1
  117. package/plugins/bootstrap-integration.min.js +1 -1
  118. package/plugins/bootstrap-material-integration.js +1 -1
  119. package/plugins/bootstrap-material-integration.min.js +1 -1
  120. package/survey.core.js +253 -115
  121. package/survey.core.js.map +1 -1
  122. package/survey.core.min.js +3 -3
  123. package/survey.css +1 -1
  124. package/survey.i18n.js +1 -1
  125. package/survey.i18n.min.js +1 -1
  126. package/survey.min.css +1 -1
  127. package/themes/borderless-dark-panelless.js +1 -1
  128. package/themes/borderless-dark-panelless.min.js +1 -1
  129. package/themes/borderless-dark.js +1 -1
  130. package/themes/borderless-dark.min.js +1 -1
  131. package/themes/borderless-light-panelless..js +1 -1
  132. package/themes/borderless-light-panelless..min.js +1 -1
  133. package/themes/borderless-light.js +1 -1
  134. package/themes/borderless-light.min.js +1 -1
  135. package/themes/contrast-dark-panelless.js +1 -1
  136. package/themes/contrast-dark-panelless.min.js +1 -1
  137. package/themes/contrast-dark.js +1 -1
  138. package/themes/contrast-dark.min.js +1 -1
  139. package/themes/contrast-light-panelless.js +1 -1
  140. package/themes/contrast-light-panelless.min.js +1 -1
  141. package/themes/contrast-light.js +1 -1
  142. package/themes/contrast-light.min.js +1 -1
  143. package/themes/default-dark-panelless.js +1 -1
  144. package/themes/default-dark-panelless.min.js +1 -1
  145. package/themes/default-dark.js +1 -1
  146. package/themes/default-dark.min.js +1 -1
  147. package/themes/default-light-panelless.js +1 -1
  148. package/themes/default-light-panelless.min.js +1 -1
  149. package/themes/default-light.js +1 -1
  150. package/themes/default-light.min.js +1 -1
  151. package/themes/doubleborder-dark-panelless.js +1 -1
  152. package/themes/doubleborder-dark-panelless.min.js +1 -1
  153. package/themes/doubleborder-dark.js +1 -1
  154. package/themes/doubleborder-dark.min.js +1 -1
  155. package/themes/doubleborder-light-panelles.js +1 -1
  156. package/themes/doubleborder-light-panelles.min.js +1 -1
  157. package/themes/doubleborder-light.js +1 -1
  158. package/themes/doubleborder-light.min.js +1 -1
  159. package/themes/flat-dark-panelless.js +1 -1
  160. package/themes/flat-dark-panelless.min.js +1 -1
  161. package/themes/flat-dark.js +1 -1
  162. package/themes/flat-dark.min.js +1 -1
  163. package/themes/flat-light-panelless.js +1 -1
  164. package/themes/flat-light-panelless.min.js +1 -1
  165. package/themes/flat-light.js +1 -1
  166. package/themes/flat-light.min.js +1 -1
  167. package/themes/index.js +1 -1
  168. package/themes/index.min.js +1 -1
  169. package/themes/layered-dark-panelless.js +1 -1
  170. package/themes/layered-dark-panelless.min.js +1 -1
  171. package/themes/layered-dark.js +1 -1
  172. package/themes/layered-dark.min.js +1 -1
  173. package/themes/layered-light-panelless.js +1 -1
  174. package/themes/layered-light-panelless.min.js +1 -1
  175. package/themes/layered-light.js +1 -1
  176. package/themes/layered-light.min.js +1 -1
  177. package/themes/plain-dark-panelless.js +1 -1
  178. package/themes/plain-dark-panelless.min.js +1 -1
  179. package/themes/plain-dark.js +1 -1
  180. package/themes/plain-dark.min.js +1 -1
  181. package/themes/plain-light-panelless.js +1 -1
  182. package/themes/plain-light-panelless.min.js +1 -1
  183. package/themes/plain-light.js +1 -1
  184. package/themes/plain-light.min.js +1 -1
  185. package/themes/sharp-dark-panelless.js +1 -1
  186. package/themes/sharp-dark-panelless.min.js +1 -1
  187. package/themes/sharp-dark.js +1 -1
  188. package/themes/sharp-dark.min.js +1 -1
  189. package/themes/sharp-light-panelless.js +1 -1
  190. package/themes/sharp-light-panelless.min.js +1 -1
  191. package/themes/sharp-light.js +1 -1
  192. package/themes/sharp-light.min.js +1 -1
  193. package/themes/solid-dark-panelless.js +1 -1
  194. package/themes/solid-dark-panelless.min.js +1 -1
  195. package/themes/solid-dark.js +1 -1
  196. package/themes/solid-dark.min.js +1 -1
  197. package/themes/solid-light-panelless.js +1 -1
  198. package/themes/solid-light-panelless.min.js +1 -1
  199. package/themes/solid-light.js +1 -1
  200. package/themes/solid-light.min.js +1 -1
  201. package/themes/three-dimensional-dark-panelless.js +1 -1
  202. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  203. package/themes/three-dimensional-dark.js +1 -1
  204. package/themes/three-dimensional-dark.min.js +1 -1
  205. package/themes/three-dimensional-light-panelless.js +1 -1
  206. package/themes/three-dimensional-light-panelless.min.js +1 -1
  207. package/themes/three-dimensional-light.js +1 -1
  208. package/themes/three-dimensional-light.min.js +1 -1
  209. package/ts3.4/typings/base-interfaces.d.ts +4 -0
  210. package/ts3.4/typings/base.d.ts +2 -2
  211. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
  212. package/ts3.4/typings/helpers.d.ts +1 -0
  213. package/ts3.4/typings/jsonobject.d.ts +12 -4
  214. package/ts3.4/typings/question_boolean.d.ts +2 -0
  215. package/ts3.4/typings/question_custom.d.ts +8 -0
  216. package/ts3.4/typings/question_matrix.d.ts +5 -0
  217. package/ts3.4/typings/question_matrixdropdowncolumn.d.ts +0 -1
  218. package/ts3.4/typings/question_ranking.d.ts +2 -0
  219. package/ts3.4/typings/settings.d.ts +1 -1
  220. package/ts3.4/typings/survey.d.ts +1 -1
  221. package/ts3.4/typings/trigger.d.ts +2 -0
  222. package/ts3.4/typings/utils/popup.d.ts +1 -4
  223. package/ts3.4/typings/utils/utils.d.ts +2 -2
  224. package/typings/base-interfaces.d.ts +4 -0
  225. package/typings/base.d.ts +2 -2
  226. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  227. package/typings/helpers.d.ts +1 -0
  228. package/typings/jsonobject.d.ts +12 -4
  229. package/typings/question_boolean.d.ts +2 -0
  230. package/typings/question_custom.d.ts +8 -0
  231. package/typings/question_matrix.d.ts +5 -0
  232. package/typings/question_matrixdropdowncolumn.d.ts +0 -1
  233. package/typings/question_ranking.d.ts +2 -0
  234. package/typings/settings.d.ts +1 -1
  235. package/typings/survey.d.ts +1 -1
  236. package/typings/trigger.d.ts +2 -0
  237. package/typings/utils/popup.d.ts +1 -4
  238. package/typings/utils/utils.d.ts +2 -2
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.126
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
  */
@@ -2041,8 +2041,8 @@ var Base = /** @class */ (function () {
2041
2041
  * Returns a JSON object that corresponds to the current SurveyJS object.
2042
2042
  * @see fromJSON
2043
2043
  */
2044
- Base.prototype.toJSON = function () {
2045
- 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);
2046
2046
  };
2047
2047
  /**
2048
2048
  * Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
@@ -5674,6 +5674,7 @@ var defaultV2Css = {
5674
5674
  small: "sd-row__question--small",
5675
5675
  controlDisabled: "sd-input--disabled",
5676
5676
  constrolWithCharacterCounter: "sd-text__character-counter",
5677
+ characterCounterBig: "sd-text__character-counter--big",
5677
5678
  content: "sd-text__content sd-question__content",
5678
5679
  remainingCharacterCounter: "sd-remaining-character-counter",
5679
5680
  onError: "sd-input--error"
@@ -7765,17 +7766,20 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7765
7766
  var rankingChoices = questionModel.rankingChoices;
7766
7767
  var unRankingChoices = questionModel.unRankingChoices;
7767
7768
  var item = unRankingChoices[fromIndex];
7769
+ questionModel.isValueSetByUser = true;
7768
7770
  rankingChoices.splice(toIndex, 0, item);
7769
7771
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
7770
7772
  };
7771
7773
  DragDropRankingSelectToRank.prototype.unselectFromRank = function (questionModel, fromIndex, toIndex) {
7772
7774
  var rankingChoices = questionModel.rankingChoices;
7775
+ questionModel.isValueSetByUser = true;
7773
7776
  rankingChoices.splice(fromIndex, 1);
7774
7777
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
7775
7778
  };
7776
7779
  DragDropRankingSelectToRank.prototype.reorderRankedItem = function (questionModel, fromIndex, toIndex) {
7777
7780
  var rankingChoices = questionModel.rankingChoices;
7778
7781
  var item = rankingChoices[fromIndex];
7782
+ questionModel.isValueSetByUser = true;
7779
7783
  rankingChoices.splice(fromIndex, 1);
7780
7784
  rankingChoices.splice(toIndex, 0, item);
7781
7785
  questionModel.setPropertyValue("rankingChoices", rankingChoices);
@@ -9368,8 +9372,8 @@ __webpack_require__.r(__webpack_exports__);
9368
9372
  //import "../../modern.scss";
9369
9373
  var Version;
9370
9374
  var ReleaseDate;
9371
- Version = "" + "1.9.126";
9372
- ReleaseDate = "" + "2024-01-16";
9375
+ Version = "" + "1.9.127";
9376
+ ReleaseDate = "" + "2024-01-23";
9373
9377
  function checkLibraryVersion(ver, libraryName) {
9374
9378
  if (Version != ver) {
9375
9379
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -16100,6 +16104,27 @@ var Helpers = /** @class */ (function () {
16100
16104
  }
16101
16105
  return val;
16102
16106
  };
16107
+ Helpers.compareVerions = function (ver1, ver2) {
16108
+ if (!ver1 && !ver2)
16109
+ return 0;
16110
+ var ver1Ar = ver1.split(".");
16111
+ var ver2Ar = ver2.split(".");
16112
+ var len1 = ver1Ar.length;
16113
+ var len2 = ver2Ar.length;
16114
+ for (var i = 0; i < len1 && i < len2; i++) {
16115
+ var str1 = ver1Ar[i];
16116
+ var str2 = ver2Ar[i];
16117
+ if (str1.length === str2.length) {
16118
+ if (str1 !== str2) {
16119
+ return str1 < str2 ? -1 : 1;
16120
+ }
16121
+ }
16122
+ else {
16123
+ return str1.length < str2.length ? -1 : 1;
16124
+ }
16125
+ }
16126
+ return len1 === len2 ? 0 : (len1 < len2 ? -1 : 1);
16127
+ };
16103
16128
  return Helpers;
16104
16129
  }());
16105
16130
 
@@ -17874,6 +17899,21 @@ var JsonObjectProperty = /** @class */ (function () {
17874
17899
  enumerable: false,
17875
17900
  configurable: true
17876
17901
  });
17902
+ JsonObjectProperty.prototype.isAvailableInVersion = function (ver) {
17903
+ if (!!this.alternativeName)
17904
+ return true;
17905
+ return this.isAvailableInVersionCore(ver);
17906
+ };
17907
+ JsonObjectProperty.prototype.getSerializedName = function (ver) {
17908
+ if (!this.alternativeName)
17909
+ return this.name;
17910
+ return this.isAvailableInVersionCore(ver) ? this.name : this.alternativeName;
17911
+ };
17912
+ JsonObjectProperty.prototype.isAvailableInVersionCore = function (ver) {
17913
+ if (!ver || !this.version)
17914
+ return true;
17915
+ return _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].compareVerions(this.version, ver) <= 0;
17916
+ };
17877
17917
  Object.defineProperty(JsonObjectProperty.prototype, "isLocalizable", {
17878
17918
  get: function () {
17879
17919
  return this.isLocalizableValue != null ? this.isLocalizableValue : false;
@@ -17954,6 +17994,7 @@ var JsonObjectProperty = /** @class */ (function () {
17954
17994
  "className",
17955
17995
  "alternativeName",
17956
17996
  "layout",
17997
+ "version",
17957
17998
  "classNamePart",
17958
17999
  "baseClassName",
17959
18000
  "defaultValue",
@@ -18402,6 +18443,9 @@ var JsonMetadataClass = /** @class */ (function () {
18402
18443
  if (propInfo.layout) {
18403
18444
  prop.layout = propInfo.layout;
18404
18445
  }
18446
+ if (propInfo.version) {
18447
+ prop.version = propInfo.version;
18448
+ }
18405
18449
  if (propInfo.dependsOn) {
18406
18450
  this.addDependsOnProperties(prop, propInfo.dependsOn);
18407
18451
  }
@@ -18546,36 +18590,54 @@ var JsonMetadata = /** @class */ (function () {
18546
18590
  JsonMetadata.prototype.getPropertiesByObj = function (obj) {
18547
18591
  if (!obj || !obj.getType)
18548
18592
  return [];
18549
- var res = {};
18550
18593
  var props = this.getProperties(obj.getType());
18551
- for (var i = 0; i < props.length; i++) {
18552
- res[props[i].name] = props[i];
18553
- }
18554
- var dynamicProps = !!obj.getDynamicType
18555
- ? this.getProperties(obj.getDynamicType())
18556
- : null;
18557
- if (dynamicProps && dynamicProps.length > 0) {
18558
- for (var i = 0; i < dynamicProps.length; i++) {
18559
- var dProp = dynamicProps[i];
18560
- if (!!res[dProp.name])
18561
- continue;
18562
- res[dProp.name] = dProp;
18594
+ var dynamicProps = this.getDynamicPropertiesByObj(obj);
18595
+ return [].concat(props).concat(dynamicProps);
18596
+ };
18597
+ JsonMetadata.prototype.addDynamicPropertiesIntoObj = function (dest, src, props) {
18598
+ var _this = this;
18599
+ props.forEach(function (prop) {
18600
+ _this.addDynamicPropertyIntoObj(dest, src, prop.name, false);
18601
+ if (prop.serializationProperty) {
18602
+ _this.addDynamicPropertyIntoObj(dest, src, prop.serializationProperty, true);
18563
18603
  }
18604
+ if (prop.alternativeName) {
18605
+ _this.addDynamicPropertyIntoObj(dest, src, prop.alternativeName, false);
18606
+ }
18607
+ });
18608
+ };
18609
+ JsonMetadata.prototype.addDynamicPropertyIntoObj = function (dest, src, propName, isReadOnly) {
18610
+ var desc = {
18611
+ configurable: true,
18612
+ get: function () {
18613
+ return src[propName];
18614
+ },
18615
+ };
18616
+ if (!isReadOnly) {
18617
+ desc["set"] = function (v) {
18618
+ src[propName] = v;
18619
+ };
18564
18620
  }
18565
- return Object.keys(res).map(function (key) { return res[key]; });
18621
+ Object.defineProperty(dest, propName, desc);
18566
18622
  };
18567
18623
  JsonMetadata.prototype.getDynamicPropertiesByObj = function (obj, dynamicType) {
18568
18624
  if (dynamicType === void 0) { dynamicType = null; }
18569
- if (!obj || !obj.getType || (!obj.getDynamicType && !dynamicType))
18625
+ if (!obj || !obj.getType)
18626
+ return [];
18627
+ if (!!obj.getDynamicProperties)
18628
+ return obj.getDynamicProperties();
18629
+ if (!obj.getDynamicType && !dynamicType)
18570
18630
  return [];
18571
- var objType = obj.getType();
18572
18631
  var dType = !!dynamicType ? dynamicType : obj.getDynamicType();
18573
- if (!dType)
18632
+ return this.getDynamicPropertiesByTypes(obj.getType(), dType);
18633
+ };
18634
+ JsonMetadata.prototype.getDynamicPropertiesByTypes = function (objType, dynamicType, invalidNames) {
18635
+ if (!dynamicType)
18574
18636
  return [];
18575
- var cacheType = dType + "-" + objType;
18637
+ var cacheType = dynamicType + "-" + objType;
18576
18638
  if (this.dynamicPropsCache[cacheType])
18577
18639
  return this.dynamicPropsCache[cacheType];
18578
- var dynamicProps = this.getProperties(dType);
18640
+ var dynamicProps = this.getProperties(dynamicType);
18579
18641
  if (!dynamicProps || dynamicProps.length == 0)
18580
18642
  return [];
18581
18643
  var hash = {};
@@ -18584,9 +18646,11 @@ var JsonMetadata = /** @class */ (function () {
18584
18646
  hash[props[i].name] = props[i];
18585
18647
  }
18586
18648
  var res = [];
18587
- for (var i = 0; i < dynamicProps.length; i++) {
18588
- var dProp = dynamicProps[i];
18589
- if (!hash[dProp.name]) {
18649
+ if (!invalidNames)
18650
+ invalidNames = [];
18651
+ for (var i_1 = 0; i_1 < dynamicProps.length; i_1++) {
18652
+ var dProp = dynamicProps[i_1];
18653
+ if (!hash[dProp.name] && invalidNames.indexOf(dProp.name) < 0) {
18590
18654
  res.push(dProp);
18591
18655
  }
18592
18656
  }
@@ -19081,9 +19145,8 @@ var JsonObject = /** @class */ (function () {
19081
19145
  enumerable: false,
19082
19146
  configurable: true
19083
19147
  });
19084
- JsonObject.prototype.toJsonObject = function (obj, storeDefaults) {
19085
- if (storeDefaults === void 0) { storeDefaults = false; }
19086
- return this.toJsonObjectCore(obj, null, storeDefaults);
19148
+ JsonObject.prototype.toJsonObject = function (obj, options) {
19149
+ return this.toJsonObjectCore(obj, null, options);
19087
19150
  };
19088
19151
  JsonObject.prototype.toObject = function (jsonObj, obj, options) {
19089
19152
  this.toObjectCore(jsonObj, obj, options);
@@ -19132,8 +19195,7 @@ var JsonObject = /** @class */ (function () {
19132
19195
  obj.endLoadingFromJson();
19133
19196
  }
19134
19197
  };
19135
- JsonObject.prototype.toJsonObjectCore = function (obj, property, storeDefaults) {
19136
- if (storeDefaults === void 0) { storeDefaults = false; }
19198
+ JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
19137
19199
  if (!obj || !obj.getType)
19138
19200
  return obj;
19139
19201
  if (typeof obj.getData === "function")
@@ -19142,61 +19204,67 @@ var JsonObject = /** @class */ (function () {
19142
19204
  if (property != null && !property.className) {
19143
19205
  result[JsonObject.typePropertyName] = property.getObjType(obj.getType());
19144
19206
  }
19145
- this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, storeDefaults);
19146
- this.propertiesToJson(obj, this.getDynamicProperties(obj), result, storeDefaults);
19207
+ var storeDefaults = options === true;
19208
+ if (!options || options === true) {
19209
+ options = {};
19210
+ }
19211
+ if (storeDefaults) {
19212
+ options.storeDefaults = storeDefaults;
19213
+ }
19214
+ this.propertiesToJson(obj, Serializer.getProperties(obj.getType()), result, options);
19215
+ this.propertiesToJson(obj, this.getDynamicProperties(obj), result, options);
19147
19216
  return result;
19148
19217
  };
19149
19218
  JsonObject.prototype.getDynamicProperties = function (obj) {
19150
19219
  return Serializer.getDynamicPropertiesByObj(obj);
19151
19220
  };
19152
- JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, properties) {
19153
- if (!obj.getDynamicPropertyName)
19154
- return properties;
19155
- var dynamicPropName = obj.getDynamicPropertyName();
19156
- if (!dynamicPropName)
19157
- return properties;
19158
- if (jsonObj[dynamicPropName]) {
19159
- obj[dynamicPropName] = jsonObj[dynamicPropName];
19160
- }
19161
- var dynamicProperties = this.getDynamicProperties(obj);
19162
- var res = [];
19163
- for (var i = 0; i < properties.length; i++) {
19164
- res.push(properties[i]);
19165
- }
19166
- for (var i = 0; i < dynamicProperties.length; i++) {
19167
- res.push(dynamicProperties[i]);
19221
+ JsonObject.prototype.addDynamicProperties = function (obj, jsonObj, props) {
19222
+ if (!obj.getDynamicPropertyName && !obj.getDynamicProperties)
19223
+ return props;
19224
+ if (obj.getDynamicPropertyName) {
19225
+ var dynamicPropName = obj.getDynamicPropertyName();
19226
+ if (!dynamicPropName)
19227
+ return props;
19228
+ if (dynamicPropName && jsonObj[dynamicPropName]) {
19229
+ obj[dynamicPropName] = jsonObj[dynamicPropName];
19230
+ }
19168
19231
  }
19169
- return res;
19232
+ var dynamicProps = this.getDynamicProperties(obj);
19233
+ return dynamicProps.length === 0 ? props : [].concat(props).concat(dynamicProps);
19170
19234
  };
19171
- JsonObject.prototype.propertiesToJson = function (obj, properties, json, storeDefaults) {
19172
- if (storeDefaults === void 0) { storeDefaults = false; }
19235
+ JsonObject.prototype.propertiesToJson = function (obj, properties, json, options) {
19173
19236
  for (var i = 0; i < properties.length; i++) {
19174
- this.valueToJson(obj, json, properties[i], storeDefaults);
19237
+ this.valueToJson(obj, json, properties[i], options);
19175
19238
  }
19176
19239
  };
19177
- JsonObject.prototype.valueToJson = function (obj, result, property, storeDefaults) {
19178
- if (storeDefaults === void 0) { storeDefaults = false; }
19179
- if (property.isSerializable === false ||
19180
- (property.isLightSerializable === false && this.lightSerializing))
19240
+ JsonObject.prototype.valueToJson = function (obj, result, prop, options) {
19241
+ if (!options)
19242
+ options = {};
19243
+ if (prop.isSerializable === false || (prop.isLightSerializable === false && this.lightSerializing))
19244
+ return;
19245
+ if (options.version && !prop.isAvailableInVersion(options.version))
19181
19246
  return;
19182
- var value = property.getSerializableValue(obj);
19183
- if (!storeDefaults && property.isDefaultValueByObj(obj, value))
19247
+ var value = prop.getSerializableValue(obj);
19248
+ if (!options.storeDefaults && prop.isDefaultValueByObj(obj, value))
19184
19249
  return;
19185
19250
  if (this.isValueArray(value)) {
19186
19251
  var arrValue = [];
19187
19252
  for (var i = 0; i < value.length; i++) {
19188
- arrValue.push(this.toJsonObjectCore(value[i], property, storeDefaults));
19253
+ arrValue.push(this.toJsonObjectCore(value[i], prop, options));
19189
19254
  }
19190
19255
  value = arrValue.length > 0 ? arrValue : null;
19191
19256
  }
19192
19257
  else {
19193
- value = this.toJsonObjectCore(value, property, storeDefaults);
19258
+ value = this.toJsonObjectCore(value, prop, options);
19194
19259
  }
19260
+ if (value === undefined || value === null)
19261
+ return;
19262
+ var name = prop.getSerializedName(options.version);
19195
19263
  var hasValue = typeof obj["getPropertyValue"] === "function" &&
19196
- obj["getPropertyValue"](property.name, null) !== null;
19197
- if ((storeDefaults && hasValue) || !property.isDefaultValueByObj(obj, value)) {
19198
- if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, property, value, result)) {
19199
- result[property.name] = value;
19264
+ obj["getPropertyValue"](name, null) !== null;
19265
+ if ((options.storeDefaults && hasValue) || !prop.isDefaultValueByObj(obj, value)) {
19266
+ if (!Serializer.onSerializingProperty || !Serializer.onSerializingProperty(obj, prop, value, result)) {
19267
+ result[name] = this.removePosOnValueToJson(prop, value);
19200
19268
  }
19201
19269
  }
19202
19270
  };
@@ -19236,6 +19304,14 @@ var JsonObject = /** @class */ (function () {
19236
19304
  }
19237
19305
  }
19238
19306
  };
19307
+ JsonObject.prototype.removePosOnValueToJson = function (property, value) {
19308
+ if (!property.isCustom || !value)
19309
+ return value;
19310
+ if (!!value[JsonObject.positionPropertyName]) {
19311
+ delete value[JsonObject.positionPropertyName];
19312
+ }
19313
+ return value;
19314
+ };
19239
19315
  JsonObject.prototype.removePos = function (property, value) {
19240
19316
  if (!property || !property.type || property.type.indexOf("value") < 0)
19241
19317
  return;
@@ -23891,8 +23967,8 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
23891
23967
  this.popupDirection = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePopupDirection(verticalPosition, actualHorizontalPosition);
23892
23968
  var pos = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].calculatePosition(targetElementRect, height, width + marginLeft + marginRight, verticalPosition, actualHorizontalPosition, this.showHeader, this.model.positionMode);
23893
23969
  if (!!window) {
23894
- var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, window.innerHeight);
23895
- if (!!newVerticalDimensions.height) {
23970
+ var newVerticalDimensions = _utils_popup__WEBPACK_IMPORTED_MODULE_1__["PopupUtils"].getCorrectedVerticalDimensions(pos.top, height, window.innerHeight, verticalPosition);
23971
+ if (!!newVerticalDimensions) {
23896
23972
  this.height = newVerticalDimensions.height + "px";
23897
23973
  pos.top = newVerticalDimensions.top;
23898
23974
  }
@@ -31240,6 +31316,21 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
31240
31316
  QuestionBooleanModel.prototype.createActionContainer = function (allowAdaptiveActions) {
31241
31317
  return _super.prototype.createActionContainer.call(this, this.renderAs !== "checkbox");
31242
31318
  };
31319
+ Object.defineProperty(QuestionBooleanModel.prototype, "isNewA11yStructure", {
31320
+ //a11y
31321
+ get: function () {
31322
+ return true;
31323
+ },
31324
+ enumerable: false,
31325
+ configurable: true
31326
+ });
31327
+ Object.defineProperty(QuestionBooleanModel.prototype, "a11y_input_ariaRole", {
31328
+ get: function () {
31329
+ return "switch";
31330
+ },
31331
+ enumerable: false,
31332
+ configurable: true
31333
+ });
31243
31334
  __decorate([
31244
31335
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
31245
31336
  ], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
@@ -32655,6 +32746,35 @@ var ComponentQuestionJSON = /** @class */ (function () {
32655
32746
  enumerable: false,
32656
32747
  configurable: true
32657
32748
  });
32749
+ ComponentQuestionJSON.prototype.getDynamicProperties = function () {
32750
+ if (!Array.isArray(this.dynamicProperties)) {
32751
+ }
32752
+ this.dynamicProperties = this.calcDynamicProperties();
32753
+ return this.dynamicProperties;
32754
+ };
32755
+ ComponentQuestionJSON.prototype.calcDynamicProperties = function () {
32756
+ var baseProps = this.json.inheritBaseProps;
32757
+ if (!baseProps || !this.json.questionJSON)
32758
+ return [];
32759
+ var type = this.json.questionJSON.type;
32760
+ if (!type)
32761
+ return [];
32762
+ if (Array.isArray(baseProps)) {
32763
+ var props_1 = [];
32764
+ baseProps.forEach(function (name) {
32765
+ var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(type, name);
32766
+ if (prop) {
32767
+ props_1.push(prop);
32768
+ }
32769
+ });
32770
+ return props_1;
32771
+ }
32772
+ var invalidNames = [];
32773
+ for (var key in this.json.questionJSON) {
32774
+ invalidNames.push(key);
32775
+ }
32776
+ return _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].getDynamicPropertiesByTypes(this.name, type, invalidNames);
32777
+ };
32658
32778
  return ComponentQuestionJSON;
32659
32779
  }());
32660
32780
 
@@ -32996,8 +33116,15 @@ var QuestionCustomModel = /** @class */ (function (_super) {
32996
33116
  QuestionCustomModel.prototype.getTemplate = function () {
32997
33117
  return "custom";
32998
33118
  };
33119
+ QuestionCustomModel.prototype.getDynamicProperties = function () {
33120
+ return this.customQuestion.getDynamicProperties() || [];
33121
+ };
33122
+ QuestionCustomModel.prototype.getDynamicType = function () {
33123
+ return this.questionWrapper ? this.questionWrapper.getType() : "question";
33124
+ };
32999
33125
  QuestionCustomModel.prototype.createWrapper = function () {
33000
33126
  this.questionWrapper = this.createQuestion();
33127
+ this.createDynamicProperties(this.questionWrapper);
33001
33128
  };
33002
33129
  QuestionCustomModel.prototype.getElement = function () {
33003
33130
  return this.contentQuestion;
@@ -33172,6 +33299,14 @@ var QuestionCustomModel = /** @class */ (function (_super) {
33172
33299
  }
33173
33300
  this.isSettingValueChanged = false;
33174
33301
  };
33302
+ QuestionCustomModel.prototype.createDynamicProperties = function (el) {
33303
+ if (!el)
33304
+ return;
33305
+ var props = this.getDynamicProperties();
33306
+ if (Array.isArray(props)) {
33307
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addDynamicPropertiesIntoObj(this, el, props);
33308
+ }
33309
+ };
33175
33310
  QuestionCustomModel.prototype.initElement = function (el) {
33176
33311
  var _this = this;
33177
33312
  _super.prototype.initElement.call(this, el);
@@ -33668,7 +33803,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
33668
33803
  }
33669
33804
  };
33670
33805
  QuestionDropdownModel.prototype.supportGoNextPageAutomatic = function () {
33671
- return true;
33806
+ return !this.isOtherSelected;
33672
33807
  };
33673
33808
  QuestionDropdownModel.prototype.getChoices = function () {
33674
33809
  var items = _super.prototype.getChoices.call(this);
@@ -34533,6 +34668,9 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_2__["Serializer"].addClass("expression", [
34533
34668
  return getCurrecyCodes();
34534
34669
  },
34535
34670
  default: "USD",
34671
+ visibleIf: function (obj) {
34672
+ return obj.displayStyle === "currency";
34673
+ }
34536
34674
  },
34537
34675
  { name: "maximumFractionDigits:number", default: -1 },
34538
34676
  { name: "minimumFractionDigits:number", default: -1 },
@@ -34806,7 +34944,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
34806
34944
  };
34807
34945
  _this.doClean = function () {
34808
34946
  if (_this.needConfirmRemoveFile) {
34809
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(_this.confirmRemoveAllMessage, function () { _this.clearFilesCore(); });
34947
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(_this.confirmRemoveAllMessage, function () { _this.clearFilesCore(); }, undefined, _this.getLocale());
34810
34948
  return;
34811
34949
  }
34812
34950
  _this.clearFilesCore();
@@ -35696,7 +35834,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
35696
35834
  QuestionFileModel.prototype.doRemoveFile = function (data) {
35697
35835
  var _this = this;
35698
35836
  if (this.needConfirmRemoveFile) {
35699
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); });
35837
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_6__["confirmActionAsync"])(this.getConfirmRemoveMessage(data.name), function () { _this.removeFileCore(data); }, undefined, this.getLocale());
35700
35838
  return;
35701
35839
  }
35702
35840
  this.removeFileCore(data);
@@ -37458,6 +37596,11 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
37458
37596
  configurable: true
37459
37597
  });
37460
37598
  Object.defineProperty(QuestionMatrixModel.prototype, "cells", {
37599
+ /**
37600
+ * An array of matrix cells. Use this array to get or set cell values.
37601
+ *
37602
+ * [View Demo](https://surveyjs.io/form-library/examples/questiontype-matrix-rubric/ (linkStyle))
37603
+ */
37461
37604
  get: function () {
37462
37605
  return this.cellsValue;
37463
37606
  },
@@ -41666,32 +41809,8 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
41666
41809
  }
41667
41810
  };
41668
41811
  MatrixDropdownColumn.prototype.addProperties = function (curCellType) {
41669
- var question = this.templateQuestion;
41670
- var properties = this.getProperties(curCellType);
41671
- for (var i = 0; i < properties.length; i++) {
41672
- var prop = properties[i];
41673
- this.addProperty(question, prop.name, false);
41674
- if (prop.serializationProperty) {
41675
- this.addProperty(question, prop.serializationProperty, true);
41676
- }
41677
- if (prop.alternativeName) {
41678
- this.addProperty(question, prop.alternativeName, false);
41679
- }
41680
- }
41681
- };
41682
- MatrixDropdownColumn.prototype.addProperty = function (question, propName, isReadOnly) {
41683
- var desc = {
41684
- configurable: true,
41685
- get: function () {
41686
- return question[propName];
41687
- },
41688
- };
41689
- if (!isReadOnly) {
41690
- desc["set"] = function (v) {
41691
- question[propName] = v;
41692
- };
41693
- }
41694
- Object.defineProperty(this, propName, desc);
41812
+ var props = this.getProperties(curCellType);
41813
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addDynamicPropertiesIntoObj(this, this.templateQuestion, props);
41695
41814
  };
41696
41815
  return MatrixDropdownColumn;
41697
41816
  }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
@@ -43636,7 +43755,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
43636
43755
  confirmDelete = this.isRequireConfirmOnRowDelete(index);
43637
43756
  }
43638
43757
  if (confirmDelete) {
43639
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removeRowAsync(index, row); });
43758
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_5__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removeRowAsync(index, row); }, undefined, this.getLocale());
43640
43759
  return;
43641
43760
  }
43642
43761
  this.removeRowAsync(index, row);
@@ -46209,9 +46328,8 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46209
46328
  }
46210
46329
  }
46211
46330
  }
46212
- var removedPanels = [];
46213
46331
  if (val < this.panelCount) {
46214
- removedPanels = this.panelsCore.splice(val, this.panelCount - val);
46332
+ this.panelsCore.splice(val, this.panelCount - val);
46215
46333
  }
46216
46334
  this.setValueAfterPanelsCreating();
46217
46335
  this.setValueBasedOnPanelCount();
@@ -46817,7 +46935,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46817
46935
  if (!this.canRemovePanel)
46818
46936
  return;
46819
46937
  if (this.isRequireConfirmOnDelete(value)) {
46820
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); });
46938
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_9__["confirmActionAsync"])(this.confirmDeleteText, function () { _this.removePanel(value); }, undefined, this.getLocale());
46821
46939
  }
46822
46940
  else {
46823
46941
  this.removePanel(value);
@@ -46922,7 +47040,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46922
47040
  }
46923
47041
  };
46924
47042
  QuestionPanelDynamicModel.prototype.getQuestionFromArray = function (name, index) {
46925
- if (index >= this.panelCount)
47043
+ if (index < 0 || index >= this.panelsCore.length)
46926
47044
  return null;
46927
47045
  return this.panelsCore[index].getQuestionByName(name);
46928
47046
  };
@@ -48078,7 +48196,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
48078
48196
  configurable: true
48079
48197
  });
48080
48198
  QuestionRadiogroupModel.prototype.supportGoNextPageAutomatic = function () {
48081
- return this.isMouseDown === true;
48199
+ return this.isMouseDown === true && !this.isOtherSelected;
48082
48200
  };
48083
48201
  QuestionRadiogroupModel.prototype.setNewComment = function (newValue) {
48084
48202
  this.isMouseDown = true;
@@ -48206,8 +48324,11 @@ var QuestionRankingModel = /** @class */ (function (_super) {
48206
48324
  _this.domNode = null;
48207
48325
  _this.onVisibleChoicesChanged = function () {
48208
48326
  _super.prototype.onVisibleChoicesChanged.call(_this);
48327
+ if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled) {
48328
+ _this.value = [];
48329
+ }
48209
48330
  // ranking question with only one choice doesn't make sense
48210
- if (_this.visibleChoices.length === 1) {
48331
+ if (_this.visibleChoices.length === 1 && !_this.selectToRankEnabled) {
48211
48332
  _this.value = [];
48212
48333
  _this.value.push(_this.visibleChoices[0].value);
48213
48334
  _this.updateRankingChoices();
@@ -48280,12 +48401,14 @@ var QuestionRankingModel = /** @class */ (function (_super) {
48280
48401
  itemsNodes[index].focus();
48281
48402
  }
48282
48403
  };
48404
+ _this.isValueSetByUser = false;
48283
48405
  _this.setValue = function () {
48284
48406
  var value = [];
48285
48407
  _this.rankingChoices.forEach(function (choice) {
48286
48408
  value.push(choice.value);
48287
48409
  });
48288
48410
  _this.value = value;
48411
+ _this.isValueSetByUser = true;
48289
48412
  };
48290
48413
  _this.createNewArray("rankingChoices");
48291
48414
  _this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
@@ -48718,6 +48841,9 @@ var QuestionRankingModel = /** @class */ (function (_super) {
48718
48841
  __decorate([
48719
48842
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: null })
48720
48843
  ], QuestionRankingModel.prototype, "dropTargetNodeMove", void 0);
48844
+ __decorate([
48845
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ defaultValue: true })
48846
+ ], QuestionRankingModel.prototype, "carryForwardStartUnranked", void 0);
48721
48847
  __decorate([
48722
48848
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_3__["property"])({ localizable: { defaultStr: "selectToRankEmptyRankedAreaText" } })
48723
48849
  ], QuestionRankingModel.prototype, "selectToRankEmptyRankedAreaText", void 0);
@@ -51339,8 +51465,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
51339
51465
  return !this.isReadOnly && this.inputType !== "range";
51340
51466
  };
51341
51467
  QuestionTextModel.prototype.getControlCssClassBuilder = function () {
51468
+ var maxLength = this.getMaxLength();
51342
51469
  return _super.prototype.getControlCssClassBuilder.call(this)
51343
- .append(this.cssClasses.constrolWithCharacterCounter, !!this.getMaxLength());
51470
+ .append(this.cssClasses.constrolWithCharacterCounter, !!maxLength)
51471
+ .append(this.cssClasses.characterCounterBig, maxLength > 99);
51344
51472
  };
51345
51473
  QuestionTextModel.prototype.isReadOnlyRenderDiv = function () {
51346
51474
  return this.isReadOnly && _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].readOnly.textRenderMode === "div";
@@ -52524,8 +52652,8 @@ var settings = {
52524
52652
  * @param message A message to be displayed in the confirm dialog window.
52525
52653
  * @param callback A callback function that should be called with `true` if a user confirms an action or `false` otherwise.
52526
52654
  */
52527
- confirmActionAsync: function (message, callback, applyTitle) {
52528
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle);
52655
+ confirmActionAsync: function (message, callback, applyTitle, locale) {
52656
+ return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_0__["showConfirmDialog"])(message, callback, applyTitle, locale);
52529
52657
  },
52530
52658
  /**
52531
52659
  * A minimum width value for all survey elements.
@@ -60209,7 +60337,7 @@ var SurveyModel = /** @class */ (function (_super) {
60209
60337
  }
60210
60338
  };
60211
60339
  /**
60212
- * Uploads a file to server.
60340
+ * Uploads files to a server.
60213
60341
  *
60214
60342
  * The following code shows how to call this method:
60215
60343
  *
@@ -64169,6 +64297,13 @@ var Trigger = /** @class */ (function (_super) {
64169
64297
  }
64170
64298
  return res;
64171
64299
  };
64300
+ Object.defineProperty(Trigger.prototype, "isInternal", {
64301
+ get: function () {
64302
+ return this.isGhost === true;
64303
+ },
64304
+ enumerable: false,
64305
+ configurable: true
64306
+ });
64172
64307
  Object.defineProperty(Trigger.prototype, "operator", {
64173
64308
  get: function () {
64174
64309
  return this.getPropertyValue("operator", "equal");
@@ -65105,8 +65240,11 @@ var PopupUtils = /** @class */ (function () {
65105
65240
  }
65106
65241
  return { left: Math.round(currentLeft), top: Math.round(currentTop) };
65107
65242
  };
65108
- PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight) {
65109
- var result = { height: height, top: top };
65243
+ PopupUtils.getCorrectedVerticalDimensions = function (top, height, windowHeight, verticalPosition) {
65244
+ var result;
65245
+ if (verticalPosition === "top") {
65246
+ result = { height: height, top: top };
65247
+ }
65110
65248
  if (top < 0) {
65111
65249
  result = { height: height + top, top: 0 };
65112
65250
  }
@@ -65484,7 +65622,7 @@ function confirmAction(message) {
65484
65622
  return _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionFunc(message);
65485
65623
  return confirm(message);
65486
65624
  }
65487
- function confirmActionAsync(message, funcOnYes, funcOnNo) {
65625
+ function confirmActionAsync(message, funcOnYes, funcOnNo, locale) {
65488
65626
  var callbackFunc = function (res) {
65489
65627
  if (res)
65490
65628
  funcOnYes();
@@ -65492,7 +65630,7 @@ function confirmActionAsync(message, funcOnYes, funcOnNo) {
65492
65630
  funcOnNo();
65493
65631
  };
65494
65632
  if (!!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"] && !!_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync) {
65495
- if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc))
65633
+ if (_settings__WEBPACK_IMPORTED_MODULE_1__["settings"].confirmActionAsync(message, callbackFunc, undefined, locale))
65496
65634
  return;
65497
65635
  }
65498
65636
  callbackFunc(confirmAction(message));
@@ -65841,7 +65979,7 @@ var Logger = /** @class */ (function () {
65841
65979
  return Logger;
65842
65980
  }());
65843
65981
 
65844
- function showConfirmDialog(message, callback, applyTitle) {
65982
+ function showConfirmDialog(message, callback, applyTitle, locale) {
65845
65983
  var locStr = new _localizablestring__WEBPACK_IMPORTED_MODULE_0__["LocalizableString"](undefined);
65846
65984
  var popupViewModel = _settings__WEBPACK_IMPORTED_MODULE_1__["settings"].showDialog({
65847
65985
  componentName: "sv-string-viewer",
@@ -65862,9 +66000,9 @@ function showConfirmDialog(message, callback, applyTitle) {
65862
66000
  var toolbar = popupViewModel.footerToolbar;
65863
66001
  var applyBtn = toolbar.getActionById("apply");
65864
66002
  var cancelBtn = toolbar.getActionById("cancel");
65865
- cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel");
66003
+ cancelBtn.title = _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("cancel", locale);
65866
66004
  cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
65867
- applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok");
66005
+ applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
65868
66006
  applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
65869
66007
  popupViewModel.width = "452px";
65870
66008
  return true;