survey-core 1.12.16 → 1.12.18

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 (237) hide show
  1. package/defaultV2.css +2 -2
  2. package/defaultV2.fontless.css +2 -2
  3. package/defaultV2.fontless.min.css +2 -2
  4. package/defaultV2.min.css +2 -2
  5. package/i18n/arabic.js +2 -2
  6. package/i18n/arabic.min.js +2 -2
  7. package/i18n/basque.js +2 -2
  8. package/i18n/basque.min.js +2 -2
  9. package/i18n/bulgarian.js +2 -2
  10. package/i18n/bulgarian.min.js +2 -2
  11. package/i18n/burmese.js +218 -0
  12. package/i18n/burmese.js.map +1 -0
  13. package/i18n/burmese.min.js +6 -0
  14. package/i18n/catalan.js +2 -2
  15. package/i18n/catalan.min.js +3 -3
  16. package/i18n/croatian.js +2 -2
  17. package/i18n/croatian.min.js +3 -3
  18. package/i18n/czech.js +2 -2
  19. package/i18n/czech.min.js +3 -3
  20. package/i18n/danish.js +2 -2
  21. package/i18n/danish.min.js +3 -3
  22. package/i18n/dutch.js +2 -2
  23. package/i18n/dutch.min.js +2 -2
  24. package/i18n/english.js +2 -2
  25. package/i18n/english.min.js +3 -3
  26. package/i18n/estonian.js +2 -2
  27. package/i18n/estonian.min.js +3 -3
  28. package/i18n/finnish.js +2 -2
  29. package/i18n/finnish.min.js +3 -3
  30. package/i18n/french.js +2 -2
  31. package/i18n/french.min.js +3 -3
  32. package/i18n/georgian.js +2 -2
  33. package/i18n/georgian.min.js +3 -3
  34. package/i18n/german.js +2 -2
  35. package/i18n/german.min.js +3 -3
  36. package/i18n/greek.js +2 -2
  37. package/i18n/greek.min.js +3 -3
  38. package/i18n/hebrew.js +2 -2
  39. package/i18n/hebrew.min.js +3 -3
  40. package/i18n/hindi.js +2 -2
  41. package/i18n/hindi.min.js +3 -3
  42. package/i18n/hungarian.js +2 -2
  43. package/i18n/hungarian.min.js +3 -3
  44. package/i18n/icelandic.js +2 -2
  45. package/i18n/icelandic.min.js +3 -3
  46. package/i18n/index.js +107 -2
  47. package/i18n/index.js.map +1 -1
  48. package/i18n/index.min.js +3 -3
  49. package/i18n/indonesian.js +2 -2
  50. package/i18n/indonesian.min.js +3 -3
  51. package/i18n/italian.js +2 -2
  52. package/i18n/italian.min.js +3 -3
  53. package/i18n/japanese.js +2 -2
  54. package/i18n/japanese.min.js +3 -3
  55. package/i18n/kazakh.js +2 -2
  56. package/i18n/kazakh.min.js +3 -3
  57. package/i18n/korean.js +2 -2
  58. package/i18n/korean.min.js +3 -3
  59. package/i18n/latvian.js +2 -2
  60. package/i18n/latvian.min.js +3 -3
  61. package/i18n/lithuanian.js +2 -2
  62. package/i18n/lithuanian.min.js +3 -3
  63. package/i18n/macedonian.js +2 -2
  64. package/i18n/macedonian.min.js +3 -3
  65. package/i18n/malay.js +2 -2
  66. package/i18n/malay.min.js +3 -3
  67. package/i18n/nl-BE.js +2 -2
  68. package/i18n/nl-BE.min.js +3 -3
  69. package/i18n/norwegian.js +2 -2
  70. package/i18n/norwegian.min.js +3 -3
  71. package/i18n/persian.js +2 -2
  72. package/i18n/persian.min.js +3 -3
  73. package/i18n/philippines.js +2 -2
  74. package/i18n/philippines.min.js +3 -3
  75. package/i18n/polish.js +2 -2
  76. package/i18n/polish.min.js +3 -3
  77. package/i18n/portuguese-br.js +2 -2
  78. package/i18n/portuguese-br.min.js +3 -3
  79. package/i18n/portuguese.js +2 -2
  80. package/i18n/portuguese.min.js +3 -3
  81. package/i18n/romanian.js +2 -2
  82. package/i18n/romanian.min.js +3 -3
  83. package/i18n/russian.js +2 -2
  84. package/i18n/russian.min.js +3 -3
  85. package/i18n/serbian.js +2 -2
  86. package/i18n/serbian.min.js +3 -3
  87. package/i18n/simplified-chinese.js +2 -2
  88. package/i18n/simplified-chinese.min.js +3 -3
  89. package/i18n/slovak.js +2 -2
  90. package/i18n/slovak.min.js +3 -3
  91. package/i18n/spanish.js +2 -2
  92. package/i18n/spanish.min.js +3 -3
  93. package/i18n/swahili.js +2 -2
  94. package/i18n/swahili.min.js +3 -3
  95. package/i18n/swedish.js +2 -2
  96. package/i18n/swedish.min.js +3 -3
  97. package/i18n/tajik.js +2 -2
  98. package/i18n/tajik.min.js +3 -3
  99. package/i18n/telugu.js +2 -2
  100. package/i18n/telugu.min.js +3 -3
  101. package/i18n/thai.js +2 -2
  102. package/i18n/thai.min.js +3 -3
  103. package/i18n/traditional-chinese.js +2 -2
  104. package/i18n/traditional-chinese.min.js +3 -3
  105. package/i18n/turkish.js +2 -2
  106. package/i18n/turkish.min.js +3 -3
  107. package/i18n/ukrainian.js +2 -2
  108. package/i18n/ukrainian.min.js +3 -3
  109. package/i18n/urdu.js +2 -2
  110. package/i18n/urdu.min.js +3 -3
  111. package/i18n/vietnamese.js +2 -2
  112. package/i18n/vietnamese.min.js +3 -3
  113. package/i18n/welsh.js +2 -2
  114. package/i18n/welsh.min.js +3 -3
  115. package/icons/iconsV1.js +2 -2
  116. package/icons/iconsV1.min.js +2 -2
  117. package/icons/iconsV2.js +2 -2
  118. package/icons/iconsV2.min.js +2 -2
  119. package/modern.css +2 -2
  120. package/modern.fontless.css +2 -2
  121. package/modern.fontless.min.css +2 -2
  122. package/modern.min.css +2 -2
  123. package/package.json +1 -1
  124. package/plugins/bootstrap-integration/index.js +2 -2
  125. package/plugins/bootstrap-integration/index.min.js +2 -2
  126. package/plugins/bootstrap-material-integration/index.js +2 -2
  127. package/plugins/bootstrap-material-integration/index.min.js +2 -2
  128. package/survey.core.js +206 -87
  129. package/survey.core.js.map +1 -1
  130. package/survey.core.min.js +4 -4
  131. package/survey.css +2 -2
  132. package/survey.i18n.js +107 -2
  133. package/survey.i18n.js.map +1 -1
  134. package/survey.i18n.min.js +3 -3
  135. package/survey.min.css +2 -2
  136. package/themes/borderless-dark-panelless.js +2 -2
  137. package/themes/borderless-dark-panelless.min.js +2 -2
  138. package/themes/borderless-dark.js +2 -2
  139. package/themes/borderless-dark.min.js +2 -2
  140. package/themes/borderless-light-panelless..js +2 -2
  141. package/themes/borderless-light-panelless..min.js +2 -2
  142. package/themes/borderless-light.js +2 -2
  143. package/themes/borderless-light.min.js +2 -2
  144. package/themes/contrast-dark-panelless.js +2 -2
  145. package/themes/contrast-dark-panelless.min.js +2 -2
  146. package/themes/contrast-dark.js +2 -2
  147. package/themes/contrast-dark.min.js +2 -2
  148. package/themes/contrast-light-panelless.js +2 -2
  149. package/themes/contrast-light-panelless.min.js +2 -2
  150. package/themes/contrast-light.js +2 -2
  151. package/themes/contrast-light.min.js +2 -2
  152. package/themes/default-dark-panelless.js +2 -2
  153. package/themes/default-dark-panelless.min.js +2 -2
  154. package/themes/default-dark.js +2 -2
  155. package/themes/default-dark.min.js +2 -2
  156. package/themes/default-light-panelless.js +2 -2
  157. package/themes/default-light-panelless.min.js +2 -2
  158. package/themes/default-light.js +2 -2
  159. package/themes/default-light.min.js +2 -2
  160. package/themes/doubleborder-dark-panelless.js +2 -2
  161. package/themes/doubleborder-dark-panelless.min.js +2 -2
  162. package/themes/doubleborder-dark.js +2 -2
  163. package/themes/doubleborder-dark.min.js +2 -2
  164. package/themes/doubleborder-light-panelles.js +2 -2
  165. package/themes/doubleborder-light-panelles.min.js +2 -2
  166. package/themes/doubleborder-light.js +2 -2
  167. package/themes/doubleborder-light.min.js +2 -2
  168. package/themes/flat-dark-panelless.js +2 -2
  169. package/themes/flat-dark-panelless.min.js +2 -2
  170. package/themes/flat-dark.js +2 -2
  171. package/themes/flat-dark.min.js +2 -2
  172. package/themes/flat-light-panelless.js +2 -2
  173. package/themes/flat-light-panelless.min.js +2 -2
  174. package/themes/flat-light.js +2 -2
  175. package/themes/flat-light.min.js +2 -2
  176. package/themes/index.js +2 -2
  177. package/themes/index.min.js +2 -2
  178. package/themes/layered-dark-panelless.js +2 -2
  179. package/themes/layered-dark-panelless.min.js +2 -2
  180. package/themes/layered-dark.js +2 -2
  181. package/themes/layered-dark.min.js +2 -2
  182. package/themes/layered-light-panelless.js +2 -2
  183. package/themes/layered-light-panelless.min.js +2 -2
  184. package/themes/layered-light.js +2 -2
  185. package/themes/layered-light.min.js +2 -2
  186. package/themes/plain-dark-panelless.js +2 -2
  187. package/themes/plain-dark-panelless.min.js +2 -2
  188. package/themes/plain-dark.js +2 -2
  189. package/themes/plain-dark.min.js +2 -2
  190. package/themes/plain-light-panelless.js +2 -2
  191. package/themes/plain-light-panelless.min.js +2 -2
  192. package/themes/plain-light.js +2 -2
  193. package/themes/plain-light.min.js +2 -2
  194. package/themes/sharp-dark-panelless.js +2 -2
  195. package/themes/sharp-dark-panelless.min.js +2 -2
  196. package/themes/sharp-dark.js +2 -2
  197. package/themes/sharp-dark.min.js +2 -2
  198. package/themes/sharp-light-panelless.js +2 -2
  199. package/themes/sharp-light-panelless.min.js +2 -2
  200. package/themes/sharp-light.js +2 -2
  201. package/themes/sharp-light.min.js +2 -2
  202. package/themes/solid-dark-panelless.js +2 -2
  203. package/themes/solid-dark-panelless.min.js +2 -2
  204. package/themes/solid-dark.js +2 -2
  205. package/themes/solid-dark.min.js +2 -2
  206. package/themes/solid-light-panelless.js +2 -2
  207. package/themes/solid-light-panelless.min.js +2 -2
  208. package/themes/solid-light.js +2 -2
  209. package/themes/solid-light.min.js +2 -2
  210. package/themes/three-dimensional-dark-panelless.js +2 -2
  211. package/themes/three-dimensional-dark-panelless.min.js +2 -2
  212. package/themes/three-dimensional-dark.js +2 -2
  213. package/themes/three-dimensional-dark.min.js +2 -2
  214. package/themes/three-dimensional-light-panelless.js +2 -2
  215. package/themes/three-dimensional-light-panelless.min.js +2 -2
  216. package/themes/three-dimensional-light.js +2 -2
  217. package/themes/three-dimensional-light.min.js +2 -2
  218. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  219. package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  220. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +3 -2
  221. package/ts3.4/typings/packages/survey-core/src/question.d.ts +1 -1
  222. package/ts3.4/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
  223. package/ts3.4/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +2 -2
  224. package/ts3.4/typings/packages/survey-core/src/settings.d.ts +1 -0
  225. package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
  226. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +48 -25
  227. package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
  228. package/typings/packages/survey-core/src/base-interfaces.d.ts +1 -0
  229. package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  230. package/typings/packages/survey-core/src/panel.d.ts +3 -2
  231. package/typings/packages/survey-core/src/question.d.ts +1 -1
  232. package/typings/packages/survey-core/src/question_imagepicker.d.ts +1 -0
  233. package/typings/packages/survey-core/src/question_matrixdropdownrendered.d.ts +2 -2
  234. package/typings/packages/survey-core/src/settings.d.ts +1 -0
  235. package/typings/packages/survey-core/src/survey-events-api.d.ts +38 -10
  236. package/typings/packages/survey-core/src/survey.d.ts +49 -25
  237. package/typings/packages/survey-core/src/utils/utils.d.ts +1 -1
