survey-core 1.11.3 → 1.11.4

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 (234) hide show
  1. package/defaultV2.css +55 -15
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +55 -15
  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 +113 -79
  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/defaultCss/cssmodern.d.ts +1 -0
  212. package/ts3.4/typings/defaultCss/cssstandard.d.ts +1 -0
  213. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
  214. package/ts3.4/typings/dropdownListModel.d.ts +2 -0
  215. package/ts3.4/typings/global_variables_utils.d.ts +3 -0
  216. package/ts3.4/typings/mask/mask_base.d.ts +3 -0
  217. package/ts3.4/typings/panel.d.ts +2 -0
  218. package/ts3.4/typings/question_boolean.d.ts +0 -4
  219. package/ts3.4/typings/question_ranking.d.ts +4 -5
  220. package/ts3.4/typings/settings.d.ts +1 -0
  221. package/ts3.4/typings/survey.d.ts +3 -1
  222. package/ts3.4/typings/utils/devices.d.ts +4 -0
  223. package/typings/defaultCss/cssmodern.d.ts +1 -0
  224. package/typings/defaultCss/cssstandard.d.ts +1 -0
  225. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  226. package/typings/dropdownListModel.d.ts +2 -0
  227. package/typings/global_variables_utils.d.ts +3 -0
  228. package/typings/mask/mask_base.d.ts +3 -0
  229. package/typings/panel.d.ts +2 -0
  230. package/typings/question_boolean.d.ts +0 -4
  231. package/typings/question_ranking.d.ts +1 -3
  232. package/typings/settings.d.ts +1 -0
  233. package/typings/survey.d.ts +3 -1
  234. package/typings/utils/devices.d.ts +4 -0
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.11.3
2
+ * surveyjs - Survey JavaScript library v1.11.4
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
  */
@@ -2925,7 +2925,8 @@ var Base = /** @class */ (function () {
2925
2925
  configurable: true
2926
2926
  });
2927
2927
  Base.prototype.afterRerender = function () {
2928
- this.onElementRerendered.fire(this, undefined);
2928
+ var _a;
2929
+ (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, undefined);
2929
2930
  };
2930
2931
  Base.currentDependencis = undefined;
2931
2932
  return Base;
@@ -4639,6 +4640,7 @@ __webpack_require__.r(__webpack_exports__);
4639
4640
 
