survey-core 1.11.6 → 1.11.8

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 (255) hide show
  1. package/defaultV2.css +11 -6
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +11 -6
  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 +6 -6
  114. package/modern.css.map +1 -1
  115. package/modern.fontless.css +6 -6
  116. package/modern.fontless.css.map +1 -1
  117. package/modern.fontless.min.css +2 -2
  118. package/modern.min.css +2 -2
  119. package/package.json +1 -1
  120. package/plugins/bootstrap-integration.js +1 -1
  121. package/plugins/bootstrap-integration.min.js +1 -1
  122. package/plugins/bootstrap-material-integration.js +1 -1
  123. package/plugins/bootstrap-material-integration.min.js +1 -1
  124. package/survey.core.js +574 -127
  125. package/survey.core.js.map +1 -1
  126. package/survey.core.min.js +3 -3
  127. package/survey.css +6 -6
  128. package/survey.css.map +1 -1
  129. package/survey.i18n.js +1 -1
  130. package/survey.i18n.min.js +1 -1
  131. package/survey.min.css +2 -2
  132. package/themes/borderless-dark-panelless.js +1 -1
  133. package/themes/borderless-dark-panelless.min.js +1 -1
  134. package/themes/borderless-dark.js +1 -1
  135. package/themes/borderless-dark.min.js +1 -1
  136. package/themes/borderless-light-panelless..js +1 -1
  137. package/themes/borderless-light-panelless..min.js +1 -1
  138. package/themes/borderless-light.js +1 -1
  139. package/themes/borderless-light.min.js +1 -1
  140. package/themes/contrast-dark-panelless.js +1 -1
  141. package/themes/contrast-dark-panelless.min.js +1 -1
  142. package/themes/contrast-dark.js +1 -1
  143. package/themes/contrast-dark.min.js +1 -1
  144. package/themes/contrast-light-panelless.js +1 -1
  145. package/themes/contrast-light-panelless.min.js +1 -1
  146. package/themes/contrast-light.js +1 -1
  147. package/themes/contrast-light.min.js +1 -1
  148. package/themes/default-dark-panelless.js +1 -1
  149. package/themes/default-dark-panelless.min.js +1 -1
  150. package/themes/default-dark.js +1 -1
  151. package/themes/default-dark.min.js +1 -1
  152. package/themes/default-light-panelless.js +1 -1
  153. package/themes/default-light-panelless.min.js +1 -1
  154. package/themes/default-light.js +1 -1
  155. package/themes/default-light.min.js +1 -1
  156. package/themes/doubleborder-dark-panelless.js +1 -1
  157. package/themes/doubleborder-dark-panelless.min.js +1 -1
  158. package/themes/doubleborder-dark.js +1 -1
  159. package/themes/doubleborder-dark.min.js +1 -1
  160. package/themes/doubleborder-light-panelles.js +1 -1
  161. package/themes/doubleborder-light-panelles.min.js +1 -1
  162. package/themes/doubleborder-light.js +1 -1
  163. package/themes/doubleborder-light.min.js +1 -1
  164. package/themes/flat-dark-panelless.js +1 -1
  165. package/themes/flat-dark-panelless.min.js +1 -1
  166. package/themes/flat-dark.js +1 -1
  167. package/themes/flat-dark.min.js +1 -1
  168. package/themes/flat-light-panelless.js +1 -1
  169. package/themes/flat-light-panelless.min.js +1 -1
  170. package/themes/flat-light.js +1 -1
  171. package/themes/flat-light.min.js +1 -1
  172. package/themes/index.js +1 -1
  173. package/themes/index.min.js +1 -1
  174. package/themes/layered-dark-panelless.js +1 -1
  175. package/themes/layered-dark-panelless.min.js +1 -1
  176. package/themes/layered-dark.js +1 -1
  177. package/themes/layered-dark.min.js +1 -1
  178. package/themes/layered-light-panelless.js +1 -1
  179. package/themes/layered-light-panelless.min.js +1 -1
  180. package/themes/layered-light.js +1 -1
  181. package/themes/layered-light.min.js +1 -1
  182. package/themes/plain-dark-panelless.js +1 -1
  183. package/themes/plain-dark-panelless.min.js +1 -1
  184. package/themes/plain-dark.js +1 -1
  185. package/themes/plain-dark.min.js +1 -1
  186. package/themes/plain-light-panelless.js +1 -1
  187. package/themes/plain-light-panelless.min.js +1 -1
  188. package/themes/plain-light.js +1 -1
  189. package/themes/plain-light.min.js +1 -1
  190. package/themes/sharp-dark-panelless.js +1 -1
  191. package/themes/sharp-dark-panelless.min.js +1 -1
  192. package/themes/sharp-dark.js +1 -1
  193. package/themes/sharp-dark.min.js +1 -1
  194. package/themes/sharp-light-panelless.js +1 -1
  195. package/themes/sharp-light-panelless.min.js +1 -1
  196. package/themes/sharp-light.js +1 -1
  197. package/themes/sharp-light.min.js +1 -1
  198. package/themes/solid-dark-panelless.js +1 -1
  199. package/themes/solid-dark-panelless.min.js +1 -1
  200. package/themes/solid-dark.js +1 -1
  201. package/themes/solid-dark.min.js +1 -1
  202. package/themes/solid-light-panelless.js +1 -1
  203. package/themes/solid-light-panelless.min.js +1 -1
  204. package/themes/solid-light.js +1 -1
  205. package/themes/solid-light.min.js +1 -1
  206. package/themes/three-dimensional-dark-panelless.js +1 -1
  207. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  208. package/themes/three-dimensional-dark.js +1 -1
  209. package/themes/three-dimensional-dark.min.js +1 -1
  210. package/themes/three-dimensional-light-panelless.js +1 -1
  211. package/themes/three-dimensional-light-panelless.min.js +1 -1
  212. package/themes/three-dimensional-light.js +1 -1
  213. package/themes/three-dimensional-light.min.js +1 -1
  214. package/ts3.4/typings/base-interfaces.d.ts +8 -0
  215. package/ts3.4/typings/dropdownListModel.d.ts +1 -1
  216. package/ts3.4/typings/jsonobject.d.ts +1 -1
  217. package/ts3.4/typings/mask/input_element_adapter.d.ts +1 -0
  218. package/ts3.4/typings/page.d.ts +1 -0
  219. package/ts3.4/typings/panel-layout-column.d.ts +9 -0
  220. package/ts3.4/typings/panel.d.ts +16 -0
  221. package/ts3.4/typings/question.d.ts +5 -1
  222. package/ts3.4/typings/question_comment.d.ts +3 -3
  223. package/ts3.4/typings/question_custom.d.ts +4 -0
  224. package/ts3.4/typings/question_dropdown.d.ts +1 -1
  225. package/ts3.4/typings/question_matrixdropdownbase.d.ts +1 -0
  226. package/ts3.4/typings/question_multipletext.d.ts +4 -0
  227. package/ts3.4/typings/question_rating.d.ts +0 -1
  228. package/ts3.4/typings/question_tagbox.d.ts +0 -1
  229. package/ts3.4/typings/question_text.d.ts +4 -0
  230. package/ts3.4/typings/settings.d.ts +30 -0
  231. package/ts3.4/typings/survey-element.d.ts +4 -3
  232. package/ts3.4/typings/survey.d.ts +2 -1
  233. package/ts3.4/typings/surveytimer.d.ts +9 -4
  234. package/ts3.4/typings/utils/utils.d.ts +1 -0
  235. package/typings/base-interfaces.d.ts +8 -0
  236. package/typings/dropdownListModel.d.ts +1 -1
  237. package/typings/jsonobject.d.ts +1 -1
  238. package/typings/mask/input_element_adapter.d.ts +1 -0
  239. package/typings/page.d.ts +1 -0
  240. package/typings/panel-layout-column.d.ts +9 -0
  241. package/typings/panel.d.ts +16 -0
  242. package/typings/question.d.ts +5 -1
  243. package/typings/question_comment.d.ts +5 -5
  244. package/typings/question_custom.d.ts +4 -0
  245. package/typings/question_dropdown.d.ts +1 -1
  246. package/typings/question_matrixdropdownbase.d.ts +1 -0
  247. package/typings/question_multipletext.d.ts +4 -0
  248. package/typings/question_rating.d.ts +0 -1
  249. package/typings/question_tagbox.d.ts +0 -1
  250. package/typings/question_text.d.ts +4 -0
  251. package/typings/settings.d.ts +30 -0
  252. package/typings/survey-element.d.ts +5 -3
  253. package/typings/survey.d.ts +2 -1
  254. package/typings/surveytimer.d.ts +9 -4
  255. 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.6
2
+ * surveyjs - Survey JavaScript library v1.11.8
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
@@ -2298,6 +2298,8 @@ var Base = /** @class */ (function () {
2298
2298
  if (!prop || prop.isCustom && this.isCreating)
2299
2299
  return undefined;
2300
2300
  var dValue = prop.defaultValue;
2301
+ if (!!prop.defaultValueFunc)
2302
+ return dValue;
2301
2303
  if (!this.isPropertyEmpty(dValue) && !Array.isArray(dValue))
2302
2304
  return dValue;
2303
2305
  var locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
@@ -2686,6 +2688,9 @@ var Base = /** @class */ (function () {
2686
2688
  }
2687
2689
  if (!!this.arraysInfo) {
2688
2690
  for (var key in this.arraysInfo) {
2691
+ var prop = this.getPropertyByName(key);
2692
+ if (!prop || !prop.isSerializable)
2693
+ continue;
2689
2694
  var items = this.getPropertyValue(key);
2690
2695
  if (!items || !items.length)
2691
2696
  continue;
@@ -8211,11 +8216,12 @@ var DropdownListModel = /** @class */ (function (_super) {
8211
8216
  _this.filterString = newValue;
8212
8217
  }
8213
8218
  };
8214
- _this.qustionPropertyChangedHandler = function (sender, options) {
8219
+ _this.questionPropertyChangedHandler = function (sender, options) {
8215
8220
  _this.onPropertyChangedHandler(sender, options);
8216
8221
  };
8217
8222
  _this.htmlCleanerElement = _global_variables_utils__WEBPACK_IMPORTED_MODULE_1__["DomDocumentHelper"].createElement("div");
8218
- question.onPropertyChanged.add(_this.qustionPropertyChangedHandler);
8223
+ _this.question.ariaExpanded = "false";
8224
+ question.onPropertyChanged.add(_this.questionPropertyChangedHandler);
8219
8225
  _this.showInputFieldComponent = _this.question.showInputFieldComponent;
8220
8226
  _this.listModel = _this.createListModel();
8221
8227
  _this.updateAfterListModelCreated(_this.listModel);
@@ -8325,6 +8331,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8325
8331
  _this.resetItemsSettings();
8326
8332
  }
8327
8333
  }
8334
+ _this.question.ariaExpanded = option.isVisible ? "true" : "false";
8328
8335
  _this.question.processPopupVisiblilityChanged(_this.popupModel, option.isVisible);
8329
8336
  });
8330
8337
  };
@@ -8632,7 +8639,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8632
8639
  return;
8633
8640
  this._popupModel.toggleVisibility();
8634
8641
  this.focusItemOnClickAndPopup();
8635
- this.question.focus();
8642
+ this.question.focusInputElement(false);
8636
8643
  };
