survey-core 1.9.130 → 1.9.132

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 (236) hide show
  1. package/defaultV2.css +22 -2
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +22 -2
  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 +15 -1
  112. package/modern.css.map +1 -1
  113. package/modern.fontless.css +15 -1
  114. package/modern.fontless.css.map +1 -1
  115. package/modern.fontless.min.css +2 -2
  116. package/modern.min.css +2 -2
  117. package/package.json +1 -1
  118. package/plugins/bootstrap-integration.js +1 -1
  119. package/plugins/bootstrap-integration.min.js +1 -1
  120. package/plugins/bootstrap-material-integration.js +1 -1
  121. package/plugins/bootstrap-material-integration.min.js +1 -1
  122. package/survey.core.js +151 -33
  123. package/survey.core.js.map +1 -1
  124. package/survey.core.min.js +3 -3
  125. package/survey.css +1 -1
  126. package/survey.i18n.js +1 -1
  127. package/survey.i18n.min.js +1 -1
  128. package/survey.min.css +1 -1
  129. package/themes/borderless-dark-panelless.js +1 -1
  130. package/themes/borderless-dark-panelless.min.js +1 -1
  131. package/themes/borderless-dark.js +1 -1
  132. package/themes/borderless-dark.min.js +1 -1
  133. package/themes/borderless-light-panelless..js +1 -1
  134. package/themes/borderless-light-panelless..min.js +1 -1
  135. package/themes/borderless-light.js +1 -1
  136. package/themes/borderless-light.min.js +1 -1
  137. package/themes/contrast-dark-panelless.js +1 -1
  138. package/themes/contrast-dark-panelless.min.js +1 -1
  139. package/themes/contrast-dark.js +1 -1
  140. package/themes/contrast-dark.min.js +1 -1
  141. package/themes/contrast-light-panelless.js +1 -1
  142. package/themes/contrast-light-panelless.min.js +1 -1
  143. package/themes/contrast-light.js +1 -1
  144. package/themes/contrast-light.min.js +1 -1
  145. package/themes/default-dark-panelless.js +1 -1
  146. package/themes/default-dark-panelless.min.js +1 -1
  147. package/themes/default-dark.js +1 -1
  148. package/themes/default-dark.min.js +1 -1
  149. package/themes/default-light-panelless.js +1 -1
  150. package/themes/default-light-panelless.min.js +1 -1
  151. package/themes/default-light.js +1 -1
  152. package/themes/default-light.min.js +1 -1
  153. package/themes/doubleborder-dark-panelless.js +1 -1
  154. package/themes/doubleborder-dark-panelless.min.js +1 -1
  155. package/themes/doubleborder-dark.js +1 -1
  156. package/themes/doubleborder-dark.min.js +1 -1
  157. package/themes/doubleborder-light-panelles.js +1 -1
  158. package/themes/doubleborder-light-panelles.min.js +1 -1
  159. package/themes/doubleborder-light.js +1 -1
  160. package/themes/doubleborder-light.min.js +1 -1
  161. package/themes/flat-dark-panelless.js +1 -1
  162. package/themes/flat-dark-panelless.min.js +1 -1
  163. package/themes/flat-dark.js +1 -1
  164. package/themes/flat-dark.min.js +1 -1
  165. package/themes/flat-light-panelless.js +1 -1
  166. package/themes/flat-light-panelless.min.js +1 -1
  167. package/themes/flat-light.js +1 -1
  168. package/themes/flat-light.min.js +1 -1
  169. package/themes/index.js +1 -1
  170. package/themes/index.min.js +1 -1
  171. package/themes/layered-dark-panelless.js +1 -1
  172. package/themes/layered-dark-panelless.min.js +1 -1
  173. package/themes/layered-dark.js +1 -1
  174. package/themes/layered-dark.min.js +1 -1
  175. package/themes/layered-light-panelless.js +1 -1
  176. package/themes/layered-light-panelless.min.js +1 -1
  177. package/themes/layered-light.js +1 -1
  178. package/themes/layered-light.min.js +1 -1
  179. package/themes/plain-dark-panelless.js +1 -1
  180. package/themes/plain-dark-panelless.min.js +1 -1
  181. package/themes/plain-dark.js +1 -1
  182. package/themes/plain-dark.min.js +1 -1
  183. package/themes/plain-light-panelless.js +1 -1
  184. package/themes/plain-light-panelless.min.js +1 -1
  185. package/themes/plain-light.js +1 -1
  186. package/themes/plain-light.min.js +1 -1
  187. package/themes/sharp-dark-panelless.js +1 -1
  188. package/themes/sharp-dark-panelless.min.js +1 -1
  189. package/themes/sharp-dark.js +1 -1
  190. package/themes/sharp-dark.min.js +1 -1
  191. package/themes/sharp-light-panelless.js +1 -1
  192. package/themes/sharp-light-panelless.min.js +1 -1
  193. package/themes/sharp-light.js +1 -1
  194. package/themes/sharp-light.min.js +1 -1
  195. package/themes/solid-dark-panelless.js +1 -1
  196. package/themes/solid-dark-panelless.min.js +1 -1
  197. package/themes/solid-dark.js +1 -1
  198. package/themes/solid-dark.min.js +1 -1
  199. package/themes/solid-light-panelless.js +1 -1
  200. package/themes/solid-light-panelless.min.js +1 -1
  201. package/themes/solid-light.js +1 -1
  202. package/themes/solid-light.min.js +1 -1
  203. package/themes/three-dimensional-dark-panelless.js +1 -1
  204. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  205. package/themes/three-dimensional-dark.js +1 -1
  206. package/themes/three-dimensional-dark.min.js +1 -1
  207. package/themes/three-dimensional-light-panelless.js +1 -1
  208. package/themes/three-dimensional-light-panelless.min.js +1 -1
  209. package/themes/three-dimensional-light.js +1 -1
  210. package/themes/three-dimensional-light.min.js +1 -1
  211. package/ts3.4/typings/base.d.ts +1 -1
  212. package/ts3.4/typings/dropdownListModel.d.ts +1 -0
  213. package/ts3.4/typings/entries/chunks/model.d.ts +1 -1
  214. package/ts3.4/typings/jsonobject.d.ts +55 -5
  215. package/ts3.4/typings/localizablestring.d.ts +2 -0
  216. package/ts3.4/typings/question.d.ts +5 -1
  217. package/ts3.4/typings/questionCustomWidgets.d.ts +1 -0
  218. package/ts3.4/typings/question_custom.d.ts +2 -0
  219. package/ts3.4/typings/question_multipletext.d.ts +1 -0
  220. package/ts3.4/typings/question_tagbox.d.ts +10 -0
  221. package/ts3.4/typings/settings.d.ts +1 -1
  222. package/ts3.4/typings/survey-element.d.ts +1 -0
  223. package/ts3.4/typings/utils/utils.d.ts +3 -1
  224. package/typings/base.d.ts +1 -1
  225. package/typings/dropdownListModel.d.ts +1 -0
  226. package/typings/entries/chunks/model.d.ts +1 -1
  227. package/typings/jsonobject.d.ts +55 -5
  228. package/typings/localizablestring.d.ts +2 -0
  229. package/typings/question.d.ts +5 -1
  230. package/typings/questionCustomWidgets.d.ts +1 -0
  231. package/typings/question_custom.d.ts +2 -0
  232. package/typings/question_multipletext.d.ts +1 -0
  233. package/typings/question_tagbox.d.ts +10 -0
  234. package/typings/settings.d.ts +1 -1
  235. package/typings/survey-element.d.ts +1 -0
  236. package/typings/utils/utils.d.ts +3 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.130
