survey-core 1.12.16-patch.1 → 1.12.17

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 (232) hide show
  1. package/defaultV2.css +1 -1
  2. package/defaultV2.fontless.css +1 -1
  3. package/defaultV2.fontless.min.css +1 -1
  4. package/defaultV2.min.css +1 -1
  5. package/i18n/arabic.js +1 -1
  6. package/i18n/arabic.min.js +1 -1
  7. package/i18n/basque.js +1 -1
  8. package/i18n/basque.min.js +1 -1
  9. package/i18n/bulgarian.js +1 -1
  10. package/i18n/bulgarian.min.js +1 -1
  11. package/i18n/catalan.js +1 -1
  12. package/i18n/catalan.min.js +1 -1
  13. package/i18n/croatian.js +1 -1
  14. package/i18n/croatian.min.js +1 -1
  15. package/i18n/czech.js +1 -1
  16. package/i18n/czech.min.js +1 -1
  17. package/i18n/danish.js +1 -1
  18. package/i18n/danish.min.js +1 -1
  19. package/i18n/dutch.js +1 -1
  20. package/i18n/dutch.min.js +1 -1
  21. package/i18n/english.js +1 -1
  22. package/i18n/english.min.js +1 -1
  23. package/i18n/estonian.js +1 -1
  24. package/i18n/estonian.min.js +1 -1
  25. package/i18n/finnish.js +1 -1
  26. package/i18n/finnish.min.js +1 -1
  27. package/i18n/french.js +1 -1
  28. package/i18n/french.min.js +1 -1
  29. package/i18n/georgian.js +1 -1
  30. package/i18n/georgian.min.js +1 -1
  31. package/i18n/german.js +1 -1
  32. package/i18n/german.min.js +1 -1
  33. package/i18n/greek.js +1 -1
  34. package/i18n/greek.min.js +1 -1
  35. package/i18n/hebrew.js +1 -1
  36. package/i18n/hebrew.min.js +1 -1
  37. package/i18n/hindi.js +1 -1
  38. package/i18n/hindi.min.js +1 -1
  39. package/i18n/hungarian.js +1 -1
  40. package/i18n/hungarian.min.js +1 -1
  41. package/i18n/icelandic.js +1 -1
  42. package/i18n/icelandic.min.js +1 -1
  43. package/i18n/index.js +1 -1
  44. package/i18n/index.min.js +1 -1
  45. package/i18n/indonesian.js +1 -1
  46. package/i18n/indonesian.min.js +1 -1
  47. package/i18n/italian.js +1 -1
  48. package/i18n/italian.min.js +1 -1
  49. package/i18n/japanese.js +1 -1
  50. package/i18n/japanese.min.js +1 -1
  51. package/i18n/kazakh.js +1 -1
  52. package/i18n/kazakh.min.js +1 -1
  53. package/i18n/korean.js +1 -1
  54. package/i18n/korean.min.js +1 -1
  55. package/i18n/latvian.js +1 -1
  56. package/i18n/latvian.min.js +1 -1
  57. package/i18n/lithuanian.js +1 -1
  58. package/i18n/lithuanian.min.js +1 -1
  59. package/i18n/macedonian.js +1 -1
  60. package/i18n/macedonian.min.js +1 -1
  61. package/i18n/malay.js +1 -1
  62. package/i18n/malay.min.js +1 -1
  63. package/i18n/nl-BE.js +1 -1
  64. package/i18n/nl-BE.min.js +1 -1
  65. package/i18n/norwegian.js +1 -1
  66. package/i18n/norwegian.min.js +1 -1
  67. package/i18n/persian.js +1 -1
  68. package/i18n/persian.min.js +1 -1
  69. package/i18n/philippines.js +1 -1
  70. package/i18n/philippines.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/icons/iconsV1.js +1 -1
  112. package/icons/iconsV1.min.js +1 -1
  113. package/icons/iconsV2.js +1 -1
  114. package/icons/iconsV2.min.js +1 -1
  115. package/modern.css +1 -1
  116. package/modern.fontless.css +1 -1
  117. package/modern.fontless.min.css +1 -1
  118. package/modern.min.css +1 -1
  119. package/package.json +1 -1
  120. package/plugins/bootstrap-integration/index.js +1 -1
  121. package/plugins/bootstrap-integration/index.min.js +1 -1
  122. package/plugins/bootstrap-material-integration/index.js +1 -1
  123. package/plugins/bootstrap-material-integration/index.min.js +1 -1
  124. package/survey.core.js +236 -99
  125. package/survey.core.js.map +1 -1
  126. package/survey.core.min.js +3 -3
  127. package/survey.css +1 -1
  128. package/survey.i18n.js +1 -1
  129. package/survey.i18n.min.js +1 -1
  130. package/survey.min.css +1 -1
  131. package/themes/borderless-dark-panelless.js +1 -1
  132. package/themes/borderless-dark-panelless.min.js +1 -1
  133. package/themes/borderless-dark.js +1 -1
  134. package/themes/borderless-dark.min.js +1 -1
  135. package/themes/borderless-light-panelless..js +1 -1
  136. package/themes/borderless-light-panelless..min.js +1 -1
  137. package/themes/borderless-light.js +1 -1
  138. package/themes/borderless-light.min.js +1 -1
  139. package/themes/contrast-dark-panelless.js +1 -1
  140. package/themes/contrast-dark-panelless.min.js +1 -1
  141. package/themes/contrast-dark.js +1 -1
  142. package/themes/contrast-dark.min.js +1 -1
  143. package/themes/contrast-light-panelless.js +1 -1
  144. package/themes/contrast-light-panelless.min.js +1 -1
  145. package/themes/contrast-light.js +1 -1
  146. package/themes/contrast-light.min.js +1 -1
  147. package/themes/default-dark-panelless.js +1 -1
  148. package/themes/default-dark-panelless.min.js +1 -1
  149. package/themes/default-dark.js +1 -1
  150. package/themes/default-dark.min.js +1 -1
  151. package/themes/default-light-panelless.js +1 -1
  152. package/themes/default-light-panelless.min.js +1 -1
  153. package/themes/default-light.js +1 -1
  154. package/themes/default-light.min.js +1 -1
  155. package/themes/doubleborder-dark-panelless.js +1 -1
  156. package/themes/doubleborder-dark-panelless.min.js +1 -1
  157. package/themes/doubleborder-dark.js +1 -1
  158. package/themes/doubleborder-dark.min.js +1 -1
  159. package/themes/doubleborder-light-panelles.js +1 -1
  160. package/themes/doubleborder-light-panelles.min.js +1 -1
  161. package/themes/doubleborder-light.js +1 -1
  162. package/themes/doubleborder-light.min.js +1 -1
  163. package/themes/flat-dark-panelless.js +1 -1
  164. package/themes/flat-dark-panelless.min.js +1 -1
  165. package/themes/flat-dark.js +1 -1
  166. package/themes/flat-dark.min.js +1 -1
  167. package/themes/flat-light-panelless.js +1 -1
  168. package/themes/flat-light-panelless.min.js +1 -1
  169. package/themes/flat-light.js +1 -1
  170. package/themes/flat-light.min.js +1 -1
  171. package/themes/index.js +1 -1
  172. package/themes/index.min.js +1 -1
  173. package/themes/layered-dark-panelless.js +1 -1
  174. package/themes/layered-dark-panelless.min.js +1 -1
  175. package/themes/layered-dark.js +1 -1
  176. package/themes/layered-dark.min.js +1 -1
  177. package/themes/layered-light-panelless.js +1 -1
  178. package/themes/layered-light-panelless.min.js +1 -1
  179. package/themes/layered-light.js +1 -1
  180. package/themes/layered-light.min.js +1 -1
  181. package/themes/plain-dark-panelless.js +1 -1
  182. package/themes/plain-dark-panelless.min.js +1 -1
  183. package/themes/plain-dark.js +1 -1
  184. package/themes/plain-dark.min.js +1 -1
  185. package/themes/plain-light-panelless.js +1 -1
  186. package/themes/plain-light-panelless.min.js +1 -1
  187. package/themes/plain-light.js +1 -1
  188. package/themes/plain-light.min.js +1 -1
  189. package/themes/sharp-dark-panelless.js +1 -1
  190. package/themes/sharp-dark-panelless.min.js +1 -1
  191. package/themes/sharp-dark.js +1 -1
  192. package/themes/sharp-dark.min.js +1 -1
  193. package/themes/sharp-light-panelless.js +1 -1
  194. package/themes/sharp-light-panelless.min.js +1 -1
  195. package/themes/sharp-light.js +1 -1
  196. package/themes/sharp-light.min.js +1 -1
  197. package/themes/solid-dark-panelless.js +1 -1
  198. package/themes/solid-dark-panelless.min.js +1 -1
  199. package/themes/solid-dark.js +1 -1
  200. package/themes/solid-dark.min.js +1 -1
  201. package/themes/solid-light-panelless.js +1 -1
  202. package/themes/solid-light-panelless.min.js +1 -1
  203. package/themes/solid-light.js +1 -1
  204. package/themes/solid-light.min.js +1 -1
  205. package/themes/three-dimensional-dark-panelless.js +1 -1
  206. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  207. package/themes/three-dimensional-dark.js +1 -1
  208. package/themes/three-dimensional-dark.min.js +1 -1
  209. package/themes/three-dimensional-light-panelless.js +1 -1
  210. package/themes/three-dimensional-light-panelless.min.js +1 -1
  211. package/themes/three-dimensional-light.js +1 -1
  212. package/themes/three-dimensional-light.min.js +1 -1
  213. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  214. package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  215. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -2
  216. package/ts3.4/typings/packages/survey-core/src/question.d.ts +4 -1
  217. package/ts3.4/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
  218. package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +1 -0
  219. package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
  220. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +47 -25
  221. package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
  222. package/ts3.4/typings/packages/survey-core/src/validator.d.ts +1 -1
  223. package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  224. package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  225. package/typings/packages/survey-core/src/panel.d.ts +3 -2
  226. package/typings/packages/survey-core/src/question.d.ts +4 -1
  227. package/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
  228. package/typings/packages/survey-core/src/survey-element.d.ts +1 -0
  229. package/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
  230. package/typings/packages/survey-core/src/survey.d.ts +47 -25
  231. package/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
  232. package/typings/packages/survey-core/src/validator.d.ts +1 -1
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.16-patch.1
2
+ * surveyjs - Survey JavaScript library v1.12.17
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
  */
