survey-core 1.11.7 → 1.11.9

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 (250) hide show
  1. package/defaultV2.css +9 -9
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +9 -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 +533 -133
  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 +7 -0
  212. package/ts3.4/typings/dropdownListModel.d.ts +1 -1
  213. package/ts3.4/typings/jsonobject.d.ts +3 -2
  214. package/ts3.4/typings/panel-layout-column.d.ts +9 -0
  215. package/ts3.4/typings/panel.d.ts +15 -0
  216. package/ts3.4/typings/question.d.ts +3 -1
  217. package/ts3.4/typings/question_baseselect.d.ts +0 -5
  218. package/ts3.4/typings/question_custom.d.ts +11 -0
  219. package/ts3.4/typings/question_dropdown.d.ts +1 -1
  220. package/ts3.4/typings/question_file.d.ts +2 -1
  221. package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -0
  222. package/ts3.4/typings/question_multipletext.d.ts +4 -0
  223. package/ts3.4/typings/question_paneldynamic.d.ts +2 -0
  224. package/ts3.4/typings/question_rating.d.ts +0 -1
  225. package/ts3.4/typings/question_tagbox.d.ts +0 -1
  226. package/ts3.4/typings/question_text.d.ts +2 -0
  227. package/ts3.4/typings/settings.d.ts +29 -0
  228. package/ts3.4/typings/survey-element.d.ts +4 -3
  229. package/ts3.4/typings/survey.d.ts +4 -1
  230. package/ts3.4/typings/utils/utils.d.ts +1 -0
  231. package/typings/base-interfaces.d.ts +7 -0
  232. package/typings/dropdownListModel.d.ts +1 -1
  233. package/typings/jsonobject.d.ts +3 -2
  234. package/typings/panel-layout-column.d.ts +9 -0
  235. package/typings/panel.d.ts +15 -0
  236. package/typings/question.d.ts +3 -1
  237. package/typings/question_baseselect.d.ts +0 -5
  238. package/typings/question_custom.d.ts +11 -0
  239. package/typings/question_dropdown.d.ts +1 -1
  240. package/typings/question_file.d.ts +2 -1
  241. package/typings/question_matrixdropdownbase.d.ts +1 -0
  242. package/typings/question_multipletext.d.ts +4 -0
  243. package/typings/question_paneldynamic.d.ts +2 -0
  244. package/typings/question_rating.d.ts +0 -1
  245. package/typings/question_tagbox.d.ts +0 -1
  246. package/typings/question_text.d.ts +2 -0
  247. package/typings/settings.d.ts +29 -0
  248. package/typings/survey-element.d.ts +5 -3
  249. package/typings/survey.d.ts +4 -1
  250. 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.7
2
+ * surveyjs - Survey JavaScript library v1.11.9
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
  */
@@ -894,7 +894,7 @@ var BaseAction = /** @class */ (function (_super) {
894
894
  });
895
895
  Object.defineProperty(BaseAction.prototype, "canShrink", {
896
896
  get: function () {
897
- return !!this.iconName;
897
+ return !this.disableShrink && !!this.iconName;
898
898
  },
899
899
  enumerable: false,
900
900
  configurable: true
@@ -2688,6 +2688,9 @@ var Base = /** @class */ (function () {
2688
2688
  }
2689
2689
  if (!!this.arraysInfo) {
2690
2690
  for (var key in this.arraysInfo) {
2691
+ var prop = this.getPropertyByName(key);
2692
+ if (!prop || !prop.isSerializable)
2693
+ continue;
2691
2694
  var items = this.getPropertyValue(key);
2692
2695
  if (!items || !items.length)
2693
2696
  continue;
@@ -8213,11 +8216,12 @@ var DropdownListModel = /** @class */ (function (_super) {
8213
8216
  _this.filterString = newValue;
8214
8217
  }
8215
8218
  };
8216
- _this.qustionPropertyChangedHandler = function (sender, options) {
8219
+ _this.questionPropertyChangedHandler = function (sender, options) {
8217
8220
  _this.onPropertyChangedHandler(sender, options);
8218
8221
  };
8219
8222
  _this.htmlCleanerElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomDocumentHelper"].createElement("div");
8220
- question.onPropertyChanged.add(_this.qustionPropertyChangedHandler);
8223
+ _this.question.ariaExpanded = "false";
8224
+ question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
8221
8225
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
8222
8226
  _this.listModel = _this.createListModel();
8223
8227
  _this.updateAfterListModelCreated(_this.listModel);
@@ -8327,6 +8331,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8327
8331
  _this.resetItemsSettings();
8328
8332
  }
8329
8333
  }
8334
+ _this.question.ariaExpanded = option.isVisible ? "true" : "false";
8330
8335
  _this.question.processPopupVisiblilityChanged(_this.popupModel, option.isVisible);
8331
8336
  });
8332
8337
  };
@@ -8634,7 +8639,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8634
8639
  return;
8635
8640
  this._popupModel.toggleVisibility();
8636
8641
  this.focusItemOnClickAndPopup();
8637
- this.question.focus();
8642
+ this.question.focusInputElement(false);
8638
8643
  };
