survey-core 1.10.3 → 1.10.4

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 (220) hide show
  1. package/defaultV2.css +3 -1
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +3 -1
  4. package/defaultV2.fontless.css.map +1 -1
  5. package/defaultV2.fontless.min.css +2 -2
  6. package/defaultV2.min.css +2 -2
  7. package/i18n/arabic.js +1 -1
  8. package/i18n/arabic.min.js +1 -1
  9. package/i18n/basque.js +1 -1
  10. package/i18n/basque.min.js +1 -1
  11. package/i18n/bulgarian.js +1 -1
  12. package/i18n/bulgarian.min.js +1 -1
  13. package/i18n/catalan.js +1 -1
  14. package/i18n/catalan.min.js +1 -1
  15. package/i18n/croatian.js +1 -1
  16. package/i18n/croatian.min.js +1 -1
  17. package/i18n/czech.js +1 -1
  18. package/i18n/czech.min.js +1 -1
  19. package/i18n/danish.js +1 -1
  20. package/i18n/danish.min.js +1 -1
  21. package/i18n/dutch.js +1 -1
  22. package/i18n/dutch.min.js +1 -1
  23. package/i18n/english.js +1 -1
  24. package/i18n/english.min.js +1 -1
  25. package/i18n/estonian.js +1 -1
  26. package/i18n/estonian.min.js +1 -1
  27. package/i18n/finnish.js +1 -1
  28. package/i18n/finnish.min.js +1 -1
  29. package/i18n/french.js +1 -1
  30. package/i18n/french.min.js +1 -1
  31. package/i18n/georgian.js +1 -1
  32. package/i18n/georgian.min.js +1 -1
  33. package/i18n/german.js +1 -1
  34. package/i18n/german.min.js +1 -1
  35. package/i18n/greek.js +1 -1
  36. package/i18n/greek.min.js +1 -1
  37. package/i18n/hebrew.js +1 -1
  38. package/i18n/hebrew.min.js +1 -1
  39. package/i18n/hindi.js +1 -1
  40. package/i18n/hindi.min.js +1 -1
  41. package/i18n/hungarian.js +1 -1
  42. package/i18n/hungarian.min.js +1 -1
  43. package/i18n/icelandic.js +1 -1
  44. package/i18n/icelandic.min.js +1 -1
  45. package/i18n/index.js +1 -1
  46. package/i18n/index.min.js +1 -1
  47. package/i18n/indonesian.js +1 -1
  48. package/i18n/indonesian.min.js +1 -1
  49. package/i18n/italian.js +1 -1
  50. package/i18n/italian.min.js +1 -1
  51. package/i18n/japanese.js +1 -1
  52. package/i18n/japanese.min.js +1 -1
  53. package/i18n/kazakh.js +1 -1
  54. package/i18n/kazakh.min.js +1 -1
  55. package/i18n/korean.js +1 -1
  56. package/i18n/korean.min.js +1 -1
  57. package/i18n/latvian.js +1 -1
  58. package/i18n/latvian.min.js +1 -1
  59. package/i18n/lithuanian.js +1 -1
  60. package/i18n/lithuanian.min.js +1 -1
  61. package/i18n/macedonian.js +1 -1
  62. package/i18n/macedonian.min.js +1 -1
  63. package/i18n/malay.js +1 -1
  64. package/i18n/malay.min.js +1 -1
  65. package/i18n/nl-BE.js +1 -1
  66. package/i18n/nl-BE.min.js +1 -1
  67. package/i18n/norwegian.js +1 -1
  68. package/i18n/norwegian.min.js +1 -1
  69. package/i18n/persian.js +1 -1
  70. package/i18n/persian.min.js +1 -1
  71. package/i18n/polish.js +1 -1
  72. package/i18n/polish.min.js +1 -1
  73. package/i18n/portuguese-br.js +1 -1
  74. package/i18n/portuguese-br.min.js +1 -1
  75. package/i18n/portuguese.js +1 -1
  76. package/i18n/portuguese.min.js +1 -1
  77. package/i18n/romanian.js +1 -1
  78. package/i18n/romanian.min.js +1 -1
  79. package/i18n/russian.js +1 -1
  80. package/i18n/russian.min.js +1 -1
  81. package/i18n/serbian.js +1 -1
  82. package/i18n/serbian.min.js +1 -1
  83. package/i18n/simplified-chinese.js +1 -1
  84. package/i18n/simplified-chinese.min.js +1 -1
  85. package/i18n/slovak.js +1 -1
  86. package/i18n/slovak.min.js +1 -1
  87. package/i18n/spanish.js +1 -1
  88. package/i18n/spanish.min.js +1 -1
  89. package/i18n/swahili.js +1 -1
  90. package/i18n/swahili.min.js +1 -1
  91. package/i18n/swedish.js +1 -1
  92. package/i18n/swedish.min.js +1 -1
  93. package/i18n/tajik.js +1 -1
  94. package/i18n/tajik.min.js +1 -1
  95. package/i18n/telugu.js +1 -1
  96. package/i18n/telugu.min.js +1 -1
  97. package/i18n/thai.js +1 -1
  98. package/i18n/thai.min.js +1 -1
  99. package/i18n/traditional-chinese.js +1 -1
  100. package/i18n/traditional-chinese.min.js +1 -1
  101. package/i18n/turkish.js +1 -1
  102. package/i18n/turkish.min.js +1 -1
  103. package/i18n/ukrainian.js +1 -1
  104. package/i18n/ukrainian.min.js +1 -1
  105. package/i18n/urdu.js +1 -1
  106. package/i18n/urdu.min.js +1 -1
  107. package/i18n/vietnamese.js +1 -1
  108. package/i18n/vietnamese.min.js +1 -1
  109. package/i18n/welsh.js +1 -1
  110. package/i18n/welsh.min.js +1 -1
  111. package/modern.css +1 -1
  112. package/modern.fontless.css +1 -1
  113. package/modern.fontless.min.css +1 -1
  114. package/modern.min.css +1 -1
  115. package/package.json +1 -1
  116. package/plugins/bootstrap-integration.js +1 -1
  117. package/plugins/bootstrap-integration.min.js +1 -1
  118. package/plugins/bootstrap-material-integration.js +1 -1
  119. package/plugins/bootstrap-material-integration.min.js +1 -1
  120. package/survey.core.js +130 -73
  121. package/survey.core.js.map +1 -1
  122. package/survey.core.min.js +3 -3
  123. package/survey.css +1 -1
  124. package/survey.i18n.js +1 -1
  125. package/survey.i18n.min.js +1 -1
  126. package/survey.min.css +1 -1
  127. package/themes/borderless-dark-panelless.js +1 -1
  128. package/themes/borderless-dark-panelless.min.js +1 -1
  129. package/themes/borderless-dark.js +1 -1
  130. package/themes/borderless-dark.min.js +1 -1
  131. package/themes/borderless-light-panelless..js +1 -1
  132. package/themes/borderless-light-panelless..min.js +1 -1
  133. package/themes/borderless-light.js +1 -1
  134. package/themes/borderless-light.min.js +1 -1
  135. package/themes/contrast-dark-panelless.js +1 -1
  136. package/themes/contrast-dark-panelless.min.js +1 -1
  137. package/themes/contrast-dark.js +1 -1
  138. package/themes/contrast-dark.min.js +1 -1
  139. package/themes/contrast-light-panelless.js +1 -1
  140. package/themes/contrast-light-panelless.min.js +1 -1
  141. package/themes/contrast-light.js +1 -1
  142. package/themes/contrast-light.min.js +1 -1
  143. package/themes/default-dark-panelless.js +1 -1
  144. package/themes/default-dark-panelless.min.js +1 -1
  145. package/themes/default-dark.js +1 -1
  146. package/themes/default-dark.min.js +1 -1
  147. package/themes/default-light-panelless.js +1 -1
  148. package/themes/default-light-panelless.min.js +1 -1
  149. package/themes/default-light.js +1 -1
  150. package/themes/default-light.min.js +1 -1
  151. package/themes/doubleborder-dark-panelless.js +1 -1
  152. package/themes/doubleborder-dark-panelless.min.js +1 -1
  153. package/themes/doubleborder-dark.js +1 -1
  154. package/themes/doubleborder-dark.min.js +1 -1
  155. package/themes/doubleborder-light-panelles.js +1 -1
  156. package/themes/doubleborder-light-panelles.min.js +1 -1
  157. package/themes/doubleborder-light.js +1 -1
  158. package/themes/doubleborder-light.min.js +1 -1
  159. package/themes/flat-dark-panelless.js +1 -1
  160. package/themes/flat-dark-panelless.min.js +1 -1
  161. package/themes/flat-dark.js +1 -1
  162. package/themes/flat-dark.min.js +1 -1
  163. package/themes/flat-light-panelless.js +1 -1
  164. package/themes/flat-light-panelless.min.js +1 -1
  165. package/themes/flat-light.js +1 -1
  166. package/themes/flat-light.min.js +1 -1
  167. package/themes/index.js +1 -1
  168. package/themes/index.min.js +1 -1
  169. package/themes/layered-dark-panelless.js +1 -1
  170. package/themes/layered-dark-panelless.min.js +1 -1
  171. package/themes/layered-dark.js +1 -1
  172. package/themes/layered-dark.min.js +1 -1
  173. package/themes/layered-light-panelless.js +1 -1
  174. package/themes/layered-light-panelless.min.js +1 -1
  175. package/themes/layered-light.js +1 -1
  176. package/themes/layered-light.min.js +1 -1
  177. package/themes/plain-dark-panelless.js +1 -1
  178. package/themes/plain-dark-panelless.min.js +1 -1
  179. package/themes/plain-dark.js +1 -1
  180. package/themes/plain-dark.min.js +1 -1
  181. package/themes/plain-light-panelless.js +1 -1
  182. package/themes/plain-light-panelless.min.js +1 -1
  183. package/themes/plain-light.js +1 -1
  184. package/themes/plain-light.min.js +1 -1
  185. package/themes/sharp-dark-panelless.js +1 -1
  186. package/themes/sharp-dark-panelless.min.js +1 -1
  187. package/themes/sharp-dark.js +1 -1
  188. package/themes/sharp-dark.min.js +1 -1
  189. package/themes/sharp-light-panelless.js +1 -1
  190. package/themes/sharp-light-panelless.min.js +1 -1
  191. package/themes/sharp-light.js +1 -1
  192. package/themes/sharp-light.min.js +1 -1
  193. package/themes/solid-dark-panelless.js +1 -1
  194. package/themes/solid-dark-panelless.min.js +1 -1
  195. package/themes/solid-dark.js +1 -1
  196. package/themes/solid-dark.min.js +1 -1
  197. package/themes/solid-light-panelless.js +1 -1
  198. package/themes/solid-light-panelless.min.js +1 -1
  199. package/themes/solid-light.js +1 -1
  200. package/themes/solid-light.min.js +1 -1
  201. package/themes/three-dimensional-dark-panelless.js +1 -1
  202. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  203. package/themes/three-dimensional-dark.js +1 -1
  204. package/themes/three-dimensional-dark.min.js +1 -1
  205. package/themes/three-dimensional-light-panelless.js +1 -1
  206. package/themes/three-dimensional-light-panelless.min.js +1 -1
  207. package/themes/three-dimensional-light.js +1 -1
  208. package/themes/three-dimensional-light.min.js +1 -1
  209. package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
  210. package/ts3.4/typings/mask/mask_numeric.d.ts +1 -0
  211. package/ts3.4/typings/question_file.d.ts +0 -1
  212. package/ts3.4/typings/question_matrixdynamic.d.ts +1 -0
  213. package/ts3.4/typings/question_rating.d.ts +2 -0
  214. package/ts3.4/typings/settings.d.ts +8 -0
  215. package/typings/entries/chunks/model.d.ts +1 -1
  216. package/typings/mask/mask_numeric.d.ts +1 -0
  217. package/typings/question_file.d.ts +0 -1
  218. package/typings/question_matrixdynamic.d.ts +1 -0
  219. package/typings/question_rating.d.ts +2 -0
  220. package/typings/settings.d.ts +8 -0
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.10.3
2
+ * surveyjs - Survey JavaScript library v1.10.4
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
  */
