survey-core 1.11.8 → 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 (254) hide show
  1. package/defaultV2.css +23 -9
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +23 -9
  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 +372 -167
  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 +9 -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/jsonobject.d.ts +2 -1
  217. package/ts3.4/typings/popup-dropdown-view-model.d.ts +2 -1
  218. package/ts3.4/typings/popup.d.ts +2 -1
  219. package/ts3.4/typings/question.d.ts +2 -1
  220. package/ts3.4/typings/question_baseselect.d.ts +0 -5
  221. package/ts3.4/typings/question_custom.d.ts +8 -0
  222. package/ts3.4/typings/question_file.d.ts +7 -5
  223. package/ts3.4/typings/question_matrix.d.ts +2 -2
  224. package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -0
  225. package/ts3.4/typings/question_multipletext.d.ts +1 -0
  226. package/ts3.4/typings/question_paneldynamic.d.ts +2 -0
  227. package/ts3.4/typings/question_signaturepad.d.ts +2 -0
  228. package/ts3.4/typings/question_text.d.ts +2 -0
  229. package/ts3.4/typings/settings.d.ts +25 -0
  230. package/ts3.4/typings/survey-events-api.d.ts +26 -0
  231. package/ts3.4/typings/survey.d.ts +15 -4
  232. package/ts3.4/typings/utils/utils.d.ts +1 -0
  233. package/typings/base-interfaces.d.ts +9 -0
  234. package/typings/dragdrop/core.d.ts +1 -0
  235. package/typings/dropdownListModel.d.ts +1 -0
  236. package/typings/expressions/expressions.d.ts +0 -3
  237. package/typings/helpers.d.ts +2 -0
  238. package/typings/jsonobject.d.ts +2 -1
  239. package/typings/popup-dropdown-view-model.d.ts +2 -1
  240. package/typings/popup.d.ts +2 -1
  241. package/typings/question.d.ts +2 -1
  242. package/typings/question_baseselect.d.ts +0 -5
  243. package/typings/question_custom.d.ts +8 -0
  244. package/typings/question_file.d.ts +8 -6
  245. package/typings/question_matrix.d.ts +2 -2
  246. package/typings/question_matrixdropdownbase.d.ts +1 -0
  247. package/typings/question_multipletext.d.ts +1 -0
  248. package/typings/question_paneldynamic.d.ts +2 -0
  249. package/typings/question_signaturepad.d.ts +2 -0
  250. package/typings/question_text.d.ts +2 -0
  251. package/typings/settings.d.ts +25 -0
  252. package/typings/survey-events-api.d.ts +26 -0
  253. package/typings/survey.d.ts +15 -4
  254. 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.8
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.8";
9851
- ReleaseDate = "" + "2024-07-22";
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"));
@@ -15850,7 +15860,7 @@ function displayValue(params) {
15850
15860
  var q = getQuestionValueByContext(this, params[0]);
15851
15861
  if (!q)
15852
15862
  return "";
15853
- if (params.length > 1 && !!params[1])
15863
+ if (params.length > 1 && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(params[1]))
15854
15864
  return q.getDisplayValue(true, params[1]);
15855
15865
  return q.displayValue;
15856
15866
  }
@@ -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;
@@ -19284,13 +19316,10 @@ var JsonMetadataClass = /** @class */ (function () {
19284
19316
  return prop;
19285
19317
  };
19286
19318
  JsonMetadataClass.prototype.addDependsOnProperties = function (prop, dependsOn) {
19287
- if (Array.isArray(dependsOn)) {
19288
- for (var i = 0; i < dependsOn.length; i++) {
19289
- this.addDependsOnProperty(prop, dependsOn[i]);
19290
- }
19291
- }
19292
- else {
19293
- this.addDependsOnProperty(prop, dependsOn);
19319
+ var dArray = Array.isArray(dependsOn) ? dependsOn : [dependsOn];
19320
+ prop.dependsOn = dArray;
19321
+ for (var i = 0; i < dArray.length; i++) {
19322
+ this.addDependsOnProperty(prop, dArray[i]);
19294
19323
  }
19295
19324
  };
19296
19325
  JsonMetadataClass.prototype.addDependsOnProperty = function (prop, dependsOn) {
@@ -19998,27 +20027,43 @@ var JsonObject = /** @class */ (function () {
19998
20027
  }
19999
20028
  properties = this.addDynamicProperties(obj, jsonObj, properties);
20000
20029
  this.options = options;
20030
+ var processedProps = {};
20031
+ processedProps[JsonObject.typePropertyName] = true;
20032
+ var parentProps = {};
20001
20033
  for (var key in jsonObj) {
20002
- if (key === JsonObject.typePropertyName)
20003
- continue;
20004
- if (key === JsonObject.positionPropertyName) {
20005
- obj[key] = jsonObj[key];
20006
- continue;
20007
- }
20008
- var property = this.findProperty(properties, key);
20009
- if (!property) {
20010
- if (needAddErrors) {
20011
- this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
20012
- }
20013
- continue;
20014
- }
20015
- this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
20034
+ this.setPropertyValueToObj(jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options);
20016
20035
  }
20017
20036
  this.options = undefined;
20018
20037
  if (obj.endLoadingFromJson) {
20019
20038
  obj.endLoadingFromJson();
20020
20039
  }
20021
20040
  };
20041
+ JsonObject.prototype.setPropertyValueToObj = function (jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options) {
20042
+ var _this = this;
20043
+ if (processedProps[key])
20044
+ return;
20045
+ if (key === JsonObject.positionPropertyName) {
20046
+ obj[key] = jsonObj[key];
20047
+ return;
20048
+ }
20049
+ var property = this.findProperty(properties, key);
20050
+ if (!property && needAddErrors) {
20051
+ this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
20052
+ }
20053
+ if (property) {
20054
+ var dProps = property.dependsOn;
20055
+ if (Array.isArray(dProps)) {
20056
+ parentProps[key] = true;
20057
+ dProps.forEach(function (propKey) {
20058
+ if (!parentProps[propKey]) {
20059
+ _this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, needAddErrors, options);
20060
+ }
20061
+ });
20062
+ }
20063
+ this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
20064
+ processedProps[key] = true;
20065
+ }
20066
+ };
20022
20067
  JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
20023
20068
  if (!obj || !obj.getType)
20024
20069
  return obj;
@@ -26932,7 +26977,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
26932
26977
  {
26933
26978
  name: "layoutColumns:panellayoutcolumns",
26934
26979
  className: "panellayoutcolumn", isArray: true,
26935
- onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); }
26980
+ onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
26981
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
26936
26982
  },
