survey-core 1.10.4 → 1.10.5

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 (230) hide show
  1. package/defaultV2.css +4 -1
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +4 -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 +162 -91
  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/defaultCss/defaultV2Css.d.ts +1 -0
  210. package/ts3.4/typings/question.d.ts +4 -1
  211. package/ts3.4/typings/question_baseselect.d.ts +1 -1
  212. package/ts3.4/typings/question_dropdown.d.ts +1 -1
  213. package/ts3.4/typings/question_file.d.ts +1 -1
  214. package/ts3.4/typings/question_matrixdropdownbase.d.ts +7 -3
  215. package/ts3.4/typings/question_matrixdynamic.d.ts +1 -2
  216. package/ts3.4/typings/question_rating.d.ts +1 -0
  217. package/ts3.4/typings/question_signaturepad.d.ts +1 -1
  218. package/ts3.4/typings/question_tagbox.d.ts +1 -1
  219. package/ts3.4/typings/survey.d.ts +1 -1
  220. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  221. package/typings/question.d.ts +4 -1
  222. package/typings/question_baseselect.d.ts +1 -1
  223. package/typings/question_dropdown.d.ts +1 -1
  224. package/typings/question_file.d.ts +1 -1
  225. package/typings/question_matrixdropdownbase.d.ts +7 -3
  226. package/typings/question_matrixdynamic.d.ts +1 -2
  227. package/typings/question_rating.d.ts +1 -0
  228. package/typings/question_signaturepad.d.ts +1 -1
  229. package/typings/question_tagbox.d.ts +1 -1
  230. package/typings/survey.d.ts +1 -1
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.10.4
2
+ * surveyjs - Survey JavaScript library v1.10.5
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
  */
@@ -5430,6 +5430,7 @@ var defaultV2Css = {
5430
5430
  rootFitToContainer: "sd-root-modern--full-container",
5431
5431
  rootWrapper: "sd-root-modern__wrapper",
5432
5432
  rootWrapperFixed: "sd-root-modern__wrapper--fixed",
5433
+ rootWrapperHasImage: "sd-root-modern__wrapper--has-image",
5433
5434
  rootBackgroundImage: "sd-root_background-image",
5434
5435
  container: "sd-container-modern",
5435
5436
  header: "sd-title sd-container-modern__title",
@@ -8530,7 +8531,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8530
8531
  this.changeSelectionWithKeyboard(false);
8531
8532
  };
