survey-core 1.12.3 → 1.12.5

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 (259) hide show
  1. package/defaultV2.css +96 -42
  2. package/defaultV2.css.map +1 -1
  3. package/defaultV2.fontless.css +96 -42
  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 +23 -77
  114. package/modern.css.map +1 -1
  115. package/modern.fontless.css +23 -77
  116. package/modern.fontless.css.map +1 -1
  117. package/modern.fontless.min.css +2 -2
  118. package/modern.min.css +2 -2
  119. package/package.json +1 -1
  120. package/plugins/bootstrap-integration/index.js +1 -2
  121. package/plugins/bootstrap-integration/index.js.map +1 -1
  122. package/plugins/bootstrap-integration/index.min.js +2 -2
  123. package/plugins/bootstrap-material-integration/index.js +1 -2
  124. package/plugins/bootstrap-material-integration/index.js.map +1 -1
  125. package/plugins/bootstrap-material-integration/index.min.js +2 -2
  126. package/survey.core.js +866 -342
  127. package/survey.core.js.map +1 -1
  128. package/survey.core.min.js +3 -3
  129. package/survey.css +11 -17
  130. package/survey.css.map +1 -1
  131. package/survey.i18n.js +1 -1
  132. package/survey.i18n.min.js +1 -1
  133. package/survey.min.css +2 -2
  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/packages/survey-core/entries/chunks/model.d.ts +1 -1
  217. package/ts3.4/typings/packages/survey-core/src/base-interfaces.d.ts +2 -2
  218. package/ts3.4/typings/packages/survey-core/src/base.d.ts +4 -4
  219. package/ts3.4/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  220. package/ts3.4/typings/packages/survey-core/src/page.d.ts +9 -3
  221. package/ts3.4/typings/packages/survey-core/src/panel.d.ts +11 -3
  222. package/ts3.4/typings/packages/survey-core/src/question.d.ts +5 -5
  223. package/ts3.4/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
  224. package/ts3.4/typings/packages/survey-core/src/question_comment.d.ts +0 -3
  225. package/ts3.4/typings/packages/survey-core/src/question_file.d.ts +20 -2
  226. package/ts3.4/typings/packages/survey-core/src/question_matrix.d.ts +13 -5
  227. package/ts3.4/typings/packages/survey-core/src/question_matrixdynamic.d.ts +2 -0
  228. package/ts3.4/typings/packages/survey-core/src/question_paneldynamic.d.ts +2 -0
  229. package/ts3.4/typings/packages/survey-core/src/question_ranking.d.ts +1 -0
  230. package/ts3.4/typings/packages/survey-core/src/question_rating.d.ts +3 -0
  231. package/ts3.4/typings/packages/survey-core/src/survey-element.d.ts +19 -3
  232. package/ts3.4/typings/packages/survey-core/src/survey.d.ts +84 -33
  233. package/ts3.4/typings/packages/survey-core/src/surveyTimerModel.d.ts +1 -1
  234. package/ts3.4/typings/packages/survey-core/src/surveytimer.d.ts +1 -0
  235. package/ts3.4/typings/packages/survey-core/src/themes.d.ts +19 -13
  236. package/ts3.4/typings/packages/survey-core/src/utils/text-area.d.ts +1 -0
  237. package/ts3.4/typings/packages/survey-core/src/utils/utils.d.ts +2 -2
  238. package/typings/packages/survey-core/entries/chunks/model.d.ts +1 -1
  239. package/typings/packages/survey-core/src/base-interfaces.d.ts +2 -2
  240. package/typings/packages/survey-core/src/base.d.ts +4 -4
  241. package/typings/packages/survey-core/src/defaultCss/defaultV2Css.d.ts +1 -0
  242. package/typings/packages/survey-core/src/page.d.ts +10 -3
  243. package/typings/packages/survey-core/src/panel.d.ts +11 -3
  244. package/typings/packages/survey-core/src/question.d.ts +5 -5
  245. package/typings/packages/survey-core/src/question_baseselect.d.ts +0 -3
  246. package/typings/packages/survey-core/src/question_comment.d.ts +0 -3
  247. package/typings/packages/survey-core/src/question_file.d.ts +21 -2
  248. package/typings/packages/survey-core/src/question_matrix.d.ts +13 -5
  249. package/typings/packages/survey-core/src/question_matrixdynamic.d.ts +2 -0
  250. package/typings/packages/survey-core/src/question_paneldynamic.d.ts +2 -0
  251. package/typings/packages/survey-core/src/question_ranking.d.ts +1 -0
  252. package/typings/packages/survey-core/src/question_rating.d.ts +3 -0
  253. package/typings/packages/survey-core/src/survey-element.d.ts +19 -3
  254. package/typings/packages/survey-core/src/survey.d.ts +90 -34
  255. package/typings/packages/survey-core/src/surveyTimerModel.d.ts +1 -1
  256. package/typings/packages/survey-core/src/surveytimer.d.ts +1 -0
  257. package/typings/packages/survey-core/src/themes.d.ts +19 -13
  258. package/typings/packages/survey-core/src/utils/text-area.d.ts +1 -0
  259. package/typings/packages/survey-core/src/utils/utils.d.ts +2 -2
package/survey.core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * surveyjs - Survey JavaScript library v1.12.3
2
+ * surveyjs - Survey JavaScript library v1.12.5
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
  */
@@ -964,7 +964,7 @@ module.exports = "<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\
964
964
  /*!*******************************************!*\
965
965
  !*** ./src/entries/core.ts + 127 modules ***!
966
966
  \*******************************************/
967
- /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
967
+ /*! exports provided: Version, ReleaseDate, checkLibraryVersion, setLicenseKey, slk, hasLicense, settings, Helpers, AnswerCountValidator, EmailValidator, NumericValidator, RegexValidator, SurveyValidator, TextValidator, ValidatorResult, ExpressionValidator, ValidatorRunner, ItemValue, Base, Event, EventBase, ArrayChanges, ComputedUpdater, SurveyError, SurveyElementCore, SurveyElement, DragTypeOverMeEnum, CalculatedValue, CustomError, AnswerRequiredError, OneAnswerRequiredError, RequreNumericError, ExceedSizeError, LocalizableString, LocalizableStrings, HtmlConditionItem, UrlConditionItem, ChoicesRestful, ChoicesRestfull, FunctionFactory, registerFunction, ConditionRunner, ExpressionRunner, ExpressionExecutor, Operand, Const, BinaryOperand, Variable, FunctionOperand, ArrayOperand, UnaryOperand, ConditionsParser, ProcessValue, JsonError, JsonIncorrectTypeError, JsonMetadata, JsonMetadataClass, JsonMissingTypeError, JsonMissingTypeErrorBase, JsonObject, JsonObjectProperty, JsonRequiredPropertyError, JsonUnknownPropertyError, Serializer, property, propertyArray, MatrixDropdownCell, MatrixDropdownRowModelBase, QuestionMatrixDropdownModelBase, MatrixDropdownColumn, matrixDropdownColumnTypes, QuestionMatrixDropdownRenderedCell, QuestionMatrixDropdownRenderedRow, QuestionMatrixDropdownRenderedErrorRow, QuestionMatrixDropdownRenderedTable, MatrixDropdownRowModel, QuestionMatrixDropdownModel, MatrixDynamicRowModel, QuestionMatrixDynamicModel, MatrixRowModel, MatrixCells, QuestionMatrixModel, QuestionMatrixBaseModel, MultipleTextItemModel, MultipleTextCell, MultipleTextErrorCell, MutlipleTextErrorRow, MutlipleTextRow, QuestionMultipleTextModel, MultipleTextEditorModel, PanelModel, PanelModelBase, QuestionRowModel, FlowPanelModel, PageModel, DefaultTitleModel, Question, QuestionNonValue, QuestionEmptyModel, QuestionCheckboxBase, QuestionSelectBase, QuestionCheckboxModel, QuestionTagboxModel, QuestionRankingModel, QuestionCommentModel, QuestionDropdownModel, QuestionFactory, ElementFactory, QuestionFileModel, QuestionFilePage, QuestionHtmlModel, QuestionRadiogroupModel, QuestionRatingModel, RenderedRatingItem, QuestionExpressionModel, QuestionTextBase, CharacterCounter, QuestionTextModel, QuestionBooleanModel, QuestionImagePickerModel, ImageItemValue, QuestionImageModel, QuestionSignaturePadModel, QuestionPanelDynamicModel, QuestionPanelDynamicItem, SurveyTimer, SurveyTimerModel, tryFocusPage, createTOCListModel, getTocRootCss, TOCModel, SurveyProgressModel, ProgressButtons, ProgressButtonsResponsivityManager, SurveyModel, SurveyTrigger, SurveyTriggerComplete, SurveyTriggerSetValue, SurveyTriggerVisible, SurveyTriggerCopyValue, SurveyTriggerRunExpression, SurveyTriggerSkip, Trigger, PopupSurveyModel, SurveyWindowModel, TextPreProcessor, Notifier, Cover, CoverCell, dxSurveyService, englishStrings, surveyLocalization, surveyStrings, QuestionCustomWidget, CustomWidgetCollection, QuestionCustomModel, QuestionCompositeModel, ComponentQuestionJSON, ComponentCollection, ListModel, MultiSelectListModel, PopupModel, createDialogOptions, PopupBaseViewModel, PopupDropdownViewModel, PopupModalViewModel, createPopupViewModel, createPopupModalViewModel, DropdownListModel, DropdownMultiSelectListModel, QuestionButtonGroupModel, ButtonGroupItemModel, ButtonGroupItemValue, IsMobile, IsTouch, _setIsTouch, confirmAction, confirmActionAsync, detectIEOrEdge, doKey2ClickUp, doKey2ClickDown, doKey2ClickBlur, loadFileFromBase64, increaseHeightByContent, createSvg, chooseFiles, sanitizeEditableContent, prepareElementForVerticalAnimation, cleanHtmlElementAfterAnimation, classesToSelector, InputMaskBase, InputMaskPattern, InputMaskNumeric, InputMaskDateTime, InputMaskCurrency, CssClassBuilder, TextAreaModel, surveyCss, defaultV2Css, defaultV2ThemeName, DragDropCore, DragDropChoices, DragDropRankingSelectToRank, StylesManager, defaultStandardCss, modernCss, SvgIconRegistry, SvgRegistry, SvgBundleViewModel, RendererFactory, ResponsivityManager, VerticalResponsivityManager, unwrap, getOriginalEvent, getElement, createDropdownActionModel, createDropdownActionModelAdvanced, createPopupModelWithListModel, getActionDropdownButtonTarget, BaseAction, Action, ActionDropdownViewModel, AnimationUtils, AnimationPropertyUtils, AnimationGroupUtils, AnimationProperty, AnimationBoolean, AnimationGroup, AnimationTab, AdaptiveActionContainer, defaultActionBarCss, ActionContainer, DragOrClickHelper, Model */
968
968
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
969
969
 
970
970
  "use strict";