2
+ * surveyjs - Survey JavaScript library v1.9.132
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
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.130
2
+ * surveyjs - Survey JavaScript library v1.9.132
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
  */
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.130
2
+ * surveyjs - Survey JavaScript library v1.9.132
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
  */
@@ -5570,7 +5570,7 @@ var defaultV2Css = {
5570
5570
  expanded: "sd-element--expanded",
5571
5571
  nested: "sd-element--nested",
5572
5572
  invisible: "sd-element--invisible",
5573
- composite: "sd-element--complex",
5573
+ composite: "sd-element--complex sd-composite",
5574
5574
  disabled: "sd-question--disabled",
5575
5575
  errorsContainer: "sd-element__erbox sd-question__erbox",
5576
5576
  errorsContainerTop: "sd-element__erbox--above-element sd-question__erbox--above-question",
@@ -7682,14 +7682,14 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7682
7682
  if (dragOverNode.dataset.ranking === "from-container" || dragOverNode.dataset.ranking === "to-container") {
7683
7683
  return dragOverNode;
7684
7684
  }
7685
- if (this.parentElement.isEmpty()) {
7685
+ if (this.parentElement.rankingChoices.length === 0 ||
7686
+ this.parentElement.unRankingChoices.length === 0) {
7686
7687
  var toContainer = dragOverNode.closest("[data-ranking='to-container']");
7687
7688
  var fromContainer = dragOverNode.closest("[data-ranking='from-container']");
7688
7689
  if (!!toContainer)
7689
7690
  return toContainer;
7690
7691
  if (!!fromContainer)
7691
7692
  return fromContainer;
7692
- return null;
7693
7693
  }
7694
7694
  return _super.prototype.findDropTargetNodeByDragOverNode.call(this, dragOverNode);
7695
7695
  };
@@ -7739,8 +7739,10 @@ var DragDropRankingSelectToRank = /** @class */ (function (_super) {
7739
7739
  DragDropRankingSelectToRank.prototype.getIndixies = function (model, fromChoicesArray, toChoicesArray) {
7740
7740
  var fromIndex = fromChoicesArray.indexOf(this.draggedElement);
7741
7741
  var toIndex = toChoicesArray.indexOf(this.dropTarget);
7742
- if (toIndex === -1)
7743
- toIndex = model.value.length;
7742
+ if (toIndex === -1) {
7743
+ var length_1 = model.value.length;
7744
+ toIndex = fromChoicesArray === toChoicesArray ? length_1 - 1 : length_1;
7745
+ }
7744
7746
  return { fromIndex: fromIndex, toIndex: toIndex };
7745
7747
  };
7746
7748
  DragDropRankingSelectToRank.prototype.doUIEffects = function (dropTargetNode, fromIndex, toIndex) {
@@ -8023,6 +8025,17 @@ var DropdownListModel = /** @class */ (function (_super) {
8023
8025
  DropdownListModel.prototype.getAvailableItems = function () {
8024
8026
  return this.question.visibleChoices;
8025
8027
  };
8028
+ DropdownListModel.prototype.setOnTextSearchCallbackForListModel = function (listModel) {
8029
+ var _this = this;
8030
+ listModel.setOnTextSearchCallback(function (item, textToSearch) {
8031
+ if (_this.filteredItems)
8032
+ return _this.filteredItems.indexOf(item) >= 0;
8033
+ var textInLow = item.text.toLocaleLowerCase();
8034
+ textInLow = _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
8035
+ var index = textInLow.indexOf(textToSearch.toLocaleLowerCase());
8036
+ return _this.question.searchMode == "startsWith" ? index == 0 : index > -1;
8037
+ });
8038
+ };
8026
8039
  DropdownListModel.prototype.createListModel = function () {
8027
8040
  var _this = this;
8028
8041
  var visibleItems = this.getAvailableItems();
@@ -8036,14 +8049,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8036
8049
  };
8037
8050
  }
8038
8051
  var res = new _list__WEBPACK_IMPORTED_MODULE_3__["ListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
8039
- res.setOnTextSearchCallback(function (item, textToSearch) {
8040
- if (_this.filteredItems)
8041
- return _this.filteredItems.indexOf(item) >= 0;
8042
- var textInLow = item.text.toLocaleLowerCase();
8043
- textInLow = _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
8044
- var index = textInLow.indexOf(textToSearch.toLocaleLowerCase());
8045
- return _this.question.searchMode == "startsWith" ? index == 0 : index > -1;
8046
- });
8052
+ this.setOnTextSearchCallbackForListModel(res);
8047
8053
  res.renderElements = false;
8048
8054
  res.forceShowFilter = true;
8049
8055
  res.areSameItemsCallback = function (item1, item2) {
@@ -8622,6 +8628,7 @@ var DropdownMultiSelectListModel = /** @class */ (function (_super) {
8622
8628
  };
8623
8629
  }
8624
8630
  var res = new _multiSelectListModel__WEBPACK_IMPORTED_MODULE_3__["MultiSelectListModel"](visibleItems, _onSelectionChanged, false, undefined, this.question.choicesLazyLoadEnabled ? this.listModelFilterStringChanged : undefined, this.listElementId);
8631
+ this.setOnTextSearchCallbackForListModel(res);
8625
8632
  res.forceShowFilter = true;
8626
8633
  return res;
8627
8634
  };
@@ -9431,8 +9438,8 @@ __webpack_require__.r(__webpack_exports__);
9431
9438
  //import "../../modern.scss";
9432
9439
  var Version;
9433
9440
  var ReleaseDate;
9434
- Version = "" + "1.9.130";
9435
- ReleaseDate = "" + "2024-02-15";
9441
+ Version = "" + "1.9.132";
9442
+ ReleaseDate = "" + "2024-02-27";
9436
9443
  function checkLibraryVersion(ver, libraryName) {
9437
9444
  if (Version != ver) {
9438
9445
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -20068,6 +20075,10 @@ __webpack_require__.r(__webpack_exports__);
20068
20075
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
20069
20076
  /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
20070
20077
  /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./base */ "./src/base.ts");
20078
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
20079
+ /* harmony import */ var _survey_element__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./survey-element */ "./src/survey-element.ts");
20080
+
20081
+
20071
20082
 
20072
20083
 
20073
20084
 
@@ -20079,12 +20090,17 @@ __webpack_require__.r(__webpack_exports__);
20079
20090
  var LocalizableString = /** @class */ (function () {
20080
20091
  function LocalizableString(owner, useMarkdown, name) {
20081
20092
  if (useMarkdown === void 0) { useMarkdown = false; }
20093
+ var _a;
20082
20094
  this.owner = owner;
20083
20095
  this.useMarkdown = useMarkdown;
20084
20096
  this.name = name;
20085
20097
  this.values = {};
20086
20098
  this.htmlValues = {};
20099
+ this._allowLineBreaks = false;
20087
20100
  this.onStringChanged = new _base__WEBPACK_IMPORTED_MODULE_3__["EventBase"]();
20101
+ if (owner instanceof _survey_element__WEBPACK_IMPORTED_MODULE_5__["SurveyElementCore"]) {
20102
+ this._allowLineBreaks = ((_a = _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].findProperty(owner.getType(), name)) === null || _a === void 0 ? void 0 : _a.type) == "text";
20103
+ }
20088
20104
  this.onCreating();
20089
20105
  }
20090
20106
  Object.defineProperty(LocalizableString, "defaultLocale", {
@@ -20110,6 +20126,13 @@ var LocalizableString = /** @class */ (function () {
20110
20126
  enumerable: false,
20111
20127
  configurable: true
20112
20128
  });
20129
+ Object.defineProperty(LocalizableString.prototype, "allowLineBreaks", {
20130
+ get: function () {
20131
+ return this._allowLineBreaks;
20132
+ },
20133
+ enumerable: false,
20134
+ configurable: true
20135
+ });
20113
20136
  LocalizableString.prototype.getIsMultiple = function () { return false; };
20114
20137
  Object.defineProperty(LocalizableString.prototype, "locale", {
20115
20138
  get: function () {
@@ -27397,6 +27420,13 @@ var Question = /** @class */ (function (_super) {
27397
27420
  enumerable: false,
27398
27421
  configurable: true
27399
27422
  });
27423
+ Object.defineProperty(Question.prototype, "ariaDescriptionId", {
27424
+ get: function () {
27425
+ return this.id + "_ariaDescription";
27426
+ },
27427
+ enumerable: false,
27428
+ configurable: true
27429
+ });
27400
27430
  Object.defineProperty(Question.prototype, "commentId", {
27401
27431
  get: function () {
27402
27432
  return this.id + "_comment";
@@ -28318,7 +28348,6 @@ var Question = /** @class */ (function (_super) {
28318
28348
  Question.prototype.hasErrors = function (fireCallback, rec) {
28319
28349
  if (fireCallback === void 0) { fireCallback = true; }
28320
28350
  if (rec === void 0) { rec = null; }
28321
- var oldHasErrors = this.errors.length > 0;
28322
28351
  var errors = this.checkForErrors(!!rec && rec.isOnValueChanged === true);
28323
28352
  if (fireCallback) {
28324
28353
  if (!!this.survey) {
@@ -28376,13 +28405,16 @@ var Question = /** @class */ (function (_super) {
28376
28405
  return;
28377
28406
  var newError = null;
28378
28407
  if (typeof error === "string" || error instanceof String) {
28379
- newError = new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
28408
+ newError = this.addCustomError(error);
28380
28409
  }
28381
28410
  else {
28382
28411
  newError = error;
28383
28412
  }
28384
28413
  this.errors.push(newError);
28385
28414
  };
28415
+ Question.prototype.addCustomError = function (error) {
28416
+ return new _error__WEBPACK_IMPORTED_MODULE_3__["CustomError"](error, this.survey);
28417
+ };
28386
28418
  Question.prototype.removeError = function (error) {
28387
28419
  var errors = this.errors;
28388
28420
  var index = errors.indexOf(error);
@@ -28433,6 +28465,12 @@ var Question = /** @class */ (function (_super) {
28433
28465
  err.onUpdateErrorTextCallback = function (err) { err.text = _this.requiredErrorText; };
28434
28466
  errors.push(err);
28435
28467
  }
28468
+ if (!this.isEmpty() && this.customWidget) {
28469
+ var text = this.customWidget.validate(this);
28470
+ if (!!text) {
28471
+ errors.push(this.addCustomError(text));
28472
+ }
28473
+ }
28436
28474
  };
28437
28475
  Question.prototype.hasRequiredError = function () {
28438
28476
  return this.isRequired && this.isEmpty();
@@ -28914,6 +28952,20 @@ var Question = /** @class */ (function (_super) {
28914
28952
  enumerable: false,
28915
28953
  configurable: true
28916
28954
  });
28955
+ Object.defineProperty(Question.prototype, "ariaDescribedBy", {
28956
+ get: function () {
28957
+ if (this.isNewA11yStructure)
28958
+ return null;
28959
+ if (this.hasTitle) {
28960
+ return this.ariaDescriptionId;
28961
+ }
28962
+ else {
28963
+ return null;
28964
+ }
28965
+ },
28966
+ enumerable: false,
28967
+ configurable: true
28968
+ });
28917
28969
  Object.defineProperty(Question.prototype, "ariaExpanded", {
28918
28970
  get: function () {
28919
28971
  return null;
@@ -28921,7 +28973,7 @@ var Question = /** @class */ (function (_super) {
28921
28973
  enumerable: false,
28922
28974
  configurable: true
28923
28975
  });
28924
- Object.defineProperty(Question.prototype, "ariaDescribedBy", {
28976
+ Object.defineProperty(Question.prototype, "ariaErrormessage", {
28925
28977
  get: function () {
28926
28978
  if (this.isNewA11yStructure)
28927
28979
  return null;
@@ -28978,6 +29030,18 @@ var Question = /** @class */ (function (_super) {
28978
29030
  configurable: true
28979
29031
  });
28980
29032
  Object.defineProperty(Question.prototype, "a11y_input_ariaDescribedBy", {
29033
+ get: function () {
29034
+ if (this.hasTitle && !this.parentQuestion) {
29035
+ return this.ariaDescriptionId;
29036
+ }
29037
+ else {
29038
+ return null;
29039
+ }
29040
+ },
29041
+ enumerable: false,
29042
+ configurable: true
29043
+ });
29044
+ Object.defineProperty(Question.prototype, "a11y_input_ariaErrormessage", {
28981
29045
  get: function () {
28982
29046
  return this.hasCssError() ? this.id + "_errors" : null;
28983
29047
  },
@@ -29195,6 +29259,11 @@ var QuestionCustomWidget = /** @class */ (function () {
29195
29259
  return this.widgetJson.getDisplayValue(question, value);
29196
29260
  return null;
29197
29261
  };
29262
+ QuestionCustomWidget.prototype.validate = function (question) {
29263
+ if (this.widgetJson.validate)
29264
+ return this.widgetJson.validate(question);
29265
+ return undefined;
29266
+ };
29198
29267
  QuestionCustomWidget.prototype.isFit = function (question) {
29199
29268
  if (this.isLibraryLoaded() && this.widgetJson.isFit)
29200
29269
  return this.widgetJson.isFit(question);
@@ -34346,6 +34415,15 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
34346
34415
  }
34347
34416
  }
34348
34417
  };
34418
+ QuestionCompositeModel.prototype.onSurveyValueChanged = function (newValue) {
34419
+ _super.prototype.onSurveyValueChanged.call(this, newValue);
34420
+ var val = !!newValue ? newValue : {};
34421
+ if (!!this.contentPanel) {
34422
+ this.contentPanel.questions.forEach(function (q) {
34423
+ q.onSurveyValueChanged(val[q.getValueName()]);
34424
+ });
34425
+ }
34426
+ };
34349
34427
  QuestionCompositeModel.prototype.getValue = function (name) {
34350
34428
  var val = this.value;
34351
34429
  return !!val ? val[name] : null;
@@ -34370,6 +34448,14 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
34370
34448
  this.setNewValueIntoQuestion(name, newValue);
34371
34449
  _super.prototype.setValue.call(this, name, newValue, locNotification, allowNotifyValueChanged);
34372
34450
  this.settingNewValue = false;
34451
+ this.runPanelTriggers(QuestionCompositeModel.ItemVariableName + "." + name, newValue);
34452
+ };
34453
+ QuestionCompositeModel.prototype.runPanelTriggers = function (name, value) {
34454
+ if (!!this.contentPanel) {
34455
+ this.contentPanel.questions.forEach(function (q) {
34456
+ q.runTriggers(name, value);
34457
+ });
34458
+ }
34373
34459
  };
34374
34460
  QuestionCompositeModel.prototype.getFilteredValues = function () {
34375
34461
  var values = !!this.data ? this.data.getFilteredValues() : {};
@@ -38507,7 +38593,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
38507
38593
  return loc ? loc : this.emptyLocalizableString;
38508
38594
  };
38509
38595
  QuestionMatrixModel.prototype.supportGoNextPageAutomatic = function () {
38510
- return this.isMouseDown === true && this.hasValuesInAllRows();
38596
+ return this.isMouseDown === true && this.hasValuesInAllRows(false);
38511
38597
  };
38512
38598
  QuestionMatrixModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
38513
38599
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
@@ -38522,12 +38608,12 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
38522
38608
  }
38523
38609
  };
38524
38610
  QuestionMatrixModel.prototype.hasErrorAllRowsRequired = function () {
38525
- return this.isAllRowRequired && !this.hasValuesInAllRows();
38611
+ return this.isAllRowRequired && !this.hasValuesInAllRows(true);
38526
38612
  };
38527
38613
  QuestionMatrixModel.prototype.hasErrorEachRowUnique = function () {
38528
38614
  return this.eachRowUnique && this.hasNonUniqueValueInRow();
38529
38615
  };
38530
- QuestionMatrixModel.prototype.hasValuesInAllRows = function () {
38616
+ QuestionMatrixModel.prototype.hasValuesInAllRows = function (addError) {
38531
38617
  var rows = this.generatedVisibleRows;
38532
38618
  if (!rows)
38533
38619
  rows = this.visibleRows;
@@ -38537,7 +38623,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
38537
38623
  for (var i = 0; i < rows.length; i++) {
38538
38624
  var row = rows[i];
38539
38625
  var hasValue = !this.isValueEmpty(row.value);
38540
- if (!hasValue) {
38626
+ if (addError && !hasValue) {
38541
38627
  this.addErrorIntoRow(row);
38542
38628
  }
38543
38629
  res = res && hasValue;
@@ -38572,7 +38658,7 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
38572
38658
  this.errorsInRow[row.name] = true;
38573
38659
  };
38574
38660
  QuestionMatrixModel.prototype.getIsAnswered = function () {
38575
- return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows();
38661
+ return _super.prototype.getIsAnswered.call(this) && this.hasValuesInAllRows(false);
38576
38662
  };
38577
38663
  QuestionMatrixModel.prototype.createMatrixRow = function (item, fullName, value) {
38578
38664
  var row = new MatrixRowModel(item, fullName, this, value);
@@ -43899,6 +43985,7 @@ var QuestionMatrixDropdownRenderedTable = /** @class */ (function (_super) {
43899
43985
  };
43900
43986
  QuestionMatrixDropdownRenderedTable.prototype.setItemCellCssClasses = function (cell) {
43901
43987
  cell.className = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]()
43988
+ .append(this.cssClasses.cell)
43902
43989
  .append(this.cssClasses.itemCell)
43903
43990
  .append(this.cssClasses.radioCell, cell.isRadio)
43904
43991
  .append(this.cssClasses.checkboxCell, cell.isCheckbox)
@@ -45221,6 +45308,13 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
45221
45308
  enumerable: false,
45222
45309
  configurable: true
45223
45310
  });
45311
+ Object.defineProperty(MultipleTextEditorModel.prototype, "a11y_input_ariaDescribedBy", {
45312
+ get: function () {
45313
+ return null;
45314
+ },
45315
+ enumerable: false,
45316
+ configurable: true
45317
+ });
45224
45318
  return MultipleTextEditorModel;
45225
45319
  }(_question_text__WEBPACK_IMPORTED_MODULE_3__["QuestionTextModel"]));
45226
45320
 
@@ -51838,6 +51932,9 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
51838
51932
  enumerable: false,
51839
51933
  configurable: true
51840
51934
  });
51935
+ __decorate([
51936
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
51937
+ ], QuestionTagboxModel.prototype, "searchMode", void 0);
51841
51938
  __decorate([
51842
51939
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
51843
51940
  ], QuestionTagboxModel.prototype, "allowClear", void 0);
@@ -51879,7 +51976,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("tagbox", [
51879
51976
  { name: "choicesLazyLoadPageSize:number", default: 25, visible: false },
51880
51977
  { name: "hideSelectedItems:boolean", default: false },
51881
51978
  { name: "closeOnSelect:boolean" },
51882
- { name: "itemComponent", visible: false, default: "" }
51979
+ { name: "itemComponent", visible: false, default: "" },
51980
+ { name: "searchMode", default: "contains", choices: ["contains", "startsWith"] }
51883
51981
  ], function () {
51884
51982
  return new QuestionTagboxModel("");
51885
51983
  }, "checkbox");
@@ -53784,7 +53882,7 @@ var settings = {
53784
53882
  */
53785
53883
  showMaxLengthIndicator: true,
53786
53884
  /**
53787
- * Set to `false` to disable animations
53885
+ * Specifies whether to animate survey elements.
53788
53886
  *
53789
53887
  * Default value: `true`
53790
53888
  */
@@ -54431,6 +54529,11 @@ var SurveyElementCore = /** @class */ (function (_super) {
54431
54529
  enumerable: false,
54432
54530
  configurable: true
54433
54531
  });
54532
+ Object.defineProperty(SurveyElementCore.prototype, "ariaDescriptionId", {
54533
+ get: function () { return undefined; },
54534
+ enumerable: false,
54535
+ configurable: true
54536
+ });
54434
54537
  Object.defineProperty(SurveyElementCore.prototype, "titleTabIndex", {
54435
54538
  get: function () { return undefined; },
54436
54539
  enumerable: false,
@@ -66655,7 +66758,7 @@ var VerticalResponsivityManager = /** @class */ (function (_super) {
66655
66758
  /*!****************************!*\
66656
66759
  !*** ./src/utils/utils.ts ***!
66657
66760
  \****************************/
66658
- /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
66761
+ /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, mergeValues, getElementWidth, isContainerVisible, classesToSelector, compareVersions, confirmAction, confirmActionAsync, detectIEOrEdge, detectIEBrowser, loadFileFromBase64, isMobile, isShadowDOM, getElement, isElementVisible, findScrollableParent, scrollElementByChildId, navigateToUrl, wrapUrlForBackgroundImage, createSvg, getIconNameFromProxy, increaseHeightByContent, getOriginalEvent, preventDefaults, findParentByClassNames, getFirstVisibleChild, chooseFiles */
66659
66762
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
66660
66763
 
66661
66764
  "use strict";
@@ -66669,6 +66772,7 @@ __webpack_require__.r(__webpack_exports__);
66669
66772
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sanitizeEditableContent", function() { return sanitizeEditableContent; });
66670
66773
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
66671
66774
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
66775
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
66672
66776
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
66673
66777
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
66674
66778
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -67022,7 +67126,8 @@ function findParentByClassNames(element, classNames) {
67022
67126
  }
67023
67127
  }
67024
67128
  }
67025
- function sanitizeEditableContent(element) {
67129
+ function sanitizeEditableContent(element, cleanLineBreaks) {
67130
+ if (cleanLineBreaks === void 0) { cleanLineBreaks = true; }
67026
67131
  if (window.getSelection && document.createRange && element.childNodes.length > 0) {
67027
67132
  var selection = document.getSelection();
67028
67133
  if (selection.rangeCount == 0) {
@@ -67033,13 +67138,23 @@ function sanitizeEditableContent(element) {
67033
67138
  range.setEndAfter(element.lastChild);
67034
67139
  selection.removeAllRanges();
67035
67140
  selection.addRange(range);
67036
- var tail_len = selection.toString().replace(/\n/g, "").length;
67037
- element.innerText = element.innerText.replace(/\n/g, "");
67141
+ var tail = selection.toString();
67142
+ var innerText = element.innerText;
67143
+ tail = tail.replace(/\r/g, "");
67144
+ if (cleanLineBreaks) {
67145
+ tail = tail.replace(/\n/g, "");
67146
+ innerText = innerText.replace(/\n/g, "");
67147
+ }
67148
+ var tail_len = tail.length;
67149
+ element.innerText = innerText;
67038
67150
  range = document.createRange();
67039
- range.setStart(element.childNodes[0], element.innerText.length - tail_len);
67040
- range.collapse(true);
67151
+ range.setStart(element.firstChild, 0);
67152
+ range.setEnd(element.firstChild, 0);
67041
67153
  selection.removeAllRanges();
67042
67154
  selection.addRange(range);
67155
+ for (var i = 0; i < innerText.length - tail_len; i++) {
67156
+ selection.modify("move", "forward", "character");
67157
+ }
67043
67158
  }
67044
67159
  }
67045
67160
  function mergeValues(src, dest) {
@@ -67101,9 +67216,12 @@ function showConfirmDialog(message, callback, applyTitle, locale, rootElement) {
67101
67216
  cancelBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sd-btn sd-btn--small";
67102
67217
  applyBtn.title = applyTitle || _surveyStrings__WEBPACK_IMPORTED_MODULE_2__["surveyLocalization"].getString("ok", locale);
67103
67218
  applyBtn.innerCss = "sv-popup__body-footer-item sv-popup__button sv-popup__button--danger sd-btn sd-btn--small sd-btn--danger";
67104
- popupViewModel.width = "452px";
67219
+ configConfirmDialog(popupViewModel);
67105
67220
  return true;
67106
67221
  }
67222
+ function configConfirmDialog(popupViewModel) {
67223
+ popupViewModel.width = "min-content";
67224
+ }
67107
67225
  function chooseFiles(input, callback) {
67108
67226
  if (!window || !window["FileReader"])
67109
67227
  return;