8532
8533
  DropdownListModel.prototype.onClear = function (event) {
8533
- this.question.clearValue();
8534
+ this.question.clearValue(true);
8534
8535
  this._popupModel.isVisible = false;
8535
8536
  if (event) {
8536
8537
  event.preventDefault();
@@ -9713,8 +9714,8 @@ __webpack_require__.r(__webpack_exports__);
9713
9714
 
9714
9715
  var Version;
9715
9716
  var ReleaseDate;
9716
- Version = "" + "1.10.4";
9717
- ReleaseDate = "" + "2024-05-15";
9717
+ Version = "" + "1.10.5";
9718
+ ReleaseDate = "" + "2024-05-20";
9718
9719
  function checkLibraryVersion(ver, libraryName) {
9719
9720
  if (Version != ver) {
9720
9721
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -29992,15 +29993,18 @@ var Question = /** @class */ (function (_super) {
29992
29993
  * @see value
29993
29994
  * @see comment
29994
29995
  */
29995
- Question.prototype.clearValue = function () {
29996
+ Question.prototype.clearValue = function (keepComment) {
29996
29997
  if (this.value !== undefined) {
29997
29998
  this.value = undefined;
29998
29999
  }
29999
- if (!!this.comment) {
30000
+ if (!!this.comment && keepComment !== true) {
30000
30001
  this.comment = undefined;
30001
30002
  }
30002
30003
  this.setValueChangedDirectly(false);
30003
30004
  };
30005
+ Question.prototype.clearValueOnly = function () {
30006
+ this.clearValue(true);
30007
+ };
30004
30008
  Question.prototype.unbindValue = function () {
30005
30009
  this.clearValue();
30006
30010
  };
@@ -30684,6 +30688,8 @@ var Question = /** @class */ (function (_super) {
30684
30688
  return new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
30685
30689
  };
30686
30690
  Question.prototype.removeError = function (error) {
30691
+ if (!error)
30692
+ return;
30687
30693
  var errors = this.errors;
30688
30694
  var index = errors.indexOf(error);
30689
30695
  if (index !== -1)
@@ -31128,14 +31134,18 @@ var Question = /** @class */ (function (_super) {
31128
31134
  Question.prototype.getDesktopRenderAs = function () {
31129
31135
  return "default";
31130
31136
  };
31137
+ Question.prototype.onBeforeSetCompactRenderer = function () { };
31138
+ Question.prototype.onBeforeSetDesktopRenderer = function () { };
31131
31139
  Question.prototype.processResponsiveness = function (requiredWidth, availableWidth) {
31132
31140
  availableWidth = Math.round(availableWidth);
31133
31141
  if (Math.abs(requiredWidth - availableWidth) > 2) {
31134
31142
  var oldRenderAs = this.renderAs;
31135
31143
  if (requiredWidth > availableWidth) {
31144
+ this.onBeforeSetCompactRenderer();
31136
31145
  this.renderAs = this.getCompactRenderAs();
31137
31146
  }
31138
31147
  else {
31148
+ this.onBeforeSetDesktopRenderer();
31139
31149
  this.renderAs = this.getDesktopRenderAs();
31140
31150
  }
31141
31151
  return oldRenderAs !== this.renderAs;
@@ -32364,8 +32374,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32364
32374
  this.isSettingComment = false;
32365
32375
  }
32366
32376
  };
32367
- QuestionSelectBase.prototype.clearValue = function () {
32368
- _super.prototype.clearValue.call(this);
32377
+ QuestionSelectBase.prototype.clearValue = function (keepComment) {
32378
+ _super.prototype.clearValue.call(this, keepComment);
32369
32379
  this.prevOtherValue = undefined;
32370
32380
  };
32371
32381
  QuestionSelectBase.prototype.updateCommentFromSurvey = function (newValue) {
@@ -32622,6 +32632,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32622
32632
  this.isLockVisibleChoices = !!question && question.name === val;
32623
32633
  if (!!question && question.name !== val) {
32624
32634
  question.removeDependedQuestion(this);
32635
+ if (this.isDesignMode && !this.isLoadingFromJson && !!val) {
32636
+ this.setPropertyValue("choicesFromQuestion", undefined);
32637
+ }
32625
32638
  }
32626
32639
  this.setPropertyValue("choicesFromQuestion", val);
32627
32640
  this.isLockVisibleChoices = false;
@@ -33571,7 +33584,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
33571
33584
  QuestionSelectBase.prototype.clearIncorrectValuesCore = function () {
33572
33585
  var val = this.value;
33573
33586
  if (this.canClearValueAnUnknown(val)) {
33574
- this.clearValue();
33587
+ this.clearValue(true);
33575
33588
  }
33576
33589
  };
33577
33590
  QuestionSelectBase.prototype.canClearValueAnUnknown = function (val) {
@@ -33581,7 +33594,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
33581
33594
  };
33582
33595
  QuestionSelectBase.prototype.clearDisabledValuesCore = function () {
33583
33596
  if (this.isValueDisabled(this.value)) {
33584
- this.clearValue();
33597
+ this.clearValue(true);
33585
33598
  }
33586
33599
  };
33587
33600
  QuestionSelectBase.prototype.clearUnusedValues = function () {
@@ -35009,7 +35022,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
35009
35022
  this.selectAll();
35010
35023
  }
35011
35024
  else {
35012
- this.clearValue();
35025
+ this.clearValue(true);
35013
35026
  }
35014
35027
  },
35015
35028
  enumerable: false,
@@ -35421,7 +35434,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
35421
35434
  this.value = null;
35422
35435
  }
35423
35436
  else {
35424
- this.clearValue();
35437
+ this.clearValue(true);
35425
35438
  }
35426
35439
  }
35427
35440
  this.isChangingValueOnClearIncorrect = false;
@@ -35452,7 +35465,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
35452
35465
  return;
35453
35466
  this.isChangingValueOnClearIncorrect = true;
35454
35467
  if (newValue.length == 0) {
35455
- this.clearValue();
35468
+ this.clearValue(true);
35456
35469
  }
35457
35470
  else {
35458
35471
  this.value = newValue;
@@ -37358,9 +37371,9 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37358
37371
  QuestionDropdownModel.prototype.getInputId = function () {
37359
37372
  return this.inputId + "_0";
37360
37373
  };
37361
- QuestionDropdownModel.prototype.clearValue = function () {
37374
+ QuestionDropdownModel.prototype.clearValue = function (keepComment) {
37362
37375
  var _a;
37363
- _super.prototype.clearValue.call(this);
37376
+ _super.prototype.clearValue.call(this, keepComment);
37364
37377
  this.lastSelectedItemValue = null;
37365
37378
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
37366
37379
  };
@@ -37370,7 +37383,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37370
37383
  QuestionDropdownModel.prototype.onKeyUp = function (event) {
37371
37384
  var char = event.which || event.keyCode;
37372
37385
  if (char === 46) {
37373
- this.clearValue();
37386
+ this.clearValue(true);
37374
37387
  event.preventDefault();
37375
37388
  event.stopPropagation();
37376
37389
  }
@@ -38191,9 +38204,9 @@ var QuestionFileModelBase = /** @class */ (function (_super) {
38191
38204
  enumerable: false,
38192
38205
  configurable: true
38193
38206
  });
38194
- QuestionFileModelBase.prototype.clearValue = function () {
38207
+ QuestionFileModelBase.prototype.clearValue = function (keepComment) {
38195
38208
  this.clearOnDeletingContainer();
38196
- _super.prototype.clearValue.call(this);
38209
+ _super.prototype.clearValue.call(this, keepComment);
38197
38210
  };
38198
38211
  QuestionFileModelBase.prototype.clearOnDeletingContainer = function () {
38199
38212
  if (!this.survey)
@@ -40100,7 +40113,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
40100
40113
  if (!val)
40101
40114
  return;
40102
40115
  if (!Array.isArray(val) || val.length == 0) {
40103
- this.clearValue();
40116
+ this.clearValue(true);
40104
40117
  return;
40105
40118
  }
40106
40119
  var newValue = [];
@@ -40112,7 +40125,7 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
40112
40125
  if (newValue.length == val.length)
40113
40126
  return;
40114
40127
  if (newValue.length == 0) {
40115
- this.clearValue();
40128
+ this.clearValue(true);
40116
40129
  }
40117
40130
  else {
40118
40131
  this.value = newValue;
@@ -42050,10 +42063,10 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
42050
42063
  this.detailPanel.runCondition(values, newProps);
42051
42064
  }
42052
42065
  };
42053
- MatrixDropdownRowModelBase.prototype.clearValue = function () {
42066
+ MatrixDropdownRowModelBase.prototype.clearValue = function (keepComment) {
42054
42067
  var questions = this.questions;
42055
42068
  for (var i = 0; i < questions.length; i++) {
42056
- questions[i].clearValue();
42069
+ questions[i].clearValue(keepComment);
42057
42070
  }
42058
42071
  };
42059
42072
  MatrixDropdownRowModelBase.prototype.onAnyValueChanged = function (name, questionName) {
@@ -43459,23 +43472,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43459
43472
  QuestionMatrixDropdownModelBase.prototype.checkIfValueInRowDuplicated = function (checkedRow, cellQuestion) {
43460
43473
  if (!this.generatedVisibleRows)
43461
43474
  return false;
43462
- var res = false;
43463
- for (var i = 0; i < this.generatedVisibleRows.length; i++) {
43464
- var row = this.generatedVisibleRows[i];
43465
- if (checkedRow === row)
43466
- continue;
43467
- if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(row.getValue(cellQuestion.name), cellQuestion.value, true, this.isUniqueCaseSensitive)) {
43468
- res = true;
43469
- break;
43470
- }
43471
- }
43472
- if (res) {
43473
- this.addDuplicationError(cellQuestion);
43474
- }
43475
- else {
43476
- cellQuestion.clearErrors();
43477
- }
43478
- return res;
43475
+ return this.isValueInColumnDuplicated(cellQuestion.name, true, checkedRow);
43479
43476
  };
43480
43477
  /**
43481
43478
  * Assigns values to a row.
@@ -43813,51 +43810,104 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43813
43810
  QuestionMatrixDropdownModelBase.prototype.isValueDuplicated = function () {
43814
43811
  if (!this.generatedVisibleRows)
43815
43812
  return false;
43816
- var columns = this.getUniqueColumns();
43813
+ var names = this.getUniqueColumnsNames();
43817
43814
  var res = false;
43818
- for (var i = 0; i < columns.length; i++) {
43819
- res = this.isValueInColumnDuplicated(columns[i]) || res;
43820
- }
43821
- return res;
43822
- };
43823
- QuestionMatrixDropdownModelBase.prototype.isValueInColumnDuplicated = function (column) {
43824
- var keyValues = [];
43825
- var res = false;
43826
- for (var i = 0; i < this.generatedVisibleRows.length; i++) {
43827
- res =
43828
- this.isValueDuplicatedInRow(this.generatedVisibleRows[i], column, keyValues) || res;
43815
+ for (var i = 0; i < names.length; i++) {
43816
+ res = this.isValueInColumnDuplicated(names[i], true) || res;
43829
43817
  }
43830
43818
  return res;
43831
43819
  };
43832
- QuestionMatrixDropdownModelBase.prototype.getUniqueColumns = function () {
43820
+ QuestionMatrixDropdownModelBase.prototype.getUniqueColumnsNames = function () {
43833
43821
  var res = new Array();
43834
43822
  for (var i = 0; i < this.columns.length; i++) {
43835
43823
  if (this.columns[i].isUnique) {
43836
- res.push(this.columns[i]);
43824
+ res.push(this.columns[i].name);
43837
43825
  }
43838
43826
  }
43839
43827
  return res;
43840
43828
  };
43841
- QuestionMatrixDropdownModelBase.prototype.isValueDuplicatedInRow = function (row, column, keyValues) {
43842
- var question = row.getQuestionByColumn(column);
43843
- if (!question || question.isEmpty())
43844
- return false;
43845
- var value = question.value;
43846
- for (var i = 0; i < keyValues.length; i++) {
43847
- if (_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isTwoValueEquals(value, keyValues[i], true, this.isUniqueCaseSensitive)) {
43848
- this.addDuplicationError(question);
43849
- return true;
43829
+ QuestionMatrixDropdownModelBase.prototype.isValueInColumnDuplicated = function (columnName, showErrors, row) {
43830
+ var rows = this.getDuplicatedRows(columnName);
43831
+ if (showErrors) {
43832
+ this.showDuplicatedErrorsInRows(rows, columnName);
43833
+ }
43834
+ this.removeDuplicatedErrorsInRows(rows, columnName);
43835
+ return !!row ? rows.indexOf(row) > -1 : rows.length > 0;
43836
+ };
43837
+ QuestionMatrixDropdownModelBase.prototype.getDuplicatedRows = function (columnName) {
43838
+ var keyValues = {};
43839
+ var res = [];
43840
+ var rows = this.generatedVisibleRows;
43841
+ for (var i = 0; i < rows.length; i++) {
43842
+ var val = undefined;
43843
+ var question = rows[i].getQuestionByName(columnName);
43844
+ if (!!question) {
43845
+ val = question.value;
43846
+ }
43847
+ else {
43848
+ var rowVal = this.getRowValue(i);
43849
+ val = !!rowVal ? rowVal[columnName] : undefined;
43850
+ }
43851
+ if (!this.isValueEmpty(val)) {
43852
+ if (!this.isUniqueCaseSensitive && typeof val === "string") {
43853
+ val = val.toLocaleLowerCase();
43854
+ }
43855
+ if (!keyValues[val]) {
43856
+ keyValues[val] = [];
43857
+ }
43858
+ keyValues[val].push(rows[i]);
43850
43859
  }
43851
43860
  }
43852
- keyValues.push(value);
43853
- return false;
43861
+ for (var key in keyValues) {
43862
+ if (keyValues[key].length > 1) {
43863
+ keyValues[key].forEach(function (row) { return res.push(row); });
43864
+ }
43865
+ }
43866
+ return res;
43867
+ };
43868
+ QuestionMatrixDropdownModelBase.prototype.showDuplicatedErrorsInRows = function (duplicatedRows, columnName) {
43869
+ var _this = this;
43870
+ duplicatedRows.forEach(function (row) {
43871
+ var question = row.getQuestionByName(columnName);
43872
+ if (!question && _this.detailPanel.getQuestionByName(columnName)) {
43873
+ row.showDetailPanel();
43874
+ if (row.detailPanel) {
43875
+ question = row.detailPanel.getQuestionByName(columnName);
43876
+ }
43877
+ }
43878
+ if (question) {
43879
+ row.showDetailPanel();
43880
+ _this.addDuplicationError(question);
43881
+ }
43882
+ });
43883
+ };
43884
+ QuestionMatrixDropdownModelBase.prototype.removeDuplicatedErrorsInRows = function (duplicatedRows, columnName) {
43885
+ var _this = this;
43886
+ this.generatedVisibleRows.forEach(function (row) {
43887
+ if (duplicatedRows.indexOf(row) < 0) {
43888
+ var question = row.getQuestionByName(columnName);
43889
+ if (question) {
43890
+ _this.removeDuplicationError(question);
43891
+ }
43892
+ }
43893
+ });
43894
+ };
43895
+ QuestionMatrixDropdownModelBase.prototype.getDuplicationError = function (question) {
43896
+ var errors = question.errors;
43897
+ for (var i = 0; i < errors.length; i++) {
43898
+ if (errors[i].getErrorType() === "keyduplicationerror")
43899
+ return errors[i];
43900
+ }
43901
+ return null;
43854
43902
  };
43855
43903
  QuestionMatrixDropdownModelBase.prototype.addDuplicationError = function (question) {
43856
- var keyError = question.errors.find(function (error) { return error.getErrorType() === "keyduplicationerror"; });
43857
- if (!keyError) {
43904
+ if (!this.getDuplicationError(question)) {
43858
43905
  question.addError(new _error__WEBPACK_IMPORTED_MODULE_10__["KeyDuplicationError"](this.keyDuplicationError, this));
43859
43906
  }
43860
43907
  };
43908
+ QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (question) {
43909
+ question.removeError(this.getDuplicationError(question));
43910
+ };
43861
43911
  QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
43862
43912
  return this.getFirstCellQuestion(withError);
43863
43913
  };
@@ -44003,6 +44053,9 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
44003
44053
  this.onCellValueChanged(row, columnName, combine.rowValue);
44004
44054
  }
44005
44055
  }
44056
+ if (this.getUniqueColumnsNames().indexOf(columnName) > -1) {
44057
+ this.isValueInColumnDuplicated(columnName, !!rowObj);
44058
+ }
44006
44059
  };
44007
44060
  QuestionMatrixDropdownModelBase.prototype.getNewValueOnRowChanged = function (row, columnName, newRowValue, isDeletingValue, newValue) {
44008
44061
  var rowValue = this.getRowValueCore(row, newValue, true);
@@ -47563,13 +47616,11 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
47563
47616
  }
47564
47617
  return setRowCount < this.minRowCount;
47565
47618
  };
47566
- QuestionMatrixDynamicModel.prototype.getUniqueColumns = function () {
47567
- var res = _super.prototype.getUniqueColumns.call(this);
47568
- if (!!this.keyName) {
47569
- var column = this.getColumnByName(this.keyName);
47570
- if (!!column && res.indexOf(column) < 0) {
47571
- res.push(column);
47572
- }
47619
+ QuestionMatrixDynamicModel.prototype.getUniqueColumnsNames = function () {
47620
+ var res = _super.prototype.getUniqueColumnsNames.call(this);
47621
+ var name = this.keyName;
47622
+ if (!!name && res.indexOf(name) < 0) {
47623
+ res.push(name);
47573
47624
  }
47574
47625
  return res;
47575
47626
  };
@@ -52126,7 +52177,7 @@ var QuestionRadiogroupModel = /** @class */ (function (_super) {
52126
52177
  var clearAction = new _actions_action__WEBPACK_IMPORTED_MODULE_3__["Action"]({
52127
52178
  title: this.clearButtonCaption,
52128
52179
  id: "sv-clr-btn-" + this.id,
52129
- action: function () { _this.clearValue(); },
52180
+ action: function () { _this.clearValue(true); },
52130
52181
  innerCss: this.cssClasses.clearButton,
52131
52182
  visible: new _base__WEBPACK_IMPORTED_MODULE_4__["ComputedUpdater"](function () { return _this.canShowClearButton; })
52132
52183
  });
@@ -52343,7 +52394,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
52343
52394
  _this.createNewArray("rankingChoices");
52344
52395
  _this.createNewArray("unRankingChoices");
52345
52396
  _this.registerFunctionOnPropertyValueChanged("selectToRankEnabled", function () {
52346
- _this.clearValue();
52397
+ _this.clearValue(true);
52347
52398
  _this.setDragDropRankingChoices();
52348
52399
  _this.updateRankingChoicesSync();
52349
52400
  });
@@ -52958,8 +53009,9 @@ __webpack_require__.r(__webpack_exports__);
52958
53009
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
52959
53010
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./base */ "./src/base.ts");
52960
53011
  /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
52961
- /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
52962
- /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
53012
+ /* harmony import */ var _dropdownListModel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./dropdownListModel */ "./src/dropdownListModel.ts");
53013
+ /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
53014
+ /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
52963
53015
  var __extends = (undefined && undefined.__extends) || (function () {
52964
53016
  var extendStatics = function (d, b) {
52965
53017
  extendStatics = Object.setPrototypeOf ||
@@ -52992,6 +53044,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
52992
53044
 
52993
53045
 
52994
53046
 
53047
+
52995
53048
  var RenderedRatingItem = /** @class */ (function (_super) {
52996
53049
  __extends(RenderedRatingItem, _super);
52997
53050
  function RenderedRatingItem(itemValue, locString) {
@@ -53283,19 +53336,19 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53283
53336
  QuestionRatingModel.prototype.updateColors = function (themeVariables) {
53284
53337
  if (this.colorMode === "monochrome")
53285
53338
  return;
53286
- if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_10__["DomDocumentHelper"].isAvailable())
53339
+ if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].isAvailable())
53287
53340
  return;
53288
53341
  if (QuestionRatingModel.colorsCalculated)
53289
53342
  return;
53290
53343
  function getRGBColor(colorName, varName) {
53291
53344
  var str = !!themeVariables && themeVariables[colorName];
53292
53345
  if (!str) {
53293
- var style = getComputedStyle(_global_variables_utils__WEBPACK_IMPORTED_MODULE_10__["DomDocumentHelper"].getDocumentElement());
53346
+ var style = getComputedStyle(_global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].getDocumentElement());
53294
53347
  str = style.getPropertyValue && style.getPropertyValue(varName);
53295
53348
  }
53296
53349
  if (!str)
53297
53350
  return null;
53298
- var canvasElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_10__["DomDocumentHelper"].createElement("canvas");
53351
+ var canvasElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_11__["DomDocumentHelper"].createElement("canvas");
53299
53352
  if (!canvasElement)
53300
53353
  return null;
53301
53354
  var ctx = canvasElement.getContext("2d");
@@ -53567,7 +53620,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53567
53620
  };
53568
53621
  QuestionRatingModel.prototype.setValueFromClick = function (value) {
53569
53622
  if (this.value === parseFloat(value)) {
53570
- this.clearValue();
53623
+ this.clearValue(true);
53571
53624
  }
53572
53625
  else {
53573
53626
  this.value = value;
@@ -53577,7 +53630,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53577
53630
  }
53578
53631
  };
53579
53632
  QuestionRatingModel.prototype.onItemMouseIn = function (item) {
53580
- if (_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"])
53633
+ if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"])
53581
53634
  return;
53582
53635
  if (this.isReadOnly || !item.itemValue.isEnabled || this.isDesignMode)
53583
53636
  return;
@@ -53596,7 +53649,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53596
53649
  }
53597
53650
  };
53598
53651
  QuestionRatingModel.prototype.onItemMouseOut = function (item) {
53599
- if (_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"])
53652
+ if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"])
53600
53653
  return;
53601
53654
  this.renderedRateItems.forEach(function (item) { return item.highlight = "none"; });
53602
53655
  };
@@ -53867,6 +53920,11 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53867
53920
  QuestionRatingModel.prototype.supportResponsiveness = function () {
53868
53921
  return true;
53869
53922
  };
53923
+ QuestionRatingModel.prototype.onBeforeSetCompactRenderer = function () {
53924
+ if (!this.dropdownListModelValue) {
53925
+ this.dropdownListModel = new _dropdownListModel__WEBPACK_IMPORTED_MODULE_9__["DropdownListModel"](this);
53926
+ }
53927
+ };
53870
53928
  QuestionRatingModel.prototype.getCompactRenderAs = function () {
53871
53929
  return (this.displayMode == "buttons") ? "default" : "dropdown";
53872
53930
  };
@@ -53886,6 +53944,9 @@ var QuestionRatingModel = /** @class */ (function (_super) {
53886
53944
  });
53887
53945
  Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
53888
53946
  get: function () {
53947
+ if (this.renderAs === "dropdown") {
53948
+ this.onBeforeSetCompactRenderer();
53949
+ }
53889
53950
  return this.dropdownListModelValue;
53890
53951
  },
53891
53952
  set: function (val) {
@@ -54531,9 +54592,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
54531
54592
  this.value = (arg === null || arg === void 0 ? void 0 : arg.length) ? arg.map(function (r) { return r.content; })[0] : undefined;
54532
54593
  this.valueIsUpdatingInternally = false;
54533
54594
  };
54534
- QuestionSignaturePadModel.prototype.clearValue = function () {
54595
+ QuestionSignaturePadModel.prototype.clearValue = function (keepComment) {
54535
54596
  this.valueWasChangedFromLastUpload = false;
54536
- _super.prototype.clearValue.call(this);
54597
+ _super.prototype.clearValue.call(this, keepComment);
54537
54598
  this.refreshCanvas();
54538
54599
  };
54539
54600
  QuestionSignaturePadModel.prototype.endLoadingFromJson = function () {
@@ -54929,9 +54990,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
54929
54990
  this.dropdownListModel.dispose();
54930
54991
  }
54931
54992
  };
54932
- QuestionTagboxModel.prototype.clearValue = function () {
54993
+ QuestionTagboxModel.prototype.clearValue = function (keepComment) {
54933
54994
  var _a;
54934
- _super.prototype.clearValue.call(this);
54995
+ _super.prototype.clearValue.call(this, keepComment);
54935
54996
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
54936
54997
  };
54937
54998
  Object.defineProperty(QuestionTagboxModel.prototype, "showClearButton", {
@@ -61596,7 +61657,8 @@ var SurveyModel = /** @class */ (function (_super) {
61596
61657
  SurveyModel.prototype.updateWrapperFormCss = function () {
61597
61658
  this.wrapperFormCss = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
61598
61659
  .append(this.css.rootWrapper)
61599
- .append(this.css.rootWrapperFixed, this.backgroundImageAttachment === "fixed")
61660
+ .append(this.css.rootWrapperHasImage, !!this.backgroundImage)
61661
+ .append(this.css.rootWrapperFixed, !!this.backgroundImage && this.backgroundImageAttachment === "fixed")
61600
61662
  .toString();
61601
61663
  };
61602
61664
  Object.defineProperty(SurveyModel.prototype, "completedHtml", {
@@ -65354,7 +65416,7 @@ var SurveyModel = /** @class */ (function (_super) {
65354
65416
  page.name = name;
65355
65417
  return page;
65356
65418
  };
65357
- SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue) {
65419
+ SurveyModel.prototype.questionOnValueChanging = function (valueName, newValue, questionValueName) {
65358
65420
  if (!!this.editingObj) {
65359
65421
  var prop = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findProperty(this.editingObj.getType(), valueName);
65360
65422
  if (!!prop)
@@ -65364,7 +65426,7 @@ var SurveyModel = /** @class */ (function (_super) {
65364
65426
  return newValue;
65365
65427
  var options = {
65366
65428
  name: valueName,
65367
- question: this.getQuestionByValueName(valueName),
65429
+ question: this.getQuestionByValueName(questionValueName || valueName),
65368
65430
  value: this.getUnbindValue(newValue),
65369
65431
  oldValue: this.getValue(valueName),
65370
65432
  };
@@ -66319,6 +66381,7 @@ var SurveyModel = /** @class */ (function (_super) {
66319
66381
  if (this.isTwoValueEquals(newValue, this.getComment(name)))
66320
66382
  return;
66321
66383
  var commentName = name + this.commentSuffix;
66384
+ newValue = this.questionOnValueChanging(commentName, newValue, name);
66322
66385
  if (this.isValueEmpty(newValue)) {
66323
66386
  this.deleteDataValueCore(this.valuesHash, commentName);
66324
66387
  }
@@ -66345,6 +66408,10 @@ var SurveyModel = /** @class */ (function (_super) {
66345
66408
  question: question,
66346
66409
  value: newValue,
66347
66410
  });
66411
+ question.comment = newValue;
66412
+ if (question.comment != newValue) {
66413
+ question.comment = newValue;
66414
+ }
66348
66415
  }
66349
66416
  };
66350
66417
  /**
@@ -67492,7 +67559,11 @@ var SurveyModel = /** @class */ (function (_super) {
67492
67559
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
67493
67560
  ], SurveyModel.prototype, "_isCompact", void 0);
67494
67561
  __decorate([
67495
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
67562
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({
67563
+ onSet: function (newValue, target) {
67564
+ target.updateCss();
67565
+ }
67566
+ })
67496
67567
  ], SurveyModel.prototype, "backgroundImage", void 0);
67497
67568
  __decorate([
67498
67569
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()