@@ -3970,13 +3970,18 @@ var ProcessValue = /** @class */ (function () {
3970
3970
  };
3971
3971
  ProcessValue.prototype.isAnyKeyChanged = function (keys, usedNames) {
3972
3972
  for (var i = 0; i < usedNames.length; i++) {
3973
- var name = usedNames[i];
3974
- if (keys.hasOwnProperty(name))
3973
+ var name_1 = usedNames[i];
3974
+ if (!name_1)
3975
+ continue;
3976
+ var lowerName = name_1.toLowerCase();
3977
+ if (keys.hasOwnProperty(name_1))
3978
+ return true;
3979
+ if (name_1 !== lowerName && keys.hasOwnProperty(lowerName))
3975
3980
  return true;
3976
- var firstName = this.getFirstName(name);
3981
+ var firstName = this.getFirstName(name_1);
3977
3982
  if (!keys.hasOwnProperty(firstName))
3978
3983
  continue;
3979
- if (name === firstName)
3984
+ if (name_1 === firstName)
3980
3985
  return true;
3981
3986
  var keyValue = keys[firstName];
3982
3987
  if (keyValue == undefined)
@@ -3986,9 +3991,9 @@ var ProcessValue = /** @class */ (function () {
3986
3991
  return true;
3987
3992
  var v = {};
3988
3993
  v[firstName] = keyValue["oldValue"];
3989
- var oldValue = this.getValue(name, v);
3994
+ var oldValue = this.getValue(name_1, v);
3990
3995
  v[firstName] = keyValue["newValue"];
3991
- var newValue = this.getValue(name, v);
3996
+ var newValue = this.getValue(name_1, v);
3992
3997
  if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue, false, false, false))
3993
3998
  return true;
3994
3999
  }
@@ -7315,10 +7320,9 @@ var DragDropDOMAdapter = /** @class */ (function () {
7315
7320
  var pageY = event.pageY;
7316
7321
  var clientX = event.clientX;
7317
7322
  var clientY = event.clientY;
7318
- if (!!this.fitToContainer) {
7319
- rootElementX -= rootElementScrollLeft;
7320
- rootElementY -= rootElementScrollTop;
7321
- }
7323
+ //https://github.com/surveyjs/survey-creator/issues/5484
7324
+ rootElementX -= rootElementScrollLeft;
7325
+ rootElementY -= rootElementScrollTop;
7322
7326
  var shortcutBottomCoordinate = this.getShortcutBottomCoordinate(clientY, shortcutHeight, shortcutYOffset);
7323
7327
  var shortcutRightCoordinate = this.getShortcutRightCoordinate(clientX, shortcutWidth, shortcutXOffset);
7324
7328
  if (shortcutRightCoordinate >= documentRight) { // right boundary
@@ -9709,8 +9713,8 @@ __webpack_require__.r(__webpack_exports__);
9709
9713
 
9710
9714
  var Version;
9711
9715
  var ReleaseDate;
9712
- Version = "" + "1.10.3";
9713
- ReleaseDate = "" + "2024-05-07";
9716
+ Version = "" + "1.10.4";
9717
+ ReleaseDate = "" + "2024-05-15";
9714
9718
  function checkLibraryVersion(ver, libraryName) {
9715
9719
  if (Version != ver) {
9716
9720
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15312,6 +15316,8 @@ __webpack_require__.r(__webpack_exports__);
15312
15316
  /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers */ "./src/helpers.ts");
15313
15317
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
15314
15318
  /* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
15319
+ /* harmony import */ var _conditions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./conditions */ "./src/conditions.ts");
15320
+
15315
15321
 
15316
15322
 
15317
15323
 
@@ -15434,7 +15440,7 @@ function avg(params) {
15434
15440
  }
15435
15441
  FunctionFactory.Instance.register("avg", avg);
15436
15442
  function getInArrayParams(params) {
15437
- if (params.length != 2)
15443
+ if (params.length < 2 || params.length > 3)
15438
15444
  return null;
15439
15445
  var arr = params[0];
15440
15446
  if (!arr)
@@ -15444,16 +15450,22 @@ function getInArrayParams(params) {
15444
15450
  var name = params[1];
15445
15451
  if (typeof name !== "string" && !(name instanceof String))
15446
15452
  return null;
15447
- return { data: arr, name: name };
15453
+ var expression = params.length === 3 ? params[2] : undefined;
15454
+ if (typeof expression !== "string" && !(expression instanceof String)) {
15455
+ expression = undefined;
15456
+ }
15457
+ return { data: arr, name: name, expression: expression };
15448
15458
  }
15449
15459
  function convertToNumber(val) {
15450
15460
  if (typeof val === "string")
15451
15461
  return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(val) ? _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumber(val) : undefined;
15452
15462
  return val;
15453
15463
  }
15454
- function processItemInArray(item, name, res, func, needToConvert) {
15464
+ function processItemInArray(item, name, res, func, needToConvert, condition) {
15455
15465
  if (!item || _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(item[name]))
15456
15466
  return res;
15467
+ if (condition && !condition.run(item))
15468
+ return res;
15457
15469
  var val = needToConvert ? convertToNumber(item[name]) : 1;
15458
15470
  return func(res, val);
15459
15471
  }
@@ -15462,15 +15474,19 @@ function calcInArray(params, func, needToConvert) {
15462
15474
  var v = getInArrayParams(params);
15463
15475
  if (!v)
15464
15476
  return undefined;
15477
+ var condition = !!v.expression ? new _conditions__WEBPACK_IMPORTED_MODULE_3__["ConditionRunner"](v.expression) : undefined;
15478
+ if (condition && condition.isAsync) {
15479
+ condition = undefined;
15480
+ }
15465
15481
  var res = undefined;
15466
15482
  if (Array.isArray(v.data)) {
15467
15483
  for (var i = 0; i < v.data.length; i++) {
15468
- res = processItemInArray(v.data[i], v.name, res, func, needToConvert);
15484
+ res = processItemInArray(v.data[i], v.name, res, func, needToConvert, condition);
15469
15485
  }
15470
15486
  }
15471
15487
  else {
15472
15488
  for (var key in v.data) {
15473
- res = processItemInArray(v.data[key], v.name, res, func, needToConvert);
15489
+ res = processItemInArray(v.data[key], v.name, res, func, needToConvert, condition);
15474
15490
  }
15475
15491
  }
15476
15492
  return res;
@@ -22851,6 +22867,9 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22851
22867
  }
22852
22868
  return result;
22853
22869
  };
22870
+ InputMaskNumeric.prototype.numericalCompositionIsEmpty = function (number) {
22871
+ return !number.integralPart && !number.fractionalPart;
22872
+ };
22854
22873
  InputMaskNumeric.prototype.displayNumber = function (parsedNumber, insertThousandsSeparator, matchWholeMask) {
22855
22874
  if (insertThousandsSeparator === void 0) { insertThousandsSeparator = true; }
22856
22875
  if (matchWholeMask === void 0) { matchWholeMask = false; }
@@ -22955,6 +22974,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
22955
22974
  };
22956
22975
  InputMaskNumeric.prototype.getNumberUnmaskedValue = function (str) {
22957
22976
  var parsedNumber = this.parseNumber(str);
22977
+ if (this.numericalCompositionIsEmpty(parsedNumber))
22978
+ return undefined;
22958
22979
  return this.convertNumber(parsedNumber);
22959
22980
  };
22960
22981
  InputMaskNumeric.prototype.getTextAlignment = function () {
@@ -33016,7 +33037,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
33016
33037
  }
33017
33038
  }
33018
33039
  }
33019
- return strs.join(", ");
33040
+ return strs.join(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].choicesSeparator);
33020
33041
  };
33021
33042
  QuestionSelectBase.prototype.getItemDisplayValue = function (item, val) {
33022
33043
  if (item === this.otherItem) {
@@ -38497,7 +38518,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
38497
38518
  _super.prototype.updateElementCssCore.call(this, cssClasses);
38498
38519
  this.prevFileAction.iconName = this.cssClasses.leftIconId;
38499
38520
  this.nextFileAction.iconName = this.cssClasses.rightIconId;
38500
- //this.mobileFileNavigator.cssClasses = this.survey.getCss().actionBar;
38521
+ this.updateCurrentMode();
38501
38522
  };
38502
38523
  QuestionFileModel.prototype.getFileIndexCaption = function () {
38503
38524
  return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
@@ -39139,11 +39160,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
39139
39160
  this.actionsContainer.containerCss = classes.actionsContainer;
39140
39161
  return classes;
39141
39162
  };
39142
- //todo remove in v2
39143
- QuestionFileModel.prototype.updateElementCss = function (reNew) {
39144
- _super.prototype.updateElementCss.call(this, reNew);
39145
- this.updateCurrentMode();
39146
- };
39147
39163
  QuestionFileModel.prototype.onSurveyLoad = function () {
39148
39164
  _super.prototype.onSurveyLoad.call(this);
39149
39165
  this.updateCurrentMode();
@@ -39549,7 +39565,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
39549
39565
 
39550
39566
 
39551
39567
 
39552
- var youtubeTags = ["youtube.com", "youtu.be"];
39568
+ var youtubeDomains = ["www.youtube.com", "m.youtube.com", "youtube.com", "youtu.be"];
39553
39569
  var videoSuffics = [".mp4", ".mov", ".wmv", ".flv", ".avi", ".mkv"];
39554
39570
  var youtubeUrl = "https://www.youtube.com/";
39555
39571
  var youtubeEmbed = "embed";
@@ -39557,8 +39573,9 @@ function isUrlYoutubeVideo(url) {
39557
39573
  if (!url)
39558
39574
  return false;
39559
39575
  url = url.toLowerCase();
39560
- for (var i = 0; i < youtubeTags.length; i++) {
39561
- if (url.indexOf(youtubeTags[i]) !== -1)
39576
+ url = url.replace(/^https?:\/\//, "");
39577
+ for (var i = 0; i < youtubeDomains.length; i++) {
39578
+ if (url.indexOf(youtubeDomains[i] + "/") === 0)
39562
39579
  return true;
39563
39580
  }
39564
39581
  return false;
@@ -39574,7 +39591,7 @@ var QuestionImageModel = /** @class */ (function (_super) {
39574
39591
  var _this = _super.call(this, name) || this;
39575
39592
  var locImageLink = _this.createLocalizableString("imageLink", _this, false);
39576
39593
  locImageLink.onGetTextCallback = function (text) {
39577
- return getCorrectImageLink(text);
39594
+ return getCorrectImageLink(text, _this.contentMode == "youtube");
39578
39595
  };
39579
39596
  _this.createLocalizableString("altText", _this, false);
39580
39597
  _this.registerPropertyChangedHandlers(["contentMode", "imageLink"], function () { return _this.calculateRenderedMode(); });
@@ -39806,9 +39823,10 @@ var QuestionImageModel = /** @class */ (function (_super) {
39806
39823
  return QuestionImageModel;
39807
39824
  }(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
39808
39825
 
39809
- function getCorrectImageLink(val) {
39826
+ function getCorrectImageLink(val, isYouTube) {
39810
39827
  if (!val || !isUrlYoutubeVideo(val))
39811
- return val;
39828
+ return isYouTube ? "" : val;
39829
+ //if(!val || !isUrlYoutubeVideo(val)) return val;
39812
39830
  var res = val.toLocaleLowerCase();
39813
39831
  if (res.indexOf(youtubeEmbed) > -1)
39814
39832
  return val;
@@ -44505,9 +44523,9 @@ var MatrixDropdownColumn = /** @class */ (function (_super) {
44505
44523
  * @see isRequired
44506
44524
  * @see readOnly
44507
44525
  */
44508
- get: function () { return this.getPropertyValue("visible"); },
44526
+ get: function () { return this.templateQuestion.visible; },
44509
44527
  set: function (val) {
44510
- this.setPropertyValue("visible", val);
44528
+ this.templateQuestion.visible = val;
44511
44529
  },
44512
44530
  enumerable: false,
44513
44531
  configurable: true
@@ -46555,7 +46573,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
46555
46573
  QuestionMatrixDropdownRenderedTable.prototype.getMultipleColumnChoices = function (column) {
46556
46574
  var choices = column.templateQuestion.choices;
46557
46575
  if (!!choices && Array.isArray(choices) && choices.length == 0)
46558
- return this.matrix.choices;
46576
+ return [].concat(this.matrix.choices, column.getVisibleMultipleChoices());
46559
46577
  choices = column.getVisibleMultipleChoices();
46560
46578
  if (!choices || !Array.isArray(choices))
46561
46579
  return null;
@@ -46735,11 +46753,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
46735
46753
  function QuestionMatrixDynamicModel(name) {
46736
46754
  var _this = _super.call(this, name) || this;
46737
46755
  _this.rowCounter = 0;
46738
- _this.initialRowCount = 2;
46739
46756
  _this.setRowCountValueFromData = false;
46740
46757
  _this.startDragMatrixRow = function (event, currentTarget) {
46741
46758
  _this.dragDropMatrixRows.startDrag(event, _this.draggedRow, _this, event.target);
46742
46759
  };
46760
+ _this.initialRowCount = _this.getDefaultPropertyValue("rowCount");
46743
46761
  _this.createLocalizableString("confirmDeleteText", _this, false, "confirmDelete");
46744
46762
  var locAddRowText = _this.createLocalizableString("addRowText", _this);
46745
46763
  locAddRowText.onGetTextCallback = function (text) {
@@ -47616,6 +47634,12 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
47616
47634
  this.setPropertyValueDirectly("rowCount", val.length);
47617
47635
  return true;
47618
47636
  };
47637
+ QuestionMatrixDynamicModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
47638
+ if (clearData === void 0) { clearData = false; }
47639
+ this.setRowCountValueFromData = true;
47640
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
47641
+ this.setRowCountValueFromData = false;
47642
+ };
47619
47643
  QuestionMatrixDynamicModel.prototype.onBeforeValueChanged = function (val) {
47620
47644
  if (!val || !Array.isArray(val))
47621
47645
  return;
@@ -53049,6 +53073,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53049
53073
  _this.registerFunctionOnPropertiesValueChanged(["rateColorMode", "scaleColorMode"], function () {
53050
53074
  _this.updateColors(_this.survey.themeVariables);
53051
53075
  });
53076
+ _this.registerFunctionOnPropertiesValueChanged(["displayMode"], function () {
53077
+ _this.updateRenderAsBasedOnDisplayMode(true);
53078
+ });
53052
53079
  _this.registerSychProperties(["autoGenerate"], function () {
53053
53080
  if (!_this.autoGenerate && _this.rateValues.length === 0) {
53054
53081
  _this.setPropertyValue("rateValues", _this.visibleRateValues);
@@ -53464,6 +53491,27 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53464
53491
  enumerable: false,
53465
53492
  configurable: true
53466
53493
  });
53494
+ QuestionRatingModel.prototype.updateRenderAsBasedOnDisplayMode = function (isOnChange) {
53495
+ if (this.isDesignMode) {
53496
+ if (isOnChange || this.renderAs === "dropdown") {
53497
+ this.renderAs = "default";
53498
+ }
53499
+ }
53500
+ else {
53501
+ if (isOnChange || this.displayMode !== "auto") {
53502
+ this.renderAs = this.displayMode === "dropdown" ? "dropdown" : "default";
53503
+ }
53504
+ }
53505
+ };
53506
+ QuestionRatingModel.prototype.onSurveyLoad = function () {
53507
+ _super.prototype.onSurveyLoad.call(this);
53508
+ if (this.renderAs === "dropdown" && this.displayMode === "auto") {
53509
+ this.displayMode = this.renderAs;
53510
+ }
53511
+ else {
53512
+ this.updateRenderAsBasedOnDisplayMode();
53513
+ }
53514
+ };
53467
53515
  Object.defineProperty(QuestionRatingModel.prototype, "rateDisplayMode", {
53468
53516
  get: function () {
53469
53517
  return this.rateType;
@@ -53873,6 +53921,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53873
53921
  if (!this.survey)
53874
53922
  return;
53875
53923
  this.updateColors(this.survey.themeVariables);
53924
+ this.updateRenderAsBasedOnDisplayMode();
53876
53925
  };
53877
53926
  QuestionRatingModel.prototype.dispose = function () {
53878
53927
  _super.prototype.dispose.call(this);
@@ -53903,18 +53952,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53903
53952
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
53904
53953
  ], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
53905
53954
  __decorate([
53906
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
53907
- onSet: function (val, target) {
53908
- if (!target.isDesignMode) {
53909
- if (val === "dropdown") {
53910
- target.renderAs = "dropdown";
53911
- }
53912
- else {
53913
- target.renderAs = "default";
53914
- }
53915
- }
53916
- }
53917
- })
53955
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
53918
53956
  ], QuestionRatingModel.prototype, "displayMode", void 0);
53919
53957
  __decorate([
53920
53958
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
@@ -56856,6 +56894,7 @@ var settings = {
56856
56894
  * A separator used in a shorthand notation that specifies a value and display text for an [`ItemValue`](https://surveyjs.io/form-library/documentation/api-reference/itemvalue) object: `"value|text"`.
56857
56895
  *
56858
56896
  * Default value: `"|"`
56897
+ * @see [settings.choicesSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#choicesSeparator)
56859
56898
  */
56860
56899
  itemValueSeparator: "|",
56861
56900
  /**
@@ -57010,6 +57049,13 @@ var settings = {
57010
57049
  dontKnowItem: [3],
57011
57050
  otherItem: [4]
57012
57051
  },
57052
+ /**
57053
+ * One or several characters used to separate choice options in a list.
57054
+ *
57055
+ * Default value: `", "`
57056
+ * @see [settings.itemValueSeparator](https://surveyjs.io/form-library/documentation/api-reference/settings#itemValueSeparator)
57057
+ */
57058
+ choicesSeparator: ", ",
57013
57059
  /**
57014
57060
  * A list of supported validators by question type.
57015
57061
  */
@@ -59002,7 +59048,7 @@ var SurveyElement = /** @class */ (function (_super) {
59002
59048
  configurable: true
59003
59049
  });
59004
59050
  SurveyElement.prototype.getIsAnimationAllowed = function () {
59005
- return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey;
59051
+ return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
59006
59052
  };
59007
59053
  SurveyElement.prototype.dispose = function () {
59008
59054
  _super.prototype.dispose.call(this);
@@ -66052,14 +66098,20 @@ var SurveyModel = /** @class */ (function (_super) {
66052
66098
  SurveyModel.prototype.setVariable = function (name, newValue) {
66053
66099
  if (!name)
66054
66100
  return;
66101
+ var oldValue = this.getVariable(name);
66055
66102
  if (!!this.valuesHash) {
66056
66103
  delete this.valuesHash[name];
66057
66104
  }
66058
66105
  name = name.toLowerCase();
66059
66106
  this.variablesHash[name] = newValue;
66060
66107
  this.notifyElementsOnAnyValueOrVariableChanged(name);
66061
- this.runConditionOnValueChanged(name, newValue);
66062
- this.onVariableChanged.fire(this, { name: name, value: newValue });
66108
+ if (!_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isTwoValueEquals(oldValue, newValue)) {
66109
+ this.runConditionOnValueChanged(name, newValue);
66110
+ var triggerKeys = {};
66111
+ triggerKeys[name] = { newValue: newValue, oldValue: oldValue };
66112
+ this.checkTriggers(triggerKeys, false, false, name);
66113
+ this.onVariableChanged.fire(this, { name: name, value: newValue });
66114
+ }
66063
66115
  };
66064
66116
  /**
66065
66117
  * Returns the names of all variables in the survey.
@@ -66225,7 +66277,10 @@ var SurveyModel = /** @class */ (function (_super) {
66225
66277
  return;
66226
66278
  if (this.checkIsCurrentPageHasErrors(false))
66227
66279
  return;
66280
+ var curPage = this.currentPage;
66228
66281
  var goNextPage = function () {
66282
+ if (curPage !== _this.currentPage)
66283
+ return;
66229
66284
  if (!_this.isLastPage) {
66230
66285
  _this.nextPage();
66231
66286
  }
@@ -67214,32 +67269,34 @@ var SurveyModel = /** @class */ (function (_super) {
67214
67269
  }
67215
67270
  }
67216
67271
  else if (this.state === "running" && isStrCiEqual(layoutElement.id, this.progressBarComponentName)) {
67217
- var headerLayoutElement = this.findLayoutElement("advanced-header");
67218
- var advHeader = headerLayoutElement && headerLayoutElement.data;
67219
- var isBelowHeader = !advHeader || advHeader.hasBackground;
67220
- if (isStrCiEqual(this.showProgressBar, "aboveHeader")) {
67221
- isBelowHeader = false;
67222
- }
67223
- if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
67224
- isBelowHeader = true;
67225
- }
67226
- if (container === "header" && !isBelowHeader) {
67227
- layoutElement.index = -150;
67228
- if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
67229
- containerLayoutElements.push(layoutElement);
67272
+ if (this.questionsOnPageMode != "singlePage") {
67273
+ var headerLayoutElement = this.findLayoutElement("advanced-header");
67274
+ var advHeader = headerLayoutElement && headerLayoutElement.data;
67275
+ var isBelowHeader = !advHeader || advHeader.hasBackground;
67276
+ if (isStrCiEqual(this.showProgressBar, "aboveHeader")) {
67277
+ isBelowHeader = false;
67230
67278
  }
67231
- }
67232
- if (container === "center" && isBelowHeader) {
67233
- if (!!layoutElement.index) {
67234
- delete layoutElement.index;
67279
+ if (isStrCiEqual(this.showProgressBar, "belowHeader")) {
67280
+ isBelowHeader = true;
67235
67281
  }
67236
- if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
67237
- containerLayoutElements.push(layoutElement);
67282
+ if (container === "header" && !isBelowHeader) {
67283
+ layoutElement.index = -150;
67284
+ if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
67285
+ containerLayoutElements.push(layoutElement);
67286
+ }
67238
67287
  }
67239
- }
67240
- if (container === "footer") {
67241
- if (this.isShowProgressBarOnBottom && !this.isShowStartingPage) {
67242
- containerLayoutElements.push(layoutElement);
67288
+ if (container === "center" && isBelowHeader) {
67289
+ if (!!layoutElement.index) {
67290
+ delete layoutElement.index;
67291
+ }
67292
+ if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
67293
+ containerLayoutElements.push(layoutElement);
67294
+ }
67295
+ }
67296
+ if (container === "footer") {
67297
+ if (this.isShowProgressBarOnBottom && !this.isShowStartingPage) {
67298
+ containerLayoutElements.push(layoutElement);
67299
+ }
67243
67300
  }
67244
67301
  }
67245
67302
  }