@@ -3887,6 +3887,24 @@ function dateDiff(params) {
3887
3887
  return dateDiffMonths(params[0], params[1], (params.length > 2 ? params[2] : "") || "days");
3888
3888
  }
3889
3889
  functionsfactory_FunctionFactory.Instance.register("dateDiff", dateDiff);
3890
+ function dateAdd(params) {
3891
+ if (!Array.isArray(params) || params.length < 2 || !params[0] || !params[1])
3892
+ return null;
3893
+ var date = createDate("function-dateAdd", params[0]);
3894
+ var valToAdd = params[1];
3895
+ var interval = params[2] || "days";
3896
+ if (interval === "days") {
3897
+ date.setDate(date.getDate() + valToAdd);
3898
+ }
3899
+ if (interval === "months") {
3900
+ date.setMonth(date.getMonth() + valToAdd);
3901
+ }
3902
+ if (interval === "years") {
3903
+ date.setFullYear(date.getFullYear() + valToAdd);
3904
+ }
3905
+ return date;
3906
+ }
3907
+ functionsfactory_FunctionFactory.Instance.register("dateAdd", dateAdd);
3890
3908
  function isContainerReadyCore(container) {
3891
3909
  if (!container)
3892
3910
  return false;
@@ -10167,13 +10185,13 @@ var list_ListModel = /** @class */ (function (_super) {
10167
10185
  var _this = this;
10168
10186
  this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
10169
10187
  };
10170
- ListModel.prototype.scrollToItem = function (selector, ms) {
10188
+ ListModel.prototype.scrollToItem = function (classes, ms) {
10171
10189
  var _this = this;
10172
10190
  if (ms === void 0) { ms = 0; }
10173
10191
  setTimeout(function () {
10174
10192
  if (!_this.listContainerHtmlElement)
10175
10193
  return;
10176
- var item = _this.listContainerHtmlElement.querySelector("." + selector);
10194
+ var item = _this.listContainerHtmlElement.querySelector(classesToSelector(classes));
10177
10195
  if (item) {
10178
10196
  setTimeout(function () {
10179
10197
  item.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
@@ -10241,7 +10259,7 @@ var list_ListModel = /** @class */ (function (_super) {
10241
10259
  });
10242
10260
  Object.defineProperty(ListModel.prototype, "scrollableContainer", {
10243
10261
  get: function () {
10244
- return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
10262
+ return this.listContainerHtmlElement.querySelector(classesToSelector(this.cssClasses.itemsContainer));
10245
10263
  },
10246
10264
  enumerable: false,
10247
10265
  configurable: true
@@ -12758,9 +12776,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12758
12776
  SurveyElement.prototype.createCssClassesValue = function () {
12759
12777
  var res = this.calcCssClasses(this.css);
12760
12778
  this.setPropertyValue("cssClassesValue", res);
12779
+ this.onCalcCssClasses(res);
12761
12780
  this.updateElementCssCore(this.cssClassesValue);
12762
12781
  return res;
12763
12782
  };
12783
+ SurveyElement.prototype.onCalcCssClasses = function (classes) { };
12764
12784
  Object.defineProperty(SurveyElement.prototype, "cssClasses", {
12765
12785
  /**
12766
12786
  * Returns an object in which keys are UI elements and values are CSS classes applied to them.
@@ -13245,17 +13265,26 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13245
13265
  var columns = this.parent.getColumsForElement(this);
13246
13266
  _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
13247
13267
  if (!!_width && _width !== 100) {
13248
- style["flexGrow"] = 0;
13268
+ style["flexGrow"] = 1;
13249
13269
  style["flexShrink"] = 0;
13250
13270
  style["flexBasis"] = _width + "%";
13251
13271
  style["minWidth"] = undefined;
13252
- style["maxWidth"] = undefined;
13272
+ style["maxWidth"] = this.maxWidth;
13253
13273
  }
13254
13274
  }
13255
13275
  if (Object.keys(style).length == 0) {
13256
- var minWidth = this.minWidth;
13257
- if (minWidth != "auto")
13276
+ var minWidth = "" + this.minWidth;
13277
+ if (!!minWidth && minWidth != "auto") {
13278
+ if (minWidth.indexOf("px") != -1 && this.survey) {
13279
+ minWidth = minWidth.replace("px", "");
13280
+ var minWidthNum = parseFloat(minWidth);
13281
+ if (!isNaN(minWidthNum)) {
13282
+ minWidth = minWidthNum * this.survey.widthScale / 100;
13283
+ minWidth = "" + minWidth + "px";
13284
+ }
13285
+ }
13258
13286
  minWidth = "min(100%, " + minWidth + ")";
13287
+ }
13259
13288
  if (this.allowRootStyle && this.renderWidth) {
13260
13289
  // style["width"] = this.renderWidth;
13261
13290
  style["flexGrow"] = 1;
@@ -14963,8 +14992,8 @@ function cleanHtmlElementAfterAnimation(el) {
14963
14992
  delete el["__sv_created_properties"];
14964
14993
  }
14965
14994
  }
14966
- function roundTo2Decimals(number) {
14967
- return Math.round(number * 100) / 100;
14995
+ function floorTo2Decimals(number) {
14996
+ return Math.floor(number * 100) / 100;
14968
14997
  }
14969
14998
 
14970
14999
 
@@ -16644,7 +16673,7 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
16644
16673
  });
16645
16674
  Object.defineProperty(ExpressionValidator.prototype, "isAsync", {
16646
16675
  get: function () {
16647
- if (!this.ensureConditionRunner())
16676
+ if (!this.ensureConditionRunner(false))
16648
16677
  return false;
16649
16678
  return this.conditionRunner.isAsync;
16650
16679
  },
@@ -16663,8 +16692,12 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
16663
16692
  if (name === void 0) { name = null; }
16664
16693
  if (values === void 0) { values = null; }
16665
16694
  if (properties === void 0) { properties = null; }
16666
- if (!this.ensureConditionRunner())
16695
+ if (!this.expression)
16667
16696
  return null;
16697
+ if (!!this.conditionRunner) {
16698
+ this.conditionRunner.onRunComplete = null;
16699
+ }
16700
+ this.ensureConditionRunner(true);
16668
16701
  this.conditionRunner.onRunComplete = function (res) {
16669
16702
  _this.isRunningValue = false;
16670
16703
  if (!!_this.onAsyncCompleted) {
@@ -16687,14 +16720,15 @@ var validator_ExpressionValidator = /** @class */ (function (_super) {
16687
16720
  ExpressionValidator.prototype.getDefaultErrorText = function (name) {
16688
16721
  return this.getLocalizationFormatString("invalidExpression", this.expression);
16689
16722
  };
16690
- ExpressionValidator.prototype.ensureConditionRunner = function () {
16691
- if (!!this.conditionRunner) {
16692
- this.conditionRunner.expression = this.expression;
16693
- return true;
16694
- }
16723
+ ExpressionValidator.prototype.ensureConditionRunner = function (reNew) {
16695
16724
  if (!this.expression)
16696
16725
  return false;
16697
- this.conditionRunner = new ConditionRunner(this.expression);
16726
+ if (reNew || !this.conditionRunner) {
16727
+ this.conditionRunner = new ConditionRunner(this.expression);
16728
+ }
16729
+ else {
16730
+ this.conditionRunner.expression = this.expression;
16731
+ }
16698
16732
  return true;
16699
16733
  };
16700
16734
  Object.defineProperty(ExpressionValidator.prototype, "expression", {
@@ -18351,13 +18385,16 @@ var question_Question = /** @class */ (function (_super) {
18351
18385
  this.copyCssClasses(classes, css.question);
18352
18386
  this.copyCssClasses(classes.error, css.error);
18353
18387
  this.updateCssClasses(classes, css);
18388
+ return classes;
18389
+ };
18390
+ Question.prototype.onCalcCssClasses = function (classes) {
18391
+ _super.prototype.onCalcCssClasses.call(this, classes);
18354
18392
  if (this.survey) {
18355
18393
  this.survey.updateQuestionCssClasses(this, classes);
18356
18394
  }
18357
18395
  if (this.onUpdateCssClassesCallback) {
18358
18396
  this.onUpdateCssClassesCallback(classes);
18359
18397
  }
18360
- return classes;
18361
18398
  };
18362
18399
  Object.defineProperty(Question.prototype, "cssRoot", {
18363
18400
  get: function () {
@@ -18543,18 +18580,33 @@ var question_Question = /** @class */ (function (_super) {
18543
18580
  .toString();
18544
18581
  };
18545
18582
  Question.prototype.updateElementCss = function (reNew) {
18546
- _super.prototype.updateElementCss.call(this, reNew);
18547
- if (reNew) {
18548
- this.updateQuestionCss(true);
18583
+ if (this.wasRendered) {
18584
+ _super.prototype.updateElementCss.call(this, reNew);
18585
+ if (reNew) {
18586
+ this.updateQuestionCss(true);
18587
+ }
18588
+ }
18589
+ else {
18590
+ this.isRequireUpdateElements = true;
18549
18591
  }
18550
18592
  this.resetIndents();
18551
18593
  };
18594
+ Question.prototype.onFirstRenderingCore = function () {
18595
+ if (this.isRequireUpdateElements) {
18596
+ this.isRequireUpdateElements = false;
18597
+ this.updateElementCss(true);
18598
+ }
18599
+ _super.prototype.onFirstRenderingCore.call(this);
18600
+ };
18552
18601
  Question.prototype.updateQuestionCss = function (reNew) {
18553
- if (this.isLoadingFromJson ||
18554
- !this.survey ||
18555
- (reNew !== true && !this.cssClassesValue))
18602
+ if (this.isLoadingFromJson || !this.survey)
18556
18603
  return;
18557
- this.updateElementCssCore(this.cssClasses);
18604
+ if (this.wasRendered) {
18605
+ this.updateElementCssCore(this.cssClasses);
18606
+ }
18607
+ else {
18608
+ this.isRequireUpdateElements = true;
18609
+ }
18558
18610
  };
18559
18611
  Question.prototype.ensureElementCss = function () {
18560
18612
  if (!this.cssClassesValue) {
@@ -19468,7 +19520,7 @@ var question_Question = /** @class */ (function (_super) {
19468
19520
  /**
19469
19521
  * A correct answer to this question. Specify this property if you want to [create a quiz](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
19470
19522
  * @see SurveyModel.getCorrectAnswerCount
19471
- * @see SurveyModel.getInCorrectAnswerCount
19523
+ * @see SurveyModel.getIncorrectAnswerCount
19472
19524
  */
19473
19525
  get: function () {
19474
19526
  return this.getPropertyValue("correctAnswer");
@@ -19517,7 +19569,14 @@ var question_Question = /** @class */ (function (_super) {
19517
19569
  Question.prototype.checkIfAnswerCorrect = function () {
19518
19570
  var isEqual = helpers_Helpers.isTwoValueEquals(this.value, this.correctAnswer, this.getAnswerCorrectIgnoreOrder(), settings.comparator.caseSensitive, true);
19519
19571
  var correct = isEqual ? 1 : 0;
19520
- var options = { result: isEqual, correctAnswer: correct, correctAnswers: correct, incorrectAnswers: this.quizQuestionCount - correct };
19572
+ var incorrect = this.quizQuestionCount - correct;
19573
+ var options = {
19574
+ result: isEqual,
19575
+ correctAnswers: correct,
19576
+ correctAnswerCount: correct,
19577
+ incorrectAnswers: incorrect,
19578
+ incorrectAnswerCount: incorrect,
19579
+ };
19521
19580
  if (!!this.survey) {
19522
19581
  this.survey.onCorrectQuestionAnswer(this, options);
19523
19582
  }
@@ -33145,6 +33204,7 @@ var defaultV2Css = {
33145
33204
  itemBody: "sv-list__item-body sd-list__item-body",
33146
33205
  itemSelected: "sv-list__item--selected sd-list__item--selected",
33147
33206
  itemFocused: "sv-list__item--focused sd-list__item--focused",
33207
+ itemHovered: "sv-list__item--hovered sd-list__item--hovered",
33148
33208
  },
33149
33209
  actionBar: {
33150
33210
  root: "sd-action-bar",
@@ -34798,7 +34858,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34798
34858
  _this.isRandomizing = false;
34799
34859
  _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
34800
34860
  if (_this._columnsReady) {
34801
- _this.updateColumnWidth(_this.layoutColumns);
34861
+ _this.updateColumnWidth(_this.gridLayoutColumns);
34802
34862
  _this.updateRootStyle();
34803
34863
  }
34804
34864
  };
@@ -34842,7 +34902,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34842
34902
  isAnimationEnabled: function () { return _this.animationAllowed; },
34843
34903
  getAnimatedElement: function (row) { return row.getRootElement(); },
34844
34904
  getLeaveOptions: function (row, info) {
34845
- return { cssClass: _this.cssClasses.rowLeave,
34905
+ return {
34906
+ cssClass: _this.cssClasses.rowLeave,
34846
34907
  onBeforeRunAnimation: prepareElementForVerticalAnimation,
34847
34908
  onAfterRunAnimation: cleanHtmlElementAfterAnimation,
34848
34909
  };
@@ -34895,7 +34956,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34895
34956
  this.updateDescriptionVisibility(this.description);
34896
34957
  this.markQuestionListDirty();
34897
34958
  this.onRowsChanged();
34898
- this.layoutColumns.forEach(function (col) {
34959
+ this.gridLayoutColumns.forEach(function (col) {
34899
34960
  col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
34900
34961
  });
34901
34962
  };
@@ -35723,7 +35784,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35723
35784
  }
35724
35785
  });
35725
35786
  if (!!remainingColCount) {
35726
- var oneColumnWidth = roundTo2Decimals((100 - remainingSpace) / remainingColCount);
35787
+ var oneColumnWidth = floorTo2Decimals((100 - remainingSpace) / remainingColCount);
35727
35788
  for (var index = 0; index < columns.length; index++) {
35728
35789
  if (!columns[index].width) {
35729
35790
  columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
@@ -35812,12 +35873,12 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35812
35873
  });
35813
35874
  PanelModelBase.prototype.generateColumns = function () {
35814
35875
  var maxRowColSpan = this.calcMaxRowColSpan();
35815
- var columns = [].concat(this.layoutColumns);
35816
- if (maxRowColSpan <= this.layoutColumns.length) {
35817
- columns = this.layoutColumns.slice(0, maxRowColSpan);
35876
+ var columns = [].concat(this.gridLayoutColumns);
35877
+ if (maxRowColSpan <= this.gridLayoutColumns.length) {
35878
+ columns = this.gridLayoutColumns.slice(0, maxRowColSpan);
35818
35879
  }
35819
35880
  else {
35820
- for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
35881
+ for (var index = this.gridLayoutColumns.length; index < maxRowColSpan; index++) {
35821
35882
  var newCol = new panel_layout_column_PanelLayoutColumnModel();
35822
35883
  newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
35823
35884
  columns.push(newCol);
@@ -35831,7 +35892,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35831
35892
  finally {
35832
35893
  this._columnsReady = true;
35833
35894
  }
35834
- this.layoutColumns = columns;
35895
+ this.gridLayoutColumns = columns;
35896
+ };
35897
+ PanelModelBase.prototype.updateGridColumns = function () {
35898
+ this.updateColumns();
35899
+ this.elements.forEach(function (el) {
35900
+ el.isPanel && el.updateGridColumns();
35901
+ });
35835
35902
  };
35836
35903
  PanelModelBase.prototype.getColumsForElement = function (el) {
35837
35904
  var row = this.findRowByElement(el);
@@ -36687,13 +36754,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36687
36754
  };
36688
36755
  PanelModelBase.prototype.getSerializableColumnsValue = function () {
36689
36756
  var tailIndex = -1;
36690
- for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
36691
- if (!this.layoutColumns[index].isEmpty()) {
36757
+ for (var index = this.gridLayoutColumns.length - 1; index >= 0; index--) {
36758
+ if (!this.gridLayoutColumns[index].isEmpty()) {
36692
36759
  tailIndex = index;
36693
36760
  break;
36694
36761
  }
36695
36762
  }
36696
- return this.layoutColumns.slice(0, tailIndex + 1);
36763
+ return this.gridLayoutColumns.slice(0, tailIndex + 1);
36697
36764
  };
36698
36765
  PanelModelBase.prototype.afterRender = function (el) {
36699
36766
  this.afterRenderCore(el);
@@ -36717,7 +36784,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36717
36784
  PanelModelBase.panelCounter = 100;
36718
36785
  panel_decorate([
36719
36786
  propertyArray()
36720
- ], PanelModelBase.prototype, "layoutColumns", void 0);
36787
+ ], PanelModelBase.prototype, "gridLayoutColumns", void 0);
36721
36788
  panel_decorate([
36722
36789
  jsonobject_property({ defaultValue: true })
36723
36790
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -36890,13 +36957,18 @@ var panel_PanelModel = /** @class */ (function (_super) {
36890
36957
  * @see visibleIf
36891
36958
  */
36892
36959
  get: function () {
36893
- return this.getPropertyValue("no", "");
36960
+ var _this = this;
36961
+ return this.getPropertyValue("no", undefined, function () { return _this.calcNo(); });
36894
36962
  },
36895
36963
  enumerable: false,
36896
36964
  configurable: true
36897
36965
  });
36898
- PanelModel.prototype.setNo = function (visibleIndex) {
36899
- this.setPropertyValue("no", helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex()));
36966
+ PanelModel.prototype.calcNo = function () {
36967
+ var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex());
36968
+ if (this.survey) {
36969
+ no = this.survey.getUpdatedPanelNo(this, no);
36970
+ }
36971
+ return no || "";
36900
36972
  };
36901
36973
  PanelModel.prototype.notifyStateChanged = function (prevState) {
36902
36974
  if (!this.isLoadingFromJson) {
@@ -36923,7 +36995,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36923
36995
  visibleIndex = index;
36924
36996
  }
36925
36997
  this.setPropertyValue("visibleIndex", visibleIndex);
36926
- this.setNo(visibleIndex);
36998
+ this.resetPropertyValue("no");
36927
36999
  return visibleIndex < 0 ? 0 : 1;
36928
37000
  };
36929
37001
  PanelModel.prototype.getPanelStartIndex = function (index) {
@@ -37211,7 +37283,7 @@ Serializer.addClass("panelbase", [
37211
37283
  choices: ["default", "top", "bottom", "left", "hidden"],
37212
37284
  },
37213
37285
  {
37214
- name: "layoutColumns:panellayoutcolumns",
37286
+ name: "gridLayoutColumns:panellayoutcolumns",
37215
37287
  className: "panellayoutcolumn", isArray: true,
37216
37288
  onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
37217
37289
  visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
@@ -38742,9 +38814,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38742
38814
  */
38743
38815
  _this.onGetQuestionNumber = _this.addEvent();
38744
38816
  /**
38745
- * This event is obsolete. Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
38817
+ * Obsolete. Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
38818
+ * @deprecated
38746
38819
  */
38747
38820
  _this.onGetQuestionNo = _this.onGetQuestionNumber;
38821
+ /**
38822
+ * An event that is raised before the survey calculates a panel number. Handle this event to modify panel numbers.
38823
+ *
38824
+ * This event is raised only for the panels with a [specified title](https://surveyjs.io/form-library/documentation/api-reference/panel-model#title) and [visible number](https://surveyjs.io/form-library/documentation/api-reference/panel-model#showNumber).
38825
+ */
38826
+ _this.onGetPanelNumber = _this.addEvent();
38748
38827
  /**
38749
38828
  * An event that is raised before the survey calculates a page number. Handle this event to modify page numbers.
38750
38829
  *
@@ -38760,7 +38839,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38760
38839
  * @see showProgressBar
38761
38840
  * @see progressBarType
38762
38841
  */
38763
- _this.onProgressText = _this.addEvent();
38842
+ _this.onGetProgressText = _this.addEvent();
38843
+ /**
38844
+ * Obsolete. Use the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event instead.
38845
+ * @deprecated
38846
+ */
38847
+ _this.onProgressText = _this.onGetProgressText;
38764
38848
  /**
38765
38849
  * An event that is raised to convert Markdown content to HTML.
38766
38850
  *
@@ -38962,7 +39046,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38962
39046
  */
38963
39047
  _this.onMatrixRowAdding = _this.addEvent();
38964
39048
  /**
38965
- * This event is obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
39049
+ * Obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
39050
+ * @deprecated
38966
39051
  */
38967
39052
  _this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
38968
39053
  /**
@@ -38982,7 +39067,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38982
39067
  */
38983
39068
  _this.onMatrixRenderRemoveButton = _this.addEvent();
38984
39069
  /**
38985
- * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
39070
+ * Obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
39071
+ * @deprecated
38986
39072
  */
38987
39073
  _this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
38988
39074
  /**
@@ -39005,7 +39091,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39005
39091
  */
39006
39092
  _this.onAfterRenderMatrixCell = _this.addEvent();
39007
39093
  /**
39008
- * This event is obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
39094
+ * Obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
39095
+ * @deprecated
39009
39096
  */
39010
39097
  _this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
39011
39098
  /**
@@ -39079,7 +39166,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39079
39166
  /**
39080
39167
  * An event that is raised to define whether a question answer is correct. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
39081
39168
  */
39082
- _this.onIsAnswerCorrect = _this.addEvent();
39169
+ _this.onCheckAnswerCorrect = _this.addEvent();
39170
+ /**
39171
+ * Obsolete. Use the [`onCheckAnswerCorrect`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCheckAnswerCorrect) event instead.
39172
+ * @deprecated
39173
+ */
39174
+ _this.onIsAnswerCorrect = _this.onCheckAnswerCorrect;
39083
39175
  /**
39084
39176
  * An event that is raised when users drag and drop survey elements while designing the survey in [Survey Creator](https://surveyjs.io/survey-creator/documentation/overview). Use this event to control drag and drop operations.
39085
39177
  * @see isDesignMode
@@ -39088,7 +39180,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39088
39180
  /**
39089
39181
  * An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
39090
39182
  */
39091
- _this.onScrollingElementToTop = _this.addEvent();
39183
+ _this.onScrollToTop = _this.addEvent();
39184
+ /**
39185
+ * Obsolete. Use the [`onScrollToTop`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onScrollToTop) event instead.
39186
+ * @deprecated
39187
+ */
39188
+ _this.onScrollingElementToTop = _this.onScrollToTop;
39092
39189
  _this.onLocaleChangedEvent = _this.addEvent();
39093
39190
  /**
39094
39191
  * An event that allows you to add, delete, or modify actions in a question title.
@@ -39127,9 +39224,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39127
39224
  * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
39128
39225
  */
39129
39226
  _this.onGetMatrixRowActions = _this.addEvent();
39130
- /**
39131
- * An event that is raised after a survey element is [expanded or collapsed](https://surveyjs.io/form-library/documentation/api-reference/question#state).
39132
- */
39133
39227
  _this.onElementContentVisibilityChanged = _this.addEvent();
39134
39228
  /**
39135
39229
  * An event that is raised before an [Expression](https://surveyjs.io/form-library/documentation/api-reference/expression-model) question displays a value. Use this event to override the display value.
@@ -39303,7 +39397,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39303
39397
  _this.onGetQuestionNumber.onCallbacksChanged = function () {
39304
39398
  _this.resetVisibleIndexes();
39305
39399
  };
39306
- _this.onProgressText.onCallbacksChanged = function () {
39400
+ _this.onGetPanelNumber.onCallbacksChanged = function () {
39401
+ _this.resetVisibleIndexes();
39402
+ };
39403
+ _this.onGetProgressText.onCallbacksChanged = function () {
39307
39404
  _this.updateProgressText();
39308
39405
  };
39309
39406
  _this.onTextMarkdown.onCallbacksChanged = function () {
@@ -41373,6 +41470,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
41373
41470
  this.onGetQuestionNumber.fire(this, options);
41374
41471
  return options.no === no ? options.number : options.no;
41375
41472
  };
41473
+ SurveyModel.prototype.getUpdatedPanelNo = function (panel, no) {
41474
+ if (this.onGetPanelNumber.isEmpty)
41475
+ return no;
41476
+ var options = { panel: panel, number: no };
41477
+ this.onGetPanelNumber.fire(this, options);
41478
+ return options.number;
41479
+ };
41376
41480
  SurveyModel.prototype.getUpdatedPageNo = function (page, no) {
41377
41481
  if (this.onGetPageNumber.isEmpty)
41378
41482
  return no;
@@ -42760,7 +42864,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42760
42864
  };
42761
42865
  Object.defineProperty(SurveyModel.prototype, "ignoreValidation", {
42762
42866
  /**
42763
- * This property is obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
42867
+ * Obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
42868
+ * @deprecated
42764
42869
  */
42765
42870
  get: function () { return !this.validationEnabled; },
42766
42871
  set: function (val) { this.validationEnabled = !val; },
@@ -43115,7 +43220,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43115
43220
  * @see isCurrentPageValid
43116
43221
  * @see nextPage
43117
43222
  */
43118
- SurveyModel.prototype.completeLastPage = function () {
43223
+ SurveyModel.prototype.tryComplete = function () {
43119
43224
  if (this.isValidateOnComplete) {
43120
43225
  this.cancelPreview();
43121
43226
  }
@@ -43125,6 +43230,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43125
43230
  }
43126
43231
  return res;
43127
43232
  };
43233
+ /**
43234
+ * Obsolete. Use the [`tryComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#tryComplete) method instead.
43235
+ * @deprecated
43236
+ */
43237
+ SurveyModel.prototype.completeLastPage = function () {
43238
+ return this.tryComplete();
43239
+ };
43128
43240
  SurveyModel.prototype.navigationMouseDown = function () {
43129
43241
  this.isNavigationButtonPressed = true;
43130
43242
  return true;
@@ -43896,7 +44008,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43896
44008
  };
43897
44009
  Object.defineProperty(SurveyModel.prototype, "progressText", {
43898
44010
  /**
43899
- * Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`onProgressText`](#onProgressText) event to change this text.
44011
+ * Returns text displayed by the progress bar (for instance, "Page 2 of 3" or "Answered 3/8 questions"). Handle the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event to change this text.
43900
44012
  * @see progressValue
43901
44013
  * @see showProgressBar
43902
44014
  * @see progressBarType
@@ -43918,7 +44030,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43918
44030
  return;
43919
44031
  if (onValueChanged &&
43920
44032
  this.progressBarType == "pages" &&
43921
- this.onProgressText.isEmpty)
44033
+ this.onGetProgressText.isEmpty)
43922
44034
  return;
43923
44035
  this.isCalculatingProgressText = true;
43924
44036
  this.setPropertyValue("progressText", this.getProgressText());
@@ -43939,7 +44051,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43939
44051
  if (type === "questions" ||
43940
44052
  type === "requiredquestions" ||
43941
44053
  type === "correctquestions" ||
43942
- !this.onProgressText.isEmpty) {
44054
+ !this.onGetProgressText.isEmpty) {
43943
44055
  var info = this.getProgressInfo();
43944
44056
  options.questionCount = info.questionCount;
43945
44057
  options.answeredQuestionCount = info.answeredQuestionCount;
@@ -43948,7 +44060,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43948
44060
  info.requiredAnsweredQuestionCount;
43949
44061
  }
43950
44062
  options.text = this.getProgressTextCore(options);
43951
- this.onProgressText.fire(this, options);
44063
+ this.onGetProgressText.fire(this, options);
43952
44064
  return options.text;
43953
44065
  };
43954
44066
  SurveyModel.prototype.getProgressTextCore = function (info) {
@@ -44333,29 +44445,39 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44333
44445
  return this.getUpdatedPanelTitleActions(element, titleActions);
44334
44446
  return this.getUpdatedQuestionTitleActions(element, titleActions);
44335
44447
  };
44448
+ SurveyModel.prototype.getTitleActionsResult = function (titleActions, options) {
44449
+ if (titleActions != options.actions)
44450
+ return options.actions;
44451
+ if (titleActions != options.titleActions)
44452
+ return options.titleActions;
44453
+ return titleActions;
44454
+ };
44336
44455
  SurveyModel.prototype.getUpdatedQuestionTitleActions = function (question, titleActions) {
44337
44456
  var options = {
44338
44457
  question: question,
44458
+ actions: titleActions,
44339
44459
  titleActions: titleActions,
44340
44460
  };
44341
44461
  this.onGetQuestionTitleActions.fire(this, options);
44342
- return options.titleActions;
44462
+ return this.getTitleActionsResult(titleActions, options);
44343
44463
  };
44344
44464
  SurveyModel.prototype.getUpdatedPanelTitleActions = function (panel, titleActions) {
44345
44465
  var options = {
44346
44466
  panel: panel,
44467
+ actions: titleActions,
44347
44468
  titleActions: titleActions,
44348
44469
  };
44349
44470
  this.onGetPanelTitleActions.fire(this, options);
44350
- return options.titleActions;
44471
+ return this.getTitleActionsResult(titleActions, options);
44351
44472
  };
44352
44473
  SurveyModel.prototype.getUpdatedPageTitleActions = function (page, titleActions) {
44353
44474
  var options = {
44354
44475
  page: page,
44476
+ actions: titleActions,
44355
44477
  titleActions: titleActions,
44356
44478
  };
44357
44479
  this.onGetPageTitleActions.fire(this, options);
44358
- return options.titleActions;
44480
+ return this.getTitleActionsResult(titleActions, options);
44359
44481
  };
44360
44482
  SurveyModel.prototype.getUpdatedMatrixRowActions = function (question, row, actions) {
44361
44483
  var options = {
@@ -44374,9 +44496,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44374
44496
  page: page,
44375
44497
  elementId: id,
44376
44498
  cancel: false,
44499
+ allow: true,
44377
44500
  };
44378
- this.onScrollingElementToTop.fire(this, options);
44379
- if (!options.cancel) {
44501
+ this.onScrollToTop.fire(this, options);
44502
+ if (!options.cancel && options.allow) {
44380
44503
  var elementPage_1 = this.getPageByElement(element);
44381
44504
  if (this.isLazyRendering && !!elementPage_1) {
44382
44505
  var elementsToRenderBefore = 1;
@@ -44663,13 +44786,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44663
44786
  }
44664
44787
  return null;
44665
44788
  };
44666
- /**
44667
- * Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
44668
- * @param names An array of question names.
44669
- * @param caseInsensitive *(Optional)* A Boolean value that specifies case sensitivity when searching for the questions. Default value: `false` (uppercase and lowercase letters are treated as distinct).
44670
- * @returns An array of questions with specified names
44671
- * @see getAllQuestions
44672
- */
44673
44789
  SurveyModel.prototype.getQuestionsByNames = function (names, caseInsensitive) {
44674
44790
  if (caseInsensitive === void 0) { caseInsensitive = false; }
44675
44791
  var result = [];
@@ -44714,10 +44830,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44714
44830
  }
44715
44831
  return null;
44716
44832
  };
44717
- /**
44718
- * Returns an array of pages with specified names.
44719
- * @param names An array of page names.
44720
- */
44721
44833
  SurveyModel.prototype.getPagesByNames = function (names) {
44722
44834
  var result = [];
44723
44835
  if (!names)
@@ -45411,7 +45523,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45411
45523
  mouseDown: function () { return _this.navigationMouseDown(); },
45412
45524
  },
45413
45525
  locTitle: this.locCompleteText,
45414
- action: function () { return _this.taskManager.waitAndExecute(function () { return _this.completeLastPage(); }); },
45526
+ action: function () { return _this.taskManager.waitAndExecute(function () { return _this.tryComplete(); }); },
45415
45527
  component: defaultComponent
45416
45528
  });
45417
45529
  this.updateNavigationItemCssCallback = function () {
@@ -45782,7 +45894,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45782
45894
  _this.showPreview();
45783
45895
  }
45784
45896
  else {
45785
- _this.completeLastPage();
45897
+ _this.tryComplete();
45786
45898
  }
45787
45899
  }
45788
45900
  };
@@ -46100,7 +46212,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46100
46212
  * For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
46101
46213
  * @returns The number of correct answers in a quiz.
46102
46214
  * @see getQuizQuestionCount
46103
- * @see getInCorrectAnswerCount
46215
+ * @see getIncorrectAnswerCount
46104
46216
  */
46105
46217
  SurveyModel.prototype.getCorrectAnswerCount = function () {
46106
46218
  return this.getCorrectedAnswerCountCore(true);
@@ -46123,7 +46235,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46123
46235
  return res;
46124
46236
  };
46125
46237
  SurveyModel.prototype.getInCorrectedAnswerCount = function () {
46126
- return this.getInCorrectAnswerCount();
46238
+ return this.getIncorrectAnswerCount();
46239
+ };
46240
+ SurveyModel.prototype.getInCorrectAnswerCount = function () {
46241
+ return this.getIncorrectAnswerCount();
46127
46242
  };
46128
46243
  /**
46129
46244
  * Returns the number of incorrect answers in a quiz.
@@ -46132,7 +46247,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46132
46247
  * @returns The number of incorrect answers in a quiz.
46133
46248
  * @see getCorrectAnswerCount
46134
46249
  */
46135
- SurveyModel.prototype.getInCorrectAnswerCount = function () {
46250
+ SurveyModel.prototype.getIncorrectAnswerCount = function () {
46136
46251
  return this.getCorrectedAnswerCountCore(false);
46137
46252
  };
46138
46253
  SurveyModel.prototype.onCorrectQuestionAnswer = function (question, options) {
@@ -46279,6 +46394,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46279
46394
  enumerable: false,
46280
46395
  configurable: true
46281
46396
  });
46397
+ SurveyModel.prototype.updateGridColumns = function () {
46398
+ this.pages.forEach(function (page) { return page.updateGridColumns(); });
46399
+ };
46282
46400
  Object.defineProperty(SurveyModel.prototype, "widthMode", {
46283
46401
  /**
46284
46402
  * Specifies how to calculate the survey width.
@@ -46624,13 +46742,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46624
46742
  this.onTimerTick.fire(this, {});
46625
46743
  if (this.timeLimit > 0 && this.timeLimit <= this.timeSpent) {
46626
46744
  this.timeSpent = this.timeLimit;
46627
- this.completeLastPage();
46745
+ this.tryComplete();
46628
46746
  }
46629
46747
  if (page) {
46630
46748
  var pageLimit = page.getMaxTimeToFinish();
46631
46749
  if (pageLimit > 0 && pageLimit == page.timeSpent) {
46632
46750
  if (this.isLastPage) {
46633
- this.completeLastPage();
46751
+ this.tryComplete();
46634
46752
  }
46635
46753
  else {
46636
46754
  this.nextPage();
@@ -47188,13 +47306,22 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47188
47306
  jsonobject_property()
47189
47307
  ], SurveyModel.prototype, "rootCss", void 0);
47190
47308
  survey_decorate([
47191
- jsonobject_property()
47309
+ jsonobject_property({
47310
+ onSet: function (newValue, target) {
47311
+ target.updateGridColumns();
47312
+ }
47313
+ })
47192
47314
  ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
47193
47315
  survey_decorate([
47194
47316
  jsonobject_property()
47195
47317
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
47196
47318
  survey_decorate([
47197
- jsonobject_property({ defaultValue: 100 })
47319
+ jsonobject_property({
47320
+ defaultValue: 100,
47321
+ onSet: function (val, target, prevVal) {
47322
+ target.pages.forEach(function (p) { return p.updateRootStyle(); });
47323
+ },
47324
+ })
47198
47325
  ], SurveyModel.prototype, "widthScale", void 0);
47199
47326
  survey_decorate([
47200
47327
  jsonobject_property()
@@ -54453,6 +54580,9 @@ var question_multipletext_MultipleTextItemModel = /** @class */ (function (_supe
54453
54580
  if (title) {
54454
54581
  _this.title = title;
54455
54582
  }
54583
+ _this.editor.onPropertyChanged.add(function (sender, options) {
54584
+ _this.onPropertyChanged.fire(_this, options);
54585
+ });
54456
54586
  return _this;
54457
54587
  }
54458
54588
  MultipleTextItemModel.prototype.getType = function () {
@@ -62869,10 +62999,17 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
62869
62999
  enumerable: false,
62870
63000
  configurable: true
62871
63001
  });
63002
+ Object.defineProperty(QuestionImagePickerModel.prototype, "imageScale", {
63003
+ get: function () {
63004
+ return this.survey ? this.survey["widthScale"] / 100 : 1;
63005
+ },
63006
+ enumerable: false,
63007
+ configurable: true
63008
+ });
62872
63009
  Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageHeight", {
62873
63010
  get: function () {
62874
- var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight;
62875
- return (height ? height : 150);
63011
+ var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight * this.imageScale;
63012
+ return (height ? height : 150 * this.imageScale);
62876
63013
  },
62877
63014
  enumerable: false,
62878
63015
  configurable: true
@@ -62899,8 +63036,8 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
62899
63036
  });
62900
63037
  Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageWidth", {
62901
63038
  get: function () {
62902
- var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth;
62903
- return (width ? width : 200);
63039
+ var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth * this.imageScale;
63040
+ return (width ? width : 200 * this.imageScale);
62904
63041
  },
62905
63042
  enumerable: false,
62906
63043
  configurable: true
@@ -63008,11 +63145,11 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
63008
63145
  };
63009
63146
  if (this.isResponsive) {
63010
63147
  var itemsCount = this.choices.length + (this.isDesignMode ? 1 : 0);
63011
- var gap = this.gapBetweenItems || 0;
63012
- var minWidth = this.minImageWidth;
63013
- var maxWidth = this.maxImageWidth;
63014
- var maxHeight = this.maxImageHeight;
63015
- var minHeight = this.minImageHeight;
63148
+ var gap = (this.gapBetweenItems || 0) * this.imageScale;
63149
+ var minWidth = this.minImageWidth * this.imageScale;
63150
+ var maxWidth = this.maxImageWidth * this.imageScale;
63151
+ var maxHeight = this.maxImageHeight * this.imageScale;
63152
+ var minHeight = this.minImageHeight * this.imageScale;
63016
63153
  var colCount = this.colCount;
63017
63154
  var width_1;
63018
63155
  if (colCount === 0) {
@@ -70627,8 +70764,8 @@ Serializer.addClass("currencymask", [
70627
70764
 
70628
70765
  var Version;
70629
70766
  var ReleaseDate;
70630
- Version = "" + "1.12.16-patch.1";
70631
- ReleaseDate = "" + "2024-12-25";
70767
+ Version = "" + "1.12.17";
70768
+ ReleaseDate = "" + "2024-12-30";
70632
70769
  function checkLibraryVersion(ver, libraryName) {
70633
70770
  if (Version != ver) {
70634
70771
  var str = "survey-core has version '" + Version + "' and " + libraryName