survey-core 1.11.9 → 1.11.10

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 (240) hide show
  1. package/defaultV2.css +17 -2
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +17 -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/philippines.js +1 -1
  72. package/i18n/philippines.min.js +1 -1
  73. package/i18n/polish.js +1 -1
  74. package/i18n/polish.min.js +1 -1
  75. package/i18n/portuguese-br.js +1 -1
  76. package/i18n/portuguese-br.min.js +1 -1
  77. package/i18n/portuguese.js +1 -1
  78. package/i18n/portuguese.min.js +1 -1
  79. package/i18n/romanian.js +1 -1
  80. package/i18n/romanian.min.js +1 -1
  81. package/i18n/russian.js +1 -1
  82. package/i18n/russian.min.js +1 -1
  83. package/i18n/serbian.js +1 -1
  84. package/i18n/serbian.min.js +1 -1
  85. package/i18n/simplified-chinese.js +1 -1
  86. package/i18n/simplified-chinese.min.js +1 -1
  87. package/i18n/slovak.js +1 -1
  88. package/i18n/slovak.min.js +1 -1
  89. package/i18n/spanish.js +1 -1
  90. package/i18n/spanish.min.js +1 -1
  91. package/i18n/swahili.js +1 -1
  92. package/i18n/swahili.min.js +1 -1
  93. package/i18n/swedish.js +1 -1
  94. package/i18n/swedish.min.js +1 -1
  95. package/i18n/tajik.js +1 -1
  96. package/i18n/tajik.min.js +1 -1
  97. package/i18n/telugu.js +1 -1
  98. package/i18n/telugu.min.js +1 -1
  99. package/i18n/thai.js +1 -1
  100. package/i18n/thai.min.js +1 -1
  101. package/i18n/traditional-chinese.js +1 -1
  102. package/i18n/traditional-chinese.min.js +1 -1
  103. package/i18n/turkish.js +1 -1
  104. package/i18n/turkish.min.js +1 -1
  105. package/i18n/ukrainian.js +1 -1
  106. package/i18n/ukrainian.min.js +1 -1
  107. package/i18n/urdu.js +1 -1
  108. package/i18n/urdu.min.js +1 -1
  109. package/i18n/vietnamese.js +1 -1
  110. package/i18n/vietnamese.min.js +1 -1
  111. package/i18n/welsh.js +1 -1
  112. package/i18n/welsh.min.js +1 -1
  113. package/modern.css +1 -1
  114. package/modern.fontless.css +1 -1
  115. package/modern.fontless.min.css +1 -1
  116. package/modern.min.css +1 -1
  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 +226 -93
  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-interfaces.d.ts +8 -0
  212. package/ts3.4/typings/dragdrop/core.d.ts +1 -0
  213. package/ts3.4/typings/dropdownListModel.d.ts +1 -0
  214. package/ts3.4/typings/expressions/expressions.d.ts +0 -3
  215. package/ts3.4/typings/helpers.d.ts +2 -0
  216. package/ts3.4/typings/popup-dropdown-view-model.d.ts +2 -1
  217. package/ts3.4/typings/popup.d.ts +2 -1
  218. package/ts3.4/typings/question.d.ts +2 -1
  219. package/ts3.4/typings/question_file.d.ts +5 -4
  220. package/ts3.4/typings/question_matrix.d.ts +2 -2
  221. package/ts3.4/typings/question_signaturepad.d.ts +2 -0
  222. package/ts3.4/typings/settings.d.ts +25 -0
  223. package/ts3.4/typings/survey-events-api.d.ts +26 -0
  224. package/ts3.4/typings/survey.d.ts +12 -3
  225. package/ts3.4/typings/utils/utils.d.ts +1 -0
  226. package/typings/base-interfaces.d.ts +8 -0
  227. package/typings/dragdrop/core.d.ts +1 -0
  228. package/typings/dropdownListModel.d.ts +1 -0
  229. package/typings/expressions/expressions.d.ts +0 -3
  230. package/typings/helpers.d.ts +2 -0
  231. package/typings/popup-dropdown-view-model.d.ts +2 -1
  232. package/typings/popup.d.ts +2 -1
  233. package/typings/question.d.ts +2 -1
  234. package/typings/question_file.d.ts +6 -5
  235. package/typings/question_matrix.d.ts +2 -2
  236. package/typings/question_signaturepad.d.ts +2 -0
  237. package/typings/settings.d.ts +25 -0
  238. package/typings/survey-events-api.d.ts +26 -0
  239. package/typings/survey.d.ts +12 -3
  240. package/typings/utils/utils.d.ts +1 -0
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.9
2
+ * surveyjs - Survey JavaScript library v1.11.10
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
  */
