survey-core 1.9.115 → 1.9.117

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 (248) hide show
  1. package/README.md +4 -0
  2. package/defaultV2.css +121 -87
  3. package/defaultV2.css.map +1 -1
  4. package/defaultV2.fontless.css +121 -87
  5. package/defaultV2.fontless.css.map +1 -1
  6. package/defaultV2.fontless.min.css +2 -2
  7. package/defaultV2.min.css +2 -2
  8. package/i18n/arabic.js +1 -1
  9. package/i18n/arabic.min.js +1 -1
  10. package/i18n/basque.js +1 -1
  11. package/i18n/basque.min.js +1 -1
  12. package/i18n/bulgarian.js +1 -1
  13. package/i18n/bulgarian.min.js +1 -1
  14. package/i18n/catalan.js +1 -1
  15. package/i18n/catalan.min.js +1 -1
  16. package/i18n/croatian.js +1 -1
  17. package/i18n/croatian.min.js +1 -1
  18. package/i18n/czech.js +1 -1
  19. package/i18n/czech.min.js +1 -1
  20. package/i18n/danish.js +1 -1
  21. package/i18n/danish.min.js +1 -1
  22. package/i18n/dutch.js +1 -1
  23. package/i18n/dutch.min.js +1 -1
  24. package/i18n/english.js +1 -1
  25. package/i18n/english.min.js +1 -1
  26. package/i18n/estonian.js +1 -1
  27. package/i18n/estonian.min.js +1 -1
  28. package/i18n/finnish.js +1 -1
  29. package/i18n/finnish.min.js +1 -1
  30. package/i18n/french.js +1 -1
  31. package/i18n/french.min.js +1 -1
  32. package/i18n/georgian.js +1 -1
  33. package/i18n/georgian.min.js +1 -1
  34. package/i18n/german.js +1 -1
  35. package/i18n/german.min.js +1 -1
  36. package/i18n/greek.js +1 -1
  37. package/i18n/greek.min.js +1 -1
  38. package/i18n/hebrew.js +1 -1
  39. package/i18n/hebrew.min.js +1 -1
  40. package/i18n/hindi.js +1 -1
  41. package/i18n/hindi.min.js +1 -1
  42. package/i18n/hungarian.js +1 -1
  43. package/i18n/hungarian.min.js +1 -1
  44. package/i18n/icelandic.js +1 -1
  45. package/i18n/icelandic.min.js +1 -1
  46. package/i18n/index.js +1 -1
  47. package/i18n/index.min.js +1 -1
  48. package/i18n/indonesian.js +1 -1
  49. package/i18n/indonesian.min.js +1 -1
  50. package/i18n/italian.js +1 -1
  51. package/i18n/italian.min.js +1 -1
  52. package/i18n/japanese.js +1 -1
  53. package/i18n/japanese.min.js +1 -1
  54. package/i18n/kazakh.js +1 -1
  55. package/i18n/kazakh.min.js +1 -1
  56. package/i18n/korean.js +1 -1
  57. package/i18n/korean.min.js +1 -1
  58. package/i18n/latvian.js +1 -1
  59. package/i18n/latvian.min.js +1 -1
  60. package/i18n/lithuanian.js +1 -1
  61. package/i18n/lithuanian.min.js +1 -1
  62. package/i18n/macedonian.js +1 -1
  63. package/i18n/macedonian.min.js +1 -1
  64. package/i18n/malay.js +1 -1
  65. package/i18n/malay.min.js +1 -1
  66. package/i18n/nl-BE.js +1 -1
  67. package/i18n/nl-BE.min.js +1 -1
  68. package/i18n/norwegian.js +1 -1
  69. package/i18n/norwegian.min.js +1 -1
  70. package/i18n/persian.js +1 -1
  71. package/i18n/persian.min.js +1 -1
  72. package/i18n/polish.js +1 -1
  73. package/i18n/polish.min.js +1 -1
  74. package/i18n/portuguese-br.js +1 -1
  75. package/i18n/portuguese-br.min.js +1 -1
  76. package/i18n/portuguese.js +1 -1
  77. package/i18n/portuguese.min.js +1 -1
  78. package/i18n/romanian.js +1 -1
  79. package/i18n/romanian.min.js +1 -1
  80. package/i18n/russian.js +1 -1
  81. package/i18n/russian.min.js +1 -1
  82. package/i18n/serbian.js +1 -1
  83. package/i18n/serbian.min.js +1 -1
  84. package/i18n/simplified-chinese.js +1 -1
  85. package/i18n/simplified-chinese.min.js +1 -1
  86. package/i18n/slovak.js +1 -1
  87. package/i18n/slovak.min.js +1 -1
  88. package/i18n/spanish.js +1 -1
  89. package/i18n/spanish.min.js +1 -1
  90. package/i18n/swahili.js +1 -1
  91. package/i18n/swahili.min.js +1 -1
  92. package/i18n/swedish.js +1 -1
  93. package/i18n/swedish.min.js +1 -1
  94. package/i18n/tajik.js +1 -1
  95. package/i18n/tajik.min.js +1 -1
  96. package/i18n/telugu.js +1 -1
  97. package/i18n/telugu.min.js +1 -1
  98. package/i18n/thai.js +1 -1
  99. package/i18n/thai.min.js +1 -1
  100. package/i18n/traditional-chinese.js +1 -1
  101. package/i18n/traditional-chinese.min.js +1 -1
  102. package/i18n/turkish.js +1 -1
  103. package/i18n/turkish.min.js +1 -1
  104. package/i18n/ukrainian.js +1 -1
  105. package/i18n/ukrainian.min.js +1 -1
  106. package/i18n/urdu.js +1 -1
  107. package/i18n/urdu.min.js +1 -1
  108. package/i18n/vietnamese.js +1 -1
  109. package/i18n/vietnamese.min.js +1 -1
  110. package/i18n/welsh.js +1 -1
  111. package/i18n/welsh.min.js +1 -1
  112. package/modern.css +20 -11
  113. package/modern.css.map +1 -1
  114. package/modern.fontless.css +20 -11
  115. package/modern.fontless.css.map +1 -1
  116. package/modern.fontless.min.css +2 -2
  117. package/modern.min.css +2 -2
  118. package/package.json +1 -1
  119. package/plugins/bootstrap-integration.js +1 -1
  120. package/plugins/bootstrap-integration.min.js +1 -1
  121. package/plugins/bootstrap-material-integration.js +1 -1
  122. package/plugins/bootstrap-material-integration.min.js +1 -1
  123. package/survey.core.js +348 -135
  124. package/survey.core.js.map +1 -1
  125. package/survey.core.min.js +3 -3
  126. package/survey.css +11 -2
  127. package/survey.css.map +1 -1
  128. package/survey.i18n.js +1 -1
  129. package/survey.i18n.min.js +1 -1
  130. package/survey.min.css +2 -2
  131. package/themes/borderless-dark-panelless.js +1 -1
  132. package/themes/borderless-dark-panelless.min.js +1 -1
  133. package/themes/borderless-dark.js +1 -1
  134. package/themes/borderless-dark.min.js +1 -1
  135. package/themes/borderless-light-panelless..js +1 -1
  136. package/themes/borderless-light-panelless..min.js +1 -1
  137. package/themes/borderless-light.js +1 -1
  138. package/themes/borderless-light.min.js +1 -1
  139. package/themes/contrast-dark-panelless.js +1 -1
  140. package/themes/contrast-dark-panelless.min.js +1 -1
  141. package/themes/contrast-dark.js +1 -1
  142. package/themes/contrast-dark.min.js +1 -1
  143. package/themes/contrast-light-panelless.js +1 -1
  144. package/themes/contrast-light-panelless.min.js +1 -1
  145. package/themes/contrast-light.js +1 -1
  146. package/themes/contrast-light.min.js +1 -1
  147. package/themes/default-dark-panelless.js +1 -1
  148. package/themes/default-dark-panelless.min.js +1 -1
  149. package/themes/default-dark.js +1 -1
  150. package/themes/default-dark.min.js +1 -1
  151. package/themes/default-light-panelless.js +1 -1
  152. package/themes/default-light-panelless.min.js +1 -1
  153. package/themes/default-light.js +1 -1
  154. package/themes/default-light.min.js +1 -1
  155. package/themes/doubleborder-dark-panelless.js +1 -1
  156. package/themes/doubleborder-dark-panelless.min.js +1 -1
  157. package/themes/doubleborder-dark.js +1 -1
  158. package/themes/doubleborder-dark.min.js +1 -1
  159. package/themes/doubleborder-light-panelles.js +1 -1
  160. package/themes/doubleborder-light-panelles.min.js +1 -1
  161. package/themes/doubleborder-light.js +1 -1
  162. package/themes/doubleborder-light.min.js +1 -1
  163. package/themes/flat-dark-panelless.js +1 -1
  164. package/themes/flat-dark-panelless.min.js +1 -1
  165. package/themes/flat-dark.js +1 -1
  166. package/themes/flat-dark.min.js +1 -1
  167. package/themes/flat-light-panelless.js +1 -1
  168. package/themes/flat-light-panelless.min.js +1 -1
  169. package/themes/flat-light.js +1 -1
  170. package/themes/flat-light.min.js +1 -1
  171. package/themes/index.js +1 -1
  172. package/themes/index.min.js +1 -1
  173. package/themes/layered-dark-panelless.js +1 -1
  174. package/themes/layered-dark-panelless.min.js +1 -1
  175. package/themes/layered-dark.js +1 -1
  176. package/themes/layered-dark.min.js +1 -1
  177. package/themes/layered-light-panelless.js +1 -1
  178. package/themes/layered-light-panelless.min.js +1 -1
  179. package/themes/layered-light.js +1 -1
  180. package/themes/layered-light.min.js +1 -1
  181. package/themes/plain-dark-panelless.js +1 -1
  182. package/themes/plain-dark-panelless.min.js +1 -1
  183. package/themes/plain-dark.js +1 -1
  184. package/themes/plain-dark.min.js +1 -1
  185. package/themes/plain-light-panelless.js +1 -1
  186. package/themes/plain-light-panelless.min.js +1 -1
  187. package/themes/plain-light.js +1 -1
  188. package/themes/plain-light.min.js +1 -1
  189. package/themes/sharp-dark-panelless.js +1 -1
  190. package/themes/sharp-dark-panelless.min.js +1 -1
  191. package/themes/sharp-dark.js +1 -1
  192. package/themes/sharp-dark.min.js +1 -1
  193. package/themes/sharp-light-panelless.js +1 -1
  194. package/themes/sharp-light-panelless.min.js +1 -1
  195. package/themes/sharp-light.js +1 -1
  196. package/themes/sharp-light.min.js +1 -1
  197. package/themes/solid-dark-panelless.js +1 -1
  198. package/themes/solid-dark-panelless.min.js +1 -1
  199. package/themes/solid-dark.js +1 -1
  200. package/themes/solid-dark.min.js +1 -1
  201. package/themes/solid-light-panelless.js +1 -1
  202. package/themes/solid-light-panelless.min.js +1 -1
  203. package/themes/solid-light.js +1 -1
  204. package/themes/solid-light.min.js +1 -1
  205. package/themes/three-dimensional-dark-panelless.js +1 -1
  206. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  207. package/themes/three-dimensional-dark.js +1 -1
  208. package/themes/three-dimensional-dark.min.js +1 -1
  209. package/themes/three-dimensional-light-panelless.js +1 -1
  210. package/themes/three-dimensional-light-panelless.min.js +1 -1
  211. package/themes/three-dimensional-light.js +1 -1
  212. package/themes/three-dimensional-light.min.js +1 -1
  213. package/ts3.4/typings/actions/action.d.ts +7 -7
  214. package/ts3.4/typings/console-warnings.d.ts +1 -0
  215. package/ts3.4/typings/dropdownListModel.d.ts +2 -1
  216. package/ts3.4/typings/localizablestring.d.ts +0 -1
  217. package/ts3.4/typings/martixBase.d.ts +1 -0
  218. package/ts3.4/typings/question.d.ts +3 -0
  219. package/ts3.4/typings/question_baseselect.d.ts +12 -2
  220. package/ts3.4/typings/question_checkbox.d.ts +5 -2
  221. package/ts3.4/typings/question_comment.d.ts +1 -0
  222. package/ts3.4/typings/question_custom.d.ts +7 -1
  223. package/ts3.4/typings/question_imagepicker.d.ts +2 -1
  224. package/ts3.4/typings/question_multipletext.d.ts +1 -1
  225. package/ts3.4/typings/question_paneldynamic.d.ts +2 -2
  226. package/ts3.4/typings/question_rating.d.ts +8 -8
  227. package/ts3.4/typings/question_signaturepad.d.ts +30 -1
  228. package/ts3.4/typings/settings.d.ts +5 -0
  229. package/ts3.4/typings/survey-events-api.d.ts +3 -3
  230. package/ts3.4/typings/survey.d.ts +13 -13
  231. package/typings/actions/action.d.ts +7 -7
  232. package/typings/console-warnings.d.ts +1 -0
  233. package/typings/dropdownListModel.d.ts +2 -1
  234. package/typings/localizablestring.d.ts +0 -1
  235. package/typings/martixBase.d.ts +1 -0
  236. package/typings/question.d.ts +3 -0
  237. package/typings/question_baseselect.d.ts +12 -2
  238. package/typings/question_checkbox.d.ts +5 -2
  239. package/typings/question_comment.d.ts +1 -0
  240. package/typings/question_custom.d.ts +7 -1
  241. package/typings/question_imagepicker.d.ts +2 -1
  242. package/typings/question_multipletext.d.ts +1 -1
  243. package/typings/question_paneldynamic.d.ts +2 -2
  244. package/typings/question_rating.d.ts +8 -8
  245. package/typings/question_signaturepad.d.ts +30 -1
  246. package/typings/settings.d.ts +5 -0
  247. package/typings/survey-events-api.d.ts +3 -3
  248. package/typings/survey.d.ts +13 -13
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.115
2
+ * surveyjs - Survey JavaScript library v1.9.117
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -4380,6 +4380,10 @@ var ConsoleWarnings = /** @class */ (function () {
4380
4380
  // eslint-disable-next-line no-console
4381
4381
  console.warn(text);
4382
4382
  };
4383
+ ConsoleWarnings.error = function (text) {
4384
+ // eslint-disable-next-line no-console
4385
+ console.error(text);
4386
+ };
4383
4387
  return ConsoleWarnings;
4384
4388
  }());
