survey-core 1.9.119 → 1.9.121

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 +113 -62
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +113 -62
  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 +2 -2
  24. package/i18n/english.js.map +1 -1
  25. package/i18n/english.min.js +2 -2
  26. package/i18n/estonian.js +1 -1
  27. package/i18n/estonian.min.js +1 -1
  28. package/i18n/finnish.js +1 -1
  29. package/i18n/finnish.min.js +1 -1
  30. package/i18n/french.js +1 -1
  31. package/i18n/french.min.js +1 -1
  32. package/i18n/georgian.js +1 -1
  33. package/i18n/georgian.min.js +1 -1
  34. package/i18n/german.js +1 -1
  35. package/i18n/german.min.js +1 -1
  36. package/i18n/greek.js +1 -1
  37. package/i18n/greek.min.js +1 -1
  38. package/i18n/hebrew.js +1 -1
  39. package/i18n/hebrew.min.js +1 -1
  40. package/i18n/hindi.js +1 -1
  41. package/i18n/hindi.min.js +1 -1
  42. package/i18n/hungarian.js +2 -2
  43. package/i18n/hungarian.js.map +1 -1
  44. package/i18n/hungarian.min.js +2 -2
  45. package/i18n/icelandic.js +1 -1
  46. package/i18n/icelandic.min.js +1 -1
  47. package/i18n/index.js +2 -2
  48. package/i18n/index.js.map +1 -1
  49. package/i18n/index.min.js +2 -2
  50. package/i18n/indonesian.js +1 -1
  51. package/i18n/indonesian.min.js +1 -1
  52. package/i18n/italian.js +1 -1
  53. package/i18n/italian.min.js +1 -1
  54. package/i18n/japanese.js +1 -1
  55. package/i18n/japanese.min.js +1 -1
  56. package/i18n/kazakh.js +1 -1
  57. package/i18n/kazakh.min.js +1 -1
  58. package/i18n/korean.js +1 -1
  59. package/i18n/korean.min.js +1 -1
  60. package/i18n/latvian.js +1 -1
  61. package/i18n/latvian.min.js +1 -1
  62. package/i18n/lithuanian.js +1 -1
  63. package/i18n/lithuanian.min.js +1 -1
  64. package/i18n/macedonian.js +1 -1
  65. package/i18n/macedonian.min.js +1 -1
  66. package/i18n/malay.js +1 -1
  67. package/i18n/malay.min.js +1 -1
  68. package/i18n/nl-BE.js +1 -1
  69. package/i18n/nl-BE.min.js +1 -1
  70. package/i18n/norwegian.js +1 -1
  71. package/i18n/norwegian.min.js +1 -1
  72. package/i18n/persian.js +1 -1
  73. package/i18n/persian.min.js +1 -1
  74. package/i18n/polish.js +1 -1
  75. package/i18n/polish.min.js +1 -1
  76. package/i18n/portuguese-br.js +1 -1
  77. package/i18n/portuguese-br.min.js +1 -1
  78. package/i18n/portuguese.js +1 -1
  79. package/i18n/portuguese.min.js +1 -1
  80. package/i18n/romanian.js +1 -1
  81. package/i18n/romanian.min.js +1 -1
  82. package/i18n/russian.js +1 -1
  83. package/i18n/russian.min.js +1 -1
  84. package/i18n/serbian.js +1 -1
  85. package/i18n/serbian.min.js +1 -1
  86. package/i18n/simplified-chinese.js +1 -1
  87. package/i18n/simplified-chinese.min.js +1 -1
  88. package/i18n/slovak.js +1 -1
  89. package/i18n/slovak.min.js +1 -1
  90. package/i18n/spanish.js +1 -1
  91. package/i18n/spanish.min.js +1 -1
  92. package/i18n/swahili.js +1 -1
  93. package/i18n/swahili.min.js +1 -1
  94. package/i18n/swedish.js +1 -1
  95. package/i18n/swedish.min.js +1 -1
  96. package/i18n/tajik.js +1 -1
  97. package/i18n/tajik.min.js +1 -1
  98. package/i18n/telugu.js +1 -1
  99. package/i18n/telugu.min.js +1 -1
  100. package/i18n/thai.js +1 -1
  101. package/i18n/thai.min.js +1 -1
  102. package/i18n/traditional-chinese.js +1 -1
  103. package/i18n/traditional-chinese.min.js +1 -1
  104. package/i18n/turkish.js +1 -1
  105. package/i18n/turkish.min.js +1 -1
  106. package/i18n/ukrainian.js +1 -1
  107. package/i18n/ukrainian.min.js +1 -1
  108. package/i18n/urdu.js +1 -1
  109. package/i18n/urdu.min.js +1 -1
  110. package/i18n/vietnamese.js +1 -1
  111. package/i18n/vietnamese.min.js +1 -1
  112. package/i18n/welsh.js +1 -1
  113. package/i18n/welsh.min.js +1 -1
  114. package/modern.css +11 -6
  115. package/modern.css.map +1 -1
  116. package/modern.fontless.css +11 -6
  117. package/modern.fontless.css.map +1 -1
  118. package/modern.fontless.min.css +2 -2
  119. package/modern.min.css +2 -2
  120. package/package.json +1 -1
  121. package/plugins/bootstrap-integration.js +1 -1
  122. package/plugins/bootstrap-integration.min.js +1 -1
  123. package/plugins/bootstrap-material-integration.js +1 -1
  124. package/plugins/bootstrap-material-integration.min.js +1 -1
  125. package/survey.core.js +555 -265
  126. package/survey.core.js.map +1 -1
  127. package/survey.core.min.js +3 -3
  128. package/survey.css +1 -1
  129. package/survey.css.map +1 -1
  130. package/survey.i18n.js +2 -2
  131. package/survey.i18n.js.map +1 -1
  132. package/survey.i18n.min.js +2 -2
  133. package/survey.min.css +1 -1
  134. package/themes/borderless-dark-panelless.js +1 -1
  135. package/themes/borderless-dark-panelless.min.js +1 -1
  136. package/themes/borderless-dark.js +1 -1
  137. package/themes/borderless-dark.min.js +1 -1
  138. package/themes/borderless-light-panelless..js +1 -1
  139. package/themes/borderless-light-panelless..min.js +1 -1
  140. package/themes/borderless-light.js +1 -1
  141. package/themes/borderless-light.min.js +1 -1
  142. package/themes/contrast-dark-panelless.js +1 -1
  143. package/themes/contrast-dark-panelless.min.js +1 -1
  144. package/themes/contrast-dark.js +1 -1
  145. package/themes/contrast-dark.min.js +1 -1
  146. package/themes/contrast-light-panelless.js +1 -1
  147. package/themes/contrast-light-panelless.min.js +1 -1
  148. package/themes/contrast-light.js +1 -1
  149. package/themes/contrast-light.min.js +1 -1
  150. package/themes/default-dark-panelless.js +1 -1
  151. package/themes/default-dark-panelless.min.js +1 -1
  152. package/themes/default-dark.js +1 -1
  153. package/themes/default-dark.min.js +1 -1
  154. package/themes/default-light-panelless.js +1 -1
  155. package/themes/default-light-panelless.min.js +1 -1
  156. package/themes/default-light.js +1 -1
  157. package/themes/default-light.min.js +1 -1
  158. package/themes/doubleborder-dark-panelless.js +1 -1
  159. package/themes/doubleborder-dark-panelless.min.js +1 -1
  160. package/themes/doubleborder-dark.js +1 -1
  161. package/themes/doubleborder-dark.min.js +1 -1
  162. package/themes/doubleborder-light-panelles.js +1 -1
  163. package/themes/doubleborder-light-panelles.min.js +1 -1
  164. package/themes/doubleborder-light.js +1 -1
  165. package/themes/doubleborder-light.min.js +1 -1
  166. package/themes/flat-dark-panelless.js +1 -1
  167. package/themes/flat-dark-panelless.min.js +1 -1
  168. package/themes/flat-dark.js +1 -1
  169. package/themes/flat-dark.min.js +1 -1
  170. package/themes/flat-light-panelless.js +1 -1
  171. package/themes/flat-light-panelless.min.js +1 -1
  172. package/themes/flat-light.js +1 -1
  173. package/themes/flat-light.min.js +1 -1
  174. package/themes/index.js +1 -1
  175. package/themes/index.min.js +1 -1
  176. package/themes/layered-dark-panelless.js +1 -1
  177. package/themes/layered-dark-panelless.min.js +1 -1
  178. package/themes/layered-dark.js +1 -1
  179. package/themes/layered-dark.min.js +1 -1
  180. package/themes/layered-light-panelless.js +1 -1
  181. package/themes/layered-light-panelless.min.js +1 -1
  182. package/themes/layered-light.js +1 -1
  183. package/themes/layered-light.min.js +1 -1
  184. package/themes/plain-dark-panelless.js +1 -1
  185. package/themes/plain-dark-panelless.min.js +1 -1
  186. package/themes/plain-dark.js +1 -1
  187. package/themes/plain-dark.min.js +1 -1
  188. package/themes/plain-light-panelless.js +1 -1
  189. package/themes/plain-light-panelless.min.js +1 -1
  190. package/themes/plain-light.js +1 -1
  191. package/themes/plain-light.min.js +1 -1
  192. package/themes/sharp-dark-panelless.js +1 -1
  193. package/themes/sharp-dark-panelless.min.js +1 -1
  194. package/themes/sharp-dark.js +1 -1
  195. package/themes/sharp-dark.min.js +1 -1
  196. package/themes/sharp-light-panelless.js +1 -1
  197. package/themes/sharp-light-panelless.min.js +1 -1
  198. package/themes/sharp-light.js +1 -1
  199. package/themes/sharp-light.min.js +1 -1
  200. package/themes/solid-dark-panelless.js +1 -1
  201. package/themes/solid-dark-panelless.min.js +1 -1
  202. package/themes/solid-dark.js +1 -1
  203. package/themes/solid-dark.min.js +1 -1
  204. package/themes/solid-light-panelless.js +1 -1
  205. package/themes/solid-light-panelless.min.js +1 -1
  206. package/themes/solid-light.js +1 -1
  207. package/themes/solid-light.min.js +1 -1
  208. package/themes/three-dimensional-dark-panelless.js +1 -1
  209. package/themes/three-dimensional-dark-panelless.min.js +1 -1
  210. package/themes/three-dimensional-dark.js +1 -1
  211. package/themes/three-dimensional-dark.min.js +1 -1
  212. package/themes/three-dimensional-light-panelless.js +1 -1
  213. package/themes/three-dimensional-light-panelless.min.js +1 -1
  214. package/themes/three-dimensional-light.js +1 -1
  215. package/themes/three-dimensional-light.min.js +1 -1
  216. package/ts3.4/typings/actions/adaptive-container.d.ts +1 -1
  217. package/ts3.4/typings/actions/container.d.ts +1 -1
  218. package/ts3.4/typings/base-interfaces.d.ts +2 -2
  219. package/ts3.4/typings/defaultCss/defaultV2Css.d.ts +1 -0
  220. package/ts3.4/typings/panel.d.ts +2 -2
  221. package/ts3.4/typings/question.d.ts +2 -2
  222. package/ts3.4/typings/question_baseselect.d.ts +1 -1
  223. package/ts3.4/typings/question_checkbox.d.ts +5 -1
  224. package/ts3.4/typings/question_custom.d.ts +1 -0
  225. package/ts3.4/typings/question_expression.d.ts +1 -1
  226. package/ts3.4/typings/question_file.d.ts +32 -27
  227. package/ts3.4/typings/question_multipletext.d.ts +12 -3
  228. package/ts3.4/typings/question_signaturepad.d.ts +13 -2
  229. package/ts3.4/typings/settings.d.ts +3 -0
  230. package/ts3.4/typings/survey-element.d.ts +1 -1
  231. package/ts3.4/typings/survey-events-api.d.ts +3 -2
  232. package/ts3.4/typings/survey.d.ts +14 -10
  233. package/ts3.4/typings/surveyTaskManager.d.ts +16 -0
  234. package/ts3.4/typings/svgbundle.d.ts +0 -1
  235. package/ts3.4/typings/utils/responsivity-manager.d.ts +4 -2
  236. package/typings/actions/adaptive-container.d.ts +1 -1
  237. package/typings/actions/container.d.ts +1 -1
  238. package/typings/base-interfaces.d.ts +2 -2
  239. package/typings/defaultCss/defaultV2Css.d.ts +1 -0
  240. package/typings/panel.d.ts +2 -2
  241. package/typings/question.d.ts +2 -2
  242. package/typings/question_baseselect.d.ts +1 -1
  243. package/typings/question_checkbox.d.ts +5 -1
  244. package/typings/question_custom.d.ts +1 -0
  245. package/typings/question_expression.d.ts +1 -1
  246. package/typings/question_file.d.ts +34 -29
  247. package/typings/question_multipletext.d.ts +13 -3
  248. package/typings/question_signaturepad.d.ts +13 -2
  249. package/typings/settings.d.ts +3 -0
  250. package/typings/survey-element.d.ts +1 -1
  251. package/typings/survey-events-api.d.ts +3 -2
  252. package/typings/survey.d.ts +14 -9
  253. package/typings/surveyTaskManager.d.ts +16 -0
  254. package/typings/svgbundle.d.ts +0 -1
  255. package/typings/utils/responsivity-manager.d.ts +4 -2
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.9.119
2
+ * surveyjs - Survey JavaScript library v1.9.121
3
3
  * Copyright (c) 2015-2023 Devsoft Baltic OÜ - http://surveyjs.io/