26937
26983
  { name: "title:text", serializationProperty: "locTitle" },
26938
26984
  { name: "description:text", serializationProperty: "locDescription" },
@@ -26964,7 +27010,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
26964
27010
  name: "colSpan:number", visible: false,
26965
27011
  onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
26966
27012
  },
26967
- { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
27013
+ {
27014
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
27015
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
27016
+ },
26968
27017
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
26969
27018
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
26970
27019
  {
@@ -27005,11 +27054,12 @@ _questionfactory__WEBPACK_IMPORTED_MODULE_5__["ElementFactory"].Instance.registe
27005
27054
  /*!******************************************!*\
27006
27055
  !*** ./src/popup-dropdown-view-model.ts ***!
27007
27056
  \******************************************/
27008
- /*! exports provided: PopupDropdownViewModel */
27057
+ /*! exports provided: calculateIsTablet, PopupDropdownViewModel */
27009
27058
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
27010
27059
 
27011
27060
  "use strict";
27012
27061
  __webpack_require__.r(__webpack_exports__);
27062
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "calculateIsTablet", function() { return calculateIsTablet; });
27013
27063
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PopupDropdownViewModel", function() { return PopupDropdownViewModel; });
27014
27064
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
27015
27065
  /* harmony import */ var _utils_popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/popup */ "./src/utils/popup.ts");
@@ -27046,6 +27096,13 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
27046
27096
 
27047
27097
 
27048
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
+ }
27049
27106
  var PopupDropdownViewModel = /** @class */ (function (_super) {
27050
27107
  __extends(PopupDropdownViewModel, _super);
27051
27108
  function PopupDropdownViewModel(model, targetElement, areaElement) {
@@ -27086,8 +27143,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27086
27143
  return _this;
27087
27144
  }
27088
27145
  PopupDropdownViewModel.prototype.calculateIsTablet = function (windowWidth, windowHeight) {
27089
- var width = Math.min(windowWidth, windowHeight);
27090
- this.isTablet = width >= PopupDropdownViewModel.tabletSizeBreakpoint;
27146
+ this.isTablet = calculateIsTablet(windowWidth, windowHeight);
27091
27147
  };
27092
27148
  PopupDropdownViewModel.prototype.getAvailableAreaRect = function () {
27093
27149
  if (this.areaElement) {
@@ -27177,10 +27233,11 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27177
27233
  return actualHorizontalPosition;
27178
27234
  };
27179
27235
  PopupDropdownViewModel.prototype.getStyleClass = function () {
27236
+ var overlayMode = this.model.overlayDisplayMode;
27180
27237
  return _super.prototype.getStyleClass.call(this)
27181
27238
  .append("sv-popup--dropdown", !this.isOverlay)
27182
- .append("sv-popup--dropdown-overlay", this.isOverlay && this.model.overlayDisplayMode !== "overlay")
27183
- .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)))
27184
27241
  .append("sv-popup--show-pointer", !this.isOverlay && this.showHeader)
27185
27242
  .append("sv-popup--" + this.popupDirection, !this.isOverlay && (this.showHeader || this.popupDirection == "top" || this.popupDirection == "bottom"));
27186
27243
  };
@@ -27218,7 +27275,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
27218
27275
  this.container.addEventListener("touchstart", this.touchStartEventCallback);
27219
27276
  this.container.addEventListener("touchmove", this.touchMoveEventCallback);
27220
27277
  }
27221
- this.calculateIsTablet(_global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerWidth(), _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].getInnerHeight());
27278
+ this.calculateIsTablet();
27222
27279
  this.resizeEventCallback();
27223
27280
  }
27224
27281
  _global_variables_utils__WEBPACK_IMPORTED_MODULE_6__["DomWindowHelper"].addEventListener("scroll", this.scrollEventCallBack);