4640
4641
  var modernCss = {
4641
4642
  root: "sv-root-modern",
4643
+ rootProgress: "sv-progress",
4642
4644
  timerRoot: "sv-body__timer",
4643
4645
  container: "sv-container-modern",
4644
4646
  header: "sv-title sv-container-modern__title",
@@ -5106,6 +5108,7 @@ __webpack_require__.r(__webpack_exports__);
5106
5108
 
5107
5109
  var defaultStandardCss = {
5108
5110
  root: "sv_main sv_default_css",
5111
+ rootProgress: "sv_progress",
5109
5112
  container: "sv_container",
5110
5113
  header: "sv_header",
5111
5114
  bodyContainer: "sv-components-row",
@@ -5549,6 +5552,7 @@ var surveyCss = {
5549
5552
  };
5550
5553
  var defaultV2Css = {
5551
5554
  root: "sd-root-modern",
5555
+ rootProgress: "sd-progress",
5552
5556
  rootMobile: "sd-root-modern--mobile",
5553
5557
  rootAnimationDisabled: "sd-root-modern--animation-disabled",
5554
5558
  rootReadOnly: "sd-root--readonly",
@@ -8161,6 +8165,7 @@ var DropdownListModel = /** @class */ (function (_super) {
8161
8165
  _this.onSelectionChanged = onSelectionChanged;
8162
8166
  _this.minPageSize = 25;
8163
8167
  _this.loadingItemHeight = 40;
8168
+ _this.timer = undefined;
8164
8169
  _this._markdownMode = false;
8165
8170
  _this.filteredItems = undefined;
8166
8171
  _this.selectedItemSelector = ".sv-list__item--selected";
@@ -8215,28 +8220,43 @@ var DropdownListModel = /** @class */ (function (_super) {
8215
8220
  this.listModel.isAllDataLoaded = this.question.choicesLazyLoadEnabled && this.itemsSettings.items.length == this.itemsSettings.totalCount;
8216
8221
  this.question.choices = this.itemsSettings.items;
8217
8222
  };
8223
+ DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
8224
+ var _this = this;
8225
+ this.isRunningLoadQuestionChoices = true;
8226
+ this.question.survey.loadQuestionChoices({
8227
+ question: this.question,
8228
+ filter: this.filterString,
8229
+ skip: this.itemsSettings.skip,
8230
+ take: this.itemsSettings.take,
8231
+ setItems: function (items, totalCount) {
8232
+ _this.isRunningLoadQuestionChoices = false;
8233
+ _this.setItems(items || [], totalCount || 0);
8234
+ _this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
8235
+ if (!!callbackAfterItemsLoaded) {
8236
+ callbackAfterItemsLoaded();
8237
+ }
8238
+ }
8239
+ });
8240
+ this.itemsSettings.skip += this.itemsSettings.take;
8241
+ };
8218
8242
  DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
8219
8243
  var _this = this;
8220
8244
  if (this.isRunningLoadQuestionChoices)
8221
8245
  return;
8222
8246
  var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
8223
8247
  if (!this.itemsSettings.skip || isUpdate) {
8224
- this.isRunningLoadQuestionChoices = true;
8225
- this.question.survey.loadQuestionChoices({
8226
- question: this.question,
8227
- filter: this.filterString,
8228
- skip: this.itemsSettings.skip,
8229
- take: this.itemsSettings.take,
8230
- setItems: function (items, totalCount) {
8231
- _this.isRunningLoadQuestionChoices = false;
8232
- _this.setItems(items || [], totalCount || 0);
8233
- _this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
8234
- if (!!callbackAfterItemsLoaded) {
8235
- callbackAfterItemsLoaded();
8236
- }
8248
+ if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
8249
+ if (!!this.timer) {
8250
+ clearTimeout(this.timer);
8251
+ this.timer = undefined;
8237
8252
  }
8238
- });
8239
- this.itemsSettings.skip += this.itemsSettings.take;
8253
+ this.timer = setTimeout(function () {
8254
+ _this.loadQuestionChoices(callbackAfterItemsLoaded);
8255
+ }, _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay);
8256
+ }
8257
+ else {
8258
+ this.loadQuestionChoices(callbackAfterItemsLoaded);
8259
+ }
8240
8260
  }
8241
8261
  };
8242
8262
  DropdownListModel.prototype.updatePopupFocusFirstInputSelector = function () {
@@ -9791,8 +9811,8 @@ __webpack_require__.r(__webpack_exports__);
9791
9811
 
9792
9812
  var Version;
9793
9813
  var ReleaseDate;
9794
- Version = "" + "1.11.3";
9795
- ReleaseDate = "" + "2024-06-18";
9814
+ Version = "" + "1.11.4";
9815
+ ReleaseDate = "" + "2024-06-25";
9796
9816
  function checkLibraryVersion(ver, libraryName) {
9797
9817
  if (Version != ver) {
9798
9818
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -15894,6 +15914,11 @@ var DomWindowHelper = /** @class */ (function () {
15894
15914
  return;
15895
15915
  window.removeEventListener(type, listener);
15896
15916
  };
15917
+ DomWindowHelper.matchMedia = function (mediaQueryString) {
15918
+ if (!DomWindowHelper.isAvailable() || typeof window.matchMedia === "undefined")
15919
+ return null;
15920
+ return window.matchMedia(mediaQueryString);
15921
+ };
15897
15922
  return DomWindowHelper;
15898
15923
  }());
15899
15924
 
@@ -22023,6 +22048,10 @@ var InputMaskBase = /** @class */ (function (_super) {
22023
22048
  function InputMaskBase() {
22024
22049
  return _super !== null && _super.apply(this, arguments) || this;
22025
22050
  }
22051
+ InputMaskBase.prototype.getSurvey = function (live) {
22052
+ if (live === void 0) { live = false; }
22053
+ return this.owner;
22054
+ };
22026
22055
  InputMaskBase.prototype.getType = function () {
22027
22056
  return "masksettings";
22028
22057
  };
@@ -24558,11 +24587,22 @@ var PanelModelBase = /** @class */ (function (_super) {
24558
24587
  });
24559
24588
  PanelModelBase.prototype.delete = function (doDispose) {
24560
24589
  if (doDispose === void 0) { doDispose = true; }
24590
+ this.deletePanel();
24561
24591
  this.removeFromParent();
24562
24592
  if (doDispose) {
24563
24593
  this.dispose();
24564
24594
  }
24565
24595
  };
24596
+ PanelModelBase.prototype.deletePanel = function () {
24597
+ var els = this.elements;
24598
+ for (var i = 0; i < els.length; i++) {
24599
+ var el = els[i];
24600
+ if (el.isPanel) {
24601
+ el.deletePanel();
24602
+ }
24603
+ this.onRemoveElementNotifySurvey(el);
24604
+ }
24605
+ };
24566
24606
  PanelModelBase.prototype.removeFromParent = function () { };
24567
24607
  PanelModelBase.prototype.canShowTitle = function () { return true; };
24568
24608
  Object.defineProperty(PanelModelBase.prototype, "_showDescription", {
@@ -25547,17 +25587,20 @@ var PanelModelBase = /** @class */ (function (_super) {
25547
25587
  this.updateRowsOnElementRemoved(element);
25548
25588
  if (this.isRandomizing)
25549
25589
  return;
25590
+ this.onRemoveElementNotifySurvey(element);
25591
+ if (!!this.removeElementCallback)
25592
+ this.removeElementCallback(element);
25593
+ this.onElementVisibilityChanged(this);
25594
+ };
25595
+ PanelModelBase.prototype.onRemoveElementNotifySurvey = function (element) {
25596
+ if (!this.survey)
25597
+ return;
25550
25598
  if (!element.isPanel) {
25551
- if (this.survey)
25552
- this.survey.questionRemoved(element);
25599
+ this.survey.questionRemoved(element);
25553
25600
  }
25554
25601
  else {
25555
- if (this.survey)
25556
- this.survey.panelRemoved(element);
25602
+ this.survey.panelRemoved(element);
25557
25603
  }
25558
- if (!!this.removeElementCallback)
25559
- this.removeElementCallback(element);
25560
- this.onElementVisibilityChanged(this);
25561
25604
  };
25562
25605
  PanelModelBase.prototype.onElementVisibilityChanged = function (element) {
25563
25606
  if (this.isLoadingFromJson || this.isRandomizing)
@@ -28275,7 +28318,8 @@ var ProgressButtons = /** @class */ (function (_super) {
28275
28318
  return;
28276
28319
  var listContainerElements = element.querySelectorAll(".sd-progress-buttons__connector");
28277
28320
  var circleWidth = this.showItemNumbers ? 17 : 5;
28278
- var connectorWidth = listContainerElement.clientWidth / (listContainerElement.children.length - 1) - circleWidth;
28321
+ var sideCorrection = this.survey.isMobile ? 0 : listContainerElement.children[0].clientWidth;
28322
+ var connectorWidth = (listContainerElement.clientWidth - sideCorrection) / (listContainerElement.children.length - 1) - circleWidth;
28279
28323
  for (var i = 0; i < listContainerElements.length; i++) {
28280
28324
  listContainerElements[i].style.width = connectorWidth + "px";
28281
28325
  }
@@ -34588,23 +34632,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
34588
34632
  enumerable: false,
34589
34633
  configurable: true
34590
34634
  });
34591
- QuestionBooleanModel.prototype.updateThumbMargin = function () {
34592
- var _this = this;
34593
- if (!this.isIndeterminate && this.leftAnswerElement) {
34594
- if (!this.swapOrder && this.value === this.getValueTrue() || this.swapOrder && this.value === this.getValueFalse()) {
34595
- var el_1 = this.leftAnswerElement;
34596
- setTimeout(function () {
34597
- _this.thumbMargin = el_1.clientWidth + (_this.swapOrder ? 4 : 2) + "px";
34598
- }, 50);
34599
- }
34600
- }
34601
- this.thumbMargin = undefined;
34602
- };
34603
- QuestionBooleanModel.prototype.afterRender = function (el) {
34604
- _super.prototype.afterRender.call(this, el);
34605
- this.leftAnswerElement = el.querySelectorAll("." + this.cssClasses.sliderGhost)[0];
34606
- this.updateThumbMargin();
34607
- };
34608
34635
  QuestionBooleanModel.prototype.beforeDestroyQuestionElement = function (el) {
34609
34636
  _super.prototype.beforeDestroyQuestionElement.call(this, el);
34610
34637
  this.leftAnswerElement = undefined;
@@ -34756,11 +34783,9 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
34756
34783
  QuestionBooleanModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
34757
34784
  if (clearData === void 0) { clearData = false; }
34758
34785
  _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
34759
- this.updateThumbMargin();
34760
34786
  };
34761
34787
  QuestionBooleanModel.prototype.onValueChanged = function () {
34762
34788
  _super.prototype.onValueChanged.call(this);
34763
- this.updateThumbMargin();
34764
34789
  };
34765
34790
  Object.defineProperty(QuestionBooleanModel.prototype, "svgIcon", {
34766
34791
  get: function () {
@@ -34888,12 +34913,6 @@ var QuestionBooleanModel = /** @class */ (function (_super) {
34888
34913
  __decorate([
34889
34914
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34890
34915
  ], QuestionBooleanModel.prototype, "booleanValueRendered", void 0);
34891
- __decorate([
34892
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34893
- ], QuestionBooleanModel.prototype, "leftAnswerElement", void 0);
34894
- __decorate([
34895
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34896
- ], QuestionBooleanModel.prototype, "thumbMargin", void 0);
34897
34916
  __decorate([
34898
34917
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34899
34918
  ], QuestionBooleanModel.prototype, "showTitle", void 0);
@@ -35393,7 +35412,7 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
35393
35412
  }
35394
35413
  else {
35395
35414
  if (this.isNoneItem(item)) {
35396
- this.renderedValue = [item.value];
35415
+ this.renderedValue = checked ? [item.value] : [];
35397
35416
  }
35398
35417
  else {
35399
35418
  var newValue = [].concat(this.renderedValue || []);
@@ -52860,9 +52879,6 @@ var QuestionRankingModel = /** @class */ (function (_super) {
52860
52879
  _this.dragOrClickHelper = new _utils_dragOrClickHelper__WEBPACK_IMPORTED_MODULE_11__["DragOrClickHelper"](_this.startDrag);
52861
52880
  return _this;
52862
52881
  }
52863
- QuestionRankingModel.prototype.getDefaultItemComponent = function () {
52864
- return "";
52865
- };
52866
52882
  QuestionRankingModel.prototype.getType = function () {
52867
52883
  return "ranking";
52868
52884
  };
@@ -53285,19 +53301,12 @@ var QuestionRankingModel = /** @class */ (function (_super) {
53285
53301
  enumerable: false,
53286
53302
  configurable: true
53287
53303
  });
53288
- Object.defineProperty(QuestionRankingModel.prototype, "itemContentComponent", {
53289
- /**
53290
- * The name of a component used to render items.
53291
- */
53292
- get: function () {
53293
- return this.getPropertyValue("itemContentComponent", "sv-ranking-item-content");
53294
- },
53295
- set: function (value) {
53296
- this.setPropertyValue("itemContentComponent", value);
53297
- },
53298
- enumerable: false,
53299
- configurable: true
53300
- });
53304
+ /**
53305
+ * The name of a component used to render items.
53306
+ */
53307
+ QuestionRankingModel.prototype.getDefaultItemComponent = function () {
53308
+ return "sv-ranking-item";
53309
+ };
53301
53310
  Object.defineProperty(QuestionRankingModel.prototype, "selectToRankEnabled", {
53302
53311
  /**
53303
53312
  * Specifies whether users can select choices they want to rank.
@@ -53490,8 +53499,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
53490
53499
  dependsOn: "selectToRankEnabled", visibleIf: function (obj) {
53491
53500
  return !!obj.selectToRankEnabled;
53492
53501
  }, isSerializable: true },
53493
- { name: "itemComponent", visible: false, default: "" },
53494
- { name: "itemContentComponent", visible: false, default: "sv-ranking-item-content" },
53502
+ { name: "itemComponent", visible: false, default: "sv-ranking-item" },
53495
53503
  ], function () {
53496
53504
  return new QuestionRankingModel("");
53497
53505
  }, "checkbox");
@@ -55741,7 +55749,11 @@ var QuestionTextModel = /** @class */ (function (_super) {
55741
55749
  };
55742
55750
  Object.defineProperty(QuestionTextModel.prototype, "maskTypeIsEmpty", {
55743
55751
  get: function () {
55744
- return this.maskType === "none" || this.inputType !== "text";
55752
+ switch (this.inputType) {
55753
+ case "tel":
55754
+ case "text": return this.maskType === "none";
55755
+ default: return true;
55756
+ }
55745
55757
  },
55746
55758
  enumerable: false,
55747
55759
  configurable: true
@@ -55783,6 +55795,7 @@ var QuestionTextModel = /** @class */ (function (_super) {
55783
55795
  maskClassName = "masksettings";
55784
55796
  }
55785
55797
  var inputMask = _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].createClass(maskClassName);
55798
+ inputMask.owner = this.survey;
55786
55799
  return inputMask;
55787
55800
  };
55788
55801
  QuestionTextModel.prototype.isTextValue = function () {
@@ -56479,7 +56492,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
56479
56492
  visibleIndex: 0,
56480
56493
  dependsOn: "inputType",
56481
56494
  visibleIf: function (obj) {
56482
- return obj.inputType === "text";
56495
+ return obj.inputType === "text" || obj.inputType === "tel";
56483
56496
  }
56484
56497
  },
56485
56498
  {
@@ -56488,7 +56501,7 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("text", [
56488
56501
  visibleIndex: 1,
56489
56502
  dependsOn: "inputType",
56490
56503
  visibleIf: function (obj) {
56491
- return obj.inputType === "text";
56504
+ return obj.inputType === "text" || obj.inputType === "tel";
56492
56505
  },
56493
56506
  onGetValue: function (obj) {
56494
56507
  return obj.maskSettings.getData();
@@ -57498,6 +57511,7 @@ var settings = {
57498
57511
  * This setting applies to all TagBox questions on a page. You can use the [closeOnSelect](https://surveyjs.io/form-library/documentation/api-reference/dropdown-tag-box-model#closeOnSelect) property to specify the same setting for an individual TagBox question.
57499
57512
  */
57500
57513
  tagboxCloseOnSelect: false,
57514
+ dropdownSearchDelay: 500,
57501
57515
  /**
57502
57516
  * A function that activates a browser confirm dialog.
57503
57517
  *
@@ -60257,7 +60271,7 @@ var SurveyModel = /** @class */ (function (_super) {
60257
60271
  */
60258
60272
  _this.onUpdatePageCssClasses = _this.addEvent();
60259
60273
  /**
60260
- * An event that is raised before rendering a choice item in Radio Button Group, Checkboxes, and Dropdown questions. Use it to override default CSS classes applied to choice items.
60274
+ * An event that is raised before rendering a choice item in Radio Button Group and Checkboxes questions. Use it to override default CSS classes applied to choice items.
60261
60275
  *
60262
60276
  * For information on event handler parameters, refer to descriptions within the interface.
60263
60277
  *
@@ -61585,6 +61599,8 @@ var SurveyModel = /** @class */ (function (_super) {
61585
61599
  * - `"onValueChanged"` - Triggers validation each time a question value is changed.
61586
61600
  * - `"onComplete"` - Triggers validation when a user clicks the Complete button. If previous pages contain errors, the survey switches to the page with the first error.
61587
61601
  *
61602
+ * > The `"onValueChanged"` doesn't work with date input fields because of the way browsers process date values. In most browsers, the value is considered changed as soon as a user starts entering the date in a text input field. This means that a user may only enter the day without having the chance to enter the month and year before validation is triggered. For this reason, date input fields are validated before the survey is switched to the next page or completed.
61603
+ *
61588
61604
  * Refer to the following help topic for more information: [Data Validation](https://surveyjs.io/form-library/documentation/data-validation).
61589
61605
  * @see validationEnabled
61590
61606
  * @see validationAllowSwitchPages
@@ -65135,6 +65151,7 @@ var SurveyModel = /** @class */ (function (_super) {
65135
65151
  SurveyModel.prototype.getRootCss = function () {
65136
65152
  return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_18__["CssClassBuilder"]()
65137
65153
  .append(this.css.root)
65154
+ .append(this.css.rootProgress + "--" + this.progressBarType)
65138
65155
  .append(this.css.rootMobile, this.isMobile)
65139
65156
  .append(this.css.rootAnimationDisabled, !_settings__WEBPACK_IMPORTED_MODULE_14__["settings"].animationEnabled)
65140
65157
  .append(this.css.rootReadOnly, this.mode === "display" && !this.isDesignMode)
@@ -68037,6 +68054,15 @@ var SurveyModel = /** @class */ (function (_super) {
68037
68054
  }
68038
68055
  };
68039
68056
  SurveyModel.prototype.onScroll = function () {
68057
+ if (!!this.rootElement) {
68058
+ var topStickyContainer = this.rootElement.querySelector(".sv-components-container-center");
68059
+ if (!!topStickyContainer && topStickyContainer.getBoundingClientRect().y <= this.rootElement.getBoundingClientRect().y) {
68060
+ this.rootElement.classList && this.rootElement.classList.add("sv-root--sticky-top");
68061
+ }
68062
+ else {
68063
+ this.rootElement.classList && this.rootElement.classList.remove("sv-root--sticky-top");
68064
+ }
68065
+ }
68040
68066
  if (this.onScrollCallback) {
68041
68067
  this.onScrollCallback();
68042
68068
  }
@@ -69028,7 +69054,7 @@ var TOCModel = /** @class */ (function () {
69028
69054
  var titleElement = rootElement.querySelector(titleSelector);
69029
69055
  var titleElementHeight = titleElement ? titleElement.getBoundingClientRect().height : 0;
69030
69056
  var scrollCompensationHeight = rootElement.scrollTop > titleElementHeight ? 0 : titleElementHeight - rootElement.scrollTop;
69031
- tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 2) + "px";
69057
+ tocRootElement.style.height = (rootHeight - scrollCompensationHeight - 1) + "px";
69032
69058
  }
69033
69059
  }
69034
69060
  };
@@ -70835,7 +70861,7 @@ var CssClassBuilder = /** @class */ (function () {
70835
70861
  /*!******************************!*\
70836
70862
  !*** ./src/utils/devices.ts ***!
70837
70863
  \******************************/
70838
- /*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch */
70864
+ /*! exports provided: IsMobile, mouseInfo, IsTouch, _setIsTouch, detectMouseSupport */
70839
70865
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
70840
70866
 
70841
70867
  "use strict";
@@ -70844,6 +70870,7 @@ __webpack_require__.r(__webpack_exports__);
70844
70870
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseInfo", function() { return mouseInfo; });
70845
70871
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "IsTouch", function() { return IsTouch; });
70846
70872
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setIsTouch", function() { return _setIsTouch; });
70873
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detectMouseSupport", function() { return detectMouseSupport; });
70847
70874
  /* harmony import */ var _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../global_variables_utils */ "./src/global_variables_utils.ts");
70848
70875
 
70849
70876
  // isMobile
@@ -70873,13 +70900,20 @@ var mouseInfo = {
70873
70900
  },
70874
70901
  hasMouse: true
70875
70902
  };
70876
- var pointerMatches = (typeof matchMedia !== "undefined" && !!matchMedia && matchMedia("(pointer:fine)")) || undefined;
70877
- mouseInfo.hasMouse = !!pointerMatches && !!pointerMatches.matches;
70903
+ var matchMediaMethod = _global_variables_utils__WEBPACK_IMPORTED_MODULE_0__["DomWindowHelper"].matchMedia;
70904
+ mouseInfo.hasMouse = detectMouseSupport(matchMediaMethod);
70878
70905
  var IsTouch = mouseInfo.isTouch;
70879
70906
  //for tests
70880
70907
  function _setIsTouch(val) {
70881
70908
  IsTouch = val;
70882
70909
  }
70910
+ function detectMouseSupport(matchMedia) {
70911
+ if (!matchMedia)
70912
+ return false;
70913
+ var pointerQuery = matchMedia("(pointer:fine)");
70914
+ var hoverQuery = matchMedia("(any-hover:hover)");
70915
+ return !!pointerQuery && pointerQuery.matches || !!hoverQuery && hoverQuery.matches;
70916
+ }
70883
70917
 
70884
70918
 
70885
70919
  /***/ }),