8639
8644
  DropdownListModel.prototype.chevronPointerDown = function (event) {
8640
8645
  if (this._popupModel.isVisible) {
@@ -8802,8 +8807,8 @@ var DropdownListModel = /** @class */ (function (_super) {
8802
8807
  };
8803
8808
  DropdownListModel.prototype.dispose = function () {
8804
8809
  _super.prototype.dispose.call(this);
8805
- this.question && this.question.onPropertyChanged.remove(this.qustionPropertyChangedHandler);
8806
- this.qustionPropertyChangedHandler = undefined;
8810
+ this.question && this.question.onPropertyChanged.remove(this.questionPropertyChangedHandler);
8811
+ this.questionPropertyChangedHandler = undefined;
8807
8812
  if (!!this.listModel) {
8808
8813
  this.listModel.dispose();
8809
8814
  }
@@ -9842,8 +9847,8 @@ __webpack_require__.r(__webpack_exports__);
9842
9847
 
9843
9848
  var Version;
9844
9849
  var ReleaseDate;
9845
- Version = "" + "1.11.7";
9846
- ReleaseDate = "" + "2024-07-16";
9850
+ Version = "" + "1.11.9";
9851
+ ReleaseDate = "" + "2024-07-30";
9847
9852
  function checkLibraryVersion(ver, libraryName) {
9848
9853
  if (Version != ver) {
9849
9854
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15843,7 +15848,11 @@ function getQuestionValueByContext(context, name) {
15843
15848
  }
15844
15849
  function displayValue(params) {
15845
15850
  var q = getQuestionValueByContext(this, params[0]);
15846
- return q ? q.displayValue : "";
15851
+ if (!q)
15852
+ return "";
15853
+ if (params.length > 1 && !_helpers__WEBPACK_IMPORTED_MODULE_0__["Helpers"].isValueEmpty(params[1]))
15854
+ return q.getDisplayValue(true, params[1]);
15855
+ return q.displayValue;
15847
15856
  }
15848
15857
  FunctionFactory.Instance.register("displayValue", displayValue);
15849
15858
  function propertyValue(params) {
@@ -18353,9 +18362,10 @@ function property(options) {
18353
18362
  },
18354
18363
  set: function (val) {
18355
18364
  var newValue = processComputedUpdater(this, val);
18365
+ var prevValue = this.getPropertyValue(key);
18356
18366
  this.setPropertyValue(key, newValue);
18357
18367
  if (!!options && options.onSet) {
18358
- options.onSet(newValue, this);
18368
+ options.onSet(newValue, this, prevValue);
18359
18369
  }
18360
18370
  },
18361
18371
  });
@@ -19274,13 +19284,10 @@ var JsonMetadataClass = /** @class */ (function () {
19274
19284
  return prop;
19275
19285
  };
19276
19286
  JsonMetadataClass.prototype.addDependsOnProperties = function (prop, dependsOn) {
19277
- if (Array.isArray(dependsOn)) {
19278
- for (var i = 0; i < dependsOn.length; i++) {
19279
- this.addDependsOnProperty(prop, dependsOn[i]);
19280
- }
19281
- }
19282
- else {
19283
- this.addDependsOnProperty(prop, dependsOn);
19287
+ var dArray = Array.isArray(dependsOn) ? dependsOn : [dependsOn];
19288
+ prop.dependsOn = dArray;
19289
+ for (var i = 0; i < dArray.length; i++) {
19290
+ this.addDependsOnProperty(prop, dArray[i]);
19284
19291
  }
19285
19292
  };
19286
19293
  JsonMetadataClass.prototype.addDependsOnProperty = function (prop, dependsOn) {
@@ -19988,27 +19995,43 @@ var JsonObject = /** @class */ (function () {
19988
19995
  }
19989
19996
  properties = this.addDynamicProperties(obj, jsonObj, properties);
19990
19997
  this.options = options;
19998
+ var processedProps = {};
19999
+ processedProps[JsonObject.typePropertyName] = true;
20000
+ var parentProps = {};
19991
20001
  for (var key in jsonObj) {
19992
- if (key === JsonObject.typePropertyName)
19993
- continue;
19994
- if (key === JsonObject.positionPropertyName) {
19995
- obj[key] = jsonObj[key];
19996
- continue;
19997
- }
19998
- var property = this.findProperty(properties, key);
19999
- if (!property) {
20000
- if (needAddErrors) {
20001
- this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
20002
- }
20003
- continue;
20004
- }
20005
- this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
20002
+ this.setPropertyValueToObj(jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options);
20006
20003
  }
20007
20004
  this.options = undefined;
20008
20005
  if (obj.endLoadingFromJson) {
20009
20006
  obj.endLoadingFromJson();
20010
20007
  }
20011
20008
  };
20009
+ JsonObject.prototype.setPropertyValueToObj = function (jsonObj, obj, key, properties, processedProps, parentProps, objType, needAddErrors, options) {
20010
+ var _this = this;
20011
+ if (processedProps[key])
20012
+ return;
20013
+ if (key === JsonObject.positionPropertyName) {
20014
+ obj[key] = jsonObj[key];
20015
+ return;
20016
+ }
20017
+ var property = this.findProperty(properties, key);
20018
+ if (!property && needAddErrors) {
20019
+ this.addNewError(new JsonUnknownPropertyError(key.toString(), objType), jsonObj, obj);
20020
+ }
20021
+ if (property) {
20022
+ var dProps = property.dependsOn;
20023
+ if (Array.isArray(dProps)) {
20024
+ parentProps[key] = true;
20025
+ dProps.forEach(function (propKey) {
20026
+ if (!parentProps[propKey]) {
20027
+ _this.setPropertyValueToObj(jsonObj, obj, propKey, properties, processedProps, parentProps, objType, needAddErrors, options);
20028
+ }
20029
+ });
20030
+ }
20031
+ this.valueToObj(jsonObj[key], obj, property, jsonObj, options);
20032
+ processedProps[key] = true;
20033
+ }
20034
+ };
20012
20035
  JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
20013
20036
  if (!obj || !obj.getType)
20014
20037
  return obj;
@@ -21973,7 +21996,6 @@ var InputElementAdapter = /** @class */ (function () {
21973
21996
  this.clickHandler = function (event) {
21974
21997
  if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
21975
21998
  _this.inputElement.setSelectionRange(0, 0);
21976
- event.preventDefault();
21977
21999
  }
21978
22000
  };
21979
22001
  this.beforeInputHandler = function (event) {
@@ -24191,6 +24213,82 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
24191
24213
  }, "panelbase");
24192
24214
 
24193
24215
 
24216
+ /***/ }),
24217
+
24218
+ /***/ "./src/panel-layout-column.ts":
24219
+ /*!************************************!*\
24220
+ !*** ./src/panel-layout-column.ts ***!
24221
+ \************************************/
24222
+ /*! exports provided: PanelLayoutColumnModel */
24223
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24224
+
24225
+ "use strict";
24226
+ __webpack_require__.r(__webpack_exports__);
24227
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelLayoutColumnModel", function() { return PanelLayoutColumnModel; });
24228
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
24229
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
24230
+ var __extends = (undefined && undefined.__extends) || (function () {
24231
+ var extendStatics = function (d, b) {
24232
+ extendStatics = Object.setPrototypeOf ||
24233
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24234
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24235
+ return extendStatics(d, b);
24236
+ };
24237
+ return function (d, b) {
24238
+ if (typeof b !== "function" && b !== null)
24239
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24240
+ extendStatics(d, b);
24241
+ function __() { this.constructor = d; }
24242
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24243
+ };
24244
+ })();
24245
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
24246
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24247
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24248
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
24249
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
24250
+ };
24251
+
24252
+
24253
+ var PanelLayoutColumnModel = /** @class */ (function (_super) {
24254
+ __extends(PanelLayoutColumnModel, _super);
24255
+ function PanelLayoutColumnModel(width, questionTitleWidth) {
24256
+ var _this = _super.call(this) || this;
24257
+ _this.effectiveWidth = width;
24258
+ _this.questionTitleWidth = questionTitleWidth;
24259
+ return _this;
24260
+ }
24261
+ PanelLayoutColumnModel.prototype.getType = function () {
24262
+ return "panellayoutcolumn";
24263
+ };
24264
+ PanelLayoutColumnModel.prototype.isEmpty = function () {
24265
+ return !this.width && !this.questionTitleWidth;
24266
+ };
24267
+ __decorate([
24268
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
24269
+ ], PanelLayoutColumnModel.prototype, "width", void 0);
24270
+ __decorate([
24271
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
24272
+ onSet: function (newValue, target, prevVal) {
24273
+ if (newValue !== prevVal) {
24274
+ target.width = newValue;
24275
+ }
24276
+ }
24277
+ })
24278
+ ], PanelLayoutColumnModel.prototype, "effectiveWidth", void 0);
24279
+ __decorate([
24280
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
24281
+ ], PanelLayoutColumnModel.prototype, "questionTitleWidth", void 0);
24282
+ return PanelLayoutColumnModel;
24283
+ }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
24284
+
24285
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panellayoutcolumn", [
24286
+ { name: "effectiveWidth:number", isSerializable: false, minValue: 0 },
24287
+ { name: "width:number", visible: false },
24288
+ "questionTitleWidth",
24289
+ ], function (value) { return new PanelLayoutColumnModel(); });
24290
+
24291
+
24194
24292
  /***/ }),
24195
24293
 
24196
24294
  /***/ "./src/panel.ts":
@@ -24219,6 +24317,7 @@ __webpack_require__.r(__webpack_exports__);
24219
24317
  /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
24220
24318
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
24221
24319
  /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