@@ -28463,6 +28520,24 @@ var PopupModel = /** @class */ (function (_super) {
28463
28520
  this.onFooterActionsCreated.fire(this, options);
28464
28521
  return options.actions;
28465
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
+ };
28466
28541
  PopupModel.prototype.onHiding = function () {
28467
28542
  this.refreshInnerModel();
28468
28543
  this.onHide();
@@ -28657,9 +28732,10 @@ var ProgressButtons = /** @class */ (function (_super) {
28657
28732
  if (!listContainerElement)
28658
28733
  return;
28659
28734
  var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
28660
- var circleWidth = this.showItemNumbers ? 17 : 5;
28661
- var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
28662
- var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
28735
+ var circleWidth = this.showItemNumbers ? 36 : 20;
28736
+ // const sideCorrection = this.survey.isMobile ? circleWidth : listContainerElement.children[0].clientWidth;
28737
+ // const connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
28738
+ var connectorWidth = (listContainerElement.clientWidth - circleWidth) / (listContainerElement.children.length - 1) - circleWidth;
28663
28739
  for (var i = 0; i < listContainerElements.length; i++) {
28664
28740
  listContainerElements[i].style.width = connectorWidth + "px";
28665
28741
  }
@@ -28741,6 +28817,7 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
28741
28817
  this.canShowItemTitles = true;
28742
28818
  this.processResponsiveness = function (model, options) {
28743
28819
  _this.viewModel.onUpdateScroller(model.isListContainerHasScroller(_this.element));
28820
+ _this.model.clearConnectorsWidth(_this.element);
28744
28821
  if (!model.showItemTitles) {
28745
28822
  _this.model.adjustConnectors(_this.element);
28746
28823
  return;
@@ -28752,7 +28829,6 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
28752
28829
  _this.viewModel.onResize(_this.canShowItemTitles);
28753
28830
  return;
28754
28831
  }
28755
- _this.model.clearConnectorsWidth(_this.element);
28756
28832
  if (_this.timer !== undefined) {
28757
28833
  clearTimeout(_this.timer);
28758
28834
  }
@@ -28857,9 +28933,6 @@ var TriggerExpressionInfo = /** @class */ (function () {
28857
28933
  }
28858
28934
  return TriggerExpressionInfo;
28859
28935
  }());
28860
- function querySelectorIncludingSelf(el, selector) {
28861
- return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
28862
- }
28863
28936
  /**
28864
28937
  * A base class for all questions.
28865
28938
  */
@@ -31764,6 +31837,9 @@ var Question = /** @class */ (function (_super) {
31764
31837
  Question.prototype.processPopupVisiblilityChanged = function (popupModel, visible) {
31765
31838
  this.survey.processPopupVisiblityChanged(this, popupModel, visible);
31766
31839
  };
31840
+ Question.prototype.processOpenDropdownMenu = function (options) {
31841
+ this.survey.processOpenDropdownMenu(this, options);
31842
+ };
31767
31843
  Question.prototype.onTextKeyDownHandler = function (event) {
31768
31844
  if (event.keyCode === 13) {
31769
31845
  this.survey.questionEditFinishCallback(this, event);
@@ -31817,7 +31893,7 @@ var Question = /** @class */ (function (_super) {
31817
31893
  var scrollableSelector_1 = this.getObservedElementSelector();
31818
31894
  if (!scrollableSelector_1)
31819
31895
  return;
31820
- var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31896
+ var defaultRootEl = el.querySelector(scrollableSelector_1);
31821
31897
  if (!defaultRootEl)
31822
31898
  return;
31823
31899
  var isProcessed_1 = false;
@@ -31829,7 +31905,7 @@ var Question = /** @class */ (function (_super) {
31829
31905
  isProcessed_1 = false;
31830
31906
  }
31831
31907
  var callback = function () {
31832
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31908
+ var rootEl = el.querySelector(scrollableSelector_1);
31833
31909
  if (!requiredWidth_1 && _this.isDefaultRendering()) {
31834
31910
  requiredWidth_1 = rootEl.scrollWidth;
31835
31911
  }
@@ -31854,10 +31930,8 @@ var Question = /** @class */ (function (_super) {
31854
31930
  });
31855
31931
  this.onMobileChangedCallback = function () {
31856
31932
  setTimeout(function () {
31857
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31858
- if (rootEl) {
31859
- _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
31860
- }
31933
+ var rootEl = el.querySelector(scrollableSelector_1);
31934
+ _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
31861
31935
  }, 0);
31862
31936
  };
31863
31937
  this.resizeObserver.observe(el);
@@ -32105,7 +32179,10 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
32105
32179
  name: "colSpan:number", visible: false,
32106
32180
  onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
32107
32181
  },
32108
- { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
32182
+ {
32183
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
32184
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
32185
+ },
32109
32186
  { name: "startWithNewLine:boolean", default: true, layout: "row" },
32110
32187
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
32111
32188
  {
@@ -32491,7 +32568,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32491
32568
  _this.isUpdatingChoicesDependedQuestions = false;
32492
32569
  _this.headItemsCount = 0;
32493
32570
  _this.footItemsCount = 0;
32494
- _this.allowMultiColumns = true;
32495
32571
  _this.prevIsOtherSelected = false;
32496
32572
  _this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
32497
32573
  _this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
@@ -32907,6 +32983,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32907
32983
  _super.prototype.runCondition.call(this, values, properties);
32908
32984
  this.runItemsEnableCondition(values, properties);
32909
32985
  this.runItemsCondition(values, properties);
32986
+ this.choices.forEach(function (item) {
32987
+ item.runConditionCore(values, properties);
32988
+ });
32910
32989
  };
32911
32990
  QuestionSelectBase.prototype.isTextValue = function () {
32912
32991
  return true; //for comments and others
@@ -34512,23 +34591,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34512
34591
  enumerable: false,
34513
34592
  configurable: true
34514
34593
  });
34515
- QuestionSelectBase.prototype.getObservedElementSelector = function () {
34516
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
34517
- };
34518
- QuestionSelectBase.prototype.supportResponsiveness = function () {
34519
- return true;
34520
- };
34521
- QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
34522
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
34523
- this.allowMultiColumns = false;
34524
- };
34525
- QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
34526
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
34527
- this.allowMultiColumns = true;
34528
- };
34529
34594
  Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
34530
34595
  get: function () {
34531
- return !this.isMobile && this.allowMultiColumns &&
34596
+ return !this.isMobile &&
34532
34597
  (this.getCurrentColCount() > 1);
34533
34598
  },
34534
34599
  enumerable: false,
@@ -34686,9 +34751,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34686
34751
  __decorate([
34687
34752
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
34688
34753
  ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
34689
- __decorate([
34690
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
34691
- ], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
34692
34754
  return QuestionSelectBase;
34693
34755
  }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
34694
34756
 
@@ -37142,6 +37204,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
37142
37204
  QuestionCustomModelBase.prototype.findQuestionByName = function (name) {
37143
37205
  return !!this.data ? this.data.findQuestionByName(name) : null;
37144
37206
  };
37207
+ QuestionCustomModelBase.prototype.getEditingSurveyElement = function () {
37208
+ return undefined;
37209
+ };
37145
37210
  //IPanel
37146
37211
  QuestionCustomModelBase.prototype.addElement = function (element, index) { };
37147
37212
  QuestionCustomModelBase.prototype.removeElement = function (element) {
@@ -37524,6 +37589,40 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37524
37589
  this.contentPanel.updateElementCss(reNew);
37525
37590
  }
37526
37591
  };
37592
+ QuestionCompositeModel.prototype.dispose = function () {
37593
+ this.unConnectEditingObj();
37594
+ _super.prototype.dispose.call(this);
37595
+ };
37596
+ QuestionCompositeModel.prototype.updateEditingObj = function () {
37597
+ var _this = this;
37598
+ var _a;
37599
+ var obj = (_a = this.data) === null || _a === void 0 ? void 0 : _a.getEditingSurveyElement();
37600
+ if (!obj)
37601
+ return undefined;
37602
+ var newObj = obj[this.getValueName()];
37603
+ if (!!newObj && !newObj.onPropertyChanged) {
37604
+ newObj = undefined;
37605
+ }
37606
+ if (newObj !== this.editingObjValue) {
37607
+ this.unConnectEditingObj();
37608
+ this.editingObjValue = newObj;
37609
+ if (!!newObj) {
37610
+ this.onEditingObjPropertyChanged = function (sender, options) {
37611
+ _this.setNewValueIntoQuestion(options.name, _this.editingObjValue[options.name]);
37612
+ };
37613
+ newObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
37614
+ }
37615
+ }
37616
+ return this.editingObjValue;
37617
+ };
37618
+ QuestionCompositeModel.prototype.unConnectEditingObj = function () {
37619
+ if (!!this.editingObjValue && !this.editingObjValue.isDisposed) {
37620
+ this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
37621
+ }
37622
+ };
37623
+ QuestionCompositeModel.prototype.getEditingSurveyElement = function () {
37624
+ return this.editingObjValue;
37625
+ };
37527
37626
  QuestionCompositeModel.prototype.getTextProcessor = function () {
37528
37627
  return this.textProcessing;
37529
37628
  };
@@ -37583,6 +37682,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37583
37682
  }
37584
37683
  _super.prototype.onReadOnlyChanged.call(this);
37585
37684
  };
37685
+ QuestionCompositeModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
37686
+ if (clearData === void 0) { clearData = false; }
37687
+ this.updateEditingObj();
37688
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
37689
+ };
37586
37690
  QuestionCompositeModel.prototype.onSurveyLoad = function () {
37587
37691
  this.isSettingValOnLoading = true;
37588
37692
  if (!!this.contentPanel) {
@@ -37754,7 +37858,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37754
37858
  var key = questions[i].getValueName();
37755
37859
  var val = !!newValue ? newValue[key] : undefined;
37756
37860
  var q = questions[i];
37757
- if (!this.isTwoValueEquals(q.value, val)) {
37861
+ if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
37758
37862
  q.value = val;
37759
37863
  }
37760
37864
  }
@@ -39042,6 +39146,14 @@ var QuestionFileModelBase = /** @class */ (function (_super) {
39042
39146
  });
39043
39147
  }
39044
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
+ };
39045
39157
  __decorate([
39046
39158
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
39047
39159
  ], QuestionFileModelBase.prototype, "isUploading", void 0);
@@ -39225,6 +39337,15 @@ var QuestionFileModel = /** @class */ (function (_super) {
39225
39337
  _this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
39226
39338
  return _this;
39227
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
+ });
39228
39349
  Object.defineProperty(QuestionFileModel.prototype, "fileNavigatorVisible", {
39229
39350
  get: function () {
39230
39351
  var isUploading = this.isUploading;
@@ -39476,9 +39597,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
39476
39597
  });
39477
39598
  QuestionFileModel.prototype.chooseFile = function (event) {
39478
39599
  var _this = this;
39479
- if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
39600
+ if (!this.rootElement)
39601
+ return;
39602
+ var inputElement = this.rootElement.querySelector("#" + this.inputId);
39603
+ if (!inputElement)
39480
39604
  return;
39481
- var inputElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocument().getElementById(this.inputId);
39482
39605
  event.preventDefault();
39483
39606
  event.stopImmediatePropagation();
39484
39607
  if (inputElement) {
@@ -39823,7 +39946,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
39823
39946
  }
39824
39947
  this.isFileLoading = true;
39825
39948
  this._previewLoader = new FileLoader(this, function (status, loaded) {
39826
- if (status === "loaded") {
39949
+ if (status !== "error") {
39827
39950
  loaded.forEach(function (val) {
39828
39951
  _this.previewValue.push(val);
39829
39952
  });
@@ -39837,15 +39960,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
39837
39960
  }
39838
39961
  this.previewValueChanged();
39839
39962
  };
39840
- Object.defineProperty(QuestionFileModel.prototype, "isFileLoading", {
39841
- get: function () { return this.isFileLoadingValue; },
39842
- set: function (val) {
39843
- this.isFileLoadingValue = val;
39844
- this.updateIsReady();
39845
- },
39846
- enumerable: false,
39847
- configurable: true
39848
- });
39849
39963
  QuestionFileModel.prototype.getIsQuestionReady = function () {
39850
39964
  return _super.prototype.getIsQuestionReady.call(this) && !this.isFileLoading;
39851
39965
  };
@@ -39961,13 +40075,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
39961
40075
  src.value = "";
39962
40076
  this.loadFiles(files);
39963
40077
  };
39964
- QuestionFileModel.prototype.onChangeQuestionValue = function (newValue) {
39965
- _super.prototype.onChangeQuestionValue.call(this, newValue);
39966
- this.stateChanged(this.isEmpty() ? "empty" : "loaded");
39967
- if (!this.isLoadingFromJson) {
39968
- this.loadPreview(newValue);
39969
- }
39970
- };
39971
40078
  QuestionFileModel.prototype.calcCssClasses = function (css) {
39972
40079
  var classes = _super.prototype.calcCssClasses.call(this, css);
39973
40080
  this.actionsContainer.cssClasses = css.actionBar;
@@ -40025,9 +40132,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
40025
40132
  return false;
40026
40133
  };
40027
40134
  QuestionFileModel.prototype.canDragDrop = function () { return !this.isInputReadOnly && this.currentMode !== "camera" && !this.isPlayingVideo; };
40028
- QuestionFileModel.prototype.afterRender = function (el) {
40135
+ QuestionFileModel.prototype.afterRenderQuestionElement = function (el) {
40029
40136
  this.rootElement = el;
40030
- _super.prototype.afterRender.call(this, el);
40137
+ };
40138
+ QuestionFileModel.prototype.beforeDestroyQuestionElement = function (el) {
40139
+ this.rootElement = undefined;
40031
40140
  };
40032
40141
  QuestionFileModel.prototype.clearFilesCore = function () {
40033
40142
  if (this.rootElement) {
@@ -40180,7 +40289,7 @@ var FileLoader = /** @class */ (function () {
40180
40289
  if (!_this.fileQuestion || !_this.callback) {
40181
40290
  return;
40182
40291
  }
40183
- if (status === "success") {
40292
+ if (status !== "error") {
40184
40293
  _this.loaded[index] = {
40185
40294
  content: data,
40186
40295
  name: value.name,
@@ -40188,7 +40297,7 @@ var FileLoader = /** @class */ (function () {
40188
40297
  };
40189
40298
  downloadedCount++;
40190
40299
  if (downloadedCount === files.length) {
40191
- _this.callback("loaded", _this.loaded);
40300
+ _this.callback(status, _this.loaded);
40192
40301
  }
40193
40302
  }
40194
40303
  else {
@@ -41716,8 +41825,8 @@ var QuestionMatrixModel = /** @class */ (function (_super) {
41716
41825
  *
41717
41826
  * Possible values:
41718
41827
  *
41719
- * - "initial" (default) - Preserves the original order of the `rows` array.
41720
- * - "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.
41721
41830
  * @see rows
41722
41831
  */
41723
41832
  get: function () {
@@ -42974,6 +43083,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
42974
43083
  var survey = this.getSurvey();
42975
43084
  return !!survey ? survey.getQuestionByName(name) : null;
42976
43085
  };
43086
+ MatrixDropdownRowModelBase.prototype.getEditingSurveyElement = function () { return undefined; };
42977
43087
  MatrixDropdownRowModelBase.prototype.setValueCore = function (name, newColumnValue, isComment) {
42978
43088
  if (this.isSettingValue)
42979
43089
  return;
@@ -46321,30 +46431,34 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
46321
46431
  },
46322
46432
  {
46323
46433
  name: "totalType",
46434
+ visibleIf: function (obj) { return !obj.isShowInMultipleColumns; },
46324
46435
  default: "none",
46325
46436
  choices: ["none", "sum", "count", "min", "max", "avg"],
46326
46437
  },
46327
- "totalExpression:expression",
46328
- { name: "totalFormat", serializationProperty: "locTotalFormat" },
46438
+ { name: "totalExpression:expression", visibleIf: function (obj) { return !obj.isShowInMultipleColumns; } },
46439
+ { name: "totalFormat", serializationProperty: "locTotalFormat", visibleIf: function (obj) { return obj.hasTotal; } },
46329
46440
  {
46330
46441
  name: "totalDisplayStyle",
46442
+ visibleIf: function (obj) { return obj.hasTotal; },
46331
46443
  default: "none",
46332
46444
  choices: ["none", "decimal", "currency", "percent"],
46333
46445
  },
46334
46446
  {
46335
46447
  name: "totalAlignment",
46448
+ visibleIf: function (obj) { return obj.hasTotal; },
46336
46449
  default: "auto",
46337
46450
  choices: ["auto", "left", "center", "right"],
46338
46451
  },
46339
46452
  {
46340
46453
  name: "totalCurrency",
46454
+ visibleIf: function (obj) { return obj.hasTotal; },
46341
46455
  choices: function () {
46342
46456
  return Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])();
46343
46457
  },
46344
46458
  default: "USD",
46345
46459
  },
46346
- { name: "totalMaximumFractionDigits:number", default: -1 },
46347
- { name: "totalMinimumFractionDigits:number", default: -1 },
46460
+ { name: "totalMaximumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
46461
+ { name: "totalMinimumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
46348
46462
  { name: "renderAs", default: "default", visible: false },
46349
46463
  ], function () {
46350
46464
  return new MatrixDropdownColumn("");
@@ -49281,6 +49395,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
49281
49395
  var survey = this.getSurvey();
49282
49396
  return !!survey ? survey.getQuestionByName(name) : null;
49283
49397
  };
49398
+ MultipleTextItemModel.prototype.getEditingSurveyElement = function () { return undefined; };
49284
49399
  //IValidatorOwner
49285
49400
  MultipleTextItemModel.prototype.getValidatorTitle = function () {
49286
49401
  return this.title;
@@ -50214,6 +50329,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
50214
50329
  var survey = this.getSurvey();
50215
50330
  return !!survey ? survey.getQuestionByName(name) : null;
50216
50331
  };
50332
+ QuestionPanelDynamicItem.prototype.getEditingSurveyElement = function () { return undefined; };
50217
50333
  QuestionPanelDynamicItem.prototype.getAllValues = function () {
50218
50334
  return this.data.getPanelItemData(this);
50219
50335
  };
@@ -51163,7 +51279,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
51163
51279
  var panel = this.createNewPanel();
51164
51280
  this.panelsCore.push(panel);
51165
51281
  if (this.renderMode == "list" && this.panelsState != "default") {
51166
- if (this.panelsState === "expand") {
51282
+ if (this.panelsState === "expanded") {
51167
51283
  panel.expand();
51168
51284
  }
51169
51285
  else {
@@ -55330,6 +55446,28 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
55330
55446
  }
55331
55447
  }
55332
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
+ };
55333
55471
  QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
55334
55472
  var _this = this;
55335
55473
  var canvas = el.getElementsByTagName("canvas")[0];
@@ -56133,6 +56271,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
56133
56271
  _this.updateRemainingCharacterCounter(event.target.value);
56134
56272
  };
56135
56273
  _this.onKeyDown = function (event) {
56274
+ _this.updateDateValidationMessage(event);
56136
56275
  _this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
56137
56276
  if (_this.isInputTextUpdate) {
56138
56277
  _this._isWaitingForEnter = event.keyCode === 229;
@@ -56140,6 +56279,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
56140
56279
  _this.onTextKeyDownHandler(event);
56141
56280
  };
56142
56281
  _this.onChange = function (event) {
56282
+ _this.updateDateValidationMessage(event);
56143
56283
  var elementIsFocused = event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement;
56144
56284
  if (elementIsFocused) {
56145
56285
  if (_this.isInputTextUpdate) {
@@ -56571,6 +56711,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56571
56711
  };
56572
56712
  errors.push(maxError);
56573
56713
  }
56714
+ if (!!this.dateValidationMessage) {
56715
+ errors.push(new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.dateValidationMessage, this));
56716
+ }
56574
56717
  var valName = this.getValidatorTitle();
56575
56718
  var emailValidator = new _validator__WEBPACK_IMPORTED_MODULE_4__["EmailValidator"]();
56576
56719
  if (this.inputType === "email" &&
@@ -56721,6 +56864,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56721
56864
  };
56722
56865
  QuestionTextModel.prototype.setNewValue = function (newValue) {
56723
56866
  newValue = this.correctValueType(newValue);
56867
+ if (!!newValue) {
56868
+ this.dateValidationMessage = undefined;
56869
+ }
56724
56870
  _super.prototype.setNewValue.call(this, newValue);
56725
56871
  };
56726
56872
  QuestionTextModel.prototype.correctValueType = function (newValue) {
@@ -56771,6 +56917,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56771
56917
  this.inputValue = newValue;
56772
56918
  }
56773
56919
  };
56920
+ QuestionTextModel.prototype.updateDateValidationMessage = function (event) {
56921
+ this.dateValidationMessage = this.isDateInputType && !!event.target ? event.target.validationMessage : undefined;
56922
+ };
56774
56923
  QuestionTextModel.prototype.afterRenderQuestionElement = function (el) {
56775
56924
  if (!!el) {
56776
56925
  this.input = el instanceof HTMLInputElement ? el : el.querySelector("input");
@@ -56969,7 +57118,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
56969
57118
  name: "maskSettings:masksettings",
56970
57119
  className: "masksettings",
56971
57120
  visibleIndex: 1,
56972
- dependsOn: "inputType",
57121
+ dependsOn: ["inputType", "maskType"],
56973
57122
  visibleIf: function (obj) {
56974
57123
  return obj.inputType === "text" || obj.inputType === "tel";
56975
57124
  },
@@ -57767,6 +57916,7 @@ var settings = {
57767
57916
  * const item = new ItemValue("item1");
57768
57917
  * const itemString = item.toJSON(); // Produces { value: "item1", text: "item1" } instead of "item1"
57769
57918
  * ```
57919
+ * @see [settings.parseNumber](https://surveyjs.io/form-library/documentation/api-reference/settings#parseNumber)
57770
57920
  */
57771
57921
  serialization: {
57772
57922
  itemValueSerializeAsObject: false,
@@ -58333,7 +58483,31 @@ var settings = {
58333
58483
  * }
58334
58484
  * ```
58335
58485
  */
58336
- 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; }
58337
58511
  };
58338
58512
 
58339
58513
 
@@ -61083,9 +61257,17 @@ var SurveyModel = /** @class */ (function (_super) {
61083
61257
  */
61084
61258
  _this.onGetExpressionDisplayValue = _this.addEvent();
61085
61259
  /**
61086
- * 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).
61087
61263
  */
61088
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();
61089
61271
  _this.onElementWrapperComponentName = _this.addEvent();
61090
61272
  _this.onElementWrapperComponentData = _this.addEvent();
61091
61273
  /**
@@ -61132,8 +61314,8 @@ var SurveyModel = /** @class */ (function (_super) {
61132
61314
  _this.isNavigationButtonPressed = false;
61133
61315
  _this.mouseDownPage = null;
61134
61316
  _this.isCalculatingProgressText = false;
61135
- _this.isFirstPageRendering = true;
61136
61317
  _this.isCurrentPageRendering = true;
61318
+ _this.isCurrentPageRendered = undefined;
61137
61319
  _this.isTriggerIsRunning = false;
61138
61320
  _this.triggerValues = null;
61139
61321
  _this.triggerKeys = null;
@@ -63676,9 +63858,7 @@ var SurveyModel = /** @class */ (function (_super) {
63676
63858
  var _this = this;
63677
63859
  if (this.editingObj == val)
63678
63860
  return;
63679
- if (!!this.editingObj) {
63680
- this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
63681
- }
63861
+ this.unConnectEditingObj();
63682
63862
  this.editingObjValue = val;
63683
63863
  if (this.isDisposed)
63684
63864
  return;
@@ -63704,6 +63884,11 @@ var SurveyModel = /** @class */ (function (_super) {
63704
63884
  enumerable: false,
63705
63885
  configurable: true
63706
63886
  });
63887
+ SurveyModel.prototype.unConnectEditingObj = function () {
63888
+ if (!!this.editingObj && !this.editingObj.isDisposed) {
63889
+ this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
63890
+ }
63891
+ };
63707
63892
  Object.defineProperty(SurveyModel.prototype, "isEditingSurveyElement", {
63708
63893
  get: function () {
63709
63894
  return !!this.editingObj;
@@ -64381,6 +64566,9 @@ var SurveyModel = /** @class */ (function (_super) {
64381
64566
  oldValue.passed = true;
64382
64567
  }
64383
64568
  }
64569
+ if (this.isCurrentPageRendered === true) {
64570
+ this.isCurrentPageRendered = false;
64571
+ }
64384
64572
  this.onCurrentPageChanged.fire(this, options);
64385
64573
  };
64386
64574
  SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
@@ -65837,11 +66025,11 @@ var SurveyModel = /** @class */ (function (_super) {
65837
66025
  SurveyModel.prototype.afterRenderPage = function (htmlElement) {
65838
66026
  var _this = this;
65839
66027
  if (!this.isDesignMode && !this.focusingQuestionInfo) {
65840
- var doScroll_1 = !this.isFirstPageRendering;
66028
+ var doScroll_1 = this.isCurrentPageRendered === false;
65841
66029
  setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
65842
66030
  }
65843
66031
  this.focusQuestionInfo();
65844
- this.isFirstPageRendering = false;
66032
+ this.isCurrentPageRendered = true;
65845
66033
  if (this.onAfterRenderPage.isEmpty)
65846
66034
  return;
65847
66035
  this.onAfterRenderPage.fire(this, {
@@ -66232,7 +66420,7 @@ var SurveyModel = /** @class */ (function (_super) {
66232
66420
  */
66233
66421
  SurveyModel.prototype.downloadFile = function (question, questionName, fileValue, callback) {
66234
66422
  if (this.onDownloadFile.isEmpty) {
66235
- !!callback && callback("success", fileValue.content || fileValue);
66423
+ !!callback && callback("skipped", fileValue.content || fileValue);
66236
66424
  }
66237
66425
  this.onDownloadFile.fire(this, {
66238
66426
  question: question,
@@ -66379,6 +66567,7 @@ var SurveyModel = /** @class */ (function (_super) {
66379
66567
  SurveyModel.prototype.findQuestionByName = function (name) {
66380
66568
  return this.getQuestionByName(name);
66381
66569
  };
66570
+ SurveyModel.prototype.getEditingSurveyElement = function () { return this.editingObjValue; };
66382
66571
  /**
66383
66572
  * Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
66384
66573
  *
@@ -68585,6 +68774,11 @@ var SurveyModel = /** @class */ (function (_super) {
68585
68774
  SurveyModel.prototype.processPopupVisiblityChanged = function (question, popup, visible) {
68586
68775
  this.onPopupVisibleChanged.fire(this, { question: question, popup: popup, visible: visible });
68587
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
+ };
68588
68782
  /**
68589
68783
  * Applies a specified theme to the survey.
68590
68784
  *
@@ -68623,6 +68817,7 @@ var SurveyModel = /** @class */ (function (_super) {
68623
68817
  * Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
68624
68818
  */
68625
68819
  SurveyModel.prototype.dispose = function () {
68820
+ this.unConnectEditingObj();
68626
68821
  this.removeScrollEventListener();
68627
68822
  this.destroyResizeObserver();
68628
68823
  this.rootElement = undefined;
@@ -69100,7 +69295,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
69100
69295
  default: "auto",
69101
69296
  choices: ["auto", "static", "responsive"],
69102
69297
  },
69103
- { name: "gridLayoutEnabled:boolean", default: false, visible: false },
69298
+ { name: "gridLayoutEnabled:boolean", default: false },
69104
69299
  { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
69105
69300
  { name: "fitToContainer:boolean", default: true, visible: false },
69106
69301
  { name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
@@ -69641,7 +69836,7 @@ var TOCModel = /** @class */ (function () {
69641
69836
  };
69642
69837
  this.listModel = createTOCListModel(survey, function () { _this.popupModel.isVisible = false; });
69643
69838
  this.popupModel = new _popup__WEBPACK_IMPORTED_MODULE_5__["PopupModel"]("sv-list", { model: this.listModel });
69644
- this.popupModel.overlayDisplayMode = "overlay";
69839
+ this.popupModel.overlayDisplayMode = "plain";
69645
69840
  this.popupModel.displayMode = new _base__WEBPACK_IMPORTED_MODULE_1__["ComputedUpdater"](function () { return _this.isMobile ? "overlay" : "popup"; });
69646
69841
  if (TOCModel.StickyPosition) {
69647
69842
  survey.onAfterRenderSurvey.add(function (s, o) { return _this.initStickyTOCSubscriptions(o.htmlElement); });
@@ -71534,6 +71729,8 @@ function _setIsTouch(val) {
71534
71729
  function detectMouseSupport(matchMedia) {
71535
71730
  if (!matchMedia)
71536
71731
  return false;
71732
+ if (IsMobile)
71733
+ return false;
71537
71734
  var pointerQuery = matchMedia("(pointer:fine)");
71538
71735
  var hoverQuery = matchMedia("(any-hover:hover)");
71539
71736
  return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
@@ -72143,11 +72340,12 @@ function debounce(func) {
72143
72340
  /*!****************************!*\
72144
72341
  !*** ./src/utils/utils.ts ***!
72145
72342
  \****************************/
72146
- /*! 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 */
72147
72344
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
72148
72345
 
72149
72346
  "use strict";
72150
72347
  __webpack_require__.r(__webpack_exports__);
72348
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSafeUrl", function() { return getSafeUrl; });
72151
72349
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unwrap", function() { return unwrap; });
72152
72350
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRenderedSize", function() { return getRenderedSize; });
72153
72351
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRenderedStyleSize", function() { return getRenderedStyleSize; });
@@ -72328,7 +72526,7 @@ function navigateToUrl(url) {
72328
72526
  var location = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getLocation();
72329
72527
  if (!url || !location)
72330
72528
  return;
72331
- location.href = encodeURIComponent(url);
72529
+ location.href = getSafeUrl(url);
72332
72530
  }
72333
72531
  function wrapUrlForBackgroundImage(url) {
72334
72532
  return !!url ? ["url(", url, ")"].join("") : "";
@@ -72364,6 +72562,13 @@ function createSvg(size, width, height, iconName, svgElem, title) {
72364
72562
  }
72365
72563
  titleElement.textContent = title;
72366
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
+ }
72367
72572
  function unwrap(value) {
72368
72573
  if (typeof value !== "function") {
72369
72574
  return value;