survey-core 1.12.19 → 1.12.21

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 (226) 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/burmese.js +1 -1
  12. package/i18n/burmese.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/philippines.js +1 -1
  72. package/i18n/philippines.min.js +1 -1
  73. package/i18n/polish.js +1 -1
  74. package/i18n/polish.min.js +1 -1
  75. package/i18n/portuguese-br.js +1 -1
  76. package/i18n/portuguese-br.min.js +1 -1
  77. package/i18n/portuguese.js +1 -1
  78. package/i18n/portuguese.min.js +1 -1
  79. package/i18n/romanian.js +1 -1
  80. package/i18n/romanian.min.js +1 -1
  81. package/i18n/russian.js +1 -1
  82. package/i18n/russian.min.js +1 -1
  83. package/i18n/serbian.js +1 -1
  84. package/i18n/serbian.min.js +1 -1
  85. package/i18n/simplified-chinese.js +1 -1
  86. package/i18n/simplified-chinese.min.js +1 -1
  87. package/i18n/slovak.js +1 -1
  88. package/i18n/slovak.min.js +1 -1
  89. package/i18n/spanish.js +1 -1
  90. package/i18n/spanish.min.js +1 -1
  91. package/i18n/swahili.js +1 -1
  92. package/i18n/swahili.min.js +1 -1
  93. package/i18n/swedish.js +1 -1
  94. package/i18n/swedish.min.js +1 -1
  95. package/i18n/tajik.js +1 -1
  96. package/i18n/tajik.min.js +1 -1
  97. package/i18n/telugu.js +1 -1
  98. package/i18n/telugu.min.js +1 -1
  99. package/i18n/thai.js +1 -1
  100. package/i18n/thai.min.js +1 -1
  101. package/i18n/traditional-chinese.js +1 -1
  102. package/i18n/traditional-chinese.min.js +1 -1
  103. package/i18n/turkish.js +1 -1
  104. package/i18n/turkish.min.js +1 -1
  105. package/i18n/ukrainian.js +1 -1
  106. package/i18n/ukrainian.min.js +1 -1
  107. package/i18n/urdu.js +1 -1
  108. package/i18n/urdu.min.js +1 -1
  109. package/i18n/vietnamese.js +1 -1
  110. package/i18n/vietnamese.min.js +1 -1
  111. package/i18n/welsh.js +1 -1
  112. package/i18n/welsh.min.js +1 -1
  113. package/icons/iconsV1.js +1 -1
  114. package/icons/iconsV1.min.js +1 -1
  115. package/icons/iconsV2.js +1 -1
  116. package/icons/iconsV2.min.js +1 -1
  117. package/modern.css +1 -1
  118. package/modern.fontless.css +1 -1
  119. package/modern.fontless.min.css +1 -1
  120. package/modern.min.css +1 -1
  121. package/package.json +1 -1
  122. package/plugins/bootstrap-integration/index.js +1 -1
  123. package/plugins/bootstrap-integration/index.min.js +1 -1
  124. package/plugins/bootstrap-material-integration/index.js +1 -1
  125. package/plugins/bootstrap-material-integration/index.min.js +1 -1
  126. package/survey.core.js +163 -71
  127. package/survey.core.js.map +1 -1
  128. package/survey.core.min.js +3 -3
  129. package/survey.css +1 -1
  130. package/survey.i18n.js +1 -1
  131. package/survey.i18n.min.js +1 -1
  132. package/survey.min.css +1 -1
  133. package/themes/borderless-dark-panelless.js +1 -1
  134. package/themes/borderless-dark-panelless.min.js +1 -1
  135. package/themes/borderless-dark.js +1 -1
  136. package/themes/borderless-dark.min.js +1 -1
  137. package/themes/borderless-light-panelless..js +1 -1
  138. package/themes/borderless-light-panelless..min.js +1 -1
  139. package/themes/borderless-light.js +1 -1
  140. package/themes/borderless-light.min.js +1 -1
  141. package/themes/contrast-dark-panelless.js +1 -1
  142. package/themes/contrast-dark-panelless.min.js +1 -1
  143. package/themes/contrast-dark.js +1 -1
  144. package/themes/contrast-dark.min.js +1 -1
  145. package/themes/contrast-light-panelless.js +1 -1
  146. package/themes/contrast-light-panelless.min.js +1 -1
  147. package/themes/contrast-light.js +1 -1
  148. package/themes/contrast-light.min.js +1 -1
  149. package/themes/default-dark-panelless.js +1 -1
  150. package/themes/default-dark-panelless.min.js +1 -1
  151. package/themes/default-dark.js +1 -1
  152. package/themes/default-dark.min.js +1 -1
  153. package/themes/default-light-panelless.js +1 -1
  154. package/themes/default-light-panelless.min.js +1 -1
  155. package/themes/default-light.js +1 -1
  156. package/themes/default-light.min.js +1 -1
  157. package/themes/doubleborder-dark-panelless.js +1 -1
  158. package/themes/doubleborder-dark-panelless.min.js +1 -1
  159. package/themes/doubleborder-dark.js +1 -1
  160. package/themes/doubleborder-dark.min.js +1 -1
  161. package/themes/doubleborder-light-panelles.js +1 -1
  162. package/themes/doubleborder-light-panelles.min.js +1 -1
  163. package/themes/doubleborder-light.js +1 -1
  164. package/themes/doubleborder-light.min.js +1 -1
  165. package/themes/flat-dark-panelless.js +1 -1
  166. package/themes/flat-dark-panelless.min.js +1 -1
  167. package/themes/flat-dark.js +1 -1
  168. package/themes/flat-dark.min.js +1 -1
  169. package/themes/flat-light-panelless.js +1 -1
  170. package/themes/flat-light-panelless.min.js +1 -1
  171. package/themes/flat-light.js +1 -1
  172. package/themes/flat-light.min.js +1 -1
  173. package/themes/index.js +1 -1
  174. package/themes/index.min.js +1 -1
  175. package/themes/layered-dark-panelless.js +1 -1
  176. package/themes/layered-dark-panelless.min.js +1 -1
  177. package/themes/layered-dark.js +1 -1
  178. package/themes/layered-dark.min.js +1 -1
  179. package/themes/layered-light-panelless.js +1 -1
  180. package/themes/layered-light-panelless.min.js +1 -1
  181. package/themes/layered-light.js +1 -1
  182. package/themes/layered-light.min.js +1 -1
  183. package/themes/plain-dark-panelless.js +1 -1
  184. package/themes/plain-dark-panelless.min.js +1 -1
  185. package/themes/plain-dark.js +1 -1
  186. package/themes/plain-dark.min.js +1 -1
  187. package/themes/plain-light-panelless.js +1 -1
  188. package/themes/plain-light-panelless.min.js +1 -1
  189. package/themes/plain-light.js +1 -1
  190. package/themes/plain-light.min.js +1 -1
  191. package/themes/sharp-dark-panelless.js +1 -1
  192. package/themes/sharp-dark-panelless.min.js +1 -1
  193. package/themes/sharp-dark.js +1 -1
  194. package/themes/sharp-dark.min.js +1 -1
  195. package/themes/sharp-light-panelless.js +1 -1
  196. package/themes/sharp-light-panelless.min.js +1 -1
  197. package/themes/sharp-light.js +1 -1
  198. package/themes/sharp-light.min.js +1 -1
  199. package/themes/solid-dark-panelless.js +1 -1
  200. package/themes/solid-dark-panelless.min.js +1 -1
  201. package/themes/solid-dark.js +1 -1
  202. package/themes/solid-dark.min.js +1 -1
  203. package/themes/solid-light-panelless.js +1 -1
  204. package/themes/solid-light-panelless.min.js +1 -1
  205. package/themes/solid-light.js +1 -1
  206. package/themes/solid-light.min.js +1 -1
  207. package/themes/three-dimensional-dark-panelless.js +1 -1
  208. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  209. package/themes/three-dimensional-dark.js +1 -1
  210. package/themes/three-dimensional-dark.min.js +1 -1
  211. package/themes/three-dimensional-light-panelless.js +1 -1
  212. package/themes/three-dimensional-light-panelless.min.js +1 -1
  213. package/themes/three-dimensional-light.js +1 -1
  214. package/themes/three-dimensional-light.min.js +1 -1
  215. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -1
  216. package/ts3.4/typings/packages/survey-core/src/question.d.ts +1 -0
  217. package/ts3.4/typings/packages/survey-core/src/question_rating.d.ts +11 -4
  218. package/ts3.4/typings/packages/survey-core/src/question_text.d.ts +1 -0
  219. package/ts3.4/typings/packages/survey-core/src/survey-events-api.d.ts +9 -1
  220. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +9 -2
  221. package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -1
  222. package/typings/packages/survey-core/src/question.d.ts +1 -0
  223. package/typings/packages/survey-core/src/question_rating.d.ts +11 -4
  224. package/typings/packages/survey-core/src/question_text.d.ts +1 -0
  225. package/typings/packages/survey-core/src/survey-events-api.d.ts +9 -1
  226. package/typings/packages/survey-core/src/survey.d.ts +9 -2
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.19
2
+ * surveyjs - Survey JavaScript library v1.12.21
3
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
  */