8637
8644
  DropdownListModel.prototype.chevronPointerDown = function (event) {
8638
8645
  if (this._popupModel.isVisible) {
@@ -8800,8 +8807,8 @@ var DropdownListModel = /** @class */ (function (_super) {
8800
8807
  };
8801
8808
  DropdownListModel.prototype.dispose = function () {
8802
8809
  _super.prototype.dispose.call(this);
8803
- this.question && this.question.onPropertyChanged.remove(this.qustionPropertyChangedHandler);
8804
- this.qustionPropertyChangedHandler = undefined;
8810
+ this.question && this.question.onPropertyChanged.remove(this.questionPropertyChangedHandler);
8811
+ this.questionPropertyChangedHandler = undefined;
8805
8812
  if (!!this.listModel) {
8806
8813
  this.listModel.dispose();
8807
8814
  }
@@ -9840,8 +9847,8 @@ __webpack_require__.r(__webpack_exports__);
9840
9847
 
9841
9848
  var Version;
9842
9849
  var ReleaseDate;
9843
- Version = "" + "1.11.6";
9844
- ReleaseDate = "" + "2024-07-10";
9850
+ Version = "" + "1.11.8";
9851
+ ReleaseDate = "" + "2024-07-22";
9845
9852
  function checkLibraryVersion(ver, libraryName) {
9846
9853
  if (Version != ver) {
9847
9854
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15841,7 +15848,11 @@ function getQuestionValueByContext(context, name) {
15841
15848
  }
15842
15849
  function displayValue(params) {
15843
15850
  var q = getQuestionValueByContext(this, params[0]);
15844
- return q ? q.displayValue : "";
15851
+ if (!q)
15852
+ return "";
15853
+ if (params.length > 1 && !!params[1])
15854
+ return q.getDisplayValue(true, params[1]);
15855
+ return q.displayValue;
15845
15856
  }
15846
15857
  FunctionFactory.Instance.register("displayValue", displayValue);
15847
15858
  function propertyValue(params) {
@@ -18351,9 +18362,10 @@ function property(options) {
18351
18362
  },
18352
18363
  set: function (val) {
18353
18364
  var newValue = processComputedUpdater(this, val);
18365
+ var prevValue = this.getPropertyValue(key);
18354
18366
  this.setPropertyValue(key, newValue);
18355
18367
  if (!!options && options.onSet) {
18356
- options.onSet(newValue, this);
18368
+ options.onSet(newValue, this, prevValue);
18357
18369
  }
18358
18370
  },
18359
18371
  });
@@ -18546,7 +18558,7 @@ var JsonObjectProperty = /** @class */ (function () {
18546
18558
  }
18547
18559
  if (this.isLocalizable)
18548
18560
  return value === null || value === undefined;
18549
- return ((value === false && (this.type == "boolean" || this.type == "switch")) ||
18561
+ return ((value === false && (this.type == "boolean" || this.type == "switch") && !this.defaultValueFunc) ||
18550
18562
  value === "" || _helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value));
18551
18563
  };
18552
18564
  JsonObjectProperty.prototype.getSerializableValue = function (obj) {
@@ -21971,7 +21983,6 @@ var InputElementAdapter = /** @class */ (function () {
21971
21983
  this.clickHandler = function (event) {
21972
21984
  if (_this.inputElement.value == _this.inputMaskInstance.getMaskedValue("")) {
21973
21985
  _this.inputElement.setSelectionRange(0, 0);
21974
- event.preventDefault();
21975
21986
  }
21976
21987
  };
21977
21988
  this.beforeInputHandler = function (event) {
@@ -21983,6 +21994,10 @@ var InputElementAdapter = /** @class */ (function () {
21983
21994
  event.preventDefault();
21984
21995
  }
21985
21996
  };
21997
+ this.changeHandler = function (event) {
21998
+ var result = _this.inputMaskInstance.processInput({ prevValue: "", insertedChars: event.target.value, selectionStart: 0, selectionEnd: 0 });
21999
+ _this.inputElement.value = result.value;
22000
+ };
21986
22001
  var _value = value;
21987
22002
  if (_value === null || _value === undefined) {
21988
22003
  _value = "";
@@ -22016,6 +22031,7 @@ var InputElementAdapter = /** @class */ (function () {
22016
22031
  this.inputElement.addEventListener("beforeinput", this.beforeInputHandler);
22017
22032
  this.inputElement.addEventListener("click", this.clickHandler);
22018
22033
  this.inputElement.addEventListener("focus", this.clickHandler);
22034
+ this.inputElement.addEventListener("change", this.changeHandler);
22019
22035
  }
22020
22036
  };
22021
22037
  InputElementAdapter.prototype.removeInputEventListener = function () {
@@ -22023,6 +22039,7 @@ var InputElementAdapter = /** @class */ (function () {
22023
22039
  this.inputElement.removeEventListener("beforeinput", this.beforeInputHandler);
22024
22040
  this.inputElement.removeEventListener("click", this.clickHandler);
22025
22041
  this.inputElement.removeEventListener("focus", this.clickHandler);
22042
+ this.inputElement.removeEventListener("change", this.changeHandler);
22026
22043
  }
22027
22044
  };
22028
22045
  InputElementAdapter.prototype.dispose = function () {
@@ -24116,6 +24133,12 @@ var PageModel = /** @class */ (function (_super) {
24116
24133
  enumerable: false,
24117
24134
  configurable: true
24118
24135
  });
24136
+ PageModel.prototype.getMaxTimeToFinish = function () {
24137
+ if (this.maxTimeToFinish !== 0)
24138
+ return this.maxTimeToFinish;
24139
+ var res = !!this.survey ? this.survey.maxTimeToFinishPage : 0;
24140
+ return res > 0 ? res : 0;
24141
+ };
24119
24142
  PageModel.prototype.onNumChanged = function (value) { };
24120
24143
  PageModel.prototype.onVisibleChanged = function () {
24121
24144
  if (this.isRandomizing)
@@ -24177,6 +24200,82 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("page", [
24177
24200
  }, "panelbase");
24178
24201
 
24179
24202
 
24203
+ /***/ }),
24204
+
24205
+ /***/ "./src/panel-layout-column.ts":
24206
+ /*!************************************!*\
24207
+ !*** ./src/panel-layout-column.ts ***!
24208
+ \************************************/
24209
+ /*! exports provided: PanelLayoutColumnModel */
24210
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
24211
+
24212
+ "use strict";
24213
+ __webpack_require__.r(__webpack_exports__);
24214
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PanelLayoutColumnModel", function() { return PanelLayoutColumnModel; });
24215
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
24216
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./base */ "./src/base.ts");
24217
+ var __extends = (undefined && undefined.__extends) || (function () {
24218
+ var extendStatics = function (d, b) {
24219
+ extendStatics = Object.setPrototypeOf ||
24220
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
24221
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
24222
+ return extendStatics(d, b);
24223
+ };
24224
+ return function (d, b) {
24225
+ if (typeof b !== "function" && b !== null)
24226
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
24227
+ extendStatics(d, b);
24228
+ function __() { this.constructor = d; }
24229
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
24230
+ };
24231
+ })();
24232
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
24233
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24234
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24235
+ 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;
24236
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
24237
+ };
24238
+
24239
+
24240
+ var PanelLayoutColumnModel = /** @class */ (function (_super) {
24241
+ __extends(PanelLayoutColumnModel, _super);
24242
+ function PanelLayoutColumnModel(width, questionTitleWidth) {
24243
+ var _this = _super.call(this) || this;
24244
+ _this.effectiveWidth = width;
24245
+ _this.questionTitleWidth = questionTitleWidth;
24246
+ return _this;
24247
+ }
24248
+ PanelLayoutColumnModel.prototype.getType = function () {
24249
+ return "panellayoutcolumn";
24250
+ };
24251
+ PanelLayoutColumnModel.prototype.isEmpty = function () {
24252
+ return !this.width && !this.questionTitleWidth;
24253
+ };
24254
+ __decorate([
24255
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
24256
+ ], PanelLayoutColumnModel.prototype, "width", void 0);
24257
+ __decorate([
24258
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
24259
+ onSet: function (newValue, target, prevVal) {
24260
+ if (newValue !== prevVal) {
24261
+ target.width = newValue;
24262
+ }
24263
+ }
24264
+ })
24265
+ ], PanelLayoutColumnModel.prototype, "effectiveWidth", void 0);
24266
+ __decorate([
24267
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
24268
+ ], PanelLayoutColumnModel.prototype, "questionTitleWidth", void 0);
24269
+ return PanelLayoutColumnModel;
24270
+ }(_base__WEBPACK_IMPORTED_MODULE_1__["Base"]));
24271
+
24272
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panellayoutcolumn", [
24273
+ { name: "effectiveWidth:number", isSerializable: false, minValue: 0 },
24274
+ { name: "width:number", visible: false },
24275
+ "questionTitleWidth",
24276
+ ], function (value) { return new PanelLayoutColumnModel(); });
24277
+
24278
+
24180
24279
  /***/ }),
24181
24280
 
24182
24281
  /***/ "./src/panel.ts":
@@ -24205,6 +24304,7 @@ __webpack_require__.r(__webpack_exports__);
24205
24304
  /* harmony import */ var _utils_animation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/animation */ "./src/utils/animation.ts");
24206
24305
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./global_variables_utils */ "./src/global_variables_utils.ts");
24207
24306
  /* harmony import */ var _page__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./page */ "./src/page.ts");