4385
4389
 
@@ -8086,13 +8090,20 @@ var DropdownListModel = /** @class */ (function (_super) {
8086
8090
  enumerable: false,
8087
8091
  configurable: true
8088
8092
  });
8089
- Object.defineProperty(DropdownListModel.prototype, "inputReadOnly", {
8093
+ Object.defineProperty(DropdownListModel.prototype, "noTabIndex", {
8090
8094
  get: function () {
8091
8095
  return this.question.isInputReadOnly || this.searchEnabled;
8092
8096
  },
8093
8097
  enumerable: false,
8094
8098
  configurable: true
8095
8099
  });
8100
+ Object.defineProperty(DropdownListModel.prototype, "filterReadOnly", {
8101
+ get: function () {
8102
+ return this.question.isInputReadOnly || !this.searchEnabled || !this.focused;
8103
+ },
8104
+ enumerable: false,
8105
+ configurable: true
8106
+ });
8096
8107
  Object.defineProperty(DropdownListModel.prototype, "filterStringEnabled", {
8097
8108
  get: function () {
8098
8109
  return !this.question.isInputReadOnly && this.searchEnabled;
@@ -8299,6 +8310,9 @@ var DropdownListModel = /** @class */ (function (_super) {
8299
8310
  DropdownListModel.prototype.scrollToFocusedItem = function () {
8300
8311
  this.listModel.scrollToFocusedItem();
8301
8312
  };
8313
+ __decorate([
8314
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
8315
+ ], DropdownListModel.prototype, "focused", void 0);
8302
8316
  __decorate([
8303
8317
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
8304
8318
  ], DropdownListModel.prototype, "searchEnabled", void 0);
@@ -9259,8 +9273,8 @@ __webpack_require__.r(__webpack_exports__);
9259
9273
  //import "../../modern.scss";
9260
9274
  var Version;
9261
9275
  var ReleaseDate;
9262
- Version = "" + "1.9.115";
9263
- ReleaseDate = "" + "2023-11-01";
9276
+ Version = "" + "1.9.117";
9277
+ ReleaseDate = "" + "2023-11-14";
9264
9278
  function checkLibraryVersion(ver, libraryName) {
9265
9279
  if (Version != ver) {
9266
9280
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -9304,6 +9318,8 @@ function _slk(k, lh, rd) {
9304
9318
  var index = v.indexOf(";");
9305
9319
  if (index < 0)
9306
9320
  return;
9321
+ if (!checkPrefix(v.substring(0, index)))
9322
+ return;
9307
9323
  v = v.substring(index + 1);
9308
9324
  v.split(",").forEach(function (s) {
9309
9325
  var i = s.indexOf("=");
@@ -9312,6 +9328,27 @@ function _slk(k, lh, rd) {
9312
9328
  }
9313
9329
  });
9314
9330
  }
9331
+ function checkPrefix(prefix) {
9332
+ if (!prefix)
9333
+ return true;
9334
+ var s = "domains:";
9335
+ var index = prefix.indexOf(s);
9336
+ if (index < 0)
9337
+ return true;
9338
+ var ds = prefix.substring(index + s.length).toLowerCase().split(",");
9339
+ if (!Array.isArray(ds) || ds.length === 0)
9340
+ return true;
9341
+ if (typeof window !== "undefined" && !!window.location && !!window.location.hostname) {
9342
+ var hn = window.location.hostname.toLowerCase();
9343
+ ds.push("localhost");
9344
+ for (var i = 0; i < ds.length; i++) {
9345
+ if (hn.indexOf(ds[i]) > -1)
9346
+ return true;
9347
+ }
9348
+ return false;
9349
+ }
9350
+ return true;
9351
+ }
9315
9352
 
9316
9353
 
9317
9354
 
@@ -14462,8 +14499,8 @@ var OperandMaker = /** @class */ (function () {
14462
14499
  right = OperandMaker.convertValForDateCompare(right, left);
14463
14500
  return OperandMaker.isTwoValueEquals(left, right, strictCompare !== true);
14464
14501
  },
14465
- notequal: function (left, right) {
14466
- return !OperandMaker.binaryFunctions.equal(left, right);
14502
+ notequal: function (left, right, strictCompare) {
14503
+ return !OperandMaker.binaryFunctions.equal(left, right, strictCompare);
14467
14504
  },
14468
14505
  contains: function (left, right) {
14469
14506
  return OperandMaker.binaryFunctions.containsCore(left, right, true);
@@ -17345,6 +17382,10 @@ function property(options) {
17345
17382
  if (!options || !options.localizable) {
17346
17383
  Object.defineProperty(target, key, {
17347
17384
  get: function () {
17385
+ // const serializationProperty = Serializer.getProperty(target.getType(), key);
17386
+ // if(!!serializationProperty && options.defaultValue !== undefined) {
17387
+ // ConsoleWarnings.error("remove defaultValue from @property for class " + target.getType() + " property name is " + key);
17388
+ // }
17348
17389
  var defaultVal = null;
17349
17390
  if (!!options) {
17350
17391
  if (typeof options.getDefaultValue === "function") {
@@ -19752,9 +19793,6 @@ var LocalizableString = /** @class */ (function () {
19752
19793
  };
19753
19794
  LocalizableString.prototype.isLocaleTextEqualsWithDefault = function (loc, val) {
19754
19795
  var res = this.getLocaleTextCore(loc);
19755
- if (!res && this.onGetDefaultTextCallback) {
19756
- res = this.onGetDefaultTextCallback();
19757
- }
19758
19796
  if (res === val)
19759
19797
  return true;
19760
19798
  return this.isValueEmpty(res) && this.isValueEmpty(val);
@@ -20639,8 +20677,11 @@ var QuestionMatrixBaseModel = /** @class */ (function (_super) {
20639
20677
  enumerable: false,
20640
20678
  configurable: true
20641
20679
  });
20680
+ QuestionMatrixBaseModel.prototype.getCellAriaLabel = function (rowTitle, columnTitle) {
20681
+ return "row " + rowTitle + ", column " + columnTitle;
20682
+ };
20642
20683
  __decorate([
20643
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "middle" })
20684
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
20644
20685
  ], QuestionMatrixBaseModel.prototype, "verticalAlign", void 0);
20645
20686
  __decorate([
20646
20687
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
@@ -24589,7 +24630,9 @@ var PopupBaseViewModel = /** @class */ (function (_super) {
24589
24630
  }
24590
24631
  currentElement = currentElement.parentElement;
24591
24632
  }
24592
- event.preventDefault();
24633
+ if (event.cancelable) {
24634
+ event.preventDefault();
24635
+ }
24593
24636
  };
24594
24637
  PopupBaseViewModel.SubscriptionId = 0;
24595
24638
  __decorate([
@@ -24909,10 +24952,6 @@ var Question = /** @class */ (function (_super) {
24909
24952
  _this.addExpressionProperty("enableIf", function (obj, res) { _this.readOnly = res === false; });
24910
24953
  _this.addExpressionProperty("requiredIf", function (obj, res) { _this.isRequired = res === true; });
24911
24954
  _this.createLocalizableString("commentText", _this, true, "otherItemText");
24912
- _this.locTitle.onGetDefaultTextCallback = function () {
24913
- return _this.name;
24914
- };
24915
- _this.locTitle.storeDefaultText = true;
24916
24955
  _this.createLocalizableString("requiredErrorText", _this);
24917
24956
  _this.addTriggerInfo("resetValueIf", function () { return !_this.isEmpty(); }, function () {
24918
24957
  _this.clearValue();
@@ -24961,12 +25000,14 @@ var Question = /** @class */ (function (_super) {
24961
25000
  this.isMobile = val && (this.allowMobileInDesignMode() || !this.isDesignMode);
24962
25001
  };
24963
25002
  Question.prototype.themeChanged = function (theme) { };
25003
+ Question.prototype.getDefaultTitle = function () { return this.name; };
24964
25004
  Question.prototype.createLocTitleProperty = function () {
24965
25005
  var _this = this;
24966
25006
  var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
25007
+ locTitleValue.storeDefaultText = true;
24967
25008
  locTitleValue.onGetTextCallback = function (text) {
24968
25009
  if (!text) {
24969
- text = _this.name;
25010
+ text = _this.getDefaultTitle();
24970
25011
  }
24971
25012
  if (!_this.survey)
24972
25013
  return text;
@@ -25846,6 +25887,16 @@ var Question = /** @class */ (function (_super) {
25846
25887
  this.updateCommentElements();
25847
25888
  }
25848
25889
  };
25890
+ Question.prototype.onCompositionUpdateComment = function (event) {
25891
+ var _this = this;
25892
+ if (this.isInputTextUpdate) {
25893
+ setTimeout(function () {
25894
+ if (event.target) {
25895
+ _this.comment = event.target.value;
25896
+ }
25897
+ }, 1);
25898
+ }
25899
+ };
25849
25900
  Question.prototype.onCommentChange = function (event) {
25850
25901
  this.comment = event.target.value;
25851
25902
  if (this.comment !== event.target.value) {
@@ -26442,6 +26493,9 @@ var Question = /** @class */ (function (_super) {
26442
26493
  Question.prototype.onReadOnlyChanged = function () {
26443
26494
  this.setPropertyValue("isInputReadOnly", this.isInputReadOnly);
26444
26495
  _super.prototype.onReadOnlyChanged.call(this);
26496
+ if (this.isReadOnly) {
26497
+ this.clearErrors();
26498
+ }
26445
26499
  this.updateQuestionCss();
26446
26500
  this.calcRenderedCommentPlaceholder();
26447
26501
  };
@@ -27563,7 +27617,7 @@ var Question = /** @class */ (function (_super) {
27563
27617
  if (updateIsAnswered === void 0) { updateIsAnswered = true; }
27564
27618
  newValue = this.convertToCorrectValue(newValue);
27565
27619
  var isEqual = this.isTwoValueEquals(this.questionValue, newValue);
27566
- if (!isEqual && !this.isChangingViaDefaultValue) {
27620
+ if (!isEqual && !this.isChangingViaDefaultValue && !this.isParentChangingViaDefaultValue) {
27567
27621
  this.setValueChangedDirectly(true);
27568
27622
  }
27569
27623
  this.questionValue = newValue;
@@ -27575,6 +27629,14 @@ var Question = /** @class */ (function (_super) {
27575
27629
  if (updateIsAnswered)
27576
27630
  this.updateIsAnswered();
27577
27631
  };
27632
+ Object.defineProperty(Question.prototype, "isParentChangingViaDefaultValue", {
27633
+ get: function () {
27634
+ var _a;
27635
+ return ((_a = this.data) === null || _a === void 0 ? void 0 : _a.isChangingViaDefaultValue) === true;
27636
+ },
27637
+ enumerable: false,
27638
+ configurable: true
27639
+ });
27578
27640
  Question.prototype.onSurveyValueChanged = function (newValue) { };
27579
27641
  Question.prototype.setVisibleIndex = function (val) {
27580
27642
  if (!this.isVisible ||
@@ -28037,7 +28099,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
28037
28099
  "enableIf:condition",
28038
28100
  "resetValueIf:condition",
28039
28101
  "setValueIf:condition",
28040
- { name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
28102
+ "setValueExpression:expression",
28041
28103
  "defaultValue:value",
28042
28104
  {
28043
28105
  name: "defaultValueExpression:expression",
@@ -28350,6 +28412,8 @@ var QuestionSelectBase = /** @class */ (function (_super) {
28350
28412
  _this.isRunningChoices = false;
28351
28413
  _this.isFirstLoadChoicesFromUrl = true;
28352
28414
  _this.isUpdatingChoicesDependedQuestions = false;
28415
+ _this.headItemsCount = 0;
28416
+ _this.footItemsCount = 0;
28353
28417
  _this.prevIsOtherSelected = false;
28354
28418
  var noneItemText = _this.createLocalizableString("noneText", _this.noneItemValue, true, "noneItemText");
28355
28419
  _this.noneItemValue.locOwner = _this;
@@ -29329,22 +29393,51 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29329
29393
  configurable: true
29330
29394
  });
29331
29395
  QuestionSelectBase.prototype.addToVisibleChoices = function (items, isAddAll) {
29332
- if (isAddAll) {
29333
- if (!this.newItemValue) {
29334
- this.newItemValue = this.createItemValue("newitem"); //TODO
29335
- this.newItemValue.isGhost = true;
29396
+ this.headItemsCount = 0;
29397
+ this.footItemsCount = 0;
29398
+ this.addNewItemToVisibleChoices(items, isAddAll);
29399
+ var dict = new Array();
29400
+ this.addNonChoicesItems(dict, isAddAll);
29401
+ dict.sort(function (a, b) {
29402
+ if (a.index === b.index)
29403
+ return 0;
29404
+ return a.index < b.index ? -1 : 1;
29405
+ });
29406
+ for (var i = 0; i < dict.length; i++) {
29407
+ var rec = dict[i];
29408
+ if (rec.index < 0) {
29409
+ items.splice(i, 0, rec.item);
29410
+ this.headItemsCount++;
29336
29411
  }
29337
- if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
29338
- items.push(this.newItemValue);
29412
+ else {
29413
+ items.push(rec.item);
29414
+ this.footItemsCount++;
29339
29415
  }
29340
29416
  }
29417
+ };
29418
+ QuestionSelectBase.prototype.addNewItemToVisibleChoices = function (items, isAddAll) {
29419
+ if (!isAddAll)
29420
+ return;
29421
+ if (!this.newItemValue) {
29422
+ this.newItemValue = this.createItemValue("newitem"); //TODO
29423
+ this.newItemValue.isGhost = true;
29424
+ }
29425
+ if (!this.isUsingCarryForward && this.canShowOptionItem(this.newItemValue, isAddAll, false)) {
29426
+ this.footItemsCount = 1;
29427
+ items.push(this.newItemValue);
29428
+ }
29429
+ };
29430
+ QuestionSelectBase.prototype.addNonChoicesItems = function (dict, isAddAll) {
29341
29431
  if (this.supportNone() && this.canShowOptionItem(this.noneItem, isAddAll, this.hasNone)) {
29342
- items.push(this.noneItem);
29432
+ this.addNonChoiceItem(dict, this.noneItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.noneItem);
29343
29433
  }
29344
29434
  if (this.supportOther() && this.canShowOptionItem(this.otherItem, isAddAll, this.hasOther)) {
29345
- items.push(this.otherItem);
29435
+ this.addNonChoiceItem(dict, this.otherItem, _settings__WEBPACK_IMPORTED_MODULE_9__["settings"].specialChoicesOrder.otherItem);
29346
29436
  }
29347
29437
  };
29438
+ QuestionSelectBase.prototype.addNonChoiceItem = function (dict, item, order) {
29439
+ order.forEach(function (val) { return dict.push({ index: val, item: item }); });
29440
+ };
29348
29441
  QuestionSelectBase.prototype.canShowOptionItem = function (item, isAddAll, hasItem) {
29349
29442
  var res = (isAddAll && (!!this.canShowOptionItemCallback ? this.canShowOptionItemCallback(item) : true)) || hasItem;
29350
29443
  if (this.canSurveyChangeItemVisibility()) {
@@ -29576,17 +29669,11 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29576
29669
  enumerable: false,
29577
29670
  configurable: true
29578
29671
  });
29579
- QuestionSelectBase.prototype.isHeadChoice = function (item, question) {
29580
- return false;
29581
- };
29582
- QuestionSelectBase.prototype.isFootChoice = function (item, question) {
29672
+ QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
29583
29673
  return (item === question.noneItem ||
29584
29674
  item === question.otherItem ||
29585
29675
  item === question.newItemValue);
29586
29676
  };
29587
- QuestionSelectBase.prototype.isBuiltInChoice = function (item, question) {
29588
- return this.isHeadChoice(item, question) || this.isFootChoice(item, question);
29589
- };
29590
29677
  QuestionSelectBase.prototype.getChoices = function () {
29591
29678
  return this.choices;
29592
29679
  };
@@ -29687,6 +29774,16 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29687
29774
  this.updateCommentElements();
29688
29775
  }
29689
29776
  };
29777
+ QuestionSelectBase.prototype.onCompositionUpdateOtherValue = function (event) {
29778
+ var _this = this;
29779
+ if (this.isInputTextUpdate) {
29780
+ setTimeout(function () {
29781
+ if (event.target) {
29782
+ _this.otherValue = event.target.value;
29783
+ }
29784
+ }, 1);
29785
+ }
29786
+ };
29690
29787
  QuestionSelectBase.prototype.onOtherValueChange = function (event) {
29691
29788
  this.otherValue = event.target.value;
29692
29789
  if (this.otherValue !== event.target.value) {
@@ -29998,18 +30095,23 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29998
30095
  };
29999
30096
  Object.defineProperty(QuestionSelectBase.prototype, "headItems", {
30000
30097
  get: function () {
30001
- var _this = this;
30002
- return (this.separateSpecialChoices || this.isDesignMode) ?
30003
- this.visibleChoices.filter(function (choice) { return _this.isHeadChoice(choice, _this); }) : [];
30098
+ var count = (this.separateSpecialChoices || this.isDesignMode) ? this.headItemsCount : 0;
30099
+ var res = [];
30100
+ for (var i = 0; i < count; i++)
30101
+ res.push(this.visibleChoices[i]);
30102
+ return res;
30004
30103
  },
30005
30104
  enumerable: false,
30006
30105
  configurable: true
30007
30106
  });
30008
30107
  Object.defineProperty(QuestionSelectBase.prototype, "footItems", {
30009
30108
  get: function () {
30010
- var _this = this;
30011
- return (this.separateSpecialChoices || this.isDesignMode) ?
30012
- this.visibleChoices.filter(function (choice) { return _this.isFootChoice(choice, _this); }) : [];
30109
+ var count = (this.separateSpecialChoices || this.isDesignMode) ? this.footItemsCount : 0;
30110
+ var res = [];
30111
+ var items = this.visibleChoices;
30112
+ for (var i = 0; i < count; i++)
30113
+ res.push(items[items.length - count + i]);
30114
+ return res;
30013
30115
  },
30014
30116
  enumerable: false,
30015
30117
  configurable: true
@@ -30254,7 +30356,7 @@ var QuestionCheckboxBase = /** @class */ (function (_super) {
30254
30356
  * @see separateSpecialChoices
30255
30357
  */
30256
30358
  get: function () {
30257
- return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : 1);
30359
+ return this.getPropertyValue("colCount", this.isFlowLayout ? 0 : undefined);
30258
30360
  },
30259
30361
  set: function (value) {
30260
30362
  if (value < 0 || value > 5 || this.isFlowLayout)
@@ -31080,6 +31182,7 @@ __webpack_require__.r(__webpack_exports__);
31080
31182
  /* harmony import */ var _itemvalue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./itemvalue */ "./src/itemvalue.ts");
31081
31183
  /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
31082
31184
  /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./error */ "./src/error.ts");
31185
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
31083
31186
  var __extends = (undefined && undefined.__extends) || (function () {
31084
31187
  var extendStatics = function (d, b) {
31085
31188
  extendStatics = Object.setPrototypeOf ||
@@ -31102,6 +31205,7 @@ var __extends = (undefined && undefined.__extends) || (function () {
31102
31205
 
31103
31206
 
31104
31207
 
31208
+
31105
31209
  /**
31106
31210
  * A class that describes the Checkboxes question type.
31107
31211
  *
@@ -31229,12 +31333,13 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31229
31333
  if (this.isItemSelected(this.noneItem))
31230
31334
  return false;
31231
31335
  var allItemCount = this.visibleChoices.length;
31336
+ var order = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder;
31232
31337
  if (this.hasOther)
31233
- allItemCount--;
31338
+ allItemCount -= order.otherItem.length;
31234
31339
  if (this.hasNone)
31235
- allItemCount--;
31340
+ allItemCount -= order.noneItem.length;
31236
31341
  if (this.hasSelectAll)
31237
- allItemCount--;
31342
+ allItemCount -= order.selectAllItem.length;
31238
31343
  var selectedCount = val.length;
31239
31344
  if (this.isOtherSelected)
31240
31345
  selectedCount--;
@@ -31527,14 +31632,14 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31527
31632
  QuestionCheckboxModel.prototype.supportSelectAll = function () {
31528
31633
  return this.isSupportProperty("showSelectAllItem");
31529
31634
  };
31530
- QuestionCheckboxModel.prototype.addToVisibleChoices = function (items, isAddAll) {
31635
+ QuestionCheckboxModel.prototype.addNonChoicesItems = function (dict, isAddAll) {
31636
+ _super.prototype.addNonChoicesItems.call(this, dict, isAddAll);
31531
31637
  if (this.supportSelectAll() && this.canShowOptionItem(this.selectAllItem, isAddAll, this.hasSelectAll)) {
31532
- items.unshift(this.selectAllItem);
31638
+ this.addNonChoiceItem(dict, this.selectAllItem, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder.selectAllItem);
31533
31639
  }
31534
- _super.prototype.addToVisibleChoices.call(this, items, isAddAll);
31535
31640
  };
31536
- QuestionCheckboxModel.prototype.isHeadChoice = function (item, question) {
31537
- return (item === question.selectAllItem);
31641
+ QuestionCheckboxModel.prototype.isBuiltInChoice = function (item, question) {
31642
+ return item === question.selectAllItem || _super.prototype.isBuiltInChoice.call(this, item, question);
31538
31643
  };
31539
31644
  QuestionCheckboxModel.prototype.isItemInList = function (item) {
31540
31645
  if (item == this.selectAllItem)
@@ -31951,6 +32056,11 @@ var QuestionCommentModel = /** @class */ (function (_super) {
31951
32056
  event.stopPropagation();
31952
32057
  }
31953
32058
  };
32059
+ QuestionCommentModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
32060
+ if (updateIsAnswered === void 0) { updateIsAnswered = true; }
32061
+ _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
32062
+ this.updateElement();
32063
+ };
31954
32064
  QuestionCommentModel.prototype.onValueChanged = function () {
31955
32065
  _super.prototype.onValueChanged.call(this);
31956
32066
  this.updateElement();
@@ -32152,6 +32262,15 @@ var ComponentCollection = /** @class */ (function () {
32152
32262
  this.onAddingJson(name, customQuestion.isComposite);
32153
32263
  this.customQuestionValues.push(customQuestion);
32154
32264
  };
32265
+ ComponentCollection.prototype.remove = function (componentName) {
32266
+ if (!componentName)
32267
+ return false;
32268
+ var index = this.getCustomQuestionIndex(componentName.toLowerCase());
32269
+ if (index < 0)
32270
+ return false;
32271
+ this.removeByIndex(index);
32272
+ return true;
32273
+ };
32155
32274
  Object.defineProperty(ComponentCollection.prototype, "items", {
32156
32275
  get: function () {
32157
32276
  return this.customQuestionValues;
@@ -32160,17 +32279,26 @@ var ComponentCollection = /** @class */ (function () {
32160
32279
  configurable: true
32161
32280
  });
32162
32281
  ComponentCollection.prototype.getCustomQuestionByName = function (name) {
32282
+ var index = this.getCustomQuestionIndex(name);
32283
+ return index >= 0 ? this.customQuestionValues[index] : undefined;
32284
+ };
32285
+ ComponentCollection.prototype.getCustomQuestionIndex = function (name) {
32163
32286
  for (var i = 0; i < this.customQuestionValues.length; i++) {
32164
- if (this.customQuestionValues[i].name == name)
32165
- return this.customQuestionValues[i];
32287
+ if (this.customQuestionValues[i].name === name)
32288
+ return i;
32166
32289
  }
32167
- return null;
32290
+ return -1;
32168
32291
  };
32169
- ComponentCollection.prototype.clear = function () {
32170
- for (var i = 0; i < this.customQuestionValues.length; i++) {
32171
- _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[i].name);
32292
+ ComponentCollection.prototype.removeByIndex = function (index) {
32293
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].removeClass(this.customQuestionValues[index].name);
32294
+ this.customQuestionValues.splice(index, 1);
32295
+ };
32296
+ ComponentCollection.prototype.clear = function (includeInternal) {
32297
+ for (var i = this.customQuestionValues.length - 1; i >= 0; i--) {
32298
+ if (includeInternal || !this.customQuestionValues[i].json.internal) {
32299
+ this.removeByIndex(i);
32300
+ }
32172
32301
  }
32173
- this.customQuestionValues = [];
32174
32302
  };
32175
32303
  ComponentCollection.prototype.createQuestion = function (name, questionJSON) {
32176
32304
  if (!!questionJSON.isComposite)
@@ -32438,6 +32566,11 @@ var QuestionCustomModel = /** @class */ (function (_super) {
32438
32566
  QuestionCustomModel.prototype.getQuestionByName = function (name) {
32439
32567
  return this.contentQuestion;
32440
32568
  };
32569
+ QuestionCustomModel.prototype.getDefaultTitle = function () {
32570
+ if (this.hasJSONTitle && this.contentQuestion)
32571
+ return this.contentQuestion.title;
32572
+ return _super.prototype.getDefaultTitle.call(this);
32573
+ };
32441
32574
  QuestionCustomModel.prototype.setValue = function (name, newValue, locNotification, allowNotifyValueChanged) {
32442
32575
  if (this.isValueChanging(name, newValue))
32443
32576
  return;
@@ -32492,6 +32625,7 @@ var QuestionCustomModel = /** @class */ (function (_super) {
32492
32625
  var json = this.customQuestion.json;
32493
32626
  var res = null;
32494
32627
  if (!!json.questionJSON) {
32628
+ this.hasJSONTitle = !!json.questionJSON.title;
32495
32629
  var qType = json.questionJSON.type;
32496
32630
  if (!qType || !_jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].findClass(qType))
32497
32631
  throw "type attribute in questionJSON is empty or incorrect";
@@ -33347,7 +33481,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
33347
33481
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33348
33482
  ], QuestionDropdownModel.prototype, "choicesLazyLoadEnabled", void 0);
33349
33483
  __decorate([
33350
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
33484
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
33351
33485
  ], QuestionDropdownModel.prototype, "choicesLazyLoadPageSize", void 0);
33352
33486
  __decorate([
33353
33487
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
@@ -33630,7 +33764,7 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
33630
33764
  this.updateFormatedValue();
33631
33765
  };
33632
33766
  QuestionExpressionModel.prototype.getDisplayValueCore = function (keysAsText, value) {
33633
- var val = this.isValueEmpty(value) ? this.defaultValue : value;
33767
+ var val = value === undefined || value === null ? this.defaultValue : value;
33634
33768
  var res = "";
33635
33769
  if (!this.isValueEmpty(val)) {
33636
33770
  var str = this.getValueAsStr(val);
@@ -34752,7 +34886,9 @@ var QuestionFileModel = /** @class */ (function (_super) {
34752
34886
  if (_this.survey) {
34753
34887
  _this.survey.uploadFiles(_this, _this.name, files, function (status, data) {
34754
34888
  if (status === "error") {
34889
+ _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](data, _this));
34755
34890
  _this.stateChanged("error");
34891
+ _this.stateChanged("loaded");
34756
34892
  }
34757
34893
  if (status === "success") {
34758
34894
  _this.value = (_this.value || []).concat(data.map(function (r) {
@@ -35335,7 +35471,16 @@ var QuestionHtmlModel = /** @class */ (function (_super) {
35335
35471
  return QuestionHtmlModel;
35336
35472
  }(_questionnonvalue__WEBPACK_IMPORTED_MODULE_0__["QuestionNonValue"]));
35337
35473
 
35338
- _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [{ name: "html:html", serializationProperty: "locHtml" }], function () {
35474
+ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("html", [
35475
+ { name: "html:html", serializationProperty: "locHtml" },
35476
+ { name: "hideNumber", visible: false },
35477
+ { name: "state", visible: false },
35478
+ { name: "titleLocation", visible: false },
35479
+ { name: "descriptionLocation", visible: false },
35480
+ { name: "errorLocation", visible: false },
35481
+ { name: "indent", visible: false },
35482
+ { name: "width", visible: false },
35483
+ ], function () {
35339
35484
  return new QuestionHtmlModel("");
35340
35485
  }, "nonvalue");
35341
35486
  _questionfactory__WEBPACK_IMPORTED_MODULE_2__["QuestionFactory"].Instance.registerQuestion("html", function (name) {
@@ -36095,9 +36240,12 @@ var QuestionImagePickerModel = /** @class */ (function (_super) {
36095
36240
  enumerable: false,
36096
36241
  configurable: true
36097
36242
  });
36098
- QuestionImagePickerModel.prototype.isFootChoice = function (_item, _question) {
36243
+ QuestionImagePickerModel.prototype.isBuiltInChoice = function (item, question) {
36099
36244
  return false;
36100
36245
  };
36246
+ QuestionImagePickerModel.prototype.addToVisibleChoices = function (items, isAddAll) {
36247
+ this.addNewItemToVisibleChoices(items, isAddAll);
36248
+ };
36101
36249
  QuestionImagePickerModel.prototype.getSelectBaseRootCss = function () {
36102
36250
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_5__["CssClassBuilder"]().append(_super.prototype.getSelectBaseRootCss.call(this)).append(this.cssClasses.rootColumn, this.getCurrentColCount() == 1).toString();
36103
36251
  };
@@ -39251,6 +39399,8 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
39251
39399
  this.collectNestedQuestonsInRows(this.visibleRows, questions, visibleOnly);
39252
39400
  };
39253
39401
  QuestionMatrixDropdownModelBase.prototype.collectNestedQuestonsInRows = function (rows, questions, visibleOnly) {
39402
+ if (!Array.isArray(rows))
39403
+ return;
39254
39404
  rows.forEach(function (row) {
39255
39405
  row.questions.forEach(function (q) { return q.collectNestedQuestions(questions, visibleOnly); });
39256
39406
  });
@@ -40778,7 +40928,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
40778
40928
  "requiredIf:condition",
40779
40929
  "resetValueIf:condition",
40780
40930
  "setValueIf:condition",
40781
- { name: "setValueExpression:expression", visibleIf: function (obj) { return !!obj.setValueIf; } },
40931
+ "setValueExpression:expression",
40782
40932
  {
40783
40933
  name: "showInMultipleColumns:boolean",
40784
40934
  dependsOn: "cellType",
@@ -42922,7 +43072,7 @@ var QuestionMatrixDynamicModel = /** @class */ (function (_super) {
42922
43072
  var lastDelRow = this.lastDeletedRow;
42923
43073
  this.lastDeletedRow = undefined;
42924
43074
  var rows = this.generatedVisibleRows;
42925
- if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1)
43075
+ if (!Array.isArray(val) || Math.abs(rows.length - val.length) > 1 || rows.length === val.length)
42926
43076
  return false;
42927
43077
  var index = this.getInsertedDeletedIndex(rows, val);
42928
43078
  if (rows.length > val.length) {
@@ -43190,7 +43340,7 @@ var MultipleTextEditorModel = /** @class */ (function (_super) {
43190
43340
  /**
43191
43341
  * A class that describes an item in a [Multiple Textboxes](https://surveyjs.io/form-library/documentation/api-reference/multiple-text-entry-question-model) question.
43192
43342
  *
43193
- * [View Demo](/form-library/examples/multiple-text-box-question/)
43343
+ * [View Demo](https://surveyjs.io/form-library/examples/multiple-text-box-question/)
43194
43344
  */
43195
43345
  var MultipleTextItemModel = /** @class */ (function (_super) {
43196
43346
  __extends(MultipleTextItemModel, _super);
@@ -44671,7 +44821,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
44671
44821
  *
44672
44822
  * If you want to customize individual tab titles, handle `SurveyModel`'s [`onGetDynamicPanelTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onGetDynamicPanelTabTitle) event.
44673
44823
  *
44674
- * [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
44824
+ * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
44675
44825
  * @see templateTitle
44676
44826
  * @see renderMode
44677
44827
  */
@@ -45458,7 +45608,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
45458
45608
  * - `"progressTop"` - Renders each panel as a card and displays a progress bar at the top. [View Demo](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/)
45459
45609
  * - `"progressBottom"` - Renders each panel panel as a card and displays a progress bar at the bottom.
45460
45610
  * - `"progressTopBottom"` - Renders each panel as a card and displays a progress bar at the top and bottom.
45461
- * - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/)
45611
+ * - `"tab"` - Renders each panel within a tab. Use the [`templateTabTitle`](https://surveyjs.io/form-library/documentation/api-reference/dynamic-panel-model#templateTabTitle) to specify a template for tab titles. [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/)
45462
45612
  */
45463
45613
  get: function () {
45464
45614
  return this.getPropertyValue("renderMode");
@@ -47941,7 +48091,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
47941
48091
  *
47942
48092
  * If you do not specify the `rateValues` property, rate values are generated automatically based upon the [`rateMin`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMin), [`rateMax`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateMax), [`rateStep`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateStep), and [`rateCount`](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#rateCount) property values.
47943
48093
  *
47944
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
48094
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
47945
48095
  */
47946
48096
  get: function () {
47947
48097
  return this.getPropertyValue("rateValues");
@@ -47959,7 +48109,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
47959
48109
  *
47960
48110
  * Default value: 1
47961
48111
  *
47962
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
48112
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
47963
48113
  * @see rateMax
47964
48114
  * @see rateStep
47965
48115
  * @see rateCount
@@ -47979,7 +48129,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
47979
48129
  *
47980
48130
  * Default value: 5
47981
48131
  *
47982
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
48132
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
47983
48133
  * @see rateMin
47984
48134
  * @see rateStep
47985
48135
  * @see rateCount
@@ -47999,7 +48149,7 @@ var QuestionRatingModel = /** @class */ (function (_super) {
47999
48149
  *
48000
48150
  * Default value: 1
48001
48151
  *
48002
- * [View Demo](/form-library/examples/rating-scale/ (linkStyle))
48152
+ * [View Demo](https://surveyjs.io/form-library/examples/rating-scale/ (linkStyle))
48003
48153
  * @see rateMin
48004
48154
  * @see rateMax
48005
48155
  * @see rateCount
@@ -48597,10 +48747,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
48597
48747
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
48598
48748
  ], QuestionRatingModel.prototype, "inputHasValue", void 0);
48599
48749
  __decorate([
48600
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: true })
48750
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48601
48751
  ], QuestionRatingModel.prototype, "autoGenerate", void 0);
48602
48752
  __decorate([
48603
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: 5 })
48753
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48604
48754
  ], QuestionRatingModel.prototype, "rateCount", void 0);
48605
48755
  __decorate([
48606
48756
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["propertyArray"])()
@@ -48612,11 +48762,10 @@ var QuestionRatingModel = /** @class */ (function (_super) {
48612
48762
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
48613
48763
  ], QuestionRatingModel.prototype, "hasMaxRateDescription", void 0);
48614
48764
  __decorate([
48615
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: false })
48765
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48616
48766
  ], QuestionRatingModel.prototype, "displayRateDescriptionsAsExtremeItems", void 0);
48617
48767
  __decorate([
48618
48768
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({
48619
- defaultValue: "auto",
48620
48769
  onSet: function (val, target) {
48621
48770
  if (!target.isDesignMode) {
48622
48771
  if (val === "dropdown") {
@@ -48630,13 +48779,13 @@ var QuestionRatingModel = /** @class */ (function (_super) {
48630
48779
  })
48631
48780
  ], QuestionRatingModel.prototype, "displayMode", void 0);
48632
48781
  __decorate([
48633
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "labels" })
48782
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48634
48783
  ], QuestionRatingModel.prototype, "rateType", void 0);
48635
48784
  __decorate([
48636
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "monochrome" })
48785
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48637
48786
  ], QuestionRatingModel.prototype, "scaleColorMode", void 0);
48638
48787
  __decorate([
48639
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])({ defaultValue: "scale" })
48788
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
48640
48789
  ], QuestionRatingModel.prototype, "rateColorMode", void 0);
48641
48790
  return QuestionRatingModel;
48642
48791
  }(_question__WEBPACK_IMPORTED_MODULE_1__["Question"]));
@@ -48785,12 +48934,11 @@ _questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.regist
48785
48934
  /*!**************************************!*\
48786
48935
  !*** ./src/question_signaturepad.ts ***!
48787
48936
  \**************************************/
48788
- /*! exports provided: getCanvasRatio, QuestionSignaturePadModel */
48937
+ /*! exports provided: QuestionSignaturePadModel */
48789
48938
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
48790
48939
 
48791
48940
  "use strict";
48792
48941
  __webpack_require__.r(__webpack_exports__);
48793
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCanvasRatio", function() { return getCanvasRatio; });
48794
48942
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return QuestionSignaturePadModel; });
48795
48943
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
48796
48944
  /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
@@ -48827,28 +48975,6 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
48827
48975
 
48828
48976
  var defaultWidth = 300;
48829
48977
  var defaultHeight = 200;
48830
- function getCanvasRatio(canvas) {
48831
- var context = canvas.getContext("2d");
48832
- var devicePixelRatio = window.devicePixelRatio || 1;
48833
- var backingStoreRatio = context.webkitBackingStorePixelRatio ||
48834
- context.mozBackingStorePixelRatio ||
48835
- context.msBackingStorePixelRatio ||
48836
- context.oBackingStorePixelRatio ||
48837
- context.backingStorePixelRatio ||
48838
- 1;
48839
- return devicePixelRatio / backingStoreRatio;
48840
- }
48841
- function resizeCanvas(canvas) {
48842
- var context = canvas.getContext("2d");
48843
- var ratio = getCanvasRatio(canvas);
48844
- var oldWidth = canvas.width;
48845
- var oldHeight = canvas.height;
48846
- canvas.width = oldWidth * ratio;
48847
- canvas.height = oldHeight * ratio;
48848
- canvas.style.width = oldWidth + "px";
48849
- canvas.style.height = oldHeight + "px";
48850
- context.scale(ratio, ratio);
48851
- }
48852
48978
  /**
48853
48979
  * A class that describes the Signature question type.
48854
48980
  *
@@ -48857,7 +48983,13 @@ function resizeCanvas(canvas) {
48857
48983
  var QuestionSignaturePadModel = /** @class */ (function (_super) {
48858
48984
  __extends(QuestionSignaturePadModel, _super);
48859
48985
  function QuestionSignaturePadModel(name) {
48860
- return _super.call(this, name) || this;
48986
+ var _this = _super.call(this, name) || this;
48987
+ _this.valueIsUpdatingInternally = false;
48988
+ _this.updateValueHandler = function () {
48989
+ _this.scaleCanvas(false, true);
48990
+ _this.refreshCanvas();
48991
+ };
48992
+ return _this;
48861
48993
  }
48862
48994
  QuestionSignaturePadModel.prototype.getPenColorFromTheme = function () {
48863
48995
  var _survey = this.survey;
@@ -48883,7 +49015,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
48883
49015
  var format = this.dataFormat === "jpeg" ? "image/jpeg" :
48884
49016
  (this.dataFormat === "svg" ? "image/svg+xml" : "");
48885
49017
  var data = this.signaturePad.toDataURL(format);
49018
+ this.valueIsUpdatingInternally = true;
48886
49019
  this.value = data;
49020
+ this.valueIsUpdatingInternally = false;
48887
49021
  }
48888
49022
  };
48889
49023
  QuestionSignaturePadModel.prototype.getType = function () {
@@ -48905,10 +49039,44 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
48905
49039
  this.updateColors(this.signaturePad);
48906
49040
  }
48907
49041
  };
49042
+ QuestionSignaturePadModel.prototype.resizeCanvas = function () {
49043
+ this.canvas.width = this.containerWidth;
49044
+ this.canvas.height = this.containerHeight;
49045
+ };
49046
+ QuestionSignaturePadModel.prototype.scaleCanvas = function (refresh, resize) {
49047
+ if (refresh === void 0) { refresh = true; }
49048
+ if (resize === void 0) { resize = false; }
49049
+ var canvas = this.canvas;
49050
+ var scale = canvas.offsetWidth / this.containerWidth;
49051
+ if (this.scale != scale || resize) {
49052
+ this.scale = scale;
49053
+ canvas.style.width = this.renderedCanvasWidth;
49054
+ this.resizeCanvas();
49055
+ this.signaturePad.minWidth = this.penMinWidth * scale;
49056
+ this.signaturePad.maxWidth = this.penMaxWidth * scale;
49057
+ canvas.getContext("2d").scale(1 / scale, 1 / scale);
49058
+ if (refresh)
49059
+ this.refreshCanvas();
49060
+ }
49061
+ };
49062
+ QuestionSignaturePadModel.prototype.refreshCanvas = function () {
49063
+ var data = this.value;
49064
+ var canvas = this.canvas;
49065
+ if (!data) {
49066
+ canvas.getContext("2d").clearRect(0, 0, canvas.width * this.scale, canvas.height * this.scale);
49067
+ this.signaturePad.clear();
49068
+ }
49069
+ else {
49070
+ this.signaturePad.fromDataURL(data, { width: canvas.width * this.scale, height: canvas.height * this.scale });
49071
+ }
49072
+ };
48908
49073
  QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
48909
49074
  var _this = this;
48910
49075
  var canvas = el.getElementsByTagName("canvas")[0];
49076
+ this.canvas = canvas;
49077
+ this.resizeCanvas();
48911
49078
  var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_3__["default"](canvas, { backgroundColor: "#ffffff" });
49079
+ this.signaturePad = signaturePad;
48912
49080
  if (this.isInputReadOnly) {
48913
49081
  signaturePad.off();
48914
49082
  }
@@ -48922,6 +49090,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
48922
49090
  };
48923
49091
  this.updateColors(signaturePad);
48924
49092
  signaturePad.addEventListener("beginStroke", function () {
49093
+ _this.scaleCanvas();
48925
49094
  _this.isDrawingValue = true;
48926
49095
  canvas.focus();
48927
49096
  }, { once: false });
@@ -48929,24 +49098,12 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
48929
49098
  _this.isDrawingValue = false;
48930
49099
  _this.updateValue();
48931
49100
  }, { once: false });
48932
- var updateValueHandler = function () {
48933
- var data = _this.value;
48934
- canvas.width = _this.signatureWidth || defaultWidth;
48935
- canvas.height = _this.signatureHeight || defaultHeight;
48936
- resizeCanvas(canvas);
48937
- if (!data) {
48938
- signaturePad.clear();
48939
- }
48940
- else {
48941
- signaturePad.fromDataURL(data);
48942
- }
48943
- };
48944
- updateValueHandler();
49101
+ this.updateValueHandler();
48945
49102
  this.readOnlyChangedCallback();
48946
- this.signaturePad = signaturePad;
48947
49103
  var propertyChangedHandler = function (sender, options) {
48948
49104
  if (options.name === "signatureWidth" || options.name === "signatureHeight" || options.name === "value") {
48949
- updateValueHandler();
49105
+ if (!_this.valueIsUpdatingInternally)
49106
+ _this.updateValueHandler();
48950
49107
  }
48951
49108
  };
48952
49109
  this.onPropertyChanged.add(propertyChangedHandler);
@@ -49005,6 +49162,27 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49005
49162
  enumerable: false,
49006
49163
  configurable: true
49007
49164
  });
49165
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "containerHeight", {
49166
+ get: function () {
49167
+ return this.signatureHeight || defaultHeight;
49168
+ },
49169
+ enumerable: false,
49170
+ configurable: true
49171
+ });
49172
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "containerWidth", {
49173
+ get: function () {
49174
+ return this.signatureWidth || defaultWidth;
49175
+ },
49176
+ enumerable: false,
49177
+ configurable: true
49178
+ });
49179
+ Object.defineProperty(QuestionSignaturePadModel.prototype, "renderedCanvasWidth", {
49180
+ get: function () {
49181
+ return this.signatureAutoScaleEnabled ? "100%" : this.containerWidth + "px";
49182
+ },
49183
+ enumerable: false,
49184
+ configurable: true
49185
+ });
49008
49186
  Object.defineProperty(QuestionSignaturePadModel.prototype, "height", {
49009
49187
  //todo: need to remove this property
49010
49188
  get: function () {
@@ -49125,6 +49303,15 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49125
49303
  __decorate([
49126
49304
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
49127
49305
  ], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
49306
+ __decorate([
49307
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49308
+ ], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
49309
+ __decorate([
49310
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49311
+ ], QuestionSignaturePadModel.prototype, "penMinWidth", void 0);
49312
+ __decorate([
49313
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49314
+ ], QuestionSignaturePadModel.prototype, "penMaxWidth", void 0);
49128
49315
  __decorate([
49129
49316
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({})
49130
49317
  ], QuestionSignaturePadModel.prototype, "showPlaceholder", void 0);
@@ -49153,6 +49340,21 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
49153
49340
  category: "general",
49154
49341
  default: 200,
49155
49342
  },
49343
+ {
49344
+ name: "signatureAutoScaleEnabled:boolean",
49345
+ category: "general",
49346
+ default: false,
49347
+ },
49348
+ {
49349
+ name: "penMinWidth:number",
49350
+ category: "general",
49351
+ default: 0.5,
49352
+ },
49353
+ {
49354
+ name: "penMaxWidth:number",
49355
+ category: "general",
49356
+ default: 2.5,
49357
+ },
49156
49358
  //need to remove this property
49157
49359
  {
49158
49360
  name: "height:number",
@@ -49459,7 +49661,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
49459
49661
  ], QuestionTagboxModel.prototype, "allowClear", void 0);
49460
49662
  __decorate([
49461
49663
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
49462
- defaultValue: true,
49463
49664
  onSet: function (newValue, target) {
49464
49665
  if (!!target.dropdownListModel) {
49465
49666
  target.dropdownListModel.setSearchEnabled(newValue);
@@ -49480,7 +49681,7 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
49480
49681
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49481
49682
  ], QuestionTagboxModel.prototype, "choicesLazyLoadEnabled", void 0);
49482
49683
  __decorate([
49483
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: 25 })
49684
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49484
49685
  ], QuestionTagboxModel.prototype, "choicesLazyLoadPageSize", void 0);
49485
49686
  __decorate([
49486
49687
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ getDefaultValue: function () { return _settings__WEBPACK_IMPORTED_MODULE_5__["settings"].tagboxCloseOnSelect; } })
@@ -50522,6 +50723,8 @@ __webpack_require__.r(__webpack_exports__);
50522
50723
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return ElementFactory; });
50523
50724
  /* harmony import */ var _surveyStrings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./surveyStrings */ "./src/surveyStrings.ts");
50524
50725
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
50726
+ /* harmony import */ var _question_custom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question_custom */ "./src/question_custom.ts");
50727
+
50525
50728
 
50526
50729
 
50527
50730
  var QuestionFactory = /** @class */ (function () {
@@ -50623,6 +50826,9 @@ var ElementFactory = /** @class */ (function () {
50623
50826
  var creator = this.creatorHash[elementType];
50624
50827
  if (!!creator)
50625
50828
  return creator(name);
50829
+ var compJSON = _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.getCustomQuestionByName(elementType);
50830
+ if (!!compJSON)
50831
+ return _question_custom__WEBPACK_IMPORTED_MODULE_2__["ComponentCollection"].Instance.createQuestion(name, compJSON);
50626
50832
  return null;
50627
50833
  };
50628
50834
  ElementFactory.Instance = new ElementFactory();
@@ -51365,6 +51571,11 @@ var settings = {
51365
51571
  * Default value: `"none"`
51366
51572
  */
51367
51573
  noneItemValue: "none",
51574
+ specialChoicesOrder: {
51575
+ selectAllItem: [-1],
51576
+ noneItem: [1],
51577
+ otherItem: [2]
51578
+ },
51368
51579
  /**
51369
51580
  * A list of supported validators by question type.
51370
51581
  */
@@ -53717,16 +53928,16 @@ var SurveyModel = /** @class */ (function (_super) {
53717
53928
  *
53718
53929
  * For information on event handler parameters, refer to descriptions within the interface.
53719
53930
  *
53720
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
53931
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
53721
53932
  * @see css
53722
53933
  */
53723
53934
  _this.onUpdateQuestionCssClasses = _this.addEvent();
53724
53935
  /**
53725
- * An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
53936
+ * An event that is raised before rendering a standalone panel and panels within [Dynamic Panel](https://surveyjs.io/form-library/examples/duplicate-group-of-fields-in-form/). Use it to override default panel CSS classes.
53726
53937
  *
53727
53938
  * For information on event handler parameters, refer to descriptions within the interface.
53728
53939
  *
53729
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
53940
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
53730
53941
  * @see css
53731
53942
  */
53732
53943
  _this.onUpdatePanelCssClasses = _this.addEvent();
@@ -53735,7 +53946,7 @@ var SurveyModel = /** @class */ (function (_super) {
53735
53946
  *
53736
53947
  * For information on event handler parameters, refer to descriptions within the interface.
53737
53948
  *
53738
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
53949
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
53739
53950
  * @see css
53740
53951
  */
53741
53952
  _this.onUpdatePageCssClasses = _this.addEvent();
@@ -53744,7 +53955,7 @@ var SurveyModel = /** @class */ (function (_super) {
53744
53955
  *
53745
53956
  * For information on event handler parameters, refer to descriptions within the interface.
53746
53957
  *
53747
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
53958
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
53748
53959
  * @see css
53749
53960
  */
53750
53961
  _this.onUpdateChoiceItemCss = _this.addEvent();
@@ -53836,7 +54047,7 @@ var SurveyModel = /** @class */ (function (_super) {
53836
54047
  */
53837
54048
  _this.onMatrixRowAdding = _this.addEvent();
53838
54049
  /**
53839
- * This event is obsolete. Use the [`onMatrixRowAdding`](/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
54050
+ * This event is obsolete. Use the [`onMatrixRowAdding`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRowAdding) event instead.
53840
54051
  */
53841
54052
  _this.onMatrixBeforeRowAdded = _this.onMatrixRowAdding;
53842
54053
  /**
@@ -53856,7 +54067,7 @@ var SurveyModel = /** @class */ (function (_super) {
53856
54067
  */
53857
54068
  _this.onMatrixRenderRemoveButton = _this.addEvent();
53858
54069
  /**
53859
- * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
54070
+ * This event is obsolete. Use the [`onMatrixRenderRemoveButton`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onMatrixRenderRemoveButton) event instead.
53860
54071
  */
53861
54072
  _this.onMatrixAllowRemoveRow = _this.onMatrixRenderRemoveButton;
53862
54073
  /**
@@ -53875,7 +54086,7 @@ var SurveyModel = /** @class */ (function (_super) {
53875
54086
  */
53876
54087
  _this.onAfterRenderMatrixCell = _this.addEvent();
53877
54088
  /**
53878
- * This event is obsolete. Use the [`onAfterRenderMatrixCell`](/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
54089
+ * This event is obsolete. Use the [`onAfterRenderMatrixCell`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onAfterRenderMatrixCell) event instead.
53879
54090
  */
53880
54091
  _this.onMatrixAfterCellRender = _this.onAfterRenderMatrixCell;
53881
54092
  /**
@@ -53933,7 +54144,7 @@ var SurveyModel = /** @class */ (function (_super) {
53933
54144
  *
53934
54145
  * For information on event handler parameters, refer to descriptions within the interface.
53935
54146
  *
53936
- * [View Demo](/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
54147
+ * [View Demo](https://surveyjs.io/form-library/examples/tabbed-interface-for-duplicate-group-option/ (linkStyle))
53937
54148
  */
53938
54149
  _this.onGetDynamicPanelTabTitle = _this.addEvent();
53939
54150
  /**
@@ -54362,7 +54573,7 @@ var SurveyModel = /** @class */ (function (_super) {
54362
54573
  /**
54363
54574
  * Gets or sets an object in which keys are UI elements and values are CSS classes applied to them.
54364
54575
  *
54365
- * [View Demo](/form-library/examples/customize-survey-with-css/ (linkStyle))
54576
+ * [View Demo](https://surveyjs.io/form-library/examples/customize-survey-with-css/ (linkStyle))
54366
54577
  */
54367
54578
  get: function () {
54368
54579
  if (!this.cssValue) {
@@ -57022,13 +57233,13 @@ var SurveyModel = /** @class */ (function (_super) {
57022
57233
  }
57023
57234
  this.setPropertyValue("completedStateText", text);
57024
57235
  if (this.state === "completed" && this.showCompletedPage && !!this.completedState) {
57025
- this.notify(this.completedStateText, this.completedState, true);
57236
+ this.notify(this.completedStateText, this.completedState, value === "error");
57026
57237
  }
57027
57238
  };
57028
57239
  SurveyModel.prototype.notify = function (message, type, showActions) {
57029
57240
  if (showActions === void 0) { showActions = false; }
57030
57241
  this.notifier.showActions = showActions;
57031
- this.notifier.notify(message, type, type === "error");
57242
+ this.notifier.notify(message, type, showActions);
57032
57243
  };
57033
57244
  /**
57034
57245
  * Resets the survey [`state`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#state) and, optionally, [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data). If `state` is `"completed"`, it becomes `"running"`.
@@ -57818,7 +58029,7 @@ var SurveyModel = /** @class */ (function (_super) {
57818
58029
  }
57819
58030
  else {
57820
58031
  if (this.runningPages) {
57821
- this.restoreOrigionalPages(this.runningPages);
58032
+ this.restoreOriginalPages(this.runningPages);
57822
58033
  }
57823
58034
  this.runningPages = undefined;
57824
58035
  }
@@ -57846,7 +58057,7 @@ var SurveyModel = /** @class */ (function (_super) {
57846
58057
  return;
57847
58058
  if (this.questionsOnPageMode == "standard" || this.isDesignMode) {
57848
58059
  if (this.origionalPages) {
57849
- this.restoreOrigionalPages(this.origionalPages);
58060
+ this.restoreOriginalPages(this.origionalPages);
57850
58061
  }
57851
58062
  this.origionalPages = undefined;
57852
58063
  }
@@ -57859,11 +58070,13 @@ var SurveyModel = /** @class */ (function (_super) {
57859
58070
  this.runConditions();
57860
58071
  this.updateVisibleIndexes();
57861
58072
  };
57862
- SurveyModel.prototype.restoreOrigionalPages = function (originalPages) {
58073
+ SurveyModel.prototype.restoreOriginalPages = function (originalPages) {
57863
58074
  this.questionHashesClear();
57864
58075
  this.pages.splice(0, this.pages.length);
57865
58076
  for (var i = 0; i < originalPages.length; i++) {
57866
- this.pages.push(originalPages[i]);
58077
+ var page = originalPages[i];
58078
+ page.setWasShown(false);
58079
+ this.pages.push(page);
57867
58080
  }
57868
58081
  };
57869
58082
  SurveyModel.prototype.getPageStartIndex = function () {
@@ -61179,8 +61392,8 @@ var SurveyModel = /** @class */ (function (_super) {
61179
61392
  /**
61180
61393
  * Applies a specified theme to the survey.
61181
61394
  *
61182
- * [Themes & Styles](/form-library/documentation/manage-default-themes-and-styles (linkStyle))
61183
- * @param theme An [`ITheme`](/form-library/documentation/api-reference/itheme) object with theme settings.
61395
+ * [Themes & Styles](https://surveyjs.io/form-library/documentation/manage-default-themes-and-styles (linkStyle))
61396
+ * @param theme An [`ITheme`](https://surveyjs.io/form-library/documentation/api-reference/itheme) object with theme settings.
61184
61397
  */
61185
61398
  SurveyModel.prototype.applyTheme = function (theme) {
61186
61399
  var _this = this;