@@ -8694,8 +8694,15 @@ var base_Base = /** @class */ (function () {
8694
8694
  if (!!calcFunc) {
8695
8695
  var newVal = calcFunc();
8696
8696
  if (newVal !== undefined) {
8697
- this.setPropertyValueDirectly(name, newVal);
8698
- return newVal;
8697
+ if (Array.isArray(newVal)) {
8698
+ var array = this.createNewArray(name);
8699
+ array.splice.apply(array, base_spreadArray([0, 0], newVal));
8700
+ return array;
8701
+ }
8702
+ else {
8703
+ this.setPropertyValueDirectly(name, newVal);
8704
+ return newVal;
8705
+ }
8699
8706
  }
8700
8707
  }
8701
8708
  var propDefaultValue = this.getDefaultPropertyValue(name);
@@ -17808,7 +17815,7 @@ var question_Question = /** @class */ (function (_super) {
17808
17815
  this.ensureSetValueExpressionRunner();
17809
17816
  if (!this.setValueExpressionRunner)
17810
17817
  return false;
17811
- return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, this.setValueExpressionRunner.getVariables());
17818
+ return this.canExecuteTriggerByKeys(keys, this.setValueExpressionRunner);
17812
17819
  };
17813
17820
  Question.prototype.addTriggerInfo = function (name, canRun, doComplete) {
17814
17821
  var info = new TriggerExpressionInfo(name, canRun, doComplete);
@@ -17835,11 +17842,17 @@ var question_Question = /** @class */ (function (_super) {
17835
17842
  else {
17836
17843
  info.runner.expression = expression;
17837
17844
  }
17838
- if (!new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, info.runner.getVariables()) && !info.runSecondCheck(keys))
17845
+ if (!this.canExecuteTriggerByKeys(keys, info.runner) && !info.runSecondCheck(keys))
17839
17846
  return;
17840
17847
  info.isRunning = true;
17841
17848
  info.runner.run(this.getDataFilteredValues(), this.getDataFilteredProperties());
17842
17849
  };
17850
+ Question.prototype.canExecuteTriggerByKeys = function (keys, runner) {
17851
+ var vars = runner.getVariables();
17852
+ if ((!vars || vars.length === 0) && runner.hasFunction())
17853
+ return true;
17854
+ return new conditionProcessValue_ProcessValue().isAnyKeyChanged(keys, vars);
17855
+ };
17843
17856
  Question.prototype.runTriggers = function (name, value, keys) {
17844
17857
  var _this = this;
17845
17858
  if (this.isSettingQuestionValue || (this.parentQuestion && this.parentQuestion.getValueName() === name))
@@ -26321,6 +26334,9 @@ var question_matrixdropdownrendered_QuestionMatrixDropdownRenderedTable = /** @c
26321
26334
  },
26322
26335
  getEnterOptions: function (_, info) {
26323
26336
  return { cssClass: _this.cssClasses.rowEnter, onBeforeRunAnimation: onBeforeRunAnimation, onAfterRunAnimation: onAfterRunAnimation };
26337
+ },
26338
+ getKey: function (item) {
26339
+ return item.id;
26324
26340
  }
26325
26341
  };
26326
26342
  };
@@ -38361,11 +38377,6 @@ function createTOCListModel(survey, onAction) {
38361
38377
  var items = getTOCItems(survey, onAction);
38362
38378
  var listOptions = {
38363
38379
  items: items,
38364
- onSelectionChanged: function (item) {
38365
- if (!!item.action()) {
38366
- listModel.selectedItem = item;
38367
- }
38368
- },
38369
38380
  searchEnabled: false,
38370
38381
  locOwner: survey,
38371
38382
  };
@@ -38398,7 +38409,6 @@ function getTOCItems(survey, onAction) {
38398
38409
  if (page.isPage) {
38399
38410
  return survey.tryNavigateToPage(page);
38400
38411
  }
38401
- return tryFocusPage(survey, page);
38402
38412
  },
38403
38413
  visible: new ComputedUpdater(function () {
38404
38414
  return page.isVisible && !(page["isStartPage"]);
@@ -38633,7 +38643,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
38633
38643
  *
38634
38644
  * For information on event handler parameters, refer to descriptions within the interface.
38635
38645
  *
38636
- * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelItemValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelItemValueChanged) event.
38646
+ * To handle value changes in matrix cells or panels within a [Dynamic Panel](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model), use the [`onMatrixCellValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixCellValueChanged) or [`onDynamicPanelValueChanged`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onDynamicPanelValueChanged) event.
38637
38647
  * @see setValue
38638
38648
  */
38639
38649
  _this.onValueChanged = _this.addEvent();
@@ -39163,7 +39173,12 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39163
39173
  /**
39164
39174
  * An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
39165
39175
  */
39166
- _this.onDynamicPanelItemValueChanged = _this.addEvent();
39176
+ _this.onDynamicPanelValueChanged = _this.addEvent();
39177
+ _this.onDynamicPanelItemValueChanged = _this.onDynamicPanelValueChanged;
39178
+ /**
39179
+ * An event that is raised after an item value is changing in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
39180
+ */
39181
+ _this.onDynamicPanelValueChanging = _this.addEvent();
39167
39182
  /**
39168
39183
  * An event that is raised before a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) renders [tab titles](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle). Use this event to change individual tab titles.
39169
39184
  *
@@ -42278,7 +42293,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42278
42293
  enumerable: false,
42279
42294
  configurable: true
42280
42295
  });
42281
- SurveyModel.prototype.tryNavigateToPage = function (page) {
42296
+ SurveyModel.prototype.tryNavigateToPage = function (page /*, serverValidationRes?: (res: boolean)=> void*/) {
42297
+ if (!this.performValidationOnPageChanging(page))
42298
+ return false;
42299
+ var index = this.visiblePages.indexOf(page);
42300
+ var res = index < this.currentPageNo || !this.doServerValidation(false, false, page);
42301
+ if (res) {
42302
+ this.currentPage = page;
42303
+ }
42304
+ return res;
42305
+ };
42306
+ SurveyModel.prototype.performValidationOnPageChanging = function (page) {
42282
42307
  if (this.isDesignMode)
42283
42308
  return false;
42284
42309
  var index = this.visiblePages.indexOf(page);
@@ -42286,10 +42311,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42286
42311
  return false;
42287
42312
  if (index === this.currentPageNo)
42288
42313
  return false;
42289
- if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages) {
42290
- this.currentPageNo = index;
42314
+ if (index < this.currentPageNo || this.checkErrorsMode === "onComplete" || this.validationAllowSwitchPages)
42291
42315
  return true;
42292
- }
42293
42316
  if (!this.validateCurrentPage())
42294
42317
  return false;
42295
42318
  for (var i = this.currentPageNo + 1; i < index; i++) {
@@ -42298,7 +42321,6 @@ var survey_SurveyModel = /** @class */ (function (_super) {
42298
42321
  return false;
42299
42322
  page_1.passed = true;
42300
42323
  }
42301
- this.currentPage = page;
42302
42324
  return true;
42303
42325
  };
42304
42326
  SurveyModel.prototype.updateCurrentPage = function () {
@@ -43841,14 +43863,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43841
43863
  this.setPropertyValue("isValidatingOnServer", val);
43842
43864
  this.onIsValidatingOnServerChanged();
43843
43865
  };
43844
- SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview) {
43866
+ SurveyModel.prototype.createServerValidationOptions = function (doComplete, isPreview, page) {
43845
43867
  var self = this;
43846
43868
  var options = {
43847
43869
  data: {},
43848
43870
  errors: {},
43849
43871
  survey: this,
43850
43872
  complete: function () {
43851
- self.completeServerValidation(options, isPreview);
43873
+ self.completeServerValidation(options, isPreview, page);
43852
43874
  },
43853
43875
  };
43854
43876
  if (doComplete && this.isValidateOnComplete) {
@@ -43868,7 +43890,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43868
43890
  return options;
43869
43891
  };
43870
43892
  SurveyModel.prototype.onIsValidatingOnServerChanged = function () { };
43871
- SurveyModel.prototype.doServerValidation = function (doComplete, isPreview) {
43893
+ SurveyModel.prototype.doServerValidation = function (doComplete, isPreview, page) {
43872
43894
  var _this = this;
43873
43895
  if (isPreview === void 0) { isPreview = false; }
43874
43896
  if (!this.onServerValidateQuestions ||
@@ -43880,14 +43902,14 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43880
43902
  var isFunc = typeof this.onServerValidateQuestions === "function";
43881
43903
  this.serverValidationEventCount = !isFunc ? this.onServerValidateQuestions.length : 1;
43882
43904
  if (isFunc) {
43883
- this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview));
43905
+ this.onServerValidateQuestions(this, this.createServerValidationOptions(doComplete, isPreview, page));
43884
43906
  }
43885
43907
  else {
43886
- this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview); });
43908
+ this.onServerValidateQuestions.fireByCreatingOptions(this, function () { return _this.createServerValidationOptions(doComplete, isPreview, page); });
43887
43909
  }
43888
43910
  return true;
43889
43911
  };
43890
- SurveyModel.prototype.completeServerValidation = function (options, isPreview) {
43912
+ SurveyModel.prototype.completeServerValidation = function (options, isPreview, page) {
43891
43913
  if (this.serverValidationEventCount > 1) {
43892
43914
  this.serverValidationEventCount--;
43893
43915
  if (!!options && !!options.errors && Object.keys(options.errors).length === 0)
@@ -43922,10 +43944,15 @@ var survey_SurveyModel = /** @class */ (function (_super) {
43922
43944
  this.showPreviewCore();
43923
43945
  }
43924
43946
  else {
43925
- if (self.isLastPage)
43926
- self.doComplete();
43927
- else
43928
- self.doNextPage();
43947
+ if (page) {
43948
+ this.currentPage = page;
43949
+ }
43950
+ else {
43951
+ if (self.isLastPage)
43952
+ self.doComplete();
43953
+ else
43954
+ self.doNextPage();
43955
+ }
43929
43956
  }
43930
43957
  }
43931
43958
  };
@@ -44237,7 +44264,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44237
44264
  return;
44238
44265
  var id = question.inputId;
44239
44266
  var root = settings.environment.root;
44240
- if (!!id && htmlElement.id !== id && typeof root !== "undefined") {
44267
+ if (!!id && (!htmlElement || htmlElement.id !== id) && typeof root !== "undefined") {
44241
44268
  var el = root.getElementById(id);
44242
44269
  if (!!el) {
44243
44270
  htmlElement = el;
@@ -44438,9 +44465,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44438
44465
  };
44439
44466
  SurveyModel.prototype.dynamicPanelItemValueChanged = function (question, options) {
44440
44467
  options.question = question;
44441
- options.panelIndex = options.itemIndex;
44442
- options.panelData = options.itemValue;
44443
- this.onDynamicPanelItemValueChanged.fire(this, options);
44468
+ this.onDynamicPanelValueChanged.fire(this, options);
44469
+ };
44470
+ SurveyModel.prototype.dynamicPanelItemValueChanging = function (question, options) {
44471
+ options.question = question;
44472
+ this.onDynamicPanelValueChanging.fire(this, options);
44444
44473
  };
44445
44474
  SurveyModel.prototype.dynamicPanelGetTabTitle = function (question, options) {
44446
44475
  options.question = question;
@@ -53790,6 +53819,11 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53790
53819
  this.setRenderedMinMax(values, properties);
53791
53820
  }
53792
53821
  };
53822
+ QuestionTextModel.prototype.getDisplayValueCore = function (keysAsText, value) {
53823
+ if (!this.maskTypeIsEmpty && !helpers_Helpers.isValueEmpty(value))
53824
+ return this.maskInstance.getMaskedValue(value);
53825
+ return _super.prototype.getDisplayValueCore.call(this, keysAsText, value);
53826
+ };
53793
53827
  QuestionTextModel.prototype.isLayoutTypeSupported = function (layoutType) {
53794
53828
  return true;
53795
53829
  };
@@ -61218,24 +61252,24 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61218
61252
  function QuestionRatingModel(name) {
61219
61253
  var _this = _super.call(this, name) || this;
61220
61254
  _this._syncPropertiesChanging = false;
61255
+ _this.iCounter = 0;
61221
61256
  _this.createItemValues("rateValues");
61222
- _this.createRenderedRateItems();
61223
61257
  _this.createLocalizableString("ratingOptionsCaption", _this, false, true);
61224
61258
  _this.registerFunctionOnPropertiesValueChanged(["rateMin", "rateMax",
61225
- "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.createRenderedRateItems(); });
61259
+ "minRateDescription", "maxRateDescription", "rateStep", "displayRateDescriptionsAsExtremeItems"], function () { return _this.resetRenderedItems(); });
61226
61260
  _this.registerFunctionOnPropertiesValueChanged(["rateType"], function () {
61227
61261
  _this.setIconsToRateValues();
61228
- _this.createRenderedRateItems();
61262
+ _this.resetRenderedItems();
61229
61263
  _this.updateRateCount();
61230
61264
  });
61231
61265
  _this.registerFunctionOnPropertiesValueChanged(["rateValues"], function () {
61232
61266
  _this.setIconsToRateValues();
61233
- _this.createRenderedRateItems();
61267
+ _this.resetRenderedItems();
61234
61268
  });
61235
61269
  _this.registerSychProperties(["rateValues"], function () {
61236
61270
  _this.autoGenerate = _this.rateValues.length == 0;
61237
61271
  _this.setIconsToRateValues();
61238
- _this.createRenderedRateItems();
61272
+ _this.resetRenderedItems();
61239
61273
  });
61240
61274
  _this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
61241
61275
  _this.updateColors(_this.survey.themeVariables);
@@ -61251,7 +61285,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61251
61285
  _this.rateValues.splice(0, _this.rateValues.length);
61252
61286
  _this.updateRateMax();
61253
61287
  }
61254
- _this.createRenderedRateItems();
61288
+ _this.resetRenderedItems();
61255
61289
  });
61256
61290
  _this.createLocalizableString("minRateDescription", _this, true)
61257
61291
  .onStringChanged.add(function (sender, options) {
@@ -61282,7 +61316,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61282
61316
  this.autoGenerate = !this.jsonObj.rateValues.length;
61283
61317
  this.updateRateCount();
61284
61318
  this.setIconsToRateValues();
61285
- this.createRenderedRateItems();
61286
61319
  };
61287
61320
  QuestionRatingModel.prototype.registerSychProperties = function (names, func) {
61288
61321
  var _this = this;
@@ -61386,7 +61419,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61386
61419
  },
61387
61420
  set: function (val) {
61388
61421
  this.setPropertyValue("rateValues", val);
61389
- this.createRenderedRateItems();
61390
61422
  },
61391
61423
  enumerable: false,
61392
61424
  configurable: true
@@ -61495,6 +61527,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61495
61527
  QuestionRatingModel.normalColorLight = getRGBColor("--sjs-special-yellow-light", "--sd-rating-normal-color-light");
61496
61528
  QuestionRatingModel.goodColorLight = getRGBColor("--sjs-special-green-light", "--sd-rating-good-color-light");
61497
61529
  this.colorsCalculated = true;
61530
+ this.resetRenderedItems();
61498
61531
  };
61499
61532
  QuestionRatingModel.prototype.getDisplayValueCore = function (keysAsText, value) {
61500
61533
  if (!this.useRateValues)
@@ -61515,22 +61548,55 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61515
61548
  this.autoGenerate = false;
61516
61549
  _super.prototype.itemValuePropertyChanged.call(this, item, name, oldValue, newValue);
61517
61550
  };
61518
- QuestionRatingModel.prototype.createRenderedRateItems = function () {
61519
- var _this = this;
61520
- var rateValues = [];
61521
- if (this.useRateValues()) {
61522
- rateValues = this.rateValues;
61551
+ QuestionRatingModel.prototype.runConditionCore = function (values, properties) {
61552
+ _super.prototype.runConditionCore.call(this, values, properties);
61553
+ this.runRateItesmCondition(values, properties);
61554
+ };
61555
+ QuestionRatingModel.prototype.runRateItesmCondition = function (values, properties) {
61556
+ var _a;
61557
+ if (!this.useRateValues())
61558
+ return;
61559
+ var isChanged = false;
61560
+ if ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.areInvisibleElementsShowing) {
61561
+ this.rateValues.forEach(function (item) {
61562
+ isChanged = isChanged || !item.isVisible;
61563
+ item.setIsVisible(item, true);
61564
+ });
61523
61565
  }
61524
61566
  else {
61525
- rateValues = this.createRateValues();
61567
+ isChanged = itemvalue_ItemValue.runConditionsForItems(this.rateValues, undefined, undefined, values, properties, true);
61526
61568
  }
61527
- if (this.autoGenerate) {
61528
- this.rateMax = rateValues[rateValues.length - 1].value;
61569
+ if (isChanged) {
61570
+ this.resetRenderedItems();
61571
+ if (!this.isEmpty() && !this.isReadOnly) {
61572
+ var item = itemvalue_ItemValue.getItemByValue(this.rateValues, this.value);
61573
+ if (item && !item.isVisible) {
61574
+ this.clearValue();
61575
+ }
61576
+ }
61529
61577
  }
61578
+ };
61579
+ QuestionRatingModel.prototype.getRateValuesCore = function () {
61580
+ if (!this.useRateValues())
61581
+ return this.createRateValues();
61582
+ var items = new Array();
61583
+ this.rateValues.forEach(function (item) {
61584
+ if (item.isVisible) {
61585
+ items.push(item);
61586
+ }
61587
+ });
61588
+ return items;
61589
+ };
61590
+ QuestionRatingModel.prototype.calculateRateValues = function () {
61591
+ var rateValues = this.getRateValuesCore();
61530
61592
  if (this.rateType == "smileys" && rateValues.length > 10)
61531
61593
  rateValues = rateValues.slice(0, 10);
61532
- this.visibleChoicesValue = rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
61533
- this.renderedRateItems = rateValues.map(function (v, i) {
61594
+ return rateValues;
61595
+ };
61596
+ QuestionRatingModel.prototype.calculateRenderedRateItems = function () {
61597
+ var _this = this;
61598
+ var rateValues = this.calculateRateValues();
61599
+ return rateValues.map(function (v, i) {
61534
61600
  var renderedItem = null;
61535
61601
  if (_this.displayRateDescriptionsAsExtremeItems) {
61536
61602
  if (i == 0)
@@ -61543,6 +61609,39 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61543
61609
  return renderedItem;
61544
61610
  });
61545
61611
  };
61612
+ QuestionRatingModel.prototype.calculateVisibleChoices = function () {
61613
+ var _this = this;
61614
+ var rateValues = this.calculateRateValues();
61615
+ return rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
61616
+ };
61617
+ QuestionRatingModel.prototype.resetRenderedItems = function () {
61618
+ if (this.autoGenerate) {
61619
+ var rateValues = this.getRateValuesCore();
61620
+ this.rateMax = rateValues[rateValues.length - 1].value;
61621
+ }
61622
+ if (Array.isArray(this.getPropertyValueWithoutDefault("renderedRateItems"))) {
61623
+ this.setArrayPropertyDirectly("renderedRateItems", this.calculateRenderedRateItems());
61624
+ }
61625
+ if (Array.isArray(this.getPropertyValueWithoutDefault("visibleChoices"))) {
61626
+ this.setArrayPropertyDirectly("visibleChoices", this.calculateVisibleChoices);
61627
+ }
61628
+ };
61629
+ Object.defineProperty(QuestionRatingModel.prototype, "renderedRateItems", {
61630
+ get: function () {
61631
+ var _this = this;
61632
+ return this.getPropertyValue("renderedRateItems", undefined, function () { return _this.calculateRenderedRateItems(); });
61633
+ },
61634
+ enumerable: false,
61635
+ configurable: true
61636
+ });
61637
+ Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
61638
+ get: function () {
61639
+ var _this = this;
61640
+ return this.getPropertyValue("visibleChoices", undefined, function () { return _this.calculateVisibleChoices(); });
61641
+ },
61642
+ enumerable: false,
61643
+ configurable: true
61644
+ });
61546
61645
  QuestionRatingModel.prototype.createRateValues = function () {
61547
61646
  var res = [];
61548
61647
  var value = this.rateMin;
@@ -62016,13 +62115,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62016
62115
  QuestionRatingModel.prototype.isItemSelected = function (item) {
62017
62116
  return item.value == this.value;
62018
62117
  };
62019
- Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
62020
- get: function () {
62021
- return this.visibleChoicesValue;
62022
- },
62023
- enumerable: false,
62024
- configurable: true
62025
- });
62026
62118
  Object.defineProperty(QuestionRatingModel.prototype, "readOnlyText", {
62027
62119
  get: function () {
62028
62120
  if (this.readOnly)
@@ -62091,7 +62183,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62091
62183
  QuestionRatingModel.prototype.themeChanged = function (theme) {
62092
62184
  this.colorsCalculated = false;
62093
62185
  this.updateColors(theme.cssVariables);
62094
- this.createRenderedRateItems();
62095
62186
  };
62096
62187
  QuestionRatingModel.prototype.setSurveyImpl = function (value, isLight) {
62097
62188
  _super.prototype.setSurveyImpl.call(this, value, isLight);
@@ -62117,9 +62208,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
62117
62208
  question_rating_decorate([
62118
62209
  jsonobject_property()
62119
62210
  ], QuestionRatingModel.prototype, "rateCount", void 0);
62120
- question_rating_decorate([
62121
- propertyArray()
62122
- ], QuestionRatingModel.prototype, "renderedRateItems", void 0);
62123
62211
  question_rating_decorate([
62124
62212
  jsonobject_property({ defaultValue: false })
62125
62213
  ], QuestionRatingModel.prototype, "hasMinRateDescription", void 0);
@@ -67423,6 +67511,7 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
67423
67511
  }
67424
67512
  if (!qValue[index])
67425
67513
  qValue[index] = {};
67514
+ var oldVal = qValue[index][name];
67426
67515
  if (!this.isValueEmpty(val)) {
67427
67516
  qValue[index][name] = val;
67428
67517
  }
@@ -67432,17 +67521,20 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
67432
67521
  if (index >= 0 && index < this.panelsCore.length) {
67433
67522
  this.changingValueQuestion = this.panelsCore[index].getQuestionByValueName(name);
67434
67523
  }
67524
+ var options = {
67525
+ panel: item.panel,
67526
+ name: name,
67527
+ panelIndex: index,
67528
+ panelData: qValue[index],
67529
+ value: val,
67530
+ oldValue: oldVal
67531
+ };
67532
+ if (this.survey) {
67533
+ this.survey.dynamicPanelItemValueChanging(this, options);
67534
+ }
67435
67535
  this.value = qValue;
67436
67536
  this.changingValueQuestion = null;
67437
67537
  if (this.survey) {
67438
- var options = {
67439
- question: this,
67440
- panel: item.panel,
67441
- name: name,
67442
- itemIndex: index,
67443
- itemValue: qValue[index],
67444
- value: val,
67445
- };
67446
67538
  this.survey.dynamicPanelItemValueChanged(this, options);
67447
67539
  }
67448
67540
  this.isSetPanelItemData[name]--;
@@ -70827,9 +70919,9 @@ Serializer.addClass("currencymask", [
70827
70919
 
70828
70920
  var Version;
70829
70921
  var ReleaseDate;
70830
- Version = "" + "1.12.19";
70922
+ Version = "" + "1.12.21";
70831
70923
  settings.version = Version;
70832
- ReleaseDate = "" + "2025-01-15";
70924
+ ReleaseDate = "" + "2025-01-28";
70833
70925
  function checkLibraryVersion(ver, libraryName) {
70834
70926
  if (Version != ver) {
70835
70927
  var str = "survey-core has version '" + Version + "' and " + libraryName