4
4
  * License: MIT (http://www.opensource.org/licenses/mit-license.php)
5
5
  */
@@ -1326,8 +1326,8 @@ var AdaptiveActionContainer = /** @class */ (function (_super) {
1326
1326
  this.updateItemMode(dimension, maxSize);
1327
1327
  }
1328
1328
  };
1329
- AdaptiveActionContainer.prototype.initResponsivityManager = function (container) {
1330
- this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content");
1329
+ AdaptiveActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
1330
+ this.responsivityManager = new _utils_responsivity_manager__WEBPACK_IMPORTED_MODULE_0__["ResponsivityManager"](container, this, ":scope > .sv-action:not(.sv-dots) > .sv-action__content", null, delayedUpdateFunction);
1331
1331
  };
1332
1332
  AdaptiveActionContainer.prototype.resetResponsivityManager = function () {
1333
1333
  if (!!this.responsivityManager) {
@@ -1539,7 +1539,7 @@ var ActionContainer = /** @class */ (function (_super) {
1539
1539
  this.sortItems();
1540
1540
  }
1541
1541
  };
1542
- ActionContainer.prototype.initResponsivityManager = function (container) {
1542
+ ActionContainer.prototype.initResponsivityManager = function (container, delayedUpdateFunction) {
1543
1543
  return;
1544
1544
  };
1545
1545
  ActionContainer.prototype.resetResponsivityManager = function () { };
@@ -4428,7 +4428,7 @@ var modernCss = {
4428
4428
  header: "sv-title sv-container-modern__title",
4429
4429
  headerClose: "sv-container-modern__close",
4430
4430
  bodyContainer: "sv-components-row",
4431
- body: "sv-components-column sv-components-column--expandable sv-body",
4431
+ body: "sv-body",
4432
4432
  bodyEmpty: "sv-body sv-body--empty",
4433
4433
  footer: "sv-footer sv-body__footer sv-clearfix",
4434
4434
  title: "",
@@ -4883,7 +4883,7 @@ var defaultStandardCss = {
4883
4883
  container: "sv_container",
4884
4884
  header: "sv_header",
4885
4885
  bodyContainer: "sv-components-row",
4886
- body: "sv-components-column sv-components-column--expandable sv_body",
4886
+ body: "sv_body",
4887
4887
  bodyEmpty: "sv_body sv_body_empty",
4888
4888
  footer: "sv_nav",
4889
4889
  title: "",
@@ -5323,7 +5323,7 @@ var defaultV2Css = {
5323
5323
  container: "sd-container-modern",
5324
5324
  header: "sd-title sd-container-modern__title",
5325
5325
  bodyContainer: "sv-components-row",
5326
- body: "sv-components-column sv-components-column--expandable sd-body",
5326
+ body: "sd-body",
5327
5327
  bodyWithTimer: "sd-body--with-timer",
5328
5328
  clockTimerRoot: "sd-timer",
5329
5329
  clockTimerRootTop: "sd-timer--top",
@@ -5930,7 +5930,8 @@ var defaultV2Css = {
5930
5930
  canvas: "sjs_sp_canvas sd-signaturepad__canvas",
5931
5931
  backgroundImage: "sjs_sp__background-image sd-signaturepad__background-image",
5932
5932
  clearButton: "sjs_sp_clear sd-context-btn sd-context-btn--negative sd-signaturepad__clear",
5933
- clearButtonIconId: "icon-clear"
5933
+ clearButtonIconId: "icon-clear",
5934
+ loadingIndicator: "sd-signaturepad__loading-indicator"
5934
5935
  },
5935
5936
  saveData: {
5936
5937
  root: "sv-save-data_root",
@@ -8254,8 +8255,13 @@ var DropdownListModel = /** @class */ (function (_super) {
8254
8255
  this.popupModel.isVisible = false;
8255
8256
  }
8256
8257
  else if (!this.popupModel.isVisible && (event.keyCode === 13 || event.keyCode === 32)) {
8257
- this.popupModel.toggleVisibility();
8258
- this.changeSelectionWithKeyboard(false);
8258
+ if (event.keyCode === 32) {
8259
+ this.popupModel.toggleVisibility();
8260
+ this.changeSelectionWithKeyboard(false);
8261
+ }
8262
+ if (event.keyCode === 13) {
8263
+ this.question.survey.questionEditFinishCallback(this.question, event);
8264
+ }
8259
8265
  event.preventDefault();
8260
8266
  event.stopPropagation();
8261
8267
  }
@@ -8263,12 +8269,10 @@ var DropdownListModel = /** @class */ (function (_super) {
8263
8269
  if (event.keyCode === 13 && this.question.searchEnabled && !this.inputString && this.question instanceof _question_dropdown__WEBPACK_IMPORTED_MODULE_5__["QuestionDropdownModel"] && !this._markdownMode && this.question.value) {
8264
8270
  this._popupModel.isVisible = false;
8265
8271
  this.onClear(event);
8266
- this.question.survey.questionEditFinishCallback(this.question, event);
8267
8272
  }
8268
8273
  else {
8269
8274
  this.listModel.selectFocusedItem();
8270
8275
  this.onFocus(event);
8271
- this.question.survey.questionEditFinishCallback(this.question, event);
8272
8276
  }
8273
8277
  event.preventDefault();
8274
8278
  event.stopPropagation();
@@ -9308,8 +9312,8 @@ __webpack_require__.r(__webpack_exports__);
9308
9312
  //import "../../modern.scss";
9309
9313
  var Version;
9310
9314
  var ReleaseDate;
9311
- Version = "" + "1.9.119";
9312
- ReleaseDate = "" + "2023-11-28";
9315
+ Version = "" + "1.9.121";
9316
+ ReleaseDate = "" + "2023-12-12";
9313
9317
  function checkLibraryVersion(ver, libraryName) {
9314
9318
  if (Version != ver) {
9315
9319
  var str = "survey-core has version '" + Version + "' and " + libraryName
@@ -20250,7 +20254,7 @@ var englishStrings = {
20250
20254
  panelDynamicProgressText: "{0} of {1}",
20251
20255
  panelDynamicTabTextFormat: "Panel {panelIndex}",
20252
20256
  questionsProgressText: "Answered {0}/{1} questions",
20253
- emptySurvey: "The survey doesn't contain visible pages or questions.",
20257
+ emptySurvey: "The survey doesn't contain any visible elements.",
20254
20258
  completingSurvey: "Thank you for completing the survey",
20255
20259
  completingSurveyBefore: "Our records show that you have already completed this survey.",
20256
20260
  loadingSurvey: "Loading Survey...",
@@ -22754,11 +22758,22 @@ var PanelModelBase = /** @class */ (function (_super) {
22754
22758
  }
22755
22759
  }
22756
22760
  };
22757
- PanelModelBase.prototype.notifyStateChanged = function () {
22758
- _super.prototype.notifyStateChanged.call(this);
22761
+ PanelModelBase.prototype.notifyStateChanged = function (prevState) {
22762
+ var _this = this;
22763
+ _super.prototype.notifyStateChanged.call(this, prevState);
22759
22764
  if (this.isCollapsed) {
22760
22765
  this.questions.forEach(function (q) { return q.onHidingContent(); });
22761
22766
  }
22767
+ if (this.survey != null && !this.isLoadingFromJson && this.isExpanded && prevState === "collapsed") {
22768
+ var q_1 = this.getFirstQuestionToFocus(false);
22769
+ if (!!q_1) {
22770
+ setTimeout(function () {
22771
+ if (!_this.isDisposed && !!_this.survey) {
22772
+ _this.survey.scrollElementToTop(q_1, q_1, null, q_1.inputId, false);
22773
+ }
22774
+ }, 15);
22775
+ }
22776
+ }
22762
22777
  };
22763
22778
  Object.defineProperty(PanelModelBase.prototype, "isVisible", {
22764
22779
  /**
@@ -23272,11 +23287,11 @@ var PanelModel = /** @class */ (function (_super) {
23272
23287
  PanelModel.prototype.setNo = function (visibleIndex) {
23273
23288
  this.setPropertyValue("no", _helpers__WEBPACK_IMPORTED_MODULE_1__["Helpers"].getNumberByIndex(this.visibleIndex, this.getStartIndex()));
23274
23289
  };
23275
- PanelModel.prototype.notifyStateChanged = function () {
23290
+ PanelModel.prototype.notifyStateChanged = function (prevState) {
23276
23291
  if (!this.isLoadingFromJson) {
23277
23292
  this.locTitle.strChanged();
23278
23293
  }
23279
- _super.prototype.notifyStateChanged.call(this);
23294
+ _super.prototype.notifyStateChanged.call(this, prevState);
23280
23295
  };
23281
23296
  PanelModel.prototype.createLocTitleProperty = function () {
23282
23297
  var _this = this;
@@ -23655,7 +23670,7 @@ var PopupDropdownViewModel = /** @class */ (function (_super) {
23655
23670
  };
23656
23671
  _this.resizeWindowCallback = function () {
23657
23672
  if (!_this.isOverlay) {
23658
- _this.updatePosition(true, _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue3");
23673
+ _this.updatePosition(true, _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform === "vue3" || _survey__WEBPACK_IMPORTED_MODULE_5__["SurveyModel"].platform == "react");
23659
23674
  }
23660
23675
  };
23661
23676
  _this.clientY = 0;
@@ -25306,8 +25321,8 @@ var Question = /** @class */ (function (_super) {
25306
25321
  this.errors = [];
25307
25322
  }
25308
25323
  };
25309
- Question.prototype.notifyStateChanged = function () {
25310
- _super.prototype.notifyStateChanged.call(this);
25324
+ Question.prototype.notifyStateChanged = function (prevState) {
25325
+ _super.prototype.notifyStateChanged.call(this, prevState);
25311
25326
  if (this.isCollapsed) {
25312
25327
  this.onHidingContent();
25313
25328
  }
@@ -27646,8 +27661,9 @@ var Question = /** @class */ (function (_super) {
27646
27661
  return makeNameValid(name);
27647
27662
  };
27648
27663
  //IQuestion
27649
- Question.prototype.updateValueFromSurvey = function (newValue) {
27664
+ Question.prototype.updateValueFromSurvey = function (newValue, clearData) {
27650
27665
  var _this = this;
27666
+ if (clearData === void 0) { clearData = false; }
27651
27667
  newValue = this.getUnbindValue(newValue);
27652
27668
  if (!!this.valueFromDataCallback) {
27653
27669
  newValue = this.valueFromDataCallback(newValue);
@@ -27662,6 +27678,9 @@ var Question = /** @class */ (function (_super) {
27662
27678
  }
27663
27679
  else {
27664
27680
  this.updateValueFromSurveyCore(newValue, this.data !== this.getSurvey());
27681
+ if (clearData && isEmpty) {
27682
+ this.isValueChangedDirectly = false;
27683
+ }
27665
27684
  }
27666
27685
  this.updateDependedQuestions();
27667
27686
  this.updateIsAnswered();
@@ -29808,7 +29827,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29808
29827
  this.onVisibleChoicesChanged();
29809
29828
  }
29810
29829
  };
29811
- QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue) {
29830
+ QuestionSelectBase.prototype.updateValueFromSurvey = function (newValue, clearData) {
29812
29831
  var newComment = "";
29813
29832
  if (this.hasOther &&
29814
29833
  !this.isRunningChoices &&
@@ -29822,7 +29841,7 @@ var QuestionSelectBase = /** @class */ (function (_super) {
29822
29841
  newComment = this.data.getComment(this.getValueName());
29823
29842
  }
29824
29843
  }
29825
- _super.prototype.updateValueFromSurvey.call(this, newValue);
29844
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
29826
29845
  if ((this.isRunningChoices || this.choicesByUrl.isRunning) && !this.isEmpty()) {
29827
29846
  this.cachedValueForUrlRequests = this.value;
29828
29847
  }
@@ -31389,23 +31408,25 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31389
31408
  * @see showSelectAllItem
31390
31409
  */
31391
31410
  get: function () {
31411
+ if (this.isItemSelected(this.noneItem))
31412
+ return false;
31413
+ var items = this.getVisibleEnableItems();
31414
+ if (items.length === 0)
31415
+ return false;
31392
31416
  var val = this.value;
31393
- if (!val || !Array.isArray(val))
31417
+ if (!val || !Array.isArray(val) || val.length === 0)
31394
31418
  return false;
31395
- if (this.isItemSelected(this.noneItem))
31419
+ if (val.length < items.length)
31396
31420
  return false;
31397
- var allItemCount = this.visibleChoices.length;
31398
- var order = _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].specialChoicesOrder;
31399
- if (this.hasOther)
31400
- allItemCount -= order.otherItem.length;
31401
- if (this.hasNone)
31402
- allItemCount -= order.noneItem.length;
31403
- if (this.hasSelectAll)
31404
- allItemCount -= order.selectAllItem.length;
31405
- var selectedCount = val.length;
31406
- if (this.isOtherSelected)
31407
- selectedCount--;
31408
- return selectedCount === allItemCount;
31421
+ var rVal = [];
31422
+ for (var i = 0; i < val.length; i++) {
31423
+ rVal.push(this.getRealValue(val[i]));
31424
+ }
31425
+ for (var i = 0; i < items.length; i++) {
31426
+ if (rVal.indexOf(items[i].value) < 0)
31427
+ return false;
31428
+ }
31429
+ return true;
31409
31430
  },
31410
31431
  set: function (val) {
31411
31432
  if (val) {
@@ -31429,13 +31450,9 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31429
31450
  */
31430
31451
  QuestionCheckboxModel.prototype.selectAll = function () {
31431
31452
  var val = [];
31432
- for (var i = 0; i < this.visibleChoices.length; i++) {
31433
- var item = this.visibleChoices[i];
31434
- if (item === this.noneItem ||
31435
- item === this.otherItem ||
31436
- item === this.selectAllItem)
31437
- continue;
31438
- val.push(item.value);
31453
+ var items = this.getVisibleEnableItems();
31454
+ for (var i = 0; i < items.length; i++) {
31455
+ val.push(items[i].value);
31439
31456
  }
31440
31457
  this.renderedValue = val;
31441
31458
  };
@@ -31564,24 +31581,51 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31564
31581
  errors.push(minError);
31565
31582
  }
31566
31583
  };
31584
+ QuestionCheckboxModel.prototype.onVisibleChoicesChanged = function () {
31585
+ _super.prototype.onVisibleChoicesChanged.call(this);
31586
+ this.updateSelectAllItemProps();
31587
+ };
31567
31588
  QuestionCheckboxModel.prototype.onEnableItemCallBack = function (item) {
31568
31589
  if (!this.shouldCheckMaxSelectedChoices())
31569
31590
  return true;
31570
31591
  return this.isItemSelected(item);
31571
31592
  };
31572
31593
  QuestionCheckboxModel.prototype.onAfterRunItemsEnableCondition = function () {
31594
+ this.updateSelectAllItemProps();
31573
31595
  if (this.maxSelectedChoices < 1) {
31574
- this.selectAllItem.setIsEnabled(true);
31575
31596
  this.otherItem.setIsEnabled(true);
31576
31597
  return;
31577
31598
  }
31578
- if (this.hasSelectAll) {
31579
- this.selectAllItem.setIsEnabled(this.maxSelectedChoices >= this.activeChoices.length);
31580
- }
31581
31599
  if (this.hasOther) {
31582
31600
  this.otherItem.setIsEnabled(!this.shouldCheckMaxSelectedChoices() || this.isOtherSelected);
31583
31601
  }
31584
31602
  };
31603
+ QuestionCheckboxModel.prototype.updateSelectAllItemProps = function () {
31604
+ if (!this.hasSelectAll)
31605
+ return;
31606
+ this.selectAllItem.setIsEnabled(this.getSelectAllEnabled());
31607
+ };
31608
+ QuestionCheckboxModel.prototype.getSelectAllEnabled = function () {
31609
+ if (!this.hasSelectAll)
31610
+ return true;
31611
+ var items = this.activeChoices;
31612
+ var visCount = this.getVisibleEnableItems().length;
31613
+ var max = this.maxSelectedChoices;
31614
+ if (max > 0 && max < visCount)
31615
+ return false;
31616
+ return visCount > 0;
31617
+ };
31618
+ QuestionCheckboxModel.prototype.getVisibleEnableItems = function () {
31619
+ var res = new Array();
31620
+ var items = this.activeChoices;
31621
+ for (var i = 0; i < items.length; i++) {
31622
+ var item = items[i];
31623
+ if (item.isEnabled && item.isVisible) {
31624
+ res.push(item);
31625
+ }
31626
+ }
31627
+ return res;
31628
+ };
31585
31629
  QuestionCheckboxModel.prototype.shouldCheckMaxSelectedChoices = function () {
31586
31630
  if (this.maxSelectedChoices < 1)
31587
31631
  return false;
@@ -31604,8 +31648,8 @@ var QuestionCheckboxModel = /** @class */ (function (_super) {
31604
31648
  .append(this.cssClasses.itemSelectAll, options.isSelectAllItem)
31605
31649
  .toString();
31606
31650
  };
31607
- QuestionCheckboxModel.prototype.updateValueFromSurvey = function (newValue) {
31608
- _super.prototype.updateValueFromSurvey.call(this, newValue);
31651
+ QuestionCheckboxModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
31652
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
31609
31653
  this.invisibleOldValues = {};
31610
31654
  };
31611
31655
  QuestionCheckboxModel.prototype.setDefaultValue = function () {
@@ -32406,6 +32450,12 @@ var QuestionCustomModelBase = /** @class */ (function (_super) {
32406
32450
  this.getElement().locStrsChanged();
32407
32451
  }
32408
32452
  };
32453
+ QuestionCustomModelBase.prototype.localeChanged = function () {
32454
+ _super.prototype.locStrsChanged.call(this);
32455
+ if (!!this.getElement()) {
32456
+ this.getElement().localeChanged();
32457
+ }
32458
+ };
32409
32459
  QuestionCustomModelBase.prototype.createWrapper = function () { };
32410
32460
  QuestionCustomModelBase.prototype.onPropertyValueChanged = function (name, oldValue, newValue) {
32411
32461
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
@@ -33490,7 +33540,7 @@ var QuestionDropdownModel = /** @class */ (function (_super) {
33490
33540
  };
33491
33541
  QuestionDropdownModel.prototype.onVisibleChoicesChanged = function () {
33492
33542
  _super.prototype.onVisibleChoicesChanged.call(this);
33493
- if (this.popupModel) {
33543
+ if (!this.isLoadingFromJson && this.popupModel) {
33494
33544
  this.dropdownListModel.updateItems();
33495
33545
  }
33496
33546
  };
@@ -33823,8 +33873,8 @@ var QuestionExpressionModel = /** @class */ (function (_super) {
33823
33873
  QuestionExpressionModel.prototype.onValueChanged = function () {
33824
33874
  this.updateFormatedValue();
33825
33875
  };
33826
- QuestionExpressionModel.prototype.updateValueFromSurvey = function (newValue) {
33827
- _super.prototype.updateValueFromSurvey.call(this, newValue);
33876
+ QuestionExpressionModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
33877
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
33828
33878
  this.updateFormatedValue();
33829
33879
  };
33830
33880
  QuestionExpressionModel.prototype.getDisplayValueCore = function (keysAsText, value) {
@@ -34178,11 +34228,13 @@ _questionfactory__WEBPACK_IMPORTED_MODULE_3__["QuestionFactory"].Instance.regist
34178
34228
  /*!******************************!*\
34179
34229
  !*** ./src/question_file.ts ***!
34180
34230
  \******************************/
34181
- /*! exports provided: QuestionFileModel, FileLoader */
34231
+ /*! exports provided: dataUrl2File, QuestionFileModelBase, QuestionFileModel, FileLoader */
34182
34232
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
34183
34233
 
34184
34234
  "use strict";
34185
34235
  __webpack_require__.r(__webpack_exports__);
34236
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataUrl2File", function() { return dataUrl2File; });
34237
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModelBase", function() { return QuestionFileModelBase; });
34186
34238
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return QuestionFileModel; });
34187
34239
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FileLoader", function() { return FileLoader; });
34188
34240
  /* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./question */ "./src/question.ts");
@@ -34231,17 +34283,16 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
34231
34283
 
34232
34284
 
34233
34285
 
34234
- /**
34235
- * A class that describes the File Upload question type.
34236
- *
34237
- * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
34238
- */
34239
- var QuestionFileModel = /** @class */ (function (_super) {
34240
- __extends(QuestionFileModel, _super);
34241
- function QuestionFileModel(name) {
34242
- var _this = _super.call(this, name) || this;
34286
+ function dataUrl2File(dataUrl, fileName, type) {
34287
+ var str = atob(dataUrl.split(",")[1]);
34288
+ var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
34289
+ return new File([buffer], fileName, { type: type });
34290
+ }
34291
+ var QuestionFileModelBase = /** @class */ (function (_super) {
34292
+ __extends(QuestionFileModelBase, _super);
34293
+ function QuestionFileModelBase() {
34294
+ var _this = _super !== null && _super.apply(this, arguments) || this;
34243
34295
  _this.isUploading = false;
34244
- _this.isDragging = false;
34245
34296
  /**
34246
34297
  * An event that is raised after the upload state has changed.
34247
34298
  *
@@ -34254,6 +34305,124 @@ var QuestionFileModel = /** @class */ (function (_super) {
34254
34305
  */
34255
34306
  _this.onUploadStateChanged = _this.addEvent();
34256
34307
  _this.onStateChanged = _this.addEvent();
34308
+ return _this;
34309
+ }
34310
+ QuestionFileModelBase.prototype.stateChanged = function (state) {
34311
+ if (this.currentState == state) {
34312
+ return;
34313
+ }
34314
+ if (state === "loading") {
34315
+ this.isUploading = true;
34316
+ }
34317
+ if (state === "loaded") {
34318
+ this.isUploading = false;
34319
+ }
34320
+ if (state === "error") {
34321
+ this.isUploading = false;
34322
+ }
34323
+ this.currentState = state;
34324
+ this.onStateChanged.fire(this, { state: state });
34325
+ this.onUploadStateChanged.fire(this, { state: state });
34326
+ };
34327
+ Object.defineProperty(QuestionFileModelBase.prototype, "showLoadingIndicator", {
34328
+ get: function () {
34329
+ return this.isUploading && this.isDefaultV2Theme;
34330
+ },
34331
+ enumerable: false,
34332
+ configurable: true
34333
+ });
34334
+ Object.defineProperty(QuestionFileModelBase.prototype, "storeDataAsText", {
34335
+ /**
34336
+ * Specifies whether to store file or signature content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
34337
+ *
34338
+ * If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
34339
+ */
34340
+ get: function () {
34341
+ return this.getPropertyValue("storeDataAsText");
34342
+ },
34343
+ set: function (val) {
34344
+ this.setPropertyValue("storeDataAsText", val);
34345
+ },
34346
+ enumerable: false,
34347
+ configurable: true
34348
+ });
34349
+ Object.defineProperty(QuestionFileModelBase.prototype, "waitForUpload", {
34350
+ /**
34351
+ * Enable this property if you want to wait until files are uploaded to complete the survey.
34352
+ *
34353
+ * Default value: `false`
34354
+ */
34355
+ get: function () {
34356
+ return this.getPropertyValue("waitForUpload");
34357
+ },
34358
+ set: function (val) {
34359
+ this.setPropertyValue("waitForUpload", val);
34360
+ },
34361
+ enumerable: false,
34362
+ configurable: true
34363
+ });
34364
+ QuestionFileModelBase.prototype.clearValue = function () {
34365
+ this.clearOnDeletingContainer();
34366
+ _super.prototype.clearValue.call(this);
34367
+ };
34368
+ QuestionFileModelBase.prototype.clearOnDeletingContainer = function () {
34369
+ if (!this.survey)
34370
+ return;
34371
+ this.survey.clearFiles(this, this.name, this.value, null, function () { });
34372
+ };
34373
+ QuestionFileModelBase.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
34374
+ _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
34375
+ if (this.isUploading && this.waitForUpload) {
34376
+ errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](this.getLocalizationString("uploadingFile"), this));
34377
+ }
34378
+ };
34379
+ QuestionFileModelBase.prototype.uploadFiles = function (files) {
34380
+ var _this = this;
34381
+ if (this.survey) {
34382
+ this.stateChanged("loading");
34383
+ this.survey.uploadFiles(this, this.name, files, function (arg1, arg2) {
34384
+ if (Array.isArray(arg1)) {
34385
+ _this.setValueFromResult(arg1);
34386
+ if (Array.isArray(arg2)) {
34387
+ arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
34388
+ _this.stateChanged("error");
34389
+ }
34390
+ }
34391
+ if (arg1 === "success" && Array.isArray(arg2)) {
34392
+ _this.setValueFromResult(arg2);
34393
+ }
34394
+ if (arg1 === "error") {
34395
+ if (typeof (arg2) === "string") {
34396
+ _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](arg2, _this));
34397
+ }
34398
+ if (Array.isArray(arg2) && arg2.length > 0) {
34399
+ arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
34400
+ }
34401
+ _this.stateChanged("error");
34402
+ }
34403
+ _this.stateChanged("loaded");
34404
+ });
34405
+ }
34406
+ };
34407
+ __decorate([
34408
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
34409
+ ], QuestionFileModelBase.prototype, "isUploading", void 0);
34410
+ __decorate([
34411
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "empty" })
34412
+ ], QuestionFileModelBase.prototype, "currentState", void 0);
34413
+ return QuestionFileModelBase;
34414
+ }(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));
34415
+
34416
+ /**
34417
+ * A class that describes the File Upload question type.
34418
+ *
34419
+ * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
34420
+ */
34421
+ var QuestionFileModel = /** @class */ (function (_super) {
34422
+ __extends(QuestionFileModel, _super);
34423
+ function QuestionFileModel(name) {
34424
+ var _this = _super.call(this, name) || this;
34425
+ _this.isDragging = false;
34257
34426
  _this.fileNavigator = new _actions_container__WEBPACK_IMPORTED_MODULE_7__["ActionContainer"]();
34258
34427
  _this.canFlipCameraValue = undefined;
34259
34428
  _this.prevPreviewLength = 0;
@@ -34558,15 +34727,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
34558
34727
  QuestionFileModel.prototype.getType = function () {
34559
34728
  return "file";
34560
34729
  };
34561
- QuestionFileModel.prototype.clearValue = function () {
34562
- this.clearOnDeletingContainer();
34563
- _super.prototype.clearValue.call(this);
34564
- };
34565
- QuestionFileModel.prototype.clearOnDeletingContainer = function () {
34566
- if (!this.survey)
34567
- return;
34568
- this.survey.clearFiles(this, this.name, this.value, null, function () { });
34569
- };
34570
34730
  Object.defineProperty(QuestionFileModel.prototype, "showPreview", {
34571
34731
  /**
34572
34732
  * Disable this property only to implement a custom preview.
@@ -34637,36 +34797,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
34637
34797
  enumerable: false,
34638
34798
  configurable: true
34639
34799
  });
34640
- Object.defineProperty(QuestionFileModel.prototype, "storeDataAsText", {
34641
- /**
34642
- * Specifies whether to store file content as text in `SurveyModel`'s [`data`](https://surveyjs.io/form-library/documentation/surveymodel#data) property.
34643
- *
34644
- * If you disable this property, implement `SurveyModel`'s [`onUploadFiles`](https://surveyjs.io/form-library/documentation/surveymodel#onUploadFiles) event handler to specify how to store file content.
34645
- */
34646
- get: function () {
34647
- return this.getPropertyValue("storeDataAsText");
34648
- },
34649
- set: function (val) {
34650
- this.setPropertyValue("storeDataAsText", val);
34651
- },
34652
- enumerable: false,
34653
- configurable: true
34654
- });
34655
- Object.defineProperty(QuestionFileModel.prototype, "waitForUpload", {
34656
- /**
34657
- * Enable this property if you want to wait until files are uploaded to complete the survey.
34658
- *
34659
- * Default value: `false`
34660
- */
34661
- get: function () {
34662
- return this.getPropertyValue("waitForUpload");
34663
- },
34664
- set: function (val) {
34665
- this.setPropertyValue("waitForUpload", val);
34666
- },
34667
- enumerable: false,
34668
- configurable: true
34669
- });
34670
34800
  Object.defineProperty(QuestionFileModel.prototype, "allowImagesPreview", {
34671
34801
  /**
34672
34802
  * Specifies whether to show a preview of image files.
@@ -34854,13 +34984,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
34854
34984
  enumerable: false,
34855
34985
  configurable: true
34856
34986
  });
34857
- Object.defineProperty(QuestionFileModel.prototype, "showLoadingIndicator", {
34858
- get: function () {
34859
- return this.isUploading && this.isDefaultV2Theme;
34860
- },
34861
- enumerable: false,
34862
- configurable: true
34863
- });
34864
34987
  Object.defineProperty(QuestionFileModel.prototype, "allowShowPreview", {
34865
34988
  get: function () {
34866
34989
  var isShowLoadingIndicator = this.showLoadingIndicator;
@@ -34929,6 +35052,15 @@ var QuestionFileModel = /** @class */ (function (_super) {
34929
35052
  }
34930
35053
  });
34931
35054
  };
35055
+ QuestionFileModel.prototype.setValueFromResult = function (arg) {
35056
+ this.value = (this.value || []).concat(arg.map(function (r) {
35057
+ return {
35058
+ name: r.file.name,
35059
+ type: r.file.type,
35060
+ content: r.content,
35061
+ };
35062
+ }));
35063
+ };
34932
35064
  /**
34933
35065
  * Loads multiple files into the question.
34934
35066
  * @param files An array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects.
@@ -34960,42 +35092,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
34960
35092
  });
34961
35093
  }
34962
35094
  else {
34963
- if (_this.survey) {
34964
- _this.survey.uploadFiles(_this, _this.name, files, function (arg1, arg2) {
34965
- if (Array.isArray(arg1)) {
34966
- _this.value = (_this.value || []).concat(arg1.map(function (r) {
34967
- return {
34968
- name: r.file.name,
34969
- type: r.file.type,
34970
- content: r.content,
34971
- };
34972
- }));
34973
- if (Array.isArray(arg2)) {
34974
- arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
34975
- _this.stateChanged("error");
34976
- }
34977
- }
34978
- if (arg1 === "success" && Array.isArray(arg2)) {
34979
- _this.value = (_this.value || []).concat(arg2.map(function (r) {
34980
- return {
34981
- name: r.file.name,
34982
- type: r.file.type,
34983
- content: r.content,
34984
- };
34985
- }));
34986
- }
34987
- if (arg1 === "error") {
34988
- if (typeof (arg2) === "string") {
34989
- _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](arg2, _this));
34990
- }
34991
- if (Array.isArray(arg2) && arg2.length > 0) {
34992
- arg2.forEach(function (error) { return _this.errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](error, _this)); });
34993
- }
34994
- _this.stateChanged("error");
34995
- }
34996
- _this.stateChanged("loaded");
34997
- });
34998
- }
35095
+ _this.uploadFiles(files);
34999
35096
  }
35000
35097
  };
35001
35098
  if (this.allowMultiple) {
@@ -35070,29 +35167,6 @@ var QuestionFileModel = /** @class */ (function (_super) {
35070
35167
  QuestionFileModel.prototype.getIsQuestionReady = function () {
35071
35168
  return _super.prototype.getIsQuestionReady.call(this) && !this.isFileLoading;
35072
35169
  };
35073
- QuestionFileModel.prototype.onCheckForErrors = function (errors, isOnValueChanged) {
35074
- _super.prototype.onCheckForErrors.call(this, errors, isOnValueChanged);
35075
- if (this.isUploading && this.waitForUpload) {
35076
- errors.push(new _error__WEBPACK_IMPORTED_MODULE_4__["UploadingFileError"](this.getLocalizationString("uploadingFile"), this));
35077
- }
35078
- };
35079
- QuestionFileModel.prototype.stateChanged = function (state) {
35080
- if (this.currentState == state) {
35081
- return;
35082
- }
35083
- if (state === "loading") {
35084
- this.isUploading = true;
35085
- }
35086
- if (state === "loaded") {
35087
- this.isUploading = false;
35088
- }
35089
- if (state === "error") {
35090
- this.isUploading = false;
35091
- }
35092
- this.currentState = state;
35093
- this.onStateChanged.fire(this, { state: state });
35094
- this.onUploadStateChanged.fire(this, { state: state });
35095
- };
35096
35170
  QuestionFileModel.prototype.allFilesOk = function (files) {
35097
35171
  var _this = this;
35098
35172
  var errorLength = this.errors ? this.errors.length : 0;
@@ -35302,18 +35376,12 @@ var QuestionFileModel = /** @class */ (function (_super) {
35302
35376
  this.closeVideoStream();
35303
35377
  _super.prototype.dispose.call(this);
35304
35378
  };
35305
- __decorate([
35306
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
35307
- ], QuestionFileModel.prototype, "isUploading", void 0);
35308
35379
  __decorate([
35309
35380
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
35310
35381
  ], QuestionFileModel.prototype, "isDragging", void 0);
35311
35382
  __decorate([
35312
35383
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["propertyArray"])({})
35313
35384
  ], QuestionFileModel.prototype, "previewValue", void 0);
35314
- __decorate([
35315
- Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: "empty" })
35316
- ], QuestionFileModel.prototype, "currentState", void 0);
35317
35385
  __decorate([
35318
35386
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: 0 })
35319
35387
  ], QuestionFileModel.prototype, "indexToShow", void 0);
@@ -35378,7 +35446,7 @@ var QuestionFileModel = /** @class */ (function (_super) {
35378
35446
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])()
35379
35447
  ], QuestionFileModel.prototype, "locRenderedPlaceholderValue", void 0);
35380
35448
  return QuestionFileModel;
35381
- }(_question__WEBPACK_IMPORTED_MODULE_0__["Question"]));
35449
+ }(QuestionFileModelBase));
35382
35450
 
35383
35451
  _jsonobject__WEBPACK_IMPORTED_MODULE_1__["Serializer"].addClass("file", [
35384
35452
  { name: "showCommentArea:switch", layout: "row", visible: true, category: "general" },
@@ -37905,8 +37973,9 @@ var MatrixDropdownRowModelBase = /** @class */ (function () {
37905
37973
  if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value)) {
37906
37974
  for (var i = 0; i < questions.length; i++) {
37907
37975
  var key = questions[i].getValueName();
37908
- if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(value[key])) {
37909
- questions[i].value = value[key];
37976
+ var val = !!this.editingObj ? _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].getObjPropertyValue(this.editingObj, key) : value[key];
37977
+ if (!_helpers__WEBPACK_IMPORTED_MODULE_2__["Helpers"].isValueEmpty(val)) {
37978
+ questions[i].value = val;
37910
37979
  }
37911
37980
  }
37912
37981
  }
@@ -39437,6 +39506,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
39437
39506
  var questionPlainData = _super.prototype.getPlainData.call(this, options);
39438
39507
  if (!!questionPlainData) {
39439
39508
  questionPlainData.isNode = true;
39509
+ var prevData = Array.isArray(questionPlainData.data) ? [].concat(questionPlainData.data) : [];
39440
39510
  questionPlainData.data = this.visibleRows.map(function (row) {
39441
39511
  var rowDataItem = {
39442
39512
  name: row.dataName,
@@ -39458,6 +39528,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
39458
39528
  });
39459
39529
  return rowDataItem;
39460
39530
  });
39531
+ questionPlainData.data = questionPlainData.data.concat(prevData);
39461
39532
  }
39462
39533
  return questionPlainData;
39463
39534
  };
@@ -39869,7 +39940,7 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
39869
39940
  columnValue = newRowValue[columnName];
39870
39941
  }
39871
39942
  this.isRowChanging = true;
39872
- rowObj[columnName] = columnValue;
39943
+ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].setObjPropertyValue(rowObj, columnName, columnValue);
39873
39944
  this.isRowChanging = false;
39874
39945
  this.onCellValueChanged(row, columnName, rowObj);
39875
39946
  }
@@ -43964,7 +44035,8 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
43964
44035
  * }
43965
44036
  * ```
43966
44037
  *
43967
- * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [onTextMarkdown](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
44038
+ * To enable Markdown support for the `title` property, implement Markdown-to-HTML conversion in the [`onTextMarkdown`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTextMarkdown) event handler. For an example, refer to the following demo: [Convert Markdown to HTML with Showdown](https://surveyjs.io/form-library/examples/edit-survey-questions-markdown/).
44039
+ * @see itemTitleWidth
43968
44040
  * @see addItem
43969
44041
  */
43970
44042
  get: function () {
@@ -43978,8 +44050,8 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
43978
44050
  });
43979
44051
  /**
43980
44052
  * Adds a new input item.
43981
- * @param name An item name
43982
- * @param title (Optional) An item title
44053
+ * @param name An item name.
44054
+ * @param title (Optional) An item title.
43983
44055
  * @see items
43984
44056
  */
43985
44057
  QuestionMultipleTextModel.prototype.addItem = function (name, title) {
@@ -44113,6 +44185,23 @@ var QuestionMultipleTextModel = /** @class */ (function (_super) {
44113
44185
  enumerable: false,
44114
44186
  configurable: true
44115
44187
  });
44188
+ Object.defineProperty(QuestionMultipleTextModel.prototype, "itemTitleWidth", {
44189
+ /**
44190
+ * Specifies a uniform width for all text box titles. Accepts CSS values.
44191
+ *
44192
+ * Default value: `""` (the width of each title depends on the title length)
44193
+ * @see items
44194
+ * @see itemErrorLocation
44195
+ */
44196
+ get: function () {
44197
+ return this.getPropertyValue("itemTitleWidth") || "";
44198
+ },
44199
+ set: function (val) {
44200
+ this.setPropertyValue("itemTitleWidth", val);
44201
+ },
44202
+ enumerable: false,
44203
+ configurable: true
44204
+ });
44116
44205
  QuestionMultipleTextModel.prototype.onRowCreated = function (row) {
44117
44206
  return row;
44118
44207
  };
@@ -44467,7 +44556,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_4__["Serializer"].addClass("multipletext",
44467
44556
  { name: "!items:textitems", className: "multipletextitem", isArray: true },
44468
44557
  { name: "itemSize:number", minValue: 0 },
44469
44558
  { name: "colCount:number", default: 1, choices: [1, 2, 3, 4, 5] },
44470
- { name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false }
44559
+ { name: "itemErrorLocation", default: "default", choices: ["default", "top", "bottom"], visible: false },
44560
+ { name: "itemTitleWidth", category: "layout" }
44471
44561
  ], function () {
44472
44562
  return new QuestionMultipleTextModel("");
44473
44563
  }, "question");
@@ -46759,6 +46849,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46759
46849
  var questionPlainData = _super.prototype.getPlainData.call(this, options);
46760
46850
  if (!!questionPlainData) {
46761
46851
  questionPlainData.isNode = true;
46852
+ var prevData = Array.isArray(questionPlainData.data) ? [].concat(questionPlainData.data) : [];
46762
46853
  questionPlainData.data = this.panels.map(function (panel, index) {
46763
46854
  var panelDataItem = {
46764
46855
  name: panel.name || index,
@@ -46778,6 +46869,7 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
46778
46869
  });
46779
46870
  return panelDataItem;
46780
46871
  });
46872
+ questionPlainData.data = questionPlainData.data.concat(prevData);
46781
46873
  }
46782
46874
  return questionPlainData;
46783
46875
  };
@@ -47948,6 +48040,24 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_3__["Serializer"].addClass("ranking", [
47948
48040
  visible: true,
47949
48041
  isSerializable: true,
47950
48042
  },
48043
+ {
48044
+ name: "selectToRankEmptyRankedAreaText:text",
48045
+ serializationProperty: "locSelectToRankEmptyRankedAreaText",
48046
+ category: "general",
48047
+ dependsOn: "selectToRankEnabled",
48048
+ visibleIf: function (obj) {
48049
+ return !!obj.selectToRankEnabled;
48050
+ },
48051
+ },
48052
+ {
48053
+ name: "selectToRankEmptyUnrankedAreaText:text",
48054
+ serializationProperty: "locSelectToRankEmptyUnrankedAreaText",
48055
+ category: "general",
48056
+ dependsOn: "selectToRankEnabled",
48057
+ visibleIf: function (obj) {
48058
+ return !!obj.selectToRankEnabled;
48059
+ },
48060
+ },
47951
48061
  {
47952
48062
  name: "maxSelectedChoices:number",
47953
48063
  visible: true,
@@ -49099,10 +49209,10 @@ __webpack_require__.r(__webpack_exports__);
49099
49209
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QuestionSignaturePadModel", function() { return QuestionSignaturePadModel; });
49100
49210
  /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
49101
49211
  /* harmony import */ var _questionfactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./questionfactory */ "./src/questionfactory.ts");
49102
- /* harmony import */ var _question__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./question */ "./src/question.ts");
49103
- /* harmony import */ var signature_pad__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! signature_pad */ "./node_modules/signature_pad/dist/signature_pad.js");
49104
- /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
49105
- /* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
49212
+ /* harmony import */ var signature_pad__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! signature_pad */ "./node_modules/signature_pad/dist/signature_pad.js");
49213
+ /* harmony import */ var _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/cssClassBuilder */ "./src/utils/cssClassBuilder.ts");
49214
+ /* harmony import */ var _console_warnings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./console-warnings */ "./src/console-warnings.ts");
49215
+ /* harmony import */ var _question_file__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./question_file */ "./src/question_file.ts");
49106
49216
  var __extends = (undefined && undefined.__extends) || (function () {
49107
49217
  var extendStatics = function (d, b) {
49108
49218
  extendStatics = Object.setPrototypeOf ||
@@ -49146,6 +49256,16 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49146
49256
  _this.scaleCanvas(false, true);
49147
49257
  _this.refreshCanvas();
49148
49258
  };
49259
+ _this.onBlur = function (event) {
49260
+ if (!_this.storeDataAsText) {
49261
+ if (!_this.element.contains(event.relatedTarget)) {
49262
+ if (!_this.valueWasChangedFromLastUpload)
49263
+ return;
49264
+ _this.uploadFiles([Object(_question_file__WEBPACK_IMPORTED_MODULE_5__["dataUrl2File"])(_this.signaturePad.toDataURL(_this.getFormat()), _this.name + "." + correctFormatData(_this.dataFormat), _this.getFormat())]);
49265
+ _this.valueWasChangedFromLastUpload = false;
49266
+ }
49267
+ }
49268
+ };
49149
49269
  return _this;
49150
49270
  }
49151
49271
  QuestionSignaturePadModel.prototype.getPenColorFromTheme = function () {
@@ -49162,16 +49282,18 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49162
49282
  signaturePad.backgroundColor = background || backgroundColorFromTheme || backgroundColorProperty.defaultValue || "#ffffff";
49163
49283
  };
49164
49284
  QuestionSignaturePadModel.prototype.getCssRoot = function (cssClasses) {
49165
- return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_4__["CssClassBuilder"]()
49285
+ return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_3__["CssClassBuilder"]()
49166
49286
  .append(_super.prototype.getCssRoot.call(this, cssClasses))
49167
49287
  .append(cssClasses.small, this.signatureWidth.toString() === "300")
49168
49288
  .toString();
49169
49289
  };
49290
+ QuestionSignaturePadModel.prototype.getFormat = function () {
49291
+ return this.dataFormat === "jpeg" ? "image/jpeg" :
49292
+ (this.dataFormat === "svg" ? "image/svg+xml" : "");
49293
+ };
49170
49294
  QuestionSignaturePadModel.prototype.updateValue = function () {
49171
49295
  if (this.signaturePad) {
49172
- var format = this.dataFormat === "jpeg" ? "image/jpeg" :
49173
- (this.dataFormat === "svg" ? "image/svg+xml" : "");
49174
- var data = this.signaturePad.toDataURL(format);
49296
+ var data = this.signaturePad.toDataURL(this.getFormat());
49175
49297
  this.valueIsUpdatingInternally = true;
49176
49298
  this.value = data;
49177
49299
  this.valueIsUpdatingInternally = false;
@@ -49183,6 +49305,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49183
49305
  QuestionSignaturePadModel.prototype.afterRenderQuestionElement = function (el) {
49184
49306
  if (!!el) {
49185
49307
  this.initSignaturePad(el);
49308
+ this.element = el;
49186
49309
  }
49187
49310
  _super.prototype.afterRenderQuestionElement.call(this, el);
49188
49311
  };
@@ -49216,15 +49339,36 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49216
49339
  this.refreshCanvas();
49217
49340
  }
49218
49341
  };
49342
+ QuestionSignaturePadModel.prototype.fromDataUrl = function (data) {
49343
+ this.signaturePad.fromDataURL(data, { width: this.canvas.width * this.scale, height: this.canvas.height * this.scale });
49344
+ };
49345
+ QuestionSignaturePadModel.prototype.fromUrl = function (url) {
49346
+ var _this = this;
49347
+ var img = document.createElement("img");
49348
+ img.crossOrigin = "anonymous";
49349
+ img.src = url;
49350
+ img.onload = function () {
49351
+ var ctx = _this.canvas.getContext("2d");
49352
+ ctx.drawImage(img, 0, 0);
49353
+ var dataURL = _this.canvas.toDataURL(_this.getFormat());
49354
+ _this.fromDataUrl(dataURL);
49355
+ };
49356
+ };
49219
49357
  QuestionSignaturePadModel.prototype.refreshCanvas = function () {
49220
- var data = this.value;
49221
- var canvas = this.canvas;
49222
- if (!data) {
49223
- canvas.getContext("2d").clearRect(0, 0, canvas.width * this.scale, canvas.height * this.scale);
49358
+ if (!this.canvas)
49359
+ return;
49360
+ if (!this.value) {
49361
+ this.canvas.getContext("2d").clearRect(0, 0, this.canvas.width * this.scale, this.canvas.height * this.scale);
49224
49362
  this.signaturePad.clear();
49363
+ this.valueWasChangedFromLastUpload = false;
49225
49364
  }
49226
49365
  else {
49227
- this.signaturePad.fromDataURL(data, { width: canvas.width * this.scale, height: canvas.height * this.scale });
49366
+ if (this.storeDataAsText) {
49367
+ this.fromDataUrl(this.value);
49368
+ }
49369
+ else {
49370
+ this.fromUrl(this.value);
49371
+ }
49228
49372
  }
49229
49373
  };
49230
49374
  QuestionSignaturePadModel.prototype.initSignaturePad = function (el) {
@@ -49232,7 +49376,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49232
49376
  var canvas = el.getElementsByTagName("canvas")[0];
49233
49377
  this.canvas = canvas;
49234
49378
  this.resizeCanvas();
49235
- var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_3__["default"](canvas, { backgroundColor: "#ffffff" });
49379
+ var signaturePad = new signature_pad__WEBPACK_IMPORTED_MODULE_2__["default"](canvas, { backgroundColor: "#ffffff" });
49236
49380
  this.signaturePad = signaturePad;
49237
49381
  if (this.isInputReadOnly) {
49238
49382
  signaturePad.off();
@@ -49253,7 +49397,12 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49253
49397
  }, { once: false });
49254
49398
  signaturePad.addEventListener("endStroke", function () {
49255
49399
  _this.isDrawingValue = false;
49256
- _this.updateValue();
49400
+ if (_this.storeDataAsText) {
49401
+ _this.updateValue();
49402
+ }
49403
+ else {
49404
+ _this.valueWasChangedFromLastUpload = true;
49405
+ }
49257
49406
  }, { once: false });
49258
49407
  this.updateValueHandler();
49259
49408
  this.readOnlyChangedCallback();
@@ -49368,7 +49517,9 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49368
49517
  });
49369
49518
  Object.defineProperty(QuestionSignaturePadModel.prototype, "canShowClearButton", {
49370
49519
  get: function () {
49371
- return !this.isInputReadOnly && this.allowClear;
49520
+ var hasSignature = !this.nothingIsDrawn();
49521
+ var isUploading = this.isUploading;
49522
+ return !this.isInputReadOnly && this.allowClear && hasSignature && !isUploading;
49372
49523
  },
49373
49524
  enumerable: false,
49374
49525
  configurable: true
@@ -49437,22 +49588,39 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49437
49588
  enumerable: false,
49438
49589
  configurable: true
49439
49590
  });
49440
- QuestionSignaturePadModel.prototype.needShowPlaceholder = function () {
49441
- var showPlaceholder = this.showPlaceholder;
49591
+ QuestionSignaturePadModel.prototype.nothingIsDrawn = function () {
49442
49592
  var isDrawing = this.isDrawingValue;
49443
49593
  var isEmpty = this.isEmpty();
49444
- return showPlaceholder && !isDrawing && isEmpty;
49594
+ var isUploading = this.isUploading;
49595
+ var valueWasChangedFromLastUpload = this.valueWasChangedFromLastUpload;
49596
+ return !isDrawing && isEmpty && !isUploading && !valueWasChangedFromLastUpload;
49597
+ };
49598
+ QuestionSignaturePadModel.prototype.needShowPlaceholder = function () {
49599
+ return this.showPlaceholder && this.nothingIsDrawn();
49600
+ };
49601
+ QuestionSignaturePadModel.prototype.uploadResultItemToValue = function (r) {
49602
+ return r.content;
49603
+ };
49604
+ QuestionSignaturePadModel.prototype.setValueFromResult = function (arg) {
49605
+ this.valueIsUpdatingInternally = true;
49606
+ this.value = (arg === null || arg === void 0 ? void 0 : arg.length) ? arg.map(function (r) { return r.content; })[0] : undefined;
49607
+ this.valueIsUpdatingInternally = false;
49608
+ };
49609
+ QuestionSignaturePadModel.prototype.clearValue = function () {
49610
+ this.valueWasChangedFromLastUpload = false;
49611
+ _super.prototype.clearValue.call(this);
49612
+ this.refreshCanvas();
49445
49613
  };
49446
49614
  QuestionSignaturePadModel.prototype.endLoadingFromJson = function () {
49447
49615
  _super.prototype.endLoadingFromJson.call(this);
49448
49616
  //todo: need to remove this code
49449
49617
  if (this.signatureWidth === 300 && !!this.width && typeof this.width === "number" && this.width) {
49450
- _console_warnings__WEBPACK_IMPORTED_MODULE_5__["ConsoleWarnings"].warn("Use signatureWidth property to set width for the signature pad");
49618
+ _console_warnings__WEBPACK_IMPORTED_MODULE_4__["ConsoleWarnings"].warn("Use signatureWidth property to set width for the signature pad");
49451
49619
  this.signatureWidth = this.width;
49452
49620
  this.width = undefined;
49453
49621
  }
49454
49622
  if (this.signatureHeight === 200 && !!this.height) {
49455
- _console_warnings__WEBPACK_IMPORTED_MODULE_5__["ConsoleWarnings"].warn("Use signatureHeight property to set width for the signature pad");
49623
+ _console_warnings__WEBPACK_IMPORTED_MODULE_4__["ConsoleWarnings"].warn("Use signatureHeight property to set width for the signature pad");
49456
49624
  this.signatureHeight = this.height;
49457
49625
  this.height = undefined;
49458
49626
  }
@@ -49460,6 +49628,12 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49460
49628
  __decorate([
49461
49629
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
49462
49630
  ], QuestionSignaturePadModel.prototype, "isDrawingValue", void 0);
49631
+ __decorate([
49632
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
49633
+ ], QuestionSignaturePadModel.prototype, "isReadyForUpload", void 0);
49634
+ __decorate([
49635
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ defaultValue: false })
49636
+ ], QuestionSignaturePadModel.prototype, "valueWasChangedFromLastUpload", void 0);
49463
49637
  __decorate([
49464
49638
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])()
49465
49639
  ], QuestionSignaturePadModel.prototype, "signatureAutoScaleEnabled", void 0);
@@ -49476,7 +49650,7 @@ var QuestionSignaturePadModel = /** @class */ (function (_super) {
49476
49650
  Object(_jsonobject__WEBPACK_IMPORTED_MODULE_0__["property"])({ localizable: { defaultStr: "signaturePlaceHolder" } })
49477
49651
  ], QuestionSignaturePadModel.prototype, "placeholder", void 0);
49478
49652
  return QuestionSignaturePadModel;
49479
- }(_question__WEBPACK_IMPORTED_MODULE_2__["Question"]));
49653
+ }(_question_file__WEBPACK_IMPORTED_MODULE_5__["QuestionFileModelBase"]));
49480
49654
 
49481
49655
  function correctFormatData(val) {
49482
49656
  if (!val)
@@ -49558,6 +49732,8 @@ _jsonobject__WEBPACK_IMPORTED_MODULE_0__["Serializer"].addClass("signaturepad",
49558
49732
  },
49559
49733
  { name: "defaultValue", visible: false },
49560
49734
  { name: "correctAnswer", visible: false },
49735
+ { name: "storeDataAsText:boolean", default: true },
49736
+ { name: "waitForUpload:boolean", default: false },
49561
49737
  ], function () {
49562
49738
  return new QuestionSignaturePadModel("");
49563
49739
  }, "question");
@@ -52544,9 +52720,15 @@ var SurveyElement = /** @class */ (function (_super) {
52544
52720
  if (!el || !el.scrollIntoView)
52545
52721
  return false;
52546
52722
  var elemTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
52547
- if (elemTop < 0)
52723
+ var needScroll = elemTop < 0;
52724
+ if (!needScroll && !!window) {
52725
+ var height = window.innerHeight;
52726
+ needScroll = height > 0 && height < elemTop;
52727
+ }
52728
+ if (needScroll) {
52548
52729
  el.scrollIntoView();
52549
- return elemTop < 0;
52730
+ }
52731
+ return needScroll;
52550
52732
  };
52551
52733
  SurveyElement.GetFirstNonTextElement = function (elements, removeSpaces) {
52552
52734
  if (removeSpaces === void 0) { removeSpaces = false; }
@@ -52593,6 +52775,7 @@ var SurveyElement = /** @class */ (function (_super) {
52593
52775
  _super.prototype.onPropertyValueChanged.call(this, name, oldValue, newValue);
52594
52776
  if (name === "state") {
52595
52777
  this.updateElementCss(false);
52778
+ this.notifyStateChanged(oldValue);
52596
52779
  if (this.stateChangedCallback)
52597
52780
  this.stateChangedCallback();
52598
52781
  }
@@ -52648,12 +52831,11 @@ var SurveyElement = /** @class */ (function (_super) {
52648
52831
  },
52649
52832
  set: function (val) {
52650
52833
  this.setPropertyValue("state", val);
52651
- this.notifyStateChanged();
52652
52834
  },
52653
52835
  enumerable: false,
52654
52836
  configurable: true
52655
52837
  });
52656
- SurveyElement.prototype.notifyStateChanged = function () {
52838
+ SurveyElement.prototype.notifyStateChanged = function (prevState) {
52657
52839
  if (this.survey) {
52658
52840
  this.survey.elementContentVisibilityChanged(this);
52659
52841
  }
@@ -53688,6 +53870,7 @@ __webpack_require__.r(__webpack_exports__);
53688
53870
  /* harmony import */ var _notifier__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./notifier */ "./src/notifier.ts");
53689
53871
  /* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./header */ "./src/header.ts");
53690
53872
  /* harmony import */ var _surveytimer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./surveytimer */ "./src/surveytimer.ts");
53873
+ /* harmony import */ var _surveyTaskManager__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./surveyTaskManager */ "./src/surveyTaskManager.ts");
53691
53874
  var __extends = (undefined && undefined.__extends) || (function () {
53692
53875
  var extendStatics = function (d, b) {
53693
53876
  extendStatics = Object.setPrototypeOf ||
@@ -53729,6 +53912,7 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
53729
53912
 
53730
53913
 
53731
53914
 
53915
+
53732
53916
 
53733
53917
 
53734
53918
  /**
@@ -54005,6 +54189,8 @@ var SurveyModel = /** @class */ (function (_super) {
54005
54189
  * For information on event handler parameters, refer to descriptions within the interface.
54006
54190
  *
54007
54191
  * If you want to specify heading levels for all titles, use the [`titleTags`](https://surveyjs.io/form-library/documentation/api-reference/settings#titleTags) object in [global settings](https://surveyjs.io/form-library/documentation/api-reference/settings).
54192
+ *
54193
+ * [View Demo](https://surveyjs.io/form-library/examples/survey-titletagnames/ (linkStyle))
54008
54194
  * @see onGetQuestionTitle
54009
54195
  * @see onGetQuestionNo
54010
54196
  */
@@ -54044,7 +54230,7 @@ var SurveyModel = /** @class */ (function (_super) {
54044
54230
  */
54045
54231
  _this.onGetResult = _this.addEvent();
54046
54232
  /**
54047
- * An event that is raised when a File Upload question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
54233
+ * An event that is raised when a File Upload or Signature Pad question starts to upload a file. Applies only if [`storeDataAsText`](https://surveyjs.io/form-library/documentation/api-reference/file-model#storeDataAsText) is `false`. Use this event to upload files to your server.
54048
54234
  *
54049
54235
  * For information on event handler parameters, refer to descriptions within the interface.
54050
54236
  *
@@ -54066,7 +54252,7 @@ var SurveyModel = /** @class */ (function (_super) {
54066
54252
  */
54067
54253
  _this.onDownloadFile = _this.addEvent();
54068
54254
  /**
54069
- * An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question. Use this event to delete files from your server.
54255
+ * An event that is raised when users clear files in a [File Upload](https://surveyjs.io/form-library/documentation/api-reference/file-model) question or clear signature in a [Signature Pad](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model) question. Use this event to delete files from your server.
54070
54256
  *
54071
54257
  * For information on event handler parameters, refer to descriptions within the interface.
54072
54258
  *
@@ -54442,6 +54628,7 @@ var SurveyModel = /** @class */ (function (_super) {
54442
54628
  _this.needRenderIcons = true;
54443
54629
  _this.skippedPages = [];
54444
54630
  _this.skeletonComponentName = "sv-skeleton";
54631
+ _this.taskManager = new _surveyTaskManager__WEBPACK_IMPORTED_MODULE_22__["SurveyTaskManagerModel"]();
54445
54632
  if (typeof document !== "undefined") {
54446
54633
  SurveyModel.stylesManager = new _stylesmanager__WEBPACK_IMPORTED_MODULE_11__["StylesManager"]();
54447
54634
  }
@@ -54449,6 +54636,7 @@ var SurveyModel = /** @class */ (function (_super) {
54449
54636
  _this.createHtmlLocString("completedHtml", "completingSurvey", htmlCallBack);
54450
54637
  _this.createHtmlLocString("completedBeforeHtml", "completingSurveyBefore", htmlCallBack, "completed-before");
54451
54638
  _this.createHtmlLocString("loadingHtml", "loadingSurvey", htmlCallBack, "loading");
54639
+ _this.createLocalizableString("emptySurveyText", _this, true, "emptySurvey");
54452
54640
  _this.createLocalizableString("logo", _this, false);
54453
54641
  _this.createLocalizableString("startSurveyText", _this, false, true);
54454
54642
  _this.createLocalizableString("pagePrevText", _this, false, true);
@@ -55692,11 +55880,14 @@ var SurveyModel = /** @class */ (function (_super) {
55692
55880
  };
55693
55881
  Object.defineProperty(SurveyModel.prototype, "emptySurveyText", {
55694
55882
  /**
55695
- * Returns a message that is displayed when a survey does not contain visible pages or questions.
55883
+ * A message that is displayed when a survey does not contain visible pages or questions.
55696
55884
  * @see [Localization & Globalization](https://surveyjs.io/form-library/documentation/survey-localization)
55697
55885
  */
55698
55886
  get: function () {
55699
- return this.getLocalizationString("emptySurvey");
55887
+ return this.getLocalizableStringText("emptySurveyText");
55888
+ },
55889
+ set: function (val) {
55890
+ this.setLocalizableStringText("emptySurveyText", val);
55700
55891
  },
55701
55892
  enumerable: false,
55702
55893
  configurable: true
@@ -56735,7 +56926,7 @@ var SurveyModel = /** @class */ (function (_super) {
56735
56926
  },
56736
56927
  set: function (data) {
56737
56928
  this.valuesHash = {};
56738
- this.setDataCore(data);
56929
+ this.setDataCore(data, !data);
56739
56930
  },
56740
56931
  enumerable: false,
56741
56932
  configurable: true
@@ -56755,17 +56946,21 @@ var SurveyModel = /** @class */ (function (_super) {
56755
56946
  this.mergeValues(data, newData);
56756
56947
  this.setDataCore(newData);
56757
56948
  };
56758
- SurveyModel.prototype.setDataCore = function (data) {
56949
+ SurveyModel.prototype.setDataCore = function (data, clearData) {
56950
+ if (clearData === void 0) { clearData = false; }
56951
+ if (clearData) {
56952
+ this.valuesHash = {};
56953
+ }
56759
56954
  if (data) {
56760
56955
  for (var key in data) {
56761
56956
  this.setDataValueCore(this.valuesHash, key, data[key]);
56762
56957
  }
56763
56958
  }
56764
- this.updateAllQuestionsValue();
56959
+ this.updateAllQuestionsValue(clearData);
56765
56960
  this.notifyAllQuestionsOnValueChanged();
56766
56961
  this.notifyElementsOnAnyValueOrVariableChanged("");
56767
56962
  this.runConditions();
56768
- this.updateAllQuestionsValue();
56963
+ this.updateAllQuestionsValue(clearData);
56769
56964
  };
56770
56965
  SurveyModel.prototype.getStructuredData = function (includePages, level) {
56771
56966
  if (includePages === void 0) { includePages = true; }
@@ -57460,8 +57655,7 @@ var SurveyModel = /** @class */ (function (_super) {
57460
57655
  this.isLoading = false;
57461
57656
  this.completedByTriggers = undefined;
57462
57657
  if (clearData) {
57463
- this.data = null;
57464
- this.variablesHash = {};
57658
+ this.setDataCore(null, true);
57465
57659
  }
57466
57660
  this.timerModel.spent = 0;
57467
57661
  for (var i = 0; i < this.pages.length; i++) {
@@ -59277,23 +59471,29 @@ var SurveyModel = /** @class */ (function (_super) {
59277
59471
  * }
59278
59472
  * );
59279
59473
  * ```
59280
- * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model).
59281
- * @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name).
59474
+ * @param question A [File Upload question instance](https://surveyjs.io/form-library/documentation/api-reference/file-model) or [Signature Pad question instance](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model).
59475
+ * @param name The File Upload question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/file-model#name) or Signature Pad question's [`name`](https://surveyjs.io/form-library/documentation/api-reference/signature-pad-model#name).
59282
59476
  * @param files An array of JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/File" target="_blank">File</a> objects that represent files to upload.
59283
59477
  * @param callback A callback function that allows you to access successfully uploaded files as the first argument. If any files fail to upload, the second argument contains an array of error messages.
59284
59478
  * @see onUploadFiles
59285
59479
  * @see downloadFile
59286
59480
  */
59287
59481
  SurveyModel.prototype.uploadFiles = function (question, name, files, callback) {
59482
+ var _this = this;
59288
59483
  if (this.onUploadFiles.isEmpty) {
59289
59484
  callback("error", this.getLocString("noUploadFilesHandler"));
59290
59485
  }
59291
59486
  else {
59292
- this.onUploadFiles.fire(this, {
59293
- question: question,
59294
- name: name,
59295
- files: files || [],
59296
- callback: callback,
59487
+ this.taskManager.runTask("file", function (done) {
59488
+ _this.onUploadFiles.fire(_this, {
59489
+ question: question,
59490
+ name: name,
59491
+ files: files || [],
59492
+ callback: function (status, data) {
59493
+ callback(status, data);
59494
+ done();
59495
+ },
59496
+ });
59297
59497
  });
59298
59498
  }
59299
59499
  if (this.surveyPostId) {
@@ -59712,7 +59912,7 @@ var SurveyModel = /** @class */ (function (_super) {
59712
59912
  var qValue = questions[i].value;
59713
59913
  if ((qValue === newValue && Array.isArray(qValue) && !!this.editingObj) ||
59714
59914
  !this.isTwoValueEquals(qValue, newValue)) {
59715
- questions[i].updateValueFromSurvey(newValue);
59915
+ questions[i].updateValueFromSurvey(newValue, false);
59716
59916
  }
59717
59917
  }
59718
59918
  }
@@ -59807,12 +60007,12 @@ var SurveyModel = /** @class */ (function (_super) {
59807
60007
  this.locStrsChanged();
59808
60008
  }
59809
60009
  };
59810
- SurveyModel.prototype.updateAllQuestionsValue = function () {
60010
+ SurveyModel.prototype.updateAllQuestionsValue = function (clearData) {
59811
60011
  var questions = this.getAllQuestions();
59812
60012
  for (var i = 0; i < questions.length; i++) {
59813
60013
  var q = questions[i];
59814
60014
  var valName = q.getValueName();
59815
- q.updateValueFromSurvey(this.getValue(valName));
60015
+ q.updateValueFromSurvey(this.getValue(valName), clearData);
59816
60016
  if (q.requireUpdateCommentValue) {
59817
60017
  q.updateCommentFromSurvey(this.getComment(valName));
59818
60018
  }
@@ -60231,7 +60431,7 @@ var SurveyModel = /** @class */ (function (_super) {
60231
60431
  mouseDown: function () { return _this.navigationMouseDown(); },
60232
60432
  },
60233
60433
  locTitle: this.locCompleteText,
60234
- action: function () { return _this.completeLastPage(); },
60434
+ action: function () { return _this.taskManager.waitAndExecute(function () { return _this.completeLastPage(); }); },
60235
60435
  component: defaultComponent
60236
60436
  });
60237
60437
  this.updateNavigationItemCssCallback = function () {
@@ -61559,7 +61759,7 @@ var SurveyModel = /** @class */ (function (_super) {
61559
61759
  }
61560
61760
  }
61561
61761
  else if (this.state === "running" && isStrCiEqual(layoutElement.id, "progress-" + this.progressBarType)) {
61562
- if (container === "header") {
61762
+ if (container === "center") {
61563
61763
  if (this.isShowProgressBarOnTop && !this.isShowStartingPage) {
61564
61764
  containerLayoutElements.push(layoutElement);
61565
61765
  }
@@ -61627,7 +61827,6 @@ var SurveyModel = /** @class */ (function (_super) {
61627
61827
  var advHeader = new _header__WEBPACK_IMPORTED_MODULE_20__["Cover"]();
61628
61828
  advHeader.fromTheme(theme);
61629
61829
  _this.insertAdvancedHeader(advHeader);
61630
- _this.headerView = "advanced";
61631
61830
  }
61632
61831
  if (key === "isPanelless") {
61633
61832
  _this.isCompact = theme[key];
@@ -62236,6 +62435,91 @@ surveyLocalization.locales["en"] = _localization_english__WEBPACK_IMPORTED_MODUL
62236
62435
  surveyLocalization.localeNames["en"] = "english";
62237
62436
 
62238
62437
 
62438
+ /***/ }),
62439
+
62440
+ /***/ "./src/surveyTaskManager.ts":
62441
+ /*!**********************************!*\
62442
+ !*** ./src/surveyTaskManager.ts ***!
62443
+ \**********************************/
62444
+ /*! exports provided: SurveyTaskManagerModel */
62445
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
62446
+
62447
+ "use strict";
62448
+ __webpack_require__.r(__webpack_exports__);
62449
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SurveyTaskManagerModel", function() { return SurveyTaskManagerModel; });
62450
+ /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./base */ "./src/base.ts");
62451
+ /* harmony import */ var _jsonobject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./jsonobject */ "./src/jsonobject.ts");
62452
+ var __extends = (undefined && undefined.__extends) || (function () {
62453
+ var extendStatics = function (d, b) {
62454
+ extendStatics = Object.setPrototypeOf ||
62455
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
62456
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
62457
+ return extendStatics(d, b);
62458
+ };
62459
+ return function (d, b) {
62460
+ if (typeof b !== "function" && b !== null)
62461
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
62462
+ extendStatics(d, b);
62463
+ function __() { this.constructor = d; }
62464
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
62465
+ };
62466
+ })();
62467
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
62468
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
62469
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62470
+ 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;
62471
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
62472
+ };
62473
+
62474
+
62475
+ var SurveyTaskModel = /** @class */ (function () {
62476
+ function SurveyTaskModel(type) {
62477
+ this.type = type;
62478
+ this.timestamp = new Date();
62479
+ }
62480
+ return SurveyTaskModel;
62481
+ }());
62482
+ var SurveyTaskManagerModel = /** @class */ (function (_super) {
62483
+ __extends(SurveyTaskManagerModel, _super);
62484
+ function SurveyTaskManagerModel() {
62485
+ var _this = _super.call(this) || this;
62486
+ _this.taskList = [];
62487
+ _this.onAllTasksCompleted = _this.addEvent();
62488
+ return _this;
62489
+ }
62490
+ SurveyTaskManagerModel.prototype.runTask = function (type, func) {
62491
+ var _this = this;
62492
+ var task = new SurveyTaskModel(type);
62493
+ this.taskList.push(task);
62494
+ this.hasActiveTasks = true;
62495
+ func(function () { return _this.taskFinished(task); });
62496
+ return task;
62497
+ };
62498
+ SurveyTaskManagerModel.prototype.waitAndExecute = function (action) {
62499
+ if (!this.hasActiveTasks) {
62500
+ action();
62501
+ return;
62502
+ }
62503
+ this.onAllTasksCompleted.add(function () { action(); });
62504
+ };
62505
+ SurveyTaskManagerModel.prototype.taskFinished = function (task) {
62506
+ var index = this.taskList.indexOf(task);
62507
+ if (index > -1) {
62508
+ this.taskList.splice(index, 1);
62509
+ }
62510
+ if (this.hasActiveTasks && this.taskList.length == 0) {
62511
+ this.hasActiveTasks = false;
62512
+ this.onAllTasksCompleted.fire(this, {});
62513
+ }
62514
+ };
62515
+ __decorate([
62516
+ Object(_jsonobject__WEBPACK_IMPORTED_MODULE_1__["property"])({ defaultValue: false })
62517
+ ], SurveyTaskManagerModel.prototype, "hasActiveTasks", void 0);
62518
+ return SurveyTaskManagerModel;
62519
+ }(_base__WEBPACK_IMPORTED_MODULE_0__["Base"]));
62520
+
62521
+
62522
+
62239
62523
  /***/ }),
62240
62524
 
62241
62525
  /***/ "./src/surveyTimerModel.ts":
@@ -62509,6 +62793,7 @@ function createTOCListModel(survey, onAction) {
62509
62793
  }, true, items.filter(function (i) { return i.id === survey.currentPage.name; })[0] || items.filter(function (i) { return i.id === pagesSource[0].name; })[0]);
62510
62794
  listModel.allowSelection = false;
62511
62795
  listModel.locOwner = survey;
62796
+ listModel.searchEnabled = false;
62512
62797
  survey.onCurrentPageChanged.add(function (s, o) {
62513
62798
  listModel.selectedItem = items.filter(function (i) { return i.id === survey.currentPage.name; })[0];
62514
62799
  });
@@ -62668,10 +62953,6 @@ __webpack_require__.r(__webpack_exports__);
62668
62953
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgIconRegistry", function() { return SvgIconRegistry; });
62669
62954
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgRegistry", function() { return SvgRegistry; });
62670
62955
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SvgBundleViewModel", function() { return SvgBundleViewModel; });
62671
- /* harmony import */ var _settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./settings */ "./src/settings.ts");
62672
- /* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/utils */ "./src/utils/utils.ts");
62673
-
62674
-
62675
62956
  var SvgIconData = /** @class */ (function () {
62676
62957
  function SvgIconData() {
62677
62958
  }
@@ -62733,16 +63014,6 @@ var SvgIconRegistry = /** @class */ (function () {
62733
63014
  var _this = this;
62734
63015
  return Object.keys(this.icons).map(function (icon) { return _this.icons[icon]; }).join("");
62735
63016
  };
62736
- SvgIconRegistry.prototype.renderIcons = function () {
62737
- var containerId = "sv-icon-holder-global-container";
62738
- if (!!_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment && !_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.root.getElementById(containerId)) {
62739
- var iconsDiv = document.createElement("div");
62740
- iconsDiv.id = containerId;
62741
- iconsDiv.innerHTML = "<svg>" + this.iconsRenderedHtml() + "</svg>";
62742
- iconsDiv.style.display = "none";
62743
- Object(_utils_utils__WEBPACK_IMPORTED_MODULE_1__["getElement"])(_settings__WEBPACK_IMPORTED_MODULE_0__["settings"].environment.svgMountContainer).appendChild(iconsDiv);
62744
- }
62745
- };
62746
63017
  return SvgIconRegistry;
62747
63018
  }());
62748
63019
 
@@ -64195,13 +64466,14 @@ var __extends = (undefined && undefined.__extends) || (function () {
64195
64466
  })();
64196
64467
 
64197
64468
  var ResponsivityManager = /** @class */ (function () {
64198
- function ResponsivityManager(container, model, itemsSelector, dotsItemSize) {
64469
+ function ResponsivityManager(container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) {
64199
64470
  var _this = this;
64200
64471
  if (dotsItemSize === void 0) { dotsItemSize = null; }
64201
64472
  this.container = container;
64202
64473
  this.model = model;
64203
64474
  this.itemsSelector = itemsSelector;
64204
64475
  this.dotsItemSize = dotsItemSize;
64476
+ this.delayedUpdateFunction = delayedUpdateFunction;
64205
64477
  this.resizeObserver = undefined;
64206
64478
  this.isInitialized = false;
64207
64479
  this.minDimensionConst = 56;
@@ -64252,6 +64524,16 @@ var ResponsivityManager = /** @class */ (function () {
64252
64524
  (currentAction.needSeparator ? this.separatorSize : 0)
64253
64525
  : currentAction.maxDimension;
64254
64526
  };
64527
+ ResponsivityManager.prototype.getRenderedVisibleActionsCount = function () {
64528
+ var _this = this;
64529
+ var count = 0;
64530
+ this.container.querySelectorAll(this.itemsSelector).forEach(function (item) {
64531
+ if (_this.calcItemSize(item) > 0) {
64532
+ count++;
64533
+ }
64534
+ });
64535
+ return count;
64536
+ };
64255
64537
  ResponsivityManager.prototype.calcItemsSizes = function () {
64256
64538
  var _this = this;
64257
64539
  var actions = this.model.actions;
@@ -64277,18 +64559,8 @@ var ResponsivityManager = /** @class */ (function () {
64277
64559
  if (this.isContainerVisible && !this.model.isResponsivenessDisabled) {
64278
64560
  if (!this.isInitialized) {
64279
64561
  this.model.setActionsMode("large");
64280
- var recalcItemSizes = function () {
64281
- _this.calcItemsSizes();
64282
- _this.isInitialized = true;
64283
- };
64284
- if (queueMicrotask) {
64285
- queueMicrotask(recalcItemSizes);
64286
- }
64287
- else {
64288
- recalcItemSizes();
64289
- }
64290
64562
  }
64291
- var processResponsiveness = function () {
64563
+ var processResponsiveness_1 = function () {
64292
64564
  var _a;
64293
64565
  var dotsItemSize = _this.dotsItemSize;
64294
64566
  if (!_this.dotsItemSize) {
@@ -64297,11 +64569,29 @@ var ResponsivityManager = /** @class */ (function () {
64297
64569
  }
64298
64570
  _this.model.fit(_this.getAvailableSpace(), dotsItemSize);
64299
64571
  };
64300
- if (queueMicrotask) {
64301
- queueMicrotask(processResponsiveness);
64572
+ if (!this.isInitialized) {
64573
+ var callback = function () {
64574
+ _this.calcItemsSizes();
64575
+ _this.isInitialized = true;
64576
+ processResponsiveness_1();
64577
+ };
64578
+ if (this.getRenderedVisibleActionsCount() < this.model.visibleActions.length) {
64579
+ if (this.delayedUpdateFunction) {
64580
+ this.delayedUpdateFunction(callback);
64581
+ }
64582
+ else if (queueMicrotask) {
64583
+ queueMicrotask(callback);
64584
+ }
64585
+ else {
64586
+ callback();
64587
+ }
64588
+ }
64589
+ else {
64590
+ callback();
64591
+ }
64302
64592
  }
64303
64593
  else {
64304
- processResponsiveness();
64594
+ processResponsiveness_1();
64305
64595
  }
64306
64596
  }
64307
64597
  };
@@ -64316,9 +64606,9 @@ var ResponsivityManager = /** @class */ (function () {
64316
64606
 
64317
64607
  var VerticalResponsivityManager = /** @class */ (function (_super) {
64318
64608
  __extends(VerticalResponsivityManager, _super);
64319
- function VerticalResponsivityManager(container, model, itemsSelector, dotsItemSize, minDimension) {
64609
+ function VerticalResponsivityManager(container, model, itemsSelector, dotsItemSize, minDimension, delayedUpdateFunction) {
64320
64610
  if (minDimension === void 0) { minDimension = 40; }
64321
- var _this = _super.call(this, container, model, itemsSelector, dotsItemSize) || this;
64611
+ var _this = _super.call(this, container, model, itemsSelector, dotsItemSize, delayedUpdateFunction) || this;
64322
64612
  _this.minDimensionConst = minDimension;
64323
64613
  _this.recalcMinDimensionConst = false;
64324
64614
  return _this;