package/survey.core.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.16
3
- * Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
2
+ * surveyjs - Survey JavaScript library v1.12.18
3
+ * Copyright (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
6
6
  (function webpackUniversalModuleDefinition(root, factory) {
@@ -10185,13 +10185,13 @@ var list_ListModel = /** @class */ (function (_super) {
10185
10185
  var _this = this;
10186
10186
  this.isEmpty = this.renderedActions.filter(function (action) { return _this.isItemVisible(action); }).length === 0;
10187
10187
  };
10188
- ListModel.prototype.scrollToItem = function (selector, ms) {
10188
+ ListModel.prototype.scrollToItem = function (classes, ms) {
10189
10189
  var _this = this;
10190
10190
  if (ms === void 0) { ms = 0; }
10191
10191
  setTimeout(function () {
10192
10192
  if (!_this.listContainerHtmlElement)
10193
10193
  return;
10194
- var item = _this.listContainerHtmlElement.querySelector("." + selector);
10194
+ var item = _this.listContainerHtmlElement.querySelector(classesToSelector(classes));
10195
10195
  if (item) {
10196
10196
  setTimeout(function () {
10197
10197
  item.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
@@ -10259,7 +10259,7 @@ var list_ListModel = /** @class */ (function (_super) {
10259
10259
  });
10260
10260
  Object.defineProperty(ListModel.prototype, "scrollableContainer", {
10261
10261
  get: function () {
10262
- return this.listContainerHtmlElement.querySelector("." + this.cssClasses.itemsContainer);
10262
+ return this.listContainerHtmlElement.querySelector(classesToSelector(this.cssClasses.itemsContainer));
10263
10263
  },
10264
10264
  enumerable: false,
10265
10265
  configurable: true
@@ -13265,11 +13265,11 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13265
13265
  var columns = this.parent.getColumsForElement(this);
13266
13266
  _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
13267
13267
  if (!!_width && _width !== 100) {
13268
- style["flexGrow"] = 0;
13268
+ style["flexGrow"] = 1;
13269
13269
  style["flexShrink"] = 0;
13270
13270
  style["flexBasis"] = _width + "%";
13271
13271
  style["minWidth"] = undefined;
13272
- style["maxWidth"] = undefined;
13272
+ style["maxWidth"] = this.maxWidth;
13273
13273
  }
13274
13274
  }
13275
13275
  if (Object.keys(style).length == 0) {
@@ -14992,8 +14992,8 @@ function cleanHtmlElementAfterAnimation(el) {
14992
14992
  delete el["__sv_created_properties"];
14993
14993
  }
14994
14994
  }
14995
- function roundTo2Decimals(number) {
14996
- return Math.round(number * 100) / 100;
14995
+ function floorTo2Decimals(number) {
14996
+ return Math.floor(number * 100) / 100;
14997
14997
  }
14998
14998
 
14999
14999
 
@@ -15036,6 +15036,7 @@ var columnWidthsByType = {
15036
15036
  * ```
15037
15037
  */
15038
15038
  var settings = {
15039
+ version: "",
15039
15040
  /**
15040
15041
  * An object that configures survey appearance when the survey is being designed in Survey Creator.
15041
15042
  *
@@ -19520,7 +19521,7 @@ var question_Question = /** @class */ (function (_super) {
19520
19521
  /**
19521
19522
  * 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).
19522
19523
  * @see SurveyModel.getCorrectAnswerCount
19523
- * @see SurveyModel.getInCorrectAnswerCount
19524
+ * @see SurveyModel.getIncorrectAnswerCount
19524
19525
  */
19525
19526
  get: function () {
19526
19527
  return this.getPropertyValue("correctAnswer");
@@ -19569,7 +19570,14 @@ var question_Question = /** @class */ (function (_super) {
19569
19570
  Question.prototype.checkIfAnswerCorrect = function () {
19570
19571
  var isEqual = helpers_Helpers.isTwoValueEquals(this.value, this.correctAnswer, this.getAnswerCorrectIgnoreOrder(), settings.comparator.caseSensitive, true);
19571
19572
  var correct = isEqual ? 1 : 0;
19572
- var options = { result: isEqual, correctAnswer: correct, correctAnswers: correct, incorrectAnswers: this.quizQuestionCount - correct };
19573
+ var incorrect = this.quizQuestionCount - correct;
19574
+ var options = {
19575
+ result: isEqual,
19576
+ correctAnswers: correct,
19577
+ correctAnswerCount: correct,
19578
+ incorrectAnswers: incorrect,
19579
+ incorrectAnswerCount: incorrect,
19580
+ };
19573
19581
  if (!!this.survey) {
19574
19582
  this.survey.onCorrectQuestionAnswer(this, options);
19575
19583
  }
@@ -25943,6 +25951,9 @@ var question_matrixdropdownrendered_spreadArray = (undefined && undefined.__spre
25943
25951
 
25944
25952
 
25945
25953
 
25954
+ function getId(id, isError, isDetail) {
25955
+ return id + (isError ? "-error" : "") + (isDetail ? "-detail" : "");
25956
+ }
25946
25957
  var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @class */ (function () {
25947
25958
  function QuestionMatrixDropdownRenderedCell() {
25948
25959
  this.minWidth = "";
@@ -25985,7 +25996,11 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedCell = /** @cl
25985
25996
  });
25986
25997
  Object.defineProperty(QuestionMatrixDropdownRenderedCell.prototype, "id", {
25987
25998
  get: function () {
25988
- return this.idValue;
25999
+ var id = this.question ? this.question.id : this.idValue.toString();
26000
+ if (this.isChoice) {
26001
+ id += "-" + (Number.isInteger(this.choiceIndex) ? "index" + this.choiceIndex.toString() : this.item.id);
26002
+ }
26003
+ return getId(id, this.isErrorsCell, this.isDetailRowCell);
25989
26004
  },
25990
26005
  enumerable: false,
25991
26006
  configurable: true
@@ -26167,7 +26182,8 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedRow = /** @cla
26167
26182
  }
26168
26183
  Object.defineProperty(QuestionMatrixDropdownRenderedRow.prototype, "id", {
26169
26184
  get: function () {
26170
- return this.idValue;
26185
+ var _a;
26186
+ return getId(((_a = this.row) === null || _a === void 0 ? void 0 : _a.id) || this.idValue.toString(), this.isErrorsRow, this.isDetailRow);
26171
26187
  },
26172
26188
  enumerable: false,
26173
26189
  configurable: true
@@ -33197,6 +33213,7 @@ var defaultV2Css = {
33197
33213
  itemBody: "sv-list__item-body sd-list__item-body",
33198
33214
  itemSelected: "sv-list__item--selected sd-list__item--selected",
33199
33215
  itemFocused: "sv-list__item--focused sd-list__item--focused",
33216
+ itemHovered: "sv-list__item--hovered sd-list__item--hovered",
33200
33217
  },
33201
33218
  actionBar: {
33202
33219
  root: "sd-action-bar",
@@ -34850,7 +34867,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34850
34867
  _this.isRandomizing = false;
34851
34868
  _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
34852
34869
  if (_this._columnsReady) {
34853
- _this.updateColumnWidth(_this.layoutColumns);
34870
+ _this.updateColumnWidth(_this.gridLayoutColumns);
34854
34871
  _this.updateRootStyle();
34855
34872
  }
34856
34873
  };
@@ -34894,7 +34911,8 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34894
34911
  isAnimationEnabled: function () { return _this.animationAllowed; },
34895
34912
  getAnimatedElement: function (row) { return row.getRootElement(); },
34896
34913
  getLeaveOptions: function (row, info) {
34897
- return { cssClass: _this.cssClasses.rowLeave,
34914
+ return {
34915
+ cssClass: _this.cssClasses.rowLeave,
34898
34916
  onBeforeRunAnimation: prepareElementForVerticalAnimation,
34899
34917
  onAfterRunAnimation: cleanHtmlElementAfterAnimation,
34900
34918
  };
@@ -34947,7 +34965,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
34947
34965
  this.updateDescriptionVisibility(this.description);
34948
34966
  this.markQuestionListDirty();
34949
34967
  this.onRowsChanged();
34950
- this.layoutColumns.forEach(function (col) {
34968
+ this.gridLayoutColumns.forEach(function (col) {
34951
34969
  col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
34952
34970
  });
34953
34971
  };
@@ -35775,7 +35793,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35775
35793
  }
35776
35794
  });
35777
35795
  if (!!remainingColCount) {
35778
- var oneColumnWidth = roundTo2Decimals((100 - remainingSpace) / remainingColCount);
35796
+ var oneColumnWidth = floorTo2Decimals((100 - remainingSpace) / remainingColCount);
35779
35797
  for (var index = 0; index < columns.length; index++) {
35780
35798
  if (!columns[index].width) {
35781
35799
  columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
@@ -35864,12 +35882,12 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35864
35882
  });
35865
35883
  PanelModelBase.prototype.generateColumns = function () {
35866
35884
  var maxRowColSpan = this.calcMaxRowColSpan();
35867
- var columns = [].concat(this.layoutColumns);
35868
- if (maxRowColSpan <= this.layoutColumns.length) {
35869
- columns = this.layoutColumns.slice(0, maxRowColSpan);
35885
+ var columns = [].concat(this.gridLayoutColumns);
35886
+ if (maxRowColSpan <= this.gridLayoutColumns.length) {
35887
+ columns = this.gridLayoutColumns.slice(0, maxRowColSpan);
35870
35888
  }
35871
35889
  else {
35872
- for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
35890
+ for (var index = this.gridLayoutColumns.length; index < maxRowColSpan; index++) {
35873
35891
  var newCol = new panel_layout_column_PanelLayoutColumnModel();
35874
35892
  newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
35875
35893
  columns.push(newCol);
@@ -35883,7 +35901,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35883
35901
  finally {
35884
35902
  this._columnsReady = true;
35885
35903
  }
35886
- this.layoutColumns = columns;
35904
+ this.gridLayoutColumns = columns;
35905
+ };
35906
+ PanelModelBase.prototype.updateGridColumns = function () {
35907
+ this.updateColumns();
35908
+ this.elements.forEach(function (el) {
35909
+ el.isPanel && el.updateGridColumns();
35910
+ });
35887
35911
  };
35888
35912
  PanelModelBase.prototype.getColumsForElement = function (el) {
35889
35913
  var row = this.findRowByElement(el);
@@ -36739,13 +36763,13 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36739
36763
  };
36740
36764
  PanelModelBase.prototype.getSerializableColumnsValue = function () {
36741
36765
  var tailIndex = -1;
36742
- for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
36743
- if (!this.layoutColumns[index].isEmpty()) {
36766
+ for (var index = this.gridLayoutColumns.length - 1; index >= 0; index--) {
36767
+ if (!this.gridLayoutColumns[index].isEmpty()) {
36744
36768
  tailIndex = index;
36745
36769
  break;
36746
36770
  }
36747
36771
  }
36748
- return this.layoutColumns.slice(0, tailIndex + 1);
36772
+ return this.gridLayoutColumns.slice(0, tailIndex + 1);
36749
36773
  };
36750
36774
  PanelModelBase.prototype.afterRender = function (el) {
36751
36775
  this.afterRenderCore(el);
@@ -36769,7 +36793,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36769
36793
  PanelModelBase.panelCounter = 100;
36770
36794
  panel_decorate([
36771
36795
  propertyArray()
36772
- ], PanelModelBase.prototype, "layoutColumns", void 0);
36796
+ ], PanelModelBase.prototype, "gridLayoutColumns", void 0);
36773
36797
  panel_decorate([
36774
36798
  jsonobject_property({ defaultValue: true })
36775
36799
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -36942,13 +36966,18 @@ var panel_PanelModel = /** @class */ (function (_super) {
36942
36966
  * @see visibleIf
36943
36967
  */
36944
36968
  get: function () {
36945
- return this.getPropertyValue("no", "");
36969
+ var _this = this;
36970
+ return this.getPropertyValue("no", undefined, function () { return _this.calcNo(); });
36946
36971
  },
36947
36972
  enumerable: false,
36948
36973
  configurable: true
36949
36974
  });
36950
- PanelModel.prototype.setNo = function (visibleIndex) {
36951
- this.setPropertyValue("no", helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex()));
36975
+ PanelModel.prototype.calcNo = function () {
36976
+ var no = helpers_Helpers.getNumberByIndex(this.visibleIndex, this.getStartIndex());
36977
+ if (this.survey) {
36978
+ no = this.survey.getUpdatedPanelNo(this, no);
36979
+ }
36980
+ return no || "";
36952
36981
  };
36953
36982
  PanelModel.prototype.notifyStateChanged = function (prevState) {
36954
36983
  if (!this.isLoadingFromJson) {
@@ -36975,7 +37004,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
36975
37004
  visibleIndex = index;
36976
37005
  }
36977
37006
  this.setPropertyValue("visibleIndex", visibleIndex);
36978
- this.setNo(visibleIndex);
37007
+ this.resetPropertyValue("no");
36979
37008
  return visibleIndex < 0 ? 0 : 1;
36980
37009
  };
36981
37010
  PanelModel.prototype.getPanelStartIndex = function (index) {
@@ -37263,7 +37292,7 @@ Serializer.addClass("panelbase", [
37263
37292
  choices: ["default", "top", "bottom", "left", "hidden"],
37264
37293
  },
37265
37294
  {
37266
- name: "layoutColumns:panellayoutcolumns",
37295
+ name: "gridLayoutColumns:panellayoutcolumns",
37267
37296
  className: "panellayoutcolumn", isArray: true,
37268
37297
  onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
37269
37298
  visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
@@ -38503,6 +38532,7 @@ var survey_decorate = (undefined && undefined.__decorate) || function (decorator
38503
38532
 
38504
38533
 
38505
38534
 
38535
+
38506
38536
  /**
38507
38537
  * The `SurveyModel` object contains properties and methods that allow you to control the survey and access its elements.
38508
38538
  *
@@ -38794,9 +38824,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38794
38824
  */
38795
38825
  _this.onGetQuestionNumber = _this.addEvent();
38796
38826
  /**
38797
- * This event is obsolete. Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
38827
+ * Obsolete. Use the [`onGetQuestionNumber`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetQuestionNumber) event instead.
38828
+ * @deprecated
38798
38829
  */
38799
38830
  _this.onGetQuestionNo = _this.onGetQuestionNumber;
38831
+ /**
38832
+ * An event that is raised before the survey calculates a panel number. Handle this event to modify panel numbers.
38833
+ *
38834
+ * 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).
38835
+ */
38836
+ _this.onGetPanelNumber = _this.addEvent();
38800
38837
  /**
38801
38838
  * An event that is raised before the survey calculates a page number. Handle this event to modify page numbers.
38802
38839
  *
@@ -38812,7 +38849,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38812
38849
  * @see showProgressBar
38813
38850
  * @see progressBarType
38814
38851
  */
38815
- _this.onProgressText = _this.addEvent();
38852
+ _this.onGetProgressText = _this.addEvent();
38853
+ /**
38854
+ * Obsolete. Use the [`onGetProgressText`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetProgressText) event instead.
38855
+ * @deprecated
38856
+ */
38857
+ _this.onProgressText = _this.onGetProgressText;
38816
38858
  /**
38817
38859
  * An event that is raised to convert Markdown content to HTML.
38818
38860
  *
@@ -39014,7 +39056,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39014
39056
  */
39015
39057
  _this.onMatrixRowAdding = _this.addEvent();
39016
39058
  /**
39017
- * This event is obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
39059
+ * Obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
39060
+ * @deprecated
39018
39061
  */
39019
39062
  _this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
39020
39063
  /**
@@ -39034,7 +39077,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39034
39077
  */
39035
39078
  _this.onMatrixRenderRemoveButton = _this.addEvent();
39036
39079
  /**
39037
- * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
39080
+ * Obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
39081
+ * @deprecated
39038
39082
  */
39039
39083
  _this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
39040
39084
  /**
@@ -39057,7 +39101,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39057
39101
  */
39058
39102
  _this.onAfterRenderMatrixCell = _this.addEvent();
39059
39103
  /**
39060
- * This event is obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
39104
+ * Obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
39105
+ * @deprecated
39061
39106
  */
39062
39107
  _this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
39063
39108
  /**
@@ -39131,7 +39176,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39131
39176
  /**
39132
39177
  * 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).
39133
39178
  */
39134
- _this.onIsAnswerCorrect = _this.addEvent();
39179
+ _this.onCheckAnswerCorrect = _this.addEvent();
39180
+ /**
39181
+ * Obsolete. Use the [`onCheckAnswerCorrect`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onCheckAnswerCorrect) event instead.
39182
+ * @deprecated
39183
+ */
39184
+ _this.onIsAnswerCorrect = _this.onCheckAnswerCorrect;
39135
39185
  /**
39136
39186
  * 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.
39137
39187
  * @see isDesignMode
@@ -39140,7 +39190,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39140
39190
  /**
39141
39191
  * An event this is raised before a survey element (usually page) is scrolled to the top. Use this event to cancel the scroll operation.
39142
39192
  */
39143
- _this.onScrollingElementToTop = _this.addEvent();
39193
+ _this.onScrollToTop = _this.addEvent();
39194
+ /**
39195
+ * Obsolete. Use the [`onScrollToTop`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onScrollToTop) event instead.
39196
+ * @deprecated
39197
+ */
39198
+ _this.onScrollingElementToTop = _this.onScrollToTop;
39144
39199
  _this.onLocaleChangedEvent = _this.addEvent();
39145
39200
  /**
39146
39201
  * An event that allows you to add, delete, or modify actions in a question title.
@@ -39179,9 +39234,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39179
39234
  * @see [IAction](https://surveyjs.io/form-library/documentation/api-reference/iaction)
39180
39235
  */
39181
39236
  _this.onGetMatrixRowActions = _this.addEvent();
39182
- /**
39183
- * An event that is raised after a survey element is [expanded or collapsed](https://surveyjs.io/form-library/documentation/api-reference/question#state).
39184
- */
39185
39237
  _this.onElementContentVisibilityChanged = _this.addEvent();
39186
39238
  /**
39187
39239
  * 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.
@@ -39355,7 +39407,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39355
39407
  _this.onGetQuestionNumber.onCallbacksChanged = function () {
39356
39408
  _this.resetVisibleIndexes();
39357
39409
  };
39358
- _this.onProgressText.onCallbacksChanged = function () {
39410
+ _this.onGetPanelNumber.onCallbacksChanged = function () {
39411
+ _this.resetVisibleIndexes();
39412
+ };
39413
+ _this.onGetProgressText.onCallbacksChanged = function () {
39359
39414
  _this.updateProgressText();
39360
39415
  };
39361
39416
  _this.onTextMarkdown.onCallbacksChanged = function () {
@@ -39498,6 +39553,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39498
39553
  enumerable: false,
39499
39554
  configurable: true
39500
39555
  });
39556
+ Object.defineProperty(SurveyModel.prototype, "sjsVersion", {
39557
+ get: function () {
39558
+ return this.getPropertyValue("sjsVersion");
39559
+ },
39560
+ set: function (val) {
39561
+ this.setPropertyValue("sjsVersion", val);
39562
+ },
39563
+ enumerable: false,
39564
+ configurable: true
39565
+ });
39501
39566
  SurveyModel.prototype.processClosedPopup = function (question, popupModel) {
39502
39567
  throw new Error("Method not implemented.");
39503
39568
  };
@@ -41425,6 +41490,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
41425
41490
  this.onGetQuestionNumber.fire(this, options);
41426
41491
  return options.no === no ? options.number : options.no;
41427
41492
  };
41493
+ SurveyModel.prototype.getUpdatedPanelNo = function (panel, no) {
41494
+ if (this.onGetPanelNumber.isEmpty)
41495
+ return no;
41496
+ var options = { panel: panel, number: no };
41497
+ this.onGetPanelNumber.fire(this, options);
41498
+ return options.number;
41499
+ };
41428
41500
  SurveyModel.prototype.getUpdatedPageNo = function (page, no) {
41429
41501
  if (this.onGetPageNumber.isEmpty)
41430
41502
  return no;
@@ -42215,7 +42287,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42215
42287
  this.currentPageNo = index;
42216
42288
  return true;
42217
42289
  }
42218
- for (var i = this.currentPageNo; i < index; i++) {
42290
+ if (!this.validateCurrentPage())
42291
+ return false;
42292
+ for (var i = this.currentPageNo + 1; i < index; i++) {
42219
42293
  var page_1 = this.visiblePages[i];
42220
42294
  if (!page_1.validate(true, true))
42221
42295
  return false;
@@ -42647,7 +42721,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42647
42721
  get: function () {
42648
42722
  if (this.isDesignMode)
42649
42723
  return "none";
42650
- var page = this.currentPage;
42724
+ var page = this.activePage;
42651
42725
  if (!page)
42652
42726
  return "none";
42653
42727
  if (page.navigationButtonsVisibility === "show") {
@@ -42812,7 +42886,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42812
42886
  };
42813
42887
  Object.defineProperty(SurveyModel.prototype, "ignoreValidation", {
42814
42888
  /**
42815
- * This property is obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
42889
+ * Obsolete. Use the [`validationEnabled`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#validationEnabled) property instead.
42890
+ * @deprecated
42816
42891
  */
42817
42892
  get: function () { return !this.validationEnabled; },
42818
42893
  set: function (val) { this.validationEnabled = !val; },
@@ -43110,7 +43185,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43110
43185
  }
43111
43186
  if (!page)
43112
43187
  return true;
43113
- var res = !page.validate(true, isFocuseOnFirstError);
43188
+ var res = false;
43189
+ if (this.currentSingleQuestion) {
43190
+ res = !this.currentSingleQuestion.validate(true);
43191
+ }
43192
+ else {
43193
+ res = !page.validate(true, isFocuseOnFirstError);
43194
+ }
43114
43195
  this.fireValidatedErrorsOnPage(page);
43115
43196
  return res;
43116
43197
  };
@@ -43167,7 +43248,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43167
43248
  * @see isCurrentPageValid
43168
43249
  * @see nextPage
43169
43250
  */
43170
- SurveyModel.prototype.completeLastPage = function () {
43251
+ SurveyModel.prototype.tryComplete = function () {
43171
43252
  if (this.isValidateOnComplete) {
43172
43253
  this.cancelPreview();
43173
43254
  }
@@ -43177,6 +43258,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43177
43258
  }
43178
43259
  return res;
43179
43260
  };
43261
+ /**
43262
+ * Obsolete. Use the [`tryComplete`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#tryComplete) method instead.
43263
+ * @deprecated
43264
+ */
43265
+ SurveyModel.prototype.completeLastPage = function () {
43266
+ return this.tryComplete();
43267
+ };
43180
43268
  SurveyModel.prototype.navigationMouseDown = function () {
43181
43269
  this.isNavigationButtonPressed = true;
43182
43270
  return true;
@@ -43443,7 +43531,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43443
43531
  configurable: true
43444
43532
  });
43445
43533
  SurveyModel.prototype.onQuestionsOnPageModeChanged = function (oldValue) {
43446
- if (this.isShowingPreview)
43534
+ if (this.isShowingPreview || this.isDesignMode)
43447
43535
  return;
43448
43536
  this.currentSingleQuestion = undefined;
43449
43537
  if (oldValue === "singlePage") {
@@ -43948,7 +44036,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43948
44036
  };
43949
44037
  Object.defineProperty(SurveyModel.prototype, "progressText", {
43950
44038
  /**
43951
- * 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.
44039
+ * 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.
43952
44040
  * @see progressValue
43953
44041
  * @see showProgressBar
43954
44042
  * @see progressBarType
@@ -43970,7 +44058,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43970
44058
  return;
43971
44059
  if (onValueChanged &&
43972
44060
  this.progressBarType == "pages" &&
43973
- this.onProgressText.isEmpty)
44061
+ this.onGetProgressText.isEmpty)
43974
44062
  return;
43975
44063
  this.isCalculatingProgressText = true;
43976
44064
  this.setPropertyValue("progressText", this.getProgressText());
@@ -43991,7 +44079,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43991
44079
  if (type === "questions" ||
43992
44080
  type === "requiredquestions" ||
43993
44081
  type === "correctquestions" ||
43994
- !this.onProgressText.isEmpty) {
44082
+ !this.onGetProgressText.isEmpty) {
43995
44083
  var info = this.getProgressInfo();
43996
44084
  options.questionCount = info.questionCount;
43997
44085
  options.answeredQuestionCount = info.answeredQuestionCount;
@@ -44000,7 +44088,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44000
44088
  info.requiredAnsweredQuestionCount;
44001
44089
  }
44002
44090
  options.text = this.getProgressTextCore(options);
44003
- this.onProgressText.fire(this, options);
44091
+ this.onGetProgressText.fire(this, options);
44004
44092
  return options.text;
44005
44093
  };
44006
44094
  SurveyModel.prototype.getProgressTextCore = function (info) {
@@ -44385,29 +44473,39 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44385
44473
  return this.getUpdatedPanelTitleActions(element, titleActions);
44386
44474
  return this.getUpdatedQuestionTitleActions(element, titleActions);
44387
44475
  };
44476
+ SurveyModel.prototype.getTitleActionsResult = function (titleActions, options) {
44477
+ if (titleActions != options.actions)
44478
+ return options.actions;
44479
+ if (titleActions != options.titleActions)
44480
+ return options.titleActions;
44481
+ return titleActions;
44482
+ };
44388
44483
  SurveyModel.prototype.getUpdatedQuestionTitleActions = function (question, titleActions) {
44389
44484
  var options = {
44390
44485
  question: question,
44486
+ actions: titleActions,
44391
44487
  titleActions: titleActions,
44392
44488
  };
44393
44489
  this.onGetQuestionTitleActions.fire(this, options);
44394
- return options.titleActions;
44490
+ return this.getTitleActionsResult(titleActions, options);
44395
44491
  };
44396
44492
  SurveyModel.prototype.getUpdatedPanelTitleActions = function (panel, titleActions) {
44397
44493
  var options = {
44398
44494
  panel: panel,
44495
+ actions: titleActions,
44399
44496
  titleActions: titleActions,
44400
44497
  };
44401
44498
  this.onGetPanelTitleActions.fire(this, options);
44402
- return options.titleActions;
44499
+ return this.getTitleActionsResult(titleActions, options);
44403
44500
  };
44404
44501
  SurveyModel.prototype.getUpdatedPageTitleActions = function (page, titleActions) {
44405
44502
  var options = {
44406
44503
  page: page,
44504
+ actions: titleActions,
44407
44505
  titleActions: titleActions,
44408
44506
  };
44409
44507
  this.onGetPageTitleActions.fire(this, options);
44410
- return options.titleActions;
44508
+ return this.getTitleActionsResult(titleActions, options);
44411
44509
  };
44412
44510
  SurveyModel.prototype.getUpdatedMatrixRowActions = function (question, row, actions) {
44413
44511
  var options = {
@@ -44426,9 +44524,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44426
44524
  page: page,
44427
44525
  elementId: id,
44428
44526
  cancel: false,
44527
+ allow: true,
44429
44528
  };
44430
- this.onScrollingElementToTop.fire(this, options);
44431
- if (!options.cancel) {
44529
+ this.onScrollToTop.fire(this, options);
44530
+ if (!options.cancel && options.allow) {
44432
44531
  var elementPage_1 = this.getPageByElement(element);
44433
44532
  if (this.isLazyRendering && !!elementPage_1) {
44434
44533
  var elementsToRenderBefore = 1;
@@ -44715,13 +44814,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44715
44814
  }
44716
44815
  return null;
44717
44816
  };
44718
- /**
44719
- * Returns an array of questions with specified [names](https://surveyjs.io/form-library/documentation/api-reference/question#name).
44720
- * @param names An array of question names.
44721
- * @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).
44722
- * @returns An array of questions with specified names
44723
- * @see getAllQuestions
44724
- */
44725
44817
  SurveyModel.prototype.getQuestionsByNames = function (names, caseInsensitive) {
44726
44818
  if (caseInsensitive === void 0) { caseInsensitive = false; }
44727
44819
  var result = [];
@@ -44766,10 +44858,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44766
44858
  }
44767
44859
  return null;
44768
44860
  };
44769
- /**
44770
- * Returns an array of pages with specified names.
44771
- * @param names An array of page names.
44772
- */
44773
44861
  SurveyModel.prototype.getPagesByNames = function (names) {
44774
44862
  var result = [];
44775
44863
  if (!names)
@@ -45357,6 +45445,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45357
45445
  return;
45358
45446
  this.questionHashesClear();
45359
45447
  this.jsonErrors = null;
45448
+ this.sjsVersion = undefined;
45360
45449
  var jsonConverter = new jsonobject_JsonObject();
45361
45450
  jsonConverter.toObject(json, this, options);
45362
45451
  if (jsonConverter.errors.length > 0) {
@@ -45364,6 +45453,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45364
45453
  }
45365
45454
  this.onStateAndCurrentPageChanged();
45366
45455
  this.updateState();
45456
+ if (!!this.sjsVersion && !!settings.version) {
45457
+ if (helpers_Helpers.compareVerions(this.sjsVersion, settings.version) > 0) {
45458
+ ConsoleWarnings.warn("The version of the survey JSON schema (v"
45459
+ + this.sjsVersion + ") is newer than your current Form Library version ("
45460
+ + settings.version + "). Please update the Form Library to make sure that all survey features work as expected.");
45461
+ }
45462
+ }
45367
45463
  };
45368
45464
  SurveyModel.prototype.startLoadingFromJson = function (json) {
45369
45465
  _super.prototype.startLoadingFromJson.call(this, json);
@@ -45463,7 +45559,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45463
45559
  mouseDown: function () { return _this.navigationMouseDown(); },
45464
45560
  },
45465
45561
  locTitle: this.locCompleteText,
45466
- action: function () { return _this.taskManager.waitAndExecute(function () { return _this.completeLastPage(); }); },
45562
+ action: function () { return _this.taskManager.waitAndExecute(function () { return _this.tryComplete(); }); },
45467
45563
  component: defaultComponent
45468
45564
  });
45469
45565
  this.updateNavigationItemCssCallback = function () {
@@ -45834,7 +45930,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45834
45930
  _this.showPreview();
45835
45931
  }
45836
45932
  else {
45837
- _this.completeLastPage();
45933
+ _this.tryComplete();
45838
45934
  }
45839
45935
  }
45840
45936
  };
@@ -46152,7 +46248,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46152
46248
  * For more information about quizzes, refer to the following tutorial: [Create a Quiz](https://surveyjs.io/form-library/documentation/design-survey/create-a-quiz).
46153
46249
  * @returns The number of correct answers in a quiz.
46154
46250
  * @see getQuizQuestionCount
46155
- * @see getInCorrectAnswerCount
46251
+ * @see getIncorrectAnswerCount
46156
46252
  */
46157
46253
  SurveyModel.prototype.getCorrectAnswerCount = function () {
46158
46254
  return this.getCorrectedAnswerCountCore(true);
@@ -46175,7 +46271,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46175
46271
  return res;
46176
46272
  };
46177
46273
  SurveyModel.prototype.getInCorrectedAnswerCount = function () {
46178
- return this.getInCorrectAnswerCount();
46274
+ return this.getIncorrectAnswerCount();
46275
+ };
46276
+ SurveyModel.prototype.getInCorrectAnswerCount = function () {
46277
+ return this.getIncorrectAnswerCount();
46179
46278
  };
46180
46279
  /**
46181
46280
  * Returns the number of incorrect answers in a quiz.
@@ -46184,7 +46283,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46184
46283
  * @returns The number of incorrect answers in a quiz.
46185
46284
  * @see getCorrectAnswerCount
46186
46285
  */
46187
- SurveyModel.prototype.getInCorrectAnswerCount = function () {
46286
+ SurveyModel.prototype.getIncorrectAnswerCount = function () {
46188
46287
  return this.getCorrectedAnswerCountCore(false);
46189
46288
  };
46190
46289
  SurveyModel.prototype.onCorrectQuestionAnswer = function (question, options) {
@@ -46331,6 +46430,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46331
46430
  enumerable: false,
46332
46431
  configurable: true
46333
46432
  });
46433
+ SurveyModel.prototype.updateGridColumns = function () {
46434
+ this.pages.forEach(function (page) { return page.updateGridColumns(); });
46435
+ };
46334
46436
  Object.defineProperty(SurveyModel.prototype, "widthMode", {
46335
46437
  /**
46336
46438
  * Specifies how to calculate the survey width.
@@ -46676,13 +46778,13 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46676
46778
  this.onTimerTick.fire(this, {});
46677
46779
  if (this.timeLimit > 0 && this.timeLimit <= this.timeSpent) {
46678
46780
  this.timeSpent = this.timeLimit;
46679
- this.completeLastPage();
46781
+ this.tryComplete();
46680
46782
  }
46681
46783
  if (page) {
46682
46784
  var pageLimit = page.getMaxTimeToFinish();
46683
46785
  if (pageLimit > 0 && pageLimit == page.timeSpent) {
46684
46786
  if (this.isLastPage) {
46685
- this.completeLastPage();
46787
+ this.tryComplete();
46686
46788
  }
46687
46789
  else {
46688
46790
  this.nextPage();
@@ -46804,6 +46906,9 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46804
46906
  var isNeedWaitForPageRendered = this.activePage !== question.page && !question.page.isStartPage;
46805
46907
  if (isNeedWaitForPageRendered) {
46806
46908
  this.currentPage = question.page;
46909
+ if (this.isSingleVisibleQuestion && !this.isDesignMode) {
46910
+ this.currentSingleQuestion = question;
46911
+ }
46807
46912
  }
46808
46913
  if (!isNeedWaitForPageRendered) {
46809
46914
  this.focusQuestionInfo();
@@ -47240,7 +47345,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
47240
47345
  jsonobject_property()
47241
47346
  ], SurveyModel.prototype, "rootCss", void 0);
47242
47347
  survey_decorate([
47243
- jsonobject_property()
47348
+ jsonobject_property({
47349
+ onSet: function (newValue, target) {
47350
+ target.updateGridColumns();
47351
+ }
47352
+ })
47244
47353
  ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
47245
47354
  survey_decorate([
47246
47355
  jsonobject_property()
@@ -47338,6 +47447,7 @@ Serializer.addClass("survey", [
47338
47447
  name: "calculatedValues:calculatedvalues",
47339
47448
  className: "calculatedvalue", isArray: true
47340
47449
  },
47450
+ { name: "sjsVersion", visible: false },
47341
47451
  { name: "surveyId", visible: false },
47342
47452
  { name: "surveyPostId", visible: false },
47343
47453
  { name: "surveyShowDataSaving:boolean", visible: false },
@@ -62929,10 +63039,17 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
62929
63039
  enumerable: false,
62930
63040
  configurable: true
62931
63041
  });
63042
+ Object.defineProperty(QuestionImagePickerModel.prototype, "imageScale", {
63043
+ get: function () {
63044
+ return this.survey ? this.survey["widthScale"] / 100 : 1;
63045
+ },
63046
+ enumerable: false,
63047
+ configurable: true
63048
+ });
62932
63049
  Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageHeight", {
62933
63050
  get: function () {
62934
- var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight;
62935
- return (height ? height : 150);
63051
+ var height = this.isResponsive ? Math.floor(this.responsiveImageHeight) : this.imageHeight * this.imageScale;
63052
+ return (height ? height : 150 * this.imageScale);
62936
63053
  },
62937
63054
  enumerable: false,
62938
63055
  configurable: true
@@ -62959,8 +63076,8 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
62959
63076
  });
62960
63077
  Object.defineProperty(QuestionImagePickerModel.prototype, "renderedImageWidth", {
62961
63078
  get: function () {
62962
- var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth;
62963
- return (width ? width : 200);
63079
+ var width = this.isResponsive ? Math.floor(this.responsiveImageWidth) : this.imageWidth * this.imageScale;
63080
+ return (width ? width : 200 * this.imageScale);
62964
63081
  },
62965
63082
  enumerable: false,
62966
63083
  configurable: true
@@ -63068,11 +63185,11 @@ var question_imagepicker_QuestionImagePickerModel = /** @class */ (function (_su
63068
63185
  };
63069
63186
  if (this.isResponsive) {
63070
63187
  var itemsCount = this.choices.length + (this.isDesignMode ? 1 : 0);
63071
- var gap = this.gapBetweenItems || 0;
63072
- var minWidth = this.minImageWidth;
63073
- var maxWidth = this.maxImageWidth;
63074
- var maxHeight = this.maxImageHeight;
63075
- var minHeight = this.minImageHeight;
63188
+ var gap = (this.gapBetweenItems || 0) * this.imageScale;
63189
+ var minWidth = this.minImageWidth * this.imageScale;
63190
+ var maxWidth = this.maxImageWidth * this.imageScale;
63191
+ var maxHeight = this.maxImageHeight * this.imageScale;
63192
+ var minHeight = this.minImageHeight * this.imageScale;
63076
63193
  var colCount = this.colCount;
63077
63194
  var width_1;
63078
63195
  if (colCount === 0) {
@@ -70685,10 +70802,12 @@ Serializer.addClass("currencymask", [
70685
70802
  // import "../../src/main.scss";
70686
70803
  //import "../../src/modern.scss";
70687
70804
 
70805
+
70688
70806
  var Version;
70689
70807
  var ReleaseDate;
70690
- Version = "" + "1.12.16";
70691
- ReleaseDate = "" + "2024-12-24";
70808
+ Version = "" + "1.12.18";
70809
+ settings.version = Version;
70810
+ ReleaseDate = "" + "2025-01-10";
70692
70811
  function checkLibraryVersion(ver, libraryName) {
70693
70812
  if (Version != ver) {
70694
70813
  var str = "survey-core has version '" + Version + "' and " + libraryName