@@ -7142,6 +7142,7 @@ var DragDropCore = /** @class */ (function () {
7142
7142
  this.onGhostPositionChanged = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
7143
7143
  this.onDragStart = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
7144
7144
  this.onDragEnd = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
7145
+ this.onDragClear = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
7145
7146
  this.onBeforeDrop = this.onDragStart;
7146
7147
  this.onAfterDrop = this.onDragEnd;
7147
7148
  this.draggedElement = null;
@@ -7201,6 +7202,8 @@ var DragDropCore = /** @class */ (function () {
7201
7202
  var shortcutText = this.getShortcutText(this.draggedElement);
7202
7203
  this.domAdapter.draggedElementShortcut = this.createDraggedElementShortcut(shortcutText, draggedElementNode, event);
7203
7204
  this.onStartDrag(event);
7205
+ var fromElement = this.draggedElement && this.draggedElement.parent;
7206
+ this.onDragStart.fire(this, { fromElement: fromElement, draggedElement: this.draggedElement });
7204
7207
  };
7205
7208
  DragDropCore.prototype.onStartDrag = function (event) {
7206
7209
  };
@@ -7294,7 +7297,6 @@ var DragDropCore = /** @class */ (function () {
7294
7297
  DragDropCore.prototype.drop = function () {
7295
7298
  if (this.allowDropHere) {
7296
7299
  var fromElement = this.draggedElement.parent;
7297
- this.onDragStart.fire(this, { fromElement: fromElement, draggedElement: this.draggedElement });
7298
7300
  var newElement = this.doDrop();
7299
7301
  this.onDragEnd.fire(this, { fromElement: fromElement, draggedElement: newElement, toElement: this.dropTarget });
7300
7302
  }
@@ -7305,6 +7307,7 @@ var DragDropCore = /** @class */ (function () {
7305
7307
  this.draggedElement = null;
7306
7308
  this.isBottom = null;
7307
7309
  this.parentElement = null;
7310
+ this.onDragClear.fire(this, {});
7308
7311
  };
7309
7312
  return DragDropCore;
7310
7313
  }());
@@ -8159,11 +8162,12 @@ __webpack_require__.r(__webpack_exports__);
8159
8162
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
8160
8163
  /* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./list */ "./src/list.ts");
8161
8164
  /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./popup */ "./src/popup.ts");
8162
- /* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
8163
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
8164
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
8165
- /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
8166
- /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
8165
+ /* harmony import */ var _popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./popup-dropdown-view-model */ "./src/popup-dropdown-view-model.ts");
8166
+ /* harmony import */ var _question_dropdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./question_dropdown */ "./src/question_dropdown.ts");
8167
+ /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
8168
+ /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
8169
+ /* harmony import */ var _utils_devices__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./utils/devices */ "./src/utils/devices.ts");
8170
+ /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
8167
8171
  var __extends = (undefined && undefined.__extends) || (function () {
8168
8172
  var extendStatics = function (d, b) {
8169
8173
  extendStatics = Object.setPrototypeOf ||
@@ -8196,6 +8200,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
8196
8200
 
8197
8201
 
8198
8202
 
8203
+
8199
8204
  var DropdownListModel = /** @class */ (function (_super) {
8200
8205
  __extends(DropdownListModel, _super);
8201
8206
  function DropdownListModel(question, onSelectionChanged) {
@@ -8240,7 +8245,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8240
8245
  configurable: true
8241
8246
  });
8242
8247
  DropdownListModel.prototype.getFocusFirstInputSelector = function () {
8243
- if (_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"]) {
8248
+ if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"]) {
8244
8249
  return this.isValueEmpty(this.question.value) ? this.itemSelector : this.selectedItemSelector;
8245
8250
  }
8246
8251
  else {
@@ -8280,14 +8285,14 @@ var DropdownListModel = /** @class */ (function (_super) {
8280
8285
  var _this = this;
8281
8286
  var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
8282
8287
  if (!this.itemsSettings.skip || isUpdate) {
8283
- if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
8288
+ if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].dropdownSearchDelay > 0) {
8284
8289
  if (!!this.timer) {
8285
8290
  clearTimeout(this.timer);
8286
8291
  this.timer = undefined;
8287
8292
  }
8288
8293
  this.timer = setTimeout(function () {
8289
8294
  _this.loadQuestionChoices(callbackAfterItemsLoaded);
8290
- }, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay);
8295
+ }, _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].dropdownSearchDelay);
8291
8296
  }
8292
8297
  else {
8293
8298
  this.loadQuestionChoices(callbackAfterItemsLoaded);
@@ -8297,15 +8302,33 @@ var DropdownListModel = /** @class */ (function (_super) {
8297
8302
  DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
8298
8303
  this._popupModel.focusFirstInputSelector = this.focusFirstInputSelector;
8299
8304
  };
8305
+ DropdownListModel.prototype.getDropdownMenuOptions = function () {
8306
+ var windowWidth = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomWindowHelper"].getInnerWidth();
8307
+ var windowHeight = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomWindowHelper"].getInnerHeight();
8308
+ var isTablet = Object(_popup_dropdown_view_model__WEBPACK_IMPORTED_MODULE_6__["calculateIsTablet"])(windowWidth, windowHeight);
8309
+ var menuType = "dropdown";
8310
+ var deviceType = "desktop";
8311
+ if (_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"]) {
8312
+ menuType = isTablet ? "popup" : "overlay";
8313
+ deviceType = isTablet ? "tablet" : "mobile";
8314
+ }
8315
+ return {
8316
+ menuType: menuType,
8317
+ deviceType: deviceType,
8318
+ hasTouchScreen: _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"],
8319
+ screenHeight: windowHeight,
8320
+ screenWidth: windowWidth
8321
+ };
8322
+ };
8300
8323
  DropdownListModel.prototype.createPopup = function () {
8301
8324
  var _this = this;
8302
8325
  var popupOptions = { verticalPosition: "bottom", horizontalPosition: "center", showPointer: false };
8303
8326
  this._popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel }, popupOptions);
8304
- this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"] ? "overlay" : "popup";
8327
+ this._popupModel.displayMode = _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"] ? "overlay" : "popup";
8305
8328
  this._popupModel.positionMode = "fixed";
8306
8329
  this._popupModel.isFocusedContainer = false;
8307
- this._popupModel.isFocusedContent = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"];
8308
- this._popupModel.setWidthByTarget = !_utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"];
8330
+ this._popupModel.isFocusedContent = _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"];
8331
+ this._popupModel.setWidthByTarget = !_utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"];
8309
8332
  this._popupModel.locale = this.question.getLocale();
8310
8333
  this.updatePopupFocusFirstInputSelector();
8311
8334
  this.listModel.registerPropertyChangedHandlers(["showFilter"], function () {
@@ -8321,9 +8344,14 @@ var DropdownListModel = /** @class */ (function (_super) {
8321
8344
  _this.resetItemsSettings();
8322
8345
  _this.updateQuestionChoices();
8323
8346
  }
8324
- if (option.isVisible && !!_this.question.onOpenedCallBack) {
8347
+ if (option.isVisible) {
8325
8348
  _this.updatePopupFocusFirstInputSelector();
8326
- _this.question.onOpenedCallBack();
8349
+ var dropdownMenuOptions = _this.getDropdownMenuOptions();
8350
+ _this.question.processOpenDropdownMenu(dropdownMenuOptions);
8351
+ _this._popupModel.updateDisplayMode(dropdownMenuOptions.menuType);
8352
+ if (!!_this.question.onOpenedCallBack) {
8353
+ _this.question.onOpenedCallBack();
8354
+ }
8327
8355
  }
8328
8356
  if (!option.isVisible) {
8329
8357
  _this.onHidePopup();
@@ -8372,7 +8400,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8372
8400
  if (_this.filteredItems)
8373
8401
  return _this.filteredItems.indexOf(item) >= 0;
8374
8402
  var textInLow = item.text.toLocaleLowerCase();
8375
- textInLow = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
8403
+ textInLow = _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].comparator.normalizeTextCallback(textInLow, "filter");
8376
8404
  var index = textInLow.indexOf(textToSearch.toLocaleLowerCase());
8377
8405
  return _this.question.searchMode == "startsWith" ? index == 0 : index > -1;
8378
8406
  });
@@ -8417,7 +8445,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8417
8445
  model.actions.forEach(function (a) { return a.disableTabStop = true; });
8418
8446
  };
8419
8447
  DropdownListModel.prototype.updateCssClasses = function (popupCssClass, listCssClasses) {
8420
- this.popupModel.cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_8__["CssClassBuilder"]().append(popupCssClass).append(this.popupCssClasses).toString();
8448
+ this.popupModel.cssClass = new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(popupCssClass).append(this.popupCssClasses).toString();
8421
8449
  this.listModel.cssClasses = listCssClasses;
8422
8450
  };
8423
8451
  DropdownListModel.prototype.resetFilterString = function () {
@@ -8618,14 +8646,14 @@ var DropdownListModel = /** @class */ (function (_super) {
8618
8646
  });
8619
8647
  Object.defineProperty(DropdownListModel.prototype, "inputMode", {
8620
8648
  get: function () {
8621
- return _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"] ? "none" : "text";
8649
+ return _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"] ? "none" : "text";
8622
8650
  },
8623
8651
  enumerable: false,
8624
8652
  configurable: true
8625
8653
  });
8626
8654
  DropdownListModel.prototype.setSearchEnabled = function (newValue) {
8627
- this.listModel.searchEnabled = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"];
8628
- this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"];
8655
+ this.listModel.searchEnabled = _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"];
8656
+ this.listModel.showSearchClearButton = _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"];
8629
8657
  this.searchEnabled = newValue;
8630
8658
  };
8631
8659
  DropdownListModel.prototype.setChoicesLazyLoadEnabled = function (newValue) {
@@ -8736,7 +8764,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8736
8764
  event.stopPropagation();
8737
8765
  }
8738
8766
  else if (this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32 && (!this.question.searchEnabled || !this.inputString))) {
8739
- if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_6__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
8767
+ if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_7__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
8740
8768
  this._popupModel.hide();
8741
8769
  this.onClear(event);
8742
8770
  }
@@ -8765,7 +8793,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8765
8793
  if (event.keyCode === 32 && this.question.searchEnabled) {
8766
8794
  return;
8767
8795
  }
8768
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
8796
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["doKey2ClickUp"])(event, { processEsc: false, disableTabStop: this.question.isInputReadOnly });
8769
8797
  }
8770
8798
  };
8771
8799
  DropdownListModel.prototype.onEscape = function () {
@@ -8780,11 +8808,11 @@ var DropdownListModel = /** @class */ (function (_super) {
8780
8808
  };
8781
8809
  DropdownListModel.prototype.onBlur = function (event) {
8782
8810
  this.focused = false;
8783
- if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_9__["IsTouch"]) {
8811
+ if (this.popupModel.isVisible && _utils_devices__WEBPACK_IMPORTED_MODULE_10__["IsTouch"]) {
8784
8812
  this._popupModel.show();
8785
8813
  return;
8786
8814
  }
8787
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_10__["doKey2ClickBlur"])(event);
8815
+ Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["doKey2ClickBlur"])(event);
8788
8816
  this._popupModel.hide();
8789
8817
  this.resetFilterString();
8790
8818
  this.inputString = null;
@@ -9847,8 +9875,8 @@ __webpack_require__.r(__webpack_exports__);
9847
9875
 
9848
9876
  var Version;
9849
9877
  var ReleaseDate;
9850
- Version = "" + "1.11.9";
9851
- ReleaseDate = "" + "2024-07-30";
9878
+ Version = "" + "1.11.10";
9879
+ ReleaseDate = "" + "2024-08-06";
9852
9880
  function checkLibraryVersion(ver, libraryName) {
9853
9881
  if (Version != ver) {
9854
9882
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -14825,18 +14853,20 @@ var Const = /** @class */ (function (_super) {
14825
14853
  Const.prototype.getCorrectValue = function (value) {
14826
14854
  if (!value || typeof value != "string")
14827
14855
  return value;
14828
- if (this.isBooleanValue(value))
14856
+ if (OperandMaker.isBooleanValue(value))
14829
14857
  return value.toLowerCase() === "true";
14830
14858
  if (value.length > 1 &&
14831
14859
  this.isQuote(value[0]) &&
14832
14860
  this.isQuote(value[value.length - 1]))
14833
14861
  return value.substring(1, value.length - 1);
14834
- if (OperandMaker.isNumeric(value)) {
14835
- if (value.indexOf("0x") == 0)
14836
- return parseInt(value);
14837
- if (value.length > 1 && value[0] == "0" && (value.length < 2 || (value[1] !== "." && value[1] !== ",")))
14838
- return value;
14839
- return parseFloat(value);
14862
+ if (_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value)) {
14863
+ if (value[0] === "0" && value.indexOf("0x") != 0) {
14864
+ var len = value.length;
14865
+ var hasPoint = len > 1 && (value[1] === "." || value[1] === ",");
14866
+ if (!hasPoint && len > 1 || hasPoint && len < 2)
14867
+ return value;
14868
+ }
14869
+ return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].getNumber(value);
14840
14870
  }
14841
14871
  return value;
14842
14872
  };
@@ -14847,10 +14877,6 @@ var Const = /** @class */ (function (_super) {
14847
14877
  Const.prototype.isQuote = function (ch) {
14848
14878
  return ch == "'" || ch == '"';
14849
14879
  };
14850
- Const.prototype.isBooleanValue = function (value) {
14851
- return (value &&
14852
- (value.toLowerCase() === "true" || value.toLowerCase() === "false"));
14853
- };
14854
14880
  return Const;
14855
14881
  }(Operand));
14856
14882
 
@@ -15008,27 +15034,11 @@ var OperandMaker = /** @class */ (function () {
15008
15034
  };
15009
15035
  OperandMaker.toOperandString = function (value) {
15010
15036
  if (!!value &&
15011
- !OperandMaker.isNumeric(value) &&
15037
+ !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value) &&
15012
15038
  !OperandMaker.isBooleanValue(value))
15013
15039
  value = "'" + value + "'";
15014
15040
  return value;
15015
15041
  };
15016
- OperandMaker.isSpaceString = function (str) {
15017
- return !!str && !str.replace(" ", "");
15018
- };
15019
- OperandMaker.isNumeric = function (value) {
15020
- if (!!value &&
15021
- (value.indexOf("-") > -1 ||
15022
- value.indexOf("+") > 1 ||
15023
- value.indexOf("*") > -1 ||
15024
- value.indexOf("^") > -1 ||
15025
- value.indexOf("/") > -1 ||
15026
- value.indexOf("%") > -1))
15027
- return false;
15028
- if (OperandMaker.isSpaceString(value))
15029
- return false;
15030
- return _helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isNumber(value);
15031
- };
15032
15042
  OperandMaker.isBooleanValue = function (value) {
15033
15043
  return (!!value &&
15034
15044
  (value.toLowerCase() === "true" || value.toLowerCase() === "false"));
@@ -16644,17 +16654,39 @@ var Helpers = /** @class */ (function () {
16644
16654
  return !isNaN(this.getNumber(value));
16645
16655
  };
16646
16656
  Helpers.getNumber = function (value) {
16647
- if (typeof value == "string" &&
16648
- !!value &&
16649
- value.indexOf("0x") == 0 &&
16650
- value.length > 32)
16651
- return NaN;
16657
+ var newValue = Helpers.getNumberCore(value);
16658
+ return _settings__WEBPACK_IMPORTED_MODULE_0__["settings"].parseNumber(value, newValue);
16659
+ };
16660
+ Helpers.getNumberCore = function (value) {
16661
+ if (typeof value == "string") {
16662
+ if (!value.trim())
16663
+ return NaN;
16664
+ if (value.indexOf("0x") == 0) {
16665
+ if (value.length > 32)
16666
+ return NaN;
16667
+ return parseInt(value);
16668
+ }
16669
+ if (Helpers.isStringHasOperator(value))
16670
+ return NaN;
16671
+ }
16652
16672
  value = this.prepareStringToNumber(value);
16653
16673
  var res = parseFloat(value);
16654
16674
  if (isNaN(res) || !isFinite(value))
16655
16675
  return NaN;
16656
16676
  return res;
16657
16677
  };
16678
+ Helpers.isStringHasOperator = function (str) {
16679
+ if (str.lastIndexOf("-") > 0)
16680
+ return false;
16681
+ if (str.lastIndexOf("+") > 0)
16682
+ return false;
16683
+ var operators = "*^/%";
16684
+ for (var i = 0; i < operators.length; i++) {
16685
+ if (str.indexOf(operators[i]) > -1)
16686
+ return true;
16687
+ }
16688
+ return false;
16689
+ };
16658
16690
  Helpers.prepareStringToNumber = function (val) {
16659
16691
  if (typeof val !== "string" || !val)
16660
16692
  return val;
@@ -27022,11 +27054,12 @@ _questionfactory__WEBPACK_IMPORTED_MODULE_5__["ElementFactory"].Instance.registe
27022
27054
  /*!******************************************!*\
27023
27055
  !*** ./src/popup-dropdown-view-model.ts ***!
27024
27056
  \******************************************/
27025
- /*! exports provided: PopupDropdownViewModel */
27057
+ /*! exports provided: calculateIsTablet, PopupDropdownViewModel */
27026
27058
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27027
27059
 
27028
27060
  "use strict";
27029
27061
  __webpack_require__.r(__webpack_exports__);
27062
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateIsTablet", function() { return calculateIsTablet; });
27030
27063
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return PopupDropdownViewModel; });
27031
27064
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
27032
27065
  /* harmony import */ var _utils_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/popup */ "./src/utils/popup.ts");
@@ -27063,6 +27096,13 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
27063
27096
 
27064
27097
 
27065
27098
 
27099
+ function calculateIsTablet(windowWidth, windowHeight) {
27100
+ var _windowWidth = windowWidth || _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerWidth();
27101
+ var _windowHeight = windowHeight || _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight();
27102
+ var width = Math.min(_windowWidth, _windowHeight);
27103
+ var isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
27104
+ return isTablet;
27105
+ }
27066
27106
  var PopupDropdownViewModel = /** @class */ (function (_super) {
27067
27107
  __extends(PopupDropdownViewModel, _super);
27068
27108
  function PopupDropdownViewModel(model, targetElement, areaElement) {
@@ -27103,8 +27143,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27103
27143
  return _this;
27104
27144
  }
27105
27145
  PopupDropdownViewModel.prototype.calculateIsTablet = function (windowWidth, windowHeight) {
27106
- var width = Math.min(windowWidth, windowHeight);
27107
- this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
27146
+ this.isTablet = calculateIsTablet(windowWidth, windowHeight);
27108
27147
  };
27109
27148
  PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
27110
27149
  if (this.areaElement) {
@@ -27194,10 +27233,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27194
27233
  return actualHorizontalPosition;
27195
27234
  };
27196
27235
  PopupDropdownViewModel.prototype.getStyleClass = function () {
27236
+ var overlayMode = this.model.overlayDisplayMode;
27197
27237
  return _super.prototype.getStyleClass.call(this)
27198
27238
  .append("sv-popup--dropdown", !this.isOverlay)
27199
- .append("sv-popup--dropdown-overlay", this.isOverlay && this.model.overlayDisplayMode !== "overlay")
27200
- .append("sv-popup--tablet", this.isTablet && this.isOverlay)
27239
+ .append("sv-popup--dropdown-overlay", this.isOverlay && overlayMode !== "plain")
27240
+ .append("sv-popup--tablet", this.isOverlay && (overlayMode == "tablet-dropdown-overlay" || (overlayMode == "auto" && this.isTablet)))
27201
27241
  .append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
27202
27242
  .append("sv-popup--" + this.popupDirection, !this.isOverlay && (this.showHeader || this.popupDirection == "top" || this.popupDirection == "bottom"));
27203
27243
  };
@@ -27235,7 +27275,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27235
27275
  this.container.addEventListener("touchstart", this.touchStartEventCallback);
27236
27276
  this.container.addEventListener("touchmove", this.touchMoveEventCallback);
27237
27277
  }
27238
- this.calculateIsTablet(_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerWidth(), _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight());
27278
+ this.calculateIsTablet();
27239
27279
  this.resizeEventCallback();
27240
27280
  }
27241
27281
  _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].addEventListener("scroll", this.scrollEventCallBack);
@@ -28480,6 +28520,24 @@ var PopupModel = /** @class */ (function (_super) {
28480
28520
  this.onFooterActionsCreated.fire(this, options);
28481
28521
  return options.actions;
28482
28522
  };
28523
+ PopupModel.prototype.updateDisplayMode = function (menuType) {
28524
+ switch (menuType) {
28525
+ case "dropdown": {
28526
+ this.displayMode = "popup";
28527
+ break;
28528
+ }
28529
+ case "popup": {
28530
+ this.displayMode = "overlay";
28531
+ this.overlayDisplayMode = "tablet-dropdown-overlay";
28532
+ break;
28533
+ }
28534
+ case "overlay": {
28535
+ this.displayMode = "overlay";
28536
+ this.overlayDisplayMode = "dropdown-overlay";
28537
+ break;
28538
+ }
28539
+ }
28540
+ };
28483
28541
  PopupModel.prototype.onHiding = function () {
28484
28542
  this.refreshInnerModel();
28485
28543
  this.onHide();
@@ -31779,6 +31837,9 @@ var Question = /** @class */ (function (_super) {
31779
31837
  Question.prototype.processPopupVisiblilityChanged = function (popupModel, visible) {
31780
31838
  this.survey.processPopupVisiblityChanged(this, popupModel, visible);
31781
31839
  };
31840
+ Question.prototype.processOpenDropdownMenu = function (options) {
31841
+ this.survey.processOpenDropdownMenu(this, options);
31842
+ };
31782
31843
  Question.prototype.onTextKeyDownHandler = function (event) {
31783
31844
  if (event.keyCode === 13) {
31784
31845
  this.survey.questionEditFinishCallback(this, event);
@@ -32922,6 +32983,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32922
32983
  _super.prototype.runCondition.call(this, values, properties);
32923
32984
  this.runItemsEnableCondition(values, properties);
32924
32985
  this.runItemsCondition(values, properties);
32986
+ this.choices.forEach(function (item) {
32987
+ item.runConditionCore(values, properties);
32988
+ });
32925
32989
  };
32926
32990
  QuestionSelectBase.prototype.isTextValue = function () {
32927
32991
  return true; //for comments and others
@@ -39082,6 +39146,14 @@ var QuestionFileModelBase = /** @class */ (function (_super) {
39082
39146
  });
39083
39147
  }
39084
39148
  };
39149
+ QuestionFileModelBase.prototype.loadPreview = function (newValue) { };
39150
+ QuestionFileModelBase.prototype.onChangeQuestionValue = function (newValue) {
39151
+ _super.prototype.onChangeQuestionValue.call(this, newValue);
39152
+ this.stateChanged(this.isEmpty() ? "empty" : "loaded");
39153
+ if (!this.isLoadingFromJson) {
39154
+ this.loadPreview(newValue);
39155
+ }
39156
+ };
39085
39157
  __decorate([
39086
39158
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
39087
39159
  ], QuestionFileModelBase.prototype, "isUploading", void 0);
@@ -39265,6 +39337,15 @@ var QuestionFileModel = /** @class */ (function (_super) {
39265
39337
  _this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
39266
39338
  return _this;
39267
39339
  }
39340
+ Object.defineProperty(QuestionFileModel.prototype, "isFileLoading", {
39341
+ get: function () { return this.isFileLoadingValue; },
39342
+ set: function (val) {
39343
+ this.isFileLoadingValue = val;
39344
+ this.updateIsReady();
39345
+ },
39346
+ enumerable: false,
39347
+ configurable: true
39348
+ });
39268
39349
  Object.defineProperty(QuestionFileModel.prototype, "fileNavigatorVisible", {
39269
39350
  get: function () {
39270
39351
  var isUploading = this.isUploading;
@@ -39865,7 +39946,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
39865
39946
  }
39866
39947
  this.isFileLoading = true;
39867
39948
  this._previewLoader = new FileLoader(this, function (status, loaded) {
39868
- if (status === "loaded") {
39949
+ if (status !== "error") {
39869
39950
  loaded.forEach(function (val) {
39870
39951
  _this.previewValue.push(val);
39871
39952
  });
@@ -39879,15 +39960,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
39879
39960
  }
39880
39961
  this.previewValueChanged();
39881
39962
  };
39882
- Object.defineProperty(QuestionFileModel.prototype, "isFileLoading", {
39883
- get: function () { return this.isFileLoadingValue; },
39884
- set: function (val) {
39885
- this.isFileLoadingValue = val;
39886
- this.updateIsReady();
39887
- },
39888
- enumerable: false,
39889
- configurable: true
39890
- });
39891
39963
  QuestionFileModel.prototype.getIsQuestionReady = function () {
39892
39964
  return _super.prototype.getIsQuestionReady.call(this) && !this.isFileLoading;
39893
39965
  };
@@ -40003,13 +40075,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
40003
40075
  src.value = "";
40004
40076
  this.loadFiles(files);
40005
40077
  };
40006
- QuestionFileModel.prototype.onChangeQuestionValue = function (newValue) {
40007
- _super.prototype.onChangeQuestionValue.call(this, newValue);
40008
- this.stateChanged(this.isEmpty() ? "empty" : "loaded");
40009
- if (!this.isLoadingFromJson) {
40010
- this.loadPreview(newValue);
40011
- }
40012
- };
40013
40078
  QuestionFileModel.prototype.calcCssClasses = function (css) {
40014
40079
  var classes = _super.prototype.calcCssClasses.call(this, css);
40015
40080
  this.actionsContainer.cssClasses = css.actionBar;
@@ -40224,7 +40289,7 @@ var FileLoader = /** @class */ (function () {
40224
40289
  if (!_this.fileQuestion || !_this.callback) {
40225
40290
  return;
40226
40291
  }
40227
- if (status === "success") {
40292
+ if (status !== "error") {
40228
40293
  _this.loaded[index] = {
40229
40294
  content: data,
40230
40295
  name: value.name,
@@ -40232,7 +40297,7 @@ var FileLoader = /** @class */ (function () {
40232
40297
  };
40233
40298
  downloadedCount++;
40234
40299
  if (downloadedCount === files.length) {
40235
- _this.callback("loaded", _this.loaded);
40300
+ _this.callback(status, _this.loaded);
40236
40301
  }
40237
40302
  }
40238
40303
  else {
@@ -41760,8 +41825,8 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
41760
41825
  *
41761
41826
  * Possible values:
41762
41827
  *
41763
- * - "initial" (default) - Preserves the original order of the `rows` array.
41764
- * - "random" - Arranges matrix rows in random order each time the question is displayed.
41828
+ * - `"initial"` (default) - Preserves the original order of the `rows` array.
41829
+ * - `"random"` - Arranges matrix rows in random order each time the question is displayed.
41765
41830
  * @see rows
41766
41831
  */
41767
41832
  get: function () {
@@ -51214,7 +51279,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
51214
51279
  var panel = this.createNewPanel();
51215
51280
  this.panelsCore.push(panel);
51216
51281
  if (this.renderMode == "list" && this.panelsState != "default") {
51217
- if (this.panelsState === "expand") {
51282
+ if (this.panelsState === "expanded") {
51218
51283
  panel.expand();
51219
51284
  }
51220
51285
  else {
@@ -55381,6 +55446,28 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
55381
55446
  }
55382
55447
  }
55383
55448
  };
55449
+ QuestionSignaturePadModel.prototype.loadPreview = function (newValue) {
55450
+ var _this = this;
55451
+ if (!this.storeDataAsText) {
55452
+ var newValues = !!newValue ? [newValue] : [];
55453
+ if (!!this._previewLoader) {
55454
+ this._previewLoader.dispose();
55455
+ }
55456
+ this.isFileLoading = true;
55457
+ this._previewLoader = new _question_file__WEBPACK_IMPORTED_MODULE_5__["FileLoader"](this, function (status, loaded) {
55458
+ _this.isFileLoading = false;
55459
+ if (loaded && loaded.length > 0 && loaded[0].content && status === "success")
55460
+ _this.fromDataUrl(loaded[0].content);
55461
+ _this._previewLoader.dispose();
55462
+ _this._previewLoader = undefined;
55463
+ });
55464
+ this._previewLoader.load(newValues);
55465
+ }
55466
+ };
55467
+ QuestionSignaturePadModel.prototype.onSurveyLoad = function () {
55468
+ _super.prototype.onSurveyLoad.call(this);
55469
+ this.loadPreview(this.value);
55470
+ };
55384
55471
  QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
55385
55472
  var _this = this;
55386
55473
  var canvas = el.getElementsByTagName("canvas")[0];
@@ -57829,6 +57916,7 @@ var settings = {
57829
57916
  * const item = new ItemValue("item1");
57830
57917
  * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
57831
57918
  * ```
57919
+ * @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
57832
57920
  */
57833
57921
  serialization: {
57834
57922
  itemValueSerializeAsObject: false,
@@ -58395,7 +58483,31 @@ var settings = {
58395
58483
  * }
58396
58484
  * ```
58397
58485
  */
58398
- storeUtcDates: false
58486
+ storeUtcDates: false,
58487
+ /**
58488
+ * A function that allows you to define custom parsing rules for numbers represented as string values.
58489
+ *
58490
+ * The following code shows a template that you can use to implement the `parseNumber` function:
58491
+ *
58492
+ * ```js
58493
+ * import { settings } from "survey-core";
58494
+ *
58495
+ * settings.parseNumber = (stringValue, numericValue) => {
58496
+ * if (typeof stringValue !== "string" || !stringValue)
58497
+ * return numericValue;
58498
+ * let parsedNumber = numericValue;
58499
+ * // ...
58500
+ * // Parsing the number according to custom parsing rules
58501
+ * // ...
58502
+ * return parsedNumber;
58503
+ * };
58504
+ * ```
58505
+ * @param stringValue A number represented as a string value.
58506
+ * @param numericValue A number parsed using a default parsing function. `NaN` if the original string is not a number.
58507
+ * @returns A number that results from parsing the string value.
58508
+ * @see [settings.serialization](https://surveyjs.io/form-library/documentation/api-reference/settings#serialization)
58509
+ */
58510
+ parseNumber: function (stringValue, numericValue) { return numericValue; }
58399
58511
  };
58400
58512
 
58401
58513
 
@@ -61145,9 +61257,17 @@ var SurveyModel = /** @class */ (function (_super) {
61145
61257
  */
61146
61258
  _this.onGetExpressionDisplayValue = _this.addEvent();
61147
61259
  /**
61148
- * An event that is raised after the visibility of a popup is changed. This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode).
61260
+ * An event that is raised after the visibility of a popup is changed.
61261
+ *
61262
+ * This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions and [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType).
61149
61263
  */
61150
61264
  _this.onPopupVisibleChanged = _this.addEvent();
61265
+ /**
61266
+ * An event that is raised when users open a drop-down menu.
61267
+ *
61268
+ * This event can be raised for [Single-](https://surveyjs.io/form-library/documentation/api-reference/dropdown-menu-model) and [Multi-Select Dropdown](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model) questions, [Rating Scale](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model) questions [rendered as drop-down menus](https://surveyjs.io/form-library/documentation/api-reference/rating-scale-question-model#displayMode), and [Multi-Select Matrix](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list) questions that contain columns of the `"dropdown"` or `"tagbox"` [`cellType`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-with-dropdown-list#cellType). Handle this event to change the drop-down menu type for specific questions or device types.
61269
+ */
61270
+ _this.onOpenDropdownMenu = _this.addEvent();
61151
61271
  _this.onElementWrapperComponentName = _this.addEvent();
61152
61272
  _this.onElementWrapperComponentData = _this.addEvent();
61153
61273
  /**
@@ -66300,7 +66420,7 @@ var SurveyModel = /** @class */ (function (_super) {
66300
66420
  */
66301
66421
  SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
66302
66422
  if (this.onDownloadFile.isEmpty) {
66303
- !!callback && callback("success", fileValue.content || fileValue);
66423
+ !!callback && callback("skipped", fileValue.content || fileValue);
66304
66424
  }
66305
66425
  this.onDownloadFile.fire(this, {
66306
66426
  question: question,
@@ -68654,6 +68774,11 @@ var SurveyModel = /** @class */ (function (_super) {
68654
68774
  SurveyModel.prototype.processPopupVisiblityChanged = function (question, popup, visible) {
68655
68775
  this.onPopupVisibleChanged.fire(this, { question: question, popup: popup, visible: visible });
68656
68776
  };
68777
+ SurveyModel.prototype.processOpenDropdownMenu = function (question, options) {
68778
+ var newOptions = Object.assign({ question: question }, options);
68779
+ this.onOpenDropdownMenu.fire(this, newOptions);
68780
+ options.menuType = newOptions.menuType;
68781
+ };
68657
68782
  /**
68658
68783
  * Applies a specified theme to the survey.
68659
68784
  *
@@ -69711,7 +69836,7 @@ var TOCModel = /** @class */ (function () {
69711
69836
  };
69712
69837
  this.listModel = createTOCListModel(survey, function () { _this.popupModel.isVisible = false; });
69713
69838
  this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel });
69714
- this.popupModel.overlayDisplayMode = "overlay";
69839
+ this.popupModel.overlayDisplayMode = "plain";
69715
69840
  this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
69716
69841
  if (TOCModel.StickyPosition) {
69717
69842
  survey.onAfterRenderSurvey.add(function (s, o) { return _this.initStickyTOCSubscriptions(o.htmlElement); });
@@ -72215,11 +72340,12 @@ function debounce(func) {
72215
72340
  /*!****************************!*\
72216
72341
  !*** ./src/utils/utils.ts ***!
72217
72342
  \****************************/
72218
- /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, roundTo2Decimals, 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 */
72343
+ /*! exports provided: getSafeUrl, unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, roundTo2Decimals, 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 */
72219
72344
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
72220
72345
 
72221
72346
  "use strict";
72222
72347
  __webpack_require__.r(__webpack_exports__);
72348
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSafeUrl", function() { return getSafeUrl; });
72223
72349
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return unwrap; });
72224
72350
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRenderedSize", function() { return getRenderedSize; });
72225
72351
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRenderedStyleSize", function() { return getRenderedStyleSize; });
@@ -72400,7 +72526,7 @@ function navigateToUrl(url) {
72400
72526
  var location = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getLocation();
72401
72527
  if (!url || !location)
72402
72528
  return;
72403
- location.href = encodeURIComponent(url);
72529
+ location.href = getSafeUrl(url);
72404
72530
  }
72405
72531
  function wrapUrlForBackgroundImage(url) {
72406
72532
  return !!url ? ["url(", url, ")"].join("") : "";
@@ -72436,6 +72562,13 @@ function createSvg(size, width, height, iconName, svgElem, title) {
72436
72562
  }
72437
72563
  titleElement.textContent = title;
72438
72564
  }
72565
+ function getSafeUrl(url) {
72566
+ if (!url)
72567
+ return url;
72568
+ if (url.toLocaleLowerCase().indexOf("javascript:") > -1)
72569
+ return encodeURIComponent(url);
72570
+ return url;
72571
+ }
72439
72572
  function unwrap(value) {
72440
72573
  if (typeof value !== "function") {
72441
72574
  return value;