24307
+ /* harmony import */ var _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./panel-layout-column */ "./src/panel-layout-column.ts");
24208
24308
  var __extends = (undefined && undefined.__extends) || (function () {
24209
24309
  var extendStatics = function (d, b) {
24210
24310
  extendStatics = Object.setPrototypeOf ||
@@ -24245,6 +24345,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
24245
24345
 
24246
24346
 
24247
24347
 
24348
+
24248
24349
  var QuestionRowModel = /** @class */ (function (_super) {
24249
24350
  __extends(QuestionRowModel, _super);
24250
24351
  function QuestionRowModel(panel) {
@@ -24521,10 +24622,18 @@ var PanelModelBase = /** @class */ (function (_super) {
24521
24622
  var _this = _super.call(this, name) || this;
24522
24623
  _this.isQuestionsReady = false;
24523
24624
  _this.questionsValue = new Array();
24625
+ _this._columns = undefined;
24626
+ _this._columnsReady = false;
24524
24627
  _this.rowsAnimation = new _utils_animation__WEBPACK_IMPORTED_MODULE_11__["AnimationGroup"](_this.getRowsAnimationOptions(), function (value) {
24525
24628
  _this.setPropertyValue("visibleRows", value);
24526
24629
  }, function () { return _this.visibleRows; });
24527
24630
  _this.isRandomizing = false;
24631
+ _this.onColumnPropertyValueChangedCallback = function (name, oldValue, newValue, sender, arrayChanges) {
24632
+ if (_this._columnsReady) {
24633
+ _this.updateColumnWidth(_this.layoutColumns);
24634
+ _this.updateRootStyle();
24635
+ }
24636
+ };
24528
24637
  _this.locCountRowUpdates = 0;
24529
24638
  _this.createNewArray("rows", function (el, index) { _this.onAddRow(el); }, function (el) { _this.onRemoveRow(el); });
24530
24639
  _this.createNewArray("visibleRows");
@@ -24565,7 +24674,8 @@ var PanelModelBase = /** @class */ (function (_super) {
24565
24674
  isAnimationEnabled: function () { return _this.animationAllowed; },
24566
24675
  getAnimatedElement: function (row) { return row.getRootElement(); },
24567
24676
  getLeaveOptions: function (_) {
24568
- return { cssClass: _this.cssClasses.rowFadeOut,
24677
+ return {
24678
+ cssClass: _this.cssClasses.rowFadeOut,
24569
24679
  onBeforeRunAnimation: beforeRunAnimation
24570
24680
  };
24571
24681
  },
@@ -24610,10 +24720,14 @@ var PanelModelBase = /** @class */ (function (_super) {
24610
24720
  this.releaseAnimations();
24611
24721
  };
24612
24722
  PanelModelBase.prototype.endLoadingFromJson = function () {
24723
+ var _this = this;
24613
24724
  _super.prototype.endLoadingFromJson.call(this);
24614
24725
  this.updateDescriptionVisibility(this.description);
24615
24726
  this.markQuestionListDirty();
24616
24727
  this.onRowsChanged();
24728
+ this.layoutColumns.forEach(function (col) {
24729
+ col.onPropertyValueChangedCallback = _this.onColumnPropertyValueChangedCallback;
24730
+ });
24617
24731
  };
24618
24732
  Object.defineProperty(PanelModelBase.prototype, "hasTitle", {
24619
24733
  get: function () {
@@ -25201,6 +25315,23 @@ var PanelModelBase = /** @class */ (function (_super) {
25201
25315
  this.parent.validateContainerOnly();
25202
25316
  }
25203
25317
  };
25318
+ PanelModelBase.prototype.onQuestionValueChanged = function (el) {
25319
+ var index = this.questions.indexOf(el);
25320
+ if (index < 0)
25321
+ return;
25322
+ var dif = 5;
25323
+ var max = this.questions.length - 1;
25324
+ var start = index - dif > 0 ? index - dif : 0;
25325
+ var end = index + dif < max ? index + dif : max;
25326
+ for (var i = start; i <= end; i++) {
25327
+ if (i === index)
25328
+ continue;
25329
+ var q = this.questions[i];
25330
+ if (q.errors.length > 0 && q.validate(false)) {
25331
+ q.validate(true);
25332
+ }
25333
+ }
25334
+ };
25204
25335
  PanelModelBase.prototype.hasErrorsInPanels = function (rec) {
25205
25336
  var errors = [];
25206
25337
  this.hasRequiredError(rec, errors);
@@ -25379,6 +25510,51 @@ var PanelModelBase = /** @class */ (function (_super) {
25379
25510
  }
25380
25511
  }
25381
25512
  };
25513
+ PanelModelBase.prototype.calcMaxRowColSpan = function () {
25514
+ var maxRowColSpan = 0;
25515
+ this.rows.forEach(function (row) {
25516
+ var curRowSpan = 0;
25517
+ var userDefinedRow = false;
25518
+ row.elements.forEach(function (el) {
25519
+ if (!!el.width) {
25520
+ userDefinedRow = true;
25521
+ }
25522
+ curRowSpan += (el.colSpan || 1);
25523
+ });
25524
+ if (!userDefinedRow && curRowSpan > maxRowColSpan)
25525
+ maxRowColSpan = curRowSpan;
25526
+ });
25527
+ return maxRowColSpan;
25528
+ };
25529
+ PanelModelBase.prototype.updateColumnWidth = function (columns) {
25530
+ var remainingSpace = 0, remainingColCount = 0;
25531
+ columns.forEach(function (col) {
25532
+ if (!col.width) {
25533
+ remainingColCount++;
25534
+ }
25535
+ else {
25536
+ remainingSpace += col.width;
25537
+ col.setPropertyValue("effectiveWidth", col.width);
25538
+ }
25539
+ });
25540
+ if (!!remainingColCount) {
25541
+ var oneColumnWidth = Object(_utils_utils__WEBPACK_IMPORTED_MODULE_8__["roundTo2Decimals"])((100 - remainingSpace) / remainingColCount);
25542
+ for (var index = 0; index < columns.length; index++) {
25543
+ if (!columns[index].width) {
25544
+ columns[index].setPropertyValue("effectiveWidth", oneColumnWidth);
25545
+ }
25546
+ }
25547
+ }
25548
+ };
25549
+ PanelModelBase.prototype.updateColumns = function () {
25550
+ this._columns = undefined;
25551
+ this.updateRootStyle();
25552
+ };
25553
+ PanelModelBase.prototype.updateRootStyle = function () {
25554
+ var _a;
25555
+ _super.prototype.updateRootStyle.call(this);
25556
+ (_a = this.elements) === null || _a === void 0 ? void 0 : _a.forEach(function (el) { return el.updateRootStyle(); });
25557
+ };
25382
25558
  PanelModelBase.prototype.updateCustomWidgets = function () {
25383
25559
  for (var i = 0; i < this.elements.length; i++) {
25384
25560
  this.elements[i].updateCustomWidgets();
@@ -25439,6 +25615,69 @@ var PanelModelBase = /** @class */ (function (_super) {
25439
25615
  PanelModelBase.prototype.getQuestionTitleWidth = function () {
25440
25616
  return this.questionTitleWidth || this.parent && this.parent.getQuestionTitleWidth();
25441
25617
  };
25618
+ Object.defineProperty(PanelModelBase.prototype, "columns", {
25619
+ get: function () {
25620
+ if (!this._columns) {
25621
+ this.generateColumns();
25622
+ }
25623
+ return this._columns || [];
25624
+ },
25625
+ enumerable: false,
25626
+ configurable: true
25627
+ });
25628
+ PanelModelBase.prototype.generateColumns = function () {
25629
+ var maxRowColSpan = this.calcMaxRowColSpan();
25630
+ var columns = [].concat(this.layoutColumns);
25631
+ if (maxRowColSpan <= this.layoutColumns.length) {
25632
+ columns = this.layoutColumns.slice(0, maxRowColSpan);
25633
+ }
25634
+ else {
25635
+ for (var index = this.layoutColumns.length; index < maxRowColSpan; index++) {
25636
+ var newCol = new _panel_layout_column__WEBPACK_IMPORTED_MODULE_14__["PanelLayoutColumnModel"]();
25637
+ newCol.onPropertyValueChangedCallback = this.onColumnPropertyValueChangedCallback;
25638
+ columns.push(newCol);
25639
+ }
25640
+ }
25641
+ this._columns = columns;
25642
+ try {
25643
+ this._columnsReady = false;
25644
+ this.updateColumnWidth(columns);
25645
+ }
25646
+ finally {
25647
+ this._columnsReady = true;
25648
+ }
25649
+ this.layoutColumns = columns;
25650
+ };
25651
+ PanelModelBase.prototype.getColumsForElement = function (el) {
25652
+ var row = this.findRowByElement(el);
25653
+ if (!row || !this.survey || !this.survey.gridLayoutEnabled)
25654
+ return [];
25655
+ var lastExpandableElementIndex = row.elements.length - 1;
25656
+ while (lastExpandableElementIndex >= 0) {
25657
+ if (!row.elements[lastExpandableElementIndex].getPropertyValueWithoutDefault("colSpan")) {
25658
+ break;
25659
+ }
25660
+ lastExpandableElementIndex--;
25661
+ }
25662
+ var elementIndex = row.elements.indexOf(el);
25663
+ var startIndex = 0;
25664
+ for (var index = 0; index < elementIndex; index++) {
25665
+ startIndex += row.elements[index].colSpan;
25666
+ }
25667
+ var currentColSpan = el.getPropertyValueWithoutDefault("colSpan");
25668
+ if (!currentColSpan && elementIndex === lastExpandableElementIndex) {
25669
+ var usedSpans = 0;
25670
+ for (var index = 0; index < row.elements.length; index++) {
25671
+ if (index !== lastExpandableElementIndex) {
25672
+ usedSpans += row.elements[index].colSpan;
25673
+ }
25674
+ }
25675
+ currentColSpan = this.columns.length - usedSpans;
25676
+ }
25677
+ var result = this.columns.slice(startIndex, startIndex + (currentColSpan || 1));
25678
+ el.setPropertyValue("effectiveColSpan", result.length);
25679
+ return result;
25680
+ };
25442
25681
  PanelModelBase.prototype.getStartIndex = function () {
25443
25682
  if (!!this.parent)
25444
25683
  return this.parent.getQuestionStartIndex();
@@ -25523,6 +25762,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25523
25762
  return;
25524
25763
  this.blockAnimations();
25525
25764
  this.setArrayPropertyDirectly("rows", this.buildRows());
25765
+ this.updateColumns();
25526
25766
  this.releaseAnimations();
25527
25767
  };
25528
25768
  PanelModelBase.prototype.blockRowsUpdates = function () {
@@ -25722,6 +25962,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25722
25962
  if (!this.canBuildRows())
25723
25963
  return;
25724
25964
  this.updateRowsRemoveElementFromRow(element, this.findRowByElement(element));
25965
+ this.updateColumns();
25725
25966
  };
25726
25967
  PanelModelBase.prototype.updateRowsRemoveElementFromRow = function (element, row) {
25727
25968
  if (!row || !row.panel)
@@ -25949,6 +26190,7 @@ var PanelModelBase = /** @class */ (function (_super) {
25949
26190
  if (this.wasRendered) {
25950
26191
  element.onFirstRendering();
25951
26192
  }
26193
+ this.updateColumns();
25952
26194
  return true;
25953
26195
  };
25954
26196
  PanelModelBase.prototype.insertElement = function (element, dest, location) {
@@ -26065,6 +26307,7 @@ var PanelModelBase = /** @class */ (function (_super) {
26065
26307
  return false;
26066
26308
  }
26067
26309
  this.elements.splice(index, 1);
26310
+ this.updateColumns();
26068
26311
  return true;
26069
26312
  };
26070
26313
  PanelModelBase.prototype.removeQuestion = function (question) {
@@ -26177,6 +26420,16 @@ var PanelModelBase = /** @class */ (function (_super) {
26177
26420
  PanelModelBase.prototype.getCssError = function (cssClasses) {
26178
26421
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]().append(cssClasses.error.root).toString();
26179
26422
  };
26423
+ PanelModelBase.prototype.getSerializableColumnsValue = function () {
26424
+ var tailIndex = -1;
26425
+ for (var index = this.layoutColumns.length - 1; index >= 0; index--) {
26426
+ if (!this.layoutColumns[index].isEmpty()) {
26427
+ tailIndex = index;
26428
+ break;
26429
+ }
26430
+ }
26431
+ return this.layoutColumns.slice(0, tailIndex + 1);
26432
+ };
26180
26433
  PanelModelBase.prototype.dispose = function () {
26181
26434
  _super.prototype.dispose.call(this);
26182
26435
  if (this.rows) {
@@ -26191,6 +26444,9 @@ var PanelModelBase = /** @class */ (function (_super) {
26191
26444
  this.elements.splice(0, this.elements.length);
26192
26445
  };
26193
26446
  PanelModelBase.panelCounter = 100;
26447
+ __decorate([
26448
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["propertyArray"])()
26449
+ ], PanelModelBase.prototype, "layoutColumns", void 0);
26194
26450
  __decorate([
26195
26451
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
26196
26452
  ], PanelModelBase.prototype, "showTitle", void 0);
@@ -26222,6 +26478,10 @@ var PanelModel = /** @class */ (function (_super) {
26222
26478
  }
26223
26479
  });
26224
26480
  _this.registerPropertyChangedHandlers(["indent", "innerIndent", "rightIndent"], function () { _this.onIndentChanged(); });
26481
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
26482
+ _this.registerPropertyChangedHandlers(["title"], function () {
26483
+ _this.calcHasTextInTitle();
26484
+ });
26225
26485
  return _this;
26226
26486
  }
26227
26487
  PanelModel.prototype.getType = function () {
@@ -26241,13 +26501,25 @@ var PanelModel = /** @class */ (function (_super) {
26241
26501
  }
26242
26502
  return _super.prototype.getSurvey.call(this, live);
26243
26503
  };
26504
+ Object.defineProperty(PanelModel.prototype, "hasTextInTitle", {
26505
+ get: function () {
26506
+ return this.getPropertyValue("hasTextInTitle");
26507
+ },
26508
+ enumerable: false,
26509
+ configurable: true
26510
+ });
26511
+ PanelModel.prototype.calcHasTextInTitle = function () {
26512
+ this.setPropertyValue("hasTextInTitle", !!this.title);
26513
+ };
26244
26514
  PanelModel.prototype.onSurveyLoad = function () {
26245
26515
  _super.prototype.onSurveyLoad.call(this);
26246
26516
  this.onIndentChanged();
26517
+ this.calcHasTextInTitle();
26247
26518
  };
26248
26519
  PanelModel.prototype.onSetData = function () {
26249
26520
  _super.prototype.onSetData.call(this);
26250
26521
  this.onIndentChanged();
26522
+ this.calcHasTextInTitle();
26251
26523
  };
26252
26524
  Object.defineProperty(PanelModel.prototype, "isPanel", {
26253
26525
  get: function () {
@@ -26553,7 +26825,7 @@ var PanelModel = /** @class */ (function (_super) {
26553
26825
  get: function () {
26554
26826
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
26555
26827
  .append(this.getCssTitle(this.cssClasses.panel))
26556
- .append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
26828
+ .append(this.cssClasses.panel.titleHidden, !this.hasTextInTitle && this.isDesignMode)
26557
26829
  .toString();
26558
26830
  },
26559
26831
  enumerable: false,
@@ -26657,6 +26929,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panelbase", [
26657
26929
  default: "default",
26658
26930
  choices: ["default", "top", "bottom", "left", "hidden"],
26659
26931
  },
26932
+ {
26933
+ name: "layoutColumns:panellayoutcolumns",
26934
+ className: "panellayoutcolumn", isArray: true,
26935
+ onSerializeValue: function (obj) { return obj.getSerializableColumnsValue(); }
26936
+ },
26660
26937
  { name: "title:text", serializationProperty: "locTitle" },
26661
26938
  { name: "description:text", serializationProperty: "locDescription" },
26662
26939
  {
@@ -26683,6 +26960,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("panel", [
26683
26960
  "width",
26684
26961
  { name: "minWidth", defaultFunc: function () { return "auto"; } },
26685
26962
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].maxWidth; } },
26963
+ {
26964
+ name: "colSpan:number", visible: false,
26965
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
26966
+ },
26967
+ { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
26686
26968
  { name: "innerIndent:number", default: 0, choices: [0, 1, 2, 3] },
26687
26969
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], visible: false },
26688
26970
  {
@@ -28645,6 +28927,7 @@ var Question = /** @class */ (function (_super) {
28645
28927
  _this.updateQuestionCss();
28646
28928
  });
28647
28929
  _this.registerPropertyChangedHandlers(["isMobile"], function () { _this.onMobileChanged(); });
28930
+ _this.registerPropertyChangedHandlers(["colSpan"], function () { var _a; (_a = _this.parent) === null || _a === void 0 ? void 0 : _a.updateColumns(); });
28648
28931
  return _this;
28649
28932
  }
28650
28933
  Question.getQuestionId = function () {
@@ -29252,14 +29535,31 @@ var Question = /** @class */ (function (_super) {
29252
29535
  Object.defineProperty(Question.prototype, "titleWidth", {
29253
29536
  get: function () {
29254
29537
  if (this.getTitleLocation() === "left") {
29255
- if (!!this.parent)
29256
- return this.parent.getQuestionTitleWidth();
29538
+ var columns = this.parent.getColumsForElement(this);
29539
+ var columnCount = columns.length;
29540
+ if (columnCount !== 0 && !!columns[0].questionTitleWidth)
29541
+ return columns[0].questionTitleWidth;
29542
+ var percentWidth = this.getPercentQuestionTitleWidth();
29543
+ if (!percentWidth && !!this.parent) {
29544
+ var width = this.parent.getQuestionTitleWidth();
29545
+ if (width && !isNaN(width))
29546
+ width = width + "px";
29547
+ return width;
29548
+ }
29549
+ return (percentWidth / (columnCount || 1)) + "%";
29257
29550
  }
29258
29551
  return undefined;
29259
29552
  },
29260
29553
  enumerable: false,
29261
29554
  configurable: true
29262
29555
  });
29556
+ Question.prototype.getPercentQuestionTitleWidth = function () {
29557
+ var width = !!this.parent && this.parent.getQuestionTitleWidth();
29558
+ if (!!width && width[width.length - 1] === "%") {
29559
+ return parseInt(width);
29560
+ }
29561
+ return undefined;
29562
+ };
29263
29563
  /**
29264
29564
  * Returns title location calculated based on the question's `titleLocation` property and the `questionTitleLocation` property of the question's containers (survey, page, or panel).
29265
29565
  * @see titleLocation
@@ -29943,9 +30243,10 @@ var Question = /** @class */ (function (_super) {
29943
30243
  this.expandAllParents();
29944
30244
  this.survey.scrollElementToTop(this, this, null, this.id, scrollIfVisible);
29945
30245
  }
29946
- var id = !onError
29947
- ? this.getFirstInputElementId()
29948
- : this.getFirstErrorInputElementId();
30246
+ this.focusInputElement(onError);
30247
+ };
30248
+ Question.prototype.focusInputElement = function (onError) {
30249
+ var id = !onError ? this.getFirstInputElementId() : this.getFirstErrorInputElementId();
29949
30250
  if (_survey_element__WEBPACK_IMPORTED_MODULE_2__["SurveyElement"].FocusElement(id)) {
29950
30251
  this.fireCallback(this.focusCallback);
29951
30252
  }
@@ -30395,14 +30696,23 @@ var Question = /** @class */ (function (_super) {
30395
30696
  Question.prototype.getFilteredName = function () { return this.getValueName(); };
30396
30697
  Object.defineProperty(Question.prototype, "valueForSurvey", {
30397
30698
  get: function () {
30398
- if (!!this.valueToDataCallback) {
30399
- return this.valueToDataCallback(this.value);
30400
- }
30401
- return this.value;
30699
+ return this.valueForSurveyCore(this.value);
30402
30700
  },
30403
30701
  enumerable: false,
30404
30702
  configurable: true
30405
30703
  });
30704
+ Question.prototype.valueForSurveyCore = function (val) {
30705
+ if (!!this.valueToDataCallback) {
30706
+ return this.valueToDataCallback(val);
30707
+ }
30708
+ return val;
30709
+ };
30710
+ Question.prototype.valueFromDataCore = function (val) {
30711
+ if (!!this.valueFromDataCallback) {
30712
+ return this.valueFromDataCallback(val);
30713
+ }
30714
+ return val;
30715
+ };
30406
30716
  /**
30407
30717
  * Sets the question's `value` and `comment` properties to `undefined`.
30408
30718
  * @see value
@@ -31224,6 +31534,9 @@ var Question = /** @class */ (function (_super) {
31224
31534
  this.updateQuestionCss();
31225
31535
  }
31226
31536
  this.isOldAnswered = undefined;
31537
+ if (this.parent) {
31538
+ this.parent.onQuestionValueChanged(this);
31539
+ }
31227
31540
  };
31228
31541
  Question.prototype.checkIsValueCorrect = function (val) {
31229
31542
  var res = this.isValueEmpty(val, !this.allowSpaceAsAnswer) || this.isNewValueCorrect(val);
@@ -31309,9 +31622,7 @@ var Question = /** @class */ (function (_super) {
31309
31622
  var _this = this;
31310
31623
  if (clearData === void 0) { clearData = false; }
31311
31624
  newValue = this.getUnbindValue(newValue);
31312
- if (!!this.valueFromDataCallback) {
31313
- newValue = this.valueFromDataCallback(newValue);
31314
- }
31625
+ newValue = this.valueFromDataCore(newValue);
31315
31626
  if (!this.checkIsValueCorrect(newValue))
31316
31627
  return;
31317
31628
  var isEmpty = this.isValueEmpty(newValue);
@@ -31667,13 +31978,6 @@ var Question = /** @class */ (function (_super) {
31667
31978
  enumerable: false,
31668
31979
  configurable: true
31669
31980
  });
31670
- Object.defineProperty(Question.prototype, "ariaExpanded", {
31671
- get: function () {
31672
- return null;
31673
- },
31674
- enumerable: false,
31675
- configurable: true
31676
- });
31677
31981
  Object.defineProperty(Question.prototype, "ariaErrormessage", {
31678
31982
  get: function () {
31679
31983
  if (this.isNewA11yStructure)
@@ -31760,6 +32064,9 @@ var Question = /** @class */ (function (_super) {
31760
32064
  __decorate([
31761
32065
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
31762
32066
  ], Question.prototype, "forceIsInputReadOnly", void 0);
32067
+ __decorate([
32068
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
32069
+ ], Question.prototype, "ariaExpanded", void 0);
31763
32070
  __decorate([
31764
32071
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ localizable: true, onSet: function (val, target) { return target.calcRenderedCommentPlaceholder(); } })
31765
32072
  ], Question.prototype, "commentPlaceholder", void 0);
@@ -31794,6 +32101,11 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("question", [
31794
32101
  { name: "width" },
31795
32102
  { name: "minWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].minWidth; } },
31796
32103
  { name: "maxWidth", defaultFunc: function () { return _settings__WEBPACK_IMPORTED_MODULE_8__["settings"].maxWidth; } },
32104
+ {
32105
+ name: "colSpan:number", visible: false,
32106
+ onSerializeValue: function (obj) { return obj.getPropertyValue("colSpan"); },
32107
+ },
32108
+ { name: "effectiveColSpan:number", minValue: 1, isSerializable: false },
31797
32109
  { name: "startWithNewLine:boolean", default: true, layout: "row" },
31798
32110
  { name: "indent:number", default: 0, choices: [0, 1, 2, 3], layout: "row" },
31799
32111
  {
@@ -34498,6 +34810,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("selectbase", [
34498
34810
  return !obj.choicesFromQuestion;
34499
34811
  },
34500
34812
  },
34813
+ { name: "defaultValue:value", visibleIf: function (obj) { return !obj.choicesFromQuestion; }, dependsOn: "choicesFromQuestion" },
34814
+ { name: "correctAnswer:value", visibleIf: function (obj) { return !obj.choicesFromQuestion; }, dependsOn: "choicesFromQuestion" },
34501
34815
  { name: "separateSpecialChoices:boolean", visible: false },
34502
34816
  { name: "showOtherItem:boolean", alternativeName: "hasOther" },
34503
34817
  { name: "showNoneItem:boolean", alternativeName: "hasNone" },
@@ -34557,8 +34871,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("selectbase", [
34557
34871
  default: "default",
34558
34872
  choices: ["default", true, false],
34559
34873
  visible: false,
34560
- },
34561
- // { name: "itemComponent", visible: false }
34874
+ }
34562
34875
  ], null, "question");
34563
34876
  _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("checkboxbase", [
34564
34877
  {
@@ -36215,7 +36528,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
36215
36528
  * @see allowResize
36216
36529
  */
36217
36530
  get: function () {
36218
- return this.getPropertyValue("autoGrow") || (this.survey && this.survey.autoGrowComment);
36531
+ return this.getPropertyValue("autoGrow");
36219
36532
  },
36220
36533
  set: function (val) {
36221
36534
  this.setPropertyValue("autoGrow", val);
@@ -36223,9 +36536,16 @@ var QuestionCommentModel = /** @class */ (function (_super) {
36223
36536
  enumerable: false,
36224
36537
  configurable: true
36225
36538
  });
36539
+ Object.defineProperty(QuestionCommentModel.prototype, "renderedAutoGrow", {
36540
+ get: function () {
36541
+ var autoGrow = this.autoGrow;
36542
+ return autoGrow === undefined && this.survey ? this.survey.autoGrowComment : !!autoGrow;
36543
+ },
36544
+ enumerable: false,
36545
+ configurable: true
36546
+ });
36226
36547
  Object.defineProperty(QuestionCommentModel.prototype, "allowResize", {
36227
36548
  /**
36228
- * Specifies whether to display a resize handle for the comment area.
36229
36549
  *
36230
36550
  * Default value: `true` (inherited from `SurveyModel`'s [`allowResizeComment`](https://surveyjs.io/form-library/documentation/surveymodel#allowResizeComment) property)
36231
36551
  * @see autoGrow
@@ -36241,7 +36561,9 @@ var QuestionCommentModel = /** @class */ (function (_super) {
36241
36561
  });
36242
36562
  Object.defineProperty(QuestionCommentModel.prototype, "renderedAllowResize", {
36243
36563
  get: function () {
36244
- return this.allowResize && (this.survey && this.survey.allowResizeComment) && !this.isPreviewStyle && !this.isReadOnlyStyle;
36564
+ var res = this.allowResize;
36565
+ var allowResize = res === undefined && this.survey ? this.survey.allowResizeComment : !!res;
36566
+ return allowResize && !this.isPreviewStyle && !this.isReadOnlyStyle;
36245
36567
  },
36246
36568
  enumerable: false,
36247
36569
  configurable: true
@@ -36264,7 +36586,7 @@ var QuestionCommentModel = /** @class */ (function (_super) {
36264
36586
  };
36265
36587
  QuestionCommentModel.prototype.updateElement = function () {
36266
36588
  var _this = this;
36267
- if (this.element && this.autoGrow) {
36589
+ if (this.element && this.renderedAutoGrow) {
36268
36590
  setTimeout(function () { return Object(_utils_utils__WEBPACK_IMPORTED_MODULE_3__["increaseHeightByContent"])(_this.element); }, 1);
36269
36591
  }
36270
36592
  };
@@ -36325,8 +36647,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("comment", [
36325
36647
  default: "default",
36326
36648
  choices: ["default", "onBlur", "onTyping"],
36327
36649
  },
36328
- { name: "autoGrow:boolean" },
36329
- { name: "allowResize:boolean", default: true },
36650
+ { name: "autoGrow:boolean", defaultFunc: function () { return undefined; } },
36651
+ { name: "allowResize:boolean", defaultFunc: function () { return undefined; } },
36330
36652
  { name: "acceptCarriageReturn:boolean", default: true, visible: false }
36331
36653
  ], function () {
36332
36654
  return new QuestionCommentModel("");
@@ -36831,6 +37153,10 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
36831
37153
  QuestionCustomModelBase.prototype.getQuestionTitleWidth = function () {
36832
37154
  return undefined;
36833
37155
  };
37156
+ QuestionCustomModelBase.prototype.getColumsForElement = function (el) {
37157
+ return [];
37158
+ };
37159
+ QuestionCustomModelBase.prototype.updateColumns = function () { };
36834
37160
  QuestionCustomModelBase.prototype.getQuestionStartIndex = function () {
36835
37161
  return this.getStartIndex();
36836
37162
  };
@@ -36854,6 +37180,9 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
36854
37180
  QuestionCustomModelBase.prototype.validateContainerOnly = function () {
36855
37181
  // do nothing
36856
37182
  };
37183
+ QuestionCustomModelBase.prototype.onQuestionValueChanged = function (el) {
37184
+ // do nothing
37185
+ };
36857
37186
  QuestionCustomModelBase.prototype.getQuestionErrorLocation = function () {
36858
37187
  return this.getErrorLocation();
36859
37188
  };
@@ -37790,14 +38119,6 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37790
38119
  enumerable: false,
37791
38120
  configurable: true
37792
38121
  });
37793
- Object.defineProperty(QuestionDropdownModel.prototype, "ariaExpanded", {
37794
- get: function () {
37795
- var popupModel = this.popupModel;
37796
- return !!popupModel && popupModel.isVisible ? "true" : "false";
37797
- },
37798
- enumerable: false,
37799
- configurable: true
37800
- });
37801
38122
  QuestionDropdownModel.prototype.onOpenedCallBack = function () {
37802
38123
  this.onOpened.fire(this, { question: this, choices: this.choices });
37803
38124
  };
@@ -37845,6 +38166,12 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
37845
38166
  this.lastSelectedItemValue = null;
37846
38167
  (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.clear();
37847
38168
  };
38169
+ QuestionDropdownModel.prototype.afterRenderCore = function (el) {
38170
+ _super.prototype.afterRenderCore.call(this, el);
38171
+ if (!!this.dropdownListModelValue) {
38172
+ this.dropdownListModelValue.clear();
38173
+ }
38174
+ };
37848
38175
  QuestionDropdownModel.prototype.onClick = function (e) {
37849
38176
  !!this.onOpenedCallBack && this.onOpenedCallBack();
37850
38177
  };
@@ -43474,6 +43801,9 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43474
43801
  enumerable: false,
43475
43802
  configurable: true
43476
43803
  });
43804
+ QuestionMatrixDropdownModelBase.prototype.isSelectCellType = function () {
43805
+ return _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].isDescendantOf(this.cellType, "selectbase");
43806
+ };
43477
43807
  QuestionMatrixDropdownModelBase.prototype.updateColumnsCellType = function () {
43478
43808
  for (var i = 0; i < this.columns.length; i++) {
43479
43809
  this.columns[i].defaultCellTypeChanged();
@@ -43628,13 +43958,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
43628
43958
  break;
43629
43959
  columnName = path[i] + columnName;
43630
43960
  }
43961
+ var question = undefined;
43631
43962
  var column = this.getColumnByName(columnName);
43632
- if (!column)
43633
- return null;
43634
- var question = column.createCellQuestion(null);
43635
- if (!question)
43636
- return null;
43637
- return question.getConditionJson(operator);
43963
+ if (!!column) {
43964
+ question = column.createCellQuestion(null);
43965
+ }
43966
+ else {
43967
+ if (this.detailPanelMode !== "none") {
43968
+ question = this.detailPanel.getQuestionByName(columnName);
43969
+ }
43970
+ }
43971
+ return !!question ? question.getConditionJson(operator) : null;
43638
43972
  };
43639
43973
  QuestionMatrixDropdownModelBase.prototype.clearIncorrectValues = function () {
43640
43974
  var rows = this.visibleRows;
@@ -44113,7 +44447,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
44113
44447
  return questionPlainData;
44114
44448
  };
44115
44449
  QuestionMatrixDropdownModelBase.prototype.addConditionObjectsByContext = function (objects, context) {
44116
- var hasColumnContext = !!context && this.columns.indexOf(context) > -1;
44450
+ var rowElements = [].concat(this.columns);
44451
+ if (this.detailPanelMode !== "none") {
44452
+ rowElements = rowElements.concat(this.detailPanel.questions);
44453
+ }
44454
+ var hasColumnContext = !!context && rowElements.indexOf(context) > -1;
44117
44455
  var hasContext = context === true || hasColumnContext;
44118
44456
  var rowsIndeces = this.getConditionObjectsRowIndeces();
44119
44457
  if (hasContext) {
@@ -44129,13 +44467,13 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
44129
44467
  var dot = hasQuestionPrefix && index === -1 ? "." : "";
44130
44468
  var prefixName = (hasQuestionPrefix ? this.getValueName() : "") + dot + rowName + ".";
44131
44469
  var prefixTitle = (hasQuestionPrefix ? this.processedTitle : "") + dot + rowText + ".";
44132
- for (var j = 0; j < this.columns.length; j++) {
44133
- var column = this.columns[j];
44134
- if (index === -1 && context === column)
44470
+ for (var j = 0; j < rowElements.length; j++) {
44471
+ var rowElement = rowElements[j];
44472
+ if (index === -1 && context === rowElement)
44135
44473
  continue;
44136
44474
  var obj = {
44137
- name: prefixName + column.name,
44138
- text: prefixTitle + column.fullTitle,
44475
+ name: prefixName + rowElement.name,
44476
+ text: prefixTitle + rowElement.fullTitle,
44139
44477
  question: this
44140
44478
  };
44141
44479
  if (index === -1 && context === true) {
@@ -44202,9 +44540,11 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
44202
44540
  var col = this.columns[i];
44203
44541
  if (!col.templateQuestion.hasInput)
44204
44542
  continue;
44543
+ var hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(rowValue[col.name]);
44544
+ if (!hasValue && !!col.templateQuestion.visibleIf)
44545
+ continue;
44205
44546
  res.questionCount += 1;
44206
44547
  res.requiredQuestionCount += col.isRequired;
44207
- var hasValue = !_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(rowValue[col.name]);
44208
44548
  res.answeredQuestionCount += hasValue ? 1 : 0;
44209
44549
  res.requiredAnsweredQuestionCount += hasValue && col.isRequired ? 1 : 0;
44210
44550
  }
@@ -44842,6 +45182,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("matrixdropdownb
44842
45182
  { name: "horizontalScroll:boolean", visible: false, },
44843
45183
  {
44844
45184
  name: "choices:itemvalue[]", uniqueProperty: "value",
45185
+ visibleIf: function (obj) { return obj.isSelectCellType(); }
44845
45186
  },
44846
45187
  { name: "placeholder", alternativeName: "optionsCaption", serializationProperty: "locPlaceholder" },
44847
45188
  {
@@ -49443,6 +49784,10 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
49443
49784
  QuestionMultipleTextModel.prototype.getQuestionTitleWidth = function () {
49444
49785
  return undefined;
49445
49786
  };
49787
+ QuestionMultipleTextModel.prototype.getColumsForElement = function (el) {
49788
+ return [];
49789
+ };
49790
+ QuestionMultipleTextModel.prototype.updateColumns = function () { };
49446
49791
  QuestionMultipleTextModel.prototype.getQuestionStartIndex = function () {
49447
49792
  return this.getStartIndex();
49448
49793
  };
@@ -49466,6 +49811,9 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
49466
49811
  QuestionMultipleTextModel.prototype.validateContainerOnly = function () {
49467
49812
  // do nothing
49468
49813
  };
49814
+ QuestionMultipleTextModel.prototype.onQuestionValueChanged = function (el) {
49815
+ // do nothing
49816
+ };
49469
49817
  QuestionMultipleTextModel.prototype.getItemLabelCss = function (item) {
49470
49818
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_7__["CssClassBuilder"]()
49471
49819
  .append(this.cssClasses.itemLabel)
@@ -52900,7 +53248,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
52900
53248
  _this.domNode = null;
52901
53249
  _this.onVisibleChoicesChanged = function () {
52902
53250
  _super.prototype.onVisibleChoicesChanged.call(_this);
52903
- if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled) {
53251
+ if (_this.carryForwardStartUnranked && !_this.isValueSetByUser && !_this.selectToRankEnabled && !_this.defaultValue) {
52904
53252
  _this.value = [];
52905
53253
  }
52906
53254
  // ranking question with only one choice doesn't make sense
@@ -54574,17 +54922,6 @@ var QuestionRatingModel = /** @class */ (function (_super) {
54574
54922
  QuestionRatingModel.prototype.getDesktopRenderAs = function () {
54575
54923
  return (this.displayMode == "dropdown") ? "dropdown" : "default";
54576
54924
  };
54577
- Object.defineProperty(QuestionRatingModel.prototype, "ariaExpanded", {
54578
- get: function () {
54579
- var _a;
54580
- var popupModel = (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.popupModel;
54581
- if (!popupModel)
54582
- return null;
54583
- return popupModel.isVisible ? "true" : "false";
54584
- },
54585
- enumerable: false,
54586
- configurable: true
54587
- });
54588
54925
  Object.defineProperty(QuestionRatingModel.prototype, "dropdownListModel", {
54589
54926
  get: function () {
54590
54927
  if (this.renderAs === "dropdown") {
@@ -55543,14 +55880,6 @@ var QuestionTagboxModel = /** @class */ (function (_super) {
55543
55880
  enumerable: false,
55544
55881
  configurable: true
55545
55882
  });
55546
- Object.defineProperty(QuestionTagboxModel.prototype, "ariaExpanded", {
55547
- get: function () {
55548
- var popupModel = this.popupModel;
55549
- return !!popupModel && popupModel.isVisible ? "true" : "false";
55550
- },
55551
- enumerable: false,
55552
- configurable: true
55553
- });
55554
55883
  QuestionTagboxModel.prototype.getControlClass = function () {
55555
55884
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_2__["CssClassBuilder"]()
55556
55885
  .append(this.cssClasses.control)
@@ -56205,6 +56534,24 @@ var QuestionTextModel = /** @class */ (function (_super) {
56205
56534
  this._inputValue = this.maskInstance.getMaskedValue(this.value);
56206
56535
  }
56207
56536
  };
56537
+ QuestionTextModel.prototype.hasToConvertToUTC = function (val) {
56538
+ return _settings__WEBPACK_IMPORTED_MODULE_6__["settings"].storeUtcDates && this.isDateTimeLocaleType() && !!val;
56539
+ };
56540
+ QuestionTextModel.prototype.valueForSurveyCore = function (val) {
56541
+ if (this.hasToConvertToUTC(val)) {
56542
+ val = new Date(val).toISOString();
56543
+ }
56544
+ return _super.prototype.valueForSurveyCore.call(this, val);
56545
+ };
56546
+ QuestionTextModel.prototype.valueFromDataCore = function (val) {
56547
+ if (this.hasToConvertToUTC(val)) {
56548
+ var d = new Date(val);
56549
+ var locale_d = new Date(d.getTime() - d.getTimezoneOffset() * 60 * 1000);
56550
+ var res = locale_d.toISOString();
56551
+ val = res.substring(0, res.length - 2);
56552
+ }
56553
+ return _super.prototype.valueFromDataCore.call(this, val);
56554
+ };
56208
56555
  QuestionTextModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
56209
56556
  var _this = this;
56210
56557
  _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
@@ -56276,11 +56623,14 @@ var QuestionTextModel = /** @class */ (function (_super) {
56276
56623
  });
56277
56624
  Object.defineProperty(QuestionTextModel.prototype, "isDateInputType", {
56278
56625
  get: function () {
56279
- return this.inputType === "date" || this.inputType === "datetime-local";
56626
+ return this.inputType === "date" || this.isDateTimeLocaleType();
56280
56627
  },
56281
56628
  enumerable: false,
56282
56629
  configurable: true
56283
56630
  });
56631
+ QuestionTextModel.prototype.isDateTimeLocaleType = function () {
56632
+ return this.inputType === "datetime-local";
56633
+ };
56284
56634
  QuestionTextModel.prototype.getCalculatedMinMax = function (minMax) {
56285
56635
  if (this.isValueEmpty(minMax))
56286
56636
  return minMax;
@@ -56332,11 +56682,10 @@ var QuestionTextModel = /** @class */ (function (_super) {
56332
56682
  return this.maskTypeIsEmpty ? _super.prototype.getIsInputTextUpdate.call(this) : false;
56333
56683
  };
56334
56684
  QuestionTextModel.prototype.supportGoNextPageAutomatic = function () {
56335
- return !this.getIsInputTextUpdate() &&
56336
- ["date", "datetime-local"].indexOf(this.inputType) < 0;
56685
+ return !this.getIsInputTextUpdate() && !this.isDateInputType;
56337
56686
  };
56338
56687
  QuestionTextModel.prototype.supportGoNextPageError = function () {
56339
- return ["date", "datetime-local"].indexOf(this.inputType) < 0;
56688
+ return !this.isDateInputType;
56340
56689
  };
56341
56690
  Object.defineProperty(QuestionTextModel.prototype, "dataList", {
56342
56691
  /**
@@ -56377,9 +56726,13 @@ var QuestionTextModel = /** @class */ (function (_super) {
56377
56726
  QuestionTextModel.prototype.correctValueType = function (newValue) {
56378
56727
  if (!newValue)
56379
56728
  return newValue;
56380
- if (this.inputType == "number" || this.inputType == "range") {
56729
+ if (this.inputType === "number" || this.inputType === "range") {
56381
56730
  return _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].isNumber(newValue) ? _helpers__WEBPACK_IMPORTED_MODULE_3__["Helpers"].getNumber(newValue) : "";
56382
56731
  }
56732
+ if (this.inputType === "month") {
56733
+ var d = new Date(newValue);
56734
+ return d.getFullYear() + "-" + (d.getMonth() + 1);
56735
+ }
56383
56736
  return newValue;
56384
56737
  };
56385
56738
  QuestionTextModel.prototype.hasPlaceholder = function () {
@@ -57950,7 +58303,37 @@ var settings = {
57950
58303
  "a": /[a-zA-Z]/,
57951
58304
  "#": /[a-zA-Z0-9]/
57952
58305
  }
57953
- }
58306
+ },
58307
+ /**
58308
+ * 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"`.
58309
+ *
58310
+ * Default value: `false`
58311
+ *
58312
+ * 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"`.
58313
+ *
58314
+ * ```js
58315
+ * const surveyJson = {
58316
+ * "elements": [{
58317
+ * "name": "datetime",
58318
+ * "type": "text",
58319
+ * "title": "Select a date and time",
58320
+ * "inputType": "datetime-local",
58321
+ * "defaultValue": "2024-07-16T12:15:00" // Local date-time value
58322
+ * }]
58323
+ * }
58324
+ * ```
58325
+ *
58326
+ * ```js
58327
+ * import { Model } from "survey-core";
58328
+ * const surveyJson = { ... }
58329
+ * const survey = new Model(surveyJson);
58330
+ *
58331
+ * survey.data = {
58332
+ * datetime: "2024-07-16T12:15:00.000Z" // UTC date-time value
58333
+ * }
58334
+ * ```
58335
+ */
58336
+ storeUtcDates: false
57954
58337
  };
57955
58338
 
57956
58339
 
@@ -58643,6 +59026,7 @@ var SurveyElement = /** @class */ (function (_super) {
58643
59026
  _this.registerPropertyChangedHandlers(["isReadOnly"], function () { _this.onReadOnlyChanged(); });
58644
59027
  _this.registerPropertyChangedHandlers(["errors"], function () { _this.updateVisibleErrors(); });
58645
59028
  _this.registerPropertyChangedHandlers(["isSingleInRow"], function () { _this.updateElementCss(false); });
59029
+ _this.registerPropertyChangedHandlers(["minWidth", "maxWidth", "renderWidth", "allowRootStyle", "parent"], function () { _this.updateRootStyle(); });
58646
59030
  return _this;
58647
59031
  }
58648
59032
  SurveyElement.getProgressInfoByElements = function (children, isRequired) {
@@ -58737,6 +59121,16 @@ var SurveyElement = /** @class */ (function (_super) {
58737
59121
  }
58738
59122
  return false;
58739
59123
  };
59124
+ Object.defineProperty(SurveyElement.prototype, "colSpan", {
59125
+ get: function () {
59126
+ return this.getPropertyValue("colSpan", 1);
59127
+ },
59128
+ set: function (val) {
59129
+ this.setPropertyValue("colSpan", val);
59130
+ },
59131
+ enumerable: false,
59132
+ configurable: true
59133
+ });
58740
59134
  SurveyElement.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
58741
59135
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
58742
59136
  if (name === "state") {
@@ -59582,12 +59976,24 @@ var SurveyElement = /** @class */ (function (_super) {
59582
59976
  enumerable: false,
59583
59977
  configurable: true
59584
59978
  });
59585
- Object.defineProperty(SurveyElement.prototype, "rootStyle", {
59586
- get: function () {
59587
- var style = {};
59979
+ SurveyElement.prototype.updateRootStyle = function () {
59980
+ var style = {};
59981
+ var _width;
59982
+ if (!!this.parent) {
59983
+ var columns = this.parent.getColumsForElement(this);
59984
+ _width = columns.reduce(function (sum, col) { return col.effectiveWidth + sum; }, 0);
59985
+ if (!!_width && _width !== 100) {
59986
+ style["flexGrow"] = 0;
59987
+ style["flexShrink"] = 0;
59988
+ style["flexBasis"] = _width + "%";
59989
+ style["minWidth"] = undefined;
59990
+ style["maxWidth"] = undefined;
59991
+ }
59992
+ }
59993
+ if (Object.keys(style).length == 0) {
59588
59994
  var minWidth = this.minWidth;
59589
59995
  if (minWidth != "auto")
59590
- minWidth = "min(100%, " + this.minWidth + ")";
59996
+ minWidth = "min(100%, " + minWidth + ")";
59591
59997
  if (this.allowRootStyle && this.renderWidth) {
59592
59998
  // style["width"] = this.renderWidth;
59593
59999
  style["flexGrow"] = 1;
@@ -59596,11 +60002,9 @@ var SurveyElement = /** @class */ (function (_super) {
59596
60002
  style["minWidth"] = minWidth;
59597
60003
  style["maxWidth"] = this.maxWidth;
59598
60004
  }
59599
- return style;
59600
- },
59601
- enumerable: false,
59602
- configurable: true
59603
- });
60005
+ }
60006
+ this.rootStyle = style;
60007
+ };
59604
60008
  SurveyElement.prototype.isContainsSelection = function (el) {
59605
60009
  var elementWithSelection = undefined;
59606
60010
  var _document = _global_variables_utils__WEBPACK_IMPORTED_MODULE_9__["DomDocumentHelper"].getDocument();
@@ -59754,7 +60158,8 @@ var SurveyElement = /** @class */ (function (_super) {
59754
60158
  },
59755
60159
  getLeaveOptions: function () {
59756
60160
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
59757
- return { cssClass: cssClasses.contentFadeOut,
60161
+ return {
60162
+ cssClass: cssClasses.contentFadeOut,
59758
60163
  onBeforeRunAnimation: beforeRunAnimation,
59759
60164
  onAfterRunAnimation: afterRunAnimation
59760
60165
  };
@@ -59810,6 +60215,13 @@ var SurveyElement = /** @class */ (function (_super) {
59810
60215
  __decorate([
59811
60216
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
59812
60217
  ], SurveyElement.prototype, "isDragMe", void 0);
60218
+ __decorate([
60219
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({
60220
+ onSet: function (newValue, target) {
60221
+ target.colSpan = newValue;
60222
+ }
60223
+ })
60224
+ ], SurveyElement.prototype, "effectiveColSpan", void 0);
59813
60225
  __decorate([
59814
60226
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
59815
60227
  ], SurveyElement.prototype, "hasVisibleErrors", void 0);
@@ -59819,6 +60231,9 @@ var SurveyElement = /** @class */ (function (_super) {
59819
60231
  __decorate([
59820
60232
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: true })
59821
60233
  ], SurveyElement.prototype, "allowRootStyle", void 0);
60234
+ __decorate([
60235
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
60236
+ ], SurveyElement.prototype, "rootStyle", void 0);
59822
60237
  __decorate([
59823
60238
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
59824
60239
  ], SurveyElement.prototype, "_renderedIsExpanded", void 0);
@@ -63160,7 +63575,8 @@ var SurveyModel = /** @class */ (function (_super) {
63160
63575
  }
63161
63576
  if (data) {
63162
63577
  for (var key in data) {
63163
- this.setDataValueCore(this.valuesHash, key, data[key]);
63578
+ var dataKey = typeof key === "string" ? key.trim() : key;
63579
+ this.setDataValueCore(this.valuesHash, dataKey, data[key]);
63164
63580
  }
63165
63581
  }
63166
63582
  this.updateAllQuestionsValue(clearData);
@@ -63672,7 +64088,9 @@ var SurveyModel = /** @class */ (function (_super) {
63672
64088
  });
63673
64089
  SurveyModel.prototype.updateActivePage = function () {
63674
64090
  var newPage = this.isShowStartingPage ? this.startedPage : this.currentPage;
63675
- this.setPropertyValue("activePage", newPage);
64091
+ if (newPage !== this.activePage) {
64092
+ this.setPropertyValue("activePage", newPage);
64093
+ }
63676
64094
  };
63677
64095
  SurveyModel.prototype.onStateAndCurrentPageChanged = function () {
63678
64096
  this.updateActivePage();
@@ -64747,7 +65165,11 @@ var SurveyModel = /** @class */ (function (_super) {
64747
65165
  return this.firstPageIsStarted && this.pages.length > 0 ? 1 : 0;
64748
65166
  };
64749
65167
  SurveyModel.prototype.setupPagesForPageModes = function (isSinglePage, isFirstLoad) {
65168
+ var _this = this;
64750
65169
  this.questionHashesClear();
65170
+ if (this.firstPageIsStarted && this.pages.length > 0) {
65171
+ this.pages[0].questions.forEach(function (q) { return _this.questionHashesAdded(q); });
65172
+ }
64751
65173
  this.isLockingUpdateOnPageModes = !isFirstLoad;
64752
65174
  var startIndex = this.getPageStartIndex();
64753
65175
  _super.prototype.startLoadingFromJson.call(this);
@@ -64891,7 +65313,7 @@ var SurveyModel = /** @class */ (function (_super) {
64891
65313
  if (this.isFirstPage || !this.showPrevButton || this.state !== "running")
64892
65314
  return false;
64893
65315
  var page = this.visiblePages[this.currentPageNo - 1];
64894
- return this.getPageMaxTimeToFinish(page) <= 0;
65316
+ return page && page.getMaxTimeToFinish() <= 0;
64895
65317
  };
64896
65318
  SurveyModel.prototype.calcIsShowNextButton = function () {
64897
65319
  return this.state === "running" && !this.isLastPage && !this.canBeCompletedByTrigger;
@@ -66545,19 +66967,19 @@ var SurveyModel = /** @class */ (function (_super) {
66545
66967
  this.onLoadingSurveyFromService();
66546
66968
  if (clientId) {
66547
66969
  this.createSurveyService().getSurveyJsonAndIsCompleted(this.surveyId, this.clientId, function (success, json, isCompleted, response) {
66548
- self.isLoading = false;
66549
66970
  if (success) {
66550
66971
  self.isCompletedBefore = isCompleted == "completed";
66551
66972
  self.loadSurveyFromServiceJson(json);
66552
66973
  }
66974
+ self.isLoading = false;
66553
66975
  });
66554
66976
  }
66555
66977
  else {
66556
66978
  this.createSurveyService().loadSurvey(this.surveyId, function (success, result, response) {
66557
- self.isLoading = false;
66558
66979
  if (success) {
66559
66980
  self.loadSurveyFromServiceJson(result);
66560
66981
  }
66982
+ self.isLoading = false;
66561
66983
  });
66562
66984
  }
66563
66985
  };
@@ -67661,7 +68083,7 @@ var SurveyModel = /** @class */ (function (_super) {
67661
68083
  return { spent: 0, limit: 0 };
67662
68084
  var pageSpent = page.timeSpent;
67663
68085
  var surveySpent = this.timeSpent;
67664
- var pageLimitSec = this.getPageMaxTimeToFinish(page);
68086
+ var pageLimitSec = page.getMaxTimeToFinish();
67665
68087
  var surveyLimit = this.maxTimeToFinish;
67666
68088
  if (this.showTimerPanelMode == "page") {
67667
68089
  return { spent: pageSpent, limit: pageLimitSec };
@@ -67690,7 +68112,7 @@ var SurveyModel = /** @class */ (function (_super) {
67690
68112
  return "";
67691
68113
  var pageSpent = this.getDisplayTime(page.timeSpent);
67692
68114
  var surveySpent = this.getDisplayTime(this.timeSpent);
67693
- var pageLimitSec = this.getPageMaxTimeToFinish(page);
68115
+ var pageLimitSec = page.getMaxTimeToFinish();
67694
68116
  var pageLimit = this.getDisplayTime(pageLimitSec);
67695
68117
  var surveyLimit = this.getDisplayTime(this.maxTimeToFinish);
67696
68118
  if (this.showTimerPanelMode == "page")
@@ -67711,7 +68133,7 @@ var SurveyModel = /** @class */ (function (_super) {
67711
68133
  return "";
67712
68134
  };
67713
68135
  SurveyModel.prototype.getTimerInfoPageText = function (page, pageSpent, pageLimit) {
67714
- return this.getPageMaxTimeToFinish(page) > 0
68136
+ return !!page && page.getMaxTimeToFinish() > 0
67715
68137
  ? this.getLocalizationFormatString("timerLimitPage", pageSpent, pageLimit)
67716
68138
  : this.getLocalizationFormatString("timerSpentPage", pageSpent, pageLimit);
67717
68139
  };
@@ -67836,20 +68258,14 @@ var SurveyModel = /** @class */ (function (_super) {
67836
68258
  enumerable: false,
67837
68259
  configurable: true
67838
68260
  });
67839
- SurveyModel.prototype.getPageMaxTimeToFinish = function (page) {
67840
- if (!page || page.maxTimeToFinish < 0)
67841
- return 0;
67842
- return page.maxTimeToFinish > 0
67843
- ? page.maxTimeToFinish
67844
- : this.maxTimeToFinishPage;
67845
- };
67846
68261
  SurveyModel.prototype.doTimer = function (page) {
67847
68262
  this.onTimer.fire(this, {});
67848
- if (this.maxTimeToFinish > 0 && this.maxTimeToFinish == this.timeSpent) {
68263
+ if (this.maxTimeToFinish > 0 && this.maxTimeToFinish <= this.timeSpent) {
68264
+ this.timeSpent = this.maxTimeToFinish;
67849
68265
  this.completeLastPage();
67850
68266
  }
67851
68267
  if (page) {
67852
- var pageLimit = this.getPageMaxTimeToFinish(page);
68268
+ var pageLimit = page.getMaxTimeToFinish();
67853
68269
  if (pageLimit > 0 && pageLimit == page.timeSpent) {
67854
68270
  if (this.isLastPage) {
67855
68271
  this.completeLastPage();
@@ -68232,10 +68648,21 @@ var SurveyModel = /** @class */ (function (_super) {
68232
68648
  this.disposeCallback();
68233
68649
  }
68234
68650
  };
68651
+ // private _lastScrollTop = 0;
68652
+ SurveyModel.prototype._isElementShouldBeSticky = function (selector) {
68653
+ if (!selector)
68654
+ return false;
68655
+ var topStickyContainer = this.rootElement.querySelector(selector);
68656
+ if (!!topStickyContainer) {
68657
+ // const scrollDirection = this.rootElement.scrollTop > this._lastScrollTop ? "down" : "up";
68658
+ // this._lastScrollTop = this.rootElement.scrollTop;
68659
+ return this.rootElement.scrollTop > 0 && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y;
68660
+ }
68661
+ return false;
68662
+ };
68235
68663
  SurveyModel.prototype.onScroll = function () {
68236
68664
  if (!!this.rootElement) {
68237
- var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
68238
- if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
68665
+ if (this._isElementShouldBeSticky(".sv-components-container-center")) {
68239
68666
  this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
68240
68667
  }
68241
68668
  else {
@@ -68373,6 +68800,9 @@ var SurveyModel = /** @class */ (function (_super) {
68373
68800
  __decorate([
68374
68801
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68375
68802
  ], SurveyModel.prototype, "rootCss", void 0);
68803
+ __decorate([
68804
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68805
+ ], SurveyModel.prototype, "gridLayoutEnabled", void 0);
68376
68806
  __decorate([
68377
68807
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
68378
68808
  ], SurveyModel.prototype, "calculatedWidthMode", void 0);
@@ -68670,6 +69100,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("survey", [
68670
69100
  default: "auto",
68671
69101
  choices: ["auto", "static", "responsive"],
68672
69102
  },
69103
+ { name: "gridLayoutEnabled:boolean", default: false, visible: false },
68673
69104
  { name: "width", visibleIf: function (obj) { return obj.widthMode === "static"; } },
68674
69105
  { name: "fitToContainer:boolean", default: true, visible: false },
68675
69106
  { name: "headerView", default: "basic", choices: ["basic", "advanced"], visible: false },
@@ -68978,7 +69409,7 @@ var SurveyTimerModel = /** @class */ (function (_super) {
68978
69409
  this.survey.onCurrentPageChanged.add(function () {
68979
69410
  _this.update();
68980
69411
  });
68981
- this.timerFunc = function () { _this.doTimer(); };
69412
+ this.timerFunc = function (sender, options) { _this.doTimer(options.seconds); };
68982
69413
  this.setIsRunning(true);
68983
69414
  this.update();
68984
69415
  _surveytimer__WEBPACK_IMPORTED_MODULE_1__["SurveyTimer"].instance.start(this.timerFunc);
@@ -69003,12 +69434,16 @@ var SurveyTimerModel = /** @class */ (function (_super) {
69003
69434
  this.updateText();
69004
69435
  this.updateProgress();
69005
69436
  };
69006
- SurveyTimerModel.prototype.doTimer = function () {
69437
+ SurveyTimerModel.prototype.doTimer = function (seconds) {
69007
69438
  var page = this.survey.currentPage;
69008
69439
  if (page) {
69009
- page.timeSpent = page.timeSpent + 1;
69440
+ var pageMaxTime = page.getMaxTimeToFinish();
69441
+ if (pageMaxTime > 0 && pageMaxTime < page.timeSpent + seconds) {
69442
+ seconds = pageMaxTime - page.timeSpent;
69443
+ }
69444
+ page.timeSpent = page.timeSpent + seconds;
69010
69445
  }
69011
- this.spent = this.spent + 1;
69446
+ this.spent = this.spent + seconds;
69012
69447
  this.update();
69013
69448
  if (this.onTimer) {
69014
69449
  this.onTimer(page);
@@ -69294,13 +69729,14 @@ var surveyTimerFunctions = {
69294
69729
  else {
69295
69730
  return setTimeout(func, delay);
69296
69731
  }
69297
- }
69732
+ },
69733
+ now: function () { return Date.now(); }
69298
69734
  };
69299
69735
  var SurveyTimer = /** @class */ (function () {
69300
69736
  function SurveyTimer() {
69301
69737
  this.listenerCounter = 0;
69302
69738
  this.timerId = -1;
69303
- this.onTimer = new _base__WEBPACK_IMPORTED_MODULE_0__["Event"]();
69739
+ this.onTimer = new _base__WEBPACK_IMPORTED_MODULE_0__["EventBase"]();
69304
69740
  }
69305
69741
  Object.defineProperty(SurveyTimer, "instance", {
69306
69742
  get: function () {
@@ -69318,6 +69754,7 @@ var SurveyTimer = /** @class */ (function () {
69318
69754
  if (func) {
69319
69755
  this.onTimer.add(func);
69320
69756
  }
69757
+ this.prevTimeInMs = surveyTimerFunctions.now();
69321
69758
  if (this.timerId < 0) {
69322
69759
  this.timerId = surveyTimerFunctions.setTimeout(function () {
69323
69760
  _this.doTimer();
@@ -69343,8 +69780,14 @@ var SurveyTimer = /** @class */ (function () {
69343
69780
  }
69344
69781
  if (this.timerId < 0)
69345
69782
  return;
69783
+ var newTimer = surveyTimerFunctions.now();
69784
+ var seconds = Math.floor((newTimer - this.prevTimeInMs) / 1000);
69785
+ this.prevTimeInMs = newTimer;
69786
+ if (seconds < 0) {
69787
+ seconds = 1;
69788
+ }
69346
69789
  var prevItem = this.timerId;
69347
- this.onTimer.fire(this, {});
69790
+ this.onTimer.fire(this, { seconds: seconds });
69348
69791
  //We have to check that we have the same timerId
69349
69792
  //It could be changed during events execution and it will lead to double timer events
69350
69793
  if (prevItem !== this.timerId)
@@ -71700,7 +72143,7 @@ function debounce(func) {
71700
72143
  /*!****************************!*\
71701
72144
  !*** ./src/utils/utils.ts ***!
71702
72145
  \****************************/
71703
- /*! 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 */
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 */
71704
72147
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
71705
72148
 
71706
72149
  "use strict";
@@ -71716,6 +72159,7 @@ __webpack_require__.r(__webpack_exports__);
71716
72159
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showConfirmDialog", function() { return showConfirmDialog; });
71717
72160
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configConfirmDialog", function() { return configConfirmDialog; });
71718
72161
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compareArrays", function() { return compareArrays; });
72162
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "roundTo2Decimals", function() { return roundTo2Decimals; });
71719
72163
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mergeValues", function() { return mergeValues; });
71720
72164
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getElementWidth", function() { return getElementWidth; });
71721
72165
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContainerVisible", function() { return isContainerVisible; });
@@ -71884,7 +72328,7 @@ function navigateToUrl(url) {
71884
72328
  var location = _global_variables_utils__WEBPACK_IMPORTED_MODULE_3__["DomWindowHelper"].getLocation();
71885
72329
  if (!url || !location)
71886
72330
  return;
71887
- location.href = url;
72331
+ location.href = encodeURIComponent(url);
71888
72332
  }
71889
72333
  function wrapUrlForBackgroundImage(url) {
71890
72334
  return !!url ? ["url(", url, ")"].join("") : "";
@@ -72280,6 +72724,9 @@ function compareArrays(oldValue, newValue, getKey) {
72280
72724
  });
72281
72725
  return { reorderedItems: reorderedItems, deletedItems: deletedItems, addedItems: addedItems, mergedItems: mergedItems };
72282
72726
  }
72727
+ function roundTo2Decimals(number) {
72728
+ return Math.round(number * 100) / 100;
72729
+ }
72283
72730
 
72284
72731
 
72285
72732