@@ -1081,6 +1081,7 @@ __webpack_require__.d(__webpack_exports__, "QuestionDropdownModel", function() {
1081
1081
  __webpack_require__.d(__webpack_exports__, "QuestionFactory", function() { return /* reexport */ questionfactory_QuestionFactory; });
1082
1082
  __webpack_require__.d(__webpack_exports__, "ElementFactory", function() { return /* reexport */ questionfactory_ElementFactory; });
1083
1083
  __webpack_require__.d(__webpack_exports__, "QuestionFileModel", function() { return /* reexport */ question_file_QuestionFileModel; });
1084
+ __webpack_require__.d(__webpack_exports__, "QuestionFilePage", function() { return /* reexport */ question_file_QuestionFilePage; });
1084
1085
  __webpack_require__.d(__webpack_exports__, "QuestionHtmlModel", function() { return /* reexport */ question_html_QuestionHtmlModel; });
1085
1086
  __webpack_require__.d(__webpack_exports__, "QuestionRadiogroupModel", function() { return /* reexport */ question_radiogroup_QuestionRadiogroupModel; });
1086
1087
  __webpack_require__.d(__webpack_exports__, "QuestionRatingModel", function() { return /* reexport */ question_rating_QuestionRatingModel; });
@@ -2361,8 +2362,10 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
2361
2362
  return this.getValue(obj);
2362
2363
  };
2363
2364
  JsonObjectProperty.prototype.getValue = function (obj) {
2364
- if (this.onGetValue)
2365
+ if (this.onGetValue) {
2366
+ obj = this.getOriginalObj(obj);
2365
2367
  return this.onGetValue(obj);
2368
+ }
2366
2369
  if (this.serializationProperty && !!obj[this.serializationProperty])
2367
2370
  return obj[this.serializationProperty].getJson();
2368
2371
  return obj[this.name];
@@ -2389,6 +2392,7 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
2389
2392
  };
2390
2393
  JsonObjectProperty.prototype.setValue = function (obj, value, jsonConv) {
2391
2394
  if (this.onSetValue) {
2395
+ obj = this.getOriginalObj(obj);
2392
2396
  this.onSetValue(obj, value, jsonConv);
2393
2397
  }
2394
2398
  else {
@@ -2477,7 +2481,7 @@ var jsonobject_JsonObjectProperty = /** @class */ (function () {
2477
2481
  };
2478
2482
  JsonObjectProperty.prototype.isVisible = function (layout, obj) {
2479
2483
  if (obj === void 0) { obj = null; }
2480
- var isLayout = !this.layout || this.layout == layout;
2484
+ var isLayout = !this.layout || !layout || this.layout === layout;
2481
2485
  if (!this.visible || !isLayout)
2482
2486
  return false;
2483
2487
  if (!!this.visibleIf && !!obj) {
@@ -9142,8 +9146,8 @@ var base_Base = /** @class */ (function () {
9142
9146
  this.isCreating = true;
9143
9147
  this.animationAllowedLock = 0;
9144
9148
  //remove when knockout obsolete
9145
- this.supportOnElementRenderedEvent = true;
9146
- this.onElementRenderedEventEnabled = false;
9149
+ this.supportOnElementRerenderedEvent = true;
9150
+ this.onElementRerenderedEventEnabled = false;
9147
9151
  this._onElementRerendered = new EventBase();
9148
9152
  this.bindingsValue = new base_Bindings(this);
9149
9153
  CustomPropertiesCollection.createProperties(this);
@@ -10080,7 +10084,7 @@ var base_Base = /** @class */ (function () {
10080
10084
  configurable: true
10081
10085
  });
10082
10086
  Base.prototype.getIsAnimationAllowed = function () {
10083
- return settings.animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.supportOnElementRenderedEvent);
10087
+ return settings.animationEnabled && this.animationAllowedLock >= 0 && !this.isLoadingFromJson && !this.isDisposed && (!!this.onElementRerendered || !this.supportOnElementRerenderedEvent);
10084
10088
  };
10085
10089
  Base.prototype.blockAnimations = function () {
10086
10090
  this.animationAllowedLock--;
@@ -10088,17 +10092,17 @@ var base_Base = /** @class */ (function () {
10088
10092
  Base.prototype.releaseAnimations = function () {
10089
10093
  this.animationAllowedLock++;
10090
10094
  };
10091
- Base.prototype.enableOnElementRenderedEvent = function () {
10092
- this.onElementRenderedEventEnabled = true;
10095
+ Base.prototype.enableOnElementRerenderedEvent = function () {
10096
+ this.onElementRerenderedEventEnabled = true;
10093
10097
  };
10094
- Base.prototype.disableOnElementRenderedEvent = function () {
10098
+ Base.prototype.disableOnElementRerenderedEvent = function () {
10095
10099
  var _a;
10096
10100
  (_a = this.onElementRerendered) === null || _a === void 0 ? void 0 : _a.fire(this, { isCancel: true });
10097
- this.onElementRenderedEventEnabled = false;
10101
+ this.onElementRerenderedEventEnabled = false;
10098
10102
  };
10099
10103
  Object.defineProperty(Base.prototype, "onElementRerendered", {
10100
10104
  get: function () {
10101
- return this.supportOnElementRenderedEvent && this.onElementRenderedEventEnabled ? this._onElementRerendered : undefined;
10105
+ return this.supportOnElementRerenderedEvent && this.onElementRerenderedEventEnabled ? this._onElementRerendered : undefined;
10102
10106
  },
10103
10107
  enumerable: false,
10104
10108
  configurable: true
@@ -10290,7 +10294,9 @@ var responsivity_manager_ResponsivityManager = /** @class */ (function () {
10290
10294
  var _items = this.container.querySelectorAll(this.itemsSelector);
10291
10295
  (_items || []).forEach(function (item, index) {
10292
10296
  var currentAction = actions[index];
10293
- _this.calcActionDimensions(currentAction, item);
10297
+ if (!!currentAction) {
10298
+ _this.calcActionDimensions(currentAction, item);
10299
+ }
10294
10300
  });
10295
10301
  };
10296
10302
  ResponsivityManager.prototype.calcActionDimensions = function (currentAction, item) {
@@ -12850,6 +12856,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12850
12856
  }
12851
12857
  }
12852
12858
  }, function () { return _this.renderedIsExpanded; });
12859
+ _this.onAfterRenderElement = _this.addEvent();
12853
12860
  _this.name = name;
12854
12861
  _this.createNewArray("errors");
12855
12862
  _this.createNewArray("titleActions");
@@ -12879,16 +12886,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12879
12886
  }
12880
12887
  return info;
12881
12888
  };
12882
- SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions) {
12883
- var root = settings.environment.root;
12884
- if (!elementId || typeof root === "undefined")
12885
- return false;
12886
- var el = root.getElementById(elementId);
12887
- return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions);
12888
- };
12889
- SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions) {
12890
- if (!el || !el.scrollIntoView)
12891
- return false;
12889
+ SurveyElement.IsNeedScrollIntoView = function (el, checkLeft, scrollIfVisible) {
12892
12890
  var elTop = scrollIfVisible ? -1 : el.getBoundingClientRect().top;
12893
12891
  var needScroll = elTop < 0;
12894
12892
  var elLeft = -1;
@@ -12904,8 +12902,55 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
12904
12902
  needScroll = width > 0 && width < elLeft;
12905
12903
  }
12906
12904
  }
12905
+ return needScroll;
12906
+ };
12907
+ SurveyElement.ScrollIntoView = function (el, scrollIntoViewOptions, doneCallback) {
12908
+ el.scrollIntoView(scrollIntoViewOptions);
12909
+ if (typeof doneCallback === "function") {
12910
+ var lastPos_1 = null;
12911
+ var same_1 = 0;
12912
+ var checkPos_1 = function () {
12913
+ var newPos = el.getBoundingClientRect().top;
12914
+ if (newPos === lastPos_1) {
12915
+ if (same_1++ > 2) {
12916
+ doneCallback();
12917
+ return;
12918
+ }
12919
+ }
12920
+ else {
12921
+ lastPos_1 = newPos;
12922
+ same_1 = 0;
12923
+ }
12924
+ requestAnimationFrame(checkPos_1);
12925
+ };
12926
+ DomWindowHelper.requestAnimationFrame(checkPos_1);
12927
+ // let currPageXOffset = window.pageXOffset;
12928
+ // let currPageYOffset = window.pageYOffset;
12929
+ // var scrollDone = setInterval(() => {
12930
+ // DomWindowHelper.requestAnimationFrame(() => {
12931
+ // if (currPageXOffset == window.pageXOffset && currPageYOffset == window.pageYOffset) {
12932
+ // clearInterval(scrollDone);
12933
+ // doneCallback();
12934
+ // }
12935
+ // currPageXOffset = window.pageXOffset;
12936
+ // currPageYOffset = window.pageYOffset;
12937
+ // });
12938
+ // }, 25);
12939
+ }
12940
+ };
12941
+ SurveyElement.ScrollElementToTop = function (elementId, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
12942
+ var root = settings.environment.root;
12943
+ if (!elementId || typeof root === "undefined")
12944
+ return false;
12945
+ var el = root.getElementById(elementId);
12946
+ return SurveyElement.ScrollElementToViewCore(el, false, scrollIfVisible, scrollIntoViewOptions, doneCallback);
12947
+ };
12948
+ SurveyElement.ScrollElementToViewCore = function (el, checkLeft, scrollIfVisible, scrollIntoViewOptions, doneCallback) {
12949
+ if (!el || !el.scrollIntoView)
12950
+ return false;
12951
+ var needScroll = SurveyElement.IsNeedScrollIntoView(el, checkLeft, scrollIfVisible);
12907
12952
  if (needScroll) {
12908
- el.scrollIntoView(scrollIntoViewOptions);
12953
+ SurveyElement.ScrollIntoView(el, scrollIntoViewOptions, doneCallback);
12909
12954
  }
12910
12955
  return needScroll;
12911
12956
  };
@@ -13273,6 +13318,17 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13273
13318
  this.surveyChangedCallback();
13274
13319
  }
13275
13320
  };
13321
+ Object.defineProperty(SurveyElement.prototype, "skeletonHeight", {
13322
+ get: function () {
13323
+ var skeletonHeight = undefined;
13324
+ if (!!this.survey && this.survey.skeletonHeight) {
13325
+ skeletonHeight = this.survey.skeletonHeight + "px";
13326
+ }
13327
+ return skeletonHeight;
13328
+ },
13329
+ enumerable: false,
13330
+ configurable: true
13331
+ });
13276
13332
  Object.defineProperty(SurveyElement.prototype, "isInternal", {
13277
13333
  get: function () {
13278
13334
  return this.isContentElement;
@@ -13644,7 +13700,7 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13644
13700
  };
13645
13701
  Object.defineProperty(SurveyElement.prototype, "isDefaultV2Theme", {
13646
13702
  get: function () {
13647
- return this.survey && this.survey.getCss().root == "sd-root-modern";
13703
+ return this.survey && this.survey.getCss().root.indexOf("sd-root-modern") !== -1;
13648
13704
  },
13649
13705
  enumerable: false,
13650
13706
  configurable: true
@@ -13997,7 +14053,8 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
13997
14053
  },
13998
14054
  getLeaveOptions: function () {
13999
14055
  var cssClasses = _this.isPanel ? _this.cssClasses.panel : _this.cssClasses;
14000
- return { cssClass: cssClasses.contentLeave,
14056
+ return {
14057
+ cssClass: cssClasses.contentLeave,
14001
14058
  onBeforeRunAnimation: beforeRunAnimation,
14002
14059
  onAfterRunAnimation: afterRunAnimation
14003
14060
  };
@@ -14040,12 +14097,16 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14040
14097
  SurveyElement.prototype.getIsAnimationAllowed = function () {
14041
14098
  return _super.prototype.getIsAnimationAllowed.call(this) && !!this.survey && !this.survey["isEndLoadingFromJson"];
14042
14099
  };
14100
+ SurveyElement.prototype.afterRenderCore = function (element) {
14101
+ this.onAfterRenderElement.fire(this, { htmlElement: element });
14102
+ };
14043
14103
  SurveyElement.prototype.dispose = function () {
14044
14104
  _super.prototype.dispose.call(this);
14045
14105
  if (this.titleToolbarValue) {
14046
14106
  this.titleToolbarValue.dispose();
14047
14107
  }
14048
14108
  };
14109
+ // TODO V2: get rid of this flag
14049
14110
  SurveyElement.CreateDisabledDesignElements = false;
14050
14111
  survey_element_decorate([
14051
14112
  jsonobject_property({ defaultValue: null })
@@ -14078,6 +14139,66 @@ var survey_element_SurveyElement = /** @class */ (function (_super) {
14078
14139
  return SurveyElement;
14079
14140
  }(survey_element_SurveyElementCore));
14080
14141
 
14142
+ var RenderingCompletedAwaiter = /** @class */ (function () {
14143
+ function RenderingCompletedAwaiter(_elements, _renderedHandler, waitingTimeout) {
14144
+ var _this = this;
14145
+ if (waitingTimeout === void 0) { waitingTimeout = 100; }
14146
+ this._elements = _elements;
14147
+ this._renderedHandler = _renderedHandler;
14148
+ this._elementsToRenderCount = 0;
14149
+ this._elementsToRenderTimer = undefined;
14150
+ this._elementRenderedHandler = function (s, o) {
14151
+ var _a;
14152
+ (_a = s.onAfterRenderElement) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
14153
+ _this._elementsToRenderCount--;
14154
+ if (_this._elementsToRenderCount <= 0) {
14155
+ _this.visibleElementsRendered();
14156
+ }
14157
+ };
14158
+ this._elements.forEach(function (element) {
14159
+ if (element.onAfterRenderElement) {
14160
+ element.onAfterRenderElement.add(_this._elementRenderedHandler);
14161
+ _this._elementsToRenderCount++;
14162
+ }
14163
+ });
14164
+ if (this._elementsToRenderCount > 0) {
14165
+ this._elementsToRenderTimer = setTimeout(function () {
14166
+ if (_this._elementsToRenderCount > 0) {
14167
+ _this.visibleElementsRendered();
14168
+ }
14169
+ }, waitingTimeout);
14170
+ }
14171
+ else {
14172
+ this.visibleElementsRendered();
14173
+ }
14174
+ }
14175
+ RenderingCompletedAwaiter.prototype.stopWaitingForElementsRendering = function () {
14176
+ var _this = this;
14177
+ if (this._elementsToRenderTimer) {
14178
+ clearTimeout(this._elementsToRenderTimer);
14179
+ this._elementsToRenderTimer = undefined;
14180
+ }
14181
+ this._elements.forEach(function (element) {
14182
+ var _a;
14183
+ (_a = element.onAfterRenderElement) === null || _a === void 0 ? void 0 : _a.remove(_this._elementRenderedHandler);
14184
+ });
14185
+ this._elementsToRenderCount = 0;
14186
+ };
14187
+ RenderingCompletedAwaiter.prototype.visibleElementsRendered = function () {
14188
+ var renderedHandler = this._renderedHandler;
14189
+ this.dispose();
14190
+ if (typeof renderedHandler == "function") {
14191
+ renderedHandler();
14192
+ }
14193
+ };
14194
+ RenderingCompletedAwaiter.prototype.dispose = function () {
14195
+ this.stopWaitingForElementsRendering();
14196
+ this._elements = undefined;
14197
+ this._renderedHandler = undefined;
14198
+ };
14199
+ return RenderingCompletedAwaiter;
14200
+ }());
14201
+
14081
14202
 
14082
14203
  // CONCATENATED MODULE: ./packages/survey-core/src/localizablestring.ts
14083
14204
 
@@ -14807,7 +14928,7 @@ function findScrollableParent(element) {
14807
14928
  }
14808
14929
  return findScrollableParent(element.parentElement);
14809
14930
  }
14810
- function scrollElementByChildId(id) {
14931
+ function activateLazyRenderingChecks(id) {
14811
14932
  var environment = settings.environment;
14812
14933
  if (!environment)
14813
14934
  return;
@@ -17412,21 +17533,26 @@ var text_area_TextAreaModel = /** @class */ (function () {
17412
17533
  this.onPropertyChangedCallback = function () {
17413
17534
  if (_this.element) {
17414
17535
  _this.element.value = _this.getTextValue();
17415
- if (_this.autoGrow) {
17416
- increaseHeightByContent(_this.element);
17417
- }
17536
+ _this.updateElement();
17418
17537
  }
17419
17538
  };
17420
17539
  this.question.registerFunctionOnPropertyValueChanged(this.options.propertyName, this.onPropertyChangedCallback, "__textarea");
17421
17540
  }
17541
+ TextAreaModel.prototype.updateElement = function () {
17542
+ var _this = this;
17543
+ if (this.element && this.autoGrow) {
17544
+ setTimeout(function () { return increaseHeightByContent(_this.element); }, 1);
17545
+ }
17546
+ };
17422
17547
  TextAreaModel.prototype.setElement = function (element) {
17423
17548
  if (!!element) {
17424
17549
  this.element = element;
17550
+ this.updateElement();
17425
17551
  }
17426
17552
  };
17427
17553
  TextAreaModel.prototype.getTextValue = function () {
17428
17554
  if (!!this.options.getTextValue)
17429
- return this.options.getTextValue();
17555
+ return this.options.getTextValue() || "";
17430
17556
  return "";
17431
17557
  };
17432
17558
  TextAreaModel.prototype.onTextAreaChange = function (event) {
@@ -18691,7 +18817,8 @@ var question_Question = /** @class */ (function (_super) {
18691
18817
  }
18692
18818
  this.checkForResponsiveness(el);
18693
18819
  };
18694
- Question.prototype.afterRenderCore = function (el) {
18820
+ Question.prototype.afterRenderCore = function (element) {
18821
+ _super.prototype.afterRenderCore.call(this, element);
18695
18822
  };
18696
18823
  Question.prototype.getCommentElementsId = function () {
18697
18824
  return [this.commentId];
@@ -19303,7 +19430,7 @@ var question_Question = /** @class */ (function (_super) {
19303
19430
  });
19304
19431
  Object.defineProperty(Question.prototype, "isDisabledAttr", {
19305
19432
  get: function () {
19306
- return this.isDesignModeV2;
19433
+ return this.isDesignModeV2 || (!!this.readOnlyCallback && this.readOnlyCallback());
19307
19434
  },
19308
19435
  enumerable: false,
19309
19436
  configurable: true
@@ -19497,7 +19624,7 @@ var question_Question = /** @class */ (function (_super) {
19497
19624
  *
19498
19625
  * | Question type | Value type(s) |
19499
19626
  * | ------------- | ------------- |
19500
- * | Checkboxes | `Array<string \| number>` |
19627
+ * | Checkboxes | <code>Array&lt;string &#124; number&gt;</code> |
19501
19628
  * | Dropdown | `string` \| `number` |
19502
19629
  * | Dynamic Matrix | `Array<object>` |
19503
19630
  * | Dynamic Panel | `Array<object>` |
@@ -19505,14 +19632,14 @@ var question_Question = /** @class */ (function (_super) {
19505
19632
  * | File Upload | `File` \| `Array<File>` |
19506
19633
  * | HTML | (no value) |
19507
19634
  * | Image | (no value) |
19508
- * | Image Picker | `Array<string \| number>` |
19635
+ * | Image Picker | <code>Array&lt;string &#124; number&gt;</code> |
19509
19636
  * | Long Text | `string` |
19510
19637
  * | Multi-Select Dropdown | `object` |
19511
19638
  * | Multi-Select Matrix | `object` |
19512
19639
  * | Multiple Textboxes | `Array<string>` |
19513
19640
  * | Panel | (no value) |
19514
19641
  * | Radio Button Group | `string` \| `number` |
19515
- * | Ranking | `Array<string \| number>` |
19642
+ * | Ranking | <code>Array&lt;string &#124; number&gt;</code> |
19516
19643
  * | Rating Scale | `number` \| `string` |
19517
19644
  * | Signature | `string` (base64-encoded image) |
19518
19645
  * | Single-Line Input | `string` \| `number` \| `Date` |
@@ -20267,11 +20394,12 @@ var question_Question = /** @class */ (function (_super) {
20267
20394
  };
20268
20395
  Question.prototype.removeError = function (error) {
20269
20396
  if (!error)
20270
- return;
20397
+ return false;
20271
20398
  var errors = this.errors;
20272
20399
  var index = errors.indexOf(error);
20273
20400
  if (index !== -1)
20274
20401
  errors.splice(index, 1);
20402
+ return index !== -1;
20275
20403
  };
20276
20404
  Question.prototype.checkForErrors = function (isOnValueChanged, fireCallback) {
20277
20405
  var qErrors = new Array();
@@ -29787,9 +29915,11 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29787
29915
  rec.validationValues = this.getDataFilteredValues();
29788
29916
  rec.isSingleDetailPanel = this.detailPanelMode === "underRowSingle";
29789
29917
  for (var i = 0; i < rows.length; i++) {
29790
- res = rows[i].hasErrors(fireCallback, rec, function () {
29791
- _this.raiseOnCompletedAsyncValidators();
29792
- }) || res;
29918
+ if (rows[i].isVisible) {
29919
+ res = rows[i].hasErrors(fireCallback, rec, function () {
29920
+ _this.raiseOnCompletedAsyncValidators();
29921
+ }) || res;
29922
+ }
29793
29923
  }
29794
29924
  return res;
29795
29925
  };
@@ -29876,7 +30006,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29876
30006
  if (duplicatedRows.indexOf(row) < 0) {
29877
30007
  var question = row.getQuestionByName(columnName);
29878
30008
  if (question) {
29879
- _this.removeDuplicationError(question);
30009
+ _this.removeDuplicationError(row, question);
29880
30010
  }
29881
30011
  }
29882
30012
  });
@@ -29894,8 +30024,10 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
29894
30024
  question.addError(new KeyDuplicationError(this.keyDuplicationError, this));
29895
30025
  }
29896
30026
  };
29897
- QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (question) {
29898
- question.removeError(this.getDuplicationError(question));
30027
+ QuestionMatrixDropdownModelBase.prototype.removeDuplicationError = function (row, question) {
30028
+ if (question.removeError(this.getDuplicationError(question)) && question.errors.length === 0 && !!row.editingObj) {
30029
+ row.editingObj[question.getValueName()] = question.value;
30030
+ }
29899
30031
  };
29900
30032
  QuestionMatrixDropdownModelBase.prototype.getFirstQuestionToFocus = function (withError) {
29901
30033
  return this.getFirstCellQuestion(withError);
@@ -30006,7 +30138,14 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30006
30138
  });
30007
30139
  Object.defineProperty(QuestionMatrixDropdownModelBase.prototype, "hasInvisibleRows", {
30008
30140
  get: function () {
30009
- return !!this.visibleRowsArray && this.visibleRowsArray.length !== this.generatedVisibleRows.length;
30141
+ var rows = this.generatedVisibleRows;
30142
+ if (!Array.isArray(rows))
30143
+ return false;
30144
+ for (var i = 0; i < rows.length; i++) {
30145
+ if (!rows[i].isVisible)
30146
+ return true;
30147
+ }
30148
+ return false;
30010
30149
  },
30011
30150
  enumerable: false,
30012
30151
  configurable: true
@@ -30217,7 +30356,7 @@ var question_matrixdropdownbase_QuestionMatrixDropdownModelBase = /** @class */
30217
30356
  };
30218
30357
  QuestionMatrixDropdownModelBase.prototype.clearInvisibleValuesInRows = function () {
30219
30358
  var _a;
30220
- if (this.isEmpty() || !this.isRowsFiltered)
30359
+ if (this.isEmpty() || !this.isRowsFiltered())
30221
30360
  return;
30222
30361
  var sharedQuestions = ((_a = this.survey) === null || _a === void 0 ? void 0 : _a.questionsByValueName(this.getValueName())) || [];
30223
30362
  if (sharedQuestions.length < 2) {
@@ -31497,10 +31636,10 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31497
31636
  };
31498
31637
  _this.createLocalizableString("removeRowText", _this, false, "removeRow");
31499
31638
  _this.createLocalizableString("emptyRowsText", _this, false, true);
31500
- _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () {
31501
- _this.updateShowTableAndAddRow();
31502
- });
31639
+ _this.registerPropertyChangedHandlers(["hideColumnsIfEmpty", "allowAddRows"], function () { _this.updateShowTableAndAddRow(); });
31503
31640
  _this.registerPropertyChangedHandlers(["allowRowsDragAndDrop", "isReadOnly", "lockedRowCount"], function () { _this.resetRenderedTable(); });
31641
+ _this.registerPropertyChangedHandlers(["minRowCount"], function () { _this.onMinRowCountChanged(); });
31642
+ _this.registerPropertyChangedHandlers(["maxRowCount"], function () { _this.onMaxRowCountChanged(); });
31504
31643
  _this.dragOrClickHelper = new dragOrClickHelper_DragOrClickHelper(_this.startDragMatrixRow);
31505
31644
  return _this;
31506
31645
  }
@@ -31608,7 +31747,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31608
31747
  return (_super.prototype.isDefaultValueEmpty.call(this) && this.isValueEmpty(this.defaultRowValue));
31609
31748
  };
31610
31749
  QuestionMatrixDynamicModel.prototype.valueFromData = function (val) {
31611
- if (this.minRowCount < 1)
31750
+ if (this.minRowCount < 1 || this.isEmpty())
31612
31751
  return _super.prototype.valueFromData.call(this, val);
31613
31752
  if (!Array.isArray(val))
31614
31753
  val = [];
@@ -31778,14 +31917,19 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31778
31917
  if (val < 0)
31779
31918
  val = 0;
31780
31919
  this.setPropertyValue("minRowCount", val);
31781
- if (val > this.maxRowCount)
31782
- this.maxRowCount = val;
31783
- if (this.rowCount < val)
31784
- this.rowCount = val;
31785
31920
  },
31786
31921
  enumerable: false,
31787
31922
  configurable: true
31788
31923
  });
31924
+ QuestionMatrixDynamicModel.prototype.onMinRowCountChanged = function () {
31925
+ var val = this.minRowCount;
31926
+ if (val > this.maxRowCount)
31927
+ this.maxRowCount = val;
31928
+ if (this.initialRowCount < val)
31929
+ this.initialRowCount = val;
31930
+ if (this.rowCount < val)
31931
+ this.rowCount = val;
31932
+ };
31789
31933
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "maxRowCount", {
31790
31934
  /**
31791
31935
  * A maximum number of rows in the matrix. Users cannot add new rows if `rowCount` equals `maxRowCount`.
@@ -31806,14 +31950,17 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31806
31950
  if (val == this.maxRowCount)
31807
31951
  return;
31808
31952
  this.setPropertyValue("maxRowCount", val);
31809
- if (val < this.minRowCount)
31810
- this.minRowCount = val;
31811
- if (this.rowCount > val)
31812
- this.rowCount = val;
31813
31953
  },
31814
31954
  enumerable: false,
31815
31955
  configurable: true
31816
31956
  });
31957
+ QuestionMatrixDynamicModel.prototype.onMaxRowCountChanged = function () {
31958
+ var val = this.maxRowCount;
31959
+ if (val < this.minRowCount)
31960
+ this.minRowCount = val;
31961
+ if (this.rowCount > val)
31962
+ this.rowCount = val;
31963
+ };
31817
31964
  Object.defineProperty(QuestionMatrixDynamicModel.prototype, "allowAddRows", {
31818
31965
  /**
31819
31966
  * Specifies whether users are allowed to add new rows.
@@ -31908,6 +32055,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31908
32055
  this.addRow(true);
31909
32056
  };
31910
32057
  QuestionMatrixDynamicModel.prototype.getQuestionToFocusOnAddingRow = function () {
32058
+ if (this.visibleRows.length === 0)
32059
+ return null;
31911
32060
  var row = this.visibleRows[this.visibleRows.length - 1];
31912
32061
  for (var i = 0; i < row.cells.length; i++) {
31913
32062
  var q = row.cells[i].question;
@@ -31985,8 +32134,9 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
31985
32134
  }
31986
32135
  if (this.data) {
31987
32136
  this.runCellsCondition(this.getDataFilteredValues(), this.getDataFilteredProperties());
31988
- if (this.isValueEmpty(defaultValue)) {
31989
- var row = this.visibleRows[this.rowCount - 1];
32137
+ var rows = this.visibleRows;
32138
+ if (this.isValueEmpty(defaultValue) && rows.length > 0) {
32139
+ var row = rows[rows.length - 1];
31990
32140
  if (!this.isValueEmpty(row.value)) {
31991
32141
  if (!newValue) {
31992
32142
  newValue = this.createNewValue();
@@ -32000,8 +32150,10 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32000
32150
  }
32001
32151
  }
32002
32152
  if (this.survey) {
32003
- if (prevRowCount + 1 == this.rowCount) {
32004
- this.survey.matrixRowAdded(this, this.visibleRows[this.visibleRows.length - 1]);
32153
+ var rows = this.visibleRows;
32154
+ if (prevRowCount + 1 == this.rowCount && rows.length > 0) {
32155
+ var row = rows[rows.length - 1];
32156
+ this.survey.matrixRowAdded(this, row);
32005
32157
  this.onRowsChanged();
32006
32158
  }
32007
32159
  }
@@ -32352,6 +32504,7 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32352
32504
  newRow = lastDelRow;
32353
32505
  }
32354
32506
  else {
32507
+ lastDelRow = undefined;
32355
32508
  newRow = this.createMatrixRow(val[index]);
32356
32509
  }
32357
32510
  rows.splice(index, 0, newRow);
@@ -32434,6 +32587,8 @@ var question_matrixdynamic_QuestionMatrixDynamicModel = /** @class */ (function
32434
32587
  return result;
32435
32588
  };
32436
32589
  QuestionMatrixDynamicModel.prototype.deleteRowValue = function (newValue, row) {
32590
+ if (!Array.isArray(newValue))
32591
+ return newValue;
32437
32592
  var isEmpty = true;
32438
32593
  for (var i = 0; i < newValue.length; i++) {
32439
32594
  if (this.isObject(newValue[i]) && Object.keys(newValue[i]).length > 0) {
@@ -33275,6 +33430,7 @@ var defaultV2Css = {
33275
33430
  changeCameraButton: "sd-file__change-camera-button",
33276
33431
  takePictureButton: "sd-file__take-picture-button",
33277
33432
  loadingIndicator: "sd-file__loading-indicator",
33433
+ page: "sd-file__page"
33278
33434
  },
33279
33435
  signaturepad: {
33280
33436
  mainRoot: "sd-element sd-question sd-question--signature sd-row__question",
@@ -33605,7 +33761,8 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
33605
33761
  function SurveyTimer() {
33606
33762
  this.listenerCounter = 0;
33607
33763
  this.timerId = -1;
33608
- this.onTimer = new EventBase();
33764
+ this.onTimerTick = new EventBase();
33765
+ this.onTimer = this.onTimerTick;
33609
33766
  }
33610
33767
  Object.defineProperty(SurveyTimer, "instance", {
33611
33768
  get: function () {
@@ -33621,7 +33778,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
33621
33778
  var _this = this;
33622
33779
  if (func === void 0) { func = null; }
33623
33780
  if (func) {
33624
- this.onTimer.add(func);
33781
+ this.onTimerTick.add(func);
33625
33782
  }
33626
33783
  this.prevTimeInMs = surveyTimerFunctions.now();
33627
33784
  if (this.timerId < 0) {
@@ -33634,7 +33791,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
33634
33791
  SurveyTimer.prototype.stop = function (func) {
33635
33792
  if (func === void 0) { func = null; }
33636
33793
  if (func) {
33637
- this.onTimer.remove(func);
33794
+ this.onTimerTick.remove(func);
33638
33795
  }
33639
33796
  this.listenerCounter--;
33640
33797
  if (this.listenerCounter == 0 && this.timerId > -1) {
@@ -33644,7 +33801,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
33644
33801
  };
33645
33802
  SurveyTimer.prototype.doTimer = function () {
33646
33803
  var _this = this;
33647
- if (this.onTimer.isEmpty || this.listenerCounter == 0) {
33804
+ if (this.onTimerTick.isEmpty || this.listenerCounter == 0) {
33648
33805
  this.timerId = -1;
33649
33806
  }
33650
33807
  if (this.timerId < 0)
@@ -33656,7 +33813,7 @@ var surveytimer_SurveyTimer = /** @class */ (function () {
33656
33813
  seconds = 1;
33657
33814
  }
33658
33815
  var prevItem = this.timerId;
33659
- this.onTimer.fire(this, { seconds: seconds });
33816
+ this.onTimerTick.fire(this, { seconds: seconds });
33660
33817
  //We have to check that we have the same timerId
33661
33818
  //It could be changed during events execution and it will lead to double timer events
33662
33819
  if (prevItem !== this.timerId)
@@ -33756,8 +33913,8 @@ var surveyTimerModel_SurveyTimerModel = /** @class */ (function (_super) {
33756
33913
  }
33757
33914
  this.spent = this.spent + seconds;
33758
33915
  this.update();
33759
- if (this.onTimer) {
33760
- this.onTimer(page);
33916
+ if (this.onTimerTick) {
33917
+ this.onTimerTick(page);
33761
33918
  }
33762
33919
  };
33763
33920
  SurveyTimerModel.prototype.updateProgress = function () {
@@ -34737,6 +34894,13 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
34737
34894
  QuestionRowModel.getRowId = function () {
34738
34895
  return "pr_" + QuestionRowModel.rowCounter++;
34739
34896
  };
34897
+ Object.defineProperty(QuestionRowModel.prototype, "allowRendering", {
34898
+ get: function () {
34899
+ return !this.panel || !this.panel.survey || !this.panel.survey["isLazyRenderingSuspended"];
34900
+ },
34901
+ enumerable: false,
34902
+ configurable: true
34903
+ });
34740
34904
  QuestionRowModel.prototype.startLazyRendering = function (rowContainerDiv, findScrollableContainer) {
34741
34905
  var _this = this;
34742
34906
  if (findScrollableContainer === void 0) { findScrollableContainer = findScrollableParent; }
@@ -34751,6 +34915,9 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
34751
34915
  this.isNeedRender = !hasScroll;
34752
34916
  if (hasScroll) {
34753
34917
  this._updateVisibility = function () {
34918
+ if (!_this.allowRendering) {
34919
+ return;
34920
+ }
34754
34921
  var isRowContainerDivVisible = isElementVisible(rowContainerDiv, 50);
34755
34922
  if (!_this.isNeedRender && isRowContainerDivVisible) {
34756
34923
  _this.isNeedRender = true;
@@ -34884,6 +35051,10 @@ var panel_QuestionRowModel = /** @class */ (function (_super) {
34884
35051
  if (this.elements[i].isVisible) {
34885
35052
  visElements.push(this.elements[i]);
34886
35053
  }
35054
+ if (this.elements[i].isPanel || this.elements[i].getType() === "paneldynamic") {
35055
+ this.setIsLazyRendering(false);
35056
+ this.stopLazyRendering();
35057
+ }
34887
35058
  }
34888
35059
  this.visibleElements = visElements;
34889
35060
  return;
@@ -35494,7 +35665,7 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
35494
35665
  PanelModelBase.prototype.getValue = function () {
35495
35666
  var data = {};
35496
35667
  this.collectValues(data, 0);
35497
- return data;
35668
+ return helpers_Helpers.getUnbindValue(data);
35498
35669
  };
35499
35670
  PanelModelBase.prototype.collectValues = function (data, level) {
35500
35671
  var elements = this.elements;
@@ -36094,11 +36265,21 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36094
36265
  this.onVisibleChanged();
36095
36266
  }
36096
36267
  };
36268
+ PanelModelBase.prototype.canRenderFirstRows = function () {
36269
+ return this.isPage;
36270
+ };
36271
+ PanelModelBase.prototype.isLazyRenderInRow = function (rowIndex) {
36272
+ if (!this.survey || !this.survey.isLazyRendering)
36273
+ return false;
36274
+ return (rowIndex >= this.survey.lazyRenderingFirstBatchSize ||
36275
+ !this.canRenderFirstRows());
36276
+ };
36097
36277
  PanelModelBase.prototype.createRowAndSetLazy = function (index) {
36098
36278
  var row = this.createRow();
36099
36279
  row.setIsLazyRendering(this.isLazyRenderInRow(index));
36100
36280
  return row;
36101
36281
  };
36282
+ // TODO V2: make all createRow API private (at least protected) after removing DragDropPanelHelperV1
36102
36283
  PanelModelBase.prototype.createRow = function () {
36103
36284
  return new panel_QuestionRowModel(this);
36104
36285
  };
@@ -36329,15 +36510,6 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36329
36510
  }
36330
36511
  return result;
36331
36512
  };
36332
- PanelModelBase.prototype.isLazyRenderInRow = function (rowIndex) {
36333
- if (!this.survey || !this.survey.isLazyRendering)
36334
- return false;
36335
- return (rowIndex >= this.survey.lazyRenderingFirstBatchSize ||
36336
- !this.canRenderFirstRows());
36337
- };
36338
- PanelModelBase.prototype.canRenderFirstRows = function () {
36339
- return this.isPage;
36340
- };
36341
36513
  PanelModelBase.prototype.getDragDropInfo = function () {
36342
36514
  var page = this.getPage(this.parent);
36343
36515
  return !!page ? page.getDragDropInfo() : undefined;
@@ -36367,27 +36539,74 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36367
36539
  }
36368
36540
  }
36369
36541
  };
36370
- PanelModelBase.prototype.disableLazyRenderingBeforeElement = function (el) {
36371
- var row = el ? this.findRowByElement(el) : undefined;
36372
- var index = el ? this.rows.indexOf(row) : this.rows.length - 1;
36373
- for (var i = index; i >= 0; i--) {
36374
- var currentRow = this.rows[i];
36375
- if (currentRow.isNeedRender) {
36376
- break;
36377
- }
36378
- else {
36379
- currentRow.isNeedRender = true;
36380
- currentRow.stopLazyRendering();
36381
- }
36382
- }
36542
+ PanelModelBase.prototype.getAllRows = function () {
36543
+ var _this = this;
36544
+ var allRows = [];
36545
+ this.rows.forEach(function (row) {
36546
+ var nestedRows = [];
36547
+ row.elements.forEach(function (element) {
36548
+ if (element.isPanel) {
36549
+ nestedRows.push.apply(nestedRows, element.getAllRows());
36550
+ }
36551
+ else if (element.getType() == "paneldynamic") {
36552
+ if (_this.isDesignMode) {
36553
+ nestedRows.push.apply(nestedRows, element.template.getAllRows());
36554
+ }
36555
+ else {
36556
+ element.panels.forEach(function (panel) { return nestedRows.push.apply(nestedRows, panel.getAllRows()); });
36557
+ }
36558
+ }
36559
+ });
36560
+ allRows.push(row);
36561
+ allRows.push.apply(allRows, nestedRows);
36562
+ });
36563
+ return allRows;
36383
36564
  };
36384
- PanelModelBase.prototype.findRowByElement = function (el) {
36385
- var rows = this.rows;
36565
+ PanelModelBase.prototype.findRowAndIndexByElement = function (el, rows) {
36566
+ if (!el) {
36567
+ return { row: undefined, index: this.rows.length - 1 };
36568
+ }
36569
+ rows = rows || this.rows;
36386
36570
  for (var i = 0; i < rows.length; i++) {
36387
36571
  if (rows[i].elements.indexOf(el) > -1)
36388
- return rows[i];
36572
+ return { row: rows[i], index: i };
36573
+ }
36574
+ return { row: null, index: -1 };
36575
+ };
36576
+ PanelModelBase.prototype.forceRenderRow = function (row) {
36577
+ if (!!row && !row.isNeedRender) {
36578
+ row.isNeedRender = true;
36579
+ row.stopLazyRendering();
36580
+ }
36581
+ };
36582
+ PanelModelBase.prototype.forceRenderElement = function (el, elementsRendered, gap) {
36583
+ if (elementsRendered === void 0) { elementsRendered = function () { }; }
36584
+ if (gap === void 0) { gap = 0; }
36585
+ var allRows = this.getAllRows();
36586
+ var _a = this.findRowAndIndexByElement(el, allRows), row = _a.row, index = _a.index;
36587
+ if (index >= 0 && index < allRows.length) {
36588
+ var rowsToRender = [];
36589
+ rowsToRender.push(row);
36590
+ for (var i = index - 1; i >= index - gap && i >= 0; i--) {
36591
+ rowsToRender.push(allRows[i]);
36592
+ }
36593
+ this.forceRenderRows(rowsToRender, elementsRendered);
36389
36594
  }
36390
- return null;
36595
+ };
36596
+ PanelModelBase.prototype.forceRenderRows = function (rows, elementsRendered) {
36597
+ var _this = this;
36598
+ if (elementsRendered === void 0) { elementsRendered = function () { }; }
36599
+ var rowRenderedHandler = (function (rowsCount) { return function () {
36600
+ rowsCount--;
36601
+ if (rowsCount <= 0) {
36602
+ elementsRendered();
36603
+ }
36604
+ }; })(rows.length);
36605
+ rows.forEach(function (row) { return new RenderingCompletedAwaiter(row.visibleElements, rowRenderedHandler); });
36606
+ rows.forEach(function (row) { return _this.forceRenderRow(row); });
36607
+ };
36608
+ PanelModelBase.prototype.findRowByElement = function (el) {
36609
+ return this.findRowAndIndexByElement(el).row;
36391
36610
  };
36392
36611
  PanelModelBase.prototype.elementWidthChanged = function (el) {
36393
36612
  if (this.isLoadingFromJson)
@@ -36843,6 +37062,9 @@ var panel_PanelModelBase = /** @class */ (function (_super) {
36843
37062
  }
36844
37063
  return this.layoutColumns.slice(0, tailIndex + 1);
36845
37064
  };
37065
+ PanelModelBase.prototype.afterRender = function (el) {
37066
+ this.afterRenderCore(el);
37067
+ };
36846
37068
  PanelModelBase.prototype.dispose = function () {
36847
37069
  _super.prototype.dispose.call(this);
36848
37070
  if (this.rows) {
@@ -37071,7 +37293,7 @@ var panel_PanelModel = /** @class */ (function (_super) {
37071
37293
  };
37072
37294
  PanelModel.prototype.beforeSetVisibleIndex = function (index) {
37073
37295
  var visibleIndex = -1;
37074
- if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty)) {
37296
+ if (this.showNumber && (this.isDesignMode || !this.locTitle.isEmpty || this.hasParentInQuestionIndex())) {
37075
37297
  visibleIndex = index;
37076
37298
  }
37077
37299
  this.setPropertyValue("visibleIndex", visibleIndex);
@@ -37079,14 +37301,21 @@ var panel_PanelModel = /** @class */ (function (_super) {
37079
37301
  return visibleIndex < 0 ? 0 : 1;
37080
37302
  };
37081
37303
  PanelModel.prototype.getPanelStartIndex = function (index) {
37082
- if (this.showQuestionNumbers == "off")
37304
+ if (this.showQuestionNumbers === "off")
37083
37305
  return -1;
37084
- if (this.showQuestionNumbers == "onpanel")
37306
+ if (this.showQuestionNumbers === "onpanel")
37085
37307
  return 0;
37086
37308
  return index;
37087
37309
  };
37310
+ PanelModel.prototype.hasParentInQuestionIndex = function () {
37311
+ if (this.showQuestionNumbers !== "onpanel")
37312
+ return false;
37313
+ var str = this.questionStartIndex;
37314
+ var index = str.indexOf(".");
37315
+ return index > -1 && index < str.length - 1;
37316
+ };
37088
37317
  PanelModel.prototype.isContinueNumbering = function () {
37089
- return (this.showQuestionNumbers != "off" && this.showQuestionNumbers != "onpanel");
37318
+ return this.showQuestionNumbers !== "off" && this.showQuestionNumbers !== "onpanel";
37090
37319
  };
37091
37320
  PanelModel.prototype.notifySurveyOnVisibilityChanged = function () {
37092
37321
  if (this.survey != null && !this.isLoadingFromJson) {
@@ -37308,6 +37537,11 @@ var panel_PanelModel = /** @class */ (function (_super) {
37308
37537
  PanelModel.prototype.getContainerCss = function () {
37309
37538
  return this.getCssRoot(this.cssClasses.panel);
37310
37539
  };
37540
+ PanelModel.prototype.afterRenderCore = function (element) {
37541
+ var _a;
37542
+ _super.prototype.afterRenderCore.call(this, element);
37543
+ (_a = this.survey) === null || _a === void 0 ? void 0 : _a.afterRenderPanel(this, element);
37544
+ };
37311
37545
  return PanelModel;
37312
37546
  }(panel_PanelModelBase));
37313
37547
 
@@ -37661,7 +37895,7 @@ var page_PageModel = /** @class */ (function (_super) {
37661
37895
  _this.hasShownValue = false;
37662
37896
  /**
37663
37897
  * A time period that a respondent has spent on this page so far; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
37664
- * @see maxTimeToFinish
37898
+ * @see timeLimit
37665
37899
  */
37666
37900
  _this.timeSpent = 0;
37667
37901
  _this.createLocalizableString("navigationDescription", _this, true);
@@ -37754,6 +37988,13 @@ var page_PageModel = /** @class */ (function (_super) {
37754
37988
  this.locNavigationTitle.strChanged();
37755
37989
  this.locNavigationDescription.strChanged();
37756
37990
  };
37991
+ PageModel.prototype.getMarkdownHtml = function (text, name) {
37992
+ var result = _super.prototype.getMarkdownHtml.call(this, text, name);
37993
+ if (name === "navigationTitle" && this.canShowPageNumber() && result) {
37994
+ return this.num + ". " + result;
37995
+ }
37996
+ return result;
37997
+ };
37757
37998
  Object.defineProperty(PageModel.prototype, "passed", {
37758
37999
  get: function () {
37759
38000
  return this.getPropertyValue("passed", false);
@@ -37941,12 +38182,6 @@ var page_PageModel = /** @class */ (function (_super) {
37941
38182
  this.survey.scrollElementToTop(this, null, this, this.id);
37942
38183
  }
37943
38184
  };
37944
- // public get timeSpent(): number {
37945
- // return this.getPropertyValue("timeSpent", 0);
37946
- // }
37947
- // public set timeSpent(val: number) {
37948
- // this.setPropertyValue("timeSpent", val);
37949
- // }
37950
38185
  /**
37951
38186
  * Returns a list of all panels on this page.
37952
38187
  * @param visibleOnly A Boolean value that specifies whether to include only visible panels.
@@ -37964,28 +38199,42 @@ var page_PageModel = /** @class */ (function (_super) {
37964
38199
  if (includingDesignTime === void 0) { includingDesignTime = false; }
37965
38200
  return this.getAllPanels(visibleOnly, includingDesignTime);
37966
38201
  };
37967
- Object.defineProperty(PageModel.prototype, "maxTimeToFinish", {
38202
+ Object.defineProperty(PageModel.prototype, "timeLimit", {
37968
38203
  /**
37969
38204
  * A time period that a respondent has to complete this page; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
37970
38205
  *
37971
- * A negative value or 0 sets an unlimited time period.
38206
+ * Default value: 0 (time is unlimited)
37972
38207
  *
37973
- * Alternatively, you can use the `SurveyModel`'s [`maxTimeToFinishPage`](https://surveyjs.io/form-library/documentation/surveymodel#maxTimeToFinishPage) property to specify identical time periods for all survey pages.
38208
+ * Alternatively, you can use the `SurveyModel`'s [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/surveymodel#timeLimitPerPage) property to specify identical time periods for all survey pages.
37974
38209
  * @see timeSpent
37975
38210
  */
37976
38211
  get: function () {
37977
- return this.getPropertyValue("maxTimeToFinish", 0);
38212
+ return this.getPropertyValue("timeLimit", 0);
37978
38213
  },
37979
38214
  set: function (val) {
37980
- this.setPropertyValue("maxTimeToFinish", val);
38215
+ this.setPropertyValue("timeLimit", val);
38216
+ },
38217
+ enumerable: false,
38218
+ configurable: true
38219
+ });
38220
+ Object.defineProperty(PageModel.prototype, "maxTimeToFinish", {
38221
+ /**
38222
+ * Obsolete. Use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeLimit) property instead.
38223
+ * @deprecated
38224
+ */
38225
+ get: function () {
38226
+ return this.timeLimit;
38227
+ },
38228
+ set: function (val) {
38229
+ this.timeLimit = val;
37981
38230
  },
37982
38231
  enumerable: false,
37983
38232
  configurable: true
37984
38233
  });
37985
38234
  PageModel.prototype.getMaxTimeToFinish = function () {
37986
- if (this.maxTimeToFinish !== 0)
37987
- return this.maxTimeToFinish;
37988
- var res = !!this.survey ? this.survey.maxTimeToFinishPage : 0;
38235
+ if (this.timeLimit !== 0)
38236
+ return this.timeLimit;
38237
+ var res = !!this.survey ? this.survey.timeLimitPerPage : 0;
37989
38238
  return res > 0 ? res : 0;
37990
38239
  };
37991
38240
  PageModel.prototype.onNumChanged = function (value) { };
@@ -38027,7 +38276,7 @@ Serializer.addClass("page", [
38027
38276
  default: "inherit",
38028
38277
  choices: ["inherit", "show", "hide"],
38029
38278
  },
38030
- { name: "maxTimeToFinish:number", default: 0, minValue: 0 },
38279
+ { name: "timeLimit:number", alternativeName: "maxTimeToFinish", default: 0, minValue: 0 },
38031
38280
  {
38032
38281
  name: "navigationTitle",
38033
38282
  visibleIf: function (obj) {
@@ -39053,12 +39302,18 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39053
39302
  * An event that is raised every second while the timer is running.
39054
39303
  *
39055
39304
  * Use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeSpent) property to find out how many seconds have elapsed.
39056
- * @see maxTimeToFinish
39057
- * @see maxTimeToFinishPage
39058
- * @see showTimerPanel
39305
+ * @see timeLimit
39306
+ * @see timeLimitPerPage
39307
+ * @see showTimer
39308
+ * @see timerLocation
39059
39309
  * @see startTimer
39060
39310
  */
39061
- _this.onTimer = _this.addEvent();
39311
+ _this.onTimerTick = _this.addEvent();
39312
+ /**
39313
+ * Obsolete. Use the [`onTimerTick`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#onTimerTick) event instead.
39314
+ * @deprecated
39315
+ */
39316
+ _this.onTimer = _this.onTimerTick;
39062
39317
  _this.onTimerPanelInfoText = _this.addEvent();
39063
39318
  /**
39064
39319
  * An event that is raised after an item value is changed in a panel within a [Dynamic Panel](https://surveyjs.io/form-library/examples/questiontype-paneldynamic/) question.
@@ -39155,6 +39410,19 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39155
39410
  */
39156
39411
  _this.jsonErrors = null;
39157
39412
  _this.cssValue = null;
39413
+ /**
39414
+ * Specifies whether the [Complete page](https://surveyjs.io/form-library/documentation/design-survey/create-a-multi-page-survey#complete-page) should display the [survey header](https://surveyjs.io/form-library/examples/brand-your-survey-header/).
39415
+ *
39416
+ * Possible values:
39417
+ *
39418
+ * - `true` - Displays the survey header on the Complete page.
39419
+ * - `false` - Hides the header when users reach the Complete page.
39420
+ * - `"auto"` (default) - Displays a header with the basic view, but hides a header with the advanced view (see the [`headerView`](https://surveyjs.io/form-library/documentation/api-reference/itheme#headerView) property description).
39421
+ *
39422
+ * > This property cannot be specified in the survey JSON schema. Use dot notation to specify it.
39423
+ */
39424
+ _this.showHeaderOnCompletePage = "auto";
39425
+ _this._isLazyRenderingSuspended = false;
39158
39426
  /**
39159
39427
  * Specifies whether to hide validation errors thrown by the Required validation in the UI.
39160
39428
  *
@@ -39191,6 +39459,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39191
39459
  _this.onResize = new EventBase();
39192
39460
  _this.isCurrentPageRendering = true;
39193
39461
  _this.isCurrentPageRendered = undefined;
39462
+ _this.skeletonHeight = undefined;
39194
39463
  _this.isTriggerIsRunning = false;
39195
39464
  _this.triggerValues = null;
39196
39465
  _this.triggerKeys = null;
@@ -39229,7 +39498,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39229
39498
  _this.createLocalizableString("editText", _this, false, true);
39230
39499
  _this.createLocalizableString("questionTitleTemplate", _this, true);
39231
39500
  _this.timerModelValue = new surveyTimerModel_SurveyTimerModel(_this);
39232
- _this.timerModelValue.onTimer = function (page) {
39501
+ _this.timerModelValue.onTimerTick = function (page) {
39233
39502
  _this.doTimer(page);
39234
39503
  };
39235
39504
  _this.createNewArray("pages", function (value) {
@@ -39606,7 +39875,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39606
39875
  Object.defineProperty(SurveyModel.prototype, "bodyCss", {
39607
39876
  get: function () {
39608
39877
  return new CssClassBuilder().append(this.css.body)
39609
- .append(this.css.bodyWithTimer, this.showTimerPanel != "none" && this.state === "running")
39878
+ .append(this.css.bodyWithTimer, this.showTimer && this.state === "running")
39610
39879
  .append(this.css.body + "--" + this.calculatedWidthMode).toString();
39611
39880
  },
39612
39881
  enumerable: false,
@@ -39677,22 +39946,29 @@ var survey_SurveyModel = /** @class */ (function (_super) {
39677
39946
  enumerable: false,
39678
39947
  configurable: true
39679
39948
  });
39680
- SurveyModel.prototype.disableLazyRenderingBeforeElement = function (el) {
39681
- if (this.isDesignMode) {
39682
- var page = this.getPageByElement(el);
39683
- var index = this.pages.indexOf(page);
39684
- for (var i = index; i >= 0; i--) {
39685
- var currentPage = this.pages[i];
39686
- currentPage.disableLazyRenderingBeforeElement(currentPage == page ? el : undefined);
39687
- }
39688
- }
39949
+ Object.defineProperty(SurveyModel.prototype, "isLazyRenderingSuspended", {
39950
+ get: function () {
39951
+ return this._isLazyRenderingSuspended;
39952
+ },
39953
+ enumerable: false,
39954
+ configurable: true
39955
+ });
39956
+ SurveyModel.prototype.suspendLazyRendering = function () {
39957
+ if (!this.isLazyRendering)
39958
+ return;
39959
+ this._isLazyRenderingSuspended = true;
39960
+ };
39961
+ SurveyModel.prototype.releaseLazyRendering = function () {
39962
+ if (!this.isLazyRendering)
39963
+ return;
39964
+ this._isLazyRenderingSuspended = false;
39689
39965
  };
39690
39966
  SurveyModel.prototype.updateLazyRenderingRowsOnRemovingElements = function () {
39691
39967
  if (!this.isLazyRendering)
39692
39968
  return;
39693
39969
  var page = this.currentPage;
39694
39970
  if (!!page) {
39695
- scrollElementByChildId(page.id);
39971
+ activateLazyRenderingChecks(page.id);
39696
39972
  }
39697
39973
  };
39698
39974
  Object.defineProperty(SurveyModel.prototype, "triggers", {
@@ -40925,13 +41201,20 @@ var survey_SurveyModel = /** @class */ (function (_super) {
40925
41201
  /**
40926
41202
  * Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns a result value.
40927
41203
  * @param expression An expression to calculate.
41204
+ * @param callback A callback function that you can use to access the calculation result if the expression uses asynchronous functions.
40928
41205
  */
40929
- SurveyModel.prototype.runExpression = function (expression) {
41206
+ SurveyModel.prototype.runExpression = function (expression, callback) {
40930
41207
  if (!expression)
40931
41208
  return null;
40932
41209
  var values = this.getFilteredValues();
40933
41210
  var properties = this.getFilteredProperties();
40934
- return new ExpressionRunner(expression).run(values, properties);
41211
+ var exp = new ExpressionRunner(expression);
41212
+ var onCompleteRes = undefined;
41213
+ exp.onRunComplete = function (res) {
41214
+ onCompleteRes = res;
41215
+ callback && callback(res);
41216
+ };
41217
+ return exp.run(values, properties) || onCompleteRes;
40935
41218
  };
40936
41219
  /**
40937
41220
  * Calculates a given [expression](https://surveyjs.io/form-library/documentation/design-survey/conditional-logic#expressions) and returns `true` or `false`.
@@ -44219,7 +44502,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44219
44502
  this.onGetMatrixRowActions.fire(this, options);
44220
44503
  return options.actions;
44221
44504
  };
44222
- SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions) {
44505
+ SurveyModel.prototype.scrollElementToTop = function (element, question, page, id, scrollIfVisible, scrollIntoViewOptions, passedRootElement) {
44506
+ var _this = this;
44223
44507
  var options = {
44224
44508
  element: element,
44225
44509
  question: question,
@@ -44229,7 +44513,25 @@ var survey_SurveyModel = /** @class */ (function (_super) {
44229
44513
  };
44230
44514
  this.onScrollingElementToTop.fire(this, options);
44231
44515
  if (!options.cancel) {
44232
- survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
44516
+ var elementPage_1 = this.getPageByElement(element);
44517
+ if (this.isLazyRendering && !!elementPage_1) {
44518
+ var elementsToRenderBefore = 1;
44519
+ var rootElement = settings.environment.rootElement;
44520
+ var surveyRootElement = this.rootElement || passedRootElement || rootElement;
44521
+ if (!!this.skeletonHeight && !!surveyRootElement && typeof surveyRootElement.getBoundingClientRect === "function") {
44522
+ elementsToRenderBefore = surveyRootElement.getBoundingClientRect().height / this.skeletonHeight - 1;
44523
+ }
44524
+ elementPage_1.forceRenderElement(element, function () {
44525
+ _this.suspendLazyRendering();
44526
+ survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions, function () {
44527
+ _this.releaseLazyRendering();
44528
+ activateLazyRenderingChecks(elementPage_1.id);
44529
+ });
44530
+ }, elementsToRenderBefore);
44531
+ }
44532
+ else {
44533
+ survey_element_SurveyElement.ScrollElementToTop(options.elementId, scrollIfVisible, scrollIntoViewOptions);
44534
+ }
44233
44535
  }
44234
44536
  };
44235
44537
  /**
@@ -45976,64 +46278,117 @@ var survey_SurveyModel = /** @class */ (function (_super) {
45976
46278
  };
45977
46279
  Object.defineProperty(SurveyModel.prototype, "showTimerPanel", {
45978
46280
  /**
45979
- * Displays the timer panel and specifies its position. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
46281
+ * Obsolete. Use the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) and [`timerLocation`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerLocation) properties instead.
46282
+ * @deprecated
46283
+ */
46284
+ get: function () {
46285
+ if (!this.showTimer)
46286
+ return "none";
46287
+ return this.timerLocation;
46288
+ },
46289
+ set: function (val) {
46290
+ this.showTimer = val !== "none";
46291
+ if (this.showTimer) {
46292
+ this.timerLocation = val;
46293
+ }
46294
+ },
46295
+ enumerable: false,
46296
+ configurable: true
46297
+ });
46298
+ Object.defineProperty(SurveyModel.prototype, "showTimer", {
46299
+ /**
46300
+ * Specifies the timer's visibility. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
45980
46301
  *
45981
- * Possible values:
46302
+ * Default value: `false`
45982
46303
  *
45983
- * - `"top"` - Displays the timer panel at the top of the survey.
45984
- * - `"bottom"` - Displays the timer panel at the bottom of the survey.
45985
- * - `"none"` (default) - Hides the timer panel.
46304
+ * If you set this property to `true`, the timer starts automatically when the survey begins. To specify time limits, use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) and [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) properties.
45986
46305
  *
45987
- * If the timer panel is displayed, the timer starts automatically when the survey begins. To specify time limits, use the [`maxTimeToFinish`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#maxTimeToFinish) and [`maxTimeToFinishPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#maxTimeToFinishPage) properties.
46306
+ * The timer displays information about time spent on an individual page and the entire survey. If you want to display only the page timer or the survey timer, set the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property to `"page"` or `"survey"`.
45988
46307
  *
45989
- * The timer panel displays information about time spent on an individual page and the entire survey. If you want to display only the page timer or the survey timer, set the [`showTimerPanelMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimerPanelMode) property to `"page"` or `"survey"`.
45990
- * @see startTimer
45991
- * @see stopTimer
46308
+ * You can enable the timer without displaying it. In this case, you need to specify the required time limits and use the [`startTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#startTimer) and [`stopTimer()`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#stopTimer) methods to control the timer.
46309
+ * @see timerLocation
45992
46310
  * @see timeSpent
45993
- * @see onTimer
46311
+ * @see onTimerTick
46312
+ */
46313
+ get: function () {
46314
+ return this.getPropertyValue("showTimer");
46315
+ },
46316
+ set: function (val) {
46317
+ this.setPropertyValue("showTimer", val);
46318
+ },
46319
+ enumerable: false,
46320
+ configurable: true
46321
+ });
46322
+ Object.defineProperty(SurveyModel.prototype, "timerLocation", {
46323
+ /**
46324
+ * Specifies the timer's position relative to the survey. Applies only if the [`showTimer`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer) property is set to `true`.
46325
+ *
46326
+ * Possible values:
46327
+ *
46328
+ * - `"top"` (default) - Displays the timer at the top of the survey.
46329
+ * - `"bottom"` - Displays the timer at the bottom of the survey.
46330
+ * @see onTimerTick
45994
46331
  */
45995
46332
  get: function () {
45996
- return this.getPropertyValue("showTimerPanel");
46333
+ return this.getPropertyValue("timerLocation");
45997
46334
  },
45998
46335
  set: function (val) {
45999
- this.setPropertyValue("showTimerPanel", val);
46336
+ this.setPropertyValue("timerLocation", val);
46000
46337
  },
46001
46338
  enumerable: false,
46002
46339
  configurable: true
46003
46340
  });
46004
46341
  Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnTop", {
46005
46342
  get: function () {
46006
- return this.showTimerPanel == "top";
46343
+ return this.showTimer && this.timerLocation === "top";
46007
46344
  },
46008
46345
  enumerable: false,
46009
46346
  configurable: true
46010
46347
  });
46011
46348
  Object.defineProperty(SurveyModel.prototype, "isTimerPanelShowingOnBottom", {
46012
46349
  get: function () {
46013
- return this.showTimerPanel == "bottom";
46350
+ return this.showTimer && this.timerLocation === "bottom";
46014
46351
  },
46015
46352
  enumerable: false,
46016
46353
  configurable: true
46017
46354
  });
46018
- Object.defineProperty(SurveyModel.prototype, "showTimerPanelMode", {
46355
+ Object.defineProperty(SurveyModel.prototype, "timerInfoMode", {
46019
46356
  /**
46020
- * Specifies whether the timer panel displays timers for the current page, the entire survey, or both. Applies only if the timer panel is [visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimerPanel).
46357
+ * Specifies whether the timer panel displays timers for the current page, the entire survey, or both. Applies only if the timer panel is [visible](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showTimer).
46021
46358
  *
46022
46359
  * Possible values:
46023
46360
  *
46024
46361
  * - `"survey"` - Displays only the survey timer.
46025
46362
  * - `"page"` - Displays only the page timer.
46026
- * - `"all"` (default) - Displays both the survey and page timers.
46363
+ * - `"combined"` (default) - Displays both the survey and page timers.
46027
46364
  * @see timeSpent
46028
- * @see onTimer
46365
+ * @see onTimerTick
46029
46366
  * @see startTimer
46030
46367
  * @see stopTimer
46031
46368
  */
46032
46369
  get: function () {
46033
- return this.getPropertyValue("showTimerPanelMode");
46370
+ return this.getTimerInfoVal(this.getPropertyValue("timerInfoMode"));
46371
+ },
46372
+ set: function (val) {
46373
+ this.setPropertyValue("timerInfoMode", val);
46374
+ },
46375
+ enumerable: false,
46376
+ configurable: true
46377
+ });
46378
+ SurveyModel.prototype.getTimerInfoVal = function (val) {
46379
+ return val === "all" ? "combined" : val;
46380
+ };
46381
+ Object.defineProperty(SurveyModel.prototype, "showTimerPanelMode", {
46382
+ /**
46383
+ * Obsolete. Use the [`timerInfoMode`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timerInfoMode) property instead.
46384
+ * @deprecated
46385
+ */
46386
+ get: function () {
46387
+ var res = this.timerInfoMode;
46388
+ return res === "combined" ? "all" : res;
46034
46389
  },
46035
46390
  set: function (val) {
46036
- this.setPropertyValue("showTimerPanelMode", val);
46391
+ this.timerInfoMode = this.getTimerInfoVal(val);
46037
46392
  },
46038
46393
  enumerable: false,
46039
46394
  configurable: true
@@ -46152,11 +46507,11 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46152
46507
  var pageSpent = page.timeSpent;
46153
46508
  var surveySpent = this.timeSpent;
46154
46509
  var pageLimitSec = page.getMaxTimeToFinish();
46155
- var surveyLimit = this.maxTimeToFinish;
46156
- if (this.showTimerPanelMode == "page") {
46510
+ var surveyLimit = this.timeLimit;
46511
+ if (this.timerInfoMode == "page") {
46157
46512
  return { spent: pageSpent, limit: pageLimitSec };
46158
46513
  }
46159
- if (this.showTimerPanelMode == "survey") {
46514
+ if (this.timerInfoMode == "survey") {
46160
46515
  return { spent: surveySpent, limit: surveyLimit };
46161
46516
  }
46162
46517
  else {
@@ -46182,16 +46537,16 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46182
46537
  var surveySpent = this.getDisplayTime(this.timeSpent);
46183
46538
  var pageLimitSec = page.getMaxTimeToFinish();
46184
46539
  var pageLimit = this.getDisplayTime(pageLimitSec);
46185
- var surveyLimit = this.getDisplayTime(this.maxTimeToFinish);
46186
- if (this.showTimerPanelMode == "page")
46540
+ var surveyLimit = this.getDisplayTime(this.timeLimit);
46541
+ if (this.timerInfoMode == "page")
46187
46542
  return this.getTimerInfoPageText(page, pageSpent, pageLimit);
46188
- if (this.showTimerPanelMode == "survey")
46543
+ if (this.timerInfoMode == "survey")
46189
46544
  return this.getTimerInfoSurveyText(surveySpent, surveyLimit);
46190
- if (this.showTimerPanelMode == "all") {
46191
- if (pageLimitSec <= 0 && this.maxTimeToFinish <= 0) {
46545
+ if (this.timerInfoMode == "combined") {
46546
+ if (pageLimitSec <= 0 && this.timeLimit <= 0) {
46192
46547
  return this.getLocalizationFormatString("timerSpentAll", pageSpent, surveySpent);
46193
46548
  }
46194
- if (pageLimitSec > 0 && this.maxTimeToFinish > 0) {
46549
+ if (pageLimitSec > 0 && this.timeLimit > 0) {
46195
46550
  return this.getLocalizationFormatString("timerLimitAll", pageSpent, pageLimit, surveySpent, surveyLimit);
46196
46551
  }
46197
46552
  var pageText = this.getTimerInfoPageText(page, pageSpent, pageLimit);
@@ -46206,7 +46561,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46206
46561
  : this.getLocalizationFormatString("timerSpentPage", pageSpent, pageLimit);
46207
46562
  };
46208
46563
  SurveyModel.prototype.getTimerInfoSurveyText = function (surveySpent, surveyLimit) {
46209
- var strName = this.maxTimeToFinish > 0 ? "timerLimitSurvey" : "timerSpentSurvey";
46564
+ var strName = this.timeLimit > 0 ? "timerLimitSurvey" : "timerSpentSurvey";
46210
46565
  return this.getLocalizationFormatString(strName, surveySpent, surveyLimit);
46211
46566
  };
46212
46567
  SurveyModel.prototype.getDisplayClockTime = function (val) {
@@ -46242,10 +46597,10 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46242
46597
  /**
46243
46598
  * Starts a timer that calculates how many seconds a respondent has spent on the survey. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
46244
46599
  * @see stopTimer
46245
- * @see maxTimeToFinish
46246
- * @see maxTimeToFinishPage
46600
+ * @see timeLimit
46601
+ * @see timeLimitPerPage
46247
46602
  * @see timeSpent
46248
- * @see onTimer
46603
+ * @see onTimerTick
46249
46604
  */
46250
46605
  SurveyModel.prototype.startTimer = function () {
46251
46606
  if (this.isEditMode) {
@@ -46253,17 +46608,17 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46253
46608
  }
46254
46609
  };
46255
46610
  SurveyModel.prototype.startTimerFromUI = function () {
46256
- if (this.showTimerPanel != "none" && this.state === "running") {
46611
+ if (this.showTimer && this.state === "running") {
46257
46612
  this.startTimer();
46258
46613
  }
46259
46614
  };
46260
46615
  /**
46261
46616
  * Stops the timer. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
46262
46617
  * @see startTimer
46263
- * @see maxTimeToFinish
46264
- * @see maxTimeToFinishPage
46618
+ * @see timeLimit
46619
+ * @see timeLimitPerPage
46265
46620
  * @see timeSpent
46266
- * @see onTimer
46621
+ * @see onTimerTick
46267
46622
  */
46268
46623
  SurveyModel.prototype.stopTimer = function () {
46269
46624
  this.timerModel.stop();
@@ -46275,8 +46630,8 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46275
46630
  * Assign a number to this property if you need to start the quiz timer from a specific time (for instance, if you want to continue an interrupted quiz).
46276
46631
  *
46277
46632
  * You can also find out how many seconds a respondent has spent on an individual survey page. To do this, use the [`timeSpent`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeSpent) property of a [`PageModel`](https://surveyjs.io/form-library/documentation/api-reference/page-model) object.
46278
- * @see maxTimeToFinish
46279
- * @see maxTimeToFinishPage
46633
+ * @see timeLimit
46634
+ * @see timeLimitPerPage
46280
46635
  * @see startTimer
46281
46636
  */
46282
46637
  get: function () { return this.timerModel.spent; },
@@ -46284,52 +46639,80 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46284
46639
  enumerable: false,
46285
46640
  configurable: true
46286
46641
  });
46287
- Object.defineProperty(SurveyModel.prototype, "maxTimeToFinish", {
46642
+ Object.defineProperty(SurveyModel.prototype, "timeLimit", {
46288
46643
  /**
46289
46644
  * A time period that a respondent has to complete the survey; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
46290
46645
  *
46291
- * A negative value or 0 sets an unlimited time period.
46646
+ * Default value: 0 (time is unlimited)
46292
46647
  *
46293
46648
  * [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
46294
- * @see maxTimeToFinishPage
46649
+ * @see timeLimitPerPage
46295
46650
  * @see startTimer
46296
46651
  * @see timeSpent
46297
46652
  */
46298
46653
  get: function () {
46299
- return this.getPropertyValue("maxTimeToFinish", 0);
46654
+ return this.getPropertyValue("timeLimit", 0);
46300
46655
  },
46301
46656
  set: function (val) {
46302
- this.setPropertyValue("maxTimeToFinish", val);
46657
+ this.setPropertyValue("timeLimit", val);
46303
46658
  },
46304
46659
  enumerable: false,
46305
46660
  configurable: true
46306
46661
  });
46307
- Object.defineProperty(SurveyModel.prototype, "maxTimeToFinishPage", {
46662
+ Object.defineProperty(SurveyModel.prototype, "maxTimeToFinish", {
46663
+ /**
46664
+ * Obsolete. Use the [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimit) property instead.
46665
+ * @deprecated
46666
+ */
46667
+ get: function () {
46668
+ return this.timeLimit;
46669
+ },
46670
+ set: function (val) {
46671
+ this.timeLimit = val;
46672
+ },
46673
+ enumerable: false,
46674
+ configurable: true
46675
+ });
46676
+ Object.defineProperty(SurveyModel.prototype, "timeLimitPerPage", {
46308
46677
  /**
46309
46678
  * A time period that a respondent has to complete each survey page; measured in seconds. Applies only to [quiz surveys](https://surveyjs.io/form-library/documentation/design-survey-create-a-quiz).
46310
46679
  *
46311
- * A negative value or 0 sets an unlimited time period.
46680
+ * Default value: 0 (time is unlimited)
46312
46681
  *
46313
- * You can also use `PageModel`'s [`maxTimeToFinish`](https://surveyjs.io/form-library/documentation/api-reference/page-model#maxTimeToFinish) property to specify a time period for an individual survey page.
46682
+ * You can also use `PageModel`'s [`timeLimit`](https://surveyjs.io/form-library/documentation/api-reference/page-model#timeLimit) property to specify a time period for an individual survey page.
46314
46683
  *
46315
46684
  * [View Demo](https://surveyjs.io/form-library/examples/make-quiz-javascript/ (linkStyle))
46316
- * @see maxTimeToFinish
46685
+ * @see timeLimit
46317
46686
  * @see startTimer
46318
46687
  * @see timeSpent
46319
46688
  */
46320
46689
  get: function () {
46321
- return this.getPropertyValue("maxTimeToFinishPage", 0);
46690
+ return this.getPropertyValue("timeLimitPerPage", 0);
46691
+ },
46692
+ set: function (val) {
46693
+ this.setPropertyValue("timeLimitPerPage", val);
46694
+ },
46695
+ enumerable: false,
46696
+ configurable: true
46697
+ });
46698
+ Object.defineProperty(SurveyModel.prototype, "maxTimeToFinishPage", {
46699
+ /**
46700
+ * Obsolete. Use the [`timeLimitPerPage`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#timeLimitPerPage) property instead.
46701
+ * @deprecated
46702
+ */
46703
+ get: function () {
46704
+ return this.timeLimitPerPage;
46322
46705
  },
46323
46706
  set: function (val) {
46324
- this.setPropertyValue("maxTimeToFinishPage", val);
46707
+ this.timeLimitPerPage = val;
46325
46708
  },
46326
46709
  enumerable: false,
46327
46710
  configurable: true
46328
46711
  });
46329
46712
  SurveyModel.prototype.doTimer = function (page) {
46330
- this.onTimer.fire(this, {});
46331
- if (this.maxTimeToFinish > 0 && this.maxTimeToFinish <= this.timeSpent) {
46332
- this.timeSpent = this.maxTimeToFinish;
46713
+ this.onTimerTick.fire(this, {});
46714
+ if (this.timeLimit > 0 && this.timeLimit <= this.timeSpent) {
46715
+ this.timeSpent = this.timeLimit;
46333
46716
  this.completeLastPage();
46334
46717
  }
46335
46718
  if (page) {
@@ -46637,7 +47020,7 @@ var survey_SurveyModel = /** @class */ (function (_super) {
46637
47020
  }
46638
47021
  }
46639
47022
  else if (isStrCiEqual(layoutElement.id, "advanced-header")) {
46640
- if ((this.state === "running" || this.state === "starting") && layoutElement.container === container) {
47023
+ if ((this.state === "running" || this.state === "starting" || (this.showHeaderOnCompletePage === true && this.state === "completed")) && layoutElement.container === container) {
46641
47024
  containerLayoutElements.push(layoutElement);
46642
47025
  }
46643
47026
  }
@@ -47161,18 +47544,13 @@ Serializer.addClass("survey", [
47161
47544
  default: "noPreview",
47162
47545
  choices: ["noPreview", "showAllQuestions", "showAnsweredQuestions"],
47163
47546
  },
47164
- { name: "maxTimeToFinish:number", default: 0, minValue: 0 },
47165
- { name: "maxTimeToFinishPage:number", default: 0, minValue: 0 },
47166
- {
47167
- name: "showTimerPanel",
47168
- default: "none",
47169
- choices: ["none", "top", "bottom"],
47170
- },
47171
- {
47172
- name: "showTimerPanelMode",
47173
- default: "all",
47174
- choices: ["page", "survey", "all"],
47175
- },
47547
+ { name: "showTimer:boolean" },
47548
+ { name: "timeLimit:number", alternativeName: "maxTimeToFinish", default: 0, minValue: 0, enableIf: function (obj) { return obj.showTimer; } },
47549
+ { name: "timeLimitPerPage:number", alternativeName: "maxTimeToFinishPage", default: 0, minValue: 0, enableIf: function (obj) { return obj.showTimer; } },
47550
+ { name: "timerLocation", default: "top", choices: ["top", "bottom"], enableIf: function (obj) { return obj.showTimer; } },
47551
+ { name: "timerInfoMode", alternativeName: "showTimerPanelMode",
47552
+ default: "combined", choices: ["page", "survey", "combined"], enableIf: function (obj) { return obj.showTimer; } },
47553
+ { name: "showTimerPanel", visible: false, isSerializable: false },
47176
47554
  {
47177
47555
  name: "widthMode",
47178
47556
  default: "auto",
@@ -47225,6 +47603,7 @@ var question_baseselect_decorate = (undefined && undefined.__decorate) || functi
47225
47603
 
47226
47604
 
47227
47605
 
47606
+
47228
47607
  /**
47229
47608
  * A base class for multiple-choice question types ([Checkboxes](https://surveyjs.io/form-library/documentation/questioncheckboxmodel), [Dropdown](https://surveyjs.io/form-library/documentation/questiondropdownmodel), [Radio Button Group](https://surveyjs.io/form-library/documentation/questionradiogroupmodel), etc.).
47230
47609
  */
@@ -47863,6 +48242,9 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
47863
48242
  return this.otherValueCore;
47864
48243
  };
47865
48244
  QuestionSelectBase.prototype.selectOtherValueFromComment = function (val) {
48245
+ if (val) {
48246
+ this.prevIsOtherSelected = true;
48247
+ }
47866
48248
  this.value = val ? this.otherItem.value : undefined;
47867
48249
  };
47868
48250
  QuestionSelectBase.prototype.setQuestionComment = function (newValue) {
@@ -49455,24 +49837,8 @@ var question_baseselect_QuestionSelectBase = /** @class */ (function (_super) {
49455
49837
  QuestionSelectBase.prototype.getItemEnabled = function (item) {
49456
49838
  return !this.isDisabledAttr && item.isEnabled;
49457
49839
  };
49458
- QuestionSelectBase.prototype.afterRender = function (el) {
49459
- _super.prototype.afterRender.call(this, el);
49460
- this.rootElement = el;
49461
- };
49462
- QuestionSelectBase.prototype.beforeDestroyQuestionElement = function (el) {
49463
- _super.prototype.beforeDestroyQuestionElement.call(this, el);
49464
- this.rootElement = undefined;
49465
- };
49466
49840
  QuestionSelectBase.prototype.focusOtherComment = function () {
49467
- var _this = this;
49468
- if (!!this.rootElement) {
49469
- setTimeout(function () {
49470
- var commentEl = _this.rootElement.querySelector("textarea");
49471
- if (!!commentEl) {
49472
- commentEl.focus();
49473
- }
49474
- }, 10);
49475
- }
49841
+ survey_element_SurveyElement.FocusElement(this.otherId);
49476
49842
  };
49477
49843
  QuestionSelectBase.prototype.onValueChanged = function () {
49478
49844
  _super.prototype.onValueChanged.call(this);
@@ -51967,11 +52333,16 @@ var question_matrix_MatrixRowModel = /** @class */ (function (_super) {
51967
52333
  return MatrixRowModel;
51968
52334
  }(base_Base));
51969
52335
 
51970
- var question_matrix_MatrixCells = /** @class */ (function () {
52336
+ var question_matrix_MatrixCells = /** @class */ (function (_super) {
52337
+ question_matrix_extends(MatrixCells, _super);
51971
52338
  function MatrixCells(cellsOwner) {
51972
- this.cellsOwner = cellsOwner;
51973
- this.values = {};
52339
+ var _this = _super.call(this) || this;
52340
+ _this.cellsOwner = cellsOwner;
52341
+ _this.values = {};
52342
+ _this.locs = {};
52343
+ return _this;
51974
52344
  }
52345
+ MatrixCells.prototype.getType = function () { return "cells"; };
51975
52346
  Object.defineProperty(MatrixCells.prototype, "isEmpty", {
51976
52347
  get: function () {
51977
52348
  return Object.keys(this.values).length == 0;
@@ -51980,78 +52351,97 @@ var question_matrix_MatrixCells = /** @class */ (function () {
51980
52351
  configurable: true
51981
52352
  });
51982
52353
  MatrixCells.prototype.valuesChanged = function () {
51983
- if (!!this.onValuesChanged) {
52354
+ if (!this.locNotification && !!this.onValuesChanged) {
51984
52355
  this.onValuesChanged();
51985
52356
  }
51986
52357
  };
51987
- MatrixCells.prototype.setCellText = function (row, column, val) {
52358
+ MatrixCells.prototype.getDefaultCellLocText = function (column) {
52359
+ return this.getCellLocCore(this.defaultRowValue, column);
52360
+ };
52361
+ MatrixCells.prototype.getCellDisplayLocText = function (row, column) {
52362
+ return this.getCellLocCore(row, column);
52363
+ };
52364
+ MatrixCells.prototype.getCellLocCore = function (row, col) {
52365
+ var _this = this;
51988
52366
  row = this.getCellRowColumnValue(row, this.rows);
51989
- column = this.getCellRowColumnValue(column, this.columns);
51990
- if (!row || !column)
51991
- return;
51992
- if (val) {
51993
- if (!this.values[row])
51994
- this.values[row] = {};
51995
- if (!this.values[row][column])
51996
- this.values[row][column] = this.createString();
51997
- this.values[row][column].text = val;
52367
+ col = this.getCellRowColumnValue(col, this.columns);
52368
+ if (helpers_Helpers.isValueEmpty(row) || helpers_Helpers.isValueEmpty(col))
52369
+ return null;
52370
+ if (!this.locs[row]) {
52371
+ this.locs[row] = {};
51998
52372
  }
51999
- else {
52000
- if (this.values[row] && this.values[row][column]) {
52001
- var loc = this.values[row][column];
52002
- loc.text = "";
52003
- if (loc.isEmpty) {
52004
- delete this.values[row][column];
52005
- if (Object.keys(this.values[row]).length == 0) {
52006
- delete this.values[row];
52373
+ var res = this.locs[row][col];
52374
+ if (!res) {
52375
+ res = this.createString();
52376
+ res.setJson(this.getCellLocData(row, col));
52377
+ res.onGetTextCallback = function (str) {
52378
+ if (!str) {
52379
+ var column = itemvalue_ItemValue.getItemByValue(_this.columns, col);
52380
+ if (column) {
52381
+ return column.locText.getJson() || column.value;
52007
52382
  }
52008
52383
  }
52009
- }
52384
+ return str;
52385
+ };
52386
+ res.onStrChanged = function (oldValue, newValue) {
52387
+ _this.updateValues(row, col, newValue);
52388
+ };
52389
+ this.locs[row][col] = res;
52010
52390
  }
52011
- this.valuesChanged();
52391
+ return res;
52012
52392
  };
52013
- MatrixCells.prototype.setDefaultCellText = function (column, val) {
52014
- this.setCellText(settings.matrix.defaultRowName, column, val);
52393
+ Object.defineProperty(MatrixCells.prototype, "defaultRowValue", {
52394
+ get: function () { return settings.matrix.defaultRowName; },
52395
+ enumerable: false,
52396
+ configurable: true
52397
+ });
52398
+ MatrixCells.prototype.getCellLocData = function (row, col) {
52399
+ var data = this.getCellLocDataFromValue(row, col);
52400
+ if (data)
52401
+ return data;
52402
+ return this.getCellLocDataFromValue(this.defaultRowValue, col);
52015
52403
  };
52016
- MatrixCells.prototype.getCellLocText = function (row, column) {
52017
- row = this.getCellRowColumnValue(row, this.rows);
52018
- column = this.getCellRowColumnValue(column, this.columns);
52019
- if (!row || !column)
52020
- return null;
52404
+ MatrixCells.prototype.getCellLocDataFromValue = function (row, column) {
52021
52405
  if (!this.values[row])
52022
52406
  return null;
52023
52407
  if (!this.values[row][column])
52024
52408
  return null;
52025
52409
  return this.values[row][column];
52026
52410
  };
52027
- MatrixCells.prototype.getDefaultCellLocText = function (column, val) {
52028
- return this.getCellLocText(settings.matrix.defaultRowName, column);
52411
+ MatrixCells.prototype.getCellText = function (row, column) {
52412
+ var loc = this.getCellLocCore(row, column);
52413
+ return loc ? loc.calculatedText : null;
52029
52414
  };
52030
- MatrixCells.prototype.getCellDisplayLocText = function (row, column) {
52031
- var cellText = this.getCellLocText(row, column);
52032
- if (cellText && !cellText.isEmpty)
52033
- return cellText;
52034
- cellText = this.getCellLocText(settings.matrix.defaultRowName, column);
52035
- if (cellText && !cellText.isEmpty)
52036
- return cellText;
52037
- if (typeof column == "number") {
52038
- column =
52039
- column >= 0 && column < this.columns.length
52040
- ? this.columns[column]
52041
- : null;
52415
+ MatrixCells.prototype.setCellText = function (row, column, val) {
52416
+ var loc = this.getCellLocCore(row, column);
52417
+ if (loc) {
52418
+ loc.text = val;
52042
52419
  }
52043
- if (column && column.locText)
52044
- return column.locText;
52045
- return null;
52046
52420
  };
52047
- MatrixCells.prototype.getCellText = function (row, column) {
52048
- var loc = this.getCellLocText(row, column);
52049
- return loc ? loc.calculatedText : null;
52421
+ MatrixCells.prototype.updateValues = function (row, column, val) {
52422
+ if (val) {
52423
+ if (!this.values[row])
52424
+ this.values[row] = {};
52425
+ this.values[row][column] = val;
52426
+ this.valuesChanged();
52427
+ }
52428
+ else {
52429
+ if (this.values[row] && this.values[row][column]) {
52430
+ delete this.values[row][column];
52431
+ if (Object.keys(this.values[row]).length == 0) {
52432
+ delete this.values[row];
52433
+ }
52434
+ this.valuesChanged();
52435
+ }
52436
+ }
52050
52437
  };
52051
52438
  MatrixCells.prototype.getDefaultCellText = function (column) {
52052
- var loc = this.getCellLocText(settings.matrix.defaultRowName, column);
52439
+ var loc = this.getCellLocCore(this.defaultRowValue, column);
52053
52440
  return loc ? loc.calculatedText : null;
52054
52441
  };
52442
+ MatrixCells.prototype.setDefaultCellText = function (column, val) {
52443
+ this.setCellText(this.defaultRowValue, column, val);
52444
+ };
52055
52445
  MatrixCells.prototype.getCellDisplayText = function (row, column) {
52056
52446
  var loc = this.getCellDisplayLocText(row, column);
52057
52447
  return loc ? loc.calculatedText : null;
@@ -52085,18 +52475,22 @@ var question_matrix_MatrixCells = /** @class */ (function () {
52085
52475
  MatrixCells.prototype.getJson = function () {
52086
52476
  if (this.isEmpty)
52087
52477
  return null;
52478
+ var defaultRow = this.values[this.defaultRowValue];
52088
52479
  var res = {};
52089
52480
  for (var row in this.values) {
52090
52481
  var resRow = {};
52091
52482
  var rowValues = this.values[row];
52092
52483
  for (var col in rowValues) {
52093
- resRow[col] = rowValues[col].getJson();
52484
+ if (row === this.defaultRowValue || !defaultRow || defaultRow[col] !== rowValues[col]) {
52485
+ resRow[col] = rowValues[col];
52486
+ }
52094
52487
  }
52095
52488
  res[row] = resRow;
52096
52489
  }
52097
52490
  return res;
52098
52491
  };
52099
52492
  MatrixCells.prototype.setJson = function (value) {
52493
+ var _this = this;
52100
52494
  this.values = {};
52101
52495
  if (!!value) {
52102
52496
  for (var row in value) {
@@ -52107,21 +52501,23 @@ var question_matrix_MatrixCells = /** @class */ (function () {
52107
52501
  for (var col in rowValues) {
52108
52502
  if (col == "pos")
52109
52503
  continue;
52110
- var loc = this.createString();
52111
- loc.setJson(rowValues[col]);
52112
- this.values[row][col] = loc;
52504
+ this.values[row][col] = rowValues[col];
52113
52505
  }
52114
52506
  }
52115
52507
  }
52508
+ this.locNotification = true;
52509
+ this.runFuncOnLocs(function (row, col, loc) { return loc.setJson(_this.getCellLocData(row, col)); });
52510
+ this.locNotification = false;
52116
52511
  this.valuesChanged();
52117
52512
  };
52118
52513
  MatrixCells.prototype.locStrsChanged = function () {
52119
- if (this.isEmpty)
52120
- return;
52121
- for (var row in this.values) {
52122
- var rowValues = this.values[row];
52514
+ this.runFuncOnLocs(function (row, col, loc) { return loc.strChanged(); });
52515
+ };
52516
+ MatrixCells.prototype.runFuncOnLocs = function (func) {
52517
+ for (var row in this.locs) {
52518
+ var rowValues = this.locs[row];
52123
52519
  for (var col in rowValues) {
52124
- rowValues[col].strChanged();
52520
+ func(row, col, rowValues[col]);
52125
52521
  }
52126
52522
  }
52127
52523
  };
@@ -52129,7 +52525,7 @@ var question_matrix_MatrixCells = /** @class */ (function () {
52129
52525
  return new localizablestring_LocalizableString(this.cellsOwner, true);
52130
52526
  };
52131
52527
  return MatrixCells;
52132
- }());
52528
+ }(base_Base));
52133
52529
 
52134
52530
  /**
52135
52531
  * A class that describes the Single-Select Matrix question type.
@@ -53090,6 +53486,7 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53090
53486
  _this.updateRemainingCharacterCounter(event.target.value);
53091
53487
  };
53092
53488
  _this.onKeyUp = function (event) {
53489
+ _this.updateDateValidationMessage(event);
53093
53490
  if (_this.isInputTextUpdate) {
53094
53491
  if (!_this._isWaitingForEnter || event.keyCode === 13) {
53095
53492
  _this.updateValueOnEvent(event);
@@ -53104,7 +53501,6 @@ var question_text_QuestionTextModel = /** @class */ (function (_super) {
53104
53501
  _this.updateRemainingCharacterCounter(event.target.value);
53105
53502
  };
53106
53503
  _this.onKeyDown = function (event) {
53107
- _this.updateDateValidationMessage(event);
53108
53504
  _this.onKeyDownPreprocess && _this.onKeyDownPreprocess(event);
53109
53505
  if (_this.isInputTextUpdate) {
53110
53506
  _this._isWaitingForEnter = event.keyCode === 229;
@@ -57812,6 +58208,11 @@ var question_ranking_QuestionRankingModel = /** @class */ (function (_super) {
57812
58208
  this.updateRankingChoices();
57813
58209
  this.releaseAnimations();
57814
58210
  };
58211
+ QuestionRankingModel.prototype.updateValueFromSurvey = function (newValue, clearData) {
58212
+ _super.prototype.updateValueFromSurvey.call(this, newValue, clearData);
58213
+ if (newValue)
58214
+ this.isValueSetByUser = true;
58215
+ };
57815
58216
  QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
57816
58217
  var newValue = this.value.slice();
57817
58218
  this.visibleChoices.forEach(function (choice) {
@@ -58362,7 +58763,6 @@ var question_comment_extends = (undefined && undefined.__extends) || (function (
58362
58763
 
58363
58764
 
58364
58765
 
58365
-
58366
58766
  /**
58367
58767
  * A class that describes the Long Text question type.
58368
58768
  *
@@ -58511,15 +58911,8 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
58511
58911
  QuestionCommentModel.prototype.afterRenderQuestionElement = function (el) {
58512
58912
  var root = settings.environment.root;
58513
58913
  this.element = root.getElementById(this.inputId) || el;
58514
- this.updateElement();
58515
58914
  _super.prototype.afterRenderQuestionElement.call(this, el);
58516
58915
  };
58517
- QuestionCommentModel.prototype.updateElement = function () {
58518
- var _this_1 = this;
58519
- if (this.element && this.renderedAutoGrow) {
58520
- setTimeout(function () { return increaseHeightByContent(_this_1.element); }, 1);
58521
- }
58522
- };
58523
58916
  QuestionCommentModel.prototype.beforeDestroyQuestionElement = function (el) {
58524
58917
  _super.prototype.beforeDestroyQuestionElement.call(this, el);
58525
58918
  this.element = undefined;
@@ -58527,8 +58920,6 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
58527
58920
  QuestionCommentModel.prototype.onInput = function (event) {
58528
58921
  if (this.isInputTextUpdate)
58529
58922
  this.value = event.target.value;
58530
- else
58531
- this.updateElement();
58532
58923
  this.updateRemainingCharacterCounter(event.target.value);
58533
58924
  };
58534
58925
  QuestionCommentModel.prototype.onBlurCore = function (event) {
@@ -58541,15 +58932,6 @@ var question_comment_QuestionCommentModel = /** @class */ (function (_super) {
58541
58932
  event.stopPropagation();
58542
58933
  }
58543
58934
  };
58544
- QuestionCommentModel.prototype.setQuestionValue = function (newValue, updateIsAnswered) {
58545
- if (updateIsAnswered === void 0) { updateIsAnswered = true; }
58546
- _super.prototype.setQuestionValue.call(this, newValue, updateIsAnswered);
58547
- this.updateElement();
58548
- };
58549
- QuestionCommentModel.prototype.onValueChanged = function () {
58550
- _super.prototype.onValueChanged.call(this);
58551
- this.updateElement();
58552
- };
58553
58935
  QuestionCommentModel.prototype.setNewValue = function (newValue) {
58554
58936
  if (!this.acceptCarriageReturn && !!newValue) {
58555
58937
  // eslint-disable-next-line no-control-regex
@@ -58827,6 +59209,7 @@ var question_file_decorate = (undefined && undefined.__decorate) || function (de
58827
59209
 
58828
59210
 
58829
59211
 
59212
+
58830
59213
  function dataUrl2File(dataUrl, fileName, type) {
58831
59214
  var str = atob(dataUrl.split(",")[1]);
58832
59215
  var buffer = new Uint8Array(str.split("").map(function (c) { return c.charCodeAt(0); })).buffer;
@@ -58973,6 +59356,32 @@ var question_file_QuestionFileModelBase = /** @class */ (function (_super) {
58973
59356
  *
58974
59357
  * [View Demo](https://surveyjs.io/form-library/examples/file-upload/ (linkStyle))
58975
59358
  */
59359
+ var question_file_QuestionFilePage = /** @class */ (function (_super) {
59360
+ question_file_extends(QuestionFilePage, _super);
59361
+ function QuestionFilePage(question, index) {
59362
+ var _this = _super.call(this) || this;
59363
+ _this.question = question;
59364
+ _this.index = index;
59365
+ _this.id = QuestionFilePage.getId();
59366
+ return _this;
59367
+ }
59368
+ QuestionFilePage.getId = function () {
59369
+ return "sv_sfp_" + QuestionFilePage.pageCounter++;
59370
+ };
59371
+ Object.defineProperty(QuestionFilePage.prototype, "css", {
59372
+ get: function () {
59373
+ return this.question.cssClasses.page;
59374
+ },
59375
+ enumerable: false,
59376
+ configurable: true
59377
+ });
59378
+ QuestionFilePage.pageCounter = 0;
59379
+ question_file_decorate([
59380
+ propertyArray({})
59381
+ ], QuestionFilePage.prototype, "items", void 0);
59382
+ return QuestionFilePage;
59383
+ }(base_Base));
59384
+
58976
59385
  var question_file_QuestionFileModel = /** @class */ (function (_super) {
58977
59386
  question_file_extends(QuestionFileModel, _super);
58978
59387
  function QuestionFileModel(name) {
@@ -58981,6 +59390,10 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
58981
59390
  _this.fileNavigator = new container_ActionContainer();
58982
59391
  _this.canFlipCameraValue = undefined;
58983
59392
  _this.prevPreviewLength = 0;
59393
+ _this._renderedPages = [];
59394
+ _this.pagesAnimation = new AnimationTab(_this.getPagesAnimationOptions(), function (val) {
59395
+ _this._renderedPages = val;
59396
+ }, function () { return _this.renderedPages; });
58984
59397
  _this.calcAvailableItemsCount = function (availableWidth, itemWidth, gap) {
58985
59398
  var itemsCount = Math.floor(availableWidth / (itemWidth + gap));
58986
59399
  if ((itemsCount + 1) * (itemWidth + gap) - gap <= availableWidth)
@@ -59059,6 +59472,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59059
59472
  id: "prevPage",
59060
59473
  iconSize: 16,
59061
59474
  action: function () {
59475
+ _this.navigationDirection = "left";
59062
59476
  _this.indexToShow = _this.previewValue.length && ((_this.indexToShow - 1 + _this.pagesCount) % _this.pagesCount) || 0;
59063
59477
  _this.fileIndexAction.title = _this.getFileIndexCaption();
59064
59478
  }
@@ -59067,6 +59481,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59067
59481
  id: "nextPage",
59068
59482
  iconSize: 16,
59069
59483
  action: function () {
59484
+ _this.navigationDirection = "right";
59070
59485
  _this.indexToShow = _this.previewValue.length && ((_this.indexToShow + 1) % _this.pagesCount) || 0;
59071
59486
  _this.fileIndexAction.title = _this.getFileIndexCaption();
59072
59487
  }
@@ -59142,6 +59557,13 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59142
59557
  _this.fileNavigator.actions = [_this.prevFileAction, _this.fileIndexAction, _this.nextFileAction];
59143
59558
  return _this;
59144
59559
  }
59560
+ Object.defineProperty(QuestionFileModel.prototype, "supportFileNavigator", {
59561
+ get: function () {
59562
+ return this.isDefaultV2Theme;
59563
+ },
59564
+ enumerable: false,
59565
+ configurable: true
59566
+ });
59145
59567
  Object.defineProperty(QuestionFileModel.prototype, "isFileLoading", {
59146
59568
  get: function () { return this.isFileLoadingValue; },
59147
59569
  set: function (val) {
@@ -59275,15 +59697,42 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59275
59697
  return this.getLocalizationFormatString("indexText", this.indexToShow + 1, this.pagesCount);
59276
59698
  };
59277
59699
  QuestionFileModel.prototype.updateFileNavigator = function () {
59700
+ this.updatePages();
59701
+ this.navigationDirection = undefined;
59278
59702
  this.indexToShow = this.previewValue.length && ((this.indexToShow + this.pagesCount) % this.pagesCount) || 0;
59279
59703
  this.fileIndexAction.title = this.getFileIndexCaption();
59280
59704
  };
59705
+ QuestionFileModel.prototype.updateRenderedPages = function () {
59706
+ if (this.pages && this.pages[this.indexToShow]) {
59707
+ this.renderedPages = [this.pages[this.indexToShow]];
59708
+ }
59709
+ };
59710
+ QuestionFileModel.prototype.updatePages = function () {
59711
+ var _this = this;
59712
+ this.blockAnimations();
59713
+ var currentPage;
59714
+ this.pages = [];
59715
+ this.renderedPages = [];
59716
+ this.previewValue.forEach(function (val, index) {
59717
+ if (index % _this.pageSize == 0) {
59718
+ currentPage = new question_file_QuestionFilePage(_this, _this.pages.length);
59719
+ _this.pages.push(currentPage);
59720
+ }
59721
+ currentPage.items.push(val);
59722
+ });
59723
+ this.releaseAnimations();
59724
+ this.updateRenderedPages();
59725
+ };
59281
59726
  QuestionFileModel.prototype.previewValueChanged = function () {
59282
59727
  var _this = this;
59728
+ this.navigationDirection = undefined;
59283
59729
  if (this.previewValue.length !== this.prevPreviewLength) {
59284
59730
  if (this.previewValue.length > 0) {
59285
59731
  if (this.prevPreviewLength > this.previewValue.length) {
59286
- this.indexToShow = this.indexToShow >= this.pagesCount && this.indexToShow > 0 ? this.pagesCount - 1 : this.indexToShow;
59732
+ if (this.indexToShow >= this.pagesCount && this.indexToShow > 0) {
59733
+ this.indexToShow = this.pagesCount - 1;
59734
+ this.navigationDirection = "left-delete";
59735
+ }
59287
59736
  }
59288
59737
  else {
59289
59738
  this.indexToShow = Math.floor(this.prevPreviewLength / this.pageSize);
@@ -59293,6 +59742,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59293
59742
  this.indexToShow = 0;
59294
59743
  }
59295
59744
  }
59745
+ this.updatePages();
59296
59746
  this.fileIndexAction.title = this.getFileIndexCaption();
59297
59747
  this.containsMultiplyFiles = this.previewValue.length > 1;
59298
59748
  if (this.previewValue.length > 0 && !this.calculatedGapBetweenItems && !this.calculatedItemWidth) {
@@ -59302,11 +59752,6 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59302
59752
  }
59303
59753
  this.prevPreviewLength = this.previewValue.length;
59304
59754
  };
59305
- QuestionFileModel.prototype.isPreviewVisible = function (index) {
59306
- var isFileNavigatorVisible = this.fileNavigatorVisible;
59307
- var isPreviewVisible = (this.indexToShow * this.pageSize <= index && index < (this.indexToShow + 1) * this.pageSize);
59308
- return !isFileNavigatorVisible || isPreviewVisible;
59309
- };
59310
59755
  QuestionFileModel.prototype.getType = function () {
59311
59756
  return "file";
59312
59757
  };
@@ -59752,6 +60197,7 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59752
60197
  content: content,
59753
60198
  });
59754
60199
  });
60200
+ this.previewValueChanged();
59755
60201
  }
59756
60202
  else {
59757
60203
  if (!!this._previewLoader) {
@@ -59771,7 +60217,6 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59771
60217
  });
59772
60218
  this._previewLoader.load(newValues);
59773
60219
  }
59774
- this.previewValueChanged();
59775
60220
  };
59776
60221
  QuestionFileModel.prototype.getIsQuestionReady = function () {
59777
60222
  return _super.prototype.getIsQuestionReady.call(this) && !this.isFileLoading;
@@ -59915,6 +60360,46 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59915
60360
  QuestionFileModel.prototype.getFileListSelector = function () {
59916
60361
  return classesToSelector(this.cssClasses.fileList);
59917
60362
  };
60363
+ Object.defineProperty(QuestionFileModel.prototype, "renderedPages", {
60364
+ get: function () {
60365
+ return this._renderedPages;
60366
+ },
60367
+ set: function (val) {
60368
+ this.pagesAnimation.sync(val);
60369
+ },
60370
+ enumerable: false,
60371
+ configurable: true
60372
+ });
60373
+ QuestionFileModel.prototype.getPagesAnimationOptions = function () {
60374
+ var _this = this;
60375
+ return {
60376
+ getEnterOptions: function (page) {
60377
+ var pageClass = _this.cssClasses.page;
60378
+ return { cssClass: pageClass ? new CssClassBuilder()
60379
+ .append(pageClass + "--enter-from-left", _this.navigationDirection == "left" || _this.navigationDirection == "left-delete")
60380
+ .append(pageClass + "--enter-from-right", _this.navigationDirection == "right").toString() : ""
60381
+ };
60382
+ },
60383
+ getLeaveOptions: function (page) {
60384
+ var pageClass = _this.cssClasses.page;
60385
+ return {
60386
+ cssClass: pageClass ? new CssClassBuilder()
60387
+ .append(pageClass + "--leave-to-left", _this.navigationDirection == "right")
60388
+ .append(pageClass + "--leave-to-right", _this.navigationDirection == "left").toString() : ""
60389
+ };
60390
+ },
60391
+ getAnimatedElement: function (page) {
60392
+ var _a;
60393
+ return (_a = _this.rootElement) === null || _a === void 0 ? void 0 : _a.querySelector("#" + page.id);
60394
+ },
60395
+ isAnimationEnabled: function () {
60396
+ return _this.animationAllowed && !!_this.rootElement;
60397
+ },
60398
+ getRerenderEvent: function () {
60399
+ return _this.onElementRerendered;
60400
+ }
60401
+ };
60402
+ };
59918
60403
  QuestionFileModel.prototype.triggerResponsiveness = function (hard) {
59919
60404
  if (hard) {
59920
60405
  this.calculatedGapBetweenItems = undefined;
@@ -59923,17 +60408,19 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59923
60408
  _super.prototype.triggerResponsiveness.call(this);
59924
60409
  };
59925
60410
  QuestionFileModel.prototype.processResponsiveness = function (_, availableWidth) {
59926
- var _this = this;
59927
60411
  this._width = availableWidth;
59928
60412
  if (this.rootElement) {
59929
60413
  if ((!this.calculatedGapBetweenItems || !this.calculatedItemWidth) && this.allowMultiple) {
59930
60414
  var fileListSelector = this.getFileListSelector();
59931
60415
  var fileListElement = fileListSelector ? this.rootElement.querySelector(this.getFileListSelector()) : undefined;
59932
60416
  if (fileListElement) {
59933
- this.calculatedGapBetweenItems = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(fileListElement).gap));
59934
- var firstVisibleItem = Array.from(fileListElement.children).filter(function (_, index) { return _this.isPreviewVisible(index); })[0];
59935
- if (firstVisibleItem) {
59936
- this.calculatedItemWidth = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(firstVisibleItem).width));
60417
+ var visiblePage = fileListElement.querySelector(classesToSelector(this.cssClasses.page));
60418
+ if (visiblePage) {
60419
+ var firstVisibleItem = visiblePage.querySelector(classesToSelector(this.cssClasses.previewItem));
60420
+ this.calculatedGapBetweenItems = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(visiblePage).gap));
60421
+ if (firstVisibleItem) {
60422
+ this.calculatedItemWidth = Math.ceil(Number.parseFloat(DomDocumentHelper.getComputedStyle(firstVisibleItem).width));
60423
+ }
59937
60424
  }
59938
60425
  }
59939
60426
  }
@@ -59986,7 +60473,12 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
59986
60473
  propertyArray({})
59987
60474
  ], QuestionFileModel.prototype, "previewValue", void 0);
59988
60475
  question_file_decorate([
59989
- jsonobject_property({ defaultValue: 0 })
60476
+ propertyArray({})
60477
+ ], QuestionFileModel.prototype, "pages", void 0);
60478
+ question_file_decorate([
60479
+ jsonobject_property({ defaultValue: 0, onSet: function (val, target) {
60480
+ target.updateRenderedPages();
60481
+ } })
59990
60482
  ], QuestionFileModel.prototype, "indexToShow", void 0);
59991
60483
  question_file_decorate([
59992
60484
  jsonobject_property({
@@ -60050,6 +60542,9 @@ var question_file_QuestionFileModel = /** @class */ (function (_super) {
60050
60542
  question_file_decorate([
60051
60543
  jsonobject_property()
60052
60544
  ], QuestionFileModel.prototype, "locRenderedPlaceholderValue", void 0);
60545
+ question_file_decorate([
60546
+ propertyArray()
60547
+ ], QuestionFileModel.prototype, "_renderedPages", void 0);
60053
60548
  return QuestionFileModel;
60054
60549
  }(question_file_QuestionFileModelBase));
60055
60550
 
@@ -60522,8 +61017,14 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60522
61017
  }
60523
61018
  _this.createRenderedRateItems();
60524
61019
  });
60525
- _this.createLocalizableString("minRateDescription", _this, true);
60526
- _this.createLocalizableString("maxRateDescription", _this, true);
61020
+ _this.createLocalizableString("minRateDescription", _this, true)
61021
+ .onStringChanged.add(function (sender, options) {
61022
+ _this.hasMinRateDescription = !sender.isEmpty;
61023
+ });
61024
+ _this.createLocalizableString("maxRateDescription", _this, true)
61025
+ .onStringChanged.add(function (sender, options) {
61026
+ _this.hasMaxRateDescription = !sender.isEmpty;
61027
+ });
60527
61028
  _this.initPropertyDependencies();
60528
61029
  return _this;
60529
61030
  }
@@ -60535,8 +61036,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60535
61036
  };
60536
61037
  QuestionRatingModel.prototype.endLoadingFromJson = function () {
60537
61038
  _super.prototype.endLoadingFromJson.call(this);
60538
- this.hasMinRateDescription = !!this.minRateDescription;
60539
- this.hasMaxRateDescription = !!this.maxRateDescription;
60540
61039
  if (this.jsonObj.rateMin !== undefined && this.jsonObj.rateCount !== undefined && this.jsonObj.rateMax === undefined) {
60541
61040
  this.updateRateMax();
60542
61041
  }
@@ -60794,6 +61293,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60794
61293
  }
60795
61294
  if (this.rateType == "smileys" && rateValues.length > 10)
60796
61295
  rateValues = rateValues.slice(0, 10);
61296
+ this.visibleChoicesValue = rateValues.map(function (i, idx) { return _this.getRatingItemValue(i, idx); });
60797
61297
  this.renderedRateItems = rateValues.map(function (v, i) {
60798
61298
  var renderedItem = null;
60799
61299
  if (_this.displayRateDescriptionsAsExtremeItems) {
@@ -60813,14 +61313,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60813
61313
  var step = this.rateStep;
60814
61314
  while (value <= this.rateMax &&
60815
61315
  res.length < settings.ratingMaximumRateValueCount) {
60816
- var description = void 0;
60817
- if (value === this.rateMin) {
60818
- description = this.minRateDescription && this.locMinRateDescription;
60819
- }
60820
- if (value === this.rateMax || res.length === settings.ratingMaximumRateValueCount) {
60821
- description = this.maxRateDescription && this.locMaxRateDescription;
60822
- }
60823
- var item = new RatingItemValue(value, description);
61316
+ var item = new itemvalue_ItemValue(value);
60824
61317
  item.locOwner = this;
60825
61318
  item.ownerPropertyName = "rateValues";
60826
61319
  res.push(item);
@@ -60828,6 +61321,22 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60828
61321
  }
60829
61322
  return res;
60830
61323
  };
61324
+ QuestionRatingModel.prototype.getRatingItemValue = function (item, index) {
61325
+ if (!item)
61326
+ return null;
61327
+ var value = item.value;
61328
+ var description;
61329
+ if (value === this.rateMin) {
61330
+ description = this.minRateDescription && this.locMinRateDescription;
61331
+ }
61332
+ if (value === this.rateMax || index === settings.ratingMaximumRateValueCount) {
61333
+ description = this.maxRateDescription && this.locMaxRateDescription;
61334
+ }
61335
+ var newItem = new RatingItemValue(value, description);
61336
+ newItem.locOwner = item.locOwner;
61337
+ newItem.ownerPropertyName = item.ownerPropertyName;
61338
+ return newItem;
61339
+ };
60831
61340
  QuestionRatingModel.prototype.correctValue = function (value, step) {
60832
61341
  if (!value)
60833
61342
  return value;
@@ -60882,7 +61391,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60882
61391
  },
60883
61392
  set: function (val) {
60884
61393
  this.setLocalizableStringText("minRateDescription", val);
60885
- this.hasMinRateDescription = !!this.minRateDescription;
60886
61394
  },
60887
61395
  enumerable: false,
60888
61396
  configurable: true
@@ -60907,7 +61415,6 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
60907
61415
  },
60908
61416
  set: function (val) {
60909
61417
  this.setLocalizableStringText("maxRateDescription", val);
60910
- this.hasMaxRateDescription = !!this.maxRateDescription;
60911
61418
  },
60912
61419
  enumerable: false,
60913
61420
  configurable: true
@@ -61275,7 +61782,7 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61275
61782
  };
61276
61783
  Object.defineProperty(QuestionRatingModel.prototype, "visibleChoices", {
61277
61784
  get: function () {
61278
- return this.visibleRateValues;
61785
+ return this.visibleChoicesValue;
61279
61786
  },
61280
61787
  enumerable: false,
61281
61788
  configurable: true
@@ -61327,6 +61834,11 @@ var question_rating_QuestionRatingModel = /** @class */ (function (_super) {
61327
61834
  enumerable: false,
61328
61835
  configurable: true
61329
61836
  });
61837
+ QuestionRatingModel.prototype.onBlurCore = function (event) {
61838
+ var _a;
61839
+ (_a = this.dropdownListModel) === null || _a === void 0 ? void 0 : _a.onBlur(event);
61840
+ _super.prototype.onBlurCore.call(this, event);
61841
+ };
61330
61842
  QuestionRatingModel.prototype.updateCssClasses = function (res, css) {
61331
61843
  _super.prototype.updateCssClasses.call(this, res, css);
61332
61844
  if (!!this.dropdownListModel) {
@@ -64346,6 +64858,8 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
64346
64858
  _this.updateFooterActions();
64347
64859
  });
64348
64860
  _this.registerPropertyChangedHandlers(["allowAddPanel"], function () { _this.updateNoEntriesTextDefaultLoc(); });
64861
+ _this.registerPropertyChangedHandlers(["minPanelCount"], function () { _this.onMinPanelCountChanged(); });
64862
+ _this.registerPropertyChangedHandlers(["maxPanelCount"], function () { _this.onMaxPanelCountChanged(); });
64349
64863
  return _this;
64350
64864
  }
64351
64865
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "isCompositeQuestion", {
@@ -65309,17 +65823,18 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65309
65823
  set: function (val) {
65310
65824
  if (val < 0)
65311
65825
  val = 0;
65312
- if (val == this.minPanelCount)
65313
- return;
65314
65826
  this.setPropertyValue("minPanelCount", val);
65315
- if (val > this.maxPanelCount)
65316
- this.maxPanelCount = val;
65317
- if (this.panelCount < val)
65318
- this.panelCount = val;
65319
65827
  },
65320
65828
  enumerable: false,
65321
65829
  configurable: true
65322
65830
  });
65831
+ QuestionPanelDynamicModel.prototype.onMinPanelCountChanged = function () {
65832
+ var val = this.minPanelCount;
65833
+ if (val > this.maxPanelCount)
65834
+ this.maxPanelCount = val;
65835
+ if (this.panelCount < val)
65836
+ this.panelCount = val;
65837
+ };
65323
65838
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "maxPanelCount", {
65324
65839
  /**
65325
65840
  * A maximum number of panels in Dynamic Panel. Users cannot add new panels if `panelCount` equals `maxPanelCount`.
@@ -65337,17 +65852,20 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
65337
65852
  return;
65338
65853
  if (val > settings.panel.maxPanelCount)
65339
65854
  val = settings.panel.maxPanelCount;
65340
- if (val == this.maxPanelCount)
65341
- return;
65342
65855
  this.setPropertyValue("maxPanelCount", val);
65343
- if (val < this.minPanelCount)
65344
- this.minPanelCount = val;
65345
- if (this.panelCount > val)
65346
- this.panelCount = val;
65856
+ this.updateFooterActions();
65347
65857
  },
65348
65858
  enumerable: false,
65349
65859
  configurable: true
65350
65860
  });
65861
+ QuestionPanelDynamicModel.prototype.onMaxPanelCountChanged = function () {
65862
+ var val = this.maxPanelCount;
65863
+ if (val < this.minPanelCount)
65864
+ this.minPanelCount = val;
65865
+ if (this.panelCount > val)
65866
+ this.panelCount = val;
65867
+ this.updateFooterActions();
65868
+ };
65351
65869
  Object.defineProperty(QuestionPanelDynamicModel.prototype, "allowAddPanel", {
65352
65870
  /**
65353
65871
  * Specifies whether users are allowed to add new panels.
@@ -66095,6 +66613,12 @@ var question_paneldynamic_QuestionPanelDynamicModel = /** @class */ (function (_
66095
66613
  QuestionPanelDynamicModel.prototype.onSurveyLoad = function () {
66096
66614
  this.template.readOnly = this.isReadOnly;
66097
66615
  this.template.onSurveyLoad();
66616
+ if (this.panelCount < this.minPanelCount) {
66617
+ this.panelCount = this.minPanelCount;
66618
+ }
66619
+ if (this.panelCount > this.maxPanelCount) {
66620
+ this.panelCount = this.maxPanelCount;
66621
+ }
66098
66622
  this.buildPanelsFirstTime();
66099
66623
  _super.prototype.onSurveyLoad.call(this);
66100
66624
  };
@@ -70007,8 +70531,8 @@ Serializer.addClass("currencymask", [
70007
70531
 
70008
70532
  var Version;
70009
70533
  var ReleaseDate;
70010
- Version = "" + "1.12.3";
70011
- ReleaseDate = "" + "2024-09-24";
70534
+ Version = "" + "1.12.5";
70535
+ ReleaseDate = "" + "2024-10-07";
70012
70536
  function checkLibraryVersion(ver, libraryName) {
70013
70537
  if (Version != ver) {
70014
70538
  var str = "survey-core has version '" + Version + "' and " + libraryName