24320
+ /* harmony import */ var _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./panel-layout-column */ "./src/panel-layout-column.ts");
24222
24321
  var __extends = (undefined && undefined.__extends) || (function () {
24223
24322
  var extendStatics = function (d, b) {
24224
24323
  extendStatics = Object.setPrototypeOf ||
@@ -24259,6 +24358,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
24259
24358
 
24260
24359
 
24261
24360
 
24361
+
24262
24362
  var QuestionRowModel = /** @class */ (function (_super) {
24263
24363
  __extends(QuestionRowModel, _super);
24264
24364
  function QuestionRowModel(panel) {
@@ -24535,10 +24635,18 @@ var PanelModelBase = /** @class */ (function (_super) {
24535
24635
  var _this = _super.call(this, name) || this;
24536
24636
  _this.isQuestionsReady = false;
24537
24637
  _this.questionsValue = new Array();
24638
+ _this._columns = undefined;
24639
+ _this._columnsReady = false;
24538
24640
  _this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
24539
24641
  _this.setPropertyValue("visibleRows", value);
24540
24642
  }, function () { return _this.visibleRows; });
24541
24643
  _this.isRandomizing = false;
24644
+ _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
24645
+ if (_this._columnsReady) {
24646
+ _this.updateColumnWidth(_this.layoutColumns);
24647
+ _this.updateRootStyle();
24648
+ }
24649
+ };
24542
24650
  _this.locCountRowUpdates = 0;
24543
24651
  _this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
24544
24652
  _this.createNewArray("visibleRows");
@@ -24579,7 +24687,8 @@ var PanelModelBase = /** @class */ (function (_super) {
24579
24687
  isAnimationEnabled: function () { return _this.animationAllowed; },
24580
24688
  getAnimatedElement: function (row) { return row.getRootElement(); },
24581
24689
  getLeaveOptions: function (_) {
24582
- return { cssClass: _this.cssClasses.rowFadeOut,
24690
+ return {
24691
+ cssClass: _this.cssClasses.rowFadeOut,
24583
24692
  onBeforeRunAnimation: beforeRunAnimation
24584
24693
  };
24585
24694
  },
@@ -24624,10 +24733,14 @@ var PanelModelBase = /** @class */ (function (_super) {
24624
24733
  this.releaseAnimations();
24625
24734
  };
24626
24735
  PanelModelBase.prototype.endLoadingFromJson = function () {
24736
+ var _this = this;
24627
24737
  _super.prototype.endLoadingFromJson.call(this);
24628
24738
  this.updateDescriptionVisibility(this.description);
24629
24739
  this.markQuestionListDirty();
24630
24740
  this.onRowsChanged();
24741
+ this.layoutColumns.forEach(function (col) {
24742
+ col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
24743
+ });
24631
24744
  };
24632
24745
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
24633
24746
  get: function () {
@@ -25410,6 +25523,51 @@ var PanelModelBase = /** @class */ (function (_super) {
25410
25523
  }
25411
25524
  }
25412
25525
  };
25526
+ PanelModelBase.prototype.calcMaxRowColSpan = function () {
25527
+ var maxRowColSpan = 0;
25528
+ this.rows.forEach(function (row) {
25529
+ var curRowSpan = 0;
25530
+ var userDefinedRow = false;
25531
+ row.elements.forEach(function (el) {
25532
+ if (!!el.width) {
25533
+ userDefinedRow = true;
25534
+ }
25535
+ curRowSpan += (el.colSpan || 1);
25536
+ });
25537
+ if (!userDefinedRow && curRowSpan > maxRowColSpan)
25538
+ maxRowColSpan = curRowSpan;
25539
+ });
25540
+ return maxRowColSpan;
25541
+ };
25542
+ PanelModelBase.prototype.updateColumnWidth = function (columns) {
25543
+ var remainingSpace = 0, remainingColCount = 0;
25544
+ columns.forEach(function (col) {
25545
+ if (!col.width) {
25546
+ remainingColCount++;
25547
+ }
25548
+ else {
25549
+ remainingSpace += col.width;
25550
+ col.setPropertyValue("effectiveWidth", col.width);
25551
+ }
25552
+ });
25553
+ if (!!remainingColCount) {
25554
+ var oneColumnWidth = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["roundTo2Decimals"])((100 - remainingSpace) / remainingColCount);
25555
+ for (var index = 0; index < columns.length; index++) {
25556
+ if (!columns[index].width) {
25557
+ columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
25558
+ }
25559
+ }
25560
+ }
25561
+ };
25562
+ PanelModelBase.prototype.updateColumns = function () {
25563
+ this._columns = undefined;
25564
+ this.updateRootStyle();
25565
+ };
25566
+ PanelModelBase.prototype.updateRootStyle = function () {
25567
+ var _a;
25568
+ _super.prototype.updateRootStyle.call(this);
25569
+ (_a = this.elements) === null || _a === void 0 ? void 0 : _a.forEach(function (el) { return el.updateRootStyle(); });
25570
+ };
25413
25571
  PanelModelBase.prototype.updateCustomWidgets = function () {
25414
25572
  for (var i = 0; i < this.elements.length; i++) {
25415
25573
  this.elements[i].updateCustomWidgets();
@@ -25470,6 +25628,69 @@ var PanelModelBase = /** @class */ (function (_super) {
25470
25628
  PanelModelBase.prototype.getQuestionTitleWidth = function () {
25471
25629
  return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
25472
25630
  };
25631
+ Object.defineProperty(PanelModelBase.prototype, "columns", {
25632
+ get: function () {
25633
+ if (!this._columns) {
25634
+ this.generateColumns();
25635
+ }
25636
+ return this._columns || [];
25637
+ },
25638
+ enumerable: false,
25639
+ configurable: true
25640
+ });
25641
+ PanelModelBase.prototype.generateColumns = function () {
25642
+ var maxRowColSpan = this.calcMaxRowColSpan();
25643
+ var columns = [].concat(this.layoutColumns);
25644
+ if (maxRowColSpan <= this.layoutColumns.length) {
25645
+ columns = this.layoutColumns.slice(0, maxRowColSpan);
25646
+ }
25647
+ else {
25648
+ for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
25649
+ var newCol = new _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__["PanelLayoutColumnModel"]();
25650
+ newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
25651
+ columns.push(newCol);
25652
+ }
25653
+ }
25654
+ this._columns = columns;
25655
+ try {
25656
+ this._columnsReady = false;
25657
+ this.updateColumnWidth(columns);
25658
+ }
25659
+ finally {
25660
+ this._columnsReady = true;
25661
+ }
25662
+ this.layoutColumns = columns;
25663
+ };
25664
+ PanelModelBase.prototype.getColumsForElement = function (el) {
25665
+ var row = this.findRowByElement(el);
25666
+ if (!row || !this.survey || !this.survey.gridLayoutEnabled)
25667
+ return [];
25668
+ var lastExpandableElementIndex = row.elements.length - 1;
25669
+ while (lastExpandableElementIndex >= 0) {
25670
+ if (!row.elements[lastExpandableElementIndex].getPropertyValueWithoutDefault("colSpan")) {
25671
+ break;
25672
+ }
25673
+ lastExpandableElementIndex--;
25674
+ }
25675
+ var elementIndex = row.elements.indexOf(el);
25676
+ var startIndex = 0;
25677
+ for (var index = 0; index < elementIndex; index++) {
25678
+ startIndex += row.elements[index].colSpan;
25679
+ }
25680
+ var currentColSpan = el.getPropertyValueWithoutDefault("colSpan");
25681
+ if (!currentColSpan && elementIndex === lastExpandableElementIndex) {
25682
+ var usedSpans = 0;
25683
+ for (var index = 0; index < row.elements.length; index++) {
25684
+ if (index !== lastExpandableElementIndex) {
25685
+ usedSpans += row.elements[index].colSpan;
25686
+ }
25687
+ }
25688
+ currentColSpan = this.columns.length - usedSpans;
25689
+ }
25690
+ var result = this.columns.slice(startIndex, startIndex + (currentColSpan || 1));
25691
+ el.setPropertyValue("effectiveColSpan", result.length);
25692
+ return result;
25693
+ };
25473
25694
  PanelModelBase.prototype.getStartIndex = function () {
25474
25695
  if (!!this.parent)
25475
25696
  return this.parent.getQuestionStartIndex();
@@ -25554,6 +25775,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25554
25775
  return;
25555
25776
  this.blockAnimations();
25556
25777
  this.setArrayPropertyDirectly("rows", this.buildRows());
25778
+ this.updateColumns();
25557
25779
  this.releaseAnimations();
25558
25780
  };
25559
25781
  PanelModelBase.prototype.blockRowsUpdates = function () {
@@ -25753,6 +25975,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25753
25975
  if (!this.canBuildRows())
25754
25976
  return;
25755
25977
  this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
25978
+ this.updateColumns();
25756
25979
  };
25757
25980
  PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
25758
25981
  if (!row || !row.panel)
@@ -25980,6 +26203,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25980
26203
  if (this.wasRendered) {
25981
26204
  element.onFirstRendering();
25982
26205
  }
26206
+ this.updateColumns();
25983
26207
  return true;
25984
26208
  };
25985
26209
  PanelModelBase.prototype.insertElement = function (element, dest, location) {
@@ -26096,6 +26320,7 @@ var PanelModelBase = /** @class */ (function (_super) {
26096
26320
  return false;
26097
26321
  }
26098
26322
  this.elements.splice(index, 1);
26323
+ this.updateColumns();
26099
26324
  return true;
26100
26325
  };
26101
26326
  PanelModelBase.prototype.removeQuestion = function (question) {
@@ -26208,6 +26433,16 @@ var PanelModelBase = /** @class */ (function (_super) {
26208
26433
  PanelModelBase.prototype.getCssError = function (cssClasses) {
26209
26434
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
26210
26435
  };
26436
+ PanelModelBase.prototype.getSerializableColumnsValue = function () {
26437
+ var tailIndex = -1;
26438
+ for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
26439
+ if (!this.layoutColumns[index].isEmpty()) {
26440
+ tailIndex = index;
26441
+ break;
26442
+ }
26443
+ }
26444
+ return this.layoutColumns.slice(0, tailIndex + 1);
26445
+ };
26211
26446
  PanelModelBase.prototype.dispose = function () {
26212
26447
  _super.prototype.dispose.call(this);
26213
26448
  if (this.rows) {
@@ -26222,6 +26457,9 @@ var PanelModelBase = /** @class */ (function (_super) {
26222
26457
  this.elements.splice(0, this.elements.length);
26223
26458
  };
26224
26459
  PanelModelBase.panelCounter = 100;
26460
+ __decorate([
26461
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])()
26462
+ ], PanelModelBase.prototype, "layoutColumns", void 0);
26225
26463
  __decorate([
26226
26464
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
26227
26465
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -26253,6 +26491,10 @@ var PanelModel = /** @class */ (function (_super) {
26253
26491
  }
26254
26492
  });
26255
26493
  _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
26494
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
26495
+ _this.registerPropertyChangedHandlers(["title"], function () {
26496
+ _this.calcHasTextInTitle();
26497
+ });
26256
26498
  return _this;
26257
26499
  }
26258
26500
  PanelModel.prototype.getType = function () {
@@ -26272,13 +26514,25 @@ var PanelModel = /** @class */ (function (_super) {
26272
26514
  }
26273
26515
  return _super.prototype.getSurvey.call(this, live);
26274
26516
  };
26517
+ Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
26518
+ get: function () {
26519
+ return this.getPropertyValue("hasTextInTitle");
26520
+ },
26521
+ enumerable: false,
26522
+ configurable: true
26523
+ });
26524
+ PanelModel.prototype.calcHasTextInTitle = function () {
26525
+ this.setPropertyValue("hasTextInTitle", !!this.title);
26526
+ };
26275
26527
  PanelModel.prototype.onSurveyLoad = function () {
26276
26528
  _super.prototype.onSurveyLoad.call(this);
26277
26529
  this.onIndentChanged();
26530
+ this.calcHasTextInTitle();
26278
26531
  };
26279
26532
  PanelModel.prototype.onSetData = function () {
26280
26533
  _super.prototype.onSetData.call(this);
26281
26534
  this.onIndentChanged();
26535
+ this.calcHasTextInTitle();
26282
26536
  };
26283
26537
  Object.defineProperty(PanelModel.prototype, "isPanel", {
26284
26538
  get: function () {
@@ -26584,7 +26838,7 @@ var PanelModel = /** @class */ (function (_super) {
26584
26838
  get: function () {
26585
26839
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
26586
26840
  .append(this.getCssTitle(this.cssClasses.panel))
26587
- .append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
26841
+ .append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
26588
26842
  .toString();
26589
26843
  },
26590
26844
  enumerable: false,
@@ -26688,6 +26942,12 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
26688
26942
  default: "default",
26689
26943
  choices: ["default", "top", "bottom", "left", "hidden"],
26690
26944
  },
26945
+ {
26946
+ name: "layoutColumns:panellayoutcolumns",
26947
+ className: "panellayoutcolumn", isArray: true,
26948
+ onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); },
26949
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
26950
+ },
26691
26951
  { name: "title:text", serializationProperty: "locTitle" },
26692
26952
  { name: "description:text", serializationProperty: "locDescription" },
26693
26953
  {
@@ -26714,6 +26974,14 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
26714
26974
  "width",
26715
26975
  { name: "minWidth", defaultFunc: function () { return "auto"; } },
26716
26976
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].maxWidth; } },
26977
+ {
26978
+ name: "colSpan:number", visible: false,
26979
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
26980
+ },
26981
+ {
26982
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
26983
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
26984
+ },
26717
26985
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
26718
26986
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
26719
26987
  {
@@ -28406,9 +28674,10 @@ var ProgressButtons = /** @class */ (function (_super) {
28406
28674
  if (!listContainerElement)
28407
28675
  return;
28408
28676
  var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
28409
- var circleWidth = this.showItemNumbers ? 17 : 5;
28410
- var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
28411
- var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
28677
+ var circleWidth = this.showItemNumbers ? 36 : 20;
28678
+ // const sideCorrection = this.survey.isMobile ? circleWidth : listContainerElement.children[0].clientWidth;
28679
+ // const connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
28680
+ var connectorWidth = (listContainerElement.clientWidth - circleWidth) / (listContainerElement.children.length - 1) - circleWidth;
28412
28681
  for (var i = 0; i < listContainerElements.length; i++) {
28413
28682
  listContainerElements[i].style.width = connectorWidth + "px";
28414
28683
  }
@@ -28490,6 +28759,7 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
28490
28759
  this.canShowItemTitles = true;
28491
28760
  this.processResponsiveness = function (model, options) {
28492
28761
  _this.viewModel.onUpdateScroller(model.isListContainerHasScroller(_this.element));
28762
+ _this.model.clearConnectorsWidth(_this.element);
28493
28763
  if (!model.showItemTitles) {
28494
28764
  _this.model.adjustConnectors(_this.element);
28495
28765
  return;
@@ -28501,7 +28771,6 @@ var ProgressButtonsResponsivityManager = /** @class */ (function () {
28501
28771
  _this.viewModel.onResize(_this.canShowItemTitles);
28502
28772
  return;
28503
28773
  }
28504
- _this.model.clearConnectorsWidth(_this.element);
28505
28774
  if (_this.timer !== undefined) {
28506
28775
  clearTimeout(_this.timer);
28507
28776
  }
@@ -28606,9 +28875,6 @@ var TriggerExpressionInfo = /** @class */ (function () {
28606
28875
  }
28607
28876
  return TriggerExpressionInfo;
28608
28877
  }());
28609
- function querySelectorIncludingSelf(el, selector) {
28610
- return el.querySelector(selector) || el != _global_variables_utils__WEBPACK_IMPORTED_MODULE_14__["DomWindowHelper"].getWindow() && el.matches(selector) && el;
28611
- }
28612
28878
  /**
28613
28879
  * A base class for all questions.
28614
28880
  */
@@ -28676,6 +28942,7 @@ var Question = /** @class */ (function (_super) {
28676
28942
  _this.updateQuestionCss();
28677
28943
  });
28678
28944
  _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
28945
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
28679
28946
  return _this;
28680
28947
  }
28681
28948
  Question.getQuestionId = function () {
@@ -29283,18 +29550,31 @@ var Question = /** @class */ (function (_super) {
29283
29550
  Object.defineProperty(Question.prototype, "titleWidth", {
29284
29551
  get: function () {
29285
29552
  if (this.getTitleLocation() === "left") {
29286
- if (!!this.parent) {
29553
+ var columns = this.parent.getColumsForElement(this);
29554
+ var columnCount = columns.length;
29555
+ if (columnCount !== 0 && !!columns[0].questionTitleWidth)
29556
+ return columns[0].questionTitleWidth;
29557
+ var percentWidth = this.getPercentQuestionTitleWidth();
29558
+ if (!percentWidth && !!this.parent) {
29287
29559
  var width = this.parent.getQuestionTitleWidth();
29288
29560
  if (width && !isNaN(width))
29289
29561
  width = width + "px";
29290
29562
  return width;
29291
29563
  }
29564
+ return (percentWidth / (columnCount || 1)) + "%";
29292
29565
  }
29293
29566
  return undefined;
29294
29567
  },
29295
29568
  enumerable: false,
29296
29569
  configurable: true
29297
29570
  });
29571
+ Question.prototype.getPercentQuestionTitleWidth = function () {
29572
+ var width = !!this.parent && this.parent.getQuestionTitleWidth();
29573
+ if (!!width && width[width.length - 1] === "%") {
29574
+ return parseInt(width);
29575
+ }
29576
+ return undefined;
29577
+ };
29298
29578
  /**
29299
29579
  * Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
29300
29580
  * @see titleLocation
@@ -29978,9 +30258,10 @@ var Question = /** @class */ (function (_super) {
29978
30258
  this.expandAllParents();
29979
30259
  this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
29980
30260
  }
29981
- var id = !onError
29982
- ? this.getFirstInputElementId()
29983
- : this.getFirstErrorInputElementId();
30261
+ this.focusInputElement(onError);
30262
+ };
30263
+ Question.prototype.focusInputElement = function (onError) {
30264
+ var id = !onError ? this.getFirstInputElementId() : this.getFirstErrorInputElementId();
29984
30265
  if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
29985
30266
  this.fireCallback(this.focusCallback);
29986
30267
  }
@@ -31551,7 +31832,7 @@ var Question = /** @class */ (function (_super) {
31551
31832
  var scrollableSelector_1 = this.getObservedElementSelector();
31552
31833
  if (!scrollableSelector_1)
31553
31834
  return;
31554
- var defaultRootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31835
+ var defaultRootEl = el.querySelector(scrollableSelector_1);
31555
31836
  if (!defaultRootEl)
31556
31837
  return;
31557
31838
  var isProcessed_1 = false;
@@ -31563,7 +31844,7 @@ var Question = /** @class */ (function (_super) {
31563
31844
  isProcessed_1 = false;
31564
31845
  }
31565
31846
  var callback = function () {
31566
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31847
+ var rootEl = el.querySelector(scrollableSelector_1);
31567
31848
  if (!requiredWidth_1 && _this.isDefaultRendering()) {
31568
31849
  requiredWidth_1 = rootEl.scrollWidth;
31569
31850
  }
@@ -31588,10 +31869,8 @@ var Question = /** @class */ (function (_super) {
31588
31869
  });
31589
31870
  this.onMobileChangedCallback = function () {
31590
31871
  setTimeout(function () {
31591
- var rootEl = querySelectorIncludingSelf(el, scrollableSelector_1);
31592
- if (rootEl) {
31593
- _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
31594
- }
31872
+ var rootEl = el.querySelector(scrollableSelector_1);
31873
+ _this.processResponsiveness(requiredWidth_1, Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["getElementWidth"])(rootEl));
31595
31874
  }, 0);
31596
31875
  };
31597
31876
  this.resizeObserver.observe(el);
@@ -31712,13 +31991,6 @@ var Question = /** @class */ (function (_super) {
31712
31991
  enumerable: false,
31713
31992
  configurable: true
31714
31993
  });
31715
- Object.defineProperty(Question.prototype, "ariaExpanded", {
31716
- get: function () {
31717
- return null;
31718
- },
31719
- enumerable: false,
31720
- configurable: true
31721
- });
31722
31994
  Object.defineProperty(Question.prototype, "ariaErrormessage", {
31723
31995
  get: function () {
31724
31996
  if (this.isNewA11yStructure)
@@ -31805,6 +32077,9 @@ var Question = /** @class */ (function (_super) {
31805
32077
  __decorate([
31806
32078
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
31807
32079
  ], Question.prototype, "forceIsInputReadOnly", void 0);
32080
+ __decorate([
32081
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
32082
+ ], Question.prototype, "ariaExpanded", void 0);
31808
32083
  __decorate([
31809
32084
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
31810
32085
  ], Question.prototype, "commentPlaceholder", void 0);
@@ -31839,6 +32114,14 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
31839
32114
  { name: "width" },
31840
32115
  { name: "minWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth; } },
31841
32116
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].maxWidth; } },
32117
+ {
32118
+ name: "colSpan:number", visible: false,
32119
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
32120
+ },
32121
+ {
32122
+ name: "effectiveColSpan:number", minValue: 1, isSerializable: false,
32123
+ visibleIf: function (obj) { return !!obj && !!obj.survey && obj.survey.gridLayoutEnabled; }
32124
+ },
31842
32125
  { name: "startWithNewLine:boolean", default: true, layout: "row" },
31843
32126
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
31844
32127
  {
@@ -32224,7 +32507,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
32224
32507
  _this.isUpdatingChoicesDependedQuestions = false;
32225
32508
  _this.headItemsCount = 0;
32226
32509
  _this.footItemsCount = 0;
32227
- _this.allowMultiColumns = true;
32228
32510
  _this.prevIsOtherSelected = false;
32229
32511
  _this.noneItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].noneItemValue, "noneText", "noneItemText");
32230
32512
  _this.refuseItemValue = _this.createDefaultItem(_settings__WEBPACK_IMPORTED_MODULE_9__["settings"].refuseItemValue, "refuseText", "refuseItemText");
@@ -34245,23 +34527,9 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34245
34527
  enumerable: false,
34246
34528
  configurable: true
34247
34529
  });
34248
- QuestionSelectBase.prototype.getObservedElementSelector = function () {
34249
- return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_11__["classesToSelector"])(this.cssClasses.mainRoot);
34250
- };
34251
- QuestionSelectBase.prototype.supportResponsiveness = function () {
34252
- return true;
34253
- };
34254
- QuestionSelectBase.prototype.onBeforeSetCompactRenderer = function () {
34255
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
34256
- this.allowMultiColumns = false;
34257
- };
34258
- QuestionSelectBase.prototype.onBeforeSetDesktopRenderer = function () {
34259
- _super.prototype.onBeforeSetDesktopRenderer.call(this);
34260
- this.allowMultiColumns = true;
34261
- };
34262
34530
  Object.defineProperty(QuestionSelectBase.prototype, "hasColumns", {
34263
34531
  get: function () {
34264
- return !this.isMobile && this.allowMultiColumns &&
34532
+ return !this.isMobile &&
34265
34533
  (this.getCurrentColCount() > 1);
34266
34534
  },
34267
34535
  enumerable: false,
@@ -34419,9 +34687,6 @@ var QuestionSelectBase = /** @class */ (function (_super) {
34419
34687
  __decorate([
34420
34688
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: true })
34421
34689
  ], QuestionSelectBase.prototype, "otherPlaceholder", void 0);
34422
- __decorate([
34423
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
34424
- ], QuestionSelectBase.prototype, "allowMultiColumns", void 0);
34425
34690
  return QuestionSelectBase;
34426
34691
  }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
34427
34692
 
@@ -36875,6 +37140,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
36875
37140
  QuestionCustomModelBase.prototype.findQuestionByName = function (name) {
36876
37141
  return !!this.data ? this.data.findQuestionByName(name) : null;
36877
37142
  };
37143
+ QuestionCustomModelBase.prototype.getEditingSurveyElement = function () {
37144
+ return undefined;
37145
+ };
36878
37146
  //IPanel
36879
37147
  QuestionCustomModelBase.prototype.addElement = function (element, index) { };
36880
37148
  QuestionCustomModelBase.prototype.removeElement = function (element) {
@@ -36886,6 +37154,10 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
36886
37154
  QuestionCustomModelBase.prototype.getQuestionTitleWidth = function () {
36887
37155
  return undefined;
36888
37156
  };
37157
+ QuestionCustomModelBase.prototype.getColumsForElement = function (el) {
37158
+ return [];
37159
+ };
37160
+ QuestionCustomModelBase.prototype.updateColumns = function () { };
36889
37161
  QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
36890
37162
  return this.getStartIndex();
36891
37163
  };
@@ -37253,6 +37525,40 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37253
37525
  this.contentPanel.updateElementCss(reNew);
37254
37526
  }
37255
37527
  };
37528
+ QuestionCompositeModel.prototype.dispose = function () {
37529
+ this.unConnectEditingObj();
37530
+ _super.prototype.dispose.call(this);
37531
+ };
37532
+ QuestionCompositeModel.prototype.updateEditingObj = function () {
37533
+ var _this = this;
37534
+ var _a;
37535
+ var obj = (_a = this.data) === null || _a === void 0 ? void 0 : _a.getEditingSurveyElement();
37536
+ if (!obj)
37537
+ return undefined;
37538
+ var newObj = obj[this.getValueName()];
37539
+ if (!!newObj && !newObj.onPropertyChanged) {
37540
+ newObj = undefined;
37541
+ }
37542
+ if (newObj !== this.editingObjValue) {
37543
+ this.unConnectEditingObj();
37544
+ this.editingObjValue = newObj;
37545
+ if (!!newObj) {
37546
+ this.onEditingObjPropertyChanged = function (sender, options) {
37547
+ _this.setNewValueIntoQuestion(options.name, _this.editingObjValue[options.name]);
37548
+ };
37549
+ newObj.onPropertyChanged.add(this.onEditingObjPropertyChanged);
37550
+ }
37551
+ }
37552
+ return this.editingObjValue;
37553
+ };
37554
+ QuestionCompositeModel.prototype.unConnectEditingObj = function () {
37555
+ if (!!this.editingObjValue && !this.editingObjValue.isDisposed) {
37556
+ this.editingObjValue.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
37557
+ }
37558
+ };
37559
+ QuestionCompositeModel.prototype.getEditingSurveyElement = function () {
37560
+ return this.editingObjValue;
37561
+ };
37256
37562
  QuestionCompositeModel.prototype.getTextProcessor = function () {
37257
37563
  return this.textProcessing;
37258
37564
  };
@@ -37312,6 +37618,11 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37312
37618
  }
37313
37619
  _super.prototype.onReadOnlyChanged.call(this);
37314
37620
  };
37621
+ QuestionCompositeModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
37622
+ if (clearData === void 0) { clearData = false; }
37623
+ this.updateEditingObj();
37624
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
37625
+ };
37315
37626
  QuestionCompositeModel.prototype.onSurveyLoad = function () {
37316
37627
  this.isSettingValOnLoading = true;
37317
37628
  if (!!this.contentPanel) {
@@ -37483,7 +37794,7 @@ var QuestionCompositeModel = /** @class */ (function (_super) {
37483
37794
  var key = questions[i].getValueName();
37484
37795
  var val = !!newValue ? newValue[key] : undefined;
37485
37796
  var q = questions[i];
37486
- if (!this.isTwoValueEquals(q.value, val)) {
37797
+ if (!this.isTwoValueEquals(q.value, val) && (val !== undefined || !q.isEmpty())) {
37487
37798
  q.value = val;
37488
37799
  }
37489
37800
  }
@@ -37848,14 +38159,6 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37848
38159
  enumerable: false,
37849
38160
  configurable: true
37850
38161
  });
37851
- Object.defineProperty(QuestionDropdownModel.prototype, "ariaExpanded", {
37852
- get: function () {
37853
- var popupModel = this.popupModel;
37854
- return !!popupModel && popupModel.isVisible ? "true" : "false";
37855
- },
37856
- enumerable: false,
37857
- configurable: true
37858
- });
37859
38162
  QuestionDropdownModel.prototype.onOpenedCallBack = function () {
37860
38163
  this.onOpened.fire(this, { question: this, choices: this.choices });
37861
38164
  };
@@ -37903,6 +38206,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37903
38206
  this.lastSelectedItemValue = null;
37904
38207
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
37905
38208
  };
38209
+ QuestionDropdownModel.prototype.afterRenderCore = function (el) {
38210
+ _super.prototype.afterRenderCore.call(this, el);
38211
+ if (!!this.dropdownListModelValue) {
38212
+ this.dropdownListModelValue.clear();
38213
+ }
38214
+ };
37906
38215
  QuestionDropdownModel.prototype.onClick = function (e) {
37907
38216
  !!this.onOpenedCallBack && this.onOpenedCallBack();
37908
38217
  };
@@ -39207,9 +39516,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
39207
39516
  });
39208
39517
  QuestionFileModel.prototype.chooseFile = function (event) {
39209
39518
  var _this = this;
39210
- if (!_global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].isAvailable())
39519
+ if (!this.rootElement)
39520
+ return;
39521
+ var inputElement = this.rootElement.querySelector("#" + this.inputId);
39522
+ if (!inputElement)
39211
39523
  return;
39212
- var inputElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__["DomDocumentHelper"].getDocument().getElementById(this.inputId);
39213
39524
  event.preventDefault();
39214
39525
  event.stopImmediatePropagation();
39215
39526
  if (inputElement) {
@@ -39756,9 +40067,11 @@ var QuestionFileModel = /** @class */ (function (_super) {
39756
40067
  return false;
39757
40068
  };
39758
40069
  QuestionFileModel.prototype.canDragDrop = function () { return !this.isInputReadOnly && this.currentMode !== "camera" && !this.isPlayingVideo; };
39759
- QuestionFileModel.prototype.afterRender = function (el) {
40070
+ QuestionFileModel.prototype.afterRenderQuestionElement = function (el) {
39760
40071
  this.rootElement = el;
39761
- _super.prototype.afterRender.call(this, el);
40072
+ };
40073
+ QuestionFileModel.prototype.beforeDestroyQuestionElement = function (el) {
40074
+ this.rootElement = undefined;
39762
40075
  };
39763
40076
  QuestionFileModel.prototype.clearFilesCore = function () {
39764
40077
  if (this.rootElement) {
@@ -42705,6 +43018,7 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
42705
43018
  var survey = this.getSurvey();
42706
43019
  return !!survey ? survey.getQuestionByName(name) : null;
42707
43020
  };
43021
+ MatrixDropdownRowModelBase.prototype.getEditingSurveyElement = function () { return undefined; };
42708
43022
  MatrixDropdownRowModelBase.prototype.setValueCore = function (name, newColumnValue, isComment) {
42709
43023
  if (this.isSettingValue)
42710
43024
  return;
@@ -46052,30 +46366,34 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownc
46052
46366
  },
46053
46367
  {
46054
46368
  name: "totalType",
46369
+ visibleIf: function (obj) { return !obj.isShowInMultipleColumns; },
46055
46370
  default: "none",
46056
46371
  choices: ["none", "sum", "count", "min", "max", "avg"],
46057
46372
  },
46058
- "totalExpression:expression",
46059
- { name: "totalFormat", serializationProperty: "locTotalFormat" },
46373
+ { name: "totalExpression:expression", visibleIf: function (obj) { return !obj.isShowInMultipleColumns; } },
46374
+ { name: "totalFormat", serializationProperty: "locTotalFormat", visibleIf: function (obj) { return obj.hasTotal; } },
46060
46375
  {
46061
46376
  name: "totalDisplayStyle",
46377
+ visibleIf: function (obj) { return obj.hasTotal; },
46062
46378
  default: "none",
46063
46379
  choices: ["none", "decimal", "currency", "percent"],
46064
46380
  },
46065
46381
  {
46066
46382
  name: "totalAlignment",
46383
+ visibleIf: function (obj) { return obj.hasTotal; },
46067
46384
  default: "auto",
46068
46385
  choices: ["auto", "left", "center", "right"],
46069
46386
  },
46070
46387
  {
46071
46388
  name: "totalCurrency",
46389
+ visibleIf: function (obj) { return obj.hasTotal; },
46072
46390
  choices: function () {
46073
46391
  return Object(_question_expression__WEBPACK_IMPORTED_MODULE_2__["getCurrecyCodes"])();
46074
46392
  },
46075
46393
  default: "USD",
46076
46394
  },
46077
- { name: "totalMaximumFractionDigits:number", default: -1 },
46078
- { name: "totalMinimumFractionDigits:number", default: -1 },
46395
+ { name: "totalMaximumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
46396
+ { name: "totalMinimumFractionDigits:number", default: -1, visibleIf: function (obj) { return obj.hasTotal; } },
46079
46397
  { name: "renderAs", default: "default", visible: false },
46080
46398
  ], function () {
46081
46399
  return new MatrixDropdownColumn("");
@@ -49012,6 +49330,7 @@ var MultipleTextItemModel = /** @class */ (function (_super) {
49012
49330
  var survey = this.getSurvey();
49013
49331
  return !!survey ? survey.getQuestionByName(name) : null;
49014
49332
  };
49333
+ MultipleTextItemModel.prototype.getEditingSurveyElement = function () { return undefined; };
49015
49334
  //IValidatorOwner
49016
49335
  MultipleTextItemModel.prototype.getValidatorTitle = function () {
49017
49336
  return this.title;
@@ -49515,6 +49834,10 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
49515
49834
  QuestionMultipleTextModel.prototype.getQuestionTitleWidth = function () {
49516
49835
  return undefined;
49517
49836
  };
49837
+ QuestionMultipleTextModel.prototype.getColumsForElement = function (el) {
49838
+ return [];
49839
+ };
49840
+ QuestionMultipleTextModel.prototype.updateColumns = function () { };
49518
49841
  QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
49519
49842
  return this.getStartIndex();
49520
49843
  };
@@ -49941,6 +50264,7 @@ var QuestionPanelDynamicItem = /** @class */ (function () {
49941
50264
  var survey = this.getSurvey();
49942
50265
  return !!survey ? survey.getQuestionByName(name) : null;
49943
50266
  };
50267
+ QuestionPanelDynamicItem.prototype.getEditingSurveyElement = function () { return undefined; };
49944
50268
  QuestionPanelDynamicItem.prototype.getAllValues = function () {
49945
50269
  return this.data.getPanelItemData(this);
49946
50270
  };
@@ -54649,17 +54973,6 @@ var QuestionRatingModel = /** @class */ (function (_super) {
54649
54973
  QuestionRatingModel.prototype.getDesktopRenderAs = function () {
54650
54974
  return (this.displayMode == "dropdown") ? "dropdown" : "default";
54651
54975
  };
54652
- Object.defineProperty(QuestionRatingModel.prototype, "ariaExpanded", {
54653
- get: function () {
54654
- var _a;
54655
- var popupModel = (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
54656
- if (!popupModel)
54657
- return null;
54658
- return popupModel.isVisible ? "true" : "false";
54659
- },
54660
- enumerable: false,
54661
- configurable: true
54662
- });
54663
54976
  Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
54664
54977
  get: function () {
54665
54978
  if (this.renderAs === "dropdown") {
@@ -55618,14 +55931,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
55618
55931
  enumerable: false,
55619
55932
  configurable: true
55620
55933
  });
55621
- Object.defineProperty(QuestionTagboxModel.prototype, "ariaExpanded", {
55622
- get: function () {
55623
- var popupModel = this.popupModel;
55624
- return !!popupModel && popupModel.isVisible ? "true" : "false";
55625
- },
55626
- enumerable: false,
55627
- configurable: true
55628
- });
55629
55934
  QuestionTagboxModel.prototype.getControlClass = function () {
55630
55935
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
55631
55936
  .append(this.cssClasses.control)
@@ -55879,6 +56184,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
55879
56184
  _this.updateRemainingCharacterCounter(event.target.value);
55880
56185
  };
55881
56186
  _this.onKeyDown = function (event) {
56187
+ _this.updateDateValidationMessage(event);
55882
56188
  _this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
55883
56189
  if (_this.isInputTextUpdate) {
55884
56190
  _this._isWaitingForEnter = event.keyCode === 229;
@@ -55886,6 +56192,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
55886
56192
  _this.onTextKeyDownHandler(event);
55887
56193
  };
55888
56194
  _this.onChange = function (event) {
56195
+ _this.updateDateValidationMessage(event);
55889
56196
  var elementIsFocused = event.target === _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].environment.root.activeElement;
55890
56197
  if (elementIsFocused) {
55891
56198
  if (_this.isInputTextUpdate) {
@@ -56317,6 +56624,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56317
56624
  };
56318
56625
  errors.push(maxError);
56319
56626
  }
56627
+ if (!!this.dateValidationMessage) {
56628
+ errors.push(new _error__WEBPACK_IMPORTED_MODULE_5__["CustomError"](this.dateValidationMessage, this));
56629
+ }
56320
56630
  var valName = this.getValidatorTitle();
56321
56631
  var emailValidator = new _validator__WEBPACK_IMPORTED_MODULE_4__["EmailValidator"]();
56322
56632
  if (this.inputType === "email" &&
@@ -56467,6 +56777,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56467
56777
  };
56468
56778
  QuestionTextModel.prototype.setNewValue = function (newValue) {
56469
56779
  newValue = this.correctValueType(newValue);
56780
+ if (!!newValue) {
56781
+ this.dateValidationMessage = undefined;
56782
+ }
56470
56783
  _super.prototype.setNewValue.call(this, newValue);
56471
56784
  };
56472
56785
  QuestionTextModel.prototype.correctValueType = function (newValue) {
@@ -56517,6 +56830,9 @@ var QuestionTextModel = /** @class */ (function (_super) {
56517
56830
  this.inputValue = newValue;
56518
56831
  }
56519
56832
  };
56833
+ QuestionTextModel.prototype.updateDateValidationMessage = function (event) {
56834
+ this.dateValidationMessage = this.isDateInputType && !!event.target ? event.target.validationMessage : undefined;
56835
+ };
56520
56836
  QuestionTextModel.prototype.afterRenderQuestionElement = function (el) {
56521
56837
  if (!!el) {
56522
56838
  this.input = el instanceof HTMLInputElement ? el : el.querySelector("input");
@@ -56715,7 +57031,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
56715
57031
  name: "maskSettings:masksettings",
56716
57032
  className: "masksettings",
56717
57033
  visibleIndex: 1,
56718
- dependsOn: "inputType",
57034
+ dependsOn: ["inputType", "maskType"],
56719
57035
  visibleIf: function (obj) {
56720
57036
  return obj.inputType === "text" || obj.inputType === "tel";
56721
57037
  },
@@ -58050,6 +58366,35 @@ var settings = {
58050
58366
  "#": /[a-zA-Z0-9]/
58051
58367
  }
58052
58368
  },
58369
+ /**
58370
+ * Specifies whether to store date-time values in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`. Applies only to form fields with [`inputType`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#inputType) set to `"datetime-local"`.
58371
+ *
58372
+ * Default value: `false`
58373
+ *
58374
+ * If you enable this setting, date-time values are converted from local time to UTC when they are saved to the survey's [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) object, while the question values remain in local time. Therefore, when you specify default values using a question's [`defaultValue`](https://surveyjs.io/form-library/documentation/api-reference/text-entry-question-model#defaultValue) property, you need to use local time, but if you specify them using the `data` object, use a UTC date-time value in the following format: `"YYYY-MM-DDThh:mm:ss.sssZ"`.
58375
+ *
58376
+ * ```js
58377
+ * const surveyJson = {
58378
+ * "elements": [{
58379
+ * "name": "datetime",
58380
+ * "type": "text",
58381
+ * "title": "Select a date and time",
58382
+ * "inputType": "datetime-local",
58383
+ * "defaultValue": "2024-07-16T12:15:00" // Local date-time value
58384
+ * }]
58385
+ * }
58386
+ * ```
58387
+ *
58388
+ * ```js
58389
+ * import { Model } from "survey-core";
58390
+ * const surveyJson = { ... }
58391
+ * const survey = new Model(surveyJson);
58392
+ *
58393
+ * survey.data = {
58394
+ * datetime: "2024-07-16T12:15:00.000Z" // UTC date-time value
58395
+ * }
58396
+ * ```
58397
+ */
58053
58398
  storeUtcDates: false
58054
58399
  };
58055
58400
 
@@ -58743,6 +59088,7 @@ var SurveyElement = /** @class */ (function (_super) {
58743
59088
  _this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
58744
59089
  _this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
58745
59090
  _this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
59091
+ _this.registerPropertyChangedHandlers(["minWidth", "maxWidth", "renderWidth", "allowRootStyle", "parent"], function () { _this.updateRootStyle(); });
58746
59092
  return _this;
58747
59093
  }
58748
59094
  SurveyElement.getProgressInfoByElements = function (children, isRequired) {
@@ -58837,6 +59183,16 @@ var SurveyElement = /** @class */ (function (_super) {
58837
59183
  }
58838
59184
  return false;
58839
59185
  };
59186
+ Object.defineProperty(SurveyElement.prototype, "colSpan", {
59187
+ get: function () {
59188
+ return this.getPropertyValue("colSpan", 1);
59189
+ },
59190
+ set: function (val) {
59191
+ this.setPropertyValue("colSpan", val);
59192
+ },
59193
+ enumerable: false,
59194
+ configurable: true
59195
+ });
58840
59196
  SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
58841
59197
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
58842
59198
  if (name === "state") {
@@ -59682,12 +60038,24 @@ var SurveyElement = /** @class */ (function (_super) {
59682
60038
  enumerable: false,
59683
60039
  configurable: true
59684
60040
  });
59685
- Object.defineProperty(SurveyElement.prototype, "rootStyle", {
59686
- get: function () {
59687
- var style = {};
60041
+ SurveyElement.prototype.updateRootStyle = function () {
60042
+ var style = {};
60043
+ var _width;
60044
+ if (!!this.parent) {
60045
+ var columns = this.parent.getColumsForElement(this);
60046
+ _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
60047
+ if (!!_width && _width !== 100) {
60048
+ style["flexGrow"] = 0;
60049
+ style["flexShrink"] = 0;
60050
+ style["flexBasis"] = _width + "%";
60051
+ style["minWidth"] = undefined;
60052
+ style["maxWidth"] = undefined;
60053
+ }
60054
+ }
60055
+ if (Object.keys(style).length == 0) {
59688
60056
  var minWidth = this.minWidth;
59689
60057
  if (minWidth != "auto")
59690
- minWidth = "min(100%, " + this.minWidth + ")";
60058
+ minWidth = "min(100%, " + minWidth + ")";
59691
60059
  if (this.allowRootStyle && this.renderWidth) {
59692
60060
  // style["width"] = this.renderWidth;
59693
60061
  style["flexGrow"] = 1;
@@ -59696,11 +60064,9 @@ var SurveyElement = /** @class */ (function (_super) {
59696
60064
  style["minWidth"] = minWidth;
59697
60065
  style["maxWidth"] = this.maxWidth;
59698
60066
  }
59699
- return style;
59700
- },
59701
- enumerable: false,
59702
- configurable: true
59703
- });
60067
+ }
60068
+ this.rootStyle = style;
60069
+ };
59704
60070
  SurveyElement.prototype.isContainsSelection = function (el) {
59705
60071
  var elementWithSelection = undefined;
59706
60072
  var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
@@ -59854,7 +60220,8 @@ var SurveyElement = /** @class */ (function (_super) {
59854
60220
  },
59855
60221
  getLeaveOptions: function () {
59856
60222
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
59857
- return { cssClass: cssClasses.contentFadeOut,
60223
+ return {
60224
+ cssClass: cssClasses.contentFadeOut,
59858
60225
  onBeforeRunAnimation: beforeRunAnimation,
59859
60226
  onAfterRunAnimation: afterRunAnimation
59860
60227
  };
@@ -59910,6 +60277,13 @@ var SurveyElement = /** @class */ (function (_super) {
59910
60277
  __decorate([
59911
60278
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
59912
60279
  ], SurveyElement.prototype, "isDragMe", void 0);
60280
+ __decorate([
60281
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
60282
+ onSet: function (newValue, target) {
60283
+ target.colSpan = newValue;
60284
+ }
60285
+ })
60286
+ ], SurveyElement.prototype, "effectiveColSpan", void 0);
59913
60287
  __decorate([
59914
60288
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
59915
60289
  ], SurveyElement.prototype, "hasVisibleErrors", void 0);
@@ -59919,6 +60293,9 @@ var SurveyElement = /** @class */ (function (_super) {
59919
60293
  __decorate([
59920
60294
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
59921
60295
  ], SurveyElement.prototype, "allowRootStyle", void 0);
60296
+ __decorate([
60297
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
60298
+ ], SurveyElement.prototype, "rootStyle", void 0);
59922
60299
  __decorate([
59923
60300
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
59924
60301
  ], SurveyElement.prototype, "_renderedIsExpanded", void 0);
@@ -60817,8 +61194,8 @@ var SurveyModel = /** @class */ (function (_super) {
60817
61194
  _this.isNavigationButtonPressed = false;
60818
61195
  _this.mouseDownPage = null;
60819
61196
  _this.isCalculatingProgressText = false;
60820
- _this.isFirstPageRendering = true;
60821
61197
  _this.isCurrentPageRendering = true;
61198
+ _this.isCurrentPageRendered = undefined;
60822
61199
  _this.isTriggerIsRunning = false;
60823
61200
  _this.triggerValues = null;
60824
61201
  _this.triggerKeys = null;
@@ -63260,7 +63637,8 @@ var SurveyModel = /** @class */ (function (_super) {
63260
63637
  }
63261
63638
  if (data) {
63262
63639
  for (var key in data) {
63263
- this.setDataValueCore(this.valuesHash, key, data[key]);
63640
+ var dataKey = typeof key === "string" ? key.trim() : key;
63641
+ this.setDataValueCore(this.valuesHash, dataKey, data[key]);
63264
63642
  }
63265
63643
  }
63266
63644
  this.updateAllQuestionsValue(clearData);
@@ -63360,9 +63738,7 @@ var SurveyModel = /** @class */ (function (_super) {
63360
63738
  var _this = this;
63361
63739
  if (this.editingObj == val)
63362
63740
  return;
63363
- if (!!this.editingObj) {
63364
- this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
63365
- }
63741
+ this.unConnectEditingObj();
63366
63742
  this.editingObjValue = val;
63367
63743
  if (this.isDisposed)
63368
63744
  return;
@@ -63388,6 +63764,11 @@ var SurveyModel = /** @class */ (function (_super) {
63388
63764
  enumerable: false,
63389
63765
  configurable: true
63390
63766
  });
63767
+ SurveyModel.prototype.unConnectEditingObj = function () {
63768
+ if (!!this.editingObj && !this.editingObj.isDisposed) {
63769
+ this.editingObj.onPropertyChanged.remove(this.onEditingObjPropertyChanged);
63770
+ }
63771
+ };
63391
63772
  Object.defineProperty(SurveyModel.prototype, "isEditingSurveyElement", {
63392
63773
  get: function () {
63393
63774
  return !!this.editingObj;
@@ -64065,6 +64446,9 @@ var SurveyModel = /** @class */ (function (_super) {
64065
64446
  oldValue.passed = true;
64066
64447
  }
64067
64448
  }
64449
+ if (this.isCurrentPageRendered === true) {
64450
+ this.isCurrentPageRendered = false;
64451
+ }
64068
64452
  this.onCurrentPageChanged.fire(this, options);
64069
64453
  };
64070
64454
  SurveyModel.prototype.notifyQuestionsOnHidingContent = function (page) {
@@ -64849,7 +65233,11 @@ var SurveyModel = /** @class */ (function (_super) {
64849
65233
  return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
64850
65234
  };
64851
65235
  SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
65236
+ var _this = this;
64852
65237
  this.questionHashesClear();
65238
+ if (this.firstPageIsStarted && this.pages.length > 0) {
65239
+ this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
65240
+ }
64853
65241
  this.isLockingUpdateOnPageModes = !isFirstLoad;
64854
65242
  var startIndex = this.getPageStartIndex();
64855
65243
  _super.prototype.startLoadingFromJson.call(this);
@@ -65517,11 +65905,11 @@ var SurveyModel = /** @class */ (function (_super) {
65517
65905
  SurveyModel.prototype.afterRenderPage = function (htmlElement) {
65518
65906
  var _this = this;
65519
65907
  if (!this.isDesignMode && !this.focusingQuestionInfo) {
65520
- var doScroll_1 = !this.isFirstPageRendering;
65908
+ var doScroll_1 = this.isCurrentPageRendered === false;
65521
65909
  setTimeout(function () { return _this.scrollToTopOnPageChange(doScroll_1); }, 1);
65522
65910
  }
65523
65911
  this.focusQuestionInfo();
65524
- this.isFirstPageRendering = false;
65912
+ this.isCurrentPageRendered = true;
65525
65913
  if (this.onAfterRenderPage.isEmpty)
65526
65914
  return;
65527
65915
  this.onAfterRenderPage.fire(this, {
@@ -66059,6 +66447,7 @@ var SurveyModel = /** @class */ (function (_super) {
66059
66447
  SurveyModel.prototype.findQuestionByName = function (name) {
66060
66448
  return this.getQuestionByName(name);
66061
66449
  };
66450
+ SurveyModel.prototype.getEditingSurveyElement = function () { return this.editingObjValue; };
66062
66451
  /**
66063
66452
  * Returns a question with a specified [`valueName`](https://surveyjs.io/form-library/documentation/api-reference/question#valueName).
66064
66453
  *
@@ -68303,6 +68692,7 @@ var SurveyModel = /** @class */ (function (_super) {
68303
68692
  * Call this method to release resources if your application contains multiple survey models or if you re-create a survey model at runtime.
68304
68693
  */
68305
68694
  SurveyModel.prototype.dispose = function () {
68695
+ this.unConnectEditingObj();
68306
68696
  this.removeScrollEventListener();
68307
68697
  this.destroyResizeObserver();
68308
68698
  this.rootElement = undefined;
@@ -68480,6 +68870,9 @@ var SurveyModel = /** @class */ (function (_super) {
68480
68870
  __decorate([
68481
68871
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68482
68872
  ], SurveyModel.prototype, "rootCss", void 0);
68873
+ __decorate([
68874
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68875
+ ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
68483
68876
  __decorate([
68484
68877
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68485
68878
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
@@ -68777,6 +69170,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
68777
69170
  default: "auto",
68778
69171
  choices: ["auto", "static", "responsive"],
68779
69172
  },
69173
+ { name: "gridLayoutEnabled:boolean", default: false },
68780
69174
  { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
68781
69175
  { name: "fitToContainer:boolean", default: true, visible: false },
68782
69176
  { name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
@@ -71210,6 +71604,8 @@ function _setIsTouch(val) {
71210
71604
  function detectMouseSupport(matchMedia) {
71211
71605
  if (!matchMedia)
71212
71606
  return false;
71607
+ if (IsMobile)
71608
+ return false;
71213
71609
  var pointerQuery = matchMedia("(pointer:fine)");
71214
71610
  var hoverQuery = matchMedia("(any-hover:hover)");
71215
71611
  return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
@@ -71819,7 +72215,7 @@ function debounce(func) {
71819
72215
  /*!****************************!*\
71820
72216
  !*** ./src/utils/utils.ts ***!
71821
72217
  \****************************/
71822
- /*! exports provided: unwrap, getRenderedSize, getRenderedStyleSize, doKey2ClickBlur, doKey2ClickUp, doKey2ClickDown, sanitizeEditableContent, Logger, showConfirmDialog, configConfirmDialog, compareArrays, 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 */
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 */
71823
72219
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
71824
72220
 
71825
72221
  "use strict";
@@ -71835,6 +72231,7 @@ __webpack_require__.r(__webpack_exports__);
71835
72231
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
71836
72232
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
71837
72233
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
72234
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundTo2Decimals", function() { return roundTo2Decimals; });
71838
72235
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
71839
72236
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
71840
72237
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -72399,6 +72796,9 @@ function compareArrays(oldValue, newValue, getKey) {
72399
72796
  });
72400
72797
  return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
72401
72798
  }
72799
+ function roundTo2Decimals(number) {
72800
+ return Math.round(number * 100) / 100;
72801
+ }
72402
72802
 
72403
72803
 
72404
72804